Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--discovery/org.eclipse.rse.discovery/.classpath7
-rw-r--r--discovery/org.eclipse.rse.discovery/.cvsignore1
-rw-r--r--discovery/org.eclipse.rse.discovery/.project28
-rw-r--r--discovery/org.eclipse.rse.discovery/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--discovery/org.eclipse.rse.discovery/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--discovery/org.eclipse.rse.discovery/META-INF/MANIFEST.MF17
-rw-r--r--discovery/org.eclipse.rse.discovery/about.html28
-rw-r--r--discovery/org.eclipse.rse.discovery/build.properties17
-rw-r--r--discovery/org.eclipse.rse.discovery/plugin.properties13
-rw-r--r--discovery/org.eclipse.rse.discovery/plugin.xml49
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/Activator.java60
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/Messages.java34
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoverySubSystemConfiguration.java60
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoveryWizard.java136
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoveryWizardDelegate.java90
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/messages.properties15
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/.project17
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/build.properties16
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/epl-v10.html328
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/feature.properties146
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/feature.xml105
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/license.html79
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.html33
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/.classpath7
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/.cvsignore1
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/.options1
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/.project28
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/META-INF/MANIFEST.MF19
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/about.ini27
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/about.mappings6
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/about.properties25
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/build.properties22
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/plugin.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/plugin.xml6
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/schema/discoveryProtocol.exsd109
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/schema/discoveryTransport.exsd109
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/Activator.java60
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/Messages.java32
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/ServiceDiscoveryEngine.java99
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/messages.properties11
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/IProtocol.java62
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/ProtocolFactory.java116
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/transport/ITransport.java61
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/transport/TransportFactory.java85
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/.classpath7
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/.cvsignore1
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/.project28
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/META-INF/MANIFEST.MF15
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/build.properties20
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/Pair.gifbin129 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/device.gifbin918 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/network.gifbin899 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/service.gifbin574 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/serviceType.gifbin216 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/plugin.properties60
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/plugin.xml29
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/DeviceItemProvider.java218
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/DiscoveryModelEditPlugin.java88
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ModelItemProviderAdapterFactory.java271
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/NetworkItemProvider.java144
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/PairItemProvider.java198
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ServiceItemProvider.java175
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ServiceTypeItemProvider.java170
-rw-r--r--discovery/org.eclipse.tm.discovery.model/.classpath7
-rw-r--r--discovery/org.eclipse.tm.discovery.model/.cvsignore1
-rw-r--r--discovery/org.eclipse.tm.discovery.model/.project28
-rw-r--r--discovery/org.eclipse.tm.discovery.model/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--discovery/org.eclipse.tm.discovery.model/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--discovery/org.eclipse.tm.discovery.model/META-INF/MANIFEST.MF17
-rw-r--r--discovery/org.eclipse.tm.discovery.model/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.model/build.properties18
-rw-r--r--discovery/org.eclipse.tm.discovery.model/ecore/discoveryModel.genmodel30
-rw-r--r--discovery/org.eclipse.tm.discovery.model/ecore/discoveryModel.xsd49
-rw-r--r--discovery/org.eclipse.tm.discovery.model/ecore/model.ecore101
-rw-r--r--discovery/org.eclipse.tm.discovery.model/plugin.properties26
-rw-r--r--discovery/org.eclipse.tm.discovery.model/plugin.xml28
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Activator.java60
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Device.java89
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ModelFactory.java79
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ModelPackage.java515
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Network.java46
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Pair.java75
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Service.java68
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ServiceType.java68
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/DeviceImpl.java258
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ModelFactoryImpl.java137
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ModelPackageImpl.java471
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/NetworkImpl.java144
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/PairImpl.java204
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ServiceImpl.java208
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ServiceTypeImpl.java208
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelAdapterFactory.java188
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelResourceFactoryImpl.java57
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelResourceImpl.java35
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelSwitch.java214
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelXMLProcessor.java51
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/.classpath7
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/.cvsignore1
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/.project28
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/META-INF/MANIFEST.MF15
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/build.properties17
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.xml9
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/Activator.java60
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/DNSSDProtocol.java716
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/Messages.java32
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/messages.properties14
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/.classpath7
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/.cvsignore1
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/.project28
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/META-INF/MANIFEST.MF13
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/build.properties17
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/plugin.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/plugin.xml10
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/discovery/transport/udp/Activator.java60
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/discovery/transport/udp/UDPTransport.java104
-rw-r--r--discovery/org.eclipse.tm.discovery.view/.classpath7
-rw-r--r--discovery/org.eclipse.tm.discovery.view/.cvsignore1
-rw-r--r--discovery/org.eclipse.tm.discovery.view/.project28
-rw-r--r--discovery/org.eclipse.tm.discovery.view/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--discovery/org.eclipse.tm.discovery.view/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--discovery/org.eclipse.tm.discovery.view/META-INF/MANIFEST.MF25
-rw-r--r--discovery/org.eclipse.tm.discovery.view/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.view/build.properties20
-rw-r--r--discovery/org.eclipse.tm.discovery.view/icons/system_view.gifbin362 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.view/plugin.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery.view/plugin.xml30
-rw-r--r--discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/Activator.java71
-rw-r--r--discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/Messages.java56
-rw-r--r--discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/ServiceDiscoveryView.java313
-rw-r--r--discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/messages.properties26
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/.classpath7
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/.cvsignore1
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/.project28
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/META-INF/MANIFEST.MF18
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/build.properties16
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/plugin.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/Activator.java60
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/Messages.java32
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java591
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/ServiceDiscoveryWizardMainPage.java200
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/messages.properties34
-rw-r--r--releng/readme.txt3
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/.classpath6
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/.cvsignore7
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/.project22
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/META-INF/MANIFEST.MF8
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/aaa-how-to-add-things.txt29
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/about.html28
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/book.css1
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/build.properties23
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/buildDoc.xml140
-rw-r--r--rse/doc/org.eclipse.dstore.doc.isv/customBuildCallbacks.xml157
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/Artifacts.html64
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/ClientSide.html171
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/Communications.html159
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/DataElements.html206
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/Extending.html18
-rw-r--r--rse/doc/org.eclipse.dstore.doc.isv/guide/MemoryManagement.html68
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/Miners.html142
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/ServerSide.html36
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/images/arch.jpgbin32244 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/images/local.jpgbin74842 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/images/remote.jpgbin56852 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/guide/overview.html67
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/notices.html22
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/options.txt25
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/plugin.properties14
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/plugin.xml9
-rw-r--r--rse/doc/org.eclipse.dstore.doc.isv/provisional_api.html32
-rw-r--r--rse/doc/org.eclipse.dstore.doc.isv/reference/.cvsignore1
-rw-r--r--rse/doc/org.eclipse.dstore.doc.isv/reference/placeholder.txt1
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/toc.html39
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/toc.xml30
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/.classpath6
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/.cvsignore7
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/.project11
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/META-INF/MANIFEST.MF8
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/aaa-how-to-add-things.txt29
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/about.html28
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/book.css112
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/build.properties31
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/buildDoc.xml152
-rw-r--r--rse/doc/org.eclipse.rse.doc.isv/customBuildCallbacks.xml157
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/Artifacts.html209
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/Extensions.html99
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/Model.html56
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/ModelRSE.pngbin17799 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/actions/uiActionsAPI.html89
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/browseFolderDialog.gifbin8099 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/deleteDialog.gifbin4559 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/dialogSample.html265
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/renameManyDialog.gifbin3920 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/renameOneDialog.gifbin1987 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/sampleDlg.gifbin2773 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/selectTypesDialog.gifbin7347 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/simpleSelectDialog.gifbin5673 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/uiDialogsAPI.html180
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/logger/logPreferences.gifbin7491 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/logger/uiLoggerAPI.html81
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/massagers/uiMassagersAPI.html54
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgDialog.gifbin3517 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_dialog.gifbin2510 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_properties.gifbin2749 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_wizard.gifbin2955 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgSample_msgDlg.gifbin3321 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgSample_msgline.gifbin3185 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/sampleMessageFile.html81
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessageAPI.html154
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessageFile.html79
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessagesCore.html1010
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/modelAPI.html23
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/plugin/uiPluginAPI.html80
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_checkBox.gifbin1103 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_comboBox.gifbin1558 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_keyValue.gifbin2158 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_string.gifbin540 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/rsePreferences.gifbin13922 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/uiPreferencesAPI.html53
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/properties/uiPropertiesAPI.html76
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/resourceAPI.html33
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/uiAPI.html125
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/validators/uiValidatorsAPI.html226
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample1.html97
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample2.html45
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample3.html43
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample4.html44
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/widgets/uiWidgetsAPI.html73
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/api/wizards/uiWizardsAPI.html74
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/file_conn.gifbin14443 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/file_profiles.gifbin6041 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/images/configexample.jpgbin25115 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/images/layers.jpgbin3299 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/overview.html14
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/ChangeFilterDialog_Default.gifbin8870 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/NewConnection.gifbin9061 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/NewFilterWizard_Default.gifbin6978 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/RSView_iSeries.gifbin7592 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/other.html160
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/popup.html146
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage.html77
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure1.gifbin13377 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure2.gifbin7801 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/subsystem.html243
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/systemtype.html37
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Cmds.gifbin9257 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_RS.gifbin8537 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Table.gifbin13951 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Team.gifbin5987 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/preference_activeProfiles.gifbin9287 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/preferences.gifbin19064 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse.gifbin48676 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int.html48
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_architecture.html78
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_connectorservices.html15
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_files.html16
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_filters.html15
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_hosts.html15
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_overview.html44
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_processes.html16
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_services.html15
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_shells.html16
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_subsystems.html15
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_ui.html16
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperAdapterFactory.html58
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorService.html100
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorServiceManager.html94
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterDialog.gifbin9073 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterStringEditPane.html210
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterWizard.gifbin7512 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperResource.html104
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperResourceAdapter.html219
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem.html202
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem2.html233
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration.html102
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration2.html112
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/FolderInfoPropertyPage1.html47
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/FolderInfoPropertyPage2.html269
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/IDeveloperSubSystem.html30
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry.html26
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry2.html28
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterActions.gifbin1865 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterIcons.gifbin1898 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterWizard.gifbin6938 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin.html141
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin2.html167
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents1.html43
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents2.html64
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamFilterDialog.gifbin8553 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamFilterWizard.gifbin7126 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamResource.html83
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamResourceAdapter.html228
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/index.html1
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/newFilterAction.gifbin10588 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_1.gifbin11698 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props1.gifbin19995 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2.gifbin20300 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2_addvar1.gifbin8180 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2_addvar2.gifbin10114 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3.gifbin20757 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3_addvar1.gifbin8291 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3_addvar2.gifbin11367 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props4.gifbin21170 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar1.gifbin8192 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar1_selectFolder.gifbin10144 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar2.gifbin5292 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar3.gifbin8090 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar4.gifbin10151 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar5.gifbin5279 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_newVar_msg.gifbin5279 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_after.gifbin12527 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page1.gifbin10948 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page3.gifbin15778 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page4.gifbin12434 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProject.html64
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup.html113
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_newClass.gifbin14131 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_run.gifbin16633 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_see.gifbin10579 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/preferences_JavaFormatting.gifbin20408 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage.html84
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_newClass.gifbin14176 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_done.gifbin9717 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_during.gifbin9907 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_see.gifbin13764 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/renameAction.gifbin8846 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/renameDialog.gifbin4991 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesMessages2.html38
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources2.html27
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources3.html27
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources4.html41
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/runIt1.gifbin29144 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/runIt2.gifbin33058 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/startup.html25
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/subsystem.html245
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/testFilter.gifbin7426 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/testRename.gifbin2793 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorials.html41
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/usingAPIs.html54
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/view_RS.gifbin8537 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/view_pulldown.gifbin8995 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/icons/developer.gifbin138 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/icons/developerFilter.gifbin903 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/icons/team.gifbin916 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/icons/teamFilter.gifbin930 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/notices.html22
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/options.txt191
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/plugin.properties12
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/plugin.xml43
-rw-r--r--rse/doc/org.eclipse.rse.doc.isv/provisional_api.html32
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/questions/index.html39
-rw-r--r--rse/doc/org.eclipse.rse.doc.isv/reference/.cvsignore1
-rw-r--r--rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/.cvsignore1
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html31
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/reference/misc/index.html20
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/reference/misc/overview-rse.html40
-rw-r--r--rse/doc/org.eclipse.rse.doc.isv/reference/misc/runtime-options.html42
-rw-r--r--rse/doc/org.eclipse.rse.doc.isv/samples/samples.html15
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/schema.css66
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/toc.xml21
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/topics_Guide.xml36
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/topics_Questions.xml7
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml190
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/topics_Samples.xml9
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/.project22
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/META-INF/MANIFEST.MF8
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/about.html28
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/book.css1
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/build.properties24
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cbegin.html66
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cfilters.html118
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cprofile.html104
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cremcompile.html60
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/crunremcmds.html42
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cteam.html71
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cuniversal.html54
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cuseractions.html48
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/g1installing.html48
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/g2firststeps.html61
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/g_start.html56
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/gusing.html68
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/gxtending.html44
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/images/ModelRSE.gifbin15335 -> 0 bytes
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/images/RSESample.gifbin45832 -> 0 bytes
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/images/RSESample_small.gifbin29962 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/images/gsarrow.gifbin942 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/images/navigator.jpgbin17995 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/images/newconnection_wiz.gifbin226 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/images/pw.jpgbin13981 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/images/search.gifbin10648 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/notices.html22
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/plugin.properties18
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/plugin.xml22
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/ref/rrsepref.html79
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/ref/rsearch.html86
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tarchive.html182
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbegindelete.html33
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbegindeleteprofile.html33
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbegindiscon.html60
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginenv.html67
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginlinux.html178
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginpass.html52
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecond.html36
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecprofile.html27
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginwindows.html123
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbuild.html40
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tedittype.html34
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tmanagedel.html29
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tmanageedit.html42
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tmanagemem.html32
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tmanagepools.html73
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tmanagepoolsref.html57
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tmanagesearch.html94
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tremoexp.html45
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tremoimp.html33
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tremtype.html31
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/truncmdsview.html54
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/ttablecopy.html37
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/ttabledrag.html48
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tteamsup.html137
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tteamsup1.html84
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tworkuseract.html75
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/twrkcmdshl.html57
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/toc.xml62
-rw-r--r--rse/doc/readme.txt2
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/.project17
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/build.properties16
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/epl-v10.html328
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/feature.properties146
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/feature.xml52
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/license.html79
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/.classpath7
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/.cvsignore1
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/.project28
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/META-INF/MANIFEST.MF17
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/about.html28
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/build.properties24
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytime.gifbin252 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytime_obj.gifbin935 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytimelive_obj.gifbin343 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/systemfiles_obj.gifbin157 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/systemfileslive_obj.gifbin224 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/plugin.properties21
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/plugin.xml56
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/readme.txt55
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/Activator.java78
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.java37
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.properties21
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorService.java107
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java70
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeAdapterFactory.java49
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResource.java46
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResourceAdapter.java138
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/DaytimeService.java72
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/IDaytimeService.java32
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystem.java87
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java106
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/IDaytimeSubSystem.java20
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeNewConnectionWizardPage.java45
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapter.java55
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapterFactory.java62
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/.classpath7
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/.cvsignore1
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/.project28
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/.settings/org.eclipse.jdt.core.prefs58
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/META-INF/MANIFEST.MF21
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/about.html28
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/build.properties25
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/icons/developer.gifbin138 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/icons/developerFilter.gifbin903 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/icons/systemconnection.gifbin200 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/icons/systemconnectionlive.gifbin217 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/icons/team.gifbin916 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/icons/teamFilter.gifbin930 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/plugin.properties13
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/plugin.xml71
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/rseSamplesMessages.xml19
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java179
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperAdapterFactory.java55
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResource.java101
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResourceAdapter.java221
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResource.java83
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResourceAdapter.java231
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/rseSamplesResources.properties56
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorService.java115
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java78
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperFilterStringEditPane.java211
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java234
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java111
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapter.java108
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java62
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/IDeveloperSubSystem.java21
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java141
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java266
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/.classpath7
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/.cvsignore1
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/.project28
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/HelpContexts.xml20
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/META-INF/MANIFEST.MF26
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/about.html28
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/about.ini27
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/about.mappings6
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/about.properties25
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/build.properties32
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/c_app.gifbin606 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/systemlocal_obj.gifbin580 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/systemlocallive_obj.gifbin592 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/plugin.properties13
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/plugin.xml74
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/remotecdt.html69
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/Activator.java58
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/IRemoteConnectionConfigurationConstants.java43
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/Messages.java48
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteCDebuggerTab.java56
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteCMainTab.java330
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteGDBDebuggerPage.java141
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteLaunchConfigurationTabGroup.java37
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteRunLaunchDelegate.java299
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/messages.properties31
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/toc.xml16
-rw-r--r--rse/examples/readme.txt2
-rw-r--r--rse/features/org.eclipse.rse-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse-feature/build.properties22
-rw-r--r--rse/features/org.eclipse.rse-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse-feature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse-feature/feature.properties146
-rw-r--r--rse/features/org.eclipse.rse-feature/feature.xml54
-rw-r--r--rse/features/org.eclipse.rse-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.core-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.core-feature/build.properties14
-rw-r--r--rse/features/org.eclipse.rse.core-feature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.core-feature/feature.properties145
-rw-r--r--rse/features/org.eclipse.rse.core-feature/feature.xml121
-rw-r--r--rse/features/org.eclipse.rse.core-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/feature.properties144
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/build.properties13
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/build.properties14
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/feature.properties141
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/feature.xml89
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/build.properties13
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/build.properties16
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/feature.properties146
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/feature.xml49
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/build.properties14
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/feature.properties145
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/feature.xml58
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/feature.properties145
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.properties26
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/build.properties13
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.local-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.local-feature/build.properties14
-rw-r--r--rse/features/org.eclipse.rse.local-feature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.local-feature/feature.properties143
-rw-r--r--rse/features/org.eclipse.rse.local-feature/feature.xml75
-rw-r--r--rse/features/org.eclipse.rse.local-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/feature.properties143
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/build.properties13
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/build.properties17
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/feature.properties144
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/feature.xml45
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/feature.properties143
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/build.properties13
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/build.properties22
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/feature.properties146
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/feature.xml79
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/build.properties14
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/feature.properties142
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/feature.xml66
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/feature.properties142
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/build.properties13
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/readme.txt2
-rw-r--r--rse/plugins/org.eclipse.dstore.core/.classpath7
-rw-r--r--rse/plugins/org.eclipse.dstore.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.dstore.core/.project28
-rw-r--r--rse/plugins/org.eclipse.dstore.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.dstore.core/META-INF/MANIFEST.MF22
-rw-r--r--rse/plugins/org.eclipse.dstore.core/about.html28
-rw-r--r--rse/plugins/org.eclipse.dstore.core/build.properties19
-rw-r--r--rse/plugins/org.eclipse.dstore.core/export.jardesc18
-rw-r--r--rse/plugins/org.eclipse.dstore.core/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/Activator.java59
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientAttributes.java57
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientCommandHandler.java381
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java929
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientReceiver.java77
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientSSLProperties.java106
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientUpdateHandler.java189
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ConnectionStatus.java150
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandler.java211
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandlerRegistry.java78
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassInstanceOutputStream.java29
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassRequest.java140
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IClassByteStreamHandler.java54
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IRemoteClassInstance.java25
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/LocalObjectInputStream.java54
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteClassLoader.java491
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteObjectInputStream.java39
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/miner/Miner.java669
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/miner/MinerThread.java122
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java290
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandlerRegistry.java82
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java299
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DE.java235
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java1682
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java4202
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreAttributes.java95
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.java115
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.properties103
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreSchema.java350
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultByteConverter.java91
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Handler.java161
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteConverter.java29
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteStreamHandler.java59
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreConstants.java32
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreProvider.java22
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISSLProperties.java28
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaExtender.java49
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaProvider.java25
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaRegistry.java50
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/SchemaRegistry.java91
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java260
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java433
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/MinerLoader.java419
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/Server.java160
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerAttributes.java72
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerCommandHandler.java496
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLauncher.java662
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java91
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReturnCodes.java39
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerSSLProperties.java147
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerUpdateHandler.java462
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/CommandGenerator.java310
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/DataElementRemover.java195
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ExternalLoader.java106
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ISender.java27
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Pattern.java165
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java166
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Sender.java337
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Sorter.java71
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/StringCompare.java123
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/XMLgenerator.java676
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/XMLparser.java1048
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreKeyStore.java128
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreSSLContext.java74
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DataStoreTrustManager.java150
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/.classpath7
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/.project28
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/META-INF/MANIFEST.MF14
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/about.html28
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/build.properties19
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DataElementActionFilter.java57
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DesktopElement.java32
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DomainEvent.java101
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DomainNotifier.java53
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDataElement.java35
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDesktopElement.java23
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDomainListener.java25
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDomainNotifier.java27
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IElement.java24
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IPropertySource.java23
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/PropertySource.java31
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/serverruntime/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/Activator.java59
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DataElementActionFilter.java87
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DesktopElement.java82
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DomainEvent.java101
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DomainNotifier.java118
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDataElement.java35
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDataElementActionFilter.java23
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDesktopElement.java24
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDomainListener.java24
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDomainNotifier.java27
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IElement.java26
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IPropertySource.java23
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/PropertySource.java150
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF20
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/build.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/Activator.java76
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/ConnectorServiceResources.java32
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/ConnectorServiceResources.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java1347
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java113
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreConstants.java70
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreMessages.java60
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreSubSystem.java26
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalSubSystemConfiguration.java26
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/RexecDstoreServer.java1201
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ConnectionStatusListener.java272
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ICommunicationsDiagnostic.java80
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ICommunicationsDiagnosticFactory.java29
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitor.java456
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitorFactory.java78
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/META-INF/MANIFEST.MF16
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/build.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/Activator.java70
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ConnectorServiceResources.java32
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ConnectorServiceResources.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ILocalSubSystem.java25
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorService.java131
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorServiceManager.java115
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/.options1
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/META-INF/MANIFEST.MF18
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/build.properties20
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/obj16/systemcommands_obj.gifbin230 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/obj16/systemcommandslive_obj.gifbin246 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/wizban/keylock.gifbin1501 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.properties17
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.xml22
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/Activator.java113
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/ISshConstants.java45
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/ISshSubSystem.java23
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/KeyboardInteractiveDialog.java185
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.java48
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.properties37
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorService.java818
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorServiceManager.java67
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/UserValidationDialog.java277
-rw-r--r--rse/plugins/org.eclipse.rse.core/.classpath8
-rw-r--r--rse/plugins/org.eclipse.rse.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.core/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF23
-rw-r--r--rse/plugins/org.eclipse.rse.core/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.core/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.core/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.core/about.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.core/build.properties26
-rw-r--r--rse/plugins/org.eclipse.rse.core/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/Messages.java29
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/PropertyFileProvider.java832
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java442
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/SaveRSEDOMJob.java54
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/SerializingProvider.java187
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java445
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java560
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/messages.properties20
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/IRSEPersistenceManager.java125
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/IRSEPersistenceProvider.java63
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java88
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMExporter.java151
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMImporter.java78
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOM.java99
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOMNode.java256
-rw-r--r--rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java58
-rw-r--r--rse/plugins/org.eclipse.rse.core/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.core/plugin.xml28
-rw-r--r--rse/plugins/org.eclipse.rse.core/schema/persistenceProviders.exsd125
-rw-r--r--rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd215
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.java47
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java18
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java115
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java23
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java51
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java174
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/IRSEFilterNamingPolicy.java68
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java706
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterConstants.java41
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainer.java127
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainerReference.java85
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java342
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java621
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManagerProvider.java132
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReference.java75
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java297
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManagerProvider.java94
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolSelectionValidator.java41
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapper.java33
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapperInformation.java51
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterReference.java101
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterSavePolicies.java46
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java67
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterString.java96
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStringReference.java58
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterNamingPolicy.java151
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterPoolManager.java1763
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java149
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java131
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/AbstractSystemResourceSet.java144
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java209
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IProperty.java34
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java150
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySetContainer.java30
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertyType.java33
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEModelObject.java25
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurationCategories.java39
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContainer.java59
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContentsType.java36
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemHostPool.java179
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemMessageObject.java72
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeEvent.java43
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeEvents.java105
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeListener.java40
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemNewConnectionWizardPage.java48
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeEvent.java45
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeEvents.java45
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeListener.java34
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfile.java95
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java147
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java657
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemResourceSet.java36
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Property.java95
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySet.java163
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySetContainer.java86
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyType.java174
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelObject.java83
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java139
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelResources.java36
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelResources.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemChildrenContentsType.java50
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemFilterStringContentsType.java49
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemMessageObject.java104
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java124
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemWorkspaceResourceSet.java41
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/persistance/IRSEPersistableContainer.java59
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferenceManager.java174
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencedObject.java47
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencingObject.java53
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencedObject.java51
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencingObject.java55
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencedObject.java26
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencingObject.java68
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencedObject.java32
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencingObject.java37
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/CommunicationsEvent.java46
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICacheManager.java44
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICommunicationsListener.java49
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java336
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java27
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java72
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteContainer.java62
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteLineReference.java62
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectIdentifier.java30
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java32
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemotePropertyHolder.java70
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteServerLauncher.java177
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java78
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java100
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java51
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServiceSubSystem.java24
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServiceSubSystemConfiguration.java38
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java650
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java547
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java99
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteChildrenContentsType.java51
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java288
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/SubSystemFilterNamingPolicy.java121
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferenceManager.java485
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObject.java42
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObjectHelper.java58
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObject.java92
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObjectHelper.java67
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencedObject.java88
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencedObjectHelper.java134
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencingObject.java98
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencingObjectHelper.java84
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/META-INF/MANIFEST.MF22
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/icons/full/obj16/certif_file.gifbin592 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/icons/full/wizban/import_cert_wiz.gifbin3268 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/plugin.properties24
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/plugin.xml65
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/ImageRegistry.java159
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalKeystoreProvider.java74
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityPlugin.java119
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityProperties.java95
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityProperties.properties79
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertPropertiesDialog.java56
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableContentProvider.java48
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableLabelProvider.java96
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableSorter.java193
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/Element.java54
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/KeyElement.java62
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/KeyPropertiesDialog.java28
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/NewCertDialog.java161
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/RenameCertDialog.java110
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java532
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/X509CertificateElement.java215
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/X509CertificatePropertiesDialog.java28
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/util/GridUtil.java68
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/util/StringModifier.java52
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/widgets/CertificateForm.java185
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/widgets/CertificatePropertiesForm.java291
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/NewCertTableLabelProvider.java96
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertAction.java51
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizard.java145
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardAliasPage.java203
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardMainPage.java214
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/META-INF/MANIFEST.MF20
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/about.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/build.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/plugin.properties20
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/plugin.xml61
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/Activator.java76
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/FileStoreConversionUtility.java41
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileStoreRemoteFileWrapper.java477
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystem.java166
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystemContributor.java111
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/ui/actions/CreateRemoteProjectActionDelegate.java204
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.pde.prefs14
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF34
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/system_search.gifbin587 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfile.gifbin354 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfiles_obj.gifbin317 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfileslive_obj.gifbin339 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfolder.gifbin216 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systeminfo.gifbin120 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemlocal_obj.gifbin580 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemlocallive_obj.gifbin592 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdrive.gifbin336 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdriveopen.gifbin339 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemsearchresult.gifbin586 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/archive_ovr.gifbin164 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/binary_ovr.gifbin63 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_binary_ovr.gifbin111 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_ovr.gifbin79 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exscript_ovr.gifbin169 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/shared_objunix_ovr.gifbin169 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/sharedlib_ovr.gifbin113 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/symblclnk_ovr.gifbin117 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/virtual_tsk.gifbin114 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/plugin.properties47
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/plugin.xml349
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/Activator.java152
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.java291
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.properties283
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemAddFileListener.java53
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileConstants.java158
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileMessages.java36
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileFilterStringEditPane.java827
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileTreeAndListGroup.java168
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAbstractRemoteFilePopupMenuExtensionAction.java141
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAddToArchiveAction.java411
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemBrowseFileAction.java52
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemBrowseFileLineAction.java55
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCombineAction.java172
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCompareFilesAction.java121
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCompareWithEditionAction.java38
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemConvertAction.java180
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCopyRemoteFileAction.java564
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCreateEditActions.java271
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDoubleClickEditAction.java97
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java292
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileAction.java164
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileInPlaceAction.java84
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileLineAction.java126
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilePlatformAction.java84
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilesAction.java189
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditionAction.java384
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractAction.java267
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractToAction.java199
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemFileUpdateFilterAction.java56
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemMoveRemoteFileAction.java198
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileAction.java68
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterAction.java82
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterFromFolderAction.java123
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFolderAction.java67
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteArchiveSelectAction.java47
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java208
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileOpenWithMenu.java438
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSearchOpenWithMenu.java148
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSelectAction.java504
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFolderSelectAction.java95
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemReplaceWithEditionAction.java38
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchAction.java44
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchBrowseFileLineAction.java51
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchEditFileLineAction.java162
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectFileTypesAction.java157
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.java524
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.java502
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java595
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java250
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemEnterOrSelectRemoteFileDialog.java112
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemPromptForHomeFolderDialog.java130
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteArchiveDialog.java69
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java58
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java46
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFolderDialog.java68
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java561
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderAction.java465
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderDialog.java48
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderForm.java44
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteObjectAPIProvider.java91
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/FileServicesPropertyPage.java98
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemAbstractRemoteFilePropertyPageExtensionAction.java119
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java650
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java298
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java954
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveDialog.java90
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveForm.java177
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineDialog.java142
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineForm.java451
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/DefaultMountPathMapper.java44
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToDialog.java73
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToForm.java328
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/FileSelectionDialog.java86
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/FileSelectionForm.java74
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISaveAsDialog.java33
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemCachedRemoteResource.java86
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemMountPathMapper.java68
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteCoreConstants.java27
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditConstants.java55
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResource.java36
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResourceManager.java56
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteManager.java42
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarker.java220
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarkerSetElement.java31
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemotePath.java56
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteResource.java176
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditor.java31
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditorConstants.java50
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsDialog.java96
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsForm.java238
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java1863
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemFileNameHelper.java81
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemIFileProperties.java547
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteEditManager.java773
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarker.java284
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerInfo.java233
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerManager.java400
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerSet.java354
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinition.java141
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java123
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemotePath.java96
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResource.java175
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResourceInfo.java92
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResourceManager.java84
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemSafeFileOutputStream.java220
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java670
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java316
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java2063
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemOpenSearchPageAction.java62
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchPage.java1462
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchSelectFileTypesAction.java47
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchSelectFileTypesDialog.java132
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/DownloadJob.java100
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java200
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapterFactory.java59
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewFileAdapterFactory.java65
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteFileAdapter.java3172
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultAdapter.java790
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java355
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewSearchResultAdapterFactory.java79
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewSearchResultSetAdapterFactory.java75
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/ISystemRemoteFolderBrowseCompleteListener.java34
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java226
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileWidgetHelpers.java121
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java773
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteConnectionCombo.java65
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java568
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java1056
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java612
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemFileNewConnectionWizardPage.java225
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizard.java409
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java223
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizard.java272
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java225
-rw-r--r--rse/plugins/org.eclipse.rse.logging/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.logging/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.logging/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.logging/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.logging/HelpContexts.xml30
-rw-r--r--rse/plugins/org.eclipse.rse.logging/META-INF/MANIFEST.MF15
-rw-r--r--rse/plugins/org.eclipse.rse.logging/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.logging/build.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.logging/plugin.properties27
-rw-r--r--rse/plugins/org.eclipse.rse.logging/plugin.xml37
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/internal/logging/LoggingPreferenceInitializer.java43
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/IRemoteSystemsLogging.java59
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/Logger.java219
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/LoggerFactory.java61
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/RemoteSystemLogListener.java139
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/RemoteSystemsLoggingPlugin.java100
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/performance/PerformanceLogger.java696
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LabelUtil.java162
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferenceLabels.java30
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferenceLabels.properties30
-rw-r--r--rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferencePage.java275
-rw-r--r--rse/plugins/org.eclipse.rse.logging/style/performancelogtohtml.xsl36
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/HelpContexts.xml57
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF36
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/build.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/icons/full/dlcl16/killprocessj.gifbin352 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/icons/full/elcl16/killprocessj.gifbin582 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess.gifbin962 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess_obj.gifbin582 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/inactiveprocess_obj.gifbin344 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystem_obj.gifbin574 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystemlive_obj.gifbin594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/messageFile.dtd22
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/plugin.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/plugin.xml65
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/processmessages.xml50
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/ProcessesPlugin.java167
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java734
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessesResources.java90
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessesResources.properties81
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemKillProcessAction.java361
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemNewProcessFilterAction.java71
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemProcessUpdateFilterAction.java51
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/RemoteProcessesDialog.java174
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillDialog.java333
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillTableProvider.java79
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillTableRow.java150
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/propertypages/ProcessServicesPropertyPage.java93
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/ISystemProcessPropertyConstants.java36
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/RemoteProcessSubSystemConfigurationAdapter.java68
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/RemoteProcessSubSystemConfigurationAdapterFactory.java59
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessStatesContentProvider.java135
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessesViewResources.java100
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessesViewResources.properties86
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewProcessAdapterFactory.java60
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewRemoteProcessAdapter.java485
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/.classpath6
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/.project22
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/META-INF/MANIFEST.MF8
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/about.properties28
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/build.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/src/readme.txt1
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/.classpath8
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF28
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/about.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/build.properties24
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc14
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/export.jardesc18
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/exportDstore.jardesc14
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc14
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/exportclientserver.jardesc14
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/ICancellableHandler.java29
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalDataStoreConstants.java103
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/ServerLogger.java180
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalServerUtilities.java112
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/CommandMiner.java278
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/CommandMinerThread.java1218
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/OutputHandler.java397
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/ProcessTracker.java446
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/QueryPathThread.java149
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/CommandPattern.java77
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/OutputPattern.java106
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/ParsedOutput.java40
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/Patterns.java314
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/environment/EnvironmentMiner.java232
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/ClassFileParser.java155
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/FileClassifier.java1048
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalByteStreamHandler.java348
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalDownloadHandler.java270
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalFileSystemFilter.java124
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalFileSystemMiner.java3013
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalSearchHandler.java399
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/IUniversalProcessDataStoreConstants.java43
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/ProcessDEComparator.java57
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/UniversalProcessMiner.java418
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/build.dat2
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/minerFile.dat4
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/patterns.dat282
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/rsecomm.properties35
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/ssl.properties44
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/auth.pl77
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/daemon.pl59
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl60
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/auth.pl56
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/check.pl23
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/daemon.pl61
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh20
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/auth.pl77
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl59
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh21
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/daemon.bat50
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/server.bat61
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/setup.bat19
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shell/DStoreShellOutputReader.java179
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shell/DStoreShellThread.java275
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java321
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/Activator.java59
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/IDStoreService.java22
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/ServiceResources.java42
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/ServiceResources.properties31
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreFileService.java1232
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreHostFile.java362
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreVirtualHostFile.java78
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/processes/DStoreHostProcess.java519
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/processes/DStoreProcessService.java381
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/rmtservice/DStoreRemoteServiceService.java43
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/search/DStoreSearchResultConfiguration.java51
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/search/DStoreSearchService.java145
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreHostOutput.java44
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreHostShell.java74
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreShellService.java204
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreFileTransferStatusListener.java122
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java402
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java327
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/FileSystemMessageUtil.java47
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/StatusChangeListener.java326
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/META-INF/MANIFEST.MF14
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/about.properties28
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/build.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/Activator.java59
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPHostFile.java193
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPService.java983
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPServiceResources.java36
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPServiceResources.properties26
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/IFTPService.java22
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/META-INF/MANIFEST.MF19
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/about.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/build.properties22
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchResult.java29
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellOutputReader.java241
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellThread.java536
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/Activator.java72
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/ILocalService.java22
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalFileService.java1314
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalHostFile.java141
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalServiceResources.java37
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalServiceResources.properties26
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalVirtualHostFile.java97
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/processes/LocalProcessService.java161
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/search/LocalSearchHandler.java519
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/search/LocalSearchService.java39
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/shells/LocalHostShell.java81
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/shells/LocalShellService.java148
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/.cvsignore3
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/.options1
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/META-INF/MANIFEST.MF16
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/about.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/build.properties23
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/plugin.properties14
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/readme.txt70
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/Activator.java117
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/ISshService.java24
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/ISshSessionProvider.java28
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/SshServiceResources.java43
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/SshServiceResources.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpFileService.java755
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpHostFile.java217
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshHostShell.java174
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellOutputReader.java158
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellService.java93
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellWriterThread.java109
-rw-r--r--rse/plugins/org.eclipse.rse.services/.classpath8
-rw-r--r--rse/plugins/org.eclipse.rse.services/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.services/.options1
-rw-r--r--rse/plugins/org.eclipse.rse.services/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--rse/plugins/org.eclipse.rse.services/META-INF/MANIFEST.MF24
-rw-r--r--rse/plugins/org.eclipse.rse.services/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.services/build.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/FileTypeMatcher.java286
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClassifierConstants.java63
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClientServerConstants.java68
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IMatcher.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISearchPatternMatcher.java27
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IServiceConstants.java37
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISystemFileTypes.java31
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/NamePatternMatcher.java468
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java206
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/RegexPatternMatcher.java40
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringCompare.java123
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringComparePatternMatcher.java35
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemEncodingUtil.java399
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemFileClassifier.java326
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemSearchString.java153
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/VirtualSearchResult.java51
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/AbsoluteVirtualPath.java138
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ArchiveHandlerManager.java500
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandler.java371
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandlerConstants.java38
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemArchiveUtil.java67
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemJarHandler.java34
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java2262
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemUniversalZipEntry.java148
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemZipHandler.java2227
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/VirtualChild.java321
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/Abstract4ByteNumericInfo.java51
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/Abstract8ByteNumericInfo.java70
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractAttributeInfo.java69
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractCPInfo.java53
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractCommonInfo.java125
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractRefInfo.java70
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/BasicClassFileParser.java342
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUTF8Reader.java104
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUtil.java118
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassInfo.java51
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/DoubleInfo.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/EnhancedClassLoader.java131
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/EnhancedDataInputStream.java63
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FieldInfo.java35
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FieldRefInfo.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FloatInfo.java32
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/IClassFileConstants.java32
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/IntegerInfo.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/InterfaceMethodRefInfo.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/LongInfo.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/MethodInfo.java35
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/MethodRefInfo.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/NameAndTypeInfo.java52
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/StringInfo.java50
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/UTF8Info.java70
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ISystemMessageProvider.java15
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/IndicatorException.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessage.java490
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java78
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java737
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/HostProcessFilterImpl.java476
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcess.java101
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcessFilter.java126
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteConstants.java194
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteTypes.java51
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/IRemoteServerProcess.java106
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessComparator.java37
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandler.java49
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java48
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalAIXProcessHandler.java252
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalLinuxProcessHandler.java316
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalMacOSXProcessHandler.java126
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalServerProcessImpl.java293
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java186
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchConstants.java26
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchMatcher.java26
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemNonRegexMatcher.java399
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchFileNameMatcher.java134
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchLineMatch.java84
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchMatch.java61
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatchLocator.java190
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatcher.java110
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchUtil.java195
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/ITarConstants.java132
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarEntry.java550
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarFile.java357
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarOutputStream.java131
-rw-r--r--rse/plugins/org.eclipse.rse.services/patterns.dat282
-rw-r--r--rse/plugins/org.eclipse.rse.services/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Activator.java117
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/IService.java29
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Mutex.java168
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java98
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java267
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFile.java156
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java66
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java122
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java71
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java70
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java71
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java299
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java94
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java126
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResult.java252
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResultConfiguration.java223
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java51
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/HostSearchResultSet.java292
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchConstants.java40
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResult.java94
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfiguration.java141
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfigurationFactory.java24
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultSet.java147
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchHandler.java25
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.java27
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java37
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java188
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/CommandPattern.java60
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellChangeEvent.java67
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellOutputStream.java67
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java169
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostOutput.java20
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShell.java32
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellChangeEvent.java25
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputListener.java22
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputNotifier.java23
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputReader.java26
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.java77
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/OutputPattern.java98
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/ParsedOutput.java38
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/Patterns.java120
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/SimpleHostOutput.java33
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/META-INF/MANIFEST.MF29
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/cview16/commands_view.gifbin347 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/cview16/errorlist_view.gifbin604 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/eview16/commands_view.gifbin347 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/eview16/errorlist_view.gifbin604 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/exportshellhistory.gifbin592 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/exportshelloutput.gifbin613 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommands_obj.gifbin578 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommandslive_obj.gifbin589 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshell.gifbin357 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshelllive.gifbin366 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/view16/commands_view.gifbin347 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/view16/errorlist_view.gifbin604 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/plugin.properties31
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/plugin.xml101
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/Activator.java93
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java182
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/ShellResources.java88
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/ShellResources.properties83
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/SystemRemoteCommandEntryForm.java285
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/LaunchCommandActionDelegate.java53
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/LaunchShellActionDelegate.java53
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemBaseShellAction.java85
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemCommandAction.java573
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemExportShellHistoryAction.java87
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemExportShellOutputAction.java93
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemShowInShellViewAction.java57
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemTerminateRemoveShellAction.java61
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemTerminateShellAction.java93
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/EnvironmentVariablesPropertyPage.java150
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/ShellServicesPropertyPage.java109
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/SystemShellPropertyPage.java142
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java640
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryViewerConfiguration.java87
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewPage.java687
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewWorkbook.java252
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/EncodingForm.java174
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ISystemCommandTextModifyListener.java35
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ShellServiceSubSystemConfigurationAdapter.java138
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ShellServiceSubSystemConfigurationAdapterFactory.java60
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorView.java177
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorViewPart.java482
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorViewProvider.java124
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java504
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsUI.java101
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java316
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsViewPart.java887
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsViewProvider.java37
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewOutputAdapterFactory.java84
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteErrorAdapter.java120
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java1217
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/TabFolderLayout.java61
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF22
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/build.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractJavaLanguageUtility.java34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtility.java72
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtilityFactory.java59
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/IJavaLanguageUtility.java32
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ILanguageUtility.java55
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ILanguageUtilityFactory.java44
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java185
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemAPIProviderImpl.java109
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemConfigurationAPIProviderImpl.java132
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemRemoteDirectoryMatcher.java60
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/Activator.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemFileResources.java185
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemFileResources.properties219
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/IRemotePath.java90
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileAPIProvider.java41
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileRemoteTypes.java66
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeMapping.java62
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeRegistry.java98
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommand.java34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommandMessage.java26
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileFilterString.java402
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileUtility.java80
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemotePath.java244
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemotePathUtil.java135
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeMapping.java144
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeRegistry.java598
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/AbstractRemoteFile.java200
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java879
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystemConfiguration.java82
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java44
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystemConfiguration.java43
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/OutputRefresh.java51
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/SearchJob.java56
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IHostFileToRemoteFileAdapter.java28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.java291
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileContext.java68
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionCodes.java27
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionMessages.java37
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileFactory.java42
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java707
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystemConfiguration.java111
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileWrapper.java23
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchConstants.java40
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchResult.java78
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IVirtualRemoteFile.java29
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java1145
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileChildrenContentsType.java50
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileCodeException.java99
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileContext.java149
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEmpty.java205
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileRoot.java178
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSchedulingRule.java75
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java1761
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java484
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFolderChildrenContentsType.java50
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResult.java248
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultConfiguration.java210
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultsContentsType.java50
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/SystemRemoteFileMatcher.java93
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileFilterString.java211
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileUniqueName.java164
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/META-INF/MANIFEST.MF24
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfiles_obj.gifbin157 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfileslive_obj.gifbin224 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.xml51
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/Activator.java69
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreFile.java64
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreFileAdapter.java126
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreSearchResult.java76
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreVirtualFile.java76
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/FileTransferStatusListener.java123
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/SearchResultsChangeListener.java400
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/StatusChangeListener.java478
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/UniversalSearchResultConfigurationFactory.java58
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/UniversalSearchResultConfigurationImpl.java62
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreFileSubSystemConfiguration.java165
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreFileSubSystemSearchResultConfiguration.java142
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreJavaLanguageUtility.java79
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreLanguageUtilityFactory.java79
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreWindowsFileSubSystemConfiguration.java85
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/RemoteFilePropertyChangeListener.java308
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/META-INF/MANIFEST.MF22
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/icons/full/obj16/systemfiles_obj.gifbin157 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/icons/full/obj16/systemfileslive_obj.gifbin224 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.properties24
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml43
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/Activator.java73
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/FTPFileSubSystemConfiguration.java155
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/FTPConnectorService.java116
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java110
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/IFTPSubSystem.java21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/model/FTPFileAdapter.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/model/FTPRemoteFile.java67
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfiles_obj.gifbin157 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfileslive_obj.gifbin224 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.xml38
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/Activator.java73
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java239
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalJavaLanguageUtility.java63
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalLanguageUtilityFactory.java78
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalSearchResultConfiguration.java121
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalFile.java74
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalFileAdapter.java79
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalVirtualFile.java188
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/META-INF/MANIFEST.MF20
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/icons/full/obj16/systemfiles_obj.gifbin157 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/icons/full/obj16/systemfileslive_obj.gifbin224 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.xml29
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/Activator.java75
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileAdapter.java60
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileSubSystemConfiguration.java109
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpRemoteFile.java47
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/Activator.java68
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IHostProcessToRemoteProcessAdapter.java47
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java96
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessContext.java76
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystem.java112
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystemConfiguration.java28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessContext.java157
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java284
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java202
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java212
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java26
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java51
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java208
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java81
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/META-INF/MANIFEST.MF21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/activeprocess.gifbin962 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/processsubsystem_obj.gifbin574 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/processsubsystemlive_obj.gifbin594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.xml41
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/Activator.java72
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessAdapter.java85
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java126
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/META-INF/MANIFEST.MF20
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/activeprocess.gifbin962 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/processsubsystem_obj.gifbin574 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/processsubsystemlive_obj.gifbin594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.properties20
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.xml41
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/Activator.java72
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessAdapter.java69
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java134
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/META-INF/MANIFEST.MF23
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/build.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java98
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/CandidateCommand.java110
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystem.java1261
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystemConfiguration.java195
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCommandShell.java305
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteError.java39
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteOutput.java208
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java163
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommand.java154
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommandMessage.java45
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/Activator.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.java39
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.properties26
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/ISystemOutputRemoteTypes.java101
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java166
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java353
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperationManager.java75
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java134
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/ICandidateCommand.java60
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java213
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystemConfiguration.java42
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java149
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteError.java23
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteOutput.java52
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IServiceCommandShell.java28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java29
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java37
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ServiceCommandShell.java112
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java254
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystemConfiguration.java73
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/META-INF/MANIFEST.MF24
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommands_obj.gifbin230 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommandslive_obj.gifbin246 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml38
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/Activator.java74
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java111
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/model/DStoreServiceCommandShell.java134
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/META-INF/MANIFEST.MF21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommands_obj.gifbin230 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommandslive_obj.gifbin246 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml41
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/Activator.java74
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java133
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java159
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/META-INF/MANIFEST.MF21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/icons/full/obj16/systemcommands_obj.gifbin230 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/icons/full/obj16/systemcommandslive_obj.gifbin246 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.xml30
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/Activator.java74
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java204
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java82
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.classpath11
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs5
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.ui/HelpContexts.xml970
-rw-r--r--rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java5341
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/AbstractElement.java39
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/GenericMessages.java75
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/GenericMessages.properties61
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEAdapter.java39
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEUIRegistry.java20
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRemoteSelectionAddListener.java67
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemConnectionFormCaller.java38
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemContextMenuConstants.java296
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemDeleteTarget.java43
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java401
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMassager.java38
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java460
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPageCompleteListener.java35
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPreferencesConstants.java101
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemRenameTarget.java41
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemStringsInputAction.java28
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemThemeConstants.java37
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemVerifyListener.java33
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerAddQuotes.java86
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCase.java110
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseOutsideQuotes.java197
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseUnlessQuoted.java95
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerRemoveQuotes.java192
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/Mnemonics.java575
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java261
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java1227
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBaseForm.java303
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java1309
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemMenuManager.java359
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemProfileForm.java264
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPropertyResources.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPropertyResources.properties36
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemResources.java1251
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemResources.properties1433
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemSortableSelection.java132
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemTabFolderLayout.java61
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java1480
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayDialogAction.java60
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java47
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplaySystemMessageAction.java64
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemAction.java111
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemCopyTargetSelectionCallback.java33
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDialogAction.java57
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtension.java44
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtensionManager.java23
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemWizardAction.java25
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemAbstractPopupMenuExtensionAction.java389
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseAction.java818
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java436
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDialogAction.java360
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDummyAction.java29
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java477
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseWizardAction.java280
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingBrowseWithAction.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingCompareWithAction.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingExpandToAction.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingGoToAction.java81
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingGotoActionOLD.java48
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingNewAction.java48
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingOpenWithAction.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPreferencesAction.java85
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPulldownMenuAction.java105
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingRemoteServerBaseAction.java138
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingRemoteServersAction.java96
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingReplaceWithAction.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingViewAction.java47
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingWorkWithAction.java48
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemClearAllPasswordsAction.java115
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemClearPasswordAction.java83
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCollapseAction.java83
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCollapseAllAction.java69
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonDeleteAction.java205
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonRenameAction.java237
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonSelectAllAction.java72
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemConnectAction.java73
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemConnectAllSubSystemsAction.java108
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyConnectionAction.java246
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java233
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDisconnectAction.java69
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDisconnectAllSubSystemsAction.java72
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDynamicPopupMenuExtensionManager.java73
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemExpandAction.java86
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveConnectionAction.java255
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveDownConnectionAction.java108
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveUpConnectionAction.java109
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionAction.java208
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionFromExistingConnectionAction.java41
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewProfileAction.java112
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java122
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenRSEPerspectiveAction.java42
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java351
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java73
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java70
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java72
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameCopyAction.java219
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameSelectAction.java57
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java120
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAllAction.java102
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemotePropertiesAction.java162
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStartAction.java57
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStopAction.java57
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemResolveFilterStringAction.java76
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRunAction.java94
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSelectConnectionAction.java187
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSeparatorAction.java58
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInMonitorAction.java103
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInTableAction.java102
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowPreferencesPageAction.java219
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStartCommunicationsDaemonAction.java92
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStringPromptAction.java97
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSubMenuManager.java403
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSubMenuManagerForTesting.java180
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTablePrintAction.java524
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTeamReloadAction.java76
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTestFilterStringAction.java102
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemUpdateConnectionAction.java75
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemViewExpandToAllAction.java52
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemViewExpandToBaseAction.java98
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkOfflineAction.java128
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkWithProfilesAction.java55
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/TestPopupMenuAction1.java43
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/EnvironmentVariablesPromptDialog.java248
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISignonValidator.java48
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPasswordPromptDialog.java100
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPromptDialog.java57
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemTypedObject.java42
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemChangePasswordDialog.java233
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemControlEnableState.java155
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemCopyProfileDialog.java283
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteDialog.java294
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableProvider.java173
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableRow.java202
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemFilterTableDialog.java416
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java338
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java487
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPromptDialog.java1849
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java269
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameDialog.java688
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java713
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableProvider.java215
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableRow.java213
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemResolveFilterStringDialog.java111
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java91
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectConnectionDialog.java361
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectFileTypesDialog.java468
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentElement.java331
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentProvider.java163
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleCopyDialog.java275
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleSelectDialog.java489
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemTestFilterStringDialog.java211
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java141
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWizardDialog.java193
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWorkWithHistoryDialog.java345
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemChangeFilterPaneEditPaneSupplier.java33
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemFilterStringEditPaneListener.java44
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemChangeFilterPane.java1437
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogInputs.java31
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogInterface.java35
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogOutputs.java33
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java44
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java40
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java36
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolManagerUIProvider.java26
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.java704
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterUIHelpers.java170
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterWorkWithFilterPoolsTreeViewer.java190
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/ISystemNewFilterActionConfigurator.java40
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.java252
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionCopyString.java68
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionDeleteString.java69
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringDown.java68
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringUp.java68
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionPasteString.java67
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterAction.java232
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java494
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolWizardAction.java87
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterWizardAction.java85
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java135
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java127
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterAction.java362
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterPoolAction.java323
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterStringAction.java494
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterAction.java153
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterPoolReferenceAction.java141
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterAction.java370
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterPoolAction.java369
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterStringAction.java485
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterAction.java156
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterPoolReferenceAction.java141
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterNewFilterPoolAction.java174
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterPoolReferenceSelectAction.java85
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterRemoveFilterPoolReferenceAction.java93
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterSelectFilterPoolsAction.java268
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsAction.java199
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java81
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.java492
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemFilterWizard.java26
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemNewFilterWizardConfigurator.java121
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.java365
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java197
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java373
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java71
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardDialog.java83
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java27
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWizardDialog.java75
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java651
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java664
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardConfigurator.java240
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardInfoPage.java114
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardMainPage.java258
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java481
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemUnNamedFilterDialog.java214
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSESystemTypeAdapterFactory.java42
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSEUIRegistry.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/ISystemMessageLine.java94
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/ISystemMessageLineTarget.java33
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/StatusLineManagerAdapter.java123
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemDialogPageMessageLine.java391
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java797
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageLine.java624
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageStatus.java153
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessage.java93
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java86
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPage.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPageContainer.java46
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemOpenQuickOpenDialogAction.java126
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenDialog.java801
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenPageDescriptor.java186
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUI.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUtil.java120
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/ISystemRunnableContext.java41
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/Policy.java120
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java389
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemJobRunnableContext.java283
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemProgressDialogRunnableContext.java200
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemSchedulingRule.java46
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/AbstractSystemSubSystemPropertyPageCoreForm.java218
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemConnectionWizardErrorUpdater.java28
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemConnectionWizardPropertyPage.java32
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemSubSystemPropertyPageCoreForm.java48
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java702
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerConnectionSecurityPropertyPage.java125
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerLauncherPropertyPage.java184
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java137
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java399
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemAbstractPropertyPageExtensionAction.java249
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.java533
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBooleanFieldEditor.java133
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemChangeFilterPropertyPage.java312
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemComboBoxFieldEditor.java497
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java134
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java166
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java396
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectorServicesPropertyPage.java88
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolPropertyPage.java125
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolReferencePropertyPage.java115
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPropertyPage.java134
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterStringPropertyPage.java339
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemIntegerFieldEditor.java100
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemKeyValueFieldEditor.java640
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemLoggingPreferencePage.java35
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemPreferenceInitializer.java41
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemRemotePropertyPageNode.java89
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemStringFieldEditor.java371
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCore.java88
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java412
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewCategoryPropertyPage.java110
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewProfilePropertyPage.java114
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewSubSystemConfigurationPropertyPage.java143
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java541
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidator.java52
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java45
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.java40
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/SystemNumericVerifyListener.java74
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java73
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java131
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java97
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFileName.java141
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterName.java101
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterPoolName.java98
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java155
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFolderName.java143
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerInput.java163
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerRangeInput.java115
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLocalPath.java95
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongInput.java162
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongRangeInput.java113
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPathName.java125
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPortInput.java79
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorProfileName.java89
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.java39
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorServerPortInput.java65
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSourceType.java110
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSpecialChar.java206
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSystemName.java120
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUniqueString.java365
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java120
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java120
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java133
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserId.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java106
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java120
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.java47
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java1806
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IRSEViewPart.java24
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemDragDropAdapter.java114
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemEditableRemoteObject.java165
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemLongRunningRequestListener.java33
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemMementoConstants.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemPropertyConstants.java107
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.java160
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoveElementAdapter.java42
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectAllTarget.java43
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProviderCaller.java39
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemShellProvider.java27
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTree.java119
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewActionFilter.java52
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewDropDestination.java34
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java349
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewInputProvider.java113
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewRunnableObject.java29
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java1475
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapterFactory.java59
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAbstractAPIProvider.java215
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemActionViewerFilter.java190
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemComboBoxCellEditor.java226
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemComboBoxPropertyDescriptor.java89
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDNDTransferRunnable.java704
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDecoratingLabelProvider.java58
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDeferredTableTreeContentManager.java62
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDropActionDelegate.java276
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemEmptyListAPIProviderImpl.java111
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritablePropertyData.java173
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritableTextCellEditor.java517
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritableTextPropertyDescriptor.java113
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemLongRunningRequestEvent.java34
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemPerspectiveLayout.java93
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemPropertySheetForm.java226
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResolveFilterStringAPIProviderImpl.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java616
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java126
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java633
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeView.java1896
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeViewProvider.java456
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java1906
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewColumnManager.java146
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewFilter.java104
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewPart.java1860
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java354
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewSorter.java184
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTestFilterStringAPIProviderImpl.java175
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemView.java5341
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForConnections.java106
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilterPools.java128
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilterStrings.java201
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilters.java258
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForSubSystems.java107
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAdapterFactory.java324
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewCompositeActionGroup.java104
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionAdapter.java657
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionSelectionInputProvider.java151
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDragAdapter.java341
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDropAdapter.java348
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDummyObject.java47
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterAdapter.java564
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolAdapter.java286
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolReferenceAdapter.java379
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterReferenceAdapter.java971
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterStringAdapter.java282
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewForm.java579
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewLabelAndContentProvider.java475
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMenuListener.java152
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMessageAdapter.java195
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewNewConnectionPromptAdapter.java38
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java1906
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPartFrameSource.java55
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPartGotoActionGroup.java106
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPromptableAdapter.java198
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewResources.java243
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewResources.properties207
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewRootInputAdapter.java226
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewScratchpadAdapter.java274
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewSubSystemAdapter.java734
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/BrowseAction.java54
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearAction.java52
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearSelectedAction.java58
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewPage.java590
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewWorkbook.java277
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorUI.java78
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorViewPart.java1036
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/TabFolderLayout.java61
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/BrowseAction.java53
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearAction.java57
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearSelectedAction.java86
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadView.java1448
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewPart.java391
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewProvider.java243
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchClearHistoryAction.java52
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchCopyToClipboardAction.java56
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchHistoryAction.java63
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveAllMatchesAction.java53
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java53
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableView.java376
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableViewProvider.java45
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchUI.java73
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewContentProvider.java183
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewLabelProvider.java94
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewPart.java1281
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemResourceAdaptableProfile.java35
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamView.java265
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewActiveProfileAction.java88
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryAdapter.java272
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryNode.java152
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewContentProvider.java233
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewInputProvider.java169
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewLabelProvider.java212
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeActiveProfileAction.java91
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java93
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewPart.java1548
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewProfileAdapter.java411
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewRefreshAllAction.java76
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewResourceAdapterFactory.java68
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemConfigurationAdapter.java305
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemConfigurationNode.java193
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/EnvironmentVariablesForm.java608
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/GridUtil.java68
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IInheritableEntryFieldStateChangeListener.java31
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IServerLauncherForm.java61
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemAddListener.java47
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCollapsableSectionListener.java29
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCombo.java96
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemEditPaneStates.java53
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritButton.java264
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControl.java216
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControlLayout.java44
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritableEntryField.java390
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteBaseServerLauncherForm.java114
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteServerLauncherForm.java627
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SSLForm.java117
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ServerConnectionSecurityForm.java94
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemCollapsableSection.java441
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java451
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHistoryCombo.java715
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHostCombo.java1121
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java398
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemSelectConnectionForm.java507
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServiceElement.java109
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServicesForm.java175
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java138
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertyElement.java114
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertySetServiceElement.java218
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RSEModelServiceElement.java149
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RootServiceElement.java106
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java79
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceElement.java103
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceServiceElement.java103
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableContentProvider.java65
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableLabelProvider.java91
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java306
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java154
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizard.java454
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java518
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/IRSENewConnectionWizard.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/IRSENewConnectionWizardDelegate.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISubSystemPropertiesWizardPage.java24
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemNewConnectionWizardMainPage.java84
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizard.java105
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizardPage.java53
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java556
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizard.java283
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardDefaultDelegateMainPage.java381
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardDelegate.java106
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardMainPage.java174
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java249
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizard.java522
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardDefaultMainPage.java355
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardRenameProfilePage.java158
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizard.java103
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizardMainPage.java205
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemSubSystemsPropertiesWizardPage.java293
-rw-r--r--rse/plugins/org.eclipse.rse.ui/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.ui/build.properties26
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPool.java1343
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolReferenceManager.java1035
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolWrapper.java62
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolWrapperInformation.java128
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterReference.java499
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterSimple.java508
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterStartHere.java129
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilter.java1372
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerCommonMethods.java570
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerReferenceCommonMethods.java260
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReference.java244
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterString.java296
-rw-r--r--rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterStringReference.java186
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/new.gifbin612 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newconnection_wiz.gifbin328 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfile_wiz.gifbin353 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilter_wiz.gifbin227 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpool_wiz.gifbin348 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpoolref_wiz.gifbin354 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfolder_wiz.gifbin350 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newprofile_wiz.gifbin586 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/cview16/commands_view.gifbin347 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/cview16/editor.gifbin591 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/cview16/errorlist_view.gifbin604 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/cview16/resourceRef_obj.gifbin365 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_persp.gifbin606 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_view.gifbin362 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/cview16/team_view.gifbin139 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/cancelshell.gifbin151 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clear.gifbin328 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearall.gifbin187 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearselected.gifbin159 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/combine_tsk.gifbin220 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/compile.gifbin241 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/convertarchive_tsk.gifbin332 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/deletereference.gifbin205 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/down.gifbin152 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/editfilter.gifbin203 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/exportshellhistory.gifbin242 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/exportshelloutput.gifbin377 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/lock.gifbin322 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeProfileActive.gifbin596 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeprofileinactive.gifbin388 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/monitor_view.gifbin334 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/move.gifbin111 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/removeshell.gifbin342 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/rename.gifbin211 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/run.gifbin359 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremovealll.gifbin187 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremoveselected.gifbin159 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectpool.gifbin209 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectprofile.gifbin337 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/stop.gifbin148 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/systemprofile.gifbin362 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/up.gifbin152 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithcompilecmds.gifbin211 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithfilterpools.gifbin217 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithnamedtypes.gifbin217 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithuseractions.gifbin207 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/xtrctarchv_tsk.gifbin344 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/xtrctarchvto_tsk.gifbin346 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/export_wiz.gifbin230 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/import_wiz.gifbin232 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/new.gifbin354 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newconnection_wiz.gifbin202 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfile_wiz.gifbin219 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilter_wiz.gifbin153 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpool_wiz.gifbin205 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpoolref_wiz.gifbin220 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfolder_wiz.gifbin225 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newprofile_wiz.gifbin573 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmotejar_expt.gifbin331 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmotejar_impt.gifbin332 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtarchv_exp.gifbin221 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtarchv_imp.gifbin218 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtexp.gifbin130 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtimp.gifbin131 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/systemshowintable.gifbin338 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/cancelshell.gifbin219 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clear.gifbin545 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearall.gifbin204 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearselected.gifbin163 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/combine_tsk.gifbin346 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/compile.gifbin366 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/convertarchive_tsk.gifbin359 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/deletereference.gifbin326 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/down.gifbin330 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/editfilter.gifbin337 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/exportshellhistory.gifbin590 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/exportshelloutput.gifbin613 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/lock.gifbin337 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileactive.gifbin608 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileinactive.gifbin628 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/monitor_view.gifbin572 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/move.gifbin197 -> 0 bytes
-rwxr-xr-xrse/plugins/org.eclipse.rse.ui/icons/full/elcl16/refresh_nav.gifbin368 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/removeshell.gifbin580 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/rename.gifbin346 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/run.gifbin379 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveall.gifbin204 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveselected.gifbin163 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectpool.gifbin336 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectprofile.gifbin346 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/stop.gifbin215 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemprofile.gifbin367 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemshowintable.gifbin573 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/up.gifbin320 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithcompilecmds.gifbin332 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithfilterpools.gifbin353 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithnamedtypes.gifbin345 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithuseractions.gifbin336 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/xtrctarchv_tsk.gifbin579 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/xtrctarchvto_tsk.gifbin585 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/archive_export.gifbin343 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/archive_import.gifbin342 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/export_wiz.gifbin356 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/import_wiz.gifbin357 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/jar_export.gifbin552 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/jar_import.gifbin552 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/new.gifbin612 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newconnection_wiz.gifbin328 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfile_wiz.gifbin353 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilter_wiz.gifbin227 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpool_wiz.gifbin348 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpoolref_wiz.gifbin354 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfolder_wiz.gifbin350 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newprofile_wiz.gifbin586 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/etool16/systemshowintable.gifbin573 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/eview16/commands_view.gifbin347 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/eview16/editor.gifbin591 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/eview16/errorlist_view.gifbin604 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_persp.gifbin606 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_view.gifbin362 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/eview16/team_view.gifbin139 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/misc/IBM_logo.gifbin382 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/IBM_logo.gifbin382 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowdown_obj.gifbin88 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowup_obj.gifbin88 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_ibm_obj.gifbin596 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_ibmuser_obj.gifbin587 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_new_obj.gifbin597 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_user_obj.gifbin563 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/connectorservice_obj.gifbin353 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/error.gifbin354 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/exportshellhistory.gifbin592 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/exportshelloutput.gifbin613 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/info.gifbin121 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/key.gifbin320 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/launcher_config_obj.gifbin547 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/properties_obj.gifbin578 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/service_obj.gifbin563 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/ssl_obj.gifbin239 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system390Live_obj.gifbin581 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system390_obj.gifbin357 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system400_obj.gifbin366 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system400live_obj.gifbin384 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_persp.gifbin606 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_search.gifbin587 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemaix_obj.gifbin221 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemaixlive_obj.gifbin348 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemblank.gifbin55 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcancel.gifbin219 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommands_obj.gifbin578 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommandslive_obj.gifbin589 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnection.gifbin200 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnectionlive.gifbin217 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemempty.gifbin156 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvar.gifbin206 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvarlibpath.gifbin216 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvarpath.gifbin216 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfailed.gifbin138 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfile.gifbin354 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfiles_obj.gifbin317 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfileslive_obj.gifbin339 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilter.gifbin209 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterpool.gifbin221 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterstring.gifbin126 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfolder.gifbin216 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemhelp.gifbin373 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systeminfo.gifbin120 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemjobs_obj.gifbin347 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemjobslive_obj.gifbin362 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinux_obj.gifbin569 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinuxlive_obj.gifbin591 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocal_obj.gifbin580 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocallive_obj.gifbin592 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemok.gifbin343 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprocess.gifbin245 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile.gifbin367 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile_active.gifbin608 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdrive.gifbin336 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdriveopen.gifbin339 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemsearchresult.gifbin586 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemshell.gifbin357 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemshelllive.gifbin366 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunix_obj.gifbin98 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunixlive_obj.gifbin145 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwin_obj.gifbin997 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwinlive_obj.gifbin1007 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_ibm_obj.gifbin338 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_ibm_user_obj.gifbin361 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_new_obj.gifbin370 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_obj.gifbin353 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_new_obj.gifbin574 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_obj.gifbin341 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_user_obj.gifbin577 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_new_obj.gifbin577 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_obj.gifbin341 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/obj16/warning.gifbin331 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/ovr16/error_ovr.gifbin82 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/view16/commands_view.gifbin347 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/view16/editor.gifbin591 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/view16/errorlist_view.gifbin604 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/view16/fastopen.gifbin1023 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/view16/scratchpad_view.gifbin346 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_persp.gifbin606 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_view.gifbin362 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/view16/team_view.gifbin139 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/export_wiz.gifbin2816 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/import_wiz.gifbin2960 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newconnection_wiz.gifbin2886 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfile_wiz.gifbin3238 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilter_wiz.gifbin3033 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilterpool_wiz.gifbin2938 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfolder_wiz.gifbin2796 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newprofile_wiz.gifbin3229 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmote_exprt.gifbin2722 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmote_imprt.gifbin2678 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotearchv_exprt.gifbin3500 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotearchv_imprt.gifbin3416 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotejar_exprt.gifbin3249 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotejar_imprt.gifbin3357 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.ui/messageFile.dtd22
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/Host.java684
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemHostPool.java638
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemModelChangeEvent.java118
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemModelChangeEventManager.java70
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java252
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPostableEventNotifier.java62
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPreferenceChangeEvent.java97
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPreferenceChangeManager.java70
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfile.java200
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfileManager.java544
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRemoteChangeEventManager.java70
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemResourceChangeManager.java91
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRunnableContextWrapper.java175
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemScratchpad.java94
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/DummyHost.java270
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemPromptableObject.java73
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistryUI.java59
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeEvent.java64
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeEvents.java46
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeListener.java31
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvent.java113
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvents.java250
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeListener.java40
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemEscapeCharHelper.java179
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemFilterStringContentsType.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java3262
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteChangeEvent.java170
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteElementResourceSet.java90
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteResourceSet.java93
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemResourceChangeEvent.java191
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemStartHere.java180
-rw-r--r--rse/plugins/org.eclipse.rse.ui/plugin.properties126
-rw-r--r--rse/plugins/org.eclipse.rse.ui/plugin.xml886
-rw-r--r--rse/plugins/org.eclipse.rse.ui/rseprofile.xsd186
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/archivehandlers.exsd145
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/dynamicPopupMenuExtensions.exsd138
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/keystoreProviders.exsd136
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/mountPathMappers.exsd135
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/newConnectionWizardDelegates.exsd129
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/popupMenus.exsd753
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/propertyPages.exsd408
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/remoteSystemsViewPreferencesActions.exsd193
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/subsystemConfigurations.exsd272
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/AbstractCacheManager.java44
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/RemoteServerLauncherConstants.java54
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/ServerLauncher.java109
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxy.java385
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxyComparator.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java175
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java244
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java1238
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java206
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractResource.java79
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java478
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java3329
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java3050
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemHelpers.java113
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/util/ISubSystemConfigurationAdapter.java284
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systemmessages.xml1385
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/IRemoteSystemsProject.java33
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemUserIdConstants.java30
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemViewSupplier.java38
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/PasswordPersistenceManager.java632
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/RemoteSystemsProject.java97
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/RemoteSystemsTempProjectNature.java55
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemAdapterHelpers.java115
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java910
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemElapsedTimer.java94
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPerspectiveHelpers.java190
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributor.java594
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributorManager.java161
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPreferencesManager.java516
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtension.java371
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtensionManager.java106
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemRemoteObjectMatcher.java588
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceConstants.java36
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceHelpers.java774
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceListener.java808
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceManager.java581
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemSorter.java73
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemStringTokenizer.java112
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemCommunicationsDaemonHandler.java44
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemCommunicationsDaemonListener.java32
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java33
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemCommunicationsDaemon.java446
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemCommunicationsDaemonEvent.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java66
-rw-r--r--rse/plugins/org.eclipse.rse/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse/.project28
-rw-r--r--rse/plugins/org.eclipse.rse/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse/META-INF/MANIFEST.MF8
-rw-r--r--rse/plugins/org.eclipse.rse/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse/about.properties28
-rw-r--r--rse/plugins/org.eclipse.rse/build.properties21
-rw-r--r--rse/plugins/org.eclipse.rse/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse/src/readme.txt1
-rw-r--r--rse/plugins/readme.txt3
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/.project17
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/build.properties16
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/epl-v10.html328
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/feature.properties141
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/feature.xml50
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/license.html79
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework.examples/.classpath7
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework.examples/.project28
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework.examples/.settings/org.eclipse.jdt.core.prefs8
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/META-INF/MANIFEST.MF11
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework.examples/about.html28
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/build.properties17
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework.examples/plugin.properties14
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/plugin.xml44
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/001.jpgbin16473 -> 0 bytes
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/002.jpgbin2889 -> 0 bytes
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/003.jpgbin7465 -> 0 bytes
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/script7.txt24
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AbstractTest.java25
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AnnotatingSuite.java23
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AnnotatingTests.java46
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/ErrorSuite.java23
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/ErrorTests.java31
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/FailureSuite.java23
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/FailureTests.java31
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/MixedSuite.java41
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/MixedSuiteProvider.java51
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/SuccessSuite.java23
-rwxr-xr-xrse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/SuccessTests.java34
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/.classpath7
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/.project28
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/META-INF/MANIFEST.MF18
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/about.html28
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/build.properties21
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/html/ResultsPane.jpgbin74376 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/html/SampleWindow.jpgbin39227 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/html/book.css125
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/html/futures.html21
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/html/plugging.html83
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/html/purpose.html1
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/html/view.html1
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/icons/ConsoleView.gifbin326 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/icons/GreenCheck.gifbin326 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/icons/GreenDot.gifbin347 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/icons/HolderView.gifbin326 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/icons/ImageView.gifbin326 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/icons/RedDot.gifbin555 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/icons/RedX.gifbin331 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/icons/WhiteBlock.gifbin55 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/icons/YellowQuestion.gifbin321 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/plugin.properties24
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/plugin.xml116
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/schema/suites.exsd164
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/AbstractTestSuiteHolder.java212
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/AnnotatingTestCase.java56
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/DelegatingTestSuiteHolder.java160
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteHolder.java79
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteHolderListener.java34
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteProvider.java30
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/TestFrameworkPlugin.java63
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/ResetHolderDelegate.java61
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/RunHolderDelegate.java127
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/SelectAllHoldersDelegate.java52
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/ToggleRunInBackgroundDelegate.java37
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/BasicTestSuiteHolder.java42
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/StandardTestSuiteHolder.java36
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/TestSuiteGeneratorHolder.java39
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ConsoleContext.java92
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/PerspectiveContext.java99
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/Script.java49
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptContext.java95
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptInterpreter.java58
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParser.java132
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParserMessage.java116
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParserMessageList.java48
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptPause.java31
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptShow.java30
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptStep.java50
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTell.java31
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTestCase.java43
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTestSuiteHolder.java56
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/SyntaxNode.java88
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/SyntaxTreeVisitor.java29
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestPerspectiveFactory.java30
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteConsoleView.java62
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteHolderView.java436
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteImageView.java65
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/toc.xml9
-rw-r--r--rse/tests/org.eclipse.rse.tests.manual/.project11
-rw-r--r--rse/tests/org.eclipse.rse.tests.manual/about.html28
-rw-r--r--rse/tests/org.eclipse.rse.tests.manual/manual_tests.html47
-rw-r--r--rse/tests/org.eclipse.rse.tests.manual/readme.txt1
-rw-r--r--rse/tests/org.eclipse.rse.tests/.classpath7
-rw-r--r--rse/tests/org.eclipse.rse.tests/.project28
-rw-r--r--rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.core.prefs78
-rw-r--r--rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.ui.prefs59
-rw-r--r--rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--rse/tests/org.eclipse.rse.tests/META-INF/MANIFEST.MF27
-rw-r--r--rse/tests/org.eclipse.rse.tests/about.html28
-rw-r--r--rse/tests/org.eclipse.rse.tests/about.ini27
-rw-r--r--rse/tests/org.eclipse.rse.tests/about.mappings6
-rw-r--r--rse/tests/org.eclipse.rse.tests/about.properties25
-rw-r--r--rse/tests/org.eclipse.rse.tests/build.properties32
-rw-r--r--rse/tests/org.eclipse.rse.tests/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests/icons/branch.gifbin1037 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests/icons/leaf.gifbin944 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests/icons/systemconnection.gifbin200 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests/icons/systemconnectionlive.gifbin217 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests/plugin.properties16
-rw-r--r--rse/tests/org.eclipse.rse.tests/plugin.xml32
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSECombinedTestSuite.java65
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsPlugin.java236
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsResources.properties37
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSECoreTestCaseProperties.java52
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSETestLogCollectorDelegate.java42
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSEViews.java47
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java706
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSEWaitAndDispatchUtil.java141
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionManager.java115
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionProperties.java43
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEBaseConnectionTestCase.java85
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java181
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestSuite.java57
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/files/FileServiceTest.java144
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/files/RSEFileTestSuite.java55
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java299
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionProperties.java55
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEDefaultTestLogCollectorDelegate.java153
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEInternalFrameworkTestCase.java212
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEInternalFrameworkTestSuite.java60
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSETestsPluginTestCase.java54
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java176
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapter.java152
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapterFactory.java60
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfiguration.java84
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfigurationAdapter.java26
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConnectorService.java89
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConnectorServiceManager.java64
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemNodeAdapter.java321
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemAddAction.java81
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemContainerNode.java99
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemNode.java73
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystem.java20
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemAddTarget.java44
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemConfiguration.java18
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemNode.java57
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemNodeContainer.java57
-rw-r--r--rse/tests/org.eclipse.rse.tests/teamConfig/RSE Combined Test Suite.launch36
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/connectionDefault.properties34
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/testConnectionManager/connection.properties19
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.xml86
-rw-r--r--rse/tests/readme.txt2
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/epl-v10.html328
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/feature.xml38
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/build.properties19
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html328
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties145
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml64
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/epl-v10.html328
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/feature.xml38
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/META-INF/MANIFEST.MF14
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/README.txt37
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/build.properties27
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/plugin.properties18
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/plugin.xml19
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/ISerialSettings.java28
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialConnectWorker.java69
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialConnector.java202
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialMessages.java35
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialMessages.properties26
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialPortHandler.java110
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialProperties.java163
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialSettings.java195
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialSettingsPage.java141
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/epl-v10.html328
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml39
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/META-INF/MANIFEST.MF14
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/build.properties20
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/plugin.xml20
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/ISshConstants.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/ISshSettings.java25
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/KeyboardInteractiveDialog.java185
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshConnection.java426
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshConnector.java132
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshMessages.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshMessages.properties32
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshSettings.java98
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshSettingsPage.java93
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/UserValidationDialog.java277
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/epl-v10.html328
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/feature.xml38
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--terminal/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF13
-rw-r--r--terminal/org.eclipse.tm.terminal.view/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal.view/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.view/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.view/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.view/build.properties26
-rw-r--r--terminal/org.eclipse.tm.terminal.view/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/connect_co.gifbin139 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/disconnect_co.gifbin146 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/newterminal.gifbin351 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/properties_tsk.gifbin118 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/cview16/terminal_view.gifbin938 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/connect_co.gifbin874 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/disconnect_co.gifbin90 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/newterminal.gifbin351 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/properties_tsk.gifbin90 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/connect_co.gifbin890 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/disconnect_co.gifbin118 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/newterminal.gifbin351 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/properties_tsk.gifbin118 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/eview16/terminal_view.gifbin938 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/plugin.properties26
-rw-r--r--terminal/org.eclipse.tm.terminal.view/plugin.xml76
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/ActionMessages.java36
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/ActionMessages.properties26
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalAction.java70
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionClearAll.java41
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionConnect.java39
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionCopy.java45
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionCut.java45
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionDisconnect.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionNewTerminal.java46
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionPaste.java45
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionSelectAll.java38
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionSettings.java39
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ITerminalView.java29
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ImageConsts.java44
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/PageBook.java120
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/SettingStorePrefixDecorator.java35
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/SettingsStore.java110
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalPreferencePage.java154
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalSettingsDlg.java157
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalView.java645
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalViewPlugin.java144
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ViewMessages.java41
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ViewMessages.properties31
-rw-r--r--terminal/org.eclipse.tm.terminal/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal/.options8
-rw-r--r--terminal/org.eclipse.tm.terminal/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF16
-rw-r--r--terminal/org.eclipse.tm.terminal/README.txt15
-rw-r--r--terminal/org.eclipse.tm.terminal/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal/build.properties31
-rw-r--r--terminal/org.eclipse.tm.terminal/eclipse32.pngbin4594 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal/plugin.properties22
-rw-r--r--terminal/org.eclipse.tm.terminal/plugin.xml88
-rw-r--r--terminal/org.eclipse.tm.terminal/schema/terminalConnector.exsd114
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ISettingsPage.java51
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ISettingsStore.java39
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ITerminalConnector.java101
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ITerminalControl.java67
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/Logger.java180
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/TerminalConnectorExtension.java56
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/TerminalState.java50
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/ITerminalListener.java33
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/ITerminalViewControl.java46
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/TerminalViewControlFactory.java22
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/ITerminalControlForText.java36
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalControl.java813
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalMessages.java25
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalMessages.properties19
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalPlugin.java58
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalText.java2086
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/ITelnetSettings.java23
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/NetworkPortMap.java62
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetCodes.java94
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnectWorker.java85
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnection.java686
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnector.java157
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetMessages.java26
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetMessages.properties21
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetOption.java701
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetProperties.java42
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetSettings.java86
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetSettingsPage.java141
3107 files changed, 0 insertions, 399738 deletions
diff --git a/discovery/org.eclipse.rse.discovery/.classpath b/discovery/org.eclipse.rse.discovery/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/discovery/org.eclipse.rse.discovery/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/discovery/org.eclipse.rse.discovery/.cvsignore b/discovery/org.eclipse.rse.discovery/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/discovery/org.eclipse.rse.discovery/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/discovery/org.eclipse.rse.discovery/.project b/discovery/org.eclipse.rse.discovery/.project
deleted file mode 100644
index 26cf0633c..000000000
--- a/discovery/org.eclipse.rse.discovery/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.discovery</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.rse.discovery/.settings/org.eclipse.core.resources.prefs b/discovery/org.eclipse.rse.discovery/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/discovery/org.eclipse.rse.discovery/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/discovery/org.eclipse.rse.discovery/.settings/org.eclipse.jdt.core.prefs b/discovery/org.eclipse.rse.discovery/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/discovery/org.eclipse.rse.discovery/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/discovery/org.eclipse.rse.discovery/META-INF/MANIFEST.MF b/discovery/org.eclipse.rse.discovery/META-INF/MANIFEST.MF
deleted file mode 100644
index cc5fb5a3b..000000000
--- a/discovery/org.eclipse.rse.discovery/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.discovery;singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.rse.discovery.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.ui,
- org.eclipse.rse.core,
- org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.tm.discovery.wizard,
- org.eclipse.tm.discovery.model
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/discovery/org.eclipse.rse.discovery/about.html b/discovery/org.eclipse.rse.discovery/about.html
deleted file mode 100644
index 460233046..000000000
--- a/discovery/org.eclipse.rse.discovery/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.rse.discovery/build.properties b/discovery/org.eclipse.rse.discovery/build.properties
deleted file mode 100644
index 1b3591564..000000000
--- a/discovery/org.eclipse.rse.discovery/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- .,\
- plugin.xml \ No newline at end of file
diff --git a/discovery/org.eclipse.rse.discovery/plugin.properties b/discovery/org.eclipse.rse.discovery/plugin.properties
deleted file mode 100644
index 1c1e0d652..000000000
--- a/discovery/org.eclipse.rse.discovery/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = TM Service Discovery RSE Plug-in
-providerName = Eclipse.org
diff --git a/discovery/org.eclipse.rse.discovery/plugin.xml b/discovery/org.eclipse.rse.discovery/plugin.xml
deleted file mode 100644
index 662782aa9..000000000
--- a/discovery/org.eclipse.rse.discovery/plugin.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-
-<!--
-Copyright (c) 2006 Symbian Software Ltd. 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:
- Javier Montalvo Orús (Symbian) - initial API and implementation
--->
-
-<plugin>
-
- <extension
- point="org.eclipse.rse.ui.newConnectionWizardDelegates">
- <newConnectionWizardDelegate
- class="org.eclipse.rse.discovery.ServiceDiscoveryWizardDelegate"
- systemType="org.eclipse.rse.systemtype.discovery"/>
- </extension>
-
- <extension
- point="org.eclipse.rse.core.systemTypes">
- <systemType id="org.eclipse.rse.systemtype.discovery"
- name="Discovery"
- description="Discovery"
- iconLive=""/>
- </extension>
-
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Discovery"
- name="Discovery"
- description="Service Discovery Wizard"
- iconlive=""
- icon=""
- class="org.eclipse.rse.discovery.ServiceDiscoverySubSystemConfiguration"
- vendor="%providerName"
- priority="100"
- id="Discovery">
- </configuration>
- </extension>
-
-</plugin>
-
-
-
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/Activator.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/Activator.java
deleted file mode 100644
index 1ca27175a..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.discovery;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rse.discovery"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/Messages.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/Messages.java
deleted file mode 100644
index ab5bdb349..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/Messages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.discovery;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.discovery.messages"; //$NON-NLS-1$
-
- public static String ServiceDiscoveryWizard_DiscoveryPropertySet;
-
- public static String ServiceDiscoveryWizard_Port;
-
- public static String ServiceDiscoveryWizard_SavingMessage;
-
- public static String ServiceDiscoveryWizard_StatusId;
-
- public static String ServiceDiscoveryWizard_StatusMessage;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoverySubSystemConfiguration.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoverySubSystemConfiguration.java
deleted file mode 100644
index 28714d856..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoverySubSystemConfiguration.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.discovery;
-
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-
-/**
- * Configuration for an empty Discovery SubSystemConfiguration
- * to allow listing discovery in the RSE Wizard
- *
- */
-public class ServiceDiscoverySubSystemConfiguration extends SubSystemConfiguration {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createDefaultFilterPool(org.eclipse.rse.core.filters.ISystemFilterPoolManager)
- */
- protected ISystemFilterPool createDefaultFilterPool(
- ISystemFilterPoolManager mgr) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(org.eclipse.rse.core.model.IHost)
- */
- public ISubSystem createSubSystemInternal(IHost conn) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)
- */
- public boolean supportsServerLaunchProperties(IHost host) {
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host) {
- return null;
- }
-
-}
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoveryWizard.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoveryWizard.java
deleted file mode 100644
index 7b44a5abc..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoveryWizard.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.discovery;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemRefreshAllAction;
-import org.eclipse.tm.discovery.model.Pair;
-import org.eclipse.tm.discovery.model.Service;
-import org.eclipse.tm.discovery.model.ServiceType;
-import org.eclipse.tm.discovery.wizard.ServiceDiscoveryWizardDisplayPage;
-import org.eclipse.tm.discovery.wizard.ServiceDiscoveryWizardMainPage;
-
-/**
- * Service Discovery Wizard
- */
-
-public class ServiceDiscoveryWizard extends Wizard {
- private ServiceDiscoveryWizardMainPage serviceDiscoveryMainPage;
-
- private ServiceDiscoveryWizardDisplayPage serviceDiscoveryPage = null;
-
- /**
- * Service Discovery Wizard constructor
- */
- public ServiceDiscoveryWizard() {
- super();
- setNeedsProgressMonitor(false);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
-
- serviceDiscoveryMainPage = new ServiceDiscoveryWizardMainPage();
- addPage(serviceDiscoveryMainPage);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
-
- if (page instanceof ServiceDiscoveryWizardMainPage) {
- if (serviceDiscoveryPage == null) {
- serviceDiscoveryPage = new ServiceDiscoveryWizardDisplayPage(serviceDiscoveryMainPage.getQuery(), serviceDiscoveryMainPage.getAddress(), serviceDiscoveryMainPage.getTransport(), serviceDiscoveryMainPage.getProtocol(), serviceDiscoveryMainPage.getTimeOut());
- addPage(serviceDiscoveryPage);
- } else {
- serviceDiscoveryPage.update(serviceDiscoveryMainPage.getQuery(), serviceDiscoveryMainPage.getAddress(), serviceDiscoveryMainPage.getTransport(), serviceDiscoveryMainPage.getProtocol(), serviceDiscoveryMainPage.getTimeOut());
- }
- }
- return super.getNextPage(page);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- public boolean performFinish() {
-
- SystemRefreshAllAction systemRefreshAllAction = new SystemRefreshAllAction(null);
-
- String[] addresses = serviceDiscoveryPage.getAddresses();
- for (int i = 0; i < addresses.length; i++) {
-
- String hostName = addresses[i];
- Vector discoveredServices = serviceDiscoveryPage.getSelectedServices(addresses[i]);
-
- Enumeration serviceEnumeration = discoveredServices.elements();
-
- while (serviceEnumeration.hasMoreElements()) {
- IHost conn = null;
-
- Service service = (Service) serviceEnumeration.nextElement();
- String sysTypeString = ((ServiceType) service.eContainer()).getName();
-
- try {
- conn = RSEUIPlugin.getDefault().getSystemRegistry().createHost(sysTypeString, service.getName() + "@" + hostName, hostName, "Discovered "+sysTypeString+" server in "+hostName); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- if (conn != null) {
- //copy discovered properties to RSE models
-
- Iterator pairIterator = service.getPair().iterator();
- IConnectorService[] services = conn.getConnectorServices();
- IPropertySet ps;
-
- while (pairIterator.hasNext()) {
-
- Pair pair = (Pair) pairIterator.next();
-
- for(int j=0; j<services.length; j++)
- {
- if((ps = services[j].getPropertySet(sysTypeString))==null)
- {
- ps = services[j].createPropertySet(sysTypeString);
- }
- ps.addProperty(pair.getKey(), pair.getValue());
-
- if (pair.getKey().equalsIgnoreCase(Messages.ServiceDiscoveryWizard_Port)) {
- int port = Integer.parseInt(pair.getValue());
- services[j].setPort(port);
- }
- }
- }
-
- RSEUIPlugin.getDefault().getSystemRegistry().expandHost(conn);
- }
- } catch (Exception e) {
- RSEUIPlugin.getDefault().getSystemRegistry().deleteHost(conn);
- } finally {
- systemRefreshAllAction.run();
- }
- }
- }
- return true;
- }
-
-} \ No newline at end of file
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoveryWizardDelegate.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoveryWizardDelegate.java
deleted file mode 100644
index f017f51bc..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/ServiceDiscoveryWizardDelegate.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.discovery;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.wizards.RSENewConnectionWizard;
-import org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate;
-
-/**
- * RSE Wizard extension for Service Discovery
- */
-
-public class ServiceDiscoveryWizardDelegate extends RSENewConnectionWizardDelegate {
-
- private ServiceDiscoveryWizard subWizard;
-
- private boolean isSubWizardCreated;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate#init(org.eclipse.rse.ui.wizards.RSENewConnectionWizard, org.eclipse.rse.core.IRSESystemType)
- */
- public void init(RSENewConnectionWizard wizard, IRSESystemType systemType) {
- super.init(wizard, systemType);
- subWizard = new ServiceDiscoveryWizard();
- isSubWizardCreated = false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#getDummyHost()
- */
- public IHost getDummyHost() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#getMainPage()
- */
- public IWizardPage getMainPage() {
- if (!isSubWizardCreated) {
- subWizard.addPages();
- isSubWizardCreated = true;
- }
- IWizardPage firstSubPage = subWizard.getStartingPage();
- return firstSubPage;
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#performFinish()
- */
- public boolean performFinish() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate#canFinish()
- */
- public boolean canFinish() {
- return subWizard.canFinish();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
- return subWizard.getNextPage(page);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getPreviousPage(IWizardPage page) {
- if (page == getMainPage()) {
- return getWizard().getPreviousPage(page);
- } else {
- return subWizard.getPreviousPage(page);
- }
- }
-
-}
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/messages.properties b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/messages.properties
deleted file mode 100644
index 8f14ae424..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/discovery/messages.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-ServiceDiscoveryWizard_DiscoveryPropertySet=Discovery
-ServiceDiscoveryWizard_Port=port
-ServiceDiscoveryWizard_SavingMessage=Saving RSE model
-ServiceDiscoveryWizard_StatusId=org.eclipse.tm.discovery.wizard
-ServiceDiscoveryWizard_StatusMessage=RSE model saved
diff --git a/discovery/org.eclipse.tm.discovery-feature/.project b/discovery/org.eclipse.tm.discovery-feature/.project
deleted file mode 100644
index da807b818..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.discovery-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.tm.discovery-feature/build.properties b/discovery/org.eclipse.tm.discovery-feature/build.properties
deleted file mode 100644
index b76171109..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html,\
- eclipse_update_120.jpg
-generate.plugin@org.eclipse.tm.discovery.source=org.eclipse.tm.discovery
diff --git a/discovery/org.eclipse.tm.discovery-feature/eclipse_update_120.jpg b/discovery/org.eclipse.tm.discovery-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery-feature/epl-v10.html b/discovery/org.eclipse.tm.discovery-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery-feature/feature.properties b/discovery/org.eclipse.tm.discovery-feature/feature.properties
deleted file mode 100644
index b7cc9f48d..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/feature.properties
+++ /dev/null
@@ -1,146 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Service Discovery
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-testUpdateSiteName=Target Management Project Pre-release Test Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 Symbian Software Ltd. and others. All rights reserved.\n\
-This program and the accompanying materials are made available under the terms\n\
-of the Eclipse Public License v1.0 which accompanies this distribution, and is\n\
-available at http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
-Javier Montalvo Orús (Symbian) - initial API and implementation\n\
-Martin Oberhuber (Wind River) - externalized strings, fixed build.properties, feature.xml\n
-################ end of copyright property ####################################
-
-# "description" property - description of the feature
-description=Service Discovery provides an API an Zeroconf / DNS-SD based \
-implementation for detecting remote network services.
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/discovery/org.eclipse.tm.discovery-feature/feature.xml b/discovery/org.eclipse.tm.discovery-feature/feature.xml
deleted file mode 100644
index fad2d2a8c..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/feature.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.tm.discovery"
- label="%featureName"
- version="1.0.2.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.tm.discovery.engine"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.emf" version="2.2.0" match="compatible"/>
- <import plugin="org.eclipse.emf.ecore" version="2.2.0" match="compatible"/>
- <import plugin="org.eclipse.emf.ecore.xmi" version="2.2.0" match="compatible"/>
- <import plugin="org.eclipse.emf.ecore.edit" version="2.2.0" match="compatible"/>
- <import plugin="org.eclipse.emf.edit" version="2.2.0" match="compatible"/>
- <import plugin="org.eclipse.emf.edit.ui" version="2.2.0" match="compatible"/>
- <import plugin="org.eclipse.emf.common" version="2.2.0" match="compatible"/>
- <import plugin="org.eclipse.emf.common.ui" version="2.2.0" match="compatible"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.forms"/>
- <import plugin="org.eclipse.ui.ide"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.discovery"
- download-size="5"
- install-size="10"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.engine"
- download-size="9"
- install-size="16"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.model"
- download-size="17"
- install-size="55"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.model.edit"
- download-size="7"
- install-size="21"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.protocol.dnssd"
- download-size="6"
- install-size="13"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.transport.udp"
- download-size="3"
- install-size="6"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.view"
- download-size="6"
- install-size="17"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.wizard"
- download-size="8"
- install-size="25"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.source"
- download-size="73"
- install-size="212"
- version="0.0.0"/>
-
-</feature>
diff --git a/discovery/org.eclipse.tm.discovery-feature/license.html b/discovery/org.eclipse.tm.discovery-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.html b/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.ini b/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.mappings b/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.properties b/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index f1daa65e1..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Service Discovery Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Symbian Software Ltd. and others 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/build.properties b/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 89c807a28..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/eclipse32.png b/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/plugin.properties b/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index e79b9e891..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=TM Service Discovery Source
-providerName=Eclipse.org
diff --git a/discovery/org.eclipse.tm.discovery.engine/.classpath b/discovery/org.eclipse.tm.discovery.engine/.classpath
deleted file mode 100644
index b7464f3ca..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/discovery/org.eclipse.tm.discovery.engine/.cvsignore b/discovery/org.eclipse.tm.discovery.engine/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/discovery/org.eclipse.tm.discovery.engine/.options b/discovery/org.eclipse.tm.discovery.engine/.options
deleted file mode 100644
index 8b1378917..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/.options
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/discovery/org.eclipse.tm.discovery.engine/.project b/discovery/org.eclipse.tm.discovery.engine/.project
deleted file mode 100644
index 45895d5a6..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.discovery.engine</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.core.resources.prefs b/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.jdt.core.prefs b/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.jdt.ui.prefs b/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 56c39c946..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Thu Jul 27 13:27:17 BST 2006
-eclipse.preferences.version=1
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/discovery/org.eclipse.tm.discovery.engine/META-INF/MANIFEST.MF b/discovery/org.eclipse.tm.discovery.engine/META-INF/MANIFEST.MF
deleted file mode 100644
index 509b4df41..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.discovery.engine;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.tm.discovery.engine.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.tm.discovery.model
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.tm.discovery.engine,
- org.eclipse.tm.discovery.protocol,
- org.eclipse.tm.discovery.transport
-Import-Package: org.eclipse.tm.discovery.model,
- org.eclipse.tm.discovery.model.util
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/discovery/org.eclipse.tm.discovery.engine/about.html b/discovery/org.eclipse.tm.discovery.engine/about.html
deleted file mode 100644
index 460233046..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.engine/about.ini b/discovery/org.eclipse.tm.discovery.engine/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.engine/about.mappings b/discovery/org.eclipse.tm.discovery.engine/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.engine/about.properties b/discovery/org.eclipse.tm.discovery.engine/about.properties
deleted file mode 100644
index 2848a3e9c..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Service Discovery\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Symbian Software Ltd. and others 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/discovery/org.eclipse.tm.discovery.engine/build.properties b/discovery/org.eclipse.tm.discovery.engine/build.properties
deleted file mode 100644
index 64f9ab21e..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- .,\
- about.ini,\
- about.mappings,\
- about.properties,\
- eclipse32.png
-src.includes = schema/
diff --git a/discovery/org.eclipse.tm.discovery.engine/eclipse32.png b/discovery/org.eclipse.tm.discovery.engine/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.engine/plugin.properties b/discovery/org.eclipse.tm.discovery.engine/plugin.properties
deleted file mode 100644
index cd7637942..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = TM Service Discovery Engine
-providerName = Eclipse.org
diff --git a/discovery/org.eclipse.tm.discovery.engine/plugin.xml b/discovery/org.eclipse.tm.discovery.engine/plugin.xml
deleted file mode 100644
index c8e743e72..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/plugin.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="discoveryTransport" name="discoveryTransport" schema="schema/discoveryTransport.exsd"/>
- <extension-point id="discoveryProtocol" name="discoveryProtocol" schema="schema/discoveryProtocol.exsd"/>
-</plugin> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.engine/schema/discoveryProtocol.exsd b/discovery/org.eclipse.tm.discovery.engine/schema/discoveryProtocol.exsd
deleted file mode 100644
index 476c62d77..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/schema/discoveryProtocol.exsd
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.discovery.engine">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.tm.discovery.engine" id="discoveryProtocol" name="Service Discovery protocol"/>
- </appInfo>
- <documentation>
- Extension point providing implementations of protocols for service discovery.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="protocol" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="protocol">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.discovery.protocol.IServiceDiscoveryProtocol"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2006 Symbian Software Ltd. 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:
- Javier Montalvo Orús (Symbian) - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/discovery/org.eclipse.tm.discovery.engine/schema/discoveryTransport.exsd b/discovery/org.eclipse.tm.discovery.engine/schema/discoveryTransport.exsd
deleted file mode 100644
index d1d499994..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/schema/discoveryTransport.exsd
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.discovery.engine">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.tm.discovery.engine" id="discoveryTransport" name="Service Discovery Transport"/>
- </appInfo>
- <documentation>
- Extension point providing implementations of transports for service discovery.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="transport" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="transport">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.discovery.transport.ITransport"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2006 Symbian Software Ltd. 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:
- Javier Montalvo Orús (Symbian) - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/Activator.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/Activator.java
deleted file mode 100644
index c58c92f59..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.engine;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rse.discovery.engine"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/Messages.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/Messages.java
deleted file mode 100644
index 1057a35a8..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.engine;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.tm.discovery.engine.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/ServiceDiscoveryEngine.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/ServiceDiscoveryEngine.java
deleted file mode 100644
index 05d6be003..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/ServiceDiscoveryEngine.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.engine;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.util.ModelResourceFactoryImpl;
-import org.eclipse.tm.discovery.protocol.IProtocol;
-import org.eclipse.tm.discovery.transport.ITransport;
-
-/**
- * Engine for service discovery.
- * Instantiates the model that contains the discovered services information.
- * Provides methods to launch a discovery job given an implementation of ITransport and IProtocol to populate the model.
- *
- * @see ITransport
- * @see IProtocol
- *
- */
-
-public class ServiceDiscoveryEngine {
-
- private static ServiceDiscoveryEngine SERVICE_DISCOVERY_ENGINE = null;
-
- private final URI SERVICE_DISCOVERY_URI = URI.createFileURI(Messages.getString("ServiceDiscoveryEngine.DiscoveryModelFileURI")); //$NON-NLS-1$
-
- private Resource resource;
-
- /**
- * Gets an instance of the service discovery engine
- */
- public static ServiceDiscoveryEngine getServiceDiscoveryEngine() {
- if (SERVICE_DISCOVERY_ENGINE == null)
- SERVICE_DISCOVERY_ENGINE = new ServiceDiscoveryEngine();
-
- return SERVICE_DISCOVERY_ENGINE;
- }
-
- /*
- * Private constructor of the ServiceDiscoveryEngine
- */
- private ServiceDiscoveryEngine() {
-
- // get model
- ResourceSet resourceSet = new ResourceSetImpl();
-
- // Register the appropriate resource factory to handle all file
- // extentions.
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new ModelResourceFactoryImpl());
-
- // Register the package to ensure it is available during loading.
- resourceSet.getPackageRegistry().put(ModelPackage.eNS_URI,ModelPackage.eINSTANCE);
-
- try {
- resource = resourceSet.getResource(SERVICE_DISCOVERY_URI, true);
- } catch (WrappedException e) {
- resource = resourceSet.createResource(SERVICE_DISCOVERY_URI);
- }
- }
-
- /**
- * Gets the resource
- *
- * @return the static reference to the resource model
- */
-
- public Resource getResource() {
- return resource;
- }
-
- /**
- * Starts a service discovery job given an implementation of IProtocol and ITransport
- *
- * @param transport
- * the selected transport
- * @see ITransport
- * @see IProtocol
- */
-
- public void doServiceDiscovery(String query, IProtocol protocol, ITransport transport)
- {
- protocol.getDiscoveryJob(query, resource,transport).schedule();
- }
-
-
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/messages.properties b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/messages.properties
deleted file mode 100644
index 380ab6187..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/engine/messages.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-ServiceDiscoveryEngine.DiscoveryModelFileURI=discoveryModel.xml
diff --git a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/IProtocol.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/IProtocol.java
deleted file mode 100644
index f88422b0d..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/IProtocol.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.protocol;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.tm.discovery.transport.ITransport;
-
-/**
- * Interface for service discovery protocol implementations.</br>
- * Standard protocols that can be implementated from this interface are:
- * <ul>
- * <li>DNS-SD (Zeroconf)
- * <li>Simple Service Discovery Protocol (SSDP)
- * <li>Service Location Protocol (SPL)
- * </ul>
- * As well as propietary/customised protocols
- *
- */
-public interface IProtocol {
-
-
- /**
- * Instantiates a Job to populate a model given an initial query, a resource containing the model to be populated and an ITranport implementation.
- *
- * @param query
- * Initial query to be sent to the target. This initial query can be obtained from the getQueries() method.
- *
- * @param resource
- * Resource containing the model to be populated with the results of the service discovery action.
- *
- * @param transport
- * ITransport implementation of the transport to be used for the discovery action.
- *
- * @return
- * Job containing the service discovery action.
- *
- * @see Job
- * @see Resource
- * @see ITransport
- *
- */
- public abstract Job getDiscoveryJob(String query, Resource resource, ITransport transport);
-
-
- /**
- * Gets the list of recommended queries to start the service discovery process. This queries can be used in getDiscoveryJob().
- *
- * @return
- * An array containing the recommended queries.
- */
- public abstract String[] getQueries();
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/ProtocolFactory.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/ProtocolFactory.java
deleted file mode 100644
index 87c103a65..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/ProtocolFactory.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.protocol;
-
-import java.util.Vector;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * Static factory to handle the protocol implementations.</br>
- */
-
-public class ProtocolFactory {
-
-
- /*
- * Extension point containing the protocol implementations available in the workbench
- */
- private static IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.tm.discovery.engine","discoveryProtocol"); //$NON-NLS-1$ //$NON-NLS-2$
-
-
- /**
- * Returns the available protocol names. This protocol names are registered in the field <b>name</b> of the extension point <b>discoveryProtocol</b>
- *
- * @return
- * Array of available protocol names
- */
- public static String[] getProtocolList()
- {
- Vector protocols = new Vector();
-
- IConfigurationElement[] ce = ep.getConfigurationElements();
- for (int i = 0; i < ce.length; i++) {
- String name = ce[i].getAttribute("name"); //$NON-NLS-1$
- if(name!=null)
- protocols.add(name);
- }
-
- String[] protocolsList = new String[protocols.size()];
- protocols.copyInto(protocolsList);
- return protocolsList;
- }
-
- /**
- * Returns the recommended queries for the specified protocol
- *
- * @param protocolName
- * Name of the protocol
- * @return
- * Array of recommended queries to be send using this protocol.
- * @throws CoreException
- */
- public static String[] getQueryList(String protocolName) throws CoreException
- {
- IProtocol protocol = null;
- String[] queries = null;
-
- IConfigurationElement[] ce = ep.getConfigurationElements();
- for (int i = 0; i < ce.length; i++) {
- String name = ce[i].getAttribute("name"); //$NON-NLS-1$
- if(name!=null)
- if(name.equalsIgnoreCase(protocolName))
- {
- protocol = (IProtocol)ce[i].createExecutableExtension("class"); //$NON-NLS-1$
- }
- }
-
- if(protocol != null)
- {
- queries = protocol.getQueries();
- if(queries==null)
- queries = new String[]{};
- }
- return queries;
-
- }
-
- /**
- * Gets the IProtocol implementation of a protocol given its name
- *
- * @param protocolName
- * Name of the protocolo
- * @return
- * IProtocol implementation of the protocol matching the given name. Null if the protocol cannot be found.
- * @throws CoreException
- *
- * @see IProtocol
- */
- public static IProtocol getProtocol(String protocolName) throws CoreException {
-
- IProtocol protocol = null;
-
- IConfigurationElement[] ce = ep.getConfigurationElements();
- for (int i = 0; i < ce.length; i++) {
- String name = ce[i].getAttribute("name"); //$NON-NLS-1$
- if(name!=null)
- if(name.equalsIgnoreCase(protocolName))
- {
- protocol = (IProtocol)ce[i].createExecutableExtension("class"); //$NON-NLS-1$
- }
- }
- return protocol;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/transport/ITransport.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/transport/ITransport.java
deleted file mode 100644
index 52dd1e623..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/transport/ITransport.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- * Martin Oberhuber (Wind River) - fix javadoc errors
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.transport;
-
-import java.io.IOException;
-
-
-/**
- * Interface for service discovery transports
- *
- */
-public interface ITransport {
-
- /**
- * Handles sending data
- *
- * @param packet Data packet to be sent.
- * @throws IOException
- */
- public abstract void send(byte[] packet) throws IOException;
-
- /**
- * Handles receiving data
- *
- * @param packet
- * Packet to be filled with the reply data.
- * @return
- * Address of the replying device.
- * @throws IOException
- */
- public abstract String receive(byte[] packet) throws IOException;
-
-
- /**
- * Sets the address of the target, depending on the implementation (IP, port...)
- * @param address
- * Address or identifier of the target.
- * @throws Exception
- *
- */
- public abstract void setTargetAddress(String address) throws Exception;
-
- /**
- * Sets the timeout for the transport implementation.
- * @param timeOut
- * The timeout in milliseconds
- * @throws Exception
- */
- public abstract void setTimeOut(int timeOut) throws Exception;
-
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/transport/TransportFactory.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/transport/TransportFactory.java
deleted file mode 100644
index 79ec7f2a4..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/transport/TransportFactory.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.transport;
-
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * Factory for the remoste system connection.
- */
-
-public class TransportFactory {
-
- /*
- * Extension point containing the transport implementations available in the workbench
- */
- private static IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.tm.discovery.engine","discoveryTransport"); //$NON-NLS-1$ //$NON-NLS-2$
-
-
- /**
- * Returns the available transport names. The transport names are registered in the field <b>name</b> of the extension point <b>discoveryTransport</b>
- *
- * @return
- * Array of available transport names
- */
- public static String[] getTransportList()
- {
- Vector transports = new Vector();
-
- IConfigurationElement[] ce = ep.getConfigurationElements();
- for (int i = 0; i < ce.length; i++) {
- String name = ce[i].getAttribute("name"); //$NON-NLS-1$
- if(name!=null)
- transports.add(name);
- }
-
- String[] transportsList = new String[transports.size()];
- transports.copyInto(transportsList);
- return transportsList;
- }
-
- /**
- * Gets the ITransport implementation of a transport given its name
- *
- * @param transportName
- * Name of the transport
- * @param address
- * Address of the target device
- * @param timeOut
- * Timeout in milliseconds
- * @return
- * ITranport implementation of the transport matching the given name. Null if the transport cannot be found.
- * @throws Exception
- */
- public static ITransport getTransport(String transportName, String address, int timeOut) throws Exception {
-
- ITransport transport = null;
-
- IConfigurationElement[] ce = ep.getConfigurationElements();
- for (int i = 0; i < ce.length; i++) {
- String name = ce[i].getAttribute("name"); //$NON-NLS-1$
- if(name!=null)
- if(name.equalsIgnoreCase(transportName))
- {
- transport = (ITransport)ce[i].createExecutableExtension("class"); //$NON-NLS-1$
- transport.setTargetAddress(address);
- transport.setTimeOut(timeOut);
-
- }
- }
- return transport;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/.classpath b/discovery/org.eclipse.tm.discovery.model.edit/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/.cvsignore b/discovery/org.eclipse.tm.discovery.model.edit/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/.project b/discovery/org.eclipse.tm.discovery.model.edit/.project
deleted file mode 100644
index f165aed12..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.discovery.model.edit</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/.settings/org.eclipse.core.resources.prefs b/discovery/org.eclipse.tm.discovery.model.edit/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/.settings/org.eclipse.jdt.core.prefs b/discovery/org.eclipse.tm.discovery.model.edit/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/META-INF/MANIFEST.MF b/discovery/org.eclipse.tm.discovery.model.edit/META-INF/MANIFEST.MF
deleted file mode 100644
index 4b6f10f17..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.discovery.model.edit;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.tm.discovery.model.provider.DiscoveryModelEditPlugin$Implementation
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.discovery.model.provider
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.edit;visibility:=reexport,
- org.eclipse.tm.discovery.model
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/about.html b/discovery/org.eclipse.tm.discovery.model.edit/about.html
deleted file mode 100644
index 460233046..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/build.properties b/discovery/org.eclipse.tm.discovery.model.edit/build.properties
deleted file mode 100644
index eb22b2add..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-bin.includes = META-INF/,\
- about.html,\
- plugin.xml,\
- plugin.properties,\
- icons/,\
- .
-jars.compile.order = .
-source.. = src/
-output.. = bin/
-src.includes = about.html
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/Pair.gif b/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/Pair.gif
deleted file mode 100644
index 94c953e01..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/Pair.gif
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/device.gif b/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/device.gif
deleted file mode 100644
index a871b0d7a..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/device.gif
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/network.gif b/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/network.gif
deleted file mode 100644
index ec3bb95a6..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/network.gif
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/service.gif b/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/service.gif
deleted file mode 100644
index e07b81aa6..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/service.gif
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/serviceType.gif b/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/serviceType.gif
deleted file mode 100644
index 5ae555a34..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/icons/full/obj16/serviceType.gif
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/plugin.properties b/discovery/org.eclipse.tm.discovery.model.edit/plugin.properties
deleted file mode 100644
index 9085b1bf8..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/plugin.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = TM Service Discovery Edit Support
-providerName = Eclipse.org
-
-_UI_CreateChild_text = {0}
-_UI_CreateChild_text2 = {1} {0}
-_UI_CreateChild_text3 = {1}
-_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
-_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
-_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
-
-_UI_PropertyDescriptor_description = The {0} of the {1}
-
-_UI_Unknown_type = Object
-
-_UI_Unknown_datatype= Value
-
-_UI_SDDevice_sDServiceType_feature = SD Service Type
-_UI_SDNetwork_sDDevice_feature = SD Device
-_UI_SDService_sDPair_feature = SD Pair
-_UI_SDServiceType_sDService_feature = SD Service
-_UI_Device_type = Device
-_UI_Network_type = Network
-_UI_Pair_type = Pair
-_UI_Service_type = Service
-_UI_ServiceType_type = Service Type
-_UI_Device_serviceType_feature = Service Type
-_UI_Device_address_feature = Address
-_UI_Device_name_feature = Name
-_UI_Network_device_feature = Device
-_UI_Pair_key_feature = Key
-_UI_Pair_value_feature = Value
-_UI_Service_pair_feature = Pair
-_UI_Service_name_feature = Name
-_UI_ServiceType_service_feature = Service
-_UI_ServiceType_name_feature = Name
-_UI_Unknown_feature = Unspecified
- \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/plugin.xml b/discovery/org.eclipse.tm.discovery.model.edit/plugin.xml
deleted file mode 100644
index d1bab02dd..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/plugin.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
-Copyright (c) 2006 Symbian Software Ltd. 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:
- Javier Montalvo Orús (Symbian) - initial API and implementation
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <factory
- uri = "http://www.eclipse.org/tm/discovery"
- class = "org.eclipse.tm.discovery.provider.ModelItemProviderAdapterFactory"
- supportedTypes =
- "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
- org.eclipse.emf.edit.provider.IStructuredItemContentProvider
- org.eclipse.emf.edit.provider.ITreeItemContentProvider
- org.eclipse.emf.edit.provider.IItemLabelProvider
- org.eclipse.emf.edit.provider.IItemPropertySource" />
- </extension>
-
-</plugin>
-
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/DeviceItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/DeviceItemProvider.java
deleted file mode 100644
index bfd2f6a96..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/DeviceItemProvider.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.tm.discovery.model.ModelFactory;
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.Device;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.tm.discovery.model.Device} object.
- *
- * @generated
- */
-public class DeviceItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * @param adapterFactory
- *
- * @generated
- */
- public DeviceItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addAddressPropertyDescriptor(object);
- addNamePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Address feature.
- *
- * @generated
- */
- protected void addAddressPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Device_address_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Device_address_feature", "_UI_Device_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModelPackage.Literals.DEVICE__ADDRESS,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Name feature.
- *
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Device_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Device_name_feature", "_UI_Device_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModelPackage.Literals.DEVICE__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- *
- * @generated
- */
- public Collection getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(ModelPackage.Literals.DEVICE__SERVICE_TYPE);
- }
- return childrenFeatures;
- }
-
- /**
- * This returns Device.gif.
- *
- * @generated NOT
- */
- public Object getImage(Object object) {
- return getResourceLocator().getImage("full/obj16/device"); //$NON-NLS-1$
- //return null;
- }
-
- /**
- * This returns the label text for the adapted class.
- *
- * @generated NOT
- */
- public String getText(Object object) {
- String name = ((Device)object).getName();
- String address = ((Device)object).getAddress();
-
- StringBuffer result = new StringBuffer();
-
- if(address != null)
- result.append(address);
-
- if(name != null)
- result.append(" ("+name+")"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return result.toString();
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Device.class)) {
- case ModelPackage.DEVICE__ADDRESS:
- case ModelPackage.DEVICE__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case ModelPackage.DEVICE__SERVICE_TYPE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object.
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (ModelPackage.Literals.DEVICE__SERVICE_TYPE,
- ModelFactory.eINSTANCE.createServiceType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return DiscoveryModelEditPlugin.INSTANCE;
- }
-
- /**
- * @generated not
- *
- */
-
- public Collection getChildren(Object object) {
- Collection collect = super.getChildren(object);
-
- return collect;
-
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/DiscoveryModelEditPlugin.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/DiscoveryModelEditPlugin.java
deleted file mode 100644
index 3c432a50e..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/DiscoveryModelEditPlugin.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.provider;
-
-import org.eclipse.emf.common.EMFPlugin;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-/**
- * This is the central singleton for the DiscoveryModel edit plugin.
- *
- * @generated
- */
-public final class DiscoveryModelEditPlugin extends EMFPlugin {
- /**
- * Keep track of the singleton.
- *
- * @generated
- */
- public static final DiscoveryModelEditPlugin INSTANCE = new DiscoveryModelEditPlugin();
-
- /**
- * Keep track of the singleton.
- *
- * @generated
- */
- private static Implementation plugin;
-
- /**
- * Create the instance.
- *
- * @generated
- */
- public DiscoveryModelEditPlugin() {
- super
- (new ResourceLocator [] {
- });
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- *
- * @return the singleton instance.
- * @generated
- */
- public ResourceLocator getPluginResourceLocator() {
- return plugin;
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- *
- * @return the singleton instance.
- * @generated
- */
- public static Implementation getPlugin() {
- return plugin;
- }
-
- /**
- * The actual implementation of the Eclipse <b>Plugin</b>.
- *
- * @generated
- */
- public static class Implementation extends EclipsePlugin {
- /**
- * Creates an instance.
- *
- * @generated
- */
- public Implementation() {
- super();
-
- // Remember the static instance.
- //
- plugin = this;
- }
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ModelItemProviderAdapterFactory.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ModelItemProviderAdapterFactory.java
deleted file mode 100644
index 6f18c53ac..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ModelItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.tm.discovery.model.util.ModelAdapterFactory;
-
-/**
- * This is the factory that is used to provide the interfaces needed to support Viewers.
- * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
- * The adapters also support Eclipse property sheets.
- * Note that most of the adapters are shared among multiple instances.
- *
- * @generated
- */
-public class ModelItemProviderAdapterFactory extends ModelAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- *
- * @generated
- */
- protected ComposedAdapterFactory parentAdapterFactory;
-
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
- *
- * @generated
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
- /**
- * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
- *
- * @generated
- */
- protected Collection supportedTypes = new ArrayList();
-
- /**
- * This constructs an instance.
- *
- * @generated not
- */
- public ModelItemProviderAdapterFactory() {
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- supportedTypes.add(ITableItemLabelProvider.class);
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.tm.discovery.model.Device} instances.
- *
- * @generated
- */
- protected DeviceItemProvider deviceItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.tm.discovery.model.Device}.
- *
- * @generated
- */
- public Adapter createDeviceAdapter() {
- if (deviceItemProvider == null) {
- deviceItemProvider = new DeviceItemProvider(this);
- }
-
- return deviceItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.tm.discovery.model.Network} instances.
- *
- * @generated
- */
- protected NetworkItemProvider networkItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.tm.discovery.model.Network}.
- *
- * @generated
- */
- public Adapter createNetworkAdapter() {
- if (networkItemProvider == null) {
- networkItemProvider = new NetworkItemProvider(this);
- }
-
- return networkItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.tm.discovery.model.Pair} instances.
- *
- * @generated
- */
- protected PairItemProvider pairItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.tm.discovery.model.Pair}.
- *
- * @generated
- */
- public Adapter createPairAdapter() {
- if (pairItemProvider == null) {
- pairItemProvider = new PairItemProvider(this);
- }
-
- return pairItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.tm.discovery.model.Service} instances.
- *
- * @generated
- */
- protected ServiceItemProvider serviceItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.tm.discovery.model.Service}.
- *
- * @generated
- */
- public Adapter createServiceAdapter() {
- if (serviceItemProvider == null) {
- serviceItemProvider = new ServiceItemProvider(this);
- }
-
- return serviceItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.tm.discovery.model.ServiceType} instances.
- *
- * @generated
- */
- protected ServiceTypeItemProvider serviceTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.tm.discovery.model.ServiceType}.
- *
- * @generated
- */
- public Adapter createServiceTypeAdapter() {
- if (serviceTypeItemProvider == null) {
- serviceTypeItemProvider = new ServiceTypeItemProvider(this);
- }
-
- return serviceTypeItemProvider;
- }
-
- /**
- * This returns the root adapter factory that contains this factory.
- *
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- *
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- *
- * @generated
- */
- public boolean isFactoryForType(Object type) {
- return supportedTypes.contains(type) || super.isFactoryForType(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter.
- *
- * @generated
- */
- public Adapter adapt(Notifier notifier, Object type) {
- return super.adapt(notifier, this);
- }
-
- /**
- *
- * @generated
- */
- public Object adapt(Object object, Object type) {
- if (isFactoryForType(type)) {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) {
- return adapter;
- }
- }
-
- return null;
- }
-
- /**
- * This adds a listener.
- *
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener.
- *
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
- *
- * @generated
- */
- public void fireNotifyChanged(Notification notification) {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null) {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This disposes all of the item providers created by this factory.
- *
- * @generated
- */
- public void dispose() {
- if (deviceItemProvider != null) deviceItemProvider.dispose();
- if (networkItemProvider != null) networkItemProvider.dispose();
- if (pairItemProvider != null) pairItemProvider.dispose();
- if (serviceItemProvider != null) serviceItemProvider.dispose();
- if (serviceTypeItemProvider != null) serviceTypeItemProvider.dispose();
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/NetworkItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/NetworkItemProvider.java
deleted file mode 100644
index c41a309bd..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/NetworkItemProvider.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.tm.discovery.model.ModelFactory;
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.Network;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.tm.discovery.model.Network} object.
- *
- * @generated
- */
-public class NetworkItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * @param adapterFactory
- *
- * @generated
- */
- public NetworkItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- *
- * @generated
- */
- public Collection getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(ModelPackage.Literals.NETWORK__DEVICE);
- }
- return childrenFeatures;
- }
-
- /**
- * This returns Network.gif.
- *
- * @generated NOT
- */
- public Object getImage(Object object) {
- return getResourceLocator().getImage("full/obj16/network"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- *
- * @generated NOT
- */
- public String getText(Object object) {
- return "Network"; //$NON-NLS-1$
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Network.class)) {
- case ModelPackage.NETWORK__DEVICE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object.
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (ModelPackage.Literals.NETWORK__DEVICE,
- ModelFactory.eINSTANCE.createDevice()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return DiscoveryModelEditPlugin.INSTANCE;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/PairItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/PairItemProvider.java
deleted file mode 100644
index 94f55ac84..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/PairItemProvider.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.Pair;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.tm.discovery.model.Pair} object.
- *
- * @generated not
- */
-public class PairItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource,
- ITableItemLabelProvider
- {
- /**
- * This constructs an instance from a factory and a notifier.
- * @param adapterFactory
- *
- * @generated
- */
- public PairItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addKeyPropertyDescriptor(object);
- addValuePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Key feature.
- *
- * @generated
- */
- protected void addKeyPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Pair_key_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Pair_key_feature", "_UI_Pair_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModelPackage.Literals.PAIR__KEY,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Value feature.
- *
- * @generated
- */
- protected void addValuePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Pair_value_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Pair_value_feature", "_UI_Pair_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModelPackage.Literals.PAIR__VALUE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns Pair.gif.
- *
- * @generated NOT
- */
- public Object getImage(Object object) {
- return null;
- }
-
- /**
- * This returns the label text for the adapted class.
- *
- * @generated NOT
- */
- public String getText(Object object) {
- return null;
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Pair.class)) {
- case ModelPackage.PAIR__KEY:
- case ModelPackage.PAIR__VALUE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object.
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return DiscoveryModelEditPlugin.INSTANCE;
- }
-
- /**
- * @generated NOT
- */
-
- public Object getColumnImage(Object object, int columnIndex) {
- return null;
- }
-
- /**
- * @generated NOT
- */
-
-
- public String getColumnText(Object object, int columnIndex) {
-
- String returnString = null;
-
- if(columnIndex == 0)
- {
- returnString = ((Pair)object).getKey();
- }
- else if(columnIndex == 1)
- {
- returnString = ((Pair)object).getValue();
- }
- return returnString;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ServiceItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ServiceItemProvider.java
deleted file mode 100644
index 20e8c1474..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ServiceItemProvider.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.tm.discovery.model.ModelFactory;
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.Service;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.tm.discovery.model.Service} object.
- *
- * @generated
- */
-public class ServiceItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource{
- /**
- * This constructs an instance from a factory and a notifier.
- * @param adapterFactory
- *
- * @generated
- */
- public ServiceItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addNamePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Name feature.
- *
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Service_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Service_name_feature", "_UI_Service_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModelPackage.Literals.SERVICE__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- *
- * @generated
- */
- public Collection getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(ModelPackage.Literals.SERVICE__PAIR);
- }
- return childrenFeatures;
- }
-
- /**
- * This returns Service.gif.
- *
- * @generated not
- */
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/service")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- *
- * @generated NOT
- */
- public String getText(Object object) {
-
- return ((Service)object).getName();
-
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Service.class)) {
- case ModelPackage.SERVICE__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case ModelPackage.SERVICE__PAIR:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object.
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (ModelPackage.Literals.SERVICE__PAIR,
- ModelFactory.eINSTANCE.createPair()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return DiscoveryModelEditPlugin.INSTANCE;
- }
-
- /* NO CHILDREN IN TREE */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ServiceTypeItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ServiceTypeItemProvider.java
deleted file mode 100644
index 15a755e37..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/discovery/model/provider/ServiceTypeItemProvider.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.tm.discovery.model.ModelFactory;
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.ServiceType;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.tm.discovery.model.ServiceType} object.
- *
- * @generated
- */
-public class ServiceTypeItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
- {
- /**
- * This constructs an instance from a factory and a notifier.
- * @param adapterFactory
- *
- * @generated
- */
- public ServiceTypeItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addNamePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Name feature.
- *
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ServiceType_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ServiceType_name_feature", "_UI_ServiceType_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModelPackage.Literals.SERVICE_TYPE__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- *
- * @generated
- */
- public Collection getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(ModelPackage.Literals.SERVICE_TYPE__SERVICE);
- }
- return childrenFeatures;
- }
-
- /**
- * This returns ServiceType.gif.
- *
- * @generated
- */
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/serviceType")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- *
- * @generated NOT
- */
- public String getText(Object object) {
- String label = ((ServiceType)object).getName();
- return label == null || label.length() == 0 ? "": label; //$NON-NLS-1$
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(ServiceType.class)) {
- case ModelPackage.SERVICE_TYPE__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case ModelPackage.SERVICE_TYPE__SERVICE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object.
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (ModelPackage.Literals.SERVICE_TYPE__SERVICE,
- ModelFactory.eINSTANCE.createService()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return DiscoveryModelEditPlugin.INSTANCE;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.model/.classpath b/discovery/org.eclipse.tm.discovery.model/.classpath
deleted file mode 100644
index b7464f3ca..000000000
--- a/discovery/org.eclipse.tm.discovery.model/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/discovery/org.eclipse.tm.discovery.model/.cvsignore b/discovery/org.eclipse.tm.discovery.model/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/discovery/org.eclipse.tm.discovery.model/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/discovery/org.eclipse.tm.discovery.model/.project b/discovery/org.eclipse.tm.discovery.model/.project
deleted file mode 100644
index e86668568..000000000
--- a/discovery/org.eclipse.tm.discovery.model/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.discovery.model</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.tm.discovery.model/.settings/org.eclipse.core.resources.prefs b/discovery/org.eclipse.tm.discovery.model/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/discovery/org.eclipse.tm.discovery.model/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/discovery/org.eclipse.tm.discovery.model/.settings/org.eclipse.jdt.core.prefs b/discovery/org.eclipse.tm.discovery.model/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/discovery/org.eclipse.tm.discovery.model/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/discovery/org.eclipse.tm.discovery.model/META-INF/MANIFEST.MF b/discovery/org.eclipse.tm.discovery.model/META-INF/MANIFEST.MF
deleted file mode 100644
index 632b31f48..000000000
--- a/discovery/org.eclipse.tm.discovery.model/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.discovery.model;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.tm.discovery.model.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)"
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.tm.discovery.model,
- org.eclipse.tm.discovery.model.impl,
- org.eclipse.tm.discovery.model.util
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/discovery/org.eclipse.tm.discovery.model/about.html b/discovery/org.eclipse.tm.discovery.model/about.html
deleted file mode 100644
index 460233046..000000000
--- a/discovery/org.eclipse.tm.discovery.model/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/build.properties b/discovery/org.eclipse.tm.discovery.model/build.properties
deleted file mode 100644
index eea357b24..000000000
--- a/discovery/org.eclipse.tm.discovery.model/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-source.. = src/
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- src/,\
- .,\
- plugin.xml
-src.includes = ecore/
diff --git a/discovery/org.eclipse.tm.discovery.model/ecore/discoveryModel.genmodel b/discovery/org.eclipse.tm.discovery.model/ecore/discoveryModel.genmodel
deleted file mode 100644
index f163d6375..000000000
--- a/discovery/org.eclipse.tm.discovery.model/ecore/discoveryModel.genmodel
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.tm.discovery.model/src"
- modelPluginID="org.eclipse.tm.discovery.model" modelName="DiscoveryModel" importerID="org.eclipse.xsd.ecore.importer">
- <foreignModel>discoveryModel.xsd</foreignModel>
- <genPackages prefix="Model" basePackage="org.eclipse.tm.discovery" resource="XML"
- disposableProviderFactory="true" ecorePackage="model.ecore#/">
- <genClasses ecoreClass="model.ecore#//Device">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model.ecore#//Device/serviceType"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Device/address"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Device/name"/>
- </genClasses>
- <genClasses ecoreClass="model.ecore#//Network">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model.ecore#//Network/device"/>
- </genClasses>
- <genClasses ecoreClass="model.ecore#//Pair">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Pair/key"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Pair/value"/>
- </genClasses>
- <genClasses ecoreClass="model.ecore#//Service">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model.ecore#//Service/pair"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Service/name"/>
- </genClasses>
- <genClasses ecoreClass="model.ecore#//ServiceType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model.ecore#//ServiceType/service"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//ServiceType/name"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/discovery/org.eclipse.tm.discovery.model/ecore/discoveryModel.xsd b/discovery/org.eclipse.tm.discovery.model/ecore/discoveryModel.xsd
deleted file mode 100644
index 0ef4b84fb..000000000
--- a/discovery/org.eclipse.tm.discovery.model/ecore/discoveryModel.xsd
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Copyright (c) 2006 Symbian Software Ltd. 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:
- Javier Montalvo Orús (Symbian) - initial API and implementation
- -->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.eclipse.org/tm/discovery/model"
- xmlns:discovery="http://www.eclipse.org/tm/discovery/model">
-
- <xs:complexType name="Network">
- <xs:sequence>
- <xs:element name="Device" type="discovery:Device" minOccurs="1" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="Device">
- <xs:sequence>
- <xs:element name="ServiceType" type="discovery:ServiceType" minOccurs="1" maxOccurs="unbounded" />
- </xs:sequence>
- <xs:attribute name="address" type="xs:string" />
- <xs:attribute name="name" type="xs:string" />
- </xs:complexType>
-
- <xs:complexType name="ServiceType">
- <xs:sequence>
- <xs:element name="Service" type="discovery:Service" minOccurs="1" maxOccurs="unbounded" />
- </xs:sequence>
- <xs:attribute name="name" type="xs:string" />
- </xs:complexType>
-
- <xs:complexType name="Service">
- <xs:sequence minOccurs="1" maxOccurs="1">
- <xs:element name="Pair" type="discovery:Pair" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- <xs:attribute name="name" type="xs:string" />
- </xs:complexType>
-
- <xs:complexType name="Pair">
- <xs:attribute name="key" type="xs:string" />
- <xs:attribute name="value" type="xs:string" />
- </xs:complexType>
-
-</xs:schema> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/ecore/model.ecore b/discovery/org.eclipse.tm.discovery.model/ecore/model.ecore
deleted file mode 100644
index 0c7608fc8..000000000
--- a/discovery/org.eclipse.tm.discovery.model/ecore/model.ecore
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model"
- nsURI="http://www.eclipse.org/tm/discovery/model" nsPrefix="model">
- <eClassifiers xsi:type="ecore:EClass" name="Device">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Device"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="serviceType" lowerBound="1"
- upperBound="-1" eType="#//ServiceType" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="ServiceType"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="address" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="address"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="name"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Network">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Network"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="device" lowerBound="1"
- upperBound="-1" eType="#//Device" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="Device"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Pair">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Pair"/>
- <details key="kind" value="empty"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="key"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="value"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Service">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Service"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="pair" upperBound="-1" eType="#//Pair"
- containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="Pair"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="name"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ServiceType">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="ServiceType"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="service" lowerBound="1"
- upperBound="-1" eType="#//Service" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="Service"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="name"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/discovery/org.eclipse.tm.discovery.model/plugin.properties b/discovery/org.eclipse.tm.discovery.model/plugin.properties
deleted file mode 100644
index f7f3b3115..000000000
--- a/discovery/org.eclipse.tm.discovery.model/plugin.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = TM Service Discovery Model
-providerName = Eclipse.org
-
diff --git a/discovery/org.eclipse.tm.discovery.model/plugin.xml b/discovery/org.eclipse.tm.discovery.model/plugin.xml
deleted file mode 100644
index cc4fa461a..000000000
--- a/discovery/org.eclipse.tm.discovery.model/plugin.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!--
-Copyright (c) 2006 Symbian Software Ltd. 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:
- Javier Montalvo Orús (Symbian) - initial API and implementation
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/tm/discovery"
- class = "org.eclipse.tm.discovery.model.ModelPackage" />
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="discovery"
- class="org.eclipse.tm.discovery.model.util.ModelResourceFactoryImpl" />
- </extension>
-
-</plugin>
-
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Activator.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Activator.java
deleted file mode 100644
index 48182efd0..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tm.discovery"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Device.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Device.java
deleted file mode 100644
index 2244480cd..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Device.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- *
- * A representation of the model object '<em><b>Device</b></em>'.
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.Device#getServiceType <em>Service Type</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.Device#getAddress <em>Address</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.Device#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.tm.discovery.model.ModelPackage#getDevice()
- * @model extendedMetaData="name='Device' kind='elementOnly'"
- * @generated
- */
-public interface Device extends EObject {
- /**
- * Returns the value of the '<em><b>Service Type</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.tm.discovery.model.ServiceType}.
- *
- * @return the value of the '<em>Service Type</em>' containment reference list.
- * @see org.eclipse.tm.discovery.model.ModelPackage#getDevice_ServiceType()
- * @model type="org.eclipse.tm.discovery.model.ServiceType" containment="true" required="true"
- * extendedMetaData="kind='element' name='ServiceType'"
- * @generated
- */
- EList getServiceType();
-
- /**
- * Returns the value of the '<em><b>Address</b></em>' attribute.
- *
- * @return the value of the '<em>Address</em>' attribute.
- * @see #setAddress(String)
- * @see org.eclipse.tm.discovery.model.ModelPackage#getDevice_Address()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='address'"
- * @generated
- */
- String getAddress();
-
- /**
- * Sets the value of the '{@link org.eclipse.tm.discovery.model.Device#getAddress <em>Address</em>}' attribute.
- *
- * @param value the new value of the '<em>Address</em>' attribute.
- * @see #getAddress()
- * @generated
- */
- void setAddress(String value);
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- *
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.tm.discovery.model.ModelPackage#getDevice_Name()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='name'"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.tm.discovery.model.Device#getName <em>Name</em>}' attribute.
- *
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
-} // Device \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ModelFactory.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ModelFactory.java
deleted file mode 100644
index 477658c0e..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ModelFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- *
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * @see org.eclipse.tm.discovery.model.ModelPackage
- * @generated
- */
-public interface ModelFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- *
- * @generated
- */
- ModelFactory eINSTANCE = org.eclipse.tm.discovery.model.impl.ModelFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Device</em>'.
- *
- * @return a new object of class '<em>Device</em>'.
- * @generated
- */
- Device createDevice();
-
- /**
- * Returns a new object of class '<em>Network</em>'.
- *
- * @return a new object of class '<em>Network</em>'.
- * @generated
- */
- Network createNetwork();
-
- /**
- * Returns a new object of class '<em>Pair</em>'.
- *
- * @return a new object of class '<em>Pair</em>'.
- * @generated
- */
- Pair createPair();
-
- /**
- * Returns a new object of class '<em>Service</em>'.
- *
- * @return a new object of class '<em>Service</em>'.
- * @generated
- */
- Service createService();
-
- /**
- * Returns a new object of class '<em>Service Type</em>'.
- *
- * @return a new object of class '<em>Service Type</em>'.
- * @generated
- */
- ServiceType createServiceType();
-
- /**
- * Returns the package supported by this factory.
- *
- * @return the package supported by this factory.
- * @generated
- */
- ModelPackage getModelPackage();
-
-} //ModelFactory
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ModelPackage.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ModelPackage.java
deleted file mode 100644
index 91d2f36be..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ModelPackage.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- *
- * @see org.eclipse.tm.discovery.model.ModelFactory
- * @model kind="package"
- * @generated
- */
-public interface ModelPackage extends EPackage {
- /**
- * The package name.
- *
- * @generated
- */
- String eNAME = "model"; //$NON-NLS-1$
-
- /**
- * The package namespace URI.
- *
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/tm/discovery/model"; //$NON-NLS-1$
-
- /**
- * The package namespace name.
- *
- * @generated
- */
- String eNS_PREFIX = "model"; //$NON-NLS-1$
-
- /**
- * The singleton instance of the package.
- *
- * @generated
- */
- ModelPackage eINSTANCE = org.eclipse.tm.discovery.model.impl.ModelPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.DeviceImpl <em>Device</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.DeviceImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getDevice()
- * @generated
- */
- int DEVICE = 0;
-
- /**
- * The feature id for the '<em><b>Service Type</b></em>' containment reference list.
- *
- * @generated
- * @ordered
- */
- int DEVICE__SERVICE_TYPE = 0;
-
- /**
- * The feature id for the '<em><b>Address</b></em>' attribute.
- *
- * @generated
- * @ordered
- */
- int DEVICE__ADDRESS = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- *
- * @generated
- * @ordered
- */
- int DEVICE__NAME = 2;
-
- /**
- * The number of structural features of the '<em>Device</em>' class.
- *
- * @generated
- * @ordered
- */
- int DEVICE_FEATURE_COUNT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.NetworkImpl <em>Network</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.NetworkImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getNetwork()
- * @generated
- */
- int NETWORK = 1;
-
- /**
- * The feature id for the '<em><b>Device</b></em>' containment reference list.
- *
- * @generated
- * @ordered
- */
- int NETWORK__DEVICE = 0;
-
- /**
- * The number of structural features of the '<em>Network</em>' class.
- *
- * @generated
- * @ordered
- */
- int NETWORK_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.PairImpl <em>Pair</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.PairImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getPair()
- * @generated
- */
- int PAIR = 2;
-
- /**
- * The feature id for the '<em><b>Key</b></em>' attribute.
- *
- * @generated
- * @ordered
- */
- int PAIR__KEY = 0;
-
- /**
- * The feature id for the '<em><b>Value</b></em>' attribute.
- *
- * @generated
- * @ordered
- */
- int PAIR__VALUE = 1;
-
- /**
- * The number of structural features of the '<em>Pair</em>' class.
- *
- * @generated
- * @ordered
- */
- int PAIR_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.ServiceImpl <em>Service</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.ServiceImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getService()
- * @generated
- */
- int SERVICE = 3;
-
- /**
- * The feature id for the '<em><b>Pair</b></em>' containment reference list.
- *
- * @generated
- * @ordered
- */
- int SERVICE__PAIR = 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- *
- * @generated
- * @ordered
- */
- int SERVICE__NAME = 1;
-
- /**
- * The number of structural features of the '<em>Service</em>' class.
- *
- * @generated
- * @ordered
- */
- int SERVICE_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.ServiceTypeImpl <em>Service Type</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.ServiceTypeImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getServiceType()
- * @generated
- */
- int SERVICE_TYPE = 4;
-
- /**
- * The feature id for the '<em><b>Service</b></em>' containment reference list.
- *
- * @generated
- * @ordered
- */
- int SERVICE_TYPE__SERVICE = 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- *
- * @generated
- * @ordered
- */
- int SERVICE_TYPE__NAME = 1;
-
- /**
- * The number of structural features of the '<em>Service Type</em>' class.
- *
- * @generated
- * @ordered
- */
- int SERVICE_TYPE_FEATURE_COUNT = 2;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.tm.discovery.model.Device <em>Device</em>}'.
- *
- * @return the meta object for class '<em>Device</em>'.
- * @see org.eclipse.tm.discovery.model.Device
- * @generated
- */
- EClass getDevice();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.tm.discovery.model.Device#getServiceType <em>Service Type</em>}'.
- *
- * @return the meta object for the containment reference list '<em>Service Type</em>'.
- * @see org.eclipse.tm.discovery.model.Device#getServiceType()
- * @see #getDevice()
- * @generated
- */
- EReference getDevice_ServiceType();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Device#getAddress <em>Address</em>}'.
- *
- * @return the meta object for the attribute '<em>Address</em>'.
- * @see org.eclipse.tm.discovery.model.Device#getAddress()
- * @see #getDevice()
- * @generated
- */
- EAttribute getDevice_Address();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Device#getName <em>Name</em>}'.
- *
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.tm.discovery.model.Device#getName()
- * @see #getDevice()
- * @generated
- */
- EAttribute getDevice_Name();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.tm.discovery.model.Network <em>Network</em>}'.
- *
- * @return the meta object for class '<em>Network</em>'.
- * @see org.eclipse.tm.discovery.model.Network
- * @generated
- */
- EClass getNetwork();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.tm.discovery.model.Network#getDevice <em>Device</em>}'.
- *
- * @return the meta object for the containment reference list '<em>Device</em>'.
- * @see org.eclipse.tm.discovery.model.Network#getDevice()
- * @see #getNetwork()
- * @generated
- */
- EReference getNetwork_Device();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.tm.discovery.model.Pair <em>Pair</em>}'.
- *
- * @return the meta object for class '<em>Pair</em>'.
- * @see org.eclipse.tm.discovery.model.Pair
- * @generated
- */
- EClass getPair();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Pair#getKey <em>Key</em>}'.
- *
- * @return the meta object for the attribute '<em>Key</em>'.
- * @see org.eclipse.tm.discovery.model.Pair#getKey()
- * @see #getPair()
- * @generated
- */
- EAttribute getPair_Key();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Pair#getValue <em>Value</em>}'.
- *
- * @return the meta object for the attribute '<em>Value</em>'.
- * @see org.eclipse.tm.discovery.model.Pair#getValue()
- * @see #getPair()
- * @generated
- */
- EAttribute getPair_Value();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.tm.discovery.model.Service <em>Service</em>}'.
- *
- * @return the meta object for class '<em>Service</em>'.
- * @see org.eclipse.tm.discovery.model.Service
- * @generated
- */
- EClass getService();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.tm.discovery.model.Service#getPair <em>Pair</em>}'.
- *
- * @return the meta object for the containment reference list '<em>Pair</em>'.
- * @see org.eclipse.tm.discovery.model.Service#getPair()
- * @see #getService()
- * @generated
- */
- EReference getService_Pair();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Service#getName <em>Name</em>}'.
- *
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.tm.discovery.model.Service#getName()
- * @see #getService()
- * @generated
- */
- EAttribute getService_Name();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.tm.discovery.model.ServiceType <em>Service Type</em>}'.
- *
- * @return the meta object for class '<em>Service Type</em>'.
- * @see org.eclipse.tm.discovery.model.ServiceType
- * @generated
- */
- EClass getServiceType();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.tm.discovery.model.ServiceType#getService <em>Service</em>}'.
- *
- * @return the meta object for the containment reference list '<em>Service</em>'.
- * @see org.eclipse.tm.discovery.model.ServiceType#getService()
- * @see #getServiceType()
- * @generated
- */
- EReference getServiceType_Service();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.ServiceType#getName <em>Name</em>}'.
- *
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.tm.discovery.model.ServiceType#getName()
- * @see #getServiceType()
- * @generated
- */
- EAttribute getServiceType_Name();
-
- /**
- * Returns the factory that creates the instances of the model.
- *
- * @return the factory that creates the instances of the model.
- * @generated
- */
- ModelFactory getModelFactory();
-
- /**
- *
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- *
- * @generated
- */
-
-
-
-
- interface Literals {
- /**
- * The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.DeviceImpl <em>Device</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.DeviceImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getDevice()
- * @generated
- */
-
- EClass DEVICE = eINSTANCE.getDevice();
-
- /**
- * The meta object literal for the '<em><b>Service Type</b></em>' containment reference list feature.
- *
- * @generated
- */
- EReference DEVICE__SERVICE_TYPE = eINSTANCE.getDevice_ServiceType();
-
- /**
- * The meta object literal for the '<em><b>Address</b></em>' attribute feature.
- *
- * @generated
- */
- EAttribute DEVICE__ADDRESS = eINSTANCE.getDevice_Address();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- *
- * @generated
- */
- EAttribute DEVICE__NAME = eINSTANCE.getDevice_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.NetworkImpl <em>Network</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.NetworkImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getNetwork()
- * @generated
- */
- EClass NETWORK = eINSTANCE.getNetwork();
-
- /**
- * The meta object literal for the '<em><b>Device</b></em>' containment reference list feature.
- *
- * @generated
- */
- EReference NETWORK__DEVICE = eINSTANCE.getNetwork_Device();
-
- /**
- * The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.PairImpl <em>Pair</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.PairImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getPair()
- * @generated
- */
- EClass PAIR = eINSTANCE.getPair();
-
- /**
- * The meta object literal for the '<em><b>Key</b></em>' attribute feature.
- *
- * @generated
- */
- EAttribute PAIR__KEY = eINSTANCE.getPair_Key();
-
- /**
- * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
- *
- * @generated
- */
- EAttribute PAIR__VALUE = eINSTANCE.getPair_Value();
-
- /**
- * The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.ServiceImpl <em>Service</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.ServiceImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getService()
- * @generated
- */
- EClass SERVICE = eINSTANCE.getService();
-
- /**
- * The meta object literal for the '<em><b>Pair</b></em>' containment reference list feature.
- *
- * @generated
- */
- EReference SERVICE__PAIR = eINSTANCE.getService_Pair();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- *
- * @generated
- */
- EAttribute SERVICE__NAME = eINSTANCE.getService_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.ServiceTypeImpl <em>Service Type</em>}' class.
- *
- * @see org.eclipse.tm.discovery.model.impl.ServiceTypeImpl
- * @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getServiceType()
- * @generated
- */
- EClass SERVICE_TYPE = eINSTANCE.getServiceType();
-
- /**
- * The meta object literal for the '<em><b>Service</b></em>' containment reference list feature.
- *
- * @generated
- */
- EReference SERVICE_TYPE__SERVICE = eINSTANCE.getServiceType_Service();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- *
- * @generated
- */
- EAttribute SERVICE_TYPE__NAME = eINSTANCE.getServiceType_Name();
-
- }
-
-} //ModelPackage
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Network.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Network.java
deleted file mode 100644
index 4123559de..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Network.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- *
- * A representation of the model object '<em><b>Network</b></em>'.
- *
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.Network#getDevice <em>Device</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.tm.discovery.model.ModelPackage#getNetwork()
- * @model extendedMetaData="name='Network' kind='elementOnly'"
- * @generated
- */
-public interface Network extends EObject {
- /**
- * Returns the value of the '<em><b>Device</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.tm.discovery.model.Device}.
- *
- * @return the value of the '<em>Device</em>' containment reference list.
- * @see org.eclipse.tm.discovery.model.ModelPackage#getNetwork_Device()
- * @model type="org.eclipse.tm.discovery.model.Device" containment="true" required="true"
- * extendedMetaData="kind='element' name='Device'"
- * @generated
- */
- EList getDevice();
-
-} // Network \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Pair.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Pair.java
deleted file mode 100644
index 5739ed769..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Pair.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- *
- * A representation of the model object '<em><b>Pair</b></em>'.
- *
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.Pair#getKey <em>Key</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.Pair#getValue <em>Value</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.tm.discovery.model.ModelPackage#getPair()
- * @model extendedMetaData="name='Pair' kind='empty'"
- * @generated
- */
-public interface Pair extends EObject {
- /**
- * Returns the value of the '<em><b>Key</b></em>' attribute.
- *
- * @return the value of the '<em>Key</em>' attribute.
- * @see #setKey(String)
- * @see org.eclipse.tm.discovery.model.ModelPackage#getPair_Key()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='key'"
- * @generated
- */
- String getKey();
-
- /**
- * Sets the value of the '{@link org.eclipse.tm.discovery.model.Pair#getKey <em>Key</em>}' attribute.
- *
- * @param value the new value of the '<em>Key</em>' attribute.
- * @see #getKey()
- * @generated
- */
- void setKey(String value);
-
- /**
- * Returns the value of the '<em><b>Value</b></em>' attribute.
- *
- * @return the value of the '<em>Value</em>' attribute.
- * @see #setValue(String)
- * @see org.eclipse.tm.discovery.model.ModelPackage#getPair_Value()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='value'"
- * @generated
- */
- String getValue();
-
- /**
- * Sets the value of the '{@link org.eclipse.tm.discovery.model.Pair#getValue <em>Value</em>}' attribute.
- *
- * @param value the new value of the '<em>Value</em>' attribute.
- * @see #getValue()
- * @generated
- */
- void setValue(String value);
-
-} // Pair \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Service.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Service.java
deleted file mode 100644
index d9bd50762..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/Service.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- *
- * A representation of the model object '<em><b>Service</b></em>'.
- *
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.Service#getPair <em>Pair</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.Service#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.tm.discovery.model.ModelPackage#getService()
- * @model extendedMetaData="name='Service' kind='elementOnly'"
- * @generated
- */
-public interface Service extends EObject {
- /**
- * Returns the value of the '<em><b>Pair</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.tm.discovery.model.Pair}.
- *
- * @return the value of the '<em>Pair</em>' containment reference list.
- * @see org.eclipse.tm.discovery.model.ModelPackage#getService_Pair()
- * @model type="org.eclipse.tm.discovery.model.Pair" containment="true"
- * extendedMetaData="kind='element' name='Pair'"
- * @generated
- */
- EList getPair();
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- *
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.tm.discovery.model.ModelPackage#getService_Name()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='name'"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.tm.discovery.model.Service#getName <em>Name</em>}' attribute.
- *
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
-} // Service \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ServiceType.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ServiceType.java
deleted file mode 100644
index 1bf4a6b52..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/ServiceType.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- *
- * A representation of the model object '<em><b>Service Type</b></em>'.
- *
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.ServiceType#getService <em>Service</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.ServiceType#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.tm.discovery.model.ModelPackage#getServiceType()
- * @model extendedMetaData="name='ServiceType' kind='elementOnly'"
- * @generated
- */
-public interface ServiceType extends EObject {
- /**
- * Returns the value of the '<em><b>Service</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.tm.discovery.model.Service}.
- *
- * @return the value of the '<em>Service</em>' containment reference list.
- * @see org.eclipse.tm.discovery.model.ModelPackage#getServiceType_Service()
- * @model type="org.eclipse.tm.discovery.model.Service" containment="true" required="true"
- * extendedMetaData="kind='element' name='Service'"
- * @generated
- */
- EList getService();
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- *
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.tm.discovery.model.ModelPackage#getServiceType_Name()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='name'"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.tm.discovery.model.ServiceType#getName <em>Name</em>}' attribute.
- *
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
-} // ServiceType \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/DeviceImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/DeviceImpl.java
deleted file mode 100644
index 6b5050775..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/DeviceImpl.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.tm.discovery.model.Device;
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.ServiceType;
-
-/**
- *
- * An implementation of the model object '<em><b>Device</b></em>'.
- *
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.impl.DeviceImpl#getServiceType <em>Service Type</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.impl.DeviceImpl#getAddress <em>Address</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.impl.DeviceImpl#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DeviceImpl extends EObjectImpl implements Device {
- /**
- * The cached value of the '{@link #getServiceType() <em>Service Type</em>}' containment reference list.
- *
- * @see #getServiceType()
- * @generated
- * @ordered
- */
- protected EList serviceType = null;
-
- /**
- * The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
- *
- * @see #getAddress()
- * @generated
- * @ordered
- */
- protected static final String ADDRESS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
- *
- * @see #getAddress()
- * @generated
- * @ordered
- */
- protected String address = ADDRESS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- *
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- *
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- *
- * @generated
- */
- protected DeviceImpl() {
- super();
- }
-
- /**
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return ModelPackage.Literals.DEVICE;
- }
-
- /**
- *
- * @generated
- */
- public EList getServiceType() {
- if (serviceType == null) {
- serviceType = new EObjectContainmentEList(ServiceType.class, this, ModelPackage.DEVICE__SERVICE_TYPE);
- }
- return serviceType;
- }
-
- /**
- *
- * @generated
- */
- public String getAddress() {
- return address;
- }
-
- /**
- *
- * @generated
- */
- public void setAddress(String newAddress) {
- String oldAddress = address;
- address = newAddress;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DEVICE__ADDRESS, oldAddress, address));
- }
-
- /**
- *
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- *
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DEVICE__NAME, oldName, name));
- }
-
- /**
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case ModelPackage.DEVICE__SERVICE_TYPE:
- return ((InternalEList)getServiceType()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- *
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case ModelPackage.DEVICE__SERVICE_TYPE:
- return getServiceType();
- case ModelPackage.DEVICE__ADDRESS:
- return getAddress();
- case ModelPackage.DEVICE__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- *
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case ModelPackage.DEVICE__SERVICE_TYPE:
- getServiceType().clear();
- getServiceType().addAll((Collection)newValue);
- return;
- case ModelPackage.DEVICE__ADDRESS:
- setAddress((String)newValue);
- return;
- case ModelPackage.DEVICE__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- *
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case ModelPackage.DEVICE__SERVICE_TYPE:
- getServiceType().clear();
- return;
- case ModelPackage.DEVICE__ADDRESS:
- setAddress(ADDRESS_EDEFAULT);
- return;
- case ModelPackage.DEVICE__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- *
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case ModelPackage.DEVICE__SERVICE_TYPE:
- return serviceType != null && !serviceType.isEmpty();
- case ModelPackage.DEVICE__ADDRESS:
- return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
- case ModelPackage.DEVICE__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (address: "); //$NON-NLS-1$
- result.append(address);
- result.append(", name: "); //$NON-NLS-1$
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //DeviceImpl \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ModelFactoryImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ModelFactoryImpl.java
deleted file mode 100644
index ce3ab6216..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ModelFactoryImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-import org.eclipse.tm.discovery.model.*;
-
-/**
- *
- * An implementation of the model <b>Factory</b>.
- *
- * @generated
- */
-public class ModelFactoryImpl extends EFactoryImpl implements ModelFactory {
- /**
- * Creates the default factory implementation.
- * @return model factory
- *
- * @generated
- */
- public static ModelFactory init() {
- try {
- ModelFactory theModelFactory = (ModelFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/tm/discovery/model"); //$NON-NLS-1$
- if (theModelFactory != null) {
- return theModelFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new ModelFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- *
- * @generated
- */
- public ModelFactoryImpl() {
- super();
- }
-
- /**
- *
- * @generated
- */
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case ModelPackage.DEVICE: return createDevice();
- case ModelPackage.NETWORK: return createNetwork();
- case ModelPackage.PAIR: return createPair();
- case ModelPackage.SERVICE: return createService();
- case ModelPackage.SERVICE_TYPE: return createServiceType();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$//$NON-NLS-2$
- }
- }
-
- /**
- *
- * @generated
- */
- public Device createDevice() {
- DeviceImpl device = new DeviceImpl();
- return device;
- }
-
- /**
- *
- * @generated
- */
- public Network createNetwork() {
- NetworkImpl network = new NetworkImpl();
- return network;
- }
-
- /**
- *
- * @generated
- */
- public Pair createPair() {
- PairImpl pair = new PairImpl();
- return pair;
- }
-
- /**
- *
- * @generated
- */
- public Service createService() {
- ServiceImpl service = new ServiceImpl();
- return service;
- }
-
- /**
- *
- * @generated
- */
- public ServiceType createServiceType() {
- ServiceTypeImpl serviceType = new ServiceTypeImpl();
- return serviceType;
- }
-
- /**
- *
- * @generated
- */
- public ModelPackage getModelPackage() {
- return (ModelPackage)getEPackage();
- }
-
- /**
- *
- * @return model package
- * @deprecated
- * @generated
- */
- public static ModelPackage getPackage() {
- return ModelPackage.eINSTANCE;
- }
-
-} //ModelFactoryImpl
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ModelPackageImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ModelPackageImpl.java
deleted file mode 100644
index 0e75e8b30..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ModelPackageImpl.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-
-import org.eclipse.tm.discovery.model.Device;
-import org.eclipse.tm.discovery.model.ModelFactory;
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.Network;
-import org.eclipse.tm.discovery.model.Pair;
-import org.eclipse.tm.discovery.model.Service;
-import org.eclipse.tm.discovery.model.ServiceType;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
- /**
- *
- * @generated
- */
- private EClass deviceEClass = null;
-
- /**
- *
- * @generated
- */
- private EClass networkEClass = null;
-
- /**
- *
- * @generated
- */
- private EClass pairEClass = null;
-
- /**
- *
- * @generated
- */
- private EClass serviceEClass = null;
-
- /**
- *
- * @generated
- */
- private EClass serviceTypeEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- *
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.tm.discovery.model.ModelPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private ModelPackageImpl() {
- super(eNS_URI, ModelFactory.eINSTANCE);
- }
-
- /**
- *
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
- * @return the model package
- *
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static ModelPackage init() {
- if (isInited) return (ModelPackage)EPackage.Registry.INSTANCE.getEPackage(ModelPackage.eNS_URI);
-
- // Obtain or create and register package
- ModelPackageImpl theModelPackage = (ModelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof ModelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ModelPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- XMLTypePackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- theModelPackage.createPackageContents();
-
- // Initialize created meta-data
- theModelPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theModelPackage.freeze();
-
- return theModelPackage;
- }
-
- /**
- *
- * @generated
- */
- public EClass getDevice() {
- return deviceEClass;
- }
-
- /**
- *
- * @generated
- */
- public EReference getDevice_ServiceType() {
- return (EReference)deviceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- *
- * @generated
- */
- public EAttribute getDevice_Address() {
- return (EAttribute)deviceEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- *
- * @generated
- */
- public EAttribute getDevice_Name() {
- return (EAttribute)deviceEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- *
- * @generated
- */
- public EClass getNetwork() {
- return networkEClass;
- }
-
- /**
- *
- * @generated
- */
- public EReference getNetwork_Device() {
- return (EReference)networkEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- *
- * @generated
- */
- public EClass getPair() {
- return pairEClass;
- }
-
- /**
- *
- * @generated
- */
- public EAttribute getPair_Key() {
- return (EAttribute)pairEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- *
- * @generated
- */
- public EAttribute getPair_Value() {
- return (EAttribute)pairEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- *
- * @generated
- */
- public EClass getService() {
- return serviceEClass;
- }
-
- /**
- *
- * @generated
- */
- public EReference getService_Pair() {
- return (EReference)serviceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- *
- * @generated
- */
- public EAttribute getService_Name() {
- return (EAttribute)serviceEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- *
- * @generated
- */
- public EClass getServiceType() {
- return serviceTypeEClass;
- }
-
- /**
- *
- * @generated
- */
- public EReference getServiceType_Service() {
- return (EReference)serviceTypeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- *
- * @generated
- */
- public EAttribute getServiceType_Name() {
- return (EAttribute)serviceTypeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- *
- * @generated
- */
- public ModelFactory getModelFactory() {
- return (ModelFactory)getEFactoryInstance();
- }
-
- /**
- *
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- *
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- deviceEClass = createEClass(DEVICE);
- createEReference(deviceEClass, DEVICE__SERVICE_TYPE);
- createEAttribute(deviceEClass, DEVICE__ADDRESS);
- createEAttribute(deviceEClass, DEVICE__NAME);
-
- networkEClass = createEClass(NETWORK);
- createEReference(networkEClass, NETWORK__DEVICE);
-
- pairEClass = createEClass(PAIR);
- createEAttribute(pairEClass, PAIR__KEY);
- createEAttribute(pairEClass, PAIR__VALUE);
-
- serviceEClass = createEClass(SERVICE);
- createEReference(serviceEClass, SERVICE__PAIR);
- createEAttribute(serviceEClass, SERVICE__NAME);
-
- serviceTypeEClass = createEClass(SERVICE_TYPE);
- createEReference(serviceTypeEClass, SERVICE_TYPE__SERVICE);
- createEAttribute(serviceTypeEClass, SERVICE_TYPE__NAME);
- }
-
- /**
- *
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- *
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
-
- // Add supertypes to classes
-
- // Initialize classes and features; add operations and parameters
- initEClass(deviceEClass, Device.class, "Device", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(getDevice_ServiceType(), this.getServiceType(), null, "serviceType", null, 1, -1, Device.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getDevice_Address(), theXMLTypePackage.getString(), "address", null, 0, 1, Device.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getDevice_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, Device.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(networkEClass, Network.class, "Network", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(getNetwork_Device(), this.getDevice(), null, "device", null, 1, -1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(pairEClass, Pair.class, "Pair", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(getPair_Key(), theXMLTypePackage.getString(), "key", null, 0, 1, Pair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getPair_Value(), theXMLTypePackage.getString(), "value", null, 0, 1, Pair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(serviceEClass, Service.class, "Service", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(getService_Pair(), this.getPair(), null, "pair", null, 0, -1, Service.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getService_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, Service.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(serviceTypeEClass, ServiceType.class, "ServiceType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(getServiceType_Service(), this.getService(), null, "service", null, 1, -1, ServiceType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getServiceType_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, ServiceType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- // Create resource
- createResource(eNS_URI);
-
- // Create annotations
- // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
- createExtendedMetaDataAnnotations();
- }
-
- /**
- * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
- *
- * @generated
- */
- protected void createExtendedMetaDataAnnotations() {
- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$
- addAnnotation
- (deviceEClass,
- source,
- new String[] {
- "name", "Device", //$NON-NLS-1$ //$NON-NLS-2$
- "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getDevice_ServiceType(),
- source,
- new String[] {
- "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "ServiceType" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getDevice_Address(),
- source,
- new String[] {
- "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "address" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getDevice_Name(),
- source,
- new String[] {
- "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "name" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (networkEClass,
- source,
- new String[] {
- "name", "Network", //$NON-NLS-1$ //$NON-NLS-2$
- "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getNetwork_Device(),
- source,
- new String[] {
- "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "Device" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (pairEClass,
- source,
- new String[] {
- "name", "Pair", //$NON-NLS-1$ //$NON-NLS-2$
- "kind", "empty" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getPair_Key(),
- source,
- new String[] {
- "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "key" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getPair_Value(),
- source,
- new String[] {
- "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "value" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (serviceEClass,
- source,
- new String[] {
- "name", "Service", //$NON-NLS-1$ //$NON-NLS-2$
- "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getService_Pair(),
- source,
- new String[] {
- "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "Pair" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getService_Name(),
- source,
- new String[] {
- "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "name" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (serviceTypeEClass,
- source,
- new String[] {
- "name", "ServiceType", //$NON-NLS-1$ //$NON-NLS-2$
- "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getServiceType_Service(),
- source,
- new String[] {
- "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "Service" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getServiceType_Name(),
- source,
- new String[] {
- "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "name" //$NON-NLS-1$ //$NON-NLS-2$
- });
- }
-
-} //ModelPackageImpl
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/NetworkImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/NetworkImpl.java
deleted file mode 100644
index 0ecf541dd..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/NetworkImpl.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.tm.discovery.model.Device;
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.Network;
-
-/**
- *
- * An implementation of the model object '<em><b>Network</b></em>'.
- *
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.impl.NetworkImpl#getDevice <em>Device</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class NetworkImpl extends EObjectImpl implements Network {
- /**
- * The cached value of the '{@link #getDevice() <em>Device</em>}' containment reference list.
- *
- * @see #getDevice()
- * @generated
- * @ordered
- */
- protected EList device = null;
-
- /**
- *
- * @generated
- */
- protected NetworkImpl() {
- super();
- }
-
- /**
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return ModelPackage.Literals.NETWORK;
- }
-
- /**
- *
- * @generated
- */
- public EList getDevice() {
- if (device == null) {
- device = new EObjectContainmentEList(Device.class, this, ModelPackage.NETWORK__DEVICE);
- }
- return device;
- }
-
- /**
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case ModelPackage.NETWORK__DEVICE:
- return ((InternalEList)getDevice()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- *
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case ModelPackage.NETWORK__DEVICE:
- return getDevice();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- *
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case ModelPackage.NETWORK__DEVICE:
- getDevice().clear();
- getDevice().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- *
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case ModelPackage.NETWORK__DEVICE:
- getDevice().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- *
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case ModelPackage.NETWORK__DEVICE:
- return device != null && !device.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} //NetworkImpl \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/PairImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/PairImpl.java
deleted file mode 100644
index 25aa9ad75..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/PairImpl.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.Pair;
-
-/**
- *
- * An implementation of the model object '<em><b>Pair</b></em>'.
- *
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.impl.PairImpl#getKey <em>Key</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.impl.PairImpl#getValue <em>Value</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class PairImpl extends EObjectImpl implements Pair {
- /**
- * The default value of the '{@link #getKey() <em>Key</em>}' attribute.
- *
- * @see #getKey()
- * @generated
- * @ordered
- */
- protected static final String KEY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getKey() <em>Key</em>}' attribute.
- *
- * @see #getKey()
- * @generated
- * @ordered
- */
- protected String key = KEY_EDEFAULT;
-
- /**
- * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
- *
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected static final String VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
- *
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected String value = VALUE_EDEFAULT;
-
- /**
- *
- * @generated
- */
- protected PairImpl() {
- super();
- }
-
- /**
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return ModelPackage.Literals.PAIR;
- }
-
- /**
- *
- * @generated
- */
- public String getKey() {
- return key;
- }
-
- /**
- *
- * @generated
- */
- public void setKey(String newKey) {
- String oldKey = key;
- key = newKey;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PAIR__KEY, oldKey, key));
- }
-
- /**
- *
- * @generated
- */
- public String getValue() {
- return value;
- }
-
- /**
- *
- * @generated
- */
- public void setValue(String newValue) {
- String oldValue = value;
- value = newValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PAIR__VALUE, oldValue, value));
- }
-
- /**
- *
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case ModelPackage.PAIR__KEY:
- return getKey();
- case ModelPackage.PAIR__VALUE:
- return getValue();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- *
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case ModelPackage.PAIR__KEY:
- setKey((String)newValue);
- return;
- case ModelPackage.PAIR__VALUE:
- setValue((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- *
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case ModelPackage.PAIR__KEY:
- setKey(KEY_EDEFAULT);
- return;
- case ModelPackage.PAIR__VALUE:
- setValue(VALUE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- *
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case ModelPackage.PAIR__KEY:
- return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
- case ModelPackage.PAIR__VALUE:
- return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (key: "); //$NON-NLS-1$
- result.append(key);
- result.append(", value: "); //$NON-NLS-1$
- result.append(value);
- result.append(')');
- return result.toString();
- }
-
-} //PairImpl \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ServiceImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ServiceImpl.java
deleted file mode 100644
index 1f57639ab..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ServiceImpl.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.Pair;
-import org.eclipse.tm.discovery.model.Service;
-
-/**
- *
- * An implementation of the model object '<em><b>Service</b></em>'.
- *
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.impl.ServiceImpl#getPair <em>Pair</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.impl.ServiceImpl#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ServiceImpl extends EObjectImpl implements Service {
- /**
- * The cached value of the '{@link #getPair() <em>Pair</em>}' containment reference list.
- *
- * @see #getPair()
- * @generated
- * @ordered
- */
- protected EList pair = null;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- *
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- *
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- *
- * @generated
- */
- protected ServiceImpl() {
- super();
- }
-
- /**
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return ModelPackage.Literals.SERVICE;
- }
-
- /**
- *
- * @generated
- */
- public EList getPair() {
- if (pair == null) {
- pair = new EObjectContainmentEList(Pair.class, this, ModelPackage.SERVICE__PAIR);
- }
- return pair;
- }
-
- /**
- *
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- *
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.SERVICE__NAME, oldName, name));
- }
-
- /**
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case ModelPackage.SERVICE__PAIR:
- return ((InternalEList)getPair()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- *
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case ModelPackage.SERVICE__PAIR:
- return getPair();
- case ModelPackage.SERVICE__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- *
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case ModelPackage.SERVICE__PAIR:
- getPair().clear();
- getPair().addAll((Collection)newValue);
- return;
- case ModelPackage.SERVICE__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- *
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case ModelPackage.SERVICE__PAIR:
- getPair().clear();
- return;
- case ModelPackage.SERVICE__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- *
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case ModelPackage.SERVICE__PAIR:
- return pair != null && !pair.isEmpty();
- case ModelPackage.SERVICE__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: "); //$NON-NLS-1$
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //ServiceImpl \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ServiceTypeImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ServiceTypeImpl.java
deleted file mode 100644
index 2c7e73701..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/impl/ServiceTypeImpl.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.tm.discovery.model.ModelPackage;
-import org.eclipse.tm.discovery.model.Service;
-import org.eclipse.tm.discovery.model.ServiceType;
-
-/**
- *
- * An implementation of the model object '<em><b>Service Type</b></em>'.
- *
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.tm.discovery.model.impl.ServiceTypeImpl#getService <em>Service</em>}</li>
- * <li>{@link org.eclipse.tm.discovery.model.impl.ServiceTypeImpl#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ServiceTypeImpl extends EObjectImpl implements ServiceType {
- /**
- * The cached value of the '{@link #getService() <em>Service</em>}' containment reference list.
- *
- * @see #getService()
- * @generated
- * @ordered
- */
- protected EList service = null;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- *
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- *
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- *
- * @generated
- */
- protected ServiceTypeImpl() {
- super();
- }
-
- /**
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return ModelPackage.Literals.SERVICE_TYPE;
- }
-
- /**
- *
- * @generated
- */
- public EList getService() {
- if (service == null) {
- service = new EObjectContainmentEList(Service.class, this, ModelPackage.SERVICE_TYPE__SERVICE);
- }
- return service;
- }
-
- /**
- *
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- *
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.SERVICE_TYPE__NAME, oldName, name));
- }
-
- /**
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case ModelPackage.SERVICE_TYPE__SERVICE:
- return ((InternalEList)getService()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- *
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case ModelPackage.SERVICE_TYPE__SERVICE:
- return getService();
- case ModelPackage.SERVICE_TYPE__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- *
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case ModelPackage.SERVICE_TYPE__SERVICE:
- getService().clear();
- getService().addAll((Collection)newValue);
- return;
- case ModelPackage.SERVICE_TYPE__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- *
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case ModelPackage.SERVICE_TYPE__SERVICE:
- getService().clear();
- return;
- case ModelPackage.SERVICE_TYPE__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- *
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case ModelPackage.SERVICE_TYPE__SERVICE:
- return service != null && !service.isEmpty();
- case ModelPackage.SERVICE_TYPE__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: "); //$NON-NLS-1$
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //ServiceTypeImpl \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelAdapterFactory.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelAdapterFactory.java
deleted file mode 100644
index a03dff3fd..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelAdapterFactory.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.tm.discovery.model.*;
-
-/**
- *
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- *
- * @see org.eclipse.tm.discovery.model.ModelPackage
- * @generated
- */
-public class ModelAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- *
- * @generated
- */
- protected static ModelPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- *
- * @generated
- */
- public ModelAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = ModelPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- *
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- *
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch the delegates to the <code>createXXX</code> methods.
- *
- * @generated
- */
- protected ModelSwitch modelSwitch =
- new ModelSwitch() {
- public Object caseDevice(Device object) {
- return createDeviceAdapter();
- }
- public Object caseNetwork(Network object) {
- return createNetworkAdapter();
- }
- public Object casePair(Pair object) {
- return createPairAdapter();
- }
- public Object caseService(Service object) {
- return createServiceAdapter();
- }
- public Object caseServiceType(ServiceType object) {
- return createServiceTypeAdapter();
- }
- public Object defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- *
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- public Adapter createAdapter(Notifier target) {
- return (Adapter)modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.Device <em>Device</em>}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.tm.discovery.model.Device
- * @generated
- */
- public Adapter createDeviceAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.Network <em>Network</em>}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.tm.discovery.model.Network
- * @generated
- */
- public Adapter createNetworkAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.Pair <em>Pair</em>}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.tm.discovery.model.Pair
- * @generated
- */
- public Adapter createPairAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.Service <em>Service</em>}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.tm.discovery.model.Service
- * @generated
- */
- public Adapter createServiceAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.ServiceType <em>Service Type</em>}'.
- *
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @return the new adapter.
- * @see org.eclipse.tm.discovery.model.ServiceType
- * @generated
- */
- public Adapter createServiceTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- *
- * This default implementation returns null.
- *
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //ModelAdapterFactory
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelResourceFactoryImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelResourceFactoryImpl.java
deleted file mode 100644
index a26e503d2..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelResourceFactoryImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-/**
- *
- * The <b>Resource Factory</b> associated with the package.
- *
- * @see org.eclipse.tm.discovery.model.util.ModelResourceImpl
- * @generated
- */
-public class ModelResourceFactoryImpl extends ResourceFactoryImpl {
- /**
- * Creates an instance of the resource factory.
- *
- * @generated
- */
- public ModelResourceFactoryImpl() {
- super();
- }
-
- /**
- * Creates an instance of the resource.
- *
- * @generated
- */
- public Resource createResource(URI uri) {
- XMLResource result = new ModelResourceImpl(uri);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
- result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
-
- result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
- return result;
- }
-
-} //ModelResourceFactoryImpl
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelResourceImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelResourceImpl.java
deleted file mode 100644
index 5b80920fe..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelResourceImpl.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-
-/**
- *
- * The <b>Resource </b> associated with the package.
- *
- * @see org.eclipse.tm.discovery.model.util.ModelResourceFactoryImpl
- * @generated
- */
-public class ModelResourceImpl extends XMLResourceImpl {
- /**
- * Creates an instance of the resource.
- *
- * @param uri the URI of the new resource.
- * @generated
- */
- public ModelResourceImpl(URI uri) {
- super(uri);
- }
-
-} //ModelResourceImpl
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelSwitch.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelSwitch.java
deleted file mode 100644
index d94aff209..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelSwitch.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.util;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.tm.discovery.model.*;
-
-/**
- *
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- *
- * @see org.eclipse.tm.discovery.model.ModelPackage
- * @generated
- */
-public class ModelSwitch {
- /**
- * The cached model package
- *
- * @generated
- */
- protected static ModelPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- *
- * @generated
- */
- public ModelSwitch() {
- if (modelPackage == null) {
- modelPackage = ModelPackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * @param theEObject
- *
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public Object doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- *
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected Object doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch((EClass)eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- *
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected Object doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case ModelPackage.DEVICE: {
- Device device = (Device)theEObject;
- Object result = caseDevice(device);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ModelPackage.NETWORK: {
- Network network = (Network)theEObject;
- Object result = caseNetwork(network);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ModelPackage.PAIR: {
- Pair pair = (Pair)theEObject;
- Object result = casePair(pair);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ModelPackage.SERVICE: {
- Service service = (Service)theEObject;
- Object result = caseService(service);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ModelPackage.SERVICE_TYPE: {
- ServiceType serviceType = (ServiceType)theEObject;
- Object result = caseServiceType(serviceType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Device</em>'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Device</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseDevice(Device object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Network</em>'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Network</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseNetwork(Network object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Pair</em>'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Pair</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object casePair(Pair object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Service</em>'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Service</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseService(Service object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Service Type</em>'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Service Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseServiceType(ServiceType object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- *
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public Object defaultCase(EObject object) {
- return null;
- }
-
-} //ModelSwitch
diff --git a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelXMLProcessor.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelXMLProcessor.java
deleted file mode 100644
index eb9648acc..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/discovery/model/util/ModelXMLProcessor.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.model.util;
-
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
-
-import org.eclipse.tm.discovery.model.ModelPackage;
-
-/**
- * This class contains helper methods to serialize and deserialize XML documents
- *
- * @generated
- */
-public class ModelXMLProcessor extends XMLProcessor {
- /**
- * Public constructor to instantiate the helper.
- *
- * @generated
- */
- public ModelXMLProcessor() {
- super((EPackage.Registry.INSTANCE));
- ModelPackage.eINSTANCE.eClass();
- }
-
- /**
- * Register for "*" and "xml" file extensions the ModelResourceFactoryImpl factory.
- *
- * @generated
- */
- protected Map getRegistrations() {
- if (registrations == null) {
- super.getRegistrations();
- registrations.put(XML_EXTENSION, new ModelResourceFactoryImpl());
- registrations.put(STAR_EXTENSION, new ModelResourceFactoryImpl());
- }
- return registrations;
- }
-
-} //ModelXMLProcessor
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.classpath b/discovery/org.eclipse.tm.discovery.protocol.dnssd/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.cvsignore b/discovery/org.eclipse.tm.discovery.protocol.dnssd/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.project b/discovery/org.eclipse.tm.discovery.protocol.dnssd/.project
deleted file mode 100644
index fea92ff80..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.discovery.protocol.dnssd</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.settings/org.eclipse.core.resources.prefs b/discovery/org.eclipse.tm.discovery.protocol.dnssd/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.settings/org.eclipse.jdt.core.prefs b/discovery/org.eclipse.tm.discovery.protocol.dnssd/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/META-INF/MANIFEST.MF b/discovery/org.eclipse.tm.discovery.protocol.dnssd/META-INF/MANIFEST.MF
deleted file mode 100644
index 7e6107e9b..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.discovery.protocol.dnssd;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.tm.discovery.protocol.dnssd.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.discovery.engine,
- org.eclipse.tm.discovery.model,
- org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/about.html b/discovery/org.eclipse.tm.discovery.protocol.dnssd/about.html
deleted file mode 100644
index 460233046..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/build.properties b/discovery/org.eclipse.tm.discovery.protocol.dnssd/build.properties
deleted file mode 100644
index e4c000c4c..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- .,\
- plugin.xml
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.properties b/discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.properties
deleted file mode 100644
index c4e4ec55f..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = TM Service Discovery DNS-SD Protocol
-providerName = Eclipse.org
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.xml b/discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.xml
deleted file mode 100644
index c612ca67a..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension point="org.eclipse.tm.discovery.engine.discoveryProtocol">
- <protocol
- class="org.eclipse.tm.discovery.protocol.dnssd.DNSSDProtocol"
- name="DNS-SD"/>
- </extension>
-</plugin>
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/Activator.java b/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/Activator.java
deleted file mode 100644
index c4aff3dbc..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.protocol.dnssd;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tm.discovery.protocol.dnssd"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/DNSSDProtocol.java b/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/DNSSDProtocol.java
deleted file mode 100644
index 13bab04ba..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/DNSSDProtocol.java
+++ /dev/null
@@ -1,716 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.protocol.dnssd;
-
-import java.io.ByteArrayInputStream;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.Vector;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.tm.discovery.model.Device;
-import org.eclipse.tm.discovery.model.ModelFactory;
-import org.eclipse.tm.discovery.model.Network;
-import org.eclipse.tm.discovery.model.Pair;
-import org.eclipse.tm.discovery.model.Service;
-import org.eclipse.tm.discovery.model.ServiceType;
-import org.eclipse.tm.discovery.protocol.IProtocol;
-import org.eclipse.tm.discovery.transport.ITransport;
-
-
-
-/**
- * DNS-based Service Discovery implementation based on <a
- * href="http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt">DNS-Based
- * Service Discovery</a> <br/><br/> The DNS packets supported by the implementation are:
- *
- * <ul>
- * <li> DNS Pointer resource record (PTR) <br/> <table border="1">
- * <tr>
- * <td>Name</td>
- * <td>Type</td>
- * <td>Class</td>
- * <td>TTL</td>
- * <td>Data Size</td>
- * <td>Domain Name</td>
- * </tr>
- * </table> <br/>
- * <li> DNS Service resource record (SRV)<br/> <table border="1">
- * <tr>
- * <td>Name</td>
- * <td>Type</td>
- * <td>Class</td>
- * <td>TTL</td>
- * <td>Data Size</td>
- * <td>Priority</td>
- * <td>Weight</td>
- * <td>Port</td>
- * <td>Target</td>
- * </tr>
- * </table> <br/>
- * <li> DNS Text resource record (TXT) <br/> <table border="1">
- * <tr>
- * <td>Name</td>
- * <td>Type</td>
- * <td>Class</td>
- * <td>TTL</td>
- * <td>Data Size</td>
- * <td>Data Pairs</td>
- * </tr>
- * </table> <br/>
- * <li> DNS Address resource record (A) <br/> <table border="1">
- * <tr>
- * <td>Name</td>
- * <td>Type</td>
- * <td>Class</td>
- * <td>TTL</td>
- * <td>Data Size</td>
- * <td>Address</td>
- * </tr>
- * </table>
- * </ul>
- * <br/>
- *
- *
- */
-public class DNSSDProtocol implements IProtocol {
-
- // DNS Pointer resource record identifier
- private final static int PTR = 0x0C;
-
- // DNS Service resource record identifier
- private final static int SRV = 0x21;
-
- // DNS Text resource record identifier
- private final static int TXT = 0x10;
-
- // DNS Address resource record identifier
- private final static int A = 0x01;
-
- // DNS packet reference.
- private byte[] packet;
-
- // provide 64k for the received packet
- private final int MAX_PACKET_SIZE = 65535;
- private byte[] buffer = new byte[MAX_PACKET_SIZE];
-
- //IP address identifying the target
- private String address;
-
- // Queries for services and legacy services
- private final String SERVICE_DISCOVERY_COMMAND = Messages.getString("DNSSDProtocol.ServiceDiscoveryCommand"); //$NON-NLS-1$
- private final String LEGACY_SERVICE_DISCOVERY_COMMAND = Messages.getString("DNSSDProtocol.legacyServiceDiscoveryCommand"); //$NON-NLS-1$
-
- // Patterns to parse service name and service type
-
- private final Pattern srvPattern = Pattern.compile("^(.+)\\._(.+)._.+\\.local."); //$NON-NLS-1$
- private final Pattern ptrPattern = Pattern.compile("^_(.+)._.+\\.local."); //$NON-NLS-1$
-
- private Resource resource = null;
- private ITransport transport = null;
- private String query = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.discovery.protocol.IProtocol#getQueries()
- */
- public String[] getQueries()
- {
- return new String[]{
- SERVICE_DISCOVERY_COMMAND,
- LEGACY_SERVICE_DISCOVERY_COMMAND
- };
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.discovery.protocol.IProtocol#getDiscoveryJob(java.lang.String, org.eclipse.emf.ecore.resource.Resource, org.eclipse.tm.discovery.transport.ITransport)
- */
- public Job getDiscoveryJob(String aQuery, Resource aResource, ITransport aTransport){
-
- resource = aResource;
- transport = aTransport;
- query = aQuery;
-
- return new Job(Messages.getString("DNSSDProtocol.JobName")) { //$NON-NLS-1$
- protected IStatus run(IProgressMonitor monitor) {
- if (transport != null) {
- sendQuery(transport, query, PTR);
-
- Vector discoveredServices = new Vector();
-
- if (!resource.getContents().isEmpty()) {
-
- Iterator deviceIterator = ((Network) resource.getContents().get(0)).getDevice().iterator();
- while (deviceIterator.hasNext()) {
- Device device = (Device) deviceIterator.next();
- Iterator serviceTypeIterator = device.getServiceType().iterator();
- while (serviceTypeIterator.hasNext()) {
- ServiceType serviceType = (ServiceType) serviceTypeIterator.next();
- if (serviceType.getName().equals(SERVICE_DISCOVERY_COMMAND) ||
- serviceType.getName().equals(LEGACY_SERVICE_DISCOVERY_COMMAND)) {
- Iterator serviceIterator = serviceType.getService().iterator();
- while (serviceIterator.hasNext()) {
- Service service = (Service) serviceIterator.next();
-
- if (!discoveredServices.contains(service.getName())) {
- discoveredServices.add(service.getName());
- }
-
- }
- serviceTypeIterator.remove();
- }
- }
- }
-
- for (int i = 0; i < discoveredServices.size(); i++) {
- sendQuery(transport,(String) discoveredServices.elementAt(i), PTR);
- }
- }
- }
- return new Status(IStatus.OK,
- "org.eclipse.rse.discovery.engine", IStatus.OK, //$NON-NLS-1$
- Messages.getString("DNSSDProtocol.FinishedJobName"), null); //$NON-NLS-1$
- }
- };
- }
-
- /*
- * Creates and sends the specified query in a DNS-SD packet and call the function to populate the model with the received data
- */
- private void sendQuery(ITransport transport, String query, int type) {
- try {
-
- //clean buffer
- for (int i = 0; i < buffer.length; i++) {
- buffer[i]=0;
- }
-
- // number of queries (1)
- buffer[4] = (byte) 0x00;
- buffer[5] = (byte) 0x01;
-
- //jump to the data section of the packet letting the other fields as 0s
- int index = 12;
-
- StringTokenizer tokenizer = new StringTokenizer(query, "."); //$NON-NLS-1$
-
- while (tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken();
-
- buffer[index] = (byte) token.length();
- index++;
-
- for (int subIndex = 0; subIndex < token.getBytes().length; subIndex++) {
- buffer[index + subIndex] = token.getBytes()[subIndex];
- }
- index += token.getBytes().length;
- }
-
- //end of data section
- buffer[index++] = 0x00;
-
- // type TXT-SRV-PTR
- buffer[index++] = 0x00;
- buffer[index++] = (byte) (type & 0xFF);
-
- //inet
- buffer[index++] = 0x00;
- buffer[index++] = 0x01;
-
- packet = new byte[index];
- for (int position = 0; position < index; position++)
- packet[position] = buffer[position];
-
- //send the packet using the provided ITransport implementation
- transport.send(packet);
-
- // wait to receive data until timeout
- while (true) {
- address = transport.receive(buffer);
- packet = buffer;
- populateModel(resource);
- }
-
- } catch (Exception e) {
- // timeout, no more services to discover
- }
- }
-
-
- /*
- * Populates the provided model with the contents of the received packet
- */
- private void populateModel(Resource resource) {
- Network network = null;
- Device device = null;
- boolean found = false;
-
- Iterator deviceIterator = null;
-
- if (resource.getContents().isEmpty()) {
- network = ModelFactory.eINSTANCE.createNetwork();
- resource.getContents().add(network);
- } else {
- network = (Network) resource.getContents().get(0);
- }
-
- deviceIterator = network.getDevice().iterator();
- while (deviceIterator.hasNext()) {
- Device aDevice = (Device) deviceIterator.next();
- if (aDevice.getAddress().equals(address)) {
- device = aDevice;
- found = true;
- break;
- }
- }
- if (!found) {
- device = ModelFactory.eINSTANCE.createDevice();
- device.setAddress(address);
-
- network.getDevice().add(device);
- }
-
- ByteArrayInputStream packetInputStream = new ByteArrayInputStream(packet);
-
- //skip transactionID+flags
- packetInputStream.skip(4);
-
- int queriesNumber = packetInputStream.read() << 8 | packetInputStream.read();
- int answersNumber = packetInputStream.read() << 8 | packetInputStream.read();
-
- //skip authority RRs
- packetInputStream.skip(2);
-
- int additionalRecordsNumber = packetInputStream.read() << 8 | packetInputStream.read();
-
- // read queries
- for (int i = 0; i < queriesNumber; i++) {
- getName(packetInputStream, packet);
- //skip type
- packetInputStream.skip(2);
- //skip class
- packetInputStream.skip(2);
- }
-
- //read answers
- for (int i = 0; i < answersNumber + additionalRecordsNumber; i++) {
- found = false;
-
- String name = getName(packetInputStream, packet);
-
- //packet type
- int type = packetInputStream.read() << 8 | packetInputStream.read();
-
- //skip class
- packetInputStream.skip(2);
-
- //skip TTL
- packetInputStream.skip(4);
-
- switch (type) {
-
- /*
- * A PACKET (DNS Address resource record identifier)
- */
- case DNSSDProtocol.A:
- handleARecord(packetInputStream, device, name);
- break;
-
- /*
- * PTR PACKET (DNS Pointer resource record identifier)
- */
- case DNSSDProtocol.PTR:
- handlePTRRecord(packetInputStream, device, name);
- break;
-
- /*
- * SRV PACKET (DNS Service resource record identifier)
- */
- case DNSSDProtocol.SRV:
- handleSRVRecord(packetInputStream, device, name);
- break;
-
- /*
- * TXT PACKET (DNS Text resource record identifier)
- */
- case DNSSDProtocol.TXT:
- handleTXTRecord(packetInputStream, device, name);
- break;
- }
- }
- }
-
- private void handleARecord(ByteArrayInputStream packetInputStream, Device device, String name) {
- int dataLength = packetInputStream.read() << 8 | packetInputStream.read();
-
- //skip address
- packetInputStream.skip(dataLength);
-
- if (device != null) {
- device.setName(name.substring(0, name.indexOf('.') ));
- }
- }
-
-
-
- private void handlePTRRecord(ByteArrayInputStream packetInputStream, Device device, String name) {
-
- Service service = ModelFactory.eINSTANCE.createService();
- ServiceType serviceType = ModelFactory.eINSTANCE.createServiceType();
-
- //skip dataLength
- packetInputStream.skip(2);
-
- String ptrDataName = getName(packetInputStream, packet);
-
- String serviceTypeName = name;
-
- //parse the service type name
- if(!(serviceTypeName.equals(SERVICE_DISCOVERY_COMMAND) || serviceTypeName.equals(LEGACY_SERVICE_DISCOVERY_COMMAND)))
- {
- Matcher matcher = ptrPattern.matcher(name);
- if (matcher.matches())
- serviceTypeName = matcher.group(1);
- }
-
- //find if we have a serviceType with this name...
- Iterator serviceTypeIterator = device.getServiceType().iterator();
- boolean found = false;
- while (serviceTypeIterator.hasNext()) {
- ServiceType aServiceType = (ServiceType) serviceTypeIterator.next();
- if (aServiceType.getName().equals(serviceTypeName)) {
- serviceType = aServiceType;
- found = true;
- break;
- }
- }
- if (!found) {
- serviceType = ModelFactory.eINSTANCE.createServiceType();
- serviceType.setName(serviceTypeName);
- device.getServiceType().add(serviceType);
- }
-
- if (!ptrDataName.equals("")) { //$NON-NLS-1$
- //find if we have a service with this name...
-
- String serviceName = null;
-
- if(serviceTypeName.equals(SERVICE_DISCOVERY_COMMAND) || serviceTypeName.equals(LEGACY_SERVICE_DISCOVERY_COMMAND))
- {
- serviceName = ptrDataName;
- }
- else
- {
- //parse the service type name
- Matcher matcher = srvPattern.matcher(ptrDataName);
- if (matcher.matches())
- serviceName = matcher.group(1);
- }
-
- Iterator serviceIterator = serviceType.getService().iterator();
- found = false;
- while (serviceIterator.hasNext()) {
- Service aService = (Service) serviceIterator.next();
- if (aService.getName().equals(serviceName)) {
- service = aService;
- found = true;
- break;
- }
- }
-
- if (!found) {
- service = ModelFactory.eINSTANCE.createService();
- service.setName(serviceName);
- serviceType.getService().add(service);
- }
- }
- }
-
- private void handleSRVRecord(ByteArrayInputStream packetInputStream, Device device, String name) {
-
- Service service = ModelFactory.eINSTANCE.createService();
- ServiceType serviceType = ModelFactory.eINSTANCE.createServiceType();
-
- //data of the packet, without bytes for priority-weight-port
- int dataLength = (packetInputStream.read() << 8 | packetInputStream.read()) - 6;
-
- int priority = packetInputStream.read() << 8 | packetInputStream.read();
- int weight = packetInputStream.read() << 8 | packetInputStream.read();
- int port = packetInputStream.read() << 8 | packetInputStream.read();
-
- byte[] data = new byte[dataLength];
- try {
- packetInputStream.read(data);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- String serviceTypeName = null;
- String serviceName = null;
-
- //parse the service type name and the service name
- Matcher matcher = srvPattern.matcher(name);
- if (matcher.matches())
- {
- serviceTypeName = matcher.group(2);
- serviceName = matcher.group(1);
- }
-
- // find if we have a serviceType with this name...
-
- Iterator serviceTypeIterator = device.getServiceType().iterator();
- boolean found = false;
- while (serviceTypeIterator.hasNext()) {
- ServiceType aServiceType = (ServiceType) serviceTypeIterator.next();
- if (aServiceType.getName().equals(serviceTypeName)) {
- serviceType = aServiceType;
- found = true;
- break;
- }
- }
-
- if (!found) {
- serviceType = ModelFactory.eINSTANCE.createServiceType();
- serviceType.setName(serviceTypeName);
- device.getServiceType().add(serviceType);
- }
-
- //find if we have a service with this name...
- Iterator serviceIterator = serviceType.getService().iterator();
- found = false;
- while (serviceIterator.hasNext()) {
- Service temp = (Service) serviceIterator.next();
- if (temp.getName().equals(serviceName)) {
- service = temp;
- found = true;
- break;
- }
- }
-
- if (!found) {
- service = ModelFactory.eINSTANCE.createService();
- service.setName(serviceName);
- serviceType.getService().add(service);
- }
-
- service.setName(serviceName);
-
- String[] keys = new String[]{"port","priority","weight"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String[] values = new String[]{port+"",priority+"",weight+""}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- for (int i = 0; i < keys.length; i++) {
-
- Pair text = null;
- Iterator pairIterator = service.getPair().iterator();
- found = false;
- while (pairIterator.hasNext()) {
- Pair aPair = (Pair) pairIterator.next();
- if (aPair != null)
- {
- if (aPair.getKey().equals(keys[i])) {
- String current = aPair.getValue();
- if (!current.equals(values[i]))
- aPair.setValue(values[i]);
- found = true;
- break;
- }
- }
- }
-
- if (!found) {
- text = ModelFactory.eINSTANCE.createPair();
- text.setKey(keys[i]);
- text.setValue(values[i]);
- service.getPair().add(text);
- }
- }
- }
-
- private void handleTXTRecord(ByteArrayInputStream packetInputStream, Device device, String recordName) {
- ServiceType serviceType = ModelFactory.eINSTANCE.createServiceType();
- Service service = ModelFactory.eINSTANCE.createService();
- int dataLength = packetInputStream.read() << 8 | packetInputStream.read();
-
- byte [] data = new byte[dataLength];
- try {
- packetInputStream.read(data);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- String serviceName = null;
- String serviceTypeName = null;
-
- // Find if we have a serviceType with this name...
-
- Matcher matcher = srvPattern.matcher(recordName);
- if (matcher.matches())
- {
- serviceName = matcher.group(1);
- serviceTypeName = matcher.group(2);
- }
-
-
- Iterator serviceTypeIterator = device.getServiceType().iterator();
- boolean found = false;
- while (serviceTypeIterator.hasNext()) {
- ServiceType aServiceType = (ServiceType) serviceTypeIterator.next();
- if (aServiceType != null) {
- if (aServiceType.getName().equals(serviceTypeName)) {
- serviceType = aServiceType;
- found = true;
- break;
- }
- }
- }
-
- if (!found) {
- serviceType = ModelFactory.eINSTANCE.createServiceType();
- serviceType.setName(serviceTypeName);
- device.getServiceType().add(serviceType);
- }
-
- // Find if we have a service with this name...
-
- Iterator serviceIterator = serviceType.getService().iterator();
- found = false;
- while (serviceIterator.hasNext()) {
- Service aService = (Service) serviceIterator.next();
- if (aService != null) {
- if (aService.getName().equals(serviceName)) {
- service = aService;
- found = true;
- break;
- }
- }
- }
-
- if (!found) {
- service = ModelFactory.eINSTANCE.createService();
- service.setName(recordName);
- serviceType.getService().add(service);
- }
-
- //process "key=value" pairs
-
- StringBuffer dataBuffer = new StringBuffer();
- int entryLength = 0;
-
- for (int j = 0; j < dataLength; j += entryLength + 1) {
-
- dataBuffer.setLength(0);
-
- entryLength = data[j];
-
- for (int k = 1; k <= entryLength; k++)
- dataBuffer.append((char) data[j + k]);
-
- StringTokenizer stk = new StringTokenizer(dataBuffer.toString(),"="); //$NON-NLS-1$
-
- String key = stk.nextToken();
-
- // DNS-Based Service Discovery
- // 6.4 Rules for Names in DNS-SD Name/Value Pairs
- // If a key has no value, assume "true"
- String value = "true"; //$NON-NLS-1$
-
- try {
- value = stk.nextToken();
- } catch (Exception e) {
- // no value, assume "true"
- }
-
- // find if we are updating the value of a key...
- Pair text = null;
- Iterator pairIterator = service.getPair().iterator();
- found = false;
- while (pairIterator.hasNext()) {
- Pair aPair = (Pair) pairIterator.next();
- if (aPair != null) {
- if (aPair.getKey().equals(key)) {
- String current = aPair.getValue();
- if (!current.equals(value))
- aPair.setValue(value);
- found = true;
- break;
- }
- }
- }
-
- if (!found) {
- text = ModelFactory.eINSTANCE.createPair();
- text.setKey(key);
- text.setValue(value);
- service.getPair().add(text);
- }
- }
- }
-
- // returns the name, that can be compressed using DNS compression
- // For more information about DNS compression: RFC 1035 (4.1.4. Message compression)
- private String getName(ByteArrayInputStream packetInputStream, byte[] packet) {
- StringBuffer buffer = new StringBuffer();
- int nextByte = 0;
-
- while (true) {
- nextByte = packetInputStream.read();
-
- //check if it's a pointer
- //pointer: |11xxxxxx|-|xxxxxxxx| where xxx...x is the pointer in the packet
- if ((nextByte & 0xC0) == 0xC0) {
- int upperByte = (nextByte & (byte) 0x3F) << 8;
- int offset = packetInputStream.read() | upperByte;
- buffer.append(getReference(packet, offset));
- break;
- } else if (nextByte == 0x00) {
- break;
- } else {
- for (int i = 0; i < nextByte; i++) {
- buffer.append((char)packetInputStream.read());
- }
- buffer.append('.');
- }
- }
- return buffer.toString();
- }
-
- private String getReference(byte[] packet, int offset) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; packet[offset + i] != 0x00;) {
- int numReads = packet[offset + i];
-
- //check if it's a pointer
- //pointer: |11xxxxxx|-|xxxxxxxx| where xxx...x is the pointer in the packet
- if ((numReads & 0xC0) == 0xC0) {
- int upperByte = (numReads & (byte) 0x3F) << 8;
- int nextOffset = packet[offset + i + 1] | upperByte;
- buffer.append(getReference(packet, nextOffset));
- break;
- } else {
- for (int j = 0; j < numReads; j++) {
- buffer.append((char) packet[offset + i + j + 1]);
- }
- buffer.append('.');
- }
- i += (numReads + 1);
- }
- return buffer.toString();
- }
-
-
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/Messages.java b/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/Messages.java
deleted file mode 100644
index f38d3abd4..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.protocol.dnssd;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.tm.discovery.protocol.dnssd.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/messages.properties b/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/messages.properties
deleted file mode 100644
index 78138f770..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/discovery/protocol/dnssd/messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-DNSSDProtocol.ServiceDiscoveryCommand=_services._dns-sd._udp.local.
-DNSSDProtocol.legacyServiceDiscoveryCommand=_services._mdns._udp.local.
-DNSSDProtocol.JobName=DNS-SD Service Discovery
-DNSSDProtocol.FinishedJobName=DNS-SD Service Discovery finished
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/.classpath b/discovery/org.eclipse.tm.discovery.transport.udp/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/.cvsignore b/discovery/org.eclipse.tm.discovery.transport.udp/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/.project b/discovery/org.eclipse.tm.discovery.transport.udp/.project
deleted file mode 100644
index 31a4ba764..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.discovery.transport.udp</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/.settings/org.eclipse.core.resources.prefs b/discovery/org.eclipse.tm.discovery.transport.udp/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/.settings/org.eclipse.jdt.core.prefs b/discovery/org.eclipse.tm.discovery.transport.udp/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/META-INF/MANIFEST.MF b/discovery/org.eclipse.tm.discovery.transport.udp/META-INF/MANIFEST.MF
deleted file mode 100644
index ff55aa6f0..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.discovery.transport.udp;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.tm.discovery.transport.udp.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.discovery.engine
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/about.html b/discovery/org.eclipse.tm.discovery.transport.udp/about.html
deleted file mode 100644
index 460233046..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/build.properties b/discovery/org.eclipse.tm.discovery.transport.udp/build.properties
deleted file mode 100644
index e4c000c4c..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- .,\
- plugin.xml
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/plugin.properties b/discovery/org.eclipse.tm.discovery.transport.udp/plugin.properties
deleted file mode 100644
index 4d87b66db..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = TM Service Discovery UDP Transport
-providerName = Eclipse.org
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/plugin.xml b/discovery/org.eclipse.tm.discovery.transport.udp/plugin.xml
deleted file mode 100644
index 5951d38e4..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/plugin.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.tm.discovery.engine.discoveryTransport">
- <transport
- class="org.eclipse.tm.discovery.transport.udp.UDPTransport"
- name="UDP"/>
- </extension>
-</plugin>
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/discovery/transport/udp/Activator.java b/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/discovery/transport/udp/Activator.java
deleted file mode 100644
index d0bb577cf..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/discovery/transport/udp/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.transport.udp;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tm.discovery.transport.udp"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/discovery/transport/udp/UDPTransport.java b/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/discovery/transport/udp/UDPTransport.java
deleted file mode 100644
index 2fc5b2bb5..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/discovery/transport/udp/UDPTransport.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.transport.udp;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.tm.discovery.transport.ITransport;
-
-/**
- * UPD/IP transport implementation
- */
-
-public class UDPTransport implements ITransport {
-
- // Default multicast DNS port
- public static int MDNS_PORT = 5353;
-
- // DNS-SD multicast address
- public static String MULTICAST_ADDRESS = "224.0.0.251"; //$NON-NLS-1$
-
- private DatagramSocket socket = null;
-
- private InetAddress server = null;
-
- private int port = MDNS_PORT;
-
- /**
- * Constructor for transport for UDP/IP
- */
-
- public UDPTransport() {
- try {
- socket = new DatagramSocket();
- } catch (SocketException e) {
- e.printStackTrace();
- }
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.discovery.transport.ITransport#setTargetAddress(java.lang.String)
- */
- public void setTargetAddress(String address) throws UnknownHostException
- {
-
- Pattern pattern = Pattern.compile("([^:]*)(:(\\d+))?"); //$NON-NLS-1$
- Matcher matcher = pattern.matcher(address);
- if (matcher.matches()) {
- server = InetAddress.getByName(matcher.group(1));
- if (server.isLoopbackAddress()) {
- server = InetAddress.getLocalHost();
- }
-
- if (matcher.groupCount() == 3 && matcher.group(3) != null)
- port = Integer.parseInt(matcher.group(3));
- }
-
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.discovery.transport.ITransport#setTimeOut(int)
- */
- public void setTimeOut(int timeOut) throws SocketException
- {
- socket.setSoTimeout(timeOut);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.discovery.transport.ITransport#send(byte[])
- */
- public void send(byte[] packet) throws IOException {
- DatagramPacket packetOut = new DatagramPacket(packet, packet.length,server, port);
- socket.send(packetOut);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.discovery.transport.ITransport#receive(byte[])
- */
- public String receive(byte[] packet) throws IOException {
- DatagramPacket packetIn = new DatagramPacket(packet, packet.length);
- socket.receive(packetIn);
-
- return packetIn.getAddress().getHostAddress();
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.view/.classpath b/discovery/org.eclipse.tm.discovery.view/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/discovery/org.eclipse.tm.discovery.view/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/discovery/org.eclipse.tm.discovery.view/.cvsignore b/discovery/org.eclipse.tm.discovery.view/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/discovery/org.eclipse.tm.discovery.view/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/discovery/org.eclipse.tm.discovery.view/.project b/discovery/org.eclipse.tm.discovery.view/.project
deleted file mode 100644
index edc1b4cc7..000000000
--- a/discovery/org.eclipse.tm.discovery.view/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.discovery.view</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.tm.discovery.view/.settings/org.eclipse.core.resources.prefs b/discovery/org.eclipse.tm.discovery.view/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/discovery/org.eclipse.tm.discovery.view/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/discovery/org.eclipse.tm.discovery.view/.settings/org.eclipse.jdt.core.prefs b/discovery/org.eclipse.tm.discovery.view/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/discovery/org.eclipse.tm.discovery.view/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/discovery/org.eclipse.tm.discovery.view/META-INF/MANIFEST.MF b/discovery/org.eclipse.tm.discovery.view/META-INF/MANIFEST.MF
deleted file mode 100644
index 1086adc82..000000000
--- a/discovery/org.eclipse.tm.discovery.view/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.discovery.view;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.tm.discovery.view.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui.forms,
- org.eclipse.tm.discovery.engine,
- org.eclipse.tm.discovery.model,
- org.eclipse.tm.discovery.model.edit,
- org.eclipse.core.resources,
- org.eclipse.emf.edit.ui;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.tm.discovery.wizard,
- org.eclipse.ui.ide
-Eclipse-LazyStart: false
-Import-Package: org.eclipse.emf.common.ui,
- org.eclipse.emf.common.util,
- org.eclipse.tm.discovery.engine,
- org.eclipse.tm.discovery.model.provider,
- org.eclipse.tm.discovery.model.util
-Export-Package: org.eclipse.tm.discovery.view
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/discovery/org.eclipse.tm.discovery.view/about.html b/discovery/org.eclipse.tm.discovery.view/about.html
deleted file mode 100644
index 460233046..000000000
--- a/discovery/org.eclipse.tm.discovery.view/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.view/build.properties b/discovery/org.eclipse.tm.discovery.view/build.properties
deleted file mode 100644
index 1f857cd2e..000000000
--- a/discovery/org.eclipse.tm.discovery.view/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- icons/,\
- .
-src.includes = about.html
-
diff --git a/discovery/org.eclipse.tm.discovery.view/icons/system_view.gif b/discovery/org.eclipse.tm.discovery.view/icons/system_view.gif
deleted file mode 100644
index c3fe221a1..000000000
--- a/discovery/org.eclipse.tm.discovery.view/icons/system_view.gif
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.view/plugin.properties b/discovery/org.eclipse.tm.discovery.view/plugin.properties
deleted file mode 100644
index 25f2a1a47..000000000
--- a/discovery/org.eclipse.tm.discovery.view/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = TM Service Discovery View
-providerName = Eclipse.org
diff --git a/discovery/org.eclipse.tm.discovery.view/plugin.xml b/discovery/org.eclipse.tm.discovery.view/plugin.xml
deleted file mode 100644
index edeb4f0bf..000000000
--- a/discovery/org.eclipse.tm.discovery.view/plugin.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-
-<!--
-Copyright (c) 2006 Symbian Software Ltd. 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:
- Javier Montalvo Orús (Symbian) - initial API and implementation
--->
-
-<plugin>
-
- <extension
- point="org.eclipse.ui.views">
- <category
- name="Service Discovery"
- id="org.eclipse.rse.discovery.category">
- </category>
- <view
- category="org.eclipse.rse.discovery.category"
- class="org.eclipse.tm.discovery.view.ServiceDiscoveryView"
- icon="icons/system_view.gif"
- id="org.eclipse.rse.discovery.view.MultipleView"
- name="Service Discovery Properties"/>
- </extension>
-
-</plugin>
diff --git a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/Activator.java b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/Activator.java
deleted file mode 100644
index f5311b740..000000000
--- a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.view;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rse.discovery.view"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/Messages.java b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/Messages.java
deleted file mode 100644
index 916ad2e13..000000000
--- a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/Messages.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.view;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.tm.discovery.view.messages"; //$NON-NLS-1$
-
- public static String ServiceDiscoveryView_ClearActionText;
-
- public static String ServiceDiscoveryView_ClearActionToolTipText;
-
- public static String ServiceDiscoveryView_DiscoveryActionText;
-
- public static String ServiceDiscoveryView_DiscoveryActionToolTipText;
-
- public static String ServiceDiscoveryView_KeyColumnLabel;
-
- public static String ServiceDiscoveryView_PropertiesTableTitle;
-
- public static String ServiceDiscoveryView_ProtocolErrorDialogMessage;
-
- public static String ServiceDiscoveryView_ProtocolErrorDialogTitle;
-
- public static String ServiceDiscoveryView_RefreshActionText;
-
- public static String ServiceDiscoveryView_RefreshActionToolTipText;
-
- public static String ServiceDiscoveryView_ServicesTreeTitle;
-
- public static String ServiceDiscoveryView_TransportErrorDialogMessage;
-
- public static String ServiceDiscoveryView_TransportErrorDialogTitle;
-
- public static String ServiceDiscoveryView_TransportNoAddressFoundDialogTitle;
-
- public static String ServiceDiscoveryView_TransportNoAddressFoundDialogTransport;
-
- public static String ServiceDiscoveryView_ValueColumnLabel;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/ServiceDiscoveryView.java b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/ServiceDiscoveryView.java
deleted file mode 100644
index 1506bb23a..000000000
--- a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/ServiceDiscoveryView.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.view;
-
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.ui.ViewerPane;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.tm.discovery.engine.ServiceDiscoveryEngine;
-import org.eclipse.tm.discovery.model.Service;
-import org.eclipse.tm.discovery.model.provider.ModelItemProviderAdapterFactory;
-import org.eclipse.tm.discovery.protocol.IProtocol;
-import org.eclipse.tm.discovery.protocol.ProtocolFactory;
-import org.eclipse.tm.discovery.transport.ITransport;
-import org.eclipse.tm.discovery.transport.TransportFactory;
-import org.eclipse.tm.discovery.wizard.ServiceDiscoveryWizardMainPage;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * View to display the Service Discovery model in a tree form.
- *
- * @see TransportFactory
- * @see ServiceDiscoveryEngine
- *
- */
-public class ServiceDiscoveryView extends ViewPart {
-
- //Tree widgets
- private TreeViewer treeViewer;
- private ViewerPane viewerPaneTree;
-
- // Table widgets
- private TableViewer tableViewer;
- private ViewerPane viewerPaneTable;
-
- private String query = null;
-
- private Table table;
-
- private Action discoveryAction;
- private Action refreshAction;
- private Action clearAction;
-
- private ITransport transport = null;
- private IProtocol protocol = null;
-
- private ServiceDiscoveryWizardMainPage serviceDiscoveryWizardMainPage;
- private Resource resource;
-
- private ServiceDiscoveryEngine serviceDiscoveryEngine = ServiceDiscoveryEngine.getServiceDiscoveryEngine();
-
-public void createPartControl(Composite parent) {
-
- resource = serviceDiscoveryEngine.getResource();
-
- List factories = new ArrayList();
- factories.add(new ResourceItemProviderAdapterFactory());
- factories.add(new ModelItemProviderAdapterFactory());
- factories.add(new ReflectiveItemProviderAdapterFactory());
-
- ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(
- factories);
-
- Composite comp = new Composite(parent, SWT.NULL);
-
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- comp.setLayout(gridLayout);
-
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.verticalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
-
- SashForm sashForm = new SashForm(comp,SWT.NULL );
- sashForm.setOrientation(SWT.HORIZONTAL);
-
- sashForm.setLayoutData(data);
-
- // TREE
-
- viewerPaneTree = new ViewerPane(getSite().getPage(), ServiceDiscoveryView.this) {
- public Viewer createViewer(Composite composite) {
- Tree tree = new Tree(composite, SWT.NULL);
- ContainerCheckedTreeViewer treeViewer = new ContainerCheckedTreeViewer(tree);
-
- return treeViewer;
- }
-
- public void requestActivation() {
- super.requestActivation();
- }
- };
-
- Composite sashComposite = new Composite(sashForm,SWT.BORDER);
- sashComposite.setLayout(new FillLayout());
-
- viewerPaneTree.createControl(sashComposite);
-
- treeViewer = (TreeViewer) viewerPaneTree.getViewer();
-
- treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
-
- treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
-
- viewerPaneTree.setTitle(Messages.ServiceDiscoveryView_ServicesTreeTitle, null);
-
- treeViewer.setInput(resource);
-
- new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
-
- ((ContainerCheckedTreeViewer) viewerPaneTree.getViewer()).addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- if(!event.getSelection().isEmpty())
- {
- EObject obj = (EObject)((IStructuredSelection) event.getSelection()).getFirstElement();
-
- if(obj instanceof Service)
- tableViewer.setInput(obj);
- }
- }
- });
-
-
- // TABLE
-
- viewerPaneTable =
- new ViewerPane(getSite().getPage(), ServiceDiscoveryView.this) {
- public Viewer createViewer(Composite composite) {
- return new TableViewer(composite);
- }
- };
-
- Composite c3 = new Composite(sashForm,SWT.BORDER);
- c3.setLayout(new FillLayout());
-
- viewerPaneTable.createControl(c3);
- tableViewer = (TableViewer)viewerPaneTable.getViewer();
-
- viewerPaneTable.setTitle(Messages.ServiceDiscoveryView_PropertiesTableTitle, null);
-
-
- table = tableViewer.getTable();
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
-
- TableColumn objectColumn = new TableColumn(table, SWT.NONE);
- layout.addColumnData(new ColumnWeightData(3, 100, true));
- objectColumn.setText(Messages.ServiceDiscoveryView_KeyColumnLabel);
- objectColumn.setResizable(true);
-
- TableColumn selfColumn = new TableColumn(table, SWT.NONE);
- layout.addColumnData(new ColumnWeightData(2, 100, true));
- selfColumn.setText(Messages.ServiceDiscoveryView_ValueColumnLabel);
- selfColumn.setResizable(true);
-
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
-
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
-
- makeActions();
-
- getViewSite().getActionBars().getToolBarManager().add(discoveryAction);
- getViewSite().getActionBars().getToolBarManager().add(new Separator());
- getViewSite().getActionBars().getToolBarManager().add(refreshAction);
- getViewSite().getActionBars().getToolBarManager().add(new Separator());
- getViewSite().getActionBars().getToolBarManager().add(clearAction);
-
- }
-
- private void update(String query, String address, String transportName, String protocolName, int timeOut)
- {
- this.query = query;
-
- //instantiate protocol and transport from factories (extensions)
-
- try {
- protocol = ProtocolFactory.getProtocol(protocolName);
- } catch (Exception e) {
- MessageDialog.openError(new Shell(), Messages.ServiceDiscoveryView_ProtocolErrorDialogTitle, Messages.ServiceDiscoveryView_ProtocolErrorDialogMessage+protocolName);
- }
-
- try {
- transport = TransportFactory.getTransport(transportName, address, timeOut);
- } catch (UnknownHostException e) {
- MessageDialog.openError(new Shell(), Messages.ServiceDiscoveryView_TransportNoAddressFoundDialogTitle, Messages.ServiceDiscoveryView_TransportNoAddressFoundDialogTransport+address);
- } catch (Exception e) {
- MessageDialog.openError(new Shell(), Messages.ServiceDiscoveryView_TransportErrorDialogTitle, Messages.ServiceDiscoveryView_TransportErrorDialogMessage+transportName);
- }
-
-
- if(protocol != null && transport != null)
- {
- serviceDiscoveryEngine.doServiceDiscovery(query, protocol,transport);
- }
- }
-
-
-
- private void makeActions() {
- discoveryAction = new Action() {
- public void run() {
-
- Wizard wizard = new Wizard(){
-
- public boolean performFinish() {
-
- update(serviceDiscoveryWizardMainPage.getQuery(),
- serviceDiscoveryWizardMainPage.getAddress(),
- serviceDiscoveryWizardMainPage.getTransport(),
- serviceDiscoveryWizardMainPage.getProtocol(),
- serviceDiscoveryWizardMainPage.getTimeOut());
-
- return true;
- }};
-
- serviceDiscoveryWizardMainPage = new ServiceDiscoveryWizardMainPage();
-
- wizard.addPage(serviceDiscoveryWizardMainPage);
-
- Shell shell = new Shell();
- WizardDialog dialog = new WizardDialog(shell, wizard);
-
- Rectangle absoluteRect = shell.getMonitor().getClientArea();
- Rectangle shellRect = shell.getBounds();
- shell.setLocation(((absoluteRect.width - shellRect.width) / 2), ((absoluteRect.height - shellRect.height) / 2));
-
- dialog.open();
- }
- };
-
- discoveryAction.setText(Messages.ServiceDiscoveryView_DiscoveryActionText);
- discoveryAction.setToolTipText(Messages.ServiceDiscoveryView_DiscoveryActionToolTipText);
- discoveryAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_NEW_WIZARD));
-
- refreshAction = new Action() {
- public void run() {
- if(query != null && transport != null && protocol != null)
- {
- serviceDiscoveryEngine.doServiceDiscovery(query, protocol,transport);
- }
- }
- };
- refreshAction.setText(Messages.ServiceDiscoveryView_RefreshActionText);
- refreshAction.setToolTipText(Messages.ServiceDiscoveryView_RefreshActionToolTipText);
- refreshAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
-
-
- clearAction = new Action() {
- public void run() {
- resource.getContents().clear();
- tableViewer.setInput(null);
- }
- };
- clearAction.setText(Messages.ServiceDiscoveryView_ClearActionText);
- clearAction.setToolTipText(Messages.ServiceDiscoveryView_ClearActionToolTipText);
- clearAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
-
- }
-
- public void setFocus() {
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/messages.properties b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/messages.properties
deleted file mode 100644
index 61dd8f10f..000000000
--- a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/discovery/view/messages.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-ServiceDiscoveryView_ServicesTreeTitle=\ \ \ \ \ \ \ \ Services
-ServiceDiscoveryView_PropertiesTableTitle=\ \ \ \ \ \ \ \ Properties
-ServiceDiscoveryView_KeyColumnLabel=Key
-ServiceDiscoveryView_ValueColumnLabel=Value
-ServiceDiscoveryView_ProtocolErrorDialogTitle=Error
-ServiceDiscoveryView_ProtocolErrorDialogMessage=Error loading protocol
-ServiceDiscoveryView_TransportNoAddressFoundDialogTitle=Error
-ServiceDiscoveryView_TransportNoAddressFoundDialogTransport=Error resolving address
-ServiceDiscoveryView_TransportErrorDialogTitle=Error
-ServiceDiscoveryView_TransportErrorDialogMessage=Error loading transport
-ServiceDiscoveryView_DiscoveryActionText=New Service Discovery
-ServiceDiscoveryView_DiscoveryActionToolTipText=New Service Discovery
-ServiceDiscoveryView_RefreshActionText=Refresh
-ServiceDiscoveryView_RefreshActionToolTipText=Refresh
-ServiceDiscoveryView_ClearActionText=Clear
-ServiceDiscoveryView_ClearActionToolTipText=Clear
diff --git a/discovery/org.eclipse.tm.discovery.wizard/.classpath b/discovery/org.eclipse.tm.discovery.wizard/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/discovery/org.eclipse.tm.discovery.wizard/.cvsignore b/discovery/org.eclipse.tm.discovery.wizard/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/discovery/org.eclipse.tm.discovery.wizard/.project b/discovery/org.eclipse.tm.discovery.wizard/.project
deleted file mode 100644
index e2bf0a62d..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.discovery.wizard</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.tm.discovery.wizard/.settings/org.eclipse.core.resources.prefs b/discovery/org.eclipse.tm.discovery.wizard/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/discovery/org.eclipse.tm.discovery.wizard/.settings/org.eclipse.jdt.core.prefs b/discovery/org.eclipse.tm.discovery.wizard/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/discovery/org.eclipse.tm.discovery.wizard/META-INF/MANIFEST.MF b/discovery/org.eclipse.tm.discovery.wizard/META-INF/MANIFEST.MF
deleted file mode 100644
index c092bdf32..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.discovery.wizard
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.tm.discovery.wizard.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.emf.ecore.edit;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.emf.edit.ui;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.core.runtime,
- org.eclipse.tm.discovery.engine,
- org.eclipse.tm.discovery.model,
- org.eclipse.tm.discovery.model.edit
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.tm.discovery.wizard
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/discovery/org.eclipse.tm.discovery.wizard/about.html b/discovery/org.eclipse.tm.discovery.wizard/about.html
deleted file mode 100644
index 460233046..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.wizard/build.properties b/discovery/org.eclipse.tm.discovery.wizard/build.properties
deleted file mode 100644
index 815bfc742..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- .
diff --git a/discovery/org.eclipse.tm.discovery.wizard/plugin.properties b/discovery/org.eclipse.tm.discovery.wizard/plugin.properties
deleted file mode 100644
index f247b20b6..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = TM Service Discovery Wizard
-providerName = Eclipse.org
diff --git a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/Activator.java b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/Activator.java
deleted file mode 100644
index 1821a523c..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.wizard;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tm.wizard.pages"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/Messages.java b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/Messages.java
deleted file mode 100644
index 47f30b9f9..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.wizard;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.tm.discovery.wizard.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java
deleted file mode 100644
index c41b2522f..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java
+++ /dev/null
@@ -1,591 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orus (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.wizard;
-
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.ui.ViewerPane;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.custom.TableEditor;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.ToolItem;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.tm.discovery.engine.ServiceDiscoveryEngine;
-import org.eclipse.tm.discovery.model.Device;
-import org.eclipse.tm.discovery.model.Pair;
-import org.eclipse.tm.discovery.model.Service;
-import org.eclipse.tm.discovery.model.ServiceType;
-import org.eclipse.tm.discovery.model.provider.ModelItemProviderAdapterFactory;
-import org.eclipse.tm.discovery.protocol.IProtocol;
-import org.eclipse.tm.discovery.protocol.ProtocolFactory;
-import org.eclipse.tm.discovery.transport.ITransport;
-import org.eclipse.tm.discovery.transport.TransportFactory;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
-
-/**
- * Wizard page providing the list of discovered services
- */
-
-public class ServiceDiscoveryWizardDisplayPage extends WizardPage {
-
- //tree widgets
- private TreeViewer treeViewer;
- private ViewerPane viewerPaneTree;
- private ViewerFilter filter;
-
- //table widgets
- private TableViewer tableViewer;
- private ViewerPane viewerPaneTable;
- private Table table;
- private TableEditor editor;
-
- private ComposedAdapterFactory adapterFactory;
-
- //button widgets
- private Button showAllButton;
-
- //static service discovery engine
- private final ServiceDiscoveryEngine serviceDiscoveryEngine = ServiceDiscoveryEngine.getServiceDiscoveryEngine();
-
- //service discovery settings
- private String query = null;
- private String address = null;
- private String transportName = null;
- private String protocolName = null;
- private int timeOut = 500;
-
- private Service lastSelectedService = null;
-
- private Vector supportedServicesType = new Vector();
-
- /**
- * Constructor for the wizard page performing and displayin the results of the service discovery
- *
- * @param query
- * Query for the service discovery action
- * @param address
- * Address of the target device
- * @param transportName
- * Name of the transport implementation to be used
- * @param protocolName
- * Name of the protocol implementation to be used
- * @param timeOut
- * Timeout to be used in the transport
- */
-
- public ServiceDiscoveryWizardDisplayPage(String query, String address, String transportName, String protocolName, int timeOut) {
- super("wizardPage2"); //$NON-NLS-1$
- setTitle(Messages.getString("ServiceDiscoveryWizardDisplayPage.WizardPageTitle")); //$NON-NLS-1$
- setDescription(Messages.getString("ServiceDiscoveryWizardDisplayPage.WizardPageDescription")); //$NON-NLS-1$
-
- //load all service id's from the extension point registry
- //this id will be used to filter the supported sytem types
-
- IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.rse.core","systemTypes"); //$NON-NLS-1$ //$NON-NLS-2$
- IConfigurationElement[] ce = ep.getConfigurationElements();
- for (int i = 0; i < ce.length; i++) {
- String id = ce[i].getAttribute("name"); //$NON-NLS-1$
- if(id!=null)
- supportedServicesType.add(id);
- }
-
- this.query = query;
- this.address = address;
- this.transportName = transportName;
- this.protocolName = protocolName;
- this.timeOut = timeOut;
-
- }
-
- /**
- * Refresh the contents of the service discovery model
- *
- * @param query
- * Query for the service discovery action
- * @param address
- * Address of the target device
- * @param transportName
- * Name of the transport implementation to be used
- * @param protocolName
- * Name of the protocol implementation to be used
- * @param timeOut
- * Timeout to be used in the transport
- */
- public void update(String query, String address, String transportName, String protocolName, int timeOut)
- {
- //update settings
- this.query = query;
- this.address = address;
- this.transportName = transportName;
- this.protocolName = protocolName;
- this.timeOut = timeOut;
-
- //instantiate protocol and transport from factories (extensions)
- //and perform the service discovery action
-
- IProtocol protocol = null;
- ITransport transport = null;
-
- try {
- protocol = ProtocolFactory.getProtocol(protocolName);
- } catch (Exception e) {
- MessageDialog.openError(new Shell(), Messages.getString("ServiceDiscoveryWizardDisplayPage.ProtocolErrorTitle"), Messages.getString("ServiceDiscoveryWizardDisplayPage.ProtocolErrorMessage")+protocolName); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- try {
- transport = TransportFactory.getTransport(transportName, address, timeOut);
- } catch (UnknownHostException e) {
- MessageDialog.openError(new Shell(), Messages.getString("ServiceDiscoveryWizardDisplayPage.TransportAddressNotFoundTitle"), Messages.getString("ServiceDiscoveryWizardDisplayPage.TransportAddressNotFoundMessage")+address); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (Exception e) {
- MessageDialog.openError(new Shell(), Messages.getString("ServiceDiscoveryWizardDisplayPage.TransportErrorTitle"), Messages.getString("ServiceDiscoveryWizardDisplayPage.TransportErrorMessage")+transportName); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if(protocol != null && transport != null)
- {
- try{
- serviceDiscoveryEngine.doServiceDiscovery(query, protocol,transport);
- }catch(Exception e){}
- }
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
-
- List factories = new ArrayList();
- factories.add(new ResourceItemProviderAdapterFactory());
- factories.add(new ModelItemProviderAdapterFactory());
- factories.add(new ReflectiveItemProviderAdapterFactory());
-
- adapterFactory = new ComposedAdapterFactory(factories);
-
- Composite comp = new Composite(parent, SWT.NULL);
-
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- comp.setLayout(gridLayout);
-
- //TOOLBAR
-
- createToolBar(comp);
-
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.verticalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
-
- SashForm sashForm = new SashForm(comp,SWT.NULL );
- sashForm.setOrientation(SWT.HORIZONTAL);
-
- sashForm.setLayoutData(data);
-
- // TREE
-
- Composite sashComposite = new Composite(sashForm,SWT.BORDER);
- sashComposite.setLayout(new FillLayout());
-
- createTree(sashComposite);
-
- // TABLE
-
- Composite innerComposite = new Composite(sashForm,SWT.BORDER);
- innerComposite.setLayout(new FillLayout());
-
- createTable(innerComposite);
-
-
- // SHOW ALL SERVICES BUTTON
-
- createShowAllButton(comp);
-
-
- update(query, address, transportName, protocolName, timeOut);
-
- setPageComplete(false);
-
- setControl(comp);
-
- }
-
- /*
- * ToolBar of the wizard page
- */
- private void createToolBar(Composite comp)
- {
- ToolBar toolBar = new ToolBar(comp,SWT.HORIZONTAL | SWT.FLAT | SWT.LEFT | SWT.WRAP );
-
- ToolItem refreshButton = new ToolItem(toolBar, SWT.NULL);
- refreshButton.addListener(SWT.Selection, new Listener(){
- public void handleEvent(Event event) {
- update(query, address, transportName, protocolName, timeOut);
- }
- });
-
- refreshButton.setToolTipText(Messages.getString("ServiceDiscoveryWizardDisplayPage.RefreshButtonToolTipText")); //$NON-NLS-1$
- refreshButton.setImage(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_REDO).createImage());
-
- ToolItem cleanButton = new ToolItem(toolBar, SWT.NULL);
- cleanButton.addListener(SWT.Selection, new Listener(){
- public void handleEvent(Event event) {
- serviceDiscoveryEngine.getResource().getContents().clear();
- tableViewer.setInput(null);
- }
- });
-
- cleanButton.setToolTipText(Messages.getString("ServiceDiscoveryWizardDisplayPage.ClearButtonToolTipText")); //$NON-NLS-1$
- cleanButton.setImage(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE).createImage());
-
- }
-
- /*
- * Tree of the wizard page
- */
- private void createTree(Composite comp)
- {
-
- viewerPaneTree = new ViewerPane( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart()) {
- public Viewer createViewer(Composite composite) {
- Tree tree = new Tree(composite, SWT.CHECK);
- ContainerCheckedTreeViewer treeViewer = new ContainerCheckedTreeViewer(tree);
-
- return treeViewer;
- }
-
- public void requestActivation() {
- super.requestActivation();
- }
- };
-
- viewerPaneTree.createControl(comp);
-
- treeViewer = (TreeViewer) viewerPaneTree.getViewer();
-
- treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
-
- treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
-
- viewerPaneTree.setTitle(Messages.getString("ServiceDiscoveryWizardDisplayPage.ServicesTreeTitle"), null); //$NON-NLS-1$
-
- treeViewer.setInput(serviceDiscoveryEngine.getResource());
-
- new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
-
- ((ContainerCheckedTreeViewer) viewerPaneTree.getViewer()).addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- if(!event.getSelection().isEmpty())
- {
- EObject obj = (EObject)((IStructuredSelection) event.getSelection()).getFirstElement();
-
- if(obj instanceof Service)
- {
- tableViewer.setInput(obj);
- lastSelectedService = (Service)obj;
- }
- }
- }
- });
-
-
- ((ContainerCheckedTreeViewer) viewerPaneTree.getViewer()).addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
-
- ContainerCheckedTreeViewer treeViewer = (ContainerCheckedTreeViewer) event.getSource();
-
- if(treeViewer.getCheckedElements().length > 0)
- setPageComplete(true);
- else
- setPageComplete(false);
-
- }
- });
-
- filter = new ViewerFilter(){
-
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- boolean supported = true;
- if(element instanceof ServiceType) {
- String serviceTypeName = ((ServiceType)element).getName();
- if(!supportedServicesType.contains(serviceTypeName))
- {
- supported = false;
- }
- }
- return supported;
-
- }};
-
- ((ContainerCheckedTreeViewer) viewerPaneTree.getViewer()).addFilter(filter);
-
- }
-
- /*
- * Table of the wizard page
- */
- private void createTable(Composite comp)
- {
- viewerPaneTable =
- new ViewerPane(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart()) {
- public Viewer createViewer(Composite composite) {
- return new TableViewer(composite);
- }
- };
-
- viewerPaneTable.createControl(comp);
- tableViewer = (TableViewer)viewerPaneTable.getViewer();
-
- viewerPaneTable.setTitle(Messages.getString("ServiceDiscoveryWizardDisplayPage.PropertiesTableTitle"), null); //$NON-NLS-1$
-
-
- table = tableViewer.getTable();
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
-
- TableColumn objectColumn = new TableColumn(table, SWT.NONE);
- layout.addColumnData(new ColumnWeightData(3, 100, true));
- objectColumn.setText(Messages.getString("ServiceDiscoveryWizardDisplayPage.KeyColumnLabel")); //$NON-NLS-1$
- objectColumn.setResizable(true);
-
- TableColumn selfColumn = new TableColumn(table, SWT.NONE);
- layout.addColumnData(new ColumnWeightData(2, 100, true));
- selfColumn.setText(Messages.getString("ServiceDiscoveryWizardDisplayPage.ValueColumnLabel")); //$NON-NLS-1$
- selfColumn.setResizable(true);
-
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
-
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
-
- editor = new TableEditor(table);
- editor.horizontalAlignment = SWT.LEFT;
- editor.grabHorizontal = true;
- table.addListener (SWT.MouseDown, new Listener () {
- public void handleEvent (Event event) {
- Rectangle clientArea = table.getClientArea ();
- Point pt = new Point (event.x, event.y);
- int index = table.getTopIndex ();
- while (index < table.getItemCount ()) {
- boolean visible = false;
- final TableItem item = table.getItem (index);
- for (int i=table.getColumnCount()-1; i<table.getColumnCount(); i++) {
- Rectangle rect = item.getBounds (i);
- if (rect.contains (pt)) {
- final int column = i;
- final Text text = new Text (table, SWT.NONE);
- Listener textListener = new Listener () {
- public void handleEvent (final Event e) {
- switch (e.type) {
- case SWT.FocusOut:
- item.setText (column, text.getText ());
- text.dispose ();
-
- //update model when focus out
- updatePairs(item.getText(0),item.getText(1));
- break;
-
- case SWT.Traverse:
- switch (e.detail) {
- case SWT.TRAVERSE_RETURN:
- item.setText (column, text.getText ());
-
- //update model when pressing return
- updatePairs(item.getText(0),item.getText(1));
- text.dispose ();
- e.doit = false;
- break;
- case SWT.TRAVERSE_ESCAPE:
- text.dispose ();
- e.doit = false;
- }
- break;
- }
- }
- };
- text.addListener (SWT.FocusOut, textListener);
- text.addListener (SWT.Traverse, textListener);
- editor.setEditor (text, item, i);
- text.setText (item.getText (i));
- text.selectAll ();
- text.setFocus ();
- return;
- }
- if (!visible && rect.intersects (clientArea)) {
- visible = true;
- }
- }
- if (!visible) return;
- index++;
- }
-
- }
- });
-
- }
-
- /*
- * Check box to show all services
- */
- private void createShowAllButton(Composite comp)
- {
- showAllButton = new Button(comp,SWT.CHECK);
- showAllButton.setText(Messages.getString("ServiceDiscoveryWizardDisplayPage.ShowAllServicesButtonText")); //$NON-NLS-1$
-
- showAllButton.addSelectionListener(new SelectionListener(){
-
- public void widgetDefaultSelected(SelectionEvent e) {}
-
- public void widgetSelected(SelectionEvent e) {
-
- Object src = e.getSource();
- if(((Button)src).getSelection())
- {
- ((ContainerCheckedTreeViewer) viewerPaneTree.getViewer()).removeFilter(filter);
- }
- else
- {
- ((ContainerCheckedTreeViewer) viewerPaneTree.getViewer()).addFilter(filter);
- }
- }
- });
- }
-
- /*
- * Update the service pairs information in the model
- */
- private void updatePairs(String key, String value)
- {
- Iterator pairsIterator = lastSelectedService.getPair().iterator();
- while(pairsIterator.hasNext())
- {
- Pair pair = (Pair)pairsIterator.next();
- if(pair.getKey().equals(key))
- {
- pair.setValue(value);
- }
- }
- }
-
- /**
- * Get the <code>Service<code> objects selected in the tree view from the specified host
- *
- * @param address
- * Address of the host which services are queried
- * @return
- * Vector containing the <code>Service<code> selected
- *
- * @see Service
- */
- public Vector getSelectedServices(String address)
- {
- Vector services = new Vector();
-
- Object[] checkedElements = ((ContainerCheckedTreeViewer) viewerPaneTree.getViewer()).getCheckedElements();
- for(int i=0; i<checkedElements.length; i++)
- {
- if(checkedElements[i] instanceof Service)
- {
- Service service = (Service)checkedElements[i];
- if(((Device)service.eContainer().eContainer()).getAddress().equalsIgnoreCase(address))
- {
- services.add(service);
- }
- }
- }
-
- return services;
- }
-
- /**
- * Get the addresses of the discovered hosts that have at least one service selected
- *
- * @return
- * String[] containing the addresses of the selected hosts
- */
- public String[] getAddresses()
- {
- Vector addressVector = new Vector();
-
- Object[] checkedElements = ((ContainerCheckedTreeViewer) viewerPaneTree.getViewer()).getCheckedElements();
- for(int i=0; i<checkedElements.length; i++)
- {
- if(checkedElements[i] instanceof Device)
- {
- addressVector.add(((Device)checkedElements[i]).getAddress());
- }
- }
-
- String[] addresses = new String[addressVector.size()];
- addressVector.copyInto(addresses);
-
- return addresses;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- return isPageComplete();
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/ServiceDiscoveryWizardMainPage.java b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/ServiceDiscoveryWizardMainPage.java
deleted file mode 100644
index 138c5683f..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/ServiceDiscoveryWizardMainPage.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.tm.discovery.wizard;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.discovery.protocol.ProtocolFactory;
-import org.eclipse.tm.discovery.transport.TransportFactory;
-
-/**
- * Main wizard page for the service discovery process.</br>
- * It provides a wizard page with text boxes and combo boxes to gather the following data:
- * <ul>
- * <li>Protocol
- * <li>Transport
- * <li>Query
- * <li>Timeout
- * </li>
- *
- * @see WizardPage
- */
-
-public class ServiceDiscoveryWizardMainPage extends WizardPage {
-
- // settings
- private int timeOut = 500; //ms
-
- // widgets
- private Combo queryCombo, transportCombo, protocolCombo;
- private Text addressText, timeOutText;
-
- /**
- * Wizard main page constructor
- */
- public ServiceDiscoveryWizardMainPage() {
- super("wizardPage1"); //$NON-NLS-1$
- setTitle(Messages.getString("ServiceDiscoveryWizardMainPage.WizardPageTitle")); //$NON-NLS-1$
- setDescription(Messages.getString("ServiceDiscoveryWizardMainPage.WizardPageDescription")); //$NON-NLS-1$
- setErrorMessage(Messages.getString("ServiceDiscoveryWizardMainPage.ProvideAddressError")); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
-
- FillLayout layout = new FillLayout();
- layout.type = SWT.VERTICAL;
-
- Composite comp = new Composite(parent,SWT.NULL);
- comp.setLayout(layout);
-
- new Label(comp,SWT.NULL).setText(Messages.getString("ServiceDiscoveryWizardMainPage.AddressLabel")); //$NON-NLS-1$
-
- addressText = new Text(comp, SWT.BORDER | SWT.SINGLE | SWT.WRAP);
- addressText.addModifyListener(new ModifyListener(){
-
- public void modifyText(ModifyEvent e) {
- if(((Text)e.getSource()).getText().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(Messages.getString("ServiceDiscoveryWizardMainPage.ProvideAddressError")); //$NON-NLS-1$
- setPageComplete(false);
- }
- else
- {
- setErrorMessage(null);
- setPageComplete(true);
- }
-
- }
- });
-
- new Label(comp,SWT.NULL).setText(Messages.getString("ServiceDiscoveryWizardMainPage.TransportLabel")); //$NON-NLS-1$
-
- transportCombo = new Combo(comp, SWT.READ_ONLY);
- transportCombo.setItems(TransportFactory.getTransportList());
- transportCombo.select(0);
-
- new Label(comp,SWT.NULL).setText(Messages.getString("ServiceDiscoveryWizardMainPage.ProtocolLabel")); //$NON-NLS-1$
-
- protocolCombo = new Combo(comp, SWT.READ_ONLY);
- protocolCombo.setItems(ProtocolFactory.getProtocolList());
- protocolCombo.select(0);
-
- protocolCombo.addSelectionListener(new SelectionListener(){
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- public void widgetSelected(SelectionEvent event) {
- String selectedProtocol = ((Combo)event.getSource()).getText();
-
- String[] queries = new String[]{};
- try {
- queries = ProtocolFactory.getQueryList(selectedProtocol);
- } catch (CoreException e) {}
- queryCombo.removeAll();
- queryCombo.setItems(queries);
- queryCombo.select(0);
- }
- });
-
-
- new Label(comp,SWT.NULL).setText(Messages.getString("ServiceDiscoveryWizardMainPage.DiscoveryQueryLabel")); //$NON-NLS-1$
-
- queryCombo = new Combo(comp, SWT.NONE);
- String[] queries = new String[]{};
- try {
- queries = ProtocolFactory.getQueryList(protocolCombo.getText());
- } catch (CoreException e) {}
- for (int i = 0; i < queries.length; i++) {
- queryCombo.add(queries[i]);
- }
- queryCombo.select(0);
-
-
- new Label(comp,SWT.NULL).setText(Messages.getString("ServiceDiscoveryWizardMainPage.TimeOutLabel")); //$NON-NLS-1$
-
- timeOutText = new Text(comp, SWT.BORDER | SWT.SINGLE | SWT.WRAP);
- timeOutText.setText(Messages.getString("ServiceDiscoveryWizardMainPage.TimeOutValue")); //$NON-NLS-1$
- timeOutText.redraw();
-
- setPageComplete(false);
-
- setControl(comp);
-
- }
-
- /**
- * Gets the service discovery command
- * @return command introduced in the settings window
- */
- public String getQuery() {
- return queryCombo.getText();
- }
-
- /**
- * Gets the service discovery address
- * @return address introduced in the settings window
- */
- public String getAddress() {
- return addressText.getText();
- }
-
- /**
- * Gets the service discovery transport
- * @return address introduced in the settings window
- */
- public String getTransport() {
- return transportCombo.getText();
- }
-
- /**
- * Gets the service discovery protocol
- * @return address introduced in the settings window
- */
- public String getProtocol() {
- return protocolCombo.getText();
- }
-
- /**
- * Gets the service discovery timeout
- * @return timeout introduced in the settings window
- */
- public int getTimeOut() {
-
- try{
- timeOut = Integer.parseInt(timeOutText.getText().trim());
- }catch(NumberFormatException e){}
-
- return timeOut;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- return isPageComplete();
- }
-
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/messages.properties b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/messages.properties
deleted file mode 100644
index dbd13c37e..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/discovery/wizard/messages.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-##################################################################################
-# Copyright (c) 2006 Symbian Software Ltd. 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:
-# Javier Montalvo Orús (Symbian) - initial API and implementation
-##################################################################################
-
-ServiceDiscoveryWizardDisplayPage.WizardPageTitle=Service Discovery
-ServiceDiscoveryWizardDisplayPage.WizardPageDescription=Select discovered services.
-ServiceDiscoveryWizardMainPage.AddressLabel=Address:
-ServiceDiscoveryWizardMainPage.TransportLabel=Transport:
-ServiceDiscoveryWizardMainPage.ProtocolLabel=Protocol:
-ServiceDiscoveryWizardMainPage.TimeOutLabel=Timeout (ms):
-ServiceDiscoveryWizardMainPage.TimeOutValue=500
-ServiceDiscoveryWizardDisplayPage.ProtocolErrorTitle=Error
-ServiceDiscoveryWizardMainPage.WizardPageDescription=Discover available services in the target device.
-ServiceDiscoveryWizardDisplayPage.ProtocolErrorMessage=Error loading protocol
-ServiceDiscoveryWizardDisplayPage.TransportAddressNotFoundTitle=Error
-ServiceDiscoveryWizardDisplayPage.TransportAddressNotFoundMessage=Error resolving address
-ServiceDiscoveryWizardDisplayPage.TransportErrorTitle=Error
-ServiceDiscoveryWizardDisplayPage.TransportErrorMessage=Error loading transport
-ServiceDiscoveryWizardDisplayPage.RefreshButtonToolTipText=Refresh
-ServiceDiscoveryWizardDisplayPage.ClearButtonToolTipText=Clear
-ServiceDiscoveryWizardDisplayPage.ServicesTreeTitle=\ \ \ \ \ \ \ \ Services
-ServiceDiscoveryWizardDisplayPage.PropertiesTableTitle=\ \ \ \ \ \ \ \ Properties
-ServiceDiscoveryWizardDisplayPage.KeyColumnLabel=Key
-ServiceDiscoveryWizardMainPage.WizardPageTitle=Service Discovery
-ServiceDiscoveryWizardDisplayPage.ValueColumnLabel=Value
-ServiceDiscoveryWizardMainPage.ProvideAddressError=Provide a valid address
-ServiceDiscoveryWizardMainPage.DiscoveryQueryLabel=Discovery Query:
-ServiceDiscoveryWizardDisplayPage.ShowAllServicesButtonText=Show all services
diff --git a/releng/readme.txt b/releng/readme.txt
deleted file mode 100644
index 0c5f44d24..000000000
--- a/releng/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Use the "releng" folder for projects containing instructions and scripts for
-building RSE.
-All projects should be named "org.eclipse.rse.build<.*>". \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/.classpath b/rse/doc/org.eclipse.dstore.doc.isv/.classpath
deleted file mode 100755
index 3f74547ab..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/.classpath
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/.cvsignore b/rse/doc/org.eclipse.dstore.doc.isv/.cvsignore
deleted file mode 100755
index 891527ed8..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-bin
-index
-build.xml
-javadoc.link.location
-temp.bin.log
-temp.options.txt
-temp.convert.txt
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/.project b/rse/doc/org.eclipse.dstore.doc.isv/.project
deleted file mode 100755
index b79ee8ec5..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.dstore.doc.isv</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/META-INF/MANIFEST.MF b/rse/doc/org.eclipse.dstore.doc.isv/META-INF/MANIFEST.MF
deleted file mode 100755
index bcec1336a..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,8 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.dstore.doc.isv; singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Localization: plugin
-Eclipse-LazyStart: false
-Bundle-Vendor: %providerName
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/aaa-how-to-add-things.txt b/rse/doc/org.eclipse.dstore.doc.isv/aaa-how-to-add-things.txt
deleted file mode 100755
index d73e72b8e..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/aaa-how-to-add-things.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Last revised July 27, 2006
-(This file is for information only; it is not included in the release.)
-
-See also
- http://wiki.eclipse.org/index.php/How_to_add_things_to_the_Eclipse_doc
-with the following exceptions:
-- platformOptions.txt -> options.txt
-- overview-platform.html -> /reference/misc/overview-rse.html
-
-To add new plug-ins you need to make changes in several places in
-this doc plug-in:
-
-1) options.txt
-- the plug-in's source folder(s) must be included on the -sourcepath
-- code of required plug-ins must be added on the -classpath (the JAR(s)for non-JARed plug-ins and <plugin>/@dot for JARed plug-ins
-- the API package names must be included in the (alphabetical) package list at the end of the file
-- note that the @sep@ token is replaced during build by the appropriate separator character for the build platform.
-
-2) buildDoc.xml
-- add a line in convertSchemaToHtml target to handle a new plug-ins extension point schemas
-
-Adding new extension points:
-
-1) reference/extension-points/index.html
-- add a line for each extension point
-
-2) topics_Reference.xml
-- add a line for each extension point
-- add a line for each API package \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/about.html b/rse/doc/org.eclipse.dstore.doc.isv/about.html
deleted file mode 100755
index 460233046..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/book.css b/rse/doc/org.eclipse.dstore.doc.isv/book.css
deleted file mode 100755
index 157414c6c..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/book.css
+++ /dev/null
@@ -1 +0,0 @@
-@import "../PRODUCT_PLUGIN/book.css";
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/build.properties b/rse/doc/org.eclipse.dstore.doc.isv/build.properties
deleted file mode 100755
index e69e2c016..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- book.css,\
- notices.html,\
- plugin.properties,\
- plugin.xml,\
- toc.html,\
- toc.xml,\
- guide/,\
- index/,\
- reference/,\
- provisional_api.html
-customBuildCallbacks = customBuildCallbacks.xml
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/buildDoc.xml b/rse/doc/org.eclipse.dstore.doc.isv/buildDoc.xml
deleted file mode 100755
index 4701988a4..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/buildDoc.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="RSE DStore ISV Doc Build" default="all" basedir=".">
-
- <property name="javadoc.link.location" value="${basedir}/javadoc.link.location"/>
-
- <target name="init">
- <available file="${basedir}/index" property="index.present" />
- <path id="path_bootclasspath">
- <fileset dir="${java.home}/lib">
- <include name="*.jar"/>
- </fileset>
- </path>
- <property name="bootclasspath" refid="path_bootclasspath"/>
- <condition property="safeBaseLocation"
- value="${baseLocation}"
- else="${eclipse.home}">
- <isset property="baseLocation"/>
- </condition>
- <delete dir="${javadoc.link.location}" />
- </target>
-
- <target name="computeClasspath" unless="javadoc.classpath">
- <!-- Construct the javadoc classpath and store it in a property. -->
- <echo level="info" message="Computing classpath ..."/>
-
- <!-- Add platform dependencies required by your plug-in here.
- Note that this pattern expects Eclipse to have
- been installed into the platform directory structure, as is
- the case during the build. -->
- <patternset id="platform.classpath.pattern">
- <include name="**/org.eclipse.core*.jar"/>
- <include name="**/org.eclipse.core*/**/*.jar"/>
- <include name="**/org.eclipse.ui*.jar"/>
- <include name="**/org.eclipse.ui*/**/*.jar"/>
- <include name="**/org.eclipse.osgi*.jar"/>
- <include name="**/org.eclipse.osgi*/**/*.jar"/>
- <include name="**/org.eclipse.equinox*.jar"/>
- <include name="**/org.eclipse.equinox*/**/*.jar"/>
- <include name="**/org.eclipse.jface*.jar"/>
- <include name="**/org.eclipse.jface*/**/*.jar"/>
- <include name="**/org.junit*.jar"/>
- <include name="**/org.junit*/**/*.jar"/>
- <include name="**/com.ibm.icu*.jar"/>
- </patternset>
-
- <pathconvert property="javadoc.classpath">
- <path>
- <fileset dir="${safeBaseLocation}">
- <patternset refid="platform.classpath.pattern"/>
- </fileset>
- </path>
- </pathconvert>
- <echo level="info" message="Done computing classpath."/>
- <echo level="debug" message="Bootclasspath is: ${bootclasspath}"/>
- <echo level="debug" message="Classpath is: ${javadoc.classpath}"/>
- </target>
-
- <target name="extractLinks">
- <mkdir dir="${javadoc.link.location}"/>
-
- <patternset id="package.list">
- <include name="**/package-list"/>
- </patternset>
-
- <!-- We only need the package-list files out of these -->
- <unzip dest="${javadoc.link.location}/platform/">
- <patternset refid="package.list"/>
- <fileset dir="${safeBaseLocation}/plugins">
- <include name="org.eclipse.platform.doc.isv*.jar"/>
- </fileset>
- </unzip>
- </target>
-
- <target name="all" depends="init" unless="index.present">
- <antcall target="convertSchemaToHtml" />
- <antcall target="generateJavadoc" />
- <antcall target="build.index" />
- </target>
-
- <target name="build.index" description="Builds search index for the plug-in: org.eclipse.dstore.doc.isv" if="eclipse.running">
- <help.buildHelpIndex manifest="${basedir}/plugin.xml" destination="${basedir}" />
- </target>
-
- <target name="convertSchemaToHtml" if="eclipse.running">
- <property name="dest" value="reference/extension-points" />
- <!--
- <record name="${basedir}/temp.convert.txt" action="start" />
- <pde.convertSchemaToHTML manifest="../org.eclipse.dstore.core/plugin.xml" destination="${dest}" />
- <record name="${basedir}/temp.convert.txt" action="stop" />
- -->
- </target>
-
- <target name="getJavadocPath">
- <available file="${java.home}/../bin/javadoc.exe" property="javadoc" value="${java.home}/../bin/javadoc.exe" />
- <available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" />
- <available file="/usr/bin/javadoc" property="javadoc" value="/usr/bin/javadoc" />
- </target>
-
- <target name="generateJavadoc" depends="getJavadocPath,extractLinks,computeClasspath" if="javadoc">
- <property name="optionsFile" value="temp.options.txt" />
- <copy file="options.txt" tofile="${optionsFile}" overwrite="true" />
-
- <condition property="argsListDelimiter" value=":">
- <os family="unix" />
- </condition>
- <condition property="argsListDelimiter" value=";">
- <os family="windows" />
- </condition>
-
- <replaceregexp file="${basedir}/${optionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" />
- <replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}${argsListDelimiter}${javadoc.classpath}" />
- <replace file="${basedir}/${optionsFile}" token="@baseLocation@" value="${safeBaseLocation}" />
- <replace file="${basedir}/${optionsFile}" token="@javadoc.link.location@" value="${javadoc.link.location}" />
-
- <!--scrub isv plugin directories of any preexisting api doc content-->
- <delete dir="reference/api" />
- <mkdir dir="reference/api" />
-
- <echo message="sep = ${argsListDelimiter}"/>
- <echo message="javadoc = ${javadoc}"/>
- <exec dir="." executable="${javadoc}" output="temp.bin.log">
- <arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
- </exec>
- </target>
-
-</project>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/customBuildCallbacks.xml b/rse/doc/org.eclipse.dstore.doc.isv/customBuildCallbacks.xml
deleted file mode 100644
index e457715e4..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/customBuildCallbacks.xml
+++ /dev/null
@@ -1,157 +0,0 @@
-<!-- ===================================================================== -->
-<!-- Custom targets called from a project's generated build.xml -->
-<!-- Set customBuildCallbacks=<path/to/this/file> in your build.properties.-->
-<!-- ===================================================================== -->
-<project name="Build specific targets and properties" default="noDefault">
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="This file must be called with explicit targets" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target build.jars -->
- <!-- Available parameters : -->
- <!-- build.result.folder - folder to contain the build results -->
- <!-- ===================================================================== -->
- <target name="pre.build.jars">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target build.jars -->
- <!-- Available parameters : -->
- <!-- build.result.folder - folder to contain the build results -->
- <!-- ===================================================================== -->
- <target name="post.build.jars">
- <ant antfile="buildDoc.xml" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target build.sources -->
- <!-- Available parameters : -->
- <!-- build.result.folder - folder to contain the build results -->
- <!-- ===================================================================== -->
- <target name="pre.build.sources">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target build.sources -->
- <!-- Available parameters : -->
- <!-- build.result.folder - folder to contain the build results -->
- <!-- ===================================================================== -->
- <target name="post.build.sources">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the compilation target <name> -->
- <!-- Substitute "name" with the name of the compilation target, eg @dot -->
- <!-- Available parameters : -->
- <!-- source.foldern : n = 1 ... N, the source folders -->
- <!-- target.folder : where the results of the compilation go -->
- <!-- <name>.classpath : name = name of the compilation target. A -->
- <!-- reference to the classpath structure. -->
- <!-- ===================================================================== -->
- <!--
- <target name="pre.compileTarget.jar">
- </target>
- -->
-
- <!-- ===================================================================== -->
- <!-- Steps to do after compilation but before jaring -->
- <!-- Substitute "name" with the name of the compilation target, eg @dot -->
- <!-- Available parameters : -->
- <!-- source.foldern : n = 1 ... N, the source folders -->
- <!-- target.folder : where the results of the compilation go -->
- <!-- <name>.classpath : name = name of the compilation target. A -->
- <!-- reference to the classpath structure. -->
- <!-- ===================================================================== -->
- <!--
- <target name="post.compile.compileTarget.jar">
- </target>
- -->
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the compilation target <name> -->
- <!-- Substitute "name" with the name of the compilation target, eg @dot -->
- <!-- Available parameters : -->
- <!-- jar.location - the location of the compilation results -->
- <!-- <name>.classpath : name = name of the compilation target. A -->
- <!-- reference to the classpath structure. -->
- <!-- ===================================================================== -->
- <!--
- <target name="post.compileTarget.jar">
- </target>
- -->
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target gather.bin.parts -->
- <!-- Available parameters : -->
- <!-- base.dir - root of the project -->
- <!-- build.result.folder - folder containing the build results -->
- <!-- target.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="pre.gather.bin.parts">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target gather.bin.parts -->
- <!-- Available parameters : -->
- <!-- base.dir - root of the project -->
- <!-- build.result.folder - folder containing the build results -->
- <!-- target.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="post.gather.bin.parts">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target gather.sources -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="pre.gather.sources">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target gather.sources -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="post.gather.sources">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target gather.logs -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="pre.gather.logs">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target gather.logs -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="post.gather.logs">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target clean -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="pre.clean">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target clean -->
- <!-- Available parameters : -->
- <!-- plugin.destination - final destination of the build -->
- <!-- build.result.folder - results of the compilation -->
- <!-- temp.folder - temporary folder -->
- <!-- ===================================================================== -->
- <target name="post.clean">
- </target>
-</project> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/Artifacts.html b/rse/doc/org.eclipse.dstore.doc.isv/guide/Artifacts.html
deleted file mode 100755
index 3b35774b0..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/Artifacts.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>RSE Artifacts</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body>
-<h1>DataStore Artifacts</h1>
-<p>With the DataStore, you interface the following artifacts:</p>
-<ul>
-<li><A href="#clientconnection">Client Connection</A></li>
-<li><A href="#datastore">DataStore</A></li>
-<li><A href="#dataelement">DataElement</A></li>
-<li><A href="#miner">Miner</A></li>
-</ul>
-<p>All the classes and interfaces mentioned here are defined in the <samp>org.eclipse.dstore.core</samp> plugin.
-
-<h2><A name="clientconnection">Client Connection</A></h2>
-<p>
-The <b>ClientConnection</b> class is used for establishing a DataStore connection. This class provides the
-means to instantiate a client DataStore and connect to a server DataStore on a specified host running under a
-specified port. The connection to the server DataStore may either be made directly or a startup
-negotiation may be made with a remote daemon before connecting to the server. This class also provides the means
-for disconnecting from the DataStore.
-</p>
-
-<h2><A name="datastore">DataStore</A></h2>
-<p>
-The <b>DataStore</b> class is the heart of the DataStore communications framework. An instance of a DataStore contains a tree
-of <a href="#dataelement">DataElements</a>. This tree can be referred to as the <i>DataStore repository</i> because
-it consists of all the schema information and data content used. Any type of object or relationship defined, command definition or
-piece of data that needs to be communicated between the client and server are stored in the <i>DataStore repository</i>.
-The DataStore class can be used for finding, creating and deleting DataElements and for communicating commands
-to <a href="#miner">miner</a>. The DataStore class encapsulates all remote synchronizations between the client and the
-server via its <code>command</code> and <code>refresh</code> APIs.
-</p>
-
-<h2><A name="dataelement">DataElement</A></h2>
-<p>
-The <b>DataElement</b> is the unit of information in a DataStore repository. Each DataElement has a set of attributes that describe
-the object it represents and is related to other DataElements by containing other DataElements. DataElements represent both the meaning
-of data as well as the data itself.
-</p>
-<p>
-For more information about DataElements, see the section, <a href="DataElements.html">DataElements and the DataStore model</a>.
-</p>
-
-<h2><A name="miner">Miner</A></h2>
-<p>
-A <b>Miner</b> is an extension point to the DataStore. Miners are classes, residing on the server-side, that implement a common
-interface used by the DataStore for communication information between the DataStore and the tools.
-</p>
-<p>
-For more information about Miners, see the section, <a href="Miners.html">Miners</a>.
-</p>
-</body>
-</html>
-
-
-
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/ClientSide.html b/rse/doc/org.eclipse.dstore.doc.isv/guide/ClientSide.html
deleted file mode 100755
index c2fb661a7..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/ClientSide.html
+++ /dev/null
@@ -1,171 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>Tutorials</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Communicating with the Server-side</h1>
-
-<h2>Connecting to a Local DataStore</h2>
-<p>
-If you're writing an RSE subsystem to connect to a local standalone DataStore, the following needs
-to be done during the connect:
-</p>
-
-<font color='#4444CC'>
-<pre>
- ...
- ClientConnection clientConnection = new ClientConnection(connectionName);
-
- // initialize the local datastore
- clientConnection.localConnect();
-
- DataStore dataStore = clientConnection.getDataStore();
-
- // specify miners to load
- dataStore.addMinersLocation("."); // initializes the default miners
-
- // initialize miners
- dataStore.getSchema();
- dataStore.initMiners();
- ...
-
-</pre>
-</font>
-
-<h2>Connecting to a Remote DataStore</h2>
-<p>
-If you're writing an RSE subsystem to connect to a remote DataStore, the only difference
-from the local scenario is that <code>connect</code> is called rather than <code>localConnect</code>.
-</p>
-
-<font color='#4444CC'>
-<pre>
- ...
- ClientConnection clientConnection = new ClientConnection(connectionName);
-
- // prepare connection
- clientConnection.setHost(hostName);
- clientConnection.setPort(port);
-
- // connect
- clientConnection.connect(ticket);
-
- DataStore dataStore = clientConnection.getDataStore();
-
- // specify miners to load
- dataStore.addMinersLocation("."); // initializes the default miners
-
- // initialize miners
- dataStore.getSchema();
- dataStore.initMiners();
- ...
-
-</pre>
-</font>
-
-<h2>Loading an Additional DataStore Miner</h2>
-<p>
-If the new miner has been registered via the default minerFile.dat file, then
-no further steps are required to load it. Otherwise, after the subsystem is
-connected to the remote DataStore, you need to tell the DataStore to load the
-miner as follows.
-</p>
-
-<font color='#4444CC'>
-<pre>
- ...
- dataStore.addMinersLocation(location);
- dataStore.getSchema();
- ...
-</pre>
-</font>
-
-<p>
-This tells the host DataStore to instantiate and initialize all miners listed in
-the specified minerFile.dat file.
-</p>
-
-
-<h2>Sending Commands to a Miner</h2>
-<p>
-To send a command to a miner, the required <a href="DataElements.html#commanddescriptor">command descriptor</a> must first be obtained
-using the method <code>DataStore.localDescriptorQuery</code>. The method <code>DataStore.command</code> is then called with command
-descriptor and the subject of the command. For example, a query might need to be called on the miner as shown in the following code segment.
-</p>
-
-<font color='#4444CC'>
-<pre>
- ...
- // the UI model object
- MyRemoteObject obj = getMyRemoteObject();
-
- // get the corresponding DataElement for this object
- DataElement deObj = obj.getDataElement();
-
- // get the DataStore from the DataElement
- DataStore ds = deObj.getDataStore();
-
- // get the query command descriptor for the subject
- DataElement queryCmd = ds.localDescriptorQuery(deObj.getDescriptor(), "MY_QUERY_COMMAND");
-
- // send the command
- DataElement status = ds.command(queryCmd, deObj, true);
- ...
-</pre>
-</font>
-
-<h2>Receiving Data from a Miner</h2>
-<p>
-After a command is sent to a miner, you might want to receive information that the miner produced in response to the command.
-DataStore commands and responses are sent asynchronously, much like events. On the server, the
-<a href="Communications.html#servercommandhandler">Server Command Handler</a> reacts to incoming commands by calling the <code>handleCommand</code>
-method on the appropriate miner. For the client, the <a href="Communications.html#clientcommandhandler">Client Command Handler</a>
-reacts to incoming responses by firing domain notifications. In order to receive miner responses, asynchronously,
-you need to implement a DataStore domain listener.
-</p>
-<p>
-A domain listener implements the IDomainListener interface. An instance of an IDomainListener needs to be added to the DataStore domain listener
-list. The following is what a simple domain listener looks like:
-</p>
-
-<font color='#4444CC'>
-<pre>
- public class MyDomainListener implements IDomainListener
- {
- public boolean listeningTo(DomainEvent e)
- {
- // check if we care about this event
- ...
- }
-
- public void domainChanged(DomainEvent e)
- {
- // get the data from this event
- ...
- }
- }
-</pre>
-</font>
-
-<p>
-A domain listener may either listen for the duration of a DataStore session or may be transient, to be used for
-a receiving data from a particular command. For example, after calling <code>DataStore.command</code>, which returns
-the status of the command instance, a listener can be added as follows:
-</p>
-<font color='#4444CC'>
-<pre>
- ...
- MyDomainListener listener = new MyDomainListener(shell);
- `ds.getDomainNotifier().addDomainListener(listener);
- listener.setStatus(status);
- ...
-</pre>
-</font>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/Communications.html b/rse/doc/org.eclipse.dstore.doc.isv/guide/Communications.html
deleted file mode 100755
index 3cad8e804..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/Communications.html
+++ /dev/null
@@ -1,159 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>RSE Model</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body>
-<h1>DataStore Communications</h1>
-<p>
-Communication in the DataStore is asynchronous and symmetric. Commands sent and results received are all represented in the same form,
-<a href="DataElements.html">DataElements</a> and the underlying means of transmitting this information is basically the same for each.
-When a command is issued, it gets queued and then later routed to the appropriate <b>miner</b> where it gets executed.
-A miner returns results by updating the DataStore repository with information. Like commands, these
-results are queued and then later notifications are sent out to any listener that requires the results.
-</p>
-<p>
-The asynchronous routing of data and commands between a client and the tools is made possible by threads, called <i>handlers</i>. There are two
-types of handlers - a <a href="#commandhandlers">Command Handler</a> and an <a href="#updatehandlers">Update Handler</a>. Each handler thread contains a queue
-of data that needs to be transmitted and each periodically communicates the data contained in it's queue.
-</p>
-
-<h2><a name="commandhandlers">Command Handlers</a></h2>
-<p>
-The job of the Command Handler is to route commands to the miners. There are two types of command handlers.
-</p>
-
-<h3><a name="clientcommandhandler">Client Command Handler</a></h3>
-<p>
-The <b>Client Command Handler</b> is a command handler responsible for transmitting its queue of DataStore commands across a network to
-the server DataStore. This handler encapsulates the communication of DataStore client data to a DataStore server. The Client Command Handler
-interfaces the DataStore communication layer, where its queue of commands gets serialized into XML before being sent over a TCP/IP socket
-to the server.
-</p>
-
-<h3><a name="servercommandhandler">Server Command Handler</a></h3>
-The <b>Server Command Handler</b> is a command handler responsible for directly routing the DataStore commands in its queue to the appropriate
-miner(s) depending on the command.
-
-<h2><a name="updatehandlers">Update Handlers</a></h2>
-<p>
-The job of the Update Handler is to notify the client that some results have been received or changed. There are two types of
-update handlers.
-</p>
-
-<h3><a name="clientupdatehandler">Client Update Handler</a></h3>
-<p>
-The <b>Client Update Handler</b> is an update handler responsible for sending out domain notifications for each unit of data
-contained in its queue.
-</p>
-
-<h3><a name="serverupdatehandler">Server Update Handler</a></h3>
-<p>
-The <b>Server Update Handler</b> is an update handler responsible for transmitting its queue of DataStore objects across a network to
-the client DataStore. This handler encapsulates the communication of DataStore server data to a DataStore client. The Server Update Handler
-interfaces the DataStore communication layer, where its queue of data gets serialized into XML before being sent over a TCP/IP socket
-to the client.
-</p>
-
-<p>
-Communication between a client and tools may either occur locally and remotely depending on how the
-user chooses to connect to the DataStore. The client interface and the server tooling are the same regardless of
-whether the DataStore is standalone or client/server based. The communication differences are encapsulated by
-the DataStore handlers.
-</p>
-
-<h2>Standalone Local DataStore</h2>
-<p>
-Locally, the DataStore may be used standalone such that all communication through the DataStore goes directly to between the <b>miners</b>
-and the client, all running within the same process. In this case, there is only a single DataStore and no communication goes
-over the network. For its handlers, the local DataStore uses a <b>Client Update Handler</b> and a <b>Server Command Handler</b>.
-</p>
-
-<img src="images/local.jpg" alt="Local DataStore Eclipse" border="0">
-
-<p>
-In the above dialog, the path of commands to the tools is shown with solid lines, while the path of data to client is shown with dotted lines.
-
-<ol>
-<li>
-In RSE, a subsystem calls a DataStore command API to issue a command.
-</li>
-<li>
-The command is then queued in the <b>Server Command Handler</b>.
-</li>
-<li>
-The Server Command Handler gets the command from the queue, determines which miner should run it, and passes the command into that miner.
-</li>
-<li>The miner then executes the command and produces results by calling DataStore object creation methods. When the resulting objects are created,
-the DataStore queues them in the <b>Client Update Handler</b>.
-</li>
-<li>
-The Client Update Handler gets the data from the queue and sends out a domain notification for each data object in the queue.
-</li>
-<li>
-A domain listener for the RSE subsystem receives the notification and then uses the result data to update the UI.
-</li>
-</ol>
-</p>
-
-<h2>Client/Server DataStore</h2>
-<p>
-In the remote case, a DataStore client is part of the Eclipse process, while the DataStore server is run
-in a separate process on a remote host. Information is transferred between the two DataStore repositories over
-a TCP/IP socket. Any data that is created or changed on either the client or the server is asynchronously
-propagated over to the other side via serialization/deserialization of the delta.
-
-Like in the standalone case, the client DataStore uses a <b>Client Update Handler</b>, but instead of using
-a Server Command Handler it uses a <b>Client Command Handler</b>. The server DataStore uses a <b>Server Update Handler</b>
-and a <b>Server Command Handler</b>.
-</p>
-
-<img src="images/remote.jpg" alt="Remote DataStore Eclipse" border="0">
-
-<ol>
-<li>
-In RSE, a subsystem calls a DataStore command API to issue a command.
-</li>
-<li>
-The command is then queued in the <b>Client Comamnd Handler</b>.
-</li>
-<li>
-The Client Command Handler gets the command from the queue and, via the communication layer, transmits it to the server DataStore.
-The communication layer on the client serializes the DataStore respository objects that make up the command and sends that
-serialization over a socket to the server.
-</li>
-<li>
-The communication layer on the server deserializes the socket data and creates DataStore objects in the DataStore repository.
-Those command objects are added it to the <b>Server Command Handler</b> queue.
-</li>
-<li>
-The Server Command Handler gets the command from the queue, determines which miner should run it, and passes the command into that miner.
-</li>
-<li>
-The miner then executes the command and produces results by calling DataStore object creation methods. When the resulting objects are created,
-the DataStore queues them in the <b>Server Update Handler</b>.
-</li>
-<li>
-The Server Update Handler gets the results from the queue and transmits them, via the DataStore communicate layer, to the client DataStore.
-The communication layer on the server serializes the DataStore objects from the queue and sends that serialization over a socket
-to the client.
-</li>
-<li>
-The communication layer on the client deserializes the socket data and creates DataStore objects in the DataStore respository.
-Those results are added to the <b>Client Update Handler</b> queue.
-</li>
-<li>
-The Client Update Handler gets the data from the queue and sends out a domain notification for each data object in the queue.
-</li>
-<li>
-A domain listener for the RSE subsystem receives the notification and then uses the result data to update the UI.
-</li>
-</ol>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/DataElements.html b/rse/doc/org.eclipse.dstore.doc.isv/guide/DataElements.html
deleted file mode 100755
index 50eb1468e..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/DataElements.html
+++ /dev/null
@@ -1,206 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>RSE Model</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body>
-<h1><a name="dataelements">DataElements</a></h1>
-<p>
-All information in the DataStore repository is stored in the form of <b>DataElements</b>. DataElements are objects
-that have attributes and may contain other DataElements. The attributes of a DataElement are stored as an array of
-strings. A particular attribute is retrieved by calling <code>getAttribute(</code><i>attribute index</i><code>)</code>.
-A particular attribute is set by calling <code>setAttribute(</code><i>attribute index</i><code>, </code><i>attribute value</i><code>)</code>.
-The attribute indices that can be used are as follows:
-<table>
-<tr><td><b>Attribute</b></td><td><b>Description</b></td></tr>
-<tr><td><code>A_TYPE</code></td><td>Attribute indicating the type of object. The type can be used to indicate the type of an instance of data, a descriptor, a relationship or a commnad.</td></tr>
-<tr><td><code>A_NAME</code></td><td>Attribute indicating the name of object.</td></tr>
-<tr><td><code>A_VALUE</code></td><td>Attribute indicating the more information about that object</td></tr>
-<tr><td><code>A_SOURCE</code></td><td>Attribute indicating source information about an object, if applicable</td></tr>
-<tr><td><code>A_REF_TYPE</code></td><td>Attribute indicating whether the object is a normal object ("value"), a spirit ("spirit"), or a reference to another DataElement ("reference"). In the DataStore, a reference to another DataElement is represented with a DataElement. For more information on spirit elements, see <a href="MemoryManagement.html">Memory Management in DataStore</a> </td></tr>
-<tr><td><code>A_ID</code></td><td>The unique ID of a DataElement.</td></tr>.
-</table>
-</p>
-<p>
-Rather than representing different types of objects as different classes, the type attribute of a DataElement
-indicates its type. There are two general categories of DataElements. There are schema elements, <A href="#descriptors">descriptors</a>, and instances of
-those schema elements, <a href="#instances">instances</a>.
-</p>
-
-<h2><a name="descriptors">Descriptors</a></h2>
-<p>
-A descriptor is a DataElement that describes some type of object. The <code>A_TYPE</code> attribute of a descriptor indicates what type of
-descriptor it is. The <code>A_NAME</code> attribute of a descriptor identifies the type that the descriptor describes.
-</p>
-<p>
-A descriptor may be of one of the following types:
-</p>
-<table>
-<tr><td><code>T_OBJECT_DESCRIPTOR</code></td><td>Describes a type of object</td></tr>
-<tr><td><code>T_RELATION_DESCRIPTOR</code></td><td>Describes a type of relationship that may exist between two DataElements.</td></tr>
-<tr><td><code>T_COMMAND_DESCRIPTOR</code></td><td>Describes a type of command</td></tr>
-</table>
-
-<h3><a name="objectdescriptors">Object Descriptors</a></h3>
-<p>
-<b>Object descriptors</b> describe the different types of data that can be represented in the DataStore repository. Object descriptors
-can describe types of object instances as well as other types of object descriptors. Each object descriptor is related to other object,
-relationship and command descriptors.
-</p>
-
-<h3><a name="relationdescriptors">Relation Descriptors</a></h3>
-<p>
-<b>Relation descriptors</b> describe the different types of relationships that can be represented in the DataStore repository. Relation
-descriptors describe types of relationships between object instances, object descriptors, command instances and command descriptors.
-</p>
-
-<h3><a name="commanddescriptors">Command Descriptors</a></h3>
-<p>
-<b>Command descriptors</b> describe the different types of commands that can be executed on an object in the DataStore repository.
-In the DataStore schema, object descriptors are related to command descriptors to indicate that an object instance of a certain type can
-have the described command run on it. Command descriptors are always contained by the object descriptors they are associated with. The
-<code>A_SOURCE</code> attribute of a command descriptor indicates which miner(s) may execute an instance of such a command.
-</p>
-
-<p>
-These three types of objects are used to define the DataStore schema. Instances of relation descriptors are used to define
-relationships between descriptors in the schema.
-</p>
-
-
-<h2><a name="instances">Instances</a></h2>
-<p>
-An instance object is a DataElement that is an instance of a descriptor. An instance may either by an object, a
-relation or a command. An instance uses its descriptor's <code>A_NAME</code> attribute as its <code>A_TYPE</code> attribute.
-</p>
-
-<h3><a name="objects">Objects</a></h3>
-<p>
-<b>Objects</b> are instances of <b>object descriptors</b>. Objects are used to the represent the external or internal
-entities that are being interacted with. An instance object can be related in a certain way to another type of
-instance object if its object descriptor has the same kind of relationship to the other object's object descriptor.
-An instance object may be associated with a particular command if its object descriptor is associated with the command descriptor
-for that command.
-</p>
-
-<h3><a name="relations">Relations</a></h3>
-<p>
-<b>Relations</b> are instances of <b>relation descriptors</b>. A relation is really a typed reference to another object. Relations
-may exist from one object to another if the schema indicates that the object descriptor for the first object may have a relationship
-of that type to the other object's descriptor. Relations are used to describe the relationship between two instances, the
-relationship between two descriptors and the relationship between an instance and a descriptor. A relation is able to reference
-another element by storing the other element's <code>A_ID</code> attribute in its <code>A_SOURCE</code> attribute. If a relation object
-needs to be dereferenced, it uses this attribute to query the DataStore for the object being referenced.
-</p>
-<p>
-A relation is typically represented by having an instance object DataElement contain a relation DataElement.
-There are two types of relationships between elements that are implicit. These are the <i>contains</i> and
-the <i>parent of</i> relationships. If an element is directly contained within another element, the
-relationship between those two elements is implied to be <i>contains/parent of</i> relationships.
-</p>
-
-<h3><a name="commands">Commands</a></h3>
-<p>
-<b>Commands</b> are instances of <b>command descriptors</b>. A command is always associated with an instance object such that
-the command is to be performed on that object. The object associated with a command is referred to as the <i>subject</i> of
-the command. Only a command that has a command descriptor that is related to the object descriptor of the subject may be
-constructed. A command object is constructed when the DataStore method <code>command()</code> is called. The command is
-created with a reference to the subject, an optional set of arguments, also instance objects, and a status object instance, used
-to indicate the state of the command. The tree of elements for a command is communicated, via the DataStore comm layer, to
-the appropriate miner(s), where it is interpreted and executed.
-</p>
-<p>
-The structure of a command looks like the following:
-</p>
-<ul>
-<li>Command
- <ul>
- <li>subject - a reference to the instance that this command applies to</li>
- <li>arg 1 - an optional argument represented as a DataElement</li>
- <li>...</li>
- <li>arg n - an optional argument represented as a DataElement</li>
- <li>status - element that represents the current status of a command</li>
- </ul>
-</li>
-</ul>
-
-<p>
-As an example, suppose the DataStore is being used for browsing a filesystem. The filesystem entities and how to interact
-with the filesystem needs to be defined in the schema. The following descriptors could be used to describe this.
-</p>
-
-<ul>
-<li>Object Descriptors
- <ul>
- <li>"generic file object" - describes a generic file system object</li>
- <li>"file" - describes a file object</li>
- <li>"folder" - describes a folder object</li>
- </ul>
-</li>
-<li>Relation Descriptors
- <ul>
- <li>"contains" - represents the containment relationship between two objects</li>
- <li>"abstracts" - represents a derives relationship between two object descriptors</li>
- <li>"abstracted by" - represents an inherits relationship between two object descriptors</li>
- </ul>
-</li>
-<li>Command Descriptors
- <ul>
- <li>"query" - a command to list the contents of a folder</li>
- <li>"rename" - a command to rename a file or folder</li>
- <li>"delete" - a command to delete a file or folder</li>
- <li>"create" - a command to create a new file or folder from an existing folder</li>
- </ul>
-</li>
-</ul>
-
-<p>
-Now that all the required descriptors are defined, relations between descriptors are needed. Note that the
-symbol "-&gt;" implies a "contains" relationship and "IO()" implies an instance of a specified descriptor.
-</p>
-
-<ul>
-<li>"generic file object"
- <ul>
- <li>-&gt;"rename"</li>
- <li>-&gt;"delete"</li>
- <li>-&gt;IO("abstracts")-&gt;"folder"</li>
- <li>-&gt;IO("abstracts")-&gt;"file"</li>
- </ul>
-</li>
-<li>"folder"
- <ul>
- <li>-&gt;"create"</li>
- <li>-&gt;"query"</li>
- <li>-&gt;IO("abstracted by")-&gt;"generic file object"</li>
- <li>-&gt;IO("contains")-&gt;"generic file object"</li>
- </ul>
-</li>
-<li>"file"
- <ul>
- <li>-&gt;IO("abstracted by")-&gt;"generic file object"</li>
- </ul>
-</li>
-</ul>
-
-<p>
-DataStore schemas are created by the DataStore <b>miners</b>. Each tool contributes it's
-own schema to the DataStore schema, referencing descriptors of other schemas, such
-that one tool can contribute to another tool. All the command descriptors that are
-contributed by a miner are expected to be handled by the contributing miner. Whenever
-a miner creates a new command descriptor, the <code>A_SOURCE</code> attribute indicates
-to the DataStore that an instance of that command should be routed to that miner when
-it's issued.
-<p>
-
-<p>
-See the section, <a href="Miners.html">Miners</a> to find out how miners contribute schemas
-and execute commands.
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/Extending.html b/rse/doc/org.eclipse.dstore.doc.isv/guide/Extending.html
deleted file mode 100755
index a136e4b6d..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/Extending.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>Tutorials</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Extending and Using the DataStore</h1>
-<p>
-This section describes the basic steps required for extending the server DataStore with
-a DataStore miner and how to interact with the miners from an RSE subsystem.
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/MemoryManagement.html b/rse/doc/org.eclipse.dstore.doc.isv/guide/MemoryManagement.html
deleted file mode 100644
index 867971733..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/MemoryManagement.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>RSE DataStore Memory Management</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body>
-<h1><a name="dataelements">Memory Management in DataStore</a></h1>
-<p>
-A Memory Management scheme has been implemented for the DataStore that significantly reduces the memory footprint of the
-DataElements in high-use, long up-time situations. A problem that was identified was that in the DataStore, DataElements were
-rarely being destroyed - only when the files they represented were themselves deleted. When directories in the file system were explored,
-DataElements were being created to represent the files in the directories, but these DataElements were cached and never
-removed from the cache. Therefore, the number of DataElements in the DataStore was always increasing. With no opportunity
-to clear the cache or remove elements, the memory usage of the server continued to grow boundlessly.
-</p>
-<h2><a name="spirit">A solution - Spirit DataElements</a></h2>
-<p>
-The solution to the problem of an ever-growing set of DataElements was simple - provide a mechanism of removing "old"
-DataElements and thus shrinking the set. Since server memory real-estate comes at a much higher premium, the focus here
-is on server-side memory reduction. The assumption then, is that DataElements in the DataStore will always remain in
-memory on the client, but that in the mirror-image DataStore that resides on the server, DataElements can be removed.
-</p>
-<p>
-Formerly, the RSE ran under the assumption that the client and server DataStores mirrored each other. The new
-implementation has a server DataStore tree that is only a subset of all the elements in the client tree (because
-some elements get removed.) In order to accommodate this, a new boolean member variable was added to the DataElement
-class called "isSpirit". When this variable is set to true it means different things on the client and server. On the
-server, a "spirit" DataElement means the element is treated in much the same way as a "deleted" element. At the first
-opportunity, the element is purged from the DataStore and garbage collected by the JVM - freeing up memory. On the client,
-a "spirit" element means that that particular DataElement's counterpart has been made a spirit; thus the client "knows"
-that its twin element on the server side has either been deleted, or is about to be deleted.
-</p>
-<h2><a name="disconnecting">Disconnecting "old" DataElements:</a></h2>
-<p>
-How is it determined when to mark a given DataElement as a spirit? It was decided that the decision to this would be
-left to clients of the DataStore (the miners), rather than to the DataStore itself. This was done for the purposes of
-granularity: some individual miners may not want DataElements to be ever purged, some might want only specific elements,
-etc. As an example, the UniversalFileSystemMiner employs the FileClassifier to classify files returned from a directory
-query, and after each file has been classified, the DataStore's disconnectObject() method is called on the DataElement
-representing that file, setting the stage for its becoming a spirit.
-</p>
-<h2><a name="queue">Controlling the queue of DataElements:</a></h2>
-<p>
-A new class, the DataElementRemover, running in its own thread, maintains a queue of objects that were passed into
-DataStore's disconnectObject() method; each object is stored in the queue along with the time it was added. The
-DataElementRemover is configurable by two command-line options: -DSPIRIT_EXPIRY_TIME=x and -DSPIRIT_INTERVAL_TIME=y;
-where x and y are integers representing a number of seconds. Every y seconds, the queue checks its elements and "makes
-spirit" all those that are older than x seconds. The DataElement is then refreshed, and the change propagated to the
-client. On the server side, the DataElement is deleted at the first opportunity.
-</p>
-<h2><a name="feature">Turning on the feature:</a></h2>
-<p>
-On the client side, this feature is always "on". It is the server which is configured to do or not to do the spirit
-DataElement behaviour. This way, backwards compatibility is maintained - if a new client connects to an old server, or a
-server with spirit turned off, the client detects this and operates as before. If an old client connects to a new server
-with spirit turned on, the server detects that the client does not have spirit capability and behaves as it did before.
-</p>
-<p>
-To turn on the spirit feature on the server side, one needs to include the command-line option -DDSTORE_SPIRIT_ON=true.
-The server scripts have been packaged in order to do this by default.
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/Miners.html b/rse/doc/org.eclipse.dstore.doc.isv/guide/Miners.html
deleted file mode 100755
index 525a9d793..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/Miners.html
+++ /dev/null
@@ -1,142 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>RSE Model</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body>
-<h1>Miners</h1>
-<p>
-<b>Miners</b> are remote tooling extensions to the DataStore. Each miner describes the model
-that it works with as well as the commands associated with the model that it implements. Each
-miner is responsible for extending the DataStore schema and providing implementations for
-commands that it defines.
-</p>
-<p>
-All miners are derived from the abstract class <code>Miner</code>. To write a miner, the
-following APIs need to be implemented:
-</p>
-<pre>
- public abstract void extendSchema(DataElement schemaRoot);
- public abstract DataElement handleCommand(DataElement theCommand);
-</pre>
-<p>
-The first method, <code>extendSchema</code>, is implemented by a miner to contribute the types of objects, relationships and commands that
-it deals with. The second method, <code>handleCommand</code>, is implemented by a miner so that it can execute the commands it defines.
-</p>
-
-<h2>Extending the Schema</h2>
-<p>
-A miner extends the DataStore schema by populating the <i>schemaRoot</i> with <a href="DataElements.html#descriptors">descriptors</a>.
-The DataStore repository tree is structured so that there is a single node where schema descriptors reside. All
-<a href="DataElements.html#objectdescriptors">object descriptors</a> and <a href="DataElements.html#relationdescriptors">relation descriptors</a>
-are created under this schema root. <a href="DataElements.html#commanddescriptors">Command descriptors</a> are created under the
-object descriptors that they apply to. Each miner contributes to this global DataStore schema, so each may also extend or leverage the
-information from another miner's schema.
-</p>
-<p>
-A miner implements <code>extendSchema(DataElement)</code> to add new descriptors to the DataStore schema. If a miner creates representations
-of objects that are not already represented by some other miner's schema, then it needs to define descriptors for those new types of objects.
-Sometimes new relationship types also need to be defined by a miner for its particular model. In order for a miner to be interacted with,
-via <code>handleCommand</code>, it needs to define command descriptors for object descriptors in the schema. The code below illustrates the
-typical structure of an <code>extendSchema</code> implementation:
-</p>
-
-<font color='#4444CC'>
-<pre>
- public void extendSchema(DataElement schemaRoot)
- {
- // create object descriptors
- DataElement myObjectType1 = createObjectDescriptor(schemaRoot, "my object type 1");
- DataElmeent myObjectType2 = createObjectDescriptor(schemaRoot, "my object type 2");
- DataElement myObjectContainerType = createObjectDescriptor(schemaRoot, "my object container");
-
- // create relation descriptors
- DataElement myRelationType = createRelationDescriptor(schemaRoot, "my relation type");
-
- // create command descriptors
- createCommandDescriptor(myObjectType1, "My Command 1", MY_COMMAND_1);
- createCommandDescriptor(myObjectType2, "My Command 2", MY_COMMAND_2);
- createCommandDescriptor(myObjectContainerType, "Query", MY_QUERY);
-
- // establish relationships between object types
- createReference(myObjectType1, myObjectType2, myRelationType); // myObjectType1 instances can be associated with myObjectType2 instances by myRelationType
- createReference(myObjectContainerType, myObjectType1); // myObjectContainerType instances can contain myObjectType1 instances
- createReference(myObjectContainerType, myObjectType2); // myObjectContainerType instances can contain myObjectType2 instances
-
- ...
- }
-</pre>
-</font>
-
-<p>
-The DataStore does not enforce that instance element trees are structured in the manner that the schema describes so the
-establishing of relationships between object types, as done in this example, is unnecessary as a miner knows its own
-model, since it defined it. But by convention, it is a good thing to describe a model with those relationships explicitly stated
-because other miners or client tools may want to leverage or extend the model for their own purposes.
-</p>
-
-
-<h2>Handling Commands</h2>
-<p>
-The <code>handleCommand</code> method is called by the <a href="Communications.html#servercommandhandler">Server Command Handler</a>
-if the descriptor for a command instance is associated with a particular miner. When this is called, it is up to the miner implementation
-to interpret and execute the command.
-</p>
-<p>
-A <a href="DataElements.html#commands">Command instance</a> is a tree of <a href="DataElements.html">DataElements</a> representing the
-command, the subject of the command, additional arguments to the command and the status of the command. The way this is normally interpretted
-by a miner to mean <i>perform the specified command on the subject using the specified arguments. Change the status to be "done" when the
-operation is complete.</i>.
-</p>
-<p>
-The base miner class provides APIs to assist a miner implementation in extracting information from
-a command tree. The method <code>getCommandName(DataElement)</code> is used to extract the
-name of the command, <code>getCommandStatus(DataElement)</code> returns the status element of
-the command, and <code>getCommandArgument(DataElement, int)</code> returns an argument at the
-specified index. The first argument is always the subject. The code below illustrates
-the typical structure of a <code>handleCommand</code> implementation.
-</p>
-
-<font color='#4444CC'>
-<pre>
- public DataElement handleCommand(DataElement theElement)
- {
- String name = getCommandName(theElement);
- DataElement status = getCommandStatus(theElement);
- DataElement subject = getCommandArgument(theElement, 0);
-
- if (name.equals(MY_COMMAND_1))
- {
- handleMyCommand1(subject, arg1,...,argn, status);
- }
- ...
- status.setAttribute(DE.A_NAME, "done");
- _dataStore.refresh(status);
- }
-</pre>
-</font>
-<p>
-The results of a command may be returned in a variety of ways, depending on its
-purpose. One thing that is always returned is the status object.
-</p>
-<p>
-Think of the status object as the return value of a method. The status object needs to be set to "done"
-whenever a command is complete but it may also optionally contain results in the form
-of DataElements. If a command is requesting transient information about something, then
-the status object could be populated with the results.
-</p>
-<p>
-Each miner has read and write access to the entire DataStore tree. If desired a miner
-can modify that tree as a result of a command. For example, a miner used for browsing
-a file system might populate the subject, a folder object, with other folder and file
-objects, rather than transiently via the status object. In this way, a miner caches
-data and expands the data available to the DataStore repository in response to user
-requests.
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/ServerSide.html b/rse/doc/org.eclipse.dstore.doc.isv/guide/ServerSide.html
deleted file mode 100755
index 5ec50b7b9..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/ServerSide.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>Tutorials</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Extending the Server-side</h1>
-<p>
-This section describes the basic steps needed to extend the server side tooling using <b>Miners</b>.
-</p>
-<ol>
-<li>
-Write a new <a href="Miners.html">DataStore miner</a> by extending the <b>Miner</b> class.
-</li>
-<li>
-Put the compiled miner class on the host, preferably in jar form
-</li>
-<li>
-Register the new miner so that it gets loaded when the server DataStore is connected to. This may be done
-by adding the miner's qualified classname to the file <i>minerFile.dat</i>. Alternatively, an additional <i>minerFile.dat</i>
-file can be used to supply the classname.
-</li>
-<li>
-Update the classpaths for the server side so that the new miner class can be loaded by the
-DataStore. This will vary depending on how the DataStore server is started up. If a startup
-script is used, then you could update the classpath specified in the script or the system classpath
-could be updated.
-</li>
-</ol>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/images/arch.jpg b/rse/doc/org.eclipse.dstore.doc.isv/guide/images/arch.jpg
deleted file mode 100755
index c52bd9ff9..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/images/arch.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/images/local.jpg b/rse/doc/org.eclipse.dstore.doc.isv/guide/images/local.jpg
deleted file mode 100755
index 806c24f43..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/images/local.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/images/remote.jpg b/rse/doc/org.eclipse.dstore.doc.isv/guide/images/remote.jpg
deleted file mode 100755
index 0829df309..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/images/remote.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/guide/overview.html b/rse/doc/org.eclipse.dstore.doc.isv/guide/overview.html
deleted file mode 100755
index 92e8e5626..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/overview.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>Remote System Explorer Overview</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body bgcolor="#ffffff">
-<h1>DataStore Overview</h1>
-<p>
-The RSE uses the concept of <b>subsystems</b> as a common abstraction for remote tooling. Subsystems provide
-public interfaces that are called when some remote tool or resource needs to be communicated with. As long as
-the appropriate public interfaces are implemented, the means of communicating with these remote tools and resources
-is up to the developer of the subsystem. Whatever that might be, some kind of communication layer is required
-to access tools on the host. One such means that is used by existing RSE Subsystems and can be reused is the
-DataStore framework.
-</p>
-<p>
-The <b>DataStore</b> communications framework is used to provide remote access and tooling for the Remote System Explorer.
-It is a communications layer, in-memory data repository and a pluggable tooling framework. While Eclipse provides
-the ability for local tools to plug into the Eclipse workbench, DataStore provides the ability to integrate
-remote tools into the Remote System Explorer. When implementing subsystem APIs, a particular implementation
-may provide remote function by leveraging DataStore.
-</p>
-
-<img src="images/arch.jpg" alt="DataStore and it's relationship to RSE and Eclipse" border="0">
-
-<p>
-In an RSE subsystem, the goal of the DataStore is to provide the bridge to tools and resources on the host.
-To interact with a remote tool, a DataStore client communicates over a network with a DataStore server. Data and
-commands are transferred between the client and server via the DataStore communication layer. Information
-that is communicated between each side is kept in memory with the DataStore repository. Both the client and server DataStores
-have this repository and it is the responsibility of the DataStore communication layer to keep the contents
-of each of these repositories in sync. All the DataStore data on the server side is replicated to the client and
-and vice versa.
-</p>
-<p>
-The DataStore framework is generic in the sense that it can be used to facilitate any kind of remote tooling. There are
-no specialized APIs or artifacts that are geered towards a particular use. How DataStore is used is determined by the
-tool extensions, <a href="Miners.html">Miners</a>. <a href="Miners.html">Miners</a> are typically either adapters to
-tools on the host or are tools themselves. These extensions determine the meaning of data used to represent objects,
-relationships and the commands that can be issued on the represented objects. <a href="Miners.html">Miners</a> shape the
-DataStore by contributing <a href="Schemas.html">schemas</a> to the pool of information in a DataStore repository.
-Because the client and server DataStore repositories are synchronized, the DataStore clients
-have access to the miner <a href="Schemas.html">schemas</a> and, using that information, they are able to communicate with the tools on the host.
-Because the server has access to those miner <a href="Schemas.html">schemas</a>, each <a href="Miners.html">Miners</a> may also communicate with
-other <a href="Miners.html">Miners</a> on the host in the same way a client can.
-</p>
-<p>
-A Filesystem miner can shape the DataStore by contributing a <a href="Schemas.html">schema</a> that
-describes file systems and how they should be interacted with. The <a href="Schemas.html">schema</a> could describe
-files, folders, properties of files and relationships between them as well as commands for querying folders or renaming files.
-An RSE subsystem, can then provide browsing capabilities to a remote file system by sending commands
-via the DataStore client to the Filesystem Miner on the host. Another <a href="Miners.html">miner</a> can
-contribute its own <a href="Schemas.html">schema</a> or extend the existing Filesystem Miner <a href="Schemas.html">schema</a>
-to leverage or contribute to the existing file system tool.
-</p>
-<p>
-This guide explains all underlying
-artifacts and model of the DataStore, its relationship to RSE, and highlights the
-important APIs available for your use.
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/notices.html b/rse/doc/org.eclipse.dstore.doc.isv/notices.html
deleted file mode 100755
index 6c70b9c62..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/notices.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="STYLESHEET" HREF="book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-<p>
-The material in this guide is Copyright (c) IBM Corporation and others 2000, 2006.
-</p>
-<p>
-<a href="about.html">Terms and conditions regarding the use of this guide.</a>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/options.txt b/rse/doc/org.eclipse.dstore.doc.isv/options.txt
deleted file mode 100755
index fcb8f7dbd..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/options.txt
+++ /dev/null
@@ -1,25 +0,0 @@
--charset "iso-8859-1"
--sourcepath "../org.eclipse.dstore.core/src
-;../org.eclipse.dstore.extra/src"
--d reference/api
--classpath @rt@
--breakiterator
--use
--splitIndex
--windowtitle "Remote System Explorer DataStore API Specification"
--doctitle "Remote System Explorer DataStore API Specification"
--header "<b>Remote System Explorer DataStore</b><br>Release 1.0"
--bottom '<font size="-1"><p><a href="{@docRoot}/../misc/api-usage-rules.html">Guidelines for using DataStore APIs</a>.</p></font>'
--link http://java.sun.com/j2se/1.4.2/docs/api
--linkoffline ./../../../org.eclipse.platform.doc.isv/reference/api @javadoc.link.location@/platform/reference/api/
--link http://bundles.osgi.org/javadoc/r4
-
-org.eclipse.dstore.core
-org.eclipse.dstore.core.client
-org.eclipse.dstore.core.java
-org.eclipse.dstore.core.miners.miner
-org.eclipse.dstore.core.model
-org.eclipse.dstore.core.server
-org.eclipse.dstore.core.util
-org.eclipse.dstore.core.util.ssl
-org.eclipse.dstore.extra \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/plugin.properties b/rse/doc/org.eclipse.dstore.doc.isv/plugin.properties
deleted file mode 100755
index b9113ccc8..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-pluginName=RSE DStore ISV Documentation
-providerName=Eclipse.org
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/plugin.xml b/rse/doc/org.eclipse.dstore.doc.isv/plugin.xml
deleted file mode 100755
index c98822571..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/plugin.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin>
-
- <extension point="org.eclipse.help.toc">
- <toc file="toc.xml" primary="true" category="DSDP.TM"/>
- <index path="index/"/>
- </extension>
-
-</plugin>
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/provisional_api.html b/rse/doc/org.eclipse.dstore.doc.isv/provisional_api.html
deleted file mode 100644
index ea205b0f3..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/provisional_api.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<title>Remote System Explorer API Status</title>
-<meta name="copyright" content="Copyright (c) Wind River Systems, Inc. 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" HREF="book.css">
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Remote System Explorer API Status</h1>
-<h2>Provisional API</h2>
-<div class="p">
-<p>Although RSE API has been reviewed and proven useful in earlier proprietary
-versions, we want to give the Open Source Communitiy a chance to provide public
-feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of RSE 1.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after RSE 1.0
-in a not backward compatible way. All such API changes will be voted on
-by committers on the <a href="http://dev.eclipse.org/mailman/listinfo/dsdp-tm-dev">
-dsdp-tm-dev</a> developer mailing list, and documented in a migration guide
-for future releases. We expect that with Community Feedback, we'll reach a
-stable, hardened API for RSE 2.0. Please give your feedback on
-<a href="https://bugs.eclipse.org/bugs/">Eclipse Bugzilla</a>
-under category DSDP, Product Target Management.</p>
-</div>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/reference/.cvsignore b/rse/doc/org.eclipse.dstore.doc.isv/reference/.cvsignore
deleted file mode 100644
index eedd89b45..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/reference/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-api
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/reference/placeholder.txt b/rse/doc/org.eclipse.dstore.doc.isv/reference/placeholder.txt
deleted file mode 100644
index 89b1c1c77..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/reference/placeholder.txt
+++ /dev/null
@@ -1 +0,0 @@
-A nearly empty file used to force the creation of the containing folder. \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/toc.html b/rse/doc/org.eclipse.dstore.doc.isv/toc.html
deleted file mode 100755
index 19c48bc70..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/toc.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
- <LINK REL="STYLESHEET" HREF="book.css" TYPE="text/css">
- <title>RSE DataStore developer information</title>
-</head>
-
-<body>
-<h1>Using the RSE DataStore for Remote Communications</h1>
-<div class="p">
-This section provides information for tool developers who wish to
-add server-side tooling capabilities. Using the RSE DataStore tooling
-communication framework, server-side extensions can be written. The Remote System Explorer can be
-extended to interface the new server-side extensions.
-</div>
-
-<h2>Provisional API</h2>
-<div class="p">
-<p>Although RSE API has been reviewed and proven useful in earlier proprietary
-versions, we want to give the Open Source Communitiy a chance to provide public
-feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of RSE 1.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after RSE 1.0
-in a not backward compatible way. All such API changes will be voted on
-by committers on the <a href="http://dev.eclipse.org/mailman/listinfo/dsdp-tm-dev">
-dsdp-tm-dev</a> developer mailing list, and documented in a migration guide
-for future releases. We expect that with Community Feedback, we'll reach a
-stable, hardened API for RSE 2.0. Please give your feedback on
-<a href="https://bugs.eclipse.org/bugs/">Eclipse Bugzilla</a>
-under category DSDP, Product Target Management.</p>
-</div>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.dstore.doc.isv/toc.xml b/rse/doc/org.eclipse.dstore.doc.isv/toc.xml
deleted file mode 100755
index 6ea4c48d1..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/toc.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="RSE DStore Developer Guide">
- <topic label="Guide" href="toc.html">
- <topic label="DataStore Overview" href="guide/overview.html">
- <topic label="DataStore Artifacts" href="guide/Artifacts.html" />
- <topic label="DataStore Communications" href="guide/Communications.html" />
- <topic label="DataElements and the DataStore Model" href="guide/DataElements.html" />
- <topic label="Memory Management of DataElements" href="guide/MemoryManagement.html" />
- <topic label="Miners" href="guide/Miners.html" />
- </topic>
- <topic label="Extending and Using the DataStore" href="guide/Extending.html">
- <topic label="Extending the Server-side" href="guide/ServerSide.html" />
- <topic label="Communicating with the Server-side" href="guide/ClientSide.html" />
- </topic>
- <anchor id="guide_additions"/>
- </topic>
- <topic label="Reference" href="provisional_api.html">
- <topic label="DataStore API Reference" href="provisional_api.html">
- <topic label="org.eclipse.dstore.core.model" href="reference/api/org/eclipse/dstore/core/model/package-summary.html" />
- <topic label="org.eclipse.dstore.core.client" href="reference/api/org/eclipse/dstore/core/client/package-summary.html" />
- <topic label="org.eclipse.dstore.core.server" href="reference/api/org/eclipse/dstore/core/server/package-summary.html" />
- <topic label="org.eclipse.dstore.core.util" href="reference/api/org/eclipse/dstore/core/util/package-summary.html" />
- <topic label="org.eclipse.dstore.core.miners.miner" href="reference/api/org/eclipse/dstore/core/miners/miner/package-summary.html" />
- </topic>
- <anchor id="reference_additions"/>
- </topic>
- <topic label="Legal" href="notices.html"/>
-</toc>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/.classpath b/rse/doc/org.eclipse.rse.doc.isv/.classpath
deleted file mode 100755
index b68aa52df..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/.classpath
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.rse.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/.cvsignore b/rse/doc/org.eclipse.rse.doc.isv/.cvsignore
deleted file mode 100755
index 0700bef2a..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-bin
-index
-build.xml
-javadoc.link.location
-temp.bin.log
-temp.convert.txt
-temp.options.txt
diff --git a/rse/doc/org.eclipse.rse.doc.isv/.project b/rse/doc/org.eclipse.rse.doc.isv/.project
deleted file mode 100755
index dcc4d40c8..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.doc.isv</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/META-INF/MANIFEST.MF b/rse/doc/org.eclipse.rse.doc.isv/META-INF/MANIFEST.MF
deleted file mode 100755
index 5b407efb3..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,8 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.doc.isv; singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Localization: plugin
-Eclipse-LazyStart: false
-Bundle-Vendor: %providerName
diff --git a/rse/doc/org.eclipse.rse.doc.isv/aaa-how-to-add-things.txt b/rse/doc/org.eclipse.rse.doc.isv/aaa-how-to-add-things.txt
deleted file mode 100755
index d73e72b8e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/aaa-how-to-add-things.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Last revised July 27, 2006
-(This file is for information only; it is not included in the release.)
-
-See also
- http://wiki.eclipse.org/index.php/How_to_add_things_to_the_Eclipse_doc
-with the following exceptions:
-- platformOptions.txt -> options.txt
-- overview-platform.html -> /reference/misc/overview-rse.html
-
-To add new plug-ins you need to make changes in several places in
-this doc plug-in:
-
-1) options.txt
-- the plug-in's source folder(s) must be included on the -sourcepath
-- code of required plug-ins must be added on the -classpath (the JAR(s)for non-JARed plug-ins and <plugin>/@dot for JARed plug-ins
-- the API package names must be included in the (alphabetical) package list at the end of the file
-- note that the @sep@ token is replaced during build by the appropriate separator character for the build platform.
-
-2) buildDoc.xml
-- add a line in convertSchemaToHtml target to handle a new plug-ins extension point schemas
-
-Adding new extension points:
-
-1) reference/extension-points/index.html
-- add a line for each extension point
-
-2) topics_Reference.xml
-- add a line for each extension point
-- add a line for each API package \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/about.html b/rse/doc/org.eclipse.rse.doc.isv/about.html
deleted file mode 100755
index 460233046..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/book.css b/rse/doc/org.eclipse.rse.doc.isv/book.css
deleted file mode 100755
index bd2fe14b0..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/book.css
+++ /dev/null
@@ -1,112 +0,0 @@
-P.Code {
- display: block;
- text-align: left;
- text-indent: 0.00pt;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 15pt;
- font-size: 10.000000pt;
- font-weight: normal;
- font-style: normal;
- color: #4444CC;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family: "Courier New", Courier, monospace;
-}
-H6.CaptionFigColumn {
- display: block;
- text-align: left;
- text-indent: 0.000000pt;
- margin-top: 3.000000pt;
- margin-bottom: 11.000000pt;
- margin-right: 0.000000pt;
- margin-left: 0.000000pt;
- font-size: 9.000000pt;
- font-weight: bold;
- font-style: Italic;
- color: #000000;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
-}
-P.Note {
- display: block;
- text-align: left;
- text-indent: 0pt;
- margin-top: 19.500000pt;
- margin-bottom: 19.500000pt;
- margin-right: 0.000000pt;
- margin-left: 30pt;
- font-size: 11.000000pt;
- font-weight: normal;
- font-style: Italic;
- color: #000000;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
-}
-EM.UILabel {
- font-weight: Bold;
- font-style: normal;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
-}
-EM.CodeName {
- font-weight: Bold;
- font-style: normal;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family: "Courier New", Courier, monospace;
-}
-
-body, html { border: 0px }
-
-
-/* following font face declarations need to be removed for DBCS */
-
-body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-family: Arial, Helvetica, sans-serif; color: #000000}
-pre { font-family: "Courier New", Courier, monospace;}
-
-/* end font face declarations */
-
-/* following font size declarations should be OK for DBCS */
-body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-size: 10pt; }
-pre { font-size: 10pt}
-
-/* end font size declarations */
-
-body { background: #FFFFFF; margin-bottom: 1em }
-h1 { font-size: 18pt; margin-top: 5; margin-bottom: 1 }
-h2 { font-size: 14pt; margin-top: 25; margin-bottom: 3 }
-h3 { font-size: 11pt; margin-top: 20; margin-bottom: 3 }
-h4 { font-size: 10pt; margin-top: 20; margin-bottom: 3; font-style: italic }
-p { margin-top: 10px; margin-bottom: 10px }
-pre { margin-left: 6; font-size: 9pt; color: #4444CC }
-a:link { color: #0000FF }
-a:hover { color: #000080 }
-a:visited { text-decoration: underline }
-ul { margin-top: 10px; margin-bottom: 10px; }
-li { margin-top: 5px; margin-bottom: 5px; }
-li p { margin-top: 5px; margin-bottom: 5px; }
-ol { margin-top: 10px; margin-bottom: 10px; }
-dl { margin-top: 10px; margin-bottom: 10px; }
-dt { margin-top: 5px; margin-bottom: 5px; font-weight: bold; }
-dd { margin-top: 5px; margin-bottom: 5px; }
-strong { font-weight: bold}
-em { font-style: italic}
-var { font-style: italic}
-div.revision { border-left-style: solid; border-left-width: thin;
- border-left-color: #7B68EE; padding-left:5 }
-th { font-weight: bold }
-
-a.command-link {
-}
-a.command-link img {
- border-width: 0px;
- border-style: none;
- vertical-align: middle;
-}
diff --git a/rse/doc/org.eclipse.rse.doc.isv/build.properties b/rse/doc/org.eclipse.rse.doc.isv/build.properties
deleted file mode 100755
index 10fd0ba73..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/build.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (Wind River) - Declare API provisional
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- book.css,\
- notices.html,\
- plugin.properties,\
- plugin.xml,\
- schema.css,\
- toc.xml,\
- topics_Guide.xml,\
- topics_Questions.xml,\
- topics_Reference.xml,\
- topics_Samples.xml,\
- guide/,\
- icons/,\
- index/,\
- questions/,\
- reference/,\
- samples/,\
- provisional_api.html
-customBuildCallbacks = customBuildCallbacks.xml
diff --git a/rse/doc/org.eclipse.rse.doc.isv/buildDoc.xml b/rse/doc/org.eclipse.rse.doc.isv/buildDoc.xml
deleted file mode 100755
index 616b047d8..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/buildDoc.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="RSE ISV Doc Build" default="all" basedir=".">
-
- <property name="javadoc.link.location" value="${basedir}/javadoc.link.location"/>
-
- <target name="init">
- <available file="${basedir}/index" property="index.present" />
- <path id="path_bootclasspath">
- <fileset dir="${java.home}/lib">
- <include name="*.jar"/>
- </fileset>
- </path>
- <property name="bootclasspath" refid="path_bootclasspath"/>
- <condition property="safeBaseLocation"
- value="${baseLocation}"
- else="${eclipse.home}">
- <isset property="baseLocation"/>
- </condition>
- <delete dir="${javadoc.link.location}" />
- </target>
-
- <target name="computeClasspath" unless="javadoc.classpath">
- <!-- Construct the javadoc classpath and store it in a property. -->
- <echo level="info" message="Computing classpath ..."/>
-
- <!-- Add platform dependencies required by your plug-in here.
- Note that this pattern expects Eclipse to have
- been installed into the platform directory structure, as is
- the case during the build. -->
- <patternset id="platform.classpath.pattern">
- <include name="**/org.eclipse.core*.jar"/>
- <include name="**/org.eclipse.core*/**/*.jar"/>
- <include name="**/org.eclipse.compare*.jar"/>
- <include name="**/org.eclipse.debug.core*.jar"/>
- <include name="**/org.eclipse.debug.ui*.jar"/>
- <include name="**/org.eclipse.search*.jar"/>
- <include name="**/org.eclipse.swt*.jar"/>
- <include name="**/org.eclipse.swt*/**/*.jar"/>
- <include name="**/org.eclipse.ui*.jar"/>
- <include name="**/org.eclipse.ui*/**/*.jar"/>
- <include name="**/org.eclipse.update*.jar"/>
- <include name="**/org.eclipse.update*/**/*.jar"/>
- <include name="**/org.eclipse.osgi*.jar"/>
- <include name="**/org.eclipse.osgi*/**/*.jar"/>
- <include name="**/org.eclipse.equinox*.jar"/>
- <include name="**/org.eclipse.equinox*/**/*.jar"/>
- <include name="**/org.eclipse.jface*.jar"/>
- <include name="**/org.eclipse.jface*/**/*.jar"/>
- <include name="**/org.eclipse.text*.jar"/>
- <include name="**/org.eclipse.text*/**/*.jar"/>
- <include name="**/org.eclipse.team*.jar"/>
- <include name="**/org.eclipse.team*/**/*.jar"/>
- <include name="**/org.junit*.jar"/>
- <include name="**/org.junit*/**/*.jar"/>
- <include name="**/com.ibm.icu*.jar"/>
- <include name="**/com.jcraft.jsch*.jar"/>
- </patternset>
-
- <pathconvert property="javadoc.classpath">
- <path>
- <fileset dir="${safeBaseLocation}">
- <patternset refid="platform.classpath.pattern"/>
- </fileset>
- </path>
- </pathconvert>
- <echo level="info" message="Done computing classpath."/>
- <echo level="debug" message="Bootclasspath is: ${bootclasspath}"/>
- <echo level="debug" message="Classpath is: ${javadoc.classpath}"/>
- </target>
-
- <target name="extractLinks">
- <mkdir dir="${javadoc.link.location}"/>
-
- <patternset id="package.list">
- <include name="**/package-list"/>
- </patternset>
-
- <!-- We only need the package-list files out of these -->
- <unzip dest="${javadoc.link.location}/platform/">
- <patternset refid="package.list"/>
- <fileset dir="${safeBaseLocation}/plugins">
- <include name="org.eclipse.platform.doc.isv*.jar"/>
- </fileset>
- </unzip>
- </target>
-
- <target name="all" depends="init" unless="index.present">
- <antcall target="convertSchemaToHtml" />
- <antcall target="generateJavadoc" />
- <antcall target="build.index" />
- </target>
-
- <target name="build.index" description="Builds search index for the plug-in: org.eclipse.rse.doc.isv" if="eclipse.running">
- <help.buildHelpIndex manifest="${basedir}/plugin.xml" destination="${basedir}" />
- </target>
-
- <target name="convertSchemaToHtml" if="eclipse.running">
- <property name="dest" value="reference/extension-points" />
- <record name="${basedir}/temp.convert.txt" action="start" />
- <pde.convertSchemaToHTML manifest="../org.eclipse.rse.core/plugin.xml" destination="${dest}" />
- <pde.convertSchemaToHTML manifest="../org.eclipse.rse.ui/plugin.xml" destination="${dest}" />
- <record name="${basedir}/temp.convert.txt" action="stop" />
- </target>
-
- <target name="getJavadocPath">
- <available file="${java.home}/../bin/javadoc.exe" property="javadoc" value="${java.home}/../bin/javadoc.exe" />
- <available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" />
- <available file="/usr/bin/javadoc" property="javadoc" value="/usr/bin/javadoc" />
- </target>
-
- <target name="generateJavadoc" depends="getJavadocPath,extractLinks,computeClasspath" if="javadoc">
- <property name="optionsFile" value="temp.options.txt" />
- <copy file="options.txt" tofile="${optionsFile}" overwrite="true" />
-
- <condition property="argsListDelimiter" value=":">
- <os family="unix" />
- </condition>
- <condition property="argsListDelimiter" value=";">
- <os family="windows" />
- </condition>
-
- <replaceregexp file="${basedir}/${optionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" />
- <replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}${argsListDelimiter}${javadoc.classpath}" />
- <replace file="${basedir}/${optionsFile}" token="@baseLocation@" value="${safeBaseLocation}" />
- <replace file="${basedir}/${optionsFile}" token="@javadoc.link.location@" value="${javadoc.link.location}" />
-
- <!--scrub isv plugin directories of any preexisting api doc content-->
- <delete dir="reference/api" />
- <mkdir dir="reference/api" />
-
- <echo message="sep = ${argsListDelimiter}"/>
- <echo message="javadoc = ${javadoc}"/>
- <exec dir="." executable="${javadoc}" output="temp.bin.log">
- <arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
- </exec>
- </target>
-
-</project>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rse/doc/org.eclipse.rse.doc.isv/customBuildCallbacks.xml b/rse/doc/org.eclipse.rse.doc.isv/customBuildCallbacks.xml
deleted file mode 100644
index 7e14739e6..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/customBuildCallbacks.xml
+++ /dev/null
@@ -1,157 +0,0 @@
-<!-- ===================================================================== -->
-<!-- Custom targets called from a project's generated build.xml -->
-<!-- Set customBuildCallbacks=<path/to/this/file> in your build.properties.-->
-<!-- ===================================================================== -->
-<project name="Build specific targets and properties" default="noDefault">
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="This file must be called with explicit targets" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target build.jars -->
- <!-- Available parameters : -->
- <!-- build.result.folder - folder to contain the build results -->
- <!-- ===================================================================== -->
- <target name="pre.build.jars">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target build.jars -->
- <!-- Available parameters : -->
- <!-- build.result.folder - folder to contain the build results -->
- <!-- ===================================================================== -->
- <target name="post.build.jars">
- <ant antfile="buildDoc.xml" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target build.sources -->
- <!-- Available parameters : -->
- <!-- build.result.folder - folder to contain the build results -->
- <!-- ===================================================================== -->
- <target name="pre.build.sources">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target build.sources -->
- <!-- Available parameters : -->
- <!-- build.result.folder - folder to contain the build results -->
- <!-- ===================================================================== -->
- <target name="post.build.sources">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the compilation target <name> -->
- <!-- Substitute "name" with the name of the compilation target, eg @dot -->
- <!-- Available parameters : -->
- <!-- source.foldern : n = 1 ... N, the source folders -->
- <!-- target.folder : where the results of the compilation go -->
- <!-- <name>.classpath : name = name of the compilation target. A -->
- <!-- reference to the classpath structure. -->
- <!-- ===================================================================== -->
- <!--
- <target name="pre.compileTarget.jar">
- </target>
- -->
-
- <!-- ===================================================================== -->
- <!-- Steps to do after compilation but before jaring -->
- <!-- Substitute "name" with the name of the compilation target, eg @dot -->
- <!-- Available parameters : -->
- <!-- source.foldern : n = 1 ... N, the source folders -->
- <!-- target.folder : where the results of the compilation go -->
- <!-- <name>.classpath : name = name of the compilation target. A -->
- <!-- reference to the classpath structure. -->
- <!-- ===================================================================== -->
- <!--
- <target name="post.compile.compileTarget.jar">
- </target>
- -->
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the compilation target <name> -->
- <!-- Substitute "name" with the name of the compilation target, eg @dot -->
- <!-- Available parameters : -->
- <!-- jar.location - the location of the compilation results -->
- <!-- <name>.classpath : name = name of the compilation target. A -->
- <!-- reference to the classpath structure. -->
- <!-- ===================================================================== -->
- <!--
- <target name="post.compileTarget.jar">
- </target>
- -->
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target gather.bin.parts -->
- <!-- Available parameters : -->
- <!-- base.dir - root of the project -->
- <!-- build.result.folder - folder containing the build results -->
- <!-- target.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="pre.gather.bin.parts">
-
- </target>
- <!-- ===================================================================== -->
- <!-- Steps to do after the target gather.bin.parts -->
- <!-- Available parameters : -->
- <!-- base.dir - root of the project -->
- <!-- build.result.folder - folder containing the build results -->
- <!-- target.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="post.gather.bin.parts">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target gather.sources -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="pre.gather.sources">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target gather.sources -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="post.gather.sources">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target gather.logs -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="pre.gather.logs">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target gather.logs -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="post.gather.logs">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target clean -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - destination folder -->
- <!-- ===================================================================== -->
- <target name="pre.clean">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target clean -->
- <!-- Available parameters : -->
- <!-- plugin.destination - final destination of the build -->
- <!-- build.result.folder - results of the compilation -->
- <!-- temp.folder - temporary folder -->
- <!-- ===================================================================== -->
- <target name="post.clean">
- </target>
-</project> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/Artifacts.html b/rse/doc/org.eclipse.rse.doc.isv/guide/Artifacts.html
deleted file mode 100755
index d158ee5f0..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/Artifacts.html
+++ /dev/null
@@ -1,209 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-<title>RSE Artifacts</title>
-</head>
-
-<body>
-<h1>Remote System Explorer Artifacts</h1>
-<p>With the RSE, you can create and manipulate the following artifacts, which we introduce here:</p>
-<ul>
-<li><A href="#Hosts">Hosts</A></li>
-<li><A href="#profiles">Profiles</A></li>
-<li><A href="#subsystems">Subsystems, created from subsystem configurations</A></li>
-<li><A href="#connectorservices">Connector Services, managed by connector service managers</A></li>
-<li><A href="#filters">Filters and filter strings</A></li>
-<li><A href="#filterpools">Filter pools</A></li>
-<li><A href="#Preferences">Preferences</A></li>
-<li><A href="#Registry">System Registry</A></li>
-</ul>
-<p>All the classes and interfaces mentioned here are defined in the <samp>org.eclipse.rse.core</samp> plugin.
-
-<h2><A name="Hosts">Hosts</A></h2>
-<p>
-The RSE's <A href="view_RS.gif">Remote Systems view</A> shows all existing <b>Hosts</b> to remote systems.
-Hosts are objects that are persisted, containing the information needed to access a particular remote host.
-The view contains a prompt to create new Hosts, and pop-up menu actions to rename, copy, delete, and reorder existing Hosts.
-</p>
-<p>Hosts contain attributes, or data, that is saved between sessions of the workbench. These attributes are
-the host name, the remote system's host name and system type, an optional description, and a user Id that is
-used by default by each subordinate subsystem, at host time.
-Underneath, all Hosts are stored via RSE persistence in an Eclipse project named <CODE>RemoteSystemsConnections</CODE></A>, which
-the user can enable for team support, allowing Hosts to be shared by a team.
-</p>
-
-<h2><A name="profiles">Profiles</A></h2>
-<p>
-To facilitate team-shared and user-unique Hosts,
-Hosts are owned by <b>profiles</b>. These are simply <A href="file_profiles.gif">folders in the RemoteSystemsConnections
-project</A>, as it turns out, within which all other data including Hosts are scoped. Internally profiles are realized as
-SystemProfile objects, managed by the SystemProfileManager.
-For each profile there is also a SystemHostPool object
-created to manage the Hosts within that profile. There are menu actions for the
-user to create and manage profiles. The collective of all Hosts of all <b><I>active</I> profiles</b> are shown in the
-Remote Systems view,
-and the user can easily decide which profiles are active using the <A href="preference_activeProfiles.gif">local pulldown menu</A> of the Remote Systems view.
-The list of profiles currently active is stored locally on each user's workstation, and not shared by teams.
-By default, there exists a profile named <code>Team</code>, and a profile with a name unique to this user. When the first
-host is created the user is asked to supply this unique name, which defaults to the hostname of their
-workstation. Whenever a new host is created, the user is prompted for an active profile to contain the new
-host. Both default profiles are active initially, so all Hosts from each are shown. There is a preferences
-setting to show the host names qualified by their profile name. After synchronizing the RemoteSystemsConnections
-project with a team repository, using the RSE <A href="plugin/view_Team.gif">team view</A>, all profiles of all members of
-the team will exist in the user's workspace, and hence
-all the Hosts created by all the team members. However, only the two default profiles are active, so the Hosts
-in the other profiles are not seen unless the user explicitly makes another profile active. This design allows
-for:
-</p>
-<ol>
-<li>Team-shared Hosts (created in the Team profile or any profile all team members make active)
-<li>User-private Hosts (created in their own profile or any profile not active by default)
-<li>User-roaming, whereby a user uses a different workstation than usual,
-and then synchronizes with the team repository and sets their profile to be active.
-</ol>
-<p>
-As an aside, user IDs and passwords are not shared with the team repository, but rather stored only locally per
-workstation.
-Each subsystem can have a unique user ID, which if not set is inherited from its host,
-which in turn if not set is inherited from the
-user ID preferences setting for the appropriate system type.
-</p>
-
-<h2><A name="subsystems">Subsystems and subsystem configurations</A></h2>
-<p>
-When you expand a host, any tools registered with the Remote System Explorer are shown under the host.
-These tools are referred to as <b>subsystems</b>. The tool provider registers a <b>subsystem configuration</b>
-class via an RSE <A href="plugin/subsystem.html">extension point</A>, and whenever a new host is created, the configuration
-is asked to create a new subsystem object for that host. This subsystem is responsible for communicating with the remote host, and
-exposing artifacts and actions for working with remote resources. The subsystem configuration can elect not to
-supply a subsystem for a given host if it does not support the system type of that host
-</p>
-<p>
-RSE supplies two subsystem configurations that supply common subsystems for all Hosts:
-<ol>
-<li>Files. The subsystems created by this factory access the folders and files of the remote system,
-and allow users to explore and manipulate those folders and files. Editing support for remote source files is also included. For programmers, the subsystems also supply common APIs and user interface actions, wizards,
-dialogs, and widgets for easy access to the remote file system for a given host. These APIs are
-typically used when coding actions that appear in the pop-up menu for selected remote objects, but might
-also be of value when writing any view, editor, or action that needs access to a remote file system.
-<li>Commands. The subsystems created by this factory access the command shell of the remote system and
-allow users to predefine commands, and subsequently run them remotely. The commands subsystems are hidden
-subsystems, not shown when you expand the host. However, they are used by any code needing to run
-remote commands. There is also a Remote Shell view supplied that logs all commands and allows users to
-enter a command to be run remotely. The commands all execute within the same shell, and users
-can launch additional shells for the same host.
-</ol>
-<h2><A name="systems">Systems and System Managers</A></h2>
-<p>While not seen by the user, subsystem objects are required to return a <b>connectorservice</b> object via the
-<A href="../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html#getConnectorService()">getConnectorService()</A> method.
-A connectorService object is an object implementing the <A href="../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html">IConnectorService</A> interface.
-A connectorService object manages the live host to the remote system, and supports
-lifecycle methods for that host such as
-<A href="../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html#connect(org.eclipse.core.runtime.IProgressMonitor)">connect</A>,
-<A href="../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html#disconnect()">disconnect</A>, and
-<A href="../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html#isConnected()">isConnected</A>.
-The communication layer for that host is entirely the programmer's responsibility, and might use sockets, JDBC, HTTP or
-SOAP. It is up the provider of the subsystem factory to author their own communication layer; the framework
-only dictates the handful of methods in IConnectorService, that the RSE UI depends upon. The framework supplies a base
-system class that is easily extended.
-</p>
-<p>It may be the case that multiple subsystems, each from a different subsystem configuration, share the same live
-host for a given host object. To enable this, the framework supplies a base
-<b>connector service manager</b> <A href="../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.html">class</A>
-that can be used to manage a single shared connector service object across multiple subsystems. It uses a hashtable to store and
-return the connector service objects, keyed by a subsystem interface that all subsystems sharing the same connector service object
-are to implement. The subclass of the base connector service manager class supplies that interface. Further, the subclass
-must also implement the method for instantiating new instances of the connector service class, when no instance is found
-in the hashtable.
-</p>
-<p>
-It is possible to author a subsystem configuration whose subsystems simply use the same connector service object as that used by
-the RSE-supplied subsystems. You might do this if the subsystem configuration uses only the RSE-supplied APIs for
-accessing remote objects, in which case there is no need for a unique communication layer. By sharing the
-same connector service object, it prevents the user from being prompted to signon multiple times. To do this, simply access
-any RSE-supplied subsystem for a given host, and ask for its
-<A href="../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html#getConnectorServiceManager()">connector service manager</A>
-in your own subsystem's <A href="../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorService.html#getConnectorServiceManager()">getConnectorServiceManager</A> method.
-</p>
-
-<h2><A name="filters">Filters</A></h2>
-<p>
-When a subsystem is expanded, users usually see <b>filters</b>. Since subsystems typically list remote artifacts,
-it is typical that a mechanism is needed to allow users to define which artifacts they wish to see, with some
-form of filtering criteria. Filters are this mechanism. The filter support is fully supplied by the RSE framework.
-A filter is simply a <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilter.html">ISystemFilter</A>
-object containing a name and a collection of <b>filter strings</b>. Filter strings are just strings, which
-the subsystem is required to interpret. When a user expands a filter, the owning subsystem is asked to resolve
-the filter strings within the filter. The subsystem typically interprets each filter string as some form of
-filtering pattern, and returns a list of remote artifacts matching one or more of the filter string patterns in
-the filter. For example, file subsystems expect each filter string to represent a folder, and a file name pattern. Then, all files in the folder, matching the name pattern, are returned. The subsystem supplies the user interface the
-you use to create and change filter strings, so it is responsible for defining what the filter strings
-look like and for subsequently resolving those filter strings on a filter expansion. A default user interface for
-the filter string prompt is supplied, but it is a simple entry field.
-</p>
-<p>
-It is possible to author a subsystem that does not support filters, if this is desired.
-</p>
-
-<h2><A name="filterpools">Filter Pools</A></h2>
-<p>
-Subsystems do not actually "own" filters. Since each host has unique subsystems, if each subsystem owned its
-own filters then filters could not be shared across Hosts, which is sometimes desirable. Instead, filters are
-actually contained within <b>filter pools</b>. Filter pools are simply
-<A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPool.html">ISystemFilterPool</A>
-objects which have a name and a collection of filters.
-Filter pools are owned by subsystem configurations, per profile. That is, each subsystem configuration will contain filter pools
-scoped by profile. Each such configuration plus profile grouping is known internally as a
-<A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolManager.html">filter pool manager</A>.
-Subsystems contain <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">references</A>
-to filter pools. By default, each subsystem configuration automatically creates one filter pool
-for each profile, named the "xxx Filter Pool", where "xxx" is the name of the profile. Subsystems contain references to
-filter pools, so that as the filters in the pool are created, changed, deleted or re-ordered, those changes are automatically
-reflected in every subsystem (and hence host) that references that filter pool. By default, subsystems are given a
-reference to the default filter pool in their host's profile (for their parent subsystem configuration, so file filters
-are not used in command subsystems, for example).
-</p>
-<p>
-By default, users do not see filter pools. Instead, filters are created in the default filter pool referenced by this subsystem.
-As a result, users will see the same list of filters for every host. However, users can use a preference setting to see
-filter pools. In this case, when a subsystem is expanded, the users see the filter pools referenced by this subsystem.
-Only then when a filter pool is expanded will the user see the filters within that filter pool. In this mode, users also
-see new actions to create filter pools and to add and remove references to filter pools within a subsystem. Whenever filters
-are changed by the user, this change is reflected in all subsystems that reference the parent filter pool. This design
-of filter pools owned by profiles, and subsystems that reference filter pools, facilitates filter sharing:
-<ol>
-<li>Users can share filters across Hosts, by adding references to their parent filter pool in various subsystems.<li>Users can have filters unique to a host, by placing them in a filter pool not referenced by other subsystems.
-<li>Users can have both shared and host-unique filters in a single host, by having both shared and private references
-to filter pools.<li>Teams can share filters by asking each user to add a reference to the same filter pool in their Hosts. For example,
-this is the default case for the default filter pool.
-<li>Users can create filters that are not shared by the team, by creating their own filter pools and not asking others to
-reference it.
-</ol>
-</p>
-<h2><A name="preferences">Preferences</A></h2>
-<p>
-Many of the default characteristics of the Remote System Explorer view and perspective are configurable by each user
-by way of the <A href="preferences.gif">Remote Systems node</A> of the <b>Preferences</b> window, accessible from the Window pull-down of the main menu.
-Furthermore, many of these preferences are directly accessible from the <A
- href="view_pulldown.gif">pull-down menu of the title bar for the Remote
-Systems view</A>. These preferences, like all preferences, are unique to each user and not shared by the team, although they can
-be exported and imported.
-</p>
-
-<h2><A name="Registry">System Registry</A></h2>
-<p>The programmatic front door to all the artifacts in the RSE is the
-<b>System Registry</b>, which is an object implementing
-<A href="../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html">ISystemRegistry</A>.
-This is a singleton object that you
-can access by calling the static method
-<A href="../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">getSystemRegistry()</A> in the
-<A href="../reference/api/org/eclipse/rse/model/SystemStartHere.html">SystemStartHere</A>
-class in the <samp>org.eclipse.rse.ui</samp> plugin.
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/Extensions.html b/rse/doc/org.eclipse.rse.doc.isv/guide/Extensions.html
deleted file mode 100755
index 8606142ef..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/Extensions.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-<title>Remote System Explorer Extension Points</title>
-</head>
-
-<body>
-<h1>Remote System Explorer Extension Points</h1>
-
-<p>
-This product is built on the Eclipse platform
-(<A href="http://www.eclipse.org">www.eclipse.org</A>)
- and so it offers all the
-capabilities of Eclipse. This includes the ability to create new Eclipse plug-ins to contribute
-additional functions to Eclipse. You can write plug-ins using Java, using Eclipse itself (or this product),
-with the Plug-in Development Environment (PDE) perspective. Plug-ins contain a file named <code>plugin.xml</code> that
-registers their functions. All such functions are created by use of <b>extension points</b>.
-These are either supplied by Eclipse or by other plug-ins. The plugin.xml file describes which extension
-points are being exploited by each plug-in, and for each identifies the Java class that supplies the
-additional functions. Each extension point identifies a Java interface (or base class) that
-classes exploiting the extension point must implement (or extend).
-</p>
-<p>
-There are many Eclipse-supplied extension points, as described in
-this product's online help. In addition to the Eclipse extension points, there
-are unique Remote System Explorer extension points that enable you to contribute property pages and
-pop-up menu actions to remote objects within the Remote Systems view, among other things. The base Eclipse extension
-points are not sufficient for these, as they do not allow scoping of those property pages and
-actions such that they only appear for certain remote objects meeting specific filtering criteria.
-</p>
-
-<p>
-Here we will introduce the unique extension points defined by the Remote System Explorer. They are
-further described in the reference section. These extension points are specifically designed to make
-it easy to contribute functions to the pop-up menus of remote objects displayed in the Remote
-Systems view. These extension points are defined in the plugin.xml file of the
-<code>org.eclipse.rse.core</code> plugin, which you will find in the plugins sub-folder of your
-installation directory. This file has comment blocks that offer further information about the
-extension points defined in it.
-
-Here are the extension points that are defined by the RSE:
-</P>
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Extension Point</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><A href="plugin/systemtype.html">org.eclipse.rse.core.<b>systemTypes</b></A></TD>
- <TD>For defining new system types that show up in the New Connection wizard.</TD>
- </TR>
- <TR>
- <TD><A href="plugin/subsystem.html">org.eclipse.rse.ui.<b>subsystemConfigurations</b></A></TD>
- <TD>For defining new subsystems that appear when a connection is expanded.</TD>
- </TR>
- <TR>
- <TD><A href="../reference/extension-points/org_eclipse_rse_ui_archivehandlers.html">org.eclipse.rse.core.<b>archivehandlers</b></A></TD>
- <TD>For supporting additional archive file types, such as is done today for zip, jar and tar files. This adds support for expanding the archives and supporting all the usual actions on the contents.</TD>
- </TR>
- <TR>
- <TD><A href="plugin/popup.html">org.eclipse.rse.ui.<B>popupMenus</B></A></TD>
- <TD>For defining actions, which appear in the pop-up menu of remote objects
- listed in the Remote Systems view.</TD>
- </TR>
- <TR>
- <TD><A href="plugin/propertypage.html">org.eclipse.rse.ui.<b>propertyPages</b></A></TD>
- <TD>For defining property pages, which appear in the Properties dialog when
- users select the Properties action from the pop-up menu of remote
- objects listed in the Remote Systems view.</TD>
- </TR>
- <TR>
- <TD><A href="../reference/extension-points/org_eclipse_rse_ui_remoteSystemsViewPreferencesActions.html">org.eclipse.rse.ui.<b>remoteSystemsViewPreferencesActions</b></A></TD>
- <TD>For contributing a fastpath action to jump to your preferences page, from the local pulldown menu of the Remote Systems view.</TD>
- </TR>
- <!-- TODODeferred after RSE 1.0
- <TR>
- <TD><A href="../reference/extension-points/org_eclipse_rse_ui_compile.html">org.eclipse.rse.ui.<b>compile</b></A></TD>
- <TD>For contributing compile commands to the Compile menus and Work With Compile Commands dialog.</TD>
- </TR>
- -->
- </TBODY>
-</TABLE>
-<!-- TODO
- should we add a reference to the runtime-options here,
- instead of the old rseConfigDefaults extension point?
-
- <TD>For solution providers that are building a product that includes RSE,
- these runtime options allow you to pre-set some out-of-box preference
- values. For example, whether the New Connection tree item is shown in
- Remote Systems view.</TD>
--->
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/Model.html b/rse/doc/org.eclipse.rse.doc.isv/guide/Model.html
deleted file mode 100755
index 4fd3de51c..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/Model.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>RSE Model</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body>
-<h1>Remote System Explorer Model</h1>
-<p>The underlying containment model for the RSE static artifacts is shown here.</p>
-<p><img ref="ModelRSE.gif" src="ModelRSE.png"></p>
- <p>At runtime, the model takes a slightly different form:</p>
- <ul>
-<li>
-<A href="../reference/api/org/eclipse/rse/core/model/ISystemProfile.html">Profiles</A> are managed by a
-<A href="../reference/api/org/eclipse/rse/core/model/ISystemProfileManager.html">profile manager</A>, and contain:
-</li>
-<ul>
-<li><A href="../reference/api/org/eclipse/rse/core/model/ISystemHostPool.html">Host Pools</A>, one per profile, which contain</li>
-<ul>
-<li><A href="../reference/api/org/eclipse/rse/core/model/IHost.html">Hosts</A></li>
-</ul>
-<li><A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPool.html">Filter pools</A>, keyed by Subsystem Configuration, and managed by a <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolManager.html">filter pool manager</A>
-which contain</li>
-<ul>
-<li><A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilter.html">Filters</A>, which contain</li>
-<ul>
-<li><A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterString.html">Filter strings</A></li>
-</ul>
-</ul>
-<!--
-<li><A href="../reference/api/org/eclipse/rse/ui/uda/ISystemUDActionElement.html">User actions</A>, keyed by Subsystem Configuration, which contain</li>
-<ul>
-<li><i>References</i> to <A href="../reference/api/org/eclipse/rse/ui/uda/ISystemUDTypeElement.html">named types</A></li>
-</ul>
-<li><A href="../reference/api/org/eclipse/rse/ui/compile/SystemCompileCommand.html">Compile commands</A></li>
--->
-</ul>
-<li><A href="../reference/api/org/eclipse/rse/core/subsystems/SubSystemConfiguration.html">Subsystem Configurations</A> contain:</li>
-<ul>
-<li><A href="../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html">Subsystems</A>, keyed by host, which contain</li>
-<ul>
-<li><i><A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">References</A></i>
-to <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPool.html">filter pools</A>, which are managed by <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolManager.html">filter pool managers</A></li>
-</ul>
-<!--
-<li><A href="../reference/api/org/eclipse/rse/ui/uda/SystemUDTypeElement.html">Named types</A></li>
--->
-</ul>
-</ul>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/ModelRSE.png b/rse/doc/org.eclipse.rse.doc.isv/guide/ModelRSE.png
deleted file mode 100755
index d079e6e26..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/ModelRSE.png
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/actions/uiActionsAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/actions/uiActionsAPI.html
deleted file mode 100755
index 841132b66..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/actions/uiActionsAPI.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Actions API</title>
-<STYLE type="text/css">
-<!--
-TH {
- background-color: #e5e5e5
-}
--->
-</STYLE>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Actions API</h1>
-<p>In Eclipse, we typically launch our dialogs and wizards and menu items from an action, which is
-a class that implements the JFace <samp>IAction</samp> interface. The Remote System Explorer offers classes to
-help simplify the creation of action classes, especially when used together with the RSE classes for
-<a href="../dialogs/uiDialogsAPI.html">dialogs</a> and <a href="../wizards/uiWizardsAPI.html">wizards</a>.
-</p>
-<p>There are two ways the Remote System Explorer API set can help you when it comes to actions:
-<ol>
-<li>A set of base action classes from which to base your own action classes.
-<li>A set of re-usable actions for specific requirements.
-</ol>
-</p>
-
-<h2>RSE-Supplied Base Classes for Actions</h2>
-<p>Here are the primary base classes the RSE supplies for actions, all of which are found in the
-package <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/package-summary.html"org.eclipse.rse.ui.actions</A></samp>
-in the plugin <samp>org.eclipse.rse.ui</samp>:</p>
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Class</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseAction.html">SystemBaseAction</A></samp></TD>
- <TD>This is the base action class for the other classes, and is only used directly for actions that do not
- result in a dialog or wizard being presented to the user. It extends the JFace <samp>Action</samp> class,
- adding to it support for properties such as the current shell and viewer and selection, as well as
- overridable methods for easily enabling/disabling the action based on the selection, and a method for
- setting the context help for the action. There are many other useful methods, such
- as <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseAction.html#allowOnMultipleSelection(boolean)">allowOnMultipleSelection(boolean)</A></samp>
- and <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseAction.html#setContextMenuGroup(java.lang.String)">setContextMenuGroup(String)</A></samp>, to
- simplify when the action is enabled and where it appears in a popup menu.
- </TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.html">SystemBaseSubMenuAction</A></samp></TD>
- <TD>This base action class extends <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseAction.html">SystemBaseAction</A></samp>, and is used as the parent class when
- for popup menu actions that are to cascade. A cascading menu is itself another menu, really, containing actions just like the primary
- menu does. So, to create a cascading menu action, you simply subclass this class and override the method
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.html#populateSubMenu(org.eclipse.jface.action.IMenuManager)">populateSubMenu</A></samp>, where
- you add all the actions to show in this cascading menu. And yes, one or more of those can themselves be cascading. The RSE views will
- automatically call the method <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.html#getSubMenu()">getSubMenu</A></samp> when populating the initial popup menu, but your own views will need to do this.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseDialogAction.html">SystemBaseDialogAction</A></samp></TD>
- <TD>This base action class extends <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseAction.html">SystemBaseAction</A></samp>, and is used when the action presents the
- user with a dialog, preferably a dialog that extends the RSE
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html">SystemPromptDialog</A></samp> class. To use this class, subclass it and override the methods </TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseWizardAction.html">SystemBaseWizardAction</A></samp></TD>
- <TD>This base action class extends <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseAction.html">SystemBaseAction</A></samp>, and is used when the action presents the
- user with a wizard, preferably a wizard that extends the RSE <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html">AbstractSystemWizard</A></samp> class.</TD>
- </TR>
-
- </TBODY>
-</TABLE>
-
-<h2>Actions Pre-Supplied by RSE</h2>
-<p>You may find some of the actions supplied by the RSE to be immediately re-usable in your own code, saving some
-development and test effort.
-All these actions can be found in package
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/package-summary.html">org.eclipse.rse.ui.actions</A></samp>.
-Further, you can find many useful actions related to the selection of remote files or folders, in package
-<samp><A href="../../../reference/api/org/eclipse/rse/files/ui/actions/package-summary.html">org.eclipse.rse.files.ui.actions</A></samp>.
-</p>
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/browseFolderDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/browseFolderDialog.gif
deleted file mode 100755
index 07af5fc43..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/browseFolderDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/deleteDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/deleteDialog.gif
deleted file mode 100755
index 2119a5357..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/deleteDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/dialogSample.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/dialogSample.html
deleted file mode 100755
index ba8734dd6..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/dialogSample.html
+++ /dev/null
@@ -1,265 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" CHARSET="UTF-8" TYPE="text/css">
-<title>RSE Validator Sample One</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Dialog Sample</h1>
-<p>This is an example of a sample<A href="sampleDlg.gif"> dialog</A> written on top of the RSE base dialog class, and with
-typical full error checking.
-<pre>
-
-package org.eclipse.rse.samples.ui.frameworks.dialogs;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-
-import org.eclipse.rse.samples.*;
-
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.*;
-import org.eclipse.rse.ui.widgets.*;
-import org.eclipse.rse.ui.messages.*;
-import org.eclipse.rse.ui.validators.*;
-
-/**
- * <I>A simple example of using the SystemPromptDialog class as the basis for a new dialog</I>.
- */
-public class <B>SampleDialog</B> extends SystemPromptDialog
-{
- // <I>gui widgets</I>
- private SystemHistoryCombo namePrompt;
- private Text yearPrompt, monthPrompt, dayPrompt;
- // <I>input</I>
- private SampleCustomer inpCust;
- // <I>validators</I>
- private ISystemValidator nameValidator, yearValidator, monthValidator, dayValidator;
- // <I>message</I>
- private SystemMessage errorMessage;
-
- /**
- * <I>Constructor for SampleDialog</I>.
- */
- public <B>SampleDialog</B>(Shell shell)
- {
- super(shell, SamplesPlugin.getString(&quot;org.eclipse.rse.samples.ui.dialogs.dialog1.title&quot;));
- setHelp(SamplesPlugin.HELPPREFIX + &quot;dlg11000&quot;);
- nameValidator = new <A href="../validators/validatorSample1.html">SampleNameValidator</A>();
- yearValidator = new <A href="../validators/validatorSample2.html">SampleBirthYearValidator</A>();
- monthValidator = new <A href="../validators/validatorSample3.html">SampleBirthMonthValidator</A>();
- dayValidator = new <A href="../validators/validatorSample4.html">SampleBirthDayValidator</A>();
- }
-
- /**
- * <I>Required parent override.</I>
- * <I>This is where we populate the client area</I>
- */
- protected Control <B>createInner</B>(Composite parent)
- {
- int nbrColumns = 2;
- Composite parentComposite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // <I>add gui widgets</I>...
- SystemWidgetHelpers.createLabel(parentComposite, SamplesPlugin.getResourceBundle(), &quot;org.eclipse.rse.samples.ui.dialogs.dialog1.name.&quot;);
- boolean readonly = false;
- namePrompt = SystemWidgetHelpers.createHistoryCombo(parentComposite, null, &quot;name.history.key&quot;, readonly,
- SamplesPlugin.getResourceBundle(), &quot;org.eclipse.rse.samples.ui.dialogs.dialog1.name.tooltip&quot;);
-
- addSeparatorLine(parentComposite, nbrColumns);
- boolean wantBorder = false;
- SystemWidgetHelpers.createLabel(parentComposite, SamplesPlugin.getResourceBundle(),
- &quot;org.eclipse.rse.samples.ui.dialogs.dialog1.birthday.verbage.&quot;, nbrColumns, wantBorder);
-
- yearPrompt = SystemWidgetHelpers.createLabeledTextField(parentComposite, null,
- SamplesPlugin.getResourceBundle(), &quot;org.eclipse.rse.samples.ui.dialogs.dialog1.birthday.year.&quot;);
- monthPrompt = SystemWidgetHelpers.createLabeledTextField(parentComposite, null,
- SamplesPlugin.getResourceBundle(), &quot;org.eclipse.rse.samples.ui.dialogs.dialog1.birthday.month.&quot;);
- dayPrompt = SystemWidgetHelpers.createLabeledTextField(parentComposite, null,
- SamplesPlugin.getResourceBundle(), &quot;org.eclipse.rse.samples.ui.dialogs.dialog1.birthday.day.&quot;);
-
- // <I>if given an existing object, prefill it</I>...
- inpCust = (SampleCustomer)getInputObject();
- if (inpCust != null)
- {
- namePrompt.setText(inpCust.getName());
- yearPrompt.setText(inpCust.getYear());
- monthPrompt.setText(inpCust.getMonth());
- dayPrompt.setText(inpCust.getDay());
- }
-
-
- // <I>add modify listeners</I>...
- namePrompt.addModifyListener( new ModifyListener()
- {
- public void modifyText(ModifyEvent event)
- {
- if (validateName())
- validate(namePrompt.getCombo());
- }
- } );
- yearPrompt.addModifyListener( new ModifyListener()
- {
- public void modifyText(ModifyEvent event)
- {
- if (validateYear())
- validate(yearPrompt);
- }
- } );
- monthPrompt.addModifyListener( new ModifyListener()
- {
- public void modifyText(ModifyEvent event)
- {
- if (validateMonth())
- validate(monthPrompt);
- }
- } );
- dayPrompt.addModifyListener( new ModifyListener()
- {
- public void modifyText(ModifyEvent event)
- {
- if (validateDay())
- validate(monthPrompt);
- }
- } );
-
- // <I>initialize enabled state</I>...
- setPageComplete(isPageComplete());
-
- return parentComposite;
- }
-
- /**
- * <I>Required parent override</I>.
- * <I>This is where we return the first input control, to give it focus when the dialog appears</I>.
- */
- protected Control <B>getInitialFocusControl</B>()
- {
- return namePrompt.getCombo();
- }
-
- /**
- * <I>Typical parent override</I>.
- * <I>This is where we get control when the user presses OK</I>.
- */
- protected boolean <B>processOK</B>()
- {
- errorMessage = null;
- Control controlInError = validate(null);
- if (controlInError != null)
- controlInError.setFocus();
- else
- {
- SampleCustomer newCust = inpCust;
- if (newCust == null)
- newCust = new SampleCustomer();
- newCust.setName(namePrompt.getText().trim());
- newCust.setYear(yearPrompt.getText().trim());
- newCust.setMonth(monthPrompt.getText().trim());
- newCust.setDay(dayPrompt.getText().trim());
- setOutputObject(newCust);
-
- SystemMessage completionMsg = null;
- if (inpCust == null)
- completionMsg = SamplesPlugin.getPluginMessage(&quot;SPPD1010&quot;);
- else
- completionMsg = SamplesPlugin.getPluginMessage(&quot;SPPD1011&quot;);
- completionMsg.makeSubstitution(newCust.getName());
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), completionMsg);
- msgDlg.open();
- }
- return isPageComplete();
- }
-
- // ---------------------
- // <I>Validation methods</I>...
- // ---------------------
- /**
- * <I>Do full validation of all entry fields, optionally skipping a given one</I>.
- * <I>@return first control that is found to contain errors. Can be used to set focus</I>.
- */
- protected Control <B>validate</B>(Control controlToSkip)
- {
- Control controlInError = null;
-
- if ((controlToSkip != namePrompt.getCombo()) &amp;&amp; !validateName())
- controlInError = namePrompt.getCombo();
- if ((controlInError==null) &amp;&amp; (controlToSkip != yearPrompt) &amp;&amp; !validateYear())
- controlInError = yearPrompt;
- if ((controlInError==null) &amp;&amp; (controlToSkip != monthPrompt) &amp;&amp; !validateMonth())
- controlInError = monthPrompt;
- if ((controlInError==null) &amp;&amp; (controlToSkip != dayPrompt) &amp;&amp; !validateDay())
- controlInError = dayPrompt;
-
- return controlInError;
- }
- /**
- * <I>Validate the customer name prompt. We only ensure it is not-empty.</I>
- */
- protected boolean <B>validateName</B>()
- {
- String input = namePrompt.getText().trim();
- setErrorMessageAndPageCompletionStatus(nameValidator.validate(input));
- return (errorMessage==null);
- }
- /**
- * <I>Validate the customer birth year prompt</I>.
- */
- protected boolean <B>validateYear</B>()
- {
- String input = yearPrompt.getText().trim();
- setErrorMessageAndPageCompletionStatus(yearValidator.validate(input));
- return (errorMessage==null);
- }
- /**
- * <I>Validate the customer birth month prompt</I>.
- */
- protected boolean <B>validateMonth</B>()
- {
- String input = monthPrompt.getText().trim();
- setErrorMessageAndPageCompletionStatus(monthValidator.validate(input));
- return (errorMessage==null);
- }
- /**
- * <I>Validate the customer birth day prompt</I>.
- */
- protected boolean <B>validateDay</B>()
- {
- String input = dayPrompt.getText().trim();
- setErrorMessageAndPageCompletionStatus(dayValidator.validate(input));
- return (errorMessage==null);
- }
-
- /**
- * <I>A convenience method that issues or clears the error message on the message line</I>,
- * <I>and sets the page completion status</I>
- */
- protected void <B>setErrorMessageAndPageCompletionStatus</B>(SystemMessage errorMessage)
- {
- this.errorMessage = errorMessage;
- if (errorMessage == null)
- clearErrorMessage();
- else
- setErrorMessage(errorMessage);
- setPageComplete(isPageComplete());
- }
- /**
- * <I>Return true if the OK button can be enabled</I>.
- */
- protected boolean <B>isPageComplete</B>()
- {
- return ((errorMessage == null) &amp;&amp;
- (namePrompt.getText().trim().length()&gt;0) &amp;&amp;
- (yearPrompt.getText().trim().length()&gt;0) &amp;&amp;
- (monthPrompt.getText().trim().length()&gt;0) &amp;&amp;
- (dayPrompt.getText().trim().length()&gt;0));
- }
-}</pre>
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/renameManyDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/renameManyDialog.gif
deleted file mode 100755
index cfeb0c6cd..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/renameManyDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/renameOneDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/renameOneDialog.gif
deleted file mode 100755
index cc6256c23..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/renameOneDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/sampleDlg.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/sampleDlg.gif
deleted file mode 100755
index 0d55573b3..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/sampleDlg.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/selectTypesDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/selectTypesDialog.gif
deleted file mode 100755
index be5361af4..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/selectTypesDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/simpleSelectDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/simpleSelectDialog.gif
deleted file mode 100755
index b9bfca608..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/simpleSelectDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/uiDialogsAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/uiDialogsAPI.html
deleted file mode 100755
index 2a4725238..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/dialogs/uiDialogsAPI.html
+++ /dev/null
@@ -1,180 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Dialogs API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Dialogs API</h1>
-<p>There are two ways the Remote System Explorer API set can help you when it comes to dialogs:
-<ol>
-<li>A base dialog class from which to base your own dialog classes.
-<li>A set of re-usable dialogs for specific requirements.
-</ol>
-</p>
-
-<h2>RSE-Supplied Base Class for Dialogs</h2>
-<p>Dialogs are secondary windows that prompt the user for information or display information to the user. They are typically
-<i>modal</i>, meaning the rest of the application (in this case eclipse) is disabled while the dialog is showing.
-Eclipse supplies a raw dialog class in SWT, as well as more robust dialog class in JFace. The RSE supplies its own
-class,
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html">SystemPromptDialog</A></samp>
-in package
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/package-summary.html">org.eclipse.rse.ui.dialogs</A></samp>
-, that extends
-the JFace dialog class and adds to it the following capabilities inherited by all classes which extend it:
-</p>
-<ul>
-<li>Support for an optional visual message line at the bottom, on which messages can be displayed to the user. These can be either
-<samp>SystemMessage</samp> objects, or simple string messages. <samp><A
- href="../messages/uiMessageAPI.html#SystemMessage">SystemMessage</A></samp> objects are preferred, as using these enables a button
-beside the message line which users can press to see the details for the message. This is supported via the <samp><A
- href="../messages/uiMessageAPI.html#ISystemMessageLine">ISystemMessageLine</A></samp>
-interface, and so offers a consistent programming interface with the RSE property page and wizard page classes.
-<li>Support of automatic assignment of mnemonics for input-capable widgets such as buttons. This saves tremendous development
-effort if your user interface is translated as the assignment of unique mnemonics can be difficult after translation.
-<li>Built-in support for a number of typical push buttons at the bottom of the dialog: OK, Cancel, Browse, Test, Add and
-Details. You control via setters which buttons to show, and you can affect their label and tooltip text, although the
-default labels and tips are already translated for you. To program what happens when pressed, override the appropriate
-<samp>processXXX()</samp> method, such as <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#processOK()">processOK()</A></samp>. By default, you get OK and Cancel buttons.
-<li>Support for an optional built-in progress monitor at the bottom of the dialog, just like what eclipse offers for wizards.
-<li>Support of a simple <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#wasCancelled()">wasCancelled()</A></samp> method to easily test if the dialog was cancelled or not.
-<li>Support for methods to set an input object, and retrieving an output object, making it easy to pass in data and
-get back data. Your calling code sets the input object, your subclass code sets the output object (typically in
-its <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#processOK()">processOK()</A></samp> method) and your calling code gets the output object,
-if <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#wasCancelled()">wasCancelled()</A></samp> returns false.
-<li>Support of a <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#setPageComplete(boolean)">setPageComplete(boolean)</A></samp> method, consistent with wizard pages, to enable/disable the OK button.
-This is typically called by your keystroke and button validators. That is, if an error is detected as input is entered, a message
-is issued to the message line and the OK button is disabled.
-<li>Support of a simple <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#setHelp(java.lang.String)">setHelp(String helpId)</A></samp> method to set the dialog's popup help.
-<li>A simple way to toggle the cursor between busy and normal, using
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#setBusyCursor(boolean)">setBusyCursor(boolean)</A></samp>
-<li>Helper methods for adding <A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#addFillerLine(org.eclipse.swt.widgets.Composite, int)">filler lines</A>
-and <A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#addSeparatorLine(org.eclipse.swt.widgets.Composite, int)">separator lines</A>.
-</ul>
-<p>To create your own dialog:</p>
-<ol>
-<li>Subclass <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html">SystemPromptDialog</A></samp>, picking the appropriate constructor, the simplest
-of which simply requires the shell of the parent window and the title string for this dialog.
-<li>If buttons beyond OK and Cancel are desired, in your own constructor call the appropriate <samp>setShowXXXButton(true)</samp> methods to enable
-these buttons, and override the appropriate <samp>processXXX()</samp> methods to process these buttons when pressed by the user.
-<li>If a progress monitor is desired, in your own constructor call <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#setNeedsProgressMonitor(boolean)">setNeedsProgressMonitor(true)</A></samp>. Later, to run
-a long-running operation that displays the progress monitor, use <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#getProgressMonitor()">getProgressMonitor()</A></samp>.
-<li>Override the <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#createInner(org.eclipse.swt.widgets.Composite)">createInner(Composite)</A></samp> method to populate the client area of the dialog with SWT widgets. Typically
-you create your composite with a GridLayout layout, populate it, and return it. To ease this programming burden, use the many
-static helper methods in <samp><A href="../../../reference/api/org/eclipse/rse/ui/SystemWidgetHelpers.html">SystemWidgetHelpers</A></samp>.
-<li>Override the <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#getInitialFocusControl()">getInitialFocusControl()</A></samp> method to supply the control to get initial focus when the dialog is displayed.
-<li>Override the <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#processOK()">processOK()</A></samp> method to supply the processing for when OK is pressed. You typically first validate
-the user input, and then return true if there are no errors found.
-<li>To allow the caller to get user-entered information out of the dialog, either supply getter methods,
-or call <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#setOutputObject(java.lang.Object)">setOuputObject(Object)</A></samp>
-in your processOK logic so that your caller can code <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#getOutputObject()">getOutputObject()</A></samp>.
-</ol>
-<P>One of the more difficult efforts in building a dialog with multiple entry fields, is the code to do the validation of those entry fields. A common strategy is to add modify listeners to the entry fields, and for each one validate the data as it typed. If the validation fails, a message is issued. If the validation succeeds, then the other fields on the dialog are validated. At the end of the validation, the OK button is enabled or disabled depending on the error message status, and whether the required information has been supplied. The RSE can help with this effort, somewhat, through the use of re-usable <A
- href="../validators/uiValidatorsAPI.html">validators</A> for various types of input.<BR>
-<BR>
-Follow this <A href="dialogSample.html">link</A> for an example of a fully-formed dialog class written on top of this RSE base class, complete with
-error checking.</P>
-
-<p>Typically, after creating your dialog, you will create an action to invoke it. The RSE can help with this too, via the
-supplied <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseDialogAction.html">SystemBaseDialogAction</A></samp> base class.
-
-<h2>Dialogs Pre-Supplied by RSE</h2>
-<p>You may find some of the dialogs supplied by the RSE to be immediately re-usable in your own code, saving some
-development and test effort. All these dialogs are in package <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/package-summary.html">org.eclipse.rse.ui.dialogs</A></samp>:
-</p>
-
-
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Class</TH>
- <TH>Description</TH>
- <TH>Sample</TH>
- <TH>Action</TH>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemRenameDialog.html">SystemRenameDialog</A></samp></TD>
- <TD>Rename multiple items. Provides a table listing the old names and new names, which are editable. If your input objects
- do not adapt to <samp><A href="../../../reference/api/org/eclipse/rse/ui/view/ISystemViewElementAdapter.html">ISystemViewElementAdapter</A></samp>
- or <samp><A href="../../../reference/api/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.html">ISystemRemoteElementAdapter</A></samp>,
- you should call <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemRenameDialog.html#setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator)">setNameValidator</A></samp> to specify a validator that ensures the new name is correct, and your
- input objects should also either be IResource objects or implement
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/ISystemTypedObject.html">ISystemTypedObject</A></samp>.
- </TD>
- <TD align="center"><A href="renameManyDialog.gif">Sample image</A></TD>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemCommonRenameAction.html">SystemCommonRenameAction</A></samp></TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.html">SystemRenameSingleDialog</A></samp></TD>
- <TD>Rename a single item. Provides a simple entry field for the new name. If your input object
- does not adapt to <samp><A href="../../../reference/api/org/eclipse/rse/ui/view/ISystemViewElementAdapter.html">ISystemViewElementAdapter</A></samp> or
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.html">ISystemRemoteElementAdapter</A></samp>,
- you should call <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.html#setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator)">setNameValidator</A></samp> to specify a validator that ensures the new name is correct, and your
- input object should also either be an IResource object or implement <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/ISystemTypedObject.html">ISystemTypedObject</A></samp>.
- </TD>
- <TD align="center"><A href="renameOneDialog.gif">Sample image</A></TD>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemCommonRenameAction.html">SystemCommonRenameAction</A></samp></TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemDeleteDialog.html">SystemDeleteDialog</A></samp></TD>
- <TD>Confirm delete of one or more items. Provides a table listing the names of input objects. If your input objects
- do not adapt to <samp><A href="../../../reference/api/org/eclipse/rse/ui/view/ISystemViewElementAdapter.html">ISystemViewElementAdapter</A></samp> or
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.html">ISystemRemoteElementAdapter</A></samp>,
- your input objects should either be IResource objects or implement <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/ISystemTypedObject.html">ISystemTypedObject</A></samp>.
- </TD>
- <TD align="center"><A href="deleteDialog.gif">Sample image</A></TD>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemCommonDeleteAction.html">SystemCommonDeleteAction</A></samp></TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemSelectFileTypesDialog.html">SystemSelectFileTypesDialog</A></samp></TD>
- <TD>Presents a dialog listing all the file types defined in the eclipse File Associations preferences page, and
- allows the user to select one or more of these types, or enter additional types not defined in eclipse.</TD>
- <TD align="center"><A href="selectTypesDialog.gif">Sample image</A></TD>
- <TD><samp></samp></TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemSimpleSelectDialog.html">SystemSimpleSelectDialog</A></samp></TD>
- <TD>Eclipse has a CheckboxTreeViewer that is designed to allow the user to select multiple items from a hierarchical model.
- This is a nice viewer, but very difficult to program to, as you have to handle reflecting the state of the selected children
- for each parent node yourself. This dialog makes that trivial. The trick is to create wrappers of your model objects using
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemSimpleContentElement.html">SystemSimpleContentElement</A></samp>, maintaining the parent/child hierarchy, and pass the root element to the dialog. The rest is
- done for you, and the result is the selected state set for those elements selected by the user. Note this can also be used
- as a simple flat list checkbox selection dialog, just by passing a non-visible root with a flat list of children.</TD>
- <TD align="center"><A href="simpleSelectDialog.gif">Sample image</A></TD>
- <TD>None</TD>
- </TR>
-
- </TBODY>
-</TABLE>
- <P><BR>While the dialogs can be instantiated directly, it is perhaps best to use them by instantiating their action class, and calling the run method on it.
-The action classes are all in <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/package-summary.html">org.eclipse.rse.ui.actions</A></samp> package.
-</P>
- <p>In addition to these universal dialogs, there are dialogs specific to the predefined Files subsystem. These enable selection of remote files or folders. They can be found in the <a href="../../../reference/api/org/eclipse/rse/files/ui/dialogs/package-summary.html"><samp>org.eclipse.rse.files.ui.dialogs</samp></a> package.</p>
- <TABLE border="1">
- <TBODY>
- <TR>
- <TH>Class</TH>
- <TH>Description</TH>
- <TH>Sample</TH>
- <TH>Action</TH>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.html">SystemSelectRemoteFileOrFolderDialog</A></samp></TD>
- <TD>Allows users to select a remote file, or folder (configurable) using a dialog similar to what is used in Eclipse for local file or
- folder selection. Can be configured to allow user to select from any existing connection, or to be scoped to a particular connection,
- or even a particular folder in a particular connection.
- </TD>
- <TD align="center"><A href="browseFolderDialog.gif">Sample image</A></TD>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.html">SystemSelectRemoteFileAction</A></samp> or
- <samp><A href="../../../reference/api/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.html">SystemSelectRemoteFolderAction</A></samp></TD>
- </TR>
- </TBODY>
-</TABLE>
- <P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/logger/logPreferences.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/logger/logPreferences.gif
deleted file mode 100755
index 9d465a218..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/logger/logPreferences.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/logger/uiLoggerAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/logger/uiLoggerAPI.html
deleted file mode 100755
index 4160df436..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/logger/uiLoggerAPI.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Logger API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Logger API</h1>
-<p>To use the RSE logging framework, you must first decide if you want your own log file,
-or want to use the common RSE log file.
-</p>
-
-<h2>Using Your Own Log File</h2>
-<p>
-The log file support is encapsulated in a separate plugin, <b><samp>org.eclipse.rse.logging</samp></b>, which
-defines the primary <samp><A href="../../../reference/api/org/eclipse/rse/logging/Logger.html">org.eclipse.rse.logging.Logger</a></samp> class that manages the log file.
-This log file support offers the ability to log the following types of log messages:</p>
-<ul>
-<li><b>Error</b>. These are serious errors detected by your programming logic.
-<li><b>Warning</b>. These are warning situations detected by your programming logic.
-<li><b>Information</b>. These are informational messages you want to capture to help with problem determination.
-<li><b>Debug</b>. These are trace statements typically only enabled in development drivers.
-</ul>
-
-<p>To define your own logging file, in your plugin class:</p>
-<ol>
-<li>Define a static variable to hold the Logger instance, as in:<br>
-<code>protected static Logger log = null;</code>
-<li>Instantiate the Logger object, in your plugin class constructor, as in:<br>
- <code>if (log == null) log = LoggerFactory.getLogger(this);</code>
-<li>For convenience, offer fastpaths to the logXXX methods in your Logger instance:
-<pre>
- public static void <b>logInfo</b>(String message)
- {
- log.logInfo(message);
- }
- public static void <b>logWarning</b>(String message)
- {
- log.logWarning(message);
- }
- public static void <b>logError</b>(String message)
- {
- log.logError(message, null);
- }
- public static void <b>logError</b>(String message, Throwable exception)
- {
- log.logError(message, exception);
- }
- public static void <b>logDebugMessage</b>(String prefix, String message)
- {
- log.logDebugMessage(prefix, message);
- }
-</pre>
-<li>In the <samp>shutdown</samp> method of your plugin class, close the log file:
-<code>LoggerFactory.freeLogger(this); </code>
-</ol>
-<p>Typically your code will write a healthy number of messages to the log file, to help you determine
-what went wrong in an error situation in production. However, since this can result in a large number of
-messages in the log file, it is recommended that you offer the user's a preference page in which they
-can specify the types of messages to record in the log file, which should default to error messages only.
-In the event of a problem, they can then turn on a more verbose logging option and re-produce the problem,
-sending the log file to you for additional information. For example, for the Remote System Explorer, this
-preference page is supplied:</p>
-<P><IMG border="0" src="logPreferences.gif"></P>
-
-<h2>Using The Common RSE Log File</h2>
-<p>To log your messages to the common RSE log file in <samp>.metadata\plugins\org.eclipse.rse.ui</samp>,
-either base your plugin class on the <samp>org.eclipse.rse.core.SystemBasePlugin</samp> class and use
-the inherited logging methods, or instead of instantiating your own <samp>Logging</samp> object, re-use the
-RSE-supplied logging object by calling <samp>getDefault().getLog()</samp> in the <samp>org.eclipse.rse.ui.RSEUIPlugin</samp>
-class.
-</p>
-
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/massagers/uiMassagersAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/massagers/uiMassagersAPI.html
deleted file mode 100755
index 38216f1c0..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/massagers/uiMassagersAPI.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Massagers API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Massagers API</h1>
-<p>In addition to <a href="../validators/uiValidatorsAPI.html">validating</a> what a user types, we often need
-to transform it prior to saving. For example, we may need to fold it to uppercase or lowercase. The RSE abstracts
-and encapsulates this concept into massagers which can be re-used. A few are pre-supplied by RSE.
-</p>
-
-<h2>RSE Massager Interfaces</h2>
-<p>The <samp><A href="../../../reference/api/org/eclipse/rse/ui/ISystemMassager.html">ISystemMassager</A></samp> interface is in package
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/package-summary.html">org.eclipse.rse.ui</A></samp>.
-It is a very simple interface with one method:
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/ISystemMassager.html#massage(java.lang.String)">public String massage(String text)</A></samp>.
-Given input text, return the massaged text. While simple, by encapsulating this operation into an interface,
-you will be able to write re-usable dialogs that take a massager as input. Further, tricky massaging can be
-built as a re-usable object.
-</p>
-
-<h2>RSE-Supplied Massagers</h2>
-<p>The RSE supplies the following massagers in package <samp><A href="../../../reference/api/org/eclipse/rse/ui/package-summary.html">org.eclipse.rse.ui</A></samp>:
-</p>
-<BR>
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Massager Class</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/MassagerFoldCase.html">MassagerFoldCase</A></samp></TD>
- <TD>Simply folds the text to uppercase or lowercase</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/MassagerFoldCaseOutsideQuotes.html">MassagerFoldCaseOutsideQuotes</A></samp></TD>
- <TD>Folds the text to uppercase or lowercase, except parts of the text that are surrounded by quotes or any given delimiter characters</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/MassagerFoldCaseUnlessQuoted.html">MassagerFoldCaseUnlessQuoted</A></samp></TD>
- <TD>Folds the text to uppercase or lowercase, unless the whole text is surrounded by quotes or any given delimiter character</TD>
- </TR>
- </TBODY>
-</TABLE>
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgDialog.gif
deleted file mode 100755
index 7098dd018..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_dialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_dialog.gif
deleted file mode 100755
index 846ba78ae..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_dialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_properties.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_properties.gif
deleted file mode 100755
index f293841e6..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_properties.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_wizard.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_wizard.gif
deleted file mode 100755
index 9b9d58300..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgLine_wizard.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgSample_msgDlg.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgSample_msgDlg.gif
deleted file mode 100755
index 36829fe99..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgSample_msgDlg.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgSample_msgline.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgSample_msgline.gif
deleted file mode 100755
index 970377d5b..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/msgSample_msgline.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/sampleMessageFile.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/sampleMessageFile.html
deleted file mode 100755
index 5888bfc06..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/sampleMessageFile.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>Sample Message File</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Sample Message File</h1>
-<p>This is an example of a simple message file, say in <samp>sampleMessages.xml</samp>, which has defined messages for only a single component.
-<pre>
-
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;!DOCTYPE MessageFile SYSTEM "../org.eclipse.rse.ui/messageFile.dtd"&gt;
-&lt;!-- <I>This is an exammple of a message file used by SystemMessage and SystemMessageDialog</I> --&gt;
-&lt;MessageFile Version="1.0"&gt;
- &lt;Component Name="Samples Plugin" Abbr="<B>SPP</B>"&gt;
- &lt;Subcomponent Name="Dialogs" Abbr="<B>D</B>"&gt;
- &lt;!-- Component 'D' for dialog sample messages --&gt;
- &lt;MessageList&gt;
-<A name="SPPD1000"></A> &lt;Message ID="<B>1000</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;You must enter a name&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;You have left the customer name empty. Specify a name.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1001"></A> &lt;Message ID="<B>1001</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;You must enter a birth year&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;You have left the birth year empty. Specify a year.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1002"></A> &lt;Message ID="<B>1002</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;%1 is not a valid year&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;The birth year specified is not within the valid range of %2 to %3.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1003"></A> &lt;Message ID="<B>1003</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;Year %1 is out of range&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;The value you specified for the birth year is not a valid number.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1004"></A> &lt;Message ID="<B>1004</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;You must enter a birth month&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;You have left the birth month empty. Specify a month.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1005"></A> &lt;Message ID="<B>1005</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;%1 is not a valid month&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;The value you specified for the birth month is not a valid number.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1006"></A> &lt;Message ID="<B>1006</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;Month %1 is out of range&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;The birth month specified is not within the valid range of %2 to %3.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1007"></A> &lt;Message ID="<B>1007</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;You must enter a birth day&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;You have left the birth day empty. Specify a day.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1008"></A> &lt;Message ID="<B>1008</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;%1 is not a valid day&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;The value you specified for the birth day is not a valid number.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1009"></A> &lt;Message ID="<B>1009</B>" Indicator="E"&gt;
- &lt;LevelOne&gt;Day %1 is out of range&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;The birth day specified is not within the valid range of %2 to %3.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1010"></A> &lt;Message ID="<B>1010</B>" Indicator="I"&gt;
- &lt;LevelOne&gt;Customer %1 created successfully. Re-run to see update mode.&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;The customer was created. Re-running the same sample action will show the dialog in update mode.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
-<A name="SPPD1011"></A> &lt;Message ID="<B>1011</B>" Indicator="I"&gt;
- &lt;LevelOne&gt;Customer %1 updated successfully.&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;Congratulations!&lt;/LevelTwo&gt;
- &lt;/Message&gt;
- &lt;/MessageList&gt;
- &lt;/Subcomponent&gt;
- &lt;/Component&gt;
-&lt;/MessageFile&gt;
-</pre>
-
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessageAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessageAPI.html
deleted file mode 100755
index 8018d11cc..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessageAPI.html
+++ /dev/null
@@ -1,154 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Message API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Message API</h1>
-<p>To work with messages, which are defined in an xml <a href="uiMessageFile.html">message file</a>,
-you use:
-</p>
-<ul>
-<li>Static methods in the
-<samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html"org.eclipse.rse.core.SystemBasePlugin</A></samp>
-class to load the message file and extract messages from it.
-<li>Classes in the
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/messages/package-summary.html">org.eclipse.rse.ui.messages</A></samp>
-package to do variable substitution, and display the messages to the user.
-</ul>
-
-<h2>Methods for Parsing the Message File</h2>
-<p>Once you have defined your message file, you must update your plugin class to load it at startup time.
-To do this, simply call the static method
-<samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#loadMessageFile(org.eclipse.core.runtime.IPluginDescriptor, java.lang.String)">loadMessageFile</a></samp>
-in the RSE-supplied <samp><a href="../plugin/uiPluginAPI.html">SystemBasePlugin</a></samp> class.
-<BR>
-<BR>
-After the message file is loaded into memory, you can extract messages from it by calling the static method
-<samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getMessage(org.eclipse.rse.ui.messages.SystemMessageFile, java.lang.String)">getMessage</a></samp>
-from the same <samp><a href="../plugin/uiPluginAPI.html">SystemBasePlugin</a></samp> class.
-</p>
-
-<h2>Classes for Displaying Messages</h2>
-<p>The following classes are all defined in the <samp><A href="../../../reference/api/org/eclipse/rse/ui/messages/package-summary.html">org.eclipse.rse.ui.messages</a></samp> package. </p>
-
-<h3><A name="SystemMessageFile"></A>The <samp>SystemMessageFile</samp> Class</h3>
-<p>The <samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#loadMessageFile(org.eclipse.core.runtime.IPluginDescriptor, java.lang.String)">loadMessageFile</a></samp> method in <samp>SystemBasePlugin</samp>, returns an instance of
-<samp><A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.html">SystemMessageFile</a></samp>,
-representing the parsed message file. It is methods in this which return individual messages.
-<h3><A name="SystemMessage"></A>The <samp>SystemMessage</samp> Class</h3>
-The <samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getMessage(org.eclipse.rse.ui.messages.SystemMessageFile, java.lang.String)">getMessage</a></samp> method in <samp>SystemBasePlugin</samp> returns an instance of
-<samp><A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/SystemMessage.html">SystemMessage</a></samp>,
-representing an individual message from the message file.
-</p>
-<p>To do message <i>variable substitution</i>, call the appropriate overload of the <samp>makeSubstitution</samp> method in
-the <A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/SystemMessage.html">message</A> object, passing as many parameters as there are unique substitution variables in the message.
-</p>
-<p>To get the first level message text, call <samp><A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/SystemMessage.html#getLevelOneText()">getLevelOneText</a></samp> on the message object. To get
-the second level help, call <samp><A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/SystemMessage.html#getLevelTwoText()">getLevelTwoText</a></samp>.
-</p>
-
-<h3><A name="SystemMessageDialog"></A>The <samp>SystemMessageDialog</samp> Class</h3>
-<p>To display a message in a dialog, instantiate <samp><A href="../../../reference/api/org/eclipse/rse/ui/messages/SystemMessageDialog.html">SystemMessageDialog</a></samp>, passing
-in a parent shell and the message object, and then call the appropriate <samp><A href="../../../reference/api/org/eclipse/rse/ui/messages/SystemMessageDialog.html#open()">open</a></samp> method in the dialog object. Here is what the message
-dialog looks like, for a message of type Error (the type dictates the error icon):
-</p>
-<P><IMG border="0" src="msgDialog.gif" width="457" height="190"></P>
-
-<h3><A name="ISystemMessageLine"></A>The <samp>ISystemMessageLine</samp> Interface</h3>
-<p>If you are extending the RSE class <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html">SystemPromptDialog</a></samp> for dialogs,
-or <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.html">AbstractSystemWizardPage</a></samp> for wizard pages
-or <samp><A href="../../../reference/api/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.html">SystemBasePropertyPage</a></samp> for property pages, you can display the message to the
-user by calling the <samp><A href="../../../reference/api/org/eclipse/rse/ui/messages/ISystemMessageLine.html#setErrorMessage(org.eclipse.rse.ui.messages.SystemMessage)">setErrorMessage</a></samp> method all these classes support. These classes all implement
-the interface <b><samp><A href="../../../reference/api/org/eclipse/rse/ui/messages/ISystemMessageLine.html">ISystemMessageLine</a></samp></b>, which also includes the method <samp>clearErrorMessage</samp>. For non-error
-messages, use <samp><A href="../../../reference/api/org/eclipse/rse/ui/messages/ISystemMessageLine.html#setMessage(org.eclipse.rse.ui.messages.SystemMessage)">setMessage</a></samp>
-and <samp><A href="../../../reference/api/org/eclipse/rse/ui/messages/ISystemMessageLine.html#clearMessage()">clearMessage</a></samp>.</p>
-<p>
-Here is what a system message issued in a <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html">SystemPromptDialog</a></samp> dialog looks like:</p>
-<P><IMG border="0" src="msgLine_dialog.gif" width="264" height="125"></P>
-<p>The user can select the question mark icon on the right to see the full message dialog, and hence access the second level help for the message.
-<p>Here is what a system message issued in an <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.html">AbstractSystemWizardPage</a></samp> looks like:</p>
-<P><IMG border="0" src="msgLine_wizard.gif" width="439" height="98"></P>
-<p>If the user clicks the mouse on the message or icon, they will see the full message dialog for the message.</p>
-
-<p>Here is what a system message issued in a <samp><A href="../../../reference/api/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.html">SystemBasePropertyPage</a></samp> looks like:</p>
-<P><IMG border="0" src="msgLine_properties.gif" width="491" height="75"></P>
-<p>Again, if the user clicks the mouse on the message or icon, they will see the full message dialog for the message.</p>
-
-<h2>Classes for Displaying Message Exceptions</h2>
-<p>The following class is defined in the <samp><A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/package-summary.html">org.eclipse.rse.services.clientserver.messages</a></samp> package.
-
-<h3>The <samp>SystemMessageDialog</samp> Class</h3>
-<p>Many of the RSE APIs throw <samp><A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/SystemMessageException.html">org.eclipse.rse.services.clientserver.messages.SystemMessageException</a></samp>, which
-encapsulates a system message object. To get the encapsulated message, call <samp><A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/SystemMessageException.html#getSystemMessage()">getSystemMessage()</a></samp>.
-To display the message in an RSE message dialog box, simply call <samp><A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/SystemMessageException.html#displayMessage()">displayMessage()</a></samp> on the exception object.
-To get the first-level text, call <samp>getMessage()</samp>, or <samp>getSystemMessage().getLevelOneText()</samp>
-</p>
-
-<h1>Message Example</h1>
-<h2>Declaring the Messages</h2>
-<p>Declare the messages via the <samp>Message</samp> tag in a <a href="uiMessageFile.html">message file</a>, such as <samp>sampleMessages.xml</samp>
-<pre>&lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
-&lt;!DOCTYPE MessageFile SYSTEM &quot;../org.eclipse.rse.ui/messageFile.dtd&quot;&gt;
-&lt;!-- This is an exammple of a message file used by SystemMessage and SystemMessageDialog --&gt;
-&lt;MessageFile Version=&quot;1.0&quot;&gt;
- &lt;Component Name=&quot;Samples Plugin&quot; Abbr=&quot;<B>SPP</B>&quot;&gt;
- &lt;Subcomponent Name=&quot;Dialogs&quot; Abbr=&quot;<B>D</B>&quot;&gt;
- &lt;!-- Component 'D' for dialog sample messages --&gt;
- &lt;MessageList&gt;
- &lt;Message ID=&quot;<B>1003</B>&quot; Indicator=&quot;E&quot;&gt;
- &lt;LevelOne&gt;%1 is not a valid year&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;The birth year specified is not within the valid range of %2 to %3.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
- &lt;!-- <I>repeat Message elements as needed</I> --&gt;
- &lt;/MessageList&gt;
- &lt;/Subcomponent&gt;
- &lt;/Component&gt;
-&lt;/MessageFile&gt;
-</pre>
-
-<h2>Processing the Message File</h2>
-In your plugin class, declare a message file static variable, load the message file in the constructor, and
-supply a static method for retrieving a message from the file.
-<pre>import org.eclipse.rse.ui.messages.*; // <I>for message file classes</I>
-import org.eclipse.rse.core.*; // <I>for SystemBasePlugin</I>
-<B>...</B>
-private static SystemMessageFile messageFile = null;
-<B>...</B>
-messageFile = SystemBasePlugin.loadMessageFile(descriptor, &quot;sampleMessages.xml&quot;); // <I>in constructor</I>
-<B>...</B>
-
-/**
- * <I>Retrieve a message from this plugin's message file</I>
- * <I>@param msgId - the ID of the message to retrieve. This is the concatenation of the</I>
- * <I>message's component abbreviation, subcomponent abbreviation, and message ID as declared</I>
- * <I>in the message xml file.</I>
- */
-<A name="getPluginMessage"></A>public static SystemMessage <B>getPluginMessage</B>(String msgId)
-{
- return SystemBasePlugin.getMessage(messageFile, msgId);
-}</pre>
-
-<h2>Retrieving the Message</h2>
-<pre>SystemMessage errorMessage = SamplesPlugin.getPluginMessage("SPPD1003");
-errorMessage.makeSubstitution(input, &quot;1900&quot;, &quot;2003&quot;);</pre>
-
-<h2>Displaying the Message</h2>
-<h3>On a Message Line</h3>
-<pre>setErrorMessage(errorMessage);</pre>
-
-<P><IMG border="0" src="msgSample_msgline.gif" width="227" height="208"></P>
-<h3>In a Message Dialog</h3>
-<pre>SystemMessageDialog msgDlg = new SystemMessageDialog(shell, errorMessage);</br>msgDlg.open(); // <I>to open with details not showing</I>
-//msgDlg.openWithDetails(); // <I>to open with details already showing</I> </pre>
-
-<P><IMG border="0" src="msgSample_msgDlg.gif" width="457" height="190"></P>
-<P><BR>
-</P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessageFile.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessageFile.html
deleted file mode 100755
index af83cab09..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessageFile.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Message File</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Message File</h1>
-<p>To exploit the message framework in RSE, you start by create an message file, named
-say <samp>mymessages.xml</samp>, which looks something like this:
-<pre>
-&lt;?xml version="1.0" encoding='UTF-8'?&gt;
-&lt;!-- This is a sample message file --&gt;
-&lt;MessageFile Version="1.0"&gt;
- &lt;Component Name="ACME Tools" Abbr="ACME"&gt;
- &lt;Subcomponent Name="General" Abbr="G"&gt;
- &lt;MessageList&gt;
- &lt;Message ID="1001" Indicator="E"&gt;
- &lt;LevelOne&gt;You made a mistake&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;Fix your mistake, then re-attempt the operation.&lt;/LevelTwo&gt;
- &lt;/Message&gt;
- &lt;/MessageList&gt;
- &lt;/Subcomponent&gt;
- &lt;/Component&gt;
-&lt;/MessageFile&gt;
-</pre>
-
-<h2>RSE Message File Elements</h2>
-<p>Typically, this file is created in plugin project's root folder.</p>
-<p>The important elements in this file are:
-</p><TABLE border="1">
- <TBODY>
- <TR>
- <TH>Element</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD>MessageFile</TD>
- <TD>The overall element for the file. There is only one of these tags.</TD>
- </TR>
- <TR>
- <TD>Component</TD>
- <TD>Identifies a course-grained component within your plugin. You can specify multiple component tags. It is up to you to decide<BR>how many components to divide your plugin into. The abbreviation (Abbr) of the component constitutes the first part of the message ID for messages defined in this component, aiding in servicing when an error message is reported.
- </TD>
- </TR>
- <TR>
- <TD>Subcomponent</TD>
- <TD>Identifies a fine-grained subcomponent within a component. The abbreviation (Abbr) of the subcomponent is appended to the component's abbreviation when the message ID is created for messages in this subcomponent. It is up to you to decide how many subcomponents to divide your component into, and what to name them.</TD>
- </TR>
- <TR>
- <TD>MessageList</TD>
- <TD>Simply encapsulates the list of Message elements for this subcomponent.</TD>
- </TR>
- <TR>
- <TD>Message</TD>
- <TD>Defines a message. <BR>
- The <b>ID</b> attribute can be anything you like, but following a naming or numbering convention is a good idea. The ID is appended to the component and subcomponent abbreviations to form the message ID the user will see.
- <BR>The <b>Indicator</b> attribute identifies the severity of the message: <b>I</b> for Information, <b>E</b> for Error, <b>W</b> for Warning, <b>U</b> for Unexpected, and <b>Q</b> for Question. This affects the icon that will be used for this message, and the buttons allowed on the message dialog.
- </TD>
- </TR>
- <TR>
- <TD>LevelOne</TD>
- <TD>The first-level message the user will initially see. Use %n for substitution variables, where n is a positive integer incrementing up from 1.</TD>
- </TR>
- <TR>
- <TD>LevelTwo</TD>
- <TD>The second-level help for the message, the user will only see if they ask to see it. Use %n for substitution variables. Any variable used here and in the LevelOne text will be consistently substituted with the same value.</TD>
- </TR>
- </TBODY>
-</TABLE>
-
-<h2>RSE Message File Sample</h2>
-<p>This is a bigger <A href="sampleMessageFile.html">sample</A>.</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessagesCore.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessagesCore.html
deleted file mode 100755
index 1258ef57e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessagesCore.html
+++ /dev/null
@@ -1,1010 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<TITLE> Message File systemmessages.xml </TITLE>
-<style type="text/css">
-h2 { background-color: #CCCCFF }
-</style>
-</HEAD>
-<BODY>
-<H1>Remote System Explorer Messages</H1>
-<br>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Sub-Component Summary</B></FONT></TD>
-</TR>
-<TR BGCOLOR="white">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%">
-<A href=#General>General</A></TD>
-<TD><b>Message prefix</b>=RSEG</TD></TR>
-<TR BGCOLOR="white">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%">
-<A href=#Other>Other</A></TD>
-<TD><b>Message prefix</b>=RSEO</TD></TR>
-<TR BGCOLOR="white">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%">
-<A href=#Files>Files</A></TD>
-<TD><b>Message prefix</b>=RSEF</TD></TR>
-<TR BGCOLOR="white">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%">
-<A href=#Communications>Communications</A></TD>
-<TD><b>Message prefix</b>=RSEC</TD></TR>
-</TABLE>
-<A NAME="General"><!-- --></A><H2>General Messages</H2>
-<H3>RSEG1001</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Under construction<br>
-<b>LevelTwo: </b>This function is not yet available.<br>
-<H3>RSEG1002</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>This will reload the Remote System Explorer. Are you sure?<br>
-<b>LevelTwo: </b>This action should only be used after receiving files from a team repository. It reloads the RSE from the workspace, incorporating the new files.<br>
-<H3>RSEG1003</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>An unexpected exception has occurred<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEG1006</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter name<br>
-<b>LevelTwo: </b>You must enter a name in the field where the cursor is positioned.<br>
-<H3>RSEG1007</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Name in use<br>
-<b>LevelTwo: </b>This name is already used by another resource. Enter a unique name.<br>
-<H3>RSEG1008</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Name not valid<br>
-<b>LevelTwo: </b>The name entered does not have valid syntax<br>
-<H3>RSEG1009</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>You must rename %1<br>
-<b>LevelTwo: </b>You have left the new name the same as the old name. Enter a new name that is different from the old name.<br>
-<H3>RSEG1010</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Name %1 is specified more than once<br>
-<b>LevelTwo: </b>Two or more resources have been renamed to the same new name. Each resource must have a unique name.<br>
-<H3>RSEG1011</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Name %1 not valid<br>
-<b>LevelTwo: </b>The name %1 does not have valid syntax<br>
-<H3>RSEG1012</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter new name<br>
-<b>LevelTwo: </b>You have the new name entry field empty. You must enter a unique new name.<br>
-<H3>RSEG1013</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Expand failed or canceled. Try again.<br>
-<b>LevelTwo: </b>When expanding a node in the tree, and retrieving the resources, either an error occurred or you cancelled the operation. The expand is cancelled.<br>
-<H3>RSEG1014</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter profile name<br>
-<b>LevelTwo: </b>You must enter a name for the profile. Profiles contain all connections, filters and user defined actions. They are shared by the team, but each team member sees only those profiles which are active. Each profile can be private to you, or used by the whole team if all team members make the profile active. The name should reflect this. That is, if the profile is to be private to you, pick a name that is least likely to collide with a name chosen by other team members.<br>
-<H3>RSEG1015</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Profile of that name already exists<br>
-<b>LevelTwo: </b>There is already a profile of that name. Choose a unique name for the profile.<br>
-<H3>RSEG1016</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Not a valid profile name<br>
-<b>LevelTwo: </b>Profiles ultimate are folders in the file system, so profile names must be valid folder names for the workbench. Further, they must not contain pound signs (#) or exceed 100 characters in length. Profile names are not case sensitive, but are case tolerant.<br>
-<H3>RSEG1017</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter number<br>
-<b>LevelTwo: </b>The value %1 you entered is not numeric. Enter only numeric input.<br>
-<H3>RSEG1018</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Name not valid as folder name<br>
-<b>LevelTwo: </b>The name must be a valid folder name within the workbench and the underlying file system.<br>
-<H3>RSEG1019</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Name not valid as file name<br>
-<b>LevelTwo: </b>The name must be a valid file name within the workbench and the underlying file system.<br>
-<H3>RSEG1020</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter system type<br>
-<b>LevelTwo: </b>You must select a system type. The system type is the type of the operating system of the remote sytem.<br>
-<H3>RSEG1021</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter connection name<br>
-<b>LevelTwo: </b>You must enter a connection name. This name is arbitrary, but must be unique to the selected profile.<br>
-<H3>RSEG1022</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Connection name is not unique for its profile<br>
-<b>LevelTwo: </b>Connection names must be unique to the profile that contains the connection. Specify a name not already in use.<br>
-<H3>RSEG1023</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Not a valid connection name<br>
-<b>LevelTwo: </b>The connection name is not syntactically valid. The name must be a valid folder name within the workbench and the underlying file system.<br>
-<H3>RSEG1024</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter host name or ip address<br>
-<b>LevelTwo: </b>You must specify a host name or TCP/IP address for the remote system.<br>
-<H3>RSEG1025</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter user ID<br>
-<b>LevelTwo: </b>You must specify a user ID to be used to connect to the system.<br>
-<H3>RSEG1026</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Not a valid user ID<br>
-<b>LevelTwo: </b>The user ID entered is not syntactically valid. The only restriction for a user ID is that it not use the characters '=' or ';'.<br>
-<H3>RSEG1027</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter port number<br>
-<b>LevelTwo: </b>You must specify a port number that is used to connect with the server-side communication layer.<br>
-<H3>RSEG1028</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Not a valid port number<br>
-<b>LevelTwo: </b>The value you entered is not a valid port number. It must be a positive integer.<br>
-<H3>RSEG1029</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter value<br>
-<b>LevelTwo: </b>You must enter a value in the field where the cursor is.<br>
-<H3>RSEG1030</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Entry is not unique<br>
-<b>LevelTwo: </b>The value you entered is already in use. Specify a value that is not already in use.<br>
-<H3>RSEG1031</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Syntax is not valid<br>
-<b>LevelTwo: </b>The syntax of the value at the cursor position is not valid.<br>
-<H3>RSEG1032</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter path<br>
-<b>LevelTwo: </b>You must specify a file system path.<br>
-<H3>RSEG1033</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Path is not unique<br>
-<b>LevelTwo: </b>The path you specified is already in use.<br>
-<H3>RSEG1034</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Path syntax is not valid<br>
-<b>LevelTwo: </b>The syntax of the path you specified is not valid. Enter a file system path that is valid for the remote operating system.<br>
-<H3>RSEG1035</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter password<br>
-<b>LevelTwo: </b>You must specify your password.<br>
-<H3>RSEG1036</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Password has expired<br>
-<b>LevelTwo: </b>Your password has expired, and must be reset before continuing.<br>
-<H3>RSEG1037</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter filter pool name<br>
-<b>LevelTwo: </b>You must specify a name for your filter pool. Filter pool names are arbitrary, but typically reflect the contents of the filters, such as "Release 1" or "Accounts Payable".<br>
-<H3>RSEG1038</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter pool name already exists in this profile<br>
-<b>LevelTwo: </b>A filter pool with this name already exists in the profile.<br>
-<H3>RSEG1039</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter pool name not valid<br>
-<b>LevelTwo: </b>The filter pool name you specified is not a valid name. The name must be a valid folder name in the workbench, and must not contain the pound sign '#'. It must also not exceed 50 characters in length.<br>
-<H3>RSEG1040</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Profile name %1 is reserved<br>
-<b>LevelTwo: </b>The given profile name is reserved by IBM. Specify another name for the profile.<br>
-<H3>RSEG1042</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter filter name<br>
-<b>LevelTwo: </b>You must specify a name for your filter. You can specify any name you like. Choose a name that tells others the contents of this filter. For example, "Source Files for Release 1".<br>
-<H3>RSEG1043</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter name already exists in this filter pool<br>
-<b>LevelTwo: </b>The filter name you specified is in use. You must specify a name unique for the parent filter pool.<br>
-<H3>RSEG1044</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter name not valid<br>
-<b>LevelTwo: </b>The filter name you specified is not a valid name. The name must be a valid file name in the workbench, and must not contain the pound sign '#'. It must also not exceed 100 characters in length.<br>
-<H3>RSEG1045</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter filtering information<br>
-<b>LevelTwo: </b>You must specify filtering information<br>
-<H3>RSEG1046</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter string already exists<br>
-<b>LevelTwo: </b>You specified a filter string which already exists in this filter. Having duplicate filter strings will result in duplicate resources in the expanded filter. Specify unique filter strings, preferably which result in unique resources. For example, don't specify both ABC* and A*.<br>
-<H3>RSEG1047</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter string not valid<br>
-<b>LevelTwo: </b>The filter string you specified is not syntactically correct.<br>
-<H3>RSEG1048</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Duplicate filter string '%1'.<br>
-<b>LevelTwo: </b>You have defined the same filter string twice or more. This will result in multiple copies of the same resource, when this filter is expanded. Delete the redundant filter strings.<br>
-<H3>RSEG1049</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter string '%1' already exists in filter %2<br>
-<b>LevelTwo: </b>This filter string cannot be copied or moved to the target filter. The same filter string already exists there<br>
-<H3>RSEG1050</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Save to disk failed with an unexpected exception<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEG1051</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Restore of data failed with unexpected exception<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEG1052</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Delete selected resources?<br>
-<b>LevelTwo: </b>This is a permanent deletion of the selected resources and cannot be undone<br>
-<H3>RSEG1053</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Delete profile '%1'?<br>
-<b>LevelTwo: </b>Do you want to delete this profile, including all of its connections, filters and user actions? Select Yes to delete, or No to cancel the delete request<br>
-<H3>RSEG1054</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Connecting to %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1055</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Connecting to %1 at port %2<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1056</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Connect to %1 failed with an unexpected exception<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEG1057</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Connect failed. Host %1 not found or not responding<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1058</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Connect to %1 was cancelled<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1059</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Disconnecting from %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1060</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Disconnecting from %1 at port %2<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1061</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Disconnect from %1 failed with exception<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEG1062</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Disconnect from %1 was cancelled<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1063</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Unexpected error deleting %1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEG1064</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Unexpected error renaming %1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEG1065</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unexpected error moving %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1066</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Operation failed with exception '%1'<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1067</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Operation cancelled.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1068</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>Warning. Profile '%1' should be made active. Active connection '%2' contains a reference to it.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1069</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>Warning. Profile '%1' should be active. Active connection '%2' contains a reference to it.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1070</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Resolving %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1071</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Running %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1072</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying '%1' to '%2'<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1073</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying connection %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1074</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying connections<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1075</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying filter pools<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1076</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying filter pool %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1077</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying filters<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1078</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying filter %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1079</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying filter strings<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1080</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying filter string %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1081</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying subsystems<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1082</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Filter pool(s) successfully copied to '%1'. You must create a new filter pool reference to see it (them).<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1083</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving '%1' to '%2'<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1084</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving connection %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1085</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving connections<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1086</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving filter pools<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1087</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving filter pool %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1088</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving filters<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1089</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving filter %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1090</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving filter strings<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1091</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Moving filter string %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1092</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Filter pool(s) successfully moved to '%1'. You must create a new filter pool reference to see it (them).<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1093</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Setting %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1094</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Setting properties<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1095</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Querying %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1096</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Querying properties<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1097</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Running %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1098</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Expand failed. Try again<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1099</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Expand cancelled. Try again<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1100</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Empty list<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1101</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>List cancelled<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1102</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Filter created successfully. Expand this again to create another<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1103</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Connection %1 not found<br>
-<b>LevelTwo: </b>No connection named %1 currently exists<br>
-<H3>RSEG1104</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Profile %1 not found<br>
-<b>LevelTwo: </b>No profile named %1 currently exists<br>
-<H3>RSEG1105</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Folder %1 not found on host %2<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1106</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File %1 not found on host %2<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1107</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File or folder %1 not found on host %2<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1108</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Connection created successfully. Expand this again to create another<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1109</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>Connection busy<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1110</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Command interrupted<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1111</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to run command<br>
-<b>LevelTwo: </b>Possible causes: connection has been deleted, connection has been renamed, or connection has been disconnected<br>
-<H3>RSEG1112</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>Command cancelled<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1115</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying...<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1116</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving...<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1117</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Copying %1...<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1118</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Moving %1...<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1130</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Permanently delete selected remote resource(s)?<br>
-<b>LevelTwo: </b>This is a permanent deletion of the selected remote resources from disk. This action cannot be undone<br>
-<H3>RSEG1140</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Error occurred while loading the user-defined action information from file: %1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEG1141</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>The xml file '%1' appears to be corrupted. It has been replaced<br>
-<b>LevelTwo: </b>Expected root tag to be named '%2'. The corrupted file has been renamed to '%3' and a new file created for you<br>
-<H3>RSEG1150</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to perform action as the underlying file system folder is in use<br>
-<b>LevelTwo: </b>The file system folder %1 is in use by another task and cannot be removed or modified<br>
-<H3>RSEG1151</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to perform action as the underlying file system file is in use<br>
-<b>LevelTwo: </b>The file system file %1 is in use by another task and cannot be removed or modified<br>
-<H3>RSEG1160</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Filter pool %1 created. Create a reference to it in the selected subsystem?<br>
-<b>LevelTwo: </b>New filter pools are not accessible until a reference is added to them in a subsystem. Select Yes to add a reference to the new filter pool in selected subsystem %2<br>
-<H3>RSEG1161</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter update failed: %1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEG1162</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter rename failed: %1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEG1170</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter numeric value<br>
-<b>LevelTwo: </b>You must enter a numeric value<br>
-<H3>RSEG1171</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Value %1 not numeric<br>
-<b>LevelTwo: </b>The value specified is not a valid number<br>
-<H3>RSEG1172</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Value %1 not in range<br>
-<b>LevelTwo: </b>The value specified is not within the valid range of %2 to %3<br>
-<H3>RSEG1180</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter action name<br>
-<b>LevelTwo: </b>You must enter a name for this action<br>
-<H3>RSEG1181</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Action name is not unique<br>
-<b>LevelTwo: </b>There is already an action with the given name in the selected profile. Specify a name that is not already in use<br>
-<H3>RSEG1182</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Action name is not valid<br>
-<b>LevelTwo: </b>The given name is not a valid action name<br>
-<H3>RSEG1183</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter comment<br>
-<b>LevelTwo: </b>You must enter a comment for this action<br>
-<H3>RSEG1184</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Action comment is not valid<br>
-<b>LevelTwo: </b>The given comment has syntactical errors<br>
-<H3>RSEG1185</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter command<br>
-<b>LevelTwo: </b>You must enter a command for this action<br>
-<H3>RSEG1186</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Action command is not valid<br>
-<b>LevelTwo: </b>The given command has syntactical errors<br>
-<H3>RSEG1187</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter type name<br>
-<b>LevelTwo: </b>You must enter a name for this collection of resource types<br>
-<H3>RSEG1188</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Type name %1 in use<br>
-<b>LevelTwo: </b>There is already a named type with the given name. Specify a name that is not already in use<br>
-<H3>RSEG1189</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Type name %1 is not valid<br>
-<b>LevelTwo: </b>The given name is not valid for a named type. It must not contain blanks<br>
-<H3>RSEG1190</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Specify one or more resource types<br>
-<b>LevelTwo: </b>You must specify one or more simple or generic resource types to constitute this named type<br>
-<H3>RSEG1191</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Types not valid<br>
-<b>LevelTwo: </b>Syntactical errors were found in the list of resource types<br>
-<H3>RSEG1192</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter source type<br>
-<b>LevelTwo: </b>You must enter a source type<br>
-<H3>RSEG1193</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Source type "%1" not valid<br>
-<b>LevelTwo: </b>The source type you entered is not valid.<br>
-<H3>RSEG1194</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Source type "%1" already exists<br>
-<b>LevelTwo: </b>The source type you entered has already been specified. Specify a unique source type.<br>
-<H3>RSEG1195</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter a label for this compile command<br>
-<b>LevelTwo: </b>You must enter a label for this compile command, that will be shown in menus and lists<br>
-<H3>RSEG1196</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Compile command label "%1" is in use<br>
-<b>LevelTwo: </b>There is already a compile command with the given label. Specify a label that is not already in use<br>
-<H3>RSEG1197</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Compile command label "%1" is not valid<br>
-<b>LevelTwo: </b>The given label is not a valid compile label<br>
-<H3>RSEG1198</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter command string for this compile command<br>
-<b>LevelTwo: </b>You must enter a command string for this compile command. This is what is run when this compile command is selected.<br>
-<H3>RSEG1199</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Compile command string "%1" is not valid<br>
-<b>LevelTwo: </b>The given string is not a valid command.<br>
-<H3>RSEG1201</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Changes pending. Save changes?<br>
-<b>LevelTwo: </b>You have changes pending. Select Yes to save those changes. Select No to discard those changes<br>
-<H3>RSEG1202</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Changes pending. Continue?<br>
-<b>LevelTwo: </b>You have changes pending. Select Yes to discard those changes. Select No to cancel the operation so you can first save your changes<br>
-<H3>RSEG1220</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Host name '%1' not found or valid<br>
-<b>LevelTwo: </b>A remote system of host name '%1' was found. If you are working disconnected, de-select the checkbox to verify the host name<br>
-<H3>RSEG1221</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Verifying host name...<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1230</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Delete selected user actions?<br>
-<b>LevelTwo: </b>This is a permanent deletion of the selected actions and cannot be undone.Select Yes to delete and No to cancel the delete action<br>
-<H3>RSEG1231</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Delete selected types?<br>
-<b>LevelTwo: </b>This is a permanent deletion of the selected types and cannot be undone.Select Yes to delete and No to cancel the delete action<br>
-<H3>RSEG1240</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>There is an error on another page<br>
-<b>LevelTwo: </b>Another page of the wizard has an error that must be corrected before the wizard can be finished<br>
-<H3>RSEG1250</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The pattern may not be blank<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1251</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Invalid regular expression<br>
-<b>LevelTwo: </b>The value %1 you entered is not a valid regular expression<br>
-<H3>RSEG1255</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>%1 - Running<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1256</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>%1 - Finished<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1260</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The invocation may not be blank<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1270</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Invalid drag and drop operation<br>
-<b>LevelTwo: </b>The source %1 cannot be transferred into the target %2<br>
-<H3>RSEG1300</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The FTP service is unavailable on the remote system.<br>
-<b>LevelTwo: </b>The RSE server needs to be installed manually.<br>
-<H3>RSEG1301</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The Telnet service is unavailable on the remote system.<br>
-<b>LevelTwo: </b>The RSE server needs to be started manually or a system administrator needs to install the RSE daemon.<br>
-<H3>RSEG1302</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to start the RSE server.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1303</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to install the RSE server.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1400</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>This action will take a few minutes. Proceed?<br>
-<b>LevelTwo: </b>This action uncompresses a large number of HTML files from a zip file. It will take awhile, and require sufficient disk space. Press Yes to continue, No to cancel.<br>
-<H3>RSEG1401</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Classic help already enabled.<br>
-<b>LevelTwo: </b>The HTML files for the CODE and VisualAge RPG help have already been uncompressed.<br>
-<br>
-<hr>
-<A NAME="Other"><!-- --></A><H2>Other Messages</H2>
-<H3>RSEO1000</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEO1001</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEO1002</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEO1003</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEO1004</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEO1005</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>%1: %2<br>
-<b>LevelTwo: </b>%3<br>
-<H3>RSEO1006</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>%1: %2<br>
-<b>LevelTwo: </b>%3<br>
-<H3>RSEO1007</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>%1: %2<br>
-<b>LevelTwo: </b>%3<br>
-<H3>RSEO1008</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>%1: %2<br>
-<b>LevelTwo: </b>%3<br>
-<H3>RSEO1009</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>%1: %2<br>
-<b>LevelTwo: </b>%3<br>
-<H3>RSEO1010</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEO1011</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEO1012</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEO1013</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEO1014</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>%1<br>
-<b>LevelTwo: </b><br>
-<br>
-<hr>
-<A NAME="Files"><!-- --></A><H2>Files Messages</H2>
-<H3>RSEF1001</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Operation failed. Security violation<br>
-<b>LevelTwo: </b>Message reported from file system: %1<br>
-<H3>RSEF1002</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Operation failed. File system input or output error<br>
-<b>LevelTwo: </b>Message reported from file system: %1<br>
-<H3>RSEF1003</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Folder is not empty. Cannot delete<br>
-<b>LevelTwo: </b>The operation failed. One possible reason is that the folder is not empty<br>
-<H3>RSEF1004</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Folder '%1' not found<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1005</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Folder '%1' not found. Would you like to create it?<br>
-<b>LevelTwo: </b>The folder you specified does not exist. Select Yes to create it, No to cancel the operation<br>
-<H3>RSEF1006</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File '%' not found<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1011</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter file name pattern<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1007</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter string '%1' already exists in this filter<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1008</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Filter string name pattern not valid<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1009</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>You must include files or folders or both<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1010</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>No file types specified<br>
-<b>LevelTwo: </b>Either specify one or more file types, or select to subset by file name<br>
-<H3>RSEF1200</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Create a new File<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1201</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Create a new Folder<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1202</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Enter folder name<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1203</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Names cannot begin or end with whitespace.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1204</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>%1 is an invalid character in a name.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1205</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Enter file name<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF1300</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Deletion of the object %1 failed<br>
-<b>LevelTwo: </b>Either the object does not exist or you do not have enough authority to delete the object. If this is a folder, the folder may not be empty<br>
-<H3>RSEF1301</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Renaming of the object %1 failed<br>
-<b>LevelTwo: </b>Rename operation failed because, the object to rename does not exist, or the object with new object name already exists, or the user does not have enough authority to rename the object<br>
-<H3>RSEF1302</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>No authority or file name not valid<br>
-<b>LevelTwo: </b>The file could not be created because of one of the following reasons:
- - the user does not have enough authority to create the file
- - the file name is not valid<br>
-<H3>RSEF1303</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File already exists<br>
-<b>LevelTwo: </b>The new file %1 already exists<br>
-<H3>RSEF1304</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Creation of the folder failed<br>
-<b>LevelTwo: </b>The folder %1 could not be created because of one of the following reasons:
- - the user does not have enough authority to create the folder
- - the folder name is not valid<br>
-<H3>RSEF1305</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The operation did not complete successfully. See additional messages in the Remote Shell view<br>
-<b>LevelTwo: </b>The operation requested failed. Look in the Remote Shell view to see additional messages indicating the cause of the failure<br>
-<H3>RSEF1306</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Copy of the file or folder %1 failed<br>
-<b>LevelTwo: </b>The file system reported the copy operation failed. You may not have authority to the target folder, or it may be in use<br>
-<H3>RSEF1307</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Move of the file or folder %1 failed<br>
-<b>LevelTwo: </b>The file system reported the move operation failed. You may not have authority to the source folder or file, or you may not have authority to the target folder, or it may be in use<br>
-<H3>RSEF1308</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Target folder cannot equal source folder<br>
-<b>LevelTwo: </b>Attempting to move a file or folder to the same folder as it exists in is equivalent to a rename operation. Use the rename action for this<br>
-<H3>RSEF1309</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Folder already exists<br>
-<b>LevelTwo: </b>The new folder %1 already exists<br>
-<H3>RSEF1310</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>New resource will not be visible due to subsetting. Create it anyway?<br>
-<b>LevelTwo: </b>The name of the resource you are creating does not match the current filter criteria. If you select Yes to create the resource, it will not be visible within the current filter.<br>
-<H3>RSEF1311</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Resource will not be visible due to subsetting. Rename it anyway?<br>
-<b>LevelTwo: </b>The new name of the resource does not match the current filter criteria. If you select Yes to rename the resource, it will not be visible within the current filter.<br>
-<H3>RSEF5001</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File %1 on %2 can not be opened. You do not have read access to the file.<br>
-<b>LevelTwo: </b>Change file permissions to ensure you have read access to the file.<br>
-<H3>RSEF5002</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>You do not have write access to file %1 on %2. Do you want to open the file in browse mode?<br>
-<b>LevelTwo: </b>You do not have write permission to the file %1 on %2. You can open the file in browse (read-only) mode. If you want to edit the file, change file permissions to allow write access to the file.<br>
-<H3>RSEF5003</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File %1 can not be saved on %2. You do not have read access to the file.<br>
-<b>LevelTwo: </b>Change file permissions to ensure you have read access to the file.<br>
-<H3>RSEF5004</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File %1 can not be saved on %2. You do not have write access to the file.<br>
-<b>LevelTwo: </b>Change file permissions to ensure you have write access to the file.<br>
-<H3>RSEF5005</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>File %1 on %2 was modified since you opened this file or saved the file on the server. Do you want to replace the current contents of the file on the server?<br>
-<b>LevelTwo: </b>The file %1 was changed on the server after it was retrieved from %2 or since the last time the file was saved on the server. Choose Yes to replace the contents of the file. Choose No to leave the file on the server with its current contents.<br>
-<H3>RSEF5006</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File %1 was not completely saved on %2. The file was saved in the local file system.<br>
-<b>LevelTwo: </b>An error occurred while saving the file on the server. A possible cause is the connection to the server was terminated. The file may only have been saved partially on the server. However, it was saved locally to help you recover. You will be asked to save the local copy to the server the next time you connect.<br>
-<H3>RSEF5007</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>File %1 on %2 may not have been saved completely during an earlier edit session. The file was saved on the local file system. Do you want to replace the file with the local copy now?<br>
-<b>LevelTwo: </b>An error occurred during an earlier attempt to save the file. But a local copy of the file was saved for recovery. Choose Yes to save the local copy on the server. Choose No if recovery is not required.<br>
-<H3>RSEF5008</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>File %1 does not exist on %2. Do you want to create the file?<br>
-<b>LevelTwo: </b>Choose Yes to create the file on the server and save the contents to the file. Choose No if you do not want the file to be created.<br>
-<H3>RSEF5009</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>You are currently editing file %1 on %2. Do you want to open the file in browse mode?<br>
-<b>LevelTwo: </b>You are allowed to edit a file in one editor only. You can, however, open the file in another editor for browsing. Browsing lets you view the file but does not allow you to edit its contents.<br>
-<H3>RSEF5010</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Profile named %1 does not exist.<br>
-<b>LevelTwo: </b>Profile may have been renamed or deleted.<br>
-<H3>RSEF5011</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Connection named %1 does not exist.<br>
-<b>LevelTwo: </b>Connection may have been renamed or deleted.<br>
-<H3>RSEF5012</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>File %1 already exists. Do you want to overwrite it?<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF6001</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File type extension can not be empty.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF6002</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>File type extension must not contain '*' or '.'<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF7001</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Enter CCSID<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF7002</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>CCSID must be a number between 0 and 65535<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF8001</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>An unknown error occurred.<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEF8002</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>An unexpected error occurred.<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEF8003</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Value is not valid<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEF8004</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Input %1 is not valid<br>
-<b>LevelTwo: </b>%1<br>
-<br>
-<hr>
-<A NAME="Communications"><!-- --></A><H2>Communications Messages</H2>
-<H3>RSEC1001</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Connection to %1 could not be established.<br>
-<b>LevelTwo: </b>A socket connection to %1 could not be established. If you are connecting via the communications daemon make sure the daemon is running on the remote system. If you are connecting directly to the communications server make sure the server is started on the remote system.<br>
-<H3>RSEC1002</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Invalid password or user ID<br>
-<b>LevelTwo: </b>Authentication with %1 failed because the password or user ID is not correct.<br>
-<H3>RSEC1003</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The user ID %1 is not valid<br>
-<b>LevelTwo: </b>The user ID %1 on host %2 is not valid. Change the user ID and try again.<br>
-<H3>RSEC1004</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The saved password is not correct.<br>
-<b>LevelTwo: </b>The saved password for user ID %1 on host %2 is not correct. Please enter the password and try again.<br>
-<H3>RSEC2001</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Environment variable %1 is already defined<br>
-<b>LevelTwo: </b>An environment variable %1 has already been defined. Change the new environment variable's name and press the Add button.<br>
-<H3>RSEC2002</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>Environment variable must have a name.<br>
-<b>LevelTwo: </b>An attempt was made to define an environment variable with a blank name. Type a value for the environment variable name.<br>
-<H3>RSEC2003</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>Environment variable must have a name.<br>
-<b>LevelTwo: </b>An attempt was made to clear the name of an environment variable. To remove an environment variable, select the variable in the list add press the Remove button.<br>
-<H3>RSEC2004</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Environment variable name contains an invalid character.<br>
-<b>LevelTwo: </b>The environment variable name cannot contain a space or the '=' character.<br>
-<H3>RSEC2101</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Saved password for %1 on %2 already exists.<br>
-<b>LevelTwo: </b>The password for user ID %1 on host %2 is already saved. Enter a different user ID or host name or change the existing saved password.<br>
-<H3>RSEC2102</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>New and verify passwords do not match.<br>
-<b>LevelTwo: </b>The new and verify passwords must match (case sensitive) in order to save the new password. Retype the new and verify passwords and try again.<br>
-<H3>RSEC2103</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Entry field cannot be blank.<br>
-<b>LevelTwo: </b>The hostname, user ID, system type and password entry fields cannot be blank. Type a value and press the Enter key to save the changes.<br>
-<H3>RSEC2104</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>There are no tools installed which support saving password information.<br>
-<b>LevelTwo: </b>The password information preference page is a centralized place for Workbench tools to save password information. Each tool registers and provides its own encryption algorithm. There are no tools installed that have registered with the password information preference page.<br>
-<br>
-</BODY>
-</HTML>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/modelAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/modelAPI.html
deleted file mode 100755
index 4e762dfa0..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/modelAPI.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>RSE Model API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Model API</h1>
-<p>The front door to accessing the elements of the RSE model is the <A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html">ISystemRegistry</A>, which is a
-singleton object accessible via <A href="../../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">SystemStartHere.getSystemRegistry()</A>.
-</p>
-<p>The system registry will get you access to profiles, connections and subsystem factories.
-From a <A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.html">subsystem configuration</A> you can access subsystems, filter pools,
-user actions and compile commands.
-From <A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html">ISubSystem</A> you can access remote resources, as well
-as filter pools referenced by the subsystem.
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/plugin/uiPluginAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/plugin/uiPluginAPI.html
deleted file mode 100755
index 7c9bba5a6..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/plugin/uiPluginAPI.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Base Plugin Class</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Base Plugin Class</h1>
-<p>You may find it of value to base your own plugin class on the RSE-supplied base plugin class.
-If so, there are some methods you are encouraged to create or override in your class. The benefits
-of using this as your base class is the inherited methods you can access.
-</p>
-<h2>Methods required in your plugin subclass</h2>
-<p>To use the RSE base plugin class
-<samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html">org.eclipse.rse.core.SystemBasePlugin</A></samp>,
-you subclass it for your own plugin class, and supply some key static methods of your own:
-</p>
-<ul>
-<li><samp>getDefault()</samp>. Return a singleton instance of your plugin.
-<li><samp>getResourceBundle()</samp>. Return the resource bundle for your plugin. This is stored in
-a static field, initialized in your constructor by calling the <samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#loadResourceBundle(org.eclipse.core.runtime.IPluginDescriptor, java.lang.String)">loadResourceBundle(...)</A></samp> inherited method.
-<li><samp>getString(String key)</samp>. Return a translated string by calling the inherited method
-<samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getString(java.util.ResourceBundle, java.lang.String)">getString(ResourceBundle rb, String key)</A></samp>, passing in the static resource bundle field.
-<li><samp>getPluginMessageFile()</samp>. Return your RSE message file instance, initialized in your
-constructor by calling <samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#loadMessageFile(org.eclipse.core.runtime.IPluginDescriptor, java.lang.String)">loadMessageFile(...)</A></samp>.
-<li><samp>getPluginMessage(String msgID)</samp>. Return the
-<samp><A href="../../../reference/api/org/eclipse/rse/services/clientserver/messages/SystemMessage.html">SystemMessage</A></samp> for the given ID, by
-calling the inherited method
-<samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getMessage(org.eclipse.rse.services.clientserver.messages.SystemMessageFile, java.lang.String)">getMessage(getPluginMessageFile(), msgId)</a></samp>. You will call this method often to get message objects.
-</ul>
-<p>You may also override some RSE-supplied instance methods:
-<ul>
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#initializeImageRegistry()">initializeImageRegistry()</A></samp>. Call
-<samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#putImageInRegistry(java.lang.String, java.lang.String)">putImageInRegistry(String id, String imageFileName)</A></samp>
-to load each of your images.
-</ul>
-</p>
-<p>Of course, there are the usual eclipse-supplied instance methods to override too:
-<ul>
-<li><samp>initializeDefaultPreferences()</samp>. Good place to call the <samp>initDefaults()</samp> method of your preference pages. Be sure to call <samp>super.initializeDefaultPreferences()</samp>.
-<li><samp>startup()</samp>. Good place to register adapters and so forth. Be sure to call <samp>super.startup()</samp> at the beginning.
-<li><samp>shutdown()</samp>. Good place to close any open communication layers. Be sure to call <samp>super.shutdown()</samp> at the end.
-</ul>
-</p>
-
-<h2>Methods inherited from the RSE base class</h2>
-<p>The methods you get access to by using the RSE-supplied base plugin class include:</p>
-<ul>
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getPluginId()">getPluginId()</A></samp>. Return this plugin's ID.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getActiveWorkbenchShell()">getActiveWorkbenchShell()</A></samp>. Return the shell of the active workbench window.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getActiveWorkbenchWindow()">getActiveWorkbenchWindow()</A></samp>. Return the active workbench window.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getWorkspaceRoot()">getWorkspaceRoot()</A></samp>. Return the root of the workspace.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getWorkspace()">getWorkspace()</A></samp>. Return the workspace root.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getInstallLocation()">getInstallLocation()</A></samp>. Return the install directory for this plugin.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getIconPath()">getIconPath()</A></samp>. Return the typical path for icons, relative to the plugin's folder: "icons/"
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#putImageInRegistry(java.lang.String, java.lang.String)">putImageInRegistry(String id, String fileName)</A></samp>. Load an image in the image registry, given the ID to retrieve it with, and its filename and path relative to this plugin's folder
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getImage(java.lang.String)">getImage(String id)</A></samp>. Return an Image given the ID with which it was registered in putImageInRegistry.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getImageDescriptor(java.lang.String)">getImageDescriptor(String id)</A></samp>. Return an ImageDescriptor given the ID with which it was registered in putImageInRegistry.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#loadResourceBundle(org.eclipse.core.runtime.IPluginDescriptor, java.lang.String)">loadResourceBundle(IPluginDescriptor descriptor, String fileName)</A></samp>. Load a resource bundle, given its file name, relative to the given plugin's installation folder.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#loadResourceBundle(java.lang.String)">loadResourceBundle(String fileName)</A></samp>. Load a resource bundle, given its file name, relative to this plugin's installation folder.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getString(java.util.ResourceBundle, java.lang.String)">getString(ResourceBundle rb, String id)</A></samp>. Return a translated string from a resource bundle, given its key ID.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getString(java.util.ResourceBundle, java.lang.String, java.lang.String)">getString(ResourceBundle rb, String id, String default)</A></samp>. Return a translated string from a resource bundle, given its key ID. If key not found in the resource bundle, returns the given default string.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#loadMessageFile(org.eclipse.core.runtime.IPluginDescriptor, java.lang.String)">loadMessageFile(IPluginDescriptor descriptor,String fileName)</A></samp>. Parse an RSE-style message file into memory, given the plugin and message file name.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getMessage(org.eclipse.rse.services.clientserver.messages.SystemMessageFile, java.lang.String)">getMessage(SystemMessageFile msgFile, String msgId)</A></samp>. Retrieve a SystemMessage object, given the message file that contains it, and its message ID including component and subcomponent abbreviations.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#scanForDuplicateMessages(org.eclipse.rse.services.clientserver.messages.SystemMessageFile)">scanForDuplicateMessages(SystemMessageFile msgFile)</A></samp>. Scan given message file for duplicate IDs. Typically only called during the development cycle.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#printMessages(org.eclipse.rse.services.clientserver.messages.SystemMessageFile, java.lang.String)">printMessages(SystemMessageFile msgFile, String fullyQualifiedTargetFile)</A></samp>. Generate an HTML file documenting the messages in the given message file, given the fully qualified name of the target HTML file.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#showProgrammerErrorMessage(java.lang.String)">showProgrammerErrorMessage(String msg)</A></samp>. Show a message to the user, when the message file support is not available.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#logInfo(java.lang.String)">logInfo(String message)</A></samp>. Log an informational message to the RSE's core log file (<samp>.....\.metadata\.plugins\org.eclipse.rse.core\.log</samp>).
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#logWarning(java.lang.String)">logWarning(String message)</A></samp>. Log a warning message to the RSE's core log file (<samp>.....\.metadata\.plugins\org.eclipse.rse.core\.log</samp>).
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#logError(java.lang.String)">logError(String message)</A></samp>. Log an error message to the RSE's core log file (<samp>.....\.metadata\.plugins\org.eclipse.rse.core\.log</samp>).
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#logError(java.lang.String, java.lang.Throwable)">logError(String message, Throwable exception)</A></samp>. Log an error message resulting from an exception to the RSE's core log file (<samp>.....\.metadata\.plugins\org.eclipse.rse.core\.log</samp>).
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#logDebugMessage(java.lang.String, java.lang.String)">logDebugMessage(String prefix, String message)</A></samp>. Log a debug (trace) message to the RSE's core log file (<samp>.....\.metadata\.plugins\org.eclipse.rse.core\.log</samp>).
-<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getLogger()">getLogger()</A></samp>.Return the Logger instance for the RSE default logging file (<samp>.....\.metadata\.plugins\org.eclipse.rse.core\.log</samp>).
-</ul>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_checkBox.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_checkBox.gif
deleted file mode 100755
index 19d23df68..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_checkBox.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_comboBox.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_comboBox.gif
deleted file mode 100755
index 853d0082a..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_comboBox.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_keyValue.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_keyValue.gif
deleted file mode 100755
index 26caa8048..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_keyValue.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_string.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_string.gif
deleted file mode 100755
index f43c0681f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/fldEditor_string.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/rsePreferences.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/rsePreferences.gif
deleted file mode 100755
index cc58177fb..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/rsePreferences.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/uiPreferencesAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/uiPreferencesAPI.html
deleted file mode 100755
index 9df581818..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/preferences/uiPreferencesAPI.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Preferences API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Preferences API</h1>
-
-<h2>RSE Preference Pages Category</h2>
-<p>All Remote System Explorer preference pages are rooted within the
-preferences category <samp>org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage</samp>,
-as shown here:</p>
-<P><IMG border="0" src="rsePreferences.gif"></P>
-
-<h2>RSE Preference Pages Classes</h2>
-<p>There is no RSE-supplied base class for preference pages, but we recommend
-you extend <samp>FieldEditorPreferencePage</samp> in package <samp>org.eclipse.jface.preference</samp>.
-This JFace class allows you to create a preferences page as a sequence of "field
-editors" which know how to initialize, load and store their values from their preferences store.
-</p>
-<p>We also suggest the following when designing your preference pages:
-<ol>
-<li>A interface for your preferences constants. It should store two constants per preference: the preference store key, and its default value.
-<li>Static getter and setter methods in your preference page classes, one per preference, to query or update the preference value in the preferences store.
-<li>An <samp>initDefaults(IPreferenceStore store)</samp> method per preferences class, that initializes the preference store value of each preference on that page.
-<li>In your plugin class, an override of the <samp>initializeDefaultPreferences(IPreferenceStore store)</samp> method, so it calls your
-<samp>initDefaults(store)</samp> method for each preference page class.
-</ol>
-<p>Should you need to query, or update, any RSE preferences you can do so via
-the getters and setters in <samp>org.eclipse.rse.core.SystemPreferencesManager</samp>.
-</p>
-<p>The RSE supplies a few field editors, complementing what JFace supplies
-in <samp>org.eclipse.jface.preference</samp>. The RSE-supplied field editors, and the
-RSE-supplied preferences pages, are all found in package <samp><A href="../../../reference/api/org/eclipse/rse/ui/propertypages/package-summary.html">org.eclipse.rse.ui.propertypages</A></samp>:
-</p>
-<ul>
-<li><b><samp><A href="../../../reference/api/org/eclipse/rse/ui/propertypages/SystemBooleanFieldEditor.html">SystemBooleanFieldEditor</A></samp></b>. Extends <samp>BooleanFieldEditor</samp> to add support for tooltip text.
-<p><IMG border="0" src="fldEditor_checkBox.gif"></p>
-<li><b><samp><A href="../../../reference/api/org/eclipse/rse/ui/propertypages/SystemComboBoxFieldEditor.html">SystemComboBoxFieldEditor</A></samp></b>. Shows a combo box allowing the user to choose from a finite list of discrete possibilities.
-<p><IMG border="0" src="fldEditor_comboBox.gif"></p>
-<li><b><samp><A href="../../../reference/api/org/eclipse/rse/ui/propertypages/SystemKeyValueFieldEditor.html">SystemKeyValueFieldEditor</A></samp></b>. Shows a list of hard-coded keys, each of which supports a user-specifiable value.
-<p><IMG border="0" src="fldEditor_keyValue.gif"></p>
-<li><b><samp><A href="../../../reference/api/org/eclipse/rse/ui/propertypages/SystemStringFieldEditor.html">SystemStringFieldEditor</A></samp></b>. For simple string preferences. Unlike the JFace string editor, this supports tooltip text and RSE validators and massagers on the typed text.
-<p><IMG border="0" src="fldEditor_string.gif"></p>
-</ul>
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/properties/uiPropertiesAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/properties/uiPropertiesAPI.html
deleted file mode 100755
index 7c4b5338e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/properties/uiPropertiesAPI.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Properties API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Properties API</h1>
-<p>You can supply your own property pages to any node in the Remote Systems tree or table views.
-As you author your property page classes, you may find the RSE-supplied base class for property pages
-of value.
-
-<h2>RSE-Supplied Base Class for Property Pages</h2>
-<p>The RSE supplies a base class for property pages,
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.html">org.eclipse.rse.ui.propertypages.SystemBasePropertyPage</A></samp>,
-that extends the base eclipse property page <samp>org.eclipse.ui.dialogs.PropertyPage</samp>. The advantages
-of using this RSE-supplied class are:
-</p>
-<ul>
-<li>Supports <samp><a href="../messages/uiMessageAPI.html">SystemMessage</A></samp> error messages, allowing the user to click on a message to see its details.
-<li>Supports automatic assignment of mnemonics for input-capable fields.
-<li>Supports automatic management of the "isValid" property based on current error message status in the message line. This
-property is important to set correct, so eclipse knows when to prevent the user from switching focus to other property pages.
-</ul>
-
-
-<h2>Property Pages for RSE Non-Remote Resources</h2>
-<p>You can simply use the eclipse-supplied extension point <samp>org.eclipse.ui.propertyPages</samp> to
-contribute property pages to any of the non-remote artifacts from the RSE model. To use this extension
-point, you need to know the class or, preferably, interface that the objects implement, which we describe here:
-</p>
-
-<TABLE border="1" width="100%">
- <TBODY>
- <TR>
- <TH>RSE Resource</TH>
- <TH>Implements Interface</TH>
- </TR>
- <TR>
- <TD>Profile</TD>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/core/model/ISystemProfile.html">org.eclipse.rse.core.model.ISystemProfile</A></samp></TD>
- </TR>
- <TR>
- <TD>Host</TD>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/core/model/IHost.html">org.eclipse.rse.core.model.IHost</A></samp></TD>
- </TR>
- <TR>
- <TD>Subsystem</TD>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html">org.eclipse.rse.core.subsystems.ISubSystem</A></samp></TD>
- </TR>
- <TR>
- <TD>Filter pool reference</TD>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">org.eclipse.rse.core.filters.ISystemFilterPoolReference</A></samp></TD>
- </TR>
- <TR>
- <TD>Filter reference</TD>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/core/filters/ISystemFilterReference.html">org.eclipse.rse.core.filters.ISystemFilterReference</A></samp></TD>
- </TR>
- </TBODY>
-</TABLE>
-<h2>Property Pages for RSE Remote Resources</h2>
-<p>Remote resources have no underlying eclipse resource, and typically all are instances of the same class,
-meaning insufficient fidelity in scoping property pages to a remote resource of a particular type. Because of this,
-the RSE supplies its <a href="../../../reference/extension-points/org_eclipse_rse_ui_propertyPages.html">propertyPages</a> extension point, for remote resources, which allows for
-very explicit scoping of the property page to very specific types of remote resources.
-</p>
-
-
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/resourceAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/resourceAPI.html
deleted file mode 100755
index d5043eb7e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/resourceAPI.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>RSE Remote Resource API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Remote Resource API</h1>
-<p>RSE supplies subsystems for accessing the file system and for executing commands, for
-all system types ("universally").
-</p>
-<p>
-To programmatically access the files in a remote system
-identified by a particular system connection, use the
-<A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html">system registry</A> to get to the
-<A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html#getSubSystemsBySubSystemConfigurationCategory(String, org.eclipse.rse.core.model.IHost)">file subsystem</A>
-for that connection, by passing in the file category as a String. This <A href="../../reference/api/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.html">file subsystem</A> offers methods for accessing the remote files.
-</p>
-<p>
-Similarly, to programmatically run commands in a remote system
-identified by a particular system connection, use the
-<A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html">system registry</A> to get to the
-<A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html#getSubSystemsBySubSystemConfigurationCategory(String, org.eclipse.rse.core.model.IHost)">command subsystem</A>
-for that connection, by passing in the command category as a String. This <A href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.html">command subsystem</A> offers methods for running remote commands,
-either in a new command shell or an existing command shell. You can also set environment variables
-using this subsytem object.
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/uiAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/uiAPI.html
deleted file mode 100755
index 313117219..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/uiAPI.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>RSE User Interface API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE User Interface API</h1>
-<p>The RSE provides a number of classes that can help with programming productivity when authoring
-user interface artifacts, such as actions, dialogs, wizards, property pages and preferences pages.
-Further, a common requirement in all of these artifacts is the need to display translated messages
-to the user. The RSE supplies a framework for defining and displaying rich messages that have second
-level help, severity and ID attributes.
-</p>
-<p>
-In the following sections we introduce the support offered by the RSE for these UI constructs.
-<h2>Plugin Class</h2>
-<p>The RSE supplies a base plugin class <samp><a href="plugin/uiPluginAPI.html">SystemBasePlugin</a></samp> that offers
-some advantages over the base eclipse <samp>AbstractUIPlugin</samp> class:
-<ol>
-<li>Simplified methods for registering images, and support for retrieving them either as an image
-or an image descriptor.
-<li>Support for <a href="logger/uiLoggerAPI.html">logging</a> error, warning and information messages, using the RSE logging framework.
-<li>Support for loading a resource bundle, and easily retrieving translated strings from it.
-<li>Support for loading an RSE <a href="messages/uiMessageFile.html">message file</a>, and easily retrieving translated messages from it.
-<li>Helper methods for getting the active workbench window and shell.
-</ol>
-</p>
-<p>To use the base plugin class effectively, you must subclass it and supply some critical
-methods of your own.
-</p>
-
-<h2>Logging</h2>
-<p>The Remote System Explorer comes with special support for <a href="logger/uiLoggerAPI.html">logging information</a> to a log file,
-for the purpose of problem determination for servicing your plugin. The log file support allows
-you to either log your messages to the common RSE log file in the <samp>.metadata\plugins\org.eclipse.rse.core</samp>
-folder, or to define your own log file in your plugin metadata folder, if desired.
-</p>
-
-<h2>Messages</h2>
-<p>The Java property file for messages is not very rich, as it offers only the ability to define a
-single message string. Throughout the RSE perspective you will notice that the messages are richer
-than this. They contain second level help, severity, and ID and more. Further, there is a unique
-error message dialog for displaying messages, with their second level help, and specialized support
-in the RSE dialog, wizard and property page classes for displaying messages on a message line. These
-messages can be selected by the user, to bring up the specialized message dialog displaying the
-additional properties of the message. Further, there is support for logging severe errors to a log
-file, enabling better service support.
-</p>
-<p>
-Your own plugins can enjoy this rich message support too, even independently of using the rest of
-the RSE for remote resource access. This support involves defining an xml
-<a href="messages/uiMessageFile.html">message file</a>, which defines
-the messages, and using a set of
-<a href="messages/uiMessageAPI.html">supplied classes</a> to work with the messages.
-</p>
-<p>Before defining your own messages, you may wish to peruse the list of <a href="messages/uiMessagesCore.html">RSE-supplied messages</a> that are
-already defined. The key benefit to using an existing message is translation, as these are already
-translated into many languages.
-</p>
-
-<h2>Preference Pages</h2>
-<p>When defining your own <a href="preferences/uiPreferencesAPI.html">preferences pages</a>,
-you may want to place your preference pages within the Remote Systems preference page category.
-As you author your preference page classes, you may find some of the RSE-supplied classes for
-preference pages to be useful.
-</p>
-
-<h2>Property Pages</h2>
-<p>Property pages can appear in the Properties dialog of any object in eclipse. This dialog is available by selecting
-"Properties" from the pop-up menu for the object. The RSE supports defining your own
-<a href="properties/uiPropertiesAPI.html">property pages</a> for the resources in its model, although there is a
-distinction between local and remote resources.
-</p>
-
-<h2>Validators</h2>
-<p>Validating user-entered text is a common and tedious task in any GUI programming. Using validators to encapsulate
-the error checking for a particular type of data is a highly recommended practice. The
-<a href="validators/uiValidatorsAPI.html">RSE validator</a> support is very
-helpful for this, offering both a common interface for all manner of validators and a large list of pre-supplied
-validators.
-</p>
-
-<h2>Massagers</h2>
-<p>While validating user-entered text is common, so is affecting user-entered text prior to saving it. For example, folding it
-to upper or lower case. The <a href="massagers/uiMassagersAPI.html">RSE massager</a> support encapsulates this concept, and
-supplies a few re-usable massagers for you.
-</p>
-
-<h2>Widgets</h2>
-<p>Populating preference pages, property pages, dialogs and wizards requires use of SWT widget programming. The RSE
-<a href="widgets/uiWidgetsAPI.html">widget support</a> can help, with helper methods and classes, and re-usable widgets you may
-find useful.
-</p>
-
-<h2>Dialogs</h2>
-<p>The RSE supplies rich support for <a href="dialogs/uiDialogsAPI.html">dialogs</a>, including a powerful base class
-and, re-usable pre-built dialogs.
-</p>
-
-<h2>Wizards</h2>
-<p>Wizards are a common building block of an eclipse GUI. Typically, a wizard is used to prompt for information to create
-something new, while a dialog is used to prompt for information for other purposes.
-The RSE <a href="wizards/uiWizardsAPI.html">wizard support</a> includes base classes that can simplify the task of creating wizards.
-</p>
-
-<h2>Actions</h2>
-<p>Populating popup and pulldown menu items requires the creation of actions. These actions typically popup dialogs or wizards,
-and need to be able to pass selections and inputs from the action to the dialog or wizard, and get outputs back. The RSE
-<a href="actions/uiActionsAPI.html">action support</a> can significantly help with this programming task, especially when used
-together with the RSE dialog and wizard support.
-</p>
-
-<p>Often we want to refresh the contents of the Remote Systems view or Table view from within our actions, to visualize
-changes to the selected resources. To do this, use the
-<samp><A href="../../reference/api/org/eclipse/rse/model/SystemRegistry.html#fireRemoteResourceChangeEvent(int, java.lang.Object, java.lang.Object, org.eclipse.rse.core.subsystems.ISubSystem, java.lang.String, org.eclipse.jface.viewers.Viewer)">method</a></samp>.
-To get the system registry, use the
-<samp><A href="../../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">method</a></samp>.
-</body>
-
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/uiValidatorsAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/uiValidatorsAPI.html
deleted file mode 100755
index 6894a0a58..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/uiValidatorsAPI.html
+++ /dev/null
@@ -1,226 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Validators API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Validators API</h1>
-<p>Throughout an eclipse UI there are times when we need to validate what the user has typed in. Validators
-offer a way to encapsulate the error checking for a particular domain, so it can be re-used wherever the user
-is prompted for this. This includes dialogs, property pages, preference pages, wizard pages and viewer
-cells. Eclipse's JFace offers two interfaces for this, one for viewer cells and one for the rest. In RSE,
-there is a single interface combining the requirements of both, so you can author a single validator that is
-re-usable anywhere. Further, the RSE validator interface and sub-interfaces force additional information to be
-supplied to enhance re-use, such as the maximum length, which can be used to set the text limit for a text field.
-</p>
-
-<h2>RSE Validator Interfaces</h2>
-<p>All RSE validator interfaces and classes are in package <samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/package-summary.html">org.eclipse.rse.ui.validators</A></samp>.
-
-<h3>ISystemValidator Interface</h3>
-<p>The primary validator interface is <samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidator.html">ISystemValidator</A></samp>, which is extends <samp>org.eclipse.jface.dialogs.IInputValidator</samp>
-and <samp>org.eclipse.jface.viewers.ICellEditorValidator</samp>. Both parent interfaces define an <samp>isValid</samp> method,
-but the former takes a String while the latter takes an Object. They both return a String which is the error message if an
-error was detected, or null if no error detected. The <samp>ISystemValidator</samp> interface adds the following additional methods:
-</p>
-
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Method</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><samp>public int <A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidator.html#getMaximumNameLength()">getMaximumNameLength()</A></samp></TD>
- <TD>Returns the maximum length allowed for this text. Can be used to set text limit of text widgets.</TD>
- </TR>
- <TR>
- <TD><samp>public SystemMessage <A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidator.html#getSystemMessage()">getSystemMessage()</A></samp></TD>
- <TD>If <samp>isValid</samp> returns false, this returns a <samp>SystemMessage</samp> object that offers richer message support than just a string.
- Return null if you don't support <samp><A href="../messages/uiMessageAPI.html">SystemMessages</A></samp>.
- Callers don't need to use this if they use <samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidator.html#validate(java.lang.String)">validate(String)</A></samp> instead of <samp>isValid(String)</samp>.</TD>
- </TR>
- <TR>
- <TD><samp>public SystemMessage <A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidator.html#validate(java.lang.String)">validate(String text)</A></samp></TD>
- <TD>An alternative to <samp>isValid</samp> if your validator does support <samp>SystemMessage</samp> objects versus simple strings for error messages.</TD>
- </TR>
- </TBODY>
-</TABLE>
-
-<h3>ISystemValidatorUniqueString Interface</h3>
-<p>Often our validation requires checking that the given text is unique, in some given list of existing things, like names say. To facilitate
-this, there is an interface <samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.html">ISystemValidatorUniqueString</A></samp>, which extends <samp>ISystemValidator</samp> and adds some additional
-methods required for uniqueness validation:
-</p>
-
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Method</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><samp>public void <A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.html#setCaseSensitive(boolean)">setCaseSensitive(boolean caseSensitive)</A></samp></TD>
- <TD>Specifies whether the test for an existing string should consider case or not.</TD>
- </TR>
- <TR>
- <TD><samp>public void <A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.html#setExistingNamesList(java.lang.String[])">setExistingNamesList(String[] existingList)</A></samp></TD>
- <TD>Sets the existing list to test against, as an array.</TD>
- </TR>
- <TR>
- <TD><samp>public void <A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.html#setExistingNamesList(java.util.Vector)">setExistingNamesList(Vector existingList)</A></samp></TD>
- <TD>Sets the existing list to test against, as a vector of Strings.</TD>
- </TR>
- <TR>
- <TD><samp>public String[] <A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.html#getExistingNamesList()">getExistingNamesList()</A></samp></TD>
- <TD>Returns the existing list that is used to test against.</TD>
- </TR>
- </TBODY>
-</TABLE>
-<p>If you desire to create a unique string validator, you probably will start by subclassing <samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorUniqueString.html">ValidatorUniqueString</A></samp>.
-</p>
-
-<h3>IValidatorRemoteSelection Interface</h3>
-<p>The third validator interface is <samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.html">IValidatorRemoteSelection</A></samp>, which is specifically intended to be used
-in the remote resource selection dialogs supplied by the RSE. It allows you to decide when to enable the OK button, based on what
-is selected. It contains only the following method:</p>
-<samp>public SystemMessage <A href="../../../reference/api/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.html#isValid(org.eclipse.rse.core.model.IHost, java.lang.Object[], org.eclipse.rse.ui.view.ISystemRemoteElementAdapter[])">isValid(SystemConnection selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObject)</A>;</samp>
-<p>You typically won't implement this interface directly, but rather sublcass <samp>ValidatorRemoteSelection</samp>.</p>
-
-<h3>Validator Samples</h3>
-<ul>
-<li><A href="validatorSample1.html">Sample 1</A></li>
-<li><A href="validatorSample2.html">Sample 2</A></li>
-<li><A href="validatorSample3.html">Sample 3</A></li>
-<li><A href="validatorSample4.html">Sample 4</A></li>
-</ul>
-
-<h2>RSE-Supplied Validators</h2>
-<p>You may be able to avoid creating a new validator if you find that RSE has already supplied one you need. Or, you may find it
-appropriate to simply subclass one of these RSE-supplied validators. All of them are designed to be either used as-is, or configured
-via setter calls, or subclassed, whichever is most convenient.</p>
-<p>All of these validators support rich <samp><A href="../messages/uiMessageAPI.html">SystemMessage</A></samp> objects, versus just simple strings for the error message. When used with the
-RSE dialog, property page or wizard page classes, you should call
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidator.html#validate(java.lang.String)">validate(String)</A></samp> and call
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/messages/ISystemMessageLine.html#setErrorMessage(org.eclipse.rse.ui.messages.SystemMessage)">setErrorMessage</A></samp> with the result. When used
-in other places you should use <samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ISystemValidator.html#isValid(java.lang.String)">isValid(String)</A></samp> as it returns just the first-level text of the system message.</p>
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Validator Class</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.html">ValidatorCompileCommandLabel</A></samp></TD>
- <TD>Validates the label for a compile command in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorConnectionName.html">ValidatorConnectionName</A></samp></TD>
- <TD>Validates the name of a connection in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorFileName.html">ValidatorFileName</A></samp></TD>
- <TD>Validates the name of a file in eclipse.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorFilterName.html">ValidatorFilterName</A></samp></TD>
- <TD>Validates the name of a filter in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorFilterPoolName.html">ValidatorFilterPoolName</A></samp></TD>
- <TD>Validates the name of a filter pool in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorFilterString.html">ValidatorFilterString</A></samp></TD>
- <TD>Validates the contents of a filter string in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorFolderName.html">ValidatorFolderName</A></samp></TD>
- <TD>Validates the name of a folder in eclipse.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorIntegerInput.html">ValidatorIntegerInput</A></samp></TD>
- <TD>Validates the given string is a valid integer.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorIntegerRangeInput.html">ValidatorIntegerRangeInput</A></samp></TD>
- <TD>Validates the given string is a valid integer within a given range.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorLongInput.html">ValidatorLongInput</A></samp></TD>
- <TD>Validates the given string is a valid long integer.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorLongRangeInput.html">ValidatorLongRangeInput</A></samp></TD>
- <TD>Validates the given string is a valid long integer within a given range.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorPathName.html">ValidatorPathName</A></samp></TD>
- <TD>Validates the given string is a valid folder path in eclipse.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorPortInput.html">ValidatorPortInput</A></samp></TD>
- <TD>Validates the given string is a valid TCP/IP port number.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorProfileName.html">ValidatorProfileName</A></samp></TD>
- <TD>Validates the name of a system profile in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.html">ValidatorRemoteSelection</A></samp></TD>
- <TD>This is a very special case abstract base class, for validators that decide the enablement of the OK button
- in the RSE-supplied remote resource selection dialogs.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorSourceType.html">ValidatorSourceType</A></samp></TD>
- <TD>A validator for source types, such as a file type or "*.java". It is intended to be subclassed.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorSpecialChar.html">ValidatorSpecialChar</A></samp></TD>
- <TD>A base class for validators that need to ensure the given string doesn't contain certain characters.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorSystemName.html">ValidatorSystemName</A></samp></TD>
- <TD>A name validator, to be used when the name being prompted for must follow Java identifier rules.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorUniqueString.html">ValidatorUniqueString</A></samp></TD>
- <TD>A base class, or configurable class, to be used for any validation that requires the string to be unique within a given list.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.html">ValidatorUserActionCommand</A></samp></TD>
- <TD>Validates the command of a user defined action in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorUserActionComment.html">ValidatorUserActionComment</A></samp></TD>
- <TD>Validates the comment of a user defined action in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorUserActionName.html">ValidatorUserActionName</A></samp></TD>
- <TD>Validates the name of a user defined action in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorUserId.html">ValidatorUserId</A></samp></TD>
- <TD>Validates a user ID. Does only basic checking, intended to be subclassed.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorUserTypeName.html">ValidatorUserTypeName</A></samp></TD>
- <TD>Validates the name of a named type in the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.html">ValidatorUserTypeTypes</A></samp></TD>
- <TD>Validates the type list of a named type in the RSE.</TD>
- </TR>
- </TBODY>
-</TABLE>
-
-
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample1.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample1.html
deleted file mode 100755
index b323525fb..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample1.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Validator Sample One</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Validator Sample One</h1>
-<p>This is an example of a validator written from scratch, that just validates a customer name field is not empty.
-Note that while that is all is does today, the power of encapsulation is that we can easily add additional error
-checking in the future, and all dialogs or wizards that use the validator will pick up that change.
-<pre>
-
-package org.eclipse.rse.samples.ui.frameworks.dialogs;
-import org.eclipse.rse.samples.*;
-import org.eclipse.rse.ui.messages.SystemMessage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-
-/**
- * <I>A validator for a customer name. We simply ensure it is not empty, but this could easily be expanded.</I>
- */
-public class <B>SampleNameValidator</B> implements ISystemValidator
-{
- private SystemMessage currentMsg;
- private SystemMessage emptyMsg;
-
- /**
- * <I>Constructor for SampleNameValidator.</I>
- */
- public <B>SampleNameValidator</B>()
- {
- super();
- emptyMsg = SamplesPlugin.<A
- href="../messages/uiMessageAPI.html#getPluginMessage">getPluginMessage</A>(<A
- href="../messages/sampleMessageFile.html#SPPD1000">&quot;SPPD1000&quot;</A>);
- }
-
- /**
- * <I>Required ISystemValidator interface method.</I>
- * <I>Return the maximum length for customer names. We return 100.</I>
- */
- public int <B>getMaximumNameLength</B>()
- {
- return 100;
- }
-
- /**
- * <I>Required ISystemValidator interface method.</I>
- * <I>@see org.eclipse.rse.ui.validators.ISystemValidator#getSystemMessage()</I>
- */
- public SystemMessage <B>getSystemMessage</B>()
- {
- return currentMsg;
- }
-
- /**
- * <I>Required ISystemValidator interface method.</I>
- * <I>@see org.eclipse.rse.ui.validators.ISystemValidator#validate(String)</I>
- */
- public SystemMessage <B>validate</B>(String text)
- {
- isValid(text);
- return currentMsg;
- }
- /**
- * <I>@see org.eclipse.jface.dialogs.IInputValidator#isValid(String)</I>
- */
- public String <B>isValid</B>(String newText)
- {
- if ((newText==null) || (newText.length()==0))
- currentMsg = emptyMsg;
- // todo: more error checking
-
- if (currentMsg != null)
- return currentMsg.getLevelOneText();
- else
- return null;
- }
- /**
- * <I>@see org.eclipse.jface.viewers.ICellEditorValidator#isValid(Object)</I>
- */
- public String <B>isValid</B>(Object value)
- {
- if (value instanceof String)
- return isValid((String)value);
- return null;
- }
-}
-</pre>
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample2.html
deleted file mode 100755
index 5b2d63fe4..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample2.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Validator Sample Two</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Validator Sample Two</h1>
-<p>This is an example of a validator written by extending an existing RSE-supplied validator, and
-simply supplying unique messages.
-<pre>
-
-package org.eclipse.rse.samples.ui.frameworks.dialogs;
-import org.eclipse.rse.ui.validators.ValidatorIntegerRangeInput;
-import org.eclipse.rse.samples.*;
-
-/**
- * <I>An example of a customized validator, that prompts for a birth year.</I>
- */
-public class <B>SampleBirthYearValidator</B> extends ValidatorIntegerRangeInput
-{
- /**
- * <I>Constructor. Specifies the valid range, and unique error messages.</I>
- */
- public SampleBirthYearValidator()
- {
- super(1900, 2003);
- super.setErrorMessages(SamplesPlugin.<A
- href="../messages/uiMessageAPI.html#getPluginMessage">getPluginMessage</A>(&quot;<A
- href="../messages/sampleMessageFile.html#SPPD1001">SPPD1001</A>&quot;), // <I>empty</I>
- SamplesPlugin.getPluginMessage(&quot;<A
- href="../messages/sampleMessageFile.html#SPPD1002">SPPD1002</A>&quot;), // <I>non-numeric</I>
- SamplesPlugin.getPluginMessage(&quot;<A
- href="../messages/sampleMessageFile.html#SPPD1003">SPPD1003</A>&quot;)); // <I>out of range</I>
- }
-
-}</pre>
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample3.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample3.html
deleted file mode 100755
index 551b14350..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample3.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Validator Sample Three</title></head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Validator Sample Three</h1>
-<p>This is an example of a validator written by extending an existing RSE-supplied validator, and
-simply supplying unique messages.
-<pre>
-package org.eclipse.rse.samples.ui.frameworks.dialogs;
-import org.eclipse.rse.ui.validators.ValidatorIntegerRangeInput;
-import org.eclipse.rse.samples.*;
-
-/**
- * <I>An example of a customized validator, that prompts for a birth month.</I>
- */
-public class <B>SampleBirthMonthValidator</B> extends ValidatorIntegerRangeInput
-{
- /**
- * <I>Constructor. Specifies the valid range, and unique error messages.</I>
- */
- public SampleBirthMonthValidator()
- {
- super(1, 12);
- super.setErrorMessages(SamplesPlugin.<A
- href="../messages/uiMessageAPI.html#getPluginMessage">getPluginMessage</A>(&quot;<A
- href="../messages/sampleMessageFile.html#SPPD1004">SPPD1004</A>&quot;), // <I>empty</I>
- SamplesPlugin.getPluginMessage(&quot;<A
- href="../messages/sampleMessageFile.html#SPPD1005">SPPD1005</A>&quot;), // <I>non-numeric</I>
- SamplesPlugin.getPluginMessage(&quot;<A
- href="../messages/sampleMessageFile.html#SPPD1006">SPPD1006</A>&quot;)); // <I>out of range</I>
- }
-
-}</pre>
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample4.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample4.html
deleted file mode 100755
index 23fdb97f2..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/validators/validatorSample4.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Validator Sample Four</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Validator Sample Four</h1>
-<p>This is an example of a validator written by extending an existing RSE-supplied validator, and
-simply supplying unique messages.
-<pre>
-package org.eclipse.rse.samples.ui.frameworks.dialogs;
-import org.eclipse.rse.core.ui.validators.ValidatorIntegerRangeInput;
-import org.eclipse.rse.samples.*;
-
-/**
- * <I>An example of a customized validator, that prompts for a birth day.</I>
- */
-public class <B>SampleBirthDayValidator</B> extends ValidatorIntegerRangeInput
-{
- /**
- * <I>Constructor. Specifies the valid range, and unique error messages</I>.
- */
- public SampleBirthDayValidator()
- {
- super(1, 31);
- super.setErrorMessages(SamplesPlugin.<A
- href="../messages/uiMessageAPI.html#getPluginMessage">getPluginMessage</A>(&quot;<A
- href="../messages/sampleMessageFile.html#SPPD1007">SPPD1007</A>&quot;), // <I>empty</I>
- SamplesPlugin.getPluginMessage(&quot;<A
- href="../messages/sampleMessageFile.html#SPPD1008">SPPD1008</A>&quot;), // <I>non-numeric</I>
- SamplesPlugin.getPluginMessage(&quot;<A
- href="../messages/sampleMessageFile.html#SPPD1009">SPPD1009</A>&quot;)); // <I>out of range</I>
- }
-
-}</pre>
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/widgets/uiWidgetsAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/widgets/uiWidgetsAPI.html
deleted file mode 100755
index 39f1366ed..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/widgets/uiWidgetsAPI.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Widgets API</title>
-</head>
-
-<body bgcolor="#ffffff">
-
-<h1>RSE Widgets API</h1>
-<p>Whether coding dialogs, property pages, preference pages or wizard pages we need to write the code to display
-and process the widgets in the client area. The RSE offers some help in this area in two ways:
-</p>
-<ol>
-<li>A <samp><A href="../../../reference/api/org/eclipse/rse/ui/SystemWidgetHelpers.html">SystemWidgetHelpers</A></samp>
-class full of static methods to make it easier to create SWT widgets.
-<li>A few re-usable widgets that extend SWT.
-</ol>
-
-<h2>SystemWidgetHelpers Class</h2>
-<p>The <samp><A href="../../../reference/api/org/eclipse/rse/ui/SystemWidgetHelpers.html">SystemWidgetHelpers</A></samp>
-class in <samp><A href="../../../reference/api/org/eclipse/rse/ui/package-summary.html">org.eclipse.rse.ui</A></samp>
-is chock full of static methods to simplify the work in populating a GridLayout composite with widgets. The GridLayout composite is the most
-flexible and useful of the layouts, yet the most work to code to. These methods will help with that. The methods include:
-</p>
-<ul>
-<li>Methods for creating a GridLayout composite. You typically call this at the start of your code that populates the client area.
-<li>Methods for creating all the common SWT controls, with the GridData values specified for you.
-<li>Methods for creating readonly flavours of input controls, such as a Text field or Combo box.
-<li>Methods for creating labeled entry fields that have a prompting label in front of an input widget.
-<li>Methods for automatically assigning unique mnemonics to all input widgets on a given composite or page.
-<li>Methods for setting composite, widget, action and menu item contextual help.
-<li>Methods for creating RSE-supplied widgets.
-<li>Methods for creating populated combo boxes for connections, remote folders, system types and host names.
-</ul>
-
-<h2>RSE-Supplied Widgets</h2>
-<p>The <samp><A href="../../../reference/api/org/eclipse/rse/ui/widgets/package-summary.html">org.eclipse.rse.ui.widgets</A></samp>
-package contains some specialized widgets you may find a use for:
-</p>
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Widget Class</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/widgets/SystemHistoryCombo.html">SystemHistoryCombo</A></samp></TD>
- <TD>A entry field that remembers its previous values and shows them in a dropdown so the user can easily re-select a previously typed value. The history is maintained for you, and is indexed by a key. This allows the combos to share history across numerous dialogs, property pages or wizard pages. The history can be bounded and pre-filled, and the user can clear the history at any time. This handy widget is used extensively within the RSE.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/widgets/InheritableEntryField.html">InheritableEntryField</A></samp></TD>
- <TD>An entry field with an left-right arrow beside it. When toggled left, the entry field is not editable and displays a supplied value. When toggled right, the entry field is editable. Useful in cases where the user can choose between an inherited or default value, or enter their own value.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/widgets/SystemPortPrompt.html">SystemPortPrompt</A></samp></TD>
- <TD>Uses the InheritableEntryField to prompt for a TCP/IP port, where toggling to the left means port 0, or let the &quot;first available port&quot;.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../../reference/api/org/eclipse/rse/ui/widgets/SystemHostCombo.html">SystemHostCombo</A></samp></TD>
- <TD>This is a combo box that displays the currently defined RSE system connections. The list can be subset by system type or types. Further, you can optionally display a New button beside the combo that allows the user to create a new connection.</TD>
- </TR>
- </TBODY>
-</TABLE>
-<p>There are also many useful widgets related to the selection of remote files or folders, in package
-<samp><A href="../../../reference/api/org/eclipse/rse/files/ui/widgets/package-summary.html">org.eclipse.rse.files.ui.widgets</A></samp>
-
-<P><BR></P>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/wizards/uiWizardsAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/wizards/uiWizardsAPI.html
deleted file mode 100755
index 89adf7765..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/wizards/uiWizardsAPI.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../../book.css" TYPE="text/css">
-<title>RSE Wizards API</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>RSE Wizards API</h1>
-<p>Typically in eclipse GUI design we use a wizard to create new things, and a dialog
-to prompt for secondary information, or update existing things. The Remote System Explorer
-can offer help in creating wizards, just as it does in creating dialogs.
-</p>
-
-<h2>RSE-Supplied Base Classes for Wizards</h2>
-<p>The RSE offers the following classes, in package
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/package-summary.html">org.eclipse.rse.ui.wizards</A></samp> to simplify the creation of wizards.</p>
-
-<h3>The <samp>AbstractSystemWizardPage</samp> class</h3>
-<p>The <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.html">AbstractSystemWizardPage</A></samp> abstract base class extends the
-JFace <samp>WizardPage</samp> class to offer the following benefits to subclasses:</p>
-<ol>
- <li>Designed to work in conjunction with <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html">AbstractSystemWizard</A></samp>,
- propogating settings from the wizard to the individual wizard pages.
- <li>Supports using the overall wizard page title as set
- by <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html#setWizardPageTitle(java.lang.String)">setWizardPageTitle(String)</A></samp>
- in <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html">AbstractSystemWizard</A></samp>,
- if no title specified in the constructor.
- <li>Supports a <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.html#setHelp(java.lang.String)">setHelp(String)</A></samp> method to set the wizard page's overall contextual help
- <li>Implements <samp><A
- href="../messages/uiMessageAPI.html#ISystemMessageLine">ISystemMessageLine</A></samp> so supports setting error messages as
- either strings or, preferably, <samp><A
- href="../messages/uiMessageAPI.html#SystemMessage">SystemMessage</A></samp> objects.
- <li>Supports automatic assignment of unique mnemonics for all input-capable controls on the page, to aid in accessibility.
- <li>Supports setting a default-focus control, which gets initial focus when the page is shown.
- <li>Supports helper methods to aid in population of the client area:
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.html#addSeparatorLine(org.eclipse.swt.widgets.Composite, int)">addSeparatorLine(Composite,int)</A></samp>,
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.html#addFillerLine(org.eclipse.swt.widgets.Composite, int)">addFillerLine(Composite,int)</A></samp> and
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.html#addGrowableFillerLine(org.eclipse.swt.widgets.Composite, int)">addGrowableFillerLine(Composite,int)</A></samp>.
-</ol>
-
-
-<h3><A name="AbstractSystemWizard"></A>The <samp>AbstractSystemWizard</samp> class</h3>
-<p>The <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html">AbstractSystemWizard</A></samp> abstract base class extends the JFace <samp>Wizard</samp>
-class to offer the following benefits to subclasses:</p>
-<ol>
- <li>Designed to work in conjunction with the <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseWizardAction.html">SystemBaseWizardAction</A></samp>,
- and <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemWizardDialog.html">SystemWizardDialog</A></samp> classes, propogating settings
- from these to the wizard, and further propogating those to the individual wizard pages.
- <li>The overall wizard title and image can be set via the constructor or setter methods.
- <li>Supports setting an input object, and getting an output object. This is exploited by the
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/actions/SystemBaseWizardAction.html">SystemBaseWizardAction</A></samp> class, when this wizard is launched from a subclass of that action class.
- <li>Supports setting a wizard page title via <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html#setWizardPageTitle(java.lang.String)">setWizardPageTitle(String)</A></samp>, that all
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.html">AbstractSystemWizardPage</A></samp> pages will use by default for
- their title, if the non-title constructor is used for that page.
- <li>If being hosted by a <samp><A href="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemWizardDialog.html">SystemWizardDialog</A></samp>, supports dynamically
- updating the wizard size via <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html#updateSize()">updateSize()</A></samp>,
- if dynamic content is added to a wizard page, causing the page to grow beyond its initial size.
- <li>Supports a <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html#setHelp(java.lang.String)">setHelp(String)</A></samp> method to set the overall wizard's contextual help. This is propogated to each
- <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.html">AbstractSystemWizardPage</A></samp> as it is added.
- <li>Supports setting the viewer that launched this wizard, as wizards often need to know this so they can update the UI upon Finish.
- <li>Supports a <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html#wasCancelled()">wasCancelled()</A></samp> method so callers can easily test if the wizard was cancelled by the user.
- <li>Supports a <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html#setMinimumPageSize(int, int)">setMinimumPageSize(int,int)</A></samp> method to set the minimum width and height of the wizard.
- <li>Supports a <samp><A href="../../../reference/api/org/eclipse/rse/ui/wizards/AbstractSystemWizard.html#setPageError(org.eclipse.jface.wizard.IWizardPage)">setPageError(IWizardPage)</A></samp> method that can be called in performFinish when an error is detected on a
- non-current page. This issues a message telling the user there is an error on another page.
-</ol>
-
-<P><BR></P>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/file_conn.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/file_conn.gif
deleted file mode 100755
index 136f576a3..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/file_conn.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/file_profiles.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/file_profiles.gif
deleted file mode 100755
index e0ad94fca..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/file_profiles.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/images/configexample.jpg b/rse/doc/org.eclipse.rse.doc.isv/guide/images/configexample.jpg
deleted file mode 100755
index 62197bc69..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/images/configexample.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/images/layers.jpg b/rse/doc/org.eclipse.rse.doc.isv/guide/images/layers.jpg
deleted file mode 100755
index 0dd8792ec..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/images/layers.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/overview.html b/rse/doc/org.eclipse.rse.doc.isv/guide/overview.html
deleted file mode 100755
index de5f0c361..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/overview.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<title>Remote System Explorer Overview</title>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body bgcolor="#ffffff">
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/ChangeFilterDialog_Default.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/ChangeFilterDialog_Default.gif
deleted file mode 100755
index 55e98e121..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/ChangeFilterDialog_Default.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/NewConnection.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/NewConnection.gif
deleted file mode 100755
index 567d476dd..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/NewConnection.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/NewFilterWizard_Default.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/NewFilterWizard_Default.gif
deleted file mode 100755
index e39164720..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/NewFilterWizard_Default.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/RSView_iSeries.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/RSView_iSeries.gif
deleted file mode 100755
index c268d212f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/RSView_iSeries.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/other.html b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/other.html
deleted file mode 100755
index 9a5485053..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/other.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Other Relevant Extension Points</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Other Relevant Extension Points</h1>
-<p>There are some Eclipse extension points that are relevant as-is to the Remote System Explorer,
-which we list here. We do not describe how to use these extension points here, except to document
-the information needed to enable them to in Remote System Explorer.
-</p>
-
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Extension Point</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><samp>org.eclipse.ui.viewActions</samp></TD>
- <TD>For adding actions to the pulldown menu in any view's local toolbar, or to the toolbar itself.
- To use this you need to know the ID of the RSE views, for the <samp>targetID</samp> attribute: There are:
- <ul>
- <li><samp>org.eclipse.rse.ui.view.systemView</samp> for the primary
- <A href="view_RS.gif">Remote Systems</A> view.
- <li><samp>org.eclipse.rse.ui.view.teamView</samp> for the
- <A href="view_Team.gif">Team</A> view in the RSE perspective.
- <li><samp>org.eclipse.rse.ui.view.systemTableView</samp> for the
- <A href="view_Table.gif">Remote System Details</A> view in the RSE perspective.
- </ul>
- </TD>
- </TR>
- <TR>
- <TD><samp>org.eclipse.ui.propertyPages</samp></TD>
- <TD>For adding property pages for non-remote objects within the
- Remote System Explorer. To use this you need to know the class type
- of these objects for the <samp>objectClass</samp> attribute of the <samp>&lt;page&gt;</samp> element:
- <ul>
- <li>Connections: <samp><A href="../../reference/api/org/eclipse/rse/core/model/IHost.html">org.eclipse.rse.core.model.IHost</A></samp>
- <li>SubSystems: <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html">org.eclipse.rse.core.subsystems.ISubSystem</A></samp>
- <li>Filter Pools: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">org.eclipse.rse.core.filters.ISystemFilterPoolReference</A></samp>
- <li>Filters: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterReference.html">org.eclipse.rse.core.filters.ISystemFilterReference</A></samp>
- </ul>
- It is possible to scope your property pages to only appear for certain system types or subsystems, using
- the <samp>&lt;filter&gt;</samp> element. For example:<br>
- <pre><code>
- &lt;extension point=&quot;org.eclipse.ui.propertyPages&quot;&gt;
- &lt;page name=&quot;Team Info&quot;
- class=&quot;samples.ui.propertypages.TeamFilterPropertyPage&quot;
- id=&quot;samples.ui.pp.filter.team&quot;
- objectClass=&quot;org.eclipse.rse.core.filters.ISystemFilterReference&quot; &gt;
- <b>&lt;filter name=&quot;subsystemFactoryId&quot; value=&quot;samples.subsystems.factory&quot;/&gt;</b>
- &lt;/page&gt;
- &lt;/extension&gt;
- </code></pre>
- See <a href="#scoping">Scoping</a> for all the filter <samp>names</samp> supported by RSE objects.
- </TD>
- </TR>
- <TR>
- <TD><samp>org.eclipse.ui.popupMenus</samp></TD>
- <TD>For adding pop-up menu actions for non-remote objects within the Remote System Explorer.
- To use this you need to know the class type of these objects for the <samp>objectClass</samp> attribute
- of the &lt;objectContribution&gt; element:
- <ul>
- <li>Connections: <samp><A href="../../reference/api/org/eclipse/rse/core/model/IHost.html">org.eclipse.rse.core.model.IHost</A></samp>
- <li>SubSystems: <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html">org.eclipse.rse.core.subsystems.ISubSystem</A></samp>
- <li>Filter Pools: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">org.eclipse.rse.core.filters.ISystemFilterPoolReference</A></samp>
- <li>Filters: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterReference.html">org.eclipse.rse.core.filters.ISystemFilterReference</A></samp>
- </ul>
- It is possible to scope your actions to only appear for certain system types or subsystems, using
- the <samp>&lt;filter&gt;</samp> element. For example:<br>
- <pre><code>
- &lt;extension point=&quot;org.eclipse.ui.popupMenus&quot;&gt;
- &lt;objectContribution
- id =&quot;samples.ui.actions.TeamFilterActions&quot;
- objectClass=&quot;org.eclipse.rse.core.filters.ISystemFilterReference&quot;&gt;
- <b>&lt;filter name=&quot;subsystemFactoryId&quot; value=&quot;samples.subsystems.factory&quot;/&gt;</b>
- &lt;action id=&quot;samples.ui.actions.TeamFilterAction1&quot;
- label=&quot;Sample Team Filter Action&quot;
- class=&quot;samples.ui.actions.ShowJarContents&quot;&gt;
- &lt;/action&gt;
- &lt;/objectContribution&gt;
- &lt;/extension&gt;
- </code></pre>
- See <a href="#scoping">Scoping</a> for all the filter <samp>names</samp> supported by RSE objects.
- </TD>
- </TR>
- </TBODY>
-</TABLE>
-
-<a name="scoping"></a><h2>Scoping</h2>
-<p>For the <samp>org.eclipse.ui.propertyPages</samp> and <samp>org.eclipse.ui.popupMenus</samp> extension points, it is
-possible to scope your property pages and actions to only filters in a particular subsystem, or connections of a
-particular system type, say. These extension points support the <samp>&lt;filter&gt;</samp> element, which
-allows you to specify a property name, and a property value, such that the page or action will only show if
-that property's value is the one given:<br>
-<pre><code>
- &lt;filter name="<i>name</i>" value="<i>value</i>"/&gt;
-</code></pre>
-It is up to the selected object's adapter to perform this test, in its
-<code>testAttribute(Object target,String <i>name</i>,String <i>value</i>)</code> method. This method is implemented for the adapters for every object shown in the
-Remote Systems view, and what follows is a list of the tests it will do on the given <samp><i>value</i></samp>,
-for the given <samp><i>name</i></samp>:</p>
-<ul>
-<li><b><samp>"name"</samp></b>. Will test the <i>value</i> for an exact match on an object's name,
-or beginning-of-name match if ends with an asterisk.
-<li><b><samp>"type"</samp></b>. Will test the <i>value</i> for an exact match on an object's type.
-<li><b><samp>"offline"</samp></b>.Will test the <i>value</i> against "true" if the user is working
-in "offline" mode or "false" if not. Currently only supported for iSeries connections.
-<li><b><samp>"connected"</samp></b>. Will test the <i>value</i> against "true" if the connection
-containing the selected object is active or "false" if not.
-<li><b><samp>"hasChildren"</samp></b>. Will test the <i>value</i> against "true" if this object's
-adapter reports that it has children or "false" if it doesn't have children.
-<li><b><samp>"systemType"</samp></b>. Will test the <i>value</i> for an exact match on the system type of
-this object's parent SystemConnection object.
-You can specify multiple values if you comma-separate them.
-<li><b><samp>"subsystemFactoryId"</samp></b>. Will test the <i>value</i> for an exact match on the
-<samp>ID</samp> of the subsystem factory that created this object's subsystem. Returns false for SystemConnection objects.
-You can specify multiple values if you comma-separate them.
-<li><b><samp>"subsystemFactoryCategory"</samp></b>. Will test the <i>value</i> for an exact match
-on the <samp>category</samp> of the subsystem factory that created this object's subsystem.
-You can specify multiple values if you comma-separate them.
-</ul>
-
-<p>For system filter objects of type <samp>org.eclipse.rse.core.filters.ISystemFilterReference</samp>,
-the following names are also supported:
-<ul>
-<li><b><samp>"filterType"</samp></b>. Will test the <i>value</i> for an exact match on the selected filter's
-untranslated type, as set internally. The only RSE-supplied subsystem to support multiple filter types is
-the iSeries Objects subsystem for iSeries connections. It contains these types:
- <ul>
- <li><samp>"Library"</samp>.
- <li><samp>"LibraryList"</samp>.
- <li><samp>"Object"</samp>.
- <li><samp>"Member"</samp>.
- </ul>
-</ul>
-
-<p>For the <samp>org.eclipse.ui.popupMenus</samp> extension point, you can also use the above names
-in the &lt;visibility&gt; and &lt;enablement&gt; elements, for extreme flexibility in when
-the action is shown, and when it is enabled or disabled. These map to the <samp>objectState</samp>
-attribute. For example:
-<pre><code>
- &lt;enablement&gt;
- &lt;objectState name="hasChildren" value="true"/&gt;
- &lt;/enablement&gt;
-</code></pre>
-
-
-<p>Be aware the <samp>&lt;visibility&gt;</samp> element is available at the
-<samp>&lt;objectContribution&gt;</samp> level, while the <samp>&lt;enablement&gt;</samp>
-element is available at the <samp>&lt;Action&gt;</samp> level.
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/popup.html b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/popup.html
deleted file mode 100755
index 3c39a717d..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/popup.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Plugging In Popup Menu Actions</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Plugging In Popup Menu Actions</h1>
-<p>The <samp><A href="../../reference/extension-points/org_eclipse_rse_ui_popupMenus.html">org.eclipse.rse.ui.popupMenus</a></samp> extension point is defined in the
-plugin <samp>org.eclipse.rse.ui</samp>, and it is patterned
-after Eclipse's <samp>org.eclipse.ui.popupMenus</samp> extension point. However, it is
-both simplified and extended specifically for remote objects.
-</p>
-<p>The primary element in the markup for this extension point is the <b><samp>&lt;objectContribution&gt;</samp></b> element,
-which scopes the remote objects to which the child elements apply:
-</p>
-<ul>
-<li><b>id</b>.A unique ID for this extension point. Not used, but required by Eclipse.
-<li><b><i>filtering attributes</i></b>.To scope which remote objects these actions should show up for.
-Described in the <samp><A href="../../reference/extension-points/org_eclipse_rse_ui_popupMenus.html">documentation</a></samp>
-of this element.
-</ul>
-<p>Within each <samp>&lt;objectContribution&gt;</samp> element are zero or more <B><samp>&lt;menu&gt;</samp></B> elements for
-optionally defining cascading submenus, and &lt;<B>action</B>&gt; elements for the actual actions.
-To have the actions show up in a cascading menu, use the <samp>&lt;menu&gt;</samp> element with these
-attributes:
-</p>
-<ul>
-<li><b>id</b>. Unique id for the submenu. Used later to target actions into this cascading submenu.
-<li><b>label</b>. The text the user sees in the pop-up menu.
-<li><b>path</b>. For multi-cascading menus, use this attribute to identify a previously specified menu that
-this menu is to be nested within. The syntax is a bit tricky. It is <samp>id/group</samp>, where <samp>id</samp>
-matches the id attribute from a previous <samp>&lt;menu&gt;</samp> element, and <samp>group</samp> matches the name attribute
-of a <samp>&lt;separator&gt;</samp> sub-element within that previous <samp>&lt;menu&gt;</samp> element. For multi-nesting, repeat the <samp>id</samp>
-part, as in <samp>id1/id2/id3/group</samp>. In this case, there must be a <samp>&lt;menu&gt;</samp> element with and id value of
-<samp>id3</samp> that refers to another <samp>&lt;menu&gt;</samp> element <samp>id2</samp> via is path attribute, which in turn
-refers to <samp>&lt;menu&gt;</samp> element <samp>id1</samp> via its <samp>path</samp> attribute. If the group does not exist,
-it will be created.
-<br>
-For the root cascading menu, you can also use this to specify a group within the remote object's pop-up,
-for where to place this cascading menu. The default is the <samp>additions</samp> group, which is near the
-bottom of the pop-up menu. The RSE-supplied groups for pop-up menus are listed shortly in Table 4. There are
-also a few RSE-supplied cascading menus listed in Table 4, which can be specified for the id prefix in order
-to add a cascading menu to an RSE-supplied cascading menu.
-</ul>
-<P>Within each <samp>&lt;menu&gt;</samp> element are one or more <b><samp>&lt;separator&gt;</samp></b> elements that partition the cascading
-menu into groups. Groups are simply named physical areas of the menu. The order in which they are defined is the order they
-appear in the menu. Actions always go into groups. Groups avoid the need to specify relative information to identify where
-within a pop-up menu to place actions. There is only one attribute for this element:
-</P>
-<ul>
-<li><b>name</b>. The name to give this group. Users do not see this, but it is used in the <samp>action</samp> element to identify where to place
-the action within this submenu. Groups exist in the order they are defined, top to bottom. Between groups is a separator unless
-contiguous groups are empty. There is always a default group named <samp>additions</samp> supplied for you.
-</ul>
-<p>Finally, within <samp>&lt;objectContribution&gt;</samp> elements are one or more <b><samp>&lt;action&gt;</samp></b> elements identifying the
-actual actions, each of which only show up if the scoping criteria is met for that parent <samp>&lt;objectContribution&gt;</samp>
-element. The attributes for <samp>&lt;action&gt;</samp> elements are:
-</p>
-<ul>
-<li><b>id</b>. Unique id for the action.
-<li><b>label</b>. What the user sees in the pop-up menu.
-<li><b>icon</b>. Optional icon to show beside the label. This is the name of a file qualified by a path relative to this plugin's directory.
-<li><b>class</b>. Name of the class extending one of the classes listed in the documentation.
-<li><b>menubarPath</b>. Where to put this action. This is optional and only required when you do not want the action to go into the
-default location within the remote object's pop-up menu. This is a group name, optionally preceded by slash-delimited Ids for actions
-that go inside cascading menus, where each Id matches an id attribute from a previously specified <samp>&lt;menu&gt;</samp> element.
-If no menubarPath is specified, the action goes into the <samp>&lt;additions&gt;</samp> area of the object's popup menu, which is
-near the bottom of the pop-up menu. The RSE-supplied groups for remote object pop-up menus are listed in Table 4, as well as menu Ids
-for RSE-supplied cascading menus, should you wish to add an action to an RSE-supplied cascading menu.
-<li><b>enablesFor</b>. Tells when to enable this action based on how many items are selected. Typically, specify "1" for
-single-selection or "+" for multiple-selection. You can also change the enabled state of your action within your class,
-by calling the <samp>setEnabled(boolean)</samp> method or overriding the <samp>getEnabled(Object[] currentlySelected)</samp> method that is called
-when the selection changes.
-<li><b>state</b>. Specify if this is a toggle (checkable) menu item. Specify "true" or "false" to indicate initial
-toggle status. Call <samp>setChecked(boolean)</samp> in your class to change the toggled state.
-<li><b>helpContextId</b>. Allows F1 help for this action. Optional.
-</ul>
-<p>
-The <samp>path</samp> attribute for the <samp>&lt;menu&gt;</samp> element, and the <samp>menubarPath</samp> attribute for the <samp>&lt;action&gt;</samp>
-element, are the most difficult to master. The rules are reasonably simple though:
-</p>
-<ol>
-<li>To have your action show up in the initial pop-up menu, just specify a group name on the <samp>menubarPath</samp> attribute. That name can be
-one of the RSE-supplied group names defined in Table 4, or your own group name, which will be created and appended to the end of the
-pop-up menu. The default group is <samp>"additions"</samp>.
-<br>Example: <samp>menubarPath="myGroup"</samp>
-<li>To have your action show up in a simple RSE-supplied cascading menu within the pop-up menu, in your <samp>&lt;action&gt;</samp> element,
-specify the RSE-supplied menu ID from Table 4 in the <samp>menubarPath</samp> attribute, then a slash followed by the name of a group. The only
-RSE-supplied group for cascading menus is <samp>"additions"</samp>. If you specify anything else for the group, the group will be created for you
-at the bottom of the menu.
-<br>Example: <samp>menubarPath="menu.new/myGroup"</samp>
-<li>To have your action show up in a simple cascading menu of your own, first define the menu with a <samp>&lt;menu&gt;</samp> element,
-giving it an ID via the id attribute. In your <samp>&lt;action&gt;</samp> element, in the <samp>menubarPath</samp> attribute specify that id followed by a slash
-and then the name of a group. That group name can be one specified on a <samp>&lt;separator&gt;</samp> element within your menu, or a new name, which
-results in a new group at the bottom of the menu. In the latter case, there will be no separators delimiting the group, while in the former case
-there will be.
-<br>Example: <samp>menubarPath="myMenu1/myGroup"</samp>
-<li>To have your action show up in a multi-cascading menu of your own, define each of the menu via <samp>&lt;menu&gt;</samp> elements. For all but the
-first, identify the parent menu using the path attribute, specifying the Ids for each of the parent menus, slash-separated. At
-the end of the path attribute, specify the group within the final parent menu into which this menu will be placed. Again, this
-will either be a group defined with a <samp>&lt;separator&gt;</samp> element in the parent <samp>menu</samp> element, or specify a non-existing group that will be
-created for you. Once your multi-cascading menu is created, you identify it in your <samp>&lt;action&gt;</samp> element via the <samp>menubarPath</samp> attribute,
-specifying all the menu Ids up to the final menu, slash-separated, and then the group within that final menu, as usual.
-<br>Example: <samp>menubarPath="myMenu1/myMenu2/myGroup"</samp>
-</ol>
-
-<h2>Programming Details</h2>
-<p>To use this extension point you will create a class that extends the
-<samp><A href="../../reference/api/org/eclipse/rse/ui/actions/SystemAbstractPopupMenuExtensionAction.html">SystemAbstractPopupMenuExtensionAction</A></samp> class in the
-package <samp><A href="../../reference/api/org/eclipse/rse/ui/actions/package-summary.html">org.eclipse.rse.ui.actions</A></samp>. This is your action class,
-and when the user selects your action, the <samp>run()</samp>
-method in your action class will be called. You will rarely extend the <samp>SystemAbstractPopupMenuExtensionAction</samp> base class
-directly, though. Instead there are subclasses of it that offer additional functionality for specific types of remote objects,
-as shown here:
-</p>
-
-
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Base Class</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/ui/actions/SystemAbstractPopupMenuExtensionAction.html">SystemAbstractPopupMenuExtensionAction</A></samp> in
- <samp>org.eclipse.rse.ui</samp> plugin</TD>
- <TD>Base class offering generic support for any remote object pop-up menu action, for any system type.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/files/ui/actions/SystemAbstractRemoteFilePopupMenuExtensionAction.html">SystemAbstractRemoteFilePopupMenuExtensionAction</A></samp>
- in <samp>org.eclipse.rse.files.ui</samp> plugin</TD>
- <TD>Specialized base class offering specific support for any remote file object pop-up menu action, for any system type.</TD>
- </TR>
- </TBODY>
-</TABLE>
-
-<br><hr>
-<p>See the <a href="../tutorial/popup.html">pop-up menu action tutorial</a> for a step-by-step example.</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage.html b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage.html
deleted file mode 100755
index d7d71a13e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Plugging In Property Pages</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Plugging In Property Pages</h1>
-<p>The <samp><A href="../../reference/extension-points/org_eclipse_rse_ui_propertyPages.html">org.eclipse.rse.ui.propertyPages</a></samp> extension point is defined in the
-plugin <samp>org.eclipse.rse.ui</samp>, and it is patterned after Eclipse's <samp>org.eclipse.ui.propertyPages</samp> extension point, but both
-simplified and extended specifically for remote objects. <BR>
-What is a property page?
-It is a page that shows up in the Eclipse <A href="propertypage_figure2.gif">Properties dialog</A> that users
-get to by right-clicking on an object within any tree or table view, and selecting
-the <A href="propertypage_figure1.gif">Properties action</A>.</p>
-<p>Extenders supply one or more <samp>&lt;page&gt;</samp> elements within the beginning and ending <samp>&lt;extension&gt;</samp> element for this.
-The attributes of this <samp>&lt;page&gt;</samp> element are:</p>
-<ul>
-<li><b>id</b>. A unique ID for this extension point. Not actually used, but required by Eclipse.
-<li><b>name</b>. A translated node-name to show in the left tree view in the Eclipse-supplied
-Properties dialog that comes up when the user selects "Properties..." from the pop-up menu.
-<li><b>icon</b>. An optional icon to show in the Properties dialog for this property page.
-<li><b>class</b>. The fully qualified name of the class that implements the Eclipse interface
-<samp>org.Eclipse.ui.IWorkbenchPropertyPage</samp>. This is usually done by extending the Eclipse class
-<samp>org.Eclipse.ui.dialog.PropertyPage</samp>. Your class will populate the detail page on the right of the
-Eclipse-supplied Properties dialog when the node-name is selected in the left hand tree view.
-<li><b><i>filtering criteria</i></b>. To scope which remote objects these property pages should show up for,
-there are a series of filtering attributes. These attributes are identical to those in the <samp><A href="popup.html">pop-upMenus</A></samp>
-extension point. Providers supply as many as needed to uniquely identify their target objects. Every one of these
-values can be scalar or "simple generic", meaning it can start or end with an asterisk for pattern matching:
-<ul>
-<li><b>subsystemconfigurationid</b>. Restrict to remote objects originating from subsystems created by this subsystem factory.
-<li><b>typecategoryfilter</b>. Restrict to remote objects originating from subsystems created by a subsystem factory that specified this value for their category attribute
-<li><b>namefilter</b>. Restrict to remote objects matching this simple generic name
-<li><b>typefilter</b>. Restrict to remote objects matching this simple type filter. The "type" of any remote object is subsystem-determined.
-<li><b>subtypefilter</b>. Restrict to remote objects matching this simple sub-type filter. The "subtype" of any remote object is subsystem-determined.
-<li><b>subsubtypefilter</b>. Restrict to remote objects matching this simple sub-sub-type filter. The "sub-subtype" of any remote object is subsystem-determined.
-</ul>
-</ul>
-
-<h2>Programming Details</h2>
-<p>To use this extension point your class will typically extend one of the supplied base classes to
-make it easier to create these property pages for remote objects. The only method you must implement in these
-classes is <samp>createContents(Composite)</samp>, which populates the details page on the right side when the node is
-selected on the left side. The supplied classes are listed here:
-</p>
-
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Base Class</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/ui/propertypages/SystemAbstractPropertyPageExtensionAction.html">SystemAbstractPropertyPageExtensionAction</A></samp>
- in <samp>org.eclipse.rse.ui</samp> plugin.</TD>
- <TD>Base class offering generic support for any remote object property page.</TD>
- </TR>
- <TR>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/files/ui/propertypages/SystemAbstractRemoteFilePropertyPageExtensionAction.html">SystemAbstractRemoteFilePropertyPageExtensionAction</A></samp>
- in <samp>org.eclipse.rse.files.ui</samp> plugin.</TD>
- <TD>Specialized base class offering specific support for any remote file object property page.</TD>
- </TR>
- </TBODY>
-</TABLE>
-<p>
-</p>
-
-<br><hr>
-<p>See the <a href="../tutorial/propertypage.html">property page tutorial</a> for a step-by-step example.</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure1.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure1.gif
deleted file mode 100755
index 14bda64e8..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure1.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure2.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure2.gif
deleted file mode 100755
index 7950bb9aa..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure2.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/subsystem.html b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/subsystem.html
deleted file mode 100755
index 10b21ae60..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/subsystem.html
+++ /dev/null
@@ -1,243 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Plugging In SubSystems</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Plugging In SubSystems</h1>
-<p>The <samp><A href="../../reference/extension-points/org_eclipse_rse_ui_subsystemConfigurations.html">org.eclipse.rse.ui.subsystemConfigurations</a></samp>
-extension point is defined in the plugin <samp>org.eclipse.rse.ui</samp>.
-This is the most complex extension point to use, but also the most powerful. It enables
-tool providers to register a class that creates subsystem objects, which appear under
-a connection when a connection is expanded in the Remote Systems view.
-For example, <A href="RSView_iSeries.gif">here is an iSeries connection</A> with four subsystems,
-each created by a subsystem configuration registered with this extension point.
-</p>
-<p>The <A href="../../reference/extension-points/org_eclipse_rse_ui_subsystemConfiguration.html">extension markup</A> is quite simple for this extension point,
-as it has only one element, <b><samp>&lt;configuration&gt;</samp></b>, with only a few simple attributes to supply:
-</p>
-<ul>
-<li><b>id</b>. Unique id for the extension, as required for all extensions. However, in this case it is used to create
-folders within the <samp>RemoteSystemsConnections</samp> project, where all Remote System Explorer data is stored.
-There is also a way to <A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html#getSubSystemConfiguration(java.lang.String)">query</A> a subsystem configuration
-object via its ID.<li><b>vendor</b>. Your company name, shown in properties dialog for subsystems created by this subsystem configuration.
-<li><b>icon</b>. The icon displayed in the Remote Systems view for each subsystem created by this subsystem configuration.
-<li><b>iconlive</b>. The icon used when the subsystem is physically connected to its remote system.
-<li><b>name</b>. The name displayed in the Remote Systems view for each subsystem created by this subsystem configuration.
-<li><b>systemTypes</b>. A semi-colon separated list of system types which this subsystem configuration supports. When a user creates a
-connection, this configuration will only be asked to create a subsystem for connections to systems of these types. The default is all
-system types.
-<li><b>category</b>. A name used to categorize this subsystem's functionality. Used by the <A href="popup.html">popupMenus</A>
-and <A href="propertypage.html">propertyPages</A> extension points to allow actions and property pages to be scoped to
-resources shown in subsystems of a particular category. Multiple subsystems can have the same category.
-<li><b>class</b>. A class implementing <A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.html">ISubSystemConfiguration</A>
-interface, as described in the following programming details section.
-</ul>
-
-
-<h2>Programming Details</h2>
-<p>It is important to remember what the purpose of a subsystem is, and how it fits in the overall RSE <A
- href="../Model.html">model</A>, so as to understand the programming details for supporting
-subsystems via this subsystem configuration extension point. Minimally speaking, this extension point requires a class that implements the interface
-<samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.html"><B>ISubSystemFactory</B></A></samp>.
-Ultimately, the intent of a subsystem <I>configuration</I> is to provide individual
-subsystem <I>instances</I> to each connection, and the intent of a subsystem instance is to present remote resources for display or manipulation purposes. Thus, you must also create a class implementing the interface <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html"><B>ISubSystem</B></A></samp>.
-<BR>
-The intent of each subsystem is to show remote resources from the remote system
-identified by the parent connection, for the user. (Subsystems can in fact be hidden, which means their their role is to return remote resources for programmatic purposes only.) When the first request is made for remote objects, the subsystem is asked to connect to the remote system if it is not already.
-This job is deferred to a <A href="../../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html">IConnectorService</A> object whose role it is to manage connecting and disconnecting
-to the remote physical system. By use of a <A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.html">connector service manager</a>,
-one system can manage the live connections of multiple subsystems in the same system connection, should they happen to share the same communication pipe.
-If filters are <A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.html#supportsFilters()">supported</A>
-(the default), the first connection is made, and the remote resources are subsequently shown, when filters within the subsystem
-are expanded, which results in a call to
-<samp><A href="../../reference/api/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.html#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String)">resolveFilterString</A></samp>
-in the subsystem object. <BR>
-Furthermore, you will want to supply your own
-<B><A
- href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.html">new-filter</A></B> and
-<A href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.html"><B>change-filter</B></A> actions.
-If filters are not supported, then these remote resources are shown immediately when the subsystem itself is expanded, via a call to
-<samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html#getChildren()">getChildren</A></samp>.
-Either way the resulting resources are displayed to the user. To facilitate the displaying of these objects in the RSE views, the objects
-themselves must implement the Eclipse IAdaptable interface (to enable the property sheet viewer) and there must be a specific RSE
-<B><A
- href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html">view
-adapter</A></B>
-and an RSE <B><A
- href="../../reference/api/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.html">remote-information
-adapter</A></B>
-registered for the remote objects, which the RSE views consult to get the labels, images, actions,
-and property sheet values for the remote objects.
-Typically, you will supply actions by leveraging the <A
- href="../api/uiAPI.html">user interface elements</A> supplied by the RSE, such as base classes for <A
- href="../api/messages/uiMessageAPI.html">messages</A>, <A
- href="../api/actions/uiActionsAPI.html">actions</A>, <A
- href="../api/dialogs/uiDialogsAPI.html">dialogs</A>, <A
- href="../api/wizards/uiWizardsAPI.html">wizards</A>, <A
- href="../api/properties/uiPropertiesAPI.html">property pages</A> and <A
- href="../api/preferences/uiPreferencesAPI.html">preference page editors</A>. You will probably also supply a
- property page for your subsystem objects, via the Eclipse <samp>propertyPages</samp> extension point, and for your remote resource objects, via the RSE <A
- href="propertypage.html">propertyPages</A> extension point.</p>
-
-<h3>Base Classes</h3>
-<P>For many of the interfaces you must implement, there are base classes supplied that you can extend to make the development effort easier.</P>
-<p>The
-following summarizes the minimum set of classes you will be creating in order to realize your own subsystem support, including the RSE-supplied base classes to extend:</p>
-
-<TABLE border="1">
- <TBODY>
- <TR>
- <TH>Class(es)</TH>
- <TH>Base Class</TH>
- <TH>Description</TH>
- </TR>
- <TR>
- <TD>subsystem configuration</TD>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystemConfiguration.html">SubSystemConfiguration</A></samp></TD>
- <TD>The factory class responsible for creating instances of subsystem class</TD>
- </TR>
- <TR>
- <TD>subsystem</TD>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html">SubSystem</A></samp></TD>
- <TD>The subsystem class. There will be one instance created for each connection. In addition to storing
- your unique attributes, this must return the remote resource objects when a filter is expanded within the
- subsystem. How that communication with the remote system is done is left up to you.</TD>
- </TR>
- <TR>
- <TD>system</TD>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorService.html">AbstractConnectorService</A></samp></TD>
- <TD>Represents and manages a live connection to the remote system, doing the connecting and disconnecting.</TD>
- </TR>
- <TR>
- <TD>system manager</TD>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.html">AbstractConnectorServiceManager</A></samp></TD>
- <TD>Manages a single system instance that is shared among multiple subsystems in a single connection. Even if you only have a single subsystem configuration it is useful to use this in
- case you later add additional factories, and their subsystems share the same communication pipe. To enable this, all your subsystem classes need to implement a unique interface of your own creation.</TD>
- </TR>
- <TR>
- <TD>remote resource</TD>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractResource.html">AbstractResource</A></samp></TD>
- <TD>Can be used as a base class for the objects representing remote resources.</TD>
- </TR>
- <TR>
- <TD>new-filter wizard</TD>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.html">SystemNewFilterAction</A></samp> and
- <samp><A href="../../reference/api/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.html">SystemFilterStringEditPane</A></samp></TD>
- <TD>Displays a wizard prompting for a new filter. Filters contain filter strings, which are up to each subsystem to design and interpret. The New Filter wizard
- prompts for a single filter string (more can be added in change mode). Typically you subclass <samp>SystemFilterStringEditPane</samp> to create your own
- prompt for the filter string information, and then subclass <samp>SystemNewFilterAction</samp> so as to configure the default New Filter wizard to use
- your edit pane in the first page.</TD>
- </TR>
- <TR>
- <TD>change-filter dialog</TD>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.html">SystemChangeFilterAction</A></samp> and
- <samp><A href="../../reference/api/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.html">SystemFilterStringEditPane</A></samp></TD>
- <TD>Displays a dialog prompting to change an existing filter. The default dialog allows the user to create and edit filter strings. Typically, you
- override the <samp>SystemChangeFilterAction</samp> class, and configure the dialog to use the same edit pane used in the New Filter wizard.
- </TD>
- </TR>
- <TR>
- <TD>remote element adapter</TD>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html">AbstractSystemViewAdapter</A></samp> and
- <samp><A href="../../reference/api/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.html">ISystemRemoteElementAdapter</A></samp>
- </TD>
- <TD>The view adapter is an amalgamation of all the required information needed to populate the RSE views. You will define one class per unique remote object interface or class, and in it you will override methods to return the remote object's label, image, popup-menu actions, property sheet properties and children (if expandable). You can also decide whether to enable common RSE popup menu actions like rename, delete and refresh. <BR>Your view adapter will usually also implement the remote adapter interface, enabling the many common RSE capabilities to work, such as the copy, paste, drag and drop, and more. </TD>
- </TR>
- </TBODY>
-</TABLE>
-
-<h3><A name="steps"></A>Overview of Steps</h3>
-<p>Implementing a subsystem involves the following steps, in the following order:</p>
-<OL>
- <li>Creating an interface for your subsystem. It can, and often is, an empty interface.</li>
- <li>Creating a subclass of <A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorService.html">AbstractConnectorService</A>.
- The code here will interact as necessary with your subsystem to manage the connection lifecycle to the remote system.</li>
- <li>Creating a subclass of <A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.html">AbstractConnectorServiceManager</A>.
- The code here will re-use the same IConnectorService object from step 2 for all subsystems that implement the interface from step 1, within the same connection.</li>
- <li>Designing the classes to represent the remote resources (your <i>model</i>) that you will show from your subsystem.
- Each must implement the <samp>org.eclipse.core.runtime.IAdaptable</samp> interface from Eclipse.
- It is also very helpful if they also maintain a reference to the subsystem which created them. The base class
- <A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractResource.html">AbstractResource</A> is offered to help with this.</li>
- <li>Designing the syntax of the <i>filter string</i> that will be used as a pattern to tell your subsystem what resources to show. For example, for files this might be of the
- form "path/generic-name /options". It is the job of your subsystem to interpret these strings and return a list of remote resources matching the
- criteria capturing in the string. You will eventually design a user interface to prompt the user for one the
- contents of one of these filter strings. You might find it helps to create a class that holds one of these filter strings passed via a constructor, and
- can parse it into its constituent pieces via getter methods. It should also support a default constructor and setting of constituent pieces via setter methods,
- and the generation of the filter string via toString().
- </li>
- <li>Creating a subclass of <A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html">SubSystem</A>
- that implements the interface you designed in step 1. This will:
- <ul>
- <li>return a singleton instance of the system manager from step 3 in its <A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html#getSystemManager()">getSystemManager</A> method,
- <li>manage persistent properties via calls to the inherited <A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html#setVendorAttribute(java.lang.String, java.lang.String, java.lang.String)">setVendorAttribute</A>
- and <A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html#getVendorAttribute(java.lang.String, java.lang.String)">getVendorAttribute</A> methods,
- <li>use your communications layer to return instances of your model objects in its <A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String)">internalResolveFilterString</A> method.
- The input to this is one or more strings such as you designed in step 5. It will return all remote resources matching the criteria captured in the input filter string.
- You may also find the <A href="../../reference/api/org/eclipse/rse/services/clientserver/NamePatternMatcher.html">org.eclipse.rse.services.clientserver.NamePatternMatcher</a>
- class to be handy in comparing a generic pattern to a particular input. This class is in the <samp>runtime/clientserver.jar</samp> file,
- and has no eclipse-dependencies, so it can be used in your client subsystem code, or your server-side code.
- </ul>
- </li>
- <li>Creating a subclass of <A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystemConfiguration.html">DefaultSubSystemFactoryImpl.</A></li>
- <li>Defining your <A href="../../reference/extension-points/org_eclipse_rse_ui_subsystemConfigurations.html">subsystemConfigurations extension</a> in your <samp>plugin.xml</samp> file.</li>
- <li>For each remote resource class you created in step 4, you need to create an adapter class, which extends
- <A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html">AbstractSystemViewAdapter</A> and which
- implements <A href="../../reference/api/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.html">ISystemRemoteElementAdapter</A>.
- </li>
- <li>Register your adapters with the platform. First you create an
- adapter class that extends <samp><a href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.html">AbstractSystemRemoteAdapterFactory</a></samp>
- and implements interface <samp><b>org.eclipse.core.runtime.IAdapterFactory</b></samp>. Next,
- in the <samp>startup()</samp> method of your plugin class, add code to instantiate the class and register the object with
- the platform adapter manager, once for each class in your resource model. For example:
- <br><samp>
- &nbsp;&nbsp;MyAdapterFactory factory = new MyAdapterFactory(); // extends AbstractSystemRemoteAdapterFactory<br>
- &nbsp;&nbsp;IAdapterManager manager = Platform.getAdapterManager();<br>
- &nbsp;&nbsp;manager.registerAdapters(factory, MyModelObject1.class);<br>
- &nbsp;&nbsp;manager.registerAdapters(factory, MyModelObject2.class);<br>
- </samp>
- </li>
- <li>If your filter string from step 5 is complicated enough, you will probably find the
- RSE-supplied <a href="NewFilterWizard_Default.gif">filter wizard</a> and
- <a href="ChangeFilterDialog_Default.gif">change-dialog</a> insufficient. The idea with these is that the
- New Filter wizard prompts in its first page for a single filter string. The change dialog
- allows the user to change that single filter string, or add additional filter strings. To
- change these for your subsystem, you need to:
- <ol>
- <li type="i">Create your own
- <a href="../../reference/api/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.html">filter string edit pane</a>
- subclass that contains your own GUI prompts as desired.
- <li type="i">Create your own
- <a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.html">new-filter wizard action</a>
- subclass, and configure it to use your own edit pane subclass by overriding
- <samp><a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.html#configureNewFilterWizard(org.eclipse.rse.ui.filters.dialogs.SystemNewFilterWizard)">configureNewFilterWizard</a></samp>
- and in it calling <samp><a href="../../reference/api/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.html#setFilterStringEditPane(org.eclipse.rse.ui.filters.SystemFilterStringEditPane)">setFilterStringEditPane</a></samp>
- on the given wizard.
- <li type="i">Create your own
- <a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.html">change-filter action</a>
- subclass, and configure it to use your own edit pane subclass by overriding
- <samp><a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.html#configureFilterDialog(org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog)">configureFilterDialog</a></samp>
- and in it calling <samp><a href="../../reference/api/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.html#setFilterStringEditPane(org.eclipse.rse.ui.filters.SystemFilterStringEditPane)">setFilterStringEditPane</a></samp>
- on the given dialog.
- <li type="i">Override the <samp><a href="../../reference/api/org/eclipse/rse/core/subsystems/util/ISubsystemConfigurationAdapter.html#getNewFilterPoolFilterAction(org.eclipse.rse.core.filters.ISystemFilterPool, org.eclipse.swt.widgets.Shell)">getNewFilterPoolFilterAction(SystemFilterPool, Shell)</a></samp>
- method in your subsystem factory, to return an instance of your new-filter action.
- You can actually avoid creating an action subclass if you choose, by calling the configuration methods
- in the RSE-supplied <a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.html">new-filter action class</a>.
- <li type="i">Override the <samp><a href="../../reference/api/org/eclipse/rse/core/subsystems/util/ISubsystemConfigurationAdapter.html#getChangeFilterAction(org.eclipse.rse.core.filters.ISystemFilter, org.eclipse.swt.widgets.Shell)">getChangeFilterAction(SystemFilter, Shell)</a></samp>
- method in your subsystem factory, to return an instance of your change-filter action.
- You can actually avoid creating an action subclass if you choose, by calling the configuration methods
- in the RSE-supplied <a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.html">change-filter action class</a>.
- </ol>
- </li>
-</OL>
-
-<br><hr>
-<p>See the <a href="../tutorial/subsystem.html">subsystem tutorial</a> for a step-by-step example.</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/systemtype.html b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/systemtype.html
deleted file mode 100755
index a19febddc..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/systemtype.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Plugging In System Types</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Plugging In System Types</h1>
-<p>The <samp><A href="../../reference/extension-points/org_eclipse_rse_core_systemTypes.html">org.eclipse.rse.core.systemTypes</a></samp> extension point is defined in the
-plugin <samp>org.eclipse.rse.core</samp>. It enables new system types to be
-defined in the Remote System Explorer's <A href="NewConnection.gif">New
-Connection wizard</A>, such that users can define connections to systems of that type. For example,
-you might define a new system type of "Solaris" or "RedHat" or some other specific type
-of operating system. The reason to define a system type is to enable tools to be created,
-via the <A href="subsystem.html">subsystem extension point</A>, that are scoped so as to
-only appear for connections to systems of that type.
-</p>
-<p>
-Defining a new system type is easy. You merely need to supply the name of the system
-type, and two icons - one icon for connections to that systems of that type, and another
-adorned icon that is used when there is a live connection to that particular system.
-</p>
-<p>
-When you create a new connection, the Remote System Explorer framework will consult
-each registered <A href="subsystem.html">subsystem extension point</A> to see if it supports
-that connection's system type, and if so the extension point's subsystem factory class
-will be used to create a new subsystem within the new connection. Thus, when the user
-expands a connection in the Remote Systems view, only subsystems supported for that
-connection's system type are available.
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Cmds.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Cmds.gif
deleted file mode 100755
index 377862151..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Cmds.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_RS.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_RS.gif
deleted file mode 100755
index 8ee06ea76..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_RS.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Table.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Table.gif
deleted file mode 100755
index 0cb086739..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Table.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Team.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Team.gif
deleted file mode 100755
index 80bd2c7c7..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/view_Team.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/preference_activeProfiles.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/preference_activeProfiles.gif
deleted file mode 100755
index b241fe998..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/preference_activeProfiles.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/preferences.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/preferences.gif
deleted file mode 100755
index e31a1104b..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/preferences.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/rse.gif
deleted file mode 100755
index cfdc37dc1..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int.html
deleted file mode 100755
index fcc4eaadc..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE Programmer's Guide</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-
-<body>
-<h1>RSE Programmer's Guide</h1>
-<div class="p">
-This book explains how to use the Remote System Explorer APIs and Extension Points.
-It provides an
-<ul>
- <li><a href="rse_int_architecture.html">Architectural Overview</a>,</li>
- <li><a href="usingAPIs.html">API Description</a> as well as some extensive</li>
- <li><a href="tutorials.html">Tutorials</a></li>.
-</div>
-
-<h2>Provisional API</h2>
-<table>
-<!--
-<table bgcolor="yellow" border="1">
-<tr><th><b>API Status</b></th></tr>
--->
-<tr><td>
-<p>Although RSE API has been reviewed and proven useful in earlier proprietary
-versions, we want to give the Open Source Communitiy a chance to provide public
-feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of RSE 1.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after RSE 1.0
-in a not backward compatible way. All such API changes will be voted on
-by committers on the <a href="http://dev.eclipse.org/mailman/listinfo/dsdp-tm-dev">
-dsdp-tm-dev</a> developer mailing list, and documented in a migration guide
-for future releases. We expect that with Community Feedback, we'll reach a
-stable, hardened API for RSE 2.0. Please give your feedback on
-<a href="https://bugs.eclipse.org/bugs/">Eclipse Bugzilla</a>under
-category DSDP, Product Target Management.</p>
-</td></tr></table>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_architecture.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_architecture.html
deleted file mode 100755
index 0bb2eeb94..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_architecture.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE Architecture</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-<body>
-<h1>RSE Architecture</h1>
-
-
-<p> The Remote System Explorer is structured into three major layors:</p>
-<ul>
- <li><A href="#Services">Service Layer</A></li>
- <li><A href="#Subsystems">Subsystem Layer</A></li>
- <li><A href="#UIs">UI Layer</A></li>
-</ul>
-
-
-<h2><A name="Services">RSE Service Layer</A></h2>
-<p>
-This is the headless, barebones API layer that is used to interact with different protocols to
-provide remote services that can be integrated into RSE. By default, RSE defines the following
-types of services:
-
- <ul>
- <li>File Service - for listing, modifying, copying, and transfering remote file and folders</li>
- <li>Shell Service - for launching remote shells and interacting with the associated IO</li>
- <li>Process Services - for listing remote processes</li>
-</ul>
- <p>
-New service types can be added as needed, either in core RSE, or extensions to the base. The service
-interfaces are defined loosely so that different implementations of the same service can be made using
-different protocols. For example, the IFileService could be implemented locally with java.io, FTP, DataStore or some
-other protocol. Similarly, the IShellService could be implemented locally via DataStore, telnet, SSH or something
-else.
-</p>
- <h2><A name="SubSystems">RSE Subsystem Layer</A></h2>
-<p>
-RSE subsystems integrate the services of the service layer with connection information, model artifacts and persistence.
-Each subsystem is associated with a single service type. For example, the file service subsystem is associated with the
-file service. Each <a href="rse_int_subsystems.html">subsystem</a> is associated with one or more services from the service layer,
-a <a href="rse_int_connectorservices.html">connector service</a> and, in some cases, a model adapter, which is used to
-convert artifacts from the service layer into a form that is suitable for the subsystem layer.
-</p>
-<p>
-Subsystems are contributed via the subsystem configuration extension point. A subsystem configuration is registered with
-one or more system type (i.e. Local, Linux, Windows, etc.). When there is an RSE <a href="rse_int_hosts.html">host</a>
-of a particular system type, the subsystem configurations that are registered with that system type are used to instantiate
-and configure the subsystems for that host. Each subsystem configuration determines the subsystem to instantiate, the service
-implementation, the connector service and anything else that requires customization for it's service.
-</p>
-<p>
-Multiple subsystem configurations can exist for the same type of subsystem. This will be the case when there are more than
-one protocols that can be used to implement the same service. For example, there are both FTP and DataStore implementations of
-the IFileService. Subsystem configurations are contributed for both the FTP implementation and the DataStore one. In
-such cases, only one subsystem is instantiated for each host, however that subsystem can have its configuration changed from FTP
-to DataStore and vice versa.
-</p>
-<p>
-Subsystems are RSE objects that are persistable and maintain higher level functionality from the service layer. Subsystems that
-are used to query information on a host often have <a href="rse_int_filters.html">filters</a>. Filters provide the user the means to
-specify a criteria for which to query a set of data. In addition to filters, there are more arbitrary properties that can be
-associated with a subsystem, each of which can be saved and restored across sessions.
-</p>
-
-<h2><A name="UI">RSE UI Layer</A></h2>
-<p>
-The Remote System Explorer perspective provides views that render the subsystems and associated artifacts. Users can create
-new connections, which can be expanded to reveal subsystems and the information the subsystems reveal about a system.
-</p>
-
-</body>
-</html>
-
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_connectorservices.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_connectorservices.html
deleted file mode 100755
index 0e908d1f8..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_connectorservices.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE Connector Services</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-<body>
-<h1>RSE Connector Services</h1>
-</body>
-</html>
-
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_files.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_files.html
deleted file mode 100755
index d9e165406..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_files.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE UI</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-
-<body>
-<h1>RSE Files</h1>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_filters.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_filters.html
deleted file mode 100755
index 8040c8990..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_filters.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE Hosts</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-<body>
-<h1>RSE Filters</h1>
-</body>
-</html>
-
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_hosts.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_hosts.html
deleted file mode 100755
index 309efcbe5..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_hosts.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE Hosts</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-<body>
-<h1>RSE Hosts</h1>
-</body>
-</html>
-
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_overview.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_overview.html
deleted file mode 100755
index 66d81b30e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_overview.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE Overview</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-<body>
-<h1>RSE Overview</h1>
-<p>
-The perspective for managing connections is the <A href="rse.gif"><B>Remote
-System Explorer</B></A> (<b>RSE</b>), and the primary tree-view within it is the
-<A href="view_RS.gif"><B>Remote Systems</B></A> view. We assume you are already familiar with the RSE perspective,
-or will familiarize yourself with it, and you are now interested in learning how to extend it. We also assume that you
-already understand the concepts of plug-ins, extension points, and the workbench UI. You do not need
-to be familiar with workspace resources, as the RSE does not use these to realize the artifacts it
-shows to the user.
-</p>
-<p>A user can extend the Remote System Explorer by adding their own
-<A href="Artifacts.html#filters">filters</A>,
-<A href="Artifacts.html#useractions">user actions</A>, and
-<A href="Artifacts.html#compilecmds">compile commands</A>.
-They may also customize the RSE by setting
-<A href="Artifacts.html#preferences">preferences</A>.</p>
-<p>
-As a programmer, you can extend the Remote System Explorer by using
-<A href="../reference/extension-points/index.html">RSE-unique extension points</A> to
-add property pages to remote objects, add actions to the pop-up menus for remote objects, and
-even create your own subsystems that appear when a connection is expanded. The full Eclipse application
-programming interface (API) set is
-at your disposal for these, as well as the API set supplied by the Remote System Explorer. Furthermore,
-you can use existing Eclipse extension points to author menu items, tool bar actions, pop-up menu actions,
-and more for non-remote objects in the Remote System Explorer.
-</p>
-<p>
-This guide explains all underlying
-artifacts and model of the Remote System Explorer, the RSE extension points, and highlights the
-important APIs available for your use.
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_processes.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_processes.html
deleted file mode 100755
index d73ae1dbc..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_processes.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE UI</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-
-<body>
-<h1>RSE Processes</h1>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_services.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_services.html
deleted file mode 100755
index 451a1056d..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_services.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE Services</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-<body>
-<h1>RSE Services</h1>
-</body>
-</html>
-
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_shells.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_shells.html
deleted file mode 100755
index 774da36b1..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_shells.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE UI</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-
-<body>
-<h1>RSE Shells</h1>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_subsystems.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_subsystems.html
deleted file mode 100755
index f4799a539..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_subsystems.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE Subsystems</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-<body>
-<h1>RSE Subsystems</h1>
-</body>
-</html>
-
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_ui.html b/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_ui.html
deleted file mode 100755
index 33bba22aa..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_ui.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE UI</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
-</head>
-
-<body>
-<h1>RSE UI</h1>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperAdapterFactory.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperAdapterFactory.html
deleted file mode 100755
index ea0623e4c..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperAdapterFactory.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperAdapterFactory Class After Editing</title>
-</head>
-
-<body>
-<h1>DeveloperAdapterFactory Class After Editing</h1>
-<pre><samp>
-package samples.model;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * This factory maps requests for an adapter object from a given remote object.
- */
-public class DeveloperAdapterFactory
- extends AbstractSystemRemoteAdapterFactory
- implements IAdapterFactory
-{
- <b>private TeamResourceAdapter teamAdapter = new TeamResourceAdapter();
- private DeveloperResourceAdapter developerAdapter = new DeveloperResourceAdapter();</b>
-
- /**
- * Constructor for DeveloperAdapterFactory.
- */
- public DeveloperAdapterFactory()
- {
- super();
- }
-
- /**
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(Object, Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- <b>ISystemViewElementAdapter adapter = null;
- if (adaptableObject instanceof TeamResource)
- adapter = teamAdapter;
- else if (adaptableObject instanceof DeveloperResource)
- adapter = developerAdapter;
- // <i>these lines are very important! </i>
- if ((adapter != null) &amp;&amp; (adapterType == IPropertySource.class))
- adapter.setPropertySourceInput(adaptableObject);
- return adapter;</b>
- }
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorService.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorService.html
deleted file mode 100755
index 5a2d8c891..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorService.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperConnectorService Class After Editing</title>
-</head>
-
-<body>
-<h1>DeveloperConnectorService Class After Editing</h1>
-<pre><samp>
-package samples.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.subsystems.AbstractConnectorService;
-import org.eclipse.rse.core.model.IHost;
-
-import samples.RSESamplesPlugin;
-
-/**
- * Our system class that manages connecting to, and disconnecting from,
- * our remote server-side code.
- */
-public class DeveloperConnectorService extends AbstractConnectorService {
-
- <strong>private boolean connected = false;</strong>
-
- /**
- * Constructor for DeveloperConnectorService.
- * @param host
- */
- public DeveloperConnectorService(IHost host)
- {
- super(
- RSESamplesPlugin.getResourceString("connectorservice.devr.name"),
- RSESamplesPlugin.getResourceString("connectorservice.devr.desc"),
- host,
- 0
- );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected()
- */
- public boolean isConnected()
- {
- return connected;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalConnect(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void internalConnect(IProgressMonitor monitor) throws Exception
- {
- super.internalConnect(monitor);
- // pretend. Normally, we'd connect to our remote server-side code here
- connected=true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalDisconnect(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void internalDisconnect(IProgressMonitor monitor) throws Exception
- {
- super.internalDisconnect(monitor);
- // pretend. Normally, we'd disconnect from our remote server-side code here
- connected=false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsRemoteServerLaunching()
- */
- public boolean supportsRemoteServerLaunching()
- {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#hasRemoteServerLauncherProperties()
- */
- public boolean hasRemoteServerLauncherProperties()
- {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsServerLaunchProperties()
- */
- public boolean supportsServerLaunchProperties()
- {
- return false;
- }
-
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorServiceManager.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorServiceManager.html
deleted file mode 100755
index 69fe7749e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorServiceManager.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperConnectorServiceManager Class After Editing</title>
-</head>
-
-<body>
-<h1>DeveloperConnectorServiceManager Class After Editing</h1>
-<pre><samp>
-/********************************************************************************
- * 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:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.subsystems;
-
-import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.model.IHost;
-
-/**
- * This class manages our DeveloperConnectorService objects, so that if we
- * ever have multiple subsystem configurations, different subsystems can share
- * the same IConnectorService object if they share the communication layer.
- */
-public class DeveloperConnectorServiceManager extends
- AbstractConnectorServiceManager {
-
- <strong>private static DeveloperConnectorServiceManager inst;</strong>
-
- /**
- * Constructor for DeveloperConnectorServiceManager.
- */
- public DeveloperConnectorServiceManager()
- {
- super();
- }
-
- <strong>/**
- * Return singleton instance
- */
- public static DeveloperConnectorServiceManager getTheDeveloperConnectorServiceManager()
- {
- if (inst == null)
- inst = new DeveloperConnectorServiceManager();
- return inst;
- }</strong>
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.core.model.IHost)
- */
- public IConnectorService createConnectorService(IHost host)
- {
- <strong>return new DeveloperConnectorService(host);</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#sharesSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public boolean sharesSystem(ISubSystem otherSubSystem)
- {
- <strong>return (otherSubSystem instanceof IDeveloperSubSystem);</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#getSubSystemCommonInterface(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public Class getSubSystemCommonInterface(ISubSystem subsystem)
- {
- <strong>return IDeveloperSubSystem.class;</strong>
- }
-
-}
-</samp></pre>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterDialog.gif
deleted file mode 100755
index a281793fd..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterStringEditPane.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterStringEditPane.html
deleted file mode 100755
index 38095d16a..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterStringEditPane.html
+++ /dev/null
@@ -1,210 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperFilterStringEditPane Class After Editing</title>
-</head>
-
-<body>
-<h1>DeveloperFilterStringEditPane Class After Editing</h1>
-<pre><samp>
-package samples.subsystems;
-
-<strong>import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemWidgetHelpers;</strong>
-import org.eclipse.rse.ui.filters.SystemFilterStringEditPane;
-<strong>import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;</strong>
-
-<strong>import samples.RSESamplesPlugin;</strong>
-
-/**
- * Our specialized filter string edit pane for developer filters.
- */
-public class DeveloperFilterStringEditPane extends SystemFilterStringEditPane {
-
- // gui widgets
- <strong>private Text textTeam, textDevr;</strong>
-
- /**
- * Constructor for DeveloperFilterStringEditPane.
- * @param shell - parent window
- */
- public DeveloperFilterStringEditPane(Shell shell)
- {
- super(shell);
- }
-
- /**
- * Override of parent method.
- * This is where we populate the client area.
- * @param parent - the composite that will be the parent of the returned client area composite
- * @return Control - a client-area composite populated with widgets.
- *
- * @see org.eclipse.rse.ui.SystemWidgetHelpers
- */
- <strong>public Control createContents(Composite parent)
- {
- // Inner composite
- int nbrColumns = 1;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- ((GridLayout)composite_prompts.getLayout()).marginWidth = 0;
-
- // CREATE TEAM-PARENT PROMPT
- textTeam = SystemWidgetHelpers.createLabeledTextField(
- composite_prompts,
- null,
- RSESamplesPlugin.getResourceString("filter.devr.teamprompt.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("filter.devr.teamprompt.tooltip") //$NON-NLS-1$
- );
-
- // CREATE DEVELOPER PROMPT
- textDevr = SystemWidgetHelpers.createLabeledTextField(
- composite_prompts,
- null,
- RSESamplesPlugin.getResourceString("filter.devr.devrprompt.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("filter.devr.devrprompt.tooltip") //$NON-NLS-1$
- );
-
- resetFields();
- doInitializeFields();
-
- // add keystroke listeners...
- textTeam.addModifyListener(
- new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateStringInput();
- }
- }
- );
- textDevr.addModifyListener(
- new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateStringInput();
- }
- }
- );
- return composite_prompts;
- }</strong>
-
- /**
- * Override of parent method.
- * Return the control to recieve initial focus.
- */
- <strong>public Control getInitialFocusControl()
- {
- return textTeam;
- }</strong>
-
- /**
- * Override of parent method.
- * Initialize the input fields based on the inputFilterString, and perhaps refProvider.
- * This can be called before createContents, so test for null widgets first!
- * Prior to this being called, resetFields is called to set the initial default state prior to input
- */
- <strong>protected void doInitializeFields()
- {
- if (textTeam == null)
- return; // do nothing
- if (inputFilterString != null)
- {
- int idx = inputFilterString.indexOf('/');
- if (idx &lt; 0)
- textTeam.setText(inputFilterString);
- else
- {
- textTeam.setText(inputFilterString.substring(0,idx));
- textDevr.setText(inputFilterString.substring(idx+1));
- }
- }
- }</strong>
-
- /**
- * Override of parent method.
- * This is called in the change filter dialog when the user selects "new", or selects another string.
- */
- <strong>protected void resetFields()
- {
- textTeam.setText(""); //$NON-NLS-1$
- textDevr.setText("*"); //$NON-NLS-1$
- }</strong>
-
- /**
- * Override of parent method.
- * Called by parent to decide if information is complete enough to enable finish.
- */
- <strong>protected boolean areFieldsComplete()
- {
- if ((textTeam == null) || (textDevr == null))
- return false;
- else
- return (textTeam.getText().trim().length()>0) && (textDevr.getText().trim().length()>0);
- }</strong>
-
- /**
- * Override of parent method.
- * Get the filter string in its current form.
- * Functional opposite of doInitializeFields, which tears apart the input string in update mode,
- * to populate the GUIs. This method creates the filter string from the information in the GUI.
- */
- <strong>public String getFilterString()
- {
- if ((textTeam == null) || (textDevr == null))
- return inputFilterString; // return what we were given.
- else
- {
- String teamName = textTeam.getText().trim();
- String devrName = textDevr.getText().trim();
- return teamName + "/" + devrName; //$NON-NLS-1$
- }
- }</strong>
-
- /**
- * Override of parent method.
- * Does complete verification of input fields. If this
- * method returns null, there are no errors and the dialog or wizard can close.
- *
- * @return error message if there is one, else null if ok
- */
- <strong>public SystemMessage verify()
- {
- errorMessage = null;
- Control controlInError = null;
-
- /*
- errorMessage = validateTeamInput(); // todo: implement if we want to syntax check input
- if (errorMessage != null)
- controlInError = textTeam;
- else
- {
- errorMessage = validateDevrInput(); // todo: implement to syntax check input
- if (errorMessage != null)
- controlInError = textDevr;
- }
- */
-
- if (errorMessage != null)
- {
- if (controlInError != null)
- controlInError.setFocus();
- }
- return errorMessage;
- }</strong>
-
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterWizard.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterWizard.gif
deleted file mode 100755
index 9a0b9aed9..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperFilterWizard.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperResource.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperResource.html
deleted file mode 100755
index 4da58a080..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperResource.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperResource Class After Editing</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>DeveloperResource Class After Editing</h1>
-<p>
-<pre><samp>
-package samples.model;
-
-import org.eclipse.rse.core.subsystems.AbstractResource;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This models a remote resource representing a developer defined on a particular system.
- */
-public class DeveloperResource extends AbstractResource {
-
- <strong>private String name;</strong>
- <strong>private String id;</strong>
- <strong>private String deptNbr;</strong>
-
- /**
- * Default constructor for DeveloperResource.
- */
- public DeveloperResource()
- {
- super();
- }
-
- /**
- * Constructor for DeveloperResource when given parent subsystem.
- */
- public DeveloperResource(ISubSystem parentSubSystem)
- {
- super(parentSubSystem);
- }
-
- /**
- * Returns the name.
- * @return String
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the name.
- * @param name The name to set
- */
- public void setName(String name)
- {
- this.name = name;
- }
-
- /**
- * Returns the id.
- * @return String
- */
- public String getId()
- {
- return id;
- }
-
- /**
- * Sets the id.
- * @param id The id to set
- */
- public void setId(String id)
- {
- this.id = id;
- }
-
- /**
- * Returns the deptNbr.
- * @return String
- */
- public String getDeptNbr()
- {
- return deptNbr;
- }
-
- /**
- * Sets the deptNbr.
- * @param deptNbr The deptNbr to set
- */
- public void setDeptNbr(String deptNbr)
- {
- this.deptNbr = deptNbr;
- }
-
-}
-</samp></pre>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperResourceAdapter.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperResourceAdapter.html
deleted file mode 100755
index f7cdae861..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperResourceAdapter.html
+++ /dev/null
@@ -1,219 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperResourceAdapter Class After Editing</title>
-</head>
-
-<body>
-<h1>DeveloperResourceAdapter Class After Editing</h1>
-<pre><samp>
-package samples.model;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-<strong>import org.eclipse.ui.views.properties.IPropertyDescriptor;</strong>
-<strong>import org.eclipse.ui.views.properties.PropertyDescriptor;</strong>
-
-<strong>import samples.RSESamplesPlugin;</strong>
-
-/**
- * This is the adapter which enables us to work with our remote developer resources.
- */
-public class DeveloperResourceAdapter extends AbstractSystemViewAdapter
- implements ISystemRemoteElementAdapter
-{
-
- /**
- * Constructor
- */
- public DeveloperResourceAdapter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager,
- * org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
- */
- public void addActions(SystemMenuManager menu,
- IStructuredSelection selection, Shell parent, String menuGroup)
- {
- }
-
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object object)
- {
- <strong>return RSESamplesPlugin.getDefault().getImageDescriptor("ICON_ID_DEVELOPER");</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getText(java.lang.Object)
- */
- public String getText(Object element)
- {
- <strong>return ((DeveloperResource)element).getName();</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object object)
- {
- <strong>DeveloperResource devr = (DeveloperResource)object;</strong>
- r<strong>eturn "Devr_" + devr.getId();</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getType(java.lang.Object)
- */
- public String getType(Object element)
- {
- <strong>return RSESamplesPlugin.getResourceString("property.devr_resource.type");</strong>
- }
-
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object o)
- {
- return null; // not really used, which is good because it is ambiguous
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element)
- {
- return false;
- }
-
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object o)
- {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyDescriptors()
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- // the following array should be made static to it isn't created every time
- <strong>PropertyDescriptor[] ourPDs = new PropertyDescriptor[2];</strong>
- <strong>ourPDs[0] = new PropertyDescriptor("devr_id", RSESamplesPlugin.getResourceString("property.devr_id.name"));</strong>
- <strong>ourPDs[0].setDescription(RSESamplesPlugin.getResourceString("property.devr_id.desc"));</strong>
- <strong>ourPDs[1] = new PropertyDescriptor("devr_dept", RSESamplesPlugin.getResourceString("property.devr_dept.name"));</strong>
- <strong>ourPDs[1].setDescription(RSESamplesPlugin.getResourceString("property.devr_dept.desc"));</strong>
- <strong>return ourPDs;</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyValue(java.lang.Object)
- */
- protected Object internalGetPropertyValue(Object key)
- {
- // propertySourceInput holds the currently selected object
- <strong>DeveloperResource devr = (DeveloperResource)propertySourceInput;
- if (key.equals("devr_id"))
- return devr.getId();
- else if (key.equals("devr_dept"))
- return devr.getDeptNbr();
- return null;</strong>
- }
- // --------------------------------------
- // ISystemRemoteElementAdapter methods...
- // --------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object)
- */
- public String getAbsoluteParentName(Object element)
- {
- <strong>return "root";</strong> // not really applicable as we have no unique hierarchy
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getSubSystemConfigurationId(java.lang.Object)
- */
- public String getSubSystemConfigurationId(Object element)
- {
- <strong>return "samples.subsystems.factory";</strong> // as declared in extension in plugin.xml
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteTypeCategory(java.lang.Object)
- */
- public String getRemoteTypeCategory(Object element)
- {
- <strong>return "developers";</strong> // Course grained. Same for all our remote resources.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteType(java.lang.Object)
- */
- public String getRemoteType(Object element)
- {
- <strong>return "developer";</strong> // Fine grained. Unique to this resource type.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubType(java.lang.Object)
- */
- public String getRemoteSubType(Object element)
- {
- return null; // Very fine grained. We don't use it.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#refreshRemoteObject(java.lang.Object, java.lang.Object)
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- <strong>DeveloperResource oldDevr= (DeveloperResource)oldElement;
- DeveloperResource newDevr = (DeveloperResource)newElement;
- newDevr.setName(oldDevr.getName());
- return false;</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParent(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- return null; // maybe this would be a Department obj, if we fully fleshed out our model
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParentNamesInUse(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element)
- throws Exception
- {
- // developers names do not have to be unique! So we don't need to implement this!
- return null;
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- <strong>return false;</strong>
- }
-
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem.html
deleted file mode 100755
index cd27ebf58..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem.html
+++ /dev/null
@@ -1,202 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperSubSystem Class After Editing</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>DeveloperSubSystem Class After Editing</h1>
-<pre><samp>
-package samples.subsystems;
-
-<strong>import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.subsystems.IConnectorService;</strong>
-import org.eclipse.rse.core.subsystems.SubSystem;
-<strong>import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-
-import samples.model.DeveloperResource;
-import samples.model.TeamResource;</strong>
-
-<strong>/**
- * This is our subsystem, which manages the remote connection and resources for
- * a particular system connection object.
- */</strong>
-public class DeveloperSubSystem extends SubSystem
-{
- <strong>private TeamResource[] teams; // faked-out master list of teams</strong>
- <strong>private Vector devVector = new Vector(); // faked-out master list of developers</strong>
- <strong>private static int employeeId = 123456; // employee Id factory</strong>
-
- /**
- * @param host
- * @param connectorService
- */
- public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
- super(host, connectorService);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeSubSystem(IProgressMonitor monitor) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- }
-
- <strong>/**
- * For drag and drop, and clipboard support of remote objects.
- *
- * Return the remote object within the subsystem that corresponds to
- * the specified unique ID. Because each subsystem maintains it's own
- * objects, it's the responsability of the subsystem to determine
- * how an ID (or key) for a given object maps to the real object.
- * By default this returns null.
- */
- public Object getObjectWithAbsoluteName(String key)
- {
- // Functional opposite of getAbsoluteName(Object) in our resource adapters
- if (key.startsWith("Team_")) //$NON-NLS-1$
- {
- String teamName = key.substring(5);
- TeamResource[] allTeams = getAllTeams();
- for (int idx=0; idx &lt; allTeams.length; idx++)
- if (allTeams[idx].getName().equals(teamName))
- return allTeams[idx];
- }
- else if (key.startsWith("Devr_")) //$NON-NLS-1$
- {
- String devrId = key.substring(5);
- DeveloperResource[] devrs = getAllDevelopers();
- for (int idx=0; idx &lt; devrs.length; idx++)
- if (devrs[idx].getId().equals(devrId))
- return devrs[idx];
- }
- return null;
- }</strong>
-
- <strong>/**
- * When a filter is expanded, this is called for each filter string in the filter.
- * Using the criteria of the filter string, it must return objects representing remote resources.
- * For us, this will be an array of TeamResource objects.
- *
- * @param monitor - the progress monitor in effect while this operation performs
- * @param filterString - one of the filter strings from the expanded filter.
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- // Fake it out for now and return dummy list.
- // In reality, this would communicate with remote server-side code/data.
- TeamResource[] allTeams = getAllTeams();
-
- // Now, subset master list, based on filter string...
- NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
- Vector v = new Vector();
- for (int idx = 0; idx &lt; allTeams.length; idx++)
- {
- if (subsetter.matches(allTeams[idx].getName()))
- v.addElement(allTeams[idx]);
- }
- TeamResource[] teams = new TeamResource[v.size()];
- for (int idx=0; idx &lt; v.size(); idx++)
- teams[idx] = (TeamResource)v.elementAt(idx);
- return teams;
- }</strong>
-
- <strong>/**
- * When a remote resource is expanded, this is called to return the children of the resource, if
- * the resource's adapter states the resource object is expandable.
- * For us, it is a Team resource that was expanded, and an array of Developer resources will be returned.
- *
- * @param monitor - the progress monitor in effect while this operation performs
- * @param parent - the parent resource object being expanded
- * @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
- */
- <a id="resolveFilterString"/>protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- // typically we ignore the filter string as it is always "*"
- // until support is added for "quick filters" the user can specify/select
- // at the time they expand a remote resource.
-
- TeamResource team = (TeamResource)parent;
- return team.getDevelopers();
- }</strong>
-
- <strong>// ------------------
- // Our own methods...
- // ------------------</strong>
-
- <strong>/**
- * Get the list of all teams. Normally this would involve a trip the server, but we
- * fake it out and return a hard-coded local list.
- */
- public TeamResource[] getAllTeams()
- {
- if (teams == null)
- teams = createTeams("Team ", 4);
- return teams;
- }</strong>
-
- <strong>/**
- * Get the list of all developers. Normally this would involve a trip the server, but we
- * fake it out and return a hard-coded local list.
- */
- public DeveloperResource[] getAllDevelopers()
- {
- DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
- for (int idx = 0; idx &lt; allDevrs.length; idx++)
- allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
- return allDevrs;
- }</strong>
-
- <strong>/*
- * Create and return a dummy set of teams
- */
- private TeamResource[] createTeams(String prefix, int howMany)
- {
- TeamResource[] teams = new TeamResource[howMany];
- for (int idx = 0; idx &lt; teams.length; idx++)
- {
- teams[idx] = new TeamResource(this);
- teams[idx].setName(prefix + (idx+1));
- teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
- }
- return teams;
- }</strong>
-
- <strong>/*
- * Create and return a dummy set of developers
- */
- private DeveloperResource[] createDevelopers(String prefix, int nbr)
- {
- DeveloperResource[] devrs = new DeveloperResource[nbr];
- for (int idx=0; idx &lt; devrs.length; idx++)
- {
- devrs[idx] = new DeveloperResource(this);
- devrs[idx].setName(prefix + (idx+1));
- devrs[idx].setId(Integer.toString(employeeId++));
- devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
- devVector.add(devrs[idx]); // update master list
- }
- return devrs;
- }</strong>
-
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem2.html
deleted file mode 100755
index 060d235f5..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystem2.html
+++ /dev/null
@@ -1,233 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</title>
-</head>
-
-<body>
-<h1>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</h1>
-<pre><samp>
-package samples.subsystems;
-
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-
-import samples.model.DeveloperResource;
-import samples.model.TeamResource;
-
-/**
- * This is our subsystem, which manages the remote connection and resources for
- * a particular system connection object.
- */
-public class DeveloperSubSystem extends SubSystem
-{
- private TeamResource[] teams; // faked-out master list of teams
- private Vector devVector = new Vector(); // faked-out master list of developers
- private static int employeeId = 123456; // employee Id factory
-
- /**
- * @param host
- * @param connectorService
- */
- public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
- super(host, connectorService);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeSubSystem(IProgressMonitor monitor) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- }
-
- /**
- * For drag and drop, and clipboard support of remote objects.
- *
- * Return the remote object within the subsystem that corresponds to
- * the specified unique ID. Because each subsystem maintains it's own
- * objects, it's the responsability of the subsystem to determine
- * how an ID (or key) for a given object maps to the real object.
- * By default this returns null.
- */
- public Object getObjectWithAbsoluteName(String key)
- {
- // Functional opposite of getAbsoluteName(Object) in our resource adapters
- if (key.startsWith("Team_"))
- {
- String teamName = key.substring(5);
- TeamResource[] allTeams = getAllTeams();
- for (int idx = 0; idx &lt; allTeams.length; idx++)
- if (allTeams[idx].getName().equals(teamName))
- return allTeams[idx];
- }
- else if (key.startsWith("Devr_"))
- {
- String devrId = key.substring(5);
- DeveloperResource[] devrs = getAllDevelopers();
- for (int idx=0; idx &lt; devrs.length; idx++)
- if (devrs[idx].getId().equals(devrId))
- return devrs[idx];
- }
- return null;
- }
-
- /**
- * When a filter is expanded, this is called for each filter string in the filter.
- * Using the criteria of the filter string, it must return objects representing remote resources.
- * For us, this will be an array of TeamResource objects.
- *
- * @param monitor - the progress monitor in effect while this operation performs
- * @param filterString - one of the filter strings from the expanded filter.
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- <strong>int slashIdx = filterString.indexOf('/');
- if (slashIdx &lt; 0)
- {</strong>
- // Fake it out for now and return dummy list.
- // In reality, this would communicate with remote server-side code/data.
- TeamResource[] allTeams = getAllTeams();
-
- // Now, subset master list, based on filter string...
- NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
- Vector v = new Vector();
- for (int idx=0; idx &lt1; allTeams.length; idx++)
- {
- if (subsetter.matches(allTeams[idx].getName()))
- v.addElement(allTeams[idx]);
- }
- TeamResource[] teams = new TeamResource[v.size()];
- for (int idx=0; idx &lt; v.size(); idx++)
- teams[idx] = (TeamResource)v.elementAt(idx);
- return teams;
- <strong>}
- else
- {
- String teamName = filterString.substring(0, slashIdx);
- String devrName = filterString.substring(slashIdx+1);
- TeamResource[] allTeams = getAllTeams();
- TeamResource match = null;
- for (int idx=0; (match==null) && (idx &lt; allTeams.length); idx++)
- if (allTeams[idx].getName().equals(teamName))
- match = allTeams[idx];
- if (match != null)
- {
- DeveloperResource[] allDevrs = match.getDevelopers();
- // Now, subset master list, based on filter string...
- NamePatternMatcher subsetter = new NamePatternMatcher(devrName);
- Vector v = new Vector();
- for (int idx=0; idx &lt; allDevrs.length; idx++)
- {
- if (subsetter.matches(allDevrs[idx].getName()))
- v.addElement(allDevrs[idx]);
- }
- DeveloperResource[] devrs = new DeveloperResource[v.size()];
- for (int idx=0; idx &lt; v.size(); idx++)
- devrs[idx] = (DeveloperResource)v.elementAt(idx);
- return devrs;
- }
- }
- return null;</strong>
- }
-
- /**
- * When a remote resource is expanded, this is called to return the children of the resource, if
- * the resource's adapter states the resource object is expandable. <br>
- * For us, it is a Team resource that was expanded, and an array of Developer resources will be returned.
- *
- * @param monitor - the progress monitor in effect while this operation performs
- * @param parent - the parent resource object being expanded
- * @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- // typically we ignore the filter string as it is always "*"
- // until support is added for "quick filters" the user can specify/select
- // at the time they expand a remote resource.
-
- TeamResource team = (TeamResource)parent;
- return team.getDevelopers();
- }
-
- // ------------------
- // Our own methods...
- // ------------------
-
- /**
- * Get the list of all teams. Normally this would involve a trip the server, but we
- * fake it out and return a hard-coded local list.
- */
- public TeamResource[] getAllTeams()
- {
- if (teams == null)
- teams = createTeams("Team ", 4);
- return teams;
- }
-
- /**
- * Get the list of all developers. Normally this would involve a trip the server, but we
- * fake it out and return a hard-coded local list.
- */
- public DeveloperResource[] getAllDevelopers()
- {
- DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
- for (int idx=0; idx &lt; allDevrs.length; idx++)
- allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
- return allDevrs;
- }
-
- /*
- * Create and return a dummy set of teams
- */
- private TeamResource[] createTeams(String prefix, int howMany)
- {
- TeamResource[] teams = new TeamResource[howMany];
- for (int idx=0; idx &lt; teams.length; idx++)
- {
- teams[idx] = new TeamResource(this);
- teams[idx].setName(prefix + (idx+1));
- teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
- }
- return teams;
- }
-
- /*
- * Create and return a dummy set of developers
- */
- private DeveloperResource[] createDevelopers(String prefix, int nbr)
- {
- DeveloperResource[] devrs = new DeveloperResource[nbr];
- for (int idx=0; idx &lt; devrs.length; idx++)
- {
- devrs[idx] = new DeveloperResource(this);
- devrs[idx].setName(prefix + (idx+1));
- devrs[idx].setId(Integer.toString(employeeId++));
- devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
- devVector.add(devrs[idx]); // update master list
- }
- return devrs;
- }
-
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration.html
deleted file mode 100755
index 9e73c074f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperSubSystemConfiguration Class After Editing</title>
-</head>
-
-<body>
-<h1>DeveloperSubSystemConfiguration Class After Editing</h1>
-<pre><samp>
-package samples.subsystems;
-
-<strong>import java.util.Vector;</strong>
-
-<strong>import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;</strong>
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-<strong>import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.model.IHost;</strong>
-
-<strong>import samples.RSESamplesPlugin;</strong>
-
-/**
- * This is our subsystem factory, which creates instances of our subsystems,
- * and supplies the subsystem and filter actions to their popup menus.
- */
-public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
-
- /**
- * Constructor for DeveloperSubSystemConfiguration.
- */
- public DeveloperSubSystemConfiguration() {
- super();
- }
-
- /**
- * Create an instance of our subsystem.
- */
- <strong>public ISubSystem createSubSystemInternal(IHost conn) {
- return new DeveloperSubSystem(conn, getConnectorService(conn));
- }</strong>
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host) {
- <strong>return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
- .getConnectorService(host, IDeveloperSubSystem.class);</strong>
- }
-
- /**
- * Intercept of parent method that creates an initial default filter pool.
- * We intercept so that we can create an initial filter in that pool, which will
- * list all teams.
- */
- <a id="createDefaultFilterPool"/><strong>protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- ISystemFilterPool defaultPool = null;
- try {
- defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
- Vector strings = new Vector();
- strings.add("*");
- mgr.createSystemFilter(defaultPool, "All teams", strings);
- } catch (Exception exc) {}
- return defaultPool;
- }</strong>
-
- /**
- * Intercept of parent method so we can supply our own value shown in the property
- * sheet for the "type" property when a filter is selected within our subsystem.
- *
- * Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
- */
- <strong>public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
- {
- return RSESamplesPlugin.getResourceString("property.type.teamfilter");
- }</strong>
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
- */
- <strong>public boolean supportsUserId() {
- return false;
- }</strong>
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)
- */
- <strong>public boolean supportsServerLaunchProperties(IHost host) {
- return false;
- }</strong>
-
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration2.html
deleted file mode 100755
index 6729261ec..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration2.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>DeveloperSubSystemFactory Class After Editing For Filter Support</title>
-</head>
-
-<body>
-<h1>DeveloperSubSystemFactory Class After Editing For Filter Support</h1>
-<pre><samp>
-package samples.subsystems;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.model.IHost;
-
-import samples.RSESamplesPlugin;
-
-/**
- * This is our subsystem factory, which creates instances of our subsystems,
- * and supplies the subsystem and filter actions to their popup menus.
- */
-public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
-
- /**
- * Constructor for DeveloperSubSystemConfiguration.
- */
- public DeveloperSubSystemConfiguration() {
- super();
- }
-
- /**
- * Create an instance of our subsystem.
- */
- public ISubSystem createSubSystemInternal(IHost conn) {
- return new DeveloperSubSystem(conn, getConnectorService(conn));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host) {
- return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
- .getConnectorService(host, IDeveloperSubSystem.class);
- }
-
- /**
- * Intercept of parent method that creates an initial default filter pool.
- * We intercept so that we can create an initial filter in that pool, which will
- * list all teams.
- */
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- ISystemFilterPool defaultPool = null;
- try {
- defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
- Vector strings = new Vector();
- strings.add("*");
- I<strong>SystemFilter filter = mgr.createSystemFilter(defaultPool,
- RSESamplesPlugin.getResourceString("filter.default.name"),
- strings);
- filter.setType("team");</strong>
- } catch (Exception exc) {}
- return defaultPool;
- }
-
- /**
- * Intercept of parent method so we can supply our own value shown in the property
- * sheet for the "type" property when a filter is selected within our subsystem.
- *
- * Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
- {
- <strong>String type = selectedFilter.getType();
- if (type == null)
- type = "team";
- if (type.equals("team"))
- return RSESamplesPlugin.getResourceString("property.type.teamfilter");
- else
- return RSESamplesPlugin.getResourceString("property.type.devrfilter");</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
- */
- public boolean supportsUserId() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)
- */
- public boolean supportsServerLaunchProperties(IHost host) {
- return false;
- }
-
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/FolderInfoPropertyPage1.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/FolderInfoPropertyPage1.html
deleted file mode 100755
index 61fb592d5..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/FolderInfoPropertyPage1.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>FolderInfoPropertyPage Class After Creation</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>FolderInfoPropertyPage Class After Creation</h1>
-<p>
-<pre><samp>
-package samples.ui.propertypages;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-import org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction;
-
-public class <b>FolderInfoPropertyPage</b>
- extends SystemAbstractRemoteFilePropertyPageExtensionAction
-{
-
- /**
- * Constructor for FolderInfoPropertyPage.
- */
- public <b>FolderInfoPropertyPage</b>()
- {
- super();
- }
-
- /**
- * @see org.eclipse.rse.ui.propertypages.SystemBasePropertyPage#createContentArea(Composite)
- */
- protected Control <b>createContentArea</b>(Composite parent)
- {
- return null;
- }
-
-}
-</samp></pre>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/FolderInfoPropertyPage2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/FolderInfoPropertyPage2.html
deleted file mode 100755
index 0ed02dc04..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/FolderInfoPropertyPage2.html
+++ /dev/null
@@ -1,269 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>FolderInfoPropertyPage Class After Editing</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>FolderInfoPropertyPage Class After Editing</h1>
-<p>
-<pre><samp>
-package samples.ui.propertypages;
-
-import org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-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.Label;
-
-import samples.RSESamplesPlugin;
-
-/**
- * A sample property page for a remote object, which in this case is scoped via the
- * extension point xml to only apply to folder objects.
- */
-public class FolderInfoPropertyPage
- extends SystemAbstractRemoteFilePropertyPageExtensionAction
- implements SelectionListener
-{
- // gui widgets...
- private Label sizeLabel, filesLabel, foldersLabel;
- private Button stopButton;
- // state...
- private int totalSize = 0;
- private int totalFolders = 0;
- private int totalFiles = 0;
- private boolean stopped = false;
- private Thread workerThread;
- private Runnable guiUpdater;
-
- /**
- * Constructor for FolderInfoPropertyPage.
- */
- public FolderInfoPropertyPage()
- {
- super();
- }
-
- // --------------------------
- // Parent method overrides...
- // --------------------------
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction#createContentArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- Composite composite = SystemWidgetHelpers.createComposite(parent, 2);
- // draw the gui
- sizeLabel = SystemWidgetHelpers.createLabeledLabel(composite,
- RSESamplesPlugin.getResourceString("pp.size.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("pp.size.tooltip"), //$NON-NLS-1$
- false);
- filesLabel = SystemWidgetHelpers.createLabeledLabel(composite,
- RSESamplesPlugin.getResourceString("pp.files.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("pp.files.tooltip"), //$NON-NLS-1$
- false);
- foldersLabel = SystemWidgetHelpers.createLabeledLabel(composite,
- RSESamplesPlugin.getResourceString("pp.folders.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("pp.folders.tooltip"), //$NON-NLS-1$
- false);
- stopButton = SystemWidgetHelpers.createPushButton(composite, null,
- RSESamplesPlugin.getResourceString("pp.stopButton.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("pp.stopButton.tooltip") //$NON-NLS-1$
- );
- stopButton.addSelectionListener(this);
-
- setValid(false); // Disable OK button until thread is done
-
- // show "Processing..." message
- setMessage(RSESamplesPlugin.getPluginMessage("RSSG1002")); //$NON-NLS-1$
-
- // create instance of Runnable to allow asynchronous GUI updates from background thread
- guiUpdater = new RunnableGUIClass();
- // spawn a thread to calculate the information
- workerThread = new RunnableClass(getRemoteFile());
- workerThread.start();
-
- return composite;
- }
-
- /**
- * Intercept from PreferencePage. Called when user presses Cancel button.
- * We stop the background thread.
- * @see org.eclipse.jface.preference.PreferencePage#performCancel()
- */
- public boolean performCancel()
- {
- killThread();
- return true;
- }
-
- /**
- * Intercept from DialogPage. Called when dialog going away.
- * If the user presses the X to close this dialog, we
- * need to stop that background thread.
- */
- public void dispose()
- {
- killThread();
- super.dispose();
- }
-
- /**
- * Private method to kill our background thread.
- * Control doesn't return until it ends.
- */
- private void killThread()
- {
- if (!stopped && workerThread.isAlive())
- {
- stopped = true;
- try {
- workerThread.join(); // wait for thread to end
- } catch (InterruptedException exc) {}
- }
- }
-
- // -------------------------------------------
- // Methods from SelectionListener interface...
- // -------------------------------------------
-
- /**
- * From SelectionListener
- * @see SelectionListener#widgetSelected(SelectionEvent)
- */
- public void widgetSelected(SelectionEvent event)
- {
- if (event.getSource() == stopButton)
- {
- stopped = true;
- stopButton.setEnabled(false);
- }
- }
- /**
- * From SelectionListener
- * @see SelectionListener#widgetDefaultSelected(SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
-
- // ----------------
- // Inner classes...
- // ----------------
- /**
- * Inner class encapsulating the background work to be done, so it may be executed
- * in background thread.
- */
- private class RunnableClass extends Thread
- {
- IRemoteFile inputFolder;
-
- RunnableClass(IRemoteFile inputFolder)
- {
- this.inputFolder = inputFolder;
- }
-
- public void run()
- {
- if (stopped)
- return;
- walkFolder(inputFolder);
- updateGUI();
- if (!stopped)
- {
- stopped = true;
- updateGUI();
- }
- }
-
- /**
- * Recursively walk a folder, updating the running tallies.
- * Update the GUI after processing each subfolder.
- */
- private void walkFolder(IRemoteFile currFolder)
- {
- try
- {
- IRemoteFile[] folders = currFolder.getParentRemoteFileSubSystem().listFoldersAndFiles( currFolder, null);
- if ((folders != null) && (folders.length>0))
- {
- for (int idx=0; !stopped && (idx&lt;folders.length); idx++)
- {
- // is this a folder?
- if (folders[idx].isDirectory())
- {
- ++totalFolders;
- walkFolder(folders[idx]);
- updateGUI();
- }
- // is this a file?
- else
- {
- ++totalFiles;
- totalSize += folders[idx].getLength();
- }
- }
- }
- }
- catch (SystemMessageException e)
- {
-
- }
- } // end of walkFolder method
-
- } // end of inner class
-
- /**
- * Inner class encapsulating the GUI work to be done from the
- * background thread.
- */
- private class RunnableGUIClass implements Runnable
- {
- public void run()
- {
- if (stopButton.isDisposed())
- return;
- if (!stopped)
- {
- sizeLabel.setText(Integer.toString(totalSize));
- filesLabel.setText(Integer.toString(totalFiles));
- foldersLabel.setText(Integer.toString(totalFolders));
- }
- else if (stopped)
- {
- setValid(true); // re-enable OK button
- stopButton.setEnabled(false); // disable Stop button
- clearMessage(); // clear "Processing..." message
- }
- }
- }
-
-
- /**
- * Update the GUI with the current status
- */
- private void updateGUI()
- {
- Display.getDefault().asyncExec(guiUpdater);
- }
-
-
-}
-</samp></pre>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/IDeveloperSubSystem.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/IDeveloperSubSystem.html
deleted file mode 100755
index cf13a5a2d..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/IDeveloperSubSystem.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>IDeveloperSubSystem Interface After Creation</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>IDeveloperSubSystem Interface After Creation</h1>
-<p>
-<pre><samp>
-package samples.subsystems;
-
-/**
- * Interface identifying our unique subsystems
- */
-public interface <b>IDeveloperSubSystem</b>
-{
-
-}
-
-</samp></pre>
-</p>
-</body>
-</html>
-
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry.html
deleted file mode 100755
index 2d618b753..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>InitializeImageRegistry Method</title>
-</head>
-
-<body>
-<h1>InitializeImageRegistry Method</h1>
-<pre><samp>
- /**
- * <i>Initialize the image registry by declaring all of the required graphics.</i>
- */
- protected void initializeImageRegistry()
- {
- String path = getIconPath();
- <b>putImageInRegistry("ICON_ID_TEAM", path + "team.gif");</b>
- <b>putImageInRegistry("ICON_ID_DEVELOPER", path + "developer.gif");</b>
- }
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry2.html
deleted file mode 100755
index b62de4e67..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry2.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>InitializeImageRegistry Method</title>
-</head>
-
-<body>
-<h1>InitializeImageRegistry Method</h1>
-<pre><samp>
- /**
- * <i>Initialize the image registry by declaring all of the required graphics.</i>
- */
- protected void initializeImageRegistry()
- {
- String path = getIconPath();
- putImageInRegistry("ICON_ID_TEAM", path + "team.gif");
- putImageInRegistry("ICON_ID_DEVELOPER", path + "developer.gif");
- <b>putImageInRegistry("ICON_ID_TEAMFILTER", path + "teamFilter.gif");</b>
- <b>putImageInRegistry("ICON_ID_DEVELOPERFILTER", path + "developerFilter.gif");</b>
- }
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterActions.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterActions.gif
deleted file mode 100755
index 473b3fa4d..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterActions.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterIcons.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterIcons.gif
deleted file mode 100755
index 4889771e5..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterIcons.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterWizard.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterWizard.gif
deleted file mode 100755
index 692fbb263..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/NewFilterWizard.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin.html
deleted file mode 100755
index ef43681ed..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>RSESamplesPlugin Class</title>
-</head>
-
-<body>
-<h1>RSESamplesPlugin Class</h1>
-<pre><samp>
-package samples;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class RSESamplesPlugin extends SystemBasePlugin {
-
- //The shared instance.
- private static RSESamplesPlugin plugin;
-
- //Resource bundle.
- private ResourceBundle resourceBundle = null;
- private static SystemMessageFile messageFile = null;
-
- /**
- * The constructor.
- */
- public RSESamplesPlugin() {
- super();
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- <strong>plugin = this;
- messageFile = getMessageFile("rseSamplesMessages.xml");</strong>
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- <strong>plugin = null;
- resourceBundle = null;</strong>
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- <strong>public static RSESamplesPlugin getDefault() {
- return plugin;
- }</strong>
-
- /**
- * Returns the workspace instance.
- */
- <strong>public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }</strong>
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- <strong>public static String getResourceString(String key) {
- ResourceBundle bundle= RSESamplesPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }</strong>
-
- /**
- * Returns the plugin's resource bundle,
- */
- <strong>public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("samples.rseSamplesResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }</strong>
-
- /**
- * Initialize the image registry by declaring all of the required graphics.
- */
- protected void initializeImageRegistry()
- {
- }
-
- /**
- * Load a message file for this plugin.
- * @param messageFileName - the name of the message xml file. Will look for it in this plugin's install folder.
- * @return a message file object containing the parsed contents of the message file, or null if not found.
- */
- <strong>public SystemMessageFile getMessageFile(String messageFileName)
- {
- return loadMessageFile(getBundle(), messageFileName);
- }</strong>
-
- /**
- * Return our message file
- */
- <strong>public static SystemMessageFile getPluginMessageFile()
- {
- return messageFile;
- }</strong>
-
- /**
- * Retrieve a message from this plugin's message file
- */
- <strong>public static SystemMessage getPluginMessage(String msgId)
- {
- return getMessage(messageFile, msgId);
- }</strong>
-}
-</samp></pre>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin2.html
deleted file mode 100755
index f1b2ee08a..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin2.html
+++ /dev/null
@@ -1,167 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>RSESamplesPlugin Class</title>
-</head>
-
-<body>
-<h1>RSESamplesPlugin Class</h1>
-<pre><samp>
-package samples;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.osgi.framework.BundleContext;
-
-import samples.subsystems.DeveloperSubSystemConfigurationAdapterFactory;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class RSESamplesPlugin extends SystemBasePlugin {
-
- //The shared instance.
- private static RSESamplesPlugin plugin;
-
- //Resource bundle.
- private ResourceBundle resourceBundle;
- private static SystemMessageFile messageFile = null;
-
- /**
- * The constructor.
- */
- public RSESamplesPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- messageFile = getMessageFile("rseSamplesMessages.xml"); //$NON-NLS-1$
-
- IAdapterManager manager = Platform.getAdapterManager();
- samples.model.DeveloperAdapterFactory factory = new samples.model.DeveloperAdapterFactory();
- manager.registerAdapters(factory, samples.model.TeamResource.class);
- manager.registerAdapters(factory, samples.model.DeveloperResource.class);
-
- DeveloperSubSystemConfigurationAdapterFactory sscaf = new DeveloperSubSystemConfigurationAdapterFactory();
- sscaf.registerWithManager(manager);
-
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static RSESamplesPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle= RSESamplesPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("samples.rseSamplesResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
- /**
- * @see AbstractUIPlugin#initializeDefaultPreferences
- */
- //protected void initializeDefaultPreferences(IPreferenceStore store)
- //{
- // super.initializeDefaultPreferences(store);
- // //RSESamplesPreferencePage.initDefaults(store);
- //}
-
- /**
- * Initialize the image registry by declaring all of the required graphics.
- */
- protected void initializeImageRegistry()
- {
- String path = getIconPath();
- putImageInRegistry("ICON_ID_TEAM", path + "team.gif");
- putImageInRegistry("ICON_ID_DEVELOPER", path + "developer.gif");
- putImageInRegistry("ICON_ID_TEAMFILTER", path + "teamFilter.gif");
- putImageInRegistry("ICON_ID_DEVELOPERFILTER", path + "developerFilter.gif");
- }
-
- /**
- * Load a message file for this plugin.
- * @param messageFileName - the name of the message xml file. Will look for it in this plugin's install folder.
- * @return a message file object containing the parsed contents of the message file, or null if not found.
- */
- public SystemMessageFile getMessageFile(String messageFileName)
- {
- return loadMessageFile(getBundle(), messageFileName);
- }
-
- /**
- * Return our message file
- */
- public static SystemMessageFile getPluginMessageFile()
- {
- return messageFile;
- }
-
- /**
- * Retrieve a message from this plugin's message file
- */
- public static SystemMessage getPluginMessage(String msgId)
- {
- return getMessage(messageFile, msgId);
- }
-}
-</samp></pre>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents1.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents1.html
deleted file mode 100755
index 90e137bc2..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents1.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>ShowJarContents Class After Creation</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>ShowJarContents Class After Creation</h1>
-<p>
-<pre><samp>
-package samples.ui.actions;
-
-import org.eclipse.rse.files.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction;
-
-public class <b>ShowJarContents</b>
- extends SystemAbstractRemoteFilePopupMenuExtensionAction
-{
-
- /**
- * Constructor for ShowJarContents.
- */
- public <b>ShowJarContents</b>()
- {
- super();
- }
-
- /**
- * @see org.eclipse.rse.ui.actions.SystemAbstractPopupMenuExtensionAction#run()
- */
- public void <b>run</b>()
- {
- }
-
-}
-
-</samp></pre>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents2.html
deleted file mode 100755
index a316ea3dd..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents2.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>ShowJarContents Class After Editing</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>ShowJarContents Class After Editing</h1>
-<p>
-<pre><samp>
-package samples.ui.actions;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-
-public class ShowJarContents2 extends SystemAbstractRemoteFilePopupMenuExtensionAction {
-
- public ShowJarContents2() {
- super();
- }
-
- public void run() {
- IRemoteFile selectedFile = getFirstSelectedRemoteFile();
- String cmdToRun = "jar -tvf " + selectedFile.getAbsolutePath();
- runCommand(cmdToRun);
- }
-
- private void runCommand(String command) {
- IRemoteCmdSubSystem cmdss = getRemoteCmdSubSystem();
- if (cmdss != null && cmdss.isConnected()) {
- RemoteCommandHelpers.runUniversalCommand(getShell(), command, ".", cmdss);
- } else {
- MessageDialog.openError(getShell(), "No command subsystem", "Found no command subsystem");
- }
- }
-
- /**
- * Gets the Command subsystem associated with the current host
- */
- private IRemoteCmdSubSystem getRemoteCmdSubSystem() {
- IHost myHost = getSubSystem().getHost();
- IRemoteCmdSubSystem[] subsys = RemoteCommandHelpers.getCmdSubSystems(myHost);
- for (int i = 0; i < subsys.length; i++) {
- if (subsys[i].getSubSystemConfiguration().supportsCommands()) {
- return subsys[i];
- }
- }
- return null;
- }
-
-}
-</samp></pre>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamFilterDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamFilterDialog.gif
deleted file mode 100755
index 4d2ae4028..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamFilterDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamFilterWizard.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamFilterWizard.gif
deleted file mode 100755
index 1590342e3..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamFilterWizard.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamResource.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamResource.html
deleted file mode 100755
index 9fbe890f1..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamResource.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>TeamResource Class After Editing</title>
-</head>
-
-<body>
-<h1>TeamResource Class After Editing</h1>
-<pre><samp>
-package samples.model;
-
-import org.eclipse.rse.core.subsystems.AbstractResource;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This models a remote resource representing a team defined on a particular system.
- */
-public class TeamResource extends AbstractResource {
-
- private String name;
- private DeveloperResource[] developers;
-
- /**
- * Default constructor
- */
- public TeamResource()
- {
- super();
- }
- /**
- * Constructor for TeamResource when given a parent subsystem.
- */
- public TeamResource(ISubSystem parentSubSystem)
- {
- super(parentSubSystem);
- }
-
- /**
- * Returns the name.
- * @return String
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the name.
- * @param name The name to set
- */
- public void setName(String name)
- {
- this.name = name;
- }
-
- /**
- * Returns the developers.
- * @return DeveloperResource[]
- */
- public DeveloperResource[] getDevelopers()
- {
- return developers;
- }
-
- /**
- * Sets the developers.
- * @param developers The developers to set
- */
- public void setDevelopers(DeveloperResource[] developers)
- {
- this.developers = developers;
- }
-
-
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamResourceAdapter.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamResourceAdapter.html
deleted file mode 100755
index c576c6c5c..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamResourceAdapter.html
+++ /dev/null
@@ -1,228 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>TeamResourceAdapter Class After Editing</title>
-</head>
-
-<body>
-<h1>TeamResourceAdapter Class After Editing</h1>
-<pre><samp>
-package samples.model;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-<strong>import samples.RSESamplesPlugin;</strong>
-<strong>import samples.subsystems.DeveloperSubSystem;</strong>
-
-/**
- * This is the adapter which enables us to work with our remote team resources.
- */
-public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
- ISystemRemoteElementAdapter {
-
- /**
- * Constructor.
- */
- public TeamResourceAdapter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager,
- * org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
- */
- public void addActions(SystemMenuManager menu,
- IStructuredSelection selection, Shell parent, String menuGroup)
- {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- <strong>return RSESamplesPlugin.getDefault().getImageDescriptor("ICON_ID_TEAM");</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getText(java.lang.Object)
- */
- public String getText(Object element)
- {
- <strong>return ((TeamResource)element).getName();</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getAbsoluteName(java.lang.Object)
- */
- <a id="getAbsoluteName"/>public String getAbsoluteName(Object object)
- {
- <strong>TeamResource team = (TeamResource)object;
- return "Team_"+team.getName();</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getType(java.lang.Object)
- */
- public String getType(Object element)
- {
- <strong>return RSESamplesPlugin.getResourceString("property.team_resource.type");</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object element)
- {
- return null; // not really used, which is good because it is ambiguous
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element)
- {
- <strong>return true;</strong>
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object element)
- {
- <strong>return ((TeamResource)element).getDevelopers();</strong>
- }
-
- /**
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyDescriptors()
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyValue(java.lang.Object)
- */
- protected Object internalGetPropertyValue(Object key)
- {
- return null;
- }
-
- /**
- * Intercept of parent method to indicate these objects can be renamed using the RSE-supplied
- * rename action.
- */
- <a id="canRename"/>public boolean canRename(Object element)
- {
- <strong>return true;</strong>
- }
-
- /**
- * Intercept of parent method to actually do the rename. RSE supplies the rename GUI, but
- * defers the action work of renaming to this adapter method.
- */
- <a id="doRename"/>public boolean doRename(Shell shell, Object element, String newName)
- {
- <strong>((TeamResource)element).setName(newName);
- return true;</strong>
- }
- // --------------------------------------
- // ISystemRemoteElementAdapter methods...
- // --------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object)
- */
- public String getAbsoluteParentName(Object element)
- {
- <strong>return "root";</strong> // not really applicable as we have no unique hierarchy
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getSubSystemConfigurationId(java.lang.Object)
- */
- public String getSubSystemConfigurationId(Object element)
- {
- <strong>return "samples.subsystems.factory";</strong> // as declared in extension in plugin.xml
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteTypeCategory(java.lang.Object)
- */
- public String getRemoteTypeCategory(Object element)
- {
- <strong>return "developers";</strong> // Course grained. Same for all our remote resources.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteType(java.lang.Object)
- */
- public String getRemoteType(Object element)
- {
- <strong>return "team";</strong> // Fine grained. Unique to this resource type.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubType(java.lang.Object)
- */
- public String getRemoteSubType(Object element)
- {
- return null; // Very fine grained. We don't use it.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#refreshRemoteObject(java.lang.Object, java.lang.Object)
- */
- <a id="refreshRemoteObject"/>public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- <strong>TeamResource oldTeam = (TeamResource)oldElement;
- TeamResource newTeam = (TeamResource)newElement;
- newTeam.setName(oldTeam.getName());
- return false;</strong> // If developer objects held references to their team names, we'd have to return true
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParent(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- return null; // maybe this would be a Project or Roster object, or leave as null if this is the root
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParentNamesInUse(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- <a id="getNames"/>public String[] getRemoteParentNamesInUse(Shell shell, Object element)
- throws Exception
- {
- <strong>DeveloperSubSystem ourSS = (DeveloperSubSystem)getSubSystem(element);
- TeamResource[] allTeams = ourSS.getAllTeams();
- String[] allNames = new String[allTeams.length];
- for (int idx = 0; idx &lt; allTeams.length; idx++)
- allNames[idx] = allTeams[idx].getName();
- return allNames;</strong> // Return list of all team names
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- <strong>return false;</strong>
- }
-
-}
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/index.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/index.html
deleted file mode 100755
index c6cd77505..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/index.html
+++ /dev/null
@@ -1 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <meta name="generator" content="Adobe GoLive"> <title>RSE Tutorials</title> </head> <body> <p>Note: This page exists only to provide a root page for debugging the tutorial and should not be accessible from any page or the table of contents.</p> <p><a href="pdeProject.html">Getting Started</a></p> <p><a href="propertypage.html">Property Page Tutorial</a></p> <p><a href="subsystem.html">Subsystem Tutorial</a></p> <p><a href="popup.html">Popup Menu Tutorial</a></p> </body> </html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/newFilterAction.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/newFilterAction.gif
deleted file mode 100755
index 0883a8979..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/newFilterAction.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_1.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_1.gif
deleted file mode 100755
index 717f78de8..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_1.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props1.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props1.gif
deleted file mode 100755
index 21548f3db..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props1.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2.gif
deleted file mode 100755
index 1d3b9ace0..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2_addvar1.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2_addvar1.gif
deleted file mode 100755
index 0f2464574..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2_addvar1.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2_addvar2.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2_addvar2.gif
deleted file mode 100755
index a417d2b85..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props2_addvar2.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3.gif
deleted file mode 100755
index 3f985d848..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3_addvar1.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3_addvar1.gif
deleted file mode 100755
index add8e33a8..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3_addvar1.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3_addvar2.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3_addvar2.gif
deleted file mode 100755
index 6ab3d1209..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props3_addvar2.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props4.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props4.gif
deleted file mode 100755
index 78683a717..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props4.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar1.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar1.gif
deleted file mode 100755
index 0106bbd81..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar1.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar1_selectFolder.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar1_selectFolder.gif
deleted file mode 100755
index bf4d7431f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar1_selectFolder.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar2.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar2.gif
deleted file mode 100755
index bad6554da..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar2.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar3.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar3.gif
deleted file mode 100755
index 134eccad8..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar3.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar4.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar4.gif
deleted file mode 100755
index 493a7c8dd..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar4.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar5.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar5.gif
deleted file mode 100755
index 8ec5cb2ff..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_addvar5.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_newVar_msg.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_newVar_msg.gif
deleted file mode 100755
index 8ec5cb2ff..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_props_newVar_msg.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_after.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_after.gif
deleted file mode 100755
index 53fa300b6..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_after.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page1.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page1.gif
deleted file mode 100755
index e4fdfff8d..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page1.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page3.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page3.gif
deleted file mode 100755
index 5c42bae1b..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page3.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page4.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page4.gif
deleted file mode 100755
index 8bbc87bd9..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page4.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProject.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProject.html
deleted file mode 100755
index fd07da1a7..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProject.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
- <head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Creating a Plug-in Project</title>
-</head>
-
- <body bgcolor="#ffffff">
- <h1>Creating a Plug-in Project</h1>
- <p>To use any Eclipse extension point, including those defined by the Remote System Explorer, you must first create a plug-in project using the plug-in development environment (PDE), which you will do shortly. At its simplest, a plug-in project requires a <tt>MANIFEST.MF</tt> file describing the plugin and its dependencies and, if extending the workbench a <samp>plugin.xml</samp> file identifying the extension points being implemented, and a set of Java classes implementing those extension points. There is usually also a plug-in class file that is used as the overall manager of the project, and point of integration that other classes can rely on.</p>
- <p><i>If you already have a plugin project, you will need to update it slightly to make it extend SystemBasePlugin and add the few methods it requires. You may wish to examine these steps to see what methods to add. The Eclipse environment will keep your classpaths and plugin dependecies in sync for you.</i></p>
- <p>Eclipse supplies a number of plug-in project templates, which generate a number of project files that illustrate examples of various Eclipse extension points. While you are free to pick one of these, or indeed start with any existing plug-in project if you have one, in the RSE tutorials everything is created by hand so as to keep focused on the RSE-required classes and files.</p>
- <p>The following tutorial uses numbered steps to indicate where you are required to do something as you follow along.</p>
- <h2>Step By Step: Creating an RSE Plug-in Project</h2>
- <ol>
- <li>Select <b>File-&gt;New-&gt;Project.</b>
- <li>On the left of the dialog box, select <b>Plug-in Development</b> category, and on the right, select the <b><a href="pdeProj_1.gif">Plug-in Project</a></b> wizard. Press <b>Next &gt;</b>.
- <li>In the <a href="pdeProj_wiz_page1.gif">first page</a> of the wizard (Plug-in Project Name), enter <b>&quot;RSESamples&quot;</b> for the project name (without the quotes). Press <b>Next &gt;</b>.
- <li>In the second page of the wizard (Plug-in Project Structure), just take the defaults, and press <b>Next &gt;</b>.
- <li>In the <a href="pdeProj_wiz_page3.gif">third page</a> of the wizard (Plug-in Code Generators), select <b>&quot;Default Plug-in Structure&quot;</b>, and press <b>Next &gt;</b>.
- <li>In the <a href="pdeProj_wiz_page4.gif">fourth page</a> of the wizard (Simple Plug-in Content), enter your company for the <b>Provider Name</b>, and press <b>Finish</b>.
- <li>Your new plugin project is created and visible in the Package Explorer of the Plug-in Development perspective. Your new <samp>plugin.xml</samp> file is also open in the <a href="pdeProj_wiz_after.gif">plug-in editor</a>. <i>Close this editor</i>, as you will not be using it in this tutorial.
-
- <li>Select the <samp>plugin.xml</samp> file, right click and select <b>Open</b>. Go to the dependencies tab and add the following plugins to the list:
- <ul>
- <li>org.eclipse.rse.ui
- <li>org.eclipse.rse.services
- <li>org.eclipse.rse.files.ui
- <li>org.eclipse.rse.shells.ui
- <li>org.rse.eclipse.subsystems.files.core
- <li>org.rse.subsystems.shells.core
- </ul>
- <li>Expand the <b>src</b> folder, then the <b>RSESamples</b> package folder, and double-click on <samp><b>RSESamplesPlugin.java</b></samp> to edit this class to make it look like <a href="RSESamplesPlugin.html">this</a>.
-
- <li>Create the project's resources file for translatable strings: right-click on the <b>RSESamples</b> project and select <b>New-&gt;File</b> to open the <b>New File</b> wizard. Enter <samp><b>rseSamplesResources.properties</b></samp> for the file name, as was specified in the call to <samp>loadResourceBundle</samp> in the plug-in class's constructor. Press <b>Finish</b> to create the file. You will populate as you go through the tutorials, so for now just <i>close</i> the editor opened for the file.
-
- <li>Create the project's RSE-style messages file for translatable messages: right-click on the <b>RSESamples</b> project and select <b>New-&gt;File</b> to get the <b>New File</b> wizard. Enter <samp><b>rseSamplesMessages.xml</b></samp> for the file name, as was specified in the call to <samp>loadMessageFile</samp> in the plug-in class's constructor. Press <b>Finish</b> to create the file. You will see the XML editor open for the new file. Press the <b>Source</b> tab at the bottom of the editor, and enter the following lines (so that you can add messages to the file later on):
- <pre><code>
-&lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
-&lt;!DOCTYPE MessageFile SYSTEM &quot;../org.eclipse.rse.ui/messageFile.dtd&quot;&gt;
-&lt;!-- This is a message file used by SystemMessage and SystemMessageDialog --&gt;
-&lt;<b>MessageFile</b> Version=&quot;1.0&quot;&gt;
- &lt;<b>Component</b> Name=&quot;RSE Samples&quot; Abbr=&quot;RSS&quot;&gt;
- &lt;<b>Subcomponent</b> Name=&quot;General&quot; Abbr=&quot;G&quot;&gt;
- &lt;<b>MessageList</b>&gt;
- &lt;<b>Message</b> ID=&quot;1001&quot; Indicator=&quot;E&quot;&gt;
- &lt;<b>LevelOne</b>&gt;Sample message&lt;/<b>LevelOne</b>&gt;
- &lt;<b>LevelTwo</b>&gt;This is a sample with one substution variable: %1&lt;/<b>LevelTwo</b>&gt;
- &lt;/<b>Message</b>&gt;
- &lt;/<b>MessageList</b>&gt;
- &lt;/<b>Subcomponent</b>&gt;
- &lt;/<b>Component</b>&gt;
-&lt;/<b>MessageFile</b>&gt;
-</code></pre>
- Save and close the file.
- <li>That's it! Your plugin is created and you are ready to go. Now you only need to add code, to implement the extension points.
- </ol>
- </body>
-
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup.html
deleted file mode 100755
index bfdbcdd10..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Creating a Remote Resource Popup Menu Action</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Creating a Remote Resource pop-up Menu Action</h1>
-<p>In this tutorial, you will use the RSE <A href="../plugin/popup.html">pop-up menus
-extension point</A> to
-create a pop-up menu action that will appear
-in the context menu for any <samp>.jar</samp> file, for any connection to
-any system type. The action will be labeled "Show contents" and will simply
-run the <samp>jar -tvf</samp> JDK command when selected, displaying the results
-in the command console. You could expand this example to copy the file
-to a local temporary folder, extract the list of file names within the jar, and
-display those names in an Eclipse table view.
-</p>
-
-<p><b>Tip:</b> If you prefer your Java code to use lined-up braces, select the
-first two options in the <b><A href="preferences_JavaFormatting.gif">Code
-Formatter</A></b> preferences page for <b>Java</b>, via <b>Windows-&gt;Preferences</b>.
-
-This will affect code generated by wizards. The source code shown assumes this option has been set, but this is not required.
-
-<h2>Step-by-Step: Creating an RSE Remote Resource Pop-up Menu Action</h2>
-
-<ol>
-<li>If you have not already, first <a href="pdeProject.html">create or prepare a plugin project</a>.
-</li>
-<li>Open the <b>plugin.xml</b> file for editing by right-clicking on it and selecting
-<b>Open With-&gt;Text Editor</b>. Before the ending &lt;/plugin&gt; statement, add the following lines:
-<pre><code>
- &lt;!-- ======================================= --&gt;
- &lt;!-- Remote Object Popup Menu Actions --&gt;
- &lt;!-- ======================================= --&gt;
- &lt;extension point=&quot;org.eclipse.rse.ui.popupMenus&quot;&gt;
- &lt;objectContribution id=&quot;actions.jar&quot;
- typecategoryfilter=&quot;files&quot;
- typefilter=&quot;file&quot;
- namefilter=&quot;*.jar&quot;&gt;
- &lt;action id=&quot;actions.jar.show&quot;
- enablesFor=&quot;1&quot;
- label=&quot;Show contents&quot;
- tooltip=&quot;List contents of this file&quot;
- class=&quot;samples.ui.actions.ShowJarContents&quot;&gt;
- &lt;/action&gt;
- &lt;/objectContribution&gt;
- &lt;/extension&gt;
-</code></pre>
-Save and close the file.
-</li>
-<li>
-Create the Java package: right-click on the <B>src</B> source folder and select <B>New-&gt;Package</B> to open the <B>New
- Java Package</B> wizard. Enter <B>&quot;samples.ui.actions&quot;</B> for the name of the package and press <B>Finish</B>.</li>
-<li>
-Create the Java class: right-click on the new <B>&quot;samples.ui.actions&quot;</B> package folder and select <B>New-&gt;Class</B> to open the <B>New
-Java Class</B> wizard. Enter <B>&quot;ShowJarContents&quot;</B> for the <b>Name</b>
-and <b>&quot;org.eclipse.rse.files.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction&quot;</b>
-for the <b>Superclass</b>. Select the <b>Constructors from superclass</b> check box, as shown
-<A href="popup_newClass.gif">here</A>.
-Press <b>Finish</b> to create the <samp><a href="ShowJarContents1.html">ShowJarContents</a></samp> class.
-</li>
-<li>Edit the generated <samp>ShowJarContents.java</samp> file as follows:
-<ol>
- <li type="i">Add the following three statements to the body of the <samp>run()</samp> method:</li>
- <pre><code>
- IRemoteFile selectedFile = getFirstSelectedRemoteFile();
- String cmdToRun = "jar -tvf " + selectedFile.getAbsolutePath();
- runCommand(cmdToRun);
- </code></pre>
- <li type="i">Add the following two methods to find the subsystem and run the command:</li>
- <pre><code>
- private void runCommand(String command) {
- IRemoteCmdSubSystem cmdss = getRemoteCmdSubSystem();
- if (cmdss != null && cmdss.isConnected()) {
- RemoteCommandHelpers.runUniversalCommand(getShell(), command, ".", cmdss);
- } else {
- MessageDialog.openError(getShell(), "No command subsystem", "Found no command subsystem");
- }
- }
-
- /**
- * Gets the Command subsystem associated with the current host
- */
- private IRemoteCmdSubSystem getRemoteCmdSubSystem() {
- IHost myHost = getSubSystem().getHost();
- IRemoteCmdSubSystem[] subsys = RemoteCommandHelpers.getCmdSubSystems(myHost);
- for (int i = 0; i < subsys.length; i++) {
- if (subsys[i].getSubSystemConfiguration().supportsCommands()) {
- return subsys[i];
- }
- }
- return null;
- }
- </code></pre>
- <li type="i">User the "Source -> Organize Imports" context menu item to add the appropriate import statements.</li>
-</ol>
-The final result after editing is shown <a href="ShowJarContents2.html">here</a>.
-</li>
-</ol>
-
-<p>Thats it! Now, you can try your new action. Use <b>Run-&gt;Run As-&gt;Run-time Workbench</b>. Drill
-down in the RSE to a Jar file in a local or remote connection and right-click to <a href="popup_see.gif">see</a> and <a href="popup_run.gif">run</a> your new action. Notice
-how it does not appear for files that do not end with the ".jar" extension. This is because of the "namefilter" attribute
-in our extension point .xml file.
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_newClass.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_newClass.gif
deleted file mode 100755
index 1e097dc6b..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_newClass.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_run.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_run.gif
deleted file mode 100755
index e6646d36a..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_run.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_see.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_see.gif
deleted file mode 100755
index 5a1734fe8..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_see.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/preferences_JavaFormatting.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/preferences_JavaFormatting.gif
deleted file mode 100755
index 80b15a21d..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/preferences_JavaFormatting.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage.html
deleted file mode 100755
index 22aeaa128..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Creating a Remote Resource Property Page</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Creating a Remote Resource Property Page</h1>
-<p>In this tutorial, you will use the RSE <A href="../plugin/propertypage.html">propertyPage
-extension point</A> to
-create a <a href="propertypage_run_done.gif">property page</a> that will appear
-in the Properties dialog for any folder, for any connection to
-any system type. The page will be labeled "Folder Contents" and will show the
-cumulative size of the contents of the folder, and the number of folders and files within it.
-This will show the extension point, plus how to use some of the RSE user interface helpers, as well
-as the remote file API for querying information about remote folders and files.
-</p>
-
-<p><b>Tip:</b> If you prefer your Java code to use lined-up braces, select the
-first two options in the <b><A href="preferences_JavaFormatting.gif">Code
-Formatter</A></b> preferences page for <b>Java</b>, via <b>Windows-&gt;Preferences</b>.
-
-This will affect code generated by wizards. The source code shown assumes this option has been set, but this is not required.
-
-
-
-
-<h2>Step-by-Step: Creating a Remote Resource Property Page</h2>
-<ol>
-<li>If you have not already, first <a href="pdeProject.html">create or prepare a plugin project</a>.
-
-Open the <b>plugin.xml</b> file for editing by right-clicking on it, and selecting
-<b>Open With-&gt;Text Editor</b>. Before the ending &lt;/plugin&gt; statement, add the following lines:
-<pre><code>
- &lt;!-- ======================================= --&gt;
- &lt;!-- Remote Object Property Pages --&gt;
- &lt;!-- ======================================= --&gt;
- &lt;extension point=&quot;org.eclipse.rse.ui.propertyPages&quot;&gt;
- &lt;page name=&quot;Folder Contents&quot;
- class=&quot;samples.ui.propertypages.FolderInfoPropertyPage&quot;
- id=&quot;samples.ui.PropertyPage1&quot;
- typefilter=&quot;folder&quot;
- typecategoryfilter=&quot;files&quot;&gt;
- &lt;/page&gt;
- &lt;/extension&gt;
-
-</code></pre></li>
-<li>Save and close the file.</li>
-<li>
-Create the Java package: right-click on the <B>src</B> source folder and select <B>New-&gt;Package</B> to get the <B>New
- Java Package</B> wizard. Enter <B>&quot;samples.ui.propertypages&quot;</B> for the name of the package and press <B>Finish</B>.</li>
-<li>
-Create the Java class: right-click on the new <B>&quot;samples.ui.propertypages&quot;</B> package folder and select <B>New-&gt;Class</B> to open the <B>New
-Java Class</B> wizard. Enter <B>&quot;FolderInfoPropertyPage&quot;</B> for the <b>Name</b>
-and <b>&quot;org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction&quot;</b>
-for the <b>Superclass</b>. Select the <b>Constructors from superclass</b> check box, as shown
-<A href="propertypage_newClass.gif">here</A>.
-Press <b>Finish</b> to create the <samp><a href="FolderInfoPropertyPage1.html">FolderInfoPropertyPage</a></samp> class.
-</li>
-<li>Edit the <samp>FolderInfoPropertyPage</samp> class to look like <A href="FolderInfoPropertyPage2.html">this</A>. There are many changes, so you should use
-the clipboard to copy and paste.
-</li>
-<li>Edit the <samp>rseSamplesMesssage.xml</samp> file to look like <A href="rseSamplesMessages2.html">this</A>, where the changes are highlighted.
-</li>
-<li>Edit the <samp>rseSamplesResources.properties</samp> file to look like <A href="rseSamplesResources2.html">this</A>.
-</li>
-</ol>
-
-<p>Thats it! Now, you can try out your new property page. Use <b>Run-&gt;Run As-&gt;Run-time Workbench</b>. Drill
-down in the RSE to a folder in a local or remote connection and right-click to <a href="propertypage_see.gif">see</a>
-and <a href="propertypage_run_during.gif">run</a> your new property page. This sample is a unique case, in that this operation could potentially run for a long time, as you are recursively walking all
-the sub-folders and files to accumulate the size and count information. Because of this, we put this work
-in a background thread, and update the GUI as each sub-folder is processed. We also supply a stop button
-to the user and watch for them pressing Cancel or closing the dialog. When the thread ends, the
-result looks like <a href="propertypage_run_done.gif">this</a>.
-<p>Notice how this property page only appears for folders, due to the <b><samp>typefilter="folder"</samp></b> attribute
-in our extension point xml.
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_newClass.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_newClass.gif
deleted file mode 100755
index 32531d37c..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_newClass.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_done.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_done.gif
deleted file mode 100755
index 084a08ecf..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_done.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_during.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_during.gif
deleted file mode 100755
index b14fcf530..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_during.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_see.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_see.gif
deleted file mode 100755
index 9f5d4882d..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_see.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/renameAction.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/renameAction.gif
deleted file mode 100755
index 481259872..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/renameAction.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/renameDialog.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/renameDialog.gif
deleted file mode 100755
index c04042cfe..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/renameDialog.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesMessages2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesMessages2.html
deleted file mode 100755
index ea240dd19..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesMessages2.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>rseSamplesMessages Message File After Editing</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>rseSamplesMessages Message File After Editing</h1>
-<p>
-<pre><samp>
-&lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
-&lt;!DOCTYPE MessageFile SYSTEM &quot;../org.eclipse.rse.ui/messageFile.dtd&quot;&gt;
-&lt;!-- This is a message file used by SystemMessage and SystemMessageDialog --&gt;
-&lt;MessageFile Version=&quot;1.0&quot;&gt;
- &lt;Component Name=&quot;RSE Samples&quot; Abbr=&quot;RSS&quot;&gt;
- &lt;Subcomponent Name=&quot;General&quot; Abbr=&quot;G&quot;&gt;
- &lt;MessageList&gt;
- &lt;Message ID=&quot;1001&quot; Indicator=&quot;E&quot;&gt;
- &lt;LevelOne&gt;Sample message&lt;/LevelOne&gt;
- &lt;LevelTwo&gt;This is a sample with one substution variable: %1&lt;/LevelTwo&gt;
- &lt;/Message&gt;
- <b>&lt;Message ID=&quot;1002&quot; Indicator=&quot;I&quot;&gt;</b>
- <b>&lt;LevelOne&gt;Processing...&lt;/LevelOne&gt;</b>
- <b>&lt;LevelTwo&gt;&lt;/LevelTwo&gt;</b>
- <b>&lt;/Message&gt;</b>
- &lt;/MessageList&gt;
- &lt;/Subcomponent&gt;
- &lt;/Component&gt;
-&lt;/MessageFile&gt;
-</samp></pre>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources2.html
deleted file mode 100755
index dae089a03..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources2.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>rseSamplesResources Properties File After Editing</title>
-</head>
-
-<body bgcolor="#ffffff">
-<h1>rseSamplesResources Properties File After Editing</h1>
-<p>
-<pre><samp>
-pp.size.label=Size
-pp.size.tooltip=Cumulative size, in bytes
-pp.files.label=Files
-pp.files.tooltip=Cumulative number of files
-pp.folders.label=Folders
-pp.folders.tooltip=Cumulative number of folders
-pp.stopButton.label=Stop
-pp.stopButton.tooltip=Cancel the thread
-</samp></pre>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources3.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources3.html
deleted file mode 100755
index 93b3df7cb..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources3.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>rseSamplesResources Properties File After Editing</title>
-</head>
-
-<body>
-<h1>rseSamplesResources Properties File After Editing</h1>
-<pre><samp>
-pp.size.label=Size
-pp.size.tooltip=Cumulative size, in bytes
-pp.files.label=Files
-pp.files.tooltip=Cumulative number of files
-pp.folders.label=Folders
-pp.folders.tooltip=Cumulative number of folders
-pp.stopButton.label=Stop
-pp.stopButton.tooltip=Cancel the thread
-
-<b>property.type.teamfilter=Team filter</b>
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources4.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources4.html
deleted file mode 100755
index 6b91d8a1e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/rseSamplesResources4.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>rseSamplesResources Properties File After Editing</title>
-</head>
-
-<body>
-<h1>rseSamplesResources Properties File After Editing</h1>
-<pre><samp>
-pp.size.label=Size
-pp.size.tooltip=Cumulative size, in bytes
-pp.files.label=Files
-pp.files.tooltip=Cumulative number of files
-pp.folders.label=Folders
-pp.folders.tooltip=Cumulative number of folders
-pp.stopButton.label=Stop
-pp.stopButton.tooltip=Cancel the thread
-
-property.type.teamfilter=Team filter
-<b>property.type.devrfilter=Developer filter
-
-filter.team.dlgtitle=Change Team Filter
-filter.team.pagetitle=Team Filter
-filter.team.pagetext=Create a new filter to list teams
-
-filter.devr.dlgtitle=Change Developer Filter
-filter.devr.pagetitle=Developer Filter
-filter.devr.pagetext=Create a new filter to list developers
-filter.devr.teamprompt.label=Parent team
-filter.devr.teamprompt.tooltip=Specify the team within which to list developers
-filter.devr.devrprompt.label=Developers
-filter.devr.devrprompt.tooltip=Specify a simple or generic developer name pattern
-</b>
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/runIt1.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/runIt1.gif
deleted file mode 100755
index 57af6bf40..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/runIt1.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/runIt2.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/runIt2.gif
deleted file mode 100755
index 41b63a448..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/runIt2.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/startup.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/startup.html
deleted file mode 100755
index 7e715b6bc..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/startup.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Startup Method in RSESamplesPlugin</title>
-</head>
-
-<body>
-<h1>Startup Method in RSESamplesPlugin</h1>
-<pre><samp>
- public void startup() throws CoreException
- {
- super.startup();
- <b>IAdapterManager manager = Platform.getAdapterManager();
- samples.model.DeveloperAdapterFactory factory = new samples.model.DeveloperAdapterFactory();
- manager.registerAdapters(factory, samples.model.TeamResource.class);
- manager.registerAdapters(factory, samples.model.DeveloperResource.class);</b>
- }
-</samp></pre>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/subsystem.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/subsystem.html
deleted file mode 100755
index b5f4aaff4..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/subsystem.html
+++ /dev/null
@@ -1,245 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
-<title>Creating a Subsystem Configuration</title>
-</head>
-
-<body>
-<h1>Creating a Subsystem Configuration</h1>
-<p>In this tutorial you will use the RSE <A href="../../reference/extension-points/org_eclipse_rse_ui_subsystemConfigurations.html">subsystemConfigurations</A> extension point to show new subsystems within connections, which will then appear when those connections are expanded. Effectively, you will add a new <i>remote-accessing tool</i> to the Remote System Explorer.</p>
-<p>
-A full-blown tutorial to illustrate this extension point is a bit difficult without inventing
-server-side code and a communication layer for that server-side code to communication with the
-client-side subsystem. Rather than becoming bogged down in these details, this tutorial will not
-write server-side code or a communications-layer, but instead will hard-code the remote resources
-on the client-side so as to focus discussion on the client-side code. The extension point assumes
-you already have server-side code and a communication layer you now want to exploit within
-Eclipse.
-</p>
- <p>When you are finished you should have a working subsystem similar to the one found in the org.eclipse.rse.examples.tutorial plugin.</p>
- <h2>Scenario</h2>
- <p>This tutorial pretends that you have server-side code which manages user profiles for developers and teams of developers. We assume there is a master list of developers identified for development access to this server, and there is a grouping mechanism that allows developers to be assigned to named teams. A developer may exist on multiple teams. Each developer can have one or more <i>roles</i> which may affect what they are allowed to access.</p>
-<p>In this tutorial you will define a subsystem for working with these resources in the remote system identified by the connection. This will first list teams and then developers within teams. Roles will be accessible via an action.</p>
-<p><i>Do not worry about how useful or realistic the example is. The point of the exercise is
-show the code necessary to fully enable new subsystems. It is up to the subsystem developer to
-decide what resources to expose and what actions on those resources.</i></p>
-
-<br>
-<hr>
-
-
-<h2>Step By Step: Creating a Subsystem Configuration</h2>
- <p>If you have not already, first <a href="pdeProject.html">create or prepare a plugin project</a>
-We will follow the steps listed in the <A href="../plugin/subsystem.html#steps">Overview of Steps</A> section in the description of the plugin.</p>
- <ol>
-<li>Create a package named <samp><b>samples.subsystems</b></samp>, by right-clicking on the <samp>src</samp> folder
-and using the <b>New-&gt;Package</b> wizard. In the new package, create an empty interface named <A href="IDeveloperSubSystem.html"><samp>IDeveloperSubSystem</samp></A>, by right-clicking on the package and selecting <b>New-&gt;Interface</b>.
-</li>
-<li>Also in package <samp>samples.subsystems</samp>, use <b>New-&gt;Class</b> to
-create a class named <samp><b>DeveloperConnectorService</b></samp> that extends <b>superclass</b>
-<samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorService.html">AbstractConnectorService</A></samp>,
-selecting the option to include <b>Constructors from superclass</b>. Edit the result to add
-a <samp>connected</samp> instance variable that is used in the methods, as shown in bold <a href="DeveloperConnectorService.html">here</a>.
-</li>
-<li>Again in package <samp>samples.subsystems</samp>, use <b>New-&gt;Class</b> to
-create a class named <samp><b>DeveloperConnectorServiceManager</b></samp> that extends <b>superclass</b>
-<samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.html">AbstractSystemManager</A></samp>,
-selecting the option to include <b>Constructors from superclass</b>. Edit the result to add
-a factory method, and flesh out the methods, as highlighted <a href="DeveloperConnectorServiceManager.html">here</a>.
-</li>
-<li>Create a package named <samp><b>samples.model</b></samp>. Create two classes in it:
-<b><samp>TeamResource</samp></b> and <b><samp>DeveloperResource</samp></b>, each of which extend
-<A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractResource.html"><samp>AbstractResource</samp></A>.
- <ol>
- <li type="i">Edit <samp>DeveloperResource</samp> to add <samp>name</samp>, <samp>id</samp>, and <samp>deptNbr</samp> properties, as shown in bold <a href="DeveloperResource.html">here</a>. You can use the refactoring support in eclipse to generate the getters and setters for these properties.<li type="i">Edit <samp>TeamResource</samp> to add <samp>name</samp> and <samp>developers</samp> (array) properties,
- as shown in bold <a href="TeamResource.html">here</a>.
- </ol>
-<li>You need to think about filter support. For now, you can keep it simple: users can only create filters that list teams,
-by specifying a single string that is either a scalar or a generic team name. If scalar, one team will be shown when the filter is expanded.
-If generic, all teams matching the generic pattern will be listed. Given the simplicity, you will not need to create a filter string class to perform
-parsing. As a result, you have nothing to do for this step.</li>
-<li>Return to package <samp>samples.subsystems</samp>, and create class <b><samp>DeveloperSubSystem</samp></b>
-that extends <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html">SubSystem</A></samp>.
-Edit the generated class to add code highlighted <a href="DeveloperSubSystem.html">here</a>.</li>
-<li>Again in package <samp>samples.subsystems</samp>, create class <b><samp>DeveloperSubSystemConfiguration</samp></b>
-that extends <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystemConfiguration.html">SubSystemConfiguration</A></samp>.
-Edit the generated class to add code highlighted <a href="DeveloperSubSystemConfiguration.html">here</a>.
-</li>
-<li>In the project's root folder, find and edit file <samp>rseSamplesResources.properties</samp> and
-add the line highlighted <a href="rseSamplesResources3.html">here</a>.
-</li>
-<li>Update your <samp>plugin.xml</samp> file to include the following lines:
-<pre><samp>
- &lt;!-- ======================================= --&gt;
- &lt;!-- SubSystem Configuration --&gt;
- &lt;!-- ======================================= --&gt;
- &lt;extension point=&quot;org.eclipse.rse.ui.subsystemConfigurations&quot;&gt;
- &lt;configuration
- id=&quot;samples.subsystems.factory&quot;
- systemTypes=&quot;Linux;Unix;Windows&quot;
- name=&quot;Teams&quot;
- class=&quot;samples.subsystems.DeveloperSubSystemConfiguration&quot;
- category=&quot;users&quot;
- vendor=&quot;ACME&quot;
- &gt;
- &lt;/configuration&gt;
- &lt;/extension&gt;
-</samp></pre>
-<b>Note:</b> You would normal use the <samp>icon</samp> and <samp>iconlive</samp> attributes to specify
-a unique icon for your subsystem, but to keep it simple here, just use the default icon.
-</li>
-</ol>
- <p>Now you are far enough along that you can try our what you have, before proceeding. Select
-<b>Run-&gt;Run As-&gt;Run-time workbench</b>. Create a new Linux connection in the RSE, and
-expand it. You'll now see your <A href="runIt1.gif">new subsystem</A>, which you can expand
-to see its default filter, which in turn you can expand to see your hardcoded list of teams:<br>
-<IMG border="0" src="runIt1.gif" width="800" height="514">
-<br>
-You will be prompted for a user ID and password, but since the system class does not really
-connect, enter anything you like!
-<p>Eventually, you will be able to expand a team to see its developers.</p>
-<p>Now it is time to work on the appearance and functions of those remote resources. You will do this
-by creating adapters for the resources:</p>
-<ol start="10">
- <li>Select the <samp>samples.model</samp> package, and:
- <ol>
- <li type="i">Create a new class named <samp>TeamResourceAdapter</samp> that extends <a href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html"><samp>AbstractSystemViewAdapter</samp></A> and implements
- <a href="../../reference/api/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.html"><samp>ISystemRemoteElementAdapter</samp></A>.
- Edit the generated class and add the code highlighted <a href="TeamResourceAdapter.html"><b>here</b></a>.
- </li>
- <li type="i">Create a new class named <b><samp>DeveloperResourceAdapter</samp></b>
- that extends <a href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html"><samp>AbstractSystemViewAdapter</samp></a> and implements
- <a href="../../reference/api/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.html"><samp>ISystemRemoteElementAdapter</samp></A>.
- Edit the generated class and add the code highlighted <a href="DeveloperResourceAdapter.html"><b>here</b></a>.
- </li>
- <li type="i">Next, you need the icons for your remote resources, which you referred to in your adapters. Edit the <samp>RSESamplesPlugin</samp> file and edit the <samp>initializeImageRegistry</samp>
- to add the lines of code highlighted <a href="InitializeImageRegistry.html"><b>here</b></a>. Now, you need the icons. Select the <samp>RSESamplesPlugin</samp> project, right-click and select <b>New-&gt;Folder</b> and create a folder named <b>icons</b>. Select the new folder, and use <b>File-&gt;Import</b> to
- import the <samp>team.gif</samp> and <samp>developer.gif</samp> files from the <samp>org.eclipse.rse.examples.tutorial/icons</samp> folder.</li>
- </ol>
- </li>
- <li>Creating the adapters does nothing until you register them with the platform. To do that, you need
- an adapter factory class and you need to register it with the platform:
- <ol>
- <li type="i">Select the <samp>samples.model</samp> package and in it create a class named
- <b>DeveloperAdapterFactory</b> that extends <samp><a href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.html">AbstractSystemRemoteAdapterFactory</a></samp>
- and implements interface <samp><b>org.eclipse.core.runtime.IAdapterFactory</b></samp>.
- Edit the generate class as per the highlighted code <a href="DeveloperAdapterFactory.html"><b>here</b></a>.
- </li>
- <li type="i">Back in the <samp>RSESamplesPlugin</samp> class, add the highlighted code
- <b><a href="startup.html">here</a></b> to your <samp>startup</samp> method.
- </li>
- </ol>
-</li>
-</ol>
-
-<p>Once again, run the workbench to see your new subsystem:<br>
-<IMG border="0" src="runIt2.gif" width="886" height="594"><br>
-It is looking better now! There are icons and labels, and the team resources are expandable. Try the following things with
-your new subsystem resources:</p>
-<ul>
-<li>Right-click on <samp>Team 1</samp> and select the <a href="renameAction.gif">rename action</A>. The rename action is enabled because you
-overwrote <a href="TeamResourceAdapter.html#canRename">canRename</a> in the team resource adapter class. Try renaming it to a name already in use.
-The <a href="renameDialog.gif">rename dialog</a> can catch this error because we returned the list of names in use in
-the <a href="TeamResourceAdapter.html#getNames">getRemoteParentNamesInUse</a>
-method in our team resource adapter class. Rename to a new name. The rename in fact happens because we implemented
-the <a href="TeamResourceAdapter.html#doRename">doRename</a> method.
-<li>The default filter <samp>All teams</samp> exists because we wrote code to create it in our <a href="DeveloperSubSystemConfiguration.html#createDefaultFilterPool">createDefaultFilterPool</a> method of our subsystem configuration. Try creating a new filter: right-click on <samp>Teams</samp> subsystem and select
-<a href="newFilterAction.gif">New-&gt;Filter</a> to get the
-<a href="NewFilterWizard.gif">New Filter wizard</a>. Enter <samp>*2</samp>, press <b>Next</b>, and
-enter <samp>Test filter</samp> for the filter name. Press <b>Finish</b>
-to create the filter. Expand it, and you will see that only teams whose name ends with "2" are shown:<br>
-<IMG border="0" src="testFilter.gif">
-<br>
-Filter support is free in the RSE,
-but you do have to write our own code to apply that filter pattern as you see fit. In this case, we did this in our
-<a href="DeveloperSubSystem.html#resolveFilterString">internalResolveFilterString</a> method of our subsystem.<li>Notice how a resource like team can display multiple times, by different filters that resolve to it.
-Rename <samp>Team 2</samp> shown under the new expanded <samp>Test filter</samp>, and notice how it is successfully
-renamed under both filters. This ability to refresh the name in all occurrences of the same resource is made
-possible by the adapter methods <a href="TeamResourceAdapter.html#getAbsoluteName">getAbsoluteName</a>, which helps
-RSE find redundant copies of the same object, and <a href="TeamResourceAdapter.html#refreshRemoteObject">refreshRemoteObject</a>,
-which the RSE calls, on each redundant copy, on a rename operation.
-<IMG border="0" src="testRename.gif"></ul>
-<p><em>Note:</em> For your reference here is some information on how to further
-evolve the functions via your adapter, should you want to:</p>
-<ul>
-<li>To not show the rename and delete actions at all, or to enable them,
-override appropriate methods in the adapter class. For details see the methods
-<A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#showRename(java.lang.Object)">showRename</A>,
-<A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#showDelete(java.lang.Object)">showDelete</A>,
-<A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#doRename(org.eclipse.swt.widgets.Shell, java.lang.Object, java.lang.String)">doRename</A>
- and
-<A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#doDelete(org.eclipse.swt.widgets.Shell, java.lang.Object)">doDelete</A> in the parent
-<samp><A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html">AbstractSystemViewAdapter</A></samp> class.
-<li>To supply your own validator for syntax checking of new names on the rename dialogs,
-override <A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#getNameValidator(java.lang.Object)">getNameValidator</A>.
-<li>To add additional actions to the pop-up menus, implement the <A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#addActions(org.eclipse.rse.ui.SystemMenuManager, org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)">addActions</a>
-method in your adapter class.
-<li>To support dragging and dropping, override the
-<A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#canDrag(java.lang.Object)">canDrag</a> and
-<A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#canDrop(java.lang.Object)">canDrop</a> parent methods in your adapter class.
-<li>To add additional properties to the property sheet, implement the
-<A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#internalGetPropertyDescriptors()">internalGetPropertyDescriptors</a> and
-<A href="../../reference/api/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.html#internalGetPropertyValue()">internalGetPropertyValue</a> methods
-in your adapter class.
-<li>To add property pages to your remote objects (the Properties popup menu item will then appear) use
-the RSE <A href="../plugin/propertypage.html">propertyPages</a> extension point.
-</ul>
-<p>Now you will continue with the tutorial by enhancing the running example to supply its own actions for creating and changing
-filters. You will support two types of filters in our subsystems: team filters and developer filters. You have seen team filter already,
-but developer filters will be new. They will contain a team name and a developer name-pattern, and when expanded, they will list all the
-matching developers in the given team. The filter string syntax for developer filters will be "team-name/developer-generic-name". Because
-you have more than one type of filter, our filter wizards will set the type attribute for the filters, so the change action will know
-which dialog to present to the user. This will also allow you to have different icons for each filter.
-<ol start="11">
- <li>Follow these steps to enable support for our own filter-support:
- <ol>
- <li type="i">First, create the new GUI pane for your developer filter prompts. Select the <samp>samples.subsystems</samp>
- package and in it create a new class named <samp><b>DeveloperFilterStringEditPane</b></samp> that extends the
- class <samp><b>SystemFilterStringEditPane</b></samp> in package <samp>org.eclipse.rse.ui.filters</samp>.
- Edit the new class, adding the code highlighted <a href="DeveloperFilterStringEditPane.html">here</a>.
- </li>
-
- <li type="i">Edit the <samp>DeveloperSubSystemConfiguration</samp> class, and add the code highlighted
- <a href="DeveloperSubSystemConfiguration2.html">here</a>.
- </li>
-
- <li type="i">Next, you need the unique icons for your own filters, which you referred to in your subsystem factory. Edit the <samp>RSESamplesPlugin</samp> file and edit the <samp>initializeImageRegistry</samp>
- to add the lines of code highlighted <a href="InitializeImageRegistry2.html">here</a>. Now you need these icons.
- Select the folder named <b>icons</b> and use <b>File-&gt;Import</b> to
- import the <samp>teamFilter.gif</samp> and <samp>developerFilter.gif</samp> files from the
- <samp>org.eclipse.rse.examples.tutorial\icons</samp> folder.</li>
-
- <li type="i">Now you need to edit your subsystem so it will parse the two types of filters you now
- have. Edit <samp>DeveloperSubSystem</samp> and edit it as highlighted <a href="DeveloperSubSystem2.html#resolve">here</a>.
- </li>
-
- <li type="i">In the project's root folder, find and edit file <samp>rseSamplesResources.properties</samp> and
- add the line highlighted <a href="rseSamplesResources4.html">here</a>.
- </li>
-
- <li type="i">Now you can run again. Right click on the <samp>Teams</samp> subsystem, to see the new actions for
- creating filters:<br>
- <IMG border="0" src="NewFilterActions.gif">
- <IMG border="0" src="TeamFilterWizard.gif"><br><br>
- <IMG border="0" src="DeveloperFilterWizard.gif"><br><br>
-
- Create a team filter and a developer filter, and notice the new icons:<br>
- <IMG border="0" src="NewFilterIcons.gif"><br><br>
-
- Now right-click on a team filter and select Change, and then do the same for a developer filter:<br>
- <IMG border="0" src="TeamFilterDialog.gif">
- <IMG border="0" src="DeveloperFilterDialog.gif"><br>
- </li>
-
- </ol>
- </li>
-</ol>
-
-
-<br><br><br>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/testFilter.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/testFilter.gif
deleted file mode 100755
index 38008bb54..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/testFilter.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/testRename.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/testRename.gif
deleted file mode 100755
index 8c1f64b2c..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/testRename.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorials.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorials.html
deleted file mode 100755
index fe3fb0ce2..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorials.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<title>Tutorials</title>
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Tutorials</h1>
-<p>This section walks through the tutorials that demonstrate how to use the RSE <a href="Extensions.html">extension points</a> to
-extend the RSE:
-<ul>
-<li><a href="tutorial/popup.html">Creating a remote resource pop-up menu action</a> using the <a href="plugin/popup.html">org.eclipse.rse.core.popupMenus</a> extension point.
-<li><a href="tutorial/propertypage.html">Creating a remote resource property page</a> using the <a href="plugin/propertypage.html">org.eclipse.rse.core.propertyPages</a> extension point.
-<li><a href="tutorial/subsystem.html">Creating a subsystem configuration</a> for working with remote resources, using the <a href="plugin/subsystem.html">org.eclipse.rse.core.subsystemConfigurations</a> extension point.
-</ul>
-<p>The source code for all tutorials is available in the RSE-examples package, which
-can be obtained from the DSDP <a href="http://download.eclipse.org/dsdp/tm/downloads">
-Target Management download site</a> or directly from the RSE <b>Update Site</b>. In fact,
-the simplest way to get the examples is to choose <I>Help &gt; Software Updates &gt;
-Find and Install</I> from the Workbench, get the Examples installed, and then choose
-<I>File &gt; Import... &gt; Plug-in development &gt; Plug-ins and Fragments</I>.
-Choose the <tt>org.eclipse.rse.examples.tutorial</tt> plug-in and import it with
-source folders.</p>
-<p>In addition to providing the ready-made code, the tutorial also shows you
-how to actally create the Eclipse plug-in project (Please bear with us if the
-instructions do not 100% match the latest code due to recent refactorings).
-The tutorial starts out by showing
-you how to <A href="tutorial/pdeProject.html">create an Eclipse plug-in
-project</A>, using the Plug-in Development Environment. While any Eclipse plug-in
-project will do, there are benefits to using the RSE-supplied <A
- href="api/plugin/uiPluginAPI.html">base class</A> for your project, and other RSE-supplied
-infrastructure such as<A href="api/messages/uiMessageAPI.html"> messages</A>, and the many other user interface base classes and re-usable <A
- href="api/uiAPI.html">user interface classes</A> supplied by
-the RSE core plug-in project. The tutorial step for creating a plug-in project sets up your project for using these.
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/usingAPIs.html b/rse/doc/org.eclipse.rse.doc.isv/guide/usingAPIs.html
deleted file mode 100755
index 9a6eb8600..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/usingAPIs.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<title>Using the Remote System Explorer API</title>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Using the Remote System Explorer API</h1>
-<p>In addition to all the programming API provided by Eclipse, the Remote System Explorer itself
-comes with numerous classes and interfaces that may be of value to programmers extending the RSE.
-Typically, these are used in conjunction with the <a href="Extensions.html">extension points</a>
-defined by the RSE.
-<p>
-The API set supplied by the RSE can be roughly partitioned into three areas:
-<ol>
-<li><a href="api/uiAPI.html">User interface</a> support, to make it easier to author plug-ins that extend or use the RSE.
-<li><a href="api/resourceAPI.html">Remote resources</a> support, to enable access to remote resources via predefined subsystems.
-<li><a href="api/modelAPI.html">Model</a> support, to enable traversal of the RSE model, to access connections, subsystem factories, subsystems, filters, and so on.
-</ol>
-</p>
-<p>
-This guide will introduce the capabilities of the API, leaving the programming details to the
-reference section.</p>
-
-<h2>Provisional API</h2>
-<table>
-<!--
-<table bgcolor="yellow" border="1">
-<tr><th><b>API Status</b></th></tr>
--->
-<tr><td>
-<p>Although RSE API has been reviewed and proven useful in earlier proprietary
-versions, we want to give the Open Source Communitiy a chance to provide public
-feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of RSE 1.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after RSE 1.0
-in a not backward compatible way. All such API changes will be voted on
-by committers on the <a href="http://dev.eclipse.org/mailman/listinfo/dsdp-tm-dev">
-dsdp-tm-dev</a> developer mailing list, and documented in a migration guide
-for future releases. We expect that with Community Feedback, we'll reach a
-stable, hardened API for RSE 2.0. Please give your feedback on
-<a href="https://bugs.eclipse.org/bugs/">Eclipse Bugzilla</a>
-under category DSDP, Product Target Management.</p>
-</td></tr></table>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/view_RS.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/view_RS.gif
deleted file mode 100755
index 8ee06ea76..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/view_RS.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/view_pulldown.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/view_pulldown.gif
deleted file mode 100755
index 5b8aa81c0..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/view_pulldown.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/icons/developer.gif b/rse/doc/org.eclipse.rse.doc.isv/icons/developer.gif
deleted file mode 100755
index 9dae955d0..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/icons/developer.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/icons/developerFilter.gif b/rse/doc/org.eclipse.rse.doc.isv/icons/developerFilter.gif
deleted file mode 100755
index aaf308445..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/icons/developerFilter.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/icons/team.gif b/rse/doc/org.eclipse.rse.doc.isv/icons/team.gif
deleted file mode 100755
index 510a75377..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/icons/team.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/icons/teamFilter.gif b/rse/doc/org.eclipse.rse.doc.isv/icons/teamFilter.gif
deleted file mode 100755
index a8091af8f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/icons/teamFilter.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/notices.html b/rse/doc/org.eclipse.rse.doc.isv/notices.html
deleted file mode 100755
index 6c70b9c62..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/notices.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="STYLESHEET" HREF="book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-<p>
-The material in this guide is Copyright (c) IBM Corporation and others 2000, 2006.
-</p>
-<p>
-<a href="about.html">Terms and conditions regarding the use of this guide.</a>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/options.txt b/rse/doc/org.eclipse.rse.doc.isv/options.txt
deleted file mode 100755
index 0b7b26b2e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/options.txt
+++ /dev/null
@@ -1,191 +0,0 @@
--quiet
--encoding "iso-8859-1"
--charset "iso-8859-1"
--sourcepath "../org.eclipse.rse.connectorservice.dstore/src
-;../org.eclipse.rse.connectorservice.local/src
-;../org.eclipse.rse.connectorservice.ssh/src
-;../org.eclipse.rse.core/persistence
-;../org.eclipse.rse.core/src
-;../org.eclipse.rse.dstore.security/src
-;../org.eclipse.rse.eclipse.filesystem/src
-;../org.eclipse.rse.files.ui/src
-;../org.eclipse.rse.logging/src
-;../org.eclipse.rse.processes.ui/src
-;../org.eclipse.rse.services/src
-;../org.eclipse.rse.services/clientserver
-;../org.eclipse.rse.services.dstore/src
-;../org.eclipse.rse.services.dstore/miners
-;../org.eclipse.rse.services.files.ftp/src
-;../org.eclipse.rse.services.local/src
-;../org.eclipse.rse.services.ssh/src
-;../org.eclipse.rse.shells.ui/src
-;../org.eclipse.rse.subsystems.files.core/src
-;../org.eclipse.rse.subsystems.files.dstore/src
-;../org.eclipse.rse.subsystems.files.ftp/src
-;../org.eclipse.rse.subsystems.files.local/src
-;../org.eclipse.rse.subsystems.files.ssh/src
-;../org.eclipse.rse.subsystems.processes.core/src
-;../org.eclipse.rse.subsystems.processes.dstore/src
-;../org.eclipse.rse.subsystems.processes.local/src
-;../org.eclipse.rse.subsystems.shells.core/src
-;../org.eclipse.rse.subsystems.shells.dstore/src
-;../org.eclipse.rse.subsystems.shells.local/src
-;../org.eclipse.rse.subsystems.shells.ssh/src
-;../org.eclipse.rse.ui/filters
-;../org.eclipse.rse.ui/model
-;../org.eclipse.rse.ui/UI
-;../org.eclipse.rse.ui/subsystems
-;../org.eclipse.rse.ui/systems"
--d reference/api
--classpath @rt@
-;../org.eclipse.dstore.core/@dot
-;../org.eclipse.dstore.core/bin
-;../org.eclipse.dstore.extra/@dot
-;../org.eclipse.dstore.extra/bin
--breakiterator
--tag generated:X
--tag lastgen:X
--tag model:X
--tag ordered:X
--use
--splitIndex
--windowtitle "RSE API Specification"
--doctitle "RSE API Specification"
--header "<b>RSE</b><br>Release 1.0"
--bottom "Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved."
--group "RSE Core Plug-in Packages" "org.eclipse.rse.core;org.eclipse.rse.core.*"
--group "RSE UI Plug-in Packages" "org.eclipse.rse.ui;org.eclipse.rse.ui.*"
--link http://java.sun.com/j2se/1.5/docs/api
--linkoffline ./../../../org.eclipse.platform.doc.isv/reference/api @javadoc.link.location@/platform/reference/api/
--linkoffline ./../../../org.eclipse.dstore.doc.isv/reference/api ../org.eclipse.dstore.doc.isv/reference/api
--link http://bundles.osgi.org/javadoc/r4
-
-org.eclipse.rse.connectorservice.dstore
-org.eclipse.rse.connectorservice.dstore.util
-org.eclipse.rse.connectorservice.local
-org.eclipse.rse.connectorservice.ssh
-org.eclipse.rse.core
-org.eclipse.rse.core.comm
-org.eclipse.rse.core.filters
-org.eclipse.rse.core.model
-org.eclipse.rse.core.references
-org.eclipse.rse.core.servicesubsystem
-org.eclipse.rse.core.subsystems
-org.eclipse.rse.core.subsystems.util
-org.eclipse.rse.dstore.security
-org.eclipse.rse.dstore.security.preference
-org.eclipse.rse.dstore.security.util
-org.eclipse.rse.dstore.security.widgets
-org.eclipse.rse.dstore.security.wizards
-org.eclipse.rse.dstore.universal.miners
-org.eclipse.rse.dstore.universal.miners.command
-org.eclipse.rse.dstore.universal.miners.command.patterns
-org.eclipse.rse.dstore.universal.miners.environment
-org.eclipse.rse.dstore.universal.miners.filesystem
-org.eclipse.rse.dstore.universal.miners.processes
-org.eclipse.rse.eclipse.filesystem
-org.eclipse.rse.eclipse.filesystem.ui.actions
-org.eclipse.rse.files.ui
-org.eclipse.rse.files.ui.actions
-org.eclipse.rse.files.ui.compare
-org.eclipse.rse.files.ui.dialogs
-org.eclipse.rse.files.ui.propertypages
-org.eclipse.rse.files.ui.resources
-org.eclipse.rse.files.ui.search
-org.eclipse.rse.files.ui.view
-org.eclipse.rse.files.ui.widgets
-org.eclipse.rse.files.ui.wizards
-org.eclipse.rse.filters
-org.eclipse.rse.logging
-org.eclipse.rse.logging.performance
-org.eclipse.rse.logging.ui
-org.eclipse.rse.model
-org.eclipse.rse.persistence
-org.eclipse.rse.persistence.dom
-org.eclipse.rse.processes.ui
-org.eclipse.rse.processes.ui.actions
-org.eclipse.rse.processes.ui.dialogs
-org.eclipse.rse.processes.ui.propertypages
-org.eclipse.rse.processes.ui.view
-org.eclipse.rse.services
-org.eclipse.rse.services.clientserver
-org.eclipse.rse.services.clientserver.archiveutils
-org.eclipse.rse.services.clientserver.java
-org.eclipse.rse.services.clientserver.messages
-org.eclipse.rse.services.clientserver.processes
-org.eclipse.rse.services.clientserver.processes.handlers
-org.eclipse.rse.services.clientserver.search
-org.eclipse.rse.services.clientserver.util.tar
-org.eclipse.rse.services.dstore
-org.eclipse.rse.services.dstore.files
-org.eclipse.rse.services.dstore.processes
-org.eclipse.rse.services.dstore.rmtservice
-org.eclipse.rse.services.dstore.search
-org.eclipse.rse.services.dstore.shells
-org.eclipse.rse.services.dstore.util
-org.eclipse.rse.services.files
-org.eclipse.rse.services.files.ftp
-org.eclipse.rse.services.local
-org.eclipse.rse.services.local.files
-org.eclipse.rse.services.local.processes
-org.eclipse.rse.services.local.search
-org.eclipse.rse.services.local.shells
-org.eclipse.rse.services.processes
-org.eclipse.rse.services.search
-org.eclipse.rse.services.shells
-org.eclipse.rse.services.ssh
-org.eclipse.rse.services.ssh.files
-org.eclipse.rse.services.ssh.shell
-org.eclipse.rse.shells.ui
-org.eclipse.rse.shells.ui.actions
-org.eclipse.rse.shells.ui.propertypages
-org.eclipse.rse.shells.ui.view
-org.eclipse.rse.subsystems.files.core
-org.eclipse.rse.subsystems.files.core.model
-org.eclipse.rse.subsystems.files.core.servicesubsystem
-org.eclipse.rse.subsystems.files.core.subsystems
-org.eclipse.rse.subsystems.files.core.util
-org.eclipse.rse.subsystems.files.dstore
-org.eclipse.rse.subsystems.files.dstore.model
-org.eclipse.rse.subsystems.files.dstore.old
-org.eclipse.rse.subsystems.files.dstore.subsystem
-org.eclipse.rse.subsystems.files.ftp
-org.eclipse.rse.subsystems.files.ftp.connectorservice
-org.eclipse.rse.subsystems.files.ftp.model
-org.eclipse.rse.subsystems.files.local
-org.eclipse.rse.subsystems.files.local.model
-org.eclipse.rse.subsystems.files.ssh
-org.eclipse.rse.subsystems.processes.core
-org.eclipse.rse.subsystems.processes.core.subsystem
-org.eclipse.rse.subsystems.processes.core.subsystem.impl
-org.eclipse.rse.subsystems.processes.dstore
-org.eclipse.rse.subsystems.processes.local
-org.eclipse.rse.subsystems.processes.servicesubsystem
-org.eclipse.rse.subsystems.shells.core
-org.eclipse.rse.subsystems.shells.core.model
-org.eclipse.rse.subsystems.shells.core.subsystems
-org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem
-org.eclipse.rse.subsystems.shells.dstore
-org.eclipse.rse.subsystems.shells.dstore.model
-org.eclipse.rse.subsystems.shells.local
-org.eclipse.rse.subsystems.shells.local.model
-org.eclipse.rse.subsystems.shells.ssh
-org.eclipse.rse.ui
-org.eclipse.rse.ui.actions
-org.eclipse.rse.ui.dialogs
-org.eclipse.rse.ui.filters
-org.eclipse.rse.ui.filters.actions
-org.eclipse.rse.ui.filters.dialogs
-org.eclipse.rse.ui.messages
-org.eclipse.rse.ui.open
-org.eclipse.rse.ui.operations
-org.eclipse.rse.ui.propertypages
-org.eclipse.rse.ui.validators
-org.eclipse.rse.ui.view
-org.eclipse.rse.ui.view.monitor
-org.eclipse.rse.ui.view.scratchpad
-org.eclipse.rse.ui.view.search
-org.eclipse.rse.ui.view.team
-org.eclipse.rse.ui.widgets
-org.eclipse.rse.ui.widgets.services
-org.eclipse.rse.ui.wizards
diff --git a/rse/doc/org.eclipse.rse.doc.isv/plugin.properties b/rse/doc/org.eclipse.rse.doc.isv/plugin.properties
deleted file mode 100755
index 31afcd44f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=RSE Developer Guide
-providerName=Eclipse.org
diff --git a/rse/doc/org.eclipse.rse.doc.isv/plugin.xml b/rse/doc/org.eclipse.rse.doc.isv/plugin.xml
deleted file mode 100755
index 0f037481f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/plugin.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!-- ===================================================== -->
-<!-- Declare the documentation for the RSE ISV Guide -->
-<!-- We will declare only one infoset (book) -->
-<!-- ===================================================== -->
-
-<plugin>
-
-
-<!-- ============================================================================= -->
-<!-- Define primary TOC -->
-<!-- ============================================================================= -->
-
- <extension point="org.eclipse.help.toc">
- <toc file="toc.xml" primary="true" category="DSDP.TM"/>
- <index path="index/"/>
- </extension>
-
-<!-- ============================================================================= -->
-<!-- Define TOCs -->
-<!-- ============================================================================= -->
-
- <extension point="org.eclipse.help.toc">
- <toc file="topics_Guide.xml"/>
- <toc file="topics_Reference.xml"/>
- <toc file="topics_Questions.xml"/>
- <toc file="topics_Samples.xml"/>
- </extension>
-
-<!-- ============================================================================= -->
-<!-- Define Javadoc locations -->
-<!-- ============================================================================= -->
- <extension point="org.eclipse.pde.core.javadoc">
- <javadoc path="reference/api">
- <plugin id="org.eclipse.rse.core" />
- <plugin id="org.eclipse.rse.services" />
- <plugin id="org.eclipse.rse.ui" />
- </javadoc>
- </extension>
-
-</plugin>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/provisional_api.html b/rse/doc/org.eclipse.rse.doc.isv/provisional_api.html
deleted file mode 100644
index ea205b0f3..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/provisional_api.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<title>Remote System Explorer API Status</title>
-<meta name="copyright" content="Copyright (c) Wind River Systems, Inc. 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" HREF="book.css">
-</head>
-
-<body bgcolor="#ffffff">
-<h1>Remote System Explorer API Status</h1>
-<h2>Provisional API</h2>
-<div class="p">
-<p>Although RSE API has been reviewed and proven useful in earlier proprietary
-versions, we want to give the Open Source Communitiy a chance to provide public
-feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of RSE 1.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after RSE 1.0
-in a not backward compatible way. All such API changes will be voted on
-by committers on the <a href="http://dev.eclipse.org/mailman/listinfo/dsdp-tm-dev">
-dsdp-tm-dev</a> developer mailing list, and documented in a migration guide
-for future releases. We expect that with Community Feedback, we'll reach a
-stable, hardened API for RSE 2.0. Please give your feedback on
-<a href="https://bugs.eclipse.org/bugs/">Eclipse Bugzilla</a>
-under category DSDP, Product Target Management.</p>
-</div>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/questions/index.html b/rse/doc/org.eclipse.rse.doc.isv/questions/index.html
deleted file mode 100755
index 9596b5129..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/questions/index.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<meta name="Author" content="IBM">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>RSE Questions Index</title>
-</head>
-<body>
-<h1>RSE Questions Index</h1>
-<h2> RSE Services Layer</h2>
-<ul>
- <li><a href="../guide/rse_int_services.html">What is available in the RSE Services Layer
- API Packages?</a> </li>
-</ul>
-<h2> RSE Subsystems Layer</h2>
-<ul>
- <li><a href="../guide/rse_int_subsystems.html">What is available in the RSE Subsystems Layer
- API Packages?</a> </li>
-</ul>
-<h2> RSE Files</h2>
-<ul>
- <li><a href="../guide/rse_int_files.html">What is available in the RSE Files packages?</a>
- </li>
-</ul>
-<h2> RSE Shells</h2>
-<ul>
- <li><a href="../guide/rse_int_shells.html">What is available in the RSE Shells packages?</a>
- </li>
-</ul>
-<h2> RSE Processes</h2>
-<ul>
- <li><a href="../guide/rse_int_processes.html">What is available in the RSE Processes packages?</a>
- </li>
-</ul>
-
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/reference/.cvsignore b/rse/doc/org.eclipse.rse.doc.isv/reference/.cvsignore
deleted file mode 100644
index 9e5bfb42d..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/reference/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-api \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/.cvsignore b/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/.cvsignore
deleted file mode 100644
index 9c59eabff..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-org_eclipse_*.html
diff --git a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html b/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html
deleted file mode 100755
index 4686f958f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>RSE Extension Points</title>
-<link rel="stylesheet" type="text/css" HREF="../../book.css">
-</head>
-<body>
-<h1>RSE Extension Points</h1>
-<p>The following extension points can be used to extend the capabilities of the
- RSE infrastructure: </p>
-<ul>
- <li><a href="org_eclipse_rse_core_systemTypes.html">org.eclipse.rse.core.systemTypes</a></li>
- <li><a href="org_eclipse_rse_ui_archivehandlers.html">org.eclipse.rse.ui.archivehandlers</a></li>
- <!-- TODODeferred after RSE 1.0
- <li><a href="org_eclipse_rse_ui_compile.html">org.eclipse.rse.ui.compile</a></li>
- -->
- <li><a href="org_eclipse_rse_ui_dynamicPopupMenuExtensions.html">org.eclipse.rse.ui.dynamicPopupMenuExtensions</a></li>
- <li><a href="org_eclipse_rse_ui_keystoreProviders.html">org.eclipse.rse.ui.keystoreProviders</a></li>
- <li><a href="org_eclipse_rse_ui_mountPathMappers.html">org.eclipse.rse.ui.mountPathMappers</a></li>
- <li><a href="org_eclipse_rse_ui_newConnectionWizardDelegates.html">org.eclipse.rse.ui.newConnectionWizardDelegates</a></li>
- <li><a href="org_eclipse_rse_ui_persistenceProviders.html">org.eclipse.rse.ui.persistenceProviders</a></li>
- <li><a href="org_eclipse_rse_ui_popupMenus.html">org.eclipse.rse.ui.popupMenus</a></li>
- <li><a href="org_eclipse_rse_ui_propertyPages.html">org.eclipse.rse.ui.propertyPages</a></li>
- <li><a href="org_eclipse_rse_ui_remoteSystemsViewPreferencesActions.html">org.eclipse.rse.ui.remoteSystemsViewPreferencesActions</a></li>
- <li><a href="org_eclipse_rse_ui_subsystemConfigurations.html">org.eclipse.rse.ui.subsystemConfigurations</a></li>
-</ul>
-
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/reference/misc/index.html b/rse/doc/org.eclipse.rse.doc.isv/reference/misc/index.html
deleted file mode 100755
index 23f76241b..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/reference/misc/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<meta name="Author" content="IBM">
-<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
-<title>Other Reference Information</title>
-</head>
-<body>
-<h1>Other Reference Information</h1>
-<p>The following specifications, white papers, and design notes describe various
- aspects of the remote development tooling. </p>
-<ul>
- <li><a href="overview-rse.html">Map of Eclipse Remote System Explorer Plug-ins</a>
- </li>
-</ul>
-
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/reference/misc/overview-rse.html b/rse/doc/org.eclipse.rse.doc.isv/reference/misc/overview-rse.html
deleted file mode 100755
index 1cfe3cf77..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/reference/misc/overview-rse.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<meta name="Author" content="IBM">
-<title>RSE Overview - Map of RSE Plug-ins</title>
-<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
-</head>
-<body>
-<h1>RSE Overview - Map of RSE Plug-ins</h1>
-<p>The Remote System Explorer provides a comprehensive environment for managing remote resources and processes </p>
-<p>The Remote System Explorer tooling itself is divided up into a number of separate
- plug-ins. The following table shows which API packages are found in which plug-ins as of
-Eclipse 3.0. This table is useful
- for determining which plug-ins a given plug-in should include as prerequisites.
-</p>
-<table border="1" width="80%" align="center">
- <tbody>
- <tr>
- <td><b>API Package</b></td>
- <td><b>Required plug-in id</b></td>
- </tr>
- <tr>
- <td><tt>org.eclipse.rse.core[.*]</tt></td>
- <td><tt>org.eclipse.rse.core</tt></td>
- </tr>
- <tr>
- <td><tt>org.eclipse.rse.ui[.*]</tt></td>
- <td><tt>org.eclipse.rse.ui</tt></td>
- </tr>
- <tr>
- <td><tt>junit.*</tt></td>
- <td><tt>org.junit</tt></td>
- </tr>
- </tbody>
-</table>
-
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/reference/misc/runtime-options.html b/rse/doc/org.eclipse.rse.doc.isv/reference/misc/runtime-options.html
deleted file mode 100644
index 5c9baaa54..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/reference/misc/runtime-options.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
-<meta name="Author" content="IBM">
-<meta http-equiv="Content-Language" content="en-us">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link REL="STYLESHEET" HREF="../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
-<title>Remote System Explorer runtime options</title>
-</head>
-
-<body>
-
-<h1>Remote System Explorer runtime options</h1>
-<p>Version 1.0 - Last revised September 20, 2006</p>
-<p>The Remote System Explorer (RSE) is configurable through System properties. Many of these
-properties can be used to specify initial RSE settings.</p>
-
-<h2>System properties</h2>
-<p>The following System properties are used by RSE.</p>
-<p>Properties can be set in the following ways:</p>
-<ul>
- <li>use -DpropName=propValue as a VM argument to the Java VM</li>
- <li>set the desired property in the config.ini file in the appropriate configuration
- area</li>
-</ul>
-<dl>
- <dt><a name="showNewConnectionPrompt" id="showNewConnectionPrompt"></a>rse.showNewConnectionPrompt</dt>
- <dd>whether to show the New Connection prompt in RSE views by default. "True" or "false".</dd>
-
- <dt><a name="showLocalConnection" id="showLocalConnection"></a>rse.showLocalConnection</dt>
- <dd>whether to create and show a Local connection by default when RSE starts with a new worspace. "True" or "false".</dd>
-
- <dt><a name="enableSystemTypes" id="enableSystemTypes"></a>rse.enableSystemTypes</dt>
- <dd>a comma-separated list of system types to enable by default. This property can be used to limit the system types in RSE.</dd>
-
- <dt><a name="showProfilePage" id="showProfilePage"></a>rse.showProfilePage</dt>
- <dd>whether to show a New Profile wizard by default when creating a new connection for the first time. "True" or "false". If this is "false", a new profile with the hostname is created without asking the user.</dd>
-</dl>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.isv/samples/samples.html b/rse/doc/org.eclipse.rse.doc.isv/samples/samples.html
deleted file mode 100644
index 52193a151..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/samples/samples.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-
-<head>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" HREF="../book.css">
-<title>Installing The Examples</title>
-</head>
-
-<body>
-<h1>Installing The Examples
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/schema.css b/rse/doc/org.eclipse.rse.doc.isv/schema.css
deleted file mode 100755
index 4efbf2672..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/schema.css
+++ /dev/null
@@ -1,66 +0,0 @@
-H6.CaptionFigColumn#header {
- font-size:16px;
- display:inline
-}
-
-P.Note#copyright {
- font-size: smaller;
- font-style: normal;
- color: #336699;
- display:inline;
- margin-top: 3.000000pt;
- margin-bottom: 11.000000pt;
- margin-right: 0.000000pt;
- margin-left: 0.000000pt;
-}
-
-P.Code#dtd {
- color: #800000;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 10.000000pt;
-}
-
-P.Code#dtdAttlist {
- color: #800000;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 20.000000pt;
-}
-
-P.Code#tag {
- color: #000080;
- display:inline;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 0.000000pt;
-}
-
-P.Code#cstring {
- color: #008000;
- display:inline;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 0.000000pt;
-}
-
-.ConfigMarkup#elementDesc {
- color: black;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 10.000000pt;
-}
-
-.ConfigMarkup#attlistDesc {
- color: black;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 32.000000pt;
-}
-
diff --git a/rse/doc/org.eclipse.rse.doc.isv/toc.xml b/rse/doc/org.eclipse.rse.doc.isv/toc.xml
deleted file mode 100755
index fc514b73f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/toc.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<!-- ============================================================================= -->
-<!-- Define the top level topics -->
-<!-- ============================================================================= -->
-
-<toc label="RSE Developer Guide">
- <topic label="Guide" href="guide/rse_int.html">
- <link toc="topics_Guide.xml" />
- <anchor id="guide_additions"/>
- </topic>
- <topic label="Reference" href="provisional_api.html">
- <link toc="topics_Reference.xml" />
- <anchor id="reference_additions"/>
- </topic>
- <topic label="Questions Index" href="questions/index.html">
- <link toc="topics_Questions.xml" />
- <anchor id="questions_additions"/>
- </topic>
- <topic label="Legal" href="notices.html"/>
-</toc> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/topics_Guide.xml b/rse/doc/org.eclipse.rse.doc.isv/topics_Guide.xml
deleted file mode 100755
index 43c1fd314..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/topics_Guide.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<!-- ============================================================================= -->
-<!-- Define topics for the main guide -->
-<!-- ============================================================================= -->
-<toc label="Guide">
- <topic label="RSE Architecture" href="guide/rse_int_architecture.html">
- <topic label="Overview" href="guide/rse_int_overview.html"/>
- <topic label="Artifacts" href="guide/Artifacts.html"/>
- <topic label="Model" href="guide/Model.html"/>
- <topic label="Services" href="guide/rse_int_services.html"/>
- <topic label="Subsystems" href="guide/rse_int_subsystems.html"/>
- <topic label="Connector Services" href="guide/rse_int_connectorservices.html"/>
- <topic label="Hosts" href="guide/rse_int_hosts.html"/>
- <topic label="User Interface" href="guide/rse_int_ui.html"/>
- </topic>
- <topic label="Using the RSE API" href="guide/usingAPIs.html">
- <topic label="RSE User Interface API" href="guide/api/uiAPI.html" />
- <topic label="RSE Remote Resource API" href="guide/api/resourceAPI.html" />
- <topic label="RSE Model API" href="guide/api/modelAPI.html" />
- </topic>
- <!-- topic label="Plugging into the RSE" href="guide/plugin.html" -->
- <topic label="Plugging into the RSE" href="provisional_api.html">
- <topic label="Extensions" href="guide/Extensions.html"/>
- <topic label="Plugging in a Popup Menu" href="guide/plugin/popup.html" />
- <topic label="Plugging in a Property Page" href="guide/plugin/propertypage.html" />
- <topic label="Plugging in a System Type" href="guide/plugin/systemtype.html" />
- <topic label="Plugging in a Subsystem" href="guide/plugin/subsystem.html" />
- <topic label="Relevant Eclipse Extension Points" href="guide/plugin/other.html" />
- </topic>
- <topic label="Tutorials" href="guide/tutorials.html">
- <topic label="Creating a Remote Resource Property Page" href="guide/tutorial/propertypage.html" />
- <topic label="Creating a Subsystem Configuration" href="guide/tutorial/subsystem.html" />
- <topic label="Creating a Remote Resource Popup Menu Action" href="guide/tutorial/popup.html" />
- </topic>
-</toc> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/topics_Questions.xml b/rse/doc/org.eclipse.rse.doc.isv/topics_Questions.xml
deleted file mode 100755
index 62fe26b51..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/topics_Questions.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<!-- ============================================================================= -->
-<!-- Define topics for the questions index -->
-<!-- ============================================================================= -->
-<toc label="Questions">
-</toc> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml b/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml
deleted file mode 100755
index d4204c70a..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<!-- ============================================================================= -->
-<!-- Define topics for the references -->
-<!-- ============================================================================= -->
-<toc label="Reference">
-
- <topic label="Extension Points Reference" href="provisional_api.html">
- <topic label="org.eclipse.rse.core.systemTypes" href="reference/extension-points/org_eclipse_rse_core_systemTypes.html" />
- <topic label="org.eclipse.rse.ui.archivehandlers" href="reference/extension-points/org_eclipse_rse_ui_archivehandlers.html" />
- <!-- TODODeferred after RSE 1.0
- <topic label="org.eclipse.rse.ui.compile" href="reference/extension-points/org_eclipse_rse_ui_compile.html" />
- -->
- <topic label="org.eclipse.rse.ui.dynamicPopupMenuExtensions" href="reference/extension-points/org_eclipse_rse_ui_dynamicPopupMenuExtensions.html" />
- <topic label="org.eclipse.rse.ui.keystoreProviders" href="reference/extension-points/org_eclipse_rse_ui_keystoreProviders.html" />
- <topic label="org.eclipse.rse.ui.mountPathMappers" href="reference/extension-points/org_eclipse_rse_ui_mountPathMappers.html" />
- <topic label="org.eclipse.rse.ui.newConnectionWizardDelegates" href="reference/extension-points/org_eclipse_rse_ui_newConnectionWizardDelegates.html" />
- <topic label="org.eclipse.rse.ui.persistenceProviders" href="reference/extension-points/org_eclipse_rse_ui_persistenceProviders.html" />
- <topic label="org.eclipse.rse.ui.popupMenus" href="reference/extension-points/org_eclipse_rse_ui_popupMenus.html" />
- <topic label="org.eclipse.rse.ui.propertyPages" href="reference/extension-points/org_eclipse_rse_ui_propertyPages.html" />
- <topic label="org.eclipse.rse.ui.remoteSystemsViewPreferencesActions" href="reference/extension-points/org_eclipse_rse_ui_remoteSystemsViewPreferencesActions.html" />
- <topic label="org.eclipse.rse.ui.subsystemConfigurations" href="reference/extension-points/org_eclipse_rse_ui_subsystemConfigurations.html" />
- <anchor id="rse-extension-points-ref" />
- </topic>
-
- <topic label="Other reference information" href="provisional_api.html">
- <topic label="Runtime options" href="reference/misc/runtime-options.html" />
- </topic>
-
- <topic label="Remote Systems API Reference By Topic" href="provisional_api.html">
- <topic label="Core" href="provisional_api.html">
- <topic label="org.eclipse.rse.core" href="reference/api/org/eclipse/rse/core/package-summary.html" />
- <topic label="org.eclipse.rse.core.comm" href="reference/api/org/eclipse/rse/core/comm/package-summary.html" />
- <topic label="org.eclipse.rse.core.servicessubsystem" href="reference/api/org/eclipse/rse/core/servicessubsystem/package-summary.html" />
- <topic label="org.eclipse.rse.core.subsystems" href="reference/api/org/eclipse/rse/core/subsystems/package-summary.html" />
- <topic label="org.eclipse.rse.core.subsystems.util" href="reference/api/org/eclipse/rse/core/subsystems/util/package-summary.html" />
- </topic>
- <topic label="Logging" href="provisional_api.html">
- <topic label="org.eclipse.rse.logging" href="reference/api/org/eclipse/rse/logging/package-summary.html"/>
- <topic label="org.eclipse.rse.logging.ui" href="reference/api/org/eclipse/rse/logging/ui/package-summary.html"/>
- <topic label="org.eclipse.rse.logging.performance" href="reference/api/org/eclipse/rse/logging/performance/package-summary.html"/>
- </topic>
- <topic label="Model and Persistence" href="provisional_api.html">
- <topic label="org.eclipse.rse.core.model" href="reference/api/org/eclipse/rse/core/model/package-summary.html"/>
- <topic label="org.eclipse.rse.model" href="reference/api/org/eclipse/rse/model/package-summary.html"/>
- <topic label="org.eclipse.rse.core.filters" href="reference/api/org/eclipse/rse/core/filters/package-summary.html"/>
- <topic label="org.eclipse.rse.references" href="reference/api/org/eclipse/rse/references/package-summary.html"/>
- <topic label="org.eclipse.rse.persistence" href="reference/api/org/eclipse/rse/persistence/package-summary.html"/>
- <topic label="org.eclipse.rse.persistence.dom" href="reference/api/org/eclipse/rse/persistence/dom/package-summary.html"/>
- </topic>
- <topic label="Common Client and Server Helpers" href="provisional_api.html">
- <topic label="org.eclipse.rse.services.clientserver" href="reference/api/org/eclipse/rse/services/clientserver/package-summary.html"/>
- <topic label="org.eclipse.rse.services.clientserver.java" href="reference/api/org/eclipse/rse/services/clientserver/java/package-summary.html"/>
- <topic label="org.eclipse.rse.services.clientserver.messages" href="reference/api/org/eclipse/rse/services/clientserver/messages/package-summary.html"/>
- <topic label="org.eclipse.rse.services.clientserver.processes.handlers" href="reference/api/org/eclipse/rse/services/clientserver/processes/handlers/package-summary.html"/>
- <topic label="org.eclipse.rse.services.clientserver.processes" href="reference/api/org/eclipse/rse/services/clientserver/processes/package-summary.html"/>
- <topic label="org.eclipse.rse.services.clientserver.search" href="reference/api/org/eclipse/rse/services/clientserver/search/package-summary.html"/>
- <topic label="org.eclipse.rse.services.clientserver.archiveutils" href="reference/api/org/eclipse/rse/services/clientserver/archiveutils/package-summary.html"/>
- <topic label="org.eclipse.rse.services.clientserver.util.tar" href="reference/api/org/eclipse/rse/services/clientserver/util/tar/package-summary.html"/>
- </topic>
- <topic label="Basic Services Layer" href="provisional_api.html">
- <topic label="org.eclipse.rse.services" href="reference/api/org/eclipse/rse/services/package-summary.html"/>
- <topic label="org.eclipse.rse.services.files" href="reference/api/org/eclipse/rse/services/files/package-summary.html"/>
- <topic label="org.eclipse.rse.services.files.ftp" href="reference/api/org/eclipse/rse/services/files/ftp/package-summary.html"/>
- <topic label="org.eclipse.rse.services.processes" href="reference/api/org/eclipse/rse/services/processes/package-summary.html"/>
- <topic label="org.eclipse.rse.services.search" href="reference/api/org/eclipse/rse/services/search/package-summary.html"/>
- <topic label="org.eclipse.rse.services.shells" href="reference/api/org/eclipse/rse/services/shells/package-summary.html"/>
- </topic>
- <topic label="Services Implementations" href="provisional_api.html">
- <topic label="org.eclipse.rse.services.local" href="reference/api/org/eclipse/rse/services/local/package-summary.html"/>
- <topic label="org.eclipse.rse.services.local.files" href="reference/api/org/eclipse/rse/services/local/files/package-summary.html"/>
- <topic label="org.eclipse.rse.services.local.processes" href="reference/api/org/eclipse/rse/services/local/processes/package-summary.html"/>
- <topic label="org.eclipse.rse.services.local.shells" href="reference/api/org/eclipse/rse/services/local/shells/package-summary.html"/>
- <topic label="org.eclipse.rse.services.local.search" href="reference/api/org/eclipse/rse/services/local/search/package-summary.html"/>
- <topic label="org.eclipse.rse.services.dstore" href="reference/api/org/eclipse/rse/services/dstore/package-summary.html"/>
- <topic label="org.eclipse.rse.services.dstore.files" href="reference/api/org/eclipse/rse/services/dstore/files/package-summary.html"/>
- <topic label="org.eclipse.rse.services.dstore.processes" href="reference/api/org/eclipse/rse/services/dstore/processes/package-summary.html"/>
- <topic label="org.eclipse.rse.services.dstore.shells" href="reference/api/org/eclipse/rse/services/dstore/shells/package-summary.html"/>
- <topic label="org.eclipse.rse.services.dstore.rmtservice" href="reference/api/org/eclipse/rse/services/dstore/rmtservice/package-summary.html"/>
- <topic label="org.eclipse.rse.services.dstore.search" href="reference/api/org/eclipse/rse/services/dstore/search/package-summary.html"/>
- <topic label="org.eclipse.rse.services.dstore.util" href="reference/api/org/eclipse/rse/services/dstore/util/package-summary.html"/>
- <topic label="org.eclipse.rse.services.ssh" href="reference/api/org/eclipse/rse/services/ssh/package-summary.html"/>
- <topic label="org.eclipse.rse.services.ssh.files" href="reference/api/org/eclipse/rse/services/ssh/files/package-summary.html"/>
- <topic label="org.eclipse.rse.services.ssh.shell" href="reference/api/org/eclipse/rse/services/ssh/shell/package-summary.html"/>
- </topic>
- <topic label="DStore Security and Miners" href="provisional_api.html">
- <topic label="org.eclipse.rse.dstore.security" href="reference/api/org/eclipse/rse/dstore/security/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.security.preference" href="reference/api/org/eclipse/rse/dstore/security/preference/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.security.util" href="reference/api/org/eclipse/rse/dstore/security/util/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.security.widgets" href="reference/api/org/eclipse/rse/dstore/security/widgets/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.security.wizards" href="reference/api/org/eclipse/rse/dstore/security/wizards/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.universal.miners.command" href="reference/api/org/eclipse/rse/dstore/universal/miners/command/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.universal.miners.command.patterns" href="reference/api/org/eclipse/rse/dstore/universal/miners/command/patterns/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.universal.miners.environment" href="reference/api/org/eclipse/rse/dstore/universal/miners/environment/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.universal.miners.filesystem" href="reference/api/org/eclipse/rse/dstore/universal/miners/filesystem/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.universal.miners" href="reference/api/org/eclipse/rse/dstore/universal/miners/package-summary.html"/>
- <topic label="org.eclipse.rse.dstore.universal.miners.processes" href="reference/api/org/eclipse/rse/dstore/universal/miners/processes/package-summary.html"/>
- </topic>
- <topic label="Connector Service Implementations" href="provisional_api.html">
- <topic label="org.eclipse.rse.connectorservice.dstore" href="reference/api/org/eclipse/rse/connectorservice/dstore/package-summary.html"/>
- <topic label="org.eclipse.rse.connectorservice.dstore.util" href="reference/api/org/eclipse/rse/connectorservice/dstore/util/package-summary.html"/>
- <topic label="org.eclipse.rse.connectorservice.local" href="reference/api/org/eclipse/rse/connectorservice/local/package-summary.html"/>
- <topic label="org.eclipse.rse.connectorservice.ssh" href="reference/api/org/eclipse/rse/connectorservice/ssh/package-summary.html"/>
- </topic>
- <topic label="File Subsystem" href="provisional_api.html">
- <topic label="org.eclipse.rse.subsystems.files.core" href="reference/api/org/eclipse/rse/subsystems/files/core/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.core.model" href="reference/api/org/eclipse/rse/subsystems/files/core/model/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.core.servicesubsystem" href="reference/api/org/eclipse/rse/subsystems/files/core/servicesubsystem/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.core.subsystems" href="reference/api/org/eclipse/rse/subsystems/files/core/subsystems/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.core.util" href="reference/api/org/eclipse/rse/subsystems/files/core/util/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.dstore.model" href="reference/api/org/eclipse/rse/subsystems/files/dstore/model/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.dstore.old" href="reference/api/org/eclipse/rse/subsystems/files/dstore/old/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.dstore" href="reference/api/org/eclipse/rse/subsystems/files/dstore/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.dstore.subsystem" href="reference/api/org/eclipse/rse/subsystems/files/dstore/subsystem/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.ftp.connectorservice" href="reference/api/org/eclipse/rse/subsystems/files/ftp/connectorservice/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.ftp.model" href="reference/api/org/eclipse/rse/subsystems/files/ftp/model/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.ftp" href="reference/api/org/eclipse/rse/subsystems/files/ftp/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.local.model" href="reference/api/org/eclipse/rse/subsystems/files/local/model/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.local" href="reference/api/org/eclipse/rse/subsystems/files/local/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.files.ssh" href="reference/api/org/eclipse/rse/subsystems/files/ssh/package-summary.html"/>
- </topic>
- <topic label="Process Subsystem" href="provisional_api.html">
- <topic label="org.eclipse.rse.subsystems.processes.core" href="reference/api/org/eclipse/rse/subsystems/processes/core/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.processes.core.subsystem.impl" href="reference/api/org/eclipse/rse/subsystems/processes/core/subsystem/impl/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.processes.core.subsystem" href="reference/api/org/eclipse/rse/subsystems/processes/core/subsystem/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.processes.dstore" href="reference/api/org/eclipse/rse/subsystems/processes/dstore/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.processes.local" href="reference/api/org/eclipse/rse/subsystems/processes/local/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.processes.servicesubsystem" href="reference/api/org/eclipse/rse/subsystems/processes/servicesubsystem/package-summary.html"/>
- </topic>
- <topic label="Shell Subsystem" href="provisional_api.html">
- <topic label="org.eclipse.rse.subsystems.shells.core" href="reference/api/org/eclipse/rse/subsystems/shells/core/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.shells.core.model" href="reference/api/org/eclipse/rse/subsystems/shells/core/model/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.shells.core.subsystems" href="reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem" href="reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.shells.dstore.model" href="reference/api/org/eclipse/rse/subsystems/shells/dstore/model/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.shells.dstore" href="reference/api/org/eclipse/rse/subsystems/shells/dstore/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.shells.local.model" href="reference/api/org/eclipse/rse/subsystems/shells/local/model/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.shells.local" href="reference/api/org/eclipse/rse/subsystems/shells/local/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.shells.ssh" href="reference/api/org/eclipse/rse/subsystems/shells/ssh/package-summary.html"/>
- </topic>
- <topic label="User Interface" href="provisional_api.html">
- <topic label="org.eclipse.rse.ui" href="reference/api/org/eclipse/rse/ui/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.actions" href="reference/api/org/eclipse/rse/ui/actions/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.dialogs" href="reference/api/org/eclipse/rse/ui/dialogs/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.filters.actions" href="reference/api/org/eclipse/rse/ui/filters/actions/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.filters.dialogs" href="reference/api/org/eclipse/rse/ui/filters/dialogs/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.filters" href="reference/api/org/eclipse/rse/ui/filters/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.messages" href="reference/api/org/eclipse/rse/ui/messages/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.open" href="reference/api/org/eclipse/rse/ui/open/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.operations" href="reference/api/org/eclipse/rse/ui/operations/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.propertypages" href="reference/api/org/eclipse/rse/ui/propertypages/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.validators" href="reference/api/org/eclipse/rse/ui/validators/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.view.monitor" href="reference/api/org/eclipse/rse/ui/view/monitor/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.view" href="reference/api/org/eclipse/rse/ui/view/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.view.scratchpad" href="reference/api/org/eclipse/rse/ui/view/scratchpad/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.view.search" href="reference/api/org/eclipse/rse/ui/view/search/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.view.team" href="reference/api/org/eclipse/rse/ui/view/team/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.widgets" href="reference/api/org/eclipse/rse/ui/widgets/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.widgets.services" href="reference/api/org/eclipse/rse/ui/widgets/services/package-summary.html"/>
- <topic label="org.eclipse.rse.ui.wizards" href="reference/api/org/eclipse/rse/ui/wizards/package-summary.html"/>
- </topic>
- <topic label="File UI" href="provisional_api.html">
- <topic label="org.eclipse.rse.files.ui" href="reference/api/org/eclipse/rse/files/ui/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.actions" href="reference/api/org/eclipse/rse/files/ui/actions/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.compare" href="reference/api/org/eclipse/rse/files/ui/compare/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.dialogs" href="reference/api/org/eclipse/rse/files/ui/dialogs/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.propertypages" href="reference/api/org/eclipse/rse/files/ui/propertypages/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.resources" href="reference/api/org/eclipse/rse/files/ui/resources/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.search" href="reference/api/org/eclipse/rse/files/ui/search/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.view" href="reference/api/org/eclipse/rse/files/ui/view/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.widgets" href="reference/api/org/eclipse/rse/files/ui/widgets/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.wizards" href="reference/api/org/eclipse/rse/files/ui/wizards/package-summary.html"/>
- </topic>
- <topic label="Process UI" href="provisional_api.html">
- <topic label="org.eclipse.rse.processes.ui" href="reference/api/org/eclipse/rse/processes/ui/package-summary.html"/>
- <topic label="org.eclipse.rse.processes.ui.actions" href="reference/api/org/eclipse/rse/processes/ui/actions/package-summary.html"/>
- <topic label="org.eclipse.rse.processes.ui.dialogs" href="reference/api/org/eclipse/rse/processes/ui/dialogs/package-summary.html"/>
- <topic label="org.eclipse.rse.processes.ui.propertypages" href="reference/api/org/eclipse/rse/processes/ui/propertypages/package-summary.html"/>
- <topic label="org.eclipse.rse.processes.ui.view" href="reference/api/org/eclipse/rse/processes/ui/view/package-summary.html"/>
- </topic>
- <topic label="Shell UI" href="provisional_api.html">
- <topic label="org.eclipse.rse.shells.ui" href="reference/api/org/eclipse/rse/shells/ui/package-summary.html"/>
- <topic label="org.eclipse.rse.shells.ui.actions" href="reference/api/org/eclipse/rse/shells/ui/actions/package-summary.html"/>
- <topic label="org.eclipse.rse.shells.ui.propertypages" href="reference/api/org/eclipse/rse/shells/ui/propertypages/package-summary.html"/>
- <topic label="org.eclipse.rse.shells.ui.view" href="reference/api/org/eclipse/rse/shells/ui/view/package-summary.html"/>
- </topic>
- </topic>
- <topic label="Remote Systems API Reference All Packages" href="reference/api/overview-summary.html">
- </topic>
-</toc> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.isv/topics_Samples.xml b/rse/doc/org.eclipse.rse.doc.isv/topics_Samples.xml
deleted file mode 100755
index 7d833dae9..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/topics_Samples.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<!-- ============================================================================= -->
-<!-- Define topics for the samples -->
-<!-- ============================================================================= -->
-<toc label="Examples" >
- <topic label="Installing the Examples" href="samples/samples.html" />
- <anchor id="examples"/>
-</toc> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/.project b/rse/doc/org.eclipse.rse.doc.user/.project
deleted file mode 100755
index 21a245ce6..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.doc.user</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/doc/org.eclipse.rse.doc.user/META-INF/MANIFEST.MF b/rse/doc/org.eclipse.rse.doc.user/META-INF/MANIFEST.MF
deleted file mode 100755
index 5c26bac3d..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,8 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.doc.user; singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Eclipse-LazyStart: false
diff --git a/rse/doc/org.eclipse.rse.doc.user/about.html b/rse/doc/org.eclipse.rse.doc.user/about.html
deleted file mode 100755
index 460233046..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/book.css b/rse/doc/org.eclipse.rse.doc.user/book.css
deleted file mode 100755
index 157414c6c..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/book.css
+++ /dev/null
@@ -1 +0,0 @@
-@import "../PRODUCT_PLUGIN/book.css";
diff --git a/rse/doc/org.eclipse.rse.doc.user/build.properties b/rse/doc/org.eclipse.rse.doc.user/build.properties
deleted file mode 100755
index b362f9bc4..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/build.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Add Getting Started Guide
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- about.html,\
- concepts/,\
- images/,\
- plugin.properties,\
- ref/,\
- tasks/,\
- book.css,\
- notices.html,\
- toc.xml,\
- gettingstarted/
- \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/concepts/cbegin.html b/rse/doc/org.eclipse.rse.doc.user/concepts/cbegin.html
deleted file mode 100755
index d47ca9247..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cbegin.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Remote System Explorer Connections</title>
-</head>
-<body id="cbegin">
-<a name="cbegin"><!-- --></a>
-<h1 class="topictitle1">Remote System Explorer Connections</h1>
-<div>
-<p>When you first open the Remote System Explorer, you are not
-connected to
-any system except your local workstation. To connect to a remote
-server,
-you need to define a connection. A connection is a TCP/IP network
-connection
-to your server, that enables you to access, edit, run, compile, and
-debug items on the server. When you define a connection, you select the
-type of connection you want, specify the
-name or IP address of the remote system and you also give the
-connection itself
-a unique name that acts as a label in your workspace so that you can
-easily
-connect and disconnect. These actions are performed in the Remote
-System Explorer. </p>
-<p>When you open the workbench for the first time, you
-need to define a profile,
-define a connection, and then connect to a server. When you connect,
-the workbench prompts you for your user ID and password on that server
-so
-that you can access the folders and files on that server.</p>
-<p>Note: Make sure you have started the server programs on your
-remote system. These programs depend on the kind of system you
-are connecting to. See the appropriate tasks below for the recommended
-ways to configure and start your server.</p>
-<p>When you have a connection, you can organize your data using <a
- href="cfilters.html">filters,
-filter pools, and filter pool references</a>, which list a set of
-folders and files from your server in the Remote Systems view. </p>
-<p>You can use the Remote System Explorer to access files on many
-kinds
-of servers, such as Linux, UNIX, Windows, or your local workstation. If
-you have the appropriate IBM products installed you can also connect to
-iSeries and zSeries servers.&nbsp; See the
-links below for information on how to connect to these other kinds of
-servers.</p>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="cfilters.html" title="">Remote System Explorer filters, filter
-pools, and filter pool references</a><br/>
-<a href="cprofile.html" title="">Remote System Explorer Profiles</a><br/>
-<a href="cuniversal.html">Universal Systems</a><br/>
-</p>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="../tasks/tbeginlinux.html" title="">Connecting to a remote
-Linux or UNIX server</a><br/>
-<a href="../tasks/tbeginwindows.html" title="">Connecting to a remote
-Windows server</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/concepts/cfilters.html b/rse/doc/org.eclipse.rse.doc.user/concepts/cfilters.html
deleted file mode 100755
index c8197d730..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cfilters.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Remote System Explorer filters, filter pools, and filter pool references</title>
-</head>
-
-<body id="cfilters">
-<a name="cfilters"><!-- --></a>
-<h1 class="topictitle1">Remote System Explorer filters, filter pools,
-and filter pool references</h1>
-<div>
-<p>The Remote System Explorer is a set of local client tools you use to
-organize
-how you want to work with the resources such as folders and files on
-your
-remote server. The following graphic serves as an introduction to
-some of the main components of the Remote System Explorer:<br/>
-<img src="../images/ModelRSE.gif" alt=""/><br/>
-</p>
-<div class="p">In the Remote System Explorer perspective, you query
-your server
-to list and perform actions upon remote resources such as folders and
-files. You perform
-these tasks on these remote resources by using <i>filters</i> that
-show these resources at your workstation.<br/>
-</div>
-<p>The Remote System Explorer perspective is designed to allow you to
-manipulate the resources directly on the remote system.&nbsp; The
-actions that are available depend on the type of system you are
-connecting to and the way the resource is recognized.&nbsp; For
-example, your selections can define
-a filter string to find all files that match *.c in a particular
-directory. </p>
-<div class="p">When you access the list by expanding the filter, you
-can see all the files that match that filter and you can perform
-actions (such as editing, compiling, running, and debugging) against
-these files.
-<div class="note"><span class="notetitle">Note: </span>You can drag
-and drop filters from one subsystem or filter
-pool to another. However, if you drag a filter into another filter, the
-filter strings from the source filter are added to the ones already in
-the target
-filter.</div>
-</div>
-<p id="cfilters__poolsdesc"><a name="cfilters__poolsdesc"><!-- --></a>If
-you have been using the Remote System Explorer for some
-time, your workspace might contain too many filters to navigate easily.
-Or,
-you might just want to keep groups of filters separate if, for example,
-you
-need to represent two distinct environments in the Remote System
-Explorer,
-regardless of how many filters you have. In either case, you can group
-filters
-into <i>filter pools</i>. </p>
-<p>For example, one filter pool could contain filters for an accounts
-receivable
-program while another contains filters for a payroll program. Or, if
-you
-have two different environments on your server: a production
-environment and a test environment, you can define a distinct
-environment and set of filters for each. </p>
-<p id="cfilters__poolsdesc2"><a name="cfilters__poolsdesc2"><!-- --></a>Without
-filter pools, all of your filters appear together
-in all connections. When you create filter pools, however, any filter
-you
-create within that filter pool is distinct to that connection, and will
-not
-appear in any other connections. (See the related links for more
-information
-about filter pools.)</p>
-<p id="cfilters__filterstrings"><a name="cfilters__filterstrings"><!-- --></a>You
-can share filter pools among many connections through
-the use of a <i>filter pool reference</i>. A filter pool reference is
-a mechanism
-that displays a filter pool from one connection in any other
-connection, so
-that when you make a change to the original filter pool, your change is
-reflected
-your filter pool reference.</p>
-<p>All connections, filters, filter pools, and so on, belong to a
-Remote System Explorer <i>profile</i>, that you define during your
-first connection
-to a server. You might wonder what happens to your filters or filter
-pools if you delete a connection, especially if you have filters shared
-among
-two or more connections. Rest assured that the filters are not deleted,
-since
-filters actually belong to profiles, and not connections.<br/>
-</p>
-<p>Keep in mind that if you need to have an entirely new configuration
-of filter pools, filters and connection in the Remote System Explorer,
-you can always create a new profile. See
-the related links for more information.</p>
-</div>
-<div>
-<!-- TODODeferred
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="cuseractions.html" title="">User actions (user options)</a><br/>
-<a href="cremcompile.html" title="">Compiling</a><br/>
-</p>
--->
-<p><b>Related Tasks</b><br/>
-<a href="../tasks/tmanagepools.html" title="">Configuring filter pools</a><br/>
-<a href="../tasks/tmanageedit.html"
- title="You can change the properties for any filter by opening the filter's properties sheet. You can also add new filter strings to a filter from this sheet. For example, if you have a filter that lists all *.rpgle source members, you can add an additional filter string that will display all *.cblle source members as well.">Changing
-filters</a><br/>
-<a href="../tasks/tmanagedel.html" title="">Deleting filters</a><br/>
-<a href="../tasks/tbeginsecprofile.html" title="">Creating a second
-profile</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/concepts/cprofile.html b/rse/doc/org.eclipse.rse.doc.user/concepts/cprofile.html
deleted file mode 100755
index 699abb1e0..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cprofile.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Remote System Explorer Profiles</title>
-</head>
-<body id="cprofile">
-<a name="cprofile"><!-- --></a>
-<h1 class="topictitle1">Remote System Explorer Profiles</h1>
-<div>
-<p>When you define your first connection to your remote server, you
-will also define
-your first profile. All Remote System Explorer resources such as
-connections,
-filters, and filter pools are owned by a profile. Profiles help you
-manage these resources when you have a lot of connections. The Remote
-System Explorer creates
-a unique profile per team member (that person's <span
- style="font-style: italic;">private profile</span>), plus a common
-profile called <i>Team</i>.
-You can also create your own profiles. </p>
-<div class="p">Profiles contain:
-<ul>
- <li>Connections -- including subsystem properties. User IDs and
-passwords are not shared.</li>
- <li>Filters, filter pools, and filters pool references</li>
- <li>User-defined actions</li>
- <li>Compile commands</li>
-</ul>
-</div>
-<p>Profiles can be active, or inactive. By default, only your private
-profile
-and the Team profile are active. The Remote System Explorer displays
-all connections
-from all active profiles and, within a connection, allows filter pools
-to
-be referenced from any active profile. Further, the user actions and
-compile
-commands shown in the right-click menu for a remote resource are from
-all
-active profiles.</p>
-<p>Your first profile will be for your local workstation. When you
-complete
-the steps for your first connection, you can decide whether to use your
-personal
-profile or the Team profile so that you can share resources and
-information
-with other people.</p>
-<div class="p">Placing all connection and filter data in a profile
-shared by the team
-assists in team support, since all connections, filter pools, and team
-profiles
-can be shared among team members. You can use the Team view to control
-which
-profiles display in your workspace by making the profiles active.
-<div class="note"><span class="notetitle">Note: </span>Making
-a profile active or inactive does not affect your teammates. For
-example,
-you can choose not to display one of your own profiles in your
-workspace,
-but a teammate can make that profile active in his or her workspace.
-You will
-see the profiles you or your teammates have made inactive in the Team
-view when you perform a synchronization with the repository in which
-the profiles are stored.&nbsp; See topics in the help contents and
-links
-below about team support for more information on profiles and shared
-data.</div>
-</div>
-<p>To reduce collisions when you synchronize the user IDs and the
-ordering of
-resources in a profile are stored locally on your workstation. To
-participate
-in team support, you need to synchronize with, and upload your profiles
-to a central repository. Use the <a href="../tasks/tteamsup.html">Team
-view</a> to
-share source and profile information with other team members, and to
-synchronize
-that information with the repository. Everything except your user ID
-will
-then be stored on the server, and any developer can obtain profile
-resources
-from the central server. </p>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="cfilters.html" title="">Remote System Explorer filters, filter
-pools, and filter pool references</a><br/>
-<a href="cbegin.html" title="">Remote System Explorer Connections</a><br/>
-<a href="cteam.html" title="">Team support</a><br/>
-</p>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="../tasks/tteamsup.html" title="">Using team support</a><br/>
-<a href="../tasks/tteamsup1.html" title="">Working with profiles and
-team support</a><br/>
-<a href="../tasks/tbeginsecprofile.html" title="">Creating a second
-profile</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/concepts/cremcompile.html b/rse/doc/org.eclipse.rse.doc.user/concepts/cremcompile.html
deleted file mode 100755
index 8278d329e..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cremcompile.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Compiling</title>
-</head>
-
-<body id="cremcompile">
-<a name="cremcompile"><!-- --></a>
-<h1 class="topictitle1">Compiling Programs</h1>
-<div>
-<p>You can run a compile command on a server from the Remote System
-Explorer perspective.&nbsp; When you compile, the workbench determines
-the source type of the file, and then runs
-the last used compile command for that type. However, you can always
-change
-this behavior through Remote Systems preferences (see the related
-links).</p>
-<p>You can also compile multiple resources listed in a filter by
-holding down the CTRL key and clicking on all the members
-you want to compile, right-click to access the compile menu, and then
-select the compile command you wish to run. The workbench determines
-what order to compile these resources according to the preferences you
-specify for that workspace.</p>
-<div class="p">Note that multiple file compilation is disabled if:
-<ul>
- <li>One or more of the selected source types are not compatible.</li>
- <li>The selected resources are not from the same connection.</li>
-</ul>
-</div>
-<p>A compile command is always associated with a particular source
-type. It consists of an identifier and a command string that will be
-run on the
-server.&nbsp; Each profile in the Remote System Explorer has a set of
-source member types,
-and each source type has a set of compile commands associated with
-them. You
-can add source types to a profile and add compile commands to a source
-type.</p>
-<p>IBM supplies a number
-of default compile commands for common file types and you can also add
-your own.&nbsp; Since compile commands are owned by a profile they can
-be shared using team support.</p>
-<p>See the related topics below for more information.</p>
-</div>
-<div>
-<p><b class="reltaskshd">Related concepts</b><br/>
-<a href="cprofile.html"><span style="text-decoration: underline;">Profiles</span></a><br/>
-<a href="crunremcmds.html">Commands and Shells</a><br/>
-</p>
-<p><b class="relrefhd">Related reference</b><br/>
-<a href="../ref/rrsepref.html" title="">Preferences</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/concepts/crunremcmds.html b/rse/doc/org.eclipse.rse.doc.user/concepts/crunremcmds.html
deleted file mode 100755
index 93d7ab125..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/crunremcmds.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Shells and commands in the Remote Systems view</title>
-</head>
-
-<body id="crunremcmds">
-<a name="crunremcmds"><!-- --></a>
-<h1 class="topictitle1">Shells and commands in the Remote Systems view</h1>
-<div>
-<p>You can use the Remote Shell view to run and interact with commands
-and command shells on universal systems. A universal system includes Windows,
-Linux, and UNIX system types.<br/>
-</p>
-<p>Specifically, use the view to: </p>
-<ul>
- <li>Run commands in a command shell</li>
- <li>Display and interpret the output of a program</li>
- <li>Enter input to a program</li>
- <li>Display and manage different commands and shells from the same
-view. Multiple commands can be run in a single shell (one command at a time per
-shell), multiple shells may be run on a single system, and multiple systems may be
-running shells.</li>
-</ul>
-<p>Whenever a command shell is launched or a command is run from within
-Remote System Explorer, the Remote Shell view is used to display the output
-and provide a way to work with that output. </p>
-</div>
-<div>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="../tasks/truncmdsview.html" title="">Running and viewing commands using the Remote Shell view</a><br/>
-<a href="../tasks/twrkcmdshl.html" title="In the Remote Systems view, you can launch a shell to perform commands in the iSeries Integrated File System (IFS).">Working
-with command shells</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/concepts/cteam.html b/rse/doc/org.eclipse.rse.doc.user/concepts/cteam.html
deleted file mode 100755
index 06fc46578..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cteam.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Team support</title>
-</head>
-<body id="cteam">
-<a name="cteam"><!-- --></a>
-<h1 class="topictitle1">Team support</h1>
-<div>
-<p>The team support model works with shared repositories that store
-version-managed resources on servers that are accessible to the entire team. Usually
-you would share the folders and files of an Eclipse project.&nbsp; Each
-team member sends their changes to the repository, and receives changes
-that
-were made by a team member from the repository. While the Remote System
-Explorer
-is not project-based, (it is designed for direct access to remote
-resources),
-there is a single project created for all the non-remote resources that
-the
-Remote System Explorer manages. Profiles are stored in that project and
-so everything that belongs to a profile can be
-shared with your teammates.</p>
-<div class="p" id="cteam__profilelist"><a name="cteam__profilelist"><!-- --></a>Profiles
-contain:
-<ul>
- <li>Connections -- including various subsystem properties. User IDs
-and passwords are not shared.</li>
- <li>Filters, filter pools, and filters pool references</li>
- <li>User-defined actions</li>
- <li>Compile commands</li>
-</ul>
-</div>
-<p> Use the Team view of the Remote System Explorer perspective to
-associate
-and synchronize the project named RemoteSystemsConnection that contains
-these profiles with a repository. After
-synchronizing with the repository, you will receive all the shared
-Remote System
-Explorer resources from your team, including their profiles. You then
-use the <b>Reload Remote System Explorer</b> action, located on the
-pop-up menu, to make the Remote System Explorer know about these
-changes.&nbsp; You can also, of course, quit and restart the
-workbench.&nbsp; See the related tasks for more information.</p>
-<p>Any resources received that are in a profile that you have already
-active, such
-as Team, will immediately be available and accessible to you. However,
-resources
-in other profiles will not be available unless you choose to make those
-profiles
-active. If you use multiple workstations, team support can also be used
-to
-make your own private configurations of filters, filter pools, and
-connections available on all the workstations by making
-your profile active on each workstation.</p>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="cprofile.html" title="">Remote System Explorer Profiles</a><br/>
-</p>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="../tasks/tteamsup.html" title="">Using team support</a><br/>
-<a href="../tasks/tteamsup1.html" title="">Working with profiles and team support</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/concepts/cuniversal.html b/rse/doc/org.eclipse.rse.doc.user/concepts/cuniversal.html
deleted file mode 100755
index b9f44ff41..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cuniversal.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2003, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Linux, UNIX, and Windows host access</title>
-</head>
-
-<body>
-<a name="cuniversal"><!-- --></a>
-<h1 class="topictitle1">Universal Systems</h1>
-<div>
-<p>At a minimum the Remote System Explorer provides access to&nbsp;
-Linux,
-UNIX, and Windows systems.&nbsp; These are called "universal" systems
-since their file and command systems are quite similar.&nbsp; You can
-export,
-import, explore remote files, and run remote
-commands on all of these system types.
-You can also drag/drop and copy/paste between
-two systems of the same or different type.
-For example, you can drag and drop a file
-from your Windows host to your Linux host,
-from one Linux host to another, or from one
-file in your Linux host to another file in
-the same host.</p>
-<p>The Remote System Explorer can also provide access to other types of
-systems if the support is installed in the workbench.&nbsp; Examples of
-such systems might be IBM iSeries or zSeries server systems.<br/>
-</p>
-<p>Expand the topics in the help contents or click the following links
-for
-information on Universal host access:<br/>
-</p>
-</div>
-<div>
-<p><b>Related concepts</b><br clear="all"/>
-<a href="crunremcmds.html">Shells and commands in the Remote Systems view</a><br clear="all"/>
-</p>
-<p><b>Related tasks</b><br clear="all"/>
-<a href="../tasks/tbeginlinux.html">Connecting to a remote Linux or UNIX host</a><br clear="all"/>
-<a href="../tasks/tbeginwindows.html">Connecting to a remote Windows host</a><br clear="all"/>
-<a href="../tasks/tbeginsecond.html">Creating a second connection to aremote host</a><br clear="all"/>
-<a href="../tasks/tbegindelete.html">Deleting a connection</a><br clear="all"/>
-<a href="../tasks/tbegindiscon.html">Disconnecting from a remote host</a><br clear="all"/>
-<a href="../tasks/ttablecopy.html">Copying and pasting in the Remote System Explorer</a><br clear="all"/>
-<a href="../tasks/ttabledrag.html">Dragging and dropping items in the Remote System Explorer</a><br clear="all"/>
-<a href="../tasks/tbeginenv.html">Configuring environment variablesupport for connections</a>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/concepts/cuseractions.html b/rse/doc/org.eclipse.rse.doc.user/concepts/cuseractions.html
deleted file mode 100755
index eda38a272..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cuseractions.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>User actions (user options)</title>
-</head>
-
-<body id="cuseractions">
-<a name="cuseractions"><!-- --></a>
-<h1 class="topictitle1">User actions (user options)</h1>
-<div>
-<p>User actions are server commands that you define on the <b>Work
-With
-User Actions</b> window, and will run against resources such as files
-and folders on your server.</p>
-<div class="p">Each user action has:
-<ul>
- <li>A unique name. </li>
- <li>A command (that might have substitution variables). The user
-action may also
-specify how the command is to be run on the server.</li>
- <li>Substitution variables that are replaced with information from
-the resource (such as its name) when
-the command is run.</li>
- <li>An optional comment used to describe the action in more detail.</li>
- <li>Various options to affect what happens when the command is run;
-for example,
-whether to prompt first.</li>
- <li>One or more file types that limit the action to specific types of
-remote resources. For example, a command to start&nbsp; a program that
-searches text files could be limited to just text files. The action is
-only shown
-for remote objects which is one of the specified types.</li>
-</ul>
-</div>
-</div>
-<div>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="../tasks/tworkuseract.html" title="">Managing user actions
-(user options)</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g1installing.html b/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g1installing.html
deleted file mode 100644
index 21def5b6e..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g1installing.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) 2006 Wind River Systems, Inc. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Installing the RSE</title>
-</head>
-<body id="g1installing">
-<a name="g1installing"><!-- --></a>
-<h1 class="topictitle1">Installing the Remote System Explorer</h1>
-<div>
-The simplest way to get RSE is via the Update Manager: From your running instance
-of Eclipse 3.2, choose <i>Help &gt; Software Updates &gt; Find and Install...</i>.
-Choose "Search for New Features to Install", and add a new Remote Site named
-"RSE" and pointing to <a href="http://download.eclipse.org/dsdp/tm/updates/">
-http://download.eclipse.org/dsdp/tm/updates/</a>.
-Select the RSE SDK feature, and perform the update process as usual.</p>
-
-<p>If you prefer manual installation, you can download RSE SDK from the
-DSDP <a href="http://download.eclipse.org/dsdp/tm/downloads/">Target
-Management Download Site</a> and extract it into your installation of
-Eclipse 3.2 or later, or link it as product extension.
-<p>Start Eclipse Workbench, and choose <i>Window &gt; Open Perspective &gt;
-Other &gt; Remote System Explorer</i>.</p>
-</div>
-
-<div>
-<!--
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="../concepts/cbegin.html" title="">Remote System Explorer Connections</a><br/>
-</p>
-<p><b class="reltaskshd">Related tasks</b><br/>
--->
-<p><b class="reltaskshd">Follow-up tasks</b><br/>
-<a href="g2firststeps.html" title="">First Steps with the Remote System Explorer</a><br/>
-<a href="../tasks/tbeginlinux.html" title="">Setting up a dstore server</a><br/>
-<!--
-<a href="../tasks/tbeginwindows.html" title="">Connecting to a remote
-Windows server</a><br/>
--->
-<a href="gusing.html" title="">Using Remote System Explorer Connections</a><br/>
-<a href="gxtending.html" title="">Extending Remote System Explorer</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g2firststeps.html b/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g2firststeps.html
deleted file mode 100644
index a84c56d59..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g2firststeps.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) 2006 Wind River Systems, Inc. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>First Steps with RSE</title>
-</head>
-<body id="g2firststeps">
-<a name="g2firststeps"><!-- --></a>
-<h1 class="topictitle1">First Steps with the Remote System Explorer</h1>
-<div>
-Even without an actual connection to a remote system, you can start experimenting
-with the Remote System Explorer UI on the local host, which is shown by default
-under the <i>Local</i> node:
-<ul>
- <li>Browse the Filesystem, choose <i>contextmenu &gt; show in Table</i>, and
- observe the Properties view.</li>
- <li>Create a new <a href="../concepts/cfilters.html">Filter</a> to show
- specific resources in the file system only.</li>
- <li>Launch an <a href="../concepts/crunremcmds.html">RSE Shell</a>
- (Shells node &gt; Launch)
- <ul><li>In the Shell, perform commands such as ls, dir, ps, gcc, make and see
- the output interpreted</li>
- <li>Use Ctrl+Space Content Assist on the shell command entry field</li>
- </ul></li>
-</ul>
-For operations on an actual remote system, you can either
-<ul>
- <li>use the "<b>SSH Only</b>" system type (<i>New > Other > Remote System Explorer > Connection</i>), or</li>
- <li>start a <a href="../tasks/tbeginlinux.html">dstore server daemon</a>
- on the remote system and use any of the other connection types.</li>
-</ul>
-<p>RSE is a framework that supports plugging in many different communication protocols.
-By default, the dstore, FTP and ssh protocol plug-ins are provided, with dstore being
-the richest in features.<br/>
-DStore requires a server to run on the remote system. There are several methods to
-get a server launched for a particular user, the most easy one to set up is the
-daemon method.</p>
-</div>
-
-<div>
-<p><b class="reltaskshd">Follow-up tasks</b><br/>
-<a href="../tasks/tbeginlinux.html" title="">Setting up a dstore server</a><br/>
-<a href="gusing.html" title="">Using Remote System Explorer Connections</a><br/>
-<a href="gxtending.html" title="">Extending Remote System Explorer</a><br/>
-</p>
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="../concepts/cbegin.html" title="">Remote System Explorer Connections</a><br/>
-<a href="../concepts/cfilters.html" title="">Remote System Explorer filters, filter
-pools, and filter pool references</a><br/>
-<a href="../concepts/cuniversal.html">Universal Systems</a><br/>
-<a href="../tasks/tbeginlinux.html" title="">Connecting to a remote
-Linux or UNIX server</a><br/>
-<a href="../tasks/tbeginwindows.html" title="">Connecting to a remote
-Windows server</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g_start.html b/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g_start.html
deleted file mode 100644
index 9b4836bd3..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g_start.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) 2006 Wind River Systems, Inc. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Getting Started with RSE</title>
-</head>
-<body id="gstart">
-<a name="gstart"><!-- --></a>
-<h1 class="topictitle1">Getting Started with the Remote System Explorer</h1>
-<div>
-<p>The Remote System Explorer (RSE) is a perspective and toolkit in Eclipse
-Workbench, that allows you to connect and work with a variety of remote
-systems. With the predefined plug-ins, You can look at remote file systems,
-transfer files between hosts, do remote search, execute commands and work
-with processes.</p>
-<p>Additional capabilities may be added by Software Vendors by providing new
-<i>System Types</i>, <i>Services</i> and <i>Subsystem implementations</i>
-for specific remote access protocols or resource kinds respectively. The framework
-helps by providing lots of predefined re-usable components, like persistence
-mechanisms, filtering and team sharing.</p>
-<a href="../images/RSESample.gif">
-<!-- <img src="../images/RSESample.gif" alt="A sample RSE session" width="917" height="659"/><br/>
--->
-<img src="../images/RSESample_small.gif" alt="A sample RSE session" width="459" height="330"/><br/>
-</a>
-<p>Here is a screenshot of a sample session with RSE (Click on the picture to
-enlarge it).
-This tutorial will guide you quickly through the most prominent features of
-the Remote System Explorer:
-<ul>
- <li><a href="g1installing.html" title="">Installing the Remote System Explorer</a></li>
- <li><a href="g2firststeps.html" title="">First Steps with the Remote System Explorer</a></li>
- <li><a href="gusing.html" title="">Using Remote System Explorer Connections</a></li>
- <li><a href="gxtending.html" title="">Extending Remote System Explorer</a></li>
-</ul>
-
-</div>
-
-<div>
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="../concepts/cbegin.html" title="">Remote System Explorer Connections</a><br/>
-</p>
-<!--
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="../tasks/tbeginlinux.html" title="">Connecting to a remote
-Linux or UNIX server</a><br/>
-<a href="../tasks/tbeginwindows.html" title="">Connecting to a remote
-Windows server</a><br/>
-</p>
--->
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/gusing.html b/rse/doc/org.eclipse.rse.doc.user/gettingstarted/gusing.html
deleted file mode 100644
index b54da67da..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/gusing.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) 2006 Wind River Systems, Inc. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Using Remote Connections</title>
-</head>
-<body id="gusing">
-<a name="gusing"><!-- --></a>
-<h1 class="topictitle1">Using Remote Connections</h1>
-<div>
-Here are a few tasks that help you get acquainted with RSE. All tasks assume that you have
-switched to the Remote System Explorer Perspective in your Workbench. Some of the tasks
-can not be performed on all system types, although RSE tries to provide a consistent UI
-across many different kinds of remote systems..
-<ul>
- <li>In the RSE Perspective, Remote Systems View, press the <b>New Connection</b> button.<ul>
- <li>Note: In the Preferences, you can enable displaying available new connection types in the RSE tree.</li></ul></li>
- <li>Select the desired system type<ul>
- <li>Coose system type "SSH Only" for ssh servers, or any other for dstore.</li></ul></li>
- <li>Enter an IP address for a remote system running an ssh server or dstore server.
- A connection name will be suggested automatically, but can be changed.<ul>
- <li>You can also run a dstore server on the local machine for testing. In this case,
- type "localhost" as address.</li>
- <li>You can press Finish right away, the wizard defaults are usually fine.</li></ul></li>
- <li>Fill in the username / password dialog.<ul>
- <li>Note: For ssh, if you have private keys, the password here is just a dummy.
- Enter anything and save it. You can setup ssh private key authentication through
- the <b>Team &gt; CVS &gt; SSH2 Connection Method</b> Preference page.</li></ul></li>
- <li><b>Browse remote files</b>, or open remote shells.<ul>
- <li>You can <b>drag and drop</b> files between local and remote file systems, between editors and any view.
- Files are transferred as needed.</li>
- <li>On dstore, you can browse into remote archives (*.zip, *.tar) without having to transfer the entire contents. This works thanks
- to "miners" on the remote side. Custom miners can be plugged into the dstore server.<br>
- Note: Some tar formats currently fail to work. See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=139207">bug 139207</a>.</li>
- <li>On dstore, you can choose <b>Search &gt; Remote...</b>.<ul>
- <li>The dstore miners support searching a remote file system
- without having to transfer any data.</li></ul></li>
- <li>On dstore, when the remote system is Linux, AIX or Other Unix:<ul>
- <li>Browse remote <b>Processes</b>.</li>
- <li>Select "My Processes" and choose context menu &gt; <b>Monitor</b>.
- <li>Enable polling, choose a short wait time. See processes appear and vanish as you perform commands in a remote shell.</li></ul></li>
-</ul>
-</div>
-
-<div>
-<p><b class="reltaskshd">Follow-up tasks</b><br/>
-<a href="gxtending.html" title="">Extending Remote System Explorer</a><br/>
-</p>
-
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="../concepts/cbegin.html" title="">Remote System Explorer Connections</a><br/>
-<a href="../concepts/cfilters.html" title="">Remote System Explorer filters, filter
-pools, and filter pool references</a><br/>
-<a href="../concepts/crunremcmds.html" title="">Shells and commands in the
-Remote Systems view</a><br/>
-</p>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="../tasks/ttablecopy.html" title="">Copying and pasting in the Remote System Explorer</a><br/>
-<a href="../tasks/truncmdsview.html" title="">Running and viewing commands using the Remote Shell view</a><br/>
-<a href="../tasks/twrkcmdshl.html" title="">Working with command shells</a><br/>
-<a href="../tasks/tmanagesearch.html" title="">Search for text and files on remote servers</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/gxtending.html b/rse/doc/org.eclipse.rse.doc.user/gettingstarted/gxtending.html
deleted file mode 100644
index 57e1ee01f..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/gxtending.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) 2006 Wind River Systems, Inc. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Extending Remote System Explorer</title>
-</head>
-<body id="gxtending">
-<a name="gxtending"><!-- --></a>
-<h1 class="topictitle1">Extending Remote System Explorer</h1>
-<div>
-<p>There are numerous ways how developers and software vendors can extend the
-capabilities of the Remote System Explorer. Please look at the
-<a href="../../org.eclipse.rse.doc.isv/guide/rse_int_architecture.html">RSE Developer Guide</a> to learn about adding subsystems,
-remote property pages or additional popup actions. The developer guide
-holds extensive
-<a href="../../org.eclipse.rse.doc.isv/guide/tutorials.html">tutorials</a>,
-<a href="../../org.eclipse.rse.doc.isv/guide/rse_int_architecture.html">overview documentation</a> and
-reference</a>.</p>
-
-<p>Users can configure and customize the Remote System Explorer through
-<!-- TODODeferred
-User actions, Compile Commands and
--->
-<a href="../ref/rrsepref.html">Preferences</a> and connection setup
-<a href="../concepts/cteam.html">shared in a team</a>.
-</div>
-
-<div>
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="../concepts/cfilters.html" title="">Remote System Explorer filters, filter
-pools, and filter pool references</a><br/>
-<a href="../concepts/cteam.html" title="">Team support</a><br/>
-</p>
-<!--
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="../tasks/truncmdsview.html" title="">Running and viewing commands using the Remote Shell view</a><br/>
--->
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/images/ModelRSE.gif b/rse/doc/org.eclipse.rse.doc.user/images/ModelRSE.gif
deleted file mode 100755
index 9426bc1d9..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/images/ModelRSE.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.user/images/RSESample.gif b/rse/doc/org.eclipse.rse.doc.user/images/RSESample.gif
deleted file mode 100644
index 4ddb991f3..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/images/RSESample.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.user/images/RSESample_small.gif b/rse/doc/org.eclipse.rse.doc.user/images/RSESample_small.gif
deleted file mode 100644
index 9f72e4cd2..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/images/RSESample_small.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.user/images/gsarrow.gif b/rse/doc/org.eclipse.rse.doc.user/images/gsarrow.gif
deleted file mode 100755
index c48660dbe..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/images/gsarrow.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.user/images/navigator.jpg b/rse/doc/org.eclipse.rse.doc.user/images/navigator.jpg
deleted file mode 100755
index 08ef7717e..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/images/navigator.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.user/images/newconnection_wiz.gif b/rse/doc/org.eclipse.rse.doc.user/images/newconnection_wiz.gif
deleted file mode 100755
index 63f3d1b37..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/images/newconnection_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.user/images/pw.jpg b/rse/doc/org.eclipse.rse.doc.user/images/pw.jpg
deleted file mode 100755
index 8c5a47757..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/images/pw.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.user/images/search.gif b/rse/doc/org.eclipse.rse.doc.user/images/search.gif
deleted file mode 100755
index f0461093c..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/images/search.gif
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.user/notices.html b/rse/doc/org.eclipse.rse.doc.user/notices.html
deleted file mode 100755
index 6c70b9c62..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/notices.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="STYLESHEET" HREF="book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-<p>
-The material in this guide is Copyright (c) IBM Corporation and others 2000, 2006.
-</p>
-<p>
-<a href="about.html">Terms and conditions regarding the use of this guide.</a>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/plugin.properties b/rse/doc/org.eclipse.rse.doc.user/plugin.properties
deleted file mode 100755
index b918b6280..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/plugin.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation and others. 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.
-################################################################################
-
-pluginName = RSE User Guide
-providerName = Eclipse.org
diff --git a/rse/doc/org.eclipse.rse.doc.user/plugin.xml b/rse/doc/org.eclipse.rse.doc.user/plugin.xml
deleted file mode 100755
index f79986589..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006 IBM Corporation and others. 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.
--->
-<plugin>
- <extension point="org.eclipse.help.toc">
- <toc file="toc.xml" primary="true" category="DSDP.TM"/>
- </extension>
-</plugin>
-
diff --git a/rse/doc/org.eclipse.rse.doc.user/ref/rrsepref.html b/rse/doc/org.eclipse.rse.doc.user/ref/rrsepref.html
deleted file mode 100755
index c56274820..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/ref/rrsepref.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Accessing Remote System Explorer preferences</title>
-</head>
-<body id="rrsepref">
-<a name="rrsepref"><!-- --></a>
-<h1 class="topictitle1">Accessing Remote System Explorer preferences</h1>
-<div>
-<div class="p">
-<p class="sectiontitle">Purpose</p>
-The Remote System Explorer has settings that
-you can customize in a preference page. The name of the category is
-Remote Systems and it appears
-in the tree view of the Preferences window. </div>
-<div class="p">
-<div class="skipspace">
-<table cellpadding="4" cellspacing="0" summary="" frame="border"
- border="1" rules="all">
- <tbody>
- <tr>
- <td valign="top"><b>Option</b></td>
- <td valign="top"><b>Description</b></td>
- <td valign="top"><b>Default</b></td>
- </tr>
- <tr>
- <td valign="top">Default System Type</td>
- <td valign="top">Defines the default system type that will be used when creating a new connection.</td>
- <td valign="top">none<br/></td>
- </tr>
- <tr>
- <td valign="top">Default user ID for each system type</td>
- <td valign="top">Specifies a default user ID for a non-local system type.
-If you do not set the default user ID at the connection level, then the User
-ID that you specify here will be used. Note: Changing the user ID on the
-Preferences dialog affects all connections and subsystems that inherit it.</td>
- <td valign="top">Off</td>
- </tr>
- <tr>
- <td valign="top">Show connection names prefixed by profile name</td>
- <td valign="top">Select this to display connection names in the
-Remote System Explorer tree view as profile.connection.</td>
- <td valign="top">Off</td>
- </tr>
- <tr>
- <td valign="top">Show filter pools in Remote Systems view</td>
- <td valign="top">Select this to show filter pools when expanding a subsystem.
-When this is not selected, expanding a subsystem will display the filters.</td>
- <td valign="top">Off</td>
- </tr>
- <tr>
- <td valign="top">Show "New Connection" prompt in Remote Systems view</td>
- <td valign="top">The <img src="../images/newconnection_wiz.gif" alt=""/> New
-Connection option is displayed in the Remote Systems view so that you can
-create a new connection.</td>
- <td valign="top">On</td>
- </tr>
- <tr>
- <td valign="top">Re-open Remote Systems view to previous state</td>
- <td valign="top">Select this to automatically open previously expanded
-connections on start-up.</td>
- <td valign="top">On</td>
- </tr>
- <tr>
- <td valign="top">Cascade user actions by profile</td>
- <td valign="top">The <span><b>Work With</b> &gt; <b>User Actions</b></span> menu will cascade according to active profile.</td>
- <td valign="top">Off</td>
- </tr>
- </tbody>
-</table>
-</div>
-</div>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/ref/rsearch.html b/rse/doc/org.eclipse.rse.doc.user/ref/rsearch.html
deleted file mode 100755
index 6781c791d..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/ref/rsearch.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Using search parameters with special characters</title>
-</head>
-
-<body id="rtablesub"><a name="rtablesub"><!-- --></a>
-<h1 class="topictitle1">Using search parameters with special characters</h1>
-<div>
-<div class="p">You can use special characters such as ?, *, and \, when searching
-for files and strings, based on the following rules.
-</div>
-<div class="p">
-<div class="skipspace">
-<table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all">
-<tbody>
-<tr>
-<td valign="top"><b>Option</b></td>
-<td valign="top"><b>Description</b></td>
-</tr>
-<tr>
-<td valign="top">*</td>
-<td valign="top">Searches all items. </td>
-</tr>
-<tr>
-<td valign="top">abc*</td>
-<td valign="top">Searches for items that begin with the characters abc,
-for example, abcd or abctest.</td>
-</tr>
-<tr>
-<td valign="top">*abc</td>
-<td valign="top">Searches for items ending with the characters abc, for example, dabc or testabc.</td>
-</tr>
-<tr>
-<td valign="top">*b*</td>
-<td valign="top">Searches for items that have the character b anywhere in the name.</td>
-</tr>
-<tr>
-<td valign="top">a*c</td>
-<td valign="top">Searches for items that begin with the character a and end with the character c.</td>
-</tr>
-<tr>
-<td valign="top">"a*"</td>
-<td valign="top">Searches for items within quotation marks that start
-with the character a, for example, "a," "ab," or "ad." Note that when you
-use quotation marks, the specification becomes case sensitive.</td>
-</tr>
-<tr>
-<td valign="top">abc?</td>
-<td valign="top">Searches for four-character items that begin with the
-characters abc and have a single fourth character, for example, abcd.</td>
-</tr>
-<tr>
-<td valign="top">?abc</td><td valign="top">Searches for four-character items that begin with a
-single character and end in abc, for example, dabc.</td>
-</tr>
-<tr>
-<td valign="top">?b?</td>
-<td valign="top">Searches for three-character items that have a b in the middle, for example, abc.</td>
-</tr>
-<tr>
-<td valign="top">a?c</td>
-<td valign="top">Searches for three-character items that have the character a and c with a single character in between.</td>
-</tr>
-<tr>
-<td valign="top">ab?</td>
-<td valign="top">Searches for three-character items that start with ab and end in a third single character, for example, abc.</td>
-</tr>
-<tr>
-<td valign="top">a\* or a\?</td>
-<td valign="top">Searches for characters where the * and ? are interpreted
-literally, for example, a* or a?. The slash represents an escape character.
-To use a slash literally, enter \\.</td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tarchive.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tarchive.html
deleted file mode 100755
index b1478acf0..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tarchive.html
+++ /dev/null
@@ -1,182 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Managing archived files</title>
-</head>
-
-<body id="tarchive"><a name="tarchive"><!-- --></a>
-<h1 class="topictitle1">Managing archived files</h1>
-<div class="p">
-<p>You can work with archived files and folders in the Remote System Explorer.</p>
-<p>Use the Remote Systems view perform the following actions with archived files:
-<ul>
-<li><a href="#tarchive__browse">Browse files in an archive</a></li>
-<li><a href="#tarchive__copy">Copy, paste, and move archives</a></li>
-<li><a href="#tarchive__drag">Drag and drop files between archives</a></li>
-<li><a href="#tarchive__create">Create files and folders within an archive</a></li>
-<li><a href="#tarchive__delete">Delete archives</a></li>
-<li><a href="#tarchive__extract">Extract files from an archive</a></li>
-<li><a href="#tarchive__add">Add files to an archive</a></li>
-<li><a href="#tarchive__search">Search for content within an archive</a></li>
-<li><a href="#tarchive__convert">Convert archives of a different types into one type</a></li>
-</ul>
-</p>
-</div>
-<div class="p">
-<p>Pick from the following:
-<table border="1" frame="hsides" rules="rows" cellpadding="4" cellspacing="0" summary="" class="skipspace">
-<tbody>
-<tr>
-<th align="left" valign="bottom" id="d0e45">Task</th>
-<th align="left" valign="bottom" id="d0e47">Description</th>
-</tr>
-<tr id="tarchive__browse">
-<td align="left" valign="top" id="d0e50" headers="d0e45"><b>Browsing:</b></td>
-<td align="left" valign="top" headers="d0e47 d0e50">To browse and open
-files in an archive, click the plus sign beside the archive to display the
-contents. Continue to expand folders within the archive or double-click any
-file to open it in the default editor. Save files as you normally would and
-they are saved in the archive. In the properties view, note the addition of
-"#archive#" to the path of the file, to indicate how the file exists inside
-the archive.</td>
-</tr>
-<tr id="tarchive__copy">
-<td align="left" valign="top" id="d0e55" headers="d0e45"><b>Copying and pasting:</b></td>
-<td align="left" valign="top" headers="d0e47 d0e55">To copy
-and paste files, or move them from one location to another, right-click a
-file or folder inside an archive and select <b>Copy</b> or <b>Move</b>. (When
-you select <b>Move</b> instead of <b>Copy</b>, you delete the file in the
-original location, to move it to a new one.) Using the window that opens,
-you can paste the item to any archived, or unarchived location by expanding
-the tree-view to any specific location, and clicking <b>OK</b>. Note that
-you can perform this action across different connections as well.</td>
-</tr>
-<tr id="tarchive__drag">
-<td align="left" valign="top" id="d0e75" headers="d0e45"><b>Dragging and dropping:</b></td>
-<td align="left" valign="top" headers="d0e47 d0e75">You can
-drag and drop files between archives, from an archive to an unarchived location,
-or from an unarchived location into an archive. Expand both the original and
-destination locations in the Remote Systems view, click the item you want
-to move, and drag it with your cursor to the new location. Note that you can
-perform this action across different connections as well.</td>
-</tr>
-<tr id="tarchive__create">
-<td align="left" valign="top" id="d0e80" headers="d0e45"><b>Creating:</b></td>
-<td align="left" valign="top" headers="d0e47 d0e80">To create files and
-folders inside an archive, or to create a new archive, right-click any folder
-in the archive, or the root level archive itself, and select:
-<ul>
-<li><b>New &gt; File</b> to create a normal file within the archive. You can
-also select the file type to be an archive, whereby you can create an archive
-inside of an archive.</li>
-<li><b>New &gt; Folder</b> to create a normal folder within the archive. Then
-right-click your virtual folder to create more folders or files.</li>
-</ul>
-</td>
-</tr>
-<tr id="tarchive__delete">
-<td align="left" valign="top" id="d0e94" headers="d0e45"><b>Deleting:</b></td>
-<td align="left" valign="top" headers="d0e47 d0e94">To delete a file
-or folder from inside an archive, simply right-click the item and select <b>Delete</b>,
-or hit the Delete key. </td>
-</tr>
-<tr id="tarchive__extract">
-<td align="left" valign="top" id="d0e102" headers="d0e45"><b>Extracting:</b></td>
-<td align="left" valign="top" headers="d0e47 d0e102">You have two options
-when extracting files. You can either extract to a new folder within your
-current directory (by selecting <a href="#tarchive__extract1"><b>Extract
-to <i>xyz</i></b></a> where <i>xyz</i> is your current directory) or browse
-to a specific extraction directory (by selecting <a href="#tarchive__extract2"><b>Extract
-To . . .</b></a>). You can also select multiple archives and perform the
-same actions.
-<ul>
-<li id="tarchive__extract1"><a name="tarchive__extract1"><!-- --></a>
-To extract the contents of an archive to a new folder within
-your current directory, right-click your archive and select <b>Extract to <i>xyz</i></b> where <i>xyz</i> is
-the name of your current directory. If your archive was named "MyArchive.zip"
-then the extraction will create a new folder within your current directory
-called "MyArchive" and all of the files will be placed in the new folder in
-their proper structure. Click <b>OK</b>. If you want, use the right-click
-menu to rename the new folder.</li>
-<li id="tarchive__extract2"><a name="tarchive__extract2"><!-- --></a>
-To extract the contents of an archive to a location other
-than the current directory, right-click your archive and select <b>Extract
-To</b>.
-<ol>
-<li>A dialog box displays, presenting a tree view of all drives, files, and
-folders defined in the Remote Systems view. Expand any location in the tree
-view to define the directory location where you want to extract the contents
-of your archive. </li>
-<li>(Optional) You can select a directory, and press the <b>Details</b> button
-to see a list of properties for that location. </li>
-<li>(Optional) You can expand <b>New Connection</b> to define a new connection
-to a location where you want to extract the files.</li>
-<li>(Optional) When you extract the contents of an archive to a destination
-directory, the files and directories in the archive are copied directly to
-that destination. You are prompted to overwrite or rename duplicate files
-in the target directory.</li>
-<li>Click <b>OK</b>.</li>
-</ol>
-</li>
-</ul>
-</td></tr><tr id="tarchive__add"><td align="left" valign="top" id="d0e159" headers="d0e45">
-<b>Adding files to an archive:</b></td>
-<td align="left" valign="top" headers="d0e47 d0e159">To
-add files and folder to an archive, select one or more files/folders, right-click,
-and select <b>Add to Archive</b>.
-<ol>
-<li>A dialog box displays, presenting a tree view of all drives, files, and
-folders defined in the Remote Systems view.</li>
-<li>To create a new archive for the selected files and folders
-<ol type="a">
-<li>Expand any location in the tree view to define the location for the new
-archive.</li>
-<li>Specify a name for the archive in the <b>File name</b> field.</li>
-<li>Specify an <b>Archive type</b> from the drop-down list.</li>
-</ol>
-To add files and folders to an <i>existing</i> archive:
-<ol type="a">
-<li>Select the existing archive's parent folder in the tree view.</li>
-<li>Specify a name for the archive in the <b>File name</b> field.</li>
-<li>Specify an <b>Archive type</b> from the drop-down list.</li>
-</ol>
-</li>
-<li>Click <b>OK</b>.</li>
-</ol>
-The selected files/folders are copied to the root directory in the new
-archive location</td>
-</tr>
-<tr id="tarchive__search">
-<td align="left" valign="top" id="d0e208" headers="d0e45">
-<b>Searching for content inside an archive:</b></td>
-<td align="left" valign="top" headers="d0e47 d0e208">
-To search for files within an archive, right-click the archive, select <b>Search</b>,
-and complete the dialog box to specify what kinds of files and folder you
-want to find. Note that if you begin your search on a normal, unarchived directory
-that contains an archive, the default behaviour is <i>not</i> to search the
-archive. You need to explicitly start from the archive itself to search for
-contents within that archive.</td>
-</tr>
-<tr id="tarchive__convert">
-<td align="left" valign="top" id="d0e219" headers="d0e45">
-<b>Converting archives:</b></td>
-<td align="left" valign="top" headers="d0e47 d0e219">To convert
-archives from one type (.zip, .jar, or .tar) to another, select one or more
-archives, right-click, and select <b>Convert</b>. A Convert Archive dialog
-box opens for each archive you selected. In the dialog box, select a new archive
-type from the <b>Archive Type</b> drop-down list to convert the selected archive.
-You can also, optionally, specify a new location and new name for your archive,
-by selecting a location in the tree view and entering a new name in the <b>File
-name</b> field. Click <b>OK</b>.</td>
-</tr>
-</tbody>
-</table>
-</p>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindelete.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindelete.html
deleted file mode 100755
index 0214acfa2..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindelete.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Deleting a connection</title>
-</head>
-
-<body id="tbegindelete">
-<a name="tbegindelete"><!-- --></a>
-<h1 class="topictitle1">Deleting a connection</h1>
-<div>
-<div class="p">Deleting a connection to a remote server does not delete
-any elements
-on the server. The action deletes your specific configuration for that
-connection,
-including your filters, filter pools, user actions, compile actions,
-saved
-commands, and named types.
-<p>To delete a connection, in the Remote Systems
-view, right-click your connection and select <b>Delete</b>.</p>
-</div>
-</div>
-<div>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="tbegindiscon.html" title="">Disconnecting from a remote server</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindeleteprofile.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindeleteprofile.html
deleted file mode 100755
index 7b52d4d2b..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindeleteprofile.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Deleting a profile</title>
-</head>
-
-<body id="tbegindelete">
-<a name="tbegindelete"></a>
-<h1 class="topictitle1">Deleting a profile</h1>
-<div>
-<div class="p">Deleting a profile does not delete any elements on the
-server. The
-action only deletes your specific configuration (connections, filters,
-and
-user actions) for that profile. To delete a profile:</div>
-<ol>
- <li><span>Click the Menu button <img src="../images/gsarrow.gif" alt=""/> on the toolbar for the Remote Systems view.</span></li>
- <li><span>Select <b>Delete Profile &gt; <i>name of profile</i></b>.</span></li>
- <li><span>Click <b>Yes</b>.</span></li>
-</ol>
-</div>
-<div>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="tbeginsecprofile.html" title="">Creating a second profile</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindiscon.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindiscon.html
deleted file mode 100755
index 2b5411d05..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindiscon.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Disconnecting from a remote server</title>
-</head>
-
-<body id="tbegindiscon">
-<a name="tbegindiscon"></a>
-<h1 class="topictitle1">Disconnecting from a remote server</h1>
-<div>
-<div class="p">To disconnect from a remote server in the Remote Systems
-view, right-click one of the subsystems displayed under your connection
-name
-and select <b>Disconnect</b>, or close the workbench.
-</div>
-<div class="p">
-<p>If you choose to close the workbench in order to disconnect, it
-notifies you of any outstanding communications requests. However, any
-tools
-launched from the workbench that run externally from the Remote System
-Explorer
-communications server, such as an external remote editor, are not
-affected because they
-have their own communication connection.</p>
-<p>You can monitor and change
-the properties of your connection in the Properties view of the Remote
-System
-Explorer perspective. Some values are read-only, and you can change
-others,
-such as the description or the server name. Although each Remote System
-Explorer
-subsystem maintains its own list of properties, three properties
-(connected
-or disconnected, port, and user ID) are shared among all subsystems. If
-you
-change any of these properties in one subsystem, the other subsystems
-reflect
-the change.</p>
-<p>Select a subsystem and check the Properties view to see
-the shared properties for all of your subsystems. For example, the
-Connected
-value is Yes or No for all of your subsystems under one connection. If
-you
-have difficulties connecting and disconnecting from the server, see the
-related link for troubleshooting information.</p>
-</div>
-</div>
-<div>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="tbegindelete.html" title="">Deleting a connection</a><br/>
-<br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginenv.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginenv.html
deleted file mode 100755
index 426871437..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginenv.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Configuring environment variable support for connections</title>
-</head>
-
-<body id="tbeginenv">
-<a name="tbeginenv"></a>
-<h1 class="topictitle1">Configuring environment variable support for connections</h1>
-<div>
-<p>Environment variables are set for the remote job process
-when you first connect to a remote system. This means that the results
-of setting the variables are shown in the Remote Shell view.
-If the system type you are using is case sensitive (UNIX for example),
-then the environment variables will also be case sensitive. Spaces and
-equals signs (=) are only allowed in the value for the environment
-variable, not in
-its name.</p>
-<p>You can define environment variables for all Remote System Explorer
-connection types that support them (Windows, Linux, UNIX, and other
-system types that are installed).</p>
-<p>If you change an environment variable while the Remote System
-Explorer is connected to a
-remote server, the change does not take affect until you disconnect and
-reconnect.</p>
-<p>Although environment variables are set in subsystem properties
-pages, the Remote System Explorer stores
-them globally by connection.</p>
-<p>If you need to specify different environment variables or user IDs
-for a particular remote system, you can do so by defining multiple
-connections to that
-remote system and then defining the environment variables on the file
-subsystem for each
-connection.</p>
-<p>To configure environment variables:
-</p>
-<ol>
- <li><span>Create a connection to a server if necessary.</span></li>
- <li><span>Expand your connection name in the Remote Systems view.</span></li>
- <li><span>Right-click on a file subsystem and select <b>Properties</b>.</span></li>
- <li><span>Click <b>Environment Variables</b> and configure the variables as needed.</span>
- <ul>
- <li>To add an environment variable, click <b>Add</b>. Enter a
-name and value for this variable, and click<b>OK</b>.</li>
- <li>To change an environment variable, select the variable in the
-table and modify the name or value directly. To use a dialog box,
-select the variable and click <b>Change</b>. The name and value of the
-current variable
-are pre-filled in the dialog box. Overwrite whichever field you want to
-change and click <b>OK</b>.</li>
- <li>To remove a variable, click the variable to select it and
-click <b>Remove</b>.</li>
- <li>To move a variable up in the list, click the variable to
-select it and click <b>Move up</b>.</li>
- <li>To move a variable down in the list, click the variable to
-select it and click <b>Move down</b>.</li>
- </ul>
- </li>
-</ol>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginlinux.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginlinux.html
deleted file mode 100755
index 0de8fba28..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginlinux.html
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Connecting to a remote Linux or UNIX server</title>
-</head>
-
-<body id="tbeginlinux">
-<a name="tbeginlinux"><!-- --></a>
-<h1 class="topictitle1">Connecting to a remote Linux or UNIX server</h1>
-<p>The following documentation explains how to install the Linux or UNIX server
-code, start the server daemon, and make a connection to a remote Linux
-or UNIX server. Look <a href="tbeginwindows.html">here</a> for setting up
-a server on <a href="tbeginwindows.html">Windows</a>.</p>
-<div>
-<div class="p">
-<p><b>Prerequisites</b></p>
-<p>To use the Remote System Explorer communications server daemon you need
-to install Perl. Using the daemon helps eliminate some of the manual steps
-when you connect to the server.</p>
-<p><b>Installing the server code</b></p>
-<div class="p">
-<ol>
-<li>
-Find the package that contains the server.
-The server code is usually packaged with the containing product and you should refer to that
-product's documentation for finding and installing the server package.
-The server is also available, however, on the Eclipse DSDP
-<a href="http://download.eclipse.org/dsdp/tm/downloads/">Target Management download site</a>
-as the package <b>rseserver-&lt;version&gt;-&lt;os&gt;.tar</b>. For example, rseserver-1.0-linux.tar contains the release 1.0 server
-for Linux. There are servers for Linux, AIX, a generic Unix version that can be tailored to your particular flavor
-of Unix, and an experimental Mac OS X version.</li>
-<li>Ensure that Perl is installed.</li>
-<li>Ensure that a Java Runtime Environment (JRE) version 1.4 or higher is installed.
-An IBM, Sun or equivalent JRE is required; The gcj-based jvm shipped with most Linux
-distributions does not work. If in doubt, run the command <br/><tt>java -version</tt> (see
-below) and check if there is a reference to gcj. You can download a Sun JRE from
-<a href="http://java.sun.com">http://java.sun.com</a>.</li>
-<li>Create a directory where you want to install the server code. The remainder
-of these instructions will assume the directory /opt/rseserver (suitable for
-team sharing), but you are free to use any directory.</li>
-<li>Upload the server package to this directory. You can use FTP.</li>
-<li>Switch to the /opt/rseserver directory by typing:
-<pre>cd /opt/rseserver</pre>
-</li>
-<li>Run the following command in the /opt/rseserver directory to extract the
-server code from the package appropriate to your operating system. For linux this command is:
-<pre>tar -xf rseserver-1.0-linux.tar</pre>
-</li>
-</ol>
-</div>
-
-<p><b>Starting the server</b></p>
-<div class="p">You can start the RSE communications
-server with the server daemon, or manually. Before starting the server, make
-sure the Java command is in your path, you can do this by running the following
-command:<pre>java -version</pre>
-</div>
-<div class="p">You should see something
-similar to the following:<pre>java version "1.4.1"
-Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1)
-Classic VM (build 1.4.1, J2RE 1.4.1 IBM build cxppc321411-20040301 (JIT enabled: jitc))</pre>
-</div>
-<div class="p">If
-you receive a "command not found" error, then try creating a symbolic link
-to the java command in /usr/bin by running the following command:<pre>ln -s /opt/IBMJava2-141/jre/bin/java /usr/bin/java</pre>
-</div>
-<div class="p"><b>To start the server with the server daemon</b>
-<ol>
-<li>Ensure that you are running using the root user ID. (If the daemon is
-not run under root, it will be unable to authenticate connecting users.) Run
-the following commands:<pre>su -l root
-cd /opt/rseserver
-perl ./daemon.pl [daemonPort] [serverPortRange]</pre>
-</li>
-</ol>
-Note that the server daemon runs on port 4035 by default. You can pass the optional
-daemonPort argument to force a different port if you want.<br/>
-If your daemon runs behind a firewall, you may want to specify the optional
-<i>serverPortRange</i> argument to restrict selected server ports to the
-range given:<pre>
-perl ./daemon.pl 4035 10000-10010</pre>
-
-<p><b>To start the server manually</b></p>
-<div class="p">If you do not have root access on a remote machine, you can
-start the server manually for your particular user id only. Run
-the following commands:<pre>cd /opt/rseserver
-perl ./server.pl [port]</pre>
-These commands run the server.pl
-script located in the /opt/rseserver directory. The port parameter to the server.pl script is
-optional. If you do not specify a port, then the server will pick the first
-one available and print the port number to standard out. By default, it is
-usually 4033. If you would like to use a different port, you will then have
-to enter this port number in port property for the Files subsystem for your
-connection in the Remote System Explorer (see <span class="uicontrol">Connecting to the
-Remote Server</span>, below). Otherwise, you do not need to change this
-property.</div>
-<div class="p"><div class="note">
-Note: When you connect RSE to the server, the server will terminate as
-soon as you disconnect the client. The daemon, however, will not terminate.
-</div></div>
-
-<p><b>Rexec Server Launcher</b></p>
-<div class="p">If you have Rexec access enabled to your remote system, you
-can also have the server started automatically by an Rexec command from the
-client, when you connect. To do so, use the Server Launcher Properties in
-the New Connection Wizard.
-</div>
-<p><b>Running the daemon at startup</b></p>
-<div class="p">You might instead want
-to configure the daemon to run at start up for Linux. To do so, you need to
-append a call to the daemon to your startup script. Add the following lines
-to the bottom of the /etc/rc.d/rc.local file:<pre>cd /opt/rseserver
-perl ./daemon.pl &amp;</pre>
-</div>
-<p><b>SSL Encryption and Firewalls</b></p>
-<div class="p">By default the RSE DStore connection is unencrypted. You
-can, however, configure it to use SSL encryption.
-<p>Because all dstore data transfer is done through a single TCP/IP
-connection, the connection can also be tunneled through an ssh channel.
-In fact, the same ssh channel can also be used to start the server,
-like in the following example:
-<pre>
-ssh -l moberhuber build.eclipse.org -L27127:build.eclipse.org:27127 \
- "sh -c 'cd ~/rseserver/latest; perl ./server.pl 27127'"
-</pre>
-Here, the RSE Server is started on port 27127 through an ssh connection,
-and at the same time port 27127 is forwarded through ssh to the local
-host. You can now connect RSE to localhost:27127, and the connection
-will transparently be forwarded to the remote system.
-</div>
-</div>
-</div><br></br>
-<p><b>Connecting to the Remote Server</b></p>
-<div class="p">To make a connection
-to your remote server:</div>
-<ol>
- <li><span>Switch to the Remote System Explorer perspective. From the workbench
-menu, click <span class="menucascade"><span class="uicontrol">Window </span> &gt; <span class="uicontrol">Open Perspective </span> &gt; <span class="uicontrol">Remote System Explorer</span></span>.</span></li>
- <li><span>In the Remote Systems view, <b>New Connection</b> is automatically
-expanded to show the various remote systems you can connect to through the
-Remote System Explorer. Expand <b>Linux</b> or <b>Unix</b> to
-invoke the new connection dialog box and configure a connection.</span></li>
- <li><span>Enter a name for your first profile and click <b>Next</b>. (This
-step only occurs if you have never defined a connection before.)</span></li>
- <li><span>Enter a connection name. This name displays in your tree view and
-must be unique to the profile.</span></li>
- <li><span>Enter the name or TCP/IP address of your Linux server in the <b>Host
-name</b> field, for example, LINUX_A.</span></li>
- <li><span>(Optional) Enter a <b>Description</b>. The description appears
-in the Properties view after the connection is created.</span></li>
- <li><span>Click <b>Finish</b> to define your system. </span></li>
-</ol>
-<div class="skipspace">
-<div class="attention"><span class="attentiontitle">Attention: </span>To check your port number, right-click your
-connection or subsystem from the Remote Systems view and select <b>Properties</b>.
-Click <b>Subsystem</b> to view the relevant information. If your port is "0,"
-then your Remote System Explorer communications server will pick any free
-port on the server. If you specified a port number when starting the server,
-you need to enter it here, for example, to work with a firewall.</div>
-</div>
-<div class="p">
-<div class="note"></div>
-</div>
-</div>
-<div>
-<p><b class="reltaskshd">Related tasks</b>
-<a href="tbeginwindows.html" title="">Connecting to a remote Windows
-server</a>
-<!-- TODO SSL configuration -->
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginpass.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginpass.html
deleted file mode 100755
index b8ac794f4..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginpass.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Saving passwords on your local PC</title>
-</head>
-
-<body>
-<h1>Saving passwords for remote systems</h1>
-<p>When you use the Remote System Explorer,
-you can save passwords for remote systems
-on your local PC. The stored passwords are
-then retrieved whenever a password is required
-to connect. When you save your password for
-a particular remote system, you will not
-be prompted to sign on when you try to connect
-to that system. </p>
-<p>When you first try to connect to a remote
-system, you will be prompted with the following
-dialog:</p>
-<img src="../images/pw.jpg"></img>
-<p>To save this password on your local PC:</p>
-<ol>
- <li>Enter your user ID</li>
- <li>Enter your password</li>
- <li>Select <b>Save user ID</b></li>
- <li>Select <b>Save password</b></li>
-</ol>
-<p>The next time that you connect to the remote
-system, you will not be prompted to sign
-on again.</p>
-<p><b>Note</b>: If you still want to be prompted for your
-user ID and password, right-click on the
-subsystem and select <b>Connect</b>. </p>
-<h2>Adding, changing, and removing stored passwords</h2>
-<p>You can use the password information page
-to add, change, and remove stored passwords
-for remote systems:</p>
-<ol>
- <li>Select <b>Window</b> -&gt; <b>Preferences</b></li>
- <li>Expand <b>Remote Systems</b></li>
- <li>Select <b>Passwords</b></li>
-</ol>
-<p>Use the Add, Change, and Remove buttons to
-manage your password information for remote
-systems. </p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecond.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecond.html
deleted file mode 100755
index df4b86dd0..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecond.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Creating a second connection to a remote server</title>
-</head>
-
-<body id="tbeginsecond"><a name="tbeginsecond"></a>
-<h1 class="topictitle1">Creating a second connection to a remote server</h1>
-<div class="p">
-<p>In the Remote System Explorer, you can create a second connection
-to the same, or a different type of server, such as Linux, UNIX, or Windows.
-You can also create a second connection to the same server with a separate job
-environment, for example, to specify different environment variables or different user IDs.</p>
-To create a second connection:
-</div>
-<div>
-<ol>
-<li><span>In the Remote Systems view, expand <b>New Connection</b>.</span></li>
-<li><span>Click the plus sign beside the type of server you to which you want to make a second connection. For example, Linux, UNIX, or Windows.</span></li>
-<li><span>Complete the dialog as you normally would, making sure that you give your new connection a unique name.</span></li>
-</ol>
-</div>
-<div>
-<p><b class="reltaskshd">Related tasks</b><br />
-<a href="tbeginenv.html" title="">Configuring environment variable support for connections</a><br/>
-<a href="tbeginwindows.html" title="">Connecting to a remote Windows server</a><br/>
-<a href="tbeginlinux.html" title="">Connecting to a remote Linux or UNIX server</a><br/>
-</p>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecprofile.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecprofile.html
deleted file mode 100755
index 06de9db68..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecprofile.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Creating a second profile</title>
-</head>
-
-<body id="tbeginsecprofile">
-<a name="tbeginsecprofile"></a>
-<h1 class="topictitle1">Creating a second profile</h1>
-<p>You might want to create a second profile for connections and data that belong to a particular version of a software release, and are
-shared by all team members.</p>
-<p>To create a second profile:
-<ol>
-<li>Click the Menu button <img src="../images/gsarrow.gif" alt=""/> on the toolbar for the Remote Systems view and select <b>New profile</b>.</li>
-<li>Specify a name for the new profile and click <b>Finish</b>.</li>
-</ol>
-</p>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="tbegindeleteprofile.html" title="">Deleting a profile</a><br/>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginwindows.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginwindows.html
deleted file mode 100755
index 1e2f7be46..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginwindows.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Connecting to a remote Windows server</title>
-</head>
-
-<body id="tbeginlinux">
-<a name="tbeginlinux"></a>
-<h1 class="topictitle1">Connecting to a remote Windows server</h1>
-<div>
-<p>The following documentation explains how to install the Windows server
-code, start the server daemon, and make a connection to a remote Windows
-server. Look <a href="tbeginlinux.html">here</a> for setting up
-a server on <a href="tbeginlinux.html">Linux, General UNIX or Mac</a>,
-and additional configuration options.</p>
-<div class="p">
-<p><b>Installing the server code</b></p>
-<div class="p">
-<ol>
-<li>
-Create a directory where you want to install the server code. The
-remainder of these instructions will assume the directory name and location is
-C:\rseserver, but you are free to use any directory you choose.</li>
-<li>Find the package that contains the server.
-The server code is usually packaged with a containing product and you should refer to that
-product's documentation for finding and installing the server package.
-The server is also available, however, on the Eclipse DSDP
-<a href="http://download.eclipse.org/dsdp/tm/downloads/">Target Management download site</a>
-as the package <b>rseserver-&lt;version&gt;-&lt;os&gt;.zip</b>. For example, rseserver-1.0-windows.zip contains the release 1.0 server
-for Windows.</li>
-<li>Copy the rseserver.zip to the C:\rseserver directory (this could be on a different machine).</li>
-<li>Using an unzip utility to extract the server code to the C:\rseserver directory.</li>
-</ol>
-</div>
-<p><b>Starting the server</b></p>
-<p>You can start the RSE communications server with the server manually, or with a daemon.</p>
-
-<div class="p"><b>To start the server with a the server daemon:</b>
-<ol>
-<li>Simply double click the <code>daemon.bat</code> program to start a server daemon.</li>
-<li>You can edit the <code>daemon.bat</code> file to change properties for the daemon,
-like a specific daemon port to use or to force a port range for the server
-(in order to comply with firewalls).</li>
-</ol>
-<blockquote>
-<p>Note that the server daemon <b>does not</b> enforce any user
-authentication. If you run the server daemon, any user can connect to the machine, work
-with the file system and run commands.
-<span style="font-weight: bold;">Use of the server daemon on Windows systems is not recommended</span>.
-</p>
-The server daemon runs on port 4035 by default. You can pass the optional
-daemonPort argument to force a different port if you want.<br/>
-If your daemon runs behind a firewall, you may want to specify the optional
-<i>serverPortRange</i> argument to restrict selected server ports to the
-range given:<pre>
-daemon.bat 4035 10000-10010</pre>
-</blockquote>
-</div>
-
-<div class="p"><b>To start the server manually:</b>
-<ol>
-<li>Simply double click on the <code>server.bat</code> program to start a
-dstore server. The server will pick the first port available and print
-the port number. By default, it is usually 4033.
-You will then have to enter this port number in port property for the
-Files subsystem for your connection in the Remote System Explorer.</li>
-<li>For security reasons, the server will only wait a limited time
-until a client connects (12000 seconds by default).</li>
-<li>In order to start the server with an exactly specified port or
-timeout, open a Windows command prompt and enter:
-<pre>
-c:<br/>
-cd \rseserver<br/>
-server.bat [port] [timeout]
-</pre>
-</li>
-<li>When you connect RSE to the server, the server will terminate as soon as you
-disconnect the client. The daemon, however, will not terminate.</li>
-</ol>
-</div>
-</div>
-
-<div class="p"><b>To connect to a remote Windows server:</b>
-<ol>
-<li><span>Switch to the Remote System Explorer perspective.</span></li>
-<li><span>In the Remote Systems view, <b>New Connection</b> is
-automatically be expanded to show the various remote systems you can connect to
-through the Remote System Explorer. Expand <b>Windows</b> to invoke a dialog
-and configure a connection.</span></li>
-<li><span>Enter a name for your first profile and click <b>Next</b>.
-(This step only occurs if you have never defined a connection before.)</span></li>
-<li><span>Enter a connection name. This name displays in your tree
-view and must be unique to the profile.</span></li>
-<li><span>Enter the name or TCP/IP address of your Windows server in
-the <b>Host Name</b> field, for example, jsandler.</span></li>
-<li><span>Enter a <b>Description</b>(optional); the description
-appears in the Properties view after the connection is created.</span></li>
-<li><span>Click <b>Finish</b> to define your system. </span></li>
-</ol>
-</div>
-
-<div class="p">
-<div class="note"><span class="notetitle">Note: </span>To check your
-port number, right-click your connection or subsystem
-from the Remote Systems view and select <b>Properties</b>. Click <b>Subsystem</b>
-to see the relevant information. If your port is "0," then your Remote
-System Explorer communications server will pick any free port on the Windows
-server. If you specified a port number when starting the server, you need to
-enter it here, for example, to work with a firewall.</div>
-</div>
-</div>
-<div>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="tbeginlinux.html" title="">Connecting to a remote Linux or UNIX server</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tbuild.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbuild.html
deleted file mode 100755
index 080588f99..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbuild.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Exporting resources to a remote file system</title>
-</head>
-
-<body id="tremoexp"><a name="tremoexp"><!-- --></a>
-<h1 class="topictitle1">Building programs on a remote system</h1>
-<div>
-<p>A configuration in the External Tools dialog lets you build programs on remote systems.</p>
-<div class="p">To build programs on a remote system:</div>
-<ol>
-<li><span>Select <span><b>Run</b> &gt; <b>External Tools</b> &gt; <b>External Tools</b></span> from the workbench menu bar. The External Tools dialog opens.</span></li>
-<li><span>Right click on <b>Remote Build</b> and select <b>New</b>. A remote build configuration is created.</span></li>
-<li><span>Choose the connection for the remote system or create a new one.</span></li>
-<li><span>Type the build command or browse the file system to find the build command</span></li>
-<li><span>Type or select the working directory. This is the directory where the command will be run.</span></li>
-<li><span>Enter the arguments to the build command.</span></li>
-<li><strong>Optional: </strong><span>Select the checkbox to specify that there is an associated project with this
-build command. If the command operates on a set of remote files (for example, a command such as 'make'), the Remote System
-Explorer will interpret any errors or other messages and allow you to double click on them to open the source.
-Specifying this option means the Remote System Explorer will open the source from a local project (that is, it will
-not open the remote source). This is useful if you are developing a program from a local project.</span></li>
-<li><strong>Optional: </strong><span>Select the checkbox to specify that local files should be exported before the
-build command is executed. This is useful if you are developing your remote application from a local project. In such
-cases, you would export the files from the workspace to the remote system using the <b>Remote file system</b> export wizard.
-That wizard lets you save the settings of the export to a file. The settings file contains information about which
-files were exported and various export options. You can specify this settings file here. This configuration will use
-the settings file to do the export and when the export is completed it will execute the build command. This ensures
-that the local source you are working on is always sent to the remote system before the build takes place.</span></li>
-<li><span>Click on <b>Apply</b> to save the configuration. Click on <b>Run</b> to execute it.</span></li>
-</ol>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tedittype.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tedittype.html
deleted file mode 100755
index ee577644a..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tedittype.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Editing an existing type</title>
-</head>
-
-<body id="tedittype"><a name="tedittype"><!-- --></a>
-<h1 class="topictitle1">Editing an existing type</h1>
-<div>
-<div class="p">To edit an existing type: </div>
-<ol>
-<li><span>In the Remote Systems view, right-click on a file subsystem, and select <span><b>Work With </b> &gt; <b>Named
-Types</b></span>.</span></li>
-<li><span>On the Work With Named Types window, expand <b>Object </b> or <b>Member</b>.</span></li>
-<li><span>Select your defined type from the list. You cannot edit any predefined types.</span></li>
-<li><span>Make the required changes.</span></li>
-<li><span>Click <b>Apply</b>.</span></li>
-</ol>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br />
-<a href="../concepts/cuseractions.html" title="">User actions (user options)</a><br />
-</p>
-<p><b class="reltaskshd">Related tasks</b><br />
-<a href="tremtype.html" title="">Removing an existing type</a><br />
-</p>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagedel.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagedel.html
deleted file mode 100755
index 6d62b018f..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagedel.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2003, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Deleting filters in the Remote Systems view</title>
-</head>
-
-<body>
-<a name="tmanagedel"></a>
-<h1 class="topictitle1">Deleting filters</h1>
-<div>
-<div class="p">Deleting a filter does not delete any elements that you
-managed with
-that filter. The action only deletes your specific configuration for
-that
-filter. To delete a filter:</div>
-<ol>
- <li><span>In the Remote Systems view, expand your connection, and
-then expand <b>Files</b>. </span></li>
- <li><span>Right-click your filer and select <b>Delete</b>.</span>
- </li>
-</ol>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanageedit.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tmanageedit.html
deleted file mode 100755
index ad2cc1dc5..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanageedit.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2003, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Changing filters</title>
-</head>
-
-<body>
-<a name="tmanageedit"></a>
-<h1 class="topictitle1">Changing filters</h1>
-<div>
-<div class="p">You can change a filter if you want to alter
-the host items that it displays in the Remote
-Systems view. When you change a filter, you
-can also add extra conditions to what is
-filtered. For example, if you have a filter
-that displays all files of type *.c, you
-may also want to add an additional filter string that
-will display files of type *.h also. To change
-a filter:</div>
-<ol>
-<li><span>In the Remote Systems view, expand your connection name,
-and then expand <b>Files</b> to see a list of filters.</span></li>
-<li><span>Right-click the filter and select <b>Change</b>.</span></li>
-<li><span>In the pop-up window, edit the conditions that are filtered
-and click <b>Apply</b>.</span>
-<ul>
-<li>If you want to add extra conditions, as described in the
-introduction to this topic, click <b>New filter string</b> and complete the dialog.
-Click <b>Create</b>.</li>
-</ul>
-</li>
-<li><span>Click <b>OK</b>.</span></li>
-</ol>
-<div class="p"></div>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagemem.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagemem.html
deleted file mode 100755
index fbafbb5ea..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagemem.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2003, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Creating file filters</title>
-</head>
-
-<body>
-<h1>Creating file filters</h1>
-<p>File filters list a set of files and folders from your host in the Remote Systems view.</p>
-<ol>
-<li>In the Remote Systems view, expand your connection and then expand <b>Files</b>.</li>
-<li>Right-click <b>Files</b>, or your filter pool, and select <b>New</b> &gt; <b>Filter</b>.</li>
-<li>Browse, specify, or select from the <b>Fold</b> drop-down list the folder that contains the appropriate files and folders.</li>
-<li>Enter a generic or specific file name in the <b>File name filter</b> field. The default is * (asterisk). You can, for example, enter s* to list all files that start with s.</li>
-<li>(Optional) To select a specific file type, enter the type in the <b>File types</b> field, or click <b>Select</b> to select from all known file types.</li>
-<li>Use the <b>Show files only</b> check box to select whether you want to list only files.</li>
-<li>Click <b>Next</b>.</li>
-<li>Enter a name for your filter and select the profile that you want to use. Use an individually created profile to keep your work private, or select the Team profile to share with others.</li>
-<p>Note: Filters are named so that the Remote System Explorer can save them for future use.</p>
-<li>Click <b>Next </b>to see more text information about the filter or click <b>Finish</b>.</li>
-</ol>
-Your new file filter is displayed in the Remote Systems view under Files.
-<p><b>Related tasks</b><br/>
-<a href="tmanageedit.html">Changing filters</a><br/>
-<a href="tmanagepools.html">Configuring filter pools</a></p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagepools.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagepools.html
deleted file mode 100755
index 4b4e1a1c9..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagepools.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Configuring filter pools</title>
-</head>
-
-<body id="tmanagepools">
-<a name="tmanagepools"></a>
-<h1 class="topictitle1">Configuring filter pools</h1>
-<div>
-<div class="p">
-<p>If you have been using the Remote System Explorer for some
-time, your workspace might contain too many filters to navigate easily.
-Or,
-you might just want to keep groups of filters separate if, for example,
-you
-need to represent two distinct server environments in the Remote System
-Explorer,
-regardless of how many filters you have. In either case, you can group
-filters
-into <i>filter pools</i>. </p>
-<p>All filters live in filter pools, but these remain hidden unless you choose
-to manage them explicitly. If you do not manage them yourself the Remote
-System Explorer manages them for you and all of your filters appear together
-in all connections. When you create filter pools, however, any filter you
-create within that filter pool is only present in connections that reference
-that filter pool, and will not appear in any other connections. (See the
-related links for more information about filter pools.)</p>
-To illustrate the
-use of filter pools,</div>
-<ol>
- <li><span>Click the menu button <img src="../images/gsarrow.gif" alt=""/> on
-the toolbar for the Remote Systems view, and select <b>Show Filter
-Pools</b>.</span></li>
- <li><span>Expand the <span style="font-weight: bold;">Local </span>system
-and the <span style="font-weight: bold;">Local Files</span> subsystem,
-and you can now see your filters
-listed under <b><i>Connection name</i> Filter Pool</b>.</span></li>
- <li><span>Right-click <b>Local Files</b> and select <b>New &gt;
-Filter Pool</b>.</span></li>
- <li><span>Enter a pool name and click <b>Finish</b>. (You do not
-need to
-change your profile selection.) Your new filter pool displays
-underneath your
-connection.</span></li>
- <li><span>Right-click your new filter pool and select <b>New &gt;
-Filter</b><b></b>.</span></li>
- <li><span>Complete the wizards as you normally would (see related
-tasks).
-When you are finished, you can see your new filters displayed in your
-new filter pool.</span></li>
-</ol>
-<div class="p">If you decide not to see the filter pools anymore, click
-the menu
-button <img src="../images/gsarrow.gif" alt=""/> on the toolbar for the
-Remote
-Systems view, and select <b>Show Filter Pools</b> again to deselect
-the check
-mark.</div>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br></br>
-<a href="../concepts/cfilters.html" title="">Remote System Explorer
-filters, filter pools, and filter pool references</a><br></br>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagepoolsref.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagepoolsref.html
deleted file mode 100755
index 052d38fcc..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagepoolsref.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Configuring filter pool references</title>
-</head>
-
-<body id="tmanagepools"><a name="tmanagepools"><!-- --></a>
-<h1 class="topictitle1">Configuring filter pool references</h1>
-<div>
-<div class="p">
-<p>You can share filter pools among many connections through
-the use of a <i>filter pool reference</i>. A filter pool reference is a mechanism
-that displays a filter pool from one connection in any other connection, so
-that when you make a change to the original filter pool, your change is reflected
-your filter pool reference.</p>
-<div class="p">Before
-you create a filter pool reference, ensure that you have already completed
-the following (see related tasks for more information):
-<ul>
-<li>You have defined more than one connection to the same server</li>
-<li>You have defined more than one filter pool</li>
-<li>You have enabled <b>Show Filter Pools</b> from the Remote Systems view toolbar</li>
-</ul>
-</div>
-<p>To use filter pools references:</p>
-<ol>
-<li><span>In the Remote Systems view, expand the connection where you want
-to display a filter pool that exists in another connection.</span></li>
-<li><span>Right-click on a file subsystem and select <b>New &gt; Filter Pool
-Reference &gt; <i>your profile</i> &gt; <i>name of pool</i></b>.</span></li>
-<li><span>Look under that subsystem again and you will see the filter
-pool reference.</span></li>
-</ol>
-<div class="p">To delete a filter pool reference, right-click it and select <b>Remove
-reference</b>. You can also move your filter pools up and down with the
-right-click menu.
-</div>
-</div>
-<div>
-<p>
-<b class="relconceptshd">Related concepts</b><br />
-<a href="../concepts/cfilters.html" title="">Remote System Explorer filters, filter pools, and filter pool references</a><br />
-</p>
-<p>
-<b class="reltaskshd">Related tasks</b><br />
-<a href="tmanagepools.html" title="">Configuring filter pools</a><br />
-<a href="tbeginsecond.html" title="">Creating a second connection to a remote server</a><br />
-</p>
-</div>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagesearch.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagesearch.html
deleted file mode 100755
index ce85912fc..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagesearch.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Search for text and files on remote servers</title>
-</head>
-
-<body id="tmanagesearch"><a name="tmanagesearch"><!-- --></a>
-<h1 class="topictitle1">Search for text and files on remote servers</h1>
-<div>
-<p>You can search for text strings and files on any remote server
-or file system, including Linux, UNIX, and Windows systems.</p>
-<div class="p">There are three main ways you can search for files and text strings
-on remote servers, depending on your goal:
-<ul>
-<li>Search for text strings within a file</li>
-<li>Search for text strings and/or files within a folder</li>
-<li>Search for text strings, files, and/or folders within a remote file system</li>
-</ul>
-To search for files, text strings, and folders:
-<ol>
-<li>In the Remote Systems view, expand your iSeries, Linux, UNIX, or Windows
-connection until you reach the folder, file, or file system that you want
-to search. Select the containing item by clicking on the item.</li>
-<li>Right-click and select <b>Search</b>. Or, click <b>Search &gt; Remote</b> from
-the workbench menu. Or, for the keyboard shortcut, enter CTRL+H. All of these
-actions will invoke the Search window. </li>
-<li>In the Remote Search window, click the Remote Search tab if it is not
-already in focus. You can now search for text strings, files, and/or folders,
-with the option to use powerful Regular Expressions, in addition normal and
-variable expressions, such as a*b. See <a href="../ref/rsearch.html">Using
-search parameters with special characters</a> for more information. Regular
-Expressions might be most familiar to Linux and Unix users.
-For more information on Regular Expressions, see
-<a href="http://www.english.uga.edu/humcomp/perl/regex2a.html" target="_blank">http://www.english.uga.edu/humcomp/perl/regex2a.html.</a>
-<ul>
-<li>To search for strings, in the <b>Search string</b> field, enter the string
-that you want to search for, whether it be from a file, a folder, or an entire
-file system. Select the <b>Case sensitive</b> or <b>Regular expression</b> check
-boxes if they apply. Leave this field as an asterisk (*) if you do not want
-to search for strings. You can use commas to specify more than one type of
-string to search for. For example, you could enter "*.c, *.java, b?a.txt,
-" and so on.</li>
-<li>To search for files, in the <b>File name patterns</b> field, enter the
-name of the file you are looking for. Check the <b>Regular expression</b> check
-box if this option applies. Leave this field as an asterisk (*) if you do
-not want to search for files. You can use commas to specify more than one
-type of folder to search for. You can also click <b>Browse</b> to select file
-extensions to search for.</li>
-</ul>
-<div class="note"><span class="notetitle">Note: </span>
-You cannot edit the contents of the <b>Folder</b> field; however,
-you can click the <b>Browse</b> button to browse to and specify another folder.
-If the <b>Folder</b> field is empty, you need to browse to a particular folder
-before you can launch the search.
-</div>
-</li>
-<li>Click <b>Search</b>.</li>
-</ol>
-The matching strings and/or files display in the Remote Search view.
-The view updates itself as more matches are found and you can click the <b>Stop</b> button
-if you want to stop the search process. The view shows the strings and/or
-files that you searched for, with the matches listed beneath in a tree-view
-structure. For example, if you searched the file "README.txt" for the following
-string, "*bin*", then the Remote Search results view might look like this:
-<p><br /><img src="../images/search.gif" alt="" /><br /></p>
-<div class="p">To manipulate the set
-of search results:
-<ul>
-<li>Right-click the parent items of the tree, in this example, "README.txt",
-and you can select any of the regular Remote Systems options, for example, <b>Open
-With</b>, <b>Rename</b>, <b>Properties</b>, and so on.</li>
-<li>Right-click any line beneath the parent search item in the tree, in this
-example, "bin/rmid and jre/bin/rmid":
-<ul>
-<li>Select <b>Copy</b> to copy the path as you see it to your clipboard.</li>
-<li>Select <b>Go to</b> to open the file in an editor, which highlights the matching text. You can double-click on any line to perform the same action.</li>
-</ul>
-</li>
-</ul>
-</div>
-</div>
-</div>
-<div>
-<p><b class="relrefhd">Related reference</b><br />
-<a href="../ref/rsearch.html" title="">Using search parameters with special characters</a><br />
-</p>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tremoexp.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tremoexp.html
deleted file mode 100755
index 1204d7e90..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tremoexp.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Exporting resources to a remote file system</title>
-</head>
-
-<body id="tremoexp"><a name="tremoexp"><!-- --></a>
-<h1 class="topictitle1">Exporting resources to a remote file system</h1>
-<div>
-<p>A page in the Export wizard enables you to export resources from the workspace to a remote file system.</p>
-<div class="p">To export resources from the workspace:</div>
-<ol>
-<li><span>Select <span><b>File</b> &gt; <b>Export</b></span> from the workbench menu bar. The Export wizard opens.</span></li>
-<li><span>Select <b>Remote file system</b>. Click <b>Next</b>.
-The Remote file system page opens.</span></li>
-<li><span>Use the left and right panes to select resources to export. Choose
-individual resources from the right pane, or entire folders from the left
-one.</span></li>
-<li><span>In the <b>Folder</b> field, select or browse for
-the destination folder.</span></li>
-<li><strong>Optional: </strong><span>Select the check box to overwrite (without
-prompting) files of the same name in the remote folder.</span></li>
-<li><span>Select one of the radio buttons to either replicate the workspace
-folder structure in the remote system or create only the actual folders you
-have selected.</span></li>
-<li><strong>Optional: </strong><span>Select the check box to save the settings of this
-export to a file. You can later right click on the file in the Navigator or other views
-and export the same set of files without having to use the export wizard.</span>
-<ul><li><strong>Optional: </strong><span>Deselect the checkbox to export only the set of files
-that have changed since the last export. This is selected by default. It ensures that only files
-that have changed since the last export will be exported next time and provides better performance.</span></li>
-</ul>
-</li>
-<li><span>When you have specified the destination directory, click <b>Finish</b> to
-export the resources to the remote system.</span>
-</li>
-</ol>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tremoimp.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tremoimp.html
deleted file mode 100755
index 16e3a88e9..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tremoimp.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Importing resources from a remote file system</title>
-</head>
-
-<body id="tremoimp"><a name="tremoimp"><!-- --></a>
-<h1 class="topictitle1">Importing resources from a remote file system</h1>
-<div>
-<p>A page in the Import wizard enables you to import resources from a remote file system to the workspace.</p>
-<div class="p">To import resources to the workspace:</div>
-<ol>
-<li><span>Select <span><b>File</b> &gt; <b>Import</b></span> from the menu bar. The Import wizard opens.</span></li>
-<li><span>Select <b>Remote file system.</b> Click <b>Next</b>.
-The Remote file system page opens.</span></li>
-<li><span>Select or type a source folder, or click <b>Browse</b> to
-select a folder from the <b>Browse For Folder</b> window. </span> Note that you can create a connection from this window.</li><li><span>Use the left and right panes to select resources to import. Choose
-individual resources from the right pane, or entire folders from the left
-one. You can select files from multiple projects.</span></li>
-<li><span>In the second <b>Folder</b> field, specify the
-destination for the imported resources.</span></li>
-<li><strong>Optional: </strong><span>Select the check box to overwrite (without prompting) files of the same name in the workspace.</span></li>
-<li><span>Select one of the radio buttons to either replicate the remote folder structure in the workspace or create only the actual folders you have selected.</span></li>
-<li><span>When you have specified the source and destination, click <b>Finish</b> to import the resources to the workspace.</span></li>
-</ol>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tremtype.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tremtype.html
deleted file mode 100755
index 13110dffd..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tremtype.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Removing an existing type</title>
-</head>
-
-<body id="tremtype"><a name="tremtype"><!-- --></a>
-<h1 class="topictitle1">Removing an existing type</h1>
-<div>
-<div class="p">To remove an existing type: </div>
-<ol>
-<li><span>In the Remote Systems view, right-click on a subsystem, and select <span><b>Work With </b> &gt; <b>Named Types</b></span>.</span></li>
-<li><span>On the Work With Named Types window, expand <b>Object</b> or <b>Member</b>.</span></li>
-<li><span>Select your defined type from the list. You cannot remove any predefined types.</span></li>
-<li><span>Click <b>Remove</b>.</span></li>
-</ol>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br />
-<a href="../concepts/cuseractions.html" title="">User actions (user options)</a><br />
-</p><p><b class="reltaskshd">Related tasks</b><br />
-<a href="tedittype.html" title="">Editing an existing type</a><br />
-</p>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/truncmdsview.html b/rse/doc/org.eclipse.rse.doc.user/tasks/truncmdsview.html
deleted file mode 100755
index 7df511ab2..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/truncmdsview.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Running and viewing commands using the Remote Shell view </title>
-</head>
-
-<body id="truncmdsview"><a name="truncmdsview"><!-- --></a>
-<h1 class="topictitle1">Running and viewing commands using the Remote Shell view </h1>
-<div>
-<div class="p">You can open a shell for your local and remote systems, from the
-Remote System Explorer, <p><b>Opening the Remote Shell view and launching
-a command shell</b></p>
-<p>In the Remote System Explorer, switch to the Remote Shell view by clicking <b>Window &gt; Show View &gt; Remote Shell</b> from
-the menu bar. To open a new shell in the Remote Shell view, click the down
-arrow in the view and select <b>Launch shell</b>. To launch a new shell for
-another connection requires that an existing shell for that connection is
-selected in the view. Otherwise, the shell must be launched from the Remote
-Systems, Remote System Details, or the Remote Shell view.</p>
-<p><b>Working with shells</b></p>
-<p> When the Remote Shell view is open, you can work
-with shells. A shell that
-preserves its environment across commands. The environment for all commands
-in the shell may change in response to your input. For example, if you type
-<pre>cd ..</pre>
-you change the working directory for that shell.</p>
-<p><b>Viewing output in an editor</b></p>
-<p>You can double-click a line of output to open
-it in an editor. For example, if you encounter an error while running a command,
-you can double-click the error and the editor opens the source to the line
-of code where the parser found a problem.</p>
-<p><b>Closing shells</b></p>
-<p>The <b>Cancel shell</b> toolbar item is enabled when the currently displayed shell or command
-is active. Press <b>Cancel Shell</b>, to terminate that process.
-If the shell is active, it cancels the shell before removing it from the view.</p>
-<p><b>Content assist</b></p>
-<p>The Remote Shell view supports content assist. You can press CTRL+space to complete file names
-or environment variable names while you type commands.</p>
-<p></p>
-</div>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br />
-<a href="../concepts/crunremcmds.html" title="">Shells and commands in the Remote Systems view</a><br />
-</p><p><b class="reltaskshd">Related tasks</b><br />
-<a href="twrkcmdshl.html" title="">Working with command shells</a><br />
-</p>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/ttablecopy.html b/rse/doc/org.eclipse.rse.doc.user/tasks/ttablecopy.html
deleted file mode 100755
index 807074c65..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/ttablecopy.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Copying and pasting in the Remote System Explorer</title>
-</head>
-
-<body>
-<h1>Copying and pasting in the Remote System Explorer</h1>
-<p>You can copy and paste files not only between
-files and folders, but between different
-host systems as well. For example, you can
-copy a file from one folder on your host
-to another, or from one type of system to
-another. You can select multiple files as
-well. However, there are guidelines for what
-kinds of items you can and cannot copy and
-paste. In the Remote Systems view, expand
-the two connections (that represent the two
-hosts) until you see the file that you want
-to copy and the location on the other host
-where you want to paste the file.</p>
-<p>To copy and paste:</p>
-<ol>
-<li>Right-click the original file to select it and select <b>Copy</b>.</li>
-<li>Navigate through the directories and files until you find the place where you want to paste the file.</li>
-<li>Right-click on the parent file that contains the files where you want to paste your file, and select <b>Paste</b>.</li>
-</ol>
-<p><b>Related tasks</b><br/>
-<a href="ttabledrag.html">Dragging and dropping items in the Remote System Explorer</a><br/>
-</p>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/ttabledrag.html b/rse/doc/org.eclipse.rse.doc.user/tasks/ttabledrag.html
deleted file mode 100755
index 70095e99f..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/ttabledrag.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2003, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Dragging and dropping items in the Remote System Explorer</title>
-</head>
-
-<body>
-<a name="ttabledrag"></a>
-<h1 class="topictitle1">Dragging and dropping items in the Remote System Explorer</h1>
-<div>
-<div class="p">
-<div class="p">You can drag and drop files between different
-hosts, such as Local, Linux, UNIX, or Windows.
-Additionally, you can drag and drop items
-within one view; for example, in the Remote
-Systems view, or you can drag and drop items
-between views; for example, from the Remote
-Systems view to the Remote Systems Details
-view. When you drag and drop items, you copy,
-rather than cut, the item that you move.
-If you want to remove an item completely
-and put it in another location, drag and
-drop the item first, and then delete the
-item from the original location.</div>
-<p>To drag and drop files or objects:<br/>
-</p>
-<ol>
-<li>In the Remote Systems view, expand the two connections (that
-represent the two hosts) until you see the file you want to copy and the location
-on the other host where you want to paste the file. Or, open two
-views that contain the item and the destination.</li>
-<li>Click the item once to select it, hold down the left mouse button
-while you drag the item to the desired location, and then release the button.</li>
-</ol>
-</div>
-</div>
-<div>
-<p><b>Related tasks</b><br clear="all"/>
-<a href="ttablecopy.html" title="">Copying and pasting in the Remote System Explorer</a><br clear="all"/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tteamsup.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tteamsup.html
deleted file mode 100755
index fd193f8ad..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tteamsup.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Using team support</title>
-</head>
-
-<body id="tteamsup">
-<a name="tteamsup"><!-- --></a>
-<h1 class="topictitle1">Using team support</h1>
-<div>
-<div class="p">You can use any Eclipse-enabled repository from any
-vendor. The following
-information describes project-sharing using Concurrent Versions System
-(CVS) support that comes with Eclipse. Steps and user interface
-elements will differ depending on the repository
-support that you have installed.
-<div class="note"><span class="notetitle">Note: </span>When you
-synchronize your RemoteSystemsConnection project with the repository
-the first time, you will see many files in conflict.
-This is because it takes one synchronization to properly align
-the server's encoded version information with your local files. This
-happens only once and you can just receive all of the incoming changes
-and your local workspace will then be synchronized with the server. You
-might also find inactive profiles that belong to other teammates in the Team
-view after you synchronize with the central server. You can choose whether
-or not to activate these profiles in the Team view if you want to see the
-profile's contents in the Remote System Explorer on your local workstation.</div>
-<p>In a team programming environment, team members do work in their own workbench,
-isolated from others. Eventually they will want to share their work with
-their teammates.&nbsp; The Remote System Explorer allows them to share
-their connections, filter pools, and filters. To share these resources:</p>
-</div>
-<ol>
-<li class="skipspace">In the Remote System Explorer perspective, select the Team tab which by
- default is located in the same pane as the Remote Systems view.&nbsp; This
- will bring the Team view to the front of the Remote System Explorer.&nbsp;
- You can also use the&nbsp;<img src="../images/gsarrow.gif" title="" alt="menu" style="width: 24px; height: 23px;"/>
-button on the Remote Systems view and select the <span style="font-weight: bold;">Work
-With Profiles</span> action.<span> </span></li>
-<li class="skipspace"><span>Expand <b>RemoteSystemsConnections</b>. The profiles that you have defined, as well as the Team profile, are displayed. The Team profile is created by the Remote System Explorer to use for sharing connections, filter pools, and filters if you do not want to share them in a profile that you create and manage.</span></li>
-<li class="skipspace"><span>Right-click on <b>RemoteSystemsConnections</b>
-and select <span><b>Team</b> &gt; <b>Share Project</b></span> . </span></li>
-<li class="skipspace"><span>Select <b>CVS</b> and click <b>Next</b>.</span></li>
-<li class="skipspace"><span>Select <b>Use existing repository
-location </b> if you have already defined a CVS repository. Select <b>Create a new
-repository</b> location if you need to define a CVS repository (this
-information should be available from the person who configured the CVS
-repository on the server). To create a CVS repository definition:</span>
- <ol type="a">
- <li class="skipspace"><span>In the <b>Host</b> field, type the
-address of the server, for example mymachine.com. </span></li>
- <li class="skipspace"><span>In the <b>Repository path</b> field,
-type the path to the repository on the server, for example /home/test, d:/test. </span></li>
- <li class="skipspace"><span>In the <b>User</b> field, type the
-user name to use to connect to the repository. </span></li>
- <li class="skipspace"><span>In the <b>Password</b> field, type
-the password for the user name. </span></li>
- <li class="skipspace"><span>From the <b>Connection Type</b>
-list, select the authentication protocol of the CVS server. There are three
-connection methods that come with the Eclipse CVS client: </span>
- <ul>
- <li><b>pserver</b>: A CVS specific connection method. </li>
- <li><b>extssh</b> : An SSH 1.0 client included with the workbench. </li>
- <li><b>ext</b>: The CVS ext connection method that uses an
-external tool such as SSH to connect to the repository. The tool used
-by ext is configured in the<span><b>Team</b> &gt; <b>CVS</b> &gt; <b>EXT
-Connection Method</b></span> preference page. </li>
- </ul>
- </li>
- <li class="skipspace"><span>If the server uses a custom port,
-enable <b>Use Port</b> and
-enter the port number. </span></li>
- </ol>
- </li>
- <li class="skipspace"><span>Click <b>Finish</b>. The repository
-location is
-created. The <span style="font-weight: bold;">RemoteSystemsConnections</span> project will be created remotely and the Synchronize view will open and
- allow you to commit its resources to the server. If the project already
- exists remotely, the Synchronize view will show conflicts on any files
- that exist both locally and remotely. If the </span><span><span
- style="font-weight: bold;">RemoteSystemsConnections</span> </span><span>project
-already exists in the repository when you first share it, there may be
-many conflicts. Generally, these are not real conflicts, but simply considered
-conflicts on the first synchronize because there is no local CVS information for the
-resources in your workspace.
-If you have not created any resources in your Team profile, you can
-safely send or receive all of the conflicting files. If you have created
-resources in your Team profile, you should check each conflicting file to ensure
-there really are no differences, and if there are, resolve them by merging.</span></li>
- <li class="skipspace"><span>To synchronize your resources with those
-in the associated repository, right-click on the <span style="font-weight: bold;">RemoteSystemsConnection
- </span>project, and select <span><b>Team</b> &gt; <b>Synchronize
-with Repository</b></span>.</span></li>
- <li class="skipspace"><span>After sharing or synchronizing, and
-receiving incoming resources from the repository, right-click on the <span
- style="font-weight: bold;">RemoteSystemsConnection </span>project,
-and select <b>Reload Remote System Explorer</b>. This refreshes
-the Remote System Explorer and Team view to reflect the new or changed
-resources.</span></li>
-</ol>
-</div>
-<div class="nested1" id="tviewproject"><a name="tviewproject"><!-- --></a>
-<h2 class="topictitle2">Viewing the project resources in the Navigator
-view</h2>
-<div>
-<div class="p">The Navigator view provides a hierarchical view of all
-the resources in the workspace. From here, you can view the contents of the projects
-that are shared, including the <span style="font-weight: bold;">RemoteSystemsConnection
-</span>project, and select team-related actions on particular
-resources. By default, the Navigator view is included in the Resources perspective.
-To add it to the current perspective,
-<ol>
- <li>Select <span><b>Window</b> &gt; <b>Show View</b> &gt; <b>Other</b></span>.</li>
- <li>Expand <b>Basic.</b> </li>
- <li>Select <b>Navigator.</b></li>
-</ol>
-</div>
-<div class="p"><img src="../images/navigator.jpg" alt=""/></div>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="../concepts/cteam.html" title="">Team support</a><br/>
-<a href="../concepts/cprofile.html" title="">Remote System Explorer
-Profiles</a><br/>
-</p>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="tteamsup1.html" title="">Working with profiles and team support</a><br/>
-</p>
-</div>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tteamsup1.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tteamsup1.html
deleted file mode 100755
index bfbcd2285..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tteamsup1.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Working with profiles and team support</title>
-</head>
-
-<body id="tteamsup1">
-<a name="tteamsup1"></a>
-<h1 class="topictitle1">Working with profiles and team support</h1>
-<div>
-<div class="p">All connections, filter data, user actions, and compile
-commands belong to profiles. Profiles can be shared by team members for the purpose of
-team development. You can work with your profiles in the Team view to enable
-greater control over team-sharable elements in the Remote System Explorer.
-<div class="note"><span class="notetitle">Note: </span>Because
-the Remote Systems view only displays connections, filters, user
-actions, and compile commands from active profiles, you need to be in the Team
-view to work with or activate your non-active profiles.
-</div>
-</div>
-<div class="p">To manage your team profiles:
-<div class="p">
-<ol>
-<li>In the Remote Systems perspective, select the Team tab which by
-default is located in the same pane as the Remote Systems view.&nbsp;
-This will bring the Team view to the front of the Remote System
-Explorer.&nbsp; You can also use the&nbsp;
-<img src="../images/gsarrow.gif" title="" alt="menu" style="width: 24px; height: 23px;"/>
-button on the Remote Systems view and select the <span style="font-weight: bold;">Work With Profiles</span>
-action.<br/>
- </li>
- <li>In the Team view, expand the root element, <b>RemoteSystemsConnections</b>,
-to see a list of your profiles.
- <ul>
- <li>To create a profile, right-click on the root element in the
-Team view, and select <b>New &gt; Profile</b> and complete the dialog box for the
-profile.</li>
- <li>To activate or deactivate a profile, right-click the profile
-and select <b>Active</b> (if it is deactivated) or <b>Not active</b> (if it is active).</li>
- <li>To duplicate a profile in the view, right-click the profile
-and select <b>Duplicate</b>. This action copies all of the profile's connections, filters, user
-actions, and compile commands.</li>
- <li>To rename a profile, right-click the profile and select <b>Rename</b>.</li>
- </ul>
- </li>
- <li>In the Team view, you can also expand your profiles to view
-connections, filter pools, user actions, and compile commands that belong to each
-profile. Right-click on any of your specific filters, user actions, and so on,
-to open a <b>Work with</b> window. These are the same actions available in the
-Remote Systems view. To work with filter pools, for example, right-click one
-of your filters, and select <b>Work with filter pools</b>. Keep in mind that
-the Remote Systems view is the more ideal environment to manipulate filters,
-filter pools, compile commands, user actions, and so on. The Team view is designed to
-manage profiles, and view the elements that belong to each profile. The Remote
-Systems view is designed for you to work with all the items that belong to your
-active profiles. It includes a greater number of right-click and menu options
-for a development-focused approach.</li>
- <li>When you have finished working with your profiles, switch back to
-the Remote Systems view, by clicking the Remote Systems tab, to continue
-working with active profile artifacts, or remain in the Team view to
-<a href="tteamsup.html">synchronize your profiles with the repository</a>.</li>
-</ol>
-</div>
-</div>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="../concepts/cteam.html" title="">Team support</a><br/>
-<a href="../concepts/cprofile.html" title="">Remote System Explorer Profiles</a><br/>
-</p>
-<p><b class="reltaskshd">Related tasks</b><br/>
-<a href="tteamsup.html" title="">Using team support</a><br/>
-<!-- TODODeferred after RSE 1.0
-<a href="tworkuseract.html" title="">Managing user actions (user options)</a><br/>
--->
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tworkuseract.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tworkuseract.html
deleted file mode 100755
index b59e32df9..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tworkuseract.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Managing user actions (user options)</title>
-</head>
-
-<body id="tworkuseract">
-<a name="tworkuseract"></a>
-<h1 class="topictitle1">Managing user actions (user options)</h1>
-<div>
-<div class="p">To create a new action or change an existing action:</div>
-<ol>
-<li><span>In the Remote Systems view, expand the connection
-containing the kinds of resources you want to act on,
-navigate to the subsystem that would contain those resources, and
-select <b>Work with &gt; User actions</b>.
-You can also right-click on a file in one of your filters, and select <b>User
-Actions</b>.</span></li>
-<li><span>Type the text to display in the <b>Action Name</b> field.
-This is a brief label for the action.</span></li>
-<li><span>Type a longer, more descriptive text for the action in the <b>Comment</b>
-field.</span></li>
-<li><span>Type the actual command string to run when
-a user selects this action. This command can use action substitution
-variables when your action is run. These variables are used when defining the
-command string to run for a particular action. Substitution variables keep you
-from having to explicitly code command parameter values. Click <b>Insert
-variable</b> to see and select valid variables.</span></li>
-</ol>
-<div class="p"><b>Additional parameters</b>
-<ul>
-<li>Select <b>Browse</b> to search for and select command
-files (for example, .exe, .bat or .cmd files). The file name you select
-is reflected in the Command field when you return. </li>
-<li>Select <b>Prompt</b> to prompt the command currently entered
-in the Command area.</li>
-<li>Select <b>Prompt first</b> to indicate that Remote System
-Explorer should prompt the command when it is run.</li>
-<li>Select <b>Refresh after</b> to have Remote System Explorer
-refresh the selected files after the action's command is run. This is
-useful if your command affects the information displayed in the file list
-window for the selected files, for example, if your command changes the type
-of a file.</li>
-<li>Select <b>Show action</b>.</li>
-<li>Select <b>Single selection only</b> if you want to show
-this action only when a single object is selected.</li>
-<li>Select <b>Invoke once </b> to collect the full names of
-all selected resources into the file name parameter and run the command
-only once for all resources that are selected..</li>
-<li>Select any currently defined named types from the <b>Defined
-Types</b> list
-and click <b>Add</b> to include them in the <b>Selected
-Types</b> list. The action will only appear if a file matching one
-of these types is selected.</li>
-</ul>
-<p>You can choose to view user actions by active profile for remote
-objects
-on the <b>User Actions</b> cascade menu. You can see both
-team-shared and private user actions. To enable this, select <b>Cascade
-user actions by profile</b> on the <b>Remote Systems Preferences</b>
-page.</p>
-</div>
-</div>
-<div>
-<p><b class="relconceptshd">Related concepts</b><br/>
-<a href="../concepts/cuseractions.html" title="">User actions (user options)</a><br/>
-</p>
-</div>
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/twrkcmdshl.html b/rse/doc/org.eclipse.rse.doc.user/tasks/twrkcmdshl.html
deleted file mode 100755
index 724a60a82..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/twrkcmdshl.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Working with command shells</title>
-</head>
-
-<body id="twrkcmdshl"><a name="twrkcmdshl"></a>
-<h1 class="topictitle1">Working with command shells</h1>
-<div>
-<p>In the Remote Systems view, you can launch a shell to perform commands
-in a specific directory or folder of a remote file system.</p>
-<div class="p">
-To launch a new shell from the Remote Systems view:
-<ol>
-<li>Expand a connection.</li>
-<li>Right-click on a file subsystem that supports shells and select <b>Launch Shell</b>.</li>
-<li>Enter shell commands, such as "ls" or "pwd", in the <b>Command</b> field (just beneath the shell itself).</li>
-</ol>
-</div>
-<div class="p">
-You can also run commands from locations further down in the remote file system
-tree, so that you do not need to navigate there from your home directory each time.
-This option takes the default shell, sets the current directory to the folder that was selected,
-and invokes a command in that directory. If you check the <b>Run in
-new shell</b> check box you will get a new shell instead of running the
-command in the current shell:
-<ol>
-<li>Expand the file subsystem until you are at the directory where you want
-to run your commands.</li>
-<li>Right-click on that directory and select <b>Run Commands</b>.</li>
-<li>Enter the command you want to run in the <b>Command</b> field and click <b>OK</b>.</li>
-</ol>
-</div>
-<div class="note">
-<span class="notetitle">Note: </span>
-Each new shell shows up in a separate tab. If more than one
-shell is running on the same connection, each subsequent shell has a number
-appended to the connection name.
-</div>
-</div>
-<div>
-<p>
-<b class="relconceptshd">Related concepts</b><br/>
-<a href="../concepts/crunremcmds.html" title="">Shells and commands in the Remote Systems view</a><br/>
-</p>
-<p>
-<b class="reltaskshd">Related tasks</b><br/>
-<a href="truncmdsview.html" title="">Running and viewing commands using the Remote Shell view</a><br/>
-</p>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/rse/doc/org.eclipse.rse.doc.user/toc.xml b/rse/doc/org.eclipse.rse.doc.user/toc.xml
deleted file mode 100755
index 70ced696d..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/toc.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<toc label="RSE User Guide">
- <topic label="Getting Started" href="gettingstarted/g_start.html">
- <topic label="Installing the Remote System Explorer" href="gettingstarted/g1installing.html"/>
- <topic label="First Steps with the Remote System Explorer" href="gettingstarted/g2firststeps.html"/>
- <topic label="Setting up a dstore server" href="tasks/tbeginlinux.html"/>
- <topic label="Using Remote Connections" href="gettingstarted/gusing.html"/>
- <topic label="Extending Remote System Explorer" href="gettingstarted/gxtending.html"/>
- </topic>
- <topic label="Remote System Explorer Connections" href="concepts/cbegin.html">
- <topic label="Universal Systems" href="concepts/cuniversal.html"/>
- <topic label="Connecting to a remote Linux or UNIX server" href="tasks/tbeginlinux.html"/>
- <topic label="Connecting to a remote Windows server" href="tasks/tbeginwindows.html"/>
- <topic label="Disconnecting from a remote server" href="tasks/tbegindiscon.html"/>
- <topic label="Creating a second connection to a remote server" href="tasks/tbeginsecond.html"/>
- <topic label="Deleting a connection" href="tasks/tbegindelete.html"/>
- <topic label="Configuring environment variable support for connections" href="tasks/tbeginenv.html"/>
- </topic>
- <topic label="Remote System Explorer filters, filter pools, and filter pool references" href="concepts/cfilters.html">
- <topic label="Creating filters" href="tasks/tmanagemem.html"/>
- <topic label="Changing filters" href="tasks/tmanageedit.html"/>
- <topic label="Deleting filters" href="tasks/tmanagedel.html"/>
- <topic label="Configuring filter pools" href="tasks/tmanagepools.html"/>
- <topic label="Configuring filter pool references" href="tasks/tmanagepoolsref.html"/>
- </topic>
- <topic label="Remote System Explorer Profiles" href="concepts/cprofile.html">
- <topic label="Creating a second profile" href="tasks/tbeginsecprofile.html"/>
- <topic label="Deleting a profile" href="tasks/tbegindeleteprofile.html"/>
- </topic>
- <topic label="Team support" href="concepts/cteam.html">
- <topic label="Using team support" href="tasks/tteamsup.html"/>
- <topic label="Working with profiles and team support" href="tasks/tteamsup1.html"/>
- </topic>
- <topic label="Shells and commands in the Remote Systems view" href="concepts/crunremcmds.html">
- <topic label="Running and viewing commands using the Remote Shell view" href="tasks/truncmdsview.html"/>
- <topic label="Working with command shells" href="tasks/twrkcmdshl.html"/>
- </topic>
- <!-- TODODeferred after RSE 1.0
- <topic label="User actions" href="concepts/cuseractions.html">
- <topic label="Managing user actions" href="tasks/tworkuseract.html"/>
- <topic label="Editing an existing type" href="tasks/tedittype.html"/>
- <topic label="Removing an existing type" href="tasks/tremtype.html"/>
- </topic>
- -->
- <topic label="Search for text and files on remote servers" href="tasks/tmanagesearch.html">
- <topic label="Using search parameters with special characters" href="ref/rsearch.html"/>
- </topic>
- <!-- TODODeferred after RSE 1.0
- <topic label="Compiling programs" href="concepts/cremcompile.html"/>
- -->
- <topic label="Managing archived files" href="tasks/tarchive.html"/>
- <!-- TODODeferred after RSE 1.0
- <topic label="Importing resources from a remote file system" href="tasks/tremoimp.html" />
- <topic label="Exporting resources to a remote file system" href="tasks/tremoexp.html" />
- <topic label="Building programs on a remote system" href="tasks/tbuild.html" />
- -->
- <topic label="Accessing Remote System Explorer preferences" href="ref/rrsepref.html"/>
- <topic label="Saving User IDs and passwords" href="tasks/tbeginpass.html"/>
- <anchor id="rse_user_extensions" />
-<topic label="Legal" href="notices.html"/>
-</toc> \ No newline at end of file
diff --git a/rse/doc/readme.txt b/rse/doc/readme.txt
deleted file mode 100644
index 4b45b5127..000000000
--- a/rse/doc/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Use the "doc" folder for plugin projects containing documentation.
-All projects should be named "org.eclipse.rse.doc.*". \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples-feature/.project b/rse/examples/org.eclipse.rse.examples-feature/.project
deleted file mode 100644
index 61283964f..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.examples-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/examples/org.eclipse.rse.examples-feature/build.properties b/rse/examples/org.eclipse.rse.examples-feature/build.properties
deleted file mode 100644
index e59c51a6a..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html,\
- eclipse_update_120.jpg
-generate.plugin@org.eclipse.rse.examples.source=org.eclipse.rse.examples
diff --git a/rse/examples/org.eclipse.rse.examples-feature/eclipse_update_120.jpg b/rse/examples/org.eclipse.rse.examples-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples-feature/epl-v10.html b/rse/examples/org.eclipse.rse.examples-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples-feature/feature.properties b/rse/examples/org.eclipse.rse.examples-feature/feature.properties
deleted file mode 100644
index 6fcf9c7cf..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/feature.properties
+++ /dev/null
@@ -1,146 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer Examples
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "description" property - description of the feature
-description=Remote System Explorer Examples contain the code from \
-the RSE ISV documentation tutorial, a sample subsystem, and a \
-sample CDT launch integration.
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/examples/org.eclipse.rse.examples-feature/feature.xml b/rse/examples/org.eclipse.rse.examples-feature/feature.xml
deleted file mode 100644
index cf4090457..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/feature.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.examples"
- label="%featureName"
- version="1.0.1.qualifier"
- provider-name="%providerName"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.rse.core"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.examples.daytime"
- download-size="9"
- install-size="25"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.examples.tutorial"
- download-size="12"
- install-size="33"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.examples.source"
- download-size="51"
- install-size="212"
- version="0.0.0"/>
-
-</feature>
diff --git a/rse/examples/org.eclipse.rse.examples-feature/license.html b/rse/examples/org.eclipse.rse.examples-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.html b/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.ini b/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.mappings b/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.properties b/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 33cc38e3e..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer Examples Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation, Wind River Systems, Inc. and others 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/build.properties b/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 89c807a28..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/eclipse32.png b/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/plugin.properties b/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index fd958a872..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=RSE Examples Source
-providerName=Eclipse.org \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/.classpath b/rse/examples/org.eclipse.rse.examples.daytime/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/.cvsignore b/rse/examples/org.eclipse.rse.examples.daytime/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/.project b/rse/examples/org.eclipse.rse.examples.daytime/.project
deleted file mode 100644
index 0b679f38c..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.examples.daytime</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.core.prefs b/rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.ui.prefs b/rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 07346397c..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Jul 07 11:19:10 CEST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;org.eclipse.rse;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/META-INF/MANIFEST.MF b/rse/examples/org.eclipse.rse.examples.daytime/META-INF/MANIFEST.MF
deleted file mode 100644
index 13243a0c8..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.examples.daytime;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.examples.daytime.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.rse.ui,
- org.eclipse.rse.services,
- org.eclipse.rse.core,
- org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.core.runtime
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.examples.daytime
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/about.html b/rse/examples/org.eclipse.rse.examples.daytime/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/build.properties b/rse/examples/org.eclipse.rse.examples.daytime/build.properties
deleted file mode 100644
index c04261f8a..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/build.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml
-src.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- readme.txt,\
- icons/
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytime.gif b/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytime.gif
deleted file mode 100644
index 202795014..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytime.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytime_obj.gif b/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytime_obj.gif
deleted file mode 100644
index 1aeaa945e..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytime_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytimelive_obj.gif b/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytimelive_obj.gif
deleted file mode 100644
index ad817196f..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/daytimelive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/systemfiles_obj.gif b/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/systemfiles_obj.gif
deleted file mode 100644
index 874c99262..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/systemfiles_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/systemfileslive_obj.gif b/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/systemfileslive_obj.gif
deleted file mode 100644
index 885b8a69e..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/icons/full/obj16/systemfileslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/plugin.properties b/rse/examples/org.eclipse.rse.examples.daytime/plugin.properties
deleted file mode 100644
index 69c48bad6..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-################################################################################
-
-pluginName = RSE Daytime
-providerName = Eclipse.org
-
-DaytimeSystemDescription=Daytime System Type
-
-Files=Files
-FilesDescription=Files via FTP
-
-DaytimeSubsystemName=Daytime
-DaytimeDescription=This configuration allows you get the current time at a remote system via TCP port 13. \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/plugin.xml b/rse/examples/org.eclipse.rse.examples.daytime/plugin.xml
deleted file mode 100644
index 6e4007523..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/plugin.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006 Wind River Systems, Inc.
-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:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<?eclipse version="3.1"?>
-<plugin>
- <!-- Register a System that will only show Daytime subsystems -->
- <extension point="org.eclipse.rse.core.systemTypes">
- <systemType id="org.eclipse.rse.examples.daytime.systemtype"
- name="Daytime"
- description="%DaytimeSystemDescription"
- icon="icons/full/obj16/daytime_obj.gif"
- iconLive="icons/full/obj16/daytimelive_obj.gif"/>
- </extension>
- <!-- Instantiate the FTP subsystem by referencing it from the external implementation -->
- <!-- Disabled to avoid hard dependency to the FTP plugin
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Daytime"
- name="%Files"
- description="%FilesDescription"
- iconlive="icons/full/obj16/systemfileslive_obj.gif"
- icon="icons/full/obj16/systemfiles_obj.gif"
- category="files"
- class="org.eclipse.rse.subsystems.files.ftp.FTPFileSubSystemConfiguration"
- vendor="%providerName"
- priority="100"
- id="ftp.files">
- </configuration>
- </extension>
- -->
- <!-- Instantiate the Daytime subsystem from our own plugin -->
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Daytime;Unix"
- name="%DaytimeSubsystemName"
- description="%DaytimeDescription"
- iconlive="icons/full/obj16/daytimelive_obj.gif"
- icon="icons/full/obj16/daytime_obj.gif"
- category="daytime"
- class="org.eclipse.rse.examples.daytime.subsystems.DaytimeSubSystemConfiguration"
- vendor="%providerName"
- priority="40000"
- id="daytime.tcp">
- </configuration>
- </extension>
-</plugin>
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/readme.txt b/rse/examples/org.eclipse.rse.examples.daytime/readme.txt
deleted file mode 100644
index 3f32f75f7..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/readme.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-Readme for RSE Daytime Example
-------------------------------
-
-The Daytime Example shows how a new subsystem (daytime) is contributed
-to RSE, and how an existing subsystem (ftp) is configured for a system
-type. The example is mainly meant for developer's educational use,
-it does not have much user value: the Daytime Subsystem retrieves
-the current time of day from a remote host via TCP port 13.
-
-__Requirements:__
-The Daytime example has been tested with with RSE M1 candidate
-(CVS HEAD as of April 25, 2006) and Eclipse 3.2 RC1.
-
-__Installation:__
-You need an Eclipse PDE Workspace with RSE.
-Then, choose File > Import > Existing Projects > Archive File,
-to import the example archive.
-
-__Usage:__
-The daytime service must be enabled on the remote system (see below).
-* Start RSE, create a new system of type "Daytime".
-* Select the Daytime Subsystem and choose Contextmenu > Connect.
-* Enter any username and password (this is not checked).
-* Select the Daytime Subsystem and choose Refresh, or Contextmenu > Monitor.
-* Enable polling in the remote monitor, you can see the time advance.
-
-__Programmer's documentation:__
-The interesting part of this example is in package
- org.eclipse.rse.examples.daytime.model
-where you see how the daytime node is added to the RSE tree through an
-AbstractSystemViewAdapter. The DaytimeService is rather simple, since
-queries are fast enough to use a connectionless service.
-
-__Known Issues:__
-* When something goes wrong during connect, the error message
- does not give enough information about the cause of the error.
-* Should define a second service, that uses UDP for getting the
- daytime. This would show the advantages of ServiceSubsystem.
- The Tutorial example (developer) is good for showing service-less
- subsystems.
-* ConnectorService / ConnectorServiceManager should exist in a
- simpler default implementation such that not every new service
- or subsystem implements the same over and over again (bug 150928).
-
-__Enabling the Daytime Service on a Remote Host:__
-In order for the example to work, the service on TCP port 13 must be
-activated on the host as follows:
-* On Linux or other xinetd based UNIX systems, edit /etc/xinetd.d/daytime
- and set "disable=no", then restart (kill -HUP) xinetd
-* On Solaris or other inetd based UNIX systmes, edit /etc/inetd.conf
- and make sure the following line is there:
- daytime stream tcp nowait root internal
- the kill -HUP inetd.
-* On Windows/Cygwin, with xinetd installed, edit config
- files like described for Linux, then start xinetd.exe
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/Activator.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/Activator.java
deleted file mode 100644
index 254833db6..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/Activator.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - adapted template for daytime example.
- ********************************************************************************/
-
-package org.eclipse.rse.examples.daytime;
-
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.osgi.framework.BundleContext;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.examples.daytime.model.DaytimeAdapterFactory;
-import org.eclipse.rse.examples.daytime.model.DaytimeResource;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends SystemBasePlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.SystemBasePlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- IAdapterManager manager = Platform.getAdapterManager();
- DaytimeAdapterFactory factory = new DaytimeAdapterFactory();
- manager.registerAdapters(factory, DaytimeResource.class);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.SystemBasePlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- public static final String ICON_ID_DAYTIME = "ICON_ID_DAYTIME"; //$NON-NLS-1$
-
- protected void initializeImageRegistry() {
- String path = getIconPath();
- putImageInRegistry(ICON_ID_DAYTIME, path+"full/obj16/daytime.gif"); //$NON-NLS-1$
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.java
deleted file mode 100644
index f9afda11b..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.examples.daytime;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Resources for externalized Strings of the Daytime subsystem.
- */
-public class DaytimeResources extends NLS {
- private static String BUNDLE_NAME = "org.eclipse.rse.examples.daytime.DaytimeResources";//$NON-NLS-1$
-
- public static String Daytime_Service_Name;
- public static String Daytime_Service_Description;
- public static String Daytime_Connector_Name;
- public static String Daytime_Connector_Description;
- public static String Daytime_Resource_Type;
-
- public static String DaytimeConnectorService_NotAvailable;
-
- public static String DaytimeWizard_TestFieldText;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, DaytimeResources.class);
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.properties b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.properties
deleted file mode 100644
index c571a4a6e..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-Daytime_Service_Name=Daytime Service
-Daytime_Service_Description=The Daytime Service retrieves the current time of day from a remote host by connecting to TCP port 13.
-Daytime_Connector_Name=Daytime Connector Service
-Daytime_Connector_Description=The Daytime Connector Service manages connections to TCP port 13 on a remote host.
-Daytime_Resource_Type=daytime resource
-DaytimeConnectorService_NotAvailable=Daytime service is not available on {0}.
-DaytimeWizard_TestFieldText=This is the Daytime Wizard Test Field.
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorService.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorService.java
deleted file mode 100644
index 8d8a39da8..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorService.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - adapted template for daytime example.
- ********************************************************************************/
-
-package org.eclipse.rse.examples.daytime.connectorservice;
-
-import java.net.ConnectException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorService;
-import org.eclipse.rse.examples.daytime.DaytimeResources;
-import org.eclipse.rse.examples.daytime.service.DaytimeService;
-import org.eclipse.rse.examples.daytime.service.IDaytimeService;
-
-/**
- * The DaytimeConnectorService takes care of keeping a "session" for accessing
- * the remote host to retrieve the time of day.
- *
- * Since the daytime service is really connectionless, there is not much to do
- * here. We basically keep a local "connected" flag only, so to make sure that
- * the remote host is only accessed when the user explicitly requested so.
- */
-public class DaytimeConnectorService extends AbstractConnectorService {
-
- private boolean fIsConnected = false;
- private DaytimeService fDaytimeService;
-
- public DaytimeConnectorService(IHost host) {
- super(DaytimeResources.Daytime_Connector_Name, DaytimeResources.Daytime_Connector_Description, host, 13);
- fDaytimeService = new DaytimeService();
- }
-
- protected void internalConnect(IProgressMonitor monitor) throws Exception {
- fDaytimeService.setHostName(getHostName());
- try {
- fDaytimeService.getTimeOfDay();
- } catch (ConnectException e) {
- String message = NLS.bind(DaytimeResources.DaytimeConnectorService_NotAvailable, getHostName());
- throw new Exception(message);
- }
- //if no exception is thrown, we consider ourselves connected!
- fIsConnected = true;
- // Fire comm event to signal state changed --
- // Not really necessary since SubSystem.connect(Shell, boolean) does
- // SystemRegistry.connectedStatusChange(this, true, false) at the end
- notifyConnection();
- }
-
- public IDaytimeService getDaytimeService() {
- return fDaytimeService;
- }
-
- public boolean isConnected() {
- return fIsConnected;
- }
-
- public void internalDisconnect(IProgressMonitor monitor) throws Exception {
- fIsConnected = false;
- super.internalDisconnect(monitor);
- }
-
- public boolean hasRemoteServerLauncherProperties() {
- return false;
- }
-
- public boolean supportsRemoteServerLaunching() {
- return false;
- }
-
- public boolean supportsServerLaunchProperties() {
- return false;
- }
-
- /**
- * @return false
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsPassword()
- */
- public boolean supportsPassword() {
- return false;
- }
-
- /**
- * @return false
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsUserId()
- */
- public boolean supportsUserId() {
- return false;
- }
-
-
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java
deleted file mode 100644
index 1d9edb8cf..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - adapted template for daytime example.
- ********************************************************************************/
-
-package org.eclipse.rse.examples.daytime.connectorservice;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.examples.daytime.subsystems.IDaytimeSubSystem;
-
-/**
- * This class manages our DaytimeConnectorService objects, so that if we ever
- * have multiple subsystem factories, different subsystems can share the same
- * ConnectorService if they share the communication layer.
- */
-public class DaytimeConnectorServiceManager extends AbstractConnectorServiceManager {
-
- private static DaytimeConnectorServiceManager fInstance;
-
- public DaytimeConnectorServiceManager() {
- super();
- }
-
- /**
- * Return singleton instance
- * @return the singleton instance
- */
- public static DaytimeConnectorServiceManager getTheDaytimeConnectorServiceManager() {
- if (fInstance == null) {
- fInstance = new DaytimeConnectorServiceManager();
- }
- return fInstance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.model.IHost)
- */
- public IConnectorService createConnectorService(IHost host) {
- return new DaytimeConnectorService(host);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#sharesSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public boolean sharesSystem(ISubSystem otherSubSystem) {
- return (otherSubSystem instanceof IDaytimeSubSystem);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#getSubSystemCommonInterface(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public Class getSubSystemCommonInterface(ISubSystem subsystem) {
- return IDaytimeSubSystem.class;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeAdapterFactory.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeAdapterFactory.java
deleted file mode 100644
index 8fea02647..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeAdapterFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - adapted template for daytime example.
- ********************************************************************************/
-
-package org.eclipse.rse.examples.daytime.model;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-import org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-
-/**
- * This factory maps requests for an adapter object from a given remote object.
- */
-public class DaytimeAdapterFactory extends AbstractSystemRemoteAdapterFactory
- implements IAdapterFactory {
-
- private DaytimeResourceAdapter daytimeAdapter = new DaytimeResourceAdapter();
-
- public DaytimeAdapterFactory() {
- super();
- }
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- ISystemViewElementAdapter adapter = null;
- if (adaptableObject instanceof DaytimeResource) {
- adapter = daytimeAdapter;
- }
- // these lines are very important!
- if ((adapter != null) && (adapterType == IPropertySource.class)) {
- adapter.setPropertySourceInput(adaptableObject);
- }
- return adapter;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResource.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResource.java
deleted file mode 100644
index b0d97ed7b..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResource.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.examples.daytime.model;
-
-import org.eclipse.rse.core.subsystems.AbstractResource;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This models the time of day on a remote system.
- * It might as well model any other remote resource.
- */
-public class DaytimeResource extends AbstractResource {
-
- private String fDaytime;
-
- /** Default constructor */
- public DaytimeResource() {
- super();
- }
-
- /**
- * Constructor when parent subsystem is given
- * @param subsystem the parent subsystem
- */
- public DaytimeResource(ISubSystem subsystem) {
- super(subsystem);
- }
-
- public String getDaytime() {
- return fDaytime;
- }
-
- public void setDaytime(String daytime) {
- fDaytime = daytime;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResourceAdapter.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResourceAdapter.java
deleted file mode 100644
index 719fe30f9..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResourceAdapter.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - adapted template for daytime example.
- ********************************************************************************/
-
-package org.eclipse.rse.examples.daytime.model;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-import org.eclipse.rse.examples.daytime.Activator;
-import org.eclipse.rse.examples.daytime.DaytimeResources;
-import org.eclipse.rse.examples.daytime.service.IDaytimeService;
-import org.eclipse.rse.examples.daytime.subsystems.DaytimeSubSystem;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-
-/**
- * The DaytimeResourceAdapter fulfills the interface required by the Remote Systems
- * View, and delegates UI requests to the underlying data model (DaytimeResource).
- */
-public class DaytimeResourceAdapter extends AbstractSystemViewAdapter implements
- ISystemRemoteElementAdapter {
-
- public DaytimeResourceAdapter() {
- super();
- }
-
- public void addActions(SystemMenuManager menu,
- IStructuredSelection selection, Shell parent, String menuGroup) {
- }
-
- public ImageDescriptor getImageDescriptor(Object element) {
- return Activator.getDefault().getImageDescriptor(Activator.ICON_ID_DAYTIME);
- }
-
- public String getText(Object element) {
- return ((DaytimeResource)element).getDaytime();
- }
-
- public String getAbsoluteName(Object object) {
- //Not used since we dont support clipboard copy, rename or filtering
- //TODO check if it is still used anywhere? Then we'd want to externalize the String
- return "daytime:"+getText(object); //$NON-NLS-1$
- }
-
- public String getType(Object element) {
- return DaytimeResources.Daytime_Resource_Type;
- }
-
- public Object getParent(Object element) {
- return null; // not really used, which is good because it is ambiguous
- }
-
- public boolean hasChildren(Object element) {
- return false;
- }
-
- public Object[] getChildren(Object element) {
- return null;
- }
-
- protected Object internalGetPropertyValue(Object key) {
- return null;
- }
-
- protected IPropertyDescriptor[] internalGetPropertyDescriptors() {
- return null;
- }
-
- // --------------------------------------
- // ISystemRemoteElementAdapter methods...
- // --------------------------------------
-
- public String getAbsoluteParentName(Object element) {
- // not really applicable as we have no unique hierarchy
- return "root"; //$NON-NLS-1$
- }
-
- public String getSubSystemConfigurationId(Object element) {
- // as declared in extension in plugin.xml
- return "daytime.tcp"; //$NON-NLS-1$
- }
-
- public String getRemoteTypeCategory(Object element) {
- // Course grained. Same for all our remote resources.
- return "daytime"; //$NON-NLS-1$
- }
-
- public String getRemoteType(Object element) {
- // Fine grained. Unique to this resource type.
- return "daytime"; //$NON-NLS-1$
- }
-
- public String getRemoteSubType(Object element) {
- // Very fine grained. We don't use it.
- return null;
- }
-
- public boolean refreshRemoteObject(Object oldElement, Object newElement) {
- DaytimeResource oldTime = (DaytimeResource)oldElement;
- DaytimeResource newTime = (DaytimeResource)newElement;
- newTime.setDaytime(oldTime.getDaytime());
- return false; // If daytime objects held references to their time string, we'd have to return true
- }
-
- public Object getRemoteParent(Shell shell, Object element) throws Exception {
- return null; // leave as null if this is the root
- }
-
- public String[] getRemoteParentNamesInUse(Shell shell, Object element)
- throws Exception {
- DaytimeSubSystem ourSS = (DaytimeSubSystem)getSubSystem(element);
- IDaytimeService service = ourSS.getDaytimeService();
- String time = service.getTimeOfDay();
- String[] allLabels = new String[] { time };
- return allLabels; // Return list of all labels
- }
-
- public boolean supportsUserDefinedActions(Object object) {
- return false;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/DaytimeService.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/DaytimeService.java
deleted file mode 100644
index 216361dbb..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/DaytimeService.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.examples.daytime.service;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.examples.daytime.DaytimeResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * The DaytimeService implements the UI-less protocol for accessing the
- * daytime TCP service on a remote host. Other implementations of the
- * same interface might use other methods for retrieving the time of day.
- */
-public class DaytimeService implements IDaytimeService {
-
- private String fHostname;
-
- public DaytimeService() {
- //nothing to do
- }
-
- public String getName() {
- return DaytimeResources.Daytime_Service_Name;
- }
-
- public String getDescription() {
- return DaytimeResources.Daytime_Service_Description;
- }
-
- public void initService(IProgressMonitor monitor) {
- //nothing to do
- }
-
- public SystemMessage getMessage(String messageID) {
- //dummy impl for now
- return null;
- }
-
- public void setHostName(String hostname) {
- fHostname = hostname;
- }
-
- public String getTimeOfDay() throws UnknownHostException, IOException {
- Socket s = new Socket(fHostname, 13);
- BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
- String result = in.readLine();
- in.close();
- s.close();
- return result;
- }
-
- public void uninitService(IProgressMonitor monitor) {
- //nothing to do
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/IDaytimeService.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/IDaytimeService.java
deleted file mode 100644
index 39f9c0858..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/IDaytimeService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.examples.daytime.service;
-
-import java.io.IOException;
-import java.net.UnknownHostException;
-
-import org.eclipse.rse.services.IService;
-
-/**
- * IDaytimeService is the interface (API) for retrieving the time of day
- * from a remote system.
- */
-public interface IDaytimeService extends IService {
-
- /**
- * @return a String of the form "01 MAR 2006 11:25:12 CET"
- * @throws UnknownHostException when remote address could not be resolved
- * @throws IOException in case of an error transferring the data
- */
- public String getTimeOfDay() throws UnknownHostException, IOException;
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystem.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystem.java
deleted file mode 100644
index cbcbbc1df..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystem.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.examples.daytime.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.examples.daytime.model.DaytimeResource;
-import org.eclipse.rse.examples.daytime.service.IDaytimeService;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * This is our subsystem, which manages the remote connection and resources for
- * a particular Service (system connection) object.
- */
-public class DaytimeSubSystem extends SubSystem {
-
- private IDaytimeService fDaytimeService;
-
- public DaytimeSubSystem(IHost host, IConnectorService connectorService, IDaytimeService daytimeService) {
- super(host, connectorService);
- fDaytimeService = daytimeService;
- }
-
- public void initializeSubSystem(IProgressMonitor monitor) {
- //This is called after connect - expand the daytime node.
- //May be called in worker thread.
- //TODO find a more elegant solution for expanding the item, e.g. use implicit connect like filters
- final SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- final SystemResourceChangeEvent event = new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_SELECT_EXPAND, null);
- //TODO bug 150919: postEvent() should not be necessary asynchronously
- //sr.postEvent(event);
- Display.getDefault().asyncExec(new Runnable() {
- public void run() { sr.postEvent(event); }
- });
- }
-
- public boolean hasChildren() {
- return isConnected();
- }
-
- public IDaytimeService getDaytimeService() {
- return fDaytimeService;
- }
-
- public Object[] getChildren() {
- if (isConnected()) {
- try {
- String daytime = fDaytimeService.getTimeOfDay();
- DaytimeResource node = new DaytimeResource(this);
- node.setDaytime(daytime);
- return new Object[] { node };
- } catch(Exception e) {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED);
- msg.makeSubstitution(getHostName(), e);
- SystemMessageObject msgobj = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR,this);
- return new Object[] { msgobj };
- }
- } else {
- return new Object[0];
- }
- }
-
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- //nothing to do
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java
deleted file mode 100644
index 4bf5b4e91..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - adapted template for daytime example.
- ********************************************************************************/
-
-package org.eclipse.rse.examples.daytime.subsystems;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.servicesubsystem.ServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.examples.daytime.connectorservice.DaytimeConnectorService;
-import org.eclipse.rse.examples.daytime.connectorservice.DaytimeConnectorServiceManager;
-import org.eclipse.rse.examples.daytime.service.IDaytimeService;
-import org.eclipse.rse.services.IService;
-
-/**
- * The DaytimeSubSystemConfiguration implements the main API for registering
- * a new subsystem type.
- * It gives the RSE framework basic configuration data about enabled
- * or disabled options, and is responsible for instanciating the actual
- * Daytime subsystem as well as the UI-less configuration layer (service).
- */
-public class DaytimeSubSystemConfiguration extends ServiceSubSystemConfiguration {
-
- private Map fServices = new HashMap();
-
- public DaytimeSubSystemConfiguration() {
- super();
- }
-
- public boolean supportsServerLaunchProperties(IHost host) {
- return false;
- }
- public boolean supportsFilters() {
- return false;
- }
- public boolean supportsSubSystemConnect() {
- //TODO for now, we have to connect in order to pass the hostname to the service
- //This should not be necessary in an ideal world
- return true;
- }
- public boolean isPortEditable() {
- return false;
- }
- public boolean isFactoryFor(Class subSystemType) {
- return DaytimeSubSystem.class.equals(subSystemType);
- }
-
- /**
- * Instantiate and return an instance of OUR subystem.
- * Do not populate it yet though!
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(IHost)
- */
- public ISubSystem createSubSystemInternal(IHost host) {
- IConnectorService connectorService = getConnectorService(host);
- ISubSystem subsys = new DaytimeSubSystem(host, connectorService, createDaytimeService(host)); // DWD need to provide the subsystem with a name and id too.
- return subsys;
- }
-
- public IConnectorService getConnectorService(IHost host) {
- return DaytimeConnectorServiceManager.getTheDaytimeConnectorServiceManager()
- .getConnectorService(host, IDaytimeService.class);
- }
- public void setConnectorService(IHost host, IConnectorService connectorService) {
- DaytimeConnectorServiceManager.getTheDaytimeConnectorServiceManager()
- .setConnectorService(host, IDaytimeService.class, connectorService);
- }
-
- public IDaytimeService createDaytimeService(IHost host) {
- DaytimeConnectorService connectorService = (DaytimeConnectorService)getConnectorService(host);
- return connectorService.getDaytimeService();
- }
-
- public final IService getService(IHost host) {
- IDaytimeService service = (IDaytimeService)fServices.get(host);
- if (service == null) {
- service = createDaytimeService(host);
- fServices.put(host, service);
- }
- return service;
- }
-
- public final Class getServiceType() {
- return IDaytimeService.class;
- }
-
- public Class getServiceImplType() {
- return IDaytimeService.class;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/IDaytimeSubSystem.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/IDaytimeSubSystem.java
deleted file mode 100644
index db44df002..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/IDaytimeSubSystem.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.examples.daytime.subsystems;
-
-/**
- * Markup interface for finding multiple different implementations of the
- * DaytimeSubSystem, just in case we should ever have them.
- */
-public interface IDaytimeSubSystem {
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeNewConnectionWizardPage.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeNewConnectionWizardPage.java
deleted file mode 100644
index e6ef8fa3b..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeNewConnectionWizardPage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.daytime.ui;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.examples.daytime.DaytimeResources;
-import org.eclipse.rse.ui.wizards.AbstractSystemNewConnectionWizardPage;
-
-public class DaytimeNewConnectionWizardPage extends
- AbstractSystemNewConnectionWizardPage {
-
-
- public DaytimeNewConnectionWizardPage(IWizard wizard, ISubSystemConfiguration parentConfig)
- {
- super(wizard, parentConfig);
- }
-
- public Control createContents(Composite parent) {
- Text field = new Text(parent, SWT.NONE);
- field.setText(DaytimeResources.DaytimeWizard_TestFieldText);
-
- // TODO Auto-generated method stub
- return field;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapter.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapter.java
deleted file mode 100644
index cd0ed3250..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.examples.daytime.ui;
-
-import java.util.Vector;
-
-import org.eclipse.jface.wizard.IWizard;
-
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-
-
-public class DaytimeSubSystemConfigurationAdapter extends SubSystemConfigurationAdapter
-{
- Vector _additionalActions;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)
- */
- public ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(ISubSystemConfiguration factory, IWizard wizard)
- {
- ISystemNewConnectionWizardPage[] basepages = super.getNewConnectionWizardPages(factory, wizard);
-
- if (true)
- {
- DaytimeNewConnectionWizardPage page = new DaytimeNewConnectionWizardPage(wizard, factory);
- ISystemNewConnectionWizardPage[] newPages = new ISystemNewConnectionWizardPage[basepages.length + 1];
- newPages[0] = page;
- for (int i = 0; i < basepages.length; i++)
- {
- newPages[i+1] = basepages[i];
- }
- basepages = newPages;
- }
- return basepages;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapterFactory.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 33cfc02ff..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.daytime.ui;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.examples.daytime.subsystems.DaytimeSubSystemConfiguration;
-
-public class DaytimeSubSystemConfigurationAdapterFactory implements IAdapterFactory {
-
- private ISubSystemConfigurationAdapter ssFactoryAdapter = new DaytimeSubSystemConfigurationAdapter();
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISubSystemConfigurationAdapter.class};
- }
-
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- *
- * @param manager Platform adapter manager to register with
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, DaytimeSubSystemConfiguration.class);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof DaytimeSubSystemConfiguration)
- adapter = ssFactoryAdapter;
-
- return adapter;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/.classpath b/rse/examples/org.eclipse.rse.examples.tutorial/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/.cvsignore b/rse/examples/org.eclipse.rse.examples.tutorial/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/.project b/rse/examples/org.eclipse.rse.examples.tutorial/.project
deleted file mode 100644
index 704598e3c..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.examples.tutorial</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/.settings/org.eclipse.jdt.core.prefs b/rse/examples/org.eclipse.rse.examples.tutorial/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 77b2a022c..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,58 +0,0 @@
-#Thu Dec 21 11:26:55 CST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/META-INF/MANIFEST.MF b/rse/examples/org.eclipse.rse.examples.tutorial/META-INF/MANIFEST.MF
deleted file mode 100644
index f66ea9314..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.examples.tutorial;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: samples.RSESamplesPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.rse.ui,
- org.eclipse.rse.core,
- org.eclipse.rse.services,
- org.eclipse.rse.files.ui,
- org.eclipse.rse.shells.ui,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.subsystems.shells.core
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/about.html b/rse/examples/org.eclipse.rse.examples.tutorial/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/build.properties b/rse/examples/org.eclipse.rse.examples.tutorial/build.properties
deleted file mode 100644
index e8eb717bc..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- rseSamplesMessages.xml
-src.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.xml,\
- rseSamplesMessages.xml
- \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/icons/developer.gif b/rse/examples/org.eclipse.rse.examples.tutorial/icons/developer.gif
deleted file mode 100644
index 9dae955d0..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/icons/developer.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/icons/developerFilter.gif b/rse/examples/org.eclipse.rse.examples.tutorial/icons/developerFilter.gif
deleted file mode 100644
index aaf308445..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/icons/developerFilter.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/icons/systemconnection.gif b/rse/examples/org.eclipse.rse.examples.tutorial/icons/systemconnection.gif
deleted file mode 100644
index e8efe69dc..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/icons/systemconnection.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/icons/systemconnectionlive.gif b/rse/examples/org.eclipse.rse.examples.tutorial/icons/systemconnectionlive.gif
deleted file mode 100644
index f97fa6b48..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/icons/systemconnectionlive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/icons/team.gif b/rse/examples/org.eclipse.rse.examples.tutorial/icons/team.gif
deleted file mode 100644
index 510a75377..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/icons/team.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/icons/teamFilter.gif b/rse/examples/org.eclipse.rse.examples.tutorial/icons/teamFilter.gif
deleted file mode 100644
index a8091af8f..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/icons/teamFilter.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/plugin.properties b/rse/examples/org.eclipse.rse.examples.tutorial/plugin.properties
deleted file mode 100644
index c6a36e859..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = RSE Tutorial Examples
-providerName = Eclipse.org
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/plugin.xml b/rse/examples/org.eclipse.rse.examples.tutorial/plugin.xml
deleted file mode 100644
index 96f723a0c..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/plugin.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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:
-Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
- <!-- ======================================= -->
- <!-- Remote Object Popup Menu Actions -->
- <!-- ======================================= -->
- <!-- Tutorial #1: Creating a Remote Resource pop-up Menu Action -->
- <extension point="org.eclipse.rse.ui.popupMenus">
- <objectContribution id="actions.jar"
- typecategoryfilter="files"
- typefilter="file"
- namefilter="*.jar">
- <action id="actions.jar.show"
- enablesFor="1"
- label="Show contents"
- tooltip="List contents of this file"
- class="samples.ui.actions.ShowJarContents">
- </action>
- </objectContribution>
- </extension>
-
- <!-- ======================================= -->
- <!-- Remote Object Property Pages -->
- <!-- ======================================= -->
- <!-- Tutorial #2: Creating a Remote Resource Property Page -->
- <extension point="org.eclipse.rse.ui.propertyPages">
- <page name="Folder Contents"
- class="samples.ui.propertypages.FolderInfoPropertyPage"
- id="samples.ui.PropertyPage1"
- typefilter="folder"
- typecategoryfilter="files">
- </page>
- </extension>
-
- <!-- ======================================= -->
- <!-- SubSystem Configuration -->
- <!-- ======================================= -->
- <!-- Tutorial #3: Creating a Subsystem Configuration -->
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- id="samples.subsystems.factory"
- systemTypes="Linux;Unix;Windows"
- name="Teams"
- class="samples.subsystems.DeveloperSubSystemConfiguration"
- category="users"
- vendor="%providerName"
- description="Example Developer Subsystem"
- iconlive="icons/systemconnectionlive.gif"
- icon="icons/systemconnection.gif"
- priority="50000">
- </configuration>
- </extension>
-</plugin>
- \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/rseSamplesMessages.xml b/rse/examples/org.eclipse.rse.examples.tutorial/rseSamplesMessages.xml
deleted file mode 100644
index a5e6ff074..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/rseSamplesMessages.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!DOCTYPE MessageFile SYSTEM "../org.eclipse.rse.ui/messageFile.dtd">
-<!-- This is a message file used by SystemMessage and SystemMessageDialog -->
-<MessageFile Version="1.0">
- <Component Name="RSE Samples" Abbr="RSS">
- <Subcomponent Name="General" Abbr="G">
- <MessageList>
- <Message ID="1001" Indicator="E">
- <LevelOne>Sample message</LevelOne>
- <LevelTwo>This is a sample with one substution variable: %1</LevelTwo>
- </Message>
- <Message ID="1002" Indicator="I">
- <LevelOne>Processing...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- </MessageList>
- </Subcomponent>
- </Component>
-</MessageFile>
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java
deleted file mode 100644
index 4e523495a..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.osgi.framework.BundleContext;
-
-import samples.subsystems.DeveloperSubSystemConfigurationAdapterFactory;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class RSESamplesPlugin extends SystemBasePlugin {
- //The shared instance.
- private static RSESamplesPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
- private static SystemMessageFile messageFile = null;
-
- /**
- * The constructor.
- */
- public RSESamplesPlugin() {
- super();
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.SystemBasePlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- messageFile = getMessageFile("rseSamplesMessages.xml"); //$NON-NLS-1$
-
- IAdapterManager manager = Platform.getAdapterManager();
- samples.model.DeveloperAdapterFactory factory = new samples.model.DeveloperAdapterFactory();
- manager.registerAdapters(factory, samples.model.TeamResource.class);
- manager.registerAdapters(factory, samples.model.DeveloperResource.class);
-
- DeveloperSubSystemConfigurationAdapterFactory sscaf = new DeveloperSubSystemConfigurationAdapterFactory();
- sscaf.registerWithManager(manager);
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.SystemBasePlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- * @return the shared instance
- */
- public static RSESamplesPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- * @return the singleton Workspace from Eclipse Resources plugin
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- * @see java.util.ResourceBundle#getString(String)
- *
- * @param key the key for the desired string
- * @return the string for the given key
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle= RSESamplesPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Return the plugin's Resource bundle.
- * @return the Resource bundle
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("samples.rseSamplesResources"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
- /**
- * @see AbstractUIPlugin#initializeDefaultPreferences
- */
- //protected void initializeDefaultPreferences(IPreferenceStore store)
- //{
- // super.initializeDefaultPreferences(store);
- // //RSESamplesPreferencePage.initDefaults(store);
- //}
-
- /**
- * Initialize the image registry by declaring all of the required graphics.
- */
- protected void initializeImageRegistry()
- {
- String path = getIconPath();
- putImageInRegistry("ICON_ID_TEAM", path + "team.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- putImageInRegistry("ICON_ID_DEVELOPER", path + "developer.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- putImageInRegistry("ICON_ID_TEAMFILTER", path + "teamFilter.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- putImageInRegistry("ICON_ID_DEVELOPERFILTER", path + "developerFilter.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Load a message file for this plugin.
- * @param messageFileName - the name of the message xml file. Will look for it in this plugin's install folder.
- * @return a message file object containing the parsed contents of the message file, or null if not found.
- */
- public SystemMessageFile getMessageFile(String messageFileName)
- {
- return loadMessageFile(getBundle(), messageFileName);
- }
-
- /**
- * Return our message file.
- *
- * @return the RSE message file
- */
- public static SystemMessageFile getPluginMessageFile()
- {
- return messageFile;
- }
-
- /**
- * Retrieve a message from this plugin's message file,
- * or <code>null</code> if the message cannot be found.
- * @see SystemMessageFile#getMessage(String)
- *
- * @param msgId message id
- * @return the message object referenced by the given id
- */
- public static SystemMessage getPluginMessage(String msgId)
- {
- return getMessage(messageFile, msgId);
- }
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperAdapterFactory.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperAdapterFactory.java
deleted file mode 100644
index 8bfbb4a80..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperAdapterFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.model;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * This factory maps requests for an adapter object from a given remote object.
- */
-public class DeveloperAdapterFactory extends AbstractSystemRemoteAdapterFactory
- implements IAdapterFactory
-{
- private TeamResourceAdapter teamAdapter = new TeamResourceAdapter();
- private DeveloperResourceAdapter developerAdapter = new DeveloperResourceAdapter();
-
- /**
- * Constructor for DeveloperAdapterFactory.
- */
- public DeveloperAdapterFactory() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- ISystemViewElementAdapter adapter = null;
- if (adaptableObject instanceof TeamResource)
- adapter = teamAdapter;
- else if (adaptableObject instanceof DeveloperResource)
- adapter = developerAdapter;
- // these lines are very important!
- if ((adapter != null) && (adapterType == IPropertySource.class))
- adapter.setPropertySourceInput(adaptableObject);
- return adapter;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResource.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResource.java
deleted file mode 100644
index 017fd46be..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResource.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.model;
-
-import org.eclipse.rse.core.subsystems.AbstractResource;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This models a remote resource representing a developer defined on a particular system.
- */
-public class DeveloperResource extends AbstractResource {
-
- private String name;
- private String id;
- private String deptNbr;
-
- /**
- * Default constructor for DeveloperResource.
- */
- public DeveloperResource()
- {
- super();
- }
-
- /**
- * Constructor for DeveloperResource when given parent subsystem.
- * @param parentSubSystem the parent subsystem
- */
- public DeveloperResource(ISubSystem parentSubSystem)
- {
- super(parentSubSystem);
- }
-
- /**
- * Returns the name.
- * @return String
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the name.
- * @param name The name to set
- */
- public void setName(String name)
- {
- this.name = name;
- }
-
- /**
- * Returns the id.
- * @return String
- */
- public String getId()
- {
- return id;
- }
-
- /**
- * Sets the id.
- * @param id The id to set
- */
- public void setId(String id)
- {
- this.id = id;
- }
- /**
- * Returns the deptNbr.
- * @return String
- */
- public String getDeptNbr()
- {
- return deptNbr;
- }
-
- /**
- * Sets the deptNbr.
- * @param deptNbr The deptNbr to set
- */
- public void setDeptNbr(String deptNbr)
- {
- this.deptNbr = deptNbr;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResourceAdapter.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResourceAdapter.java
deleted file mode 100644
index 40cf4c3dd..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResourceAdapter.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.model;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-import samples.RSESamplesPlugin;
-
-/**
- * This is the adapter which enables us to work with our remote developer resources.
- */
-public class DeveloperResourceAdapter extends AbstractSystemViewAdapter
- implements ISystemRemoteElementAdapter
-{
-
- /**
- * Constructor
- */
- public DeveloperResourceAdapter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager, org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
- */
- public void addActions(SystemMenuManager menu,
- IStructuredSelection selection, Shell parent, String menuGroup)
- {
- }
-
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object object)
- {
- return RSESamplesPlugin.getDefault().getImageDescriptor("ICON_ID_DEVELOPER"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getText(java.lang.Object)
- */
- public String getText(Object element)
- {
- return ((DeveloperResource)element).getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object object)
- {
- DeveloperResource devr = (DeveloperResource)object;
- return "Devr_" + devr.getId(); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getType(java.lang.Object)
- */
- public String getType(Object element)
- {
- return RSESamplesPlugin.getResourceString("property.devr_resource.type"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object o)
- {
- return null; // not really used, which is good because it is ambiguous
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element)
- {
- return false;
- }
-
- /**
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object o)
- {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyDescriptors()
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- // the following array should be made static to it isn't created every time
- PropertyDescriptor[] ourPDs = new PropertyDescriptor[2];
- ourPDs[0] = new PropertyDescriptor("devr_id", //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("property.devr_id.name")); //$NON-NLS-1$
- ourPDs[0].setDescription(
- RSESamplesPlugin.getResourceString("property.devr_id.desc")); //$NON-NLS-1$
- ourPDs[1] = new PropertyDescriptor("devr_dept", //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("property.devr_dept.name")); //$NON-NLS-1$
- ourPDs[1].setDescription(
- RSESamplesPlugin.getResourceString("property.devr_dept.desc")); //$NON-NLS-1$
- return ourPDs;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyValue(java.lang.Object)
- */
- protected Object internalGetPropertyValue(Object key)
- {
- // propertySourceInput holds the currently selected object
- DeveloperResource devr = (DeveloperResource)propertySourceInput;
- if (key.equals("devr_id")) //$NON-NLS-1$
- return devr.getId();
- else if (key.equals("devr_dept")) //$NON-NLS-1$
- return devr.getDeptNbr();
- return null;
- }
- // --------------------------------------
- // ISystemRemoteElementAdapter methods...
- // --------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object)
- */
- public String getAbsoluteParentName(Object element)
- {
- return "root"; // not really applicable as we have no unique hierarchy //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getSubSystemConfigurationId(java.lang.Object)
- */
- public String getSubSystemConfigurationId(Object element)
- {
- return "samples.subsystems.factory"; // as declared in extension in plugin.xml //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteTypeCategory(java.lang.Object)
- */
- public String getRemoteTypeCategory(Object element)
- {
- return "developers"; // Course grained. Same for all our remote resources. //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteType(java.lang.Object)
- */
- public String getRemoteType(Object element)
- {
- return "developer"; // Fine grained. Unique to this resource type. //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubType(java.lang.Object)
- */
- public String getRemoteSubType(Object element)
- {
- return null; // Very fine grained. We don't use it.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#refreshRemoteObject(java.lang.Object, java.lang.Object)
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- DeveloperResource oldDevr= (DeveloperResource)oldElement;
- DeveloperResource newDevr = (DeveloperResource)newElement;
- newDevr.setName(oldDevr.getName());
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParent(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- return null; // maybe this would be a Department obj, if we fully fleshed out our model
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParentNamesInUse(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element)
- throws Exception
- {
- // developers names do not have to be unique! So we don't need to implement this!
- return null;
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- return false;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResource.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResource.java
deleted file mode 100644
index 25856ec7d..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResource.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.model;
-
-import org.eclipse.rse.core.subsystems.AbstractResource;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This models a remote resource representing a team defined on a particular system.
- */
-public class TeamResource extends AbstractResource {
-
- private String name;
- private DeveloperResource[] developers;
-
- /**
- * Default constructor
- */
- public TeamResource()
- {
- super();
- }
- /**
- * Constructor for TeamResource when given a parent subsystem.
- * @param parentSubSystem the parent subsystem
- */
- public TeamResource(ISubSystem parentSubSystem)
- {
- super(parentSubSystem);
- }
-
- /**
- * Returns the name.
- * @return String
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Sets the name.
- * @param name The name to set
- */
- public void setName(String name)
- {
- this.name = name;
- }
-
- /**
- * Returns the developers.
- * @return DeveloperResource[]
- */
- public DeveloperResource[] getDevelopers()
- {
- return developers;
- }
-
- /**
- * Sets the developers.
- * @param developers The developers to set
- */
- public void setDevelopers(DeveloperResource[] developers)
- {
- this.developers = developers;
- }
-
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResourceAdapter.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResourceAdapter.java
deleted file mode 100644
index ba88b090d..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResourceAdapter.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.model;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-import samples.RSESamplesPlugin;
-import samples.subsystems.DeveloperSubSystem;
-
-/**
- * This is the adapter which enables us to work with our remote team resources.
- */
-public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
- ISystemRemoteElementAdapter {
-
- /**
- * Constructor.
- */
- public TeamResourceAdapter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager, org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
- */
- public void addActions(SystemMenuManager menu,
- IStructuredSelection selection, Shell parent, String menuGroup)
- {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- return RSESamplesPlugin.getDefault().getImageDescriptor("ICON_ID_TEAM"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getText(java.lang.Object)
- */
- public String getText(Object element)
- {
- return ((TeamResource)element).getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object object)
- {
- TeamResource team = (TeamResource)object;
- return "Team_"+team.getName(); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getType(java.lang.Object)
- */
- public String getType(Object element)
- {
- return RSESamplesPlugin.getResourceString("property.team_resource.type"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object element)
- {
- return null; // not really used, which is good because it is ambiguous
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element)
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object element)
- {
- return ((TeamResource)element).getDevelopers();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyDescriptors()
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyValue(java.lang.Object)
- */
- protected Object internalGetPropertyValue(Object key)
- {
- return null;
- }
-
- /**
- * Intercept of parent method to indicate these objects
- * can be renamed using the RSE-supplied rename action.
- *
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#canRename(java.lang.Object)
- */
- public boolean canRename(Object element)
- {
- return true;
- }
-
- /**
- * Intercept of parent method to actually do the rename. RSE supplies the rename GUI, but
- * defers the action work of renaming to this adapter method.
- *
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#doRename(Shell, Object, String)
- */
- public boolean doRename(Shell shell, Object element, String newName)
- {
- ((TeamResource)element).setName(newName);
- return true;
- }
-
- // --------------------------------------
- // ISystemRemoteElementAdapter methods...
- // --------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object)
- */
- public String getAbsoluteParentName(Object element)
- {
- return "root"; // not really applicable as we have no unique hierarchy //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getSubSystemConfigurationId(java.lang.Object)
- */
- public String getSubSystemConfigurationId(Object element)
- {
- return "samples.subsystems.factory"; // as declared in extension in plugin.xml //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteTypeCategory(java.lang.Object)
- */
- public String getRemoteTypeCategory(Object element)
- {
- return "developers"; // Course grained. Same for all our remote resources. //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteType(java.lang.Object)
- */
- public String getRemoteType(Object element)
- {
- return "team"; // Fine grained. Unique to this resource type. //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubType(java.lang.Object)
- */
- public String getRemoteSubType(Object element)
- {
- return null; // Very fine grained. We don't use it.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#refreshRemoteObject(java.lang.Object, java.lang.Object)
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- TeamResource oldTeam = (TeamResource)oldElement;
- TeamResource newTeam = (TeamResource)newElement;
- newTeam.setName(oldTeam.getName());
- return false; // If developer objects held references to their team names, we'd have to return true
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParent(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- return null; // maybe this would be a Project or Roster object, or leave as null if this is the root
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParentNamesInUse(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element)
- throws Exception
- {
- DeveloperSubSystem ourSS = (DeveloperSubSystem)getSubSystem(element);
- TeamResource[] allTeams = ourSS.getAllTeams();
- String[] allNames = new String[allTeams.length];
- for (int idx=0; idx<allTeams.length; idx++)
- allNames[idx] = allTeams[idx].getName();
- return allNames; // Return list of all team names
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- return false;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/rseSamplesResources.properties b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/rseSamplesResources.properties
deleted file mode 100644
index dfc96663b..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/rseSamplesResources.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-# Tutorial #2: Creating a Remote Resource Property Page
-pp.size.label=Size
-pp.size.tooltip=Cumulative size, in bytes
-pp.files.label=Files
-pp.files.tooltip=Cumulative number of files
-pp.folders.label=Folders
-pp.folders.tooltip=Cumulative number of folders
-pp.stopButton.label=Stop
-pp.stopButton.tooltip=Cancel the thread
-
-# Tutorial #3: Creating a Subsystem Configuration
-connectorservice.devr.name=DeveloperConnectorService
-connectorservice.devr.desc=Manages connections to faked remote developer resources.
-
-property.devr_resource.type=Developer resource
-property.devr_id.name=Id
-property.devr_id.desc=ID number
-property.devr_dept.name=Department
-property.devr_dept.desc=Department number
-property.team_resource.type=Team resource
-filter.default.name=All Teams
-
-# Tutorial #3a: Adding a Custom Filter
-property.type.teamfilter=Team filter
-property.type.devrfilter=Developer filter
-
-filter.team.dlgtitle=Change Team Filter
-filter.team.pagetitle=Team Filter
-filter.team.pagetext=Create a new filter to list teams
-
-filter.devr.dlgtitle=Change Developer Filter
-filter.devr.pagetitle=Developer Filter
-filter.devr.pagetext=Create a new filter to list developers
-filter.devr.teamprompt.label=Parent team
-filter.devr.teamprompt.tooltip=Specify the team within which to list developers
-filter.devr.devrprompt.label=Developers
-filter.devr.devrprompt.tooltip=Specify a simple or generic developer name pattern
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorService.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorService.java
deleted file mode 100644
index 14b1b640a..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorService.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorService;
-
-import samples.RSESamplesPlugin;
-
-/**
- * Our system class that manages connecting to, and disconnecting from,
- * our remote server-side code.
- */
-public class DeveloperConnectorService extends AbstractConnectorService {
-
- private boolean connected = false;
-
- /**
- * Constructor for DeveloperConnectorService.
- * @param host
- */
- public DeveloperConnectorService(IHost host)
- {
- super(
- RSESamplesPlugin.getResourceString("connectorservice.devr.name"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("connectorservice.devr.desc"), //$NON-NLS-1$
- host,
- 0
- );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected()
- */
- public boolean isConnected()
- {
- return connected;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalConnect(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void internalConnect(IProgressMonitor monitor) throws Exception
- {
- super.internalConnect(monitor);
- // pretend. Normally, we'd connect to our remote server-side code here
- connected=true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalDisconnect(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void internalDisconnect(IProgressMonitor monitor) throws Exception
- {
- super.internalDisconnect(monitor);
- // pretend. Normally, we'd disconnect from our remote server-side code here
- connected=false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsRemoteServerLaunching()
- */
- public boolean supportsRemoteServerLaunching()
- {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#hasRemoteServerLauncherProperties()
- */
- public boolean hasRemoteServerLauncherProperties()
- {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsServerLaunchProperties()
- */
- public boolean supportsServerLaunchProperties()
- {
- return false;
- }
-
- /**
- * @return false
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsPassword()
- */
- public boolean supportsPassword() {
- return false;
- }
-
- /**
- * @return false
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsUserId()
- */
- public boolean supportsUserId() {
- return false;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java
deleted file mode 100644
index 5c61f70ee..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.subsystems;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This class manages our DeveloperConnectorService objects, so that if we
- * ever have multiple subsystem factories, different subsystems can share
- * the same IConnectorService object if they share the communication layer.
- */
-public class DeveloperConnectorServiceManager extends
- AbstractConnectorServiceManager {
-
- private static DeveloperConnectorServiceManager inst;
-
- /**
- * Constructor for DeveloperConnectorServiceManager.
- */
- public DeveloperConnectorServiceManager()
- {
- super();
- }
-
- /**
- * Return singleton instance
- * @return the singleton instance
- */
- public static DeveloperConnectorServiceManager getTheDeveloperConnectorServiceManager()
- {
- if (inst == null)
- inst = new DeveloperConnectorServiceManager();
- return inst;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.model.IHost)
- */
- public IConnectorService createConnectorService(IHost host)
- {
- return new DeveloperConnectorService(host);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#sharesSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public boolean sharesSystem(ISubSystem otherSubSystem)
- {
- return (otherSubSystem instanceof IDeveloperSubSystem);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#getSubSystemCommonInterface(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public Class getSubSystemCommonInterface(ISubSystem subsystem)
- {
- return IDeveloperSubSystem.class;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperFilterStringEditPane.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperFilterStringEditPane.java
deleted file mode 100644
index 1a31ec23f..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperFilterStringEditPane.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.subsystems;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.filters.SystemFilterStringEditPane;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-import samples.RSESamplesPlugin;
-
-/**
- * Our specialized filter string edit pane for developer filters.
- */
-public class DeveloperFilterStringEditPane extends SystemFilterStringEditPane {
-
- // gui widgets
- private Text textTeam, textDevr;
-
- /**
- * Constructor for DeveloperFilterStringEditPane.
- * @param shell - parent window
- */
- public DeveloperFilterStringEditPane(Shell shell)
- {
- super(shell);
- }
-
- /**
- * Override of parent method.
- * This is where we populate the client area.
- * @param parent - the composite that will be the parent of the returned client area composite
- * @return Control - a client-area composite populated with widgets.
- *
- * @see org.eclipse.rse.ui.SystemWidgetHelpers
- */
- public Control createContents(Composite parent)
- {
- // Inner composite
- int nbrColumns = 1;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- ((GridLayout)composite_prompts.getLayout()).marginWidth = 0;
-
- // CREATE TEAM-PARENT PROMPT
- textTeam = SystemWidgetHelpers.createLabeledTextField(
- composite_prompts,
- null,
- RSESamplesPlugin.getResourceString("filter.devr.teamprompt.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("filter.devr.teamprompt.tooltip") //$NON-NLS-1$
- );
-
- // CREATE DEVELOPER PROMPT
- textDevr = SystemWidgetHelpers.createLabeledTextField(
- composite_prompts,
- null,
- RSESamplesPlugin.getResourceString("filter.devr.devrprompt.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("filter.devr.devrprompt.tooltip") //$NON-NLS-1$
- );
-
- resetFields();
- doInitializeFields();
-
- // add keystroke listeners...
- textTeam.addModifyListener(
- new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateStringInput();
- }
- }
- );
- textDevr.addModifyListener(
- new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateStringInput();
- }
- }
- );
- return composite_prompts;
- }
-
- /**
- * Override of parent method.
- * Return the control to recieve initial focus.
- *
- * @see org.eclipse.rse.ui.filters.SystemFilterStringEditPane#getInitialFocusControl()
- */
- public Control getInitialFocusControl()
- {
- return textTeam;
- }
-
- /**
- * Override of parent method.
- * Initialize the input fields based on the inputFilterString, and perhaps refProvider.
- * This can be called before createContents, so test for null widgets first!
- * Prior to this being called, resetFields is called to set the initial default state prior to input
- */
- protected void doInitializeFields()
- {
- if (textTeam == null)
- return; // do nothing
- if (inputFilterString != null)
- {
- int idx = inputFilterString.indexOf('/');
- if (idx < 0)
- textTeam.setText(inputFilterString);
- else
- {
- textTeam.setText(inputFilterString.substring(0,idx));
- textDevr.setText(inputFilterString.substring(idx+1));
- }
- }
- }
- /**
- * Override of parent method.
- * This is called in the change filter dialog when the user selects "new", or selects another string.
- */
- protected void resetFields()
- {
- textTeam.setText(""); //$NON-NLS-1$
- textDevr.setText("*"); //$NON-NLS-1$
- }
- /**
- * Override of parent method.
- * Called by parent to decide if information is complete enough to enable finish.
- */
- protected boolean areFieldsComplete()
- {
- if ((textTeam == null) || (textDevr == null))
- return false;
- else
- return (textTeam.getText().trim().length()>0) && (textDevr.getText().trim().length()>0);
- }
-
- /**
- * Override of parent method.
- * Get the filter string in its current form.
- * Functional opposite of doInitializeFields, which tears apart the input string in update mode,
- * to populate the GUIs. This method creates the filter string from the information in the GUI.
- *
- * @see org.eclipse.rse.ui.filters.SystemFilterStringEditPane#getFilterString()
- */
- public String getFilterString()
- {
- if ((textTeam == null) || (textDevr == null))
- return inputFilterString; // return what we were given.
- else
- {
- String teamName = textTeam.getText().trim();
- String devrName = textDevr.getText().trim();
- return teamName + "/" + devrName; //$NON-NLS-1$
- }
- }
-
- /**
- * Override of parent method.
- * Does complete verification of input fields. If this
- * method returns null, there are no errors and the dialog or wizard can close.
- *
- * @return error message if there is one, else null if ok
- */
- public SystemMessage verify()
- {
- errorMessage = null;
-
- /*
- Control controlInError = null;
- errorMessage = validateTeamInput(); // todo: implement if we want to syntax check input
- if (errorMessage != null)
- controlInError = textTeam;
- else
- {
- errorMessage = validateDevrInput(); // todo: implement to syntax check input
- if (errorMessage != null)
- controlInError = textDevr;
- }
-
- if (errorMessage != null)
- {
- if (controlInError != null)
- controlInError.setFocus();
- }
- */
- return errorMessage;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java
deleted file mode 100644
index bc08b71c3..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.subsystems;
-
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-
-import samples.model.DeveloperResource;
-import samples.model.TeamResource;
-
-/**
- * This is our subsystem, which manages the remote connection and resources for
- * a particular system connection object.
- */
-public class DeveloperSubSystem extends SubSystem
-{
- private TeamResource[] teams; // faked-out master list of teams
- private Vector devVector = new Vector(); // faked-out master list of developers
- private static int employeeId = 123456; // employee Id factory
-
- /**
- * @param host
- * @param connectorService
- */
- public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
- super(host, connectorService);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeSubSystem(IProgressMonitor monitor) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- }
-
- /**
- * For drag and drop, and clipboard support of remote objects.
- *
- * Return the remote object within the subsystem that corresponds to
- * the specified unique ID. Because each subsystem maintains it's own
- * objects, it's the responsability of the subsystem to determine
- * how an ID (or key) for a given object maps to the real object.
- * By default this returns null.
- *
- * @param key internal unique ID for object
- * @return Object identified by the given key
- */
- public Object getObjectWithAbsoluteName(String key)
- {
- // Functional opposite of getAbsoluteName(Object) in our resource adapters
- if (key.startsWith("Team_")) //$NON-NLS-1$
- {
- String teamName = key.substring(5);
- TeamResource[] allTeams = getAllTeams();
- for (int idx=0; idx<allTeams.length; idx++)
- if (allTeams[idx].getName().equals(teamName))
- return allTeams[idx];
- }
- else if (key.startsWith("Devr_")) //$NON-NLS-1$
- {
- String devrId = key.substring(5);
- DeveloperResource[] devrs = getAllDevelopers();
- for (int idx=0; idx<devrs.length; idx++)
- if (devrs[idx].getId().equals(devrId))
- return devrs[idx];
- }
- return null;
- }
-
- /**
- * When a filter is expanded, this is called for each filter string in the filter.
- * Using the criteria of the filter string, it must return objects representing remote resources.
- * For us, this will be an array of TeamResource objects.
- *
- * @param monitor - the progress monitor in effect while this operation performs
- * @param filterString - one of the filter strings from the expanded filter.
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- int slashIdx = filterString.indexOf('/');
- if (slashIdx < 0)
- {
- // Fake it out for now and return dummy list.
- // In reality, this would communicate with remote server-side code/data.
- TeamResource[] allTeams = getAllTeams();
-
- // Now, subset master list, based on filter string...
- NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
- Vector v = new Vector();
- for (int idx=0; idx<allTeams.length; idx++)
- {
- if (subsetter.matches(allTeams[idx].getName()))
- v.addElement(allTeams[idx]);
- }
- TeamResource[] teams = new TeamResource[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- teams[idx] = (TeamResource)v.elementAt(idx);
- return teams;
- }
- else
- {
- String teamName = filterString.substring(0, slashIdx);
- String devrName = filterString.substring(slashIdx+1);
- TeamResource[] allTeams = getAllTeams();
- TeamResource match = null;
- for (int idx=0; (match==null) && (idx<allTeams.length); idx++)
- if (allTeams[idx].getName().equals(teamName))
- match = allTeams[idx];
- if (match != null)
- {
- DeveloperResource[] allDevrs = match.getDevelopers();
- // Now, subset master list, based on filter string...
- NamePatternMatcher subsetter = new NamePatternMatcher(devrName);
- Vector v = new Vector();
- for (int idx=0; idx<allDevrs.length; idx++)
- {
- if (subsetter.matches(allDevrs[idx].getName()))
- v.addElement(allDevrs[idx]);
- }
- DeveloperResource[] devrs = new DeveloperResource[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- devrs[idx] = (DeveloperResource)v.elementAt(idx);
- return devrs;
- }
- }
- return null;
- }
-
- /**
- * When a remote resource is expanded, this is called to return the children of the resource, if
- * the resource's adapter states the resource object is expandable. <br>
- * For us, it is a Team resource that was expanded, and an array of Developer resources will be returned.
- *
- * @param monitor - the progress monitor in effect while this operation performs
- * @param parent - the parent resource object being expanded
- * @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- // typically we ignore the filter string as it is always "*"
- // until support is added for "quick filters" the user can specify/select
- // at the time they expand a remote resource.
-
- TeamResource team = (TeamResource)parent;
- return team.getDevelopers();
- }
-
- // ------------------
- // Our own methods...
- // ------------------
- /**
- * Get the list of all teams. Normally this would involve a trip the server, but we
- * fake it out and return a hard-coded local list.
- * @return array of all teams
- */
- public TeamResource[] getAllTeams()
- {
- if (teams == null)
- teams = createTeams("Team ", 4);
- return teams;
- }
- /**
- * Get the list of all developers. Normally this would involve a trip the server, but we
- * fake it out and return a hard-coded local list.
- * @return array of all developers
- */
- public DeveloperResource[] getAllDevelopers()
- {
- DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
- for (int idx=0; idx<allDevrs.length; idx++)
- allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
- return allDevrs;
- }
- /*
- * Create and return a dummy set of teams
- */
- private TeamResource[] createTeams(String prefix, int howMany)
- {
- TeamResource[] teams = new TeamResource[howMany];
- for (int idx=0; idx<teams.length; idx++)
- {
- teams[idx] = new TeamResource(this);
- teams[idx].setName(prefix + (idx+1));
- teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
- }
- return teams;
- }
-
- /*
- * Create and return a dummy set of developers
- */
- private DeveloperResource[] createDevelopers(String prefix, int nbr)
- {
- DeveloperResource[] devrs = new DeveloperResource[nbr];
- for (int idx=0; idx<devrs.length; idx++)
- {
- devrs[idx] = new DeveloperResource(this);
- devrs[idx].setName(prefix + (idx+1));
- devrs[idx].setId(Integer.toString(employeeId++));
- devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
- devVector.add(devrs[idx]); // update master list
- }
- return devrs;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java
deleted file mode 100644
index 9e1865d5a..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.subsystems;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-
-import samples.RSESamplesPlugin;
-
-/**
- * This is our subsystem factory, which creates instances of our subsystems,
- * and supplies the subsystem and filter actions to their popup menus.
- */
-public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
-
- /**
- * Constructor for DeveloperSubSystemConfiguration.
- */
- public DeveloperSubSystemConfiguration() {
- super();
- }
-
- /**
- * Create an instance of our subsystem.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(org.eclipse.rse.core.model.IHost)
- */
- public ISubSystem createSubSystemInternal(IHost conn) {
- return new DeveloperSubSystem(conn, getConnectorService(conn));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host) {
- return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
- .getConnectorService(host, IDeveloperSubSystem.class);
- }
-
- /**
- * Intercept of parent method that creates an initial default filter pool.
- * We intercept so that we can create an initial filter in that pool, which will
- * list all teams.
- */
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- ISystemFilterPool defaultPool = null;
- try {
- defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
- Vector strings = new Vector();
- strings.add("*"); //$NON-NLS-1$
- //--tutorial part 1
- //mgr.createSystemFilter(defaultPool, "All teams", strings);
- //--tutorial part 2
- ISystemFilter filter = mgr.createSystemFilter(defaultPool,
- RSESamplesPlugin.getResourceString("filter.default.name"), //$NON-NLS-1$
- strings);
- filter.setType("team"); //$NON-NLS-1$
- } catch (Exception exc) {}
- return defaultPool;
- }
-
- /**
- * Intercept of parent method so we can supply our own value shown in the property
- * sheet for the "type" property when a filter is selected within our subsystem.
- *
- * Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#getTranslatedFilterTypeProperty(org.eclipse.rse.core.filters.ISystemFilter)
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
- {
- //--tutorial part 1
- //return RSESamplesPlugin.getResourceString("property.type.teamfilter"); //$NON-NLS-1$
- //--tutorial part 2
- String type = selectedFilter.getType();
- if (type == null)
- type = "team"; //$NON-NLS-1$
- if (type.equals("team")) //$NON-NLS-1$
- return RSESamplesPlugin.getResourceString("property.type.teamfilter"); //$NON-NLS-1$
- else
- return RSESamplesPlugin.getResourceString("property.type.devrfilter"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.model.IHost)
- */
- public boolean supportsServerLaunchProperties(IHost host) {
- return false;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapter.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapter.java
deleted file mode 100644
index f82290144..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.subsystems;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.filters.actions.SystemChangeFilterAction;
-import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-import samples.RSESamplesPlugin;
-
-/**
- * Adds functionality to the basic SubSystemConfiguration.
- */
-public class DeveloperSubSystemConfigurationAdapter extends
- SubSystemConfigurationAdapter
-{
-
- /**
- * Constructor for DeveloperSubSystemConfigurationAdapter.
- */
- public DeveloperSubSystemConfigurationAdapter()
- {
- super();
- }
-
- /**
- * Override of parent method, to affect what is returned for the New Filter-> actions.
- * We intercept here, versus getNewFilterPoolFilterAction, so that we can return multiple
- * actions versus just one.
- */
- protected IAction[] getNewFilterPoolFilterActions(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
- {
- SystemNewFilterAction teamAction = (SystemNewFilterAction)super.getNewFilterPoolFilterAction(factory, selectedPool, shell);
- teamAction.setWizardPageTitle(RSESamplesPlugin.getResourceString("filter.team.pagetitle")); //$NON-NLS-1$
- teamAction.setPage1Description(RSESamplesPlugin.getResourceString("filter.team.pagetext")); //$NON-NLS-1$
- teamAction.setType("team"); //$NON-NLS-1$
- teamAction.setText(RSESamplesPlugin.getResourceString("filter.team.pagetitle") + "..."); //$NON-NLS-1$ //$NON-NLS-2$
-
- SystemNewFilterAction devrAction = (SystemNewFilterAction)super.getNewFilterPoolFilterAction(factory, selectedPool, shell);
- devrAction.setWizardPageTitle(RSESamplesPlugin.getResourceString("filter.devr.pagetitle")); //$NON-NLS-1$
- devrAction.setPage1Description(RSESamplesPlugin.getResourceString("filter.devr.pagetext")); //$NON-NLS-1$
- devrAction.setType("devr"); //$NON-NLS-1$
- devrAction.setText(RSESamplesPlugin.getResourceString("filter.devr.pagetitle") + "..."); //$NON-NLS-1$ //$NON-NLS-2$
- devrAction.setFilterStringEditPane(new DeveloperFilterStringEditPane(shell));
-
- IAction[] actions = new IAction[2];
- actions[0] = teamAction;
- actions[1] = devrAction;
- return actions;
- }
-
- /**
- * Override of parent method for returning the change-filter action, so we can affect it.
- */
- protected IAction getChangeFilterAction(ISubSystemConfiguration factory, ISystemFilter selectedFilter, Shell shell)
- {
- SystemChangeFilterAction action = (SystemChangeFilterAction)super.getChangeFilterAction(factory, selectedFilter, shell);
- String type = selectedFilter.getType();
- if (type == null)
- type = "team"; //$NON-NLS-1$
- if (type.equals("team")) //$NON-NLS-1$
- {
- action.setDialogTitle(RSESamplesPlugin.getResourceString("filter.team.dlgtitle")); //$NON-NLS-1$
- }
- else
- {
- action.setDialogTitle(RSESamplesPlugin.getResourceString("filter.devr.dlgtitle")); //$NON-NLS-1$
- action.setFilterStringEditPane(new DeveloperFilterStringEditPane(shell));
- }
- return action;
- }
-
- /**
- * Override of parent method for returning the image for filters in our subsystem.
- * @see org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getSystemFilterImage(org.eclipse.rse.core.filters.ISystemFilter)
- */
- public ImageDescriptor getSystemFilterImage(ISystemFilter filter)
- {
- String type = filter.getType();
- if (type == null)
- type = "team"; //$NON-NLS-1$
- if (type.equals("team")) //$NON-NLS-1$
- return RSESamplesPlugin.getDefault().getImageDescriptor("ICON_ID_TEAMFILTER"); //$NON-NLS-1$
- else
- return RSESamplesPlugin.getDefault().getImageDescriptor("ICON_ID_DEVELOPERFILTER"); //$NON-NLS-1$
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 3ad6da7b0..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. 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:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.subsystems;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-
-/**
- * @see IAdapterFactory
- */
-public class DeveloperSubSystemConfigurationAdapterFactory implements
- IAdapterFactory {
-
- private ISubSystemConfigurationAdapter ssConfigAdapter = new DeveloperSubSystemConfigurationAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISubSystemConfigurationAdapter.class};
- }
-
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- * @param manager Platform adapter manager
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, DeveloperSubSystemConfiguration.class);
- }
-
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof DeveloperSubSystemConfiguration)
- adapter = ssConfigAdapter;
-
- return adapter;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/IDeveloperSubSystem.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/IDeveloperSubSystem.java
deleted file mode 100644
index 226d2b867..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/IDeveloperSubSystem.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. 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:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.subsystems;
-
-public interface IDeveloperSubSystem {
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java
deleted file mode 100644
index d2e58ef73..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.ui.actions;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteError;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteOutput;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellChangeEvent;
-import org.eclipse.rse.services.shells.IHostShellOutputListener;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-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.servicesubsystem.IShellServiceSubSystem;
-
-/**
- * An action that runs a command to display the contents of a Jar file.
- * The plugin.xml file restricts this action so it only appears for .jar files.
- */
-public class ShowJarContents extends SystemAbstractRemoteFilePopupMenuExtensionAction {
-
- /**
- * Constructor for ShowJarContents.
- */
- public ShowJarContents() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.actions.SystemAbstractPopupMenuExtensionAction#run()
- */
- public void run() {
- IRemoteFile selectedFile = getFirstSelectedRemoteFile();
- String cmdToRun = "jar -tvf " + selectedFile.getAbsolutePath(); //$NON-NLS-1$
- try {
- runCommand(cmdToRun);
- } catch(Exception e) {
- String excType = e.getClass().getName();
- MessageDialog.openError(getShell(), excType, excType+": "+e.getLocalizedMessage()); //$NON-NLS-1$
- e.printStackTrace();
- }
- }
-
- public IRemoteCmdSubSystem getRemoteCmdSubSystem() {
- //get the Command subsystem associated with the current host
- IHost myHost = getSubSystem().getHost();
- IRemoteCmdSubSystem[] subsys = RemoteCommandHelpers.getCmdSubSystems(myHost);
- for (int i=0; i<subsys.length; i++) {
- if (subsys[i].getSubSystemConfiguration().supportsCommands()) {
- return subsys[i];
- }
- }
- return null;
- }
-
- public void runCommand(String command) throws Exception
- {
- IRemoteCmdSubSystem cmdss = getRemoteCmdSubSystem();
- if (cmdss!=null && cmdss.isConnected()) {
- //Option A: run the command invisibly through SubSystem API
- //runCommandInvisibly(cmdss, command);
- //Option B: run the command invisibly through Service API
- //runCommandInvisiblyService(cmdss, command);
- //Option C: run the command in a visible shell
- RemoteCommandHelpers.runUniversalCommand(getShell(), command, ".", cmdss); //$NON-NLS-1$
- } else {
- MessageDialog.openError(getShell(), "No command subsystem", "Found no command subsystem");
- }
- }
-
- public static class StdOutOutputListener implements IHostShellOutputListener {
- public void shellOutputChanged(IHostShellChangeEvent event) {
- IHostOutput[] lines = event.getLines();
- for(int i=0; i<lines.length; i++) {
- System.out.println(lines[i]);
- }
- }
- }
-
- /** New version of running commands through IShellService / IHostShell */
- public void runCommandInvisiblyService(IRemoteCmdSubSystem cmdss, String command) throws Exception
- {
- if (cmdss instanceof IShellServiceSubSystem) {
- IShellService shellService = ((IShellServiceSubSystem)cmdss).getShellService();
- String [] environment = new String[1];
- environment[0] = "AAA=BBB"; //$NON-NLS-1$
- String initialWorkingDirectory = "."; //$NON-NLS-1$
-
- IHostShell hostShell = shellService.launchShell(new NullProgressMonitor(), initialWorkingDirectory, environment);
- hostShell.addOutputListener(new StdOutOutputListener());
- //hostShell.writeToShell("pwd"); //$NON-NLS-1$
- //hostShell.writeToShell("echo ${AAA}"); //$NON-NLS-1$
- //hostShell.writeToShell("env"); //$NON-NLS-1$
- hostShell.writeToShell(command);
- hostShell.writeToShell("exit"); //$NON-NLS-1$
- }
- }
-
- /** Old version of running commands through the command subsystem */
- public void runCommandInvisibly(IRemoteCmdSubSystem cmdss, String command) throws Exception
- {
- command = command + cmdss.getParentRemoteCmdSubSystemConfiguration().getCommandSeparator() + "exit"; //$NON-NLS-1$
- Object[] result = cmdss.runCommand(command, null, false);
- if (result.length>0 && result[0] instanceof IRemoteCommandShell) {
- IRemoteCommandShell cs = (IRemoteCommandShell)result[0];
- while (cs.isActive()) {
- Thread.sleep(1000);
- }
- Object[] output = cs.listOutput();
- for (int i=0; i<output.length; i++) {
- if (output[i] instanceof RemoteOutput) {
- System.out.println(((RemoteOutput)output[i]).getText());
- } else if (output[i] instanceof RemoteError) {
- System.err.println(((RemoteError)output[i]).getText());
- }
- }
- cmdss.removeShell(cs);
- }
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java
deleted file mode 100644
index a9316e3ff..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. 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:
- * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
- ********************************************************************************/
-
-package samples.ui.propertypages;
-
-import org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-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.Label;
-
-import samples.RSESamplesPlugin;
-
-/**
- * A sample property page for a remote object, which in this case is scoped via the
- * extension point xml to only apply to folder objects.
- */
-public class FolderInfoPropertyPage
- extends SystemAbstractRemoteFilePropertyPageExtensionAction
- implements SelectionListener
-{
- // gui widgets...
- private Label sizeLabel, filesLabel, foldersLabel;
- private Button stopButton;
- // state...
- private int totalSize = 0;
- private int totalFolders = 0;
- private int totalFiles = 0;
- private boolean stopped = false;
- private Thread workerThread;
- private Runnable guiUpdater;
-
- /**
- * Constructor for FolderInfoPropertyPage.
- */
- public FolderInfoPropertyPage()
- {
- super();
- }
-
- // --------------------------
- // Parent method overrides...
- // --------------------------
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction#createContentArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- Composite composite = SystemWidgetHelpers.createComposite(parent, 2);
- // draw the gui
- sizeLabel = SystemWidgetHelpers.createLabeledLabel(composite,
- RSESamplesPlugin.getResourceString("pp.size.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("pp.size.tooltip"), //$NON-NLS-1$
- false);
- filesLabel = SystemWidgetHelpers.createLabeledLabel(composite,
- RSESamplesPlugin.getResourceString("pp.files.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("pp.files.tooltip"), //$NON-NLS-1$
- false);
- foldersLabel = SystemWidgetHelpers.createLabeledLabel(composite,
- RSESamplesPlugin.getResourceString("pp.folders.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("pp.folders.tooltip"), //$NON-NLS-1$
- false);
- stopButton = SystemWidgetHelpers.createPushButton(composite, null,
- RSESamplesPlugin.getResourceString("pp.stopButton.label"), //$NON-NLS-1$
- RSESamplesPlugin.getResourceString("pp.stopButton.tooltip") //$NON-NLS-1$
- );
- stopButton.addSelectionListener(this);
-
- setValid(false); // Disable OK button until thread is done
-
- // show "Processing..." message
- setMessage(RSESamplesPlugin.getPluginMessage("RSSG1002")); //$NON-NLS-1$
-
- // create instance of Runnable to allow asynchronous GUI updates from background thread
- guiUpdater = new RunnableGUIClass();
- // spawn a thread to calculate the information
- workerThread = new RunnableClass(getRemoteFile());
- workerThread.start();
-
- return composite;
- }
-
- /**
- * Intercept from PreferencePage. Called when user presses Cancel button.
- * We stop the background thread.
- * @see org.eclipse.jface.preference.PreferencePage#performCancel()
- */
- public boolean performCancel()
- {
- killThread();
- return true;
- }
-
- /**
- * Intercept from DialogPage. Called when dialog going away.
- * If the user presses the X to close this dialog, we
- * need to stop that background thread.
- */
- public void dispose()
- {
- killThread();
- super.dispose();
- }
-
- /**
- * Private method to kill our background thread.
- * Control doesn't return until it ends.
- */
- private void killThread()
- {
- if (!stopped && workerThread.isAlive())
- {
- stopped = true;
- try {
- workerThread.join(); // wait for thread to end
- } catch (InterruptedException exc) {}
- }
- }
-
- // -------------------------------------------
- // Methods from SelectionListener interface...
- // -------------------------------------------
-
- /**
- * From SelectionListener
- * @see SelectionListener#widgetSelected(SelectionEvent)
- */
- public void widgetSelected(SelectionEvent event)
- {
- if (event.getSource() == stopButton)
- {
- stopped = true;
- stopButton.setEnabled(false);
- }
- }
- /**
- * From SelectionListener
- * @see SelectionListener#widgetDefaultSelected(SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
-
- // ----------------
- // Inner classes...
- // ----------------
- /**
- * Inner class encapsulating the background work to be done, so it may be executed
- * in background thread.
- */
- private class RunnableClass extends Thread
- {
- IRemoteFile inputFolder;
-
- RunnableClass(IRemoteFile inputFolder)
- {
- this.inputFolder = inputFolder;
- }
-
- public void run()
- {
- if (stopped)
- return;
- walkFolder(inputFolder);
- updateGUI();
- if (!stopped)
- {
- stopped = true;
- updateGUI();
- }
- }
-
- /**
- * Recursively walk a folder, updating the running tallies.
- * Update the GUI after processing each subfolder.
- */
- private void walkFolder(IRemoteFile currFolder)
- {
- try
- {
- IRemoteFile[] folders = currFolder.getParentRemoteFileSubSystem().listFoldersAndFiles( currFolder, null);
- if ((folders != null) && (folders.length>0))
- {
- for (int idx=0; !stopped && (idx<folders.length); idx++)
- {
- // is this a folder?
- if (folders[idx].isDirectory())
- {
- ++totalFolders;
- walkFolder(folders[idx]);
- updateGUI();
- }
- // is this a file?
- else
- {
- ++totalFiles;
- totalSize += folders[idx].getLength();
- }
- }
- }
- }
- catch (SystemMessageException e)
- {
-
- }
- } // end of walkFolder method
-
- } // end of inner class
-
- /**
- * Inner class encapsulating the GUI work to be done from the
- * background thread.
- */
- private class RunnableGUIClass implements Runnable
- {
- public void run()
- {
- if (stopButton.isDisposed())
- return;
- if (!stopped)
- {
- sizeLabel.setText(Integer.toString(totalSize));
- filesLabel.setText(Integer.toString(totalFiles));
- foldersLabel.setText(Integer.toString(totalFolders));
- }
- else if (stopped)
- {
- setValid(true); // re-enable OK button
- stopButton.setEnabled(false); // disable Stop button
- clearMessage(); // clear "Processing..." message
- }
- }
- }
-
-
- /**
- * Update the GUI with the current status
- */
- private void updateGUI()
- {
- Display.getDefault().asyncExec(guiUpdater);
- }
-
-
-}
diff --git a/rse/examples/org.eclipse.rse.remotecdt/.classpath b/rse/examples/org.eclipse.rse.remotecdt/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/examples/org.eclipse.rse.remotecdt/.cvsignore b/rse/examples/org.eclipse.rse.remotecdt/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/examples/org.eclipse.rse.remotecdt/.project b/rse/examples/org.eclipse.rse.remotecdt/.project
deleted file mode 100644
index da5ae4bbb..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.remotecdt</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/examples/org.eclipse.rse.remotecdt/.settings/org.eclipse.core.resources.prefs b/rse/examples/org.eclipse.rse.remotecdt/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 831ab78c5..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Sep 19 23:47:40 CEST 2006
-eclipse.preferences.version=1
-encoding//src/org/eclipse/rse/remotecdt/messages.properties=8859_1
diff --git a/rse/examples/org.eclipse.rse.remotecdt/.settings/org.eclipse.jdt.core.prefs b/rse/examples/org.eclipse.rse.remotecdt/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/examples/org.eclipse.rse.remotecdt/HelpContexts.xml b/rse/examples/org.eclipse.rse.remotecdt/HelpContexts.xml
deleted file mode 100644
index 8401379b6..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/HelpContexts.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<!--
-Copyright (c) 2006 Wind River Systems, Inc.
-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:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<contexts>
- <context id="launchgroup">
- <description>The Remote CDT Launch Tab Group allows you to specify the connection, program and properties of a program to launch and debug on a remote system.
- </description>
- <topic href="remotecdt.html" label="Launching Remote C/C++ Applications"/>
-</context>
-
-</contexts> \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.remotecdt/META-INF/MANIFEST.MF b/rse/examples/org.eclipse.rse.remotecdt/META-INF/MANIFEST.MF
deleted file mode 100644
index 8d6b275a3..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.remotecdt;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.remotecdt.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.rse.ui,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.core,
- org.eclipse.rse.services,
- org.eclipse.cdt.launch,
- org.eclipse.cdt.debug.mi.core,
- org.eclipse.cdt.debug.core,
- org.eclipse.cdt.core,
- org.eclipse.debug.ui,
- org.eclipse.ui,
- org.eclipse.debug.core,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.cdt.debug.mi.ui,
- org.eclipse.cdt.debug.ui
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/examples/org.eclipse.rse.remotecdt/about.html b/rse/examples/org.eclipse.rse.remotecdt/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.remotecdt/about.ini b/rse/examples/org.eclipse.rse.remotecdt/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.remotecdt/about.mappings b/rse/examples/org.eclipse.rse.remotecdt/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.remotecdt/about.properties b/rse/examples/org.eclipse.rse.remotecdt/about.properties
deleted file mode 100644
index 203b2fb10..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 PalmSource, Inc. and others.
-# 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:
-# PalmSource - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer CDT Remote Launcher\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright PalmSource, Inc., Wind River Systems, Inc. and others 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.remotecdt/build.properties b/rse/examples/org.eclipse.rse.remotecdt/build.properties
deleted file mode 100644
index f1908ea16..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/build.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-#####################################################################################
-# Copyright (c) 2006 PalmSource, Inc.
-# 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:
-# Ewa Matejska (PalmSource)
-# Martin Oberhuber (Wind River) - fix 158529: Migrate docs to HTML / TOC format
-# Martin Oberhuber (Wind River) - add help contexts
-#####################################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- eclipse32.png,\
- plugin.properties,\
- plugin.xml,\
- remotecdt.html,\
- toc.xml,\
- HelpContexts.xml,\
- icons/,\
- .
-src.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.xml
diff --git a/rse/examples/org.eclipse.rse.remotecdt/eclipse32.png b/rse/examples/org.eclipse.rse.remotecdt/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/c_app.gif b/rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/c_app.gif
deleted file mode 100644
index 504ef509f..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/c_app.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/systemlocal_obj.gif b/rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/systemlocal_obj.gif
deleted file mode 100644
index d60c188ca..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/systemlocal_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/systemlocallive_obj.gif b/rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/systemlocallive_obj.gif
deleted file mode 100644
index ba10dec0a..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/icons/full/obj16/systemlocallive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.remotecdt/plugin.properties b/rse/examples/org.eclipse.rse.remotecdt/plugin.properties
deleted file mode 100644
index 6b358b8ae..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = RSE CDT Remote Launcher
-providerName = Eclipse.org
diff --git a/rse/examples/org.eclipse.rse.remotecdt/plugin.xml b/rse/examples/org.eclipse.rse.remotecdt/plugin.xml
deleted file mode 100644
index 4e7673e7c..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/plugin.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006 PalmSource, Inc. and others
-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:
-Ewa Matejska (PalmSource) - initial API and implementation
-Martin Oberhuber (Wind River) - fix 158529: Migrate docs to HTML / TOC format
--->
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
- delegate="org.eclipse.rse.remotecdt.RemoteRunLaunchDelegate"
- public="true"
- sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
- name="C/C++ Remote Application"
- id="org.eclipse.rse.remotecdt.RemoteApplicationLaunch"
- modes="debug,run">
- </launchConfigurationType>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage
- icon="icons/full/obj16/c_app.gif"
- configTypeID="org.eclipse.rse.remotecdt.RemoteApplicationLaunch"
- id="org.eclipse.cdt.launch.localRunLaunchImagefff">
- </launchConfigurationTypeImage>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- <launchConfigurationTabGroup
- class="org.eclipse.rse.remotecdt.RemoteLaunchConfigurationTabGroup"
- helpContextId="org.eclipse.rse.remotecdt.launchgroup"
- id="org.eclipse.rse.remotecdt.RemoteLaunchTabGroup"
- type="org.eclipse.rse.remotecdt.RemoteApplicationLaunch">
- </launchConfigurationTabGroup>
- </extension>
- <extension
- point="org.eclipse.cdt.debug.core.CDebugger">
- <debugger
- class="org.eclipse.cdt.debug.mi.core.GDBServerCDIDebugger2"
- cpu="*"
- id="org.eclipse.rse.remotecdt.RemoteGDBDebugger"
- modes="run"
- name="remote gdb/mi"
- platform="*">
- </debugger>
- </extension>
- <extension
- point="org.eclipse.cdt.debug.ui.CDebuggerPage">
- <debuggerPage
- class="org.eclipse.rse.remotecdt.RemoteGDBDebuggerPage"
- debuggerID="org.eclipse.rse.remotecdt.RemoteGDBDebugger"
- id="org.eclipse.rse.remotecdt.RemoteGDBDebuggerPage">
- </debuggerPage>
- </extension>
-
- <!-- ============================================ -->
- <!-- Define Help Context -->
- <!-- ============================================ -->
- <extension point="org.eclipse.help.contexts">
- <contexts file="HelpContexts.xml"/>
- </extension>
- <extension point="org.eclipse.help.toc">
- <toc file="toc.xml"/>
- </extension>
-
-</plugin>
diff --git a/rse/examples/org.eclipse.rse.remotecdt/remotecdt.html b/rse/examples/org.eclipse.rse.remotecdt/remotecdt.html
deleted file mode 100644
index 04dc3a22e..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/remotecdt.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<meta name="copyright" content="Copyright (c) 2006 PalmSource, Inc. and others. This page is made available under license. For full details see the LEGAL notice in the documentation book that contains this page." >
-<link rel="stylesheet" type="text/css" href="../org.eclipse.rse.doc.user/book.css" />
-<title>Launching Remote C/C++ Applications</title>
-</head>
-<!--
-Copyright (c) 2006 PalmSource, Inc. and others
-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:
-Ewa Matejska (PalmSource) - initial API and implementation
-Martin Oberhuber (Wind River) - fix 158529: Migrate docs to HTML / TOC format
--->
-
-<body id="tremotecdt"><a name="tremotecdt"><!-- --></a>
-<h1 class="topictitle1">Launching Remote C/C++ Applications</h1>
-<div class="p">
-<p>The RSE Remote CDT Plugin builds on top of CDT and integrates with RSE to introduce
-a "Remote C/C++ Application" launch configuration. This launch configuration relies
-on the shell and file services of the RSE connections.</p>
-
-<p>The "Remote C/C++ Application" launch configuration enables the user to select from a list of RSE
-connections which have the shell service available. For a debug launch, the binary is downloaded
-to the remote using the file service of the RSE connection, gdbserver is automatically started
-on the remote using the shell service and a gdb debug connection is establised. For a run launch,
-the binary is downloaded to the remote using the file service and then it is invoked using the shell
-service.</p>
-
-<p>In the future, an RSE file service should be used to select where the remote download
-should take place. Right now the remote path is entered manually in a text field.</p>
-</div>
-
-<h2>System Prerequisites</h2>
-<div class="p"><b>Local Host</b>
-<ul>
- <li>It is necessary to create an RSE connection which has the file and shell services
- available.</li>
-</ul></div>
-
-<div class="p"><b>Remote Host</b>
-<ul>
- <li>gdbserver is on the path.</li>
- <li>port 2345 is available to use. gdbserver will use this port.</li>
-</ul></div>
-
-<h2>Using</h2>
-<div class="p">
-<p>A "Remote C++ Application" launch configuration will be available.
-After building a binary which will run on your remote, try using this
-configuration to run or debug it.</p>
-</div>
-
-<h2>Current Limitations</h2>
-<div class="p">
-<p>There is no way to tell when the command on the remote has finished
-running. As a result, the "Remote Shell" process will be left active
-after the debug session dies and needs to be terminated manually. The
-run process also needs to be terminated manually for the same reason.</p>
-</div>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/Activator.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/Activator.java
deleted file mode 100644
index 0bdfe8027..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/Activator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
- * 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:
- * Ewa Matejska (PalmSource)
- *******************************************************************************/
-
-package org.eclipse.rse.remotecdt;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends Plugin {
-
- /* The shared instance */
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/IRemoteConnectionConfigurationConstants.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/IRemoteConnectionConfigurationConstants.java
deleted file mode 100644
index d293815a2..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/IRemoteConnectionConfigurationConstants.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
- * 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:
- * Ewa Matejska (PalmSource) - Adapted from IGDBServerMILaunchConfigurationConstants
- *******************************************************************************/
-
-
-package org.eclipse.rse.remotecdt;
-
-import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
-import org.eclipse.debug.core.DebugPlugin;
-
-public interface IRemoteConnectionConfigurationConstants extends
- IGDBServerMILaunchConfigurationConstants {
-
- public static final String ATTR_REMOTE_CONNECTION =
- DebugPlugin.getUniqueIdentifier() + ".REMOTE_TCP"; //$NON-NLS-1$
-
-
- public static final String ATTR_GDBSERVER_PORT =
- DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_PORT"; //$NON-NLS-1$
- public static final String ATTR_GDBSERVER_COMMAND =
- DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_COMMAND"; //$NON-NLS-1$
-
- public static final String ATTR_GDBSERVER_PORT_DEFAULT = "2345"; //$NON-NLS-1$
- public static final String ATTR_GDBSERVER_COMMAND_DEFAULT = "gdbserver"; //$NON-NLS-1$
-
- /*
- * Generic Remote Path and Download options
- * ATTR_REMOTE_PATH: Path of the binary on the remote.
- * ATTR_SKIP_DOWNLOAD_TO_TARGET: true if download to remote is not desired.
- */
- public static final String ATTR_REMOTE_PATH =
- DebugPlugin.getUniqueIdentifier() + ".ATTR_TARGET_PATH"; //$NON-NLS-1$
- public static final String ATTR_SKIP_DOWNLOAD_TO_TARGET =
- DebugPlugin.getUniqueIdentifier() + ".ATTR_SKIP_DOWNLOAD_TO_TARGET"; //$NON-NLS-1$
-
-}
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/Messages.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/Messages.java
deleted file mode 100644
index 8b1fbb4a0..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/Messages.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.remotecdt;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.remotecdt.messages"; //$NON-NLS-1$
-
- public static String Gdbserver_name_textfield_label;
-
- public static String Gdbserver_Settings_Tab_Name;
-
- public static String Port_number_textfield_label;
-
- public static String Remote_GDB_Debugger_Options;
-
- public static String RemoteCMainTab_Program;
- public static String RemoteCMainTab_SkipDownload;
- public static String RemoteCMainTab_ErrorNoProgram;
- public static String RemoteCMainTab_ErrorNoConnection;
- public static String RemoteCMainTab_Connection;
- public static String RemoteCMainTab_New;
-
- public static String RemoteRunLaunchDelegate_RemoteShell;
- public static String RemoteRunLaunchDelegate_1;
- public static String RemoteRunLaunchDelegate_3;
- public static String RemoteRunLaunchDelegate_4;
- public static String RemoteRunLaunchDelegate_5;
- public static String RemoteRunLaunchDelegate_6;
- public static String RemoteRunLaunchDelegate_7;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteCDebuggerTab.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteCDebuggerTab.java
deleted file mode 100644
index af34e9a4a..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteCDebuggerTab.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
- * 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:
- * Ewa Matejska (PalmSource)
- *******************************************************************************/
-
-package org.eclipse.rse.remotecdt;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.core.ICDebugConfiguration;
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
-import org.eclipse.cdt.launch.ui.CDebuggerTab;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.swt.widgets.Composite;
-
-public class RemoteCDebuggerTab extends CDebuggerTab {
-
- public void createControl(Composite parent) {
- super.createControl(parent);
- LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
- "org.eclipse.rse.remotecdt.launchgroup"); //$NON-NLS-1$
- }
-
- static final private String REMOTE_GDB_DEBUGGER_NAME = "remote gdb/mi"; //$NON-NLS-1$
-
- public RemoteCDebuggerTab(boolean attachMode) {
- super(attachMode);
- }
-
- protected void loadDebuggerComboBox(ILaunchConfiguration config, String selection) {
- ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getDebugConfigurations();
- String defaultSelection = selection;
- List list = new ArrayList();
- for(int i = 0; i < debugConfigs.length; i++) {
- ICDebugConfiguration configuration = debugConfigs[i];
- if(configuration.getName().equals(REMOTE_GDB_DEBUGGER_NAME)) {
- list.add(configuration);
- // Select as default selection
- defaultSelection = configuration.getID();
- break;
- }
- }
- setInitializeDefault(defaultSelection.equals("") ? true : false); //$NON-NLS-1$
- loadDebuggerCombo((ICDebugConfiguration[])list.toArray(
- new ICDebugConfiguration[list.size()]), defaultSelection);
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteCMainTab.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteCMainTab.java
deleted file mode 100644
index 05c65af07..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteCMainTab.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
- * 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:
- * Ewa Matejska (PalmSource)
- *******************************************************************************/
-
-package org.eclipse.rse.remotecdt;
-
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
-import org.eclipse.cdt.launch.ui.CMainTab;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-
-public class RemoteCMainTab extends CMainTab {
-
- /* Labels and Error Messages */
- private static final String REMOTE_PROG_LABEL_TEXT = Messages.RemoteCMainTab_Program;
- private static final String SKIP_DOWNLOAD_BUTTON_TEXT = Messages.RemoteCMainTab_SkipDownload;
- private static final String REMOTE_PROG_TEXT_ERROR = Messages.RemoteCMainTab_ErrorNoProgram;
- private static final String CONNECTION_TEXT_ERROR = Messages.RemoteCMainTab_ErrorNoConnection;
-
- /* Defaults */
- private static final String REMOTE_PATH_DEFAULT = EMPTY_STRING;
- private static final boolean SKIP_DOWNLOAD_TO_REMOTE_DEFAULT = false;
-
- protected Button newRemoteConnectionButton;
- protected Label connectionLabel;
- protected Combo connectionCombo;
- protected Label remoteProgLabel;
- protected Text remoteProgText;
- protected Button skipDownloadButton;
- protected Button useLocalPathButton;
-
- SystemNewConnectionAction action = null;
-
- public RemoteCMainTab(boolean terminalOption) {
- super(terminalOption);
- }
-
- /*
- * createControl
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl
- */
- public void createControl(Composite parent) {
- Composite comp = new Composite(parent, SWT.NONE);
- GridLayout topLayout = new GridLayout();
- setControl(comp);
- comp.setLayout(topLayout);
-
- /* The RSE Connection dropdown with New button. */
- createVerticalSpacer(comp, 1);
- createRemoteConnectionGroup(comp, 3);
-
- /* The Project and local binary location */
- createVerticalSpacer(comp, 1);
- createProjectGroup(comp, 1);
- createExeFileGroup(comp, 1);
-
- /* The remote binary location and skip download option */
- createVerticalSpacer(comp, 1);
- createTargetExePath(comp);
- createDownloadOption(comp);
-
- /* If the local binary path changes, modify the remote binary location */
- fProgText.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent evt) {
- setLocalPathForRemotePath();
- }
- });
-
- LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
- "org.eclipse.rse.remotecdt.launchgroup"); //$NON-NLS-1$
-
- LaunchUIPlugin.setDialogShell(parent.getShell());
- }
-
- /*
- * isValid
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid
- */
- public boolean isValid(ILaunchConfiguration config) {
- boolean retVal = super.isValid(config);
- if(retVal == true) {
- setErrorMessage(null);
- int currentSelection = connectionCombo.getSelectionIndex();
- String connection_name = currentSelection >= 0 ? connectionCombo.getItem(currentSelection) : ""; //$NON-NLS-1$
- if(connection_name.equals("")) { //$NON-NLS-1$
- setErrorMessage(CONNECTION_TEXT_ERROR);
- retVal = false;
- }
- if(retVal) {
- String name = remoteProgText.getText().trim();
- if (name.length() == 0) {
- setErrorMessage(REMOTE_PROG_TEXT_ERROR);
- retVal = false;
- }
- }
- }
- return retVal;
- }
-
- protected void createRemoteConnectionGroup(Composite parent, int colSpan) {
- Composite projComp = new Composite(parent, SWT.NONE);
- GridLayout projLayout = new GridLayout();
- projLayout.numColumns = 3;
- projLayout.marginHeight = 0;
- projLayout.marginWidth = 0;
- projComp.setLayout(projLayout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = colSpan;
- projComp.setLayoutData(gd);
-
- connectionLabel = new Label(projComp, SWT.NONE);
- connectionLabel.setText(Messages.RemoteCMainTab_Connection);
- gd = new GridData();
- gd.horizontalSpan = 1;
- connectionLabel.setLayoutData(gd);
-
- connectionCombo = new Combo(projComp, SWT.DROP_DOWN | SWT.READ_ONLY);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 1;
- connectionCombo.setLayoutData(gd);
- connectionCombo.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- setDirty(true);
- updateLaunchConfigurationDialog();
- }
- });
- updateConnectionPulldown();
-
- newRemoteConnectionButton = createPushButton(projComp, Messages.RemoteCMainTab_New, null);
- newRemoteConnectionButton.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent evt) {
- handleNewRemoteConnectionSelected();
- updateLaunchConfigurationDialog();
- updateConnectionPulldown();
- }
- });
-
- }
-
- /*
- * createTargetExePath
- * This creates the remote path user-editable textfield on the Main Tab.
- */
- protected void createTargetExePath(Composite parent) {
- Composite mainComp = new Composite(parent, SWT.NONE);
- GridLayout mainLayout = new GridLayout();
- mainLayout.marginHeight = 0;
- mainLayout.marginWidth = 0;
- mainComp.setLayout(mainLayout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- mainComp.setLayoutData(gd);
- remoteProgLabel = new Label(mainComp, SWT.NONE);
- remoteProgLabel.setText(REMOTE_PROG_LABEL_TEXT);
- gd = new GridData();
- remoteProgLabel.setLayoutData(gd);
- remoteProgText = new Text(mainComp, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- remoteProgText.setLayoutData(gd);
- remoteProgText.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent evt) {
- updateLaunchConfigurationDialog();
- }
- });
- }
-
- /*
- * createDownloadOption
- * This creates the skip download check button.
- */
- protected void createDownloadOption(Composite parent) {
- Composite mainComp = new Composite(parent, SWT.NONE);
- GridLayout mainLayout = new GridLayout();
- mainLayout.marginHeight = 0;
- mainLayout.marginWidth = 0;
- mainComp.setLayout(mainLayout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- mainComp.setLayoutData(gd);
-
- skipDownloadButton = createCheckButton(mainComp, SKIP_DOWNLOAD_BUTTON_TEXT);
- skipDownloadButton.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent evt) {
- updateLaunchConfigurationDialog();
- }
- });
- skipDownloadButton.setEnabled(true);
- }
-
- /*
- * performApply
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply
- */
- public void performApply(ILaunchConfigurationWorkingCopy config) {
-
- int currentSelection = connectionCombo.getSelectionIndex();
- config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION,
- currentSelection >= 0 ? connectionCombo.getItem(currentSelection) : null);
- config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_PATH,
- remoteProgText.getText());
- config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
- skipDownloadButton.getSelection());
- super.performApply(config);
- }
-
- /*
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom
- */
- public void initializeFrom(ILaunchConfiguration config) {
- String remoteConnection = null;
- try {
- remoteConnection = config.getAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION,
- ""); //$NON-NLS-1$
- } catch (CoreException ce) {
- // Ignore
- }
-
- String[] items = connectionCombo.getItems();
- int i = 0;
- for(i = 0; i < items.length; i++)
- if(items[i].equals(remoteConnection))
- break;
- /* Select the last used connection in the connecion pulldown if it still exists. */
- if(i < items.length)
- connectionCombo.select(i);
- else if(items.length > 0)
- connectionCombo.select(0);
-
- super.initializeFrom(config);
-
- updateTargetProgFromConfig(config);
- updateSkipDownloadFromConfig(config);
- }
-
- protected void handleNewRemoteConnectionSelected() {
- if (action == null)
- {
- action = new SystemNewConnectionAction(getControl().getShell(), false, false, null);
- }
-
- try
- {
- action.run();
- } catch (Exception e)
- {
- // Ignore
- }
- }
-
- protected void updateConnectionPulldown() {
- connectionCombo.removeAll();
- IHost[] connections = RSEUIPlugin.getTheSystemRegistry().getHostsBySubSystemConfigurationCategory("shells"); //$NON-NLS-1$
- for(int i = 0; i < connections.length; i++)
- connectionCombo.add(connections[i].getAliasName());
-
- if(connections.length > 0)
- connectionCombo.select(connections.length - 1);
- }
-
- protected void updateTargetProgFromConfig(ILaunchConfiguration config) {
- String targetPath = null;
- try {
- targetPath = config.getAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_PATH,
- REMOTE_PATH_DEFAULT);
- } catch (CoreException e) {
- // Ignore
- }
- remoteProgText.setText(targetPath);
- }
-
- protected void updateSkipDownloadFromConfig(ILaunchConfiguration config) {
- boolean downloadToTarget = true;
- try {
- downloadToTarget = config.getAttribute(IRemoteConnectionConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
- SKIP_DOWNLOAD_TO_REMOTE_DEFAULT);
- } catch (CoreException e) {
- // Ignore for now
- }
- skipDownloadButton.setSelection(downloadToTarget);
- }
-
- /*
- * setLocalPathForRemotePath
- * This function sets the remote path text field with the value of the
- * local executable path.
- */
- private void setLocalPathForRemotePath() {
- String programName = fProgText.getText().trim();
- String remoteName = remoteProgText.getText().trim();
- if (programName.length() != 0 && remoteName.length() == 0) {
- IProject project = getCProject().getProject();
- IPath exePath = new Path(programName);
- if (!exePath.isAbsolute()) {
- exePath = project.getFile(programName).getLocation();
- }
- String path = exePath.toString();
- remoteProgText.setText(path);
- }
- }
-}
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteGDBDebuggerPage.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteGDBDebuggerPage.java
deleted file mode 100644
index 119b9b5e1..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteGDBDebuggerPage.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
- * 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:
- * Ewa Matejska (PalmSource)
- *
- * Referenced GDBDebuggerPage code to write this.
- *******************************************************************************/
-
-package org.eclipse.rse.remotecdt;
-
-import org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-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.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * The dynamic debugger tab for remote launches using gdb server.
- * The gdbserver settings are used to start a gdbserver session on the
- * remote and then to connect to it from the host. The DSDP-TM project is
- * used to accomplish this.
- */
-public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
-
- protected Text fGDBServerCommandText;
-
- protected Text fGDBServerPortNumberText;
-
- public String getName() {
- return Messages.Remote_GDB_Debugger_Options;
- }
-
- public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
- super.setDefaults(configuration);
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT );
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
- }
-
- public void initializeFrom( ILaunchConfiguration configuration ) {
- super.initializeFrom(configuration);
- String gdbserverCommand = null;
- String gdbserverPortNumber = null;
- try {
- gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
- }
- catch( CoreException e ) {
- }
- try {
- gdbserverPortNumber = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
- }
- catch( CoreException e ) {
- }
- fGDBServerCommandText.setText( gdbserverCommand );
- fGDBServerPortNumberText.setText( gdbserverPortNumber );
- }
-
- public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
- super.performApply(configuration);
- String str = fGDBServerCommandText.getText();
- str.trim();
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND, str );
- str = fGDBServerPortNumberText.getText();
- str.trim();
- configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, str );
- }
-
- protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
- TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
- tabItem.setText( Messages.Gdbserver_Settings_Tab_Name );
-
- Composite comp = new Composite(tabFolder, SWT.NULL);
- comp.setLayout(new GridLayout(1, true));
- comp.setLayoutData(new GridData(GridData.FILL_BOTH));
- ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
- comp.setFont( tabFolder.getFont() );
- tabItem.setControl( comp );
-
- Composite subComp = new Composite(comp, SWT.NULL);
- subComp.setLayout(new GridLayout(2, true));
- subComp.setLayoutData(new GridData(GridData.FILL_BOTH));
- ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
- subComp.setFont( tabFolder.getFont() );
-
- Label label = new Label(subComp, SWT.LEFT);
- label.setText(Messages.Gdbserver_name_textfield_label);
- GridData gd = new GridData();
- label.setLayoutData( gd );
-
-
- fGDBServerCommandText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData();
- fGDBServerCommandText.setLayoutData(data);
- fGDBServerCommandText.addModifyListener( new ModifyListener() {
-
- public void modifyText( ModifyEvent evt ) {
- updateLaunchConfigurationDialog();
- }
- } );
- label = new Label(subComp, SWT.LEFT);
- label.setText(Messages.Port_number_textfield_label);
- gd = new GridData();
- label.setLayoutData( gd );
-
- fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
- data = new GridData();
- fGDBServerPortNumberText.setLayoutData(data);
- fGDBServerPortNumberText.addModifyListener( new ModifyListener() {
-
- public void modifyText( ModifyEvent evt ) {
- updateLaunchConfigurationDialog();
- }
- } );
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage#createTabs(org.eclipse.swt.widgets.TabFolder)
- */
- public void createTabs( TabFolder tabFolder ) {
- super.createTabs( tabFolder );
- createGdbserverSettingsTab( tabFolder );
- }
-}
-
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteLaunchConfigurationTabGroup.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteLaunchConfigurationTabGroup.java
deleted file mode 100644
index b6ce2e190..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteLaunchConfigurationTabGroup.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
- * 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:
- * Ewa Matejska (PalmSource) - Adapted from LocalRunLaunchConfigurationTabGroup
- *******************************************************************************/
-
-
-package org.eclipse.rse.remotecdt;
-import org.eclipse.cdt.launch.ui.CArgumentsTab;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
-
-/**
- * This class defines the tab group for the Remote C++ Launch
- * Configuration.
- */
-public class RemoteLaunchConfigurationTabGroup extends
- AbstractLaunchConfigurationTabGroup {
- public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
- ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
- new RemoteCMainTab(true),
- new CArgumentsTab(),
- new RemoteCDebuggerTab(false),
- new SourceLookupTab(),
- new CommonTab()
- };
- setTabs(tabs);
- }
-} \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteRunLaunchDelegate.java b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteRunLaunchDelegate.java
deleted file mode 100644
index 31063691a..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/RemoteRunLaunchDelegate.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
- * 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:
- * Ewa Matejska (PalmSource) - Adapted from LocalRunLaunchDelegate
- *******************************************************************************/
-
-
-package org.eclipse.rse.remotecdt;
-
-import java.io.File;
-
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.debug.core.CDIDebugModel;
-import org.eclipse.cdt.debug.core.ICDIDebugger2;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.debug.core.cdi.CDIException;
-import org.eclipse.cdt.debug.core.cdi.ICDISession;
-import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.mi.core.GDBServerCDIDebugger2;
-import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
-import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.shells.HostShellProcessAdapter;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Display;
-
-public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
-
- private final static String SHELL_SERVICE = "shell.service"; //$NON-NLS-1$
- private final static String FILE_SERVICE = "file.service"; //$NON-NLS-1$
- private final static String EXIT_CMD = "exit"; //$NON-NLS-1$
- private final static String CMD_DELIMITER = ";"; //$NON-NLS-1$
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch
- */
- public void launch(ILaunchConfiguration config, String mode, ILaunch launch,
- IProgressMonitor monitor) throws CoreException {
-
- IBinaryObject exeFile = null;
- IPath exePath = verifyProgramPath(config);
- ICProject project = verifyCProject(config);
- if (exePath != null) {
- exeFile = verifyBinary(project, exePath);
- }
-
- String arguments = getProgramArguments(config);
- String remoteExePath = config.getAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_PATH, ""); //$NON-NLS-1$
-
- if(mode.equals(ILaunchManager.DEBUG_MODE)){
- setDefaultSourceLocator(launch, config);
- String debugMode = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
- ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
- if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) {
- Process remoteShellProcess = null;
- ICDISession dsession = null;
- try {
- // Download the binary to the remote before debugging.
- remoteFileDownload(config, launch, exePath.toString(), remoteExePath);
-
- // Automatically start up the gdbserver. In the future this should be expanded to launch
- // an arbitrary remote damon.
- String gdbserver_port_number = config.getAttribute(IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT);
- String gdbserver_command = config.getAttribute(IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
- IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
- String command_arguments = ":" + gdbserver_port_number + " " //$NON-NLS-1$ //$NON-NLS-2$
- + spaceEscapify(remoteExePath);
- if(arguments != null && !arguments.equals("")) //$NON-NLS-1$
- command_arguments += " " + arguments; //$NON-NLS-1$
- remoteShellProcess = remoteShellExec(config, gdbserver_command,
- command_arguments);
- DebugPlugin.newProcess(launch, remoteShellProcess, Messages.RemoteRunLaunchDelegate_RemoteShell);
-
- // Pre-set configuration constants for the GDBSERVERCDIDebugger to indicate how the gdbserver
- // was automatically started on the remote. GDBServerCDIDebugger uses these to figure out how
- // to connect to the remote gdbserver.
- ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
- wc.setAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, true);
- wc.setAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_HOST, getRemoteHostname(config));
- wc.setAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_PORT,
- gdbserver_port_number);
- wc.doSave();
-
- // Default to using the GDBServerCDIDebugger.
- GDBServerCDIDebugger2 debugger = new GDBServerCDIDebugger2();
- dsession = ((ICDIDebugger2)debugger).createSession(launch, exePath.toFile(),
- new SubProgressMonitor(monitor, 8));
-
- boolean stopInMain = config
- .getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
- String stopSymbol = null;
- if ( stopInMain )
- stopSymbol = launch.getLaunchConfiguration().getAttribute(
- ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
- ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT );
-
- ICDITarget[] targets = dsession.getTargets();
- for (int i = 0; i < targets.length; i++) {
- Process process = targets[i].getProcess();
- IProcess iprocess = null;
- if (process != null) {
- iprocess = DebugPlugin.newProcess(launch, process,
- renderProcessLabel(exePath.toOSString()), getDefaultProcessMap());
- }
- CDIDebugModel.newDebugTarget(launch, project.getProject(), targets[i],
- renderProcessLabel("gdbserver debugger"), //$NON-NLS-1$
- iprocess, exeFile, true, false, stopSymbol, true);
- }
- } catch (CoreException e) {
- try {
- if(dsession != null)
- dsession.terminate();
- if(remoteShellProcess != null)
- remoteShellProcess.destroy();
- } catch (CDIException e1) {
- // ignore
- }
- throw e;
- }
- }
-
- } else if(mode.equals(ILaunchManager.RUN_MODE)) {
- Process remoteProcess = null;
- try {
- // Download the binary to the remote before debugging.
- remoteFileDownload(config, launch, exePath.toString(),remoteExePath );
- // Use a remote shell to launch the binary.
- remoteProcess = remoteShellExec(config, remoteExePath, arguments);
- DebugPlugin.newProcess(launch, remoteProcess, renderProcessLabel(exePath.toOSString()));
- } catch (CoreException e) {
- if(remoteProcess != null)
- remoteProcess.destroy();
- throw e;
- }
-
- } else {
- IStatus status = new Status(IStatus.ERROR, getPluginID(),
- IStatus.OK, NLS.bind(Messages.RemoteRunLaunchDelegate_1, mode), null);
- throw new CoreException(status);
- }
- }
-
- private String spaceEscapify(String inputString) {
- if(inputString == null)
- return null;
-
- return inputString.replaceAll(" ", "\\\\ "); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected IHost getCurrentConnection(ILaunchConfiguration config) throws CoreException {
- String remoteConnection = config.getAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION, ""); //$NON-NLS-1$
-
- IHost[] connections = RSEUIPlugin.getTheSystemRegistry().getHosts();
- int i = 0;
- for(i = 0; i < connections.length; i++)
- if(connections[i].getAliasName().equals(remoteConnection))
- break;
- if(i >= connections.length) {
- abort("Could not find the remote connection.", null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
- }
- return connections[i];
- }
-
- protected IService getConnectedRemoteService(ILaunchConfiguration config, String kindOfService)
- throws CoreException {
-
- // Check that the service requested is file or shell.
- if(!kindOfService.equals(SHELL_SERVICE) && !kindOfService.equals(FILE_SERVICE))
- abort(Messages.RemoteRunLaunchDelegate_3, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
-
- IHost currentConnection = getCurrentConnection(config);
-
- ISubSystem[] subSystems = currentConnection.getSubSystems();
- int i = 0;
- for(i = 0; i < subSystems.length; i++) {
- if(subSystems[i] instanceof IShellServiceSubSystem && kindOfService.equals(SHELL_SERVICE))
- break;
- if(subSystems[i] instanceof IFileServiceSubSystem && kindOfService.equals(FILE_SERVICE))
- break;
- }
- if(i >= subSystems.length)
- abort(Messages.RemoteRunLaunchDelegate_4, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
-
- // Need to run this in the UI thread
-
- final ISubSystem subsystem = subSystems[i];
- Display.getDefault().syncExec(new Runnable()
- {
- public void run()
- { try {
- subsystem.connect(false);
- } catch (Exception e) {
- // Ignore
- }
- }
- });
-
- if(!subsystem.isConnected())
- abort(Messages.RemoteRunLaunchDelegate_5, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
-
- if(kindOfService.equals(SHELL_SERVICE))
- return ((IShellServiceSubSystem) subsystem).getShellService();
- else
- return ((IFileServiceSubSystem) subsystem).getFileService();
- }
-
- protected Process remoteFileDownload(ILaunchConfiguration config, ILaunch launch,
- String localExePath, String remoteExePath) throws CoreException {
-
- boolean skipDownload = config.getAttribute(IRemoteConnectionConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET, false);
-
- if(skipDownload)
- // Nothing to do. Download is skipped.
- return null;
-
- IFileService fileService = (IFileService) getConnectedRemoteService(config, FILE_SERVICE);
- File file = new File(localExePath);
- Path remotePath = new Path(remoteExePath);
- try {
- fileService.upload(new NullProgressMonitor(), file, remotePath.removeLastSegments(1).toString(),
- remotePath.lastSegment(), true, null, null);
- // Need to change the permissions to match the original file permissions because of a bug in upload
- Process p = remoteShellExec(config, "chmod", "+x " + spaceEscapify(remotePath.toString())); //$NON-NLS-1$ //$NON-NLS-2$
- Thread.sleep(500);
- p.destroy();
- } catch (Exception e) {
- abort(Messages.RemoteRunLaunchDelegate_6, e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR );
- }
- return null;
- }
-
- protected String getRemoteHostname(ILaunchConfiguration config) throws CoreException {
- IHost currentConnection = getCurrentConnection(config);
- return currentConnection.getHostName();
- }
-
- protected Process remoteShellExec(ILaunchConfiguration config, String remoteCommandPath,
- String arguments) throws CoreException {
- // The exit command is called to force the remote shell to close after our command
- // is executed. This is to prevent a running process at the end of the debug session.
- // See Bug 158786.
- String real_remote_command = arguments == null ? spaceEscapify(remoteCommandPath) :
- spaceEscapify(remoteCommandPath) + " " + arguments; //$NON-NLS-1$
- String remote_command = real_remote_command + CMD_DELIMITER + EXIT_CMD;
-
- IShellService shellService = (IShellService) getConnectedRemoteService(config, SHELL_SERVICE);
-
- // This is necessary because runCommand does not actually run the command right now.
- String env[] = new String[0];
- IHostShell hostShell = shellService.launchShell(new NullProgressMonitor(), "",env); //$NON-NLS-1$
- hostShell.writeToShell(remote_command);
-
- Process p = null;
- try {
- p = new HostShellProcessAdapter(hostShell);
- } catch (Exception e) {
- if (p != null) {
- p.destroy();
- }
- abort(Messages.RemoteRunLaunchDelegate_7, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
- return p;
-
- }
-
- protected String getPluginID() {
- return "org.eclipse.rse.remotecdt"; //$NON-NLS-1$
- }
-}
diff --git a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/messages.properties b/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/messages.properties
deleted file mode 100644
index 684810018..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/src/org/eclipse/rse/remotecdt/messages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - externalized strings
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RemoteRunLaunchDelegate_RemoteShell=Remote Shell
-RemoteRunLaunchDelegate_1=Unidentified mode {0} passed to RemoteRunLaunchDelegate
-RemoteRunLaunchDelegate_3=Wrong service requested.
-RemoteRunLaunchDelegate_4=No subsystem found.\n
-RemoteRunLaunchDelegate_5=Could not connect to the remote system.
-RemoteRunLaunchDelegate_6=Error during file upload.
-RemoteRunLaunchDelegate_7=Could not create the hostShellProcess.\n
-RemoteCMainTab_Program=Remote Path for C/C++ Application:
-RemoteCMainTab_SkipDownload=Skip download to target path.
-Remote_GDB_Debugger_Options=Remote GDB Debugger Options
-RemoteCMainTab_ErrorNoProgram=Remote executable path is not specified.
-RemoteCMainTab_ErrorNoConnection=Remote Connection must be selected.
-RemoteCMainTab_Connection=Connection:
-RemoteCMainTab_New=New
-Gdbserver_Settings_Tab_Name=Gdbserver Settings
-Gdbserver_name_textfield_label=Gdbserver name:
-Port_number_textfield_label=Port number:
diff --git a/rse/examples/org.eclipse.rse.remotecdt/toc.xml b/rse/examples/org.eclipse.rse.remotecdt/toc.xml
deleted file mode 100644
index 1b2611151..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/toc.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<!--
-Copyright (c) 2006 Wind River Systems, Inc.
-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:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<toc link_to="../org.eclipse.rse.doc.user/toc.xml#rse_user_extensions"
- label="Launching Remote C/C++ Applications">
- <topic label="Launching Remote C/C++ Applications" href="remotecdt.html"/>
-</toc> \ No newline at end of file
diff --git a/rse/examples/readme.txt b/rse/examples/readme.txt
deleted file mode 100644
index 5193a00e2..000000000
--- a/rse/examples/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Use the "examples" folder for plugin projects containing examples.
-All projects should be named "org.eclipse.rse.examples.*". \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse-feature/.project b/rse/features/org.eclipse.rse-feature/.project
deleted file mode 100644
index fc4435d95..000000000
--- a/rse/features/org.eclipse.rse-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse-feature/build.properties b/rse/features/org.eclipse.rse-feature/build.properties
deleted file mode 100644
index 5ced4830e..000000000
--- a/rse/features/org.eclipse.rse-feature/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- license.html,\
- feature.properties,\
- epl-v10.html,\
- eclipse_update_120.jpg
-generate.feature@org.apache.commons.net.source=org.apache.commons.net
-generate.feature@org.apache.oro.source=org.apache.oro
-generate.feature@org.eclipse.rse.local.source=org.eclipse.rse.local
-generate.feature@org.eclipse.rse.ftp.source=org.eclipse.rse.ftp
-generate.feature@org.eclipse.rse.ssh.source=org.eclipse.rse.ssh
-generate.feature@org.eclipse.rse.dstore.source=org.eclipse.rse.dstore
-generate.feature@org.eclipse.rse.core.source=org.eclipse.rse.core
diff --git a/rse/features/org.eclipse.rse-feature/eclipse_update_120.jpg b/rse/features/org.eclipse.rse-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/rse/features/org.eclipse.rse-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse-feature/epl-v10.html b/rse/features/org.eclipse.rse-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse-feature/feature.properties b/rse/features/org.eclipse.rse-feature/feature.properties
deleted file mode 100644
index 3e1d34397..000000000
--- a/rse/features/org.eclipse.rse-feature/feature.properties
+++ /dev/null
@@ -1,146 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer Runtime
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=Remote System Explorer (RSE) provides an \
-integrated framework and toolkit for seamless working on remote systems \
-through SSH, FTP or dstore protocols.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-This product includes software developed by the\n\
-Apache Software Foundation http://www.apache.org/
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse-feature/feature.xml b/rse/features/org.eclipse.rse-feature/feature.xml
deleted file mode 100644
index 2a71f7fe1..000000000
--- a/rse/features/org.eclipse.rse-feature/feature.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse"
- label="%featureName"
- version="1.0.2.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <includes
- id="org.eclipse.rse.core"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.dstore"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.ftp"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.local"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.ssh"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.rse"
- download-size="7"
- install-size="8"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse-feature/license.html b/rse/features/org.eclipse.rse-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.core-feature/.project b/rse/features/org.eclipse.rse.core-feature/.project
deleted file mode 100644
index 5e404d986..000000000
--- a/rse/features/org.eclipse.rse.core-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.core-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.core-feature/build.properties b/rse/features/org.eclipse.rse.core-feature/build.properties
deleted file mode 100644
index 92101e808..000000000
--- a/rse/features/org.eclipse.rse.core-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml,\
- license.html,\
- feature.properties,\
- epl-v10.html
diff --git a/rse/features/org.eclipse.rse.core-feature/epl-v10.html b/rse/features/org.eclipse.rse.core-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.core-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.core-feature/feature.properties b/rse/features/org.eclipse.rse.core-feature/feature.properties
deleted file mode 100644
index 513608032..000000000
--- a/rse/features/org.eclipse.rse.core-feature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer Core
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-testUpdateSiteName=Target Management Project Pre-release Test Updates
-
-# "description" property - description of the feature
-description=Remote System Explorer (RSE) core including \
-system and subsystem definition, \
-basic service APIs, and \
-user documentation.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved.\n\
-\n\
-This program and the accompanying materials are made available under the terms\n\
-of the Eclipse Public License v1.0 which accompanies this distribution, and is\n\
-available at http://www.eclipse.org/legal/epl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.core-feature/feature.xml b/rse/features/org.eclipse.rse.core-feature/feature.xml
deleted file mode 100644
index dfd7e5b51..000000000
--- a/rse/features/org.eclipse.rse.core-feature/feature.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.core"
- label="%featureName"
- version="1.0.2.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.core">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.debug.core"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.search"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.jface"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.ui.forms"/>
- <import plugin="org.eclipse.swt"/>
- <import plugin="org.eclipse.debug.ui"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.files.ui"
- download-size="111"
- install-size="407"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.logging"
- download-size="12"
- install-size="28"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.processes.ui"
- download-size="22"
- install-size="61"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.services"
- download-size="57"
- install-size="183"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.shells.ui"
- download-size="40"
- install-size="135"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.files.core"
- download-size="32"
- install-size="98"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.processes.core"
- download-size="7"
- install-size="21"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.shells.core"
- download-size="16"
- install-size="56"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.ui"
- download-size="548"
- install-size="1677"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.core"
- download-size="41"
- install-size="133"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.doc.user"
- download-size="159"
- install-size="193"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.core-feature/license.html b/rse/features/org.eclipse.rse.core-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.core-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/epl-v10.html b/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/feature.properties b/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 682ae1daa..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer Core Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=Remote System Explorer (RSE) core including \
-system and subsystem definition, \
-basic service APIs, and \
-user documentation.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved.\n\
-\n\
-This program and the accompanying materials are made available under the terms\n\
-of the Eclipse Public License v1.0 which accompanies this distribution, and is\n\
-available at http://www.eclipse.org/legal/epl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/license.html b/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.ini b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 97174356b..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer Core Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 383adb182..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 165ae9ba7..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=RSE Core Source
-providerName=Eclipse.org
diff --git a/rse/features/org.eclipse.rse.dstore-feature/.project b/rse/features/org.eclipse.rse.dstore-feature/.project
deleted file mode 100644
index 06a332465..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.dstore-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.dstore-feature/build.properties b/rse/features/org.eclipse.rse.dstore-feature/build.properties
deleted file mode 100644
index 92101e808..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml,\
- license.html,\
- feature.properties,\
- epl-v10.html
diff --git a/rse/features/org.eclipse.rse.dstore-feature/epl-v10.html b/rse/features/org.eclipse.rse.dstore-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.dstore-feature/feature.properties b/rse/features/org.eclipse.rse.dstore-feature/feature.properties
deleted file mode 100644
index b9eba2ad7..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE DStore Services
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=RSE DStore is an extensible tooling communication layer.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved.\n\
-\n\
-This program and the accompanying materials are made available under the terms\n\
-of the Eclipse Public License v1.0 which accompanies this distribution, and is\n\
-available at http://www.eclipse.org/legal/epl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.dstore-feature/feature.xml b/rse/features/org.eclipse.rse.dstore-feature/feature.xml
deleted file mode 100644
index 815e541b3..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/feature.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.dstore"
- label="%featureName"
- version="1.0.2.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.services.dstore">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.rse.core"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui.views"/>
- </requires>
-
- <plugin
- id="org.eclipse.dstore.core"
- download-size="52"
- install-size="154"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.dstore.extra"
- download-size="4"
- install-size="13"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.connectorservice.dstore"
- download-size="16"
- install-size="40"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.services.dstore"
- download-size="59"
- install-size="156"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.files.dstore"
- download-size="14"
- install-size="42"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.processes.dstore"
- download-size="5"
- install-size="10"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.shells.dstore"
- download-size="5"
- install-size="10"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.dstore.security"
- download-size="20"
- install-size="56"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.dstore-feature/license.html b/rse/features/org.eclipse.rse.dstore-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/epl-v10.html b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/feature.properties b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 3f25b1b10..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE DStore Services Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=RSE DStore is an extensible tooling communication layer.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved.\n\
-\n\
-This program and the accompanying materials are made available under the terms\n\
-of the Eclipse Public License v1.0 which accompanies this distribution, and is\n\
-available at http://www.eclipse.org/legal/epl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/license.html b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.ini b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index a40e42463..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer DStore Services Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 383adb182..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 51ab5d7a0..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=RSE DStore Services Source
-providerName=Eclipse.org
diff --git a/rse/features/org.eclipse.rse.efs-feature/.project b/rse/features/org.eclipse.rse.efs-feature/.project
deleted file mode 100644
index 784c8d63e..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.efs-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.efs-feature/build.properties b/rse/features/org.eclipse.rse.efs-feature/build.properties
deleted file mode 100644
index 038e6d5be..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html,\
- eclipse_update_120.jpg
-generate.plugin@org.eclipse.rse.efs.source=org.eclipse.rse.efs
diff --git a/rse/features/org.eclipse.rse.efs-feature/eclipse_update_120.jpg b/rse/features/org.eclipse.rse.efs-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.efs-feature/epl-v10.html b/rse/features/org.eclipse.rse.efs-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.efs-feature/feature.properties b/rse/features/org.eclipse.rse.efs-feature/feature.properties
deleted file mode 100644
index 161609500..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/feature.properties
+++ /dev/null
@@ -1,146 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE Experimental Eclipse Filesystem (EFS) Provider
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-testUpdateSiteName=Target Management Project Pre-release Test Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "description" property - description of the feature
-description=An experimental EFS provider over RSE remote file services. \
-Does not work for Eclipse Workspace Projects yet. Includes Source.
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.efs-feature/feature.xml b/rse/features/org.eclipse.rse.efs-feature/feature.xml
deleted file mode 100644
index 84a8a8cc5..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/feature.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.efs"
- label="%featureName"
- version="1.0.2.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.eclipse.filesystem"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.rse.core"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.filesystem"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.eclipse.filesystem"
- download-size="13"
- install-size="23"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.efs.source"
- download-size="17"
- install-size="68"
- version="0.0.0"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.efs-feature/license.html b/rse/features/org.eclipse.rse.efs-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index a070fd9c6..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 261e8a560..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=RSE Experimental EFS Provider Source
-providerName=Eclipse.org
diff --git a/rse/features/org.eclipse.rse.ftp-feature/.project b/rse/features/org.eclipse.rse.ftp-feature/.project
deleted file mode 100644
index 6b14f04dc..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.ftp-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.ftp-feature/build.properties b/rse/features/org.eclipse.rse.ftp-feature/build.properties
deleted file mode 100644
index 8ed560ec8..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html
diff --git a/rse/features/org.eclipse.rse.ftp-feature/epl-v10.html b/rse/features/org.eclipse.rse.ftp-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ftp-feature/feature.properties b/rse/features/org.eclipse.rse.ftp-feature/feature.properties
deleted file mode 100644
index 32757fed6..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE FTP Services
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=The Remote System Explorer (RSE) ftp feature contains an FTP-based \
-implementation of the file services defined by the RSE API.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-This product includes software developed by the\n\
-Apache Software Foundation http://www.apache.org/
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.ftp-feature/feature.xml b/rse/features/org.eclipse.rse.ftp-feature/feature.xml
deleted file mode 100644
index 20b06db6b..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/feature.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.ftp"
- label="%featureName"
- version="1.0.2.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.services.files.ftp">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <includes
- id="org.apache.commons.net"
- version="0.0.0"/>
-
- <includes
- id="org.apache.oro"
- version="0.0.0"/>
-
- <requires>
- <import feature="org.eclipse.rse.core"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.rse.services"/>
- <import plugin="org.eclipse.rse.files.ui"/>
- <import plugin="org.eclipse.rse.subsystems.files.core"/>
- <import plugin="org.eclipse.rse.ui"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.services.files.ftp"
- download-size="11"
- install-size="18"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.files.ftp"
- download-size="5"
- install-size="13"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.ftp-feature/license.html b/rse/features/org.eclipse.rse.ftp-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/epl-v10.html b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/feature.properties b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index bdf51122b..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE FTP Services Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=The Remote System Explorer (RSE) stp contains an FTP-based \
-implementation of the file services defined by the RSE API.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-This product includes software developed by the\n\
-Apache Software Foundation http://www.apache.org/
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/license.html b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.ini b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 012ae1175..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer FTP Services Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation, Symbian Software Ltd. and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
-
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 383adb182..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index f94d068fc..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=RSE FTP Services Source
-providerName=Eclipse.org
diff --git a/rse/features/org.eclipse.rse.local-feature/.project b/rse/features/org.eclipse.rse.local-feature/.project
deleted file mode 100644
index ff8964653..000000000
--- a/rse/features/org.eclipse.rse.local-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.local-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.local-feature/build.properties b/rse/features/org.eclipse.rse.local-feature/build.properties
deleted file mode 100644
index 8ed560ec8..000000000
--- a/rse/features/org.eclipse.rse.local-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html
diff --git a/rse/features/org.eclipse.rse.local-feature/epl-v10.html b/rse/features/org.eclipse.rse.local-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.local-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.local-feature/feature.properties b/rse/features/org.eclipse.rse.local-feature/feature.properties
deleted file mode 100644
index e38c494ab..000000000
--- a/rse/features/org.eclipse.rse.local-feature/feature.properties
+++ /dev/null
@@ -1,143 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE Local Services
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=Remote System Explorer (RSE) Local Services provides an \
-implementation of the basic services defined by the RSE API that \
-accesses local resources.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.local-feature/feature.xml b/rse/features/org.eclipse.rse.local-feature/feature.xml
deleted file mode 100644
index 6c2dee91c..000000000
--- a/rse/features/org.eclipse.rse.local-feature/feature.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.local"
- label="%featureName"
- version="1.0.2.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.services.local">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.rse.core"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.rse.services"/>
- <import plugin="org.eclipse.rse.files.ui"/>
- <import plugin="org.eclipse.rse.subsystems.files.core"/>
- <import plugin="org.eclipse.rse.ui"/>
- <import plugin="org.eclipse.rse.subsystems.processes.core"/>
- <import plugin="org.eclipse.rse.processes.ui"/>
- <import plugin="org.eclipse.rse.shells.ui"/>
- <import plugin="org.eclipse.rse.subsystems.shells.core"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.services.local"
- download-size="21"
- install-size="45"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.files.local"
- download-size="7"
- install-size="17"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.processes.local"
- download-size="5"
- install-size="10"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.shells.local"
- download-size="5"
- install-size="10"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.connectorservice.local"
- download-size="3"
- install-size="8"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.local-feature/license.html b/rse/features/org.eclipse.rse.local-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.local-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/epl-v10.html b/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/feature.properties b/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index e31df7cb0..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,143 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE Local Services Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=Remote System Explorer (RSE) Local Services provides an \
-implementation of the basic services defined by the RSE API that \
-accesses local resources.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/license.html b/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.ini b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 3dc478764..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer Local Services Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 383adb182..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index e87759777..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=RSE Local Services Source
-providerName=Eclipse.org
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/.project b/rse/features/org.eclipse.rse.remotecdt-feature/.project
deleted file mode 100644
index 5ee774e53..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.remotecdt-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/build.properties b/rse/features/org.eclipse.rse.remotecdt-feature/build.properties
deleted file mode 100644
index 5ccdddc9f..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html,\
- eclipse_update_120.jpg
-generate.plugin@org.eclipse.rse.remotecdt.source=org.eclipse.rse.remotecdt
- \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/eclipse_update_120.jpg b/rse/features/org.eclipse.rse.remotecdt-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/epl-v10.html b/rse/features/org.eclipse.rse.remotecdt-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/feature.properties b/rse/features/org.eclipse.rse.remotecdt-feature/feature.properties
deleted file mode 100644
index 78ca9e1c1..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE CDT Remote Launcher
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-testUpdateSiteName=Target Management Project Pre-release Test Updates
-
-# "description" property - description of the feature
-description=A Launch Configuration \
-for debugging C/C++ programs on a remote host through RSE-provided shell and file \
-services, and gdbserver. Includes Source.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 PalmSource, Inc., Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/feature.xml b/rse/features/org.eclipse.rse.remotecdt-feature/feature.xml
deleted file mode 100644
index a7d62db02..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/feature.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.remotecdt"
- label="%featureName"
- version="1.0.1.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.remotecdt"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.rse.core"/>
- <import feature="org.eclipse.cdt"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.remotecdt"
- download-size="16"
- install-size="32"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.remotecdt.source"
- download-size="24"
- install-size="29"
- version="0.0.0"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/license.html b/rse/features/org.eclipse.rse.remotecdt-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/epl-v10.html b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/feature.properties b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index e2db97ba9..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,143 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE CDT Remote Launcher Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=A Launch Configuration \
-for debugging C/C++ programs on a remote host through RSE-provided shell and file \
-services, and gdbserver.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 PalmSource, Inc., Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/license.html b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.ini b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 4ec88065c..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer CDT Remote Launcher Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright PalmSource, Inc., Wind River Systems, Inc. and others 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index b2a9c78b2..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 PalmSource, Inc. and others.
-# 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:
-# PalmSource, Inc. - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 7a55ddddc..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=RSE CDT Remote Launcher Source
-providerName=Eclipse.org
diff --git a/rse/features/org.eclipse.rse.sdk-feature/.project b/rse/features/org.eclipse.rse.sdk-feature/.project
deleted file mode 100644
index 18a5f73e2..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.sdk-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.sdk-feature/build.properties b/rse/features/org.eclipse.rse.sdk-feature/build.properties
deleted file mode 100644
index 5ced4830e..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- license.html,\
- feature.properties,\
- epl-v10.html,\
- eclipse_update_120.jpg
-generate.feature@org.apache.commons.net.source=org.apache.commons.net
-generate.feature@org.apache.oro.source=org.apache.oro
-generate.feature@org.eclipse.rse.local.source=org.eclipse.rse.local
-generate.feature@org.eclipse.rse.ftp.source=org.eclipse.rse.ftp
-generate.feature@org.eclipse.rse.ssh.source=org.eclipse.rse.ssh
-generate.feature@org.eclipse.rse.dstore.source=org.eclipse.rse.dstore
-generate.feature@org.eclipse.rse.core.source=org.eclipse.rse.core
diff --git a/rse/features/org.eclipse.rse.sdk-feature/eclipse_update_120.jpg b/rse/features/org.eclipse.rse.sdk-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.sdk-feature/epl-v10.html b/rse/features/org.eclipse.rse.sdk-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.sdk-feature/feature.properties b/rse/features/org.eclipse.rse.sdk-feature/feature.properties
deleted file mode 100644
index f377d4487..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/feature.properties
+++ /dev/null
@@ -1,146 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer SDK
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=Remote System Explorer (RSE) SDK combines the runtime features \
-with the generated source, javadoc, and ISV documentation to provide \
-a package for the development of RSE based applications.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-This product includes software developed by the\n\
-Apache Software Foundation http://www.apache.org/
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.sdk-feature/feature.xml b/rse/features/org.eclipse.rse.sdk-feature/feature.xml
deleted file mode 100644
index 553613170..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/feature.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.sdk"
- label="%featureName"
- version="1.0.2.qualifier"
- provider-name="%providerName"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <includes
- id="org.eclipse.rse"
- version="0.0.0"/>
-
- <includes
- id="org.apache.commons.net.source"
- version="0.0.0"/>
-
- <includes
- id="org.apache.oro.source"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.core.source"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.dstore.source"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.ftp.source"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.local.source"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.ssh.source"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.rse.sdk"
- download-size="7"
- install-size="8"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.doc.isv"
- download-size="6630"
- install-size="11610"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.dstore.doc.isv"
- download-size="339"
- install-size="684"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.sdk-feature/license.html b/rse/features/org.eclipse.rse.sdk-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.ssh-feature/.project b/rse/features/org.eclipse.rse.ssh-feature/.project
deleted file mode 100644
index b1f050d2e..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.ssh-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.ssh-feature/build.properties b/rse/features/org.eclipse.rse.ssh-feature/build.properties
deleted file mode 100644
index 45085da6d..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- epl-v10.html,\
- license.html
diff --git a/rse/features/org.eclipse.rse.ssh-feature/epl-v10.html b/rse/features/org.eclipse.rse.ssh-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ssh-feature/feature.properties b/rse/features/org.eclipse.rse.ssh-feature/feature.properties
deleted file mode 100644
index 7174d0982..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE SSH Services
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=An SSH-based \
-implementation of the file ans shell services defined by the RSE API.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.ssh-feature/feature.xml b/rse/features/org.eclipse.rse.ssh-feature/feature.xml
deleted file mode 100644
index 18df3b216..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/feature.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.ssh"
- label="%featureName"
- version="1.0.1.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.services.ssh">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.rse.services"/>
- <import plugin="com.jcraft.jsch" version="0.1.28" match="compatible"/>
- <import plugin="org.eclipse.rse.ui"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.rse.subsystems.files.core"/>
- <import plugin="org.eclipse.rse.files.ui"/>
- <import plugin="org.eclipse.rse.subsystems.shells.core"/>
- <import plugin="org.eclipse.rse.shells.ui"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.services.ssh"
- download-size="19"
- install-size="34"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.connectorservice.ssh"
- download-size="9"
- install-size="23"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.files.ssh"
- download-size="5"
- install-size="10"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.shells.ssh"
- download-size="5"
- install-size="10"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.ssh-feature/license.html b/rse/features/org.eclipse.rse.ssh-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/epl-v10.html b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/feature.properties b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 638d573ac..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE SSH Services Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=An SSH-based \
-implementation of the file and shell services defined by the RSE API.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/license.html b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.ini b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index 720ca870f..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 20f886495..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer SSH Services Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 383adb182..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/eclipse32.png b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index df29b11e2..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=RSE SSH Services Source
-providerName=Eclipse.org
diff --git a/rse/features/readme.txt b/rse/features/readme.txt
deleted file mode 100644
index d1091fa2e..000000000
--- a/rse/features/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Use the "features" folder for feature projects.
-All projects should be named "org.eclipse.rse.**.feature". \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/.classpath b/rse/plugins/org.eclipse.dstore.core/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.dstore.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.dstore.core/.cvsignore b/rse/plugins/org.eclipse.dstore.core/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.dstore.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.dstore.core/.project b/rse/plugins/org.eclipse.dstore.core/.project
deleted file mode 100644
index f7348997d..000000000
--- a/rse/plugins/org.eclipse.dstore.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.dstore.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.dstore.core/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.dstore.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.dstore.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.dstore.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.dstore.core/META-INF/MANIFEST.MF
deleted file mode 100644
index bff6389c5..000000000
--- a/rse/plugins/org.eclipse.dstore.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.dstore.core
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.dstore.core.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.dstore.extra,
- org.eclipse.ui.views
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.dstore.core,
- org.eclipse.dstore.core.client,
- org.eclipse.dstore.core.java,
- org.eclipse.dstore.core.miners.miner,
- org.eclipse.dstore.core.model,
- org.eclipse.dstore.core.server,
- org.eclipse.dstore.core.util,
- org.eclipse.dstore.core.util.ssl
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.dstore.core/about.html b/rse/plugins/org.eclipse.dstore.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.dstore.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/build.properties b/rse/plugins/org.eclipse.dstore.core/build.properties
deleted file mode 100644
index 41b67724f..000000000
--- a/rse/plugins/org.eclipse.dstore.core/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = .,\
- dstore_core.jar,\
- plugin.properties,\
- about.html,\
- META-INF/
-source.. = src/
-output.. = bin/
-source.dstore_core.jar = src/
-output.dstore_core.jar = dstore_core.bin/
diff --git a/rse/plugins/org.eclipse.dstore.core/export.jardesc b/rse/plugins/org.eclipse.dstore.core/export.jardesc
deleted file mode 100644
index 6eebacfac..000000000
--- a/rse/plugins/org.eclipse.dstore.core/export.jardesc
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="D:/servers/800/dstore_core.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.dstore.core/export.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
- <refactoring deprecationInfo="true" structuralOnly="true"/>
- <selectedProjects>
- <project name="org.eclipse.dstore.core"/>
- </selectedProjects>
- <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.dstore.core/src"/>
- </selectedElements>
-</jardesc>
diff --git a/rse/plugins/org.eclipse.dstore.core/plugin.properties b/rse/plugins/org.eclipse.dstore.core/plugin.properties
deleted file mode 100644
index 049d2e16c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE DStore Core
-providerName = Eclipse.org \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/Activator.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/Activator.java
deleted file mode 100644
index df9339903..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/Activator.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends Plugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientAttributes.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientAttributes.java
deleted file mode 100644
index 41992fd6b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientAttributes.java
+++ /dev/null
@@ -1,57 +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.dstore.core.client;
-
-import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.eclipse.dstore.core.model.DataStoreAttributes;
-
-/**
- * ClientAttributes is a container of communication related
- * information.
- */
-public class ClientAttributes extends DataStoreAttributes
-{
-
- /**
- * Constructor
- */
- public ClientAttributes()
- {
- super();
-
- try
- {
- String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
- if ((pluginPath != null) && (pluginPath.length() > 0))
- {
- setAttribute(A_PLUGIN_PATH, pluginPath + File.separator);
- }
-
- setAttribute(A_LOCAL_NAME, InetAddress.getLocalHost().getHostName());
- setAttribute(A_LOCAL_PATH, "/tmp/"); //$NON-NLS-1$
- setAttribute(A_HOST_NAME, "local"); //$NON-NLS-1$
- setAttribute(A_HOST_PATH, "/"); //$NON-NLS-1$
- }
-
- catch (UnknownHostException e)
- {
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientCommandHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientCommandHandler.java
deleted file mode 100644
index 9b0a627d2..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientCommandHandler.java
+++ /dev/null
@@ -1,381 +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.dstore.core.client;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-import org.eclipse.dstore.core.model.CommandHandler;
-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.DataStoreResources;
-import org.eclipse.dstore.core.util.Sender;
-
-
-/**
- * The ClientCommandHandler is reponsible for maintaining
- * a queue of commands and periodically sending commands
- * from the queue to the server side.
- */
-public class ClientCommandHandler extends CommandHandler
-{
-
- private Sender _sender;
- protected DataElement _requestClassDocumentElement;
- protected DataElement _keepAliveDocumentElement;
- protected DataElement _confirmKeepAliveDocumentElement;
- protected DataElement _pendingKeepAliveRequest;
- protected DataElement _pendingKeepAliveConfirmation;
-
- private static String[] _docAttributes = {
- DataStoreResources.DOCUMENT_TYPE,
- "client.doc.root.id", //$NON-NLS-1$
- "client.document", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _fileAttributes = {
- DataStoreResources.FILE_TYPE,
- "client.file.root.id", //$NON-NLS-1$
- "client.file", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _classAttributes = {
- DataStoreResources.CLASS_TYPE,
- "client.class.root.id", //$NON-NLS-1$
- "client.class", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _serializeAttributes = {
- DataStoreResources.SERIALIZED_TYPE,
- "client.serialized.root.id", //$NON-NLS-1$
- "client.serialized", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _requestClassAttributes = {
- DataStoreResources.REQUEST_CLASS_TYPE,
- "client.requestclass.root.id", //$NON-NLS-1$
- "client.requestclass", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _keepAliveAttributes = {
- DataStoreResources.KEEPALIVE_TYPE,
- "client.keepalive.root.id", //$NON-NLS-1$
- "server.keepalive", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _confirmKeepAliveAttributes = {
- DataStoreResources.KEEPALIVECONFIRM_TYPE,
- "client.keepalive.confirm.root.id", //$NON-NLS-1$
- "server.confirmkeepalive", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
-
- protected DataElement _fileDocumentElement;
- protected DataElement _docDocumentElement;
- protected DataElement _classDocumentElement;
- protected DataElement _serializedDocumentElement;
-
- /**
- * Constructor
- * @param sender the Sender
- */
- public ClientCommandHandler(Sender sender)
- {
- super();
- _sender = sender;
- }
-
-
- public void setDataStore(DataStore dataStore)
- {
- super.setDataStore(dataStore);
- _fileDocumentElement = dataStore.createTransientObject(_fileAttributes);
- _docDocumentElement = dataStore.createObject(null, _docAttributes);
- _classDocumentElement = dataStore.createTransientObject(_classAttributes);
- _serializedDocumentElement = dataStore.createTransientObject(_serializeAttributes);
- _requestClassDocumentElement = dataStore.createTransientObject(_requestClassAttributes);
- _keepAliveDocumentElement = dataStore.createTransientObject(_keepAliveAttributes);
- _confirmKeepAliveDocumentElement = dataStore.createTransientObject(_confirmKeepAliveAttributes);
- }
-
- /**
- * Transmits the bytes of a file from the client to the server
- * @param bytes the bytes of a file to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or unicode
- * @param byteStreamHandlerId indicates wwhich byte stream handler should receive the bytes
- */
- public synchronized void sendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- // send pending commands before file
- if (_commands.size() > 0)
- sendCommands();
-
- //DataElement document = _dataStore.createObject(null, DataStoreResources.FILE_TYPE, byteStreamHandlerId, fileName, fileName);
- DataElement document = _fileDocumentElement;
- document.setAttribute(DE.A_NAME, byteStreamHandlerId);
- document.setAttribute(DE.A_VALUE, byteStreamHandlerId);
- document.setAttribute(DE.A_SOURCE, fileName);
- document.setPendingTransfer(true);
- document.setParent(null);
- _sender.sendFile(document, bytes, size, binary);
- }
-
- /**
- * Transmits the bytes of a file from the client to the server
- * @param bytes the bytes of a file to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or unicode
- */
- public synchronized void sendFile(String fileName, byte[] bytes, int size, boolean binary)
- {
- sendFile(fileName, bytes, size, binary, "default"); //$NON-NLS-1$
- }
-
- /**
- * Appends bytes of a file from the client to the server
- * @param bytes the bytes of a file to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or unicode
- * @param byteStreamHandlerId indicates which byte stream handler should receive the bytes
- */
- public synchronized void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- // send pending commands before file
- if (_commands.size() > 0)
- sendCommands();
-
- //DataElement document = _dataStore.createObject(null, DataStoreResources.FILE_TYPE, byteStreamHandlerId, fileName, fileName);
-
- DataElement document = _fileDocumentElement;
- document.setAttribute(DE.A_NAME, byteStreamHandlerId);
- document.setAttribute(DE.A_VALUE, byteStreamHandlerId);
- document.setAttribute(DE.A_SOURCE, fileName);
- document.setPendingTransfer(true);
- document.setParent(null);
- _sender.sendAppendFile(document, bytes, size, binary);
- }
-
-
- /**
- * Appends bytes of a file from the client to the server
- * @param bytes the bytes of a file to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or unicode
- */
- public synchronized void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary)
- {
- sendAppendFile(fileName, bytes, size, binary, "default"); //$NON-NLS-1$
- }
-
- /**
- * Called periodically to send the current queue of commands to the server
- */
- public synchronized void sendCommands()
- {
- //DataElement commandRoot = _dataStore.createObject(null, DataStoreResources.DOCUMENT_TYPE, "client.doc"/*"client.doc." + _requests++*/);
- DataElement commandRoot = _docDocumentElement;
- commandRoot.removeNestedData();
- commandRoot.setPendingTransfer(true);
- commandRoot.setParent(null);
- while (_commands.size() > 0)
- {
- DataElement command = null;
- //synchronized (_commands)
- {
- command = (DataElement)_commands.remove(0);
- }
-
- commandRoot.addNestedData(command, false);
- }
-
- _sender.sendDocument(commandRoot, 3);
-
- if (_pendingKeepAliveConfirmation != null)
- {
- _sender.sendKeepAliveConfirmation(_pendingKeepAliveConfirmation);
- _pendingKeepAliveConfirmation = null;
- }
- if (_pendingKeepAliveRequest != null)
- {
- _sender.sendKeepAliveRequest(_pendingKeepAliveRequest);
- _pendingKeepAliveRequest = null;
- }
-
- // finished sending commands, now send all classes that are waiting
- // in the queue
- while (_classesToSend != null && _classesToSend.size() > 0)
- {
- DataElement document = null;
- synchronized (_classesToSend)
- {
- document = (DataElement)_classesToSend.remove(0);
- }
- _sender.sendClass(document);
- }
-
-
- }
-
- public void handle()
- {
- if (!_commands.isEmpty() || _pendingKeepAliveConfirmation != null || _pendingKeepAliveRequest != null || !_classesToSend.isEmpty())
- {
- sendCommands();
- }
- }
-
- /**
- * Implemented to provide the means by which classes are sent
- * across the comm channel.
- * @param className the name of the class to send
- * @param classbyteStreamHandlerId the name of the byte stream handler to use to receive the class
- */
- public synchronized void sendClass(String className, String classbyteStreamHandlerId)
- {
- // send pending commands before sending class
- if (_commands.size() > 0)
- sendCommands();
-
- DataElement document = _classDocumentElement;
- document.setAttribute(DE.A_NAME, className);
- document.setAttribute(DE.A_SOURCE, classbyteStreamHandlerId);
- //document.setAttribute(DE.A_SOURCE, className);
- document.setPendingTransfer(true);
- document.setParent(null);
-
- addClassToSend(document);
- }
-
- /**
- * Implemented to provide the means by which classes are requested and sent
- * across the comm channel.
- * @param className the name of the class to send
- */
- public synchronized void sendClass(String className)
- {
- sendClass(className, "default"); //$NON-NLS-1$
- }
-
- /**
- * Adds a class to the queue of classes (represented by DataElements) to
- * be sent to the server.
- * @param classElement the DataElement representing the class to be sent
- */
- public void addClassToSend(DataElement classElement)
- {
- synchronized (_classesToSend)
- {
- if (!_classesToSend.contains(classElement))
- {
- _classesToSend.add(classElement);
- }
- }
- notifyInput();
- }
-
-
- public synchronized void sendClassInstance(IRemoteClassInstance runnable, String deserializebyteStreamHandlerId)
- {
- // send pending commands before sending class
- if (_commands.size() > 0)
- sendCommands();
-
- DataElement document = _serializedDocumentElement;
- document.setAttribute(DE.A_NAME, runnable.toString());
- document.setAttribute(DE.A_SOURCE, deserializebyteStreamHandlerId);
- document.setPendingTransfer(true);
- document.setParent(null);
-
-
- _sender.sendRemoteClassRunnable(document, runnable);
- }
-
- /**
- * Implemented to provide the means by which classes are requested
- * across the comm channel.
- * @param className the name of the class to request
- */
- public void requestClass(String className)
- {
- DataElement document = _requestClassDocumentElement;
- document.setPendingTransfer(true);
- document.setAttribute(DE.A_NAME, className);
- document.setAttribute(DE.A_VALUE, className);
- document.setParent(null);
-
- _sender.requestClass(document);
- }
-
-
- public void sendKeepAliveConfirmation()
- {
- DataElement document = _confirmKeepAliveDocumentElement;
- document.setPendingTransfer(true);
- document.setAttribute(DE.A_NAME, "confirm"); //$NON-NLS-1$
- document.setAttribute(DE.A_VALUE, "confirm"); //$NON-NLS-1$
- document.setParent(null);
- _pendingKeepAliveConfirmation = document;
- notifyInput();
- }
-
- public void sendKeepAliveRequest()
- {
- DataElement document = _keepAliveDocumentElement;
- document.setPendingTransfer(true);
- document.setAttribute(DE.A_NAME, "request"); //$NON-NLS-1$
- document.setAttribute(DE.A_VALUE, "request"); //$NON-NLS-1$
- document.setParent(null);
- _pendingKeepAliveRequest = document;
- notifyInput();
- }
-
- public synchronized void waitForInput()
- {
- if (_commands.size() == 0 && _classesToSend.size() == 0 && _pendingKeepAliveConfirmation == null && _pendingKeepAliveRequest == null)
- {
- super.waitForInput();
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 3e16676cf..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java
+++ /dev/null
@@ -1,929 +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.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;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-
-import javax.net.SocketFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLHandshakeException;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocket;
-import javax.net.ssl.SSLSocketFactory;
-
-import org.eclipse.dstore.core.model.CommandHandler;
-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;
-import org.eclipse.dstore.core.util.ExternalLoader;
-import org.eclipse.dstore.core.util.Sender;
-import org.eclipse.dstore.core.util.ssl.DStoreSSLContext;
-import org.eclipse.dstore.core.util.ssl.DataStoreTrustManager;
-import org.eclipse.dstore.extra.internal.extra.DomainNotifier;
-
-
-/**
- * ClientConnection provides the standard means of creating a new connection to
- * a DataStore.
- *
- * <li>
- * If a connection is local, then a DataStore is instantiated
- * in the same process to be used by the client to communicate with miners (tools).
- * </li>
- *
- * <li>
- * If a connection is not local, then a virtual DataStore is instantiated in the
- * current process to communicate with the remote DataStore. If the client wishes
- * to instantiate a remote DataStore through a daemon, then ClientConnection first connects
- * to the daemon requesting a DataStore at a given port, and then connects to the
- * newly launched DataStore. Otherwise, a DataStore is expected to be running on
- * the remote machine under the same port that the client tries to connect to.
- * </li>
- *
- *
- */
-public class ClientConnection implements IDataStoreConstants
-{
-
-
- private ClientAttributes _clientAttributes;
-
- private Socket _theSocket;
- private boolean _isConnected = false;
- private boolean _isRemote = false;
- private DataStore _dataStore;
- private DomainNotifier _domainNotifier;
- private Sender _sender;
- private ClientReceiver _receiver;
- private ClientUpdateHandler _updateHandler;
- private CommandHandler _commandHandler;
-
- private int _clientVersion;
- private int _clientMinor;
-
-
- private String _name;
- private String _host;
- private String _port;
- private String _hostDirectory;
- private Socket _launchSocket;
-
- private DataStoreTrustManager _trustManager;
-
- private ArrayList _loaders;
-
- private static final int HANDSHAKE_INCORRECT = 0;
- private static final int HANDSHAKE_SERVER_OLDER = 1;
- private static final int HANDSHAKE_CORRECT = 2;
- private static final int HANDSHAKE_UNEXPECTED = 3;
- 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;
- private static final int VERSION_INDEX_MINOR = 2;
- public static String INCOMPATIBLE_SERVER_UPDATE = "Incompatible DataStore."; //$NON-NLS-1$
- public static String INCOMPATIBLE_CLIENT_UPDATE = "Incompatible DataStore."; //$NON-NLS-1$
- public static String SERVER_OLDER = "Older DataStore Server."; //$NON-NLS-1$
- public static String CLIENT_OLDER = "Older DataStore Client."; //$NON-NLS-1$
- public static String INCOMPATIBLE_PROTOCOL = "Incompatible Protocol."; //$NON-NLS-1$
- public static String CANNOT_CONNECT = "Cannot connect to server."; //$NON-NLS-1$
-
- /**
- * Creates a new ClientConnection instance
- *
- * @param name an identifier for this connection
- */
- public ClientConnection(String name)
- {
- _domainNotifier = new DomainNotifier();
- _name = name;
- init();
- }
-
- /**
- * Creates a new ClientConnection instance
- *
- * @param name an identifier for this connection
- * @param initialSize the number of elements to preallocate in the DataStore
- */
- public ClientConnection(String name, int initialSize)
- {
- _domainNotifier = new DomainNotifier();
- _name = name;
- init(initialSize);
- }
-
- /**
- * Creates a new ClientConnection instance
- *
- * @param name an identifier for this connection
- * @param notifier the notifier used to keep the user interface in synch with the DataStore
- */
- public ClientConnection(String name, DomainNotifier notifier)
- {
- _domainNotifier = notifier;
- _name = name;
- init();
- }
-
- /**
- * Creates a new ClientConnection instance
- *
- * @param name an identifier for this connection
- * @param notifier the notifier used to keep the user interface in synch with the DataStore
- * @param initialSize the number of elements to preallocate in the DataStore
- */
- public ClientConnection(String name, DomainNotifier notifier, int initialSize)
- {
- _domainNotifier = notifier;
- _name = name;
- init(initialSize);
- }
-
-
- public int getClientVersion()
- {
- return _clientVersion;
- }
-
- public int getClientMinor()
- {
- return _clientMinor;
- }
-
- public int getServerVersion()
- {
- return _dataStore.getServerVersion();
- }
-
- public int getServerMinor()
- {
- return _dataStore.getServerMinor();
- }
-
- public void setSSLProperties(ISSLProperties properties)
- {
- _dataStore.setSSLProperties(properties);
- }
-
-
-
- /**
- * Specifies the loaders used to instantiate the miners
- *
- * @param loaders the loaders
- */
- public void setLoaders(ArrayList loaders)
- {
- _loaders = loaders;
- }
-
- /**
- * Adds a loader to be used to instantiate the miners
- *
- * @param loader the loader
- */
- public void addLoader(ExternalLoader loader)
- {
- if (_loaders == null)
- {
- _loaders = new ArrayList();
- }
- _loaders.add(loader);
- }
-
- /**
- * Specifies the hostname or IP of the host to connect to
- *
- * @param host the hostname or IP of the machine to connect to
- */
- public void setHost(String host)
- {
- _host = host;
- _clientAttributes.setAttribute(DataStoreAttributes.A_HOST_NAME, _host);
- }
-
- /**
- * Specifies the number of the socket port to connect to
- *
- * @param port the number of the socket port to connect to
- */
- public void setPort(String port)
- {
- if (port == null || port.length() == 0)
- {
- port = "0"; //$NON-NLS-1$
- }
-
- _port = port;
- _clientAttributes.setAttribute(DataStoreAttributes.A_HOST_PORT, _port);
- }
-
- /**
- * Specifies the default working directory on the remote machine
- *
- * @param directory the remote working directory
- */
- public void setHostDirectory(String directory)
- {
- _hostDirectory = directory;
- _clientAttributes.setAttribute(DataStoreAttributes.A_HOST_PATH, _hostDirectory);
- }
-
- /**
- * Returns the hostname/IP of the host to connect to
- *
- * @return the hostname/IP
- */
- public String getHost()
- {
- return _host;
- }
-
- /**
- * Returns the number of the socket port to connect to
- *
- * @return the number of the socket port to connect to
- */
- public String getPort()
- {
- return _port;
- }
-
- /**
- * Returns the default working directory on the host machine
- *
- * @return the working directory on the host
- */
- public String getHostDirectory()
- {
- return _hostDirectory;
- }
-
- /**
- * Indicates whether the client is connected to the DataStore
- *
- * @return whether the client is connected
- */
- public boolean isConnected()
- {
- if (_isConnected)
- {
- return _dataStore.isConnected();
- }
-
- return _isConnected;
- }
-
- /**
- * Disconnects from the DataStore and cleans up DataStore meta-information
- */
- public void disconnect()
- {
- if (_isConnected)
- {
- _dataStore.setConnected(false);
-
- if (_isRemote)
- {
- _commandHandler.command(
- _dataStore.find(_dataStore.getRoot(), DE.A_NAME, "Exit"), //$NON-NLS-1$
- _dataStore.getHostRoot(),
- false);
- _receiver.finish();
- }
-
- _commandHandler.finish();
-
- try
- {
- Thread.sleep(200);
- }
- catch (InterruptedException e)
- {
- System.out.println(e);
- }
-
- _updateHandler.finish();
- _dataStore.finish();
-
- _isConnected = false;
- }
- }
-
- /**
- * Creates and connects to a local DataStore to work with in the current process.
- *
- * @return the status of the DataStore connection
- */
- public ConnectionStatus localConnect()
- {
- _updateHandler = new ClientUpdateHandler();
- _updateHandler.start();
-
- if (_loaders == null)
- {
- _loaders = new ArrayList();
- _loaders.add(new ExternalLoader(getClass().getClassLoader(), "*")); //$NON-NLS-1$
- }
-
- _commandHandler = new ServerCommandHandler(_loaders);
- _commandHandler.start();
-
- _dataStore.setCommandHandler(_commandHandler);
- _dataStore.setUpdateHandler(_updateHandler);
- _dataStore.setConnected(true);
- _dataStore.setLoaders(_loaders);
- _dataStore.getDomainNotifier().enable(true);
-
- _commandHandler.setDataStore(_dataStore);
- _updateHandler.setDataStore(_dataStore);
- ((ServerCommandHandler) _commandHandler).loadMiners();
-
- _clientAttributes.setAttribute(
- DataStoreAttributes.A_LOCAL_NAME,
- _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_NAME));
- _clientAttributes.setAttribute(
- DataStoreAttributes.A_LOCAL_PATH,
- _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_PATH));
-
- _isConnected = true;
-
- DataElement ticket = _dataStore.getTicket();
- ticket.setAttribute(DE.A_NAME, "null"); //$NON-NLS-1$
-
- ConnectionStatus result = new ConnectionStatus(_isConnected);
- result.setTicket(ticket.getName());
-
- return result;
- }
-
- /**
- * Connects to a remote DataStore by first communicating with a remote daemon and then
- * connecting to the DataStore.
- *
- * @param launchServer an indication of whether to launch a DataStore on the daemon on not
- * @param user the user ID of the current user on the remote machine
- * @param password the password of the current user on the remote machine
- * @return the status of the connection
- */
- public ConnectionStatus connect(boolean launchServer, String user, String password)
- {
- ConnectionStatus launchStatus = null;
- if (launchServer)
- {
- launchStatus = launchServer(user, password);
- if (!launchStatus.isConnected())
- {
- return launchStatus;
- }
- }
- else
- {
- launchStatus = new ConnectionStatus(true);
- launchStatus.setTicket("null"); //$NON-NLS-1$
- }
-
- return connect(launchStatus.getTicket());
- }
-
- public DataStoreTrustManager getTrustManager()
- {
- if (_trustManager == null)
- {
- _trustManager = new DataStoreTrustManager();
- }
- return _trustManager;
- }
-
- /**
- * Connects to a remote DataStore.
- * A socket is created and the virtual DataStore is initialized with an update handler, command handler,
- * socket sender and socket receiver.
- *
- * @param ticket the ticket required to be granted access to the remote DataStore
- * @return the status of the connection
- */
- public ConnectionStatus connect(String ticket)
- {
- return connect(ticket, 0);
- }
-
- public ConnectionStatus connect(String ticket, int timeout)
- {
- boolean doTimeOut = (timeout > 0);
- ConnectionStatus result = null;
- try
- {
- int port = 0;
- if (_port != null && _port.length() > 0)
- {
- port = Integer.parseInt(_port);
- }
-
- if (!_dataStore.usingSSL())
- {
- _theSocket = new Socket(_host, port);
- if (doTimeOut && (_theSocket != null))
- _theSocket.setSoTimeout(timeout);
- }
- else
- {
- String location = _dataStore.getKeyStoreLocation();
- String pw = _dataStore.getKeyStorePassword();
- DataStoreTrustManager mgr = getTrustManager();
- SSLContext context = DStoreSSLContext.getClientSSLContext(location, pw, mgr);
- SSLSocketFactory factory = context.getSocketFactory();
-
- _theSocket = factory.createSocket(_host, port);
- if (doTimeOut && (_theSocket != null))
- _theSocket.setSoTimeout(timeout);
- try
- {
-
- ((SSLSocket) _theSocket).startHandshake();
- ((SSLSocket) _theSocket).getSession();
-
- }
- catch (SSLHandshakeException e)
- {
- result = new ConnectionStatus(false, e, true, mgr.getUntrustedCerts());
- return result;
- }
- catch (Exception e)
- {
- e.printStackTrace();
- _theSocket.close();
- result = new ConnectionStatus(false, e);
- return result;
- }
- }
-
- String msg = null;
- int handshakeResult = doHandShake();
- switch (handshakeResult)
- {
- case HANDSHAKE_CORRECT:
- result = doConnect(ticket);
- break;
- case HANDSHAKE_SERVER_RECENT_NEWER:
- result = doConnect(ticket);
- result.setMessage(CLIENT_OLDER);
- break;
- case HANDSHAKE_SERVER_RECENT_OLDER:
- result = doConnect(ticket);
- result.setMessage(SERVER_OLDER);
- break;
- case HANDSHAKE_SERVER_NEWER:
- {
- msg = INCOMPATIBLE_CLIENT_UPDATE;
- msg += "\nThe server running on " //$NON-NLS-1$
- + _host
- + " under port " //$NON-NLS-1$
- + _port
- + " is a newer DataStore server."; //$NON-NLS-1$
- break;
- }
- case HANDSHAKE_SERVER_OLDER:
- {
- msg = INCOMPATIBLE_SERVER_UPDATE;
- msg += "\nThe server running on " //$NON-NLS-1$
- + _host
- + " under port " //$NON-NLS-1$
- + _port
- + " is an older DataStore server."; //$NON-NLS-1$
- break;
- }
- case HANDSHAKE_INCORRECT:
- {
- msg = CANNOT_CONNECT;
- msg += INCOMPATIBLE_PROTOCOL;
- msg += "\nThe server running on " //$NON-NLS-1$
- + _host
- + " under port " //$NON-NLS-1$
- + _port
- + " is not a valid DataStore server."; //$NON-NLS-1$
- break;
- }
- case HANDSHAKE_UNEXPECTED:
- {
- msg = CANNOT_CONNECT;
- msg += "Unexpected exception."; //$NON-NLS-1$
- break;
- }
- case HANDSHAKE_TIMEOUT:
- {
- msg = CANNOT_CONNECT;
- msg += "Timeout waiting for socket activity."; //$NON-NLS-1$
- break;
- }
- default:
- break;
- }
-
- if (result == null && msg != null)
- {
- result = new ConnectionStatus(false, msg);
- _isConnected = false;
- _theSocket.close();
- }
- }
- catch (java.net.ConnectException e)
- {
- String msg = "Connection Refused."; //$NON-NLS-1$
- msg += "\nMake sure that the DataStore server is running on " + _host + " under port " + _port + "."; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- result = new ConnectionStatus(false, msg);
- }
- catch (UnknownHostException uhe)
- {
- _isConnected = false;
- result = new ConnectionStatus(_isConnected, uhe);
- }
- catch (IOException ioe)
- {
- _isConnected = false;
- result = new ConnectionStatus(_isConnected, ioe);
- }
- return result;
- }
-
- protected ConnectionStatus doConnect(String ticket)
- {
- _sender = new Sender(_theSocket, _dataStore);
- _updateHandler = new ClientUpdateHandler();
- _updateHandler.start();
-
- _commandHandler = new ClientCommandHandler(_sender);
- _commandHandler.start();
-
- _dataStore.setCommandHandler(_commandHandler);
- _dataStore.setUpdateHandler(_updateHandler);
- _dataStore.setConnected(true);
- _dataStore.getDomainNotifier().enable(true);
-
- _commandHandler.setDataStore(_dataStore);
- _updateHandler.setDataStore(_dataStore);
-
- _receiver = new ClientReceiver(_theSocket, _dataStore);
- _receiver.start();
-
- _isConnected = true;
- _isRemote = true;
- ConnectionStatus result = new ConnectionStatus(_isConnected);
- result.setTicket(ticket);
- return result;
- }
-
- /**
- * Connects to a remote daemon and tells the daemon to launch
- * a DataStore server.
- *
- * @param user the user ID of the current user on the remote machine
- * @param password the password of the current user on the remote machine
- * @return the status of the connection
- */
- public ConnectionStatus launchServer(String user, String password)
- {
- // default daemon port is 4035
- return launchServer(user, password, ServerLauncher.DEFAULT_DAEMON_PORT);
- }
-
- /**
- * Connects to a remote daemon and tells the daemon to launch
- * a DataStore server.
- *
- * @param user the user ID of the current user on the remote machine
- * @param password the password of the current user on the remote machine
- * @param daemonPort the port of the daemon
- * @return the status of the connection
- */
- public ConnectionStatus launchServer(String user, String password, int daemonPort)
- {
- 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
- {
- PrintWriter writer = null;
- BufferedReader reader = null;
-
- // create output stream for server launcher
- try
- {
- 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 = null;
-
- try
- {
- status = reader.readLine();
- }
- catch (InterruptedIOException e)
- {
- result = new ConnectionStatus(false, e);
- }
-
-
- if (status != null && !status.equals(CONNECTED))
- {
- result = new ConnectionStatus(false, status);
- }
- else if (status == null)
- {
- Exception e = new Exception("no status returned"); //$NON-NLS-1$
- result = new ConnectionStatus(false, e);
- }
- else
- {
- result = new ConnectionStatus(true);
-
- _port = reader.readLine();
- String ticket = reader.readLine();
- result.setTicket(ticket);
- }
- }
- catch (java.io.IOException e)
- {
- e.printStackTrace();
- result = new ConnectionStatus(false, e);
- }
-
- if (reader != null)
- reader.close();
-
- if (writer != null)
- writer.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)
- {
- lSocket.close();
- }
- }
- catch (SSLHandshakeException e)
- {
- result = new ConnectionStatus(false, e, true, mgr.getUntrustedCerts());
- return result;
- }
- catch (Exception e)
- {
- if (_launchSocket != null)
- {
- _launchSocket.close();
- }
-
- result = new ConnectionStatus(false, e);
- return result;
- }
- }
- catch (Exception e)
- {
- result = new ConnectionStatus(false, e);
- return result;
- }
- }
- else
- {
- _launchSocket = new Socket(_host, daemonPort);
- }
- }
- catch (java.net.ConnectException e)
- {
- String msg = "Connection Refused."; //$NON-NLS-1$
- msg += "\nMake sure that the DataStore daemon is running on " + _host + "."; //$NON-NLS-1$ //$NON-NLS-2$
- result = new ConnectionStatus(false, msg);
- }
- catch (UnknownHostException uhe)
- {
- result = new ConnectionStatus(false, uhe);
- }
- catch (IOException ioe)
- {
- result = new ConnectionStatus(false, ioe);
- }
-
- 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
- */
- public DataStore getDataStore()
- {
- return _dataStore;
- }
-
- private void init()
- {
- init(10000);
- }
-
- private void init(int initialSize)
- {
- _clientAttributes = new ClientAttributes();
- _clientAttributes.setAttribute(DataStoreAttributes.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);
- }
-
-
- private int doHandShake()
- {
- try
- {
- BufferedReader reader = new BufferedReader(new InputStreamReader(_theSocket.getInputStream(), DE.ENCODING_UTF_8));
- PrintWriter writer = new PrintWriter(new OutputStreamWriter(_theSocket.getOutputStream(), DE.ENCODING_UTF_8));
- writer.println(""); //$NON-NLS-1$
- writer.println(""); //$NON-NLS-1$
- writer.println(""); //$NON-NLS-1$
- writer.flush();
-
- String handshake = null;
- try
- {
- handshake = reader.readLine();
- }
- catch (InterruptedIOException e)
- {
- return HANDSHAKE_TIMEOUT;
- }
- _theSocket.setSoTimeout(0);
-
- String[] clientVersionStr = DataStoreAttributes.DATASTORE_VERSION.split("\\."); //$NON-NLS-1$
- String[] serverVersionStr = handshake.split("\\."); //$NON-NLS-1$
-
- _dataStore.setServerVersion(Integer.parseInt(serverVersionStr[VERSION_INDEX_VERSION]));
- _dataStore.setServerMinor(Integer.parseInt(serverVersionStr[VERSION_INDEX_MINOR]));
-
-
- if (handshake.equals(DataStoreAttributes.DATASTORE_VERSION))
- {
- return HANDSHAKE_CORRECT;
- }
- else
- {
- if (handshake.startsWith("<DataElement")) //$NON-NLS-1$
- {
- return HANDSHAKE_SERVER_OLDER;
- }
- else if (serverVersionStr[VERSION_INDEX_PROTOCOL].equals(clientVersionStr[VERSION_INDEX_PROTOCOL]))
- {
-
-
- if (_dataStore.getServerVersion()== _clientVersion)
- {
- // major versions match so should be compatible
- return HANDSHAKE_CORRECT;
- }
- else
- {
- if (_dataStore.getServerVersion()> _clientVersion)
- {
- // newer server
- if (_dataStore.getServerVersion() - 1 == _clientVersion)
- {
- return HANDSHAKE_SERVER_RECENT_NEWER;
- }
- else
- {
- return HANDSHAKE_SERVER_NEWER;
- }
- }
- else
- {
- // newer client
- if (_dataStore.getServerVersion() + 1 == _clientVersion)
- {
- return HANDSHAKE_SERVER_RECENT_OLDER;
- }
- else
- {
- return HANDSHAKE_SERVER_OLDER;
- }
- }
- }
- }
- else
- {
- //System.out.println("handshake=" + handshake);
- return HANDSHAKE_INCORRECT;
- }
- }
-
- }
- catch (Exception e)
- {
- return HANDSHAKE_UNEXPECTED;
- }
-
- }
-
- 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/client/ClientReceiver.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientReceiver.java
deleted file mode 100644
index e1b86b9bb..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientReceiver.java
+++ /dev/null
@@ -1,77 +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.dstore.core.client;
-
-import java.net.Socket;
-
-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.util.Receiver;
-
-/*
- * The ClientReciever is responsible for recieving data from
- * the server side.
- */
-public class ClientReceiver extends Receiver
-{
-
- /**
- * Constructor
- */
- public ClientReceiver(Socket socket, DataStore dataStore)
- {
- super(socket, dataStore);
- }
-
- /**
- * Called when new data is received from the server side.
- * @param documentObject the root object of incoming data
- */
- public void handleDocument(DataElement documentObject)
- {
- if (documentObject.getName().equals("exit")) //$NON-NLS-1$
- {
- _canExit = true;
- }
- else
- {
- synchronized (documentObject)
- {
- for (int i = 0; i < documentObject.getNestedSize(); i++)
- {
- DataElement rootOutput = documentObject.get(i);
- _dataStore.refresh(rootOutput);
- }
- documentObject.removeNestedData();
- //_dataStore.deleteObject(documentObject.getParent(), documentObject);
- }
- }
- }
-
- /**
- * Called when an error occurs
- * @param e the exception that occurred
- */
- public void handleError(Throwable e)
- {
- DataElement status = _dataStore.getStatus();
- status.setAttribute(DE.A_NAME, e.getMessage());
- _dataStore.refresh(status);
- _dataStore.setConnected(false);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientSSLProperties.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientSSLProperties.java
deleted file mode 100644
index 193a563fa..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientSSLProperties.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.client;
-
-import org.eclipse.dstore.core.model.ISSLProperties;
-public class ClientSSLProperties implements ISSLProperties
-{
- private boolean _enableSSL = false;
- private boolean _disableServerSSL = false;
- private String _daemonKeyStorePath;
- private String _daemonKeyStorePassword;
-
- private String _serverKeyStorePath;
- private String _serverKeyStorePassword;
-
- public ClientSSLProperties(boolean enableSSL,
- String daemonKeystore, String daemonPassword,
- String serverKeystore, String serverPassword)
- {
- _enableSSL = enableSSL;
- _daemonKeyStorePath = daemonKeystore;
- _daemonKeyStorePassword = daemonPassword;
- _serverKeyStorePath = serverKeystore;
- _serverKeyStorePassword = serverPassword;
- }
-
- public ClientSSLProperties(boolean enableSSL, boolean disableServerSSL,
- String daemonKeystore, String daemonPassword,
- String serverKeystore, String serverPassword)
- {
- _enableSSL = enableSSL;
- _disableServerSSL = disableServerSSL;
- _daemonKeyStorePath = daemonKeystore;
- _daemonKeyStorePassword = daemonPassword;
- _serverKeyStorePath = serverKeystore;
- _serverKeyStorePassword = serverPassword;
- }
-
- public ClientSSLProperties(boolean enableSSL, String keystore, String password)
- {
- _enableSSL = enableSSL;
- _daemonKeyStorePath = keystore;
- _daemonKeyStorePassword = password;
-
- _serverKeyStorePath = keystore;
- _serverKeyStorePassword = password;
- }
-
- public ClientSSLProperties(boolean enableSSL, boolean disableServerSSL, String keystore, String password)
- {
- _enableSSL = enableSSL;
- _disableServerSSL = disableServerSSL;
- _daemonKeyStorePath = keystore;
- _daemonKeyStorePassword = password;
-
- _serverKeyStorePath = keystore;
- _serverKeyStorePassword = password;
- }
-
-
- public boolean usingSSL()
- {
- return _enableSSL;
- }
-
- public boolean usingServerSSL()
- {
- return !_disableServerSSL;
- }
-
-
- public String getDaemonKeyStorePassword()
- {
- return _daemonKeyStorePassword;
- }
-
- public String getDaemonKeyStorePath()
- {
- return _daemonKeyStorePath;
- }
-
- public String getServerKeyStorePassword()
- {
- return _serverKeyStorePassword;
- }
-
- public String getServerKeyStorePath()
- {
- return _serverKeyStorePath;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientUpdateHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientUpdateHandler.java
deleted file mode 100644
index 5159375bd..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientUpdateHandler.java
+++ /dev/null
@@ -1,189 +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.dstore.core.client;
-
-import java.io.File;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.UpdateHandler;
-import org.eclipse.dstore.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainNotifier;
-
-/**
- * The ClientUpdateHandler is contains a queue of data update requests
- * and periodically sends out domain notifications to domain listeners
- */
-public class ClientUpdateHandler extends UpdateHandler
-{
-
- /**
- * Constructor
- */
- public ClientUpdateHandler()
- {
- super();
- _waitIncrement = 200;
- }
-
- /**
- * Not applicable - this is only applicable on the server side
- */
- public void updateFile(String path, byte[] bytes, int size, boolean binary)
- {
- }
-
- /**
- * Not applicable - this is only applicable on the server side
- */
- public void updateAppendFile(String path, byte[] bytes, int size, boolean binary)
- {
- }
-
- /**
- * Not applicable - this is only applicable on the server side
- */
- public void updateFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- }
-
- /**
- * Not applicable - this is only applicable on the server side
- */
- public void updateAppendFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- }
-
- /**
- * Notifies domain listeners that a file has been updated
- * @param file the updated file
- * @param object the element associated with the updated file
- */
- public void updateFile(File file, DataElement object)
- {
- IDomainNotifier notifier = _dataStore.getDomainNotifier();
- notifier.fireDomainChanged(new DomainEvent(DomainEvent.FILE_CHANGE, object, DE.P_NESTED));
- }
-
- /**
- * Periodically called to notify domain listeners of updated data from the
- * server
- */
- public void sendUpdates()
- {
- if (_dataStore != null && !isFinished())
- {
- while (_dataObjects.size() > 0)
- {
- DataElement object = null;
- synchronized (_dataObjects)
- {
- if (_dataObjects.size() > 0)
- {
- object = (DataElement) _dataObjects.get(0);
- _dataObjects.remove(object);
- }
- }
-
- if ((object != null))
- {
-
- if (!object.isUpdated() && !object.isDescriptor())
- {
-
- //DataElement parent = object.getParent();
- //System.out.println("notifying "+parent);
- notify(object);
- }
- clean(object);
- }
- }
- }
- }
-
- private void notify(DataElement object)
- {
- if (object.isExpanded())
- {
- object.setUpdated(true);
- }
-
- object.setExpanded(true);
-
- IDomainNotifier notifier = _dataStore.getDomainNotifier();
-
- if (object.getNestedSize() == 0)
- {
- notifier.fireDomainChanged(new DomainEvent(DomainEvent.NON_STRUCTURE_CHANGE, object, DE.P_NESTED));
-
- }
- else
- {
- notifier.fireDomainChanged(new DomainEvent(DomainEvent.INSERT, object, DE.P_NESTED));
- }
- }
-
- /**
- * Implemented to provide the means by which classes are requested
- * across the comm channel. (Only applies to ServerUpdateHandler, so is a dummy method here)
- * @param className the name of the class to request
- */
- public void requestClass(String className)
- {
- }
-
- /**
- * Impleted to provide the means by which a class on the host is updated on the client
- * @param runnable
- * @param deserializebyteStreamHandlerId
- */
- public synchronized void updateClassInstance(IRemoteClassInstance runnable, String deserializebyteStreamHandlerId)
- {
- notifyInput();
- }
-
- /**
- * Does not apply in this case. Use ClientCommandHandler.sendClass().
- */
- public void sendClass(String className, String classByteStreamHandlerId)
- {
- }
-
- /**
- * Does not apply in this case. Use ClientCommandHandler.sendClass().
- */
- public void sendClass(String className)
- {
- }
-
- /**
- * Does not apply in this case. Use ClientCommandHandler.sendKeepAliveRequest().
- */
- public void sendKeepAliveRequest()
- {
- }
-
- /**
- * Does not apply in this case. Use ClientCommandHandler.sendKeepAliveConfirmation().
- */
- public void sendKeepAliveConfirmation()
- {
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ConnectionStatus.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ConnectionStatus.java
deleted file mode 100644
index d0635c8d0..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ConnectionStatus.java
+++ /dev/null
@@ -1,150 +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.dstore.core.client;
-
-import java.util.List;
-
-/**
- * ConnectionStatus represents the state of a connection. This class is
- * used for feedback, when a client attempts to connect to a server.
- */
-public class ConnectionStatus
-{
-
- private boolean _connected;
- private Throwable _exception;
- private String _message;
- private String _ticket;
- private boolean _SSLProblem = false;
- private List _untrustedCertificates;
-
- /**
- * Constructor
- * @param connected indicates whether a connection has been made
- */
- public ConnectionStatus(boolean connected)
- {
- _connected = connected;
- }
-
- /**
- * Constructor
- * @param connected indicates whether a connection has been made
- * @param e the exception that occurred when attempting to connect
- */
- public ConnectionStatus(boolean connected, Throwable e)
- {
- _connected = connected;
- _exception = e;
- _message = e.toString();
- }
-
- /**
- * Constructor
- * @param connected indicates whether a connection has been made
- * @param msg a connection error message
- */
- public ConnectionStatus(boolean connected, String msg)
- {
- _connected = connected;
- _message = msg;
- }
-
- public ConnectionStatus(boolean connected, Throwable e, boolean sslProblem, List untrustedCerts)
- {
- _connected = connected;
- _exception = e;
- _message = e.toString();
- _SSLProblem = sslProblem;
- _untrustedCertificates = untrustedCerts;
- }
-
- /**
- * Sets whether the connection is successful or not
- * @param flag indication of whether the connection is successful
- */
- public void setConnected(boolean flag)
- {
- _connected = flag;
- }
-
- /**
- * Sets the connection error message
- * @param message the error message
- */
- public void setMessage(String message)
- {
- _message = message;
- }
-
- /**
- * Sets the ticket to use when connecting to a server. Typically,
- * a ticket gets sent back from a server daemon so that the client
- * can be granted access to the launched server DataStore
- * @param ticket the ticket
- */
- public void setTicket(String ticket)
- {
- _ticket = ticket;
- }
-
- /**
- * Indicates whether the connection was successful or not
- * @return whether the connection was successful or not
- */
- public boolean isConnected()
- {
- return _connected;
- }
-
- /**
- * Returns the error message for a connection attempt
- * @return the error message
- */
- public String getMessage()
- {
- return _message;
- }
-
- /**
- * Returns the ticket required for connecting to a server
- * @return the ticket
- */
- public String getTicket()
- {
- return _ticket;
- }
-
- /*
- * Returns the exception if there is one
- * @return the exception
- */
- public Throwable getException()
- {
- return _exception;
- }
-
- public boolean isSLLProblem()
- {
- return _SSLProblem;
- }
-
- public List getUntrustedCertificates()
- {
- return _untrustedCertificates;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandler.java
deleted file mode 100644
index 0d55a70c4..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandler.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.java;
-
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-
-
-/**
- * <p>
- * The ClassByteStreamHandler class is used to abstract classfile read and write operations
- * across the network. By default this is used for sending and receiving class files
- * on the client and the server. The class can be extended if the default byte stream
- * implementations are not sufficient for a particular platform or use.
- * </p>
- * <p>
- * If ClassByteStreamHandler is extended, you need to tell the DataStore to use the
- * extended implementation. To do that, call <code>DataStore.setClassByteStreamHandler(ClassByteStreamHandler)</code>.
- * </p>
- *
- */
-public class ClassByteStreamHandler implements IClassByteStreamHandler
-{
-
- protected DataStore _dataStore;
- protected DataElement _log;
- protected static final String FILEMSG_REMOTE_SAVE_FAILED = "RSEF5006"; //$NON-NLS-1$
-
- /**
- * Contructor
- * @param dataStore the DataStore instance
- * @param log the log in which to log status and messages
- */
- public ClassByteStreamHandler(DataStore dataStore, DataElement log)
- {
- _dataStore = dataStore;
- _log = log;
- }
-
- public String getIdentifier()
- {
- return getClass().getName();
- }
-
- /**
- * Receive a class and load it. This method is called by the
- * DataStore when the communication layer receives a class file transfer
- * This method kicks off a new thread so that the receiver thread can be free
- * to receive other data.
- *
- * @param className the name of the class to receive
- * @param buffer the bytes that comprise the class
- * @param size the number of bytes in the class
- */
- public void receiveBytes(String className, byte[] buffer, int size)
- {
- ReceiveClassThread rct = new ReceiveClassThread(className, buffer, size);
- rct.start();
- }
-
-
- /**
- * Receive a class instance and load it. This method is called by the
- * DataStore when the communication layer receives a class file transfer
- * This method kicks off a new thread so that the receiver thread can be free
- * to receive other data.
- *
- * @param buffer the bytes that comprise the class instance
- * @param size the number of bytes in the class instance
- */
- public void receiveInstanceBytes(byte[] buffer, int size)
- {
- ReceiveClassInstanceThread rct = new ReceiveClassInstanceThread(buffer, size);
- rct.start();
- }
-
- protected DataElement findStatusFor(String remotePath)
- {
- if (_log != null)
- {
- for (int i = 0; i < _log.getNestedSize(); i++)
- {
- DataElement child = _log.get(i);
- if (child.getName().equals(remotePath))
- {
- return child;
- }
- }
- }
- return null;
- }
-
- /**
- * A new thread that can be spawned to receive the class
- *
- */
- protected class ReceiveClassThread extends Thread
- {
- private String _className;
- private byte[] _buffer;
- private int _size;
-
- public ReceiveClassThread(String className, byte[] buffer, int size)
- {
- _className = className;
- _buffer = buffer;
- _size = size;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Thread#run()
- */
- public void run()
- {
- RemoteClassLoader remoteLoader = new RemoteClassLoader(_dataStore);
- remoteLoader.receiveClass(_className, _buffer, _size);
- }
-
- }
-
- /**
- * A new thread that can be spawned to receive the class
- *
- */
- protected class ReceiveClassInstanceThread extends Thread
- {
- private byte[] _buffer;
- private int _size;
-
- public ReceiveClassInstanceThread(byte[] buffer, int size)
- {
- _buffer = buffer;
- _size = size;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Thread#run()
- */
- public void run()
- {
- try
- {
- PipedInputStream ins = new PipedInputStream();
-
- PipedOutputStream outStream = new PipedOutputStream(ins);
- outStream.write(_buffer, 0, _size);
- outStream.flush();
- outStream.close();
-
- IRemoteClassInstance instance = loadInstance(ins);
- runInstance(instance);
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- protected IRemoteClassInstance loadInstance(InputStream ins)
- {
- ObjectInputStream inStream = null;
- try
- {
- inStream = new RemoteObjectInputStream(ins, _dataStore.getRemoteClassLoader());
-
- return (IRemoteClassInstance)inStream.readObject();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return null;
- }
-
- protected void runInstance(IRemoteClassInstance instance)
- {
-
- if (_dataStore.isVirtual())
- {
- // on client notify
- instance.updatedOnClient();
- }
- else
- {
- // on server run and update client
- instance.arrivedOnServer();
- _dataStore.updateRemoteClassInstance(instance, getIdentifier());
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandlerRegistry.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandlerRegistry.java
deleted file mode 100644
index 7bef3a6f5..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandlerRegistry.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.util.HashMap;
-
-import org.eclipse.dstore.core.model.DataStoreResources;
-
-
-public class ClassByteStreamHandlerRegistry
-{
- private HashMap _map;
- private IClassByteStreamHandler _default;
- public ClassByteStreamHandlerRegistry()
- {
- _map = new HashMap();
- }
-
- /**
- * Registers the default class byte stream handler
- * @param handler the default byte stream handler
- */
- public void setDefaultClassByteStreamHandler(IClassByteStreamHandler handler)
- {
- _default = handler;
- _map.put(DataStoreResources.DEFAULT_CLASSBYTESTREAMHANDLER, handler);
- registerClassByteStreamHandler(handler);
- }
-
- /**
- * Registers a class byte stream handler.
- * @param handler the handler to register
- */
- public void registerClassByteStreamHandler(IClassByteStreamHandler handler)
- {
- _map.put(handler.getIdentifier(), handler);
- }
-
- /**
- * Returns the class byte stream handler with the specified id.
- * If "default" is specified or no such id has been registered,
- * the default byte stream handler is returned.
- * @param id the id of the byte stream handler
- * @return the byte stream handler
- */
- public IClassByteStreamHandler getClassByteStreamHandler(String id)
- {
- IClassByteStreamHandler handler = (IClassByteStreamHandler)_map.get(id);
- if (handler == null)
- {
- handler = _default;
- }
- return handler;
- }
-
- /**
- * Returns the default class byte stream handler
- * @return the default
- */
- public IClassByteStreamHandler getDefault()
- {
- return _default;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassInstanceOutputStream.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassInstanceOutputStream.java
deleted file mode 100644
index e11a4c27c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassInstanceOutputStream.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class ClassInstanceOutputStream extends OutputStream {
-
- public void write(int b) throws IOException {
- // TODO Auto-generated method stub
-
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassRequest.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassRequest.java
deleted file mode 100644
index 979358360..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassRequest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-/**
- * Represents a remote class request in the RemoteClassLoader. Contains
- * methods for getting the status of the request, as well as getting the
- * actual class after it has been loaded.
- * @author mjberger
- *
- */
-public class ClassRequest
-{
- private boolean _requested;
- private boolean _loaded;
- private boolean _synchronous;
- private String _className;
- private Class _class = null;
-
- /**
- * Constructs a new ClassRequest
- * @param className The name of the class requested
- * @param synchronous whether or not the request is synchronous
- */
- public ClassRequest(String className, boolean synchronous)
- {
- _synchronous = synchronous;
- _className = className;
- _requested = false;
- _loaded = false;
- }
-
- /**
- * Causes the current thread to wait until this class request has been
- * fulfilled.
- */
- public synchronized void waitForResponse()
- {
- try
- {
- if (!_loaded) wait();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- }
-
- /**
- * Causes all threads waiting for this class request to be filled
- * to wake up.
- */
- public synchronized void notifyResponse()
- {
- notifyAll();
- }
-
- /**
- * Returns the class loaded, or null if it has not been loaded yet.
- */
- public Class getLoadedClass()
- {
- return _class;
- }
-
- /**
- * Returns whether or not the class has been loaded yet.
- */
- public boolean isLoaded()
- {
- return _loaded;
- }
-
- /**
- * Returns the name of the class requested/loaded.
- */
- public String getClassName()
- {
- return _className;
- }
-
- /**
- * Returns whether or not the class has been requested yet.
- */
- public boolean isRequested()
- {
- return _requested;
- }
-
- /**
- * Returns whether or not the class request is synchronous.
- */
- public boolean isSynchronous()
- {
- return _synchronous;
- }
-
- /**
- * Call this method when the request for the class has been sent.
- */
- public void setRequested(boolean requested)
- {
- _requested = requested;
- }
-
- /**
- * Call this method when the class has been received and loaded.
- */
- public void setLoaded(boolean loaded)
- {
- _loaded = loaded;
- }
-
- /**
- * Sets the class represented by this object after it has been loaded.
- * (Sets loaded to be true and requested to be false). Notifies all threads
- * waiting on this class request that the class has been loaded.
- */
- public synchronized void setLoadedClass(Class loadedClass)
- {
- _class = loadedClass;
- setRequested(false);
- setLoaded(true);
- notifyAll();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IClassByteStreamHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IClassByteStreamHandler.java
deleted file mode 100644
index ec99d4713..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IClassByteStreamHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.java;
-
-/**
- * <p>
- * The IClassByteStreamHandler interface is used to abstract file read and write operations
- * across the network.
- *
- */
-public interface IClassByteStreamHandler
-{
-
- /**
- * Returns the unique ID for this bytestream handler
- * @return the unique id
- */
- public String getIdentifier();
-
- /**
- * Receive a class and load it. This method is called by the
- * DataStore when the communication layer receives a class file transfer
- * This method kicks off a new thread so that the receiver thread can be free
- * to receive other data.
- *
- * @param className the name of the class to receive
- * @param buffer the bytes that comprise the class
- * @param size the number of bytes in the class
- */
- public void receiveBytes(String className, byte[] buffer, int size);
-
- /**
- * Save a class instance in the specified location. Invokes the operation in a new thread. This method is called by the
- * DataStore when the communication layer receives a class file transfer
- *
- * @param buffer the bytes to insert in the class instance
- * @param size the number of bytes to insert
- */
- public void receiveInstanceBytes(byte[] buffer, int size);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IRemoteClassInstance.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IRemoteClassInstance.java
deleted file mode 100644
index faeb5e355..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IRemoteClassInstance.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.io.Serializable;
-
-public interface IRemoteClassInstance extends Serializable
-{
- public void arrivedOnServer();
- public void updatedOnClient();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/LocalObjectInputStream.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/LocalObjectInputStream.java
deleted file mode 100644
index fa7e71e70..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/LocalObjectInputStream.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectStreamClass;
-import java.util.List;
-
-
-public class LocalObjectInputStream extends ObjectInputStream {
-
- private List _localLoaders;
- public LocalObjectInputStream(InputStream in, List localLoaders) throws IOException
- {
- super(in);
- _localLoaders = localLoaders;
- }
-
- protected Class resolveClass(ObjectStreamClass desc)
- throws IOException, ClassNotFoundException
- {
- ClassNotFoundException ex = null;
- String name = desc.getName();
- for (int i = 0; i < _localLoaders.size(); i++)
- {
- ClassLoader cl = (ClassLoader)_localLoaders.get(i);
- try
- {
- return cl.loadClass(name);
- }
- catch (ClassNotFoundException e)
- {
- ex = e;
- }
- }
- throw ex;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteClassLoader.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteClassLoader.java
deleted file mode 100644
index 6806367dc..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteClassLoader.java
+++ /dev/null
@@ -1,491 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.model.DataStore;
-
-
-
-/**
- * This class loads a class from a remote peer.
- * This classloader is used just as any other classloader is used. However,
- * when instantiating the RemoteClassLoader, a DataStore is associated with
- * it. The RemoteClassLoader goes through the following steps when trying to load
- * a class:
- * 1) Attempts to load the class from memory. Any class that had been loaded
- * already this session would reside here.
- * 2) Attempts to find the class using its parent classloader.
- * 3) If caching preference is turned on:
- * a) Attempts to find the class from the disk cache.
- * 4) Requests the class, through the DataStore, from the remote peer. Waits for
- * response.
- * 5) If class cannot be found, throws ClassNotFoundException
- * 6) If class is found, loads the class.
- * 7) If caching preference is turned on:
- * a) Caches new class in the disk cache for use in the next session.
- * Notes:
- * i) If there are one or more classes on which the target class depends,
- * the RemoteClassLoader will attempt to load those classes too (possibly remotely),
- * before loading the target class.
- * ii) Since most implementations of Java use lazy classloading, the JVM may not
- * attempt to load all required classes for the target class during class definition
- * or instantiation. However, if the RemoteClassLoader was used to load the target
- * class, then at any time, any additional classes required by the target class will
- * be loaded using the RemoteClassLoader. Clients should be aware that this could trigger
- * class requests and class transfers during the operation of objects of the target class,
- * not just during definition and instantiation of it.
- * iii) On the remote peer side, if you wish a class to be a candidate for transfer using the
- * RemoteClassLoader on the opposite side of the connection, you MUST register the classloader
- * for that class with the DataStore corresponding to the DataStore with which the RemoteClassLoader
- * was instantiated. For example, in a client-server connection there is a "client" DataStore and a
- * corresponding "server" DataStore. Suppose the server wishes to use the RemoteClassLoader to load
- * class A from the client. Suppose A is loaded on the client using ClassLoaderForA. On the client
- * side, ClassLoaderForA must be registered with the "client" DataStore so that when the
- * class request for A comes in from the server, the client DataStore know how to load class A.
- *
- * Caching:
- * To set your preference for caching, on either the client or server DataStore, use the following command:
- * _dataStore.setPreference(RemoteClassLoader.CACHING_PREFERENCE, "true");
- * The cache of classes is kept in a jar in the following directory:
- * $HOME/.eclipse/RSE/rmt_classloader_cache.jar
- * To clear the cache, you must delete the jar.
- *
- * Threading Issues:
- * It's safest to use the RemoteClassLoader on a separate thread, and preferably not
- * from the CommandHandler or UpdateHandler threads. The RemoteClassLoader uses those
- * threads to request and send the class. However, DataStore commands can be structured such that
- * safe use of the RemoteClassLoader on these threads is possible. See below for an
- * example.
- *
- * Using the RemoteClassLoader in your subsystem miner:
- * Suppose you want the client to be able to kick off a class request in your host subsystem
- * miner. In order to accomplish this, you would take the following steps:
- * 1) Add a command to your miner in the extendSchema() method.
- * 2) Add logic in the handleCommand() method to route command to another method when handleCommand
- * receives your new command.
- * 3) In your command handling method, get the name of the class to load from the subject
- * DataElement.
- * 4) Load the class using the RemoteClassLoader.
- * 5) Make sure the class you are attempting to load exists on the client and that class's
- * ClassLoader is registered with the DataStore!
- *
- * @author mjberger
- *
- */
-public class RemoteClassLoader extends ClassLoader
-{
- public static String CACHING_PREFERENCE = "Class.Caching"; //$NON-NLS-1$
- private DataStore _dataStore;
- private boolean _useCaching = false;
- private CacheClassLoader _urlClassLoader;
-
- private class CacheClassLoader extends URLClassLoader
- {
- public CacheClassLoader(URL[] urls, ClassLoader parent)
- {
- super(urls, parent);
- }
-
- public Class findCachedClass(String className) throws ClassNotFoundException
- {
- return super.findClass(className);
- }
- }
-
- /**
- * Constructor
- * @param dataStore A reference to the datastore to be used by this
- * RemoteClassLoader.
- */
- public RemoteClassLoader(DataStore dataStore)
- {
- super(dataStore.getClass().getClassLoader());
- //_urlClassLoader = new URLClassLoader(new URL[0]);
- _dataStore = dataStore;
- useCaching();
- }
-
- public boolean useCaching()
- {
- boolean useCaching = false;
- String pref = _dataStore.getPreference(CACHING_PREFERENCE);
- if (pref != null && pref.equals("true")) //$NON-NLS-1$
- {
- useCaching = true;
- }
- if (useCaching != _useCaching)
- {
- if (useCaching && _dataStore.getRemoteClassLoaderCache() != null)
- {
- try
- {
- URL cache = _dataStore.getRemoteClassLoaderCache().toURL();
- URL[] urls = new URL[] { cache };
- _urlClassLoader = new CacheClassLoader(urls, this);
- }
- catch (MalformedURLException e)
- {
- e.printStackTrace();
- }
- }
- }
- _useCaching = useCaching;
- return _useCaching;
- }
-
- /**
- * Finds the specified class. If the class cannot be found locally,
- * a synchronous request for the class is sent to the client, and the calling thread
- * waits for a response. If the client can find the class, it sends it back to
- * the server. The server receives the class in a new thread, defines it, and
- * then notifies this thread. The class is then returned by this method. If the class
- * cannot be found, the client notifies the server, and this method throws a
- * ClassNotFoundException.
- * @param className the fully qualified classname to find
- * @return the loaded class
- * @throws ClassNotFoundException if the class cannot be found on either the client or the server.
- *
- */
- protected Class findClass(String className) throws ClassNotFoundException
- {
- //System.out.println("finding "+className);
-
- // first try using the datastore's local classloaders
-
- ArrayList localLoaders = _dataStore.getLocalClassLoaders();
- if (localLoaders != null)
- {
- Class theClass = null;
- for (int i = 0; i < localLoaders.size(); i++)
- {
- try
- {
- theClass = ((ClassLoader)localLoaders.get(i)).loadClass(className);
- if (theClass != null) return theClass;
- }
- catch (Exception e)
- {
- }
- }
- }
-
- // next delegate the search to the superclass's find method.
- try
- {
- Class theClass = super.findClass(className);
- if (theClass != null)
- {
- //System.out.println("Using super's: " + className);
- return theClass;
- }
- }
- catch (Exception e)
- {
- }
-
- // DKM
- // only do lookup if the classname looks valid
- // don't want to be requesting rsecomm from client
- if (className.indexOf('.') == -1)
- {
- throw new ClassNotFoundException(className);
- }
-
- // if it cannot be found:
-
- // search the class request repository to see if the class has been requested
- // already
- ClassRequest request;
- request = (ClassRequest) _dataStore.getClassRequestRepository().get(className);
-
- if (request == null)
- {
- // the class has not been requested before
- // try to look in the disk cache first
- if (useCaching())
- {
- try
- {
-
- Class theClass = _urlClassLoader.findCachedClass(className);
-
- //System.out.println("Using cached: " + className);
- return theClass;
- }
- catch (Throwable e)
- {
- // its not in the disk cache, so request it synchronously
- return requestClass(className);
- }
- }
- else
- {
- return requestClass(className);
- }
- }
- else if (!request.isLoaded())
- {
- // the class has been requested before, but it has not yet been received
- // System.out.println(className + " already requested but not loaded. Waiting for request to load.");
- request.waitForResponse(); // just wait until the class is received
-
- // after the class is received, get it from the repository and return it
- // or if the class failed to be received, throw an exception
- if (request.isLoaded()) return request.getLoadedClass();
- else throw new ClassNotFoundException(className);
- }
- else if (request.isLoaded())
- {
- // the class has been requested before, and has already been received and loaded,
- // so just return it.
- return request.getLoadedClass();
- }
- // if we ever get to this point, the class has not been found,
- // throw the exception
- else throw new ClassNotFoundException(className);
- }
-
-
- /**
- * Receives a class sent by a remote agent and loads it.
- * Notifies all threads waiting for this class to load that the
- * class has been loaded.
- * @param className the name of the class to receive
- * @param bytes the bytes in the class
- * @param size the size of the class
- */
- public synchronized void receiveClass(String className, byte[] bytes, int size)
- {
- // System.out.println("receiving "+className);
- // check the class request repository to see if the class is there
- ClassRequest request = (ClassRequest) _dataStore.getClassRequestRepository().get(className);
- if (request != null)
- {
- if (request.isLoaded()) return; // do not attempt to reload the class
- }
- if (size == 0)
- {
- // this is the signal that the class could not be found on the client
- // System.out.println("Empty class/class not found: "+className);
- // System.out.println("notifying requester");
- if (request != null)
- request.notifyResponse(); // wake up the threads waiting for the class
- return;
- }
- Class receivedClass = null;
- try
- {
- // System.out.println("defining "+className+"...");
- // try to define the class. If any dependent classes cannot be
- // found the JRE implementation will call findClass to look for them.
- // Thus we could end up with a stack of requests all waiting until the
- // classes with no dependent classes load.
- receivedClass = defineClass(className, bytes, 0, size);
-
- // System.out.println("...finished defining "+className);
- }
- catch (NoClassDefFoundError e)
- {
- // the JRE implementation could not find a dependent class.
- // (even after requesting it from the client). We must fail,
- // but wake up the threads waiting for this class.
- e.printStackTrace();
- if (request != null)
- request.notifyResponse();
- return;
- }
- catch (LinkageError e)
- {
- // this happens when the system tries to redefine a class.
- // dont try to redefine the class, just reload it.
- e.printStackTrace();
- try
- {
- receivedClass = loadClass(className);
- }
- catch (NoClassDefFoundError err)
- {
- // we shouldn't really get here unless it has tried
- // already to find the class on the client but couldnt,
- // so we might as well just fail here and notify threads waiting
- // for this class to load.
- err.printStackTrace();
- if (request != null)
- request.notifyResponse();
- return;
- }
- catch (ClassNotFoundException ee)
- {
- // we definitely shouldnt get here
- if (request != null)
- request.notifyResponse();
- return;
- }
-
- // if after trying to define or trying to load the class
- // we still dont have it, notify the threads and fail.
- if (receivedClass == null)
- {
- if (request != null)
- request.notifyResponse();
- return;
- }
- }
- if (request == null)
- {
- // not used right now, this is the case where a class was sent by
- // the client without us requesting it.
- request = new ClassRequest(className, false);
- request.setLoadedClass(receivedClass);
- _dataStore.getClassRequestRepository().put(className, request);
- return;
- }
- else
- {
- // SUCCESS! The class has been received, and defined, so just
- // load it into the class request object. This action will
- // also notify threads waiting for the class
- // System.out.println("notifying requesters");
- request.setLoadedClass(receivedClass);
- if (useCaching())
- {
- _dataStore.cacheClass(className, bytes, size);
- }
- }
- }
-
- /**
- * Kicks off a separate thread in which to request the class,
- * rather than doing it synchronously.
- * @param className The fully qualified name of the class to request.
- */
- protected void requestClassInThread(String className)
- {
- // System.out.println("requesting (in thread)"+className);
- LoadClassThread thread = new LoadClassThread(className);
- thread.start();
- }
-
- /**
- * Requests a class (synchronously) from the client
- * @param className The fully qualified name of the class to request.
- * @return the requested class
- * @throws ClassNotFoundException if the class was not found on the client
- */
- public Class requestClass(String className) throws ClassNotFoundException
- {
- // first check to see if the class has been requested before
- // System.out.println("requesting "+className);
- ClassRequest request;
- request = (ClassRequest) _dataStore.getClassRequestRepository().get(className);
- if (request == null)
- {
- // the class has not been requested yet, create a new ClassRequest
- // object to represent it
- request = new ClassRequest(className, true);
- _dataStore.getClassRequestRepository().put(className, request);
- request.setRequested(true);
-
- // put in the request for the class
- _dataStore.requestClass(className);
-
- // wait for a response
- // System.out.println("thread to wait: "+Thread.currentThread().getName());
- if (!request.isLoaded()) request.waitForResponse();
- // System.out.println("thread finished waiting: "+Thread.currentThread().getName());
- if (request.isLoaded()) return request.getLoadedClass();
- else throw new ClassNotFoundException(className);
- }
- else if (!request.isLoaded())
- {
- // class has already been requested, wait for it to load
- // System.out.println("requested elsewhere, thread to wait: "+Thread.currentThread().getName());
- if (!request.isLoaded()) request.waitForResponse();
- // System.out.println("requested elsewhere, thread finished waiting: "+Thread.currentThread().getName());
- if (request.isLoaded()) return request.getLoadedClass();
- else throw new ClassNotFoundException(className);
- }
- else if (request.isLoaded())
- {
- // class has already been requested and loaded, just return it
- return request.getLoadedClass();
- }
- // we shouldnt really get to this point, but if we do, it means the class
- // was not found.
- throw new ClassNotFoundException(className);
- }
-
- /**
- * Causes a new thread to start in which the specified class is loaded
- * into the repository. This method usually returns before the class has been
- * loaded.
- * @param className The fully qualified name of the class to load
- */
- public synchronized void loadClassInThread(String className)
- {
- // check if the class has been requested before
- ClassRequest request;
- request = (ClassRequest) _dataStore.getClassRequestRepository().get(className);
- if (request == null)
- {
- // class has not been requested, request it in a thread
- request = new ClassRequest(className, false);
- _dataStore.getClassRequestRepository().put(className, request);
- request.setRequested(true);
- requestClassInThread(className);
- return;
- }
- else if (!request.isLoaded())
- {
- // class has been requested already, but not loaded. Just return.
- return;
- }
- else if (request.isLoaded())
- {
- // class has been requested already and already loaded. Just return.
- return;
- }
- }
-
- /**
- * A new thread for loading classes in.
- * @author mjberger
- *
- */
- protected class LoadClassThread extends Thread
- {
- private String _className;
-
- public LoadClassThread(String className)
- {
- _className = className;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Thread#run()
- */
- public void run()
- {
- _dataStore.requestClass(_className);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteObjectInputStream.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteObjectInputStream.java
deleted file mode 100644
index 6709e7417..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteObjectInputStream.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectStreamClass;
-
-public class RemoteObjectInputStream extends ObjectInputStream {
-
- private RemoteClassLoader _loader;
- public RemoteObjectInputStream(InputStream in, RemoteClassLoader loader) throws IOException
- {
- super(in);
- _loader = loader;
- }
-
- protected Class resolveClass(ObjectStreamClass desc)
- throws IOException, ClassNotFoundException
- {
- String name = desc.getName();
- return _loader.loadClass(name);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/miner/Miner.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/miner/Miner.java
deleted file mode 100644
index d9020a8f2..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/miner/Miner.java
+++ /dev/null
@@ -1,669 +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.dstore.core.miners.miner;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.ResourceBundle;
-
-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.DataStoreResources;
-import org.eclipse.dstore.core.model.DataStoreSchema;
-import org.eclipse.dstore.core.model.Handler;
-import org.eclipse.dstore.core.model.ISchemaExtender;
-import org.eclipse.dstore.core.util.ExternalLoader;
-
-/**
- * Miner is the abstact base class of all DataStore extensions).
- * The DataStore framework knows how to load and route commands to miners
- * because it interfaces miners through the restricted set of interfaces declared here.
- * To add a new miner, developers must extend this class and implement the abstract methods declared here.
- */
-public abstract class Miner extends Handler
-implements ISchemaExtender
-{
-
-
- public DataStore _dataStore;
- public DataElement _minerElement;
- public DataElement _minerData;
- public DataElement _minerTransient;
-
-
-
- private boolean _initialized;
- private boolean _connected;
- private ExternalLoader _loader;
-
- protected String _name = null;
- protected String _value = null;
- protected ArrayList _dependencies;
- protected List _commandQueue;
-
- protected ResourceBundle _resourceBundle = null;
-
- /**
- * Creates a new Miner
- */
- protected Miner()
- {
- _initialized = false;
- _connected = false;
- _commandQueue = new ArrayList();
- }
-
- /**
- * Returns the qualified names of all miners that
- * this miner depends on. A miner depends on another
- * miner if it's schema extends or uses another's schema.
- * By default it returns an empty list.
- * @return a list of miner dependencies, each represented as a qualified name
- */
- public final ArrayList getMinerDependencies()
- {
- if (_dependencies == null)
- {
- _dependencies = getDependencies();
- }
- return _dependencies;
- }
-
-
- protected ArrayList getDependencies()
- {
- return new ArrayList();
- }
-
- /**
- * Indicates whether the miner has been initialized yet
- * @return whether the miner has been initialized
- */
- public final boolean isInitialized()
- {
- return _initialized;
- }
-
- /**
- * Indicates whether the miner has been connected to
- * the DataStore yet.
- * @return whether the miner has been connected to the DataStore
- */
- public final boolean isConnected()
- {
- return _connected;
- }
-
- /**
- * Shuts down the miner and cleans up it's meta-information.
- * Override this function to do your own cleanup.
- */
- public void finish()
- {
- DataElement root = _dataStore.getMinerRoot();
-
- _minerData.removeNestedData();
- _minerElement.removeNestedData();
- _dataStore.update(_minerElement);
-
- if (root.getNestedData() != null)
- {
- root.getNestedData().remove(_minerElement);
- }
- root.setExpanded(false);
- root.setUpdated(false);
-
- _dataStore.update(root);
- }
-
- /**
- * Interface to retrieve an NL enabled resource bundle.
- * Override this function to get access to a real resource bundle.
- */
- public ResourceBundle getResourceBundle()
- {
- return null;
- }
-
- /**
- * Default method that gets called on a Miner when it is loaded.
- * Override this function to perform some initialization at miner loading time.
- */
- protected void load()
- {
- }
-
- /**
- * Default method that gets called on a Miner when it is loaded.
- * Override this function to perform some initialization at miner loading time.
- * If loading the miner can result in some failure, set that status to incomplete
- *
- * @param status the status of the initialize miner command
- */
- protected void load(DataElement status)
- {
- load();
- }
-
- /**
- * This gets called after a miner is initialized.
- * If you need to update element information at that time, override this method.
- */
- protected void updateMinerInfo()
- {
- }
-
- /**
- * Returns the qualified name of this miner
- *
- * @return the qualified name of this miner
- */
- public final String getMinerName()
- {
- if (_name == null)
- _name = getClass().getName();
- return _name;
- }
-
- /**
- * Returns the name of this miner
- *
- * @return the name of this miner
- */
- public final String getValue()
- {
- if (_value == null)
- {
- String name = getMinerName();
- int indexOfValue = name.lastIndexOf("."); //$NON-NLS-1$
- _value = name.substring(indexOfValue + 1, name.length());
- }
- return _value;
- }
-
- public final void handle()
- {
- while (!_commandQueue.isEmpty())
- {
- DataElement cmd = (DataElement)_commandQueue.remove(0);
- command(cmd);
- }
- }
-
- public final void requestCommand(DataElement command)
- {
- _commandQueue.add(command);
- notifyInput();
- }
-
- public final void initMiner(DataElement status)
- {
- try
- {
- // System.out.println("initMiner:"+getMinerName());
- if (!_initialized)
- {
- load(status);
- _initialized = true;
- }
- updateMinerInfo();
-
- DataElement minerRoot = _dataStore.getMinerRoot();
- _dataStore.refresh(minerRoot);
- if (status.getAttribute(DE.A_VALUE).equals(DataStoreResources.model_incomplete))
- {
- _dataStore.refresh(status);
- }
- else
- {
-
- status.setAttribute(DE.A_VALUE, DataStoreResources.model_done);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
-
-
- }
-
- /**
- * Issues a specified command on this miner from the DataStore framework.
- * The base class handles "C_INIT_MINERS" but other commands are delegated to
- * the concrete miner implementations through handleCommand()
- *
- * @param command the command that has been sent to this miner
- * @return the status of the command
- */
- protected final DataElement command(DataElement command)
- {
- String name = getCommandName(command);
- DataElement status = getCommandStatus(command);
-
- if (status == null)
- {
- _dataStore.trace("bad command: "); //$NON-NLS-1$
- _dataStore.trace("\tcmd=" + command); //$NON-NLS-1$
- _dataStore.trace("\tparent=" + command.getParent()); //$NON-NLS-1$
- return null;
- }
-
- if (status.getAttribute(DE.A_NAME).equals("start")) //$NON-NLS-1$
- {
- status.setAttribute(DE.A_NAME, DataStoreResources.model_working);
- }
-
- if (name.equals(DataStoreSchema.C_INIT_MINERS))
- {
- initMiner(status);
- }
- else
- {
- try
- {
- status = handleCommand(command);
- }
- catch (Exception e)
- {
- //e.printStackTrace();
- _dataStore.trace(e);
- status.setAttribute(DE.A_VALUE, "Failed with Exception:"+getStack(e)); //$NON-NLS-1$
- status.setAttribute(DE.A_NAME, DataStoreResources.model_done);
- //status.setAttribute(DE.A_SOURCE, getStack(e));
- _dataStore.refresh(status);
-
- String exc = null;
- if (e.getMessage() != null)
- exc = e.getMessage();
- else
- exc = "Exception"; //$NON-NLS-1$
- _dataStore.createObject(status, DataStoreResources.model_error, exc);
- }
- catch (Error er)
- {
- er.printStackTrace();
- _dataStore.trace(er);
- _dataStore.finish();
- System.exit(-1);
- }
- }
-
- _dataStore.refresh(status);
- return status;
- }
-
- private String getStack(Throwable e)
- {
- StringBuffer buf = new StringBuffer();
- StackTraceElement[] stack = e.getStackTrace();
- for (int i = 0; i < stack.length; i++)
- {
- buf.append(stack[i].getClassName() + ":" + stack[i].getMethodName() + ":" + stack[i].getLineNumber()); //$NON-NLS-1$ //$NON-NLS-2$
- buf.append(","); //$NON-NLS-1$
- }
- return buf.toString();
- }
-
- /**
- * Sets the DataStore and performs some fundamental initialization for this miner.
- * The framework calls this method on a miner before any commands are issued.
- * The extendSchema() is called on the miner.
- *
- * @param dataStore the DataStore that owns this miner
- */
- public final void setDataStore(DataStore dataStore)
- {
- _dataStore = dataStore;
-
- DataElement root = _dataStore.getMinerRoot();
- String name = getMinerName();
- String value = getValue();
-
- _resourceBundle = getResourceBundle();
-
- // yantzi: Reuse existing miner root if found
- _minerElement = _dataStore.find(root, DE.A_NAME, name, 1);
- if (_minerElement == null || _minerElement.isDeleted())
- {
- // Create new child for this miner
- _minerElement = _dataStore.createObject(root, DataStoreResources.model_miner, name, name);
- _minerElement.setAttribute(DE.A_VALUE, value);
- _minerElement.setAttribute(DE.A_SOURCE, getVersion());
-
- _minerData = _dataStore.createObject(_minerElement, DataStoreResources.model_data, DataStoreResources.model_Data, name);
- _minerTransient = _dataStore.createObject(_minerElement, DataStoreResources.model_transient, DataStoreResources.model_Transient_Objects, name);
- }
- else
- {
- // Reuse existing miner node
- _minerData = _dataStore.find(_minerElement, DE.A_NAME, DataStoreResources.model_Data, 1);
- if (_minerData == null || _minerData.isDeleted())
- {
- _minerData = _dataStore.createObject(_minerElement, DataStoreResources.model_data, DataStoreResources.model_Data, name);
- }
-
- _minerTransient = _dataStore.find(_minerElement, DE.A_NAME, DataStoreResources.model_Transient_Objects, 1);
- if (_minerTransient == null || _minerData.isDeleted())
- {
- _minerTransient = _dataStore.createObject(_minerElement, DataStoreResources.model_transient, DataStoreResources.model_Transient_Objects, name);
- }
- }
-
- _dataStore.refresh(root, true);
- _dataStore.refresh(_minerElement);
-
- _connected = true;
- }
-
- /**
- * Creates an abstract command descriptor. This is a helper method that miner may call
- * when it creates or updates the schema for it's tool domain
- *
- * @param descriptor the parent descriptor for the new descriptor
- * @param name the name of the command
- * @param value the identifier for this command
- * @return the new command descriptor
- */
- public final DataElement createAbstractCommandDescriptor(DataElement descriptor, String name, String value)
- {
- return _dataStore.createAbstractCommandDescriptor(descriptor, name, getMinerName(), value);
- }
-
- /**
- * Creates a command descriptor. This is a helper method that miner may call
- * when it creates or updates the schema for it's tool domain
- *
- * @param descriptor the parent descriptor for the new descriptor
- * @param name the name of the command
- * @param value the identifier for this command
- * @return the new command descriptor
- */
- public final DataElement createCommandDescriptor(DataElement descriptor, String name, String value)
- {
- return createCommandDescriptor(descriptor, name, value, true);
- }
-
- /**
- * Creates a command descriptor. This is a helper method that miner may call
- * when it creates or updates the schema for it's tool domain
- *
- * @param descriptor the parent descriptor for the new descriptor
- * @param name the name of the command
- * @param value the identifier for this command
- * @param visible an indication whether this command descriptor should be visible to an end-user
- * @return the new command descriptor
- */
- public final DataElement createCommandDescriptor(DataElement descriptor, String name, String value, boolean visible)
- {
- DataElement cmdD = _dataStore.createCommandDescriptor(descriptor, name, getMinerName(), value);
- if (!visible)
- {
- cmdD.setDepth(0);
- }
-
- return cmdD;
- }
-
- /**
- * Creates an abstract object descriptor. This is a helper method that miner may call
- * when it creates or updates the schema for it's tool domain
- *
- * @param descriptor the parent descriptor for the new descriptor
- * @param name the name of the object type
- * @return the new object descriptor
- */
- public final DataElement createAbstractObjectDescriptor(DataElement descriptor, String name)
- {
- return _dataStore.createAbstractObjectDescriptor(descriptor, name);
- }
-
- /**
- * Creates an abstract object descriptor. This is a helper method that miner may call
- * when it creates or updates the schema for it's tool domain
- *
- * @param descriptor the parent descriptor for the new descriptor
- * @param name the name of the object type
- * @param source the plugin location of the miner that owns this object type
- * @return the new object descriptor
- */
- public final DataElement createAbstractObjectDescriptor(DataElement descriptor, String name, String source)
- {
- return _dataStore.createAbstractObjectDescriptor(descriptor, name, source);
- }
-
- /**
- * Creates a object descriptor. This is a helper method that miner may call
- * when it creates or updates the schema for it's tool domain
- *
- * @param descriptor the parent descriptor for the new descriptor
- * @param name the name of the object type
- * @return the new object descriptor
- */
- public final DataElement createObjectDescriptor(DataElement descriptor, String name)
- {
- return _dataStore.createObjectDescriptor(descriptor, name);
- }
-
- /**
- * Creates a object descriptor. This is a helper method that miner may call
- * when it creates or updates the schema for it's tool domain
- *
- * @param descriptor the parent descriptor for the new descriptor
- * @param name the name of the object type
- * @param source the plugin location of the miner that owns this object type
- * @return the new object descriptor
- */
- public final DataElement createObjectDescriptor(DataElement descriptor, String name, String source)
- {
- return _dataStore.createObjectDescriptor(descriptor, name, source);
- }
-
- /**
- * Creates a new type of relationship descriptor. This is a helper method that miner may call
- * when it creates or updates the schema for it's tool domain
- *
- * @param descriptor the parent descriptor for the new descriptor
- * @param name the name of the relationship type
- * @return the new relationship descriptor
- */
- public final DataElement createRelationDescriptor(DataElement descriptor, String name)
- {
- return _dataStore.createRelationDescriptor(descriptor, name);
- }
-
- /**
- * Creates an abstract relationship between two descriptors. An abstract relationship between two descriptors
- * indicates that the first descriptor abstracts the second, while the second inherits the
- * properties of the first. This is a helper method that miner may call
- * when it creates or updates the schema for it's tool domain.
- *
- * @param from the abstacting descriptor
- * @param to the descriptor that is abstracted
- * @return the new relationship descriptor
- */
- public final DataElement createAbstractRelationship(DataElement from, DataElement to)
- {
- return _dataStore.createReference(from, to, "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Creates a contents relationship between any two elements.
- *
- * @param from the containing element
- * @param to the element that is contained
- * @return the new relationship
- */
- public final DataElement createReference(DataElement from, DataElement to)
- {
- return _dataStore.createReference(from, to);
- }
-
-
-
- /**
- * Returns the element that represents this miner.
- *
- * @return the miner element
- */
- public final DataElement getMinerElement()
- {
- return _minerElement;
- }
-
- /**
- * Returns the element that contains this miners meta-information.
- *
- * @return the miner data element
- */
- public final DataElement getMinerData()
- {
- return _minerData;
- }
-
- /**
- * Returns the transient object container for this element.
- *
- * @return the transient element
- */
- public final DataElement getMinerTransient()
- {
- return _minerTransient;
- }
-
- /**
- * Identifies a give object descriptor type to be transient in this miner.
- *
- * @param objectDescriptor the object descriptor type that is transient
- */
- public final void makeTransient(DataElement objectDescriptor)
- {
- _dataStore.createReference(_minerTransient, objectDescriptor);
- }
-
- /**
- * Returns the name of a command.
- * This is a helper method to be used inside handleCommand().
- *
- * @param command a tree of elements representing a command
- * @return the name of the command
- */
- public final String getCommandName(DataElement command)
- {
- return command.getAttribute(DE.A_NAME);
- }
-
- /**
- * Returns the status of a command.
- * This is a helper method to be used inside handleCommand().
- *
- * @param command a tree of elements representing a command
- * @return the status element for the command
- */
- public final DataElement getCommandStatus(DataElement command)
- {
- //DKM - status is always last
- return command.get(command.getNestedSize() - 1);
- //_dataStore.find(command, DE.A_TYPE, DataStoreResources.model_status"), 1);
- }
-
-
-
- /**
- * Returns the number of arguments for this command.
- * This is a helper method to be used inside handleCommand().
- *
- * @param command a tree of elements representing a command
- * @return the number of arguments for this command
- */
- public final int getNumberOfCommandArguments(DataElement command)
- {
- return command.getNestedSize();
- }
-
- /**
- * Returns the argument of a command specified at a given index.
- * This is a helper method to be used inside handleCommand().
- *
- * @param command a tree of elements representing a command
- * @param arg the index into the commands children
- * @return the argument of the command
- */
- public final DataElement getCommandArgument(DataElement command, int arg)
- {
- if (command.getNestedSize() > 0)
- {
- DataElement argument = command.get(arg);
- if (argument != null)
- {
- return argument.dereference();
- }
- }
-
- return null;
- }
-
-
-
- /**
- * Returns the descriptor root for the DataStore schema
- *
- * @return the descriptor root
- */
- public final DataElement getSchemaRoot()
- {
- return _dataStore.getDescriptorRoot();
- }
-
- public void setExternalLoader(ExternalLoader loader)
- {
- _loader = loader;
- }
-
- public ExternalLoader getExternalLoader()
- {
- return _loader;
- }
-
- public synchronized void waitForInput()
- {
- if (_commandQueue.size() == 0)
- {
- super.waitForInput();
- }
- }
-
-
-
- /**
- * Handle commands that are routed to this miner.
- * This interface must be implemented by each miner in order to
- * perform tool actions driven from user interface interaction.
- *
- * @param theCommand an instance of a command containing a tree of arguments
- */
- public abstract DataElement handleCommand(DataElement theCommand);
-
-
- /**
- * Returns the version of this miner
- * The expected format for this is "<version>.<major>.<minor>"
- */
- public abstract String getVersion();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/miner/MinerThread.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/miner/MinerThread.java
deleted file mode 100644
index da7074eeb..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/miner/MinerThread.java
+++ /dev/null
@@ -1,122 +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.dstore.core.miners.miner;
-
-/**
- * MinerThread is a utility class used for doing threaded operations in a miner.
- */
-public abstract class MinerThread extends Thread
-{
-
- private volatile Thread minerThread;
- protected boolean _isCancelled;
-
- /**
- * Constructor
- */
- public MinerThread()
- {
- super();
- _isCancelled = false;
- }
-
- /**
- * stops the thread
- */
- public synchronized void stopThread()
- {
- if (minerThread != null)
- {
- _isCancelled = true;
-
- try
- {
- minerThread = null;
- }
- catch (Exception e)
- {
- System.out.println(e);
- }
-
- }
- notify();
- }
-
- /**
- * runs the thread
- */
- public void run()
- {
- Thread thisThread = Thread.currentThread();
- minerThread = thisThread;
- //thisThread.setPriority(thisThread.getPriority()+1);
-
- //This function lets derived classes do some initialization
- initializeThread();
-
- while (minerThread != null && minerThread == thisThread && minerThread.isAlive() && !_isCancelled)
- {
- try
- {
- sleep(100);
- // yield();
- }
- catch (InterruptedException e)
- {
- System.out.println(e);
- }
-
- //This function is where the Threads do real work, and return false when finished
- if (!doThreadedWork())
- {
- try
- {
- minerThread = null;
- }
- catch (Exception e)
- {
- System.out.println(e);
- }
- }
- }
-
- //This function lets derived classes cleanup or whatever
- cleanupThread();
- }
-
- /**
- * Implement this method to provide initialization of this thread.
- */
- public abstract void initializeThread();
-
- /**
- * Implement this method to provide the work implementation of this thread.
- * This method gets called periodically by the miner thread so te work done
- * here must be atomic. Each time this is called a incremental unit of
- * work should be done. Once all the work is done, <b>true</b> should be
- * returned.
- *
- * @return <b>true</b> if all the work is done.
- */
- public abstract boolean doThreadedWork();
-
- /**
- * Implement this method to provide any cleanup that is required after
- * all the work is done.
- */
- public abstract void cleanupThread();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java
deleted file mode 100644
index 26199e18e..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java
+++ /dev/null
@@ -1,290 +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.dstore.core.model;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-/**
- * <p>
- * The ByteStreamHandler class is used to abstract file read and write operations
- * across the network. By default this is used for sending and receiving files
- * on the client and the server. The class can be extended if the default byte stream
- * implementations are not sufficient for a particular platform or use.
- * </p>
- * <p>
- * If ByteStreamHandler is extended, you need to tell the DataStore to use the
- * extended implementation. To do that, call <code>DataStore.setByteStreamHandler(ByteStreamHandler)</code>.
- * </p>
- *
- */
-public class ByteStreamHandler implements IByteStreamHandler
-{
-
- protected DataStore _dataStore;
- protected DataElement _log;
- protected static final String FILEMSG_REMOTE_SAVE_FAILED = "RSEF5006"; //$NON-NLS-1$
-
- /**
- * Contructor
- * @param dataStore the DataStore instance
- */
- public ByteStreamHandler(DataStore dataStore, DataElement log)
- {
- _dataStore = dataStore;
- _log = log;
- }
-
- public String getId()
- {
- return getClass().getName();
- }
-
- /**
- * Save a file in the specified location. This method is called by the
- * DataStore when the communication layer receives a file transfer
- *
- * @param remotePath the path where to save the file
- * @param buffer the bytes to insert in the file
- * @param size the number of bytes to insert
- * @param binary indicates whether to save the bytes as binary or text
- */
- public void receiveBytes(String remotePath, byte[] buffer, int size, boolean binary)
- {
- remotePath = new String(remotePath.replace('\\', '/'));
- DataElement status = findStatusFor(remotePath);
- String fileName = _dataStore.mapToLocalPath(remotePath);
-
- if (fileName != null)
- {
- try
- {
- // need to create directories as well
- File file = new File(fileName);
- if (!file.exists())
- {
- File parent = new File(file.getParent());
- parent.mkdirs();
- }
- else
- {
- }
-
- File newFile = new File(fileName);
- FileOutputStream fileStream = new FileOutputStream(newFile);
-
- if (binary)
- {
- fileStream.write(buffer, 0, size);
- }
- else
- {
- IByteConverter byteConverter = _dataStore.getByteConverter();
- byteConverter.setContext(file);
- byte[] convertedBytes = byteConverter.convertClientBytesToHostBytes(buffer, 0, size);
- fileStream.write(convertedBytes, 0, convertedBytes.length);
-
- /*
- String bufferString = new String(buffer, 0, size, DE.ENCODING_UTF_8);
-
- // hack for zOS
- String theOS = System.getProperty("os.name");
- if (theOS.toLowerCase().startsWith("z"))
- {
- bufferString = bufferString.replace('\r', ' ');
- }
-
- OutputStreamWriter writer = new OutputStreamWriter(fileStream);
- writer.write(bufferString, 0, size);
- writer.flush();
- */
- }
-
- fileStream.close();
- if (status == null)
- return;
- status.setAttribute(DE.A_SOURCE, "success"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- catch (IOException e)
- {
- System.out.println(e);
- if (status == null)
- return;
- status.setAttribute(DE.A_VALUE, FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, "failed"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- catch (Exception e)
- {
- System.out.println(e);
- if (status == null)
- return;
- status.setAttribute(DE.A_VALUE, FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, "failed"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- }
- }
-
- /**
- * Append a bytes to a file at a specified location. This method is called by the
- * DataStore when the communication layer receives a file transfer append.
- *
- * @param remotePath the path where to save the file
- * @param buffer the bytes to append in the file
- * @param size the number of bytes to append in the file
- * @param binary indicates whether to save the bytes as binary or text
- */
- public void receiveAppendedBytes(String remotePath, byte[] buffer, int size, boolean binary)
- {
- remotePath = new String(remotePath.replace('\\', '/'));
- DataElement status = findStatusFor(remotePath);
- String fileName = _dataStore.mapToLocalPath(remotePath);
-
- if (fileName != null)
- {
- try
- {
- // need to create directories as well
- File file = new File(fileName);
- if (!file.exists())
- {
- File parent = new File(file.getParent());
- parent.mkdirs();
-
- File newFile = new File(fileName);
- FileOutputStream fileStream = new FileOutputStream(newFile);
-
- if (binary)
- {
- fileStream.write(buffer, 0, size);
- }
- else
- {
- IByteConverter byteConverter = _dataStore.getByteConverter();
- byteConverter.setContext(file);
-
- byte[] convertedBytes = byteConverter.convertClientBytesToHostBytes(buffer, 0, size);
- fileStream.write(convertedBytes, 0, convertedBytes.length);
- }
-
- fileStream.close();
- }
- else
- {
- FileOutputStream outStream = new FileOutputStream(fileName, true);
-
- try
- {
- if (binary)
- {
- outStream.write(buffer, 0, size);
- }
- else
- {
- IByteConverter byteConverter = _dataStore.getByteConverter();
- byteConverter.setContext(file);
- byte[] convertedBytes = byteConverter.convertClientBytesToHostBytes(buffer, 0, size);
- outStream.write(convertedBytes, 0, convertedBytes.length);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- outStream.close();
-
- }
- if (status == null)
- return;
- status.setAttribute(DE.A_SOURCE, "success"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- catch (IOException e)
- {
- System.out.println(e);
- if (status == null)
- return;
- status.setAttribute(DE.A_VALUE, FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, "failed"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- }
- }
-
-
-
- /**
- * Called by <code>sendBytes</code> to either save the bytes to a local file or transmit
- * them to a remote file.
- * @param path the path of the file
- * @param bytes the bytes of the file
- * @param size the size of the file
- * @param binary indicates whether the bytes are to be sent as binary or text
- */
- protected void internalSendBytes(String path, byte[] bytes, int size, boolean binary)
- {
- if (_dataStore.isVirtual())
- {
- _dataStore.replaceFile(path, bytes, size, binary);
- }
- else
- {
- _dataStore.updateFile(path, bytes, size, binary);
- }
- }
-
- /**
- * Called by <code>sendBytes</code> to either append the bytes to a local file or transmit
- * them and append them to a remote file.
- * @param path the path of the file
- * @param bytes the bytes of the file
- * @param size the size of the file
- * @param binary indicates whether the bytes are to be sent as binary or text
- */
- protected void internalSendAppendBytes(String path, byte[] bytes, int size, boolean binary)
- {
- if (_dataStore.isVirtual())
- {
- _dataStore.replaceAppendFile(path, bytes, size, binary);
- }
- else
- {
- _dataStore.updateAppendFile(path, bytes, size, binary);
- }
- }
-
- protected DataElement findStatusFor(String remotePath)
- {
- if (_log != null)
- {
- for (int i = 0; i < _log.getNestedSize(); i++)
- {
- DataElement child = _log.get(i);
- if (child.getName().equals(remotePath))
- {
- return child;
- }
- }
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandlerRegistry.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandlerRegistry.java
deleted file mode 100644
index a424cf3f7..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandlerRegistry.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-import java.util.HashMap;
-
-/**
- * Stores the set of registered byte stream handlers using the handler id
- * as the key. Whenever a bytestream operation is required (i.e. for a save of bytes)
- * The appropriate byte stream handler is retrieved via the specified id.
- * If no such handler exists, then the default byte stream handler is returned.
- *
- */
-public class ByteStreamHandlerRegistry
-{
- private HashMap _map;
- private IByteStreamHandler _default;
- public ByteStreamHandlerRegistry()
- {
- _map = new HashMap();
- }
-
- /**
- * Registers the default byte stream handler
- * @param handler the default byte stream handler
- */
- public void setDefaultByteStreamHandler(IByteStreamHandler handler)
- {
- _default = handler;
- _map.put(DataStoreResources.DEFAULT_BYTESTREAMHANDLER, handler);
- registerByteStreamHandler(handler);
- }
-
- /**
- * Registers a byte stream handler.
- * @param handler the handler to register
- */
- public void registerByteStreamHandler(IByteStreamHandler handler)
- {
- _map.put(handler.getId(), handler);
- }
-
- /**
- * Returns the byte stream handler with the specified id.
- * If "default" is specified or no such id has been registered,
- * the default byte stream handler is returned.
- * @param id the id of the byte stream handler
- * @return the byte stream handler
- */
- public IByteStreamHandler getByteStreamHandler(String id)
- {
- IByteStreamHandler handler = (IByteStreamHandler)_map.get(id);
- if (handler == null)
- {
- handler = _default;
- }
- return handler;
- }
-
- /**
- * Returns the default byte stream handler
- * @return the default
- */
- public IByteStreamHandler getDefault()
- {
- return _default;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java
deleted file mode 100644
index 77ecd5620..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java
+++ /dev/null
@@ -1,299 +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.dstore.core.model;
-
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-import org.eclipse.dstore.core.util.CommandGenerator;
-
-/**
- * <p>
- * Abtract class for handling commands. A <code>CommandHandler</code> is a <code>Handler</code> that
- * contains a queue of commands to be sent to miners. Each DataStore instance uses a single
- * command handler that periodically sends it's queue either to a server or directly
- * to miners.
- * </p>
- * <p>
- * The CommandHandler is the means by which the DataStore sends information or files from
- * the client to the remote tools.
- * </p>
- */
-public abstract class CommandHandler extends Handler
-{
-
- protected ArrayList _commands;
- protected ArrayList _classesToSend;
-
- private CommandGenerator _commandGenerator;
-
- /**
- * Constructor
- */
- public CommandHandler()
- {
- super();
- setName("DStore CommandHandler"+getName()); //$NON-NLS-1$
- _commands = new ArrayList();
- _classesToSend = new ArrayList();
- _commandGenerator = new CommandGenerator();
- }
-
- /**
- * Sets the associated DataStore
- */
- public void setDataStore(DataStore dataStore)
- {
- super.setDataStore(dataStore);
- _commandGenerator.setDataStore(dataStore);
- }
-
- /**
- * Returns the associated DataStore
- * @return the associated DataStore
- */
- public DataStore getDataStore()
- {
- return _dataStore;
- }
-
- /**
- * Adds a command object to the queue
- * @param command the command to add to the queue
- * @param immediate indicates whether the command should be inserted first in the queue
- * or whether it should be appended.
- */
- public void addCommand(DataElement command, boolean immediate)
- {
- synchronized (_commands)
- {
- if (!_commands.contains(command))
- {
- if (immediate)
- {
- _commands.add(0, command);
- }
- else
- {
- _commands.add(command);
- }
- }
- notifyInput();
- }
- }
-
- /**
- * Periodically called to send commands from the queue.
- */
- public void handle()
- {
- if (!_commands.isEmpty() || !_classesToSend.isEmpty())
- {
- sendCommands();
- }
- }
-
- /**
- * Create and add a new command object to the command queue.
- *
- * @param commandDescriptor the descriptor for the new command
- * @param arguments the arguments for the command
- * @param object the subject of the command
- * @param refArg indicates whether the subject should be represented in the command as a
- * reference to the subject or the actual subject, itself
- * @param immediate indicates whether the command should be first in the queue or appended to it
- * @return the status object of the command
- */
- public DataElement command(DataElement commandDescriptor, ArrayList arguments, DataElement object, boolean refArg, boolean immediate)
- {
- DataElement command = _commandGenerator.generateCommand(commandDescriptor, arguments, object, refArg);
- return command(command, immediate);
- }
-
- /**
- * Create and add a new command object to the command queue.
- *
- * @param commandDescriptor the descriptor for the new command
- * @param arg the arg for the command
- * @param object the subject of the command
- * @param refArg indicates whether the subject should be represented in the command as a
- * reference to the subject or the actual subject, itself
- * @param immediate indicates whether the command should be first in the queue or appended to it
- * @return the status object of the command
- */
- public DataElement command(DataElement commandDescriptor, DataElement arg, DataElement object, boolean refArg, boolean immediate)
- {
- DataElement command = _commandGenerator.generateCommand(commandDescriptor, arg, object, refArg);
- return command(command, immediate);
- }
-
- /**
- * Create and add a new command object to the command queue.
- *
- * @param commandDescriptor the descriptor for the new command
- * @param object the subject of the command
- * @param refArg indicates whether the subject should be represented in the command as a
- * reference to the subject or the actual subject, itself
- * @return the status object of the command
- */
- public DataElement command(DataElement commandDescriptor, DataElement object, boolean refArg)
- {
- DataElement command = _commandGenerator.generateCommand(commandDescriptor, object, refArg);
- return command(command);
- }
-
- /**
- * Add a command object to the command queue
- * @param cmd the command object to add to the queue
- * @return the status object of the command
- */
- public DataElement command(DataElement cmd)
- {
- return command(cmd, false);
- }
-
- /**
- * Add a command object to the command queue
- * @param cmd the command object to add to the queue
- * @param immediate indicates whether the command is to be inserted first in the queue or appended
- * @return the status object of the command
- */
- public DataElement command(DataElement cmd, boolean immediate)
- {
- DataElement status = null;
- if ((cmd != null) && _dataStore != null)
- {
-
- status = cmd.get(cmd.getNestedSize() -1);
- if (status != null && !status.getName().equals(DataStoreResources.model_done))
- {
- addCommand(cmd, immediate);
- }
- }
-
- return status;
- }
-
- /**
- * Removes and affectively cancels all commands from the current queue of commands
- */
- public synchronized void cancelAllCommands()
- {
- DataElement log = _dataStore.getLogRoot();
- for (int i = 0; i < _commands.size(); i++)
- {
- log.removeNestedData((DataElement) _commands.get(i));
- }
-
- _commands.clear();
- }
-
- public CommandGenerator getCommandGenerator()
- {
- return _commandGenerator;
- }
-
- /**
- * Implemented to provide the means by which commands in the queue are sent
- */
- public abstract void sendCommands();
-
-
- /**
- * Implemented to provide the means by which file bytes are sent
- * @param fileName the name of the file to send
- * @param bytes to bytes of the file to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or text
- */
- public abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary);
-
-
- /**
- * Implemented to provide the means by which file bytes are sent
- * @param fileName the name of the file to send
- * @param bytes to bytes of the file to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or text
- * @param byteStreamHandlerId indicates which byte stream handler to receive the bytes with
- */
- public abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId);
-
- /**
- * Implemented to provide the means by which file bytes are sent and appended
- * @param fileName the name of the file to send
- * @param bytes to bytes of the file to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or text
- */
- public abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary);
-
- /**
- * Implemented to provide the means by which file bytes are sent and appended
- * @param fileName the name of the file to send
- * @param bytes to bytes of the file to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or text
- * @param byteStreamHandlerId indicates which byte stream handler to receive the bytes with
- */
- public abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId);
-
- /**
- * Implemented to provide the means by which classes are sent
- * across the comm channel.
- * @param className the name of the class to send
- */
- public abstract void sendClass(String className);
-
- /**
- * Implemented to provide the means by which classes are sent
- * across the comm channel.
- * @param className the name of the class to send
- * @param classByteStreamHandlerId indicates which class byte stream handler to receive the class with
- */
- public abstract void sendClass(String className, String classByteStreamHandlerId);
-
-
- /**
- * Runs the specified class on the remote system
- */
- public abstract void sendClassInstance(IRemoteClassInstance runnable, String classByteStreamHandlerId);
-
-
- /**
- * Causes the current thread to wait until this class request has been
- * fulfilled.
- */
- public synchronized void waitForInput()
- {
- if (_commands.size() == 0 && _classesToSend.size() == 0)
- {
- super.waitForInput();
- }
- }
-
- /**
- * Implemented to provide the means by which classes are requested
- * across the comm channel.
- * @param className the name of the class to request
- */
- public abstract void requestClass(String className);
-
- public abstract void sendKeepAliveConfirmation();
-
- public abstract void sendKeepAliveRequest();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DE.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DE.java
deleted file mode 100644
index 292106d27..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DE.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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;
-
-/**
- * DE is a container of <code>DataElement</code> constants. These constants
- * are used to identify <code>DataElement</code> attributes.
- *
- * <li>
- * Attributes beginning with "P_" indicate <I>property</I> attribute identifiers.
- * </li>
- * <li>
- * Attributes beginning with "T_" indicate <code>DataElement</code> <I>type</I> attributes.
- * </li>
- * <li>
- * Attributes beginning with "A_" indicate <code>DataElement</code> indexs into <I>attributes</I>.
- * </li>
- *
- */
-public class DE
-{
-
-
- /*
- * The nested data (children) property identifier of a <code>DataElement</code>.
- */
- public static final String P_CHILDREN = "children"; //$NON-NLS-1$
-
- /*
- * The image property identifier of a <code>DataElement</code>. This is the same
- * as the value property identifier
- */
- public static final String P_LABEL = "label"; //$NON-NLS-1$
-
- /*
- * The notifier property identifier of a <code>DataElement</code>.
- */
- public static final String P_NOTIFIER = "notifier"; //$NON-NLS-1$
-
- /*
- * The <code>DataStore</code> property identifier of a <code>DataElement</code>.
- */
- public static final String P_DATASTORE = "dataStore"; //$NON-NLS-1$
-
- /*
- * The source name property identifier of a <code>DataElement</code>. This is the
- * name of a source location if one exists.
- */
- public static final String P_SOURCE_NAME = "source"; //$NON-NLS-1$
-
- /*
- * The source file property identifier of a <code>DataElement</code>.
- */
- public static final String P_SOURCE = "sourcefile"; //$NON-NLS-1$
-
- /*
- * The source location property identifier of a <code>DataElement</code>.
- */
- public static final String P_SOURCE_LOCATION = "sourcelocation"; //$NON-NLS-1$
-
- public static final String P_SOURCE_LOCATION_COLUMN = "sourcelocationcolumn"; //$NON-NLS-1$
-
- /*
- * The nested data (children) property identifier of a <code>DataElement</code>. Same as <code>P_CHILDREN</code>.
- */
- public static final String P_NESTED = "nested"; //$NON-NLS-1$
-
- /*
- * The buffer property identifier of a <code>DataElement</code>.
- */
- public static final String P_BUFFER = "buffer"; //$NON-NLS-1$
-
- /*
- * The type property identifier of a <code>DataElement</code>.
- */
- public static final String P_TYPE = "type"; //$NON-NLS-1$
-
- /*
- * The id property identifier of a <code>DataElement</code>.
- */
- public static final String P_ID = "id"; //$NON-NLS-1$
-
- /*
- * The name property identifier of a <code>DataElement</code>.
- */
- public static final String P_NAME = "name"; //$NON-NLS-1$
-
- /*
- * The value property identifier of a <code>DataElement</code>.
- */
- public static final String P_VALUE = "value"; //$NON-NLS-1$
-
- /*
- * The <I>is reference?</I> property identifier of a <code>DataElement</code>. Deprecated. Use P_REF_TYPE.
- */
- public static final String P_ISREF = "isRef"; //$NON-NLS-1$
-
- /*
- * The <I>is reference?</I> property identifier of a <code>DataElement</code>.
- */
- public static final String P_REF_TYPE = "refType"; //$NON-NLS-1$
-
- /*
- * The visibility property identifier of a <code>DataElement</code>.
- */
- public static final String P_DEPTH = "depth"; //$NON-NLS-1$
-
- /*
- * The attributes property identifier of a <code>DataElement</code>.
- */
- public static final String P_ATTRIBUTES = "attribute"; //$NON-NLS-1$
-
- /*
- * The file property identifier of a <code>DataElement</code>.
- */
- public static final String P_FILE = "file"; //$NON-NLS-1$
-
- /*
- * The file property identifier of a <code>DataElement</code>.
- */
- public static final String P_DESCRIPTOR = "descriptor"; //$NON-NLS-1$
-
- /*
- * Reference type.
- */
- public static final String T_REFERENCE = "reference"; //$NON-NLS-1$
-
- /*
- * Command type.
- */
- public static final String T_COMMAND = "command"; //$NON-NLS-1$
-
- /*
- * UI Command Descriptor type.
- */
- public static final String T_UI_COMMAND_DESCRIPTOR = "ui_commanddescriptor"; //$NON-NLS-1$
-
- /*
- * Object Descriptor type.
- */
- public static final String T_OBJECT_DESCRIPTOR = "objectdescriptor"; //$NON-NLS-1$
-
- /*
- * Command Descriptor type.
- */
- public static final String T_COMMAND_DESCRIPTOR = "commanddescriptor"; //$NON-NLS-1$
-
- /*
- * Relation Descriptor type.
- */
- public static final String T_RELATION_DESCRIPTOR = "relationdescriptor"; //$NON-NLS-1$
-
- /*
- * Abstract Object Descriptor type.
- */
- public static final String T_ABSTRACT_OBJECT_DESCRIPTOR = "abstractobjectdescriptor"; //$NON-NLS-1$
-
- /*
- * Abstract Command Descriptor type.
- */
- public static final String T_ABSTRACT_COMMAND_DESCRIPTOR = "abstractcommanddescriptor"; //$NON-NLS-1$
-
- /*
- * Abstract Relation Descriptor type.
- */
- public static final String T_ABSTRACT_RELATION_DESCRIPTOR = "abstractrelationdescriptor"; //$NON-NLS-1$
-
-
- /*
- * Type attribute index.
- */
- public static final int A_TYPE = 0;
-
- /*
- * ID attribute index.
- */
- public static final int A_ID = 1;
-
- /*
- * Name attribute index.
- */
- public static final int A_NAME = 2;
-
- /*
- * Value attribute index.
- */
- public static final int A_VALUE = 3;
-
- /*
- * Source attribute index.
- */
- public static final int A_SOURCE = 4;
-
- /*
- * Source location attribute index.
- * @deprecated
- */
- public static final int A_SOURCE_LOCATION = 5;
-
- /*
- * IsRef attribute index. Deprecated. Use A_REF_TYPE.
- */
- public static final int A_ISREF = 6;
-
- /*
- * RefType attribute index.
- */
- public static final int A_REF_TYPE = 6;
-
- /*
- * Visibility attribute index.
- */
- public static final int A_DEPTH = 7;
-
- /*
- * Size attribute index.
- */
- public static final int A_SIZE = 8;
-
- public static final String ENCODING_UTF_8 = "UTF-8"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java
deleted file mode 100644
index dbe8e422a..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java
+++ /dev/null
@@ -1,1682 +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.dstore.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.dstore.core.util.DataElementRemover;
-import org.eclipse.dstore.core.util.StringCompare;
-import org.eclipse.dstore.extra.internal.extra.DataElementActionFilter;
-import org.eclipse.dstore.extra.internal.extra.DesktopElement;
-import org.eclipse.dstore.extra.internal.extra.IDataElement;
-import org.eclipse.dstore.extra.internal.extra.PropertySource;
-
-/**
- * <code>DataElement</code> is the unit of information for the <code>DataStore</code>. All objects including
- * schema descriptors, commands and instance objects are represented by <code>DataElement</code>s.
- * <code>DataElement</code>s should not be constructed directly, rather they are requested via the createObject()
- * method in <code>DataStore</code>
- *
- */
-public final class DataElement implements IDataElement
-{
-
-
- private String _attributes[];
- private StringBuffer _buffer;
-
- private boolean _isReference = false;
- private boolean _isDescriptor = false;
- private boolean _isExpanded = false;
- private boolean _isUpdated = false;
- private boolean _isPendingTransfer = false;
- private boolean _isSpirit = false;
-
- private int _depth = 1;
-
- private DataStore _dataStore = null;
- private DataElement _parent = null;
- private DataElement _descriptor = null;
-
- private ArrayList _nestedData = null;
- private DataElement _referencedObject = null;
-
- private PropertySource _propertySource = null;
-
-
- /**
- * Creates a new <code>DataElement</code> without initializing it.
- *
- */
- public DataElement()
- {
- _dataStore = null;
- _parent = null;
- DataElementRemover.addToCreatedCount();
- }
-
- /**
- * Creates a new <code>DataElement</code> without initializing it.
- *
- * @param dataStore the owner <code>DataStore</code> for this element
- */
- protected DataElement(DataStore dataStore)
- {
- _dataStore = dataStore;
- _parent = null;
- DataElementRemover.addToCreatedCount();
- }
-
- protected void finalize()
- {
- DataElementRemover.addToGCedCount();
- }
-
- /**
- * Initializes a <code>DataElement</code> to be reference to some other <code>DataElement</code>.
- * This method should only be called from the <code>DataStore</code>.
- *
- * @param parent the element that contains this reference
- * @param originalObject the element that gets referenced
- * @param refType the type descriptor of the reference
- */
- public void reInit(DataElement parent, DataElement originalObject, DataElement refType)
- {
- if ((parent != null) && (originalObject != null))
- {
- _parent = parent;
-
- _attributes = getAttributes();
- String type = refType.getName();
- _attributes[DE.A_TYPE] = type;
-
- String originalId = originalObject.getId();
- StringBuffer idBuf = new StringBuffer(parent.getId());
- idBuf.append(type);
- idBuf.append(originalId);
- _attributes[DE.A_ID] = idBuf.toString();
- _attributes[DE.A_NAME] = originalId;
- _attributes[DE.A_VALUE] = originalId;
-
- initialize(refType);
-
- _referencedObject = originalObject;
- _isReference = true;
- }
- }
-
- /**
- * Initializes a <code>DataElement</code> to be reference to some other <code>DataElement</code>
- * This method should only be called from the <code>DataStore</code>.
- *
- * @param parent the element that contains this reference
- * @param originalObject the element that gets referenced
- * @param refType the a string representing the type of reference
- */
- public void reInit(DataElement parent, DataElement originalObject, String refType)
- {
- if ((parent != null) && (originalObject != null))
- {
- _parent = parent;
-
- _attributes = getAttributes();
- _attributes[DE.A_TYPE] = refType;
-
- String originalId = originalObject.getId();
- StringBuffer idBuf = new StringBuffer(parent.getId());
- idBuf.append(refType);
- idBuf.append(originalId);
-
- _attributes[DE.A_ID] = idBuf.toString();
- _attributes[DE.A_NAME] = originalId;
- _attributes[DE.A_VALUE] = originalId;
-
- initialize();
-
- _referencedObject = originalObject;
- _isReference = true;
- }
- }
-
- /**
- * Initializes a <code>DataElement</code>
- * This method should only be called from the <code>DataStore</code>.
- *
- * @param parent the parent of the element
- * @param type the type descriptor of the element
- * @param id the ID of the element
- * @param name the name of the element
- * @param source the source location of the element
- */
- public void reInit(DataElement parent, DataElement type, String id, String name, String source)
- {
- _parent = parent;
-
- _attributes = getAttributes();
- _attributes[DE.A_TYPE] = type.getAttribute(DE.A_NAME);
- _attributes[DE.A_ID] = id;
- _attributes[DE.A_NAME] = name;
- _attributes[DE.A_VALUE] = name;
- _attributes[DE.A_SOURCE] = source;
-
- initialize(type);
- }
-
- /**
- * Initializes a <code>DataElement</code>
- * This method should only be called from the <code>DataStore</code>.
- *
- * @param parent the parent of the element
- * @param type a string representing the type descriptor of the element
- * @param id the ID of the element
- * @param name the name of the element
- * @param source the source location of the element
- */
- public void reInit(DataElement parent, String type, String id, String name, String source)
- {
- _parent = parent;
-
- _attributes = getAttributes();
- _attributes[DE.A_TYPE] = type;
- _attributes[DE.A_ID] = id;
- _attributes[DE.A_NAME] = name;
- _attributes[DE.A_VALUE] = name;
- _attributes[DE.A_SOURCE] = source;
-
- initialize();
- }
-
- /**
- * Initializes a <code>DataElement</code>
- * This method should only be called from the <code>DataStore</code>.
- *
- * @param parent the parent of the element
- * @param type the type descriptor of the element
- * @param id the ID of the element
- * @param name the name of the element
- * @param source the source location of the element
- * @param isRef an indication of whether the element is a reference or not
- */
- public void reInit(DataElement parent, DataElement type, String id, String name, String source, boolean isRef)
- {
- _parent = parent;
-
- _attributes = getAttributes();
- _attributes[DE.A_TYPE] = type.getAttribute(DE.A_NAME);
- _attributes[DE.A_ID] = id;
- _attributes[DE.A_NAME] = name;
- _attributes[DE.A_VALUE] = name;
- _attributes[DE.A_SOURCE] = source;
-
- initialize(type);
- _isReference = isRef;
- }
-
- /**
- * Initializes a <code>DataElement</code>
- * This method should only be called from the <code>DataStore</code>.
- *
- * @param parent the parent of the element
- * @param type a string representing the type descriptor of the element
- * @param id the ID of the element
- * @param name the name of the element
- * @param source the source location of the element
- * @param isRef an indication of whether the element is a reference or not
- */
- public void reInit(DataElement parent, String type, String id, String name, String source, boolean isRef)
- {
- _parent = parent;
-
- _attributes = getAttributes();
- _attributes[DE.A_TYPE] = type;
- _attributes[DE.A_ID] = id;
- _attributes[DE.A_NAME] = name;
- _attributes[DE.A_VALUE] = name;
- _attributes[DE.A_SOURCE] = source;
-
- initialize();
- _isReference = isRef;
- }
-
- /**
- * Initializes a <code>DataElement</code>
- * This method should only be called from the <code>DataStore</code>.
- *
- * @param parent the parent of the element
- * @param type the type descriptor of the element
- * @param attributes the attributes for this element (name, source, id, etc.)
- */
- public void reInit(DataElement parent, DataElement type, String[] attributes)
- {
- _parent = parent;
-
- _attributes = attributes;
- _attributes[DE.A_TYPE] = type.getName();
-
- initialize(type);
- }
-
- /**
- * Initializes a <code>DataElement</code>
- * This method should only be called from the <code>DataStore</code>.
- *
- * @param parent the parent of the element
- * @param attributes the attributes for this element (type, name, source, id, etc.)
- */
- public void reInit(DataElement parent, String[] attributes)
- {
- _parent = parent;
-
- _attributes = attributes;
-
- initialize();
- }
-
- public void reInitAsTransient(String attributes[])
- {
- _attributes = attributes;
-
- _isReference = false;
- _isDescriptor = false;
- _depth = 2;
-
- _referencedObject = null;
- _isExpanded = false;
- _isUpdated = false;
-
- String depthStr = getAttribute(DE.A_DEPTH);
- if (depthStr != null && depthStr.length() > 0)
- {
- if (!depthStr.equals("2")) //$NON-NLS-1$
- {
- try
- {
- _depth = Integer.parseInt(depthStr);
- }
- catch (Exception e)
- {
- }
- }
- }
-
- if (_nestedData != null)
- _nestedData.clear();
- }
-
- /**
- * Indicates whether the <code>DataElement</code> is deleted or not.
- *
- * @return whehther the element is deleted or not
- */
- public boolean isDeleted()
- {
- if (_attributes == null)
- {
- return true;
- }
-
- String valueAttribute = getAttribute(DE.A_VALUE);
-
- if (valueAttribute != null && valueAttribute.equals(DataStoreResources.DELETED))
- {
- return true;
- }
-
- if (_isSpirit && !_dataStore.isVirtual())
- {
- return true;
- }
-
- return false;
- }
-
- /**
- * Adds a set of elements as children to this element.
- *
- * @param nestedData a set of elements to add to this element
- * @param checkUnique whether to prevent duplicates from being added
- */
- public synchronized void addNestedData(List nestedData, boolean checkUnique)
- {
- if (nestedData != null)
- {
- if (_nestedData == null)
- {
- _nestedData = new ArrayList(nestedData.size());
- }
-
- for (int i = 0; i < nestedData.size(); i++)
- {
- DataElement child = (DataElement) nestedData.get(i);
- if (child != null && child != this)
- {
- addNestedData(child, checkUnique);
- }
- }
- }
- }
-
- /**
- * Adds another element as a child to this element.
- *
- * @param obj the element to add
- * @param checkUnique whether to prevent duplicates from being added
- */
- public synchronized void addNestedData(DataElement obj, boolean checkUnique)
- {
- if (_nestedData == null)
- {
- _nestedData = new ArrayList(4);
- }
-
- synchronized (_nestedData)
- {
- boolean alreadyThere = false;
- if (checkUnique)
- {
- alreadyThere = _nestedData.contains(obj);
- }
-
- if (!checkUnique || !alreadyThere)
- {
- if (alreadyThere)
- {
- return;
- }
- else
- {
- _nestedData.add(obj);
-
- if (obj.getParent() == null)
- obj.setParent(this);
- }
- }
-
- _isUpdated = false;
- obj.setUpdated(false);
- }
- }
-
- /**
- * Removes a specified child element from this element.
- *
- * @param object the element to remove
- */
- public synchronized void removeNestedData(DataElement object)
- {
- if (_nestedData != null)
- {
- synchronized(_nestedData)
- {
- _nestedData.remove(object);
- }
- }
- _isExpanded = false;
- _isUpdated = false;
- }
-
- /**
- * Removes all the children from this element.
- */
- public synchronized void removeNestedData()
- {
- if (_nestedData != null)
- {
- synchronized (_nestedData)
- {
- while (_nestedData.size() > 0)
- {
- DataElement nestedObject = (DataElement) _nestedData.get(0);
- _nestedData.remove(nestedObject);
- }
- }
- }
-
- _isExpanded = false;
- _isUpdated = false;
- }
-
- /**
- * Returns an attribute of this element.
- *
- * @param attributeIndex the index of the element
- * @return the attribute
- */
- public String getAttribute(int attributeIndex)
- {
- return _attributes[attributeIndex];
- }
-
- /**
- * Returns the set of attributes for this element.
- *
- * @return the set of attributes
- */
- public String[] getAttributes()
- {
- if (_attributes == null)
- {
- return new String[DE.A_SIZE];
- }
- return _attributes;
- }
-
- /**
- * Returns the type attribute for this element.
- *
- * @return the type attribute
- */
- public String getType()
- {
- return getAttribute(DE.A_TYPE);
- }
-
- /**
- * Returns the ID attribute for this element.
- *
- * @return the ID attribute
- */
- public String getId()
- {
- return getAttribute(DE.A_ID);
- }
-
- /**
- * Returns the name attribute for this element.
- *
- * @return the name attribute
- */
- public String getName()
- {
- return getAttribute(DE.A_NAME);
- }
-
- /**
- * Returns the value attribute for this element.
- *
- * @return the value attribute
- */
- public String getValue()
- {
- return getAttribute(DE.A_VALUE);
- }
-
- /**
- * Returns the source attribute for this element.
- *
- * @return the source attribute
- */
- public String getSource()
- {
- return getAttribute(DE.A_SOURCE);
- }
-
- /**
- * Returns the buffer for this element.
- *
- * @return the buffer
- */
- public StringBuffer getBuffer()
- {
- return _buffer;
- }
-
- /**
- * Returns the <code>DataStore</code> for this element.
- *
- * @return the <code>DataStore</code>
- */
- public DataStore getDataStore()
- {
- return _dataStore;
- }
-
- /**
- * Initializes the children set of this element with a specified size.
- *
- * @param size the initial size
- */
- public void initializeNestedData(int size)
- {
- if (_nestedData == null)
- {
- _nestedData = new ArrayList(size);
- }
- }
-
- /**
- * Returns the children of this element.
- *
- * @return the children of this element
- */
- public List getNestedData()
- {
- return _nestedData;
- }
-
- /**
- * Returns the child at the specified index.
- *
- * @param index the index of the child to retrieve
- * @return the child element
- */
- public DataElement get(int index)
- {
- if (_nestedData == null)
- {
- return null;
- }
- else
- {
- if (getNestedSize() > index)
- {
- Object obj = _nestedData.get(index);
- return (DataElement) obj;
- }
- else
- {
- return null;
- }
- }
- }
-
- /**
- * Returns the number of children this element contains.
- *
- * @return the number of children
- */
- public int getNestedSize()
- {
- if (_nestedData == null)
- {
- return 0;
- }
- else
- {
- return _nestedData.size();
- }
- }
-
- /**
- * Returns the parent of this element.
- *
- * @return the parent
- */
- public DataElement getParent()
- {
- return _parent;
- }
-
- public boolean isDescriptor()
- {
- return _isDescriptor;
- }
-
- /**
- * Explicitly sets the type descriptor for this element.
- *
- * @param theDescriptor the type descriptor for this element
- */
- public void setDescriptor(DataElement theDescriptor)
- {
- _descriptor = theDescriptor;
- }
-
- /**
- * Returns the type descriptor for this element.
- *
- * @return the type descriptor for this element
- */
- public DataElement getDescriptor()
- {
- if (isDeleted())
- {
- return null;
- }
-
- if (_isReference)
- {
- if (_referencedObject == null)
- {
- _referencedObject = dereference();
- }
- if (this == _referencedObject || _referencedObject.isDeleted())
- {
- _referencedObject = null;
- }
- else
- {
- return _referencedObject.getDescriptor();
- }
- }
- else if ((_descriptor == null) && (_dataStore != null))
- {
- if (_isDescriptor)
- {
- _descriptor = _dataStore.findDescriptor(getAttribute(DE.A_TYPE), getName());
- }
- else
- {
- _descriptor = _dataStore.findObjectDescriptor(getAttribute(DE.A_TYPE));
- if (_descriptor == null)
- {
- _descriptor = _dataStore.find(_dataStore.getDescriptorRoot(), DE.A_NAME, getAttribute(DE.A_TYPE), 3);
- }
- }
- }
-
- return _descriptor;
- }
-
-
- /**
- * Returns the visibility of this element.
- *
- * @return the level of visibility for this element
- */
- public int depth()
- {
- return _depth;
- }
-
- /**
- * Indicates whether this is a reference or not.
- *
- * @return whether this is a reference or not
- */
- public boolean isReference()
- {
- return _isReference;
- }
-
- /**
- * Indicates whether this element has been queried for it's children.
- *
- * @return whether element has been expanded
- */
- public boolean isExpanded()
- {
- return _isExpanded;
- }
-
- /**
- * Indicates whether this element has been updated yet.
- * On a server, an element is updated if it has been transfered the the client.
- * On a client, an element is updated if a notification has been sent out for the ui
- *
- * @return whether element has been updated yet
- */
- public boolean isUpdated()
- {
- return _isUpdated;
- }
-
- /**
- * Indicates whether this element is pending a transfer
- * If the element is queued to be sent, the value will be true.
- *
- * @return whether element has been updated yet
- */
- public boolean isPendingTransfer()
- {
- return _isPendingTransfer;
- }
-
- /**
- * Indicates whether this element is a 'spirit' element.
- * In a client datastore, this means that the element's counterpart on the
- * server is either also a spirit (and will be deleted soon) or has already
- * been deleted. In a server datastore, this means that the element is
- * to be deleted at the next opportunity in order to free memory.
- */
- public boolean isSpirit()
- {
- return _isSpirit;
- }
-
- /**
- * Sets an attribute of the element.
- *
- * @param attributeIndex the index of the attribute to set
- * @param attribute the new value for the specified attribute
- */
- public void setAttribute(int attributeIndex, String attribute)
- {
- String nameAttribute = getAttribute(DE.A_NAME);
- if ((attributeIndex == DE.A_NAME) && (nameAttribute != null && nameAttribute.equals(getAttribute(DE.A_VALUE))))
- {
- _attributes[DE.A_VALUE] = attribute;
- }
- else if (attributeIndex == DE.A_DEPTH)
- {
- if (attribute != null)
- _depth = Integer.parseInt(attribute);
- else
- _depth = 0;
- }
- else if (attributeIndex == DE.A_TYPE)
- {
- _descriptor = null;
- }
-
- _attributes[attributeIndex] = attribute;
- _isUpdated = false;
- }
-
- /**
- * Sets all of the attributes of the element.
- *
- * @param attributes the new set of attributes for the element
- */
- public void setAttributes(String attributes[])
- {
- for (int i = 0; i < DE.A_SIZE; i++)
- {
- if (attributes[i] != null)
- {
- setAttribute(i, attributes[i]);
- }
- }
-
- _isUpdated = false;
- }
-
- /**
- * Sets the buffer for this element.
- * The buffer is used if extra temporary information needs to be stored
- * with this element
- *
- * @param buffer the new buffer for this element
- */
- public void setBuffer(StringBuffer buffer)
- {
- _buffer = buffer;
- if (_depth < 2 && buffer.length() > 0)
- {
- setDepth(2);
- }
-
- _isUpdated = false;
- }
-
- /**
- * Appends to the buffer for this element.
- * The buffer is used if extra temporary information needs to be stored
- * with this element
- *
- * @param text text to append to the buffer
- */
- public void appendToBuffer(String text)
- {
- if (_buffer == null)
- {
- _buffer = new StringBuffer();
- }
- _buffer.append(text);
- _isUpdated = false;
- }
-
- /**
- * Sets the expanded indication for this element.
- *
- * @param flag whether the element is expanded or not
- */
- public void setExpanded(boolean flag)
- {
- _isExpanded = flag;
- }
-
- /**
- * Sets the updated indication for this element.
- *
- * @param flag whether the element is updated or not
- */
- public void setUpdated(boolean flag)
- {
- _isUpdated = flag;
- }
-
- /**
- * Sets indication of whether this element is waiting to be transferred.
- * If so, the updated flag should not be set to true
- *
- * @param flag whether the element is waiting to be transferred
- */
- public void setPendingTransfer(boolean flag)
- {
- _isPendingTransfer = flag;
- }
-
- /**
- * Sets indication of whether this element is a 'spirit' element.
- * In a client datastore, this means that the element's counterpart on the
- * server is either also a spirit (and will be deleted soon) or has already
- * been deleted. In a server datastore, this means that the element is
- * to be deleted at the next opportunity in order to free memory.
- */
- public void setSpirit(boolean flag)
- {
- _isSpirit = flag;
- }
-
- /**
- * Sets the parent for this element.
- *
- * @param parent the new parent
- */
- public void setParent(DataElement parent)
- {
- _parent = parent;
- }
-
- /**
- * Sets the <code>DataStore</code> for this element.
- *
- * @param dataStore the new dataStore
- */
- public void setDataStore(DataStore dataStore)
- {
- _dataStore = dataStore;
- }
-
- /**
- * Sets the depth of visibility for this element.
- *
- * @param depth the level of visibility
- */
- public void setDepth(int depth)
- {
- _depth = depth;
- setAttribute(DE.A_DEPTH, "" + _depth); //$NON-NLS-1$
- _isUpdated = false;
- //_dataStore.refresh(this);
- }
-
- /**
- * Tests if this element is of the specified type.
- *
- * @param typeStr a string representing the type descriptor to compare with
- * @return whether the element is of the specified type
- */
- public boolean isOfType(String typeStr)
- {
- DataElement typeDescriptor = _dataStore.find(_dataStore.getDescriptorRoot(), DE.A_NAME, typeStr, 1);
- return isOfType(typeDescriptor);
- }
-
- /**
- * Tests if this element is of the specified type.
- *
- * @param typeStr a string representing the type descriptor to compare with
- * @return whether the element is of the specified type
- */
- public boolean isOfType(String typeStr, boolean isDescriptor)
- {
- DataElement typeDescriptor = _dataStore.find(_dataStore.getDescriptorRoot(), DE.A_NAME, typeStr, 1);
- return isOfType(typeDescriptor, isDescriptor);
- }
-
- /**
- * Tests if this element is of the specified type.
- *
- * @param type the type descriptor to compare with
- * @return whether the element is of the specified type
- */
- public boolean isOfType(DataElement type)
- {
- return isOfType(type, false);
- }
-
- /**
- * Tests if this element is of the specified type.
- *
- * @param type the type descriptor to compare with
- * @param isDescriptor whehter this element is a descriptor or an instance object
- * @return whether the element is of the specified type
- */
- public boolean isOfType(DataElement type, boolean isDescriptor)
- {
- boolean result = false;
-
- if (type == null)
- {
- return result;
- }
-
- DataElement descriptor = this;
- if (!isDescriptor)
- {
- descriptor = getDescriptor();
- }
-
- if (descriptor == type)
- {
- return true;
- }
-
- if (descriptor != null && !descriptor.isDeleted())
- {
- String typeType = type.getType();
- String typeName = type.getName();
- if (typeType.equals(DE.T_OBJECT_DESCRIPTOR) || typeType.equals(DE.T_ABSTRACT_OBJECT_DESCRIPTOR))
- {
- if (descriptor.getName().equals(typeName) || (typeName.equals("all"))) //$NON-NLS-1$
- {
- result = true;
- return result;
- }
- }
-
- DataElement relationship = _dataStore.getAbstractedByRelation();
- List abstracted = null;
-
- if (relationship != null)
- {
- abstracted = descriptor.getAssociated(relationship);
- }
- if (abstracted != null)
- {
- for (int i = 0;(i < abstracted.size()) && !result; i++)
- {
- DataElement superDescriptor = (DataElement) abstracted.get(i);
- result = superDescriptor.isOfType(type, true);
- }
- }
- }
-
- return result;
- }
-
- /**
- * Tests if this element matches the specified patterns.
- *
- * @param attributes the attribute indexes to compare with
- * @param patterns the values to compare the specified attributes with
- * @param numAttributes the number of attributes to compare
- * @param ignoreCase whether to ignore case or not
- * @return whether the element matches the patterns
- */
- public boolean patternMatch(int attributes[], String patterns[], int numAttributes, boolean ignoreCase)
- {
- int index = 0;
- while (index < numAttributes)
- {
- String attribute = getAttribute(attributes[index]);
- String pattern = patterns[index];
-
- if (!StringCompare.compare(pattern, attribute, ignoreCase))
- {
- return false;
- }
- index++;
- }
-
- return true;
- }
-
- /**
- * Tests if this element contains a specified element in a particular relationship.
- *
- * @param object the object to look for
- * @param property relationship under which to find the object
- * @return whether the element is found
- */
- public boolean contains(DataElement object, DataElement property)
- {
- return contains(object, property, 1);
- }
-
- /**
- * Tests if this element contains a specified element in a particular relationship.
- *
- * @param object the object to look for
- * @param property relationship under which to find the object
- * @param depth how deep to search for the specified element
- * @return whether the element is found
- */
- public synchronized boolean contains(DataElement object, DataElement property, int depth)
- {
- if (depth > 0)
- {
- depth--;
-
- if (object == null)
- {
- return false;
- }
-
- if (property == null)
- {
- property = _dataStore.getContentsRelation();
- }
-
- if (getNestedSize() == 0)
- {
- return false;
- }
-
- if (property != null)
- {
- if (property.getType().equals(DE.T_ABSTRACT_RELATION_DESCRIPTOR))
- {
- for (int i = 0; i < property.getNestedSize(); i++)
- {
- DataElement subProperty = property.get(i).dereference();
- if (contains(object, subProperty))
- {
- return true;
- }
- }
- }
- else
- {
- String type = property.getName();
- if (type.equals(DataStoreResources.model_parent) && (_parent != null))
- {
- if (object == _parent)
- {
- return true;
- }
- else
- {
- return _parent.contains(object, property, depth);
- }
- }
- else if (_nestedData != null)
- {
- for (int i = 0; i < _nestedData.size(); i++)
- {
- DataElement nestedObject = (DataElement) _nestedData.get(i);
- if (nestedObject != null)
- {
- if (nestedObject.isReference())
- {
- String relType = nestedObject.getAttribute(DE.A_TYPE);
- if (relType.equals(type))
- {
- DataElement referenced = nestedObject.dereference();
-
- if (referenced == object)
- {
- return true;
- }
- else
- {
- return referenced.contains(object, property, depth);
- }
- }
- }
- else if (type.equals("contents")) //$NON-NLS-1$
- {
- if (nestedObject == object)
- {
- return true;
- }
- else
- {
- if (nestedObject.contains(object, property, depth))
- {
- return true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return false;
- }
-
- /**
- * Tests if this element contains a specified element in the default contents relationship.
- *
- * @param object the object to look for
- * @return whether the element is found
- */
- public boolean contains(DataElement object)
- {
- return contains(object, 1);
- }
-
- /**
- * Tests if this element contains a specified element in the default contents relationship.
- *
- * @param object the object to look for
- * @param depth how deep to search
- * @return whether the element is found
- */
- public boolean contains(DataElement object, int depth)
- {
- boolean result = false;
- if (_nestedData != null)
- {
- depth--;
- for (int i = 0; i < getNestedSize(); i++)
- {
- DataElement child = get(i);
-
- if (child == object)
- {
- return true;
- }
- else if (child.dereference() == object)
- {
- return true;
- }
- else if (depth > 0)
- {
- result = child.contains(object, depth);
- if (result)
- {
- return true;
- }
- }
- }
- }
-
- return result;
- }
-
- /**
- * Tests if this element is the same as another.
- *
- * @param arg the object to compare with
- * @return whether the element is the same
- */
- public boolean equals(Object arg)
- {
- if (arg instanceof DataElement)
- {
- return arg == this;
- }
-
- return false;
- }
-
- /**
- * Gets the set of elements that are related to this element via a specified relationship.
- *
- * @param propertyStr a string representing the relationship that is required
- * @return the set of related elements
- */
- public List getAssociated(String propertyStr)
- {
- DataElement property = _dataStore.findObjectDescriptor(propertyStr);
- if (property == null)
- {
- property = _dataStore.findRelationDescriptor(propertyStr);
- }
- if (property != null)
- {
- return getAssociated(property);
- }
- else
- {
- return new ArrayList(1);
- }
- }
-
- /**
- * Gets the set of elements that are related to this element via a specified relationship.
- *
- * @param property the relationship that is required
- * @return the set of related elements
- */
- public List getAssociated(DataElement property)
- {
- ArrayList set = new ArrayList();
-
- if (property == null || getNestedSize() == 0)
- {
- return set;
- }
- else
- {
- if (property.getType().equals(DE.T_ABSTRACT_RELATION_DESCRIPTOR))
- {
- // recursively concat the abstracted matches
- for (int i = 0; i < property.getNestedSize(); i++)
- {
- DataElement subProperty = property.get(i).dereference();
- List subSet = getAssociated(subProperty);
- set.addAll(subSet);
- }
- }
- else
- {
- String type = property.getName();
- if (type.equals(DataStoreResources.model_parent) && (_parent != null))
- {
- set.add(_parent);
- return set;
- }
- else if (type.equals(DataStoreResources.model_descriptor_for))
- {
- getDescriptor();
- if (_descriptor != null)
- set.add(_descriptor);
- }
- else if (_nestedData != null)
- {
- for (int i = 0; i < _nestedData.size(); i++)
- {
- DataElement nestedObject = (DataElement) _nestedData.get(i);
- if (nestedObject != null)
- {
- if (nestedObject.isReference())
- {
- String relType = nestedObject.getType();
- if (relType.equals(type))
- {
- DataElement referenced = nestedObject.dereference();
- if ((referenced != null) && !referenced.isDeleted())
- {
- set.add(referenced);
- }
- }
- }
- else if (type.equals(DataStoreResources.model_contents))
- {
- if (!nestedObject.isDeleted())
- set.add(nestedObject);
- }
- }
- }
- }
- }
- }
-
- return set;
- }
-
- /**
- * Returns the element that this references.
- * If the element is not a reference, itself is returned
- *
- * @return the element that this references
- */
- public DataElement dereference()
- {
- if (_isReference)
- {
- String name = getAttribute(DE.A_NAME);
- if ((_referencedObject != null))
- {
- if (_referencedObject.getId().equals(name))
- {
- return _referencedObject;
- }
- else
- {
- _referencedObject = null;
- delete();
- return null;
- }
- }
- else
- {
- _referencedObject = _dataStore.find(name);
- if ((_referencedObject != null))
- {
- return _referencedObject;
- }
- else
- {
- return null;
- }
- }
- }
- else
- {
- return this;
- }
- }
-
- /**
- * Do the specified command on this element.
- * This element becomes the subject of a command that has a value, command
- *
- * @param command the string representing the command to issue
- * @param isSynchronized an indication of whether this command should be synchronized
- * @return the status of the command
- */
- public DataElement doCommandOn(String command, boolean isSynchronized)
- {
- DataElement status = null;
- if ((_dataStore != null) && (_dataStore.isConnected()))
- {
- DataElement cmdDescriptor = _dataStore.localDescriptorQuery(getDescriptor(), command);
- if (cmdDescriptor != null)
- {
- if (isSynchronized)
- {
- status = _dataStore.synchronizedCommand(cmdDescriptor, this);
- }
- else
- {
- status = _dataStore.command(cmdDescriptor, this);
- }
- }
- }
- return status;
- }
-
-
-
- /**
- * Gets the adapter specified by key for this element
- *
- * @param key the identifier for this adapter
- * @return the adapter
- */
- public Object getAdapter(Class key)
- {
- Object adapter = DesktopElement.getPlatformAdapter(this, key);
- if (adapter != null)
- {
- return adapter;
- }
- else if (PropertySource.matches(key))
- {
- if (_propertySource == null)
- {
- _propertySource = new PropertySource(this);
- }
-
- return _propertySource;
- }
- else if (DataElementActionFilter.matches(key))
- {
- return DataElementActionFilter.getInstance();
- }
- return null;
- }
-
- /**
- * Returns a string showing the attributes of this element
- *
- * @return a printable string
- */
- public String toString()
- {
- return "DataElement " //$NON-NLS-1$
- + (_isReference ? "reference" : "") //$NON-NLS-1$ //$NON-NLS-2$
- + "\n{\n\tType:\t" //$NON-NLS-1$
- + getType()
- + "\n\tName:\t" //$NON-NLS-1$
- + getName()
- + "\n\tValue:\t" //$NON-NLS-1$
- + getValue()
- + "\n\tID:\t" //$NON-NLS-1$
- + getId()
- + "\n\tSource:\t" //$NON-NLS-1$
- + getSource()
- + "\n\tDepth:\t" //$NON-NLS-1$
- + _depth
- + "\n\tDataStore:\t" //$NON-NLS-1$
- + _dataStore.getName()
- + "\n}\n"; //$NON-NLS-1$
- }
-
- /**
- * Returns the property identified by name.
- *
- * @param name a specifier of which property to return
- * @return the specified property
- */
- public Object getElementProperty(Object name)
- {
- return getElementProperty(name, 3);
- }
-
- private Object getElementProperty(Object name, int depth)
- {
- if (depth == 0)
- {
- return null;
- }
-
- if (_isReference)
- {
- if (_referencedObject == null)
- {
- dereference();
- }
-
- if (_referencedObject != null)
- {
- return _referencedObject.getElementProperty(name, depth - 1);
- }
- else
- {
- return null;
- }
- }
- else
- {
- if (DE.P_NOTIFIER.equals(name))
- {
- return _dataStore.getDomainNotifier();
- }
- else if (DE.P_LABEL.equals(name))
- {
- return getAttribute(DE.A_NAME);
- }
- else if (DE.P_TYPE.equals(name))
- {
- return getAttribute(DE.A_TYPE);
- }
- else if (DE.P_NAME.equals(name))
- {
- return getAttribute(DE.A_NAME);
- }
- else if (DE.P_VALUE.equals(name))
- {
- return getAttribute(DE.A_VALUE);
- }
- else if (DE.P_ID.equals(name))
- {
- return getAttribute(DE.A_ID);
- }
- else if (DE.P_DESCRIPTOR.equals(name))
- {
- return _descriptor;
- }
- else if (DE.P_SOURCE_NAME.equals(name))
- {
- String source = getAttribute(DE.A_SOURCE);
- int locationIndex = source.lastIndexOf(":"); //$NON-NLS-1$
- if (locationIndex > 3)
- {
- return source.substring(0, locationIndex);
- }
- return source;
- }
- else if (DE.P_BUFFER.equals(name))
- {
- return _buffer;
- }
- else if (DE.P_SOURCE.equals(name))
- {
- return getAttribute(DE.A_SOURCE);
- }
- else if (DE.P_SOURCE_LOCATION_COLUMN.equals(name))
- {
- return null;
- }
- else if (DE.P_DATASTORE.equals(name))
- {
- return _dataStore.getName();
- }
- else if (DE.P_NESTED.equals(name) || DE.P_CHILDREN.equals(name))
- {
- return getNestedData();
- }
- else
- {
- return null;
- }
- }
-
- }
-
- private void initialize()
- {
- initialize(null);
- }
-
- private void initialize(DataElement typeDescriptor)
- {
- _isReference = false;
- _isDescriptor = false;
- _depth = 2;
-
- _referencedObject = null;
- _isExpanded = false;
- _isUpdated = false;
- _descriptor = typeDescriptor;
-
-
- String depthStr = getAttribute(DE.A_DEPTH);
- if (depthStr != null && depthStr.length() > 0)
- {
- if (!depthStr.equals("2")) //$NON-NLS-1$
- {
- try
- {
- _depth = Integer.parseInt(depthStr);
- }
- catch (Exception e)
- {
- }
- }
- }
-
-
-
- String refType = getAttribute(DE.A_REF_TYPE);
- if (refType != null)
- {
- if (refType.equals(DataStoreResources.TRUE) || refType.equals(DataStoreResources.REFERENCE))
- {
- _isReference = true;
- _isSpirit = false;
- }
- else if (refType.equals(DataStoreResources.FALSE) || refType.equals(DataStoreResources.VALUE))
- {
- _isReference = false;
- _isSpirit = false;
- }
- else if (refType.equals(DataStoreResources.SPIRIT))
- {
- _isReference = false;
- _isSpirit = true;
- }
- }
-
- String type = getAttribute(DE.A_TYPE);
- if (type.equals(DE.T_OBJECT_DESCRIPTOR)
- || type.equals(DE.T_COMMAND_DESCRIPTOR)
- || type.equals(DE.T_RELATION_DESCRIPTOR)
- || type.equals(DE.T_ABSTRACT_OBJECT_DESCRIPTOR)
- || type.equals(DE.T_ABSTRACT_COMMAND_DESCRIPTOR)
- || type.equals(DE.T_ABSTRACT_RELATION_DESCRIPTOR))
- {
- _isDescriptor = true;
- }
-
- if (_nestedData != null)
- _nestedData.clear();
- }
-
- /**
- * Removes all the attributes of a <code>DataElement</code>.
- * This method should only be called from the UpdateHandlers.
- */
- protected synchronized void clear()
- {
- if (_attributes != null)
- {
- for (int i = 0; i < _attributes.length; i++)
- {
- String att = _attributes[i];
- if (att != null)
- {
- att = null;
- }
- }
-
- }
-
- if (_nestedData != null)
- {
- _nestedData.clear();
- }
-
- _parent = null;
- _descriptor = null;
- _referencedObject = null;
-
- _propertySource = null;
- _buffer = null;
- }
-
- /**
- * Marks a <code>DataElement</code> as deleted.
- * This method should only be called from the <code>DataStore</code>
- */
- public synchronized void delete()
- {
- if (!isDeleted())
- {
- // set delete attribute
-
- setAttribute(DE.A_SOURCE, null);
- setAttribute(DE.A_VALUE, DataStoreResources.DELETED);
- setAttribute(DE.A_TYPE, null);
- setAttribute(DE.A_NAME, null);
-
- _isUpdated = false;
- _isExpanded = true;
- _buffer = null;
- _nestedData = null;
- }
- }
-
- public synchronized void notifyUpdate()
- {
- notify();
- }
-
- public synchronized void waitForUpdate(long timeout)
- {
- try
- {
- //System.out.println("waiting on:"+this);
- wait(timeout);
- //System.out.println("done waiting on:"+this);
- }
- catch (Exception e)
- {
- // timeed out
- // System.out.println("timeout:"+this);
- }
- }
-} \ 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
deleted file mode 100644
index de6570875..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java
+++ /dev/null
@@ -1,4202 +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:
- * Michael Berger (IBM) - 146326 fixed erroneously disconnected dstore elements.
- * Michael Berger (IBM) - 145799 added refresh() method with depth parameter.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.PrintStream;
-import java.io.RandomAccessFile;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Random;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.jar.JarOutputStream;
-import java.util.zip.ZipOutputStream;
-
-import org.eclipse.dstore.core.java.ClassByteStreamHandler;
-import org.eclipse.dstore.core.java.ClassByteStreamHandlerRegistry;
-import org.eclipse.dstore.core.java.IClassByteStreamHandler;
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-import org.eclipse.dstore.core.java.RemoteClassLoader;
-import org.eclipse.dstore.core.util.DataElementRemover;
-import org.eclipse.dstore.core.util.ExternalLoader;
-import org.eclipse.dstore.core.util.StringCompare;
-import org.eclipse.dstore.core.util.XMLgenerator;
-import org.eclipse.dstore.core.util.XMLparser;
-import org.eclipse.dstore.extra.internal.extra.DomainNotifier;
-
-/**
- * <code>DataStore</code> is the heart of the <code>DataStore</code> Distributed Tooling Framework.
- * This class is used for creating, deleting and accessing <code>DataElement</code>s and for communicating commands
- * to miners (tools).
- *
- * <p>
- * Every <code>DataStore</code> has both a command handler and an update handler. The command
- * handler is responsible for sending commands, in the form of <code>DataElement</code> trees, to the appropriate
- * implementer, either directly to the miner, or indirectly over the communication layer through a server
- * <code>DataStore</code>. The update handler is responsible for notifying listeners about changes in the
- * <code>DataStore</code>, either directly via a <code>DomainNotifier</code> or indirectly over the communication
- * layer through a client <code>DataStore</code>.
- * </p>
- *
- */
-public final class DataStore
-{
-
-
- private DataStoreAttributes _dataStoreAttributes;
-
- private RemoteClassLoader _remoteLoader;
-
- private DataElement _root;
- private DataElement _descriptorRoot;
- private DataElement _logRoot;
- private DataElement _hostRoot;
- private DataElement _minerRoot;
- private DataElement _tempRoot;
- private DataElement _dummy;
- private DataElement _externalRoot;
- private DataElement _status;
-
- private DataElement _ticket;
- private String _remoteIP;
- private DataStoreSchema _dataStoreSchema;
- private CommandHandler _commandHandler;
- private UpdateHandler _updateHandler;
-
- private IByteConverter _byteConverter;
- private ByteStreamHandlerRegistry _byteStreamHandlerRegistry;
- private ClassByteStreamHandlerRegistry _classbyteStreamHandlerRegistry;
-
- private DomainNotifier _domainNotifier;
-
- private ArrayList _loaders;
- private ArrayList _minersLocations;
- private ArrayList _localClassLoaders;
- private HashMap _dataStorePreferences;
-
- private ISSLProperties _sslProperties;
-
- private boolean _autoRefresh;
-
- private boolean _isConnected;
- private boolean _logTimes;
- private int _timeout;
-
- private HashMap _hashMap;
- private HashMap _objDescriptorMap;
- private HashMap _cmdDescriptorMap;
- private HashMap _relDescriptorMap;
-
- private ArrayList _recycled;
-
- private Random _random;
- private int _initialSize;
-
- private File _traceFileHandle;
- private RandomAccessFile _traceFile;
- private boolean _tracingOn;
-
- private boolean _spiritModeOn = false;
- private boolean _spiritCommandReceived = false;
- private File _memLoggingFileHandle;
- private RandomAccessFile _memLogFile;
- private boolean _memLoggingOn;
-
- private ArrayList _waitingStatuses = null;
-
- private String _userPreferencesDirectory = null;
-
- private HashMap _classReqRepository;
- private File _cacheJar;
- public static final String REMOTE_CLASS_CACHE_JARFILE_NAME = "rmt_classloader_cache"; //$NON-NLS-1$
- public static final String JARFILE_EXTENSION = ".jar"; //$NON-NLS-1$
- private DataElementRemover _deRemover;
- public static final int SPIRIT_ON_INITIAL_SIZE = 1000;
- private String referenceTag = null;
-
- private int _serverVersion;
- private int _serverMinor;
-
- private List _lastCreatedElements;
-
- /**
- * Creates a new <code>DataStore</code> instance
- *
- * @param attributes the default attributes of the <code>DataStore</code>
- */
- public DataStore(DataStoreAttributes attributes)
- {
- _dataStoreAttributes = attributes;
- _commandHandler = null;
- _updateHandler = null;
- _domainNotifier = null;
- _isConnected = false;
- _logTimes = false;
- setSpiritModeOnState();
- _initialSize = _spiritModeOn && !isVirtual() ? SPIRIT_ON_INITIAL_SIZE : 100000;
- initialize();
- }
-
- /**
- * Creates a new DataStore instance
- *
- * @param attributes the default attributes of the <code>DataStore</code>
- * @param initialSize the initial number of preallocated <code>DataElement</code>s
- */
- public DataStore(DataStoreAttributes attributes, int initialSize)
- {
- _dataStoreAttributes = attributes;
- _commandHandler = null;
- _updateHandler = null;
- _domainNotifier = null;
- _isConnected = false;
- _logTimes = false;
- setSpiritModeOnState();
- _initialSize = _spiritModeOn && !isVirtual() ? SPIRIT_ON_INITIAL_SIZE : initialSize;
- initialize();
- }
-
- /**
- * Creates a new <code>DataStore</code> instance
- *
- * @param attributes the default attributes of the <code>DataStore</code>
- * @param commandHandler the DataStore's handler for sending commands
- * @param updateHandler the DataStore's handler for doing updates
- * @param domainNotifier the domain notifier
- */
- public DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, DomainNotifier domainNotifier)
- {
- _dataStoreAttributes = attributes;
- _commandHandler = commandHandler;
- _updateHandler = updateHandler;
- _domainNotifier = domainNotifier;
- _isConnected = true;
- _logTimes = false;
- setSpiritModeOnState();
- _initialSize = _spiritModeOn && !isVirtual() ? SPIRIT_ON_INITIAL_SIZE : 10000;
- initialize();
- createRoot();
- }
-
- /**
- * Creates a new DataStore instance
- *
- * @param attributes the default attributes of the <code>DataStore</code>
- * @param commandHandler the DataStore's handler for sending commands
- * @param updateHandler the DataStore's handler for doing updates
- * @param domainNotifier the domain notifier
- * @param initialSize the initialNumber of preallocated <code>DataElement</code>s
- */
- public DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, DomainNotifier domainNotifier, int initialSize)
- {
- _dataStoreAttributes = attributes;
- _commandHandler = commandHandler;
- _updateHandler = updateHandler;
- _domainNotifier = domainNotifier;
- _isConnected = true;
- _logTimes = false;
- setSpiritModeOnState();
- _initialSize = _spiritModeOn && !isVirtual() ? SPIRIT_ON_INITIAL_SIZE : initialSize;
- initialize();
- createRoot();
- }
-
- protected void setSpiritModeOnState()
- {
- if (isVirtual()) _spiritModeOn = true;
- else
- {
- String doSpirit = System.getProperty("DSTORE_SPIRIT_ON"); //$NON-NLS-1$
- _spiritModeOn = (doSpirit != null && doSpirit.equals("true")); //$NON-NLS-1$
- }
- }
-
- public void setServerVersion(int version)
- {
- _serverVersion = version;
- }
-
- public void setServerMinor(int minor)
- {
- _serverMinor = minor;
- }
-
- public int getServerVersion()
- {
- return _serverVersion;
- }
-
- public int getServerMinor()
- {
- return _serverMinor;
- }
-
- /**
- * Sets the ticket for this <code>DataStore</code>. A ticket is used to prevent unauthorized users
- * from accessing the <code>DataStore</code>
- *
- * @param ticket the <code>DataElement</code> representing the ticket
- */
- public void setTicket(DataElement ticket)
- {
- _ticket = ticket;
- }
-
- /**
- * Sets the loaders for this <code>DataStore</code>. The loaders are used to load miners (extension tools).
- *
- * @param loaders the loaders for the miners this <code>DataStore</code> will be using
- */
- public void setLoaders(ArrayList loaders)
- {
- _loaders = loaders;
- }
-
- /**
- * Adds a loader for this <code>DataStore</code>. The loader is used to load miners (extension tools).
- *
- * @param loader the loader for the miners this <code>DataStore</code> will be using
- */
- public void addLoader(ExternalLoader loader)
- {
- if (_loaders == null)
- {
- _loaders = new ArrayList();
- }
- _loaders.add(loader);
- }
-
-
-
- public boolean usingSSL()
- {
- if (_sslProperties != null)
- {
- return _sslProperties.usingSSL() && _sslProperties.usingServerSSL();
- }
- return false;
- }
- /**
- * Specifies the security properties of this DataStore.
- * These properties indicate whether or not to use ssl,
- * the keystore location and password.
- * @param properties
- */
- public void setSSLProperties(ISSLProperties properties)
- {
- _sslProperties = properties;
- }
-
- /*
- * Returns the location for the keystore associated with the DataStore.
- * The keystore is used when using SSL for remote communications. On the
- * host the file typically resides in the server directory. On the client,
- * the keystore location is normally customized vi <code>setKeyStoreLocation</code>.
- */
- public String getKeyStoreLocation()
- {
- if (_sslProperties != null)
- {
- return _sslProperties.getServerKeyStorePath();
- }
- return null;
- }
-
- /*
- * Returns the password to use when accessing the DataStore keystore.
- */
- public String getKeyStorePassword()
- {
- if (_sslProperties != null)
- {
- return _sslProperties.getServerKeyStorePassword();
- }
- return null;
- }
-
- /**
- * Tells the <code>DataStore</code> where to find the miners which it needs to load.
- *
- * @param minersLocation a string representing the location of the miners
- */
- public DataElement addMinersLocation(String minersLocation)
- {
- if (_minersLocations == null)
- {
- _minersLocations = new ArrayList();
- }
- if (!_minersLocations.contains(minersLocation))
- {
- _minersLocations.add(minersLocation);
-
- if (isVirtual())
- {
- DataElement location = createObject(_tempRoot, "location", minersLocation); //$NON-NLS-1$
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_ADD_MINERS);//localDescriptorQuery(_root.getDescriptor(), DataStoreSchema.C_ADD_MINERS, 1);
- ArrayList args = new ArrayList();
- args.add(location);
- return command(cmd, args, _dummy);
- }
- }
-
- return null;
- }
-
- /**
- * Tells the <code>DataStore</code> where to find the miners which it needs to load.
- *
- * @param location a <code>DataElement</code> representing the location of the miners
- */
- public void addMinersLocation(DataElement location)
- {
- String name = location.getName();
- if (_minersLocations == null)
- {
- _minersLocations = new ArrayList();
- }
-
- if (!_minersLocations.contains(name))
- {
- _minersLocations.add(name);
- }
- }
-
- /**
- * Tells the <code>DataStore</code> that it is connected to it's tools
- *
- * @param isConnected indicates whether it is connected or not
- */
- public void setConnected(boolean isConnected)
- {
- _isConnected = isConnected;
- }
-
- /**
- * Sets the <code>DataStore</code>'s DomainNotifier
- *
- * @param domainNotifier the domainNotifier
- */
- public void setDomainNotifier(DomainNotifier domainNotifier)
- {
- _domainNotifier = domainNotifier;
- }
-
- /**
- * Sets the <code>DataStore</code>'s handler for doing updates
- *
- * @param updateHandler the handler for doing updates
- */
- public void setUpdateHandler(UpdateHandler updateHandler)
- {
- _updateHandler = updateHandler;
- }
-
- /**
- * Sets the <code>DataStore</code>'s handler for sending commands to miners
- *
- * @param commandHandler the handler for sending commands to miners
- */
- public void setCommandHandler(CommandHandler commandHandler)
- {
- _commandHandler = commandHandler;
- }
-
- /**
- * Sets the time the update handler sleeps in between update requests
- *
- * @param time interval to wait
- */
- public void setUpdateWaitTime(int time)
- {
- _updateHandler.setWaitTime(time);
- }
-
- /**
- * Sets the time the command handler sleeps in between command requests
- *
- * @param time interval to wait
- */
- public void setCommandWaitTime(int time)
- {
- _commandHandler.setWaitTime(time);
- }
-
- /**
- * Sets the maximum amount of time that the <code>DataStore</code> will wait to receive a response
- * for a synchronous command
- *
- * @param time interval to wait
- */
- public void setTimeoutValue(int time)
- {
- _timeout = time;
- }
-
- public int getTimeoutValue()
- {
- return _timeout;
- }
-
-
- /**
- * Sets an attribute of the <code>DataStore</code>
- *
- * @param attribute index of the attribute to set
- * @param value value to set the attribute at the give index
- */
- public void setAttribute(int attribute, String value)
- {
- _dataStoreAttributes.setAttribute(attribute, value);
- }
-
- /**
- * Tells the <code>DataStore</code> to log durations of commands
- *
- * @param flag whether to log times or not
- */
- public void setLogTimes(boolean flag)
- {
- _logTimes = flag;
- }
-
- /**
- * Indicates whether this <code>DataStore</code> is virtual or not. A virtual <code>DataStore</code>
- * is one that does not have it's own tools, but rather communicates with a non-virtual
- * <code>DataStore</code> that does.
- *
- * @return whether the <code>DataStore</code> is virtual or not
- */
- public boolean isVirtual()
- {
- if (_commandHandler == null)
- {
- return true;
- }
- else if (_commandHandler instanceof org.eclipse.dstore.core.client.ClientCommandHandler)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Indicates whether this <code>DataStore</code> is connected to it's miners or another <code>DataStore</code>
- *
- * @return whether the <code>DataStore</code> is connected or not
- */
- public boolean isConnected()
- {
- return _isConnected;
- }
-
- /**
- * Indicates whether this <code>DataStore</code> logs the durations of commands
- *
- * @return whether the <code>DataStore</code> logs command times or not
- */
- public boolean logTimes()
- {
- return _logTimes;
- }
-
- /**
- * Returns the <code>DataStore</code>'s ticket
- *
- * @return the ticket
- */
- public DataElement getTicket()
- {
- return _ticket;
- }
-
- /**
- * Returns the time the update handler waits between requests
- *
- * @return wait time
- */
- public int getUpdateWaitTime()
- {
- return _updateHandler.getWaitTime();
- }
-
- /**
- * Returns the time the command handler waits between requests
- *
- * @return wait time
- */
- public int getCommandWaitTime()
- {
- return _commandHandler.getWaitTime();
- }
-
-
-
-
-
- /**
- * Returns the name of the <code>DataStore</code>
- *
- * @return the name of the <code>DataStore</code>
- */
- public String getName()
- {
- return getAttribute(DataStoreAttributes.A_HOST_NAME);
- }
-
- /**
- * Returns the root <code>DataElement</code> in the <code>DataStore</code>.
- * The root <code>DataElement</code> has no parent and contains every <code>DataElement</code>
- * in the <code>DataStore</code> through a <code>DataElement</code> tree
- *
- * @return the root <code>DataElement</code>
- */
- public DataElement getRoot()
- {
- return _root;
- }
-
- public DataElement getDummy()
- {
- return _dummy;
- }
-
- /**
- * Returns the host root <code>DataElement</code> in the <code>DataStore</code>.
- * The host root <code>DataElement</code> is a child of root and references
- * <code>DataElement</code>s in the <code>DataStore</code> that are related to host information
- *
- * @return the host root <code>DataElement</code>
- */
- public DataElement getHostRoot()
- {
- return _hostRoot;
- }
-
- public DataElement getExternalRoot()
- {
- return _externalRoot;
- }
-
- /**
- * Returns the miner root <code>DataElement</code> in the <code>DataStore</code>.
- * The miner root <code>DataElement</code> is a child of root and contains
- * <code>DataElement</code>s the represent tools and the information that tools possess
- *
- * @return the miner root <code>DataElement</code>
- */
- public DataElement getMinerRoot()
- {
- return _minerRoot;
- }
-
- /**
- * Returns the status of the <code>DataStore</code>.
- *
- * @return the status of the <code>DataStore</code>
- */
- public DataElement getStatus()
- {
- return _status;
- }
-
- /**
- * Returns the log root <code>DataElement</code> of the <code>DataStore</code>.
- * The log root contains all commands that are issued from the <code>DataStore</code>
- *
- * @return the log root
- */
- public DataElement getLogRoot()
- {
- return _logRoot;
- }
-
- /**
- * Returns the descriptor root <code>DataElement</code> of the <code>DataStore</code>.
- * The descriptor root contains the schema for the <code>DataStore</code> and it's tools
- *
- * @return the descriptor root
- */
- public DataElement getDescriptorRoot()
- {
- return _descriptorRoot;
- }
-
- /**
- * Returns the temp root <code>DataElement</code> of the <code>DataStore</code>.
- * The temp root contains temporary information.
- *
- * @return the temp root
- */
- public DataElement getTempRoot()
- {
- return _tempRoot;
- }
-
- /**
- * Returns the handler for sending commands.
- *
- * @return the command handler
- */
- public CommandHandler getCommandHandler()
- {
- return _commandHandler;
- }
-
- /**
- * Returns the handler for doing updates.
- *
- * @return the update handler
- */
- public UpdateHandler getUpdateHandler()
- {
- return _updateHandler;
- }
-
- /**
- * Returns the loader that is used for loading miners.
- *
- * @return the loader
- */
- public ArrayList getLoaders()
- {
- return _loaders;
- }
-
- /**
- * Returns registered local classloaders.
- */
- public ArrayList getLocalClassLoaders()
- {
- return _localClassLoaders;
- }
-
- /**
- * Registers a local class loader. On the client, each subsystem
- * must register its local class loader using this method so that
- * if the subsystem's classes cannot be found on the server, they can
- * be requested from the client, loaded using <code>loader</code>,
- * transferred to the server, and then loaded on the server.
- */
- public void registerLocalClassLoader(ClassLoader loader)
- {
- if (_localClassLoaders == null)
- {
- _localClassLoaders = new ArrayList();
- }
- if (!_localClassLoaders.contains(loader)) _localClassLoaders.add(loader);
- }
-
- public DataElement getContentsRelation()
- {
- return _dataStoreSchema.getContentsRelation();
- }
-
- public DataElement getAttributesRelation()
- {
- return _dataStoreSchema.getAttributesRelation();
- }
-
- public DataElement getAbstractedByRelation()
- {
- return _dataStoreSchema.getAbstractedByRelation();
- }
-
- public DataElement getAbstractsRelation()
- {
- return _dataStoreSchema.getAbstractsRelation();
- }
-
- /**
- * Returns the location of the miners.
- *
- * @return the location of the miners
- */
- public ArrayList getMinersLocation()
- {
- return _minersLocations;
- }
-
- /**
- * Returns the domain notifier.
- *
- * @return the domain notifier
- */
- public DomainNotifier getDomainNotifier()
- {
- return _domainNotifier;
- }
-
- /**
- * Returns the attribute indicated by an index.
- *
- * @param attribute the index of the attribute to get
- * @return the attribute
- */
- public String getAttribute(int attribute)
- {
- return _dataStoreAttributes.getAttribute(attribute);
- }
-
- /**
- * Returns the number of live elements in the <code>DataStore</code>.
- *
- * @return the number of live elements
- */
- public int getNumElements()
- {
- return _hashMap.size();
- }
-
- /**
- * Returns the number of recycled elements in the <code>DataStore</code>.
- *
- * @return the number of recycled elements
- */
- public int getNumRecycled()
- {
- return _recycled.size();
- }
- /**
- * Returns the table of live elements in the <code>DataStore</code>.
- *
- * @return the table of live elements
- */
- public HashMap getHashMap()
- {
- return _hashMap;
- }
-
- /**
- * Initializes the <code>DataStore</code> by creating the root elements
- *
- */
- public void createRoot()
- {
- _root =
- createObject(
- null,
- DataStoreResources.model_root,
- _dataStoreAttributes.getAttribute(DataStoreAttributes.A_ROOT_NAME),
- _dataStoreAttributes.getAttribute(DataStoreAttributes.A_ROOT_PATH),
- "rootID"); //$NON-NLS-1$
-
-
- _descriptorRoot = createObject(_root, DE.T_OBJECT_DESCRIPTOR, DataStoreResources.model_descriptors, "", "schemaID"); //$NON-NLS-1$ //$NON-NLS-2$
-
- _ticket = createObject(_root, DataStoreResources.model_ticket, "null", "", "ticketID"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- createRoots();
- initializeDescriptors();
- }
-
- /**
- * Creates a contents relationship between two <code>DataElement</code>s
- *
- * @param from the element that contains the other
- * @param to the element that is contained by the other
- * @return the new reference
- */
- public DataElement createReference(DataElement from, DataElement to)
- {
- // default reference is a containment relationship
- return createReference(from, to, getContentsRelation());
- }
-
- /**
- * Creates a relationship between two <code>DataElement</code>s given a type of relationship
- *
- * @param parent the element that references the other element
- * @param realObject the element that is referenced by the parent element
- * @param relationType the descriptor element that represents the type of relationship between parent and realObject
- * @return the new reference
- */
- public DataElement createReference(DataElement parent, DataElement realObject, DataElement relationType)
- {
- if (parent != null)
- {
-
- // reference with a specified type of relationship
- DataElement reference = createElement();
-
- reference.reInit(parent, realObject, relationType);
- parent.addNestedData(reference, false);
-
- String sugId = reference.getId();
- _hashMap.put(sugId, reference);
-
- refresh(parent);
-
- return reference;
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Creates a relationship between two <code>DataElement</code>s given a type of relationship
- *
- * @param parent the element that references the other element
- * @param realObject the element that is referenced by the parent element
- * @param relationType the string that represents the type of relationship between parent and realObject
- * @return the new reference
- */
- public DataElement createReference(DataElement parent, DataElement realObject, String relationType)
- {
- return createReference(parent, realObject, relationType, true);
- }
-
- /**
- * Creates a relationship between two <code>DataElement</code>s given a type of relationship
- *
- * @param parent the element that references the other element
- * @param realObject the element that is referenced by the parent element
- * @param relationType the string that represents the type of relationship between parent and realObject
- * @param doRefresh indicates whether or not to refresh the parent of the new reference
- * @return the new reference
- */
- public DataElement createReference(DataElement parent, DataElement realObject, String relationType, boolean doRefresh)
- {
- if (parent != null)
- {
- // reference with a specified type of relationship
- DataElement reference = createElement();
-
- DataElement toDescriptor = findDescriptor(DE.T_RELATION_DESCRIPTOR, relationType);
- if (toDescriptor != null)
- {
- reference.reInit(parent, realObject, toDescriptor);
- }
- else
- {
- reference.reInit(parent, realObject, relationType);
- }
-
- parent.addNestedData(reference, false);
-
- String sugId = reference.getId();
- _hashMap.put(sugId, reference);
-
- if (doRefresh)
- {
- refresh(parent);
- }
-
- return reference;
- }
- return null;
- }
-
- /**
- * Creates a set of relationships between one <code>DataElement</code> and a set of <code>DataElement</code>s given a type of relationship
- *
- * @param from the element that references the other elements
- * @param to a list of elements that from references
- * @param type the string that represents the type of relationships between from and to
- */
- public void createReferences(DataElement from, ArrayList to, String type)
- {
- DataElement toDescriptor = findDescriptor(DE.T_RELATION_DESCRIPTOR, type);
- if (toDescriptor != null)
- {
- createReferences(from, to, toDescriptor);
- }
- else
- {
- for (int i = 0; i < to.size(); i++)
- {
- DataElement toObject = (DataElement) to.get(i);
- createReference(from, toObject, type);
- }
- }
- }
-
- /**
- * Creates a set of relationships between one <code>DataElement</code> and a set of <code>DataElement</code>s given a type of relationship
- *
- * @param from the element that references the other elements
- * @param to a list of elements that from references
- * @param type the descriptor element that represents the type of relationships between from and to
- */
- public void createReferences(DataElement from, ArrayList to, DataElement type)
- {
- for (int i = 0; i < to.size(); i++)
- {
- DataElement toObject = (DataElement) to.get(i);
- createReference(from, toObject, type);
- }
- }
-
- /**
- * Creates a two-way relationship between two elements
- *
- * @param parent an element that references the other element
- * @param realObject an element that references the other element
- * @param toRelation the descriptor element that represents the type of relationship between parent and realObject
- * @param fromRelation the descriptor element that represents the type of relationship between realObject and parent
- * @return the new reference
- */
- public DataElement createReference(DataElement parent, DataElement realObject, DataElement toRelation, DataElement fromRelation)
- {
- if (parent != null)
- {
- // reference with "to" relationship
- DataElement toReference = createElement();
- toReference.reInit(parent, realObject, toRelation);
-
- parent.addNestedData(toReference, false);
-
- String toId = toReference.getId();
- _hashMap.put(toId, toReference);
-
- // reference with "from" relationship
- DataElement fromReference = createElement();
-
- fromReference.reInit(realObject, parent, fromRelation);
-
- realObject.addNestedData(fromReference, false);
-
- String fromId = fromReference.getId();
- _hashMap.put(fromId, fromReference);
- refresh(parent);
-
-
- return toReference;
- }
- return null;
- }
-
- /**
- * Creates a two-way relationship between two elements
- *
- * @param parent an element that references the other element
- * @param realObject an element that references the other element
- * @param toRelation the string that represents the type of relationship between parent and realObject
- * @param fromRelation the string that represents the type of relationship between realObject and parent
- * @return the new reference
- */
- public DataElement createReference(DataElement parent, DataElement realObject, String toRelation, String fromRelation)
- {
- if (parent != null)
- {
- // reference with "to" relationship
- DataElement toReference = createElement();
- DataElement toDescriptor = findDescriptor(DE.T_RELATION_DESCRIPTOR, toRelation);
- if (toDescriptor != null)
- {
- toReference.reInit(parent, realObject, toDescriptor);
- }
- else
- {
- toReference.reInit(parent, realObject, toRelation);
- }
-
- parent.addNestedData(toReference, false);
-
- String toId = toReference.getId();
- _hashMap.put(toId, toReference);
-
- // reference with "from" relationship
- DataElement fromReference = createElement();
-
- DataElement fromDescriptor = findDescriptor(DE.T_RELATION_DESCRIPTOR, fromRelation);
- if (fromDescriptor != null)
- {
- fromReference.reInit(realObject, parent, fromDescriptor);
- }
- else
- {
- fromReference.reInit(realObject, parent, fromRelation);
- }
-
- realObject.addNestedData(fromReference, false);
-
- String fromId = fromReference.getId();
- _hashMap.put(fromId, fromReference);
-
- refresh(parent);
-
-
- return toReference;
- }
- return null;
- }
-
- /**
- * Creates a set of two-way relationship between a <code>DataElement</code> and a list of elements
- *
- * @param from an element that references the other elements
- * @param to a list of elements that reference from
- * @param toRel the descriptor element that represents the type of relationship between from and to
- * @param fromRel the descriptor element that represents the type of relationship between to and from
- */
- public void createReferences(DataElement from, ArrayList to, DataElement toRel, DataElement fromRel)
- {
- for (int i = 0; i < to.size(); i++)
- {
- DataElement toObject = (DataElement) to.get(i);
- createReference(from, toObject, toRel, fromRel);
- }
- }
-
- /**
- * Creates a set of two-way relationship between a DataElement and a list of elements
- *
- * @param from an element that references the other elements
- * @param to a list of elements that reference from
- * @param toRel the string that represents the type of relationship between from and to
- * @param fromRel the string that represents the type of relationship between to and from
- */
- public void createReferences(DataElement from, ArrayList to, String toRel, String fromRel)
- {
- DataElement toDescriptor = findDescriptor(DE.T_RELATION_DESCRIPTOR, toRel);
- DataElement fromDescriptor = findDescriptor(DE.T_RELATION_DESCRIPTOR, fromRel);
-
- if ((toDescriptor != null) && (fromDescriptor != null))
- {
- createReferences(from, to, toDescriptor, fromDescriptor);
- }
- else
- {
- for (int i = 0; i < to.size(); i++)
- {
- DataElement toObject = (DataElement) to.get(i);
- createReference(from, toObject, toRel, fromRel);
- }
- }
- }
-
- public DataElement createTransientObject(String attributes[])
- {
- DataElement newObject = createElement();
-
- newObject.reInitAsTransient(attributes);
- return newObject;
- }
-
- /**
- * Creates a new <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param type the descriptor representing the type of the new element
- * @param name the name of the new element
- * @return the new element
- */
- public DataElement createObject(DataElement parent, DataElement type, String name)
- {
- return createObject(parent, type, name, ""); //$NON-NLS-1$
- }
-
- /**
- * Creates a new <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param type the string representing the type of the new element
- * @param name the name of the new element
- * @return the new element
- */
- public DataElement createObject(DataElement parent, String type, String name)
- {
- return createObject(parent, type, name, ""); //$NON-NLS-1$
- }
-
- /**
- * Creates a new <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param type the descriptor element representing the type of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @return the new element
- */
- public DataElement createObject(DataElement parent, DataElement type, String name, String source)
- {
- String id = generateId();
- return createObject(parent, type, name, source, id);
- }
-
- /**
- * Creates a new <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param type the string representing the type of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @return the new element
- */
- public DataElement createObject(DataElement parent, String type, String name, String source)
- {
- String id = generateId(parent, type, name);
- if (id == null)
- {
- return null;
- }
-
- return createObject(parent, type, name, source, id);
- }
-
- /**
- * Creates a new <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param type the descriptor element representing the type of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @param sugId the suggested ID for the new element
- * @return the new element
- */
- public DataElement createObject(DataElement parent, DataElement type, String name, String source, String sugId)
- {
- return createObject(parent, type, name, source, sugId, false);
- }
-
- /**
- * Creates a new <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param type the string representing the type of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @param sugId the suggested ID for the new element
- * @return the new element
- */
- public DataElement createObject(DataElement parent, String type, String name, String source, String sugId)
- {
- return createObject(parent, type, name, source, sugId, false);
- }
-
- /**
- * Creates a new <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param type the descriptor element representing the type of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @param sugId the suggested ID for the new element
- * @param isReference an indication whether the new element is a reference
- * @return the new element
- */
- public DataElement createObject(DataElement parent, DataElement type, String name, String source, String sugId, boolean isReference)
- {
- String id = makeIdUnique(sugId);
-
- DataElement newObject = createElement();
- if (parent == null)
- {
- parent = _tempRoot;
- }
-
- newObject.reInit(parent, type, id, name, source, isReference);
-
- if (parent != null)
- {
- parent.addNestedData(newObject, false);
- }
-
- _hashMap.put(id, newObject);
-
- if (_autoRefresh)
- refresh(parent);
- return newObject;
- }
-
- /**
- * Creates a new <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param type the string representing the type of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @param sugId the suggested ID for the new element
- * @param isReference an indication whether the new element is a reference
- * @return the new element
- */
- public DataElement createObject(DataElement parent, String type, String name, String source, String sugId, boolean isReference)
- {
- String id = makeIdUnique(sugId);
-
- DataElement newObject = createElement();
- if (parent == null)
- {
- parent = _tempRoot;
- }
-
-
- DataElement descriptor = findDescriptor(DE.T_OBJECT_DESCRIPTOR, type);
- if (descriptor != null && (parent != _descriptorRoot))
- {
- newObject.reInit(parent, descriptor, id, name, source, isReference);
- }
- else
- {
- newObject.reInit(parent, type, id, name, source, isReference);
- }
-
- if (parent != null)
- {
- parent.addNestedData(newObject, false);
- }
-
- _hashMap.put(id, newObject);
-
- if (_autoRefresh)
- refresh(parent);
- return newObject;
- }
-
- /**
- * Creates a new <code>DataElement</code>. This is normally called on client side via xml parser
- *
- * @param parent the parent of the new element
- * @param attributes the attributes to use in this new element
- * @return the new element
- */
- public DataElement createObject(DataElement parent, String attributes[])
- {
- DataElement newObject = createElement();
-
- if (parent == null)
- {
- parent = _tempRoot;
- }
-
- DataElement descriptor = findObjectDescriptor(attributes[DE.A_TYPE]);
-
- if (descriptor != null && (parent != _descriptorRoot))
- {
- newObject.reInit(parent, descriptor, attributes);
- }
- else
- {
- newObject.reInit(parent, attributes);
- }
-
- if (parent != null)
- {
- parent.addNestedData(newObject, false);
- }
-
- // cache descriptors in map for faster access
- if (descriptor == _dataStoreSchema.getObjectDescriptor() || descriptor == _dataStoreSchema.getAbstractObjectDescriptor())
- {
- _objDescriptorMap.put(attributes[DE.A_NAME], newObject);
- }
- else if (descriptor == _dataStoreSchema.getCommandDescriptor() || descriptor == _dataStoreSchema.getAbstractCommandDescriptor())
- {
- _cmdDescriptorMap.put(attributes[DE.A_NAME], newObject);
- }
- else if (descriptor == _dataStoreSchema.getRelationDescriptor() || descriptor == _dataStoreSchema.getAbstractRelationDescriptor())
- {
- _relDescriptorMap.put(attributes[DE.A_NAME], newObject);
- }
-
- _hashMap.put(attributes[DE.A_ID], newObject);
- return newObject;
- }
-
- /**
- * Creates a new abstract object descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @return the new descriptor element
- */
- public DataElement createAbstractObjectDescriptor(DataElement parent, String name)
- {
- DataElement descriptor = createObject(parent, DE.T_ABSTRACT_OBJECT_DESCRIPTOR, name, "org.eclipse.rse.dstore.core", name); //$NON-NLS-1$
- _objDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new abstract object descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @return the new descriptor element
- */
- public DataElement createAbstractObjectDescriptor(DataElement parent, String name, String source)
- {
- DataElement descriptor = createObject(parent, DE.T_ABSTRACT_OBJECT_DESCRIPTOR, name, source, name);
- _objDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new object descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @return the new descriptor element
- */
- public DataElement createObjectDescriptor(DataElement parent, String name)
- {
- DataElement parentDescriptor = _dataStoreSchema.getObjectDescriptor();
- DataElement descriptor = null;
- if (parentDescriptor != null)
- {
- descriptor = createObject(parent, parentDescriptor, name, "org.eclipse.rse.dstore.core", name); //$NON-NLS-1$
- }
- else
- {
- descriptor = createObject(parent, DE.T_OBJECT_DESCRIPTOR, name, "org.eclipse.rse.dstore.core", name); //$NON-NLS-1$
- }
- _objDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new object descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @param source the name of the new element
- * @return the new descriptor element
- */
- public DataElement createObjectDescriptor(DataElement parent, String name, String source)
- {
- DataElement parentDescriptor = _dataStoreSchema.getObjectDescriptor();
- DataElement descriptor = null;
- if (parentDescriptor != null)
- {
- descriptor = createObject(parent, parentDescriptor, name, source, name);
- }
- else
- {
- descriptor = createObject(parent, DE.T_OBJECT_DESCRIPTOR, name, source, name);
- }
- _objDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new abstract relation descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @return the new descriptor element
- */
- public DataElement createAbstractRelationDescriptor(DataElement parent, String name)
- {
- DataElement descriptor = createObject(parent, DE.T_ABSTRACT_RELATION_DESCRIPTOR, name, "org.eclipse.rse.dstore.core", name); //$NON-NLS-1$
- _relDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new abstract relation descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @return the new descriptor element
- */
- public DataElement createAbstractRelationDescriptor(DataElement parent, String name, String source)
- {
- DataElement descriptor = createObject(parent, DE.T_ABSTRACT_RELATION_DESCRIPTOR, name, source, name);
- _relDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new relation descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @return the new descriptor element
- */
- public DataElement createRelationDescriptor(DataElement parent, String name)
- {
- DataElement descriptor = createObject(parent, DE.T_RELATION_DESCRIPTOR, name, "org.eclipse.rse.dstore.core", name); //$NON-NLS-1$
- _relDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new relation descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @return the new descriptor element
- */
- public DataElement createRelationDescriptor(DataElement parent, String name, String source)
- {
- DataElement descriptor = createObject(parent, DE.T_RELATION_DESCRIPTOR, name, source, name);
- _relDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new abstract command descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @return the new descriptor element
- */
- public DataElement createAbstractCommandDescriptor(DataElement parent, String name)
- {
- DataElement descriptor = createAbstractCommandDescriptor(parent, name, name);
- _cmdDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new abstract command descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @param value the value used to identify the command
- * @return the new descriptor element
- */
- public DataElement createAbstractCommandDescriptor(DataElement parent, String name, String value)
- {
- DataElement cmd = createObject(parent, DE.T_ABSTRACT_COMMAND_DESCRIPTOR, name, "org.eclipse.rse.dstore.core", name); //$NON-NLS-1$
- cmd.setAttribute(DE.A_VALUE, value);
- _cmdDescriptorMap.put(value, cmd);
- return cmd;
- }
-
- /**
- * Creates a new abstract command descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @param value the value used to identify the command
- * @return the new descriptor element
- */
- public DataElement createAbstractCommandDescriptor(DataElement parent, String name, String source, String value)
- {
- DataElement cmd = createObject(parent, DE.T_ABSTRACT_COMMAND_DESCRIPTOR, name, source, name);
- cmd.setAttribute(DE.A_VALUE, value);
- _cmdDescriptorMap.put(value, cmd);
- return cmd;
- }
-
- /**
- * Creates a new command descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @return the new descriptor element
- */
- public DataElement createCommandDescriptor(DataElement parent, String name)
- {
- DataElement descriptor = createCommandDescriptor(parent, name, name);
- _cmdDescriptorMap.put(name, descriptor);
- return descriptor;
- }
-
- /**
- * Creates a new command descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @param value the value used to identify the command
- * @return the new descriptor element
- */
- public DataElement createCommandDescriptor(DataElement parent, String name, String value)
- {
- DataElement parentDescriptor = _dataStoreSchema.getCommandDescriptor();
- DataElement cmd = null;
- if (parentDescriptor != null)
- {
- cmd = createObject(parent, parentDescriptor, name, "org.eclipse.rse.dstore.core", name); //$NON-NLS-1$
- }
- else
- {
- cmd = createObject(parent, DE.T_COMMAND_DESCRIPTOR, name, "org.eclipse.rse.dstore.core", name); //$NON-NLS-1$
- }
- cmd.setAttribute(DE.A_VALUE, value);
- _cmdDescriptorMap.put(value, cmd);
- return cmd;
- }
-
- /**
- * Creates a new command descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @param value the value used to identify the command
- * @return the new descriptor element
- */
- public DataElement createCommandDescriptor(DataElement parent, String name, String source, String value)
- {
- DataElement parentDescriptor = _dataStoreSchema.getCommandDescriptor();
- DataElement cmd = null;
- if (parentDescriptor != null)
- {
- cmd = createObject(parent, parentDescriptor, name, source, name);
- }
- else
- {
- cmd = createObject(parent, DE.T_COMMAND_DESCRIPTOR, name, source, name);
- }
- cmd.setAttribute(DE.A_VALUE, value);
- _cmdDescriptorMap.put(value, cmd);
- return cmd;
- }
-
- /**
- * Creates a new command descriptor <code>DataElement</code>
- *
- * @param parent the parent of the new element
- * @param name the name of the new element
- * @param source the source location of the new element
- * @param value the value used to identify the command
- * @param visible indicates whether the command is visible or not
- * @return the new descriptor element
- */
- public DataElement createCommandDescriptor(DataElement parent, String name, String source, String value, boolean visible)
- {
- DataElement parentDescriptor = _dataStoreSchema.getCommandDescriptor();
- DataElement cmd = null;
- if (parentDescriptor != null)
- {
- cmd = createObject(parent, parentDescriptor, name, source, name);
- }
- else
- {
- cmd = createObject(parent, DE.T_COMMAND_DESCRIPTOR, name, source, name);
- }
- cmd.setAttribute(DE.A_VALUE, value);
- if (!visible)
- {
- cmd.setDepth(0);
- }
- _cmdDescriptorMap.put(value, cmd);
-
- return cmd;
- }
-
- /**
- * Moves a element from one location in the <code>DataStore</code> tree to another
- *
- * @param source the element to move
- * @param target the element to move source to
- */
- public void moveObject(DataElement source, DataElement target)
- {
- DataElement oldParent = source.getParent();
- List nested = oldParent.getNestedData();
- if (nested != null)
- {
- nested.remove(source);
- }
- refresh(oldParent, true);
-
- target.addNestedData(source, false);
- source.setParent(target);
- refresh(target, true);
- }
-
- /**
- * Deletes all the elements contained in from
- *
- * @param from the element from which to delete objects from
- */
- public void deleteObjects(DataElement from)
- {
- if (from != null)
- {
- for (int i = from.getNestedSize() - 1; i >= 0; i--)
- {
- DataElement deletee = from.get(i);
- if (deletee != null)
- {
- deleteObjectHelper(from, deletee, 5);
- }
- }
-
- // refresh(from);
- }
- }
-
- /**
- * Disconnect all the elements contained in from
- *
- * @param from the element from which to disconnect objects
- */
- public void disconnectObjects(DataElement from)
- {
- if (!isDoSpirit()) return;
- if (from != null)
- {
- for (int i = from.getNestedSize() - 1; i >= 0; i--)
- {
- DataElement disconnectee = from.get(i);
- if (disconnectee != null)
- {
- disconnectObjectHelper(disconnectee, 5);
- }
- }
-
- // refresh(from);
- }
- }
-
- /**
- * Deletes an element from another element
- *
- * @param from the element from which to delete an object from
- * @param toDelete the element to remove
- */
- public void deleteObject(DataElement from, DataElement toDelete)
- {
- if (toDelete != null)
- {
- deleteObjectHelper(from, toDelete, 5);
- // refresh(toDelete);
- // refresh(from);
- }
- }
-
- /**
- * Disconnects an element and makes it a "spirit"
- *
- * @param toDisconnect the element to disconnect
- */
- public void disconnectObject(DataElement toDisconnect)
- {
- if (!isDoSpirit()) return;
- if (toDisconnect != null)
- {
- disconnectObjectHelper(toDisconnect, 5);
- // refresh(toDisconnect);
- // refresh(from);
- }
- }
-
- /**
- * Replaces a deleted object
- */
- public DataElement replaceDeleted(DataElement deletedObject)
- {
- if (deletedObject != null)
- {
- synchronized (deletedObject)
- {
- String name = deletedObject.getName();
- String type = deletedObject.getType();
-
- // find undeleted ancestor
- DataElement parent = deletedObject.getParent();
- if ((parent != null) && parent.isDeleted())
- {
- parent = replaceDeleted(parent);
- }
- if ((parent != null) && !parent.isDeleted())
- {
- for (int i = 0; i < parent.getNestedSize(); i++)
- {
- DataElement child = parent.get(i);
- if (!child.isDeleted())
- {
- if (child.getName().equals(name) && child.getType().equals(type))
- {
- return child;
- }
- }
- }
- }
- }
- }
-
- return null;
- }
-
- /**
- * Checks if a <code>DataElement</code> with a given ID exists in the <code>DataStore</code>
- *
- * @param id the id to look for
- * @return whether it exists or not
- */
- public boolean contains(String id)
- {
- return _hashMap.containsKey(id);
- }
-
- /**
- * Refresh a set of <code>DataElement</code>s
- *
- * @param elements a list of elements to refresh
- */
- public void refresh(ArrayList elements)
- {
- // this gets called in response to a query
- for (int i = 0; i < elements.size(); i++)
- {
- refresh((DataElement) elements.get(i));
- }
- }
-
- /**
- * Refresh a <code>DataElement</code>
- *
- * @param element an element to refresh
- */
- public void refresh(DataElement element)
- {
- if (element != null)
- {
- if (element.isReference())
- {
- refresh(element.dereference(), false);
- }
- refresh(element, false);
- }
- }
-
- /**
- * Refresh a <code>DataElement</code> - immediately if indicated
- *
- * @param element an element to refresh
- * @param immediate indicates to do the refresh immediately
- */
- public void refresh(DataElement element, boolean immediate)
- {
- if ((_updateHandler != null) && (element != null))
- {
- //element = findLastUpdatedAncestor(element, 5);
-
- // update either client or ui
- //element.setUpdated(false);
- _updateHandler.update(element, immediate);
- }
- }
-
- /**
- * Refresh a <code>DataElement</code> and its children to a certain depth - immediately if indicated
- *
- * @param element an element to refresh
- * @param depth The depth to refresh the elements descendants. A depth of 0 means only the element itself
- * is refreshed; 1 means the element and its children are refreshed, 2 - it, its children, and its grandchildren,
- * etc.
- * @param immediate indicates to do the refresh immediately. If true, the update handler will send updates
- * for each refreshed element in the subtree of depth <code>depth</code> below the element.
- */
- public void refresh(DataElement element, int depth, boolean immediate)
- {
- if (depth < 0) return;
-
- if (depth == 0) refresh(element, immediate);
-
- if (depth > 0)
- {
- if (element.getNestedSize() > 0)
- {
- List children = element.getNestedData();
- for (int i = 0; i < children.size(); i++)
- {
- refresh((DataElement)children.get(i), depth-1, immediate);
- }
- }
- refresh(element, immediate);
- }
- }
-
- public void update(ArrayList objects)
- {
- // this gets called in response to a query
- for (int i = 0; i < objects.size(); i++)
- {
- update((DataElement) objects.get(i));
- }
- }
-
- public void update(DataElement dataElement)
- {
- refresh(dataElement);
- }
-
- public void updateRemoteClassInstance(IRemoteClassInstance instance, String byteStreamHandlerId)
- {
- getUpdateHandler().updateClassInstance(instance, byteStreamHandlerId);
- }
-
- /**
- * Transfers a file from a server to a client. This should only be called from
- * a miner on a different machine from the client. If a file exists on the client
- * side that the server file maps to then the existing client file will be replaced.
- *
- * @param remotePath the path of the file on the client side
- * @param bytes an array of bytes representing a file
- * @param size the number of bytes to transfer
- * @param binary indicates whether to send the bytes as binary or text
- */
- public void updateFile(String remotePath, byte[] bytes, int size, boolean binary)
- {
- updateFile(remotePath, bytes, size, binary, DataStoreResources.DEFAULT_BYTESTREAMHANDLER);
- }
-
- /**
- * Transfers a file from a server to a client. This should only be called from
- * a miner on a different machine from the client. If a file exists on the client
- * side that the server file maps to then the existing client file will be replaced.
- *
- * @param remotePath the path of the file on the client side
- * @param bytes an array of bytes representing a file
- * @param size the number of bytes to transfer
- * @param binary indicates whether to send the bytes as binary or text
- * @param byteStreamHandlerId indicates the client byte stream handler to receive the bytes
- */
- public void updateFile(String remotePath, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- remotePath = new String(remotePath.replace('\\', '/'));
- String fileName = mapToLocalPath(remotePath);
- if (fileName != null)
- {
- _updateHandler.updateFile(remotePath, bytes, size, binary, byteStreamHandlerId);
- }
- }
-
- /**
- * Transfers and appends a file from a server to a client. This should only be called from
- * a miner on a different machine from the client. If a file exists on the client
- * side that the server file maps to then the existing client file will be appended to
- *
- * @param remotePath the path of the file on the client side
- * @param bytes an array of bytes representing a file
- * @param size the number of bytes to transfer
- * @param binary indicates whether to send the bytes as binary or text
- */
- public void updateAppendFile(String remotePath, byte[] bytes, int size, boolean binary)
- {
- updateAppendFile(remotePath, bytes, size, binary, DataStoreResources.DEFAULT_BYTESTREAMHANDLER);
- }
-
- /**
- * Transfers and appends a file from a server to a client. This should only be called from
- * a miner on a different machine from the client. If a file exists on the client
- * side that the server file maps to then the existing client file will be appended to
- *
- * @param remotePath the path of the file on the client side
- * @param bytes an array of bytes representing a file
- * @param size the number of bytes to transfer
- * @param binary indicates whether to send the bytes as binary or text
- * @param byteStreamHandlerId indicates the client byte stream handler to receive the bytes
- */
- public void updateAppendFile(String remotePath, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- remotePath = new String(remotePath.replace('\\', '/'));
- String fileName = mapToLocalPath(remotePath);
- if (fileName != null)
- {
- _updateHandler.updateAppendFile(remotePath, bytes, size, binary, byteStreamHandlerId);
- }
- }
-
-
-
- /**
- * Transfers a file from a client to a server. The should only be called from
- * a client on a different machine from the server. If a file exists on the server
- * side that the client file maps to then the existing server file will be replaced.
- *
- * @param remotePath the path of the file on the server side
- * @param bytes an array of bytes representing a file
- * @param size the number of bytes to transfer
- * @param binary indicates whether to send the bytes as binary or text
- * @param byteStreamHandlerId indicates which byteStreamHandler to use to receive the bytes
- */
- public void replaceFile(String remotePath, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- remotePath = new String(remotePath.replace('\\', '/'));
-
- _commandHandler.sendFile(remotePath, bytes, size, binary, byteStreamHandlerId);
- }
-
-
- /**
- * Transfers a file from a client to a server. The should only be called from
- * a client on a different machine from the server. If a file exists on the server
- * side that the client file maps to then the existing server file will be replaced.
- *
- * @param remotePath the path of the file on the server side
- * @param bytes an array of bytes representing a file
- * @param size the number of bytes to transfer
- * @param binary indicates whether to send the bytes as binary or text
- */
- public void replaceFile(String remotePath, byte[] bytes, int size, boolean binary)
- {
- replaceFile(remotePath, bytes, size, binary, DataStoreResources.DEFAULT_BYTESTREAMHANDLER);
- }
-
- /**
- * Transfers a file from a client to a server. The should only be called from
- * a client on a different machine from the server. If a file exists on the server
- * side that the client file maps to then the existing server file will be appended to.
- *
- * @param remotePath the path of the file on the server side
- * @param bytes an array of bytes representing a file
- * @param size the number of bytes to transfer
- * @param binary indicates whether to send the bytes as binary or text
- * @param byteStreamHandlerId indicates which byte stream handler to use to receive the bytes
- */
- public void replaceAppendFile(String remotePath, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- remotePath = new String(remotePath.replace('\\', '/'));
-
- _commandHandler.sendAppendFile(remotePath, bytes, size, binary, byteStreamHandlerId);
- }
-
- /**
- * Transfers a file from a client to a server. The should only be called from
- * a client on a different machine from the server. If a file exists on the server
- * side that the client file maps to then the existing server file will be appended to.
- *
- * @param remotePath the path of the file on the server side
- * @param bytes an array of bytes representing a file
- * @param size the number of bytes to transfer
- * @param binary indicates whether to send the bytes as binary or text
- */
- public void replaceAppendFile(String remotePath, byte[] bytes, int size, boolean binary)
- {
- replaceAppendFile(remotePath, bytes, size, binary, DataStoreResources.DEFAULT_BYTESTREAMHANDLER);
- }
-
- /**
- * Makes a given client element available on the server
- *
- * @param localObject the element to transfer
- */
- public void setObject(DataElement localObject)
- {
- setObject(localObject, true);
- }
-
- /**
- * Makes a given client element available on the server
- *
- * @param localObject the element to transfer
- * @param noRef indicates whether the element is a reference or not
- */
- public void setObject(DataElement localObject, boolean noRef)
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_SET);
- //localDescriptorQuery(_root.getDescriptor(), DataStoreSchema.C_SET, 1);
- command(cmd, localObject, noRef);
- }
-
- public void modifyObject(DataElement localObject)
- {
- DataElement cmd = find(_descriptorRoot, DE.A_NAME, DataStoreResources.model_Modify, 2);
- DataElement status = _commandHandler.command(cmd, localObject, true);
- waitUntil(status, DataStoreResources.model_done);
- }
-
- /**
- * Used at <code>DataStore</code> initialization time to indicate where to point the host root
- *
- * @param localHostObject the client host element to transfer to the server site
- */
- public DataElement setHost(DataElement localHostObject)
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_SET_HOST);//localDescriptorQuery(_root.getDescriptor(), DataStoreSchema.C_SET_HOST, 1);
- DataElement status = _commandHandler.command(cmd, localHostObject, false);
- waitUntil(status, DataStoreResources.model_done);
- return status;
- }
-
- /**
- * Used at <code>DataStore</code> initialization time to setup the schema
- *
- */
- public DataElement getSchema()
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_SCHEMA);//localDescriptorQuery(_root.getDescriptor(), DataStoreSchema.C_SCHEMA, 1);
- return command(cmd, _dummy);
- }
-
- public void setPreference(String property, String value)
- {
- _dataStorePreferences.put(property, value);
- if (isVirtual())
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_SET_PREFERENCE);
- if (cmd != null)
- {
- DataElement prefObj = createObject(null, "preference", property); //$NON-NLS-1$
- prefObj.setAttribute(DE.A_VALUE, value);
- command(cmd, prefObj, true);
- }
- }
- }
-
- public String getPreference(String property)
- {
- return (String)_dataStorePreferences.get(property);
- }
-
- /**
- * Used to load and initialize a new miner on the host
- * @param minerId the qualified classname of the miner to load
- * @return the status of the activate miner command
- */
- public DataElement activateMiner(String minerId)
- {
- // check if the miner is loaded
- DataElement minerInfo = findMinerInformation(minerId);
- if (minerInfo == null)
- {
- if (isVirtual())
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_ACTIVATE_MINER);
- DataElement minerObj = createObject(null, DataStoreResources.model_miner, minerId);
- return command(cmd, minerObj, true);
- }
- else
- {
- }
- }
- return null;
- }
-
-
-
- /**
- * Used at <code>DataStore</code> initialization time to initialize the miners
- *
- * @return the status element for the initMiners command
- */
- public DataElement initMiners()
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_INIT_MINERS);//localDescriptorQuery(_root.getDescriptor(), DataStoreSchema.C_INIT_MINERS, 1);
-
- return command(cmd, _dummy);
- }
-
-
- public DataElement queryInstall()
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_QUERY_INSTALL);//localDescriptorQuery(_root.getDescriptor(), DataStoreSchema.C_QUERY_INSTALL, 1);
- return synchronizedCommand(cmd, _dummy);
- }
-
- public DataElement queryClientIP()
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_QUERY_CLIENT_IP);//localDescriptorQuery(_root.getDescriptor(), DataStoreSchema.C_QUERY_INSTALL, 1);
- return synchronizedCommand(cmd, _dummy);
- }
-
- public boolean queryServerSpiritState()
- {
- DataElement spirittype = findObjectDescriptor(IDataStoreConstants.DATASTORE_SPIRIT_DESCRIPTOR);
- if (spirittype == null) return false;
- DataElement cmd = localDescriptorQuery(spirittype, IDataStoreConstants.C_START_SPIRIT, 2);
- if (cmd == null) return false;
-
- DataElement status = synchronizedCommand(cmd, _dummy);
- if ((status != null) && status.getName().equals(DataStoreResources.model_done))
- return true;
- else return false;
- }
-
- public DataElement queryHostJVM()
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_QUERY_JVM);
- return synchronizedCommand(cmd, _dummy);
- }
-
-
- public void runRemoteClassInstance(IRemoteClassInstance runnable)
- {
- getCommandHandler().sendClassInstance(runnable, ClassByteStreamHandler.class.getName());
- }
-
- /**
- * Used at <code>DataStore</code> initialization validate access to the <code>DataStore</code>
- *
- * @param ticketStr ticket string
- * @return and indication of whether the ticket is valid or not
- */
- public boolean showTicket(String ticketStr)
- {
- DataElement ticket = createTicket(ticketStr);
- DataElement status = queryShowTicket(ticket);
-
- if (status != null)
- {
- waitUntil(status, DataStoreResources.model_done);
- }
- else
- {
- return true;
- }
-
- return ticketValid(ticket);
- }
-
- public boolean ticketValid(DataElement ticket)
- {
- return ticket.getAttribute(DE.A_VALUE).equals(DataStoreResources.model_valid);
- }
-
- public DataElement createTicket(String ticketStr)
- {
- if (ticketStr == null)
- {
- ticketStr = "null"; //$NON-NLS-1$
- }
- return createObject(_tempRoot, DataStoreResources.model_ticket, ticketStr);
- }
-
- public DataElement queryShowTicket(DataElement ticket)
- {
- DataElement cmd = findCommandDescriptor(DataStoreSchema.C_VALIDATE_TICKET);
- DataElement status = _commandHandler.command(cmd, ticket, false);
-
- if (ticket.getName().equals("null")) //$NON-NLS-1$
- {
- return null;
- }
- return status;
- }
-
- /**
- * Indicates whether a client has permission to access the <code>DataStore</code>
- *
- * @return and indication of whether the ticket is valid or not
- */
- public boolean validTicket()
- {
- if (_ticket.getAttribute(DE.A_VALUE).equals(DataStoreResources.model_valid))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
-
-
- /**
- * Wait until a given status element reached the specified state.
- * This is used for issuing synchronized commands
- *
- * @param status the status element
- * @param state the state to wait until
- */
- public void waitUntil(DataElement status, String state)
- {
- waitUntil(status, state, _timeout);
- }
-
- public boolean isWaiting(DataElement status)
- {
- return _waitingStatuses.contains(status);
- }
-
- public void stopWaiting(DataElement status)
- {
- _waitingStatuses.remove(status);
- }
-
- public void startWaiting(DataElement status)
- {
- _waitingStatuses.add(status);
- }
-
- public void waitUntil(DataElement status, String state, int timeout)
- {
- int timeToWait = 500;
- int timeWaited = 0;
- boolean timedOut = false;
- startWaiting(status);
-
- while ((status != null)
- && (_status == null || _status.getName().equals("okay")) //$NON-NLS-1$
- && !status.getName().equals(state)
- && !status.getValue().equals(state)
- && !status.getName().equals(DataStoreResources.model_incomplete)
- && !timedOut)
- {
- if ((timeout != -1) && (timeWaited > timeout))
- {
- // waited too long!
- timedOut = true;
- }
-
- status.waitForUpdate(timeToWait);
-
-
- timeWaited += timeToWait;
-
- if (!isWaiting(status))
- {
- // stopped waiting
- return;
- }
- }
-
- stopWaiting(status);
-
- if (timedOut)
- {
- if (status != null)
- status.setAttribute(DE.A_NAME, DataStoreResources.model_timeout);
- }
-
- }
-
- public void cleanBadReferences(DataElement root)
- {
- }
-
- /**
- * Tells the command handler to cancel all pending commands.
- */
- public void cancelAllCommands()
- {
- _commandHandler.cancelAllCommands();
- }
-
- /**
- * Creates and issues a synchronized command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param dataObject the subject of the command
- * @return the status of the command
- */
- public DataElement synchronizedCommand(DataElement commandDescriptor, DataElement dataObject)
- {
- return synchronizedCommand(commandDescriptor, dataObject, false);
- }
-
- /**
- * Creates and issues a synchronized command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param dataObject the subject of the command
- * @param noRef and indication of whether the subject should be referenced or not
- * @return the status of the command
- */
- public DataElement synchronizedCommand(DataElement commandDescriptor, DataElement dataObject, boolean noRef)
- {
- DataElement status = command(commandDescriptor, dataObject, noRef, true);
- waitUntil(status, DataStoreResources.model_done);
-
- return status;
- }
-
- /**
- * Creates and issues a synchronized command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param arguments the arguments for the command
- * @param dataObject the subject of the command
- * @return the status of the command
- */
- public DataElement synchronizedCommand(DataElement commandDescriptor, ArrayList arguments, DataElement dataObject)
- {
- DataElement status = command(commandDescriptor, arguments, dataObject, true);
- waitUntil(status, DataStoreResources.model_done);
-
- return status;
- }
-
- /**
- * Creates and issues a command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param arguments the arguments for the command
- * @param dataObject the subject of the command
- * @return the status of the command
- */
- public DataElement command(DataElement commandDescriptor, ArrayList arguments, DataElement dataObject)
- {
- return command(commandDescriptor, arguments, dataObject, false);
- }
-
- /**
- * Creates and issues a command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param arguments the arguments for the command
- * @param dataObject the subject of the command
- * @param immediate indicates whether the command should be placed first on the request queue
- * @return the status of the command
- */
- public DataElement command(DataElement commandDescriptor, ArrayList arguments, DataElement dataObject, boolean immediate)
- {
- if (_commandHandler != null)
- {
- return _commandHandler.command(commandDescriptor, arguments, dataObject, true, immediate);
- }
- return null;
- }
-
- /**
- * Creates and issues a command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param arg an argument for the command
- * @param dataObject the subject of the command
- * @return the status of the command
- */
- public DataElement command(DataElement commandDescriptor, DataElement arg, DataElement dataObject)
- {
- return command(commandDescriptor, arg, dataObject, false);
- }
-
- /**
- * Creates and issues a command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param arg an argument for the command
- * @param dataObject the subject of the command
- * @param immediate indicates whether the command should be placed first on the request queue
- * @return the status of the command
- */
- public DataElement command(DataElement commandDescriptor, DataElement arg, DataElement dataObject, boolean immediate)
- {
- if (_commandHandler != null)
- {
- return _commandHandler.command(commandDescriptor, arg, dataObject, true, immediate);
- }
- return null;
- }
-
- /**
- * Creates and issues a command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param dataObject the subject of the command
- * @return the status of the command
- */
- public DataElement command(DataElement commandDescriptor, DataElement dataObject)
- {
- return command(commandDescriptor, dataObject, false);
- }
-
- /**
- * Creates and issues a command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param dataObject the subject of the command
- * @param noRef an indication of whether to reference the subject or not
- * @return the status of the command
- */
- public DataElement command(DataElement commandDescriptor, DataElement dataObject, boolean noRef)
- {
- return command(commandDescriptor, dataObject, noRef, false);
- }
-
- /**
- * Creates and issues a command.
- *
- * @param commandDescriptor the comamnd descriptor for the command
- * @param dataObject the subject of the command
- * @param noRef an indication of whether to reference the subject or not
- * @param immediate an indication of whether
- * @return the status of the command
- */
- public DataElement command(DataElement commandDescriptor, DataElement dataObject, boolean noRef, boolean immediate)
- {
- if (_commandHandler != null)
- {
- return _commandHandler.command(commandDescriptor, dataObject, !noRef);
- }
-
- return null;
- }
-
- /**
- * Issues a command.
- *
- * @param commandObject an instance of a command
- * @return the status of the command
- */
- public DataElement command(DataElement commandObject)
- {
- return _commandHandler.command(commandObject);
- }
-
- /**
- * Delete information from the <code>DataStore</code>.
- *
- */
- public void flush()
- {
- // flush the whole thing
- flush(_logRoot);
- flush(_hostRoot);
- flush(_minerRoot);
- flush(_tempRoot);
- }
-
- /**
- * Delete information from the <code>DataStore</code> contained by an element.
- *
- * @param element the element from which to delete
- */
- public void flush(DataElement element)
- {
- if (element != null)
- {
- deleteObjects(element);
- }
- }
-
- /**
- * Find a command descriptor element in the schema with the given value.
- *
- * @param object the object descriptor representing the type of object that can issue such a command
- * @param keyName the value of the command to search for
- * @return the command descriptor for the specified command
- */
- public DataElement localDescriptorQuery(DataElement object, String keyName)
- {
- return localDescriptorQuery(object, keyName, 5);
- }
-
- /**
- * Find a command descriptor element in the schema with the given value.
- *
- * @param descriptor the object descriptor representing the type of object that can issue such a command
- * @param keyName the value of the command to search for
- * @param depth the depth of abstraction to search
- * @return the command descriptor for the specified command
- */
- public DataElement localDescriptorQuery(DataElement descriptor, String keyName, int depth)
- {
- if ((descriptor != null) && (depth > 0))
- {
- for (int i = 0; i < descriptor.getNestedSize(); i++)
- {
- DataElement subDescriptor = descriptor.get(i).dereference();
- String type = subDescriptor.getType();
- if (type == null)
- {
- }
- else if (type.equals(DE.T_COMMAND_DESCRIPTOR))
- {
- if (keyName.equals(subDescriptor.getValue()))
- return subDescriptor;
- }
- else if (type.equals(DE.T_ABSTRACT_COMMAND_DESCRIPTOR))
- {
- DataElement result = localDescriptorQuery(subDescriptor, keyName, depth - 1);
- if (result != null)
- return result;
- }
- }
-
- DataElement abstractedBy = getAbstractedByRelation();
- List abstractDescriptors = descriptor.getAssociated(abstractedBy);
- int numInherited = abstractDescriptors.size();
-
- for (int j = 0; j < numInherited; j++)
- {
- DataElement abstractDescriptor = (DataElement) abstractDescriptors.get(j);
-
- DataElement result = localDescriptorQuery(abstractDescriptor, keyName, depth - 1);
- if (result != null)
- {
- return result;
- }
- }
- }
-
- return null;
- }
-
- public void addToRecycled(DataElement toRecycle)
- {
- if (!_recycled.contains(toRecycle)) _recycled.add(0, toRecycle);
- }
-
- /**
- * Finds the element that represents the miner that implements a particular command.
- *
- * @param commandDescriptor a command descriptor
- * @return the element representing a miner
- */
- public DataElement getMinerFor(DataElement commandDescriptor)
- {
- String minerName = commandDescriptor.getSource();
- DataElement theMinerElement = find(_minerRoot, DE.A_NAME, minerName, 1);
- return theMinerElement;
- }
-
- /**
- * Finds all the elements that are of a given type from a specified element.
- *
- * @param root where to search from
- * @param type the descriptor representing the type of the objects to search for
- * @return a list of elements
- */
- public List findObjectsOfType(DataElement root, DataElement type)
- {
- ArrayList results = new ArrayList();
- List searchList = root.getAssociated(getContentsRelation());
- if (searchList != null)
- {
- for (int i = 0; i < searchList.size(); i++)
- {
- DataElement child = (DataElement) searchList.get(i);
- if (child.isOfType(type))
- {
- results.add(child);
- }
-
- List subResults = findObjectsOfType(child, type);
- for (int j = 0; j < subResults.size(); j++)
- {
- results.add(subResults.get(j));
- }
- }
- }
-
- return results;
- }
-
- /**
- * Finds all the elements that are of a given type from a specified element.
- *
- * @param root where to search from
- * @param type the descriptor representing the type of the objects to search for
- * @return a list of elements
- */
- public List findObjectsOfType(DataElement root, String type)
- {
- ArrayList results = new ArrayList();
- List searchList = root.getAssociated(getContentsRelation());
- if (searchList != null)
- {
- for (int i = 0; i < searchList.size(); i++)
- {
- DataElement child = (DataElement) searchList.get(i);
- if (child.getType().equals(type) || child.isOfType(type))
- {
- results.add(child);
- }
-
- List subResults = findObjectsOfType(child, type);
- for (int j = 0; j < subResults.size(); j++)
- {
- results.add(subResults.get(j));
- }
- }
- }
-
- return results;
- }
-
- /**
- * Finds all the deleted elements
- *
- * @param root where to search from
- * @return a list of elements
- */
- public synchronized List findDeleted(DataElement root)
- {
- return findDeleted(root, 10);
- }
-
- /**
- * Finds all the deleted elements
- *
- * @param root where to search from
- * @param type the descriptor representing the type of the objects to search for
- * @return a list of elements
- */
- public synchronized List findDeleted(DataElement root, int depth)
- {
- ArrayList results = new ArrayList();
- synchronized (root)
- {
- if (root != null && root.getDataStore() == this)
- {
- if (results.contains(root))
- {
- return results;
- }
-
- if (root.isDeleted())
- {
- results.add(root);
- }
-
-
- List searchList = root.getNestedData();
-
- if (searchList != null)
- {
- for (int i = 0; i < searchList.size(); i++)
- {
- DataElement child = (DataElement) searchList.get(i);
- if (child != null)
- {
- synchronized (child)
- {
- if (child.isDeleted() && !results.contains(child))
- {
-
- results.add(child);
- if (!child.isReference())
- {
- if (depth > 0)
- {
- List sResults = findDeleted(child, depth - 1);
- for (int j = 0; j < sResults.size(); j++)
- {
- results.add(sResults.get(j));
- }
- }
-
- }
- }
- }
- }
- }
- }
- }
- }
- return results;
- }
-
- /**
- * Finds all relationship descriptor types that can be applied to a particular element.
- *
- * @param descriptor the object descriptor that uses relationships
- * @param fixateOn a filter for the type of relationships to look for
- * @return a list of relationship descriptor elements
- */
- public ArrayList getRelationItems(DataElement descriptor, String fixateOn)
- {
- ArrayList result = new ArrayList();
- if (descriptor != null)
- {
- // contained relationships
- for (int i = 0; i < descriptor.getNestedSize(); i++)
- {
- DataElement object = descriptor.get(i).dereference();
-
- String objType = (String) object.getElementProperty(DE.P_TYPE);
- if (objType.equals(DE.T_RELATION_DESCRIPTOR) || objType.equals(DE.T_ABSTRACT_RELATION_DESCRIPTOR))
- {
- if (fixateOn != null)
- {
- String objName = (String) object.getElementProperty(DE.P_NAME);
- if (objName.equals(fixateOn))
- {
- if (!result.contains(object))
- result.add(object);
- }
- }
- else
- {
- if (!result.contains(object))
- result.add(object);
- }
- }
- }
-
- // abstracted relationships
- List baseDescriptors = descriptor.getAssociated(getAbstractedByRelation());
- for (int j = 0; j < baseDescriptors.size(); j++)
- {
-
- DataElement baseDescriptor = (DataElement) baseDescriptors.get(j);
- ArrayList baseRelations = getRelationItems(baseDescriptor, fixateOn);
- for (int k = 0; k < baseRelations.size(); k++)
- {
- DataElement relation = (DataElement) baseRelations.get(k);
- if (!result.contains(relation))
- {
- result.add(relation);
- }
- }
- }
- }
-
- return result;
- }
-
-
-
- /**
- * Find all elements from a given element that match a certain attribute.
- *
- * @param root the element to search from
- * @param attribute the index of the attribute to match
- * @param pattern the value to compare with the attribute
- * @param ignoreCase an indication whether to ignore case for the attribute or not
- * @return the list of matches
- */
- public ArrayList searchForPattern(DataElement root, int attribute, String pattern, boolean ignoreCase)
- {
- int attributes[] = { attribute };
- String patterns[] = { pattern };
- return searchForPattern(root, attributes, patterns, 1, ignoreCase);
- }
-
- /**
- * Find all elements from a given element that match a certain set of attributes.
- *
- * @param root the element to search from
- * @param attributes a list of attributes to match
- * @param patterns a list of values to compare with the attributes
- * @param ignoreCase an indication whether to ignore case for the attributes or not
- * @return the list of matches
- */
- public ArrayList searchForPattern(DataElement root, ArrayList attributes, ArrayList patterns, boolean ignoreCase)
- {
- int att[] = new int[attributes.size()];
- String ptn[] = new String[attributes.size()];
- for (int i = 0; i < attributes.size(); i++)
- {
- att[i] = ((Integer) attributes.get(i)).intValue();
- ptn[i] = (String) (patterns.get(i));
- }
-
- return searchForPattern(root, att, ptn, attributes.size(), ignoreCase);
- }
-
- /**
- * Find all elements from a given element that match a certain set of attributes.
- *
- * @param root the element to search from
- * @param attributes a list of attribute indexes to match
- * @param patterns a list of values to compare with the attributes
- * @param numAttributes the number of attributes to match
- * @param ignoreCase an indication whether to ignore case for the attributes or not
- * @return the list of matches
- */
- public ArrayList searchForPattern(DataElement root, int attributes[], String patterns[], int numAttributes, boolean ignoreCase)
- {
- return searchForPattern(root, attributes, patterns, numAttributes, ignoreCase, 1);
- }
-
- /**
- * Find all elements from a given element that match a certain set of attributes.
- *
- * @param root the element to search from
- * @param attributes a list of attribute indexes to match
- * @param patterns a list of values to compare with the attributes
- * @param numAttributes the number of attributes to match
- * @param ignoreCase an indication whether to ignore case for the attributes or not
- * @param depth how deep to search
- * @return the list of matches
- */
- public ArrayList searchForPattern(DataElement root, int attributes[], String patterns[], int numAttributes, boolean ignoreCase, int depth)
- {
- ArrayList searched = new ArrayList();
- return searchForPattern(root, attributes, patterns, numAttributes, ignoreCase, depth, searched);
- }
-
- /**
- * Find all elements from a given element that match a certain set of attributes.
- *
- * @param root the element to search from
- * @param attributes a list of attribute indexes to match
- * @param patterns a list of values to compare with the attributes
- * @param numAttributes the number of attributes to match
- * @param ignoreCase an indication whether to ignore case for the attributes or not
- * @param depth how deep to search
- * @param searched a list of objects already searched
- * @return the list of matches
- */
- public ArrayList searchForPattern(DataElement root, int attributes[], String patterns[], int numAttributes, boolean ignoreCase, int depth, ArrayList searched)
- {
- ArrayList result = new ArrayList();
- if (depth > 0)
- {
- for (int i = 0; i < root.getNestedSize(); i++)
- {
- DataElement child = root.get(i);
- child = child.dereference();
- if ((child != null) && !searched.contains(child))
- {
- searched.add(child);
- if (child.patternMatch(attributes, patterns, numAttributes, ignoreCase))
- {
- result.add(child);
- }
-
- ArrayList subResults = searchForPattern(child, attributes, patterns, numAttributes, ignoreCase, depth - 1, searched);
- for (int j = 0; j < subResults.size(); j++)
- {
- result.add(subResults.get(j));
- }
- }
- }
- }
-
- return result;
- }
-
- /**
- * Returns the element that represents the specified miner's data.
- *
- * @param minerName the qualified name of the miner
- * @return the element representing the miner information
- */
- public DataElement findMinerInformation(String minerName)
- {
- DataElement information = null;
- DataElement minerElement = find(_minerRoot, DE.A_NAME, minerName, 1);
- if (minerElement != null)
- {
- information = find(minerElement, DE.A_TYPE, DataStoreResources.model_data, 1);
- }
-
- return information;
- }
-
- /**
- * Finds a descriptor element with a specified type and name.
- *
- * @param type the type of the descriptor
- * @param name the name of the descriptor
- * @return the found descriptor
- */
- public DataElement findDescriptor(String type, String name)
- {
- if (_descriptorRoot != null)
- {
- synchronized (_descriptorRoot)
- {
- if (type.equals(DE.T_OBJECT_DESCRIPTOR))
- {
- return (DataElement)_objDescriptorMap.get(name);
- }
- else if (type.equals(DE.T_COMMAND_DESCRIPTOR))
- {
- return (DataElement)_cmdDescriptorMap.get(name);
-
- }
- else if (type.equals(DE.T_RELATION_DESCRIPTOR))
- {
- return (DataElement)_relDescriptorMap.get(name);
- }
- else
- {
- for (int i = 0; i < _descriptorRoot.getNestedSize(); i++)
- {
- DataElement descriptor = _descriptorRoot.get(i);
-
- if (descriptor.getName().equals(name) && descriptor.getType().equals(type))
- {
- return descriptor;
- }
- }
- }
- }
- }
-
- return null;
- }
-
- /**
- * Finds an object descriptor element with a specified name.
- *
- * @param name the name of the descriptor
- * @return the found descriptor
- */
- public DataElement findObjectDescriptor(String name)
- {
- return (DataElement)_objDescriptorMap.get(name);
- }
-
- /**
- * Finds an relation descriptor element with a specified name.
- *
- * @param name the name of the descriptor
- * @return the found descriptor
- */
- public DataElement findRelationDescriptor(String name)
- {
- return (DataElement)_relDescriptorMap.get(name);
- }
-
- /**
- * Finds an command descriptor element with a specified name.
- *
- * @param name the name of the descriptor
- * @return the found descriptor
- */
- public DataElement findCommandDescriptor(String name)
- {
- return (DataElement)_cmdDescriptorMap.get(name);
- }
-
- /**
- * Finds an element with the specified ID.
- *
- * @param id the ID of the descriptor
- * @return the found element
- */
- public DataElement find(String id)
- {
- DataElement result = (DataElement) _hashMap.get(id);
- return result;
- }
-
- /**
- * Finds an element matching a specified attribute and name.
- *
- * @param root the element to search from
- * @param attribute the index of the attribute to compare
- * @param name the name of the element
- * @return the first found element
- */
- public DataElement find(DataElement root, int attribute, String name)
- {
- return find(root, attribute, name, 10);
- }
-
- /**
- * Finds an element matching a specified attribute and name.
- *
- * @param root the element to search from
- * @param attribute the index of the attribute to compare
- * @param name the name of the element
- * @param depth the depth of the search
- * @return the first found element
- */
- public DataElement find(DataElement root, int attribute, String name, int depth)
- {
- if ((root != null) && (name != null) && !root.isReference() && depth > 0)
- {
-
- if (StringCompare.compare(name, root.getAttribute(attribute), false))
- {
- return root;
- }
- else if (depth > 0)
- {
- for (int h = 0; h < root.getNestedSize(); h++)
- {
- DataElement nestedObject = root.get(h);
- String compareName = nestedObject.getAttribute(attribute);
-
- if (!nestedObject.isReference() && (compareName != null))
- {
-
- if (name.compareTo(compareName) == 0)
- {
- return nestedObject;
- }
- else
- {
- DataElement foundObject = find(nestedObject, attribute, name, depth - 1);
- if (foundObject != null)
- {
- return foundObject;
- }
- }
- }
- }
- }
- }
-
- return null;
- }
-
- /**
- * Get the mapping from a remote path to a local path.
- *
- * @param aPath the remote path
- * @return the local path
- */
- public String mapToLocalPath(String aPath)
- {
- /*
- String result = null;
-
- char slash = '/';
- String remotePath = aPath.replace('\\', slash);
- String localRoot = _dataStoreAttributes.getAttribute(DataStoreAttributes.A_LOCAL_PATH).replace('\\', slash);
- String remoteRoot = getHostRoot().getSource().replace('\\', slash);
-
- if (localRoot.equals(remoteRoot))
- {
- result = remotePath;
- }
- else if (remotePath.startsWith(localRoot))
- {
- result = remotePath;
- }
- else if (remotePath.startsWith(remoteRoot))
- {
- result = new String(localRoot + slash + remotePath.substring(remoteRoot.length(), remotePath.length()));
- }
- else
- {
- // file is outside of scope
- // create temporary location
- int indexOfDrive = remotePath.indexOf(":");
- if (indexOfDrive > 0)
- {
- remotePath = remotePath.substring(indexOfDrive + 1, remotePath.length());
- }
-
- result = new String(localRoot + remotePath);
- }
-
- return result;
- */
-
- // no more mapping here - expect actual paths
- return aPath;
- }
-
- /**
- * Persist the <code>DataStore</code> tree from a given root
- *
- * @param root the element to persist from
- * @param remotePath the path where the persisted file should be saved
- * @param depth the depth of persistence from the root
- */
- public void saveFile(DataElement root, String remotePath, int depth)
- {
- remotePath = new String(remotePath.replace('\\', '/'));
- String fileName = mapToLocalPath(remotePath);
- try
- {
- // need to create directories as well
- File file = new File(fileName);
- try
- {
- file = file.getCanonicalFile();
- }
- catch (IOException e)
- {
- }
-
- if (!file.exists())
- {
- File dir = new File(file.getParent());
- dir.mkdirs();
- file.createNewFile();
- }
-
- File newFile = new File(file.getCanonicalPath());
-
- if (newFile.canWrite())
- {
- FileOutputStream fileStream = new FileOutputStream(newFile);
- PrintStream fileWriter = new PrintStream(fileStream);
- BufferedWriter dataWriter = new BufferedWriter(new OutputStreamWriter(fileStream, DE.ENCODING_UTF_8));
-
- XMLgenerator generator = new XMLgenerator(this);
- generator.setIgnoreDeleted(true);
- generator.setFileWriter(fileWriter);
- generator.setDataWriter(dataWriter);
- generator.setBufferSize(1000);
- generator.generate(root, depth);
- generator.flushData();
-
- fileStream.close();
- }
- }
- catch (IOException e)
- {
- System.out.println(e);
- }
- }
-
- /**
- * Save a file in the specified location
- *
- * @param remotePath the path where to save the file
- * @param buffer the buffer to save in the file
- */
- public void saveFile(String remotePath, byte[] buffer, int size, boolean binary)
- {
- getDefaultByteStreamHandler().receiveBytes(remotePath, buffer, size, binary);
- }
-
- /**
- * Save a file in the specified location
- *
- * @param remotePath the path where to save the file
- * @param buffer the buffer to save in the file
- * @param byteStreamHandlerId indicates which byte stream handler to receive the bytes
- */
- public void saveFile(String remotePath, byte[] buffer, int size, boolean binary, String byteStreamHandlerId)
- {
-
- getByteStreamHandler(byteStreamHandlerId).receiveBytes(remotePath, buffer, size, binary);
- }
-
- /**
- * Saves a class to memory (but not to disk) where it can then be loaded by
- * the RemoteClassLoaders. The class will be saved in a new thread, so this method
- * will potentially return before the class has been saved.
- *
- * @param className the fully qualified name of the class
- * @param buffer the contents of the class
- * @param size the size of the buffer
- */
- public void saveClass(String className, byte[] buffer, int size)
- {
- getDefaultClassByteStreamHandler().receiveBytes(className, buffer, size);
- }
-
-
- /**
- * Saves a class instance
- *
- * @param className the fully qualified name of the class
- * @param buffer the contents of the class
- * @param size the size of the buffer
- */
- public void saveClassInstance(byte[] buffer, int size, String classbyteStreamHandlerId)
- {
- getDefaultClassByteStreamHandler().receiveInstanceBytes(buffer, size);
- }
-
-
- /**
- * Saves a class to memory (but not to disk) where it can then be loaded by
- * the RemoteClassLoaders. The class will be saved in a new thread, so this method
- * will potentially return before the class has been saved.
- *
- * @param className the fully qualified name of the class
- * @param buffer the contents of the class
- * @param size the size of the buffer
- * @param classbyteStreamHandlerId indicates which class byte stream handler to receive the bytes
- */
- public void saveClass(String className, byte[] buffer, int size, String classbyteStreamHandlerId)
- {
- getClassByteStreamHandler(classbyteStreamHandlerId).receiveBytes(className, buffer, size);
- }
-
- /**
- * Append a file to the specified location
- *
- * @param remotePath the path where to save the file
- * @param buffer the buffer to append into the file
- */
- public void appendToFile(String remotePath, byte[] buffer, int size, boolean binary)
- {
- getDefaultByteStreamHandler().receiveAppendedBytes(remotePath, buffer, size, binary);
- }
-
- /**
- * Append a file to the specified location
- *
- * @param remotePath the path where to save the file
- * @param buffer the buffer to append into the file
- * @param byteStreamHandlerId indicates which byte stream handler to receive the bytes
- */
- public void appendToFile(String remotePath, byte[] buffer, int size, boolean binary, String byteStreamHandlerId)
- {
- getByteStreamHandler(byteStreamHandlerId).receiveAppendedBytes(remotePath, buffer, size, binary);
- }
-
- /**
- * Load a persisted <code>DataStore</code> tree into the specified <code>DataElement</code>
- *
- * @param root the root element of the persisted tree
- * @param pathName the location of the persisted file
- */
- public void load(DataElement root, String pathName)
- {
- String fileName = pathName;
-
- FileInputStream inFile = loadFile(fileName);
- if (inFile != null)
- {
- BufferedInputStream document = new BufferedInputStream(inFile);
- try
- {
- XMLparser parser = new XMLparser(this);
- DataElement subRoot = parser.parseDocument(document, null);
- if (subRoot != null)
- {
- root.removeNestedData();
- List nestedData = subRoot.getNestedData();
- if (nestedData != null)
- {
- root.addNestedData(nestedData, true);
- }
- refresh(root);
- }
- }
- catch (IOException e)
- {
- }
- }
-
- }
-
- public static FileInputStream loadFile(String fileName)
- {
- File file = new File(fileName);
- if (file.exists() && (file.length() > 0))
- {
- try
- {
- FileInputStream inFile = new FileInputStream(file);
-
- return inFile;
- }
- catch (FileNotFoundException e)
- {
- return null;
- }
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Indicate whether a given descriptor can contain the specified element
- *
- * @param descriptor the object descriptor to test
- * @param dataElement the object to test against
- * @return and indication whether dataElement can be in an object of type descriptor
- */
- public boolean filter(DataElement descriptor, DataElement dataElement)
- {
- return filter(descriptor, dataElement, 2);
- }
-
- /**
- * Indicate whether a given descriptor can contain the specified element
- *
- * @param descriptor the object descriptor to test
- * @param dataElement the object to test against
- * @param depth how far to search
- * @return and indication whether dataElement can be in an object of type descriptor
- */
- public boolean filter(DataElement descriptor, DataElement dataElement, int depth)
- {
- if (depth > 0)
- {
- depth--;
-
- String dataType = (String) dataElement.getElementProperty(DE.P_TYPE);
- String typeStr = (String) descriptor.getElementProperty(DE.P_NAME);
-
- if (((dataType != null) && (typeStr != null)) && (dataType.equals(typeStr) || typeStr.equals(DataStoreResources.model_all)))
- {
- return true;
- }
- else
- {
- for (int i = 0; i < descriptor.getNestedSize(); i++)
- {
- if (filter(descriptor.get(i), dataElement, depth))
- {
- return true;
- }
- }
-
- return false;
- }
- }
-
- return false;
- }
-
- /**
- * Indicate whether a given set of descriptors can contain the specified element
- *
- * @param descriptors the object descriptors to test
- * @param dataElement the object to test against
- * @return and indication whether dataElement can be in an object of type descriptor
- */
- public boolean filter(ArrayList descriptors, DataElement dataElement)
- {
- for (int i = 0; i < descriptors.size(); i++)
- {
- if (filter((DataElement) descriptors.get(i), dataElement))
- {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Indicate whether an command is specified as transient
- *
- * @param commandObject the object descriptors to test
- * @return and indication whether the command is transient
- */
- public boolean isTransient(DataElement commandObject)
- {
- boolean isTransient = false;
- DataElement subject = commandObject.get(0);
-
- DataElement subjectDescriptor = subject.getDescriptor();
- if (subjectDescriptor != null)
- {
- DataElement minerElement = getMinerFor(commandObject);
- DataElement transientObjects = find(minerElement, DE.A_TYPE, DataStoreResources.model_transient, 1);
- if (transientObjects != null)
- {
- for (int i = 0; i < transientObjects.getNestedSize(); i++)
- {
- DataElement transientDescriptor = transientObjects.get(i).dereference();
- if (transientDescriptor == subjectDescriptor)
- {
- isTransient = true;
- }
- }
- }
- }
-
- return isTransient;
- }
-
- private void initializeDescriptors()
- {
- _dataStoreSchema.extendSchema(_descriptorRoot);
- }
-
- public void enableAutoRefresh(boolean flag)
- {
- _autoRefresh = flag;
- }
-
- public boolean isAutoRefreshOn()
- {
- return _autoRefresh;
- }
- /**
- * getUserPreferencesDirectory() - returns directory on IFS where to store user settings
- */
- public String getUserPreferencesDirectory()
- {
- if (_userPreferencesDirectory == null) {
-
- _userPreferencesDirectory = System.getProperty("user.home"); //$NON-NLS-1$
-
- String clientUserID = System.getProperty("client.username"); //$NON-NLS-1$
- if (clientUserID == null || clientUserID.equals("")) //$NON-NLS-1$
- {
- clientUserID = ""; //$NON-NLS-1$
- }
- else
- {
- clientUserID += File.separator;
- }
-
- // append a '/' if not there
- if ( _userPreferencesDirectory.length() == 0 ||
- _userPreferencesDirectory.charAt( _userPreferencesDirectory.length() -1 ) != File.separatorChar ) {
-
- _userPreferencesDirectory = _userPreferencesDirectory + File.separator;
- }
-
- _userPreferencesDirectory = _userPreferencesDirectory + ".eclipse" + File.separator + //$NON-NLS-1$
- "RSE" + File.separator + clientUserID; //$NON-NLS-1$
- File dirFile = new File(_userPreferencesDirectory);
- if (!dirFile.exists()) {
- dirFile.mkdirs();
- }
- }
- return _userPreferencesDirectory;
- }
-
- private void initialize()
- {
- _lastCreatedElements = new ArrayList();
- _minersLocations = new ArrayList();
-
- _random = new Random(System.currentTimeMillis());
-
- _objDescriptorMap = new HashMap(100);
- _cmdDescriptorMap = new HashMap(100);
- _relDescriptorMap = new HashMap(100);
- _dataStorePreferences = new HashMap(10);
-
- _hashMap = new HashMap(2 * _initialSize);
- _recycled = new ArrayList(_initialSize);
- initElements(_initialSize);
-
- _timeout = 20000;
- _autoRefresh = false;//true;
-
-
- _dataStoreSchema = new DataStoreSchema(this);
-
- String tracingProperty = System.getProperty("DSTORE_TRACING_ON"); //$NON-NLS-1$
- if (tracingProperty != null && tracingProperty.equals("true")) //$NON-NLS-1$
- {
- _tracingOn = true;
- }
- else
- {
- _tracingOn = false;
- }
- if (_tracingOn)
- {
- String logDir = getUserPreferencesDirectory();
- _traceFileHandle = new File(logDir, ".dstoreTrace"); //$NON-NLS-1$
-
- try
- {
- _traceFile = new RandomAccessFile(_traceFileHandle, "rw"); //$NON-NLS-1$
- startTracing();
- }
- catch (IOException e)
- {
- }
- }
-
- //_remoteClassLoader = new RemoteClassLoader(this);
- _classReqRepository = new HashMap();
-
- _waitingStatuses = new ArrayList();
-
- _byteStreamHandlerRegistry = new ByteStreamHandlerRegistry();
- _classbyteStreamHandlerRegistry = new ClassByteStreamHandlerRegistry();
- setDefaultByteStreamHandler();
- setDefaultClassByteStreamHandler();
-
- assignCacheJar();
-
- registerLocalClassLoader(this.getClass().getClassLoader());
- }
-
- public void startDataElementRemoverThread()
- {
- if (!isVirtual() && _deRemover == null)
- {
- String memLogging = System.getProperty("DSTORE_MEMLOGGING_ON"); //$NON-NLS-1$
- _memLoggingOn = (memLogging != null && memLogging.equals("true")); //$NON-NLS-1$
-
- if (_memLoggingOn)
- {
- String logDir = getUserPreferencesDirectory();
- _memLoggingFileHandle = new File(logDir, ".dstoreMemLogging"); //$NON-NLS-1$
-
- try
- {
- _memLogFile = new RandomAccessFile(_memLoggingFileHandle, "rw"); //$NON-NLS-1$
- startMemLogging();
- }
- catch (IOException e)
- {
- }
- }
- _deRemover = new DataElementRemover(this);
- _deRemover.start();
- }
- }
-
- public boolean isDoSpirit()
- {
- if (isVirtual()) return _spiritModeOn;
- else return _spiritModeOn && _spiritCommandReceived;
- }
-
- public void receiveStartSpiritCommand()
- {
- _spiritCommandReceived = true;
- }
-
- public IByteStreamHandler getDefaultByteStreamHandler()
- {
- return _byteStreamHandlerRegistry.getDefault();
- }
-
- public IClassByteStreamHandler getDefaultClassByteStreamHandler()
- {
- return _classbyteStreamHandlerRegistry.getDefault();
- }
-
- public IByteStreamHandler getByteStreamHandler(String id)
- {
- return _byteStreamHandlerRegistry.getByteStreamHandler(id);
- }
-
- public IClassByteStreamHandler getClassByteStreamHandler(String id)
- {
- return _classbyteStreamHandlerRegistry.getClassByteStreamHandler(id);
- }
-
- public void setRemoteIP(String remoteIP)
- {
- _remoteIP = remoteIP;
- }
-
- public String getRemoteIP()
- {
- return _remoteIP;
- }
-
- /**
- * Sets the current <code>ByteStreamHandler</code> to be the default.
- */
- public void setDefaultByteStreamHandler()
- {
- setDefaultByteStreamHandler(null);
- }
-
- /**
- * Sets the current <code>ClassByteStreamHandler</code> to be the default.
- */
- public void setDefaultClassByteStreamHandler()
- {
- setDefaultClassByteStreamHandler(null);
- }
-
- /**
- * Sets the current <code>ByteStreamHandler</code> to use for sending and receiving
- * files.
- * @param handler the <code>ByteStreamHandler</code> to use
- */
- public void setDefaultByteStreamHandler(IByteStreamHandler handler)
- {
- if (handler == null)
- {
- DataElement log = null;
- handler = new ByteStreamHandler(this, log);
- }
- _byteStreamHandlerRegistry.setDefaultByteStreamHandler(handler);
- }
-
- public RemoteClassLoader getRemoteClassLoader()
- {
- if (_remoteLoader == null)
- {
-
- _remoteLoader = new RemoteClassLoader(this);
- }
- return _remoteLoader;
- }
-
- /**
- * Sets the current <code>ClassByteStreamHandler</code> to use for sending and receiving
- * classes.
- * @param handler the <code>ClassByteStreamHandler</code> to use
- */
- public void setDefaultClassByteStreamHandler(IClassByteStreamHandler handler)
- {
- if (handler == null)
- {
- DataElement log = null;
- handler = new ClassByteStreamHandler(this, log);
- }
- _classbyteStreamHandlerRegistry.setDefaultClassByteStreamHandler(handler);
- }
-
- /**
- * Registers a byte stream handler.
- * @param handler the handler to register
- */
- public void registerByteStreamHandler(IByteStreamHandler handler)
- {
- _byteStreamHandlerRegistry.registerByteStreamHandler(handler);
- }
-
- /**
- * Registers a class byte stream handler.
- * @param handler the handler to register
- */
- public void registerClassByteStreamHandler(IClassByteStreamHandler handler)
- {
- _classbyteStreamHandlerRegistry.registerClassByteStreamHandler(handler);
- }
-
- public void setByteConverter(IByteConverter converter)
- {
- _byteConverter = converter;
- }
-
- public IByteConverter getByteConverter()
- {
- if (_byteConverter == null)
- {
- _byteConverter = new DefaultByteConverter();
- }
- return _byteConverter;
- }
-
-
- /**
- * Preallocates a set of <code>DataElement</code>s.
- *
- * @param the number of elements to preallocate
- */
- private void initElements(int size)
- {
- for (int i = 0; i < size; i++)
- {
- _recycled.add(new DataElement(this));
- }
- }
-
- /**
- * Returns a new <code>DataElement</code> by either using an existing preallocated <code>DataElement</code> or
- * by creating a new one.
- *
- * @return the new <code>DataElement</code>
- */
- private synchronized DataElement createElement()
- {
- DataElement newObject = null;
-
- int numRecycled = _recycled.size();
-
- if (numRecycled > 1)
- {
- synchronized (_recycled)
- {
-
- /*
- if (numRecycled > _MAX_FREE)
- {
- int numRemoved = numRecycled - _MAX_FREE;
- for (int i = 1; i <= numRemoved; i++)
- {
- DataElement toRemove = (DataElement)_recycled.remove(numRemoved - i);
- toRemove = null;
- }
- }
- */
-
- newObject = (DataElement) _recycled.remove((_recycled.size() - 1));
- }
- }
- if (newObject == null)
- {
- newObject = new DataElement(this);
- }
-
- newObject.setUpdated(false);
- updateLastCreated(newObject);
- return newObject;
- }
-
- private void updateLastCreated(DataElement element)
- {
- _lastCreatedElements.add(0, element);
- if (_lastCreatedElements.size() > 4)
- {
- for (int i = _lastCreatedElements.size() - 1; i > 4; i--)
- {
- _lastCreatedElements.remove(i);
- }
- }
- }
-
- public List getLastCreatedElements()
- {
- return _lastCreatedElements;
- }
-
- private void createRoots()
- {
- _externalRoot = createObject(_root, DataStoreResources.model_host, "External DataStores", "", "extID"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- _tempRoot = createObject(_root, "temp", "Temp Root", "", "tempID"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- _dummy = createObject(_root, "temp", "dummy"); //$NON-NLS-1$ //$NON-NLS-2$
- _logRoot = createObject(_root, DataStoreResources.model_log, DataStoreResources.model_Log_Root, "", "logID"); //$NON-NLS-1$ //$NON-NLS-2$
-
- _minerRoot = createObject(_root, DataStoreResources.model_miners, DataStoreResources.model_Tool_Root, "", "minersID"); //$NON-NLS-1$ //$NON-NLS-2$
-
- _hostRoot =
- createObject(
- _root,
- DataStoreResources.model_host,
- _dataStoreAttributes.getAttribute(DataStoreAttributes.A_HOST_NAME),
- _dataStoreAttributes.getAttribute(DataStoreAttributes.A_HOST_PATH),
- "hostID"); //$NON-NLS-1$
-
- _status = createObject(_root, DataStoreResources.model_status, "okay", "", "statusID"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- private void deleteObjectHelper(DataElement from, DataElement toDelete, int depth)
- {
- if (depth > 0)
- {
- depth--;
- toDelete.delete();
- for (int i = 0; i < toDelete.getNestedSize(); i++)
- {
- DataElement subDelete = toDelete.get(i);
- if (subDelete != null && subDelete.getDataStore() == this && !subDelete.isDeleted())
- {
- deleteObjectHelper(toDelete, subDelete, depth);
- }
- }
-
- String id = toDelete.getAttribute(DE.A_ID);
- _hashMap.remove(id);
-
- }
- }
-
- private void disconnectObjectHelper(DataElement toDisconnect, int depth)
- {
- if (depth > 0)
- {
- depth--;
- _deRemover.addToQueueForRemoval(toDisconnect);
- for (int i = 0; i < toDisconnect.getNestedSize(); i++)
- {
- DataElement subDisconnect = toDisconnect.get(i);
- if (subDisconnect != null && subDisconnect.getDataStore() == this && !subDisconnect.isSpirit())
- {
- disconnectObjectHelper(subDisconnect, depth);
- }
- }
- }
- }
-
- private String makeIdUnique(String id)
- {
-
- if (!_hashMap.containsKey(id))
- {
- return id;
- }
- else
- {
- return generateId();
- /*
- String newId = String.valueOf(_random.nextInt());
- while (_hashMap.containsKey(newId))
- {
- newId = String.valueOf(_random.nextInt());
- }
-
- return newId;
- */
- }
-
-
- }
-
- private String generateId(DataElement parent, String type, String name)
- {
- // by default, name will be the id
- //return name;
- return generateId();
- }
-
- /**
- * Generates a new unique ID to be used by a <code>DataElement</code>
- *
- * @return the new id
- */
- protected String generateId()
- {
- //return "" + _uniqueNumber++;
- ///*
- String newId = String.valueOf(_random.nextInt());
- while (_hashMap.containsKey(newId))
- {
- newId = String.valueOf(_random.nextInt());
- }
-
- return newId;
-// */
- }
-
- public void startTracing()
- {
- if (_tracingOn && _traceFile != null && _traceFileHandle != null)
- {
- try
- {
- _traceFile.seek(_traceFileHandle.length());
- }
- catch (IOException e)
- {
- }
-
- trace("-----------------------------------------"); //$NON-NLS-1$
- trace("Start Tracing at " + System.currentTimeMillis()); //$NON-NLS-1$
- }
- }
-
- public void startMemLogging()
- {
- if (_memLoggingOn && _memLogFile != null && _memLoggingFileHandle != null)
- {
- try
- {
- _memLogFile.seek(_memLoggingFileHandle.length());
- }
- catch (IOException e)
- {
- }
-
- memLog("-----------------------------------------"); //$NON-NLS-1$
- memLog("Start Memory Logging at " + System.currentTimeMillis()); //$NON-NLS-1$
- }
- }
-
- public void memLog(String str)
- {
- internalMemLog(str);
- }
-
- public void trace(String str)
- {
- internalTrace(str);
- }
-
- public void trace(Throwable e)
- {
- internalTrace(e.getMessage());
- internalTrace(e);
- }
-
- private void internalTrace(Throwable e)
- {
- if (_tracingOn && _traceFile != null && e != null)
- {
- try
- {
- StackTraceElement[] stack = e.getStackTrace();
- for (int i = 0;i<stack.length;i++)
- {
- _traceFile.writeBytes(stack[i].toString());
- _traceFile.writeBytes(System.getProperty("line.separator")); //$NON-NLS-1$
- }
- _traceFile.writeBytes(System.getProperty("line.separator")); //$NON-NLS-1$
- }
- catch (IOException ex)
- {
- }
- }
- }
-
- private void internalTrace(String message)
- {
- if (_tracingOn && _traceFile != null && message != null)
- {
- try
- {
- _traceFile.writeBytes(message);
- _traceFile.writeBytes(System.getProperty("line.separator")); //$NON-NLS-1$
- }
- catch (IOException e)
- {
- }
- }
- }
-
- private void internalMemLog(String message)
- {
- if (_memLoggingOn && _memLogFile != null && message != null)
- {
- try
- {
- _memLogFile.writeBytes((new Date()).toString() + ": "); //$NON-NLS-1$
- _memLogFile.writeBytes(message);
- _memLogFile.writeBytes(System.getProperty("line.separator")); //$NON-NLS-1$
- }
- catch (IOException e)
- {
- }
- }
- }
-
- public void finish()
- {
- // dy: the call to flush deletes all the elements in the tree
- // which causes havoc for iSeries caching when switching between offline / online
- //flush();
-
- if (_tracingOn)
- {
- try
- {
- _traceFile.writeBytes("Finished Tracing"); //$NON-NLS-1$
- _traceFile.writeBytes(System.getProperty("line.separator")); //$NON-NLS-1$
- _traceFile.close();
- }
- catch (IOException e)
- {
- }
- }
- }
-
- /**
- * On the server, sends a class request through the ServerUpdateHandler
- * to the client.
- * On the client, sends the request through the ClientCommandHandler
- * @param className The fully qualified name of the class to request.
- */
- public void requestClass(String className)
- {
- if (isVirtual())
- {
- _commandHandler.requestClass(className);
- }
- else
- {
- _updateHandler.requestClass(className);
- }
- }
-
- /**
- * On the server, sends a keepalive request through the ServerUpdateHandler
- * to the client.
- */
- public void sendKeepAliveRequest()
- {
- if (isVirtual())
- {
- _commandHandler.sendKeepAliveRequest();
- }
- else
- {
- _updateHandler.sendKeepAliveRequest();
- }
- }
-
- /**
- * On the server, sends a class through the ServerCommandHandler
- * to the client.
- * On the client, sends the class through the ClientUpdateHandler
- * @param className The fully qualified name of the class to request.
- */
- public void sendClass(String className)
- {
- if (isVirtual())
- {
- _commandHandler.sendClass(className);
- }
- else
- {
- _updateHandler.sendClass(className);
- }
- }
-
-
- /**
- * @return the central repository for all class requests initiated by
- * this server and its RemoteClassLoaders.
- */
- public HashMap getClassRequestRepository()
- {
- return _classReqRepository;
- }
-
-
- /**
- * Saves a class to disk (caches it) so that it can be loaded by the classloader without needing to
- * download it again
- */
- public synchronized void cacheClass(String className, byte[] bytes, int size)
- {
- if (_cacheJar == null) return;
-
- // get the entries from the old cache file
- Enumeration oldEntries;
- JarFile oldJarFile = null;
-
- try
- {
- oldJarFile = new JarFile(_cacheJar);
- }
- catch (IOException e)
- {
- // the jar must be corrupted, so we must erase it.
- System.out.println("Cache jarfile corrupted... erasing it."); //$NON-NLS-1$
- if (!_cacheJar.delete()) System.out.println("Couldn't erase corrupted jarfile!"); //$NON-NLS-1$
- // try to make a new one again.
- assignCacheJar();
- return;
- }
- oldEntries = oldJarFile.entries();
-
- // create a new cache file to store the new class in
- File newJarFile = new File(getCacheDirectory() + REMOTE_CLASS_CACHE_JARFILE_NAME + "_next" + JARFILE_EXTENSION); //$NON-NLS-1$
- JarOutputStream newJarOutput = null;
-
- try
- {
- newJarOutput = createNewCacheJar(newJarFile);
- }
- catch (IOException e)
- {
- System.out.println("Class caching failed. Could not create new cache jarfile."); //$NON-NLS-1$
- return;
- }
-
- // transfer the old entries to the new cache file
- while (oldEntries.hasMoreElements())
- {
- JarEntry nextEntry = (JarEntry) oldEntries.nextElement();
- BufferedInputStream source = null;
- try
- {
- source = new BufferedInputStream(oldJarFile.getInputStream(nextEntry));
- }
- catch (Exception e)
- {
- continue;
- }
- nextEntry.setCompressedSize(-1);
- try
- {
- newJarOutput.putNextEntry(nextEntry);
-
- byte[] buf = new byte[1024];
- int numRead = source.read(buf);
-
- while (numRead > 0)
- {
- newJarOutput.write(buf, 0, numRead);
- numRead = source.read(buf);
- }
-
- newJarOutput.closeEntry();
- source.close();
- }
- catch (IOException e)
- {
- System.out.println("Class caching failed. Could not recopy entry from old jar. Cleaning..."); //$NON-NLS-1$
- try { newJarOutput.close(); } catch (IOException ee) { }
- if (!newJarFile.delete()) System.out.println("Couldn't erase new jarfile!"); //$NON-NLS-1$
- }
- }
-
- // add the new class file
- JarEntry newEntry = new JarEntry(className.replace('.', '/') + ".class"); //$NON-NLS-1$
- newEntry.setCompressedSize(-1);
-
- try
- {
- newJarOutput.putNextEntry(newEntry);
- newJarOutput.write(bytes, 0, size);
- newJarOutput.closeEntry();
- newJarOutput.close();
- }
- catch (IOException e)
- {
- System.out.println("Class caching failed. Could not cache new class into new jar. Cleaning..."); //$NON-NLS-1$
- try { newJarOutput.close(); } catch (IOException ee) { }
- if (!newJarFile.delete()) System.out.println("Couldn't erase new jarfile!"); //$NON-NLS-1$
- }
-
- // get rid of the old jar file
- try { oldJarFile.close(); } catch (IOException ee) { }
- if (!_cacheJar.delete()) System.out.println("Could not delete old cache jar."); //$NON-NLS-1$
- if (!newJarFile.renameTo(_cacheJar)) System.out.println("Could not rename new cache jar."); //$NON-NLS-1$
-
- System.out.println(className + " cached in " + _cacheJar.getAbsolutePath()); //$NON-NLS-1$
- }
-
- protected JarOutputStream createNewCacheJar(File newJar) throws IOException
- {
- newJar.createNewFile();
- JarOutputStream dest = new JarOutputStream(
- new FileOutputStream(newJar));
- dest.setMethod(ZipOutputStream.DEFLATED);
- return dest;
- }
-
- protected void assignCacheJar()
- {
- String cacheDirectory = getCacheDirectory();
- File cacheJar = new File(cacheDirectory + REMOTE_CLASS_CACHE_JARFILE_NAME + JARFILE_EXTENSION);
- File nextCacheJar = new File(cacheDirectory + REMOTE_CLASS_CACHE_JARFILE_NAME + "_next" + JARFILE_EXTENSION); //$NON-NLS-1$
- if (nextCacheJar.exists()) nextCacheJar.renameTo(cacheJar);
- if (!cacheJar.exists())
- {
- try
- {
- JarOutputStream cacheOut = createNewCacheJar(cacheJar);
- cacheOut.putNextEntry(new JarEntry("/")); //$NON-NLS-1$
- cacheOut.closeEntry();
- cacheOut.close();
- }
- catch (IOException e)
- {
- e.printStackTrace();
- _cacheJar = null;
- return;
- }
- }
- _cacheJar = cacheJar;
- }
-
- protected String getCacheDirectory()
- {
- String cacheDirectory = getUserPreferencesDirectory();
- if (!cacheDirectory.endsWith(File.separator))
- {
- cacheDirectory = cacheDirectory + File.separator;
- }
- return cacheDirectory;
- }
-
- public File getRemoteClassLoaderCache()
- {
- return _cacheJar;
- }
-
- public void sendKeepAliveConfirmation()
- {
- if (isVirtual())
- {
- _commandHandler.sendKeepAliveConfirmation();
- }
- else
- {
- _updateHandler.sendKeepAliveConfirmation();
- }
- }
-
- /**
- * @return what type of attribute tag is used on the peer DataStore to indicate whether dataelements
- * are references, values, or spirit elements. If the peer DataStore is an older one, this will return
- * "isRef", if its up-to-date, it will return "refType", and if the tag hasnt been determined yet, this method
- * will return null.
- */
- public String getReferenceTag()
- {
- return referenceTag;
- }
-
- /**
- * Sets what type of attribute tag is used on the peer DataStore to indicate whether dataelements
- * are references, values, or spirit elements.
- */
- public void setReferenceTag(String tag)
- {
- referenceTag = tag;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreAttributes.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreAttributes.java
deleted file mode 100644
index 363a7ddd1..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreAttributes.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-
-
-/**
- * This class is used to store attributes that are required
- * for configurating a remote connection.
- */
-public class DataStoreAttributes
-{
-
- public static final String DATASTORE_VERSION = "DataStore.8.0.0"; //$NON-NLS-1$
-
- public static final int A_PLUGIN_PATH = 0;
- public static final int A_ROOT_NAME = 1;
- public static final int A_ROOT_PATH = 2;
- public static final int A_HOST_NAME = 3;
- public static final int A_HOST_PATH = 4;
- public static final int A_HOST_PORT = 5;
- public static final int A_LOCAL_NAME = 6;
- public static final int A_LOCAL_PATH = 7;
- public static final int A_LOG_NAME = 8;
- public static final int A_LOG_PATH = 9;
- public static final int A_SIZE = 10;
-
- private String _attributes[];
-
- /**
- * Constructor
- */
- public DataStoreAttributes()
- {
- _attributes = new String[A_SIZE];
-
- // root
- _attributes[A_ROOT_NAME] = new String("Local"); //$NON-NLS-1$
- _attributes[A_ROOT_PATH] = new String(""); //$NON-NLS-1$
-
- // log
- _attributes[A_LOG_NAME] = new String("log"); //$NON-NLS-1$
- _attributes[A_LOG_PATH] = new String("log.xml"); //$NON-NLS-1$
-
- // host
- _attributes[A_HOST_NAME] = new String(""); //$NON-NLS-1$
- _attributes[A_HOST_PATH] = new String(""); //$NON-NLS-1$
- _attributes[A_HOST_PORT] = new String("4033"); //$NON-NLS-1$
-
- // local
- _attributes[A_LOCAL_NAME] = new String(""); //$NON-NLS-1$
- _attributes[A_LOCAL_PATH] = new String(""); //$NON-NLS-1$
- }
-
- /**
- * Gets an attribute at a specified index
- * @param attributeIndex the index of an attribute
- * @return the attribute
- */
- public String getAttribute(int attributeIndex)
- {
- return _attributes[attributeIndex];
- }
-
- /**
- * Set an attribute at a specified index
- * @param attributeIndex the index of an attribute
- */
- public void setAttribute(int attributeIndex, String attribute)
- {
- _attributes[attributeIndex] = new String(attribute);
- if (attributeIndex == A_PLUGIN_PATH)
- {
- if (_attributes[A_ROOT_PATH].length() == 0)
- {
- _attributes[A_ROOT_PATH] = attribute;
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.java
deleted file mode 100644
index a15309e60..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-public class DataStoreResources
-{
- public static String model_Log_Root="Log Root"; //$NON-NLS-1$
- public static String model_Tool_Root="Tool Root"; //$NON-NLS-1$
- public static String model_Set="Set"; //$NON-NLS-1$
- public static String model_Modify="Modify"; //$NON-NLS-1$
- public static String model_timeout="timeout"; //$NON-NLS-1$
- public static String model_data="data"; //$NON-NLS-1$
- public static String model_transient="transient"; //$NON-NLS-1$
- public static String model_all="all"; //$NON-NLS-1$
- public static String model_host="host"; //$NON-NLS-1$
- public static String model_root="root"; //$NON-NLS-1$
- public static String model_descriptors="descriptors"; //$NON-NLS-1$
- public static String model_descriptor_for="descriptor for"; //$NON-NLS-1$
- public static String model_project="Project"; //$NON-NLS-1$
- public static String model_log="log"; //$NON-NLS-1$
- public static String model_deleted="deleted"; //$NON-NLS-1$
- public static String model_status="status"; //$NON-NLS-1$
- public static String model_start="start"; //$NON-NLS-1$
- public static String model_failed="failed"; //$NON-NLS-1$
- public static String model_done="done"; //$NON-NLS-1$
- public static String model_working="working"; //$NON-NLS-1$
- public static String model_progress="progress"; //$NON-NLS-1$
- public static String model_error="error"; //$NON-NLS-1$
- public static String model_warning="warning"; //$NON-NLS-1$
- public static String model_informational="informational"; //$NON-NLS-1$
- public static String model_markers="markers"; //$NON-NLS-1$
- public static String model_invocation="invocation"; //$NON-NLS-1$
- public static String model_pattern="pattern"; //$NON-NLS-1$
- public static String model_input="input"; //$NON-NLS-1$
- public static String model_output="output"; //$NON-NLS-1$
- public static String model_details="details"; //$NON-NLS-1$
- public static String model_contents="contents"; //$NON-NLS-1$
- public static String model_contents_arguments="Contents and Arguments"; //$NON-NLS-1$
- public static String model_parent="parent"; //$NON-NLS-1$
- public static String model_arguments="arguments"; //$NON-NLS-1$
- public static String model_Commands="Commands"; //$NON-NLS-1$
- public static String model_device="device"; //$NON-NLS-1$
- public static String model_directory="directory"; //$NON-NLS-1$
- public static String model_folder="folder"; //$NON-NLS-1$
- public static String model_file="file"; //$NON-NLS-1$
- public static String model_Filesystem_Objects="Filesystem Objects"; //$NON-NLS-1$
- public static String model_Container_Object="Container Object"; //$NON-NLS-1$
- public static String model_Directories="Directories"; //$NON-NLS-1$
- public static String model_Details="Details"; //$NON-NLS-1$
- public static String model_miners="miners"; //$NON-NLS-1$
- public static String model_miner="miner"; //$NON-NLS-1$
- public static String model_state="state"; //$NON-NLS-1$
- public static String model_ticket="ticket"; //$NON-NLS-1$
- public static String model_valid="valid"; //$NON-NLS-1$
- public static String model_invalid="invalid"; //$NON-NLS-1$
- public static String model_abstracted_by="abstracted by"; //$NON-NLS-1$
- public static String model_abstracts="abstracts"; //$NON-NLS-1$
- public static String model_incomplete="incomplete"; //$NON-NLS-1$
- public static String model_Miner_Details="Miner Details"; //$NON-NLS-1$
- public static String model_Hosts="Hosts"; //$NON-NLS-1$
- public static String model_Tools="Tools"; //$NON-NLS-1$
- public static String model_Schema="Schema"; //$NON-NLS-1$
- public static String model_Logged_Commands="Logged Commands"; //$NON-NLS-1$
- public static String model_Cancel="Cancel"; //$NON-NLS-1$
- public static String model_Get_Schema="Get Schema"; //$NON-NLS-1$
- public static String model_Show_Ticket="Show Ticket"; //$NON-NLS-1$
- public static String model_Init_Miners="Init Miners"; //$NON-NLS-1$
- public static String model_Set_Host="Set Host"; //$NON-NLS-1$
- public static String model_Exit="Exit"; //$NON-NLS-1$
- public static String model_Connect_to="Connect to"; //$NON-NLS-1$
- public static String model_Disconnect_from="Disconnect from"; //$NON-NLS-1$
- public static String model_Delete_Connection="Delete Connection"; //$NON-NLS-1$
- public static String model_time="time"; //$NON-NLS-1$
- public static String model_property="property"; //$NON-NLS-1$
- public static String model_start_time="start time"; //$NON-NLS-1$
- public static String model_command_time="command time"; //$NON-NLS-1$
- public static String model_Transient_Objects="Transient Objects"; //$NON-NLS-1$
- public static String model_Data="Data"; //$NON-NLS-1$
- public static String model_No_input="No input"; //$NON-NLS-1$
- public static String model_Open="Open"; //$NON-NLS-1$
- public static String model_Close="Close"; //$NON-NLS-1$
- public static String model_Refresh="Refresh"; //$NON-NLS-1$
- public static String model_Query="Query"; //$NON-NLS-1$
- public static String model_Cancellable="Cancellable"; //$NON-NLS-1$
-
- public static String SERIALIZED_TYPE="SERIALIZED"; //$NON-NLS-1$
- public static String CLASS_TYPE="CLASS"; //$NON-NLS-1$
- public static String REQUEST_CLASS_TYPE="REQUEST_CLASS"; //$NON-NLS-1$
- public static String DEFAULT_CLASSBYTESTREAMHANDLER="default"; //$NON-NLS-1$
- public static String FILE_TYPE="FILE"; //$NON-NLS-1$
- public static String DOCUMENT_TYPE="DOCUMENT"; //$NON-NLS-1$
- public static String DEFAULT_BYTESTREAMHANDLER="default"; //$NON-NLS-1$
- public static String TRUE="true"; //$NON-NLS-1$
- public static String FALSE="false"; //$NON-NLS-1$
- public static String DELETED="deleted"; //$NON-NLS-1$
- public static String KEEPALIVE_TYPE="KEEPALIVE"; //$NON-NLS-1$
- public static String KEEPALIVECONFIRM_TYPE="CONFIRMKEEPALIVE"; //$NON-NLS-1$
- public static String REFERENCE="reference"; //$NON-NLS-1$
- public static String VALUE="value"; //$NON-NLS-1$
- public static String SPIRIT="spirit"; //$NON-NLS-1$
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.properties b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.properties
deleted file mode 100644
index 7943f826f..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.properties
+++ /dev/null
@@ -1,103 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# This file contains the DataStore resources. English.
-
-# model types
-model.Log_Root=Log Root
-model.Tool_Root=Tool Root
-model.Set=Set
-model.Modify=Modify
-model.timeout=timeout
-model.data=data
-model.transient=transient
-model.all=all
-model.host=host
-model.root=root
-model.descriptors=descriptors
-model.descriptor_for=descriptor for
-model.project=Project
-model.log=log
-model.deleted=deleted
-model.status=status
-model.start=start
-model.failed=failed
-model.done=done
-model.working=working
-model.progress=progress
-model.error=error
-model.warning=warning
-model.informational=informational
-model.markers=markers
-model.invocation=invocation
-model.pattern=pattern
-model.input=input
-model.output=output
-model.details=details
-model.contents=contents
-model.contents&arguments=Contents and Arguments
-model.parent=parent
-model.arguments=arguments
-model.Commands=Commands
-model.device=device
-model.directory=directory
-model.folder=folder
-model.file=file
-model.Filesystem_Objects=Filesystem Objects
-model.Container_Object=Container Object
-model.Directories=Directories
-model.Details=Details
-model.miners=miners
-model.miner=miner
-model.state=state
-model.ticket=ticket
-model.valid=valid
-model.invalid=invalid
-model.abstracted_by=abstracted by
-model.abstracts=abstracts
-model.incomplete=incomplete
-model.Miner_Details=Miner Details
-model.Hosts=Hosts
-model.Details=Details
-model.Tools=Tools
-model.Schema=Schema
-model.Logged_Commands=Logged Commands
-model.Cancel=Cancel
-model.Get_Schema=Get Schema
-model.Show_Ticket=Show Ticket
-model.Init_Miners=Init Miners
-model.Set_Host=Set Host
-model.Exit=Exit
-model.Connect_to=Connect to
-model.Disconnect_from=Disconnect from
-model.Delete_Connection=Delete Connection
-model.time=time
-model.property=property
-model.start_time=start time
-model.command_time=command time
-model.start=start
-model.transient=transient
-model.Transient_Objects=Transient Objects
-model.Data=Data
-model.No_input=No input
-model.Open=Open
-model.Close=Close
-model.Refresh=Refresh
-model.Query=Query
-model.Cancellable=Cancellable \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreSchema.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreSchema.java
deleted file mode 100644
index 2a221eea4..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreSchema.java
+++ /dev/null
@@ -1,350 +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.dstore.core.model;
-
-
-/**
- * This class is used for defining the base DataStore schema. All
- * miner schemas are derived from the schema defined here. This class
- * provides getters for quickly getting at commonly used schema descriptors.
- */
-public class DataStoreSchema
-{
-
-
- private DataStore _dataStore;
- private DataElement _abstractedBy;
- private DataElement _abstracts;
- private DataElement _contents;
- private DataElement _container;
- private DataElement _attributes;
-
- private DataElement _objectDescriptor;
- private DataElement _commandDescriptor;
- private DataElement _relationDescriptor;
-
- private DataElement _abstractObjectDescriptor;
- private DataElement _abstractCommandDescriptor;
- private DataElement _abstractRelationDescriptor;
-
-
- public static final String C_VALIDATE_TICKET = "C_VALIDATE_TICKET"; //$NON-NLS-1$
- public static final String C_SET = "C_SET"; //$NON-NLS-1$
- public static final String C_MODIFY = "C_MODIFY"; //$NON-NLS-1$
- public static final String C_SET_HOST = "C_SET_HOST"; //$NON-NLS-1$
- public static final String C_SCHEMA = "C_SCHEMA"; //$NON-NLS-1$
- public static final String C_SET_PREFERENCE = "C_SET_PREFERENCE"; //$NON-NLS-1$
- public static final String C_ADD_MINERS = "C_ADD_MINERS"; //$NON-NLS-1$
- public static final String C_ACTIVATE_MINER = "C_ACTIVATE_MINER"; //$NON-NLS-1$
- public static final String C_INIT_MINERS = "C_INIT_MINERS"; //$NON-NLS-1$
- public static final String C_OPEN = "C_OPEN"; //$NON-NLS-1$
- public static final String C_CANCEL = "C_CANCEL"; //$NON-NLS-1$
- public static final String C_SEND_INPUT = "C_SEND_INPUT"; //$NON-NLS-1$
- public static final String C_QUERY = "C_QUERY"; //$NON-NLS-1$
- public static final String C_REFRESH = "C_REFRESH"; //$NON-NLS-1$
- public static final String C_EXIT = "C_EXIT"; //$NON-NLS-1$
- public static final String C_CLOSE = "C_CLOSE"; //$NON-NLS-1$
- public static final String C_NOTIFICATION = "C_NOTIFICATION"; //$NON-NLS-1$
- public static final String C_QUERY_INSTALL = "C_QUERY_INSTALL"; //$NON-NLS-1$
- public static final String C_QUERY_CLIENT_IP = "C_QUERY_CLIENT_IP"; //$NON-NLS-1$
- public static final String C_QUERY_JVM = "C_QUERY_JVM"; //$NON-NLS-1$
-
-
- /**
- * Constructor
- * @param dataStore the associated DataStore
- */
- public DataStoreSchema(DataStore dataStore)
- {
- _dataStore = dataStore;
- }
-
- /**
- * Returns the <i>abstracted by</i> relationship descriptor
- * @return the descriptor
- */
- public DataElement getAbstractedByRelation()
- {
- return _abstractedBy;
- }
-
- /**
- * Returns the <i>abstracts</i> relationship descriptor
- * @return the descriptor
- */
- public DataElement getAbstractsRelation()
- {
- return _abstracts;
- }
-
- /**
- * Returns the <i>contents</i> relationship descriptor
- * @return the descriptor
- */
- public DataElement getContentsRelation()
- {
- return _contents;
- }
-
- /**
- * Returns the <i>attributes</i> relationship descriptor
- * @return the descriptor
- */
- public DataElement getAttributesRelation()
- {
- return _attributes;
- }
-
- /**
- * Returns the <i>container</i> base object descriptor
- * @return the descriptor
- */
- public DataElement getContainerType()
- {
- return _container;
- }
-
- /**
- * Returns the base object descriptor
- * @return the descriptor
- */
- public DataElement getObjectDescriptor()
- {
- return _objectDescriptor;
- }
-
-
- /**
- * Returns the base command descriptor
- * @return the descriptor
- */
- public DataElement getCommandDescriptor()
- {
- return _commandDescriptor;
- }
-
- /**
- * Returns the base relation descriptor
- * @return the descriptor
- */
- public DataElement getRelationDescriptor()
- {
- return _relationDescriptor;
- }
-
-
- /**
- * Returns the base object descriptor
- * @return the descriptor
- */
- public DataElement getAbstractObjectDescriptor()
- {
- return _abstractObjectDescriptor;
- }
-
-
- /**
- * Returns the base command descriptor
- * @return the descriptor
- */
- public DataElement getAbstractCommandDescriptor()
- {
- return _abstractCommandDescriptor;
- }
-
- /**
- * Returns the base relation descriptor
- * @return the descriptor
- */
- public DataElement getAbstractRelationDescriptor()
- {
- return _abstractRelationDescriptor;
- }
-
-
-
- /**
- * This method is called when the DataStore is initialized. It sets
- * up the base DataStore schema.
- * @param schemaRoot the root object of the DataStore schema
- */
- public void extendSchema(DataElement schemaRoot)
- {
- // miner-specific descriptors are defined in the miners when they extend the schema
-
- // these first elements are the most fundamental
-// DataElement uiCmdD = _dataStore.createObject(schemaRoot, DE.T_UI_COMMAND_DESCRIPTOR, DE.T_UI_COMMAND_DESCRIPTOR);
- _dataStore.createObject(schemaRoot, DE.T_UI_COMMAND_DESCRIPTOR, DE.T_UI_COMMAND_DESCRIPTOR);
-
- _commandDescriptor = _dataStore.createCommandDescriptor(schemaRoot, DE.T_COMMAND_DESCRIPTOR);
- _objectDescriptor = _dataStore.createObjectDescriptor(schemaRoot, DE.T_OBJECT_DESCRIPTOR);
- _relationDescriptor = _dataStore.createRelationDescriptor(schemaRoot, DE.T_RELATION_DESCRIPTOR);
-
- _abstractObjectDescriptor = _dataStore.createAbstractObjectDescriptor(schemaRoot, DE.T_ABSTRACT_OBJECT_DESCRIPTOR);
- _abstractCommandDescriptor = _dataStore.createAbstractCommandDescriptor(schemaRoot, DE.T_ABSTRACT_COMMAND_DESCRIPTOR);
- _abstractRelationDescriptor = _dataStore.createAbstractRelationDescriptor(schemaRoot, DE.T_ABSTRACT_RELATION_DESCRIPTOR);
-
- // cancellable command base descriptor
- DataElement cancellable = _dataStore.createAbstractObjectDescriptor(schemaRoot, DataStoreResources.model_Cancellable);
-
- DataElement rootD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_root);
-
- DataElement hostD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_host);
-
- DataElement logD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_log);
- DataElement statusD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_status);
-
-// DataElement deletedD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_deleted);
- _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_deleted);
-
- // misc
- DataElement allD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_all);
-
-// DataElement invokeD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_invocation);
- _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_invocation);
-// DataElement patternD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_pattern);
- _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_pattern);
-
-// DataElement inputD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_input);
- _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_input);
-// DataElement outputD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_output);
- _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_output);
-
- // types of relationships
- _contents = _dataStore.createRelationDescriptor(schemaRoot, DataStoreResources.model_contents);
- _contents.setDepth(100);
-
- DataElement descriptorForD = _dataStore.createRelationDescriptor(schemaRoot, DataStoreResources.model_descriptor_for);
- descriptorForD.setDepth(1);
-
- DataElement parentD = _dataStore.createRelationDescriptor(schemaRoot, DataStoreResources.model_parent);
- parentD.setDepth(1);
-
- _attributes = _dataStore.createRelationDescriptor(schemaRoot, "attributes"); //$NON-NLS-1$
- _attributes.setDepth(0);
-
- DataElement argsD = _dataStore.createRelationDescriptor(schemaRoot, DataStoreResources.model_arguments);
- _abstracts = _dataStore.createRelationDescriptor(schemaRoot, DataStoreResources.model_abstracts);
-
- _abstractedBy = _dataStore.createRelationDescriptor(schemaRoot, DataStoreResources.model_abstracted_by);
-
- DataElement caRelations = _dataStore.createAbstractRelationDescriptor(schemaRoot, DataStoreResources.model_contents_arguments);
- _dataStore.createReference(caRelations, _contents, _contents);
- _dataStore.createReference(caRelations, argsD, _contents);
-
- _dataStore.createReference(_objectDescriptor, _contents, _contents);
- _dataStore.createReference(_objectDescriptor, parentD, _contents);
- _dataStore.createReference(_objectDescriptor, _abstracts, _contents);
- _dataStore.createReference(_objectDescriptor, _abstractedBy, _contents);
-
- _dataStore.createReference(_abstractObjectDescriptor, _contents, _contents);
- _dataStore.createReference(_abstractObjectDescriptor, parentD, _contents);
- _dataStore.createReference(_abstractObjectDescriptor, _abstracts, _contents);
- _dataStore.createReference(_abstractObjectDescriptor, _abstractedBy, _contents);
-
- _dataStore.createReference(statusD, _contents, _contents);
-
- _dataStore.createReference(_commandDescriptor, allD, _contents);
- _dataStore.createReference(_commandDescriptor, caRelations, _contents);
- _dataStore.createReference(_commandDescriptor, argsD, _contents);
- _dataStore.createReference(_commandDescriptor, _contents, _contents);
-
- DataElement logDetails = _dataStore.createAbstractObjectDescriptor(logD, DataStoreResources.model_Commands);
- _dataStore.createReference(logDetails, _commandDescriptor, _contents);
- _dataStore.createReference(logDetails, allD, _contents);
- _dataStore.createReference(logD, caRelations, _contents);
- _dataStore.createReference(logD, _contents, _contents);
-
- //Base Container Object
- _container = _dataStore.createAbstractObjectDescriptor(schemaRoot, DataStoreResources.model_Container_Object);
- _dataStore.createCommandDescriptor(_container, DataStoreResources.model_Query, "*", C_QUERY, false); //$NON-NLS-1$
- _dataStore.createReference(_container, _contents, _contents);
-
- // file objects
- DataElement fileD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_file);
- DataElement dirD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_directory);
-
- DataElement fsObject = _dataStore.createAbstractObjectDescriptor(schemaRoot, DataStoreResources.model_Filesystem_Objects);
-
-
- _dataStore.createReference(_container, fsObject, _abstracts, _abstractedBy);
-
- _dataStore.createReference(fileD, fsObject, _abstracts, _abstractedBy);
- _dataStore.createReference(fsObject, dirD, _abstracts, _abstractedBy);
-
- _dataStore.createReference(fsObject, fileD, _contents);
- _dataStore.createReference(fsObject, dirD, _contents);
- _dataStore.createReference(fsObject, fsObject, _contents);
-
- _dataStore.createReference(dirD, fileD, _contents);
- _dataStore.createReference(dirD, dirD, _contents);
-
- // miner descriptors
- DataElement minersD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_miners);
- DataElement minerD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_miner);
- DataElement dataD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_data);
-// DataElement transientD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_transient);
- _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_transient);
-// DataElement stateD = _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_state);
- _dataStore.createObjectDescriptor(schemaRoot, DataStoreResources.model_state);
- // containers
- _dataStore.createReference(_container, rootD, _abstracts, _abstractedBy);
- _dataStore.createReference(_container, hostD, _abstracts, _abstractedBy);
- _dataStore.createReference(_container, logD, _abstracts, _abstractedBy);
- _dataStore.createReference(_container, minersD, _abstracts, _abstractedBy);
- _dataStore.createReference(_container, minerD, _abstracts, _abstractedBy);
- _dataStore.createReference(_container, dataD, _abstracts, _abstractedBy);
-
-
-
- // basic commands
- _dataStore.createCommandDescriptor(cancellable, DataStoreResources.model_Cancel, "*", C_CANCEL); //$NON-NLS-1$
- _dataStore.createCommandDescriptor(rootD, DataStoreResources.model_Set, "-", C_SET, false); //$NON-NLS-1$
- _dataStore.createCommandDescriptor(rootD, DataStoreResources.model_Set_Host, "-", C_SET_HOST, false); //$NON-NLS-1$
- _dataStore.createCommandDescriptor(rootD, DataStoreResources.model_Init_Miners, "*", C_INIT_MINERS, false); //$NON-NLS-1$
- _dataStore.createCommandDescriptor(rootD, "Add Miners", "-", C_ADD_MINERS, false); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createCommandDescriptor(rootD, "Activate Miner", "-", C_ACTIVATE_MINER, false); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createCommandDescriptor(rootD, "Set Preference", "-", C_SET_PREFERENCE, false); //$NON-NLS-1$ //$NON-NLS-2$
-
- _dataStore.createCommandDescriptor(rootD, DataStoreResources.model_Show_Ticket, "-", C_VALIDATE_TICKET, false); //$NON-NLS-1$
- _dataStore.createCommandDescriptor(rootD, DataStoreResources.model_Get_Schema, "*", C_SCHEMA, false); //$NON-NLS-1$
- _dataStore.createCommandDescriptor(rootD, DataStoreResources.model_Exit, "*", C_EXIT, false); //$NON-NLS-1$
- _dataStore.createCommandDescriptor(rootD, "Query Install", "*", C_QUERY_INSTALL, false); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createCommandDescriptor(rootD, "Query Client IP", "*", C_QUERY_CLIENT_IP, false); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createCommandDescriptor(rootD, "Query JVM", "*", C_QUERY_JVM, false); //$NON-NLS-1$ //$NON-NLS-2$
-
- _dataStore.createCommandDescriptor(rootD, "Notification", "*", C_NOTIFICATION, false); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createCommandDescriptor(rootD, "Send Input", "*", C_SEND_INPUT, false); //$NON-NLS-1$ //$NON-NLS-2$
-
-
- // both ends have this base schema, so mark each descriptor as updated
- for (int i = 0; i < schemaRoot.getNestedSize(); i++)
- {
- DataElement descriptor = schemaRoot.get(i);
- descriptor.setUpdated(true);
-
- for (int j = 0; j < descriptor.getNestedSize(); j++)
- {
- DataElement subDescriptor = descriptor.get(j);
- subDescriptor.setUpdated(true);
- }
-
- schemaRoot.setUpdated(true);
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultByteConverter.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultByteConverter.java
deleted file mode 100644
index c2e41b3fa..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultByteConverter.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-
-/**
- * @author dmcknigh
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class DefaultByteConverter implements IByteConverter
-{
- private String _clientEncoding = DE.ENCODING_UTF_8;
- private String _hostEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
- public void setContext(File file)
- {
- }
-
- public void setHostEncoding(String hostEncoding)
- {
- _hostEncoding = hostEncoding;
- }
-
- public void setClientEncoding(String clientEncoding)
- {
- _clientEncoding = clientEncoding;
- }
-
- public byte[] convertHostBytesToClientBytes(byte[] buffer, int offset, int length)
- {
- byte[] convertedBytes =null;
- try
- {
- convertedBytes = (new String(buffer, offset, length, _hostEncoding)).getBytes(_clientEncoding);
- }
- catch (UnsupportedEncodingException e)
- {
- try
- {
- convertedBytes = (new String(buffer, offset, length)).getBytes(_clientEncoding);
- }
- catch (UnsupportedEncodingException e2)
- {
- return buffer;
- }
- }
-
- return convertedBytes;
- }
-
- public byte[] convertClientBytesToHostBytes(byte[] buffer, int offset, int length)
- {
- byte[] convertedBytes = null;
-
- try
- {
- convertedBytes = (new String(buffer, offset, length, _clientEncoding)).getBytes(_hostEncoding);
- }
- catch (UnsupportedEncodingException e)
- {
- try
- {
- convertedBytes = (new String(buffer, offset, length)).getBytes(_hostEncoding);
- }
- catch (UnsupportedEncodingException e2)
- {
- return buffer;
- }
- }
-
- return convertedBytes;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Handler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Handler.java
deleted file mode 100644
index 4fa6beb0e..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Handler.java
+++ /dev/null
@@ -1,161 +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.dstore.core.model;
-
-/**
- * The Handler class is the base class for the threaded mechanisms in
- * the DataStore. This is a thread that periodically does some activity.
- * The frequency of handling can be configured.
- */
-public abstract class Handler extends Thread
-{
-
-
- protected int _waitIncrement;
- protected DataStore _dataStore;
- protected boolean _keepRunning;
-
- /**
- * Constructor
- */
- public Handler()
- {
- _keepRunning = true;
- _waitIncrement = 100;
- }
-
- /**
- * Sets the time interval to wait between handling
- * @param value the wait interval
- */
- public void setWaitTime(int value)
- {
- _waitIncrement = value;
- }
-
- /**
- * Returns the time interval to wait between handling
- * @return the wait interval
- */
- public int getWaitTime()
- {
- return _waitIncrement;
- }
-
- /**
- * Sets the associated DataStore
- * @param dataStore
- */
- public void setDataStore(DataStore dataStore)
- {
- _dataStore = dataStore;
- }
-
- /**
- * Indicates whether the handler is finished or not
- * @return whether the handler is finished or not
- */
- public boolean isFinished()
- {
- return !_keepRunning;
- }
-
- /**
- * Finish handling
- */
- public void finish()
- {
- if (_keepRunning)
- {
-
- _waitIncrement = 0;
- _keepRunning = false;
-
- /* causes hang
- try
- {
- interrupt();
- join();
- }
- catch (InterruptedException e)
- {
- System.out.println(e);
- }
- */
- handle();
- }
- }
-
- /**
- * Implemented to provide the periodic activity to be done in a handler.
- * This method is called between wait intervals by the handler thread.
- */
- public abstract void handle();
-
- /**
- * Runs the handler loop in a thread.
- */
- public void run()
- {
- while (_keepRunning)
- {
- /*
- try
- {
- Thread.sleep(_waitIncrement);
- Thread.yield();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- finish();
- return;
- }
- */
- waitForInput();
-
- handle();
- }
- }
-
- /**
- * Causes the current thread to wait until this class request has been
- * fulfilled.
- */
- public synchronized void waitForInput()
- {
- try
- {
- wait();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- finish();
- return;
- }
- }
-
- /**
- * Causes all threads waiting for this class request to be filled
- * to wake up.
- */
- public synchronized void notifyInput()
- {
- notifyAll();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteConverter.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteConverter.java
deleted file mode 100644
index 3f5ce8616..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteConverter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-import java.io.File;
-
-/**
- * Interface for converting between host bytes and client bytes
- */
-public interface IByteConverter
-{
- public void setContext(File file);
- public byte[] convertHostBytesToClientBytes(byte[] buffer, int offset, int length);
- public byte[] convertClientBytesToHostBytes(byte[] buffer, int offset, int length);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteStreamHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteStreamHandler.java
deleted file mode 100644
index cf7a31d4f..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IByteStreamHandler.java
+++ /dev/null
@@ -1,59 +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.dstore.core.model;
-
-/**
- * <p>
- * The ByteStreamHandler interface is used to abstract file read and write operations
- * across the network.
- *
- */
-public interface IByteStreamHandler
-{
-
- /**
- * Returns the unique ID for this bytestream handler
- * @return the unique id
- */
- public String getId();
-
- /**
- * Save a file in the specified location. This method is called by the
- * DataStore when the communication layer receives a file transfer
- *
- * @param remotePath the path where to save the file
- * @param buffer the bytes to insert in the file
- * @param size the number of bytes to insert
- * @param binary indicates whether to save the bytes as binary or text
- */
- public void receiveBytes(String remotePath, byte[] buffer, int size, boolean binary);
-
- /**
- * Append a bytes to a file at a specified location. This method is called by the
- * DataStore when the communication layer receives a file transfer append.
- *
- * @param remotePath the path where to save the file
- * @param buffer the bytes to append in the file
- * @param size the number of bytes to append in the file
- * @param binary indicates whether to save the bytes as binary or text
- */
- public void receiveAppendedBytes(String remotePath, byte[] buffer, int size, boolean binary);
-
-
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index d2b62b715..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreConstants.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-public interface IDataStoreConstants
-{
- public static final String PASSWORD_EXPIRED = "password expired"; //$NON-NLS-1$
- public static final String NEW_PASSWORD_INVALID = "new password not valid"; //$NON-NLS-1$
- public static final String AUTHENTICATION_FAILED = "Authentification Failed"; //$NON-NLS-1$
- public static final String CONNECTED = "connected"; //$NON-NLS-1$
- public static final String UNKNOWN_PROBLEM = "unknown problem connecting to server"; //$NON-NLS-1$
- public static final String SERVER_FAILURE = "server failure: "; //$NON-NLS-1$
- public static final String ATTEMPT_RECONNECT = "attempt reconnect"; //$NON-NLS-1$
- public static final String PORT_OUT_RANGE = "specified port out of range:"; //$NON-NLS-1$
-
- public static final String DATASTORE_SPIRIT_DESCRIPTOR = "datastore.spirit"; //$NON-NLS-1$
- public static final String C_START_SPIRIT = "C_START_SPIRIT"; //$NON-NLS-1$
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreProvider.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreProvider.java
deleted file mode 100644
index 5604287af..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-public interface IDataStoreProvider
-{
- public DataStore getDataStore();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISSLProperties.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISSLProperties.java
deleted file mode 100644
index 02b9f49a3..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISSLProperties.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-public interface ISSLProperties
-{
- public boolean usingSSL();
- public boolean usingServerSSL();
- public String getDaemonKeyStorePassword();
- public String getDaemonKeyStorePath();
- public String getServerKeyStorePassword();
- public String getServerKeyStorePath();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaExtender.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaExtender.java
deleted file mode 100644
index c20f9717d..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaExtender.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-
-import org.eclipse.dstore.core.util.ExternalLoader;
-
-/**
- * ISchemaExtender describes the interfaces that tool extensions
- * need to implement to add or extend other schemas in the DataStore.
- */
-public interface ISchemaExtender
-{
-
-
- /**
- * Add this tool's schema to the global DataStore schema.
- * This interface must be implemented by each miner in order to
- * populate the DataStore schema with information about this tool's
- * object model and information about how to communicate with the
- * tool from objects available to the user interface.
- *
- * @param schemaRoot the descriptor root
- */
- public abstract void extendSchema(DataElement schemaRoot);
-
- /**
- * Implement this to returns the external class loader for this extender
- * implementation. In order for a tool extension to be loaded by the DataStore, it's
- * class loader needs to be supplied.
- *
- * @return the external loader
- */
- public abstract ExternalLoader getExternalLoader();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaProvider.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaProvider.java
deleted file mode 100644
index 47ca0e001..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaProvider.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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 ISchemaProvider
-{
-
-
- public ISchemaRegistry getSchemaRegistry();
- public ISchemaExtender getSchemaExtender();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaRegistry.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaRegistry.java
deleted file mode 100644
index 27188290f..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ISchemaRegistry.java
+++ /dev/null
@@ -1,50 +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.dstore.core.model;
-
-import org.eclipse.dstore.core.util.ExternalLoader;
-
-/**
- * ISchemaRegistry describes the interface that needs to be
- * implemented for external tools to contribute their
- * schemas to the DataStore.
- */
-public interface ISchemaRegistry
-{
-
- /**
- * This method gets called when a new schema extender needs to be
- * registered.
- *
- * @param extender the new schema extender
- */
- public void registerSchemaExtender(ISchemaExtender extender);
-
- /**
- * This method is responsible for calling <code>extendSchema</code> on
- * each of the registered schema extenders.
- * @param dataStore the DataStore for which the schema will be extended
- */
- public void extendSchema(DataStore dataStore);
-
- /**
- * Returns an <code>ExternalLoader</code> for the specified qualified class name
- * @param qualifiedClassName the qualified class name of an external tool
- * @return the external loader that can load to specified class
- */
- public ExternalLoader getLoaderFor(String qualifiedClassName);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/SchemaRegistry.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/SchemaRegistry.java
deleted file mode 100644
index 3ec32b76a..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/SchemaRegistry.java
+++ /dev/null
@@ -1,91 +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.dstore.core.model;
-
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.util.ExternalLoader;
-
-/**
- * SchemaRegistry implements the interface for external tools to contribute their
- * schemas to the DataStore.
- */
-public class SchemaRegistry implements ISchemaRegistry
-{
-
-
- private ArrayList _initializedDataStores = new ArrayList();
- private ArrayList _extenders = new ArrayList();
-
- /**
- * Registers a schema extender with the associated DataStores
- * @param extender the schema extender to register
- */
- public void registerSchemaExtender(ISchemaExtender extender)
- {
- if (!_extenders.contains(extender))
- {
- _extenders.add(extender);
- for (int i = 0; i < _initializedDataStores.size(); i++)
- {
- DataStore dataStore = (DataStore) _initializedDataStores.get(i);
- DataElement schemaRoot = dataStore.getDescriptorRoot();
- extender.extendSchema(schemaRoot);
- }
- }
- }
-
- /**
- * Calls extendSchema() on each of the registered schema extenders to
- * extend the schema of the specified DataStore
- *
- * @param dataStore the DataStore whos schema will be updated
- */
- public void extendSchema(DataStore dataStore)
- {
- if (!_initializedDataStores.contains(dataStore))
- {
- DataElement schemaRoot = dataStore.getDescriptorRoot();
- for (int i = 0; i < _extenders.size(); i++)
- {
- ISchemaExtender extender = (ISchemaExtender) _extenders.get(i);
- extender.extendSchema(schemaRoot);
- }
- _initializedDataStores.add(dataStore);
- }
- }
-
- /**
- * Gets the <code>ExternalLoader</code> for the specified qualified classname
- *
- * @param source the qualified classname
- * @return the external loader for the specified classname
- */
- public ExternalLoader getLoaderFor(String source)
- {
- for (int i = 0; i < _extenders.size(); i++)
- {
- ISchemaExtender extender = (ISchemaExtender) _extenders.get(i);
- ExternalLoader loader = extender.getExternalLoader();
- if (loader.canLoad(source))
- {
- return loader;
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java
deleted file mode 100644
index 97d918790..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java
+++ /dev/null
@@ -1,260 +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.dstore.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-import org.eclipse.dstore.core.util.DataElementRemover;
-
-/**
- * <p>
- * Abtract class for handling updates. A <code>UpdateHandler</code> is a <code>Handler</code> that
- * contains a queue of data responses to be sent to the client. Each DataStore instance uses a single
- * update handler that periodically sends it's data queue either to a client or directly
- * to a domain listener on the client.
- * </p>
- * <p>
- * The UpdateHandler is the means by which the DataStore sends information or files from the remote tools to the client.
- * </p>
- */
-public abstract class UpdateHandler extends Handler
-{
-
-
- protected ArrayList _dataObjects;
- protected ArrayList _classesToSend;
-
- /**
- * Constructor
- */
- public UpdateHandler()
- {
- setName("DStore UpdateHandler"+getName()); //$NON-NLS-1$
- _dataObjects = new ArrayList();
- _classesToSend = new ArrayList();
- }
-
- /**
- * Periodically called on the handler thread to sends data updates.
- */
- public void handle()
- {
- if (!_dataObjects.isEmpty() || !_classesToSend.isEmpty())
- {
- sendUpdates();
- }
- }
-
- protected void clean(DataElement object)
- {
- clean(object, 2);
- }
-
- protected synchronized void clean(DataElement object, int depth)
- {
- if ((depth > 0) && (object != null) && object.getNestedSize() > 0)
- {
- List deletedList = _dataStore.findDeleted(object);
-
- for (int i = 0; i < deletedList.size(); i++)
- {
- DataElement child = (DataElement) deletedList.get(i);
- if (child != null && child.isDeleted())
- {
- DataElement parent = child.getParent();
- if (child.isSpirit()) DataElementRemover.addToRemovedCount();
- child.clear();
- if (parent != null)
- {
- parent.removeNestedData(child);
- }
- _dataStore.addToRecycled(child);
- }
- }
-
- deletedList.clear();
- }
-
-
- }
-
- /**
- * Adds a set of data objects to the update queue
- * @param objects a set of objects to get updated
- */
- public void update(ArrayList objects)
- {
- for (int i = 0; i < objects.size(); i++)
- {
- update((DataElement) objects.get(i));
- }
- }
-
- /**
- * Adds an object to the update queue
- * @param object an object to get updated
- */
- public void update(DataElement object)
- {
- update(object, false);
- }
-
- /**
- * Adds an object to the update queue
- * @param object an object to get updated
- * @param immediate true indicates that this object should be first in the queue
- */
- public void update(DataElement object, boolean immediate)
- {
- synchronized (_dataObjects)
- {
- if (immediate)
- {
- _dataObjects.add(0, object);
- handle();
- }
- else
- {
- if (!_dataObjects.contains(object))
- {
- _dataObjects.add(object);
- }
- else
- {
-
- if (_dataStore != null && object != null)
- {
- if (object.getType().equals(DataStoreResources.model_status))
- {
- if (object.getName().equals(DataStoreResources.model_done))
- {
- //DKM
- // move to the back of the queue
- // this is done so that if status that was already queued changed to done in between
- // requests, and had not yet been transferred over comm layer, the completed status
- // object does not come back to client (as "done") before the results of a query
- _dataObjects.remove(object);
- _dataObjects.add(object);
- }
- }
- }
- }
- }
- notifyInput();
- }
- }
-
- /**
- * Causes the current thread to wait until this class request has been
- * fulfilled.
- */
- public synchronized void waitForInput()
- {
- if (_dataObjects.size() == 0 && _classesToSend.size() == 0)
- {
- super.waitForInput();
- }
- }
-
- /**
- * Implemented to provide the means by which updates on the queue are sent.
- */
- public abstract void sendUpdates();
-
-
- /**
- * Implemented to provide the means by which files are sent
- * @param path the path of the file to send
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or text
- */
- public abstract void updateFile(String path, byte[] bytes, int size, boolean binary);
-
- /**
- * Implemented to provide the means by which files are sent and appended
- * @param path the path of the file to send
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or text
- */
- public abstract void updateAppendFile(String path, byte[] bytes, int size, boolean binary);
-
- /**
- * Implemented to provide the means by which files are sent
- * @param path the path of the file to send
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or text
- * @param byteStreamHandlerId indicates the byte stream handler to receive the bytes
- */
- public abstract void updateFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId);
-
- /**
- * Implemented to provide the means by which files are sent and appended
- * @param path the path of the file to send
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes as binary or text
- * @param byteStreamHandlerId indicates the byte stream handler to receive the bytes
- */
- public abstract void updateAppendFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId);
-
- /**
- * Implemented to provide the means by which classes are requested
- * across the comm channel.
- * @param className the name of the class to request
- */
- public abstract void requestClass(String className);
-
- /**
- * Implemented to provide the means by which keepalive requests are sent
- * across the comm channel.
- */
- public abstract void sendKeepAliveRequest();
-
- /**
- * Impleted to provide the means by which a class on the host is updated on the client
- * @param runnable
- * @param deserializebyteStreamHandlerId
- */
- public abstract void updateClassInstance(IRemoteClassInstance runnable, String deserializebyteStreamHandlerId);
-
- /**
- * Implemented to provide the means by which classes are sent
- * across the comm channel.
- * @param className the name of the class to send
- */
- public abstract void sendClass(String className);
-
- /**
- * Implemented to provide the means by which classes are sent
- * across the comm channel.
- * @param className the name of the class to send
- * @param classByteStreamHandlerId indicates which class byte stream handler to receive the class with
- */
- public abstract void sendClass(String className, String classByteStreamHandlerId);
-
- /**
- * Implemented to provide the means by which keepalive confirmations are sent
- * across the comm channel.
- */
- public abstract void sendKeepAliveConfirmation();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java
deleted file mode 100644
index 6647289fe..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java
+++ /dev/null
@@ -1,433 +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.dstore.core.server;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.net.BindException;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocket;
-
-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.ISSLProperties;
-import org.eclipse.dstore.core.util.ExternalLoader;
-import org.eclipse.dstore.core.util.Sender;
-import org.eclipse.dstore.core.util.ssl.DStoreSSLContext;
-
-/**
- * ConnectionEstablisher is responsible for managing the server DataStore and
- * facilitating the communication between client and server DataStores.
- *
- */
-public class ConnectionEstablisher
-{
-
-
- private ServerSocket _serverSocket;
- private static boolean _continue;
-
- private ArrayList _receivers;
-
- private ServerCommandHandler _commandHandler;
- private ServerUpdateHandler _updateHandler;
-
- private ServerAttributes _serverAttributes = new ServerAttributes();
- private DataStore _dataStore;
-
- private int _maxConnections;
- private int _timeout;
-
-
- /**
- * Creates the default ConnectionEstablisher. Communication occurs
- * on a default port, there is no timeout and no ticket is required
- * for a client to work with the DataStore.
- *
- */
- public ConnectionEstablisher()
- {
- String port = _serverAttributes.getAttribute(DataStoreAttributes.A_HOST_PORT);
- setup(port, null, null);
- }
-
- /**
- * Creates a ConnectionEstablisher. Communication occurs
- * on the specified port, there is no timeout and no ticket is required
- * for a client to work with the DataStore.
- *
- * @param port the number of the socket port
- */
- public ConnectionEstablisher(String port)
- {
- setup(port, null, null);
- }
-
- /**
- * Creates a ConnectionEstablisher. Communication occurs
- * on the specified port, a timeout value indicates the idle wait
- * time before shutting down, and no ticket is required
- * for a client to work with the DataStore.
- *
- * @param port the number of the socket port
- * @param timeout the idle duration to wait before shutting down
- */
- public ConnectionEstablisher(String port, String timeout)
- {
- setup(port, timeout, null);
- }
-
- /**
- * Creates a ConnectionEstablisher. Communication occurs
- * on the specified port, a timeout value indicates the idle wait
- * time before shutting down, and ticket specified the required
- * ticket for a client to present in order to work with the DataStore.
- *
- * @param port the number of the socket port
- * @param timeout the idle duration to wait before shutting down
- * @param ticket validation id required by the client to access the DataStore
- */
- public ConnectionEstablisher(String port, String timeout, String ticket)
- {
- setup(port, timeout, ticket);
- }
-
-
- /**
- * Starts the run loop for the ConnectionEstablisher.
- */
- public void start()
- {
- run();
- }
-
-
-
- /**
- * Returns the DataStore.
- *
- * @return the DataStore
- */
- public DataStore getDataStore()
- {
- return _dataStore;
- }
-
- /**
- * Tells the connection establisher to clean up and shutdown
- */
- public void finished(ServerReceiver receiver)
- {
- _updateHandler.removeSenderWith(receiver.socket());
- _receivers.remove(receiver);
- //if (_receivers.size() == 0)
- {
- _continue = false;
- _commandHandler.finish();
- _updateHandler.finish();
- _dataStore.finish();
- System.out.println(ServerReturnCodes.RC_FINISHED);
- System.exit(0);
- }
- }
-
- private void waitForConnections()
- {
- while (_continue == true)
- {
- try
- {
- Socket newSocket = _serverSocket.accept();
- if (_dataStore.usingSSL())
- {
-
- // wait for connection
- SSLSocket sslSocket = (SSLSocket)newSocket;
- sslSocket.setUseClientMode(false);
- sslSocket.setNeedClientAuth(false);
- SSLSession session = sslSocket.getSession();
-
- if (session == null)
- {
- System.out.println("handshake failed"); //$NON-NLS-1$
- sslSocket.close();
- return;
- }
- }
-
- doHandShake(newSocket);
- newSocket.setKeepAlive(true);
-
- ServerReceiver receiver = new ServerReceiver(newSocket, this);
- Sender sender = new Sender(newSocket, _dataStore);
-
- // add this connection to list of elements
- _receivers.add(receiver);
- _updateHandler.addSender(sender);
-
- receiver.start();
-
- if (_receivers.size() == 1)
- {
- _updateHandler.start();
- _commandHandler.start();
- }
-
- if (_receivers.size() == _maxConnections)
- {
- _continue = false;
- _serverSocket.close();
-
- }
- }
- catch (IOException ioe)
- {
- System.err.println(ServerReturnCodes.RC_CONNECTION_ERROR);
- System.err.println("Server: error initializing socket: " + ioe); //$NON-NLS-1$
- _continue = false;
- }
- }
- }
-
-
-
-
- private ServerSocket createSocket(String portStr) throws UnknownHostException
- {
- ServerSocket serverSocket = null;
- SSLContext sslContext = null;
- // port
- int port = 0;
-
- if (_dataStore.usingSSL())
- {
- String keyStoreFileName = _dataStore.getKeyStoreLocation();
- String keyStorePassword = _dataStore.getKeyStorePassword();
-
- try
- {
- sslContext = DStoreSSLContext.getServerSSLContext(keyStoreFileName, keyStorePassword);
- }
- catch (Exception e)
- {
-
- }
- }
-
- // determine if portStr is a port range or just a port
- String[] range = portStr.split("-"); //$NON-NLS-1$
- if (range.length == 2)
- {
- int lPort = 0;
- int hPort = 0;
- try
- {
- lPort = Integer.parseInt(range[0]);
- hPort = Integer.parseInt(range[1]);
- }
- catch (Exception e)
- {
- }
-
- for (int i = lPort; i < hPort; i++)
- {
- // create server socket from port
- try
- {
- if (_dataStore.usingSSL() && sslContext != null)
- {
- try
- {
- serverSocket = sslContext.getServerSocketFactory().createServerSocket(i);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- else
- {
- serverSocket = new ServerSocket(i);
- }
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- if (serverSocket != null && serverSocket.getLocalPort() > 0)
- {
- return serverSocket;
- }
- }
- }
- else
- {
- port = Integer.parseInt(portStr);
-
-
- // create server socket from port
- if (_dataStore.usingSSL() && sslContext != null)
- {
- try
- {
- serverSocket = sslContext.getServerSocketFactory().createServerSocket(port);
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- }
- else
- {
- try
- {
- serverSocket = new ServerSocket(port);
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- }
- }
- return serverSocket;
- }
-
- /**
- * Create the DataStore and initializes it's handlers and communications.
- *
- * @param portStr the number of the socket port
- * @param timeoutStr the idle duration to wait before shutting down
- * @param ticketStr validation id required by the client to access the DataStore
- */
- private void setup(String portStr, String timeoutStr, String ticketStr)
- {
- _maxConnections = 1;
-
-
- ArrayList loaders = new ArrayList();
- loaders.add(new ExternalLoader(getClass().getClassLoader(), "*")); //$NON-NLS-1$
- _commandHandler = new ServerCommandHandler(loaders);
- _updateHandler = new ServerUpdateHandler();
-
- ISSLProperties sslProperties = new ServerSSLProperties();
-
- _dataStore = new DataStore(_serverAttributes, _commandHandler, _updateHandler, null);
- _dataStore.setSSLProperties(sslProperties);
-
- DataElement ticket = _dataStore.getTicket();
- System.out.println("ticket="+ticketStr); //$NON-NLS-1$
- ticket.setAttribute(DE.A_NAME, ticketStr);
-
- _updateHandler.setDataStore(_dataStore);
- _commandHandler.setDataStore(_dataStore);
-
- _receivers = new ArrayList();
- _continue = true;
-
- try
- {
-
- _serverSocket = createSocket(portStr);
- if (_serverSocket == null)
- {
- System.err.println(ServerReturnCodes.RC_BIND_ERROR);
- _continue = false;
- }
- else
- {
- // timeout
- if (timeoutStr != null)
- {
- _timeout = Integer.parseInt(timeoutStr);
- }
- else
- {
- _timeout = 120000;
- }
-
- if (_timeout > 0)
- {
- _serverSocket.setSoTimeout(_timeout);
- }
-
- System.err.println(ServerReturnCodes.RC_SUCCESS);
- System.err.println(_serverSocket.getLocalPort());
- try
- {
- System.err.println("Server running on: " + InetAddress.getLocalHost().getHostName()); //$NON-NLS-1$
- }
- catch (UnknownHostException e)
- {
- // keep running
- }
- }
- }
- catch (UnknownHostException e)
- {
- System.err.println(ServerReturnCodes.RC_UNKNOWN_HOST_ERROR);
- _continue = false;
- }
- catch (BindException e)
- {
- System.err.println(ServerReturnCodes.RC_BIND_ERROR);
- _continue = false;
- }
- catch (IOException e)
- {
- System.err.println(ServerReturnCodes.RC_GENERAL_IO_ERROR);
- _continue = false;
- }
- catch (SecurityException e)
- {
- System.err.println(ServerReturnCodes.RC_SECURITY_ERROR);
- _continue = false;
- }
- }
-
- private void run()
- {
- waitForConnections();
- }
-
- private void doHandShake(Socket socket)
- {
- try
- {
- BufferedWriter bwriter = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(), DE.ENCODING_UTF_8));
- PrintWriter writer = new PrintWriter(bwriter);
-
- writer.println(DataStoreAttributes.DATASTORE_VERSION);
- writer.flush();
- }
- catch (IOException e)
- {
- System.out.println(e);
- }
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/MinerLoader.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/MinerLoader.java
deleted file mode 100644
index 92650b3bc..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/MinerLoader.java
+++ /dev/null
@@ -1,419 +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.dstore.core.server;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.java.RemoteClassLoader;
-import org.eclipse.dstore.core.miners.miner.Miner;
-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.ISchemaExtender;
-import org.eclipse.dstore.core.model.ISchemaRegistry;
-import org.eclipse.dstore.core.util.ExternalLoader;
-
-/**
- * MinerLoader is an implementation of <code>ISchemaRegistry</code> used for
- * loading and initializing miners.
- */
-public class MinerLoader implements ISchemaRegistry
-{
-
-
- private DataStore _dataStore;
- private ArrayList _miners;
- private ArrayList _minerList;
- private ArrayList _minerFileList;
- private ArrayList _connectedList;
- private ArrayList _loaders;
- private RemoteClassLoader _remoteLoader;
- private ExternalLoader _externalRemoteLoader;
-
- /**
- * Constructor
- *
- * @param dataStore the associated DataStore
- * @param loaders the list of <code>ExternalLoader</code>s used be the miner loader
- */
- public MinerLoader(DataStore dataStore, ArrayList loaders)
- {
- _dataStore = dataStore;
- _loaders = loaders;
- _miners = new ArrayList();
- _minerList = new ArrayList();
- _minerFileList = new ArrayList();
- _connectedList = new ArrayList();
- }
-
- /**
- * Loads all miners that are specified in the default <i>minerFile.dat</i> as
- * well as any others indicated by <code>DataStore.getMinersLocation</code> that
- * have not yet been loaded.
- */
- public void loadMiners()
- {
- // load the miners
- String pluginDir = _dataStore.getAttribute(DataStoreAttributes.A_PLUGIN_PATH);
-
- // default location
- String defaultMinerFile = pluginDir + File.separator + "minerFile.dat"; //$NON-NLS-1$
- File defaultMF = new File(defaultMinerFile);
- if (defaultMF.exists())
- {
- try
- {
- loadMiners(defaultMinerFile, DE.ENCODING_UTF_8);
- }
- catch (Exception e)
- {
- _dataStore.trace("failed to load minerFile.data with UTF-8. Trying with native encoding"); //$NON-NLS-1$
-
- try
- {
- loadMiners(defaultMinerFile, null);
- }
- catch (Exception ex)
- {
- _dataStore.trace(ex);
- }
- }
- _minerFileList.add(defaultMinerFile);
- }
-
- ArrayList minerLocations = _dataStore.getMinersLocation();
-
- for (int i = 0; i < minerLocations.size(); i++)
- {
- String minersDir = (String) minerLocations.get(i);
- String minerFile = null;
- if (minersDir.endsWith(".dat")) //$NON-NLS-1$
- {
- minerFile = pluginDir + File.separator + minersDir;
- }
- else
- {
- minerFile = pluginDir + File.separator + minersDir + File.separator + "minerFile.dat"; //$NON-NLS-1$
- }
- //_dataStore.trace("load miners for " + minerFile);
- if (!_minerFileList.contains(minerFile))
- {
- try
- {
- loadMiners(minerFile, DE.ENCODING_UTF_8);
- }
- catch (Exception e)
- {
- _dataStore.trace("failed to load minerFile.data with UTF-8. Trying with native encoding"); //$NON-NLS-1$
- try
- {
- loadMiners(minerFile, null);
- }
- catch (Exception ex)
- {
- _dataStore.trace(ex);
- }
- }
- _minerFileList.add(minerFile);
- }
- }
- }
-
- /**
- * Loads that miners specified in a particular miner configuration file (i.e. <i>minerFile.dat</i>)
- * @param minerFile a file specifying a list of miners
- * @return a list of the loaded miners
- */
- public ArrayList loadMiners(String minerFile, String encoding) throws Exception
- {
- // load the miners
- ArrayList unconnectedMiners = new ArrayList();
- File file = new File(minerFile);
-
- FileInputStream inFile = new FileInputStream(file);
- BufferedReader in = null;
- if (encoding == null)
- {
- in = new BufferedReader(new InputStreamReader(inFile));
- }
- else
- {
- in = new BufferedReader(new InputStreamReader(inFile, encoding));
- }
-
- String name = null;
- while ((name = in.readLine()) != null)
- {
- // check name
- name = name.trim();
-
- if (!name.startsWith("#") && (name.length() > 5)) //$NON-NLS-1$
- {
- Miner miner = loadMiner(name);
- if (miner != null)
- {
- unconnectedMiners.add(miner);
- }
- }
- }
-
- connectMiners(unconnectedMiners);
- return _miners;
- }
-
-
-
- public Miner loadMiner(String name)
- {
- Miner miner = null;
- if (!_minerList.contains(name))
- {
- // only load new miners
- try
- {
- ExternalLoader loader = getLoaderFor(name);
- if (loader != null)
- {
- // try to load and instantiate the miner
- // the RemoteClassLoader will kick off a synchronous
- // request to the client for any classes that cannot be found
- // on the host.
- Class theClass = loader.loadClass(name);
- miner = (Miner) theClass.newInstance();
- if (miner != null)
- {
- miner.setExternalLoader(loader);
- _minerList.add(name);
- }
- }
- }
- catch (NoClassDefFoundError e)
- {
- e.printStackTrace();
- handleNoClassFound(e.getMessage().replace('/','.'));
- }
- catch (ClassNotFoundException e)
- {
- e.printStackTrace();
- handleNoClassFound(name);
- }
- catch (InstantiationException e)
- {
- e.printStackTrace();
- }
- catch (IllegalAccessException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- else
- {
- }
- return miner;
- }
-
- private void handleNoClassFound(String name)
- {
- _remoteLoader.loadClassInThread(name);
- }
-
- private void connectMiners(ArrayList unconnectedMiners)
- {
- // init list
- for (int i = 0; i < _miners.size(); i++)
- {
- _connectedList.add(((Miner) _miners.get(i)).getMinerName());
- }
-
- while (unconnectedMiners.size() > 0)
- {
- Miner miner = (Miner) unconnectedMiners.get(0);
- unconnectedMiners.remove(miner);
- if (connectMiner(miner))
- {
- _dataStore.trace("connected " + miner.getMinerName()); //$NON-NLS-1$
- }
- else
- {
- unconnectedMiners.add(miner);
- }
- }
-
- }
-
- public boolean connectMiner(Miner miner)
- {
- boolean canConnect = true;
- ArrayList dependencies = miner.getMinerDependencies();
- for (int i = 0; i < dependencies.size(); i++)
- {
- String dependency = (String) dependencies.get(i);
- if (!_connectedList.contains(dependency))
- {
- canConnect = false;
- }
- }
-
- if (canConnect)
- {
- // set the datastore for the miner
- miner.setDataStore(_dataStore);
- miner.extendSchema(_dataStore.getDescriptorRoot());
- _dataStore.refresh(_dataStore.getDescriptorRoot());
- _miners.add(miner);
- _connectedList.add(miner.getMinerName());
- miner.start();
- }
- return canConnect;
- }
-
- /**
- * Currently not used for the miner loader
- */
- public void registerSchemaExtender(ISchemaExtender extender)
- {
- }
-
- /**
- * Calls <code>extendSchema</code> on each of the loaded miners
- *
- * @param dataStore the DataStore containing the base schema to extend
- */
- public void extendSchema(DataStore dataStore)
- {
- DataElement schemaRoot = dataStore.getDescriptorRoot();
- for (int i = 0; i < _miners.size(); i++)
- {
- Miner miner = (Miner) _miners.get(i);
- miner.extendSchema(schemaRoot);
- }
-
- }
-
- public ExternalLoader getExternalRemoteLoader()
- {
- if (_externalRemoteLoader == null)
- {
- _externalRemoteLoader = new ExternalLoader(getRemoteLoader(), "*"); //$NON-NLS-1$
- }
- return _externalRemoteLoader;
- }
-
- public RemoteClassLoader getRemoteLoader()
- {
- return _dataStore.getRemoteClassLoader();
- }
-
- /**
- * Returns the <code>ExternalLoader</code> for a particular
- * class.
- *
- * @param source a qualified classname
- * @return the loader for the specified class
- */
- public ExternalLoader getLoaderFor(String source)
- {
- ExternalLoader remoteLoader = getExternalRemoteLoader();
-
- // for now we always return the RemoteClassLoader
-
- //if (remoteLoader.canLoad(source))
- if(true)
- {
- //System.out.println("using RemoteClassLoader");
- return remoteLoader;
- }
-
- for (int i = 0; i < _loaders.size(); i++)
- {
- ExternalLoader loader = (ExternalLoader) _loaders.get(i);
- if (loader.canLoad(source))
- {
- // System.out.println("using local loader");
- return loader;
- }
- else
- {
- }
- }
-
- return null;
- }
-
- /**
- * Returns the loaded miners
- *
- * @return the loaded miners
- */
- public ArrayList getMiners()
- {
- return _miners;
- }
-
- /**
- * Returns the miner indicated with the specified name
- *
- * @param name the qualified classname of the miner
- * @return the miner
- */
- public Miner getMiner(String name)
- {
- for (int i = 0; i < _miners.size(); i++)
- {
- Miner miner = (Miner) _miners.get(i);
- if (miner.getClass().getName().equals(name))
- {
- return miner;
- }
- }
-
- return null;
- }
-
- /**
- * Terminates the specified miner
- *
- * @param name the qualified classname of the miner to terminate
- */
- public void finishMiner(String name)
- {
- Miner miner = getMiner(name);
- miner.finish();
- _miners.remove(miner);
- }
-
- /**
- * Terminate all the miners
- */
- public void finishMiners()
- {
- for (int i = 0; i < _miners.size(); i++)
- {
- Miner miner = (Miner) _miners.get(i);
- miner.finish();
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/Server.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/Server.java
deleted file mode 100644
index a522f62fa..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/Server.java
+++ /dev/null
@@ -1,160 +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.dstore.core.server;
-
-import java.util.StringTokenizer;
-
-/**
- * Server is the standard way of instantiating and controlling a remote DataStore.
- * The server runs a ConnectionEstablisher which manages client connections to
- * the DataStore.
- *
- */
-public class Server
-{
-
- private ConnectionEstablisher _establisher;
-
- /**
- * The startup interface to run the Server.
- *
- * @param args a list of arguments for running the server. These consist of
- * the socket port to wait on, the timeout value, and the the ticket
- */
- public static void main(String[] args)
- {
- //Tell the Launcher that we are starting
- System.err.println(ServerReturnCodes.RC_DSTORE_SERVER_MAGIC);
-
- String jversion = System.getProperty("java.version"); //$NON-NLS-1$
-
- StringTokenizer tokenizer = new StringTokenizer(jversion, "."); //$NON-NLS-1$
- try
- {
- String[] vers = new String[3];
- vers[0] = tokenizer.nextToken();
- vers[1] = tokenizer.nextToken();
-
- int version = Integer.parseInt(vers[0]);
- int major = Integer.parseInt(vers[1]);
-
-
- if (version >= 1 && major >= 4)
- {
- // version is good
- }
- else
- {
- // version is bad
- System.err.println(ServerReturnCodes.RC_JRE_VERSION_ERROR);
- System.exit(-1);
- }
- }
- catch (Exception e)
- {
- // version is bad
- System.err.println(ServerReturnCodes.RC_JRE_VERSION_ERROR);
- System.exit(-1);
- }
-
- try
- {
- Server theServer = null;
- switch (args.length)
- {
- case 0 :
- theServer = new Server();
- break;
- case 1 :
- theServer = new Server(args[0]);
- break;
- case 2 :
- theServer = new Server(args[0], args[1]);
- break;
- case 3 :
- theServer = new Server(args[0], args[1], args[2]);
- break;
- default :
- break;
- }
-
-
- if (theServer != null)
- {
- theServer.run();
- }
- }
- catch (SecurityException e)
- {
- System.err.println(ServerReturnCodes.RC_SECURITY_ERROR);
- throw e; // Optional
- }
- }
-
- /**
- * Creates a new Server with default DataStore and connection attributes.
- *
- */
- public Server()
- {
- _establisher = new ConnectionEstablisher();
- }
-
- /**
- * Creates a new Server that waits on the specified socket port.
- *
- * @param port the number of the socket port to wait on
- */
- public Server(String port)
- {
- _establisher = new ConnectionEstablisher(port);
- }
-
- /**
- * Creates a new Server that waits on the specified socket port for
- * the specified time interval before shutting down.
- *
- * @param port the number of the socket port to wait on
- * @param timeout the idle time to wait before shutting down
- */
- public Server(String port, String timeout)
- {
- _establisher = new ConnectionEstablisher(port, timeout);
- }
-
- /**
- * Creates a new Server that waits on the specified socket port for
- * the specified time interval before shutting down.
- *
- * @param port the number of the socket port to wait on
- * @param timeout the idle time to wait before shutting down
- * @param ticket the ticket that the client needs to interact with the DataStore
- */
- public Server(String port, String timeout, String ticket)
- {
- _establisher = new ConnectionEstablisher(port, timeout, ticket);
- }
-
-
- /**
- * Runs the server by starting the ConnectionEstablisher
- */
- public void run()
- {
- _establisher.start();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerAttributes.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerAttributes.java
deleted file mode 100644
index 301aa9f27..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerAttributes.java
+++ /dev/null
@@ -1,72 +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.dstore.core.server;
-
-import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.eclipse.dstore.core.model.DataStoreAttributes;
-
-/**
- * This class is used to store attributes that are required
- * for configurating a remote connection.
- */
-public class ServerAttributes extends DataStoreAttributes
-{
-
- /**
- * Constructor
- */
- public ServerAttributes()
- {
- super();
-
- try
- {
- String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
- if (pluginPath != null) pluginPath = pluginPath.trim();
- if ((pluginPath != null) && (pluginPath.length() > 0))
- {
- File f = new File(pluginPath);
- try
- {
- pluginPath = f.getCanonicalPath();
- }
- catch (Exception e)
- {
- pluginPath = f.getAbsolutePath();
- }
-
- setAttribute(A_PLUGIN_PATH, pluginPath + File.separator);
- }
- else
- {
- setAttribute(A_PLUGIN_PATH, "/home/"); //$NON-NLS-1$
- }
-
- setAttribute(A_LOCAL_NAME, InetAddress.getLocalHost().getHostName());
-
- setAttribute(A_HOST_NAME, "server_host"); //$NON-NLS-1$
- setAttribute(A_HOST_PATH, "/home/"); //$NON-NLS-1$
- }
- catch (UnknownHostException e)
- {
- }
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerCommandHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerCommandHandler.java
deleted file mode 100644
index 27c25afb2..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerCommandHandler.java
+++ /dev/null
@@ -1,496 +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.dstore.core.server;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-import org.eclipse.dstore.core.miners.miner.Miner;
-import org.eclipse.dstore.core.model.CommandHandler;
-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.DataStoreResources;
-import org.eclipse.dstore.core.model.DataStoreSchema;
-import org.eclipse.dstore.core.model.IDataStoreConstants;
-
-/**
- * The ServerCommandHandler is reponsible for maintaining
- * a queue of commands and periodically routing commands
- * from the queue to the appropriate miners.
- */
-public class ServerCommandHandler extends CommandHandler
-{
-
-
- private ArrayList _loaders;
- private MinerLoader _minerLoader;
-
- /**
- * Constructor
- *
- * @param loaders a list of <code>ExternalLoader</code>s used for loading miners
- */
- public ServerCommandHandler(ArrayList loaders)
- {
- super();
- _loaders = loaders;
- }
-
- /**
- * Sets the associated DataStore
- *
- * @param dataStore the associated DataStore
- */
- public void setDataStore(DataStore dataStore)
- {
- super.setDataStore(dataStore);
- }
-
- /**
- * Loads the miners
- */
- public void loadMiners()
- {
- if (_dataStore != null)
- {
- if (_minerLoader == null)
- {
- _minerLoader = new MinerLoader(_dataStore, _loaders);
- }
- // load the miners
- _minerLoader.loadMiners();
-
- }
- }
-
- public Miner loadMiner(String minerId)
- {
-
- if (_dataStore != null)
- {
- if (_minerLoader == null)
- {
- _minerLoader = new MinerLoader(_dataStore, _loaders);
- }
-
- // load and connect the miner
- Miner miner = _minerLoader.loadMiner(minerId);
- if (miner != null)
- {
- _minerLoader.connectMiner(miner);
- }
- return miner;
- }
- return null;
- }
-
- /**
- * Returns the list of loaded miners
- *
- * @return the list of miners
- */
- public ArrayList getMiners()
- {
- return _minerLoader.getMiners();
- }
-
- /**
- * Returns the specified miner
- *
- * @param name the qualified classname of the miner to return
- * @return the miner
- */
- public Miner getMiner(String name)
- {
- return _minerLoader.getMiner(name);
- }
-
- /**
- * Terminates a specified miner
- *
- * @param name the qualified classname of the miner to terminate
- */
- public void finishMiner(String name)
- {
- _minerLoader.finishMiner(name);
- }
-
- /**
- * Called when the DataStore session is finished or when there is
- * an unexpected error.
- */
- public void finish()
- {
- if (_minerLoader != null)
- _minerLoader.finishMiners();
- super.finish();
- }
-
- private void clearDeleted(DataElement element, int depth)
- {
- if (depth > 0 && element != null)
- {
- for (int i = 0; i < element.getNestedSize(); i++)
- {
- DataElement child = element.get(i);
- if (child != null)
- {
- if (child.isReference())
- child = child.dereference();
-
-
- if (child != null)
- {
- if (child.isDeleted())
- {
- element.removeNestedData(child);
- }
- else
- {
- clearDeleted(child, depth - 1);
- }
- }
- }
- }
- }
- }
-
-
- /**
- * Called periodically to route the current queue of commands to the appropriate miners
- */
- public void sendCommands()
- {
- // send commands to the appropriate miners
- while (_commands.size() > 0)
- {
- DataElement command = null;
-
- synchronized (_commands)
- {
- command = (DataElement) _commands.get(0);
- clearDeleted(command, 2);
- _commands.remove(command);
- }
-
- //DKM-status is always last
- DataElement status = command.get(command.getNestedSize() - 1);
- //_dataStore.find(command, DE.A_TYPE,DataStoreResources.model_status"), 1);
-
- String commandSource = command.getSource();
- String commandName = command.getName();
-
-
- if (commandName.equals(DataStoreSchema.C_VALIDATE_TICKET))
- {
- DataElement serverTicket = _dataStore.getTicket();
- DataElement clientTicket = command.get(0);
- String st = serverTicket.getName();
- String ct = clientTicket.getName();
-
- if (st == null || (ct != null && ct.equals(st)))
- {
- serverTicket.setAttribute(DE.A_VALUE,DataStoreResources.model_valid);
- clientTicket.setAttribute(DE.A_VALUE,DataStoreResources.model_valid);
-
- DataElement host = _dataStore.getHostRoot();
- _dataStore.getHashMap().remove(host.getId());
- host.setAttribute(DE.A_ID, "host." + serverTicket.getName()); //$NON-NLS-1$
-
- _dataStore.getHashMap().put(host.getId(), host);
- _dataStore.update(host);
- }
- else
- {
- serverTicket.setAttribute(DE.A_VALUE,DataStoreResources.model_invalid);
- clientTicket.setAttribute(DE.A_VALUE,DataStoreResources.model_invalid);
- }
- _dataStore.update(clientTicket);
- _dataStore.startDataElementRemoverThread();
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(DataStoreSchema.C_SET))
- {
- //DataElement dataObject = command.get(0);
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(DataStoreSchema.C_MODIFY))
- {
- DataElement dataObject = command.get(0);
- DataElement original = _dataStore.find(dataObject.getId());
- original.setAttributes(dataObject.getAttributes());
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(DataStoreSchema.C_SET_HOST))
- {
- DataElement dataObject = command.get(0);
-
- DataElement original = _dataStore.getHostRoot();
- original.setAttributes(dataObject.getAttributes());
-
- _dataStore.setAttribute(DataStoreAttributes.A_LOCAL_PATH, dataObject.getSource());
- _dataStore.setAttribute(DataStoreAttributes.A_HOST_PATH, dataObject.getSource());
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(DataStoreSchema.C_ADD_MINERS))
- {
- DataElement location = command.get(1);
- _dataStore.addMinersLocation(location);
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(DataStoreSchema.C_ACTIVATE_MINER))
- {
- DataElement minerId = command.get(0);
- String minerName = minerId.getName();
- Miner miner = loadMiner(minerName);
- miner.initMiner(status);
- //System.out.println("finished initing "+miner.getMinerName());
- //status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(DataStoreSchema.C_SET_PREFERENCE))
- {
- DataElement dataObject = command.get(0);
- String property = dataObject.getName();
- String value = dataObject.getValue();
- _dataStore.setPreference(property, value);
- }
- else if (commandName.equals(DataStoreSchema.C_QUERY_INSTALL))
- {
- // determine where dstore is located
- status.setAttribute(DE.A_SOURCE, _dataStore.getAttribute(DataStoreAttributes.A_PLUGIN_PATH));
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(DataStoreSchema.C_QUERY_CLIENT_IP))
- {
- // determine where dstore is connected to
- status.setAttribute(DE.A_SOURCE, _dataStore.getRemoteIP());
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(DataStoreSchema.C_QUERY_JVM))
- {
- // get jvm stats
- // check memory consuption
- // if we're running low, try to free some
- Runtime runtime = Runtime.getRuntime();
- runtime.gc();
- long freeMem = runtime.freeMemory();
- long totalMem = runtime.totalMemory();
- long maxMem = runtime.maxMemory();
-
-
- StringBuffer statsBuffer = new StringBuffer();
- statsBuffer.append(freeMem);
- statsBuffer.append(',');
- statsBuffer.append(totalMem);
- statsBuffer.append(',');
- statsBuffer.append(maxMem);
- statsBuffer.append(',');
- statsBuffer.append(_dataStore.getNumElements());
- statsBuffer.append(',');
-
- // last 7 dataelements created
- List lastCreated = _dataStore.getLastCreatedElements();
- for (int i = 0; i < lastCreated.size(); i++)
- {
- DataElement element = (DataElement)lastCreated.get(i);
- statsBuffer.append(element.getName());
- statsBuffer.append(":"); //$NON-NLS-1$
- statsBuffer.append("id="+element.getId()); //$NON-NLS-1$
- statsBuffer.append(";"); //$NON-NLS-1$
- }
-
-
- status.setAttribute(DE.A_SOURCE, statsBuffer.toString());
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(DataStoreSchema.C_SCHEMA))
- {
- loadMiners();
-
- DataElement schemaRoot = _dataStore.getDescriptorRoot();
-
- // update all descriptor objects
- _dataStore.refresh(schemaRoot);
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- }
- else if (commandName.equals(IDataStoreConstants.C_START_SPIRIT))
- {
- _dataStore.receiveStartSpiritCommand();
- status.setAttribute(DE.A_NAME, DataStoreResources.model_done);
- }
- else if (_dataStore.validTicket() && _minerLoader != null)
- {
- if (status != null)
- {
- boolean failure = false;
- ArrayList miners = _minerLoader.getMiners();
- for (int j = 0;(j < miners.size()) && !failure; j++)
- {
- Miner miner = (Miner) miners.get(j);
-
- if (commandSource.equals("*") || commandSource.equals(miner.getClass().getName())) //$NON-NLS-1$
- {
- if (_dataStore.isAutoRefreshOn())
- {
- _dataStore.enableAutoRefresh(false);
- }
- /*
- status = miner.command(command);
-
- if ((status != null) && status.getAttribute(DE.A_NAME).equals(DataStoreResources.model_incomplete))
- {
- failure = true;
- }
- */
- miner.requestCommand(command);
-
-
-
- }
-
- }
- if (commandName.equals(DataStoreSchema.C_INIT_MINERS))
- {
- // old way was to submit this command for all miners at once
- // now we wait til activateMiner call is made per each miner
- // for backward compatibility, we still call init miners
- // so we need to make sure, in cases were miners are loaded dynamically,
- // that we set this to done if there's no miners to init
- status.setAttribute(DE.A_NAME, DataStoreResources.model_done);
- }
- }
-
- }
-
- _dataStore.refresh(status);
-
- }
- }
-
- /**
- * Set the contents of a file with the specified file
- * @param fileName the name of the target file
- * @param file the source file
- */
- public void sendFile(String fileName, File file)
- {
- //_dataStore.saveFile(fileName, file);
- }
-
- /**
- * Sets the contents of a file with bytes sent from the client
- * @param fileName the name of the file to append to
- * @param bytes the bytes of a file to insert
- * @param size the number of bytes to insert
- * @param binary indicates whether to insert the bytes as binary or unicode
- */
- public void sendFile(String fileName, byte[] bytes, int size, boolean binary)
- {
- sendFile(fileName, bytes, size, binary, "default"); //$NON-NLS-1$
- }
-
-/**
- * Sets the contents of a file with bytes sent from the client
- * @param fileName the name of the file to append to
- * @param bytes the bytes of a file to insert
- * @param size the number of bytes to insert
- * @param binary indicates whether to insert the bytes as binary or unicode
- * @param byteStreamHandlerId indicates which byte stream handler should receive the bytes
- */
- public void sendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- _dataStore.saveFile(fileName, bytes, size, binary, byteStreamHandlerId);
- }
-
- /**
- * Appends bytes sent from the client to a file
- * @param fileName the name of the file to append to
- * @param bytes the bytes of a file to append
- * @param size the number of bytes to append
- * @param binary indicates whether to append the bytes as binary or unicode
- */
- public void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary)
- {
- sendAppendFile(fileName, bytes, size, binary, "default"); //$NON-NLS-1$
- }
-
- /**
- * Appends bytes sent from the client to a file
- * @param fileName the name of the file to append to
- * @param bytes the bytes of a file to append
- * @param size the number of bytes to append
- * @param binary indicates whether to append the bytes as binary or unicode
- * @param byteStreamHandlerId indicates which byte stream handler should receive the bytes
- */
- public void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- _dataStore.appendToFile(fileName, bytes, size, binary);
- }
-
- /**
- * Implemented to provide the means by which classes are requested and sent
- * across the comm channel.
- * @param className the name of the class to request
- */
- public synchronized void sendClass(String className)
- {
- sendClass(className, "default"); //$NON-NLS-1$
- }
-
- /**
- * Implemented to provide the means by which classes are requested and sent
- * across the comm channel.
- * @param className the name of the class to request
- */
- public synchronized void sendClass(String className, String classByteStreamHandlerId)
- {
- //_dataStore.sendClass(className, classByteStreamHandlerId);
- }
-
- public void sendClassInstance(IRemoteClassInstance runnable, String classByteStreamHandlerId)
- {
- notifyInput();
- }
-
- /**
- * Does not apply to server. Use ServerUpdateHandler.requestClass().
- */
- public void requestClass(String className)
- {
- }
-
- /**
- * Does not apply to server. Use ServerUpdateHandler.sendKeepAliveConfirmation().
- */
- public void sendKeepAliveConfirmation()
- {
- }
-
- /**
- * Does not apply to server. Use ServerUpdateHandler.sendKeepAliveRequest().
- */
- public void sendKeepAliveRequest()
- {
- }
-
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 0011900c7..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLauncher.java
+++ /dev/null
@@ -1,662 +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.dstore.core.server;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.net.BindException;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-
-import javax.net.ssl.HandshakeCompletedEvent;
-import javax.net.ssl.HandshakeCompletedListener;
-import javax.net.ssl.SSLContext;
-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;
-
-/**
- * This class is the DataStore daemon. It is used for authenticating users,
- * launching DataStore servers under particular user IDs, and providing a client
- * with enough information to conntect to a launched server.
- */
-public class ServerLauncher extends Thread {
-
- /**
- * An instances of this class get loaded whenever a client requests access
- * to a DataStore server. The ConnectionListener attempts to launch a server
- * under the client user's ID, communicating back information to the client
- * so that if may connect to the launched server. If the authentification
- * and connection to the server are successful, ConnectionListener continues
- * to monitor the server connection until it is terminated.
- */
- public class ConnectionListener extends Thread implements
- HandshakeCompletedListener {
-
- private Socket _socket;
-
- private PrintWriter _writer;
-
- private BufferedReader _reader;
-
- private Process _serverProcess;
-
- private String _port;
-
- private boolean _done;
-
- private BufferedReader _outReader;
-
- private BufferedReader _errReader;
-
- /**
- * Constructor
- *
- * @param socket
- * a socket to the daemon
- */
- public ConnectionListener(Socket socket) {
-
- _socket = socket;
- try {
- _writer = new PrintWriter(new OutputStreamWriter(_socket
- .getOutputStream(), DE.ENCODING_UTF_8));
- _reader = new BufferedReader(new InputStreamReader(_socket
- .getInputStream(), DE.ENCODING_UTF_8));
- } catch (java.io.IOException e) {
- System.out.println("ServerLauncher:" + e); //$NON-NLS-1$
- }
- }
-
- /**
- * Called when shutdown
- */
- public void finalize() throws Throwable {
- if (_serverProcess != null) {
- _serverProcess.destroy();
- }
- super.finalize();
- }
-
- /**
- * Listens to the connection and prints any output while the connection
- * is active
- */
- public void run() {
- _done = true;
- if (listen()) {
- if (_serverProcess != null) {
- _done = false;
-
- try {
- String line = null;
-
- while ((_outReader != null)
- && ((line = _outReader.readLine()) != null)) {
- if (line.equals(ServerReturnCodes.RC_FINISHED)) {
- break;
- } else {
- System.out.println(line);
- }
- }
-
- if (_outReader != null) {
- _outReader.close();
- }
- if (_errReader != null) {
- _errReader.close();
- }
-
- _serverProcess.waitFor();
- } catch (Exception e) {
- System.out.println("ServerLauncher:" + e); //$NON-NLS-1$
- }
- }
-
- System.out.println("finished on port " + _port); //$NON-NLS-1$
- _outReader = null;
- _errReader = null;
- _serverProcess = null;
- _done = true;
- } else {
- _done = true;
- }
- }
-
- /**
- * Indicates whether the connection has terminated or not
- *
- * @return true if the connection has terminated
- */
- public boolean isDone() {
- return _done;
- }
-
- /**
- * Returns the DataStore server port used
- *
- * @return the server port
- */
- public String getServerPort() {
- return _port;
- }
-
- private boolean isPortInRange(String portStr, String portRange) {
- if (portRange != null) {
- String[] range = portRange.split("-"); //$NON-NLS-1$
- if (range.length == 2) {
- int lPort = 0;
- int hPort = 0;
- int port = 0;
- try {
- lPort = Integer.parseInt(range[0]);
- hPort = Integer.parseInt(range[1]);
- port = Integer.parseInt(portStr);
- } catch (Exception e) {
- }
-
- return (port >= lPort && port <= hPort);
- }
- }
- return true;
- }
-
- /**
- * Attempt to start a new DataStore server. The port and the ticket for
- * a newly started DataStore are captured and sent back to the client so
- * that it may connect to the server.
- *
- * @return whether the server started successfully
- */
- public boolean listen()
- {
- boolean connected = false;
-
- String user = null;
- String password = null;
-
- _port = null;
- try
- {
- user = _reader.readLine();
- password = _reader.readLine();
- _port = _reader.readLine();
- }
- catch (IOException e)
- {
- e.printStackTrace();
- _port = "0"; //$NON-NLS-1$
- }
-
-
-
- if (_serverPortRange != null && (_port == null || _port.equals("0"))) //$NON-NLS-1$
- {
- _port = _serverPortRange;
- }
-
- {
- boolean isError = false;
- if (_serverPortRange != null && _port != _serverPortRange)
- {
- if (!isPortInRange(_port, _serverPortRange))
- {
- String message = IDataStoreConstants.PORT_OUT_RANGE;
- message += _serverPortRange;
- _writer.println(message);
- isError = true;
- }
- }
- if (!isError)
- {
- // start new server
- try
- {
- String launchStatus = null;
- String ticket = new String("" + System.currentTimeMillis()); //$NON-NLS-1$
-
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
- String timeout = "120000"; //$NON-NLS-1$
-
-
- if (!theOS.toLowerCase().startsWith("win")) //$NON-NLS-1$
- {
- // assuming unix compatable
- //
- // Get the property which
- // contains the authorization
- // script path
- //
- String authPath = System.getProperty("RSE.AUTH"); //$NON-NLS-1$
- File authFile = null;
- if (authPath != null && authPath.length() > 0)
- {
- authFile = new File(authPath);
- }
- if (authFile == null || !authFile.exists())
- {
- authPath = "perl " + _path + File.separator + "auth.pl"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- String authString =
- authPath
- + " " //$NON-NLS-1$
- + user
- + " " //$NON-NLS-1$
- + _path
- + " " //$NON-NLS-1$
- + _port
- + " " //$NON-NLS-1$
- + timeout
- + " " //$NON-NLS-1$
- + ticket
- + " " //$NON-NLS-1$
- + System.getProperty("java.home") //$NON-NLS-1$
- ;
-
- String[] authArray = { "sh", "-c", authString }; //$NON-NLS-1$ //$NON-NLS-2$
-
- // test password
- _serverProcess = Runtime.getRuntime().exec(authArray);
-
- _outReader = new BufferedReader(new InputStreamReader(_serverProcess.getInputStream()));
- _errReader = new BufferedReader(new InputStreamReader(_serverProcess.getErrorStream()));
- BufferedWriter inWriter = new BufferedWriter(new OutputStreamWriter(_serverProcess.getOutputStream()));
- // write password
- inWriter.write(password);
- inWriter.newLine();
- inWriter.flush();
-
- launchStatus = _outReader.readLine();
- }
- else
- {
-
- // launch new server
- String[] cmdArray =
- {
- "java", //$NON-NLS-1$
- "-DA_PLUGIN_PATH=" + _path, //$NON-NLS-1$
- "-DDSTORE_SPIRIT_ON=true", //$NON-NLS-1$
- "org.eclipse.dstore.core.server.Server", //$NON-NLS-1$
- _port,
- timeout,
- ticket};
-
- _serverProcess = Runtime.getRuntime().exec(cmdArray);
- _outReader = new BufferedReader(new InputStreamReader(_serverProcess.getInputStream()));
- _errReader = new BufferedReader(new InputStreamReader(_serverProcess.getErrorStream()));
-
- launchStatus = "success"; //$NON-NLS-1$
- }
-
- if ((launchStatus == null) || !launchStatus.equals("success")) //$NON-NLS-1$
- {
- _writer.println(IDataStoreConstants.AUTHENTICATION_FAILED);
- }
- else
- {
- // look for the server startup string, it needs to occur
- // somewhere in the line.
- String status = _errReader.readLine();
- while (status!=null && (status.indexOf(ServerReturnCodes.RC_DSTORE_SERVER_MAGIC) < 0))
- {
- status = _errReader.readLine();
- }
- // now read the real server status
- if (status != null)
- {
- status = _errReader.readLine();
- }
- if ((status != null) && status.equals(ServerReturnCodes.RC_SUCCESS))
- {
- _port = _errReader.readLine();
- _errReader.readLine();
- _writer.println(IDataStoreConstants.CONNECTED);
- _writer.println(_port);
- _writer.println(ticket);
-
- System.out.println("launched new server on " + _port); //$NON-NLS-1$
- connected = true;
- }
- else
- {
- if (status == null)
- {
- status = new String(IDataStoreConstants.UNKNOWN_PROBLEM);
- }
- // TODO Make sure that the client doesnt try
- // connecting forever
- _writer.println(status);
-
- _serverProcess.destroy();
- _serverProcess = null;
- _outReader.close();
- _outReader = null;
-
- _errReader.close();
- _errReader = null;
- }
- }
-
- }
- catch (IOException e)
- {
- _writer.println(IDataStoreConstants.SERVER_FAILURE + e);
- }
- }
- }
-
- _writer.flush();
-
- // close socket
- try
- {
- _socket.close();
- }
- catch (IOException e)
- {
- System.out.println("ServerLauncher:" + e); //$NON-NLS-1$
- }
-
- return connected;
- }
-
- public void handshakeCompleted(HandshakeCompletedEvent event) {
- System.out.println("handshake completed"); //$NON-NLS-1$
- System.out.println(event);
-
- }
- }
-
- private ServerSocket _serverSocket;
-
- private String _path;
-
- private ArrayList _connections;
-
- private String _serverPortRange;
-
- private ISSLProperties _sslProperties;
-
- public static int DEFAULT_DAEMON_PORT = 4035;
-
- /**
- * Constructor
- */
- public ServerLauncher() {
- String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
- if (pluginPath == null) {
- System.out.println("A_PLUGIN_PATH is not defined"); //$NON-NLS-1$
- System.exit(-1);
- }
- else
- {
- _path = pluginPath.trim();
-
- _connections = new ArrayList();
-
- init(DEFAULT_DAEMON_PORT + ""); //$NON-NLS-1$
- }
- }
-
- /**
- * Constructor
- *
- * @param portStr
- * the port for the daemon socket to run on
- */
- public ServerLauncher(String portStr) {
- String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
- if (pluginPath == null) {
- System.out.println("A_PLUGIN_PATH is not defined"); //$NON-NLS-1$
- System.exit(-1);
- }
- else
- {
- _path = pluginPath.trim();
-
- _connections = new ArrayList();
- init(portStr);
- }
- }
-
- /**
- * Constructor
- *
- * @param portStr
- * the port for the daemon socket to run on
- * @param serverPortRange
- * the port range for launched servers
- */
- public ServerLauncher(String portStr, String serverPortRange) {
- String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
- if (pluginPath == null) {
- System.out.println("A_PLUGIN_PATH is not defined"); //$NON-NLS-1$
- System.exit(-1);
- }
- else
- {
- _path = pluginPath.trim();
-
- _serverPortRange = serverPortRange;
- _connections = new ArrayList();
- init(portStr);
- }
- }
-
- private String getKeyStoreLocation() {
- return _sslProperties.getDaemonKeyStorePath();
- }
-
- private String getKeyStorePassword() {
- return _sslProperties.getDaemonKeyStorePassword();
- }
-
- /**
- * initializes the DataStore daemon
- *
- * @param portStr the daemon port
- */
- public void init(String portStr) {
- // create server socket from port
- _sslProperties = new ServerSSLProperties();
-
- // determine if portStr is a port range or just a port
- String[] range = portStr.split("-"); //$NON-NLS-1$
- if (range.length == 2) {
- int lPort = 0;
- int hPort = 0;
- try {
- lPort = Integer.parseInt(range[0]);
- hPort = Integer.parseInt(range[1]);
- } catch (Exception e) {
- }
-
- boolean socketBound = false;
- for (int i = lPort; i < hPort && !socketBound; i++) {
- // create server socket from port
- try {
- if (_sslProperties.usingSSL()) {
- String keyStoreFileName = getKeyStoreLocation();
- String keyStorePassword = getKeyStorePassword();
-
- try {
- SSLContext sslContext = DStoreSSLContext
- .getServerSSLContext(keyStoreFileName,
- keyStorePassword);
-
- _serverSocket = sslContext.getServerSocketFactory()
- .createServerSocket(i);
- } catch (Exception e) {
- e.printStackTrace();
- }
- } else {
- _serverSocket = new ServerSocket(i);
- }
- if (_serverSocket != null
- && _serverSocket.getLocalPort() > 0) {
- socketBound = true;
- System.out.println("Daemon running on: " //$NON-NLS-1$
- + InetAddress.getLocalHost().getHostName()
- + ", port: " + i); //$NON-NLS-1$
- }
- } catch (UnknownHostException e) {
- System.err
- .println("Networking problem, can't resolve local host"); //$NON-NLS-1$
- e.printStackTrace();
- System.exit(-1);
- } catch (BindException e) {
- System.err.println("socket taken on " + i); //$NON-NLS-1$
- // keep going
- } catch (IOException e) {
- System.err.println("Failure to create ServerSocket"); //$NON-NLS-1$
- e.printStackTrace();
- System.exit(-1);
- }
-
- }
- } else {
- int port = Integer.parseInt(portStr);
- try {
- if (_sslProperties.usingSSL()) {
- String keyStoreFileName = getKeyStoreLocation();
- String keyStorePassword = getKeyStorePassword();
-
- try {
- SSLContext sslContext = DStoreSSLContext
- .getServerSSLContext(keyStoreFileName,
- keyStorePassword);
-
- _serverSocket = sslContext.getServerSocketFactory()
- .createServerSocket(port);
- } catch (Exception e) {
- e.printStackTrace();
- }
- } else {
- _serverSocket = new ServerSocket(port);
- }
- System.out.println("Daemon running on: " //$NON-NLS-1$
- + InetAddress.getLocalHost().getHostName() + ", port: " //$NON-NLS-1$
- + port);
- } catch (UnknownHostException e) {
- System.err
- .println("Networking problem, can't resolve local host"); //$NON-NLS-1$
- e.printStackTrace();
- System.exit(-1);
- } catch (IOException e) {
- System.err.println("Failure to create ServerSocket"); //$NON-NLS-1$
- e.printStackTrace();
- System.exit(-1);
- }
- }
- }
-
- /**
- * Return the connection listener for the specified port if there is one
- *
- * @param port
- * the port
- * @return the listener associated with the port
- */
- protected ConnectionListener getListenerForPort(String port) {
- for (int i = 0; i < _connections.size(); i++) {
- ConnectionListener listener = (ConnectionListener) _connections
- .get(i);
- if (listener.getServerPort().equals(port)) {
- return listener;
- }
- }
-
- return null;
- }
-
- /**
- * Run the daemon
- */
- public void run() {
- while (true) {
- try {
- boolean connectionOkay = true;
- Socket newSocket = _serverSocket.accept();
- if (_sslProperties.usingSSL()) {
-
- SSLSocket sslSocket = (SSLSocket) newSocket;
- sslSocket
- .addHandshakeCompletedListener(new HandshakeCompletedListener() {
-
- public void handshakeCompleted(
- HandshakeCompletedEvent event) {
- System.out.println("handshake completed"); //$NON-NLS-1$
- }
-
- });
- SSLSession session = sslSocket.getSession();
- if (session == null) {
- System.out.println("handshake failed"); //$NON-NLS-1$
-
- sslSocket.close();
- connectionOkay = false;
- }
- }
- if (connectionOkay) {
- ConnectionListener listener = new ConnectionListener(
- newSocket);
- listener.start();
- _connections.add(listener);
- }
- } catch (IOException ioe) {
- System.err.println("Server: error initializing socket: " + ioe); //$NON-NLS-1$
- System.exit(-1);
- }
- }
- }
-
- /**
- * Entry point into the DataStore daemon
- *
- * @param args
- * the port for the daemon to run on (default is 4035).
- * Optionally, the second arg specifies whether to use SSL or
- * not. an optional second arg can be used to specify the port
- * range of servers that get launched
- */
- public static void main(String args[]) {
- if (args.length == 2) {
- ServerLauncher theServer = new ServerLauncher(args[0], args[1]);
- theServer.start();
- } else if (args.length == 1) {
- ServerLauncher theServer = new ServerLauncher(args[0]);
- theServer.start();
- } else {
- ServerLauncher theServer = new ServerLauncher();
- theServer.start();
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java
deleted file mode 100644
index 9cd802c1a..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java
+++ /dev/null
@@ -1,91 +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.dstore.core.server;
-
-import java.net.Socket;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.util.Receiver;
-
-/**
- * The ServerReciever is responsible for recieving data from
- * the client side.
- */
-public class ServerReceiver extends Receiver
-{
-
- private ConnectionEstablisher _connection;
-
- /**
- * Constructor
- *
- * @param socket the socket to receive from
- * @param connection the connection establisher
- */
- public ServerReceiver(Socket socket, ConnectionEstablisher connection)
- {
- super(socket, connection.getDataStore());
- _connection = connection;
- }
-
-
- /**
- * Implementation for handling the receiving on documents on
- * the server side.
- *
- * @param documentObject to tree root of received data.
- */
- public void handleDocument(DataElement documentObject)
- {
- // parse request and determine what is wanted
- for (int a = 0; a < documentObject.getNestedSize(); a++)
- {
- DataElement rootOutput = documentObject.get(a);
-
- DataElement log = _dataStore.getLogRoot();
- log.addNestedData(rootOutput, false);
-
- if (rootOutput.getName().equals("C_EXIT")) //$NON-NLS-1$
- {
- finish();
-
- }
- else
- {
- _dataStore.command(rootOutput);
- }
- }
- }
-
- public void finish()
- {
- super.finish();
- _connection.finished(this);
- }
-
- /**
- * @see Receiver#finish()
- */
- public void handleError(Throwable e)
- {
- System.out.println("RECEIVER ERROR"); //$NON-NLS-1$
- // e.printStackTrace();
- System.out.println(e);
- _connection.finished(this);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReturnCodes.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReturnCodes.java
deleted file mode 100644
index 746935836..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReturnCodes.java
+++ /dev/null
@@ -1,39 +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.dstore.core.server;
-
-/**
- * This class contains a list of server return codes that are used
- * to negociate server communication with a client
- */
-public class ServerReturnCodes
-{
- public static final String RC_DSTORE_SERVER_MAGIC = "DStore Server Starting..."; //$NON-NLS-1$
-
- public static final String RC_SUCCESS = "Server Started Successfully"; //$NON-NLS-1$
-
- public static final String RC_UNKNOWN_HOST_ERROR = "Unknown host error"; //$NON-NLS-1$
- public static final String RC_BIND_ERROR = "Error binding socket"; //$NON-NLS-1$
- public static final String RC_GENERAL_IO_ERROR = "General IO error creating socket"; //$NON-NLS-1$
- public static final String RC_CONNECTION_ERROR = "Connection error"; //$NON-NLS-1$
-
- public static final String RC_SECURITY_ERROR = "Security error creating socket"; //$NON-NLS-1$
-
- public static final String RC_FINISHED = "Server Finished"; //$NON-NLS-1$
-
- public static final String RC_JRE_VERSION_ERROR = "JRE 1.4 or higher required"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerSSLProperties.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerSSLProperties.java
deleted file mode 100644
index 29bf607b1..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerSSLProperties.java
+++ /dev/null
@@ -1,147 +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.dstore.core.server;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.dstore.core.model.ISSLProperties;
-
-
-public class ServerSSLProperties implements ISSLProperties
-{
- private boolean _enableSSL = false;
- private boolean _disableServerSSL = false;
-
- private String _daemonKeyStorePath;
- private String _daemonKeyStorePassword;
-
- private String _serverKeyStorePath;
- private String _serverKeyStorePassword;
-
-
- private static final String ENABLE_SSL = "enable_ssl"; //$NON-NLS-1$
- private static final String DISABLE_SERVER_SSL = "disable_server_ssl"; //$NON-NLS-1$
-
- private static final String DAEMON_KEYSTORE_FILE = "daemon_keystore_file"; //$NON-NLS-1$
- private static final String DAEMON_KEYSTORE_PASSWORD = "daemon_keystore_password"; //$NON-NLS-1$
-
- private static final String SERVER_KEYSTORE_FILE = "server_keystore_file"; //$NON-NLS-1$
- private static final String SERVER_KEYSTORE_PASSWORD = "server_keystore_password"; //$NON-NLS-1$
-
-
- public ServerSSLProperties()
- {
- try
- {
- ResourceBundle properties = ResourceBundle.getBundle("ssl"); //$NON-NLS-1$
- _enableSSL = properties.getString(ENABLE_SSL).trim().equals("true"); //$NON-NLS-1$
- if (_enableSSL)
- {
- try
- {
- _disableServerSSL = properties.getString(DISABLE_SERVER_SSL).trim().equals("true"); //$NON-NLS-1$
- }
- catch (Exception e)
- {
-
- }
-
- try
- {
- _daemonKeyStorePath = properties.getString(DAEMON_KEYSTORE_FILE).trim();
- _daemonKeyStorePassword = properties.getString(DAEMON_KEYSTORE_PASSWORD).trim();
- }
- catch (Exception e)
- {
- }
-
- if (!_disableServerSSL)
- {
- try
- {
- _serverKeyStorePath = properties.getString(SERVER_KEYSTORE_FILE).trim();
- _serverKeyStorePassword = properties.getString(SERVER_KEYSTORE_PASSWORD).trim();
- }
- catch (Exception e)
- {
- }
- }
-
- if (_daemonKeyStorePath == null && _serverKeyStorePath != null)
- {
- _daemonKeyStorePath = _serverKeyStorePath;
- _daemonKeyStorePassword = _serverKeyStorePassword;
- }
- if (!_disableServerSSL && _serverKeyStorePath == null && _daemonKeyStorePath != null)
- {
- _serverKeyStorePath = _daemonKeyStorePath;
- _serverKeyStorePassword = _daemonKeyStorePassword;
- }
-
- }
-
- if (_enableSSL)
- {
- System.out.println("SSL Settings"); //$NON-NLS-1$
- System.out.println("[daemon keystore:\t"+_daemonKeyStorePath+"]"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("[daemon keystore pw:\t"+_daemonKeyStorePassword+"]"); //$NON-NLS-1$ //$NON-NLS-2$
- if (!_disableServerSSL)
- {
- System.out.println("[server keystore:\t"+_serverKeyStorePath+"]"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("[server keystore pw:\t"+_serverKeyStorePassword+"]"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
-
- public boolean usingSSL()
- {
- return _enableSSL;
- }
-
- public boolean usingServerSSL()
- {
- return !_disableServerSSL;
- }
-
-
- public String getDaemonKeyStorePath()
- {
- return _daemonKeyStorePath;
- }
-
- public String getServerKeyStorePath()
- {
- return _serverKeyStorePath;
- }
-
- public String getDaemonKeyStorePassword()
- {
- return _daemonKeyStorePassword;
- }
-
- public String getServerKeyStorePassword()
- {
- return _serverKeyStorePassword;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerUpdateHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerUpdateHandler.java
deleted file mode 100644
index 9d563ce77..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerUpdateHandler.java
+++ /dev/null
@@ -1,462 +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.dstore.core.server;
-
-import java.net.Socket;
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-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.DataStoreResources;
-import org.eclipse.dstore.core.model.UpdateHandler;
-import org.eclipse.dstore.core.util.CommandGenerator;
-import org.eclipse.dstore.core.util.Sender;
-
-/**
- * The ServerUpdateHandler is contains a queue of data update requests
- * and periodically transmits it's queue to the client
- */
-public class ServerUpdateHandler extends UpdateHandler
-{
-
-
- private ArrayList _senders;
- private CommandGenerator _commandGenerator;
- protected DataElement _classDocumentElement;
- protected DataElement _keepAliveDocumentElement;
- protected DataElement _confirmKeepAliveDocumentElement;
- protected DataElement _pendingKeepAliveRequest;
- protected DataElement _pendingKeepAliveConfirmation;
-
- private static String[] _keepAliveAttributes = {
- DataStoreResources.KEEPALIVE_TYPE,
- "server.keepalive.root.id", //$NON-NLS-1$
- "server.keepalive", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _confirmKeepAliveAttributes = {
- DataStoreResources.KEEPALIVECONFIRM_TYPE,
- "server.keepalive.confirm.root.id", //$NON-NLS-1$
- "server.confirmkeepalive", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _docAttributes = {
- DataStoreResources.DOCUMENT_TYPE,
- "server.doc.root.id", //$NON-NLS-1$
- "server.document", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _fileAttributes = {
- DataStoreResources.FILE_TYPE,
- "server.file.root.id", //$NON-NLS-1$
- "server.file", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _classAttributes = {
- DataStoreResources.CLASS_TYPE,
- "server.class.root.id", //$NON-NLS-1$
- "server.class", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _requestClassAttributes = {
- DataStoreResources.REQUEST_CLASS_TYPE,
- "server.requestclass.root.id", //$NON-NLS-1$
- "server.requestclass", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- private static String[] _serializeAttributes = {
- DataStoreResources.SERIALIZED_TYPE,
- "server.serialized.root.id", //$NON-NLS-1$
- "server.serialized", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- protected DataElement _fileDocumentElement;
- protected DataElement _docDocumentElement;
- protected DataElement _requestClassDocumentElement;
- protected DataElement _serializedDocumentElement;
-
- /**
- * Constructor
- */
- public ServerUpdateHandler()
- {
- _senders = new ArrayList();
- _commandGenerator = new CommandGenerator();
-
- }
-
- /**
- * Sets the associated DataStore
- */
- public void setDataStore(DataStore dataStore)
- {
- super.setDataStore(dataStore);
- _commandGenerator.setDataStore(dataStore);
- _fileDocumentElement = dataStore.createTransientObject(_fileAttributes);
- _docDocumentElement = dataStore.createObject(null, _docAttributes);
- _requestClassDocumentElement = dataStore.createTransientObject(_requestClassAttributes);
- _serializedDocumentElement = dataStore.createTransientObject(_serializeAttributes);
- _classDocumentElement = dataStore.createTransientObject(_classAttributes);
- _keepAliveDocumentElement = dataStore.createTransientObject(_keepAliveAttributes);
- _confirmKeepAliveDocumentElement = dataStore.createTransientObject(_confirmKeepAliveAttributes);
-
- }
-
- /**
- * Add a sender to the list of senders. Normally there is only one
- * client for the server, which requires one <code>Sender</code>. If
- * there are more than one clients, then this is how senders are added.
- *
- * @param sender a sender connected to a socket
- */
- public void addSender(Sender sender)
- {
- _senders.add(sender);
- }
-
- /**
- * Remove a sender from the list of senders.
- * @param sender the sender to remove
- */
- public void removeSender(Sender sender)
- {
- _senders.remove(sender);
- if (_senders.size() == 0)
- {
- finish();
- }
- }
-
- /**
- * Sends bytes to the specified file on the client.
- *
- * @param path the name of the file on the client
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes and binary or text
- */
- public synchronized void updateFile(String path, byte[] bytes, int size, boolean binary)
- {
- updateFile(path, bytes, size, binary, DataStoreResources.DEFAULT_BYTESTREAMHANDLER);
- }
-
- /**
- * Sends bytes to the specified file on the client.
- *
- * @param path the name of the file on the client
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes and binary or text
- * @param byteStreamHandlerId indicates the byte stream handler to receive the bytes
- *
- */
- public synchronized void updateFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- //DataElement document = _dataStore.createObject(null, DataStoreResources.FILE_TYPE, byteStreamHandlerId, path, path);
- DataElement document = _fileDocumentElement;
- document.setAttribute(DE.A_NAME, byteStreamHandlerId);
- document.setAttribute(DE.A_VALUE, byteStreamHandlerId);
- document.setAttribute(DE.A_SOURCE, path);
- document.setPendingTransfer(true);
- document.setParent(null);
-
- for (int j = 0; j < _senders.size(); j++)
- {
- Sender sender = (Sender) _senders.get(j);
- sender.sendFile(document, bytes, size, binary);
- }
- }
-
- /**
- * Appends bytes to the specified file on the client.
- *
- * @param path the name of the file on the client
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes and binary or text
- */
- public synchronized void updateAppendFile(String path, byte[] bytes, int size, boolean binary)
- {
- updateAppendFile(path, bytes, size, binary, DataStoreResources.DEFAULT_BYTESTREAMHANDLER);
- }
-
-/**
- * Appends bytes to the specified file on the client.
- *
- * @param path the name of the file on the client
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- * @param binary indicates whether to send the bytes and binary or text
- * @param byteStreamHandlerId indicates the byte stream handler to receive the bytes
- */
- public synchronized void updateAppendFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
- {
- //DataElement document = _dataStore.createObject(null, DataStoreResources.FILE_TYPE, byteStreamHandlerId, path, path);
- DataElement document = _fileDocumentElement;
- document.setAttribute(DE.A_NAME, byteStreamHandlerId);
- document.setAttribute(DE.A_VALUE, byteStreamHandlerId);
- document.setAttribute(DE.A_SOURCE, path);
- document.setPendingTransfer(true);
- document.setParent(null);
-
- for (int j = 0; j < _senders.size(); j++)
- {
- Sender sender = (Sender) _senders.get(j);
- sender.sendAppendFile(document, bytes, size, binary);
- }
- }
-
-
- /**
- * Periodically called on the handler thread to sends data updates.
- */
- public void handle()
- {
- if (!_dataObjects.isEmpty() || _pendingKeepAliveConfirmation != null || _pendingKeepAliveRequest != null || !_classesToSend.isEmpty())
- {
- sendUpdates();
- }
- }
-
- /**
- * Periodically called to send data in the queue from the server to the client
- */
- public void sendUpdates()
- {
- synchronized (_dataObjects)
- {
- //DataElement document = _dataStore.createObject(null, DataStoreResources.DOCUMENT_TYPE, "server.doc");
- DataElement document = _docDocumentElement;
- document.removeNestedData();
- document.setPendingTransfer(true);
- document.setUpdated(true);
- document.setParent(null);
-
- _commandGenerator.generateResponse(document, _dataObjects);
-
- for (int j = 0; j < _senders.size(); j++)
- {
- Sender sender = (Sender) _senders.get(j);
- sender.sendDocument(document, 5);
- if (_pendingKeepAliveConfirmation != null)
- {
- sender.sendKeepAliveConfirmation(_pendingKeepAliveConfirmation);
- _pendingKeepAliveConfirmation = null;
- }
- if (_pendingKeepAliveRequest != null)
- {
- sender.sendKeepAliveRequest(_pendingKeepAliveRequest);
- _pendingKeepAliveRequest = null;
- }
- }
-
- for (int i = 0; i < _dataObjects.size(); i++)
- {
- DataElement obj = (DataElement) _dataObjects.get(i);
- clean(obj);
- }
-
- _dataObjects.clear();
- //_dataStore.getLogRoot().removeNestedData();
- //_dataStore.getTempRoot().removeNestedData();
- }
-
- // finished sending updates, now send all classes that are waiting
- // in the queue
- while (_classesToSend.size() > 0)
- {
- DataElement document = null;
- synchronized (_classesToSend)
- {
- document = (DataElement)_classesToSend.remove(0);
- for (int i = 0; i < _senders.size(); i++)
- {
- Sender sender = (Sender) _senders.get(i);
- sender.sendClass(document);
- }
- }
- }
-
- }
-
- /**
- * Removes the sender that is associated with the specified socket. This causes
- * A disconnect for the client that is associated with this socket.
- *
- * @param socket the socket on which a sender communicates
- */
- public void removeSenderWith(Socket socket)
- {
- for (int i = 0; i < _senders.size(); i++)
- {
- Sender sender = (Sender) _senders.get(i);
- if (sender.socket() == socket)
- {
- // sender sends last ack before death
- DataElement document = _dataStore.createObject(null, DataStoreResources.DOCUMENT_TYPE, "exit", "exit"); //$NON-NLS-1$ //$NON-NLS-2$
- sender.sendDocument(document, 2);
- removeSender(sender);
- }
- }
- }
-
- /**
- * Implemented to provide the means by which classes are sent
- * across the comm channel.
- * @param className the name of the class to request
- */
- public synchronized void requestClass(String className)
- {
- DataElement document = _requestClassDocumentElement;
- document.setPendingTransfer(true);
- document.setAttribute(DE.A_NAME, className);
- document.setAttribute(DE.A_VALUE, className);
- document.setParent(null);
- //DataElement document = _dataStore.createObject(null, DataStoreResources.REQUEST_CLASS_TYPE, className);
-
- for (int j = 0; j < _senders.size(); j++)
- {
- Sender sender = (Sender) _senders.get(j);
- sender.requestClass(document);
- }
-
- }
-
-
- public synchronized void updateClassInstance(IRemoteClassInstance runnable, String deserializebyteStreamHandlerId)
- {
- DataElement document = _serializedDocumentElement;
- document.setAttribute(DE.A_NAME, runnable.toString());
- document.setAttribute(DE.A_SOURCE, deserializebyteStreamHandlerId);
- document.setPendingTransfer(true);
- document.setParent(null);
-
- for (int j = 0; j < _senders.size(); j++)
- {
- Sender sender = (Sender) _senders.get(j);
- sender.sendRemoteClassRunnable(document, runnable);
- }
- notifyInput();
- }
-
- /**
- * Implemented to provide the means by which classes are sent
- * across the comm channel.
- * @param className the name of the class to send
- * @param classByteStreamHandlerId the name of the byte stream handler to use to receive the class
- */
- public synchronized void sendClass(String className, String classByteStreamHandlerId)
- {
- // send pending updates before sending class
- if (_dataObjects.size() > 0)
- sendUpdates();
-
- DataElement document = _classDocumentElement;
- document.setAttribute(DE.A_NAME, className);
- document.setAttribute(DE.A_SOURCE, classByteStreamHandlerId);
- document.setPendingTransfer(true);
- document.setParent(null);
-
- addClassToSend(document);
- }
-
- /**
- * Adds a class to the queue of classes (represented by DataElements) to
- * be sent to the client.
- * @param classElement the DataElement representing the class to be sent
- */
- public void addClassToSend(DataElement classElement)
- {
- synchronized (_classesToSend)
- {
- if (!_classesToSend.contains(classElement))
- {
- _classesToSend.add(classElement);
- }
- }
- }
-
- /**
- * Implemented to provide the means by which classes are requested and sent
- * across the comm channel.
- * @param className the name of the class to send
- */
- public synchronized void sendClass(String className)
- {
- sendClass(className, "default"); //$NON-NLS-1$
- }
-
- public void sendKeepAliveRequest()
- {
- DataElement document = _keepAliveDocumentElement;
- document.setPendingTransfer(true);
- document.setAttribute(DE.A_NAME, "request"); //$NON-NLS-1$
- document.setAttribute(DE.A_VALUE, "request"); //$NON-NLS-1$
- document.setParent(null);
- _pendingKeepAliveRequest = document;
- notifyInput();
- }
-
- public void sendKeepAliveConfirmation()
- {
- DataElement document = _confirmKeepAliveDocumentElement;
- document.setPendingTransfer(true);
- document.setAttribute(DE.A_NAME, "confirm"); //$NON-NLS-1$
- document.setAttribute(DE.A_VALUE, "confirm"); //$NON-NLS-1$
- document.setParent(null);
- _pendingKeepAliveConfirmation = document;
- notifyInput();
- }
-
- public synchronized void waitForInput()
- {
- if (_dataObjects.size() == 0 && _classesToSend.size() == 0 && _pendingKeepAliveConfirmation == null && _pendingKeepAliveRequest == null)
- {
- super.waitForInput();
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/CommandGenerator.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/CommandGenerator.java
deleted file mode 100644
index 9d29f3511..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/CommandGenerator.java
+++ /dev/null
@@ -1,310 +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.dstore.core.util;
-
-import java.util.ArrayList;
-
-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.DataStoreResources;
-
-/**
- * This class is used to generate command object instances from command descriptors and arguments to commands.
- * Command instances are instances of command descriptors. Each command instance contains a set of data arguments
- * and a status object, that represents the current state of a command. After a command instance is created,
- * it is referenced in the command log for the DataStore.
- */
-public class CommandGenerator
-{
- private DataStore _dataStore = null;
- private DataElement _log = null;
-
- static private int _id = 0;
-
- /**
- * Constructor
- */
- public CommandGenerator()
- {
- }
-
- /**
- * Sets the associated DataStore
- * @param dataStore the associated DataStore
- */
- public void setDataStore(DataStore dataStore)
- {
- _dataStore = dataStore;
- _log = _dataStore.getLogRoot();
- }
-
- /**
- * This method logs the current command object in the DataStore command log. For each
- * logged command, a status object is created and returned.
- * @param commandObject the commandObject to log
- * @return the status object of the command
- */
- public DataElement logCommand(DataElement commandObject)
- {
- try
- {
- // create time and status objects
- StringBuffer id = new StringBuffer(commandObject.getId());
- id.append(DataStoreResources.model_status);
- _dataStore.createObject(
- commandObject,
- DataStoreResources.model_status,
- DataStoreResources.model_start,
- "", //$NON-NLS-1$
- id.toString());
-
- _log.addNestedData(commandObject, false);
-
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
-
- return commandObject;
- }
-
- /**
- * Creates a new command instance object from a command descriptor
- * @param commandDescriptor the descriptor of the command to create
- * @return the new command instance
- */
- public DataElement createCommand(DataElement commandDescriptor)
- {
- if (commandDescriptor != null)
- {
- if (commandDescriptor.getType().equals(DE.T_COMMAND_DESCRIPTOR))
- {
- DataElement commandInstance = _dataStore.createObject(null, commandDescriptor.getName(), commandDescriptor.getValue(), commandDescriptor.getSource());
- commandInstance.setDescriptor(commandDescriptor);
- return commandInstance;
- }
- else
- {
- System.out.println("not cd -> " + commandDescriptor); //$NON-NLS-1$
- return null;
- }
- }
- else
- {
- return null;
- }
- }
-
- private void clearDeleted(DataElement element)
- {
- for (int i = 0; i < element.getNestedSize(); i++)
- {
- DataElement child = element.get(i).dereference();
- if (child.isDeleted())
- {
- element.removeNestedData(child);
- }
- }
- }
-
- /**
- * Creates a new command from a command descriptor and it's arguments.
- *
- * @param commandDescriptor the command type of the new command
- * @param arguments the arguments for the command, besides the subject
- * @param dataObject the subject of the command
- * @param refArg indicates whether the subject should be represented as a reference or directly
- * @return the status object of the command
- */
- public DataElement generateCommand(DataElement commandDescriptor, ArrayList arguments, DataElement dataObject, boolean refArg)
- {
-
- DataElement commandObject = createCommand(commandDescriptor);
- if (commandObject != null)
- {
- clearDeleted(dataObject);
-
- commandObject.setAttribute(DE.A_VALUE, commandDescriptor.getName());
-
- if (dataObject.isUpdated() && !dataObject.isSpirit())
- {
- _dataStore.createReference(commandObject, dataObject,DataStoreResources.model_contents);
- }
- else
- {
- dataObject.setPendingTransfer(true);
- commandObject.addNestedData(dataObject, false);
- }
-
- if (arguments != null)
- {
- for (int i = 0; i < arguments.size(); i++)
- {
- DataElement arg = (DataElement) arguments.get(i);
- if (arg != null)
- {
- if (!arg.isUpdated() || arg.isSpirit())
- {
- commandObject.addNestedData(arg, false);
- }
- else
- {
- _dataStore.createReference(commandObject, arg, "argument"); //$NON-NLS-1$
- }
- }
- }
- }
-
- return logCommand(commandObject);
- }
- else
- {
- return null;
- }
- }
-
-
- /**
- * Creates a new command from a command descriptor and it's arguments.
- *
- * @param commandDescriptor the command type of the new command
- * @param arg the arguement for the command, besides the subject
- * @param dataObject the subject of the command
- * @param refArg indicates whether the subject should be represented as a reference or directly
- * @return the status object of the command
- */
- public DataElement generateCommand(DataElement commandDescriptor, DataElement arg, DataElement dataObject, boolean refArg)
- {
- _id++;
-
- DataElement commandObject = createCommand(commandDescriptor);
- if (commandObject != null)
- {
- commandObject.setAttribute(DE.A_VALUE, commandDescriptor.getName());
- clearDeleted(dataObject);
- if ((refArg || dataObject.isUpdated()) && !dataObject.isSpirit())
- {
- _dataStore.createReference(commandObject, dataObject,DataStoreResources.model_contents);
- }
- else
- {
- dataObject.setPendingTransfer(true);
- commandObject.addNestedData(dataObject, false);
- }
-
- if (!arg.isUpdated() || arg.isSpirit())
- {
- commandObject.addNestedData(arg, false);
- }
- else
- {
- _dataStore.createReference(commandObject, arg, "argument"); //$NON-NLS-1$
- }
-
-
- return logCommand(commandObject);
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Creates a new command from a command descriptor and it's arguments.
- *
- * @param commandDescriptor the command type of the new command
- * @param dataObject the subject of the command
- * @param refArg indicates whether the subject should be represented as a reference or directly
- * @return the status object of the command
- */
- public DataElement generateCommand(DataElement commandDescriptor, DataElement dataObject, boolean refArg)
- {
- _id++;
-
- DataElement commandObject = createCommand(commandDescriptor);
- if (commandObject != null)
- {
- commandObject.setAttribute(DE.A_VALUE, commandDescriptor.getName());
-
- clearDeleted(dataObject);
- if ((refArg || dataObject.isUpdated()) && !dataObject.isSpirit())
- {
- _dataStore.createReference(commandObject, dataObject,DataStoreResources.model_arguments);
- }
- else
- {
- dataObject.setPendingTransfer(true);
- commandObject.addNestedData(dataObject, false);
- }
-
- return logCommand(commandObject);
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Creates a response tree for transmitting a set of data from a server to a client.
- *
- * @param document the root of the response
- * @param objects the data contained in the response
- * @return the response tree root
- */
- public DataElement generateResponse(DataElement document, ArrayList objects)
- {
- document.addNestedData(objects, false);
- return document;
- }
-
- /**
- * Creates a response tree for transmitting a set of data from a server to a client.
- *
- * @param responseType the type of data to respond with
- * @param dataObject the child object in the response tree
- * @return the response tree root
- */
- public DataElement generateResponse(String responseType, DataElement dataObject)
- {
- if (dataObject != null)
- {
- DataElement commandObject = _dataStore.createObject(null, "RESPONSE", responseType); //$NON-NLS-1$
- commandObject.addNestedData(dataObject, true);
- return commandObject;
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Creates a simple response object of the specified type
- *
- * @param responseType the type of data to respond with
- * @return the response object
- */
- public DataElement generateResponse(String responseType)
- {
- DataElement commandObject = _dataStore.createObject(null, "RESPONSE", responseType); //$NON-NLS-1$
- return commandObject;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/DataElementRemover.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/DataElementRemover.java
deleted file mode 100644
index 23d0e6567..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/DataElementRemover.java
+++ /dev/null
@@ -1,195 +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.dstore.core.util;
-
-import java.util.LinkedList;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.dstore.core.model.Handler;
-import org.eclipse.dstore.core.model.IDataStoreConstants;
-
-public class DataElementRemover extends Handler
-{
- private LinkedList _queue;
- private static int numRemoved = 0;
- private static int numDisconnected = 0;
- private static int numCreated = 0;
- private static int numGCed = 0;
-
- // The following determine how DataElements are chosen to be removed once they
- // are in the queue for removal.
- // The queue is checked every _intervalTime milliseconds and all elements
- // that are older than _expiryTime milliseconds are removed.
- public static final int DEFAULT_EXPIRY_TIME = 600; // in seconds
- public static final int DEFAULT_INTERVAL_TIME = 60; // in seconds
- private int _intervalTime = DEFAULT_INTERVAL_TIME * 1000;
- private int _expiryTime = DEFAULT_EXPIRY_TIME * 1000;
- public static final String EXPIRY_TIME_PROPERTY_NAME = "SPIRIT_EXPIRY_TIME"; //$NON-NLS-1$
- public static final String INTERVAL_TIME_PROPERTY_NAME = "SPIRIT_INTERVAL_TIME"; //$NON-NLS-1$
-
- public DataElementRemover(DataStore dataStore)
- {
- super();
- _dataStore = dataStore;
- _queue = new LinkedList();
- getTimes();
- setWaitTime(_intervalTime);
- DataElement spiritnode = _dataStore.createObjectDescriptor(_dataStore.getDescriptorRoot(), IDataStoreConstants.DATASTORE_SPIRIT_DESCRIPTOR);
- _dataStore.createCommandDescriptor(spiritnode, "StartSpirit", "DataElementRemover", IDataStoreConstants.C_START_SPIRIT); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.refresh(_dataStore.getDescriptorRoot());
- }
-
- protected void getTimes()
- {
- try
- {
- String expiryTime = System.getProperty(EXPIRY_TIME_PROPERTY_NAME);
- if (expiryTime != null && !expiryTime.equals("")) _expiryTime = Integer.parseInt(expiryTime) * 1000; //$NON-NLS-1$
- }
- catch (Exception e)
- {
- System.out.println("Invalid spirit expiry time property, using default."); //$NON-NLS-1$
- _expiryTime = DEFAULT_EXPIRY_TIME;
- }
- try
- {
- String intervalTime = System.getProperty(INTERVAL_TIME_PROPERTY_NAME);
- if (intervalTime != null && !intervalTime.equals("")) _intervalTime = Integer.parseInt(intervalTime) * 1000; //$NON-NLS-1$
- }
- catch (Exception e)
- {
- System.out.println("Invalid spirit interval time property, using default."); //$NON-NLS-1$
- _intervalTime = DEFAULT_INTERVAL_TIME;
- }
- }
-
- public static void addToRemovedCount()
- {
- numRemoved++;
- }
-
- public static void addToCreatedCount()
- {
- numCreated++;
- }
-
- public static void addToGCedCount()
- {
- numGCed++;
- }
-
- public synchronized void addToQueueForRemoval(DataElement element)
- {
- synchronized (_queue)
- {
- if (_dataStore.isDoSpirit() && _dataStore == element.getDataStore())
- {
- QueueItem item = new QueueItem(element, System.currentTimeMillis());
- _queue.add(item);
- }
- }
- }
-
- public void handle()
- {
- clearQueue();
- }
-
- public synchronized void clearQueue()
- {
- synchronized (_queue)
- {
- _dataStore.memLog(" "); //$NON-NLS-1$
- int disconnected = 0;
- if (!_dataStore.isDoSpirit())
- {
- if (_queue.size() > 0)
- {
- _dataStore.memLog("Clearing queue of size " + _queue.size() + ". DSTORE_SPIRIT_ON not set or set to false."); //$NON-NLS-1$ //$NON-NLS-2$
- _queue.clear();
- }
- _dataStore.memLog("Total heap size: " + Runtime.getRuntime().totalMemory()); //$NON-NLS-1$
- _dataStore.memLog("Elements created so far: " + numCreated); //$NON-NLS-1$
- _dataStore.memLog("Elements disconnected so far: " + numDisconnected); //$NON-NLS-1$
- _dataStore.memLog("Spirit elements cleaned so far: " + numRemoved); //$NON-NLS-1$
- _dataStore.memLog("DataElements GCed so far: " + numGCed); //$NON-NLS-1$
- return;
- }
- _dataStore.memLog("Total heap size before disconnection: " + Runtime.getRuntime().totalMemory()); //$NON-NLS-1$
-
- _dataStore.memLog("Size of queue: " + _queue.size()); //$NON-NLS-1$
-
- while (_queue.size() > 0 && System.currentTimeMillis() - ((QueueItem) _queue.getFirst()).timeStamp > _expiryTime)
- {
- DataElement toBeDisconnected = ((QueueItem) _queue.removeFirst()).dataElement;
- if (!toBeDisconnected.isSpirit())
- {
- toBeDisconnected.setSpirit(true);
- _dataStore.refresh(toBeDisconnected);
- disconnected++;
- numDisconnected++;
- }
- else
- {
- //_dataStore.memLog(toBeDisconnected.toString());
- }
- _dataStore.getHashMap().remove(toBeDisconnected.getId());
- }
- _dataStore.memLog("Disconnected " + disconnected + " DataElements."); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.memLog("Elements created so far: " + numCreated); //$NON-NLS-1$
- _dataStore.memLog("Elements disconnected so far: " + numDisconnected); //$NON-NLS-1$
- _dataStore.memLog("Spirit elements cleaned so far: " + numRemoved); //$NON-NLS-1$
- _dataStore.memLog("DataElements GCed so far: " + numGCed); //$NON-NLS-1$
- }
- }
-
- protected class QueueItem
- {
- public DataElement dataElement;
- public long timeStamp;
-
- public QueueItem(DataElement element, long stamp)
- {
- dataElement = element;
- timeStamp = stamp;
- }
- }
-
- /**
- * Runs the handler loop in a thread.
- */
- public void run()
- {
- while (_keepRunning)
- {
- try
- {
- Thread.sleep(_waitIncrement);
- Thread.yield();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- finish();
- return;
- }
- handle();
- }
- }
-}
-
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ExternalLoader.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ExternalLoader.java
deleted file mode 100644
index dbeeaafb1..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ExternalLoader.java
+++ /dev/null
@@ -1,106 +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.dstore.core.util;
-
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.java.RemoteClassLoader;
-
-
-/**
- * ExternalLoader is a <code>ClassLoader</code> wrapper used for loading external
- * tools that are not in the same classpath as the DataStore. Each ExternalLoader
- * contains a <i>load scope</i>, a list of classpaths that it's class loader is able
- * to load.
- */
-public class ExternalLoader
-{
-
- private ClassLoader _classLoader;
- private ArrayList _loadScope;
-
- /**
- * Constructor
- *
- * @param classLoader the classloader
- * @param loadScope the scope in which the classloader can load classes
- */
- public ExternalLoader(ClassLoader classLoader, String loadScope)
- {
- _classLoader = classLoader;
- _loadScope = new ArrayList();
- _loadScope.add(loadScope);
- }
-
- /**
- * Constructor
- *
- * @param classLoader the classloader
- * @param loadScope the scope in which the classloader can load classes
- */
- public ExternalLoader(ClassLoader classLoader, ArrayList loadScope)
- {
- _classLoader = classLoader;
- _loadScope = loadScope;
- }
-
- /**
- * Indicates whether this external loader can load a particular class
- * @param source a qualified classname
- * @return true if it can load the clas
- */
- public boolean canLoad(String source)
- {
- if (_classLoader instanceof RemoteClassLoader)
- {
- return true;
- }
-
- boolean result = false;
- if (_loadScope != null)
- {
- for (int i = 0; i < _loadScope.size(); i++)
- {
- String scope = (String) _loadScope.get(i);
- result = StringCompare.compare(scope, source, true);
- if (result)
- {
- return result;
- }
- }
- }
- return result;
- }
-
- /**
- * Loads the specified class
- * @param source a qualified classname
- * @return the loaded class
- * @throws ClassNotFoundException
- */
- public Class loadClass(String source) throws ClassNotFoundException
- {
- try
- {
- return _classLoader.loadClass(source);
- }
- catch (NoClassDefFoundError e)
- {
- throw new ClassNotFoundException(source);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ISender.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ISender.java
deleted file mode 100644
index e5c4c4bfb..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ISender.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.util;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-public interface ISender
-{
-
-
- public void sendDocument(String document);
- public void sendDocument(DataElement objectRoot, int depth);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Pattern.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Pattern.java
deleted file mode 100644
index d963f0e35..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Pattern.java
+++ /dev/null
@@ -1,165 +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.dstore.core.util;
-
-import java.util.ArrayList;
-
-/**
- * This class is used to define a wildcard string pattern. Strings
- * can be compared against a pattern to determine whether they match
- * or not.
- */
-public class Pattern
-{
-
- private String _pattern;
- private ArrayList _subMatches;
- private ArrayList _matchSchema;
-
- /**
- * Constructor
- * @param pattern a wildcard string
- * @param matchSchema
- */
- public Pattern(String pattern, ArrayList matchSchema)
- {
- _pattern = pattern;
-
- _matchSchema = matchSchema;
- }
-
- /**
- * Returns a list of submatches
- * @return a list of submatches
- */
- public ArrayList getSubMatches()
- {
- return _subMatches;
- }
-
- /**
- * Returns a submatch
- * @param attribute an attribute to match
- * @return a submatch
- */
- public String getSubMatch(String attribute)
- {
- // find attribute index in match schema
- int index = _matchSchema.indexOf(attribute);
- if ((index >= 0) && (index < _subMatches.size()))
- {
- Object match = _subMatches.get(index);
- return new String((String) match);
- }
- else
- {
- return new String("null"); //$NON-NLS-1$
- }
- }
-
- /**
- * Checks whther a compare string matches the pattern
- * @param compareStr to string to compare
- * @return true if there is a match
- */
- public boolean matches(String compareStr)
- {
- String currentMatch = new String(""); //$NON-NLS-1$
- _subMatches = new ArrayList();
-
- int iText = 0;
- int iPattern = 0;
- int lastStar = 0;
- int len = compareStr.length();
-
- int patternLen = _pattern.length();
-
- while (iPattern < patternLen)
- {
- char p = _pattern.charAt(iPattern++);
- if (p == '*')
- {
- if (currentMatch.length() > 0)
- {
- _subMatches.add(new String(currentMatch));
- }
- currentMatch = new String(""); //$NON-NLS-1$
-
- if (iPattern >= patternLen)
- {
- while (iText < len)
- {
- currentMatch += compareStr.charAt(iText++);
- }
- _subMatches.add(new String(currentMatch));
-
- return true;
- }
- else
- {
- lastStar = iPattern;
- }
- }
- else
- {
- if (iText >= len)
- {
- return false;
- }
- else
- {
- char t = compareStr.charAt(iText++);
- if (p == t)
- {
- if ((lastStar > 0) && (iPattern >= patternLen) && (iText < len))
- {
- }
- else
- {
- continue;
- }
-
- }
- else
- {
- currentMatch += t;
- if (lastStar == 0)
- {
- return false;
- }
- }
-
- int matched = iPattern - lastStar - 1;
- iPattern = lastStar;
-
- iText -= matched;
- }
- }
- }
-
- if (iText >= len)
- {
- _subMatches.add(new String(currentMatch));
- return true;
- }
- else
- {
- return false;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java
deleted file mode 100644
index 0acf47b5a..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java
+++ /dev/null
@@ -1,166 +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.dstore.core.util;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-
-/**
- * This class is used for receiving data from a socket in the DataStore
- * communication layer.
- */
-public abstract class Receiver extends Thread
-{
-
-
- private Socket _socket;
-
- protected DataStore _dataStore;
-
- private XMLparser _xmlParser;
- private BufferedInputStream _in;
-
- protected boolean _canExit;
-
- /**
- * Constructor
- * @param socket the socket to read from
- * @param dataStore the associated DataStore
- */
- public Receiver(Socket socket, DataStore dataStore)
- {
- setName("DStore Receiver"+getName()); //$NON-NLS-1$
- _socket = socket;
- _dataStore = dataStore;
- _canExit = false;
- _xmlParser = new XMLparser(dataStore);
-
- try
- {
- _in = new BufferedInputStream(socket.getInputStream());
- }
- catch (UnknownHostException uhe)
- {
- //System.out.println("Receiver:" + uhe);
- }
- catch (IOException ioe)
- {
- //System.out.println("Receiver:" + ioe);
- }
- }
-
- /**
- * Called when a DataStore connection is terminated.
- */
- public void finish()
- {
- _canExit = true;
- }
-
- /**
- * Indicates that the receiver can stop receiving data from the socket.
- * @return true if the receiver can stop
- */
- public boolean canExit()
- {
- return _canExit;
- }
-
- /**
- * Called when the receiver thread is running
- */
- public void run()
- {
- try
- {
- while (!_canExit)
- {
- handleInput();
- }
- }
- catch (Exception e)
- {
- _canExit = true;
- e.printStackTrace();
- handleError(e);
- }
- }
-
- /**
- * Periodically called to receive data from the socket
- */
- public void handleInput()
- {
- try
- {
- // wait on the socket
- DataElement rootObject = _xmlParser.parseDocument(_in, _socket);
-
- if (rootObject != null)
- {
- String type = rootObject.getType();
- if (!type.equals("FILE")) //$NON-NLS-1$
- {
-
- handleDocument(rootObject);
- }
- }
- else
- {
- // something really bad happened
- _canExit = true;
- if (_xmlParser.getPanicException() != null)
- handleError(_xmlParser.getPanicException());
- }
- }
- catch (IOException ioe)
- {
- _canExit = true;
- handleError(ioe);
- }
- catch (Exception e)
- {
- handleError(e);
- }
- }
-
- /**
- * Returns the associated socket
- * @return the socket
- */
- public Socket socket()
- {
- return _socket;
- }
-
- /**
- * Implemented to provide a means of handling received input
- * @param documentObject the root object of the received data
- */
- public abstract void handleDocument(DataElement documentObject);
-
- /**
- * Implemented to provide a means of handling errors in the communication layer
- * @param e an exception that occurred
- */
- public abstract void handleError(Throwable e);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Sender.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Sender.java
deleted file mode 100644
index 3229c9114..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Sender.java
+++ /dev/null
@@ -1,337 +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.dstore.core.util;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintStream;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.URL;
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-
-/**
- * This class is used for sending data to a socket in the DataStore
- * communication layer.
- */
-public class Sender implements ISender
-{
-
- private Socket _socket;
- private PrintStream _outFile;
- private BufferedWriter _outData;
- private XMLgenerator _xmlGenerator;
- private DataStore _dataStore;
-
- /**
- * Constructor
- * @param socket the associated socket
- * @param dataStore the associated DataStore
- */
- public Sender(Socket socket, DataStore dataStore)
- {
- _socket = socket;
- _dataStore = dataStore;
-
- _xmlGenerator = new XMLgenerator(_dataStore);
- try
- {
- int bufferSize = _socket.getSendBufferSize();
-
- _socket.setSendBufferSize(bufferSize);
- _xmlGenerator.setBufferSize(bufferSize);
- }
- catch (SocketException e)
- {
- }
- try
- {
- _outFile = new PrintStream(_socket.getOutputStream());
- _outData = new BufferedWriter(new OutputStreamWriter(_socket.getOutputStream(), DE.ENCODING_UTF_8));
-
- _xmlGenerator.setFileWriter(_outFile);
- _xmlGenerator.setDataWriter(_outData);
- _xmlGenerator.setGenerateBuffer(false);
- InetSocketAddress address = (InetSocketAddress)socket.getRemoteSocketAddress();
- if (address != null)
- {
- if (address.getAddress() != null)
- {
- String remoteIP = address.getAddress().getHostAddress();
- _dataStore.setRemoteIP(remoteIP);
- }
- else
- {
- String remoteIP = address.getHostName();
- _dataStore.setRemoteIP(remoteIP);
- }
- }
- else
- {
- String remoteIP = socket.getInetAddress().getHostAddress();
- _dataStore.setRemoteIP(remoteIP);
- }
- }
- catch (java.io.IOException e)
- {
- e.printStackTrace();
- }
- }
-
- /**
- * Returns the associated socket
- * @return the socket
- */
- public Socket socket()
- {
- return _socket;
- }
-
- /**
- * Sends a string through the socket
- * @param document the string to send
- */
- public void sendDocument(String document)
- {
- synchronized (_outData)
- {
- try
- {
- _outData.write(document, 0, document.length());
- _outData.flush();
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Sends the bytes of a file through the socket
- * @param objectRoot the object representing the file to send
- * @param bytes the bytes to send over the socket
- * @param size the number of bytes to send over the socket
- * @param binary indicates whether to send the bytes and binary or text
- */
- public void sendFile(DataElement objectRoot, byte[] bytes, int size, boolean binary)
- {
-
- synchronized (_outData)
- {
- synchronized (_outFile)
- {
-
- _xmlGenerator.empty();
- _xmlGenerator.generate(objectRoot, bytes, size, false, binary);
- _xmlGenerator.flushData();
- }
- }
- }
-
- /**
- * Sends a class through the socket
- * @param classElement the object representing the class to send
- */
- public void sendClass(DataElement classElement)
- {
- String className = classElement.getName();
-
- ArrayList loaders = _dataStore.getLocalClassLoaders();
- if (loaders == null)
- {
- // could not get the registered classLoaders. Fail.
- generateEmptyClass(classElement);
- return;
- }
-
- InputStream classInStream = null;
- className = className.replace('.', '/');
- className = className + ".class"; //$NON-NLS-1$
- URL classLocation = null;
- for (int i = 0; i < loaders.size(); i++)
- {
- ClassLoader loader = (ClassLoader) loaders.get(i);
-
- classInStream = loader.getResourceAsStream(className);
- classLocation = loader.getResource(className);
- if (classInStream != null && classLocation != null) break;
- }
- if (classLocation == null || classInStream == null)
- {
- // could not load the class with any of the class loaders. Fail.
- generateEmptyClass(classElement);
- return;
- }
-
- // got a stream to read the classfile. Now read the class into a buffer.
- BufferedInputStream bufInputStream = new BufferedInputStream(classInStream);
-
- try
- {
- int classSize = bufInputStream.available();
- byte[] bytes = new byte[classSize];
- int result = 0;
- result = bufInputStream.read(bytes);
-
- if (result != classSize)
- {
- generateEmptyClass(classElement);
- return; // throw new IOException("Could not read class from BufferedInputStream: " + className);
- }
-
- synchronized (_outData)
- {
- synchronized (_outFile)
- {
-
- _xmlGenerator.empty();
- _xmlGenerator.generate(classElement, bytes, classSize);
- _xmlGenerator.flushData();
- }
- }
- }
- catch (IOException e)
- {
- generateEmptyClass(classElement);
- return;
- }
- }
-
- /**
- * Generates an empty class and sends it across the pipe, as a signal that the
- * class could not be found or loaded or read on the client.
- * @param classElement
- */
- private void generateEmptyClass(DataElement classElement)
- {
- _xmlGenerator.empty();
- _xmlGenerator.generate(classElement, new byte[0], 0);
- _xmlGenerator.flushData();
- }
-
- /**
- * Sends the bytes of a file through the socket to be appended to a file on the other end
- *
- * @param objectRoot the object representing the file to send
- * @param bytes the bytes to send over the socket
- * @param size the number of bytes to send over the socket
- * @param binary indicates whether to send the bytes and binary or text
- */
- public void sendAppendFile(DataElement objectRoot, byte[] bytes, int size, boolean binary)
- {
- synchronized (_outData)
- {
-
- synchronized (_outFile)
- {
- _xmlGenerator.empty();
- _xmlGenerator.generate(objectRoot, bytes, size, true, binary);
- _xmlGenerator.flushData();
- }
- }
- }
-
- /**
- * Sends a DataStore tree of data through the socket
- *
- * @param objectRoot the root of the tree to send
- * @param depth the depth of the tree to send
- */
- public void sendDocument(DataElement objectRoot, int depth)
- {
- synchronized (_outData)
- {
- synchronized (_outFile)
- {
-
- _xmlGenerator.empty();
- _xmlGenerator.generate(objectRoot, depth);
- _xmlGenerator.flushData();
- }
-
- }
-
-// if (objectRoot.getParent() != null)
- // objectRoot.getDataStore().deleteObject(objectRoot.getParent(), objectRoot);
- }
-
- /**
- * Requests a class from the client
- */
- public void requestClass(DataElement classRequest)
- {
- synchronized (_outData)
- {
- synchronized (_outFile)
- {
-
- _xmlGenerator.empty();
- _xmlGenerator.generateClassRequest(classRequest);
- _xmlGenerator.flushData();
- }
- }
- }
-
- public void sendRemoteClassRunnable(DataElement objectRoot, IRemoteClassInstance runnable)
- {
- synchronized (_outData)
- {
- synchronized (_outFile)
- {
- _xmlGenerator.empty();
- _xmlGenerator.generateSerializedObject(objectRoot, runnable);
- _xmlGenerator.flushData();
- }
- }
- }
-
- public void sendKeepAliveRequest(DataElement document)
- {
- synchronized (_outData)
- {
- synchronized (_outFile)
- {
- _xmlGenerator.empty();
- _xmlGenerator.generate(document, 2);
- _xmlGenerator.flushData();
- }
- }
- }
-
- public void sendKeepAliveConfirmation(DataElement document)
- {
- synchronized (_outData)
- {
- synchronized (_outFile)
- {
- _xmlGenerator.empty();
- _xmlGenerator.generate(document, 2);
- _xmlGenerator.flushData();
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Sorter.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Sorter.java
deleted file mode 100644
index d8bc24338..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Sorter.java
+++ /dev/null
@@ -1,71 +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.dstore.core.util;
-
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-/**
- * Utility class used for sorting a list of DataElements based on
- * their depth attributes.
- */
-public class Sorter
-{
-
- /**
- * Sort a list of DataElements based on their depth attributes
- * @param list a list of DataElements
- * @return a sorted list of DataElements
- */
- public static ArrayList sort(ArrayList list)
- {
- ArrayList sortedList = new ArrayList(list.size());
- while (list.size() > 0)
- {
- DataElement first = findFirst(list);
- sortedList.add(first);
- }
-
- return sortedList;
- }
-
- /**
- * Find the DataElement with the highest depth in the list
- * @param list a list of DataElements
- * @return the DataElement with the highest depth
- */
- private static DataElement findFirst(ArrayList list)
- {
- DataElement result = null;
- for (int i = 0; i < list.size(); i++)
- {
- DataElement item = (DataElement) list.get(i);
- if (item != null)
- {
- int depth = item.depth();
- if ((result == null) || (depth > result.depth()))
- {
- result = item;
- }
- }
- }
-
- list.remove(result);
- return result;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/StringCompare.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/StringCompare.java
deleted file mode 100644
index 0a6876d4b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/StringCompare.java
+++ /dev/null
@@ -1,123 +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.dstore.core.util;
-
-/**
- * Utility class for comparing a wildcard string to another string
- */
-public class StringCompare
-{
-
- /**
- * Constructor
- */
- public StringCompare()
- {
- }
-
- /**
- * Compare two strings
- *
- * @param pattern the pattern to match
- * @param compareStr the string to compare against the pattern
- * @param noCase indicates whether the strings should be compared based on case
- * @return true if the compare string matches the pattern
- */
- public static boolean compare(String pattern, String compareStr, boolean noCase)
- {
- if ((pattern == null) || (compareStr == null))
- return false;
-
- if (noCase)
- {
- pattern = pattern.toUpperCase();
- compareStr = compareStr.toUpperCase();
- }
-
- int iText = 0;
- int iPattern = 0;
- int lastStar = 0;
- int len = compareStr.length();
-
- int patternLen = pattern.length();
-
- while (iPattern < patternLen)
- {
- char p = pattern.charAt(iPattern++);
- if (p == '*')
- {
-
- if (iPattern >= patternLen)
- {
- while (iText < len)
- {
- iText++;
- }
- return true;
- }
- else
- {
- lastStar = iPattern;
- }
- }
- else
- {
- if (iText >= len)
- {
- return false;
- }
- else
- {
- char t = compareStr.charAt(iText++);
- if (p == t)
- {
- if ((lastStar > 0) && (iPattern >= patternLen) && (iText < len))
- {
- }
- else
- {
- continue;
- }
-
- }
- else
- {
- if (lastStar == 0)
- {
- return false;
- }
- }
-
- int matched = iPattern - lastStar - 1;
- iPattern = lastStar;
-
- iText -= matched;
- }
- }
- }
-
- if (iText >= len)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/XMLgenerator.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/XMLgenerator.java
deleted file mode 100644
index 6e240c990..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/XMLgenerator.java
+++ /dev/null
@@ -1,676 +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.dstore.core.util;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-import java.io.PrintStream;
-import java.util.Stack;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-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.DataStoreResources;
-
-/**
- * <p>
- * This class is used to serialize data and send it either
- * to a file or a socket.
- * </p>
- * <p>
- * When a DataStore tree needs to be transmitted, it's DataElements are
- * converted to XML before sending. Only those elements which have changed and
- * are thus out of synch with the DataStore on the other end of the socket are
- * actually transferred.
- * </p>
- * <p>
- * When a byte stream or file needs to be transmitted, bytes are
- * either send as is if binary transfer is requested or as unicode if
- * binary transfer is not requested.
- * </p>
- */
-public class XMLgenerator
-{
-
- private int _state;
-
- private StringBuffer _document;
-
- private int _indent;
- private Stack _tagStack;
-
- private PrintStream _fileWriter;
- private BufferedWriter _dataWriter;
-
- private int _bufferSize;
- private boolean _generateBuffer;
- private boolean _ignoreDeleted;
-
- private DataStore _dataStore;
-
- public static final int EMPTY = 0;
- public static final int OPEN = 1;
- public static final int CLOSE = 2;
- public static final int BODY = 3;
-
- /**
- * Constructor
- * @param dataStore the associated DataStore
- */
- public XMLgenerator(DataStore dataStore)
- {
- _dataStore = dataStore;
- _state = EMPTY;
- _bufferSize = 100000;
-
- _document = new StringBuffer(_bufferSize);
-
- _indent = 0;
- _generateBuffer = true;
- _ignoreDeleted = false;
- _tagStack = new Stack();
- }
-
- /**
- * Indicate whether DataElements marked as deleted should be sent.
- * @param flag whether deleted elements should be sent
- */
- public void setIgnoreDeleted(boolean flag)
- {
- _ignoreDeleted = flag;
- }
-
- /**
- * Sets the file writer used for file transfer
- * @param writer the file writer used for file transfer
- */
- public void setFileWriter(PrintStream writer)
- {
- _fileWriter = writer;
- }
-
- /**
- * Sets the data writer used for XML transfer
- * @param writer the data writer used for XML transfer
- */
- public void setDataWriter(BufferedWriter writer)
- {
- _dataWriter = writer;
- }
-
- /**
- * Set the buffer size
- * @param size of the buffer used for transmitting packets
- */
- public void setBufferSize(int size)
- {
- _bufferSize = size;
- }
-
- /**
- * Indicate whether the buffer attribute of each DataElement should be
- * transferred
- * @param flag whether the buffer should be transferred
- */
- public void setGenerateBuffer(boolean flag)
- {
- _generateBuffer = flag;
- }
-
- private void append(char c)
- {
- _document.append(c);
- }
-
- private void append(String buffer)
- {
- _document.append(buffer);
- }
-
- private void append(StringBuffer buffer)
- {
- _document.append(buffer);
- }
-
- private void nextLine()
- {
- if (_dataWriter != null)
- {
- _document.append('\n');
-
- int length = _document.length();
- if (length > _bufferSize)
- {
- flushData();
- }
- }
- }
-
- /**
- * Send all buffered data through the pipe.
- */
- public void flushData()
- {
- if (_document.length() > 0 && _dataWriter != null)
- {
- try
- {
- _dataWriter.write(_document.toString(), 0, _document.length());
- _dataWriter.write('\n');
- _dataWriter.flush();
- _document.setLength(0);
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- _dataWriter = null;
- }
- }
- }
-
- private void indent()
- {
- for (int i = 0; i < _indent; i++)
- {
- append(' ');
- }
- }
-
- private void startTag(String name)
- {
- if (_state == OPEN)
- {
- append('>');
- _indent++;
- }
- if (_state == CLOSE)
- {
- _indent--;
- }
- if (_state == BODY)
- {
- nextLine();
- }
- indent();
- if (_document == null)
- {
- append('<');
- append(name);
- }
- else
- {
- append('<');
- append(name);
- }
- _tagStack.push(name);
- _state = OPEN;
- }
-
- private void endTag(String name)
- {
- String top = (String) _tagStack.pop();
- if (_state == CLOSE)
- {
- }
- else if (_state == OPEN)
- {
- if (top == name)
- {
- append("/>"); //$NON-NLS-1$
- if (_tagStack.empty())
- {
- _state = CLOSE;
- }
- else
- {
- _state = BODY;
- }
- }
- }
- else if (_state == BODY)
- {
- if (top == name)
- {
- nextLine();
- _indent--;
- indent();
- append("</"); //$NON-NLS-1$
- append(name);
- append('>');
- if (_tagStack.empty())
- {
- _state = CLOSE;
- }
- }
- }
- }
-
- private void addAttribute(String name, String value)
- {
- if (_state != OPEN)
- {
- }
-
- StringBuffer niceValue = null;
- if (value != null)
- {
- niceValue = prepareStringForXML(value);
-
- append(' ');
- append(name);
- append("=\""); //$NON-NLS-1$
- append(niceValue);
- append('"');
- }
- else
- {
- append(' ');
- append(name);
- append("=\"\""); //$NON-NLS-1$
- }
-
- }
-
- private void addReferenceTypeAttribute(DataElement object)
- {
- if (object.isSpirit())
- {
- addAttribute(DE.P_REF_TYPE, DataStoreResources.SPIRIT);
- }
- else
- {
- if (object.isReference())
- {
- if (_dataStore.getReferenceTag() != null && _dataStore.getReferenceTag().equals(DE.P_REF_TYPE)) addAttribute(DE.P_REF_TYPE, DataStoreResources.REFERENCE);
- else addAttribute(DE.P_REF_TYPE, DataStoreResources.TRUE);
- }
- else
- {
- if (_dataStore.getReferenceTag() != null && _dataStore.getReferenceTag().equals(DE.P_REF_TYPE)) addAttribute(DE.P_REF_TYPE, DataStoreResources.VALUE);
- else addAttribute(DE.P_REF_TYPE, DataStoreResources.FALSE);
- }
- }
- }
-
- private void addFile(byte[] bytes, int size, boolean binary)
- {
- if (_state == OPEN)
- {
- append('>');
-
- _indent++;
- _state = BODY;
- }
- if (_state == BODY)
- {
- flushData();
-
- // send everything across
- if (binary)
- {
- _fileWriter.write(bytes, 0, size);
- _fileWriter.flush();
- }
- else
- {
- try
- {
- _dataWriter.write(new String(bytes), 0, size);
- _dataWriter.flush();
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- }
- }
- }
- else if (_state == EMPTY)
- {
- }
- else if (_state == CLOSE)
- {
- }
- }
-
- private void addData(StringBuffer data)
- {
- if (_state == OPEN)
- {
- append('>');
-
- _indent++;
- _state = BODY;
- }
- if (_state == BODY)
- {
- if (_generateBuffer && data != null && (data.length() > 0))
- {
- StringBuffer text = prepareStringForXML(data);
- if (text != null && text.length() > 0)
- {
- nextLine();
- indent();
- append("<Buffer>"); //$NON-NLS-1$
- nextLine();
- indent();
- append(text.toString());
- nextLine();
- indent();
- append("</Buffer>"); //$NON-NLS-1$
- }
- }
- else
- {
- append(""); //$NON-NLS-1$
- }
- }
- else if (_state == EMPTY)
- {
- }
- else if (_state == CLOSE)
- {
- }
- }
-
- /**
- * Returns the current serialized document
- * @return the current document
- */
- public StringBuffer document()
- {
- return _document;
- }
-
- /**
- * Clears the current serlized document
- */
- public void empty()
- {
- _indent = 0;
- _document.delete(0, _document.length());
- }
-
- /**
- * Converts special characters to appropriate representation in XML
- * @param input buffer to convert
- * @return the converted buffer
- */
- public static StringBuffer prepareStringForXML(StringBuffer input)
- {
- StringBuffer output = new StringBuffer();
-
- for (int idx = 0; idx < input.length(); idx++)
- {
- char currChar = input.charAt(idx);
- switch (currChar)
- {
- case '&' :
- output.append(XMLparser.STR_AMP);
- break;
- case '"' :
- output.append(XMLparser.STR_QUOTE);
- break;
- case '\'' :
- output.append(XMLparser.STR_APOS);
- break;
- case '<' :
- output.append(XMLparser.STR_LT);
- break;
- case '>' :
- output.append(XMLparser.STR_GT);
- break;
- case ';' :
- output.append(XMLparser.STR_SEMI);
- break;
- default :
- output.append(currChar);
- break;
- }
- }
-
- return output;
- }
-
- /**
- * Converts special characters to appropriate representation in XML
- * @param input buffer to convert
- * @return the converted buffer
- */
- public static StringBuffer prepareStringForXML(String input)
- {
- StringBuffer output = new StringBuffer();
-
- for (int idx = 0; idx < input.length(); idx++)
- {
- char currChar = input.charAt(idx);
- switch (currChar)
- {
- case '&' :
- output.append(XMLparser.STR_AMP);
- break;
- case '"' :
- output.append(XMLparser.STR_QUOTE);
- break;
- case '\'' :
- output.append(XMLparser.STR_APOS);
- break;
- case '<' :
- output.append(XMLparser.STR_LT);
- break;
- case '>' :
- output.append(XMLparser.STR_GT);
- break;
- case ';' :
- output.append(XMLparser.STR_SEMI);
- break;
- default :
- output.append(currChar);
- break;
- }
- }
-
- return output;
- }
-
- /**
- * Generate an tags for a file transfer and send bytes over the pipe.
- *
- * @param object the element representing the file transfer
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- * @param isAppend indicates whether bytes should be appended or not to a file on the other end of the pipe
- * @param binary indicates whether the bytes should be sent as binary or text
- */
- public synchronized void generate(DataElement object, byte[] bytes, int size, boolean isAppend, boolean binary)
- {
- String tagType = XMLparser.STR_FILE;
- if (isAppend)
- {
- tagType += ".Append"; //$NON-NLS-1$
- }
- if (binary)
- {
- tagType += ".Binary"; //$NON-NLS-1$
- }
-
- if (object != null)
- {
- startTag(tagType);
- addAttribute(DE.P_TYPE, object.getAttribute(DE.A_TYPE));
- addAttribute(DE.P_ID, object.getAttribute(DE.A_ID));
- addAttribute(DE.P_NAME, object.getAttribute(DE.A_NAME));
- addAttribute(DE.P_VALUE, object.getAttribute(DE.A_VALUE));
- addAttribute(DE.P_SOURCE, object.getAttribute(DE.A_SOURCE));
- addAttribute(DE.P_SOURCE_LOCATION, object.getAttribute(DE.A_SOURCE_LOCATION));
-
- addReferenceTypeAttribute(object);
-
- addAttribute(DE.P_DEPTH, "" + size); //$NON-NLS-1$
- addFile(bytes, size, binary);
-
- endTag(tagType);
- }
- }
-
- /**
- * Generate tags for class transfer and send bytes over the pipe.
- *
- * @param object the element representing the class transfer
- * @param bytes the bytes to send
- * @param size the number of bytes to send
- */
- public synchronized void generate(DataElement object, byte[] bytes, int size)
- {
- String tagType = XMLparser.STR_CLASS;
-
- if (object != null)
- {
- startTag(tagType);
- addAttribute(DE.P_TYPE, object.getAttribute(DE.A_TYPE));
- addAttribute(DE.P_ID, object.getAttribute(DE.A_ID));
- addAttribute(DE.P_NAME, object.getAttribute(DE.A_NAME));
- addAttribute(DE.P_VALUE, object.getAttribute(DE.A_VALUE));
- addAttribute(DE.P_SOURCE, object.getAttribute(DE.A_SOURCE));
- addAttribute(DE.P_SOURCE_LOCATION, object.getAttribute(DE.A_SOURCE_LOCATION));
-
- addReferenceTypeAttribute(object);
-
- addAttribute(DE.P_DEPTH, "" + size); //$NON-NLS-1$
- addFile(bytes, size, true);
-
- endTag(tagType);
- }
- }
-
- /**
- * Serializes and sends a DataStore tree through the pipe
- *
- * @param object the root of the DataStore tree to send
- * @param depth the depth of the tree to send
- */
- public void generate(DataElement object, int depth)
- {
- if ((object != null) && (depth >= 0))
- {
- String tagType = XMLparser.STR_DATAELEMENT;
-
- if (object.isUpdated() && !object.isPendingTransfer() && !_generateBuffer)
- {
- }
- else
- {
- if (object.isDeleted() && _ignoreDeleted)
- {
- }
- else
- {
- object.setPendingTransfer(false);
-
- startTag(tagType);
- addAttribute(DE.P_TYPE, object.getAttribute(DE.A_TYPE));
- addAttribute(DE.P_ID, object.getAttribute(DE.A_ID));
- addAttribute(DE.P_NAME, object.getAttribute(DE.A_NAME));
- addAttribute(DE.P_VALUE, object.getAttribute(DE.A_VALUE));
- addAttribute(DE.P_SOURCE, object.getAttribute(DE.A_SOURCE));
- addAttribute(DE.P_SOURCE_LOCATION, object.getAttribute(DE.A_SOURCE_LOCATION));
-
- addReferenceTypeAttribute(object);
-
- addAttribute(DE.P_DEPTH, "" + object.depth()); //$NON-NLS-1$
- addData(object.getBuffer());
- object.setUpdated(true);
-
- if (!object.isReference() && depth >= 0)
- {
- for (int i = 0; i < object.getNestedSize(); i++)
- {
- generate(object.get(i), depth - 1);
- }
- }
-
- // end generation
- endTag(tagType);
- }
- }
- }
- }
-
- public void generateClassRequest(DataElement object)
- {
- String tagType = XMLparser.STR_REQUEST_CLASS;
- if (object != null)
- {
- startTag(tagType);
- addAttribute(DE.P_TYPE, object.getAttribute(DE.A_TYPE));
- addAttribute(DE.P_ID, object.getAttribute(DE.A_ID));
- addAttribute(DE.P_NAME, object.getAttribute(DE.A_NAME));
- addAttribute(DE.P_VALUE, object.getAttribute(DE.A_VALUE));
- addAttribute(DE.P_SOURCE, object.getAttribute(DE.A_SOURCE));
- addAttribute(DE.P_SOURCE_LOCATION, object.getAttribute(DE.A_SOURCE_LOCATION));
-
- addReferenceTypeAttribute(object);
- _state = BODY;
- endTag(tagType);
- }
-
- }
-
- public void generateSerializedObject(DataElement object, IRemoteClassInstance runnable)
- {
- String tagType = XMLparser.STR_SERIALIZED;
- if (object != null)
- {
- startTag(tagType);
- addAttribute(DE.P_TYPE, object.getAttribute(DE.A_TYPE));
- addAttribute(DE.P_ID, object.getAttribute(DE.A_ID));
- addAttribute(DE.P_NAME, object.getAttribute(DE.A_NAME));
- addAttribute(DE.P_VALUE, object.getAttribute(DE.A_VALUE));
- addAttribute(DE.P_SOURCE, object.getAttribute(DE.A_SOURCE));
- addAttribute(DE.P_SOURCE_LOCATION, object.getAttribute(DE.A_SOURCE_LOCATION));
-
- addReferenceTypeAttribute(object);
-
- try
- {
- PipedInputStream pin = new PipedInputStream();
- PipedOutputStream pout = new PipedOutputStream(pin);
- ObjectOutputStream outStream = new ObjectOutputStream(pout);
- outStream.writeObject(runnable);
-
-
- int size = pin.available();
- byte[] bytes = new byte[size];
- int nRead = pin.read(bytes, 0, size);
- addAttribute(DE.P_DEPTH, "" + nRead); //$NON-NLS-1$
- addFile(bytes, nRead, true);
-
- outStream.close();
- pin.close();
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- endTag(tagType);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/XMLparser.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/XMLparser.java
deleted file mode 100644
index 72cfb7d7e..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/XMLparser.java
+++ /dev/null
@@ -1,1048 +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.dstore.core.util;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.Socket;
-import java.net.SocketException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Stack;
-
-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.DataStoreResources;
-
-/**
- * <p>
- * This class is used to deserialize data received from a file or a socket.
- * </p>
- * <p>
- * When tags indicate that data is being received, the byte stream is deserialized
- * as a DataStore tree. When deserialized data maps to existing DataElements in
- * the DataStore, those elements are updated directly. Any deserialized data
- * that maps to within an existing DataElement, that does not already exist, gets
- * created under the existing DataElement. When parsing DataElement XML, there is
- * no intermediate DOM - rather the DOM is the DataStore itself.
- * </p>
- * <p>
- * When tags indicate that a byte stream or file is being received, bytes are
- * sent the the current DataStore <code>ByteStreamHandler</code> to be saved on disk.
- * </p>
- */
-public class XMLparser
-{
-
- public static final int IO_SOCKET_READ_TIMEOUT = 3600000;
- public static final long KEEPALIVE_RESPONSE_TIMEOUT = 60000;
- public static final boolean VERBOSE_KEEPALIVE = false;
-
- private DataStore _dataStore;
- private DataElement _rootDataElement;
- private Stack _tagStack;
- private Stack _objStack;
-
- private boolean _isFile;
- private boolean _isClass;
- private boolean _isRequestClass;
- private boolean _isKeepAlive;
- private boolean _isKeepAliveConfirm;
- private boolean _isSerialized;
-
- private String _tagType;
-
- private byte[] _byteBuffer;
- private byte[] _fileByteBuffer;
- private int _maxBuffer;
-
- private boolean _panic = false;
- private Throwable _panicException = null;
-
- private boolean _isKeepAliveCompatible = false;
- private boolean _firstTime = true;
-
- private KeepAliveRequestThread _kart = null;
- private KeepAliveRequestThread _initialKart = null;
-
- public static String STR_DATAELEMENT = "DataElement"; //$NON-NLS-1$
-
- public static String STR_BUFFER_START = "<Buffer>"; //$NON-NLS-1$
- public static String STR_BUFFER_END = "</Buffer>"; //$NON-NLS-1$
- public static String STR_BUFFER = "Buffer"; //$NON-NLS-1$
-
- public static String STR_STATUS = "status"; //$NON-NLS-1$
- public static String STR_STATUS_DONE = "done"; //$NON-NLS-1$
- public static String STR_STATUS_ALMOST_DONE = "almost done"; //$NON-NLS-1$
-
- public static String STR_FILE = "File"; //$NON-NLS-1$
- public static String STR_CLASS = "Class"; //$NON-NLS-1$
- public static String STR_REQUEST_CLASS= "RequestClass"; //$NON-NLS-1$
- public static String STR_SERIALIZED = "Serialized"; //$NON-NLS-1$
-
- public static String STR_AMP = "&amp;"; //$NON-NLS-1$
- public static String STR_QUOTE = "&quot;"; //$NON-NLS-1$
- public static String STR_APOS = "&apos;"; //$NON-NLS-1$
- public static String STR_LT = "&lt;"; //$NON-NLS-1$
- public static String STR_GT = "&gt;"; //$NON-NLS-1$
- public static String STR_SEMI = "&#59;"; //$NON-NLS-1$
-
-
- /**
- * Constructor
- * @param dataStore the associated DataStore
- */
- public XMLparser(DataStore dataStore)
- {
- _dataStore = dataStore;
- _tagStack = new Stack();
- _objStack = new Stack();
- _maxBuffer = 100000;
- _byteBuffer = new byte[_maxBuffer];
- }
-
- /**
- * Read a file from the pipe
- * @param reader the pipe reader
- * @param size the number of bytes to read
- * @param path the path of the file where the received bytes should be inserted
- */
- public void readFile(BufferedInputStream reader, int size, String path, String byteStreamHandlerId)
- {
-
- Runtime rt = Runtime.getRuntime();
- //long totalMem = rt.totalMemory();
- long freeMem = rt.freeMemory();
-
- if (size * 100 > freeMem)
- {
- rt.gc();
- }
-
- if (_fileByteBuffer == null || _fileByteBuffer.length < size)
- {
- try
- {
- _fileByteBuffer = new byte[size];
- }
- catch (OutOfMemoryError e)
- {
- System.exit(-1);
- }
- }
-
- int written = 0;
-
-// // hack to deal with platform inconsistencies
-// // only needed on the server side
-// if (!_dataStore.isVirtual())
-// {
-// try
-// {
-// synchronized (reader)
-// {
-// int first = reader.read();
-//
-// if (first != 10) {
-// written = 1;
-// buffer[0] = (byte) first;
-// }
-// else {
-// System.out.println("First byte is 10!");
-// }
-// }
-// }
-// catch (IOException e)
-// {
-// _dataStore.trace(e);
-// }
-// }
-
- while (written < size)
- {
- try
- {
- int read = reader.read(_fileByteBuffer, written, size - written);
- written += read;
- }
- catch (SocketException se)
- {
- // DKM- socket exception means connection is gone
- // need bail now!
- _dataStore.trace(se);
- handlePanic(se);
- return;
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- handlePanic(e);
- }
- catch (Error err)
- {
- System.out.println("error!"); //$NON-NLS-1$
- handlePanic(err);
- }
- }
-
- if (_tagType.startsWith("File.Append")) //$NON-NLS-1$
- {
- boolean binary = _tagType.equals("File.Append.Binary"); //$NON-NLS-1$
- _dataStore.appendToFile(path, _fileByteBuffer, size, binary, byteStreamHandlerId);
- }
- else
- {
- boolean binary = _tagType.equals("File.Binary"); //$NON-NLS-1$
- _dataStore.saveFile(path, _fileByteBuffer, size, binary, byteStreamHandlerId);
- }
- }
-
- public boolean readInstance(BufferedInputStream reader, int size, String classbyteStreamHandlerId)
- {
- byte[] buffer = new byte[size];
- int written = 0;
-
- while (written < size)
- {
- try
- {
- int read = reader.read(buffer, written, size - written);
- written += read;
- }
- catch (SocketException se)
- {
- // DKM- socket exception means connection is gone
- // need bail now!
- _dataStore.trace(se);
- handlePanic(se);
- return false;
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- handlePanic(e);
- return false;
- }
- }
- _dataStore.saveClassInstance(buffer, size, classbyteStreamHandlerId);
- return true;
- }
-
- /**
- * Read a class file from the pipe
- * @param reader the pipe reader
- * @param size the number of bytes to read
- * @param className the name of the class defined by the byte array.
- * @param classbyteStreamHandlerId the name of the classByteStreamHandler that will receive the bytes of the file.
- * @return whether the operation is successful
- */
- public boolean readClass(BufferedInputStream reader, int size, String className, String classbyteStreamHandlerId)
- {
- byte[] buffer = new byte[size];
- int written = 0;
-
- while (written < size)
- {
- try
- {
- int read = reader.read(buffer, written, size - written);
- written += read;
- }
- catch (SocketException se)
- {
- // DKM- socket exception means connection is gone
- // need bail now!
- _dataStore.trace(se);
- handlePanic(se);
- return false;
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- handlePanic(e);
- return false;
- }
- }
- _dataStore.saveClass(className, buffer, size, classbyteStreamHandlerId);
- return true;
- }
-
- /**
- * Reads a line from the pipe
- *
- * @param reader the pipe reader
- * @return the line received
- */
- public String readLine(BufferedInputStream reader, Socket socket)
- {
- boolean done = false;
- int offset = 0;
-
- try
- {
- boolean inquotes = false;
- while (!done)
- {
-
- if (_firstTime)
- {
- _initialKart = new KeepAliveRequestThread(KEEPALIVE_RESPONSE_TIMEOUT);
- _firstTime = false;
- if (VERBOSE_KEEPALIVE) System.out.println("Starting initial KeepAlive thread."); //$NON-NLS-1$
- _initialKart.start();
- continue;
- }
- else if (_initialKart != null && !_initialKart.isAlive())
- {
- if (!_initialKart.failed())
- {
- _isKeepAliveCompatible = true;
- if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive compatible."); //$NON-NLS-1$
- _initialKart = null;
- }
- else
- {
- _isKeepAliveCompatible = false;
- if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive incompatible."); //$NON-NLS-1$
- _initialKart = null;
- }
- }
-
- int in = -1;
-
- if (_isKeepAliveCompatible)
- {
- socket.setSoTimeout(IO_SOCKET_READ_TIMEOUT);
- try
- {
- in = reader.read();
- }
- catch (InterruptedIOException e)
- {
- if ((_kart != null) && _kart.failed())
- {
- done = true;
- if (_dataStore.isVirtual()) handlePanic(new Exception("KeepAlive request to server wasnt answered in time.")); //$NON-NLS-1$
- else handlePanic(new Exception("KeepAlive request to client wasnt answered in time.")); //$NON-NLS-1$
- continue;
- }
- else
- {
- _kart = new KeepAliveRequestThread(KEEPALIVE_RESPONSE_TIMEOUT);
- if (VERBOSE_KEEPALIVE) System.out.println("No activity on socket. KeepAlive thread started."); //$NON-NLS-1$
- _kart.start();
- continue;
- }
- }
- }
- else
- {
- in = reader.read();
- }
-
- if (in == -1)
- {
- done = true;
- Exception e = new Exception("The connection to the server has been lost."); //$NON-NLS-1$
- handlePanic(e);
- }
- else
- {
- if (in <= 0)
- {
- done = true;
- }
- else
- {
- if (_kart != null) _kart.interrupt();
- }
- byte aByte = (byte) in;
- switch (aByte)
- {
- case '"':
- inquotes = !inquotes;
- break;
- case '\n':
- case '\r':
- case '\0':
- if (!inquotes)
- done = true;
- break;
- default:
- break;
- }
-
- if (offset >= _maxBuffer)
- {
- done = true;
- }
-
- _byteBuffer[offset] = aByte;
- offset++;
- }
- }
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- done = true;
-
- handlePanic(e);
-
- return null;
- }
-
- if (offset > 0)
- {
- String result = null;
- try
- {
- result = new String(_byteBuffer, 0, offset, DE.ENCODING_UTF_8);
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- }
- return result;
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Called if an exception occurs during reading of the pipe
- * @param e the Exception
- */
- private void handlePanic(Throwable e)
- {
- _panic = true;
- _panicException = e;
- }
-
- /**
- * Returns the communications exception if one occurred
- * @return a exception
- */
- public Throwable getPanicException()
- {
- return _panicException;
- }
-
- /**
- * This method gets called to receive data from the pipe. It deserializes
- * DataStore XML documents, creating the appropriate DataElements in appropriate
- * places in the DataStore tree. If files are being transmitted it creates
- * the appropriate files using the DataStore <code>ByteStreamHandler</code>.
- *
- * @param reader the pipe reader
- * @return the root DataElement of the parsed document
- * @throws IOException
- */
- public DataElement parseDocument(BufferedInputStream reader, Socket socket) throws IOException
- {
- _tagStack.clear();
- _objStack.clear();
-
- _rootDataElement = null;
- _isFile = false;
- _isClass = false;
- _isRequestClass = false;
- _isKeepAlive = false;
- _isKeepAliveConfirm = false;
- _isSerialized = false;
- _tagType = STR_DATAELEMENT;
-
- DataElement parent = null;
- String matchTag = null;
-
- boolean done = false;
- while (!done)
- {
- String xmlTag = readLine(reader, socket);
-
- if (xmlTag != null)
- {
- String trimmedTag = xmlTag.trim();
-
- if (_dataStore.getReferenceTag() == null)
- {
- if (trimmedTag.indexOf(DE.P_ISREF + "=") > -1) _dataStore.setReferenceTag(DE.P_ISREF); //$NON-NLS-1$
- else if (trimmedTag.indexOf(DE.P_REF_TYPE + "=") > -1) _dataStore.setReferenceTag(DE.P_REF_TYPE); //$NON-NLS-1$
- }
-
- if (!_tagStack.empty())
- {
- matchTag = (String) _tagStack.peek();
- }
- if (trimmedTag.equals(STR_BUFFER_START))
- {
- _tagType = STR_BUFFER;
- _tagStack.push(STR_BUFFER_END);
- }
- else if (trimmedTag.equals(STR_BUFFER_END))
- {
- _tagType = STR_DATAELEMENT;
- _tagStack.pop();
- }
- else if (_tagType.equals(STR_BUFFER))
- {
- String buffer = convertStringFromXML(xmlTag);
- if (parent != null)
- parent.appendToBuffer(buffer);
- }
- else if ((matchTag != null) && trimmedTag.equals(matchTag))
- {
- if (parent != null && parent.getType().equals(STR_STATUS))
- {
- if (parent.getName().equals(STR_STATUS_ALMOST_DONE))
- {
-
- parent.setAttribute(DE.A_NAME, STR_STATUS_DONE);
- if (parent.getValue().equals(STR_STATUS_ALMOST_DONE))
- {
- parent.setAttribute(DE.A_VALUE,STR_STATUS_DONE);
- }
- if (_dataStore.isWaiting(parent))
- {
- _dataStore.stopWaiting(parent);
- parent.notifyUpdate();
- }
- }
- }
-
- if (parent != null && parent.getNestedSize() > 0 && _dataStore.isVirtual())
- {
- // end of children of parent
- // find all spirits that match non-spirits
- List toDelete = new ArrayList();
- for (int s= 0; s < parent.getNestedSize(); s++)
- {
- DataElement element = parent.get(s);
- if (element.isSpirit())
- {
- String name = element.getName();
- String value = element.getValue();
-
- // delete this element if there's another one with the same name and value
- for (int n = 0; n < parent.getNestedSize(); n++)
- {
- if (n != s)
- {
- DataElement compare = parent.get(n);
- String cname = compare.getName();
- String cvalue = compare.getValue();
- if (!compare.isSpirit() && cname.equals(name) && cvalue.equals(value))
- toDelete.add(compare);
- }
- }
- }
- }
-
- // delete elements
- for (int d = 0; d < toDelete.size(); d++)
- {
- DataElement delement = (DataElement)toDelete.get(d);
- _dataStore.deleteObject(parent,delement);
- }
- }
-
- _tagStack.pop();
- if (_tagStack.empty())
- {
- done = true;
- }
- else if (_tagStack.size() == 1)
- {
- parent = _rootDataElement;
- }
- else
- {
- parent = (DataElement) _objStack.pop();
- }
-
- }
- else
- {
- xmlTag = xmlTag.trim();
-
- if (xmlTag.length() > 3)
- {
-
- try
- {
- if (parent != null)
- {
- if (_objStack.contains(parent))
- {
- }
- else
- {
- _objStack.push(parent);
- }
- }
-
- DataElement result = parseTag(xmlTag, parent);
-
- if (_panic)
- {
- return null;
- }
-
- if (result != null)
- {
- result.setUpdated(true);
-
- if (parent == null && _rootDataElement == null)
- {
- _rootDataElement = result;
- _rootDataElement.setParent(null);
- }
-
- parent = result;
-
- if (_isFile)
- {
- int size = result.depth();
- String path = result.getSource();
-
- String byteStreamHandler = result.getName();
- if (path.equals(byteStreamHandler))
- {
- // older client or server, fall back to default
- byteStreamHandler = DataStoreResources.DEFAULT_BYTESTREAMHANDLER;
- }
- readFile(reader, size, path, byteStreamHandler);
-
- _isFile = false;
- //_dataStore.deleteObject(parent, result);
- }
- else if (_isClass)
- {
- int size = result.depth();
-
- String classbyteStreamHandler = result.getSource();
-
- if (result.getName() != null)
- {
- readClass(reader, size, result.getName(), classbyteStreamHandler);
- }
- _isClass = false;
- }
- else if (_isRequestClass)
- {
- result.getDataStore().sendClass(result.getName());
- _isRequestClass = false;
- }
- else if (_isKeepAlive)
- {
- if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive request received, sending confirmation."); //$NON-NLS-1$
- result.getDataStore().sendKeepAliveConfirmation();
- _isKeepAlive = false;
- }
- else if (_isKeepAliveConfirm )
- {
- if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive confirmation received."); //$NON-NLS-1$
- if (_initialKart != null) _initialKart.interrupt();
- _isKeepAliveConfirm = false;
- }
- else if (_isSerialized)
- {
- int size = result.depth();
- String classbyteStreamHandler = result.getSource();
- if (result.getName() != null)
- {
- readInstance(reader, size, classbyteStreamHandler);
- }
- _isSerialized = false;
- }
-
- StringBuffer endTag = new StringBuffer("</"); //$NON-NLS-1$
- endTag.append(_tagType);
- endTag.append('>');
- _tagStack.push(endTag.toString());
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- _dataStore.trace(e);
- return _rootDataElement;
- }
- }
- }
- }
-
- if (_panic)
- return null;
- }
-
- DataElement result = _rootDataElement;
- _rootDataElement.setParent(null); // this root is transient
-
- _rootDataElement = null;
- return result;
- }
-
- /**
- * Deserializes a single DataElement from the XML stream.
- *
- * @param fullTag the DataElement XML tag
- * @param parent the DataElement that container for the deserialized DataElement
- * @return the parsed DataElement
- */
- protected synchronized DataElement parseTag(String fullTag, DataElement parent)
- {
- if (!fullTag.startsWith("<")) //$NON-NLS-1$
- return null;
-
- try
- {
- fullTag = fullTag.substring(1, fullTag.length() - 1);
- }
- catch (Exception e)
- {
- return null;
- }
-
- // get type
- int nextSpace = fullTag.indexOf(' ');
- if (nextSpace > 0)
- {
- String[] attributes = new String[DE.A_SIZE];
-
- // tag type
- String tagType = fullTag.substring(0, nextSpace);
- if (tagType.startsWith(STR_FILE))
- {
- _isFile = true;
- _tagType = tagType;
- }
- else if (tagType.startsWith(STR_CLASS))
- {
- _isClass = true;
- _tagType = tagType;
- }
- else if (tagType.startsWith(STR_REQUEST_CLASS))
- {
- _isRequestClass = true;
- _tagType = tagType;
- }
- else if (tagType.startsWith(STR_SERIALIZED))
- {
- _isSerialized = true;
- _tagType = tagType;
- }
-
- int index = 0;
- int nextQuote = 0;
- int nextnextQuote = nextSpace;
- while ((index < DE.A_SIZE) && (nextQuote >= 0))
- {
- nextQuote = fullTag.indexOf('\"', nextnextQuote + 1);
- nextnextQuote = fullTag.indexOf('\"', nextQuote + 1);
-
- if ((nextQuote >= 0) && (nextnextQuote > nextQuote) && (fullTag.length() > nextnextQuote))
- {
- String attribute = fullTag.substring(nextQuote + 1, nextnextQuote);
- attributes[index] = convertStringFromXML(attribute);
- index++;
- }
- }
-
- DataElement result = null;
- if (attributes.length == DE.A_SIZE)
- {
- String type = attributes[DE.A_TYPE];
- if (type.equals(DataStoreResources.KEEPALIVE_TYPE))
- {
- _isKeepAlive= true;
- result = _dataStore.createTransientObject(attributes);
- }
- else if (type.equals(DataStoreResources.KEEPALIVECONFIRM_TYPE))
- {
- _isKeepAliveConfirm = true;
- result = _dataStore.createTransientObject(attributes);
- }
-
- else if (type.equals(DataStoreResources.DOCUMENT_TYPE))
- {
- String id = attributes[DE.A_ID];
- if (_dataStore.contains(id))
- {
- result = _dataStore.find(id);
- result.removeNestedData();
- }
- else
- {
- result = _dataStore.createObject(null, attributes);
- }
- }
-
- else if (_isFile || _isClass || _isSerialized || parent == null)
- {
- result = _dataStore.createTransientObject(attributes);
- }
- else
- {
- String refType = attributes[DE.A_REF_TYPE];
- boolean isSpirit = false;
- if (refType != null) isSpirit = refType.equals(DataStoreResources.SPIRIT);
-
- if ((refType != null) && (refType.equals(DataStoreResources.TRUE) || refType.equals(DataStoreResources.REFERENCE)))
- {
- // new reference
- String origId = attributes[DE.A_NAME];
- if (_dataStore.contains(origId))
- {
-
- DataElement to = _dataStore.find(origId);
- result = _dataStore.createReference(parent, to, attributes[DE.A_TYPE], false);
- }
- else
- {
- // creating reference to unknown object
- result = _dataStore.createObject(parent, attributes);
- }
- }
- else
- {
- String id = attributes[DE.A_ID];
- if (id == null)
- {
- handlePanic(new Exception(fullTag));
- return null;
- }
-
- if (_dataStore.contains(id))
- {
- result = _dataStore.find(id);
-
- // treat status special test
- String name = attributes[DE.A_NAME];
- String value = attributes[DE.A_VALUE];
- if (type.equals(STR_STATUS) && name.equals(STR_STATUS_DONE))
- {
- attributes[DE.A_NAME] = STR_STATUS_ALMOST_DONE;
- if (value.equals(STR_STATUS_DONE))
- {
- attributes[DE.A_VALUE] = STR_STATUS_ALMOST_DONE;
- }
-
- result.setAttributes(attributes);
- }
- else
- {
- if (isSpirit)
- {
- if (!_dataStore.isVirtual()) attributes[DE.A_REF_TYPE] = DataStoreResources.VALUE;
- result.setSpirit(_dataStore.isVirtual());
- }
- else
- {
- result.setSpirit(false);
- }
- result.setAttributes(attributes);
- }
-
- if (parent == _rootDataElement)
- {
- DataElement rParent = result.getParent();
- parent = rParent;
-
- _rootDataElement.addNestedData(result, false);
- }
- else
- {
- if (result.getParent() == null)
- {
- if (result != _dataStore.getRoot())
- {
- result.setParent(parent);
- }
- }
- }
-
- if (parent != null)
- {
- parent.addNestedData(result, true);
- }
- else
- {
- if (result != _dataStore.getRoot())
- {
- _dataStore.trace("parent of " + result.getName() + " is NULL!"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else
- {
- result.setParent(null);
- }
- }
- if (result.isDeleted())
- //_dataStore.deleteObject(result.getParent(), result);
- result.delete();
- }
- else
- {
- // new object
- if (_dataStore.isVirtual())
- {
- result = _dataStore.find(parent, DE.A_NAME, attributes[DE.A_NAME], 1);
- }
- if (isSpirit)
- {
- if (!_dataStore.isVirtual()) attributes[DE.A_REF_TYPE] = DataStoreResources.VALUE;
- result = _dataStore.createObject(parent, attributes);
- result.setSpirit(_dataStore.isVirtual());
- }
- else
- {
- result = _dataStore.createObject(parent, attributes);
- result.setSpirit(false);
- }
-
-
- }
-
- }
- }
- }
-
- if (result != null && result.isDeleted())
- {
- _dataStore.deleteObject(parent, result);
- }
-
- return result;
- }
-
- return null;
- }
-
-
- public static String replaceSpecial(String input)
- {
- int indexOfAmp = input.indexOf('&');
- int indexOfSemi = input.indexOf(';');
- if (indexOfAmp >= 0 && indexOfSemi > indexOfAmp)
- {
- String converted = input.replaceAll(STR_AMP, "&") //$NON-NLS-1$
- .replaceAll(STR_SEMI, ";") //$NON-NLS-1$
- .replaceAll(STR_QUOTE, "\"") //$NON-NLS-1$
- .replaceAll(STR_APOS, "\'") //$NON-NLS-1$
- .replaceAll(STR_LT, "<") //$NON-NLS-1$
- .replaceAll(STR_GT, ">"); //$NON-NLS-1$
- return converted;
- }
- else
- {
- return input;
- }
- }
-
- /**
- * Converts XML special character representations to the appropriate characters
- * @param input buffer to convert
- * @return the converted buffer
- */
- public static String convertStringFromXML(String input)
- {
- if (input.indexOf('&') > -1)
- {
- return replaceSpecial(input);
- /*
- StringBuffer result = new StringBuffer();
-
- String[] tokens = splitString(input);
- for (int i = 0; i < tokens.length; i++)
- {
- String token = tokens[i];
- if (token.equals(STR_AMP_TRIMMED))
- {
- result.append('&');
- }
- else if (token.equals(STR_SEMI_TRIMMED))
- {
- result.append(';');
- }
- else if (token.equals(STR_QUOTE_TRIMMED))
- {
- result.append('"');
- }
- else if (token.equals(STR_APOS_TRIMMED))
- {
- result.append('\'');
- }
- else if (token.equals(STR_LT_TRIMMED))
- {
- result.append('<');
- }
- else if (token.equals(STR_GT_TRIMMED))
- {
- result.append('>');
- }
- else
- result.append(token);
- }
-
-
- return result.toString();
- */
- }
- else
- {
- return input;
- }
- }
-
- public class KeepAliveRequestThread extends Thread
- {
- private long _timeout;
- private boolean _failed;
-
- public KeepAliveRequestThread(long timeout)
- {
- _timeout = timeout;
- _failed = false;
- }
-
- public void run()
- {
- _dataStore.sendKeepAliveRequest();
- try
- {
- sleep(_timeout);
- }
- catch (InterruptedException e)
- {
- if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive thread interrupted."); //$NON-NLS-1$
- return;
- }
- if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive thread failed to be interrupted."); //$NON-NLS-1$
- _failed = true;
- }
-
- public boolean failed()
- {
- return _failed;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreKeyStore.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreKeyStore.java
deleted file mode 100644
index 352a6f6c3..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreKeyStore.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.util.ssl;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-
-
-
-public class DStoreKeyStore
-{
- public static DStoreKeyStore _instance = null;
-
- public DStoreKeyStore()
- {
- _instance = this;
- }
-
- public static DStoreKeyStore getInstance()
- {
- if (_instance == null)
- {
- new DStoreKeyStore();
- }
- return _instance;
- }
-
- public static KeyStore getKeyStore(String filePath, String password)
- throws KeyStoreException, NoSuchAlgorithmException,
- CertificateException, IOException, NoSuchProviderException
-
- {
- KeyStore keyStore= null;
-
-
- if (filePath != null)
- {
- File keyStoreFile = new File(filePath);
-
- /* Do not stomp an existing file */
- if(!keyStoreFile.exists())
- {
- keyStore = KeyStore.getInstance("JKS"); //$NON-NLS-1$
- keyStore.load(null, password.toCharArray());
- persistKeyStore(keyStore, filePath, password);
- }
- else {
- keyStore = loadKeyStore(filePath, password);
- }
- }
-
- return keyStore;
- }
-
-
- public static KeyStore loadKeyStore(String pathname, String password)
- throws KeyStoreException,
- NoSuchAlgorithmException,
- CertificateException,
- IOException,
- NoSuchProviderException {
-
- KeyStore ks=null;
- File file=new File(pathname);
-
- /* Do not stomp an existing file */
- if(file.exists()) {
- ks=KeyStore.getInstance("JKS"); //$NON-NLS-1$
- /* Initialize the keystore with no information */
- FileInputStream is=new FileInputStream(file);
- ks.load(is, password.toCharArray());
- is.close();
- }
- return ks;
- }
-
- public static Certificate loadCertificate(String certFilename)
- throws CertificateException,
- FileNotFoundException {
-
- CertificateFactory factory=CertificateFactory.getInstance("X.509"); //$NON-NLS-1$
-
- return factory.generateCertificate(new FileInputStream(certFilename));
- }
-
- public static void addCertificateToKeyStore(KeyStore ks, Certificate cert, String alias)
- throws KeyStoreException {
- ks.setCertificateEntry(alias, cert);
-
- }
-
- public static void persistKeyStore(KeyStore ks, String pathname, String password)
- throws KeyStoreException,
- FileNotFoundException,
- NoSuchAlgorithmException,
- CertificateException,
- IOException {
- FileOutputStream os=new FileOutputStream(pathname);
- ks.store(os, password.toCharArray());
- os.close();
-
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreSSLContext.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreSSLContext.java
deleted file mode 100644
index f4f39ca73..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreSSLContext.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.util.ssl;
-
-import java.security.KeyStore;
-
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-
-
-public class DStoreSSLContext
-{
-
- public static SSLContext getServerSSLContext(String filePath, String password)
- {
- SSLContext serverContext = null;
-
- try
- {
- KeyStore ks = DStoreKeyStore.getKeyStore(filePath, password);
- String keymgrAlgorithm = KeyManagerFactory.getDefaultAlgorithm();
- KeyManagerFactory kmf = KeyManagerFactory.getInstance(keymgrAlgorithm);
- kmf.init(ks, password.toCharArray());
-
- serverContext = SSLContext.getInstance("SSL"); //$NON-NLS-1$
- serverContext.init(kmf.getKeyManagers(), null, null);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- return serverContext;
- }
-
- public static SSLContext getClientSSLContext(String filePath, String password, DataStoreTrustManager trustManager)
- {
- SSLContext clientContext = null;
-
- try
- {
- trustManager.setKeystore(filePath, password);
- clientContext = SSLContext.getInstance("SSL"); //$NON-NLS-1$
- TrustManager[] mgrs = new TrustManager[1];
- mgrs[0] = trustManager;
-
-
- clientContext.init(null, mgrs, null);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- return clientContext;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 7d15105a7..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DataStoreTrustManager.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.core.util.ssl;
-
-import java.security.KeyStore;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-
-import javax.net.ssl.X509TrustManager;
-
-
-public class DataStoreTrustManager implements X509TrustManager
-{
- private KeyStore _keystore;
- private List _untrustedCerts;
- private List _verifyExceptions;
-
- //private X509Certificate _untrustedCert;
- //private Exception _verifyException;
-
- private List _trustedCerts;
-
- public DataStoreTrustManager()
- {
- _trustedCerts = new ArrayList();
- _untrustedCerts = new ArrayList();
- _verifyExceptions = new ArrayList();
- }
-
-
- public void setKeystore(String filePath, String password)
- {
- try
- {
- KeyStore ks = DStoreKeyStore.getKeyStore(filePath, password);
- _keystore = ks;
- loadTrustedCertificates();
- }
- catch (Exception e)
- {
-
- }
- }
-
- private void loadTrustedCertificates()
- {
- _trustedCerts.clear();
- try
- {
- Enumeration aliases = _keystore.aliases();
-
- while (aliases.hasMoreElements())
- {
- String alias = (String) (aliases.nextElement());
-
- /* The alias may be either a key or a certificate */
- java.security.cert.Certificate cert = _keystore.getCertificate(alias);
- _trustedCerts.add(cert);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
-
- public List getUntrustedCerts()
- {
- return _untrustedCerts;
- }
-
- public List getVerifyExceptions()
- {
- return _verifyExceptions;
- }
-
- private void checkTrusted(X509Certificate[] certs, String arg1) throws CertificateException
- {
- _untrustedCerts.clear();
- _verifyExceptions.clear();
-
-
- for (int i = 0; i < certs.length; i++)
- {
- X509Certificate cert = certs[i];
- boolean foundMatch = false;
- if (_trustedCerts.size() > 0)
- {
-
- for (int j = 0; j < _trustedCerts.size() && !foundMatch; j++)
- {
- X509Certificate tcert = (X509Certificate)_trustedCerts.get(j);
- try
- {
- cert.verify(tcert.getPublicKey());
- foundMatch = true;
- }
- catch (Exception e)
- {
- }
- }
- }
- if (!foundMatch)
- {
- _untrustedCerts.add(cert);
- }
- }
- if (_trustedCerts.size() == 0 || _untrustedCerts.size() > 0)
- {
- throw new CertificateException();
- }
- }
-
- public void checkClientTrusted(X509Certificate[] certs, String arg1) throws CertificateException
- {
- checkTrusted(certs, arg1);
-
- }
-
- public void checkServerTrusted(X509Certificate[] certs, String arg1) throws CertificateException
- {
- checkTrusted(certs,arg1);
- }
-
- public X509Certificate[] getAcceptedIssuers()
- {
- return null;
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/.classpath b/rse/plugins/org.eclipse.dstore.extra/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.dstore.extra/.cvsignore b/rse/plugins/org.eclipse.dstore.extra/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.dstore.extra/.project b/rse/plugins/org.eclipse.dstore.extra/.project
deleted file mode 100644
index ceed1c764..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.dstore.extra</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.dstore.extra/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.dstore.extra/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.dstore.extra/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.dstore.extra/META-INF/MANIFEST.MF
deleted file mode 100644
index 0765af41e..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.dstore.extra
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.dstore.extra.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.ui.views
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.dstore.extra.internal.extra
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.dstore.extra/about.html b/rse/plugins/org.eclipse.dstore.extra/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/build.properties b/rse/plugins/org.eclipse.dstore.extra/build.properties
deleted file mode 100644
index 505946d14..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = .,\
- about.html,\
- META-INF/,\
- dstore_extra_server.jar,\
- plugin.properties
-source.. = src/
-output.. = bin/
-source.dstore_extra_server.jar = server/
-output.dstore_extra_server.jar = server.bin/
diff --git a/rse/plugins/org.eclipse.dstore.extra/plugin.properties b/rse/plugins/org.eclipse.dstore.extra/plugin.properties
deleted file mode 100644
index b2c5f185a..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE DStore Platform Support
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DataElementActionFilter.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DataElementActionFilter.java
deleted file mode 100644
index 468f168cd..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DataElementActionFilter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.extra.internal.extra;
-
-
-
-public class DataElementActionFilter
-{
-
-
- private static String _type = "type";
- private static DataElementActionFilter _instance;
-
- public static DataElementActionFilter getInstance()
- {
- if (_instance == null)
- _instance = new DataElementActionFilter();
- return _instance;
- }
-
- /**
- * @see IActionFilter#testAttribute(Object, String, String)
- */
- public boolean testAttribute(Object target, String name, String value)
- {
- if (name.equals(_type))
- {
- IDataElement le = (IDataElement)target;
- if (le.getType().equals(value) || le.isOfType(value))
- {
- return true;
- }
- }
-
- return false;
- }
-
- public static boolean matches(Class aClass)
- {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DesktopElement.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DesktopElement.java
deleted file mode 100644
index 46e160dff..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DesktopElement.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-public class DesktopElement
-{
-
-
- public static boolean matches(Class aClass)
- {
- return false;
- }
-
- public static Object getPlatformAdapter(Object obj, Class aClass)
- {
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DomainEvent.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DomainEvent.java
deleted file mode 100644
index 2fdab06f8..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DomainEvent.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-import java.util.List;
-
-public class DomainEvent
-{
-
-
- public static final int UNKNOWN= 0;
- public static final int INSERT= 1;
- public static final int REMOVE= 2;
- public static final int STRUCTURE_CHANGE= 3;
- public static final int NON_STRUCTURE_CHANGE= 4;
- public static final int FILE_CHANGE=5;
-
-
- public static final int FIRST_CUSTOM_CHANGE= 10;
- public static final int LAST_CUSTOM_CHANGE= 255;
-
- public static final int MASK= 0xFF;
- public static final int REVEAL= 0x100;
- public static final int SELECT= 0x200;
-
- public static final int INSERT_REVEAL= INSERT | REVEAL;
- public static final int INSERT_REVEAL_SELECT= INSERT_REVEAL | SELECT;
-
- private IDataElement _parent;
- private int _type;
-
- public DomainEvent(int type, IDataElement parent, Object property)
- {
- _type = type;
- _parent = parent;
- }
-
- public DomainEvent(int type, IDataElement parent, Object property, IDataElement child)
- {
- _type = type;
- _parent = parent;
- }
-
-
- public DomainEvent(IDomainNotifier source, int type, IDataElement parent, Object property)
- {
- _type = type;
- _parent = parent;
- }
-
-
- public boolean equals(Object event)
- {
- return (((DomainEvent)event).getParent() == getParent());
- }
-
- public String getId()
- {
- return _parent.getId();
- }
-
- public String getName()
- {
- return _parent.getName();
-
- }
-
- public int getType()
- {
- return _type;
- }
-
- public IDataElement getParent()
- {
- return _parent;
- }
-
- public List getChildren()
- {
- return _parent.getNestedData();
- }
-
- public int getChildrenCount()
- {
- return _parent.getNestedSize();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DomainNotifier.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DomainNotifier.java
deleted file mode 100644
index 1d35a5687..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/DomainNotifier.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-public class DomainNotifier implements IDomainNotifier
-{
-
-
- public DomainNotifier()
- {
- }
-
- public void enable(boolean on)
- {
- }
-
- public boolean isEnabled()
- {
- return false;
- }
-
- public void addDomainListener(IDomainListener listener)
- {
- }
-
-
- public void fireDomainChanged(DomainEvent event)
- {
- }
-
- public boolean hasDomainListener(IDomainListener listener)
- {
- return false;
- }
-
- public void removeDomainListener(IDomainListener listener)
- {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDataElement.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDataElement.java
deleted file mode 100644
index ef71bdb6e..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDataElement.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-import java.util.List;
-
-public interface IDataElement extends IElement
-{
-
-
- String getName();
- String getType();
- String getId();
- List getNestedData();
- int getNestedSize();
-
-
- Object getElementProperty(Object obj);
- List getAssociated(String key);
- boolean isOfType(String typeStr);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDesktopElement.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDesktopElement.java
deleted file mode 100644
index f028b4b06..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDesktopElement.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-public interface IDesktopElement
-{
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDomainListener.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDomainListener.java
deleted file mode 100644
index 9b69661ee..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDomainListener.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-public interface IDomainListener
-{
-
-
- public boolean listeningTo(DomainEvent e);
- public void domainChanged(DomainEvent e);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDomainNotifier.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDomainNotifier.java
deleted file mode 100644
index 34b21150c..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IDomainNotifier.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-public interface IDomainNotifier
-{
-
-
- public void addDomainListener(IDomainListener listener);
- public void fireDomainChanged(DomainEvent event);
- public boolean hasDomainListener(IDomainListener listener);
- public void removeDomainListener(IDomainListener listener);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IElement.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IElement.java
deleted file mode 100644
index 1e186a3a5..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IElement.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-public interface IElement
-{
-
-
- public Object getElementProperty(Object key);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IPropertySource.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IPropertySource.java
deleted file mode 100644
index f26d96aa5..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/IPropertySource.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-public interface IPropertySource
-{
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/PropertySource.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/PropertySource.java
deleted file mode 100644
index 99179f127..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/internal/extra/PropertySource.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.extra.internal.extra;
-
-public class PropertySource
-{
-
-
- public PropertySource(IDataElement element)
- {
- }
-
- public static boolean matches(Class key)
- {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/serverruntime/.cvsignore b/rse/plugins/org.eclipse.dstore.extra/serverruntime/.cvsignore
deleted file mode 100644
index 2053777fa..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/serverruntime/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-dstore_extra_server.jar
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/Activator.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/Activator.java
deleted file mode 100644
index 367ae369f..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/Activator.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.dstore.extra;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends Plugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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;
- }
-
- /**
- * @return the shared instance of this plugin.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DataElementActionFilter.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DataElementActionFilter.java
deleted file mode 100644
index 289a553f5..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DataElementActionFilter.java
+++ /dev/null
@@ -1,87 +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.dstore.extra.internal.extra;
-
-public class DataElementActionFilter implements org.eclipse.ui.IActionFilter {
-
-
- // constants to be used by Eclipse Filtering and Enablement Support.
- private static String _type = "type"; //$NON-NLS-1$
- private static String _name = "name"; //$NON-NLS-1$
- private static DataElementActionFilter _instance;
-
- public static DataElementActionFilter getInstance() {
- if (_instance == null)
- _instance = new DataElementActionFilter();
- return _instance;
- }
-
- /**
- * Supports Eclipse filtering and enablement.
- * eg:<code>
- * <extension point="org.eclipse.rse.ui.popupMenus">
- * <objectContribution id="xyz.perspective.rse.actions.createprojectcontribution"
- * subsytemfactoryid="xyz.files"
- * typecategoryfilter="LIBRARIES">
- * <action id="xyz.perspective.rse.actions.createproject"
- * label="%create_xyz_project"
- * tooltip="%create_xyz_project"
- * helpContextId="xyz.perspective.rse01"
- * enablesFor="1"
- * class="xyz.rse.actions.RSECreateXyzProjectAction">
- * <enablement>
- * <not>
- * <objectState name="name" value="SPECIAL*"/>
- * </not>
- * </enablement>
- * </action>
- * </objectContribution>
- * </extension>
- * </code>
- *
- * The above contribution uses the RSE pop-up extension point to contribute an action
- * to any single RSE object but not anything beginning with SPECIAL.
- * @see IDataElementActionFilter#testAttribute(Object, String, String)
- */
- public boolean testAttribute(Object target, String name, String value) {
- if (name.equals(_type) && target instanceof IDataElement) {
- // support for "type" filter
- IDataElement le = (IDataElement) target;
- if (le.getType().equals(value) || le.isOfType(value))
- return true;
- } else if (name.equals(_name) && target instanceof IDataElement) {
- // support for "name" filter.
- IDataElement le = (IDataElement) target;
- if (value.endsWith("*")) { //$NON-NLS-1$
- // we have a wild card test, and * is the last character in the value
- if (le
- .getName()
- .startsWith(value.substring(0, value.length() - 1)))
- return true;
- } else if (le.getName().equals(value))
- return true;
- }
-
- // type and name filter do not match, or we have a filter we do not support.
- return false;
- }
-
- public static boolean matches(Class aClass) {
- return (aClass == org.eclipse.ui.IActionFilter.class);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DesktopElement.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DesktopElement.java
deleted file mode 100644
index 51b647c3a..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DesktopElement.java
+++ /dev/null
@@ -1,82 +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.dstore.extra.internal.extra;
-
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-
-
-public class DesktopElement implements org.eclipse.ui.model.IWorkbenchAdapter
-{
-
-
- private IDataElement _element;
-
- public DesktopElement (IDataElement e)
- {
- _element = e;
- }
-
- public IDataElement toElement(Object object)
- {
- IDataElement element = null;
- if (object instanceof IDataElement)
- {
- element = (IDataElement)object;
- }
- else
- {
- element = _element;
- }
- return element;
- }
-
- public Object[] getChildren(Object o)
- {
- IDataElement element = toElement(o);
-
-
- List objs = element.getAssociated("contents"); //$NON-NLS-1$
- return objs.toArray();
- }
-
- public ImageDescriptor getImageDescriptor(Object object)
- {
- return null;
- }
-
- public String getLabel(Object o)
- {
- return (String)_element.getElementProperty("value"); //$NON-NLS-1$
- }
-
- public Object getParent(Object o)
- {
- return null;
- }
-
- public static boolean matches(Class aClass)
- {
- return (aClass == org.eclipse.ui.model.IWorkbenchAdapter.class);
- }
-
- public static Object getPlatformAdapter(Object obj, Class aClass)
- {
- return org.eclipse.core.runtime.Platform.getAdapterManager().getAdapter(obj, aClass);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DomainEvent.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DomainEvent.java
deleted file mode 100644
index 485a65692..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DomainEvent.java
+++ /dev/null
@@ -1,101 +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.dstore.extra.internal.extra;
-
-import java.util.List;
-
-public class DomainEvent
-{
-
-
- public static final int UNKNOWN= 0;
- public static final int INSERT= 1;
- public static final int REMOVE= 2;
- public static final int STRUCTURE_CHANGE= 3;
- public static final int NON_STRUCTURE_CHANGE= 4;
- public static final int FILE_CHANGE=5;
-
-
- public static final int FIRST_CUSTOM_CHANGE= 10;
- public static final int LAST_CUSTOM_CHANGE= 255;
-
- public static final int MASK= 0xFF;
- public static final int REVEAL= 0x100;
- public static final int SELECT= 0x200;
-
- public static final int INSERT_REVEAL= INSERT | REVEAL;
- public static final int INSERT_REVEAL_SELECT= INSERT_REVEAL | SELECT;
-
- private IDataElement _parent;
- private int _type;
-
- public DomainEvent(int type, IDataElement parent, Object property)
- {
- _type = type;
- _parent = parent;
- }
-
- public DomainEvent(int type, IDataElement parent, Object property, IDataElement child)
- {
- _type = type;
- _parent = parent;
- }
-
-
- public DomainEvent(IDomainNotifier source, int type, IDataElement parent, Object property)
- {
- _type = type;
- _parent = parent;
- }
-
-
- public boolean equals(Object event)
- {
- return (((DomainEvent)event).getParent() == getParent());
- }
-
- public String getId()
- {
- return _parent.getId();
- }
-
- public String getName()
- {
- return _parent.getName();
-
- }
-
- public int getType()
- {
- return _type;
- }
-
- public IDataElement getParent()
- {
- return _parent;
- }
-
- public List getChildren()
- {
- return _parent.getNestedData();
- }
-
- public int getChildrenCount()
- {
- return _parent.getNestedSize();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DomainNotifier.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DomainNotifier.java
deleted file mode 100644
index 896f1168b..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/DomainNotifier.java
+++ /dev/null
@@ -1,118 +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.dstore.extra.internal.extra;
-
-import java.util.ArrayList;
-
-public class DomainNotifier implements IDomainNotifier
-{
-
-
- private ArrayList _listeners;
-
- private boolean _enabled;
-
-/*
- public class FireMainThread extends Job
- {
- public boolean _isWorking;
-
- private DomainEvent _event;
-
- public FireMainThread(DomainEvent event)
- {
- super("DStore Events Fired");
- _isWorking = false;
- _event = event;
- setPriority(Job.INTERACTIVE);
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- _isWorking = true;
-
- if (_event.getType() != DomainEvent.FILE_CHANGE)
- {
- for (int i = 0; i < _listeners.size(); i++)
- {
- IDomainListener listener = (IDomainListener) _listeners.get(i);
- if ((listener != null) && listener.listeningTo(_event))
- {
- listener.domainChanged(_event);
- }
- }
- }
-
- _isWorking = false;
- return Status.OK_STATUS;
- }
- }
-*/
- public DomainNotifier()
- {
- _listeners = new ArrayList();
- _enabled = false;
- }
-
-
-
- public void enable(boolean on)
- {
- _enabled = on;
- }
-
- public boolean isEnabled()
- {
- return _enabled;
- }
-
- public void addDomainListener(IDomainListener listener)
- {
- if (!_listeners.contains(listener))
- {
- _listeners.add(listener);
- }
- }
-
-
- public void fireDomainChanged(DomainEvent event)
- {
- if (_enabled)
- {
- for (int i = 0; i < _listeners.size(); i++)
- {
- IDomainListener listener = (IDomainListener) _listeners.get(i);
- if ((listener != null) && listener.listeningTo(event))
- {
- listener.domainChanged(event);
- }
- }
- //FireMainThread fireJob = new FireMainThread(event);
- //fireJob.schedule();
- }
- }
-
- public boolean hasDomainListener(IDomainListener listener)
- {
- return _listeners.contains(listener);
- }
-
- public void removeDomainListener(IDomainListener listener)
- {
- _listeners.remove(listener);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDataElement.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDataElement.java
deleted file mode 100644
index 1fa25046c..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDataElement.java
+++ /dev/null
@@ -1,35 +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.dstore.extra.internal.extra;
-
-import java.util.List;
-
-public interface IDataElement extends IElement
-{
-
-
- String getName();
- String getType();
- String getId();
- List getNestedData();
- int getNestedSize();
-
- Object getElementProperty(Object obj);
- List getAssociated(String key);
-
- boolean isOfType(String typeStr);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDataElementActionFilter.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDataElementActionFilter.java
deleted file mode 100644
index e17769297..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDataElementActionFilter.java
+++ /dev/null
@@ -1,23 +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.dstore.extra.internal.extra;
-
-public interface IDataElementActionFilter extends org.eclipse.ui.IActionFilter
-{
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDesktopElement.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDesktopElement.java
deleted file mode 100644
index b5cfa19a3..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDesktopElement.java
+++ /dev/null
@@ -1,24 +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.dstore.extra.internal.extra;
-
-
-public interface IDesktopElement extends org.eclipse.ui.model.IWorkbenchAdapter
-{
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDomainListener.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDomainListener.java
deleted file mode 100644
index aa61d23c7..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDomainListener.java
+++ /dev/null
@@ -1,24 +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.dstore.extra.internal.extra;
-
-public interface IDomainListener
-{
-
- public boolean listeningTo(DomainEvent e);
- public void domainChanged(DomainEvent e);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDomainNotifier.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDomainNotifier.java
deleted file mode 100644
index 322a75414..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IDomainNotifier.java
+++ /dev/null
@@ -1,27 +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.dstore.extra.internal.extra;
-
-public interface IDomainNotifier
-{
-
-
- public void addDomainListener(IDomainListener listener);
- public void fireDomainChanged(DomainEvent event);
- public boolean hasDomainListener(IDomainListener listener);
- public void removeDomainListener(IDomainListener listener);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IElement.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IElement.java
deleted file mode 100644
index 71daeecaa..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IElement.java
+++ /dev/null
@@ -1,26 +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.dstore.extra.internal.extra;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-public interface IElement extends IAdaptable
-{
-
-
- public Object getElementProperty(Object key);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IPropertySource.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IPropertySource.java
deleted file mode 100644
index 0720e8c94..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/IPropertySource.java
+++ /dev/null
@@ -1,23 +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.dstore.extra.internal.extra;
-
-public interface IPropertySource extends org.eclipse.ui.views.properties.IPropertySource
-{
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/PropertySource.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/PropertySource.java
deleted file mode 100644
index 8e6b76a39..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/internal/extra/PropertySource.java
+++ /dev/null
@@ -1,150 +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.dstore.extra.internal.extra;
-
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-
-public class PropertySource implements IPropertySource
-{
-
-
- private IDataElement _dataElement;
- private HashMap _properties;
- private IPropertyDescriptor[] _descriptors;
-
- public PropertySource(IDataElement element)
- {
- _dataElement = element;
-
- _properties = new HashMap();
-
- IDataElement descriptor = (IDataElement)element.getElementProperty("descriptor"); //$NON-NLS-1$
-
- List attributes = null;
- int attributesSize = 0;
- if (descriptor != null)
- {
- attributes = descriptor.getAssociated("attributes"); //$NON-NLS-1$
- attributesSize = attributes.size();
- }
-
- _descriptors = new IPropertyDescriptor[attributesSize + 2];
- _descriptors[0] = new TextPropertyDescriptor("type", "type"); //$NON-NLS-1$ //$NON-NLS-2$
- _descriptors[1] = new TextPropertyDescriptor("name", "name"); //$NON-NLS-1$ //$NON-NLS-2$
- if (attributes != null)
- {
- for (int i = 0; i < attributesSize; i++)
- {
- IDataElement attribute = (IDataElement)attributes.get(i);
- List types = attribute.getAssociated("attributes"); //$NON-NLS-1$
-
- String type = null;
- if (types.size() > 0)
- type = ((IDataElement)types.get(0)).getName();
- else
- type = "String"; //$NON-NLS-1$
-
- _properties.put(attribute.getName(), type);
- _descriptors[i+2] = new TextPropertyDescriptor(attribute.getName(), attribute.getName());
- }
- }
-
- }
-
- public static boolean matches(Class aClass)
- {
- return (aClass == org.eclipse.ui.views.properties.IPropertySource.class);
- }
-
-
- public Object getEditableValue()
- {
- return this;
- }
-
- public IPropertyDescriptor[] getPropertyDescriptors()
- {
- return _descriptors;
- }
-
- public Object getPropertyValue(Object name)
- {
- return getPropertyValue((String)name);
- }
-
- public Object getPropertyValue(String name)
- {
- Object result = null;
-
- // find the appropriate attribute
- List attributes = _dataElement.getAssociated("attributes"); //$NON-NLS-1$
- for (int i = 0; i < attributes.size(); i++)
- {
- IDataElement attribute = (IDataElement)attributes.get(i);
- if (attribute.getType().equals(name))
- {
- result = attribute.getElementProperty("value"); //$NON-NLS-1$
- }
- }
-
- if (result == null)
- {
- String type = (String)_properties.get(name);
-
- if (type != null && type.equals("Integer")) //$NON-NLS-1$
- result = "0"; //$NON-NLS-1$
- else if (type != null && type.equals("Float")) //$NON-NLS-1$
- result = "0.0"; //$NON-NLS-1$
- else
- result = _dataElement.getElementProperty(name);
- }
-
- return result;
- }
-
- public boolean isPropertySet(Object property)
- {
- return isPropertySet((String)property);
- }
-
- public boolean isPropertySet(String property)
- {
- return false;
- }
-
- public void resetPropertyValue(Object property)
- {
- }
-
- public void resetPropertyValue(String property)
- {
- }
-
- public void setPropertyValue(Object name, Object value)
- {
- setPropertyValue((String)name, value);
- }
-
- public void setPropertyValue(String name, Object value)
- {
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.classpath b/rse/plugins/org.eclipse.rse.connectorservice.dstore/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.cvsignore b/rse/plugins/org.eclipse.rse.connectorservice.dstore/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.project b/rse/plugins/org.eclipse.rse.connectorservice.dstore/.project
deleted file mode 100644
index 96589beab..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.connectorservice.dstore</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
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
deleted file mode 100644
index 46a4cd50e..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.connectorservice.dstore
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.connectorservice.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.services.dstore,
- org.eclipse.dstore.core,
- org.eclipse.dstore.extra,
- org.eclipse.rse.ui,
- org.eclipse.rse.core
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.connectorservice.dstore,
- org.eclipse.rse.connectorservice.dstore.util
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/about.html b/rse/plugins/org.eclipse.rse.connectorservice.dstore/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/build.properties b/rse/plugins/org.eclipse.rse.connectorservice.dstore/build.properties
deleted file mode 100644
index a3d40201a..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = .,\
- META-INF/,\
- about.html,\
- plugin.properties
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.properties b/rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.properties
deleted file mode 100644
index 1f5a832d9..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE DStore Connector Service
-providerName = Eclipse.org
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
deleted file mode 100644
index efd7676d3..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/Activator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.connectorservice.dstore;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends SystemBasePlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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);
-
- }
-
- /**
- * 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-
-
- protected void initializeImageRegistry()
- {
- // TODO Auto-generated method stub
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/ConnectorServiceResources.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/ConnectorServiceResources.java
deleted file mode 100644
index 99c4c4d96..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/ConnectorServiceResources.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.connectorservice.dstore;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ConnectorServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.connectorservice.dstore.ConnectorServiceResources";//$NON-NLS-1$
-
- public static String DStore_ConnectorService_Label;
- public static String DStore_ConnectorService_Description;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ConnectorServiceResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/ConnectorServiceResources.properties b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/ConnectorServiceResources.properties
deleted file mode 100644
index 3985a0b35..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/ConnectorServiceResources.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-DStore_ConnectorService_Label=DStore Connector Service
-DStore_ConnectorService_Description=The DStore Connector Service uses RSE's DataStore protocol to connect to the host. You must have a DataStore daemon or server running on the remote machine. \ No newline at end of file
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
deleted file mode 100644
index 6e9019c4b..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java
+++ /dev/null
@@ -1,1347 +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.connectorservice.dstore;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.security.cert.X509Certificate;
-import java.util.List;
-import java.util.Vector;
-
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLHandshakeException;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.dstore.core.client.ClientConnection;
-import org.eclipse.dstore.core.client.ClientSSLProperties;
-import org.eclipse.dstore.core.client.ConnectionStatus;
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-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.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.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.comm.ISystemKeystoreProvider;
-import org.eclipse.rse.core.comm.SystemKeystoreProviderManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.core.subsystems.AbstractConnectorService;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
-import org.eclipse.rse.core.subsystems.IServerLauncher;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ServerLaunchType;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner;
-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;
-import org.eclipse.swt.widgets.Shell;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.Version;
-
-/**
- * System class required by the remote systems framework.
- * This represents the live connection at tool runtime.
- * <p>
- * The universal subsystems are based on datastore technology so we use that
- * to do the connection.
- */
-public class DStoreConnectorService extends AbstractConnectorService implements IDataStoreProvider
-{
-
- private ClientConnection clientConnection = null;
- private ConnectionStatusListener _connectionStatusListener = null;
-
- // Shortcut to sysInfo to save time
- private transient DataElement sysInfo = null;
- private transient DataElement installInfo = null;
- private transient DataElement clientIP = null;
- private static String DSTORE_PACKAGE = "org.eclipse.dstore.core"; //$NON-NLS-1$
-
- private Exception connectException;
- //private Hashtable restrictedTypes = null;
- private IServerLauncher starter;
-
-
- private class ShowConnectMessage implements Runnable
- {
- private SystemMessage _msg;
- public ShowConnectMessage(SystemMessage msg)
- {
- _msg = msg;
- }
-
- public void run()
- {
- SystemMessageDialog dlg = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), _msg);
- dlg.open();
- }
- }
-
- /**
- * Constructor when we don't have a subsystem yet.
- * Call setSubSystem after.
- */
- public DStoreConnectorService(String name, String description, IHost host)
- {
- super(name, description, host, 0);
- }
-
-
-
- /*
- * Set the subsystem, when its not known at constructor time
- *
- public void setSubSystem(SubSystem ss)
- {
- super.setSubSystem(ss);
- setDaemonLaunchEnabled((SubSystemImpl)ss, false);
- }*/
-
-
- public int getServerVersion()
- {
- return clientConnection.getServerVersion();
- }
-
- public int getServerMinor()
- {
- return clientConnection.getServerMinor();
- }
-
- /**
- * Retrieve the value of a property which is contained in the environment miners
- * system info child. Currently supported properties:
- * <ul>
- * <li>os.name
- * <li>os.version
- * <li>user.home
- * <li>temp.dir
- * </ul>
- * @return The String value of the property or "" if the property was not found.
- */
- private String getSystemInfoProperty(String propertyName)
- {
- // System properties require a connection
- if (!isConnected())
- {
- try
- {
- getPrimarySubSystem().connect();
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("UniversalSystem.getSystemInfoProperty: error during connect", e); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- String propertyValue = null;
- DataElement envMinerData = null;
- DataStore ds = getDataStore();
-
- // Check if we have sysInfo cached already
- if (sysInfo == null)
- {
- envMinerData = ds.findMinerInformation(EnvironmentMiner.MINER_ID);
- if (envMinerData != null)
- {
- sysInfo = ds.find(envMinerData, DE.A_NAME, "systemInfo", 1); //$NON-NLS-1$
- }
- }
-
- if (sysInfo != null)
- {
- DataElement propertyNode = ds.find(sysInfo, DE.A_NAME, propertyName, 1);
- if (propertyNode != null)
- {
- propertyValue = propertyNode.getSource();
- }
- else
- propertyValue = ""; //$NON-NLS-1$
- }
- else
- {
- SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: sysInfo node not found", null); //$NON-NLS-1$
- SystemBasePlugin.logError("UniversalSystem.getSystemInfoNode: miner data = " + envMinerData, null); //$NON-NLS-1$
- propertyValue = ""; //$NON-NLS-1$
- }
-
- return propertyValue;
- }
-
- /**
- * Return the version, release, modification of the remote system
- */
- public String getVersionReleaseModification()
- {
- if (!isConnected())
- return SystemPropertyResources.RESID_TERM_NOTAVAILABLE;
-
- StringBuffer buffer = new StringBuffer(getSystemInfoProperty("os.name")); //$NON-NLS-1$
- buffer.append(" "); //$NON-NLS-1$
- buffer.append(getSystemInfoProperty("os.version")); //$NON-NLS-1$
-
- return buffer.toString();
- }
-
- /**
- * Return the home directory of the remote system for the current user, if available.
- */
- public String getHomeDirectory()
- {
- return getSystemInfoProperty("user.home"); //$NON-NLS-1$
- }
-
- public boolean runClassInstanceRemotely(IRemoteClassInstance instance)
- {
- DataStore dataStore = getDataStore();
- dataStore.registerLocalClassLoader(instance.getClass().getClassLoader());
- dataStore.runRemoteClassInstance(instance);
- return true;
- }
-
- /**
- * Return the location where the RSE server is installed
- * @return the server install location
- */
- public String getServerInstallPath()
- {
- if (clientConnection != null)
- {
- if (installInfo == null)
- {
- DataStore ds = clientConnection.getDataStore();
- installInfo = ds.queryInstall();
- }
- return installInfo.getAttribute(DE.A_SOURCE);
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Return the Client IP that the RSE server is connected to. When connected,
- * the client IP is obtained from the server-side. When not-connected,
- * the fall back is to get the IP locally (note that the IP obtained locally
- * may be not be what you want when using VPN).
- * @return the client ip
- */
- public String getClientIP()
- {
- if (clientConnection != null && clientConnection.isConnected())
- {
- if (clientIP == null)
- {
- DataStore ds = clientConnection.getDataStore();
- clientIP = ds.queryClientIP();
- }
- return clientIP.getAttribute(DE.A_SOURCE);
- }
-
- // fall back to getting local machine ip address
- // this may be incorrect for the server in certain cases
- // like over VPN
- return RSECorePlugin.getLocalMachineIPAddress();
- }
-
- /**
- * Return the temp directory of the remote system for the current user, if available.
- */
- public String getTempDirectory()
- {
- return getSystemInfoProperty("temp.dir"); //$NON-NLS-1$
- }
-
- protected int getSocketTimeOutValue()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT);
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IConnectorService#disconnect(IProgressMonitor)
- */
- public void internalDisconnect(IProgressMonitor monitor) throws Exception
- {
- try
- {
- if (clientConnection != null)
- {
- // Is disconnect being called because the network (connection) went down?
- if (_connectionStatusListener != null && _connectionStatusListener.isConnectionDown())
- {
- notifyError();
- }
- else
- {
- // Fire comm event to signal state about to change
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_DISCONNECT);
- }
-
- DataStore dataStore = getDataStore();
- if (dataStore != null && _connectionStatusListener != null)
- {
- dataStore.getDomainNotifier().removeDomainListener(_connectionStatusListener);
- }
- if (clientConnection != null)
- {
- clientConnection.disconnect();
- }
-
-// Fire comm event to signal state changed
- notifyDisconnection();
- clientConnection = null;
- // DKM - no need to clear uid cache
- clearPasswordCache(false); // clear in-memory password
- //clearUserIdCache(); // Clear any cached local user IDs
- sysInfo = null;
- installInfo = null;
- clientIP = null;
-
-
- }
- }
- catch (Exception exc)
- {
- throw new java.lang.reflect.InvocationTargetException(exc);
- }
- }
-
- private IRemoteServerLauncher getDStoreServerLauncher()
- {
- IServerLauncherProperties sl = getRemoteServerLauncherProperties();
- //System.out.println("in UniversalSystem#getServerLauncher: sl = "+sl);
- if (sl != null && sl instanceof IRemoteServerLauncher)
- {
- return (IRemoteServerLauncher)sl;
- }
- else
- //return ((SubSystemConfigurationImpl)ss.getParentSubSystemConfiguration()).getDefaultIBMServerLauncher(ss);
- return null; // should never happen!
- }
-
- protected void setPluginPathProperty()
- {
- Bundle bundle = RSEUIPlugin.getDefault().getBundle();
- URL pluginsURL = bundle.getEntry("/"); //$NON-NLS-1$
-
- try
- {
- String path = FileLocator.resolve(pluginsURL).getPath();
- File systemsPluginDir = new File(path);
- path = systemsPluginDir.getParentFile().getAbsolutePath();
- String version = (String)(bundle.getHeaders().get(org.osgi.framework.Constants.BUNDLE_VERSION));
- Version v = new Version(version);
- String versionString = v.toString();
- String dstorePath = getDStorePath(path, versionString);
- System.setProperty("A_PLUGIN_PATH", dstorePath); //$NON-NLS-1$
- }
- catch (IOException e)
- {
- }
- }
-
- private String getDStorePath(String pluginDir, String version)
- {
- File dstorePath = new File(pluginDir + "/" + DSTORE_PACKAGE + "_" + version); //$NON-NLS-1$ //$NON-NLS-2$
- if (!dstorePath.exists())
- {
- // might be in workspace
- dstorePath = new File(pluginDir + "/" + DSTORE_PACKAGE); //$NON-NLS-1$
- }
-
- return dstorePath.getAbsolutePath();
- }
-
-// /**
-// * Specify if you support connecting to a running daemon
-// * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
-// * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
-// */
-// public void setDaemonLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
-// enableServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL, enable);
-// }
-
-// /**
-// * Return if you support connecting to a running daemon
-// * @deprecated Use instead {@link #isEnabledServerLaunchType(ISubSystem, ServerLaunchType)}
-// * or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
-// */
-// public boolean getDaemonLaunchEnabled(SubSystem subsystemImpl) {
-// return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL);
-// }
-
-// /**
-// * Specify if you support remotely launching a server script
-// * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
-// * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
-// */
-// public void setRexecLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
-// enableServerLaunchType(subsystemImpl, ServerLaunchType.REXEC_LITERAL, enable);
-// }
-
- /**
- * Return if you support remotely launching a server script
- * @deprecated Use instead {@link #isEnabledServerLaunchType(ISubSystem, ServerLaunchType)}
- * or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
- */
- public boolean getRexecLaunchEnabled(SubSystem subsystemImpl) {
- return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.REXEC_LITERAL);
- }
-
-// /**
-// * Specify if you support connecting to a server already running
-// * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
-// * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
-// */
-// public void setNoLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
-// enableServerLaunchType(subsystemImpl, ServerLaunchType.RUNNING_LITERAL, enable);
-// }
-
- /**
- * Return if you support connecting to a server already running
- * @deprecated Use instead {@link #isEnabledServerLaunchType(ISubSystem, ServerLaunchType)}
- * or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
- */
- public boolean getNoLaunchEnabled(SubSystem subsystemImpl) {
- return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.RUNNING_LITERAL);
- }
-
- /**
- * Return the remote server launcher, which implements IServerLauncher.
- * This is called by the default implementation of connect, if
- * subsystem.getParentSubSystemConfiguration().supportsServerLaunchProperties returns true.
- */
- public IServerLauncher getRemoteServerLauncher()
- {
- if (starter == null)
- starter = new RexecDstoreServer();
- ((RexecDstoreServer)starter).setClientConnection(clientConnection);
- ((RexecDstoreServer)starter).setSocketTimeoutValue(getSocketTimeOutValue());
- return starter;
- }
-
-
-
- /**
- * @see org.eclipse.rse.core.subsystems.IConnectorService#connect(IProgressMonitor)
- */
- protected synchronized void internalConnect(IProgressMonitor monitor) throws Exception
- {
- if (isConnected()) {
- return;
- }
-
- // set A_PLUGIN_PATH so that dstore picks up the property
- setPluginPathProperty();
-
- // Fire comm event to signal state about to change
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT);
-
- ConnectionStatus connectStatus = null;
- ConnectionStatus launchStatus = null;
-
- clientConnection = new ClientConnection(getPrimarySubSystem().getHost().getAliasName());
-
- clientConnection.setHost(getHostName());
- clientConnection.setPort(Integer.toString(getPort()));
-
-// ISubSystem ss = getPrimarySubSystem();
- getPrimarySubSystem();
- IRemoteServerLauncher serverLauncher = getDStoreServerLauncher();
-
- ServerLaunchType serverLauncherType = null;
- boolean autoDetectSSL = true;
- if (serverLauncher != null)
- {
- serverLauncherType = serverLauncher.getServerLaunchType();
- autoDetectSSL = serverLauncher.getAutoDetectSSL();
- }
- else
- {
- // System.out.println("server launcher is null");
- }
-
- //long t1 = System.currentTimeMillis();
- SystemMessage msg = null;
- boolean launchFailed = false;
-
- // get Socket Timeout Value Preference
- int timeout = getSocketTimeOutValue();
-
- if (serverLauncherType == ServerLaunchType.REXEC_LITERAL)
- {
- if (monitor != null)
- {
- SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_STARTING_SERVER_VIA_REXEC);
- monitor.subTask(cmsg.getLevelOneText());
- }
-
- SystemSignonInformation info = getPasswordInformation();
-
- // GC: - if failed to get a connection in another way, try
- // starting the datastore server with rexec
- IServerLauncher starter = getRemoteServerLauncher();
- starter.setSignonInformation(info);
- starter.setServerLauncherProperties(serverLauncher);
- if (autoDetectSSL) timeout = 3000;
- else setSSLProperties(isUsingSSL());
-
- int iServerPort = launchUsingRexec(monitor, info, serverLauncher);
-
- if(iServerPort != 0)
- {
- clientConnection.setPort("" + iServerPort); //$NON-NLS-1$
-
- if (monitor != null)
- {
- 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) && autoDetectSSL)
- {
- if (setSSLProperties(true))
- {
- iServerPort = launchUsingRexec(monitor, info, serverLauncher);
- if (iServerPort != 0)
- {
- clientConnection.setPort("" + iServerPort); //$NON-NLS-1$
- connectStatus = clientConnection.connect(null, timeout);
- }
- }
- }
- }
- else
- {
- launchFailed = true;
- connectStatus = new ConnectionStatus(false);
- msg = starter.getErrorMessage();
- String errorMsg = null;
- if (msg == null)
- {
- errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED).getLevelOneText();
- }
- else
- {
- errorMsg = msg.getLevelTwoText();
- }
- connectStatus.setMessage(errorMsg);
- }
- }
- // Start the server via the daemon
- else if (serverLauncherType == ServerLaunchType.DAEMON_LITERAL)
- {
- if (monitor != null)
- {
- SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_STARTING_SERVER_VIA_DAEMON);
- monitor.subTask(cmsg.getLevelOneText());
- }
-
- // DY: getLocalUserId() may return null for Windows connections because
- // we no longer prompt for userid / pwd. But for other connections the userid
- // should be the same as the one stored in the password info (and for Windows
- // this will be the temp remoteuser userid.
- //launchStatus = clientConnection.launchServer(getLocalUserId(), getPassword(getPasswordInformation()));
- SystemSignonInformation info = getPasswordInformation();
- int daemonPort = 0;
- if (serverLauncher != null)
- daemonPort = serverLauncher.getDaemonPort();
-
- /* String daemonPortStr = getSubSystem().getVendorAttribute("Remote", "DAEMON_PORT");
- if (daemonPortStr != null && daemonPortStr.length() > 0)
- {
- daemonPort = Integer.parseInt(daemonPortStr);
- }*/
-
- // 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())
- {
- 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))
- {
- internalConnect(monitor);
- return;
- }
- }
- else if (launchMsg != null && isPortOutOfRange(launchMsg))
- {
- launchFailed = true;
-
- SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_PORT_OUT_RANGE);
- int colonIndex = launchMsg.indexOf(':');
- String portRange = launchMsg.substring(colonIndex + 1);
- cmsg.makeSubstitution(portRange);
-
- ShowConnectMessage msgAction = new ShowConnectMessage(cmsg);
- Display.getDefault().asyncExec(msgAction);
- return;
- }
- else
- {
- launchFailed = true;
- SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null); //$NON-NLS-1$
- }
- }
- if (launchStatus.isConnected())
- {
- if (monitor != null)
- {
- SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER);
- cmsg.makeSubstitution(clientConnection.getPort());
- monitor.subTask(cmsg.getLevelOneText());
- }
- // connect to launched server
- connectStatus = clientConnection.connect(launchStatus.getTicket(), timeout);
- Throwable conE = connectStatus.getException();
- if (!connectStatus.isConnected() &&
- (connectStatus.getMessage().startsWith(ClientConnection.CANNOT_CONNECT) ||
- conE instanceof SSLException
- )
- )
- {
- if (conE instanceof SSLHandshakeException)
- {
- 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();
- }
- }
- }
-
- }
- launchStatus = launchServer(clientConnection, info, daemonPort, monitor);
- if (!launchStatus.isConnected())
- {
- launchFailed = true;
- }
- else
- {
- if (setSSLProperties(!usedSSL))
- {
- connectStatus = clientConnection.connect(launchStatus.getTicket(), timeout);
- }
- }
- }
- if (!connectStatus.isConnected() && connectStatus.isSLLProblem())
- {
- importCertsAndReconnect(connectStatus, monitor);
- return;
- }
-
- /*
- if (connectStatus != null && connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_UPDATE))
- {
- // offer to update it
- clientConnection.getDataStore().queryInstall();
- }
- */
- }
- else
- {
- connectStatus = new ConnectionStatus(false);
- connectStatus.setMessage(
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED).getLevelOneText());
- }
- }
- else if (serverLauncherType == ServerLaunchType.RUNNING_LITERAL)
- {
- if (monitor != null)
- {
- SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER);
- cmsg.makeSubstitution(clientConnection.getPort());
- monitor.subTask(cmsg.getLevelOneText());
- }
- // connection directly
- boolean useSSL = isUsingSSL();
- 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)
- {
- internalDisconnect(monitor);
- 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)
- {
- internalDisconnect(monitor);
- throw new InterruptedException();
- }
- }
-
- DataStore dataStore = clientConnection.getDataStore();
-
- _connectionStatusListener = new ConnectionStatusListener(dataStore.getStatus(), this);
- dataStore.getDomainNotifier().addDomainListener(_connectionStatusListener);
-
-
-
- // DKM: dataStore needs a miners location
- // for now, I'll use dstore.miners as default location
- // (I've inserted the universal miner in it's minerFile.dat file)
-
- // DY: defect 46811 The minerFile.dat does not exist in this directory which causes a
- // java.io.FileNotFoundException to be printed to the console (not very
- // encouraging for the end user.) So I'm setting it to the current directory (.)
- // which should be where the code is run from
- //dataStore.addMinersLocation("org.eclipse.dstore.miners");
-
-
- StatusMonitor statusMonitor = StatusMonitorFactory.getInstance().getStatusMonitorFor(this, dataStore);
-
- if (launchStatus != null && launchStatus.isConnected())
- {
- //dataStore.showTicket(launchStatus.getTicket()); // send security token to server, this must be done first
- DataElement ticket = dataStore.createTicket(launchStatus.getTicket());
- dataStore.queryShowTicket(ticket);
- //statusMonitor.waitForUpdate(ticketStatus);
- }
- else
- {
- dataStore.showTicket(null);
- }
-
- if (dataStore.isDoSpirit()) dataStore.queryServerSpiritState();
-
- // Fire comm event to signal state changed
- fireCommunicationsEvent(CommunicationsEvent.AFTER_CONNECT);
-
- // is there a warning message?
- String message = connectStatus.getMessage();
- if (message != null)
- {
- if (message.startsWith(ClientConnection.CLIENT_OLDER))
- {
-
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CLIENT_OLDER_WARNING);
- msg.makeSubstitution(getHostName());
- }
- else if (message.startsWith(ClientConnection.SERVER_OLDER))
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_SERVER_OLDER_WARNING);
- msg.makeSubstitution(getHostName());
- }
- ShowConnectMessage msgAction = new ShowConnectMessage(msg);
- Display.getDefault().asyncExec(msgAction);
- }
-
- // register the classloader for this plugin with the datastore
- dataStore.registerLocalClassLoader(getClass().getClassLoader());
-
- int serverVersion = getServerVersion();
- if (serverVersion >= 8 || (serverVersion == 7 && getServerMinor() >= 1))
- {
- // register the preference for remote class caching with the datastore
- store.setDefault(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES, IUniversalDStoreConstants.DEFAULT_PREF_CACHE_REMOTE_CLASSES);
- boolean cacheRemoteClasses = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES);
-
- dataStore.setPreference(RemoteClassLoader.CACHING_PREFERENCE, cacheRemoteClasses ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else
- {
- dataStore.addMinersLocation("."); //$NON-NLS-1$
- // older servers initialized in one shot
- DataElement schemaStatus = dataStore.getSchema();
-
- // Initialzie the miners
- if (monitor != null)
- {
- SystemMessage imsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_INITIALIZING_SERVER);
- monitor.subTask(imsg.getLevelOneText());
- }
- DataElement initStatus = dataStore.initMiners();
- statusMonitor.waitForUpdate(schemaStatus);
- statusMonitor.waitForUpdate(initStatus);
- }
- //long t2 = System.currentTimeMillis();
- //System.out.println("connect time = "+(t2 - t1));
- }
- else
- {
- // if daemon launch failed because of an SSL problem
- if (launchFailed && launchStatus != null && launchStatus.isSLLProblem())
- {
- if (launchStatus.isSLLProblem())
- {
- launchStatus.getException();
-
- List certs = launchStatus.getUntrustedCertificates();
- if (certs.size() > 0)
- {
- ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
- if (provider != null)
- {
- if (provider.importCertificates(certs, getHostName()))
- {
- internalConnect(monitor);
- return;
- }
- }
- }
- else
- {
-
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_SSL_EXCEPTION);
- msg.makeSubstitution(launchStatus.getMessage());
- }
- }
- }
-
- // if daemon launch failed (SSL or otherwise)
- if (launchFailed && launchStatus != null)
- {
- String launchMsg = launchStatus.getMessage();
- if (launchStatus.getException() != null && serverLauncher != null)
- {
- Throwable exception = launchStatus.getException();
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED_EXCEPTION);
- msg.makeSubstitution(getHostName(), ""+serverLauncher.getDaemonPort(), exception); //$NON-NLS-1$
- }
- else if (launchMsg != null && launchMsg.indexOf(IDataStoreConstants.AUTHENTICATION_FAILED) != -1)
- {
- if (launchFailed)
- {
- clearPasswordCache(true);
- }
-
- // Display error message
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_AUTH_FAILED);
- msg.makeSubstitution(getHostName());
- DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(msg);
- Display.getDefault().syncExec(msgAction);
-
- // Re-prompt for password
- connectException = null;
- Display.getDefault().syncExec(new Runnable()
- {
- public void run()
- {
- try
- {
- promptForPassword(true);
- }
- catch (InterruptedException e)
- {
- connectException = e;
- }
- }
- });
-
- // Check if the user cancelled the prompt
- if (connectException instanceof InterruptedException)
- {
- throw connectException;
- }
-
- // Try to connect again. This is a recursive call, but will only
- // call if the user presses OK on the password prompt dialog, otherwise
- // it will continue and return
- internalConnect(monitor);
-
- // 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))
- {
- internalConnect(monitor);
- return;
- }
- }
- else if (launchMsg != null)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED);
- msg.makeSubstitution(getHostName(), clientConnection.getPort(), launchMsg);
- }
- }
-
- // if connection failed for known reason
- else if (connectStatus != null && !connectStatus.isConnected())
- {
- if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_SERVER_UPDATE))
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INCOMPATIBLE_UPDATE);
- msg.makeSubstitution(getHostName());
- }
- else if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_PROTOCOL))
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INCOMPATIBLE_PROTOCOL);
- msg.makeSubstitution(getHostName());
- }
- else
- {
- Throwable exception = connectStatus.getException();
- if (exception != null)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED);
- msg.makeSubstitution(getHostName(), exception);
- }
- }
- }
-
- // if connect failed for unknown reason
- else if (connectStatus == null)
- {
- SystemBasePlugin.logError("Failed to connect to remote system", null); //$NON-NLS-1$
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED);
- msg.makeSubstitution(getHostName());
- }
-
- // if, for some reason, we don't have a message
- if (msg == null && connectStatus != null)
- {
- SystemBasePlugin.logError("Failed to connect to remote system" + connectStatus.getMessage(), null); //$NON-NLS-1$
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED);
- msg.makeSubstitution(getHostName());
- }
-
- clientConnection.disconnect();
- clientConnection = null;
-
- // yantzi: artemis 6.0, check for invalid login (user ID / pwd) and reprompt for signon information
- if (msg != null && msg.getFullMessageID().startsWith(ISystemMessages.MSG_COMM_INVALID_LOGIN))
- {
- if (launchFailed)
- {
- clearPasswordCache(true);
- }
-
- DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(msg);
- Display.getDefault().syncExec(msgAction);
-
- // Re-prompt for password
- connectException = null;
- Display.getDefault().syncExec(new Runnable()
- {
- public void run()
- {
- try
- {
- promptForPassword(true);
- }
- catch (InterruptedException e)
- {
- connectException = e;
- }
- }
- });
-
- // Check if the user cancelled the prompt
- if (connectException instanceof InterruptedException)
- {
- throw connectException;
- }
-
- // Try to connect again. This is a recursive call, but will only
- // call if the user presses OK on the password prompt dialog, otherwise
- // it will continue and return
- internalConnect(monitor);
-
- // we are connected from recursive so continue
- return;
- }
-
- throw new SystemMessageException(msg);
- }
- }
-
- protected boolean isPortOutOfRange(String message)
- {
- return message.indexOf(IDataStoreConstants.PORT_OUT_RANGE) != -1;
- }
-
- 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()))
- {
- internalConnect(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( X509Certificate cert)
- {
- return true;
- }
-
-
- /*
- * 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)
- {
- 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);
- }
-
- /*
- * Launch a DataStore server using a specified server launcher. By default, this method does nothing since UniversalSystem does
- * not know how to handle this particular launch type. This method should be overridden to provide a custom implementation
- * of the launch.
- */
- protected ConnectionStatus launchServer(ClientConnection clientConnection, SystemSignonInformation info, IServerLauncherProperties launcher, IProgressMonitor monitor)
- {
- 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()
- */
- public boolean isConnected()
- {
- if (clientConnection != null)
- {
- return clientConnection.isConnected();
- }
-
- return false;
- }
-
- /**
- * Shortcut to checking if the network is down
- */
- public boolean isNetworkError()
- {
- if (_connectionStatusListener != null)
- {
- return _connectionStatusListener.isConnectionDown();
- }
-
- return false;
- }
-
- /**
- * Show any warning messages returned by host api calls.
- * @param shell Parent UI
- * @param warnings Vector of String or toString()'able messages.
- */
- public void showWarningMsgs(Shell shell, Vector warnings)
- {
- for (int idx = 0; idx < warnings.size(); idx++)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W);
- msg.makeSubstitution((warnings.elementAt(idx)).toString());
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
- }
-
- /**
- * @return The DataStore currently being used by this connection.
- */
- public DataStore getDataStore()
- {
- if (clientConnection != null)
- {
- return clientConnection.getDataStore();
- }
- else
- {
- return null;
- }
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#getPasswordInformation()
- */
-// public SystemSignonInformation getPasswordInformation()
-// {
-// // For Windows we want to avoid the signon prompt (because we never
-// // really authenticate with the remote system and this would be deceiving
-// // for the end user
-//
-// if (getPrimarySubSystem().getHost().getSystemType().equals(IRSESystemType.SYSTEMTYPE_WINDOWS))
-// {
-// String userid = getPrimarySubSystem().getUserId();
-// if (userid == null)
-// {
-// userid = "remoteuser"; //$NON-NLS-1$
-// }
-// SystemSignonInformation info = new SystemSignonInformation(getPrimarySubSystem().getHost().getHostName(),
-// userid, "", IRSESystemType.SYSTEMTYPE_WINDOWS); //$NON-NLS-1$
-// return info;
-// }
-// else
-// {
-// return super.getPasswordInformation();
-// }
-// }
-
- /**
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#isPasswordCached()
- */
-// public boolean isPasswordCached()
-// {
-// // For Windows we never prompt for userid / password so we don't need
-// // to clear the password cache
-// if (getPrimarySubSystem().getHost().getSystemType().equals(IRSESystemType.SYSTEMTYPE_WINDOWS))
-// {
-// return false;
-// }
-// else
-// {
-// return super.isPasswordCached();
-// }
-// }
-
- public boolean hasRemoteServerLauncherProperties()
- {
- return getRemoteServerLauncherProperties() != null;
- }
-
-
-
- public boolean supportsRemoteServerLaunching()
- {
- return true;
- }
-
-
-
- public boolean supportsServerLaunchProperties()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsPassword()
- */
- public boolean supportsPassword() {
- boolean result = super.supportsPassword();
- IHost host = getHost();
- String systemType = host.getSystemType();
- if (systemType.equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) {
- result = false;
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsUserid()
- */
- public boolean supportsUserId() {
- boolean result = super.supportsUserId();
- IHost host = getHost();
- String systemType = host.getSystemType();
- if (systemType.equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) {
- result = false;
- }
- return result;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java
deleted file mode 100644
index ddb043edf..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java
+++ /dev/null
@@ -1,113 +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.connectorservice.dstore;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-
-/**
- * IConnectorService manager class.
- * There should be only one of these instantiated.
- * Use getTheUniversalSystemManager to get that singleton.
- * <p>
- * The job of this manager is to manage and return IConnectorService objects.
- * It ensures there is only ever one per unique SystemConnection,
- * so that both the file and cmd subsystems can share the same system object.
- */
-public class DStoreConnectorServiceManager extends AbstractConnectorServiceManager
-{
- private static DStoreConnectorServiceManager inst = null;
-
- /**
- * Private constructor to ensure not instantiated this way.
- * Use getTheUniversalSystemManager instead.
- */
- private DStoreConnectorServiceManager()
- {
- }
-
- /**
- * Return singleton instance of this class
- */
- public static DStoreConnectorServiceManager getTheUniversalSystemManager()
- {
- if (inst == null)
- inst = new DStoreConnectorServiceManager();
- return inst;
- }
-
- /**
- * Return true if the singleton has been created.
- * This saves creating it at shutdown just to test for isConnected.
- */
- public static boolean isInstantiated()
- {
- return (inst != null);
- }
-
- // -------------------------------------
- // ABSTRACT METHODS FROM PARENT CLASS...
- // -------------------------------------
-
- /**
- * Return the actual IConnectorService object. We return an instance of UniversalSystem.
- */
- public IConnectorService createConnectorService(IHost host)
- {
- IConnectorService service = new DStoreConnectorService(ConnectorServiceResources.DStore_ConnectorService_Label, ConnectorServiceResources.DStore_ConnectorService_Description, host);
- return service;
- }
-
- /**
- * For all subsystems in a particular SystemConnection, we need to know which
- * ones are to share a single IConnectorService object. To do this, we need a key which
- * is canonical for all subsystems in a given connection. This can be anything,
- * but is typically a unique interface that all subsystems supported a shared
- * IConnectorService object implement.
- * <p>
- * Whatever is returned from here is used as the key into a hashtable to find the
- * singleton IConnectorService object in getSystemObject.
- * <p>
- * @return IUniversalSubSystem.class
- */
- public Class getSubSystemCommonInterface(ISubSystem subsystem)
- {
- return IUniversalDStoreSubSystem.class;
- }
- /**
- * Given another subsystem, return true if that subsystem shares a single IConnectorService object
- * with this one. You must override this to return true if you recognize that subsystem
- * as one of your own. You are guaranteed the other subsystem will be from the same
- * SystemConnection as this one.
- * <p>
- * You can't assume a SystemConnection will you only have subsystems of that you created,
- * so you should only return true if it implements your interface or you know it is an
- * instance of your subsystem class.
- * <p>
- * This should simply return (otherSubSystem instanceof interface) where interface is
- * the same one returned from getSubSystemCommonInterface
- *
- * @return true if otherSubSystem instanceof IUniversalSubSystem
- */
- public boolean sharesSystem(ISubSystem otherSubSystem)
- {
- return (otherSubSystem instanceof IUniversalDStoreSubSystem);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreConstants.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreConstants.java
deleted file mode 100644
index 3fdd57004..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreConstants.java
+++ /dev/null
@@ -1,70 +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.connectorservice.dstore;
-/**
- * Constants used throughout the UniversalSystem plugin
- */
-public interface IUniversalDStoreConstants
-{
-
-
- public static final String PLUGIN_ID ="org.eclipse.rse.connectorservice.dstore"; //$NON-NLS-1$
-
- public static final String PREFIX = PLUGIN_ID + "."; //$NON-NLS-1$
-
- // prefix for context sensitive help
- public static final String HELP_PREFIX = PREFIX;
-
- // Resource Bundle ids
- public static final String RESID_PREFIX = PREFIX + "ui."; //$NON-NLS-1$
-
- // Icons
- public static final String ICON_DIR = "icons"; //$NON-NLS-1$
- public static final String ICON_PATH = java.io.File.separator + ICON_DIR + java.io.File.separator;
- public static final String ICON_SUFFIX = "Icon"; //$NON-NLS-1$
- public static final String ICON_EXT = ".gif"; //$NON-NLS-1$
-
- //public static final String ICON_SYSTEM_LIBRARY_ROOT = "system400Library";
- //public static final String ICON_SYSTEM_LIBRARY = ICON_SYSTEM_LIBRARY_ROOT + ICON_EXT;
- //public static final String ICON_SYSTEM_LIBRARY_ID = PREFIX + ICON_SYSTEM_LIBRARY_ROOT + ICON_SUFFIX;
-
- // -------------------------
- // Action prefixes.
- // SYstemBaseAction class adds "label" to get text and "tooltip" and "description" to get hover help
- // -------------------------
- // action ids
- public static final String ACTION_PREFIX = RESID_PREFIX + "action."; //$NON-NLS-1$
- public static final String RESID_RUN_REMOTECMD_PREFIX = ACTION_PREFIX+"RunRemoteCommand"; //$NON-NLS-1$
-
-
- // -------------------------
- // Preferences...
- // -------------------------
- public static final String RESID_PREF_PREFIX = RESID_PREFIX+"preferences."; //$NON-NLS-1$
- public static final String RESID_PREF_ROOT_TITLE = RESID_PREF_PREFIX+"root.title"; //$NON-NLS-1$
-
- // RemoteClassLoader caching preferences
- public static final String RESID_PREF_CACHE_REMOTE_CLASSES = RESID_PREF_PREFIX + "cacheremoteclasses"; //$NON-NLS-1$
- public static final boolean DEFAULT_PREF_CACHE_REMOTE_CLASSES = true;
-
- // Socket timeout preference
- public static final String RESID_PREF_SOCKET_TIMEOUT = RESID_PREF_PREFIX + "sockettimeout"; //$NON-NLS-1$
- public static final int DEFAULT_PREF_SOCKET_TIMEOUT = 300000;
-
- public static final String RESID_PREF_DO_KEEPALIVE = RESID_PREF_PREFIX + "dokeepalive"; //$NON-NLS-1$
- public static final boolean DEFAULT_PREF_DO_KEEPALIVE = true;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreMessages.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreMessages.java
deleted file mode 100644
index 8bf2b731d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreMessages.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.connectorservice.dstore;
-
-/**
- * Message IDs
- */
-public interface IUniversalDStoreMessages
-{
-
-
- public static final String PLUGIN_ID ="org.eclipse.rse.connectorservice.dstore"; //$NON-NLS-1$
- public static final String PREFIX = PLUGIN_ID+"."; //$NON-NLS-1$
- // Resource Bundle ids
- public static final String RESID_PREFIX = PREFIX+"ui."; //$NON-NLS-1$
- // Messages prefixes
- public static final String MSG_PREFIX = RESID_PREFIX+"msg."; //$NON-NLS-1$
- public static final String MSG_TITLE = MSG_PREFIX + "Title"; //$NON-NLS-1$
-
- // Messages
- public static final String MSG_CONNECTION_PREFIX = MSG_PREFIX + "Connection."; //$NON-NLS-1$
- public static final String MSG_CONNECTION_FAILED = MSG_CONNECTION_PREFIX + "Failed"; //$NON-NLS-1$
- public static final String MSG_CONNECTION_UNKNOWN_HOST = MSG_CONNECTION_PREFIX + "UnknownHost"; //$NON-NLS-1$
- public static final String MSG_CONNECTION_VERIFY = MSG_CONNECTION_PREFIX + "Verify"; //$NON-NLS-1$
- public static final String MSG_CONNECTION_COMMPROPERTIES = MSG_CONNECTION_PREFIX + "CommProperties"; //$NON-NLS-1$
-
- // RSE Server Connection Messages
- public static final String MSG_SIGNON_PREFIX = MSG_PREFIX + "Signon."; //$NON-NLS-1$
- public static final String MSG_SIGNON_PASSWORD_ERROR = MSG_SIGNON_PREFIX + "PasswordError"; //$NON-NLS-1$
- public static final String MSG_SIGNON_PASSWORD_INCORRECT = MSG_SIGNON_PREFIX + "PasswordIncorrect"; //$NON-NLS-1$
- public static final String MSG_SIGNON_PASSWORD_INCORRECT_USER_DISABLED= MSG_SIGNON_PREFIX + "PasswordIncorrectUserDisabled"; //$NON-NLS-1$
- public static final String MSG_SIGNON_PASSWORD_EXPIRED = MSG_SIGNON_PREFIX + "PasswordExpired"; //$NON-NLS-1$
- public static final String MSG_SIGNON_USERID_INVALID = MSG_SIGNON_PREFIX + "UserIDInvalid"; //$NON-NLS-1$
- public static final String MSG_SIGNON_USERID_DISABLED = MSG_SIGNON_PREFIX + "UserIDDisabled"; //$NON-NLS-1$
- public static final String MSG_SIGNON_USERID_ERROR = MSG_SIGNON_PREFIX + "UserIDError"; //$NON-NLS-1$
-
- public static final String MSG_DATASTORE_PREFIX = MSG_PREFIX + "DataStore."; //$NON-NLS-1$
- public static final String MSG_DATASTORE_STARTSERVER = MSG_DATASTORE_PREFIX + "StartServer"; //$NON-NLS-1$
- public static final String MSG_DATASTORE_CONNECTSERVER = MSG_DATASTORE_PREFIX + "ConnectServer"; //$NON-NLS-1$
- public static final String MSG_DATASTORE_INITIALIZESERVER = MSG_DATASTORE_PREFIX + "InitializeServer"; //$NON-NLS-1$
- public static final String MSG_DATASTORE_INITIALIZECODESERVER = MSG_DATASTORE_PREFIX + "InitializeCODEServer"; //$NON-NLS-1$
-
- public static final String MSG_CMD_PREFIX = MSG_PREFIX + "Command."; //$NON-NLS-1$
- public static final String MSG_CMDNAME_EMPTY = MSG_CMD_PREFIX + "Required"; //$NON-NLS-1$
- public static final String MSG_CMDNAME_NOTVALID = MSG_CMD_PREFIX + "NotValid"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreSubSystem.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreSubSystem.java
deleted file mode 100644
index f291564a1..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreSubSystem.java
+++ /dev/null
@@ -1,26 +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.connectorservice.dstore;
-/**
- * Simply a tag to indicate this factory is one our universal subsystems.
- */
-public interface IUniversalDStoreSubSystem
-{
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalSubSystemConfiguration.java
deleted file mode 100644
index 95e52a035..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalSubSystemConfiguration.java
+++ /dev/null
@@ -1,26 +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.connectorservice.dstore;
-/**
- * Simply a tag to indicate this factory is one our universal subsystem factories.
- */
-public interface IUniversalSubSystemConfiguration
-{
-
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 73faa55c4..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/RexecDstoreServer.java
+++ /dev/null
@@ -1,1201 +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.connectorservice.dstore;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.net.Socket;
-
-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.model.SystemSignonInformation;
-import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
-import org.eclipse.rse.core.subsystems.IServerLauncher;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-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
- * protocol
- */
-public class RexecDstoreServer implements IServerLauncher
-{
- private SystemMessage _errorMessage;
- private SystemSignonInformation signonInfo;
- //private String host = null;
- private String cwd = null;
- private String invocation = null;
- //private String userID = null;
- private int rexecPort = 512; // the port where rexecd normally listens
- private String cmd = null;
- //private String pwd = null;
- private static String ASCII_TEST_STRING = "ASCII"; //$NON-NLS-1$
- private static String PORT_LEADING_STRING = "Server Started Successfully"; //$NON-NLS-1$
- private static final String EZYRD11E="EZYRD11E"; //$NON-NLS-1$
- private ClientConnection clientConnection;
- private IServerLauncherProperties propertyInfo;
- private boolean isModeChecked = false;
- private boolean checkPort =true;
- private boolean logInfo = false;
- private int _socketTimeoutValue = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_TIMEOUT;
-
- private static char[] ebcdictounicode =
- {
- 0x0000,
- 0x0001,
- 0x0002,
- 0x0003,
- 0x0000,
- 0x0009,
- 0x0000,
- 0x007F,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x000B,
- 0x000C,
- 0x000D,
- 0x000E,
- 0x000F,
- 0x0010,
- 0x0011,
- 0x0012,
- 0x0013,
- 0x0000,
- 0x000A,
- 0x0008,
- 0x0000,
- 0x0018,
- 0x0019,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x001C,
- 0x0000,
- 0x0000,
- 0x000A,
- 0x0017,
- 0x001B,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0005,
- 0x0006,
- 0x0007,
- 0x0000,
- 0x0000,
- 0x0016,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0004,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0014,
- 0x0015,
- 0x0000,
- 0x001A,
- 0x0020,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x002E,
- 0x003C,
- 0x0028,
- 0x002B,
- 0x007C,
- 0x0026,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0021,
- 0x0024,
- 0x002A,
- 0x0029,
- 0x003B,
- 0x0000,
- 0x002D,
- 0x002F,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x007C,
- 0x002C,
- 0x0025,
- 0x005F,
- 0x003E,
- 0x003F,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0060,
- 0x003A,
- 0x0023,
- 0x0040,
- 0x0027,
- 0x003D,
- 0x0022,
- 0x0000,
- 0x0061,
- 0x0062,
- 0x0063,
- 0x0064,
- 0x0065,
- 0x0066,
- 0x0067,
- 0x0068,
- 0x0069,
- 0x0000,
- 0x007B,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x002B,
- 0x0000,
- 0x006A,
- 0x006B,
- 0x006C,
- 0x006D,
- 0x006E,
- 0x006F,
- 0x0070,
- 0x0071,
- 0x0072,
- 0x0000,
- 0x007D,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0073,
- 0x0074,
- 0x0075,
- 0x0076,
- 0x0077,
- 0x0078,
- 0x0079,
- 0x007A,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x005B,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x005D,
- 0x0000,
- 0x002D,
- 0x007D,
- 0x0041,
- 0x0042,
- 0x0043,
- 0x0044,
- 0x0045,
- 0x0046,
- 0x0047,
- 0x0048,
- 0x0049,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x007D,
- 0x004A,
- 0x004B,
- 0x004C,
- 0x004D,
- 0x004E,
- 0x004F,
- 0x0050,
- 0x0051,
- 0x0052,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x005C,
- 0x0000,
- 0x0053,
- 0x0054,
- 0x0055,
- 0x0056,
- 0x0057,
- 0x0058,
- 0x0059,
- 0x005A,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0030,
- 0x0031,
- 0x0032,
- 0x0033,
- 0x0034,
- 0x0035,
- 0x0036,
- 0x0037,
- 0x0038,
- 0x0039,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000,
- 0x0000 };
-
- /**
- * Constructor
- */
- public RexecDstoreServer()
- {
- super();
- }
-
- /**
- * Set the datastore client connection. This is reset for each connect()
- */
- public void setClientConnection(ClientConnection clientConnection)
- {
- this.clientConnection = clientConnection;
- }
-
- /**
- * Set the remote system signon information
- */
- public void setSignonInformation(SystemSignonInformation info)
- {
- this.signonInfo = info;
- }
-
- /**
- * Get the remote system signon information, as set in
- * {@link #setSignonInformation(SystemSignonInformation)}
- */
- public SystemSignonInformation getSignonInformation()
- {
- return signonInfo;
- }
-
- /**
- * Set the object which contains the user-specified properties that
- * are used by this launcher
- */
- public void setServerLauncherProperties(IServerLauncherProperties propertyInfo)
- {
- this.propertyInfo = propertyInfo;
- // set path...
- this.cwd = ((IRemoteServerLauncher)propertyInfo).getServerPath();
- char separatorChar = signonInfo.getSystemType().equals("Windows") ? '\\' : '/'; //$NON-NLS-1$
- if (cwd.length() > 0 && cwd.charAt(cwd.length() - 1) != separatorChar)
- cwd += separatorChar;
- // set script...
- this.invocation = ((IRemoteServerLauncher)propertyInfo).getServerScript();
- }
-
- /**
- * Get the object which contians the user-specified properties that are
- * used by this launcher. As set in {@link #setServerLauncherProperties(IServerLauncherProperties)}.
- */
- public IServerLauncherProperties getServerLauncherProperties()
- {
- return propertyInfo;
- }
-
- /**
- * Determine if the remote server needs to be launched or not.
- * Generally is always false.
- */
- public boolean isLaunched()
- {
- return false;
- }
-
- /**
- * Send a command to the host via rexec to launch the datastore server
- * under the specified user ID/pwd. the datastore server will emit
- * messages that include the port number on which the server is listening
- * for client connections
- *
- * @return port number as String
- */
- /*
- * There used to be a problem in Communications Server for z/OS and
- * the message from the REXEC daemon was in EBCDIC. see APAR PQ76782.
- * Since this problem was fixed in Communication Server, there is no need to convert EBCDIC to ASCII
- */
- // updated method
- public Object launch(IProgressMonitor monitor) throws Exception
- {
-
- boolean isEBCDICTest=false;
- isModeChecked= false;
- checkPort=true;
- _errorMessage = null;
- String port = new String("0"); // default no port //$NON-NLS-1$
- //String hostResponse = ""; //buffer to hold all the messages, so that it can be printed out later
- String originalHostResponse=""; //$NON-NLS-1$
- String convertedHostResponse=""; //$NON-NLS-1$
- String debugOptions = System.getProperty("REXEC_DEBUG"); //$NON-NLS-1$
- if (debugOptions!= null){
- if (debugOptions.toUpperCase().indexOf("LOG") > -1) //$NON-NLS-1$
- logInfo = true;
- if (debugOptions.toUpperCase().indexOf("EBCDIC") > -1) //$NON-NLS-1$
- isEBCDICTest=true;
- }
- boolean isEBCDIC = false;
- try
- {
-
- // establish socket for rexec connection
- Socket rexecCall = new Socket(signonInfo.getHostname(), rexecPort); // rexec listens here - 512
-
- // set socket timeout value
- rexecCall.setSoTimeout(_socketTimeoutValue);
-
- // set up data streams on rexec socket
- DataOutputStream rxOut = new DataOutputStream(rexecCall.getOutputStream());
- DataInputStream rxIn = new DataInputStream(rexecCall.getInputStream());
-
- // we're not opening a socket for stderr to circumvent problems that
- // may arise if the client is behind a firewall with respect to the
- // host, in which case the rexec daemon may have trouble connecting
- // to the client error port.
- // Not sending a port number at this point indicates to the daemon
- // that there is no error socket to establish.
- rxOut.writeByte(0); // send null terminator
- rxOut.flush();
-
- // send userid and password on rexec socket
- rxOut.writeBytes(signonInfo.getUserid());
- rxOut.writeByte(0); // send null terminator
- rxOut.writeBytes(signonInfo.getPassword());
- rxOut.writeByte(0); // send null terminator
- rxOut.flush();
-
- // send the command on rexec socket to start datastore daemon listening
- // on any port
- // TODO - assumes a particular script and location to start the server,
- // 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); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- //cmd = new String("echo " + ASCII_TEST_STRING + ";cd " + this.cwd + ";" + this.invocation + " " + System.getProperty("user.name"));
- logMessage("The command is " + cmd); //$NON-NLS-1$
- SystemBasePlugin.logInfo("RexecDstoreServer :"); //$NON-NLS-1$
-
- rxOut.writeBytes(cmd);
- rxOut.writeByte(0); // send null terminator
- rxOut.flush();
-
- int inBytes = rxIn.available(); // any data available?
-
- int timeout = 600; // 60 second to connect
-
- while (inBytes == 0 && timeout > 0)
- {
- if (monitor.isCanceled()) // Cancel button pressed?
- return "0"; //$NON-NLS-1$
-
- // try for more input
- Thread.sleep(100);
- inBytes = rxIn.available();
- timeout--;
- }
-
- if (timeout == 0) {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN);
- msg.makeSubstitution(signonInfo.getHostname(), ""); //$NON-NLS-1$
- _errorMessage = msg;
- return port;
- }
-
- // get command output on socket, one byte at a time until
- // got the datastore port number or EOF is reached for this input
- String maybePort=null;
- while (true ){
- if (monitor.isCanceled())
- return "0"; //$NON-NLS-1$
- byte aByte = rxIn.readByte();
- if (isEBCDICTest)
- aByte = convertFromASCIIToEBCDIC(aByte); // for EBCDIC Test
- if (aByte == 0) // drop the null
- continue;
- originalHostResponse += (char)aByte;
- logMessage("Host response is " + originalHostResponse); //$NON-NLS-1$
- if (!isModeChecked)
- {
- convertedHostResponse += convertFromEBCDICToASCII(aByte);
- logMessage("Host response is converted to " + convertedHostResponse); //$NON-NLS-1$
- if (originalHostResponse.indexOf(ASCII_TEST_STRING) > -1)
- { // It's ASCII mode
- isModeChecked = true;
- logMessage("This is the ASCII mode. "); //$NON-NLS-1$
- }
- else if (convertedHostResponse.indexOf(ASCII_TEST_STRING) > -1)
- { // It's EBCDIC mode
- logMessage("This is the EBCDIC mode. "); //$NON-NLS-1$
- isModeChecked = true;
- isEBCDIC = true;
- }
- }
- else
- {
- if (isEBCDIC)
- {
- convertedHostResponse += convertFromEBCDICToASCII(aByte);
- logMessage("Host response is converted to " + convertedHostResponse); //$NON-NLS-1$
- if(checkPort)
- { // It's EBCDIC mode
- maybePort = extractPortNumber (convertedHostResponse);
- }
- }
- else if (checkPort)
- { // it's ASCII
- maybePort = extractPortNumber (originalHostResponse);
- }
- if (maybePort == null)
- continue ;
- port = maybePort;
- break;
- }
- }
- // -----------------------------------------------------------------
- // Close input/output streams and socket
- // -----------------------------------------------------------------
- rxIn.close();
- rxOut.close();
- rexecCall.close();
- logMessage("Going to return port " + port); //$NON-NLS-1$
- return port;
- }
- catch (EOFException e)
- {
- // do nothing
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- // if no port is found, create error message
- String hostMessage = originalHostResponse;
- if (isEBCDIC) // pick up the right messages
- hostMessage = convertedHostResponse;
- int index = hostMessage.indexOf(ASCII_TEST_STRING);
- 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 = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN);
- msg.makeSubstitution(signonInfo.getHostname(), hostMessage);
- _errorMessage = msg;
- } else {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED);
- msg.makeSubstitution(""+rexecPort, signonInfo.getHostname(), hostMessage); //$NON-NLS-1$
- _errorMessage = msg;
-
- }
-
- return port;
- }
- /**
- * @param newLine
- * @return
- */
- /*
- private String checkCodePage(String newLine) {
- // check in which mode the host is sending the message back
- if (isModeChecked)
- return newLine;
- if (newLine.indexOf(ASCII_TEST_STRING) > -1){ // It's ASCII mode
- isASCIIMode = true;
- isModeChecked = true;
- } else { // Check whether it's EBCDIC mode
- String convertedNewLine = convertFromEBCDICToASCII(newLine.toCharArray());
- if (convertedNewLine.indexOf(ASCII_TEST_STRING) > -1){
- isASCIIMode = false;
- isModeChecked = true;
- }
- }
- return newLine;
- }
- */
- /* wait until host responds with some data - at least should send null byte */
-/* char cChar;
- int inBytes = rxIn.available(); // any data available?
- StringBuffer buf = new StringBuffer();
- String chunk = null;
-
- while (inBytes == 0)
- {
- if (monitor.isCanceled())
- return "0";
-
- // try for more input
- Thread.sleep(100);
-
- inBytes = rxIn.available();
- }
-
- // get command output on socket, one byte at a time until
- // got the datastore port number or EOF is reached for this input
- byte[] bDSPort = new byte[4];
- byte[] byteBuf = new byte[8];
- int index;
- if (inBytes > 0)
- {
- byte aByte = rxIn.readByte();
- cChar = (char)aByte; // discard first null byte
-
-// port = getPortASCII(rxIn);
- // should have at least 8 bytes plus newline from the "echo USSTEST" command. This is
- // used to test if the data being returned is ASCII or EBCDIC
- for (index = 0; index < ASCII_TEST_STRING.length(); index++)
- { // include newline too
- aByte = rxIn.readByte();
- cChar = (char)aByte;
- buf.append(cChar);
- byteBuf[index] = aByte;
- }
- chunk = new String(buf);
-
- if (chunk.indexOf(ASCII_TEST_STRING) >= 0)
- {
- // returned data is ASCII
- port = getPortASCII(rxIn);
- }
- else
- {
-
- chunk = convertFromEBCDICToASCII(byteBuf);
- if (chunk.indexOf(ASCII_TEST_STRING) >= 0)
- {
-
- // returned data is EBCDIC
- port = getPortEBCDIC(rxIn);
- }
- else
- {
- // rexec error!
- // there's an error
- while (cChar != '\n')
- {
- cChar = (char) rxIn.readByte();
- buf.append(cChar);
- }
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN);
- msg.makeSubstitution(signonInfo.getHostname(), buf.toString());
- _errorMessage = msg;
- }
- }
- }
- rxIn.close();
- rxOut.close();
- rexecCall.close();
-
- }
- catch (Exception e)
- {
- System.out.println(e);
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED);
- msg.makeSubstitution(""+rexecPort, signonInfo.getHostname(), e.getMessage());
- _errorMessage = msg;
- }
-
- return port;
- } // end of launch method
- */
- /* original method
- public Object launch(IProgressMonitor monitor) throws Exception
- {
- _errorMessage = null;
- String port = new String("0"); // default no port
- try
- {
-
- // establish socket for rexec connection
- Socket rexecCall = new Socket(signonInfo.getHostname(), rexecPort); // rexec listens here - 512
-
- // set up data streams on rexec socket
- DataOutputStream rxOut = new DataOutputStream(rexecCall.getOutputStream());
- DataInputStream rxIn = new DataInputStream(rexecCall.getInputStream());
-
- // we're not opening a socket for stderr to circumvent problems that
- // may arise if the client is behind a firewall with respect to the
- // host, in which case the rexec daemon may have trouble connecting
- // to the client error port.
- // Not sending a port number at this point indicates to the daemon
- // that there is no error socket to establish.
- rxOut.writeByte((int) 0); // send null terminator
- rxOut.flush();
-
- // send userid and password on rexec socket
- rxOut.writeBytes(signonInfo.getUserid());
- rxOut.writeByte((int) 0); // send null terminator
- rxOut.writeBytes(signonInfo.getPassword());
- rxOut.writeByte((int) 0); // send null terminator
- rxOut.flush();
-
- // send the command on rexec socket to start datastore daemon listening
- // on any port
- // TODO - assumes a particular script and location to start the server,
- // 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);
-
- rxOut.writeBytes(cmd);
- rxOut.writeByte((int) 0); // send null terminator
- rxOut.flush();
-
- // wait until host responds with some data - at least should send null byte
-
- char cChar;
- int inBytes = rxIn.available(); // any data available?
- StringBuffer buf = new StringBuffer();
- String chunk = null;
-
- while (inBytes == 0)
- {
- if (monitor.isCanceled())
- return "0";
-
- // try for more input
- Thread.sleep(100);
-
- inBytes = rxIn.available();
- }
-
- // get command output on socket, one byte at a time until
- // got the datastore port number or EOF is reached for this input
- byte[] bDSPort = new byte[4];
- byte[] byteBuf = new byte[8];
- int index;
- if (inBytes > 0)
- {
- byte aByte = rxIn.readByte();
- cChar = (char)aByte; // discard first null byte
-
- // should have at least 8 bytes plus newline from the "echo USSTEST" command. This is
- // used to test if the data being returned is ASCII or EBCDIC
- for (index = 0; index < ASCII_TEST_STRING.length(); index++)
- { // include newline too
- aByte = rxIn.readByte();
- cChar = (char)aByte;
- buf.append(cChar);
- byteBuf[index] = aByte;
- }
- chunk = new String(buf);
-
- if (chunk.indexOf(ASCII_TEST_STRING) >= 0)
- {
- // returned data is ASCII
- port = getPortASCII(rxIn);
- }
- else
- {
-
- chunk = convertFromEBCDICToASCII(byteBuf);
- if (chunk.indexOf(ASCII_TEST_STRING) >= 0)
- {
-
- // returned data is EBCDIC
- port = getPortEBCDIC(rxIn);
- }
- else
- {
- // rexec error!
- // there's an error
- while (cChar != '\n')
- {
- cChar = (char) rxIn.readByte();
- buf.append(cChar);
- }
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN);
- msg.makeSubstitution(signonInfo.getHostname(), buf.toString());
- _errorMessage = msg;
- }
- }
-
- }
- rxIn.close();
- rxOut.close();
- rexecCall.close();
-
- }
- catch (Exception e)
- {
- System.out.println(e);
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED);
- msg.makeSubstitution(""+rexecPort, signonInfo.getHostname(), e.getMessage());
- _errorMessage = msg;
- }
-
- return port;
- } // end of launch method
-*/
- /**
- * Determine if we are connected to the remote server or not.
- * @return true if we are connected, false otherwise.
- */
- public boolean isConnected()
- {
- if (clientConnection != null)
- {
- return clientConnection.isConnected();
- }
- return false;
- }
-
- /**
- * Connect to the remote server.
- * @see #getErrorMessage()
- * @param monitor a monitor for showing progress
- * @param connectPort the port to use for launching the server
- * @return Anything you want.
- */
- public Object connect(IProgressMonitor monitor, int connectPort) throws Exception
- {
- clientConnection.setPort(Integer.toString(connectPort));
-
- if (monitor != null)
- {
- SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER);
- cmsg.makeSubstitution(clientConnection.getPort());
- monitor.subTask(cmsg.getLevelOneText());
- }
-
- // connect to launched server
- ConnectionStatus connectStatus = clientConnection.connect(null);
-
- return connectStatus;
- }
-
- /**
- * Disconnect from the remote server
- * @see #getErrorMessage()
- */
- public void disconnect() throws Exception
- {
- if (clientConnection != null)
- {
- /* TODO!
- // Is disconnect being called because the network (connection) went down?
- if (_connectionStatusListener != null && _connectionStatusListener.isConnectionDown())
- {
- fireCommunicationsEvent(CommunicationsEvent.CONNECTION_ERROR);
- }
- else
- {
- // Fire comm event to signal state about to change
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_DISCONNECT);
- }
-
- DataStore dataStore = getDataStore();
- if (dataStore != null && _connectionStatusListener != null)
- {
- dataStore.getDomainNotifier().removeDomainListener(_connectionStatusListener);
- }
-
- clientConnection.disconnect();
- clientConnection = null;
- getUserId(); // Clear any cached local user IDs
- sysInfo = null;
-
- // Fire comm event to signal state changed
- fireCommunicationsEvent(CommunicationsEvent.AFTER_DISCONNECT);
- */
- clientConnection.disconnect();
- clientConnection = null;
- }
- }
-
- /**
- * Return the last error message issued
- */
- public SystemMessage getErrorMessage()
- {
- return _errorMessage;
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-/*
- // sam private String convertFromEBCDICToASCII(byte[] eBytes)
- private String convertFromEBCDICToASCII(char[] eBytes)
- {
-
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < eBytes.length; i++)
- {
- byte bByte = (byte)eBytes[i];
- int index = bByte;
- if (index < 0)
- {
- index = 256 + index;
- }
- char cChar = ebcdictounicode[index];
- buf.append(cChar);
- }
- return buf.toString();
- }
-*/
- /**
- * Read the data returned on the rexec port as ASCII characters and
- * detect the port number in the datastore server messages
- * @param rxIn
- * @return String port number
- */
- /*
- private String getPortASCII(DataInputStream rxIn)
- {
- String port = new String("0"); // default to no port
- char cChar;
- byte bByte;
- int numPortChars = 5;
- byte[] bDSPort = new byte[numPortChars];
- StringBuffer buf = new StringBuffer();
- StringBuffer diagnosticString = new StringBuffer();
- String chunk = null;
- boolean serverStartedMsg = false;
- while (true)
- {
- try
- {
- cChar = (char) rxIn.readByte();
- if (cChar == '\n')
- { // hit a newline
- chunk = new String(buf);
-
- // DKM: need to handle mixed order cases
-
- if (chunk.indexOf("Server Started Successfully") >= 0)
- {
- serverStartedMsg = true;
- // this server output precedes the datastore server port number
- buf.delete(0, buf.length()); // clear buffer
-
- // might have already got port
- // check first
- if (port.equals("0"))
- {
- rxIn.read(bDSPort, 0, numPortChars); // get next 4 bytes - datastore port #
- for (int i = 0; i < numPortChars; i++)
- {
- char c = (char) bDSPort[i];
- if (Character.isDigit(c))
- buf.append(c);
- }
- port = new String(buf); // got port where datastore server is listening
-
- // check for valid port
- try
- {
- int possiblePort = Integer.parseInt(port);
- break;
-
- }
- catch (Exception e)
- {
- // not valid
- }
- }
-
- }
- else
- {
- // might be the port
- try
- {
- int possiblePort = Integer.parseInt(chunk);
- port = chunk;
- if (serverStartedMsg)
- break;
- }
- catch (Exception e)
- {
- }
- }
-
- buf.delete(0, buf.length()); // clear buffer
- }
- else
- {
- diagnosticString.append(cChar);
- buf.append(cChar);
- }
- }
- // EOF indicates no more lines to come through on error socket
- catch (EOFException e)
- {
- break;
- }
- catch (IOException e)
- {
- break;
- }
- } // end of while true
-
- // if port is somethign wierd...log this
- if (port.equals("0"))
- {
- // port is weird!
-
- try
- {
-
- int available = rxIn.available();
- while (available > 0)
- {
- rxIn.read(bDSPort, 0, numPortChars);
- for (int i = 0; i < numPortChars; i++)
- {
- char c = (char) bDSPort[i];
- diagnosticString.append(c);
- }
- available = rxIn.available();
- }
-
- }
- catch (Exception ex)
- {
- }
-
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_SERVER_NOTSTARTED);
- diagnosticString.insert(0, "\n\n");
- msg.makeSubstitution(signonInfo.getHostname(), diagnosticString.toString());
-
- _errorMessage = msg;
- }
-
- return port;
- }
-*/
- /**
- * Read the data returned on the rexec port as EBCDIC characters and
- * convert to unicode. Detect the port number in the datastore server messages
- * @param rxIn
- * @return String port number
- */
- /*
- private String getPortEBCDIC(DataInputStream rxIn)
- {
- String port = new String("0"); // default to no port
- int index;
- char cChar;
- byte bByte;
- byte[] bDSPort = new byte[4];
- StringBuffer buf = new StringBuffer();
- String chunk = null;
- while (true)
- {
- try
- {
- bByte = rxIn.readByte();
- index = bByte;
- if (index < 0)
- {
- index = 256 + index;
- }
- cChar = ebcdictounicode[index];
- if (cChar == '\n')
- { // hit a newline
- chunk = new String(buf);
-
- if (chunk.indexOf("Server Started Successfully") >= 0)
- {
- // this server output precedes the datastore server port number
- buf.delete(0, buf.length()); // clear buffer
- rxIn.read(bDSPort, 0, 4); // get next 4 bytes - datastore port #
- for (int i = 0; i < 4; i++)
- {
- index = bDSPort[i];
- if (index < 0)
- {
- index = 256 + index;
- }
- buf.append(ebcdictounicode[index]);
- }
- port = new String(buf); // got port where datastore server is listening
- break;
- }
- buf.delete(0, buf.length()); // clear buffer
- }
- else
- {
- buf.append(cChar);
- }
- }
- // EOF indicates no more lines to come through on error socket
- catch (EOFException e)
- {
- break;
- }
- catch (IOException e)
- {
- break;
- }
- } // end of while true
- return port;
- }
- */
- private String extractPortNumber (String hostResponse) {
- String port ="0"; //$NON-NLS-1$
- logMessage("Going to find port number. "); //$NON-NLS-1$
- int index = hostResponse.indexOf(PORT_LEADING_STRING);
- if ( index < 0 )
- return null;
- logMessage("Found the leading string. "); //$NON-NLS-1$
- String portString = hostResponse.substring(index + PORT_LEADING_STRING.length());
- logMessage("Removed the leading string as " + portString); //$NON-NLS-1$
- if (portString != null && portString.startsWith("\n")) //$NON-NLS-1$
- portString = portString.substring(1);
- if (portString == null)
- return null;
-
- //if (portString.length() < 4)
- // return null;
-
- // change to support 5 digit ports
- StringBuffer portBuffer = new StringBuffer();
-
- for (int i = 0; i < portString.length(); i++)
- {
- char c = portString.charAt(i);
- if (Character.isDigit(c))
- {
- portBuffer.append(c);
- }
- }
-
- if (portString.length() != portBuffer.length())
- {
- port = portBuffer.toString();
- // old code - didn't support 5 digits
- //port = portString.substring(0,4);
-
- logMessage("Got the port " + port); //$NON-NLS-1$
- try
- {
- Integer.parseInt(port);
- logMessage("Going to return port " + port); //$NON-NLS-1$
- return port;
- }
- catch (RuntimeException e)
- {
- e.printStackTrace();
- logMessage("Got the wrong port " + port); //$NON-NLS-1$
- checkPort=false;
- return null;
- }
- }
- else
- {
- return null;
- }
- }
- private char convertFromEBCDICToASCII(byte eByte)
- {
- int index = eByte;
- if (index < 0)
- {
- index = 256 + index;
- }
- return ebcdictounicode[index];
- }
- private byte convertFromASCIIToEBCDIC(byte eByte)
- {
- int index = eByte;
- for (int i = 0; i <ebcdictounicode.length; i++) {
- if (index == ebcdictounicode[i]){
- if (i > 128)
- return (byte )(i - 256);
- return (byte)i;
- }
-
- }
- return (byte)0;
- }
- private void logMessage (String message) {
- if (logInfo)
- SystemBasePlugin.logError("RexecDstoreServer :" + message); //$NON-NLS-1$
- }
-
- public void setSocketTimeoutValue(int value)
- {
- _socketTimeoutValue = value;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index bb1421360..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ConnectionStatusListener.java
+++ /dev/null
@@ -1,272 +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.connectorservice.dstore.util;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-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.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-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;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-public class ConnectionStatusListener implements IDomainListener, IRunnableWithProgress
-{
-
-
- protected DataElement _dataStoreStatus;
- protected IConnectorService _connection;
- protected boolean _connectionDown = false;
-
- /**
- * @param status The status element for the DataStore handling this connection.
- */
- public ConnectionStatusListener(DataElement status, IConnectorService connection)
- {
- _dataStoreStatus = status;
- _connection = connection;
- }
-
- protected Shell internalGetShell()
- {
- Shell activeShell = SystemBasePlugin.getActiveWorkbenchShell();
- if (activeShell != null)
- {
- return activeShell;
- }
-
- IWorkbenchWindow window = null;
- try
- {
- window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- }
- catch (Exception e)
- {
- return null;
- }
- if (window == null)
- {
-
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- if (windows != null && windows.length > 0)
- {
- return windows[0].getShell();
- }
-
- }
- else
- {
- return window.getShell();
- }
-
- return null;
- }
-
- /**
- * The handleConnectionDown method is invoked if the network connection between the
- * client and server goes down while connected. Currently this method displays
- * an error to the user and the subsytem is disconnected.
- */
- protected void handleConnectionDown()
- {
- Display.getDefault().asyncExec(new ConnectionDown(this));
- }
-
- class ConnectionDown implements Runnable
- {
- private ConnectionStatusListener _listener;
- public ConnectionDown(ConnectionStatusListener listener)
- {
- _listener = listener;
- }
-
- public void run()
- {
- Shell shell = getShell();
- _connectionDown = true;
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST);
- msg.makeSubstitution(_connection.getPrimarySubSystem().getHost().getAliasName());
- SystemMessageDialog dialog = new SystemMessageDialog(internalGetShell(), msg);
- dialog.open();
- try
- {
- IRunnableContext runnableContext = getRunnableContext(getShell());
- runnableContext.run(false,true,_listener); // inthread, cancellable, IRunnableWithProgress
- _connection.reset();
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.connectedStatusChange(_connection.getPrimarySubSystem(), false, true, true);
- }
- catch (InterruptedException exc) // user cancelled
- {
- if (shell != null)
- showDisconnectCancelledMessage(shell, _connection.getHostName(), _connection.getPort());
- }
- catch (java.lang.reflect.InvocationTargetException invokeExc) // unexpected error
- {
- Exception exc = (Exception)invokeExc.getTargetException();
- if (shell != null)
- showDisconnectErrorMessage(shell, _connection.getHostName(), _connection.getPort(), exc);
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("ConnectionStatusListener: Error disconnecting", e); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * @see IDomainListener#listeningTo(DomainEvent)
- */
- public boolean listeningTo(DomainEvent event)
- {
- if (_dataStoreStatus == event.getParent())
- {
- return true;
- }
- return false;
- }
-
- /**
- * @see IDomainListener#domainChanged(DomainEvent)
- */
- public void domainChanged(DomainEvent event)
- {
- if (!_dataStoreStatus.getName().equals("okay")) //$NON-NLS-1$
- {
- handleConnectionDown();
- }
- }
-
- /**
- * @see IDomainListener#getShell()
- */
- public Shell getShell()
- {
- return internalGetShell();
- }
-
- /**
- * Callback method for the IConnectorService to determine if the connection is down. This is
- * called by the disconnect method to determine if we can do saves or not.
- */
- public boolean isConnectionDown()
- {
- return _connectionDown;
- }
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
- {
- String message = null;
- message = SubSystemConfiguration.getDisconnectingMessage(_connection.getHostName(), _connection.getPort());
- monitor.beginTask(message, IProgressMonitor.UNKNOWN);
- try
- {
- _connection.disconnect(monitor);
- }
- catch(Exception exc)
- {
- if (exc instanceof java.lang.reflect.InvocationTargetException)
- throw (java.lang.reflect.InvocationTargetException)exc;
- if (exc instanceof java.lang.InterruptedException)
- throw (java.lang.InterruptedException)exc;
- throw new java.lang.reflect.InvocationTargetException(exc);
- }
- finally
- {
- monitor.done();
- }
- }
- /**
- * Get the progress monitor dialog for this operation. We try to
- * use one for all phases of a single operation, such as connecting
- * and resolving.
- */
- protected IRunnableContext getRunnableContext(Shell rshell)
- {
- Shell shell = getShell();
- // for other cases, use statusbar
- IWorkbenchWindow win = SystemBasePlugin.getActiveWorkbenchWindow();
- if (win != null)
- {
- Shell winShell = RSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
- if (winShell != null && !winShell.isDisposed() && winShell.isVisible())
- {
- SystemBasePlugin.logInfo("Using active workbench window as runnable context"); //$NON-NLS-1$
- shell = winShell;
- return win;
- }
- else
- {
- win = null;
- }
- }
-
- if (shell == null || shell.isDisposed() || !shell.isVisible())
- {
- SystemBasePlugin.logInfo("Using progress monitor dialog with given shell as parent"); //$NON-NLS-1$
- shell = rshell;
- }
-
-
- IRunnableContext dlg = new ProgressMonitorDialog(rshell);
- return dlg;
- }
-
- /**
- * Show an error message when the disconnection fails.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc)
- {
- //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR,shell,RSEUIPlugin.getResourceBundle(),
- // ISystemMessages.MSG_DISCONNECT_FAILED,
- // hostName, exc.getMessage());
- //RSEUIPlugin.logError("Disconnect failed",exc); // temporary
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_FAILED).makeSubstitution(hostName,exc));
- msgDlg.setException(exc);
- msgDlg.open();
- }
- /**
- * Show an error message when the user cancels the disconnection.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port)
- {
- //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, RSEUIPlugin.getResourceBundle(),
- // ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
- 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/ICommunicationsDiagnostic.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ICommunicationsDiagnostic.java
deleted file mode 100644
index 8c1854bf6..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ICommunicationsDiagnostic.java
+++ /dev/null
@@ -1,80 +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.connectorservice.dstore.util;
-
-import org.eclipse.rse.core.subsystems.IConnectorService;
-
-/**
- * An interface for ICommunicationsDiagnostic class
- */
-public interface ICommunicationsDiagnostic extends Runnable {
-
-
-
- public static final int CANCEL_WAIT_REQUESTED = 1;
-
-
- /**
- * Setup for the diagnostic
- *
- * @param id assign an ID for this diagnostic instance
- * @param quiet true if user to be prompted for a dialog
- * @param server the host network name
- * @param system the connection to be investigated
- * @param str1 optional string
- * @param str2 optional string
- * @param str3 optional string
- */
- public void setUp(String id, boolean quiet, String server, IConnectorService system, String str1, String str2, String str3);
-
- /**
- * Log an error in the .log file
- *
- * @param text message text to be logged
- */
- public void logError(String text);
-
- /**
- * Check if network is down
- *
- * @return true or false
- */
- public boolean isNetworkDown();
-
- /**
- * Check if host server is still active
- *
- * @return true or false
- */
- public boolean isServerActive();
-
- /**
- * Dispaly a message dialog
- *
- * @param id message to be displayed.
- */
- public void displayMessage(String id);
-
- /**
- * diagnosticStatus
- *
- * @return status
- */
- public int diagnosticStatus();
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ICommunicationsDiagnosticFactory.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ICommunicationsDiagnosticFactory.java
deleted file mode 100644
index 3bc4c334c..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ICommunicationsDiagnosticFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.connectorservice.dstore.util;
-
-/**
- * Factory for creating ICommunicationsDiagnostic instances.
- */
-public interface ICommunicationsDiagnosticFactory
-{
-
- /**
- * Factory method for creating instances
- */
- public ICommunicationsDiagnostic createInstance();
-} \ 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
deleted file mode 100644
index 61cb59f39..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitor.java
+++ /dev/null
@@ -1,456 +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.connectorservice.dstore.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-
-/*
- * This utility class can be used to monitor the status of one more more status DataElements.
- * Only one instanceof of this class is required per DataStore for use in monitoring statuses.
- * This is intended to be used in place of StatusChangeListeners
- *
- * * <p>
- * The following is one example of the use of the StatusMonitor. The code:
- * <blockquote><pre>
- * DataElement status = dataStore.command(dsCmd, args, deObj);
- *
- * StatusMonitor smon = StatusMonitorFactory.getInstance().getStatusMonitorFor(getSystem(), ds);
- * smon.waitForUpdate(status, monitor);
- * </pre></blockquote>
- */
-public class StatusMonitor implements IDomainListener, ICommunicationsListener
-{
-
- protected Shell _shell;
- protected IConnectorService _system;
-
-
- protected boolean _networkDown = false;
-
- protected List _workingStatuses;
- protected List _cancelledStatuses;
- protected List _doneStatuses;
-
- protected DataStore _dataStore;
-
- protected class FindShell implements Runnable
- {
- private Shell shell;
-
- /**
- * @see Runnable#run()
- */
- public void run()
- {
- try {
- Shell[] shells = Display.getCurrent().getShells();
- for (int loop = 0; loop < shells.length && shell == null; loop++) {
- if (shells[loop].isEnabled()) {
- shell = shells[loop];
- }
- }
- } catch (Exception e) {
- SystemBasePlugin.logError("StatusChangeListener.FindShell exception: ", e); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Construct a StatusChangeListener
- *
- * @param system the system associated with this monitor
- * @param dataStore the dataStore associated with this monitor
- * @param factory the diagnostic factory for this monitor
- */
- public StatusMonitor(IConnectorService system, DataStore dataStore, ICommunicationsDiagnosticFactory factory)
- {
- _system = system;
- _dataStore = dataStore;
- reInit();
- }
-
- /**
- * Construct a StatusChangeListener
- *
- * @param system the system associated with this monitor
- * @param dataStore the dataStore associated with this monitor
- */
- public StatusMonitor(IConnectorService system, DataStore dataStore)
- {
- this(system, dataStore, null);
- }
-
- public void reInit()
- {
- _networkDown = false;
- _system.addCommunicationsListener(this);
- _workingStatuses = new ArrayList();
- _doneStatuses = new ArrayList();
- _cancelledStatuses = new ArrayList();
- _dataStore.getDomainNotifier().addDomainListener(this);
- }
-
- public DataStore getDataStore()
- {
- return _dataStore;
- }
-
- public void dispose()
- {
- _system.removeCommunicationsListener(this);
- _workingStatuses.clear();
- _doneStatuses.clear();
- _cancelledStatuses.clear();
- _dataStore.getDomainNotifier().removeDomainListener(this);
- }
-
- /**
- * @see IDomainListener#listeningTo(DomainEvent)
- */
- public boolean listeningTo(DomainEvent event)
- {
- if (_workingStatuses.size() == 0)
- {
- return true;
- }
-
- DataElement parent = (DataElement)event.getParent();
- if (_workingStatuses.contains(parent))
- {
- return determineStatusDone(parent);
- }
-
- return false;
- }
-
-
-
- /**
- * @see IDomainListener#domainChanged(DomainEvent)
- */
- public void domainChanged(DomainEvent event)
- {
- if (_workingStatuses.size() == 0)
- {
- return;
- }
-
- DataElement parent = (DataElement)event.getParent();
- if (_workingStatuses.contains(parent))
- {
- boolean isStatusDone = determineStatusDone(parent);
- if (isStatusDone)
- {
- setDone(parent);
- }
- }
- }
-
-
- /**
- * Determines whether the status is done.
- * @return <code>true</code> if status done, <code>false</code> otherwise.
- */
- protected boolean determineStatusDone(DataElement status)
- {
- return status.getAttribute(DE.A_VALUE).equals("done") || status.getAttribute(DE.A_NAME).equals("done"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener()
- {
- return false;
- }
-
- /**
- * setDone(boolean)
- */
- public synchronized void setDone(DataElement status)
- {
- _workingStatuses.remove(status);
- _doneStatuses.add(status);
- }
-
-
- public synchronized void setCancelled(DataElement status)
- {
- _workingStatuses.remove(status);
- _cancelledStatuses.add(status);
- }
-
- public synchronized void setWorking(DataElement status)
- {
- _workingStatuses.add(status);
- }
-
-
- public boolean wasCancelled(DataElement status)
- {
- if (_cancelledStatuses.contains(status))
- {
- return true;
- }
- return false;
- }
-
- /**
- * @see IDomainListener#getShell()
- */
- public Shell getShell()
- {
- // dy: DomainNotifier (which calls this method) requires the shell not be disposed
- //if (shell == null) {
- if (_shell == null || _shell.isDisposed())
- {
- FindShell findShell = new FindShell();
- Display.getDefault().syncExec(findShell);
- _shell = findShell.shell;
- }
- return _shell;
- }
-
- /**
- * @see ICommunicationsListener#communicationsStateChange(CommunicationsEvent)
- */
- public void communicationsStateChange(CommunicationsEvent e)
- {
- if (e.getState() == CommunicationsEvent.CONNECTION_ERROR)
- {
- _networkDown = true;
- }
- else if (e.getState() == CommunicationsEvent.AFTER_DISCONNECT)
- {
- _networkDown = true;
- }
- }
-
- /**
- * Test if the StatusChangeListener returned because the network connection to the
- * remote system was broken.
- */
- public boolean isNetworkDown()
- {
- return _networkDown;
- }
-
- public DataElement waitForUpdate(DataElement status) throws InterruptedException
- {
- return waitForUpdate(status, null, 0);
- }
-
- public DataElement waitForUpdate(DataElement status, IProgressMonitor monitor) throws InterruptedException
- {
- return waitForUpdate(status, monitor, 0);
- }
-
- public DataElement waitForUpdate(DataElement status, int wait) throws InterruptedException
- {
- return waitForUpdate(status, null, wait);
- }
-
- public synchronized DataElement waitForUpdate(DataElement status, IProgressMonitor monitor, int wait) throws InterruptedException
- {
- if (_networkDown && status.getDataStore().isConnected())
- {
- reInit();
- }
- if (determineStatusDone(status))
- {
- setDone(status);
- return status;
- }
-
- setWorking(status);
-
- Display display = Display.getCurrent();
-
- // Prevent infinite looping by introducing a threshold for wait
- int WaitThreshold = 600; //default. sleep(100ms) for 600 times
- if ( wait > 0 )
- WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
- else if ( wait == -1 ) // force a diagnostic
- WaitThreshold = -1;
-
- if (display != null)
- {
- // Current thread is UI thread
- while (_workingStatuses.contains(status))
- {
- // while (display.readAndDispatch()) {
- //Process everything on event queue
- // }
-
- if ((monitor != null) && (monitor.isCanceled()))
- {
- setCancelled(status);
- throw new InterruptedException();
- }
-
- boolean statusDone = determineStatusDone(status);
-
- if (statusDone)
- {
- setDone(status);
- }
- else
- {
- Thread.sleep(100);
-
- if (WaitThreshold > 0) // update timer count if
- // threshold not reached
- --WaitThreshold; // decrement the timer count
-
- if (WaitThreshold == 0)
- {
- // no diagnostic factory but there is a timeout
- return status; // returning the undone status object
- }
- else if (_networkDown)
- {
- dispose();
- throw new InterruptedException();
- }
- }
- }
-
- }
- else
- {
- // Current thread is not UI thread
- while (_workingStatuses.contains(status))
- {
-
- if ((monitor != null) && (monitor.isCanceled()))
- {
- setCancelled(status);
- throw new InterruptedException();
- }
-
- boolean statusDone = determineStatusDone(status);
-
- if (statusDone)
- {
- setDone(status);
- }
- else
- {
- Thread.sleep(100);
-
- if (WaitThreshold > 0) // update timer count if
- // threshold not reached
- --WaitThreshold; // decrement the timer count
-
- if (WaitThreshold == 0)
- {
- // no diagnostic factory but there is a timeout
- return status; // returning the undone status object
- }
- else if (_networkDown)
- {
- dispose();
- throw new InterruptedException();
- }
- }
- }
- }
-
-
- return status;
- }
-
-
- /**
- * Start diagnostic
- *
- * @param diagnostic is the an implementation of ICommunicationsDiagnostic
- * @param quiet is the flag to indicate if user should be prompted
- * - true for no prompt
- * @return ICommunciationsDiagnostic class instance
- */
- public ICommunicationsDiagnostic whatIsGoingOn(ICommunicationsDiagnosticFactory factory, boolean quiet, DataElement target) throws InterruptedException //@01
- {
- if (target == null)
- return null;
-
- ICommunicationsDiagnostic d = null;
- try {
- String name = target.getName(); /* Get the current element status name: started/working/done */
- /* Log the current status */
- SystemBasePlugin.logError("StatusChangeListener."+name+": " + "Communications Diagnostic started"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SystemBasePlugin.logError("StatusChangeListener."+name + //$NON-NLS-1$
- ": done = " + _doneStatuses.contains(target) + //$NON-NLS-1$
- "; cancelled = " + _cancelledStatuses.contains(target)+ //$NON-NLS-1$
- "; _networkDown = " + _networkDown ); //$NON-NLS-1$
-
- DataStore ds = _dataStore;
- /* Log the status in DataStore */
- SystemBasePlugin.logError("StatusChangeListener."+name+"(DataStore): " + " isConnected = " + ds.isConnected() + "; isWaiting = " + ds.isWaiting(target)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- /*Log all nested DataElement's in target's parent*/
- List deList = target.getParent().getNestedData();
- if ( deList != null && !deList.isEmpty() ) {
- int num = deList.size();
- for ( int i = 0; i < num; i++)
- {
- DataElement child = (DataElement) deList.get(i);
- if (child != null) {
- SystemBasePlugin.logError("StatusChangeListener."+name+".child"+i+"(DataElement): " + child.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- DataElement descriptor = child.getDescriptor();
- if (descriptor != null)
- SystemBasePlugin.logError("StatusChangeListener."+name+".child"+i+"(Descriptor): " + descriptor.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- }
- //Spawn off a diagnostic to check more stuff
- if (factory != null) {
- d = factory.createInstance();
-
- //Initialize the diagnostic instance
- //Set diagnostic id(name), server name(ds.getName()), this connection(system)
- d.setUp(name, quiet, ds.getName(),_system, null ,null, null);
-
- new Thread(d).start();
- }
-
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("StatusChangeListener.ICommunicationsDiagnostic exception: ", e); //$NON-NLS-1$
- }
-
- return d; // return the created diagnostic class instance
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitorFactory.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitorFactory.java
deleted file mode 100644
index a132b6e5d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitorFactory.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.connectorservice.dstore.util;
-
-import java.util.HashMap;
-
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-
-/**
- * Factory for finding and creating the StatusMonitor class for a given system
- */
-public class StatusMonitorFactory
-{
- protected HashMap _monitorMap;
- protected static StatusMonitorFactory _instance;
-
- public static StatusMonitorFactory getInstance()
- {
- if (_instance == null)
- {
- _instance = new StatusMonitorFactory();
- }
- return _instance;
- }
-
- public StatusMonitorFactory()
- {
- _monitorMap= new HashMap();
- }
-
- public void removeStatusMonitorFor(IConnectorService system)
- {
- StatusMonitor monitor = (StatusMonitor)_monitorMap.remove(system);
- if (monitor != null)
- {
- monitor.dispose();
- }
- }
-
- public StatusMonitor getStatusMonitorFor(IConnectorService system, DataStore dataStore)
- {
- return getStatusMonitorFor(system, dataStore, null);
- }
-
- public StatusMonitor getStatusMonitorFor(IConnectorService system, DataStore dataStore, ICommunicationsDiagnosticFactory diagnosticFactory)
- {
- StatusMonitor monitor = (StatusMonitor)_monitorMap.get(system);
- if (monitor == null)
- {
- monitor = new StatusMonitor(system, dataStore, diagnosticFactory);
- _monitorMap.put(system, monitor);
- }
- DataStore mDataStore = monitor.getDataStore();
- if (mDataStore != dataStore)
- {
- removeStatusMonitorFor(system);
- monitor = new StatusMonitor(system, dataStore, diagnosticFactory);
- _monitorMap.put(system, monitor);
- }
-
- return monitor;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/.classpath b/rse/plugins/org.eclipse.rse.connectorservice.local/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/.cvsignore b/rse/plugins/org.eclipse.rse.connectorservice.local/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/.project b/rse/plugins/org.eclipse.rse.connectorservice.local/.project
deleted file mode 100644
index 323499d47..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.connectorservice.local</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.connectorservice.local/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.connectorservice.local/META-INF/MANIFEST.MF
deleted file mode 100644
index e46fbc53e..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.connectorservice.local
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.connectorservice.local.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.connectorservice.local
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/about.html b/rse/plugins/org.eclipse.rse.connectorservice.local/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/build.properties b/rse/plugins/org.eclipse.rse.connectorservice.local/build.properties
deleted file mode 100644
index ca59f60e9..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = .,\
- META-INF/,\
- about.html,\
- plugin.properties
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/plugin.properties b/rse/plugins/org.eclipse.rse.connectorservice.local/plugin.properties
deleted file mode 100644
index 862bdb0c3..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE Local Connector Service
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/Activator.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/Activator.java
deleted file mode 100644
index f76e72891..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/Activator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.connectorservice.local;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.connectorservice.local", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ConnectorServiceResources.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ConnectorServiceResources.java
deleted file mode 100644
index 9aa495b4f..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ConnectorServiceResources.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.connectorservice.local;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ConnectorServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.connectorservice.local.ConnectorServiceResources";//$NON-NLS-1$
-
- public static String Local_ConnectorService_Label;
- public static String Local_ConnectorService_Description;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ConnectorServiceResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ConnectorServiceResources.properties b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ConnectorServiceResources.properties
deleted file mode 100644
index 34b8564c6..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ConnectorServiceResources.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-Local_ConnectorService_Label=Local Connector Service
-Local_ConnectorService_Description=The Local Connector Service uses the Java API to connect to the local host. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ILocalSubSystem.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ILocalSubSystem.java
deleted file mode 100644
index 7034a17e3..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/ILocalSubSystem.java
+++ /dev/null
@@ -1,25 +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.connectorservice.local;
-
-/**
- * This is the interface all our subsystems in a local connection implement.
- */
-public interface ILocalSubSystem
-{
- String copyright = "(c) Copyright IBM Corporation 2001, 2003. "; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorService.java
deleted file mode 100644
index c9b4553dc..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorService.java
+++ /dev/null
@@ -1,131 +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.connectorservice.local;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorService;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-
-/**
- * System class required by the remote systems framework.
- * This represents the live connection at tool runtime.
- * Since we don't really have such a thing for local files, this
- * is pretty well empty.
- */
-public class LocalConnectorService extends AbstractConnectorService
-{
-
- /**
- * Constructor when we don't have a subsystem yet.
- * Call setSubSystem after.
- */
- public LocalConnectorService(IHost host)
- {
- super(ConnectorServiceResources.Local_ConnectorService_Label, ConnectorServiceResources.Local_ConnectorService_Description, host, 0);
- }
-
-
-
- /**
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#disconnect(IProgressMonitor)
- */
- public void internalDisconnect(IProgressMonitor monitor) throws Exception
- {
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_DISCONNECT);
-
- // Fire comm event to signal state changed
- notifyDisconnection();
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IConnectorService#connect(IProgressMonitor)
- */
- protected void internalConnect(IProgressMonitor monitor) throws Exception
- {
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected()
- */
- public boolean isConnected()
- {
- return true;
- }
-
- /**
- * Return the version, release, modification of the operating system.
- * <p>
- * Returns System.getProperty("os.version")
- */
- public String getVersionReleaseModification()
- {
- return System.getProperty("os.version"); //$NON-NLS-1$
- }
- /**
- * Return the home directory of the operating system for the current user, if available.
- * <p>
- * Returns System.getProperty("user.home")
- */
- public String getHomeDirectory()
- {
- return System.getProperty("user.home"); //$NON-NLS-1$
- }
- /**
- * Return the temp directory of the operating system for the current user, if available.
- * <p>
- * Returns System.getProperty("java.io.tmpdir")
- */
- public String getTempDirectory()
- {
- return System.getProperty("java.io.tmpdir"); //$NON-NLS-1$
- }
-
-
-
-
- public boolean hasRemoteServerLauncherProperties()
- {
- return false;
- }
-
- public boolean supportsRemoteServerLaunching()
- {
- return false;
- }
-
- public boolean supportsServerLaunchProperties()
- {
- return false;
- }
-
- /**
- * @return false
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsPassword()
- */
- public boolean supportsPassword() {
- return false;
- }
-
- /**
- * @return false
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsUserId()
- */
- public boolean supportsUserId() {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorServiceManager.java
deleted file mode 100644
index 0a56d69d2..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorServiceManager.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.connectorservice.local;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-/**
- * IConnectorService manager class.
- * There should be only one of these instantiated.
- * Use getTheLocalSystemManager to get that singleton.
- * <p>
- * The job of this manager is to manage and return IConnectorService objects.
- * It ensures there is only ever one per unique SystemConnection,
- * so that both the file and cmd subsystems can share the same system object.
- */
-public class LocalConnectorServiceManager extends AbstractConnectorServiceManager
-{
- private static LocalConnectorServiceManager inst = null;
-
- /**
- * Private constructor to ensure not instantiated this way.
- * Use getTheLocalSystemManager instead.
- */
- private LocalConnectorServiceManager()
- {
- }
-
- /**
- * Return singleton instance of this class
- */
- public static LocalConnectorServiceManager getTheLocalSystemManager()
- {
- if (inst == null)
- inst = new LocalConnectorServiceManager();
- return inst;
- }
-
- /**
- * Return true if the singleton has been created.
- * This saves creating it at shutdown just to test for isConnected.
- */
- public static boolean isInstantiated()
- {
- return (inst != null);
- }
-
- // -------------------------------------
- // ABSTRACT METHODS FROM PARENT CLASS...
- // -------------------------------------
-
-
-
- /**
- * Return the actual IConnectorService object.
- */
- public IConnectorService createConnectorService(IHost host)
- {
- IConnectorService connectorService = new LocalConnectorService(host);
- return connectorService;
- }
-
- /**
- * For all subsystems in a particular SystemConnection, we need to know which
- * ones are to share a single IConnectorService object. To do this, we need a key which
- * is canonical for all subsystems in a given connection. This can be anything,
- * but is typically a unique interface that all subsystems supported a shared
- * IConnectorService object implement.
- * <p>
- * Whatever is returned from here is used as the key into a hashtable to find the
- * singleton IConnectorService object in getSystemObject.
- * <p>
- * @return ILocalSubSystem.class
- */
- public Class getSubSystemCommonInterface(ISubSystem subsystem)
- {
- return ILocalSubSystem.class;
- }
- /**
- * Given another subsystem, return true if that subsystem shares a single IConnectorService object
- * with this one. You must override this to return true if you recognize that subsystem
- * as one of your own. You are guaranteed the other subsystem will be from the same
- * SystemConnection as this one.
- * <p>
- * You can't assume a SystemConnection will you only have subsystems of that you created,
- * so you should only return true if it implements your interface or you know it is an
- * instance of your subsystem class.
- * <p>
- * This should simply return (otherSubSystem instanceof interface) where interface is
- * the same one returned from getSubSystemCommonInterface
- *
- * @return true if otherSubSystem instanceof ILocalSubSystem
- */
- public boolean sharesSystem(ISubSystem otherSubSystem)
- {
- return (otherSubSystem instanceof ILocalSubSystem);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.classpath b/rse/plugins/org.eclipse.rse.connectorservice.ssh/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.cvsignore b/rse/plugins/org.eclipse.rse.connectorservice.ssh/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.options b/rse/plugins/org.eclipse.rse.connectorservice.ssh/.options
deleted file mode 100644
index e846377b8..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.rse.connectorservice.ssh/debug = true
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.project b/rse/plugins/org.eclipse.rse.connectorservice.ssh/.project
deleted file mode 100644
index dfdb5f84d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.connectorservice.ssh</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.core.resources.prefs b/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b212285a0..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jul 07 11:01:49 CEST 2006
-eclipse.preferences.version=1
-encoding//src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.properties=8859_1
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.jdt.ui.prefs b/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 07346397c..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Jul 07 11:19:10 CEST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;org.eclipse.rse;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.connectorservice.ssh/META-INF/MANIFEST.MF
deleted file mode 100644
index cdd005cd0..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.connectorservice.ssh; singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.connectorservice.ssh.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services.ssh,
- org.eclipse.rse.services,
- org.eclipse.rse.core,
- org.eclipse.rse.ui,
- org.eclipse.ui,
- com.jcraft.jsch;bundle-version="[0.1.28,2.0.0)"
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.connectorservice.ssh
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/about.html b/rse/plugins/org.eclipse.rse.connectorservice.ssh/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/build.properties b/rse/plugins/org.eclipse.rse.connectorservice.ssh/build.properties
deleted file mode 100644
index 82d6b8b0e..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
-javacWarnings.. = -discouraged
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/obj16/systemcommands_obj.gif b/rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/obj16/systemcommands_obj.gif
deleted file mode 100644
index 061b6e226..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/obj16/systemcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/obj16/systemcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/obj16/systemcommandslive_obj.gif
deleted file mode 100644
index 3faca4474..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/obj16/systemcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/wizban/keylock.gif b/rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/wizban/keylock.gif
deleted file mode 100644
index 2efb6ffb5..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/icons/full/wizban/keylock.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.properties b/rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.properties
deleted file mode 100644
index f6cae31ba..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = RSE SSH Connector Service
-providerName = Eclipse.org
-
-SshSystemName=SSH Only
-SshSystemDescription=Connection for SSH access to remote systems
-
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.xml b/rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.xml
deleted file mode 100644
index fbce7ade9..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006 Wind River Systems, Inc.
-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:
-Martin Oberhuber - initial API and implementation
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension point="org.eclipse.rse.core.systemTypes">
- <systemType
- description="%SshSystemDescription"
- icon="icons/full/obj16/systemcommands_obj.gif"
- iconLive="icons/full/obj16/systemcommandslive_obj.gif"
- id="org.eclipse.rse.systemtype.ssh"
- name="SSH Only"/>
- </extension>
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/Activator.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/Activator.java
deleted file mode 100644
index 0a687abd1..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/Activator.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.connectorservice.ssh;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rse.connectorservice.ssh"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- //<tracing code>----------------------------------------------------
-
- private static Boolean fTracingOn = null;
- public static boolean isTracingOn() {
- if (fTracingOn==null) {
- String id = plugin.getBundle().getSymbolicName();
- String val = Platform.getDebugOption(id + "/debug"); //$NON-NLS-1$
- if ("true".equals(val)) { //$NON-NLS-1$
- fTracingOn = Boolean.TRUE;
- } else {
- fTracingOn = Boolean.FALSE;
- }
- }
- return fTracingOn.booleanValue();
- }
- public static String getTimestamp() {
- try {
- DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$
- return formatter.format(new Date());
- } catch (Exception e) {
- // If there were problems writing out the date, ignore and
- // continue since that shouldn't stop us from logging the rest
- // of the information
- }
- return Long.toString(System.currentTimeMillis());
- }
- public static void trace(String msg) {
- if (isTracingOn()) {
- String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg; //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(fullMsg);
- System.out.flush();
- }
- }
-
- //</tracing code>---------------------------------------------------
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/ISshConstants.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/ISshConstants.java
deleted file mode 100644
index e1ec3ce80..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/ISshConstants.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Martin Oberhuber (Wind River) - extracted from various team.cvs plugins
- *******************************************************************************/
-package org.eclipse.rse.connectorservice.ssh;
-
-
-/**
- * Defines the constants used by the terminal.ssh Plugin
- */
-public interface ISshConstants {
-
- // These are from ISSHContants
- public static final String KEY_SSH2HOME="CVSSSH2PreferencePage.SSH2HOME"; //$NON-NLS-1$
- public static final String KEY_PRIVATEKEY="CVSSSH2PreferencePage.PRIVATEKEY"; //$NON-NLS-1$
-
- // These are from ICVSUIConstants
- public static final String PREF_USE_PROXY = "proxyEnabled"; //$NON-NLS-1$
- public static final String PREF_PROXY_TYPE = "proxyType"; //$NON-NLS-1$
- public static final String PREF_PROXY_HOST = "proxyHost"; //$NON-NLS-1$
- public static final String PREF_PROXY_PORT = "proxyPort"; //$NON-NLS-1$
- public static final String PREF_PROXY_AUTH = "proxyAuth"; //$NON-NLS-1$
-
- // These are from CVSProviderPlugin
- public static final String PROXY_TYPE_HTTP = "HTTP"; //$NON-NLS-1$
- public static final String PROXY_TYPE_SOCKS5 = "SOCKS5"; //$NON-NLS-1$
- public static final String HTTP_DEFAULT_PORT="80"; //$NON-NLS-1$
- public static final String SOCKS5_DEFAULT_PORT="1080"; //$NON-NLS-1$
-
- // These are from cvs.ui.IHelpContextIds
- public static final String CVSUIPREFIX = "org.eclipse.team.cvs.ui."; //$NON-NLS-1$
- public static final String HELP_USER_VALIDATION_DIALOG = CVSUIPREFIX + "user_validation_dialog_context"; //$NON-NLS-1$
- public static final String HELP_KEYBOARD_INTERACTIVE_DIALOG = CVSUIPREFIX + "keyboard_interactive_dialog_context"; //$NON-NLS-1$
-
- // These are from TeamUIImages
- public final String IMG_KEY_LOCK = "icons/full/wizban/keylock.gif"; //$NON-NLS-1$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/ISshSubSystem.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/ISshSubSystem.java
deleted file mode 100644
index ed716c1ef..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/ISshSubSystem.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.connectorservice.ssh;
-
-/**
- * Markup Interface for subsystems using the SshConnectorService.
- *
- * By implementing this interface, subsystems can be recognized
- * as being able to share a single ssh connector service between
- * multiple different subsystems.
- */
-public interface ISshSubSystem {
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/KeyboardInteractiveDialog.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/KeyboardInteractiveDialog.java
deleted file mode 100644
index 850409563..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/KeyboardInteractiveDialog.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- * Martin Oberhuber (Wind River) - copied and adapted from team.cvs.ui
- *******************************************************************************/
-package org.eclipse.rse.connectorservice.ssh;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-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;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for keyboad-interactive authentication for the ssh2 connection.
- */
-public class KeyboardInteractiveDialog extends TrayDialog {
- // widgets
- private Text[] texts;
-
- protected String domain;
- protected String destination;
- protected String name;
- protected String instruction;
- protected String lang;
- protected String[] prompt;
- protected boolean[] echo;
- private String message;
- private String[] result;
-
- /**
- * Creates a nwe KeyboardInteractiveDialog.
- *
- * @param parentShell the parent shell
- * @param connectionId an id for the connection
- * @param destination the location
- * @param name the name
- * @param instruction the instruction
- * @param prompt the titles for textfields
- * @param echo '*' should be used or not
- */
- public KeyboardInteractiveDialog(Shell parentShell,
- String connectionId,
- String destination,
- String name,
- String instruction,
- String[] prompt,
- boolean[] echo){
- super(parentShell);
- this.domain=connectionId;
- this.destination=destination;
- this.name=name;
- this.instruction=instruction;
- this.prompt=prompt;
- this.echo=echo;
- this.message=NLS.bind(SshConnectorResources.KeyboardInteractiveDialog_message, new String[] { destination+(name!=null && name.length()>0 ? ": "+name : "") }); //NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-2$
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(message);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
- if(texts.length>0){
- texts[0].setFocus();
- }
- }
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite main=new Composite(parent, SWT.NONE);
- GridLayout layout=new GridLayout();
- layout.numColumns=3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(main, ISshConstants.HELP_KEYBOARD_INTERACTIVE_DIALOG);
-
- if (message!=null) {
- Label messageLabel=new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- messageLabel.setLayoutData(data);
- }
- if(domain!=null){
- Label label = new Label(main, SWT.WRAP);
- label.setText(NLS.bind(SshConnectorResources.KeyboardInteractiveDialog_labelConnection, new String[] { domain }));
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- label.setLayoutData(data);
- }
- if (instruction!=null && instruction.length()>0) {
- Label messageLabel=new Label(main, SWT.WRAP);
- messageLabel.setText(instruction);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- messageLabel.setLayoutData(data);
- }
- createPasswordFields(main);
- return main;
- }
- /**
- * Creates the widgets that represent the entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- texts=new Text[prompt.length];
-
- for(int i=0; i<prompt.length; i++){
- new Label(parent, SWT.NONE).setText(prompt[i]);
- texts[i]=new Text(parent, SWT.BORDER);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint=convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- texts[i].setLayoutData(data);
-
- if(!echo[i]){
- texts[i].setEchoChar('*');
- }
- new Label(parent, SWT.NONE);
- }
-
- }
- /**
- * Returns the entered values, or null
- * if the user canceled.
- *
- * @return the entered values
- */
- public String[] getResult() {
- return result;
- }
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- result=new String[prompt.length];
- for(int i=0; i<texts.length; i++){
- result[i]=texts[i].getText();
- }
- super.okPressed();
- }
- /**
- * Notifies that the cancel button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.CANCEL</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void cancelPressed() {
- result=null;
- super.cancelPressed();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.java
deleted file mode 100644
index 047765020..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui
- *******************************************************************************/
-
-package org.eclipse.rse.connectorservice.ssh;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SshConnectorResources extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.connectorservice.ssh.SshConnectorResources"; //$NON-NLS-1$
- static {
- NLS.initializeMessages(BUNDLE_NAME, SshConnectorResources.class);
- }
- private SshConnectorResources() {
- }
-
- public static String SshConnectorService_Name;
- public static String SshConnectorService_Description;
-
- public static String SshConnectorService_ErrorDisconnecting;
- public static String SshConnectorService_Info;
- public static String SshConnectorService_Warning;
-
- //These are from org.eclipse.team.cvs.ui.CVSUIMessages
- public static String UserValidationDialog_required;
- public static String UserValidationDialog_labelUser;
- public static String UserValidationDialog_labelPassword;
- public static String UserValidationDialog_password;
- public static String UserValidationDialog_user;
- public static String UserValidationDialog_5;
- public static String UserValidationDialog_6;
- public static String UserValidationDialog_7;
-
- public static String KeyboardInteractiveDialog_message;
- public static String KeyboardInteractiveDialog_labelConnection;
-
- //These are from cvs/messages.properties
- public static String Socket_timeout;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.properties b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.properties
deleted file mode 100644
index 1df864cd9..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-SshConnectorService_Name=SSH Connector Service
-SshConnectorService_Description=SSH Connector Service Description
-
-SshConnectorService_ErrorDisconnecting=ConnectionStatusListener: Error disconnecting
-SshConnectorService_Warning=Warning
-SshConnectorService_Info=Info
-
-#These are from cvs.ui/messages.properties
-UserValidationDialog_required=Password Required
-UserValidationDialog_labelUser={0}
-UserValidationDialog_labelPassword={1}
-UserValidationDialog_password=&Password:
-UserValidationDialog_user=&User name:
-UserValidationDialog_5=Connection:
-UserValidationDialog_6=&Save password
-UserValidationDialog_7=Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.
-
-KeyboardInteractiveDialog_message=Keyboard Interactive authentication for {0}
-KeyboardInteractiveDialog_labelConnection=Enter values for the following connection: {0}
-
-#These are from cvs/messages.properties
-Socket_timeout=A timeout occurred connecting to host {0}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorService.java
deleted file mode 100644
index 38327728e..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorService.java
+++ /dev/null
@@ -1,818 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.connectorservice.ssh;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.Socket;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.Collections;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Proxy;
-import com.jcraft.jsch.ProxyHTTP;
-import com.jcraft.jsch.ProxySOCKS5;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.SocketFactory;
-import com.jcraft.jsch.UIKeyboardInteractive;
-import com.jcraft.jsch.UserInfo;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.core.subsystems.AbstractConnectorService;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.ssh.ISshSessionProvider;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-
-/**
- * Create SSH connections.
- */
-public class SshConnectorService extends AbstractConnectorService implements ISshSessionProvider
-{
- private static final int SSH_DEFAULT_PORT = 22;
- private static final int CONNECT_DEFAULT_TIMEOUT = 60; //seconds
- private static JSch jsch=new JSch();
- private Session session;
- private SessionLostHandler fSessionLostHandler;
-
- public SshConnectorService(IHost host) {
- //TODO the port parameter doesnt really make sense here since
- //it will be overridden when the subsystem initializes (through
- //setPort() on our base class -- I assume the port is meant to
- //be a local port.
- super(SshConnectorResources.SshConnectorService_Name, SshConnectorResources.SshConnectorService_Description, host, 0);
- fSessionLostHandler = null;
- }
-
- //----------------------------------------------------------------------
- // <copied from org.eclipse.team.cvs>
- //----------------------------------------------------------------------
-
- /**
- * Progress Monitor Helper: from team.cvs.core.Policy
- * @param monitor
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- }
-
- /**
- * Helper method that will time out when making a socket connection.
- * This is required because there is no way to provide a timeout value
- * when creating a socket and in some instances, they don't seem to
- * timeout at all.
- * @param host inetaddress to connect to
- * @param port port to connect to
- * @param timeout number of seconds for timeout (default=60)
- * @param monitor progress monitor
- */
- public static Socket createSocket(final String host, final int port, int timeout, IProgressMonitor monitor) throws UnknownHostException, IOException {
-
- // Start a thread to open a socket
- final Socket[] socket = new Socket[] { null };
- final Exception[] exception = new Exception[] {null };
- final Thread thread = new Thread(new Runnable() {
- public void run() {
- try {
- Socket newSocket = new Socket(host, port);
- synchronized (socket) {
- if (Thread.interrupted()) {
- // we we're either cancelled or timed out so just close the socket
- newSocket.close();
- } else {
- socket[0] = newSocket;
- }
- }
- } catch (UnknownHostException e) {
- exception[0] = e;
- } catch (IOException e) {
- exception[0] = e;
- }
- }
- });
- thread.start();
-
- // Wait the appropriate number of seconds
- if (timeout <= 0) timeout = 60;
- for (int i = 0; i < timeout; i++) {
- try {
- // wait for the thread to complete or 1 second, which ever comes first
- thread.join(1000);
- } catch (InterruptedException e) {
- // I think this means the thread was interupted but not necessarily timed out
- // so we don't need to do anything
- }
- synchronized (socket) {
- // if the user cancelled, clean up before preempting the operation
- if (monitor.isCanceled()) {
- if (thread.isAlive()) {
- thread.interrupt();
- }
- if (socket[0] != null) {
- socket[0].close();
- }
- // this method will throw the proper exception
- checkCanceled(monitor);
- }
- }
- }
- // If the thread is still running (i.e. we timed out) signal that it is too late
- synchronized (socket) {
- if (thread.isAlive()) {
- thread.interrupt();
- }
- }
- if (exception[0] != null) {
- if (exception[0] instanceof UnknownHostException)
- throw (UnknownHostException)exception[0];
- else
- throw (IOException)exception[0];
- }
- if (socket[0] == null) {
- throw new InterruptedIOException(NLS.bind(SshConnectorResources.Socket_timeout, new String[] { host }));
- }
- return socket[0];
- }
-
- //----------------------------------------------------------------------
- // <copied from org.eclipse.team.cvs.ssh2>
- //----------------------------------------------------------------------
- private static String current_ssh_home = null;
- private static String current_pkeys = ""; //$NON-NLS-1$
- static String SSH_HOME_DEFAULT = null;
- static {
- String ssh_dir_name = ".ssh"; //$NON-NLS-1$
-
- // Windows doesn't like files or directories starting with a dot.
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- ssh_dir_name = "ssh"; //$NON-NLS-1$
- }
- SSH_HOME_DEFAULT = System.getProperty("user.home"); //$NON-NLS-1$
- if (SSH_HOME_DEFAULT != null) {
- SSH_HOME_DEFAULT = SSH_HOME_DEFAULT + java.io.File.separator + ssh_dir_name;
- }
- }
-
- private static IPreferenceStore fCvsSsh2PreferenceStore;
- static IPreferenceStore getCvsSsh2PreferenceStore() {
- if (fCvsSsh2PreferenceStore == null) {
- fCvsSsh2PreferenceStore = new ScopedPreferenceStore(new InstanceScope(),"org.eclipse.team.cvs.ssh2"); //$NON-NLS-1$
- }
- return fCvsSsh2PreferenceStore;
- }
-
- private static IPreferenceStore fCvsUIPreferenceStore;
- static IPreferenceStore getCvsUIPreferenceStore() {
- if (fCvsUIPreferenceStore == null) {
- fCvsUIPreferenceStore = new ScopedPreferenceStore(new InstanceScope(),"org.eclipse.team.cvs.ui"); //$NON-NLS-1$
- }
- return fCvsUIPreferenceStore;
- }
-
- // Load ssh prefs from Team/CVS for now.
- // TODO do our own preference page.
- static void loadSshPrefs(JSch jsch)
- {
- IPreferenceStore store = getCvsSsh2PreferenceStore();
- String ssh_home = store.getString(ISshConstants.KEY_SSH2HOME);
- String pkeys = store.getString(ISshConstants.KEY_PRIVATEKEY);
-
- try {
- if (ssh_home.length() == 0)
- ssh_home = SSH_HOME_DEFAULT;
-
- if (current_ssh_home == null || !current_ssh_home.equals(ssh_home)) {
- loadKnownHosts(jsch, ssh_home);
- current_ssh_home = ssh_home;
- current_pkeys = ""; //$NON-NLS-1$
- }
-
- if (!current_pkeys.equals(pkeys)) {
- java.io.File file;
- String[] pkey = pkeys.split(","); //$NON-NLS-1$
- String[] _pkey = current_pkeys.split(","); //$NON-NLS-1$
- current_pkeys = ""; //$NON-NLS-1$
- for (int i = 0; i < pkey.length; i++) {
- file = new java.io.File(pkey[i]);
- if (!file.isAbsolute()) {
- file = new java.io.File(ssh_home, pkey[i]);
- }
- if (file.exists()) {
- boolean notyet = true;
- for (int j = 0; j < _pkey.length; j++) {
- if (pkey[i].equals(_pkey[j])) {
- notyet = false;
- break;
- }
- }
- if (notyet)
- jsch.addIdentity(file.getPath());
- if (current_pkeys.length() == 0) {
- current_pkeys = pkey[i];
- } else {
- current_pkeys += ("," + pkey[i]); //$NON-NLS-1$
- }
- }
- }
- }
- } catch (Exception e) {
- }
-
- }
-
- static void loadKnownHosts(JSch jsch, String ssh_home){
- try {
- java.io.File file;
- file=new java.io.File(ssh_home, "known_hosts"); //$NON-NLS-1$
- jsch.setKnownHosts(file.getPath());
- } catch (Exception e) {
- }
- }
-
- private static final String INFO_PROXY_USER = "org.eclipse.team.cvs.core.proxy.user"; //$NON-NLS-1$
- private static final String INFO_PROXY_PASS = "org.eclipse.team.cvs.core.proxy.pass"; //$NON-NLS-1$
-
- static Proxy loadSshProxyPrefs() {
- //TODO Use official Platform prefs when bug 154100 is fixed
- IPreferenceStore store = getCvsUIPreferenceStore();
- boolean useProxy = store.getBoolean(ISshConstants.PREF_USE_PROXY);
- Proxy proxy = null;
- if (useProxy) {
- String _type = store.getString(ISshConstants.PREF_PROXY_TYPE);
- String _host = store.getString(ISshConstants.PREF_PROXY_HOST);
- String _port = store.getString(ISshConstants.PREF_PROXY_PORT);
-
- boolean useAuth = store.getBoolean(ISshConstants.PREF_PROXY_AUTH);
- String _user = ""; //$NON-NLS-1$
- String _pass = ""; //$NON-NLS-1$
-
- // Retrieve username and password from keyring.
- if(useAuth){
- Map authInfo = null;
- try {
- URL FAKE_URL = new URL("http://org.eclipse.team.cvs.proxy.auth");//$NON-NLS-1$
- authInfo = Platform.getAuthorizationInfo(FAKE_URL, "proxy", ""); //$NON-NLS-1$ //$NON-NLS-2$
- } catch(MalformedURLException e) {
- //should never happen
- }
- if (authInfo==null) authInfo=Collections.EMPTY_MAP;
- _user=(String)authInfo.get(INFO_PROXY_USER);
- _pass=(String)authInfo.get(INFO_PROXY_PASS);
- if (_user==null) _user=""; //$NON-NLS-1$
- if (_pass==null) _pass=""; //$NON-NLS-1$
- }
-
- String proxyhost = _host + ":" + _port; //$NON-NLS-1$
- if (_type.equals(ISshConstants.PROXY_TYPE_HTTP)) {
- proxy = new ProxyHTTP(proxyhost);
- if (useAuth) {
- ((ProxyHTTP) proxy).setUserPasswd(_user, _pass);
- }
- } else if (_type.equals(ISshConstants.PROXY_TYPE_SOCKS5)) {
- proxy = new ProxySOCKS5(proxyhost);
- if (useAuth) {
- ((ProxySOCKS5) proxy).setUserPasswd(_user, _pass);
- }
- }
- }
- return proxy;
- }
-
- public static class SimpleSocketFactory implements SocketFactory {
- InputStream in = null;
- OutputStream out = null;
- public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
- Socket socket = null;
- socket = new Socket(host, port);
- return socket;
- }
- public InputStream getInputStream(Socket socket) throws IOException {
- if (in == null)
- in = socket.getInputStream();
- return in;
- }
- public OutputStream getOutputStream(Socket socket) throws IOException {
- if (out == null)
- out = socket.getOutputStream();
- return out;
- }
- }
-
- public static class ResponsiveSocketFactory extends SimpleSocketFactory {
- private IProgressMonitor monitor;
- public ResponsiveSocketFactory(IProgressMonitor monitor) {
- this.monitor = monitor;
- }
- public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
- Socket socket = null;
- //Allows to cancel the socket creation operation if necessary.
- //Waits for the timeout specified in CVS Preferences, maximum.
- socket = SshConnectorService.createSocket(host, port, CONNECT_DEFAULT_TIMEOUT, monitor);
- // Null out the monitor so we don't hold onto anything
- // (i.e. the SSH2 session will keep a handle to the socket factory around
- monitor = new NullProgressMonitor();
- // Set the socket timeout
- //socket.setSoTimeout(getSshTimeoutInMillis());
- // We want blocking read() calls in ssh to never terminate
- socket.setSoTimeout(0);
- return socket;
- }
- }
-
- //----------------------------------------------------------------------
- // </copied from org.eclipse.team.cvs.ssh2>
- //----------------------------------------------------------------------
-
- protected void internalConnect(IProgressMonitor monitor) throws Exception
- {
- //We could share the preferences from ssh2, or use RSE
- //ConnectorService Properties / Server Launcher Properties
-
- //jsch.setKnownHosts("/home/foo/.ssh/known_hosts");
- loadSshPrefs(jsch);
- String host = getHostName();
- String user = getUserId();
-
- Proxy proxy = loadSshProxyPrefs();
- session=jsch.getSession(user, host, SSH_DEFAULT_PORT);
- if (proxy != null) {
- session.setProxy(proxy);
- }
- //session.setTimeout(getSshTimeoutInMillis());
- session.setTimeout(0); //never time out on the session
- String password=""; //$NON-NLS-1$
- SystemSignonInformation ssi = getPasswordInformation();
- if (ssi!=null) {
- password = getPasswordInformation().getPassword();
- }
- session.setPassword(password);
- MyUserInfo userInfo = new MyUserInfo(user, password);
- session.setUserInfo(userInfo);
- session.setSocketFactory(new ResponsiveSocketFactory(monitor));
-
- //java.util.Hashtable config=new java.util.Hashtable();
- //config.put("StrictHostKeyChecking", "no");
- //session.setConfig(config);
- userInfo.aboutToConnect();
- try {
- Activator.trace("SshConnectorService.connecting..."); //$NON-NLS-1$
- //wait for 60 sec maximum during connect
- session.connect(CONNECT_DEFAULT_TIMEOUT * 1000);
- Activator.trace("SshConnectorService.connected"); //$NON-NLS-1$
- } catch (JSchException e) {
- Activator.trace("SshConnectorService.connect failed: "+e.toString()); //$NON-NLS-1$
- if (session.isConnected())
- session.disconnect();
- throw e;
- }
- userInfo.connectionMade();
- fSessionLostHandler = new SessionLostHandler(this);
- notifyConnection();
- }
-
- public void internalDisconnect(IProgressMonitor monitor) throws Exception
- {
- //TODO Will services like the sftp service be disconnected too? Or notified?
- Activator.trace("SshConnectorService.disconnect"); //$NON-NLS-1$
- try
- {
- if (session != null) {
- // Is disconnect being called because the network (connection) went down?
- boolean sessionLost = (fSessionLostHandler!=null && fSessionLostHandler.isSessionLost());
- // no more interested in handling session-lost, since we are disconnecting anyway
- fSessionLostHandler = null;
- // handle events
- if (sessionLost) {
- notifyError();
- }
- else {
- // Fire comm event to signal state about to change
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_DISCONNECT);
- }
-
- if (session.isConnected()) {
- session.disconnect();
- }
-
- // Fire comm event to signal state changed
- notifyDisconnection();
- //TODO MOB - keep the session to avoid NPEs in services (disables gc for the session!)
- // session = null;
- // DKM - no need to clear uid cache
- clearPasswordCache(false); // clear in-memory password
- //clearUserIdCache(); // Clear any cached local user IDs
- }
- }
- catch (Exception exc)
- {
- throw new java.lang.reflect.InvocationTargetException(exc);
- }
- }
-
- //TODO avoid having jsch type "Session" in the API.
- //Could be done by instanciating SshShellService and SshFileService here,
- //and implementing IShellService getShellService()
- //and IFileService getFileService().
- public Session getSession() {
- return session;
- }
-
- /**
- * Handle session-lost events.
- * This is generic for any sort of connector service.
- * Most of this is extracted from dstore's ConnectionStatusListener.
- *
- * TODO should be refactored to make it generally available, and allow
- * dstore to derive from it.
- */
- public static class SessionLostHandler implements Runnable, IRunnableWithProgress
- {
- private IConnectorService _connection;
- private boolean fSessionLost;
-
- public SessionLostHandler(IConnectorService cs)
- {
- _connection = cs;
- fSessionLost = false;
- }
-
- /**
- * Notify that the connection has been lost. This may be called
- * multiple times from multiple subsystems. The SessionLostHandler
- * ensures that actual user feedback and disconnect actions are
- * done only once, on the first invocation.
- */
- public void sessionLost()
- {
- //avoid duplicate execution of sessionLost
- boolean showSessionLostDlg=false;
- synchronized(this) {
- if (!fSessionLost) {
- fSessionLost = true;
- showSessionLostDlg=true;
- }
- }
- if (showSessionLostDlg) {
- //invokes this.run() on dispatch thread
- Display.getDefault().asyncExec(this);
- }
- }
-
- public synchronized boolean isSessionLost() {
- return fSessionLost;
- }
-
- public void run()
- {
- Shell shell = getShell();
- //TODO need a more correct message for "session lost"
- //TODO allow users to reconnect from this dialog
- //SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST);
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED);
- msg.makeSubstitution(_connection.getPrimarySubSystem().getHost().getAliasName());
- SystemMessageDialog dialog = new SystemMessageDialog(getShell(), msg);
- dialog.open();
- try
- {
- //TODO I think we should better use a Job for disconnecting?
- //But what about error messages?
- IRunnableContext runnableContext = getRunnableContext(getShell());
- // will do this.run(IProgressMonitor mon)
- //runnableContext.run(false,true,this); // inthread, cancellable, IRunnableWithProgress
- runnableContext.run(true,true,this); // fork, cancellable, IRunnableWithProgress
- _connection.reset();
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.connectedStatusChange(_connection.getPrimarySubSystem(), false, true, true);
- }
- catch (InterruptedException exc) // user cancelled
- {
- if (shell != null)
- showDisconnectCancelledMessage(shell, _connection.getHostName(), _connection.getPort());
- }
- catch (java.lang.reflect.InvocationTargetException invokeExc) // unexpected error
- {
- Exception exc = (Exception)invokeExc.getTargetException();
- if (shell != null)
- showDisconnectErrorMessage(shell, _connection.getHostName(), _connection.getPort(), exc);
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(SshConnectorResources.SshConnectorService_ErrorDisconnecting, e);
- }
- }
-
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException
- {
- String message = null;
- message = SubSystemConfiguration.getDisconnectingMessage(
- _connection.getHostName(), _connection.getPort());
- monitor.beginTask(message, IProgressMonitor.UNKNOWN);
- try {
- _connection.disconnect(monitor);
- } catch (Exception exc) {
- if (exc instanceof java.lang.reflect.InvocationTargetException)
- throw (java.lang.reflect.InvocationTargetException) exc;
- if (exc instanceof java.lang.InterruptedException)
- throw (java.lang.InterruptedException) exc;
- throw new java.lang.reflect.InvocationTargetException(exc);
- } finally {
- monitor.done();
- }
- }
-
- public Shell getShell() {
- Shell activeShell = SystemBasePlugin.getActiveWorkbenchShell();
- if (activeShell != null) {
- return activeShell;
- }
-
- IWorkbenchWindow window = null;
- try {
- window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- } catch (Exception e) {
- return null;
- }
- if (window == null) {
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench()
- .getWorkbenchWindows();
- if (windows != null && windows.length > 0) {
- return windows[0].getShell();
- }
- } else {
- return window.getShell();
- }
-
- return null;
- }
-
- /**
- * Get the progress monitor dialog for this operation. We try to use one
- * for all phases of a single operation, such as connecting and
- * resolving.
- */
- protected IRunnableContext getRunnableContext(Shell rshell) {
- Shell shell = getShell();
- // for other cases, use statusbar
- IWorkbenchWindow win = SystemBasePlugin.getActiveWorkbenchWindow();
- if (win != null) {
- Shell winShell = RSEUIPlugin.getDefault().getWorkbench()
- .getActiveWorkbenchWindow().getShell();
- if (winShell != null && !winShell.isDisposed()
- && winShell.isVisible()) {
- SystemBasePlugin
- .logInfo("Using active workbench window as runnable context"); //$NON-NLS-1$
- shell = winShell;
- return win;
- } else {
- win = null;
- }
- }
- if (shell == null || shell.isDisposed() || !shell.isVisible()) {
- SystemBasePlugin
- .logInfo("Using progress monitor dialog with given shell as parent"); //$NON-NLS-1$
- shell = rshell;
- }
- IRunnableContext dlg = new ProgressMonitorDialog(rshell);
- return dlg;
- }
-
- /**
- * Show an error message when the disconnection fails. Shows a common
- * message by default. Overridable.
- */
- protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc)
- {
- //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR,shell,RSEUIPlugin.getResourceBundle(),
- // ISystemMessages.MSG_DISCONNECT_FAILED,
- // hostName, exc.getMessage());
- //RSEUIPlugin.logError("Disconnect failed",exc); // temporary
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_FAILED).makeSubstitution(hostName,exc));
- msgDlg.setException(exc);
- msgDlg.open();
- }
-
- /**
- * Show an error message when the user cancels the disconnection.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port)
- {
- //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, RSEUIPlugin.getResourceBundle(),
- // ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_CANCELLED).makeSubstitution(hostName));
- msgDlg.open();
- }
- }
-
- /**
- * Notification from sub-services that our session was lost.
- * Notify all subsystems properly.
- * TODO allow user to try and reconnect?
- */
- public void handleSessionLost() {
- Activator.trace("SshConnectorService: handleSessionLost"); //$NON-NLS-1$
- if (fSessionLostHandler!=null) {
- fSessionLostHandler.sessionLost();
- }
- }
-
- protected static Display getStandardDisplay() {
- Display display = Display.getCurrent();
- if( display==null ) {
- display = Display.getDefault();
- }
- return display;
- }
-
- private static class MyUserInfo implements UserInfo, UIKeyboardInteractive {
- private String fPassphrase;
- private String fPassword;
- private int fAttemptCount;
- private final String fUser;
-
- public MyUserInfo(String user, String password) {
- fUser = user;
- fPassword = password;
- }
- public String getPassword() {
- return fPassword;
- }
- public boolean promptYesNo(final String str) {
- //need to switch to UI thread for prompting
- final boolean[] retval = new boolean[1];
- getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- retval[0] = MessageDialog.openQuestion(null, SshConnectorResources.SshConnectorService_Warning, str);
- }
- });
- return retval[0];
- }
- private String promptSecret(final String message) {
- final String[] retval = new String[1];
- final String finUser = fUser;
- getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- UserValidationDialog uvd = new UserValidationDialog(null, null,
- finUser, message);
- uvd.setUsernameMutable(false);
- if (uvd.open() == Window.OK) {
- retval[0] = uvd.getPassword();
- } else {
- retval[0] = null;
- }
- }
- });
- return retval[0];
- }
- public String getPassphrase() {
- return fPassphrase;
- }
- public boolean promptPassphrase(String message) {
- fPassphrase = promptSecret(message);
- return (fPassphrase!=null);
- }
- public boolean promptPassword(final String message) {
- String _password = promptSecret(message);
- if (_password!=null) {
- fPassword=_password;
- return true;
- }
- return false;
- }
- public void showMessage(final String message) {
- getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(null, SshConnectorResources.SshConnectorService_Info, message);
- }
- });
- }
- public String[] promptKeyboardInteractive(final String destination,
- final String name, final String instruction,
- final String[] prompt, final boolean[] echo)
- {
- if (prompt.length == 0) {
- // No need to prompt, just return an empty String array
- return new String[0];
- }
- try{
- if (fAttemptCount == 0 && fPassword != null && prompt.length == 1 && prompt[0].trim().equalsIgnoreCase("password:")) { //$NON-NLS-1$
- // Return the provided password the first time but always prompt on subsequent tries
- fAttemptCount++;
- return new String[] { fPassword };
- }
- final String[][] finResult = new String[1][];
- getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- KeyboardInteractiveDialog dialog = new KeyboardInteractiveDialog(null,
- null, destination, name, instruction, prompt, echo);
- dialog.open();
- finResult[0]=dialog.getResult();
- }
- });
- String[] result=finResult[0];
- if (result == null)
- return null; // canceled
- if (result.length == 1 && prompt.length == 1 && prompt[0].trim().equalsIgnoreCase("password:")) { //$NON-NLS-1$
- fPassword = result[0];
- }
- fAttemptCount++;
- return result;
- }
- catch(OperationCanceledException e){
- return null;
- }
- }
- /**
- * Callback to indicate that a connection is about to be attempted
- */
- public void aboutToConnect() {
- fAttemptCount = 0;
- }
- /**
- * Callback to indicate that a connection was made
- */
- public void connectionMade() {
- fAttemptCount = 0;
- }
-
- }
-
- public boolean isConnected() {
- if (session!=null) {
- if (session.isConnected()) {
- return true;
- } else if (fSessionLostHandler!=null) {
- Activator.trace("SshConnectorService.isConnected: false -> sessionLost"); //$NON-NLS-1$
- fSessionLostHandler.sessionLost();
- }
- }
- return false;
- }
-
- public boolean hasRemoteServerLauncherProperties() {
- return false;
- }
-
- public boolean supportsRemoteServerLaunching() {
- return false;
- }
-
- public boolean supportsServerLaunchProperties() {
- return false;
- }
-
- /**
- * @return false
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#requiresPassword()
- */
- public boolean requiresPassword() {
- return false;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorServiceManager.java
deleted file mode 100644
index 140763f14..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorServiceManager.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted from LocalConnectorServiceManager.
- ********************************************************************************/
-
-package org.eclipse.rse.connectorservice.ssh;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * ConnectorService manager class.
- *
- * The job of this manager is to manage and return IConnectorService
- * objects. It ensures there is only ever one per unique SystemConnection,
-* so that both the file and cmd subsystems can share the same
-* ConnectorService object.
- */
-public class SshConnectorServiceManager extends AbstractConnectorServiceManager {
-
- private static SshConnectorServiceManager fInstance;
-
- private SshConnectorServiceManager() {
- super();
- }
-
- /**
- * Return singleton instance of this class
- * @return the singleton instance
- */
- public static SshConnectorServiceManager getInstance()
- {
- if (fInstance == null)
- fInstance = new SshConnectorServiceManager();
- return fInstance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.model.IHost)
- */
- public IConnectorService createConnectorService(IHost host) {
- IConnectorService service = new SshConnectorService(host);
- return service;
- }
-
- public boolean sharesSystem(ISubSystem otherSubSystem) {
- return (otherSubSystem instanceof ISshSubSystem);
- }
-
- public Class getSubSystemCommonInterface(ISubSystem subsystem) {
- return ISshSubSystem.class;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/UserValidationDialog.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/UserValidationDialog.java
deleted file mode 100644
index e9928319e..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/UserValidationDialog.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Martin Oberhuber (Wind River) - copied from org.eclipse.team.cvs.ui
- *******************************************************************************/
-package org.eclipse.rse.connectorservice.ssh;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-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;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for prompting for a username and password
- */
-public class UserValidationDialog extends TrayDialog {
- // widgets
- protected Text usernameField;
- protected Text passwordField;
- protected Button allowCachingButton;
-
- protected String domain;
- protected String defaultUsername;
- protected String password = null;
- protected boolean allowCaching = false;
- protected Image keyLockImage;
-
- // whether or not the username can be changed
- protected boolean isUsernameMutable = true;
- protected String username = null;
- protected String message = null;
-
- /**
- * Creates a new UserValidationDialog.
- *
- * @param parentShell the parent shell
- * @param location the location
- * @param defaultName the default user name
- * @param message a mesage to display to the user
- */
- public UserValidationDialog(Shell parentShell, String location, String defaultName, String message) {
- super(parentShell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.defaultUsername = defaultName;
- this.domain = location;
- this.message = message;
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(SshConnectorResources.UserValidationDialog_required);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, ISshConstants.HELP_USER_VALIDATION_DIALOG);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
- // add some default values
- usernameField.setText(defaultUsername);
-
- if (isUsernameMutable) {
- // give focus to username field
- usernameField.selectAll();
- usernameField.setFocus();
- } else {
- usernameField.setEditable(false);
- passwordField.setFocus();
- }
- }
-
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
-
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite imageComposite = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- imageComposite.setLayout(layout);
- imageComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-
- Composite main = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label imageLabel = new Label(imageComposite, SWT.NONE);
- keyLockImage = Activator.getImageDescriptor(ISshConstants.IMG_KEY_LOCK).createImage();
- imageLabel.setImage(keyLockImage);
- GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- imageLabel.setLayoutData(data);
-
- if (message != null) {
- Label messageLabel = new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- data.widthHint = 300;
- messageLabel.setLayoutData(data);
- }
- if (domain != null) {
- Label d = new Label(main, SWT.WRAP);
- d.setText(SshConnectorResources.UserValidationDialog_5);
- data = new GridData();
- d.setLayoutData(data);
- Label label = new Label(main, SWT.WRAP);
- if (isUsernameMutable) {
- label.setText(NLS.bind(SshConnectorResources.UserValidationDialog_labelUser, new String[] { domain }));
- } else {
- label.setText(NLS.bind(SshConnectorResources.UserValidationDialog_labelPassword, (new Object[]{defaultUsername, domain})));
- }
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 300;
- label.setLayoutData(data);
- }
- createUsernameFields(main);
- createPasswordFields(main);
-
- if(domain != null) {
- allowCachingButton = new Button(main, SWT.CHECK);
- allowCachingButton.setText(SshConnectorResources.UserValidationDialog_6);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- allowCachingButton.setLayoutData(data);
- allowCachingButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- allowCaching = allowCachingButton.getSelection();
- }
- });
- Composite warningComposite = new Composite(main, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- warningComposite.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- warningComposite.setLayoutData(data);
- Label warningLabel = new Label(warningComposite, SWT.NONE);
- warningLabel.setImage(getImage(DLG_IMG_MESSAGE_WARNING));
- warningLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
- Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(SshConnectorResources.UserValidationDialog_7);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- warningText.setLayoutData(data);
- }
-
- Dialog.applyDialogFont(parent);
-
- return main;
- }
-
- /**
- * Creates the three widgets that represent the password entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(SshConnectorResources.UserValidationDialog_password);
-
- passwordField = new Text(parent, SWT.BORDER | SWT.PASSWORD);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- passwordField.setLayoutData(data);
- }
- /**
- * Creates the three widgets that represent the user name entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createUsernameFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(SshConnectorResources.UserValidationDialog_user);
-
- usernameField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
- }
-
- /**
- * Returns the password entered by the user, or null
- * if the user canceled.
- *
- * @return the entered password
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * Returns the username entered by the user, or null
- * if the user canceled.
- *
- * @return the entered username
- */
- public String getUsername() {
- return username;
- }
-
- /**
- * Returns <code>true</code> if the save password checkbox was selected.
- * @return <code>true</code> if the save password checkbox was selected and <code>false</code>
- * otherwise.
- */
- public boolean getAllowCaching() {
- return allowCaching;
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- password = passwordField.getText();
- username = usernameField.getText();
-
- super.okPressed();
- }
- /**
- * Sets whether or not the username field should be mutable.
- * This method must be called before create(), otherwise it
- * will be ignored.
- *
- * @param value whether the username is mutable
- */
- public void setUsernameMutable(boolean value) {
- isUsernameMutable = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#close()
- */
- public boolean close() {
- if(keyLockImage != null) {
- keyLockImage.dispose();
- }
- return super.close();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/.classpath b/rse/plugins/org.eclipse.rse.core/.classpath
deleted file mode 100644
index ce000e2b1..000000000
--- a/rse/plugins/org.eclipse.rse.core/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="persistence"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.core/.cvsignore b/rse/plugins/org.eclipse.rse.core/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.core/.project b/rse/plugins/org.eclipse.rse.core/.project
deleted file mode 100644
index c2582431c..000000000
--- a/rse/plugins/org.eclipse.rse.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs b/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 40380a91e..000000000
--- a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Dec 08 11:30:09 CST 2006
-eclipse.preferences.version=1
-encoding//persistence/org/eclipse/rse/internal/persistence/messages.properties=8859_1
diff --git a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index cc610977e..000000000
--- a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Fri Dec 08 11:38:30 CST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.4
diff --git a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.ui.prefs b/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5743d38d0..000000000
--- a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Dec 08 11:38:30 CST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
diff --git a/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 10207401d..000000000
--- a/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.core;singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.rse.core.RSECorePlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.rse.logging,
- org.eclipse.rse.services
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.core,
- org.eclipse.rse.core.filters,
- org.eclipse.rse.core.model,
- org.eclipse.rse.core.persistance,
- org.eclipse.rse.core.references,
- org.eclipse.rse.core.subsystems,
- org.eclipse.rse.internal.references,
- org.eclipse.rse.persistence,
- org.eclipse.rse.persistence.dom
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.core/about.html b/rse/plugins/org.eclipse.rse.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/about.ini b/rse/plugins/org.eclipse.rse.core/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.core/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/about.mappings b/rse/plugins/org.eclipse.rse.core/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.core/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/about.properties b/rse/plugins/org.eclipse.rse.core/about.properties
deleted file mode 100644
index 571fd660d..000000000
--- a/rse/plugins/org.eclipse.rse.core/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer Core\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/build.properties b/rse/plugins/org.eclipse.rse.core/build.properties
deleted file mode 100644
index fabd11b67..000000000
--- a/rse/plugins/org.eclipse.rse.core/build.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- plugin.properties,\
- about.properties,\
- about.html,\
- .,\
- schema/,\
- about.ini,\
- about.mappings,\
- eclipse32.png
-source.. = src/,\
- persistence/
-output.. = bin/
-
-javacSource=1.4
-javacTarget=1.4
diff --git a/rse/plugins/org.eclipse.rse.core/eclipse32.png b/rse/plugins/org.eclipse.rse.core/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.core/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/Messages.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/Messages.java
deleted file mode 100644
index a33c0db3f..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/Messages.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial API and implementation
- ********************************************************************************/
-package org.eclipse.rse.internal.persistence;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.persistence.messages"; //$NON-NLS-1$
- public static String PropertyFileProvider_LoadingTaskName;
- public static String PropertyFileProvider_SavingTaskName;
- public static String PropertyFileProvider_UnexpectedException;
- public static String RSEPersistenceManager_DeleteProfileJobName;
- public static String SaveRSEDOMJob_SavingProfileJobName;
- public static String SerializingProvider_UnexpectedException;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/PropertyFileProvider.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/PropertyFileProvider.java
deleted file mode 100644
index d1fd7eb64..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/PropertyFileProvider.java
+++ /dev/null
@@ -1,832 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed the initial implementation:
- * David McKnight, David Dykstal.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.internal.persistence;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.Vector;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.IRSEDOMConstants;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-import org.eclipse.rse.persistence.dom.RSEDOMNode;
-import org.eclipse.rse.persistence.dom.RSEDOMNodeAttribute;
-
-/**
- * This is class is used to restore an RSE DOM from disk and import it into RSE.
- * It stores the DOM as a tree of folders and .properties files.
- */
-public class PropertyFileProvider implements IRSEPersistenceProvider {
-
- private static final String NULL_VALUE_STRING = "null"; //$NON-NLS-1$
- private static final String PROPERTIES_FILE_NAME = "node.properties"; //$NON-NLS-1$
-
- /*
- * Metatype names
- * each entry is an array. The first is the preferred name.
- * The other names are acceptable alternates.
- * Names must not contain periods or whitespace.
- * Lowercase letters, numbers and dashes (-) are preferred.
- */
- private static final String[] MT_ATTRIBUTE_TYPE = new String[] {"04-attr-type", "attr-type"}; //$NON-NLS-1$ //$NON-NLS-2$
- private static final String[] MT_ATTRIBUTE = new String[] {"03-attr", "attr"}; //$NON-NLS-1$ //$NON-NLS-2$
- private static final String[] MT_CHILD = new String[] {"06-child", "child"}; //$NON-NLS-1$ //$NON-NLS-2$
- private static final String[] MT_NODE_TYPE = new String[] {"01-type", "01-node-type", "n-type"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String[] MT_NODE_NAME = new String[] {"00-name", "00-node-name", "n-name"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String[] MT_REFERENCE = new String[] {"05-ref", "ref"}; //$NON-NLS-1$ //$NON-NLS-2$
-
- /* Type abbreviations */
- private static final String AB_SUBSYSTEM = "SS"; //$NON-NLS-1$
- private static final String AB_SERVICE_LAUNCHER = "SL"; //$NON-NLS-1$
- private static final String AB_PROPERTY_SET = "PS"; //$NON-NLS-1$
- private static final String AB_PROPERTY = "P"; //$NON-NLS-1$
- private static final String AB_HOST = "H"; //$NON-NLS-1$
- private static final String AB_FILTER_STRING = "FS"; //$NON-NLS-1$
- private static final String AB_FILTER_POOL_REFERENCE = "FPR"; //$NON-NLS-1$
- private static final String AB_FILTER_POOL = "FP"; //$NON-NLS-1$
- private static final String AB_FILTER = "F"; //$NON-NLS-1$
- private static final String AB_CONNECTOR_SERVICE = "CS"; //$NON-NLS-1$
- private static final String AB_PROFILE = "PRF"; //$NON-NLS-1$
-
- private Pattern period = Pattern.compile("\\."); //$NON-NLS-1$
- private Pattern suffixPattern = Pattern.compile("_(\\d+)$"); //$NON-NLS-1$
- private Pattern unicodePattern = Pattern.compile("#(\\p{XDigit}+)#"); //$NON-NLS-1$
-
- private Map typeQualifiers = getTypeQualifiers();
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getSavedProfileNames()
- */
- public String[] getSavedProfileNames() {
- List names = new Vector(10);
- IFolder providerFolder = getProviderFolder();
- try {
- IResource[] profileCandidates = providerFolder.members();
- for (int i = 0; i < profileCandidates.length; i++) {
- IResource profileCandidate = profileCandidates[i];
- if (profileCandidate.getType() == IResource.FOLDER) {
- String candidateName = profileCandidate.getName();
- String[] parts = split(candidateName, 2);
- if (parts[0].equals(AB_PROFILE)) {
- String name = thaw(parts[1]);
- names.add(name);
- }
- }
- }
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- String[] result = new String[names.size()];
- names.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#saveRSEDOM(org.eclipse.rse.persistence.dom.RSEDOM, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean saveRSEDOM(RSEDOM dom, IProgressMonitor monitor) {
- IFolder providerFolder = getProviderFolder();
- try {
- int n = countNodes(dom);
- if (monitor != null) monitor.beginTask(Messages.PropertyFileProvider_SavingTaskName, n);
- saveNode(dom, providerFolder, monitor);
- if (monitor != null) monitor.done();
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#deleteProfile(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus deleteProfile(String profileName, IProgressMonitor monitor) {
- IStatus result = Status.OK_STATUS;
- IFolder profileFolder = getProfileFolder(profileName);
- if (profileFolder.exists()) {
- try {
- profileFolder.delete(IResource.FORCE, monitor);
- } catch (CoreException e) {
- result = new Status(IStatus.ERROR, null, 0, Messages.PropertyFileProvider_UnexpectedException, e);
- }
- }
- return result;
- }
-
-
- /**
- * Saves a node from the DOM to the file system.
- * @param node The node to save.
- * @param parentFolder The folder in which to save this node. The node will be a
- * subfolder of this folder.
- * @param monitor The progress monitor. If the monitor has been cancel then
- * this method will do nothing and return null.
- * @return The name of the folder saving this node. Can be used for constructing
- * references to children. May return null if the monitor has been canceled.
- */
- private String saveNode(RSEDOMNode node, IFolder parentFolder, IProgressMonitor monitor) {
- if (monitor != null && monitor.isCanceled()) return null;
- String nodeFolderName = getSaveFolderName(node);
- IFolder nodeFolder = getFolder(parentFolder, nodeFolderName);
- Properties properties = getProperties(node, false, monitor);
- RSEDOMNode[] children = node.getChildren();
- Set childFolderNames = new HashSet();
- for (int i = 0; i < children.length; i++) {
- RSEDOMNode child = children[i];
- String index = getIndexString(i);
- if (!isNodeEmbedded(child)) {
- String key = combine(MT_REFERENCE[0], index);
- String childFolderName = saveNode(child, nodeFolder, monitor);
- if (childFolderName != null) properties.put(key, childFolderName);
- childFolderNames.add(childFolderName);
- }
- }
- removeFolders(nodeFolder, childFolderNames);
- String propertiesFileName = PROPERTIES_FILE_NAME;
- IFile propertiesFile = nodeFolder.getFile(propertiesFileName);
- writeProperties(properties, "RSE DOM Node", propertiesFile); //$NON-NLS-1$
- return nodeFolderName;
- }
-
- /**
- * Removes childFolders from the parent folder that are not in the keep set.
- * Typically used to clean renamed nodes from the tree on a save operation.
- * @param parentFolder The folder whose subfolders are to be examined.
- * @param keepSet The names of the folders that should be kept. Others are discarded.
- */
- private void removeFolders(IFolder parentFolder, Set keepSet) {
- try {
- IResource[] children = parentFolder.members();
- for (int i = 0; i < children.length; i++) {
- IResource child = children[i];
- if (child.getType() == IResource.FOLDER) {
- String childFolderName = child.getName();
- if (!keepSet.contains(childFolderName)) {
- child.delete(true, null);
- }
- }
- }
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- /**
- * Returns the name of a folder that can be used to store a node of a particular
- * type. Since this is a folder, its name must conform to the rules of the file
- * system. The names are derived from the name and type of the node. Note that the
- * actual name of the node is also stored as a property so we need not attempt
- * to recover the node name from the folder name.
- * @param node The node that will eventually be stored in this folder.
- * @return The name of the folder to store this node.
- */
- private String getSaveFolderName(RSEDOMNode node) {
- String type = node.getType();
- type = (String) typeQualifiers.get(type);
- String name = node.getName();
- name = freeze(name);
- String result = combine(type, name);
- return result;
- }
-
- private static final String VALID = "abcdefghijklmnopqrstuvwxyz0123456789-._"; //$NON-NLS-1$
- private static final String UPPER = "ABCDEFGHIJKLMNOPQRTSUVWXYZ"; //$NON-NLS-1$
- /**
- * Transforms an arbitrary name into one that can be used in any file system
- * that supports long names. The transformation appends a number to the name
- * that captures the case of the letters in the name. If a character falls
- * outside the range of understood characters, it is converted to its hexadecimal unicode
- * equivalent. Spaces are converted to underscores.
- * @param name The name to be transformed
- * @return The transformed name
- * @see #thaw(String)
- */
- private String freeze(String name) {
- int p = name.indexOf(':');
- if (p >= 0) {
- name = name.substring(p + 1);
- }
- StringBuffer buf = new StringBuffer(name.length());
- char[] chars = name.toCharArray();
- long suffix = 0;
- for (int i = 0; i < chars.length; i++) {
- char c = chars[i];
- suffix *= 2;
- if (VALID.indexOf(c) >= 0) {
- buf.append(c);
- } else if (UPPER.indexOf(c) >= 0) { // if uppercase
- buf.append(Character.toLowerCase(c));
- suffix += 1;
- } else if (c == ' ') { // if space
- buf.append('_');
- suffix += 1;
- } else { // if out of range
- buf.append('#');
- buf.append(Integer.toHexString(c));
- buf.append('#');
- }
- }
- name = buf.toString() + "_" + Long.toString(suffix); //$NON-NLS-1$
- return name;
- }
-
- /**
- * Recovers an arbitrary name from its frozen counterpart.
- * @param name The name to be transformed
- * @return The transformed name
- * @see #freeze(String)
- */
- private String thaw(String name) {
- String result = name;
- Matcher m = suffixPattern.matcher(name);
- if (m.find()) {
- String root = name.substring(0, m.start());
- String suffix = m.group(1);
- long caseCode = Long.parseLong(suffix);
- root = thawUnicode(root);
- root = thawCase(root, caseCode);
- result = root;
- }
- return result;
- }
-
- private String thawUnicode(String name) {
- Matcher m = unicodePattern.matcher(name);
- StringBuffer b = new StringBuffer();
- int p0 = 0;
- while (m.find()) {
- int p1 = m.start();
- String chunk0 = name.substring(p0, p1);
- String digits = m.group(1);
- int codePoint = Integer.valueOf(digits, 16).intValue();
- char ch = (char) codePoint;
- String chunk1 = Character.toString(ch);
- b.append(chunk0);
- b.append(chunk1);
- p0 = m.end();
- }
- b.append(name.substring(p0));
- String result = b.toString();
- return result;
- }
-
- private String thawCase(String name, long caseCode) {
- StringBuffer b = new StringBuffer();
- char[] chars = name.toCharArray();
- for (int i = chars.length - 1; i >= 0; i--) {
- char ch = chars[i];
- boolean shift = (caseCode & 1L) == 1;
- if (shift) {
- ch = (ch == '_') ? ' ' : Character.toUpperCase(ch);
- }
- b.append(ch);
- caseCode = caseCode >> 1;
- }
- String result = b.reverse().toString();
- return result;
- }
-
- private Map getTypeQualifiers() {
- Map typeQualifiers = new HashMap();
- typeQualifiers.put(IRSEDOMConstants.TYPE_CONNECTOR_SERVICE, AB_CONNECTOR_SERVICE);
- typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER, AB_FILTER);
- typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER_POOL, AB_FILTER_POOL);
- typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER_POOL_REFERENCE, AB_FILTER_POOL_REFERENCE);
- typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER_STRING, AB_FILTER_STRING);
- typeQualifiers.put(IRSEDOMConstants.TYPE_HOST, AB_HOST);
- typeQualifiers.put(IRSEDOMConstants.TYPE_PROFILE, AB_PROFILE);
- typeQualifiers.put(IRSEDOMConstants.TYPE_PROPERTY, AB_PROPERTY);
- typeQualifiers.put(IRSEDOMConstants.TYPE_PROPERTY_SET, AB_PROPERTY_SET);
- typeQualifiers.put(IRSEDOMConstants.TYPE_SERVER_LAUNCHER, AB_SERVICE_LAUNCHER);
- typeQualifiers.put(IRSEDOMConstants.TYPE_SUBSYSTEM, AB_SUBSYSTEM);
- return typeQualifiers;
- }
-
- /**
- * Write a set of properties to a file.
- * @param properties The Properties object to write.
- * @param header The header to include in the properties file.
- * @param file The IFile which will contain the properties.
- * @param monitor The progress monitor.
- */
- private void writeProperties(Properties properties, String header, IFile file) {
-// System.out.println("writing "+file.getFullPath()+"...");
- ByteArrayOutputStream outStream = new ByteArrayOutputStream(500);
- PrintWriter out = new PrintWriter(outStream);
- out.println("# " + header); //$NON-NLS-1$
- Map map = new TreeMap(properties);
- Set keys = map.keySet();
-
- for (Iterator z = keys.iterator(); z.hasNext();) {
- String key = (String) z.next();
- String value = (String)map.get(key);
- String keyvalue = key + "=" + escapeValue(value); //$NON-NLS-1$
-// System.out.println("writing "+keyvalue);
- out.println(keyvalue);
- }
- out.close();
-// System.out.println("...wrote "+file.getFullPath());
- ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
- try {
- if (!file.exists()) {
- file.create(inStream, true, null);
- } else {
- file.setContents(inStream, true, true, null);
- }
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- /**
- * Tests if a node's definition should be embedded in its parent's definition or
- * if it should be a separate definition. The test is usually based on node type.
- * Currently only filter strings are embedded in their parent filter definition.
- * @param node The node to be tested.
- * @return true if the node is to be embedded.
- */
- private boolean isNodeEmbedded(RSEDOMNode node) {
- Set embeddedTypes = new HashSet();
- embeddedTypes.add(IRSEDOMConstants.TYPE_FILTER);
- embeddedTypes.add(IRSEDOMConstants.TYPE_CONNECTOR_SERVICE);
- boolean result = embeddedTypes.contains(node.getType());
- return result;
- }
-
- /**
- * Transforms an integer into its five digit counterpart complete with leading
- * zeroes.
- * @param i an integer from 0 to 99999.
- * @return a string equivalent from "00000" to "99999"
- */
- private String getIndexString(int i) {
- assert (i >= 0 && i <=99999);
- String index = "00000" + Integer.toString(i); //$NON-NLS-1$
- index = index.substring(index.length() - 5);
- return index;
- }
-
- /**
- * "Fixes" a value. Values in Properties objects may not be null. Changes all
- * null values to the string "null" and escapes the characters in other values.
- * @param value The value to check.
- * @return The fixed value
- */
- private String fixValue(String value) {
- if (value == null) return NULL_VALUE_STRING;
- return value;
- }
-
- /**
- * Escapes the characters in the supplied string according to the rules
- * for properties files.
- * @param value The value to examine.
- * @return The equivalent value with escapes.
- */
- private String escapeValue(String value) {
- StringBuffer buffer = new StringBuffer(value.length() + 20);
- char[] characters = value.toCharArray();
- for (int i = 0; i < characters.length; i++) {
- char c = characters[i];
- if (c == '\\') {
- buffer.append("\\\\"); //$NON-NLS-1$
- } else if (c == '\t') {
- buffer.append("\\t"); //$NON-NLS-1$
- } else if (c == '\f') {
- buffer.append("\\f"); //$NON-NLS-1$
- } else if (c == '\n') {
- buffer.append("\\n"); //$NON-NLS-1$
- } else if (c == '\r') {
- buffer.append("\\r"); //$NON-NLS-1$
- } else if ((c < '\u0020' && c > '\u007E')) {
- String cString = "0000" + Integer.toHexString(c); //$NON-NLS-1$
- cString = cString.substring(cString.length() - 4);
- cString = "\\u" + cString; //$NON-NLS-1$
- buffer.append(cString);
- } else if ("=!#:".indexOf(c) >= 0) { //$NON-NLS-1$
- buffer.append('\\');
- buffer.append(c);
- } else {
- buffer.append(c);
- }
- }
- return buffer.toString();
- }
-
- /**
- * Constructs a properties object containing all the properties for this node.
- * The following properties exist:
- * name property, type property, embedded child properties, and referenced
- * child properties. Each property has its own key format in the Properties
- * object.
- * @param node The node to extract the properties from.
- * @param force Force children to be embedded rather than reference.
- * @param monitor The progress monitor. The work count is increased by one each time
- * this method is invoked.
- * @return The Properties object containing that node definition.
- */
- private Properties getProperties(RSEDOMNode node, boolean force, IProgressMonitor monitor) {
- Properties properties = new Properties();
- properties.put(MT_NODE_NAME[0], node.getName());
- properties.put(MT_NODE_TYPE[0], node.getType());
- properties.putAll(getAttributes(node));
- RSEDOMNode[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- RSEDOMNode child = children[i];
- String index = getIndexString(i);
- if (force || isNodeEmbedded(child)) {
- String prefix = combine(MT_CHILD[0], index);
- Properties childProperties = getProperties(child, true, monitor);
- Enumeration e = childProperties.keys();
- while (e.hasMoreElements()) {
- String key = (String) e.nextElement();
- String value = childProperties.getProperty(key);
- String newKey = combine(prefix, key);
- properties.put(newKey, value);
- }
- }
- }
- if (monitor != null) monitor.worked(1);
- return properties;
- }
-
- /**
- * Constructs a Properties object from the attributes present in a DOM node.
- * @param node The node containing the attributes. Keys for attributes are of the
- * form "attribute.[attribute-name]". If the attribute has a type then there
- * will also be an "attribute-type.[attribute-name]" property.
- * [attribute-name] may contain periods but must not be null.
- * @return The newly constructed Properties object.
- */
- private Properties getAttributes(RSEDOMNode node) {
- Properties properties = new Properties();
- RSEDOMNodeAttribute[] attributes = node.getAttributes();
- for (int i = 0; i < attributes.length; i++) {
- RSEDOMNodeAttribute attribute = attributes[i];
- String attributeName = attribute.getKey();
- String propertyKey = combine(MT_ATTRIBUTE[0], attributeName);
- properties.put(propertyKey, fixValue(attribute.getValue()));
- String attributeType = attribute.getType();
- if (attributeType != null) {
- propertyKey = combine(MT_ATTRIBUTE_TYPE[0], attributeName);
- properties.put(propertyKey, attributeType);
- }
- }
- return properties;
- }
-
- /**
- * Count the number of nodes in a tree rooted in the supplied node. The
- * supplied node is counted so the mininum result is one.
- * @param node The root of the tree.
- * @return The node count.
- */
- private int countNodes(RSEDOMNode node) {
- RSEDOMNode[] children = node.getChildren();
- int result = 1;
- for (int i = 0; i < children.length; i++) {
- RSEDOMNode child = children[i];
- result += countNodes(child);
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#loadRSEDOM(org.eclipse.rse.model.ISystemProfileManager, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public RSEDOM loadRSEDOM(String profileName, IProgressMonitor monitor) {
- RSEDOM dom = null;
- IFolder profileFolder = getProfileFolder(profileName);
- if (profileFolder.exists()) {
- //System.out.println("loading from " + profileFolder.getFullPath().toString() + "...");
- int n = countPropertiesFiles(profileFolder);
- if (monitor != null) monitor.beginTask(Messages.PropertyFileProvider_LoadingTaskName, n);
- dom = (RSEDOM) loadNode(null, profileFolder, monitor);
- if (monitor != null) monitor.done();
- } else {
- //System.out.println(profileFolder.getFullPath().toString() + " does not exist.");
- }
- return dom;
- }
-
- /**
- * Counts the number of properties files in this folder and below. This provides
- * a lower bound to the number of nodes that have to be created from this
- * persistent form of a DOM.
- * @param folder
- * @return the number of properties files found.
- */
- private int countPropertiesFiles(IFolder folder) {
- int result = 0;
- IFile propertiesFile = folder.getFile(PROPERTIES_FILE_NAME);
- if (propertiesFile.exists()) {
- result += 1;
- try {
- IResource[] members = folder.members();
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- if (member.getType() == IResource.FOLDER) {
- IFolder childFolder = (IFolder) member;
- result += countPropertiesFiles(childFolder);
- }
- }
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return result;
- }
-
- /**
- * Loads a node from a folder.
- * @param parent The parent of the node to be created. If null then this node is assumed to
- * be a DOM root node (RSEDOM).
- * @param nodeFolder The folder in which the node.properties file of this node is found.
- * @param monitor The monitor used to report progress and cancelation. If the monitor is
- * in canceled state then it this does method does nothing and returns null. If the monitor
- * is not canceled then its work count is incremented by one.
- * @return The newly loaded node.
- */
- private RSEDOMNode loadNode(RSEDOMNode parent, IFolder nodeFolder, IProgressMonitor monitor) {
- RSEDOMNode node = null;
- if (monitor == null || !monitor.isCanceled()) {
- Properties properties = loadProperties(nodeFolder);
- if (properties != null) {
- node = makeNode(parent, nodeFolder, properties, monitor);
- }
- if (monitor != null) monitor.worked(1);
- }
- return node;
- }
-
- /**
- * Loads the properties found in the folder. Returns null if no properties
- * file was found.
- * @param folder The folder in which to look for properties.
- * @return The Properties object.
- */
- private Properties loadProperties(IFolder folder) {
- Properties properties = null;
- IFile attributeFile = folder.getFile(PROPERTIES_FILE_NAME);
- if (attributeFile.exists()) {
- properties = new Properties();
- try {
- InputStream inStream = attributeFile.getContents();
- try {
- properties.load(inStream);
- inStream.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return properties;
- }
-
- /**
- * Makes a new RSEDOMNode from a set of properties. The properties must (at least) include
- * a "name" property and a "type" property. Any child nodes are created and attached as well.
- * @param parent The parent node of the node to be created.
- * @param nodeFolder The folder in which referenced child folders can be found. This will
- * almost always be the folder in which the properties for the node to be created were found.
- * @param properties The properties from which to create the node.
- * @param monitor a monitor to support cancelation and progress reporting.
- * @return the newly created DOM node and its children.
- */
- private RSEDOMNode makeNode(RSEDOMNode parent, IFolder nodeFolder, Properties properties, IProgressMonitor monitor) {
- String nodeType = getProperty(properties, MT_NODE_TYPE);
- String nodeName = getProperty(properties, MT_NODE_NAME);
- RSEDOMNode node = (parent == null) ? new RSEDOM(nodeName) : new RSEDOMNode(parent, nodeType, nodeName);
- node.setRestoring(true);
- Set keys = properties.keySet();
- Map attributes = new HashMap();
- Map attributeTypes = new HashMap();
- Map childPropertiesMap = new HashMap();
- Set childNames = new TreeSet(); // child names are 5 digit strings, a tree set is used to maintain ordering
- Set referenceKeys = new TreeSet(); // ditto for reference keys, "<reference-metatype>.<index>"
- // since the properties are in no particular order, we make a first pass to gather info on what's there
- for (Iterator z = keys.iterator(); z.hasNext();) {
- String key = (String) z.next();
- String[] words = split(key, 2);
- String metatype = words[0];
- if (find(metatype, MT_ATTRIBUTE)) {
- String value = properties.getProperty(key);
- attributes.put(words[1], value);
- } else if (find(metatype, MT_ATTRIBUTE_TYPE)) {
- String type = properties.getProperty(key);
- attributeTypes.put(words[1], type);
- } else if (find(metatype, MT_REFERENCE)) {
- referenceKeys.add(key);
- } else if (find(metatype, MT_CHILD)) {
- String value = properties.getProperty(key);
- words = split(words[1], 2);
- String childName = words[0];
- childNames.add(childName);
- String newKey = words[1];
- Properties p = getProperties(childPropertiesMap, childName);
- p.put(newKey, value);
- }
- }
- Set attributeNames = attributes.keySet();
- for (Iterator z = attributeNames.iterator(); z.hasNext();) {
- String attributeName = (String) z.next();
- String attributeValue = (String) attributes.get(attributeName);
- if (attributeValue.equals(NULL_VALUE_STRING)) attributeValue = null;
- String attributeType = (String) attributeTypes.get(attributeName);
- node.addAttribute(attributeName, attributeValue, attributeType);
- }
- for (Iterator z = childNames.iterator(); z.hasNext();) {
- String childName = (String) z.next();
- Properties p = getProperties(childPropertiesMap, childName);
- makeNode(node, nodeFolder, p, monitor);
- }
- for (Iterator z = referenceKeys.iterator(); z.hasNext();) {
- String key = (String) z.next();
- String childFolderName = properties.getProperty(key);
- IFolder childFolder = getFolder(nodeFolder, childFolderName);
- loadNode(node, childFolder, monitor);
- }
- node.setRestoring(false);
- return node;
- }
-
- /**
- * Gets a property given a "multi-key"
- * @param properties The properties object to search
- * @param keys the "multi-key" for that property
- * @return The first property found using one of the elements of the multi-key.
- */
- private String getProperty(Properties properties, String[] keys) {
- String result = null;
- for (int i = 0; i < keys.length && result == null; i++) {
- String key = keys[i];
- result = properties.getProperty(key);
- }
- return result;
- }
-
- /**
- * Finds a key (needle) in an array of values (the haystack)
- * @param needle The value to look for
- * @param haystack the values to search
- * @return true if the value was found
- */
- private boolean find(String needle, String[] haystack) {
- for (int i = 0; i < haystack.length; i++) {
- String value = haystack[i];
- if (value.equals(needle)) return true;
- }
- return false;
- }
-
- /**
- * Returns a Properties object from the given Map that holds them using the
- * selector String. Creates a new Properties object and places it in the map
- * if one does not exist for the selector.
- * @param propertiesMap The map in which to look for Properties objects.
- * @param selector The name of the Properties object
- * @return a Properties object.
- */
- private Properties getProperties(Map propertiesMap, String selector) {
- Properties p = (Properties)propertiesMap.get(selector);
- if (p == null) {
- p = new Properties();
- propertiesMap.put(selector, p);
- }
- return p;
- }
-
- /**
- * Returns the IFolder in which this persistence provider stores its profiles.
- * This will create the folder if the folder was not found.
- * @return The folder that was created or found.
- */
- private IFolder getProviderFolder() {
- IProject project = RSEPersistenceManager.getRemoteSystemsProject();
- try {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception e) {
- }
- //IFolder providerFolder = getFolder(project, "org.eclipse.rse.dom.properties");
- IFolder providerFolder = getFolder(project, "dom.properties"); //$NON-NLS-1$
- return providerFolder;
- }
-
-
- /**
- * Returns the IFolder in which a profile is stored.
- * @return The folder that was created or found.
- */
- private IFolder getProfileFolder(String profileName) {
- String profileFolderName = combine(AB_PROFILE, freeze(profileName));
- IFolder providerFolder = getProviderFolder();
- IFolder profileFolder = getFolder(providerFolder, profileFolderName);
- return profileFolder;
- }
-
- /**
- * Returns the specified folder of the parent container. If the folder does
- * not exist it creates it.
- * @param parent the parent container - typically a project or folder
- * @param name the name of the folder to find or create
- * @return the found or created folder
- */
- private IFolder getFolder(IContainer parent, String name) {
- IPath path = new Path(name);
- IFolder folder = parent.getFolder(path);
- if (!folder.exists()) {
- try {
- folder.create(IResource.NONE, true, null);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return folder;
- }
-
- /**
- * Convenience method to combine two names into one. The individual names in the
- * combined name are separated by periods.
- * @param typeName The first name.
- * @param nodeName The second name
- * @return the combined name.
- */
- private String combine(String typeName, String nodeName) {
- return combine(new String[] {typeName, nodeName});
- }
-
- /**
- * The generic method for creating a qualified name from a string of segments.
- * The individual names are separated by periods.
- * @param names The names to combine
- * @return The combined name.
- */
- private String combine(String[] names) {
- StringBuffer buf = new StringBuffer(100);
- for (int i = 0; i < names.length; i++) {
- String name = names[i];
- if (i > 0) buf.append('.');
- buf.append(name);
- }
- return buf.toString();
- }
-
- /**
- * Splits a combined name into its component parts. The period is used as the name
- * separator. If a limit > 0 is specified the return value will contain at most that
- * number of segments. The last segment may, in fact, be split some more.
- * @param longName The name to be split
- * @param limit The number of parts to split the name into.
- * @return The parts of the name.
- */
- private String[] split(String longName, int limit) {
- return period.split(longName, limit);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java
deleted file mode 100644
index 1c3d37e42..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.SystemFilterPoolManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemHostPool;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.persistence.dom.RSEDOMExporter;
-import org.eclipse.rse.internal.persistence.dom.RSEDOMImporter;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-
-/**
- * The persistence manager controls all aspects of persisting the RSE data model. It will both
- * save and restore this model. There should be only persistence manager in existence. This instance
- * can be retrieved using RSEUIPlugin.getThePersistenceManager.
- * @see RSECorePlugin#getThePersistenceManager()
- */
-public class RSEPersistenceManager implements IRSEPersistenceManager {
-
- private static final int STATE_NONE = 0;
- private static final int STATE_IMPORTING = 1;
- private static final int STATE_EXPORTING = 2;
-
- private Map loadedProviders = new HashMap(10);
- private int _currentState = STATE_NONE;
- private RSEDOMExporter _exporter;
- private RSEDOMImporter _importer;
-
- private static IProject remoteSystemsProject = null;
- public static final String RESOURCE_PROJECT_NAME = "RemoteSystemsConnections"; //$NON-NLS-1$
-
-// private ISystemRegistry _registry;
- private ISystemProfileManager _profileManager;
-
- public RSEPersistenceManager(ISystemRegistry registry)
- {
-// _registry = registry;
- _profileManager = registry.getSystemProfileManager();
- _exporter = RSEDOMExporter.getInstance();
- _exporter.setSystemRegistry(registry);
- _importer = RSEDOMImporter.getInstance();
- _importer.setSystemRegistry(registry);
- }
-
- /**
- * Get the default remote systems project.
- * @return IProject handle of the project. Use exists() to test existence.
- */
- public static IProject getRemoteSystemsProject()
- {
- if (remoteSystemsProject == null)
- {
- remoteSystemsProject = ResourcesPlugin.getWorkspace().getRoot().getProject(RESOURCE_PROJECT_NAME);
- }
- return remoteSystemsProject;
- }
-
- public void registerRSEPersistenceProvider(String id, IRSEPersistenceProvider provider) {
- loadedProviders.put(id, provider);
- }
-
- /**
- * Returns the persistence provider denoted by the id. Only one instance of this
- * persistence provider is created.
- * @param id The id of the persistence provider, as denoted by the id attribute on its declaration.
- * @return an IRSEPersistenceProvider which may be null if this id is not found.
- */
- public IRSEPersistenceProvider getRSEPersistenceProvider(String id) {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- IRSEPersistenceProvider provider = (IRSEPersistenceProvider) loadedProviders.get(id);
- if (provider == null) {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] providerCandidates = registry.getConfigurationElementsFor("org.eclipse.rse.core", "persistenceProviders"); //$NON-NLS-1$ //$NON-NLS-2$
- for (int j = 0; j < providerCandidates.length; j++) {
- IConfigurationElement providerCandidate = providerCandidates[j];
- if (providerCandidate.getName().equals("persistenceProvider")) { //$NON-NLS-1$
- String candidateId = providerCandidate.getAttribute("id"); //$NON-NLS-1$
- if (candidateId != null) {
- if (candidateId.equals(id)) {
- try {
- provider = (IRSEPersistenceProvider) providerCandidate.createExecutableExtension("class"); //$NON-NLS-1$
- } catch (CoreException e) {
- logger.logError("Exception loading persistence provider", e); //$NON-NLS-1$
- }
- }
- } else {
- logger.logError("Missing id attribute in persistenceProvider element", null); //$NON-NLS-1$
- }
- } else {
- logger.logError("Invalid element in persistenceProviders extension point", null); //$NON-NLS-1$
- }
- }
- if (provider == null) {
- logger.logError("Persistence provider not found.", null); //$NON-NLS-1$
- }
- loadedProviders.put(id, provider); // even if provider is null
- }
- return provider;
- }
-
- /**
- * @return the default IRSEPersistenceProvider for this installation.
- * TODO: need to determine what this is. Having more than one is problematic.
- */
- public IRSEPersistenceProvider getRSEPersistenceProvider() {
- IRSEPersistenceProvider provider = getRSEPersistenceProvider("org.eclipse.rse.persistence.PropertyFileProvider"); //$NON-NLS-1$
- return provider;
- }
-
- public boolean restore(ISystemProfileManager profileManager) {
- return load(profileManager);
- }
-
- /**
- * Restore a profile of a given name from disk...
- */
- protected ISystemProfile restoreProfile(ISystemProfileManager mgr, String name) throws Exception {
- /*
- * FIXME String fileName = mgr.getRootSaveFileName(name); java.util.List
- * ext = null;//FIXME
- * getMOFHelpers().restore(SystemResourceManager.getProfileFolder(name),fileName);
- * // should be exactly one profile... Iterator iList = ext.iterator();
- * SystemProfile profile = (SystemProfile)iList.next();
- * mgr.initialize(profile, name); return profile;
- */
- return null;
- }
-
- /**
- * Save all profiles to disk
- */
- public boolean commit(ISystemProfileManager profileManager) {
-
- ISystemProfile[] profiles = profileManager.getSystemProfiles();
- for (int idx = 0; idx < profiles.length; idx++) {
- try {
- commit(profiles[idx]);
- } catch (Exception exc) {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- String profileName = profiles[idx].getName();
- String message = "Error saving profile " + profileName; //$NON-NLS-1$
- logger.logError(message, exc);
- return false;
- }
- }
-
- return true;
- }
-
- public boolean restore(ISystemHostPool connectionPool) {
- return false;
- }
-
- /**
- * Restore a connection of a given name from disk...
- */
- protected IHost restoreHost(ISystemHostPool hostPool, String connectionName) throws Exception {
- /*
- * FIXME //System.out.println("in SystemConnectionPoolImpl#restore for
- * connection " + connectionName); String fileName =
- * getRootSaveFileName(connectionName);
- * //System.out.println(".......fileName = " + fileName);
- * //System.out.println(".......folderName = " +
- * getConnectionFolder(connectionName).getName()); java.util.List ext =
- * getMOFHelpers().restore(getConnectionFolder(connectionName),fileName);
- * // should be exactly one profile... Iterator iList = ext.iterator();
- * SystemConnection connection = (SystemConnection)iList.next(); if
- * (connection != null) { if
- * (!connection.getAliasName().equalsIgnoreCase(connectionName)) {
- * RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Incorrect
- * alias name found in connections.xmi file for " + connectionName+".
- * Name was reset"); connection.setAliasName(connectionName); // just in
- * case! } internalAddConnection(connection); } return connection;
- */
- return null;
- }
-
- public boolean commit(ISystemHostPool connectionPool) {
- if (connectionPool.isDirty()) {
- commit(connectionPool.getSystemProfile());
- connectionPool.setDirty(false);
- }
- /*
- Host[] connections = connectionPool.getHosts();
- for (int idx = 0; idx < connections.length; idx++)
- {
- if (!saveHost(connectionPool, connections[idx]))
- {
- return false;
- }
- }
- return true;
- */
- return false; // all persistence should be at profile level
- }
-
- public boolean commit(ISystemFilterPoolManager filterPoolManager) {
- if (filterPoolManager.isDirty()) {
- commit(filterPoolManager.getSystemProfile());
- filterPoolManager.setDirty(false);
- }
- return false;
- }
-
- public boolean commit(ISystemFilterPool filterPool) {
- if (filterPool.isDirty()) {
- commit(filterPool.getSystemFilterPoolManager().getSystemProfile());
- filterPool.setDirty(false);
- }
- return false;
- }
-
- public boolean restore(ISystemFilterPool filterPool) {
- //System.out.println("restore filterpool");
- // DWD function Is this method really needed?
- return false;
- }
-
- public boolean commit(ISystemFilter filter) {
- // System.out.println("commit filter");
- // DWD function Is this method really needed?
- /*
- if (filter.isDirty())
- {
- System.out.println("saving filter: "+filter.getName());
- filter.setDirty(false);
- }
- */
- /* FIXME
- //initMOF(); assume caller did this!
- String fileName = getRootSaveFileName(this);
- IFolder folder = getFolder(this);
- getMOFHelpers().save(folder,fileName, this);
- */
- return false;
- }
-
- public ISystemFilterPool restoreFilterPool(String name) {
- //System.out.println("restore filter pool "+name);
- // DWD function is this method really needed?
- return null;
- }
-
- public boolean commit(ISubSystem subSystem) {
-
- if (subSystem.isDirty()) {
- // System.out.println("updated " + subSystem.getName());
- try {
- // commit everything for now
- commit(_profileManager);
- subSystem.setDirty(false);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return true;
- }
-
- /*
- // FIXME
- if (subSystem.isDirty())
- {
- System.out.println("saving subsystem: "+subSystem.getName());
- }
- */
- return false;
- }
-
- /**
- * Creates a filter pool manager for a particular SubSystemConfiguration and SystemProfile. Called
- * "restore" for historcal reasons.
- * @param profile the profile that will own this ISystemFilterPoolManager. There is one of these per profile.
- * @param logger the logging object for logging errors. Each ISystemFilterPoolManager has one of these.
- * @param caller The creator/owner of this ISystemFilterPoolManager, this ends up being a SubSystemConfiguration.
- * @param name the name of the manager to restore. File name is derived from it when saving to one file.
- * @return the "restored" manager.
- */
- public ISystemFilterPoolManager restoreFilterPoolManager(ISystemProfile profile, Logger logger, ISystemFilterPoolManagerProvider caller, String name) {
- SystemFilterPoolManager mgr = SystemFilterPoolManager.createManager(profile);
- mgr.initialize(logger, caller, name); // core data
- mgr.setWasRestored(false); // managers are not "restored from disk" since they are not persistent of themselves
- return mgr;
- }
-
- /**
- * Attempt to save single profile to disk.
- */
- public boolean commit(ISystemProfile profile) {
- if (profile != null) {
- return save(profile, false);
- }
- return false;
- }
-
- public boolean commit(IHost host) {
- return commit(host.getSystemProfile());
- }
-
- /**
- * Loads and restores RSE artifacts from the last session
- * @param profileManager
- * @return true if the profiles are loaded
- */
- private boolean load(ISystemProfileManager profileManager) {
- boolean successful = true;
- if (isExporting() || isImporting()) {
- successful = false;
- } else {
- _currentState = STATE_IMPORTING;
- IProject project = getRemoteSystemsProject();
- try {
- if (!project.isSynchronized(IResource.DEPTH_ONE)) project.refreshLocal(IResource.DEPTH_ONE, null);
- IRSEPersistenceProvider persistenceProvider = getRSEPersistenceProvider();
- String[] profileNames = persistenceProvider.getSavedProfileNames();
- for (int i = 0; i < profileNames.length; i++) {
- String profileName = profileNames[i];
- RSEDOM dom = importRSEDOM(profileName);
- if (dom != null) {
- ISystemProfile restoredProfile = _importer.restoreProfile(profileManager, dom);
- if (restoredProfile == null) {
- successful = false;
- }
- } else {
- successful = false;
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- _currentState = STATE_NONE;
- }
- return successful;
- }
-
- /**
- * Writes the RSE model to a DOM and schedules writing of that DOM to disk.
- * May, in fact, update an existing DOM instead of creating a new one.
- * If in the process of importing, skip writing.
- * @return true if the profile is written to a DOM
- */
- private boolean save(ISystemProfile profile, boolean force) {
- boolean result = false;
- if (!isImporting()) {
- _currentState = STATE_EXPORTING;
- RSEDOM dom = exportRSEDOM(profile, true); // DWD should do merge, but does not handle deletes properly yet
- _currentState = STATE_NONE;
- result = true;
- if (dom.needsSave()) {
- Job job = dom.getSaveJob();
- if (job == null) {
- job = new SaveRSEDOMJob(dom, getRSEPersistenceProvider());
- dom.setSaveJob(job);
- }
- job.schedule(3000); // five second delay
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#deleteProfile(java.lang.String)
- */
- public void deleteProfile(final String profileName) {
- Job job = new Job(Messages.RSEPersistenceManager_DeleteProfileJobName) {
- protected IStatus run(IProgressMonitor monitor) {
- IRSEPersistenceProvider provider = getRSEPersistenceProvider();
- IStatus result = provider.deleteProfile(profileName, monitor);
- return result;
- }
- };
- job.schedule();
- }
-
- public boolean isExporting() {
- return _currentState == STATE_EXPORTING;
- }
-
- public boolean isImporting() {
- return _currentState == STATE_IMPORTING;
- }
-
-// public void setState(int state) {
-// _currentState = state;
-// }
-
- private RSEDOM exportRSEDOM(ISystemProfile profile, boolean force) {
- RSEDOM dom = _exporter.createRSEDOM(profile, force);
- return dom;
- }
-
- private RSEDOM importRSEDOM(String domName) {
- RSEDOM dom = null;
- IRSEPersistenceProvider provider = getRSEPersistenceProvider();
- if (provider != null) {
- dom = provider.loadRSEDOM(domName, null);
- } else {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- logger.logError("Persistence provider is not available.", null); //$NON-NLS-1$
- }
- return dom;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/SaveRSEDOMJob.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/SaveRSEDOMJob.java
deleted file mode 100644
index 6ac482ac6..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/SaveRSEDOMJob.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-public class SaveRSEDOMJob extends WorkspaceJob {
-
- private RSEDOM _dom;
- private IRSEPersistenceProvider _provider;
-
- public SaveRSEDOMJob(RSEDOM dom, IRSEPersistenceProvider provider) {
- super("Saving Profile"); //$NON-NLS-1$
- String title = MessageFormat.format(Messages.SaveRSEDOMJob_SavingProfileJobName, new Object[] {dom.getName()});
- setName(title);
- _dom = dom;
- _provider = provider;
- }
-
- public IStatus runInWorkspace(IProgressMonitor monitor) {
- IStatus result = Status.OK_STATUS;
- synchronized (_dom) { // synchronize on the DOM to prevent its update while writing
- if (_dom.needsSave()) {
- _provider.saveRSEDOM(_dom, monitor);
- _dom.markUpdated();
- } else {
- result = Status.CANCEL_STATUS;
- }
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/SerializingProvider.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/SerializingProvider.java
deleted file mode 100644
index 5a172de1b..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/SerializingProvider.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-
-/**
- * This is class is used to restore an RSE DOM from disk and import it into RSE.
- * @author dmcknigh
- *
- */
-public class SerializingProvider implements IRSEPersistenceProvider
-{
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getSavedProfileNames()
- */
- public String[] getSavedProfileNames() {
- /*
- * We look for folders inside the RemoteSystemsConnections folder that contain
- * a single file named folderName.rsedom. We return the array of folder names.
- */
- List names = new Vector(10);
- try {
- IProject project = RSEPersistenceManager.getRemoteSystemsProject();
- IResource[] candidates = project.members();
- for (int i = 0; i < candidates.length; i++) {
- IResource candidate = candidates[i];
- if (candidate.getType() == IResource.FOLDER) {
- IFolder candidateFolder = (IFolder) candidate;
- IResource[] children = candidateFolder.members();
- if (children.length == 1) {
- IResource child = children[0];
- if (child.getType() == IResource.FILE) {
- String profileName = candidateFolder.getName();
- String domFileName = profileName + ".rsedom"; //$NON-NLS-1$
- String childName = child.getName();
- if (childName.equals(domFileName)) {
- names.add(profileName);
- }
- }
- }
- }
- }
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- String[] result = new String[names.size()];
- names.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#loadRSEDOM(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public RSEDOM loadRSEDOM(String profileName, IProgressMonitor monitor)
- {
- RSEDOM dom = null;
- IFile profileFile = getProfileFile(profileName, monitor);
- if (profileFile.exists())
- {
- //System.out.println("loading "+ profileFile.getLocation().toOSString() + "..."); // DWD debugging
- try
- {
- InputStream iStream = profileFile.getContents();
-
- ObjectInputStream inStream = new ObjectInputStream(iStream);
- dom = (RSEDOM)inStream.readObject();
- inStream.close();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- try
- {
- profileFile.delete(true, false, monitor);
- }
- catch (Exception e2)
- {
- e.printStackTrace();
- }
-
- }
- }
- return dom;
- }
-
- private IFile getProfileFile(String domName, IProgressMonitor monitor)
- {
- IProject project = RSEPersistenceManager.getRemoteSystemsProject();
-
- // before loading, make sure the project is in synch
- try
- {
- project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- }
- catch (Exception e)
- {
- }
-
- IFolder folder = project.getFolder(domName);
- if (!folder.exists())
- {
- try
- {
- folder.create(true, true, monitor);
- }
- catch (Exception e)
- {
- }
- }
- return folder.getFile(domName + ".rsedom"); //$NON-NLS-1$
- }
-
- /* (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)
- {
-
- IFile profileFile = getProfileFile(dom.getName(), monitor);
- File osFile = profileFile.getLocation().toFile();
- // System.out.println("saving "+ osFile.getAbsolutePath() + "..."); // DWD debugging
- try
- {
- OutputStream oStream = new FileOutputStream(osFile);
- ObjectOutputStream outStream = new ObjectOutputStream(oStream);
- outStream.writeObject(dom);
- outStream.close();
- profileFile.getParent().refreshLocal(IResource.DEPTH_ONE, monitor);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- return false;
- }
-
- return true;
- }
-
- public IStatus deleteProfile(String profileName, IProgressMonitor monitor) {
- IStatus result = Status.OK_STATUS;
- IFile profileFile = getProfileFile(profileName, monitor);
- if (profileFile.exists()) {
- try {
- profileFile.delete(IResource.FORCE | IResource.KEEP_HISTORY, monitor);
- } catch (CoreException e) {
- result = new Status(IStatus.ERROR, null, 0, Messages.SerializingProvider_UnexpectedException, e);
- }
- }
- return result;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java
deleted file mode 100644
index 66f77be7c..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java
+++ /dev/null
@@ -1,445 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.persistence.dom;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IPropertyType;
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.persistence.dom.IRSEDOMConstants;
-import org.eclipse.rse.persistence.dom.IRSEDOMExporter;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-import org.eclipse.rse.persistence.dom.RSEDOMNode;
-
-public class RSEDOMExporter implements IRSEDOMExporter {
- private static RSEDOMExporter _instance = new RSEDOMExporter();
- private Map _domMap;
-// private ISystemRegistry _registry;
-
- /**
- * Constructor to create a new DOM exporter.
- */
- protected RSEDOMExporter() {
- _domMap = new HashMap();
- }
-
- public void setSystemRegistry(ISystemRegistry registry)
- {
-// _registry = registry;
- }
-
- /**
- * @return the singleton instance of this exporter
- */
- public static RSEDOMExporter getInstance() {
- return _instance;
- }
-
- /**
- * Returns the RSEDOM for this profile if it exists
- * @param profile the profile for which to get the DOM
- * @return the DOM for a particular profile, null if the DOM does not exist
- */
- public RSEDOM getRSEDOM(ISystemProfile profile) {
- return (RSEDOM) _domMap.get(profile);
- }
-
- /**
- * Creates the RSE DOM for this profile. After it has found the DOM it will
- * synchronize on the DOM to ensure its integrity while it is being updated.
- * @param profile the profile for which to create the DOM
- * @param clean indicates whether to create from scratch or merge with existing DOM
- * @return The DOM for this profile
- */
- public RSEDOM createRSEDOM(ISystemProfile profile, boolean clean) {
- RSEDOM dom = getRSEDOM(profile);
- if (dom == null) {
- dom = new RSEDOM(profile);
- _domMap.put(profile, dom);
- clean = true;
- }
- synchronized (dom) {
- populateRSEDOM(dom, profile, clean);
- }
- return dom;
- }
-
- /**
- * Creates an RSE DOM for use in persistence
- * @param dom the root node for the target DOM
- * @param profile the profile from which to populate the DOM
- * @param clean indicates whether to create from scratch or merge with existing DOM
- * @return The DOM, updated with the data from the profile
- */
- public RSEDOM populateRSEDOM(RSEDOM dom, ISystemProfile profile, boolean clean) {
- // for now we do complete refresh
- // clean dom for fresh creation
- if (clean) {
- dom.clearChildren();
- }
-
- if (clean || profile.isDirty() || dom.isDirty()) {
- dom.clearAttributes();
- dom.addAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT_PRIVATE, getBooleanString(profile.isDefaultPrivate()));
- dom.addAttribute(IRSEDOMConstants.ATTRIBUTE_IS_ACTIVE, getBooleanString(profile.isActive()));
- }
-
- // create the dom using the profile
-
- // create filter pool nodes
- ISystemFilterPool[] filterPools = profile.getFilterPools();
- for (int i = 0; i < filterPools.length; i++) {
- ISystemFilterPool pool = filterPools[i];
- createNode(dom, pool, clean);
- }
-
- // create hosts nodes
-
- // old nodes to compare with
- List missingNodes = new ArrayList();
- if (!clean) {
- RSEDOMNode[] oldHostNodes = dom.getChildren(IRSEDOMConstants.TYPE_HOST);
- for (int o = 0; o < oldHostNodes.length; o++) {
- missingNodes.add(oldHostNodes[o]);
- }
- }
-
- IHost[] hosts = profile.getHosts();
- for (int j = 0; j < hosts.length; j++) {
- IHost host = hosts[j];
- RSEDOMNode hnode = createNode(dom, host, clean);
-
- if (!clean) {
- // remove this one from the missing list
- missingNodes.remove(hnode);
- }
- }
-
- if (!clean) {
- // remaining missingNodes are probably deleted now
- for (int x = 0; x < missingNodes.size(); x++) {
- dom.removeChild((RSEDOMNode) missingNodes.get(x));
- }
- }
-
- // create generic property set nodes
- createPropertySetNodes(dom, profile, clean);
- dom.setDirty(false);
-
- return dom;
- }
-
- /**
- * Creates DOM nodes for each associated property set
- * @param parent The node of the DOM that needs a property set
- * @param modelObject the RSE model object that has the property set.
- * @param clean true if we are creating, false if we are merging
- * @return an array of DOM nodes - each one being a property set
- */
- public RSEDOMNode[] createPropertySetNodes(RSEDOMNode parent, IRSEModelObject modelObject, boolean clean) {
- IPropertySet[] propertySets = modelObject.getPropertySets();
- for (int i = 0; i < propertySets.length; i++) {
- IPropertySet set = propertySets[i];
- RSEDOMNode node = new RSEDOMNode(parent, IRSEDOMConstants.TYPE_PROPERTY_SET, set.getName());
- String[] keys = set.getPropertyKeys();
- for (int k = 0; k < keys.length; k++) {
- String key = keys[k];
- String value = set.getPropertyValue(key);
- IPropertyType type = set.getPropertyType(key);
- node.addAttribute(key, value, type.toString());
- }
- }
- return parent.getChildren();
- }
-
- /**
- * Create a DOM node representing a filter pool
- * @param parent the parent DOM node
- * @param filterPool the filter pool from which to create a DOM node linked to this parent
- * @param clean true if we are creating, false if we are merging
- * @return the DOM node representing the filter pool
- */
- public RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterPool filterPool, boolean clean) {
- RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_FILTER_POOL, filterPool, clean);
- if (clean || node.isDirty()) {
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, filterPool.getType());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_ID, filterPool.getId());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS, getBooleanString(filterPool.supportsNestedFilters()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DELETABLE, getBooleanString(filterPool.isDeletable()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT, getBooleanString(filterPool.isDefault()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE, getBooleanString(filterPool.isSetStringsCaseSensitive()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS, getBooleanString(filterPool.supportsDuplicateFilterStrings()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE, Integer.toString(filterPool.getRelease()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY, getBooleanString(filterPool.isSetSingleFilterStringOnly()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_OWNING_PARENT_NAME, filterPool.getOwningParentName());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE, getBooleanString(filterPool.isNonRenamable()));
- }
- ISystemFilter[] filters = filterPool.getSystemFilters();
- for (int i = 0; i < filters.length; i++) {
- createNode(node, filters[i], clean);
- }
- createPropertySetNodes(node, filterPool, clean);
- node.setDirty(false);
- return node;
- }
-
- /**
- * Creates a DOM node for a filter
- * @param parent The parent DOM node for this filter, usually a DOM node for a filter pool
- * @param filter the filter for which to create a new node
- * @param clean true if we are creating, false if we are merging
- * @return the DOM node representing the filter
- */
- public RSEDOMNode createNode(RSEDOMNode parent, ISystemFilter filter, boolean clean) {
- RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_FILTER, filter, clean);
- if (clean || node.isDirty()) {
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_ID, filter.getName());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS, getBooleanString(filter.isSupportsNestedFilters()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_RELATIVE_ORDER, Integer.toString(filter.getRelativeOrder()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT, getBooleanString(filter.isDefault()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE, getBooleanString(filter.isSetStringsCaseSensitive()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_PROMPTABLE, getBooleanString(filter.isPromptable()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS, getBooleanString(filter.supportsDuplicateFilterStrings()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_DELETABLE, getBooleanString(filter.isNonDeletable()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE, getBooleanString(filter.isNonRenamable()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_CHANGEABLE, getBooleanString(filter.isNonChangable()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRINGS_NON_CHANGABLE, getBooleanString(filter.isStringsNonChangable()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE, Integer.toString(filter.getRelease()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY, getBooleanString(filter.isSetSingleFilterStringOnly()));
- }
-
- // add nested filters
- ISystemFilter[] nestedFilters = filter.getSystemFilters();
- for (int i = 0; i < nestedFilters.length; i++) {
- createNode(node, nestedFilters[i], clean);
- }
-
- // add filter strings
- ISystemFilterString[] filterStrings = filter.getSystemFilterStrings();
- for (int j = 0; j < filterStrings.length; j++) {
- createNode(node, filterStrings[j], clean);
- }
-
- createPropertySetNodes(node, filter, clean);
- node.setDirty(false);
- return node;
- }
-
- /**
- * Creates a DOM node for a filter string
- * @param parent the DOM node that is the parent to this filter string. This should be a node for a filter.
- * @param filterString The filter string for which the node will be created
- * @param clean true if we are creating, false if we are merging
- * @return the DOM node for the filter string
- */
- public RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterString filterString, boolean clean) {
- RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_FILTER_STRING, filterString, clean);
-
- if (clean || node.isDirty()) {
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRING, filterString.getString());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, filterString.getType());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT, getBooleanString(filterString.isDefault()));
- }
-
- createPropertySetNodes(node, filterString, clean);
- return node;
- }
-
- /**
- * Create a DOM node representing a host
- * @param parent The DOM node that is the parent to this host, usually a node representing a profile
- * @param host The host for which to create the DOM node
- * @param clean true if we are creating, false if we are merging
- * @return the DOM node for the host
- */
- public RSEDOMNode createNode(RSEDOMNode parent, IHost host, boolean clean) {
- RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_HOST, host, clean);
-
- if (clean || node.isDirty()) {
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, host.getSystemType());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_OFFLINE, getBooleanString(host.isOffline()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_PROMPTABLE, getBooleanString(host.isPromptable()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_HOSTNAME, host.getHostName());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DESCRIPTION, host.getDescription());
- }
-
- IConnectorService[] connectorServices = host.getConnectorServices();
- for (int i = 0; i < connectorServices.length; i++) {
- IConnectorService service = connectorServices[i];
- createNode(node, service, clean);
- }
-
- createPropertySetNodes(node, host, clean);
- node.setDirty(false);
- return node;
- }
-
- /**
- * Creates a DOM node for a connector service
- * @param parent the DOM node representing the parent for a connector service. This should be a Host
- * @param connectorService the connector service for which a DOM node is to be created
- * @param clean true if we are creating, false if we are merging
- * @return the DOM node for the connector service
- */
- public RSEDOMNode createNode(RSEDOMNode parent, IConnectorService connectorService, boolean clean) {
- RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_CONNECTOR_SERVICE, connectorService, clean);
- if (clean || node.isDirty()) {
- // store it's attributes
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, connectorService.getHostType());
-
- // can't do this til connector service owns the properties (right now it's still subsystem)
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_GROUP, connectorService.getName());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_USE_SSL, getBooleanString(connectorService.isUsingSSL()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_PORT, Integer.toString(connectorService.getPort()));
- }
- // store the server launcher
- // right now subsystem still owns the server launchers
- // that will change later
-
- IServerLauncherProperties serverLauncher = connectorService.getRemoteServerLauncherProperties();
- if (serverLauncher != null) {
- createNode(node, serverLauncher, clean);
- }
-
- // store each subsystem
- ISubSystem[] subSystems = connectorService.getSubSystems();
- for (int i = 0; i < subSystems.length; i++) {
- createNode(node, subSystems[i], clean);
- }
-
- createPropertySetNodes(node, connectorService, clean);
- node.setDirty(false);
- return node;
- }
-
- /**
- * Creates a DOM node for a server launcher
- * @param parent the DOM node represnting a parent for a server launcher, usually a connector service
- * @param serverLauncher the server launcher from which to create the node
- * @param clean true if we are creating, false if we are merging
- * @return the node representing the server launcher
- */
- public RSEDOMNode createNode(RSEDOMNode parent, IServerLauncherProperties serverLauncher, boolean clean) {
- RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_SERVER_LAUNCHER, serverLauncher, clean);
-
- if (clean || node.isDirty()) {
- }
-
- serverLauncher.saveToProperties();
- createPropertySetNodes(node, serverLauncher, clean);
- return node;
- }
-
- /**
- * Creates a DOM node for a subsystem
- * @param parent the DOM node representing the parent for this subsystem, usually a connector service
- * @param subSystem the subsystem from which to create the DOM node
- * @param clean true if we are creating, false if we are merging
- * @return the DOM node representing the subsystem
- */
- public RSEDOMNode createNode(RSEDOMNode parent, ISubSystem subSystem, boolean clean) {
- RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_SUBSYSTEM, subSystem, clean);
-
- if (clean || node.isDirty()) {
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_HIDDEN, getBooleanString(subSystem.isHidden()));
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, subSystem.getSubSystemConfiguration().getId());
- }
-
- // create filter pool reference nodes
- ISystemFilterPoolReferenceManager refMgr = subSystem.getFilterPoolReferenceManager();
- if (refMgr != null) {
- ISystemFilterPoolReference[] references = refMgr.getSystemFilterPoolReferences();
- for (int i = 0; i < references.length; i++) {
- ISystemFilterPoolReference ref = references[i];
- createNode(node, ref, clean);
- }
- }
-
- createPropertySetNodes(node, subSystem, clean);
- node.setDirty(false);
- return node;
- }
-
- /**
- * Creates a DOM node for a filter pool reference
- * @param parent the DOM node representing the parent for a filter pool reference, usually a subsystem
- * @param filterPoolReference the reference from which to create a new DOM node
- * @param clean true if we are creating, false if we are merging
- * @return the DOM node created for the filter pool reference
- */
- public RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterPoolReference filterPoolReference, boolean clean) {
- RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_FILTER_POOL_REFERENCE, filterPoolReference, clean);
-
- if (clean || node.isDirty()) {
- ISystemFilterPool filterPool = filterPoolReference.getReferencedFilterPool();
- String refId = (filterPool != null) ? filterPool.getId() : "unknown"; //$NON-NLS-1$
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_REF_ID, refId);
- }
-
- createPropertySetNodes(node, filterPoolReference, clean);
- node.setDirty(false);
- return node;
- }
-
- /**
- * @param parent the DOM node representing the parent of the node we are trying to find
- * @param type the type of the DOM node to look for
- * @param modelObject the model object for which we are trying to find a matching node
- * @param clean true if we are creating, false if we are merging
- * @return the DOM node that we found or created
- */
- private RSEDOMNode findOrCreateNode(RSEDOMNode parent, String type, IRSEModelObject modelObject, boolean clean) {
- RSEDOMNode node = null;
- String name = modelObject.getName();
- if (!clean) {
- node = parent.getChild(type, name);
- if (node != null && modelObject.isDirty()) {
- node.clearAttributes();
- node.setDirty(true);
- }
- }
- boolean newNode = (node == null);
- if (newNode) {
- node = new RSEDOMNode(parent, type, name);
- }
- return node;
- }
-
- /**
- * Helper to get either "true" or "false" based on boolean flag
- * @param flag the flag which to translate
- * @return a string value suitable for the DOM
- */
- private String getBooleanString(boolean flag) {
- return flag ? IRSEDOMConstants.ATTRIBUTE_TRUE : IRSEDOMConstants.ATTRIBUTE_FALSE;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
deleted file mode 100644
index a6995b84c..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.persistence.dom;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterConstants;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterStartHere;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IPropertyType;
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.PropertyType;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystemFilterNamingPolicy;
-import org.eclipse.rse.persistence.dom.IRSEDOMConstants;
-import org.eclipse.rse.persistence.dom.IRSEDOMImporter;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-import org.eclipse.rse.persistence.dom.RSEDOMNode;
-import org.eclipse.rse.persistence.dom.RSEDOMNodeAttribute;
-
-
-
-public class RSEDOMImporter implements IRSEDOMImporter
-{
- private static RSEDOMImporter _instance = new RSEDOMImporter();
- private ISystemRegistry _registry;
-
- public static RSEDOMImporter getInstance()
- {
- return _instance;
- }
-
- public RSEDOMImporter()
- {
- }
-
- public void setSystemRegistry(ISystemRegistry registry)
- {
- _registry = registry;
- }
-
- /**
- * Restores the profile represented by dom
- * @param profileManager
- * @param dom
- * @return the restored profile
- */
- public ISystemProfile restoreProfile(ISystemProfileManager profileManager, RSEDOM dom)
- {
- // create the profile
- String profileName = dom.getName();
- boolean defaultPrivate = getBooleanValue(dom.getAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT_PRIVATE).getValue());
- boolean isActive = getBooleanValue(dom.getAttribute(IRSEDOMConstants.ATTRIBUTE_IS_ACTIVE).getValue());
- ISystemProfile profile = profileManager.createSystemProfile(profileName, isActive);
-
-
- if (profile != null)
- {
- profile.setDefaultPrivate(defaultPrivate);
- profileManager.makeSystemProfileActive(profile, isActive);
- // restore the children for the profile
- RSEDOMNode[] children = dom.getChildren();
- for (int i = 0;i < children.length; i++)
- {
- RSEDOMNode child = children[i];
- String type = child.getType();
- if (type.equals(IRSEDOMConstants.TYPE_HOST))
- {
- restoreHost(profile, child);
- }
- else if (type.equals(IRSEDOMConstants.TYPE_FILTER_POOL))
- {
- restoreFilterPool(profile, child);
- }
- else if (type.equals(IRSEDOMConstants.TYPE_PROPERTY_SET))
- {
- restorePropertySet(profile, child);
- }
- }
- }
- return profile;
- }
-
- /**
- * Restores the host represented by hostNode
- */
- public IHost restoreHost(ISystemProfile profile, RSEDOMNode hostNode)
- {
- IHost host = null;
-
- // get host node attributes
- String connectionName = hostNode.getName();
- String systemType = hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue();
- String hostName = hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_HOSTNAME).getValue();
- String description = hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_DESCRIPTION).getValue();
- boolean isOffline = getBooleanValue(hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_OFFLINE).getValue());
- boolean isPromptable = getBooleanValue(hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_PROMPTABLE).getValue());
-
- // create host and set it's attributes
- try
- {
- // NOTE create host effectively recreates the subsystems
- // so instead of creating subsystems on restore, we should be updating their properties
- host = profile.createHost(systemType, connectionName, hostName, description);
- host.setOffline(isOffline);
- host.setPromptable(isPromptable);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- // restore children of host
- RSEDOMNode[] children = hostNode.getChildren();
- for (int i = 0;i < children.length; i++)
- {
- RSEDOMNode child = children[i];
- String type = child.getType();
- if (type.equals(IRSEDOMConstants.TYPE_CONNECTOR_SERVICE))
- {
- restoreConnectorService(host, child);
- }
- else if (type.equals(IRSEDOMConstants.TYPE_PROPERTY_SET))
- {
- restorePropertySet(profile, child);
- }
- }
-
- return host;
- }
-
- /**
- * Restore the connector service represented by connectorServiceNode
- */
- public IConnectorService restoreConnectorService(IHost host, RSEDOMNode connectorServiceNode)
- {
- // TODO - this should come before subsystems
- // but currently we're still using old way of creating subsystem first
- IConnectorService service = null;
-
- // get attributes of the service
-// String name = connectorServiceNode.getName();
-// String type = connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue();
-// String group = connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_GROUP).getValue();
- boolean useSSL = getBooleanValue(connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_USE_SSL).getValue());
- RSEDOMNodeAttribute att = connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_PORT);
- int port = 0;
- if (att != null) {
- port = getIntegerValue(att.getValue());
- }
-
- // first restore subsystems (since right now we need subsystem to get at service
- RSEDOMNode[] ssChildren = connectorServiceNode.getChildren(IRSEDOMConstants.TYPE_SUBSYSTEM);
- for (int s = 0; s < ssChildren.length; s++)
- {
- RSEDOMNode ssChild = ssChildren[s];
- ISubSystem subSystem = restoreSubSystem(host, ssChild);
- if (subSystem != null && service == null)
- {
- ISubSystemConfiguration factory = subSystem.getSubSystemConfiguration();
- service = factory.getConnectorService(host);
- if (service != null)
- {
- if (factory.supportsServerLaunchProperties(host))
- {
- IServerLauncherProperties sl = factory.createServerLauncher(service);
- if (sl != null)
- {
- // get server launcher properties
- // right now we just set them for subsystem, but later that will change
- RSEDOMNode serverLauncherPropertiesNode = null;
- RSEDOMNode[] slChildren = connectorServiceNode.getChildren(IRSEDOMConstants.TYPE_SERVER_LAUNCHER);
- if (slChildren != null && slChildren.length > 0)
- {
- serverLauncherPropertiesNode = slChildren[0];
- restoreServerLauncher(service, serverLauncherPropertiesNode, sl);
- }
- }
- }
- service.setPort(port);
- service.setIsUsingSSL(useSSL);
- }
- }
- if (service != null && subSystem != null)
- {
- subSystem.setConnectorService(service);
- }
- }
-
-
-
- // restore all property sets
- RSEDOMNode[] psChildren = connectorServiceNode.getChildren(IRSEDOMConstants.TYPE_PROPERTY_SET);
- for (int p = 0;p < psChildren.length; p++)
- {
- RSEDOMNode psChild = psChildren[p];
- restorePropertySet(service, psChild);
- }
- return service;
- }
-
- public IServerLauncherProperties restoreServerLauncher(IConnectorService service, RSEDOMNode serverLauncherNode, IServerLauncherProperties sl)
- {
-// restore all property sets
- RSEDOMNode[] psChildren = serverLauncherNode.getChildren(IRSEDOMConstants.TYPE_PROPERTY_SET);
- for (int p = 0;p < psChildren.length; p++)
- {
- RSEDOMNode psChild = psChildren[p];
- restorePropertySet(sl, psChild);
- }
- sl.restoreFromProperties();
- service.setRemoteServerLauncherProperties(sl);
- return sl;
- }
-
- /**
- * Restores the subsystem represented by subSystemNode
- */
- public ISubSystem restoreSubSystem(IHost host, RSEDOMNode subSystemNode)
- {
- // in most cases (if not all) the subsystem already exists
- // since createHost() ends up recreating subsystems for each factory
- String name = subSystemNode.getName();
- String type = subSystemNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue();
- boolean isHidden = getBooleanValue(subSystemNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_HIDDEN).getValue());
- ISubSystem subSystem = null;
- ISubSystemConfiguration factory = getSubSystemConfiguration(type);
- if (factory != null)
- {
- if (factory instanceof IServiceSubSystemConfiguration)
- {
- IServiceSubSystemConfiguration serviceFactory = (IServiceSubSystemConfiguration)factory;
- ISubSystem[] existingSubSystems = _registry.getServiceSubSystems(serviceFactory.getServiceType(), host);
- if (existingSubSystems != null && existingSubSystems.length > 0)
- {
- subSystem = existingSubSystems[0];
- // need to switch factories
- ((IServiceSubSystem)subSystem).switchServiceFactory(serviceFactory);
- }
- }
- else
- {
- ISubSystem[] existingSubSystems = _registry.getSubSystems(type, host);
-
- if (existingSubSystems != null && existingSubSystems.length > 0)
- {
- subSystem = existingSubSystems[0];
- }
- }
-
- if (subSystem == null)
- {
- subSystem = factory.createSubSystemInternal(host);
- }
- subSystem.setHidden(isHidden);
- subSystem.setHost(host);
- subSystem.setSubSystemConfiguration(factory);
- subSystem.setName(factory.getName());
- subSystem.setConfigurationId(factory.getId());
- subSystem.setWasRestored(true);
-
- if (factory.supportsFilters())
- {
- ISystemFilterStartHere startHere = _registry.getSystemFilterStartHere();
- ISystemFilterPoolReferenceManager fprMgr = startHere.createSystemFilterPoolReferenceManager(subSystem, factory, name, new SubSystemFilterNamingPolicy());
- subSystem.setFilterPoolReferenceManager(fprMgr);
- ISystemFilterPoolManager defaultFilterPoolManager = factory.getFilterPoolManager(host.getSystemProfile());
- fprMgr.setDefaultSystemFilterPoolManager(defaultFilterPoolManager);
- }
-
-
-
- // restore filer pool references
- RSEDOMNode[] filterPoolReferenceChildren = subSystemNode.getChildren(IRSEDOMConstants.TYPE_FILTER_POOL_REFERENCE);
- for (int i = 0; i < filterPoolReferenceChildren.length; i++)
- {
- RSEDOMNode fprChild = filterPoolReferenceChildren[i];
- restoreFilterPoolReference(subSystem, fprChild);
- }
-
- // restore all property sets
- RSEDOMNode[] psChildren = subSystemNode.getChildren(IRSEDOMConstants.TYPE_PROPERTY_SET);
- for (int p = 0;p < psChildren.length; p++)
- {
- RSEDOMNode psChild = psChildren[p];
- restorePropertySet(subSystem, psChild);
- }
- }
- return subSystem;
- }
-
- /**
- * Restore the filter
- */
- public ISystemFilter restoreFilter(ISystemFilterPool filterPool, RSEDOMNode node)
- {
- // get the node attributes for a filter
- String name = node.getName();
- boolean supportsNestedFilters = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS).getValue());
- int relativeOrder = getIntegerValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_RELATIVE_ORDER).getValue());
- boolean isDefault = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT).getValue());
- boolean isSetStringsCaseSensitive = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE).getValue());
- boolean isPromptable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_PROMPTABLE).getValue());
- boolean isSetSupportsDuplicateFilterStrings = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS).getValue());
- boolean isNonDeletable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_DELETABLE).getValue());
- boolean isNonRenamable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE).getValue());
- boolean isNonChangable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_CHANGEABLE).getValue());
- boolean isStringsNonChangable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRINGS_NON_CHANGABLE).getValue());
- int release = getIntegerValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE).getValue());
- boolean isSetSingleFilterStringOnly = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY).getValue());
-
- Vector filterStrings = new Vector();
-
- // create the filter strings
- RSEDOMNode[] filterStringNodes = node.getChildren(IRSEDOMConstants.TYPE_FILTER_STRING);
- for (int i = 0; i < filterStringNodes.length; i++)
- {
- RSEDOMNode filterStringNode = filterStringNodes[i];
-
- // might not have to restore the filter strings this way
- //restoreFilterString(filter, filterStringNode);
-
- filterStrings.add(filterStringNode.getName());
- }
-
- // create the filter
- ISystemFilter filter = filterPool.createSystemFilter(name, filterStrings);
-
- filter.setWasRestored(true);
-
- // set filter attributes
- filter.setSupportsNestedFilters(supportsNestedFilters);
- filter.setRelativeOrder(relativeOrder);
- filter.setDefault(isDefault);
- filter.setStringsCaseSensitive(isSetStringsCaseSensitive);
- filter.setPromptable(isPromptable);
- filter.setSupportsDuplicateFilterStrings(isSetSupportsDuplicateFilterStrings);
- filter.setNonDeletable(isNonDeletable);
- filter.setNonChangable(isNonChangable);
- filter.setNonRenamable(isNonRenamable);
- filter.setStringsNonChangable(isStringsNonChangable);
- filter.setRelease(release);
- filter.setSingleFilterStringOnly(isSetSingleFilterStringOnly);
-
- // restore all property sets
- RSEDOMNode[] psChildren = node.getChildren(IRSEDOMConstants.TYPE_PROPERTY_SET);
- for (int p = 0;p < psChildren.length; p++)
- {
- RSEDOMNode psChild = psChildren[p];
- restorePropertySet(filter, psChild);
- }
- return filter;
- }
-
- /**
- * Restore the filter pool represented by the node
- */
- public ISystemFilterPool restoreFilterPool(ISystemProfile profile, RSEDOMNode node)
- {
- ISystemFilterPool filterPool = null;
-
- // get the node attributes for a filter pool
- String name = node.getName();
- String type = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue();
- String id = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_ID).getValue();
- boolean supportsNestedFilters = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS).getValue());
- boolean isDeletable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_DELETABLE).getValue());
- boolean isDefault = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT).getValue());
- boolean isSetStringsCaseSensitive = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE).getValue());
- boolean isSetSupportsDuplicateFilterStrings = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS).getValue());
- int release = getIntegerValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE).getValue());
- boolean isSetSingleFilterStringOnly = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY).getValue());
- String owningParentName = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_OWNING_PARENT_NAME).getValue();
- boolean isNonRenamable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE).getValue());
-
- // create the filter pool and set it's attributes
- try
- {
- ISubSystemConfiguration factory = getSubSystemConfiguration(id);
- if (factory != null)
- {
- ISystemFilterPoolManager mgr = factory.getFilterPoolManager(profile);
- if (isDefault)
- {
- filterPool = mgr.getFirstDefaultSystemFilterPool();
- }
- else
- {
- filterPool = mgr.getSystemFilterPool(name);
- }
- if (filterPool == null)
- {
- filterPool = _registry.getSystemFilterPool().createSystemFilterPool(name,
- supportsNestedFilters,
- isDeletable,
- ISystemFilterConstants.TRY_TO_RESTORE_NO);
-
- if (filterPool != null)
- {
- filterPool.setSystemFilterPoolManager(mgr);
- // add to model
- mgr.getPools().add(filterPool);
- }
- }
- if (filterPool != null) {
- filterPool.setType(type);
- filterPool.setDefault(isDefault);
- filterPool.setSupportsNestedFilters(supportsNestedFilters);
- filterPool.setStringsCaseSensitive(isSetStringsCaseSensitive);
- filterPool.setSupportsDuplicateFilterStrings(isSetSupportsDuplicateFilterStrings);
- filterPool.setRelease(release);
- filterPool.setSingleFilterStringOnly(isSetSingleFilterStringOnly);
- filterPool.setOwningParentName(owningParentName);
- filterPool.setNonRenamable(isNonRenamable);
- filterPool.setWasRestored(true);
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- // restore children
- RSEDOMNode[] children = node.getChildren();
- for (int i = 0;i < children.length; i++)
- {
- RSEDOMNode child = children[i];
- String ctype = child.getType();
- if (ctype.equals(IRSEDOMConstants.TYPE_FILTER))
- {
- if (filterPool != null)
- {
- restoreFilter(filterPool, child);
- }
- }
- else if (ctype.equals(IRSEDOMConstants.TYPE_PROPERTY_SET))
- {
- restorePropertySet(filterPool, child);
- }
- }
- return filterPool;
- }
-
- /**
- * Restore the filter pool reference that is represented by the node
- */
- public ISystemFilterPoolReference restoreFilterPoolReference(ISubSystem subsystem, RSEDOMNode node) {
- ISystemFilterPoolReference filterPoolReference = null;
- String subsystemName = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_REF_ID).getValue();
- String filterPoolName = node.getName();
- ISubSystemConfiguration configuration = getSubSystemConfiguration(subsystemName);
- if (configuration != null) {
- ISystemProfile profile = subsystem.getSystemProfile(); // DWD are there cases where this may be null?
- ISystemFilterPoolManager filterPoolManager = configuration.getFilterPoolManager(profile);
- ISystemFilterPool filterPool = filterPoolManager.getSystemFilterPool(filterPoolName);
- ISystemFilterPoolReferenceManager referenceManager = subsystem.getFilterPoolReferenceManager();
- /*
- * DWD filterpool can be null when restoring since there can be forward references.
- * A profile may be being restored that has references to a filter pool in a profile that doesn't yet exist.
- * Need to create an "unresolved" reference instead of a null object and then patch them up on first access.
- */
- // create reference to the filterpool
- if (filterPool != null) {
- filterPoolReference = referenceManager.addReferenceToSystemFilterPool(filterPool);
- } else {
- filterPoolReference = referenceManager.addReferenceToSystemFilterPool(filterPoolManager, filterPoolName);
- }
- }
- return filterPoolReference;
- }
-
- public ISystemFilterString restoreFilterString(ISystemFilter filter, RSEDOMNode node)
- {
- /*
- String string = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRING).getValue();
- String type = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue();
- boolean isDefault = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT).getValue());
-
- SystemFilterString filterString = filter
- */
- return null;//not sure if we need this
- }
-
- /**
- * Restores the property set represented by propertySetNode
- */
- public IPropertySet restorePropertySet(IRSEModelObject modelObject, RSEDOMNode propertySetNode)
- {
- String name = propertySetNode.getName();
- IPropertySet set = modelObject.createPropertySet(name);
- RSEDOMNodeAttribute[] attributes = propertySetNode.getAttributes();
- for (int i = 0; i < attributes.length; i++)
- {
- RSEDOMNodeAttribute attribute = attributes[i];
- String typeStr = attribute.getType();
- IPropertyType type = PropertyType.fromString(typeStr);
-
- set.addProperty(attribute.getKey(), attribute.getValue(), type);
-
- }
- return set;
- }
-
- private boolean getBooleanValue(String booleanStr)
- {
- return ((booleanStr != null) && booleanStr.equalsIgnoreCase(IRSEDOMConstants.ATTRIBUTE_TRUE));
- }
-
- private int getIntegerValue(String integerString)
- {
- int result = 0;
- if (integerString != null) {
- try {
- result = Integer.parseInt(integerString);
- } catch (NumberFormatException e) {
- }
- }
- return result;
- }
-
- /**
- * Returns the subsystem configuration for a given subsystem name
- * @param subsystemName the name to look up
- * @return the subsystem configuration matching the name
- */
- private ISubSystemConfiguration getSubSystemConfiguration(String subsystemName)
- {
- return _registry.getSubSystemConfiguration(subsystemName);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/messages.properties b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/messages.properties
deleted file mode 100644
index 94d3f5896..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/messages.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# David Dykstal (IBM) - initial API and implementation
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RSEPersistenceManager_DeleteProfileJobName=Delete RSE Profile Job
-PropertyFileProvider_SavingTaskName=Saving DOM
-PropertyFileProvider_UnexpectedException=Unexpected Exception
-PropertyFileProvider_LoadingTaskName=Loading DOM
-SaveRSEDOMJob_SavingProfileJobName=Saving RSE Profile {0}
-SerializingProvider_UnexpectedException=Unexpected Exception
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/IRSEPersistenceManager.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/IRSEPersistenceManager.java
deleted file mode 100644
index ed08423bd..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/IRSEPersistenceManager.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.persistence;
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemHostPool;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.logging.Logger;
-
-
-public interface IRSEPersistenceManager
-{
- /**
- * Register the persistence provider to be used when saving and restoring RSE doms.
- * The provider is registered under the provided id.
- * @param id the provider id.
- * @param provider the provider.
- */
- public void registerRSEPersistenceProvider(String id, IRSEPersistenceProvider provider);
-
- /**
- * Restore all profiles
- * @param profileManager
- * @return true if successful
- */
- public boolean restore(ISystemProfileManager profileManager);
-
- /**
- * Save all profiles
- * @param profileManager
- * @return true if successful
- */
- public boolean commit(ISystemProfileManager profileManager);
-
- public boolean commit(IHost host);
-
- /**
- * Restore all connections in the connection pool
- * @param connectionPool
- * @return true if successful
- */
- public boolean restore(ISystemHostPool connectionPool);
-
- /**
- * Save all connections in the connection pool
- * @param connectionPool
- * @return true if successful
- */
- public boolean commit(ISystemHostPool connectionPool);
-
- public boolean commit(ISystemFilterPoolManager filterPoolManager);
- /**
- * Save all the filters in the filter pool
- * @param filterPool
- * @return true if successful
- */
- public boolean commit(ISystemFilterPool filterPool);
-
- /**
- * Save this filter
- * @param filter
- * @return true if successful
- */
- public boolean commit(ISystemFilter filter);
-
- /**
- * Restore all the filters for the filter pool
- * @param filterPool
- * @return true if sucessful
- */
- public boolean restore(ISystemFilterPool filterPool);
-
- /**
- * Restore the filter pool
- * @param name
- * @return the filter pool if successful
- */
- public ISystemFilterPool restoreFilterPool(String name);
-
-
- /**
- * Save this subsystem
- * @param subSystem
- * @return true if successful
- */
- public boolean commit(ISubSystem subSystem);
-
- /**
- * Save this profile
- * @param profile
- * @return true if successful
- */
- public boolean commit(ISystemProfile profile);
-
- public ISystemFilterPoolManager restoreFilterPoolManager(ISystemProfile profile, Logger logger, ISystemFilterPoolManagerProvider caller, String name);
-
- public boolean isExporting();
- public boolean isImporting();
-
- /**
- * Delete the persistent form of a profile.
- * @param profileName The name of the profile to delete
- */
- public void deleteProfile(String profileName);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/IRSEPersistenceProvider.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/IRSEPersistenceProvider.java
deleted file mode 100644
index e366bc0e1..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/IRSEPersistenceProvider.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.persistence;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-
-/**
- * This is the interface that needs to be implemented when providing an extension
- * using the RSE persistence provider extension point.
- *
- * Implement this class to provide a specialized means of
- * saving and restoring RSEDOM
- *
- */
-public interface IRSEPersistenceProvider
-{
- /**
- * Restores an RSE DOM given a profileName.
- *
- * @param profileName name of the Profile to load
- * @param monitor
- * @return the RSE DOM for the specified profile
- */
- public RSEDOM loadRSEDOM(String profileName, IProgressMonitor monitor);
-
- /**
- * Persists an RSE DOM.
- *
- * @param dom the RSE DOM to persist
- * @param monitor
- * @return true if succcessful
- */
- public boolean saveRSEDOM(RSEDOM dom, IProgressMonitor monitor);
-
- /**
- * @return The names of the profiles that have been saved by this persistence provider.
- */
- public String[] getSavedProfileNames();
-
- /**
- * Removes a profile. Does nothing if the profile is not found.
- * @param profileName the name of the profile to remove
- * @param monitor the monitor for the operation
- */
- public IStatus deleteProfile(String profileName, IProgressMonitor monitor);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java
deleted file mode 100644
index 5a99003da..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-public interface IRSEDOMConstants
-{
- // node types
- public static final String TYPE_PROFILE = "Profile"; //$NON-NLS-1$
- public static final String TYPE_PROPERTY_SET = "PropertySet"; //$NON-NLS-1$
- public static final String TYPE_PROPERTY = "Property"; //$NON-NLS-1$
- public static final String TYPE_HOST = "Host"; //$NON-NLS-1$
- public static final String TYPE_FILTER_POOL = "FilterPool"; //$NON-NLS-1$
- public static final String TYPE_FILTER = "Filter"; //$NON-NLS-1$
- public static final String TYPE_FILTER_STRING = "FilterString"; //$NON-NLS-1$
- public static final String TYPE_FILTER_POOL_REFERENCE = "FilterPoolReference"; //$NON-NLS-1$
- public static final String TYPE_CONNECTOR_SERVICE = "ConnectorService"; //$NON-NLS-1$
- public static final String TYPE_SERVER_LAUNCHER = "ServerLauncher"; //$NON-NLS-1$
- public static final String TYPE_SUBSYSTEM = "SubSystem"; //$NON-NLS-1$
-
- // node attributes
-
- // profile attributes
- public static final String ATTRIBUTE_DEFAULT_PRIVATE="defaultPrivate"; //$NON-NLS-1$
- public static final String ATTRIBUTE_IS_ACTIVE="isActive"; //$NON-NLS-1$
-
- // subsystem attributes
- public static final String ATTRIBUTE_HIDDEN="hidden"; //$NON-NLS-1$
-
- // common attributes
- public static final String ATTRIBUTE_NAME="name"; //$NON-NLS-1$
- public static final String ATTRIBUTE_TYPE="type"; //$NON-NLS-1$
-
- // host attributes
- public static final String ATTRIBUTE_HOSTNAME = "hostname"; //$NON-NLS-1$
- public static final String ATTRIBUTE_OFFLINE = "offline"; //$NON-NLS-1$
- public static final String ATTRIBUTE_DESCRIPTION = "description"; //$NON-NLS-1$
-
- // ConnectorService attributes
- public static final String ATTRIBUTE_GROUP="group"; //$NON-NLS-1$
- public static final String ATTRIBUTE_USE_SSL="useSSL"; //$NON-NLS-1$
-
- // Filter string attributes
- public static final String ATTRIBUTE_STRING = "string"; //$NON-NLS-1$
-
- // filter attributes
- public static final String ATTRIBUTE_SUPPORTS_NESTED_FILTERS = "supportsNestedFilters"; //$NON-NLS-1$
- public static final String ATTRIBUTE_RELATIVE_ORDER = "relativeOrder"; //$NON-NLS-1$
- public static final String ATTRIBUTE_DEFAULT = "default"; //$NON-NLS-1$
- public static final String ATTRIBUTE_STRING_CASE_SENSITIVE = "stringsCaseSensitive"; //$NON-NLS-1$
- public static final String ATTRIBUTE_PROMPTABLE ="promptable"; //$NON-NLS-1$
- public static final String ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS="supportsDuplicateFilterStrings"; //$NON-NLS-1$
- public static final String ATTRIBUTE_NON_DELETABLE="nonDeletable"; //$NON-NLS-1$
- public static final String ATTRIBUTE_NON_RENAMABLE="nonRenamable"; //$NON-NLS-1$
- public static final String ATTRIBUTE_NON_CHANGEABLE="nonChangable"; //$NON-NLS-1$
- public static final String ATTRIBUTE_STRINGS_NON_CHANGABLE="stringsNonChangable"; //$NON-NLS-1$
- public static final String ATTRIBUTE_RELEASE="release"; //$NON-NLS-1$
- public static final String ATTRIBUTE_SINGLE_FILTER_STRING_ONLY="singleFilterStringOnly"; //$NON-NLS-1$
-
- // server launcher attributes
- public static final String ATTRIBUTE_REXEC_PORT="rexecPort"; //$NON-NLS-1$
- public static final String ATTRIBUTE_DAEMON_PORT="daemonPort"; //$NON-NLS-1$
- public static final String ATTRIBUTE_PORT="port"; //$NON-NLS-1$
- public static final String ATTRIBUTE_SERVER_PATH="serverPath"; //$NON-NLS-1$
- public static final String ATTRIBUTE_SERVER_SCRIPT="serverScript"; //$NON-NLS-1$
- public static final String ATTRIBUTE_RESTRICTED_TYPES="restrictedTypes"; //$NON-NLS-1$
-
- public static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
- public static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
- public static final String ATTRIBUTE_OWNING_PARENT_NAME = "owningParentName"; //$NON-NLS-1$
- public static final String ATTRIBUTE_REF_ID= "refID"; //$NON-NLS-1$
- public static final String ATTRIBUTE_DELETABLE = "deletable"; //$NON-NLS-1$
- public static final String ATTRIBUTE_TRUE = "true"; //$NON-NLS-1$
- public static final String ATTRIBUTE_FALSE = "false"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMExporter.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMExporter.java
deleted file mode 100644
index 8a3f5acde..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMExporter.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-public interface IRSEDOMExporter
-{
- /**
- * Creates the RSE DOM for this profile
- * @param profile
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return the created DOM
- */
- RSEDOM createRSEDOM(ISystemProfile profile, boolean clean);
-
- /**
- * Creates an RSE DOM for use in persistence
- * @param dom
- * @param profile
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return the created DOM
- */
- public RSEDOM populateRSEDOM(RSEDOM dom, ISystemProfile profile, boolean clean);
-
- /**
- * Returns the RSEDOM for this profile iff it exists
- * @param profile
- * @return The DOM retrieved from the profile
- */
- RSEDOM getRSEDOM(ISystemProfile profile);
-
- /**
- * Create a DOM node representing a host
- * @param parent the parent of this node, must be node for an ISystemProfile
- * @param host the host from which to create this node
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return The DOM node for the IHost
- */
- RSEDOMNode createNode(RSEDOMNode parent, IHost host, boolean clean);
-
- /**
- * Creates a DOM node for a connector service
- * @param parent the parent of this node, must be node for an IHost
- * @param cs the connector service from which to create a node
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return The DOM node for the IConnectorService
- */
- RSEDOMNode createNode(RSEDOMNode parent, IConnectorService cs, boolean clean);
-
- /**
- * Creates a DOM node for a server launcher
- * @param parent the parent of this node, must be a node for an IConnectorService
- * @param sl the server launcher properties from which to create a node
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return the DOM node for the IServerLauncherProperties
- */
- RSEDOMNode createNode(RSEDOMNode parent, IServerLauncherProperties sl, boolean clean);
-
- /**
- * Creates a DOM node for a subsystem
- * @param parent the parent of this node, must be a node for an IConnectorService
- * @param ss the subsystem from which to create a node
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return The DOM node for the ISubSystem
- */
- RSEDOMNode createNode(RSEDOMNode parent, ISubSystem ss, boolean clean);
-
- /**
- * Creates a DOM node for a filter
- * @param parent the parent DOM node for this new node, must be a node for an ISystemFilterPool
- * @param filter the filter from which to create the node
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return The DOM node for the filter
- */
- RSEDOMNode createNode(RSEDOMNode parent, ISystemFilter filter, boolean clean);
-
- /**
- * Create a DOM node representing a filter pool
- * @param parent the parent DOM node for this new node, must be a node for an ISystemProfile
- * @param filterPool the filter pool from which to create the node
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return The DOM node for the filter pool
- */
- RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterPool fp, boolean clean);
-
-
- /**
- * Creates a DOM node for a filter pool reference
- * @param parent the parent DOM node for this new node, must be a node for an ISubSystem
- * @param fpr the filter pool reference from which to create the node
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return The DOM node for this filter pool reference
- */
- RSEDOMNode createNode(RSEDOMNode parent , ISystemFilterPoolReference fpr, boolean clean);
-
- /**
- * Creates a DOM node for a filter string
- * @param parent the parent DOM node for this new node, must be node for an ISystemFilter
- * @param fs the filter string from which to create the node
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return the DOM node for this filter string
- */
- RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterString fs, boolean clean);
-
-
- /**
- * Creates DOM nodes for each associated property set of a model object
- * @param parent the parent DOM node for these new nodes, can be DOM node for any RSE model object
- * @param mo the model object
- * @param clean true if the node should being created from scratch, false if the an existing
- * node should be found and merged
- * @return an array of DOM nodes for the property sets of an RSE model object
- */
- RSEDOMNode[] createPropertySetNodes(RSEDOMNode parent, IRSEModelObject mo, boolean clean);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMImporter.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMImporter.java
deleted file mode 100644
index a32344d89..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/IRSEDOMImporter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-
-public interface IRSEDOMImporter
-{
-
- /**
- * Restores the profile represented by dom
- * @param profileManager
- * @param dom
- * @return the restored profile
- */
- ISystemProfile restoreProfile(ISystemProfileManager profileManager, RSEDOM dom);
-
- /**
- * Restores the host represented by hostNode
- */
- IHost restoreHost(ISystemProfile profile, RSEDOMNode hostNode);
-
- /**
- * Restore the connector service represented by connectorServiceNode
- */
- IConnectorService restoreConnectorService(IHost host, RSEDOMNode connectorServiceNode);
-
- IServerLauncherProperties restoreServerLauncher(IConnectorService service, RSEDOMNode serverLauncherNode, IServerLauncherProperties slproperties);
-
- /**
- * Restores the subsystem represented by subSystemNode
- */
- ISubSystem restoreSubSystem(IHost host, RSEDOMNode subSystemNode);
-
-
- ISystemFilter restoreFilter(ISystemFilterPool filterPool, RSEDOMNode systemFilterNode);
-
- /**
- * Restore the filter pool represented by the node
- */
- ISystemFilterPool restoreFilterPool(ISystemProfile profile, RSEDOMNode systemFilterPoolNode);
-
- ISystemFilterPoolReference restoreFilterPoolReference(ISubSystem subSystem, RSEDOMNode systemFilterPoolReferenceNode);
- ISystemFilterString restoreFilterString(ISystemFilter filter, RSEDOMNode systemFilterStringNode);
-
- /**
- * Restores the property set represented by propertySetNode
- */
- IPropertySet restorePropertySet(IRSEModelObject modelObject, RSEDOMNode propertySetNode);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOM.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOM.java
deleted file mode 100644
index 20fee3fbf..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOM.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.core.model.ISystemProfile;
-
-/**
- * This class is the root node of an RSE DOM. Each
- * RSEDOM represents the properties of a profile to persist.
- */
-public class RSEDOM extends RSEDOMNode {
-
- /*
- * Recommended for serializable objects. This should be updated if there is a schema change.
- */
- private static final long serialVersionUID = 1L;
- private Job saveJob = null;
- private transient ISystemProfile _profile;
-
- public RSEDOM(ISystemProfile profile) {
- super(null, TYPE_PROFILE, profile.getName());
- _profile = profile;
- }
-
- public RSEDOM(String profileName) {
- super(null, TYPE_PROFILE, profileName);
- _profile = null;
- }
-
- public ISystemProfile getProfile() {
- return _profile;
- }
-
- /**
- * Indicate that this DOM needs to be saved
- */
- public void markForSave() {
- if (!restoring && !_needsSave) {
- _needsSave = true;
- }
- }
-
- /**
- * @return true if this DOM has the DOM changed since last saved or restored.
- */
- public boolean needsSave() {
- return _needsSave;
- }
-
- public void print(RSEDOMNode node, String indent) {
- String type = node.getType();
- String name = node.getName();
- RSEDOMNodeAttribute[] attributes = node.getAttributes();
- RSEDOMNode[] children = node.getChildren();
-
- System.out.println(indent + "RSEDOMNode " + type); //$NON-NLS-1$
- System.out.println(indent + "{"); //$NON-NLS-1$
- String sindent = indent + " "; //$NON-NLS-1$
-
- System.out.println(sindent + "name=" + name); //$NON-NLS-1$
- for (int i = 0; i < attributes.length; i++) {
- RSEDOMNodeAttribute attribute = attributes[i];
- String key = attribute.getKey();
- String value = attribute.getValue();
- System.out.println(sindent + key + "=" + value); //$NON-NLS-1$
- }
-
- String cindent = sindent + " "; //$NON-NLS-1$
- for (int c = 0; c < children.length; c++) {
- RSEDOMNode child = children[c];
- print(child, cindent);
- }
- System.out.println(indent + "}"); //$NON-NLS-1$
- }
-
- public Job getSaveJob() {
- return saveJob;
- }
-
- public void setSaveJob(Job saveJob) {
- this.saveJob = saveJob;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOMNode.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOMNode.java
deleted file mode 100644
index 928555e7c..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOMNode.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class RSEDOMNode implements IRSEDOMConstants, Serializable
-{
- /*
- * Recommended for serializable objects. This should be updated if there is a schema change.
- */
- private static final long serialVersionUID = 1L;
- protected String _type;
- protected String _name;
- protected RSEDOMNode _parent;
- protected List _children;
- protected List _attributes;
-
- protected boolean _needsSave = false;
- protected boolean _isDirty = true;
- protected boolean restoring = false;
-
- public RSEDOMNode(RSEDOMNode parent, String type, String name)
- {
- _type = type;
- _name = name;
- _parent = parent;
- _children = new ArrayList();
- _attributes = new ArrayList();
- if (parent != null)
- {
- parent.addChild(this);
- }
- }
-
- public void markUpdated()
- {
- if (_needsSave)
- {
- _needsSave = false;
-
- for (int i = 0; i < _children.size(); i++)
- {
- RSEDOMNode child = (RSEDOMNode)_children.get(i);
- child.markUpdated();
- }
- }
- }
-
- /**
- * Propagates the needs save indicator up to the root
- */
- public void markForSave()
- {
- if (!restoring && !_needsSave)
- {
- _needsSave = true;
- _parent.markForSave();
- }
- }
-
- /**
- * Recursively removes all the children from this node on down
- *
- */
- public void clearChildren()
- {
- RSEDOMNode[] children = getChildren();
- for (int i = 0; i < children.length; i++)
- {
- children[i].clearAttributes();
- children[i].clearChildren();
- }
- _children.clear();
- }
-
- /**
- * Clears all attributes
- *
- */
- public void clearAttributes()
- {
- _attributes.clear();
- }
-
- /**
- * @return the name of this node
- */
- public String getName()
- {
- return _name;
- }
-
- /**
- * @return the type of this node
- */
- public String getType()
- {
- return _type;
- }
-
- /**
- * @return the parent of this node
- */
- public RSEDOMNode getParent()
- {
- return _parent;
- }
-
- /**
- * @return all the children of this node
- */
- public RSEDOMNode[] getChildren()
- {
- return (RSEDOMNode[])_children.toArray(new RSEDOMNode[_children.size()]);
- }
-
- /**
- * @param key the name of this attribute
- * @return the first attribute found that has the specified name
- */
- public RSEDOMNodeAttribute getAttribute(String key)
- {
- for (int i = 0; i < _attributes.size(); i++)
- {
- RSEDOMNodeAttribute attribute = (RSEDOMNodeAttribute)_attributes.get(i);
- if (key.equals(attribute.getKey()))
- {
- return attribute;
- }
- }
- return null;
- }
-
- /**
- * @param type
- * @return the immediate children of this node that are of the specified type
- */
- public RSEDOMNode[] getChildren(String type)
- {
- List results = new ArrayList();
- for (int i = 0; i < _children.size(); i++)
- {
- RSEDOMNode child = (RSEDOMNode)_children.get(i);
- if (type.equals(child.getType()))
- {
- results.add(child);
- }
- }
- return (RSEDOMNode[])results.toArray(new RSEDOMNode[results.size()]);
- }
-
- /**
- * @param type
- * @param name
- * @return the first immediate child of this node that is of the specified type and name
- */
- public RSEDOMNode getChild(String type, String name)
- {
- for (int i = 0; i < _children.size(); i++)
- {
- RSEDOMNode child = (RSEDOMNode)_children.get(i);
- if (type.equals(child.getType()) && name.equals(child.getName()))
- {
- return child;
- }
- }
- return null;
- }
-
- /**
- * @return all the attributes for this node
- */
- public RSEDOMNodeAttribute [] getAttributes()
- {
- return (RSEDOMNodeAttribute[])_attributes.toArray(new RSEDOMNodeAttribute[_attributes.size()]);
- }
-
- /**
- * Adds a child to this node
- * @param child
- */
- public void addChild(RSEDOMNode child)
- {
- _children.add(child);
- markForSave();
- }
-
- /**
- * Removes a child from this node
- * @param child
- */
- public void removeChild(RSEDOMNode child)
- {
- _children.remove(child);
- markForSave();
- }
-
-
- /**
- * Adds an attribute to the node
- * @param name
- * @param value
- * @param type
- */
- public void addAttribute(String name, String value, String type)
- {
- RSEDOMNodeAttribute attr = new RSEDOMNodeAttribute(name, value, type);
- _attributes.add(attr);
- markForSave();
- }
-
- /**
- * Adds an attribute to the node
- * @param name
- * @param value
- */
- public void addAttribute(String name, String value)
- {
- RSEDOMNodeAttribute attr = new RSEDOMNodeAttribute(name, value);
- _attributes.add(attr);
- markForSave();
- }
-
- public boolean isDirty()
- {
- return _isDirty;
- }
-
- public void setDirty(boolean isDirty)
- {
- _isDirty = isDirty;
- }
-
- public void setRestoring(boolean restoring) {
- this.restoring = restoring;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java
deleted file mode 100644
index 15819a105..000000000
--- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.persistence.dom;
-
-import java.io.Serializable;
-
-public class RSEDOMNodeAttribute implements Serializable
-{
- private static final long serialVersionUID = 1L;
- private String _key;
- private String _value;
- private String _type;
-
- public RSEDOMNodeAttribute(String key, String value, String type)
- {
- _key = key;
- _value = value;
- _type = type;
- }
-
- public RSEDOMNodeAttribute(String key, String value)
- {
- _key = key;
- _value = value;
- _type = null;
- }
-
-
- public String getKey()
- {
- return _key;
- }
-
- public String getValue()
- {
- return _value;
- }
-
- public String getType()
- {
- return _type;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/plugin.properties b/rse/plugins/org.eclipse.rse.core/plugin.properties
deleted file mode 100644
index 568390d94..000000000
--- a/rse/plugins/org.eclipse.rse.core/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE Core
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.core/plugin.xml b/rse/plugins/org.eclipse.rse.core/plugin.xml
deleted file mode 100644
index 188a193f5..000000000
--- a/rse/plugins/org.eclipse.rse.core/plugin.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension-point id="systemTypes" name="RSE System Types" schema="schema/systemTypes.exsd"/>
-
-<!-- ================================================================= -->
-<!-- Define Persistence Provider extension point -->
-<!-- ================================================================= -->
- <extension-point id="persistenceProviders" name="%extPoint.persistenceProviders" schema="schema/persistenceProviders.exsd"/>
-
-
-
-<!-- ========================================================================= -->
-<!-- Persistence Providers -->
-<!-- ========================================================================= -->
- <extension
- point="org.eclipse.rse.core.persistenceProviders">
- <persistenceProvider
- class="org.eclipse.rse.internal.persistence.SerializingProvider"
- id="org.eclipse.rse.persistence.SerializingProvider"
- name="Serializing Persistence Provider"/>
- <persistenceProvider
- class="org.eclipse.rse.internal.persistence.PropertyFileProvider"
- id="org.eclipse.rse.persistence.PropertyFileProvider"
- name="Property File Persistence Provider"/>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.core/schema/persistenceProviders.exsd b/rse/plugins/org.eclipse.rse.core/schema/persistenceProviders.exsd
deleted file mode 100644
index ad369d32d..000000000
--- a/rse/plugins/org.eclipse.rse.core/schema/persistenceProviders.exsd
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.core" id="persistenceProviders" name="Persistence Providers"/>
- </appInfo>
- <documentation>
- This extension point is used to allow the delegation of profile persistence to vendors where needed.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="persistenceProvider" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="persistenceProvider">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique name that will be used to identify the persistence Provider.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name that will be used to identify this persistence Provider in the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified name of the Java class that implements the &lt;samp&gt;org.eclipse.rse.persistence.IRSEPersistenceProvider&lt;/samp&gt; interface.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.persistence.IRSEpersistenceProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of this extension point&apos;s usage:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.rse.core.persistenceProviders&quot;&gt;
- &lt;persistenceProvider
- id=&quot;org.eclipse.rse.persistence.DefaultRSEpersistenceProvider&quot;
- name=&quot;Default persistence Provider&quot;
- class=&quot;org.eclipse.rse.persistence.DefaultRSEpersistenceProvider&quot;&gt;
- &lt;/persistenceProvider&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Plug-ins that want to extend this extension point must implement &lt;samp&gt;org.eclipse.rse.persistence.IRSEPersistenceProvider&lt;/samp&gt; interface.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The Remote System Explorer in org.eclipse.rse.core provides a default implementation of this extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2006 IBM Corporation. All Rights Reserved.
-This program and the accompanying materials are made available under the terms
-of the Eclipse Public License v1.0 which accompanies this distribution, and is
-available at http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd b/rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd
deleted file mode 100644
index eb21c1363..000000000
--- a/rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.core" id="systemTypes" name="RSE System Types"/>
- </appInfo>
- <documentation>
- This extension point is used in combination with the org.eclipse.rse.ui.subsystemConfigurations
-extension point for defining new subsystems, which appear under a connection when it is expanded in the
-Remote Systems view. The systemTypes 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
-icon is used when the connection is not connected, while the other is used when there is a live connection.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="systemType" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="systemType">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name" icon="icon"/>
- </appInfo>
- <documentation>
- This element defines a remote system type like &quot;Linux&quot;, against which subsystem configurations can be registered.
- </documentation>
- </annotation>
- <complexType>
- <sequence minOccurs="0" maxOccurs="unbounded">
- <element ref="property"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique identifier for this extension.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The display name for the system type, such as &quot;Solaris&quot;. This name is also currently used when referencing the system type in filters, subsystem configurations and similar, therefore it is not translatable. Future versions of RSE may change this and reference the systemType id instead of the name.
-&lt;p&gt;
-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:
-&lt;ul&gt;
-&lt;li&gt;Local&lt;/li&gt;
-&lt;li&gt;Unix&lt;/li&gt;
-&lt;li&gt;Linux&lt;/li&gt;
-&lt;/ul&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- A short description of the system type. Shows up in preferences for system type.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- A relative path to an icon that will be used when displaying connections to systems of this type. If not specified, a default icon will be used by RSE.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="iconLive" type="string">
- <annotation>
- <documentation>
- A relative path to an icon that will be used when displaying connections to systems of this type, when there is a live connection to the remote system. This is usually a derivation of the icon attribute, adorned with a bright green arrow.
-If not specified, a default icon will be used by RSE.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="enableOffline" type="boolean">
- <annotation>
- <documentation>
- Whether this system type can be put in offline mode. This decides whether to show the Work Offline action for connections of this type. This is an optional attribute, the default value is false.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="property">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- <documentation>
- On optional property for the system type. The following property keys are already used internally, and are thus reserved:
-&lt;ul&gt;
-&lt;li&gt;&quot;icon&quot; to store the value of the icon attribute&lt;/li&gt;
-&lt;li&gt;&quot;iconLive&quot; to store the value of the iconLive attribute&lt;/li&gt;
-&lt;li&gt;&quot;enableOffline&quot; to store the value of the enableOffline attribute&lt;/li&gt;
-&lt;/ul&gt;
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="value" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of the extension point schema:
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.rse.core.systemTypes&quot;&gt;
- &lt;systemType id=&quot;com.acme.systemtype.Solaris&quot;
- name=&quot;Solaris&quot;
- description=&quot;Connects to Solaris systems.&quot;
- icon=&quot;icons/solaris.gif&quot;
- iconLive=&quot;icons/solarisLive.gif&quot;&gt;
- &lt;/systemType&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- There is no code to implement for this extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- See the plugin.xml file for plugin org.eclipse.rse.ui for examples of using this extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
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
deleted file mode 100644
index b711f05fb..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-/**
- * 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"; //$NON-NLS-1$
- public static final String PI_SYSTEM_TYPES = "systemTypes"; //$NON-NLS-1$
-
- /**
- * Returns all defined system types.
- * @return an array of all defined system types.
- */
- public IRSESystemType[] getSystemTypes();
-
- /**
- * Returns the names of all defined system types.
- * @return all defined system type names
- */
- 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 <code>null</code> if none is found
- */
- public IRSESystemType getSystemType(String name);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java
deleted file mode 100644
index 098a73cf5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kushal Munir (IBM) - Initial API and implementation.
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-/**
- * These constants define the set of preference names that the RSE core uses.
- */
-public interface IRSEPreferenceNames {
- public static final String ST_DEFAULT_USERID = "systemType.defaultUserId"; //$NON-NLS-1$
- public static final String ST_ENABLED = "systemType.enabled"; //$NON-NLS-1$
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java
deleted file mode 100644
index d2786a21c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.IAdaptable;
-import org.osgi.framework.Bundle;
-
-/**
- * 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 IRSESystemType extends IAdaptable {
-
- /**
- * Linux system type, "Linux".
- */
- public static final String SYSTEMTYPE_LINUX = "Linux"; //$NON-NLS-1$
-
- /**
- * Power Linux type, "Power Linux".
- */
- public static final String SYSTEMTYPE_POWER_LINUX = "Power Linux"; //$NON-NLS-1$
-
- /**
- * Power Linux type, "zSeries Linux".
- */
- public static final String SYSTEMTYPE_ZSERIES_LINUX = "zSeries Linux"; //$NON-NLS-1$
-
- /**
- * Unix system type, "Unix".
- */
- public static final String SYSTEMTYPE_UNIX = "Unix"; //$NON-NLS-1$
-
- /**
- * AIX system type, "AIX".
- */
- public static final String SYSTEMTYPE_AIX = "AIX"; //$NON-NLS-1$
-
- /**
- * PASE system type, "PASE".
- */
- public static final String SYSTEMTYPE_PASE = "PASE"; //$NON-NLS-1$
-
- /**
- * iSeries system type, "iSeries".
- */
- public static final String SYSTEMTYPE_ISERIES = "iSeries"; //$NON-NLS-1$
-
- /**
- * Local system type, "Local".
- */
- public static final String SYSTEMTYPE_LOCAL = "Local"; //$NON-NLS-1$
-
- /**
- * z/OS system type, "z/OS".
- */
- public static final String SYSTEMTYPE_ZSERIES = "z/OS"; //$NON-NLS-1$
-
- /**
- * Windows system type, "Windows".
- */
- public static final String SYSTEMTYPE_WINDOWS = "Windows"; //$NON-NLS-1$
-
- /**
- * 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.
- * <code>null</code> 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 <code>null</code> 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 <code>null</code> 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/IRSESystemTypeConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java
deleted file mode 100644
index 8d5c78568..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kushal Munir (IBM) - Initial API and implementation.
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-/**
- * These constants define the set of properties that the UI expects to
- * be available via <code>IRSESystemType.getProperty(String)</code>.
- *
- * @see org.eclipse.rse.core.IRSESystemType#getProperty(String)
- */
-public interface IRSESystemTypeConstants {
-
- public static final String ICON = "icon"; //$NON-NLS-1$
- public static final String ICON_LIVE = "iconLive"; //$NON-NLS-1$
- public static final String ENABLE_OFFLINE = "enableOffline"; //$NON-NLS-1$
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java
deleted file mode 100644
index 00b3bed8a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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;
-
-/**
- * Constants for user id management. Used when specifying the scope of a user id when
- * setting a user id.
- */
-public interface IRSEUserIdConstants {
-
- /**
- * Value 0. Location of user id has not yet been set. Used only as a return value.
- */
- public static final int USERID_LOCATION_NOTSET = 0;
-
- /**
- * Value 1. Location of user id is scoped to the connector service inside the host.
- */
- public static final int USERID_LOCATION_CONNECTORSERVICE = 1;
-
- /**
- * Value 2. Location of user id is scoped to the host, sometimes call "connection".
- */
- public static final int USERID_LOCATION_HOST = 2;
-
- /**
- * Value 3. Location of user id is scoped to system type. It will be the default
- * for all hosts of this system type that do not have a specified user id assigned.
- */
- public static final int USERID_LOCATION_DEFAULT_SYSTEMTYPE = 3;
-
- /**
- * Value 4. Location of user id is scoped to workspace.
- */
- public static final int USERID_LOCATION_DEFAULT_OVERALL = 4;
-
-} \ 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
deleted file mode 100644
index 3f8acaeaa..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.rse.core.internal.RSECoreRegistry;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.persistence.RSEPersistenceManager;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.rse.logging.LoggerFactory;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-import org.osgi.framework.BundleContext;
-
-/**
- * RSECorePlugin provides the activation for the RSE core and acts as the primary
- * registry for logging, persistence, and the main RSE service registries.
- * It should not be extended by other classes.
- */
-public class RSECorePlugin extends Plugin {
-
- private static RSECorePlugin plugin = null; // the singleton instance of this plugin
- private Logger logger = null;
- private ISystemRegistry _registry = null;
- private IRSEPersistenceManager _persistenceManager = null;
-
- /**
- * Returns the singleton instance of RSECorePlugin.
- * @return the singleton instance.
- */
- public static RSECorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * A static convenience method - fully equivalent to
- * <code>RSECorePlugin.getDefault().getPersistenceManager()</code>.
- * @return the persistence manager currently in use for RSE
- */
- public static IRSEPersistenceManager getThePersistenceManager() {
- return getDefault().getPersistenceManager();
- }
-
- /**
- * @return the IP host name of this machine
- */
- public static String getLocalMachineName() {
- String machineName = null;
- try {
- machineName = InetAddress.getLocalHost().getHostName();
- } catch (UnknownHostException e) {
- getDefault().log(e);
- }
- return machineName;
- }
-
- /**
- * @return the local IP address of this machine
- */
- public static String getLocalMachineIPAddress() {
- String machineAddress = null;
- try {
- machineAddress = InetAddress.getLocalHost().getHostAddress();
- } catch (UnknownHostException e) {
- getDefault().log(e);
- }
- return machineAddress;
- }
-
- /**
- * The constructor. This may be called only by plugin activation.
- */
- public RSECorePlugin() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- logger = LoggerFactory.getLogger(this);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- LoggerFactory.freeLogger(this);
- logger = null;
- plugin = null;
- }
-
- /**
- * @return the persistence manager used for persisting RSE profiles
- */
- public IRSEPersistenceManager getPersistenceManager() {
- if (_persistenceManager == null) {
- _persistenceManager = new RSEPersistenceManager(_registry);
- }
- return _persistenceManager;
- }
-
- /**
- * Sets the system registry. This is the main registry that can be used by RSE components
- * that require a user interface. This should be set only by RSE startup components and
- * not by any external client.
- * @param registry the implementation of ISystemRegistry that the core should remember.
- */
- public void setSystemRegistry(ISystemRegistry registry) {
- _registry = registry;
- }
-
- /**
- * Gets the system registry set by {@link #setSystemRegistry(ISystemRegistry)}.
- * This registry is used to gain access to the basic services and components used in
- * the RSE user interface.
- * @return the RSE system registry
- */
- public ISystemRegistry getSystemRegistry() {
- return _registry;
- }
-
- /**
- * 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. It contains methods to access
- * core services and components. It is distinct from, and more basic than, an implementation
- * of ISystemRegistry.
- * <p>
- * This may return null if the registry has not yet been set.
- * @return the RSE core registry.
- */
- public IRSECoreRegistry getRegistry() {
- return RSECoreRegistry.getDefault();
- }
-
- /**
- * Returns an instance of the logger being used by the core. All core services, or extensions to
- * core services, should use this logger to log any messages. The RSE logger provides run-time
- * filtering according to user preference and uses the platform's logging capabilities. RSE services
- * should use this logger rather than a platform logger. The logger is defined at plugin start and
- * should always be available.
- * @return the instance of System#Logger used by the core RSE
- */
- public Logger getLogger() {
- return logger;
- }
-
- /**
- * Log an unexpected exception that occurs during the functioning of this class.
- * @param t the exception to log
- */
- private void log(Throwable t) {
- getLogger().logError("Unexpected Exception", t); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/IRSEFilterNamingPolicy.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/IRSEFilterNamingPolicy.java
deleted file mode 100644
index 77d0cd7b1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/IRSEFilterNamingPolicy.java
+++ /dev/null
@@ -1,68 +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.filters;
-/**
- * Allows tool writers to specify the naming standards for the
- * persistence files and folders involved with filters.
- * <p>
- * Note that not all methods will be used for all saving policies.
- * <p>
- * @see org.eclipse.rse.core.filters.SystemFilterNamingPolicy#getNamingPolicy()
- */
-public interface IRSEFilterNamingPolicy
-{
- /**
- * Get the unqualified save file name for the given SystemFilterPoolManager object name.
- * Do NOT include the extension, as .xmi will be added.
- */
- public String getManagerSaveFileName(String managerName);
- /**
- * Get the unqualified save file name for the given SystemFilterPoolReferenceManager object name.
- * Do NOT include the extension, as .xmi will be added.
- */
- public String getReferenceManagerSaveFileName(String managerName);
- /**
- * Get the unqualified save file name for the given SystemFilterPool object name.
- * Do NOT include the extension, as .xmi will be added.
- */
- public String getFilterPoolSaveFileName(String poolName);
- /**
- * Get the file name prefix for all pool files.
- * Used to deduce the saved pools by examining the file system
- */
- public String getFilterPoolSaveFileNamePrefix();
- /**
- * Get the folder name for the given SystemFilterPool object name.
- */
- public String getFilterPoolFolderName(String poolName);
- /**
- * Get the folder name prefix for all pool folders.
- * Used to deduce the saved pools by examining the file system
- */
- public String getFilterPoolFolderNamePrefix();
- /**
- * Get the unqualified save file name for the given SystemFilter object name
- * Do NOT include the extension, as .xmi will be added.
- */
- public String getFilterSaveFileName(String filterName);
- /**
- * Get the file name prefix for all filter files.
- * Used to deduce the saved pools by examining the file system
- */
- public String getFilterSaveFileNamePrefix();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java
deleted file mode 100644
index b22a232e4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java
+++ /dev/null
@@ -1,706 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.filters;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.references.IRSEReferencedObject;
-
-
-/**
- * A representation of the model object '<em><b>System Filter</b></em>'.
- * A filter consists of filter strings and may be contained in a filter pool.
- * Filter pools will be referenced by subsystems.
- * Subsystems are responsible for interpreting the filters. Filters, in and
- * of themselves, provide no interpretation of themselves when applied
- * to the resources managed by a subsystem.
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#getType <em>Type</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isSupportsNestedFilters <em>Supports Nested Filters</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#getRelativeOrder <em>Relative Order</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isDefault <em>Default</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isStringsCaseSensitive <em>Strings Case Sensitive</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isPromptable <em>Promptable</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isSupportsDuplicateFilterStrings <em>Supports Duplicate Filter Strings</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isNonDeletable <em>Non Deletable</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isNonRenamable <em>Non Renamable</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isNonChangable <em>Non Changable</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isStringsNonChangable <em>Strings Non Changable</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#getRelease <em>Release</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#getNestedFilters <em>Nested Filters</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#getParentFilter <em>Parent Filter</em>}</li>
- * <li>{@link org.eclipse.rse.filters.ISystemFilter#getStrings <em>Strings</em>}</li>
- * </ul>
- * </p>
- *
- */
-/**
- * @lastgen interface SystemFilterPool extends SystemReferencedObject, SystemFilterContainer {}
- */
-public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContainer, IRSEModelObject
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * This is the name of the filter. It may be present in the user interface and is also
- * used to refer to the filter when it is persisted.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * This is the name of the filter. It may be present in the user interface and is also
- * used to refer to the filter when it is persisted.
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * Filters may be further typed for use by subsystems. The type is also uninterpreted by the
- * filter. The type may be used to select a parser/interpreter for the filter strings.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' attribute.
- * @see #setType(String)
- */
- String getType();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getType <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * Filters may be further typed for use by subsystems. The type is also uninterpreted by the
- * filter. The type may be used to select a parser/interpreter for the filter strings.
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Type</em>' attribute.
- * @see #getType()
- */
- void setType(String value);
-
- /**
- * Returns the value of the '<em><b>Supports Nested Filters</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * Specifies whether filters may be nested or not. If nested the intent is to apply this filter
- * to the results of the parent filter - further restricting the resources selected by the
- * parent filter. However, it is up to the subsystem to interpret exactly what "nesting" means.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Supports Nested Filters</em>' attribute.
- * @see #setSupportsNestedFilters(boolean)
- */
- boolean isSupportsNestedFilters();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSupportsNestedFilters <em>Supports Nested Filters</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * Specifies whether filters may be nested or not. If nested the intent is to apply this filter
- * to the results of the parent filter - further restricting the resources selected by the
- * parent filter. However, it is up to the subsystem to interpret exactly what "nesting" means.
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Supports Nested Filters</em>' attribute.
- * @see #isSupportsNestedFilters()
- */
- void setSupportsNestedFilters(boolean value);
-
- /**
- * Returns the value of the '<em><b>Relative Order</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Relative Order</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Relative Order</em>' attribute.
- * @see #setRelativeOrder(int)
- */
- int getRelativeOrder();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getRelativeOrder <em>Relative Order</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Relative Order</em>' attribute.
- * @see #getRelativeOrder()
- */
- void setRelativeOrder(int value);
-
- /**
- * Returns the value of the '<em><b>Default</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Default</em>' attribute.
- * @see #setDefault(boolean)
- */
- boolean isDefault();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isDefault <em>Default</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default</em>' attribute.
- * @see #isDefault()
- */
- void setDefault(boolean value);
-
- /**
- * Returns the value of the '<em><b>Strings Case Sensitive</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that may be used by the subystems when interpreting the filter. Used
- * to indicate whether or not comparisons involving the filter should be considered
- * case sensitive.
- * This attribute is optional and may be known (set) or unknown (unset).
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Strings Case Sensitive</em>' attribute.
- * @see #isSetStringsCaseSensitive()
- * @see #unsetStringsCaseSensitive()
- * @see #setStringsCaseSensitive(boolean)
- */
- boolean isStringsCaseSensitive();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isStringsCaseSensitive <em>Strings Case Sensitive</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that may be used by the subystems when interpreting the filter. Used
- * to indicate whether or not comparisons involving the filter should be considered
- * case sensitive.
- * This attribute is optional and may be known (set) or unknown (unset).
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Strings Case Sensitive</em>' attribute.
- * @see #isSetStringsCaseSensitive()
- * @see #unsetStringsCaseSensitive()
- * @see #isStringsCaseSensitive()
- */
- void setStringsCaseSensitive(boolean value);
-
- /**
- * Unsets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isStringsCaseSensitive <em>Strings Case Sensitive</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that may be used by the subystems when interpreting the filter. Used
- * to indicate whether or not comparisons involving the filter should be considered
- * case sensitive.
- * This attribute is optional and may be known (set) or unknown (unset).
- * </p>
- * <!-- end-user-doc -->
- * @see #isSetStringsCaseSensitive()
- * @see #isStringsCaseSensitive()
- * @see #setStringsCaseSensitive(boolean)
- */
- void unsetStringsCaseSensitive();
-
- /**
- * Returns whether the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isStringsCaseSensitive <em>Strings Case Sensitive</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that may be used by the subystems when interpreting the filter. Used
- * to indicate whether or not comparisons involving the filter should be considered
- * case sensitive.
- * This attribute is optional and may be known (set) or unknown (unset).
- * </p>
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Strings Case Sensitive</em>' attribute is set.
- * @see #unsetStringsCaseSensitive()
- * @see #isStringsCaseSensitive()
- * @see #setStringsCaseSensitive(boolean)
- */
- boolean isSetStringsCaseSensitive();
-
- /**
- * Returns the value of the '<em><b>Promptable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that may be used by the subystems when interpreting the filter.
- * Typically used to indicate whether or not some sort of prompting is to occur when the
- * filter is used. Typically used when applying a filter in the UI to indicate
- * the start of a wizard or dialog. It may also have an effect on whether
- * the state of the filter is saved when the workbench is shut down.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Promptable</em>' attribute.
- * @see #setPromptable(boolean)
- */
- boolean isPromptable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isPromptable <em>Promptable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that may be used by the subystems when interpreting the filter.
- * Typically used to indicate whether or not some sort of prompting is to occur when the
- * filter is used. Typically used when applying a filter in the UI to indicate
- * the start of a wizard or dialog. It may also have an effect on whether
- * the state of the filter is saved when the workbench is shut down.
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Promptable</em>' attribute.
- * @see #isPromptable()
- */
- void setPromptable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Supports Duplicate Filter Strings</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * This attribute may be used by subsystems when interpreting the filter.
- * Typically used when adding filter strings to the filter or as a hint when
- * applying the filter to the resources understood by the subsystem.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Supports Duplicate Filter Strings</em>' attribute.
- * @see #setSupportsDuplicateFilterStrings(boolean)
- */
- boolean isSupportsDuplicateFilterStrings();
-
- /**
- * Does this support duplicate filter strings?
- * A convenience method for {@link #isSupportsDuplicateFilterStrings()}.
- */
- public boolean supportsDuplicateFilterStrings();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSupportsDuplicateFilterStrings <em>Supports Duplicate Filter Strings</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * This attribute may be used by subsystems when interpreting the filter.
- * Typically used when adding filter strings to the filter or as a hint when
- * applying the filter to the resources understood by the subsystem.
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Supports Duplicate Filter Strings</em>' attribute.
- * @see #isSupportsDuplicateFilterStrings()
- */
- void setSupportsDuplicateFilterStrings(boolean value);
-
- /**
- * Returns the value of the '<em><b>Non Deletable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be deleted.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Non Deletable</em>' attribute.
- * @see #setNonDeletable(boolean)
- */
- boolean isNonDeletable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isNonDeletable <em>Non Deletable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be deleted.
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Non Deletable</em>' attribute.
- * @see #isNonDeletable()
- */
- void setNonDeletable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Non Renamable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be renamed.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Non Renamable</em>' attribute.
- * @see #setNonRenamable(boolean)
- */
- boolean isNonRenamable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isNonRenamable <em>Non Renamable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be renamed.
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Non Renamable</em>' attribute.
- * @see #isNonRenamable()
- */
- void setNonRenamable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Non Changable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be modifiable.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Non Changable</em>' attribute.
- * @see #setNonChangable(boolean)
- */
- boolean isNonChangable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isNonChangable <em>Non Changable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be modifiable.
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Non Changable</em>' attribute.
- * @see #isNonChangable()
- */
- void setNonChangable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Strings Non Changable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters contain filter strings that should not be modifiable.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Strings Non Changable</em>' attribute.
- * @see #setStringsNonChangable(boolean)
- */
- boolean isStringsNonChangable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isStringsNonChangable <em>Strings Non Changable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters contain filter strings that should not be modifiable.
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Strings Non Changable</em>' attribute.
- * @see #isStringsNonChangable()
- */
- void setStringsNonChangable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Release</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * This is an attribute specifying the release level of the
- * filter. This will be persisted in the filter definition and
- * can be used to migrate the internal form of the filter.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Release</em>' attribute.
- * @see #setRelease(int)
- */
- int getRelease();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getRelease <em>Release</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * This is an attribute specifying the release level of the
- * filter. This will be persisted in the filter definition and
- * can be used to migrate the internal form of the filter.
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Release</em>' attribute.
- * @see #getRelease()
- */
- void setRelease(int value);
-
- /**
- * Returns the value of the '<em><b>Single Filter String Only</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * This attribute specifies that the filter may contain only a single
- * filter string. Used by a filter manager to ensure that the
- * filter contains only one string. May, alternatively, be enforced
- * by the filter implementation.
- * </p><p>
- * This attribute may be set or unset. If unset then this value must not be
- * relied upon.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Single Filter String Only</em>' attribute.
- * @see #isSetSingleFilterStringOnly()
- * @see #unsetSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- boolean isSingleFilterStringOnly();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * This attribute specifies that the filter may contain only a single
- * filter string. Used by a filter manager to ensure that the
- * filter contains only one string. May, alternatively, be enforced
- * by the filter implementation.
- * </p><p>
- * This attribute may be set or unset. If unset then this value must not be
- * relied upon.
- * </p>
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Single Filter String Only</em>' attribute.
- * @see #isSetSingleFilterStringOnly()
- * @see #unsetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- */
- void setSingleFilterStringOnly(boolean value);
-
- /**
- * Unsets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- void unsetSingleFilterStringOnly();
-
- /**
- * Returns whether the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Single Filter String Only</em>' attribute is set.
- * @see #unsetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- boolean isSetSingleFilterStringOnly();
-
- /**
- * Returns the value of the '<em><b>Nested Filters</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.rse.core.filters.ISystemFilter}.
- * It is bidirectional and its opposite is '{@link org.eclipse.rse.core.filters.ISystemFilter#getParentFilter <em>Parent Filter</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If this filter can contain child filters this will return the list of children.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Nested Filters</em>' containment reference list.
- * @see org.eclipse.rse.core.filters.ISystemFilter#getParentFilter
- */
- List getNestedFilters();
-
- /**
- * Returns the value of the '<em><b>Parent Filter</b></em>' container reference.
- * It is bidirectional and its opposite is '{@link org.eclipse.rse.core.filters.ISystemFilter#getNestedFilters <em>Nested Filters</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If this filter can be nested inside another this will return the parent filter. Will be
- * null if there is no parent.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Parent Filter</em>' container reference.
- * @see #setParentFilter(ISystemFilter)
- * @see org.eclipse.rse.core.filters.ISystemFilter#getNestedFilters
- */
- ISystemFilter getParentFilter();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getParentFilter <em>Parent Filter</em>}' container reference.
- * <!-- begin-user-doc -->
- * This is used by a filter manager to set the parent filter when one filter is nested inside another.
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Parent Filter</em>' container reference.
- * @see #getParentFilter()
- */
- void setParentFilter(ISystemFilter value);
-
- /**
- * Returns the value of the '<em><b>Strings</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.rse.core.filters.ISystemFilterString}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the value of the '<em>Strings</em>' containment reference list.
- */
- java.util.List getStrings();
-
- /**
- * @return the parent pool of this filter. For nested filters, this will walk up the parent chain
- * until we find the pool. May return null if this is a simple filter that has no parent pool.
- */
- public ISystemFilterPool getParentFilterPool();
-
- /**
- * Internal use method to set the parent filter pool. This should be invoked only by a filter manager
- * or a filter pool manager when adding a filter to a filter pool.
- * @param parentPool the filter pool that contains or will contain this filter.
- */
- public void setParentFilterPool(ISystemFilterPool parentPool);
-
- /**
- * Set this filter's filter strings by giving a Vector of String objects.
- * This will construct the filter strings objects.
- * @param strings the vector of String objects.
- */
- public void setFilterStrings(Vector strings);
-
- /**
- * Set this filter's filter strings by giving an array of String objects.
- * This will construct the filter strings objects.
- * @param strings the array of String objects.
- */
- public void setFilterStrings(String[] strings);
-
- /**
- * @return this filter's filter strings as a Vector of String objects
- */
- public Vector getFilterStringsVector();
-
- /**
- * @return this filter's filter strings as a Vector of IFilterString objects
- */
- public Vector getFilterStringObjectsVector();
-
- /**
- * @return this filter's filter strings as an array of String objects
- */
- public String[] getFilterStrings();
-
- /**
- * @return this filter's filter string objects as an array of IFilterString objects
- */
- public ISystemFilterString[] getSystemFilterStrings();
-
- /**
- * @return the number of filter strings this filter currently contains.
- */
- public int getFilterStringCount();
-
- /**
- * @return a filter string given its string value. This will be null if there
- * is no string matching the argument.
- */
- public ISystemFilterString getSystemFilterString(String string);
-
- /**
- * Append a new filter string to this filter's list of filter strings.
- * This will construct a filter string object.
- * @param newString the string to append
- */
- public ISystemFilterString addFilterString(String newString);
-
- /**
- * Insert a new filter string to this filter's list, at the given zero-based position.
- * Thsi will construct a filter string object.
- * @param newString the string from which to construct the filter string to be added.
- * @param position the zero-based position at which to add the string.
- */
- public ISystemFilterString addFilterString(String newString, int position);
-
- /**
- * Update a new filter string's string value.
- * The filter string need not belong to this filter.
- * @param filterString the string update.
- * @param newValue the new value of that string.
- */
- public void updateFilterString(ISystemFilterString filterString, String newValue);
-
- /**
- * Delete a filter string from this filter's list.
- * @param oldString the string to remove
- * @return the SystemFilterString object deleted, or null if not found
- */
- public ISystemFilterString removeFilterString(String oldString);
-
- /**
- * Remove a filter string from this filter's list, given its zero-based position
- * @param position the position of the filter string.
- * @return the SystemFilterString object deleted, or null if not found
- */
- public ISystemFilterString removeFilterString(int position);
-
- /**
- * Remove a filter string from this filter's list, given its SystemFilterString object.
- * The specific filter string will be removed, based on object identity.
- * @param filterString the filterString to be removed.
- * @return true if the given string existed and hence was deleted.
- */
- public boolean removeFilterString(ISystemFilterString filterString);
-
- /**
- * Move a given filter string to a given zero-based location. This will
- * do nothing if the argument is not a string already contained by this filter.
- * @param pos the new position of this filter string
- * @param filterString the filter string to move
- */
- public void moveSystemFilterString(int pos, ISystemFilterString filterString);
-
- /**
- * Copies a given filter string from this filter to another filter in this pool or another pool
- * in this manager or another manager. Will do nothing if the filter string is not
- * originally contained in this filter.
- * @param targetFilter the filter to which to copy the filter string
- * @param oldFilterString the filter string to copy
- */
- public ISystemFilterString copySystemFilterString(ISystemFilter targetFilter, ISystemFilterString oldFilterString);
-
- /**
- * @return true if this filter is a nested filter or not. If not, its parent is the filter pool.
- */
- public boolean isNested();
-
- /**
- * @return true if this a transient or simple filter that is not intended to be
- * saved or part of the filter framework. It will have no manager or provider.
- */
- public boolean isTransient();
-
- /**
- * Clones a given filter to the given target filter.
- * All filter strings, and all nested filters, are copied.
- * Typically used when copying a whole filter.
- * @param targetFilter new filter into which all the data of this filter will be copied.
- */
- public void clone(ISystemFilter targetFilter);
-
- /**
- * @return the ISystemFilterContainer parent of this filter. This will be either
- * an ISystemFilterPool or an ISystemFilter if this is a nested filter.
- */
- public ISystemFilterContainer getParentFilterContainer();
-
- /**
- * @return the caller which instantiated the filter pool manager overseeing this filter framework instance.
- * This will typically be a subsystem configuration.
- */
- public ISystemFilterPoolManagerProvider getProvider();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterConstants.java
deleted file mode 100644
index 8db448e14..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterConstants.java
+++ /dev/null
@@ -1,41 +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.filters;
-/**
- * Constants used throughout filters framework.
- */
-public interface ISystemFilterConstants extends ISystemFilterSavePolicies
-{
- /**
- * Parameter value on create operations when a restore should be attempted first
- */
- public static final boolean TRY_TO_RESTORE_YES = true;
- /**
- * Parameter value on create operations when no restore should be attempted first
- */
- public static final boolean TRY_TO_RESTORE_NO = false;
-
- /**
- * Suffix used when persisting data to a file.
- */
- public static final String SAVEFILE_SUFFIX = ".xmi"; //$NON-NLS-1$
-
- /**
- * Default value for the type attribute for filter pools, filters and filterstrings
- */
- public static final String DEFAULT_TYPE = "default"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainer.java
deleted file mode 100644
index 1d95dfbf0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainer.java
+++ /dev/null
@@ -1,127 +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.filters;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.persistance.IRSEPersistableContainer;
-
-/**
- * Filter containers are any objects that contain filters.
- * This includes filter pools and filters themselves.
- */
-public interface ISystemFilterContainer extends IRSEPersistableContainer {
- /**
- * @return the filter pool manager managing this collection of filter pools and their filters.
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager();
-
- /**
- * @return The value of the StringsCaseSensitive attribute
- * Are filters in this filter container case sensitive?
- * If not set locally, queries the parent filter pool manager's atttribute.
- */
- public boolean areStringsCaseSensitive();
-
- /**
- * Adds a new system filter to this container (SystemFilterPool or SystemFilter) and
- * populates it with the filter strings created from the strings provided.
- * Does nothing if this filter already exists in this container.
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- */
- public ISystemFilter createSystemFilter(String aliasName, Vector filterStrings);
-
- /**
- * Adds given filter to the list without populating the filter strings.
- * @param filter SystemFilter object to add
- * @return true if added, false if a filter with this aliasname already existed.
- */
- public boolean addSystemFilter(ISystemFilter filter);
-
- /**
- * @return Vector of String objects: the names of existing filters in this container.
- * Typically used by name validators for New and Rename actions to verify new name is unique.
- */
- public Vector getSystemFilterNames();
-
- /**
- * @return a Vector of the ISystemFilter objects contained in this filter container.
- */
- public Vector getSystemFiltersVector();
-
- /**
- * @return an array of the ISystemFilter objects contained in this filter container.
- */
- public ISystemFilter[] getSystemFilters();
-
- /**
- * @return a system filter given its name. Will return null if no filter by this name is found.
- */
- public ISystemFilter getSystemFilter(String filterName);
-
- /**
- * @return the parent pool of this container.
- * If this is itself a pool, returns "this".
- * For a nested filter, returns the pool that is the ultimate parent of this filter.
- */
- public ISystemFilterPool getSystemFilterPool();
-
- /**
- * @return how many filters are directly defined in this filter container.
- */
- public int getSystemFilterCount();
-
- /**
- * Removes a given filter from the list. Will do nothing if the specified filter
- * is not in this filter container.
- * @param filter SystemFilter object to remove
- */
- public void deleteSystemFilter(ISystemFilter filter);
-
- /**
- * Renames a given filter in the list. The new name is assumed to be valid.
- * Will perform the rename whether or not the filter is contained in this
- * container.
- * @param filter SystemFilter object to rename
- * @param newName New name to assign it.
- */
- public void renameSystemFilter(ISystemFilter filter, String newName);
-
- /**
- * @return a given filter's zero-based location. Will return -1 if the filter
- * is not present in this container.
- */
- public int getSystemFilterPosition(ISystemFilter filter);
-
- /**
- * Move a given filter to a given zero-based location.
- * Does nothing if the filter is not in this container.
- * @param pos the new position of the filter.
- * @param filter the filter to move.
- */
- public void moveSystemFilter(int pos, ISystemFilter filter);
-
- /**
- * Updates a given filter.
- * The filter need not be present in this container but will operate on
- * any filter.
- * @param filter SystemFilter object to update
- * @param newName New name to assign it. Assumes unique checking already done.
- * @param newStrings New strings to assign it. Replaces current strings.
- */
- public void updateSystemFilter(ISystemFilter filter, String newName, String[] newStrings);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainerReference.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainerReference.java
deleted file mode 100644
index f0841f8cd..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainerReference.java
+++ /dev/null
@@ -1,85 +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.filters;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * Both ISystemFilter and ISystemFilterPool may contain filters, so the
- * common methods for filters are abstracted out in SystemFilterContainer,
- * which both classes implement.
- * Both ISystemFilterReference and ISystemFilterPoolReference hold references
- * to ISystemFilterContainer objects.
- * There are methods common to both classes, related to
- * getting an array of references to the filters that are held by the referenced
- * object.
- * This interface captures those common methods, and both
- * SystemFilterReference and SystemFilterPoolReference
- * implement this interface and hence these methods.
- */
-public interface ISystemFilterContainerReference {
- /**
- * @return the filter container object which is referenced.
- */
- public ISystemFilterContainer getReferencedSystemFilterContainer();
-
- /**
- * Build and return an array of SystemFilterReference objects.
- * Each object is created new. There is one for each of the filters
- * in the reference SystemFilter or SystemFilterPool.
- * For performance reasons, we will cache this array and only
- * return a fresh one if something changes in the underlying
- * filter list.
- * @param subSystem the subsystem from which to get the filter references.
- */
- public ISystemFilterReference[] getSystemFilterReferences(ISubSystem subSystem);
-
- /**
- * Finds an existing filter in a particular subsystem.
- * @param subSystem the subsystem in which to look for the filter reference.
- * @param filter the filter for which to look.
- * @return an existing reference to a given system filter.
- * If no reference currently exists to this filter, returns null.
- * @see #getSystemFilterReference(ISubSystem, ISystemFilter)
- */
- public ISystemFilterReference getExistingSystemFilterReference(ISubSystem subSystem, ISystemFilter filter);
-
- /**
- * Find or create a single filter refererence to a given filter.
- * If there already is a reference to this filter, in this subsystem it will be returned.
- * If not, a new reference is created and added at the end of the list of filter references.
- * @param subSystem the subsystem in which to find or create the filter.
- * @param filter the filter to for which to create a reference.
- * @see #getExistingSystemFilterReference(ISubSystem, ISystemFilter)
- */
- public ISystemFilterReference getSystemFilterReference(ISubSystem subSystem, ISystemFilter filter);
-
- /**
- * @return the name of the SystemFilter or SystemFilterPool that we reference.
- */
- public String getName();
-
- /**
- * @return true if this container has filters.
- */
- public boolean hasFilters();
-
- /**
- * @return the number of filters in the referenced container
- */
- public int getFilterCount();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java
deleted file mode 100644
index d1a320015..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java
+++ /dev/null
@@ -1,342 +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.filters;
-
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.references.IRSEPersistableReferencedObject;
-
-/**
- * This interface represents a system filter pool, which is a means of
- * grouping filters.<br>
- * By default this is represented as a folder on disk, with each filter
- * stored as a file in that folder.
- */
-/**
- * @lastgen interface SystemFilterPool extends SystemPersistableReferencedObject, SystemFilterContainer {}
- */
-public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISystemFilterContainer, IRSEModelObject {
- // external methods
- /**
- * Return the caller which instantiated the filter pool manager overseeing this filter framework instance
- */
- public ISystemFilterPoolManagerProvider getProvider();
-
- /**
- * Set the naming policy used when saving data to disk.
- * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
- */
- public void setNamingPolicy(IRSEFilterNamingPolicy namingPolicy);
-
- /**
- * Get the naming policy currently used when saving data to disk.
- * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
- */
- public IRSEFilterNamingPolicy getNamingPolicy();
-
- /**
- * Does this filter support nested filters?
- */
- public boolean supportsNestedFilters();
-
- /**
- * Does this support duplicate filter strings? Calls mof-generated isSupportsDuplicateFilterStrings.
- */
- public boolean supportsDuplicateFilterStrings();
-
- /**
- * @return The value of the StringsCaseSensitive attribute
- * Are filter strings in this filter case sensitive?
- * If not set locally, queries the parent filter pool manager's atttribute.
- */
- public boolean isStringsCaseSensitive();
-
- /**
- * Set the filter pool manager.
- */
- public void setSystemFilterPoolManager(ISystemFilterPoolManager mgr);
-
- /**
- * Return the filter pool manager managing this collection of filter pools and their filters.
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager();
-
- /**
- * This is to set transient data that is queryable via getFilterPoolData
- */
- public void setSystemFilterPoolData(Object data);
-
- /**
- * Return transient data set via setFilterPoolData.
- */
- public Object getSystemFilterPoolData();
-
- /**
- * Clone this filter pools' attributes and filters into another filter pool.
- * Assumes the core attributes were already set when filter pool was created:
- * <ul>
- * <li>Name
- * <li>Deletable
- * <li>Supports nested filters
- * <li>Manager
- * </ul>
- * Attributes we clone:
- * <ul>
- * <li>Data
- * <li>Type
- * <li>Default
- * </ul>
- */
- public void cloneSystemFilterPool(ISystemFilterPool targetPool) throws Exception;
-
- /**
- * Copy a system filter to this or another filter pool.
- */
- public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) throws Exception;
-
- /**
- * Order filters according to user preferences.
- * <p>
- * While the framework has all the code necessary to arrange filters and save/restore
- * that arrangement, you may choose to use preferences instead of this support.
- * In this case, call this method and pass in the saved and sorted filter name list.
- * <p>
- * Called by someone after restore.
- */
- public void orderSystemFilters(String[] names);
-
- /**
- * Set the save file policy. See constants in SystemFilterConstants. One of:
- * <ul>
- * <li>SAVE_POLICY_ONE_FILE_PER_POOL
- * <li>SAVE_POLICY_ONE_FILE_PER_FILTER
- * </ul>
- * This method is called by the SystemFilterPoolManager.
- */
- public void setSavePolicy(int policy);
-
- public String getId();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Name attribute
- */
- String getName();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Name attribute
- */
- void setName(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Type attribute
- * Allows tools to have typed filter pools
- */
- String getType();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Type attribute
- */
- void setType(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the SupportsNestedFilters attribute
- */
- boolean isSupportsNestedFilters();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the SupportsNestedFilters attribute
- */
- void setSupportsNestedFilters(boolean value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Deletable attribute
- */
- boolean isDeletable();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Deletable attribute
- */
- void setDeletable(boolean value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Default attribute
- * Is this a default vendor-supplied pool versus user-created pool
- */
- boolean isDefault();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Default attribute
- */
- void setDefault(boolean value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the StringsCaseSensitive attribute
- */
- void setStringsCaseSensitive(boolean value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * Unsets the StringsCaseSensitive attribute
- */
- void unsetStringsCaseSensitive();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return <b>true</b> if the StringsCaseSensitive attribute has been set
- */
- boolean isSetStringsCaseSensitive();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The list of Filters references
- */
- java.util.List getFilters();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the SupportsDuplicateFilterStrings attribute
- */
- boolean isSupportsDuplicateFilterStrings();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the SupportsDuplicateFilterStrings attribute
- */
- void setSupportsDuplicateFilterStrings(boolean value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Release attribute
- * In what release was this created? Typically, will be the version and release
- * times 10, as in 40 or 51.
- */
- int getRelease();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Release attribute
- */
- void setRelease(int value);
-
- /**
- * Returns the value of the '<em><b>Single Filter String Only</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Single Filter String Only</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Single Filter String Only</em>' attribute.
- * @see #isSetSingleFilterStringOnly()
- * @see #unsetSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- boolean isSingleFilterStringOnly();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Single Filter String Only</em>' attribute.
- * @see #isSetSingleFilterStringOnly()
- * @see #unsetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- * @generated
- */
- void setSingleFilterStringOnly(boolean value);
-
- /**
- * Unsets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- * @generated
- */
- void unsetSingleFilterStringOnly();
-
- /**
- * Returns whether the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Single Filter String Only</em>' attribute is set.
- * @see #unsetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- * @generated
- */
- boolean isSetSingleFilterStringOnly();
-
- /**
- * Returns the value of the '<em><b>Owning Parent Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Owning Parent Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Owning Parent Name</em>' attribute.
- * @see #setOwningParentName(String)
- */
- String getOwningParentName();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#getOwningParentName <em>Owning Parent Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Owning Parent Name</em>' attribute.
- * @see #getOwningParentName()
- * @generated
- */
- void setOwningParentName(String value);
-
- /**
- * Returns the value of the '<em><b>Non Renamable</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Non Renamable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Non Renamable</em>' attribute.
- * @see #setNonRenamable(boolean)
- */
- boolean isNonRenamable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isNonRenamable <em>Non Renamable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Non Renamable</em>' attribute.
- * @see #isNonRenamable()
- * @generated
- */
- void setNonRenamable(boolean value);
-
- public ISystemFilterPool createSystemFilterPool(String name, boolean allowNestedFilters, boolean isDeletable, boolean tryToRestore);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java
deleted file mode 100644
index 86688ac0a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java
+++ /dev/null
@@ -1,621 +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.filters;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.persistance.IRSEPersistableContainer;
-
-/**
- * A filter pool manager manages filter pools.
- * <p>
- * Each filter pool that is managed becomes a folder on disk.
- * <p>
- * To create a filter pool manager instance, use the factory methods
- * in SystemFilterPoolManagerImpl in the ...impl package.
- * You must pass a folder that represents the anchor point for the
- * pools managed by this manager instance.
- * <p>
- * Depending on your tools' needs, you have four choices about how
- * the filter pools and filters are persisted to disk. The decision is
- * made at the time you instantiate the pool manager and is one of the
- * following constants from the {@link SystemFilterConstants} interface:
- * <ul>
- * <li>SAVE_POLICY_ONE_FILE_PER_MANAGER - one file: mgrName.xmi
- * <li>SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool
- * <li>SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder
- * <li>SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool
- * </ul>
- * <p>
- * With the policy of one file per pool, there are two possibilities regarding
- * the folder structure:
- * <ul>
- * <li>Each pool gets its own subfolder, and the pool's xmi file goes in
- * the pool's unique subfolder: SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL
- * <li>There are no subfolders per pool, all the xmi pool files go in the
- * same folder as specified when creating this manager instance:
- * SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER
- * </ul>
- * <p>
- * With the policy of one file per filter, each filter pool must have its own folder.
- * <p>
- * With an instantiated filter pool manager (most tools will only need
- * one such instance), you now simply call its methods to work with
- * filter pools. For example, use it to:
- * <ul>
- * <li>Restore all filter pools from disk
- * <li>Save all, or individual, filter pools to disk
- * <li>Get a list of existing filter pools
- * <li>Create filter pools
- * <li>Delete filter pools
- * <li>Re-order filter pools
- * <li>Clone filter pools
- * <li>Rename filter pools
- * <li>Save all, or individual, filter pools
- * </ul>
- * All the underlying file system work is handled for you.
- * <p>
- * Further, this is the front door for working with filters too. By forcing all
- * filter related activity through a single point like this, we can ensure that
- * all changes are saved to disk, and events are fired properly.
- */
-/**
- * @lastgen interface SystemFilterPoolManager {}
- */
-public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
- // ---------------------------------
- // ATTRIBUTE METHODS
- // ---------------------------------
- /**
- * Return the caller which instantiated the filter pool manager
- */
- public ISystemFilterPoolManagerProvider getProvider();
-
- /**
- * Return the owning profile for this provider
- */
- public ISystemProfile getSystemProfile();
-
- /**
- * Set the caller instance which instantiated the filter pool manager.
- * This is only recorded to enable getProvider from any filter framework object.
- */
- public void setProvider(ISystemFilterPoolManagerProvider caller);
-
- /**
- * This is to set transient data that is subsequently queryable.
- */
- public void setSystemFilterPoolManagerData(Object data);
-
- /**
- * Return transient data set via setFilterPoolDataManager.
- */
- public Object getSystemFilterPoolManagerData();
-
- /**
- * Return the name of this manager.
- * This matches the name of the folder, which is the parent of the individual filter pool folders.
- */
- public String getName();
-
- /**
- * Set the name of this manager.
- */
- public void setName(String name);
-
- /**
- * Return attribute indicating if filter pools managed by this manager support nested filters.
- */
- public boolean supportsNestedFilters();
-
- /**
- * Return attribute indicating if filters managed by this manager support nested duplicate filter strings.
- */
- public boolean supportsDuplicateFilterStrings();
-
- /**
- * Set attribute indicating if filter pools managed by this manager support nested filters, by default.
- */
- public void setSupportsNestedFilters(boolean supports);
-
- /**
- * Set attribute indicating if filters managed by this manager support duplicate filter strings, by default.
- */
- public void setSupportsDuplicateFilterStrings(boolean supports);
-
- /**
- * @return The value of the StringsCaseSensitive attribute
- * Are filter strings in this filter case sensitive?
- */
- public boolean isStringsCaseSensitive();
-
- /**
- * @return The value of the StringsCaseSensitive attribute
- * Are filter strings in this filter case sensitive?
- * Same as isStringsCaseSensitive()
- */
- public boolean areStringsCaseSensitive();
-
- /**
- * Return false if the instantiation of this filter pool manager resulting in a new manager versus a restoration
- */
- public boolean wasRestored();
-
- // ---------------------------------
- // FILTER POOL METHODS
- // ---------------------------------
- /**
- * Get array of filter pool names currently existing.
- */
- public String[] getSystemFilterPoolNames();
-
- /**
- * Get vector of filter pool names currently existing.
- */
- public Vector getSystemFilterPoolNamesVector();
-
- /**
- * Return array of SystemFilterPools managed by this manager.
- */
- public ISystemFilterPool[] getSystemFilterPools();
-
- /**
- * Given a filter pool name, return that filter pool object.
- * If not found, returns null.
- */
- public ISystemFilterPool getSystemFilterPool(String name);
-
- /**
- * Return the first pool that has the default attribute set to true.
- * If none found, returns null.
- */
- public ISystemFilterPool getFirstDefaultSystemFilterPool();
-
- /**
- * Create a new filter pool.
- * Inherits the following attributes from this manager:
- * <ul>
- * <li>data ... the transient data to be associated with every filter pool and filter
- * <li>supportsNestedFilters ... whether filters in the pool can themselves contain filters
- * </ul>
- * <p>
- * If a pool of this name already exists, null will be returned.
- * <p>
- * Depending on the save policy, a new folder to hold the pool may be created. Its name will
- * be derived from the pool name.
- * <p>
- * If the operation is successful, the pool will be saved to disk.
- * <p>
- * If this operation fails unexpectedly, an exception will be thrown.
- */
- public ISystemFilterPool createSystemFilterPool(String name, boolean isDeletable) throws Exception;
-
- /**
- * Delete a given filter pool. Dependending on the save policy, the
- * appropriate file or folder on disk will also be deleted.
- * <p>
- * Does the following:
- * <ul>
- * <li>Removes all references
- * <li>Removes pool object from in-memory model
- * <li>Removes folder from disk for policies of one folder per pool
- * <li>Removes file from disk for policy of one file per pool
- * <li>Saves model to disk for policy of one file per manager
- * <li>Invalidates in-memory caches
- * <li>Calls back to inform caller of this event
- * </ul>
- * @param pool The filter pool object to physically delete
- */
- public void deleteSystemFilterPool(ISystemFilterPool pool) throws Exception;
-
- /**
- * Delete all existing filter pools. Call this when you are about to delete this manager, say.
- */
- public void deleteAllSystemFilterPools();
-
- /**
- * Pre-test if we are going to run into any trouble renaming any of the files or folders
- * used to persist a filter pool.
- * @return true if everything seems ok, false if a file/folder is in use.
- */
- public boolean preTestRenameFilterPool(ISystemFilterPool pool) throws Exception;
-
- /**
- * Rename a given filter pool. Dependending on the save policy, the
- * appropriate file or folder on disk will also be renamed.
- * <p>
- * Does the following:
- * <ul>
- * <li>Renames referencing objects
- * <li>Renames pool object in the in-memory model
- * <li>Renames folder on disk for policies of one folder per pool
- * <li>Renames file on disk for policy of one file per pool
- * <li>Saves model to disk for policy of one file per manager
- * <li>Invalidates in-memory caches
- * </ul>
- * @param pool The filter pool object to physically rename
- * @param newName The new name to give the pool
- */
- public void renameSystemFilterPool(ISystemFilterPool pool, String newName) throws Exception;
-
- /**
- * Copy the specified filter pool from this manager to this manager or another manager.
- * <p>
- * Does the following:
- * <ul>
- * <li>Clones all filters within the pool
- * <li>Clones all filter strings within each filter
- * <li>Asks target manager to save to disk
- * <li>Calls back to target manager provider, unless callbacks are suspended
- * </ul>
- * @param targetMgr The target manager to copy our filter pool to. Can be this manager, but target pool name must be unique.
- * @param pool The filter pool to copy
- * @param newName The new name to give the copied pool
- * @return the new copy of the copied system filter pool
- */
- public ISystemFilterPool copySystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool pool, String newName) throws Exception;
-
- /**
- * Copy all filter pools from this manager to another manager.
- * <p>
- * Does the following:
- * <ul>
- * <li>Clones all filter pools
- * <li>Clones all filters within each pool
- * <li>Clones all filter strings within each filter
- * <li>Asks target manager to save to disk
- * <li>Does not callback to caller to fire events, assumes caller doesn't want to know
- * </ul>
- * @param targetMgr The target manager to copy our filter pools to
- */
- public void copySystemFilterPools(ISystemFilterPoolManager targetMgr) throws Exception;
-
- /**
- * Move the specified filter pool from this manager to another manager.
- * <p>
- * Does the following:
- * <ul>
- * <li>Performs a {@link #copySystemFilterPool(ISystemFilterPoolManager, ISystemFilterPool, String) copySystemFilterPool} operation.
- * <li>If copy is successful, updates all references to reference the new copy.
- * <li>If copy is successful, deletes original filter pool in this manager
- * <li>If this final delete fails, deletes the copied version and restore original references
- * <li>Asks target manager to save to disk
- * <li>Saves this manager to disk
- * <li>Calls back to both targer manager provider and this manager provider, unless callbacks are suspended
- * </ul>
- * @param targetMgr The target manager to move our filter pool to. Cannot be this manager.
- * @param oldPool The filter pool to move
- * @param newName The new name to give the moved pool
- * @return the new copy of the moved system filter pool
- */
- public ISystemFilterPool moveSystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool oldPool, String newName) throws Exception;
-
- // ---------------------------------
- // FILTER METHODS
- // ---------------------------------
- /**
- * Creates a new system filter within the given filter container (either a filter pool, or
- * a filter). This creates the filter, and then saves the filter pool.
- * <p>Calls back to provider to inform of the event (filterEventFilterCreated)
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, Vector filterStrings) throws Exception;
-
- /**
- * Creates a new system filter that is typed.
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String, Vector)} but
- * takes a filter type as an additional parameter.
- * <p>
- * A filter's type is an arbitrary string that is not interpreted or used by the base framework. This
- * is for use entirely by tools who wish to support multiple types of filters and be able to launch unique
- * actions per type, say.
- *
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- * @param type The type of this filter
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, Vector filterStrings, String type) throws Exception;
-
- /**
- * Creates a new system filter that is typed and promptable
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String ,Vector, String)} but
- * takes a boolean indicating if it is promptable.
- * <p>
- * A promptable filter is one in which the user is prompted for information at expand time.
- * There is no base filter framework support for this, but tools can query this attribute and
- * do their own thing at expand time.
- *
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- * @param type The type of this filter
- * @param promptable Pass true if this is a promptable filter
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, Vector filterStrings, String type, boolean promptable) throws Exception;
-
- /**
- * Delete an existing system filter.
- * Does the following:
- * <ul>
- * <li>Removes filter from its parent in memory.
- * <li>If appropriate for the save policy, deletes the filter's file from disk.
- * <li>Save the SystemFilterPool which direct or indirectly contains the filter.
- * <li>Calls back to provider to inform of the event (filterEventFilterDelete)
- * </ul>
- */
- public boolean deleteSystemFilter(ISystemFilter filter) throws Exception;
-
- /**
- * Renames a filter. This is better than filter.setName(String newName) as it
- * saves the parent pool to disk.
- * <p>
- * Does the following:
- * <ul>
- * <li>Renames the object in the in-memory cache
- * <li>If appropriate for the save policy, rename's the filter's file on disk.
- * <li>Save parent filter pool's in-memory object to disk.
- * <li>Calls back to provider to inform of the event (filterEventFilterRenamed)
- * </ul>
- */
- public void renameSystemFilter(ISystemFilter filter, String newName) throws Exception;
-
- /**
- * Updates a filter. This is better than doing it directly as it saves it to disk.
- * <p>
- * Does the following:
- * <ul>
- * <li>Updates the object in the in-memory cache
- * <li>Save parent filter pool's in-memory object to disk.
- * <li>Calls back to provider to inform of the event (filterEventFilterUpdated). Will be two callbacks if the name is changed ((filterEventFilterRenamed)
- * </ul>
- */
- public void updateSystemFilter(ISystemFilter filter, String newName, String[] strings) throws Exception;
-
- /**
- * Sets a filter's type. This is better than calling filter.setType(String) directly as it saves the filter to disk after.
- * <p>
- * A filter's type is an arbitrary string that is not interpreted or used by the base framework. This
- * is for use entirely by tools who wish to support multiple types of filters and be able to launch unique
- * actions per type, say.
- * @param filter The parent which is either a SystemFilter
- * @param newType The type of this filter
- */
- public void setSystemFilterType(ISystemFilter filter, String newType) throws Exception;
-
- /**
- * Copy a system filter to a pool in this or another filter manager.
- */
- public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) throws Exception;
-
- /**
- * Return the zero-based position of a SystemFilter object within its container
- */
- public int getSystemFilterPosition(ISystemFilter filter);
-
- /**
- * Move a system filter to a pool in this or another filter manager.
- * Does this by first copying the filter, and only if successful, deleting the old copy.
- */
- public ISystemFilter moveSystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) throws Exception;
-
- /**
- * Move existing filters a given number of positions in the same container.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- * <p>
- * Does the following:
- * <ul>
- * <li>After the move, the pool containing the filter is saved to disk.
- * <li>Calls back to provider to inform of the event (filterEventFiltersRePositioned)
- * </ul>
- * @param filters Array of SystemFilters to move.
- * @param delta the amount by which to move the filters
- */
- public void moveSystemFilters(ISystemFilter filters[], int delta) throws Exception;
-
- /**
- * Order filters according to user preferences.
- * <p>
- * While the framework has all the code necessary to arrange filters and save/restore
- * that arrangement, you may choose to use preferences instead of this support.
- * In this case, call this method and pass in the saved and sorted filter name list.
- * <p>
- * Called by someone after restore.
- */
- public void orderSystemFilters(ISystemFilterPool pool, String[] names) throws Exception;
-
- // -------------------------------
- // SYSTEM FILTER STRING METHODS...
- // -------------------------------
- /**
- * Append a new filter string to the given filter's list
- * <p>
- * Does the following:
- * <ul>
- * <li>Adds the filter string to the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringCreated)
- * </ul>
- */
- public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString) throws Exception;
-
- /**
- * Insert a new filter string to the given filter's list, at the given zero-based position
- * <p>
- * Does the following:
- * <ul>
- * <li>Adds the filter string to the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringCreated)
- * </ul>
- */
- public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString, int position) throws Exception;
-
- /**
- * Remove a filter string from this filter's list, given its SystemFilterString object.
- * <p>
- * Does the following:
- * <ul>
- * <li>Removes the filter string from the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
- * </ul>
- * @return true if the given string existed and hence was deleted.
- */
- public boolean removeSystemFilterString(ISystemFilter filter, ISystemFilterString filterString) throws Exception;
-
- /**
- * Delete a filter string from the given filter's list
- * <p>
- * Does the following:
- * <ul>
- * <li>Removes the filter string from the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
- * </ul>
- * @return true if given string was found and hence was deleted.
- */
- public boolean removeSystemFilterString(ISystemFilter filter, String oldString) throws Exception;
-
- /**
- * Remove a filter string from the given filter's list, given its zero-based position
- * <p>
- * Does the following:
- * <ul>
- * <li>Removes the filter string from the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
- * </ul>
- * @return true if a string existed at the given position and hence was deleted.
- */
- public boolean removeSystemFilterString(ISystemFilter filter, int position) throws Exception;
-
- /**
- * Update a filter string's string vale
- * <p>
- * Does the following:
- * <ul>
- * <li>Update the filter string in the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringUpdated)
- * </ul>
- */
- public void updateSystemFilterString(ISystemFilterString filterString, String newValue) throws Exception;
-
- /**
- * Return the zero-based position of a SystemFilterString object within its filter
- */
- public int getSystemFilterStringPosition(ISystemFilterString filterString);
-
- /**
- * Copy a system filter string to a filter in this or another filter pool manager.
- */
- public ISystemFilterString copySystemFilterString(ISystemFilter targetFilter, ISystemFilterString oldFilterString) throws Exception;
-
- /**
- * Move a system filter string to a filter in this or another filter pool manager.
- * Does this by doing a copy operation, then if successful doing a delete operation.
- */
- public ISystemFilterString moveSystemFilterString(ISystemFilter targetFilter, ISystemFilterString oldFilterString) throws Exception;
-
- /**
- * Move existing filter strings a given number of positions in the same filter
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- * <p>
- * Does the following:
- * <ul>
- * <li>After the move, the filter pool containing the filter containing the filter strings is saved to disk.
- * <li>Calls back to provider to inform of the event (filterEventFilterStringsRePositioned)
- * </ul>
- * @param filterStrings Array of SystemFilterStrings to move.
- * @param delta the amount by which to move the filters
- */
- public void moveSystemFilterStrings(ISystemFilterString filterStrings[], int delta) throws Exception;
-
- // -----------------------------------
- // SUSPEND/RESUME CALLBACKS METHODS...
- // -----------------------------------
- /**
- * Suspend callbacks to the provider
- */
- public void suspendCallbacks(boolean suspend);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the SupportsNestedFilters attribute
- */
- boolean isSupportsNestedFilters();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the StringsCaseSensitive attribute
- */
- void setStringsCaseSensitive(boolean value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The list of Pools references
- */
- java.util.List getPools();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the SupportsDuplicateFilterStrings attribute
- */
- boolean isSupportsDuplicateFilterStrings();
-
- /**
- * @generated This field/method will be replaced during code generation
- * Unsets the SupportsDuplicateFilterStrings attribute
- */
- void unsetSupportsDuplicateFilterStrings();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return <b>true</b> if the SupportsDuplicateFilterStrings attribute has been set
- */
- boolean isSetSupportsDuplicateFilterStrings();
-
- /**
- * Returns the value of the '<em><b>Single Filter String Only</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Single Filter String Only</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Single Filter String Only</em>' attribute.
- * @see #setSingleFilterStringOnly(boolean)
- */
- boolean isSingleFilterStringOnly();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPoolManager#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Single Filter String Only</em>' attribute.
- * @see #isSingleFilterStringOnly()
- * @generated
- */
- void setSingleFilterStringOnly(boolean value);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManagerProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManagerProvider.java
deleted file mode 100644
index 207d66963..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManagerProvider.java
+++ /dev/null
@@ -1,132 +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.filters;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * An interface for classes that instantiate SystemFilterPoolManager objects.
- * This is the "caller" and as is recorded and recoverable from any object within
- * the filter framework. This enables callers to get back instances of themselves
- * given any filter object. Important when enabling UI actions against user
- * selected filter framework objects
- * <p>
- * Further, the goal is the allow all the filter framework UI actions to work
- * independently, able to fully handle all actions without intervention on the
- * provider's part. However, often the provider needs to be informed of all events
- * in order to fire events to update its GUI. So this interface captures those
- * callbacks that done to the provider for every interesting event. Should you
- * not care about these, supply empty shells for these methods.
- */
-public interface ISystemFilterPoolManagerProvider extends IAdaptable
-{
-
- /**
- * Return the unique id for this provider
- * @return the id
- */
- public String getId();
-
- /**
- * Return the manager object for the given manager name.
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager(String managerName);
- /**
- * Return all the manager objects this provider owns
- */
- public ISystemFilterPoolManager[] getSystemFilterPoolManagers();
- /**
- * Return all the manager objects this provider owns, to which it wants
- * to support referencing from the given filter reference manager.
- * <p>
- * Called by SystemFilterPoolReferenceManager.
- */
- public ISystemFilterPoolManager[] getReferencableSystemFilterPoolManagers(ISystemFilterPoolReferenceManager refMgr);
- /**
- * Last chance call, by a filter pool reference manager, when a reference to a filter
- * pool is found but the referenced master filter pool is not found in those the reference
- * manager by getSystemFilterPoolManagers().
- * <p>
- * If this returns null, then this broken reference will be deleted
- */
- public ISystemFilterPool getSystemFilterPoolForBrokenReference(ISystemFilterPoolReferenceManager callingRefenceMgr,
- String missingPoolMgrName, String missingPoolName);
-
- // ---------------------
- // FILTER POOL EVENTS...
- // ---------------------
- /**
- * A new filter pool has been created
- */
- public void filterEventFilterPoolCreated(ISystemFilterPool newPool);
- /**
- * A filter pool has been deleted
- */
- public void filterEventFilterPoolDeleted(ISystemFilterPool oldPool);
- /**
- * A filter pool has been renamed
- */
- public void filterEventFilterPoolRenamed(ISystemFilterPool pool, String oldName);
- /**
- * One or more filter pools have been re-ordered within their manager
- */
- public void filterEventFilterPoolsRePositioned(ISystemFilterPool[] pools, int delta);
-
- // ---------------------
- // FILTER EVENTS...
- // ---------------------
- /**
- * A new filter has been created
- */
- public void filterEventFilterCreated(ISystemFilter newFilter);
- /**
- * A filter has been deleted
- */
- public void filterEventFilterDeleted(ISystemFilter oldFilter);
- /**
- * A filter has been renamed
- */
- public void filterEventFilterRenamed(ISystemFilter filter, String oldName);
- /**
- * A filter's strings have been updated
- */
- public void filterEventFilterUpdated(ISystemFilter filter);
- /**
- * One or more filters have been re-ordered within their pool or filter (if nested)
- */
- public void filterEventFiltersRePositioned(ISystemFilter[] filters, int delta);
-
- // -----------------------
- // FILTER STRING EVENTS...
- // -----------------------
- /**
- * A new filter string has been created
- */
- public void filterEventFilterStringCreated(ISystemFilterString newFilterString);
- /**
- * A filter string has been deleted
- */
- public void filterEventFilterStringDeleted(ISystemFilterString oldFilterString);
- /**
- * A filter string has been updated
- */
- public void filterEventFilterStringUpdated(ISystemFilterString filterString);
- /**
- * One or more filters have been re-ordered within their filter
- */
- public void filterEventFilterStringsRePositioned(ISystemFilterString[] filterStrings, int delta);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReference.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReference.java
deleted file mode 100644
index 2f6f0fece..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReference.java
+++ /dev/null
@@ -1,75 +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.filters;
-
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.references.IRSEPersistableReferencingObject;
-
-/**
- * Interface implemented by references to filter pools. Filter pools are stored at the profile
- * level, while subsystems contain references to one or more pools. A pool can be referenced
- * by multiple connections. Pools don't go away until explicitly deleted by the user, regardless
- * of their reference count.
- */
-public interface ISystemFilterPoolReference extends IRSEPersistableReferencingObject, ISystemFilterContainerReference, IRSEModelObject {
- /**
- * @return the reference manager which is managing this filter pool reference
- */
- public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager();
-
- /**
- * @return the object which instantiated the pool reference manager object.
- * Makes it easy to get back to the point of origin, given any filter pool reference.
- */
- public ISystemFilterPoolReferenceManagerProvider getProvider();
-
- /**
- * @return the simple name of the filter pool we reference. Not qualified by the manager name.
- */
- public String getReferencedFilterPoolName();
-
- /**
- * @return name of the filter pool manager containing the pool we reference.
- */
- public String getReferencedFilterPoolManagerName();
-
- /**
- * Reset the name of the filter pool we reference.
- * Called on filter pool rename operations.
- * @param newName the new name of the filer pool
- */
- public void resetReferencedFilterPoolName(String newName);
-
- /**
- * Set the filter pool that we reference.
- * This should also call addReference(this) on that pool.
- * @param pool the pool to which this reference refers.
- */
- public void setReferenceToFilterPool(ISystemFilterPool pool);
-
- /**
- * @return referenced filter pool object.
- * This may be null if the reference is broken
- * or is yet to be resolved.
- */
- public ISystemFilterPool getReferencedFilterPool();
-
- /**
- * @return the fully qualified name that includes the name of the filter pool manager
- */
- public String getFullName();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java
deleted file mode 100644
index e9d8cb086..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java
+++ /dev/null
@@ -1,297 +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.filters;
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.rse.core.references.IRSEBasePersistableReferenceManager;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This class manages a persistable list of objects each of which reference
- * a filter pool. This class builds on the parent class SystemPersistableReferenceManager,
- * offering convenience versions of the parent methods that are typed to the
- * classes in the filters framework.
- */
-/**
- * @lastgen interface SystemFilterPoolReferenceManager extends SystemPersistableReferenceManager {}
- */
-public interface ISystemFilterPoolReferenceManager extends IRSEBasePersistableReferenceManager {
- /**
- * Get the object which instantiated this instance of the filter pool reference manager.
- * This is also available from any filter reference framework object.
- */
- public ISystemFilterPoolReferenceManagerProvider getProvider();
-
- /**
- * Set the object which instantiated this instance of the filter pool reference manager.
- * This makes it available to retrieve from any filter reference framework object,
- * via the ubiquitous getProvider interface method.
- */
- public void setProvider(ISystemFilterPoolReferenceManagerProvider caller);
-
- /**
- * Turn off callbacks to the provider until turned on again.
- */
- public void setProviderEventNotification(boolean fireEvents);
-
- // ------------------------------------------------------------
- // Methods for setting and querying related filterpool manager
- // ------------------------------------------------------------
- /*
- * Set the managers of the master list of filter pools, from which
- * objects in this list reference.
- * NOW DELETED SO THAT WE DYNAMICALLY QUERY THIS LIST FROM THE
- * ASSOCIATED SYSTEMFILTERPOOLMANAGER PROVIDER, SO IT IS ALWAYS UP
- * TO DATE. psc.
- */
- //public void setSystemFilterPoolManagers(SystemFilterPoolManager[] mgrs);
- /**
- * Set the associated master pool manager provider. Note the provider
- * typically manages multiple pool managers and we manage references
- * across those.
- */
- public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider poolMgrProvider);
-
- /**
- * Get the associated master pool manager provider. Note the provider
- * typically manages multiple pool managers and we manage references
- * across those.
- */
- public ISystemFilterPoolManagerProvider getSystemFilterPoolManagerProvider();
-
- /**
- * Get the managers of the master list of filter pools, from which
- * objects in this list reference.
- */
- public ISystemFilterPoolManager[] getSystemFilterPoolManagers();
-
- /**
- * Get the managers of the master list of filter pools, from which
- * objects in this list reference, but which are not in the list of
- * managers our pool manager supplier gives us. That is, these are
- * references to filter pools outside the expected list.
- * @return null if no unmatched managers found, else an array of such managers.
- */
- public ISystemFilterPoolManager[] getAdditionalSystemFilterPoolManagers();
-
- /**
- * Set the default manager of the master list of filter pools, from which
- * objects in this list reference.
- */
- public void setDefaultSystemFilterPoolManager(ISystemFilterPoolManager mgr);
-
- /**
- * Get the default manager of the master list of filter pools, from which
- * objects in this list reference.
- */
- public ISystemFilterPoolManager getDefaultSystemFilterPoolManager();
-
- // ---------------------------------------------------
- // Methods that work on FilterPool referencing objects
- // ---------------------------------------------------
- /**
- * Ask each referenced pool for its name, and update it.
- * Called after the name of the pool or its manager changes.
- */
- public void regenerateReferencedSystemFilterPoolNames();
-
- /**
- * Return array of SystemFilterPoolReference objects.
- * Result will never be null, although it may be an array of length zero.
- */
- public ISystemFilterPoolReference[] getSystemFilterPoolReferences();
-
- /**
- * In one shot, set the filter pool references
- * <p> Calls back to inform provider
- * @param filterPoolReferences of filter pool reference objects to set the list to.
- * @param deReference true to first de-reference all objects in the existing list.
- */
- public void setSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolReferences, boolean deReference);
-
- /**
- * Add a filter pool referencing object to the list.
- * @return the new count of referencing objects
- */
- public int addSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference);
-
- /**
- * Reset the filter pool a reference points to. Called on a move-filter-pool operation
- */
- public void resetSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference, ISystemFilterPool newPool);
-
- /**
- * Remove a filter pool referencing object from the list.
- * @param filterPoolReference the reference to remove
- * @param deReference true if we want to dereference the referenced object (call removeReference on it)
- * @return the new count of referencing objects
- */
- public int removeSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference, boolean deReference);
-
- /**
- * Return count of referenced filter pools
- */
- public int getSystemFilterPoolReferenceCount();
-
- /**
- * Return the zero-based position of a SystemFilterPoolReference object within this list
- */
- public int getSystemFilterPoolReferencePosition(ISystemFilterPoolReference filterPoolRef);
-
- /**
- * Move a given filter pool reference to a given zero-based location
- * <p> Calls back to inform provider
- */
- public void moveSystemFilterPoolReference(ISystemFilterPoolReference filterPoolRef, int pos);
-
- /**
- * Move existing filter pool references a given number of positions.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- * <p> Calls back to inform provider
- * @param filterPoolRefs Array of SystemFilterPoolReferences to move.
- * @param delta the amount by which to move the filter pool references.
- */
- public void moveSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolRefs, int delta);
-
- // ----------------------------------------------
- // Methods that work on FilterPool master objects
- // ----------------------------------------------
- /**
- * Return array of filter pools currently referenced by this manager
- * Result will never be null, although it may be an array of length zero.
- */
- public ISystemFilterPool[] getReferencedSystemFilterPools();
-
- /**
- * Return true if the given filter pool has a referencing object in this list.
- */
- public boolean isSystemFilterPoolReferenced(ISystemFilterPool filterPool);
-
- /**
- * Given a filter pool, locate the referencing object for it and return it.
- * @return the referencing object if found, else null
- */
- public ISystemFilterPoolReference getReferenceToSystemFilterPool(ISystemFilterPool filterPool);
-
- /**
- * Given a filter pool, create a referencing object and add it to the list.
- * <p> Calls back to inform provider
- * @return new filter pool reference
- */
- public ISystemFilterPoolReference addReferenceToSystemFilterPool(ISystemFilterPool filterPool);
-
- /**
- * Given a filter pool name, create a referencing object and add it to the list.
- * This creates an unresolved reference to that filter pool. It will be resolved on first use.
- * <p> Calls back to inform provider
- * @param filterPoolManager the manager that can be used to resolve the reference.
- * @param filterPoolName the name of the filter pool being referenced.
- * @return new filter pool reference
- */
- public ISystemFilterPoolReference addReferenceToSystemFilterPool(ISystemFilterPoolManager filterPoolManager, String filterPoolName);
-
- /**
- * Given a filter pool, locate the referencing object for it and remove it from the list.
- * <p> Calls back to inform provider
- * @return the new count of referencing objects
- */
- public int removeReferenceToSystemFilterPool(ISystemFilterPool filterPool);
-
- /**
- * A reference filter pool has been renamed. Update our stored name...
- * <p> Calls back to inform provider
- */
- public void renameReferenceToSystemFilterPool(ISystemFilterPool pool);
-
- /**
- * In one shot, set the filter pool references to new references to supplied filter pools.
- * <p> Calls back to inform provider
- * @param filterPools of filter pool objects to create references for
- * @param deReference true to first de-reference all objects in the existing list.
- */
- public void setSystemFilterPoolReferences(ISystemFilterPool[] filterPools, boolean deReference);
-
- // -------------------------
- // SPECIAL CASE METHODS
- // -------------------------
- /**
- * Create a single filter refererence to a given filter. Needed when a filter
- * is added to a pool, and the GUI is not showing pools but rather all filters
- * in all pool references.
- */
- public ISystemFilterReference getSystemFilterReference(ISubSystem subSystem, ISystemFilter filter);
-
- /**
- * Concatenate all filter references from all filter pools we reference, into one
- * big list.
- */
- public ISystemFilterReference[] getSystemFilterReferences(ISubSystem subSystem);
-
- /**
- * Given a filter reference, return its position within this reference manager
- * when you think of all filter references from all filter pool references as
- * being concatenated
- */
- public int getSystemFilterReferencePosition(ISystemFilterReference filterRef);
-
- /**
- * Given a filter, return its position within this reference manager
- * when you think of all filter references from all filter pool references as
- * being concatenated
- */
- public int getSystemFilterReferencePosition(ISubSystem subSystem, ISystemFilter filter);
-
- // -------------------------
- // SAVE / RESTORE METHODS...
- // -------------------------
- /**
- * After restoring this from disk, there is only the referenced object name,
- * not the referenced object pointer, for each referencing object.
- * <p>
- * This method is called after restore and for each restored object in the list must:
- * <ol>
- * <li>Do what is necessary to find the referenced object, and set the internal reference pointer.
- * <li>Call addReference(this) on that object so it can maintain it's in-memory list
- * of all referencing objects.
- * <li>Set the important transient variables
- * </ol>
- * @param relatedPoolMgrProvider the creator of the filter pool managers that hold filter pools we reference
- * @param provider the host of this reference manager, so you can later call getProvider
- * @return A Vector of SystemFilterPoolReferences that were not successfully resolved, or null if all
- * were resolved.
- */
- public Vector resolveReferencesAfterRestore(ISystemFilterPoolManagerProvider relatedPoolMgrProvider, ISystemFilterPoolReferenceManagerProvider provider);
-
- /**
- * Save all the filter pool references to disk.
- * Use only if not doing your own saving, else override or set save policy to none.
- */
- public void save() throws Exception;
-
- /**
- * Return the folder that this manager is contained in.
- */
- public IFolder getFolder();
-
- /**
- * Reset the folder that this manager is contained in.
- */
- public void resetManagerFolder(IFolder newFolder);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManagerProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManagerProvider.java
deleted file mode 100644
index 4c99e41e3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManagerProvider.java
+++ /dev/null
@@ -1,94 +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.filters;
-/**
- * An interface for classes that instantiate SystemFilterPoolReferenceManager objects.
- * This is the "caller" and as is recorded and recoverable from any object within
- * the filter reference framework. This enables callers to get back instances of themselves
- * given any filter reference object. Important when enabling UI actions against user
- * selected filter reference framework objects
- * <p>
- * Further, the goal is the allow all the filter framework UI actions to work
- * independently, able to fully handle all actions without intervention on the
- * provider's part. However, often the provider needs to be informed of all events
- * in order to fire events to update its GUI. So this interface captures those
- * callbacks that done to the provider for every interesting event. Should you
- * not care about these, supply empty shells for these methods.
- */
-public interface ISystemFilterPoolReferenceManagerProvider
-{
- /**
- * Return the SystemFilterPoolReferenceManager object this provider holds/provides.
- */
- public ISystemFilterPoolReferenceManager getSystemFilterPoolReferenceManager();
- /**
- * Return the owning filter pool that is unique to this provider
- */
- public ISystemFilterPool getUniqueOwningSystemFilterPool(boolean createIfNotFound);
-
- // -------------------------------
- // FILTER POOL REFERENCE EVENTS...
- // -------------------------------
- /**
- * A new filter pool reference has been created
- */
- public void filterEventFilterPoolReferenceCreated(ISystemFilterPoolReference newPoolRef);
- /**
- * A filter pool reference has been deleted
- */
- public void filterEventFilterPoolReferenceDeleted(ISystemFilterPoolReference filterPoolRef);
- /**
- * A single filter pool reference has been reset to reference a new pool
- */
- public void filterEventFilterPoolReferenceReset(ISystemFilterPoolReference filterPoolRef);
- /**
- * All filter pool references has been reset
- */
- public void filterEventFilterPoolReferencesReset();
- /**
- * A filter pool reference has been renamed (ie, its reference filter pool renamed)
- */
- public void filterEventFilterPoolReferenceRenamed(ISystemFilterPoolReference poolRef, String oldName);
- /**
- * One or more filter pool references have been re-ordered within their manager
- */
- public void filterEventFilterPoolReferencesRePositioned(ISystemFilterPoolReference[] poolRefs, int delta);
- // -------------------------------
- // FILTER REFERENCE EVENTS...
- // -------------------------------
- /**
- * A new filter has been created. This is called when a filter pool reference is selected and a new filter
- * is created, so that the provider can expand the selected filter pool reference and reveal the new filter
- * within the selected pool reference.
- * <p>
- * Only the selected node should be expanded if not already. All other references to this pool will already
- * have been informed of the new addition, and will have refreshed their children but not expanded them.
- */
- public void filterEventFilterCreated(Object selectedObject, ISystemFilter newFilter);
- // ---------------------------------
- // FILTER STRING REFERENCE EVENTS...
- // ---------------------------------
- /**
- * A new filter string has been created. This is called when a filter reference is selected and a new filter
- * string is created, so that the provider can expand the selected filter reference and reveal the new filter
- * string within the selected filter reference.
- * <p>
- * Only the selected node should be expanded if not already. All other references to this filter will already
- * have been informed of the new addition, and will have refreshed their children but not expanded them.
- */
- public void filterEventFilterStringCreated(Object selectedObject, ISystemFilterString newFilterString);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolSelectionValidator.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolSelectionValidator.java
deleted file mode 100644
index 8bf3f6fc4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolSelectionValidator.java
+++ /dev/null
@@ -1,41 +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.filters;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * An interface required if you wish to be called back by the
- * system filter wizard, when the user selects a target filter pool.
- */
-public interface ISystemFilterPoolSelectionValidator
-{
-
- /**
- * Delimiter used to qualify filter names by filter pool name, when calling
- * filter pool selection validator in new filter wizard.
- */
- public static final String DELIMITER_FILTERPOOL_FILTER = "_____"; //$NON-NLS-1$
-
- /**
- * Validate the given selection.
- * @param filterPool the user-selected filter pool
- * @return null if no error, else a SystemMessage
- */
- public SystemMessage validate(ISystemFilterPool filterPool);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapper.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapper.java
deleted file mode 100644
index 0129a7448..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapper.java
+++ /dev/null
@@ -1,33 +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.filters;
-/**
- * The system filter wizard allows callers to pass a list of wrapper objects
- * for the user to select a filter pool
- */
-public interface ISystemFilterPoolWrapper
-{
-
- /**
- * Get the name to display in the combo box for this wrapper
- */
- public String getDisplayName();
- /**
- * Get the wrappered SystemFilterPool object
- */
- public ISystemFilterPool getSystemFilterPool();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapperInformation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapperInformation.java
deleted file mode 100644
index f0cdf3983..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapperInformation.java
+++ /dev/null
@@ -1,51 +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.filters;
-/**
- * The system filter wizard allows callers to pass a list of wrapper objects
- * for the user to select a filter pool. Effectively, this prompting for
- * euphamisms to filter pools. This requires an array of wrapper objects,
- * and requires replacement mri for the pool prompt and tooltip text, and
- * the verbage above it.
- * <p>
- * This is all encapsulated in this interface. There is also a class offered
- * that implements all this and is populated via setters.
- */
-public interface ISystemFilterPoolWrapperInformation
-{
-
- /**
- * Get the label
- */
- public String getPromptLabel();
-
- /**
- * Get the tooltip
- */
- public String getPromptTooltip();
-
- public String getVerbageLabel();
- /**
- * Get the list of wrappered filter pool objects to show in the combo. The wrappering allows
- * each to be displayed with a different name in the list than just pool.getName()
- */
- public ISystemFilterPoolWrapper[] getWrappers();
- /**
- * Get the wrapper to preselect in the list.
- */
- public ISystemFilterPoolWrapper getPreSelectWrapper();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterReference.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterReference.java
deleted file mode 100644
index 57638d116..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterReference.java
+++ /dev/null
@@ -1,101 +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.filters;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemContentsType;
-import org.eclipse.rse.core.references.IRSEReferencingObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-/**
- * Represents a shadow or reference to a system filter.
- * Such references are only transient, not savable to disk.
- */
-/**
- * @lastgen interface SystemFilterReference extends SystemReferencingObject, SystemFilterContainerReference {}
- */
-public interface ISystemFilterReference extends IRSEReferencingObject, ISystemFilterContainerReference, ISystemContainer
-{
- /**
- * Return the reference manager which is managing this filter reference
- * framework object.
- */
- public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager();
-
- /**
- * Return the object which instantiated the pool reference manager object.
- * Makes it easy to get back to the point of origin, given any filter reference
- * framework object
- */
- public ISystemFilterPoolReferenceManagerProvider getProvider();
-
- /**
- * Gets the subsystem that contains this reference
- * @return the subsystem
- */
- public ISubSystem getSubSystem();
-
- /**
- * Sets the subsystem that contains this reference
- * @param subSystem
- */
- public void setSubSystem(ISubSystem subSystem);
-
- /**
- * Return the filter to which we reference...
- */
- public ISystemFilter getReferencedFilter();
- /**
- * Set the filter to which we reference...
- */
- public void setReferencedFilter(ISystemFilter filter);
-
- /**
- * Get the parent of this reference.
- * It will be either a SystemFilterPoolReference, or
- * a SystemFilterReference(if nested).
- */
- public ISystemFilterContainerReference getParent();
- /**
- * Get parent or super parent filter pool reference.
- */
- public ISystemFilterPoolReference getParentSystemFilterReferencePool();
-
- // -------------------------------------------------
- // Methods for returning filter string references...
- // -------------------------------------------------
- /**
- * Return the number of filter strings in the referenced filter
- */
- public int getSystemFilterStringCount();
- /**
- * Get the filter strings contained by this filter. But get references to each,
- * not the masters.
- */
- public ISystemFilterStringReference[] getSystemFilterStringReferences();
- /**
- * Create a single filter string refererence to a given filter string
- */
- public ISystemFilterStringReference getSystemFilterStringReference(ISystemFilterString filterString);
-
- /*
- * Sets the cached contents for this filter reference. If the filter changes or is refreshed, these cached
- * items will be removed.
- */
- public void setContents(ISystemContentsType type, Object[] cachedContents);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterSavePolicies.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterSavePolicies.java
deleted file mode 100644
index 60c8e1439..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterSavePolicies.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.filters;
-/**
- * A save policy dictates how filter framework artifacts are persisted to disk.
- */
-public interface ISystemFilterSavePolicies
-{
- /**
- * No saving. All save/restoring handled elsewhere.
- */
- public static final int SAVE_POLICY_NONE = -1;
- /**
- * Save all filter pools and all filters in one file, with same name as the manager
- */
- public static final int SAVE_POLICY_ONE_FILE_PER_MANAGER = 0;
- /**
- * Save all filters in each filter pool in one file per pool, with the same name as the pool.
- * Each pool also has its own unique folder.
- */
- public static final int SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL = 1;
- /**
- * Save all filters in each filter pool in one file per pool, with the same name as the pool
- * All pool files go into the same folder.
- */
- public static final int SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER = 2;
- /**
- * Save each filter in each filter pool in its own file, with the same name as the filter
- */
- public static final int SAVE_POLICY_ONE_FILE_PER_FILTER = 3;
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java
deleted file mode 100644
index a5526d205..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.core.filters;
-
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.logging.Logger;
-
-public interface ISystemFilterStartHere {
-
- /**
- * Factory method to return an instance populated with defaults.
- * You can then simply override whatever is desired via setXXX methods.
- */
- public IRSEFilterNamingPolicy createSystemFilterNamingPolicy();
-
-
- /**
- * Factory to create a filter pool manager, when you do NOT want it to worry about
- * saving and restoring the filter data to disk. Rather, you will save and restore
- * yourself.
- * @param logger A logging object into which to log errors as they happen in the framework
- * @param caller Objects which instantiate this class should implement the
- * SystemFilterPoolManagerProvider interface, and pass "this" for this parameter.
- * Given any filter framework object, it is possible to retrieve the caller's
- * object via the getProvider method call.
- * @param name the name of the filter pool manager. Not currently used but you may
- * find a use for it.
- * @param allowNestedFilters true if filters inside filter pools in this manager are
- * to allow nested filters. This is the default, but can be overridden at the
- * individual filter pool level.
- */
- public ISystemFilterPoolManager
- createSystemFilterPoolManager(ISystemProfile profile,
- Logger logger,
- ISystemFilterPoolManagerProvider caller,
- String name,
- boolean allowNestedFilters);
-
-
-
- /**
- * Create a SystemFilterPoolReferenceManager instance, when you do NOT want it
- * to be saved and restored to its own file. Rather, you will save and restore it
- * yourself.
- * @param caller Objects which instantiate this class should implement the
- * SystemFilterPoolReferenceManagerProvider interface, and pass "this" for this parameter.
- * Given any filter framework object, it is possible to retrieve the caller's
- * object via the getProvider method call.
- * @param relatedPoolMgrProvider The creator of the managers that own the master list of filter pools that
- * this manager will contain references to.
- * @param name the name of the filter pool reference manager. This is not currently
- * used, but you may find a use for it.
- * @param namingPolicy the naming policy object which will return the name of that one file.
- */
- public ISystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(
- ISystemFilterPoolReferenceManagerProvider caller,
- ISystemFilterPoolManagerProvider relatedPoolMgrProvider,
- String name, IRSEFilterNamingPolicy namingPolicy);
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterString.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterString.java
deleted file mode 100644
index dbc7ce539..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterString.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.filters;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencedObject;
-
-
-/**
- * A filter string is a pattern used by the server-side code to know what to return to
- * the client. A filter contains one or more filter strings. Basically, its nothing more
- * than a string, and its up to each consumer to know what to do with it. Generally,
- * a filter string edit pane is designed to prompt the user for the contents of the
- * string in a domain-friendly way.
- */
-public interface ISystemFilterString extends IRSEBaseReferencedObject, IAdaptable, IRSEModelObject
-{
- /**
- * Return the caller which instantiated the filter pool manager overseeing this filter framework instance
- */
- public ISystemFilterPoolManagerProvider getProvider();
- /**
- * Return the filter pool manager managing this collection of filter pools and their filters and their filter strings.
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager();
- /**
- * Set the transient parent back-pointer. Called by framework at restore/create time.
- */
- public void setParentSystemFilter(ISystemFilter filter);
- /**
- * Get the parent filter that contains this filter string.
- */
- public ISystemFilter getParentSystemFilter();
- /**
- * Clones this filter string's attributes into the given filter string
- */
- public void clone(ISystemFilterString targetString);
- /**
- * Is this filter string changable? Depends on mof attributes of parent filter
- */
- public boolean isChangable();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the String attribute
- */
- String getString();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the String attribute
- */
- void setString(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Type attribute
- * Allows tools to have typed filter strings
- */
- String getType();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Type attribute
- */
- void setType(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Default attribute
- * Is this a vendor-supplied filter string versus a user-defined filter string
- */
- boolean isDefault();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Default attribute
- */
- void setDefault(boolean value);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStringReference.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStringReference.java
deleted file mode 100644
index 505692b59..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStringReference.java
+++ /dev/null
@@ -1,58 +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.filters;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-
-/**
- * Represents a reference to a master filter string.
- * Needed so GUI can show the same filter string multiple times.
- * This is not modelled in MOF.
- */
-public interface ISystemFilterStringReference
- extends IRSEBaseReferencingObject
-{
- /**
- * Return the reference manager which is managing this filter reference
- * framework object.
- */
- public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager();
-
- /**
- * Return the object which instantiated the pool reference manager object.
- * Makes it easy to get back to the point of origin, given any filter reference
- * framework object
- */
- public ISystemFilterPoolReferenceManagerProvider getProvider();
-
- /**
- * Get the master filter string
- */
- public ISystemFilterString getReferencedFilterString();
- /**
- * Get the referenced filter that contains this filter string reference.
- */
- public ISystemFilterReference getParent();
- /**
- * Get the actual filter that contain the actual filter string we reference
- */
- public ISystemFilter getParentSystemFilter();
-
- /**
- * Same as getReferencedFilterString().getString()
- */
- public String getString();
-} //SystemFilterStringReference \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterNamingPolicy.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterNamingPolicy.java
deleted file mode 100644
index 05094b888..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterNamingPolicy.java
+++ /dev/null
@@ -1,151 +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.filters;
-/**
- * A naming policy so tool writers can override defaults used when
- * saving filter data to disk.
- * <p>
- * Subclass this and override what you wish to change.
- */
-public class SystemFilterNamingPolicy implements IRSEFilterNamingPolicy, ISystemFilterConstants
-{
-
- protected String managerFileNamePrefix;
- protected String poolFolderNamePrefix;
- protected String poolFolderNameSuffix;
- protected String poolFileNamePrefix;
- protected String filterFileNamePrefix;
- protected String referenceManagerFileNamePrefix;
- /**
- * Default prefix for filter pool manager persisted file: "filterPools_"
- */
- public static final String DEFAULT_FILENAME_PREFIX_FILTERPOOLMANAGER = "filterPools_"; //$NON-NLS-1$
- /**
- * Default prefix for filter pool reference manager persisted file: "filterPoolRefs_"
- */
- public static final String DEFAULT_FILENAME_PREFIX_FILTERPOOLREFERENCEMANAGER = "filterPoolRefs_"; //$NON-NLS-1$
- /**
- * Default prefix for filter pool persisted file: "filterPool_"
- */
- public static final String DEFAULT_FILENAME_PREFIX_FILTERPOOL = "filterPool_"; //$NON-NLS-1$
- /**
- * Default prefix for filter persisted file: "filter_"
- */
- public static final String DEFAULT_FILENAME_PREFIX_FILTER = "filter_"; //$NON-NLS-1$
- /**
- * Default prefix for filter pool folder: "FilterPool_"
- */
- public static final String DEFAULT_FOLDERNAME_PREFIX_FILTERPOOL = "FilterPool_"; //$NON-NLS-1$
-
-
- /**
- * Factory method to return an instance populated with defaults.
- * Can then simply override whatever is desired.
- */
- public static IRSEFilterNamingPolicy getNamingPolicy()
- {
- return new SystemFilterNamingPolicy();
- }
-
- /**
- * Constructor for SystemFilterNamingPolicyImpl
- */
- public SystemFilterNamingPolicy()
- {
- super();
- }
-
- /**
- * Get the unqualified save file name for the given SystemFilterPoolManager object.
- * Do NOT include the extension, as .xmi will be added.
- * <p>
- * Returns "filterPools_"+managerName by default.
- */
- public String getManagerSaveFileName(String managerName)
- {
- return DEFAULT_FILENAME_PREFIX_FILTERPOOLMANAGER+managerName;
- }
- /**
- * Get the unqualified save file name for the given SystemFilterPoolReferenceManager object.
- * Do NOT include the extension, as .xmi will be added.
- * <p>
- * Returns "filterPoolRefs_"+managerName by default.
- */
- public String getReferenceManagerSaveFileName(String managerName)
- {
- return DEFAULT_FILENAME_PREFIX_FILTERPOOLREFERENCEMANAGER+managerName;
- }
- /**
- * Get the unqualified save file name for the given SystemFilterPool object.
- * Do NOT include the extension, as .xmi will be added.
- * <p>
- * Returns getFilterPoolSaveFileNamePrefix()+poolName by default.
- */
- public String getFilterPoolSaveFileName(String poolName)
- {
- return getFilterPoolSaveFileNamePrefix()+poolName;
- }
- /**
- * Get the file name prefix for all pool files.
- * Used to deduce the saved pools by examining the file system
- * <p>
- * By default returns "filterPool_"
- */
- public String getFilterPoolSaveFileNamePrefix()
- {
- return DEFAULT_FILENAME_PREFIX_FILTERPOOL;
- }
- /**
- * Get the folder name for the given SystemFilterPool object.
- * <p>
- * Returns getFilterPoolFolderNamePrefix()+poolName by default.
- */
- public String getFilterPoolFolderName(String poolName)
- {
- return getFilterPoolFolderNamePrefix()+poolName;
- }
- /**
- * Get the folder name prefix for all pool folders.
- * Used to deduce the saved pools by examining the file system
- * <p>
- * By default returns "FilterPool_"
- */
- public String getFilterPoolFolderNamePrefix()
- {
- return DEFAULT_FOLDERNAME_PREFIX_FILTERPOOL;
- }
- /**
- * Get the unqualified save file name for the given SystemFilter object.
- * Do NOT include the extension, as .xmi will be added.
- * <p>
- * Returns getFilterSaveFileNamePrefix()+filterName by default.
- */
- public String getFilterSaveFileName(String filterName)
- {
- return getFilterSaveFileNamePrefix()+filterName;
- }
- /**
- * Get the file name prefix for all filter files.
- * Used to deduce the saved filters by examining the file system
- * <p>
- * Returns "Filter_" by default.
- */
- public String getFilterSaveFileNamePrefix()
- {
- return DEFAULT_FILENAME_PREFIX_FILTER;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterPoolManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterPoolManager.java
deleted file mode 100644
index 798c9996f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterPoolManager.java
+++ /dev/null
@@ -1,1763 +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.filters;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-
-//
-//
-
-/**
- * A filter pool manager manages filter pools.
- * <p>
- * Each filter pool that is managed becomes a folder on disk.
- * <p>
- * To create a filter pool manager instance, use the factory method
- * in SystemFilterPoolManagerImpl in the ...impl package.
- * You must pass a folder that represents the anchor point for the
- * pools managed by this manager instance.
- * <p>
- * Depending on your tools' needs, you have four choices about how
- * the filter pools and filters are persisted to disk. The decision is
- * made at the time you instantiate the pool manager and is one of the
- * following constants from the SystemFilterConstants interface:
- * <ul>
- * <li>SAVE_POLICY_ONE_FILE_PER_MANAGER - one file: mgrName.xmi
- * <li>SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool
- * <li>SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder
- * <li>SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool
- * </ul>
- * <p>
- * With the policy of one file per pool, there are two possibilities regarding
- * the folder structure:
- * <ul>
- * <li>Each pool gets its own subfolder, and the pool's xmi file goes in
- * the pool's unique subfolder: SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL
- * <li>There are no subfolders per pool, all the xmi pool files go in the
- * same folder as specified when creating this manager instance:
- * SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER
- * </ul>
- * <p>
- * With the policy of one file per filter, each filter pool must have its own folder.
- * <p>
- * With an instantiated filter pool manager (most tools will only need
- * one such instance), you now simply call its methods to work with
- * filter pools. For example, use it to:
- * <ul>
- * <li>Restore all filter pools from disk
- * <li>Save all, or individual, filter pools to disk
- * <li>Get a list of existing filter pools
- * <li>Create filter pools
- * <li>Delete filter pools
- * <li>Clone filter pools
- * <li>Rename filter pools
- * <li>Save all, or individual, filter pools
- * </ul>
- * All the underlying file system work is handled for you.
- * <p>
- * Further, this is the front door for working with filters too. By forcing all
- * filter related activity through a single point like this, we can ensure that
- * all changes are saved to disk, and events are fired properly.
- * <p>
- * The filter framework logs to a {@link org.eclipse.rse.logging.Logger Logger} file.
- * By default the log in the org.eclipse.rse.core plugin is used, but you can change this
- * by calling {@link #setLogger(org.eclipse.rse.logging.Logger)}.
- */
-/**
- * @lastgen class SystemFilterPoolManagerImpl Impl implements SystemFilterPoolManager {}
- */
-public class SystemFilterPoolManager implements ISystemFilterPoolManager {
- private ISystemFilterPool[] poolArray = null; // cache for performance
- private ISystemFilterPoolManagerProvider caller = null;
- private Object poolMgrData;
- private Vector poolNames;
- private boolean initialized = false;
-
- private boolean suspendCallbacks = false;
- private boolean suspendSave = false;
- private Logger logger = null;
- private ISystemProfile _profile;
-
- // persistence
- protected boolean _isDirty = true;
- private boolean _wasRestored = false;
-
- public static boolean debug = true;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- protected String name = NAME_EDEFAULT;
- /**
- * The default value of the '{@link #isSupportsNestedFilters() <em>Supports Nested Filters</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSupportsNestedFilters()
- * @generated
- * @ordered
- */
- protected static final boolean SUPPORTS_NESTED_FILTERS_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean supportsNestedFilters = SUPPORTS_NESTED_FILTERS_EDEFAULT;
- /**
- * The default value of the '{@link #isStringsCaseSensitive() <em>Strings Case Sensitive</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isStringsCaseSensitive()
- * @generated
- * @ordered
- */
- protected static final boolean STRINGS_CASE_SENSITIVE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT;
- /**
- * The default value of the '{@link #isSupportsDuplicateFilterStrings() <em>Supports Duplicate Filter Strings</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSupportsDuplicateFilterStrings()
- * @generated
- * @ordered
- */
- protected static final boolean SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean supportsDuplicateFilterStrings = SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT;
- /**
- * This is true if the Supports Duplicate Filter Strings attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean supportsDuplicateFilterStringsESet = false;
-
- /**
- * The default value of the '{@link #isSingleFilterStringOnly() <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSingleFilterStringOnly()
- * @generated
- * @ordered
- */
- protected static final boolean SINGLE_FILTER_STRING_ONLY_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isSingleFilterStringOnly() <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSingleFilterStringOnly()
- * @generated
- * @ordered
- */
- protected boolean singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected java.util.List pools = null;
-
- /**
- * Constructor
- */
- protected SystemFilterPoolManager(ISystemProfile profile) {
- super();
- _profile = profile;
- }
-
- public ISystemProfile getSystemProfile() {
- return _profile;
- }
-
- /**
- * Factory to create a filter pool manager.
- * @param profile the profile for which to create the filter pool manager.
- * @param logger A logging object into which to log errors as they happen in the framework
- * @param caller Objects which instantiate this class should implement the
- * SystemFilterPoolManagerProvider interface, and pass "this" for this parameter.
- * Given any filter framework object, it is possible to retrieve the caller's
- * object via the getProvider method call.
- * @param name the name of the filter pool manager. Typically this is also the name
- * of the given folder, but this is not required. For the save policy of one file
- * per manager, the name of the file is derived from this. For other save policies,
- * the name is not used.
- * @param allowNestedFilters true if filters inside filter pools in this manager are
- * to allow nested filters. This is the default, but can be overridden at the
- * individual filter pool level.
- * @param savePolicy The save policy for the filter pools and filters. One of the
- * following constants from the
- * {@link org.eclipse.rse.core.filters.ISystemFilterConstants SystemFilterConstants} interface:
- * <ul>
- * <li>SAVE_POLICY_NONE - no files, all save/restore handled elsewhere
- * <li>SAVE_POLICY_ONE_FILE_PER_MANAGER - one file: mgrName.xmi
- * <li>SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool
- * <li>SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder
- * <li>SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool
- * </ul>
- * @param namingPolicy The names to use for file and folders when persisting to disk. Pass
- * null to just use the defaults, or if using SAVE_POLICY_NONE.
- */
- public static ISystemFilterPoolManager createSystemFilterPoolManager(ISystemProfile profile, Logger logger,
- ISystemFilterPoolManagerProvider caller, String name, boolean allowNestedFilters,
- int savePolicy, IRSEFilterNamingPolicy namingPolicy) {
-
- SystemFilterPoolManager mgr = null;
- if (namingPolicy == null) namingPolicy = SystemFilterNamingPolicy.getNamingPolicy();
- try {
- mgr = (SystemFilterPoolManager) RSECorePlugin.getThePersistenceManager().restoreFilterPoolManager(profile, logger, caller, name);
- /*
- if (savePolicy != SystemFilterConstants.SAVE_POLICY_NONE)
- mgr = (SystemFilterPoolManagerImpl)restore(;
- */
- } catch (Exception exc) // real error trying to restore, versus simply not found.
- {
- // todo: something. Log the exception somewhere?
- }
- if (mgr == null) // not found or some serious error.
- {
- mgr = createManager(profile);
- }
- if (mgr != null) {
- mgr.initialize(logger, caller, name, allowNestedFilters);
- }
- return mgr;
- }
-
- /*
- * Private helper method.
- * Uses MOF to create an instance of this class.
- */
- public static SystemFilterPoolManager createManager(ISystemProfile profile) {
- ISystemFilterPoolManager mgr = new SystemFilterPoolManager(profile);
-
- //FIXME SystemFilterImpl.initMOF().createSystemFilterPoolManager();
- return (SystemFilterPoolManager) mgr;
- }
-
- /*
- * Private helper method to initialize state
- */
- public void initialize(Logger logger, ISystemFilterPoolManagerProvider caller, String name, boolean allowNestedFilters) {
- if (!initialized) initialize(logger, caller, name); // core data
-
- {
- java.util.List pools = getPools();
- ISystemFilterPool pool = null;
- Vector poolNames = getSystemFilterPoolNamesVector();
- for (int idx = 0; idx < poolNames.size(); idx++) {
- String poolName = (String) poolNames.elementAt(idx);
- pool = RSECorePlugin.getThePersistenceManager().restoreFilterPool(poolName);
- pool.setSystemFilterPoolManager(this);
- pools.add(pool);
-
- /** FIXME test
- if (pool.specialCaseNoDataRestored)
- {
- pool.setDeletable(true); // what else to do?
- //pool.setSupportsNestedFilters(allowNestedFilters); will be cascaded down anyway
- }
- */
- }
-
- }
- setSupportsNestedFilters(allowNestedFilters); // cascade it down
- invalidatePoolCache();
- }
-
- /*
- * Private helper method to do core initialization.
- * Might be called from either the static factory method or the static restore method.
- */
- public void initialize(Logger logger, ISystemFilterPoolManagerProvider caller, String name) {
- this.logger = logger;
- setProvider(caller);
- setNameGen(name);
- setFilterPoolManager(); // cascade it down
- initialized = true;
- }
-
- /**
- * Return the caller which instantiated the filter pool manager
- */
- public ISystemFilterPoolManagerProvider getProvider() {
- return caller;
- }
-
- /**
- * Set the caller instance which instantiated the filter pool manager.
- * This is only recorded to enable getProvider from any filter framework object.
- */
- public void setProvider(ISystemFilterPoolManagerProvider caller) {
- this.caller = caller;
- }
-
- /**
- * Set the name of this manager.
- * Intercepted so the file get be renamed for SAVE_POLICY_ONE_FILE_PER_MANAGER.
- */
- public void setName(String name) {
- String oldName = getName();
- if (oldName != null) {
- if (!oldName.equals(name)) {
- this.name = name;
- }
- }
- }
-
- /**
- * Return attribute indicating if filter pools managed by this manager support nested filters.
- * Same as isSupportsNestedFilters()
- */
- public boolean supportsNestedFilters() {
- return isSupportsNestedFilters();
- }
-
- /**
- * Return attribute indicating if filters managed by this manager support nested duplicate filter strings.
- * Same as isSupportsDuplicateFilterStrings()
- */
- public boolean supportsDuplicateFilterStrings() {
- //return allowDuplicateFilterStrings;
- return isSupportsDuplicateFilterStrings();
- }
-
- /**
- * Set attribute indicating if filter pools managed by this manager support nested filters, by default.
- * Cascaded down to all pools, and all filters in all pools.
- * Alternatively, just call it on the particular pool or filter it applies to.
- */
- public void setSupportsNestedFilters(boolean newSupportsNestedFilters) {
- // as generated by emf...
- setSupportsNestedFiltersGen(newSupportsNestedFilters);
- // our own stuff..
- ISystemFilterPool[] pools = getSystemFilterPools();
- for (int idx = 0; idx < pools.length; idx++) {
- pools[idx].setSupportsNestedFilters(newSupportsNestedFilters);
- }
- }
-
- /**
- * Set attribute indicating if filters managed by this manager support duplicate filter strings, by default.
- * Cascaded down to all pools, and all filters in all pools.
- * Alternatively, just call it on the particular pool or filter it applies to.
- */
- public void setSupportsDuplicateFilterStrings(boolean newSupportsDuplicateFilterStrings) {
- // as generated by emf...
- setSupportsDuplicateFilterStringsGen(newSupportsDuplicateFilterStrings);
-
- // our own stuff..
- ISystemFilterPool[] pools = getSystemFilterPools();
- for (int idx = 0; idx < pools.length; idx++) {
- pools[idx].setSupportsDuplicateFilterStrings(newSupportsDuplicateFilterStrings);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSupportsDuplicateFilterStringsGen(boolean newSupportsDuplicateFilterStrings) {
- supportsDuplicateFilterStrings = newSupportsDuplicateFilterStrings;
- supportsDuplicateFilterStringsESet = true;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isStringsCaseSensitive() {
- return stringsCaseSensitive;
- }
-
- /**
- * Same as isStringsCaseSensitive()
- * Are filter strings in this filter case sensitive?
- * @return The value of the StringsCaseSensitive attribute
- */
- public boolean areStringsCaseSensitive() {
- return isStringsCaseSensitive();
- }
-
- /**
- * Set attribute indicating if filters managed by this manager support case-sensitive filter strings, by default.
- * Cascaded down to all pools, and all filters in all pools.
- * Alternatively, just call it on the particular pool or filter it applies to.
- */
- public void setStringsCaseSensitive(boolean newStringsCaseSensitive) {
- // as generated by emf...
- setStringsCaseSensitiveGen(newStringsCaseSensitive);
- // our special code...
- ISystemFilterPool[] pools = getSystemFilterPools();
- for (int idx = 0; idx < pools.length; idx++) {
- pools[idx].setStringsCaseSensitive(newStringsCaseSensitive);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setStringsCaseSensitiveGen(boolean newStringsCaseSensitive) {
- stringsCaseSensitive = newStringsCaseSensitive;
- }
-
- /**
- * Set transient variable pointing back to us. Called after restoring.
- * Cascaded down to all pools, and all filters in all pools.
- */
- protected void setFilterPoolManager() {
- ISystemFilterPool[] pools = getSystemFilterPools();
- for (int idx = 0; idx < pools.length; idx++) {
- pools[idx].setSystemFilterPoolManager(this);
- }
- }
-
- /**
- * This is to set transient data that is subsequently queryable.
- */
- public void setSystemFilterPoolManagerData(Object data) {
- this.poolMgrData = data;
- }
-
- /**
- * Return transient data set via setFilterPoolData.
- */
- public Object getSystemFilterPoolManagerData() {
- return poolMgrData;
- }
-
- /**
- * Return array of SystemFilterPools managed by this manager.
- */
- public ISystemFilterPool[] getSystemFilterPools() {
- //System.out.println("Inside getSFPools for mgr "+getName()+". poolArray null? "+(poolArray==null));
- if ((poolArray == null) || (getPools().size() != poolArray.length)) {
- java.util.List pools = getPools();
- poolArray = new ISystemFilterPool[pools.size()];
- Iterator i = pools.iterator();
- int idx = 0;
- while (i.hasNext())
- poolArray[idx++] = (ISystemFilterPool) i.next();
- //System.out.println("Pool array created. length = "+poolArray.length);
- }
- return poolArray;
- }
-
- /**
- * Get list of filter pool names currently existing.
- */
- public String[] getSystemFilterPoolNames() {
- Vector v = getSystemFilterPoolNamesVector();
- String[] names = new String[v.size()];
- for (int idx = 0; idx < names.length; idx++)
- names[idx] = (String) v.elementAt(idx);
- return names;
- }
-
- /**
- * Get list of filter pool names currently existing.
- */
- public Vector getSystemFilterPoolNamesVector() {
- java.util.List pools = getPools();
- if ((poolNames == null) || (poolNames.size() != pools.size())) // been invalidated?
- {
- poolNames = new Vector();
- Iterator i = pools.iterator();
- while (i.hasNext())
- poolNames.addElement(((ISystemFilterPool) i.next()).getName());
- }
- return poolNames;
- }
-
- /*
- * Call this to invalidate array cache after any activity
- */
- private void invalidatePoolCache() {
- poolArray = null;
- poolNames = null;
- }
-
- /**
- * Create a new filter pool.
- * Inherits the following attributes from this manager:
- * <ul>
- * <li>data ... the transient data to be associated with every filter pool and filter
- * <li>supportsNestedFilters ... whether filters in the pool can themselves contain filters
- * <li>save policy
- * <li>filter pool folder and file name prefixes
- * </ul>
- * <p>
- * If a pool of this name already exists, null will be returned.
- * <p>
- * Depending on the save policy, a new folder to hold the pool may be created. Its name will
- * be derived from the pool name.
- * <p>
- * If the operation is successful, the pool will be saved to disk.
- * <p>
- * If this operation fails unexpectedly, an exception will be thrown.
- * <p>
- * Calls back to inform provider of this event
- */
- public ISystemFilterPool createSystemFilterPool(String poolName, boolean isDeletable) throws Exception {
- // always trim the pool name, MOF does not handle trailing or preceding spaces
- poolName = poolName.trim();
-
- if (getSystemFilterPool(poolName) != null) return null;
-
- ISystemFilterPool pool = null;
-
- ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
- ISystemFilterPool filterPool = registry.getSystemFilterPool();
- pool = filterPool.createSystemFilterPool(poolName, supportsNestedFilters(), isDeletable, ISystemFilterConstants.TRY_TO_RESTORE_NO);
-
- if (pool != null) {
- pool.setSystemFilterPoolManager(this);
- pool.setStringsCaseSensitive(areStringsCaseSensitive());
- if (isSetSupportsDuplicateFilterStrings()) pool.setSupportsDuplicateFilterStrings(supportsDuplicateFilterStrings());
- // add to model
- java.util.List pools = getPools();
- pools.add(pool);
- //System.out.println("Inside createSFPool for mgr "+getName()+". Pool "+name+" added");
- invalidatePoolCache();
- // save to disk...
- commit(pool);
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterPoolCreated(pool);
- }
- return pool;
- }
-
- /**
- * Delete a given filter pool. Dependending on the save policy, the
- * appropriate file or folder on disk will also be deleted.
- * <p>
- * Does the following:
- * <ul>
- * <li>Removes all references
- * <li>Removes pool object from in-memory model
- * <li>Removes folder from disk for policies of one folder per pool
- * <li>Removes file from disk for policy of one file per pool
- * <li>Saves model to disk for policy of one file per manager
- * <li>Invalidates in-memory caches
- * <li>Calls back to inform caller of this event
- * </ul>
- * @param pool The filter pool object to physically delete
- */
- public void deleteSystemFilterPool(ISystemFilterPool pool) throws Exception {
-
- // remove all references
- IRSEBaseReferencingObject[] refs = pool.getReferencingObjects();
- //boolean needsSave = false;
- if (refs != null) {
- for (int idx = 0; idx < refs.length; idx++) {
- if (refs[idx] instanceof ISystemFilterPoolReference) {
- ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference) refs[idx];
- ISystemFilterPoolReferenceManager fprMgr = fpRef.getFilterPoolReferenceManager();
- if (fprMgr != null) fprMgr.removeSystemFilterPoolReference(fpRef, false);// false means don't dereference
- }
- }
- }
- // DWD removing a pool should mark its parent profile as dirty and cause a save to be "scheduled"
-
- // remove from model
- java.util.List pools = getPools();
- pools.remove(pool);
-
- /* FIXME
- // now in EMF, the pools are "owned" by the Resource, and only referenced by this pool manager,
- // so I don't think just removing it from the manager is enough... it must also be removed from its
- // resource. Phil.
- Resource res = pool.eResource();
- if (res != null)
- res.getContents().remove(pool);
-
- // remove from disk
- if ( (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL) ||
- (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_FILTER) )
- {
- String expectedFolderName = derivePoolFolderName(poolName);
- if (expectedFolderName.equals(poolFolder.getName()))
- {
- // folder name equals what we would have named it if left to us.
- // assumption is this folder only exists to hold this pool!
- if (poolFolder.exists())
- getResourceHelpers().deleteResource(poolFolder);
- }
- }
- else if (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER)
- {
- String poolFileName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool);
- IFile poolFile = SystemResourceHelpers.getResourceHelpers().getFile(poolFolder,poolFileName);
- if (poolFile.exists())
- getResourceHelpers().deleteResource(poolFile);
- }
- else // all pools in one file per manager. Just save it
- {
- commit();
- }
- invalidatePoolCache();
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks)
- caller.filterEventFilterPoolDeleted(pool);
- */
- }
-
- /**
- * Delete all existing filter pools. Call this when you are about to delete this manager, say.
- */
- public void deleteAllSystemFilterPools() {
- ISystemFilterPool[] allPools = getSystemFilterPools();
- for (int idx = 0; idx < allPools.length; idx++) {
- String name = allPools[idx].getName();
- try {
- deleteSystemFilterPool(allPools[idx]);
- } catch (Exception exc) {
- logError("Exception deleting filter pool " + name + " from mgr " + getName(), exc); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- /**
- * Pre-test if we are going to run into any trouble renaming any of the files or folders
- * used to persist a filter pool.
- * @return true if everything seems ok, false if a file/folder is in use.
- */
- public boolean preTestRenameFilterPool(ISystemFilterPool pool) throws Exception {
- boolean ok = true;
- /*
- * DWD this looks like it needs to be modified so that it queries the persistence
- * manager to see if the pool can be renamed. The provider is in charge of determining
- * pool names in the persistent form. The Manager will have to construct a DOM
- * object for this pool and query the appropriate provider.
- */
- /* FIXME
- if ( (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL) ||
- (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_FILTER) )
- {
- String expectedFolderName = derivePoolFolderName(pool.getName());
- boolean ourFolderName = expectedFolderName.equals(pool.getFolder().getName());
- // we must rename the old file...
- String poolFileName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool);
- IFile poolFile = getResourceHelpers().getFile(pool.getFolder(),poolFileName);
- IFolder poolFolder = pool.getFolder();
-
- // first, pre-test for file-in-use error:
- boolean inUse = poolFile.exists() && SystemResourceHelpers.testIfResourceInUse(poolFile);
- if (inUse)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FILE_INUSE);
- msg.makeSubstitution(poolFile.getFullPath());
- throw new SystemMessageException(msg);
- }
- // next, pre-test for folder-in-use error:
- if (ourFolderName)
- {
- inUse = poolFolder.exists() && SystemResourceHelpers.testIfResourceInUse(poolFolder);
- if (inUse)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_INUSE);
- msg.makeSubstitution(poolFolder.getFullPath());
- throw new SystemMessageException(msg);
- }
- }
- }
- else if (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER)
- {
- String poolFileName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool);
- IFile poolFile = getResourceHelpers().getFile(pool.getFolder(),poolFileName);
- // first, pre-test for file-in-use error:
- boolean inUse = poolFile.exists() && SystemResourceHelpers.testIfResourceInUse(poolFile);
- if (inUse)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FILE_INUSE);
- msg.makeSubstitution(poolFile.getFullPath());
- throw new SystemMessageException(msg);
- }
- }
- */
- return ok;
- }
-
- /**
- * Rename a given filter pool. Dependending on the save policy, the
- * appropriate file or folder on disk will also be renamed.
- * <p>
- * Does the following:
- * <ul>
- * <li>Updates all referencing objects
- * <li>Renames pool object in the in-memory model
- * <li>Renames folder on disk for policies of one folder per pool
- * <li>Renames file on disk for policy of one file per pool
- * <li>Saves model to disk for policy of one file per manager
- * <li>Invalidates in-memory caches
- * <li>Calls back to provider to inform of this event.
- * </ul>
- * @param pool The filter pool object to physically rename
- * @param newName The new name to give the pool
- */
- public void renameSystemFilterPool(ISystemFilterPool pool, String newName) throws Exception {
- /*
- * DWD Renaming a filter pool should mark its parent profile as dirty and
- * the pool itself as dirty. A rewrite of the profile should be scheduled.
- */
-
- String oldName = pool.getName();
- // rename on disk
- /* FIXME
- int oldLen = oldName.length();
- int newLen = newName.length();
- if ( (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL) ||
- (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_FILTER) )
- {
- String expectedFolderName = derivePoolFolderName(pool.getName());
- boolean ourFolderName = expectedFolderName.equals(pool.getFolder().getName());
- // we must rename the old file...
- String poolFileName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool);
- String poolFileNewName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool,newName);
- IFile poolFile = getResourceHelpers().getFile(pool.getFolder(),poolFileName);
- IFolder poolFolder = pool.getFolder();
-
- // first, pre-test for file-in-use error:
- boolean inUse = poolFile.exists() && SystemResourceHelpers.testIfResourceInUse(poolFile);
- if (inUse)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FILE_INUSE);
- msg.makeSubstitution(poolFile.getFullPath());
- throw new SystemMessageException(msg);
- }
- // next, pre-test for folder-in-use error:
- if (ourFolderName)
- {
- inUse = poolFolder.exists() && SystemResourceHelpers.testIfResourceInUse(poolFolder);
- if (inUse)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_INUSE);
- msg.makeSubstitution(poolFolder.getFullPath());
- throw new SystemMessageException(msg);
- }
- }
-
- if (poolFile.exists())
- {
- // pre-test if the new name will be too long for MOF (256)
- if (nameLenDiff > 0)
- {
- if (ourFolderName)
- nameLenDiff *= 2; // new name affects folder and file
- int newNameLen = poolFile.getLocation().toOSString().length() + nameLenDiff;
- if (newNameLen > 256)
- throw new Exception("Fully qualified filter pool name too long for "+newName+". Exceeds 256 characters");
- }
- getResourceHelpers().renameResource(poolFile, poolFileNewName);
- }
- if (ourFolderName)
- {
- // folder name equals what we would have named it if left to us.
- // assumption is this folder only exists to hold this pool!
- if (poolFolder.exists())
- {
- String newFolderName = derivePoolFolderName(newName);
- getResourceHelpers().renameResource(poolFolder, newFolderName);
- // as we now know, the original IFolder still points to the old name!
- poolFolder = getResourceHelpers().getRenamedFolder(poolFolder, newFolderName);
- pool.setFolder(poolFolder);
- }
- }
- }
- else if (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER)
- {
- String poolFileName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool);
- IFile poolFile = getResourceHelpers().getFile(pool.getFolder(),poolFileName);
- // first, pre-test for file-in-use error:
- boolean inUse = poolFile.exists() && SystemResourceHelpers.testIfResourceInUse(poolFile);
- if (inUse)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FILE_INUSE);
- msg.makeSubstitution(poolFile.getFullPath());
- throw new SystemMessageException(msg);
- }
- if (poolFile.exists())
- {
- String poolFileNewName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool,newName);
- getResourceHelpers().renameResource(poolFile, poolFileNewName);
- }
- }
- */
- pool.setName(newName);
- invalidatePoolCache();
-
- // inform all referencees
- IRSEBaseReferencingObject[] refs = pool.getReferencingObjects();
- if (refs != null) {
- for (int idx = 0; idx < refs.length; idx++) {
- IRSEBaseReferencingObject ref = refs[idx];
- if (ref instanceof ISystemFilterPoolReference) {
- ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference) ref;
- ISystemFilterPoolReferenceManager fprMgr = fpRef.getFilterPoolReferenceManager();
- fprMgr.renameReferenceToSystemFilterPool(pool);
- }
- }
- }
-
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterPoolRenamed(pool, oldName);
- }
-
- /**
- * Copy the specified filter pool from this manager to this manager or another manager.
- * <p>
- * Does the following:
- * <ul>
- * <li>Clones all filters within the pool
- * <li>Clones all filter strings within each filter
- * <li>Asks target manager to save to disk
- * <li>Calls back to target manager provider, unless callbacks are suspended
- * </ul>
- * @param targetMgr The target manager to copy our filter pool to. Can be this manager, but target pool name must be unique.
- * @param oldPool The filter pool to copy
- * @param newName The new name to give the copied pool
- * @return the new copy
- */
- public ISystemFilterPool copySystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool oldPool, String newName) throws Exception {
- ISystemFilterPool newPool = targetMgr.createSystemFilterPool(newName, oldPool.isDeletable());
- //System.out.println("In SystemFilterPoolManagerImpl#copySystemFilterPool: newPool "+newName+" null? " + (newPool == null));
- oldPool.cloneSystemFilterPool(newPool);
- commit(newPool); // save it all to disk
- return newPool;
- }
-
- /**
- * Move the specified filter pool from this manager to another manager.
- * <p>
- * Does the following:
- * <ul>
- * <li>Performs a {@link #copySystemFilterPool(ISystemFilterPoolManager, ISystemFilterPool, String) copySystemFilterPool} operation.
- * <li>If copy is successful, updates all references to reference the new copy.
- * <li>If copy is successful, deletes original filter pool in this manager
- * <li>If this final delete fails, deletes the copied version and restore original references
- * <li>Asks target manager to save to disk
- * <li>Saves this manager to disk
- * <li>Calls back to both targer manager provider and this manager provider, unless callbacks are suspended
- * </ul>
- * @param targetMgr The target manager to move our filter pool to. Cannot be this manager.
- * @param oldPool The filter pool to move
- * @param newName The new name to give the moved pool
- * @return the new copy of the moved system filter pool
- */
- public ISystemFilterPool moveSystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool oldPool, String newName) throws Exception {
- ISystemFilterPool newPool = copySystemFilterPool(targetMgr, oldPool, newName);
- // find all references to original, and reset them to reference the new...
- IRSEBaseReferencingObject[] refs = oldPool.getReferencingObjects();
- if (refs != null) {
- for (int idx = 0; idx < refs.length; idx++) {
- if (refs[idx] instanceof ISystemFilterPoolReference) {
- ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference) refs[idx];
- //SystemFilterPool fp = fpRef.getReferencedFilterPool();
- ISystemFilterPoolReferenceManager fprMgr = fpRef.getFilterPoolReferenceManager();
- fprMgr.resetSystemFilterPoolReference(fpRef, newPool); // reset the referenced pool
- }
- }
- }
- try {
- deleteSystemFilterPool(oldPool);
- } catch (Exception exc) {
- if (refs != null) {
- for (int idx = 0; idx < refs.length; idx++) {
- if (refs[idx] instanceof ISystemFilterPoolReference) {
- ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference) refs[idx];
- ISystemFilterPoolReferenceManager fprMgr = fpRef.getFilterPoolReferenceManager();
- fprMgr.resetSystemFilterPoolReference(fpRef, oldPool); // reset the referenced pool
- }
- }
- }
- targetMgr.deleteSystemFilterPool(newPool);
- throw exc;
- }
- return newPool;
- }
-
- /**
- * Copy all filter pools from this manager to another manager.
- * <p>
- * Does the following:
- * <ul>
- * <li>Clones all filter pools
- * <li>Clones all filters within each pool
- * <li>Clones all filter strings within each filter
- * <li>Asks target manager to save to disk
- * <li>Does not callback to caller to fire events, assumes caller doesn't want to know
- * </ul>
- * @param targetMgr The target manager to copy our filter pools to
- */
- public void copySystemFilterPools(ISystemFilterPoolManager targetMgr) throws Exception {
- targetMgr.setStringsCaseSensitive(areStringsCaseSensitive());
- ISystemFilterPool[] pools = getSystemFilterPools();
- if ((pools != null) && (pools.length > 0)) {
- targetMgr.suspendCallbacks(true);
- //boolean oldSuspendCallbacks = suspendCallbacks;
- for (int idx = 0; idx < pools.length; idx++) {
- ISystemFilterPool pool = pools[idx];
- copySystemFilterPool(targetMgr, pool, pool.getName());
- }
- //suspendCallbacks = oldSuspendCallbacks;
- targetMgr.suspendCallbacks(false);
- }
- }
-
- /**
- * Given a filter pool name, return that filter pool object.
- * If not found, returns null.
- */
- public ISystemFilterPool getSystemFilterPool(String name) {
- ISystemFilterPool pool = null;
- ISystemFilterPool[] pools = getSystemFilterPools();
- if (pools != null) {
- for (int idx = 0; (idx < pools.length) && (pool == null); idx++) {
- if (pools[idx].getName().equals(name)) pool = pools[idx];
- }
- }
- return pool;
- }
-
- /**
- * Return the first pool that has the default attribute set to true.
- * If none found, returns null.
- */
- public ISystemFilterPool getFirstDefaultSystemFilterPool() {
- ISystemFilterPool pool = null;
- ISystemFilterPool[] pools = getSystemFilterPools();
- for (int idx = 0; (pool == null) && (idx < pools.length); idx++)
- if (pools[idx].isDefault()) pool = pools[idx];
- return pool;
- }
-
- // ---------------------------------
- // FILTER METHODS
- // ---------------------------------
- /**
- * Creates a new system filter within the given filter container (either a filter pool, or
- * a filter). This creates the filter, and then saves the filter pool.
- * <p>Calls back to inform provider of this event (filterEventFilterCreated)
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, Vector filterStrings) throws Exception {
- ISystemFilter newFilter = null;
- ISystemFilterPool parentPool = null;
- if (parent instanceof ISystemFilterPool)
- parentPool = (ISystemFilterPool) parent;
- else
- parentPool = ((ISystemFilter) parent).getParentFilterPool();
- newFilter = parent.createSystemFilter(aliasName, filterStrings);
- if (!suspendSave) commit(parentPool);
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterCreated(newFilter);
- return newFilter;
- }
-
- /**
- * Creates a new system filter that is typed.
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String, Vector)} but
- * takes a filter type as an additional parameter.
- * <p>
- * A filter's type is an arbitrary string that is not interpreted or used by the base framework. This
- * is for use entirely by tools who wish to support multiple types of filters and be able to launch unique
- * actions per type, say.
- *
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- * @param type The type of this filter
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, Vector filterStrings, String type) throws Exception {
- boolean oldSuspendSave = suspendSave;
- boolean oldSuspendCallbacks = suspendCallbacks;
- suspendSave = true;
- suspendCallbacks = true;
-
- ISystemFilter newFilter = createSystemFilter(parent, aliasName, filterStrings);
- newFilter.setType(type);
-
- suspendSave = oldSuspendSave;
- suspendCallbacks = oldSuspendCallbacks;
-
- if (!suspendSave) {
- ISystemFilterPool parentPool = null;
- if (parent instanceof ISystemFilterPool)
- parentPool = (ISystemFilterPool) parent;
- else
- parentPool = ((ISystemFilter) parent).getParentFilterPool();
- commit(parentPool);
- }
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterCreated(newFilter);
- return newFilter;
- }
-
- /**
- * Creates a new system filter that is typed and promptable
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String ,Vector, String)} but
- * takes a boolean indicating if it is promptable.
- * <p>
- * A promptable filter is one in which the user is prompted for information at expand time.
- * There is no base filter framework support for this, but tools can query this attribute and
- * do their own thing at expand time.
- *
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- * @param type The type of this filter
- * @param promptable Pass true if this is a promptable filter
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, Vector filterStrings, String type, boolean promptable) throws Exception {
- boolean oldSuspendSave = suspendSave;
- boolean oldSuspendCallbacks = suspendCallbacks;
- suspendSave = true;
- suspendCallbacks = true;
-
- ISystemFilter newFilter = createSystemFilter(parent, aliasName, filterStrings, type);
- newFilter.setPromptable(promptable);
-
- suspendSave = oldSuspendSave;
- suspendCallbacks = oldSuspendCallbacks;
-
- if (!suspendSave) {
- ISystemFilterPool parentPool = null;
- if (parent instanceof ISystemFilterPool)
- parentPool = (ISystemFilterPool) parent;
- else
- parentPool = ((ISystemFilter) parent).getParentFilterPool();
- commit(parentPool);
- }
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterCreated(newFilter);
- return newFilter;
- }
-
- /**
- * Delete an existing system filter.
- * Does the following:
- * <ul>
- * <li>Removes filter from its parent in memory.
- * <li>If appropriate for the save policy, deletes the filter's file from disk.
- * <li>Save the SystemFilterPool which direct or indirectly contains the filter.
- * <li>Calls back to provider to inform it of this event (filterEventFilterDeleted)
- * </ul>
- */
- public boolean deleteSystemFilter(ISystemFilter filter) throws Exception {
-
- // ok to proceed...
- boolean ok = true;
- ISystemFilterContainer parent = filter.getParentFilterContainer();
- parent.deleteSystemFilter(filter);
- commit(filter.getParentFilterPool());
-
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterDeleted(filter);
- return ok;
- }
-
- /**
- * Renames a filter. This is better than filter.setName(String newName) as it
- * saves the parent pool to disk.
- * <p>
- * Does the following:
- * <ul>
- * <li>Renames the object in the in-memory cache
- * <li>If appropriate for the save policy, rename's the filter's file on disk.
- * <li>Save parent filter pool's in-memory object to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterRenamed)
- * </ul>
- * Does fire an event.
- */
- public void renameSystemFilter(ISystemFilter filter, String newName) throws Exception {
-
- // ok to proceed
- ISystemFilterContainer parent = filter.getParentFilterContainer();
- String oldName = filter.getName();
- parent.renameSystemFilter(filter, newName);
- // rename on disk
- try {
-
- commit(filter.getParentFilterPool());
- } catch (Exception exc) {
- parent.renameSystemFilter(filter, oldName); // rollback name change
- throw exc;
- }
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterRenamed(filter, oldName);
- }
-
- /**
- * Updates a filter. This is better than doing it directly as it saves it to disk.
- * <p>
- * Does the following:
- * <ul>
- * <li>Updates the object in the in-memory cache
- * <li>Save parent filter pool's in-memory object to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterUpdated).
- * </ul>
- */
- public void updateSystemFilter(ISystemFilter filter, String newName, String[] strings) throws Exception {
-
- // ok to proceed...
- ISystemFilterContainer parent = filter.getParentFilterContainer();
- String oldName = filter.getName();
- boolean rename = !oldName.equals(newName);
- if (rename) {
- renameSystemFilter(filter, newName);
- }
- parent.updateSystemFilter(filter, newName, strings);
- ISystemFilterPool parentPool = filter.getParentFilterPool();
- commit(parentPool);
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterUpdated(filter);
- }
-
- /**
- * Sets a filter's type. This is better than calling filter.setType(String) directly as it saves the filter to disk after.
- * <p>
- * A filter's type is an arbitrary string that is not interpreted or used by the base framework. This
- * is for use entirely by tools who wish to support multiple types of filters and be able to launch unique
- * actions per type, say.
- * @param filter The filter to be modified
- * @param newType The type of this filter
- */
- public void setSystemFilterType(ISystemFilter filter, String newType) throws Exception {
- filter.setType(newType);
- commit(filter.getParentFilterPool());
- }
-
- /**
- * Copy a system filter to a pool in this or another filter manager.
- */
- public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) throws Exception {
- ISystemFilterPoolManager targetMgr = targetPool.getSystemFilterPoolManager();
- ISystemFilterPool oldPool = oldFilter.getParentFilterPool();
-
- targetMgr.suspendCallbacks(true);
-
- ISystemFilter newFilter = oldPool.copySystemFilter(targetPool, oldFilter, newName); // creates it in memory
- commit(targetPool); // save updated pool to disk
-
- targetMgr.suspendCallbacks(false);
-
- targetMgr.getProvider().filterEventFilterCreated(newFilter);
- return newFilter;
- }
-
- /**
- * Move a system filter to a pool in this or another filter manager.
- * Does this by first copying the filter, and only if successful, deleting the old copy.
- */
- public ISystemFilter moveSystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) throws Exception {
- ISystemFilter newFilter = copySystemFilter(targetPool, oldFilter, newName);
- if (newFilter != null) {
- deleteSystemFilter(oldFilter);
- }
- return newFilter;
- }
-
- /**
- * Return the zero-based position of a SystemFilter object within its container
- */
- public int getSystemFilterPosition(ISystemFilter filter) {
- ISystemFilterContainer container = filter.getParentFilterContainer();
- int position = -1;
- boolean match = false;
- ISystemFilter[] filters = container.getSystemFilters();
-
- for (int idx = 0; !match && (idx < filters.length); idx++) {
- if (filters[idx].getName().equals(filter.getName())) {
- match = true;
- position = idx;
- }
- }
- return position;
- }
-
- /**
- * Move existing filters a given number of positions in the same container.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- * <p>
- * Does the following:
- * <ul>
- * <li>After the move, the pool containing the filter is saved to disk.
- * <li>Calls back to provider to inform of this event
- * </ul>
- * @param filters Array of SystemFilters to move.
- * @param delta the amount by which to move the filters (filterEventFiltersRePositioned)
- */
- public void moveSystemFilters(ISystemFilter filters[], int delta) throws Exception {
- /*
- * DWD revisit this. Make sure that the pool is scheduled to be saved.
- */
- // ISystemFilterContainer container = filters[0].getParentFilterContainer();
- int[] oldPositions = new int[filters.length];
- for (int idx = 0; idx < filters.length; idx++)
- oldPositions[idx] = getSystemFilterPosition(filters[idx]);
- if (delta > 0) // moving down, process backwards
- for (int idx = filters.length - 1; idx >= 0; idx--)
- moveFilter(filters[idx], oldPositions[idx] + delta);
- else
- for (int idx = 0; idx < filters.length; idx++)
- moveFilter(filters[idx], oldPositions[idx] + delta);
-
- commit(filters[0].getParentFilterPool());
-
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks) caller.filterEventFiltersRePositioned(filters, delta);
- }
-
- /**
- * Move one filter to new zero-based position.
- */
- private void moveFilter(ISystemFilter filter, int newPos) {
- ISystemFilterContainer container = filter.getParentFilterContainer();
- container.moveSystemFilter(newPos, filter);
- }
-
- /**
- * Order filters according to user preferences.
- * <p>
- * While the framework has all the code necessary to arrange filters and save/restore
- * that arrangement, you may choose to use preferences instead of this support.
- * In this case, call this method and pass in the saved and sorted filter name list.
- * <p>
- * Called by someone after restore.
- */
- public void orderSystemFilters(ISystemFilterPool pool, String[] names) throws Exception {
- pool.orderSystemFilters(names);
- commit(pool);
- }
-
- // -------------------------------
- // SYSTEM FILTER STRING METHODS...
- // -------------------------------
- /**
- * Append a new filter string to the given filter's list
- * <p>
- * Does the following:
- * <ul>
- * <li>Adds the filter string to the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringCreated)
- * </ul>
- */
- public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString) throws Exception {
- ISystemFilterString newFilterString = filter.addFilterString(newString);
- ISystemFilterPool parentPool = filter.getParentFilterPool();
- commit(parentPool);
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterStringCreated(newFilterString);
- return newFilterString;
- }
-
- /**
- * Insert a new filter string to the its filters' list, at the given zero-based position
- * <p>
- * Does the following:
- * <ul>
- * <li>Adds the filter string to the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringCreated)
- * </ul>
- */
- public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString, int position) throws Exception {
- ISystemFilterString newFilterString = filter.addFilterString(newString, position);
- ISystemFilterPool parentPool = filter.getParentFilterPool();
- commit(parentPool);
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterStringCreated(newFilterString);
- return newFilterString;
- }
-
- /**
- * Delete a filter string from the given filter's list
- * <p>
- * Does the following:
- * <ul>
- * <li>Removes the filter string from the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
- * </ul>
- * @return true if given string was found and hence was deleted.
- */
- public boolean removeSystemFilterString(ISystemFilter filter, String oldString) throws Exception {
- ISystemFilterString oldFilterString = filter.removeFilterString(oldString);
- if (oldFilterString == null) return false;
- ISystemFilterPool parentPool = filter.getParentFilterPool();
- commit(parentPool);
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterStringDeleted(oldFilterString);
- return true;
- }
-
- /**
- * Remove a filter string from this filter's list, given its SystemFilterString object.
- * <p>
- * Does the following:
- * <ul>
- * <li>Removes the filter string from the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
- * </ul>
- * @return true if the given string existed and hence was deleted.
- */
- public boolean removeSystemFilterString(ISystemFilter filter, ISystemFilterString filterString) throws Exception {
- boolean ok = filter.removeFilterString(filterString);
- if (!ok) return false;
- ISystemFilterPool parentPool = filter.getParentFilterPool();
- commit(parentPool);
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterStringDeleted(filterString);
- return ok;
- }
-
- /**
- * Remove a filter string from the given filter's list, given its zero-based position
- * <p>
- * Does the following:
- * <ul>
- * <li>Removes the filter string from the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
- * </ul>
- * @return true if a string existed at the given position and hence was deleted.
- */
- public boolean removeSystemFilterString(ISystemFilter filter, int position) throws Exception {
- ISystemFilterString oldFilterString = filter.removeFilterString(position);
- if (oldFilterString == null) return false;
- ISystemFilterPool parentPool = filter.getParentFilterPool();
- commit(parentPool);
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterStringDeleted(oldFilterString);
- return true;
- }
-
- /**
- * Update a filter string's string vale
- * <p>
- * Does the following:
- * <ul>
- * <li>Update the filter string in the in-memory cache
- * <li>Saves parent filter pool to disk.
- * <li>Calls back to provider to inform it of this event (filterEventFilterStringUpdated)
- * </ul>
- */
- public void updateSystemFilterString(ISystemFilterString filterString, String newValue) throws Exception {
- if (newValue.equals(filterString.getString())) return;
- ISystemFilter filter = filterString.getParentSystemFilter();
- filter.updateFilterString(filterString, newValue);
- ISystemFilterPool parentPool = filter.getParentFilterPool();
- commit(parentPool);
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterStringUpdated(filterString);
- }
-
- /**
- * Return the zero-based position of a SystemFilterString object within its filter
- */
- public int getSystemFilterStringPosition(ISystemFilterString filterString) {
- ISystemFilter filter = filterString.getParentSystemFilter();
- int position = -1;
- boolean match = false;
- ISystemFilterString[] filterStrings = filter.getSystemFilterStrings();
-
- String matchString = filterString.getString();
- for (int idx = 0; !match && (idx < filterStrings.length); idx++) {
- if (filterStrings[idx].getString().equals(matchString)) {
- match = true;
- position = idx;
- }
- }
- return position;
- }
-
- /**
- * Copy a system filter string to a filter in this or another filter pool manager.
- */
- public ISystemFilterString copySystemFilterString(ISystemFilter targetFilter, ISystemFilterString oldFilterString) throws Exception {
- /*
- * DWD revisit this. make sure that pool is persisted.
- */
- ISystemFilterPool targetPool = targetFilter.getParentFilterPool();
- ISystemFilterPoolManager targetMgr = targetPool.getSystemFilterPoolManager();
- ISystemFilter oldFilter = oldFilterString.getParentSystemFilter();
- // ISystemFilterPool oldPool = oldFilter.getParentFilterPool();
-
- targetMgr.suspendCallbacks(true);
-
- ISystemFilterString newFilterString = oldFilter.copySystemFilterString(targetFilter, oldFilterString); // creates it in memory
- commit(targetPool); // save updated pool to disk
-
- targetMgr.suspendCallbacks(false);
-
- targetMgr.getProvider().filterEventFilterStringCreated(newFilterString);
- return newFilterString;
- }
-
- /**
- * Move a system filter string to a filter in this or another filter pool manager.
- * Does this by doing a copy operation, then if successful doing a delete operation.
- */
- public ISystemFilterString moveSystemFilterString(ISystemFilter targetFilter, ISystemFilterString oldFilterString) throws Exception {
- ISystemFilterString newString = copySystemFilterString(targetFilter, oldFilterString);
- if (newString != null) {
- removeSystemFilterString(oldFilterString.getParentSystemFilter(), oldFilterString);
- }
- return newString;
- }
-
- /**
- * Move existing filter strings a given number of positions in the same filter
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- * <p>
- * Does the following:
- * <ul>
- * <li>After the move, the filter pool containing the filter containing the filter strings is saved to disk.
- * <li>Calls back to provider to inform of the event (filterEventFilterStringsRePositioned)
- * </ul>
- * @param filterStrings Array of SystemFilterStrings to move.
- * @param delta the amount by which to move the filter strings
- */
- public void moveSystemFilterStrings(ISystemFilterString filterStrings[], int delta) throws Exception {
- ISystemFilter filter = filterStrings[0].getParentSystemFilter();
- int[] oldPositions = new int[filterStrings.length];
- for (int idx = 0; idx < filterStrings.length; idx++)
- oldPositions[idx] = getSystemFilterStringPosition(filterStrings[idx]);
- if (delta > 0) // moving down, process backwards
- for (int idx = filterStrings.length - 1; idx >= 0; idx--)
- moveFilterString(filter, filterStrings[idx], oldPositions[idx] + delta);
- else
- for (int idx = 0; idx < filterStrings.length; idx++)
- moveFilterString(filter, filterStrings[idx], oldPositions[idx] + delta);
-
- commit(filter.getParentFilterPool());
-
- // if caller provider, callback to inform them of this event
- if ((caller != null) && !suspendCallbacks) caller.filterEventFilterStringsRePositioned(filterStrings, delta);
- }
-
- /**
- * Move one filter string to new zero-based position.
- */
- private void moveFilterString(ISystemFilter filter, ISystemFilterString filterString, int newPos) {
- filter.moveSystemFilterString(newPos, filterString);
- }
-
- // -----------------------------------
- // SUSPEND/RESUME CALLBACKS METHODS...
- // -----------------------------------
- /**
- * Suspend callbacks to the provider
- */
- public void suspendCallbacks(boolean suspend) {
- suspendCallbacks = suspend;
- }
-
- // -----------------------
- // SAVE/RESTORE METHODS...
- // -----------------------
- /**
- * Return the save file that will be written for the given filter pool.
- * Will depend on this manager's save policy.
- */
- public IFile getSaveFile(ISystemFilterPool pool) {
- /* FIXME
- switch(savePolicy)
- {
- // ONE FILE PER FILTER POOL MANAGER
- case SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_MANAGER:
- return SystemMOFHelpers.getSaveFile(getFolder(), getRootSaveFileName(this));
- // ONE FOLDER AND FILE PER FILTER POOL
- case SystemFilterConstants.SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL:
- // ONE FILE PER FILTER POOL, ONE FOLDER PER MANAGER
- case SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER:
- // ONE FILE PER FILTER
- case SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_FILTER:
- return ((SystemFilterPoolImpl)pool).getSaveFile();
- }
- */
- return null;
- }
-
- /**
- * Save all the filter pools to disk.
- * Uses the save policy specified in this manager's factory method.
- */
- public boolean commit() {
- IRSEPersistenceManager mgr = RSECorePlugin.getThePersistenceManager();
-
- return mgr.commit(this);
- }
-
- /**
- * Save all the filter pools to disk.
- * Uses the save policy specified in this manager's factory method.
- */
- public boolean commit(ISystemFilterPool pool) {
- IRSEPersistenceManager mgr = RSECorePlugin.getThePersistenceManager();
- return mgr.commit(pool);
- }
-
- /**
- * Restore filter pools when all are stored in one file
- * @param logger The logging object to log errors to
- * @param mgrFolder The folder containing the file to restore from.
- * @param name The name of the manager, from which the file name is derived.
- * @param namingPolicy Naming prefix information for persisted data file names.
- */
- protected static ISystemFilterPoolManager restoreFromOneFile(Logger logger, IFolder mgrFolder, String name, IRSEFilterNamingPolicy namingPolicy) throws Exception {
- /* FIXME
- String fileName = getRootSaveFileName(namingPolicy, name);
-
- java.util.List ext = getMOFHelpers(logger).restore(mgrFolder,fileName);
-
- SystemFilterPoolManager mgr = null;
-
- // should be exactly one system filter pool manager...
- Iterator iList = ext.iterator();
- mgr = (SystemFilterPoolManager)iList.next();
- return mgr;
- */
- return null;
- }
-
- /**
- * Return our logger
- */
- public Logger getLogger() {
- if (logger == null) logger = RSECorePlugin.getDefault().getLogger();
- return logger;
- }
-
- /**
- * Set our logger
- */
- public void setLogger(Logger logger) {
- this.logger = logger;
- }
-
- /**
- * Helper method for logging information
- *
- * @param message Message to be written to the log file
- */
- public void logInfo(String message) {
- if (logger != null)
- logger.logInfo(message);
- else
- System.out.println(getClass().getName() + ": INFO: " + message); //$NON-NLS-1$
- }
-
- /**
- * Helper method for logging warnings
- *
- * @param message Message to be written to the log file
- */
- public void logWarning(String message) {
- if (logger != null)
- logger.logWarning(message);
- else
- System.out.println(getClass().getName() + ": WARNING: " + message); //$NON-NLS-1$
- }
-
- /**
- * Helper method for logging errors (exceptions)
- *
- * @param message Message to be written to the log file
- *
- * @param exception Any exception that generated the error condition,
- * this will be used to print a stack trace in the log file.
- */
- public void logError(String message, Throwable exception) {
- if (logger != null)
- logger.logError(message, exception);
- else {
- String msg = exception.getMessage();
- if (msg == null) msg = exception.getClass().getName();
- System.out.println(getClass().getName() + ": " + message + ": " + msg); //$NON-NLS-1$ //$NON-NLS-2$
- exception.printStackTrace();
- }
- }
-
- /**
- * Helper method for logging debug messages
- *
- * @param prefix typically the name of the class issuing the debug message. Pass in either
- * retrieved using this.getClass() (for non-static methods)
- * or using MyClass.class (for static methods)
- *
- * @param message Message to be written to the log file
- */
- public void logDebugMessage(String prefix, String message) {
- if ((logger != null)) {
- logger.logDebugMessage(prefix, message);
- } else
- System.out.println(getClass().getName() + ": DEBUG: " + message); //$NON-NLS-1$
- }
-
- /**
- * Helper method for logging trace information
- *
- * @deprecated Use either logInfo, logWarning, logError, or logDebugMessage. This
- * method now calls logInfo.
- */
- public void logMessage(String msg) {
- if (logger != null)
- logger.logInfo(msg);
- else
- System.out.println(getClass().getName() + ": " + msg); //$NON-NLS-1$
- }
-
- // OTHER
-
- public String toString() {
- return getName();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getName() {
- return name;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isSupportsNestedFilters() {
- return supportsNestedFilters;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public java.util.List getPools() {
- if (pools == null) {
- pools = new ArrayList();
- //FIXME new EObjectResolvingeList(SystemFilterPool.class, this, FiltersPackage.SYSTEM_FILTER_POOL_MANAGER__POOLS);
- }
- return pools;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setNameGen(String newName) {
- String oldName = name;
- if (oldName != newName) {
- name = newName;
- setDirty(true);
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setSupportsNestedFiltersGen(boolean newSupportsNestedFilters) {
- supportsNestedFilters = newSupportsNestedFilters;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isSupportsDuplicateFilterStrings() {
- return supportsDuplicateFilterStrings;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void unsetSupportsDuplicateFilterStrings() {
- supportsDuplicateFilterStrings = SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT;
- supportsDuplicateFilterStringsESet = false;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean isSetSupportsDuplicateFilterStrings() {
- return supportsDuplicateFilterStringsESet;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSingleFilterStringOnly() {
- return singleFilterStringOnly;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly) {
- boolean oldSingleFilterStringOnly = singleFilterStringOnly;
- if (oldSingleFilterStringOnly != newSingleFilterStringOnly) {
- singleFilterStringOnly = newSingleFilterStringOnly;
- setDirty(true);
- }
- }
-
- public boolean isDirty() {
- return _isDirty;
- }
-
- public void setDirty(boolean flag) {
- if (_isDirty != flag) {
- _isDirty = flag;
- }
- }
-
- public boolean wasRestored() {
- return _wasRestored;
- }
-
- public void setWasRestored(boolean flag) {
- _wasRestored = flag;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java
deleted file mode 100644
index 14e2a9fb0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.core.internal;
-
-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 = null;
-
- // extension registry
- private IExtensionRegistry registry;
-
- // state variables
- private boolean hasReadSystemTypes;
-
- // model objects
- private IRSESystemType[] systemTypes;
-
- // constants
- private static final String ELEMENT_SYTEM_TYPE = "systemType"; //$NON-NLS-1$
-
- /**
- * 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
deleted file mode 100644
index dd3b6b88b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.core.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.eclipse.rse.core.IRSESystemTypeConstants;
-import org.osgi.framework.Bundle;
-
-/**
- * Class representing a system type.
- */
-public class RSESystemType implements IRSESystemType {
-
- private static final String ATTR_ID = "id"; //$NON-NLS-1$
- private static final String ATTR_NAME = "name"; //$NON-NLS-1$
- private static final String ATTR_DESCRIPTION = "description"; //$NON-NLS-1$
- private static final String ATTR_ICON = "icon"; //$NON-NLS-1$
- private static final String ATTR_ICONLIVE = "iconLive"; //$NON-NLS-1$
- private static final String ATTR_ENABLEOFFLINE = "enableOffline"; //$NON-NLS-1$
- private static final String ATTR_VALUE = "value"; //$NON-NLS-1$
-
- 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);
-
- String icon = element.getAttribute(ATTR_ICON);
- if (icon!=null) properties.put(IRSESystemTypeConstants.ICON, icon);
- String iconLive = element.getAttribute(ATTR_ICONLIVE);
- if (iconLive!=null) properties.put(IRSESystemTypeConstants.ICON_LIVE, iconLive);
- String enableOffline = element.getAttribute(ATTR_ENABLEOFFLINE);
- if (enableOffline!=null) properties.put(IRSESystemTypeConstants.ENABLE_OFFLINE, enableOffline);
-
- 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.core/src/org/eclipse/rse/core/model/AbstractSystemResourceSet.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/AbstractSystemResourceSet.java
deleted file mode 100644
index c093941f4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/AbstractSystemResourceSet.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-
-
-
-public class AbstractSystemResourceSet implements ISystemResourceSet
-{
- private List _resourceSet;
- private SystemMessage _message;
- private long _byteSize;
-
- public AbstractSystemResourceSet()
- {
- _resourceSet = new ArrayList();
- }
-
- public AbstractSystemResourceSet(Object[] set)
- {
- _resourceSet = new ArrayList();
- if (set != null)
- {
- for (int i = 0; i < set.length; i++)
- {
- addResource(set[i]);
- }
- }
- }
-
- public AbstractSystemResourceSet(List set)
- {
- _resourceSet = set;
- }
-
- public int size()
- {
- return _resourceSet.size();
- }
-
- public Object get(String absoluteName)
- {
- for (int i = 0; i < _resourceSet.size(); i++)
- {
- String path = pathFor(_resourceSet.get(i));
- if (path.equals(absoluteName))
- {
- return _resourceSet.get(i);
- }
- }
- return null;
- }
-
- public Object get(int index)
- {
- return _resourceSet.get(index);
- }
-
- public List getResourceSet()
- {
- return _resourceSet;
- }
-
- public void addResource(Object src)
- {
- _resourceSet.add(src);
- }
-
- public void removeResource(Object src)
- {
- _resourceSet.remove(src);
- }
-
- public String pathFor(Object resource)
- {
- return resource.toString();
- }
-
- public String toString()
- {
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < _resourceSet.size(); i++)
- {
- Object resource = _resourceSet.get(i);
- buf.append(pathFor(resource));
- if (i < _resourceSet.size())
- {
- buf.append(", "); //$NON-NLS-1$
- }
- buf.append('\n');
- }
- return buf.toString();
- }
-
-
- public void setMessage(SystemMessage message)
- {
- _message = message;
- }
-
- public SystemMessage getMessage()
- {
- return _message;
- }
-
- public boolean hasMessage()
- {
- return _message != null;
- }
-
- public boolean hasByteSize()
- {
- return (_byteSize > 0);
- }
-
- public long byteSize()
- {
- return _byteSize;
- }
-
- public void setByteSize(long byteSize)
- {
- _byteSize = byteSize;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java
deleted file mode 100644
index b42730049..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-
-
-
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * Interface for SystemConnection objects.
- * A SystemConnect holds information identifying a remote system. It also logically contains
- * SubSystem objects, although this containment is achievable programmatically versus via
- * object oriented containment.
- * <p>
- */
-/**
- * @lastgen interface SystemConnection {}
- */
-public interface IHost extends IRSEModelObject
-{
- /**
- * Return the system profile that owns this connection
- */
- public ISystemProfile getSystemProfile();
-
- /**
- * Return the name of the system profile that owns this connection
- */
- public String getSystemProfileName();
-
- /**
- * Set the parent connection pool this is owned by.
- * Connection pools are internal management objects, one per profile.
- */
- public void setHostPool(ISystemHostPool pool);
- /**
- * Set the parent connection pool this is owned by.
- * Connection pools are internal management objects, one per profile.
- */
- public ISystemHostPool getHostPool();
-
- /**
- * Return the subsystem instances under this connection.
- * Just a shortcut to {@link org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(IHost)}
- */
- public ISubSystem[] getSubSystems();
-
- /**
- * Return the local default user Id without resolving up the food chain.
- * @see #getDefaultUserId()
- */
- public String getLocalDefaultUserId();
- /**
- * Clear the local default user Id so next query will return the value from
- * the preference store.
- * <p>
- * Same as calling setDefaultUserId(null)
- * @see #setDefaultUserId(String)
- */
- public void clearLocalDefaultUserId();
-
- /**
- * Private method called when this connection is being deleted, so
- * we can do any pre-death cleanup we need.
- * <p>
- * What we need to do is delete our entry in the preference store for our default userId.
- */
- public void deletingHost();
-
- /**
- * Private method called when this connection's profile is being rename, so
- * we can do any pre-death cleanup we need.
- * <p>
- * What we need to do is rename our entry in the preference store for our default userId.
- */
- public void renamingSystemProfile(String oldName, String newName);
- /**
- * Call this to query whether the default userId is to be uppercased.
- */
- public boolean getForceUserIdToUpperCase();
- /**
- * Call this to compare two userIds taking case sensitivity
- */
- public boolean compareUserIds(String userId1, String userId2);
-/**
- * @return The value of the SystemType attribute
- */
- public String getSystemType();
-
-/**
- * @param value The new value of the SystemType attribute
- */
- public void setSystemType(String value);
-
-/**
- * @return The value of the AliasName attribute
- * The unique key for this object. Unique per connection pool
- */
- public String getAliasName();
-
-/**
- * @param value The new value of the AliasName attribute
- */
- public void setAliasName(String value);
-
-/**
- * @return The value of the HostName attribute
- */
- public String getHostName();
-
-/**
- * @param value The new value of the HostName attribute
- */
- public void setHostName(String value);
-
-/**
- * @return The value of the Description attribute
- */
- public String getDescription();
-
-/**
- * @param value The new value of the Description attribute
- */
- public void setDescription(String value);
-
-/**
- * We return the default user Id. Note that we don't store it directly in
- * the mof-modelled attribute, as we don't want the team to share it. Rather,
- * we store the actual user Id in the preference store keyed by this connection's
- * unique name (profile.connName) and store that key in this attribute.
- * <p>
- * Further, it is possible that there is no default user id. If so, this
- * method will go to the preference store and will try to get the default user
- * Id per this connection's system type.
- * <p>
- * This is all transparent to the caller though.
- * <p>
- * @return The value of the DefaultUserId attribute
- */
- public String getDefaultUserId();
-
-/**
- * Intercept of setDefaultUserId so we can force it to uppercase.
- * Also, we do not store the user Id per se in the attribute, but rather
- * we store it in the preference with a key name unique to this connection.
- * We store that key name in this attribute. However, this is all transparent to
- * the caller.
- * @param value The new value of the DefaultUserId attribute
- */
- public void setDefaultUserId(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Promptable attribute
- */
- boolean isPromptable();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Promptable attribute
- */
- void setPromptable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Offline</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * Is this connection offline? If so, there is no live connection. Subsystems
- * decide how much to enable while offline.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Offline</em>' attribute.
- * @see #setOffline(boolean)
- */
- boolean isOffline();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.model.IHost#isOffline <em>Offline</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Offline</em>' attribute.
- * @see #isOffline()
- * @generated
- */
- void setOffline(boolean value);
-
- /**
- * Returns all the connector services provided
- * for this host
- * @return the connector services
- */
- IConnectorService[] getConnectorServices();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IProperty.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IProperty.java
deleted file mode 100644
index ae7fd2a72..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IProperty.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-public interface IProperty
-{
- public String getKey();
-
- public String getLabel();
- public void setLabel(String label);
-
- public void setValue(String value);
- public String getValue();
-
- public void setType(IPropertyType type);
- public IPropertyType getType();
-
- public void setEnabled(boolean flag);
- public boolean isEnabled();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java
deleted file mode 100644
index eb725dfc1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. 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:
- * Martin Oberhuber (Wind River) - Added Javadoc.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.Map;
-
-/**
- * A Property Set stores key/value pairs, where the keys
- * are Strings and the values are an {@link IProperty},
- * of a type declared by an {@link IPropertyType}.
- *
- * The Property Set is identified by a name.
- * By default, the type of each property is of type String, and
- * in fact each value can be retrieved in String representation.
- *
- * The key <code>"description"</code> is reserved for internal
- * use, to store the description of the Property set.
- */
-public interface IPropertySet
-{
- /** The key used to store the description of the Property Set. */
- public static final String DESCRIPTION_KEY = "description"; //$NON-NLS-1$
-
- /**
- * Return the name of this Property Set.
- * @return String name of the Property Set.
- */
- public String getName();
-
- /**
- * Return the description of this Property Set.
- *
- * Note that in order to set the description, you need to call
- * <code>setProperty(IPropertySet.DESCRIPTION_KEY, "Description");</code>
- *
- * @return Description of the Property Set,
- * or <code>null</code> in case no description has been set.
- */
- public String getDescription();
-
- /**
- * Return the {@link IProperty} associated with the given key.
- *
- * If the key is not in the set, <code>null</code> is returned.
- *
- * @param key String key for Property
- * @return requested Property,
- * or <code>null</code> if the key is not found in the set.
- */
- public IProperty getProperty(String key);
-
- /**
- * Return the String representation of a Property.
- *
- * Provided that the key is found in the set, this is a shortcut
- * for getProperty(key).getValue(). If the key is not in the set,
- * <code>null</code> is returned.
- *
- * @param key String key for Property
- * @return String value of requested Property,
- * or <code>null</code> if the key is not found in the set.
- */
- public String getPropertyValue(String key);
-
- /**
- * Return the list of Property Keys in this Set.
- *
- * Provided that the Set has a description, the
- * @link{DESCRIPTION_KEY} key will also be in the list.
- *
- * @return String array of Property keys.
- */
- public String[] getPropertyKeys();
-
- /**
- * Return the type of the property identified by the given key.
- *
- * @param key String key for Property
- * @return Type of requested Property,
- * or <code>null</code> if the key is not found in the set.
- */
- public IPropertyType getPropertyType(String key);
-
- /**
- * Set the name of this Property Set.
- * @param name the name to set. Must not be <code>null</code>
- */
- public void setName(String name);
-
- /**
- * Set all the Properties of this set.
- *
- * @param map a Map of String to {@link IProperty} associations.
- */
- public void setProperties(Map map);
-
- /**
- * Add a Property with String value to the set.
- *
- * In case a Property already exist for the given key, it will be overwritten
- * by the new value, note that this will <b>not</b> change the Property's type,
- * so if the key identifies an integer Property but you set it to String value
- * "foo" the resulting Property Set will be inconsistent.
- *
- * If the Property does not yet exist in the set, a new key will be added and
- * the new Property will be of type "String".
- *
- * @param key Key to add
- * @param value Value to add
- * @return The added Property
- */
- public IProperty addProperty(String key, String value);
-
- /**
- * Add a typed Property to the set.
- *
- * In case a Property already exists for the given key, it will be
- * removed and replaced by the new one.
- *
- * @param key Key to add
- * @param value Value to add
- * @param type Type of the Property to add
- * @return The added Property
- */
- public IProperty addProperty(String key, String value, IPropertyType type);
-
- /**
- * Remove a Property from the set.
- *
- * @param key The key to remove
- * @return <code>true</code> if the Property has been removed,
- * or <code>false</code> if the key has not been part of the set.
- */
- public boolean removeProperty(String key);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySetContainer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySetContainer.java
deleted file mode 100644
index 64d05d1b6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySetContainer.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-public interface IPropertySetContainer
-{
- public IPropertySet[] getPropertySets();
- public IPropertySet getPropertySet(String name);
-
- public IPropertySet createPropertySet(String name);
- public IPropertySet createPropertySet(String name, String description);
- public boolean addPropertySet(IPropertySet set);
- public boolean addPropertySets(IPropertySet[] sets);
- public boolean removePropertySet(String name);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertyType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertyType.java
deleted file mode 100644
index a6abb1d1d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertyType.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-public interface IPropertyType
-{
- public static final int TYPE_STRING = 0;
- public static final int TYPE_INTEGER = 1;
- public static final int TYPE_ENUM = 2;
- public static final int TYPE_BOOLEAN = 3;
-
- public boolean isString();
- public boolean isInteger();
- public boolean isEnum();
- public boolean isBoolean();
-
- public int getType();
- public String[] getEnumValues();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEModelObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEModelObject.java
deleted file mode 100644
index 7602d96d4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEModelObject.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.rse.core.persistance.IRSEPersistableContainer;
-
-public interface IRSEModelObject extends IPropertySetContainer, IRSEPersistableContainer
-{
- String getName();
- String getDescription();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurationCategories.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurationCategories.java
deleted file mode 100644
index 00164f93e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurationCategories.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.model;
-
-
-/**
- * Constants for pre-defined subsystem factory categories.
- * Use these in calls to {@link org.eclipse.rse.core.model.ISystemRegistry#getHostsBySubSystemConfigurationCategory(String)}.
- */
-public interface ISubSystemConfigurationCategories
-{
- /**
- * Job subsystems
- */
- public static final String SUBSYSTEM_CATEGORY_JOBS = "jobs"; //$NON-NLS-1$
- /**
- * File subsystems
- */
- public static final String SUBSYSTEM_CATEGORY_FILES = "files"; //$NON-NLS-1$
- /**
- * Command subsystems
- */
- public static final String SUBSYSTEM_CATEGORY_CMDS = "commands"; //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContainer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContainer.java
deleted file mode 100644
index d96d98c05..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContainer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * @author dmcknigh
- */
-public interface ISystemContainer
-{
-
- /**
- * Returns whether the object has contents of a particular type.
- * @param contentsType type of contents
- * @return <code>true</code> if the object has contents, <code>false</code> otherwise.
- */
- public boolean hasContents(ISystemContentsType contentsType);
-
- /**
- * Returns all the contents of the object (combining results of all filters
- * @param contentsType type of contents
- * @return an array of contents.
- */
- public Object[] getContents(ISystemContentsType contentsType);
-
-
- /**
- * Indicates whether the cached object is stale
- * @return whether the container is stale
- */
- public boolean isStale();
-
- /**
- * Marks the object as stale or not
- * @param isStale whether the object is to be marked stale or not
- */
- public void markStale(boolean isStale);
-
- /**
- * Marks the object as stale or not
- * @param isStale whether the object is to be marked stale or not
- * @param clearCache indicates whether or not to clear the cache
- */
- public void markStale(boolean isStale, boolean clearCache);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContentsType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContentsType.java
deleted file mode 100644
index 1d9409d52..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContentsType.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/*
- * Common interface for representing different contents types of
- * artifacts that can be stored in an IRemoteContainer
- */
-public interface ISystemContentsType
-{
- /*
- * Indicates the type of this contents
- */
- public String getType();
-
- /*
- * Indicates whether or not the contents
- * can be flushed or not when a container becomes
- * stale.
- */
- public boolean isPersistent();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemHostPool.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemHostPool.java
deleted file mode 100644
index 67ca5f3f7..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemHostPool.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.List;
-
-import org.eclipse.rse.core.persistance.IRSEPersistableContainer;
-
-
-//
-/**
- * A list of connections.
- */
-/**
- * @lastgen interface SystemConnectionPool {}
- */
-
-public interface ISystemHostPool extends IRSEPersistableContainer
-{
-
-
-
- /**
- * Return the system profile that owns this connection pool
- */
- public ISystemProfile getSystemProfile();
- /**
- * Rename this connection pool.
- */
- public void renameHostPool(String newName);
- /**
- * Return array of connections in this pool
- */
- public IHost[] getHosts();
- /**
- * Create a connection.
- */
- public IHost createHost(String systemType, String aliasName, String hostName)
- throws Exception;
- /**
- * Create a connection.
- */
- public IHost createHost(String systemType, String aliasName, String hostName, String description)
- throws Exception;
- /**
- * Create a connection.
- */
- public IHost createHost(String systemType, String aliasName, String hostName, String description,
- String defaultUserId, int defaultUserIdLocation)
- throws Exception;
- /**
- * Update an existing connection given the new information.
- * This method:
- * <ul>
- * <li>calls the setXXX methods on the given connection object, updating the information in it.
- * <li>saves the connection to disk (renaming its folder if needed)
- * </ul>
- * <p>
- * @param conn SystemConnection to be updated
- * @param systemType system type matching one of the system type names defined via the
- * systemType extension point.
- * @param aliasName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @param defaultUserId userId to use as the default for the subsystems.
- * @param defaultUserIdLocation where to set the given default user Id. See ISystemUserIdConstants
- */
- public void updateHost(IHost conn, String systemType,
- String aliasName, String hostName,
- String description,String defaultUserId, int defaultUserIdLocation)
- throws Exception;
-
- /**
- * Return a connection given its name.
- */
- public IHost getHost(String aliasName);
- /**
- * Return the connection at the given zero-based offset
- */
- public IHost getHost(int pos);
- /**
- * Add a new connection to the list.
- */
- public boolean addHost(IHost conn);
- /**
- * Removes a given connection from the list and deletes it from disk.
- * <p>
- * This will:
- * <ul>
- * <li>Delete the connection in memory
- * <li>Delete the underlying folder
- * </ul>
- * <p>
- * @param conn SystemConnection object to remove
- */
- public void deleteHost(IHost conn);
- /**
- * Renames a given connection in the list.
- * This will:
- * <ul>
- * <li>Rename the profile in memory
- * <li>Rename the underlying folder
- * <li>Update the user preferences if this profile is currently active.
- * </ul>
- * @param conn SystemConnection object to rename
- * @param newName The new name to give that connection.
- */
- public void renameHost(IHost conn, String newName) throws Exception;
- /**
- * Return the zero-based position of a SystemConnection object within its profile.
- */
- public int getHostPosition(IHost conn);
- /**
- * Return the number of SystemConnection objects within this pool.
- */
- public int getHostCount();
-
- /**
- * Duplicates a given connection in this list within this list or another list.
- * @param targetPool The SystemConnectionPool to hold the copied connection. Can equal this connection, as long as alias name is unique
- * @param conn SystemConnection object (within our pool) to clone
- * @param aliasName New, unique, alias name to give this connection. Clone will fail if this is not unique.
- */
- public IHost cloneHost(ISystemHostPool targetPool, IHost conn, String aliasName)
- throws Exception;
-
- /**
- * Move existing connections a given number of positions in the same pool.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- * <ul>
- * <li>After the move, the pool containing the moved connection is saved to disk.
- * <li>The connection's alias name must be unique in pool.
- * </ul>
- * <b>TODO PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION?</b>
- * @param conns Array of SystemConnections to move.
- * @param delta the amount by which to move the hosts within this pool
- */
- public void moveHosts(IHost conns[], int delta);
-
- /**
- * Order connections according to user preferences.
- * Called after restore.
- */
- public void orderHosts(String[] names);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Name attribute
- */
- String getName();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Name attribute
- */
- void setName(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The list of Connections references
- */
- List getHostList();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemMessageObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemMessageObject.java
deleted file mode 100644
index c3f954571..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemMessageObject.java
+++ /dev/null
@@ -1,72 +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.model;
-/**
- * This interface represents a message we wish to display as child node in the tree view.
- */
-public interface ISystemMessageObject
-{
- /**
- * 0. An error occurred.
- */
- public static final int MSGTYPE_ERROR = 0;
- /**
- * 1. User canceled
- */
- public static final int MSGTYPE_CANCEL= 1;
- /**
- * 3. Informational text
- */
- public static final int MSGTYPE_INFO = 2;
- /**
- * 4. Empty list. Eg "Nothing meets subset criteria"
- */
- public static final int MSGTYPE_EMPTY = 3;
- /**
- * 5. Object created successfully.
- */
- public static final int MSGTYPE_OBJECTCREATED = 4;
-
- /**
- * Return the message text shown for the label.
- * The translated text is pre-determined from the message type.
- */
- public String getMessage();
- /**
- * Return the type of message:
- * <ul>
- * <li>{@link #MSGTYPE_ERROR}
- * <li>{@link #MSGTYPE_CANCEL}
- * <li>{@link #MSGTYPE_INFO}
- * <li>{@link #MSGTYPE_EMPTY}
- * <li>{@link #MSGTYPE_OBJECTCREATED}
- * </ul>
- */
- public int getType();
- /**
- * Return the parent object in the tree. That is, what was expanded to produce this message
- */
- public Object getParent();
-
- /**
- * isTransient determines if the message should be removed from the
- * tree when the parent item in the tree is collapsed.
- *
- * @return true if the item should be removed, false if it should not
- */
- public boolean isTransient();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeEvent.java
deleted file mode 100644
index ec4245855..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeEvent.java
+++ /dev/null
@@ -1,43 +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.model;
-
-/**
- * A change event passed to you when listening for RSE model changes.
- * Note these are post-events, sent after the fact.
- */
-public interface ISystemModelChangeEvent
-{
- /**
- * Get the event type, such as {@link org.eclipse.rse.core.model.ISystemModelChangeEvents#SYSTEM_RESOURCE_ADDED}.
- * @see org.eclipse.rse.core.model.ISystemModelChangeEvents
- */
- public int getEventType();
- /**
- * Get the resource type, such as {@link org.eclipse.rse.core.model.ISystemModelChangeEvents#SYSTEM_RESOURCETYPE_CONNECTION}.
- * @see org.eclipse.rse.core.model.ISystemModelChangeEvents
- */
- public int getResourceType();
- /**
- * Get the resource that this event applies to
- */
- public Object getResource();
- /**
- * Get the old name of the resource, in the event of a resource rename. Null for other event types.
- */
- public String getOldName();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeEvents.java
deleted file mode 100644
index 2a511fdc0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeEvents.java
+++ /dev/null
@@ -1,105 +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.model;
-
-/**
- * The event IDs sent when local resources in the RSE model change.
- * You should monitor for these events in your view if you display any of the resource types listed here.
- * <p>
- * To monitor, implement interface {@link org.eclipse.rse.core.model.ISystemModelChangeListener} and
- * call {@link org.eclipse.rse.core.model.ISystemRegistry#addSystemModelChangeListener(ISystemModelChangeListener)}
- * and in your dispose method, call {@link org.eclipse.rse.core.model.ISystemRegistry#removeSystemModelChangeListener(ISystemModelChangeListener)}.
- * <p>
- * If you are interesting in firing model change events, see
- * {@link org.eclipse.rse.core.model.ISystemRegistry#fireModelChangeEvent(int, int, Object, String)}.
- * These events will typically be signalled in an implementation of ISystemRegistry.
- */
-public interface ISystemModelChangeEvents
-{
-
- /**
- * Event Type: a resource was added
- */
- public static final int SYSTEM_RESOURCE_ADDED = 1;
-
- /**
- * Event Type: a resource was removed
- */
- public static final int SYSTEM_RESOURCE_REMOVED = 2;
-
- /**
- * Event Type: a resource was changed
- */
- public static final int SYSTEM_RESOURCE_CHANGED = 4;
-
- /**
- * Event Type: a resource was renamed
- */
- public static final int SYSTEM_RESOURCE_RENAMED = 8;
- /**
- * Event Type: a resource was reordered relative to its siblings
- */
- public static final int SYSTEM_RESOURCE_REORDERED = 16;
-
- /**
- * Event Type: all resource were reloaded from the workspace: you need to refresh your viewer!
- * This is fired after the user selects the Reload RSE action in the Team view, after recieving files from the repository.
- */
- public static final int SYSTEM_RESOURCE_ALL_RELOADED = 128;
-
-
- /**
- * Resource Type: profile
- */
- public static final int SYSTEM_RESOURCETYPE_PROFILE = 1;
- /**
- * Resource Type: connection
- */
- public static final int SYSTEM_RESOURCETYPE_CONNECTION = 2;
- /**
- * Resource Type: subsystem
- */
- public static final int SYSTEM_RESOURCETYPE_SUBSYSTEM = 4;
- /**
- * Resource Type: filter pool
- */
- public static final int SYSTEM_RESOURCETYPE_FILTERPOOL = 8;
- /**
- * Resource Type: filter pool reference. These are what subsystems contain... references to filter pools.
- */
- public static final int SYSTEM_RESOURCETYPE_FILTERPOOLREF = 16;
- /**
- * Resource Type: filter
- */
- public static final int SYSTEM_RESOURCETYPE_FILTER = 32;
- /**
- * Resource Type: user action
- */
- public static final int SYSTEM_RESOURCETYPE_USERACTION = 128;
- /**
- * Resource Type: named type, which are used in user actions
- */
- public static final int SYSTEM_RESOURCETYPE_NAMEDTYPE = 256;
- /**
- * Resource Type: compile command
- */
- public static final int SYSTEM_RESOURCETYPE_COMPILECMD = 512;
- /**
- * Resource Type: ALL. Used with SYSTEM_RESOURCE_ALL_RELOADED
- */
- public static final int SYSTEM_RESOURCETYPE_ALL = 9999;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeListener.java
deleted file mode 100644
index cc386898e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModelChangeListener.java
+++ /dev/null
@@ -1,40 +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.model;
-/**
- * Interface that listeners interesting in changes to local resources in the RSE model
- * implement, and subsequently register their interest, via SystemRegistry.
- * <p>
- * If you list any of the resource types defined in {@link org.eclipse.rse.core.model.ISystemModelChangeEvents}
- * you should monitor by implementing this interface, and registering with the
- * system registry via {@link org.eclipse.rse.core.model.ISystemRegistry#addSystemModelChangeListener(ISystemModelChangeListener)}.
- * In your view's dispose method, you must also de-register by calling
- * {@link org.eclipse.rse.core.model.ISystemRegistry#removeSystemModelChangeListener(ISystemModelChangeListener)}.
- * <p>
- * If you are interesting in firing model change events, see
- * {@link org.eclipse.rse.core.model.ISystemRegistry#fireModelChangeEvent(int, int, Object, String)}.
- */
-public interface ISystemModelChangeListener
-{
-
- /**
- * This is the method in your class that will be called when a resource in the
- * RSE model changes. You will be called after the resource is changed.
- * @see ISystemModelChangeEvent
- */
- public void systemModelResourceChanged(ISystemModelChangeEvent event);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemNewConnectionWizardPage.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemNewConnectionWizardPage.java
deleted file mode 100644
index 27cc60d30..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemNewConnectionWizardPage.java
+++ /dev/null
@@ -1,48 +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.model;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * Interface that all subsystem factory supplied pages contributed to the New Connection wizard
- * must implement.
- * @see org.eclipse.rse.ui.wizards.AbstractSystemNewConnectionWizardPage
- * @see org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)
- */
-public interface ISystemNewConnectionWizardPage
-{
-
- /**
- * This is called when the users presses Finish. All that should be done here is validation
- * of the input, returning true if all is ok and the finish can proceed.
- */
- public boolean performFinish();
-
- /**
- * This is called frequently by the framework to decide whether to enable the Finish and
- * Next buttons.
- * <p>
- * Return true if the page is complete and has no errors
- */
- public boolean isPageComplete();
-
- /**
- * Return the subsystem factory that supplied this page
- */
- public ISubSystemConfiguration getSubSystemConfiguration();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeEvent.java
deleted file mode 100644
index 6b36afe2e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeEvent.java
+++ /dev/null
@@ -1,45 +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.model;
-/**
- * Interface of event sent when a remote system preference changes.
- * @see org.eclipse.rse.core.model.ISystemPreferenceChangeEvents
- */
-public interface ISystemPreferenceChangeEvent
-{
-
- /**
- * Returns the type of the event.
- * @see org.eclipse.rse.core.model.ISystemPreferenceChangeEvents
- * @return a type that is one of the constants in this interface
- */
- public int getType();
- /**
- * Set the type
- * @see org.eclipse.rse.core.model.ISystemPreferenceChangeEvents
- */
- public void setType(int type);
- /**
- * Get the old value. For boolean will be a Boolean object
- */
- public Object getOldValue();
- /**
- * Get the new value. For boolean will be a Boolean object
- */
- public Object getNewValue();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeEvents.java
deleted file mode 100644
index cd3fca8ea..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeEvents.java
+++ /dev/null
@@ -1,45 +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.model;
-/**
- * Interface of event ID constants for preferences changed
- */
-public interface ISystemPreferenceChangeEvents
-{
- /**
- * The Show Filter Pools preference has changed
- */
- public static final int EVENT_SHOWFILTERPOOLS = 5;
- /**
- * The Show Filter String preference has changed
- */
- public static final int EVENT_SHOWFILTERSTRINGS = 10;
- /**
- * The Qualify Connection Names preference has changed
- */
- public static final int EVENT_QUALIFYCONNECTIONNAMES = 15;
- /**
- * The Restore State preference has changed
- */
- public static final int EVENT_RESTORESTATE = 20;
-
- /**
- * A connection type has been enabled or disabled
- */
- public static final int EVENT_ENABLED_CONNECTIONS_CHANGED = 25;
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeListener.java
deleted file mode 100644
index 3e67cfeff..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemPreferenceChangeListener.java
+++ /dev/null
@@ -1,34 +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.model;
-import java.util.EventListener;
-
-
-/**
- * Interface that listeners interesting in changes to remote
- * system preferences can implement and subsequently register
- * their interest in via SystemRegistry.
- */
-public interface ISystemPreferenceChangeListener extends EventListener
-{
- /**
- * This is the method in your class that will be called when a
- * system resource changes.
- * @see ISystemPreferenceChangeEvent
- */
- public void systemPreferenceChanged(ISystemPreferenceChangeEvent event);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfile.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfile.java
deleted file mode 100644
index 08b368d53..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfile.java
+++ /dev/null
@@ -1,95 +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.model;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-//
-
-/**
- * The interface that RSE system profiles implement.
- * <p>
- * A profile represents a user or name which is used to key important user-data
- * by:
- * <ul>
- * <li>Hosts
- * <li>Filter pools
- * <li>User actions
- * <li>Compile commands
- * </ul>
- *
- * <p>
- * @lastgen interface SystemProfile {}
- */
-public interface ISystemProfile extends IRSEModelObject
-{
-
- /**
- * Set the in-memory pointer back to the parent system profile manager
- */
- public void setProfileManager(ISystemProfileManager mgr);
- /**
- * Get the in-memory pointer back to the parent system profile manager
- */
- public ISystemProfileManager getProfileManager();
-
- /**
- * Convenience method for create a new connection within this profile.
- * Shortcut for {@link ISystemRegistry#createHost(String,String,String,String)}
- */
- public IHost createHost(String systemType, String connectionName, String hostName, String description) throws Exception;
-
- /**
- * @return The value of the Name attribute
- */
- String getName();
-
- /**
- * @param value The new value of the Name attribute
- */
- void setName(String value);
-
- /**
- * @return The value of the DefaultPrivate attribute
- * Is this profile created automatically, and is it the profile
- * that is unique for this developer?
- */
- boolean isDefaultPrivate();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the DefaultPrivate attribute
- */
- void setDefaultPrivate(boolean value);
-
- /**
- * Return all connections for this profile
- */
- public IHost[] getHosts();
- /**
- * Return all filter pools for this profile
- */
- public ISystemFilterPool[] getFilterPools();
- /**
- * Return all filter pools for this profile, scoped by a given subsystem factory
- */
- public ISystemFilterPool[] getFilterPools(ISubSystemConfiguration ssf);
- /**
- * Return true if this profile is currently active for this user
- */
- public boolean isActive();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java
deleted file mode 100644
index 9749ae846..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java
+++ /dev/null
@@ -1,147 +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.model;
-
-import java.util.Vector;
-
-/**
- * A class that manages a list of SystemProfile objects.
- */
-
-public interface ISystemProfileManager {
-
- /**
- * Create a new profile with the given name, and add to the list.
- * The name must be unique within the existing list.
- * <p>
- * The underlying folder is created in the file system.
- * <p>
- * @param name What to name this profile
- * @param makeActive true if this profile is to be added to the active profile list.
- * @return new profile, or null if name not unique.
- */
- public ISystemProfile createSystemProfile(String name, boolean makeActive);
-
- /**
- * Toggle an existing profile's state between active and inactive
- * @param profile the profile to (in)activate
- * @param makeActive the state to make this profile
- */
- public void makeSystemProfileActive(ISystemProfile profile, boolean makeActive);
-
- /**
- * @return an array of all existing profiles.
- */
- public ISystemProfile[] getSystemProfiles();
-
- /**
- * @return an array of all existing profile names.
- */
- public String[] getSystemProfileNames();
-
- /**
- * @return a vector of all existing profile names.
- */
- public Vector getSystemProfileNamesVector();
-
- /**
- * Get a profile given its name.
- * @param name the name of the profile
- * @return the profile
- */
- public ISystemProfile getSystemProfile(String name);
-
- /**
- * @return the profiles identified via preferences as the active profiles...
- */
- public ISystemProfile[] getActiveSystemProfiles();
-
- /**
- * @return the profile names currently selected by the user as his "active" profiles
- */
- public String[] getActiveSystemProfileNames();
-
- /**
- * Get the index of a profile given its name.
- * @param profileName the name of the profile to look for.
- * @return 0-based position of the given active profile within the list of active profiles.
- */
- public int getActiveSystemProfilePosition(String profileName);
-
- /**
- * @return the default private profile created at first touch.
- * Will return null if it has been renamed.
- */
- public ISystemProfile getDefaultPrivateSystemProfile();
-
- /**
- * @return the default team profile created at first touch.
- * Will return null if it has been renamed.
- */
- public ISystemProfile getDefaultTeamSystemProfile();
-
- /**
- * Rename the given profile.
- * @param profile the profile to rename
- * @param newName the new profile name
- */
- public void renameSystemProfile(ISystemProfile profile, String newName);
-
- /**
- * Delete the given profile
- * @param profile the name of the profile to delete.
- * @param persist true if the deletion is meant to be persisted as well, false if the deletion is just in the
- * model.
- */
- public void deleteSystemProfile(ISystemProfile profile, boolean persist);
-
- /**
- * Clone the given profile
- * @param profile the profile to clone
- * @param newName the name of the new profile
- * @return the new profile
- */
- public ISystemProfile cloneSystemProfile(ISystemProfile profile, String newName);
-
- /**
- * Get an indication of whether a profile is active or not.
- * @param profileName the name of the profile to test
- * @return true if the given profile is active
- * @see ISystemProfile#isActive()
- */
- public boolean isSystemProfileActive(String profileName);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The list of Profiles references
- */
- java.util.List getProfiles();
-
- // /**
- // * Reusable method to return a name validator for renaming a profile.
- // * @param the current profile name on updates. Can be null for new profiles. Used
- // * to remove from the existing name list the current connection.
- // */
- // public ISystemValidator getProfileNameValidator(String profileName);
- // /**
- // * Reusable method to return a name validator for renaming a profile.
- // * @param the current profile object on updates. Can be null for new profiles. Used
- // * to remove from the existing name list the current connection.
- // */
- // public ISystemValidator getProfileNameValidator(ISystemProfile profile);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
deleted file mode 100644
index 1fc478625..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
+++ /dev/null
@@ -1,657 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterStartHere;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-
-
-/**
- * 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.RSECorePlugin#getSystemRegistry()}.
- * <p>
- * The idea here is that connections are grouped by system profile. At any
- * time, there is a user-specified number of profiles "active" and connections
- * from each active profile are worked with.
- */
-public interface ISystemRegistry extends ISchedulingRule
-{
-
- public ISystemFilterStartHere getSystemFilterStartHere();
-
- public ISystemFilterPool getSystemFilterPool();
-
- // ----------------------------------
- // UI METHODS...
- // ----------------------------------
- /**
- * Show the RSE perspective if it is not already showing
- */
- public void showRSEPerspective();
- /**
- * Expand the given connection in the RSE, if the RSE is the active perspective.
- */
- public void expandHost(IHost conn);
- /**
- * Expand the given subsystem in the RSE, if the RSE is the active perspective.
- */
- public void expandSubSystem(ISubSystem subsystem);
-
- // ----------------------------
- // SUBSYSTEM FACTORY METHODS...
- // ----------------------------
- /**
- * Private method used by RSEUIPlugin to tell registry all registered subsystem
- * factories. This way, all code can use this registry to access them versus the
- * RSEUIPlugin.
- */
- public void setSubSystemConfigurationProxies(ISubSystemConfigurationProxy[] proxies);
- /**
- * Public method to retrieve list of subsystem factory proxies registered by extension points.
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies();
- /**
- * Return all subsystem factory proxies matching a subsystem factory category.
- * @see ISubSystemConfigurationCategories
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(String factoryCategory);
- /**
- * Return all subsystem factories. Be careful when you call this, as it activates all
- * subsystem factories.
- */
- public ISubSystemConfiguration[] getSubSystemConfigurations();
-
- /**
- * Return the parent subsystemconfiguration given a subsystem object.
- */
- public ISubSystemConfiguration getSubSystemConfiguration(ISubSystem subsystem);
- /**
- * Return the subsystemconfiguration, given its plugin.xml-declared id.
- */
- public ISubSystemConfiguration getSubSystemConfiguration(String id);
- /**
- * Return all subsystem factories which have declared themselves part of the given category.
- * <p>
- * This looks for a match on the "category" of the subsystem factory's xml declaration
- * in its plugin.xml file. Thus, it is effecient as it need not bring to life a
- * subsystem factory just to test its parent class type.
- *
- * @see ISubSystemConfigurationCategories
- */
- public ISubSystemConfiguration[] getSubSystemConfigurationsByCategory(String factoryCategory);
- /**
- * Return all subsystem factories which support the given system type. If the type is null,
- * returns all.
- *
- */
- public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType);
-
- /**
- * Return all subsystem factories which support the given system type. If the type is null,
- * returns all.
- */
- public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType, boolean filterDuplicateServiceSubSystemFactories);
-
-
- // ----------------------------
- // USER PREFERENCE METHODS...
- // ----------------------------
- /**
- * Are connection names to be qualified by profile name?
- */
- public boolean getQualifiedHostNames();
- /**
- * Set if connection names are to be qualified by profile name
- */
- public void setQualifiedHostNames(boolean set);
- /**
- * Reflect the user changing the preference for showing filter pools.
- */
- public void setShowFilterPools(boolean show);
- /*
- * Reflect the user changing the preference for showing filter strings.
- *
- public void setShowFilterStrings(boolean show);
- */
- /**
- * Reflect the user changing the preference for showing new connection prompt
- */
- public void setShowNewHostPrompt(boolean show);
-
- // ----------------------------
- // PROFILE METHODS...
- // ----------------------------
- /**
- * Return singleton profile manager
- */
- public ISystemProfileManager getSystemProfileManager();
- /**
- * Return the profiles currently selected by the user as his "active" profiles
- */
- public ISystemProfile[] getActiveSystemProfiles();
- /**
- * Return the profile names currently selected by the user as his "active" profiles
- */
- public String[] getActiveSystemProfileNames();
- /**
- * Return all defined profiles
- */
- public ISystemProfile[] getAllSystemProfiles();
- /**
- * Return all defined profile names
- */
- public String[] getAllSystemProfileNames();
- /**
- * Return all defined profile names as a vector
- */
- public Vector getAllSystemProfileNamesVector();
- /**
- * Get a SystemProfile given its name
- */
- public ISystemProfile getSystemProfile(String profileName);
- /**
- * Create a SystemProfile given its name and whether or not to make it active
- */
- public ISystemProfile createSystemProfile(String profileName, boolean makeActive)
- throws Exception;
- /**
- * Copy a SystemProfile. All connections connection data is copied.
- * @param monitor Progress monitor to reflect each step of the operation
- * @param profile Source profile to copy
- * @param newName Unique name to give copied profile
- * @param makeActive whether to make the copied profile active or not
- * @return new SystemProfile object
- */
- public ISystemProfile copySystemProfile(IProgressMonitor monitor, ISystemProfile profile, String newName, boolean makeActive)
- throws Exception;
- /**
- * Rename a SystemProfile. Rename is propogated to all subsystem factories so
- * they can rename their filter pool managers and whatever else is required.
- */
- public void renameSystemProfile(ISystemProfile profile, String newName)
- throws Exception;
- /**
- * Delete a SystemProfile. Prior to physically deleting the profile, we delete all
- * the connections it has, all the subsystems they have.
- * <p>
- * As well, all the filter pools for this profile are deleted, and subsequently any
- * cross references from subsystems in connections in other profiles are removed.
- * <p>
- * A delete event is fired for every connection deleted.
- */
- public void deleteSystemProfile(ISystemProfile profile)
- throws Exception;
- /**
- * Make or unmake the given profile active
- */
- public void setSystemProfileActive(ISystemProfile profile, boolean makeActive);
-
-
- /**
- * Return the list of connector services provided for the given host
- * @param conn the host
- * @return the list of connector services
- */
- public IConnectorService[] getConnectorServices(IHost conn);
-
- // ----------------------------
- // SUBSYSTEM METHODS...
- // ----------------------------
-
- /**
- * Return list of subsystem objects for a given connection. If the subsystems have
- * not all been read into memory, this loads them up
- */
- public ISubSystem[] getSubSystems(IHost conn);
-
- /**
- * Return list of subsystem objects for a given connection. Use the force
- * flag to indicate whether or not to restore from disk
- */
- public ISubSystem[] getSubSystems(IHost conn, boolean force);
-
- public ISubSystem[] getServiceSubSystems(Class serviceType, IHost connection);
-
- /**
- * Resolve a subsystem from it's profile, connection and subsystem name.
- *
- * @param srcProfileName the name of the profile
- * @param srcConnectionName the name of the connection
- * @param subsystemFactoryId the id of the subsystem
- *
- * @return the subsystem
- */
- public ISubSystem getSubSystem(String srcProfileName, String srcConnectionName, String subsystemFactoryId);
-
- /**
- * Resolve a subsystem from it's absolute name
- *
- * @param absoluteSubSystemName the name of the subsystem
- *
- * @return the subsystem
- */
- public ISubSystem getSubSystem(String absoluteSubSystemName);
-
- /**
- * Return the absolute name for the specified subsystem
- * @param subsystem the subsystem to query
- * @return the absolute name of the subsystem
- */
- public String getAbsoluteNameForSubSystem(ISubSystem subsystem);
-
- /**
- * Return the absolute name for the specified host (connection)
- * @param connection the host (aka connection) object to query
- * @return the absolute name of the host
- */
- public String getAbsoluteNameForConnection(IHost connection);
-
- /**
- * Get a list of subsystem objects owned by the subsystem factory identified by
- * its given plugin.xml-described id. Array is never null, but may be of length 0.
- * <p>
- * This is a list that of all subsystems for all connections owned by the factory.
- */
- public ISubSystem[] getSubSystems(String factoryId);
- /**
- * Get a list of subsystem objects for given connection, owned by the subsystem factory
- * identified by its given plugin.xml-described id. Array will never be null but may be length zero.
- */
- public ISubSystem[] getSubSystems(String factoryId, IHost connection);
- /**
- * Get a list of subsystem objects for given connection, owned by a subsystem factory
- * that is of the given category. Array will never be null but may be length zero.
- * <p>
- * This looks for a match on the "category" of the subsystem factory's xml declaration
- * in its plugin.xml file.
- *
- * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories
- */
- public ISubSystem[] getSubSystemsBySubSystemConfigurationCategory(String factoryCategory, IHost connection);
-
- /**
- * Delete a subsystem object. This code finds the factory that owns it and
- * delegates the request to that factory.
- */
- public boolean deleteSubSystem(ISubSystem subsystem);
-
- // ----------------------------
- // CONNECTION METHODS...
- // ----------------------------
- /**
- * Return the first connection to localhost we can find. While we always create a default one in
- * the user's profile, it is possible that this profile is not active or the connection was deleted.
- * However, since any connection to localHost will usually do, we just search all active profiles
- * until we find one, and return it. <br>
- * If no localhost connection is found, this will return null. If one is needed, it can be created
- * easily by calling {@link #createLocalHost(ISystemProfile, String, String)}.
- */
- public IHost getLocalHost();
-
- /**
- * Return all connections in all active profiles.
- */
- public IHost[] getHosts();
- /**
- * Return all connections in a given profile name.
- */
- public IHost[] getHostsByProfile(ISystemProfile profile);
- /**
- * Return all connections in a given profile.
- */
- public IHost[] getHostsByProfile(String profileName);
- /**
- * Return all connections for which there exists one or more subsystems owned
- * by a given subsystem factory.
- * @see #getSubSystemConfiguration(String)
- */
- public IHost[] getHostsBySubSystemConfiguration(ISubSystemConfiguration factory);
- /**
- * Return all connections for which there exists one or more subsystems owned
- * by a given subsystem factory, identified by factory Id
- */
- public IHost[] getHostsBySubSystemConfigurationId(String factoryId);
- /**
- * Return all connections for which there exists one or more subsystems owned
- * by any a given subsystem factory that is of the given category.
- * <p>
- * This looks for a match on the "category" of the subsystem factory's xml declaration
- * in its plugin.xml file. Thus, it is effecient as it need not bring to life a
- * subsystem factory just to test its parent class type.
- *
- * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories
- */
- public IHost[] getHostsBySubSystemConfigurationCategory(String factoryCategory);
- /**
- * Return all connections for all active profiles, for the given system type.
- */
- public IHost[] getHostsBySystemType(String systemType);
- /**
- * Return all connections for all active profiles, for the given system types.
- */
- public IHost[] getHostsBySystemTypes(String[] systemTypes);
- /**
- * Return a SystemConnection object given a system profile containing it,
- * and a connection name uniquely identifying it.
- */
- public IHost getHost(ISystemProfile profile, String connectionName);
- /**
- * Return the zero-based position of a SystemConnection object within its profile.
- */
- public int getHostPosition(IHost conn);
- /**
- * Return the number of SystemConnection objects within the given profile
- */
- public int getHostCount(String profileName);
- /**
- * Return the number of SystemConnection objects within the given connection's owning profile
- */
- public int getHostCountWithinProfile(IHost conn);
- /**
- * Return the number of SystemConnection objects within all active profiles
- */
- public int getHostCount();
- /**
- * Return a vector of previously-used connection names in the given named profile.
- * @return Vector of String objects.
- */
- public Vector getHostAliasNames(String profileName);
- /**
- * Return a vector of previously-used connection names in the given profile.
- * @return Vector of String objects.
- */
- public Vector getHostAliasNames(ISystemProfile profile);
- /**
- * Return a vector of previously-used connection names in all active profiles.
- */
- public Vector getHostAliasNamesForAllActiveProfiles();
-
- /**
- * Return array of all previously specified hostnames.
- */
- public String[] getHostNames();
- /**
- * Return array of previously specified hostnames for a given system type.
- */
- public String[] getHostNames(String systemType);
-
- /**
- * Returns the list of objects on the system clipboard
- * @param srcType the transfer type
- * @return the list of clipboard objects
- */
- public List getSystemClipboardObjects(int srcType);
-
-
- /**
- * Convenience method to create a local connection, as it often that one is needed
- * for access to the local file system.
- * @param profile - the profile to create this connection in. If null is passed, we first
- * try to find the default private profile and use it, else we take the first active profile.
- * @param name - the name to give this profile. Must be unique and non-null.
- * @param userId - the user ID to use as the default for the subsystems. Can be null.
- */
- public IHost createLocalHost(ISystemProfile profile, String name, String userId);
-
- /**
- * Create a host object, sometimes called a "connection",
- * given the containing profile and given all the possible attributes.
- * The profile is then scheduled to be persisted.
- * <p>
- * This method:
- * <ul>
- * <li>creates and saves a new connection within the given profile
- * <li>calls all subsystem factories to give them a chance to create a subsystem instance
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners
- * </ul>
- * <p>
- * @param profileName Name of the system profile the connection is to be added to.
- * @param systemType system type matching one of the system type names defined via the
- * systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @param defaultUserId userId to use as the default for the subsystems.
- * @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
- * that tells us where to store the user Id
- * @param newConnectionWizardPages when called from the New Connection wizard this is union of the list of additional
- * wizard pages supplied by the subsystem factories that pertain to the specified system type. Else null.
- * @return SystemConnection object, or null if it failed to create. This is typically
- * because the connectionName is not unique. Call getLastException() if necessary.
- */
- public IHost createHost(String profileName, String systemType,
- String connectionName, String hostName,
- String description,String defaultUserId, int defaultUserIdLocation,
- ISystemNewConnectionWizardPage[] newConnectionWizardPages)
- throws Exception;
- /**
- * Create a connection object. This is a simplified version
- * <p>
- * THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN
- * THE PROFILE YOU SPECIFY. THE PROFILE IS ALSO SAVED TO DISK.
- * <p>
- * This method:
- * <ul>
- * <li>creates and saves a new connection within the given profile
- * <li>calls all subsystem factories to give them a chance to create a subsystem instance
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners
- * </ul>
- * <p>
- * @param profileName Name of the system profile the connection is to be added to.
- * @param systemType system type matching one of the system type names defined via the
- * systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @return SystemConnection object, or null if it failed to create. This is typically
- * because the connectionName is not unique. Call getLastException() if necessary.
- */
- public IHost createHost(String profileName, String systemType, String connectionName, String hostName, String description)
- throws Exception;
-
- /**
- * Create a connection object. This is a very simplified version that defaults to the user's
- * private profile, or the first active profile if there is no private profile.
- * <p>
- * THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN
- * THE DEFAULT PRIVATE PROFILE, WHICH IS SAVED TO DISK.
- * <p>
- * This method:
- * <ul>
- * <li>creates and saves a new connection within the given profile
- * <li>calls all subsystem factories to give them a chance to create a subsystem instance
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners
- * </ul>
- * <p>
- * @param systemType system type matching one of the system type names defined via the
- * systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @return SystemConnection object, or null if it failed to create. This is typically
- * because the connectionName is not unique. Call getLastException() if necessary.
- */
- public IHost createHost(String systemType, String connectionName, String hostName, String description)
- throws Exception;
-
- /**
- * Update the workoffline mode for a connection.
- *
- * @param conn SystemConnection to change
- * @param offline true if connection should be set offline, false if it should be set online
- */
- public void setHostOffline(IHost conn, boolean offline);
-
- /**
- * Delete an existing connection.
- * <p>
- * Lots to do here:
- * <ul>
- * <li>Delete all subsystem objects for this connection, including their file's on disk.
- * <li>Delete the connection from memory.
- * <li>Delete the connection's folder from disk.
- * </ul>
- * Assumption: firing the delete event is done elsewhere. Specifically, the doDelete method of SystemView.
- */
- public void deleteHost(IHost conn);
- /**
- * Renames an existing connection.
- * <p>
- * Lots to do here:
- * <ul>
- * <li>Reset the conn name for all subsystem objects for this connection
- * <li>Rename the connection in memory.
- * <li>Rename the connection's folder on disk.
- * </ul>
- * Assumption: firing the rename event is done elsewhere. Specifically, the doRename method of SystemView.
- */
- public void renameHost(IHost conn, String newName) throws Exception;
- /**
- * Move existing connections a given number of positions in the same profile.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- * <ul>
- * <li>After the move, the pool containing the moved connection is saved to disk.
- * <li>The connection's name must be unique in pool.
- * <li>Fires a single ISystemResourceChangeEvent event of type EVENT_MOVE, if the pool is the private pool.
- * </ul>
- * @param conns Array of SystemConnections to move.
- * @param delta new zero-based position for the connection
- */
- public void moveHosts(String profileName, IHost conns[], int delta);
- /**
- * Copy a SystemConnection. All subsystems are copied, and all connection data is copied.
- * @param monitor Progress monitor to reflect each step of the operation
- * @param conn The connection to copy
- * @param targetProfile What profile to copy into
- * @param newName Unique name to give copied profile
- * @return new SystemConnection object
- */
- public IHost copyHost(IProgressMonitor monitor, IHost conn,
- ISystemProfile targetProfile, String newName)
- throws Exception;
- /**
- * Move a SystemConnection to another profile. All subsystems are copied, and all connection data is copied.
- * @param monitor Progress monitor to reflect each step of the operation
- * @param conn The connection to move
- * @param targetProfile What profile to move to
- * @param newName Unique name to give moved profile
- * @return new SystemConnection object
- */
- public IHost moveHost(IProgressMonitor monitor, IHost conn,
- ISystemProfile targetProfile, String newName)
- throws Exception;
-
- /**
- * Return true if any subsystem supports connecting.
- * @param conn the connection.
- * @return <code>true</code> if any subsystem supports connecting, <code>false</code> otherwise.
- */
- public boolean isAnySubSystemSupportsConnect(IHost conn);
-
- /**
- * Return true if any of the subsystems for the given connection are currently connected
- */
- public boolean isAnySubSystemConnected(IHost conn);
-
- /**
- * Return true if all of the subsystems for the given connection are currently connected
- */
- public boolean areAllSubSystemsConnected(IHost conn);
-
- /**
- * Disconnect all subsystems for the given connection, if they are currently connected.
- */
- public void disconnectAllSubSystems(IHost conn);
-
- /**
- * Inform the world when the connection status changes for a subsystem within a connection
- */
- public void connectedStatusChange(ISubSystem subsystem, boolean connected, boolean wasConnected);
-
- /**
- * Inform the world when the connection status changes for a subsystem within a connection
- */
- public void connectedStatusChange(ISubSystem subsystem, boolean connected, boolean wasConnected, boolean collapseTree);
-
-
-
-
- // ----------------------------
- // MISCELLANEOUS METHODS...
- // ----------------------------
-
- /**
- * Returns filter references associated with this resource under the subsystem
- */
- public List findFilterReferencesFor(Object resource, ISubSystem subsystem);
-
- /**
- * Marks all filters for this subsystem as stale to prevent caching
- * @param subsystem
- */
- public void invalidateFiltersFor(ISubSystem subsystem);
-
- /**
- * Marks all filters for this subsystem the contain resourceParent as stale to prevent caching
- * @param resourceParent
- * @param subsystem
- */
- public void invalidateFiltersFor(Object resourceParent, ISubSystem subsystem);
-
-
-
- /**
- * Return last exception object caught in any method, or null if no exception.
- * This has the side effect of clearing the last exception.
- */
- public Exception getLastException();
-
- // ----------------------------
- // SAVE / RESTORE METHODS...
- // ----------------------------
-
- /**
- * Save everything!
- */
- public boolean save();
- /**
- * Save specific connection pool
- * @return true if saved ok, false if error encountered. If false, call getLastException().
- */
- public boolean saveHostPool(ISystemHostPool pool);
- /**
- * Save specific connection
- * @return true if saved ok, false if error encountered. If false, call getLastException().
- */
- public boolean saveHost(IHost conn);
- /**
- * Restore all connections within active profiles
- * @return true if restored ok, false if error encountered. If false, call getLastException().
- */
- public boolean restore();
-} //SystemRegistry \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemResourceSet.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemResourceSet.java
deleted file mode 100644
index 430da0f06..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemResourceSet.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.List;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-
-public interface ISystemResourceSet
-{
- public int size();
- public Object get(String absoluteName);
- public String pathFor(Object obj);
- public Object get(int index);
- public List getResourceSet();
- public SystemMessage getMessage();
- public boolean hasMessage();
- public boolean hasByteSize();
- public long byteSize();
- public void setByteSize(long byteSize);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Property.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Property.java
deleted file mode 100644
index bcbd74322..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Property.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-
-public class Property implements IProperty
-{
- protected String _name;
- protected String _label;
- protected String _value;
- protected IPropertyType _type;
- protected boolean _isEnabled;
-
-
- public Property(IProperty property)
- {
- _name = property.getKey();
- _label = property.getLabel();
- _value = property.getValue();
- _type = property.getType();
- _isEnabled = property.isEnabled();
- }
-
- public Property(String name, String value, IPropertyType type, boolean isEnabled)
- {
- _name = name;
- _value = value;
- _type = type;
- _isEnabled = isEnabled;
- }
-
- public void setLabel(String label)
- {
- _label = label;
- }
-
- public String getLabel()
- {
- if (_label == null)
- {
- return _name;
- }
- return _label;
- }
-
- public String getKey()
- {
- return _name;
- }
-
- public String getValue()
- {
- return _value;
- }
-
- public IPropertyType getType()
- {
- return _type;
- }
-
- public boolean isEnabled()
- {
- return _isEnabled;
- }
-
- public void setValue(String value)
- {
- _value = value;
- }
-
- public void setType(IPropertyType type)
- {
- _type = type;
- }
-
- public void setEnabled(boolean flag)
- {
- _isEnabled = flag;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySet.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySet.java
deleted file mode 100644
index 88d144f89..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySet.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Added Javadoc.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * A Hashmap based implementation of the {@link IPropertySet} interface.
- *
- * Not thread-safe since the underlying {@link java.util.HashMap} is
- * not thread-safe.
- */
-public class PropertySet implements IPropertySet
-{
- private String _name;
- private Map _properties;
-
- protected static IPropertyType _defaultType = PropertyType.getStringPropertyType();
-
- /**
- * Construct a new PropertySet based on an existing one (i.e. clone it).
- * @param propertySet existing Property Set to clone
- */
- public PropertySet(IPropertySet propertySet)
- {
- _name = propertySet.getName();
- _properties = new HashMap();
-
- String[] keys = propertySet.getPropertyKeys();
- for (int i =0; i < keys.length; i++)
- {
- String key = keys[i];
- IProperty property = propertySet.getProperty(key);
- addProperty(key, new Property(property));
- }
- }
-
- /**
- * Construct a new empty PropertySet.
- * @param name of the new PropertySet
- */
- public PropertySet(String name)
- {
- _name= name;
- _properties = new HashMap();
- }
-
- public String getName()
- {
- return _name;
- }
-
- public String getDescription()
- {
- //FIXME it would be better to return an empty String ("") in case no description has been set.
- return getPropertyValue(DESCRIPTION_KEY);
- }
-
- public String[] getPropertyKeys()
- {
- Set set = _properties.keySet();
-
- return (String[])set.toArray(new String[set.size()]);
- }
-
- public void setName(String name)
- {
- _name = name;
- }
-
- public void setProperties(Map map)
- {
- //FIXME should clone the map!!
- //Since the extrnal map might not be writable, or it might be
- //modified later on
- _properties = map;
- }
-
- /**
- * Add a typed Property to the set.
- *
- * In case a Property already exists for the given key, it will be overwritten.
- *
- * @param key Key to add
- * @param property The Property to add
- * @return The added Property
- */
- public IProperty addProperty(String key, IProperty property)
- {
- _properties.put(key, property);
- return property;
- }
-
- public IProperty addProperty(String key, String value)
- {
- IProperty property = getProperty(key);
- if (property != null)
- {
- //FIXME should throw a NumberFormatException or similar,
- //if the value does not fit the type of the existing property.
- property.setValue(value);
- return property;
- }
- else
- {
- return addProperty(key, value, _defaultType);
- }
- }
-
- public IProperty addProperty(String key, String value, IPropertyType type)
- {
- IProperty property = new Property(key, value, type, true);
- return addProperty(key, property);
- }
-
- public boolean removeProperty(String key)
- {
- return _properties.remove(key) != null;
- }
-
- public IProperty getProperty(String key)
- {
- return (IProperty)_properties.get(key);
- }
-
- public String getPropertyValue(String key)
- {
- IProperty property = getProperty(key);
- if (property != null)
- {
- return property.getValue();
- }
- return null;
- }
-
- public IPropertyType getPropertyType(String key)
- {
- IProperty property = getProperty(key);
- if (property != null)
- {
- return property.getType();
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySetContainer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySetContainer.java
deleted file mode 100644
index a1326e116..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySetContainer.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-
-public class PropertySetContainer implements IPropertySetContainer
-{
- private Map _propertySets;
-
- public PropertySetContainer()
- {
- _propertySets = new HashMap();
- }
-
- public IPropertySet[] getPropertySets()
- {
- List sets = new ArrayList();
- Iterator iter = _propertySets.values().iterator();
- while (iter.hasNext())
- {
- sets.add(iter.next());
- }
- return (IPropertySet[])sets.toArray(new IPropertySet[sets.size()]);
- }
-
- public IPropertySet getPropertySet(String name)
- {
- return (IPropertySet)_propertySets.get(name);
- }
-
- public IPropertySet createPropertySet(String name, String description)
- {
- IPropertySet newSet = new PropertySet(name);
- newSet.addProperty(IPropertySet.DESCRIPTION_KEY, description);
- _propertySets.put(name, newSet);
- return newSet;
- }
-
- public IPropertySet createPropertySet(String name)
- {
- IPropertySet newSet = new PropertySet(name);
- _propertySets.put(name, newSet);
- return newSet;
- }
-
- public boolean addPropertySet(IPropertySet set)
- {
- _propertySets.put(set.getName(), set);
- return true;
- }
-
- public boolean addPropertySets(IPropertySet[] sets)
- {
- for (int i = 0; i < sets.length; i++)
- {
- addPropertySet(sets[i]);
- }
- return true;
- }
-
- public boolean removePropertySet(String name)
- {
- return _propertySets.remove(name) != null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyType.java
deleted file mode 100644
index e56ce3ec2..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyType.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-
-
-public class PropertyType implements IPropertyType
-{
- private int _type = 0;
- private String[] _enumValues;
-
- private static final String ENUMERATION_STR = "enumeration:"; //$NON-NLS-1$
-
- private static IPropertyType _booleanPropertyType = new PropertyType(TYPE_BOOLEAN);
- private static IPropertyType _integerPropertyType = new PropertyType(TYPE_INTEGER);
- private static IPropertyType _stringPropertyType = new PropertyType(TYPE_STRING);
-
- private PropertyType(int type)
- {
- _type = type;
- }
-
- /**
- * Return an instance of boolean property type.
- * @return IPropertyType
- */
- public static IPropertyType getBooleanPropertyType()
- {
- return _booleanPropertyType;
- }
-
- /**
- * Return an instance of integer property type.
- * @return IPropertyType
- */
- public static IPropertyType getIntegerPropertyType()
- {
- return _integerPropertyType;
- }
-
- /**
- * Return an instance of string property type.
- * @return IPropertyType
- */
- public static IPropertyType getStringPropertyType()
- {
- return _stringPropertyType;
- }
-
- /**
- * Return an instance of enum property type.
- * @param values String[] array of allowed enumerator values.
- * @return IPropertyType
- */
- public static IPropertyType getEnumPropertyType(String[] values)
- {
- PropertyType type = new PropertyType(TYPE_ENUM);
- type.setEnumValues(values);
- return type;
- }
-
- /**
- * Return an instance of property type based on the String specification.
- * This is the reverse of PropertyType.toString().
- * @return IPropertyType instance based on String specification.
- */
- public static IPropertyType fromString(String typeStr)
- {
- if (typeStr.equals(String.class.toString()))
- {
- return getStringPropertyType();
- }
- else if (typeStr.equals(Integer.class.toString()))
- {
- return getIntegerPropertyType();
- }
- else if (typeStr.startsWith(ENUMERATION_STR))
- {
- String subString = typeStr.substring(ENUMERATION_STR.length());
- String[] enumValues = subString.split(","); //$NON-NLS-1$
- return getEnumPropertyType(enumValues);
- }
- else if (typeStr.equals(Boolean.class.toString()))
- {
- return getBooleanPropertyType();
- }
- else
- {
- return getStringPropertyType();
- }
- }
-
- public int getType()
- {
- return _type;
- }
-
- public boolean isString()
- {
- return _type == TYPE_STRING;
- }
-
- public boolean isInteger()
- {
- return _type == TYPE_INTEGER;
- }
-
- public boolean isEnum()
- {
- return _type == TYPE_ENUM;
- }
-
- public boolean isBoolean()
- {
- return _type == TYPE_BOOLEAN;
- }
-
- private void setEnumValues(String[] enumValues)
- {
- _enumValues = enumValues;
- }
-
- public String[] getEnumValues()
- {
- return _enumValues;
- }
-
- public String toString()
- {
- if (isString())
- {
- return String.class.getName();
- }
- else if (isInteger())
- {
- return Integer.class.getName();
- }
- else if (isEnum())
- {
- StringBuffer buf = new StringBuffer();
- buf.append(ENUMERATION_STR);
- String[] enumValues = getEnumValues();
- for (int i = 0; i < enumValues.length; i++)
- {
- buf.append(enumValues[i]);
- if (i + 1 < enumValues.length)
- {
- buf.append(","); //$NON-NLS-1$
- }
- }
- return buf.toString();
- }
- else if (isBoolean())
- {
- return Boolean.class.getName();
- }
- return super.toString();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelObject.java
deleted file mode 100644
index cbeacf029..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelObject.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-
-/**
- * Provides common support for local RSE model objects
- * Extenders inherit property set support
- * @author dmcknigh
- *
- */
-public abstract class RSEModelObject extends PropertySetContainer implements IRSEModelObject
-{
- protected boolean _isDirty = true;
- protected boolean _wasRestored = false;
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.persistance.IRSEPersistableContainer#isDirty()
- */
- public final boolean isDirty()
- {
- return _isDirty;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.persistance.IRSEPersistableContainer#setDirty(boolean)
- */
- public void setDirty(boolean flag)
- {
- _isDirty = flag;
- }
-
-
-
-
- public final boolean wasRestored()
- {
- return _wasRestored;
- }
-
- public final void setWasRestored(boolean flag)
- {
- _wasRestored = flag;
- }
-
- public String getDescription()
- {
- return RSEModelResources.RESID_MODELOBJECTS_MODELOBJECT_DESCRIPTION;
- }
-
- /**
- * Does a null-aware string comparison. Two strings that are
- * <code>null</code> will compare equal. Otherwise the result is
- * the same as s1.equals(s2), if s1 is not null.
- * @param s1 The first string to compare
- * @param s2 the second string
- * @return true if the strings are equal or both null.
- */
- protected boolean compareStrings(String s1, String s2) {
- boolean result = false;
- if (s1 == null) {
- result = (s2 == null);
- } else {
- result = s1.equals(s2);
- }
- return result;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java
deleted file mode 100644
index d4b4c68a6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * David Dykstal (IBM) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-
-/**
- * Provides a transaction boundary for RSE model operations. All operations that
- * modify model objects should be done within an RSEModelOperation. These operations
- * may be nested. Changes made to the model will be persisted when the outermost
- * operation of a particular thread is exited.
- * <p>
- * The usage idiom is to create an anonymous subclass of this class just prior to
- * use, overriding the {@link #execute()} method, and then invoke the {@link #run()} method.
- * <pre>
- * RSEModelOperation m = new RSEModelOperation() {
- * public void execute() {
- * ... do work here ...
- * }
- * };
- * m.run();
- * </pre>
- * <p>
- * under development - provisional
- * @since RSE 2.0
- */
-public abstract class RSEModelOperation {
-
- private static Map threads = new HashMap();
-
- /**
- * Checks the current thread to see if there is a model transaction in progress.
- * Should be used inside model objects prior to a change to a persistent property.
- */
- public static void check() {
- if (getDepth() == 0) {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- logger.logInfo("not inside transaction"); //$NON-NLS-1$
- }
- }
-
- /**
- * @return the depth of the nesting for transactions in the current thread
- */
- private static int getDepth() {
- Thread myThread = Thread.currentThread();
- if (threads.get(myThread) == null) {
- threads.put(myThread, new Integer(0));
- }
- int depth = ((Integer) threads.get(myThread)).intValue();
- return depth;
- }
-
- /**
- * Begins a transaction.
- */
- private static void beginTransaction() {
- }
-
- /**
- * Ends a transaction. Schedules all changed profiles for save.
- */
- private static void endTransaction() {
- ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
- ISystemProfileManager profileManager = registry.getSystemProfileManager();
- IRSEPersistenceManager persistenceManager = RSECorePlugin.getDefault().getPersistenceManager();
- persistenceManager.commit(profileManager);
- }
-
- /**
- * Enters a new nested level of operation.
- */
- private static void enterLevel() {
- int depth = getDepth();
- try {
- if (depth == 0) {
- beginTransaction();
- }
- } finally {
- Thread myThread = Thread.currentThread();
- threads.put(myThread, new Integer(depth + 1));
- }
- }
-
- /**
- * Leaves the current nesting level. If leaving the outermost nesting level then
- * ends the transaction.
- */
- private static void leaveLevel() {
- int depth = getDepth();
- try {
- if (depth == 1) {
- endTransaction();
- }
- } finally {
- Thread myThread = Thread.currentThread();
- threads.put(myThread, new Integer(depth - 1));
- }
- }
-
- /**
- * Create a new operation scoped to the current thread.
- */
- public RSEModelOperation() {
- }
-
- /**
- * Perform the work of this operation. This is where the work of modifying several model
- * properties or objects can be done.
- */
- public abstract void execute();
-
- /**
- * Runs this operation. This will cause the {@link #execute()} method to be invoked inside
- * a transaction boundary.
- */
- public void run() {
- enterLevel();
- try {
- execute();
- } finally {
- leaveLevel();
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelResources.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelResources.java
deleted file mode 100644
index 8aac088ac..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelResources.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This class contains bundle resources for model objects.
- */
-public class RSEModelResources extends NLS {
-
- private static String BUNDLE_NAME = "org.eclipse.rse.core.model.RSEModelResources"; //$NON-NLS-1$
-
- public static String RESID_MODELOBJECTS_MODELOBJECT_DESCRIPTION;
- public static String RESID_MODELOBJECTS_REFERENCINGOBJECT_DESCRIPTION;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, RSEModelResources.class);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelResources.properties b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelResources.properties
deleted file mode 100644
index 964e5473d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelResources.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RESID_MODELOBJECTS_MODELOBJECT_DESCRIPTION=An RSE Model Object represents any object in the Remote System Explorer.
-RESID_MODELOBJECTS_REFERENCINGOBJECT_DESCRIPTION=A Referencing Object encapsulates the operations required of an object which is merely a reference to another object.
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemChildrenContentsType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemChildrenContentsType.java
deleted file mode 100644
index ebcd4ecec..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemChildrenContentsType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.core.model;
-
-
-/**
- * Represents contents that are children of a container
- */
-public class SystemChildrenContentsType implements ISystemContentsType
-{
- public static String CONTENTS_TYPE_CHILDREN = "contents_children"; //$NON-NLS-1$
- public static SystemChildrenContentsType _instance = new SystemChildrenContentsType();
-
- public static SystemChildrenContentsType getInstance()
- {
- return _instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.IRemoteContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_CHILDREN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.IRemoteContentsType#isPersistent()
- */
- public boolean isPersistent()
- {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemFilterStringContentsType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemFilterStringContentsType.java
deleted file mode 100644
index 22c443180..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemFilterStringContentsType.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-
-/**
- * Represents contents that are children of a container
- */
-public class SystemFilterStringContentsType implements ISystemContentsType
-{
- public static String CONTENTS_TYPE_CHILDREN_PARENTS = "contents_children_parents"; //$NON-NLS-1$
- public static SystemFilterStringContentsType _instance = new SystemFilterStringContentsType();
-
- public static SystemFilterStringContentsType getInstance()
- {
- return _instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.IRemoteContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_CHILDREN_PARENTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.IRemoteContentsType#isPersistent()
- */
- public boolean isPersistent()
- {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemMessageObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemMessageObject.java
deleted file mode 100644
index 7fbcabe4d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemMessageObject.java
+++ /dev/null
@@ -1,104 +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.model;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * This class captures a message we wish to display as child node in the tree view.
- */
-public class SystemMessageObject implements ISystemMessageObject, IAdaptable, Comparable
-{
-
- SystemMessage systemMessage;
- protected String message;
- protected int type;
- protected Object parent;
-
- /**
- * Constructor when using SystemMessage
- * @param msgObj The system message from which to retrieve text to show in the tree viewer
- * @param type The message severity, dictating the icon.
- * @param parent The parent node of this within the tree view
- * @see org.eclipse.rse.core.model.ISystemMessageObject
- */
- public SystemMessageObject(SystemMessage msgObj, int type, Object parent)
- {
- this.systemMessage = msgObj;
- this.message = msgObj.getLevelOneText();
- this.type = type;
- this.parent = parent;
- }
-
- /**
- * Get the message to display in the tree viewer
- */
- public String getMessage()
- {
- return message;
- }
-
- /**
- * Message type.
- * @see org.eclipse.rse.core.model.ISystemMessageObject
- */
- public int getType()
- {
- return type;
- }
-
- /**
- * Get the parent object (within tree view)
- */
- public Object getParent()
- {
- return parent;
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
- /**
- * @see ISystemMessageObject#isTransient()
- */
- public boolean isTransient() {
- return true;
- }
-
- /**
- * Return the SystemMessage for this SystemMessageObject.
- */
- public SystemMessage getSystemMessage()
- {
- return systemMessage;
- }
-
- /**
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(Object o) {
- ISystemMessageObject other = (ISystemMessageObject)o;
- return getMessage().compareTo(other.getMessage());
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java
deleted file mode 100644
index f65e534ae..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java
+++ /dev/null
@@ -1,124 +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.model;
-
-
-/**
- * This class encapsulates the signon information required for a remote system. This class
- * must be secure and never disclose the password for the remote system in its unencrypted form.
- * However the encrypted form of the password is not considered secret information and can be
- * accessed by anyone.
- *
- * @author yantzi
- */
-public final class SystemSignonInformation {
-
-
- private String _hostname;
- private String _userid;
- private String _systemType;
- private String _password;
-
- /**
- * Default no-arg constructor
- */
- public SystemSignonInformation()
- {
- }
-
- /**
- * Constructor for SystemSignonInformation.
- */
- public SystemSignonInformation(String hostname, String userid, String systemType) {
- _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase();
- _userid = userid;
- _systemType = systemType;
- }
-
- /**
- * Constructor for SystemSignonInformation.
- */
- public SystemSignonInformation(String hostname, String userid, String password, String systemType) {
- _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase();
- _userid = userid;
- _password = password;
- _systemType = systemType;
- }
-
- /**
- * Returns the hostname of the remote system
- * @return String
- */
- public String getHostname() {
- return _hostname;
- }
-
- /**
- * Returns the systemType of the remote system
- * @return String
- */
- public String getSystemType() {
- return _systemType;
- }
-
- /**
- * Returns the userid for the remote system
- * @return String
- */
- public String getUserid() {
- return _userid;
- }
-
- /**
- * Return the password for the remote system
- */
- public String getPassword() {
- return _password;
- }
-
- /**
- * Sets the password for the remote system
- */
- public void setPassword(String string) {
- _password = string;
- }
-
- /**
- * Sets the hostname.
- * @param hostname The hostname to set
- */
- public void setHostname(String hostname) {
- _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase();
- }
-
- /**
- * Sets the systemType.
- * @param systemType The systemType to set
- */
- public void setSystemType(String systemType) {
- _systemType = systemType;
- }
-
- /**
- * Sets the userid.
- * @param userid The userid to set
- */
- public void setUserid(String userid) {
- _userid = userid;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemWorkspaceResourceSet.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemWorkspaceResourceSet.java
deleted file mode 100644
index d412e3969..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemWorkspaceResourceSet.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-
-
-
-public class SystemWorkspaceResourceSet extends AbstractSystemResourceSet
-{
-
- public SystemWorkspaceResourceSet()
- {
- super();
- }
-
- public SystemWorkspaceResourceSet(List resources)
- {
- super(resources);
- }
-
- public SystemWorkspaceResourceSet(IResource[] resources)
- {
- super(resources);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/persistance/IRSEPersistableContainer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/persistance/IRSEPersistableContainer.java
deleted file mode 100644
index b9df036c5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/persistance/IRSEPersistableContainer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.persistance;
-
-public interface IRSEPersistableContainer
-{
- /**
- * An object is dirty if a change has been made to it that requires
- * it to be persisted.
- * @return true if the object is dirty
- */
- public boolean isDirty();
-
- /**
- * An object is dirty if a change has been made to it that requires
- * it to be persisted. Objects should usually mark themselves dirty
- * when a persistable change is made. However, there may be a need
- * to mark related objects dirty as well.
- * Setting this value to false should be done only in the persistence
- * manager after the object has been written to the DOM.
- * @param flag true if the object must be persisted.
- */
- public void setDirty(boolean flag);
-
- /**
- * Request a persistence manager to persist this object.
- * @return true if the object was persisted.
- */
- public boolean commit();
-
- /**
- * An object was restored if it originated from a persistent form.
- * @return true if the object was created from its persistent form,
- * false if the object has never been persisted.
- */
- public boolean wasRestored();
-
- /**
- * The the "restored" state of the object. Only persistence managers
- * should do this.
- * @param flag true if the object was restored.
- */
- public void setWasRestored(boolean flag);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferenceManager.java
deleted file mode 100644
index f4e5cb039..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferenceManager.java
+++ /dev/null
@@ -1,174 +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.references;
-import org.eclipse.core.resources.IFolder;
-
-
-/**
- * A class for managing a list of shadow objects that reference master objects.
- * <p>
- * Sometimes we have a master list of objects, and we let the user select
- * a subset of that list and we wish to persist that users selections. To
- * accomplish this, in your Rose model, follow these steps:
- * <ol>
- * <li>Include the references package from the SystemReferences .cat file
- * <li>Ensure the class for the master objects subclass SystemPersistableReferencedObject,
- * or implement IRSEPersistableReferencedObject.
- * <b>YOU MUST OVERRIDE getReferenceName() IN SYSTEMPERSISTABLEREFERENCEDOBJECT!</b>
- * <li>Create a class subclassing SystemPersistableReferencingObject to hold a reference
- * to the master object. This will hold a transient pointer, and a persistable
- * name, of the master object. The name must be sufficient to be able to re-create
- * the pointer upon restoration from disk. When you set the pointer via the
- * setReferencedObject method, it will automatically extract the name of that
- * object (by calling its getReferenceName method) and store it in the mof-modelled
- * attribute of the SystemPersistableReferencingObject class.
- * <li>Create a class subclassing this class (SystemPersistableReferenceManager)
- * to manage the list of referencing objects. Each time you instantiate a reference
- * object, add it to the referencingObjects list managed by this class.
- * <b>YOU MUST OVERRIDE resolveReferencesAfterRestore() IN SYSTEMPERSISTABLEREFERENCEMANAGERIMPL!</b>
- * </ol>
- * <p>
- * Once you have an instantiated and populated instance of this class, you can either
- * choose to save it to disk in its own file (save/restore methods are supplied for this)
- * or you can simply choose to store it as part of your own class via your own save
- * and restore methods. If using MOF, and the containment of the manager class is modelled in
- * your own containing class, this will happen automatically when you use mof to save
- * your containing class instance.
- */
-/**
- * @lastgen interface SystemPersistableReferenceManager {}
- */
-
-public interface IRSEBasePersistableReferenceManager
-{
-
- /**
- * Return an array of the referencing objects currently being managed.
- * @return array of the referencing objects currently in this list.
- */
- public IRSEBasePersistableReferencingObject[] getReferencingObjects();
- /**
- * Set in one shot the list of referencing objects. Replaces current list.
- * @param objects An array of referencing objects which is to become the new list.
- * @param deReference true to first de-reference all objects in the existing list.
- */
- public void setReferencingObjects(IRSEBasePersistableReferencingObject[] objects, boolean deReference);
- /**
- * Add a referencing object to the managed list.
- * @return new count of referenced objects being managed.
- */
- public int addReferencingObject(IRSEBasePersistableReferencingObject object);
- /**
- * Remove a referencing object from the managed list.
- * <p>Does NOT call removeReference on the master referenced object.
- * @return new count of referenced objects being managed.
- */
- public int removeReferencingObject(IRSEBasePersistableReferencingObject object);
- /**
- * Remove and dereferences a referencing object from the managed list.
- * <p>DOES call removeReference on the master referenced object.
- * @return new count of referenced objects being managed.
- */
- public int removeAndDeReferenceReferencingObject(IRSEBasePersistableReferencingObject object);
- /**
- * Remove all objects from the list.
- * <p>Does NOT call removeReference on the master referenced objects.
- */
- public void removeAllReferencingObjects();
- /**
- * Remove and dereference all objects from the list.
- * <p>DOES call removeReference on the master referenced objects.
- */
- public void removeAndDeReferenceAllReferencingObjects();
- /**
- * Return how many referencing objects are currently in the list.
- * @return current count of referenced objects being managed.
- */
- public int getReferencingObjectCount();
- /**
- * Return the zero-based position of the given referencing object within the list.
- * Does a memory address comparison (==) to find the object.
- * @param object The referencing object to find position of.
- * @return zero-based position within the list. If not found, returns -1
- */
- public int getReferencingObjectPosition(IRSEBasePersistableReferencingObject object);
- /**
- * Move the given referencing object to a new zero-based position in the list.
- * @param newPosition New zero-based position
- * @param object The referencing object to move
- */
- public void moveReferencingObjectPosition(int newPosition, IRSEBasePersistableReferencingObject object);
- /**
- * Return true if the given referencable object is indeed referenced by a referencing object
- * in the current list. This is done by comparing the reference names of each, not the
- * in-memory pointers.
- * @param object The referencable object to which to search for a referencing object within this list
- * @return true if found in list, false otherwise.
- */
- public boolean isReferenced(IRSEBasePersistableReferencedObject object);
- /**
- * Search list of referencing objects to see if one of them references the given referencable object.
- * This is done by comparing the reference names of each, not the in-memory pointers.
- * @param object The referencable object to which to search for a referencing object within this list
- * @return the referencing object within this list which references the given referencable object, or
- * null if no reference found.
- */
- public IRSEBasePersistableReferencingObject getReferencedObject(IRSEBasePersistableReferencedObject object);
-
- /**
- * Attempt to save contents of manager to disk. Only call if not doing your own save from
- * your own model that uses a subclass of this.
- * @param folder The folder in which to save the manager.
- * @param fileName The unqualified file name to save to. Should include extension, such as .xmi
- */
- public void save(IFolder folder, String fileName)
- throws Exception;
-
- /**
- * After restoring this from disk, there is only the referenced object name,
- * not the referenced object pointer, for each referencing object.
- * <p>
- * This method is called after restore and for each restored object in the list must:
- * <ol>
- * <li>Do what is necessary to find the referenced object, and set the internal reference pointer.
- * <li>Call addReference(this) on that object so it can maintain it's in-memory list
- * of all referencing objects.
- * </ol>
- * @return true if resolved successfully. False if some references were not found and
- * hence those referencing objects removed from the restored list.
- */
- public boolean resolveReferencesAfterRestore();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Name attribute
- */
- String getName();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Name attribute
- */
- void setName(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The list of ReferencingObjectList references
- */
- java.util.List getReferencingObjectList();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencedObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencedObject.java
deleted file mode 100644
index 8c5c225cd..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencedObject.java
+++ /dev/null
@@ -1,47 +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.references;
-
-/**
- * Referenced objects are objects that have shadow objects (referencing objects) of them.
- * Typically, references are created to enable a UI which does not allow the same
- * real object to appear multiple times. In these cases, a unique reference object
- * is created for each unique instance of the real object.
- * <p>
- * The parent interface IRSEReferencedObject captures the simple set of methods
- * an object that supports such a real object implement.
- * <p>
- * This interface specializes that for the case of real objects that support references
- * that must be persisted.
- * Typically, we build the references in memory at runtime to satisfy the UI.
- * However, occassionally we build the list of references for a more permanent reason,
- * such as when we let a user choose a subset from a master list.
- * <p>
- * When we persist such a reference, we can't persist the memory reference to the master
- * object. Instead, we persist the unique name of that object, and upon restoring
- * from disk we then resolve that into a runtime reference to a real memory object.
- * <p>
- * This interface supplies the method to allow a referencing object to
- * query that unique name or key from this real object.
- */
-public interface IRSEBasePersistableReferencedObject extends IRSEBaseReferencedObject {
-
- /**
- * @return the unique name or key of this master object to record in the referencing object.
- */
- public String getReferenceName();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencingObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencingObject.java
deleted file mode 100644
index 56d61a9bd..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencingObject.java
+++ /dev/null
@@ -1,53 +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.references;
-
-
-/**
- * Referencing objects are shadows of real objects. Typically, shadows are created
- * to enable a GUI which does not allow the same real object to appear multiple times.
- * In these cases, a unique shadow object is created for each unique instance of the
- * real object.
- * <p>
- * The parent interface ISystemReferencingObject captures the simple set of methods
- * such a shadow must implement.
- * <p>
- * This interface specializes that for the case of references that must be persisted.
- * Typically, we build the references in memory at runtime just to satisfy the GUI.
- * However, occassionally we build the list of references for a more permanent reason,
- * such as when we let a user choose a subset from a master list.
- * <p>
- * When we persist such a reference, we can't persist the memory reference to the master
- * object. Instead, we persist the unique name or key of that object, and upon restoring
- * from disk we then resolve that into a runtime reference to a real memory object.
- * <p>
- * This interface captures the methods to set and query that name or key.
- */
-public interface IRSEBasePersistableReferencingObject
- extends IRSEBaseReferencingObject
-{
- /**
- * Set the object to which we reference. This is an overload of the parent
- * interface method of the same name. This one takes an object of which we
- * can query its unique name for the purpose of saving that to disk.
- */
- public void setReferencedObject(IRSEBasePersistableReferencedObject obj);
- /**
- * Query the unique name or key of the object we are referencing.
- */
- public String getReferencedObjectName();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencedObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencedObject.java
deleted file mode 100644
index cee97fc87..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencedObject.java
+++ /dev/null
@@ -1,51 +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.references;
-
-/**
- * Interface that any master object that is referenced must implement.
- */
-public interface IRSEBaseReferencedObject {
- /**
- * Add a reference, increment reference count, return new count
- * @param ref the referencing object from which this object will now be referenced.
- * @return new count of how many referencing objects reference this object.
- */
- public int addReference(IRSEBaseReferencingObject ref);
-
- /**
- * Remove a reference, decrement reference count, return new count
- * @param ref the referencing object from which this object is no longer referenced.
- * @return new count of how many referencing objects reference this object.
- */
- public int removeReference(IRSEBaseReferencingObject ref);
-
- /**
- * @return a count of how many referencing objects reference this object.
- */
- public int getReferenceCount();
-
- /**
- * Clear the list of referenced objects.
- */
- public void removeAllReferences();
-
- /**
- * @return a list of all referencing objects of this object
- */
- public IRSEBaseReferencingObject[] getReferencingObjects();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencingObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencingObject.java
deleted file mode 100644
index 563b08fe0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencingObject.java
+++ /dev/null
@@ -1,55 +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.references;
-
-/**
- * Referencing objects are shadows of real objects. Typically, shadows are created
- * to enable a GUI which does not allow the same real object to appear multiple times.
- * In these cases, a unique shadow object is created for each unique instance of the
- * real object.
- * <p>
- * This interface captures the simple set of methods such a shadow must implement.
- */
-public interface IRSEBaseReferencingObject {
- /**
- * Set the object to which we reference
- * @param obj the object to reference
- */
- public void setReferencedObject(IRSEBaseReferencedObject obj);
-
- /**
- * @return the object which we reference
- */
- public IRSEBaseReferencedObject getReferencedObject();
-
- /**
- * Fastpath to getReferencedObject().removeReference(this).
- * @return new reference count of master object
- */
- public int removeReference();
-
- /**
- * @param broken true if this reference is currently broken/unresolved
- */
- public void setReferenceBroken(boolean broken);
-
- /**
- * @return true if this reference is currently broken/unresolved
- */
- public boolean isReferenceBroken();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencedObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencedObject.java
deleted file mode 100644
index 39d1e0d65..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencedObject.java
+++ /dev/null
@@ -1,26 +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.references;
-
-/**
- * This is an object that can have shadow (reference) objects, which simply
- * point to this object, and a copy of this object's unique name or key (for storing on disk).
- */
-
-public interface IRSEPersistableReferencedObject extends IRSEReferencedObject, IRSEBasePersistableReferencedObject {
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencingObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencingObject.java
deleted file mode 100644
index 03eee5c8c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencingObject.java
+++ /dev/null
@@ -1,68 +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.references;
-
-
-/**
- * A simple class that implements IRSEPersistableReferencingObject.
- * This is an object that is a shadow (reference) of a real master object
- * (IRSEPersistableReferencedObject).
- * <p>
- * Objects of this class contain a pointer (in memory) to the master object,
- * and a copy of this object's unique name or key (for storing on disk).
- * <p>
- * Only the name is saved to disk, and after restoring from disk, that name
- * is used to set the actual object reference.
- * <p>
- * The intention is that in your Rose model, your class extends this class.
- * Do this for any shadow/reference class which you want to persist. Use
- * a subclass of SystemPersistableReferenceManager to manage a list of these,
- * and manage the saving/restoring of that list.
- * <p>
- * <b>YOU MUST OVERRIDE resolveReferencesAfterRestore IN YOUR REFERENCE MANAGER SUBCLASS</b>
- */
-/**
- * @lastgen interface SystemPersistableReferencingObject extends SystemReferencingObject {}
- */
-
-public interface IRSEPersistableReferencingObject extends IRSEReferencingObject, IRSEBasePersistableReferencingObject{
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the ReferencedObjectName attribute
- */
- String getReferencedObjectName();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the ReferencedObjectName attribute
- */
- void setReferencedObjectName(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The ParentReferenceManager reference
- */
- IRSEBasePersistableReferenceManager getParentReferenceManager();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param l The new value of the ParentReferenceManager reference
- */
- void setParentReferenceManager(IRSEBasePersistableReferenceManager value);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencedObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencedObject.java
deleted file mode 100644
index 5f1f1c098..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencedObject.java
+++ /dev/null
@@ -1,32 +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.references;
-
-/**
- * An interface to encapsulate the operations required of an object which
- * supports references to it by other objects (IRSEReferencingObject).
- * This type of class needs to support maintaining an in-memory list of
- * all who reference it so that list can be following on delete and
- * rename operations.
- * <p>
- * These references are not persistent. Persistent references are managed
- * by the subtype IRSEPersistableReferencedObject.
- */
-
-public interface IRSEReferencedObject extends IRSEBaseReferencedObject {
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencingObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencingObject.java
deleted file mode 100644
index 92cb0a90c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencingObject.java
+++ /dev/null
@@ -1,37 +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.references;
-
-
-/**
- * A class to encapsulate the operations required of an object which
- * is merely a reference to another object, something we call a shadow.
- * Such shadows are needed to support a GUI which displays the same
- * object in multiple places. To enable that, it is necessary not to
- * use the same physical object in each UI representation as the UI
- * will only know how to update/refresh the first one it finds.
- * <p>
- * These references are not persistent. Persistent references are managed
- * by the subclass SystemPersistableReferencingObject.
- */
-/**
- * @lastgen interface SystemReferencingObject {}
- */
-
-public interface IRSEReferencingObject extends IRSEBaseReferencingObject{
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/CommunicationsEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/CommunicationsEvent.java
deleted file mode 100644
index 398bc14c4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/CommunicationsEvent.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-
-public class CommunicationsEvent {
-
-
- // Communications event types
- public static final int BEFORE_CONNECT = 1;
- public static final int AFTER_CONNECT = 2;
- public static final int BEFORE_DISCONNECT = 3;
- public static final int AFTER_DISCONNECT = 4;
- public static final int CONNECTION_ERROR = 5;
-
- private IConnectorService system;
- private int state;
-
- public CommunicationsEvent(IConnectorService system, int state) {
- this.system = system;
- this.state = state;
- }
-
- public int getState() {
- return state;
- }
-
- public IConnectorService getSystem() {
- return system;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICacheManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICacheManager.java
deleted file mode 100644
index d46f66565..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICacheManager.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-/**
- * Interface for a cache manager that can optionally associated with a SubSystem.
- */
-public interface ICacheManager {
-
-
- /**
- * This flag is set if the Remote System Explorer is restoring a remote object
- * from a memento. This gives the subsystem the option to restore from the cache
- * instead of connecting to the remote system.
- *
- * @param restore true if the RSE is currently restoring a remote object associated
- * with this cache manager from a memento, otherwise false.
- */
- public void setRestoreFromMemento(boolean restore);
-
- /**
- * Check if the Remote System Explorer is restoring a remote object
- * from a memento.
- *
- * @return true if the RSE is currently restoring a remote object associated
- * with this cache manager from a memento, otherwise false.
- */
- public boolean isRestoreFromMemento();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICommunicationsListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICommunicationsListener.java
deleted file mode 100644
index b7659c912..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICommunicationsListener.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-
-/**
- * ICommunicationsListener - listen to communication events
- * @see CommunicationsEvent
- */
-public interface ICommunicationsListener {
-
-
- /**
- * This method is invoked whenever the communications state is invoked
- * immediately before and after the state of the communications changes.
- * The state field in CommunicationsEvent determines which state
- * change is about to or has occured.
- */
- public void communicationsStateChange(CommunicationsEvent e);
-
- /**
- * This method determines if the communications listener is a passive or
- * active listener. Typically a passive listener registers with the communications
- * system and responds to events as they occur. An active listener typically
- * registeres with the communications system only for the duration of the task (i.e.
- * user editing a file, or outstanding communications request.)
- *
- * The user will be prompted on a disconnect if there are any active communication
- * listeners registered.
- *
- * @return false if the communications listener is an active listener, true if the
- * communications listener is a passive listener.
- */
- public boolean isPassiveCommunicationsListener();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java
deleted file mode 100644
index 928d686d4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IRSEModelObject;
-
-
-/**
- * This is the interface implemented by ConnectorService (formerly System) objects.
- * <p>
- * A connector service manages a live connection to a remote system, with
- * operations for connecting and disconnecting, and storing information
- * typically cached from a subsystem: user ID, password, port, etc.
- * <p>
- * The SubSystem interface includes a method, getConnectorService(), which returns an
- * instance of an object that implements this interface for that subsystem.
- * <p>
- * A single connector service object can be unique to a subsystem instance, but
- * it can also be shared across multiple subsystems in a single host if those
- * subsystems share a physical connection to the remote system. This sharing is done via
- * subclasses of {@link org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager}
- * which are returned by another getter method in SubSystem.
- */
-public interface IConnectorService extends IRSEModelObject
-{
-
- /**
- * Return the subsystem object this system is associated with
- */
- public ISubSystem getPrimarySubSystem();
-
- /**
- * Return all the subsystems that use this service
- * @return the subsystems that use this service
- */
- public ISubSystem[] getSubSystems();
-
- /**
- * Set the subsystem, when its not known at constructor time
- */
- public void registerSubSystem(ISubSystem ss);
-
- /**
- * Deregister the subsystem
- * @param ss
- */
- public void deregisterSubSystem(ISubSystem ss);
-
- /**
- * Return true if currently connected.
- */
- public boolean isConnected();
- /**
- * Attempt to connect to the remote system.
- */
- public void connect(IProgressMonitor monitor) throws Exception;
- /**
- * Disconnect from the remote system
- */
- public void disconnect(IProgressMonitor monitor) throws Exception;
- /**
- * Notifies all listeners of a disconnection through a communications event
- */
- public void notifyDisconnection();
- /**
- * Notifies all listeners of a connection through a communications event
- */
- public void notifyConnection();
- /**
- * Notifies all listeners of an error through a communications event
- */
- public void notifyError();
- /**
- * Reset after some fundamental change, such as a hostname change.
- * Clear any memory of the current connection.
- */
- public void reset();
- /**
- * Return the version, release, modification of the remote system,
- * if connected, if applicable and if available. Else return null.
- * <p>
- * Up to each implementer to decide if this will be cached.
- */
- public String getVersionReleaseModification();
- /**
- * Return the home directory of the remote system for the current user, if available.
- * <p>
- * Up to each implementer to decide how to implement, and if this will be cached.
- */
- public String getHomeDirectory();
- /**
- * Return the temp directory of the remote system for the current user, if available.
- * <p>
- * Up to each implementer to decide how to implement, and if this will be cached.
- */
- public String getTempDirectory();
-
- // --------------------------------------------------------------------
- // Utility methods that offer combined connection and subsystem info...
- // --------------------------------------------------------------------
- /**
- * Return the system type for this connection.
- */
- public String getHostType();
-
- /**
- * Return the name of this connector service
- * @return the name of this connector service
- */
- public String getName();
-
- public void setHost(IHost host);
-
- /**
- * Return the host
- * @return the host
- */
- public IHost getHost();
-
- /**
- * Return the host name for the connection this system's subsystem is associated with
- */
- public String getHostName();
-
- /**
- * Return the port for this connector
- */
- public int getPort();
-
- /**
- * Set the port for this connector
- * @param port
- */
- public void setPort(int port);
-
- /**
- * Return the userId for this system's subsystem we are associated with
- */
- public String getUserId();
-
- /**
- * Set the user id for this connector
- * @param userId
- */
- public void setUserId(String userId);
-
-
- public boolean isUsingSSL();
-
- public void setIsUsingSSL(boolean flag);
-
- /**
- * Return the password for this system's subsystem we are associated with.
- * <p>
- * If not currently set in transient memory, prompts the user for a password.
- * <p>
- * Throws InterruptedException if user is prompted and user cancels that prompt.
- * @param forcePrompt forces the prompt dialog to be displayed even if the password is currently
- * in memory.
- */
- public void promptForPassword(boolean forcePrompt)
- throws InterruptedException;
- /**
- * Set the password if you got it from somewhere
- */
- public void setPassword(String matchingUserId, String password);
-
- /**
- * Set the password if you got it from somewhere
- */
- public void setPassword(String matchingUserId, String password, boolean persist);
-
- /**
- * Clear internal userId cache. Called when user uses the property dialog to
- * change his userId.
- */
- public void clearUserIdCache();
- /**
- * Clear internal password cache. Called when user uses the property dialog to
- * change his userId.
- */
- public void clearPasswordCache();
-
- /**
- * Clear internal password cache. Called when user uses the property dialog to
- * change his userId.
- * @param clearDiskCache if true, clears the password from disk
- */
- public void clearPasswordCache(boolean clearDiskCache);
- /**
- * Return true if password is currently cached.
- */
- public boolean isPasswordCached();
-
-
- /**
- * Return true if password is currently cached.
- */
- public boolean isPasswordCached(boolean onDisk);
-
- /**
- * Return true if this system can inherit the uid and password of
- * other ISystems in this connection
- *
- * @return true if it can inherit the user/password
- */
- public boolean inheritConnectionUserPassword();
-
- /*
- * Return true if this system can share it's uid and password
- * with other ISystems in this connection
- *
- * @return true if it can share the user/password
- */
- public boolean shareUserPasswordWithConnection();
-
- /**
- * Register a communications listener
- */
- public void addCommunicationsListener(ICommunicationsListener listener);
- /**
- * Remove a communications listener
- */
- public void removeCommunicationsListener(ICommunicationsListener listener);
- /**
- * Returns the suppressSignonPrompt flag. If this is set to true then the user
- * will not be prompted to signon, instead an InterruptedException will be thrown
- * by the promptForPassword method.
- *
- * @return boolean
- */
- public boolean isSuppressSignonPrompt();
- /**
- * Sets the suppressSignonPrompt flag. Tool writers can use this to temporarily
- * disable the user from being prompted to signon. This would cause the promptForPassword
- * method to throw an InterruptedException instead of prompting. The intent of this
- * method is to allow tool writeres to prevent multiple signon prompts during a
- * set period of time (such as a series of related communication calls) if the user
- * cancels the first prompt. <b>It is the callers responsability to set this value
- * back to false when the tool no longer needs to suppress the signon prompt or all
- * other tools sharing this connection will be affected.</b>
- *
- * @param suppressSignonPrompt
- */
- public void setSuppressSignonPrompt(boolean suppressSignonPrompt);
-
- /**
- * Returns the value of the '<em><b>Remote Server Launcher</b></em>' containment reference.
- * It is bidirectional and its opposite is '{@link org.eclipse.rse.core.subsystems.IServerLauncherProperties#getConnectorService()}'.
- * <!-- begin-user-doc -->
- * <p>
- * Get the remote server launcher, which may be null. This an optional object containing
- * properties used to launch the remote server that communicates with this subsystem.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Remote Server Launcher</em>' containment reference.
- * @see #setRemoteServerLauncherProperties(IServerLauncherProperties)
- * @see org.eclipse.rse.core.subsystems.IServerLauncherProperties#getConnectorService()
- * @model opposite="parentSubSystem" containment="true"
- * @generated
- */
- IServerLauncherProperties getRemoteServerLauncherProperties();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.subsystems.IConnectorService#getRemoteServerLauncherProperties()}' containment reference.
- * <!-- begin-user-doc -->
- * Set the remote server launcher, which is an optional object containing
- * properties used to launch the remote server that communicates with this subsystem.
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Remote Server Launcher</em>' containment reference.
- * @see #getRemoteServerLauncherProperties()
- * @generated
- */
- void setRemoteServerLauncherProperties(IServerLauncherProperties value);
-
- boolean hasRemoteServerLauncherProperties();
-
- boolean supportsRemoteServerLaunching();
-
- /**
- * Tell us if this subsystem factory supports server launch properties, which allow the user
- * to configure how the server-side code for these subsystems are started. There is a Server
- * Launch Setting property page, with a pluggable composite, where users can configure these
- * properties.
- */
- public boolean supportsServerLaunchProperties();
-
- /**
- * Report if this connector service can use a user identifier.
- * Returns true in default implementation.
- * Typically used to indicate if a login dialog needs to be presented when connecting.
- * @return true if and only if the connector service can use a user id.
- */
- public boolean supportsUserId();
-
- /**
- * Report if this connector service requires a user id.
- * Returns true in default implementation.
- * Typically used to indicate if a login dialog can allow an empty user id.
- * Must be ignored if supportsUserId() is false.
- * @return true or false to indicate if the connector service requires a user id.
- */
- public boolean requiresUserId();
-
- /**
- * Can be used to determine if a password field is present on a login dialog for this connector service.
- * The default implementation of this interface should return true.
- * @return true if the subsystem can use a password, false if a password is irrelevant.
- */
- public boolean supportsPassword();
-
- /**
- * If a password is supported this is used to determine if the password is required.
- * Must be ignored if supportsPassword() returns false.
- * The default implementation of this interface should return true.
- * @return true if the connector service requires a password, false if a password may be empty.
- */
- public boolean requiresPassword();
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java
deleted file mode 100644
index 8485f57fe..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.rse.core.model.IHost;
-
-
-
-public interface IConnectorServiceManager
-{
- IConnectorService getConnectorService(IHost host, Class commonSSinterface);
- void setConnectorService(IHost host, Class commonSSinterface, IConnectorService connectorService);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java
deleted file mode 100644
index d7d62aa93..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-/**
- * Constants used in the remote file system support
- */
-public interface IFileConstants
-{
-
- // ---------------------------------------
- // UNIX FILE SYSTEM ATTRIBUTE CONSTANTS...
- // ---------------------------------------
- /**
- * Unix-style folder-name separator as a string: "/"
- */
- public static String SEPARATOR_UNIX = "/"; //$NON-NLS-1$
- /**
- * Unix-style folder-name separator as a char: '/'
- */
- public static char SEPARATOR_CHAR_UNIX = '/';
- /**
- * Unix-style path separator as a string: ":"
- */
- public static String PATH_SEPARATOR_UNIX = ":"; //$NON-NLS-1$
- /**
- * Unix-style path separator as a char: ':'
- */
- public static char PATH_SEPARATOR_CHAR_UNIX = ':';
- /**
- * Unix-style line separator as a byte array: 10
- */
- public static final byte[] LINE_SEPARATOR_BYTE_ARRAY_UNIX = {10};
-
-
- // ------------------------------------------
- // WINDOWS FILE SYSTEM ATTRIBUTE CONSTANTS...
- // ------------------------------------------
- /**
- * Windows-style folder-name separator as a string: "\"
- */
- public static String SEPARATOR_WINDOWS = "\\"; //$NON-NLS-1$
- /**
- * Windows-style folder-name separator as a char: '\'
- */
- public static char SEPARATOR_CHAR_WINDOWS = '\\';
- /**
- * Windows-style path separator as a string: ";"
- */
- public static String PATH_SEPARATOR_WINDOWS = ";"; //$NON-NLS-1$
- /**
- * Windows-style path separator as a char: ';'
- */
- public static char PATH_SEPARATOR_CHAR_WINDOWS = ';';
- /**
- * Windows-style line separator as a byte array: 13 and 10 respectively
- */
- public static final byte[] LINE_SEPARATOR_BYTE_ARRAY_WINDOWS = {13, 10};
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteContainer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteContainer.java
deleted file mode 100644
index 530ae4c11..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteContainer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemContentsType;
-
-/**
- * @author dmcknigh
- */
-public interface IRemoteContainer extends ISystemContainer
-{
-
- /**
- * Returns whether the object has contents of a particular type associated with the specified filter string.
- * @param contentsType type of contents
- * @param filter criteria for contained contents
- * @return <code>true</code> if the object has contents, <code>false</code> otherwise.
- */
- public boolean hasContents(ISystemContentsType contentsType, String filter);
-
- /**
- * Returns the contents of the object.
- * @param contentsType type of contents
- * @param filter criteria for contained contents.
- * @return an array of contents.
- */
- public Object[] getContents(ISystemContentsType contentsType, String filter);
-
- /*
- * Replace occurrences of cached object with new object
- */
- public void replaceContent(Object oldObject, Object newObject);
-
- /**
- * Sets the contents of this object that match a particular filter
- * @param contentsType type of contents
- * @param filter matching criteria for the contained objects
- * @param con the contained objects that match the filter
- */
- public void setContents(ISystemContentsType contentsType, String filter, Object[] con);
-
- /**
- * Copies the persistable contents from this one to another one
- * @param container the container to copy contents to
- */
- public void copyContentsTo(IRemoteContainer container);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteLineReference.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteLineReference.java
deleted file mode 100644
index c24ce5e2f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteLineReference.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-/**
- * This interface represents an object that can be used to jump into line in source
- */
-public interface IRemoteLineReference
-{
-
-
- /**
- * Gets the path to the file that this output references if it references any. It may return null if
- * no such association exists. This may be used to jump to an editor from a view which displays
- * this
- *
- * @return the path of the referenced file if there is one
- */
- public String getAbsolutePath();
-
- /**
- * Gets the line number within a file that this references if it references any. By default
- * it should return 0. If no file association exists, it also returns 0. This may be used to jump into
- * a location within an editor from a view which displays remote output.
- *
- * @return the line number within a referenced file if there is one.
- */
- public int getLine();
-
- /**
- * Get the start offset in a line corresponding to this reference. -1 indicates there is no offset
- * @return the offset
- */
- public int getCharStart();
-
- /**
- * Get the end offset in a line corresponding to this reference. -1 indicates there is no offset
- * @return the offset
- */
- public int getCharEnd();
-
- /**
- * Get the object that contains this object.
- *
- * @return the parent object
- */
- public Object getParent();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectIdentifier.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectIdentifier.java
deleted file mode 100644
index 2ef6338fc..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectIdentifier.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-public interface IRemoteObjectIdentifier
-{
-
-
- /**
- * For drag and drop, and clipboard, support of remote objects.
- * <p>
- * Return the unique ID for the given remote object within the subsystem.
- */
- public String getAbsoluteName(Object object);
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java
deleted file mode 100644
index 17595edbd..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-/**
- * Interface for resolving an object in a subsystem from a unique ID
- */
-public interface IRemoteObjectResolver
-{
-
-
- /**
- * For drag and drop, clipboard, and other object retrieval mechanisms in support of remote objects.
- * <p>
- * Return the remote object within the subsystem that corresponds to
- * the specified unique ID.
- */
- public Object getObjectWithAbsoluteName(String key) throws Exception;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemotePropertyHolder.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemotePropertyHolder.java
deleted file mode 100644
index 281c72fa0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemotePropertyHolder.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-/**
- * This interface should be implemented by any remote artifact
- * that contains remote properties and (optionally) caches them.
- */
-public interface IRemotePropertyHolder {
-
- /**
- * Returns the value of the property with the given key.
- * @param key the property key.
- * @return the value of the property.
- */
- public Object getProperty(String key);
-
- /**
- * Returns the value of the properties with the given keys.
- * @param keys the property keys.
- * @return the correspoding values of the properties.
- */
- public Object[] getProperties(String[] keys);
-
- /**
- * Sets the value of the property with the given key.
- * @param key the property key.
- * @param value the value of the property.
- */
- public void setProperty(String key, Object value);
-
- /**
- * Sets the values of the properties with the given keys.
- * @param keys the property keys.
- * @param values the corresponding values of the properties.
- */
- public void setProperties(String[] keys, Object[] values);
-
- /**
- * Returns whether the property with the given key is stale.
- * @param key the property key.
- * @return <code>true</code> if the property is stale, <code>false</code> otherwise.
- */
- public boolean isPropertyStale(String key);
-
- /**
- * Marks the property with the given key as stale.
- * @param key the property key.
- */
- public void markPropertyStale(String key);
-
- /**
- * Marks all properties as stale.
- */
- public void markAllPropertiesStale();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteServerLauncher.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteServerLauncher.java
deleted file mode 100644
index d02335d4d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteServerLauncher.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-/**
- * This is the implementation of {@link IServerLauncherProperties}. It basically allows for numerous types
- * of server connecting, as identified in {@link org.eclipse.rse.core.subsystems.ServerLaunchType}. It
- * also captures the attributes needed to support these.
- * <p>
- * A server launcher is responsible for starting the server-side code needed for this client subsystem to
- * access remote resources on the remote system. It starts the server half of the client/server code needed
- * for this subsystem. It is consulted in the default implementation of connect() in IConnectorService, and the
- * manages the properties in the Remote Server Launcher property page.
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.rse.core.subsystems.IRemoteServerLauncher#getServerLaunchType <em>Server Launch Type</em>}</li>
- * <li>{@link org.eclipse.rse.core.subsystems.IRemoteServerLauncher#getRexecPort <em>Rexec Port</em>}</li>
- * <li>{@link org.eclipse.rse.core.subsystems.IRemoteServerLauncher#getDaemonPort <em>Daemon Port</em>}</li>
- * <li>{@link org.eclipse.rse.core.subsystems.IRemoteServerLauncher#getServerPath <em>Server Path</em>}</li>
- * <li>{@link org.eclipse.rse.core.subsystems.IRemoteServerLauncher#getServerScript <em>Server Script</em>}</li>
- * </ul>
- */
-public interface IRemoteServerLauncher extends IServerLauncherProperties{
-
- /**
- * Returns the value of the '<em><b>Server Launch Type</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.rse.core.subsystems.ServerLaunchType}.
- * <!-- begin-user-doc -->
- * <p>
- * This is the means by which to start the server-side code, as specified by the user, typically.
- * It is one of the constants in the enumeration class {@link org.eclipse.rse.core.subsystems.ServerLaunchType}
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Server Launch Type</em>' attribute.
- * @see org.eclipse.rse.core.subsystems.ServerLaunchType
- * @see #setServerLaunchType(ServerLaunchType)
- * @model unsettable="true"
- * @generated
- */
- ServerLaunchType getServerLaunchType();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.subsystems.IRemoteServerLauncher#getServerLaunchType <em>Server Launch Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * This is the means by which to start the server-side code, as specified by the user, typically.
- * It is one of the constants in the enumeration class {@link org.eclipse.rse.core.subsystems.ServerLaunchType}
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Server Launch Type</em>' attribute.
- * @see org.eclipse.rse.core.subsystems.ServerLaunchType
- * @see #getServerLaunchType()
- * @generated
- */
- void setServerLaunchType(ServerLaunchType value);
-
- /**
- * Returns the value of the '<em><b>Rexec Port</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Rexec Port</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Rexec Port</em>' attribute.
- * @see #setRexecPort(int)
- * @model
- * @generated
- */
- int getRexecPort();
-
- /**
- * Set the REXEC port value, as an int
- */
- public void setRexecPort(int newRexecPort);
-
- /**
- * Sets whether or not to auto-detect SSL
- */
- public void setAutoDetectSSL(boolean auto);
-
- boolean getAutoDetectSSL();
-
- int getDaemonPort();
-
- /**
- * Set the DAEMON port value, as an int
- */
- public void setDaemonPort(int newDaemonPort);
-
- /**
- * Returns the value of the '<em><b>Server Path</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * The path where the server lives on the remote system. Used by at least the REXEC server launch type.
- * Will be null if not set.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Server Path</em>' attribute.
- * @see #setServerPath(String)
- */
- String getServerPath();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.subsystems.IRemoteServerLauncher#getServerPath <em>Server Path</em>}' attribute.
- * <!-- begin-user-doc -->
- * Set the path where the server lives on the remote system. Used by at least the REXEC server launch type.
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Server Path</em>' attribute.
- * @see #getServerPath()
- * @generated
- */
- void setServerPath(String value);
-
- /**
- * Returns the value of the '<em><b>Server Script</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * The script to run on the remote system, to start the server code.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Server Script</em>' attribute.
- * @see #setServerScript(String)
- */
- String getServerScript();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.subsystems.IRemoteServerLauncher#getServerScript <em>Server Script</em>}' attribute.
- * <!-- begin-user-doc -->
- * The script to run on the remote system, to start the server code.
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Server Script</em>' attribute.
- * @see #getServerScript()
- * @generated
- */
- void setServerScript(String value);
-
- /**
- * Call this method to identify specific server launch types that are not to be permitted.
- * This will disable these types in the property page, effectively preventing the user from
- * specifying it. Note this is a transient property, so you should call it each time as part
- * of restoring your subsystem.
- * <p>
- * You normally do not call this! Rather, your subsystem factory class will override
- * {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}.
- * However, this method is needed by ISVs that re-use predefined subsystem factories,
- * and merely supply their own IConnectorService object via the "systemClass" attribute of the
- * subsystemConfigurations extension point. They don't call this method directly actually, but
- * rather {@link AbstractConnectorService#enableServerLaunchType(SubSystem, ServerLaunchType, boolean)},
- * which in turn calls this.
- *
- * @see org.eclipse.rse.core.subsystems.ServerLaunchType
- */
-// public void enableServerLaunchType(ServerLaunchType serverLaunchType, boolean enable);
-
- /**
- * This methods returns the enablement state per server launch type.
- * If {@link #setServerLaunchType(ServerLaunchType)} has not been
- * called for this server launch type, then we defer to the subsystem factory's
- * method:
- * {@link org.eclipse.rse.core.subsystems.ISubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}.
- * @see org.eclipse.rse.core.subsystems.ServerLaunchType
- */
- public boolean isEnabledServerLaunchType(ServerLaunchType serverLaunchType);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java
deleted file mode 100644
index 4599601c5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-
-
-//
-
-
-/**
- * @lastgen interface RemoteSystemEnvVar {}
- */
-
-public interface IRemoteSystemEnvVar {
-
-
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "(c) Copyright IBM Corporation 2002, 2004."; //$NON-NLS-1$
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Name attribute
- * The name of the environment variable to set at connect time
- */
- String getName();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Name attribute
- */
- void setName(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Value attribute
- * The value to set this environment variable to at connect time
- */
- String getValue();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Value attribute
- */
- void setValue(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the AdditionalAttributes attribute
- * Additional attributes that may need to be persisted per environment variable.
- */
- String getAdditionalAttributes();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the AdditionalAttributes attribute
- */
- void setAdditionalAttributes(String value);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java
deleted file mode 100644
index 8a29c5259..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-
-/**
- * This interface captures the abstract lifecyle for launching the remote server,
- * and subsequently connecting to it.
- * @see org.eclipse.rse.core.subsystems.IServerLauncherProperties
- */
-public interface IServerLauncher
-{
-
- /**
- * Set the remote system signon information
- */
- public void setSignonInformation(SystemSignonInformation info);
-
- /**
- * Get the remote system signon information, as set in
- * {@link #setSignonInformation(SystemSignonInformation)}
- */
- public SystemSignonInformation getSignonInformation();
-
- /**
- * Set the object which contains the user-specified properties that
- * are used by this launcher
- */
- public void setServerLauncherProperties(IServerLauncherProperties propertyInfo);
-
- /**
- * Get the object which contians the user-specified properties that are
- * used by this launcher. As set in {@link #setServerLauncherProperties(IServerLauncherProperties)}.
- */
- public IServerLauncherProperties getServerLauncherProperties();
-
- /**
- * Determine if the remote server needs to be launched or not.
- * Generally is always false.
- * @return true if the remote server is already launched, false if it needs to be.
- */
- public boolean isLaunched();
-
- /**
- * Launch the remote server. Some subclasses may not need this step,
- * if the server is already running.
- * @see #getErrorMessage()
- * @param monitor - a monitor for showing progress
- * @return an object. Up to each implementor how to interpret.
- */
- public Object launch(IProgressMonitor monitor) throws Exception;
-
- /**
- * Determine if we are connected to the remote server or not.
- * @return true if we are connected, false otherwise.
- */
- public boolean isConnected();
-
- /**
- * Connect to the remote server.
- * @see #getErrorMessage()
- * @param monitor a monitor for showing progress
- * @param connectPort the port to use for launching the server
- * @return Anything you want.
- */
- public Object connect(IProgressMonitor monitor, int connectPort) throws Exception;
-
- /**
- * Disconnect from the remote server
- * @see #getErrorMessage()
- */
- public void disconnect() throws Exception;
-
- /**
- * Returns the host error message if there was a problem connecting to the host.
- * If there was no problem, this returns null
- *
- * @return the error message.
- */
- public SystemMessage getErrorMessage();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java
deleted file mode 100644
index dc100ab33..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import org.eclipse.rse.core.model.IRSEModelObject;
-
-
-
-/**
- * Implement this interface to provide peristable properties for server launching
- * All properties to be persisted to be are stored and restored from associated
- * IPropertySets
- *
- */
-public interface IServerLauncherProperties extends IRSEModelObject
-{
-
- public IServerLauncherProperties cloneServerLauncher(IServerLauncherProperties newOne);
-
- /**
- * Returns the connector service
- * @return the connector service
- */
- public IConnectorService getConnectorService();
-
- /**
- * Update cached values based on IPropertySets
- *
- */
- public void restoreFromProperties();
-
- /**
- * Store cached values based on IPropertySets
- *
- */
- public void saveToProperties();
-
-} // ServerLauncher \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServiceSubSystem.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServiceSubSystem.java
deleted file mode 100644
index 1c3c47732..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServiceSubSystem.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-
-public interface IServiceSubSystem extends ISubSystem
-{
- public Class getServiceType();
- public void switchServiceFactory(IServiceSubSystemConfiguration factory);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServiceSubSystemConfiguration.java
deleted file mode 100644
index 85e8f8ebb..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.IService;
-
-
-
-/**
- * This is the interface for the class that is for subsystem-providers who desire not to use MOF.
- *
- * @lastgen interface DefaultSubSystemConfiguration extends SubSystemConfiguration {}
- */
-public interface IServiceSubSystemConfiguration extends ISubSystemConfiguration
-{
- public IConnectorService getConnectorService(IHost host);
- public void setConnectorService(IHost host, IConnectorService connectorService);
- public Class getServiceType();
- public Class getServiceImplType();
- public IService getService(IHost host);
-
-} //DefaultSubSystemConfiguration \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
deleted file mode 100644
index c2ff79856..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
+++ /dev/null
@@ -1,650 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.persistance.IRSEPersistableContainer;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-
-
-/**
- * Interface implemented by SubSystem objects. While connections contain information to identify a
- * particular remote system, it is the subsystem objects within a connection that contain information
- * unique to a particular tool, for that remote system, such as the port the tool uses and the
- * user ID for making the connection. There are a set of default properties, but these can be
- * extended by subsystem providers, by extending SubSystem.
- * <p>
- */
-public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, IRemoteObjectResolver, ISchedulingRule, IRSEModelObject, IRSEPersistableContainer
-{
- // -------------------------------------
- // Shortcut and helper methods...
- // -------------------------------------
- /**
- * Return the parent subsystem factory that owns this subsystem.
- */
- public ISubSystemConfiguration getSubSystemConfiguration();
- /**
- * Set the parent subsystem factory that owns this subsystem.
- */
- public void setSubSystemConfiguration(ISubSystemConfiguration ssf);
- /**
- * Set the parent connection that owns this subsystem.
- */
- public void setHost(IHost conn);
-
- /**
- * Set the connector service for this subsystem
- * @param connectorService
- */
- public void setConnectorService(IConnectorService connectorService);
-
- /**
- * Return the system profile object this subsystem is associated with.
- * @see #getName()
- */
- public ISystemProfile getSystemProfile();
- /**
- * Return the connection object this subsystem is associated with.
- */
- public IHost getHost();
-
- /**
- * Called on each subsystem associated with a particular {@link IConnectorService} after it connects.
- * @param monitor A progress monitor supporting progress reporting and cancellation.
- */
- public void initializeSubSystem(IProgressMonitor monitor);
-
- /**
- * Called on each subsystem associated with a particular {@link IConnectorService} after it disconnects
- * @param monitor A progress monitor supporting progress reporting and cancellation.
- */
- public void uninitializeSubSystem(IProgressMonitor monitor);
-
- /**
- * @return true if this subsystem's properties should take precedence over other subsystems that share the same IConnectorService
- */
- public boolean isPrimarySubSystem();
- /**
- * Return the primary subsystem associated with this subsystem's IConnectorService
- */
- public ISubSystem getPrimarySubSystem();
-
- /**
- * @return The name of the connection that owns this. Same as getSystemConnection().getAliasName()
- */
- public String getHostAliasName();
- /**
- * @return The value of the profile that owns the connection that owns this subsystem. Fastpath.
- */
- public String getSystemProfileName();
- /**
- * Private method called when the parent profile is being renamed, so
- * the subsystem can do any cleanup it needs to. Called after the profile is actually renamed.
- */
- public void renamingProfile(String oldName, String newName);
- /**
- * Private method called when the parent connection is being renamed, so
- * the subsystem can do any cleanup it needs to.
- */
- public void renamingConnection(String newName);
- /**
- * Private method called when the parent connection is being deleted, so
- * the subsystem can do any pre-death cleanup it needs to.
- */
- public void deletingConnection();
- /**
- * This is a helper method you can call when performing actions that must be certain there
- * is a connection. If there is no connection it will attempt to connect, and if that fails
- * will throw a SystemMessageException you can easily display to the user by using a method
- * in it.
- */
- public void checkIsConnected() throws SystemMessageException;
-
-
- // ---------------------------------------------------
- // Methods for business partners to add their own
- // persisted attributes to the subsystem object...
- // ---------------------------------------------------
-
- /**
- * For business partners defining their own subsystems.
- * This method allows an attribute to be persisted in this
- * subsystem, given the following information:
- * <ul>
- * <li>Vendor name. This name should uniquely differentiate one
- * vendor's attributes from anothers.
- * <li>Attribute name. The name of the attribute to set.
- * <li>attribute value. The value to give the named attribute. It must
- * be resolved into a string to use this. Eg, for boolean use
- * something like "true" or "false". To clear the attribute
- * value pass null for the value.
- * </ul>
- * <b>Warning</b> do not use any of the following characters in any of
- * given parameters, or it will cause problems with parsing:
- * <ul>
- * <li>Pound sign ('#')
- * <li>Three underscores ("___")
- * <li>Three equals signs ("===")
- * <li>Three semicolons (";;;")
- * </ul>
- */
- public void setVendorAttribute(String vendorName,
- String attributeName, String attributeValue);
- /**
- * For business partners defining their own subsystems.
- * This method allows retrieval of a persisted attribute in this
- * subsystem, given the following information:
- * <ul>
- * <li>Vendor name. This name should uniquely differentiate one
- * vendor's attributes from anothers.
- * <li>Attribute name. The name of the attribute whose value is being queried.
- * </ul>
- * @return value of the attribute being queried, or null if not found
- */
- public String getVendorAttribute(String vendorName, String attributeName);
-
-
-
- // -------------------------------------
- // Context and attributue information...
- // -------------------------------------
-
- /**
- * Return true if userId and password should be forced to uppercase.
- * Shortcut to calling same method in parent SubSystemConfiguration.
- */
- public boolean forceUserIdToUpperCase();
- /**
- * Alternative to getUserId when we don't want to resolve it from parent connection.
- * This is used when showing the properties.
- * <p>
- * Unlike getUserId() this one does not defer to the connection's default user Id if
- * the subsystem's userId attribute is null.
- * <p>
- * To set the local user Id, simply call setUserId(String id). To clear it, call
- * {@link #clearLocalUserId()}.
- * <p>
- * @see IHost#getDefaultUserId()
- * @see #clearLocalUserId()
- * @see #getUserId()
- */
- public String getLocalUserId();
- /**
- * Called to clear the local user Id such that subsequent requests to getUserId() will
- * return the parent connection's default user Id. Sets the user Id attribute for this
- * subsystem to null.
- * <p>
- * @see IHost#getDefaultUserId()
- * @see #getUserId()
- * @see #getLocalUserId()
- */
- public void clearLocalUserId();
- /**
- * Return the children for this subsystem.
- * This is used to populate the Remote System View explorer.
- * <p>
- * By default, if the parent subsystem factory supports filters, then
- * we return getSystemFilterPoolReferencesArray. If filters are not
- * supported (supportsFilters() returns false from factory) then we
- * return null. In this case you should override this.
- */
- public Object[] getChildren();
- /**
- * Return true if this subsystem has children objects to
- * be displayed in the Remote System View explorer.
- */
- public boolean hasChildren();
-
- /**
- * Return true if the given filter lists the contents of the given remote object.
- * For example, if given a folder, return true if any of the filter strings in this filter
- * lists the contents of that folder. Used in impact analysis when a remote object is
- * created, deleted, renamed, copied or moved, so as to establish which filters need to be
- * refreshed or collapsed (if the folder is deleted, say).
- * <p>
- * The default algorithm calls doesFilterStringListContentsOf for each filter string.
- */
- public boolean doesFilterListContentsOf(ISystemFilter filter, String remoteObjectAbsoluteName);
- /**
- * Return true if the given filter string lists the contents of the given remote object.
- * For example, if given a folder, return true if the given filter string
- * lists the contents of that folder. Used in impact analysis when a remote object is
- * created, deleted, renamed, copied or moved, so as to establish which filters need to be
- * refreshed or collapsed (if the folder is deleted, say).
- */
- public boolean doesFilterStringListContentsOf(ISystemFilterString filterString, String remoteObjectAbsoluteName);
-
- /**
- * Return true if the given remote object name will pass the filtering criteria for any of
- * the filter strings in this filter.
- */
- public boolean doesFilterMatch(ISystemFilter filter, String remoteObjectAbsoluteName);
- /**
- * Return true if the given remote object name will pass the filtering criteria for the
- * given filter string in this filter.
- */
- public boolean doesFilterStringMatch(String filterString, String remoteObjectAbsoluteName, boolean caseSensitive);
-
- // -------------------------
- // Filter Pool References...
- // -------------------------
- /**
- * Return the system filter pool reference manager, as per the
- * interface SystemFilterPoolReferenceManagerProvider
- */
- public ISystemFilterPoolReferenceManager getSystemFilterPoolReferenceManager();
-
- /**
- * @return The value of the Name attribute
- */
- public String getName();
-
- /**
- * @param value The new value of the Name attribute
- */
- public void setName(String value);
-
- /**
- * Returns the value of this subsystem's user id if it is not null. If it
- * is null, it returns the parent connection object's default user Id.
- * <p>
- * In fact, we now don't store the user Id in the subsystem object itself, but rather store it in the
- * user preferences, so that such things are not shared among the team on a synchronize operation.
- * This is transparent to callers of this method however, as this method resolves from the preferences.
- *
- * @see IHost#getDefaultUserId()
- * @see #getLocalUserId()
- * @see #clearLocalUserId()
- * @return The value of the UserId attribute
- */
- public String getUserId();
-
- /**
- * @return The value of the ConfigurationId attribute
- * Ties this subsystem to its owning subsystem configuration, via the
- * id key string of the configuration.
- */
- public String getConfigurationId();
-
- /**
- * @param value The new value of the ConfigurationId attribute
- */
- public void setConfigurationId(String value);
-
- // ---------------------------------------------------
- // The following methods relate to the live connection
- // ---------------------------------------------------
- /**
- * Return the IConnectorService object that represents the live connection for this system.
- */
- public IConnectorService getConnectorService();
-
- /**
- * Check if the SubSystem supports caching.
- */
- public boolean supportsCaching();
-
- /**
- * Return the CacheManager for this subsystem. If the SubSystem returns true for
- * supportsCaching() then it must return a valid CacheManager, otherwise it is free
- * to return null.
- *
- * @see #supportsCaching()
- */
- public ICacheManager getCacheManager();
-
- /**
- * Return true if this subsystem is currently connected to its remote system.
- */
- public boolean isConnected();
-
- /**
- * Return true if the last attempt to connect this subsystem to its remote system failed.
- */
- public boolean isConnectionError();
-
- /**
- * Sets whether the last attempt to connect this subsystem to its remote system failed.
- */
- public void setConnectionError(boolean error);
-
- /**
- * Return true if this subsystem is currently being used in "offline" mode. Not necessarily supported
- * by all subsystems in which case this will always return false.
- */
- public boolean isOffline();
-
- /**
- * Connect to the remote system. Does not force a prompt for a password.
- */
- public void connect() throws Exception;
-
- /**
- * Connect to the remote system, optionally forcing a signon prompt even if the password
- * is cached in memory or on disk.
- *
- * @param forcePrompt forces the prompt dialog to be displayed even if the password is currently
- * in memory.
- */
- public void connect(boolean forcePrompt) throws Exception;
-
-
- /**
- * Disconnect from the remote system.
- * In addition to calling getSystem().disconnect(),this must fire an
- * event to collapse the expanded nodes in the tree under this node.
- */
- public void disconnect() throws Exception;
-
- /**
- * Disconnect from the remote system.
- * In addition to calling getSystem().disconnect(),this may fire an
- * event to collapse the expanded nodes in the tree under this node
- * depending on the value of collapseTree.
- */
- public void disconnect(boolean collapseTree) throws Exception;
-
-
-
- /**
- * Modal thread version of resolve filter strings
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
- * <p>
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
- * <p>
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param monitor the process monitor associated with this operation
- * @param filterString filter pattern for objects to return.
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(IProgressMonitor monitor, String filterString)
- throws Exception;
-
- /**
- * Modal thread version of resolve filter strings
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
- * <p>
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
- * <p>
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param monitor the process monitor associated with this operation
- * @param filterStrings filter patterns for objects to return.
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterStrings(IProgressMonitor monitor, String[] filterStrings)
- throws Exception;
-
- /**
- * Modal thread version of resolve filter strings
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
- * <p>
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
- * <p>
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param monitor the process monitor associated with this operation
- * @param parent the parent object to query
- * @param filterString filter pattern for objects to return.
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
- throws Exception;
-
- /**
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
- * <p>
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
- * <p>
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param filterString filter pattern for objects to return.
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(String filterString)
- throws Exception;
- /**
- * Resolve multiple absolute filter strings. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * This is the same as {@link #resolveFilterString(String)} but takes an array of
- * filter strings versus a single filter string.
- *
- * @param filterStrings array of filter patterns for objects to return.
- * @return Array of objects that are the result of resolving all the filter strings
- */
- public Object[] resolveFilterStrings(String[] filterStrings)
- throws Exception;
-
- /**
- * Resolve an relative filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * When a user expands an object that came from a previous filter string expansion,
- * (such as expanding a folder), this method is invoked to get the children of
- * that object. The user can choose to expand all, or choose a pre-defined
- * relative filter string to subset/filter the children. In either case, the
- * relative filter string is passed in as well as the to-be-expanded parent object.
- * <p>
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
- * <p>
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param parent Object that is being expanded.
- * @param filterString filter pattern for children of parent.
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(Object parent, String filterString)
- throws Exception;
-
- /*
- * Execute a remote command. This is only applicable if the subsystem factory reports
- * true for supportsCommands().
- * @param command Command to be executed remotely.
- * @param Shell parent shell used to show error message. Null means you will handle showing the error message.
- * @param Object context context of a command (i.e. working directory). Null is valid and means to use the default context.
- * @return Array of objects that are the result of running this command. Typically, these
- * are messages logged by the command.
- *
- public Object[] runCommand(String command, Shell shell, Object context)
- throws Exception;
-
- /*
- * Provide list of executed commands on subsystem.This is only applicable if the subsystem factory reports
- * true for supportsCommands().
- *
- public String[] getExecutedCommands();
- */
-
- /**
- * Set a remote property. Subsystems interpret as they wish. Eg, this might be to set
- * a remote environment variable. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param key Identifies property to set
- * @param value Value to set property to
- * @return Object interpretable by subsystem. Might be a Boolean, or the might be new value for confirmation.
- */
- public Object setProperty(Object subject, String key, String value)
- throws Exception;
-
- /**
- * Get a remote property. Subsystems interpret as they wish. Eg, this might be to get
- * a remote environment variable. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param key Identifies property to get value of
- * @return String The value of the requested key.
- */
- public String getProperty(Object subject, String key)
- throws Exception;
-
- /**
- * Set multiple remote properties. Subsystems interpret as they wish. Eg, this might be to set
- * a number of remote environment variables. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param keys Identifies the properties to set
- * @param values Values to set properties to. One to one mapping to keys by index number
- * @return Object interpretable by subsystem. Might be a Boolean, or the might be new values for confirmation.
- */
- public Object setProperties(Object subject, String[] keys, String[] values)
- throws Exception;
-
- /**
- * Get a remote property. Subsystems interpret as they wish. Eg, this might be to get
- * a remote environment variable. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param keys Identifies properties to get value of
- * @return The values of the requested keys.
- */
- public String[] getProperties(Object subject, String[] keys)
- throws Exception;
-
- /**
- * <i>Generated persistent property method</i><br>
- * Return true if this subsystem is to be hidden so it doesn't show in the Remote Systems
- * view when a connection is expanded. If so, this subsystem is for programmatic use only,
- * or is exposed in alternative view. Such is the case for command subsystems, for example.
- * @generated This field/method will be replaced during code generation
- * @return The value of the Hidden attribute
- */
- boolean isHidden();
-
- /**
- * <i>Generated persistent property method</i><br>
- * Specify true if this subsystem is to be hidden so it doesn't show in the Remote Systems
- * view when a connection is expanded. If so, this subsystem is for programmatic use only,
- * or is exposed in alternative view. Such is the case for command subsystems, for example.
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the Hidden attribute
- */
- void setHidden(boolean value);
-
- /**
- * <i>Generated persistent property method</i><br>
- * Return the object that manages the list of
- * filter pools referenced by this subsystem.
- * @generated This field/method will be replaced during code generation
- * @return The FilterPoolReferenceManager reference
- */
- ISystemFilterPoolReferenceManager getFilterPoolReferenceManager();
-
- /**
- * <i>Generated persistent property method</i><br>
- * Set the object that manages the list of
- * filter pools referenced by this subsystem. This is called by the subsystem factory
- * when creating or restoring subsystems.
- * @generated This field/method will be replaced during code generation
- * @param l The new value of the FilterPoolReferenceManager reference
- */
- void setFilterPoolReferenceManager(ISystemFilterPoolReferenceManager value);
-
-
-
-
-
-
- /**
- * Returns the parent object associated with a filter reference. It's up to the
- * subsystem implementation to decide what "parent object" means for a filter reference.
- * @param filterRef the filter reference to determine a target object from.
- * @return An object representing the parent
- */
- Object getTargetForFilter(ISystemFilterReference filterRef);
-
-
-
-
-//// -------------------------------------
-// // GUI methods
-// // -------------------------------------
-// /**
-// * Return the single property page to show in the tabbed notebook for the
-// * for SubSystem property of the parent Connection. Return null if no
-// * page is to be contributed for this. You are limited to a single page,
-// * so you may have to compress. It is recommended you prompt for the port
-// * if applicable since the common base subsystem property page is not shown
-// * To help with this you can use the SystemPortPrompt widget.
-// */
-// public PropertyPage getPropertyPage(Composite parent);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
deleted file mode 100644
index 1f494e0da..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
+++ /dev/null
@@ -1,547 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.persistance.IRSEPersistableContainer;
-
-
-
-public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvider, IRSEPersistableContainer
-{
- // ---------------------------------
- // CONSTANTS...
- // ---------------------------------
- public static final boolean FORCE_INTO_MEMORY = true;
- public static final boolean LAZILY = false;
-
- /**
- * Reset for a full refresh from disk, such as after a team synch.
- */
- public void reset();
- // ---------------------------------
- // CRITICAL METHODS...
- // ---------------------------------
- /**
- * Return true if the subsystem supports more than one filter string
- * <p>RETURNS true BY DEFAULT
- */
- public boolean supportsMultiStringFilters();
-
- /**
- * Return true if the subsystem supports the exporting of filter strings from it's filters
- * <p>RETURNS true BY DEFAULT
- */
- public boolean supportsFilterStringExport();
-
- /**
- * Return true if subsystem instances from this factory support connect and disconnect actions
- * <p>Returns true in default implementation.
- */
- public boolean supportsSubSystemConnect();
- /**
- * Return true (default) or false to indicate if subsystems of this factory support user-editable
- * port numbers.
- * <p>Returns true in default implementation.
- */
- public boolean isPortEditable();
- /**
- * Return true if subsystem instances from this factory support remote command execution
- * <p>Returns false in default implementation, and is usually only true for command subsystems.
- */
- public boolean supportsCommands();
- /**
- * Return true if subsystem instances from this factory support getting and setting properties
- * <p>Returns false in default implementation, and not actually used yet.
- */
- public boolean supportsProperties();
- /**
- * Required method for subsystem factory child classes. Return true if you support filters, false otherwise.
- * If you support filters, then some housekeeping will be done for you automatically. Specifically, they
- * will be saved and restored for you automatically.
- * <p>Returns true in default implementation.
- */
- public boolean supportsFilters();
-
- /**
- * Indicates whether the subsystem supports displaying children under
- * its filters. By default, this will return true, but if filters that can't
- * be expanded are desired, this can be overridden to return false.
- */
- public boolean supportsFilterChildren();
-
- /**
- * Required method for subsystem factory child classes. Return true if you filter caching.
- * If you support filter caching, then the views will always check the in-memory cache for
- * filter results before attempting a query.
- * <p>Returns true in default implementation.
- */
- public boolean supportsFilterCaching();
-
- /**
- * Required method for subsystem factory child classes. Return true if you support filters, and you support
- * multiple filter strings per filter. Return false to restrict the user to one string per filter.
- * <p>Returns true in default implementation.
- */
- public boolean supportsMultipleFilterStrings();
- /**
- * Required method for subsystem factory child classes if returning true from supportsFilters.
- * Return true if you support filters within filters, false otherwise.
- * <p>Returns false in default implementation.
- */
- public boolean supportsNestedFilters();
- /**
- * Return true if you support quick filters. These allow the user to subset a remote system object at
- * the time they expand it in the remote system explorer tree view.
- * <p>
- * Not supported yet
- */
- public boolean supportsQuickFilters();
-
- /**
- * Return true if filters of this subsystem factory support dropping into.
- */
- public boolean supportsDropInFilters();
-
- /**
- * Return true if filters of this subsystem factory provide a custom implementation of drop support.
- * By default, the filter reference adapter treats a drop on a filter as an update to the list of filter
- * strings for a filter. For things like files, it is more desirable to treat the drop as a physical
- * resource copy, so in that case, custom drop makes sense.
- *
- * By default this returns false.
- */
- public boolean providesCustomDropInFilters();
-
- /**
- * Return true if you support user-defined actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem factory
- * <p>Returns false in default implementation.
- */
- public boolean supportsUserDefinedActions();
-
- /**
- * Return true if you support compile actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem factory.
- * <p>Returns false in default implementation.
- */
- public boolean supportsCompileActions();
- /**
- * Return true if you support user-defined/managed named file types
- * <p>Returns false in default implementation.
- */
- public boolean supportsFileTypes();
- /**
- * Tell us if this subsystem factory supports targets, which are destinations for
- * pushes and builds. Normally only true for file system factories.
- */
- public boolean supportsTargets();
- /**
- * Tell us if this subsystem factory supports server launch properties, which allow the user
- * to configure how the server-side code for these subsystems are started. There is a Server
- * Launch Setting property page, with a pluggable composite, where users can configure these
- * properties.
- * <br> By default we return false here. This is overridden in UniversalFileSubSystemConfiguration though.
- */
- public boolean supportsServerLaunchProperties(IHost host);
- /**
- * If {@link #supportsServerLaunchProperties(IHost)} returns true, this method may be called by
- * the server launcher to decide if a given remote server launch type is supported or not.
- * <br> We return true by default.
- * @see org.eclipse.rse.core.subsystems.ServerLaunchType
- */
- public boolean supportsServerLaunchType(ServerLaunchType serverLaunchType);
-
- /**
- * Tell us if filter strings are case sensitive.
- * <p>Returns false in default implementation.
- */
- public boolean isCaseSensitive();
-
- // ---------------------------------
- // USER-PREFERENCE METHODS...
- // ---------------------------------
- /**
- * If we support filters, should we show filter pools in the remote system explorer?
- * Typically retrieved from user preferences.
- */
- public boolean showFilterPools();
- /*
- * If we support filters, should we show filter strings in the remote system explorer?
- * Typically retrieved from user preferences.
- *
- public boolean showFilterStrings();
- */
- /**
- * If we support filters, should we show filter pools in the remote system explorer?
- * This is to set it after the user changes it in the user preferences. It may require
- * refreshing the current view.
- */
- public void setShowFilterPools(boolean show);
- /*
- * If we support filters, should we show filter strings in the remote system explorer?
- * This is to set it after the user changes it in the user preferences. It may require
- * refreshing the current view.
- *
- public void setShowFilterStrings(boolean show);
- */
-
- // ---------------------------------
- // PROXY METHODS. USED INTERNALLY...
- // ---------------------------------
- /**
- * Private method called by RSEUIPlugin
- */
- public void setSubSystemConfigurationProxy(ISubSystemConfigurationProxy proxy);
- /**
- * Private method
- */
- public ISubSystemConfigurationProxy getSubSystemConfigurationProxy();
-
- // ---------------------------------
- // FACTORY ATTRIBUTE METHODS...
- // ---------------------------------
- /**
- * Return vendor of this factory.
- * This comes from the xml "vendor" attribute of the extension point.
- */
- public String getVendor();
- /**
- * Return name of this factory. Matches value in name attribute in extension point xml
- */
- public String getName();
- /**
- * Return description of this factory. Comes from translated description string in extension point xml
- */
- public String getDescription();
- /**
- * Return unique id of this factory. Matches value in id attribute in extension point xml
- */
- public String getId();
-
- /**
- * Return the category this subsystem factory subscribes to.
- * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories
- */
- public String getCategory();
- /**
- * Return the system types this subsystem factory supports.
- */
- public String[] getSystemTypes();
-
- // ---------------------------------
- // PROFILE METHODS...
- // ---------------------------------
- /**
- * Called by SystemRegistry when we are about to delete a profile.
- * <p>
- * Our only mission is to delete the filter pool associated with it,
- * because the registry has already called deleteSubSystemsByConnection
- * for every subsystem of every connection owned by this profile.
- */
- public void deletingSystemProfile(ISystemProfile profile);
- /**
- * Called by SystemRegistry when we have toggled the active-status of a profile
- */
- public void changingSystemProfileActiveStatus(ISystemProfile profile, boolean newStatus);
- /**
- * Get owning profile object given a filter pool object
- */
- public ISystemProfile getSystemProfile(ISystemFilterPool pool);
-
- // ---------------------------------
- // SUBSYSTEM METHODS...
- // ---------------------------------
-
- /**
- * Called by SystemRegistry's renameSystemProfile method to ensure we update our
- * subsystem names within each subsystem.
- * <p>
- * This is called AFTER changing the profile's name!!
- */
- public void renameSubSystemProfile(ISubSystem ss, String oldProfileName, String newProfileName);
- /**
- * Called by SystemRegistry's renameSystemProfile method to pre-test if we are going to run into errors on a
- * profile rename, due to file or folder in use.
- */
- public void preTestRenameSubSystemProfile(String oldProfileName) throws Exception;
- /**
- * Called by SystemRegistry's renameConnection method to ensure we update our
- * connection names within each subsystem.
- * <p>
- * Must be called prior to changing the connection's name!!
- */
- public void renameSubSystemsByConnection(IHost conn, String newConnectionName);
- /**
- * Called by SystemRegistry's deleteConnection method to ensure we delete all our
- * subsystems for a given connection.
- */
- public void deleteSubSystemsByConnection(IHost conn);
-
- /**
- * Creates a new subsystem instance that is associated with the given connection object.
- * SystemRegistryImpl calls this when a new connection is created, and appliesToSystemType returns true.
- * @param conn The connection to create a subsystem for
- * @param creatingConnection true if we are creating a connection, false if just creating
- * another subsystem for an existing connection.
- * @param yourNewConnectionWizardPages The wizard pages you supplied to the New Connection wizard, via the
- * {@link org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter#getNewConnectionWizardPages(ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)}
- * method or null if you didn't override this method.
- */
- public ISubSystem createSubSystem(IHost conn, boolean creatingConnection, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages);
-
- // used in the case where newsubsystems are added after a connection exists
- public ISubSystem createSubSystemAfterTheFact(IHost conn);
-
- public ISubSystem createSubSystemInternal(IHost conn);
-
-
- /**
- * Find or create a connector service for this host
- */
- public IConnectorService getConnectorService(IHost host);
-
- /**
- * Overridable entry for child classes to contribute a server launcher instance
- * for a given subsystem.
- * <p>
- * Create an instance of ServerLauncher, and add it to the given subsystem.
- * When a subsystem is created, and {@link #supportsServerLaunchProperties(IHost)}
- * returns true, this method is called to create the server launcher instance
- * associated with the subsystem. The default implementation is to create an
- * instance of {@link IRemoteServerLauncher}, but override to create your own
- * ServerLauncher instance if you have your own class.
- */
- public IServerLauncherProperties createServerLauncher(IConnectorService connectorService);
-
- /**
- * Updates user-editable attributes of an existing subsystem instance.
- * These attributes typically affect the live connection, so the subsystem will be forced to
- * disconnect.
- * <p>
- * The subsystem will be saved to disk.
- * @param subsystem target of the update action
- * @param updateUserId true if we are updating the userId, else false to ignore userId
- * @param userId new local user Id. Ignored if updateUserId is false
- * @param updatePort true if we are updating the port, else false to ignore port
- * @param port new local port value. Ignored if updatePort is false
- */
- public void updateSubSystem(ISubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, int port);
- /**
- * Update the port for the given subsystem instance.
- */
- public void setSubSystemPort(ISubSystem subsystem, int port);
- /**
- * Update the user ID for the given subsystem instance.
- */
- public void setSubSystemUserId(ISubSystem subsystem, String userId);
-
- /**
- * Returns true if this factory allows users to delete instances of subsystem objects.
- * Would only be true if users are allowed to create multiple instances of subsystem objects
- * per connection.
- */
- public boolean isSubSystemsDeletable();
- /**
- * Deletes a given subsystem instance from the list maintained by this factory.
- * SystemRegistryImpl calls this when the user selects to delete a subsystem object,
- * or delete the parent connection this subsystem is associated with.
- * In former case, this is only called if the factory supports user-deletable subsystems.
- */
- public boolean deleteSubSystem(ISubSystem subsystem);
- /**
- * Clone a given subsystem into the given connection.
- * Called when user does a copy-connection action.
- * @param oldSubsystem The subsystem to be cloned
- * @param newConnection The connection into which to create and clone the old subsystem
- * @param copyProfileOperation Pass true if this is an profile-copy operation versus a connection-copy operation
- * @return New subsystem within the new connection
- */
- public ISubSystem cloneSubSystem(ISubSystem oldSubsystem, IHost newConnection, boolean copyProfileOperation)
- throws Exception;
- /**
- * Returns a list of subsystem objects existing for the given connection.
- * @param conn System connection to retrieve subsystems for
- * @param force true if we should force all the subsystems to be restored from disk if not already
- */
- public ISubSystem[] getSubSystems(IHost conn, boolean force);
- /**
- * Returns a list of all subsystem objects for all connections.
- */
- public ISubSystem[] getSubSystems(boolean force);
- /**
- * Renames a subsystem. This is better than ss.setName(String newName) as it saves the subsystem to disk.
- */
- public void renameSubSystem(ISubSystem subsystem, String newName);
- /**
- * Disconnect all subsystems currently connected.
- * Called by shutdown() of RSEUIPlugin.
- */
- public void disconnectAllSubSystems()
- throws Exception;
-
- // ---------------------------------
- // FILTER POOL METHODS...
- // ---------------------------------
- /**
- * Get the filter pool manager for the given profile
- */
- public ISystemFilterPoolManager getFilterPoolManager(ISystemProfile profile);
- /**
- * Copy the filter pool manager and return a new one. Called during profile-copy operations.
- * Will also copy all of the filter pools and their respective data.
- */
- public ISystemFilterPoolManager copyFilterPoolManager(ISystemProfile oldProfile, ISystemProfile newProfile)
- throws Exception;
-
- /**
- * Given a subsystem, return the first (hopefully only) default pool for this
- * subsystem's profile.
- */
- public ISystemFilterPool getDefaultSystemFilterPool(ISubSystem subsys);
- /**
- * Test if any filter pools in the given profile are referenced by other profiles,
- * which are active.
- * <p>
- * Called when user tries to make a profile inactive. We prevent this if there exists
- * active references.
- * @param profile The profile being tested
- * @return An array of the active subsystems which reference filter pools in this profile,
- * or null if none are found.
- */
- public ISubSystem[] testForActiveReferences(ISystemProfile profile);
-
- // ---------------------------------
- // FILTER METHODS
- // ---------------------------------
- /**
- * Return the translated string to show in the property sheet for the type property when a filter is selected.
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter);
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showRefreshOnFilter();
-
- /**
- * Return true if we should show the show in table action in the popup for the given element.
- */
- public boolean showGenericShowInTableOnFilter();
-
-
-
-
- /**
- * Given a filter, decide whether to show the Filter Strings property page
- * for this filter. Default is true.
- */
- public boolean showChangeFilterStringsPropertyPage(ISystemFilter filter);
-
-
- /**
- * Determines whether this factory is responsible for the creation of subsytems of the specified type
- * Subsystem factories should override this to indicate which subsystems they support.
- *
- * @param subSystemType type of subsystem
- * @return whether this factory is for the specified subsystemtype
- */
- public boolean isFactoryFor(Class subSystemType);
-
- // ---------------------------------
- // FILTER REFERENCE METHODS
- // ---------------------------------
-
- // ---------------------------------
- // STATE METHODS...
- // ---------------------------------
- /**
- * Called by adapters prior to asking for actions, in case the connection of the currently selected
- * object is required by the action.
- */
- public void setConnection(IHost connection);
- /**
- * Called by adapters prior to asking for actions. For cases when current selection is needed.
- */
- public void setCurrentSelection(Object[] selection);
- // ---------------------------------
- // SAVE METHODS...
- // ---------------------------------
- /**
- * Saves absolutely everything to disk. This is called as a safety
- * measure when the workbench shuts down.
- * <p>
- * Totally handled for you!
- * <p>
- * Calls saveSubSystems() and saveFilterPools()
- * <p>
- * Exceptions are swallowed since we cannot deal with them on shutdown anyway!
- */
- public boolean commit();
- /**
- * Save one subsystem to disk.
- * Called by each subsystem when their data changes.
- */
- public void saveSubSystem(ISubSystem subsys)
- throws Exception;
-
- /**
- * <i><b>Private</b>. Do not call or use.</i><br>
- * @generated This field/method will be replaced during code generation
- * @return The list of SubSystemList references
- */
- java.util.List getSubSystemList();
-
- /**
- * <i><b>Private</b>. Do not call or use.</i><br>
- * @generated This field/method will be replaced during code generation
- * @return The list of FilterPoolManagerList references
- */
- java.util.List getFilterPoolManagerList();
-
- public ISystemFilterPool getDefaultFilterPool(ISystemProfile profile, String oldProfileName);
- public ISystemProfile getSystemProfile(String name);
- public void renameFilterPoolManager(ISystemProfile profile);
-
-
-
-// /**
-// * Return the validator for the userId.
-// * A default is supplied.
-// * Note this is only used for the subsystem's properties, so will not
-// * be used by the connection's default. Thus, is only of limited value.
-// * <p>
-// * This must be castable to ICellEditorValidator for the property sheet support.
-// */
-// public ISystemValidator getUserIdValidator();
-// /**
-// * Return the validator for the password which is prompted for at runtime.
-// * No default is supplied.
-// */
-// public ISystemValidator getPasswordValidator();
-// /**
-// * Return the validator for the port.
-// * A default is supplied.
-// * This must be castable to ICellEditorValidator for the property sheet support.
-// */
-// public ISystemValidator getPortValidator();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java
deleted file mode 100644
index b5d2639ff..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-/**
- * Interface to SubSystemConfigurationExtension class
- * Internal use, not likely you will ever need to use it or access it directly.
- */
-public interface ISubSystemConfigurationProxy
-{
- /**
- * Return value of the <samp>name</samp> xml attribute.
- * Return name of this factory. Matches value in name attribute in extension point xml
- */
- public String getName();
- /**
- * Return value of the <samp>description</samp> xml attribute.
- * Return description of this factory. Matches value in description attribute in extension point xml
- */
- public String getDescription();
- /**
- * Return value of the <samp>id</samp> xml attribute.
- * Return unique id of this configuration.
- */
- public String getId();
- /**
- * Return value of the <samp>systemTypes</samp> xml attribute.
- * Return the system types this subsystem configuration supports.
- */
- public String[] getSystemTypes();
- /**
- * Return true if this factory supports all system types
- */
- public boolean supportsAllSystemTypes();
-
- /**
- * Return value of the <samp>vendor</samp> xml attribute.
- * Return vendor of this configuration.
- */
- public String getVendor();
- /**
- * Return value of the <samp>category</samp> xml attribute.
- * Return the category this subsystem configuration subscribes to.
- * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories
- */
- public String getCategory();
-
-
- /**
- * Return true if the subsystem factory has been instantiated yet
- */
- public boolean isSubSystemConfigurationActive();
-
- /**
- * Returns the priority of the subsystem configuration.
- */
- public int getPriority();
-
- /**
- * Return the subsystem factory singleton instance. Will instantiate if not already.
- */
- public ISubSystemConfiguration getSubSystemConfiguration();
-// /**
-// * Return an instance of the IConnectorService class identified by the "systemClass" attribute
-// * of this subsystemFactory extension point. Note each call to this method returns a
-// * new instance of the class, or null if no "systemClass" attribute was specified.
-// */
-// public IConnectorService getSystemObject();
-
- /**
- * Test if the given system type matches one or more of the type names declared in the
- * <samp>systemTypes</samp> attribute of this extension.
- */
- public boolean appliesToSystemType(String type);
-
- /**
- * Reset for a full refresh from disk, such as after a team synch.
- */
- public void reset();
-
- /**
- * After a reset, restore from disk
- */
- public void restore();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteChildrenContentsType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteChildrenContentsType.java
deleted file mode 100644
index 2fb1a3e9b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteChildrenContentsType.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.rse.core.model.ISystemContentsType;
-
-
-/**
- * Represents contents that are children of a container
- */
-public class RemoteChildrenContentsType implements ISystemContentsType
-{
- public static String CONTENTS_TYPE_CHILDREN = "contents_children"; //$NON-NLS-1$
- public static RemoteChildrenContentsType _instance = new RemoteChildrenContentsType();
-
- public static RemoteChildrenContentsType getInstance()
- {
- return _instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.IRemoteContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_CHILDREN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.IRemoteContentsType#isPersistent()
- */
- public boolean isPersistent()
- {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java
deleted file mode 100644
index 43a5fbdf1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import java.util.Arrays;
-import java.util.List;
-
-
-
-
-public final class ServerLaunchType
-{
- /**
- * The '<em><b>Daemon</b></em>' literal value.
- * <!-- begin-user-doc -->
- * The server code is to be launched by calling a daemon that is listening on a port.
- * <!-- end-user-doc -->
- * @see #DAEMON_LITERAL
- * @model name="Daemon"
- * @generated
- * @ordered
- */
- public static final int DAEMON = 0;
-
- /**
- * The '<em><b>Rexec</b></em>' literal value.
- * <!-- begin-user-doc -->
- * The server code is to be launched using REXEC
- * <!-- end-user-doc -->
- * @see #REXEC_LITERAL
- * @model name="Rexec"
- * @generated
- * @ordered
- */
- public static final int REXEC = 1;
-
- /**
- * The '<em><b>Running</b></em>' literal value.
- * <!-- begin-user-doc -->
- * The server code is to already running, and doesn't need to be launched.
- * <!-- end-user-doc -->
- * @see #RUNNING_LITERAL
- * @model name="Running"
- * @generated
- * @ordered
- */
- public static final int RUNNING = 2;
-
- /**
- * The '<em><b>Telnet</b></em>' literal value.
- * <!-- begin-user-doc -->
- * The server code is to be launched using TELNET.
- * <!-- end-user-doc -->
- * @see #TELNET_LITERAL
- * @model name="Telnet"
- * @generated
- * @ordered
- */
- public static final int TELNET = 3;
-
- /**
- * The '<em><b>SSH</b></em>' literal value.
- * <!-- begin-user-doc -->
- * The server code is to be launched using SSH.
- * <!-- end-user-doc -->
- * @see #SSH_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int SSH = 4;
-
- /**
- * The '<em><b>FTP</b></em>' literal value.
- * <!-- begin-user-doc -->
- * The server code is to be launched using FTP
- * <!-- end-user-doc -->
- * @see #FTP_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int FTP = 5;
-
- /**
- * The '<em><b>HTTP</b></em>' literal value.
- * <!-- begin-user-doc -->
- * The server code is to be launched using HTTP
- * <!-- end-user-doc -->
- * @see #HTTP_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int HTTP = 6;
-
- /**
- * The '<em><b>Daemon</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <p>
- * The server code is to be launched by calling a daemon that is listening on a port.
- * </p>
- * <!-- end-user-doc -->
- * @see #DAEMON
- * @generated
- * @ordered
- */
- public static final ServerLaunchType DAEMON_LITERAL = new ServerLaunchType(DAEMON, "Daemon"); //$NON-NLS-1$
-
- /**
- * The '<em><b>Rexec</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <p>
- * The server code is to be launched using REXEC
- * </p>
- * <!-- end-user-doc -->
- * @see #REXEC
- * @generated
- * @ordered
- */
- public static final ServerLaunchType REXEC_LITERAL = new ServerLaunchType(REXEC, "Rexec"); //$NON-NLS-1$
-
- /**
- * The '<em><b>Running</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <p>
- * The server code is to already running, and doesn't need to be launched.
- * </p>
- * <!-- end-user-doc -->
- * @see #RUNNING
- * @generated
- * @ordered
- */
- public static final ServerLaunchType RUNNING_LITERAL = new ServerLaunchType(RUNNING, "Running"); //$NON-NLS-1$
-
- /**
- * The '<em><b>Telnet</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <p>
- * The server code is to be launched using TELNET.
- * </p>
- * <!-- end-user-doc -->
- * @see #TELNET
- * @generated
- * @ordered
- */
- public static final ServerLaunchType TELNET_LITERAL = new ServerLaunchType(TELNET, "Telnet"); //$NON-NLS-1$
-
- /**
- * The '<em><b>SSH</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>SSH</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #SSH
- * @generated
- * @ordered
- */
- public static final ServerLaunchType SSH_LITERAL = new ServerLaunchType(SSH, "SSH"); //$NON-NLS-1$
-
- /**
- * The '<em><b>FTP</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <p>
- * The server code is to be launched using FTP
- * </p>
- * <!-- end-user-doc -->
- * @see #FTP
- * @generated
- * @ordered
- */
- public static final ServerLaunchType FTP_LITERAL = new ServerLaunchType(FTP, "FTP"); //$NON-NLS-1$
-
- /**
- * The '<em><b>HTTP</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <p>
- * The server code is to be launched using HTTP
- * </p>
- * <!-- end-user-doc -->
- * @see #HTTP
- * @generated
- * @ordered
- */
- public static final ServerLaunchType HTTP_LITERAL = new ServerLaunchType(HTTP, "HTTP"); //$NON-NLS-1$
-
- /**
- * An array of all the '<em><b>Server Launch Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final ServerLaunchType[] VALUES_ARRAY =
- new ServerLaunchType[]
- {
- DAEMON_LITERAL,
- REXEC_LITERAL,
- RUNNING_LITERAL,
- TELNET_LITERAL,
- SSH_LITERAL,
- FTP_LITERAL,
- HTTP_LITERAL,
- };
-
- private String _name;
- private int _value;
-
- /**
- * A public read-only list of all the '<em><b>Server Launch Type</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List VALUES = Arrays.asList(VALUES_ARRAY);
-
- /**
- * Returns the '<em><b>Server Launch Type</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static ServerLaunchType get(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- ServerLaunchType result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Server Launch Type</b></em>' literal with the specified value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static ServerLaunchType get(int value)
- {
- switch (value)
- {
- case DAEMON: return DAEMON_LITERAL;
- case REXEC: return REXEC_LITERAL;
- case RUNNING: return RUNNING_LITERAL;
- case TELNET: return TELNET_LITERAL;
- case SSH: return SSH_LITERAL;
- case FTP: return FTP_LITERAL;
- case HTTP: return HTTP_LITERAL;
- }
- return null;
- }
-
- public String getName()
- {
- return _name;
- }
-
- public int getType()
- {
- return _value;
- }
-
- private ServerLaunchType(int value, String name)
- {
- _name = name;
- _value = value;
-
- }
-
-} //ServerLaunchType \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/SubSystemFilterNamingPolicy.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/SubSystemFilterNamingPolicy.java
deleted file mode 100644
index 167649e6c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/SubSystemFilterNamingPolicy.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy;
-import org.eclipse.rse.core.filters.SystemFilterNamingPolicy;
-
-/**
- * A filter naming policy is responsible for returning the save file names for
- * a given filter framework object.
- * This policy implements our naming policy for the filter files in the
- * remote systems project.
- */
-public class SubSystemFilterNamingPolicy
- extends SystemFilterNamingPolicy
- implements IRSEFilterNamingPolicy
-{
-
- /**
- * Constructor for SubSystemFilterNamingPolicy
- */
- public SubSystemFilterNamingPolicy()
- {
- super();
- }
-
- /**
- * Get the unqualified save file name for the given SystemFilterPoolManager object.
- * Do NOT include the extension, as .xmi will be added.
- * <p>
- * Returns "filterPools_"+managerName by default.
- */
- public String getManagerSaveFileName(String managerName)
- {
- return super.getManagerSaveFileName(managerName);
- }
- /**
- * Get the unqualified save file name for the given SystemFilterPoolReferenceManager object.
- * Do NOT include the extension, as .xmi will be added.
- * <p>
- * Returns "filterPoolRefs_"+managerName by default.
- */
- public String getReferenceManagerSaveFileName(String managerName)
- {
- return super.getReferenceManagerSaveFileName(managerName);
- }
- /**
- * Get the unqualified save file name for the given SystemFilterPool object.
- * Do NOT include the extension, as .xmi will be added.
- * <p>
- * Returns getFilterPoolSaveFileNamePrefix()+poolName by default.
- */
- public String getFilterPoolSaveFileName(String poolName)
- {
- return super.getFilterPoolSaveFileName(poolName);
- }
- /**
- * Get the file name prefix for all pool files.
- * Used to deduce the saved pools by examining the file system
- * <p>
- * By default returns "filterPool_"
- */
- public String getFilterPoolSaveFileNamePrefix()
- {
- return super.getFilterPoolSaveFileNamePrefix();
- }
- /**
- * Get the folder name for the given SystemFilterPool object.
- * <p>
- * Returns getFilterPoolFolderNamePrefix()+poolName by default.
- */
- public String getFilterPoolFolderName(String poolName)
- {
- return super.getFilterPoolFolderName(poolName);
- }
- /**
- * Get the folder name prefix for all pool folders.
- * Used to deduce the saved pools by examining the file system
- * <p>
- * By default returns "FilterPool_"
- */
- public String getFilterPoolFolderNamePrefix()
- {
- return super.getFilterPoolFolderNamePrefix();
- }
- /**
- * Get the unqualified save file name for the given SystemFilter object.
- * Do NOT include the extension, as .xmi will be added.
- * <p>
- * Returns getFilterSaveFileNamePrefix()+filterName by default.
- */
- public String getFilterSaveFileName(String filterName)
- {
- return super.getFilterSaveFileName(filterName);
- }
- /**
- * Get the file name prefix for all filter files.
- * Used to deduce the saved filters by examining the file system
- * <p>
- * Returns "Filter_" by default.
- */
- public String getFilterSaveFileNamePrefix()
- {
- return super.getFilterSaveFileNamePrefix();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferenceManager.java
deleted file mode 100644
index e6b3e7089..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferenceManager.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.references;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.rse.core.references.IRSEBasePersistableReferenceManager;
-import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
-import org.eclipse.rse.core.references.IRSEBasePersistableReferencingObject;
-
-
-/**
- * <b>YOU MUST OVERRIDE resolveReferencesAfterRestore() IN THIS CLASS!</b>
- * <p>
- * <b>YOU MUST OVERRIDE getReferenceName() IN SYSTEMPERSISTABLEREFERENCEDOBJECT!</b>
- * <p>
- * @see org.eclipse.rse.core.references.IRSEBasePersistableReferenceManager
- *
- * @lastgen class SystemPersistableReferenceManagerImpl Impl implements SystemPersistableReferenceManager, EObject {}
- */
-public class SystemPersistableReferenceManager implements IRSEBasePersistableReferenceManager
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- private IRSEBasePersistableReferencingObject[] listAsArray = null;
- public static boolean debug = true;
- public static HashMap EMPTY_MAP = new HashMap();
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String name = NAME_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected List referencingObjectList = null;
- /**
- * Constructor. Typically called by EMF framework via factory create method.
- */
- protected SystemPersistableReferenceManager()
- {
- super();
- }
- /**
- * Internal method to get the mof List that is the current list.
- */
- protected List internalGetList()
- {
- return getReferencingObjectList();
- }
-
- /**
- * Internal method to invalidate any cached info.
- * Must be called religiously by any method affecting list.
- */
- protected void invalidateCache()
- {
- listAsArray = null;
- }
-
- /**
- * Return an array of the referencing objects currently being managed.
- * @return array of the referencing objects currently in this list.
- */
- public IRSEBasePersistableReferencingObject[] getReferencingObjects()
- {
- if ((listAsArray == null) || (listAsArray.length!=internalGetList().size()))
- {
- List list = internalGetList();
- listAsArray = new IRSEBasePersistableReferencingObject[list.size()];
- Iterator i = list.iterator();
- int idx=0;
- while (i.hasNext())
- {
- listAsArray[idx++] = (IRSEBasePersistableReferencingObject)i.next();
- }
- }
- return listAsArray;
- }
-
- /**
- * Set in one shot the list of referencing objects. Replaces current list.
- * @param objects An array of referencing objects which is to become the new list.
- * @param deReference true to first de-reference all objects in the existing list.
- */
- public void setReferencingObjects(IRSEBasePersistableReferencingObject[] objects,
- boolean deReference)
- {
- listAsArray = objects;
- if (deReference)
- removeAndDeReferenceAllReferencingObjects();
- else
- removeAllReferencingObjects();
- List list = internalGetList();
- for (int idx=0; idx<objects.length; idx++)
- list.add(objects[idx]);
- }
-
-/*
- * DWD this should probably operate on IRSEPersistableReferencingObject
- * instead and call setParentManager. This involves recasting this class to
- * implement a new type or changing IRSEBasePersistableReferenceManager to
- * deal with parent references - probably changing its name in the process.
- * We could collapse IRSEBasePersistableReferencingObject and its subinterface
- * into one interface.
- */
- /**
- * Add a referencing object to the managed list.
- * @return new count of referenced objects being managed.
- */
- public int addReferencingObject(IRSEBasePersistableReferencingObject object)
- {
- List list = internalGetList();
- list.add(object);
- invalidateCache();
- return getReferencingObjectCount();
- }
-
- /**
- * Remove a referencing object from the managed list.
- * <p>Does NOT call removeReference on the master referenced object.
- * @return new count of referenced objects being managed.
- */
- public int removeReferencingObject(IRSEBasePersistableReferencingObject object)
- {
- List list = internalGetList();
- list.remove(object);
- invalidateCache();
- return getReferencingObjectCount();
- }
-
- /**
- * Remove and dereferences a referencing object from the managed list.
- * <p>DOES call removeReference on the master referenced object.
- * @return new count of referenced objects being managed.
- */
- public int removeAndDeReferenceReferencingObject(IRSEBasePersistableReferencingObject object)
- {
- object.removeReference();
- return removeReferencingObject(object);
- }
-
- /**
- * Remove all objects from the list.
- * <p>Does NOT call removeReference on the master referenced objects.
- */
- public void removeAllReferencingObjects()
- {
- internalGetList().clear();
- }
-
- /**
- * Remove and dereference all objects from the list.
- * <p>DOES call removeReference on the master referenced objects.
- */
- public void removeAndDeReferenceAllReferencingObjects()
- {
- IRSEBasePersistableReferencingObject[] objs = getReferencingObjects();
- for (int idx=0; idx<objs.length; idx++)
- {
- objs[idx].removeReference();
- }
- removeAllReferencingObjects();
- }
-
- /**
- * Return how many referencing objects are currently in the list.
- * @return current count of referenced objects being managed.
- */
- public int getReferencingObjectCount()
- {
- return internalGetList().size();
- }
-
- /**
- * Return the zero-based position of the given referencing object within the list.
- * Does a memory address comparison (==) to find the object.
- * @param object The referencing object to find position of.
- * @return zero-based position within the list. If not found, returns -1
- */
- public int getReferencingObjectPosition(IRSEBasePersistableReferencingObject object)
- {
- List list = internalGetList();
- int position = -1;
- boolean match = false;
-
- Iterator i = list.iterator();
- int idx = 0;
-
- while (!match && i.hasNext())
- {
- IRSEBasePersistableReferencingObject curr = (IRSEBasePersistableReferencingObject)i.next();
- if (curr == object)
- {
- match = true;
- position = idx;
- }
- else
- idx++;
- }
- return position;
- }
-
- /**
- * Move the given referencing object to a new zero-based position in the list.
- * @param newPosition New zero-based position
- * @param object The referencing object to move
- */
- public void moveReferencingObjectPosition(int newPosition, IRSEBasePersistableReferencingObject object)
- {
-// List list = internalGetList();
- //FIXME list.move(newPosition, object);
- }
-
- /**
- * Return true if the given referencable object is indeed referenced by a referencing object
- * in the current list. This is done by comparing the reference names of each, not the
- * in-memory pointers.
- * @param object The referencable object to which to search for a referencing object within this list
- * @return true if found in list, false otherwise.
- */
- public boolean isReferenced(IRSEBasePersistableReferencedObject object)
- {
- return (getReferencedObject(object) != null);
- }
-
- /**
- * Search list of referencing objects to see if one of them references the given referencable object.
- * This is done by comparing the reference names of each, not the in-memory pointers.
- * @param object The referencable object to which to search for a referencing object within this list
- * @return the referencing object within this list which references the given referencable object, or
- * null if no reference found.
- */
- public IRSEBasePersistableReferencingObject getReferencedObject(IRSEBasePersistableReferencedObject object)
- {
- List list = internalGetList();
- IRSEBasePersistableReferencingObject match = null;
- Iterator i = list.iterator();
- int idx = 0;
-
- while ((match==null) && i.hasNext())
- {
- IRSEBasePersistableReferencingObject curr = (IRSEBasePersistableReferencingObject)i.next();
- if (curr.getReferencedObjectName().equals(object.getReferenceName()))
- {
- match = curr;
- }
- else
- idx++;
- }
- return match;
- }
-
- /**
- * Return string identifying this filter
- */
- public String toString()
- {
- return getName();
- }
-
- // ---------------------------------------------------------------------------
- // Methods for saving and restoring if not doing your own in your own subclass
- // ---------------------------------------------------------------------------
-
- /**
- * <b>YOU MUST OVERRIDE THIS METHOD!</b>
- * <p>
- * After restoring this from disk, there is only the referenced object name,
- * not the referenced object pointer, for each referencing object.
- * <p>
- * This method is called after restore and for each restored object in the list must:
- * <ol>
- * <li>Do what is necessary to find the referenced object, and set the internal reference pointer.
- * <li>Call addReference(this) on that object so it can maintain it's in-memory list
- * of all referencing objects.
- * </ol>
- * @return true if resolved successfully. False if some references were not found and
- * hence those referencing objects removed from the restored list.
- */
- public boolean resolveReferencesAfterRestore()
- {
- return false;
- }
-
-
- /**
- * Attempt to save contents of manager to disk. Only call if not doing your own save from
- * your own model that uses a subclass of this.
- * @param folder The folder in which to save the manager.
- * @param fileName The unqualified file name to save to. Should include extension, such as .xmi
- */
- public void save(IFolder folder, String fileName)
- throws Exception
- {
- /* FIXME
- initMOF();
- String path = folder.getLocation().toOSString();
- String saveFileName = addPathTerminator(path)+fileName;
- File saveFile = new File(saveFileName);
- boolean exists = saveFile.exists();
- saveFileName = saveFile.toURL().toString();
- Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
-
- Resource.Factory resFactory = reg.getFactory(URI.createURI(saveFileName));
- //java.util.List ext = resFactory.createExtent(); // MOF way
- //ext.add(this); // MOF way
- Resource mofRes = resFactory.createResource(URI.createURI(saveFileName));
- mofRes.getContents().add(this);
- try
- {
- mofRes.save(EMPTY_MAP);
- } catch (Exception e)
- {
- if (debug)
- {
- System.out.println("Error saving SystemPersistableReferenceManager "+getName() + " to "+saveFile+": " + e.getClass().getName() + ": " + e.getMessage());
- e.printStackTrace();
- }
- throw e;
- }
-
- // if this is the first time we have created this file, we must update Eclipse
- // resource tree to know about it...
- if (!exists || !folder.exists())
- {
- try
- {
- //RSEUIPlugin.logWarning("Calling refreshLocal on project after saving MOF file: " + saveFileName);
- folder.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch(Exception exc)
- {
- System.out.println("Exception doing refreshLocal on project: " + exc.getClass().getName());
- }
- }
- else
- {
- try
- {
- //RSEUIPlugin.logWarning("Calling refreshLocal on project after saving MOF file: " + saveFileName);
- folder.refreshLocal(IResource.DEPTH_ONE, null);
- } catch(Exception exc)
- {
- System.out.println("Exception doing refreshLocal on project: " + exc.getClass().getName());
- }
- }
- */
- }
-
- /**
- * Restore a persisted manager from disk.
- * <p>
- * After restoration, YOU MUST CALL {@link #resolveReferencesAfterRestore() resolveReferencesAfterRestore}
- * This presumes yours subclass has overridden that method!
- * <p>
- * @param folder The folder in which the saved manager exists.
- * @param fileName The unqualified save file name including extension such as .xmi
- * @return The restored object, or null if given file not found. Any other error gives an exception.
- */
- public static IRSEBasePersistableReferenceManager restore(IFolder folder, String fileName)
- throws Exception
- {
- IRSEBasePersistableReferenceManager mgr = new SystemPersistableReferenceManager();
-/*FIXME
- initMOF();
- Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
- String path = folder.getLocation().toOSString();
- String saveFile = addPathTerminator(path)+fileName;
- //ResourceSet resourceSet = // MOF way
- // Resource.Factory.Registry.getResourceSetFactory().makeResourceSet();
- Resource res1 = null;
- try
- {
- // res1 = resourceSet.load(saveFile); MOF way
- Resource.Factory resFactory = reg.getFactory(URI.createURI(saveFile));
- res1 = resFactory.createResource(URI.createURI(saveFile));
- res1.load(EMPTY_MAP);
- }
- catch (java.io.FileNotFoundException e)
- {
- if (debug)
- System.out.println("SystemPersistableReferenceManager file not found: "+saveFile);
- return null;
- }
- catch (Exception e)
- {
- if (debug)
- {
- System.out.println("Error loading SystemPersistableReferenceManager from file: "+saveFile+": " + e.getClass().getName() + ": " + e.getMessage());
- e.printStackTrace();
- }
- throw e;
- }
-
- java.util.List ext1 = res1.getContents();
-
- // should be exactly one...
- Iterator iList = ext1.iterator();
- mgr = (SystemPersistableReferenceManager)iList.next();
-
- if (debug)
- System.out.println("Ok. SystemPersistableReferenceManager "+mgr.getName()+" restored successfully.");
-*/
- return mgr;
- }
-
-
- /**
- * Ensure given path ends with path separator.
- */
- public static String addPathTerminator(String path)
- {
- if (!path.endsWith(File.separator))
- path = path + File.separatorChar;
- //else
- // path = path;
- return path;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setName(String newName)
- {
- name = newName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public List getReferencingObjectList()
- {
- if (referencingObjectList == null)
- {
- referencingObjectList = new ArrayList();
- //FIXME new EObjectContainmentWithInversejava.util.List(SystemPersistableReferencingObject.class, this, ReferencesPackage.SYSTEM_PERSISTABLE_REFERENCE_MANAGER__REFERENCING_OBJECT_LIST, ReferencesPackage.SYSTEM_PERSISTABLE_REFERENCING_OBJECT__PARENT_REFERENCE_MANAGER);
- }
- return referencingObjectList;
- }
-
- //FIXME obsolete?
- public String toStringGen()
- {
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: "); //$NON-NLS-1$
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObject.java
deleted file mode 100644
index 9c9d20910..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObject.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.internal.references;
-
-import org.eclipse.rse.core.references.IRSEPersistableReferencedObject;
-
-/**
- * @see org.eclipse.rse.core.references.IRSEBasePersistableReferenceManager
- */
-public abstract class SystemPersistableReferencedObject extends SystemReferencedObject implements IRSEPersistableReferencedObject {
- /**
- * Constructor.
- */
- public SystemPersistableReferencedObject() {
- super();
- }
-
- /**
- * Return the unique reference name of this object.
- * <p>
- * As required by the {@link org.eclipse.rse.core.references.IRSEPersistableReferencedObject}
- * interface.
- * <p>
- * YOUR SUBCLASS MUST OVERRIDE THIS!
- */
- public String getReferenceName() {
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObjectHelper.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObjectHelper.java
deleted file mode 100644
index 1dcac3cfe..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObjectHelper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.references;
-
-import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
-
-/**
- * This class extends the support for a class that supports being managing by a transient
- * in-memory reference to one which also supports the persistence of such references.
- * To do this, such a referencable class must be able to return a name that is
- * so unique that it can be used after restoration from disk to resolve a pointer to this
- * specific object, in memory.
- */
-public class SystemPersistableReferencedObjectHelper extends SystemReferencedObjectHelper implements IRSEBasePersistableReferencedObject {
-
- private String referenceName;
-
- /**
- * Constructor for SystemPersistableReferencedObjectHelper
- * @param parent the SystemPersistableReferencedObject that uses this helper.
- * @param referenceName The unique name that can be stored to identify this object.
- */
- protected SystemPersistableReferencedObjectHelper(IRSEBasePersistableReferencedObject parent, String referenceName) {
- super(parent);
- setReferenceName(referenceName);
- }
-
- /**
- * @return the unique reference name of this object, as set in the constructor
- */
- public String getReferenceName() {
- return referenceName;
- }
-
- /**
- * Set the unique reference name of this object. Overrides what was set in
- * the constructor. Typically called on rename operation.
- * @param name the name of this particular reference.
- */
- public void setReferenceName(String name) {
- this.referenceName = name;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObject.java
deleted file mode 100644
index 7ff4b0169..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObject.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.references;
-
-import org.eclipse.rse.core.references.IRSEBasePersistableReferenceManager;
-import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
-import org.eclipse.rse.core.references.IRSEPersistableReferencingObject;
-
-/**
- * This class represents an object that references another object in the model.
- * The reference is persistable.
- * <p>
- * @see org.eclipse.rse.core.references.IRSEPersistableReferencingObject
- */
-// DWD Change this name to SystemPersistableReference? Ditto for the interface.
-public abstract class SystemPersistableReferencingObject extends SystemReferencingObject implements IRSEPersistableReferencingObject {
-
- protected String referencedObjectName = null;
- protected IRSEBasePersistableReferenceManager _referenceManager;
-
- /**
- * Create a new referencing object.
- */
- protected SystemPersistableReferencingObject() {
- super();
- }
-
- /**
- * Set the persistable referenced object name
- */
- public void setReferencedObjectName(String newReferencedObjectName) {
- referencedObjectName = newReferencedObjectName;
- }
-
- /**
- * Set the in-memory reference to the master object.
- * This implementation also extracts that master object's name and calls
- * setReferencedObjectName as part of this method call.
- * @see org.eclipse.rse.core.references.IRSEBasePersistableReferencingObject#setReferencedObject(IRSEBasePersistableReferencedObject)
- */
- public void setReferencedObject(IRSEBasePersistableReferencedObject obj) {
- getHelper().setReferencedObject(obj);
- setReferencedObjectName(obj.getReferenceName());
- }
-
- /**
- * Get the persistable referenced object name.
- */
- public String getReferencedObjectName() {
- return referencedObjectName;
- }
-
- /**
- * @return The reference manager for this reference.
- */
- public IRSEBasePersistableReferenceManager getParentReferenceManager() {
- return _referenceManager;
- }
-
- /**
- * Sets the reference manager for this reference. Must be done when this reference is created.
- */
- public void setParentReferenceManager(IRSEBasePersistableReferenceManager newParentReferenceManager) {
- _referenceManager = newParentReferenceManager;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (referencedObjectName: "); //$NON-NLS-1$
- result.append(referencedObjectName);
- result.append(')');
- return result.toString();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObjectHelper.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObjectHelper.java
deleted file mode 100644
index 4aab5dded..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObjectHelper.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.references;
-import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-
-/**
- * This class extends the support for managing a transient in-memory reference
- * to include support for storing a persistable name that uniquely identifies that
- * object.
- */
-public class SystemPersistableReferencingObjectHelper
- extends SystemReferencingObjectHelper
- //implements IRSEPersistableReferencingObject
-{
- private String masterObjectName = null;
- /**
- * Default constructor.
- */
- protected SystemPersistableReferencingObjectHelper(IRSEBaseReferencingObject caller)
- {
- super(caller);
- }
-
- /**
- * Constructor that saves effort of calling setReferencedObject.
- */
- public SystemPersistableReferencingObjectHelper(IRSEBaseReferencingObject caller, IRSEBasePersistableReferencedObject obj)
- {
- this(caller);
- setReferencedObject(obj);
- }
-
- /**
- * Set the object to which we reference. This overload takes an
- * IRSEPersistableReferencedObject so we can query its name for
- * storage purposes.
- */
- public void setReferencedObject(IRSEBasePersistableReferencedObject obj)
- {
- super.setReferencedObject(obj);
- this.masterObjectName = obj.getReferenceName();
- }
-
- /**
- * Return the name uniquely identifying the object we are referencing.
- */
- public String getReferencedObjectName()
- {
- return masterObjectName;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencedObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencedObject.java
deleted file mode 100644
index 11817097a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencedObject.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.references;
-
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.references.IRSEReferencedObject;
-
-/**
- * A class to encapsulate the operations required of an object which
- * supports references to it by other objects (SystemReferencingObject).
- * This type of class needs to support maintaining an in-memory list of
- * all who reference it so that list can be following on delete and
- * rename operations.
- * <p>
- * These references are not persistent. Persistent references are managed
- * by the subclass SystemPersistableReferencedObject.
- * <p>
- * SystemFilter is a known concrete subclass.
- */
-public abstract class SystemReferencedObject extends RSEModelObject implements IRSEReferencedObject {
-
- protected SystemReferencedObjectHelper helper = null;
-
- /**
- * Default constructor. Typically called by EMF factory method.
- */
- protected SystemReferencedObject() {
- helper = new SystemReferencedObjectHelper(this);
- }
-
- // ----------------------------------
- // IRSEReferencedObject methods...
- // ----------------------------------
- /**
- * Add a reference, increment reference count, return new count
- * @param ref the referencing object
- * @return new count of how many referencing objects reference this object.
- */
- public int addReference(IRSEBaseReferencingObject ref) {
- return helper.addReference(ref);
- }
-
- /**
- * Remove a reference, decrement reference count, return new count
- * @param ref the referencing object
- * @return new count of how many referencing objects reference this object.
- */
- public int removeReference(IRSEBaseReferencingObject ref) {
- return helper.removeReference(ref);
- }
-
- /**
- * @return a count of how many referencing objects reference this object.
- */
- public int getReferenceCount() {
- return helper.getReferenceCount();
- }
-
- /**
- * Clear the list of referenced objects.
- */
- public void removeAllReferences() {
- helper.removeAllReferences();
- }
-
- /**
- * @return a list of all referencing objects of this object
- */
- public IRSEBaseReferencingObject[] getReferencingObjects() {
- return helper.getReferencingObjects();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencedObjectHelper.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencedObjectHelper.java
deleted file mode 100644
index 95755d49c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencedObjectHelper.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.references;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.references.IRSEBaseReferencedObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This is a class that implements all the methods in the IRSEReferencedObject.
- * It makes implementing this interface trivial.
- * The easiest use of this class is to subclass it, but since that is not
- * always possible, it is not abstract and hence can be leveraged via containment.
- */
-public class SystemReferencedObjectHelper implements IRSEBaseReferencedObject {
-
- private Vector referencingObjects = new Vector();
- private IRSEBaseReferencedObject parent = null;
-
- /**
- * Constructor for SystemReferencedObjectHelper
- * @param parent the SystemReferencedObject creating this helper
- */
- public SystemReferencedObjectHelper(IRSEBaseReferencedObject parent) {
- this.parent = parent;
- }
-
- /**
- * @see IRSEBaseReferencedObject#addReference(IRSEBaseReferencingObject)
- */
- public int addReference(IRSEBaseReferencingObject ref) {
-// String fromName = getReferencingName(ref);
-// String toName = getReferencedName();
-// System.out.println(MessageFormat.format("Adding reference from {0} to {1}", new Object[] {fromName, toName}));
- referencingObjects.addElement(ref);
- return referencingObjects.size();
- }
-
- private String getReferencedName() {
- String toName = "unknown"; //$NON-NLS-1$
- if (parent instanceof ISystemFilterPool) {
- ISystemFilterPool fp = (ISystemFilterPool) parent;
- toName = fp.getName();
- }
- return toName;
- }
-
- private String getReferencingName(IRSEBaseReferencingObject object) {
- String fromName = "unknown"; //$NON-NLS-1$
- if (object instanceof ISystemFilterPoolReference) {
- ISystemFilterPoolReference fpr = (ISystemFilterPoolReference) object;
- ISystemFilterPoolReferenceManagerProvider provider = fpr.getProvider();
- String prefix = "unknown|unknown|unknown"; //$NON-NLS-1$
- if (provider instanceof ISubSystem) {
- ISubSystem subsystem = (ISubSystem) provider;
- IHost host = subsystem.getHost();
- prefix = host.getAliasName() + "|" + subsystem.getName(); //$NON-NLS-1$
- fromName = prefix + fpr.getName();
- }
- }
- return fromName;
- }
-
- /**
- * @see IRSEBaseReferencedObject#removeReference(IRSEBaseReferencingObject)
- */
- public int removeReference(IRSEBaseReferencingObject ref) {
-// String fromName = getReferencingName(ref);
-// String toName = getReferencedName();
-// System.out.println(MessageFormat.format("Removing reference from {0} to {1}", new Object[] {fromName, toName}));
- boolean found = referencingObjects.removeElement(ref);
- assertThis(!found, "removeReference failed for " + ref); //$NON-NLS-1$
- return referencingObjects.size();
- }
-
- /**
- * @see IRSEBaseReferencedObject#getReferenceCount()
- */
- public int getReferenceCount() {
- return referencingObjects.size();
- }
-
- /**
- * Clear the list of referenced objects.
- */
- public void removeAllReferences() {
- IRSEBaseReferencingObject[] references = getReferencingObjects();
- for (int i = 0; i < references.length; i++) {
- IRSEBaseReferencingObject reference = references[i];
- removeReference(reference);
- }
-// referencingObjects.removeAllElements();
- }
-
- /**
- * @see IRSEBaseReferencedObject#getReferencingObjects()
- */
- public IRSEBaseReferencingObject[] getReferencingObjects() {
- IRSEBaseReferencingObject[] references = new IRSEBaseReferencingObject[referencingObjects.size()];
- referencingObjects.toArray(references);
- return references;
- }
-
- /**
- * Assertion method for debugging purposes. All instances of assertion failure should be removed by
- * release.
- * @param assertion a boolean (usually an expression) that is to be tested
- * @param msg the message printed on System.out
- */
- protected void assertThis(boolean assertion, String msg) {
-// if (!assertion) System.out.println("ASSERTION FAILED IN SystemReferencedObject: " + msg); //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencingObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencingObject.java
deleted file mode 100644
index c0e865043..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencingObject.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.references;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.model.RSEModelResources;
-import org.eclipse.rse.core.references.IRSEBaseReferencedObject;
-import org.eclipse.rse.core.references.IRSEReferencingObject;
-
-
-/**
- * A class to encapsulate the operations required of an object which
- * is merely a reference to another object, something we call a shadow.
- * Such shadows are needed to support a GUI which displays the same
- * object in multiple places. To enable that, it is necessary not to
- * use the same physical object in each UI representation as the UI
- * will only know how to update/refresh the first one it finds.
- * <p>
- * These references are not persistent. Persistent references are managed
- * by the subclass SystemPersistableReferencingObject.
- */
-/**
- * @lastgen class SystemReferencingObjectImpl Impl implements SystemReferencingObject, EObject {}
- */
-public abstract class SystemReferencingObject extends RSEModelObject implements IRSEReferencingObject
-{
- private SystemReferencingObjectHelper helper = null;
- protected boolean referenceBroken = false;
-
- /**
- * Default constructor. Typically called by EMF factory method.
- */
- protected SystemReferencingObject()
- {
- super();
- helper = new SystemReferencingObjectHelper(this);
- }
- /**
- * @see org.eclipse.rse.core.references.IRSEBaseReferencingObject#setReferencedObject(IRSEBaseReferencedObject)
- */
- public void setReferencedObject(IRSEBaseReferencedObject obj)
- {
- helper.setReferencedObject(obj);
- }
-
- /**
- * @see org.eclipse.rse.core.references.IRSEBaseReferencingObject#getReferencedObject()
- */
- public IRSEBaseReferencedObject getReferencedObject()
- {
- return helper.getReferencedObject();
- }
-
- /**
- * @see org.eclipse.rse.core.references.IRSEBaseReferencingObject#removeReference()
- */
- public int removeReference()
- {
- return helper.removeReference();
- }
-
- /**
- * Set to true if this reference is currently broken/unresolved
- */
- public void setReferenceBroken(boolean broken)
- {
- referenceBroken = broken;
- }
- /**
- * Return true if this reference is currently broken/unresolved
- */
- public boolean isReferenceBroken()
- {
- return referenceBroken;
- }
-
- public String getDescription()
- {
- return RSEModelResources.RESID_MODELOBJECTS_REFERENCINGOBJECT_DESCRIPTION;
- }
-
- protected final SystemReferencingObjectHelper getHelper() {
- return helper;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencingObjectHelper.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencingObjectHelper.java
deleted file mode 100644
index 212cdcc79..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemReferencingObjectHelper.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.references;
-
-import org.eclipse.rse.core.references.IRSEBaseReferencedObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-
-/**
- * This is a class that implements all the methods in the IRSEReferencingObject.
- * It makes implementing this interface trivial.
- * The easiest use of this class is to subclass it, but since that is not
- * always possible, it is not abstract and hence can be leveraged via containment.
- */
-public class SystemReferencingObjectHelper {
-
- private IRSEBaseReferencedObject masterObject = null;
- private IRSEBaseReferencingObject caller = null;
-
- /**
- * Default constructor.
- * @param caller the reference that this object is helping.
- */
- public SystemReferencingObjectHelper(IRSEBaseReferencingObject caller) {
- super();
- this.caller = caller;
- }
-
- /**
- * Constructor that saves effort of calling setReferencedObject.
- * @param caller the reference that this object is helping.
- * @param obj the object to which this reference will point.
- */
- public SystemReferencingObjectHelper(IRSEBaseReferencingObject caller, IRSEBaseReferencedObject obj) {
- this(caller);
- setReferencedObject(obj);
- }
-
- /**
- * Set the object to which this reference will point.
- * Stores the reference in memory, replacing whatever was there.
- * Also calls obj.addReference(caller);
- * @param obj the object to which this reference will point.
- */
- public void setReferencedObject(IRSEBaseReferencedObject obj) {
- this.masterObject = obj;
- if (obj != null) obj.addReference(caller);
- }
-
- /**
- * Get the object which is referenced. May be null if the reference is not set or has not been resolved.
- * @return the referenced object.
- */
- public IRSEBaseReferencedObject getReferencedObject() {
- return masterObject;
- }
-
- /**
- * Removes this reference from the referenced object and clears this reference.
- * Also, nulls out our memory reference.
- * @return new reference count of master object
- */
- public int removeReference() {
- int newCount = 0;
- IRSEBaseReferencedObject masterObject = getReferencedObject();
- if (masterObject != null) newCount = masterObject.removeReference(caller);
- masterObject = null;
- return newCount;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/.classpath b/rse/plugins/org.eclipse.rse.dstore.security/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/.cvsignore b/rse/plugins/org.eclipse.rse.dstore.security/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/.project b/rse/plugins/org.eclipse.rse.dstore.security/.project
deleted file mode 100644
index a26f8a7e3..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.dstore.security</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.dstore.security/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.dstore.security/META-INF/MANIFEST.MF
deleted file mode 100644
index 830c5bce0..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.dstore.security; singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.rse.dstore.security.UniversalSecurityPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.dstore.core,
- org.eclipse.core.resources,
- org.eclipse.rse.subsystems.files.dstore,
- org.eclipse.rse.subsystems.shells.dstore,
- org.eclipse.rse.subsystems.processes.dstore,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.subsystems.processes.core,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.ui
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/about.html b/rse/plugins/org.eclipse.rse.dstore.security/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/build.properties b/rse/plugins/org.eclipse.rse.dstore.security/build.properties
deleted file mode 100644
index 506cac9fd..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .,\
- META-INF/
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/icons/full/obj16/certif_file.gif b/rse/plugins/org.eclipse.rse.dstore.security/icons/full/obj16/certif_file.gif
deleted file mode 100644
index 7d2dbe477..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/icons/full/obj16/certif_file.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/icons/full/wizban/import_cert_wiz.gif b/rse/plugins/org.eclipse.rse.dstore.security/icons/full/wizban/import_cert_wiz.gif
deleted file mode 100644
index 528a05b5c..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/icons/full/wizban/import_cert_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/plugin.properties b/rse/plugins/org.eclipse.rse.dstore.security/plugin.properties
deleted file mode 100644
index 887a5427b..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/plugin.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-
-pluginName = RSE DStore SSL Support
-providerName = Eclipse.org
-
-KeystoreProviderName = Universal Keystore Provider
-PreferencePage.SSL = SSL
-PropertyPage.ServerConnectionSecurity = Server Connection Security \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/plugin.xml b/rse/plugins/org.eclipse.rse.dstore.security/plugin.xml
deleted file mode 100644
index 2e506962a..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/plugin.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%PreferencePage.SSL"
- category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
- class="org.eclipse.rse.dstore.security.preference.UniversalSecurityPreferencePage"
- id="org.eclipse.rse.dstore.security.preference.UniversalSecurityPreferencePage">
- </page>
- </extension>
-
- <extension point="org.eclipse.rse.ui.keystoreProviders">
- <keystoreProvider
- id="org.eclipse.rse.dstore.security.UniversalKeystoreProvider"
- name="%KeystoreProviderName"
- class="org.eclipse.rse.dstore.security.UniversalKeystoreProvider">
- </keystoreProvider>
- </extension>
-
- <!-- ============================================ -->
- <!-- Define Workbench Properties Pages -->
- <!-- ============================================ -->
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- objectClass="org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem"
- name="%PropertyPage.ServerConnectionSecurity"
- class="org.eclipse.rse.ui.propertypages.ServerConnectionSecurityPropertyPage"
- id="org.eclipse.rse.connectionsecurity.PropertyPage">
- <filter name="serverLaunchPP" value="true"/>
- </page>
- <page
- objectClass="org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem"
- name="%PropertyPage.ServerConnectionSecurity"
- class="org.eclipse.rse.ui.propertypages.ServerConnectionSecurityPropertyPage"
- id="org.eclipse.rse.connectionsecurity.PropertyPage2">
- <filter name="serverLaunchPP" value="true"/>
- </page>
- <page
- objectClass="org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem"
- name="%PropertyPage.ServerConnectionSecurity"
- class="org.eclipse.rse.ui.propertypages.ServerConnectionSecurityPropertyPage"
- id="org.eclipse.rse.connectionsecurity.PropertyPage3">
- <filter name="serverLaunchPP" value="true"/>
- </page>
- </extension>
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/ImageRegistry.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/ImageRegistry.java
deleted file mode 100644
index 6f4d63ba5..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/ImageRegistry.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.dstore.security;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-
-public class ImageRegistry {
-
- private static URL fgIconBaseURL= null;
-
- static {
- try {
- fgIconBaseURL= new URL(UniversalSecurityPlugin.getDefault().getBundle().getEntry("/"), "icons/full/" ); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (MalformedURLException e) {
- UniversalSecurityPlugin.getDefault().log(e);
- }
- }
-
- /*
- * Set of predefined Image Descriptors.
- * the following String are all $NON-NLS-1$
- */
- public static final String T_OBJ = "obj16"; //$NON-NLS-1$
- public static final String T_WIZBAN = "wizban"; //$NON-NLS-1$
-
- public static final String IMG_CERTIF_FILE = "certif_file.gif"; //$NON-NLS-1$
- public static final String IMG_WZ_IMPORT_CERTIF = "import_cert_wiz.gif";//"newjprj_wiz.gif";//$NON-NLS-1$
-
- public static final ImageDescriptor DESC_IMG_CERTIF_FILE = createManaged(T_OBJ,IMG_CERTIF_FILE);
- public static final ImageDescriptor DESC_IMG_WZ_IMPORT_CERTIF = createManaged(T_WIZBAN,IMG_WZ_IMPORT_CERTIF);
-
- protected static HashMap _images;
- protected static HashMap _imageDescriptors;
-
- public static Image getImage(String name)
- {
- return (Image)_images.get(name);
- }
-
-
- /**
- * Insert the method's description here.
- * Creation date: (2/16/2001 4:57:29 PM)
- * @return ImageDescriptor
- * @param name java.lang.String
- */
- public static ImageDescriptor getImageDescriptor(String name) {
-
- return (ImageDescriptor) _imageDescriptors.get(name);
- }
-
- private static ImageDescriptor createManaged(String prefix, String name) {
- try {
- ImageDescriptor result =
- ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
-
- if (_images == null || _imageDescriptors == null) {
- _images = new HashMap();
- _imageDescriptors = new HashMap();
- }
-
- _imageDescriptors.put(name, result);
- _images.put(name, result.createImage());
- return result;
-
- } catch (MalformedURLException e) {
- return ImageDescriptor.getMissingImageDescriptor();
- }
- }
-
- public static void setImageDescriptors(
- IAction action,
- String type,
- String relPath) {
- try {
- ImageDescriptor id =
- ImageDescriptor.createFromURL(makeIconFileURL("d" + type, relPath)); //$NON-NLS-1$
- //$NON-NLS-1$
- if (id != null) {
- action.setDisabledImageDescriptor(id);
- }
- } catch (MalformedURLException e) {
- }
-
- try {
- ImageDescriptor id =
- ImageDescriptor.createFromURL(makeIconFileURL("c" + type, relPath));//$NON-NLS-1$
- if (id != null) {
- action.setHoverImageDescriptor(id);
- }
- } catch (MalformedURLException e) {
- }
-
- action.setImageDescriptor(create("e" + type, relPath)); //$NON-NLS-1$
- }
-
- private static URL makeIconFileURL(String prefix, String name)
- throws MalformedURLException {
- if (fgIconBaseURL == null)
- throw new MalformedURLException();
-
- StringBuffer buffer;
- if (prefix != null) {
- buffer = new StringBuffer(prefix);
- buffer.append('/');
- buffer.append(name);
- } else {
- buffer = new StringBuffer(name);
- }
- return new URL(fgIconBaseURL, buffer.toString());
- }
-
- private static ImageDescriptor create(String prefix, String name) {
- try {
- return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
- } catch (MalformedURLException e) {
- return ImageDescriptor.getMissingImageDescriptor();
- }
- }
-
- public static void shutdown() {
- if (_images == null)
- return;
-
- for (Iterator e = _images.values().iterator(); e.hasNext();) {
- Object next = e.next();
- if (next instanceof Image && !((Image) next).isDisposed()) {
- ((Image) next).dispose();
- }
- }
-
- _images.clear();
- _images = null;
- _imageDescriptors.clear();
- _imageDescriptors = null;
- }
-} \ 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
deleted file mode 100644
index b70855761..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalKeystoreProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security;
-
-
-import java.util.List;
-
-import org.eclipse.rse.core.comm.ISystemKeystoreProvider;
-import org.eclipse.rse.dstore.security.wizards.SystemImportCertAction;
-import org.eclipse.swt.widgets.Display;
-
-
-public class UniversalKeystoreProvider implements ISystemKeystoreProvider
-{
- public class ImportCertificateRunnable implements Runnable
- {
- private List _certificates;
- private ISystemKeystoreProvider _provider;
- private boolean _wasCancelled = false;
- private String _systemName;
-
- public ImportCertificateRunnable(ISystemKeystoreProvider provider, List certs, String systemName)
- {
- _certificates = certs;
- _provider = provider;
- _systemName = systemName;
- }
-
- public boolean wasCancelled()
- {
- return _wasCancelled;
- }
-
- public void run()
- {
- SystemImportCertAction importAction = new SystemImportCertAction(_provider, _certificates, _systemName);
- importAction.run();
- _wasCancelled = importAction.wasCancelled();
- }
- }
-
- public String getKeyStorePassword()
- {
- return UniversalSecurityPlugin.getKeyStorePassword();
- }
-
- public String getKeyStorePath()
- {
- return UniversalSecurityPlugin.getKeyStoreLocation();
- }
-
- public boolean importCertificates(List certs, String systemName)
- {
- Display display = Display.getDefault();
- ImportCertificateRunnable impRun = new ImportCertificateRunnable(this, certs, systemName);
- display.syncExec(impRun);
-
- return !impRun.wasCancelled();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityPlugin.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityPlugin.java
deleted file mode 100644
index 376c5d677..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityPlugin.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.dstore.security;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-public class UniversalSecurityPlugin extends AbstractUIPlugin
-{
- private final static String KEYSTORE = "dstorekeystore.dat"; //$NON-NLS-1$
- private static UniversalSecurityPlugin inst;
- private static ResourceBundle aResourceBundle;
- public static final String PLUGIN_ID = "org.eclipse.rse.dstore.security"; //$NON-NLS-1$
-
- public UniversalSecurityPlugin() {
- if (inst == null)
- inst = this;
- }
-
- public static UniversalSecurityPlugin getDefault() {
- return inst;
- }
-
- public static String getPluginId() {
- return PLUGIN_ID;
- }
-
- public static ResourceBundle getResourceBundle() {
- if(aResourceBundle == null)
- {
- try {
- aResourceBundle = Platform.getResourceBundle(Platform.getBundle(PLUGIN_ID));
- } catch (Exception e) {
- aResourceBundle = null;
- }
- }
- return aResourceBundle;
- }
-
- public static String getString(String key) {
- try {
- return getResourceBundle().getString(key);
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
-
-
- public static String getKeyStoreLocation() {
-
- Bundle bundle = Platform.getBundle(PLUGIN_ID);
- return Platform.getStateLocation(bundle).append(KEYSTORE).toOSString();
- }
-
- public static String getKeyStorePassword()
- {
- return "dstore"; //$NON-NLS-1$
- }
-
- public static String getWorkspaceName(){
- IPath workspace = Platform.getLocation();
- int nr = workspace.segmentCount();
- String workspaceName = workspace.segment(nr - 1);
- return workspaceName;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
-
- super.stop(context);
-
- savePluginPreferences();
- ImageRegistry.shutdown();
- }
-
- public static Shell getActiveWorkbenchShell() {
- return getActiveWorkbenchWindow().getShell();
- }
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- return getDefault().getWorkbench().getActiveWorkbenchWindow();
- }
-
- public void log(IStatus status) {
- getLog().log(status);
- }
-
- public void log(Throwable e) {
- log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Error", e)); //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityProperties.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityProperties.java
deleted file mode 100644
index 3f2a25ae4..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityProperties.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security;
-
-
-import org.eclipse.osgi.util.NLS;
-
-
-
-public class UniversalSecurityProperties extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.dstore.security.UniversalSecurityProperties";//$NON-NLS-1$
-
-
- public static String RESID_SECURITY_CERTIFICATE_PROP_TITLE;
- public static String RESID_SECURITY_VALIDITY_PERIOD;
- public static String RESID_SECURITY_SERIAL_NUMBER_LBL ;
- public static String RESID_SECURITY_CERTIF_VERSION_LBL;
- public static String RESID_SECURITY_PROP_ALIAS_LBL;
- public static String RESID_SECURITY_ISSUED_TO_LBL;
- public static String RESID_SECURITY_ISSUED_BY_LBL;
- public static String RESID_SECURITY_VALIDITY_LBL;
- public static String RESID_SECURITY_SIGALG_LBL;
- public static String RESID_SECURITY_ALGORITHM_LBL;
- public static String RESID_SECURITY_SIGNATURE_LBL;
- public static String RESID_SECURITY_SUBJECT_LBL;
- public static String RESID_SECURITY_KEY_LBL;
- public static String RESID_SECURITY_PUBLIC_KEY_LBL;
- public static String RESID_SECURITY_KEY_ENTRY;
- public static String RESID_SECURITY_ADD_CERT_DLG_TITLE;
- public static String RESID_SECURITY_RENAME_CERT_DLG_TITLE;
- public static String RESID_SECURITY_CERTIFICATE_ALIAS;
- public static String RESID_SECURITY_SEC_MSG;
- public static String RESID_SECURITY_TRUSTED_CERTIFICATE;
- public static String RESID_SECURITY_CERTIFICATE_FILE;
- public static String RESID_SECURITY_BROWSE;
- public static String RESID_SECURITY_ADD_LBL;
- public static String RESID_SECURITY_REMOVE_LBL;
- public static String RESID_SECURITY_RENAME_LBL;
- public static String RESID_SECURITY_PREF_ALIAS_NAME;
- public static String RESID_SECURITY_PREF_ISSUED_TO;
- public static String RESID_SECURITY_PREF_ISSUED_FROM;
- public static String RESID_SECURITY_PREF_EXPIRES;
-
- public static String RESID_SECURITY_KEY_IO_ERROR_;
- public static String RESID_SECURITY_KEY_LOAD_ERROR_;
- public static String RESID_SECURITY_ALGORITHM_ERROR_;
- public static String RESID_SECURITY_KEY_MANAG_ERROR_;
- public static String RESID_SECURITY_KEY_STORE_ERROR_;
- public static String RESID_SECURITY_UNREC_KEY_ERROR_;
- public static String RESID_SECURITY_PWD_REQ_INFO_;
- public static String RESID_SECURITY_LOGIN_FAILED_INFO_;
- public static String RESID_SECURITY_KEYSTORE_SAVE_ERROR_;
- public static String RESID_SECURITY_IO_SAVE_ERROR_;
- public static String RESID_SECURITY_CERTIFICATE_STORE_ERROR_;
- public static String RESID_SECURITY_UNINIT_KEYSTORE_ERROR_;
- public static String RESID_SECURITY_INITIALIZE_ERROR_;
- public static String RESID_SECURITY_SECURITY_PROVIDER_ERROR_;
- public static String RESID_SECURITY_LOAD_KEYSTORE_ERROR_;
- public static String RESID_SECURITY_CERTIFICATE_EXC_;
- public static String RESID_SECURITY_LOAD_IO_EXC_;
- public static String RESID_SECURITY_CERTIFICATE_LOAD_EXC_;
- public static String RESID_SECURITY_PREF_SEC_DESCRIPTION;
- public static String RESID_SECURITY_PROPERTIES_LBL;
-
- public static String RESID_SECURITY_TRUST_WIZ_ALIAS_TITLE;
- public static String RESID_SECURITY_TRUST_WIZ_ALIAS_DESC;
-
- public static String RESID_SECURITY_TRUST_WIZ_CERTIFICATE_TITLE;
- public static String RESID_SECURITY_TRUST_WIZ_CERTIFICATE_DESC;
-
- public static String RESID_SECURITY_TRUST_IMPORT_CERTIFICATE_WIZARD;
- public static String RESID_SECURITY_CERTIFICATE_INFORMATION;
-
- static
- {
- // load message values from bundle file
- initializeMessages(BUNDLE_NAME, UniversalSecurityProperties.class);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityProperties.properties b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityProperties.properties
deleted file mode 100644
index 2952d5335..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalSecurityProperties.properties
+++ /dev/null
@@ -1,79 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
- RESID_SECURITY_CERTIFICATE_PROP_TITLE = Certificate Properties
- RESID_SECURITY_VALIDITY_PERIOD = Valid from %1 to %2
- RESID_SECURITY_SERIAL_NUMBER_LBL = Serial number:
- RESID_SECURITY_CERTIF_VERSION_LBL = Version:
- RESID_SECURITY_PROP_ALIAS_LBL = Alias Name:
- RESID_SECURITY_ISSUED_TO_LBL = Issued To:
- RESID_SECURITY_ISSUED_BY_LBL = Issued By:
- RESID_SECURITY_VALIDITY_LBL = Validity:
- RESID_SECURITY_SIGALG_LBL = Signature Algorithm:
- RESID_SECURITY_ALGORITHM_LBL = Algorithm:
- RESID_SECURITY_SIGNATURE_LBL = Signature:
- RESID_SECURITY_SUBJECT_LBL = Subject:
- RESID_SECURITY_KEY_LBL = Key:
- RESID_SECURITY_PUBLIC_KEY_LBL = Public key:
- RESID_SECURITY_KEY_ENTRY = Key
- RESID_SECURITY_ADD_CERT_DLG_TITLE = Add Certificate
- RESID_SECURITY_RENAME_CERT_DLG_TITLE = Rename Certificate
- RESID_SECURITY_CERTIFICATE_ALIAS = Alias Name:
- RESID_SECURITY_SEC_MSG = Security Message
- RESID_SECURITY_TRUSTED_CERTIFICATE = Trusted Certificate
- RESID_SECURITY_CERTIFICATE_FILE = Security Certificate File:
- RESID_SECURITY_BROWSE = Browse...
- RESID_SECURITY_ADD_LBL = Add...
- RESID_SECURITY_REMOVE_LBL = Remove
- RESID_SECURITY_RENAME_LBL = Rename...
- RESID_SECURITY_PREF_ALIAS_NAME = Alias
- RESID_SECURITY_PREF_ISSUED_TO = Issued To
- RESID_SECURITY_PREF_ISSUED_FROM = Issued By
- RESID_SECURITY_PREF_EXPIRES = Expiration Date
-
- RESID_SECURITY_KEY_IO_ERROR_ = File not found \n%1.
- RESID_SECURITY_KEY_LOAD_ERROR_ = One or more certificates in the\n%1\nkey store could not be loaded.
- RESID_SECURITY_ALGORITHM_ERROR_ = The algorithm used to check the integrity of the key store\n%1\ncannot be found.
- RESID_SECURITY_KEY_MANAG_ERROR_ = Key management exception, for operations dealing with key management in\n%1.
- RESID_SECURITY_KEY_STORE_ERROR_ = Key store exception, for operations dealing with key store in\n%1.
- RESID_SECURITY_UNREC_KEY_ERROR_ = Unrecoverable key exception for operations dealing with key store in\n%1.
- RESID_SECURITY_PWD_REQ_INFO_ = This is a secure connection, password authentication is required.
- RESID_SECURITY_LOGIN_FAILED_INFO_ = Login failed, password authentication is required.
- RESID_SECURITY_KEYSTORE_SAVE_ERROR_ = Unable to persist key store.
- RESID_SECURITY_IO_SAVE_ERROR_ = A input-output exception occurred while saving key store \n%1.
- RESID_SECURITY_CERTIFICATE_STORE_ERROR_ = One or more certificates in the\n%1\nkey store could not be stored.
- RESID_SECURITY_UNINIT_KEYSTORE_ERROR_ = Keystore %1 \nhas not been initialized.
- RESID_SECURITY_INITIALIZE_ERROR_ = Unable to initialize key store \n%1.
- RESID_SECURITY_SECURITY_PROVIDER_ERROR_ = Requested security provider not available.
- RESID_SECURITY_LOAD_KEYSTORE_ERROR_ = Failed to load key store.
- RESID_SECURITY_CERTIFICATE_EXC_ = A certificate exception occurred while loading the file\n%1
- RESID_SECURITY_LOAD_IO_EXC_ = A input-output exception occurred while loading the file\n%1
- RESID_SECURITY_CERTIFICATE_LOAD_EXC_ = Unable to load certificate.
- RESID_SECURITY_PREF_SEC_DESCRIPTION = Create, remove or edit Security Certificate definitions.
- RESID_SECURITY_PROPERTIES_LBL = Properties...
-
- RESID_SECURITY_TRUST_WIZ_CERTIFICATE_TITLE = Untrusted Certificate
- RESID_SECURITY_TRUST_WIZ_CERTIFICATE_DESC = An untrusted certificate has been received from host.\n If you want to start trusting this certificate, continue to the next page.
-
- RESID_SECURITY_TRUST_WIZ_ALIAS_TITLE = Certificate Alias
- RESID_SECURITY_TRUST_WIZ_ALIAS_DESC = Specify an alias to use when referencing the new certificate.
-
- RESID_SECURITY_TRUST_IMPORT_CERTIFICATE_WIZARD = Import Host Certificate
- RESID_SECURITY_CERTIFICATE_INFORMATION = Certificate Information:
- \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertPropertiesDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertPropertiesDialog.java
deleted file mode 100644
index 45337440b..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertPropertiesDialog.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.dstore.security.preference;
-
-
-import org.eclipse.rse.dstore.security.UniversalSecurityPlugin;
-import org.eclipse.rse.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.dstore.security.widgets.CertificatePropertiesForm;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-
-public class CertPropertiesDialog extends SystemPromptDialog
-{
- private Object _cert;
-
- public CertPropertiesDialog(Shell parentShell, Object cert)
- {
- super(parentShell, UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_PROP_TITLE));
- _cert = cert;
- }
-
-
-
- public Control getInitialFocusControl()
- {
- return getOkButton();
- }
-
- protected Control createInner(Composite parent)
- {
- CertificatePropertiesForm form = new CertificatePropertiesForm(getShell(), _cert, true);
- return form.createContents(parent);
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableContentProvider.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableContentProvider.java
deleted file mode 100644
index 049210b8e..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableContentProvider.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class CertTableContentProvider implements IStructuredContentProvider
-{
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object element) {
- if (element instanceof ArrayList)
- return ((ArrayList)element).toArray();
-
- return new Object[0];
- }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableLabelProvider.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableLabelProvider.java
deleted file mode 100644
index 3ed93c687..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableLabelProvider.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-
-
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-
-
-public class CertTableLabelProvider
- extends LabelProvider
- implements ITableLabelProvider
- {
-
- public Image getColumnImage(Object element, int columnIndex)
- {
- if (columnIndex == 0)
- {
- if (element instanceof Element)
- {
- return ((Element)element).getImage();
- }
- }
- return null;
- }
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object element, int columnIndex)
- {
- if (element instanceof Element)
- {
- X509CertificateElement myTableElement = (X509CertificateElement) element;
-
- switch (columnIndex)
- {
- case 0: // alias
- return myTableElement.getAlias();
- case 1: // issued to
- {
- String name = myTableElement.getSubjectName();
- if (name == null || name.length() == 0)
- {
- name = myTableElement.getSubjectUnit();
- if (name == null || name.length() == 0)
- {
- name = myTableElement.getSubjectOrg();
- }
- }
- return name;
- }
- case 2: // issuer
- {
- String name = myTableElement.getIssuerName();
- if (name == null || name.length() == 0)
- {
- name = myTableElement.getIssuerUnit();
- if (name == null || name.length() == 0)
- {
- name = myTableElement.getIssuerOrg();
- }
- }
-
- return name;
- }
- case 3: // expires
- return myTableElement.getNotAfter();
-
- default:
- break;
- }
- }
- return ""; //$NON-NLS-1$
- }
-
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableSorter.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableSorter.java
deleted file mode 100644
index a081f0614..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/CertTableSorter.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.TableColumn;
-
-public class CertTableSorter
-extends ViewerSorter
-{
- private final static String ASC_SYMBOL = "^"; //$NON-NLS-1$
- private final static String DESC_SYMBOL = "."; //$NON-NLS-1$
-
- private TableViewer tableViewer;
- private int currentColumn;
- private boolean asc;
- private boolean addDirectionSymbol;
-
- private SelectionListener headerListener;
-
- public CertTableSorter(TableViewer tableViewer, int defaultColumn, boolean asc, boolean addDirectionSymbol, boolean addHeaderListener)
- {
- this.tableViewer = tableViewer;
- this.addDirectionSymbol = addDirectionSymbol;
-
- setSort(defaultColumn, asc);
-
- tableViewer.setSorter(this);
- if(addHeaderListener)
- addColumnHeaderListeners();
- }
-
- public static void setTableSorter(TableViewer tableViewer, int defaultColumn, boolean asc)
- {
- new CertTableSorter(tableViewer, defaultColumn, asc, false, true);
- }
-
- private void initializeHeaderListener()
- {
- headerListener = new SelectionListener()
- {
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- String text = null;
-
- if(currentColumn >= 0)
- {
- TableColumn currentTableColumn = tableViewer.getTable().getColumn(currentColumn);
- if(addDirectionSymbol && (currentTableColumn != null))
- {
- text = currentTableColumn.getText();
- if((text != null) && (text.startsWith(ASC_SYMBOL) || text.startsWith(DESC_SYMBOL)))
- {
- text = text.substring(1);
- currentTableColumn.setText(text);
- }
- }
- }
-
- TableColumn tableColumn = (TableColumn)e.widget;
- text = tableColumn.getText();
-
- int index = tableViewer.getTable().indexOf(tableColumn);
- if(index == currentColumn)
- {
- asc = !asc;
- }
- else
- {
- asc = true;
- currentColumn = index;
- }
-
- if(addDirectionSymbol && (text != null))
- {
- if(asc)
- text = ASC_SYMBOL + text;
- else
- text = DESC_SYMBOL + text;
-
- tableColumn.setText(text);
- }
-
- tableViewer.getTable().setRedraw(false);
- tableViewer.refresh();
- tableViewer.getTable().setRedraw(true);
- }
- };
- }
-
- public void addColumnHeaderListeners()
- {
- for(int i=0, length=tableViewer.getTable().getColumnCount(); i<length; i++)
- {
- TableColumn column = tableViewer.getTable().getColumn(i);
-
- column.removeSelectionListener(getHeaderListener());
- column.addSelectionListener(getHeaderListener());
- }
- }
-
- public void setSort(int currentColumn)
- {
- this.currentColumn = currentColumn;
- }
-
- public void setSort(int currentColumn, boolean asc)
- {
- setSort(currentColumn);
- setSort(asc);
- }
- public void setSort(boolean asc)
- {
- this.asc = asc;
- }
-
- public int getCurrentColumn()
- {
- return currentColumn;
- }
-
- public SelectionListener getHeaderListener()
- {
- if(headerListener == null)
- initializeHeaderListener();
-
- return headerListener;
- }
-
- public boolean isAsc()
- {
- return asc;
- }
-
- public int compare(Viewer viewer, Object e1, Object e2)
- {
- if(viewer != tableViewer)
- return super.compare(viewer, e1, e2);
-
- int ret = compareAsc(e1, e2);
- return (asc?ret:-1*ret);
- }
-
- protected int compareAsc(Object e1, Object e2)
- {
- int defaultRet = super.compare(tableViewer, e1, e2);
-
- Object o = tableViewer.getLabelProvider();
- if((o == null) || (!(o instanceof ITableLabelProvider)))
- return defaultRet;
-
- ITableLabelProvider labelProvider = (ITableLabelProvider)o;
- String value1 = labelProvider.getColumnText(e1, currentColumn);
- String value2 = labelProvider.getColumnText(e2, currentColumn);
-
- if(value1 == null)
- return -1;
-
- if(value2 == null)
- return 1;
-
- return compareAsc(value1, value2);
- }
-
- protected int compareAsc(String value1, String value2)
- {
- return value1.compareToIgnoreCase(value2);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/Element.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/Element.java
deleted file mode 100644
index 3a8965187..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/Element.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-
-import org.eclipse.rse.dstore.security.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-
-
-
-public abstract class Element
-{
- String _alias;
- Object _value;
-
- public Element(String alias, String value)
- {
- this._alias = alias;
- this._value = value;
- }
-
- public String getAlias()
- {
- return _alias;
- }
-
- public void setAlias(String text)
- {
- this._alias = text;
- }
-
- public Image getImage()
- {
- return ImageRegistry.getImage(ImageRegistry.IMG_CERTIF_FILE);
- }
-
- public abstract String getType();
- public abstract String getAlgorithm();
- public abstract String getFormat();
- public abstract Object getCert();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/KeyElement.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/KeyElement.java
deleted file mode 100644
index e2c2baad6..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/KeyElement.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-
-
-import java.security.Key;
-
-import org.eclipse.rse.dstore.security.ImageRegistry;
-import org.eclipse.rse.dstore.security.UniversalSecurityPlugin;
-import org.eclipse.rse.dstore.security.UniversalSecurityProperties;
-import org.eclipse.swt.graphics.Image;
-
-
-
-public class KeyElement extends Element
-{
- private Key _key;
- public KeyElement(String alias, String value, Key key)
- {
- super(alias, value);
- _key = key;
- }
-
- public String getType()
- {
- return UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEY_ENTRY);
- }
-
- public String getAlgorithm()
- {
- return _key.getAlgorithm();
- }
-
- public String getFormat()
- {
- return _key.getFormat();
- }
-
- public Image getImage()
- {
- return org.eclipse.rse.dstore.security.ImageRegistry.getImage(ImageRegistry.IMG_CERTIF_FILE);
- }
-
- public Object getCert()
- {
- return _key;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/KeyPropertiesDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/KeyPropertiesDialog.java
deleted file mode 100644
index 747bcd070..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/KeyPropertiesDialog.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-
-import org.eclipse.swt.widgets.Shell;
-
-public class KeyPropertiesDialog extends CertPropertiesDialog
-{
- public KeyPropertiesDialog(Shell parentShell, KeyElement element)
- {
- super(parentShell, element.getCert());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/NewCertDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/NewCertDialog.java
deleted file mode 100644
index a9410975a..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/NewCertDialog.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.security.KeyStoreException;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-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.dstore.security.widgets.CertificateForm;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-
-public class NewCertDialog extends SystemPromptDialog implements Listener
-{
-
- /**
- *
- */
- private final UniversalSecurityPreferencePage page;
- private CertificateForm _certForm;
- private Certificate _certificate;
- private Shell _shell;
-
- public NewCertDialog(UniversalSecurityPreferencePage page, Shell shell){
- super(shell,UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_ADD_CERT_DLG_TITLE) );
- this.page = page;
- _shell = shell;
- }
-
- public Control getInitialFocusControl()
- {
- return _certForm.getInitialFocusControl();
- }
-
- protected Control createInner(Composite parent)
- {
- Composite content = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- GridData data = GridUtil.createFill();
- layout.numColumns = 1;
- content.setLayout(layout);
- content.setLayoutData(data);
-
- _certForm = new CertificateForm(_shell, getMessageLine());
- _certForm.createContents(content);
- _certForm.registerListener(this);
- return content;
- }
-
- protected Control createButtonBar(Composite parent)
- {
- Control control = super.createButtonBar(parent);
-
- getOkButton().setEnabled(false);
- return control;
- }
-
- protected boolean processOK(){
-
- try{
- _certificate = _certForm.loadCertificate(this.page._keyStore);
- }
- catch(FileNotFoundException e){
-
- String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEY_IO_ERROR_);
- text = StringModifier.change(text, "%1", _certForm.getPath()); //$NON-NLS-1$
- String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_);
-
- Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,e);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(),UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_SEC_MSG), msg,err);
- return false;
-
- }
- catch(IOException e){
-
- String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_LOAD_IO_EXC_);
- text = StringModifier.change(text, "%1", _certForm.getPath()); //$NON-NLS-1$
-
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin.getKeyStoreLocation()); //$NON-NLS-1$
- String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_);
-
- Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,e);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(),UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_SEC_MSG), msg,err);
- return false;
-
- }
- catch(CertificateException exc){
-
- String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_EXC_);
- text = StringModifier.change(text, "%1", _certForm.getPath()); //$NON-NLS-1$
-
- String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_);
-
- Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,exc);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(),UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_SEC_MSG), msg,err);
- return false;
-
- }
- catch(KeyStoreException exc){
- String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEY_STORE_ERROR_);
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin.getKeyStoreLocation()); //$NON-NLS-1$
- String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_);
-
- Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,exc);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(),UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_SEC_MSG), msg,err);
- return false;
- }
-
- if (_certificate instanceof X509Certificate)
- {
- X509CertificateElement elem = new X509CertificateElement(_certForm.getAliasName(), UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_TRUSTED_CERTIFICATE), (X509Certificate)_certificate);
- this.page._tableItems.add(elem);
- }
-
- return true;
- }
-
- public void handleEvent(Event e){
- getButton(IDialogConstants.OK_ID).setEnabled(_certForm.validateDialog());
- }
-
-
- public Certificate getCertificate(){
- return _certificate;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/RenameCertDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/RenameCertDialog.java
deleted file mode 100644
index 29e920231..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/RenameCertDialog.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.dstore.security.preference;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-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.ui.dialogs.SystemPromptDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-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;
-
-public class RenameCertDialog extends SystemPromptDialog implements Listener{
-
-
- private Text txtName;
- String newAlias;
- private String oldAlias;
-
- public RenameCertDialog(UniversalSecurityPreferencePage page, Shell shell, String oldValue)
- {
- super(shell, UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_RENAME_CERT_DLG_TITLE));
- oldAlias = oldValue;
- }
-
- public Control getInitialFocusControl()
- {
- return txtName;
- }
-
- protected Control createInner(Composite parent)
- {
-
- Composite content = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- GridData data = GridUtil.createFill();
- data.widthHint = 350;
- layout.numColumns = 2;
- content.setLayout(layout);
- content.setLayoutData(data);
-
- Label lblName = new Label(content, SWT.NONE);
- lblName.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_ALIAS));
-
- txtName = new Text(content, SWT.BORDER);
- txtName.setText(oldAlias);
- txtName.selectAll();
- txtName.addListener(SWT.Modify, this);
-
- data = GridUtil.createHorizontalFill();
- data.widthHint = 200;
- txtName.setLayoutData(data);
-
- return content;
- }
-
- private void validateDialog(){
- if(txtName.getText().trim().length()==0)
- getButton(IDialogConstants.OK_ID).setEnabled(false);
- else
- getButton(IDialogConstants.OK_ID).setEnabled(true);
- }
-
- public void handleEvent(Event e){
- if(e.widget.equals(txtName))
- validateDialog();
- }
-
- protected Control createButtonBar(Composite parent) {
- Control control = super.createButtonBar(parent);
- validateDialog();
- return control;
-
- }
-
- public String getNewAlias()
- {
- return newAlias;
- }
-
- protected boolean processOK()
- {
- newAlias = txtName.getText();
- return super.processOK();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 14a8d41ff..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java
+++ /dev/null
@@ -1,532 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-
-
-import java.io.IOException;
-import java.security.Key;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.UnrecoverableKeyException;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ColumnPixelData;
-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.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;
-import org.eclipse.swt.events.SelectionListener;
-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.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-public class UniversalSecurityPreferencePage extends PreferencePage implements
- IWorkbenchPreferencePage, Listener, SelectionListener
-{
-
- private TableViewer _viewer;
-
- ArrayList _tableItems = new ArrayList();
-
- private Button _addButton;
-
- private Button _removeButton;
-
- private Button _renameButton;
-
- private Button _propertiesButton;
-
- KeyStore _keyStore;
-
- public UniversalSecurityPreferencePage()
- {
- super();
- setPreferenceStore(UniversalSecurityPlugin.getDefault()
- .getPreferenceStore());
- }
-
- protected Control createContents(Composite parent)
- {
- Composite composite = SystemWidgetHelpers.createComposite(parent, 1);
-
- GridLayout layout = new GridLayout();
- layout.marginWidth = 5;
- layout.verticalSpacing = 10;
- layout.numColumns = 1;
- composite.setLayout(layout);
- composite.setLayoutData(GridUtil.createFill());
-
- Text label = new Text(composite, SWT.READ_ONLY);
- label.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PREF_SEC_DESCRIPTION));
- GridData data = new GridData();
- data.horizontalSpan = 2;
- label.setLayoutData(data);
-
- createTableViewer(composite);
-
- Composite buttons = new Composite(composite, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- buttons.setLayoutData(data);
- layout = new GridLayout();
- layout.numColumns = 1;
- buttons.setLayout(layout);
-
- createButtons(buttons);
- initializeValues();
-
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "ssls0000"); //$NON-NLS-1$
- return composite;
- }
-
- private void createTableViewer(Composite parent)
- {
- // Create the table viewer.
- _viewer = new TableViewer(parent, SWT.BORDER | SWT.SINGLE
- | SWT.FULL_SELECTION);
-
- // Create the table control.
- Table table = _viewer.getTable();
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData data = GridUtil.createFill();
- data.heightHint = 50;
- data.widthHint = 100;
- table.setLayoutData(data);
-
- TableLayout tableLayout = new TableLayout();
-
-
- TableColumn aliasColumn = new TableColumn(table, SWT.LEFT);
- aliasColumn.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PREF_ALIAS_NAME));
- tableLayout.addColumnData(new ColumnPixelData(100));
-
- TableColumn toColumn = new TableColumn(table, SWT.LEFT);
- toColumn.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PREF_ISSUED_TO));
- tableLayout.addColumnData(new ColumnPixelData(120));
-
- TableColumn frmColumn = new TableColumn(table, SWT.LEFT);
- frmColumn.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PREF_ISSUED_FROM));
- tableLayout.addColumnData(new ColumnPixelData(120));
-
- TableColumn expColumn = new TableColumn(table, SWT.RIGHT);
- expColumn.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PREF_EXPIRES));
- tableLayout.addColumnData(new ColumnPixelData(120));
- table.setLayout(tableLayout);
-
- // Adjust the table viewer.
- String[] properties = new String[] {"STRING", "STRING", "STRING", "NUMBER"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- _viewer.setColumnProperties(properties);
- _viewer.setContentProvider(new CertTableContentProvider());
- _viewer.setLabelProvider(new CertTableLabelProvider());
- _viewer.getTable().addSelectionListener(this);
-
- CertTableSorter.setTableSorter(_viewer, 0, true);
- }
-
- private void createButtons(Composite parent)
- {
- Composite buttonComposite = SystemWidgetHelpers.createComposite(parent, 4);
-
- _addButton = SystemWidgetHelpers.createPushButton(buttonComposite, UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_ADD_LBL),this);
-
-
- _removeButton = SystemWidgetHelpers.createPushButton(buttonComposite, UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_REMOVE_LBL), this);
- _removeButton.setEnabled(false);
-
- _renameButton = SystemWidgetHelpers.createPushButton(buttonComposite, UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_RENAME_LBL), this);
- _renameButton.setEnabled(false);
-
- _propertiesButton = SystemWidgetHelpers.createPushButton(buttonComposite, UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PROPERTIES_LBL), this);
- _propertiesButton.setEnabled(false);
- }
-
-
- /**
- * @see IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench)
- {
- }
-
- /**
- * @see PreferencePage#performDefaults()
- */
- protected void performDefaults()
- {
- super.performDefaults();
-
- }
-
- /**
- * @see PreferencePage#performOk()
- */
- public boolean performOk()
- {
-
- String storePath = UniversalSecurityPlugin.getKeyStoreLocation();
- String passw = UniversalSecurityPlugin.getKeyStorePassword();
- try
- {
-
- DStoreKeyStore.persistKeyStore(_keyStore, storePath, passw);
-
- }
- catch (IOException e)
- {
-
- String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_IO_SAVE_ERROR_);
- text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
-
- text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
- String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_);
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, e);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityPlugin
- .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
- return false;
-
- }
- catch (CertificateException exc)
- {
-
- String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_STORE_ERROR_);
- text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
- String msg = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_);
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_SEC_MSG), msg, err);
- return false;
-
- }
- catch (KeyStoreException exc)
- {
- String text = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_UNINIT_KEYSTORE_ERROR_);
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
- .getKeyStoreLocation());
- String msg = UniversalSecurityPlugin
- .getString("RESID_SECURITY_KEYSTORE_SAVE_ERROR_"); //$NON-NLS-1$
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityPlugin
- .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
- return false;
-
- }
- catch (NoSuchAlgorithmException exc2)
- {
- String text = UniversalSecurityPlugin
- .getString("RESID_SECURITY_ALGORITHM_ERROR_"); //$NON-NLS-1$
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
- .getKeyStoreLocation());
- String msg = UniversalSecurityPlugin
- .getString("RESID_SECURITY_KEYSTORE_SAVE_ERROR_"); //$NON-NLS-1$
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc2);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityPlugin
- .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
- return false;
-
- }
- return true;
-
- }
-
- /**
- * Loads certificates from the key store.
- */
- private void initializeValues()
- {
-
- String storePath = UniversalSecurityPlugin.getKeyStoreLocation();
- String passw = UniversalSecurityPlugin.getKeyStorePassword();
- // String passw = "dstore";
-
- try
- {
- _keyStore = DStoreKeyStore.getKeyStore(storePath, passw);
-
- Enumeration aliases = _keyStore.aliases();
-
- while (aliases.hasMoreElements())
- {
- String alias = (String) (aliases.nextElement());
- /* The alias may be either a key or a certificate */
- java.security.cert.Certificate cert = _keyStore
- .getCertificate(alias);
- if (cert != null)
- {
- if (cert instanceof X509Certificate)
- {
- X509CertificateElement elem = new X509CertificateElement(
- alias,
- UniversalSecurityProperties.RESID_SECURITY_TRUSTED_CERTIFICATE,
- (X509Certificate) cert);
- _tableItems.add(elem);
- }
- }
- else
- {
- try
- {
- Key key = _keyStore.getKey(alias, passw.toCharArray());
- KeyElement elem = new KeyElement(alias,
- UniversalSecurityPlugin
- .getString("RESID_SECURITY_KEY_ENTRY"), //$NON-NLS-1$
- key);
- _tableItems.add(elem);
- }
- catch (UnrecoverableKeyException e)
- {
- /* Probably ignore the key in this case */
- }
- }
-
- }
- }
- catch (IOException e)
- {
-
- String text = UniversalSecurityPlugin
- .getString("RESID_SECURITY_LOAD_IO_EXC_"); //$NON-NLS-1$
- text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
- String msg = UniversalSecurityPlugin
- .getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); //$NON-NLS-1$
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, e);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityPlugin
- .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
-
- }
- catch (CertificateException exc)
- {
-
- String text = UniversalSecurityPlugin
- .getString("RESID_SECURITY_KEY_LOAD_ERROR_"); //$NON-NLS-1$
- text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
- String msg = UniversalSecurityPlugin
- .getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); //$NON-NLS-1$
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityPlugin
- .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
-
- }
- catch (KeyStoreException exc)
- {
-
- String text = UniversalSecurityPlugin
- .getString("RESID_SECURITY_INITIALIZE_ERROR_"); //$NON-NLS-1$
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
- .getKeyStoreLocation());
- String msg = UniversalSecurityPlugin
- .getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); //$NON-NLS-1$
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityPlugin
- .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
-
- }
- catch (NoSuchProviderException exc2)
- {
-
- String text = UniversalSecurityPlugin
- .getString("RESID_SECURITY_SECURITY_PROVIDER_ERROR_"); //$NON-NLS-1$
- String msg = UniversalSecurityPlugin
- .getString("RESID_SECURITY_INITIALIZE_ERROR_"); //$NON-NLS-1$
- msg = StringModifier.change(msg, "%1", UniversalSecurityPlugin //$NON-NLS-1$
- .getKeyStoreLocation());
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc2);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityPlugin
- .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
-
- }
- catch (NoSuchAlgorithmException exc2)
- {
- String text = UniversalSecurityPlugin
- .getString("RESID_SECURITY_ALGORITHM_ERROR_"); //$NON-NLS-1$
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
- .getKeyStoreLocation());
- String msg = UniversalSecurityPlugin
- .getString("RESID_SECURITY_LOAD_KEYSTORE_ERROR_"); //$NON-NLS-1$
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc2);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityPlugin
- .getString("SEC_MSG"), msg, err); //$NON-NLS-1$
-
- }
-
- _viewer.setInput(_tableItems);
- }
-
- public void handleEvent(Event event)
- {
- // TODO Auto-generated method stub
- if (event.widget == _addButton)
- {
- NewCertDialog dlg = new NewCertDialog(this, getShell());
- dlg.open();
-
- if (dlg.getReturnCode() == Window.OK)
- {
- _viewer.refresh();
- }
-
- }
- else if (event.widget == _removeButton)
- {
- IStructuredSelection elem = (IStructuredSelection) _viewer.getSelection();
- if (elem.size() > 0)
- {
- Iterator i = elem.iterator();
- while (i.hasNext())
- {
- try
- {
- Element current = (Element) i.next();
- _keyStore.deleteEntry(current.getAlias());
- _tableItems.remove(current);
- }
- catch (KeyStoreException e)
- {
- }
- }
-
- _viewer.refresh();
- }
-
- }
- else if (event.widget == _renameButton)
- {
- IStructuredSelection elem = (IStructuredSelection) _viewer
- .getSelection();
- if (elem.size() == 1)
- {
- Element sel = (Element) elem.getFirstElement();
- RenameCertDialog dlg = new RenameCertDialog(this, getShell(),
- sel.getAlias());
- dlg.open();
-
- if (dlg.getReturnCode() == Window.OK)
- {
- try
- {
- DStoreKeyStore.addCertificateToKeyStore(
- UniversalSecurityPreferencePage.this._keyStore,
- (Certificate) sel.getCert(), dlg.getNewAlias());
- _keyStore.deleteEntry(sel.getAlias());
- sel.setAlias(dlg.getNewAlias());
- _viewer.refresh();
- }
- catch (KeyStoreException e)
- {
- }
- }
- }
-
- }
- else if (event.widget == _propertiesButton)
- {
- IStructuredSelection elem = (IStructuredSelection) _viewer
- .getSelection();
- if (elem.size() == 1)
- {
- Element sel = (Element) elem.getFirstElement();
- CertPropertiesDialog dlg = null;
- if (sel instanceof X509CertificateElement)
- {
- dlg = new X509CertificatePropertiesDialog(getShell(), (X509CertificateElement)sel);
- }
- else
- {
- dlg = new KeyPropertiesDialog(getShell(), (KeyElement)sel);
- }
-
- dlg.open();
-
- }
-
- }
-
- boolean sel = _viewer.getSelection().isEmpty();
- _renameButton.setEnabled(!sel);
- _removeButton.setEnabled(!sel);
- _propertiesButton.setEnabled(!sel);
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- // TODO Auto-generated method stub
- boolean sel = _viewer.getSelection().isEmpty();
- _renameButton.setEnabled(!sel);
- _removeButton.setEnabled(!sel);
- _propertiesButton.setEnabled(!sel);
- }
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- widgetSelected(e);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/X509CertificateElement.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/X509CertificateElement.java
deleted file mode 100644
index 20147fb43..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/X509CertificateElement.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-
-
-import java.security.cert.X509Certificate;
-import java.util.Date;
-
-
-public class X509CertificateElement extends Element
-{
- public static int CERT_NAME = 0;
- public static int CERT_UNIT = 1;
- public static int CERT_ORGANIZATION = 2;
- public static int CERT_CITY = 3;
- public static int CERT_PROVINCE = 4;
- public static int CERT_COUNTRY = 5;
-
-
- private X509Certificate _cert;
- public X509CertificateElement(String alias, String value, X509Certificate cert)
- {
- super(alias, value);
- _cert = cert;
- }
-
- public String getType()
- {
- return _cert.getType();
- }
-
- public String getVersion()
- {
- return "V." + _cert.getVersion(); //$NON-NLS-1$
- }
-
- private String[] parse(String full)
- {
- StringBuffer result = new StringBuffer();
- char[] chars = full.toCharArray();
- boolean inQuotes = false;
- for (int i = 0; i < chars.length; i++)
- {
- char c = chars[i];
- if (c == '\"')
- {
- inQuotes = !inQuotes;
- }
- else
- {
- if (c == ',')
- {
- if (!inQuotes)
- {
- c = ';';
- }
- }
- }
- result.append(c);
- }
- return result.toString().split(";"); //$NON-NLS-1$
- }
-
- private String extract(String full, int index)
- {
- String[] pairs = parse(full);
- String match = pairs[index].split("=")[1]; //$NON-NLS-1$
- return match;
- }
-
-
- public String getIssuerDN()
- {
- String full = _cert.getIssuerDN().getName();
- return full;
- }
-
- public String getIssuerName()
- {
- String full = _cert.getIssuerDN().getName();
- return extract(full, CERT_NAME);
- }
-
- public String getIssuerUnit()
- {
- String full = _cert.getIssuerDN().getName();
- return extract(full, CERT_UNIT);
- }
-
- public String getIssuerOrg()
- {
- String full = _cert.getIssuerDN().getName();
- return extract(full, CERT_ORGANIZATION);
- }
-
- public String getIssuerCity()
- {
- String full = _cert.getIssuerDN().getName();
- return extract(full, CERT_CITY);
- }
-
- public String getIssuerProvince()
- {
- String full = _cert.getIssuerDN().getName();
- return extract(full, CERT_PROVINCE);
- }
-
- public String getIssuerCountry()
- {
- String full = _cert.getIssuerDN().getName();
- return extract(full, CERT_COUNTRY);
- }
-
- public String getSubjectDN()
- {
- String full = _cert.getSubjectDN().getName();
- return full;
- }
-
- public String getSubjectName()
- {
- String full = _cert.getSubjectDN().getName();
- return extract(full, CERT_NAME);
- }
-
- public String getSubjectUnit()
- {
- String full = _cert.getSubjectDN().getName();
- return extract(full, CERT_UNIT);
- }
-
- public String getSubjectOrg()
- {
- String full = _cert.getSubjectDN().getName();
- return extract(full, CERT_ORGANIZATION);
- }
-
- public String getSubjectCity()
- {
- String full = _cert.getSubjectDN().getName();
- return extract(full, CERT_CITY);
- }
-
- public String getSubjectProvince()
- {
- String full = _cert.getSubjectDN().getName();
- return extract(full, CERT_PROVINCE);
- }
-
- public String getSubjectCountry()
- {
- String full = _cert.getSubjectDN().getName();
- return extract(full, CERT_COUNTRY);
- }
-
-
-
-
-
- public String getNotBefore()
- {
- return _cert.getNotBefore().toString();
- }
-
- public String getNotAfter()
- {
- return _cert.getNotAfter().toString();
- }
-
- public String getExpirationDate()
- {
- Date date = _cert.getNotAfter();
- return date.toString();
- }
-
-
- public String getSigAlgName()
- {
- return _cert.getSigAlgName();
- }
-
- public String getSerialNumber()
- {
- return _cert.getSerialNumber().toString();
- }
-
- public String getAlgorithm()
- {
- return _cert.getPublicKey().getAlgorithm();
- }
-
- public String getFormat()
- {
- return _cert.getPublicKey().getFormat();
- }
-
- public Object getCert()
- {
- return _cert;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/X509CertificatePropertiesDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/X509CertificatePropertiesDialog.java
deleted file mode 100644
index 09f197b31..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/X509CertificatePropertiesDialog.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.preference;
-
-import org.eclipse.swt.widgets.Shell;
-
-public class X509CertificatePropertiesDialog extends CertPropertiesDialog
-{
- public X509CertificatePropertiesDialog(Shell parentShell, X509CertificateElement element)
- {
- super(parentShell, element.getCert());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/util/GridUtil.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/util/GridUtil.java
deleted file mode 100644
index d8721e309..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/util/GridUtil.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.util;
-
-import org.eclipse.swt.layout.GridData;
-
-/**
- * A utility class to create convenient grid data objects.
- */
-public class GridUtil
-{
- /**
- * GridUtil constructor comment.
- */
- public GridUtil()
- {
- super();
- }
-
- /**
- * Creates a grid data object that occupies vertical and horizontal space.
- */
- static public GridData createFill()
- {
- GridData gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
- gd.verticalAlignment = GridData.FILL;
- gd.grabExcessVerticalSpace = true;
- return gd;
- }
-
- /**
- * Creates a grid data object that occupies horizontal space.
- */
- static public GridData createHorizontalFill()
- {
- GridData gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
- return gd;
- }
-
- /**
- * Creates a grid data object that occupies vertical space.
- */
- static public GridData createVerticalFill()
- {
- GridData gd = new GridData();
- gd.verticalAlignment = GridData.FILL;
- gd.grabExcessVerticalSpace = true;
- return gd;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/util/StringModifier.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/util/StringModifier.java
deleted file mode 100644
index 17d122552..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/util/StringModifier.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.dstore.security.util;
-/**
- * This class provides static methods for some of the
- * very used IString operations
- */
-
-public class StringModifier
-{
- // change all occurrences of oldPat to newPat
- public static String change(String in, String oldPat, String newPat)
- {
- if (oldPat.length() == 0)
- return in;
- if (oldPat.length() == 1 && newPat.length() == 1)
- return in.replace(oldPat.charAt(0), newPat.charAt(0));
-
- int lastIndex = 0;
- int newIndex = 0;
- StringBuffer newString = new StringBuffer();
- for(;;)
- {
- newIndex = in.indexOf(oldPat, lastIndex);
- if (newIndex != -1)
- {
- newString.append(in.substring(lastIndex, newIndex) + newPat);
- lastIndex = newIndex + oldPat.length();
- }
- else
- {
- newString.append(in.substring(lastIndex));
- break;
- }
- }
- return newString.toString();
- }
- } \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/widgets/CertificateForm.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/widgets/CertificateForm.java
deleted file mode 100644
index 5da0d680c..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/widgets/CertificateForm.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.dstore.security.widgets;
-
-import java.io.File;
-import java.io.IOException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
-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.ui.SystemBaseForm;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-public class CertificateForm extends SystemBaseForm
-{
- private Text _pathField;
- private Text _aliasField;
- private String _aliasStr;
- private String _pathStr;
- private ArrayList listenerList;
-
- private Button _browseButton;
- public Shell _shell;
-
- public CertificateForm(Shell shell, ISystemMessageLine msgLine)
- {
- super(shell, msgLine);
- listenerList = new ArrayList();
- _shell = shell;
- }
-
- public Control getInitialFocusControl()
- {
- return _pathField;
- }
-
- public Control createContents(Composite c){
-
- GridData data;
- Composite nameGroup = new Composite(c, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- data = GridUtil.createFill();
- data.widthHint = 400;
- nameGroup.setLayoutData(data);
- nameGroup.setLayout(layout);
-
- Label lblPath = new Label(nameGroup, SWT.NONE);
- lblPath.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_FILE));
- _pathField = new Text(nameGroup, SWT.BORDER);
- _pathField.setLayoutData(GridUtil.createHorizontalFill());
- _pathField.setText(""); //$NON-NLS-1$
-
- _browseButton = new Button(nameGroup, SWT.PUSH);
- _browseButton.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_BROWSE));
-
- _browseButton.addListener(SWT.Selection, this);
-
- Label lblName = new Label(nameGroup, SWT.NONE);
- lblName.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_ALIAS));
- _aliasField = new Text(nameGroup, SWT.BORDER);
- _aliasField.setText(""); //$NON-NLS-1$
-
- _aliasField.setLayoutData(GridUtil.createHorizontalFill());
-
- _aliasField.addListener(SWT.Modify, this);
- _pathField.addListener(SWT.Modify, this);
-
- return _pathField;
-
- }
-
- /**
- * Handle all events and enablements for widgets in this dialog
- *
- * @param event Event
- */
- public void handleEvent(Event event) {
-
- if(event.widget == _browseButton){
- showFileDialog();
- NotifyListeners(event);
- }
- if(event.widget==_aliasField || event.widget==_pathField){
- //setButtonState();
- _pathStr = _pathField.getText();
- _aliasStr = _aliasField.getText();
- NotifyListeners(event);
- }
-
- }
-
- public void NotifyListeners(Event event){
- for(int i=0;i<listenerList.size();i++){
- ((Listener)listenerList.get(i)).handleEvent(event);
- }
- }
-
- public boolean validateDialog(){
- return (_aliasField.getText().trim().length()>0 && _pathField.getText().trim().length()>0);
- }
-
- private void showFileDialog(){
- String currentSource = _pathField.getText();
-
- FileDialog dlg = new FileDialog(_shell, SWT.OPEN);
-
- dlg.setFileName(currentSource);
- dlg.setFilterExtensions(new String[]{"*.cer", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
-
- String source = dlg.open();
-
- if(source!=null)
- {
- _pathField.setText(source);
- File f = new File(source);
- String alias = f.getName();
- int dotIndex = alias.indexOf('.');
- if (dotIndex > 0)
- {
- alias = alias.substring(0, dotIndex);
- }
- _aliasField.setText(alias);
- }
-
- }
-
- public Certificate loadCertificate(KeyStore ks) throws IOException, CertificateException, KeyStoreException {
-
-
- Certificate fCertificate = DStoreKeyStore.loadCertificate(getPath());
- DStoreKeyStore.addCertificateToKeyStore(ks, fCertificate, getAliasName());
- return fCertificate;
-
- }
-
- public void registerListener(Listener listener){
- listenerList.add(listener);
-
- }
- public String getAliasName()
- {
- return _aliasStr;
- }
-
- public String getPath()
- {
- return _pathStr;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/widgets/CertificatePropertiesForm.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/widgets/CertificatePropertiesForm.java
deleted file mode 100644
index bf6b2dfc8..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/widgets/CertificatePropertiesForm.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.widgets;
-
-import java.security.Key;
-import java.security.cert.X509Certificate;
-import java.text.DateFormat;
-
-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.SystemBaseForm;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-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 CertificatePropertiesForm extends SystemBaseForm
-{
- private Object _certificate;
- private String _alias;
- private boolean _advanced;
-
- public CertificatePropertiesForm(Shell shell, Object certificate, String alias)
- {
- this(shell, certificate, alias, false);
- }
-
- public CertificatePropertiesForm(Shell shell, Object certificate)
- {
- this(shell, certificate, false);
- }
-
- public CertificatePropertiesForm(Shell shell, Object certificate, String alias, boolean advanced)
- {
- super(shell, null);
- _certificate = certificate;
- _alias = alias;
- _advanced = advanced;
- }
-
- public CertificatePropertiesForm(Shell shell, Object certificate, boolean advanced)
- {
- this(shell, certificate, null, advanced);
- }
-
-
- public Control createContents(Composite parent)
- {
- if (_advanced)
- {
- return createAdvancedContents(parent);
- }
- else
- {
- return createSimpleContents(parent);
- }
- }
-
- public Control createSimpleContents(Composite parent)
- {
- Composite content = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- GridData data = GridUtil.createFill();
- data.widthHint = 450;
- //data.heightHint = 300;
- layout.numColumns = 2;
- content.setLayout(layout);
- content.setLayoutData(data);
-
- if (_alias != null)
- {
- Label lblAlias = new Label(content, SWT.NONE);
- lblAlias.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PROP_ALIAS_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- lblAlias.setLayoutData(data);
-
- Label lblAliasValue = new Label(content, SWT.NONE);
- lblAliasValue.setText(_alias);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- lblAliasValue.setLayoutData(data);
- }
-
- Label lblVersion = new Label(content, SWT.NONE);
- lblVersion.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIF_VERSION_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- lblVersion.setLayoutData(data);
-
- Label lblVersionValue = new Label(content, SWT.NONE);
-
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- lblVersionValue.setLayoutData(data);
-
- Label lblIssuedTo = new Label(content, SWT.NONE);
- lblIssuedTo.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_ISSUED_TO_LBL));
- data = new GridData();
- data.verticalAlignment = GridData.BEGINNING;
- data.horizontalIndent = 5;
- lblIssuedTo.setLayoutData(data);
-
- Text lblIssuedToValue = new Text(content, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP) ;
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = 60;
- data.horizontalIndent = 5;
- lblIssuedToValue.setLayoutData(data);
-
- Label lblIssuedBy = new Label(content, SWT.NONE);
- lblIssuedBy.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_ISSUED_BY_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- data.verticalAlignment = GridData.BEGINNING;
- lblIssuedBy.setLayoutData(data);
-
- Text lblIssuedByValue = new Text(content, SWT.BORDER |SWT.READ_ONLY | SWT.WRAP);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- data.heightHint = 60;
- lblIssuedByValue.setLayoutData(data);
-
- Label lblValidity = new Label(content, SWT.NONE);
- lblValidity.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_VALIDITY_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- lblValidity.setLayoutData(data);
-
- Label lblValidityValue = new Label(content, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- lblValidityValue.setLayoutData(data);
-
- Label lblAlgorithm = new Label(content, SWT.NONE);
- lblAlgorithm.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_ALGORITHM_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- lblAlgorithm.setLayoutData(data);
-
- Label lblAlgorithmValue = new Label(content, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- lblAlgorithmValue.setLayoutData(data);
-
- if(_certificate instanceof X509Certificate){
- lblVersionValue.setText(((X509Certificate)_certificate).getType() + " V."+((X509Certificate)_certificate).getVersion()); //$NON-NLS-1$
- lblIssuedToValue.setText(((X509Certificate)_certificate).getSubjectDN().getName());
- lblIssuedByValue.setText(((X509Certificate)_certificate).getIssuerDN().getName());
- DateFormat df = DateFormat.getDateInstance(DateFormat.LONG);
-
- String validity = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_VALIDITY_PERIOD);
- validity = StringModifier.change(validity,"%1", df.format(((X509Certificate)_certificate).getNotBefore())); //$NON-NLS-1$
- validity = StringModifier.change(validity,"%2", df.format(((X509Certificate)_certificate).getNotAfter())); //$NON-NLS-1$
-
- lblValidityValue.setText(validity);
- lblAlgorithmValue.setText(((X509Certificate)_certificate).getSigAlgName());
- }else if(_certificate instanceof Key){
- lblVersionValue.setText(((Key)_certificate).getFormat());
- lblAlgorithmValue.setText(((Key)_certificate).getAlgorithm());
- }
-
- return content;
- }
-
-
- public Control createAdvancedContents(Composite parent)
- {
- Composite content = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- GridData data = GridUtil.createFill();
- data.widthHint = 450;
- //data.heightHint = 300;
- layout.numColumns = 2;
- content.setLayout(layout);
- content.setLayoutData(data);
-
- if (_alias != null)
- {
- Label lblAlias = new Label(content, SWT.NONE);
- lblAlias.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PROP_ALIAS_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- lblAlias.setLayoutData(data);
-
- Label lblAliasValue = new Label(content, SWT.NONE);
- lblAliasValue.setText(_alias);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- lblAliasValue.setLayoutData(data);
- }
-
- Label lblVersion = new Label(content, SWT.NONE);
- lblVersion.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_CERTIF_VERSION_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- lblVersion.setLayoutData(data);
-
- Label lblVersionValue = new Label(content, SWT.NONE);
-
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- lblVersionValue.setLayoutData(data);
-
- Label lblIssuedTo = new Label(content, SWT.NONE);
- lblIssuedTo.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_ISSUED_TO_LBL));
- data = new GridData();
- data.verticalAlignment = GridData.BEGINNING;
- data.horizontalIndent = 5;
- lblIssuedTo.setLayoutData(data);
-
- Text lblIssuedToValue = new Text(content, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP) ;
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = 60;
- data.horizontalIndent = 5;
- lblIssuedToValue.setLayoutData(data);
-
- Label lblIssuedBy = new Label(content, SWT.NONE);
- lblIssuedBy.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_ISSUED_BY_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- data.verticalAlignment = GridData.BEGINNING;
- lblIssuedBy.setLayoutData(data);
-
- Text lblIssuedByValue = new Text(content, SWT.BORDER |SWT.READ_ONLY | SWT.WRAP);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- data.heightHint = 60;
- lblIssuedByValue.setLayoutData(data);
-
- Label lblValidity = new Label(content, SWT.NONE);
- lblValidity.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_VALIDITY_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- lblValidity.setLayoutData(data);
-
- Label lblValidityValue = new Label(content, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- lblValidityValue.setLayoutData(data);
-
- Label lblAlgorithm = new Label(content, SWT.NONE);
- lblAlgorithm.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_ALGORITHM_LBL));
- data = new GridData();
- data.horizontalIndent = 5;
- lblAlgorithm.setLayoutData(data);
-
- Label lblAlgorithmValue = new Label(content, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 5;
- lblAlgorithmValue.setLayoutData(data);
-
- if(_certificate instanceof X509Certificate){
- lblVersionValue.setText(((X509Certificate)_certificate).getType() + " V."+((X509Certificate)_certificate).getVersion()); //$NON-NLS-1$
- lblIssuedToValue.setText(((X509Certificate)_certificate).getSubjectDN().getName());
- lblIssuedByValue.setText(((X509Certificate)_certificate).getIssuerDN().getName());
- DateFormat df = DateFormat.getDateInstance(DateFormat.LONG);
-
- String validity = UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_VALIDITY_PERIOD);
- validity = StringModifier.change(validity,"%1", df.format(((X509Certificate)_certificate).getNotBefore())); //$NON-NLS-1$
- validity = StringModifier.change(validity,"%2", df.format(((X509Certificate)_certificate).getNotAfter())); //$NON-NLS-1$
-
- lblValidityValue.setText(validity);
- lblAlgorithmValue.setText(((X509Certificate)_certificate).getSigAlgName());
- }else if(_certificate instanceof Key){
- lblVersionValue.setText(((Key)_certificate).getFormat());
- lblAlgorithmValue.setText(((Key)_certificate).getAlgorithm());
- }
-
- return content;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/NewCertTableLabelProvider.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/NewCertTableLabelProvider.java
deleted file mode 100644
index 9d128cfbf..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/NewCertTableLabelProvider.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.wizards;
-
-
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.rse.dstore.security.preference.Element;
-import org.eclipse.rse.dstore.security.preference.X509CertificateElement;
-import org.eclipse.swt.graphics.Image;
-
-
-
-public class NewCertTableLabelProvider
- extends LabelProvider
- implements ITableLabelProvider
- {
-
- public Image getColumnImage(Object element, int columnIndex)
- {
- if (columnIndex == 0)
- {
- if (element instanceof Element)
- {
- return ((Element)element).getImage();
- }
- }
- return null;
- }
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object element, int columnIndex)
- {
- if (element instanceof Element)
- {
- X509CertificateElement myTableElement = (X509CertificateElement) element;
-
- switch (columnIndex)
- {
- case 0: // issued to
- {
- String name = myTableElement.getSubjectName();
- if (name == null || name.length() == 0)
- {
- name = myTableElement.getSubjectUnit();
- if (name == null || name.length() == 0)
- {
- name = myTableElement.getSubjectOrg();
- }
- }
- return name;
- }
- case 1: // issuer
- {
- String name = myTableElement.getIssuerName();
- if (name == null || name.length() == 0)
- {
- name = myTableElement.getIssuerUnit();
- if (name == null || name.length() == 0)
- {
- name = myTableElement.getIssuerOrg();
- }
- }
-
- return name;
- }
- case 2: // expires
- return myTableElement.getNotAfter();
-
- default:
- break;
- }
- }
- return ""; //$NON-NLS-1$
- }
-
-
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index e8a9b9e79..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.security.wizards;
-
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-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.ui.actions.SystemBaseWizardAction;
-import org.eclipse.swt.widgets.Display;
-
-public class SystemImportCertAction extends SystemBaseWizardAction
- {
- private List _certificates;
- private ISystemKeystoreProvider _provider;
- 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),
- Display.getDefault().getActiveShell()
- );
- _certificates = certs;
- _provider = provider;
- _systemName = systemName;
- }
-
- public IWizard createWizard()
- {
- SystemImportCertWizard importWiz = new SystemImportCertWizard(_provider, _systemName);
- importWiz.setInputObject(_certificates);
- return importWiz;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 7dbcefd09..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizard.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.dstore.security.wizards;
-
-import java.security.KeyStore;
-import java.security.cert.X509Certificate;
-import java.util.List;
-
-import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
-import org.eclipse.rse.core.SystemBasePlugin;
-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.ui.wizards.AbstractSystemWizard;
-
-public class SystemImportCertWizard
- extends AbstractSystemWizard
-{
-
- private SystemImportCertWizardMainPage _mainPage;
- private SystemImportCertWizardAliasPage _aliasPage;
- private ISystemKeystoreProvider _provider;
- private String _systemName;
-
-
- /**
- * Constructor
- */
- 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;
- }
-
- /**
- * Creates the wizard pages.
- * This method is an override from the parent Wizard class.
- */
- public void addPages()
- {
- try {
- _mainPage = createMainPage();
- addPage(_mainPage);
-
- _aliasPage = createAliasPage();
- addPage(_aliasPage);
- //super.addPages();
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("New File: Error in createPages: ",exc); //$NON-NLS-1$
- }
- }
-
- /**
- * Creates the wizard's main page.
- * This method is an override from the parent class.
- */
- protected SystemImportCertWizardMainPage createMainPage()
- {
- // SystemMessage errMsg = null;
-
- _mainPage = new SystemImportCertWizardMainPage(this, getCertificates());
-// if (errMsg != null)
- // _mainPage.setErrorMessage(errMsg);
- return _mainPage;
- }
-
- /**
- * Creates the wizard's main page.
- * This method is an override from the parent class.
- */
- protected SystemImportCertWizardAliasPage createAliasPage()
- {
- // SystemMessage errMsg = null;
-
- _aliasPage = new SystemImportCertWizardAliasPage(this, getCertificates(), _systemName);
- // if (errMsg != null)
- // _aliasPage.setErrorMessage(errMsg);
- return _aliasPage;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- boolean ok = false;
- if (_aliasPage.performFinish())
- {
- List certs = getCertificates();
- for (int i = 0; i < certs.size(); i++)
- {
- X509Certificate cert = (X509Certificate)certs.get(i);
- if (cert != null)
- {
- String alias = _aliasPage.getAlias();
-
- try
- {
- KeyStore ks = DStoreKeyStore.getKeyStore(_provider.getKeyStorePath(), _provider.getKeyStorePassword());
- DStoreKeyStore.addCertificateToKeyStore(ks, cert, alias);
- DStoreKeyStore.persistKeyStore(ks, _provider.getKeyStorePath(), _provider.getKeyStorePassword());
- ok = true;
- }
- catch (Exception e)
- {
- e.printStackTrace();
- ok = false;
- }
- }
- }
- }
- return ok;
- }
-
-
- public List getCertificates()
- {
- return (List)getInputObject();
- }
-
-
-
-} // end class \ No newline at end of file
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
deleted file mode 100644
index 17b49748f..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardAliasPage.java
+++ /dev/null
@@ -1,203 +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.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;
-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.wizards.AbstractSystemWizardPage;
-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.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-
-
-public class SystemImportCertWizardAliasPage
- extends AbstractSystemWizardPage
-{
-
-
- protected SystemMessage errorMessage;
- protected ISystemValidator nameValidator;
- protected ISystemMessageLine msgLine;
- private String _systemName;
-
- private Text _alias;
- /**
- * Constructor.
- */
- public SystemImportCertWizardAliasPage(Wizard wizard, List certs, String systemName)
- {
- super(wizard, "SpecifyAlias", //$NON-NLS-1$
- UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_ALIAS_TITLE,
- UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_ALIAS_DESC);
- _systemName = systemName;
- }
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- */
- public Control createContents(Composite parent)
- {
- Composite content = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- GridData data = new GridData(GridData.FILL_BOTH);
- layout.numColumns = 3;
- content.setLayout(layout);
- content.setLayoutData(data);
-
- SystemWidgetHelpers.createLabel(content, UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_ALIAS);
- _alias = SystemWidgetHelpers.createTextField(content, null);
- _alias.addModifyListener(
- new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateNameInput();
- }
- }
- );
- initializeInput();
- return _alias;
- }
-
-
- public X509CertificateElement getElement(Object cert)
- {
- if (cert instanceof X509Certificate)
- {
- return new X509CertificateElement(null,
- UniversalSecurityProperties.RESID_SECURITY_TRUSTED_CERTIFICATE,
- (X509Certificate)cert);
- }
- return null;
- }
-
-
-
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return _alias;
- }
-
- /**
- * Init values using input data
- */
- protected void initializeInput()
- {
- _alias.setText(getAlias());
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateNameInput()
- {
- errorMessage = null;
- this.clearErrorMessage();
- if (nameValidator != null)
- errorMessage= nameValidator.validate(_alias.getText());
- if (errorMessage != null)
- setErrorMessage(errorMessage);
- setPageComplete(errorMessage==null);
- return errorMessage;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
-
- return true;
- }
-
- // --------------------------------- //
- // METHODS FOR EXTRACTING USER DATA ...
- // --------------------------------- //
- /**
- * Return user-entered new file name.
- * Call this after finish ends successfully.
- */
- public String getAlias()
- {
- String alias = _alias.getText().trim();
- if (alias.equals("")) //$NON-NLS-1$
- {
- 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;
- }
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- return (errorMessage==null);
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardMainPage.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardMainPage.java
deleted file mode 100644
index 01eb6d521..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardMainPage.java
+++ /dev/null
@@ -1,214 +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.dstore.security.wizards;
-
-import java.security.cert.X509Certificate;
-import java.util.List;
-
-import org.eclipse.jface.viewers.ColumnPixelData;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-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.CertTableContentProvider;
-import org.eclipse.rse.dstore.security.preference.X509CertificateElement;
-import org.eclipse.rse.dstore.security.preference.X509CertificatePropertiesDialog;
-import org.eclipse.rse.dstore.security.util.GridUtil;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.wizards.AbstractSystemWizardPage;
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-
-public class SystemImportCertWizardMainPage
- extends AbstractSystemWizardPage
- implements Listener
-{
- protected SystemMessage errorMessage;
- protected ISystemValidator nameValidator;
- protected ISystemMessageLine msgLine;
-
- private List _certificates;
- private Button _propertiesButton;
-
- private TableViewer _viewer;
-
- /**
- * Constructor.
- */
- public SystemImportCertWizardMainPage(Wizard wizard, List certs)
- {
- super(wizard, "NewCertificate", //$NON-NLS-1$
- UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_CERTIFICATE_TITLE,
- UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_CERTIFICATE_DESC);
- _certificates = certs;
- }
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- */
- public Control createContents(Composite parent)
- {
-
- Composite verbage = new Composite(parent, SWT.NULL);
- GridLayout vlayout = new GridLayout();
- GridData vdata = new GridData(GridData.FILL_BOTH);
- vlayout.numColumns = 1;
- verbage.setLayout(vlayout);
- verbage.setLayoutData(vdata);
-
- SystemWidgetHelpers.createLabel(verbage, UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_INFORMATION);
- createTableViewer(verbage);
-
- Composite b = new Composite(parent, SWT.NULL);
- GridLayout blayout = new GridLayout();
- GridData bdata = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.END);
- blayout.numColumns = 3;
- b.setLayout(blayout);
- b.setLayoutData(bdata);
- _propertiesButton = SystemWidgetHelpers.createPushButton(b, UniversalSecurityProperties.RESID_SECURITY_PROPERTIES_LBL, this);
-
- return _propertiesButton;
- }
-
-
- private void createTableViewer(Composite parent)
- {
- // Create the table viewer.
- _viewer = new TableViewer(parent, SWT.BORDER | SWT.READ_ONLY);
-
- // Create the table control.
- Table table = _viewer.getTable();
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData data = GridUtil.createFill();
- data.heightHint = 30;
- data.widthHint = 80;
- table.setLayoutData(data);
-
- TableLayout tableLayout = new TableLayout();
-
- TableColumn toColumn = new TableColumn(table, SWT.LEFT);
- toColumn.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PREF_ISSUED_TO));
- tableLayout.addColumnData(new ColumnPixelData(90));
-
- TableColumn frmColumn = new TableColumn(table, SWT.LEFT);
- frmColumn.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PREF_ISSUED_FROM));
- tableLayout.addColumnData(new ColumnPixelData(90));
-
- TableColumn expColumn = new TableColumn(table, SWT.RIGHT);
- expColumn.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PREF_EXPIRES));
- tableLayout.addColumnData(new ColumnPixelData(180));
- table.setLayout(tableLayout);
-
- // Adjust the table viewer.
- String[] properties = new String[] {"STRING", "STRING", "NUMBER"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- _viewer.setColumnProperties(properties);
- _viewer.setContentProvider(new CertTableContentProvider());
- _viewer.setLabelProvider(new NewCertTableLabelProvider());
-
- for (int i = 0; i < _certificates.size(); i++)
- {
- _viewer.add(getElement(_certificates.get(i)));
- }
- }
-
-
-
- public void handleEvent(Event e)
- {
- if (e.widget == _propertiesButton)
- {
- IStructuredSelection sel = (IStructuredSelection)_viewer.getSelection();
- sel.getFirstElement();
-
- X509CertificatePropertiesDialog dlg = new X509CertificatePropertiesDialog(getShell(), (X509CertificateElement)sel.getFirstElement());
- dlg.open();
- }
- }
-
- public X509CertificateElement getElement(Object cert)
- {
- if (cert instanceof X509Certificate)
- {
- return new X509CertificateElement(null,
- UniversalSecurityProperties.RESID_SECURITY_TRUSTED_CERTIFICATE,
- (X509Certificate)cert);
- }
- return null;
- }
-
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return _propertiesButton;
- }
-
- /**
- * Init values using input data
- */
- protected void initializeInput()
- {
- }
-
-
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
-
- return true;
- }
-
-
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- return true;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/.classpath b/rse/plugins/org.eclipse.rse.eclipse.filesystem/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/.cvsignore b/rse/plugins/org.eclipse.rse.eclipse.filesystem/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/.project b/rse/plugins/org.eclipse.rse.eclipse.filesystem/.project
deleted file mode 100644
index e6bafed58..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.eclipse.filesystem</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.eclipse.filesystem/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.eclipse.filesystem/META-INF/MANIFEST.MF
deleted file mode 100644
index f2c05313c..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.eclipse.filesystem; singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.eclipse.filesystem.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.filesystem,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.services,
- org.eclipse.rse.files.ui,
- org.eclipse.core.resources,
- org.eclipse.rse.ui,
- org.eclipse.ui.ide,
- org.eclipse.rse.core
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.html b/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.ini b/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.mappings b/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.properties b/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.properties
deleted file mode 100644
index 3b6483209..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer Eclipse Filesystem (EFS) Support\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/build.properties b/rse/plugins/org.eclipse.rse.eclipse.filesystem/build.properties
deleted file mode 100644
index 4eeb1202b..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- eclipse32.png,\
- plugin.properties,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/eclipse32.png b/rse/plugins/org.eclipse.rse.eclipse.filesystem/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/plugin.properties b/rse/plugins/org.eclipse.rse.eclipse.filesystem/plugin.properties
deleted file mode 100644
index 4241f9bc4..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-
-pluginName = RSE EFS Support
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/plugin.xml b/rse/plugins/org.eclipse.rse.eclipse.filesystem/plugin.xml
deleted file mode 100644
index 4e288efa6..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/plugin.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- id="org.eclipse.rse.eclipse.filesystem"
- point="org.eclipse.core.filesystem.filesystems">
- <filesystem scheme="rse">
- <run class="org.eclipse.rse.eclipse.filesystem.RSEFileSystem"/>
- </filesystem>
- </extension>
- <extension
- id="org.eclipse.rse.eclipse.filesystemSupport"
- point="org.eclipse.ui.ide.filesystemSupport">
- <filesystemContributor
- scheme="rse"
- class="org.eclipse.rse.eclipse.filesystem.RSEFileSystemContributor"
- label="RSE">
- </filesystemContributor>
- </extension>
-
- <!-- remote eclipse filesystem not properly supported yet-->
- <extension
- point="org.eclipse.rse.ui.popupMenus">
- <objectContribution
- adaptable="false"
- subsystemconfigurationCategory="files"
- typefilter="folder"
- id="org.eclipse.rse.eclipse.filesystem.createproject.">
- <visibility>
- <and>
- <objectClass name="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- </and>
- </visibility>
-
- <action
- label="Create Remote Project"
- tooltip="%ImportToProject.tooltip"
- class="org.eclipse.rse.eclipse.filesystem.ui.actions.CreateRemoteProjectActionDelegate"
- menubarPath="group.importexport"
- enablesFor="1"
- id="importToProject">
- </action>
- </objectContribution>
- </extension>
- <!-- -->
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/Activator.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/Activator.java
deleted file mode 100644
index ed1ac29f7..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/Activator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.eclipse.filesystem;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- RSECorePlugin.getDefault();
- RSEUIPlugin.getDefault();
- }
-
- /**
- * 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 Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.eclipse.filesystem", path);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/FileStoreConversionUtility.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/FileStoreConversionUtility.java
deleted file mode 100644
index c70d66d72..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/FileStoreConversionUtility.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.eclipse.filesystem;
-
-
-
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-
-public class FileStoreConversionUtility
-{
- public static IFileStore convert(IFileStore parent, IRemoteFile remoteFile)
- {
- return new RSEFileStoreRemoteFileWrapper(parent, remoteFile);
- }
-
- public static IFileStore[] convert(IFileStore parent, IRemoteFile[] remoteFiles)
- {
- IFileStore[] converted = new IFileStore[remoteFiles.length];
- for (int i = 0; i < remoteFiles.length; i++)
- {
- converted[i] = convert(parent, remoteFiles[i]);
- }
- return converted;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileStoreRemoteFileWrapper.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileStoreRemoteFileWrapper.java
deleted file mode 100644
index d56f52d11..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileStoreRemoteFileWrapper.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.eclipse.filesystem;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileInfo;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.filesystem.provider.FileInfo;
-import org.eclipse.core.filesystem.provider.FileStore;
-import org.eclipse.core.internal.filesystem.Messages;
-import org.eclipse.core.internal.filesystem.Policy;
-import org.eclipse.core.internal.resources.ModelObjectWriter;
-import org.eclipse.core.internal.resources.ProjectDescription;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-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.subsystems.files.core.subsystems.RemoteFileEmpty;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileStore
-{
- private IRemoteFile _remoteFile;
- private IRemoteFileSubSystem _subSystem;
- private IFileStore _parent;
- public RSEFileStoreRemoteFileWrapper(IFileStore parent, IRemoteFile remoteFile)
- {
- _remoteFile = remoteFile;
- _parent = parent;
- _subSystem = _remoteFile.getParentRemoteFileSubSystem();
- }
-
- public IRemoteFileSubSystem getRemoteFileSubSystem()
- {
- return _subSystem;
- }
-
- public String[] childNames(int options, IProgressMonitor monitor)
- {
- IPreferenceStore prefStore = RSEUIPlugin.getDefault().getPreferenceStore();
- //boolean origShowHidden = prefStore.getBoolean(ISystemPreferencesConstants.SHOWHIDDEN);
- prefStore.setValue(ISystemPreferencesConstants.SHOWHIDDEN, true);
-
- String[] names;
- if (!_remoteFile.isStale() && _remoteFile.hasContents(RemoteChildrenContentsType.getInstance()))
- {
- Object[] children = _remoteFile.getContents(RemoteChildrenContentsType.getInstance());
- names = new String[children.length];
-
- for (int i = 0; i < children.length; i++)
- {
- names[i] = ((IRemoteFile)children[i]).getName();
- }
- }
- else
- {
- try
- {
- IRemoteFile[] children = _subSystem.listFoldersAndFiles(_remoteFile, monitor);
- names = new String[children.length];
- for (int i = 0; i < children.length; i++)
- {
- names[i] = children[i].getName();
- }
- }
- catch (SystemMessageException e)
- {
- names = new String[0];
- }
- }
- prefStore.setValue(ISystemPreferencesConstants.SHOWHIDDEN, false);
- return names;
- }
-
- public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException
- {
- if (_remoteFile.isStale())
- {
- try
- {
- _remoteFile = _subSystem.getRemoteFileObject(_remoteFile.getAbsolutePath());
- }
- catch (Exception e)
- {
- }
- }
- FileInfo info = new FileInfo(getName());
- boolean exists = _remoteFile.exists();
- /*
- if (_remoteFile.getName().equals(".project") && _remoteFile.getLength() == 0)
- {
- info.setExists(false);
- }
- else
- */
- {
- info.setExists(exists);
- }
- if (exists)
- {
- info.setLastModified(_remoteFile.getLastModified());
- boolean isDir = _remoteFile.isDirectory();
- info.setDirectory(isDir);
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, !_remoteFile.canWrite());
- info.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, _remoteFile.isExecutable());
- info.setAttribute(EFS.ATTRIBUTE_ARCHIVE, _remoteFile.isArchive());
- info.setAttribute(EFS.ATTRIBUTE_HIDDEN, _remoteFile.isHidden());
-
- if (!isDir)
- {
- info.setLength(_remoteFile.getLength());
- }
- }
-
- info.setName(getName());
- return info;
- }
-
- public String getName()
- {
- return _remoteFile.getName();
- }
- public IFileStore getParent()
- {
- if (_parent == null)
- {
- _parent = new RSEFileStoreRemoteFileWrapper(null, _remoteFile.getParentRemoteFile());
- }
- return _parent;
- }
-
- public boolean isParentOf(IFileStore other)
- {
- if (other instanceof RSEFileStoreRemoteFileWrapper)
- {
- RSEFileStoreRemoteFileWrapper otherWrapper = (RSEFileStoreRemoteFileWrapper)other;
- RSEFileStoreRemoteFileWrapper parent = (RSEFileStoreRemoteFileWrapper)otherWrapper.getParent();
- return _remoteFile == parent._remoteFile;
- }
- else
- {
- return false;
- }
- }
-
- public synchronized InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException
- {
- if (_remoteFile.exists())
- {
- IFile file = null;
- if (_remoteFile.isFile() && _subSystem.isConnected())
- {
-
-
- if (_remoteFile.getName().equals(".project") && _remoteFile.getLength() == 0)
- {
- System.out.println("reading empty .project");
- InputStream stream = getDummyProjectFileStream();
- try
- {
- int size = stream.available();
- _subSystem.upload(stream, size, _remoteFile, "utf8", monitor);
- _remoteFile = _subSystem.getRemoteFileObject(_remoteFile.getAbsolutePath());
-
- }
- catch (Exception e)
- {
- }
- //return stream;
- /*
- try
- {
- // only temp file has contents
- file = (IFile)UniversalFileTransferUtility.getTempFileFor(_remoteFile);
- if (file == null || !file.exists())
- {
- file.create(null, true, monitor);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- */
- }
-
- if (file == null || !file.exists())
- {
- file = (IFile)UniversalFileTransferUtility.copyRemoteResourceToWorkspace(_remoteFile, monitor);
- if (file != null && !file.isSynchronized(IResource.DEPTH_ZERO))
- {
- /*
- try
- {
- file.refreshLocal(IFile.DEPTH_ZERO, monitor);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- */
- }
- }
- }
- else
- {
- file = (IFile)UniversalFileTransferUtility.getTempFileFor(_remoteFile);
- }
- if (!file.isSynchronized(IResource.DEPTH_ZERO) && !_remoteFile.getName().equals(".project"))
- {
- try
- {
- file.refreshLocal(IResource.DEPTH_ZERO, monitor);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- if (file != null)
- {
- if (file.isSynchronized(IResource.DEPTH_ZERO))
- {
- return file.getContents();
- }
- else
- {
- File osFile = file.getLocation().toFile();
- try
- {
- FileInputStream instream = new FileInputStream(osFile);
- return instream;
- }
- catch (Exception e)
- {
-
- }
- }
- }
- }
- return null;
- }
-
- private InputStream getDummyProjectFileStream()
- {
-
- IProjectDescription description = new ProjectDescription();
-// write the model to a byte array
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- try {
- new ModelObjectWriter().write(description, out);
- } catch (IOException e) {
-
- }
- byte[] newContents = out.toByteArray();
-
- ByteArrayInputStream in = new ByteArrayInputStream(newContents);
-
- return in;
- }
-
-
- public URI toURI()
- {
- try
- {
- String path = _remoteFile.getAbsolutePath();
- if (path.charAt(0) != '/')
- {
- path = "/" + path.replace('\\', '/');
- }
- return new URI("rse", _subSystem.getHost().getHostName(), path, null); //$NON-NLS-1$
- }
- catch (URISyntaxException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException
- {
- if (!_remoteFile.exists())
- {
- try
- {
- _subSystem.createFolder(_remoteFile);
- _remoteFile = _subSystem.getRemoteFileObject(_remoteFile.getAbsolutePath());
- }
- catch (Exception e)
- {
- }
- }
- return this;
- }
-
- public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- File file = null;
- try {
- // create temp file first
- if (!_remoteFile.exists())
- {
- _subSystem.createFile(_remoteFile);
- _remoteFile = _subSystem.getRemoteFileObject(_remoteFile.getAbsolutePath());
- }
- SystemEditableRemoteFile editable = new SystemEditableRemoteFile(_remoteFile);
- editable.download(monitor);
- IFile localFile = editable.getLocalResource();
- file = localFile.getLocation().toFile();
-
- monitor.beginTask(null, 1);
-
- return new FileOutputStream(file, (options & EFS.APPEND) != 0);
- }
- catch (FileNotFoundException e)
- {
- //checkReadOnlyParent(file, e);
- String message;
- String path = _remoteFile.getAbsolutePath();
- if (file.isDirectory())
- message = NLS.bind(Messages.notAFile, path);
- else
- message = NLS.bind(Messages.couldNotWrite, path);
- Policy.error(EFS.ERROR_WRITE, message, e);
- return null;
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- finally {
- monitor.done();
- }
- return null;
- }
-
- public IFileStore getChild(IPath path)
- {
- IFileStore result = this;
- for (int i = 0, imax = path.segmentCount(); i < imax; i++)
- {
- String segment = path.segment(i);
- result = result.getChild(segment);
- }
-
- return result;
- }
-
- public IFileStore getChild(String name)
- {
- if (!_remoteFile.isStale() && _remoteFile.hasContents(RemoteChildrenContentsType.getInstance(), name))
- {
- Object[] children = _remoteFile.getContents(RemoteChildrenContentsType.getInstance(), name);
- if (children != null && children.length > 0)
- {
- return FileStoreConversionUtility.convert(_parent, (IRemoteFile)children[0]);
- }
- else
- {
- // need empty one
- try
- {
- IRemoteFile child = _subSystem.getRemoteFileObject(_remoteFile, name);
- return FileStoreConversionUtility.convert(_parent, child);
- }
- catch (Exception e)
- {
-
- }
- }
- }
- else if (_remoteFile.isDirectory())
- {
- try
- {
- IRemoteFile child = _subSystem.getRemoteFileObject(_remoteFile, name);
- return FileStoreConversionUtility.convert(_parent, child);
- }
- catch (Exception e)
- {
-
- }
-
- }
- return null;
- }
-
- public File toLocalFile(int options, IProgressMonitor monitor) throws CoreException
- {
- IResource file = null;
- if (_remoteFile.exists())
- {
-
- if (_remoteFile.isFile() && _subSystem.isConnected())
- {
- file = (IResource)UniversalFileTransferUtility.copyRemoteResourceToWorkspace(_remoteFile, monitor);
- }
- else
- {
- file = UniversalFileTransferUtility.getTempFileFor(_remoteFile);
- }
- // if (!file.isSynchronized(IFile.DEPTH_ZERO))
- // file.refreshLocal(IFile.DEPTH_ZERO, monitor);
- return file.getLocation().toFile();
- }
- else
- {
- if (_remoteFile.getName().equals(".project"))
- {
- file = UniversalFileTransferUtility.getTempFileFor(_remoteFile);
- return file.getLocation().toFile();
- }
- else if (_remoteFile instanceof RemoteFileEmpty)
- {
- try
- {
- return File.createTempFile(_remoteFile.getName(), "empty");
- }
- catch (Exception e)
- {
-
- }
- }
- }
- return null;
- }
-
- public void delete(int options, IProgressMonitor monitor) throws CoreException
- {
- try
- {
- _subSystem.delete(_remoteFile, monitor);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index f6c71a430..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystem.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.eclipse.filesystem;
-
-import java.net.URI;
-import java.util.HashMap;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.filesystem.provider.FileSystem;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.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.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-public class RSEFileSystem extends FileSystem
-{
- private static RSEFileSystem _instance = new RSEFileSystem();
- private HashMap _fileStoreMap;
-
- public RSEFileSystem()
- {
- super();
- _fileStoreMap = new HashMap();
- }
-
- public static RSEFileSystem getInstance()
- {
- return _instance;
- }
-
- public boolean canDelete()
- {
- return true;
- }
-
- public boolean canWrite()
- {
- return true;
- }
-
- public static IHost getConnectionFor(String hostName)
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IHost[] connections = sr.getHosts();
- IHost unconnected = null;
- for (int i = 0; i < connections.length; i++)
- {
- IHost con = connections[i];
- if (con.getHostName().equalsIgnoreCase(hostName))
- {
- boolean isConnected = false;
- IConnectorService[] connectorServices = con.getConnectorServices();
- for (int c = 0; c < connectorServices.length && !isConnected; c++)
- {
- IConnectorService serv = connectorServices[c];
- isConnected = serv.isConnected();
- }
- if (isConnected)
- return con;
- else
- unconnected = con;
- }
- }
- return unconnected;
- }
-
- public static IRemoteFileSubSystem getRemoteFileSubSystem(IHost host)
- {
- return RemoteFileUtility.getFileSubSystem(host);
- }
-
- public URI getURIFor(IRemoteFile file)
- {
- IFileStore fstore = FileStoreConversionUtility.convert(null, file);
- return fstore.toURI();
- }
-
- public IFileStore getStore(URI uri)
- {
- Object obj = _fileStoreMap.get(uri);
- if (obj != null)
- {
- RSEFileStoreRemoteFileWrapper store = (RSEFileStoreRemoteFileWrapper)obj;
- IRemoteFileSubSystem ss = store.getRemoteFileSubSystem();
- if (!ss.isConnected())
- {
- Shell shell = null;
-
- if (PlatformUI.isWorkbenchRunning())
- {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- try
- {
- ss.connect();
- }
- catch (Exception e)
- {
- return null;
- }
- }
- return store;
- }
- try
- {
- String path = uri.getPath();
- String hostName = uri.getHost();
- IHost con = getConnectionFor(hostName);
- if (con != null)
- {
- IRemoteFileSubSystem fs = getRemoteFileSubSystem(con);
- if (fs != null)
- {
-
- if (!fs.isConnected())
- {
-
-
- fs.getConnectorService().promptForPassword(false);
- fs.getConnectorService().connect(new NullProgressMonitor());
- //fs.connect(shell);
- }
- if (fs.isConnected())
- {
- IFileStore fstore = FileStoreConversionUtility.convert(null, fs.getRemoteFileObject(path));
- _fileStoreMap.put(uri, fstore);
- return fstore;
- }
-
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- return EFS.getNullFileSystem().getStore(uri);
-
- //return FileStoreConversionUtility.convert(null, new RemoteFileEmpty());
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystemContributor.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystemContributor.java
deleted file mode 100644
index 77c09484f..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystemContributor.java
+++ /dev/null
@@ -1,111 +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.eclipse.filesystem;
-
-import java.net.URI;
-
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ide.fileSystem.FileSystemContributor;
-import org.eclipse.ui.internal.ide.dialogs.IDEResourceInfoUtils;
-
-public class RSEFileSystemContributor extends FileSystemContributor {
-
-
- public URI browseFileSystem(String initialPath, Shell shell)
- {
- SystemRemoteFolderDialog dlg = new SystemRemoteFolderDialog(shell, "Select Folder");
-
-
- //SystemSelectRemoteFileOrFolderDialog dlg = new SystemSelectRemoteFileOrFolderDialog(shell, "Select File", false);
- /*
- DirectoryDialog dialog = new DirectoryDialog(shell);
- dialog
- .setMessage(IDEWorkbenchMessages.ProjectLocationSelectionDialog_directoryLabel);
- */
- if (!initialPath.equals(IDEResourceInfoUtils.EMPTY_STRING))
- {
- try
- {
- URI uri = new URI(initialPath);
- IHost host = RSEFileSystem.getConnectionFor(uri.getHost());
- IRemoteFileSubSystem fs = RSEFileSystem.getRemoteFileSubSystem(host);
- dlg.setInputObject(fs.getRemoteFileObject(uri.getPath()));
- }
- catch (Exception e)
- {
-
- }
- }
-
- dlg.setNeedsProgressMonitor(true);
-
- /*
- String selectedDirectory = dialog.open();
- if (selectedDirectory == null) {
- return null;
- }
- return new File(selectedDirectory).toURI();
- */
- if (dlg.open() == Window.OK)
- {
- Object selected = dlg.getSelectedObject();
- if (selected instanceof ISystemFilterReference)
- {
- ISubSystem targetSubSystem = ((ISystemFilterReference)selected).getSubSystem();
- ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
- if (factory.supportsDropInFilters())
- {
- selected = targetSubSystem.getTargetForFilter((ISystemFilterReference)selected);
- }
- }
- IRemoteFile file = (IRemoteFile)selected;
- String path = file.getAbsolutePath();
- IHost host = dlg.getSelectedConnection();
- String hostName = host.getHostName();
- try
- {
- return new URI("rse", hostName, path, null); //$NON-NLS-1$
- }
- catch (Exception e)
- {
-
- }
- }
- return null;
-
- }
-
- public URI getURI(String string){
- try
- {
- return new URI(string);
- }
- catch (Exception e)
- {
- }
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/ui/actions/CreateRemoteProjectActionDelegate.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/ui/actions/CreateRemoteProjectActionDelegate.java
deleted file mode 100644
index a1206ffc8..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/ui/actions/CreateRemoteProjectActionDelegate.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.eclipse.filesystem.ui.actions;
-
-import java.net.URI;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.eclipse.filesystem.RSEFileSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-
-
-public class CreateRemoteProjectActionDelegate implements IActionDelegate {
-
- protected IStructuredSelection fSelection;
-
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action)
- {
- IRemoteFile directory = (IRemoteFile)fSelection.getFirstElement();
- createRemoteProject(directory, new NullProgressMonitor());
-
- }
-
-
- private IProject createRemoteProject(IRemoteFile directory, IProgressMonitor monitor)
- {
-
- IWorkspaceRoot root = SystemBasePlugin.getWorkspaceRoot();
-
- IProject editProject = root.getProject(directory.getName());
-
- if ((editProject != null) && (editProject.exists()) && (editProject.isOpen()))
- {
- return editProject;
- }
-
- if (editProject == null)
- {
- // log error and throw an exception
- }
-
- try
- {
-
-
-
- IProjectDescription description = root.getWorkspace().newProjectDescription(directory.getName());
- URI location = RSEFileSystem.getInstance().getURIFor(directory);
- description.setLocationURI(location);
-
-
-
- //description.setReferencedProjects(new IProject[]{SystemResourceManager.getRemoteSystemsTempFilesProject()});
- editProject.create(description, monitor);
-
-
- editProject.open(monitor);
-
- editProject.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- SystemBasePlugin.logError("Error creating temp project", e);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return editProject;
- }
-
- /**
- * Sets the selection. The selection is only set if given a structured selection, otherwise it is set to an
- * empty structured selection.
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
-
- if (selection instanceof IStructuredSelection) {
- fSelection = (IStructuredSelection)selection;
- }
- else {
- fSelection = StructuredSelection.EMPTY;
- }
- }
-
- /**
- * Returns the remote file in the selection.
- * Use this method if this action allows only a single remote file selection.
- * @return the single remote file.
- */
- protected IRemoteFile getRemoteFile(IStructuredSelection selection) {
- return (IRemoteFile)selection.getFirstElement();
- }
-
- /**
- * Returns the remote files in the selection.
- * Use this method if this action allows multiple remote file selection.
- * @return an array of remote files.
- */
- protected IRemoteFile[] getRemoteFiles(IStructuredSelection selection) {
-
- IRemoteFile[] files = new IRemoteFile[selection.size()];
- Iterator iter = selection.iterator();
-
- int i = 0;
-
- while (iter.hasNext()) {
- files[i++] = (IRemoteFile)iter.next();
- }
-
- return files;
- }
-
- /**
- * Returns the description file for the first description file in
- * the selection. Use this method if this action allows only
- * a single file selection.
- * @return the single description file.
- */
- protected IFile getDescriptionFile(IStructuredSelection selection) {
- return (IFile)selection.getFirstElement();
- }
-
- /**
- * Returns a description file for each description file in
- * the selection. Use this method if this action allows multiple
- * selection.
- * @return an array of description files.
- */
- protected IFile[] getDescriptionFiles(IStructuredSelection selection) {
- IFile[] files = new IFile[selection.size()];
- Iterator iter = selection.iterator();
-
- int i = 0;
-
- while (iter.hasNext()) {
- files[i++] = (IFile)iter.next();
- }
-
- return files;
- }
-
- /**
- * Returns the workbench.
- * @return the workbench.
- */
- protected IWorkbench getWorkbench() {
- return PlatformUI.getWorkbench();
- }
-
- /**
- * Returns the active shell.
- * @return the active shell.
- */
- protected Shell getShell() {
- return Display.getDefault().getActiveShell();
- }
-
- /**
- * Returns the selection.
- * @return the selection.
- */
- protected IStructuredSelection getSelection() {
- return fSelection;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/.classpath b/rse/plugins/org.eclipse.rse.files.ui/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.files.ui/.cvsignore b/rse/plugins/org.eclipse.rse.files.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.files.ui/.project b/rse/plugins/org.eclipse.rse.files.ui/.project
deleted file mode 100644
index dd7880b80..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.files.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.pde.prefs b/rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 89c669191..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-#Wed Nov 08 19:35:51 MET 2006
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=1
-compilers.p.unresolved-import=0
-compilers.use-project=true
-eclipse.preferences.version=1
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
deleted file mode 100644
index 9e6b4a448..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,34 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.files.ui;singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.rse.files.ui.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.core.resources,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.jface.text,
- org.eclipse.search,
- org.eclipse.compare,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.ui,
- org.eclipse.rse.core
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.files.ui,
- org.eclipse.rse.files.ui.actions,
- org.eclipse.rse.files.ui.compare,
- org.eclipse.rse.files.ui.dialogs,
- org.eclipse.rse.files.ui.propertypages,
- org.eclipse.rse.files.ui.resources,
- org.eclipse.rse.files.ui.search,
- org.eclipse.rse.files.ui.view,
- org.eclipse.rse.files.ui.widgets,
- org.eclipse.rse.files.ui.wizards
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.files.ui/about.html b/rse/plugins/org.eclipse.rse.files.ui/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/build.properties b/rse/plugins/org.eclipse.rse.files.ui/build.properties
deleted file mode 100644
index 03a717010..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- about.html,\
- icons/,\
- plugin.properties,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/system_search.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/system_search.gif
deleted file mode 100644
index e8038543c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/system_search.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfile.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfile.gif
deleted file mode 100644
index a966159d9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfiles_obj.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfiles_obj.gif
deleted file mode 100644
index 9d35f1728..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfiles_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfileslive_obj.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfileslive_obj.gif
deleted file mode 100644
index 5d5686979..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfileslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfolder.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfolder.gif
deleted file mode 100644
index 5ae555a34..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemfolder.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systeminfo.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systeminfo.gif
deleted file mode 100644
index 745b884ff..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systeminfo.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemlocal_obj.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemlocal_obj.gif
deleted file mode 100644
index d60c188ca..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemlocal_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemlocallive_obj.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemlocallive_obj.gif
deleted file mode 100644
index ba10dec0a..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemlocallive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdrive.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdrive.gif
deleted file mode 100644
index fd426343b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdrive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdriveopen.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdriveopen.gif
deleted file mode 100644
index 2171f7c38..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemrootdriveopen.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemsearchresult.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemsearchresult.gif
deleted file mode 100644
index 77bbe12aa..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/obj16/systemsearchresult.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/archive_ovr.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/archive_ovr.gif
deleted file mode 100644
index b48106793..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/archive_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/binary_ovr.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/binary_ovr.gif
deleted file mode 100644
index 16fee8680..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/binary_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_binary_ovr.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_binary_ovr.gif
deleted file mode 100644
index 99c624352..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_binary_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_ovr.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_ovr.gif
deleted file mode 100644
index 13077f940..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exec_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exscript_ovr.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exscript_ovr.gif
deleted file mode 100644
index 17d61ba50..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/exscript_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/shared_objunix_ovr.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/shared_objunix_ovr.gif
deleted file mode 100644
index e79e16de8..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/shared_objunix_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/sharedlib_ovr.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/sharedlib_ovr.gif
deleted file mode 100644
index 04e5d9a3f..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/sharedlib_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/symblclnk_ovr.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/symblclnk_ovr.gif
deleted file mode 100644
index 7e0fe3c48..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/symblclnk_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/virtual_tsk.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/virtual_tsk.gif
deleted file mode 100644
index d64526181..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/ovr16/virtual_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.files.ui/plugin.properties b/rse/plugins/org.eclipse.rse.files.ui/plugin.properties
deleted file mode 100644
index 251d775b2..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/plugin.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE Files UI
-providerName = Eclipse.org
-
-PreferencePage.UniversalFiles = Files
-PreferencePage.Cache = File Cache
-
-RemotePropertyPage.File.Info = Info
-PropertyPage.EnvVariables = Environment Variables
-
-PropertyPage.ServerLauncherSettings = Server Launcher Settings
-PropertyPage.ServerConnectionSecurity = Server Connection Security
-PropertyPage.Service = Service
-
-# View Filters
-ViewFilter.RSEConnections=Remote System Explorer Connections
-ViewFilter.RSETempFiles=Remote System Explorer File Cache
-
-# Decorators
-LinkDecorator.label=Link Decorator
-LibraryDecorator.label=Library Decorator
-JavaExecutableDecorator.label=Java Executable Decorator
-BinaryExecutableDecorator.label=Binary Executable Decorator
-VirtualObjectDecorator.label=Virtual Object Decorator
-ScriptExecutableDecorator.label=Script Executable Decorator
-VirtualObjectDecorator.label=Virtual Object Decorator
-
-
-Search.Page = Remote Search
-searchMenu.label = Se&arch
-Remote.Search = &Remote...
-Remote.Search.tooltip = Opens Remote Search dialog page for text and file searching on remote systems \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/plugin.xml b/rse/plugins/org.eclipse.rse.files.ui/plugin.xml
deleted file mode 100644
index 62e4beeaa..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/plugin.xml
+++ /dev/null
@@ -1,349 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%PreferencePage.UniversalFiles"
- category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
- class="org.eclipse.rse.files.ui.propertypages.UniversalPreferencePage"
- id="org.eclipse.rse.files.ui.UniversalFilesPreferences">
- </page>
-
- <page
- name="%PreferencePage.Cache"
- category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
- class="org.eclipse.rse.files.ui.propertypages.SystemCachePreferencePage"
- id="org.eclipse.rse.core.ui.preferences.SystemCachePreferencePage">
- </page>
- </extension>
-
-
-
-<!-- ============================================ -->
-<!-- Define Remote Object Properties Pages -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.rse.ui.propertyPages">
- <page
- name="%RemotePropertyPage.File.Info"
- typecategoryfilter="files"
- class="org.eclipse.rse.files.ui.propertypages.SystemFilePropertyPage"
- id="org.eclipse.rse.files.PropertyPage">
- </page>
- </extension>
-
-
-
-<!-- ============================================ -->
-<!-- Define Workbench Properties Pages -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.ui.propertyPages">
-<!--
- <page
- objectClass="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem"
- name="%PropertyPage.EnvVariables"
- class="org.eclipse.rse.core.ui.propertypages.EnvironmentVariablesPropertyPage"
- id="org.eclipse.rse.EnvironmentVariablesPropertyPage">
- <filter name="envVarPP" value="true"/>
- </page>
--->
- <page
- objectClass="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem"
- name="%PropertyPage.ServerLauncherSettings"
- class="org.eclipse.rse.ui.propertypages.ServerLauncherPropertyPage"
- id="org.eclipse.rse.ui.propertypages.ServerLauncherPropertyPage">
- <filter name="serverLaunchPP" value="true"/>
- </page>
-
-
- <page
- objectClass="org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem"
- name="%PropertyPage.Service"
- class="org.eclipse.rse.files.ui.propertypages.FileServicesPropertyPage"
- id="org.eclipse.rse.files.ui.propertypages.FileServicesPropertyPage">
- </page>
-
- </extension>
-
-
-
-<!-- ================================================================= -->
-<!-- Flag file types used by the RemoteSystemsConnection project for -->
-<!-- more intelligent team sync support -->
-<!-- ================================================================= -->
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes extension="xmi" type="text"/>
- </extension>
-
-<!-- ================================================================= -->
-<!-- Hide RemoteSystemsConnections and RemoteSystemsTempFiles -->
-<!-- in the Navigator view -->
-<!-- ================================================================= -->
- <extension
- point="org.eclipse.ui.ide.resourceFilters">
- <filter
- selected="true"
- pattern="RemoteSystemsConnections">
- </filter>
- <filter
- selected="true"
- pattern="RemoteSystemsTempFiles">
- </filter>
- </extension>
-
-
-
-<!-- ================================================================= -->
-<!-- Hide RemoteSystemsConnections and RemoteSystemsTempFiles -->
-<!-- in the JDT view -->
-<!-- ================================================================= -->
- <extension
- point="org.eclipse.jdt.ui.javaElementFilters">
- <filter
- targetId="org.eclipse.jdt.ui.PackageExplorer"
- name="%ViewFilter.RSEConnections"
- enabled="true"
- description=""
- pattern="RemoteSystemsConnections">
- </filter>
- <filter
- targetId="org.eclipse.jdt.ui.PackageExplorer"
- name="%ViewFilter.RSETempFiles"
- enabled="true"
- description=""
- pattern="RemoteSystemsTempFiles">
- </filter>
- </extension>
-
-<!-- ================================================================= -->
-<!-- Hide RemoteSystemsConnections and RemoteSystemsTempFiles -->
-<!-- in the CDT CView -->
-<!-- ================================================================= -->
- <extension
- point="org.eclipse.cdt.ui.CElementFilters">
- <filter
- targetId="org.eclipse.cdt.ui.CView"
- name="%ViewFilter.RSEConnections"
- enabled="true"
- description=""
- pattern="RemoteSystemsConnections">
- </filter>
- <filter
- targetId="org.eclipse.cdt.ui.CView"
- name="%ViewFilter.RSETempFiles"
- enabled="true"
- description=""
- pattern="RemoteSystemsTempFiles">
- </filter>
- </extension>
-
-
-<!-- ================================================================= -->
-<!-- Add a search page for universal, i.e. Linux, Windows and Local == -->
-<!-- ================================================================= -->
- <extension
- point="org.eclipse.search.searchPages">
- <page
- tabPosition="0"
- label="%Search.Page"
- enabled="true"
- icon="icons/full/obj16/system_search.gif"
- class="org.eclipse.rse.files.ui.search.SystemSearchPage"
- sizeHint="250,160"
- id="org.eclipse.rse.files.ui.search.searchPage">
- </page>
- </extension>
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%Remote.Search"
- visible="true"
- id="org.eclipse.rse.core.search.searchActionSet">
- <menu
- label="%searchMenu.label"
- path="navigate"
- id="org.eclipse.search.menu">
- <groupMarker
- name="internalDialogGroup">
- </groupMarker>
- <groupMarker
- name="dialogGroup">
- </groupMarker>
- <separator
- name="contextMenuActionsGroup">
- </separator>
- </menu>
- <action
- label="%Remote.Search"
- tooltip="%Remote.Search.tooltip"
- helpContextId="org.eclipse.rse.core.rsac0000"
- icon="icons/full/obj16/system_search.gif"
- class="org.eclipse.rse.files.ui.search.SystemOpenSearchPageAction"
- menubarPath="org.eclipse.search.menu/dialogGroup"
- id="org.eclipse.rse.core.search.searchAction">
- </action>
- </actionSet>
- </extension>
-
-<!-- ================================================================= -->
-<!-- Add handlers for ZIP, TAR, and JAR archive files == -->
-<!-- ================================================================= -->
- <extension
- point="org.eclipse.rse.ui.archivehandlers">
- <archivehandler
- fileNameExtension="zip"
- name="SystemZipHandler"
- class="org.eclipse.rse.services.clientserver.archiveutils.SystemZipHandler"
- id="org.eclipse.rse.services.clientserver.archiveutils.systemziphandler">
- </archivehandler>
- <archivehandler
- fileNameExtension="jar"
- name="SystemJarHandler"
- class="org.eclipse.rse.services.clientserver.archiveutils.SystemJarHandler"
- id="org.eclipse.rse.services.clientserver.archiveutils.systemjarhandler">
- </archivehandler>
- <archivehandler
- fileNameExtension="tar"
- name="SystemTarHandler"
- class="org.eclipse.rse.services.clientserver.archiveutils.SystemTarHandler"
- id="org.eclipse.rse.services.clientserver.archiveutils.systemtarhandler">
- </archivehandler>
- </extension>
-
-<!-- ================================================================= -->
-<!-- Add default mount path mapper == -->
-<!-- ================================================================= -->
- <extension
- point="org.eclipse.rse.ui.mountPathMappers">
- <mountPathMapper
- name="DefaultMountPathMapper"
- class="org.eclipse.rse.files.ui.resources.DefaultMountPathMapper"
- id="org.eclipse.rse.core.resources.defaultmountpathmapper">
- </mountPathMapper>
- </extension>
-
-
-
-<!-- ================================================================= -->
-<!-- Add decorator for virtual, executable and link files -->
-<!-- ================================================================= -->
- <extension point="org.eclipse.ui.decorators">
- <decorator
- id="org.eclipse.rse.core.virtualobject.decorator"
- label="%VirtualObjectDecorator.label"
- state="true"
- lightweight="true"
- icon="icons/full/ovr16/virtual_tsk.gif"
- location="BOTTOM_RIGHT">
- <enablement>
- <and>
- <objectClass name="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- <objectState name="isVirtual" value="true"/>
- </and>
- </enablement>
- </decorator>
- <decorator
- id="org.eclipse.rse.core.binary.executable.decorator"
- label="%BinaryExecutableDecorator.label"
- state="true"
- lightweight="true"
- icon="icons/full/ovr16/exec_binary_ovr.gif"
- location="BOTTOM_LEFT">
- <enablement>
- <and>
- <objectClass name="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- <objectState name="classification" value="*executable*"/>
- </and>
- </enablement>
- </decorator>
- <decorator
- id="org.eclipse.rse.core.script.executable.decorator"
- label="%ScriptExecutableDecorator.label"
- state="true"
- lightweight="true"
- icon="icons/full/ovr16/exscript_ovr.gif"
- location="BOTTOM_LEFT">
- <enablement>
- <and>
- <objectClass name="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- <or>
- <objectState name="classification" value="symbolic link(script)*"/>
- <and>
- <objectState name="classification" value="*script*"/>
- <objectState name="classification" value="*executable*"/>
- </and>
- </or>
- </and>
- </enablement>
- </decorator>
- <decorator
- id="org.eclipse.rse.core.java.executable.decorator"
- label="%JavaExecutableDecorator.label"
- state="true"
- lightweight="true"
- icon="icons/full/ovr16/exec_ovr.gif"
- location="BOTTOM_LEFT">
- <enablement>
- <and>
- <objectClass name="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- <objectState name="classification" value="*executable(java:*)*"/>
- </and>
- </enablement>
- </decorator>
- <decorator
- id="org.eclipse.rse.core.library.decorator"
- label="%LibraryDecorator.label"
- state="true"
- lightweight="true"
- icon="icons/full/ovr16/sharedlib_ovr.gif"
- location="BOTTOM_LEFT">
- <enablement>
- <and>
- <objectClass name="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- <or>
- <objectState name="classification" value="*module*"/>
- <objectState name="classification" value="*archive*"/>
- <objectState name="classification" value="*shared object*"/>
- <objectState name="extension" value="so a so so.*"/>
- </or>
- </and>
- </enablement>
- </decorator>
- <decorator
- id="org.eclipse.rse.core.link.decorator"
- label="%LinkDecorator.label"
- state="true"
- lightweight="true"
- icon="icons/full/ovr16/symblclnk_ovr.gif"
- location="TOP_LEFT">
- <enablement>
- <and>
- <objectClass name="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- <objectState name="classification" value="symbolic link*"/>
- </and>
- </enablement>
- </decorator>
-
- </extension>
-
-</plugin>
- \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/Activator.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/Activator.java
deleted file mode 100644
index 815d02980..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/Activator.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui;
-
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.files.ui.resources.SystemUniversalTempFileListener;
-import org.eclipse.rse.files.ui.view.RemoteFileSubSystemConfigurationAdapterFactory;
-import org.eclipse.rse.files.ui.view.SystemViewFileAdapterFactory;
-import org.eclipse.rse.files.ui.view.SystemViewSearchResultAdapterFactory;
-import org.eclipse.rse.files.ui.view.SystemViewSearchResultSetAdapterFactory;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- private static SystemUniversalTempFileListener _tempFileListener;
-
- private SystemViewFileAdapterFactory svfaf; // for fastpath
- private SystemViewSearchResultSetAdapterFactory svsaf; // for fastpath
- private SystemViewSearchResultAdapterFactory svsraf; // for fastpath
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- // refresh the remote edit project at plugin startup, to ensure
- // it's never closed
- SystemRemoteEditManager.getDefault().refreshRemoteEditProject();
-
-
- int eventMask = IResourceChangeEvent.POST_CHANGE;
- IWorkspace ws = SystemBasePlugin.getWorkspace();
-
-
-
-
- IAdapterManager manager = Platform.getAdapterManager();
-
- svfaf = new SystemViewFileAdapterFactory();
- svfaf.registerWithManager(manager);
-
-
-
- svsaf = new SystemViewSearchResultSetAdapterFactory();
- svsaf.registerWithManager(manager);
-
- svsraf = new SystemViewSearchResultAdapterFactory();
- svsraf.registerWithManager(manager);
-
- RemoteFileSubSystemConfigurationAdapterFactory rfssfaf = new RemoteFileSubSystemConfigurationAdapterFactory();
- rfssfaf.registerWithManager(manager);
-
- // universal temp file listener
- _tempFileListener = SystemUniversalTempFileListener.getListener();
- // add listener for temp files
- ws.addResourceChangeListener(_tempFileListener, eventMask);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception
- {
- super.stop(context);
-
- IWorkspace ws = SystemBasePlugin.getWorkspace();
- ws.removeResourceChangeListener(_tempFileListener);
- _tempFileListener = null;
- plugin = null;
-
-
-
- }
-
- /**
- * Returns the shared instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.files.ui", path);
- }
-
- /**
- * For pathpath access to our adapters for remote universal file objects. Exploits the knowledge we use singleton adapters.
- */
- public SystemViewFileAdapterFactory getSystemViewFileAdapterFactory()
- {
- return svfaf;
- }
-
- /**
- * For pathpath access to our adapters for searchable result output objects. Exploits the knowledge we use singleton adapters.
- */
- public SystemViewSearchResultSetAdapterFactory getSystemViewSearchResultSetAdapterFactory()
- {
- return svsaf;
- }
-
- /**
- * For pathpath access to our adapters for searchable result output objects. Exploits the knowledge we use singleton adapters.
- */
- public SystemViewSearchResultAdapterFactory getSystemViewSearchResultAdapterFactory()
- {
- return svsraf;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.java
deleted file mode 100644
index 604ff550b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class FileResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.files.ui.FileResources";
-
- public static String RESID_FILES_PREFERENCES_BUFFER;
- public static String RESID_FILES_PREFERENCES_DOWNLOAD_BUFFER_SIZE_LABEL;
- public static String RESID_FILES_PREFERENCES_UPLOAD_BUFFER_SIZE_LABEL;
- public static String RESID_FILES_PREFERENCES_DOWNLOAD_BUFFER_SIZE_TOOLTIP;
- public static String RESID_FILES_PREFERENCES_UPLOAD_BUFFER_SIZE_TOOLTIP;
-
- public static String ResourceNavigator_openWith;
- public static String RSEOperation_message;
-
- // --- File Editors ---
- public static String FileEditorPreference_fileTypes;
- public static String FileEditorPreference_add;
- public static String FileEditorPreference_remove;
- public static String FileEditorPreference_associatedEditors;
- public static String FileEditorPreference_addEditor;
- public static String FileEditorPreference_removeEditor;
- public static String FileEditorPreference_default;
- public static String FileEditorPreference_existsTitle;
- public static String FileEditorPreference_existsMessage;
- public static String FileEditorPreference_defaultLabel;
- public static String FileEditorPreference_contentTypesRelatedLink;
- public static String FileEditorPreference_isLocked;
-
- public static String FileExtension_fileTypeMessage;
- public static String FileExtension_fileTypeLabel;
- public static String FileExtension_shellTitle;
- public static String FileExtension_dialogTitle;
-
- public static String DefaultEditorDescription_name;
-
- // EXTRACT ARCHIVE TO DIALOG...
- public static String RESID_EXTRACTTO_TITLE;
- public static String RESID_EXTRACTTO_PROMPT;
-
- // COMBINE ARCHIVES DIALOG...
- public static String RESID_COMBINE_TITLE;
- public static String RESID_COMBINE_PROMPT;
- public static String RESID_COMBINE_NAME_LABEL;
- public static String RESID_COMBINE_NAME_TOOLTIP;
- public static String RESID_COMBINE_TYPE_LABEL;
- public static String RESID_COMBINE_TYPE_TOOLTIP;
-
- // CONVERT ARCHIVE DIALOG...
- public static String RESID_CONVERT_TITLE;
- public static String RESID_CONVERT_PROMPT;
- public static String RESID_CONVERT_LOCATION;
- public static String RESID_CONVERT_NAMEANDTYPE;
-
- // ADD TO ARCHIVE DIALOG...
- public static String RESID_ADDTOARCHIVE_TITLE;
- public static String RESID_ADDTOARCHIVE_PROMPT;
- public static String RESID_ADDTOARCHIVE_LOCATION;
- public static String RESID_ADDTOARCHIVE_NAMEANDTYPE;
- public static String RESID_ADDTOARCHIVE_SAVEPATH_LABEL;
- public static String RESID_ADDTOARCHIVE_SAVEPATH_TOOLTIP;
- public static String RESID_ADDTOARCHIVE_RELATIVETO_LABEL;
- public static String RESID_ADDTOARCHIVE_RELATIVETO_TOOLTIP;
-
- // NEW FILE WIZARD...
- public static String RESID_NEWFILE_TITLE;
- public static String RESID_NEWFILE_PAGE1_TITLE;
- public static String RESID_NEWFILE_PAGE1_DESCRIPTION;
- public static String RESID_NEWFILE_NAME_LABEL;
- public static String RESID_NEWFILE_NAME_TOOLTIP;
- public static String RESID_NEWFILE_FOLDER_LABEL;
- public static String RESID_NEWFILE_FOLDER_TIP;
- public static String RESID_NEWFILE_CONNECTIONNAME_LABEL;
- public static String RESID_NEWFILE_CONNECTIONNAME_TIP;
-
- // NEW FOLDER WIZARD...
- public static String RESID_NEWFOLDER_TITLE;
- public static String RESID_NEWFOLDER_PAGE1_TITLE;
- public static String RESID_NEWFOLDER_PAGE1_DESCRIPTION;
- public static String RESID_NEWFOLDER_NAME_LABEL;
- public static String RESID_NEWFOLDER_NAME_TOOLTIP;
- public static String RESID_NEWFOLDER_FOLDER_LABEL;
- public static String RESID_NEWFOLDER_FOLDER_TIP;
- public static String RESID_NEWFOLDER_CONNECTIONNAME_LABEL;
- public static String RESID_NEWFOLDER_CONNECTIONNAME_TIP;
-
- // ---------------------------------------------------
- // PREFERENCES FOR UNIVERSAL FILE SYSTEM ...
- // ---------------------------------------------------
-
- public static String RESID_PREF_UNIVERSAL_FILES_TITLE;
- public static String RESID_PREF_UNIVERSAL_SHOWHIDDEN_LABEL;
-
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_TYPE_LABEL;
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_TYPE_TOOLTIP;
-
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_TABLECOL_LABEL;
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_TABLECOL_TOOLTIP;
-
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_ADDBUTTON_LABEL;
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_ADDBUTTON_TOOLTIP;
-
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_REMOVEBUTTON_LABEL;
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_REMOVEBUTTON_TOOLTIP;
-
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_LABEL;
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TOOLTIP;
-
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_LABEL;
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_TOOLTIP;
-
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_LABEL;
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_TOOLTIP;
-
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_DEFAULT_MODE_LABEL;
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_DEFAULT_MODE_TOOLTIP;
-
- // Search constants
- // Search dialog constants
- // search string controls
- public static String RESID_SEARCH_STRING_LABEL_LABEL;
- public static String RESID_SEARCH_STRING_LABEL_TOOLTIP;
-
- public static String RESID_SEARCH_STRING_COMBO_TOOLTIP;
-
- public static String RESID_SEARCH_CASE_BUTTON_LABEL;
- public static String RESID_SEARCH_CASE_BUTTON_TOOLTIP;
-
- public static String RESID_SEARCH_STRING_HINT_LABEL;
- public static String RESID_SEARCH_STRING_HINT_TOOLTIP;
-
- public static String RESID_SEARCH_STRING_REGEX_LABEL;
- public static String RESID_SEARCH_STRING_REGEX_TOOLTIP;
-
- // file name controls
- public static String RESID_SEARCH_FILENAME_LABEL_LABEL;
- public static String RESID_SEARCH_FILENAME_LABEL_TOOLTIP;
- public static String RESID_SEARCH_FILENAME_COMBO_TOOLTIP;
- public static String RESID_SEARCH_FILENAME_BROWSE_LABEL;
- public static String RESID_SEARCH_FILENAME_BROWSE_TOOLTIP;
-
- public static String RESID_SEARCH_FILENAME_HINT_LABEL;
- public static String RESID_SEARCH_FILENAME_HINT_TOOLTIP;
-
- public static String RESID_SEARCH_FILENAME_REGEX_LABEL;
- public static String RESID_SEARCH_FILENAME_REGEX_TOOLTIP;
-
- // folder name controls
- public static String RESID_SEARCH_FOLDERNAME_LABEL_LABEL;
- public static String RESID_SEARCH_FOLDERNAME_LABEL_TOOLTIP;
-
- public static String RESID_SEARCH_FOLDERNAME_COMBO_TOOLTIP;
-
- public static String RESID_SEARCH_FOLDERNAME_BROWSE_LABEL;
- public static String RESID_SEARCH_FOLDERNAME_BROWSE_TOOLTIP;
-
- // advanced search controls
- public static String RESID_SEARCH_INCLUDE_ARCHIVES_LABEL;
- public static String RESID_SEARCH_INCLUDE_ARCHIVES_TOOLTIP;
-
- public static String RESID_SEARCH_INCLUDE_SUBFOLDERS_LABEL;
- public static String RESID_SEARCH_INCLUDE_SUBFOLDERS_TOOLTIP;
-
- // advanced search filters
- public static String RESID_SEARCH_CONNECTIONNAMELABEL_LABEL;
- public static String RESID_SEARCH_CONNECTIONNAMELABEL_TOOLTIP;
-
- public static String RESID_SEARCH_TARGETGROUP_LABEL;
- public static String RESID_SEARCH_TARGETGROUP_TOOLTIP;
-
- public static String RESID_SEARCH_COLUMNSGROUP_LABEL;
- public static String RESID_SEARCH_COLUMNSGROUP_TOOLTIP;
-
- public static String RESID_SEARCH_ALLCOLUMNSLABEL_LABEL;
- public static String RESID_SEARCH_ALLCOLUMNSLABEL_TOOLTIP;
-
- public static String RESID_SEARCH_BETWEENLABEL_LABEL;
- public static String RESID_SEARCH_ANDLABEL_LABEL;
- public static String RESID_SEARCH_EOLLABEL_LABEL;
- public static String RESID_SEARCH_FIRSTCOLUMN_TOOLTIP;
- public static String RESID_SEARCH_SECONDCOLUMN_TOOLTIP;
- public static String RESID_SEARCH_BOTHCOLUMNSLABEL_TOOLTIP;
- public static String RESID_SEARCH_STARTCOLUMNLABEL_TOOLTIP;
-
- public static String RESID_SEARCH_MESSAGE_SEARCHING;
- public static String RESID_SEARCH_MESSAGE_ONEMATCH;
- public static String RESID_SEARCH_MESSAGE_MULTIPLEMATCHES;
-
- // Resource conflict dlg constants
- public static String RESID_CONFLICT_SAVE_TITLE;
- public static String RESID_CONFLICT_SAVE_MESSAGE;
- public static String RESID_CONFLICT_SAVE_OVERWRITEREMOTE;
- public static String RESID_CONFLICT_SAVE_REPLACELOCAL;
- public static String RESID_CONFLICT_SAVE_SAVETODIFFERENT;
-
- public static String RESID_CONFLICT_DOWNLOAD_TITLE;
- public static String RESID_CONFLICT_DOWNLOAD_MESSAGE_LOCALCHANGED;
- public static String RESID_CONFLICT_DOWNLOAD_MESSAGE_REMOTECHANGED;
- public static String RESID_CONFLICT_DOWNLOAD_REPLACELOCAL;
- public static String RESID_CONFLICT_DOWNLOAD_OPENWITHLOCAL;
-
- // RSE Cache Preferences
- public static String RESID_PREF_CACHE_DESCRIPTION;
- public static String RESID_PREF_CACHE_CLEAR;
- public static String RESID_PREF_CACHE_CLEAR_LABEL;
- public static String RESID_PREF_CACHE_CLEAR_TOOLTIP;
- public static String RESID_PREF_CACHE_MAX_CACHE_SIZE_LABEL;
- public static String RESID_PREF_CACHE_MAX_CACHE_SIZE_DESCRIPTION;
- public static String RESID_PREF_CACHE_MAX_CACHE_SIZE_TOOLTIP;
- public static String RESID_PREF_CACHE_CLEAR_WARNING_LABEL;
- public static String RESID_PREF_CACHE_CLEAR_WARNING_DESCRIPTION;
-
- // SUPERTRANSFER PROGRESS MONITOR CONSTANTS
- public static String RESID_SUPERTRANSFER_PROGMON_MAIN;
- public static String RESID_SUPERTRANSFER_PROGMON_SUBTASK_CREATE;
- public static String RESID_SUPERTRANSFER_PROGMON_SUBTASK_POPULATE;
-
- public static String RESID_SUPERTRANSFER_PROGMON_SUBTASK_TRANSFER;
- public static String RESID_SUPERTRANSFER_PROGMON_SUBTASK_EXTRACT;
- public static String RESID_SUPERTRANSFER_PROGMON_ARCHIVE;
-
- // SUPERTRANSFER PREFERENCES PAGE CONSTANTS
- public static String RESID_SUPERTRANSFER_PREFS_ENABLE;
- public static String RESID_SUPERTRANSFER_PREFS_TYPE_LABEL;
- public static String RESID_SUPERTRANSFER_PREFS_TYPE_TOOLTIP;
-
- // Compare with menu item
- public static String ACTION_COMPAREWITH_EACH_LABEL;
- public static String ACTION_COMPAREWITH_EACH_TOOLTIP;
-
- public static String ACTION_COMPAREWITH_HISTORY_LABEL;
- public static String ACTION_COMPAREWITH_HISTORY_TOOLTIP;
-
- // Replace with menu item
- public static String ACTION_REPLACEWITH_HISTORY_LABEL;
- public static String ACTION_REPLACEWITH_HISTORY_TOOLTIP;
-
- // Archive Menu Items
- public static String ACTION_EXTRACT_LABEL;
- public static String ACTION_EXTRACT_SUB_LABEL;
- public static String ACTION_EXTRACT_TOOLTIP;
- public static String ACTION_EXTRACT_TO_LABEL;
- public static String ACTION_EXTRACT_TO_TOOLTIP;
-
- public static String ACTION_COMBINE_LABEL;
- public static String ACTION_COMBINE_TOOLTIP;
-
- public static String ACTION_CONVERT_LABEL;
- public static String ACTION_CONVERT_TOOLTIP;
-
- public static String ACTION_ADDTOARCHIVE_LABEL;
- public static String ACTION_ADDTOARCHIVE_TOOLTIP;
-
- // Project menu item
- public static String RESID_OPEN_FROM_ASSOCIATED_PROJECT;
-
- // Other Actions
- public static String ACTION_NEWFOLDER_LABEL;
- public static String ACTION_NEWFOLDER_TOOLTIP;
-
- public static String ACTION_SELECT_DIRECTORY_LABEL;
- public static String ACTION_SELECT_DIRECTORY_TOOLTIP;
-
- public static String ACTION_SELECT_FILE_LABEL;
- public static String ACTION_SELECT_FILE_TOOLTIP;
-
- static
- {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, FileResources.class);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.properties b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.properties
deleted file mode 100644
index 2ab537a03..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.properties
+++ /dev/null
@@ -1,283 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RESID_FILES_PREFERENCES_BUFFER=File Transfer Buffer Size
-RESID_FILES_PREFERENCES_DOWNLOAD_BUFFER_SIZE_LABEL=Download (KB)
-RESID_FILES_PREFERENCES_UPLOAD_BUFFER_SIZE_LABEL=Upload (KB)
-RESID_FILES_PREFERENCES_DOWNLOAD_BUFFER_SIZE_TOOLTIP=Maximum size of buffer to use while sending files from the host to the client
-RESID_FILES_PREFERENCES_UPLOAD_BUFFER_SIZE_TOOLTIP=Maximum size of the buffer to use while sending files from the client to the host
-
-ResourceNavigator_openWith = Open Wit&h
-RSEOperation_message = Remote System Explorer Operation
-
-# --- File Editors ---
-FileEditorPreference_fileTypes = File &types:
-FileEditorPreference_add = &Add...
-FileEditorPreference_remove = &Remove
-FileEditorPreference_associatedEditors = Associated &editors:
-FileEditorPreference_addEditor = A&dd...
-FileEditorPreference_removeEditor = Re&move
-FileEditorPreference_default = De&fault
-FileEditorPreference_existsTitle = File Type Exists
-FileEditorPreference_existsMessage = An entry already exists for that file type
-FileEditorPreference_defaultLabel = (default)
-FileEditorPreference_contentTypesRelatedLink = See <a>''{0}''</a> for content-type based file associations.
-FileEditorPreference_isLocked = {0} (locked by ''{1}'' content type)
-
-FileExtension_fileTypeMessage = Enter file type to add: (*.doc or report.doc for example)
-FileExtension_fileTypeLabel = File &type:
-FileExtension_shellTitle = New File Type
-FileExtension_dialogTitle = Define a New File Type
-
-DefaultEditorDescription_name = &Default Editor
-
-#=============================================================
-# NEW FILE WIZARD...
-#=============================================================
-RESID_NEWFILE_TITLE=New File
-RESID_NEWFILE_PAGE1_TITLE=Remote File
-RESID_NEWFILE_PAGE1_DESCRIPTION=Create a New File
-RESID_NEWFILE_FOLDER_LABEL=Folder name
-RESID_NEWFILE_FOLDER_TIP=Folder in which the new file will be created
-RESID_NEWFILE_CONNECTIONNAME_LABEL=Connection name
-RESID_NEWFILE_CONNECTIONNAME_TIP=Connection name where the new file will be created
-RESID_NEWFILE_NAME_LABEL=File name
-RESID_NEWFILE_NAME_TOOLTIP=Enter a file name for the new file
-
-#=============================================================
-# NEW FOLDER WIZARD...
-#=============================================================
-RESID_NEWFOLDER_TITLE=New Folder
-RESID_NEWFOLDER_PAGE1_TITLE=Remote Folder
-RESID_NEWFOLDER_PAGE1_DESCRIPTION=Create a New Folder
-RESID_NEWFOLDER_CONNECTIONNAME_LABEL=Connection name
-RESID_NEWFOLDER_CONNECTIONNAME_TIP=Connection name where the new folder will be created
-RESID_NEWFOLDER_NAME_LABEL=Folder name
-RESID_NEWFOLDER_NAME_TOOLTIP=Enter a folder name for the new folder
-RESID_NEWFOLDER_FOLDER_LABEL=Folder name
-RESID_NEWFOLDER_FOLDER_TIP=Folder in which the new folder will be created
-
-##############################################################
-# Preference pages for universal file system
-##############################################################
-RESID_PREF_UNIVERSAL_FILES_TITLE=File System Preferences
-RESID_PREF_UNIVERSAL_SHOWHIDDEN_LABEL=Show hidden files
-
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_TYPE_LABEL=File types:
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_TYPE_TOOLTIP=List of file types
-
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_TABLECOL_LABEL=Type
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_TABLECOL_TOOLTIP=Type
-
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_ADDBUTTON_LABEL=Add...
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_ADDBUTTON_TOOLTIP=Add a file type
-
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_REMOVEBUTTON_LABEL=Remove
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_REMOVEBUTTON_TOOLTIP=Remove selected file type
-
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_LABEL=File Transfer Mode
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TOOLTIP=Mode of file transfer for selected file type
-
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_LABEL=Binary
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_TOOLTIP=Transfer as binary file
-
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_LABEL=Text
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_TOOLTIP=Transfer as text file
-
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_DEFAULT_MODE_LABEL=Default File Transfer Mode
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_DEFAULT_MODE_TOOLTIP=Default mode of file transfer for unspecified file types
-
-###################################################################################
-############################ Remote Search ##############################
-###################################################################################
-RESID_SEARCH_STRING_LABEL_LABEL= Search string (leave empty for file search):
-RESID_SEARCH_STRING_LABEL_TOOLTIP= String to be searched
-RESID_SEARCH_STRING_COMBO_TOOLTIP= Enter or select search string
-RESID_SEARCH_CASE_BUTTON_LABEL= Case sensitive
-RESID_SEARCH_CASE_BUTTON_TOOLTIP= Specify whether case should be considered during search
-RESID_SEARCH_STRING_HINT_LABEL= (* = any string, ? = any character, \\ = escape for literals: * ? \\)
-RESID_SEARCH_STRING_HINT_TOOLTIP= Special characters allowed in search string
-RESID_SEARCH_STRING_REGEX_LABEL= Regular expression
-RESID_SEARCH_STRING_REGEX_TOOLTIP= Specify whether search string is a regular expression
-RESID_SEARCH_FILENAME_LABEL_LABEL= File name patterns:
-RESID_SEARCH_FILENAME_LABEL_TOOLTIP= File name patterns
-RESID_SEARCH_FILENAME_COMBO_TOOLTIP= Enter or select file name patterns
-RESID_SEARCH_FILENAME_BROWSE_LABEL= Browse...
-RESID_SEARCH_FILENAME_BROWSE_TOOLTIP= Opens a dialog to select or enter file types
-RESID_SEARCH_FILENAME_HINT_LABEL= Patterns are separated by comma (* = any string, ? = any character)
-RESID_SEARCH_FILENAME_HINT_TOOLTIP= Special characters allowed in file name patterns
-RESID_SEARCH_FILENAME_REGEX_LABEL= Regular expression
-RESID_SEARCH_FILENAME_REGEX_TOOLTIP= Specify whether file name pattern is a regular expression
-RESID_SEARCH_FOLDERNAME_LABEL_LABEL= Folder:
-RESID_SEARCH_FOLDERNAME_LABEL_TOOLTIP= Folder path
-RESID_SEARCH_FOLDERNAME_COMBO_TOOLTIP= Identifies the folder in which to search. It is fully qualified including the connection name, as in connection:/path/folder
-RESID_SEARCH_FOLDERNAME_BROWSE_LABEL= Browse...
-RESID_SEARCH_FOLDERNAME_BROWSE_TOOLTIP= Opens a dialog to select a folder
-RESID_SEARCH_INCLUDE_ARCHIVES_LABEL= Search archive files
-RESID_SEARCH_INCLUDE_ARCHIVES_TOOLTIP= Specify whether archive files such as zip, jar and tar files should also be searched
-RESID_SEARCH_INCLUDE_SUBFOLDERS_LABEL= Search subfolders
-RESID_SEARCH_INCLUDE_SUBFOLDERS_TOOLTIP= Specify whether subfolders should also be searched
-RESID_SEARCH_CONNECTIONNAMELABEL_LABEL= Connection name:
-RESID_SEARCH_CONNECTIONNAMELABEL_TOOLTIP= Connection name
-RESID_SEARCH_TARGETGROUP_LABEL= Target
-RESID_SEARCH_TARGETGROUP_TOOLTIP= Specify search target
-RESID_SEARCH_COLUMNSGROUP_LABEL= Columns
-RESID_SEARCH_COLUMNSGROUP_TOOLTIP= Specify columns
-RESID_SEARCH_ALLCOLUMNSLABEL_LABEL= All columns
-RESID_SEARCH_ALLCOLUMNSLABEL_TOOLTIP= Search all columns
-RESID_SEARCH_BETWEENLABEL_LABEL= Between
-RESID_SEARCH_ANDLABEL_LABEL= and
-RESID_SEARCH_EOLLABEL_LABEL= and end of line
-RESID_SEARCH_FIRSTCOLUMN_TOOLTIP= Specify start column
-RESID_SEARCH_SECONDCOLUMN_TOOLTIP= Specify end column
-RESID_SEARCH_BOTHCOLUMNSLABEL_TOOLTIP= Search between specified columns
-RESID_SEARCH_STARTCOLUMNLABEL_TOOLTIP= Search between specified column and end of line
-
-# Search dialog
-RESID_SEARCH_MESSAGE_SEARCHING= Searching...
-RESID_SEARCH_MESSAGE_ONEMATCH= %1 match
-RESID_SEARCH_MESSAGE_MULTIPLEMATCHES= %1 matches
-
-##################################################################################
-############################ Resource Conflict Dlgs #########################
-##################################################################################
-RESID_CONFLICT_SAVE_TITLE= Save Conflict
-RESID_CONFLICT_SAVE_MESSAGE= This file has changed on the remote system since it was opened.
-RESID_CONFLICT_SAVE_OVERWRITEREMOTE= Overwrite the remote file.
-RESID_CONFLICT_SAVE_REPLACELOCAL= Replace contents of editor with remote file. Pending changes will be lost.
-RESID_CONFLICT_SAVE_SAVETODIFFERENT= Save the contents of the editor to a different remote file.
-
-RESID_CONFLICT_DOWNLOAD_TITLE= Local Changes Pending
-RESID_CONFLICT_DOWNLOAD_MESSAGE_LOCALCHANGED= This file has pending changes that have not been saved to the remote system.
-RESID_CONFLICT_DOWNLOAD_MESSAGE_REMOTECHANGED= This file has pending changes that have not been saved to the remote system and the file has changed on the remote system.
-RESID_CONFLICT_DOWNLOAD_REPLACELOCAL= Replace pending changes with remote file
-RESID_CONFLICT_DOWNLOAD_OPENWITHLOCAL= Open editor with pending changes
-
-#==============================================================
-# REMOTE FILE SYSTEM CACHE PREFERENCE PAGE
-#=============================================================
-RESID_PREF_CACHE_DESCRIPTION=When RSE is used for editing, the remote files are cached. Use this page to clear or limit the size of the file cache.
-RESID_PREF_CACHE_CLEAR=Clear Cached Files
-RESID_PREF_CACHE_CLEAR_LABEL=Clear cached files
-RESID_PREF_CACHE_CLEAR_TOOLTIP=Delete remote files that have been cached in the local workspace
-RESID_PREF_CACHE_MAX_CACHE_SIZE_LABEL=Maximum cache size (MB)
-RESID_PREF_CACHE_MAX_CACHE_SIZE_DESCRIPTION=Enter the maxium size space that can be used by the cache
-RESID_PREF_CACHE_MAX_CACHE_SIZE_TOOLTIP=Enter the maxium size space that can be used by the cache
-RESID_PREF_CACHE_CLEAR_WARNING_LABEL=Note:
-RESID_PREF_CACHE_CLEAR_WARNING_DESCRIPTION=Note: Clearing the cache closes all open remote files
-
-#=============================================================
-# SUPERTRANSFER PROGRESS MONITOR
-#=============================================================
-RESID_SUPERTRANSFER_PROGMON_MAIN=Compressed copy...
-RESID_SUPERTRANSFER_PROGMON_SUBTASK_CREATE=Creating temp archive
-RESID_SUPERTRANSFER_PROGMON_SUBTASK_POPULATE=Populating temp archive
-RESID_SUPERTRANSFER_PROGMON_SUBTASK_TRANSFER=Transferring temp archive
-RESID_SUPERTRANSFER_PROGMON_SUBTASK_EXTRACT=Extracting temp archive
-RESID_SUPERTRANSFER_PROGMON_ARCHIVE=archive
-
-#=============================================================
-# SUPERTRANSFER PREFERENCE PAGE
-#=============================================================
-RESID_SUPERTRANSFER_PREFS_ENABLE=Enable fast folder transfer using data compression
-RESID_SUPERTRANSFER_PREFS_TYPE_LABEL=Archive type
-RESID_SUPERTRANSFER_PREFS_TYPE_TOOLTIP=Select an archive type to use for the transfer
-
-##################################################################################
-############################ Compare menu item #############################
-##################################################################################
-ACTION_COMPAREWITH_EACH_LABEL= Each Other
-ACTION_COMPAREWITH_EACH_TOOLTIP= Compare remote resources to each other
-ACTION_COMPAREWITH_HISTORY_LABEL= Local History...
-ACTION_COMPAREWITH_HISTORY_TOOLTIP= Compare the local edition history of this resource
-
-##################################################################################
-############################ Replace menu item #############################
-##################################################################################
-ACTION_REPLACEWITH_HISTORY_LABEL= Local History...
-ACTION_REPLACEWITH_HISTORY_TOOLTIP= Replace the remote file with a previous edition from it's local history
-
-##################################################################################
-############################ Archive menu items #############################
-##################################################################################
-ACTION_EXTRACT_LABEL=Extract
-ACTION_EXTRACT_SUB_LABEL=Extract to %1
-ACTION_EXTRACT_TOOLTIP=Extract archive to current directory
-ACTION_EXTRACT_TO_LABEL=Extract to...
-ACTION_EXTRACT_TO_TOOLTIP=Extract archive to a specified directory
-
-ACTION_COMBINE_LABEL=Combine...
-ACTION_COMBINE_TOOLTIP=Combine archives into a single archive
-
-ACTION_CONVERT_LABEL=Convert...
-ACTION_CONVERT_TOOLTIP=Convert archives into another archive type
-
-ACTION_ADDTOARCHIVE_LABEL=Add To Archive...
-ACTION_ADDTOARCHIVE_TOOLTIP=Add files to a new or existing archive
-
-##################################################################################
-############################ Project menu item #############################
-##################################################################################
-RESID_OPEN_FROM_ASSOCIATED_PROJECT=Open from Associated Project (&1)
-
-#=============================================================
-# EXTRACT ARCHIVE TO DIALOG...
-#=============================================================
-RESID_EXTRACTTO_TITLE=Extract To
-RESID_EXTRACTTO_PROMPT=Choose the destination for the contents of archive &1
-
-#=============================================================
-# COMBINE ARCHIVES DIALOG...
-#=============================================================
-RESID_COMBINE_TITLE=Combine Archives
-RESID_COMBINE_PROMPT=Choose the destination for the combined archives
-RESID_COMBINE_NAME_LABEL=Archive name
-RESID_COMBINE_NAME_TOOLTIP=Enter a file name for the combined/converted archive
-RESID_COMBINE_TYPE_LABEL=Archive type
-RESID_COMBINE_TYPE_TOOLTIP=Select an archive type for the combined/converted archive
-
-#=============================================================
-# CONVERT ARCHIVE DIALOG...
-#=============================================================
-RESID_CONVERT_TITLE=Convert Archive
-RESID_CONVERT_PROMPT=Source archive: &1
-RESID_CONVERT_LOCATION=Select a destination folder for the converted copy of the archive:
-RESID_CONVERT_NAMEANDTYPE=Select a new name and type for the converted copy of the archive:
-
-#=============================================================
-# ADD TO ARCHIVE DIALOG...
-#=============================================================
-RESID_ADDTOARCHIVE_TITLE=Add to Archive
-RESID_ADDTOARCHIVE_PROMPT=Choose a destination archive for the selected files, or create a new archive
-RESID_ADDTOARCHIVE_LOCATION=Select a destination folder for the new archive, or the location of an existing archive:
-RESID_ADDTOARCHIVE_NAMEANDTYPE=Select a name and type for the new archive, or enter an existing archive's name and type:
-RESID_ADDTOARCHIVE_SAVEPATH_LABEL=Save full path info
-RESID_ADDTOARCHIVE_SAVEPATH_TOOLTIP=Choose whether or not to preserve the full path of the selected files relative to each other when they are added to the archive.
-RESID_ADDTOARCHIVE_RELATIVETO_LABEL=Save full path info relative to:
-RESID_ADDTOARCHIVE_RELATIVETO_TOOLTIP=Choose the common directory from which relative paths will be determined.
-
-#=============================================================
-# ACTIONS...
-#=============================================================
-ACTION_NEWFOLDER_LABEL=Folder
-ACTION_NEWFOLDER_TOOLTIP=Create a new Folder
-ACTION_SELECT_DIRECTORY_LABEL=Browse...
-ACTION_SELECT_DIRECTORY_TOOLTIP=Select folder from remote system
-ACTION_SELECT_FILE_LABEL=Browse...
-ACTION_SELECT_FILE_TOOLTIP=Select file from remote system \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemAddFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemAddFileListener.java
deleted file mode 100644
index 3b50abeee..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemAddFileListener.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-/**
- * This is an interface used by the actions SystemSelectRemoteFileAction and SystemSelectRemoteFolderAction
- * actions classes (and the dialog and form used by these) and enable the dialog's OK button to
- * be replaced with an Add button. When the user selects and object or presses Add, the caller
- * is informed and able to display a resulting message in the dialog's message line,and affect
- * the enabled state of the Add button.
- * <p>
- * If you call the enableAddButton method you must pass an object that implements this interface.
- * The dialog will call you back when the user presses the Add button, so you can take
- * appropriate action.
- */
-public interface ISystemAddFileListener
-{
-
- /**
- * The user has pressed the Add button.
- * Do something appropriate with the request.
- * <p>
- * If this action fails for some reason, or you wish to display a completion
- * message, return message text that will be displayed in the dialog's message
- * line. Else, return null.
- */
- public Object addButtonPressed(IHost selectedConnection, IRemoteFile[] selectedObjects);
- /**
- * The user has selected a file or folder. Is this valid to be added?
- * <p>
- * If so, return null. If not, return a string to display on the
- * message line indicating why it is not valid, such as it already has
- * been added.
- */
- public Object okToEnableAddButton(IHost selectedConnection, IRemoteFile[] selectedObjects);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileConstants.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileConstants.java
deleted file mode 100644
index 0bbfe8615..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileConstants.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui;
-
-// TODO is this file still used or necessary?
-
-/**
- * Constants used throughout the System plugin
- */
-public interface ISystemFileConstants
-{
- public static final String PLUGIN_ID ="org.eclipse.rse.files.ui";
- public static final String PREFIX = PLUGIN_ID+".files.";
- // Icons
- public static final String ICON_DIR = "icons";
- public static final String ICON_PATH = java.io.File.separator + ICON_DIR + java.io.File.separator;
- public static final String ICON_SUFFIX = "Icon";
- public static final String ICON_EXT = ".gif";
-
- // Resource Bundle ids
- public static final String RESID_PREFIX = PREFIX+"ui.";
-
- // -------------------
- // DEFAULT FILTERS...
- // -------------------
- public static final String RESID_FILTER_ROOTS = RESID_PREFIX + "RootsFileFilter.label";
- public static final String RESID_FILTER_ROOTFILES = RESID_PREFIX + "RootFileFilter.label";
- public static final String RESID_FILTER_ROOTFOLDERS= RESID_PREFIX + "RootFolderFilter.label";
- public static final String RESID_FILTER_DRIVES = RESID_PREFIX + "DrivesFileFilter.label";
- public static final String RESID_FILTER_HOME = RESID_PREFIX + "HomeFileFilter.label";
- public static final String RESID_FILTER_USERHOME = RESID_PREFIX + "UserHomeFileFilter.label";
- public static final String RESID_FILTER_MYHOME = RESID_PREFIX + "MyHomeFileFilter.label";
- // -------------------------
- // MISCELLANEOUS...
- // -------------------------
- public static final String RESID_PROPERTY_FILE_FILTER_VALUE = RESID_PREFIX + "FileFilterProperty.value";
-
- // -------------------------
- // WIZARDS...
- // -------------------------
-
- // New System File Filter wizard...
- public static final String RESID_NEWFILEFILTER_PAGE1_TITLE = RESID_PREFIX+"NewFileFilter.page1.title";
- public static final String RESID_NEWFILEFILTER_PAGE1_DESCRIPTION = RESID_PREFIX+"NewFileFilter.page1.description";
- public static final String RESID_FILEFILTER_ROOT = RESID_PREFIX+"filefilter.";
- public static final String RESID_FILEFILTER_NAME_ROOT = RESID_FILEFILTER_ROOT+"name.";
- public static final String RESID_FILEFILTER_FOLDER_ROOT = RESID_FILEFILTER_ROOT+"folder.";
- public static final String RESID_FILEFILTER_FILE_ROOT = RESID_FILEFILTER_ROOT+"file.";
- public static final String RESID_FILEFILTER_STRING_ROOT = RESID_FILEFILTER_ROOT+"strings.";
-
- // New Filter String wizard...
- public static final String RESID_NEWFILTERSTRING_TITLE = RESID_PREFIX+"NewFilterString.title";
- public static final String RESID_NEWFILTERSTRING_PAGE1_TITLE = RESID_PREFIX+"NewFilterString.page1.title";
- public static final String RESID_NEWFILTERSTRING_PAGE1_DESCRIPTION = RESID_PREFIX+"NewFilterString.page1.description";
-
- // File Filter String Re-Usable form (used in dialog and wizard)
- public static final String RESID_FILEFILTERSTRING_ROOT = RESID_PREFIX+"filefilterstring.";
- public static final String RESID_FILEFILTERSTRING_FOLDER_ROOT = RESID_FILEFILTERSTRING_ROOT+"folder.";
- public static final String RESID_FILEFILTERSTRING_FILE_ROOT = RESID_FILEFILTERSTRING_ROOT+"file.";
- public static final String RESID_FILEFILTERSTRING_INCFOLDERS_ROOT = RESID_FILEFILTERSTRING_ROOT+"include.folders.";
- public static final String RESID_FILEFILTERSTRING_INCFILES_ROOT = RESID_FILEFILTERSTRING_ROOT+"include.files.";
- public static final String RESID_FILEFILTERSTRING_INCFILESONLY_ROOT = RESID_FILEFILTERSTRING_ROOT+"include.filesonly.";
- public static final String RESID_FILEFILTERSTRING_BYFILENAME_ROOT = RESID_FILEFILTERSTRING_ROOT+"include.byfilename.";
- public static final String RESID_FILEFILTERSTRING_BYFILETYPES_ROOT= RESID_FILEFILTERSTRING_ROOT+"include.byfiletypes.";
- public static final String RESID_FILEFILTERSTRING_TYPES_ROOT = RESID_FILEFILTERSTRING_ROOT+"types.";
- public static final String RESID_FILEFILTERSTRING_SELECTTYPES_ROOT= RESID_FILEFILTERSTRING_ROOT+"selectTypes.";
- public static final String RESID_FILEFILTERSTRING_TEST_ROOT = RESID_FILEFILTERSTRING_ROOT+"test.";
- // -------------------------
- // DIALOGS...
- // -------------------------
- // Change System File Filter dialog...
- public static final String RESID_CHGFILEFILTER_TITLE = RESID_PREFIX+"ChgFileFilter.title";
- // Change System File Filter String dialog...
- public static final String RESID_CHGFILEFILTERSTRING_TITLE = RESID_PREFIX+"ChgFileFilterString.title";
-
- // Select Directory dialog...
- public static final String RESID_SELECTDIRECTORY_TITLE = RESID_PREFIX+"SelectDirectory.title";
- public static final String RESID_SELECTDIRECTORY_VERBAGE = RESID_PREFIX+"SelectDirectory.verbage.";
- public static final String RESID_SELECTDIRECTORY_SELECT = RESID_PREFIX+"SelectDirectory.select.";
- // Select File dialog...
- public static final String RESID_SELECTFILE_TITLE = RESID_PREFIX+"SelectFile.title";
- public static final String RESID_SELECTFILE_VERBAGE = RESID_PREFIX+"SelectFile.verbage.";
- public static final String RESID_SELECTFILE_SELECT = RESID_PREFIX+"SelectFile.select.";
-
- // Prompt for home folder dialog...
- public static final String RESID_HOMEPROMPT_TITLE = RESID_PREFIX+"HomePrompt.title";
- public static final String RESID_HOMEPROMPT_VERBAGE = RESID_PREFIX+"HomePrompt.verbage.";
- public static final String RESID_HOMEPROMPT_PROMPT_ROOT = RESID_PREFIX+"HomePrompt.prompt.";
-
- // -------------------------
- // ACTIONS...
- // -------------------------
- public static final String ACTION_ID = RESID_PREFIX + "action.";
-
- public static final String ACTION_NEWFILEFILTER = ACTION_ID + "NewFilter";
- public static final String ACTION_NEWNESTEDFILEFILTER= ACTION_ID + "NewNestedFilter";
- public static final String ACTION_UPDATEFILEFILTER = ACTION_ID + "UpdateFilter";
-
- public static final String ACTION_NEWFILEFILTERSTRING = ACTION_ID + "NewFilterString";
- public static final String ACTION_ADDFILEFILTERSTRING = ACTION_ID + "AddFilterString";
- public static final String ACTION_UPDATEFILEFILTERSTRING = ACTION_ID + "UpdateFilterString";
- public static final String ACTION_SELECTFILETYPES = ACTION_ID + "SelectFileTypes";
-
- // -------------------------
- // WIDGETS...
- // -------------------------
- public static final String WIDGET_ID = RESID_PREFIX + "widget.";
-
- public static final String WIDGET_FOLDER_ROOT = WIDGET_ID + "directory.";
- public static final String WIDGET_BROWSE_ROOT = WIDGET_ID + "browse.";
-
-
- // -------------------------
- // PROPERTY PAGES...
- // -------------------------
- public static final String RESID_PP_FILE_ROOT = RESID_PREFIX+"pp.file.";
- public static final String RESID_PP_FILE_TITLE = RESID_PP_FILE_ROOT+"title";
- public static final String RESID_PP_FILE_TYPE_ROOT = RESID_PP_FILE_ROOT+"type.";
- public static final String RESID_PP_FILE_TYPE_FILE_VALUE = RESID_PP_FILE_ROOT+"type.file.value";
- public static final String RESID_PP_FILE_TYPE_FOLDER_VALUE = RESID_PP_FILE_ROOT+"type.folder.value";
- public static final String RESID_PP_FILE_TYPE_ROOT_VALUE = RESID_PP_FILE_ROOT+"type.root.value";
- public static final String RESID_PP_FILE_NAME_ROOT = RESID_PP_FILE_ROOT+"name.";
- public static final String RESID_PP_FILE_PATH_ROOT = RESID_PP_FILE_ROOT+"path.";
- public static final String RESID_PP_FILE_SIZE_ROOT = RESID_PP_FILE_ROOT+"size.";
- public static final String RESID_PP_FILE_SIZE_VALUE = RESID_PP_FILE_ROOT+"size.value";
- public static final String RESID_PP_FILE_MODIFIED_ROOT = RESID_PP_FILE_ROOT+"modified.";
- public static final String RESID_PP_FILE_READONLY_ROOT = RESID_PP_FILE_ROOT+"readonly.";
- public static final String RESID_PP_FILE_READABLE_ROOT = RESID_PP_FILE_ROOT+"readable.";
- public static final String RESID_PP_FILE_WRITABLE_ROOT = RESID_PP_FILE_ROOT+"writable.";
- public static final String RESID_PP_FILE_HIDDEN_ROOT = RESID_PP_FILE_ROOT+"hidden.";
-
-
- // -------------------------------
- // Enter or select file form
- // -------------------------------
- public static final String RESID_ENTER_OR_SELECT_FILE_PREFIX = RESID_PREFIX + "EnterOrSelectFile.";
- public static final String RESID_ENTER_OR_SELECT_FILE_TITLE = RESID_ENTER_OR_SELECT_FILE_PREFIX + "title";
- public static final String RESID_ENTER_OR_SELECT_FILE_VERBAGE_LABEL = RESID_ENTER_OR_SELECT_FILE_PREFIX + "verbage.label";
- public static final String RESID_ENTER_OR_SELECT_FILE_ENTER_LABEL = RESID_ENTER_OR_SELECT_FILE_PREFIX + "enter.label";
- public static final String RESID_ENTER_OR_SELECT_FILE_ENTER_TOOLTIP = RESID_ENTER_OR_SELECT_FILE_PREFIX + "enter.tooltip";
- public static final String RESID_ENTER_OR_SELECT_FILE_SELECT_TOOLTIP = RESID_ENTER_OR_SELECT_FILE_PREFIX + "select.tooltip";
- public static final String RESID_ENTER_OR_SELECT_FILE_FILE_LABEL = RESID_ENTER_OR_SELECT_FILE_PREFIX + "file.label";
- public static final String RESID_ENTER_OR_SELECT_FILE_FILE_TOOLTIP = RESID_ENTER_OR_SELECT_FILE_PREFIX + "file.tooltip";
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileMessages.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileMessages.java
deleted file mode 100644
index 3781fa65c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileMessages.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui;
-/**
- * Keys into the core plugin's resource bundle for error messages related
- * to the remote file system framework.
- */
-public interface ISystemFileMessages
-{
- //public static final String PLUGIN_ID ="org.eclipse.rse.ui";
- //public static final String PLUGIN_ID =ISystemMessages.PLUGIN_ID;
- // Message prefix
- //public static final String FILEMSG_PREFIX = PLUGIN_ID+".ui.filemsg.";
-
- // Messages
- //public static final String FILEMSG_VALIDATE_PREFIX = FILEMSG_PREFIX + "Validate.";
-
- public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY = "RSEF1006";
- public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE= "RSEF1007";
- public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID = "RSEF1008";
- public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_NOINCLUDES = "RSEF1009";
-} \ No newline at end of file
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
deleted file mode 100644
index d04114c3c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileFilterStringEditPane.java
+++ /dev/null
@@ -1,827 +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.files.ui;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.files.ui.actions.SystemSelectFileTypesAction;
-import org.eclipse.rse.files.ui.widgets.SystemFileWidgetHelpers;
-import org.eclipse.rse.files.ui.widgets.SystemRemoteFolderCombo;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.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;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorPathName;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-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;
-
-
-/**
- * The edit pane for page 1 of the New File Filter wizard.
- * Prompts for the details of a single file filter string.
- */
-public class SystemFileFilterStringEditPane
- extends SystemFilterStringEditPane
-{
- // GUI widgets
- protected Button filesOnlyCheckBox;
- //protected Button testButton;
- protected Button subsetByFileNameRadioButton, subsetByFileTypesRadioButton;
- protected Button selectTypesButton;
- protected Label labelFile, labelTypes;
- protected Text textFile, textTypes;
- protected SystemRemoteFolderCombo folderCombo;
- // limits
- protected int filterFileLength = 256;
- protected int filterPathLength = 256;
- // validators
- protected ISystemValidator pathValidator = new ValidatorPathName();
- protected ISystemValidator fileValidator;
- // inputs
- protected boolean caseSensitive = false;
- //protected boolean showTestButton = true;
- protected String[] inputFilterStrings;
- // state
- protected boolean noValidation = false;
- protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
- protected boolean skipUniquenessChecking;
- protected boolean calledFromVerify;
- protected boolean dontStealFocus;
- protected RemoteFileSubSystemConfiguration inputSubsystemConfiguration = null;
-
- // actions
- protected SystemTestFilterStringAction testAction = null;
- protected SystemSelectFileTypesAction typesAction = null;
-
-
- /**
- * Constructor for SystemFileFilterStringEditPane.
- * @param shell
- */
- public SystemFileFilterStringEditPane(Shell shell)
- {
- super(shell);
- }
-
- // ------------------------------
- // INPUT/CONFIGURATION METHODS...
- // ------------------------------
- /**
- * Set the contextual system filter pool reference manager provider. Will be non-null if the
- * current selection is a reference to a filter pool or filter, or a reference manager
- * provider (eg subsystem).
- * <p>
- * Intercept of parent so we can extract the isCaseSensitive() value.
- */
- public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
- {
- super.setSystemFilterPoolReferenceManagerProvider(provider);
- if (provider != null)
- caseSensitive = ((ISubSystem)provider).getSubSystemConfiguration().isCaseSensitive();
- }
- /**
- * Set the contextual system filter pool manager provider. Will be non-null if the
- * current selection is a filter pool or filter or reference to either, or a manager
- * provider itself (eg, subsystem factory).
- * <p>
- * Intercept of parent so we can extract the isCaseSensitive() value.
- */
- public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider provider)
- {
- super.setSystemFilterPoolManagerProvider(provider);
- if (provider != null)
- caseSensitive = ((ISubSystemConfiguration)provider).isCaseSensitive();
- }
-
- /**
- * Call this to override the text limit for the filter name, from the default of 40.
- */
- public void setFilterFileLength(int max)
- {
- filterFileLength = max;
- if (textFile != null)
- textFile.setTextLimit(max);
- }
- /**
- * Call this to override the text limit for the filter name, from the default of 40.
- */
- public void setFilterPathLength(int max)
- {
- filterPathLength = max;
- if (folderCombo != null)
- folderCombo.setTextLimit(max);
- }
- /**
- * Existing strings are used to aid in uniqueness validation.
- */
- public void setExistingStrings(String[] existingStrings, boolean caseSensitive)
- {
- this.inputFilterStrings = existingStrings;
- this.caseSensitive = caseSensitive;
- }
-
- // ------------------------------
- // LIFECYCLE METHODS...
- // ------------------------------
-
- /**
- * Populate the pane with the GUI widgets
- * @param parent
- * @return Control
- */
- public Control createContents(Composite parent)
- {
- int gridColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, gridColumns);
-
- // directory prompt
- String historyKey = null;
- if (refProvider != null)
- historyKey = ((ISubSystem)refProvider).getSubSystemConfiguration().getId()+".filterStringDialog"; // unique to us
- else
- historyKey = "files.filterStringDialog"; // unique to us
-
- boolean readonly = false;
- folderCombo = SystemFileWidgetHelpers.createFolderCombo(composite_prompts, null, gridColumns, historyKey, readonly);
- folderCombo.setShowNewConnectionPrompt(false);
- SystemWidgetHelpers.setHelp(folderCombo, RSEUIPlugin.HELPPREFIX+"ffsd0001");
- SystemWidgetHelpers.createLabel(composite_prompts," ",gridColumns); // FILLER
-
- // parent folder prompt
- //textFolder = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, rb, RESID_FILEFILTERSTRING_FOLDER_ROOT);
-
- // "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, RSEUIPlugin.HELPPREFIX+"ffsd0002", RSEUIPlugin.HELPPREFIX+"ffsd0003");
- SystemWidgetHelpers.setHelp(subsetByFileNameRadioButton, RSEUIPlugin.HELPPREFIX+"ffsd0002");
- updateGridData(subsetByFileNameRadioButton, gridColumns);
-
- // File name prompt
- //textFile = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, rb, RESID_FILEFILTERSTRING_FILE_ROOT);
- String indent = " ";
- String temp = SystemWidgetHelpers.appendColon(SystemFileResources.RESID_FILEFILTERSTRING_FILE_LABEL);
- labelFile = SystemWidgetHelpers.createLabel(composite_prompts, indent+temp);
- labelFile.setToolTipText(SystemFileResources.RESID_FILEFILTERSTRING_FILE_TOOLTIP);
- textFile = SystemWidgetHelpers.createTextField(composite_prompts, null);
- textFile.setToolTipText(SystemFileResources.RESID_FILEFILTERSTRING_FILE_TOOLTIP);
- //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, 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, RSEUIPlugin.HELPPREFIX+"ffsd0005",RSEUIPlugin.HELPPREFIX+"ffsd0004");
- SystemWidgetHelpers.setHelp(typesGroup, RSEUIPlugin.HELPPREFIX+"ffsd0005");
- GridLayout layout = (GridLayout)typesGroup.getLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- updateGridData(typesGroup, gridColumns);
- temp = SystemWidgetHelpers.appendColon(SystemFileResources.RESID_FILEFILTERSTRING_TYPES_LABEL);
- labelTypes = SystemWidgetHelpers.createLabel(typesGroup, indent+temp);
- labelTypes.setToolTipText(SystemFileResources.RESID_FILEFILTERSTRING_TYPES_TOOLTIP);
- textTypes = SystemWidgetHelpers.createReadonlyTextField(typesGroup);
- textTypes.setToolTipText(SystemFileResources.RESID_FILEFILTERSTRING_TYPES_TOOLTIP);
- updateGridData(textTypes, 1);
- selectTypesButton = SystemWidgetHelpers.createPushButton(typesGroup, null, SystemFileResources.RESID_FILEFILTERSTRING_SELECTTYPES_LABEL, SystemFileResources.RESID_FILEFILTERSTRING_SELECTTYPES_TOOLTIP);
- GridData data = (GridData)selectTypesButton.getLayoutData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = GridData.FILL;
-
-
- /*
- // Include Folders check box
- subdirCheckBox = SystemWidgetHelpers.createCheckBox(composite_prompts, gridColumns, null,
- rb, RESID_FILEFILTERSTRING_INCFOLDERS_ROOT);
- subdirCheckBox.addSelectionListener(this);
-
- // Include Files check box
- fileCheckBox = SystemWidgetHelpers.createCheckBox(composite_prompts, gridColumns, null,
- rb, RESID_FILEFILTERSTRING_INCFILES_ROOT);
- fileCheckBox.addSelectionListener(this);
- */
-
- // Show Files Only check box
- 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, RSEUIPlugin.HELPPREFIX+"ffsd0006");
-
- // Test button
- /*
- if (showTestButton)
- {
- SystemWidgetHelpers.createLabel(composite_prompts," ",gridColumns); // FILLER
- SystemWidgetHelpers.createLabel(composite_prompts," ",gridColumns); // FILLER
- createTestButton(composite_prompts, RESID_FILEFILTERSTRING_TEST_ROOT);
- SystemWidgetHelpers.setHelp(testButton, RSEUIPlugin.HELPPREFIX+"ffsd0007");
- updateGridData(testButton, gridColumns);
- }
- */
-
- folderCombo.setFocus();
-
- if (refProvider != null)
- inputSubsystemConfiguration = (RemoteFileSubSystemConfiguration)((ISubSystem)refProvider).getSubSystemConfiguration();
- else if (provider != null)
- inputSubsystemConfiguration = (RemoteFileSubSystemConfiguration)provider;
- pathValidator = inputSubsystemConfiguration.getPathValidator();
- fileValidator = inputSubsystemConfiguration.getFileFilterStringValidator();
- if (refProvider != null)
- folderCombo.setSystemConnection(((ISubSystem)refProvider).getHost());
- else if (inputSubsystemConfiguration != null)
- folderCombo.setSystemTypes(inputSubsystemConfiguration.getSystemTypes());
- folderCombo.setSubSystem((IRemoteFileSubSystem)refProvider);
- folderCombo.setTextLimit(filterPathLength);
- textFile.setTextLimit(filterFileLength);
-
- resetFields();
- doInitializeFields();
-
- folderCombo.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateFolderInput();
- }
- }
- );
- textFile.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateFileInput();
- }
- }
- );
-
- subsetByFileNameRadioButton.addSelectionListener(this);
- subsetByFileTypesRadioButton.addSelectionListener(this);
- selectTypesButton.addSelectionListener(this);
- filesOnlyCheckBox.addSelectionListener(this);
-
- return composite_prompts;
- }
- private void updateGridData(Control widget, int gridColumns)
- {
- GridData data = (GridData)widget.getLayoutData();
- data.horizontalSpan = gridColumns;
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- }
-
- /**
- * Return the control to recieve initial focus. Should be overridden if you override createContents
- */
- public Control getInitialFocusControl()
- {
- return folderCombo.getCombo();
- }
-
- /**
- * Override of parent.
- * Called after reset fields, at first create time or when input is reset to a non-null value.
- */
- protected void doInitializeFields()
- {
- if (folderCombo == null)
- return;
- //if (refProvider == null)
- //RSEUIPlugin.logError("Programming Error: input subsystem is not set for SystemFileFilterStringEditPane",null);
-
- if (inputFilterString != null)
- {
- RemoteFileFilterString rffs = new RemoteFileFilterString(inputSubsystemConfiguration, inputFilterString);
- String defaultPath = rffs.getPath();
- folderCombo.setText((defaultPath==null) ? "" : defaultPath);
- String defaultFile = rffs.getFile();
- textFile.setText((defaultFile==null) ? "" : defaultFile);
- String defaultTypes = rffs.getTypesAsString();
- textTypes.setText((defaultTypes==null) ? "" : defaultTypes);
- boolean defaultIncludeFilesOnly = rffs.getShowFiles() && !rffs.getShowSubDirs();
- boolean defaultSubsetByFileName = !rffs.getFilterByTypes();
- // set appropriate radio button for subset type
- subsetByFileNameRadioButton.setSelection(defaultSubsetByFileName);
- subsetByFileTypesRadioButton.setSelection(!defaultSubsetByFileName);
- filesOnlyCheckBox.setSelection(defaultIncludeFilesOnly);
- enableFields(defaultSubsetByFileName);
- }
- }
- /**
- * This is called in the change filter dialog when the user selects "new", or selects another string.
- * You must override this if you override createContents. Be sure to test if the contents have even been created yet!
- */
- protected void resetFields()
- {
- if (folderCombo == null)
- return;
- folderCombo.setText("");
- textFile.setText("*");
- textTypes.setText("");
- subsetByFileNameRadioButton.setSelection(true);
- subsetByFileTypesRadioButton.setSelection(false);
- filesOnlyCheckBox.setSelection(false);
- enableFields(true);
- }
-
- /**
- * Must be overridden if createContents is overridden.
- * <p>
- * This is called by the isComplete, to decide if the default information
- * is complete enough to enable finish. It doesn't do validation, that will be done when
- * finish is pressed.
- */
- protected boolean areFieldsComplete()
- {
- if (folderCombo == null)
- return false;
- else
- {
- boolean filterGiven = false;
- boolean subsetByFileName = false;
- String fileNameText = null;
-
- if (subsetByFileNameRadioButton.getSelection()) {
- fileNameText = textFile.getText().trim();
- filterGiven = fileNameText.length() > 0;
- subsetByFileName = true;
- }
- else {
- filterGiven = textTypes.getText().trim().length() > 0;
- subsetByFileName = false;
- }
-
- String folderText = folderCombo.getText().trim();
-
- if (inputSubsystemConfiguration != null) {
-
- // KM: defect 53009.
- // if input subsystem factory is Unix, then we can not allow empty path
- if (inputSubsystemConfiguration.isUnixStyle()) {
- return folderText.length() > 0 && filterGiven;
- }
- // otherwise, if it is Windows
- else {
-
- // check if folder path is empty
- if (folderText.length() == 0) {
-
- // KM: defect 53210
- // if folder path empty, only valid filter is subset by file name and it
- // must be wild card
- if (subsetByFileName) {
- return fileNameText.equals("*");
- }
- // if we are not subsetting by file name, it is not valid
- else {
- return false;
- }
- }
- // if folder path is not empty, we just make sure a subset is given
- else {
- return filterGiven;
- }
- }
- }
- // otherwise don't care about folder path
- else {
- return filterGiven;
- }
- }
- }
- /**
- * Enable/disable fields dependent on radiobuttons
- */
- private void enableFields(boolean byFileName)
- {
- labelTypes.setEnabled(!byFileName);
- //textTypes.setEnabled(!byFileName);
- selectTypesButton.setEnabled(!byFileName);
- labelFile.setEnabled(byFileName);
- textFile.setEnabled(byFileName);
- }
-
- /**
- * Get the action to run when "Select Types..." is pressed by the user
- */
- protected SystemSelectFileTypesAction getSelectTypesAction()
- {
- if (typesAction == null)
- typesAction = new SystemSelectFileTypesAction(selectTypesButton.getShell());
- return typesAction;
- }
-
-
- /**
- * Completes processing of the wizard page or dialog. If this
- * method returns true, the wizard/dialog will close;
- * otherwise, it will stay active.
- *
- * @return error, if there is one
- */
- public SystemMessage verify()
- {
- errorMessage = null;
- Control controlInError = null;
- calledFromVerify = true;
- skipEventFiring = true;
-
- errorMessage = validateFolderInput();
- if (errorMessage != null)
- {
- controlInError = folderCombo;
- }
- else
- {
- if (subsetByFileNameRadioButton.getSelection()) {
- errorMessage = validateFileInput();
- }
- else
- {
- if (textTypes.getText().trim().length() == 0)
- {
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_ERROR_NOFILETYPES);
- }
- }
- controlInError = textFile;
- }
- if ((errorMessage == null) && (inputFilterStrings!=null) && !skipUniquenessChecking)
- {
- boolean notUnique = false;
- String currFilterString = getFilterString();
- if (containsFilterString(currFilterString))
- notUnique = true;
- if (notUnique)
- {
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString);
- }
- controlInError = textFile;
- }
-
- if (errorMessage != null)
- {
- if (!dontStealFocus)
- controlInError.setFocus();
- }
- else
- folderCombo.updateHistory(true);
-
- calledFromVerify = false;
- skipEventFiring = false;
- fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- /*
- *
- */
- private boolean containsFilterString(String newString)
- {
- if (inputFilterStrings == null)
- return false;
- else
- {
- for (int idx=0; idx<inputFilterStrings.length; idx++)
- {
- if (caseSensitive)
- {
- if (inputFilterStrings[idx].equals(newString))
- return true;
- }
- else
- {
- if (inputFilterStrings[idx].equalsIgnoreCase(newString))
- return true;
- }
- }
- }
- return false;
- }
-
- // ---------------------------------------------
- // METHODS FOR VERIFYING INPUT PER KEYSTROKE ...
- // ---------------------------------------------
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateFileInput()
- {
- if (noValidation || ignoreChanges)
- return null;
-
- errorMessage = null;
-
- // first validate file name
- if (fileValidator != null)
- {
- if (fileValidator instanceof ValidatorFileFilterString)
- {
- ValidatorFileFilterString fv = (ValidatorFileFilterString)fileValidator;
- fv.setIsFileName(true);
- }
-
- errorMessage = fileValidator.validate(textFile.getText().trim());
- }
-
- // if there is no error message, then validate that folder name is correct
- // this fires a change event
- if (errorMessage == null) {
- errorMessage = validateFolderInput();
- }
- // otherwise, simply fire change event
- // Bug 142185: fire an event with null to erase any previously shown and saved error message
- else {
- fireChangeEvent(null);
- fireChangeEvent(errorMessage);
- }
-
- return errorMessage;
- }
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateFolderInput()
- {
- if (noValidation || ignoreChanges)
- return null;
- errorMessage= null;
-
- String folderComboText = folderCombo.getText().trim();
-
- // first check if folder path is empty
- if (folderComboText.length() == 0) {
-
- // KM: defect 53009.
- // If the input subsystem factory is Unix, we do not allow empty folder path.
- // Note that for Windows, it is perfectly valid to have an empty folder path,
- // which indicates that the filter will resolve to show all the drives
- if (inputSubsystemConfiguration != null) {
-
- if (inputSubsystemConfiguration.isUnixStyle()) {
-
- // let error message come from path validator
- if (pathValidator != null) {
- errorMessage = pathValidator.validate(folderComboText);
- }
- // no path validator, so just use default path empty message
- else {
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY);
- }
- }
- // KM: defect 53210
- // for Windows, check that subset by file name is selected
- // and that it is wild card character
- else {
-
- if (!subsetByFileNameRadioButton.getSelection() || !textFile.getText().trim().equals("*")) {
-
- // let error message come from path validator
- if (pathValidator != null) {
- errorMessage = pathValidator.validate(folderComboText);
- }
- // no path validator, so just use default path empty message
- else {
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY);
- }
- }
- }
- }
- }
- // otherwise go through path validator
- else if (pathValidator != null) {
- errorMessage = pathValidator.validate(folderComboText);
- }
-
- fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- // ------------------------------
- // DATA EXTRACTION METHODS
- // ------------------------------
-
- /**
- * Get the filter string in its current form.
- * This should be overridden if createContents is overridden.
- */
- public String getFilterString()
- {
- if (folderCombo == null)
- return inputFilterString;
- String folder = folderCombo.getText().trim();
- boolean subsetByFileName = subsetByFileNameRadioButton.getSelection();
- String file = null;
- if (subsetByFileName)
- file = textFile.getText().trim();
- else
- file = textTypes.getText().trim();
- boolean showFilesOnly = filesOnlyCheckBox.getSelection();
- boolean showSubDirs = !showFilesOnly; //subdirCheckBox.getSelection();
- boolean showFiles = true; //fileCheckBox.getSelection();
- RemoteFileFilterString rffs = new RemoteFileFilterString(inputSubsystemConfiguration, folder, file);
- rffs.setShowSubDirs(showSubDirs);
- rffs.setShowFiles(showFiles);
- //System.out.println("internalGetFilterString: showSubDirs = " + showSubDirs + ", showFiles = " + showFiles);
- //System.out.println("... resulting string: " + rffs.toString());
- return rffs.toString();
- }
-
- // ------------------
- // EVENT LISTENERS...
- // ------------------
-
- /**
- * User has selected something
- */
- public void widgetSelected(SelectionEvent event)
- {
- Object src = event.getSource();
- dontStealFocus = true;
- /*
- else if (src == subdirCheckBox)
- validateFileInput();
- else if (src == fileCheckBox)
- validateFileInput();
- */
- if (src == filesOnlyCheckBox)
- {
- verify();
- }
- else if (src == subsetByFileNameRadioButton)
- {
- verify();
- enableFields(true);
- textFile.setFocus();
- }
- else if (src == subsetByFileTypesRadioButton)
- {
- verify();
- enableFields(false);
- selectTypesButton.setFocus();
- }
- else if (src == selectTypesButton)
- {
- SystemSelectFileTypesAction typesAction = getSelectTypesAction();
- String typesString = textTypes.getText().trim();
- typesAction.setTypes(typesString);
- typesAction.run();
- if (!typesAction.wasCancelled())
- {
- typesString = typesAction.getTypesString();
- textTypes.setText(typesString);
- dontStealFocus = false;
- verify();
- }
- }
- dontStealFocus = false;
- }
-
- /**
- * Called by us or by owning dialog when common Test button is pressed
- */
- public void processTest(Shell shell)
- {
- if (refProvider == null)
- {
- SystemBasePlugin.logWarning("Programming Error: input subsystem is not set");
- return;
- }
- skipUniquenessChecking = true;
- if (verify() == null)
- {
- SystemTestFilterStringAction testAction = new SystemTestFilterStringAction(getShell());
- testAction.setSubSystem((ISubSystem)refProvider);
- testAction.setFilterString(getFilterString());
- try
- {
- testAction.run();
- }
- catch (Exception exc)
- {
-
- SystemMessage msg = SystemMessageDialog.getExceptionMessage(getShell(), exc);
- fireChangeEvent(msg);
- }
- }
- skipUniquenessChecking = false;
- }
-
- // ------------------------
- // STATIC HELPER METHODS...
- // ------------------------
-
- /**
- * Reusable method to return a name validator for creating/update a file system filter string
- * @param filter The system filter to which we are adding/updating a filter string.
- * @param filterString The current filter object on updates. Can be null for new string. Used
- * to remove from the existing string list the current filter string.
- */
- public static ValidatorFileFilterString getFileFilterStringValidator(ISystemFilter filter, String filterString)
- {
- Vector v = filter.getFilterStringsVector();
- if (filterString != null)
- v.removeElement(filterString);
- IRemoteFileSubSystemConfiguration ssFactory = (IRemoteFileSubSystemConfiguration)filter.getProvider();
- ValidatorFileFilterString validator = new ValidatorFileFilterString(ssFactory,v);
- return validator;
- }
-
- /**
- * Reusable method to return a name validator for creating/update a file system filter string.
- * No unique checking.
- */
- public static ValidatorFileFilterString getFileFilterStringValidator(IRemoteFileSubSystemConfiguration ssFactory)
- {
- return new ValidatorFileFilterString(ssFactory);
- }
-
- /**
- * If the file filter string is in new mode, and we have a non-Unix system, then if
- * the folder name is empty and other fields are at default, we do not allow an implicit
- * save through changing of filter string or pressing Ok button in the change filter pane.
- * If in new mode for non-Unix system, and the user hasn't changed the other fields,
- * we force user to use the Create button to create the filter string explicitly.
- * @see org.eclipse.rse.ui.filters.SystemFilterStringEditPane#canSaveImplicitly()
- */
- public boolean canSaveImplicitly() {
-
- // KM: defect 53009.
- // check if subsystem factory is non Unix and we're in new mode
- if (newMode && inputSubsystemConfiguration != null && !inputSubsystemConfiguration.isUnixStyle()) {
-
- // check that folder combo is empty
- String folderComboText = folderCombo.getText().trim();
-
- // if so, return false if other fields haven't changed
- // So a user is not able to save with an empty folder path without
- // explicitly pressing Create.
- // Note that if we're changing an existing filter string, a user can save
- // implicitly (i.e. without pressing Apply), by changing the filter
- // string selection in the filter string list in SystemChangeFilterPane
- // or by pressing Ok with pending changes. Same goes for a new filter
- // string for which the user has changed the subset by file name
- // or subset by file type fields. KM: defect 53210
- if (folderComboText.length() == 0 &&
- subsetByFileNameRadioButton.getSelection() &&
- textFile.getText().trim().equals("*")) {
- return false;
- }
- else {
- return super.canSaveImplicitly();
- }
- }
- else {
- return super.canSaveImplicitly();
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileTreeAndListGroup.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileTreeAndListGroup.java
deleted file mode 100644
index 3e590dc51..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileTreeAndListGroup.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEmpty;
-import org.eclipse.swt.widgets.Composite;
-
-
-
-
-/**
- * This is a private-use subclass of the internal Eclipse ResourceTreeAndListGroup
- * composite widget. This is for selecting multiple local or remote files. It contains
- * a checkbox tree on the left for selecting the folder, and a checkbox list on the
- * right for selecting the files.
- * <p>
- * We subclass this to add some slight additional functionality, including support for
- * refreshing the contents.
- */
-public class SystemFileTreeAndListGroup extends org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup
-{
- private Object rootObject = null;
- private Object lastSelectedElement = null;
- //private ISelectionProvider selectionProvider = null;
- // CONSTANTS
- private static final RemoteFileEmpty EMPTYROOT = new RemoteFileEmpty();
-
- /**
- * Constructor when there is initial content
- * @param parent org.eclipse.swt.widgets.Composite
- * @param rootObject java.lang.Object
- * @param treeContentProvider supplies the folders for the tree
- * @param treeLabelProvider supplies the names and icons of the folders for the tree
- * @param listContentProvider supplies the files for the tree
- * @param listLabelProvider supplies the names and icons for the files for the list
- * @param style int
- * @param width int
- * @param height int
- */
- public SystemFileTreeAndListGroup(Composite parent,Object rootObject,
- ITreeContentProvider treeContentProvider, ILabelProvider treeLabelProvider,
- IStructuredContentProvider listContentProvider, ILabelProvider listLabelProvider,
- int style,int width,int height)
- {
- // DKM - API change
- //super(parent, rootObject, treeContentProvider, treeLabelProvider,
- // listContentProvider, listLabelProvider, style, width, height);
- super(parent, rootObject, treeContentProvider, treeLabelProvider,
- listContentProvider, listLabelProvider, style, true);
-
- this.rootObject = rootObject;
- }
- /**
- * Constructor when there is no initial content
- * @param parent org.eclipse.swt.widgets.Composite
- * @param treeContentProvider supplies the folders for the tree
- * @param treeLabelProvider supplies the names and icons of the folders for the tree
- * @param listContentProvider supplies the files for the tree
- * @param listLabelProvider supplies the names and icons for the files for the list
- * @param style int
- * @param width int
- * @param height int
- */
- public SystemFileTreeAndListGroup(Composite parent,
- ITreeContentProvider treeContentProvider, ILabelProvider treeLabelProvider,
- IStructuredContentProvider listContentProvider, ILabelProvider listLabelProvider,
- int style,int width,int height)
- {
- this(parent, EMPTYROOT, treeContentProvider, treeLabelProvider,
- listContentProvider, listLabelProvider, style, width, height);
- }
-
-
- // does not work! The viewers are private, and the create methods don't return them!!
- /**
- * Create this group's list viewer.
- * Override of parent so we can record locally the list viewer widget.
- *
- protected void createListViewer(Composite parent, int width, int height)
- {
- listViewer = super.createListViewer(parent, width, height);
- return listViewer;
- }*/
-
- /**
- * Refesh all the contents of the checkbox viewers
- */
- public void refresh()
- {
- if (! (rootObject instanceof RemoteFileEmpty) )
- {
- Object oldRoot = rootObject;
- setRoot(EMPTYROOT);
- setRoot(oldRoot);
- /*
- if ((selectionProvider!=null) && (oldRoot instanceof RemoteFileRootImpl))
- {
- RemoteFileRootImpl root = (RemoteFileRootImpl)oldRoot;
- IRemoteFile rootFile = root.getRootFile();
- if (rootFile != null)
- super.selectionChanged(new SelectionChangedEvent(selectionProvider,
- new StructuredSelection(oldRoot)));
- }
- */
- }
- }
-
- /**
- * Refesh the contents of the file-selection checkbox viewer.
- */
- public void refreshFiles()
- {
- if (lastSelectedElement != null)
- populateListViewer(lastSelectedElement);
- }
-
- /**
- * Handle the selection of an item in the tree viewer.
- * Intercept of parent so we can record the last selected tree node.
- * @param selection ISelection
- */
- public void selectionChanged(SelectionChangedEvent event)
- {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- lastSelectedElement = selection.getFirstElement();
- //selectionProvider = event.getSelectionProvider();
- super.selectionChanged(event);
- }
-
- /**
- * Set the root of the widget to be new Root. Regenerate all of the tables and lists from this
- * value.
- * Intercept of parent so we can refresh internal variables.
- * @param newRoot
- */
- public void setRoot(Object newRoot)
- {
- lastSelectedElement = null;
- rootObject = newRoot;
- super.setRoot(newRoot);
- }
-
- /**
- * Clear the contents
- */
- public void clearAll()
- {
- setRoot(EMPTYROOT);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAbstractRemoteFilePopupMenuExtensionAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAbstractRemoteFilePopupMenuExtensionAction.java
deleted file mode 100644
index 236025d0f..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAbstractRemoteFilePopupMenuExtensionAction.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui.actions;
-import java.util.Iterator;
-
-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.actions.SystemAbstractPopupMenuExtensionAction;
-import org.eclipse.ui.IObjectActionDelegate;
-
-
-/**
- * This is a base class to simplify the creation of actions supplied via the
- * org.eclipse.rse.ui.popupMenus extension point, targeting remote files
- * and/or remote folders.
- * <p>
- * The only method you must implement is {@link #run()}.
- * You may optionally override {@link #getEnabled(Object[])}
- * <p>
- * Convenience methods available in this class:
- * <ul>
- * <li>{@link #getSelectedRemoteFiles()}
- * <li>{@link #getFirstSelectedRemoteFile()}
- * <li>{@link #getRemoteFileSubSystem()}
- * <li>{@link #getRemoteFileSubSystemConfiguration()}
- * </ul>
- * <p>
- * See also the convenience methods available in the parent class {@link SystemAbstractPopupMenuExtensionAction}
- *
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter
- * @see org.eclipse.rse.ui.dialogs.SystemPromptDialog
- */
-public abstract class SystemAbstractRemoteFilePopupMenuExtensionAction
- extends SystemAbstractPopupMenuExtensionAction
- implements IObjectActionDelegate
-{
-
- /**
- * Constructor
- */
- public SystemAbstractRemoteFilePopupMenuExtensionAction()
- {
- super();
- }
-
- // ----------------------------------
- // OVERRIDABLE METHODS FROM PARENT...
- // ----------------------------------
-
- /**
- * The user has selected this action. This is where the actual code for the action goes.
- */
- public abstract void run();
-
- /**
- * The user has selected one or more objects. This is an opportunity to enable/disable
- * this action based on the current selection.
- * <p>
- * The default implementation of this method returns false if all the objects are not of
- * type IRemoteFile.
- */
- public boolean getEnabled(Object[] currentlySelected)
- {
- for (int idx=0; idx<currentlySelected.length; idx++)
- if (!(currentlySelected[idx] instanceof IRemoteFile))
- return false;
- return true;
- }
-
- // ------------------------------------------------------------------
- // CONVENIENCE METHODS WE ADD SPECIFICALLY FOR REMOTE FILE ACTIONS...
- // ------------------------------------------------------------------
-
- /**
- * Retrieve the currently selected objects as an array of IRemoteFile objects.
- * Array may be length 0, but will never be null, for convenience.
- */
- public IRemoteFile[] getSelectedRemoteFiles()
- {
- IRemoteFile[] seld = new IRemoteFile[(sel!=null) ? sel.size() : 0];
- if (sel == null)
- return seld;
- Iterator i = sel.iterator();
- int idx=0;
- while (i.hasNext())
- seld[idx++] = (IRemoteFile)i.next();
- return seld;
- }
- /**
- * Retrieve the first selected object, as an IRemoteFile, for convenience.
- * Will be null if there is nothing selected
- */
- public IRemoteFile getFirstSelectedRemoteFile()
- {
- //System.out.println("Sel = " + sel);
- if (sel == null)
- return null;
- Object obj = sel.getFirstElement();
- //System.out.println("obj = " + obj);
- if (obj instanceof IRemoteFile)
- return (IRemoteFile)obj;
- else
- return null;
- }
-
- /**
- * Get the remote file subsystem from which the selected objects were resolved.
- * This has many useful methods in it, including support to transfer files to and
- * from the local and remote systems.
- */
- public IRemoteFileSubSystem getRemoteFileSubSystem()
- {
- return (IRemoteFileSubSystem)getSubSystem();
- }
-
- /**
- * Returns the remote file subsystem factory which owns the subsystem from which the
- * selected remote objects were resolved. This has some useful methods in it,
- * including isUnixStyle() indicating if this remote file system is unix or windows.
- */
- public IRemoteFileSubSystemConfiguration getRemoteFileSubSystemConfiguration()
- {
- return (IRemoteFileSubSystemConfiguration)getSubSystemConfiguration();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 4d758116b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAddToArchiveAction.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.resources.AddToArchiveDialog;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.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;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class SystemAddToArchiveAction extends SystemBaseAction
-{
-
- protected List _selected;
- protected Shell _parent;
-
- public SystemAddToArchiveAction(Shell parent)
- {
- super(FileResources.ACTION_ADDTOARCHIVE_LABEL, parent);
- setToolTipText(FileResources.ACTION_ADDTOARCHIVE_TOOLTIP);
- _selected = new ArrayList();
- _parent = parent;
- allowOnMultipleSelection(true);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0122"); //$NON-NLS-1$
- }
-
- public SystemAddToArchiveAction(Shell parent, String label, String tooltip)
- {
- super(label, tooltip, parent);
- _selected = new ArrayList();
- _parent = parent;
- allowOnMultipleSelection(true);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0122"); //$NON-NLS-1$
- }
-
- public void run()
- {
- boolean repeat = true;
- while (repeat)
- {
- IRemoteFile firstSelection = (IRemoteFile) _selected.get(0);
- String title = FileResources.RESID_ADDTOARCHIVE_TITLE;
-
- String[] relativePaths = getRelativePaths();
-
- AddToArchiveDialog dialog = new AddToArchiveDialog(getShell(), title, relativePaths);
- dialog.setNeedsProgressMonitor(false);
-
- dialog.setMessage(FileResources.RESID_ADDTOARCHIVE_PROMPT);
- dialog.setShowNewConnectionPrompt(true);
- dialog.setShowPropertySheet(true, false);
-
- dialog.setPreSelection(firstSelection);
-
- dialog.setBlockOnOpen(true);
- dialog.setShowLocationPrompt(true);
- dialog.setLocationPrompt(FileResources.RESID_ADDTOARCHIVE_LOCATION);
- dialog.setNameAndTypePrompt(FileResources.RESID_ADDTOARCHIVE_NAMEANDTYPE);
- //dialog.setSelectionValidator(this);
-
- int rc = dialog.open();
-
- // if (rc != 0) NOT RELIABLE!
- boolean cancelled = false;
- if (dialog.wasCancelled()) cancelled = true;
-
- IRemoteFile destinationArchive = null;
- IRemoteFileSubSystem destSS = null;
- boolean saveFullPathInfo;
- String relativeTo = ""; //$NON-NLS-1$
-
- if (!cancelled)
- {
- destinationArchive = (IRemoteFile) dialog.getOutputObject();
- saveFullPathInfo = dialog.getSaveFullPathInfo();
- if (saveFullPathInfo) relativeTo = dialog.getRelativePath();
- destSS = destinationArchive.getParentRemoteFileSubSystem();
- }
- else
- {
- return;
- }
- if (destinationArchive == null)
- {
- System.out.println("blah");
- }
-
- if (ArchiveHandlerManager.isVirtual(destinationArchive.getAbsolutePath()))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ADDTO_VIRTUAL_DEST);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- continue;
- }
-
- if (destinationInSource(destinationArchive))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- continue;
- }
-
- try
- {
- if (!destinationArchive.exists()) destSS.createFile(destinationArchive);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- continue;
- }
- for (int i = 0; i < _selected.size(); i++)
- {
- IRemoteFile selection = (IRemoteFile) _selected.get(i);
- addToArchive(selection, destinationArchive, saveFullPathInfo, relativeTo);
- }
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destinationArchive, destinationArchive.getParentPath(), destSS, null, null);
- registry.fireEvent(new SystemResourceChangeEvent(destinationArchive, ISystemResourceChangeEvents.EVENT_REFRESH, destinationArchive.getParentPath()));
- repeat = false;
- }
- return;
- }
-
- public void addToArchive(IRemoteFile source, IRemoteFile destinationArchive, boolean saveFullPathInfo, String relativeTo)
- {
- IRemoteFile destination = null;
-
- if (destinationArchive == null)
- {
- return;
- }
- if (!destinationArchive.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement())
- {
- return;
- }
- if (ArchiveHandlerManager.isVirtual(destinationArchive.getAbsolutePath()))
- {
- return;
- }
- if (destinationInSource(destinationArchive))
- {
- return;
- }
- if (!destinationArchive.isArchive())
- {
- return;
- }
- try
- {
- if (!destinationArchive.exists()) destinationArchive.getParentRemoteFileSubSystem().createFile(destinationArchive);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- return;
- }
- if (saveFullPathInfo)
- {
- String selectionPath = source.getAbsolutePath();
- String destinationVirtualDirectory = selectionPath.substring(relativeTo.length());
- int lastSlash = destinationVirtualDirectory.lastIndexOf(source.getSeparatorChar());
- if (lastSlash != -1)
- {
- destinationVirtualDirectory = destinationVirtualDirectory.substring(0, lastSlash);
- destinationVirtualDirectory = ArchiveHandlerManager.cleanUpVirtualPath(destinationVirtualDirectory);
- String newDestinationPath = destinationArchive.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + destinationVirtualDirectory;
- try
- {
- destination = destinationArchive.getParentRemoteFileSubSystem().getRemoteFileObject(newDestinationPath);
- if (!destination.exists())
- {
- destinationArchive.getParentRemoteFileSubSystem().createFolders(destination);
- }
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- return;
- }
-
- }
- }
- IRemoteFileSubSystem sourceSS = source.getParentRemoteFileSubSystem();
-
- IRunnableContext runnableContext = getRunnableContext(_parent);
-
- CopyRunnable runnable = new CopyRunnable(source, destination);
- try
- {
- // currently we don't run this in a thread because
- // in some cases dialogs are launched in the operation
- // (widgets can only be legally used on the main thread)
- runnableContext.run(false, true, runnable); // inthread, cancellable, IRunnableWithProgress
- }
- catch (java.lang.reflect.InvocationTargetException exc)
- {
- }
- catch (java.lang.InterruptedException e)
- {
- }
- }
-
- protected class CopyRunnable implements IRunnableWithProgress
- {
- private IRemoteFileSubSystem destSS;
- private IRemoteFileSubSystem sourceSS;
- private IRemoteFile selection;
- private IRemoteFile destination;
-
- public CopyRunnable(IRemoteFile source, IRemoteFile dest)
- {
- destSS = dest.getParentRemoteFileSubSystem();
- sourceSS = source.getParentRemoteFileSubSystem();
- selection = source;
- destination = dest;
- }
-
- public void run(IProgressMonitor monitor)
- {
- try
- {
- ISystemDragDropAdapter srcAdapter = (ISystemDragDropAdapter) ((IAdaptable) selection).getAdapter(ISystemDragDropAdapter.class);
- boolean sameSysType = sourceSS.getClass().equals(destSS.getClass());
- srcAdapter.doDrag(selection, sameSysType, monitor);
- boolean sameSys = (sourceSS == destSS);
- srcAdapter.doDrop(selection, destination, sameSysType, sameSys, 0, monitor);
- }
- catch (Exception e)
- {
- System.out.println(e.getMessage());
- System.out.println("SystemAddToArchiveAction: Could not drag and drop " + selection.getAbsolutePath());
- }
- }
- }
-
- /**
- * Called when the selection changes in the systems view. This determines
- * the input object for the command and whether to enable or disable
- * the action.
- *
- * @param selection the current seleciton
- * @return whether to enable or disable the action
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- _selected.clear();
- boolean enable = false;
-
- Iterator e = selection.iterator();
- while (e.hasNext())
- {
- Object selected = e.next();
-
- if (selected != null && selected instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) selected;
- _selected.add(file);
- enable = true;
- }
- else
- {
- return false;
- }
- }
- return enable;
- }
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
-
- return new ProgressMonitorDialog(shell);
- }
-
- protected boolean destinationInSource(IRemoteFile destination)
- {
- boolean insource = false;
- for (int i = 0; i < _selected.size(); i++)
- {
- if (isAncestorOf((IRemoteFile)_selected.get(i), destination))
- {
- insource = true;
- break;
- }
- }
- return insource;
- }
-
- protected boolean isAncestorOf(IRemoteFile ancestor, IRemoteFile descendant)
- {
- return ancestor.isAncestorOf(descendant);
- }
-
- protected String[] getRelativePaths()
- {
- IRemoteFile file = (IRemoteFile) _selected.get(0);
- if (file instanceof IVirtualRemoteFile) return null;
- IHost con = file.getSystemConnection();
- String host = con.getHostName();
- String root = file.getRoot();
- String lowestCommonPath = file.getAbsolutePath();
- boolean caseSensitive = file.getParentRemoteFileSubSystem().isCaseSensitive();
- char separator = file.getSeparatorChar();
-
- for (int i = 1; i < _selected.size(); i++)
- {
- file = (IRemoteFile) _selected.get(i);
- if (file instanceof IVirtualRemoteFile) return null;
- IHost nextCon = file.getSystemConnection();
- String nextHost = nextCon.getHostName();
- String nextRoot = file.getRoot();
- String nextPath = file.getAbsolutePath();
- if (nextHost.equals(host) && nextRoot.equals(root))
- {
- lowestCommonPath = getLowestCommonPath(lowestCommonPath, nextPath, caseSensitive);
- }
- else
- {
- return null;
- }
- }
- return getRelativePaths(lowestCommonPath, separator);
- }
-
- protected String[] getRelativePaths(String lcp, char separator)
- {
- Vector relpaths = new Vector();
- for (int i = lcp.length() - 1; i >= 0; i--)
- {
- if (lcp.charAt(i) == separator)
- {
- relpaths.add(lcp.substring(0, i+1));
- }
- }
- String[] results = new String[relpaths.size()];
- for (int i = 0; i < relpaths.size(); i++)
- {
- results[i] = (String) relpaths.get(i);
- }
- return results;
- }
-
- protected String getLowestCommonPath(String str1, String str2, boolean caseSensitive)
- {
- int maxLength = Math.min(str1.length(), str2.length());
-
- for (int i = maxLength; i >= 0; i--)
- {
- if (str1.regionMatches(!caseSensitive, 0, str2, 0, i))
- {
- return str1.substring(0, i);
- }
- }
- return ""; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemBrowseFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemBrowseFileAction.java
deleted file mode 100644
index 4fcaccc2a..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemBrowseFileAction.java
+++ /dev/null
@@ -1,52 +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.files.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Open a remote file as read-only
- */
-public class SystemBrowseFileAction extends SystemEditFileAction {
-
-
- /**
- * Constructor for SystemBrowseFileAction.
- * @param text
- * @param tooltip
- * @param image
- * @param parent
- * @param editorId
- */
- public SystemBrowseFileAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId) {
- super(text, tooltip, image, parent, editorId);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.actions.SystemEditFileAction#process(IRemoteFile)
- */
- protected void process(IRemoteFile remoteFile) {
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorId);
- editableFile.open(SystemBasePlugin.getActiveWorkbenchShell(), true);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemBrowseFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemBrowseFileLineAction.java
deleted file mode 100644
index a12d7619e..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemBrowseFileLineAction.java
+++ /dev/null
@@ -1,55 +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.files.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Open a remote file as read-only
- */
-public class SystemBrowseFileLineAction extends SystemEditFileLineAction {
-
-
- /**
- * Constructor for SystemBrowseFileAction.
- * @param text
- * @param tooltip
- * @param image
- * @param parent
- * @param editorId
- * @param line
- */
- public SystemBrowseFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId,
- IRemoteFile remoteFile, int line, int charStart, int charEnd) {
- super(text, tooltip, image, parent, editorId, remoteFile, line, charStart, charEnd);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.actions.SystemEditFileAction#process(IRemoteFile)
- */
- protected void process(IRemoteFile remoteFile) {
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorId);
- editableFile.open(SystemBasePlugin.getActiveWorkbenchShell(), true);
- handleGotoLine();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index c314e4a2d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCombineAction.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.actions;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.resources.CombineDialog;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.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;
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class SystemCombineAction extends SystemExtractToAction {
-
- public SystemCombineAction(Shell parent)
- {
- super(parent, FileResources.ACTION_COMBINE_LABEL, FileResources.ACTION_COMBINE_TOOLTIP);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0120");
- setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_COMBINE_ID));
-
- }
-
- public void run()
- {
- boolean repeat = true;
- while (repeat)
- {
- IRemoteFile firstSelection = (IRemoteFile) _selected.get(0);
- String title = FileResources.RESID_COMBINE_TITLE;
- CombineDialog dialog = new CombineDialog(getShell(), title);
- if (dialog == null)
- return;
- dialog.setNeedsProgressMonitor(false);
-
- dialog.setMessage(FileResources.RESID_COMBINE_PROMPT);
- dialog.setShowNewConnectionPrompt(true);
- dialog.setShowPropertySheet(true, false);
- dialog.setSystemTypes(systemTypes);
-
- dialog.setPreSelection(firstSelection);
-
- dialog.setBlockOnOpen(true);
-
- int rc = dialog.open();
-
- // if (rc != 0) NOT RELIABLE!
- boolean cancelled = false;
- if (dialog.wasCancelled()) cancelled = true;
-
- IRemoteFile destination = null;
- IRemoteFileSubSystem destSS = null;
- if (!cancelled)
- {
- destination = (IRemoteFile) dialog.getOutputObject();
- destSS = destination.getParentRemoteFileSubSystem();
- }
- else
- {
- return;
- }
- if (destination == null)
- {
- System.out.println("blah");
- }
-
- if (ArchiveHandlerManager.isVirtual(destination.getAbsolutePath()))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMBINETO_VIRTUAL_DEST);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- continue;
- }
-
- if (destinationInSource(destination))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- continue;
- }
-
- try
- {
- if (!destination.exists()) destSS.createFile(destination);
- }
- catch (SystemMessageException e)
- {
- System.out.println(e.getMessage());
- }
- for (int i = 0; i < _selected.size(); i++)
- {
- IRemoteFile selection = (IRemoteFile) _selected.get(i);
- IRemoteFileSubSystem sourceSS = selection.getParentRemoteFileSubSystem();
-
- IRunnableContext runnableContext = getRunnableContext(_parent);
- String nextName = selection.getName();
- int j = nextName.lastIndexOf(".");
- if (j != -1)
- {
- nextName = nextName.substring(0, j);
- }
- String nextDest = destination.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + nextName;
- IRemoteFile nextDestination = null;
- try
- {
- while (destSS.getRemoteFileObject(nextDest).exists())
- {
- nextDest = nextDest + "1";
- }
- nextDestination = destSS.getRemoteFileObject(nextDest);
- destSS.createFolder(nextDestination);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- return;
- }
-
- ExtractRunnable runnable = new ExtractRunnable(selection, nextDestination);
- try
- {
- // currently we don't run this in a thread because
- // in some cases dialogs are launched in the operation
- // (widgets can only be legally used on the main thread)
- runnableContext.run(false, true, runnable); // inthread, cancellable, IRunnableWithProgress
- }
- catch (java.lang.reflect.InvocationTargetException exc)
- {
- }
- catch (java.lang.InterruptedException e)
- {
- }
- }
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destination, destination.getParentPath(), destSS, null, null);
- registry.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH, destination.getParentPath()));
- repeat = false;
- }
- return;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCompareFilesAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCompareFilesAction.java
deleted file mode 100644
index 9abd49776..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCompareFilesAction.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.compare.SystemCompareInput;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Compare two remote files
- */
-public class SystemCompareFilesAction extends SystemBaseAction
-{
-
-
- private List _selected;
-
- /**
- * Constructor for SystemCompareFilesAction
- * @param parent
- */
- public SystemCompareFilesAction(Shell parent)
- {
- super(FileResources.ACTION_COMPAREWITH_EACH_LABEL, parent);
- setToolTipText(FileResources.ACTION_COMPAREWITH_EACH_TOOLTIP);
- _selected = new ArrayList();
- allowOnMultipleSelection(true);
- }
-
- /**
- * Compare two remote files
- */
- public void run()
- {
- CompareConfiguration cc = new CompareConfiguration();
- cc.setProperty("org.eclipse.compare.internal.CONFIRM_SAVE_PROPERTY", new Boolean(false));
- SystemCompareInput fInput = new SystemCompareInput(cc);
-
- for (int i = 0; i < _selected.size(); i++)
- {
- IRemoteFile file = (IRemoteFile) _selected.get(i);
- SystemEditableRemoteFile ef = new SystemEditableRemoteFile(file);
- fInput.addRemoteEditable(ef);
- }
-
- CompareUI.openCompareEditor(fInput);
- }
-
- /**
- * Called when the selection changes in the systems view. This determines
- * the input object for the command and whether to enable or disable
- * the action.
- *
- * @param selection the current seleciton
- * @return whether to enable or disable the action
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- _selected.clear();
- boolean enable = false;
-
- Iterator e = selection.iterator();
- while (e.hasNext())
- {
- Object selected = e.next();
-
- if (selected != null && selected instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) selected;
- if (file.isFile())
- {
- _selected.add(file);
- if (_selected.size() == 2)
- {
- enable = true;
- }
- else
- {
- enable = false;
- }
- }
- else
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- }
-
- return enable;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCompareWithEditionAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCompareWithEditionAction.java
deleted file mode 100644
index 61dab8f92..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCompareWithEditionAction.java
+++ /dev/null
@@ -1,38 +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.files.ui.actions;
-
-import org.eclipse.compare.internal.ICompareContextIds;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class SystemCompareWithEditionAction extends SystemEditionAction
-{
-
- public SystemCompareWithEditionAction(Shell parent)
- {
- super(parent,
- FileResources.ACTION_COMPAREWITH_HISTORY_LABEL,
- FileResources.ACTION_COMPAREWITH_HISTORY_TOOLTIP,
- "org.eclipse.compare.internal.CompareWithEditionAction",
- false);
-
- this.fHelpContextId= ICompareContextIds.COMPARE_WITH_EDITION_DIALOG;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ef8c3aaad..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemConvertAction.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.actions;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.resources.CombineDialog;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.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;
-
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class SystemConvertAction extends SystemExtractToAction {
-
- public SystemConvertAction(Shell parent)
- {
- super(parent, FileResources.ACTION_CONVERT_LABEL, FileResources.ACTION_CONVERT_TOOLTIP);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0121");
- setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONVERT_ID));
-
- }
-
- public void run()
- {
- for (int i = 0; i < _selected.size(); i++)
- {
- IRemoteFile selection = (IRemoteFile) _selected.get(i);
- String title = FileResources.RESID_CONVERT_TITLE;
- CombineDialog dialog = new CombineDialog(getShell(), title, true);
- if (dialog == null)
- return;
- dialog.setNeedsProgressMonitor(false);
- String message = SystemMessage.sub(FileResources.RESID_CONVERT_PROMPT, "&1", selection.getAbsolutePath());
- dialog.setMessage(message);
- dialog.setShowNewConnectionPrompt(true);
- dialog.setShowPropertySheet(true, false);
- dialog.setSystemTypes(systemTypes);
-
- dialog.setPreSelection(selection);
-
- dialog.setBlockOnOpen(true);
- dialog.setHelp(RSEUIPlugin.HELPPREFIX + "cnvd0000");
- dialog.setShowLocationPrompt(true);
- dialog.setLocationPrompt(FileResources.RESID_CONVERT_LOCATION);
- dialog.setNameAndTypePrompt(FileResources.RESID_CONVERT_NAMEANDTYPE);
- dialog.setSelectionValidator(this);
-
- int rc = dialog.open();
-
- // if (rc != 0) NOT RELIABLE!
- boolean cancelled = false;
- if (dialog.wasCancelled()) cancelled = true;
-
- IRemoteFile destination = null;
- IRemoteFileSubSystem destSS = null;
- if (!cancelled)
- {
- destination = (IRemoteFile) dialog.getOutputObject();
- destSS = destination.getParentRemoteFileSubSystem();
- }
- else
- {
- return;
- }
- if (destination == null)
- {
- System.out.println("blah");
- }
-
- if (ArchiveHandlerManager.isVirtual(destination.getAbsolutePath()))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONVERTTO_VIRTUAL_DEST);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- i--;
- continue;
- }
- if (!destination.canWrite())
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_TARGET_READONLY);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- i--;
- continue;
- }
- if (selection.isAncestorOf(destination))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- i--;
- continue;
- }
-
- try
- {
- if (destination.exists())
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS);
- msg.makeSubstitution(destination.getName());
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- boolean ok = dlg.openQuestionNoException();
- if (ok)
- {
- if (destination.getAbsolutePath().equals(selection.getAbsolutePath()))
- {
- continue;
- }
- destSS.delete(destination, null);
- }
- else
- {
- i--;
- continue;
- }
- }
- destSS.createFile(destination);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- continue;
- }
- IRemoteFileSubSystem sourceSS = selection.getParentRemoteFileSubSystem();
-
- IRunnableContext runnableContext = getRunnableContext(_parent);
-
- ExtractRunnable runnable = new ExtractRunnable(selection, destination);
- try
- {
- // currently we don't run this in a thread because
- // in some cases dialogs are launched in the operation
- // (widgets can only be legally used on the main thread)
- runnableContext.run(false, true, runnable); // inthread, cancellable, IRunnableWithProgress
- }
- catch (java.lang.reflect.InvocationTargetException exc)
- {
- }
- catch (java.lang.InterruptedException e)
- {
- }
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destination, destination.getParentPath(), destSS, null, null);
- registry.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH, destination.getParentPath()));
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index d4ca779cc..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCopyRemoteFileAction.java
+++ /dev/null
@@ -1,564 +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.files.ui.actions;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
-import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.subsystems.files.core.util.ValidatorFileUniqueName;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.actions.SystemBaseCopyAction;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Copy selected files and folders action.
- */
-public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
- implements IValidatorRemoteSelection
-{
- protected IRemoteFile targetFolder, targetFileOrFolder = null;
- protected IRemoteFile firstSelection = null;
- protected IRemoteFile firstSelectionParent = null;
- protected IRemoteFile[] files;
- protected Vector copiedFiles = new Vector();
- protected IHost sourceConnection;
- protected IRemoteFileSubSystem ss;
-
- /**
- * Constructor
- */
- public SystemCopyRemoteFileAction(Shell shell)
- {
- this(shell, MODE_COPY);
- }
- /**
- * Constructor for subclass
- */
- SystemCopyRemoteFileAction(Shell shell, int mode)
- {
- super(shell, mode);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0110"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX+"dcrf0000"); //$NON-NLS-1$
- }
-
- /**
- * Reset. This is a re-run of this action
- */
- protected void reset()
- {
- //System.out.println("inside remote file copy reset()");
- super.reset();
- targetFolder = null;
- targetFileOrFolder = null;
- firstSelection = null;
- firstSelectionParent = null;
- files = null;
- copiedFiles = new Vector();
- sourceConnection = null;
- ss = null;
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We simply ensure every selected object is an IRemoteFile
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (!(selectedObject instanceof IRemoteFile))
- enable = false;
- }
- return enable;
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
-
- /**
- * @see SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)
- * @param shell Window to host dialog
- * @param monitor Usually not needed
- * @param targetContainer will be the IRemoteFile folder selected to copy into
- * @param oldObject will be the IRemoteFile object currently being copied
- * @param oldName will be the name of the IRemoteFile object currently being copied
- */
- protected String checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, Object oldObject, String oldName)
- {
- String newName = oldName;
-
- try {
-
-
-
- targetFolder = (IRemoteFile)targetContainer;
- ss = targetFolder.getParentRemoteFileSubSystem();
- targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName);
-
-
- //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!
-
- // we no longer have to set the validator here... the common rename dialog we all now use queries the input
- // object's system view adaptor for its name validator. See getNameValidator in SystemViewRemoteFileAdapter. phil
- ValidatorFileUniqueName validator = null; // new ValidatorFileUniqueName(shell, targetFolder, srcFileOrFolder.isDirectory());
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(shell, true, targetFileOrFolder, validator); // true => copy-collision-mode
- dlg.open();
- if (!dlg.wasCancelled())
- newName = dlg.getNewName();
- else
- newName = null;
- }
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError("SystemCopyRemoteFileAction.checkForCollision()", e);
- }
-
- return newName;
- }
-
-
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- * @param monitor Usually not needed
- * @param targetContainer will be the IRemoteFile folder selected to copy into
- * @param oldObject will be the IRemoteFile object currently being copied
- * @param newName will be the new name to give the oldObject on copy
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- targetFolder = (IRemoteFile)targetContainer;
- IRemoteFile srcFileOrFolder = (IRemoteFile)oldObject;
-
- IHost targetConnection = targetFolder.getSystemConnection();
- IHost srcConnection = srcFileOrFolder.getSystemConnection();
-
- boolean ok = false;
- if (targetConnection == srcConnection)
- {
- ss = targetFolder.getParentRemoteFileSubSystem();
-
-
- ok = ss.copy(srcFileOrFolder, targetFolder, newName, null);
- if (!ok)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_FILE_FAILED);
- msg.makeSubstitution(srcFileOrFolder.getName());
- throw new SystemMessageException(msg);
- }
- else
- {
- String sep = targetFolder.getSeparator();
- String targetFolderName = targetFolder.getAbsolutePath();
- if (!targetFolderName.endsWith(sep))
- copiedFiles.addElement(targetFolderName+sep+newName);
- else
- copiedFiles.addElement(targetFolderName+newName);
- }
- }
- // DKM - for cross system copy
- else
- {
- IRemoteFileSubSystem targetFS = targetFolder.getParentRemoteFileSubSystem();
- IRemoteFileSubSystem srcFS = srcFileOrFolder.getParentRemoteFileSubSystem();
- String newPath = targetFolder.getAbsolutePath() + "/" + newName; //$NON-NLS-1$
- if (srcFileOrFolder.isFile())
- {
- SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
- // if remote edit project doesn't exist, create it
- if (!mgr.doesRemoteEditProjectExist())
- mgr.getRemoteEditProject();
-
- StringBuffer path = new StringBuffer(mgr.getRemoteEditProjectLocation().makeAbsolute().toOSString());
- path = path.append("/" + srcFS.getSystemProfileName() + "/" + srcFS.getHostAliasName() + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- String absolutePath = srcFileOrFolder.getAbsolutePath();
-
-
- int colonIndex = absolutePath.indexOf(IPath.DEVICE_SEPARATOR);
-
- if (colonIndex != -1)
- {
- if (colonIndex == 0)
- {
- absolutePath = absolutePath.substring(1);
- }
- else if (colonIndex == (absolutePath.length() - 1))
- {
- absolutePath = absolutePath.substring(0, colonIndex);
- }
- else
- {
- absolutePath = absolutePath.substring(0, colonIndex) + absolutePath.substring(colonIndex + 1);
- }
- }
-
- path = path.append(absolutePath);
-
- String tempFile = path.toString();
-
- srcFS.download(srcFileOrFolder, tempFile, null);
- targetFS.upload(tempFile, newPath, null);
- }
- else
- {
-
- IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
- targetFS.createFolder(newTargetFolder);
- IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder, monitor);
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- IRemoteFile child = children[i];
- monitor.subTask("copying " + child.getName());
- doCopy(monitor, newTargetFolder, child, child.getName());
- monitor.worked(1);
- }
- }
- }
- }
-
- return ok;
- }
-
-
- /**
- * Required parent class abstract method.
- * Does not apply to us as we supply our own dialog for the copy-target
- */
- protected SystemSimpleContentElement getTreeModel()
- {
- return null;
- }
- /**
- * Required parent class abstract method.
- * Does not apply to us as we supply our own dialog for the copy-target
- */
- protected SystemSimpleContentElement getTreeInitialSelection()
- {
- return null;
- }
-
- /**
- * @see SystemBaseCopyAction#getOldObjects()
- * Returns an array of IRemoteFile objects
- */
- protected Object[] getOldObjects()
- {
- return getSelectedFiles();
- }
-
- /**
- * @see SystemBaseCopyAction#getOldNames()
- */
- protected String[] getOldNames()
- {
- IRemoteFile[] files = getSelectedFiles();
- String[] names = new String[files.length];
- for (int idx=0; idx<files.length; idx++)
- names[idx] = files[idx].getName();
- return names;
- }
-
-
- /**
- * Override of parent.
- * Return the dialog that will be used to prompt for the copy/move target location.
- */
- protected Dialog createDialog(Shell shell)
- {
- ++runCount;
- if (runCount > 1)
- reset();
- //return new SystemSimpleCopyDialog(parent, getPromptString(), mode, this, getTreeModel(), getTreeInitialSelection());
- String dlgTitle = (mode==MODE_COPY ? SystemResources.RESID_COPY_TITLE : SystemResources.RESID_MOVE_TITLE);
-
- firstSelection = getFirstSelectedFile();
- sourceConnection = firstSelection.getSystemConnection();
- SystemRemoteFolderDialog dlg = new SystemRemoteFolderDialog(shell, dlgTitle, sourceConnection);
- dlg.setNeedsProgressMonitor(true);
- dlg.setMessage(getPromptString());
- dlg.setShowPropertySheet(true, false);
- dlg.setDefaultSystemConnection(sourceConnection, true);
-
- //dlg.setSystemConnection(sourceConnection);
- if (mode==MODE_MOVE)
- dlg.setSelectionValidator(this);
- //RSEUIPlugin.logInfo("Calling getParentRemoteFile for '"+firstSelection.getAbsolutePath()+"'");
- firstSelectionParent = firstSelection.getParentRemoteFile();
- /*
- if (firstSelectionParent != null)
- RSEUIPlugin.logInfo("Result of getParentRemoteFile: '"+firstSelectionParent.getAbsolutePath()+"'");
- else
- RSEUIPlugin.logInfo("Result of getParentRemoteFile: null");
- */
- dlg.setPreSelection(firstSelectionParent);
-
- // our title now reflects multiple selection. If single change it.
- IStructuredSelection sel = getSelection();
- //System.out.println("size = "+sel.size());
- if (sel.size() == 1)
- {
- String singleTitle = null;
- if (mode == MODE_COPY)
- singleTitle = SystemResources.RESID_COPY_SINGLE_TITLE;
- else
- singleTitle = SystemResources.RESID_MOVE_SINGLE_TITLE;
- //System.out.println("..."+singleTitle);
- if (!singleTitle.startsWith("Missing")) // TODO: remove test after next mri rev
- dlg.setTitle(singleTitle);
- }
- return dlg;
- }
-
- /**
- * Override this method if you supply your own copy/move target dialog.
- * Return the user-selected target or null if cancelled
- */
- protected Object getTargetContainer(Dialog dlg)
- {
- SystemRemoteFolderDialog cpyDlg = (SystemRemoteFolderDialog)dlg;
- Object targetContainer = null;
- if (!cpyDlg.wasCancelled())
- {
- targetContainer = cpyDlg.getSelectedObject();
- if (targetContainer instanceof ISystemFilterReference)
- {
- ISubSystem targetSubSystem = ((ISystemFilterReference)targetContainer).getSubSystem();
- ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
- if (factory.supportsDropInFilters())
- {
- targetContainer = targetSubSystem.getTargetForFilter((ISystemFilterReference)targetContainer);
- }
- }
- }
- return targetContainer;
- }
-
- private void invalidateFilterReferences(IRemoteFile targetFolder)
- {
- String path = targetFolder.getAbsolutePath();
- IRemoteFileSubSystem fileSS = targetFolder.getParentRemoteFileSubSystem();
- ISystemFilterPoolReferenceManager mgr = fileSS.getSystemFilterPoolReferenceManager();
- ISystemFilterPool[] pools = mgr.getReferencedSystemFilterPools();
- for (int i = 0; i < pools.length; i++)
- {
- ISystemFilterPool pool = pools[i];
- ISystemFilter[] filters = pool.getSystemFilters();
- for (int f = 0; f < filters.length; f++)
- {
- String[] strs = filters[f].getFilterStrings();
- for (int s = 0; s < strs.length; s++)
- {
- String str = strs[s];
- int lastSep = str.lastIndexOf(fileSS.getSeparator());
- if (lastSep > 0)
- {
- str = str.substring(0, lastSep);
- }
- IRemoteFile par = null;
- try
- {
- par = fileSS.getRemoteFileObject(str);
- }
- catch (Exception e)
- {
- }
-
- str = par.getAbsolutePath();
-
- //if (StringCompare.compare(str, path, true))
- if (str.equals(path))
- {
- ISystemFilterReference ref = mgr.getSystemFilterReference(fileSS, filters[f]);
- ref.markStale(true);
- }
- }
- }
- }
- }
-
- /**
- * Called after all the copy/move operations end, be it successfully or not.
- * Your opportunity to display completion or do post-copy selections/refreshes
- */
- public void copyComplete()
- {
- if (copiedFiles.size() == 0)
- return;
-
- // refresh all instances of this parent, and all affected filters...
- ISubSystem fileSS = targetFolder.getParentRemoteFileSubSystem();
- Viewer originatingViewer = getViewer();
- if (originatingViewer != null)
- {
- if (!targetFolder.getAbsolutePath().equals(firstSelectionParent.getAbsolutePath()))
- {
- // we select the first instance of the target folder now so that the copied members will be selected in it
- // after it is refreshed via the remote_resource_created event.
- if (originatingViewer instanceof SystemView)
- {
- // boolean selectedOk = ((SystemView)originatingViewer).selectRemoteObjects(targetFolder.getAbsolutePath(), fileSS, null);
- //System.out.println(targetFolder.getAbsolutePath()+" selectedOK? " + selectedOk);
- //if (selectedOk)
- // return;
- }
- }
- }
-
-
- targetFolder.markStale(true);
-
- // invalidate filters
- invalidateFilterReferences(targetFolder);
-
-
- RSEUIPlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent(
- ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, copiedFiles, targetFolder.getAbsolutePath(), fileSS, null, originatingViewer);
-
- /* Old release 1.0 way...
- // did they copy to the same parent? Just refresh that parent, whatever it is...
- if (targetFolder.getAbsolutePath().equals(firstSelectionParent.getAbsolutePath()))
- {
- Viewer v = getViewer();
- if (v instanceof ISystemTree)
- {
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISystemTree tree = (ISystemTree)v;
- Object parent = tree.getSelectedParent();
- if (parent == null)
- return;
- if (parent instanceof IRemoteFile)
- // refresh parent in all views...
- sr.fireEvent(
- new org.eclipse.rse.model.SystemResourceChangeEvent(
- parent,ISystemResourceChangeEvent.EVENT_REFRESH_REMOTE, null)
- );
- else
- // refresh parent in all views...
- sr.fireEvent(
- new org.eclipse.rse.model.SystemResourceChangeEvent(
- parent,ISystemResourceChangeEvent.EVENT_REFRESH, null)
- );
- // select new files in this view only
- sr.fireEvent((ISystemResourceChangeListener)v,
- new org.eclipse.rse.model.SystemResourceChangeEvent(
- copiedFiles,ISystemResourceChangeEvent.EVENT_SELECT_REMOTE, targetFolder)
- );
- }
- }
- // they copied somewhere else... a little more work...
- else
- {
- // refresh target folder in all views, but only select new files in this view...
- org.eclipse.rse.model.SystemResourceChangeEvent event =
- new org.eclipse.rse.model.SystemResourceChangeEvent(
- targetFolder,ISystemResourceChangeEvent.EVENT_REFRESH_REMOTE, copiedFiles);
- event.setOriginatingViewer(getViewer());
- sr.fireEvent(event);
- }
- */
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-
- /**
- * Get the currently selected IRemoteFile objects
- */
- protected IRemoteFile[] getSelectedFiles()
- {
- if (files == null)
- {
- IStructuredSelection selection = getSelection();
- files = new IRemoteFile[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- {
- files[idx++] = (IRemoteFile)i.next();
- }
- }
- return files;
- }
- /**
- * Get the first selected file or folder
- */
- protected IRemoteFile getFirstSelectedFile()
- {
- if (files == null)
- getSelectedFiles();
- if (files.length > 0)
- return files[0];
- else
- return null;
- }
-
- /**
- * The user has selected a remote object. Return null if OK is to be enabled, or a SystemMessage
- * if it is not to be enabled. The message will be displayed on the message line.
- * <p>
- * This is overridden in SystemMoveRemoteFileAction
- */
- public SystemMessage isValid(IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects)
- {
- return null;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index a5383fd6c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCreateEditActions.java
+++ /dev/null
@@ -1,271 +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.files.ui.actions;
-
-import java.text.Collator;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-
-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.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemSeparatorAction;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-
-/**
- * Class for creating edit actions
- * @deprecated - use <code>SystemRemoteFileOpenWithMenu</code> now
- *
- */
-public class SystemCreateEditActions
-{
-
-
- protected IEditorRegistry registry;
-
- /*
- * Compares the labels from two IEditorDescriptor objects
- */
- private static final Comparator comparer = new Comparator() {
- private Collator collator = Collator.getInstance();
-
- public int compare(Object arg0, Object arg1) {
- String s1 = ((IEditorDescriptor)arg0).getLabel();
- String s2 = ((IEditorDescriptor)arg1).getLabel();
- return collator.compare(s1, s2);
- }
- };
-
- /**
- * Constructor for CreateEditActions
- */
- public SystemCreateEditActions() {
- super();
- registry = PlatformUI.getWorkbench().getEditorRegistry();
- }
-
- /**
- * Create edit actions
- */
- public void create(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
-
- if (selection.size() <= 0)
- return;
-
- // create basic open
- createForAnySelection(menu, selection, shell, menuGroup);
-
-
- // create open with->
- if (selection.size() == 1)
- {
- createForSingleSelection(menu, selection.getFirstElement(), shell, menuGroup);
- }
- else
- { // editing is only allowed when there is only one selection
- return;
- }
- }
-
- public void createForAnySelection(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- String label = SystemResources.ACTION_CASCADING_OPEN_LABEL;
- String tooltip = SystemResources.ACTION_CASCADING_OPEN_TOOLTIP;
- SystemEditFilesAction action = new SystemEditFilesAction(label, tooltip, shell);
-
- // add action
- menu.add(ISystemContextMenuConstants.GROUP_OPEN, action);
- }
-
-
- protected IEditorRegistry getEditorRegistry()
- {
- return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry();
- }
-
- protected IEditorDescriptor getDefaultTextEditor()
- {
- IEditorRegistry registry = getEditorRegistry();
- return registry.findEditor("org.eclipse.ui.DefaultTextEditor");
- }
- /**
- * Create actions when one file has been selected.
- */
- public void createForSingleSelection(SystemMenuManager menu, Object element, Shell shell, String menuGroup) {
- IRemoteFile remoteFile = null;
-
- if ((element == null) || !(element instanceof IRemoteFile)) {
- return;
- }
- else {
- remoteFile = (IRemoteFile)element;
- }
-
- IEditorDescriptor defaultEditor = getDefaultTextEditor();
-
- IEditorDescriptor preferredEditor = getPreferredEditor(remoteFile); // may be null
-
- Object[] editors = registry.getEditors(remoteFile.getName());
- Collections.sort(Arrays.asList(editors), comparer);
-
- boolean defaultFound = false;
-
- //Check that we don't add it twice. This is possible
- //if the same editor goes to two mappings.
- ArrayList alreadyMapped = new ArrayList();
-
- for (int i = 0; i < editors.length; i++) {
-
- IEditorDescriptor editor = (IEditorDescriptor) editors[i];
-
- if (!alreadyMapped.contains(editor)) {
-
- createEditAction(menu, shell, remoteFile, editor, preferredEditor);
-
- // remember if we find default text editor
- if (defaultEditor != null && editor.getId().equals(defaultEditor.getId())) {
- defaultFound = true;
- }
-
- alreadyMapped.add(editor);
- }
- }
-
- // only add a separator if there are associated editors
- if (editors.length > 0) {
- SystemSeparatorAction sep = new SystemSeparatorAction(shell);
- menu.add(ISystemContextMenuConstants.GROUP_OPENWITH, sep);
- }
-
- // add default text editor if it was not already associated
- if (!defaultFound && defaultEditor != null) {
- createEditAction(menu, shell, remoteFile, defaultEditor, preferredEditor);
- }
-
- // add system editor (should never be null)
- IEditorDescriptor descriptor = registry.findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
- createEditAction(menu, shell, remoteFile, descriptor, preferredEditor);
-
- /* DKM - 56067
- // add system in-place editor (can be null)
- descriptor = registry.findEditor(IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID);
-
- if (descriptor != null) {
- createEditAction(menu, shell, remoteFile, descriptor, preferredEditor);
- }
- */
-
- // TODO: default action
- // createDefaultEditAction(menu, file);
- }
-
- /**
- * Creates an edit action for a specific editor. If the editor is the preferred editor, then it is selected.
- * @param menu the menu manager.
- * @param shell the shell.
- * @param remoteFile the remote file.
- * @param descriptor the editor descriptor.
- * @param preferredEditor the descriptor of the preferred editor, or <code>null</code>.
- */
- private void createEditAction(SystemMenuManager menu, Shell shell, IRemoteFile remoteFile, IEditorDescriptor descriptor, final IEditorDescriptor preferredEditor) {
- String editorId = descriptor.getId();
-
- String label = descriptor.getLabel();
- ImageDescriptor image = getImageDescriptor(remoteFile, descriptor);
-
- // create action
- SystemEditFileAction action = new SystemEditFileAction(label, label, image, IAction.AS_RADIO_BUTTON, shell, editorId);
-
- // check if editor is the preferred editor
- boolean isPreferred = preferredEditor != null && editorId.equals(preferredEditor.getId());
-
- // mark action as checked or not
- action.setChecked(isPreferred);
-
- // add action
- menu.add(ISystemContextMenuConstants.GROUP_OPENWITH, action);
- }
-
-
- /**
- * Returns the preferred editor for the remote file. If the remote file has a cached local resource,
- * then returns the default editor associated with that resource, by calling <code>IDE.getDefaultEditor(IFile)</code>.
- * Otherwise, get the default editor associated with that remote file name from the editor registry.
- * @param remoteFile the remote file.
- * @return the preferred editor for the remote file, or <code>null</code> if none.
- */
- private IEditorDescriptor getPreferredEditor(IRemoteFile remoteFile) {
-
- IFile localFile = getLocalResource(remoteFile);
-
- if (localFile == null) {
- return registry.getDefaultEditor(remoteFile.getName());
- }
- else {
- return IDE.getDefaultEditor(localFile);
- }
- }
-
- /**
- * Get the local cache of the remote file, or <code>null</code> if none.
- * @param remoteFile the remote file.
- * @return the local cached resource, or <code>null</code> if none.
- */
- private IFile getLocalResource(IRemoteFile remoteFile)
- {
- return (IFile)UniversalFileTransferUtility.getTempFileFor(remoteFile);
- }
-
- /**
- * Returns the image descriptor for the given editor descriptor. If the editor descriptor is
- * <code>null</code>, returns the image descriptor for the remote file name.
- * @param remoteFile the remote file.
- */
- private ImageDescriptor getImageDescriptor(IRemoteFile remoteFile, IEditorDescriptor editorDesc) {
- ImageDescriptor imageDesc = null;
-
- if (editorDesc == null) {
- imageDesc = registry.getImageDescriptor(remoteFile.getName());
- }
- else {
- imageDesc = editorDesc.getImageDescriptor();
- }
-
- if (imageDesc == null) {
-
- if (editorDesc.getId().equals(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID))
- imageDesc = registry.getSystemExternalEditorImageDescriptor(remoteFile.getName());
- }
-
- return imageDesc;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index cd963746b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDoubleClickEditAction.java
+++ /dev/null
@@ -1,97 +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.files.ui.actions;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-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;
-
-
-public class SystemDoubleClickEditAction extends SystemBaseAction
-{
-
-
-
- private Object element;
-
- /**
- * Constructor for SystemDoubleClickEditAction
- */
- public SystemDoubleClickEditAction(Object element)
- {
- super(null, null);
- this.element = element;
- }
-
- protected IEditorRegistry getEditorRegistry()
- {
- return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry();
- }
-
- protected IEditorDescriptor getDefaultTextEditor()
- {
- IEditorRegistry registry = getEditorRegistry();
- return registry.findEditor("org.eclipse.ui.DefaultTextEditor");
- }
- /**
- * @see SystemBaseAction#run()
- */
- public void run()
- {
-
- IRemoteFile remoteFile = null;
-
- if ((element == null) || !(element instanceof IRemoteFile))
- return;
- else
- remoteFile = (IRemoteFile) element;
-
- /* DKM - use Eclipse default, instead
- // open LPEX editor on double click if remote file is a text file
- if (remoteFile.isText()) {
- IEditorRegistry registry = WorkbenchPlugin.getDefault().getEditorRegistry();
- IEditorDescriptor descriptor = registry.findEditor(ISystemTextEditorConstants.SYSTEM_TEXT_EDITOR_ID);
- String id = descriptor.getId();
- SystemEditFileAction editAction = new SystemEditFileAction(null, null, null, null, id);
- editAction.setSelection(new StructuredSelection(element));
- editAction.run();
- }
- else { // open the system editor on double click if remote file is a text file
- SystemEditFilePlatformAction platformEditAction = new SystemEditFilePlatformAction(null, null, null, null);
- platformEditAction.setSelection(new StructuredSelection(element));
- platformEditAction.run();
- }
- */
-
- // DKM, use Eclipse default
- String fileName = remoteFile.getName();
- IEditorRegistry registry = getEditorRegistry();
- IEditorDescriptor descriptor = registry.getDefaultEditor(fileName);
- if (descriptor == null)
- {
- descriptor = registry.findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
-
- }
- String id = descriptor.getId();
- SystemEditFileAction editAction = new SystemEditFileAction(null, null, null, null, id);
- editAction.setSelection(new StructuredSelection(element));
- editAction.run();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 03a1773fb..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java
+++ /dev/null
@@ -1,292 +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.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.files.ui.FileResources;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-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;
-import org.eclipse.swt.graphics.Image;
-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;
-
-
-/**
- * This is the default action used to handle download conflicts
- */
-public class SystemDownloadConflictAction extends SystemBaseAction implements Runnable
-{
-
- /**
- * This is the default dialog used to handle download conflicts
- */
- protected class DownloadConflictDialog extends SystemPromptDialog
- {
- private Button _keepLocalButton;
- private Button _replaceLocalButton;
-
- private boolean _keepLocal;
- private String _openLocalText;
- private String _replaceText;
- private String _dialogText;
- private String _helpId;
-
- /**
- * Constructor.
- * @param shell the parent shell of the dialog
- * @param remoteNewer indicates whether the remote file has changed since it was last downloaded
- */
- public DownloadConflictDialog(Shell shell, boolean remoteNewer)
- {
- super(shell, FileResources.RESID_CONFLICT_DOWNLOAD_TITLE);
- }
-
- /**
- * Return whether the user decided to keep the local cached file
- * @return the whether the user decided to keep the local cached file
- */
- public boolean keepLocal()
- {
- return _keepLocal;
- }
-
- /**
- * Called when a button is pressed in the dialog
- */
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
- _keepLocal = _keepLocalButton.getSelection();
- close();
- }
-
- /**
- * Creates the dialog content
- */
- public Control createInner(Composite parent)
- {
- Image image = getShell().getDisplay().getSystemImage(SWT.ICON_QUESTION);
-
- Composite c = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- c.setLayout(layout);
- c.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Composite m = new Composite(c, SWT.NONE);
-
- GridLayout mlayout = new GridLayout();
- mlayout.numColumns = 2;
- m.setLayout(mlayout);
- m.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label = new Label(m, 0);
- image.setBackground(label.getBackground());
- label.setImage(image);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING));
-
- Text text = new Text(m, SWT.WRAP | SWT.MULTI);
- text.setEditable(false);
- text.setText(_dialogText);
-
- Composite options = new Composite(c, SWT.NONE);
- GridLayout olayout = new GridLayout();
- olayout.numColumns = 1;
- options.setLayout(olayout);
- options.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- _replaceLocalButton = new Button(options, SWT.RADIO);
- _replaceLocalButton.setText(_replaceText);
- _replaceLocalButton.setSelection(true);
-
- _keepLocalButton = new Button(options, SWT.RADIO);
- _keepLocalButton.setText(_openLocalText);
-
- setHelp();
- return c;
- }
-
- /**
- * Returns the initial focus control
- * @return the initial focus control
- */
- protected Control getInitialFocusControl()
- {
- enableOkButton(true);
- return _replaceLocalButton;
- }
-
- private void setHelp()
- {
- setHelp(_helpId);
- }
-
- /**
- * Sets the help id for this dialog
- * @param id the help id
- */
- public void setHelpId(String id)
- {
- _helpId= id;
- }
-
- /**
- * Sets the dialog message
- * @param dialogText the dialog message
- */
- public void setDialogText(String dialogText)
- {
- _dialogText = dialogText;
- }
-
- /**
- * Sets the dialog action message for replacing the local file with the remote file
- * @param replaceText the dialog action message for replacing the local file
- */
- public void setReplaceText(String replaceText)
- {
- _replaceText = replaceText;
- }
-
- /**
- * Sets the dialog action message for keeping the local file
- * @param openLocalText the dialog action message for keeping the local file
- */
- public void setOpenLocalText(String openLocalText)
- {
- _openLocalText = openLocalText;
- }
-
- }
-
- protected IFile _tempFile;
- protected boolean _remoteNewer;
- protected int _state;
-
- public static final int REPLACE_WITH_REMOTE = 0;
- public static final int OPEN_WITH_LOCAL = 1;
- public static final int CANCELLED = 2;
-
- /**
- * Constructor.
- * @param tempFile the cached local file that is in conflict with the remote file
- * @param remoteNewer indicates whether the remote file has changed since it was last downloaded
- */
- public SystemDownloadConflictAction(IFile tempFile, boolean remoteNewer)
- {
- super(FileResources.RESID_CONFLICT_DOWNLOAD_TITLE, null);
- _tempFile = tempFile;
- _remoteNewer = remoteNewer;
- }
-
- /**
- * Constructor.
- * @param title the title for the action
- * @param tempFile the cached local file that is in conflict with the remote file
- * @param remoteNewer indicates whether the remote file has changed since it was last downloaded
- */
- public SystemDownloadConflictAction(String title, IFile tempFile, boolean remoteNewer)
- {
- super(title, null);
- _tempFile = tempFile;
- _remoteNewer = remoteNewer;
- }
-
- /**
- * Returns the action taken in response to the conflict. The state may be one of the following:
- * <ul>
- * <li> REPLACE_WITH_REMOTE
- * <li> OPEN_WITH_LOCAL
- * <li> CANCELLED
- * </ul>
- * @return the response to the conflict
- */
- public int getState()
- {
- return _state;
- }
-
- /**
- * Returns the dialog used to prompt a user on how to resolve a conflict.
- * @return the dialog
- */
- protected DownloadConflictDialog getConflictDialog()
- {
- DownloadConflictDialog dlg = new DownloadConflictDialog(SystemBasePlugin.getActiveWorkbenchShell(), _remoteNewer);
-
- if (_remoteNewer)
- {
- dlg.setDialogText(FileResources.RESID_CONFLICT_DOWNLOAD_MESSAGE_REMOTECHANGED);
- }
- else
- {
- dlg.setDialogText(FileResources.RESID_CONFLICT_DOWNLOAD_MESSAGE_LOCALCHANGED);
- }
-
- dlg.setReplaceText(FileResources.RESID_CONFLICT_DOWNLOAD_REPLACELOCAL);
- dlg.setOpenLocalText(FileResources.RESID_CONFLICT_DOWNLOAD_OPENWITHLOCAL);
- dlg.setHelpId(RSEUIPlugin.HELPPREFIX + "lcdl0000");
- return dlg;
- }
-
- /**
- * Called when this action is invoked
- */
- public void run()
- {
- setShell(RSEUIPlugin.getTheSystemRegistry().getShell());
- SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
-
- DownloadConflictDialog cnfDialog = getConflictDialog();
- if (cnfDialog.open() == Window.OK)
- {
- // does user want to open local or replace local with remote?
- if (cnfDialog.keepLocal())
- {
- // user wants to keep the local version
- // don't synchronize with server, save that for the save operation
- _state = OPEN_WITH_LOCAL;
- }
- else
- {
- // user wants to replace local copy with the remote version
- _state = REPLACE_WITH_REMOTE;
- }
-
- }
- else
- {
- _state = CANCELLED;
-
- // cancelled dialog, so no remote synchronization
- // set dirty flag!
- properties.setDirty(true);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileAction.java
deleted file mode 100644
index 304d27c74..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileAction.java
+++ /dev/null
@@ -1,164 +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.files.ui.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteEditConstants;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.files.ui.view.DownloadJob;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class SystemEditFileAction extends SystemBaseAction implements ISystemRemoteEditConstants {
-
-
- protected String _editorId;
-
- /**
- * Constructor for SystemEditFileAction
- */
- public SystemEditFileAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId) {
- super(text, tooltip, null, image, parent);
- init();
- _editorId = editorId;
- }
-
- /**
- * Constructor for SystemEditFileAction
- */
- public SystemEditFileAction(String text, String tooltip, ImageDescriptor image, int style, Shell parent, String editorId) {
- super(text, tooltip, null, image, style, parent);
- init();
- _editorId = editorId;
- }
-
- /**
- * Initialize the action
- */
- private void init() {
- allowOnMultipleSelection(false);
- }
-
-
- /**
- * @see SystemBaseAction#run
- */
- public void run() {
- IStructuredSelection selection = getSelection();
-
- if (selection.size() != 1)
- return;
-
- Object element = getFirstSelection();
-
- if (element == null)
- return;
- else if (!(element instanceof IRemoteFile))
- return;
-
- process((IRemoteFile)element);
- }
-
- private boolean isFileCached(ISystemEditableRemoteObject editable, IRemoteFile remoteFile)
- {
- // DY: check if the file exists and is read-only (because it was previously opened
- // in the system editor)
- IFile file = editable.getLocalResource();
- SystemIFileProperties properties = new SystemIFileProperties(file);
- boolean newFile = !file.exists();
-
- // detect whether there exists a temp copy already
- if (!newFile && file.exists())
- {
- // we have a local copy of this file, so we need to compare timestamps
-
- // get stored modification stamp
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // get updated remoteFile so we get the current remote timestamp
- //remoteFile.markStale(true);
- IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
- try
- {
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
- }
- catch (Exception e)
- {
-
- }
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (storedModifiedStamp != remoteModifiedStamp);
- return (!dirty && !remoteNewer);
- }
- return false;
- }
-
- /**
- * Process the object: download file, open in editor, etc.
- */
- protected void process(IRemoteFile remoteFile) {
-
- /*
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorId);
- editableFile.open(SystemBasePlugin.getActiveWorkbenchShell());
- */
- SystemEditableRemoteFile editable = new SystemEditableRemoteFile(remoteFile, _editorId);
- if (editable != null)
- {
- try
- {
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.OPEN_IN_SAME_PERSPECTIVE)
- {
- if (isFileCached(editable, remoteFile))
- {
- editable.openEditor();
- }
- else
- {
- DownloadJob oJob = new DownloadJob(editable, false);
- oJob.schedule();
- }
- }
- else
- {
- editable.setLocalResourceProperties();
- editable.openEditor();
- }
- }
- catch (Exception e)
- {
- }
-
-
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ad0ed0656..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileInPlaceAction.java
+++ /dev/null
@@ -1,84 +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.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.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemEditFileInPlaceAction extends SystemBaseAction
-{
- //private RSEUIPlugin plugin;
-
- /**
- * Constructor for SystemEditFileAction
- */
- public SystemEditFileInPlaceAction(String text, String tooltip, ImageDescriptor image, Shell parent) {
- super(text, tooltip, image, parent);
- init();
- }
-
-
- /**
- * Initialize the action
- */
- private void init() {
- allowOnMultipleSelection(false);
-
- // set the context menu group here seems to have no affect
- // had to add it in the group in the adapter
- // setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPENWITH);
-
- //plugin = RSEUIPlugin.getDefault();
- }
-
-
- /**
- * @see SystemBaseAction#run
- */
- public void run() {
-
- IStructuredSelection selection = getSelection();
-
- if (selection.size() != 1)
- return;
-
- Object element = getFirstSelection();
-
- if (element == null)
- return;
- else if (!(element instanceof IRemoteFile))
- return;
-
- process((IRemoteFile)element);
- }
-
-
- /**
- * Process the object: download file, open in editor, etc.
- */
- private void process(IRemoteFile remoteFile) {
-
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile);
- editableFile.openInSystemEditor(SystemBasePlugin.getActiveWorkbenchShell());
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileLineAction.java
deleted file mode 100644
index b417cc51d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileLineAction.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-
-
-
-public class SystemEditFileLineAction extends SystemEditFileAction {
-
-
- protected IRemoteFile _remoteFile;
- protected int _line, _charStart, _charEnd;
-
- /**
- * Constructor for SystemEditFileAction.
- */
- public SystemEditFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId, IRemoteFile remoteFile, int line, int charStart, int charEnd) {
- super(text, tooltip, image, parent, editorId);
- _line = line;
- _remoteFile = remoteFile;
- _charStart = charStart;
- _charEnd = charEnd;
- }
-
- public void run() {
- process(_remoteFile);
- }
-
- /**
- * Process the object: download file, open in editor, etc.
- */
- protected void process(IRemoteFile remoteFile) {
- super.process(remoteFile);
- handleGotoLine();
- }
-
- protected void handleGotoLine() {
- handleGotoLine(_remoteFile, _line, _charStart, _charEnd);
- }
-
- public static void handleGotoLine(IRemoteFile remoteFile, int line, int charStart, int charEnd) {
-
- if (line > 0) {
-
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchPage persp = desktop.getActiveWorkbenchWindow().getActivePage();
- IEditorPart editor = null;
- String fileName = remoteFile.getAbsolutePath();
- IEditorReference[] editors = persp.getEditorReferences();
-
- for (int i = 0; i < editors.length; i++) {
-
- IEditorReference ref = editors[i];
- IEditorPart editorp = ref.getEditor(false);
-
- if (editorp != null) {
-
- IEditorInput einput = editorp.getEditorInput();
-
- if (einput instanceof IFileEditorInput) {
-
- IFileEditorInput input = (IFileEditorInput) einput;
- IFile efile = input.getFile();
-
- SystemIFileProperties properties = new SystemIFileProperties(efile);
- String comparePath = properties.getRemoteFilePath();
-
- if (comparePath != null && (comparePath.replace('\\','/').equals(fileName.replace('\\','/')))) {
-
- editor = editorp;
- persp.bringToTop(editor);
-
- try {
- IMarker marker = createMarker(efile, line, charStart, charEnd);
- IDE.gotoMarker(editor, marker);
- }
- catch (CoreException e) {
- SystemBasePlugin.logError("Error occured in handleGotoLine", e);
- }
- }
- }
- }
- }
- }
- }
-
- protected static IMarker createMarker(IFile file, int line, int charStart, int charEnd) throws CoreException {
- IMarker marker = file.createMarker(IMarker.TEXT);
- marker.setAttribute(IMarker.LINE_NUMBER, line);
- marker.setAttribute(IMarker.CHAR_START, charStart);
- marker.setAttribute(IMarker.CHAR_END, charEnd);
-
- return marker;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 9dba3525d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilePlatformAction.java
+++ /dev/null
@@ -1,84 +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.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.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemEditFilePlatformAction extends SystemBaseAction
-{
- //private RSEUIPlugin plugin;
-
- /**
- * Constructor for SystemEditFileAction
- */
- public SystemEditFilePlatformAction(String text, String tooltip, ImageDescriptor image, Shell parent) {
- super(text, tooltip, image, parent);
- init();
- }
-
-
- /**
- * Initialize the action
- */
- private void init() {
- allowOnMultipleSelection(false);
-
- // set the context menu group here seems to have no affect
- // had to add it in the group in the adapter
- // setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPENWITH);
-
- //plugin = RSEUIPlugin.getDefault();
- }
-
-
- /**
- * @see SystemBaseAction#run
- */
- public void run() {
-
- IStructuredSelection selection = getSelection();
-
- if (selection.size() != 1)
- return;
-
- Object element = getFirstSelection();
-
- if (element == null)
- return;
- else if (!(element instanceof IRemoteFile))
- return;
-
- process((IRemoteFile)element);
- }
-
-
- /**
- * Process the object: download file, open in editor, etc.
- */
- private void process(IRemoteFile remoteFile) {
-
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile);
- editableFile.openInSystemEditor(SystemBasePlugin.getActiveWorkbenchShell());
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilesAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilesAction.java
deleted file mode 100644
index 4d82885c4..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilesAction.java
+++ /dev/null
@@ -1,189 +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.files.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteEditConstants;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.files.ui.view.DownloadJob;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-
-
-public class SystemEditFilesAction extends SystemBaseAction implements ISystemRemoteEditConstants {
-
-
- private IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
-
- /**
- * Constructor for SystemEditFilesAction
- */
- public SystemEditFilesAction(String text, String tooltip, Shell parent)
- {
- super(text, tooltip, parent);
- init();
- }
-
-
-
- /**
- * Initialize the action
- */
- private void init()
- {
- allowOnMultipleSelection(true);
- }
-
- /**
- * Get the local cache of the remote file, or <code>null</code> if none.
- * @param remoteFile the remote file.
- * @return the local cached resource, or <code>null</code> if none.
- */
- private IFile getLocalResource(IRemoteFile remoteFile)
- {
- return (IFile)UniversalFileTransferUtility.getTempFileFor(remoteFile);
- }
-
- protected IEditorDescriptor getDefaultEditor(IRemoteFile remoteFile)
- {
- IFile localFile = getLocalResource(remoteFile);
-
- if (localFile == null) {
- return registry.getDefaultEditor(remoteFile.getName());
- }
- else {
- return IDE.getDefaultEditor(localFile);
- }
- }
-
- /**
- * @see SystemBaseAction#run
- */
- public void run() {
-
- IStructuredSelection selection = getSelection();
-
- Iterator iterator = selection.iterator();
- while (iterator.hasNext())
- {
- Object obj = iterator.next();
- if (obj instanceof IRemoteFile)
- {
- process((IRemoteFile)obj);
- }
- }
- }
-
- private boolean isFileCached(ISystemEditableRemoteObject editable, IRemoteFile remoteFile)
- {
- // DY: check if the file exists and is read-only (because it was previously opened
- // in the system editor)
- IFile file = editable.getLocalResource();
- SystemIFileProperties properties = new SystemIFileProperties(file);
- boolean newFile = !file.exists();
-
- // detect whether there exists a temp copy already
- if (!newFile && file.exists())
- {
- // we have a local copy of this file, so we need to compare timestamps
-
- // get stored modification stamp
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // get updated remoteFile so we get the current remote timestamp
- //remoteFile.markStale(true);
- IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
- try
- {
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
- }
- catch (Exception e)
- {
-
- }
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (storedModifiedStamp != remoteModifiedStamp);
- return (!dirty && !remoteNewer);
- }
- return false;
- }
-
- /**
- * Process the object: download file, open in editor, etc.
- */
- protected void process(IRemoteFile remoteFile) {
-
- String editorId = null;
- IEditorDescriptor des = getDefaultEditor(remoteFile);
- if (des != null)
- {
- editorId = des.getId();
- }
- else
- {
- editorId = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
- }
-
- SystemEditableRemoteFile editable = new SystemEditableRemoteFile(remoteFile, editorId);
- {
- try
- {
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.OPEN_IN_SAME_PERSPECTIVE)
- {
- if (isFileCached(editable, remoteFile))
- {
- editable.openEditor();
- }
- else
- {
- DownloadJob oJob = new DownloadJob(editable, false);
- oJob.schedule();
- }
- }
- else
- {
- editable.setLocalResourceProperties();
- editable.openEditor();
- }
- }
- catch (Exception e)
- {
- }
-
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditionAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditionAction.java
deleted file mode 100644
index 9bc90612e..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditionAction.java
+++ /dev/null
@@ -1,384 +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.files.ui.actions;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import org.eclipse.compare.EditionSelectionDialog;
-import org.eclipse.compare.HistoryItem;
-import org.eclipse.compare.IStreamContentAccessor;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.ResourceNode;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-
-public class SystemEditionAction extends SystemBaseAction
-{
-
- /**
- * Implements the IStreamContentAccessor and ITypedElement protocols
- * for a Document.
- */
- class DocumentBufferNode implements ITypedElement, IStreamContentAccessor
- {
-
- private IDocument fDocument;
- private IFile fFile;
-
- DocumentBufferNode(IDocument document, IFile file)
- {
- fDocument = document;
- fFile = file;
- }
-
- public String getName()
- {
- return fFile.getName();
- }
-
- public String getType()
- {
- return fFile.getFileExtension();
- }
-
- public Image getImage()
- {
- return null;
- }
-
- public InputStream getContents()
- {
- return new ByteArrayInputStream(fDocument.get().getBytes());
- }
- }
-
- private List _selected;
- private boolean fReplaceMode;
- private String fBundleName;
- protected boolean fPrevious = false;
- protected String fHelpContextId;
-
- SystemEditionAction(Shell parent, String title, String tooltip, String bundleName, boolean replaceMode)
- {
- super(title, parent);
- setToolTipText(tooltip);
-
- fReplaceMode = replaceMode;
- fBundleName = bundleName;
- _selected = new ArrayList();
- }
-
-
- /**
- * Called when the selection changes in the systems view. This determines
- * the input object for the command and whether to enable or disable
- * the action.
- *
- * @param selection the current seleciton
- * @return whether to enable or disable the action
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = false;
- _selected.clear();
- Iterator e = selection.iterator();
- if (e.hasNext())
- {
- Object selected = e.next();
-
- if (selected != null && selected instanceof IRemoteFile)
- {
- RemoteFile file = (RemoteFile) selected;
- if (file.isFile())
- {
- ISystemRemoteElementAdapter adapter = (ISystemRemoteElementAdapter)file.getAdapter(ISystemRemoteElementAdapter.class);
- if (adapter != null)
- {
- ISystemEditableRemoteObject editable = adapter.getEditableRemoteObject(file);
- if (editable != null)
- {
- if (editable.getLocalResource().exists())
- {
- _selected.add(file);
- enable = true;
- }
- }
- }
-
-
- /** FIXME - no longer have a getCachedCopy() method
- try
- {
- if (file.getCachedCopy() != null)
- {
- _selected.add(file);
- enable = true;
- }
- }
- catch (SystemMessageException ex)
- {
- }
- */
- }
- }
- }
-
- return enable;
- }
-
- public void run()
- {
- // get cached file
- IFile[] files = getFiles(_selected, fReplaceMode);
- for (int i = 0; i < files.length; i++)
- doFromHistory(files[i]);
- }
-
- private void doFromHistory(final IFile file)
- {
- //DKM - hack - needed to use compare class loader to load bundle for current locale
- ResourceBundle bundle = ResourceBundle.getBundle(fBundleName, Locale.getDefault(), CompareUIPlugin.class.getClassLoader());
-
- String title = Utilities.getString(bundle, "title"); //$NON-NLS-1$
-
- Shell parentShell = CompareUIPlugin.getShell();
-
- IFileState states[] = null;
- try
- {
- states = file.getHistory(null);
- }
- catch (CoreException ex)
- {
- MessageDialog.openError(parentShell, title, ex.getMessage());
- return;
- }
-
- if (states == null || states.length <= 0)
- {
- String msg = Utilities.getString(bundle, "noLocalHistoryError"); //$NON-NLS-1$
- MessageDialog.openInformation(parentShell, title, msg);
- return;
- }
-
- ITypedElement base = new ResourceNode(file);
-
- IDocument document = getDocument(file);
- ITypedElement target = base;
- if (document != null)
- target = new DocumentBufferNode(document, file);
-
- ITypedElement[] editions = new ITypedElement[states.length + 1];
- editions[0] = base;
- for (int i = 0; i < states.length; i++)
- editions[i + 1] = new HistoryItem(base, states[i]);
-
- EditionSelectionDialog d = new EditionSelectionDialog(parentShell, bundle);
- d.setEditionTitleArgument(file.getName());
- d.setEditionTitleImage(CompareUIPlugin.getImage(file));
- //d.setHideIdenticalEntries(false);
- if (fHelpContextId != null)
- d.setHelpContextId(fHelpContextId);
-
- if (fReplaceMode)
- {
-
- ITypedElement ti = null;
- if (fPrevious)
- ti = d.selectPreviousEdition(target, editions, null);
- else
- ti = d.selectEdition(target, editions, null);
-
- if (ti instanceof IStreamContentAccessor)
- {
- IStreamContentAccessor sa = (IStreamContentAccessor) ti;
- try
- {
-
- if (document != null)
- updateDocument(document, sa);
- else
- updateWorkspace(bundle, parentShell, sa, file);
-
- }
- catch (InterruptedException x)
- {
- // Do nothing. Operation has been canceled by user.
-
- }
- catch (InvocationTargetException x)
- {
- String reason = x.getTargetException().getMessage();
- MessageDialog.openError(parentShell, title, Utilities.getFormattedString(bundle, "replaceError", reason)); //$NON-NLS-1$
- }
- }
- }
- else
- {
- d.setCompareMode(true);
-
- d.selectEdition(target, editions, null);
- }
- }
-
- private void updateWorkspace(final ResourceBundle bundle, Shell shell, final IStreamContentAccessor sa, final IFile file) throws InvocationTargetException, InterruptedException
- {
-
- WorkspaceModifyOperation operation = new WorkspaceModifyOperation()
- {
- public void execute(IProgressMonitor pm) throws InvocationTargetException
- {
- try
- {
- String taskName = Utilities.getString(bundle, "taskName"); //$NON-NLS-1$
- pm.beginTask(taskName, IProgressMonitor.UNKNOWN);
- file.setContents(sa.getContents(), false, true, pm);
- }
- catch (CoreException e)
- {
- throw new InvocationTargetException(e);
- }
- finally
- {
- pm.done();
- }
- }
- };
-
- ProgressMonitorDialog pmdialog = new ProgressMonitorDialog(shell);
- pmdialog.run(false, true, operation);
- }
-
- private void updateDocument(IDocument document, IStreamContentAccessor sa) throws InvocationTargetException
- {
- try
- {
- InputStream is = sa.getContents();
- String text = Utilities.readString(is, SystemEncodingUtil.ENCODING_UTF_8);
- document.replace(0, document.getLength(), text);
- }
- catch (CoreException e)
- {
- throw new InvocationTargetException(e);
- }
- catch (BadLocationException e)
- {
- throw new InvocationTargetException(e);
- }
- catch (Exception e) // TODO in Eclipse 3.3 this should be changed to IOException
- {
- throw new InvocationTargetException(e);
- }
- }
-
- private IDocument getDocument(IFile file)
- {
- IWorkbench wb = PlatformUI.getWorkbench();
- if (wb == null)
- return null;
- IWorkbenchWindow[] ws = wb.getWorkbenchWindows();
- if (ws == null)
- return null;
-
- FileEditorInput test = new FileEditorInput(file);
-
- for (int i = 0; i < ws.length; i++)
- {
- IWorkbenchWindow w = ws[i];
- IWorkbenchPage[] wps = w.getPages();
- if (wps != null)
- {
- for (int j = 0; j < wps.length; j++)
- {
- IWorkbenchPage wp = wps[j];
- IEditorPart ep = wp.findEditor(test);
- if (ep instanceof ITextEditor)
- {
- ITextEditor te = (ITextEditor) ep;
- IDocumentProvider dp = te.getDocumentProvider();
- if (dp != null)
- {
- IDocument doc = dp.getDocument(ep);
- if (doc != null)
- return doc;
- }
- }
- }
- }
- }
- return null;
- }
-
- private IFile[] getFiles(List remoteFiles, boolean modifiable)
- {
- IFile[] result = new IFile[remoteFiles.size()];
- for (int i = 0; i < remoteFiles.size(); i++)
- {
- IRemoteFile remotefile = (IRemoteFile)remoteFiles.get(i);
- SystemEditableRemoteFile eFile = new SystemEditableRemoteFile(remotefile);
- try
- {
- eFile.download(getShell());
- eFile.addAsListener();
- eFile.setLocalResourceProperties();
- IFile localFile = eFile.getLocalResource();
- result[i] = localFile;
- }
- catch (Exception e)
- {
- }
- }
-
- return result;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 4c1c901d2..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractAction.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-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.files.ui.FileResources;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-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;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class SystemExtractAction extends SystemBaseAction
-{
- protected List _selected;
- protected Shell _parent;
- protected String _label;
-
- public SystemExtractAction(Shell parent)
- {
- super(FileResources.ACTION_EXTRACT_LABEL, parent);
- _label = FileResources.ACTION_EXTRACT_LABEL;
- setToolTipText(FileResources.ACTION_EXTRACT_TOOLTIP);
- _selected = new ArrayList();
- _parent = parent;
- allowOnMultipleSelection(true);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0118");
- setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACT_ID));
- }
-
- public SystemExtractAction(Shell parent, String label, String tooltip)
- {
- super(label, tooltip, parent);
- _label = label;
- setToolTipText(tooltip);
- _selected = new ArrayList();
- _parent = parent;
- allowOnMultipleSelection(true);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0118");
- setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACT_ID));
-
- }
-
- public void run()
- {
- for (int i = 0; i < _selected.size(); i++)
- {
- IRemoteFile selection = (IRemoteFile) _selected.get(i);
- IRemoteFile destinationParent = selection.getParentRemoteFile();
- IRemoteFileSubSystem ss = selection.getParentRemoteFileSubSystem();
- String newName = getExtractedName(selection);
- IRemoteFile destination = null;
- try
- {
- destination = ss.getRemoteFileObject(destinationParent.getAbsolutePath() + destinationParent.getSeparator() + newName);
- ss.createFolder(destination);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- continue;
- }
- IRunnableContext runnableContext = getRunnableContext(_parent);
-
- ExtractRunnable runnable = new ExtractRunnable(selection, destination);
- try
- {
- // currently we don't run this in a thread because
- // in some cases dialogs are launched in the operation
- // (widgets can only be legally used on the main thread)
- runnableContext.run(false, true, runnable); // inthread, cancellable, IRunnableWithProgress
- }
- catch (java.lang.reflect.InvocationTargetException exc)
- {
- }
- catch (java.lang.InterruptedException e)
- {
- }
- // always refresh
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destination, destinationParent, ss, null, null);
- registry.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH, destinationParent));
- }
- }
-
- protected class ExtractRunnable implements IRunnableWithProgress
- {
- private IRemoteFileSubSystem destSS;
- private IRemoteFileSubSystem sourceSS;
- private IRemoteFile selection;
- private IRemoteFile destination;
-
- public ExtractRunnable(IRemoteFile source, IRemoteFile dest)
- {
- destSS = dest.getParentRemoteFileSubSystem();
- sourceSS = source.getParentRemoteFileSubSystem();
- selection = source;
- destination = dest;
- }
-
- public void run(IProgressMonitor monitor)
- {
- try
- {
- IRemoteFile[] sources = sourceSS.listFoldersAndFiles(selection, monitor);
- for (int j = 0; j < sources.length && !monitor.isCanceled(); j++)
- {
- try
- {
- ISystemDragDropAdapter srcAdapter = (ISystemDragDropAdapter) ((IAdaptable) selection).getAdapter(ISystemDragDropAdapter.class);
- boolean sameSysType = sourceSS.getClass().equals(destSS.getClass());
- boolean sameSys = (sourceSS == destSS);
- if (!sameSys)
- {
- Object source = srcAdapter.doDrag(sources[j], sameSysType, monitor);
- srcAdapter.doDrop(source, destination, sameSysType, sameSys, 0, monitor);
- }
- else
- {
- srcAdapter.doDrop(sources[j], destination, sameSysType, sameSys, 0, monitor);
- }
- }
- catch (Exception e)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- System.out.println(e.getMessage());
- System.out.println("Could not extract " + sources[j].getAbsolutePath());
- }
- }
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- }
- }
-
- }
-
- /**
- * Called when the selection changes in the systems view. This determines
- * the input object for the command and whether to enable or disable
- * the action.
- *
- * @param selection the current seleciton
- * @return whether to enable or disable the action
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- _selected.clear();
- boolean enable = false;
-
- Iterator e = selection.iterator();
- while (e.hasNext())
- {
- Object selected = e.next();
-
- if (selected != null && selected instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) selected;
- if (file.isArchive() && file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement())
- {
- _selected.add(file);
- enable = true;
- }
- }
- else
- {
- return false;
- }
- }
- if (_selected.size() == 1)
- {
- this.setText(getActionLabelForSingleSelection());
- }
- else
- {
- this.setText(_label);
- }
- return enable;
- }
-
- /**
- * Extending classes must override this method, otherwise
- * when there is one selection, the action label will be
- * "Extract to xxxx", where xxxx is a dynamically created directory
- * name. Note: you can also eliminate this behaviour by overriding
- * the updateSelection method.
- * @return Set this to return the normal action label if you don't want
- * the name dynamically created.
- */
- protected String getActionLabelForSingleSelection()
- {
- String msg = FileResources.ACTION_EXTRACT_SUB_LABEL;
- return SystemMessage.sub(msg, "%1", getExtractedName((IRemoteFile)_selected.get(0)));
- }
-
- protected String getExtractedName(IRemoteFile selection)
- {
- String newName = selection.getName();
- int k = newName.lastIndexOf(".");
- if (k == -1)
- {
- newName = newName + "_contents";
- }
- else
- {
- newName = newName.substring(0, k);
- }
- return newName;
- }
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
-
- return new ProgressMonitorDialog(shell);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 4c5eefd05..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractToAction.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.actions;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.resources.ExtractToDialog;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-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;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class SystemExtractToAction extends SystemExtractAction implements IValidatorRemoteSelection
-{
- 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;
-
- public SystemExtractToAction(Shell parent)
- {
- super(parent,FileResources.ACTION_EXTRACT_TO_LABEL, FileResources.ACTION_EXTRACT_TO_TOOLTIP);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0119"); //$NON-NLS-1$
- setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACTTO_ID));
-
- }
-
- public SystemExtractToAction(Shell parent, String label, String tooltip)
- {
- super(parent, label, tooltip);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0119"); //$NON-NLS-1$
- setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACTTO_ID));
- }
-
- public void run()
- {
- for (int i = 0; i < _selected.size(); i++)
- {
- currentlyProcessingSelection = i;
- IRemoteFile selection = (IRemoteFile) _selected.get(i);
- //IRemoteFileSubSystem sourceSS = selection.getParentRemoteFileSubSystem();
- String title = FileResources.RESID_EXTRACTTO_TITLE;
- ExtractToDialog dialog = new ExtractToDialog(getShell(), title);
- if (dialog == null)
- return;
- dialog.setNeedsProgressMonitor(true);
-
- String message = SystemMessage.sub(FileResources.RESID_EXTRACTTO_PROMPT, "&1", selection.getAbsolutePath());
- dialog.setMessage(message);
- dialog.setShowNewConnectionPrompt(true);
- dialog.setShowPropertySheet(true, false);
- dialog.setSystemTypes(systemTypes);
-
- dialog.setPreSelection(selection);
-
- dialog.setBlockOnOpen(true);
- dialog.setSelectionValidator(this);
-
- /*if (dlgHelpId!=null)
- {
- dialog.setHelp(dlgHelpId);
- }*/
-
- int rc = dialog.open();
-
- // if (rc != 0) NOT RELIABLE!
- boolean cancelled = false;
- if (dialog.wasCancelled()) cancelled = true;
-
- IRemoteFile destination = null;
- IRemoteFileSubSystem destSS = null;
- if (!cancelled)
- {
- destination = (IRemoteFile) dialog.getOutputObject();
- destSS = destination.getParentRemoteFileSubSystem();
- }
- else
- {
- return;
- }
- if (destination == null)
- {
- System.out.println("blah");
- }
- if (selection.isAncestorOf(destination))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- i--;
- continue;
- }
- if (!destination.canWrite())
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_TARGET_READONLY);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- i--;
- continue;
- }
- IRunnableContext runnableContext = getRunnableContext(_parent);
-
- ExtractRunnable runnable = new ExtractRunnable(selection, destination);
- try
- {
- // currently we don't run this in a thread because
- // in some cases dialogs are launched in the operation
- // (widgets can only be legally used on the main thread)
- runnableContext.run(false, true, runnable); // inthread, cancellable, IRunnableWithProgress
- }
- catch (java.lang.reflect.InvocationTargetException exc)
- {
- }
- catch (java.lang.InterruptedException e)
- {
- }
- // always refresh
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destination, destination.getParentPath(), destSS, null, null);
- registry.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH, destination.getParentPath()));
- }
- }
-
- protected boolean destinationInSource(IRemoteFile destination)
- {
- boolean insource = false;
- for (int i = 0; i < _selected.size(); i++)
- {
- if (destination.isDescendantOf((IRemoteFile) _selected.get(i)))
- {
- insource = true;
- break;
- }
- }
- return insource;
- }
-
- protected String getActionLabelForSingleSelection()
- {
- return _label;
- }
-
- public SystemMessage isValid(IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects)
- {
- //if (selectedConnection != sourceConnection) {} // someday, but can't happen today.
- Object selectedObject = selectedObjects[0];
- IRemoteFile currentSelection = (IRemoteFile) _selected.get(currentlyProcessingSelection);
- if (!(selectedObject instanceof IRemoteFile))
- return null;
- IRemoteFile selectedFolder = (IRemoteFile)selectedObject;
- if (selectedFolder.isDescendantOf(currentSelection))
- {
- if (targetDescendsFromSrcMsg == null)
- targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE);
- return targetDescendsFromSrcMsg;
- }
- else
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemFileUpdateFilterAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemFileUpdateFilterAction.java
deleted file mode 100644
index 41e62682c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemFileUpdateFilterAction.java
+++ /dev/null
@@ -1,56 +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.files.ui.actions;
-import org.eclipse.rse.files.ui.SystemFileFilterStringEditPane;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.filters.actions.SystemChangeFilterAction;
-import org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action that displays the Change File Filter dialog.
- * Note that the input filter is deduced from the current selection, which must be a filter reference.
- */
-public class SystemFileUpdateFilterAction
- extends SystemChangeFilterAction
-{
-
- /**
- * Constructor
- */
- public SystemFileUpdateFilterAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_UPDATEFILTER_LABEL, SystemResources.ACTION_UPDATEFILTER_TOOLTIP);
- setDialogTitle(SystemFileResources.RESID_CHGFILEFILTER_TITLE);
- }
- /**
- * Overridable extension point to configure the filter dialog. Typically you don't need
- * to subclass our default dialog.
- */
- protected void configureFilterDialog(SystemChangeFilterDialog dlg)
- {
- // it is cheaper to do this here, as it defers instantiation of the edit pane until the
- // user actually runs the action!
- Shell shell = dlg.getShell();
- if (shell == null)
- shell = dlg.getParentShell();
-
- dlg.setFilterStringEditPane(new SystemFileFilterStringEditPane(shell));
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 72c445bdb..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemMoveRemoteFileAction.java
+++ /dev/null
@@ -1,198 +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.files.ui.actions;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Move selected files and folders action.
- */
-public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
- implements IValidatorRemoteSelection
-{
- private SystemMessage targetEqualsSrcMsg = null;
- private SystemMessage targetDescendsFromSrcMsg = null;
- protected Vector movedFiles = new Vector();
-
- /**
- * Constructor
- */
- public SystemMoveRemoteFileAction(Shell shell)
- {
- super(shell, MODE_MOVE);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0111"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX+"dmrf0000"); //$NON-NLS-1$
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
- /**
- * Reset. This is a re-run of this action
- */
- protected void reset()
- {
- movedFiles.clear();
- super.reset();
-
- //targetEqualsSrcMsg = null;
- }
-
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- * @param monitor Usually not needed
- * @param targetContainer will be the IRemoteFile folder selected to move into
- * @param oldObject will be the IRemoteFile object currently being moved
- * @param newName will be the new name to give the oldObject on move
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- IRemoteFile targetFolder = (IRemoteFile)targetContainer;
- IRemoteFile srcFileOrFolder = (IRemoteFile)oldObject;
-
- IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem();
-
- boolean ok = false;
-
- ok = ss.move(srcFileOrFolder, targetFolder, newName, monitor);
- if (!ok)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_FILE_FAILED);
- msg.makeSubstitution(srcFileOrFolder.getName());
- throw new SystemMessageException(msg);
- }
- else
- {
- String sep = targetFolder.getSeparator();
- String targetFolderName = targetFolder.getAbsolutePath();
- String resultPath = null;
-
- if (!targetFolderName.endsWith(sep))
- resultPath = targetFolderName+sep+newName;
- else
- resultPath = targetFolderName+newName;
-
- copiedFiles.addElement(resultPath);
- movedFiles.add(srcFileOrFolder);
- }
-
- return ok;
- }
-
- /**
- * The user has selected a remote object. Return null if OK is to be enabled, or a SystemMessage
- * if it is not to be enabled. The message will be displayed on the message line.
- */
- public SystemMessage isValid(IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects)
- {
- //if (selectedConnection != sourceConnection) {} // someday, but can't happen today.
- Object selectedObject = selectedObjects[0];
- if (!(selectedObject instanceof IRemoteFile))
- return null;
- IRemoteFile selectedFolder = (IRemoteFile)selectedObject;
- if (selectedFolder.getAbsolutePath().equals(firstSelectionParent.getAbsolutePath()))
- {
- if (targetEqualsSrcMsg == null)
- targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_EQUALS_SOURCE);
- return targetEqualsSrcMsg;
- }
- else if (selectedFolder.getAbsolutePath().equals(firstSelection.getAbsolutePath()))
- {
- if (targetEqualsSrcMsg == null)
- targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_EQUALS_SOURCE); // todo: different msg
- return targetEqualsSrcMsg;
- }
- else if (selectedFolder.isDescendantOf(firstSelection))
- {
- if (targetDescendsFromSrcMsg == null)
- targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE);
- return targetDescendsFromSrcMsg;
- }
- else
- return null;
- }
-
- /**
- * Called after all the copy/move operations end, be it successfully or not.
- * Your opportunity to display completion or do post-copy selections/refreshes
- */
- public void copyComplete()
- {
- // we want to do the super.copyComplete() to refresh the target, but first we must do refresh the
- // source to reflect the deletion...
-
- // refresh all instances of the source parent, and all affected filters...
- ISubSystem fileSS = targetFolder.getParentRemoteFileSubSystem();
- //RSEUIPlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent(
- // ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, copiedFiles, firstSelectionParent.getAbsolutePath(), fileSS, null, null);
- 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 = RSEUIPlugin.getTheSystemRegistry();
- ISystemTree tree = (ISystemTree)v;
- Object parent = tree.getSelectedParent();
- if (parent != null)
- {
- if (parent instanceof IRemoteFile)
- {
- //System.out.println("Firing REFRESH_REMOTE");
- sr.fireEvent(
- new org.eclipse.rse.model.impl.SystemResourceChangeEvent(
- parent,ISystemResourceChangeEvent.EVENT_REFRESH_REMOTE, null) );
- }
- else
- {
- //System.out.println("MOVE OPERATION: Firing REFRESH");
- // FIRST REFRESH EXPANDED FILTER
- sr.fireEvent(
- new org.eclipse.rse.model.impl.SystemResourceChangeEvent(
- parent,ISystemResourceChangeEvent.EVENT_REFRESH, null) );
- // NEXT REFRESH ALL OTHER PLACES THAT MIGHT BE SHOWING THE SOURCE FOLDER
- sr.fireEvent(
- new org.eclipse.rse.model.impl.SystemResourceChangeEvent(
- firstSelectionParent,ISystemResourceChangeEvent.EVENT_REFRESH_REMOTE, null) );
- }
- }
- else
- RSEUIPlugin.logWarning("Hmm, selected parent is null on a move operation!");
- }*/
- super.copyComplete();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index b8887a5b3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileAction.java
+++ /dev/null
@@ -1,68 +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.files.ui.actions;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-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;
-
-
-
-/**
- * An action for prompting the user with a wizard, for creating a new file
- */
-public class SystemNewFileAction extends SystemBaseWizardAction
-{
-
- /**
- * Constructor when you want to use the default label, tooltip and image
- */
- public SystemNewFileAction(Shell parent)
- {
- this(SystemResources.ACTION_NEWFILE_LABEL,
- SystemResources.ACTION_NEWFILE_TOOLTIP,
- //PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE),
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILE_ID),
- parent);
- }
-
- /**
- * Constructor when you want to supply your own label, tooltip and image
- */
- public SystemNewFileAction(String text,String tooltip,ImageDescriptor image,Shell parent)
- {
- super(text, tooltip, image, parent);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- allowOnMultipleSelection(false);
- }
-
- /**
- * Override of parent to create the wizard
- */
- protected IWizard createWizard()
- {
- SystemNewFileWizard newFileWizard = new SystemNewFileWizard();
- // newFileWizard.setInputObject(getValue());
- return newFileWizard;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 0f1f7a3d7..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterAction.java
+++ /dev/null
@@ -1,82 +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.files.ui.actions;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.files.ui.SystemFileFilterStringEditPane;
-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;
-
-
-
-/**
- * The action that displays the New File Filter wizard.
- * File Filters are typed filters that allow users to get a list of files meeting the filtering criteria.
- */
-public class SystemNewFileFilterAction
- extends SystemNewFilterAction
-{
- //private RemoteFileSubSystemConfiguration inputSubsystemConfiguration;
-
- /**
- * Constructor
- */
- public SystemNewFileFilterAction(IRemoteFileSubSystemConfiguration subsystemFactory, ISystemFilterPool parentPool, Shell shell)
-
- {
- super(shell, parentPool, SystemFileResources.ACTION_NEWFILTER_LABEL, SystemFileResources.ACTION_NEWFILTER_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTER_ID));
-
- //setHelp(RSEUIPlugin.HELPPREFIX+"anff0000");
- //setDialogHelp(RSEUIPlugin.HELPPREFIX+"wnff0000");
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0042"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX+"wnfr0000"); //$NON-NLS-1$
- }
-
- /**
- * Set the parent filter pool that the new-filter actions need.
- */
- public void setParentFilterPool(ISystemFilterPool parentPool)
- {
- this.parentPool = parentPool;
- setValue(null); // dwd setting the parent pool negates any value from the previous run of this action
- }
- /**
- * Parent intercept.
- * <p>
- * Overridable extension. For those cases when you don't want to create your
- * own wizard subclass, but prefer to simply configure the default wizard.
- * <p>
- * Note, at the point this is called, all the base configuration, based on the
- * setters for this action, have been called.
- * <p>
- * We do it here versus via setters as it defers some work until the user actually
- * selects this action.
- */
- protected void configureNewFilterWizard(SystemNewFilterWizard wizard)
- {
- // configuration that used to only be possible via subclasses...
- wizard.setWizardPageTitle(SystemFileResources.RESID_NEWFILEFILTER_PAGE1_TITLE);
- wizard.setWizardImage(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD_ID));
- wizard.setPage1Description(SystemFileResources.RESID_NEWFILEFILTER_PAGE1_DESCRIPTION);
- wizard.setFilterStringEditPane(new SystemFileFilterStringEditPane(wizard.getShell()));
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ee4b26f64..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterFromFolderAction.java
+++ /dev/null
@@ -1,123 +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.files.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile;
-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;
-
-
-/**
- * Class for defining a new filter from a preselected folder
- */
-public class SystemNewFileFilterFromFolderAction extends SystemNewFileFilterAction
-{
- private RemoteFile _selected;
-
- /**
- * Constructor for SystemNewFileFilterFromFolderAction
- * @param parent
- */
- public SystemNewFileFilterFromFolderAction(Shell parent)
- {
- // initially use null, but update based on selection
- super(null, null, parent);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0112");
- }
-
-
- public void run()
- {
- IRemoteFileSubSystem fileSubsystem = _selected.getParentRemoteFileSubSystem();
- //ISubSystemConfiguration config = fileSubsystem.getSubSystemConfiguration();
- ISystemFilterPool filterPool = fileSubsystem.getFilterPoolReferenceManager().getDefaultSystemFilterPoolManager().getFirstDefaultSystemFilterPool();
- setParentFilterPool(filterPool);
- setAllowFilterPoolSelection(fileSubsystem.getFilterPoolReferenceManager().getReferencedSystemFilterPools());
- super.run();
- }
-
- /**
- * Called when the selection changes in the systems view. This determines
- * the input object for the command and whether to enable or disable
- * the action.
- *
- * @param selection the current seleciton
- * @return whether to enable or disable the action
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = false;
-
- Iterator e = selection.iterator();
- Object selected = e.next();
-
- if (selected != null && selected instanceof IRemoteFile)
- {
- _selected = (RemoteFile) selected;
- //if (!_selected.isFile())
- {
- enable = true;
- }
- }
-
-
-
- return enable;
- }
-
-
- /**
- * <i>Output method. Do not override.</i><br>
- * Get the contextual system filter pool reference manager provider. Will return non-null if the
- * current selection is a reference to a filter pool or filter, or a reference manager
- * provider.
- */
- public ISystemFilterPoolReferenceManagerProvider getSystemFilterPoolReferenceManagerProvider()
- {
- return _selected.getParentRemoteFileSubSystem().getFilterPoolReferenceManager().getProvider();
- }
-
- /**
- * Parent intercept.
- * <p>
- * Overridable extension. For those cases when you don't want to create your
- * own wizard subclass, but prefer to simply configure the default wizard.
- * <p>
- * Note, at the point this is called, all the base configuration, based on the
- * setters for this action, have been called.
- * <p>
- * We do it here versus via setters as it defers some work until the user actually
- * selects this action.
- */
- protected void configureNewFilterWizard(SystemNewFilterWizard wizard)
- {
- super.configureNewFilterWizard(wizard);
- String[] filters = new String[1];
- ISystemRemoteElementAdapter adapter = (ISystemRemoteElementAdapter)_selected.getAdapter(ISystemRemoteElementAdapter.class);
- filters[0] = adapter.getFilterStringFor(_selected);
- wizard.setDefaultFilterStrings(filters);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index c45e02163..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFolderAction.java
+++ /dev/null
@@ -1,67 +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.files.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-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;
-
-
-
-/**
- * An action for prompting the user with a wizard, for creating a new folder
- */
-public class SystemNewFolderAction extends SystemBaseWizardAction
-{
-
- /**
- * Constructor when you want to use the default label, tooltip and image
- */
- public SystemNewFolderAction(Shell parent)
- {
- this(FileResources.ACTION_NEWFOLDER_LABEL,
- FileResources.ACTION_NEWFOLDER_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFOLDER_ID),
- parent);
- }
-
- /**
- * Constructor when you want to supply your own label, tooltip and image
- */
- public SystemNewFolderAction(String text, String tooltip, ImageDescriptor image, Shell parent)
- {
- super(text, tooltip, image, parent);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- allowOnMultipleSelection(false);
- }
-
- /**
- * Override of parent to create the wizard
- */
- protected IWizard createWizard()
- {
- SystemNewFolderWizard newFolderWizard = new SystemNewFolderWizard();
- return newFolderWizard;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteArchiveSelectAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteArchiveSelectAction.java
deleted file mode 100644
index a5eaffda1..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteArchiveSelectAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.actions;
-
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteArchiveDialog;
-import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class SystemRemoteArchiveSelectAction extends
- SystemRemoteFileSelectAction
-{
- public SystemRemoteArchiveSelectAction(Shell shell)
- {
- super(shell);
- }
-
- public SystemRemoteArchiveSelectAction(Shell shell, String label, String tooltip)
- {
- super(shell, label, tooltip);
- }
-
- protected SystemRemoteResourceDialog createRemoteResourceDialog(Shell shell, String title)
- {
- return new SystemRemoteArchiveDialog(shell, title);
- }
-
- protected SystemRemoteResourceDialog createRemoteResourceDialog(Shell shell)
- {
- return new SystemRemoteArchiveDialog(shell);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index e703f809c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.files.ui.actions;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.subsystems.IRemoteLineReference;
-import org.eclipse.rse.files.ui.resources.ISystemTextEditor;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-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.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-
-/**
- * Open With menu class for openning remote files to a certain line number
- */
-public class SystemRemoteFileLineOpenWithMenu extends SystemRemoteFileOpenWithMenu
-{
- protected IRemoteLineReference _remoteLine;
-
-
- public void updateSelection(IStructuredSelection selection)
- {
- if (selection.size() == 1)
- {
- Object element = selection.getFirstElement();
- if (element instanceof IRemoteLineReference)
- {
-
- _remoteLine = (IRemoteLineReference)element;
- _remoteFile = outputToFile(_remoteLine);
- if (_remoteFile == null)
- {
- return;
- }
-
- }
- }
- }
-
- public void fill(Menu menu, int index)
- {
-
- super.fill(menu, index);
- }
-
-
- protected IEditorRegistry getEditorRegistry()
- {
- return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry();
- }
-
- protected IEditorDescriptor getDefaultTextEditor()
- {
- IEditorRegistry registry = getEditorRegistry();
- return registry.findEditor("org.eclipse.ui.DefaultTextEditor");
- }
-
-
-
- public static IRemoteFile outputToFile(IRemoteLineReference output)
- {
- IRemoteFile file = null;
- Object parent = output.getParent();
- IRemoteFileSubSystem fs = null;
- if (parent instanceof IRemoteCommandShell)
- {
- fs = RemoteFileUtility.getFileSubSystem(((IRemoteCommandShell)parent).getCommandSubSystem().getHost());
- }
- else if (parent instanceof IRemoteFile)
- {
- return (IRemoteFile) parent;
- }
-
- if (fs != null)
- {
- String path = output.getAbsolutePath();
- if (path != null && path.length() > 0)
- {
- Object obj = null;
- try
- {
- obj = fs.getObjectWithAbsoluteName(path);
- }
- catch (Exception e)
- {
- return null;
- }
- if (obj != null && obj instanceof IRemoteFile)
- {
- file = (IRemoteFile) obj;
-
- return file;
- }
- }
- }
-
- return file;
- }
-
-
-
- protected void openEditor(IRemoteFile file, IEditorDescriptor descriptor)
- {
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(file, descriptor.getId());
- editableFile.open(SystemBasePlugin.getActiveWorkbenchShell());
- handleGotoLine();
- }
-
-
- protected void handleGotoLine()
- {
- handleGotoLine(_remoteFile, _remoteLine.getLine(), _remoteLine.getCharStart(), _remoteLine.getCharEnd());
- }
-
-
- public static void handleGotoLine(IRemoteFile remoteFile, int line, int charStart, int charEnd)
- {
- //if (line > 0)
- {
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchPage persp = desktop.getActiveWorkbenchWindow().getActivePage();
- IEditorPart editor = null;
- String fileName = remoteFile.getAbsolutePath();
- IEditorReference[] editors = persp.getEditorReferences();
- for (int i = 0; i < editors.length; i++)
- {
- IEditorReference ref = editors[i];
- IEditorPart editorp = ref.getEditor(false);
- if (editorp != null)
- {
- IEditorInput einput = editorp.getEditorInput();
- if (einput instanceof IFileEditorInput)
- {
- IFileEditorInput input = (IFileEditorInput) einput;
- IFile efile = input.getFile();
-
- SystemIFileProperties properties = new SystemIFileProperties(efile);
- String comparePath = properties.getRemoteFilePath();
-
- if (comparePath != null && (comparePath.replace('\\','/').equals(fileName.replace('\\','/'))))
- {
- editor = editorp;
- persp.bringToTop(editor);
- if (editor instanceof ISystemTextEditor)
- {
- ISystemTextEditor lpex = (ISystemTextEditor)editor;
- lpex.gotoLine(line);
- lpex.selectText(charStart, charEnd);
-
- }
- else
- {
- try
- {
- IMarker marker = efile.createMarker(IMarker.TEXT);
- marker.setAttribute(IMarker.LINE_NUMBER, line);
- marker.setAttribute(IMarker.CHAR_START, charStart);
- marker.setAttribute(IMarker.CHAR_END, charEnd);
-
- IDE.gotoMarker(editor, marker);
-
-
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- }
- }
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 755204541..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileOpenWithMenu.java
+++ /dev/null
@@ -1,438 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.files.ui.actions;
-import java.text.Collator;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Hashtable;
-
-import org.eclipse.core.resources.IFile;
-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.files.ui.FileResources;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.files.ui.view.DownloadJob;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-
-/**
- * Open with menu class for remote files
- */
-public class SystemRemoteFileOpenWithMenu extends ContributionItem
-{
- protected IWorkbenchPage page;
- protected IRemoteFile _remoteFile;
- protected IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
-
- private static Hashtable imageCache = new Hashtable(11);
-
- /**
- * The id of this action.
- */
- public static final String ID = PlatformUI.PLUGIN_ID + ".OpenWithMenu";//$NON-NLS-1$
-
- /*
- * Compares the labels from two IEditorDescriptor objects
- */
- private static final Comparator comparer = new Comparator()
- {
- private Collator collator = Collator.getInstance();
-
- public int compare(Object arg0, Object arg1) {
- String s1 = ((IEditorDescriptor)arg0).getLabel();
- String s2 = ((IEditorDescriptor)arg1).getLabel();
- return collator.compare(s1, s2);
- }
- };
-
-
-/**
- * Constructs a new instance of <code>SystemOpenWithMenu</code>.
- */
-public SystemRemoteFileOpenWithMenu()
-{
- super(ID);
- this.page = null;
- _remoteFile = null;
-}
-
-/*
- * Initializes the IRemoteFile
- */
-public void updateSelection(IStructuredSelection selection)
-{
- if (selection.size() == 1)
- {
- _remoteFile = (IRemoteFile)selection.getFirstElement();
- }
-}
-
-/**
- * Returns an image to show for the corresponding editor descriptor.
- *
- * @param editorDesc the editor descriptor, or null for the system editor
- * @return the image or null
- */
-protected Image getImage(IEditorDescriptor editorDesc) {
- ImageDescriptor imageDesc = getImageDescriptor(editorDesc);
- if (imageDesc == null) {
- return null;
- }
- Image image = (Image) imageCache.get(imageDesc);
- if (image == null) {
- image = imageDesc.createImage();
- imageCache.put(imageDesc, image);
- }
- return image;
-}
-
-private String getFileName()
-{
- return _remoteFile.getName();
-}
-
-/**
- * Returns the image descriptor for the given editor descriptor,
- * or null if it has no image.
- */
-private ImageDescriptor getImageDescriptor(IEditorDescriptor editorDesc) {
- ImageDescriptor imageDesc = null;
- if (editorDesc == null) {
- imageDesc = registry.getImageDescriptor(getFileName());
- }
- else {
- imageDesc = editorDesc.getImageDescriptor();
- }
- if (imageDesc == null) {
- if (editorDesc.getId().equals(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID))
- imageDesc = registry.getSystemExternalEditorImageDescriptor(getFileName());
- }
- return imageDesc;
-}
-/**
- * Creates the menu item for the editor descriptor.
- *
- * @param menu the menu to add the item to
- * @param descriptor the editor descriptor, or null for the system editor
- * @param preferredEditor the descriptor of the preferred editor, or <code>null</code>
- */
-protected void createMenuItem(Menu menu, final IEditorDescriptor descriptor, final IEditorDescriptor preferredEditor)
-{
- // XXX: Would be better to use bold here, but SWT does not support it.
- final MenuItem menuItem = new MenuItem(menu, SWT.RADIO);
- boolean isPreferred = preferredEditor != null && descriptor.getId().equals(preferredEditor.getId());
- menuItem.setSelection(isPreferred);
- menuItem.setText(descriptor.getLabel());
- Image image = getImage(descriptor);
- if (image != null) {
- menuItem.setImage(image);
- }
- Listener listener = new Listener() {
- public void handleEvent(Event event) {
- switch (event.type) {
- case SWT.Selection:
- if(menuItem.getSelection())
- {
- openEditor(_remoteFile, descriptor);
- }
- break;
- }
- }
- };
- menuItem.addListener(SWT.Selection, listener);
-}
-
-
-protected void openEditor(IRemoteFile remoteFile, IEditorDescriptor descriptor) {
-
- SystemEditableRemoteFile editable = null;
-
- if (descriptor == null)
- {
- editable = new SystemEditableRemoteFile(remoteFile);
- }
- else
- {
- editable = new SystemEditableRemoteFile(remoteFile, descriptor.getId());
- }
-
- boolean systemEditor = descriptor != null && descriptor.getId().equals(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
-
- if (isFileCached(editable, remoteFile)) {
-
- try {
- if (systemEditor) {
- editable.openSystemEditor();
- }
- else {
- editable.openEditor();
- }
- }
- catch (Exception e) {}
- }
- else {
- DownloadJob oJob = new DownloadJob(editable, systemEditor);
- oJob.schedule();
- }
-}
-
-private boolean isFileCached(ISystemEditableRemoteObject editable, IRemoteFile remoteFile)
-{
- // DY: check if the file exists and is read-only (because it was previously opened
- // in the system editor)
- IFile file = editable.getLocalResource();
- SystemIFileProperties properties = new SystemIFileProperties(file);
- boolean newFile = !file.exists();
-
- // detect whether there exists a temp copy already
- if (!newFile && file.exists())
- {
- // we have a local copy of this file, so we need to compare timestamps
-
- // get stored modification stamp
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // get updated remoteFile so we get the current remote timestamp
- //remoteFile.markStale(true);
- IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
- try
- {
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
- }
- catch (Exception e)
- {
-
- }
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (storedModifiedStamp != remoteModifiedStamp);
- return (!dirty && !remoteNewer);
- }
- return false;
-}
-
-/**
- * Get the local cache of the remote file, or <code>null</code> if none.
- * @param remoteFile the remote file.
- * @return the local cached resource, or <code>null</code> if none.
- */
-private IFile getLocalResource(IRemoteFile remoteFile)
-{
- return (IFile)UniversalFileTransferUtility.getTempFileFor(remoteFile);
-}
-
-/**
- * Returns the preferred editor for the remote file. If the remote file has a cached local resource,
- * then returns the default editor associated with that resource, by calling <code>IDE.getDefaultEditor(IFile)</code>.
- * Otherwise, get the default editor associated with that remote file name from the editor registry.
- * @param remoteFile the remote file.
- * @return the preferred editor for the remote file, or <code>null</code> if none.
- */
-protected IEditorDescriptor getPreferredEditor(IRemoteFile remoteFile) {
-
- IFile localFile = getLocalResource(remoteFile);
-
- if (localFile == null) {
- return registry.getDefaultEditor(remoteFile.getName());
- }
- else {
- return IDE.getDefaultEditor(localFile);
- }
-}
-
-
-protected IEditorDescriptor getDefaultEditor(IRemoteFile remoteFile)
-{
- IFile localFile = getLocalResource(remoteFile);
-
- if (localFile == null || !localFile.exists()) {
- return registry.getDefaultEditor(remoteFile.getName());
- }
- else
- {
- IEditorDescriptor descriptor = IDE.getDefaultEditor(localFile);
- if (descriptor == null)
- {
- descriptor = getDefaultTextEditor();
- }
- return descriptor;
- }
-}
-
-protected void setDefaultEditor(IRemoteFile remoteFile, String editorId)
-{
- IFile localFile = getLocalResource(remoteFile);
-
- if (localFile == null) {
- registry.setDefaultEditor(remoteFile.getName(), editorId);
- }
- else {
- IDE.setDefaultEditor(localFile, editorId);
- }
-}
-
-
-protected IEditorRegistry getEditorRegistry()
-{
- return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry();
-}
-
-protected IEditorDescriptor getDefaultTextEditor()
-{
- IEditorRegistry registry = getEditorRegistry();
- return registry.findEditor("org.eclipse.ui.DefaultTextEditor");
-}
-
-/* (non-Javadoc)
- * Fills the menu with perspective items.
- */
-public void fill(Menu menu, int index)
-{
- if (_remoteFile == null) {
- return;
- }
-
- IEditorDescriptor defaultEditor = registry.findEditor("org.eclipse.ui.DefaultTextEditor"); // may be null
- IEditorDescriptor preferredEditor = getPreferredEditor(_remoteFile); // may be null
-
- Object[] editors = registry.getEditors(getFileName());
- Collections.sort(Arrays.asList(editors), comparer);
-
- boolean defaultFound = false;
-
- //Check that we don't add it twice. This is possible
- //if the same editor goes to two mappings.
- ArrayList alreadyMapped= new ArrayList();
-
- for (int i = 0; i < editors.length; i++) {
- IEditorDescriptor editor = (IEditorDescriptor) editors[i];
- if(!alreadyMapped.contains(editor)){
- createMenuItem(menu, editor, preferredEditor);
- if (defaultEditor != null && editor.getId().equals(defaultEditor.getId()))
- defaultFound = true;
- alreadyMapped.add(editor);
- }
- }
-
- // Only add a separator if there is something to separate
- if (editors.length > 0)
- new MenuItem(menu, SWT.SEPARATOR);
-
- // Add default editor. Check it if it is saved as the preference.
- if (!defaultFound && defaultEditor != null) {
- createMenuItem(menu, defaultEditor, preferredEditor);
- }
-
- // Add system editor (should never be null)
- IEditorDescriptor descriptor = registry.findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
- createMenuItem(menu, descriptor, preferredEditor);
-
- //DKM- disable inplace editor for now
- /*
- // Add system in-place editor (can be null)
- descriptor = registry.findEditor(IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID);
- if (descriptor != null) {
- createMenuItem(menu, descriptor, preferredEditor);
- }
- */
- createDefaultMenuItem(menu, _remoteFile);
-}
-
-
-/* (non-Javadoc)
- * Returns whether this menu is dynamic.
- */
-public boolean isDynamic()
-{
- return true;
-}
-
-
-/**
- * Creates the menu item for clearing the current selection.
- *
- * @param menu the menu to add the item to
- * @param file the file bing edited
- * @param registry the editor registry
- */
-protected void createDefaultMenuItem(Menu menu, final IRemoteFile file)
-{
- final MenuItem menuItem = new MenuItem(menu, SWT.RADIO);
- IEditorDescriptor defaultEditor = getDefaultEditor(file);
- menuItem.setSelection(defaultEditor == null);
- menuItem.setText(FileResources.DefaultEditorDescription_name);
-
- Listener listener = new Listener()
- {
- public void handleEvent(Event event)
- {
- switch (event.type)
- {
- case SWT.Selection:
- if(menuItem.getSelection())
- {
- setDefaultEditor(file, null);
-
- IEditorDescriptor defaultEditor = null;
-
- try {
- defaultEditor = getEditorDescriptor(file);
- openEditor(file, defaultEditor);
- }
- catch (PartInitException e) {
- SystemBasePlugin.logError("Error getting default editor descriptor", e);
- }
- }
- break;
- }
- }
- };
-
- menuItem.addListener(SWT.Selection, listener);
-}
-
-protected IEditorDescriptor getEditorDescriptor(IRemoteFile file) throws PartInitException {
- return IDE.getEditorDescriptor(file.getName(), true);
-}
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSearchOpenWithMenu.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSearchOpenWithMenu.java
deleted file mode 100644
index 51d4649a6..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSearchOpenWithMenu.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.files.ui.actions;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-
-/**
- * Open with menu for remote search result openning
- *
- */
-public class SystemRemoteFileSearchOpenWithMenu extends
- SystemRemoteFileLineOpenWithMenu
-{
- protected IRemoteSearchResult _searchResult;
- public void updateSelection(IStructuredSelection selection)
- {
- if (selection.size() == 1)
- {
- Object element = selection.getFirstElement();
- if (element instanceof IRemoteSearchResult)
- {
- _searchResult = (IRemoteSearchResult)element;
- _remoteFile = outputToFile(_searchResult);
- }
- }
- }
-
- protected void handleGotoLine()
- {
- handleGotoLine(_remoteFile, _searchResult);
- }
-
- public static void handleGotoLine(IRemoteFile remoteFile, IHostSearchResult searchResult) {
-
- int line = searchResult.getLine();
-
- if (line > 0) {
-
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchPage persp = desktop.getActiveWorkbenchWindow().getActivePage();
- IEditorPart editor = null;
- String fileName = remoteFile.getAbsolutePath();
- IEditorReference[] editors = persp.getEditorReferences();
-
- for (int i = 0; i < editors.length; i++) {
- IEditorReference ref = editors[i];
- IEditorPart editorp = ref.getEditor(false);
-
- if (editorp != null) {
-
- IEditorInput einput = editorp.getEditorInput();
-
- if (einput instanceof IFileEditorInput) {
- IFileEditorInput input = (IFileEditorInput)einput;
- IFile efile = input.getFile();
-
- SystemIFileProperties properties = new SystemIFileProperties(efile);
- String comparePath = properties.getRemoteFilePath();
-
- if (comparePath != null && (comparePath.replace('\\','/').equals(fileName.replace('\\','/')))) {
- editor = editorp;
- persp.bringToTop(editor);
-
- int firstStartOffset = -1;
- int firstEndOffset = -1;
-
- int matchSize = searchResult.numOfMatches();
-
- if (matchSize > 0) {
- firstStartOffset = searchResult.getCharStart(0);
- firstEndOffset = searchResult.getCharEnd(0);
- }
- /* DKM- always use markers now
- if (editor instanceof ISystemTextEditor) {
- ISystemTextEditor lpex = (ISystemTextEditor)editor;
- lpex.gotoLine(line);
- lpex.selectText(firstStartOffset, firstEndOffset);
- }
- else
- */
- {
-
- try {
-
- // create a marker for the first match
- IMarker firstMarker = createMarker(efile, line, firstStartOffset, firstEndOffset);
-
- int charStart = -1;
- int charEnd = -1;
-
- for (int idx = 1; idx < matchSize; idx++) {
- charStart = searchResult.getCharStart(idx);
- charEnd = searchResult.getCharEnd(idx);
- createMarker(efile, line, charStart, charEnd);
- }
-
- // highlight the first marker (first match)
- IDE.gotoMarker(editor, firstMarker);
- }
- catch (CoreException e) {
- SystemBasePlugin.logError("Error occured trying to create a marker", e);
- }
- }
- }
- }
- }
- }
- }
- }
-
- protected static IMarker createMarker(IFile file, int line, int charStart, int charEnd) throws CoreException {
- IMarker marker = file.createMarker(IMarker.TEXT);
- marker.setAttribute(IMarker.LINE_NUMBER, line);
- marker.setAttribute(IMarker.CHAR_START, charStart);
- marker.setAttribute(IMarker.CHAR_END, charEnd);
- return marker;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 955be393e..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSelectAction.java
+++ /dev/null
@@ -1,504 +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.files.ui.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.ISystemAddFileListener;
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
-import org.eclipse.rse.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.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.rse.ui.view.SystemActionViewerFilter;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * The action for allowing the user to select a remote folder.
- * <p>
- * To configure the functionality, call these methods:
- * <ul>
- * <li>{@link #setShowNewConnectionPrompt(boolean)}
- * <li>{@link #setHost(IHost) or #setDefaultConnection(SystemConnection)}
- * <li>{@link #setSystemType(String)} or {@link #setSystemTypes(String[])}
- * <li>{@link #setRootFolder(IHost, String)} or {@link #setRootFolder(IRemoteFile)} or {@link #setPreSelection(IRemoteFile)}
- * <li>{@link #setAutoExpandDepth(int)}
- * <li>{@link #setShowPropertySheet(boolean)}
- * <li>{@link #enableAddMode(ISystemAddFileListener)}
- * <li>{@link #setMultipleSelectionMode(boolean)}
- * <li>{@link #setSelectionValidator(IValidatorRemoteSelection)}
- * </ul>
- * <p>
- * To configure the text on the dialog, call these methods:
- * <ul>
- * <li>{@link #setDialogTitle(String)}
- * <li>{@link #setMessage(String)}
- * <li>{@link #setSelectionTreeToolTipText(String)}
- * </ul>
- * <p>
- * After running, call these methods to get the output:
- * <ul>
- * <li>{@link #getSelectedFolder()} or {@link #getSelectedFolders()}
- * <li>{@link #getSelectedConnection()}
- * </ul>
- */
-public class SystemRemoteFileSelectAction extends SystemBaseDialogAction
-{
- private String[] systemTypes;
- private IHost systemConnection, outputConnection;
- private IRemoteFile preSelection;
- private String rootFolderAbsPath;
- private String message, treeTip, dlgTitle;
- private boolean showPropertySheet = false;
- private boolean showPropertySheetDetailsButtonInitialState;
- private boolean showPropertySheetDetailsButton = false;
- private boolean multipleSelectionMode = false;
- private boolean onlyConnection = false;
- private IValidatorRemoteSelection selectionValidator;
- private SystemActionViewerFilter customViewerFilter = null;
-
- /**
- * Constructor that uses default action label and tooltip
- *
- * @param shell The shell to hang the dialog off of
- */
- public SystemRemoteFileSelectAction(Shell shell)
- {
- this(shell, FileResources.ACTION_SELECT_DIRECTORY_LABEL, FileResources.ACTION_SELECT_DIRECTORY_TOOLTIP);
- }
- /**
- * Constructor when you have your own action label and tooltip
- *
- * @param shell The shell to hang the dialog off of
- * @param label
- * @param tooltip
- */
- public SystemRemoteFileSelectAction(Shell shell, String label, String tooltip)
- {
- super(label, tooltip, null, shell);
- super.setNeedsProgressMonitor(true); // the default is to include a monitor. Caller can override
- }
-
-
- // ------------------------
- // CONFIGURATION METHODS...
- // ------------------------
- /**
- * Set the title for the dialog. The default is "Browse for Folder"
- */
- public void setDialogTitle(String title)
- {
- this.dlgTitle = title;
- }
-
- /**
- * Set the message shown at the top of the form
- */
- public void setMessage(String message)
- {
- this.message = message;
- }
- /**
- * Set the tooltip text for the remote systems tree from which an item is selected.
- */
- public void setSelectionTreeToolTipText(String tip)
- {
- this.treeTip = tip;
- }
-
- /**
- * Set the system connection to restrict the user to seeing in the tree.
- *
- * @see #setRootFolder(IHost, String)
- */
- public void setHost(IHost conn)
- {
- systemConnection = conn;
- onlyConnection = true;
- }
- /**
- * Set the connection to default the selection to
- */
- public void setDefaultConnection(IHost conn)
- {
- systemConnection = conn;
- onlyConnection = false;
- }
- /**
- * Set the system types to restrict what connections the user sees, and what types of
- * connections they can create.
- * @param systemTypes An array of system type names
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new String[] {systemType})
- *
- * @param systemType The name of the system type to restrict to
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new String[] {systemType});
- }
-
- /**
- * Set to true if a "New Connection..." special connection is to be shown for creating new connections
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- }
-
-
- /**
- * Set the root folder from which to start listing files.
- * This version identifies the folder via a connection object and absolute path.
- * There is another overload that identifies the folder via a single IRemoteFile object.
- * <p>
- * This call effectively transforms the select dialog by:
- * <ul>
- * <li>Preventing the user from selecting other connections
- * <li>Preventing the user from selecting other filter strings
- * </ul>
- *
- * @param connection The connection to the remote system containing the root folder
- * @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IHost connection, String folderAbsolutePath)
- {
- systemConnection = connection;
- rootFolderAbsPath = folderAbsolutePath;
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection);
-
- if (ss != null)
- {
- try
- {
- IRemoteFile rootFolder = ss.getRemoteFileObject(rootFolderAbsPath);
- if (rootFolder != null)
- {
- setPreSelection(rootFolder);
- }
- }
- catch (Exception e)
- {
-
- }
- }
- onlyConnection = true;
- }
- /**
- * Set the root folder from which to start listing folders.
- * This version identifies the folder via an IRemoteFile object.
- * There is another overload that identifies the folder via a connection and folder path.
- * <p>
- * This call effectively transforms the select dialog by:
- * <ul>
- * <li>Preventing the user from selecting other connections
- * <li>Preventing the user from selecting other filter strings
- * </ul>
- *
- * @param rootFolder The IRemoteFile object representing the remote folder to start the list from
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IRemoteFile rootFolder)
- {
- setRootFolder(rootFolder.getSystemConnection(),rootFolder.getAbsolutePath());
- }
- /**
- * Set a file or folder to preselect. This will:
- * <ul>
- * <li>Set the parent folder as the root folder
- * <li>Pre-expand the parent folder
- * <li>Pre-select the given file or folder after expansion
- * </ul>
- * If there is no parent, then we were given a root. In which case we will
- * <ul>
- * <li>Force setRestrictFolders to false
- * <li>Pre-expand the root drives (Windows) or root files (Unix)
- * <li>Pre-select the given root drive (Windows only)
- * </ul>
- */
- public void setPreSelection(IRemoteFile selection)
- {
- preSelection = selection;
- }
-
-
-
- /**
- * Enable Add mode. This means the OK button is replaced with an Add button, and
- * the Cancel with a Close button. When Add is pressed, the caller is called back.
- * The dialog is not exited until Close is pressed.
- * <p>
- * When a library is selected, the caller is called back to decide to enable the Add
- * button or not.
- */
- public void enableAddMode(ISystemAddFileListener caller)
- {
- }
- /**
- * Overloaded method that allows setting the label and tooltip text of the Add button.
- * If you pass null for the label, the default is used ("Add").
- */
- public void enableAddMode(ISystemAddFileListener caller, String addLabel, String addToolTipText)
- {
- enableAddMode(caller);
- }
-
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- this.showPropertySheet = show;
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload shows a Details>>> button so the user can decide if they want to see the
- * property sheet.
- * <p>
- * @param show True if to show the property sheet within the dialog
- * @param initialState True if the property is to be initially displayed, false if it is not
- * to be displayed until the user presses the Details button.
- */
- public void setShowPropertySheet(boolean show, boolean initialState)
- {
- setShowPropertySheet(show);
- if (show)
- {
- this.showPropertySheetDetailsButton = true;
- this.showPropertySheetDetailsButtonInitialState = initialState;
- }
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedObjects()
- * method to retrieve the list of selected objects.
- *
- * @see #getSelectedObjects()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- this.multipleSelectionMode = multiple;
- }
-
- /*
- * Indicates whether to allow selection of objects from differnet parents
- */
- public void setAllowForMultipleParents(boolean multiple)
- {
- }
-
- /**
- * Specify a validator to use when the user selects a remote file or folder.
- * This allows you to decide if OK should be enabled or not for that remote file or folder.
- */
- public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
- {
- this.selectionValidator = selectionValidator;
- }
-
- // -----------------
- // OUTPUT METHODS...
- // -----------------
- /**
- * Retrieve selected file object. If multiple files selected, returns the first.
- */
- public IRemoteFile getSelectedFile()
- {
- Object o = getValue();
- if (o instanceof IRemoteFile[])
- return ((IRemoteFile[])o)[0];
- else if (o instanceof IRemoteFile)
- return (IRemoteFile)o;
- else
- return null;
- }
- /**
- * Retrieve selected file objects. If no files selected, returns an array of zero.
- * If one file selected returns an array of one.
- */
- public IRemoteFile[] getSelectedFiles()
- {
- Object o = getValue();
- if (o instanceof IRemoteFile[])
- return (IRemoteFile[])o;
- else if (o instanceof IRemoteFile)
- return new IRemoteFile[] {(IRemoteFile)o};
- else if (o instanceof Object[])
- {
- Object[] objs= (Object[])o;
- IRemoteFile[] files = new IRemoteFile[objs.length];
- for (int i = 0; i < objs.length; i++)
- {
- files[i]= (IRemoteFile)objs[i];
- }
- return files;
- }
- else
- return new IRemoteFile[0];
- }
-
-
-
- /**
- * Return all selected objects. This method will return an array of one
- * unless you have called setMultipleSelectionMode(true)!
- * <p>
- * It will always return null if the user cancelled the dialog.
- *
- * @see #setMultipleSelectionMode(boolean)
- */
- public Object[] getSelectedObjects()
- {
- Object remoteObject = getValue();
- if (remoteObject == null)
- return null;
- else if (remoteObject instanceof Object[])
- return (Object[])remoteObject;
- else if (remoteObject instanceof IRemoteFile[])
- return (Object[])remoteObject;
- else if (remoteObject != null)
- return new Object[] {remoteObject};
- else
- return null;
- }
-
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- // -------------------
- // INTERNAL METHODS...
- // -------------------
-
- protected SystemRemoteResourceDialog createRemoteResourceDialog(Shell shell, String title)
- {
- return new SystemRemoteFileDialog(shell, title);
- }
-
- protected SystemRemoteResourceDialog createRemoteResourceDialog(Shell shell)
- {
- return new SystemRemoteFileDialog(shell);
- }
-
- /**
- * Called by eclipse when user selects this action
- */
- protected Dialog createDialog(Shell shell)
- {
- SystemRemoteResourceDialog dlg = null;
- if (dlgTitle == null)
- {
- dlg = createRemoteResourceDialog(shell);
- }
- else
- {
- dlg = createRemoteResourceDialog(shell, dlgTitle);
- }
-
- if (customViewerFilter != null)
- {
- dlg.setCustomViewerFilter(customViewerFilter);
- }
- dlg.setMultipleSelectionMode(multipleSelectionMode);
-
- if (message != null)
- dlg.setMessage(message);
- if (treeTip != null)
- dlg.setSelectionTreeToolTipText(treeTip);
-
- if (systemConnection != null)
- {
- dlg.setDefaultSystemConnection(systemConnection, onlyConnection);
- }
-
- if (systemTypes != null)
- {
- dlg.setSystemTypes(systemTypes);
- }
-
- if (preSelection != null)
- {
- dlg.setPreSelection(preSelection);
- }
-
- if (showPropertySheet)
- {
- if (showPropertySheetDetailsButton)
- dlg.setShowPropertySheet(true, showPropertySheetDetailsButtonInitialState);
- else
- dlg.setShowPropertySheet(true);
- }
- if (selectionValidator != null)
- dlg.setSelectionValidator(selectionValidator);
-
- return dlg;
- }
-
- /**
- * Required by parent. We return the selected object
- */
- protected Object getDialogValue(Dialog dlg)
- {
- SystemRemoteResourceDialog ourDlg = (SystemRemoteResourceDialog)dlg;
- Object outputObject = null;
- outputConnection = null;
- if (!ourDlg.wasCancelled())
- {
- if (multipleSelectionMode)
- outputObject = ourDlg.getSelectedObjects();
- else
- outputObject = ourDlg.getSelectedObject();
- outputConnection = ourDlg.getSelectedConnection();
- }
- return outputObject; // parent class calls setValue on what we return
- }
-
- public void setCustomViewerFilter(SystemActionViewerFilter filter)
- {
- customViewerFilter = filter;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFolderSelectAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFolderSelectAction.java
deleted file mode 100644
index 81b263e39..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFolderSelectAction.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.actions;
-
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemRemoteFolderSelectAction extends
- SystemRemoteFileSelectAction
-{
- public SystemRemoteFolderSelectAction(Shell shell)
- {
- super(shell);
- }
-
- public SystemRemoteFolderSelectAction(Shell shell, String label, String tooltip)
- {
- super(shell, label, tooltip);
- }
-
- protected SystemRemoteResourceDialog createRemoteResourceDialog(Shell shell, String title)
- {
- return new SystemRemoteFolderDialog(shell, title);
- }
-
- protected SystemRemoteResourceDialog createRemoteResourceDialog(Shell shell)
- {
- return new SystemRemoteFolderDialog(shell);
- }
-
- /**
- * Retrieve selected folder object. If multiple folders selected, returns the first.
- */
- public IRemoteFile getSelectedFolder()
- {
- Object o = getValue();
- if (o instanceof IRemoteFile[])
- return ((IRemoteFile[])o)[0];
- else if (o instanceof IRemoteFile)
- return (IRemoteFile)o;
- else
- return null;
- }
- /**
- * Retrieve selected folder objects. If no folders selected, returns an array of zero.
- * If one folder selected returns an array of one.
- */
- public IRemoteFile[] getSelectedFolders()
- {
- Object o = getValue();
- if (o instanceof Object[]) {
-
- Object[] temp = (Object[])o;
-
- IRemoteFile[] files = new IRemoteFile[temp.length];
-
- // ensure all objects are IRemoteFiles
- for (int i = 0; i < temp.length; i++) {
-
- if (temp[i] instanceof IRemoteFile) {
- files[i] = (IRemoteFile)temp[i];
- }
- // should never happen
- else {
- return new IRemoteFile[0];
- }
- }
-
- return files;
- }
- if (o instanceof IRemoteFile[])
- return (IRemoteFile[])o;
- else if (o instanceof IRemoteFile)
- return new IRemoteFile[] {(IRemoteFile)o};
- else
- return new IRemoteFile[0];
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemReplaceWithEditionAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemReplaceWithEditionAction.java
deleted file mode 100644
index 9243876b0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemReplaceWithEditionAction.java
+++ /dev/null
@@ -1,38 +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.files.ui.actions;
-
-import org.eclipse.compare.internal.ICompareContextIds;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class SystemReplaceWithEditionAction extends SystemEditionAction
-{
-
- public SystemReplaceWithEditionAction(Shell parent)
- {
- super(parent,
- FileResources.ACTION_REPLACEWITH_HISTORY_LABEL,
- FileResources.ACTION_REPLACEWITH_HISTORY_TOOLTIP,
- "org.eclipse.compare.internal.ReplaceWithEditionAction", //$NON-NLS-1$
- true);
-
- this.fHelpContextId= ICompareContextIds.REPLACE_WITH_EDITION_DIALOG;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 9cd61b0e3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchAction.java
+++ /dev/null
@@ -1,44 +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.files.ui.actions;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-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;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemSearchAction extends SystemBaseAction {
-
-
- public SystemSearchAction(Shell parent) {
- super(SystemResources.ACTION_SEARCH_LABEL,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_ID), parent);
- setToolTipText(SystemResources.ACTION_SEARCH_TOOLTIP);
- setHelp(RSEUIPlugin.HELPPREFIX + "rsdi0000");
-
- allowOnMultipleSelection(false);
- }
-
- public void run() {
- NewSearchUI.openSearchDialog(SystemBasePlugin.getActiveWorkbenchWindow(), SystemSearchPage.SYSTEM_SEARCH_PAGE_ID);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchBrowseFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchBrowseFileLineAction.java
deleted file mode 100644
index 9b4338ec4..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchBrowseFileLineAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemSearchBrowseFileLineAction extends SystemSearchEditFileLineAction {
-
- /**
- * Constructor to create an edit action that jumps to a file line.
- * @param text the label for the action.
- * @param tooltip the tooltip for the action.
- * @param image the image for the action.
- * @param parent the parent shell.
- * @param editorId the editor id.
- * @param remoteFile the remote file that is to be opened.
- * @param line the line number.
- */
- public SystemSearchBrowseFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId, IRemoteFile remoteFile, IRemoteSearchResult searchResult) {
- super(text, tooltip, image, parent, editorId, remoteFile, searchResult);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.actions.SystemSearchEditFileAction#process(IRemoteFile)
- */
- protected void process(IRemoteFile remoteFile) {
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorId);
- editableFile.open(SystemBasePlugin.getActiveWorkbenchShell(), true);
- handleGotoLine(_remoteFile, _searchResult);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchEditFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchEditFileLineAction.java
deleted file mode 100644
index 0e28b64a9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchEditFileLineAction.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-
-/**
- * Edit action used by search to create markers for all matches in a line and highlight the first match.
- */
-public class SystemSearchEditFileLineAction extends SystemEditFileAction {
-
- protected IRemoteFile _remoteFile;
- protected IRemoteSearchResult _searchResult;
-
- /**
- * Constructor to create an edit action that jumps to a file line.
- * @param text the label for the action.
- * @param tooltip the tooltip for the action.
- * @param image the image for the action.
- * @param parent the parent shell.
- * @param editorId the editor id.
- * @param remoteFile the remote file that is to be opened.
- * @param line the line number.
- */
- public SystemSearchEditFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId, IRemoteFile remoteFile, IRemoteSearchResult searchResult) {
- super(text, tooltip, image, parent, editorId);
- this._remoteFile = remoteFile;
- this._searchResult = searchResult;
- }
-
- /**
- * Calls process().
- */
- public void run() {
- process(_remoteFile, _searchResult);
- }
-
- /**
- * Process the remote file selection.
- */
- public void process(IRemoteFile remoteFile, IRemoteSearchResult searchResult) {
- super.process(remoteFile);
- handleGotoLine(remoteFile, searchResult);
- }
-
- public static void handleGotoLine(IRemoteFile remoteFile, IRemoteSearchResult searchResult) {
-
- int line = searchResult.getLine();
-
- if (line > 0) {
-
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchPage persp = desktop.getActiveWorkbenchWindow().getActivePage();
- IEditorPart editor = null;
- String fileName = remoteFile.getAbsolutePath();
- IEditorReference[] editors = persp.getEditorReferences();
-
- for (int i = 0; i < editors.length; i++) {
- IEditorReference ref = editors[i];
- IEditorPart editorp = ref.getEditor(false);
-
- if (editorp != null) {
-
- IEditorInput einput = editorp.getEditorInput();
-
- if (einput instanceof IFileEditorInput) {
- IFileEditorInput input = (IFileEditorInput)einput;
- IFile efile = input.getFile();
-
- SystemIFileProperties properties = new SystemIFileProperties(efile);
- String comparePath = properties.getRemoteFilePath();
-
- if (comparePath != null && (comparePath.replace('\\','/').equals(fileName.replace('\\','/')))) {
- editor = editorp;
- persp.bringToTop(editor);
-
- int firstStartOffset = -1;
- int firstEndOffset = -1;
-
- int matchSize = searchResult.numOfMatches();
-
- if (matchSize > 0) {
- firstStartOffset = searchResult.getCharStart(0);
- firstEndOffset = searchResult.getCharEnd(0);
- }
- /* DKM- always use markers now
- if (editor instanceof ISystemTextEditor) {
- ISystemTextEditor lpex = (ISystemTextEditor)editor;
- lpex.gotoLine(line);
- lpex.selectText(firstStartOffset, firstEndOffset);
- }
- else
- */
- {
-
- try {
-
- // create a marker for the first match
- IMarker firstMarker = createMarker(efile, line, firstStartOffset, firstEndOffset);
-
- int charStart = -1;
- int charEnd = -1;
-
- for (int idx = 1; idx < matchSize; idx++) {
- charStart = searchResult.getCharStart(idx);
- charEnd = searchResult.getCharEnd(idx);
- createMarker(efile, line, charStart, charEnd);
- }
-
- // highlight the first marker (first match)
- IDE.gotoMarker(editor, firstMarker);
- }
- catch (CoreException e) {
- SystemBasePlugin.logError("Error occured trying to create a marker", e);
- }
- }
- }
- }
- }
- }
- }
- }
-
- protected static IMarker createMarker(IFile file, int line, int charStart, int charEnd) throws CoreException {
- IMarker marker = file.createMarker(IMarker.TEXT);
- marker.setAttribute(IMarker.LINE_NUMBER, line);
- marker.setAttribute(IMarker.CHAR_START, charStart);
- marker.setAttribute(IMarker.CHAR_END, charEnd);
- return marker;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectFileTypesAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectFileTypesAction.java
deleted file mode 100644
index cc44062e1..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectFileTypesAction.java
+++ /dev/null
@@ -1,157 +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.files.ui.actions;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action for allowing the user to select one or more file types, using the Eclipse
- * dialog for this. The types are from the file editor registry, as specified in the
- * Workbench preferences.
- * <p>
- * To set preselected types, use {@link #setTypes(List)} or {@link #setTypes(String[])}.
- * Or, if you have single string of comma-separated types, call {@link #setTypes(String)}.
- * <p>
- * After running, and checking wasCancelled(), you can query the selected types
- * using one of:
- * <ol>
- * <li>{@link #getTypes()} to retrieve the selected types as a List
- * <li>{@link #getTypesArray()} to retrieve the selected types as a String array
- * <li>{@link #getTypesString()} to retrieve the selected types as a single String of comma-delimited selections
- * <p>
- * Note the types are remembered after running, so a subsequent run will result in the previous types
- * being preselected, assuming you re-use the same instance of this class.
- *
- * @see org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog
- */
-public class SystemSelectFileTypesAction extends SystemBaseDialogAction
-{
- protected List types = new ArrayList();
-
- /**
- * Constructor
- * To set preselected types, use {@link #setTypes(List)} or {@link #setTypes(String[])}.
- * Note the types are remember after running, so a subsequent run will result in the previous types
- * being preselected.
- */
- public SystemSelectFileTypesAction(Shell shell)
- {
- super(SystemFileResources.ACTION_SELECTFILETYPES_LABEL, SystemFileResources.ACTION_SELECTFILETYPES_TOOLTIP, null, shell);
- }
-
- /**
- * Set the current input types as a String array.
- * Each type is a file name extension, without the dot, as in "java" or "class"
- */
- public void setTypes(String[] types)
- {
- this.types = Arrays.asList(types);
- }
- /**
- * Set the current input types as a java.util List, such as ArrayList
- * Each type is a file name extension, without the dot, as in "java" or "class"
- */
- public void setTypes(List types)
- {
- this.types = types;
- }
- /**
- * Set the current input types given a comma-separated list as a single String.
- */
- public void setTypes(String typeString)
- {
- setTypes(RemoteFileFilterString.parseTypes(typeString));
- }
-
- /**
- * Get the selected file types after running the action. Returns an ArrayList
- */
- public List getTypes()
- {
- return types;
- }
- /**
- * Get the selected file types after running the action. Returns a String array
- */
- public String[] getTypesArray()
- {
- String[] typesArray = new String[types.size()];
- Iterator i = types.iterator();
- int idx=0;
- while (i.hasNext())
- typesArray[idx++] = (String)i.next();
- return typesArray;
- }
- /**
- * Get the selected file types as a concatenated list of strings, comma-separated
- */
- public String getTypesString()
- {
- return RemoteFileFilterString.getTypesString(getTypesArray());
- }
-
- /**
- * Return true if the dialog was cancelled by the user.
- * Only valid after calling run().
- */
- public boolean wasCancelled()
- {
- return (getValue() == null);
- }
-
-
- /**
- * Create and return the dialog
- */
- public Dialog createDialog(Shell parent)
- {
- SystemSelectFileTypesDialog dialog =
- new SystemSelectFileTypesDialog(getShell(), types);
- return dialog;
- }
-
- /**
- * Parent abstract method.
- * Called after dialog runs, to retrieve the value from the dialog.
- * Will return null if dialog cancelled.
- */
- public Object getDialogValue(Dialog dlg)
- {
- Object[] result = ((SystemSelectFileTypesDialog)dlg).getResult();
- if (result != null)
- {
- types = new ArrayList(result.length);
- for (int idx = 0; idx < result.length; idx++)
- types.add(result[idx]);
- return types;
- }
- else
- return null;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 8670d97fb..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.java
+++ /dev/null
@@ -1,524 +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.files.ui.actions;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.ISystemAddFileListener;
-import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action for allowing the user to select a remote file.
- * <p>
- * To configure, call these methods:
- * <ul>
- * <li>{@link #setShowNewConnectionPrompt(boolean)}
- * <li>{@link #setHost(IHost) or #setDefaultConnection(SystemConnection)}
- * <li>{@link #setSystemType(String)} or {@link #setSystemTypes(String[])}
- * <li>{@link #setRootFolder(IHost, String)} or {@link #setRootFolder(IRemoteFile)} or {@link #setPreSelection(IRemoteFile)}
- * <li>{@link #setFileTypes(String[])} or {@link #setFileTypes(String)}
- * <li>{@link #setAutoExpandDepth(int)}
- * <li>{@link #setShowPropertySheet(boolean)} or {@link #setShowPropertySheet(boolean,boolean)}
- * <li>{@link #enableAddMode(ISystemAddFileListener)}
- * <li>{@link #setMultipleSelectionMode(boolean)}
- * <li>{@link #setSelectionValidator(IValidatorRemoteSelection)}
- * </ul>
- * <p>
- * Call these methods to configure the text on the dialog
- * <ul>
- * <li>{@link #setDialogTitle(String)}
- * <li>{@link #setMessage(String)}
- * <li>{@link #setSelectionTreeToolTipText(String)}
- * </ul>
- * <p>
- * After running, call these methods to get the output:
- * <ul>
- * <li>{@link #getSelectedFile()} or {@link #getSelectedFiles()}
- * <li>{@link #getSelectedConnection()}
- * </ul>
- */
-public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
-{
- private String[] systemTypes;
- private IHost systemConnection, outputConnection;
- private IHost rootFolderConnection;
- private IRemoteFile preSelection;
- private String rootFolderAbsPath, fileTypes;
- private String message, treeTip, dlgTitle;
- private String addLabel, addToolTipText;
- private int expandDepth = 0;
- private boolean showNewConnectionPrompt = true;
- private boolean restrictFolders = false;
- private boolean showPropertySheet = false;
- private boolean showPropertySheetDetailsButtonInitialState;
- private boolean showPropertySheetDetailsButton = false;
- private boolean multipleSelectionMode = false;
- private boolean onlyConnection = false;
- private boolean allowFolderSelection = true;
- private ISystemAddFileListener addButtonCallback = null;
- private IValidatorRemoteSelection selectionValidator;
- private List viewerFilters = new ArrayList();
-
- /**
- * Constructor that uses default action label and tooltip
- *
- * @param shell The shell to hang the dialog off of
- */
- public SystemSelectRemoteFileAction(Shell shell)
- {
- this(shell, FileResources.ACTION_SELECT_FILE_LABEL, FileResources.ACTION_SELECT_FILE_TOOLTIP);
- }
- /**
- * Constructor when you have your own action label and tooltip
- *
- * @param shell The shell to hang the dialog off of
- * @param label
- * @param tooltip
- */
- public SystemSelectRemoteFileAction(Shell shell, String label, String tooltip)
- {
- super(label, tooltip, null, shell);
- super.setNeedsProgressMonitor(true); // the default is to include a monitor. Caller can override
- }
-
-
- // ------------------------
- // CONFIGURATION METHODS...
- // ------------------------
- /**
- * Set the system connection to restrict the user to seeing in the tree.
- *
- * @see #setRootFolder(IHost, String)
- */
- public void setHost(IHost conn)
- {
- systemConnection = conn;
- onlyConnection = true;
- }
- /**
- * Set the connection to default the selection to
- */
- public void setDefaultConnection(IHost conn)
- {
- systemConnection = conn;
- onlyConnection = false;
- }
-
- /**
- * Set the system types to restrict what connections the user sees, and what types of
- * connections they can create.
- * @param systemTypes An array of system type names
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new String[] {systemType})
- *
- * @param systemType The name of the system type to restrict to
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new String[] {systemType});
- }
-
- /**
- * Set to true if a "New Connection..." special connection is to be shown for creating new connections
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- this.showNewConnectionPrompt = show;
- }
-
- /**
- * Specify the zero-based auto-expand level for the tree. The default is zero, meaning
- * only show the connections.
- */
- public void setAutoExpandDepth(int depth)
- {
- this.expandDepth = depth;
- }
-
- /**
- * Set the root folder from which to start listing files.
- * This version identifies the folder via a connection object and absolute path.
- * There is another overload that identifies the folder via a single IRemoteFile object.
- *
- * @param connection The connection to the remote system containing the root folder
- * @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
- */
- public void setRootFolder(IHost connection, String folderAbsolutePath)
- {
- rootFolderConnection = connection;
- rootFolderAbsPath = folderAbsolutePath;
- }
- /**
- * Set the root folder from which to start listing files.
- * This version identifies the folder via an IRemoteFile object.
- * There is another overload that identifies the folder via a connection and folder path.
- *
- * @param rootFolder The IRemoteFile object representing the remote folder to start the list from
- */
- public void setRootFolder(IRemoteFile rootFolder)
- {
- setRootFolder(rootFolder.getSystemConnection(),rootFolder.getAbsolutePath());
- }
- /**
- * Set a file or folder to preselect. This will:
- * <ul>
- * <li>Set the parent folder as the root folder
- * <li>Pre-expand the parent folder
- * <li>Pre-select the given file or folder after expansion
- * </ul>
- * If there is no parent, then we were given a root. In which case we will
- * <ul>
- * <li>Force setRestrictFolders to false
- * <li>Pre-expand the root drives (Windows) or root files (Unix)
- * <li>Pre-select the given root drive (Windows only)
- * </ul>
- */
- public void setPreSelection(IRemoteFile selection)
- {
- preSelection = selection;
- }
-
- /**
- * For files mode, restrict the files list by an array of file types
- */
- public void setFileTypes(String[] fileTypes)
- {
- if (fileTypes != null)
- this.fileTypes = RemoteFileFilterString.getTypesString(fileTypes);
- else
- this.fileTypes = null;
- }
- /**
- * For files mode, restrict the files list by a comman-delimited array of file types.
- * The last type must also end in a comma. Eg "java, class," or "class,".
- */
- public void setFileTypes(String fileTypes)
- {
- this.fileTypes = fileTypes;
- }
-
- /**
- * Specify whether setRootFolder should prevent the user from being able to see or select
- * any other folder. This causes two effects:
- * <ol>
- * <li>The special filter for root/drives is not shown
- * <li>No subfolders are listed in the root folder
- * </ol>
- */
- public void setRestrictFolders(boolean restrict)
- {
- this.restrictFolders = restrict;
- }
-
- /**
- * Enable Add mode. This means the OK button is replaced with an Add button, and
- * the Cancel with a Close button. When Add is pressed, the caller is called back.
- * The dialog is not exited until Close is pressed.
- * <p>
- * When a library is selected, the caller is called back to decide to enable the Add
- * button or not.
- */
- public void enableAddMode(ISystemAddFileListener caller)
- {
- this.addButtonCallback = caller;
- }
- /**
- * Overloaded method that allows setting the label and tooltip text of the Add button.
- * If you pass null for the label, the default is used ("Add").
- */
- public void enableAddMode(ISystemAddFileListener caller, String addLabel, String addToolTipText)
- {
- enableAddMode(caller);
- this.addLabel = addLabel;
- this.addToolTipText = addToolTipText;
- }
-
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- this.showPropertySheet = show;
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload shows a Details>>> button so the user can decide if they want to see the
- * property sheet.
- * <p>
- * @param show True if to show the property sheet within the dialog
- * @param initialState True if the property is to be initially displayed, false if it is not
- * to be displayed until the user presses the Details button.
- */
- public void setShowPropertySheet(boolean show, boolean initialState)
- {
- setShowPropertySheet(show);
- if (show)
- {
- this.showPropertySheetDetailsButton = true;
- this.showPropertySheetDetailsButtonInitialState = initialState;
- }
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedObjects()
- * method to retrieve the list of selected objects.
- * <p>
- * Further, if you turn this on, it has the side effect of allowing the user
- * to select any remote object. The assumption being if you are prompting for
- * files, you also want to allow the user to select a folder, with the meaning
- * being that all files within the folder are implicitly selected.
- *
- * @see #getSelectedObjects()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- this.multipleSelectionMode = multiple;
- }
- /**
- * Specify a validator to use when the user selects a remote file or folder.
- * This allows you to decide if OK should be enabled or not for that remote file or folder.
- */
- public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
- {
- this.selectionValidator = selectionValidator;
- }
-
-
- // -----------------------------------------------
- // MRI METHODS. THESE ONLY NEED BE
- // CALLED IF YOU WISH TO CHANGE THE DEFAULT MRI...
- // -----------------------------------------------
- /**
- * Set the title for the dialog. The default is "Browse for Folder"
- */
- public void setDialogTitle(String title)
- {
- this.dlgTitle = title;
- }
- /**
- * Set the message shown at the top of the form
- */
- public void setMessage(String message)
- {
- this.message = message;
- }
- /**
- * Set the tooltip text for the remote systems tree from which an item is selected.
- */
- public void setSelectionTreeToolTipText(String tip)
- {
- this.treeTip = tip;
- }
-
-
- // -----------------
- // OUTPUT METHODS...
- // -----------------
-
- /**
- * Retrieve selected file object. If multiple files selected, returns the first.
- */
- public IRemoteFile getSelectedFile()
- {
- Object o = getValue();
- if (o instanceof IRemoteFile[])
- return ((IRemoteFile[])o)[0];
- else if (o instanceof IRemoteFile)
- return (IRemoteFile)o;
- else
- return null;
- }
- /**
- * Retrieve selected file objects. If no files selected, returns an array of zero.
- * If one file selected returns an array of one.
- */
- public IRemoteFile[] getSelectedFiles()
- {
- Object o = getValue();
- if (o instanceof IRemoteFile[])
- return (IRemoteFile[])o;
- else if (o instanceof IRemoteFile)
- return new IRemoteFile[] {(IRemoteFile)o};
- else
- return new IRemoteFile[0];
- }
-
- /**
- * Return all selected objects. This method will return an array of one
- * unless you have called setMultipleSelectionMode(true)!
- * @see #setMultipleSelectionMode(boolean)
- */
- public Object[] getSelectedObjects()
- {
- Object remoteObject = getValue();
- if (remoteObject == null)
- return null;
- else if (remoteObject instanceof Object[])
- return (Object[])remoteObject;
- else if (remoteObject instanceof IRemoteFile[])
- return (Object[])remoteObject;
- else if (remoteObject != null)
- return new Object[] {remoteObject};
- else
- return null;
- }
-
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- // -------------------
- // INTERNAL METHODS...
- // -------------------
-
- /**
- * Called by eclipse when user selects this action
- */
- protected Dialog createDialog(Shell shell)
- {
- SystemSelectRemoteFileOrFolderDialog dlg = null;
- if (dlgTitle == null)
- dlg = new SystemSelectRemoteFileOrFolderDialog(shell, true); // true => file vs folder mode
- else
- dlg = new SystemSelectRemoteFileOrFolderDialog(shell, dlgTitle, true); // true => file vs folder mode
- dlg.setShowNewConnectionPrompt(showNewConnectionPrompt);
- dlg.setMultipleSelectionMode(multipleSelectionMode);
- if (restrictFolders)
- dlg.setRestrictFolders(true);
- if (message != null)
- dlg.setMessage(message);
- if (treeTip != null)
- dlg.setSelectionTreeToolTipText(treeTip);
- if (systemConnection != null)
- {
- if (onlyConnection)
- dlg.setSystemConnection(systemConnection);
- else
- dlg.setDefaultConnection(systemConnection);
- }
- if (systemTypes != null)
- dlg.setSystemTypes(systemTypes);
- if (expandDepth != 0)
- dlg.setAutoExpandDepth(expandDepth);
- if (fileTypes != null)
- dlg.setFileTypes(fileTypes); // must be called before setRootFolder!
- if (preSelection != null)
- dlg.setPreSelection(preSelection);
- else if (rootFolderConnection != null)
- dlg.setRootFolder(rootFolderConnection, rootFolderAbsPath);
- if (showPropertySheet)
- if (showPropertySheetDetailsButton)
- dlg.setShowPropertySheet(true, showPropertySheetDetailsButtonInitialState);
- else
- dlg.setShowPropertySheet(true);
- if (addButtonCallback != null)
- if ((addLabel!=null) || (addToolTipText!=null))
- dlg.enableAddMode(addButtonCallback, addLabel, addToolTipText);
- else
- dlg.enableAddMode(addButtonCallback);
- if (selectionValidator != null)
- dlg.setSelectionValidator(selectionValidator);
-
- if (!allowFolderSelection) {
- dlg.setAllowFolderSelection(allowFolderSelection);
- }
-
- // add viewer filters if any
- if (viewerFilters != null) {
- Iterator iter = viewerFilters.iterator();
-
- while (iter.hasNext()) {
- ViewerFilter filter = (ViewerFilter)(iter.next());
- dlg.addViewerFilter(filter);
- }
- }
-
- return dlg;
- }
-
- /**
- * Required by parent. We return the selected object
- */
- protected Object getDialogValue(Dialog dlg)
- {
- SystemSelectRemoteFileOrFolderDialog ourDlg = (SystemSelectRemoteFileOrFolderDialog)dlg;
- Object outputObject = null;
- outputConnection = null;
- if (!ourDlg.wasCancelled())
- {
- outputConnection = ourDlg.getSelectedConnection();
- if (multipleSelectionMode)
- outputObject = ourDlg.getSelectedObjects();
- else
- outputObject = ourDlg.getSelectedObject();
- }
- return outputObject; // parent class calls setValue on what we return
- }
-
- /**
- * Add viewer filter.
- * @param filter a viewer filter.
- */
- public void addViewerFilter(ViewerFilter filter) {
- viewerFilters.add(filter);
- }
-
- /**
- * Sets whether to allow folder selection. The default selection validator will use this to
- * determine whether the OK button will be enabled when a folder is selected. The default
- * is <code>true</code>.
- * @param allow <code>true</code> to allow folder selection, <code>false</code> otherwise.
- */
- public void setAllowFolderSelection(boolean allow) {
- allowFolderSelection = allow;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 53e224229..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.java
+++ /dev/null
@@ -1,502 +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.files.ui.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.ISystemAddFileListener;
-import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * The action for allowing the user to select a remote folder.
- * <p>
- * To configure the functionality, call these methods:
- * <ul>
- * <li>{@link #setShowNewConnectionPrompt(boolean)}
- * <li>{@link #setHost(IHost) or #setDefaultConnection(SystemConnection)}
- * <li>{@link #setSystemType(String)} or {@link #setSystemTypes(String[])}
- * <li>{@link #setRootFolder(IHost, String)} or {@link #setRootFolder(IRemoteFile)} or {@link #setPreSelection(IRemoteFile)}
- * <li>{@link #setAutoExpandDepth(int)}
- * <li>{@link #setShowPropertySheet(boolean)}
- * <li>{@link #enableAddMode(ISystemAddFileListener)}
- * <li>{@link #setMultipleSelectionMode(boolean)}
- * <li>{@link #setSelectionValidator(IValidatorRemoteSelection)}
- * </ul>
- * <p>
- * To configure the text on the dialog, call these methods:
- * <ul>
- * <li>{@link #setDialogTitle(String)}
- * <li>{@link #setMessage(String)}
- * <li>{@link #setSelectionTreeToolTipText(String)}
- * </ul>
- * <p>
- * After running, call these methods to get the output:
- * <ul>
- * <li>{@link #getSelectedFolder()} or {@link #getSelectedFolders()}
- * <li>{@link #getSelectedConnection()}
- * </ul>
- */
-public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
-{
- private String[] systemTypes;
- private IHost systemConnection, outputConnection;
- private IHost rootFolderConnection;
- private IRemoteFile preSelection;
- private String rootFolderAbsPath;
- private String message, treeTip, dlgTitle;
- private String addLabel, addToolTipText;
- private int expandDepth = 0;
- private boolean showNewConnectionPrompt = true;
- private boolean restrictFolders = false;
- private boolean showPropertySheet = false;
- private boolean showPropertySheetDetailsButtonInitialState;
- private boolean showPropertySheetDetailsButton = false;
- private boolean multipleSelectionMode = false;
- private boolean allowForMultipleParents = false;
- private boolean onlyConnection = false;
- private ISystemAddFileListener addButtonCallback = null;
- private IValidatorRemoteSelection selectionValidator;
-
- /**
- * Constructor that uses default action label and tooltip
- *
- * @param shell The shell to hang the dialog off of
- */
- public SystemSelectRemoteFolderAction(Shell shell)
- {
- this(shell, FileResources.ACTION_SELECT_DIRECTORY_LABEL, FileResources.ACTION_SELECT_DIRECTORY_TOOLTIP);
- }
- /**
- * Constructor when you have your own action label and tooltip
- *
- * @param shell The shell to hang the dialog off of
- * @param label
- * @param tooltip
- */
- public SystemSelectRemoteFolderAction(Shell shell, String label, String tooltip)
- {
- super(label, tooltip, null, shell);
- super.setNeedsProgressMonitor(true); // the default is to include a monitor. Caller can override
- }
-
-
- // ------------------------
- // CONFIGURATION METHODS...
- // ------------------------
- /**
- * Set the title for the dialog. The default is "Browse for Folder"
- */
- public void setDialogTitle(String title)
- {
- this.dlgTitle = title;
- }
-
- /**
- * Set the message shown at the top of the form
- */
- public void setMessage(String message)
- {
- this.message = message;
- }
- /**
- * Set the tooltip text for the remote systems tree from which an item is selected.
- */
- public void setSelectionTreeToolTipText(String tip)
- {
- this.treeTip = tip;
- }
-
- /**
- * Set the system connection to restrict the user to seeing in the tree.
- *
- * @see #setRootFolder(IHost, String)
- */
- public void setHost(IHost conn)
- {
- systemConnection = conn;
- onlyConnection = true;
- }
- /**
- * Set the connection to default the selection to
- */
- public void setDefaultConnection(IHost conn)
- {
- systemConnection = conn;
- onlyConnection = false;
- }
- /**
- * Set the system types to restrict what connections the user sees, and what types of
- * connections they can create.
- * @param systemTypes An array of system type names
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new String[] {systemType})
- *
- * @param systemType The name of the system type to restrict to
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new String[] {systemType});
- }
-
- /**
- * Set to true if a "New Connection..." special connection is to be shown for creating new connections
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- this.showNewConnectionPrompt = show;
- }
- /**
- * Specify the zero-based auto-expand level for the tree. The default is zero, meaning
- * only show the connections.
- */
- public void setAutoExpandDepth(int depth)
- {
- this.expandDepth = depth;
- }
-
- /**
- * Set the root folder from which to start listing files.
- * This version identifies the folder via a connection object and absolute path.
- * There is another overload that identifies the folder via a single IRemoteFile object.
- * <p>
- * This call effectively transforms the select dialog by:
- * <ul>
- * <li>Preventing the user from selecting other connections
- * <li>Preventing the user from selecting other filter strings
- * </ul>
- *
- * @param connection The connection to the remote system containing the root folder
- * @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IHost connection, String folderAbsolutePath)
- {
- rootFolderConnection = connection;
- rootFolderAbsPath = folderAbsolutePath;
- }
- /**
- * Set the root folder from which to start listing folders.
- * This version identifies the folder via an IRemoteFile object.
- * There is another overload that identifies the folder via a connection and folder path.
- * <p>
- * This call effectively transforms the select dialog by:
- * <ul>
- * <li>Preventing the user from selecting other connections
- * <li>Preventing the user from selecting other filter strings
- * </ul>
- *
- * @param rootFolder The IRemoteFile object representing the remote folder to start the list from
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IRemoteFile rootFolder)
- {
- setRootFolder(rootFolder.getSystemConnection(),rootFolder.getAbsolutePath());
- }
- /**
- * Set a file or folder to preselect. This will:
- * <ul>
- * <li>Set the parent folder as the root folder
- * <li>Pre-expand the parent folder
- * <li>Pre-select the given file or folder after expansion
- * </ul>
- * If there is no parent, then we were given a root. In which case we will
- * <ul>
- * <li>Force setRestrictFolders to false
- * <li>Pre-expand the root drives (Windows) or root files (Unix)
- * <li>Pre-select the given root drive (Windows only)
- * </ul>
- */
- public void setPreSelection(IRemoteFile selection)
- {
- preSelection = selection;
- }
-
- /**
- * Specify whether setRootFolder should prevent the user from being able to see or select
- * any other folder. This causes this effect:
- * <ol>
- * <li>The special filter for root/drives is not shown
- * </ol>
- */
- public void setRestrictFolders(boolean restrict)
- {
- restrictFolders = true;
- }
-
- /**
- * Enable Add mode. This means the OK button is replaced with an Add button, and
- * the Cancel with a Close button. When Add is pressed, the caller is called back.
- * The dialog is not exited until Close is pressed.
- * <p>
- * When a library is selected, the caller is called back to decide to enable the Add
- * button or not.
- */
- public void enableAddMode(ISystemAddFileListener caller)
- {
- this.addButtonCallback = caller;
- }
- /**
- * Overloaded method that allows setting the label and tooltip text of the Add button.
- * If you pass null for the label, the default is used ("Add").
- */
- public void enableAddMode(ISystemAddFileListener caller, String addLabel, String addToolTipText)
- {
- enableAddMode(caller);
- this.addLabel = addLabel;
- this.addToolTipText = addToolTipText;
- }
-
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- this.showPropertySheet = show;
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload shows a Details>>> button so the user can decide if they want to see the
- * property sheet.
- * <p>
- * @param show True if to show the property sheet within the dialog
- * @param initialState True if the property is to be initially displayed, false if it is not
- * to be displayed until the user presses the Details button.
- */
- public void setShowPropertySheet(boolean show, boolean initialState)
- {
- setShowPropertySheet(show);
- if (show)
- {
- this.showPropertySheetDetailsButton = true;
- this.showPropertySheetDetailsButtonInitialState = initialState;
- }
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedObjects()
- * method to retrieve the list of selected objects.
- *
- * @see #getSelectedObjects()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- this.multipleSelectionMode = multiple;
- }
-
- /*
- * Indicates whether to allow selection of objects from differnet parents
- */
- public void setAllowForMultipleParents(boolean multiple)
- {
- this.allowForMultipleParents = multiple;
- }
-
- /**
- * Specify a validator to use when the user selects a remote file or folder.
- * This allows you to decide if OK should be enabled or not for that remote file or folder.
- */
- public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
- {
- this.selectionValidator = selectionValidator;
- }
-
- // -----------------
- // OUTPUT METHODS...
- // -----------------
-
-
- /**
- * Retrieve selected folder object. If multiple folders selected, returns the first.
- */
- public IRemoteFile getSelectedFolder()
- {
- Object o = getValue();
- if (o instanceof IRemoteFile[])
- return ((IRemoteFile[])o)[0];
- else if (o instanceof IRemoteFile)
- return (IRemoteFile)o;
- else
- return null;
- }
- /**
- * Retrieve selected folder objects. If no folders selected, returns an array of zero.
- * If one folder selected returns an array of one.
- */
- public IRemoteFile[] getSelectedFolders()
- {
- Object o = getValue();
- if (o instanceof Object[]) {
-
- Object[] temp = (Object[])o;
-
- IRemoteFile[] files = new IRemoteFile[temp.length];
-
- // ensure all objects are IRemoteFiles
- for (int i = 0; i < temp.length; i++) {
-
- if (temp[i] instanceof IRemoteFile) {
- files[i] = (IRemoteFile)temp[i];
- }
- // should never happen
- else {
- return new IRemoteFile[0];
- }
- }
-
- return files;
- }
- if (o instanceof IRemoteFile[])
- return (IRemoteFile[])o;
- else if (o instanceof IRemoteFile)
- return new IRemoteFile[] {(IRemoteFile)o};
- else
- return new IRemoteFile[0];
- }
-
- /**
- * Return all selected objects. This method will return an array of one
- * unless you have called setMultipleSelectionMode(true)!
- * <p>
- * It will always return null if the user cancelled the dialog.
- *
- * @see #setMultipleSelectionMode(boolean)
- */
- public Object[] getSelectedObjects()
- {
- Object remoteObject = getValue();
- if (remoteObject == null)
- return null;
- else if (remoteObject instanceof Object[])
- return (Object[])remoteObject;
- else if (remoteObject instanceof IRemoteFile[])
- return (Object[])remoteObject;
- else if (remoteObject != null)
- return new Object[] {remoteObject};
- else
- return null;
- }
-
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- // -------------------
- // INTERNAL METHODS...
- // -------------------
-
- /**
- * Called by eclipse when user selects this action
- */
- protected Dialog createDialog(Shell shell)
- {
- SystemSelectRemoteFileOrFolderDialog dlg = null;
- if (dlgTitle == null)
- dlg = new SystemSelectRemoteFileOrFolderDialog(shell, false); // false => folder vs file mode
- else
- dlg = new SystemSelectRemoteFileOrFolderDialog(shell, dlgTitle, false); // false => folder vs file mode
- dlg.setShowNewConnectionPrompt(showNewConnectionPrompt);
- dlg.setMultipleSelectionMode(multipleSelectionMode);
- dlg.setAllowForMultipleParents(allowForMultipleParents);
- if (restrictFolders)
- dlg.setRestrictFolders(true);
- if (message != null)
- dlg.setMessage(message);
- if (treeTip != null)
- dlg.setSelectionTreeToolTipText(treeTip);
- if (systemConnection != null)
- {
- if (onlyConnection)
- dlg.setSystemConnection(systemConnection);
- else
- dlg.setDefaultConnection(systemConnection);
- }
- if (systemTypes != null)
- dlg.setSystemTypes(systemTypes);
- if (expandDepth != 0)
- dlg.setAutoExpandDepth(expandDepth);
- if (preSelection != null)
- dlg.setPreSelection(preSelection);
- else if (rootFolderConnection != null)
- dlg.setRootFolder(rootFolderConnection, rootFolderAbsPath);
- if (showPropertySheet)
- if (showPropertySheetDetailsButton)
- dlg.setShowPropertySheet(true, showPropertySheetDetailsButtonInitialState);
- else
- dlg.setShowPropertySheet(true);
- if (addButtonCallback != null)
- if ((addLabel!=null) || (addToolTipText!=null))
- dlg.enableAddMode(addButtonCallback, addLabel, addToolTipText);
- else
- dlg.enableAddMode(addButtonCallback);
- if (selectionValidator != null)
- dlg.setSelectionValidator(selectionValidator);
-
- return dlg;
- }
-
- /**
- * Required by parent. We return the selected object
- */
- protected Object getDialogValue(Dialog dlg)
- {
- SystemSelectRemoteFileOrFolderDialog ourDlg = (SystemSelectRemoteFileOrFolderDialog)dlg;
- Object outputObject = null;
- outputConnection = null;
- if (!ourDlg.wasCancelled())
- {
- if (multipleSelectionMode)
- outputObject = ourDlg.getSelectedObjects();
- else
- outputObject = ourDlg.getSelectedObject();
- outputConnection = ourDlg.getSelectedConnection();
- }
- return outputObject; // parent class calls setValue on what we return
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 4d44b90f0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java
+++ /dev/null
@@ -1,595 +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.files.ui.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.core.subsystems.SubSystem.SystemMessageDialogRunnable;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.resources.ISaveAsDialog;
-import org.eclipse.rse.files.ui.resources.SaveAsDialog;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-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.SystemResources;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-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.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.part.FileEditorInput;
-
-
-/**
- * This is the default action used to handle upload conflicts
- */
-public class SystemUploadConflictAction extends SystemBaseAction implements Runnable
-{
- private class BackgroundSaveasJob extends Job
- {
- private IRemoteFile _saveasFile;
- public BackgroundSaveasJob(IRemoteFile saveasFile)
- {
- super("Save as"); // need to externalize
- _saveasFile = saveasFile;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- if (_saveasFile != null)
- {
- IRemoteFileSubSystem fs = _saveasFile.getParentRemoteFileSubSystem();
- try
- {
- if (!_saveasFile.exists())
- {
- _saveasFile = fs.createFile(_saveasFile);
- }
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
- SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
- SystemMessageDialogRunnable runnable = ((SubSystem)fs).new SystemMessageDialogRunnable(dialog);
- Display.getDefault().asyncExec(runnable);
- }
-
- try
- {
- // copy temp file to remote system
- fs.uploadUTF8(_tempFile, _saveasFile, monitor);
-
- // set original time stamp to 0 so that file will be overwritten next download
- SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
- properties.setRemoteFileTimeStamp(0);
- properties.setDirty(false);
- }
- catch (SystemMessageException e)
- {
- //e.printStackTrace();
- }
-
- ReopenAction reopen = new ReopenAction(_tempFile, _saveasFile);
-
- Display.getDefault().asyncExec(reopen);
- }
- return Status.OK_STATUS;
- }
- }
-
- private class BackgroundDownloadJob extends Job
- {
- public BackgroundDownloadJob()
- {
- super("Download"); // need to externalize
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- try
- {
- IRemoteFileSubSystem fs = _remoteFile.getParentRemoteFileSubSystem();
- SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
-
- // download remote version
- fs.downloadUTF8(_remoteFile, _tempFile, monitor);
-
- properties.setRemoteFileTimeStamp(_remoteFile.getLastModified());
- //properties.setRemoteFileTimeStamp(-1);
-
- properties.setDirty(false);
- properties.setUsedBinaryTransfer(_remoteFile.isBinary());
- }
- catch (RemoteFileSecurityException e)
- {
- e.printStackTrace();
- }
- catch (RemoteFileIOException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return Status.OK_STATUS;
- }
- }
-
- private class BackgroundUploadJob extends Job
- {
-
- public BackgroundUploadJob()
- {
- super("Upload"); // need to externalize
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- // user wants to keep the local version
- // and user wants to overwrite the remote file with pending changes
- try
- {
- IRemoteFileSubSystem fs = _remoteFile.getParentRemoteFileSubSystem();
- SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
- fs.uploadUTF8(_tempFile, _remoteFile, monitor);
- _remoteFile.markStale(true);
- _remoteFile = fs.getRemoteFileObject(_remoteFile.getAbsolutePath());
- properties.setRemoteFileTimeStamp(_remoteFile.getLastModified());
- properties.setDirty(false);
- }
- catch (RemoteFileSecurityException e)
- {
- }
- catch (RemoteFileIOException e)
- {
- }
- catch (Exception e)
- {
- }
- return Status.OK_STATUS;
- }
- }
-
- /**
- * This is the default dialog used to handle upload conflicts
- */
- private class UploadConflictDialog extends SystemPromptDialog implements SelectionListener
- {
- private Button _overwriteLocalButton;
- private Button _overwriteRemoteButton;
- private Button _saveasButton;
- private Button _browseButton;
- private Text _saveasFileEntry;
-
- private boolean _overwriteLocal;
- private boolean _overwriteRemote;
- private boolean _saveas;
-
- private SystemMessage _errorMessage;
-
- private IRemoteFile _saveasLocation;
-
- /**
- * Constructor.
- * @param shell the parent shell of the dialog
- */
- public UploadConflictDialog(Shell shell)
- {
- super(shell, FileResources.RESID_CONFLICT_SAVE_TITLE);
- //pack();
- }
-
- /**
- * Called when a button is pressed in the dialog
- */
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
- _overwriteLocal = _overwriteLocalButton.getSelection();
- _overwriteRemote = _overwriteRemoteButton.getSelection();
- _saveas = _saveasButton.getSelection();
- close();
- }
-
- /**
- * Returns whether the user decided to overwrite the local file
- * @return whether the user decided to overwrite the local file
- */
- public boolean getOverwriteLocal()
- {
- return _overwriteLocal;
- }
-
- /**
- * Returns whether the user decided to overwrite the remote file
- * @return whether the user decided to overwrite the remote file
- */
- public boolean getOverwriteRemote()
- {
- return _overwriteRemote;
- }
-
- /**
- * Returns whether the user decided to save to a different location
- * @return whether the user decided to save to a different location
- */
- public boolean getSaveas()
- {
- return _saveas;
- }
-
- /**
- * Returns the location where the cached file should be saved to
- * @return the location where the cached file should be saved to
- */
- public IRemoteFile getSaveasLocation()
- {
- return _saveasLocation;
- }
-
- /**
- * Creates the dialog contents.
- */
- public Control createInner(Composite parent)
- {
- Image image = getShell().getDisplay().getSystemImage(SWT.ICON_QUESTION);
-
- Composite c = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- c.setLayout(layout);
- c.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Composite m = new Composite(c, SWT.NONE);
-
- GridLayout mlayout = new GridLayout();
- mlayout.numColumns = 2;
- m.setLayout(mlayout);
- m.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label = new Label(m, 0);
- image.setBackground(label.getBackground());
- label.setImage(image);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING));
-
- Text text = new Text(m, SWT.WRAP | SWT.MULTI);
- text.setEditable(false);
- text.setText(FileResources.RESID_CONFLICT_SAVE_MESSAGE);
-
- GridData textData = new GridData(GridData.FILL_BOTH);
- textData.widthHint = 100;
- textData.horizontalSpan = 2;
- textData.verticalSpan = 5;
-
- Composite options = new Composite(c, SWT.NONE);
- GridLayout olayout = new GridLayout();
- olayout.numColumns = 1;
- options.setLayout(olayout);
- options.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- _overwriteLocalButton = new Button(options, SWT.RADIO);
- _overwriteLocalButton.setText(FileResources.RESID_CONFLICT_SAVE_REPLACELOCAL);
- _overwriteLocalButton.addSelectionListener(this);
- _overwriteLocalButton.setSelection(true);
-
- _overwriteRemoteButton = new Button(options, SWT.RADIO);
- _overwriteRemoteButton.setText(FileResources.RESID_CONFLICT_SAVE_OVERWRITEREMOTE);
- _overwriteRemoteButton.addSelectionListener(this);
-
- _saveasButton = new Button(options, SWT.RADIO);
- _saveasButton.setText(FileResources.RESID_CONFLICT_SAVE_SAVETODIFFERENT);
- _saveasButton.addSelectionListener(this);
-
- Composite s = new Composite(options, SWT.NONE);
- GridLayout slayout = new GridLayout();
- slayout.numColumns = 2;
- s.setLayout(slayout);
- s.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- _saveasFileEntry = new Text(s, SWT.BORDER);
- _saveasFileEntry.setEnabled(false);
-
- GridData fileEntryData = new GridData(GridData.FILL_BOTH);
- fileEntryData.widthHint = 100;
- _saveasFileEntry.setLayoutData(fileEntryData);
- _saveasFileEntry.setEditable(false);
-
- _browseButton = new Button(s, SWT.PUSH);
- _browseButton.setText(SystemResources.BUTTON_BROWSE);
- _browseButton.addSelectionListener(this);
- _browseButton.setEnabled(false);
-
- setHelp();
-
- return c;
- }
-
- /**
- * Called when a widget is selected
- */
- public void widgetSelected(SelectionEvent e)
- {
- if (_saveasButton.getSelection())
- {
- _browseButton.setEnabled(true);
- _saveasFileEntry.setEnabled(true);
- if (_saveasLocation != null)
- {
- _errorMessage = null;
- setErrorMessage(_errorMessage);
- enableOkButton(true);
- }
- else
- {
- enableOkButton(false);
- _errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY);
- setErrorMessage(_errorMessage);
- }
- }
- else
- {
- _browseButton.setEnabled(false);
- _saveasFileEntry.setEnabled(false);
- enableOkButton(true);
- _errorMessage = null;
- setErrorMessage(_errorMessage);
- }
-
- if (e.getSource() == _browseButton)
- {
-
- ISaveAsDialog dlg = SaveAsDialog.getSaveAsDialog(getShell());
- dlg.setMultipleSelectionMode(false);
-
- if (_remoteFile != null)
- {
- dlg.setPreSelection(_remoteFile);
-
- if (dlg.open() == OK)
- {
- Object output = dlg.getOutputObject();
- if (output instanceof IRemoteFile)
- {
- IRemoteFile toCreate = (IRemoteFile) output;
- // validate
- try
- {
- _errorMessage = null;
- _saveasLocation = toCreate;
- _saveasFileEntry.setText(toCreate.getAbsolutePath());
-
- enableOkButton(_errorMessage == null);
-
- setErrorMessage(_errorMessage);
- }
- catch (Exception ex)
- {
- }
- }
- }
- }
- }
-
- }
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
-
- /**
- * Returns the initial focus control
- * @return the initial focus control
- */
- protected Control getInitialFocusControl()
- {
- enableOkButton(true);
- return _overwriteLocalButton;
- }
-
- private void setHelp()
- {
- setHelp(RSEUIPlugin.HELPPREFIX + "scdl0000"); //$NON-NLS-1$
- }
- }
-
- /**
- * Action used to close a specified editor
- */
- public class CloseEditorAction implements Runnable
- {
- public IEditorPart _editor;
-
- public CloseEditorAction(IEditorPart editor)
- {
- _editor = editor;
- }
-
- public void run()
- {
- // close old editor
- SystemBasePlugin.getActiveWorkbenchWindow().getActivePage().closeEditor(_editor, false);
- }
- }
-
- /**
- * Action used to reopen the editor for a cached file with a remote file from a different location
- */
- public class ReopenAction implements Runnable
- {
- private IRemoteFile _saveasFile;
-
- public ReopenAction(IFile tempFile, IRemoteFile saveasFile)
- {
- _saveasFile = saveasFile;
- }
-
- private IEditorPart getEditorFor(IFile tempFile)
- {
-
- IWorkbenchWindow window = SystemBasePlugin.getActiveWorkbenchWindow();
- if (window != null)
- {
- IWorkbenchPage page = window.getActivePage();
- if (page != null)
- {
- IEditorPart editor = page.getActiveEditor();
- IEditorInput input = editor.getEditorInput();
- if (input instanceof FileEditorInput)
- {
- FileEditorInput finput = (FileEditorInput) input;
- if (finput.getFile().getFullPath().equals(tempFile.getFullPath()))
- {
- return editor;
- }
- }
- }
- }
-
- return null;
- }
-
- public void run()
- {
- try
- {
- _saveasFile = _saveasFile.getParentRemoteFileSubSystem().getRemoteFileObject(_saveasFile.getAbsolutePath());
- RSEUIPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_saveasFile.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH, null));
-
- }
- catch (SystemMessageException e)
- {
- e.printStackTrace();
- }
-
- // close editor
- IEditorPart editor = getEditorFor(_tempFile);
- if (editor != null)
- {
- String id = editor.getEditorSite().getId();
-
- // open editor on new file
- SystemEditableRemoteFile edit = new SystemEditableRemoteFile(_saveasFile, id);
- try
- {
- edit.download(getShell());
- edit.addAsListener();
- edit.setLocalResourceProperties();
-
- // open new editor
- edit.openEditor();
-
- // close old editor
- CloseEditorAction closeAction = new CloseEditorAction(editor);
- Display.getDefault().asyncExec(closeAction);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
-
- private IFile _tempFile;
- private IRemoteFile _remoteFile;
-
- /**
- * Constructor.
- * @param shell the parent shell of the action
- * @param tempFile the cached local file that is in conflict with the remote file
- * @param remoteFile the remote file
- * @param remoteNewer indicates whether the remote file has changed since it was last downloaded
- */
- public SystemUploadConflictAction(Shell shell, IFile tempFile, IRemoteFile remoteFile, boolean remoteNewer)
- {
- super(FileResources.RESID_CONFLICT_SAVE_TITLE, shell);
- _tempFile = tempFile;
- _remoteFile = remoteFile;
- }
-
- /**
- * Called when this action is invoked
- */
- public void run()
- {
- SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
-
- UploadConflictDialog cnfDialog = new UploadConflictDialog(SystemBasePlugin.getActiveWorkbenchShell());
- if (cnfDialog.open() == Window.OK)
- {
- // does user want to open local or replace local with remote?
- if (cnfDialog.getOverwriteRemote())
- {
- // user wants to keep the local version
- // and user wants to overwrite the remote file with pending changes
- BackgroundUploadJob ujob = new BackgroundUploadJob();
- ujob.schedule();
- }
- else if (cnfDialog.getOverwriteLocal())
- {
- // user wants to replace local copy with the remote version
- BackgroundDownloadJob djob = new BackgroundDownloadJob();
- djob.schedule();
- }
- else if (cnfDialog.getSaveas())
- {
- IRemoteFile remoteFile = cnfDialog.getSaveasLocation();
- BackgroundSaveasJob sjob = new BackgroundSaveasJob(remoteFile);
- sjob.schedule();
- }
- }
- else
- {
- // cancelled dialog, so no remote synchronization
- // set dirty flag!
- properties.setDirty(true);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java
deleted file mode 100644
index 1d47aaade..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java
+++ /dev/null
@@ -1,250 +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.files.ui.compare;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.ZipFileStructureCreator;
-import org.eclipse.compare.internal.BufferedResourceNode;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.DiffTreeViewer;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.widgets.Composite;
-
-
-
-public class SystemCompareInput extends CompareEditorInput
-{
-
- private static final boolean NORMALIZE_CASE = true;
- private Object fRoot;
-
- class MyDiffNode extends DiffNode
- {
- private boolean fDirty = false;
- private ITypedElement fLastId;
- private String fLastName;
-
- public MyDiffNode(IDiffContainer parent, int description, ITypedElement ancestor, ITypedElement left, ITypedElement right)
- {
- super(parent, description, ancestor, left, right);
- }
-
- public void fireChange()
- {
- super.fireChange();
- setDirty(true);
- fDirty = true;
- if (_diffViewer != null)
- _diffViewer.refresh(this);
- }
-
- void clearDirty()
- {
- fDirty = false;
- }
-
- public String getName()
- {
- if (fLastName == null)
- fLastName = super.getName();
- if (fDirty)
- return '<' + fLastName + '>';
- return fLastName;
- }
-
- public ITypedElement getId()
- {
- ITypedElement id = super.getId();
- if (id == null)
- return fLastId;
- fLastId = id;
- return id;
- }
- }
-
- private List _remoteEditables;
- private DiffTreeViewer _diffViewer;
- private IResource _leftResource;
- private IResource _rightResource;
-
- public SystemCompareInput(CompareConfiguration configuration)
- {
- super(configuration);
- _remoteEditables = new ArrayList();
- }
-
- /**
- * Creates a <code>IStructureComparator</code> for the given input.
- * Returns <code>null</code> if no <code>IStructureComparator</code>
- * can be found for the <code>IResource</code>.
- */
- private IStructureComparator getStructure(IResource input)
- {
- if (input instanceof IContainer)
- return new BufferedResourceNode(input);
-
- if (input instanceof IFile)
- {
- IStructureComparator rn = new BufferedResourceNode(input);
- IFile file = (IFile) input;
- String type = normalizeCase(file.getFileExtension());
- if ("JAR".equals(type) || "ZIP".equals(type)) //$NON-NLS-2$ //$NON-NLS-1$
- return new ZipFileStructureCreator().getStructure(rn);
- return rn;
- }
- return null;
- }
-
- private String normalizeCase(String s)
- {
- if (NORMALIZE_CASE && s != null)
- return s.toUpperCase();
- return s;
- }
-
- public IResource getLeftResource()
- {
- return _leftResource;
- }
-
- public IResource getRightResource()
- {
- return _rightResource;
- }
-
- public Object prepareInput(IProgressMonitor monitor)
- {
- ISystemEditableRemoteObject ef1 = (ISystemEditableRemoteObject)_remoteEditables.get(0);
- ISystemEditableRemoteObject ef2 = (ISystemEditableRemoteObject)_remoteEditables.get(1);
-
- try
- {
- ef1.download(monitor);
- ef2.download(monitor);
- ef1.addAsListener();
- ef2.addAsListener();
- ef1.setLocalResourceProperties();
- ef2.setLocalResourceProperties();
-
- _leftResource = ef1.getLocalResource();
- _rightResource = ef2.getLocalResource();
-
- String title;
- String format = Utilities.getString("ResourceCompare.twoWay.title"); //$NON-NLS-1$
- title = MessageFormat.format(format, new String[] {_leftResource.getName(), _rightResource.getName()});
- setTitle(title);
- }
- catch (Exception e)
- {
- }
-
- IStructureComparator c1 = getStructure(_leftResource);
- IStructureComparator c2 = getStructure(_rightResource);
-
- Differencer d = new Differencer()
- {
- protected Object visit(Object parent, int description, Object ancestor, Object left, Object right)
- {
- return new MyDiffNode((IDiffContainer) parent, description, (ITypedElement) ancestor, (ITypedElement) left, (ITypedElement) right);
- }
- };
-
- fRoot = d.findDifferences(false, monitor, null, null, c1, c2);
- return fRoot;
- }
-
- public Viewer createDiffViewer(Composite parent)
- {
- _diffViewer = new DiffTreeViewer(parent, getCompareConfiguration())
- {
- protected void fillContextMenu(IMenuManager manager)
- {
- super.fillContextMenu(manager);
- }
- };
- return _diffViewer;
- }
-
- public void addRemoteEditable(ISystemEditableRemoteObject file)
- {
- _remoteEditables.add(file);
- }
-
- public void saveChanges(IProgressMonitor pm) throws CoreException
- {
- super.saveChanges(pm);
- if (fRoot instanceof DiffNode)
- {
- try
- {
- commit(pm, (DiffNode) fRoot);
- }
- finally
- {
- if (_diffViewer != null)
- _diffViewer.refresh();
- setDirty(false);
- }
- }
-
- }
-
- /*
- * Recursively walks the diff tree and commits all changes.
- */
- private void commit(IProgressMonitor pm, DiffNode node) throws CoreException
- {
- if (node instanceof MyDiffNode)
- ((MyDiffNode) node).clearDirty();
-
- ITypedElement left = node.getLeft();
- if (left instanceof BufferedResourceNode)
- ((BufferedResourceNode) left).commit(pm);
-
- ITypedElement right = node.getRight();
- if (right instanceof BufferedResourceNode)
- ((BufferedResourceNode) right).commit(pm);
-
- IDiffElement[] children = node.getChildren();
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- IDiffElement element = children[i];
- if (element instanceof DiffNode)
- commit(pm, (DiffNode) element);
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemEnterOrSelectRemoteFileDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemEnterOrSelectRemoteFileDialog.java
deleted file mode 100644
index 8ce606399..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemEnterOrSelectRemoteFileDialog.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.rse.files.ui.widgets.SystemEnterOrSelectRemoteFileForm;
-import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * A dialog for either selecting or entering a file name.
- * Use {@link #getRemotePath()} to get the absolute remote path of what the user selected or entered.
- * Note that if the user enters a file name, then the output object will be its parent folder, since
- * the file with that name may not exist.
- */
-public class SystemEnterOrSelectRemoteFileDialog extends SystemSelectRemoteFileOrFolderDialog {
-
- private SystemEnterOrSelectRemoteFileForm form;
-
- /**
- * Creates the dialog with the parent shell.
- * @param shell the parent shell.
- */
- public SystemEnterOrSelectRemoteFileDialog(Shell shell) {
- super(shell, true);
- setMultipleSelectionMode(false);
- }
-
- /**
- * Creates a dialog under the parent shell with the given title.
- * @param shell the parent shell.
- * @param title the title for the dialog.
- */
- public SystemEnterOrSelectRemoteFileDialog(Shell shell, String title) {
- super(shell, title, true);
- setMultipleSelectionMode(false);
- }
-
- /**
- * Always returns false.
- * @see org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog#getMultipleSelectionMode()
- */
- public boolean getMultipleSelectionMode() {
- return false;
- }
-
- /**
- * Has no effect. Multiple selection mode is not allowed.
- * @see org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog#setMultipleSelectionMode(boolean)
- */
- public void setMultipleSelectionMode(boolean multiple) {
- super.setMultipleSelectionMode(false);
- }
-
- /**
- * Creates the select or enter file form. Sets the verbage of the form.
- * @see org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog#getForm(boolean)
- */
- protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode) {
- form = new SystemEnterOrSelectRemoteFileForm(getMessageLine(), this, fileMode);
- form.setMessage(SystemFileResources.RESID_ENTER_OR_SELECT_FILE_VERBAGE_LABEL);
- setOutputObject(null);
- return form;
- }
-
- /**
- * Returns the remote path.
- * @return the remote path.
- */
- public String getRemotePath() {
- IRemoteFile file = (IRemoteFile)getOutputObject();
-
- String absPath = file.getAbsolutePath();
-
- // if the output is a file, then return the absolute path.
- if (file.isFile()) {
- return absPath;
- }
- // if the output is a folder, then file name is available in the text field
- // of the form, so append the file name to the folder path
- else {
- String fileName = form.getFileName();
- String sep = file.getSeparator();
-
- // add separator if necessary
- if (!absPath.endsWith(sep)) {
- absPath += sep;
- }
-
- // add file name if necessary
- absPath += fileName;
-
- return absPath;
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index de79f4b21..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemPromptForHomeFolderDialog.java
+++ /dev/null
@@ -1,130 +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.files.ui.dialogs;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.widgets.SystemRemoteFolderCombo;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog for prompting the user for his home folder. This is called once when
- * the user first expands his default "/home/username" filter string.
- * <p>NOT USED YET</p>
- */
-public class SystemPromptForHomeFolderDialog
- extends SystemPromptDialog
- implements SelectionListener
-{
- private IHost connection;
- private ISubSystem subsystem;
- private SystemRemoteFolderCombo folderCombo = null;
-
- /**
- * Constructor
- */
- public SystemPromptForHomeFolderDialog(Shell shell, ISystemFilter filter)
- {
- super(shell, SystemFileResources.RESID_HOMEPROMPT_TITLE);
- setBlockOnOpen(true); // always modal
- subsystem = (ISubSystem)filter.getProvider();
- connection = subsystem.getHost();
- //pack();
- }
-
- /**
- * Return initial control to be given focus
- */
- protected Control getInitialFocusControl()
- {
- return folderCombo.getFolderCombo();
- }
-
- /**
- * Create and populate dialog area
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int gridColumns = 1;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, gridColumns);
-
- // verbiage
- boolean wantBorder = false;
- int span = 1;
- int widthHint = 200;
- SystemWidgetHelpers.createVerbiage(composite_prompts, SystemFileResources.RESID_HOMEPROMPT_TITLE, span, wantBorder, widthHint);
-
- // connection\folder prompt
- boolean readOnly = false;
- folderCombo = new SystemRemoteFolderCombo(composite_prompts, SWT.BORDER, null, readOnly);
- folderCombo.setSystemConnection(connection);
- folderCombo.setText("/home/"+connection.getDefaultUserId()); //$NON-NLS-1$
-
- // listen for selections
- //folderCombo.addSelectionListener(this);
-
- return composite_prompts;
- }
-
- /**
- * From SelectionListener interface
- */
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
-
- /**
- * From SelectionListener interface.
- * Called when user selects new item in dropdown
- */
- public void widgetSelected(SelectionEvent event)
- {
- Object src = event.getSource();
- Combo comboWidget = folderCombo.getCombo();
- if (src == comboWidget)
- {
- //clearErrorMessage();
- //clearMessage();
- //String selectedFolder = folderCombo.getText();
- }
- }
-
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- boolean ok = true;
- return ok;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteArchiveDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteArchiveDialog.java
deleted file mode 100644
index 9af974d55..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteArchiveDialog.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.view.SystemActionViewerFilter;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemRemoteArchiveDialog extends SystemRemoteFileDialog
-{
- private SystemActionViewerFilter _filter;
-
- public SystemRemoteArchiveDialog(Shell shell, String title, IHost defaultConnection)
- {
- super(shell, title, defaultConnection);
- }
-
- public SystemRemoteArchiveDialog(Shell shell, String title)
- {
- super(shell, title);
-
- }
-
- public SystemRemoteArchiveDialog(Shell shell)
- {
- super(shell, SystemFileResources.RESID_SELECTFILE_TITLE);
-
- }
-
- public SystemActionViewerFilter getViewerFilter()
- {
- if (_filter== null)
- {
- _filter = new SystemActionViewerFilter();
- Class[] types = {IRemoteFile.class};
- _filter.addFilterCriterion(types, "isDirectory", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- _filter.addFilterCriterion(types, "isArchive", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return _filter;
- }
-
-
- public String getVerbage()
- {
- return SystemFileResources.RESID_SELECTFILE_VERBAGE;
- }
-
- public String getTreeTip()
- {
- return SystemFileResources.RESID_SELECTFILE_SELECT_TOOLTIP;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java
deleted file mode 100644
index 4993d7fd5..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog;
-import org.eclipse.rse.ui.view.SystemActionViewerFilter;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemRemoteFileDialog extends SystemRemoteResourceDialog
-{
- public SystemRemoteFileDialog(Shell shell, String title, IHost defaultConnection)
- {
- super(shell, title, new SystemRemoteFileSelectionInputProvider(defaultConnection));
- }
-
- public SystemRemoteFileDialog(Shell shell, String title)
- {
- super(shell, title, new SystemRemoteFileSelectionInputProvider());
- }
-
- public SystemRemoteFileDialog(Shell shell)
- {
- super(shell, SystemFileResources.RESID_SELECTFILE_TITLE, new SystemRemoteFileSelectionInputProvider());
- }
-
-
- public String getVerbage()
- {
- return SystemFileResources.RESID_SELECTFILE_VERBAGE;
- }
-
- public String getTreeTip()
- {
- return SystemFileResources.RESID_SELECTFILE_SELECT_TOOLTIP;
- }
-
- public SystemActionViewerFilter getViewerFilter()
- {
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java
deleted file mode 100644
index 718d49c20..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider;
-
-
-public class SystemRemoteFileSelectionInputProvider extends
- SystemResourceSelectionInputProvider
-{
-
- public SystemRemoteFileSelectionInputProvider(IHost connection)
- {
- super(connection);
- setCategory("files"); //$NON-NLS-1$
- }
-
- public SystemRemoteFileSelectionInputProvider()
- {
- super();
- setCategory("files"); //$NON-NLS-1$
- }
-
- protected ISubSystem getSubSystem(IHost selectedConnection)
- {
- return RemoteFileUtility.getFileSubSystem(selectedConnection);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFolderDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFolderDialog.java
deleted file mode 100644
index 0a96eaf00..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFolderDialog.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.view.SystemActionViewerFilter;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemRemoteFolderDialog extends SystemRemoteFileDialog
-{
- private SystemActionViewerFilter _filter;
-
- public SystemRemoteFolderDialog(Shell shell, String title, IHost defaultConnection)
- {
- super(shell, title, defaultConnection);
- }
-
- public SystemRemoteFolderDialog(Shell shell, String title)
- {
- super(shell, title);
-
- }
-
- public SystemRemoteFolderDialog(Shell shell)
- {
- super(shell, SystemFileResources.RESID_SELECTDIRECTORY_TITLE);
-
- }
-
- public SystemActionViewerFilter getViewerFilter()
- {
- if (_filter== null)
- {
- _filter = new SystemActionViewerFilter();
- Class[] types = {IRemoteFile.class};
- _filter.addFilterCriterion(types, "isDirectory", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return _filter;
- }
-
-
- public String getVerbage()
- {
- return SystemFileResources.RESID_SELECTDIRECTORY_VERBAGE;
- }
-
- public String getTreeTip()
- {
- return SystemFileResources.RESID_SELECTDIRECTORY_SELECT_TOOLTIP;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 7e4f4032b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java
+++ /dev/null
@@ -1,561 +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.files.ui.dialogs;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.ISystemAddFileListener;
-import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.rse.ui.view.SystemViewForm;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog for allowing users to select a remote file or folder. This is a thin dialog wrapper on top of
- * the SystemSelectRemoteFileOrFolderForm widget, which you could optionally imbed directly into your own
- * dialog or wizard page.
- * <p>
- * Call these methods to configure the functionality of the dialog
- * <ul>
- * <li>{@link #setSystemConnection(IHost) or #setDefaultConnection(SystemConnection)}
- * <li>{@link #setShowNewConnectionPrompt(boolean)}
- * <li>{@link #setSystemTypes(String[])}
- * <li>{@link #setAutoExpandDepth(int)}
- * <li>{@link #setRootFolder(IHost, String)} or {@link #setRootFolder(IRemoteFile)} or {@link #setPreSelection(IRemoteFile)}
- * <li>{@link #setFileTypes(String[])} or {@link #setFileTypes(String)}
- * <li>{@link #setShowPropertySheet(boolean)}
- * <li>{@link #enableAddMode(ISystemAddFileListener)}
- * <li>{@link #setMultipleSelectionMode(boolean)}
- * <li>{@link #setSelectionValidator(IValidatorRemoteSelection)}
- * </ul>
- * <p>
- * Call these methods to configure the text on the dialog
- * <ul>
- * <li>{@link #setMessage(String)}
- * <li>{@link #setSelectionTreeToolTipText(String)}
- * </ul>
- * <p>
- * After running, call these methods to get the output:
- * <ul>
- * <li>{@link #getSelectedObject()} or {@link #getSelectedObjects()}
- * <li>{@link #getSelectedConnection()}
- * </ul>
- *
- * @see org.eclipse.rse.files.ui.actions.SystemSelectRemoteFileAction
- * @see org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction
- */
-public class SystemSelectRemoteFileOrFolderDialog
- extends SystemPromptDialog
- //implements ISystemFileConstants
-{
- public static final boolean FILE_MODE = true;
- public static final boolean FOLDER_MODE = false;
- protected SystemSelectRemoteFileOrFolderForm form;
- private boolean multipleSelectionMode;
- protected IHost outputConnection;
- private ISystemAddFileListener addButtonCallback = null;
-
- /**
- * Constructor
- *
- * @param shell The shell to hang the dialog off of
- * @param fileMode True if selecting files, false if selecting folders
- *
- */
- public SystemSelectRemoteFileOrFolderDialog(Shell shell, boolean fileMode)
- {
- this(shell,
- fileMode ? SystemFileResources.RESID_SELECTFILE_TITLE : SystemFileResources.RESID_SELECTDIRECTORY_TITLE,
- fileMode);
- }
-
- /**
- * Constructor when you want to supply your own title.
- *
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- * @param fileMode True if selecting files, false if selecting folders
- */
- public SystemSelectRemoteFileOrFolderDialog(Shell shell, String title, boolean fileMode)
- {
- super(shell, title);
- super.setBlockOnOpen(true); // always modal
- form = getForm(fileMode);
- //pack();
- }
-
- // ------------------
- // PUBLIC METHODS...
- // ------------------
- /**
- * indicate whether selections from different parents are allowed
- */
- public void setAllowForMultipleParents(boolean flag)
- {
- form.setAllowForMultipleParents(flag);
- }
-
- /**
- * Set the system connection to restrict the user to selecting files or folders from
- */
- public void setSystemConnection(IHost conn)
- {
- form.setSystemConnection(conn);
- }
- /**
- * Set the connection to default the selection to
- */
- public void setDefaultConnection(IHost conn)
- {
- form.setDefaultConnection(conn);
- }
-
- /**
- * 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.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- form.setSystemTypes(systemTypes);
- }
- /**
- * Set to true if a "New Connection..." special connection is to be shown for creating new connections
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- form.setShowNewConnectionPrompt(show);
- }
- /**
- * Set the message shown at the top of the form
- */
- public void setMessage(String message)
- {
- form.setMessage(message);
- }
- /**
- * Set the tooltip text for the remote systems tree from which an item is selected.
- */
- public void setSelectionTreeToolTipText(String tip)
- {
- form.setSelectionTreeToolTipText(tip);
- }
- /**
- * Specify the zero-based auto-expand level for the tree. The default is zero, meaning
- * only show the connections.
- */
- public void setAutoExpandDepth(int depth)
- {
- form.setAutoExpandDepth(depth);
- }
-
- /**
- * Set the root folder from which to start listing folders or files.
- * This version identifies the folder via a connection object and absolute path.
- * There is another overload that identifies the folder via a single IRemoteFile object.
- *
- * @param connection The connection to the remote system containing the root folder
- * @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IHost connection, String folderAbsolutePath)
- {
- form.setRootFolder(connection, folderAbsolutePath);
- }
- /**
- * Set the root folder from which to start listing folders.
- * This version identifies the folder via an IRemoteFile object.
- * There is another overload that identifies the folder via a connection and folder path.
- * <p>
- * This call effectively transforms the select dialog by:
- * <ul>
- * <li>Preventing the user from selecting other connections
- * <li>Preventing the user from selecting other filter strings
- * </ul>
- *
- * @param rootFolder The IRemoteFile object representing the remote folder to start the list from
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IRemoteFile rootFolder)
- {
- form.setRootFolder(rootFolder);
- }
- /**
- * Set a file or folder to preselect. This will:
- * <ul>
- * <li>Set the parent folder as the root folder
- * <li>Pre-expand the parent folder
- * <li>Pre-select the given file or folder after expansion
- * </ul>
- * If there is no parent, then we were given a root. In which case we will
- * <ul>
- * <li>Force setRestrictFolders to false
- * <li>Pre-expand the root drives (Windows) or root files (Unix)
- * <li>Pre-select the given root drive (Windows only)
- * </ul>
- */
- public void setPreSelection(IRemoteFile selection)
- {
- form.setPreSelection(selection);
- }
-
- /**
- * For files mode, restrict the files list by an array of file types
- * <p>
- * This must be called BEFORE setRootFolder!
- */
- public void setFileTypes(String[] fileTypes)
- {
- form.setFileTypes(fileTypes);
- }
- /**
- * For files mode, restrict the files list by a comman-delimited array of file types.
- * The last type must also end in a comma. Eg "java, class," or "class,".
- * <p>
- * This must be called BEFORE setRootFolder!
- */
- public void setFileTypes(String fileTypes)
- {
- form.setFileTypes(fileTypes);
- }
- /**
- * Specify whether setRootFolder should prevent the user from being able to see or select
- * any other folder. This causes two effects:
- * <ol>
- * <li>The special filter for root/drives is not shown
- * <li>No subfolders are listed in the target folder, if we are listing files. Of course, they are shown
- * if we are listing folders, else it would be an empty list!
- * </ol>
- */
- public void setRestrictFolders(boolean restrict)
- {
- form.setRestrictFolders(restrict);
- }
- /**
- * Enable Add mode. This means the OK button is replaced with an Add button, and
- * the Cancel with a Close button. When Add is pressed, the caller is called back.
- * The dialog is not exited until Close is pressed.
- * <p>
- * When a library is selected, the caller is called back to decide to enable the Add
- * button or not.
- */
- public void enableAddMode(ISystemAddFileListener caller)
- {
- this.addButtonCallback = caller;
- form.enableAddMode(caller);
- setShowAddButton(true);
- enableAddButton(false);
- setShowOkButton(false);
- setCancelButtonLabel(SystemResources.BUTTON_CLOSE);
- }
- /**
- * Overloaded method that allows setting the label and tooltip text of the Add button.
- * If you pass null for the label, the default is used ("Add").
- */
- public void enableAddMode(ISystemAddFileListener caller, String addLabel, String addToolTipText)
- {
- enableAddMode(caller);
- if (addLabel != null)
- setAddButtonLabel(addLabel);
- if (addToolTipText != null)
- setAddButtonToolTipText(addToolTipText);
- }
-
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload always shows the property sheet
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- form.setShowPropertySheet(show);
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload shows a Details>>> button so the user can decide if they want to see the
- * property sheet.
- * <p>
- * @param show True if show the property sheet within the dialog
- * @param initialState True if the property is to be initially displayed, false if it is not
- * to be displayed until the user presses the Details button.
- */
- public void setShowPropertySheet(boolean show, boolean initialState)
- {
- if (show)
- {
- form.setShowPropertySheet(initialState);
- setShowDetailsButton(true, !initialState);
- }
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedObjects()
- * method to retrieve the list of selected objects.
- * <p>
- * Further, if you turn this on, it has the side effect of allowing the user
- * to select any remote object. The assumption being if you are prompting for
- * files, you also want to allow the user to select a folder, with the meaning
- * being that all files within the folder are implicitly selected.
- *
- * @see #getSelectedObjects()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- this.multipleSelectionMode = multiple;
- form.setMultipleSelectionMode(multiple);
- }
- /**
- * Specify a validator to use when the user selects a remote file or folder.
- * This allows you to decide if OK should be enabled or not for that remote file or folder.
- */
- public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
- {
- form.setSelectionValidator(selectionValidator);
- }
-
- // ------------------
- // OUTPUT METHODS...
- // ------------------
-
- /**
- * Return selected file or folder
- */
- public Object getSelectedObject()
- {
- if (getOutputObject() instanceof Object[])
- return ((Object[])getOutputObject())[0];
- else
- return getOutputObject();
- }
- /**
- * Return all selected objects. This method will return an array of one
- * unless you have called setMultipleSelectionMode(true)!
- * @see #setMultipleSelectionMode(boolean)
- */
- public Object[] getSelectedObjects()
- {
- if (getOutputObject() instanceof Object[])
- return (Object[])getOutputObject();
- else if (getOutputObject() != null)
- return new Object[] {getOutputObject()};
- else
- return null;
- }
-
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- /**
- * Return the multiple selection mode as set by setMultipleSelectionMode(boolean)
- */
- public boolean getMultipleSelectionMode()
- {
- return multipleSelectionMode;
- }
- /**
- * Return the embedded System Tree object.
- * Will be null until createContents is called.
- */
- public SystemViewForm getSystemViewForm()
- {
- return form.getSystemViewForm();
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
- /**
- * Private method.
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return form.getInitialFocusControl();
- }
-
- /**
- * Private method.
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- return form.createContents(getShell(), parent);
- }
-
- /**
- * Private method.
- * Get the contents.
- */
- protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode)
- {
- //System.out.println("INSIDE GETFORM");
- //if (form == null)
- //{
- form = new SystemSelectRemoteFileOrFolderForm(getMessageLine(), this, fileMode);
- // reset output variables just to be safe
- setOutputObject(null);
- outputConnection = null;
- //}
- return form;
- }
-
- /**
- * Create message line. Intercept so we can set msg line of form.
- */
- protected ISystemMessageLine createMessageLine(Composite c)
- {
- ISystemMessageLine msgLine = super.createMessageLine(c);
- if (form != null)
- form.setMessageLine(msgLine);
- return msgLine;
- }
-
-
- /**
- * Private method.
- * <p>
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- boolean closeDialog = form.verify();
- if (closeDialog)
- {
- outputConnection = form.getSelectedConnection();
- if (multipleSelectionMode)
- setOutputObject(form.getSelectedObjects());
- else
- setOutputObject(form.getSelectedObject());
- }
- else
- setOutputObject(null);
- return closeDialog;
- }
-
- /**
- * Private method.
- * <p>
- * Called when user presses Add button.
- */
- protected boolean processAdd()
- {
- Object errMsg = addButtonCallback.addButtonPressed(form.getSelectedConnection(), (IRemoteFile[])form.getSelectedObjects());
- if (errMsg != null)
- {
- if (errMsg instanceof String)
- setErrorMessage((String)errMsg);
- else
- setErrorMessage((SystemMessage)errMsg);
- }
- else
- clearErrorMessage();
- enableAddButton(false); // presumably you won't add the same thing twice!
- return false;
- }
- /**
- * Private method.
- * <p>
- * Called when user presses DETAILS button.
- * <p>
- * Note the text is automatically toggled for us! We need only
- * do whatever the functionality is that we desire
- *
- * @param hideMode the current state of the details toggle, prior to this request. If we return true from
- * this method, this state and the button text will be toggled.
- *
- * @return true if the details state toggle was successful, false if it failed.
- */
- protected boolean processDetails(boolean hideMode)
- {
- form.toggleShowPropertySheet(getShell(), getContents());
- return true;
- }
-
-
- public void setPageComplete(boolean complete)
- {
- if (addButtonCallback != null)
- enableAddButton(complete);
- else
- super.setPageComplete(complete);
- }
-
- /**
- * We have to override close to ensure that we reset the form to null
- */
- public boolean close()
- {
- if (super.close())
- {
- if (form != null)
- {
- form.dispose();
- }
- form = null;
- return true;
- }
- return false;
- }
-
- /**
- * Add viewer filter.
- * @param filter a viewer filter.
- */
- public void addViewerFilter(ViewerFilter filter) {
-
- if (form != null) {
- form.addViewerFilter(filter);
- }
- }
-
- /**
- * Sets whether to allow folder selection. The default selection validator will use this to
- * determine whether the OK button will be enabled when a folder is selected. The default
- * is <code>true</code>. This call only makes sense if the dialog is in file selection mode.
- * @param allow <code>true</code> to allow folder selection, <code>false</code> otherwise.
- */
- public void setAllowFolderSelection(boolean allow) {
-
- if (form != null) {
- form.setAllowFolderSelection(allow);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderAction.java
deleted file mode 100644
index fde57e918..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderAction.java
+++ /dev/null
@@ -1,465 +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.files.ui.internal.search;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.ISystemAddFileListener;
-import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This action brings up a select dialog for search.
- */
-public class SystemSearchRemoteFolderAction extends SystemSelectRemoteFolderAction {
-
- private String[] systemTypes;
- private IHost systemConnection, outputConnection;
- private IHost rootFolderConnection;
- private IRemoteFile preSelection;
- private String rootFolderAbsPath;
- private String message, treeTip, dlgTitle;
- private String addLabel, addToolTipText;
- private int expandDepth = 0;
- private boolean showNewConnectionPrompt = true;
- private boolean restrictFolders = false;
- private boolean showPropertySheet = false;
- private boolean showPropertySheetDetailsButtonInitialState;
- private boolean showPropertySheetDetailsButton = false;
- private boolean multipleSelectionMode = false;
- private boolean allowForMultipleParents = false;
- private boolean onlyConnection = false;
- private ISystemAddFileListener addButtonCallback = null;
- private IValidatorRemoteSelection selectionValidator;
-
- /**
- * Constructor.
- * @param shell the parent shell.
- */
- public SystemSearchRemoteFolderAction(Shell shell) {
- super(shell);
- }
-
- /**
- * Constructor.
- * @param shell the parent shell.
- * @param label the label to display.
- * @param tooltip the tooltip to display.
- */
- public SystemSearchRemoteFolderAction(Shell shell, String label, String tooltip) {
- super(shell, label, tooltip);
- }
-
- // ------------------------
- // CONFIGURATION METHODS...
- // ------------------------
- /**
- * Set the title for the dialog. The default is "Browse for Folder"
- */
- public void setDialogTitle(String title)
- {
- this.dlgTitle = title;
- }
-
- /**
- * Set the message shown at the top of the form
- */
- public void setMessage(String message)
- {
- this.message = message;
- }
- /**
- * Set the tooltip text for the remote systems tree from which an item is selected.
- */
- public void setSelectionTreeToolTipText(String tip)
- {
- this.treeTip = tip;
- }
-
- /**
- * Set the system connection to restrict the user to seeing in the tree.
- *
- * @see #setRootFolder(IHost, String)
- */
- public void setHost(IHost conn)
- {
- systemConnection = conn;
- onlyConnection = true;
- }
- /**
- * Set the connection to default the selection to
- */
- public void setDefaultConnection(IHost conn)
- {
- systemConnection = conn;
- onlyConnection = false;
- }
- /**
- * Set the system types to restrict what connections the user sees, and what types of
- * connections they can create.
- * @param systemTypes An array of system type names
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new String[] {systemType})
- *
- * @param systemType The name of the system type to restrict to
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new String[] {systemType});
- }
-
- /**
- * Set to true if a "New Connection..." special connection is to be shown for creating new connections
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- this.showNewConnectionPrompt = show;
- }
- /**
- * Specify the zero-based auto-expand level for the tree. The default is zero, meaning
- * only show the connections.
- */
- public void setAutoExpandDepth(int depth)
- {
- this.expandDepth = depth;
- }
-
- /**
- * Set the root folder from which to start listing files.
- * This version identifies the folder via a connection object and absolute path.
- * There is another overload that identifies the folder via a single IRemoteFile object.
- * <p>
- * This call effectively transforms the select dialog by:
- * <ul>
- * <li>Preventing the user from selecting other connections
- * <li>Preventing the user from selecting other filter strings
- * </ul>
- *
- * @param connection The connection to the remote system containing the root folder
- * @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IHost connection, String folderAbsolutePath)
- {
- rootFolderConnection = connection;
- rootFolderAbsPath = folderAbsolutePath;
- }
- /**
- * Set the root folder from which to start listing folders.
- * This version identifies the folder via an IRemoteFile object.
- * There is another overload that identifies the folder via a connection and folder path.
- * <p>
- * This call effectively transforms the select dialog by:
- * <ul>
- * <li>Preventing the user from selecting other connections
- * <li>Preventing the user from selecting other filter strings
- * </ul>
- *
- * @param rootFolder The IRemoteFile object representing the remote folder to start the list from
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IRemoteFile rootFolder)
- {
- setRootFolder(rootFolder.getSystemConnection(),rootFolder.getAbsolutePath());
- }
- /**
- * Set a file or folder to preselect. This will:
- * <ul>
- * <li>Set the parent folder as the root folder
- * <li>Pre-expand the parent folder
- * <li>Pre-select the given file or folder after expansion
- * </ul>
- * If there is no parent, then we were given a root. In which case we will
- * <ul>
- * <li>Force setRestrictFolders to false
- * <li>Pre-expand the root drives (Windows) or root files (Unix)
- * <li>Pre-select the given root drive (Windows only)
- * </ul>
- */
- public void setPreSelection(IRemoteFile selection)
- {
- preSelection = selection;
- }
-
- /**
- * Specify whether setRootFolder should prevent the user from being able to see or select
- * any other folder. This causes this effect:
- * <ol>
- * <li>The special filter for root/drives is not shown
- * </ol>
- */
- public void setRestrictFolders(boolean restrict)
- {
- restrictFolders = true;
- }
-
- /**
- * Enable Add mode. This means the OK button is replaced with an Add button, and
- * the Cancel with a Close button. When Add is pressed, the caller is called back.
- * The dialog is not exited until Close is pressed.
- * <p>
- * When a library is selected, the caller is called back to decide to enable the Add
- * button or not.
- */
- public void enableAddMode(ISystemAddFileListener caller)
- {
- this.addButtonCallback = caller;
- }
- /**
- * Overloaded method that allows setting the label and tooltip text of the Add button.
- * If you pass null for the label, the default is used ("Add").
- */
- public void enableAddMode(ISystemAddFileListener caller, String addLabel, String addToolTipText)
- {
- enableAddMode(caller);
- this.addLabel = addLabel;
- this.addToolTipText = addToolTipText;
- }
-
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- this.showPropertySheet = show;
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload shows a Details>>> button so the user can decide if they want to see the
- * property sheet.
- * <p>
- * @param show True if to show the property sheet within the dialog
- * @param initialState True if the property is to be initially displayed, false if it is not
- * to be displayed until the user presses the Details button.
- */
- public void setShowPropertySheet(boolean show, boolean initialState)
- {
- setShowPropertySheet(show);
- if (show)
- {
- this.showPropertySheetDetailsButton = true;
- this.showPropertySheetDetailsButtonInitialState = initialState;
- }
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedObjects()
- * method to retrieve the list of selected objects.
- *
- * @see #getSelectedObjects()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- this.multipleSelectionMode = multiple;
- }
-
- /*
- * Indicates whether to allow selection of objects from differnet parents
- */
- public void setAllowForMultipleParents(boolean multiple)
- {
- this.allowForMultipleParents = multiple;
- }
-
- /**
- * Specify a validator to use when the user selects a remote file or folder.
- * This allows you to decide if OK should be enabled or not for that remote file or folder.
- */
- public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
- {
- this.selectionValidator = selectionValidator;
- }
-
- // -----------------
- // OUTPUT METHODS...
- // -----------------
-
-
- /**
- * Retrieve selected folder object. If multiple folders selected, returns the first.
- */
- public IRemoteFile getSelectedFolder()
- {
- Object o = getValue();
- if (o instanceof IRemoteFile[])
- return ((IRemoteFile[])o)[0];
- else if (o instanceof IRemoteFile)
- return (IRemoteFile)o;
- else
- return null;
- }
- /**
- * Retrieve selected folder objects. If no folders selected, returns an array of zero.
- * If one folder selected returns an array of one.
- */
- public IRemoteFile[] getSelectedFolders()
- {
- Object o = getValue();
- if (o instanceof Object[]) {
-
- Object[] temp = (Object[])o;
-
- IRemoteFile[] files = new IRemoteFile[temp.length];
-
- // ensure all objects are IRemoteFiles
- for (int i = 0; i < temp.length; i++) {
-
- if (temp[i] instanceof IRemoteFile) {
- files[i] = (IRemoteFile)temp[i];
- }
- // should never happen
- else {
- return new IRemoteFile[0];
- }
- }
-
- return files;
- }
- if (o instanceof IRemoteFile[])
- return (IRemoteFile[])o;
- else if (o instanceof IRemoteFile)
- return new IRemoteFile[] {(IRemoteFile)o};
- else
- return new IRemoteFile[0];
- }
-
- /**
- * Return all selected objects. This method will return an array of one
- * unless you have called setMultipleSelectionMode(true)!
- * <p>
- * It will always return null if the user cancelled the dialog.
- *
- * @see #setMultipleSelectionMode(boolean)
- */
- public Object[] getSelectedObjects()
- {
- Object remoteObject = getValue();
- if (remoteObject == null)
- return null;
- else if (remoteObject instanceof Object[])
- return (Object[])remoteObject;
- else if (remoteObject instanceof IRemoteFile[])
- return (Object[])remoteObject;
- else
- return new Object[] {remoteObject};
- }
-
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- // -------------------
- // INTERNAL METHODS...
- // -------------------
-
- /**
- * Creates an instance of the select dialog for search {@link SystemSearchRemoteFolderDialog}.
- * @return the dialog to select remote resource from.
- */
- protected Dialog createDialog(Shell shell)
- {
- SystemSearchRemoteFolderDialog dlg = null;
- if (dlgTitle == null)
- dlg = new SystemSearchRemoteFolderDialog(shell);
- else
- dlg = new SystemSearchRemoteFolderDialog(shell, dlgTitle);
- dlg.setShowNewConnectionPrompt(showNewConnectionPrompt);
- dlg.setMultipleSelectionMode(multipleSelectionMode);
- dlg.setAllowForMultipleParents(allowForMultipleParents);
- if (restrictFolders)
- dlg.setRestrictFolders(true);
- if (message != null)
- dlg.setMessage(message);
- if (treeTip != null)
- dlg.setSelectionTreeToolTipText(treeTip);
- if (systemConnection != null)
- {
- if (onlyConnection)
- dlg.setSystemConnection(systemConnection);
- else
- dlg.setDefaultConnection(systemConnection);
- }
- if (systemTypes != null)
- dlg.setSystemTypes(systemTypes);
- if (expandDepth != 0)
- dlg.setAutoExpandDepth(expandDepth);
- if (preSelection != null)
- dlg.setPreSelection(preSelection);
- else if (rootFolderConnection != null)
- dlg.setRootFolder(rootFolderConnection, rootFolderAbsPath);
- if (showPropertySheet)
- if (showPropertySheetDetailsButton)
- dlg.setShowPropertySheet(true, showPropertySheetDetailsButtonInitialState);
- else
- dlg.setShowPropertySheet(true);
- if (addButtonCallback != null)
- if ((addLabel!=null) || (addToolTipText!=null))
- dlg.enableAddMode(addButtonCallback, addLabel, addToolTipText);
- else
- dlg.enableAddMode(addButtonCallback);
- if (selectionValidator != null)
- dlg.setSelectionValidator(selectionValidator);
-
- return dlg;
- }
-
- /**
- * Required by parent. We return the selected object
- */
- protected Object getDialogValue(Dialog dlg)
- {
- SystemSearchRemoteFolderDialog ourDlg = (SystemSearchRemoteFolderDialog)dlg;
- Object outputObject = null;
- outputConnection = null;
- if (!ourDlg.wasCancelled())
- {
- if (multipleSelectionMode)
- outputObject = ourDlg.getSelectedObjects();
- else
- outputObject = ourDlg.getSelectedObject();
- outputConnection = ourDlg.getSelectedConnection();
- }
- return outputObject; // parent class calls setValue on what we return
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderDialog.java
deleted file mode 100644
index c0f37ce7d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderDialog.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kushal Munir (IBM) - initial API and implementation.
- ********************************************************************************/
-package org.eclipse.rse.files.ui.internal.search;
-
-import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog;
-import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Select dialog for search.
- */
-public class SystemSearchRemoteFolderDialog extends SystemSelectRemoteFileOrFolderDialog {
-
- /**
- * Constructor.
- * @param shell the parent shell.
- */
- public SystemSearchRemoteFolderDialog(Shell shell) {
- super(shell, false);
- }
-
- /**
- * Contructor.
- * @param shell the parent shell.
- * @param title the the title of the dialog.
- */
- public SystemSearchRemoteFolderDialog(Shell shell, String title) {
- super(shell, title, false);
- }
-
- /**
- * Creates an instance of the select form for search {@link SystemSearchRemoteFolderForm}
- * @see org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog#getForm(boolean)
- */
- protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode) {
- form = new SystemSearchRemoteFolderForm(getMessageLine(), this);
- setOutputObject(null);
- outputConnection = null;
- return form;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderForm.java
deleted file mode 100644
index b72ed2715..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteFolderForm.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kushal Munir (IBM) - initial API and implementation.
- ********************************************************************************/
-package org.eclipse.rse.files.ui.internal.search;
-
-import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.SystemSelectRemoteObjectAPIProviderImpl;
-
-/**
- * The selection form to use is search selection dialogs.
- */
-public class SystemSearchRemoteFolderForm extends SystemSelectRemoteFileOrFolderForm {
-
- /**
- * Constructor.
- * @param msgLine the message line.
- * @param caller the caller of the contructor for callbacks.
- */
- public SystemSearchRemoteFolderForm(ISystemMessageLine msgLine, Object caller) {
- super(msgLine, caller, false);
- }
-
- /**
- * Returns an instance of the search input provider {@link SystemSearchRemoteObjectAPIProvider}
- * @see org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm#getInputProvider()
- */
- protected SystemSelectRemoteObjectAPIProviderImpl getInputProvider() {
-
- if (inputProvider == null) {
- // create the input provider that drives the contents of the tree
- inputProvider = new SystemSearchRemoteObjectAPIProvider(null, ISystemFileRemoteTypes.TYPECATEGORY, true, null); // show new connection prompt, no system type restrictions
- }
-
- return inputProvider;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteObjectAPIProvider.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteObjectAPIProvider.java
deleted file mode 100644
index 6aeb64efa..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/internal/search/SystemSearchRemoteObjectAPIProvider.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kushal Munir (IBM) - initial API and implementation.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.internal.search;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.ui.view.SystemSelectRemoteObjectAPIProviderImpl;
-
-/**
- * This is the input provider for selection dialogs related to search.
- */
-public class SystemSearchRemoteObjectAPIProvider extends SystemSelectRemoteObjectAPIProviderImpl {
-
- /**
- * Constructor.
- * @param factoryId the subsystem factory id.
- * @param factoryCategory the subsystem facory category.
- * @param showNewConnectionPrompt whether to show new connection prompt.
- * @param systemTypes the system types to restrict to.
- */
- public SystemSearchRemoteObjectAPIProvider(String factoryId, String factoryCategory, boolean showNewConnectionPrompt, String[] systemTypes) {
- super(factoryId, factoryCategory, showNewConnectionPrompt, systemTypes);
- }
-
- /**
- * Constructor.
- * @param subsystem the subsystem.
- */
- public SystemSearchRemoteObjectAPIProvider(ISubSystem subsystem) {
- super(subsystem);
- }
-
- /**
- * Contrcutor.
- */
- public SystemSearchRemoteObjectAPIProvider() {
- super();
- }
-
- /**
- * @see org.eclipse.rse.ui.view.SystemSelectRemoteObjectAPIProviderImpl#getConnections()
- */
- protected Object[] getConnections() {
-
- Object[] objs = super.getConnections();
- List l = new Vector();
-
- for (int i = 0; i < objs.length; i++) {
- Object obj = objs[i];
-
- if (obj instanceof IHost) {
- IHost host = (IHost)obj;
-
- ISubSystem[] subsystems = sr.getSubSystems(host);
-
- for (int j = 0; j < subsystems.length; j++) {
- ISubSystem subsystem = subsystems[j];
-
- if (subsystem instanceof FileServiceSubSystem) {
- FileServiceSubSystem fileSubSystem = (FileServiceSubSystem)subsystem;
-
- ISearchService searchService = fileSubSystem.getSearchService();
-
- if (searchService != null) {
- l.add(obj);
- break;
- }
- }
- }
- }
- else {
- l.add(obj);
- }
- }
-
- return l.toArray();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 87896b9d4..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/FileServicesPropertyPage.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.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;
-
-
-public class FileServicesPropertyPage extends ServicesPropertyPage
-{
-
- private IFileServiceSubSystemConfiguration _currentFactory;
-
- protected FileServiceSubSystem getFileServiceSubSystem()
- {
- return (FileServiceSubSystem)getElement();
- }
-
- protected ServiceElement[] getServiceElements()
- {
- FileServiceSubSystem subSystem = getFileServiceSubSystem();
-
- IHost host = subSystem.getHost();
- _currentFactory = (IFileServiceSubSystemConfiguration)subSystem.getParentRemoteFileSubSystemConfiguration();
- IFileServiceSubSystemConfiguration[] factories = getFileServiceSubSystemFactories(host.getSystemType());
-
-
- // create elements for each
- ServiceElement[] elements = new ServiceElement[factories.length];
- for (int i = 0; i < factories.length; i++)
- {
- IFileServiceSubSystemConfiguration factory = factories[i];
- elements[i] = new FactoryServiceElement(host, factory);
- if (factory == _currentFactory)
- {
- elements[i].setSelected(true);
- }
- }
-
- return elements;
- }
-
- protected IFileServiceSubSystemConfiguration[] getFileServiceSubSystemFactories(String systemType)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType);
-
- for (int i = 0; i < factories.length; i++)
- {
- ISubSystemConfiguration factory = factories[i];
- if (factory instanceof IFileServiceSubSystemConfiguration)
- {
- results.add(factory);
- }
- }
-
- return (IFileServiceSubSystemConfiguration[])results.toArray(new IFileServiceSubSystemConfiguration[results.size()]);
- }
-
-
- protected IServiceSubSystemConfiguration getCurrentServiceSubSystemConfiguration()
- {
- return _currentFactory;
- }
-
- public void setSubSystemConfiguration(ISubSystemConfiguration factory)
- {
- _currentFactory = (IFileServiceSubSystemConfiguration)factory;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemAbstractRemoteFilePropertyPageExtensionAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemAbstractRemoteFilePropertyPageExtensionAction.java
deleted file mode 100644
index d4628c6f7..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemAbstractRemoteFilePropertyPageExtensionAction.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui.propertypages;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-import org.eclipse.rse.ui.propertypages.SystemAbstractPropertyPageExtensionAction;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-
-
-
-/**
- * This is a base class to simplify the creation of property pages supplied via the
- * org.eclipse.rse.ui.propertyPages extension point, targeting remote files
- * and/or remote folders.
- * <p>
- * The only method you must implement is {@link #createContentArea(Composite)}.
- * <p>
- * The benefits of this class are:</p>
- * <ul>
- * <li>From {@link SystemBasePropertyPage}: Adds a message line and {@link org.eclipse.rse.ui.messages.ISystemMessageLine} message methods.
- * <li>From {@link SystemBasePropertyPage}: Automatically assigns mnemonics to controls on this page, simplifying this common task. See {#wantMnemonics()}.
- * <li>From {@link SystemBasePropertyPage}: For pages with input controls, simplifies the page validation burden: only one method need be overridden: {@link #verifyPageContents()}
- * <li>From {@link SystemBasePropertyPage}: If no Default and Apply buttons wanted, the area reserved for this is removed, removing extra white space.
- * <li>Supplies helper method {@link #getRemoteFile()} for querying the selected remote file/folder.
- * <li>Supplies helper methods to query the {@link #getRemoteFileSubSystem() file-subsystem} and {@link #getSystemConnection() connection} containing the selected remote file.
- * </ul>
- */
-public abstract class SystemAbstractRemoteFilePropertyPageExtensionAction
- extends SystemAbstractPropertyPageExtensionAction implements IWorkbenchPropertyPage
-{
-
- /**
- * Constructor
- */
- public SystemAbstractRemoteFilePropertyPageExtensionAction()
- {
- super();
- }
-
- // ----------------------------------
- // OVERRIDABLE METHODS FROM PARENT...
- // ----------------------------------
- /**
- * <i><b>Abstract</b>. You must override.</i><br>
- * This is where child classes create their content area versus createContent,
- * in order to have the message line configured for them and mnemonics assigned.
- */
- protected abstract Control createContentArea(Composite parent);
-
- /**
- * <i>You may override if your page has input fields. By default returns true.</i><br>
- * Validate all the widgets on the page. Based on this, the Eclipse framework will know whether
- * to veto any user attempt to select another property page from the list on the left in the
- * Properties dialog.
- * <p>
- * Subclasses should override to do full error checking on all the widgets on the page. Recommendation:<br>
- * <ul>
- * <li>If an error is detected, issue a {@link org.eclipse.rse.ui.messages.SystemMessage} via {@link #setErrorMessage(SystemMessage)} or text message via {@link #setErrorMessage(String)}.
- * <li>If no errors detected, clear the message line via {@link #clearErrorMessage()}
- * </ul>
- *
- * @return true if there are no errors, false if any errors were found.
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- // ------------------------------------------------------------------
- // CONVENIENCE METHODS WE ADD SPECIFICALLY FOR REMOTE FILE ACTIONS...
- // ------------------------------------------------------------------
- /**
- * Retrieve the input selected object, as an IRemoteFile, for convenience.
- */
- public IRemoteFile getRemoteFile()
- {
- return (IRemoteFile)super.getRemoteObject();
- }
-
- /**
- * Get the remote file subsystem from which the selected objects were resolved.
- * This has many useful methods in it, including support to transfer files to and
- * from the local and remote systems.
- */
- public IRemoteFileSubSystem getRemoteFileSubSystem()
- {
- return (IRemoteFileSubSystem)getSubSystem();
- }
-
- /**
- * Returns the remote file subsystem factory which owns the subsystem from which the
- * selected remote objects were resolved. This has some useful methods in it,
- * including isUnixStyle() indicating if this remote file system is unix or windows.
- */
- public IRemoteFileSubSystemConfiguration getRemoteFileSubSystemConfiguration()
- {
- return (IRemoteFileSubSystemConfiguration)getSubSystemConfiguration();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 0eceb6e45..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java
+++ /dev/null
@@ -1,650 +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.files.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-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.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;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-import org.eclipse.ui.model.AdaptableList;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-
-
-/**
- * Preference page for generic Remote System cache preferences
- */
-public class SystemCachePreferencePage extends PreferencePage implements IWorkbenchPreferencePage, Listener
-{
-
- private Button _clearButton;
- private Button _maxCacheCheckbox;
- private Text _maxCacheSize;
-
- /**
- * Constructor
- */
- public SystemCachePreferencePage()
- {
- super();
- setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore());
-// setDescription(FileResources.RESID_PREF_CACHE_DESCRIPTION); dwd descriptions are not readable by screen reader
- }
-
- /**
- * Configure the composite. We intercept to set the help.
- */
- public void createControl(Composite parent)
- {
- super.createControl(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), RSEUIPlugin.HELPPREFIX + "fchp0000");
- }
-
- /**
- *
- */
- protected Control createContents(Composite gparent)
- {
- Composite parent = SystemWidgetHelpers.createComposite(gparent, 1);
-
- Composite maxComp = SystemWidgetHelpers.createComposite(parent, 2);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- maxComp.setLayout(layout);
- maxComp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- _maxCacheCheckbox =
- SystemWidgetHelpers.createCheckBox(
- maxComp,
- FileResources.RESID_PREF_CACHE_MAX_CACHE_SIZE_LABEL,
- this);
- _maxCacheCheckbox.setToolTipText(
- FileResources.RESID_PREF_CACHE_MAX_CACHE_SIZE_TOOLTIP);
-
- _maxCacheSize = SystemWidgetHelpers.createTextField(maxComp, this);
- GridData gd = new GridData();
- gd.widthHint = 75;
- _maxCacheSize.setLayoutData(gd);
-
- _maxCacheSize.setTextLimit(5);
- _maxCacheSize.addVerifyListener(new VerifyListener()
- {
- public void verifyText(VerifyEvent e)
- {
- e.doit = true;
- for (int loop = 0; loop < e.text.length(); loop++)
- {
- if (!Character.isDigit(e.text.charAt(loop)))
- e.doit = false;
- }
- }
- });
-
-// Composite clearComp = SystemWidgetHelpers.createComposite(parent, 2);
-// layout = new GridLayout();
-// layout.numColumns = 2;
-// clearComp.setLayout(layout);
-// clearComp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
-// SystemWidgetHelpers.createLabel(
-// clearComp,
-// FileResources.RESID_PREF_CACHE_CLEAR_LABEL);
- _clearButton = SystemWidgetHelpers.createPushButton(parent, FileResources.RESID_PREF_CACHE_CLEAR, this);
- _clearButton.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
- _clearButton.setToolTipText(FileResources.RESID_PREF_CACHE_CLEAR_TOOLTIP);
-// gd = new GridData();
-// gd.widthHint = 75;
-// _clearButton.setLayoutData(gd);
-
-// Composite warningComp = SystemWidgetHelpers.createComposite(clearComp, 2);
-// gd = new GridData();
-// gd.horizontalSpan = 2;
-// warningComp.setLayoutData(gd);
-
-// Display display = getControl().getDisplay();
-// Label warningLabel =
-// SystemWidgetHelpers.createLabel(
-// warningComp,
-// FileResources.RESID_PREF_CACHE_CLEAR_WARNING_LABEL);
-// FontData oldData = warningLabel.getFont().getFontData()[0];
-// FontData data = new FontData(oldData.getName(), oldData.getHeight(), SWT.BOLD);
-// Font fFont = new Font(display, data);
-// warningLabel.setFont(fFont);
-
- Text warning = new Text(parent, SWT.READ_ONLY);
-// SystemWidgetHelpers.createReadonlyTextField(parent);
- warning.setText(FileResources.RESID_PREF_CACHE_CLEAR_WARNING_DESCRIPTION);
-
- (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent);
-
- initControls();
- return parent;
- }
-
- private void initControls()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- boolean enableMaxSize = store.getBoolean(ISystemPreferencesConstants.LIMIT_CACHE);
- _maxCacheSize.setEnabled(enableMaxSize);
-
- String maxCacheSizeStr = store.getString(ISystemPreferencesConstants.MAX_CACHE_SIZE);
-
- if (maxCacheSizeStr == null || maxCacheSizeStr.equals("")) {
- maxCacheSizeStr = ISystemPreferencesConstants.DEFAULT_MAX_CACHE_SIZE;
- }
-
- _maxCacheSize.setText(maxCacheSizeStr);
- _maxCacheCheckbox.setSelection(enableMaxSize);
- }
-
- /**
- * Inherited method.
- */
- public void init(IWorkbench workbench)
- {
-
- }
-
- /**
- * @see FieldEditorPreferencePage#performDefaults()
- */
- protected void performDefaults()
- {
- super.performDefaults();
-
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
-
- boolean enableMaxSize = store.getDefaultBoolean(ISystemPreferencesConstants.LIMIT_CACHE);
- _maxCacheCheckbox.setSelection(enableMaxSize);
-
- _maxCacheSize.setEnabled(enableMaxSize);
- _maxCacheSize.setText(store.getDefaultString(ISystemPreferencesConstants.MAX_CACHE_SIZE));
- }
-
- /**
- * Set default preferences for the communications preference page.
- *
- * @param store PreferenceStore used for this preference page.
- */
- public static void initDefaults(IPreferenceStore store)
- {
- store.setDefault(ISystemPreferencesConstants.LIMIT_CACHE, ISystemPreferencesConstants.DEFAULT_LIMIT_CACHE);
- store.setDefault(ISystemPreferencesConstants.MAX_CACHE_SIZE, ISystemPreferencesConstants.DEFAULT_MAX_CACHE_SIZE);
- }
-
- /**
- * @see FieldEditorPreferencePage#performOk()
- */
- public boolean performOk()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- String size = _maxCacheSize.getText();
-
- if (size == null || size.trim().equals("")) {
- size = ISystemPreferencesConstants.DEFAULT_MAX_CACHE_SIZE;
- }
-
- store.setValue(ISystemPreferencesConstants.MAX_CACHE_SIZE, size);
- store.setValue(ISystemPreferencesConstants.LIMIT_CACHE, _maxCacheCheckbox.getSelection());
-
- return super.performOk();
- }
-
- private class ClearTempFilesRunnable implements IRunnableWithProgress
- {
- public void run(IProgressMonitor monitor)
- {
- SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
- // if no temp file project, nothing to do
- if (!mgr.doesRemoteEditProjectExist())
- {
- return;
- }
-
- IProject tempFiles = mgr.getRemoteEditProject();
- if (tempFiles != null)
- {
- try
- {
-// IWorkspace workspace = SystemBasePlugin.getWorkspace();
- IResource[] members = tempFiles.members();
- if (members != null)
- {
- for (int i = 0; i < members.length; i++)
- {
- IResource member = members[i];
- if ((member instanceof IFile) &&
- member.getName().equals(".project"))
- {
- }
- else
- {
- // DKM - passing true now so that out-of-synch temp files are deleted too (i.e. generated .evt files)
- // this solves the worse part of 58951
- member.delete(true, monitor);
- }
- }
- }
-
- }
- catch (Exception e)
- {
- }
- finally
- {
- mgr.getRemoteEditProject();
- /*
- try
- {
-
-
- // recreate .project
- IProjectDescription description = tempFiles.getDescription();
- String[] natures = description.getNatureIds();
- String[] newNatures = new String[natures.length + 1];
-
- // copy all previous natures
- for (int i = 0; i < natures.length; i++)
- {
- newNatures[i] = natures[i];
- }
-
- newNatures[newNatures.length - 1] = SystemRemoteEditManager.REMOTE_EDIT_PROJECT_NATURE_ID;
- description.setNatureIds(newNatures);
- tempFiles.setDescription(description, null);
-
- mgr.addCSupport(tempFiles);
- mgr.addJavaSupport(tempFiles);
-
-
- }
- catch (CoreException e)
- {
- }
- */
- }
-
- }
- }
- }
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
- else
- {
- // for other cases, use statusbar
- IWorkbenchWindow win = SystemBasePlugin.getActiveWorkbenchWindow();
- if (win != null)
- {
- Shell winShell = SystemBasePlugin.getActiveWorkbenchShell();
- if (winShell != null && winShell.isVisible() && !winShell.isDisposed())
- {
- shell = winShell;
- return win;
- }
- else
- {
- win = null;
- }
- }
-
- return new ProgressMonitorDialog(shell);
- }
- }
- public void handleEvent(Event e)
- {
- if (e.widget == _clearButton)
- {
-
- if (checkDirtyEditors())
- {
- IRunnableContext runnableContext = getRunnableContext(SystemBasePlugin.getActiveWorkbenchShell());
- try
- {
- // currently we don't run this in a thread because
- // in some cases dialogs are launched in the operation
- // (widgets can only be legally used on the main thread)
- runnableContext.run(false, true, new ClearTempFilesRunnable());
- // inthread, cancellable, IRunnableWithProgress
- }
- catch (java.lang.reflect.InvocationTargetException exc)
- {
- }
- catch (java.lang.InterruptedException ex)
- {
- }
- }
-
- }
- else if (e.widget == _maxCacheCheckbox)
- {
- _maxCacheSize.setEnabled(_maxCacheCheckbox.getSelection());
- }
- }
-
- protected boolean getDirtyReplicas(IContainer parent, List dirtyReplicas)
- {
- try
- {
- IResource[] children = parent.members();
- for (int i = 0; i < children.length; i++)
- {
- IResource child = children[i];
- if (child instanceof IFile)
- {
- SystemIFileProperties properties = new SystemIFileProperties(child);
- if (properties.getDirty())
- {
- if (properties.getRemoteFileObject() != null)
- {
- ISystemEditableRemoteObject editable =
- (ISystemEditableRemoteObject) properties.getRemoteFileObject();
- dirtyReplicas.add(editable);
- }
- // get the modified timestamp from the File, not the IFile
- // for some reason, the modified timestamp from the IFile does not always return
- // the right value. There is a Javadoc comment saying the value from IFile might be a
- // cached value and that might be the cause of the problem.
- else if (properties.getDownloadFileTimeStamp() != child.getLocation().toFile().lastModified())
- {
- String ssString = properties.getRemoteFileSubSystem();
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem subsystem = registry.getSubSystem(ssString);
- if (subsystem != null)
- {
- String path = properties.getRemoteFilePath();
- try
- {
- IAdaptable remoteFile = (IAdaptable) subsystem.getObjectWithAbsoluteName(path);
- if (remoteFile != null)
- {
- ISystemRemoteElementAdapter adapter =
- (ISystemRemoteElementAdapter) remoteFile.getAdapter(
- ISystemRemoteElementAdapter.class);
- ISystemEditableRemoteObject editable =
- adapter.getEditableRemoteObject(remoteFile);
- editable.openEditor();
- // need this to get a reference back to the object
- properties.setRemoteFileObject(editable);
- dirtyReplicas.add(editable);
- }
- else
- {
- return false;
- }
- }
- catch (Exception e)
- {
- return false;
- }
- }
- }
- }
- }
- else if (child instanceof IContainer)
- {
- if (!getDirtyReplicas((IContainer) child, dirtyReplicas))
- {
- return false;
- }
- }
- }
- }
- catch (Exception e)
- {
- return false;
- }
- return true;
- }
-
- protected boolean getDirtyReplicas(List results)
- {
- SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
- IProject tempFilesProject = mgr.getRemoteEditProject();
- if (!getDirtyReplicas(tempFilesProject, results))
- {
- return false;
- }
- if (!getDirtyEditors(results))
- {
- return false;
- }
- return true;
- }
-
- protected boolean getDirtyEditors(List results)
- {
- SystemRemoteEditManager editMgr = SystemRemoteEditManager.getDefault();
-
- // if there's no temp file project, there's no dirty editors
- if (!editMgr.doesRemoteEditProjectExist())
- return false;
-
- IProject tempFilesProject = editMgr.getRemoteEditProject();
- IWorkbenchWindow activeWindow = SystemBasePlugin.getActiveWorkbenchWindow();
- IWorkbenchPage activePage = activeWindow.getActivePage();
-
- IEditorReference[] activeReferences = activePage.getEditorReferences();
-
- IEditorPart part;
-
- for (int k = 0; k < activeReferences.length; k++)
- {
- part = activeReferences[k].getEditor(false);
-
- if (part != null)
- {
- IEditorInput editorInput = part.getEditorInput();
-
- if (editorInput instanceof IFileEditorInput)
- {
- IFile file = ((IFileEditorInput) editorInput).getFile();
- if (file.getProject() == tempFilesProject)
- {
- if (part.isDirty())
- {
- SystemIFileProperties properties = new SystemIFileProperties(file);
- if (properties.getDirty())
- {
- // then this is already added via getDirtyReplicas()
- }
- else
- {
-
- if (properties.getRemoteFileObject() != null)
- {
- ISystemEditableRemoteObject editable =
- (ISystemEditableRemoteObject) properties.getRemoteFileObject();
- results.add(editable);
- }
- else
- {
- String ssString = properties.getRemoteFileSubSystem();
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem subsystem = registry.getSubSystem(ssString);
- if (subsystem != null)
- {
- String path = properties.getRemoteFilePath();
- try
- {
-
- IAdaptable remoteFile =
- (IAdaptable) subsystem.getObjectWithAbsoluteName(path);
- if (remoteFile != null)
- {
- ISystemRemoteElementAdapter adapter =
- (ISystemRemoteElementAdapter) remoteFile.getAdapter(
- ISystemRemoteElementAdapter.class);
- ISystemEditableRemoteObject editable =
- adapter.getEditableRemoteObject(remoteFile);
- editable.openEditor();
- // need this to get a reference back to the object
- properties.setRemoteFileObject(editable);
- results.add(editable);
- }
- }
- catch (Exception e)
- {
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return true;
- }
-
- protected ISystemEditableRemoteObject getEditableFor(IAdaptable selected)
- {
- ISystemRemoteElementAdapter adapter =
- (ISystemRemoteElementAdapter) selected.getAdapter(ISystemRemoteElementAdapter.class);
- if (adapter.canEdit(selected))
- {
- ISystemEditableRemoteObject editable = adapter.getEditableRemoteObject(selected);
- try
- {
- editable.setLocalResourceProperties();
- }
- catch (Exception e)
- {
- }
- return editable;
- }
- return null;
- }
-
- protected boolean checkDirtyEditors()
- {
- SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
- if (!mgr.doesRemoteEditProjectExist())
- {
- return true;
- }
-
- List dirtyEditors = new ArrayList();
- if (!getDirtyReplicas(dirtyEditors))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CACHE_UNABLE_TO_SYNCH);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
-
- return false;
- }
- if (dirtyEditors.size() > 0)
- {
- AdaptableList input = new AdaptableList();
- for (int i = 0; i < dirtyEditors.size(); i++)
- {
- ISystemEditableRemoteObject rmtObj = (ISystemEditableRemoteObject) dirtyEditors.get(i);
- input.add(rmtObj.getRemoteObject());
- }
-
- WorkbenchContentProvider cprovider = new WorkbenchContentProvider();
- SystemTableViewProvider lprovider = new SystemTableViewProvider();
-
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CACHE_UPLOAD_BEFORE_DELETE);
-
- ListSelectionDialog dlg =
- new ListSelectionDialog(getShell(), input, cprovider, lprovider, msg.getLevelOneText());
-
- dlg.setInitialSelections(input.getChildren());
- // TODO: Cannot use WorkbenchMessages -- it's internal
- dlg.setTitle(GenericMessages.EditorManager_saveResourcesTitle);
-
- int result = dlg.open();
-
- //Just return false to prevent the operation continuing
- if (result == IDialogConstants.CANCEL_ID)
- return false;
-
- Object[] filesToSave = dlg.getResult();
- for (int s = 0; s < filesToSave.length; s++)
- {
- IAdaptable rmtObj = (IAdaptable) filesToSave[s];
- ISystemEditableRemoteObject editable = getEditableFor(rmtObj);
- if (!editable.doImmediateSaveAndUpload())
- {
- return false;
- }
- }
- }
- return true;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 0102c5e52..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java
+++ /dev/null
@@ -1,298 +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.files.ui.propertypages;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- * The remote property page for remote file properties.
- * This is an output-only page.
- * The plugin.xml file registers this for remote file system objects.
- */
-public class SystemFilePropertyPage extends SystemBasePropertyPage
- implements SelectionListener
-{
-
- protected Label labelNamePrompt, labelTypePrompt, labelPathPrompt, labelSizePrompt,
- labelModifiedPrompt;
- //protected Button cbReadablePrompt, cbWritablePrompt;
- protected Button cbReadonlyPrompt, cbHiddenPrompt;
- protected Label labelName, labelType, labelPath, labelSize, labelModified, labelReadable, labelWritable, labelHidden;
- protected String errorMessage;
- protected boolean initDone = false;
- protected boolean wasReadOnly = false;
-
- /**
- * Constructor for SystemFilterPropertyPage
- */
- public SystemFilePropertyPage()
- {
- super();
- RSEUIPlugin sp = RSEUIPlugin.getDefault();
- }
- /**
- * Create the page's GUI contents.
- */
- protected Control createContentArea(Composite parent)
- {
- IRemoteFile file = getRemoteFile();
-
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // Name display
- labelNamePrompt = SystemWidgetHelpers.createLabel(
- composite_prompts, SystemFileResources.RESID_PP_FILE_NAME_LABEL, SystemFileResources.RESID_PP_FILE_NAME_TOOLTIP);
- labelName = SystemWidgetHelpers.createLabel(
- composite_prompts, "");
- labelName.setToolTipText(SystemFileResources.RESID_PP_FILE_NAME_TOOLTIP);
-
- // Type display
- labelTypePrompt = SystemWidgetHelpers.createLabel(
- composite_prompts, SystemFileResources.RESID_PP_FILE_TYPE_LABEL, SystemFileResources.RESID_PP_FILE_TYPE_TOOLTIP);
- labelType = SystemWidgetHelpers.createLabel(
- composite_prompts, "");
- labelType.setToolTipText(SystemFileResources.RESID_PP_FILE_TYPE_TOOLTIP);
-
- // Path display
- if (!file.isRoot())
- {
- labelPathPrompt = SystemWidgetHelpers.createLabel(
- composite_prompts, SystemFileResources.RESID_PP_FILE_PATH_LABEL, SystemFileResources.RESID_PP_FILE_PATH_TOOLTIP);
- labelPath = SystemWidgetHelpers.createLabel(
- composite_prompts, "");
- labelPath.setToolTipText(SystemFileResources.RESID_PP_FILE_PATH_TOOLTIP);
- }
-
- // Size display
- if (!file.isDirectory())
- {
- labelSizePrompt = SystemWidgetHelpers.createLabel(
- composite_prompts, SystemFileResources.RESID_PP_FILE_SIZE_LABEL, SystemFileResources.RESID_PP_FILE_SIZE_TOOLTIP);
- labelSize = SystemWidgetHelpers.createLabel(
- composite_prompts, "");
- labelSize.setToolTipText(SystemFileResources.RESID_PP_FILE_SIZE_TOOLTIP);
- }
-
- // Modified display
- if (!file.isRoot())
- {
- labelModifiedPrompt = SystemWidgetHelpers.createLabel(
- composite_prompts, SystemFileResources.RESID_PP_FILE_MODIFIED_LABEL, SystemFileResources.RESID_PP_FILE_MODIFIED_TOOLTIP);
- labelModified = SystemWidgetHelpers.createLabel(
- composite_prompts, "");
- labelModified.setToolTipText(SystemFileResources.RESID_PP_FILE_MODIFIED_TOOLTIP);
- }
-
- // Readonly display
- if (!file.isRoot())
- {
- if (file.showReadOnlyProperty())
- {
- cbReadonlyPrompt = SystemWidgetHelpers.createCheckBox(
- composite_prompts, null, SystemFileResources.RESID_PP_FILE_READONLY_LABEL, SystemFileResources.RESID_PP_FILE_READONLY_TOOLTIP);
- }
- }
-
- /*
- // Readable display
- if (!file.isRoot())
- {
- cbReadablePrompt = SystemWidgetHelpers.createCheckBox(
- composite_prompts, null, SystemFileResources.RESID_PP_FILE_READABLE_ROOT);
- }
-
- // Writable display
- if (!file.isRoot())
- {
- cbWritablePrompt = SystemWidgetHelpers.createCheckBox(
- composite_prompts, null, SystemFileResources.RESID_PP_FILE_WRITABLE_ROOT);
- }
- */
-
- // Hidden display
- if (!file.isRoot())
- {
- cbHiddenPrompt = SystemWidgetHelpers.createCheckBox(
- composite_prompts, null, SystemFileResources.RESID_PP_FILE_HIDDEN_LABEL, SystemFileResources.RESID_PP_FILE_HIDDEN_TOOLTIP);
- //((GridData)cbHiddenPrompt.getLayoutData()).horizontalSpan = nbrColumns;
- }
-
- if (!initDone)
- doInitializeFields();
-
- if (!file.isRoot() && file.showReadOnlyProperty())
- cbReadonlyPrompt.addSelectionListener(this);
-
- return composite_prompts;
- }
- /**
- * Get the input remote file object
- */
- protected IRemoteFile getRemoteFile()
- {
- Object element = getElement();
- return ((IRemoteFile)element);
- }
-
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- IRemoteFile file = getRemoteFile();
- // name
- String name = file.getName();
- if (name.length() > 100)
- {
- String shortName = name.substring(0, 97).concat("...");
- labelName.setText(shortName);
- }
- else
- {
- labelName.setText(name);
- }
-
- // type
- if (file.isRoot())
- labelType.setText(SystemFileResources.RESID_PP_FILE_TYPE_ROOT_VALUE);
- else if (file.isDirectory())
- labelType.setText(SystemFileResources.RESID_PP_FILE_TYPE_FOLDER_VALUE);
- else
- labelType.setText(SystemFileResources.RESID_PP_FILE_TYPE_FILE_VALUE);
- // path
- if (labelPath != null)
- {
- String path = file.getParentPath();
- if (path != null)
- labelPath.setText(file.getParentPath());
- }
- // size
- if (labelSize != null)
- labelSize.setText(Long.toString(file.getLength()));
- // modified
- if (labelModified != null)
- {
- Date date = file.getLastModifiedDate();
- if (date != null)
- {
- SimpleDateFormat datefmt = (SimpleDateFormat)DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
- labelModified.setText(datefmt.format(date));
- }
- }
- // readonly
- if (file.showReadOnlyProperty()) {
- if (cbReadonlyPrompt != null)
- {
- cbReadonlyPrompt.setSelection(!file.canWrite());
- wasReadOnly = !file.canWrite();
- if (wasReadOnly || file instanceof IVirtualRemoteFile)
- cbReadonlyPrompt.setEnabled(false);
- }
- }
- /*
- // readable
- if (cbReadablePrompt != null)
- {
- cbReadablePrompt.setSelection(file.canRead());
- cbReadablePrompt.setEnabled(false);
- }
- // writable
- if (cbWritablePrompt != null)
- {
- cbWritablePrompt.setSelection(file.canWrite());
- cbWritablePrompt.setEnabled(false);
- }
- */
- // hidden
- if (cbHiddenPrompt != null)
- {
- cbHiddenPrompt.setSelection(file.isHidden());
- cbHiddenPrompt.setEnabled(false);
- }
- }
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk()
- {
- boolean ok = super.performOk();
- if (ok && (cbReadonlyPrompt!=null) && cbReadonlyPrompt.getSelection() && !wasReadOnly)
- {
- try
- {
- getRemoteFile().getParentRemoteFileSubSystem().setReadOnly(getRemoteFile());
- RSEUIPlugin.getTheSystemRegistry().fireEvent(
- new org.eclipse.rse.model.SystemResourceChangeEvent(
- getRemoteFile(),ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE,null));
-
- } catch (RemoteFileIOException exc)
- {
- setMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IO_ERROR));
- } catch (RemoteFileSecurityException exc)
- {
- setMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR));
- }
- //catch (RemoteFileException e)
- //{
- //}
- }
- return ok;
- }
- /**
- * Validate all the widgets on the page
- * <p>
- * Subclasses should override to do full error checking on all
- * the widgets on the page.
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- public void widgetDefaultSelected(SelectionEvent event)
- {
-
- }
- public void widgetSelected(SelectionEvent event)
- {
-
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 26f646aea..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java
+++ /dev/null
@@ -1,954 +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.files.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ColumnLayoutData;
-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.files.ui.FileResources;
-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.subsystems.files.core.model.SystemFileTransferModeMapping;
-import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
-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;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IFileEditorMapping;
-import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.dialogs.FileExtensionDialog;
-import org.eclipse.ui.internal.registry.EditorRegistry;
-import org.eclipse.ui.internal.registry.FileEditorMapping;
-
-
-
-/**
- * "Files" Preference page within the Remote Systems preference node.
- * This allows users to specify, per file extension, whether files are
- * source or binary.
- */
-public class UniversalPreferencePage
- extends FieldEditorPreferencePage
- implements IWorkbenchPreferencePage, Listener, IPropertyListener
-{
-
-
-
- protected Label resourceTypeLabel;
- protected Table resourceTypeTable;
- protected Button addResourceTypeButton;
- protected Button removeResourceTypeButton;
- protected Button binaryButton;
- protected Button textButton;
- protected Button doSuperTransferButton;
-
- protected Button defaultBinaryButton;
- protected Button defaultTextButton;
-
- protected SystemFileTransferModeRegistry modeRegistry;
- protected IEditorRegistry editorRegistry;
-
- protected ArrayList modeMappings;
- protected ArrayList editorMappings;
- protected ArrayList imagesToDispose;
-
- protected Combo archiveTypeCombo;
- protected Combo defaultArchiveTypeCombo;
-
- protected Text downloadBufferSize;
- protected Text uploadBufferSize;
-
- /**
- * Constructor
- */
- public UniversalPreferencePage() {
- super(GRID);
- setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore());
-// setDescription(FileResources.RESID_PREF_UNIVERSAL_FILES_TITLE);
- }
-
- /**
- * @see org.eclipse.jface.preference.PreferencePage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- super.createControl(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, RSEUIPlugin.HELPPREFIX+"ufpf0000");
- }
-
-
- protected void createFieldEditors() {
-
- modeRegistry = SystemFileTransferModeRegistry.getDefault();
- editorRegistry = PlatformUI.getWorkbench().getEditorRegistry();
-
- modeMappings = new ArrayList();
- editorMappings = new ArrayList();
- imagesToDispose = new ArrayList();
-
- Composite parent = getFieldEditorParent();
-
-
-
- // define container and its layout
- Composite pageComponent = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- pageComponent.setLayout(layout);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- pageComponent.setLayoutData(data);
-
- // file types label
- resourceTypeLabel = new Label(pageComponent, SWT.LEFT);
- resourceTypeLabel.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_TYPE_LABEL);
- resourceTypeLabel.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_TYPE_TOOLTIP);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = 2;
- resourceTypeLabel.setLayoutData(data);
-
- // file types table
- resourceTypeTable = new Table(pageComponent, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
- resourceTypeTable.addListener(SWT.Selection, this);
- resourceTypeTable.addListener(SWT.DefaultSelection, this);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = resourceTypeTable.getItemHeight() * 12;
- data.widthHint = 200;
- data.grabExcessHorizontalSpace = true;
- resourceTypeTable.setLayoutData(data);
-
- // container for buttons
- Composite groupComponent= new Composite(pageComponent, SWT.NULL);
- groupComponent.setLayout(new GridLayout());
- data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- groupComponent.setLayoutData(data);
-
- // add button
- addResourceTypeButton = new Button(groupComponent, SWT.PUSH);
- addResourceTypeButton.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_ADDBUTTON_LABEL);
- addResourceTypeButton.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_ADDBUTTON_TOOLTIP);
- addResourceTypeButton.addListener(SWT.Selection, this);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, addResourceTypeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- addResourceTypeButton.setLayoutData(data);
-
- // remove button
- removeResourceTypeButton = new Button(groupComponent, SWT.PUSH);
- removeResourceTypeButton.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_REMOVEBUTTON_LABEL);
- removeResourceTypeButton.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_REMOVEBUTTON_TOOLTIP);
- removeResourceTypeButton.addListener(SWT.Selection, this);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, removeResourceTypeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- removeResourceTypeButton.setLayoutData(data);
-
-
- // transfer mode
- Group modeGroup = new Group(groupComponent, SWT.SHADOW_ETCHED_IN);
- modeGroup.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_LABEL);
- modeGroup.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TOOLTIP);
-
- layout = new GridLayout();
- layout.numColumns = 1;
- //layout.verticalSpacing = 10;
- layout.horizontalSpacing = 10;
- modeGroup.setLayout(layout);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- data.widthHint = 100;
- data.grabExcessHorizontalSpace = true;
- modeGroup.setLayoutData(data);
-
- // add the binary radio button
- binaryButton = new Button(modeGroup, SWT.RADIO);
- binaryButton.addListener(SWT.Selection, this);
- binaryButton.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_LABEL);
- binaryButton.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_TOOLTIP);
-
- // add the text radio button
- textButton = new Button(modeGroup, SWT.RADIO);
- textButton.addListener(SWT.Selection, this);
- textButton.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_LABEL);
- textButton.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_TOOLTIP);
-
-
-// default file transfer mode
- Group defaultModeGroup = new Group(groupComponent, SWT.SHADOW_ETCHED_IN);
- defaultModeGroup.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_DEFAULT_MODE_LABEL);
- defaultModeGroup.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_DEFAULT_MODE_TOOLTIP);
-
- layout = new GridLayout();
- layout.numColumns = 1;
- //layout.verticalSpacing = 10;
- layout.horizontalSpacing = 10;
- defaultModeGroup.setLayout(layout);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- data.widthHint = 100;
- data.grabExcessHorizontalSpace = true;
- defaultModeGroup.setLayoutData(data);
-
- // add the binary radio button
- defaultBinaryButton = new Button(defaultModeGroup, SWT.RADIO);
- defaultBinaryButton.addListener(SWT.Selection, this);
- defaultBinaryButton.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_LABEL);
- defaultBinaryButton.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_TOOLTIP);
-
- // add the text radio button
- defaultTextButton = new Button(defaultModeGroup, SWT.RADIO);
- defaultTextButton.addListener(SWT.Selection, this);
- defaultTextButton.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_LABEL);
- defaultTextButton.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_TOOLTIP);
-
-
-
- // Add the boolean field editor for users to choose whether
- // hidden files should be displayed
- BooleanFieldEditor showHiddenEditor = new BooleanFieldEditor(
- ISystemPreferencesConstants.SHOWHIDDEN,
- FileResources.RESID_PREF_UNIVERSAL_SHOWHIDDEN_LABEL,
- groupComponent);
-
- addField(showHiddenEditor);
-
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
-
- // download and upload buffer size
-
- Group transferGroup = new Group(parent, SWT.NULL);
- transferGroup.setText(FileResources.RESID_FILES_PREFERENCES_BUFFER);
-
- GridLayout tlayout = new GridLayout();
- tlayout.numColumns = 4;
- transferGroup.setLayout(tlayout);
- transferGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label downloadBufferLabel = new Label(transferGroup, SWT.NULL);
- downloadBufferLabel.setText(FileResources.RESID_FILES_PREFERENCES_DOWNLOAD_BUFFER_SIZE_LABEL);
- downloadBufferLabel.setToolTipText(FileResources.RESID_FILES_PREFERENCES_DOWNLOAD_BUFFER_SIZE_TOOLTIP);
-
- downloadBufferSize = SystemWidgetHelpers.createTextField(transferGroup, this);
- GridData tgd = new GridData();
- tgd.widthHint = 75;
- downloadBufferSize.setLayoutData(tgd);
- downloadBufferSize.setTextLimit(10);
- downloadBufferSize.setText(getDownloadBufferSize() + "");
- downloadBufferSize.addVerifyListener(new VerifyListener()
- {
- public void verifyText(VerifyEvent e)
- {
- e.doit = true;
- for (int loop = 0; loop < e.text.length(); loop++)
- {
- if (!Character.isDigit(e.text.charAt(loop)))
- e.doit = false;
- }
- }
- });
-
- Label uploadBufferLabel = new Label(transferGroup, SWT.NULL);
- uploadBufferLabel.setText(FileResources.RESID_FILES_PREFERENCES_UPLOAD_BUFFER_SIZE_LABEL);
- uploadBufferLabel.setToolTipText(FileResources.RESID_FILES_PREFERENCES_UPLOAD_BUFFER_SIZE_TOOLTIP);
- uploadBufferSize = SystemWidgetHelpers.createTextField(transferGroup, this);
- tgd = new GridData();
- tgd.widthHint = 75;
- uploadBufferSize.setLayoutData(tgd);
- uploadBufferSize.setTextLimit(10);
- uploadBufferSize.setText(getUploadBufferSize() +"");
- uploadBufferSize.addVerifyListener(new VerifyListener()
- {
- public void verifyText(VerifyEvent e)
- {
- e.doit = true;
- for (int loop = 0; loop < e.text.length(); loop++)
- {
- if (!Character.isDigit(e.text.charAt(loop)))
- {
- e.doit = false;
- }
- }
- }
- });
-
-
- // archive transfer
- Composite archiveGroup = new Composite(parent, SWT.NULL);
- GridLayout alayout = new GridLayout();
- alayout.numColumns = 2;
- archiveGroup.setLayout(alayout);
- archiveGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
-
- doSuperTransferButton = SystemWidgetHelpers.createCheckBox(archiveGroup, FileResources.RESID_SUPERTRANSFER_PREFS_ENABLE, this);
- GridData cdata = new GridData();
- cdata.horizontalSpan = 2;
- doSuperTransferButton.setLayoutData(cdata);
-
- archiveTypeCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(archiveGroup, null, FileResources.RESID_SUPERTRANSFER_PREFS_TYPE_LABEL, FileResources.RESID_SUPERTRANSFER_PREFS_TYPE_TOOLTIP);
- archiveTypeCombo.setItems(ArchiveHandlerManager.getInstance().getRegisteredExtensions());
-
- boolean doSuperTransfer = getDoSuperTransfer();
- doSuperTransferButton.setSelection(doSuperTransfer);
-
- String initialArchiveType = store.getString(ISystemPreferencesConstants.SUPERTRANSFER_ARC_TYPE);
- if (initialArchiveType == null ||
- !ArchiveHandlerManager.getInstance().isRegisteredArchive("test." + initialArchiveType))
- {
- initialArchiveType = ISystemPreferencesConstants.DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE;
- }
- archiveTypeCombo.setText(initialArchiveType);
- archiveTypeCombo.setTextLimit(6);
- archiveTypeCombo.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e)
- {
- setSuperTransferTypePreference(archiveTypeCombo.getText());
- }
- });
-
- archiveTypeCombo.setEnabled(doSuperTransfer);
-
-
-
-
- fillResourceTypeTable();
-
- if (resourceTypeTable.getItemCount() > 0) {
- resourceTypeTable.setSelection(0);
- resourceTypeTable.setFocus();
- }
-
- fillMode();
- updateEnabledState();
-
- (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent);
-
- }
-
- public void init(IWorkbench workbench)
- {
- }
-
- public static void initDefaults(IPreferenceStore store)
- {
- store.setDefault(ISystemPreferencesConstants.SHOWHIDDEN, false);
- store.setDefault(ISystemPreferencesConstants.DOSUPERTRANSFER, ISystemPreferencesConstants.DEFAULT_DOSUPERTRANSFER);
- store.setDefault(ISystemPreferencesConstants.SUPERTRANSFER_ARC_TYPE, ISystemPreferencesConstants.DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE);
- store.setDefault(ISystemPreferencesConstants.DOWNLOAD_BUFFER_SIZE, ISystemPreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE);
- store.setDefault(ISystemPreferencesConstants.UPLOAD_BUFFER_SIZE, ISystemPreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE);
- }
-
-
- /**
- * Fill the resource type table
- */
- protected void fillResourceTypeTable() {
-
- // Setup the columns (icon, type)
- TableLayout tableLayout = new TableLayout();
- resourceTypeTable.setLayout(tableLayout);
- resourceTypeTable.setHeaderVisible(true);
-
- ColumnLayoutData layoutData = new ColumnPixelData(20, false);
- tableLayout.addColumnData(layoutData);
- TableColumn tableCol = new TableColumn(resourceTypeTable, SWT.NONE);
- tableCol.setResizable(false);
- tableCol.setText("");
-
- layoutData = new ColumnWeightData(40, false);
- tableLayout.addColumnData(layoutData);
- tableCol = new TableColumn(resourceTypeTable, SWT.NONE);
- tableCol.setResizable(false);
- tableCol.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_TABLECOL_LABEL);
-
- IFileEditorMapping[] mappingArray = editorRegistry.getFileEditorMappings();
-
- for (int i = 0; i < mappingArray.length; i++) {
- newResourceTableItem(mappingArray[i], i, false);
- }
-
- int defaultFileTransferMode = getFileTransferModeDefaultPreference();
- if (defaultFileTransferMode == ISystemPreferencesConstants.FILETRANSFERMODE_BINARY)
- {
- defaultBinaryButton.setSelection(true);
- }
- else if (defaultFileTransferMode == ISystemPreferencesConstants.FILETRANSFERMODE_TEXT)
- {
- defaultTextButton.setSelection(true);
- }
- }
-
- /**
- * Used during reset defaults
- */
- protected void resetResourceTypeTable()
- {
- //clear table and reload defaults
- editorMappings.clear();
- modeMappings.clear();
- resourceTypeTable.setRedraw(false);
- resourceTypeTable.removeAll();
-
-
- IFileEditorMapping[] mappingArray = editorRegistry.getFileEditorMappings();
- for (int i = 0; i < mappingArray.length; i++)
- {
- newResourceTableItem(mappingArray[i], i, false);
- }
- resourceTypeTable.setRedraw(true);
-
- int defaultFileTransferMode = getFileTransferModeDefaultPreference();
- defaultBinaryButton.setSelection(defaultFileTransferMode == ISystemPreferencesConstants.FILETRANSFERMODE_BINARY);
- defaultTextButton.setSelection(defaultFileTransferMode == ISystemPreferencesConstants.FILETRANSFERMODE_TEXT);
-
- if (resourceTypeTable.getItemCount() > 0)
- {
- resourceTypeTable.setSelection(0);
- resourceTypeTable.setFocus();
- }
-
- fillMode();
- updateEnabledState();
- }
-
- protected void resetSuperTransferPrefs()
- {
- archiveTypeCombo.setText(ISystemPreferencesConstants.DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE);
- setSuperTransferTypePreference(ISystemPreferencesConstants.DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE);
- doSuperTransferButton.setSelection(ISystemPreferencesConstants.DEFAULT_DOSUPERTRANSFER);
- setDoSuperTransfer(ISystemPreferencesConstants.DEFAULT_DOSUPERTRANSFER);
- }
-
- protected void resetBufferSizePrefs()
- {
- downloadBufferSize.setText(ISystemPreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE + "");
- uploadBufferSize.setText(ISystemPreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE + "");
- }
-
- /**
- * Create a new <code>TableItem</code> to represent the resource
- * type editor description supplied.
- */
- protected TableItem newResourceTableItem(IFileEditorMapping mapping, int index, boolean selected) {
-
- editorMappings.add(index, ((FileEditorMapping)mapping).clone());
- modeMappings.add(index, modeRegistry.getMapping(mapping).clone());
-
- Image image = mapping.getImageDescriptor().createImage(false);
-
- if (image != null)
- imagesToDispose.add(image);
-
- TableItem item = new TableItem(resourceTypeTable, SWT.NULL, index);
- item.setImage(0, image);
- item.setText(1, mapping.getLabel());
-
- if (selected)
- resourceTypeTable.setSelection(index);
-
- return item;
- }
-
-
- /**
- * The preference page is going to be disposed. So deallocate all allocated
- * SWT resources that aren't disposed automatically by disposing the page
- * (i.e. fonts, cursors, etc). Subclasses should reimplement this method to
- * release their own allocated SWT resources.
- */
- public void dispose() {
-
- super.dispose();
-
- if(imagesToDispose != null) {
-
- for (Iterator e = imagesToDispose.iterator(); e.hasNext();) {
- ((Image)e.next()).dispose();
- }
-
- imagesToDispose = null;
- }
- }
-
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
-
- if ((event.widget == resourceTypeTable) && ((event.type == SWT.Selection) || (event.type == SWT.DefaultSelection))) {
- fillMode();
- }
- if ((event.widget == addResourceTypeButton) && (event.type == SWT.Selection)) {
- promptForResourceType();
- }
- else if ((event.widget == removeResourceTypeButton) && (event.type == SWT.Selection)) {
- removeSelectedResourceType();
- }
- else if ((event.widget == binaryButton) && (event.type == SWT.Selection)) {
- binaryButtonSelected();
- }
- else if ((event.widget == textButton) && (event.type == SWT.Selection)) {
- textButtonSelected();
- }
- else if ((event.widget == doSuperTransferButton) && (event.type == SWT.Selection))
- {
- doSuperTransferButtonSelected();
- }
- updateEnabledState();
- }
-
-
- /**
- * Fill the mode widgets
- */
- public void fillMode() {
-
- int index = resourceTypeTable.getSelectionIndex();
- SystemFileTransferModeMapping modeMapping = getModeMapping(index);
-
- if (modeMapping !=null)
- {
- if (modeMapping.isBinary()) {
- binaryButton.setSelection(true);
- textButton.setSelection(false);
- }
- else {
- binaryButton.setSelection(false);
- textButton.setSelection(true);
- }
- }
- }
-
-
- /**
- * Prompt for file type
- */
- public void promptForResourceType() {
-
- FileExtensionDialog dialog = new FileExtensionDialog(getControl().getShell());
-
- if (dialog.open() == Window.OK) {
-
- String name = dialog.getName();
- String extension = dialog.getExtension();
-
- if (extension.length() > 0) {
- addResourceType(name, extension);
- }
- }
- }
-
-
- /**
- * Remove the type from the table
- */
- public void removeSelectedResourceType() {
-
- int index = resourceTypeTable.getSelectionIndex();
-
- editorMappings.remove(index);
- modeMappings.remove(index);
-
- TableItem[] items = resourceTypeTable.getSelection();
-
- if (items.length > 0) {
- items[0].dispose();
- }
- }
-
-
- /**
- * Add a new resource type to the collection shown in the top of the page.
- * This is typically called after the extension dialog is shown to the user.
- */
- public void addResourceType(String newName, String newExtension) {
-
- // 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 = RSEUIPlugin.getPluginMessageFile();
- Shell shell = getControl().getShell();
- SystemMessage message = mf.getMessage(ISystemMessages.MSG_ERROR_EXTENSION_EMPTY);
- SystemMessageDialog.displayErrorMessage(shell, message);
- return;
- }
-
- if (newName == null || newName.length() < 1)
- newName = "*";
- else {
-
- int index = newName.indexOf('*');
-
- if (index > -1) {
-
- // 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 = RSEUIPlugin.getPluginMessageFile();
- Shell shell = getControl().getShell();
- SystemMessage message = mf.getMessage(ISystemMessages.MSG_ERROR_FILENAME_INVALID);
- SystemMessageDialog.displayErrorMessage(shell, message);
- return;
- }
- }
- }
-
- // Find the index at which to insert the new entry.
- String newFilename = (newName + "." + newExtension).toUpperCase();
- IFileEditorMapping resourceType;
- boolean found = false;
- int i = 0;
-
- while (i < editorMappings.size() && !found) {
-
- resourceType = (FileEditorMapping)(editorMappings.get(i));
-
- int result = newFilename.compareTo(resourceType.getLabel().toUpperCase());
-
- // if the type already exists
- if (result == 0) {
-
- MessageDialog.openInformation(getControl().getShell(),
- // TODO: Cannot use WorkbenchMessages -- it's internal
- FileResources.FileEditorPreference_existsTitle,
- // TODO: Cannot use WorkbenchMessages -- it's internal
- FileResources.FileEditorPreference_existsMessage);
- return;
- }
-
- if (result < 0)
- found = true;
- else
- i++;
- }
-
- // Create the new type and insert it
- resourceType = new FileEditorMapping(newName, newExtension);
- newResourceTableItem(resourceType, i, true);
- resourceTypeTable.setFocus();
- fillMode();
- }
-
-
- /**
- * Helper method to configure things when binary mode radio button
- * is selected
- */
- private void binaryButtonSelected() {
- //binaryButton.setSelection(true); // causes hang on linux
- //textButton.setSelection(false);
-
- int index = resourceTypeTable.getSelectionIndex();
- SystemFileTransferModeMapping modeMapping = getModeMapping(index);
- if (modeMapping != null)
- modeMapping.setAsBinary();
- }
-
-
- /**
- * Helper method to configure things when text mode is selected
- */
- private void textButtonSelected() {
- // textButton.setSelection(true); // causes hang on linux
- // binaryButton.setSelection(false);
-
- int index = resourceTypeTable.getSelectionIndex();
- SystemFileTransferModeMapping modeMapping = getModeMapping(index);
- if (modeMapping != null)
- modeMapping.setAsText();
- }
-
- private void doSuperTransferButtonSelected()
- {
- if (doSuperTransferButton.getSelection())
- {
- archiveTypeCombo.setEnabled(true);
- }
- else
- {
- archiveTypeCombo.setEnabled(false);
- }
- }
-
- /**
- * Gets the mode mapping given the editor mapping selected
- */
- private SystemFileTransferModeMapping getModeMapping(int index) {
-
- if (index >=0 && index < modeMappings.size())
- return (SystemFileTransferModeMapping)(modeMappings.get(index));
- else
- return null;
- }
-
-
- /**
- * Update enabled state of buttons
- */
- public void updateEnabledState() {
-
- boolean resourceTypeSelected = resourceTypeTable.getSelectionIndex() != -1;
- removeResourceTypeButton.setEnabled(resourceTypeSelected);
- }
-
-
- protected void performDefaults()
- {
- super.performDefaults();
- resetResourceTypeTable();
-
- resetSuperTransferPrefs();
- resetBufferSizePrefs();
- }
-
- /**
- * Stuff to do when ok is pressed
- */
- public boolean performOk() {
-
- super.performOk();
- if (modeMappings != null)
- {
- // first save the transfer mode registry
- Object[] array1 = modeMappings.toArray();
- SystemFileTransferModeMapping[] mappingArray1 = new SystemFileTransferModeMapping[array1.length];
-
- for (int i = 0; i < array1.length; i++) {
- mappingArray1[i] = (SystemFileTransferModeMapping)(array1[i]);
- }
-
- modeRegistry.setModeMappings(mappingArray1);
- modeRegistry.saveAssociations();
-
- // then save the editor registry
- Object[] array2 = editorMappings.toArray();
- FileEditorMapping[] mappingArray2 = new FileEditorMapping[array2.length];
-
- for (int j = 0; j < array2.length; j++) {
- mappingArray2[j] = (FileEditorMapping)(array2[j]);
- }
-
- ((EditorRegistry)editorRegistry).setFileEditorMappings(mappingArray2);
- ((EditorRegistry)editorRegistry).saveAssociations();
-
- // editorRegistry.removePropertyListener(this);
- int defaultFileTransferMode = ISystemPreferencesConstants.FILETRANSFERMODE_BINARY;
- if (defaultBinaryButton.getSelection())
- {
- defaultFileTransferMode = ISystemPreferencesConstants.FILETRANSFERMODE_BINARY;
- }
- else
- {
- defaultFileTransferMode = ISystemPreferencesConstants.FILETRANSFERMODE_TEXT;
- }
- setFileTransferModeDefaultPreference(defaultFileTransferMode);
- setDoSuperTransfer(doSuperTransferButton.getSelection());
- setSuperTransferTypePreference(archiveTypeCombo.getText());
- setDownloadBufferSize(downloadBufferSize.getText());
- setUploadBufferSize(uploadBufferSize.getText());
- }
- return true;
- }
-
- /**
- * Return whether to automatically detect, use binary or text during file transfer
- * for unspecified file types
- */
- public static int getFileTransferModeDefaultPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getInt(ISystemPreferencesConstants.FILETRANSFERMODEDEFAULT);
- }
- /**
- * Set the default file transfer mode to use for unspecified file types
- */
- public static void setFileTransferModeDefaultPreference(int defaultMode)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.FILETRANSFERMODEDEFAULT,defaultMode);
- savePreferenceStore();
- }
-
- /**
- * Return whether to compress directories before transferring them over the network
- */
- public static String getSuperTransferTypePreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getString(ISystemPreferencesConstants.SUPERTRANSFER_ARC_TYPE);
- }
- /**
- * Set the default as to whether or not to compress directories before remote transfer
- */
- public static void setSuperTransferTypePreference(String type)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.SUPERTRANSFER_ARC_TYPE,type);
- savePreferenceStore();
- }
-
- public static boolean getDoSuperTransfer()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER);
- }
-
- public static int getDownloadBufferSize()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- int result = store.getInt(ISystemPreferencesConstants.DOWNLOAD_BUFFER_SIZE);
- if (result == 0)
- {
- result = ISystemPreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE;
- }
- return result;
- }
-
- public static int getUploadBufferSize()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- int result = store.getInt(ISystemPreferencesConstants.UPLOAD_BUFFER_SIZE);
- if (result == 0)
- {
- result = ISystemPreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE;
- }
- return result;
- }
-
- public static void setDoSuperTransfer(boolean flag)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.DOSUPERTRANSFER,flag);
- savePreferenceStore();
- }
-
- public static void setDownloadBufferSize(String size)
- {
- setDownloadBufferSize(Integer.parseInt(size));
- }
-
- public static void setUploadBufferSize(String size)
- {
- setUploadBufferSize(Integer.parseInt(size));
- }
-
- public static void setDownloadBufferSize(int size)
- {
- if (size > 0)
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.DOWNLOAD_BUFFER_SIZE, size);
- savePreferenceStore();
- }
- }
-
- public static void setUploadBufferSize(int size)
- {
- if (size > 0)
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.UPLOAD_BUFFER_SIZE, size);
- savePreferenceStore();
- }
- }
-
- /**
- * Save the preference store
- */
- private static void savePreferenceStore()
- {
- /* DY: This was causing ClassCastException in 2.0
- * getPreferenceStore retutrns CompatibilityPreferenceStore now
- PreferenceStore store = (PreferenceStore)RSEUIPlugin.getDefault().getPreferenceStore();
- try {
- store.save();
- } catch (Exception exc)
- {
- System.out.println("Error saving preferences: " + exc.getMessage() + ": " + exc.getClass().getName());
- }
- */
- // ok, a couple hours of research leads me to believe this is now the new
- // thing to do... phil
- RSEUIPlugin.getDefault().savePluginPreferences();
- }
-
- /**
- * Listen for changes to the Editor Registry content.
- * Update our registry by changing the hashmap and saving the new
- * mappings on disk.
- * @see IPropertyListener#propertyChanged(Object, int)
- */
- public void propertyChanged(Object source, int propId) {
-
- if ((source instanceof IEditorRegistry) && (propId == IEditorRegistry.PROP_CONTENTS)) {
-
- // the OK button was pressed, and we need to incorporate changes from the File Editors preference page
- IEditorRegistry registry = (IEditorRegistry)source;
-
- IFileEditorMapping[] editorMappingArray = registry.getFileEditorMappings();
-
- for (int i = 0; i < editorMappingArray.length; i++) {
- }
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index d48be5098..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveDialog.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.resources;
-import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class AddToArchiveDialog extends CombineDialog {
-
- private String[] _relativePaths;
-
- public AddToArchiveDialog(Shell shell)
- {
- super(shell);
- setHelp(RSEUIPlugin.HELPPREFIX + "atad0000");
- }
-
- public AddToArchiveDialog(Shell shell, String title) {
- super(shell, title);
- setHelp(RSEUIPlugin.HELPPREFIX + "atad0000");
- }
-
- public AddToArchiveDialog(Shell shell, String title, String[] relativePaths)
- {
- super(shell, title);
- setHelp(RSEUIPlugin.HELPPREFIX + "atad0000");
- _relativePaths = relativePaths;
- ((AddToArchiveForm)form).setRelativePathList(_relativePaths);
- }
-
- public AddToArchiveDialog(
- Shell shell,
- String title,
- boolean prePopSelection)
- {
- super(shell, title, prePopSelection);
- setHelp(RSEUIPlugin.HELPPREFIX + "atad0000");
- }
-
- public AddToArchiveDialog(
- Shell shell,
- String title,
- boolean prePopSelection,
- String[] relativePaths)
- {
- super(shell, title, prePopSelection);
- setHelp(RSEUIPlugin.HELPPREFIX + "atad0000");
- _relativePaths = relativePaths;
- ((AddToArchiveForm)form).setRelativePathList(_relativePaths);
- }
-
-
- protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode)
- {
- super.getForm(fileMode);
- form = new AddToArchiveForm(getMessageLine(), this, fileMode, prePop, _relativePaths);
- return form;
- }
-
- public boolean getSaveFullPathInfo()
- {
- return ((AddToArchiveForm)form).getSaveFullPathInfo();
- }
-
- public String getRelativePath()
- {
- return ((AddToArchiveForm)form).getRelativePath();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveForm.java
deleted file mode 100644
index 4fa497441..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveForm.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.resources;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class AddToArchiveForm extends CombineForm
-{
-
- protected Button savePathInfoCheckBox;
- protected Combo relativeToCombo;
- protected String[] _relativePathList = null;
- protected String relativePath = "";
- protected boolean saveFullPathInfo = false;
-
- public AddToArchiveForm(
- ISystemMessageLine msgLine,
- Object caller,
- boolean fileMode)
- {
- super(msgLine, caller, fileMode);
- }
-
- public AddToArchiveForm(
- ISystemMessageLine msgLine,
- Object caller,
- boolean fileMode,
- boolean prePopSelection)
- {
- super(msgLine, caller, fileMode, prePopSelection);
- }
-
- public AddToArchiveForm(
- ISystemMessageLine msgLine,
- Object caller,
- boolean fileMode,
- boolean prePopSelection,
- String[] relativePaths)
-{
- super(msgLine, caller, fileMode, prePopSelection);
- _relativePathList = relativePaths;
- enableRelativePathFeature(relativePaths != null);
-}
-
- public void setRelativePathList(String[] relativePathList)
- {
- if (relativePathList != null)
- {
- _relativePathList = relativePathList;
- if (relativeToCombo != null) relativeToCombo.setItems(relativePathList);
- enableRelativePathFeature(true);
- }
- else
- {
- enableRelativePathFeature(false);
- }
- }
-
- protected void enableRelativePathFeature(boolean enable)
- {
- if (relativeToCombo != null) relativeToCombo.setEnabled(enable);
- if (savePathInfoCheckBox != null) savePathInfoCheckBox.setEnabled(enable);
- }
-
- /**
- * In this method, we populate the given SWT container with widgets and return the container
- * to the caller.
- * @param parent The parent composite
- */
- public Control createContents(Shell shell, Composite parent)
- {
- Control control = super.createContents(shell, parent);
-
- Composite composite = SystemWidgetHelpers.createComposite(parent, 1);
-
- savePathInfoCheckBox = SystemWidgetHelpers.createCheckBox(composite, null, FileResources.RESID_ADDTOARCHIVE_SAVEPATH_LABEL, FileResources.RESID_ADDTOARCHIVE_SAVEPATH_TOOLTIP);
- relativeToCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(composite, null, FileResources.RESID_ADDTOARCHIVE_RELATIVETO_LABEL, FileResources.RESID_ADDTOARCHIVE_RELATIVETO_LABEL);
-
- enableRelativePathFeature(_relativePathList != null);
-
- if (_relativePathList != null)
- {
- relativeToCombo.setItems(_relativePathList);
- relativeToCombo.setEnabled(false);
- }
-
- savePathInfoCheckBox.addSelectionListener(new SelectionListener() {
-
- public void widgetDefaultSelected(SelectionEvent e) {
- setPageComplete();
- relativeToCombo.setEnabled(savePathInfoCheckBox.getSelection());
- if (!savePathInfoCheckBox.getSelection()) relativePath = "";
- setSaveFullPathInfo();
- }
- public void widgetSelected(SelectionEvent e) {
- setPageComplete();
- relativeToCombo.setEnabled(savePathInfoCheckBox.getSelection());
- if (!savePathInfoCheckBox.getSelection()) relativePath = "";
- setSaveFullPathInfo();
- }
- });
-
- relativeToCombo.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- relativePath = relativeToCombo.getText();
- setPageComplete();
- }
- });
-
- return control;
- }
-
- public boolean isPageComplete()
- {
- boolean pathInfoChecked = (savePathInfoCheckBox != null && savePathInfoCheckBox.getSelection());
- boolean relPathSelectionMade = relativePath != null && !relativePath.equals("");
- boolean relPathComplete = savePathInfoCheckBox == null || !savePathInfoCheckBox.getEnabled();
- if (!relPathComplete)
- {
- if (pathInfoChecked)
- {
- relPathComplete = relPathSelectionMade;
- }
- else relPathComplete = true;
- }
- return super.isPageComplete() && relPathComplete;
- }
-
- protected void setSaveFullPathInfo()
- {
- saveFullPathInfo = savePathInfoCheckBox != null &&
- savePathInfoCheckBox.getEnabled() &&
- savePathInfoCheckBox.getSelection();
- }
-
- public String getRelativePath()
- {
- return relativePath;
- }
-
- public boolean getSaveFullPathInfo()
- {
- return saveFullPathInfo;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 1b2a9e8cb..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineDialog.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.resources;
-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;
-
-
-/**
- * A dialog to select or enter archive files.
- */
-public class CombineDialog extends SystemSelectRemoteFileOrFolderDialog {
-
- protected CombineForm form;
- protected boolean prePop = false;
-
- /**
- * Constructor.
- * @param shell the parent shell.
- */
- public CombineDialog(Shell shell)
- {
- super(shell, false);
- setHelp(RSEUIPlugin.HELPPREFIX + "cmbd0000");
- }
-
- /**
- * Constructor when you want to supply your own title.
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- */
- public CombineDialog(Shell shell, String title)
- {
- super(shell, title, false);
- setHelp(RSEUIPlugin.HELPPREFIX + "cmbd0000");
- }
-
- /**
- * Constructor when you want to supply your own title.
- *
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- * @param prePopSelection Whether or not the destination name
- * and type will be prepopulated with the selection, or given
- * a generic name and type.
- */
- public CombineDialog(Shell shell, String title, boolean prePopSelection)
- {
- super(shell, title, false);
- prePop = prePopSelection;
- if (form != null) form.setPrePopSelection(prePop);
- setHelp(RSEUIPlugin.HELPPREFIX + "cmbd0000");
- }
-
- /**
- * Constructor when you want to supply your own title.
- *
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- * @param prePopSelection Whether or not the destination name
- * and type will be prepopulated with the selection, or given
- * a generic name and type.
- * @param relativePaths The relative paths to be inserted as choices
- * in the relative path combo box. Null if you wish to disable this feature.
- */
- public CombineDialog(Shell shell, String title, boolean prePopSelection, String[] relativePaths)
- {
- super(shell, title, false);
- prePop = prePopSelection;
- if (form != null) form.setPrePopSelection(prePop);
- setHelp(RSEUIPlugin.HELPPREFIX + "cmbd0000");
- }
-
-
- protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode)
- {
- form = new CombineForm(getMessageLine(), this, fileMode, prePop);
- super.getForm(fileMode);
- return form;
- }
-
- public Object getOutputObject()
- {
- String fileName = form.getFileName();
-
- IRemoteFile file = (IRemoteFile) super.getOutputObject();
-
- // if a file was selected, get reference to its parent
- if (file.isFile()) {
- file = file.getParentRemoteFile();
- }
-
- try
- {
- // return a remote file that is the child of the parent folder
- return file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName);
- }
- catch (Exception e)
- {
- return null;
- }
- }
-
- public void setShowLocationPrompt(boolean show)
- {
- form.setShowLocationPrompt(show);
- }
-
- public void setLocationPrompt(String prompt)
- {
- form.setLocationPrompt(prompt);
- }
-
- public void setNameAndTypePrompt(String prompt)
- {
- form.setNameAndTypePrompt(prompt);
- }
-
- /**
- * Sets the extensions to disallow.
- * @param extensions the archive extensions that will not be allowed.
- */
- public void setDisallowedArchiveExtensions(String[] extensions) {
- form.setDisallowedArchiveExtensions(extensions);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index eccb96498..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineForm.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.resources;
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
-import org.eclipse.rse.filters.SystemFilterSimple;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-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;
-import org.eclipse.rse.ui.validators.ValidatorFileName;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Combo;
-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;
-
-
-/**
- * A dialog to select or enter archive files.
- */
-public class CombineForm extends SystemSelectRemoteFileOrFolderForm
-{
-
- protected Text fileNameText;
- protected Combo fileTypeCombo;
- protected Label nameAndTypeLabel;
- protected String fileName, fileType, initialFileName;
- protected ValidatorFileName validator;
- protected ValidatorArchiveName arcvalidator;
- protected boolean prePop;
- protected String nameAndTypePrompt = ""; //$NON-NLS-1$
- protected String[] disallowedExtensions;
-
- /**
- * Constructor for ExtractToForm
- */
- public CombineForm(ISystemMessageLine msgLine, Object caller, boolean fileMode)
- {
- super(msgLine, caller, fileMode);
- validator = new ValidatorFileName();
- arcvalidator = new ValidatorArchiveName();
- prePop = false;
- }
-
- public CombineForm(ISystemMessageLine msgLine, Object caller, boolean fileMode, boolean prePopSelection)
- {
- super(msgLine, caller, fileMode);
-
- validator = new ValidatorFileName();
- arcvalidator = new ValidatorArchiveName();
- prePop = prePopSelection;
- }
-
- /**
- * In this method, we populate the given SWT container with widgets and return the container
- * to the caller.
- * @param parent The parent composite
- */
- public Control createContents(Shell shell, Composite parent)
- {
- Control control = super.createContents(shell, parent);
-
- Composite composite = SystemWidgetHelpers.createComposite(parent, 1);
-
- nameAndTypeLabel = SystemWidgetHelpers.createLabel(composite, nameAndTypePrompt);
- Composite subcomp1 = SystemWidgetHelpers.createComposite(composite, 2);
- fileNameText = SystemWidgetHelpers.createLabeledTextField(
- subcomp1, null, FileResources.RESID_COMBINE_NAME_LABEL, FileResources.RESID_COMBINE_NAME_TOOLTIP);
- fileTypeCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(subcomp1, null, FileResources.RESID_COMBINE_TYPE_LABEL, FileResources.RESID_COMBINE_TYPE_TOOLTIP);
-
- String[] allowedExtensions = getAllowedArchiveExtensions();
-
- if (allowedExtensions != null && allowedExtensions.length != 0) {
- fileTypeCombo.setItems(allowedExtensions);
- fileTypeCombo.select(0);
- fileType = fileTypeCombo.getText();
- }
-
- fileNameText.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- fileName = fileNameText.getText();
- setPageComplete();
- if (fileName.indexOf(".") != -1) //$NON-NLS-1$
- {
- SystemMessage isValidMsg = arcvalidator.validate(fileName);
- if (isValidMsg == null)
- {
- int i = fileName.lastIndexOf("."); //$NON-NLS-1$
- fileType = fileName.substring(i+1);
- fileTypeCombo.setText(fileType);
- }
- }
- }
- });
-
- fileTypeCombo.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- fileType = fileTypeCombo.getText();
- setPageComplete();
- }
- });
-
- if (fileName != null)
- {
- fileNameText.setText(fileName);
- }
-
- return control;
- }
-
- protected String[] getAllowedArchiveExtensions() {
-
- String[] allExtensions = ArchiveHandlerManager.getInstance().getRegisteredExtensions();
-
- ArrayList list = new ArrayList();
-
- for (int i = 0; i < allExtensions.length; i++) {
-
- String extension = allExtensions[i];
-
- boolean keep = true;
-
- for (int j = 0; j < disallowedExtensions.length; j++) {
-
- if (disallowedExtensions[j].toLowerCase().equals(extension)) {
-
- keep = false;
- break;
- }
- }
-
- if (keep) {
- list.add(extension);
- }
- }
-
- String[] allowedExtensions = new String[list.size()];
-
- for (int i = 0; i < list.size(); i++) {
- allowedExtensions[i] = (String)(list.get(i));
- }
-
- return allowedExtensions;
- }
-
- public String[] getDisallowedArchiveExtensions() {
- return disallowedExtensions;
- }
-
- /**
- * Sets the extensions to disallow.
- * @param extensions the archive extensions that will not be allowed.
- */
- public void setDisallowedArchiveExtensions(String[] extensions) {
- this.disallowedExtensions = extensions;
- }
-
- /**
- * Completes processing of the dialog.
- * Intercept of parent method.
- *
- * @return true if no errors
- */
- public boolean verify()
- {
- // This method added by Phil to issue warning msg for existing member
- boolean ok = super.verify();
-
- if (ok)
- {
- IRemoteFile file = (IRemoteFile)getSelectedObject();
- IRemoteFile saveasFile = null;
-
- try
- {
- saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, getFileName());
- }
- catch (Exception e)
- {
- }
- }
- return ok;
- }
-
- public boolean isPageComplete()
- {
- String nameToCheck = null;
-
- if (fileName == null) {
- nameToCheck = ""; //$NON-NLS-1$
- }
- else {
- nameToCheck = fileName;
- }
-
- SystemMessage errMsg = validator.validate(nameToCheck);
-
- if (errMsg != null)
- {
- setErrorMessage(errMsg);
- return false;
- }
- else
- {
- clearErrorMessage();
- }
-
- return fileTypeCombo != null &&
- fileTypeCombo.getText().length() > 0 &&
- fileNameText != null &&
- fileNameText.getText().length() > 0 &&
- super.isPageComplete();
- }
-
- public String getFileName() {
-
- if (fileName.endsWith("." + fileType)) { //$NON-NLS-1$
- return fileName;
- }
- else {
- return fileName + "." + fileType; //$NON-NLS-1$
- }
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- /**
- * User selected something in the tree.
- * This is an intercept of the parent's method so we can process a member selection, and
- * copy the selected member's name to the entry field.
- */
- public void selectionChanged(SelectionChangedEvent e)
- {
- super.selectionChanged(e);
- clearErrorMessage();
- ISelection selection = e.getSelection();
- Object selectedObject = getFirstSelection(e.getSelection());
- if (selectedObject != null && selectedObject instanceof IRemoteFile)
- {
- IRemoteFile remoteFile = (IRemoteFile)selectedObject;
-
- ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(selectedObject);
- if ((remoteAdapter != null))
- {
- Object parentFile = remoteFile;
-
- remoteAdapter = getRemoteAdapter(parentFile);
- if (remoteAdapter != null)
- {
- String fullPath = remoteAdapter.getAbsoluteName(parentFile);
- setNameText(fullPath);
- outputObjects = new Object[] {parentFile};
- setPageComplete();
- SystemMessage selectionMsg = null;
- if (selectionValidator != null)
- selectionMsg = selectionValidator.isValid(outputConnection, getSelections(selection), getRemoteAdapters(selection));
-
- if (selectionMsg != null)
- {
- valid = false;
- setErrorMessage(selectionMsg);
- setPageComplete();
- }
- }
- }
- }
- }
-
- public void setPreSelection(IRemoteFile selection)
- {
- if (selection.isDirectory())
- {
- super.setPreSelection(selection);
- }
- else if (selection.isFile())
- {
- IRemoteFile parentFile = selection.getParentRemoteFile();
-
- if (parentFile.isDirectory())
- {
- super.setPreSelection(parentFile);
- }
- }
- if (prePop)
- {
- String file = selection.getName();
- int i = file.lastIndexOf("."); //$NON-NLS-1$
- if (i == -1)
- {
- fileName = file;
- fileType = ""; //$NON-NLS-1$
- }
- else
- {
- fileName = file.substring(0,i);
- fileType = selection.getExtension();
- }
- }
- else
- {
- fileName = ""; //$NON-NLS-1$
- }
- }
-
- /**
- * Set the root folder from which to start listing folders or files.
- * This version identifies the folder via a connection object and absolute path.
- * There is another overload that identifies the folder via a single IRemoteFile object.
- *
- * @param connection The connection to the remote system containing the root folder
- * @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IHost connection, String folderAbsolutePath)
- {
- setDefaultConnection(connection);
- setShowNewConnectionPrompt(true);
- setAutoExpandDepth(0);
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection);
- IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemConfiguration();
- RemoteFileFilterString rffs = new RemoteFileFilterString(ssf);
- rffs.setShowFiles(fileMode); // no files if in folders mode
- rffs.setShowSubDirs(!fileMode || !filesOnlyMode); // yes folders, always, for now
- if (fileTypes != null)
- rffs.setFile(fileTypes);
-
- // set the default filters we will show when the user expands a connection...
- String filterName = null;
- SystemFilterSimple filter = null;
- int filterCount = showRootFilter ? 2 : 1;
- if (preSelectRoot)
- filterCount = 1;
- ISystemFilter[] filters = new ISystemFilter[filterCount];
- int idx = 0;
-
- // filter one: "Root files"/"Root folders" or "Drives"
- if (showRootFilter)
- {
- if (ssf.isUnixStyle())
- {
- if (!preSelectRoot)
- {
- // "Root files" or "Folders"
- filterName = fileMode ? SystemFileResources.RESID_FILTER_ROOTFILES : SystemFileResources.RESID_FILTER_ROOTFOLDERS;
- //rffs.setPath(ssf.getSeparator()); // defect 43492. Show the root not the contents of the root
- }
- else
- {
- filterName = SystemFileResources.RESID_FILTER_ROOTS; // "Roots"
- }
- }
- else
- filterName = fileMode ? SystemFileResources.RESID_FILTER_DRIVES : SystemFileResources.RESID_FILTER_DRIVES;
- filter = new SystemFilterSimple(filterName);
- filter.setParent(ss);
- filter.setFilterString(rffs.toString());
- filters[idx++] = filter;
- //System.out.println("FILTER 1: " + filter.getFilterString());
- if (preSelectRoot)
- {
- preSelectFilter = filter;
- preSelectFilterChild = folderAbsolutePath;
- //RSEUIPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath);
- }
- }
-
- if (!preSelectRoot)
- {
-
- // filter two: "\folder1\folder2"
- rffs.setPath(folderAbsolutePath);
-
- filter = new SystemFilterSimple(rffs.toStringNoSwitches());
- filter.setParent(ss);
- filter.setFilterString(rffs.toString());
- filters[idx] = filter;
-
- preSelectFilter = filter;
- //RSEUIPlugin.logInfo("FILTER 2: " + filter.getFilterString());
- }
- inputProvider.setFilterString(null); // undo what ctor did
- inputProvider.setQuickFilters(filters);
- }
-
- public void setPrePopSelection(boolean prePopSelection)
- {
- prePop = prePopSelection;
- }
-
- public void setNameAndTypePrompt(String prompt)
- {
- nameAndTypePrompt = prompt;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/DefaultMountPathMapper.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/DefaultMountPathMapper.java
deleted file mode 100644
index c3ded4f21..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/DefaultMountPathMapper.java
+++ /dev/null
@@ -1,44 +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.files.ui.resources;
-
-public class DefaultMountPathMapper implements ISystemMountPathMapper
-{
-
- public boolean handlesMappingFor(String hostname, String remotePath)
- {
- return false;
- }
-
- public String getActualHostFor(String hostname, String remotePath)
- {
- return hostname;
- }
-
- public String getWorkspaceMappingFor(String hostname, String remotePath)
- {
- return remotePath;
- }
-
- /**
- * Returns the remote path.
- */
- public String getMountedMappingFor(String hostname, String remotePath)
- {
- return remotePath;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 46ebb62f3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToDialog.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.resources;
-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;
-
-
-public class ExtractToDialog extends SystemSelectRemoteFileOrFolderDialog {
-
- /**
- * Constructor
- *
- * @param shell The shell to hang the dialog off of
- * @param fileMode True if selecting files, false if selecting folders
- *
- */
-
- private ExtractToForm form;
-
-
- public ExtractToDialog(Shell shell)
- {
- super(shell, false);
- setHelp(RSEUIPlugin.HELPPREFIX + "exdi0000");
- }
- /**
- * Constructor when you want to supply your own title.
- *
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- * @param fileMode True if selecting files, false if selecting folders
- */
- public ExtractToDialog(Shell shell, String title)
- {
- super(shell, title, false);
- setHelp(RSEUIPlugin.HELPPREFIX + "exdi0000");
- }
-
- protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode)
- {
- form = new ExtractToForm(getMessageLine(), this, fileMode);
- super.getForm(fileMode);
- return form;
- }
-
- public Object getOutputObject()
- {
- IRemoteFile file = (IRemoteFile) super.getOutputObject();
- if (file.exists())
- {
- return file;
- }
- return null;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index ea74133d2..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToForm.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.resources;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
-import org.eclipse.rse.filters.SystemFilterSimple;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-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;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class ExtractToForm extends SystemSelectRemoteFileOrFolderForm
-{
-
- private String fileName;
- private ValidatorFolderName validator;
-
- /**
- * Constructor for ExtractToForm
- */
- public ExtractToForm(ISystemMessageLine msgLine, Object caller, boolean fileMode)
- {
- super(msgLine, caller, fileMode);
-
- validator = new ValidatorFolderName();
- }
-
- /**
- * In this method, we populate the given SWT container with widgets and return the container
- * to the caller.
- * @param parent The parent composite
- */
- public Control createContents(Shell shell, Composite parent)
- {
- Control control = super.createContents(shell, parent);
-
-// Composite composite = SystemWidgetHelpers.createComposite(parent, 2);
-// SystemWidgetHelpers.createLabel(composite, SystemResources.RESID_NEWFILE_NAME_ROOT_LABEL);
-// fileNameText = SystemWidgetHelpers.createTextField(composite, null);
-
-// fileNameText = SystemWidgetHelpers.createLabeledTextField(
-// composite, null, RSEUIPlugin.getResourceBundle(), ISystemConstants.RESID_EXTRACTTO_NAME_ROOT);
-
-
-// fileNameText.addModifyListener(new ModifyListener() {
-// public void modifyText(ModifyEvent e) {
-// fileName = fileNameText.getText();
-// setPageComplete();
-// }
-// });
-
-// if (fileName != null)
-// {
-// fileNameText.setText(fileName);
-// }
-
- return control;
- }
-
- /**
- * Completes processing of the dialog.
- * Intercept of parent method.
- *
- * @return true if no errors
- */
- public boolean verify()
- {
- // This method added by Phil to issue warning msg for existing member
- //System.out.println("Inside verify");
- boolean ok = super.verify();
-/* if (ok)
- {
- IRemoteFile file = (IRemoteFile) getSelectedObject();
- IRemoteFile saveasFile = null;
- try
- {
- saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName);
- }
- catch (Exception e)
- {
- }
-
- //System.out.println("...saveasMbr null? "+ (saveasMbr==null));
- if (saveasFile != null && saveasFile.exists())
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS);
- msg.makeSubstitution(fileName);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- ok = dlg.openQuestionNoException();
- }
-
- }*/
- return ok;
- }
-
- public boolean isPageComplete()
- {
- String errMsg = null; //validator.isValid(fileName);
-
- if (errMsg != null)
- {
- setErrorMessage(errMsg);
- return false;
- }
- else
- {
- if (valid) clearErrorMessage();
- return valid;
- }
-
- }
-
- public String getFileName()
- {
- return fileName;
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- /**
- * User selected something in the tree.
- * This is an intercept of the parent's method so we can process a member selection, and
- * copy the selected member's name to the entry field.
- */
- public void selectionChanged(SelectionChangedEvent e)
- {
- super.selectionChanged(e);
- valid = true;
- ISelection selection = e.getSelection();
- Object selectedObject = getFirstSelection(selection);
- if (selectedObject != null && selectedObject instanceof IRemoteFile)
- {
- IRemoteFile remoteFile = (IRemoteFile)selectedObject;
- fileName = remoteFile.getName();
- if (remoteFile.isRoot())
- {
- if (fileName.endsWith("\\")) fileName = fileName.substring(0,2); //$NON-NLS-1$
- }
- ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(selectedObject);
- if ((remoteAdapter != null))
- {
-
- Object parentFile = remoteFile;
-
- remoteAdapter = getRemoteAdapter(parentFile);
- if (remoteAdapter != null)
- {
- String fullPath = remoteAdapter.getAbsoluteName(parentFile);
- setNameText(fullPath);
- outputObjects = new Object[] {parentFile};
-
- SystemMessage selectionMsg = null;
-
- if (selectionValidator != null)
- selectionMsg = selectionValidator.isValid(outputConnection, getSelections(selection), getRemoteAdapters(selection));
-
- if (selectionMsg != null)
- {
- valid = false;
- setErrorMessage(selectionMsg);
- }
- setPageComplete();
- }
- }
- }
- else if (selectedObject != null)
- {
- valid = false;
- setPageComplete();
- }
- }
-
- public void setPreSelection(IRemoteFile selection)
- {
- if (selection.isDirectory())
- {
- super.setPreSelection(selection);
- }
- else if (selection.isFile())
- {
- IRemoteFile parentFile = selection.getParentRemoteFile();
-
- if (parentFile.isDirectory())
- {
- super.setPreSelection(parentFile);
- }
-
- fileName = parentFile.getName();
- }
- }
-
- /**
- * Set the root folder from which to start listing folders or files.
- * This version identifies the folder via a connection object and absolute path.
- * There is another overload that identifies the folder via a single IRemoteFile object.
- *
- * @param connection The connection to the remote system containing the root folder
- * @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IHost connection, String folderAbsolutePath)
- {
- setDefaultConnection(connection);
- setShowNewConnectionPrompt(true);
- setAutoExpandDepth(0);
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection);
- IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemConfiguration();
- RemoteFileFilterString rffs = new RemoteFileFilterString(ssf);
- rffs.setShowFiles(fileMode); // no files if in folders mode
- rffs.setShowSubDirs(!fileMode || !filesOnlyMode); // yes folders, always, for now
- if (fileTypes != null)
- rffs.setFile(fileTypes);
-
- // set the default filters we will show when the user expands a connection...
- String filterName = null;
- SystemFilterSimple filter = null;
- int filterCount = showRootFilter ? 2 : 1;
- if (preSelectRoot)
- filterCount = 1;
- ISystemFilter[] filters = new ISystemFilter[filterCount];
- int idx = 0;
-
- // filter one: "Root files"/"Root folders" or "Drives"
- if (showRootFilter)
- {
- if (ssf.isUnixStyle())
- {
- if (!preSelectRoot)
- {
- // "Root files" or "Folders"
- filterName = fileMode ? SystemFileResources.RESID_FILTER_ROOTFILES : SystemFileResources.RESID_FILTER_ROOTFOLDERS;
- //rffs.setPath(ssf.getSeparator()); // defect 43492. Show the root not the contents of the root
- }
- else
- {
- filterName = SystemFileResources.RESID_FILTER_ROOTS; // "Roots"
- }
- }
- else
- filterName = fileMode ? SystemFileResources.RESID_FILTER_DRIVES : SystemFileResources.RESID_FILTER_DRIVES;
- filter = new SystemFilterSimple(filterName);
- filter.setParent(ss);
- filter.setFilterString(rffs.toString());
- filters[idx++] = filter;
- //System.out.println("FILTER 1: " + filter.getFilterString());
- if (preSelectRoot)
- {
- preSelectFilter = filter;
- preSelectFilterChild = folderAbsolutePath;
- //RSEUIPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath);
- }
- }
-
- if (!preSelectRoot)
- {
-
- // filter two: "\folder1\folder2"
- rffs.setPath(folderAbsolutePath);
-
- filter = new SystemFilterSimple(rffs.toStringNoSwitches());
- filter.setParent(ss);
- filter.setFilterString(rffs.toString());
- filters[idx] = filter;
-
- preSelectFilter = filter;
- //RSEUIPlugin.logInfo("FILTER 2: " + filter.getFilterString());
- }
- inputProvider.setFilterString(null); // undo what ctor did
- inputProvider.setQuickFilters(filters);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/FileSelectionDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/FileSelectionDialog.java
deleted file mode 100644
index 5a74ddf2b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/FileSelectionDialog.java
+++ /dev/null
@@ -1,86 +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.files.ui.resources;
-import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog;
-import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Dialog used to select a file based on a dialog similar to the SaveAs
- */
-public class FileSelectionDialog
- extends SystemSelectRemoteFileOrFolderDialog
- implements ISaveAsDialog
-{
-
- public static final String Copyright =
- "(C) Copyright IBM Corp. 2003 All Rights Reserved.";
-
- /**
- * Constructor
- *
- * @param shell The shell to hang the dialog off of
- * @param fileMode True if selecting files, false if selecting folders
- *
- */
-
- private FileSelectionForm form;
-
- protected FileSelectionDialog(Shell shell)
- {
- super(shell, false);
- }
- /**
- * Constructor when you want to supply your own title.
- *
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- * @param fileMode True if selecting files, false if selecting folders
- */
- protected FileSelectionDialog(Shell shell, String title)
- {
- super(shell, title, true);
- }
-
- public static FileSelectionDialog getFileSelectionDialog(
- Shell shell,
- String title)
- {
- return new FileSelectionDialog(shell, title);
- }
-
- public static FileSelectionDialog getFileSelectionDialog(Shell shell)
- {
- return new FileSelectionDialog(shell);
- }
-
- protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode)
- {
- form = new FileSelectionForm(getMessageLine(), this, fileMode);
- super.getForm(fileMode);
- return form;
- }
- /**
- * Return file name specified
- * @return File name
- */
- public String getFileName()
- {
- return form.getFileName();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/FileSelectionForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/FileSelectionForm.java
deleted file mode 100644
index 6cb617bb6..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/FileSelectionForm.java
+++ /dev/null
@@ -1,74 +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.files.ui.resources;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-
-/**
- * Form class for selecting a file based on the SaveAS
- */
-public class FileSelectionForm extends SaveAsForm
-{
- public static final String Copyright =
- "(C) Copyright IBM Corp. 2003 All Rights Reserved.";
-
- /**
- * Constructor for FileSelectionForm
- */
- public FileSelectionForm(
- ISystemMessageLine msgLine,
- Object caller,
- boolean fileMode)
- {
- super(msgLine, caller, fileMode);
- }
-
- /**
- * Completes processing of the dialog.
- * Intercept of parent method.
- *
- * @return true if no errors
- */
- public boolean verify()
- {
-
- return true;
- }
-
- public boolean isPageComplete()
- {
- //String errMsg = validator.isValid(fileName);
-
- //if (errMsg != null)
- //{
- // setErrorMessage(errMsg);
- // return false;
- //}
- //else
- //{
- // clearErrorMessage();
- //}
-
- return fileNameText != null
- && fileNameText.getText().length() > 0;
- //&& super.isPageComplete();
- }
- public String getFileName()
- {
- return fileName;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISaveAsDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISaveAsDialog.java
deleted file mode 100644
index 6e2d36d88..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISaveAsDialog.java
+++ /dev/null
@@ -1,33 +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.files.ui.resources;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-public interface ISaveAsDialog {
-
-
-
- public Object getOutputObject();
-
- public void setMultipleSelectionMode(boolean mode);
-
- public int open();
-
- public void setPreSelection(IRemoteFile selection);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemCachedRemoteResource.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemCachedRemoteResource.java
deleted file mode 100644
index fc3e2b8f9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemCachedRemoteResource.java
+++ /dev/null
@@ -1,86 +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.files.ui.resources;
-
-/**
- * This is the cached remote resource.
- */
-public interface ISystemCachedRemoteResource {
-
-
-
- /**
- * Constant indicating no changes.
- */
- public static final int CHANGES_NONE = 0;
-
- /**
- * Constant indicating local copy has changed, but not server copy.
- */
- public static final int CHANGES_OUTGOING = 1;
-
- /**
- * Constant indicating server copy has changed, but not local copy.
- */
- public static final int CHANGES_INCOMING = 2;
-
- /**
- * Constant indicating both local and server copy have changed.
- */
- public static final int CHANGES_CONFLICT = 3;
-
- /**
- * Get the last modified time on the server. Calling this when connected will
- * query it from the server, but calling it in disconnected mode will
- * query it from disk.
- * @return the last modified time on the server
- */
- public long lastRemoteModified();
-
- /**
- * Get the last modified time on the client.
- * @return the last modified time on the client
- */
- public long lastLocalModified();
-
- /**
- * Get the last time of download or synchronization.
- * @return the time of the last download or synchronization
- */
- public long lastSuccessfulSynch();
-
- /**
- * Returns whether the local and remote copies are synchronized.
- * @return <code>true</code> if the local and remote copies are synchronized,
- * <code>false</code> otherwise.
- */
- public boolean isSynchronized();
-
- /**
- * Get the state of the cache.
- * @return CHANGES_NONE if both local and remote copies are in sync,
- * CHANGES_OUTGOING if the local copy has changed but not the server copy,
- * CHANGES_INCOMING if the server copy has changed but not the local copy,
- * CHANGES_CONFLICT if both the local copy and server copy have changed.
- */
- public int getState();
-
- /**
- * Dispose of the cache.
- */
- public void dispose();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemMountPathMapper.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemMountPathMapper.java
deleted file mode 100644
index 99c09e060..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemMountPathMapper.java
+++ /dev/null
@@ -1,68 +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.files.ui.resources;
-
-/**
- * This interface is used to provide a common way of mapping mounted resources to the temp files project.
- * Since local mounts can change or be removed (i.e. disconnected) this provides a way for a vender to
- * remap a particular resource if the vender software is able to determine the new mount location.
- * Implementors of this interface should register their mappers via the mountPathMapper extension point.
- */
-public interface ISystemMountPathMapper
-{
-
- /**
- * Indicates whether this mapper handles remapping of the specified resource
- * @param hostname the remote host
- * @param remotePath the remote path as seen by the local file subsystem
- * @return whether this mapper handles remapping of the specified remote resource
- */
- public boolean handlesMappingFor(String hostname, String remotePath);
-
- /**
- * Returns the qualified workspace path for a replica of this mounted file. Since the local
- * system path is not unique for mounted files, this allows a vender to make sure it is unique.
- * The workspace mapping should always be the remote path on the originating host.
- *
- * @param hostname the remote host
- * @param remotePath the remote path as seen by the local file subsystem
- * @return the corresponding workspace replica mapping
- */
- public String getWorkspaceMappingFor(String hostname, String remotePath);
-
-
- /**
- * Returns the corresponding hostname for the specified path on the specified host. If a file is mounted
- * via local, then the actual host containing the file will not be local. If there is no mapping, then
- * the hostname will be the same as the argument.
- * @param hostname the system host
- * @param remotePath the path on the system host
- * @return the actual host that contains the specified remote path
- */
- public String getActualHostFor(String hostname, String remotePath);
-
- /**
- * Returns the local system path that can be used for copying the replica back to remote. When null
- * is returned RSE the file is treated as no longer available and thus remote uploads do not occur. Venders
- * who would like to disable uploads for some period can implement this to return null during that period.
- *
- * @param hostname the remote host
- * @param remotePath the remote path as seen by the local file subsystem
- * @return the local system path that represents the mounted file
- */
- public String getMountedMappingFor(String hostname, String remotePath);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteCoreConstants.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteCoreConstants.java
deleted file mode 100644
index 515e61fb7..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteCoreConstants.java
+++ /dev/null
@@ -1,27 +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.files.ui.resources;
-
-/**
- * Interface that contains all constants needed for remote resource management.
- */
-public interface ISystemRemoteCoreConstants {
-
-
-
- public static final int M_MARKERS_DIRTY = 0x1000;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditConstants.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditConstants.java
deleted file mode 100644
index e308ba154..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditConstants.java
+++ /dev/null
@@ -1,55 +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.files.ui.resources;
-
-public interface ISystemRemoteEditConstants {
-
-
-
- // Constants for remote editing
- public static final String REMOTE_FILE_OBJECT_KEY = "remote_file_object_key";
-
- public static final String REMOTE_FILE_SUBSYSTEM_KEY = "remote_file_subsystem_key";
- public static final String REMOTE_FILE_PATH_KEY = "remote_file_path_key";
-
- public static final String REMOTE_FILE_MODIFIED_STAMP = "remote_file_modified_stamp";
- public static final String REMOTE_FILE_BINARY_TRANSFER = "remote_file_binary_transfer";
- public static final String TEMP_FILE_DIRTY = "temp_file_dirty";
- public static final String TEMP_FILE_READONLY = "temp_file_readonly";
-
- public static final String DOWNLOAD_FILE_MODIFIED_STAMP = "download_file_modified_stamp";
- // for mounted mappings
- public static final String REMOTE_FILE_MOUNTED = "remote_file_mounted";
- public static final String RESOLVED_MOUNTED_REMOTE_FILE_PATH_KEY = "resolved_mounted_remote_file_path_key";
- public static final String RESOLVED_MOUNTED_REMOTE_FILE_HOST_KEY = "resolved_mounted_remote_file_host_key";
-
-
- // Constants related to how the editor will set the document content
- public static final String LOAD_TYPE_KEY = "load_type_key";
- public static final String LOAD_TYPE_USE_STRING = "load_type_use_string";
-
-
- // Universal remote editing profile
- public static final String DEFAULT_EDITOR_PROFILE = "default";
- public static final String UNIVERSAL_EDITOR_PROFILE = "universal";
- public static final String UNIVERSAL_LOCAL_EDITOR_PROFILE = "universallocal";
-
-
- // Local relative directory for various editor actions
- public static final String EDITOR_COMPARE_LOCATION = "/compare/";
- public static final String EDITOR_GET_FILE_LOCATION = "/get/";
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResource.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResource.java
deleted file mode 100644
index 19da1268c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResource.java
+++ /dev/null
@@ -1,36 +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.files.ui.resources;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * This interface defines some common functionality required from all remote
- * resources for edit, irrespective of whether the remote system is an
- * OS/400, Windows, Linux or Unix operating system.
- */
-public interface ISystemRemoteEditResource extends ISystemRemoteResource {
-
-
-
- /**
- * Returns the local resource. The local resource does not exist if the method
- * returns null, or if calling exists() on the returned resource returs false.
- * @return the local resource.
- */
- public IFile getLocalResource();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResourceManager.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResourceManager.java
deleted file mode 100644
index 18a8787bd..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResourceManager.java
+++ /dev/null
@@ -1,56 +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.files.ui.resources;
-
-/**
- * This manager class manages remote resources.
- */
-public interface ISystemRemoteEditResourceManager extends ISystemRemoteManager {
-
-
-
- /**
- * Store a remote edit object with the given remote path as the key.
- * The idea is that each unique remote object can have an associated
- * edit object associated with it, and this object will take care
- * of remote editing of that object. Using the remote path as a key ensures
- * that a resource with a unique path will have a unique remote object.
- * @param the remote path to use as a key
- * @param the editbable object
- * @return the previously stored edit object, or null if none
- */
- public Object putEditObject(ISystemRemotePath key, Object editObj);
-
- /**
- * Get a remote edit object given the remote path as a key.
- * @param the remote path as a key
- * @return the stored edit object
- */
- public Object getEditObject(ISystemRemotePath key);
-
- /**
- * Save the edit object information to disk.
- * Clients must not call this method.
- */
- public void save();
-
- /**
- * Restore the edit object information from disk.
- * Clients must not call this method.
- */
- public void restore();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteManager.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteManager.java
deleted file mode 100644
index d36a740a7..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteManager.java
+++ /dev/null
@@ -1,42 +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.files.ui.resources;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * This interface should be implemented by all remote resource related
- * managers
- */
-public interface ISystemRemoteManager {
-
-
-
- /**
- * This method is called during plugin startup.
- * @param a progress monitor for long running operations, or null
- * if none is desired.
- */
- public void startup(IProgressMonitor monitor);
-
- /**
- * This method is called during plugin shutdown.
- * @param a progress monitor for long running operations, or null
- * if none is desired.
- */
- public void shutdown(IProgressMonitor monitor);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarker.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarker.java
deleted file mode 100644
index 83bdaeb6b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarker.java
+++ /dev/null
@@ -1,220 +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.files.ui.resources;
-
-import java.util.Map;
-
-
-/**
- * This interface defines a remote marker. It can be used to tag information
- * to a any remote resource.
- * Clients must not implement this interface.
- */
-public interface ISystemRemoteMarker {
-
-
-
- /**
- * Remote markers extension point id.
- */
- public static final String EXTENSION_POINT_ID = "remoteMarkers";
-
- /**
- * Deletes this marker from its associated resource. This method has no
- * effect if this marker does not exist.
- */
- public void delete();
-
- /**
- * Tests this marker for equality with the given object.
- * Two markers are equal if and only if their id and resource info are both equal.
- * @param object the other object
- * @return <code>true</code> if objects are equal, <code>false</code> otherwise
- */
- public boolean equals(Object object);
-
- /**
- * Returns whether this marker exists. A marker
- * exists if its resource info exists and has a marker with the marker's id.
- *
- * @return <code>true</code> if this marker exists, otherwise
- * <code>false</code>
- */
- public boolean exists();
-
- /**
- * Returns the attribute with the given name. The result is an instance of one
- * of the following classes: <code>String</code>, <code>Integer</code>,
- * or <code>Boolean</code>.
- * Returns <code>null</code> if the attribute is undefined.
- *
- * @param attributeName the name of the attribute
- * @return the value, or <code>null</code> if the attribute is undefined.
- */
- public Object getAttribute(String attributeName);
-
- /**
- * Returns the integer-valued attribute with the given name.
- * Returns the given default value if the attribute is undefined.
- * or the marker does not exist or is not an integer value.
- *
- * @param attributeName the name of the attribute
- * @param defaultValue the value to use if no value is found
- * @return the value or the default value if no value was found.
- */
- public int getAttribute(String attributeName, int defaultValue);
-
- /**
- * Returns the string-valued attribute with the given name.
- * Returns the given default value if the attribute is undefined
- * or the marker does not exist or is not a string value.
- *
- * @param attributeName the name of the attribute
- * @param defaultValue the value to use if no value is found
- * @return the value or the default value if no value was found.
- */
- public String getAttribute(String attributeName, String defaultValue);
-
- /**
- * Returns the boolean-valued attribute with the given name.
- * Returns the given default value if the attribute is undefined
- * or the marker does not exist or is not a boolean value.
- *
- * @param attributeName the name of the attribute
- * @param defaultValue the value to use if no value is found
- * @return the value or the default value if no value was found.
- */
- public boolean getAttribute(String attributeName, boolean defaultValue);
-
- /**
- * Returns a map with all the attributes for the marker.
- * If the marker has no attributes then <code>null</code> is returned.
- *
- * @return a map of attribute keys and values (key type : <code>String</code>
- * value type : <code>String</code>, <code>Integer</code>, or
- * <code>Boolean</code>) or <code>null</code>.
- */
-
- public Map getAttributes();
-
- /**
- * Returns the attributes with the given names. The result is an an array
- * whose elements correspond to the elements of the given attribute name
- * array. Each element is <code>null</code> or an instance of one
- * of the following classes: <code>String</code>, <code>Integer</code>,
- * or <code>Boolean</code>.
- *
- * @param attributeNames the names of the attributes
- * @return the values of the given attributes.
- */
- public Object[] getAttributes(String[] attributeNames);
-
- /**
- * Returns the time at which this marker was created.
- *
- * @return the difference, measured in milliseconds, between the time at which
- * this marker was created and midnight, January 1, 1970 UTC.
- */
- public long getCreationTime();
-
- /**
- * Returns the id of the marker. The id of a marker is unique
- * relative to the resource with which the marker is associated.
- * Marker ids are not globally unique.
- *
- * @return the id of the marker
- * @see ISystemRemoteResource#findMarker
- */
- public long getId();
-
- /**
- * Returns the resource with which this marker is associated.
- *
- * @return the remote resource with which this marker is associated
- */
- public ISystemRemoteResource getResource();
-
- /**
- * Returns the type of this marker.
- *
- * @return the type of this marker
- */
- public String getType();
-
- /**
- * Returns whether the type of this marker is considered to be a subtype of
- * the given marker type.
- *
- * @return boolean <code>true</code>if the marker's type
- * is the same as (or a subtype of) the given type.
- */
- public boolean isSubtypeOf(String superType);
-
- /**
- * Sets the integer-valued attribute with the given name.
- *
- * @param attributeName the name of the attribute
- * @param value the value
- */
- public void setAttribute(String attributeName, int value);
-
- /**
- * Sets the attribute with the given name. The value must be <code>null</code> or
- * an instance of one of the following classes:
- * <code>String</code>, <code>Integer</code>, or <code>Boolean</code>.
- * If the value is <code>null</code>, the attribute is considered to be undefined.
- *
- * @param attributeName the name of the attribute
- * @param value the value, or <code>null</code> if the attribute is to be undefined
- */
- public void setAttribute(String attributeName, Object value);
-
- /**
- * Sets the boolean-valued attribute with the given name.
- *
- * @param attributeName the name of the attribute
- * @param value the value
- */
- public void setAttribute(String attributeName, boolean value);
-
- /**
- * Sets the given attribute key-value pairs on this marker.
- * The values must be <code>null</code> or an instance of
- * one of the following classes: <code>String</code>,
- * <code>Integer</code>, or <code>Boolean</code>.
- * If a value is <code>null</code>, the new value of the
- * attribute is considered to be undefined.
- *
- * @param attributeNames an array of attribute names
- * @param values an array of attribute values
- */
- public void setAttributes(String[] attributeNames, Object[] values);
-
- /**
- * Sets the attributes for this marker to be the ones contained in the
- * given table. The values must be an instance of one of the following classes:
- * <code>String</code>, <code>Integer</code>, or <code>Boolean</code>.
- * Attributes previously set on the marker but not included in the given map
- * are considered to be removals. Setting the given map to be <code>null</code>
- * is equivalent to removing all marker attributes.
- *
- * @param attributes a map of attribute names to attribute values
- * (key type : <code>String</code> value type : <code>String</code>,
- * <code>Integer</code>, or <code>Boolean</code>) or <code>null</code>
- */
- public void setAttributes(Map attributes);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarkerSetElement.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarkerSetElement.java
deleted file mode 100644
index f4e8177d1..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarkerSetElement.java
+++ /dev/null
@@ -1,31 +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.files.ui.resources;
-
-/**
- * An interface for all marker set elements.
- */
-public interface ISystemRemoteMarkerSetElement {
-
-
-
- /**
- * Get the id.
- * @return the id
- */
- public long getId();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemotePath.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemotePath.java
deleted file mode 100644
index d9768e120..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemotePath.java
+++ /dev/null
@@ -1,56 +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.files.ui.resources;
-
-/**
- * This interface defines a remote path. It is not intended to be implemented by
- * clients.
- */
-public interface ISystemRemotePath {
-
-
-
- /**
- * Get the profile name.
- * @return the profile name
- */
- public String getProfileName();
-
- /**
- * Get the connection name.
- * @return the connection name
- */
- public String getConnectionName();
-
- /**
- * Get the path of the resource on the server.
- * @return the path of the resource on the server
- */
- public String getPath();
-
- /**
- * Returns the complete string representation of the remote path.
- * @return complete string representation of the remote path
- */
- public String toString();
-
- /**
- * Returns whether this path equals the given object.
- * This is system dependent.
- */
- public boolean equals(Object obj);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteResource.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteResource.java
deleted file mode 100644
index 377a8bc21..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteResource.java
+++ /dev/null
@@ -1,176 +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.files.ui.resources;
-
-import org.eclipse.core.runtime.QualifiedName;
-
-/**
- * This interface defines some common functionality required from all remote
- * resources, irrespective of whether the remote system is an OS/400, Windows, Linux
- * or Unix operating system. In particular, it allows users to create markers on remote
- * resources, and to create both session and persistent properties for them. A session
- * property is one that is stored only during the current workbench session, while a
- * persistent property is one that is kept between sessions.
- * Clients must not implement this interface.
- *
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile
- */
-public interface ISystemRemoteResource {
-
-
-
- /**
- * Creates and returns the marker of the specified type on this resource.
- * @param type the marker type
- * @return the created marker
- */
- public ISystemRemoteMarker createMarker(String type);
-
- /**
- * Deletes all markers on this resource of the given type, and optionally deletes
- * such markers from its children. Deletion of markers with subtypes is also possible.
- * @param type the marker type, or <code>null</code> to indicate all types.
- * @param includeSubtypes whether or not to consider the subtypes of the given type
- */
- public void deleteMarkers(String type, boolean includeSubtypes);
-
- /**
- * Returns the marker with the specified id on this resource, or null if there
- * is no such marker.
- * @param id the id of the marker to find
- * @return a marker if found, or <code>null</code>
- */
- public ISystemRemoteMarker findMarker(long id);
-
- /**
- * Returns all markers of the specified type on this resource, and
- * optionally, on its children. Markers with subtypes of the given type
- * can also be found optionally. Returns an empty array if there are
- * no matching markers.
- * @param type the marker type, or <code>null</code> to indicate all types.
- * @param includeSubtypes whether or not to consider the subtypes of the given type
- * @return an array of markers, or an empty array if no markers are found
- */
- public ISystemRemoteMarker[] findMarkers(String type, boolean includeSubtypes);
-
- /**
- * Gets the marker with the given id. The marker is not guaranteed to exist.
- * @param id the marker id.
- */
- public ISystemRemoteMarker getMarker(long id);
-
- /**
- * Sets the value of the session property of this resource identified
- * by the given key. If the supplied value is <code>null</code>,
- * the session property is removed from this resource.
- * <p>
- * Sessions properties are intended to be used as a caching mechanism
- * by ISV plug-ins. They allow key-object associations to be stored with
- * existing resources in the workspace. These key-value associations are
- * maintained in memory (at all times), and the information is lost when a
- * resource is deleted from the workspace, when the parent project
- * is closed, or when the workspace is closed.
- * </p>
- * <p>
- * The qualifier part of the property name must be the unique identifier
- * of the declaring plug-in (e.g. <code>"com.example.plugin"</code>).
- * </p>
- *
- * @param key the qualified name of the property
- * @param value the value of the session property,
- * or <code>null</code> if the property is to be removed
- * @see #getSessionProperty
- */
- public void setSessionProperty(QualifiedName key, Object value);
-
- /**
- * Returns the value of the session property of this resource identified
- * by the given key, or <code>null</code> if this resource has no such property.
- *
- * @param key the qualified name of the property
- * @return the string value of the session property,
- * or <code>null</code> if this resource has no such property
- * @see #setSessionProperty
- */
- public Object getSessionProperty(QualifiedName key);
-
- /**
- * Sets the value of the persistent property of this resource identified
- * by the given key. If the supplied value is <code>null</code>,
- * the persistent property is removed from this resource. The change
- * is made immediately on disk.
- * <p>
- * Persistent properties are intended to be used by plug-ins to store
- * resource-specific information that should be persisted across platform sessions.
- * The value of a persistent property is a string which should be
- * short (i.e., under 2KB). Unlike session properties, persistent properties are
- * stored on disk and maintained across workspace shutdown and restart.
- * </p>
- * <p>
- * The qualifier part of the property name must be the unique identifier
- * of the declaring plug-in (e.g. <code>"com.example.plugin"</code>).
- * </p>
- *
- * @param key the qualified name of the property
- * @param value the string value of the property,
- * or <code>null</code> if the property is to be removed
- * @see #getPersistentProperty
- */
- public void setPersistentProperty(QualifiedName key, String value);
-
- /**
- * Returns the value of the persistent property of this resource identified
- * by the given key, or <code>null</code> if this resource has no such property.
- *
- * @param key the qualified name of the property
- * @return the string value of the property,
- * or <code>null</code> if this resource has no such property
- * @see #setPersistentProperty
- */
- public String getPersistentProperty(QualifiedName key);
-
- /**
- * Returns whether this resource exists on the remote server.
- * @return <code>true</code> if the resource exists, <code>false</code> otherwise
- */
- public boolean exists();
-
- /**
- * Returns whether a local copy of the file exists.
- */
- public boolean isExistsLocally();
-
- /**
- * Returns the last modified time on the server.
- * @return the last modified time on the server
- */
- public boolean getRemoteLastModifiedTime();
-
- /**
- * Returns the last modified time on the client.
- * @return the last modified time on the client.
- */
- public boolean getLocalLastModifiedTime();
-
- /**
- * Returns whether the local copy, if there is one, is in sync with the
- * remote copy.
- * @return true if the local copy is in sync, false otherwise, or if the
- * local copy does not exist.
- */
- public boolean isSynchronized();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditor.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditor.java
deleted file mode 100644
index 838cca7b1..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditor.java
+++ /dev/null
@@ -1,31 +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.files.ui.resources;
-
-import org.eclipse.ui.IEditorInput;
-
-public interface ISystemTextEditor {
-
-
- public void setReadOnly(boolean readOnly);
-
- public void updateDirtyIndicator();
- public void refresh();
- public void setInput(IEditorInput input);
- public void gotoLine(int line);
- public void selectText(int charStart, int charEnd);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditorConstants.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditorConstants.java
deleted file mode 100644
index 177bd4e32..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemTextEditorConstants.java
+++ /dev/null
@@ -1,50 +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.files.ui.resources;
-
-public interface ISystemTextEditorConstants {
-
-
-
- // Editor id
- public static final String SYSTEM_TEXT_EDITOR_ID = "org.eclipse.rse.editor";
- public static final String SYSTEM_TEXT_BROWSER_ID = "org.eclipse.rse.browser";
-
- // Identifier for profile type
- public static final String EDITOR_PROFILE_TYPE = "editorProfileType";
-
- // key to identify file has sequence numbers
- public static final String SEQUENCE_NUMBERS_KEY = "sequence_numbers_key";
-
- // key to identify that a save limit should be set
- public static final String MAX_LINE_LENGTH_KEY = "record_length_key";
-
- // key to identify that a source encoding should be set
- // this is used to emulate the remote encoding of the file
- public static final String SOURCE_ENCODING_KEY = "source_encoding_key";
-
- // key to identify host ccsid
- public static final String CCSID_KEY = "ccsid_key";
- public static final String TEMP_CCSID_KEY = "temp_ccsid_key";
-
- // key to identify logical or visual BIDI
- public static final String BIDI_LOGICAL_KEY = "bidi_logical_key";
-
- // key to identify the local encoding
- // NOTE: DO NOT CHANGE THIS!! This is used by the IBM debugger.
- public static final String LOCAL_ENCODING_KEY = "encoding";
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsDialog.java
deleted file mode 100644
index 28ba31f88..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsDialog.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.resources;
-
-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.swt.widgets.Shell;
-
-
-public class SaveAsDialog extends SystemSelectRemoteFileOrFolderDialog implements ISaveAsDialog {
-
-
-
- /**
- * Constructor
- *
- * @param shell The shell to hang the dialog off of
- * @param fileMode True if selecting files, false if selecting folders
- *
- */
-
- private SaveAsForm form;
-
-
- protected SaveAsDialog(Shell shell)
- {
- super(shell, false);
- }
- /**
- * Constructor when you want to supply your own title.
- *
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- * @param fileMode True if selecting files, false if selecting folders
- */
- protected SaveAsDialog(Shell shell, String title)
- {
- super(shell, title, true);
- }
-
- public static ISaveAsDialog getSaveAsDialog(Shell shell, String title)
- {
- return new SaveAsDialog(shell, title);
- }
-
- public static ISaveAsDialog getSaveAsDialog(Shell shell)
- {
- return new SaveAsDialog(shell);
- }
-
- protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode)
- {
- //System.out.println("INSIDE GETFORM");
- //if (form == null)
- //{
- form = new SaveAsForm(getMessageLine(), this, fileMode);
- super.getForm(fileMode);
-
- //}
- return form;
- }
-
- public Object getOutputObject()
- {
- IRemoteFile file = (IRemoteFile) super.getOutputObject();
- if (file.isFile())
- {
- return file;
- }
-
- try
- {
- return file.getParentRemoteFileSubSystem().getRemoteFileObject(file, form.getFileName());
- }
- catch (Exception e)
- {
- return null;
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 73b0fbe6f..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsForm.java
+++ /dev/null
@@ -1,238 +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.files.ui.resources;
-
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-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;
-import org.eclipse.rse.ui.validators.ValidatorFileName;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-
-
-public class SaveAsForm extends SystemSelectRemoteFileOrFolderForm {
-
-
-
-
- protected Text fileNameText;
- protected String fileName, initialFileName;
- protected ValidatorFileName validator;
-
- /**
- * Constructor for SaveAsForm
- */
- public SaveAsForm(ISystemMessageLine msgLine, Object caller, boolean fileMode)
- {
- super(msgLine, caller, fileMode);
-
- validator = new ValidatorFileName();
- }
-
- /**
- * In this method, we populate the given SWT container with widgets and return the container
- * to the caller.
- * @param parent The parent composite
- */
- public Control createContents(Shell shell, Composite parent)
- {
- Control control = super.createContents(shell, parent);
-
- Composite composite = SystemWidgetHelpers.createComposite(parent, 2);
-// SystemWidgetHelpers.createLabel(composite, SystemResources.RESID_NEWFILE_NAME_ROOT_LABEL);
-// fileNameText = SystemWidgetHelpers.createTextField(composite, null);
-
- fileNameText = SystemWidgetHelpers.createLabeledTextField(
- composite, null, FileResources.RESID_NEWFILE_NAME_LABEL, FileResources.RESID_NEWFILE_NAME_TOOLTIP);
-
-
- fileNameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- fileName = fileNameText.getText();
- setPageComplete();
- }
- });
-
- if (fileName != null)
- {
- fileNameText.setText(fileName);
- }
-
- return control;
- }
-
- /**
- * Completes processing of the dialog.
- * Intercept of parent method.
- *
- * @return true if no errors
- */
- public boolean verify()
- {
- // This method added by Phil to issue warning msg for existing member
- //System.out.println("Inside verify");
- boolean ok = super.verify();
- if (ok)
- {
- IRemoteFile file = (IRemoteFile) getSelectedObject();
- IRemoteFile saveasFile = null;
- try
- {
- saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName);
- }
- catch (Exception e)
- {
- }
-
- //System.out.println("...saveasMbr null? "+ (saveasMbr==null));
- if (saveasFile != null && saveasFile.exists())
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS);
- msg.makeSubstitution(fileName);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- ok = dlg.openQuestionNoException();
- }
- }
- return ok;
- }
-
- public boolean isPageComplete()
- {
- SystemMessage errMsg = validator.validate(fileName);
-
- if (errMsg != null)
- {
- setErrorMessage(errMsg);
- return false;
- }
- else
- {
- clearErrorMessage();
- }
-
- return fileNameText !=null && fileNameText.getText().length() > 0 && super.isPageComplete();
- }
-
- public String getFileName()
- {
- return fileName;
- }
-
- public void setPreSelection(IRemoteFile selection)
- {
- if (selection.isDirectory())
- {
- super.setPreSelection(selection);
- }
- else if (selection.isFile())
- {
- IRemoteFile parentFile = selection.getParentRemoteFile();
-
- if (parentFile.isDirectory())
- {
- super.setPreSelection(parentFile);
- }
-
- fileName = selection.getName();//parentFile.getName();
- initialFileName=fileName;
- }
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- /**
- * User selected something in the tree.
- * This is an intercept of the parent's method so we can process a member selection, and
- * copy the selected member's name to the entry field.
- */
- public void selectionChanged(SelectionChangedEvent e)
- {
- super.selectionChanged(e);
- Object selectedObject = getFirstSelection(e.getSelection());
- if (selectedObject != null && selectedObject instanceof IRemoteFile)
- {
- IRemoteFile remoteFile = (IRemoteFile)selectedObject;
-
- ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(selectedObject);
- if ((remoteAdapter != null))
- {
-
- if (fileNameText != null)
- {
- // simulate the parent file being selected...
- Object parentFile = tree.getSelectedParent();
-
- if (remoteFile.isFile())
- {
- fileName = remoteAdapter.getName(selectedObject);
- fileNameText.setText(fileName);
- }
- else
- {
- fileName =initialFileName;
- fileNameText.setText(fileName);
- parentFile = remoteFile;
- }
-
-
- remoteAdapter = getRemoteAdapter(parentFile);
- if (remoteAdapter != null)
- {
- String fullPath = remoteAdapter.getAbsoluteName(parentFile);
- setNameText(fullPath);
- outputObjects = new Object[] {parentFile};
- setPageComplete();
- }
- }
- }
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 75d5eb9c5..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
+++ /dev/null
@@ -1,1863 +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.files.ui.resources;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.ResourceAttributes;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.actions.SystemDownloadConflictAction;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-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.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-
-public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IPartListener, IResourceChangeListener, IResourceDeltaVisitor, ISystemTextEditorConstants, ISystemRemoteEditConstants
-{
-
-
- private IRemoteFile remoteFile;
- private String remotePath;
- private IRemoteFileSubSystem subsystem;
- private String root;
- private String localPath;
- private IEditorPart editor;
- private IFile localFile;
- private IWorkbenchPage page;
-
- /**
- * Internal class for downloading file
- */
- private class InternalDownloadFileRunnable extends Job
- //extends WorkspaceModifyOperation
- {
-
- private Exception e;
- private boolean completed = false;
- private boolean failed = false;
-
- /**
- * Constructor for InternalDownloadFileRunnable
- */
- private InternalDownloadFileRunnable()
- {
- super("Download"); // TODO - need to externalize
- }
-
-
-
- /**
- * @see WorkspaceModifyOperation#execute(IProgressMonitor)
- */
- protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException
- {
-
- try
- {
- failed = !SystemEditableRemoteFile.this.download(monitor);
- completed = true;
- monitor.done();
- }
- catch (CoreException e)
- {
- throw e;
- }
- catch (InvocationTargetException e)
- {
- throw e;
- }
- catch (InterruptedException e)
- {
- // cancel was pressed by user
- monitor.setCanceled(true);
- throw e;
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("File can not be downloaded", e); //$NON-NLS-1$
- this.e = e;
- }
- }
-
- public boolean didComplete()
- {
- return completed;
- }
-
- public boolean didFail()
- {
- return failed;
- }
-
- /**
- * Get the exception that may have been thrown
- */
- private void throwException() throws Exception
- {
-
- if (e != null)
- {
- throw e;
- }
- }
-
- public IStatus run(IProgressMonitor monitor) {
- try
- {
- execute(monitor);
- }
- catch (Exception e)
- {
- return Status.CANCEL_STATUS;
- }
- return Status.OK_STATUS;
- }
- }
-
- private String _editorId = null;
- private boolean _isRemoteFileMounted = false;
- private String _actualRemoteHost = null;
- private String _actualRemotePath = null;
-
- /**
- * Constructor for SystemEditableRemoteFile
- */
- public SystemEditableRemoteFile(IWorkbenchPage page, IRemoteFile remoteFile, String editorId)
- {
- super();
- this.page = page;
- this.remoteFile = remoteFile;
- this.remotePath = remoteFile.getAbsolutePath();
- this.subsystem = remoteFile.getParentRemoteFileSubSystem();
- SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
-
- // if remote edit project doesn't exist, create it
- if (!mgr.doesRemoteEditProjectExist())
- mgr.getRemoteEditProject();
-
- this.root = mgr.getRemoteEditProjectLocation().makeAbsolute().toOSString();
- this.localPath = getDownloadPath();
- this._editorId = editorId;
- }
-
- /**
- * Constructor for SystemEditableRemoteFile
- */
- public SystemEditableRemoteFile(IRemoteFile remoteFile, String editorId)
- {
- this(null, remoteFile, editorId);
- }
-
- /**
- * Constructor for SystemEditableRemoteFile
- */
- public SystemEditableRemoteFile(IRemoteFile remoteFile)
- {
- super();
- this.remoteFile = remoteFile;
- this.remotePath = remoteFile.getAbsolutePath();
- this.subsystem = remoteFile.getParentRemoteFileSubSystem();
- this.root = SystemRemoteEditManager.getDefault().getRemoteEditProjectLocation().makeAbsolute().toOSString();
- this.localPath = getDownloadPath();
-
- // dkm - use registered
- String fileName = remoteFile.getName();
-
- IEditorRegistry registry = getEditorRegistry();
-
- IEditorDescriptor descriptor = registry.getDefaultEditor(fileName);
- if (descriptor == null)
- {
- descriptor = getDefaultTextEditor();
- }
- String id = descriptor.getId();
- this._editorId = id;
- }
-
- protected IEditorRegistry getEditorRegistry()
- {
- if (PlatformUI.isWorkbenchRunning())
- {
- return PlatformUI.getWorkbench().getEditorRegistry();
- }
- return null;
- }
-
- protected IEditorDescriptor getDefaultTextEditor()
- {
- IEditorRegistry registry = getEditorRegistry();
- return registry.findEditor("org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
- }
-
-
- /**
- * Returns an instance of this class given a local copy of a remote file.
- * @param file the local file to create it from.
- */
- public static SystemEditableRemoteFile getInstance(IFile file) {
-
- // first determine associated remote file
- IPath path = file.getFullPath();
- int numSegments = path.segmentCount();
-
- // first we need to find the right RemoteFileSubSystem for the remote file
- SystemIFileProperties properties = new SystemIFileProperties(file);
-
- ISubSystem fs = null;
-
- // get the subsystem ID property from the temporary file
- String subsystemId = properties.getRemoteFileSubSystem();
-
- // the subsystem ID may not exist if the temporary file existed before this feature
- // to handle migration of this smoothly, we can use another method to determine the subsystem
- if (subsystemId != null)
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- fs = registry.getSubSystem(subsystemId);
- }
-
- if (fs != null)
- {
- // use the remote file path property of the temp file to determine the path of the remote file
- // on the remote system
- String remotePath = properties.getRemoteFilePath();
-
- // the uploadPath property may not exist if the temporary file existed before this feature
- // to handle migration of this smoothly, we can use another method to determine the remote file path
- if (remotePath == null)
- {
- // derive the path from the temporary file path
- IHost connection = fs.getHost();
-
- // on windows systems, we need to take into account drives and different separators
- boolean isWindows = connection.getSystemType().equals("Local") || fs.getHost().getSystemType().equals("Windows"); //$NON-NLS-1$ //$NON-NLS-2$
-
- char fileSeparator = isWindows ? '\\' : '/';
- StringBuffer tempRemotePath = new StringBuffer(""); //$NON-NLS-1$
- for (int i = 3; i < numSegments; i++)
- {
- if (i == 3)
- {
- if (!isWindows)
- {
- tempRemotePath.append(fileSeparator);
- }
- }
- if (i > 3)
- {
- if (i == 4)
- {
- if (isWindows)
- {
- tempRemotePath.append(":"); //$NON-NLS-1$
- }
- }
-
- tempRemotePath.append(fileSeparator);
- }
-
- String seg = path.segment(i);
- tempRemotePath.append(seg);
- }
-
- remotePath = tempRemotePath.toString();
- }
-
- try {
- if (remotePath != null && fs instanceof IRemoteFileSubSystem) {
- IRemoteFile remoteFile = ((IRemoteFileSubSystem)fs).getRemoteFileObject(remotePath);
-
- if (remoteFile != null) {
- return new SystemEditableRemoteFile(remoteFile);
- }
- else {
- return null;
- }
- }
- else {
- return null;
- }
- }
- catch (SystemMessageException e) {
- SystemBasePlugin.logError("Error getting remote file object " + remotePath, e); //$NON-NLS-1$
- }
- }
-
- return null;
- }
-
- /**
- * Set the remote file
- */
- public void setRemoteFile(IRemoteFile remoteFile)
- {
- this.remoteFile = remoteFile;
- this.remotePath = remoteFile.getAbsolutePath();
- this.subsystem = remoteFile.getParentRemoteFileSubSystem();
- this.localPath = getDownloadPath();
- this.localFile = null;
- }
-
- /**
- * Get the remote file
- */
- public IRemoteFile getRemoteFile()
- {
- return remoteFile;
- }
-
- /**
- * Set the local path
- */
- public void setLocalPath(String localPath)
- {
- this.localPath = localPath;
- }
-
- /**
- * Get the local path
- */
- public String getLocalPath()
- {
- return localPath;
- }
-
- /**
- * Set the editor
- */
- public void setEditor(IEditorPart editor)
- {
- this.editor = editor;
- }
-
- /**
- * Get the editor
- */
- public IEditorPart getEditor()
- {
- return editor;
- }
-
- /**
- * Check if user has write authority to the file.
- * @return true if the file is readonly
- */
- public boolean isReadOnly()
- {
-
- if (!subsystem.isConnected())
- {
- try
- {
- subsystem.connect();
- }
- catch (Exception e)
- {
- }
- }
-
- return !remoteFile.canWrite();
- }
-
- /**
- * Indicate whether the file can be edited
- */
- public void setReadOnly(boolean isReadOnly)
- {
- if (isReadOnly)
- {
- setEditorAsReadOnly();
- }
- else if (editor instanceof ISystemTextEditor)
- {
- ((ISystemTextEditor) editor).setReadOnly(false);
- }
- }
-
- /**
- * Download the file.
- * @param shell if the shell is null, no progress monitor will be shown
- * @return true if successful, false if cancelled
- */
- public boolean download(Shell shell) throws Exception
- {
-
- if (shell != null)
- {
-
-
- InternalDownloadFileRunnable downloadFileRunnable = new InternalDownloadFileRunnable();
- //ProgressMonitorDialog pmd = new ProgressMonitorDialog(shell);
- IFile localFile = getLocalResource();
- SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
- listener.addIgnoreFile(localFile);
-
- //pmd.run(false, true, downloadFileRunnable);
- downloadFileRunnable.setRule(getRemoteFile());
- downloadFileRunnable.schedule();
- Display display = Display.getDefault();
- try {
- while (!downloadFileRunnable.didComplete())
- {
- while (display!=null && display.readAndDispatch()) {
- //Process everything on event queue
- }
- if (!downloadFileRunnable.didComplete()) Thread.sleep(200);
- }
- } catch(InterruptedException e) {
- /*stop waiting*/
- }
-
- listener.removeIgnoreFile(localFile);
- downloadFileRunnable.throwException();
- return !downloadFileRunnable.didFail();
- }
- else
- {
- return download(new NullProgressMonitor());
- }
- }
-
- protected void setReadOnly(IFile file, boolean flag)
- {
- ResourceAttributes attrs = file.getResourceAttributes();
- attrs.setReadOnly(flag);
- try
- {
- file.setResourceAttributes(attrs);
- }
- catch (CoreException e)
- {
- }
- }
-
- /**
- * Download the file.
- * @param monitor the progress monitor
- * @return true if the operation was successful. false if the user cancels.
- */
- public boolean download(IProgressMonitor monitor) throws Exception
- {
-
- // DY: check if the file exists and is read-only (because it was previously opened
- // in the system editor)
- IFile file = getLocalResource();
- SystemIFileProperties properties = new SystemIFileProperties(file);
- boolean newFile = !file.exists();
- if (file.isReadOnly())
- {
- setReadOnly(file, false);
- }
- properties.setReadOnly(false);
-
- // detect whether there exists a temp copy already
- if (!newFile && file.exists())
- {
- // we have a local copy of this file, so we need to compare timestamps
-
- // get stored modification stamp
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // get updated remoteFile so we get the current remote timestamp
- //remoteFile.markStale(true);
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (storedModifiedStamp != remoteModifiedStamp);
- if (dirty)
- {
- // we have a dirty file with pending changes
- // user may want to replace this with the remote file
- // here we prompt user **** Prompt Dialog 2 or 3
- // 1) replace pending changes with remote file
- // 2) open editor with our pending changes
- SystemDownloadConflictAction conflictAction = new SystemDownloadConflictAction(file, remoteNewer);
- Display.getDefault().syncExec(conflictAction);
-
- switch (conflictAction.getState())
- {
- case SystemDownloadConflictAction.CANCELLED :
- return false;
- case SystemDownloadConflictAction.OPEN_WITH_LOCAL :
- return true;
- case SystemDownloadConflictAction.REPLACE_WITH_REMOTE :
- default :
- return doDownload(properties, monitor);
- }
- }
- else
- {
- if (remoteNewer)
- {
- return doDownload(properties, monitor);
- }
- else
- {
- if (properties.getUsedBinaryTransfer() == remoteFile.isBinary())
- {
- // we already have same file, use the current file
- refresh();
- }
- else
- {
- // we transferred a different way last time, so we need to transfer again
- return doDownload(properties, monitor);
- }
- }
- }
- }
-
- else
- {
- return doDownload(properties, monitor);
- }
-
- return true;
- }
-
- private boolean doDownload(SystemIFileProperties properties, IProgressMonitor monitor) throws Exception
- {
- // file hasn't been downloaded before, so do the download now
- /* SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYTHINGGENERIC_PROGRESS);
- copyMessage.makeSubstitution(remoteFile.getName());
- monitor.beginTask(copyMessage.getLevelOneText(), (int)remoteFile.getLength());
- */
- if (!subsystem.isConnected())
- {
- // don't try to download file if not connected
- return false;
- }
-
- subsystem.downloadUTF8(remoteFile, localPath, monitor);
- if (monitor.isCanceled())
- {
- return false;
- }
-
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
-
- refresh();
-
- // get fresh file object
- IFile file = getLocalResource();
- properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
- properties.setDownloadFileTimeStamp(file.getLocalTimeStamp());
- properties.setDirty(false);
- properties.setUsedBinaryTransfer(remoteFile.isBinary());
-
- boolean readOnly = !remoteFile.canWrite();
- properties.setReadOnly(readOnly);
-
- // get the modified timestamp from the File, not the IFile
- // for some reason, the modified timestamp from the IFile does not always return
- // the right value. There is a Javadoc comment saying the value from IFile might be a
- // cached value and that might be the cause of the problem.
- properties.setDownloadFileTimeStamp(file.getLocation().toFile().lastModified());
-
- return true;
- }
-
- /**
- * Saves the local file and uploads it to the host immediately, rather than, in response to a resource change
- * event.
- */
- public boolean doImmediateSaveAndUpload()
- {
- if (editor != null)
- {
- editor.doSave(null);
- }
-
- SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
- listener.setEnabled(false);
-
- IRemoteFile remoteFile = getRemoteFile();
- IFile tempFile = getLocalResource();
- IRemoteFileSubSystem fs = remoteFile.getParentRemoteFileSubSystem();
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
-
- // reget the remote file so that we have the right timestamps
- try
- {
- remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath());
- }
- catch (Exception e)
- {
- return false;
- }
- listener.upload(fs, remoteFile, tempFile, properties, properties.getRemoteFileTimeStamp(), this, null);
-
- listener.setEnabled(true);
-
- return !properties.getDirty();
- //return true;
- }
-
- /**
- * Upload the file
- */
- private void upload() throws Exception
- {
-
- if (!subsystem.isConnected())
- {
- subsystem.connect();
- }
-
- subsystem.uploadUTF8(localPath, remoteFile, null);
-
- // update timestamp
- IFile file = getLocalResource();
- SystemIFileProperties properties = new SystemIFileProperties(file);
-
- //DKM- saveAS fix
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
- properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
- }
-
- /**
- * Get the local resource
- */
- public IFile getLocalResource()
- {
- /* DKM - don't use this because workspace can't always handle case-sensitivity
- System.out.println("getting file for " + localPath);
- File file = new File(localPath);
- System.out.println("file= " + file);
- try
- {
- String path = file.getCanonicalPath();
- return RSEUIPlugin.getWorkspaceRoot().getFileForLocation(new Path(path));
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- */
- if (localFile == null || !localFile.exists())
- {
- IPath path = getLocalPathObject();
- localFile = SystemBasePlugin.getWorkspaceRoot().getFileForLocation(path);
- }
-
- return localFile;
- }
-
- private IPath getLocalPathObject()
- {
- IPath actualPath = null;
- IPath expectedPath = new Path(localPath);
-
- IPath rootPath = new Path(root);
- IContainer container = SystemBasePlugin.getWorkspaceRoot().getContainerForLocation(rootPath);
-
- if (container != null && container.exists())
- {
- IResource lastMatch = null;
- for (int i = rootPath.segmentCount(); i < expectedPath.segmentCount(); i++)
- {
- String expectedFolderOrFile = expectedPath.segment(i).toLowerCase();
- IResource match = null;
-
- try
- {
- IResource[] resources = container.members();
-
- for (int r = 0; r < resources.length && match == null; r++)
- {
- IResource resource = resources[r];
-
- if (resource instanceof IContainer)
- {
- String resName = resource.getName().toLowerCase();
- if (expectedFolderOrFile.equals(resName))
- {
- match = resource;
- lastMatch = match;
- }
- }
- // file match - i.e. last file
- else if (i == expectedPath.segmentCount() - 1)
- {
- String resName = resource.getName().toLowerCase();
- if (expectedFolderOrFile.equals(resName))
- {
- //match = resource;
- //lastMatch = match;
- // we found the resource - need to continue
- return resource.getLocation();
- }
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- if (match != null)
- {
- container = (IContainer) match;
- }
- else if (lastMatch != null)
- {
- IPath newPath = lastMatch.getLocation();
- while (i < expectedPath.segmentCount())
- {
- newPath = newPath.append(expectedPath.segment(i));
- i++;
- }
-
- return newPath;
- }
- else
- {
- return expectedPath;
- }
- }
-
- String fileName = expectedPath.segment(expectedPath.segmentCount() - 1);
- actualPath = container.getLocation().append(fileName);
- return actualPath;
- }
-
- return expectedPath;
- }
-
- /**
- * Delete the local resource
- */
- public void delete()
- {
-
- IPath rootPath = (new Path(root)).removeTrailingSeparator();
-
- String rootLocation = rootPath.makeAbsolute().toOSString();
-
- String resourceLocation = getLocalResource().getLocation().makeAbsolute().toOSString();
-
- File tempFile = new File(resourceLocation);
-
- boolean deleteResult = tempFile.delete();
-
- if (!deleteResult)
- {
- return;
- }
-
- while (resourceLocation.startsWith(rootLocation))
- {
-
- tempFile = tempFile.getParentFile();
- resourceLocation = tempFile.getAbsolutePath();
-
- if (resourceLocation.equals(rootLocation))
- { // do not delete the root folder itself
- break;
- }
-
- deleteResult = tempFile.delete();
-
- if (!deleteResult)
- {
- break;
- }
- }
-
- // refresh after delete
- refresh();
- }
-
- /**
- * Get the download path
- */
- private String getDownloadPath()
- {
-
- IPath path = new Path(root);
-
- _actualRemoteHost = getActualHostFor(remotePath);
-
- // DKM - now we're using only the hostname to prefix the remote path. Thus multiple connections to the same place will
- // yield the temp files
- //path = path.append("/" + subsystem.getSystemProfileName() + "/" + subsystem.getSystemConnectionName() + "/");
- path = path.append("/" + _actualRemoteHost + "/"); //$NON-NLS-1$ //$NON-NLS-2$
-
- String absolutePath = getWorkspaceRemotePath(remotePath);
-
- int colonIndex = absolutePath.indexOf(IPath.DEVICE_SEPARATOR);
-
- if (colonIndex != -1)
- {
-
- if (colonIndex == 0)
- {
- absolutePath = absolutePath.substring(1);
- }
- else if (colonIndex == (absolutePath.length() - 1))
- {
- absolutePath = absolutePath.substring(0, colonIndex);
- }
- else
- {
- absolutePath = absolutePath.substring(0, colonIndex).toLowerCase() + absolutePath.substring(colonIndex + 1);
- }
- }
-
- String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- if (!os.startsWith("win")) //$NON-NLS-1$
- absolutePath = absolutePath.replace('\\', '/');
-
- // DY: We should only be escaping the remote portion of the path
- IPath remote = new Path(absolutePath);
- absolutePath = SystemFileNameHelper.getEscapedPath(remote.toOSString());
- _actualRemotePath = absolutePath;
-
- //path = path.append(absolutePath);
- //return SystemFileNameHelper.getEscapedPath(path.makeAbsolute().toOSString());
-
- return path.makeAbsolute().toOSString() + absolutePath;
- }
-
- /**
- * Gets the path to use in the workspace for saving the local replica remote file. In most cases
- * this path will be the same thing as the remote path however, this mechanism exists so that 3rd parties
- * can customize where temp files are saved.
- *
- * @param remotePath the absolute path to the resource on the host
- * @return the workspace mapping of the remote path
- */
- public String getWorkspaceRemotePath(String remotePath)
- {
- if (subsystem != null && subsystem.getHost().getSystemType().equals("Local")) //$NON-NLS-1$
- {
- return SystemRemoteEditManager.getDefault().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath);
- }
- return remotePath;
- }
-
- public String getActualHostFor(String remotePath)
- {
- String hostname = subsystem.getHost().getHostName();
- if (subsystem != null && subsystem.getHost().getSystemType().equals("Local")) //$NON-NLS-1$
- {
- String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
- if (!result.equals(hostname))
- {
- _isRemoteFileMounted = true;
- }
- return result;
- }
- return hostname;
- }
-
-
- /**
- * Returns the open IEditorPart for this remote object if there is one.
- */
- public IEditorPart getEditorPart()
- {
- return editor;
- }
-
- /**
- * Returns the remote object that is editable
- */
- public IAdaptable getRemoteObject()
- {
- return (IAdaptable) remoteFile;
- }
-
- /**
- * Is the local file open in an editor
- */
- public int checkOpenInEditor()
- {
- // first we check if it's open in the active page
- IWorkbenchPage activePage = this.page;
- IWorkbench wb = PlatformUI.getWorkbench();
- if (activePage == null)
- {
- IWorkbenchWindow activeWindow = wb.getActiveWorkbenchWindow();
- activePage = activeWindow.getActivePage();
- }
-
- IEditorReference[] activeReferences = activePage.getEditorReferences();
-
- IEditorPart part;
- java.io.File lFile = new java.io.File(localPath);
-
- for (int k = 0; k < activeReferences.length; k++)
- {
-
- // Need to think about whether to restore the editor here,
- // i.e. whether the argument to the getEditor() should be true
- part = activeReferences[k].getEditor(false);
-
- //DKM***if (part instanceof SystemTextEditor)
- if (part != null)
- {
-
- IEditorInput editorInput = part.getEditorInput();
-
- if (editorInput instanceof IFileEditorInput)
- {
- IPath path = ((IFileEditorInput) editorInput).getFile().getLocation();
- java.io.File pathFile = new java.io.File(path.toOSString());
-
- if (pathFile.compareTo(lFile) == 0)
- {
- //if (path.makeAbsolute().toOSString().equalsIgnoreCase(localPath))
- //{
- return OPEN_IN_SAME_PERSPECTIVE;
- }
- }
- }
- }
-
- IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
-
- for (int i = 0; i < windows.length; i++)
- {
-
- IWorkbenchPage[] pages = windows[i].getPages();
-
- for (int j = 0; j < pages.length; j++)
- {
-
- IEditorReference[] references = pages[j].getEditorReferences();
-
- if (pages[j] == activePage)
- {
- continue;
- }
-
- IEditorPart temp;
-
- for (int k = 0; k < references.length; k++)
- {
-
- // Need to think about whether to restore the editor here,
- // i.e. whether the argument to the getEditor() should be true
- temp = references[k].getEditor(false);
-
- IEditorInput editorInput = temp.getEditorInput();
-
- if (editorInput instanceof IFileEditorInput)
- {
- IPath path = ((IFileEditorInput) editorInput).getFile().getLocation();
-
- if (path.makeAbsolute().toOSString().equalsIgnoreCase(localPath))
- {
- return OPEN_IN_DIFFERENT_PERSPECTIVE;
- }
- }
-
- }
- }
- }
-
- return NOT_OPEN;
- }
-
- /**
- * Open in editor
- */
- public void open(Shell shell)
- {
- open(shell, false);
- }
-
- /**
- * Open in editor
- */
- public void open(Shell shell, boolean readOnly)
- {
-
- try
- {
-
-
- // first check if file is already open in an editor
- int result = checkOpenInEditor();
- // ensure the file is stale
- remoteFile.markStale(true, false);
- {
- remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath());
- }
-
- if (!remoteFile.exists())
- {
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
- SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
- dialog.open();
- return;
- }
-
- if (result == NOT_OPEN)
- {
- if (readOnly)
- {
- if (download(shell))
- {
- setLocalResourceProperties();
- openEditor();
- setEditorAsReadOnly();
- }
- }
- else if (!isReadOnly())
- { // we have write access
- if (download(shell))
- {
- addAsListener();
- setLocalResourceProperties();
- openEditor();
- }
- }
- else
- { // we do not have write access
-
- IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath);
- if (!fakeRemoteFile.exists())
- { // this could be because file doesn't exist
- download(shell);
- }
-
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_NO_WRITE);
- message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
- SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
-
- boolean answer = dialog.openQuestion();
-
- if (answer)
- {
- if (download(shell))
- {
- setLocalResourceProperties();
- setReadOnly(getLocalResource(), true);
- openEditor();
- setEditorAsReadOnly();
- }
- }
- }
- }
- else if (result == OPEN_IN_SAME_PERSPECTIVE)
- {
- openEditor();
- }
- else if (result == OPEN_IN_DIFFERENT_PERSPECTIVE)
- {
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR);
- message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
- SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
-
- boolean answer = dialog.openQuestion();
-
- if (answer)
- {
- openEditor();
- setEditorAsReadOnly(); // put editor in read only mode, but not file
- }
- }
- }
- catch (Exception e)
- {
-
- if (e instanceof InterruptedException)
- {
- // do nothing since user pressed cancel
- }
- else if (e instanceof SystemMessageException)
- {
- SystemMessageDialog dialog = new SystemMessageDialog(shell, ((SystemMessageException) e).getSystemMessage());
- dialog.open();
- }
- else
- {
- RemoteFileIOException exc = new RemoteFileIOException(e);
- SystemMessageDialog dialog = new SystemMessageDialog(shell, exc.getSystemMessage());
- dialog.open();
- }
- }
- }
-
-
- /**
- * Open in editor
- */
- public void open(IProgressMonitor monitor)
- {
- open(monitor, false);
- }
-
- /**
- * Open in editor
- */
- public void open(IProgressMonitor monitor, boolean readOnly)
- {
-
- try
- {
-
- // ensure the file is stale
- remoteFile.markStale(true, false);
- {
- remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath());
- }
-
- if (!remoteFile.exists())
- {
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
-
-
- DisplayMessageDialog dd = new DisplayMessageDialog(message);
- Display.getDefault().syncExec(dd);
- return;
- }
-
- // assumption is that editor is not open
-
- if (readOnly)
- {
- if (download(monitor))
- {
- setLocalResourceProperties();
- openEditor();
- setEditorAsReadOnly();
- }
- }
- else if (!isReadOnly())
- { // we have write access
- if (download(monitor))
- {
- addAsListener();
- setLocalResourceProperties();
- openEditor();
- }
- }
- else
- { // we do not have write access
-
- IRemoteFile fakeRemoteFile = subsystem.getRemoteFileObject(remotePath);
- if (!fakeRemoteFile.exists())
- { // this could be because file doesn't exist
- download(monitor);
- }
-
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_NO_WRITE);
- message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
-
- DisplayQuestionDialog dd = new DisplayQuestionDialog(message);
- Display.getDefault().syncExec(dd);
- boolean answer = dd.getResponse();
-
-
- if (answer)
- {
- if (download(monitor))
- {
- setLocalResourceProperties();
- setReadOnly(getLocalResource(), true);
- openEditor();
- setEditorAsReadOnly();
- }
- }
- }
-
- }
- catch (Exception e)
- {
-
- if (e instanceof InterruptedException)
- {
- // do nothing since user pressed cancel
- }
- else if (e instanceof SystemMessageException)
- {
- DisplayMessageDialog dd = new DisplayMessageDialog(((SystemMessageException)e).getSystemMessage());
- Display.getDefault().syncExec(dd);
- }
- else
- {
- RemoteFileIOException exc = new RemoteFileIOException(e);
- DisplayMessageDialog dd = new DisplayMessageDialog(exc.getSystemMessage());
- Display.getDefault().syncExec(dd);
- }
- }
- }
-
-
- public class DisplayMessageDialog implements Runnable
- {
- protected SystemMessage _msg;
- public DisplayMessageDialog(SystemMessage msg)
- {
- _msg = msg;
- }
-
- public void run()
- {
- SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), _msg);
- dialog.open();
- }
- }
-
- public class DisplayQuestionDialog implements Runnable
- {
- protected SystemMessage _msg;
- public boolean _responce = false;
- public DisplayQuestionDialog(SystemMessage msg)
- {
- _msg = msg;
- }
-
- public boolean getResponse()
- {
- return _responce;
- }
-
- public void run()
- {
- SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), _msg);
- try
- {
- _responce = dialog.openQuestion();
- }
- catch (Exception e)
- {
-
- }
- }
- }
-
- /**
- * Open in system editor
- */
- public void openInSystemEditor(Shell shell)
- {
-
- try
- {
- if (remoteFile.getSystemConnection().getSystemType().equals("Local")) //$NON-NLS-1$
- {
- // Open local files "in-place", i.e. don't copy them to the
- // RemoteSystemsTempFiles project first
- if (remoteFile instanceof IVirtualRemoteFile)
- {
- Program.launch(remoteFile.getAbsolutePath());
- }
- else
- {
- Program.launch(remotePath);
- }
-
- }
- else
- {
- download(shell);
- IFile file = getLocalResource();
- // DY: set resource as read only when launching in external editor
- // because we do not get notified of save events (unless the user selects
- // "Refresh from local" on the project) and therefore cannot
- // push changes back to the server.
- setReadOnly(file, true);
- openSystemEditor();
- }
- }
- catch (Exception e)
- {
-
- if (e instanceof SystemMessageException)
- {
- SystemMessageDialog dialog = new SystemMessageDialog(shell, ((SystemMessageException) e).getSystemMessage());
- dialog.open();
- }
- else
- {
- RemoteFileIOException exc = new RemoteFileIOException(e);
- SystemMessageDialog dialog = new SystemMessageDialog(shell, exc.getSystemMessage());
- dialog.open();
- }
- }
- }
-
- /**
- * Open in in place editor
- */
- public void openInInPlaceEditor(Shell shell)
- {
-
- try
- {
- download(shell);
- IFile file = getLocalResource();
- // DY: set resource as read only when launching in external editor
- // because we do not get notified of save events (unless the user selects
- // "Refresh from local" on the project) and therefore cannot
- // push changes back to the server.
- setReadOnly(file, true);
- openInPlaceEditor();
-
- }
- catch (Exception e)
- {
-
- if (e instanceof SystemMessageException)
- {
- SystemMessageDialog dialog = new SystemMessageDialog(shell, ((SystemMessageException) e).getSystemMessage());
- dialog.open();
- }
- else
- {
- RemoteFileIOException exc = new RemoteFileIOException(e);
- SystemMessageDialog dialog = new SystemMessageDialog(shell, exc.getSystemMessage());
- dialog.open();
- }
- }
- }
-
-
- /**
- * Set local resource properties
- */
- public void setLocalResourceProperties() throws CoreException
- {
- IFile file = getLocalResource();
-
- SystemIFileProperties properties = new SystemIFileProperties(file);
-
- String profileID = subsystem.getParentRemoteFileSubSystemConfiguration().getEditorProfileID();
- properties.setEditorProfileType(profileID);
-
- // need this to get a reference back to the object
- properties.setRemoteFileObject(this);
-
- // set remote properties
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- String subSystemId = registry.getAbsoluteNameForSubSystem(subsystem);
- properties.setRemoteFileSubSystem(subSystemId);
- properties.setRemoteFilePath(remoteFile.getAbsolutePath());
-
- properties.setRemoteFileMounted(_isRemoteFileMounted);
- if (_isRemoteFileMounted)
- {
- properties.setResolvedMountedRemoteFileHost(_actualRemoteHost);
- properties.setResolvedMountedRemoteFilePath(_actualRemotePath);
- }
-
- // if we have an xml file, find the local encoding of the file
- SystemEncodingUtil util = SystemEncodingUtil.getInstance();
- String encoding = null;
-
- String tempPath = file.getLocation().toOSString();
-
-
-
- if (util.isXML(tempPath)) {
-
- try {
- encoding = util.getXMLFileEncoding(tempPath);
- }
- catch (IOException e) {
- IStatus s = new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.ERROR, e.getLocalizedMessage(), e);
- throw new CoreException(s);
- }
- }
- else {
-
- if (!properties.getUsedBinaryTransfer()) {
- encoding = SystemEncodingUtil.ENCODING_UTF_8;
- }
- }
-
- try
- {
- if (encoding != null)
- {
- if (!file.getCharset().equals(encoding))
- {
- file.setCharset(encoding, null);
- }
- }
- }
- catch (Exception e)
- {
- }
- }
-
- /**
- * Register as listener for various events
- */
- public void addAsListener()
- {
- try
- {
- if (!isReadOnly())
- {
- if (SystemBasePlugin.getActiveWorkbenchWindow() != null)
- {
- if (SystemBasePlugin.getActiveWorkbenchWindow().getActivePage() != null)
- {
- SystemBasePlugin.getActiveWorkbenchWindow().getActivePage().addPartListener(this);
- }
- }
- SystemUniversalTempFileListener.getListener().registerEditedFile(this);
- }
- }
- catch (Exception e)
- {
- }
- }
-
- /**
- * Open the editor
- */
- public void openEditor() throws PartInitException
- {
- IWorkbenchPage activePage = this.page;
- IWorkbench wb = PlatformUI.getWorkbench();
- if (activePage == null)
- {
- activePage = wb.getActiveWorkbenchWindow().getActivePage();
- }
- IFile file = getLocalResource();
-
- // get fresh remote file object
- remoteFile.markStale(true); // make sure we get the latest remote file (with proper permissions and all)
- try
- {
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
- }
- catch (Exception e)
- {
-
- }
- boolean readOnly = !remoteFile.canWrite();
- ResourceAttributes attr = file.getResourceAttributes();
- attr.setReadOnly(readOnly);
- try
- {
- file.setResourceAttributes(attr);
- }
- catch (Exception e)
- {
-
- }
-
- // set editor as preferred editor for this file
- IDE.setDefaultEditor(file, _editorId);
-
- FileEditorInput finput = new FileEditorInput(file);
-
- // check for files already open
-
- // DKM - when _editorId is not lpex, this causes problem
- // DY - changed editor from SystemTextEditor to IEditorPart
- //editor = (SystemTextEditor)activePage.openEditor(file, _editorId);
- editor = activePage.openEditor(finput, _editorId);
-
- SystemIFileProperties properties = new SystemIFileProperties(file);
- properties.setRemoteFileObject(this);
- }
-
- /**
- * Open the system editor
- */
- public void openSystemEditor() throws PartInitException
- {
- IWorkbenchPage activePage = this.page;
- if (activePage == null)
- {
- activePage = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
- }
- IFile file = getLocalResource();
-
- // set editor as preferred editor for this file
- IDE.setDefaultEditor(file, _editorId);
-
- FileEditorInput fileInput = new FileEditorInput(file);
- activePage.openEditor(fileInput, IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
-
- SystemIFileProperties properties = new SystemIFileProperties(file);
- properties.setRemoteFileObject(this);
- }
-
- /**
- * Open the in place editor
- */
- private void openInPlaceEditor() throws PartInitException
- {
- IWorkbenchPage activePage = this.page;
- if (activePage == null)
- {
- activePage = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
- }
- IFile file = getLocalResource();
- FileEditorInput fileInput = new FileEditorInput(file);
- activePage.openEditor(fileInput, IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID);
-
- }
-
- /**
- * Set editor to read only
- */
- private void setEditorAsReadOnly()
- {
- if (editor instanceof ISystemTextEditor)
- {
- ((ISystemTextEditor) editor).setReadOnly(true);
- }
- IFile file = getLocalResource();
-
- SystemIFileProperties properties = new SystemIFileProperties(file);
- properties.setReadOnly(true);
- }
-
- /**
- * Refresh
- */
- private void refresh()
- {
-
- SystemRemoteEditManager.getDefault().refreshRemoteEditContainer(localFile.getParent());
- }
-
- /**
- * @see IPartListener#partActivated(IWorkbenchPart)
- */
- public void partActivated(IWorkbenchPart part)
- {
- }
-
- /**
- * @see IPartListener#partBroughtToTop(IWorkbenchPart)
- */
- public void partBroughtToTop(IWorkbenchPart part)
- {
- }
-
- /**
- * @see IPartListener#partClosed(IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part)
- {
- /*
- if (editor == part)
- {
- delete();
- }
- */
- SystemUniversalTempFileListener.getListener().unregisterEditedFile(this);
-
- IWorkbenchPage page = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
-
- if (page != null)
- {
- page.removePartListener(this);
- }
- }
-
- /**
- * @see IPartListener#partDeactivated(IWorkbenchPart)
- */
- public void partDeactivated(IWorkbenchPart part)
- {
- }
-
- /**
- * @see IPartListener#partOpened(IWorkbenchPart)
- */
- public void partOpened(IWorkbenchPart part)
- {
- }
-
- /**
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event)
- {
- /*
- if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
-
- IResourceDelta delta = event.getDelta();
-
- try {
- delta.accept(this);
- }
- catch (CoreException e) {
- RSEUIPlugin.logError("Error accepting delta", e);
- RemoteFileIOException exc = new RemoteFileIOException(e);
- SystemMessageDialog dialog = new SystemMessageDialog(RSEUIPlugin.getActiveWorkbenchShell(), exc.getSystemMessage());
- dialog.open();
- }
- }
- */
- }
-
- /**
- * @see IResourceDeltaVisitor#visit(IResourceDelta)
- */
- public boolean visit(IResourceDelta delta) throws CoreException
- {
-
- if (delta.getKind() == IResourceDelta.CHANGED)
- process(delta);
-
- return true;
- }
-
- /**
- * Process the resource delta
- */
- private void process(IResourceDelta delta)
- {
-
- IResource resource = delta.getResource();
-
- try
- {
-
- if (resource.getLocation().equals(getLocalResource().getLocation()))
- {
- upload();
- }
- }
- catch (Exception e)
- {
-
- SystemBasePlugin.logError("Error uploading file", e); //$NON-NLS-1$
-
- if (e instanceof SystemMessageException)
- {
- SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), ((SystemMessageException) e).getSystemMessage());
- dialog.open();
- }
- else
- {
- RemoteFileIOException exc = new RemoteFileIOException(e);
- SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), exc.getSystemMessage());
- dialog.open();
- }
- }
- }
-
- /**
- * Save as to a remote location
- */
- public boolean saveAs(IRemoteFile newRemoteFile, IProgressMonitor progressMonitor)
- {
- if (editor == null)
- {
- try
- {
- openEditor();
- }
- catch (Exception e)
- {
- }
- }
-
- final IDocumentProvider documentProvider = ((ITextEditor) editor).getDocumentProvider();
-
- SystemEditableRemoteFile tempFile = new SystemEditableRemoteFile(newRemoteFile);
-
- IFile newFile = tempFile.getLocalResource();
-
- if (newFile.getLocation().equals(getLocalResource().getLocation()))
- {
-
- if (editor != null)
- {
- editor.doSave(progressMonitor);
- return true;
- }
- else
- {
- return true;
- }
- }
-
- final IFileEditorInput newInput = new FileEditorInput(newFile);
-
- WorkspaceModifyOperation op = new WorkspaceModifyOperation()
- {
-
- public void execute(final IProgressMonitor monitor) throws CoreException
- {
- documentProvider.saveDocument(monitor, newInput, documentProvider.getDocument(editor.getEditorInput()), true);
- }
- };
-
- boolean success = false;
-
- if (editor instanceof ISystemTextEditor)
- {
- documentProvider.aboutToChange(newInput);
- ISystemTextEditor systemEditor = (ISystemTextEditor) editor;
- systemEditor.refresh();
- try
- {
- new ProgressMonitorDialog(SystemBasePlugin.getActiveWorkbenchShell()).run(false, true, op);
- success = true;
- }
- catch (InterruptedException e)
- {
- }
- catch (InvocationTargetException e)
- {
- SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
- SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
- dialog.open();
- return true;
- }
- finally
- {
- documentProvider.changed(newInput);
-
- if (success)
- {
- systemEditor.setInput(newInput);
-
- // Delete the local resource associated with this object
- this.delete();
-
- // change properties of this object to the new file now
- this.setRemoteFile(newRemoteFile);
-
- try
- {
- this.setLocalResourceProperties();
- this.upload();
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
- SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
- dialog.open();
- return true;
- }
- }
- }
- }
-
- if (progressMonitor != null)
- {
- progressMonitor.setCanceled(!success);
- }
-
- return true;
- }
-
- public void updateDirtyIndicator()
- {
- // for lpex dirty indicator
- if (editor != null)
- {
- if (editor instanceof ISystemTextEditor)
- {
- ((ISystemTextEditor) editor).updateDirtyIndicator();
- }
- }
- }
-
- public boolean isDirty()
- {
- if (editor != null)
- return editor.isDirty();
- return false;
- }
-
-
- public String getAbsolutePath() {
- return remotePath;
- }
-
- public ISubSystem getSubSystem() {
- return subsystem;
- }
-
- public boolean exists()
- {
- return remoteFile.exists();
- }
-
- public boolean isStale()
- {
- return remoteFile.isStale();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemFileNameHelper.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemFileNameHelper.java
deleted file mode 100644
index e0d693564..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemFileNameHelper.java
+++ /dev/null
@@ -1,81 +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.files.ui.resources;
-
-import java.io.File;
-
-import org.eclipse.rse.model.SystemEscapeCharHelper;
-
-
-/**
- * This class converts a remote file name (including path) to a valid local one by
- * escaping invalid characters in local file names with an _xx escape sequence.
- */
-public class SystemFileNameHelper {
-
-
-
-// protected static final char[] array = {' ', ':', ';', '*', '?', '\'', '"', '<', '>', '|'};
- protected static final char[] array = {' ', ':', '*', '?', '"', '<', '>', '|'};
-
-
-
-
- /**
- * Get the escaped path name. Changes unsupported characters to _xyz.
- */
- public static String getEscapedPath(String path)
- {
- char c = File.separatorChar;
-
- // NOTE: if it's Linux, Unix or iSeries, we don't like '\\' character, i.e. escape it
- if (c == '/') {
- c = '\\';
- }
- // or if Windows, we don't like '/' character, i.e. escape it
- else if (c == '\\')
- {
- c = '/';
- }
-
- // first escape char
- array[0] = c;
-
-
- SystemEscapeCharHelper helper = new SystemEscapeCharHelper(array);
-
- int index = path.indexOf(':');
-
- // DKM - 56907
- if (index == -1 || path.charAt(0)==File.separatorChar)
- {
- return helper.getStringForFileName(path);
- }
- else
- {
- return (path.substring(0, index + 1) + helper.getStringForFileName(path.substring(index + 1)));
- }
- }
-
- /**
- * Gets the unescaped path name. Changes all _xyz to the original unsupported character.
- */
- public static String getUnescapedPath( String path ){
- SystemEscapeCharHelper helper = new SystemEscapeCharHelper(array);
- return helper.getStringFromFileName( path );
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 9e4e33ac3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemIFileProperties.java
+++ /dev/null
@@ -1,547 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.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.ui.RSEUIPlugin;
-
-
-
-/**
- * Class that encapsulates ISeries IResource persistent properties.
- */
-public class SystemIFileProperties implements ISystemTextEditorConstants, ISystemRemoteEditConstants {
-
-
- private static final String STRING_EMPTY = "";
- private static final String EXPORT_KEY = "export";
-
- private static QualifiedName _nameDirty = new QualifiedName( STRING_EMPTY, TEMP_FILE_DIRTY );
- private static QualifiedName _nameReadOnly = new QualifiedName( STRING_EMPTY, TEMP_FILE_READONLY );
- private static QualifiedName _nameEditorProfileType = new QualifiedName( STRING_EMPTY, EDITOR_PROFILE_TYPE );
- private static QualifiedName _nameEncoding = new QualifiedName( STRING_EMPTY, SOURCE_ENCODING_KEY );
- private static QualifiedName _nameHasSequenceNumbers = new QualifiedName( STRING_EMPTY, SEQUENCE_NUMBERS_KEY );
- private static QualifiedName _nameRecordLength = new QualifiedName( STRING_EMPTY, MAX_LINE_LENGTH_KEY );
- private static QualifiedName _nameRemoteCCSID = new QualifiedName( STRING_EMPTY, CCSID_KEY );
- private static QualifiedName _nameRemoteFileObject = new QualifiedName( STRING_EMPTY, REMOTE_FILE_OBJECT_KEY );
- private static QualifiedName _nameRemoteFilePath = new QualifiedName( STRING_EMPTY, REMOTE_FILE_PATH_KEY );
- private static QualifiedName _nameRemoteFileSubSystem = new QualifiedName( STRING_EMPTY, REMOTE_FILE_SUBSYSTEM_KEY );
- private static QualifiedName _nameRemoteFileTimeStamp = new QualifiedName( STRING_EMPTY, REMOTE_FILE_MODIFIED_STAMP );
- private static QualifiedName _nameDownloadFileTimeStamp = new QualifiedName( STRING_EMPTY, DOWNLOAD_FILE_MODIFIED_STAMP );
- private static QualifiedName _nameUsedBinaryTransfer = new QualifiedName( STRING_EMPTY, REMOTE_FILE_BINARY_TRANSFER );
- private static QualifiedName _nameTempCCSID = new QualifiedName( STRING_EMPTY, TEMP_CCSID_KEY );
- private static QualifiedName _nameRemoteBIDILogical = new QualifiedName( STRING_EMPTY, BIDI_LOGICAL_KEY );
-
- // for path mapping
- private static QualifiedName _nameRemoteFileMounted = new QualifiedName( STRING_EMPTY, REMOTE_FILE_MOUNTED);
- private static QualifiedName _nameResolvedMountedRemoteFileHost = new QualifiedName( STRING_EMPTY, RESOLVED_MOUNTED_REMOTE_FILE_HOST_KEY);
- private static QualifiedName _nameResolvedMountedRemoteFilePath = new QualifiedName( STRING_EMPTY, RESOLVED_MOUNTED_REMOTE_FILE_PATH_KEY);
-
- // 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(RSEUIPlugin.getDefault().getSymbolicName(), LOCAL_ENCODING_KEY);
-
- protected IResource _resource = null;
-
- /**
- *
- */
- public SystemIFileProperties( IResource file ){
- _resource = file;
-
- if( file == null )
- throw new NullPointerException();
- }
-
- /**
- * Returns the temp file dirty persistent property value.
- */
- public boolean getDirty(){
- return getPropertyBoolean( _nameDirty );
- }
-
- /**
- * Returns the temp file readonly persistent property value.
- */
- public boolean getReadOnly(){
- return getPropertyBoolean( _nameReadOnly);
- }
-
- /**
- * Returns whether the original file is marked as a mounted file
- */
- public boolean getRemoteFileMounted(){
- return getPropertyBoolean( _nameRemoteFileMounted);
- }
-
- /**
- * Returns the editor profile persistent property value.
- */
- public String getEditorProfileType(){
- return getPropertyString( _nameEditorProfileType );
- }
-
- /**
- * Returns the source encoding persistent property value.
- */
- public String getEncoding(){
- return getPropertyString( _nameEncoding );
- }
-
- /**
- * Gets the local encoding persistent property value.
- * @return the local encoding.
- */
- public String getLocalEncoding() {
- return getPropertyString(_nameLocalEncoding);
- }
-
- /**
- * Returns the file that this instance is associated with.
- */
- public IResource getFile() {
- return _resource;
- }
-
- /**
- * Returns the sequence numbers flag persistent property value.
- */
- public boolean getHasSequenceNumbers(){
- return getPropertyBoolean( _nameHasSequenceNumbers );
- }
-
- /**
- * Returns the session property value of the given property.
- */
- protected Object getParentSessionObject( QualifiedName name ){
- try{
- return _resource.getParent().getSessionProperty( name );
- }
- catch( CoreException ex ){
- return null;
- }
- }
-
- /**
- * Returns the value of a boolean property.
- */
- protected boolean getPropertyBoolean( QualifiedName name ){
- try{
- String strValue = _resource.getPersistentProperty( name );
- if( strValue == null )
- return false;
-
- return strValue.equals( "true" );
- }
- catch( CoreException ex ){
- return false;
- }
- }
-
- /**
- * Returns the value of an integer property.
- */
- protected int getPropertyInteger( QualifiedName name ){
- try{
- String strValue = _resource.getPersistentProperty( name );
-
- if( strValue == null )
- return 0;
-
- return Integer.parseInt( strValue );
- }
- catch( CoreException ex ){
- return 0;
- }
- catch( NumberFormatException ex ){
- return 0;
- }
- }
-
- /**
- * Returns the value of an integer property.
- */
- protected long getPropertyLong( QualifiedName name ){
- try{
- String strValue = _resource.getPersistentProperty( name );
-
- if( strValue == null )
- return 0;
-
- return Long.parseLong( strValue );
- }
- catch( CoreException ex ){
- return 0;
- }
- catch( NumberFormatException ex ){
- return 0;
- }
- catch (Exception e)
- {
- return 0;
- }
- }
-
- /**
- * Returns the value of a string persistent or session property.
- */
- protected String getPropertyString( QualifiedName name ){
- try{
- return _resource.getPersistentProperty( name );
- }
- catch( CoreException ex ){
- return STRING_EMPTY;
- }
- }
-
- /**
- * Returns the remote file object session property value.
- */
- public int getRecordLength() {
- return getPropertyInteger( _nameRecordLength );
- }
-
- /**
- * Returns the CCSID persistent property value.
- */
- public int getRemoteCCSID(){
- return getPropertyInteger( _nameRemoteCCSID );
- }
-
- /**
- * Returns the remote file object session property value.
- */
- public Object getRemoteFileObject(){
- return getSessionObject( _nameRemoteFileObject );
- }
-
- /**
- * Returns the remote file object session property value.
- */
- public Object getTempCCSID(){
- return getParentSessionObject( _nameTempCCSID );
- }
-
-
- /**
- * Returns the actual file (member) path persistent property value on the originating host.
- */
- public String getResolvedMountedRemoteFilePath(){
- return getPropertyString( _nameResolvedMountedRemoteFilePath);
- }
-
- /**
- * Returns the actual file (member) host persistent property value for a mounted file.
- */
- public String getResolvedMountedRemoteFileHost(){
- return getPropertyString( _nameResolvedMountedRemoteFileHost);
- }
-
- /**
- * Returns the full file (member) path persistent property value.
- */
- public String getRemoteFilePath(){
- return getPropertyString( _nameRemoteFilePath );
- }
-
- /**
- * Returns the sub-system name persistent property value.
- */
- public String getRemoteFileSubSystem(){
- return getPropertyString( _nameRemoteFileSubSystem );
- }
-
- /**
- * Returns the remote file time stamp persistent property value.
- */
- public long getRemoteFileTimeStamp(){
- return getPropertyLong( _nameRemoteFileTimeStamp );
- }
-
-
-
- /**
- * Returns the timestamp of the Eclipse resource after download
- */
- public long getDownloadFileTimeStamp(){
- return getPropertyLong( _nameDownloadFileTimeStamp );
- }
-
- /**
- * Returns the session property value of the given property.
- */
- protected Object getSessionObject( QualifiedName name ){
- try{
- return _resource.getSessionProperty( name );
- }
- catch( CoreException ex ){
- return null;
- }
- }
-
- /**
- * Returns the binary transfer flag persistent property value.
- */
- public boolean getUsedBinaryTransfer(){
- return getPropertyBoolean( _nameUsedBinaryTransfer );
- }
-
- /**
- * Sets the temp file dirty persistent property value.
- */
- public void setDirty( boolean bDirty ){
- setPropertyBoolean( _nameDirty, bDirty );
- }
-
- /**
- * Sets the temp file readonly persistent property value.
- */
- public void setReadOnly( boolean bReadOnly ){
- setPropertyBoolean( _nameReadOnly, bReadOnly );
- }
-
- /**
- * Sets the remote file mounted indicator property value
- */
- public void setRemoteFileMounted( boolean bMounted){
- setPropertyBoolean( _nameRemoteFileMounted, bMounted);
- }
-
- /**
- * Sets the editor profile type persistent property value.
- */
- public void setEditorProfileType( String strType ){
- setPropertyString( _nameEditorProfileType, strType );
- }
-
- /**
- * Sets the source encoding persistent property value.
- */
- public void setEncoding( String strEncoding ){
- setPropertyString( _nameEncoding, strEncoding );
- }
-
- /**
- * Sets the local encoding persistent property value.
- * @param strLocalEncoding the local encoding.
- */
- public void setLocalEncoding(String strLocalEncoding) {
- setPropertyString(_nameLocalEncoding, strLocalEncoding);
- }
-
- /**
- * Returns whether the file is stored in BIDI logical format.
- * @return <code>true</code> if the file is stored in BIDI logical format, <code>false</code> if the file is stored in BIDI
- * visual format.
- */
- public boolean getBIDILogical() {
- return getPropertyBoolean(_nameRemoteBIDILogical);
- }
-
- /**
- * Sets whether the file is stored in BIDI logical format.
- * @param logical <code>true</code> if the file is stored in BIDI logical format, <code>false</code> if the file is stored in BIDI
- * visual format.
- */
- public void setBIDILogical(boolean logical) {
- setPropertyBoolean(_nameRemoteBIDILogical, logical);
- }
-
- /**
- * Sets the sequence numbers flag persistent property value.
- */
- public void setHasSequenceNumbers( boolean bSequenceNumbers ){
- setPropertyBoolean( _nameHasSequenceNumbers, bSequenceNumbers );
- }
-
- /**
- * Sets the session property to the given object.
- */
- protected void setParentSessionObject( QualifiedName name, Object objValue ){
- try{
- _resource.getParent().setSessionProperty( name, objValue );
- }
- catch( CoreException ex ){
- }
- }
-
- /**
- * Sets a boolean property given a property name, and its value.
- */
- protected void setPropertyBoolean( QualifiedName name, boolean bValue ){
- setPropertyString( name, bValue == true ? "true" : "false" );
- }
-
- /**
- * Sets a boolean property given a property name, and its value.
- */
- protected void setPropertyInteger( QualifiedName name, int iValue ){
- setPropertyString( name, String.valueOf( iValue ) );
- }
-
- /**
- * Sets a boolean property given a property name, and its value.
- */
- protected void setPropertyLong( QualifiedName name, long lValue ){
- setPropertyString( name, String.valueOf( lValue ) );
- }
-
- /**
- * Sets a string property given a property name, and its value.
- */
- protected void setPropertyString( QualifiedName name, String strValue ){
-
- // Setting is expensive, so do get and compare first
- //--------------------------------------------------
- String strValueCurrent = null;
-
- try{
- strValueCurrent = _resource.getPersistentProperty( name );
- }
-
- catch( CoreException ex ){
- strValueCurrent = STRING_EMPTY;
- }
-
- // If the value to be set is currently set, do nothing
- //----------------------------------------------------
- if( strValue != null && strValue.equals( strValueCurrent ) == true )
- return;
-
- // McCoy the new value
- //--------------------
- try{
- _resource.setPersistentProperty( name, strValue );
- }
- catch( CoreException ex ){
- }
- }
-
- /**
- * Sets the record length persistent property value.
- */
- public void setRecordLength( int iRecordLength ){
- setPropertyInteger( _nameRecordLength, iRecordLength );
- }
-
- /**
- * Sets the codepage source encoding such as "Cp937" persistent property value.
- */
- public void setRemoteCCSID( int iCCSID ){
- setPropertyInteger( _nameRemoteCCSID, iCCSID );
- }
-
- /**
- * Sets the remote system member path persistent property value.
- */
- public void setRemoteFileObject( Object object ) {
- setSessionObject( _nameRemoteFileObject, object );
- }
-
-
- /**
- * Sets the actual remote system file (member) path persistent property value on the originating host.
- */
- public void setResolvedMountedRemoteFilePath( String strPath ){
- setPropertyString( _nameResolvedMountedRemoteFilePath, strPath );
- }
-
-
- /**
- * Sets the actual remote system file (member) path persistent property value on the originating host.
- */
- public void setResolvedMountedRemoteFileHost( String strHost ){
- setPropertyString( _nameResolvedMountedRemoteFileHost, strHost );
- }
-
- /**
- * Sets the remote system file (member) path persistent property value.
- */
- public void setRemoteFilePath( String strPath ){
- setPropertyString( _nameRemoteFilePath, strPath );
- }
-
- /**
- * Sets the sub system name persistent property value.
- */
- public void setRemoteFileSubSystem( String strSubSystem ){
- setPropertyString( _nameRemoteFileSubSystem, strSubSystem );
- }
-
- /**
- * Sets the remote file time stamp persistent property value.
- */
- public void setRemoteFileTimeStamp( long lTimeStamp ){
- setPropertyLong( _nameRemoteFileTimeStamp, lTimeStamp );
- }
-
- /**
- * Sets the local file time stamp property value of download.
- */
- public void setDownloadFileTimeStamp( long lTimeStamp ){
- setPropertyLong( _nameDownloadFileTimeStamp, lTimeStamp );
- }
-
- /**
- * Sets the session property to the given object.
- */
- protected void setSessionObject( QualifiedName name, Object objValue ){
- try{
- _resource.setSessionProperty( name, objValue );
- }
- catch( CoreException ex ){
- }
- }
-
- /**
- * Sets the remote system member path persistent property value.
- */
- public void setTempCCSID( Object object ) {
- setParentSessionObject( _nameTempCCSID, object );
- }
-
- /**
- * Sets the binary transfer flag persistent property value.
- */
- public void setUsedBinaryTransfer( boolean bBinaryTransfer ){
- setPropertyBoolean( _nameUsedBinaryTransfer, bBinaryTransfer );
- }
-
- public void setModificationStampAtExport(String hostName, String destination, long modificationStamp) {
- QualifiedName key = new QualifiedName(STRING_EMPTY, EXPORT_KEY + ":" + hostName + ":" + destination);
- setPropertyLong(key, modificationStamp);
- }
-
- public long getModificationStampAtExport(String hostName, String destination) {
- QualifiedName key = new QualifiedName(STRING_EMPTY, EXPORT_KEY + ":" + hostName + ":" + destination);
- return getPropertyLong(key);
- }
-
- public boolean hasModificationStampAtExport(String hostName, String destination) {
- QualifiedName key = new QualifiedName(STRING_EMPTY, EXPORT_KEY + ":" + hostName + ":" + destination);
- String val = getPropertyString(key);
-
- if (val != null) {
- return true;
- }
- else {
- return false;
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ac7d2fc2f..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteEditManager.java
+++ /dev/null
@@ -1,773 +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.files.ui.resources;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-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;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-/**
- * This is a singleton class that manages the remote editing
- */
-
-public class SystemRemoteEditManager
-{
- public static final String REMOTE_EDIT_PROJECT_NAME = "RemoteSystemsTempFiles";
- public static final String REMOTE_EDIT_PROJECT_NATURE_ID = "org.eclipse.rse.ui.remoteSystemsTempNature";
- public static final String REMOTE_EDIT_PROJECT_BUILDER_ID = "org.eclipse.rse.ui.remoteSystemsTempBuilder";
-
- private static SystemRemoteEditManager inst;
- //private RSEUIPlugin plugin;
- private List _mountPathMappers;
-
- /**
- * Constructor for SystemRemoteEditManager
- */
- private SystemRemoteEditManager()
- {
- super();
- //plugin = RSEUIPlugin.getDefault();
- registerMountPathMappers();
- }
-
- /**
- * Get the singleton instance
- */
- public static SystemRemoteEditManager getDefault()
- {
-
- if (inst == null)
- inst = new SystemRemoteEditManager();
-
- return inst;
- }
-
- /**
- * Return the hostname that corresponds to the resource specified on the host specified. If
- * the resource is actually on the specified host, then the result will be the same as hostname. If
- * the resource is mounted then a mount path mapper has the opportunity to return the actual host.
- * @param hostname the system on which a resource is obtained (may contain the file via a mount)
- * @param remotePath the path on the host where the resource is obtained
- * @return the actual host where the resource exists
- */
- public String getActualHostFor(String hostname, String remotePath)
- {
- ISystemMountPathMapper mapper = getMountPathMapperFor(hostname, remotePath);
- if (mapper != null)
- {
- return mapper.getActualHostFor(hostname, remotePath);
- }
- else
- {
- return hostname;
- }
- }
-
- /**
- * Return the path to use on the system (i.e. Windows) for saving from the workspace to remote
- * @param hostname the remote host
- * @param remotePath the file path on the remote host
- * @return the system path
- */
- public String getMountPathFor(String hostname, String remotePath)
- {
- ISystemMountPathMapper mapper = getMountPathMapperFor(hostname, remotePath);
- if (mapper != null)
- {
- return mapper.getMountedMappingFor(hostname, remotePath);
- }
- else
- {
- return remotePath;
- }
- }
-
- /**
- * Return the path to use relative to the hostname in the RemoteSystemsTempFiles project for saving a local replica
- * @param hostname the originating remote host
- * @param remotePath the file path on the system (i.e. Windows)
- * @return the relative replica path
- */
- public String getWorkspacePathFor(String hostname, String remotePath)
- {
- ISystemMountPathMapper mapper = getMountPathMapperFor(hostname, remotePath);
- if (mapper != null)
- {
- return mapper.getWorkspaceMappingFor(hostname, remotePath);
- }
- else
- {
- return remotePath;
- }
- }
-
- /**
- * Return the appropriate registered mapper for a host & path
- * @param hostname
- * @param remotePath
- * @return appropriate mapper
- */
- public ISystemMountPathMapper getMountPathMapperFor(String hostname, String remotePath)
- {
- for (int i = 0; i < _mountPathMappers.size(); i++)
- {
- ISystemMountPathMapper mapper = (ISystemMountPathMapper) _mountPathMappers.get(i);
- if (mapper != null)
- {
- if (mapper.handlesMappingFor(hostname, remotePath))
- {
- return mapper;
- }
- }
- }
- return null;
- }
-
- protected void registerMountPathMappers()
- {
- _mountPathMappers = new ArrayList();
-
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // Get configured extenders
- IConfigurationElement[] systemTypeExtensions = registry.getConfigurationElementsFor("org.eclipse.rse.ui", "mountPathMappers");
-
- for (int i = 0; i < systemTypeExtensions.length; i++)
- {
- try
- {
- _mountPathMappers.add(systemTypeExtensions[i].createExecutableExtension("class"));
- }
- catch (Exception e)
- {
- }
- }
- }
-
- /**
- * Check if a remote edit project exists
- * @return true if it does
- */
- public boolean doesRemoteEditProjectExist()
- {
- IWorkspaceRoot root = SystemBasePlugin.getWorkspaceRoot();
-
- IProject editProject = root.getProject(REMOTE_EDIT_PROJECT_NAME);
-
- if ((editProject != null) && (editProject.exists()) && (editProject.isOpen()))
- return true;
- return false;
- }
-
- /**
- * Get the project that in which all folders and files are held temporarily
- * for remote editing. Create the project if it doesn't exist already, and opens
- * it if it is not already open.
- * @return the project where all files should be stored during remote edit.
- */
- public IProject getRemoteEditProject()
- {
- IWorkspaceRoot root = SystemBasePlugin.getWorkspaceRoot();
-
- IProject editProject = root.getProject(REMOTE_EDIT_PROJECT_NAME);
-
- if ((editProject != null) && (editProject.exists()) && (editProject.isOpen()))
- {
- try
- {
- /* no more java support
- if (!editProject.hasNature(JavaCore.NATURE_ID))
- {
- addJavaSupport(editProject);
- }
- * no need for this anymore
- * normally there is no cdt - so let's not do this everytime
- if (!editProject.hasNature("org.eclipse.cdt.core.cnature"))
- {
- addCSupport(editProject);
- }
- */
- }
- catch (Exception e)
- {
-
- }
- return editProject;
- }
-
- if ((editProject == null) || !(editProject.exists()) || !(editProject.isOpen()))
- editProject = createRemoteEditProject();
-
- return editProject;
- }
-
- /**
- * Creates the remote project, and opens it if it not open.
- * @return the project where all files should be stored during remote editing
- */
- private IProject createRemoteEditProject()
- {
- IWorkspaceRoot root = SystemBasePlugin.getWorkspaceRoot();
-
- IProject editProject = root.getProject(REMOTE_EDIT_PROJECT_NAME);
-
- if ((editProject != null) && (editProject.exists()) && (editProject.isOpen()))
- {
- /*
- try
- {
- // no java or c support - this needs to be contributed from elsewhere
- if (!editProject.hasNature(JavaCore.NATURE_ID))
- {
- addJavaSupport(editProject);
- }
-
- if (!editProject.hasNature("org.eclipse.cdt.core.cnature"))
- {
- addCSupport(editProject);
- }
-
- }
- catch (CoreException e)
- {
- }
- */
- return editProject;
- }
-
- if (editProject == null)
- {
- // log error and throw an exception
- }
-
- try
- {
- if (!editProject.exists())
- editProject.create(null);
-
- if (!editProject.isOpen())
- editProject.open(null);
-
- IProjectDescription description = editProject.getDescription();
- String[] natures = description.getNatureIds();
- String[] newNatures = new String[natures.length + 1];
-
- // copy all previous natures
- for (int i = 0; i < natures.length; i++)
- {
- newNatures[i] = natures[i];
- }
-
-
- newNatures[newNatures.length - 1] = REMOTE_EDIT_PROJECT_NATURE_ID;
-
- description.setNatureIds(newNatures);
- editProject.setDescription(description, null);
- editProject.setDefaultCharset(SystemEncodingUtil.ENCODING_UTF_8, new NullProgressMonitor());
-
-
- // add java support
- //addJavaSupport(editProject);
-
- // add c support
- //addCSupport(editProject);
- }
- catch (CoreException e)
- {
- SystemBasePlugin.logError("Error creating temp project", e);
- }
- return editProject;
- }
-/*
- public void addCSupport(IProject editProject)
- {
-
- try
- {
- IProjectDescription description = editProject.getDescription();
- String[] natures = description.getNatureIds();
- ICommand[] buildSpecs = description.getBuildSpec();
-
- String[] newNatures = new String[natures.length + 2];
-
- // copy all previous natures
- for (int i = 0; i < natures.length; i++)
- {
- newNatures[i] = natures[i];
- }
-
- newNatures[newNatures.length - 2] = "org.eclipse.cdt.core.cnature";
- newNatures[newNatures.length - 1] = "org.eclipse.cdt.core.ccnature";//CCProjectNature.CC_NATURE_ID;
-
- description.setNatureIds(newNatures);
-
- // make sure no build specs added
- description.setBuildSpec(buildSpecs);
-
- editProject.setDescription(description, null);
- }
- catch (Exception e)
- {
-
- }
- }
- */
- /*
- public void addJavaSupport(IProject editProject)
- {
-
- try
- {
- IProjectDescription description = editProject.getDescription();
- String[] natures = description.getNatureIds();
- ICommand[] buildSpecs = description.getBuildSpec();
-
- String[] newNatures = new String[natures.length + 1];
-
- // copy all previous natures
- for (int i = 0; i < natures.length; i++)
- {
- newNatures[i] = natures[i];
- }
-
- newNatures[newNatures.length - 1] = JavaCore.NATURE_ID;
-
- description.setNatureIds(newNatures);
- description.setBuildSpec(buildSpecs);
-
-
-
- editProject.setDescription(description, null);
-
-
- IJavaProject proj = JavaCore.create(editProject);
- IPath outputLocation = proj.getOutputLocation();
-
-
- // classpath
- IClasspathEntry[] classpath= new IClasspathEntry[1];
-
- IPath jdkLoc = new Path("org.eclipse.jdt.launching.JRE_CONTAINER");
- ClasspathEntry jreEntry = new ClasspathEntry(
- IPackageFragmentRoot.K_BINARY,
- IClasspathEntry.CPE_CONTAINER,
- jdkLoc,
- ClasspathEntry.INCLUDE_ALL,
- ClasspathEntry.EXCLUDE_NONE,
- null, // source attachment
- null, // source attachment root
- null, // specific output folder
- false);
- classpath[0]=jreEntry;
-
-
- proj.setRawClasspath(classpath, outputLocation, null);
-
- ((JavaProject)proj).deconfigure();
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- */
-
-
- /**
- * Get the location of the project used for remote editing
- */
- public IPath getRemoteEditProjectLocation()
- {
- //if (!doesRemoteEditProjectExist())
- // return null;
- // DKM - originally return null if it doesn't exist
- // but looks like lots of calls reference this expected to get something back
- // so I'll let project creation happen here
-
- return getRemoteEditProject().getLocation();
- }
-
- /**
- * Get the absolute path of the project used for remote editing
- */
- public String getRemoteEditProjectAbsolutePath()
- {
- return getRemoteEditProjectLocation().makeAbsolute().toOSString();
- }
-
- protected int caculateCacheSize()
- {
- if (!doesRemoteEditProjectExist())
- {
- return 0;
- }
- IProject project = getRemoteEditProject();
- String path = project.getLocation().toOSString();
- File file = new File(path);
- return calculateSize(file);
- }
-
- private int calculateSize(File file)
- {
- int size = 0;
- if (file.isFile())
- {
- size = (int) file.length();
- }
- else if (file.isDirectory())
- {
- File[] children = file.listFiles();
- for (int i = 0; i < children.length; i++)
- {
- size += calculateSize(children[i]);
- }
- }
-
- return size;
- }
-
- protected IFile getLeastRecentlyChangedFile(List deletedList)
- {
- // if no project exists, then no file exists
- if (!doesRemoteEditProjectExist())
- return null;
-
- IProject project = getRemoteEditProject();
-
- IFile result = getLeastRecentlyChangedFile(project, deletedList);
- deletedList.add(result);
- return result;
- }
-
- private IFile getLeastRecentlyChangedFile(IContainer file, List deletedList)
- {
-
- IFile result = null;
- try
- {
- IResource[] children = file.members();
- for (int i = 0; i < children.length; i++)
- {
- IFile candidate = null;
- IResource child = children[i];
- if (child instanceof IFolder)
- {
- candidate = getLeastRecentlyChangedFile((IFolder) child, deletedList);
- }
- else
- {
- candidate = (IFile) child;
- }
-
- if (candidate != null && !deletedList.contains(candidate) && !candidate.getName().startsWith(".") && !isFileInUse(candidate, true))
- {
- if (result == null)
- {
- result = candidate;
- }
- else if (candidate.getLocation().toFile().lastModified() < result.getLocation().toFile().lastModified())
- {
- result = candidate;
- }
- }
- }
- }
- catch (Exception e)
- {
- }
- return result;
- }
-
- public ISystemEditableRemoteObject getEditableFor(IFile fileToDelete, boolean quickCheck)
- {
- SystemIFileProperties properties = new SystemIFileProperties(fileToDelete);
- Object object = properties.getRemoteFileObject();
- if (object != null)
- {
- ISystemEditableRemoteObject editableFile = (ISystemEditableRemoteObject) object;
- return editableFile;
- }
- else if (!quickCheck)
- {
- // no object in memory, so try to reconstruct it from ids
- String subsystemStr = properties.getRemoteFileSubSystem();
- String pathStr = properties.getRemoteFilePath();
- if (subsystemStr != null && pathStr != null)
- {
- ISubSystem subsystem = RSEUIPlugin.getTheSystemRegistry().getSubSystem(subsystemStr);
- if (subsystem != null)
- {
- Object rmtObject = null;
- try
- {
- rmtObject = subsystem.getObjectWithAbsoluteName(pathStr);
- }
- catch (Exception e)
- {
- return null;
- }
- if (rmtObject != null && rmtObject instanceof IAdaptable)
- {
- ISystemRemoteElementAdapter adapter = (ISystemRemoteElementAdapter) ((IAdaptable) rmtObject).getAdapter(ISystemRemoteElementAdapter.class);
- if (adapter != null)
- {
- return adapter.getEditableRemoteObject(rmtObject);
- }
- }
- }
- }
- }
- return null;
- }
-
- public class DeleteFileRunnable implements Runnable
- {
- private IFile _theFile;
- public DeleteFileRunnable(IFile theFile)
- {
- _theFile = theFile;
- }
-
- public void run()
- {
- if (!inUse())
- {
- //System.out.println("deleting " + _theFile.getName());
- _theFile.getLocation().toFile().delete();
- }
- }
-
- public boolean inUse()
- {
- // if no temp files project, not in use
- if (!doesRemoteEditProjectExist())
- return false;
-
- IProject tempFilesProject = SystemRemoteEditManager.getDefault().getRemoteEditProject();
- IWorkbenchWindow activeWindow = SystemBasePlugin.getActiveWorkbenchWindow();
- IWorkbenchPage activePage = activeWindow.getActivePage();
-
- IEditorReference[] activeReferences = activePage.getEditorReferences();
-
- IEditorPart part;
-
- for (int k = 0; k < activeReferences.length; k++)
- {
- part = activeReferences[k].getEditor(true);
-
- if (part != null)
- {
- IEditorInput editorInput = part.getEditorInput();
-
- if (editorInput instanceof IFileEditorInput)
- {
- IFile file = ((IFileEditorInput) editorInput).getFile();
- if (file.equals(_theFile))
- {
- //System.out.println(file.getName() + " is in use");
- return true;
- }
- }
- }
-
- }
- return false;
- }
- }
-
- public boolean isFileInUse(IFile fileToDelete, boolean quickCheck)
- {
- // first check for dirty flag
- SystemIFileProperties properties = new SystemIFileProperties(fileToDelete);
- boolean isDirty = properties.getDirty();
- if (isDirty)
- {
- return true;
- }
- else
- {
-
- ISystemEditableRemoteObject editable = getEditableFor(fileToDelete, quickCheck);
- if (editable != null && quickCheck)
- {
- return true;
- }
-
- if (editable != null)
- {
- try
- {
- boolean result = editable.checkOpenInEditor() == ISystemEditableRemoteObject.NOT_OPEN;
- if (!result)
- {
- return !result;
- }
- }
- catch (Exception e)
- {
- }
- }
- }
- return false;
- }
-
- protected void cleanupCache()
- {
-
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- boolean enableMaxSize = store.getBoolean(ISystemPreferencesConstants.LIMIT_CACHE);
- if (enableMaxSize)
- {
- int max = Integer.parseInt(ISystemPreferencesConstants.DEFAULT_MAX_CACHE_SIZE) * 1000000;
-
- // get the cache limit
- try {
- String maxSize = store.getString(ISystemPreferencesConstants.MAX_CACHE_SIZE);
-
- if (maxSize != null && !maxSize.equals("")) {
- max = Integer.parseInt(maxSize) * 1000000;
- }
- }
- catch (NumberFormatException nfe) {
- SystemBasePlugin.logError("Could not get max cache size", nfe);
- max = Integer.parseInt(ISystemPreferencesConstants.DEFAULT_MAX_CACHE_SIZE) * 1000000;
- }
-
- try {
-
- // get the current cache size
- int currentSize = caculateCacheSize();
- if (currentSize > max)
- {
- // determine what to get rid of
- int delta = currentSize - max;
-
- List deletedList = new ArrayList();
- while (delta > 0)
- {
-
- // need to purge delta from the cache
- IFile leastRecent = getLeastRecentlyChangedFile(deletedList);
- if (leastRecent != null)
- {
-
- File theFile = leastRecent.getLocation().toFile();
-
- int sizeSaved = (int) theFile.length();
- Display.getDefault().asyncExec(new DeleteFileRunnable(leastRecent));
-
- // delete file
- delta -= sizeSaved;
- }
- else
- {
- delta = 0;
- }
- }
- }
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("Error occured trying to clean cache", e);
- // e.printStackTrace();
- }
- }
- }
-
- /**
- * Refresh the remote edit project
- */
- public void refreshRemoteEditProject()
- {
- // no temp files project, then nothing to refresh
- if (!doesRemoteEditProjectExist())
- {
- return;
- }
- try
- {
- IProject project = getRemoteEditProject();
- if (!project.getWorkspace().isTreeLocked())
- {
- cleanupCache();
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("Error refreshing remote edit project", e);
- }
- }
-
- /**
- * Refresh the remote edit project
- */
- public void refreshRemoteEditContainer(IContainer parent)
- {
- // no project exists, then nothing to refresh
- if (!doesRemoteEditProjectExist())
- return;
-
- try
- {
-
- IProject project = getRemoteEditProject();
- if (!project.getWorkspace().isTreeLocked())
- {
- cleanupCache();
- parent.refreshLocal(IResource.DEPTH_ONE, null);
- }
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("Error refreshing remote edit project", e);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarker.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarker.java
deleted file mode 100644
index d32e84f9b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarker.java
+++ /dev/null
@@ -1,284 +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.files.ui.resources;
-
-import java.util.Map;
-
-/**
- * This class is an internal implementation of the ISystemRemoteMarker interface.
- * It is not intended to be implemented by clients.
- */
-public class SystemRemoteMarker implements ISystemRemoteMarker {
-
-
-
- /**
- * Resource with which this marker is associated.
- */
- protected ISystemRemoteResource resource;
-
- /**
- * The marker id.
- */
- protected long id;
-
- /**
- * Constructor for SystemRemoteMarker.
- */
- public SystemRemoteMarker(ISystemRemoteResource resource, long id) {
- this.resource = resource;
- this.id = id;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#delete()
- */
- public void delete() {
- SystemRemoteMarkerManager.getInstance().removeMarker(getResource(), getId());
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#equals(Object)
- */
- public boolean equals(Object object) {
-
- if (!(object instanceof ISystemRemoteMarker)) {
- return false;
- }
- else {
- ISystemRemoteMarker other = (ISystemRemoteMarker)object;
- return (id == other.getId()) && (resource.equals(other.getResource()));
- }
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#exists()
- */
- public boolean exists() {
- return getInfo() != null;
- }
-
- /**
- * Get the marker info.
- * @return the marker info.
- */
- private SystemRemoteMarkerInfo getInfo() {
- return SystemRemoteMarkerManager.getInstance().findMarkerInfo(getResource(), getId());
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getAttribute(String)
- */
- public Object getAttribute(String attributeName) {
- SystemRemoteMarkerInfo info = getInfo();
-
- if (info == null) {
- return null;
- }
-
- return info.getAttribute(attributeName);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getAttribute(String, int)
- */
- public int getAttribute(String attributeName, int defaultValue) {
- SystemRemoteMarkerInfo info = getInfo();
-
- if (info == null) {
- return defaultValue;
- }
-
- Object value = info.getAttribute(attributeName);
-
- if ((value != null) && (value instanceof Integer)) {
- return ((Integer)value).intValue();
- }
-
- return defaultValue;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getAttribute(String, String)
- */
- public String getAttribute(String attributeName, String defaultValue) {
- SystemRemoteMarkerInfo info = getInfo();
-
- if (info == null) {
- return defaultValue;
- }
-
- Object value = info.getAttribute(attributeName);
-
- if ((value != null) && (value instanceof String)) {
- return (String)value;
- }
-
- return defaultValue;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getAttribute(String, boolean)
- */
- public boolean getAttribute(String attributeName, boolean defaultValue) {
- SystemRemoteMarkerInfo info = getInfo();
-
- if (info == null) {
- return defaultValue;
- }
-
- Object value = info.getAttribute(attributeName);
-
- if ((value != null) && (value instanceof Integer)) {
- return ((Boolean)value).booleanValue();
- }
-
- return defaultValue;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getAttributes()
- */
- public Map getAttributes() {
- SystemRemoteMarkerInfo info = getInfo();
-
- if (info == null) {
- return null;
- }
-
- return info.getAttributes();
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getAttributes(String[])
- */
- public Object[] getAttributes(String[] attributeNames) {
- SystemRemoteMarkerInfo info = getInfo();
-
- if (info == null) {
- return new Object[0];
- }
-
- return info.getAttributes(attributeNames);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getCreationTime()
- */
- public long getCreationTime() {
- SystemRemoteMarkerInfo info = getInfo();
-
- if (info == null) {
- return -1;
- }
-
- return info.getCreationTime();
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getId()
- */
- public long getId() {
- return id;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getResource()
- */
- public ISystemRemoteResource getResource() {
- return resource;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#getType()
- */
- public String getType() {
- SystemRemoteMarkerInfo info = getInfo();
-
- if (info == null) {
- return null;
- }
-
- return info.getType();
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#isSubtypeOf(String)
- */
- public boolean isSubtypeOf(String superType) {
- String type = getType();
-
- if (type == null) {
- return false;
- }
-
- return SystemRemoteMarkerManager.getInstance().getCache().isSubtype(type, superType);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#setAttribute(String, int)
- */
- public void setAttribute(String attributeName, int value) {
- setAttribute(attributeName, new Integer(value));
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#setAttribute(String, Object)
- */
- public void setAttribute(String attributeName, Object value) {
- SystemRemoteMarkerManager manager = SystemRemoteMarkerManager.getInstance();
- SystemRemoteMarkerInfo info = getInfo();
- info.setAttribute(attributeName, value);
-
- if (manager.isPersistent(info)) {
- ((SystemRemoteResource)resource).getResourceInfo().set(ISystemRemoteCoreConstants.M_MARKERS_DIRTY); // need to change this
- }
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#setAttribute(String, boolean)
- */
- public void setAttribute(String attributeName, boolean value) {
- setAttribute(attributeName, value ? Boolean.TRUE : Boolean.FALSE);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#setAttributes(String[], Object[])
- */
- public void setAttributes(String[] attributeNames, Object[] values) {
- SystemRemoteMarkerManager manager = SystemRemoteMarkerManager.getInstance();
- SystemRemoteMarkerInfo info = getInfo();
- info.setAttributes(attributeNames, values);
-
- if (manager.isPersistent(info)) {
- ((SystemRemoteResource)resource).getResourceInfo().set(ISystemRemoteCoreConstants.M_MARKERS_DIRTY); // need to change this
- }
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarker#setAttributes(Map)
- */
- public void setAttributes(Map attributes) {
- SystemRemoteMarkerManager manager = SystemRemoteMarkerManager.getInstance();
- SystemRemoteMarkerInfo info = getInfo();
- info.setAttributes(attributes);
-
- if (manager.isPersistent(info)) {
- ((SystemRemoteResource)resource).getResourceInfo().set(ISystemRemoteCoreConstants.M_MARKERS_DIRTY); // need to change this
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerInfo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerInfo.java
deleted file mode 100644
index fe1c21c03..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerInfo.java
+++ /dev/null
@@ -1,233 +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.files.ui.resources;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Objects of this type contain marker information.
- */
-public class SystemRemoteMarkerInfo implements ISystemRemoteMarkerSetElement, Cloneable {
-
-
-
- // undefined static id
- protected static final long UNDEFINED_ID = -1;
-
- // marker identifier
- protected long id = UNDEFINED_ID;
-
- // marker type
- protected String type = null;;
-
- // marker attributes
- protected Map attributes = null;
-
- // marker creation type
- protected long creationTime = 0;
-
- /**
- * Constructor for SystemRemoteMarkerInfo.
- */
- public SystemRemoteMarkerInfo() {
- super();
- }
-
- /**
- * Set the marker id.
- * @param the id
- */
- public void setId(long id) {
- this.id = id;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteMarkerSetElement#getId()
- */
- public long getId() {
- return id;
- }
-
- /**
- * Set the type.
- * @param the marker type
- */
- public void setType(String type) {
- this.type = type;
- }
-
- /**
- * Get the type.
- * @return the marker type
- */
- public String getType() {
- return type;
- }
-
- /**
- * Set the attributes.
- * @param the attributes
- */
- public void setAttributes(Map attributes) {
- this.attributes = attributes;
- }
-
- /**
- * Get the attributes.
- * @return the attributes
- */
- public Map getAttributes() {
- return getAttributes(true);
- }
-
- /**
- * Get the attributes.
- * @param specify whether to return a copy or the actual map
- * @return the attribute map
- */
- public Map getAttributes(boolean makeCopy) {
-
- if (attributes == null) {
- return null;
- }
-
- if (makeCopy) {
- HashMap newAttributes = new HashMap();
- newAttributes.putAll(attributes);
- return newAttributes;
- }
- else {
- return attributes;
- }
- }
-
- /**
- * Set the creation time.
- * @param the creation time
- */
- public void setCreationTime(long creationTime) {
- this.creationTime = creationTime;
- }
-
- /**
- * Get the creation time.
- * @return the creation time
- */
- public long getCreationTime() {
- return creationTime;
- }
-
- /**
- * @see java.lang.Object#clone()
- */
- protected Object clone() throws CloneNotSupportedException {
- SystemRemoteMarkerInfo copy = (SystemRemoteMarkerInfo)(super.clone());
- copy.setAttributes(getAttributes());
- return copy;
- }
-
- /**
- * Get attribute values given the attribute names.
- * @param the array of attribute names
- * @return the array of attribute values
- */
- public Object[] getAttributes(String[] attributeNames) {
- Object[] result = new Object[attributeNames.length];
-
- for (int i = 0; i < attributeNames.length; i++)
- result[i] = getAttribute(attributeNames[i]);
-
- return result;
- }
-
- /**
- * Get the attribute value given the attribute name.
- * @param the attribute name
- * @return the attribute value
- */
- public Object getAttribute(String attributeName) {
-
- if (attributes == null) {
- return null;
- }
- else {
- return attributes.get(attributeName);
- }
- }
-
- /**
- * Checks if attribute value is valid.
- * @param the attribute value
- * @return true if value is null, or a String, or an Integer, or a Boolean
- */
- protected static boolean isValidAttributeValue(Object value) {
- return (value == null || value instanceof String || value instanceof Integer || value instanceof Boolean);
- }
-
- /**
- * Set the value of an attribute.
- * @param the attribute name
- * @param the value of the attribute
- */
- public void setAttribute(String attributeName, Object value) {
-
- if (!isValidAttributeValue(value)) {
- return;
- }
-
- if (attributes == null) {
-
- if (value == null) {
- return;
- }
- else {
- attributes = new HashMap();
- attributes.put(attributeName, value);
- }
- }
- else {
-
- if (value == null) {
- attributes.remove(attributeName);
-
- if (attributes.isEmpty()) {
- attributes = null;
- }
- }
- else {
- attributes.put(attributeName, value);
- }
- }
- }
-
- /**
- * Set the values of an array of attributes
- * @param the attribute names
- * @param the attribute values
- */
- public void setAttributes(String[] attributeNames, Object[] values) {
-
- if (!(attributeNames.length == values.length)) {
- return;
- }
-
- for (int i = 0; i < attributeNames.length; i++) {
- setAttribute(attributeNames[i], values[i]);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerManager.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerManager.java
deleted file mode 100644
index 14dff80b9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerManager.java
+++ /dev/null
@@ -1,400 +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.files.ui.resources;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * This singleton class manages all remote markers.
- */
-public class SystemRemoteMarkerManager implements ISystemRemoteManager {
-
-
-
- private static SystemRemoteMarkerManager instance;
-
- // cache of marker type definitions
- private SystemRemoteMarkerTypeDefinitionCache cache;
-
- // the next marker id
- private long nextMarkerId = 0;
-
- // constant to indicate no marker infos
- private static final SystemRemoteMarkerInfo[] NO_MARKER_INFO = new SystemRemoteMarkerInfo[0];
-
- // constant to indicate no markers
- private static final ISystemRemoteMarker[] NO_MARKER = new ISystemRemoteMarker[0];
-
- /**
- * Constructor for SystemRemoteMarkerManager.
- */
- private SystemRemoteMarkerManager() {
- super();
- cache = new SystemRemoteMarkerTypeDefinitionCache();
- }
-
- /**
- * Get the singleton instance.
- * @return the manager object
- */
- public static SystemRemoteMarkerManager getInstance() {
-
- if (instance == null) {
- instance = new SystemRemoteMarkerManager();
- }
-
- return instance;
- }
-
- /**
- * Get the cache.
- * @return the cache
- */
- public SystemRemoteMarkerTypeDefinitionCache getCache() {
- return cache;
- }
-
- /**
- * Get the next marker id.
- * @return the next marker id
- */
- public long getNextMarkerId() {
- return nextMarkerId++;
- }
-
- /**
- * Adds the given markers to the given resource.
- * @param the resource
- * @param the marker infos
- */
- public void add(ISystemRemoteResource resource, SystemRemoteMarkerInfo[] newMarkers) {
-
- if (newMarkers.length == 0)
- return;
-
- SystemRemoteResource target = (SystemRemoteResource) resource;
- SystemRemoteResourceInfo info = target.getResourceInfo();
-
- if (info == null) {
- return;
- }
-
- // set the flag to indicate that the resource's markers have changed
- if (isPersistent(newMarkers))
- info.set(ISystemRemoteCoreConstants.M_MARKERS_DIRTY);
-
- SystemRemoteMarkerSet markers = info.getMarkers();
-
- if (markers == null) {
- markers = new SystemRemoteMarkerSet(newMarkers.length);
- }
-
- basicAdd(resource, markers, newMarkers);
-
- if (!markers.isEmpty()) {
- info.setMarkers(markers);
- }
- }
-
- /**
- * Adds the new markers to the given set of markers for the given resource.
- * @param the resource
- * @param the set of markers for the resource
- * @param the new marker infos
- */
- private void basicAdd(ISystemRemoteResource resource, SystemRemoteMarkerSet markers, SystemRemoteMarkerInfo[] newMarkers) {
-
- for (int i = 0; i < newMarkers.length; i++) {
-
- SystemRemoteMarkerInfo newMarker = newMarkers[i];
- newMarker.setId(getNextMarkerId());
- markers.add(newMarker);
- }
- }
-
- /**
- * Removes a marker.
- * @param the resource.
- * @param the marker id
- */
- public void removeMarker(ISystemRemoteResource resource, long id) {
- SystemRemoteMarkerInfo markerInfo = findMarkerInfo(resource, id);
-
- if (markerInfo == null)
- return;
-
- SystemRemoteResourceInfo info = ((SystemRemoteResource)(resource)).getResourceInfo();
-
- if (info == null) {
- return;
- }
-
- SystemRemoteMarkerSet markers = info.getMarkers();
- int size = markers.size();
- markers.remove(markerInfo);
-
- // if that was the last marker remove the set to save space.
- if (markers.size() == 0) {
- info.setMarkers(null);
- }
-
- // if we actually did remove a marker, post a delta for the change.
- if (markers.size() != size) {
-
- if (isPersistent(markerInfo)) {
- info.set(ISystemRemoteCoreConstants.M_MARKERS_DIRTY);
- }
- }
- }
-
- /**
- * Finds a marker info given a resource, and the marker id.
- * @param the resource.
- * @param the marker id
- * @return the marker info
- */
- public SystemRemoteMarkerInfo findMarkerInfo(ISystemRemoteResource resource, long id) {
- SystemRemoteResourceInfo info = ((SystemRemoteResource)(resource)).getResourceInfo();
-
- if (info == null) {
- return null;
- }
-
- SystemRemoteMarkerSet markers = info.getMarkers();
-
- if (markers == null) {
- return null;
- }
-
- return (SystemRemoteMarkerInfo)(markers.get(id));
- }
-
- /**
- * Removes markers of the given type, and optionally all the subtypes, from
- * the given resource.
- * @param the resource
- * @param the type
- * @param flag indicating whether to include subtypes
- */
- public void removeMarkers(ISystemRemoteResource resource, String type, boolean includeSubtypes) {
- SystemRemoteResourceInfo info = ((SystemRemoteResource)(resource)).getResourceInfo();
-
- if (info == null) {
- return;
- }
-
- SystemRemoteMarkerSet markers = info.getMarkers();
-
- if (markers == null) {
- return;
- }
-
- ISystemRemoteMarkerSetElement[] matching;
-
- // if type is null, then we want all the markers
- // otherwise we need a subset
- if (type == null) {
- matching = markers.elements();
- info.setMarkers(null);
- }
- else {
- matching = basicFindMatching(markers, type, includeSubtypes);
-
- // if nothing matches, simply return
- if (matching.length == 0) {
- return;
- }
- else {
- markers.removeAll(matching);
-
- // if the marker set is empty, then make it null to save memory
- if (markers.size() == 0) {
- info.setMarkers(null);
- }
- }
- }
- }
-
- /**
- * Returns the markers in the given set of markers which match the given type,
- * and optionally including subtypes.
- * @param the marker set
- * @param the type
- * @param flag indicating whether to include subtypes
- */
- private SystemRemoteMarkerInfo[] basicFindMatching(SystemRemoteMarkerSet markers, String type, boolean includeSubtypes) {
- int size = markers.size();
-
- if (size <= 0) {
- return NO_MARKER_INFO;
- }
-
- List result = new ArrayList(size);
-
- ISystemRemoteMarkerSetElement[] elements = markers.elements();
-
- for (int i = 0; i < elements.length; i++) {
- SystemRemoteMarkerInfo marker = (SystemRemoteMarkerInfo)(elements[i]);
-
- // if the type is null, then we are looking for all types of markers
- if (type == null) {
- result.add(marker);
- }
- else {
- if (includeSubtypes) {
-
- if (cache.isSubtype(marker.getType(), type)) {
- result.add(marker);
- }
- }
- else {
-
- if (marker.getType().equals(type)) {
- result.add(marker);
- }
- }
- }
- }
-
- size = result.size();
-
- if (size <= 0) {
- return NO_MARKER_INFO;
- }
-
- return (SystemRemoteMarkerInfo[])(result.toArray(new SystemRemoteMarkerInfo[size]));
- }
-
- /**
- * Returns the marker with the given id or <code>null</code> if none is found.
- * @param the resource
- * @param the id of the marker to find
- * @return the marker, or <code>null</code> if none s found.
- */
- public ISystemRemoteMarker findMarker(ISystemRemoteResource resource, long id) {
- SystemRemoteMarkerInfo info = findMarkerInfo(resource, id);
- return info == null ? null : new SystemRemoteMarker(resource, info.getId());
- }
-
- /**
- * Returns all markers of the specified type on the given target, and optionally the subtypes as well.
- * Passing <code>null</code> for the type specifies a matching target for all types.
- * @param the resource
- * @param the type
- * @param flag indicating whether to include subtypes
- */
- public ISystemRemoteMarker[] findMarkers(ISystemRemoteResource resource, String type, boolean includeSubtypes) {
- SystemRemoteResourceInfo info = ((SystemRemoteResource)resource).getResourceInfo();
-
- if (info == null) {
- return NO_MARKER;
- }
-
- ArrayList result = new ArrayList();
-
- SystemRemoteMarkerSet markers = info.getMarkers();
-
- // add the matching markers for this resource
- if (markers != null) {
-
- ISystemRemoteMarkerSetElement[] matching;
-
- if (type == null) {
- matching = markers.elements();
- }
- else {
- matching = basicFindMatching(markers, type, includeSubtypes);
- }
-
- buildMarkers(resource, matching, result);
- }
-
- return (ISystemRemoteMarker[])(result.toArray(new ISystemRemoteMarker[result.size()]));
- }
-
- /**
- * Adds the markers on the given target which match the specified type to the list.
- * @param the target resource
- * @param the marker elements
- * @param the list to add to
- */
- private void buildMarkers(ISystemRemoteResource resource, ISystemRemoteMarkerSetElement[] markers, ArrayList list) {
-
- if (markers.length == 0) {
- return;
- }
-
- list.ensureCapacity(list.size() + markers.length);
-
- for (int i = 0; i < markers.length; i++) {
- list.add(new SystemRemoteMarker(resource, ((SystemRemoteMarkerInfo)markers[i]).getId()));
- }
- }
-
- /**
- * Returns whether marker info is persistent.
- * @param the marker info
- * @return true if the given marker represented by this info is persistent,
- * and false otherwise.
- */
- public boolean isPersistent(SystemRemoteMarkerInfo info) {
- return cache.isPersistent(info.getType());
- }
-
- /**
- * Returns whether given marker is persistent.
- * @param the marker
- * @return true if the given marker is persistent, and false
- * otherwise.
- */
- public boolean isPersistent(ISystemRemoteMarker marker) {
- return cache.isPersistent(marker.getType());
- }
-
- /**
- * Returns whether any of the marker infos are persistent.
- * @param the marker infos
- * @return true if the a marker represented by any of the infos is persistent,
- * and false otherwise.
- */
- public boolean isPersistent(SystemRemoteMarkerInfo[] infos) {
-
- for (int i = 0; i < infos.length; i++) {
-
- if (cache.isPersistent(infos[i].getType())) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteManager#startup(IProgressMonitor)
- */
- public void startup(IProgressMonitor monitor) {
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteManager#shutdown(IProgressMonitor)
- */
- public void shutdown(IProgressMonitor monitor) {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerSet.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerSet.java
deleted file mode 100644
index da8ef4d10..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerSet.java
+++ /dev/null
@@ -1,354 +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.files.ui.resources;
-
-/**
- * This class represents a set of markers.
- */
-public class SystemRemoteMarkerSet {
-
-
-
- /**
- * constant indicating the minimum size
- */
- private static final int MINIMUM_SIZE = 5;
-
- /**
- * Number of elements in the set
- */
- private int elementCount = 0;
-
- /**
- * Array of elements in the set
- */
- private ISystemRemoteMarkerSetElement[] elements;
-
- /**
- * Constructor for SystemRemoteMarkerSet.
- */
- public SystemRemoteMarkerSet() {
- this(MINIMUM_SIZE);
- }
-
- /**
- * Constructor for SystemRemoteMarkerSet.
- * @param the initial capacity
- */
- public SystemRemoteMarkerSet(int capacity) {
- super();
- this.elements = new ISystemRemoteMarkerSetElement[Math.max(MINIMUM_SIZE, capacity * 2)];
- }
-
- /**
- * Add an element to the set.
- * @param the element to add to the set
- */
- public void add(ISystemRemoteMarkerSetElement element) {
-
- if (element == null)
- return;
-
- int hash = hashFor(element.getId()) % elements.length;
-
- // search for an empty slot at the end of the array
- for (int i = hash; i < elements.length; i++) {
-
- if (elements[i] == null) {
- elements[i] = element;
- elementCount++;
-
- // grow if necessary
- if (shouldGrow()) {
- expand();
- }
-
- return;
- }
- }
-
- // search for an empty slot at the beginning of the array
- for (int i = 0; i < hash - 1; i++) {
-
- if (elements[i] == null) {
- elements[i] = element;
- elementCount++;
-
- // grow if necessary
- if (shouldGrow()) {
- expand();
- }
-
- return;
- }
- }
-
- // if we didn't find a free slot, then try again with the expanded set
- expand();
- add(element);
- }
-
- /**
- * Add multiple elements.
- * @param the elements to add to the set
- */
- public void addAll(ISystemRemoteMarkerSetElement[] elements) {
-
- for (int i = 0; i < elements.length; i++) {
- add(elements[i]);
- }
- }
-
- /**
- * Returns whether the set contains an element with the given id.
- * @param the id to search for
- * @return true if there is an element with the given id, false otherwise
- */
- public boolean contains(long id) {
- return get(id) != null;
- }
-
- /**
- * Get the elements in the set as an array.
- * @return an array of elements that are in the set
- */
- public ISystemRemoteMarkerSetElement[] elements() {
- ISystemRemoteMarkerSetElement[] result = new ISystemRemoteMarkerSetElement[elementCount];
-
- int j = 0;
-
- for (int i = 0; i < elements.length; i++) {
-
- ISystemRemoteMarkerSetElement element = elements[i];
-
- if (element != null) {
- result[j] = element;
- j++;
- }
- }
-
- return result;
- }
-
- /**
- * Doubles the size of the internal array, and rehash all the values
- */
- private void expand() {
- ISystemRemoteMarkerSetElement[] array = new ISystemRemoteMarkerSetElement[elements.length * 2];
-
- int maxArrayIndex = array.length - 1;
-
- for (int i = 0; i < elements.length; i++) {
-
- ISystemRemoteMarkerSetElement element = elements[i];
-
- if (element != null) {
-
- int hash = hashFor(element.getId()) % array.length;
-
- while (array[hash] != null) {
-
- hash++;
-
- if (hash > maxArrayIndex) {
- hash = 0;
- }
- }
-
- array[hash] = element;
- }
- }
-
- elements = array;
- }
-
- /**
- * Returns the set element with the given id, or null if none
- * is found.
- * @param the id to search for
- * @return the element, if found, or null
- */
- public ISystemRemoteMarkerSetElement get(long id) {
-
- if (elementCount == 0) {
- return null;
- }
-
- int hash = hashFor(id) % elements.length;
-
- // search the last half of the array
- for (int i = hash; i < elements.length; i++) {
-
- ISystemRemoteMarkerSetElement element = elements[i];
-
- if (element == null) {
- return null;
- }
-
- if (element.getId() == id) {
- return element;
- }
- }
-
- // search the beginning of the array
- for (int i = 0; i < hash - 1; i++) {
-
- ISystemRemoteMarkerSetElement element = elements[i];
-
- if (element == null) {
- return null;
- }
-
- if (element.getId() == id) {
- return element;
- }
- }
-
- // no element found, so return null
- return null;
- }
-
- /**
- * Hash key for the id.
- * @param the id
- * @return the hash value
- */
- private int hashFor(long id) {
- return Math.abs((int) id);
- }
-
- /**
- * Returns if the set is empty.
- * @return true if the set is empty, false otherwise.
- */
- public boolean isEmpty() {
- return elementCount == 0;
- }
-
- /**
- * Does a rehash when the element from the given index is removed.
- * @param the index of the element removed.
- */
- private void rehashTo(int anIndex) {
- int target = anIndex;
- int index = anIndex + 1;
-
- if (index >= elements.length) {
- index = 0;
- }
-
- ISystemRemoteMarkerSetElement element = elements[index];
-
- while (element != null) {
-
- int hashIndex = hashFor(element.getId()) % elements.length;
- boolean match;
-
- if (index < target) {
- match = !(hashIndex > target || hashIndex <= index);
- }
- else {
- match = !(hashIndex > target && hashIndex <= index);
- }
- if (match) {
- elements[target] = element;
- target = index;
- }
-
- index++;
-
- if (index >= elements.length) {
- index = 0;
- }
-
- element = elements[index];
- }
-
- elements[target] = null;
- }
-
- /**
- * Removes an element with the given id from the set.
- * @param the id of the element to remove.
- */
- public void remove(long id) {
- int hash = hashFor(id) % elements.length;
-
- for (int i = hash; i < elements.length; i++) {
-
- ISystemRemoteMarkerSetElement element = elements[i];
-
- if (element == null) {
- return;
- }
- if (element.getId() == id) {
- rehashTo(i);
- elementCount--;
- }
- }
-
- for (int i = 0; i < hash - 1; i++) {
-
- ISystemRemoteMarkerSetElement element = elements[i];
-
- if (element == null) {
- return;
- }
- if (element.getId() == id) {
- rehashTo(i);
- elementCount--;
- }
- }
- }
-
- /**
- * Removes the given element from the set. Uses the element id
- * to search for the element in the set.
- * @param the element
- */
- public void remove(ISystemRemoteMarkerSetElement element) {
- remove(element.getId());
- }
-
- /**
- * Removes all of the elements in the given array from the set.
- * @param the array of elements to remove
- */
- public void removeAll(ISystemRemoteMarkerSetElement[] elements) {
-
- for (int i = 0; i < elements.length; i++) {
- remove(elements[i]);
- }
- }
-
- /**
- * Returns whether the internal storage should grow. Currently, returns <code>true</coe>
- * if internal array is more that 75% full.
- * @return true if the internal storage should grow, false otherwise
- */
- private boolean shouldGrow() {
- return elementCount > elements.length * 0.75;
- }
-
- /**
- * Returns the number of elements in the set.
- * @return the number of elements in the set.
- */
- public int size() {
- return elementCount;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinition.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinition.java
deleted file mode 100644
index ccc7f01c2..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinition.java
+++ /dev/null
@@ -1,141 +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.files.ui.resources;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-
-/**
- * This class represents a marker type definition.
- */
-public class SystemRemoteMarkerTypeDefinition {
-
-
-
- protected String type = null;
- protected String name = null;
- protected boolean isPersistent = false;
- protected Set superTypes = null;
- protected Set attributeNames = null;
-
- /**
- * Constructor for SystemRemoteMarkerTypeDefinition.
- */
- public SystemRemoteMarkerTypeDefinition(IExtension ext) {
- super();
- this.type = ext.getUniqueIdentifier();
- this.name = ext.getLabel();
- process(ext);
- }
-
- /**
- * Processes the extension
- * @param the extension
- */
- private void process(IExtension ext) {
- Set types = null;
- Set attributes = null;
- IConfigurationElement[] elements = ext.getConfigurationElements();
-
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
-
- // supertype
- if (element.getName().equalsIgnoreCase("super")) {
- String type = element.getAttribute("type");
-
- if (type != null) {
-
- if (types == null) {
- types = new HashSet(3);
- }
-
- types.add(type);
- }
- }
-
- // attribute name
- if (element.getName().equalsIgnoreCase("attribute")) {
- String name = element.getAttribute("name");
-
- if (name != null) {
-
- if (attributes == null) {
- attributes = new HashSet(3);
- }
-
- attributes.add(name);
- }
- }
-
- // persistence
- if (element.getName().equalsIgnoreCase("persistent")) {
- String bool = element.getAttribute("value");
-
- if (bool != null) {
- this.isPersistent = (new Boolean(bool)).booleanValue();
- }
- }
- }
-
- this.superTypes = types;
- this.attributeNames = attributes;
- }
-
- /**
- * Get the type.
- * @return the type
- */
- public String getType() {
- return type;
- }
-
- /**
- * Get the name.
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * Returns whether it is persistent.
- * @return true if persistent, false othwerwise
- */
- public boolean isPersistent() {
- return isPersistent;
- }
-
- /**
- * Get super types.
- * @return the super types
- */
- public Set getSuperTypes() {
- return superTypes;
- }
-
- /**
- * Get the attribute names.
- * @return the attribute names
- */
- public Set getAttributeNames() {
- return attributeNames;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ded3a466c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java
+++ /dev/null
@@ -1,123 +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.files.ui.resources;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-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.ui.RSEUIPlugin;
-
-
-/**
- * This class is a cache of all marker type definitions.
- */
-public class SystemRemoteMarkerTypeDefinitionCache {
-
-
-
- // cache of marker definitions
- protected HashMap definitions;
-
- // cache of marker type hierarchies
- protected HashMap lookup;
-
- /**
- * Constructor for SystemRemoteMarkerTypeDefinitionCache.
- */
- public SystemRemoteMarkerTypeDefinitionCache() {
- super();
- initializeCache();
- }
-
- /**
- * Initialize the cache.
- */
- private void initializeCache() {
- loadDefinitions();
- lookup = new HashMap(definitions.size());
-
- for (Iterator i = definitions.keySet().iterator(); i.hasNext();) {
- computeSuperTypes((String)(i.next()));
- }
- }
-
- /**
- * Load marker type definitions.
- */
- private void loadDefinitions() {
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(RSEUIPlugin.PLUGIN_ID, ISystemRemoteMarker.EXTENSION_POINT_ID);
- IExtension[] types = point.getExtensions();
- definitions = new HashMap(types.length);
-
- for (int i = 0; i < types.length; i++) {
- definitions.put(types[i].getUniqueIdentifier(), new SystemRemoteMarkerTypeDefinition(types[i]));
- }
- }
-
- /**
- * Compute the super types given a marker id.
- * @param a marker id
- */
- private void computeSuperTypes(String id) {
- Set entry = new HashSet(5);
- List queue = new ArrayList(5);
- queue.add(id);
-
- while (!queue.isEmpty()) {
- String type = (String)(queue.remove(0));
- entry.add(type);
- SystemRemoteMarkerTypeDefinition def = (SystemRemoteMarkerTypeDefinition)(definitions.get(type));
-
- if (def != null) {
- Set newEntries = def.getSuperTypes();
-
- if (newEntries != null)
- queue.addAll(newEntries);
- }
- }
-
- lookup.put(id, entry);
- }
-
- /**
- * Returns whether the given marker type is defined to be persistent.
- * @param the marker type
- * @return true if marker type is persistent, false otherwise
- */
- public boolean isPersistent(String type) {
- SystemRemoteMarkerTypeDefinition def = (SystemRemoteMarkerTypeDefinition)(definitions.get(type));
- return (def != null) && (def.isPersistent());
- }
-
- /**
- * Returns whether the given type is a subtype of the given supertype.
- * @param a marker type
- * @param another marker type
- * @return true if type is a subtype of supertype, false otherwise
- */
- public boolean isSubtype(String type, String superType) {
- Set entry = (Set)(lookup.get(type));
- return (entry != null) && (entry.contains(superType));
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemotePath.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemotePath.java
deleted file mode 100644
index a37712890..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemotePath.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.resources;
-
-/**
- * A default implementation of a remote path.
- */
-public class SystemRemotePath implements ISystemRemotePath {
-
-
-
- public static final ISystemRemotePath ROOT = new SystemRemotePath("", "", "/");
-
- protected String profileName;
- protected String connectionName;
- protected String path;
-
- /**
- * Constructor for SystemRemotePath.
- * @param profile name
- * @param connection name
- * @param path
- */
- public SystemRemotePath(String profileName, String connectionName, String path) {
- super();
- setProfileName(profileName);
- setConnectionName(connectionName);
- setPath(path);
- }
-
- /**
- * Set the profile name.
- * @param the profile name
- */
- public void setProfileName(String profileName) {
- this.profileName = profileName;
- }
-
- /**
- * Set the connection name.
- * @param the connection name
- */
- public void setConnectionName(String connectionName) {
- this.connectionName = connectionName;
- }
-
- /**
- * Set the remote path.
- * @param the path
- */
- public void setPath(String path) {
- this.path = path;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemotePath#getProfileName()
- */
- public String getProfileName() {
- return profileName;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemotePath#getConnectionName()
- */
- public String getConnectionName() {
- return connectionName;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemotePath#getPath()
- */
- public String getPath() {
- return path;
- }
-
- /**
- * @see java.lang.Object#equals(Object)
- */
- public boolean equals(Object obj) {
- return (profileName.equalsIgnoreCase(profileName)) && (connectionName.equalsIgnoreCase(connectionName)) && (path.equalsIgnoreCase(path));
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResource.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResource.java
deleted file mode 100644
index 0772c41ed..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResource.java
+++ /dev/null
@@ -1,175 +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.files.ui.resources;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.QualifiedName;
-
-/**
- * This class is the internal implementation of the ISystemRemoteResource interface.
- */
-public class SystemRemoteResource implements ISystemRemoteResource {
-
-
-
- protected ISystemRemotePath path;
-
- /**
- * Constructor for SystemRemoteResource.
- */
- public SystemRemoteResource(ISystemRemotePath path) {
- this.path = path;
- }
-
- /**
- * Get the resource info.
- * @return the resource info for the resource
- */
- public SystemRemoteResourceInfo getResourceInfo() {
- return SystemRemoteResourceManager.getInstance().getResourceInfo(path);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#createMarker(String)
- */
- public ISystemRemoteMarker createMarker(String type){
- SystemRemoteResourceInfo resourceInfo = getResourceInfo();
-
- if (resourceInfo == null) {
- return null;
- }
-
- SystemRemoteMarkerInfo info = new SystemRemoteMarkerInfo();
- info.setType(type);
- info.setCreationTime(System.currentTimeMillis());
- SystemRemoteMarkerManager.getInstance().add(this, new SystemRemoteMarkerInfo[] { info });
- return new SystemRemoteMarker(this, info.getId());
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#deleteMarkers(String, boolean)
- */
- public void deleteMarkers(String type, boolean includeSubtypes) {
- SystemRemoteMarkerManager.getInstance().removeMarkers(this, type, includeSubtypes);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#findMarker(long)
- */
- public ISystemRemoteMarker findMarker(long id) {
- return SystemRemoteMarkerManager.getInstance().findMarker(this, id);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#findMarkers(String, boolean)
- */
- public ISystemRemoteMarker[] findMarkers(String type, boolean includeSubtypes) {
- return SystemRemoteMarkerManager.getInstance().findMarkers(this, type, includeSubtypes);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#getMarker(long)
- */
- public ISystemRemoteMarker getMarker(long id) {
- return new SystemRemoteMarker(this, id);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#exists()
- */
- public boolean exists() {
- return false;
- }
-
- /**
- *
- */
- public ISystemRemotePath getLocation() {
- return null;
- }
-
-
- /**
- *
- */
- public boolean existsLocally() {
- return false;
- }
-
- /**
- *
- */
- public File getLocalCopy() {
- return null;
- }
-
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#getPersistentProperty(QualifiedName)
- */
- public String getPersistentProperty(QualifiedName key) {
- return null;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#getSessionProperty(QualifiedName)
- */
- public Object getSessionProperty(QualifiedName key) {
- return null;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#setPersistentProperty(QualifiedName, String)
- */
- public void setPersistentProperty(QualifiedName key, String value) {
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#setSessionProperty(QualifiedName, Object)
- */
- public void setSessionProperty(QualifiedName key, Object value) {
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#getLocalLastModifiedTime()
- */
- public boolean getLocalLastModifiedTime() {
- return false;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#getRemoteLastModifiedTime()
- */
- public boolean getRemoteLastModifiedTime() {
- return false;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#isExistsLocally()
- */
- public boolean isExistsLocally() {
- return false;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteResource#isSynchronized()
- */
- public boolean isSynchronized() {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResourceInfo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResourceInfo.java
deleted file mode 100644
index cef7562ae..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResourceInfo.java
+++ /dev/null
@@ -1,92 +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.files.ui.resources;
-
-/**
- * Class that keeps information about a remote resource. Clients should not
- * use this class.
- */
-public class SystemRemoteResourceInfo implements Cloneable {
-
-
-
- /**
- * Set of flags which reflect various states of the info.
- */
- private int flags = 0;
-
- /**
- * The set of markers belonging to the resource.
- */
- private SystemRemoteMarkerSet markers;
-
- /**
- * Constructor for SystemRemoteResourceInfo.
- */
- public SystemRemoteResourceInfo() {
- super();
- }
-
- /**
- * Sets all of the bits indicated by the mask.
- * @param the mask
- */
- public void set(int mask) {
- flags |= mask;
- }
-
- /**
- * Clears all of the bits indicated by the mask.
- * @param the mask
- */
- public void clear(int mask) {
- flags &= ~mask;
- }
-
- /**
- * Returns the flags for this info.
- * @return the flags
- */
- public int getFlags() {
- return flags;
- }
-
- /**
- * Sets the flags for this info.
- * @return the flags
- */
- public void setFlags(int value) {
- flags = value;
- }
-
- /**
- * Set the markers for the resource info. <code>null</code> can be used
- * to indicate that the resource has no markers.
- * @param the marker set
- */
- public void setMarkers(SystemRemoteMarkerSet markerSet) {
- this.markers = markerSet;
- }
-
- /**
- * Get the markers from the resource info.
- * @return the marker set
- */
- public SystemRemoteMarkerSet getMarkers() {
- return markers;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResourceManager.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResourceManager.java
deleted file mode 100644
index c63d2b4c6..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteResourceManager.java
+++ /dev/null
@@ -1,84 +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.files.ui.resources;
-
-import java.util.Hashtable;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * This class manages remote resources.
- */
-public class SystemRemoteResourceManager implements ISystemRemoteManager {
-
-
-
- private static SystemRemoteResourceManager instance;
-
- // resource info hash table
- private Hashtable resourceInfos = new Hashtable();
-
- /**
- * Constructor for SystemRemoteResourceManager.
- */
- private SystemRemoteResourceManager() {
- super();
- restore();
- }
-
- /**
- * Get the singleton instance.
- * @return the singleton instance.
- */
- public static SystemRemoteResourceManager getInstance() {
-
- if (instance == null) {
- instance = new SystemRemoteResourceManager();
- }
-
- return instance;
- }
-
- /**
- * Get a resource info given a path.
- */
- public SystemRemoteResourceInfo getResourceInfo(ISystemRemotePath path) {
- return (SystemRemoteResourceInfo)(resourceInfos.get(path.toString()));
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteManager#startup(IProgressMonitor)
- */
- public void startup(IProgressMonitor monitor) {
- }
-
- /**
- * @see org.eclipse.rse.files.ui.resources.ISystemRemoteManager#shutdown(IProgressMonitor)
- */
- public void shutdown(IProgressMonitor monitor) {
- }
-
- /**
- * Read all resource information from disk.
- */
- public void restore() {}
-
- /**
- * Write all resource information to disk.
- */
- public void save() {}
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemSafeFileOutputStream.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemSafeFileOutputStream.java
deleted file mode 100644
index 50486d7b8..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemSafeFileOutputStream.java
+++ /dev/null
@@ -1,220 +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.files.ui.resources;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * This class should be used when there's a file already in the
- * destination and we don't want to lose its contents if a
- * failure writing this stream happens.
- * Basically, the new contents are written to a temporary location.
- * If everything goes OK, it is moved to the right place.
- * The user has the option to define the temporary location or
- * it will be created in the default-temporary directory
- */
-public class SystemSafeFileOutputStream extends OutputStream {
-
-
-
- protected File destination = null;
- protected File temp = null;
- protected OutputStream output = null;
- protected boolean failed = false;
- protected static final String BACKUP_EXTENSION = ".bak";
-
- /**
- * Constructor for SystemSafeFileOutputStream.
- * @param the destination file.
- */
- public SystemSafeFileOutputStream(File file) throws IOException {
- this(file.getAbsolutePath(), null);
- }
-
- /**
- * Constructor for SystemSafeFileOutputStream.
- * @param the destination file name
- */
- public SystemSafeFileOutputStream(String destinationName) throws IOException {
- this(destinationName, null);
- }
-
- /**
- * Constructor for SystemSafeFileOutputStream.
- * @param the destination file name
- * @param the temporary file name
- */
- public SystemSafeFileOutputStream(String destinationPath, String tempPath) throws IOException {
- destination = new File(destinationPath);
- createTempFile(tempPath);
-
- if (!destination.exists()) {
-
- if (!temp.exists()) {
- output = new BufferedOutputStream(new FileOutputStream(destination));
- return;
- }
-
- // If we do not have a file at destination location, but we do have at temp location,
- // it probably means something wrong happened the last time we tried to write it.
- // So, try to recover the backup file. And, if successful, write the new one.
- copy(temp, destination);
- }
-
- output = new BufferedOutputStream(new FileOutputStream(temp));
- }
-
- /**
- * Close the stream.
- */
- public void close() throws IOException {
-
- try {
- output.close();
- }
- catch (IOException e) {
- failed = true;
- throw e;
- }
-
- if (failed) {
- temp.delete();
- }
- else {
- commit();
- }
- }
-
- /**
- * Commit the temporary file to the destination.
- */
- protected void commit() throws IOException {
-
- if (!temp.exists()) {
- return;
- }
-
- destination.delete();
- copy(temp, destination);
- temp.delete();
- }
-
- /**
- * Copy contents of one file to another.
- * @param the source file
- * @param the destination file
- */
- protected void copy(File sourceFile, File destinationFile) throws IOException {
-
- if (!sourceFile.exists()) {
- return;
- }
-
- FileInputStream source = new FileInputStream(sourceFile);
- FileOutputStream destination = new FileOutputStream(destinationFile);
- transferData(source, destination);
- }
-
- /**
- * Create the temporary file at the given path.
- * @param the path of the temporary file to be created
- */
- protected void createTempFile(String tempPath) throws IOException {
-
- if (tempPath == null) {
- tempPath = destination.getAbsolutePath() + BACKUP_EXTENSION;
- }
-
- temp = new File(tempPath);
- }
-
- /**
- * Flush the stream.
- */
- public void flush() throws IOException {
- try {
- output.flush();
- } catch (IOException e) {
- failed = true;
- throw e; // rethrow
- }
- }
-
- /**
- * Get the temporary file path.
- * @return the path of the temporary file
- */
- public String getTempFilePath() {
- return temp.getAbsolutePath();
- }
-
- /**
- * Transfers data from one stream to another.
- * @param source stream
- * @param destination stream
- */
- protected void transferData(InputStream source, OutputStream destination) throws IOException {
-
- try {
- byte[] buffer = new byte[8192];
-
- while (true) {
- int bytesRead = source.read(buffer);
-
- if (bytesRead == -1) {
- break;
- }
-
- destination.write(buffer, 0, bytesRead);
- }
- }
- finally {
- try {
- source.close();
- }
- catch (IOException e) {
- }
-
- try {
- destination.close();
- }
- catch (IOException e) {
- }
- }
- }
-
- /**
- * Write an integer.
- * @param the integer to write
- */
- public void write(int b) throws IOException {
-
- try {
- output.write(b);
- }
- catch (IOException e) {
- failed = true;
- throw e;
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 8e216ef2b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java
+++ /dev/null
@@ -1,670 +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.files.ui.resources;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-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.UIJob;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-
-/**
- * This class manages listening for resource changes within our temp file project
- * It is used for listening to saves made in the editor so that we can upload
- * changes to the remote files. */
-public abstract class SystemTempFileListener implements IResourceChangeListener
-{
-
- private ArrayList _changedResources;
- private ArrayList _ignoredFiles = new ArrayList();
- private boolean _isSynching;
- private boolean _isEnabled;
-
- public SystemTempFileListener()
- {
- _changedResources = new ArrayList();
- _isSynching = false;
- _isEnabled = true;
- }
-
- public void setEnabled(boolean flag)
- {
- _isEnabled = flag;
- }
-
- public void addIgnoreFile(IFile toIgnore)
- {
- _ignoredFiles.add(toIgnore);
- }
-
- public void removeIgnoreFile(IFile toNotIgnore)
- {
- _ignoredFiles.remove(toNotIgnore);
- }
-
- public boolean isIgnorable(IFile file)
- {
- if (_ignoredFiles.contains(file))
- {
- return true;
- }
- else
- {
- String path = file.getLocation().toString().toLowerCase();
-
- for (int i = 0; i < _ignoredFiles.size(); i++)
- {
- IFile cfile = (IFile)_ignoredFiles.get(i);
- String cpath = cfile.getLocation().toString().toLowerCase();
- if (path.equals(cpath))
- {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event)
- {
- if (_isEnabled)
- {
-
- Object source = event.getSource();
- IResourceDelta delta = event.getDelta();
- if (delta != null)
- {
- if (preScanForTempFiles(delta))
- {
- // a temp file has changed
- // synchronize temp file with remote file
- processDelta(delta);
-
- if (_changedResources.size() > 0 && !_isSynching)
- {
- refreshRemoteResourcesOnUIThread();
- }
- }
- else
- {
- if (!RSEUIPlugin.getThePersistenceManager().isExporting())
- {
- List changes = new ArrayList();
- checkLocalChanges(delta, changes);
- refreshRemoteResourcesOnMainThread(changes);
- }
- }
- }
- }
- }
-
- public class RefreshResourcesJob extends UIJob
- {
- private List _resources;
- public RefreshResourcesJob(List resources)
- {
- super(FileResources.RSEOperation_message);
- _resources = resources;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_SYNCHRONIZE_PROGRESS);
- monitor.beginTask(msg.getLevelOneText(), _resources.size());
- for (int i = 0; i < _resources.size(); i++)
- {
- Object resource = _resources.get(i);
- refreshRemoteResource(resource);
- monitor.worked(1);
- }
- monitor.done();
- return Status.OK_STATUS;
- }
- }
-
- public class RefreshResourcesUIJob extends WorkbenchJob
- {
- public RefreshResourcesUIJob()
- {
- super(FileResources.RSEOperation_message);
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- _isSynching = true;
- synchronized (_changedResources)
- {
- 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++)
- {
- IFile file = (IFile) _changedResources.get(i);
- synchronizeTempWithRemote(file, monitor);
- }
- monitor.done();
-
- _changedResources.clear();
- }
- _isSynching = false;
- return Status.OK_STATUS;
- }
- }
-
- private void refreshRemoteResourcesOnMainThread(List resources)
- {
- RefreshResourcesJob job = new RefreshResourcesJob(resources);
- job.setPriority(Job.INTERACTIVE);
- job.schedule();
- }
-
- private void refreshRemoteResourcesOnUIThread()
- {
- RefreshResourcesUIJob job = new RefreshResourcesUIJob();
- job.setPriority(Job.INTERACTIVE);
- job.schedule();
- }
-
- protected void checkLocalChanges(IResourceDelta delta, List changes)
- {
- IResourceDelta[] children = delta.getAffectedChildren();
- for (int i = 0; i < children.length; i++)
- {
- IResourceDelta child = children[i];
-
- // DKM - case where local resource changes that local subsystem happens to be looking at
- int kind = child.getKind();
- boolean noChange = (kind == IResourceDelta.NO_CHANGE);
- if (noChange)
- return;
-
- boolean isChanged = (kind == IResourceDelta.CHANGED);
- boolean isDeleted = (kind == IResourceDelta.REMOVED);
- boolean isAdded = (kind == IResourceDelta.ADDED);
- boolean isMovedTo = (kind == IResourceDelta.MOVED_TO);
- boolean isMovedFrom = (kind == IResourceDelta.MOVED_FROM);
-
- IResource resource = child.getResource();
-
- String pathOfChild = null;
- String pathOfParent = null;
-
- IPath location = resource.getLocation();
- if (location == null)
- {
- // deleted resource
- String projectPath = child.getFullPath().toOSString();
- String workspacePath = SystemBasePlugin.getWorkspaceRoot().getLocation().toOSString();
-
- pathOfChild = workspacePath + projectPath;
- pathOfParent = (new File(pathOfChild)).getParent();
- }
- else
- {
- pathOfChild = resource.getLocation().toOSString();
- pathOfParent = resource.getParent().getLocation().toOSString();
- }
-
-
-
- if (isChanged)
- {
- checkLocalChanges(child, changes);
- }
- else
- {
- RemoteFileSubSystem fs = (RemoteFileSubSystem)getLocalFileSubSystem();
- if (fs == null) return; // MJB: Defect 45678
-
- IRemoteFile remoteFile = fs.getCachedRemoteFile(pathOfChild);
- if (remoteFile != null)
- {
- remoteFile.markStale(true);
- }
-
- IRemoteFile cachedParent = fs.getCachedRemoteFile(pathOfParent);
- if (cachedParent == null)
- return;
-
- cachedParent.markStale(true);
- if (!changes.contains(cachedParent))
- {
- changes.add(cachedParent);
- }
- if (isDeleted)
- {
- //System.out.println("deleted="+isDeleted);
- }
- else if (isAdded)
- {
- //System.out.println("added="+isAdded);
- }
- else if (isMovedTo)
- {
- //System.out.println("movedto="+isMovedTo);
- }
- else if (isMovedFrom)
- {
- //System.out.println("movedfrom="+isMovedFrom);
- }
- }
-
- }
- }
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
- else
- {
- // for other cases, use statusbar
- IWorkbenchWindow win = SystemBasePlugin.getActiveWorkbenchWindow();
-
- if (win != null)
- {
- Shell winShell = SystemBasePlugin.getActiveWorkbenchShell();
- if (winShell != null && !winShell.isDisposed() && winShell.isVisible())
- {
- shell = winShell;
- return win;
- }
- else
- {
- win = null;
- }
- }
-
- return new ProgressMonitorDialog(shell);
- }
- }
- /**
- * Check the delta for changed temporary files. If
- * any are found, synchronize the temporary files with
- * the corresponding remote files.
- *
- * @param delta the delta to compare
- */
- protected void processDelta(IResourceDelta delta)
- {
- IResourceDelta[] children = delta.getAffectedChildren();
- for (int i = 0; i < children.length; i++)
- {
- IResourceDelta child = children[i];
-
- IResource resource = child.getResource();
-
- if (resource instanceof IFile)
- {
- String loc = resource.getLocation().toString();
-
- // see if this temp file has been changed
- int ckind = child.getKind();
- boolean isChanged = ckind == IResourceDelta.CHANGED;
- int flags = child.getFlags();
- boolean contentChanged = (isChanged && (flags & IResourceDelta.CONTENT) != 0);
-
- if (contentChanged)
- {
- //TODO PROBLEM!! - Eclipse threading means the file may not be ignorable when this event comes in
- // - we need to know if this is via edit or not!
- if (!_changedResources.contains(resource) && !isIgnorable((IFile)resource))
- {
- SystemIFileProperties properties = new SystemIFileProperties(resource);
- long t1 = properties.getDownloadFileTimeStamp();
-
- // get the modified timestamp from the File, not the IFile
- // for some reason, the modified timestamp from the IFile does not always return
- // the right value. There is a Javadoc comment saying the value from IFile might be a
- // cached value and that might be the cause of the problem.
- long t2 = resource.getLocation().toFile().lastModified();
-
- if (t1 != t2)
- {
- String ssStr = properties.getRemoteFileSubSystem();
- if (ssStr != null)
- {
- ISubSystem ss = RSEUIPlugin.getTheSystemRegistry().getSubSystem(ssStr);
- if (doesHandle(ss))
- {
- _changedResources.add(resource);
- }
- }
- }
- }
-
- // KM - commenting out everything below to avoid doing checks as to whether
- // the file is opened in an editor. The check means that for cases
- // where the remote file was opened using an external editor, there
- // won't be a save back to the host, even when the user refreshes the temp project
- // or the file.
-
- /* DKM - can't remember why I did this, but it might be obsolete now
- * need to be able to save remotely regardless whether it's being edited that way or not
- */
- ///*
- // check if this file is being edited
- /*IWorkbenchWindow window = RSEUIPlugin.getActiveWorkbenchWindow();
- if (window == null)
- {
- // DKM:
- //no window, so forget about editors...just save
- // whenever refresh() is done (regardless of changes we hit this
- // we should only do something here when on main thread
- //_changedResources.add(resource);
- }
- else
- {
- IWorkbenchPage page = window.getActivePage();
- if (page != null)
- {
- IEditorReference[] references = page.getEditorReferences();
- for (int e = 0; e < references.length; e++)
- {
- IEditorReference ref = references[e];
- IEditorPart editorPart = ref.getEditor(false);
- if (editorPart != null)
- {
- IEditorInput input = editorPart.getEditorInput();
- if (input != null && input instanceof FileEditorInput)
- {
- FileEditorInput finput = (FileEditorInput) input;
- IFile eFile = finput.getFile();
- String eLoc = eFile.getLocation().toString();
-
- if (eLoc.equals(loc))
- {
- // add to list of pending resource changes
- if (!_changedResources.contains(resource))
- {
- _changedResources.add(resource);
- }
- /// DKM - shouldn't return
- //return;
- }
- }
- else if (input != null && input instanceof SystemCompareInput)
- {
- SystemCompareInput compareInput = (SystemCompareInput) input;
- IResource lFile = compareInput.getLeftResource();
- IResource rFile = compareInput.getRightResource();
-
- String lLoc = lFile.getLocation().toString();
- if (lLoc.equals(loc))
- {
- // add to list of pending resource changes
- if (!_changedResources.contains(resource))
- {
- _changedResources.add(resource);
- }
- }
-
- String rLoc = rFile.getLocation().toString();
- if (rLoc.equals(loc))
- {
- // add to list of pending resource changes
- if (!_changedResources.contains(resource))
- {
- _changedResources.add(resource);
- }
- }
- }
- }
- }
- }
- }*/
-
- // DKM - shouldn't return
- //return;
- }
- }
- else
- {
- // recursively check the subdelta of this delta
- processDelta(child);
- }
- }
- }
-
- /**
- * Synchronize a temporary file with it's corresponding remote file.
- * First we need to determine what the corresponding remote file is.
- * Then we need to compare timestamps to determine how to synchronize.
- *
- * @param file the temporary file to synchronize
- */
- protected void synchronizeTempWithRemote(IFile file, IProgressMonitor monitor)
- {
- // first determine associated remote file
- IPath path = file.getFullPath();
- int numSegments = path.segmentCount();
-
- // first we need to find the right RemoteFileSubSystem for the remote file
- SystemIFileProperties properties = new SystemIFileProperties(file);
-
- // before doing anything, check that the stored time stamp is not empty
- if (properties.getRemoteFileTimeStamp() == 0)
- {
- // we just downloaded this and that's why we hit an event
- return;
- }
-
- ISubSystem fs = null;
-
- // get the subsystem ID property from the temporary file
- String subsystemId = properties.getRemoteFileSubSystem();
-
- // the subsystem ID may not exist if the temporary file existed before this feature
- // to handle migration of this smoothly, we can use another method to determine the subsystem
- if (subsystemId != null)
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- fs = registry.getSubSystem(subsystemId);
- }
-
- if (fs != null)
- {
- // use the remote file path property of the temp file to determine the path of the remote file
- // on the remote system
- String uploadPath = properties.getRemoteFilePath();
-
- // the uploadPath property may not exist if the temporary file existed before this feature
- // to handle migration of this smoothly, we can use another method to determine the remote file path
- if (uploadPath == null)
- {
- // derive the path from the temporary file path
- IHost connection = fs.getHost();
-
- // on windows systems, we need to take into account drives and different separators
- boolean isWindows = connection.getSystemType().equals("Local") || fs.getHost().getSystemType().equals("Windows"); //$NON-NLS-1$ //$NON-NLS-2$
-
- char fileSeparator = isWindows ? '\\' : '/';
- StringBuffer remotePath = new StringBuffer(""); //$NON-NLS-1$
- for (int i = 3; i < numSegments; i++)
- {
- if (i == 3)
- {
- if (!isWindows)
- {
- remotePath.append(fileSeparator);
- }
- }
- if (i > 3)
- {
- if (i == 4)
- {
- if (isWindows)
- {
- remotePath.append(":"); //$NON-NLS-1$
- }
- }
-
- remotePath.append(fileSeparator);
- }
-
- String seg = path.segment(i);
- remotePath.append(seg);
- }
-
- uploadPath = remotePath.toString();
- }
-
- // attemp the remote file synchronization
- if (doesHandle(fs))
- {
- // see if we're connected
- try
- {
- // check that the remote file system is connected
- // if not, attemp to connect to it
- if (!fs.isConnected())
- {
- fs.connect();
- }
- }
- catch (Exception e)
- {
- // unable to connect to the remote server
- // do not attempt synchronization
- // instead, defer synchronization to later but allow user to edit
- // set the dirty flag to indicate that this file needs resynchronization
- properties.setDirty(true);
- return;
- }
-
- doResourceSynchronization(fs, file, uploadPath, monitor);
- }
- }
- }
-
- protected void refreshRemoteResource(Object parent)
- {
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- // refresh
- if (parent != null)
- {
- registry.fireEvent(new SystemResourceChangeEvent(parent, ISystemResourceChangeEvents.EVENT_REFRESH, null));
-
-
- List filterReferences = registry.findFilterReferencesFor(parent, getLocalFileSubSystem());
- for (int i = 0; i < filterReferences.size(); i++)
- {
- ISystemFilterReference filterRef = (ISystemFilterReference)filterReferences.get(i);
- filterRef.markStale(true);
- registry.fireEvent(new SystemResourceChangeEvent(filterRef, ISystemResourceChangeEvents.EVENT_REFRESH, null));
- }
- }
- }
-
-
- /**
- * Synchronize the specified remote file with the temporary local file using the
- * specified remote file subsystem.
- *
- * @param fs the remote file subsystem of the remote file
- * @param tempFile the temporary file
- * @param remoteFile the remote file
- * @param monitor the progress monitor
- */
- protected abstract void doResourceSynchronization(ISubSystem subsystem, IFile tempFile, String resourceId, IProgressMonitor monitor);
-
- /**
- * Indicate whether this tempfile listener handles the specified
- * @param subsystem the subsystem to check
- * @return whether it handles this or not
- */
- protected abstract boolean doesHandle(ISubSystem subsystem);
-
- private IRemoteFileSubSystem getLocalFileSubSystem()
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- IHost con = registry.getLocalHost();
- if (con != null)
- {
- return RemoteFileUtility.getFileSubSystem(con);
- }
- return null;
- }
-
-
- /**
- * Prescan for changes that correspond the temp files project
- */
- protected boolean preScanForTempFiles(IResourceDelta delta)
- {
- if (delta == null)
- {
- return true; // not sure when we'd get this
- }
-
- // does temp files exist
- if (!SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist())
- return false;
-
- IResourceDelta[] subdeltas = delta.getAffectedChildren();
- if (subdeltas.length > 0)
- {
- IResource resource = subdeltas[0].getResource();
- if ((resource != null) && (resource.getType() == IResource.PROJECT))
- {
- if (resource.getName().equals(SystemRemoteEditManager.REMOTE_EDIT_PROJECT_NAME))
- {
- return true;
- }
- }
- }
- return false;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 44d15e0f6..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java
+++ /dev/null
@@ -1,316 +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.files.ui.resources;
-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.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.actions.SystemUploadConflictAction;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-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;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This class manages listening for resource changes within our temp file project
- * It is used for listening to saves made in the editor so that we can upload
- * changes to the remote files. This class specifically handles universal files
- * and doesn't do anything for iSeries. For iSeries members we need to subclass this.
- */
-public class SystemUniversalTempFileListener extends SystemTempFileListener
-{
-
- private static SystemUniversalTempFileListener _instance = null;
-
- private ArrayList _editedFiles = new ArrayList();
-
- /**
- * Return singleton
- */
- public static SystemUniversalTempFileListener getListener()
- {
- if (_instance == null)
- {
- _instance = new SystemUniversalTempFileListener();
- }
- return _instance;
- }
-
- public void registerEditedFile(SystemEditableRemoteFile editMember)
- {
- _editedFiles.add(editMember);
- }
-
- public void unregisterEditedFile(SystemEditableRemoteFile editMember)
- {
- _editedFiles.remove(editMember);
- }
-
- public SystemEditableRemoteFile getEditedFile(IRemoteFile file)
- {
- for (int i = 0; i < _editedFiles.size(); i++)
- {
- SystemEditableRemoteFile efile = (SystemEditableRemoteFile) _editedFiles.get(i);
- if (efile != null)
- {
- IRemoteFile editedFile = efile.getRemoteFile();
- if (editedFile.getAbsolutePathPlusConnection().equals(file.getAbsolutePathPlusConnection()))
- {
- return efile;
- }
- }
- }
-
- return null;
- }
-
- /**
- * Indicate whether this tempfile listener handles the specified
- * @param subsystem the subsystem to check
- * @return whether it handles this or not
- */
- protected boolean doesHandle(ISubSystem subsystem)
- {
- if (subsystem instanceof IRemoteFileSubSystem)
- {
- return true;
- }
- return false;
- }
-
- /**
- * Synchronize the specified remote file with the temporary local file using the
- * specified remote file subsystem.
- *
- * @param fs the remote file subsystem of the remote file
- * @param tempFile the temporary file
- * @param remoteFile the remote file
- */
- protected void doResourceSynchronization(ISubSystem subsystem, IFile tempFile, String resourceId, IProgressMonitor monitor)
- {
- if (subsystem instanceof IRemoteFileSubSystem)
- {
- IRemoteFileSubSystem fs = (IRemoteFileSubSystem) subsystem;
-
- // first we need to get the stored timestamp property and the actual remote timestamp
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
-
- // make sure we're working online - not offline
- if (fs.isOffline())
- {
- properties.setDirty(true);
- return;
- }
- else
- {
- // for mounting...
- if (fs.getHost().getSystemType().equals("Local"))
- {
- boolean isMounted = properties.getRemoteFileMounted();
- if (isMounted)
- {
- String mappedHostPath = properties.getResolvedMountedRemoteFilePath();
- String mappedHostName = properties.getResolvedMountedRemoteFileHost();
- String systemRemotePath = SystemRemoteEditManager.getDefault().getMountPathFor(mappedHostName, mappedHostPath);
-
- if (systemRemotePath == null)
- {
- // mount no longer exists - just return for now
- return;
- }
- if (!systemRemotePath.equals(resourceId))
- {
- // remote path
- resourceId = systemRemotePath;
- properties.setRemoteFilePath(systemRemotePath);
- }
- }
- }
- }
-
- try
- {
- IRemoteFile remoteFile = fs.getRemoteFileObject(resourceId);
-
- if (remoteFile != null)
- {
-
- // make sure we have uptodate file
- remoteFile.markStale(true);
- remoteFile = fs.getRemoteFileObject(resourceId);
-
- // get modification stamp and dirty state
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // get associated editable
- SystemEditableRemoteFile editable = getEditedFile(remoteFile);
- if (editable != null && storedModifiedStamp == 0)
- {
- return;
-
- }
- else if (editable == null)
- {
- Object remoteObject = properties.getRemoteFileObject();
- if (remoteObject != null && remoteObject instanceof SystemEditableRemoteFile)
- {
- editable = (SystemEditableRemoteFile) remoteObject;
- }
- else
- {
- editable = new SystemEditableRemoteFile(remoteFile);
- }
-
- // defect - we get a save event when saving during a close
- // in that case, we shouldn't reopen the editor
- // I think this was originally here so that, if a save is done on
- // a file that hasn't yet been wrapped with an editable, we can
- // set the editor member
- // now call check method before
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN)
- {
- editable.openEditor();
- }
- editable.addAsListener();
- editable.setLocalResourceProperties();
- }
-
- upload(fs, remoteFile, tempFile, properties, storedModifiedStamp, editable, monitor);
- }
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(e.getMessage());
- }
- }
-
- }
-
- public void upload(IRemoteFileSubSystem fs, IRemoteFile remoteFile, IFile tempFile, SystemIFileProperties properties,
- long storedModifiedStamp, SystemEditableRemoteFile editable, IProgressMonitor monitor)
- {
- try
- {
- // get the remote modified timestamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- boolean remoteFileDeleted = !remoteFile.exists();
- // compare timestamps
- if (remoteFileDeleted || (storedModifiedStamp == remoteModifiedStamp))
- {
- // timestamps are the same, so the remote file hasn't changed since our last download
- try
- {
- // upload our pending changes to the remote file
- fs.uploadUTF8(tempFile, remoteFile,monitor);
- }
-
- catch (RemoteFileSecurityException e)
- {
- DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(e.getSystemMessage());
- Display.getDefault().syncExec(msgAction);
- }
- catch (RemoteFileIOException e)
- {
- DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(e.getSystemMessage());
- Display.getDefault().syncExec(msgAction);
- }
- catch (Exception e)
- {
- RemoteFileIOException exc = new RemoteFileIOException(e);
- DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(exc.getSystemMessage());
- Display.getDefault().syncExec(msgAction);
- }
-
- // get the remote file object again so that we have a fresh remote timestamp
- remoteFile.markStale(true);
-
-
- IRemoteFile parent = remoteFile.getParentRemoteFile();
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- // refresh
- if (parent != null)
- {
- registry.fireEvent(new SystemResourceChangeEvent(parent, ISystemResourceChangeEvents.EVENT_REFRESH, null));
- }
-
- remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath());
-
- registry.fireEvent(new SystemResourceChangeEvent(remoteFile, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, remoteFile));
-
-
- // set the stored timestamp to be the same as the remote timestamp
- properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
-
- // indicate that the temp file is no longer dirty
- properties.setDirty(false);
- editable.updateDirtyIndicator();
-
- }
- else if (storedModifiedStamp == -1)
- {
- // hack because Eclipse send out event after replacing local file with remote
- // we don't want to save this!
- // set the stored timestamp to be the same as the remote timestamp
- properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
- }
- else
- {
- // conflict
- // determine which file has a newer timestamp
- boolean remoteNewer = remoteModifiedStamp > storedModifiedStamp;
-
- // case 1: the remote file has changed since our last download
- // it's new timestamp is newer than our stored timestamp (file got
- // updated)
-
- // case 2: the remote file has changed since our last download
- // it's new timestamp is older than our stored timestamp (file got
- // replaced with an older version)
-
- // prompt user with dialog **** Prompt Dialog 1
- // 1) Overwrite local
- // 2) Overwrite remote
- // 3) Save as...
- // 4) Cancel
- Shell shell = RSEUIPlugin.getTheSystemRegistry().getShell();
-
- SystemUploadConflictAction conflictAction = new SystemUploadConflictAction(shell, tempFile, remoteFile, remoteNewer);
- conflictAction.run();
- editable.updateDirtyIndicator();
-
-
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 7f8533833..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
+++ /dev/null
@@ -1,2063 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Michael Scharf (Wind River) - Fix 163844: InvalidThreadAccess in checkForCollision
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.resources;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.internal.resources.Resource;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourceAttributes;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.Activator;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.model.SystemRemoteResourceSet;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-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.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;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * Utility class for doing file transfers on universal systems
- */
-public class UniversalFileTransferUtility
-{
- static final boolean doCompressedTransfer = true;//false;
-
- static final String _rootPath = SystemRemoteEditManager.getDefault().getRemoteEditProjectLocation().makeAbsolute().toOSString();
-
- public static class RenameStatus extends Status {
-
- private static final int CANCEL_ALL = 16;
-
- /**
- * @param severity
- * @param pluginId
- * @param code
- * @param message
- * @param exception
- */
- public RenameStatus(int severity, String pluginId, int code, String message, Throwable exception) {
- super(severity, pluginId, code, message, exception);
- }
- }
-
- /**
- * Transfer a remote file or folder from one remote location to another.
- * @param srcFileOrFolder the file or folder to copy
- * @param tgtFolder the folder to copy to
- * @param monitor the progress monitor
- */
- public static void transferRemoteResource(IRemoteFile srcFileOrFolder, IRemoteFile tgtFolder, IProgressMonitor monitor)
- {
- Object tempSrc = copyRemoteResourceToWorkspace(srcFileOrFolder, monitor);
- if (tempSrc instanceof IResource)
- {
- copyWorkspaceResourceToRemote((IResource) tempSrc, tgtFolder, monitor);
- }
- }
-
- /**
- * replicates a remote file to the temp files project in the workspace
- *
- * @param srcFileOrFolder the file to copy
- * @param monitor the progress monitor
- * @param shell
- * @return the resulting local replica
- */
- protected static IFile copyRemoteFileToWorkspace(IRemoteFile srcFileOrFolder, IProgressMonitor monitor)
- {
- IRemoteFileSubSystem srcFS = srcFileOrFolder.getParentRemoteFileSubSystem();
- IResource tempResource = getTempFileFor(srcFileOrFolder);
-
- IFile tempFile = (IFile) tempResource;
-
- // before we make the transfer to the temp file check whether a temp file already exists
- if (tempFile.exists() && ((Resource)tempFile).getPropertyManager() != null)
- {
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
-
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // compare timestamps
- if (storedModifiedStamp > 0)
- {
- // ;if they're the same, just use temp file
- long remoteModifiedStamp = srcFileOrFolder.getLastModified();
-
- boolean usedBin = properties.getUsedBinaryTransfer();
- boolean shouldUseBin = srcFileOrFolder.isBinary();
- if (storedModifiedStamp == remoteModifiedStamp && (usedBin == shouldUseBin))
- {
- return tempFile;
- }
- }
- }
-
- /*
- if (monitor != null)
- {
- SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYTHINGGENERIC_PROGRESS);
- copyMessage.makeSubstitution(srcFileOrFolder.getName());
-
- monitor.beginTask(copyMessage.getLevelOneText(), IProgressMonitor.UNKNOWN);
- }
-*/
-
- try
- {
- // copy remote file to workspace
- SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
- listener.addIgnoreFile(tempFile);
- srcFS.download(srcFileOrFolder, tempFile, SystemEncodingUtil.ENCODING_UTF_8, monitor);
- listener.removeIgnoreFile(tempFile);
- if (!tempFile.exists() && !tempFile.isSynchronized(IResource.DEPTH_ZERO))
- {
- // eclipse doesn't like this if the resource appears to be from another project
- try
- {
- //tempFile.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, monitor);
- tempFile.refreshLocal(IResource.DEPTH_ZERO, null/*monitor*/);
- }
- catch (Exception e)
- {
-
- }
- }
- if (tempFile.exists())
- {
- // if the file is virtual, set read only if necessary
- // TODO: why set this here? And why for virtual only??
- if (srcFileOrFolder instanceof IVirtualRemoteFile)
- {
- setReadOnly(tempFile, srcFileOrFolder.canWrite());
- }
-
- if (srcFileOrFolder.isText())
- {
- try
- {
- String cset = tempFile.getCharset();
- if (!cset.equals(SystemEncodingUtil.ENCODING_UTF_8))
- {
-
- //System.out.println("charset ="+cset);
- //System.out.println("tempfile ="+tempFile.getFullPath());
- tempFile.setCharset(SystemEncodingUtil.ENCODING_UTF_8, monitor);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- catch (final RemoteFileIOException e)
- {
- runInDisplayThread(new Runnable() {
- public void run() {
- SystemMessageDialog dlg = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), e.getSystemMessage());
- dlg.open();
- }});
- return null;
- }
- catch (Exception e)
- {
- e.printStackTrace();
- return null;
- }
-
- return (IFile) tempResource;
- }
-
- protected static void setIFileProperties(IFile tempFile, IRemoteFile remoteFile, IRemoteFileSubSystem subSystem)
- {
- // set it's properties for use later
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
-
- // set remote properties
- properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
- properties.setDirty(false);
-
- String remotePath = remoteFile.getAbsolutePath();
-
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- String subSystemId = registry.getAbsoluteNameForSubSystem(subSystem);
- properties.setRemoteFileSubSystem(subSystemId);
- properties.setRemoteFilePath(remotePath);
-
- // get the modified timestamp from the File, not the IFile
- // for some reason, the modified timestamp from the IFile does not always return
- // the right value. There is a Javadoc comment saying the value from IFile might be a
- // cached value and that might be the cause of the problem.
- properties.setDownloadFileTimeStamp(tempFile.getLocation().toFile().lastModified());
-
- boolean isMounted = isRemoteFileMounted(subSystem, remotePath);
- properties.setRemoteFileMounted(isMounted);
- if (isMounted)
- {
- String actualRemoteHost = getActualHostFor(subSystem, remotePath);
- String actualRemotePath = getWorkspaceRemotePath(subSystem, remotePath);
- properties.setResolvedMountedRemoteFileHost(actualRemoteHost);
- properties.setResolvedMountedRemoteFilePath(actualRemotePath);
- }
- }
-
- protected static void setIFileProperties(IFile tempFile, File remoteFile, String hostname)
- {
- // set it's properties for use later
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
-
- // set remote properties
- properties.setRemoteFileTimeStamp(remoteFile.lastModified());
- properties.setDirty(false);
-
- String remotePath = remoteFile.getAbsolutePath();
-
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- // String subSystemId = registry.getAbsoluteNameForSubSystem(subSystem);
- // properties.setRemoteFileSubSystem(subSystemId);
- properties.setRemoteFilePath(remotePath);
-
- // get the modified timestamp from the File, not the IFile
- // for some reason, the modified timestamp from the IFile does not always return
- // the right value. There is a Javadoc comment saying the value from IFile might be a
- // cached value and that might be the cause of the problem.
- properties.setDownloadFileTimeStamp(tempFile.getLocation().toFile().lastModified());
-
- boolean isMounted = isRemoteFileMounted(hostname, remotePath);
- properties.setRemoteFileMounted(isMounted);
- if (isMounted)
- {
- String actualRemoteHost = getActualHostFor(hostname, remotePath);
- String actualRemotePath = getWorkspaceRemotePath(hostname, remotePath);
- properties.setResolvedMountedRemoteFileHost(actualRemoteHost);
- properties.setResolvedMountedRemoteFilePath(actualRemotePath);
- }
- }
-
-
- /**
- * Replicates a set of remote files or folders to the workspace
- * @param remoteSet the objects which are being copied
- * @param monitor a progress monitor
- * @return the temporary objects that was created after the download
- */
- public static SystemWorkspaceResourceSet copyRemoteResourcesToWorkspace(SystemRemoteResourceSet remoteSet, IProgressMonitor monitor)
- {
-
-
- boolean ok = true;
- SystemWorkspaceResourceSet resultSet = new SystemWorkspaceResourceSet();
- IRemoteFileSubSystem srcFS = (IRemoteFileSubSystem)remoteSet.getSubSystem();
-
- if (!srcFS.isConnected())
- {
- return null;
- }
-
- boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER);
-
-
- List set = remoteSet.getResourceSet();
- for (int i = 0; i < set.size() && !resultSet.hasMessage(); i++)
- {
- if (monitor != null && monitor.isCanceled())
- {
- return resultSet;
- }
-
-
- IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);
- if (!srcFileOrFolder.exists())
- {
- SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
- resultSet.setMessage(errorMessage);
- }
- else
- {
- if (srcFileOrFolder.isFile()) // file transfer
- {
-
- IFile tempFile = copyRemoteFileToWorkspace(srcFileOrFolder, monitor);
- resultSet.addResource(tempFile);
- }
- else // folder transfer
- {
- IResource tempFolder = null;
-
- if (doCompressedTransfer && doSuperTransferProperty && !srcFileOrFolder.isRoot()
- && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"))) //$NON-NLS-1$
- {
- try
- {
- tempFolder = compressedCopyRemoteResourceToWorkspace(srcFileOrFolder, monitor);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- ok = false;
- }
- ok = tempFolder != null;
- if (ok)
- {
- resultSet.addResource(tempFolder);
- }
- }
- else
- {
- tempFolder = getTempFileFor(srcFileOrFolder);
- try
- {
- IRemoteFile[] children = srcFS.listFoldersAndFiles(srcFileOrFolder,monitor);
-
-
- SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
- SystemWorkspaceResourceSet childResults = copyRemoteResourcesToWorkspace(childSet, monitor);
- if (childResults.hasMessage())
- {
- resultSet.setMessage(childResults.getMessage());
- }
- resultSet.addResource(tempFolder);
- }
- catch (SystemMessageException e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- }
-
-
- // refresh and set IFile properties
- for (int r = 0; r < resultSet.size(); r++)
- {
- IResource tempResource = (IResource)resultSet.get(r);
- IRemoteFile rmtFile = (IRemoteFile)remoteSet.get(r);
-
- if (!tempResource.exists())
- {
- // refresh temp file in project
- try
- {
- tempResource.refreshLocal(IResource.DEPTH_ONE, null /*monitor*/);
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
- }
- if (tempResource instanceof IFile)
- {
- try
- {
- setIFileProperties((IFile)tempResource, rmtFile, srcFS);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- /*
- else
- {
- // refresh temp file in project
- try
- {
- tempResource.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
- }
- */
- }
-
- return resultSet;
- }
-
- public static Object copyRemoteResourceToWorkspace(File srcFileOrFolder, IProgressMonitor monitor) {
-
- if (!srcFileOrFolder.exists()) {
- SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), "LOCALHOST");
- return errorMessage;
- }
-
- if (srcFileOrFolder.isFile()) {
- IFile tempFile = copyRemoteFileToWorkspace(srcFileOrFolder, monitor);
-
- if (!tempFile.exists())
- {
- // refresh temp file in project
- try
- {
- if (PlatformUI.isWorkbenchRunning())
- {
- if (!tempFile.isSynchronized(IResource.DEPTH_ZERO))
- tempFile.refreshLocal(IResource.DEPTH_ZERO, monitor);
- }
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- tempFile = (IFile) getTempFileFor(srcFileOrFolder);
- if (tempFile.exists())
- {
- try
- {
- setIFileProperties(tempFile, srcFileOrFolder, "LOCALHOST");
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- return tempFile;
- }
- else {
- return null;
- }
- }
-
- /**
- * Replicates a local file to the temp files project in the workspace.
- * @param srcFileOrFolder the file to copy.
- * @param monitor the progress monitor.
- * @return the resulting local replica.
- */
- protected static IFile copyRemoteFileToWorkspace(File srcFileOrFolder, IProgressMonitor monitor)
- {
- IResource tempResource = getTempFileFor(srcFileOrFolder);
-
- IFile tempFile = (IFile) tempResource;
-
- // before we make the transfer to the temp file check whether a temp file already exists
- if (tempFile.exists())
- {
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
-
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // compare timestamps
- if (storedModifiedStamp > 0)
- {
- // if they're the same, just use temp file
- long remoteModifiedStamp = srcFileOrFolder.lastModified();
-
- boolean usedBin = properties.getUsedBinaryTransfer();
- boolean shouldUseBin = SystemFileTransferModeRegistry.getDefault().isBinary(srcFileOrFolder);
- if (storedModifiedStamp == remoteModifiedStamp && (usedBin == shouldUseBin))
- {
- return tempFile;
- }
- }
- }
-
- try
- {
- // copy remote file to workspace
- SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
- listener.addIgnoreFile(tempFile);
- download(srcFileOrFolder, tempFile, SystemEncodingUtil.ENCODING_UTF_8, monitor);
- listener.removeIgnoreFile(tempFile);
- if (!tempFile.exists() && !tempFile.isSynchronized(IResource.DEPTH_ZERO))
- {
- // eclipse doesn't like this if the resource appears to be from another project
- try
- {
- tempFile.refreshLocal(IResource.DEPTH_ZERO, null);
- }
- catch (Exception e)
- {
-
- }
- }
- if (tempFile.exists())
- {
- if (SystemFileTransferModeRegistry.getDefault().isText(srcFileOrFolder))
- {
- try
- {
- String cset = tempFile.getCharset();
- if (!cset.equals(SystemEncodingUtil.ENCODING_UTF_8))
- {
- tempFile.setCharset(SystemEncodingUtil.ENCODING_UTF_8, monitor);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("An exception occured " + e.getMessage(), e);
- return null;
- }
-
- return (IFile)tempResource;
- }
-
- protected static boolean download(File file, IFile tempFile, String hostEncoding, IProgressMonitor monitor) {
-
- FileInputStream inputStream = null;
- BufferedInputStream bufInputStream = null;
- FileOutputStream outputStream = null;
- BufferedOutputStream bufOutputStream = null;
- OutputStreamWriter outputWriter = null;
- BufferedWriter bufWriter = null;
- boolean isCancelled = false;
-
- File destinationFile = tempFile.getLocation().toFile();
-
- try
- {
-
- if (!destinationFile.exists())
- {
- File parentDir = destinationFile.getParentFile();
- parentDir.mkdirs();
- }
-
- // encoding conversion required if it a text file but not an xml file
- boolean isBinary = SystemFileTransferModeRegistry.getDefault().isBinary(file) || SystemEncodingUtil.getInstance().isXML(file.getAbsolutePath());
- boolean isEncodingConversionRequired = !isBinary;
-
- inputStream = new FileInputStream(file);
- bufInputStream = new BufferedInputStream(inputStream);
- outputStream = new FileOutputStream(destinationFile);
-
- if (isEncodingConversionRequired)
- {
- outputWriter = new OutputStreamWriter(outputStream, hostEncoding);
- bufWriter = new BufferedWriter(outputWriter);
- }
- else
- {
- bufOutputStream = new BufferedOutputStream(outputStream);
- }
-
-
- byte[] buffer = new byte[512000];
- long totalSize = file.length();
- int totalRead = 0;
-
- while (totalRead < totalSize && !isCancelled)
- {
-
- int available = bufInputStream.available();
- available = (available < 512000) ? available : 512000;
-
- int bytesRead = bufInputStream.read(buffer, 0, available);
-
- if (bytesRead == -1) {
- break;
- }
-
- // need to convert encoding, i.e. text file, but not xml
- // ensure we read in file using the encoding for the file system
- // which can be specified by user as text file encoding in preferences
- if (isEncodingConversionRequired)
- {
- String s = new String(buffer, 0, bytesRead, hostEncoding);
- bufWriter.write(s);
- }
- else
- {
- bufOutputStream.write(buffer, 0, bytesRead);
- }
-
- totalRead += bytesRead;
-
- if (monitor != null)
- {
- monitor.worked(bytesRead);
- isCancelled = monitor.isCanceled();
- }
- }
- }
- catch (FileNotFoundException e)
- {
- return false;
- }
- catch (UnsupportedEncodingException e)
- {
- return false;
- }
- catch (IOException e)
- {
- return false;
- }
- finally
- {
-
- try
- {
- if (bufWriter != null)
- bufWriter.close();
-
- if (bufInputStream != null)
- bufInputStream.close();
-
- if (bufOutputStream != null)
- bufOutputStream.close();
-
- if (isCancelled)
- {
- return false;
- }
- else if (destinationFile != null && file.exists()) {
- destinationFile.setLastModified(file.lastModified());
-
- if (destinationFile.length() != file.length()) {
- return false;
- }
- }
- }
- catch (IOException e)
- {
- }
- }
-
- return true;
- }
-
- /**
- * Replicates a remote file or folder to the workspace
- * @param srcFileOrFolder the object which is being copied
- * @param monitor a progress monitor
- * @return the temporary object that was created after the download
- */
- public static Object copyRemoteResourceToWorkspace(IRemoteFile srcFileOrFolder, IProgressMonitor monitor)
- {
-
- boolean ok = true;
-
- IRemoteFileSubSystem srcFS = srcFileOrFolder.getParentRemoteFileSubSystem();
-
- if (!srcFS.isConnected())
- {
- return null;
- }
- if (!srcFileOrFolder.exists())
- {
- SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
- return errorMessage;
- }
-
- if (srcFileOrFolder.isFile())
- {
- IFile tempFile = copyRemoteFileToWorkspace(srcFileOrFolder, monitor);
-
- if (!tempFile.exists())
- {
- // refresh temp file in project
- try
- {
- if (PlatformUI.isWorkbenchRunning())
- {
- if (!tempFile.isSynchronized(IResource.DEPTH_ZERO))
- tempFile.refreshLocal(IResource.DEPTH_ZERO, monitor);
- }
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- tempFile = (IFile) getTempFileFor(srcFileOrFolder);
- if (tempFile.exists() && ((Resource)tempFile).getPropertyManager() != null)
- {
- try
- {
- setIFileProperties(tempFile, srcFileOrFolder, srcFS);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- return tempFile;
- }
- else
- {
- IResource tempFolder = null;
-
- boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER);
-
- if (doCompressedTransfer && doSuperTransferProperty && !srcFileOrFolder.isRoot()
- && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"))) //$NON-NLS-1$
- {
- try
- {
- tempFolder = compressedCopyRemoteResourceToWorkspace(srcFileOrFolder, monitor);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- ok = false;
- }
- ok = tempFolder != null;
- if (ok)
- {
- return tempFolder;
- }
- }
- else
- {
- tempFolder = getTempFileFor(srcFileOrFolder);
- IRemoteFile[] children = null;
- try
- {
- children = srcFS.listFoldersAndFiles(srcFileOrFolder, monitor);
- }
- catch (SystemMessageException e)
- {
- e.printStackTrace();
- }
- IResource[] childResources = new IResource[children.length];
-
- if (children != null)
- {
- if (children.length == 0)
- {
- File tempFolderFile = tempFolder.getLocation().toFile();
- tempFolderFile.mkdirs();
- }
-
- for (int i = 0; i < children.length && ok; i++)
- {
- IRemoteFile child = children[i];
- IResource childResource = null;
- if (child.isFile())
- {
- childResource = copyRemoteFileToWorkspace(child, monitor);
- }
- else
- {
- childResource = (IResource) copyRemoteResourceToWorkspace(child, monitor);
- }
- if (childResource == null)
- {
- ok = false;
- }
- if (monitor != null && monitor.isCanceled())
- {
- ok = false;
- }
- childResources[i] = childResource;
- }
- }
-
- if (ok)
- {
- refreshResourceInWorkspace(tempFolder);
-
- // set properties of files
- if (tempFolder.exists() && children != null)
- {
- for (int i = 0; i < childResources.length; i++)
- {
- IResource tempFile = childResources[i];
-
- if (tempFile.exists() && tempFile instanceof IFile)
- {
- IRemoteFile child = children[i];
- setIFileProperties((IFile)tempFile, child, srcFS);
- }
- }
- }
-
- return tempFolder;
- }
- }
- }
-
- return null;
- }
-
- /**
- * Helper method to get the local file subsystem.
- * @return the local file subsystem
- */
- private static IRemoteFileSubSystem getLocalFileSubSystem()
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- IHost[] connections = registry.getHosts();
- for (int i = 0; i < connections.length; i++)
- {
- IHost connection = connections[i];
- IRemoteFileSubSystem anFS = RemoteFileUtility.getFileSubSystem(connection);
- if (anFS.getHost().getSystemType().equals("Local")) //$NON-NLS-1$
- {
- return anFS;
- }
- }
-
- return null;
- }
-
-
- /**
- * Perform a copy via drag and drop.
- * @param srcFileOrFolder the object to be copied. If the target and source are not on the same system, then this is a
- * temporary object produced by the doDrag.
- * @param targetFolder the object to be copied to.
- * @param monitor the progress monitor
- * @return the resulting remote object
- */
- public static Object copyWorkspaceResourceToRemote(IResource srcFileOrFolder, IRemoteFile targetFolder, IProgressMonitor monitor)
- {
- return copyWorkspaceResourceToRemote(srcFileOrFolder, targetFolder, monitor, true);
- }
-
-/**
- * Perform a copy via drag and drop.
- * @param workspaceSet the objects to be copied. If the target and sources are not on the same system, then this is a
- * temporary object produced by the doDrag.
- * @param targetFolder the object to be copied to.
- * @param monitor the progress monitor
- * @param checkForCollisions indicates whether to check for colllisions or not
- * @return the resulting remote objects
- */
- public static SystemRemoteResourceSet copyWorkspaceResourcesToRemote(SystemWorkspaceResourceSet workspaceSet, IRemoteFile targetFolder, IProgressMonitor monitor, boolean checkForCollisions)
- {
- boolean doSuperTransferPreference = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER)
- && targetFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
-
- IRemoteFileSubSystem targetFS = targetFolder.getParentRemoteFileSubSystem();
- SystemRemoteResourceSet resultSet = new SystemRemoteResourceSet(targetFS);
-
- if (targetFolder.isStale())
- {
- try
- {
- targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath());
- }
- catch (Exception e)
- {
- }
- }
-
- if (!targetFolder.canWrite())
- {
- SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR);
- errorMsg.makeSubstitution(targetFS.getHostAliasName());
- resultSet.setMessage(errorMsg);
- return resultSet;
- }
-
- if (!targetFS.isConnected())
- {
- return null;
- }
- boolean isTargetArchive = targetFolder.isArchive();
- if (isTargetArchive && !targetFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement()) return null;
- StringBuffer newPathBuf = new StringBuffer(targetFolder.getAbsolutePath());
- if (isTargetArchive)
- {
- newPathBuf.append(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- }
- else
- {
- newPathBuf.append(targetFolder.getSeparatorChar());
- }
-
- List resources = workspaceSet.getResourceSet();
- List newFilePathList = new ArrayList();
-
-
- // query what we're going to create
- for (int n = 0; n < resources.size(); n++)
- {
- IResource srcFileOrFolder = (IResource)resources.get(n);
- newFilePathList.add(newPathBuf.toString() + srcFileOrFolder.getName());
- }
- // one big query
- SystemRemoteResourceSet existingFiles = null;
- try
- {
- existingFiles = targetFS.getRemoteFileObjects(newFilePathList);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
-
- // clear the list so that next time we use renamed names
- newFilePathList.clear();
-
-
- for (int i = 0; i < resources.size() && !resultSet.hasMessage(); i++)
- {
- if (monitor != null && monitor.isCanceled())
- {
- return resultSet;
- }
-
-
- IResource srcFileOrFolder = (IResource)resources.get(i);
- String name = srcFileOrFolder.getName();
-
- if (srcFileOrFolder instanceof IFile)
- {
- String oldPath = newPathBuf.toString() + name;
- if (checkForCollisions)
- {
- RenameStatus status = checkForCollision(existingFiles, targetFolder, name, oldPath);
- int severity = status.getSeverity();
-
- if (severity == IStatus.OK) {
- name = status.getMessage();
- }
- else if (severity == IStatus.CANCEL) {
-
- int code = status.getCode();
-
- if (code == IStatus.CANCEL) {
- continue;
- }
- else if (code == RenameStatus.CANCEL_ALL) {
- break;
- }
- }
- }
-
- String newPath = newPathBuf.toString() + name;
-
- try
- {
-
- String srcCharSet = null;
-
-
- try
- {
- srcCharSet = ((IFile)srcFileOrFolder).getCharset(false);
- if (srcCharSet == null || srcCharSet.length() == 0)
- {
- srcCharSet = SystemEncodingUtil.ENCODING_UTF_8;
- }
- }
- catch (CoreException e)
- {
- srcCharSet = SystemEncodingUtil.ENCODING_UTF_8;
- }
-
-
- String srcFileLocation = srcFileOrFolder.getLocation().toOSString();
- targetFS.upload(srcFileLocation, srcCharSet, newPath, targetFS.getRemoteEncoding(),monitor);
- newFilePathList.add(newPath);
- }
-
- catch (RemoteFileIOException e)
- {
- resultSet.setMessage(e.getSystemMessage());
- }
- catch (SystemMessageException e)
- {
- resultSet.setMessage(e.getSystemMessage());
- }
-
- if (resultSet.hasMessage())
- {
- return resultSet;
- }
- }
-
- else if (srcFileOrFolder instanceof IContainer)
- {
- IContainer directory = (IContainer) srcFileOrFolder;
- if (!directory.exists())
- {
- try
- {
- directory.refreshLocal(IResource.DEPTH_ONE, monitor);
- }
- catch (Exception e)
- {
-
- }
- }
-
- String newPath = newPathBuf.toString() + name;
-
- // this is a directory
- // recursively copy
- try
- {
- IRemoteFile newTargetFolder = (IRemoteFile)existingFiles.get(newPath);
- if (!newTargetFolder.exists())
- {
- newTargetFolder = targetFS.createFolder(newTargetFolder);
- }
-
-
- boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"); //$NON-NLS-1$
- boolean destInArchive = (newTargetFolder instanceof IVirtualRemoteFile) || newTargetFolder.isArchive();
-
- if (doCompressedTransfer && doSuperTransferPreference && !destInArchive && !isTargetLocal)
- {
- compressedCopyWorkspaceResourceToRemote(directory, newTargetFolder, monitor);
- }
- else
- {
- IResource[] children = directory.members();
- SystemWorkspaceResourceSet childSet = new SystemWorkspaceResourceSet(directory.members());
- SystemRemoteResourceSet childResults = copyWorkspaceResourcesToRemote(childSet, newTargetFolder, monitor, checkForCollisions);
- if (childResults == null)
- {
- return null;
- }
- if (childResults.hasMessage())
- {
- resultSet.setMessage(childResults.getMessage());
- }
- }
-
- newFilePathList.add(newPath);
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
-
- try
- {
- resultSet = targetFS.getRemoteFileObjects(newFilePathList);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return resultSet;
- }
-
- /**
- * Perform a copy via drag and drop.
- * @param srcFileOrFolder the object to be copied. If the target and source are not on the same system, then this is a
- * temporary object produced by the doDrag.
- * @param targetFolder the object to be copied to.
- * @param monitor the progress monitor
- * @param checkForCollisions indicates whether to check for colllisions or not
- * @return the result remote object
- */
- public static Object copyWorkspaceResourceToRemote(IResource srcFileOrFolder, IRemoteFile targetFolder, IProgressMonitor monitor, boolean checkForCollisions)
- {
- Object result = null;
-
- IRemoteFileSubSystem targetFS = targetFolder.getParentRemoteFileSubSystem();
-
- if (targetFolder.isStale())
- {
- try
- {
- targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath());
- }
- catch (Exception e)
- {
- }
- }
-
- if (!targetFolder.canWrite())
- {
- SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR);
- errorMsg.makeSubstitution(targetFS.getHostAliasName());
- return errorMsg;
- }
-
- if (!targetFS.isConnected())
- {
- return null;
- }
-
- /*
- SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS);
- copyMessage.makeSubstitution(srcFileOrFolder.getName(), targetFolder.getAbsolutePath());
- */
-
- String name = srcFileOrFolder.getName();
-
- if (srcFileOrFolder instanceof IFile)
- {
- if (checkForCollisions)
- {
- name = checkForCollision(targetFolder, name);
- if (name == null)
- {
- return null;
- }
- }
-
- boolean isTargetArchive = targetFolder.isArchive();
- if (isTargetArchive && !targetFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement()) return null;
- StringBuffer newPathBuf = new StringBuffer(targetFolder.getAbsolutePath());
- if (isTargetArchive)
- {
- newPathBuf.append(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- }
- else
- {
- newPathBuf.append(targetFolder.getSeparatorChar());
- }
- newPathBuf.append(name);
-
- String newPath = newPathBuf.toString();
-
- try
- {
- String srcFileLocation = srcFileOrFolder.getLocation().toOSString();
-
- String srcCharSet = null;
-
- boolean isText = SystemFileTransferModeRegistry.getDefault().isText(newPath);
- if (isText)
- {
- try
- {
- srcCharSet = ((IFile)srcFileOrFolder).getCharset(false);
- if (srcCharSet == null || srcCharSet.length() == 0)
- {
- srcCharSet = SystemEncodingUtil.ENCODING_UTF_8;
- }
- }
- catch (CoreException e)
- {
- srcCharSet = SystemEncodingUtil.ENCODING_UTF_8;
- }
- }
-
-
- targetFS.upload(srcFileLocation, srcCharSet, newPath, targetFS.getRemoteEncoding(), monitor);
- IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name);
-
- return copiedFile;
- }
-
- catch (RemoteFileIOException e)
- {
- return e.getSystemMessage();
- }
- catch (SystemMessageException e)
- {
- return e.getSystemMessage();
- }
- }
- else if (srcFileOrFolder instanceof IContainer)
- {
- if (checkForCollisions)
- {
- name = checkForCollision(targetFolder, name);
- if (name == null)
- {
- return null;
- }
- }
-
- boolean isTargetArchive = targetFolder.isArchive();
- StringBuffer newPathBuf = new StringBuffer(targetFolder.getAbsolutePath());
- if (isTargetArchive)
- {
- newPathBuf.append(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- }
- else
- {
- newPathBuf.append(targetFolder.getSeparatorChar());
- }
- newPathBuf.append(name);
-
- String newPath = newPathBuf.toString();
-
- IContainer directory = (IContainer) srcFileOrFolder;
-
- // this is a directory
- // recursively copy
- try
- {
- IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
- if (!newTargetFolder.exists())
- {
- targetFS.createFolder(newTargetFolder);
- newTargetFolder.markStale(true);
- newTargetFolder = targetFS.getRemoteFileObject(newPath);
- }
-
- directory.refreshLocal(IResource.DEPTH_ONE, monitor);
-
- boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"); //$NON-NLS-1$
- boolean destInArchive = (newTargetFolder instanceof IVirtualRemoteFile) || newTargetFolder.isArchive();
- boolean doSuperTransferPreference = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER);
-
- if (doCompressedTransfer && doSuperTransferPreference && !destInArchive && !isTargetLocal)
- {
- compressedCopyWorkspaceResourceToRemote(directory, newTargetFolder, monitor);
- }
- else
- {
- IResource[] children = directory.members();
- for (int i = 0; i < children.length; i++)
- {
- if (monitor.isCanceled())
- {
- return null;
- }
- else
- {
- IResource child = children[i];
- if (copyWorkspaceResourceToRemote(child, newTargetFolder, monitor, false) == null)
- {
- return null;
- }
- }
- }
- }
- return newTargetFolder;
-
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- return result;
- }
-
- public static void compressedCopyWorkspaceResourceToRemote(IContainer directory, IRemoteFile newTargetFolder, IProgressMonitor monitor) throws Exception
- {
- if (!newTargetFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement()) return;
- if (ArchiveHandlerManager.isVirtual(newTargetFolder.getAbsolutePath()))
- {
- return;
- }
- IRemoteFile destinationArchive = null;
- String newPath = null;
- try
- {
- monitor.beginTask(FileResources.RESID_SUPERTRANSFER_PROGMON_MAIN,IProgressMonitor.UNKNOWN);
- monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_CREATE);
- destinationArchive = getLocalFileSubSystem().getRemoteFileObject(File.createTempFile("supertransfer", getArchiveExtensionFromProperties()).getAbsolutePath()); //$NON-NLS-1$
- FileServiceSubSystem localSS = (FileServiceSubSystem)getLocalFileSubSystem();
- try
- {
- localSS.delete(destinationArchive, monitor);
- }
- catch (Exception e)
- {
-
- }
- localSS.createFile(destinationArchive);
-
- if (destinationArchive == null)
- {
- return;
- }
- if (!destinationArchive.isArchive())
- {
- return;
- }
- IRemoteFile newTargetParent = newTargetFolder.getParentRemoteFile();
- monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_POPULATE);
- IRemoteFile sourceDir = localSS.getRemoteFileObject(directory.getLocation().toOSString());
- IRemoteFileSubSystem targetFS = newTargetFolder.getParentRemoteFileSubSystem();
-
-
- // FIXME
- //localSS.copyToArchiveWithEncoding(sourceDir, destinationArchive, sourceDir.getName(), targetFS.getRemoteEncoding(), monitor);
- localSS.copy(sourceDir, destinationArchive, sourceDir.getName(), monitor);
-
- monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_TRANSFER);
- newPath = newTargetParent.getAbsolutePath() + targetFS.getSeparator() + destinationArchive.getName();
-
- // copy local zip to remote
- targetFS.upload(destinationArchive.getAbsolutePath(), newPath, monitor);
- IRemoteFile remoteArchive = targetFS.getRemoteFileObject(newPath);
-
- monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_EXTRACT);
- String compressedFolderPath = newPath + ArchiveHandlerManager.VIRTUAL_SEPARATOR + directory.getName();
- IRemoteFile compressedFolder = targetFS.getRemoteFileObject(compressedFolderPath);
-
- // extract the compressed folder from the temp archive on remote
- targetFS.copy(compressedFolder, newTargetParent, newTargetFolder.getName(), monitor);
-
- // delete the temp remote archive
- targetFS.delete(remoteArchive, monitor);
-
- monitor.done();
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- if (newPath == null) cleanup(destinationArchive, null);
- else cleanup(destinationArchive, new File(newPath));
- throw e;
- }
- if (newPath == null) cleanup(destinationArchive, null);
- else cleanup(destinationArchive, new File(newPath));
- }
-
- protected static void setReadOnly(IFile file, boolean flag)
- {
- ResourceAttributes attrs = file.getResourceAttributes();
- attrs.setReadOnly(flag);
- try
- {
- file.setResourceAttributes(attrs);
- }
- catch (CoreException e)
- {
- }
- }
- public static void transferProperties(IResource source, IRemoteFile target, IProgressMonitor monitor) throws CoreException, RemoteFileSecurityException, RemoteFileIOException, SystemMessageException
- {
- if (monitor.isCanceled()) return;
- if (source instanceof IFile)
- {
- SystemIFileProperties properties = new SystemIFileProperties(source);
- target.getParentRemoteFileSubSystem().setLastModified(target, properties.getRemoteFileTimeStamp());
- }
- else if (source instanceof IContainer)
- {
- source.refreshLocal(IResource.DEPTH_ONE, null);
- IResource[] children = ((IContainer)source).members();
- for (int i = 0; i < children.length; i++)
- {
- if (monitor.isCanceled())
- {
- return;
- }
- else
- {
- IResource child = children[i];
- IRemoteFile newtarget = target.getParentRemoteFileSubSystem().getRemoteFileObject(target, child.getName());
- if (!newtarget.exists()) return;
- transferProperties(child, newtarget, monitor);
- }
- }
- }
- }
-
- protected static String getArchiveExtensionFromProperties()
- {
-
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- String archiveType = store.getString(ISystemPreferencesConstants.SUPERTRANSFER_ARC_TYPE);
- if (archiveType == null || !ArchiveHandlerManager.getInstance().isRegisteredArchive("test." + archiveType)) //$NON-NLS-1$
- {
- archiveType = ".zip"; //$NON-NLS-1$
- }
- else
- {
- archiveType = "." + archiveType; //$NON-NLS-1$
- }
- //String archiveType = ".zip";
- return archiveType;
- }
-
- public static IResource compressedCopyRemoteResourceToWorkspace(IRemoteFile directory, IProgressMonitor monitor) throws Exception
- {
- if (!directory.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement()) return null;
- IRemoteFile destinationArchive = null;
- IRemoteFile cpdest = null;
- File dest = null;
- IResource targetResource = null;
- FileServiceSubSystem localSS = (FileServiceSubSystem)getLocalFileSubSystem();
- try
- {
- monitor.beginTask(FileResources.RESID_SUPERTRANSFER_PROGMON_MAIN,IProgressMonitor.UNKNOWN);
- monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_CREATE);
- File file = File.createTempFile("supertransfer", getArchiveExtensionFromProperties()); //$NON-NLS-1$
- file.delete();
- String separator = ""; //$NON-NLS-1$
- IRemoteFile destinationParent = directory.getParentRemoteFile();
- if (!destinationParent.getAbsolutePath().endsWith(directory.getSeparator()))
- separator = directory.getSeparator();
-
-
- if (destinationParent.canWrite())
- {
- try
- {
- String destArchPath = destinationParent.getAbsolutePath() + separator + file.getName();
- destinationArchive = directory.getParentRemoteFileSubSystem().getRemoteFileObject(destArchPath);
- if (destinationArchive.exists())
- {
- directory.getParentRemoteFileSubSystem().delete(destinationArchive, monitor);
- }
- directory.getParentRemoteFileSubSystem().createFile(destinationArchive);
- }
- catch (RemoteFileSecurityException e)
- {
- // can't write to this directory
- }
- }
- if (destinationArchive == null)
- {
- String homeFolder = directory.getParentRemoteFileSubSystem().getRemoteFileObject("./").getAbsolutePath(); //$NON-NLS-1$
- String destArchPath = homeFolder + separator + file.getName();
- destinationArchive = directory.getParentRemoteFileSubSystem().getRemoteFileObject(destArchPath);
- if (destinationArchive.exists()) directory.getParentRemoteFileSubSystem().delete(destinationArchive,monitor);
- destinationArchive = directory.getParentRemoteFileSubSystem().createFile(destinationArchive);
- }
-
- targetResource = getTempFileFor(directory);
-
- if (destinationArchive == null)
- {
- return null;
- }
- if (!destinationArchive.isArchive())
- {
- return null;
- }
-
- monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_POPULATE);
- IRemoteFileSubSystem sourceFS = directory.getParentRemoteFileSubSystem();
- IRemoteFile sourceDir = sourceFS.getRemoteFileObject(directory.getAbsolutePath());
-
- // DKM - copy src dir to remote temp archive
- sourceFS.copy(sourceDir, destinationArchive, sourceDir.getName(), monitor);
- destinationArchive.markStale(true);
-
- // reget it so that it's properties (namely "size") are correct
- cpdest = destinationArchive = destinationArchive.getParentRemoteFileSubSystem().getRemoteFileObject(destinationArchive.getAbsolutePath());
-
- monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_TRANSFER);
- String name = destinationArchive.getName();
-
- // DKM - use parent folder as dest
- dest = new File(targetResource.getParent().getLocation().toOSString() + File.separator + name);
- sourceFS.download(cpdest, dest, monitor);
-
-
- ISystemArchiveHandler handler = ArchiveHandlerManager.getInstance().getRegisteredHandler(dest);
- String sourceEncoding = sourceFS.getRemoteEncoding();
-
- VirtualChild[] arcContents = handler.getVirtualChildrenList();
- Display display = Display.getCurrent();
- monitor.beginTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_EXTRACT, arcContents.length);
-
- for (int i = 0; i < arcContents.length; i++)
- {
- if (arcContents[i].isDirectory && handler.getVirtualChildren(arcContents[i].fullName) == null) continue;
- String currentTargetPath = targetResource.getParent().getLocation().toOSString() + localSS.getSeparator() + useLocalSeparator(arcContents[i].fullName);
- IRemoteFile currentTarget = localSS.getRemoteFileObject(currentTargetPath);
- boolean replace = false;
-
- if (currentTarget != null && currentTarget.exists())
- {
- IResource currentTargetResource = SystemBasePlugin.getWorkspaceRoot().getContainerForLocation(new Path(currentTarget.getAbsolutePath()));
- SystemIFileProperties properties = new SystemIFileProperties(currentTargetResource);
-
- if (properties.getRemoteFileTimeStamp() != arcContents[i].getTimeStamp())
- {
- replace = true;
- }
- }
- else
- {
- replace = true;
- }
-
- if (replace)
- {
-
- if (!monitor.isCanceled())
- {
- String currentSourcePath = dest.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + arcContents[i].fullName;
- IRemoteFile currentSource = localSS.getRemoteFileObject(currentSourcePath);
- boolean shouldExtract = currentSource.isFile();
-
- if (!shouldExtract)
- {
- // check for empty dir
- IRemoteFile[] children = localSS.listFiles(currentSource, monitor);
-
- if (children == null || children.length == 0)
- {
- shouldExtract = true;
- }
- }
-
- if (shouldExtract)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXTRACT_PROGRESS);
- msg.makeSubstitution(currentSource.getName());
- monitor.subTask(msg.getLevelOneText());
-
- boolean isText = currentSource.isText();
-
- while (display.readAndDispatch()) {
- //Process everything on event queue
- }
-
- boolean canWrite = true;
- IResource currentTargetResource = SystemBasePlugin.getWorkspaceRoot().getContainerForLocation(new Path(currentTarget.getAbsolutePath()));
- if (currentTargetResource != null && currentTargetResource.exists())
- {
- try
- {
- currentTargetResource.delete(false, monitor);
- }
- catch (Exception e)
- {
- // don't extract this one
- canWrite = false;
- }
- }
-
- if (canWrite)
- {
- localSS.copy(currentSource, currentTarget.getParentRemoteFile(), currentSource.getName(), monitor);
- // FIXME localSS.copyFromArchiveWithEncoding(currentSource, currentTarget.getParentRemoteFile(), currentSource.getName(), sourceEncoding, isText, monitor);
-
- SystemIFileProperties properties = new SystemIFileProperties(currentTargetResource);
- properties.setRemoteFileTimeStamp(arcContents[i].getTimeStamp());
- monitor.worked(1);
- }
- }
- }
- else
- {
- //return null;
- }
- while (display.readAndDispatch()) {
- //Process everything on event queue
- }
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- cleanup(cpdest, dest);
- throw e;
- }
-
- cleanup(cpdest, dest);
- monitor.done();
- return targetResource;
- }
-
- protected static void cleanup(IRemoteFile arc1, File arc2) throws RemoteFileIOException, RemoteFileSecurityException, RemoteFolderNotEmptyException
- {
- if (arc1 != null)
- {
- try
- {
- arc1.getParentRemoteFileSubSystem().delete(arc1, null);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- if (arc2 != null && arc2.exists())
- arc2.delete();
- }
- /**
- *
- */
- protected static String useLocalSeparator(String virtualPath)
- {
- return virtualPath.replace('/', getLocalFileSubSystem().getSeparatorChar());
- }
-
- /**
- * Returns the corresponding temp file location for a remote file or folder
- * @param srcFileOrFolder the remote file or folder
- * @return the local replica location
- */
- public static IResource getTempFileFor(IRemoteFile srcFileOrFolder)
- {
- SystemRemoteEditManager editMgr = SystemRemoteEditManager.getDefault();
- if (!editMgr.doesRemoteEditProjectExist())
- {
- editMgr.getRemoteEditProject();
- }
-
- //char separator = IFileConstants.PATH_SEPARATOR_CHAR_WINDOWS;
- char separator = '/';
- StringBuffer path = new StringBuffer(editMgr.getRemoteEditProjectLocation().makeAbsolute().toOSString());
-
- String actualHost = getActualHostFor(srcFileOrFolder.getParentRemoteFileSubSystem(), srcFileOrFolder.getAbsolutePath());
- path = path.append(separator + actualHost + separator);
-
- String absolutePath = srcFileOrFolder.getAbsolutePath();
- if (srcFileOrFolder.getSystemConnection().getSystemType().equals("Local")) //$NON-NLS-1$
- {
- absolutePath = editMgr.getWorkspacePathFor(actualHost, srcFileOrFolder.getAbsolutePath());
- }
-
- int colonIndex = absolutePath.indexOf(IPath.DEVICE_SEPARATOR);
-
- if (colonIndex != -1)
- {
- if (colonIndex == 0)
- {
- absolutePath = absolutePath.substring(1);
- }
- else if (colonIndex == (absolutePath.length() - 1))
- {
- absolutePath = absolutePath.substring(0, colonIndex);
- }
- else
- {
- absolutePath = absolutePath.substring(0, colonIndex).toLowerCase() + absolutePath.substring(colonIndex + 1);
- }
- }
-
- path = path.append(absolutePath);
- String pathstr = normalizePath(path.toString(), srcFileOrFolder.getParentRemoteFileSubSystem().getSeparatorChar());
-
- IPath workspacePath = getLocalPathObject(pathstr);
-
- IResource result = null;
- if (srcFileOrFolder.isDirectory())
- {
- result = SystemBasePlugin.getWorkspaceRoot().getContainerForLocation(workspacePath);
- }
- else
- {
- result = SystemBasePlugin.getWorkspaceRoot().getFileForLocation(workspacePath);
- }
-
- return result;
- }
-
- protected static String normalizePath(String localpath, char rmtSeparator)
- {
- char localSeparator = File.separatorChar;
- if (localSeparator != rmtSeparator)
- {
- return localpath.replace(rmtSeparator, localSeparator);
- }
- return localpath;
- }
-
- /**
- * Returns the corresponding temp file location for a local file or folder.
- * @param srcFileOrFolder the local file or folder.
- * @return the local replica location.
- */
- public static IResource getTempFileFor(File srcFileOrFolder)
- {
- SystemRemoteEditManager editMgr = SystemRemoteEditManager.getDefault();
- if (!editMgr.doesRemoteEditProjectExist())
- {
- editMgr.getRemoteEditProject();
- }
-
- //char separator = IFileConstants.PATH_SEPARATOR_CHAR_WINDOWS;
- char separator = '/';
- StringBuffer path = new StringBuffer(editMgr.getRemoteEditProjectLocation().makeAbsolute().toOSString());
-
- String actualHost = "LOCALHOST";
- path = path.append(separator + actualHost + separator);
-
- String absolutePath = editMgr.getWorkspacePathFor(actualHost, srcFileOrFolder.getAbsolutePath());
-
- int colonIndex = absolutePath.indexOf(IPath.DEVICE_SEPARATOR);
-
- if (colonIndex != -1)
- {
- if (colonIndex == 0)
- {
- absolutePath = absolutePath.substring(1);
- }
- else if (colonIndex == (absolutePath.length() - 1))
- {
- absolutePath = absolutePath.substring(0, colonIndex);
- }
- else
- {
- absolutePath = absolutePath.substring(0, colonIndex).toLowerCase() + absolutePath.substring(colonIndex + 1);
- }
- }
-
- path = path.append(absolutePath);
- IPath workspacePath = getLocalPathObject(path.toString());
-
- IResource result = null;
- if (srcFileOrFolder.isDirectory())
- {
- result = SystemBasePlugin.getWorkspaceRoot().getContainerForLocation(workspacePath);
- }
- else
- {
- result = SystemBasePlugin.getWorkspaceRoot().getFileForLocation(workspacePath);
- }
-
- return result;
- }
-
-
- private static IPath getLocalPathObject(String localPath)
- {
- IPath actualPath = null;
- IPath expectedPath = new Path(localPath);
-
- IPath rootPath = new Path(_rootPath);
- IContainer container = SystemBasePlugin.getWorkspaceRoot().getContainerForLocation(rootPath);
-
- if (container != null && container.exists())
- {
- IResource lastMatch = null;
- for (int i = rootPath.segmentCount(); i < expectedPath.segmentCount() - 1; i++)
- {
- String expectedFolder = expectedPath.segment(i).toLowerCase();
- IResource match = null;
-
- try
- {
- IResource[] resources = container.members();
-
- for (int r = 0; r < resources.length && match == null; r++)
- {
- IResource resource = resources[r];
- if (resource instanceof IContainer)
- {
- String resName = resource.getName().toLowerCase();
- if (expectedFolder.equals(resName))
- {
- match = resource;
- lastMatch = match;
- }
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- if (match != null)
- {
- container = (IContainer) match;
- }
- else if (lastMatch != null)
- {
- IPath newPath = lastMatch.getLocation();
- while (i < expectedPath.segmentCount())
- {
- newPath = newPath.append(expectedPath.segment(i));
- i++;
- }
-
- return newPath;
- }
- else
- {
- return expectedPath;
- }
- }
-
- String fileName = expectedPath.segment(expectedPath.segmentCount() - 1);
- actualPath = container.getLocation().append(fileName);
- return actualPath;
- }
-
- return expectedPath;
- }
-
-
- public static String getActualHostFor(ISubSystem subsystem, String remotePath)
- {
- String hostname = subsystem.getHost().getHostName();
- if (subsystem != null && subsystem.getHost().getSystemType().equals("Local")) //$NON-NLS-1$
- {
- String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
- return result;
- }
- return hostname;
- }
-
- public static String getActualHostFor(String hostname, String remotePath)
- {
- return SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
- }
-
- private static void refreshResourceInWorkspace(IResource parent)
- {
- if (!parent.exists())
- {
- refreshResourceInWorkspace(parent.getParent());
- }
- else
- {
- try
- {
- parent.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
- catch (Exception e)
- {
- }
- }
- }
-
- protected static boolean isRemoteFileMounted(ISubSystem subsystem, String remotePath)
- {
- String hostname = subsystem.getHost().getHostName();
- if (subsystem != null && subsystem.getHost().getSystemType().equals("Local")) //$NON-NLS-1$
- {
- String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
- if (!result.equals(hostname))
- {
- return true;
- }
- }
- return false;
- }
-
- protected static boolean isRemoteFileMounted(String hostname, String remotePath)
- {
- String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
-
- if (!result.equals(hostname)) {
- return true;
- }
-
- return false;
- }
-
- protected static String getWorkspaceRemotePath(ISubSystem subsystem, String remotePath) {
-
- if (subsystem != null && subsystem.getHost().getSystemType().equals("Local")) {
- return SystemRemoteEditManager.getDefault().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath);
- }
-
- return remotePath;
- }
-
- protected static String getWorkspaceRemotePath(String hostname, String remotePath) {
- return SystemRemoteEditManager.getDefault().getWorkspacePathFor(hostname, remotePath);
- }
-
- protected static RenameStatus checkForCollision(SystemRemoteResourceSet existingFiles, IRemoteFile targetFolder, String oldName, String oldPath)
- {
- String newName = oldName;
-
- IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem();
- IRemoteFile targetFileOrFolder = (IRemoteFile) existingFiles.get(oldPath);
-
- RenameStatus status = new RenameStatus(IStatus.OK, Activator.getDefault().getBundle().getSymbolicName(), IStatus.OK, newName, null);
-
- if (targetFileOrFolder != null && targetFileOrFolder.exists()) {
- RenameRunnable rr = new RenameRunnable(targetFileOrFolder);
- Display.getDefault().syncExec(rr);
- newName = rr.getNewName();
-
- if (newName == null) {
-
- int state = rr.getCancelStatus();
-
- if (state == RenameRunnable.RENAME_DIALOG_CANCELLED_ALL) {
- status = new RenameStatus(IStatus.CANCEL, Activator.getDefault().getBundle().getSymbolicName(), RenameStatus.CANCEL_ALL, "", null);
- }
- else if (state == RenameRunnable.RENAME_DIALOG_CANCELLED) {
- status = new RenameStatus(IStatus.CANCEL, Activator.getDefault().getBundle().getSymbolicName(), IStatus.CANCEL, "", null);
- }
- }
- else {
- status = new RenameStatus(IStatus.OK, Activator.getDefault().getBundle().getSymbolicName(), IStatus.OK, newName, null);
- }
- }
-
-
- return status;
- }
-
- public static class RenameRunnable implements Runnable
- {
- private IRemoteFile _targetFileOrFolder;
- private String _newName;
- private int cancelStatus;
-
- public static int RENAME_DIALOG_NOT_CANCELLED = -1;
- public static int RENAME_DIALOG_CANCELLED = 0;
- public static int RENAME_DIALOG_CANCELLED_ALL = 1;
-
- public RenameRunnable(IRemoteFile targetFileOrFolder)
- {
- _targetFileOrFolder = targetFileOrFolder;
- cancelStatus = RENAME_DIALOG_NOT_CANCELLED;
- }
-
- public void run() {
- ValidatorFileUniqueName validator = null;
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(null, true, _targetFileOrFolder, validator); // true => copy-collision-mode
- dlg.setShowCancelAllButton(true);
-
- dlg.open();
- if (!dlg.wasCancelled() && !dlg.wasCancelledAll())
- _newName = dlg.getNewName();
- else {
- _newName = null;
-
- if (dlg.wasCancelledAll()) {
- cancelStatus = RENAME_DIALOG_CANCELLED_ALL;
- }
- else {
- cancelStatus = RENAME_DIALOG_CANCELLED;
- }
- }
- }
-
- public String getNewName()
- {
- return _newName;
- }
-
- public int getCancelStatus() {
- return cancelStatus;
- }
- }
-
- protected static String checkForCollision(final IRemoteFile targetFolder, String oldName)
- {
- final String[] newName = new String[]{oldName};
-
- try
- {
-
- IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem();
- final IRemoteFile targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName);
-
- //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!
- // we no longer have to set the validator here... the common rename dialog we all now use queries the input
- // object's system view adaptor for its name validator. See getNameValidator in SystemViewRemoteFileAdapter. phil
- runInDisplayThread(new Runnable() {
- public void run() {
- ValidatorFileUniqueName validator = null; // new ValidatorFileUniqueName(shell, targetFolder, srcFileOrFolder.isDirectory());
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(SystemBasePlugin.getActiveWorkbenchShell(), true, targetFileOrFolder, validator); // true => copy-collision-mode
-
- dlg.open();
- if (!dlg.wasCancelled())
- newName[0] = dlg.getNewName();
- else
- newName[0] = null;
- }
- });
- }
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("SystemCopyRemoteFileAction.checkForCollision()", e);
- }
-
- return newName[0];
- }
-
- private static void runInDisplayThread(Runnable runnable) {
- Display display = Display.getCurrent();
- if (display == null)
- display = Display.getDefault();
- if(Thread.currentThread()==display.getThread()) {
- // if we are in the display thread we can call the method directly
- runnable.run();
- } else {
- // we execute it in the Display Thread but we wait for the result...
- display.syncExec(runnable);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemOpenSearchPageAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemOpenSearchPageAction.java
deleted file mode 100644
index f731576d3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemOpenSearchPageAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.search;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-
-public class SystemOpenSearchPageAction implements IWorkbenchWindowActionDelegate {
-
- private IWorkbenchWindow window;
-
- /**
- * Constructor for open remote search page action.
- */
- public SystemOpenSearchPageAction() {
- super();
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- NewSearchUI.openSearchDialog(window, SystemSearchPage.SYSTEM_SEARCH_PAGE_ID);
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-} \ No newline at end of file
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
deleted file mode 100644
index d632fb6b9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchPage.java
+++ /dev/null
@@ -1,1462 +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.files.ui.search;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.DialogPage;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.internal.search.SystemSearchRemoteFolderAction;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.search.SystemSearchUtil;
-import org.eclipse.rse.services.search.HostSearchResultSet;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-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;
-import org.eclipse.rse.ui.view.search.SystemSearchViewPart;
-import org.eclipse.search.ui.ISearchPage;
-import org.eclipse.search.ui.ISearchPageContainer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This class provides the universal search page in the Search.
- */
-public class SystemSearchPage extends DialogPage implements ISearchPage {
-
- public static final String SYSTEM_SEARCH_PAGE_ID = "org.eclipse.rse.files.ui.search.searchPage"; //$NON-NLS-1$
-
- // search utility
- private SystemSearchUtil util;
-
- // search page container
- private ISearchPageContainer container;
-
- // flag to indicate whether showing the dialog for the first time
- private boolean isFirstShow = true;
-
- // search string controls
- private Label stringLabel;
- private Combo stringCombo;
- private Button caseButton;
- private Label stringHintLabel;
- private Button stringRegexButton;
- private boolean initialCaseSensitive;
- private boolean initialStringRegex;
-
- // file name controls
- private Label fileNameLabel;
- private Combo fileNameCombo;
- private Button fileNameBrowseButton;
- private Label fileNameHintLabel;
- private Button fileNameRegexButton;
- private boolean initialFileNameRegex;
-
- // file name editor
- private FileNameEditor fileNameEditor;
-
- // folder name controls
- private Label folderNameLabel;
- private Combo folderNameCombo;
- private Button folderNameBrowseButton;
-
- // folder name editor
- private FolderNameEditor folderNameEditor;
-
- // advanced controls
- private Button searchArchivesButton;
- private Button searchSubfoldersButton;
- private boolean initialSearchArchives;
- private boolean initialSearchSubfolders;
-
- // constants for storing configuration
- private static final String REMOTE_SEARCH_PAGE_NAME = "RemoteSearchPage"; //$NON-NLS-1$
- private static final String STORE_CONFIG_CASE_SENSITIVE = "caseSensitive"; //$NON-NLS-1$
- private static final String STORE_CONFIG_STRING_REGEX = "stringRegex"; //$NON-NLS-1$
- private static final String STORE_CONFIG_FILENAME_REGEX = "fileNameRegex"; //$NON-NLS-1$
- private static final String STORE_CONFIG_INCLUDE_ARCHIVES = "includeArchives"; //$NON-NLS-1$
- private static final String STORE_CONFIG_INCLUDE_SUBFOLDERS = "includeSubfolders"; //$NON-NLS-1$
-
- private static final String STORE_CONFIG_DATA_SIZE = "dataSize"; //$NON-NLS-1$
-
- // constants for storing data
- private static final String STORE_DATA_PREFIX = REMOTE_SEARCH_PAGE_NAME + ".data"; //$NON-NLS-1$
- private static final String STORE_DATA_SEARCH_STRING = "searchString"; //$NON-NLS-1$
- private static final String STORE_DATA_CASE_SENSITIVE = "caseSensitive"; //$NON-NLS-1$
- private static final String STORE_DATA_STRING_REGEX = "stringRegex"; //$NON-NLS-1$
- private static final String STORE_DATA_FILE_NAMES = "fileNames"; //$NON-NLS-1$
- private static final String STORE_DATA_FILE_NAME_REGEX = "fileNameRegex"; //$NON-NLS-1$
- private static final String STORE_DATA_PROFILE_NAME = "profileName"; //$NON-NLS-1$
- private static final String STORE_DATA_CONNECTION_NAME = "connectionName"; //$NON-NLS-1$
- private static final String STORE_DATA_FOLDER_NAME = "folderName"; //$NON-NLS-1$
- private static final String STORE_DATA_INCLUDE_ARCHIVES = "includeArchives"; //$NON-NLS-1$
- private static final String STORE_DATA_INCLUDE_SUBFOLDERS = "includeSubfolders"; //$NON-NLS-1$
-
- // a list to hold previous searche data
- private List previousSearchData = new ArrayList();
-
- // maximum size of data list
- private static final int MAX_DATA_SIZE = 20;
-
- // inner class to hold search data
- private class RemoteSearchData {
-
- private String searchString;
- private boolean caseSensitive;
- private boolean stringRegex;
- private String fileNames;
- private boolean fileNameRegex;
- private String profileName;
- private String connectionName;
- private String folderName;
- private boolean includeArchives;
- private boolean includeSubfolders;
-
- /**
- * Constructor for search data.
- * @param searchString the search string.
- * @param caseSensitive <code>true</code> if case sensitive, <code>false</code> otherwise.
- * @param stringRegex <code>true</code> if search string is a regular expression, <code>false</code> otherwise.
- * @param fileNames set of file names.
- * @param fileNameRegex <code>true</code> if the file name is a regular expression, <code>false</code> otherwise.
- * @param profileName the profile name.
- * @param connectionName the connection name.
- * @param folderName the folder name.
- * @param includeArchives <code>true</code> if archives should also be searched, <code>false</code> otherwise.
- * @param includeSubfolders <code>true</code> if subfolders should also be searched, <code>false</code> otherwise.
- */
- private RemoteSearchData(String searchString, boolean caseSensitive, boolean stringRegex,
- String fileNames, boolean fileNameRegex, String profileName, String connectionName,
- String folderName, boolean includeArchives, boolean includeSubfolders) {
- this.searchString = searchString;
- this.caseSensitive = caseSensitive;
- this.stringRegex = stringRegex;
- this.fileNames = fileNames;
- this.fileNameRegex = fileNameRegex;
- this.profileName = profileName;
- this.connectionName = connectionName;
- this.folderName = folderName;
- this.includeArchives = includeArchives;
- this.includeSubfolders = includeSubfolders;
- }
- }
-
- // abstract inner class for handling a combo and browse button combination
- abstract private class CommonEditor extends SelectionAdapter implements DisposeListener {
-
- protected Combo nameCombo;
- protected Button browseButton;
-
- /**
- * Constructor for editor.
- * @param nameCombo the combo.
- * @param browseButton the browse button.
- */
- private CommonEditor(Combo nameCombo, Button browseButton) {
- this.nameCombo = nameCombo;
- this.browseButton = browseButton;
-
- // add dispose listeners to both the combo and the button
- // we make them null when they are disposed for cleanup to occur
- nameCombo.addDisposeListener(this);
- browseButton.addDisposeListener(this);
-
- // add selection listener to the browse button
- browseButton.addSelectionListener(this);
- }
-
- /**
- * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
- */
- public void widgetDisposed(DisposeEvent e) {
-
- if (e.widget == nameCombo) {
- nameCombo = null;
- }
- else if (e.widget == browseButton) {
- browseButton = null;
- }
- }
-
- /**
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
-
- if (e.widget == browseButton) {
- handleBrowseSelected();
- }
- }
-
- protected abstract void handleBrowseSelected();
- }
-
- // inner class to handle file name editing
- private class FileNameEditor extends CommonEditor {
-
- /**
- * Constructor for folder name editor.
- * @param fileCombo the file combo.
- * @param browseButton the file types browse button.
- */
- private FileNameEditor(Combo fileCombo, Button browseButton) {
- super(fileCombo, browseButton);
- }
-
- /**
- * @see org.eclipse.rse.files.ui.search.SystemSearchPage.CommonEditor#handleBrowseSelected()
- */
- protected void handleBrowseSelected() {
-
- // get the shell from the page
- Shell shell = SystemSearchPage.this.getShell();
-
- // create select file types action that opens the select file types dialog
- SystemSearchSelectFileTypesAction action = new SystemSearchSelectFileTypesAction(shell);
-
- // get current types list from the combo
- List prevTypes = util.typesStringToList(getFileNamesText());
-
- // set the preselection of the select file types dialog to the current list of types in the combo
- action.setTypes(prevTypes);
-
- // run the action
- action.run();
-
- // if the user did not cancel from the dialog
- if (!action.wasCancelled()) {
-
- // get the types the user chose in the dialog
- List newTypes = action.getTypes();
-
- // set the combo to have the new types
- setFileNamesText(util.typesListToString(newTypes));
- }
- }
-
- /**
- * Sets the file names text.
- * @param fileNames the file names string.
- */
- private void setFileNamesText(String fileNames) {
- nameCombo.setText(fileNames);
- }
-
- /**
- * Gets the text in the file names combo.
- * @return the file names text.
- */
- private String getFileNamesText() {
- return nameCombo.getText();
- }
- }
-
- // inner class to handle folder name editing
- private class FolderNameEditor extends CommonEditor {
-
- // holds info for each item in the folder combo
- private class Info {
- private String profileName;
- private String connectionName;
- private String folderPath;
-
- private Info(String profileName, String connectionName, String folderPath) {
- this.profileName = profileName;
- this.connectionName = connectionName;
- this.folderPath = folderPath;
- }
- }
-
- // the current info
- // TODO: needs to go when we show profile name in the folder combo
- private Info currInfo;
-
- /**
- * Constructor for folder name editor.
- * @param folderCombo the folder name combo.
- * @param browseButton the folder browse button.
- */
- private FolderNameEditor(Combo folderCombo, Button browseButton) {
- super(folderCombo, browseButton);
-
- // add selection listener to the folder combo
- folderCombo.addSelectionListener(this);
- }
-
- /**
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
-
- // if the selected widget is the browse button, let the super class handle it
- if (e.widget == browseButton) {
- super.widgetSelected(e);
- }
- // otherwise if the selected widget is the folder combo, then get the selection index
- // and get the data associated with that index
- // TODO: needs to go when we show profile name in the folder combo
- else if (e.widget == nameCombo){
- int selectionIndex = nameCombo.getSelectionIndex();
- currInfo = getInfo(selectionIndex);
- }
- else {
- super.widgetSelected(e);
- }
- }
-
- /**
- * @see org.eclipse.rse.files.ui.search.SystemSearchPage.CommonEditor#handleBrowseSelected()
- */
- protected void handleBrowseSelected() {
-
- // get the shell from the page
- Shell shell = SystemSearchPage.this.getShell();
-
- // create select folder action which opens the select folder dialog
- SystemSearchRemoteFolderAction selectFolderAction = new SystemSearchRemoteFolderAction(shell);
- selectFolderAction.setShowNewConnectionPrompt(true);
- selectFolderAction.setShowPropertySheet(true, false);
- selectFolderAction.setNeedsProgressMonitor(true);
- selectFolderAction.setMultipleSelectionMode(false);
-
- // run the action
- selectFolderAction.run();
-
- // if the user did not cancel out of the dialog
- if (!selectFolderAction.wasCancelled()) {
- // store remote path
- IRemoteFile remoteFile = selectFolderAction.getSelectedFolder();
- String folderPath = remoteFile.getAbsolutePath();
-
- // store connection and profile
- IHost conn = selectFolderAction.getSelectedConnection();
- String profileName = conn.getSystemProfileName();
- String connectionName = conn.getAliasName();
-
- setFolderText(profileName, connectionName, folderPath);
- }
- }
-
- /**
- * Sets the folder name combo text. Also sets the profile name, connection name and folder path.
- * @param profileName the profile name.
- */
- private void setFolderText(String profileName, String connectionName, String folderPath) {
-
- String text = getFormattedText(profileName, connectionName, folderPath);
-
- // get existing items in the combo
- String[] currItems = nameCombo.getItems();
- int selectionIndex = -1;
- boolean matchFound = false;
-
- // see if one of the entries match
- for (int i = 0; i < currItems.length; i++) {
-
- if (currItems[i].equals(text)) {
- selectionIndex = i;
- matchFound = true;
- break;
- }
- }
-
- // if no matches found, we add our text to the end of the list of items in the combo and select it
- // note that we can't simply call setText() because this is a read-only combo
- if (!matchFound) {
- int oldLength = currItems.length;
- String[] newItems = new String[oldLength + 1];
- System.arraycopy(currItems, 0, newItems, 0, currItems.length);
- newItems[oldLength] = text;
- nameCombo.setItems(newItems);
- selectionIndex = oldLength;
-
- // TODO: needs to go when we show profile name in the folder combo
- addData(selectionIndex, profileName, connectionName, folderPath);
- }
-
- // select from the current index
- nameCombo.select(selectionIndex);
-
- currInfo = getInfo(selectionIndex);
- }
-
- /**
- * Convert to text.
- * @return the string representation.
- */
- private String getFormattedText(String profileName, String connectionName, String folderPath) {
- // TODO: prefix with profile name after checking preference ??
- // then we will no longer need to store data in the combo, which is a very inelegant solution
- // we can simply parse whatever comes out of getText() and get profile name, connection name
- // and folder path
- return connectionName + ":" + folderPath; //$NON-NLS-1$
- }
-
- /**
- * Add data.
- * @param index the index for which this data applies.
- * @param profileName the profile name.
- * @param connectionName the connection name.
- * @param folderPath the folder path.
- */
- private void addData(int index, String profileName, String connectionName, String folderPath) {
- Info info = new Info(profileName, connectionName, folderPath);
- nameCombo.setData(String.valueOf(index), info);
- }
-
- /**
- * Gets the info for a given index.
- * @param index the index.
- * @return the info for the index.
- */
- private Info getInfo(int index) {
- return (Info)(nameCombo.getData(String.valueOf(index)));
- }
-
- /**
- * Returns the profile name.
- * @return the profile name, or <code>null</code> if none specified.
- */
- private String getProfileName() {
- return currInfo.profileName;
- }
-
- /**
- * Returns the connection name.
- * @return the connection name, or <code>null</code> if none specified.
- */
- private String getConnectionName() {
- return currInfo.connectionName;
- }
-
- /**
- * Returns the folder path.
- * @return the folder path, or <code>null</code> if none specified.
- */
- private String getFolderPath() {
- return currInfo.folderPath;
- }
- }
-
- /**
- * This contructor instantiates a remote search page.
- */
- public SystemSearchPage() {
- super();
- this.util = SystemSearchUtil.getInstance();
- }
-
- /**
- * Gets the search data from current state of the dialog. If the search string matches a previous
- * search data search string, then that data is deleted and replaced with the new data.
- * @return the search data corresponding to the current state of the dialog.
- */
- private RemoteSearchData getSearchData() {
- RemoteSearchData data = null;
- String searchString = stringCombo.getText();
-
- int i = previousSearchData.size() - 1;
-
- boolean matchFound = false;
-
- // go through stored search data, and see if one has the search string
- // matching our current search string
- while (i >= 0) {
- data = (RemoteSearchData)previousSearchData.get(i);
-
- if (searchString.equals(data.searchString)) {
- matchFound = true;
- break;
- }
-
- i--;
- }
-
- // if a match has been found, modify its properties
- if (matchFound) {
- data.searchString = searchString;
- data.caseSensitive = caseButton.getSelection();
- data.stringRegex = stringRegexButton.getSelection();
- data.fileNames = getFileNames();
- data.fileNameRegex = fileNameRegexButton.getSelection();
- data.profileName = getProfileName();
- data.connectionName = getConnectionName();
- data.folderName = getFolderName();
- data.includeArchives = searchArchivesButton.getSelection();
- data.includeSubfolders = searchSubfoldersButton.getSelection();
-
- // remove data from the list because it will be later added
- // we want to basically move the data to the end of the list
- previousSearchData.remove(data);
- }
- // otherwise create new data
- else {
- data = new RemoteSearchData(searchString, caseButton.getSelection(), stringRegexButton.getSelection(),
- getFileNames(), fileNameRegexButton.getSelection(), getProfileName(), getConnectionName(),
- getFolderName(), searchArchivesButton.getSelection(), searchSubfoldersButton.getSelection());
- }
-
- // if the data size is the maximum size allowable,
- // remove the first entry from the list
- if (previousSearchData.size() == MAX_DATA_SIZE) {
- previousSearchData.remove(0);
- }
-
- // now add the data to the data list
- previousSearchData.add(data);
-
- return data;
- }
-
- /**
- * Gets the file names string.
- * @return the file names string.
- */
- private String getFileNames() {
- return fileNameEditor.getFileNamesText();
- }
-
- /**
- * Gets the profile name from the folder selection.
- * @return the profile name.
- */
- private String getProfileName() {
- return folderNameEditor.getProfileName();
- }
-
- /**
- * Gets the connection name from the folder selection.
- * @return the connection name.
- */
- private String getConnectionName() {
- return folderNameEditor.getConnectionName();
- }
-
- /**
- * Gets the folder name from the folder selection.
- * @return the folder name.
- */
- private String getFolderName() {
- return folderNameEditor.getFolderPath();
- }
-
- /**
- * @see org.eclipse.search.ui.ISearchPage#performAction()
- */
- public boolean performAction() {
-
- // if the string is a regex, check that the regular expression is valid
- // if not show error and return false
- if (stringRegexButton.getSelection()) {
- String searchString = stringCombo.getText();
-
- if (searchString != null && searchString.length() != 0) {
-
- if (!util.isValidRegex(searchString)) {
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_REMOTE_SEARCH_INVALID_REGEX);
- message.makeSubstitution(searchString);
- SystemMessageDialog.displayErrorMessage(getShell(), message);
- stringCombo.setFocus();
- return false;
- }
- }
- }
-
- // if the file name is a regex, check that the regular expression is valid
- // if not show error and return false
- if (fileNameRegexButton.getSelection()) {
- String fileNameString = fileNameEditor.getFileNamesText();
-
- if (fileNameString != null && fileNameString.length() != 0) {
-
- if (!util.isValidRegex(fileNameString)) {
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_REMOTE_SEARCH_INVALID_REGEX);
- message.makeSubstitution(fileNameString);
- SystemMessageDialog.displayErrorMessage(getShell(), message);
- fileNameCombo.setFocus();
- return false;
- }
- }
- }
-
- // get the data corresponding to the current dialog state
- RemoteSearchData data = getSearchData();
-
- SystemSearchString searchString = new SystemSearchString(data.searchString, data.caseSensitive, data.stringRegex, data.fileNames, data.fileNameRegex, data.includeArchives, data.includeSubfolders);
-
- IRemoteFileSubSystem subsys = getRemoteFileSubSystem(data.profileName, data.connectionName);
-
- if (subsys == null) {
- return false;
- }
-
- IRemoteFile remoteFile;
-
- try {
- remoteFile = subsys.getRemoteFileObject(data.folderName);
- }
- catch (SystemMessageException e) {
- // TODO: show error
- SystemBasePlugin.logError("Error occured trying to get remote file object", e);
- return false;
- }
-
-
-
-
- // create a search result set to contain all the results
- IHostSearchResultSet set = new HostSearchResultSet();
-
- if (subsys instanceof FileServiceSubSystem)
- {
-
-
- // set the name
- String name = remoteFile.getAbsolutePath() + " - " + searchString.getFileNamesString() + "(" + searchString.getTextString() + ")";
- set.setName(name);
-
- FileServiceSubSystem ss = (FileServiceSubSystem)subsys;
- IHostSearchResultConfiguration config = ss.createSearchConfiguration(set, remoteFile, searchString);
-
- // show results in remote search view
- showInView(set);
-
- // kick off the search
- ss.search(config);
-
- // save the configuration
- writeConfiguration();
-
- // finally save the data
- writeData();
- }
-
-
-
-
- return true;
- }
-
- /**
- * Show the search results in the remote search view.
- * @param resultSet the search result set.
- */
- private void showInView(IHostSearchResultSet resultSet)
- {
- SystemSearchUI searchUI = SystemSearchUI.getInstance();
- SystemSearchViewPart searchPart = searchUI.activateSearchResultView();
- searchPart.addSearchResult((IAdaptable)resultSet);
- }
-
-
-
- /**
- * @see org.eclipse.search.ui.ISearchPage#setContainer(org.eclipse.search.ui.ISearchPageContainer)
- */
- public void setContainer(ISearchPageContainer container) {
- this.container = container;
- }
-
- /**
- * @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
-
- // if we are to become visible
- if (visible) {
-
- // if it is the very first time, then set the items for the string combo and file name combo
- // and initialize from selection
- if (isFirstShow) {
- isFirstShow = false;
-
- // read in the data
- readData();
-
- // we set items and text here, rather than during createControl() to prevent page from resizing
- setPreviousSearchStrings();
- setPreviousFileNames();
- setPreviousFolderNames();
- initialize();
- }
-
- // set focus to the string combo every time we become visible
- stringCombo.setFocus();
-
- // indicate whether search is allowed
- container.setPerformActionEnabled(isValid());
- }
-
- super.setVisible(visible);
- }
-
- /**
- * Obtains the search strings from previous search data and adds them to the search string combo.
- */
- private void setPreviousSearchStrings() {
- int size = previousSearchData.size();
-
- // array to hold previous search strings
- String[] searchStrings = new String[size];
-
- for (int i = 0; i < size; i++) {
- searchStrings[i] = ((RemoteSearchData)previousSearchData.get(size - 1 - i)).searchString;
- }
-
- stringCombo.setItems(searchStrings);
- }
-
- /**
- * Obtains the file name strings from previous search data and adds them to the file name combo.
- */
- private void setPreviousFileNames() {
- int size = previousSearchData.size();
-
- // list to hold type strings
- List typesStringList = new ArrayList(size);
-
- // go through the search data starting from the end
- for (int i = size - 1; i >= 0; i--) {
- RemoteSearchData data = (RemoteSearchData)previousSearchData.get(i);
-
- // now get the types string representing the list of types in the data
- String typeString = data.fileNames;
-
- // check if we already have this types string in the types string list
- // if not, add it
- if (!typesStringList.contains(typeString)) {
- typesStringList.add(typeString);
- }
- }
-
- String[] typesStringArray = (String[])typesStringList.toArray(new String[typesStringList.size()]);
-
- fileNameCombo.setItems(typesStringArray);
- }
-
- /**
- * Obtains the folder name strings from previous search data and adds them to the folder name combo.
- */
- private void setPreviousFolderNames() {
- int size = previousSearchData.size();
-
- // list to hold folder names
- List folderNamesList = new ArrayList(size);
-
- int j = 0;
-
- // go through the search data starting from the end
- for (int i = size - 1; i >= 0; i--) {
- RemoteSearchData data = (RemoteSearchData)previousSearchData.get(i);
-
- // get the string from the folder name editor
- String folderNameString = folderNameEditor.getFormattedText(data.profileName, data.connectionName, data.folderName);
-
- if (!folderNamesList.contains(folderNameString)) {
- folderNamesList.add(folderNameString);
-
- // add combo data
- // TODO: needs to go when we show profile name in the folder name combo
- folderNameEditor.addData(j, data.profileName, data.connectionName, data.folderName);
- j++;
- }
- }
-
- String[] folderNamesArray = (String[])folderNamesList.toArray(new String[folderNamesList.size()]);
-
- folderNameCombo.setItems(folderNamesArray);
- }
-
- /**
- * Initializes the dialog.
- */
- private void initialize() {
-
- ISelection selection = container.getSelection();
-
- String text = null;
- String fileName = null;
- String profileName = null;
- String connectionName = null;
- String folderName = null;
-
- // if selection is not empty, we handle structured selection or text selection
- if (selection != null && !selection.isEmpty()) {
-
- // if it is a structured selection
- if (selection instanceof IStructuredSelection) {
- Object obj = ((IStructuredSelection)selection).getFirstElement();
-
- // check if it is a remote file
- if (obj instanceof IRemoteFile) {
-
- IRemoteFile remoteFile = (IRemoteFile)obj;
- boolean supportsArchiveManagement = remoteFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
-
- // if it's a file, but not an archive, get the file name, connection info, and parent folder name
- if (remoteFile.isFile() && (!remoteFile.isArchive() && !supportsArchiveManagement)) {
- fileName = remoteFile.getName();
- IHost conn = remoteFile.getSystemConnection();
- profileName = conn.getSystemProfileName();
- connectionName = conn.getAliasName();
- folderName = remoteFile.getParentPath();
- }
- // otherwise if it's a folder or an arvhive, get the connection info and the name
- else if (remoteFile.isDirectory() || (remoteFile.isArchive() && supportsArchiveManagement)) {
- IHost conn = remoteFile.getSystemConnection();
- profileName = conn.getSystemProfileName();
- connectionName = conn.getAliasName();
- folderName = remoteFile.getAbsolutePath();
- }
- }
- }
- // otherwise, if it is a text selection
- else if (selection instanceof ITextSelection) {
- ITextSelection textSelection = (ITextSelection)selection;
- text = textSelection.getText();
- }
- }
-
- // if text is null, then make it "*"
- if (text == null || text.equals("")) { //$NON-NLS-1$
- text = "*"; //$NON-NLS-1$
- }
- // otherwise, make sure to escape the special characters so that we actually search for the
- // string with the special characters
- else {
- text = insertEscapeChar(text);
- }
-
- stringCombo.setText(text);
-
- // if the file name is still null, set it to "*"
- if (fileName == null) {
- fileName = "*"; //$NON-NLS-1$
- }
-
- // set the file name
- fileNameEditor.setFileNamesText(fileName);
-
- // set the remote folder combo properties if profile name, connection name and folder path are
- // not null
- if (profileName != null && connectionName != null && folderName != null) {
- folderNameEditor.setFolderText(profileName, connectionName, folderName);
- }
- }
-
- /**
- * Inserts escape character '\' for literals '*', '?' and '\\'.
- * @param text the text.
- * @return the text with the escape character inserted as needed, or "" if the given text is <code>null</code>,
- * or an error occurs.
- */
- private String insertEscapeChar(String text) {
-
- if (text == null || text.equals("")) { //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
-
- StringBuffer sbIn = new StringBuffer(text);
- BufferedReader reader = new BufferedReader(new StringReader(text));
- int lengthOfFirstLine = 0;
-
- try {
- lengthOfFirstLine = reader.readLine().length();
- }
- catch (IOException ex) {
- return ""; //$NON-NLS-1$
- }
-
- StringBuffer sbOut = new StringBuffer(lengthOfFirstLine + 5);
- int i = 0;
-
- while (i < lengthOfFirstLine) {
- char ch = sbIn.charAt(i);
-
- if (ch == '*' || ch == '?' || ch == '\\') {
- sbOut.append("\\"); //$NON-NLS-1$
- }
-
- sbOut.append(ch);
-
- i = i + 1;
- }
-
- return sbOut.toString();
- }
-
- /**
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
-
- // compute horizontal and vertical units
- initializeDialogUnits(parent);
-
- // read configuration
- readConfiguration();
-
- // main composite
- Composite main = new Composite(parent, SWT.NONE);
- GridLayout mainLayout = new GridLayout(3, false);
- mainLayout.horizontalSpacing = 10;
- main.setLayout(mainLayout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- gd.horizontalSpan = 3;
- main.setLayoutData(gd);
-
- // create controls for search string
- createSearchStringControls(main);
-
- // create controls for file name
- createFileNameControls(main);
-
- // create controls for folder
- createFolderControls(main);
-
- // create advanced options controls
- createAdvancedControls(main);
-
- // set mnemonics
- SystemWidgetHelpers.setMnemonics(parent);
-
- // set the top level control
- setControl(main);
-
- // set help
- SystemWidgetHelpers.setHelp(main, RSEUIPlugin.HELPPREFIX + "rsdi0000"); //$NON-NLS-1$
- }
-
- /**
- * Creates controls for users to specify the search string.
- * @param comp the parent composite.
- */
- private void createSearchStringControls(Composite comp) {
-
- // label introducing string combo
- stringLabel = new Label(comp, SWT.LEFT);
- stringLabel.setText(FileResources.RESID_SEARCH_STRING_LABEL_LABEL);
- stringLabel.setToolTipText(FileResources.RESID_SEARCH_STRING_LABEL_TOOLTIP);
-
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- stringLabel.setLayoutData(gd);
-
- // string combo
- stringCombo = new Combo(comp, SWT.SINGLE | SWT.BORDER);
- stringCombo.setToolTipText(FileResources.RESID_SEARCH_STRING_COMBO_TOOLTIP);
-
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- stringCombo.setLayoutData(gd);
-
- stringCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- container.setPerformActionEnabled(isValid());
- }
- });
-
- stringCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleStringComboSelected();
- }
- });
-
- // checkbox for case sensitive
- caseButton = new Button(comp, SWT.CHECK);
- caseButton.setText(FileResources.RESID_SEARCH_CASE_BUTTON_LABEL);
- caseButton.setToolTipText(FileResources.RESID_SEARCH_CASE_BUTTON_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- caseButton.setLayoutData(gd);
- caseButton.setSelection(initialCaseSensitive);
-
- // label explaining special characters
- stringHintLabel = new Label(comp, SWT.LEFT);
- stringHintLabel.setText(FileResources.RESID_SEARCH_STRING_HINT_LABEL);
- stringHintLabel.setToolTipText(FileResources.RESID_SEARCH_STRING_HINT_TOOLTIP);
-
- gd = new GridData(GridData.BEGINNING);
- gd.horizontalSpan = 2;
- stringHintLabel.setLayoutData(gd);
-
- // checkbox for regex
- stringRegexButton = new Button(comp, SWT.CHECK);
- stringRegexButton.setText(FileResources.RESID_SEARCH_STRING_REGEX_LABEL);
- stringRegexButton.setToolTipText(FileResources.RESID_SEARCH_STRING_REGEX_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- stringRegexButton.setLayoutData(gd);
- stringRegexButton.setSelection(initialStringRegex);
- stringHintLabel.setVisible(!stringRegexButton.getSelection());
-
- stringRegexButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- stringHintLabel.setVisible(!stringRegexButton.getSelection());
- }
- });
- }
-
- /**
- * Handles selection of an item from the string combo. Sets the dialog state for the
- * selection data corrsponding to the search string selection.
- */
- private void handleStringComboSelected() {
-
- if (stringCombo.getSelectionIndex() < 0) {
- return;
- }
-
- int index = previousSearchData.size() - 1 - stringCombo.getSelectionIndex();
-
- RemoteSearchData data = (RemoteSearchData)previousSearchData.get(index);
-
- if (data == null || !stringCombo.getText().equals(data.searchString)) {
- return;
- }
-
- // set search string properties
- stringCombo.setText(data.searchString);
-
- // set case sensitive
- caseButton.setSelection(data.caseSensitive);
-
- // set string regex
- stringHintLabel.setVisible(!data.stringRegex);
- stringRegexButton.setSelection(data.stringRegex);
-
- // set types list
- fileNameEditor.setFileNamesText(data.fileNames);
-
- // set file name regex
- fileNameHintLabel.setVisible(!data.fileNameRegex);
- fileNameRegexButton.setSelection(data.fileNameRegex);
-
- // set the remote folder properties
- folderNameEditor.setFolderText(data.profileName, data.connectionName, data.folderName);
-
- // set search archive
- searchArchivesButton.setSelection(data.includeArchives);
-
- // set search subfolders
- searchSubfoldersButton.setSelection(data.includeSubfolders);
- }
-
- /**
- * Gets the remote file subsystem for the given profile name and connection name.
- * @return the remote file subsystem, or <code>null</code> if the profile or connection does not exist.
- */
- private IRemoteFileSubSystem getRemoteFileSubSystem(String profName, String connName) {
-
- if (profName == null || connName == null) {
- return null;
- }
- else {
- ISystemRegistry reg = RSEUIPlugin.getTheSystemRegistry();
- ISystemProfile profile = reg.getSystemProfile(profName);
-
- if (profile == null) {
- return null;
- }
-
- IHost conn = reg.getHost(profile, connName);
-
- if (conn == null) {
- return null;
- }
-
- return RemoteFileUtility.getFileSubSystem(conn);
- }
- }
-
- /**
- * Creates controls to specify file name.
- * @param comp the parent composite.
- */
- private void createFileNameControls(Composite comp) {
-
- // label introducing file name combo
- fileNameLabel = new Label(comp, SWT.LEFT);
- fileNameLabel.setText(FileResources.RESID_SEARCH_FILENAME_LABEL_LABEL);
- fileNameLabel.setToolTipText(FileResources.RESID_SEARCH_FILENAME_LABEL_TOOLTIP);
-
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- fileNameLabel.setLayoutData(gd);
-
- // file name combo
- fileNameCombo = new Combo(comp, SWT.SINGLE | SWT.BORDER);
- fileNameCombo.setToolTipText(FileResources.RESID_SEARCH_FILENAME_COMBO_TOOLTIP);
-
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- fileNameCombo.setLayoutData(gd);
-
- fileNameCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- container.setPerformActionEnabled(isValid());
- }
- });
-
- // browse types button
- fileNameBrowseButton = new Button(comp, SWT.PUSH);
- fileNameBrowseButton.setText(FileResources.RESID_SEARCH_FILENAME_BROWSE_LABEL);
- fileNameBrowseButton.setToolTipText(FileResources.RESID_SEARCH_FILENAME_BROWSE_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- fileNameBrowseButton.setLayoutData(gd);
-
- // create the file name editor
- fileNameEditor = new FileNameEditor(fileNameCombo, fileNameBrowseButton);
-
- // label explaining special characters
- fileNameHintLabel = new Label(comp, SWT.LEFT);
- fileNameHintLabel.setText(FileResources.RESID_SEARCH_FILENAME_HINT_LABEL);
- fileNameHintLabel.setToolTipText(FileResources.RESID_SEARCH_FILENAME_HINT_TOOLTIP);
-
- gd = new GridData(GridData.BEGINNING);
- gd.horizontalSpan = 2;
- fileNameHintLabel.setLayoutData(gd);
-
- // checkbox for regex
- fileNameRegexButton = new Button(comp, SWT.CHECK);
- fileNameRegexButton.setText(FileResources.RESID_SEARCH_FILENAME_REGEX_LABEL);
- fileNameRegexButton.setToolTipText(FileResources.RESID_SEARCH_FILENAME_REGEX_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- fileNameRegexButton.setLayoutData(gd);
- fileNameRegexButton.setSelection(initialFileNameRegex);
- fileNameHintLabel.setVisible(!fileNameRegexButton.getSelection());
-
- fileNameRegexButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- fileNameHintLabel.setVisible(!fileNameRegexButton.getSelection());
- }
- });
- }
-
- /**
- * Creates controls to specify folder name.
- */
- private void createFolderControls(Composite comp) {
-
- // label introducing folder name combo
- folderNameLabel = new Label(comp, SWT.LEFT);
- folderNameLabel.setText(FileResources.RESID_SEARCH_FOLDERNAME_LABEL_LABEL);
- folderNameLabel.setToolTipText(FileResources.RESID_SEARCH_FOLDERNAME_LABEL_TOOLTIP);
-
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- folderNameLabel.setLayoutData(gd);
-
- // folder name combo
- folderNameCombo = new Combo(comp, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- folderNameCombo.setToolTipText(FileResources.RESID_SEARCH_FOLDERNAME_COMBO_TOOLTIP);
-
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- folderNameCombo.setLayoutData(gd);
-
- folderNameCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- container.setPerformActionEnabled(isValid());
- }
- });
-
- // browse types button
- folderNameBrowseButton = new Button(comp, SWT.PUSH);
- folderNameBrowseButton.setText(FileResources.RESID_SEARCH_FOLDERNAME_BROWSE_LABEL);
- folderNameBrowseButton.setToolTipText(FileResources.RESID_SEARCH_FOLDERNAME_BROWSE_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- folderNameBrowseButton.setLayoutData(gd);
-
- // create the folder name editor
- folderNameEditor = new FolderNameEditor(folderNameCombo, folderNameBrowseButton);
- }
-
- /**
- * Creates controls for advanced options.
- */
- private void createAdvancedControls(Composite comp) {
-
- // dummy label
- Label dummyLabel = new Label(comp, SWT.LEFT);
-
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- dummyLabel.setLayoutData(gd);
-
- // checkbox for search in archive files
- searchArchivesButton = new Button(comp, SWT.CHECK);
- searchArchivesButton.setText(FileResources.RESID_SEARCH_INCLUDE_ARCHIVES_LABEL);
- searchArchivesButton.setToolTipText(FileResources.RESID_SEARCH_INCLUDE_ARCHIVES_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 1;
- searchArchivesButton.setLayoutData(gd);
-
- searchArchivesButton.setSelection(initialSearchArchives);
-
- // checkbox for search in subfolders
- searchSubfoldersButton = new Button(comp, SWT.CHECK);
- searchSubfoldersButton.setText(FileResources.RESID_SEARCH_INCLUDE_SUBFOLDERS_LABEL);
- searchSubfoldersButton.setToolTipText(FileResources.RESID_SEARCH_INCLUDE_SUBFOLDERS_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 2;
- gd.horizontalIndent = 20;
- searchSubfoldersButton.setLayoutData(gd);
-
- searchSubfoldersButton.setSelection(initialSearchSubfolders);
- }
-
- /**
- * Returns whether the search string, file name and folder name are all valid.
- * @return <code>true</code> if all are valid, <code>false</code> otherwise.
- */
- private boolean isValid() {
-
- // note that we check folder name first for performance reasons (it is most likely to be
- // invalid since we do not allow empty folder name)
- return isFolderNameValid() && isSearchStringValid() && isFileNameValid();
-
- // TODO: error messages!! But are they even visible in the search dialog?
- }
-
- /**
- * Returns whether search string is valid. Note that search string is valid if empty (we assume empty
- * search string is the same as "*");
- * @return <code>true</code> if search string is not <code>null</code>, <code>false</code> otherwise.
- */
- private boolean isSearchStringValid() {
-
- String searchString = stringCombo.getText();
-
- if (searchString == null) {
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * Returns whether file name is valid. Note that file name is valid if empty (we assume empty file
- * name is the same as "*");
- * @return <code>true</code> if file name is not <code>null</code>, <code>false</code> otherwise.
- */
- private boolean isFileNameValid() {
-
- String fileNameString = fileNameCombo.getText();
-
- if (fileNameString == null) {
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * Returns whether folder name is valid.
- * @return <code>true</code> if folder name is not <code>null</code> or empty, <code>false</code> otherwise.
- */
- private boolean isFolderNameValid() {
-
- String folderName = folderNameCombo.getText();
-
- if (folderName == null || folderName.trim().length() == 0) {
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * Get plugin dialog settings.
- * @return the dialog settings of the plugin.
- */
- private IDialogSettings getPluginDialogSettings() {
- return RSEUIPlugin.getDefault().getDialogSettings();
- }
-
- /**
- * Returns the dialog settings for the remote search page.
- * @return the dialog settings used to store search page configuration.
- */
- private IDialogSettings getConfigDialogSettings() {
- IDialogSettings settings = getPluginDialogSettings();
- IDialogSettings dialogSettings = settings.getSection(REMOTE_SEARCH_PAGE_NAME);
-
- if (dialogSettings == null) {
- dialogSettings = settings.addNewSection(REMOTE_SEARCH_PAGE_NAME);
- }
-
- return dialogSettings;
- }
-
- /**
- * Retrieves the configuration from the dialog settings.
- */
- private void readConfiguration() {
- IDialogSettings s = getConfigDialogSettings();
- initialCaseSensitive = s.getBoolean(STORE_CONFIG_CASE_SENSITIVE);
- initialStringRegex = s.getBoolean(STORE_CONFIG_STRING_REGEX);
- initialFileNameRegex = s.getBoolean(STORE_CONFIG_FILENAME_REGEX);
- initialSearchArchives = s.getBoolean(STORE_CONFIG_INCLUDE_ARCHIVES);
- initialSearchSubfolders = s.getBoolean(STORE_CONFIG_INCLUDE_SUBFOLDERS);
- }
-
- /**
- * Stores the current configuration to the dialog settings.
- */
- private void writeConfiguration() {
- IDialogSettings s = getConfigDialogSettings();
- s.put(STORE_CONFIG_CASE_SENSITIVE, caseButton.getSelection());
- s.put(STORE_CONFIG_STRING_REGEX, stringRegexButton.getSelection());
- s.put(STORE_CONFIG_FILENAME_REGEX, fileNameRegexButton.getSelection());
- s.put(STORE_CONFIG_INCLUDE_ARCHIVES, searchArchivesButton.getSelection());
- s.put(STORE_CONFIG_INCLUDE_SUBFOLDERS, searchSubfoldersButton.getSelection());
- }
-
- /**
- * Reads the data.
- */
- private void readData() {
-
- // store the size
- int size = 0;
-
- try {
- size = getConfigDialogSettings().getInt(STORE_CONFIG_DATA_SIZE);
- }
- catch (NumberFormatException e) {
- // if a number format exception occurs, it doesn't mean there is an error
- // it simply means this is the first time the dialog is opened
- size = 0;
- }
-
- if (size > 0) {
- // take the minimum of stored size and the maximum size allowable
- // this is unnecessary, since the stored size should never be
- // more than the maximum size, but we check just in case
- size = Math.min(size, MAX_DATA_SIZE);
- previousSearchData = new ArrayList(size);
- }
-
- for (int i = 0; i < size; i++) {
- IDialogSettings dataSection = getPluginDialogSettings().getSection(STORE_DATA_PREFIX + i);
- String searchString = dataSection.get(STORE_DATA_SEARCH_STRING);
- boolean caseSensitive = dataSection.getBoolean(STORE_DATA_CASE_SENSITIVE);
- boolean stringRegex = dataSection.getBoolean(STORE_DATA_STRING_REGEX);
-
- String fileNamesString = dataSection.get(STORE_DATA_FILE_NAMES);
- boolean fileNameRegex = dataSection.getBoolean(STORE_DATA_FILE_NAME_REGEX);
-
- String profileName = dataSection.get(STORE_DATA_PROFILE_NAME);
- String connectionName = dataSection.get(STORE_DATA_CONNECTION_NAME);
- String folderName = dataSection.get(STORE_DATA_FOLDER_NAME);
-
- boolean searchArchives = dataSection.getBoolean(STORE_DATA_INCLUDE_ARCHIVES);
- boolean searchSubfolders = dataSection.getBoolean(STORE_DATA_INCLUDE_SUBFOLDERS);
-
- RemoteSearchData data = new RemoteSearchData(searchString, caseSensitive, stringRegex, fileNamesString, fileNameRegex, profileName, connectionName, folderName, searchArchives, searchSubfolders);
- previousSearchData.add(data);
- }
- }
-
- /**
- * Writes the data.
- */
- private void writeData() {
-
- // get the size of data
- int size = previousSearchData.size();
-
- // take the minimum of the data size and the maximum size allowable
- // this is unnecessary, since the data size should never be
- // more than the maximum size allowable, but we check just in case
- size = Math.min(size, MAX_DATA_SIZE);
-
- // store the size
- getConfigDialogSettings().put(STORE_CONFIG_DATA_SIZE, size);
-
- IDialogSettings pluginSettings = getPluginDialogSettings();
-
- for (int i = 0; i < size; i++) {
- IDialogSettings dataSection = pluginSettings.getSection(STORE_DATA_PREFIX + i);
-
- if (dataSection == null) {
- dataSection = pluginSettings.addNewSection(STORE_DATA_PREFIX + i);
- }
-
- RemoteSearchData data = (RemoteSearchData)previousSearchData.get(i);
-
- dataSection.put(STORE_DATA_SEARCH_STRING, data.searchString);
- dataSection.put(STORE_DATA_CASE_SENSITIVE, data.caseSensitive);
- dataSection.put(STORE_DATA_STRING_REGEX, data.stringRegex);
-
- dataSection.put(STORE_DATA_FILE_NAMES, data.fileNames);
- dataSection.put(STORE_DATA_FILE_NAME_REGEX, data.fileNameRegex);
-
- dataSection.put(STORE_DATA_PROFILE_NAME, data.profileName);
- dataSection.put(STORE_DATA_CONNECTION_NAME, data.connectionName);
- dataSection.put(STORE_DATA_FOLDER_NAME, data.folderName);
-
- dataSection.put(STORE_DATA_INCLUDE_ARCHIVES, data.includeArchives);
- dataSection.put(STORE_DATA_INCLUDE_SUBFOLDERS, data.includeSubfolders);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchSelectFileTypesAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchSelectFileTypesAction.java
deleted file mode 100644
index ab0bcd46e..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchSelectFileTypesAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.files.ui.search;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.files.ui.actions.SystemSelectFileTypesAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Action to select file types for the search dialog.
- */
-public class SystemSearchSelectFileTypesAction
- extends SystemSelectFileTypesAction {
-
- /**
- * Creates the action.
- * @param shell
- */
- public SystemSearchSelectFileTypesAction(Shell shell) {
- super(shell);
- }
-
-
- /**
- * @see org.eclipse.rse.ui.actions.SystemBaseDialogAction#createDialog(org.eclipse.swt.widgets.Shell)
- */
- public Dialog createDialog(Shell parent) {
- SystemSearchSelectFileTypesDialog dialog = new SystemSearchSelectFileTypesDialog(getShell(), types);
- return dialog;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchSelectFileTypesDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchSelectFileTypesDialog.java
deleted file mode 100644
index 1283a364a..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchSelectFileTypesDialog.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.search;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IFileEditorMapping;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * File types selection dialog for the search page.
- */
-public class SystemSearchSelectFileTypesDialog extends SystemSelectFileTypesDialog {
-
- /**
- * Creates the dialog.
- * @param shell the shell.
- * @param currentTypes types to preselect.
- */
- public SystemSearchSelectFileTypesDialog(Shell shell, Collection currentTypes) {
- super(shell, currentTypes);
- }
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog#checkInitialSelections()
- */
- protected void checkInitialSelections() {
-
- IFileEditorMapping editorMappings[] = PlatformUI.getWorkbench().getEditorRegistry().getFileEditorMappings();
- ArrayList selectedMappings = new ArrayList();
-
- // go through all editor mappings, and check of those that are in the initial selections
- for (int i = 0; i < editorMappings.length; i++) {
- IFileEditorMapping mapping = editorMappings[i];
-
- if (initialSelections.contains(mapping.getExtension())) {
- listViewer.setChecked(mapping, true);
- selectedMappings.add(mapping.getExtension());
- }
- }
-
- // now find those entries in the initial selections that are not in editor mappings
- // add these entries to the user defined list
- Iterator initialIterator = initialSelections.iterator();
- StringBuffer entries = new StringBuffer();
- boolean first = true;
-
- while(initialIterator.hasNext()) {
- String nextExtension = (String)initialIterator.next();
-
- if(!selectedMappings.contains(nextExtension)) {
-
- if (!first) {
- // if not the first entry, add a comma and a space
- entries.append(TYPE_DELIMITER);
- entries.append(" ");
- }
- else {
- first = false;
- }
-
- entries.append(nextExtension);
- }
- }
-
- userDefinedText.setText(entries.toString());
- }
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog#addUserDefinedEntries(java.util.List)
- */
- protected void addUserDefinedEntries(List result) {
- StringTokenizer tokenizer = new StringTokenizer(userDefinedText.getText(), TYPE_DELIMITER);
-
- while (tokenizer.hasMoreTokens()) {
- String currentExtension = tokenizer.nextToken().trim();
-
- if (!currentExtension.equals("")) {
- result.add(currentExtension);
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemPromptDialog#processOK()
- */
- protected boolean processOK() {
-
- IFileEditorMapping[] children = getInput();
- List list = new ArrayList();
-
- // build a list of selected children
- for (int i = 0; i < children.length; ++i) {
- IFileEditorMapping element = children[i];
-
- if (listViewer.getChecked(element)) {
- list.add(element.getLabel());
- }
- }
-
- addUserDefinedEntries(list);
- setResult(list);
- return true;
- }
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog#validateFileType(java.lang.String)
- */
- protected boolean validateFileType(String filename) {
- return true;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/DownloadJob.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/DownloadJob.java
deleted file mode 100644
index b157564f7..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/DownloadJob.java
+++ /dev/null
@@ -1,100 +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.files.ui.view;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemUniversalTempFileListener;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.widgets.Display;
-
-public class DownloadJob extends Job
-{
- public static class OpenEditorRunnable implements Runnable
- {
- private ISystemEditableRemoteObject _editable;
- private boolean _systemEditor;
- public OpenEditorRunnable(ISystemEditableRemoteObject editable, boolean systemEditor)
- {
- _editable = editable;
- _systemEditor = systemEditor;
- }
-
- public void run()
- {
- try
- {
- _editable.addAsListener();
- _editable.setLocalResourceProperties();
- if (_systemEditor)
- {
- ((SystemEditableRemoteFile)_editable).openSystemEditor();
- }
- else
- {
- _editable.openEditor();
- }
- }
- catch (Exception e)
- {
-
- }
- }
-
- }
-
- private ISystemEditableRemoteObject _editable;
- private boolean _systemEditor;
-
- /**
- * Download job.
- * @param editable the editable remote object.
- * @param systemEditor whether to use the system editor.
- */
- public DownloadJob(ISystemEditableRemoteObject editable, boolean systemEditor)
- {
- super("Download");
- _editable = editable;
- _systemEditor = systemEditor;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- try
- {
- IFile localFile = _editable.getLocalResource();
- SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
- listener.addIgnoreFile(localFile);
- _editable.download(monitor);
- listener.removeIgnoreFile(localFile);
- }
- catch (Exception e)
- {
- }
- if (!monitor.isCanceled())
- {
- OpenEditorRunnable oe = new OpenEditorRunnable(_editable, _systemEditor);
- Display.getDefault().asyncExec(oe);
- }
-
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java
deleted file mode 100644
index d96c39bc9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.view;
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.files.ui.actions.SystemFileUpdateFilterAction;
-import org.eclipse.rse.files.ui.actions.SystemNewFileAction;
-import org.eclipse.rse.files.ui.actions.SystemNewFileFilterAction;
-import org.eclipse.rse.files.ui.actions.SystemNewFolderAction;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.files.ui.wizards.SystemFileNewConnectionWizardPage;
-import org.eclipse.rse.model.ISystemRegistryUI;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class RemoteFileSubSystemConfigurationAdapter extends SubSystemConfigurationAdapter
-{
-
- SystemNewFileFilterAction _newFileFilterAction;
- SystemFileUpdateFilterAction _changeFilerAction;
-
- Vector _additionalActions;
-
- // -----------------------------------
- // WIZARD PAGE CONTRIBUTION METHODS... (defects 43194 and 42780)
- // -----------------------------------
- /**
- * Optionally return one or more wizard pages to append to the New Connection Wizard if
- * the user selects a system type that this subsystem factory supports.
- * <p>
- * Tip: consider extending AbstractSystemWizardPage for your wizard page class.
- */
- public ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(ISubSystemConfiguration factory, IWizard wizard)
- {
- ISystemNewConnectionWizardPage[] basepages = super.getNewConnectionWizardPages(factory, wizard);
-
- // DKM - for now reverting back to not showing port on wizard page
- // in UCD sessions, users were too confused by that page
- if (false /*isPortEditable()*/)
- {
- SystemFileNewConnectionWizardPage page = new SystemFileNewConnectionWizardPage(wizard, factory);
- ISystemNewConnectionWizardPage[] newPages = new ISystemNewConnectionWizardPage[basepages.length + 1];
- newPages[0] = page;
- for (int i = 0; i < basepages.length; i++)
- {
- newPages[i+1] = basepages[i];
- }
- basepages = newPages;
- }
- return basepages;
- }
-
- /**
- * Overridable parent method to return the action for creating a new filter inside a filter pool
- * Returns new SystemNewFileFilterAction.
- */
- protected IAction getNewFilterPoolFilterAction(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
- {
- if (_newFileFilterAction == null)
- {
- _newFileFilterAction = new SystemNewFileFilterAction((IRemoteFileSubSystemConfiguration)factory, selectedPool, shell);
- }
- else
- {
- _newFileFilterAction.setParentFilterPool(selectedPool);
-
-
- }
- return _newFileFilterAction;
- }
-
- /**
- * Overridable method to return the action for changing an existing filter.
- * Returns new SystemFileUpdateFilterAction.
- */
- protected IAction getChangeFilterAction(ISubSystemConfiguration factory, ISystemFilter selectedFilter, Shell shell)
- {
- if (_changeFilerAction == null)
- {
- _changeFilerAction = new SystemFileUpdateFilterAction(shell);
- }
- return _changeFilerAction;
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#getAdditionalFilterActions(ISystemFilter,Shell)
- */
- protected Vector getAdditionalFilterActions(ISubSystemConfiguration factory, ISystemFilter selectedFilter, Shell shell)
- {
- if (_additionalActions == null)
- {
- _additionalActions = super.getAdditionalFilterActions(factory, selectedFilter, shell);
- if (selectedFilter.isPromptable())
- return _additionalActions;
- if (_additionalActions == null)
- _additionalActions = new Vector();
-
- // following added by Phil for release 2, Nov 10 2002
- _additionalActions.add(new SystemNewFileAction(shell));
- _additionalActions.add(new SystemNewFolderAction(shell));
-
- // DKM
- // FIXME - can't do this here anymore
- //_additionalActions.add(new SystemCommandAction(shell, true));
-
- ISystemRegistryUI registry = RSEUIPlugin.getTheSystemRegistry();
- Clipboard clipboard = registry.getSystemClipboard();
- _additionalActions.add(new SystemPasteFromClipboardAction(shell, clipboard));
- }
- return _additionalActions;
- }
-
- /**
- * Called by SystemRegistry's renameSystemProfile method to ensure we update our
- * subsystem names within each subsystem.
- * <p>
- * Must be called AFTER changing the profile's name!!
- */
- public void renameSubSystemProfile(ISubSystemConfiguration factory, String oldProfileName, String newProfileName)
- {
- super.renameSubSystemProfile(factory, oldProfileName, newProfileName);
-
- // change all IFile properties in remote systems temp files tree
- IProject project = SystemBasePlugin.getWorkspaceRoot().getProject(SystemRemoteEditManager.REMOTE_EDIT_PROJECT_NAME);
- if (project != null)
- {
- IFolder folder = project.getFolder(oldProfileName);
- if (folder != null && folder.exists())
- {
- // recursively change all subsystem ids for the temp files
- recursivelyUpdateIFileProperties(newProfileName, folder);
- }
- }
- }
-
-
- protected void recursivelyUpdateIFileProperties(String newName, IFolder container)
- {
- try
- {
- IResource[] resources = container.members();
- for (int i = 0; i < resources.length; i++)
- {
- IResource resource = resources[i];
- if (resource instanceof IFile)
- {
- IFile file = (IFile)resource;
- SystemIFileProperties properties = new SystemIFileProperties(file);
-
- String absoluteSubSystemName = properties.getRemoteFileSubSystem();
- if (absoluteSubSystemName != null)
- {
- int profileDelim = absoluteSubSystemName.indexOf(".");
- String theRest = absoluteSubSystemName.substring(profileDelim, absoluteSubSystemName.length());
- properties.setRemoteFileSubSystem(newName + theRest);
- }
- }
- else if (resource instanceof IFolder)
- {
- recursivelyUpdateIFileProperties(newName, (IFolder)resource);
- }
- }
- }
- catch (Exception e)
- {
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapterFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 8b9ff9d58..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-
-
-public class RemoteFileSubSystemConfigurationAdapterFactory implements IAdapterFactory
-{
-
- private ISubSystemConfigurationAdapter ssFactoryAdapter = new RemoteFileSubSystemConfigurationAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISubSystemConfigurationAdapter.class};
- }
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, IRemoteFileSubSystemConfiguration.class);
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof IRemoteFileSubSystemConfiguration)
- adapter = ssFactoryAdapter;
-
- return adapter;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewFileAdapterFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewFileAdapterFactory.java
deleted file mode 100644
index 3d2295df9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewFileAdapterFactory.java
+++ /dev/null
@@ -1,65 +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.files.ui.view;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-/**
- * This factory maps requests for an adapter object from a given
- * element object. This is for the universal file system.
- */
-public class SystemViewFileAdapterFactory extends AbstractSystemRemoteAdapterFactory
-{
- private SystemViewRemoteFileAdapter fileAdapter = new SystemViewRemoteFileAdapter();
-
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, IRemoteFile.class);
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof IRemoteFile)
- adapter = fileAdapter;
-
- if ((adapter != null) && (adapterType == IPropertySource.class))
- {
- ((ISystemViewElementAdapter)adapter).setPropertySourceInput(adaptableObject);
- }
- else if (adapter == null)
- {
- SystemBasePlugin.logWarning("No adapter found for object of type: " + adaptableObject.getClass().getName());
- }
- return adapter;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 1d44df9c5..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteFileAdapter.java
+++ /dev/null
@@ -1,3172 +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.files.ui.view;
-import java.io.File;
-import java.text.DateFormat;
-import java.text.NumberFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.SystemChildrenContentsType;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.actions.SystemAddToArchiveAction;
-import org.eclipse.rse.files.ui.actions.SystemCompareFilesAction;
-import org.eclipse.rse.files.ui.actions.SystemCompareWithEditionAction;
-import org.eclipse.rse.files.ui.actions.SystemConvertAction;
-import org.eclipse.rse.files.ui.actions.SystemEditFilesAction;
-import org.eclipse.rse.files.ui.actions.SystemExtractAction;
-import org.eclipse.rse.files.ui.actions.SystemExtractToAction;
-import org.eclipse.rse.files.ui.actions.SystemMoveRemoteFileAction;
-import org.eclipse.rse.files.ui.actions.SystemNewFileAction;
-import org.eclipse.rse.files.ui.actions.SystemNewFileFilterFromFolderAction;
-import org.eclipse.rse.files.ui.actions.SystemNewFolderAction;
-import org.eclipse.rse.files.ui.actions.SystemRemoteFileOpenWithMenu;
-import org.eclipse.rse.files.ui.actions.SystemReplaceWithEditionAction;
-import org.eclipse.rse.files.ui.actions.SystemSearchAction;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.filters.SystemFilterReference;
-import org.eclipse.rse.model.ISystemRegistryUI;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemRemoteResourceSet;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.StringCompare;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.services.search.HostSearchResultSet;
-import org.eclipse.rse.services.search.IHostSearchConstants;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-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.subsystems.files.core.subsystems.IVirtualRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEmpty;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileRoot;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
-import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.actions.SystemShowInMonitorAction;
-import org.eclipse.rse.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.operations.SystemFetchOperation;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemDragDropAdapter;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemMementoConstants;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.ISystemViewDropDestination;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemDNDTransferRunnable;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.rse.ui.view.search.SystemSearchTableView;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IElementCollector;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Adapter for displaying remote file system objects in tree views.
- * These are children of RemoteFileSubSystem filter strings
- */
-public class SystemViewRemoteFileAdapter
- extends AbstractSystemViewAdapter
- implements ISystemViewElementAdapter, ISystemRemoteElementAdapter,
- ISystemPropertyConstants
-{
-
- private String xlatedSize = null;
- private String xlatedCompressedSize = null;
- private String xlatedExpandedSize = null;
-
- private static final Object[] EMPTY_LIST = new Object[0];
- private boolean filesOnly, foldersOnly;
- private SystemNewFileAction addNewFile;
- private SystemNewFolderAction addNewFolder;
- private SystemNewFileFilterFromFolderAction addNewFilter;
-
- private SystemMoveRemoteFileAction moveAction;
-
- private SystemCopyToClipboardAction copyClipboardAction;
- private SystemPasteFromClipboardAction pasteClipboardAction;
-
- private SystemCompareFilesAction compareFilesAction;
- private SystemCompareWithEditionAction compareEditionAction;
- private SystemReplaceWithEditionAction replaceEditionAction;
- // FIXME shells now separate plugin
- //private SystemCommandAction commandAction, shellAction;
-
- private SystemSearchAction searchAction;
- private SystemShowInTableAction showInTableAction;
- private SystemShowInMonitorAction showInMonitorAction;
- private SystemExtractAction extractAction;
- private SystemExtractToAction extractToAction;
- private SystemConvertAction convertAction;
- private SystemAddToArchiveAction addToArchiveAction;
- private IEditorRegistry registry;
- private SystemRemoteFileOpenWithMenu openWithMenu;
-
- private boolean debug = false; //true;
-
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
- private static PropertyDescriptor[] briefPropertyDescriptorArray = null;
-
- // DKM
- private static PropertyDescriptor[] uniquePropertyDescriptorArray = null;
- private static PropertyDescriptor[] uniqueArchiveDescriptorArray = null;
- private static PropertyDescriptor[] uniqueVirtualDescriptorArray = null;
-
- // MJB
- private static PropertyDescriptor[] archiveDescriptorArray = null;
- private static PropertyDescriptor[] virtualDescriptorArray = null;
-
- static final SystemMessage _uploadMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOADING_PROGRESS);
- static final SystemMessage _downloadMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOADING_PROGRESS);
-
- /**
- * Constructor
- */
- public SystemViewRemoteFileAdapter()
- {
- super();
- xlatedSize = SystemViewResources.RESID_PROPERTY_FILE_SIZE_VALUE;
- xlatedCompressedSize = SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_VALUE;
- xlatedExpandedSize = SystemViewResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_VALUE;
-
- }
-
- private IEditorRegistry getEditorRegistry()
- {
- if (registry == null)
- {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench != null)
- registry = workbench.getEditorRegistry();
- }
- return registry;
- }
- /**
- * Constructor for folders or files only
- */
- public SystemViewRemoteFileAdapter(boolean foldersOnly, boolean filesOnly)
- {
- this();
- this.foldersOnly = foldersOnly;
- this.filesOnly = filesOnly;
- }
- /**
- * Set a filter string to subset the list by. For example, "A*.java" or "java,class,".
- * Only valid if filesOnly mode or foldersOnly mode.
- */
- public void setFilterString(String filterString)
- {
- if (filesOnly && (filterString != null) && (filterString.indexOf("/ns") == -1)) //$NON-NLS-1$
- filterString = filterString + " /ns"; //$NON-NLS-1$
- else if (foldersOnly && (filterString != null) && (filterString.indexOf("/nf") == -1)) //$NON-NLS-1$
- filterString = filterString + " /nf"; //$NON-NLS-1$
- this.filterString = filterString;
- }
-
- /**
- * Get the current filter string being used to subset the list by.
- * Will be null unless setFilterString has previously been called.
- */
- public String getFilterString()
- {
- return filterString;
- }
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given filter string object.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- int elementType = 0;
- boolean isArchive = false;
- boolean allHaveContents = false;
-
- boolean canEdit = true;
- boolean supportsSearch = true;
- boolean supportsArchiveManagement = false;
-
- boolean isVirtual = false;
-
- // perf improvement... phil
- Object firstSelection = selection.getFirstElement();
- IRemoteFile firstFile = null;
- if ((firstSelection != null) && (firstSelection instanceof IRemoteFile))
- {
- firstFile = (IRemoteFile) firstSelection;
- elementType = firstFile.isDirectory() || firstFile.isRoot() ? 1 : 0;
- isArchive = firstFile.isArchive();
- isVirtual = firstFile instanceof IVirtualRemoteFile;
- canEdit = firstFile.canRead();
-
- supportsSearch = firstFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsSearch();
- supportsArchiveManagement = firstFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- }
- else
- return;
-
- allHaveContents = isArchive;
-
- if (isArchive)
- {
- Iterator elements = selection.iterator();
- Object element = null;
-
- while (elements.hasNext())
- {
- element = elements.next();
- IRemoteFile remoteObj = (IRemoteFile) element;
- if (!remoteObj.isArchive())
- {
- allHaveContents = false;
- break;
- }
- }
- }
-
- if ((elementType == 1 || (isArchive && supportsArchiveManagement)))
- {
- if (!foldersOnly && canEdit)
- {
- if (addNewFile == null)
- {
- addNewFile = new SystemNewFileAction(shell);
- }
- menu.add(ISystemContextMenuConstants.GROUP_NEW, addNewFile);
- }
- if (!filesOnly)
- {
- if (canEdit)
- {
- if (addNewFolder == null)
- {
- addNewFolder = new SystemNewFolderAction(shell);
- }
- menu.add(ISystemContextMenuConstants.GROUP_NEW, addNewFolder);
- }
-
- if (addNewFilter == null)
- {
- addNewFilter = new SystemNewFileFilterFromFolderAction(shell);
- }
-
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_NEW, new Separator());
- menu.add(ISystemContextMenuConstants.GROUP_NEW, addNewFilter);
- }
-
- }
- else
- {
- if (canEdit)
- {
- // open
- String label = SystemResources.ACTION_CASCADING_OPEN_LABEL;
- String tooltip = SystemResources.ACTION_CASCADING_OPEN_TOOLTIP;
- SystemEditFilesAction action = new SystemEditFilesAction(label, tooltip, shell);
- menu.add(ISystemContextMenuConstants.GROUP_OPEN, action);
-
- // open with ->
-
- MenuManager submenu =
- new MenuManager(FileResources.ResourceNavigator_openWith,
- ISystemContextMenuConstants.GROUP_OPENWITH);
-
- if (openWithMenu == null)
- {
- openWithMenu = new SystemRemoteFileOpenWithMenu();
- }
- openWithMenu.updateSelection(selection);
- submenu.add(openWithMenu);
- menu.getMenuManager().appendToGroup(ISystemContextMenuConstants.GROUP_OPENWITH, submenu);
- }
- }
-
- if (extractAction == null)
- {
- extractAction = new SystemExtractAction(shell);
- }
- if (extractToAction == null)
- {
- extractToAction = new SystemExtractToAction(shell);
- }
- if (convertAction == null)
- {
- convertAction = new SystemConvertAction(shell);
- }
- if (addToArchiveAction == null)
- {
- addToArchiveAction = new SystemAddToArchiveAction(shell);
- }
-
- if (allHaveContents && canEdit && !isVirtual)
- {
- /*
- menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, extractAction);
- menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, extractToAction);
- menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, convertAction);
- */
- }
-
- // add import and export actions for single selection of folder
-/* if ((elementType == 1 && selection.size() == 1) && canEdit)
- {
-
- if (importAction == null) {
- importAction = new SystemImportToProjectAction(shell);
- }
-
- if (exportAction == null) {
- exportAction = new SystemExportFromProjectAction(shell);
- }
-
- menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, importAction);
- menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, exportAction);
- }*/
-
- if (moveAction == null)
- moveAction = new SystemMoveRemoteFileAction(shell);
-
- //ISubSystem subsys = firstFile.getParentRemoteFileSubSystem();
-
- // DKM - clipboard based copy actions
- ISystemRegistryUI registry = RSEUIPlugin.getTheSystemRegistry();
- Clipboard clipboard = registry.getSystemClipboard();
-
- if (pasteClipboardAction == null)
- {
- pasteClipboardAction = new SystemPasteFromClipboardAction(shell, clipboard);
- }
- if (copyClipboardAction == null)
- {
- copyClipboardAction = new SystemCopyToClipboardAction(shell, clipboard);
- }
- /** FIXME - these show now be contributed via plugin.xml from the shells plugin
- if (commandAction == null)
- {
- commandAction = new SystemCommandAction(shell, false, null);
- }
- if (shellAction == null)
- {
- shellAction = new SystemCommandAction(shell, true, null);
- }
- **/
- if (searchAction == null)
- {
- searchAction = new SystemSearchAction(shell);
- }
- if (compareFilesAction == null)
- {
- compareFilesAction = new SystemCompareFilesAction(shell);
- }
- if (compareEditionAction == null)
- {
- compareEditionAction = new SystemCompareWithEditionAction(shell);
- }
- if (replaceEditionAction == null)
- {
- replaceEditionAction = new SystemReplaceWithEditionAction(shell);
- }
- if (showInTableAction == null)
- {
- showInTableAction = new SystemShowInTableAction(shell);
- }
- if (showInMonitorAction == null)
- {
- showInMonitorAction = new SystemShowInMonitorAction(shell);
- }
-
- if (canEdit && supportsSearch)
- {
- //menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, addToArchiveAction);
-
- // add search action
- menu.add(ISystemContextMenuConstants.GROUP_SEARCH, searchAction);
- }
-
- if (!firstFile.isRoot() && canEdit)
- {
- menu.add(menuGroup, copyClipboardAction);
- if (elementType == 0)
- {
- menu.add(ISystemContextMenuConstants.GROUP_COMPAREWITH, compareFilesAction);
- menu.add(ISystemContextMenuConstants.GROUP_COMPAREWITH, compareEditionAction);
- menu.add(ISystemContextMenuConstants.GROUP_REPLACEWITH, replaceEditionAction);
- }
- }
-
- if (elementType == 1 || (isArchive && supportsArchiveManagement))
- {
- if (canEdit)
- {
- menu.add(menuGroup, pasteClipboardAction);
- }
- menu.add(ISystemContextMenuConstants.GROUP_OPEN, showInTableAction);
-
-
- menu.add(ISystemContextMenuConstants.GROUP_OPEN, showInMonitorAction);
-
- /** FIXME - shells now separate plugin
- if (elementType == 1)
- {
- if (!isVirtual)
- {
- menu.add(menuGroup, shellAction);
- }
- }
- */
- }
- if (!firstFile.isRoot() && canEdit)
- {
- menu.add(menuGroup, moveAction);
- }
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- if (file.isFile() || file.isArchive()) // hack to show zips without folder icons
- {
- return getEditorRegistry().getImageDescriptor(file.getName());
- }
- else
- {
- boolean isOpen = false;
- if (getViewer() instanceof AbstractTreeViewer)
- {
- AbstractTreeViewer atv = (AbstractTreeViewer) getViewer();
- isOpen = atv.getExpandedState(element);
- if (!isOpen)
- {
- if (!hasChildren(element))
- isOpen = true;
- }
- }
- if (file.isRoot())
- 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 RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID);
- }
- }
-
- /**
- * Return the label for this object. Uses getName() on the remote file object.
- */
- public String getText(Object element)
- {
- return getName(element);
- }
-
- /**
- * Return the label for this object. Uses getName() on the remote file object.
- */
- public String getAlternateText(Object element)
- {
- return ((IRemoteFile) element).getLabel();
- }
-
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- return ((IRemoteFile) element).getName();
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
-
- if (file.isRoot())
- return SystemViewResources.RESID_PROPERTY_FILE_TYPE_ROOT_VALUE;
- else if (file.isDirectory())
- return SystemViewResources.RESID_PROPERTY_FILE_TYPE_FOLDER_VALUE;
- else
- return SystemViewResources.RESID_PROPERTY_FILE_TYPE_FILE_VALUE;
- }
-
- /**
- * Return the string to display in the status line when the given object is selected.
- * We return:
- * <getType()>: <getAbsoluteName()>
- */
- public String getStatusLineText(Object element)
- {
- return getType(element) + ": " + getAbsoluteName(element); //$NON-NLS-1$
- }
-
- /**
- * Return the parent of this object
- */
- public Object getParent(Object element)
- {
- //System.out.println("Inside getParent for: "+element);
- IRemoteFile file = (IRemoteFile) element;
- IRemoteFile parent = file.getParentRemoteFile();
- if ((parent != null) && parent.getAbsolutePath().equals(file.getAbsolutePath()))
- // should never happen but sometimes it does, leading to infinite loop.
- parent = null;
- return parent;
- }
-
- /**
- * Return the children of this object.
- * If this is a folder or root, we list all child folders and files.
- */
- public Object[] getChildren(IProgressMonitor monitor, Object element)
- {
- return internalGetChildren(monitor, element);
- }
-
- /**
- * Return the children of this object.
- * If this is a folder or root, we list all child folders and files.
- */
- public Object[] getChildren(Object element)
- {
- _lastResults = internalGetChildren(null, element);
- return _lastResults;
- // }
- }
-
- private synchronized Object[] internalGetChildren(IProgressMonitor monitor, Object element)
- {
- //System.out.println("Inside getChildren for: "+element);
- IRemoteFile file = (IRemoteFile) element;
- if (file instanceof RemoteFileEmpty) // cut to the chase
- {
- //System.out.println("FileAdapter.getChildren(): empty list-request");
- return EMPTY_LIST;
- }
- else if (file instanceof RemoteFileRoot)
- {
- //System.out.println("FileAdapter.getChildren(): children of root list-request");
- return ((RemoteFileRoot) file).getRootFiles();
- }
- IRemoteFileSubSystem ss = file.getParentRemoteFileSubSystem();
- RemoteFileFilterString orgRffs = file.getFilterString();
-
- String filter = null;
- if (orgRffs != null)
- {
- if (foldersOnly)
- {
- RemoteFileFilterString rffs = (RemoteFileFilterString) orgRffs.clone();
- rffs.setPath(null);
- rffs.setShowFiles(false);
- rffs.setShowSubDirs(true);
- filter = rffs.toString();
- }
- else if (filesOnly)
- {
- RemoteFileFilterString rffs = (RemoteFileFilterString) orgRffs.clone();
- rffs.setPath(null);
- rffs.setShowSubDirs(false);
- rffs.setShowFiles(true);
- filter = rffs.toString();
- }
- else
- {
- filter = null; // this is our clue to RemoteFileSubSystemImpl to use all filter strings associated with this folder
- }
- }
- else if (foldersOnly)
- {
- if (filterString == null)
- filter = "* /nf"; //$NON-NLS-1$
- else
- filter = filterString;
- }
- else if (filesOnly)
- {
- if (filterString == null)
- filter = "* /ns"; //$NON-NLS-1$
- else
- filter = filterString;
- }
- else
- {
- if (filterString == null)
- filter = "*"; //$NON-NLS-1$
- else
- filter = filterString;
- }
-
- Object[] children = null;
-
- Viewer v = getViewer();
-
- if ((v != null) && (v instanceof SystemSearchTableView)) {
-
- SystemSearchTableView view = (SystemSearchTableView)v;
- Iterator iter = view.getResultSet().getSearchConfigurations();
- boolean hasSearchResults = false;
- while (iter.hasNext() && !hasSearchResults)
- {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)(iter.next());
- String searchString = config.getSearchString().getTextString();
-
- hasSearchResults = file.hasContents(RemoteSearchResultsContentsType.getInstance(), searchString);
-
- if (hasSearchResults)
- {
- children = file.getContents(RemoteSearchResultsContentsType.getInstance(), searchString);
- return children;
- }
- }
- }
-
- boolean hasChildren = file.hasContents(RemoteChildrenContentsType.getInstance(), filter);
-
- if (hasChildren && !file.isStale())
- {
- children = file.getContents(RemoteChildrenContentsType.getInstance(), filter);
- }
- else
- {
- try
- {
- if (monitor != null)
- {
-
- children = ss.resolveFilterString(monitor, file, filter);
- }
- else
- {
- children = ss.resolveFilterString(file, filter);
- }
- if ((children == null) || (children.length == 0))
- {
- //children = new SystemMessageObject[1];
- //children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_EMPTY),
- // ISystemMessageObject.MSGTYPE_EMPTY, element);
- children = EMPTY_LIST;
- }
-
- }
- catch (InterruptedException exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element);
- //System.out.println("Canceled.");
- }
- catch (Exception exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element);
- SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$
- } // message already issued
- }
- return children;
- }
- /**
- * Return true if this object has children.
- * Since we can't predict the outcome of resolving the filter string, we return true.
- */
- public boolean hasChildren(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- boolean supportsArchiveManagement = file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- boolean hasChildren = false;
- if (file instanceof IVirtualRemoteFile)
- {
- hasChildren = ((IVirtualRemoteFile)file).isVirtualFolder();
- }
- else
- {
- hasChildren = !file.isFile() || (file.isArchive() && supportsArchiveManagement);
- }
-
- if (!hasChildren) {
-
- Viewer v = getViewer();
-
- if ((v != null) && (v instanceof SystemSearchTableView)) {
-
- SystemSearchTableView view = (SystemSearchTableView)v;
- Iterator iter = view.getResultSet().getSearchConfigurations();
- while (iter.hasNext() && !hasChildren)
- {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)(iter.next());
- String searchString = config.getSearchString().getTextString();
-
- hasChildren = file.hasContents(RemoteSearchResultsContentsType.getInstance(), searchString);
- }
- }
- else {
- hasChildren = file.hasContents(RemoteChildrenContentsType.getInstance());
- }
- }
- else
- {
- // check that the children are actually there
- Object[] contents = file.getContents(RemoteChildrenContentsType.getInstance());
- if (!file.isStale() && contents != null && contents.length == 0 )
- hasChildren = false;
- }
-
- return hasChildren;
- }
-
-
-
- public IPropertyDescriptor[] getUniquePropertyDescriptors()
- {
-
- IRemoteFile file = null;
- if (propertySourceInput instanceof IRemoteFile)
- {
- file = (IRemoteFile) propertySourceInput;
-
- boolean supportsArchiveManagement = file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
-
- boolean isArchive = file != null && file.isArchive() && supportsArchiveManagement;
- boolean isVirtual = file != null && file instanceof IVirtualRemoteFile && supportsArchiveManagement;
- boolean isRegular = !isArchive && !isVirtual;
-
- if (isRegular && uniquePropertyDescriptorArray == null ||
- isArchive && uniqueArchiveDescriptorArray == null ||
- isVirtual && uniqueVirtualDescriptorArray == null)
- {
-
- int nbrOfArchiveProperties = 2;
- int nbrOfVirtualProperties = 4;
- int nbrOfProperties = 4;
- if (isVirtual) nbrOfProperties += nbrOfVirtualProperties;
- else if (isArchive) nbrOfProperties += nbrOfArchiveProperties;
-
- if (isRegular) uniquePropertyDescriptorArray = new PropertyDescriptor[nbrOfProperties];
- else if (isVirtual) uniqueVirtualDescriptorArray = new PropertyDescriptor[nbrOfProperties];
- else if (isArchive) uniqueArchiveDescriptorArray = new PropertyDescriptor[nbrOfProperties];
- //PropertyDescriptor[] defaultProperties = (PropertyDescriptor[]) getDefaultDescriptors();
-
- int i = -1;
-
- // add our unique property descriptors...
- //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);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_CLASSIFICATION, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_CLASSIFICATION, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
-
- // last modified
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_LASTMODIFIED, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_LASTMODIFIED, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_LASTMODIFIED, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
-
- // size
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_SIZE, SystemViewResources.RESID_PROPERTY_FILE_SIZE_LABEL, SystemViewResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_SIZE, SystemViewResources.RESID_PROPERTY_FILE_SIZE_LABEL, SystemViewResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_SIZE, SystemViewResources.RESID_PROPERTY_FILE_SIZE_LABEL, SystemViewResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
-
- // canonical path
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_CANONICAL_PATH, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_CANONICAL_PATH, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_CANONICAL_PATH, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
-
-
- if (isVirtual)
- {
- // add virtual property descriptors...
-
- // compressed size
- uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(P_VIRTUAL_COMPRESSEDSIZE, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_LABEL, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_DESCRIPTION);
-
- // compression ratio
- uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(P_VIRTUAL_COMPRESSIONRATIO, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_LABEL, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_DESCRIPTION);
-
- // compression method
- uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(P_VIRTUAL_COMPRESSIONMETHOD, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_LABEL, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_DESCRIPTION);
-
- // comment
- uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(P_VIRTUAL_COMMENT, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMMENT_LABEL, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMMENT_DESCRIPTION);
- }
- else if (isArchive)
- {
- // add archive property descriptors...
-
- // expanded size
- uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(P_ARCHIVE_EXPANDEDSIZE, SystemViewResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_LABEL, SystemViewResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_DESCRIPTION);
-
- // comment
- uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(P_ARCHIVE_COMMENT, SystemViewResources.RESID_PROPERTY_ARCHIVE_COMMENT_LABEL, SystemViewResources.RESID_PROPERTY_ARCHIVE_COMMENT_DESCRIPTION);
- }
- }
-
- // DKM - I commented this stuff out since it's screwing up table view
- ///*
- if (isRegular) return uniquePropertyDescriptorArray;
- else if (isVirtual) return uniqueVirtualDescriptorArray;
- else if (isArchive) return uniqueArchiveDescriptorArray;
- else return uniquePropertyDescriptorArray;
- //*/
- }
- return uniquePropertyDescriptorArray;
- }
-
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- //System.out.println("Inside beg getPropertyDescriptors: "+propertyDescriptorArray);
- // IT TURNS OUT THAT FOR IFS FILES, THE QUERY OF THE FULL SET OF PROPERTIES CAN TAKE UP
- // TO 5 SECONDS, CONSIDERABLY SLOWING DOWN RESPONSE TIME TO THE POINT OF PAIN. TO FIX THIS,
- // WE HAVE MADE IT POSSIBLE FOR REMOTE FILE OBJECTS TO DECIDE TO SHOW ONLY A SUBSET OF THE
- // PROPERTIES, WHICH IFS FILES EXPLOIT. PHIL.
-
- IRemoteFile file = null;
- if (propertySourceInput instanceof IRemoteFile) file = (IRemoteFile) propertySourceInput;
- boolean isArchive = false;//file != null && file.isArchive();
-
- boolean isVirtual = file != null && file instanceof IVirtualRemoteFile;
- boolean isRegular = !isArchive && !isVirtual;
-
- if (isRegular && propertyDescriptorArray == null ||//uniquePropertyDescriptorArray == null ||
- isArchive && archiveDescriptorArray == null ||
- isVirtual && virtualDescriptorArray == null)
- {
- int nbrOfArchiveProperties = 2;
- int nbrOfVirtualProperties = 4;
- int nbrOfProperties = 8;
- int nbrOfBriefProperties = 2;
- if (debug)
- nbrOfProperties += 7;
-
- if (isVirtual) nbrOfProperties += nbrOfVirtualProperties;
- else if (isArchive) nbrOfProperties += nbrOfArchiveProperties;
-
- if (isRegular) propertyDescriptorArray = new PropertyDescriptor[nbrOfProperties];
- else if (isVirtual) virtualDescriptorArray = new PropertyDescriptor[nbrOfProperties];
- else if (isArchive) archiveDescriptorArray = new PropertyDescriptor[nbrOfProperties];
-
- briefPropertyDescriptorArray = new PropertyDescriptor[nbrOfBriefProperties];
- int idx = -1;
- int briefIdx = idx;
-
- // path
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor(P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
-
- // filter string
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILTERSTRING, SystemViewResources.RESID_PROPERTY_FILTERSTRING_LABEL,SystemViewResources.RESID_PROPERTY_FILTERSTRING_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILTERSTRING, SystemViewResources.RESID_PROPERTY_FILTERSTRING_LABEL,SystemViewResources.RESID_PROPERTY_FILTERSTRING_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILTERSTRING, SystemViewResources.RESID_PROPERTY_FILTERSTRING_LABEL,SystemViewResources.RESID_PROPERTY_FILTERSTRING_TOOLTIP);
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor(P_FILTERSTRING, SystemViewResources.RESID_PROPERTY_FILTERSTRING_LABEL,SystemViewResources.RESID_PROPERTY_FILTERSTRING_TOOLTIP);
-
- // canonical path
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_CANONICAL_PATH, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL,SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_CANONICAL_PATH, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL,SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_CANONICAL_PATH, SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL,SystemViewResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
-
- // last modified
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_LASTMODIFIED, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_LASTMODIFIED, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL,SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_LASTMODIFIED, SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL,SystemViewResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
-
- // size
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_SIZE, SystemViewResources.RESID_PROPERTY_FILE_SIZE_LABEL, SystemViewResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_SIZE, SystemViewResources.RESID_PROPERTY_FILE_SIZE_LABEL, SystemViewResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_SIZE, SystemViewResources.RESID_PROPERTY_FILE_SIZE_LABEL, SystemViewResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
-
- // classification
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_CLASSIFICATION, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_CLASSIFICATION, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_CLASSIFICATION, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
-
- // readonly
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_READONLY, SystemViewResources.RESID_PROPERTY_FILE_READONLY_LABEL, SystemViewResources.RESID_PROPERTY_FILE_READONLY_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_READONLY, SystemViewResources.RESID_PROPERTY_FILE_READONLY_LABEL, SystemViewResources.RESID_PROPERTY_FILE_READONLY_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_READONLY, SystemViewResources.RESID_PROPERTY_FILE_READONLY_LABEL, SystemViewResources.RESID_PROPERTY_FILE_READONLY_TOOLTIP);
-
- // hidden
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_HIDDEN, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_LABEL, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_HIDDEN, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_LABEL, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILE_HIDDEN, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_LABEL, SystemViewResources.RESID_PROPERTY_FILE_HIDDEN_TOOLTIP);
-
- if (debug)
- {
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); //$NON-NLS-1$
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); //$NON-NLS-1$
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENT"); //$NON-NLS-1$
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENT"); //$NON-NLS-1$
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); //$NON-NLS-1$
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); //$NON-NLS-1$
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); //$NON-NLS-1$
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); //$NON-NLS-1$
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ROOT"); //$NON-NLS-1$
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ROOT"); //$NON-NLS-1$
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); //$NON-NLS-1$
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); //$NON-NLS-1$
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); //$NON-NLS-1$
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); //$NON-NLS-1$
- }
-
- if (isVirtual)
- {
- // add virtual property descriptors...
-
- // compressed size
- virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_VIRTUAL_COMPRESSEDSIZE, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_LABEL, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_DESCRIPTION);
-
- // compression ratio
- virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_VIRTUAL_COMPRESSIONRATIO, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_LABEL, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_DESCRIPTION);
-
- // compression method
- virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_VIRTUAL_COMPRESSIONMETHOD, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_LABEL, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_DESCRIPTION);
-
- // comment
- virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(P_VIRTUAL_COMMENT, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMMENT_LABEL, SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMMENT_DESCRIPTION);
- }
-
- else if (isArchive)
- {
- // add archive property descriptors...
-
- // expanded size
- archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_ARCHIVE_EXPANDEDSIZE, SystemViewResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_LABEL, SystemViewResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_DESCRIPTION);
-
- // comment
- archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(P_ARCHIVE_COMMENT, SystemViewResources.RESID_PROPERTY_ARCHIVE_COMMENT_LABEL, SystemViewResources.RESID_PROPERTY_ARCHIVE_COMMENT_DESCRIPTION);
- }
-
- }
-
-// return propertyDescriptorArray;
- // DKM - I've commented this out because it's too expensive to query archive properties during a folder query
- // we need to come back to this and change this do work in a more performance-sensitive way
-
- //System.out.println("Inside end getPropertyDescriptors: "+propertyDescriptorArray.length);
- if ((propertySourceInput instanceof IRemoteFile) && ((IRemoteFile) propertySourceInput).showBriefPropertySet())
- return propertyDescriptorArray;
- //return briefPropertyDescriptorArray;
-
- else
- {
- if (isRegular) return propertyDescriptorArray;
- else if (isVirtual) return virtualDescriptorArray;
- else if (isArchive) return archiveDescriptorArray;
- else return propertyDescriptorArray;
- }
-
- }
-
- /**
- * Create and return a simple string readonly property descriptor. For debug purposes
- */
- protected static PropertyDescriptor createSimplePropertyDescriptor(String keyAndLabel)
- {
- PropertyDescriptor pd = new PropertyDescriptor(keyAndLabel, keyAndLabel);
- return pd;
- }
-
- /**
- * Returns the current value for the named property.
- * @return the current value of the given property
- */
- protected Object internalGetPropertyValue(Object key)
- {
- return getPropertyValue(key, true);
- }
-
-
- public Object getPropertyValue(Object key)
- {
- String name = (String)key;
- if (name.equals(P_NBRCHILDREN))
- {
- IRemoteFile file = (IRemoteFile) propertySourceInput;
- System.out.println("getting children for "+ file.getAbsolutePath()); //$NON-NLS-1$
- {
- ISystemContainer container = file;
- Object[] contents = container.getContents(RemoteChildrenContentsType.getInstance());
- if (contents == null)
- return "0"; //$NON-NLS-1$
- else
- return Integer.toString(contents.length);
- }
- }
- return super.getPropertyValue(key);
- }
-
- /**
- * Returns the current value for the named property.
- *
- * @param property the name or key of the property as named by its property descriptor
- * @param formatted indication of whether to return the value in formatted or raw form
- * @return the current value of the given property
- */
- public Object getPropertyValue(Object property, boolean formatted)
- {
- String name = (String) property;
- IRemoteFile file = (IRemoteFile) propertySourceInput;
- IVirtualRemoteFile virtualFile = null;
- boolean isVirtual = file instanceof IVirtualRemoteFile;
- if (isVirtual)
- {
- virtualFile = (IVirtualRemoteFile) file;
- }
- if (debug)
- {
- if (name.equals("DEBUG_PARENTREMOTEFILE")) //$NON-NLS-1$
- {
- IRemoteFile parent = file.getParentRemoteFile();
- if (parent == null)
- return "null"; //$NON-NLS-1$
- else
- return "absPath='" + parent.getAbsolutePath() + "'"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (name.equals("DEBUG_PARENT")) //$NON-NLS-1$
- return file.getParentPath();
- else if (name.equals("DEBUG_PARENTNOROOT")) //$NON-NLS-1$
- return file.getParentNoRoot();
- else if (name.equals("DEBUG_PARENTNAME")) //$NON-NLS-1$
- return file.getParentName();
- else if (name.equals("DEBUG_ROOT")) //$NON-NLS-1$
- return file.getRoot();
- else if (name.equals("DEBUG_ISROOT")) //$NON-NLS-1$
- return file.isRoot() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
- else if (name.equals("DEBUG_EXISTS")) //$NON-NLS-1$
- return file.exists() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
-
- }
- //
- if (name.equals(ISystemPropertyConstants.P_FILE_LASTMODIFIED))
- {
- Date date = file.getLastModifiedDate();
- if (date != null)
- {
- if (formatted)
- {
- SimpleDateFormat datefmt = (SimpleDateFormat) DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM);
- return datefmt.format(date);
- }
- else
- {
- return date;
- }
- }
- return date;
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_SIZE))
- {
- if (formatted)
- {
- return sub(xlatedSize, MSG_SUB1, Long.toString(file.getLength()));
- }
- else
- {
- return new Long(file.getLength());
- }
- }
- else if (name.equals(ISystemPropertyConstants.P_ARCHIVE_EXPANDEDSIZE))
- {
- if (!isVirtual) return new Long(0);
- if (formatted)
- {
- return sub(xlatedExpandedSize, MSG_SUB1, Long.toString(virtualFile.getExpandedSize()));
- }
- else
- {
- return new Long(virtualFile.getExpandedSize());
- }
- }
- else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSEDSIZE))
- {
- if (!isVirtual) return new Long(0);
- if (formatted)
- {
- return sub(xlatedCompressedSize, MSG_SUB1, Long.toString(virtualFile.getCompressedSize()));
- }
- else
- {
- return new Long(virtualFile.getCompressedSize());
- }
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_PATH))
- {
- return file.getParentPath();
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_CANONICAL_PATH))
- {
- return file.getCanonicalPath();
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_CLASSIFICATION))
- {
- return file.getClassification();
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_READONLY))
- {
- return file.canWrite() ? getTranslatedNo() : getTranslatedYes();
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_READABLE))
- {
- return file.canRead() ? getTranslatedYes() : getTranslatedNo();
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_WRITABLE))
- {
- return file.canWrite() ? getTranslatedYes() : getTranslatedNo();
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_HIDDEN))
- {
- return file.isHidden() ? getTranslatedYes() : getTranslatedNo();
- }
- else if (name.equals(ISystemPropertyConstants.P_FILTERSTRING))
- {
- return file.getFilterString();
- }
- else if (name.equals(ISystemPropertyConstants.P_ARCHIVE_COMMENT) || name.equals(ISystemPropertyConstants.P_VIRTUAL_COMMENT))
- {
- return file.getComment();
- }
- else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONMETHOD))
- {
- if (!isVirtual) return ""; //$NON-NLS-1$
- return virtualFile.getCompressionMethod();
- }
- else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONRATIO))
- {
- Double ratio = new Double(virtualFile.getCompressionRatio());
- if (formatted)
- {
- NumberFormat numfmt = NumberFormat.getPercentInstance();
- return numfmt.format(ratio);
- }
- else
- {
- return ratio;
- }
- }
- else
- return null; //super.getPropertyValue(name);
- }
-
- // Drag and Drop Implementation
-
- /**
- * Indicates whether the specified object can be copied or not.
- * @param element the object we want to try to copy
- * @return whether this object can be copied or not
- */
- public boolean canDrag(Object element)
- {
- if (element instanceof IRemoteFile)
- {
- return ((IRemoteFile)element).canRead();
- }
- return true;
- }
-
- /**
- * Indicates whether the specified object can have another object copied to it
- * @param element the object we want to try to copy to
- * @return whether this object can be copied to or not
- */
- public boolean canDrop(Object element)
- {
- if (element instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) element;
- boolean supportsArchiveManagement = file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- return file.canRead() && file.canWrite() && (file.isDirectory() || file.isRoot() || (file.isArchive() && supportsArchiveManagement));
- }
-
- return false;
- }
-
- /**
- * Return true if it is valid for the src object to be dropped in the target
- * @param srcSet the objects to drop
- * @param target the object which src is dropped in
- * @param sameSystem whether this is the same system
- * @return whether this is a valid operation
- */
- public boolean validateDrop(ISystemResourceSet srcSet, Object target, boolean sameSystem)
- {
- if (target instanceof IRemoteFile)
- {
- IRemoteFile targetFile = (IRemoteFile) target;
- boolean supportsArchiveManagement = targetFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- if (!targetFile.isFile() || (targetFile.isArchive() && supportsArchiveManagement))
- {
- targetFile.canWrite();
- }
- // all objects are of same type, so we only need to use first to validate
- Object first = srcSet.get(0);
- if (first instanceof IRemoteFile)
- {
- return true;
- }
- else if (first instanceof IResource)
- {
- return true;
- }
- else if (first instanceof ISystemFilterReference)
- {
- return true;
- }
- else // akh11: proposed modification -- 01/28/2005
- { // ask source adapter if it supports drop of its type on this target:
- ISystemViewDropDestination adapter = (ISystemViewDropDestination)Platform.getAdapterManager().getAdapter(first,ISystemViewDropDestination.class);
- if (adapter != null)
- return adapter.supportDropDestination(target);
- }
- }
- return false;
- }
-
- /**
- * Return true if it is valid for the src object to be dropped in the target
- * @param src the object to drop
- * @param target the object which src is dropped in
- * @param sameSystem whether this is the same system
- * @return whether this is a valid operation
- */
- public boolean validateDrop(Object src, Object target, boolean sameSystem)
- {
- if (target instanceof IRemoteFile)
- {
- IRemoteFile targetFile = (IRemoteFile) target;
- boolean supportsArchiveManagement = targetFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- if (!targetFile.isFile() || (targetFile.isArchive() && supportsArchiveManagement))
- {
- // get properties
- // this is asynchronous so we call
- // it here to prepare for subsequent operation
- targetFile.canWrite();
-
- if (src instanceof IRemoteFile)
- {
- return true;
- }
- else if (src instanceof IResource)
- {
- return true;
- }
- else if (src instanceof String)
- {
- // check if this is a file
- java.io.File localFile = new java.io.File((String) src);
- if (localFile.exists())
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- else if (src instanceof ISystemFilterReference)
- {
- return true;
- }
-
- else // akh11: proposed modification -- 01/28/2005
- { // ask source adapter if it supports drop of its type on this target:
- ISystemViewDropDestination adapter = (ISystemViewDropDestination)Platform.getAdapterManager().getAdapter(src,ISystemViewDropDestination.class);
- if (adapter != null)
- return adapter.supportDropDestination(target);
- }
- }
- }
-
- return false;
- }
-
-
-
- /**
- * Performs a drag copy operation. The source object is uploaded to a temporary location so that it can
- * later be dropped on another remote system.
- * @param element the object which is being copied
- * @param sameSystem an indication whether a transfer is being made between the same types of systems.
- * @param monitor a progress monitor
- * @return the temporary object that was created after the upload
- */
- public Object doDrag(Object element, boolean sameSystem, IProgressMonitor monitor)
- {
-
- // copy all resources into temporary location
- if (element instanceof IRemoteFile)
- {
- IRemoteFile srcFileOrFolder = (IRemoteFile) element;
- return UniversalFileTransferUtility.copyRemoteResourceToWorkspace(srcFileOrFolder, monitor);
- }
- else if (element instanceof File) {
- return UniversalFileTransferUtility.copyRemoteResourceToWorkspace((File)element, monitor);
- }
- else if (element instanceof IResource)
- {
- // if the src is an IResource, then this is our temp object
- return element;
- }
-
- return null;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
- * Perform the drag on the given objects. This default implementation simply iterates through the
- * set. For optimal performance, this should be overridden.
- *
- * @param set the set of objects to copy
- * @param sameSystemType indication of whether the source and target reside on the same type of system
- * @param monitor the progress monitor
- * @return a temporary workspace copies of the object that was copied
- *
- */
- public ISystemResourceSet doDrag(SystemRemoteResourceSet set, IProgressMonitor monitor)
- {
-
- boolean supportsSearch = ((IRemoteFileSubSystemConfiguration)set.getSubSystem().getSubSystemConfiguration()).supportsSearch();
- boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER);
- if (!doSuperTransferProperty && supportsSearch)
- {
- SystemRemoteResourceSet flatSet = new SystemRemoteResourceSet(set.getSubSystem(), set.getAdapter());
- long totalByteSize = getFlatRemoteResourceSet(set.getResourceSet(), flatSet, monitor);
- flatSet.setByteSize(totalByteSize);
-
- if (monitor != null)
- {
- monitor.beginTask(_downloadMessage.getLevelOneText(), (int)totalByteSize);
- //monitor.done();
- }
-
- try
- {
- SystemWorkspaceResourceSet flatResult = UniversalFileTransferUtility.copyRemoteResourcesToWorkspace(flatSet, monitor);
- if (flatResult.hasMessage())
- {
- return flatResult;
- }
- else
- {
- SystemWorkspaceResourceSet hierarchicalResult = new SystemWorkspaceResourceSet();
- for (int i = 0; i < set.size(); i++)
- {
- IRemoteFile remoteFile = (IRemoteFile)set.get(i);
- hierarchicalResult.addResource(UniversalFileTransferUtility.getTempFileFor(remoteFile));
- }
- return hierarchicalResult;
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- return null;
- }
- }
- else
- {
- return UniversalFileTransferUtility.copyRemoteResourcesToWorkspace(set, monitor);
- }
- }
-
- /**
- * Helper method to get the local file subsystem.
- * @return the local file subsystem
- */
- private IRemoteFileSubSystem getLocalFileSubSystem()
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- IHost[] connections = registry.getHosts();
- for (int i = 0; i < connections.length; i++)
- {
- IHost connection = connections[i];
- IRemoteFileSubSystem anFS = RemoteFileUtility.getFileSubSystem(connection);
- if ((anFS != null) && (anFS.getHost().getSystemType().equals("Local"))) //$NON-NLS-1$
- {
- return anFS;
- }
- }
-
- return null;
- }
-
- protected long getFlatRemoteResourceSet(List initialResources, SystemRemoteResourceSet flatSet, IProgressMonitor monitor)
- {
- long totalByteSize = 0;
- List configList = new ArrayList();
-
- // create a search result set to contain all the results
- IHostSearchResultSet searchSet = new HostSearchResultSet();
-
- IRemoteFileSubSystem subsys = (IRemoteFileSubSystem)flatSet.getSubSystem();
- if (subsys instanceof FileServiceSubSystem)
- {
- FileServiceSubSystem ss = (FileServiceSubSystem)subsys;
-
- SystemSearchString searchString = new SystemSearchString("*", false, false, "*", false, false, true); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < initialResources.size(); i++)
- {
- IRemoteFile remoteFile = (IRemoteFile)initialResources.get(i);
-
- // get all files within directory
- if (remoteFile.isDirectory())
- {
- // create the configuration for this folder
- IHostSearchResultConfiguration config = ss.createSearchConfiguration(searchSet, remoteFile, searchString);
-
- // kick off search for all files in the folder
- subsys.search(config);
- configList.add(config);
- }
- else
- {
- flatSet.addResource(remoteFile);
- }
- }
- }
-
-
-
- SubProgressMonitor submonitor = null;
- if (monitor != null)
- {
- submonitor = new SubProgressMonitor(monitor, configList.size());
- submonitor.setTaskName(FileResources.RESID_SEARCH_MESSAGE_SEARCHING);
-
- }
- // accumulate results
- for (int n = 0; n < configList.size(); n++)
- {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)configList.get(n);
- while (config.getStatus() != IHostSearchConstants.FINISHED)
- {
- if (monitor != null)
- {
- if (monitor.isCanceled())
- {
- return totalByteSize;
- }
- Display display = Display.getCurrent();
- while (display!=null && display.readAndDispatch()) {
- //Process everything on event queue
- }
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- //no action
- }
- }
- else
- {
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- //no action
- }
- }
- }
-
- if (config.getStatus() == IHostSearchConstants.FINISHED)
- {
- submonitor.worked(1);
- Object[] results = config.getResults();
- for (int m = 0; m < results.length; m++)
- {
- Object result = results[m];
- if (result instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile)result;
- flatSet.addResource(file);
- totalByteSize += file.getLength();
- }
- }
- }
- }
- //submonitor.done();
- return totalByteSize;
- }
-
- protected long getFlatWorkspaceResourceSet(List resources, SystemWorkspaceResourceSet flatSet, IProgressMonitor monitor)
- {
- long totalBytes = 0;
- for (int i = 0; i < resources.size(); i++)
- {
- IResource resource = (IResource)resources.get(i);
- if (resource instanceof IFile)
- {
- IFile file = (IFile)resource;
- flatSet.addResource(file);
- File osFile = file.getLocation().toFile();
- totalBytes += osFile.length();
- }
- else if (resource instanceof IContainer)
- {
- IContainer container = (IContainer)resource;
- try
- {
- IResource[] members = container.members();
- totalBytes += getFlatWorkspaceResourceSet(members, flatSet, monitor);
- }
- catch (Exception e)
- {
- }
- }
- }
- return totalBytes;
- }
-
- protected long getFlatWorkspaceResourceSet(IResource[] resources, SystemWorkspaceResourceSet flatSet, IProgressMonitor monitor)
- {
- long totalBytes = 0;
- for (int i = 0; i < resources.length; i++)
- {
- IResource resource = resources[i];
- if (resource instanceof IFile)
- {
- IFile file = (IFile)resource;
- flatSet.addResource(file);
- File osFile = file.getLocation().toFile();
- totalBytes += osFile.length();
- }
- else if (resource instanceof IContainer)
- {
- IContainer container = (IContainer)resource;
- try
- {
- IResource[] members = container.members();
- totalBytes += getFlatWorkspaceResourceSet(members, flatSet, monitor);
- }
- catch (Exception e)
- {
- }
- }
- }
- return totalBytes;
- }
-
-
-
- public static class RenameRunnable implements Runnable
- {
- private IRemoteFile _targetFileOrFolder;
- private String _newName;
- public RenameRunnable(IRemoteFile targetFileOrFolder)
- {
- _targetFileOrFolder = targetFileOrFolder;
- }
-
- public void run() {
- ValidatorFileUniqueName validator = null;
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(null, true, _targetFileOrFolder, validator); // true => copy-collision-mode
-
- dlg.open();
- if (!dlg.wasCancelled())
- _newName = dlg.getNewName();
- else
- _newName = null;
- }
-
- public String getNewName()
- {
- return _newName;
- }
- }
-
- /**
- * 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
- * @param sameSystem indication of whether the source and target are on the same system
- * @param srcType the type of objects to be dropped
- * @param monitor the progress monitor
- *
- * @return the set of new objects created from the drop
- *
- */
- public ISystemResourceSet doDrop(ISystemResourceSet fromSet, Object target, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
- {
- SystemRemoteResourceSet resultSet = new SystemRemoteResourceSet(getSubSystem(target), this);
-
- if (!sameSystem && sameSystemType)
- {
- fromSet = doDrag((SystemRemoteResourceSet)fromSet, monitor);
- }
-
- if (target instanceof IRemoteFile)
- {
- IRemoteFile targetFolder = (IRemoteFile) target;
- IRemoteFileSubSystem targetFS = targetFolder.getParentRemoteFileSubSystem();
-
- // make sure properties are uptodate
- try
- {
- //targetFolder.markStale(true);
- targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath());
- }
- catch (Exception e)
- {
- }
-
- if (!targetFolder.canWrite())
- {
- SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR);
- errorMsg.makeSubstitution(targetFS.getHostAliasName());
- resultSet.setMessage(errorMsg);
- return resultSet;
- }
-
- if (!targetFS.isConnected())
- {
- return null;
- }
-
- List set = fromSet.getResourceSet();
- if (set.size() > 0)
- {
- if (fromSet instanceof SystemWorkspaceResourceSet)
- {
- boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER);
- if (!doSuperTransferProperty)
- {
- SystemWorkspaceResourceSet flatFromSet = new SystemWorkspaceResourceSet();
- long totalByteSize = getFlatWorkspaceResourceSet(fromSet.getResourceSet(), flatFromSet, monitor);
-
- if (monitor != null)
- {
- int size = (int)totalByteSize;
- monitor.beginTask(_uploadMessage.getLevelOneText(), size);
- }
- // back to hierarchy
- return UniversalFileTransferUtility.copyWorkspaceResourcesToRemote((SystemWorkspaceResourceSet)fromSet, targetFolder, monitor, true);
- }
- else
- {
- return UniversalFileTransferUtility.copyWorkspaceResourcesToRemote((SystemWorkspaceResourceSet)fromSet, targetFolder, monitor, true);
- }
- }
- else if (fromSet instanceof SystemRemoteResourceSet)
- {
- SystemRemoteResourceSet rmtSet = (SystemRemoteResourceSet)fromSet;
-
- //ISystemDragDropAdapter srcAdapter = rmtSet.getAdapter();
- ISubSystem srcSubSystem = rmtSet.getSubSystem();
-
- Object first = set.get(0);
- if (first instanceof ISystemFilterReference)
- {
- SystemWorkspaceResourceSet downloadedFilterResults = new SystemWorkspaceResourceSet();
- for (int i = 0; i < set.size(); i++)
- {
- ISystemFilterReference ref = (ISystemFilterReference)set.get(i);
- SystemFilterReference filterReference = (SystemFilterReference) ref;
-
-
- Object[] children = null;
- try
- {
- children = ((SubSystem)srcSubSystem).internalResolveFilterStrings(monitor, filterReference.getReferencedFilter().getFilterStrings());
- }
- catch (Exception e)
- {
- }
-
- for (int c = 0; c < children.length; c++)
- {
- Object child = children[c];
-
- if (child instanceof IAdaptable)
- {
- Object newSrc = child;
-
- if (srcSubSystem != targetFS)
- {
- ISystemDragDropAdapter cAdapter = (ISystemDragDropAdapter) ((IAdaptable) child).getAdapter(ISystemDragDropAdapter.class);
- newSrc = cAdapter.doDrag(child, sameSystemType, monitor);
- if (newSrc instanceof SystemMessage)
- {
- resultSet.setMessage((SystemMessage)newSrc);
- return resultSet;
- }
- else
- {
- downloadedFilterResults.addResource(newSrc);
- }
- }
- }
- }
- }
-
- return doDrop(downloadedFilterResults, target, sameSystemType, srcSubSystem == targetFS, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE, monitor);
-
- }
- else if (first instanceof IRemoteFile)
- {
- List toCopy = new ArrayList();
- List toCopyNames = new ArrayList();
- List toCopyBatch = new ArrayList();
-
- for (int i = 0; i < set.size(); i++)
- {
- IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);
- if (!srcFileOrFolder.exists())
- {
- SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFileOrFolder.getSystemConnection().getAliasName());
- resultSet.setMessage(errorMessage);
- return resultSet;
- }
- /* DKM - not sure what this is doing here...
- * maybe there used to be a check for an archive
- if (!srcFileOrFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement())
- {
- SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_ARCHIVEMANAGEMENT_NOTSUPPORTED);
- resultSet.setMessage(errorMessage);
- return resultSet;
- }
- */
-
-
- String name = srcFileOrFolder.getName();
-
- // same systemfor
- if (sameSystem)
- {
- try
- {
- if (!targetFolder.getAbsolutePath().equals(srcFileOrFolder.getAbsolutePath()))
- {
-
- // should be better doing a query for all in the set
- IRemoteFile existingFileOrFolder = ((IRemoteFileSubSystem)srcSubSystem).getRemoteFileObject(targetFolder, name);
- if (existingFileOrFolder.exists())
- {
- RenameRunnable rr = new RenameRunnable(existingFileOrFolder);
- Display.getDefault().syncExec(rr);
- name = rr.getNewName();
-
- if (name != null)
- {
- toCopy.add(srcFileOrFolder);
- toCopyNames.add(name);
- }
- }
- else if (name != null)
- {
- toCopyBatch.add(srcFileOrFolder);
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- else // why not same system? should we even get here?
- {
- //System.out.println("HOW DID I GET HERE?!!");
- }
- }
-
- for (int x = 0; x < toCopy.size(); x++)
- {
-
- IRemoteFile srcFileOrFolder = (IRemoteFile)toCopy.get(x);
- String name = (String)toCopyNames.get(x);
-
- /*
- SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS);
- copyMessage.makeSubstitution(srcFileOrFolder.getName(), targetFolder.getName());
- if (monitor != null)
- {
- monitor.beginTask(copyMessage.getLevelOneText(), 100);
- }
- */
- try
- {
- if (targetFS.copy(srcFileOrFolder, targetFolder, name, monitor))
- {
- IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name);
- resultSet.addResource(copiedFile);
- }
- else
- {
- // need a failed message here
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_FILE_FAILED);
- msg.makeSubstitution(srcFileOrFolder.getAbsolutePath());
- resultSet.setMessage(msg);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- // deal with batch copies now
- IRemoteFile[] srcFileOrFolders = new IRemoteFile[toCopyBatch.size()];
- for (int x = 0; x < toCopyBatch.size(); x++)
- {
- srcFileOrFolders[x] = (IRemoteFile)toCopyBatch.get(x);
- }
- if (toCopyBatch.size() > 0)
- {
- try
- {
- if (targetFS.copyBatch(srcFileOrFolders, targetFolder, monitor))
- {
- for (int x = 0; x < toCopyBatch.size(); x++)
- {
- IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, srcFileOrFolders[x].getName());
- resultSet.addResource(copiedFile);
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- }
- }
- return resultSet;
- }
-
- /**
- * Perform a copy via drag and drop.
- * @param src the object to be copied. If the target and source are not on the same system, then this is a
- * temporary object produced by the doDrag.
- * @param target the object to be copied to.
- * @param sameSystem an indication whether the target and source reside on the same type of system
- * @param srcType type of source being transferred
- * @param monitor the progress monitor
- * @return an indication whether the operation was successful or not.
- */
- public Object doDrop(Object src, Object target, boolean sameSystemType, boolean sameSystem, int sourceType, IProgressMonitor monitor)
- {
- Object result = null;
-
- // same system type but not necessarily same computer
- if (sameSystemType && !sameSystem)
- {
- src = doDrag(src, sameSystem, monitor);
- }
-
-
- if (target instanceof IRemoteFile)
- {
- IRemoteFile targetFolder = (IRemoteFile) target;
- IRemoteFileSubSystem targetFS = targetFolder.getParentRemoteFileSubSystem();
-
- // make sure properties are uptodate
- try
- {
- //targetFolder.markStale(true);
- targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath());
- }
- catch (Exception e)
- {
- }
-
- if (!targetFolder.canWrite())
- {
- SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR);
- errorMsg.makeSubstitution(targetFS.getHostAliasName());
- return errorMsg;
- }
-
- if (!targetFS.isConnected())
- {
- return null;
- }
-
- // non-Eclipse file transfer
-
- if (sourceType == SystemDNDTransferRunnable.SRC_TYPE_OS_RESOURCE)
- {
- if (src instanceof String)
- {
- IRemoteFileSubSystem localFS = getLocalFileSubSystem();
-
- try
- {
- if (localFS != null) {
- IRemoteFile srcFileOrFolder = localFS.getRemoteFileObject((String)src);
- return doDrop(srcFileOrFolder, target, true, sameSystem, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE, monitor);
- }
- else {
- File srcFileOrFolder = new File((String)src);
- return doDrop(srcFileOrFolder, target, true, sameSystem, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE, monitor);
- }
- }
- catch (SystemMessageException e)
- {
- return e.getSystemMessage();
- }
- }
- }
- if (sourceType == SystemDNDTransferRunnable.SRC_TYPE_TEXT)
- {
- if (src instanceof String)
- {
- // noop for now
- }
- }
-
-
- if (sourceType == SystemDNDTransferRunnable.SRC_TYPE_ECLIPSE_RESOURCE || sourceType == SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE)
- {
- // Eclipse resource transfer
- if (src instanceof IResource)
- {
- IResource srcFileOrFolder = (IResource) src;
- return UniversalFileTransferUtility.copyWorkspaceResourceToRemote(srcFileOrFolder, targetFolder, monitor, true);
- }
- }
-
-
- // RSE remote file transfer on same system
- if (sourceType == SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE)
- {
- if (src instanceof ISystemFilterReference)
- {
- SystemFilterReference filterReference = (SystemFilterReference) src;
- Object adapter = filterReference.getAdapter(ISystemViewElementAdapter.class);
- ISystemViewElementAdapter filterAdapter = (ISystemViewElementAdapter) adapter;
- if (filterAdapter != null)
- {
- SubSystem filterSubSystem = (SubSystem) filterAdapter.getSubSystem(filterReference);
- Object[] children = null;
- try
- {
- children = filterSubSystem.internalResolveFilterStrings(monitor, filterReference.getReferencedFilter().getFilterStrings());
- }
- catch (Exception e)
- {
- }
-
- for (int c = 0; c < children.length; c++)
- {
- Object child = children[c];
-
- if (child instanceof IAdaptable)
- {
- Object newSrc = child;
-
- if (filterSubSystem != targetFS)
- {
- ISystemDragDropAdapter cAdapter = (ISystemDragDropAdapter) ((IAdaptable) child).getAdapter(ISystemDragDropAdapter.class);
- newSrc = cAdapter.doDrag(child, sameSystemType, monitor);
- if (newSrc instanceof SystemMessage)
- {
- return newSrc;
- }
- }
- doDrop(newSrc, target, sameSystemType, filterSubSystem == targetFS, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE, monitor);
- }
- }
- return target;
- }
- }
- else if (src instanceof IRemoteFile)
- {
- try
- {
- IRemoteFile srcFileOrFolder = (IRemoteFile) src;
- if (!srcFileOrFolder.exists())
- {
- SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFileOrFolder.getSystemConnection().getAliasName());
- return errorMessage;
- }
-
- SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS);
- copyMessage.makeSubstitution(srcFileOrFolder.getName(), targetFolder.getAbsolutePath());
-
- IRemoteFileSubSystem localFS = srcFileOrFolder.getParentRemoteFileSubSystem();
-
- String name = srcFileOrFolder.getName();
-
- if (localFS == targetFS)
- {
- if (!targetFolder.getAbsolutePath().equals(srcFileOrFolder.getAbsolutePath()))
- {
- IRemoteFile existingFileOrFolder = localFS.getRemoteFileObject(targetFolder, name);
-
- if (existingFileOrFolder.exists())
- {
- RenameRunnable rr = new RenameRunnable(existingFileOrFolder);
- Display.getDefault().syncExec(rr);
- name = rr.getNewName();
- }
-
- if (name != null)
- {
- monitor.subTask(copyMessage.getLevelOneText());
- if (targetFS.copy(srcFileOrFolder, targetFolder, name, monitor))
- {
- IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name);
- return copiedFile;
-
- }
- }
- }
- }
- else
- {
-
- //System.out.println("how do we get here!??");
-
- if (srcFileOrFolder.isFile())
- {
- try
- {
- name = checkForCollision(getShell(), targetFolder, name);
- if (name == null)
- {
- return null;
- }
-
- boolean isTargetArchive = targetFolder.isArchive();
- StringBuffer newPathBuf = new StringBuffer(targetFolder.getAbsolutePath());
- if (isTargetArchive)
- {
- newPathBuf.append(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- }
- else
- {
- newPathBuf.append(targetFolder.getSeparatorChar());
- }
- newPathBuf.append(name);
-
- String newPath = newPathBuf.toString();
-
- monitor.subTask(copyMessage.getLevelOneText());
- targetFS.upload(srcFileOrFolder.getAbsolutePath(), newPath, monitor);
-
- result = targetFS.getRemoteFileObject(targetFolder, name);
- return result;
-
- }
- catch (RemoteFileIOException e)
- {
- return e.getSystemMessage();
-
- }
- catch (RemoteFileSecurityException e)
- {
- return e.getSystemMessage();
- }
- catch (Exception e)
- {
- }
-
- return null;
- }
- else
- {
- // this is a directory
- // recursively copy
- boolean isTargetArchive = targetFolder.isArchive();
- StringBuffer newPathBuf = new StringBuffer(targetFolder.getAbsolutePath());
- if (isTargetArchive)
- {
- newPathBuf.append(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- }
- else
- {
- newPathBuf.append(targetFolder.getSeparatorChar());
- }
- newPathBuf.append(name);
-
- String newPath = newPathBuf.toString();
-
- IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath);
- targetFS.createFolder(newTargetFolder);
-
- IRemoteFile[] children = localFS.listFoldersAndFiles(srcFileOrFolder, monitor);
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- if (monitor.isCanceled())
- {
- return null;
- }
- else
- {
- IRemoteFile child = children[i];
- if (doDrop(child, newTargetFolder, sameSystemType, sameSystem, sourceType, monitor) == null)
- {
- return null;
- }
- }
- }
- }
-
- return newTargetFolder;
- }
- }
- }
- catch (SystemMessageException e)
- {
- return e.getSystemMessage();
- }
- }
- }
- }
- else
- {
- result = null;
- }
-
- return result;
- }
-
- protected String checkForCollision(Shell shell, IRemoteFile targetFolder, String oldName)
- {
- String newName = oldName;
-
- try
- {
-
- IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem();
- IRemoteFile targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName);
-
- //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())
- {
- RenameRunnable rr = new RenameRunnable(targetFileOrFolder);
- Display.getDefault().syncExec(rr);
- newName = rr.getNewName();
- }
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("SystemCopyRemoteFileAction.checkForCollision()", e); //$NON-NLS-1$
- }
-
- return newName;
- }
-
- // FOR COMMON DELETE ACTIONS
- /**
- * Yes, remote file objects are deletable!
- */
- public boolean canDelete(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- //System.out.println("INSIDE CANDELETE FOR ADAPTER: RETURNING " + !file.isRoot());
- return !file.isRoot() && file.canRead();
- }
- /**
- * Perform the delete action. Defers request to the remote file subsystem
- * @deprecated use the one with monitor now
- */
- public boolean doDelete(Shell shell, Object element) throws Exception
- {
- return doDelete(shell, element, null);
- }
-
- /**
- * Perform the delete action. Defers request to the remote file subsystem
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception
- {
- boolean ok;
- IRemoteFile file = (IRemoteFile) element;
- IRemoteFile parentFile = file.getParentRemoteFile();
-
- IRemoteFileSubSystem ss = file.getParentRemoteFileSubSystem();
- try
- {
- // DKM - propagate the deletion to temp files project
- IResource tmp = UniversalFileTransferUtility.getTempFileFor(file);
- if (tmp.exists())
- {
- try
- {
- tmp.delete(false, null);
- }
- catch (Exception e)
- {
- }
- }
-
- /*
-
- ISystemEditableRemoteObject editable = getEditableRemoteObject(file);
- if (editable != null)
- {
- try
- {
- if (editable.checkOpenInEditor() == ISystemEditableRemoteObject.OPEN_IN_SAME_PERSPECTIVE)
- {
- // for now, leave this
- }
- else
- {
- IFile localfile = editable.getLocalResource();
- if (localfile != null)
- {
- // delete this too
- localfile.delete(true, null);
- }
- }
- }
- catch (Exception e)
- {
-
- }
- }
- */
- ok = ss.delete(file, monitor);
-
- file.markStale(true);
- parentFile.markStale(true);
- }
- catch (Exception exc)
- {
- ok = false;
- SystemMessageDialog.displayErrorMessage(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_DELETE_FILE_FAILED).makeSubstitution(file.toString()));
- }
- return ok;
- }
-
- /**
- * Perform the delete action. Defers request to the remote file subsystem
- */
- public boolean doDeleteBatch(Shell shell, List resourceSet, IProgressMonitor monitor) throws Exception
- {
- boolean ok;
- IRemoteFileSubSystem ss = null;
- IRemoteFile[] files = new IRemoteFile[resourceSet.size()];
- for (int i = 0; i < resourceSet.size(); i++)
- {
- IRemoteFile file = (IRemoteFile) resourceSet.get(i);
- files[i] = file;
- IRemoteFile parentFile = file.getParentRemoteFile();
- if (ss == null) ss = file.getParentRemoteFileSubSystem();
- try
- {
- // DKM - propagate the deletion to temp files project
- IResource tmp = UniversalFileTransferUtility.getTempFileFor(file);
- if (tmp.exists())
- {
- try
- {
- tmp.delete(false, null);
- }
- catch (Exception e)
- {
- }
- }
- file.markStale(true);
- parentFile.markStale(true);
- }
- catch (Exception exc)
- {
- ok = false;
- SystemMessageDialog.displayErrorMessage(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_DELETE_FILE_FAILED).makeSubstitution(file.toString()));
- }
- }
- ok = ss.deleteBatch(files, monitor);
- return ok;
- }
- // FOR COMMON RENAME ACTIONS
- /**
- * Yes, remote file objects are renamable!
- */
- public boolean canRename(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- return !file.isRoot() && file.canRead();
- }
-
- private void moveTempResource(IResource localResource, IPath newLocalPath, IRemoteFileSubSystem ss, String newRemotePath)
- {
- if (localResource != null)
- {
- try
- {
- moveTempFileProperties(localResource, ss, newRemotePath);
- localResource.move(newLocalPath, true, null);
-
- }
- catch (Exception e)
- {
- }
-
- }
- }
-
- private void moveTempFileProperties(IResource localResource, IRemoteFileSubSystem ss, String remotePath)
- {
-
- if (localResource instanceof IContainer)
- {
- IContainer localContainer = (IContainer) localResource;
- try
- {
- IResource[] members = localContainer.members();
- for (int i = 0; i < members.length; i++)
- {
- IResource member = members[i];
- moveTempFileProperties(member, ss, remotePath + "/" + member.getName()); //$NON-NLS-1$
- }
- }
- catch (Exception e)
- {
- }
- }
- else if (localResource instanceof IFile)
- {
- IFile localFile = (IFile)localResource;
- try
- {
- SystemIFileProperties properties = new SystemIFileProperties(localFile);
- properties.setRemoteFilePath(remotePath);
-
- Object editableObj = properties.getRemoteFileObject();
- if (editableObj != null)
- {
- SystemEditableRemoteFile editable = (SystemEditableRemoteFile)editableObj;
- // there's an in-memory editable, so change the associated remote file
- IRemoteFile newRemoteFile = ss.getRemoteFileObject(remotePath);
- editable.setRemoteFile(newRemoteFile);
- }
- }
- catch (Exception e)
- {
- }
-
- }
-
- }
-
- /**
- * Perform the rename action. Defers request to the remote file subsystem
- */
- public boolean doRename(Shell shell, Object element, String newName) throws Exception
- {
- boolean ok = true;
- IRemoteFile file = (IRemoteFile) element;
- IRemoteFileSubSystem ss = file.getParentRemoteFileSubSystem();
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- try
- {
-
- String newRemotePath = file.getParentPath() + "/" + newName; //$NON-NLS-1$
- IResource localResource = null;
- if (SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist())
- {
- localResource = UniversalFileTransferUtility.getTempFileFor(file);
- }
-
- ss.rename(file, newName);
- if (localResource != null && localResource.exists())
- {
-
- IPath newLocalPath = localResource.getParent().getFullPath().append(newName);
- moveTempResource(localResource, newLocalPath, ss, newRemotePath);
- }
-
- if (file.isDirectory())
- {
- // update all tree views showing this remote folder...
- // Hmm, why do we do this, given SystemView sends a rename event? I think we needed to refresh all child cached references to parent folder name...
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(file.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null);
- sr.fireEvent(event);
- //sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, file, file.getParentRemoteFile(), file.getParentRemoteFileSubSystem(), null, null);
- }
- file.markStale(true);
-
- }
- catch (Exception exc)
- {
- ok = false;
- SystemMessageDialog.displayErrorMessage(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_RENAME_FILE_FAILED).makeSubstitution(file.toString()));
- }
- return ok;
- }
-
- /**
- * Return a validator for verifying the new name is correct.
- * Defers request to the subsystem factory, calling either getFileNameValidator or getFolderNameValidator.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- if (element instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) element;
- if (file.isDirectory())
- return file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().getFolderNameValidator();
- else
- return file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().getFileNameValidator();
- }
- return null;
- }
- /**
- * Parent override.
- * <p>
- * Form and return a new canonical (unique) name for this object, given a candidate for the new
- * name. This is called by the generic multi-rename dialog to test that all new names are unique.
- * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
- * <p>
- * Returns newName, but uppercased for Windows file systems
- */
- public String getCanonicalNewName(Object element, String newName)
- {
- if (element instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) element;
- if (file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().isUnixStyle())
- return newName;
- else
- return newName.toUpperCase();
- }
- else
- return newName;
- }
- /**
- * Parent override.
- * <p>
- * Compare the name of the given element to the given new name to decide if they are equal.
- * Allows adapters to consider case and quotes as appropriate.
- * <p>
- * For Unix/Linux, returns the result of getName(element).equals(newName), which is to say,
- * it is a case sensitive compare. For windows, it is case insensitive (equalsIgnoreCase).
- */
- public boolean namesAreEqual(Object element, String newName)
- {
- if (element instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) element;
- if (file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().isUnixStyle())
- return getName(element).equals(newName);
- else
- return getName(element).equalsIgnoreCase(newName);
- }
- else
- return super.namesAreEqual(element, newName);
- }
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
- /**
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element)
- {
- return ISystemMementoConstants.MEMENTO_KEY_REMOTE;
- }
-
- // --------------------------------------------------------------------
- // METHODS PRESCRIBED BY THE ISYSTEMREMOTEELEMENT ADAPTER INTERFACE...
- // --------------------------------------------------------------------
- /**
- * Return fully qualified name that uniquely identifies this object within its subsystem
- */
- public String getAbsoluteName(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- return file.getAbsolutePath();
- }
- /**
- * Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem
- */
- public String getAbsoluteParentName(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- return file.getParentPath();
- }
-
- /**
- * Return subsystem
- */
- public ISubSystem getSubSystem(Object element)
- {
- if (element instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) element;
- return file.getParentRemoteFileSubSystem();
- }
- return null;
- }
- /**
- * Return the subsystem factory id that owns this remote object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getSubSystemConfigurationId(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- return file.getParentRemoteFileSubSystem().getSubSystemConfiguration().getId();
- }
-
- /**
- * Return a value for the type category property for this object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteTypeCategory(Object element)
- {
- return ISystemFileRemoteTypes.TYPECATEGORY;
- }
- /**
- * Return the untranslated type for this object.
- * For files, returns the "file"
- * For folders or roots, returns "folder"
- */
- public String getRemoteType(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- if (!file.isRoot() && !file.isDirectory())
- return ISystemFileRemoteTypes.TYPE_FILE;
- else
- return ISystemFileRemoteTypes.TYPE_FOLDER;
- }
- /**
- * Return the untranslated subtype for this object.
- * For files, returns the file extension. Eg, for abc.java this returns "java".
- * For folders, returns "root" or "subfolder"
- */
- public String getRemoteSubType(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- if (file.isFile())
- return file.getExtension();
- else if (file.isRoot())
- return ISystemFileRemoteTypes.SUBTYPE_ROOT;
- else
- return ISystemFileRemoteTypes.SUBTYPE_SUBFOLDER;
- }
- /**
- * Return the untranslated sub-subtype for this object.
- * Returns null for now.
- */
- public String getRemoteSubSubType(Object element)
- {
- return null;
- }
- /**
- * Return the source type of the selected object. Typically, this only makes sense for compilable
- * source members. For non-compilable remote objects, this typically just returns null.
- * <p>
- * For files, this returns the extension. For folders, it returns null.
- */
- public String getRemoteSourceType(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- String srcType = null;
- if (file.isFile())
- {
- srcType = file.getExtension();
- if (srcType == null)
- srcType = "blank"; //$NON-NLS-1$
- else if (srcType.length() == 0)
- srcType = "null"; //$NON-NLS-1$
- }
- return srcType;
- }
- /**
- * Some view has updated the name or properties of this remote object. As a result, the
- * remote object's contents need to be refreshed. You are given the old remote object that has
- * old data, and you are given the new remote object that has the new data. For example, on a
- * rename the old object still has the old name attribute while the new object has the new
- * new attribute.
- * <p>
- * This is called by viewers like SystemView in response to rename and property change events.
- * <p>
- * @param oldElement the element that was found in the tree
- * @param newElement the updated element that was passed in the REFRESH_REMOTE event
- * @return true if you want the viewer that called this to refresh the children of this object,
- * such as is needed on a rename of a folder, say.
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- if ((oldElement instanceof RemoteFile) && (newElement instanceof IRemoteFile))
- {
- RemoteFile oldFile = (RemoteFile)oldElement;
- RemoteFile newFile = (RemoteFile)newElement;
-
- if ((oldFile != newFile) && (oldFile.isFile()) && (newFile.isFile())) {
- oldFile.getHostFile().renameTo(newFile.getAbsolutePath());
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Given a remote object, returns it remote parent object. Eg, given a file, return the folder
- * it is contained in.
- * <p>
- * The shell is required in order to set the cursor to a busy state if a remote trip is required.
- *
- * @return an IRemoteFile object for the parent
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- return ((IRemoteFile) element).getParentRemoteFile();
- }
- /**
- * Given a remote object, return the unqualified names of the objects contained in that parent. This is
- * used for testing for uniqueness on a rename operation, for example. Sometimes, it is not
- * enough to just enumerate all the objects in the parent for this purpose, because duplicate
- * names are allowed if the types are different, such as on iSeries. In this case return only
- * the names which should be used to do name-uniqueness validation on a rename operation.
- *
- * @return an array of all file and folder names in the parent of the given IRemoteFile object
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
- {
- String[] names = EMPTY_STRING_LIST;
-
- IRemoteFile file = (IRemoteFile) element;
- String parentName = file.getParentPath();
- if (parentName == null) // given a root?
- return names; // not much we can do. Should never happen: you can't rename a root!
-
- // DKM - changed this so that we can take advantage of caching
- Object[] children = getChildren(file.getParentRemoteFile());
- if ((children == null) || (children.length == 0))
- return names;
-
- names = new String[children.length];
- for (int idx = 0; idx < names.length; idx++)
- {
- names[idx] = ((IRemoteFile) children[idx]).getName();
- }
-
- return names;
- }
-
- /**
- * User has double clicked on an object. We want to open the object in the applicable editor.
- * Return true to indicate that we are handling the double-click event.
- */
- public boolean handleDoubleClick(Object element)
- {
- IRemoteFile remoteFile = (IRemoteFile) element;
- if (!remoteFile.canRead())
- {
- return false;
- }
- /** FIXME commands now separate from this
- else if (testAttribute(remoteFile, "classification", "*executable*") ||
- testAttribute(remoteFile, "classification", "*script") ||
- testAttribute(remoteFile, "classification", "symbolic link(script)*")
- )
- {
- // instead of opening in editor
- // attempt to execute it
- return RemoteCommandHelpers.runUniversalCommand(getShell(), remoteFile.getName(), remoteFile.getParentPath(),
- remoteFile.getParentRemoteFileSubSystem().getCommandSubSystem());
- }
- */
- else if (!remoteFile.isArchive() || !remoteFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement())
- {
- // only handle double click if object is a file
- ISystemEditableRemoteObject editable = getEditableRemoteObject(remoteFile);
- if (editable != null)
- {
- try
- {
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.OPEN_IN_SAME_PERSPECTIVE)
- {
- if (isFileCached(editable, remoteFile))
- {
- editable.openEditor();
- }
- else
- {
- DownloadJob oJob = new DownloadJob(editable, false);
- oJob.schedule();
- }
- }
- else
- {
- editable.setLocalResourceProperties();
- editable.openEditor();
- }
- }
- catch (Exception e)
- {
- }
-
-
- }
- else if (remoteFile.isDirectory())
- {
- return false;
- }
-
- //SystemDoubleClickEditAction editAction = new SystemDoubleClickEditAction(element);
- //editAction.run();
- return true;
- }
- else
- { // if object is a folder, do not handle it
- return false;
- }
- }
-
- private boolean isFileCached(ISystemEditableRemoteObject editable, IRemoteFile remoteFile)
- {
- // DY: check if the file exists and is read-only (because it was previously opened
- // in the system editor)
- IFile file = editable.getLocalResource();
- SystemIFileProperties properties = new SystemIFileProperties(file);
- boolean newFile = !file.exists();
-
- // detect whether there exists a temp copy already
- if (!newFile && file.exists())
- {
- // we have a local copy of this file, so we need to compare timestamps
-
- // get stored modification stamp
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // get updated remoteFile so we get the current remote timestamp
- //remoteFile.markStale(true);
- IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
- try
- {
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath());
- }
- catch (Exception e)
- {
-
- }
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (storedModifiedStamp != remoteModifiedStamp);
- return (!dirty && !remoteNewer);
- }
- return false;
- }
-
- public boolean canEdit(Object element)
- {
- IRemoteFile remoteFile = (IRemoteFile) element;
- if (remoteFile.isFile())
- {
- return remoteFile.canRead();
- }
- return false;
- }
-
- public ISystemEditableRemoteObject getEditableRemoteObject(Object element)
- {
- RemoteFile remoteFile = (RemoteFile) element;
- if (remoteFile.isFile())
- {
- try
- {
- IFile file = getCachedCopy(remoteFile);
- if (file != null)
- {
- SystemIFileProperties properties = new SystemIFileProperties(file);
- Object obj = properties.getRemoteFileObject();
- if (obj != null && obj instanceof ISystemEditableRemoteObject)
- {
- ISystemEditableRemoteObject rmtObj = (ISystemEditableRemoteObject) obj;
- IAdaptable rmtFile = rmtObj.getRemoteObject();
- if (rmtFile instanceof IRemoteFile)
- {
- //((IRemoteFile)rmtFile).markStale(true);
- }
- return rmtObj;
- }
- }
-
- return new SystemEditableRemoteFile(remoteFile);
- }
- catch (Exception e)
- {
- }
- }
- return null;
- }
-
- public IFile getCachedCopy(IRemoteFile remoteFile) throws SystemMessageException
- {
- if (SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist())
- {
- IResource replica = UniversalFileTransferUtility.getTempFileFor(remoteFile);
- if (replica != null && replica.exists())
- {
- return (IFile)replica;
- }
- }
- return null;
- }
-
- /**
- * Return a filter string that corresponds to this object.
- * @param object the object to obtain a filter string for
- * @return the corresponding filter string if applicable
- */
- public String getFilterStringFor(Object object)
- {
- if (object instanceof IRemoteFile)
- {
- IRemoteFile remoteFile = (IRemoteFile) object;
- if (remoteFile.isDirectory())
- {
- return remoteFile.getAbsolutePath() + remoteFile.getSeparator() + "*"; //$NON-NLS-1$
- }
- else
- {
- return remoteFile.getAbsolutePath();
- }
- }
- return null;
- }
-
- /**
- * From <samp>IActionFilter</samp>, it exposes properties for decorator and popupMenus extension points.
- * <p>
- * <ol>
- * <li>name="name". The given value must match the name exactly or if ends with an asterisk the beginning must match.
- * (case sensitiveness depends on the subsystem)</li>
- * <li>name="absolutePath". The given value must match the absolute path exactly or if ends with an asterisk the beginning must match.
- * (case sensitiveness depends on the subsystem)</li>
- * <li>name="extension". The given value must match the extension exactly or if ends with an asterisk the beginning must match.
- * (case sensitiveness depends on the subsystem)</li>
- * <li>name="isRoot". If the given value is <code>true</code>, then returns <code>true</code> if the target is a root file.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not root.</li>
- * <li>name="isFile". If the given value is <code>true</code>, then returns <code>true</code> if the target is a file.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not a file.</li>
- * <li>name="isDirectory". If the given value is <code>true</code>, then returns <code>true</code> if the target is a directory.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not a directory.</li>
- * <li>name="isHidden". If the given value is <code>true</code>, then returns <code>true</code> if the target is a hidden file.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not a hidden file.</li>
- * <li>name="canRead". If the given value is <code>true</code>, then returns <code>true</code> if the target is readable.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not readable.</li>
- * <li>name="canWrite". If the given value is <code>true</code>, then returns <code>true</code> if the target is writable.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not writable.</li>
- * <li>name="isBinary". If the given value is <code>true</code>, then returns <code>true</code> if the target is a binary file.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not a binary file.</li>
- * <li>name="isText". If the given value is <code>true</code>, then returns <code>true</code> if the target is a text file.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not a text file.</li>
- * <li>name="isArchive". If the given value is <code>true</code>, then returns <code>true</code> if the target is an archive file.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not an archive file.</li>
- * <li>name="isVirtual". If the given value is <code>true</code>, then returns <code>true</code> if the target is a virtual file.
- * If the given value is <code>false</code>, then returns <code>true</code> if the target is not a virtual file.</li>
- * </ol>
- * <p>
- * @see org.eclipse.ui.IActionFilter#testAttribute(java.lang.Object, java.lang.String, java.lang.String)
- */
- public boolean testAttribute(Object target, String name, String value) {
-
- if (target instanceof IRemoteFile)
- {
- IRemoteFile tgt = (IRemoteFile) target;
-
- String inName = name.toLowerCase();
-
-
- if (inName.equals("classification")) //$NON-NLS-1$
- {
- String classification = tgt.getClassification();
-
- if (classification != null)
- {
- return StringCompare.compare(value, classification, true);
- }
- }
- else if (inName.equals("name")) //$NON-NLS-1$
- {
- boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive();
-
- String tgtName = getName(target);
- String val = value;
-
- // if case does not matter, then lower case the compares
- if (!caseSensitive) {
- tgtName = tgtName.toLowerCase();
- val = val.toLowerCase();
- }
-
- // we have a wild card test, and * is the last character in the value
- if (val.endsWith("*")) { //$NON-NLS-1$
- return tgtName.startsWith(val.substring(0, val.length()-1));
- }
- else {
- return val.equals(tgtName);
- }
- }
- else if (inName.equals("absolutePath".toLowerCase())) { //$NON-NLS-1$
-
- boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive();
-
- String tgtPath = getAbsoluteName(target);
- String val = value;
-
- // if case does not matter, then lower case the compares
- if (!caseSensitive) {
- tgtPath = tgtPath.toLowerCase();
- val = val.toLowerCase();
- }
-
- // we have a wild card test, and * is the last character in the value
- if (val.endsWith("*")) { //$NON-NLS-1$
- return tgtPath.startsWith(val.substring(0, val.length()-1));
- }
- else {
- return val.equals(tgtPath);
- }
- }
- else if (inName.equals("extension")) { //$NON-NLS-1$
-
- boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive();
-
- String tgtExtension = tgt.getExtension();
-
- if (tgtExtension == null) {
- return false;
- }
-
- StringTokenizer st = new StringTokenizer(value, " \t\n\r\f,"); //$NON-NLS-1$
-
- String val = null;
-
- while (st.hasMoreTokens()) {
-
- val = st.nextToken();
-
- // if case does not matter, then lower case the compares
- if (!caseSensitive) {
- tgtExtension = tgtExtension.toLowerCase();
- val = val.toLowerCase();
- }
-
- boolean match = false;
-
- // we have a wild card test, and * is the last character in
- // the value
- if (val.endsWith("*")) { //$NON-NLS-1$
- match = tgtExtension.startsWith(val.substring(0, val.length() - 1));
- }
- else {
- match = val.equals(tgtExtension);
- }
-
- // if there is a match, return true, otherwise check against next extension
- if (match) {
- return true;
- }
- }
-
- // return false if no match
- return false;
- }
- else if (inName.equals("isroot")) //$NON-NLS-1$
- {
- return tgt.isRoot() && value.equals("true") || //$NON-NLS-1$
- !tgt.isRoot() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("isfile")) //$NON-NLS-1$
- {
- return tgt.isFile() && value.equals("true") || //$NON-NLS-1$
- !tgt.isFile() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("isdirectory")) //$NON-NLS-1$
- {
- return tgt.isDirectory() && value.equals("true") || //$NON-NLS-1$
- !tgt.isDirectory() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("ishidden")) //$NON-NLS-1$
- {
- return tgt.isHidden() && value.equals("true") || //$NON-NLS-1$
- !tgt.isHidden() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("canread")) //$NON-NLS-1$
- {
- return tgt.canRead() && value.equals("true") || //$NON-NLS-1$
- !tgt.canRead() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("canwrite")) //$NON-NLS-1$
- {
- return tgt.canWrite() && value.equals("true") || //$NON-NLS-1$
- !tgt.canWrite() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("isbinary")) //$NON-NLS-1$
- {
- return tgt.isBinary() && value.equals("true") || //$NON-NLS-1$
- !tgt.isBinary() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("istext")) //$NON-NLS-1$
- {
- return tgt.isText() && value.equals("true") || //$NON-NLS-1$
- !tgt.isText() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("isarchive")) { //$NON-NLS-1$
- return tgt.isArchive() && value.equals("true") || //$NON-NLS-1$
- !tgt.isArchive() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("isvirtual")) //$NON-NLS-1$
- {
- return tgt instanceof IVirtualRemoteFile && value.equals("true") || //$NON-NLS-1$
- !(tgt instanceof IVirtualRemoteFile) && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("isexecutable")) //$NON-NLS-1$
- {
- return tgt.isExecutable() && value.equals("true") || //$NON-NLS-1$
- !tgt.isExecutable() && value.equals("false"); //$NON-NLS-1$
- }
- else if (inName.equals("islink")) //$NON-NLS-1$
- {
- return tgt.isLink() && value.equals("true") || //$NON-NLS-1$
- !tgt.isLink() && value.equals("false"); //$NON-NLS-1$
- }
- }
-
- return super.testAttribute(target, name, value);
- }
-
- /*
- * Return whether deferred queries are supported.
- */
- public boolean supportsDeferredQueries()
- {
- return true;
- }
-
-
- protected SystemFetchOperation getSystemFetchOperation(Object o, IElementCollector collector)
- {
- return new SystemFetchOperation(null, (IAdaptable)o, this, collector, true);
- }
-
- /**
- * Returns <code>false</code> if the file is a virtual file, otherwise defaults to asking the subsystem
- * factory.
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
-
- // if object is an instance of a remote file
- if (object instanceof IRemoteFile) {
-
- IRemoteFile file = (IRemoteFile)object;
-
- // virtual files do not support user defined actions
- if (file instanceof IVirtualRemoteFile) {
- return false;
- }
- else {
- return getSubSystem(object).getSubSystemConfiguration().supportsUserDefinedActions();
- }
- }
- else {
- return getSubSystem(object).getSubSystemConfiguration().supportsUserDefinedActions();
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 2928e7395..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultAdapter.java
+++ /dev/null
@@ -1,790 +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.files.ui.view;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-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.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.files.ui.actions.SystemRemoteFileSearchOpenWithMenu;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes;
-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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemDragDropAdapter;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Adapter class to enable the output of a search to be "live" in that it has actions and properties.
- */
-public class SystemViewRemoteSearchResultAdapter extends AbstractSystemViewAdapter implements ISystemRemoteElementAdapter, ISystemOutputRemoteTypes
-{
-
- public class DelayedGotoSearchResult implements Runnable {
- private IRemoteFile _file;
- private IHostSearchResult _searchResult;
-
- public DelayedGotoSearchResult(IRemoteFile file, IHostSearchResult searchResult) {
- _file = file;
- _searchResult = searchResult;
- }
-
- public void run() {
-
- if (checkEditorOpen()) {
- SystemRemoteFileSearchOpenWithMenu.handleGotoLine(_file, _searchResult);
- }
- else {
- Display.getDefault().asyncExec(this);
- }
- }
-
- private boolean checkEditorOpen()
- {
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchPage persp = desktop.getActiveWorkbenchWindow().getActivePage();
- IEditorPart editor = null;
- String fileName = _file.getAbsolutePath();
- IEditorReference[] editors = persp.getEditorReferences();
- for (int i = 0; i < editors.length; i++)
- {
- IEditorReference ref = editors[i];
- IEditorPart editorp = ref.getEditor(false);
- if (editorp != null)
- {
- IEditorInput einput = editorp.getEditorInput();
- if (einput instanceof IFileEditorInput)
- {
- IFileEditorInput input = (IFileEditorInput) einput;
- IFile efile = input.getFile();
-
- SystemIFileProperties properties = new SystemIFileProperties(efile);
- String comparePath = properties.getRemoteFilePath();
-
- if (comparePath != null && (comparePath.replace('\\','/').equals(fileName.replace('\\','/'))))
- {
- return true;
- }
- }
- }
- }
- return false;
- }
- }
-
-
- protected IPropertyDescriptor[] _propertyDescriptors;
-
-
- private SystemCopyToClipboardAction _copyOutputAction = null;
-
- public SystemViewRemoteSearchResultAdapter() {
- }
-
- /**
- * We should not add common actions such as compile and user actions for this adapter.
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addCommonRemoteActions(org.eclipse.rse.ui.SystemMenuManager, org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
- */
- public void addCommonRemoteActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup) {
-
- if (selection != null && !selection.isEmpty()) {
-
- Iterator iter = selection.iterator();
-
- boolean found = false;
-
- // go through selections and see if there is one IHostSearchResult
- // if there is, we do not add any common remote actions
- while (iter.hasNext()) {
- Object obj = iter.next();
-
- if (obj instanceof IHostSearchResult) {
- found = true;
- break;
- }
- }
-
- if (!found) {
- super.addCommonRemoteActions(menu, selection, shell, menuGroup);
- }
- }
- else {
- super.addCommonRemoteActions(menu, selection, shell, menuGroup);
- }
- }
-
- /**
- * Contributed context menu actions for a remote search result
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- Object firstSelection = selection.getFirstElement();
-
- if (firstSelection != null)
- {
- if (_copyOutputAction == null)
- {
- _copyOutputAction = new SystemCopyToClipboardAction(shell, RSEUIPlugin.getTheSystemRegistry().getSystemClipboard());
- }
- menu.add(menuGroup, _copyOutputAction);
-
- if (selection.size() == 1)
- {
- if (firstSelection instanceof IHostSearchResult)
- {
- // IHostSearchResult result = (IHostSearchResult) firstSelection;
- //SystemSearchCreateEditLineActions createActions = new SystemSearchCreateEditLineActions();
- //createActions.create(menu, selection, shell, menuGroup);
- MenuManager submenu = new MenuManager(FileResources.ResourceNavigator_openWith, ISystemContextMenuConstants.GROUP_OPENWITH);
-
- SystemRemoteFileSearchOpenWithMenu openWithMenu = new SystemRemoteFileSearchOpenWithMenu();
- openWithMenu.updateSelection(selection);
- submenu.add(openWithMenu);
- menu.getMenuManager().appendToGroup(ISystemContextMenuConstants.GROUP_OPENWITH, submenu);
- }
- }
- }
- else
- {
- return;
- }
- }
-
- /**
- * Returns the parent of the search result (i.e. IHostSearchResults)
- */
- public Object getParent(Object element)
- {
- if (element instanceof IHostSearchResult)
- {
- IHostSearchResult output = (IHostSearchResult) element;
- return output.getParent();
- }
- return null;
- }
-
- /**
- * Returns the display text for this search result
- */
- public String getText(Object element)
- {
- if (element instanceof IHostSearchResult)
- {
- IHostSearchResult output = (IHostSearchResult) element;
- return output.getText();
- }
-
- return null;
- }
-
- /**
- * Returns nothing
- */
- public String getType(Object element)
- {
- return null;
- }
-
- /**
- * Returns nothing
- */
- public Object[] getChildren(Object element)
- {
- return null;
- }
-
- /**
- * Returns false.
- */
- public boolean hasChildren(Object element)
- {
- return false;
- }
-
- /**
- * Returns the associated remote file for a search result
- * @param output the search result
- * @return the associated remote file
- */
- public static IRemoteFile outputToFile(IHostSearchResult output)
- {
- return (IRemoteFile)output.getParent();
- }
-
-
- /**
- * Opens the appropriate editor for a remote search result object
- */
- public boolean handleDoubleClick(Object element)
- {
- boolean result = false;
- if (element instanceof IHostSearchResult)
- {
-
- IHostSearchResult searchResult = (IHostSearchResult) element;
- IRemoteFile file = outputToFile(searchResult);
- if (file != null && file.isFile())
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)file).getAdapter(ISystemViewElementAdapter.class);
- result = adapter.handleDoubleClick(file);
- int line = searchResult.getLine();
-
- if (result)
- {
- if (line > 0)
- {
- DelayedGotoSearchResult dgoto = new DelayedGotoSearchResult(file, searchResult);
- Display.getDefault().asyncExec(dgoto);
- }
- return true;
- }
- }
- }
-
- return result;
- }
-
- /**
- * Returns the associated subsystem for this search result
- */
- public ISubSystem getSubSystem(Object element)
- {
- if (element instanceof IHostSearchResult)
- {
- IHostSearchResult output = (IHostSearchResult) element;
- Object parent = output.getParent();
-
- if (parent instanceof IRemoteFile) {
- return ((IRemoteFile)parent).getParentRemoteFileSubSystem();
- }
- }
-
- return null;
- }
-
- /**
- * Return the fully qualified name of this remote object.
- */
- public String getAbsoluteName(Object element)
- {
- if (element instanceof IHostSearchResult)
- {
- IHostSearchResult searchResult = (IHostSearchResult)element;
-
- StringBuffer buf = new StringBuffer();
-
- String str = getAbsoluteParentName(element);
-
- if (str == null) {
- return null;
- }
-
- // create the absolute name with this format
- // remoteFilePath:SEARCH<searchString:index>
- buf.append(str);
- buf.append(IHostSearchResult.SEARCH_RESULT_DELIMITER);
- buf.append(IHostSearchResult.SEARCH_RESULT_OPEN_DELIMITER);
- buf.append(searchResult.getMatchingSearchString().toString());
- buf.append(IHostSearchResult.SEARCH_RESULT_INDEX_DELIMITER);
- buf.append(searchResult.getIndex());
- buf.append(IHostSearchResult.SEARCH_RESULT_CLOSE_DELIMITER);
-
- return buf.toString();
- }
-
- return null;
- }
-
- /**
- * Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem
- */
- public String getAbsoluteParentName(Object element)
- {
- Object parent = getParent(element);
-
- if ((parent != null) && (parent instanceof IRemoteFile)) {
- ISystemRemoteElementAdapter parentAdapter = SystemAdapterHelpers.getRemoteAdapter(parent);
-
- if (parentAdapter != null) {
- return parentAdapter.getAbsoluteName(parent);
- }
- }
-
- return null;
- }
-
- /**
- * Return the subsystem factory id that owns this remote object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getSubSystemConfigurationId(Object element)
- {
- return null;
- }
-
- /**
- * Return a value for the type category property for this object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteTypeCategory(Object element)
- {
- return null;
- }
-
- /**
- * Return a value for the type property for this object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteType(Object element)
- {
- return null;
- }
-
- /**
- * Return a value for the subtype property for this object.
- * Not all object types support a subtype, so returning null is ok.
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteSubType(Object element)
- {
- return null;
- }
-
- /**
- * Return a value for the sub-subtype property for this object.
- * Not all object types support a sub-subtype, so returning null is ok.
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteSubSubType(Object element)
- {
- return null;
- }
- /**
- * Return the source type of the selected object. Typically, this only makes sense for compilable
- * source members. For non-compilable remote objects, this typically just returns null.
- */
- public String getRemoteSourceType(Object element)
- {
- return null;
- }
-
- /**
- * Some view has updated the name or properties of this remote object. As a result, the
- * remote object's contents need to be refreshed. You are given the old remote object that has
- * old data, and you are given the new remote object that has the new data. For example, on a
- * rename the old object still has the old name attribute while the new object has the new
- * new attribute.
- * <p>
- * This is called by viewers like SystemView in response to rename and property change events.
- * <p>
- * @param oldElement the element that was found in the tree
- * @param newElement the updated element that was passed in the REFRESH_REMOTE event
- * @return true if you want the viewer that called this to refresh the children of this object,
- * such as is needed on a rename of a folder, say.
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- return false;
- }
-
- /**
- * Given a remote object, returns it remote parent object. Eg, given a file, return the folder
- * it is contained in.
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- if (element instanceof IHostSearchResult)
- {
- return ((IHostSearchResult) element).getParent();
- }
- return null;
- }
-
- /**
- * Given a remote object, return the unqualified names of the objects contained in that parent. This is
- * used for testing for uniqueness on a rename operation, for example. Sometimes, it is not
- * enough to just enumerate all the objects in the parent for this purpose, because duplicate
- * names are allowed if the types are different, such as on iSeries. In this case return only
- * the names which should be used to do name-uniqueness validation on a rename operation.
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
- {
- return null;
- }
-
- public IPropertyDescriptor[] getUniquePropertyDescriptors()
- {
- return new IPropertyDescriptor[0];
- }
-
- /**
- * Returns the unique property descriptors for a search result
- */
- protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (_propertyDescriptors == null)
- {
- _propertyDescriptors = new PropertyDescriptor[2];
- int idx = -1;
-
- // path
- _propertyDescriptors[++idx] = createSimplePropertyDescriptor(P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
-
- // char start
- _propertyDescriptors[++idx] = createSimplePropertyDescriptor(P_SEARCH_LINE, SystemViewResources.RESID_PROPERTY_SEARCH_LINE_LABEL, SystemViewResources.RESID_PROPERTY_SEARCH_LINE_TOOLTIP);
- //_propertyDescriptors[++idx] = createSimplePropertyDescriptor(P_SEARCH_CHAR_END, SystemViewResources.RESID_PROPERTY_SEARCH_CHAR_END_ROOT);
- }
- return _propertyDescriptors;
- }
-
- /**
- * Returns the current collection of property descriptors.
- * By default returns descriptors for name and type only.
- * Override if desired.
- * @return an array containing all descriptors.
- */
- protected Object internalGetPropertyValue(Object key)
- {
- String name = (String) key;
- if (propertySourceInput instanceof IHostSearchResult)
- {
- IHostSearchResult output = (IHostSearchResult) propertySourceInput;
-
- if (name.equals(P_FILE_PATH))
- {
- return output.getAbsolutePath();
- }
- else if (name.equals(P_SEARCH_LINE))
- {
- return new Integer(output.getLine());
- }
- /*
- else if (name.equals(P_SEARCH_CHAR_END))
- {
- return new Integer(output.getCharEnd());
- }
- */
- }
-
- return null;
- }
-
-
- /**
- * Returns the associated image descriptor for a search result
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- if (element instanceof IHostSearchResult)
- {
- ImageDescriptor imageDescriptor = null;
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID);
-
- return imageDescriptor;
- }
- else
- { // return some default
- ImageDescriptor imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_BLANK_ID);
- return imageDescriptor;
- }
- }
-
- /**
- * Return true if we should show the delete action in the popup for the given element.
- * If true, then canDelete will be called to decide whether to enable delete or not.
- */
- public boolean showDelete(Object element)
- {
- return false;
- }
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- * By default, returns false. Override if your object is deletable.
- */
- public boolean canDelete(Object element)
- {
- return false;
- }
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON REFRESH ACTION...
- // ------------------------------------------
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showRefresh(Object element)
- {
- return false;
- }
-
- // ------------------------------------------------------------
- // METHODS TO SUPPORT COMMON OPEN-IN-NEW-PERSPECTIVE ACTIONS...
- // ------------------------------------------------------------
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showOpenViewActions(Object element)
- {
- return false;
- }
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON RENAME ACTION...
- // ------------------------------------------
-
- /**
- * Return true if we should show the rename action in the popup for the given element.
- * If true, then canRename will be called to decide whether to enable rename or not.
- */
- public boolean showRename(Object element)
- {
- return false;
- }
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename popup menu item will be enabled.
- * By default, returns false. Override if your object is renamable.
- */
- public boolean canRename(Object element)
- {
- return false;
- }
-
- /**
- * Perform the rename action. By default does nothing. Override if your object is renamable.
- * Return true if this was successful. Return false if it failed and you issued a msg.
- * Throw an exception if it failed and you want to use the generic msg.
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception
- {
- return false;
- }
-
- // Drag and drop
-
- /**
- * Indicates whether the specified object can have another object copied to it
- * @param element the object to copy to
- * @return whether this object can be copied to or not
- */
- public boolean canDrop(Object element)
- {
-
- return false;
- }
-
- /**
- * Indicates whether the specified object can be copied
- * @param element the object to copy
- */
- public boolean canDrag(Object element)
- {
- if (element instanceof IHostSearchResult)
- {
- return true;
- }
-
- return false;
- }
-
- /**
- * Copy the specified remote output object. This method returns a string representing
- * the text of the remote output;
- *
- * @param element the output to copy
- * @param sameSystemType not applicable for remote output
- * @param monitor the progress monitor
- */
- public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
- {
- if (element instanceof List)
- {
- List resultSet = new ArrayList();
- List set = (List)element;
- for (int i = 0; i < set.size(); i++)
- {
- resultSet.add(getText(set.get(i)));
- }
- return resultSet;
- }
- else
- {
- return getText(element);
- }
- }
-
- /**
- * Return true if it is valid for the src object to be dropped in the target
- * @param src the object to drop
- * @param target the object which src is dropped in
- * @param sameSystem whether this is the same system
- * @return whether this is a valid operation
- */
- public boolean validateDrop(Object src, Object target, boolean sameSystem)
- {
- return false;
- }
-
- /**
- * Perform a copy via drag and drop.
- * @param src the object to be copied. If the target and source are not on the same system, then this is a
- * temporary object produced by the doDrag.
- * @param target the object to be copied to.
- * @param sameSystem an indication whether the target and source reside on the same type of system
- * @param indicates the type of source
- * @param monitor the progress monitor
- * @return an indication whether the operation was successful or not.
- */
- public Object doDrop(Object src, Object target, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
- {
- IRemoteFile folder = outputToFile((IHostSearchResult) target);
- if (folder != null)
- {
- ISystemDragDropAdapter adapter = (ISystemDragDropAdapter) ((IAdaptable) folder).getAdapter(ISystemDragDropAdapter.class);
- return adapter.doDrop(src, folder, sameSystemType, sameSystem, srcType, monitor);
- }
- return null;
- }
-
- /**
- * Indicates whether the search result can be opened in an editor
- */
- public boolean canEdit(Object element)
- {
- if (element instanceof IHostSearchResult)
- {
- IHostSearchResult output = (IHostSearchResult) element;
- IRemoteFile file = outputToFile(output);
- if (file != null && file.isFile())
- {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns the associated remote editable object for this search result
- */
- public ISystemEditableRemoteObject getEditableRemoteObject(Object element)
- {
- if (element instanceof IHostSearchResult)
- {
- IHostSearchResult output = (IHostSearchResult) element;
- IRemoteFile file = outputToFile(output);
- if (file != null && file.isFile())
- {
- return new SystemEditableRemoteFile(file);
- }
- }
- return null;
- }
-
- /**
- * Return a filter string that corresponds to this object.
- * @param object the object to obtain a filter string for
- * @return the corresponding filter string if applicable
- */
- public String getFilterStringFor(Object object)
- {
- return null;
- }
-
- /**
- * Returns <code>false</code>.
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- return false;
- }
-
-
-
- /**
- * Returns the current value for the named property.
- *
- * @param property the name or key of the property as named by its property descriptor
- * @param formatted indication of whether to return the value in formatted or raw form
- * @return the current value of the given property
- */
- public Object getPropertyValue(Object property, boolean formatted)
- {
- String name = (String) property;
- if (propertySourceInput instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell) propertySourceInput;
- if (name.equals(ISystemPropertyConstants.P_SHELL_STATUS))
- {
- if (cmdShell.isActive())
- {
- return SystemViewResources.RESID_PROPERTY_SHELL_STATUS_ACTIVE_VALUE;
- }
- else
- {
- return SystemViewResources.RESID_PROPERTY_SHELL_STATUS_INACTIVE_VALUE;
- }
- }
- else if (name.equals(ISystemPropertyConstants.P_SHELL_CONTEXT))
- {
- Object context = cmdShell.getContext();
- if (context instanceof IRemoteFile)
- {
- IRemoteFile cwd = (IRemoteFile)context;
- return cwd.getAbsolutePath();
- }
- else
- {
- return context;
- }
- }
- }
- return ""; //$NON-NLS-1$
- }
-} \ No newline at end of file
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
deleted file mode 100644
index e0ad4879c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java
+++ /dev/null
@@ -1,355 +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.files.ui.view;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoveElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-/**
- * Adapter for a search result set.
- */
-public class SystemViewRemoteSearchResultSetAdapter extends AbstractSystemViewAdapter implements ISystemRemoteElementAdapter, ISystemRemoveElementAdapter
-{
-
-
- public SystemViewRemoteSearchResultSetAdapter()
- {
- }
-
- /**
- * No actions are provided on a search results container
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- }
-
- /**
- * Returns false
- */
- public boolean canEdit(Object obj)
- {
- return false;
- }
-
- /**
- * Returns null since a search results container can't be edited
- */
- public ISystemEditableRemoteObject getEditableRemoteObject(Object obj)
- {
- return null;
- }
-
- /**
- * Returns the associated icon for a search handle
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- ImageDescriptor imageDescriptor= RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID);
- return imageDescriptor;
- }
-
- /**
- * Returns null since a search handle has no parent
- */
- public Object getParent(Object element)
- {
- return null;
- }
-
- /**
- * Returns the display text for a search handle. The display text indicates the search string as well as
- * whether the operation is in progress on not.
- */
- public String getText(Object element) {
-
- if (element instanceof IHostSearchResultSet) {
-
- IHostSearchResultSet set = (IHostSearchResultSet)element;
- String name = set.getName();
- SystemMessage msg = null;
-
- if (set.isRunning()) {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_RUNNING);
- }
- else if (set.isFinished()) {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FINISHED);
- }
- else if (set.isCancelled()) {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERTION_STOPPED);
- }
- else if (set.isDisconnected()) {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_DISCONNECTED);
- }
-
- msg.makeSubstitution(name);
- return msg.getLevelOneText();
- }
-
- return null;
- }
-
- /**
- * Returns the type property of a search.
- */
- public String getType(Object element){
- return null;
- }
-
- /**
- * Returns the search results for the given search handle
- */
- public Object[] getChildren(Object element) {
-
- if (element instanceof IHostSearchResultSet) {
- IHostSearchResultSet output = (IHostSearchResultSet)element;
- return output.getAllResults();
- }
-
- return null;
- }
-
- /**
- * Returns <code>true</code> if it has children, otherwise returns <code>false</code>.
- */
- public boolean hasChildren(Object element) {
-
- if (element instanceof IHostSearchResultSet) {
- int num = ((IHostSearchResultSet)element).getNumOfResults();
- return num > 0;
- }
-
- return false;
- }
-
- /**
- * Returns false since a search handle can't be edited
- */
- public boolean handleDoubleClick(Object element) {
- return false;
- }
-
- /**
- * Returns the associated file subsystem for this search operation
- */
- public ISubSystem getSubSystem(Object element) {
- return null;
- }
-
-
- public String getAbsoluteName(Object element)
- {
- return null;
- }
-
- public String getAbsoluteParentName(Object element)
- {
- return null;
- }
-
- public String getSubSystemConfigurationId(Object element)
- {
- return null;
- }
-
- public String getRemoteTypeCategory(Object element)
- {
- return null;
- }
-
- public String getRemoteType(Object element)
- {
- return null;
- }
-
- public String getRemoteSubType(Object element)
- {
- return null;
- }
-
-
- public String getRemoteSubSubType(Object element)
- {
- return null;
- }
-
- /**
- * Return the source type of the selected object. Typically, this only makes sense for compilable
- * source members. For non-compilable remote objects, this typically just returns null.
- */
- public String getRemoteSourceType(Object element)
- {
- return null;
- }
-
- public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- return false;
- }
-
- /**
- * Given a remote object, returns it remote parent object. Eg, given a file, return the folder
- * it is contained in.
- *
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- return null;
- }
-
- /**
- * Given a remote object, return the unqualified names of the objects contained in that parent. This is
- * used for testing for uniqueness on a rename operation, for example. Sometimes, it is not
- * enough to just enumerate all the objects in the parent for this purpose, because duplicate
- * names are allowed if the types are different, such as on iSeries. In this case return only
- * the names which should be used to do name-uniqueness validation on a rename operation.
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
- {
- return null;
- }
-
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- return new IPropertyDescriptor[0];
- }
-
- /**
- * Return our unique property values
- */
- protected Object internalGetPropertyValue(Object key)
- {
- return null;
- }
-
- /**
- * Return a filter string that corresponds to this object.
- * @param object the object to obtain a filter string for
- * @return the corresponding filter string if applicable
- */
- public String getFilterStringFor(Object object)
- {
- return null;
- }
-
- /**
- * @see org.eclipse.rse.ui.view.ISystemViewElementAdapter#canDelete(java.lang.Object)
- */
- public boolean canDelete(Object element) {
- return false;
- }
-
- /**
- * @see org.eclipse.rse.ui.view.ISystemViewElementAdapter#showDelete(java.lang.Object)
- */
- public boolean showDelete(Object element) {
- return false;
- }
-
- /**
- * @see org.eclipse.rse.ui.view.ISystemRemoveElementAdapter#remove(java.lang.Object, java.lang.Object)
- */
- public boolean remove(Object element, Object child) {
-
- if (element instanceof IHostSearchResultSet) {
- IHostSearchResultSet set = (IHostSearchResultSet)element;
-
- // if the child is an IRemoteFile
- if (child instanceof IRemoteFile) {
- set.removeResult(child);
- return true;
- }
- // if child is a result leaf, remove it from its parent
- else if (child instanceof IRemoteSearchResult) {
- IRemoteSearchResult result = (IRemoteSearchResult)child;
- IRemoteFile parent = (IRemoteFile)(result.getParent());
-
- // get contents of parent
- Object[] contents = parent.getContents(RemoteSearchResultsContentsType.getInstance(), result.getMatchingSearchString().toString());
- List contentsList = new ArrayList();
-
- // go through array and add all entries to list that do not match the result
- for (int i = 0; i < contents.length; i++) {
-
- if (contents[i] != result) {
- contentsList.add(contents[i]);
- }
- }
-
- // now set the contents of the parent with the result removed
- parent.setContents(RemoteSearchResultsContentsType.getInstance(), result.getMatchingSearchString().toString(), contentsList.toArray());
-
- return true;
- }
- else {
- return false;
- }
- }
- else {
- return false;
- }
- }
-
- /**
- * @see org.eclipse.rse.ui.view.ISystemRemoveElementAdapter#removeAllChildren(java.lang.Object)
- */
- public boolean removeAllChildren(Object element) {
-
- if (element == null) {
- return false;
- }
-
- if (element instanceof IHostSearchResultSet) {
- IHostSearchResultSet set = (IHostSearchResultSet)element;
- set.removeAllResults();
- return true;
- }
- else {
- return false;
- }
- }
-
-
- /**
- * Returns <code>false</code>.
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewSearchResultAdapterFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewSearchResultAdapterFactory.java
deleted file mode 100644
index 0f24d5070..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewSearchResultAdapterFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.ui.view.ISystemDragDropAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.IActionFilter;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-
-/**
- * This factory maps requests for an adapter object from a given
- * element object. A search result adapter factory maps a search
- * result object to a search result adapter.
- */
-public class SystemViewSearchResultAdapterFactory implements IAdapterFactory
-{
- private SystemViewRemoteSearchResultAdapter searchResultAdapter = new SystemViewRemoteSearchResultAdapter();
-
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISystemViewElementAdapter.class, ISystemDragDropAdapter.class, ISystemRemoteElementAdapter.class, IPropertySource.class, IWorkbenchAdapter.class, IActionFilter.class};
- }
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, IHostSearchResult.class);
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof IHostSearchResult)
- adapter = searchResultAdapter;
-
- if ((adapter != null) && (adapterType == IPropertySource.class))
- {
- ((ISystemViewElementAdapter)adapter).setPropertySourceInput(adaptableObject);
- }
- else if (adapter == null)
- {
- SystemBasePlugin.logWarning("No adapter found for object of type: " + adaptableObject.getClass().getName());
- }
- return adapter;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewSearchResultSetAdapterFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewSearchResultSetAdapterFactory.java
deleted file mode 100644
index 882388b41..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewSearchResultSetAdapterFactory.java
+++ /dev/null
@@ -1,75 +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.files.ui.view;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.IActionFilter;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-/**
- * This factory maps requests for an adapter object from a given
- * element object. A search results adapter factory maps a search
- * results object to a search results adapter.
- */
-public class SystemViewSearchResultSetAdapterFactory implements IAdapterFactory
-{
- private SystemViewRemoteSearchResultSetAdapter outputAdapter = new SystemViewRemoteSearchResultSetAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISystemViewElementAdapter.class, ISystemRemoteElementAdapter.class, IPropertySource.class, IWorkbenchAdapter.class, IActionFilter.class};
- }
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, IHostSearchResultSet.class);
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
-
- if (adaptableObject instanceof IHostSearchResultSet) {
- adapter = outputAdapter;
- }
-
- if ((adapter != null) && (adapterType == IPropertySource.class))
- {
- ((ISystemViewElementAdapter)adapter).setPropertySourceInput(adaptableObject);
- }
- else if (adapter == null)
- {
- SystemBasePlugin.logWarning("No adapter found for object of type: " + adaptableObject.getClass().getName());
- }
- return adapter;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/ISystemRemoteFolderBrowseCompleteListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/ISystemRemoteFolderBrowseCompleteListener.java
deleted file mode 100644
index 5170cf635..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/ISystemRemoteFolderBrowseCompleteListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.files.ui.widgets;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-
-/**
- * Interface for listeners interested in being notified whenever
- * the browse button in <code>SystemRemoteFolderCombo</code> is run.
- */
-public interface ISystemRemoteFolderBrowseCompleteListener {
-
- /**
- * Notifies that the given file was selected from the browse dialog. Note that the file will
- * be null if the user cancelled from the browse dialog.
- * @param remoteFile the remote file that was selected, or <code>null</code> if the user cancelled
- * from the browse dialog.
- */
- public void fileSelected(IRemoteFile remoteFile);
-} \ No newline at end of file
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
deleted file mode 100644
index a8a27313b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.widgets;
-
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-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;
-import org.eclipse.rse.ui.validators.ValidatorFileName;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-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.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-public class SystemEnterOrSelectRemoteFileForm extends SystemSelectRemoteFileOrFolderForm {
-
- // text field for file name
- protected Text fileNameText;
-
- // initial file name
- protected String fileName, initialFileName;
-
- // file name validator
- protected ValidatorFileName validator;
-
- /**
- * Constructor for form to enter or select a file.
- * @param msgLine A GUI widget capable of writing error messages to.
- * @param caller The wizardpage or dialog hosting this form.
- * @param fileMode true if in select-file mode, false if in select-folder mode
- */
- public SystemEnterOrSelectRemoteFileForm(ISystemMessageLine msgLine, Object caller, boolean fileMode) {
- super(msgLine, caller, fileMode);
- validator = new ValidatorFileName();
- initialFileName = "";
- fileName = initialFileName;
- }
-
- /**
- * Calls super method and creates the text field for file name.
- * @see org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm#createContents(org.eclipse.swt.widgets.Shell, org.eclipse.swt.widgets.Composite)
- */
- public Control createContents(Shell shell, Composite parent) {
- Control control = super.createContents(shell, parent);
-
- Composite composite = SystemWidgetHelpers.createComposite(parent, 2);
-
- // file name text field
- fileNameText = SystemWidgetHelpers.createLabeledTextField(
- composite, null, FileResources.RESID_NEWFILE_NAME_LABEL, FileResources.RESID_NEWFILE_NAME_TOOLTIP);
-
- // listen for file name modifications
- fileNameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- fileName = fileNameText.getText();
- setPageComplete();
- }
- });
-
- // set file name
- if (fileName != null) {
- fileNameText.setText(fileName);
- }
-
- return control;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm#verify()
- */
- public boolean verify() {
-
- boolean ok = super.verify();
-
- if (ok) {
-
- IRemoteFile file = (IRemoteFile)getSelectedObject();
- IRemoteFile saveasFile = null;
-
- try {
- saveasFile = file.getParentRemoteFileSubSystem().getRemoteFileObject(file, fileName);
- }
- catch (Exception e) {
- }
-
- if (saveasFile != null && saveasFile.exists()) {
-
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS);
- msg.makeSubstitution(fileName);
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- ok = dlg.openQuestionNoException();
- }
- }
-
- return ok;
- }
-
- /**
- * @see org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm#isPageComplete()
- */
- public boolean isPageComplete() {
-
- SystemMessage errMsg = null;
-
- if (fileName != null) {
- errMsg = validator.validate(fileName);
- }
-
- if (errMsg != null) {
- setErrorMessage(errMsg);
- return false;
- }
- else {
- clearErrorMessage();
- }
-
- return fileNameText != null && fileNameText.getText().length() > 0 && super.isPageComplete();
- }
-
- /**
- * @see org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm#setPreSelection(org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile)
- */
- public void setPreSelection(IRemoteFile selection) {
-
- // if preselect a directory, just call super
- if (selection.isDirectory()) {
- super.setPreSelection(selection);
- }
- // otherwise, if it's a file, select the parent and set the file name
- else if (selection.isFile()) {
- IRemoteFile parentFile = selection.getParentRemoteFile();
-
- if (parentFile.isDirectory()) {
- super.setPreSelection(parentFile);
- }
-
- initialFileName = parentFile.getName();
- fileName = initialFileName;
- }
- }
-
- /**
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent e) {
- super.selectionChanged(e);
-
- Object selectedObject = getFirstSelection(e.getSelection());
-
- if (selectedObject != null && selectedObject instanceof IRemoteFile) {
-
- IRemoteFile remoteFile = (IRemoteFile)selectedObject;
-
- ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(selectedObject);
-
- if ((remoteAdapter != null)) {
-
- if (fileNameText != null) {
-
- // simulate the parent file being selected...
- Object parentFile = tree.getSelectedParent();
-
- if (remoteFile.isFile()) {
- fileName = remoteAdapter.getName(selectedObject);
- fileNameText.setText(fileName);
- }
- else {
- fileName = initialFileName;
- fileNameText.setText(fileName);
- parentFile = remoteFile;
- }
-
- remoteAdapter = getRemoteAdapter(parentFile);
-
- if (remoteAdapter != null) {
- String fullPath = remoteAdapter.getAbsoluteName(parentFile);
- setNameText(fullPath);
- outputObjects = new Object[] { parentFile };
- setPageComplete();
- }
- }
- }
- }
- }
-
- /**
- * Returns the remote element adapter.
- * @param o the remote element.
- * @return the remote element adapter.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o) {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- /**
- * Returns the file name.
- * @return the file name.
- */
- public String getFileName() {
- return fileName;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileWidgetHelpers.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileWidgetHelpers.java
deleted file mode 100644
index ba301d222..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileWidgetHelpers.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.widgets;
-
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Static methods that can be used when writing SWT GUI code.
- * They simply make it more productive.
- */
-public class SystemFileWidgetHelpers extends SystemWidgetHelpers
-{
-
-
- /**
- * Creates a new remote system folder combobox instance and sets the default
- * layout data, with tooltip text.
- * <p>
- * Assign the listener to the passed in implementer of Listener.
- * <p>
- * A remote system folder combobox is one that mimics the local folder selection combobox, but
- * works with remote file systems instead. It has a label, a historical dropdown, and a browse button.
- * <p>
- * @param parent composite to put the combo into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- * @param historyKey The key with which to remember/restore the history for this combo. Pass null to use the overall default.
- * @param horizontalSpan number of columns this should span
- * @param readOnly true if the combo is to be readonly
- */
- public static SystemRemoteFolderCombo createFolderCombo(Composite parent, SelectionListener listener, int horizontalSpan, String historyKey, boolean readOnly) {
- if (historyKey == null)
- historyKey = ISystemPreferencesConstants.HISTORY_FOLDER;
- SystemRemoteFolderCombo combo = new SystemRemoteFolderCombo(parent, SWT.NULL, historyKey, readOnly);
- if (listener != null)
- combo.addSelectionListener(listener);
- boolean hasGridData = (combo.getLayoutData() != null) && (combo.getLayoutData() instanceof GridData);
- //System.out.println("history directory griddata non-null? " + hasGridData);
- int minwidth = 250;
- if (!hasGridData) {
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = minwidth;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- data.horizontalSpan = horizontalSpan;
- combo.setLayoutData(data);
- } else {
- ((GridData) combo.getLayoutData()).horizontalSpan = horizontalSpan;
- ((GridData) combo.getLayoutData()).horizontalAlignment = GridData.FILL;
- ((GridData) combo.getLayoutData()).grabExcessHorizontalSpace = true;
- ((GridData) combo.getLayoutData()).widthHint = minwidth;
- }
- return combo;
- }
-
- /**
- * Creates a new remote system directory combobox instance and sets the default
- * layout data, with tooltip text. Each remote directory is qualified by its connection name.
- * These combos are always readonly.
- * <p>
- * Assign the listener to the passed in implementer of Listener.
- * <p>
- * A remote system qualified-directory combobox is one that mimics the local directory selection combobox, but
- * works with remote file systems instead. It has a label, a historical dropdown, and a browse button.
- * <p>
- * @param parent composite to put the combo into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- * @param historyKey The key with which to remember/restore the history for this combo. Pass null to use the overall default.
- * @param horizontalSpan number of columns this should span
- */
- public static SystemQualifiedRemoteFolderCombo createQualifiedDirectoryCombo(Composite parent, SelectionListener listener, int horizontalSpan, String historyKey) {
- if (historyKey == null)
- historyKey = ISystemPreferencesConstants.HISTORY_QUALIFIED_FOLDER;
- SystemQualifiedRemoteFolderCombo combo = new SystemQualifiedRemoteFolderCombo(parent, SWT.NULL, historyKey);
- if (listener != null)
- combo.addSelectionListener(listener);
- boolean hasGridData = (combo.getLayoutData() != null) && (combo.getLayoutData() instanceof GridData);
- //System.out.println("history directory griddata non-null? " + hasGridData);
- int minwidth = 250;
- if (!hasGridData) {
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = minwidth;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- data.horizontalSpan = horizontalSpan;
- combo.setLayoutData(data);
- } else {
- ((GridData) combo.getLayoutData()).horizontalSpan = horizontalSpan;
- ((GridData) combo.getLayoutData()).horizontalAlignment = GridData.FILL;
- ((GridData) combo.getLayoutData()).grabExcessHorizontalSpace = true;
- ((GridData) combo.getLayoutData()).widthHint = minwidth;
- }
- return combo;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index c9f741c10..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java
+++ /dev/null
@@ -1,773 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui.widgets;
-import java.util.Hashtable;
-import java.util.ResourceBundle;
-
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-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.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;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This re-usable widget is for selecting a new or previously specified
- * folder path within a given connection.
- * <p>
- * The dropdown is historical and contains a folder path qualified by a connection name.
- * It is readonly ... the user must use the browse button.
- * <p>
- * The composite is layed as follows:
- * <code>
- * Folder: conn\dir1_____v Browse...
- * </code>
- * <p>
- * The browse button lists only connections that are of the specified subsystem factory.
- * It also by default has a New Connection... prompting object for creating new connections, but this can be
- * turned off.
- * <p>
- * To get the current folder object selected, use getFolder().
- * <p>
- * To listen for changes, use addSelectionListener().
- */
-public class SystemQualifiedRemoteFolderCombo extends Composite
- implements ISystemCombo
-{
- public static final char CONNECTION_DELIMITER = IRemoteFile.CONNECTION_DELIMITER;
- private Label folderLabel = null;
- private SystemHistoryCombo folderCombo = null;
- private Button browseButton = null;
- //private RemoteFileSubSystem subsystem = null;
- //private RemoteFileSubSystemConfiguration subsystemFactory = null;
- //private String subsystemFactoryID = null;
- //private IRemoteFile[] folders = null;
- private Hashtable resolvedFolders = new Hashtable();
- //private String[] folderStrings = null;
- private String[] systemTypes;
- private boolean readOnly = true;
- private boolean showNewPrompt = true;
- private SystemSelectRemoteFolderAction browseAction = null;
- //private static final int DEFAULT_COMBO_WIDTH = 300;
- //private static final int DEFAULT_BUTTON_WIDTH = 80;
-
- /**
- * Constructor.
- * Requires a history key used to store/restore the dropdown history for this. Pass null to use
- * the overall default (ISystemPreferencesConstants.HISTORY_FOLDER).
- * By default, this allows users to select with any connection that has subsystems that implement
- * RemoteFileSubSystem. To restrict it to connections of a particular system type, say, call
- * setSystemType.
- * @param parent Parent composite
- * @param style SWT style flags for overall composite widget
- * @param historyKey A string identifying the key into the user preferences where this combo's history will be stored.
- * @see #setSystemType(String)
- */
- public SystemQualifiedRemoteFolderCombo(Composite parent, int style, String historyKey)
- {
- super(parent, style);
- prepareComposite(3);
- folderLabel = SystemWidgetHelpers.createLabel(this,SystemFileResources.WIDGET_FOLDER_LABEL, SystemFileResources.WIDGET_FOLDER_TOOLTIP);
- if (historyKey == null)
- historyKey = ISystemPreferencesConstants.HISTORY_QUALIFIED_FOLDER;
- folderCombo = SystemWidgetHelpers.createHistoryCombo(this,null,historyKey,readOnly,SystemFileResources.WIDGET_FOLDER_TOOLTIP);
- Object folderData = folderCombo.getLayoutData();
- if (folderData instanceof GridData)
- ((GridData)folderData).widthHint = 200;
- browseButton = createPushButton(this,SystemFileResources.WIDGET_BROWSE_LABEL);
- addOurButtonSelectionListener();
- //scrubHistory(); this is too intensive as it starts all kinds of servers and stuff unnecessarily.
- }
-
- /**
- * Set auto-uppercase. When enabled, all non-quoted values are uppercases when appropriate.
- * This has no effect in readonly mode, which this combo is, so in fact this is ineffective!
- * We include it in case we allow editing in the future, and because it is in the ISystemCombo
- * interface we implement.
- */
- public void setAutoUpperCase(boolean enable)
- {
- folderCombo.setAutoUpperCase(enable);
- }
-
- /**
- * Set the system types to restrict what connections the user sees, and what types of
- * connections they can create.
- * @param systemTypes An array of system type names
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new String[] {systemType})
- *
- * @param systemType The name of the system type to restrict to
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new String[] {systemType});
- //System.out.println("SYSTEM TYPES SET TO "+systemType+" IN SYSQUALRMTFLDRCMBO");
- }
-
- /**
- * Specify if the "New Connection..." object for creating connections should be shown when the user selects
- * the Browse... button to select a remote folder. The default is true.
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- this.showNewPrompt = show;
- if (browseAction != null)
- browseAction.setShowNewConnectionPrompt(show);
- }
-
- /**
- * Return the combo box history widget
- */
- public SystemHistoryCombo getFolderCombo()
- {
- return folderCombo;
- }
- /**
- * Return the combo box widget
- */
- public SystemHistoryCombo getHistoryCombo()
- {
- return folderCombo;
- }
- /**
- * Return the raw combo box widget
- */
- public Combo getCombo()
- {
- return folderCombo.getCombo();
- }
-
- /**
- * Set the width hint for this whole composite
- * Default is computed from the child widgets
- */
- public void setWidthHint(int widthHint)
- {
- // after much research it was decided that it was the wrong thing to do to
- // explicitly set the widthHint of a child widget without our composite, as
- // that could end up being a bigger number than the composites widthHint itself
- // if the caller set its it directly.
- // Rather, we just set the overall composite width and specify the combo child
- // widget is to grab all the space within that which the little button does not use.
- ((GridData)getLayoutData()).widthHint = widthHint;
- }
-
- /**
- * Return the browse button widget
- */
- public Button getBrowseButton()
- {
- return browseButton;
- }
-
- /**
- * Set the folders in the combo field.
- * History is updated.
- * @param folders Array of IRemoteFile objects ... each is a remote folder
- */
- public void setFolders(IRemoteFile[] folders)
- {
- if (folders == null)
- {
- //folderStrings = null;
- folderCombo.setItems(null);
- return;
- }
- String[] folderStrings = new String[folders.length];
- for (int idx=0; idx<folders.length; idx++)
- folderStrings[idx] = folders[idx].getAbsolutePathPlusConnection();
- folderCombo.setItems(folderStrings);
- folderCombo.select(0);
- updateHistory();
- }
- /**
- * Append a folder to the list. It is not selected so call {@link #setFolder(IRemoteFile)}
- * or {@link #setSelectionIndex(int)} to select it if desired.
- * History is updated.
- * @param folder The folder to add. Caller's responsibility to precheck for existence
- * by calling {@link #getFolderIndex(IRemoteFile)}.
- * @return int zero-based index position of new entry in list.
- */
- public int addFolder(IRemoteFile folder)
- {
- int pos = -1;
- String[] folderStrings = folderCombo.getItems();
- if (folderStrings == null)
- {
- folderStrings = new String[1];
- folderStrings[0] = folder.getAbsolutePathPlusConnection();
- pos = 0;
- }
- else
- {
- String[] newFolderStrings = new String[folderStrings.length+1];
- for (int idx=0; idx<folderStrings.length; idx++)
- newFolderStrings[idx] = folderStrings[idx];
- pos = newFolderStrings.length-1;
- newFolderStrings[pos] = folder.getAbsolutePathPlusConnection();
- folderStrings = newFolderStrings;
- }
- folderCombo.setItems(folderStrings);
- //folderCombo.select(pos);
- folderCombo.setHistory(folderStrings);
- return pos;
- }
- /**
- * Remove a folder from the list. History is updated
- * @param folder The folder to remove.
- */
- public void removeFolder(IRemoteFile folder)
- {
- int idx = getFolderIndex(folder);
- if (idx > -1)
- {
- folderCombo.getCombo().remove(idx);
- updateHistory();
- }
- }
-
- /**
- * Get the items in the combo field as an array of strings.
- * @return Array of String objects
- */
- public String[] getItems()
- {
- return folderCombo.getItems();
- }
-
- /**
- * Get the index of a given folder in the current list for this combo.
- * Returns -1 if it is not in the list.
- */
- public int getFolderIndex(IRemoteFile folder)
- {
- int match = -1;
- String[] folderStrings = folderCombo.getItems();
- if ( (folderStrings == null) || (folderStrings.length==0) )
- return match;
- IHost conn = folder.getSystemConnection();
- String fulldir = folder.getAbsolutePathPlusConnection();
- for (int idx=0; (idx<folderStrings.length) && (match==-1); idx++)
- {
- if (folderStrings[idx].equals(fulldir))
- match = idx;
- }
- return match;
- }
-
- /**
- * Set the folder combo field's current contents given an IRemoteFile object.
- * If this folder is in the list, it is selected.
- * If it is not in the list, it is added and selected.
- */
- public void setFolder(IRemoteFile folder)
- {
- int idx = getFolderIndex(folder);
- if (idx == -1)
- idx = addFolder(folder);
- select(idx);
- }
- /**
- * Set the value by selecting the item in the list at the given position.
- * Same as {@link #select(int)}
- */
- public void setSelectionIndex(int selIdx)
- {
- select(selIdx);
- }
- /**
- * Select the combo dropdown list entry at the given index
- * Same as {@link #setSelectionIndex(int)}
- */
- public void select(int selIdx)
- {
- folderCombo.clearSelection();
- folderCombo.select(selIdx);
- }
-
- /**
- * Clear the selection of the text in the entry field part of the combo, and the list selection
- */
- public void clearSelection()
- {
- folderCombo.clearSelection();
- }
- /**
- * Clear the selection of the text in the entry field part of the combo
- */
- public void clearTextSelection()
- {
- folderCombo.clearTextSelection();
- }
-
- /**
- * Get the index number of the currently selected item.
- */
- public int getSelectionIndex()
- {
- return folderCombo.getSelectionIndex();
- }
-
- /**
- * Query the folder combo field's current contents
- */
- public String getText()
- {
- return folderCombo.getText();
- }
- /**
- * Query the folder combo field's current contents as an IRemoteFile object.
- * It is at this time that the currently selected string is converted into an
- * IRemoteFile object. This can be a bit computationally intensive, as it requires
- * accessing the remote system, and prompting for a connection if the user is not
- * not yet connected to that system.
- * <p>
- * Since it is possible the selected item is no longer valid, this will throw an
- * exception if the profile or connection does not exist or the user cancels the
- * connecting action. The message in the exception is translated and displayable.
- */
- public IRemoteFile getFolder()
- throws Exception
- {
- String fileString = folderCombo.getText().trim();
- //System.out.println("selected idx = " + idx);
- if (fileString.length() == 0)
- return null;
- else
- {
- IRemoteFile fileObj = (IRemoteFile)resolvedFolders.get(fileString);
- if (fileObj == null)
- {
- fileObj = convertToRemoteFile(fileString);
- if (fileObj != null)
- resolvedFolders.put(fileString, fileObj);
- }
- return fileObj;
- }
- }
- /**
- * Query the folder combo field's current contents and return the connection part of
- * it as a SystemConnection object.
- * <p>
- * Will return null if either there is no contents currently or there is no such system!
- */
- public IHost getSystemConnection()
- {
- String fileString = folderCombo.getText().trim();
- if (fileString.length() == 0)
- return null;
- String profileName = extractProfileName(fileString);
- String connName = extractConnectionName(fileString);
- if ((profileName == null) || (connName == null))
- return null;
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISystemProfile profile = sr.getSystemProfile(profileName);
- if (profile == null)
- return null;
- IHost conn = RSEUIPlugin.getTheSystemRegistry().getHost(profile,connName);
- return conn;
- }
-
- /**
- * Disable/Enable all the child controls.
- */
- public void setEnabled(boolean enabled)
- {
- folderCombo.setEnabled(enabled);
- browseButton.setEnabled(enabled);
- }
- /**
- * Set the tooltip text for the folder combo field
- */
- public void setToolTipText(String tip)
- {
- folderLabel.setToolTipText(tip);
- folderCombo.setToolTipText(tip);
- }
- /**
- * Set the tooltip text for the browse button
- */
- public void setBrowseButtonToolTipText(String tip)
- {
- browseButton.setToolTipText(tip);
- }
- /**
- * Same as {@link #setBrowseButtonToolTipText(String)}
- */
- public void setButtonToolTipText(String tip)
- {
- setBrowseButtonToolTipText(tip);
- }
-
- /**
- * Set the folder combo field's text limit
- */
- public void setTextLimit(int limit)
- {
- folderCombo.setTextLimit(limit);
- }
- /**
- * Set the focus to the folder combo field
- */
- public boolean setFocus()
- {
- return folderCombo.setFocus();
- }
- /**
- * Set the focus to the browse button
- */
- public void setBrowseButtonFocus()
- {
- browseButton.setFocus();
- }
-
- /**
- * Register a listener interested in an item is selected in the combo box
- * @see #removeSelectionListener(SelectionListener)
- */
- public void addSelectionListener(SelectionListener listener)
- {
- folderCombo.addSelectionListener(listener);
- }
- /**
- * Remove a previously set combo box selection listener.
- * @see #addSelectionListener(SelectionListener)
- */
- public void removeSelectionListener(SelectionListener listener)
- {
- folderCombo.removeSelectionListener(listener);
- }
- /**
- * Register a listener interested in when the browse button is selected
- * @see #removeBrowseButtonSelectionListener(SelectionListener)
- */
- public void addBrowseButtonSelectionListener(SelectionListener listener)
- {
- browseButton.addSelectionListener(listener);
- }
- /**
- * Remove a previously set browse button selection listener.
- * @see #addBrowseButtonSelectionListener(SelectionListener)
- */
- public void removeBrowseButtonSelectionListener(SelectionListener listener)
- {
- browseButton.removeSelectionListener(listener);
- }
-
- /**
- * Register a listener interested in entry field modify events
- * @see #removeModifyListener(ModifyListener)
- */
- public void addModifyListener(ModifyListener listener)
- {
- folderCombo.addModifyListener(listener);
- }
- /**
- * Remove a previously set entry field listener.
- * @see #addModifyListener(ModifyListener)
- */
- public void removeModifyListener(ModifyListener listener)
- {
- folderCombo.removeModifyListener(listener);
- }
-
- /**
- * Return the current history for the folder combo box
- */
- public static String[] getHistory()
- {
- return SystemPreferencesManager.getPreferencesManager().getFolderHistory();
- }
-
- /**
- * Update the history with current entry field setting.
- * <p>
- * This is called automatically for you whenever this list is changed.
- */
- public void updateHistory()
- {
- folderCombo.updateHistory();
- }
-
- // ---------------------------------------------------------
- // METHODS TO CONVERT FROM STRINGS TO IREMOTEFILE OBJECTS...
- // ---------------------------------------------------------
- /**
- * Given a qualified folder name, return an IRemoteFile object representing it.
- * Will return null if there is no connection of the given name, or that connection
- * does not have a subsystem that implements RemoteFileSubSystem.
- * <p>
- * Note that if the connection contains multiple subsystems that implement RemoteFileSubSystem,
- * or that come from a subsystem factory of the given subsystem factory ID,
- * the first such subsystem is chosen.
- */
- public IRemoteFile convertToRemoteFile(String qualifiedFolder)
- throws Exception
- {
- SystemMessage msg = null;
- // parse string in constituent profile, connection and folder parts...
- String profileName = extractProfileName(qualifiedFolder);
- String connName = extractConnectionName(qualifiedFolder);
- String dirName = extractFolder(qualifiedFolder);
- if ((profileName == null) || (connName == null) || (dirName == null))
- return null;
-
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
-
- // turn profile name into profile object...
- ISystemProfile profile = sr.getSystemProfile(profileName);
- if (profile == null)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_PROFILE_NOTFOUND);
- msg.makeSubstitution(profileName);
- throw new Exception(msg.getLevelOneText());
- }
-
- // turn connection name into connection object...
- IHost conn = RSEUIPlugin.getTheSystemRegistry().getHost(profile,connName);
- if (conn == null)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND);
- msg.makeSubstitution(connName);
- throw new Exception(msg.getLevelOneText());
- }
-
- // turn folder name into folder object...
- IRemoteFile remoteFolder = null;
- ISubSystem[] filesubsystems = null;
- //if (subsystemFactoryID == null)
- filesubsystems = RemoteFileUtility.getFileSubSystems(conn);
- //else
- // filesubsystems = sr.getSubSystems(subsystemFactoryID, conn);
-
- if (filesubsystems.length == 0)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND);// hmm, what else to say?
- msg.makeSubstitution(connName);
- throw new Exception(msg.getLevelOneText());
- }
- IRemoteFileSubSystem ss = (IRemoteFileSubSystem)filesubsystems[0]; // what else to do?
- if (!ss.isConnected())
- {
- try
- {
- ss.connect(); // will throw exception if fails.
- } catch (InterruptedException exc)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED);
- msg.makeSubstitution(conn.getHostName());
- throw new Exception(msg.getLevelOneText());
- } catch (Exception exc)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED);
- msg.makeSubstitution(conn.getHostName());
- throw new Exception(msg.getLevelOneText());
- }
- }
- if (ss.isConnected())
- remoteFolder = ss.getRemoteFileObject(dirName);
- return remoteFolder;
- }
-
- /**
- * Get the profile.connection name part of a qualified folder string.
- */
- public static String extractQualifiedConnectionName(String qualifiedFolder)
- {
- int idx = qualifiedFolder.indexOf(CONNECTION_DELIMITER);
- if (idx == -1)
- return null;
- else
- return qualifiedFolder.substring(0,idx);
- }
- /**
- * Get the profile name part of a profile.connection string
- */
- public static String extractProfileName(String qualifiedConnectionName)
- {
- int idx = qualifiedConnectionName.indexOf('.');
- if (idx == -1)
- return null;
- else
- return qualifiedConnectionName.substring(0,idx);
- }
- /**
- * Get the connection name part of a profile.connection string.
- * Will work if given profile.connection or profile.connection\folder
- */
- public static String extractConnectionName(String qualifiedConnectionName)
- {
- int idx = qualifiedConnectionName.indexOf('.');
- if (idx == -1)
- return null;
- else
- {
- String nonProfile = qualifiedConnectionName.substring(idx+1);
- idx = nonProfile.indexOf(CONNECTION_DELIMITER);
- if (idx == -1)
- return nonProfile;
- else
- return nonProfile.substring(0,idx);
- }
- }
-
- /**
- * Get the folder name part of a qualified folder string.
- */
- public static String extractFolder(String qualifiedFolder)
- {
- int idx = qualifiedFolder.indexOf(CONNECTION_DELIMITER);
- if (idx == -1)
- return null;
- else
- return qualifiedFolder.substring(idx+1);
- }
-
- // -----------------------
- // INTERNAL-USE METHODS...
- // -----------------------
-
- /**
- * Prepares this composite control and sets the default layout data.
- * @param Number of columns the new group will contain.
- */
- protected Composite prepareComposite(int numColumns)
- {
- Composite composite = this;
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.CENTER;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = false;
- //data.widthHint = 300;
- composite.setLayoutData(data);
- return composite;
- }
-
- protected void addOurButtonSelectionListener()
- {
- // Add the button listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- IHost defaultConnection = null;
- IRemoteFile currFolder = null;
- try
- {
- currFolder = getFolder();
- } catch (Exception exc) {}
- if (currFolder != null)
- defaultConnection = currFolder.getSystemConnection();
-
- if (browseAction == null)
- {
- browseAction = getBrowseAction(getShell(), defaultConnection);
- }
- browseAction.setShowNewConnectionPrompt(showNewPrompt);
- //if (defaultConnection != null)
- browseAction.setHost(defaultConnection);
- //if (systemTypes != null)
- browseAction.setSystemTypes(systemTypes);
- //if (systemTypes != null)
- // System.out.println("browseAction systemsTypes set to "+systemTypes[0]);
-
-
- browseAction.run();
- IRemoteFile folder = browseAction.getSelectedFolder();
- if (folder != null)
- setFolder(folder);
- }
- };
- browseButton.addSelectionListener(selectionListener);
- }
- /**
- * Returns action to be called when Browse... pressed.
- */
- protected SystemSelectRemoteFolderAction getBrowseAction(Shell shell, IHost defaultConnection)
- {
- SystemSelectRemoteFolderAction action = new SystemSelectRemoteFolderAction(shell);
- return action;
- }
-
-
- public static Button createPushButton(Composite group, String label)
- {
- Button button = new Button(group, SWT.PUSH);
- button.setText(label);
- //button.setText("THIS IS A VERY LONG LABEL. I MEAN, IT IS JUST HUGE");
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = false;
- button.setLayoutData(data);
- return button;
- }
- protected static Button createPushButton(Composite group, ResourceBundle bundle, String key)
- {
- String label = bundle.getString(key+"label"); //$NON-NLS-1$
- Button button = createPushButton(group,label);
- button.setToolTipText(bundle.getString(key+"tooltip")); //$NON-NLS-1$
- return button;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 4c133867b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteConnectionCombo.java
+++ /dev/null
@@ -1,65 +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.files.ui.widgets;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.widgets.SystemHostCombo;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * A connection combo widget for universal connections. Includes remote Linux, Windows and Unix connections,
- * and Local connections.
- */
-public class SystemRemoteConnectionCombo extends SystemHostCombo {
-
- 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.
- * @param parent Parent composite.
- * @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL.
- * @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
- * @param showNewButton true if a New... button is to be included in this composite.
- */
- public SystemRemoteConnectionCombo(Composite parent, int style, IHost defaultConnection, boolean showNewButton) {
- super(parent, style, SYSTEM_TYPES, defaultConnection, showNewButton);
- }
-
- /**
- * Constructor when you don't care about the style. Defaults to SWT.NULL.
- * @param parent Parent composite.
- * @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
- * @param showNewButton true if a New... button is to be included in this composite.
- */
- public SystemRemoteConnectionCombo(Composite parent, IHost defaultConnection, boolean showNewButton) {
- this(parent, SWT.NULL, defaultConnection, showNewButton);
- }
-
- /**
- * Constructor when you don't care about the style or default connection, and do want to show the New button.
- * This is the most common case.
- * @param parent Parent composite
- */
- public SystemRemoteConnectionCombo(Composite parent) {
- this(parent, null, true);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index f78d7c0ac..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java
+++ /dev/null
@@ -1,568 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui.widgets;
-import java.util.Iterator;
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.widgets.ISystemCombo;
-import org.eclipse.rse.ui.widgets.SystemHistoryCombo;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This re-usable widget is for selecting a new or previously specified
- * folder path within a given connection.
- * <p>
- * Unlike SystemQualifiedRemoteFolderCombo, this widget does not combine the
- * connection name with the folder name. That means if you want to restrict
- * this to a particular connection, you must call setSystemConnection. If
- * you want to restrict to any connections of a particular system type, call
- * setSystemType.
- * <p>
- * Because this combo only deals with strings, versus IRemoteFile, it is
- * left to the caller to interpret that string as desired.
- * <p>
- * The composite is layed as follows:
- * <pre><code>
- * Folder: ______________v Browse...
- * </code></pre>
- */
-public class SystemRemoteFolderCombo extends Composite implements ISystemCombo
-{
- private Label folderLabel = null;
- private SystemHistoryCombo folderCombo = null;
- private Button browseButton = null;
- //private RemoteFileSubSystem subsystem = null;
- //private RemoteFileSubSystemConfiguration subsystemFactory = null;
- private String[] systemTypes = null;
- private IHost connection = null;
- private boolean showNewConnectionPrompt = true;
- //private static final int DEFAULT_COMBO_WIDTH = 300;
- //private static final int DEFAULT_BUTTON_WIDTH = 80;
- private SystemSelectRemoteFolderAction browseAction = null;
- private IRemoteFileSubSystem fileSubSystem = null;
-
- // list of listeners that are notified when the browse action is run and completed
- // note that the listener
- private Vector listeners;
-
- /**
- * Constructor for SystemFileFolderCombo. Requires a history key used to store/restore the
- * dropdown history for this. Pass null to use the overall default (ISystemPreferencesConstants.HISTORY_FOLDER)
- * @param parent Parent composite
- * @param style SWT style flags for overall composite widget
- * @param historyKey A string identifying the key into the user preferences where this combo's history will be stored.
- * @param readOnly True if the combo box is not to allow user editing.
- * @see #setSystemConnection(IHost)
- */
- public SystemRemoteFolderCombo(Composite parent, int style, String historyKey, boolean readOnly)
- {
- super(parent, style);
- prepareComposite(3);
- folderLabel = SystemWidgetHelpers.createLabel(this,SystemFileResources.WIDGET_FOLDER_LABEL, SystemFileResources.WIDGET_FOLDER_TOOLTIP);
- if (historyKey == null)
- historyKey = ISystemPreferencesConstants.HISTORY_FOLDER;
- folderCombo = SystemWidgetHelpers.createHistoryCombo(this,null,historyKey,readOnly,SystemFileResources.WIDGET_FOLDER_TOOLTIP);
- Object folderData = folderCombo.getLayoutData();
- if (folderData instanceof GridData)
- ((GridData)folderData).widthHint = 160;
- browseButton = createPushButton(this,SystemFileResources.WIDGET_BROWSE_LABEL);
- addOurButtonSelectionListener();
-
- listeners = new Vector();
- }
-
- /**
- * Set auto-uppercase. When enabled, all non-quoted values are uppercases when appropriate.
- * This has no effect in readonly mode!
- */
- public void setAutoUpperCase(boolean enable)
- {
- folderCombo.setAutoUpperCase(enable);
- }
-
- /**
- * Set the system types to restrict what connections the user sees, and what types of
- * connections they can create.
- * @param systemTypes An array of system type names
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new String[] {systemType})
- *
- * @param systemType The name of the system type to restrict to
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new String[] {systemType});
- }
-
- /**
- * Set the input system connection to restrict the browse button to this connection only.
- * Either call this or setSubSystemConfigurationId.
- */
- public void setSystemConnection(IHost connection)
- {
- this.connection = connection;
- }
- /**
- * Get the system connection as specified in setSystemConnection.
- */
- public IHost getSystemConnection()
- {
- return connection;
- }
-
- /**
- * Set the input remote file subsystem. If set, this will allow the browse button to better
- * pre-fill the selection dialog when browse is pressed.
- */
- public void setSubSystem(IRemoteFileSubSystem subsystem)
- {
- this.fileSubSystem = subsystem;
- }
-
- /**
- * Set whether to allow users to create new connections when Browse is pressed
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- this.showNewConnectionPrompt = show;
- }
-
- /**
- * Return the combo box widget as a System
- * Same as {@link #getCombo()}
- */
- public Combo getFolderCombo()
- {
- return folderCombo.getCombo();
- }
-
- /**
- * Get folder label.
- * @return the folder label.
- */
- public Label getFolderLabel() {
- return folderLabel;
- }
-
- /**
- * Return the combo box historical widget
- * Same as {@link #getCombo()} but returns the combo reference as a SystemHistoryCombo reference
- */
- public SystemHistoryCombo getHistoryCombo()
- {
- return folderCombo;
- }
- /**
- * Return the embedded combo box widget
- * Same as {@link #getFolderCombo()}
- */
- public Combo getCombo()
- {
- return folderCombo.getCombo();
- }
-
- /**
- * Set the width hint for this whole composite
- * Default is computed from children.
- */
- public void setWidthHint(int widthHint)
- {
- // after much research it was decided that it was the wrong thing to do to
- // explicitly set the widthHint of a child widget without our composite, as
- // that could end up being a bigger number than the composites widthHint itself
- // if the caller set its it directly.
- // Rather, we just set the overall composite width and specify the combo child
- // widget is to grab all the space within that which the little button does not use.
- ((GridData)getLayoutData()).widthHint = widthHint;
- }
-
- /**
- * Return the browse button widget
- */
- public Button getBrowseButton()
- {
- return browseButton;
- }
-
- /**
- * Set the items in the combo field
- */
- public void setItems(String[] items)
- {
- folderCombo.setItems(items);
- }
- /**
- * Get the items in the combo field
- */
- public String[] getItems()
- {
- return folderCombo.getItems();
- }
-
-
- /**
- * Set the folder combo field's current contents
- */
- public void setText(String text)
- {
- folderCombo.setText(text);
- }
-
- /**
- * Query the folder combo field's current contents
- */
- public String getText()
- {
- return folderCombo.getText();
- }
-
- /**
- * Disable/Enable all the child controls.
- */
- public void setEnabled(boolean enabled)
- {
- folderCombo.setEnabled(enabled);
- browseButton.setEnabled(enabled);
- }
- /**
- * Set the tooltip text for the folder combo field
- */
- public void setToolTipText(String tip)
- {
- folderLabel.setToolTipText(tip);
- folderCombo.setToolTipText(tip);
- }
- /**
- * Set the tooltip text for the browse button
- */
- public void setBrowseButtonToolTipText(String tip)
- {
- browseButton.setToolTipText(tip);
- }
- /**
- * Set the tooltip text for the browse button.
- * Same as {@link #setBrowseButtonToolTipText(String)}
- */
- public void setButtonToolTipText(String tip)
- {
- browseButton.setToolTipText(tip);
- }
-
- /**
- * Set the folder combo field's text limit
- */
- public void setTextLimit(int limit)
- {
- folderCombo.setTextLimit(limit);
- }
- /**
- * Set the focus to the folder combo field
- */
- public boolean setFocus()
- {
- return folderCombo.setFocus();
- }
- /**
- * Set the focus to the browse button
- */
- public void setBrowseButtonFocus()
- {
- browseButton.setFocus();
- }
- /**
- * Select the combo dropdown list entry at the given index
- */
- public void select(int selIdx)
- {
- folderCombo.select(selIdx);
- }
- /**
- * Same as {@link #select(int)}
- */
- public void setSelectionIndex(int selIdx)
- {
- select(selIdx);
- }
- /**
- * Get the index number of the currently selected item.
- */
- public int getSelectionIndex()
- {
- return folderCombo.getSelectionIndex();
- }
-
- /**
- * Clear the selection of the text in the entry field part of the combo
- */
- public void clearSelection()
- {
- folderCombo.clearSelection();
- }
- /**
- * Clear the entered/selected contents of the combo box. Clears only the text selection, not the list selection
- */
- public void clearTextSelection()
- {
- folderCombo.clearTextSelection();
- }
- /**
- * Register a listener interested in an item is selected in the combo box
- * @see #removeSelectionListener(SelectionListener)
- */
- public void addSelectionListener(SelectionListener listener)
- {
- folderCombo.addSelectionListener(listener);
- }
- /**
- * Remove a previously set combo box selection listener.
- * @see #addSelectionListener(SelectionListener)
- */
- public void removeSelectionListener(SelectionListener listener)
- {
- folderCombo.removeSelectionListener(listener);
- }
- /**
- * Register a listener interested in when the browse button is selected
- * @see #removeBrowseButtonSelectionListener(SelectionListener)
- */
- public void addBrowseButtonSelectionListener(SelectionListener listener)
- {
- browseButton.addSelectionListener(listener);
- }
- /**
- * Remove a previously set browse button selection listener.
- * @see #addBrowseButtonSelectionListener(SelectionListener)
- */
- public void removeBrowseButtonSelectionListener(SelectionListener listener)
- {
- browseButton.removeSelectionListener(listener);
- }
-
- /**
- * Register a listener interested in entry field modify events
- * @see #removeModifyListener(ModifyListener)
- */
- public void addModifyListener(ModifyListener listener)
- {
- folderCombo.addModifyListener(listener);
- }
- /**
- * Remove a previously set entry field listener.
- * @see #addModifyListener(ModifyListener)
- */
- public void removeModifyListener(ModifyListener listener)
- {
- folderCombo.removeModifyListener(listener);
- }
-
- /**
- * Adds a listener which will be notified each time after the browse action is run.
- * @param listener the listener to be notified.
- */
- public void addBrowseActionCompleteListener(ISystemRemoteFolderBrowseCompleteListener listener) {
-
- if (!listeners.contains(listener)) {
- listeners.add(listener);
- }
- }
-
- /**
- * Removes the given listener. Has no effect if the listener was not added before.
- * @param listener the listener to be removed.
- */
- public void removeBrowseActionCompleteListener(ISystemRemoteFolderBrowseCompleteListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * Notifies all registered listeners.
- * @param remoteFile the remote file to use for the notification.
- */
- protected void notifyBrowseActionCompleteListeners(IRemoteFile remoteFile) {
-
- Iterator iter = listeners.iterator();
-
- if (iter.hasNext()) {
- ISystemRemoteFolderBrowseCompleteListener listener = (ISystemRemoteFolderBrowseCompleteListener)(iter.next());
- listener.fileSelected(remoteFile);
- }
- }
-
- /**
- * Return the current history for the folder combo box
- */
- public static String[] getHistory()
- {
- return SystemPreferencesManager.getPreferencesManager().getFolderHistory();
- }
-
- /**
- * Update the history with current entry field setting.
- * <p>
- * This is called automatically for you when setText is called. However, for non-readonly
- * versions, you should still call this yourself when OK is successfully pressed on the
- * dialog box.
- */
- public void updateHistory()
- {
- folderCombo.updateHistory();
- }
-
- /**
- * Update the history with current entry field setting, and optionally refresh the list from the new history.
- */
- public void updateHistory(boolean refresh) {
- folderCombo.updateHistory(refresh);
- }
-
- // -----------------------
- // INTERNAL-USE METHODS...
- // -----------------------
- /**
- * Prepares this composite control and sets the default layout data.
- * @param Number of columns the new group will contain.
- */
- protected Composite prepareComposite(int numColumns)
- {
- Composite composite = this;
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.CENTER;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = false;
- //data.widthHint = 180; //CAUSES TRUNCATION IF TRANSLATED BUTTON TEXT IS LONG
- composite.setLayoutData(data);
- return composite;
- }
-
- protected void addOurButtonSelectionListener()
- {
- // Add the button listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- if (browseAction == null)
- {
- browseAction = getBrowseAction(getShell());
- }
- //if (connection != null)
- browseAction.setHost(connection);
- //if (systemTypes != null)
- browseAction.setSystemTypes(systemTypes);
- browseAction.setShowNewConnectionPrompt(showNewConnectionPrompt);
- browseAction.setShowPropertySheet(true, false);
- String currentFolder = getText().trim();
- if ((currentFolder.length() > 0) && (fileSubSystem!=null))
- {
- IRemoteFile currentFolderObject = null;
- try {
- currentFolderObject = fileSubSystem.getRemoteFileObject(currentFolder);
- } catch(SystemMessageException e) {
- SystemBasePlugin.logError("SystemRemoteFolderCombo.wdigetSelected", e);
- }
- if (currentFolderObject != null)
- browseAction.setPreSelection(currentFolderObject);
- }
-
- browseAction.run();
- IRemoteFile folder = browseAction.getSelectedFolder();
- if (folder != null)
- setText(folder.getAbsolutePath());
-
- // notify listeners with the selected folder
- // we notify even if the suer cancelled and the folder is null so listeners
- // know that the brose dialog was cancelled
- notifyBrowseActionCompleteListeners(folder);
- }
- };
- browseButton.addSelectionListener(selectionListener);
- }
- /**
- * Returns action to be called when Browse... pressed.
- * Either connection or subsystemFactoryId better be set!
- */
- protected SystemSelectRemoteFolderAction getBrowseAction(Shell shell)
- {
- SystemSelectRemoteFolderAction action = new SystemSelectRemoteFolderAction(shell);
- return action;
- }
-
-
- public static Button createPushButton(Composite group, String label)
- {
- Button button = new Button(group, SWT.PUSH);
- button.setText(label);
- //button.setText("THIS IS A VERY LONG LABEL. I MEAN IT IS JUST HUGE."); //to test mri
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = false;
- button.setLayoutData(data);
- return button;
- }
- protected static Button createPushButton(Composite group, ResourceBundle bundle, String key)
- {
- String label = bundle.getString(key+"label"); //$NON-NLS-1$
- Button button = createPushButton(group,label);
- button.setToolTipText(bundle.getString(key+"tooltip")); //$NON-NLS-1$
- return button;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index c769c0d6f..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java
+++ /dev/null
@@ -1,1056 +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.files.ui.widgets;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-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.SystemRemoteObjectMatcher;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.files.ui.ISystemAddFileListener;
-import org.eclipse.rse.filters.SystemFilterSimple;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-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.subsystems.files.core.util.SystemRemoteFileMatcher;
-import org.eclipse.rse.ui.ISystemIconConstants;
-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;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemPropertySheetForm;
-import org.eclipse.rse.ui.view.SystemSelectRemoteObjectAPIProviderImpl;
-import org.eclipse.rse.ui.view.SystemViewForm;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-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;
-
-
-
-/**
- * A reusable form for prompting for a remote file system folder or file.
- * <p>
- * This form may be used to populate a dialog or a wizard page.
- * <p>
- * To configure the functionality, call these methods:
- * <ul>
- * <li>{@link #setShowNewConnectionPrompt(boolean)}
- * <li>{@link #setSystemConnection(IHost) or #setDefaultConnection(SystemConnection)}
- * <li>{@link #setSystemTypes(String[])}
- * <li>{@link #setRootFolder(IHost, String)} or {@link #setRootFolder(IRemoteFile)}
- * <li>{@link #setPreSelection(IRemoteFile)}
- * <li>{@link #setFileTypes(String[])} or {@link #setFileTypes(String)}
- * <li>{@link #setAutoExpandDepth(int)}
- * <li>{@link #setShowPropertySheet(boolean)}
- * <li>{@link #enableAddMode(org.eclipse.rse.files.ui.ISystemAddFileListener)}
- * <li>{@link #setMultipleSelectionMode(boolean)}
- * <li>{@link #setSelectionValidator(org.eclipse.rse.ui.IValidatorRemoteSelection)}
- * </ul>
- * <p>
- * To configure the text on the dialog, call these methods:
- * <ul>
- * <li>{@link #setMessage(String)}
- * <li>{@link #setSelectionTreeToolTipText(String)}
- * </ul>
- * <p>
- * After running, call these methods to get the output:
- * <ul>
- * <li>{@link #getSelectedObject()}
- * <li>{@link #getSelectedConnection()}
- * </ul>
- */
-public class SystemSelectRemoteFileOrFolderForm
- implements ISelectionChangedListener, ISystemIconConstants
-{
- protected static final int PROMPT_WIDTH = 400; // The maximum width of the dialog's prompt, in pixels.
-
- // GUI widgets
- protected Label verbageLabel, spacer1, spacer2;
- protected Text nameEntryValue;
- protected SystemViewForm tree;
- protected SystemPropertySheetForm ps;
- protected ISystemMessageLine msgLine;
- protected Composite outerParent, ps_composite;
- // inputs
- protected ISystemRegistry sr = null;
- protected String verbage = null;
- protected String treeTip = null;
- protected String locationPrompt = ""; //$NON-NLS-1$
- protected String fileTypes;
- protected boolean fileMode;
- protected boolean valid = true;
- protected boolean filesOnlyMode;
- protected boolean showRootFilter = true;
- protected boolean alwaysEnableOK = false;
- protected boolean multipleSelectionMode;
- protected boolean allowForMultipleParents = false;
- protected boolean showPropertySheet = false;
- protected boolean showLocationPrompt = false;
- protected boolean allowFolderSelection = true;
- protected SystemRemoteObjectMatcher objectMatcher = null;
- protected ISystemAddFileListener addButtonCallback = null;
- protected Vector listeners = new Vector();
- protected IValidatorRemoteSelection selectionValidator;
- // outputs
- protected Object[] outputObjects = null;
- protected IHost outputConnection = null;
- // state
- //protected ResourceBundle rb;
- protected SystemSelectRemoteObjectAPIProviderImpl inputProvider = null;
- protected ISystemFilter preSelectFilter;
- protected String preSelectFilterChild;
- protected boolean preSelectRoot;
- protected boolean initDone;
- protected boolean contentsCreated;
-
- //protected String errorMessage;
- protected Object caller;
- protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
- protected int autoExpandDepth = 0;
-
- protected Object previousSelection = null;
- protected List viewerFilters = new ArrayList();
-
- /**
- * Constructor
- * @param msgLine A GUI widget capable of writing error messages to.
- * @param caller The wizardpage or dialog hosting this form.
- * @param fileMode true if in select-file mode, false if in select-folder mode
-
- * @see #setSystemConnection(IHost)
- * @see #setShowNewConnectionPrompt(boolean)
- * @see #setSystemTypes(String[])
- * @see #setSelectionTreeToolTipText(String)
- */
- public SystemSelectRemoteFileOrFolderForm(ISystemMessageLine msgLine, Object caller, boolean fileMode)
- {
- this.msgLine = msgLine;
- this.caller = caller;
- this.fileMode = fileMode;
- callerInstanceOfWizardPage = (caller instanceof WizardPage);
- callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
- //rb = RSEUIPlugin.getResourceBundle();
- sr = RSEUIPlugin.getTheSystemRegistry();
-
- // set default GUI
- verbage = fileMode ? SystemFileResources.RESID_SELECTFILE_VERBAGE: SystemFileResources.RESID_SELECTDIRECTORY_VERBAGE;
- treeTip = fileMode ? SystemFileResources.RESID_SELECTFILE_SELECT_TOOLTIP : SystemFileResources.RESID_SELECTDIRECTORY_SELECT_TOOLTIP;
-
- // create the input provider that drives the contents of the tree
- inputProvider = getInputProvider();
-
- String initialFilterString = "*"; // change to "*" for defect 43492 //$NON-NLS-1$
- inputProvider.setFilterString(fileMode ? initialFilterString : initialFilterString+" /nf"); //$NON-NLS-1$
-
- // create object matcher
- if (fileMode)
- objectMatcher = SystemRemoteFileMatcher.getFileOnlyMatcher();
- else
- objectMatcher = SystemRemoteFileMatcher.getFolderOnlyMatcher();
- }
-
- // ---------------------------------
- // INPUT OR CONFIGURATION METHODS...
- // ---------------------------------
- /**
- * Returns the input provider that drives the contents of the tree
- * Subclasses can override to provide custom tree contents
- */
- protected SystemSelectRemoteObjectAPIProviderImpl getInputProvider()
- {
- if (inputProvider == null)
- {
- // create the input provider that drives the contents of the tree
- inputProvider = new SystemSelectRemoteObjectAPIProviderImpl(null, ISystemFileRemoteTypes.TYPECATEGORY,
- true, null); // show new connection prompt, no system type restrictions
-
- }
- return inputProvider;
- }
-
- /**
- * Indicate whether the form should allow selection of objects from different parents
- */
- public void setAllowForMultipleParents(boolean flag)
- {
- allowForMultipleParents = flag;
- }
-
- /**
- * Set the connection to restrict the user to seeing
- */
- public void setSystemConnection(IHost conn)
- {
- // Dave, you can't just change true to false. This causes the side effect of all selection dialogs
- // allowing users to see more then just their current connection, which makes no sense. It needs
- // to be selective based on the particular action. So, I added setDefaultConnection for those cases
- // where we want to see other connections. Phil
- //inputProvider.setSystemConnection(conn, /* DKM - now we support cross system copy true */ false); // true means only this connection
- inputProvider.setSystemConnection(conn,true); // true means only this connection
- }
- /**
- * Set the connection to default the selection to
- */
- public void setDefaultConnection(IHost conn)
- {
- inputProvider.setSystemConnection(conn, /* DKM - now we support cross system copy true */ false); // true means only this connection
- }
-
- /**
- * Set to true if a "New Connection..." special connection is to be shown for creating new connections
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- inputProvider.setShowNewConnectionPrompt(show);
- }
- /**
- * 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.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- inputProvider.setSystemTypes(systemTypes);
- }
- /**
- * Set the message shown as the text at the top of the form. Eg, "Select a file"
- */
- public void setMessage(String message)
- {
- this.verbage = message;
- if (verbageLabel != null)
- verbageLabel.setText(message);
- }
- /**
- * Set the tooltip text for the remote systems tree from which an item is selected.
- */
- public void setSelectionTreeToolTipText(String tip)
- {
- this.treeTip = tip;
- if (tree != null)
- tree.setToolTipText(tip);
- }
-
- /**
- * Set the root folder from which to start listing folders or files.
- * This version identifies the folder via a connection object and absolute path.
- * There is another overload that identifies the folder via a single IRemoteFile object.
- *
- * @param connection The connection to the remote system containing the root folder
- * @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IHost connection, String folderAbsolutePath)
- {
- setSystemConnection(connection);
- setShowNewConnectionPrompt(false);
- setAutoExpandDepth(1);
- //ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection);
- IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemConfiguration();
- RemoteFileFilterString rffs = new RemoteFileFilterString(ssf);
- rffs.setShowFiles(fileMode); // no files if in folders mode
- rffs.setShowSubDirs(!fileMode || !filesOnlyMode); // yes folders, always, for now
- if (fileTypes != null)
- rffs.setFile(fileTypes);
-
- // set the default filters we will show when the user expands a connection...
- String filterName = null;
- SystemFilterSimple filter = null;
- int filterCount = showRootFilter ? 2 : 1;
- if (preSelectRoot)
- filterCount = 1;
- ISystemFilter[] filters = new ISystemFilter[filterCount];
- int idx = 0;
-
- // filter one: "Root files"/"Root folders" or "Drives"
- if (showRootFilter)
- {
- if (ssf.isUnixStyle())
- {
- if (!preSelectRoot)
- {
- // "Root files" or "Folders"
- filterName = fileMode ? SystemFileResources.RESID_FILTER_ROOTFILES : SystemFileResources.RESID_FILTER_ROOTFOLDERS;
- //rffs.setPath(ssf.getSeparator()); // defect 43492. Show the root not the contents of the root
- }
- else
- {
- filterName = SystemFileResources.RESID_FILTER_ROOTS; // "Roots"
- }
- }
- else
- filterName = fileMode ? SystemFileResources.RESID_FILTER_DRIVES : SystemFileResources.RESID_FILTER_DRIVES;
- filter = new SystemFilterSimple(filterName);
- filter.setParent(ss);
- filter.setFilterString(rffs.toString());
- filters[idx++] = filter;
- //System.out.println("FILTER 1: " + filter.getFilterString());
- if (preSelectRoot)
- {
- preSelectFilter = filter;
- preSelectFilterChild = folderAbsolutePath;
- //RSEUIPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath);
- }
- }
-
- if (!preSelectRoot)
- {
-
- // filter two: "\folder1\folder2"
- rffs.setPath(folderAbsolutePath);
-
- filter = new SystemFilterSimple(rffs.toStringNoSwitches());
- filter.setParent(ss);
- filter.setFilterString(rffs.toString());
- filters[idx] = filter;
-
- preSelectFilter = filter;
- //RSEUIPlugin.logInfo("FILTER 2: " + filter.getFilterString());
- }
- inputProvider.setFilterString(null); // undo what ctor did
- inputProvider.setQuickFilters(filters);
- }
- /**
- * Set the root folder from which to start listing folders.
- * This version identifies the folder via an IRemoteFile object.
- * There is another overload that identifies the folder via a connection and folder path.
- *
- * @param rootFolder The IRemoteFile object representing the remote folder to start the list from
- *
- * @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public void setRootFolder(IRemoteFile rootFolder)
- {
- setRootFolder(rootFolder.getSystemConnection(),rootFolder.getAbsolutePath());
- }
- /**
- * Set a file or folder to preselect. This will:
- * <ul>
- * <li>Set the parent folder as the root folder
- * <li>Pre-expand the parent folder
- * <li>Pre-select the given file or folder after expansion
- * </ul>
- * If there is no parent, then we were given a root. In which case we will
- * <ul>
- * <li>Force setRestrictFolders to false
- * <li>Pre-expand the root drives (Windows) or root files (Unix)
- * <li>Pre-select the given root drive (Windows only)
- * </ul>
- */
- public void setPreSelection(IRemoteFile selection)
- {
- SystemBasePlugin.logInfo("given: '" + selection.getAbsolutePath()+"'"); //$NON-NLS-1$ //$NON-NLS-2$
- IRemoteFile parentFolder = selection.getParentRemoteFile();
- /**/
- if (parentFolder != null)
- SystemBasePlugin.logInfo("parent of given: '" + parentFolder.getAbsolutePath() + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- else
- SystemBasePlugin.logInfo("parent of given is null"); //$NON-NLS-1$
- /**/
- // it might be a bug, bug when asking for the parent of '/', I get back '/'!!!
- if ((parentFolder != null) &&
- (selection.getAbsolutePath().equals("/") && //$NON-NLS-1$
- (parentFolder.getAbsolutePath()!=null) &&
- parentFolder.getAbsolutePath().equals("/"))) //$NON-NLS-1$
- parentFolder = null;
- if (parentFolder != null)
- {
- IRemoteFileSubSystemConfiguration ssf = selection.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration();
- boolean isUnix = ssf.isUnixStyle();
- if (isUnix)
- setRestrictFolders(parentFolder.isRoot());
- setRootFolder(parentFolder);
- preSelectFilterChild = selection.getName();
- //RSEUIPlugin.logInfo("Setting preSelectFilterChild to '"+preSelectFilterChild+"'");
- }
- else
- {
- SystemBasePlugin.logInfo("preSelectRoot is true"); //$NON-NLS-1$
- preSelectRoot = true;
- setRestrictFolders(false);
- setRootFolder(selection);
- }
- inputProvider.setPreSelectFilterChild(preSelectFilterChild);
- }
-
- /**
- * For files mode, restrict the files list by an array of file types
- * <p>
- * This must be called BEFORE setRootFolder!
- */
- public void setFileTypes(String[] fileTypes)
- {
- String fts = null;
- if (fileTypes != null)
- fts = RemoteFileFilterString.getTypesString(fileTypes);
- setFileTypes(fts);
- }
- /**
- * For files mode, restrict the files list by a comman-delimited array of file types.
- * The last type must also end in a comma. Eg "java, class," or "class,".
- * <p>
- * This must be called BEFORE setRootFolder!
- */
- public void setFileTypes(String fileTypes)
- {
- this.fileTypes = fileTypes;
- inputProvider.setFilterString("/"+ fileTypes); //$NON-NLS-1$
- }
- /**
- * Specify the zero-based auto-expand level for the tree. The default is zero, meaning
- * only show the connections.
- */
- public void setAutoExpandDepth(int depth)
- {
- this.autoExpandDepth = depth+1;
- }
- /**
- * Specify whether setRootFolder should prevent the user from being able to see or select
- * any other folder. This causes two effects:
- * <ol>
- * <li>The special filter for root/drives is not shown
- * <li>No subfolders are listed in the target folder, if we are listing files. Of course, they are shown
- * if we are listing folders, else it would be an empty list!
- * </ol>
- */
- public void setRestrictFolders(boolean restrict)
- {
- //this.filesOnlyMode = restrict;
- this.showRootFilter = !restrict;
- }
- /**
- * Enable Add mode. This means the OK button is replaced with an Add button, and
- * the Cancel with a Close button. When Add is pressed, the caller is called back.
- * The dialog is not exited until Close is pressed.
- * <p>
- * When a library is selected, the caller is called back to decide to enable the Add
- * button or not.
- */
- public void enableAddMode(ISystemAddFileListener caller)
- {
- this.addButtonCallback = caller;
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- this.showPropertySheet = show;
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedObjects()
- * method to retrieve the list of selected objects.
- * <p>
- * Further, if you turn this on, it has the side effect of allowing the user
- * to select any remote object. The assumption being if you are prompting for
- * files, you also want to allow the user to select a folder, with the meaning
- * being that all files within the folder are implicitly selected.
- *
- * @see #getSelectedObjects()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- this.multipleSelectionMode = multiple;
- if (multiple)
- objectMatcher = null;
- }
-
- /**
- * Add a listener to selection change events in the tree
- */
- public void addSelectionChangedListener(ISelectionChangedListener l)
- {
- if (tree != null)
- tree.addSelectionChangedListener(l);
- else
- listeners.addElement(l);
- }
- /**
- * Remove a listener for selection change events
- */
- public void removeSelectionChangedListener(ISelectionChangedListener l)
- {
- if (tree != null)
- tree.removeSelectionChangedListener(l);
- else
- listeners.removeElement(l);
- }
-
- /**
- * Specify a validator to use when the user selects a remote file or folder.
- * This allows you to decide if OK should be enabled or not for that remote file or folder.
- */
- public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
- {
- this.selectionValidator = selectionValidator;
- }
-
-
- // ---------------------------------
- // OUTPUT METHODS...
- // ---------------------------------
- /**
- * Return first selected object
- */
- public Object getSelectedObject()
- {
- if ((outputObjects != null) && (outputObjects.length>=1))
- return outputObjects[0];
- else
- return null;
- }
- /**
- * Return all selected objects.
- * @see #setMultipleSelectionMode(boolean)
- */
- public Object[] getSelectedObjects()
- {
- return outputObjects;
- }
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- /**
- * Return the embedded System Tree object.
- * Will be null until createContents is called.
- */
- public SystemViewForm getSystemViewForm()
- {
- return tree;
- }
-
- /**
- * Return the multiple selection mode current setting
- */
- public boolean getMultipleSelectionMode()
- {
- return multipleSelectionMode;
- }
-
- // -----------------------------------------------------
- // SEMI-PRIVATE METHODS USED BY CALLING DIALOG/WIZARD...
- // -----------------------------------------------------
- /**
- * Often the message line is null at the time of instantiation, so we have to call this after
- * it is created.
- */
- public void setMessageLine(ISystemMessageLine msgLine)
- {
- this.msgLine = msgLine;
- }
-
- /**
- * Return control to recieve initial focus
- */
- public Control getInitialFocusControl()
- {
- return tree.getTreeControl();
- }
-
- /**
- * Show or hide the property sheet. This is called after the contents are created when the user
- * toggles the Details button.
- * @param shell Use getShell() in your dialog or wizard page
- * @param contents Use getContents() in your dialog or wizard page
- * @return new state -> true if showing, false if hiding
- */
- public boolean toggleShowPropertySheet(Shell shell, Control contents)
- {
- Point windowSize = shell.getSize();
- Point oldSize = contents.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (showPropertySheet) // hiding?
- {
- ps.dispose();
- spacer1.dispose();
- spacer2.dispose();
- ps_composite.dispose();
- ps = null; spacer1 = spacer2 = null; ps_composite = null;
- ((GridLayout)outerParent.getLayout()).numColumns = 1;
- }
- else // showing?
- {
- //createPropertySheet((Composite)contents, shell);
- ((GridLayout)outerParent.getLayout()).numColumns = 2;
- createPropertySheet(outerParent, shell);
- }
-
- Point newSize = contents.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- shell.setSize(new Point(windowSize.x + (newSize.x - oldSize.x), windowSize.y));
-
- if (ps != null)
- {
- ISelection s = tree.getSelection();
- if (s != null)
- ps.selectionChanged(s);
- }
-
- showPropertySheet = !showPropertySheet;
- return showPropertySheet;
- }
-
- /**
- * Create the property sheet viewer
- */
- private void createPropertySheet(Composite outerParent, Shell shell)
- {
- ps_composite = SystemWidgetHelpers.createFlushComposite(outerParent, 1);
- ((GridData)ps_composite.getLayoutData()).grabExcessVerticalSpace = true;
- ((GridData)ps_composite.getLayoutData()).verticalAlignment = GridData.FILL;
-
- // SPACER LINES
- spacer1 = SystemWidgetHelpers.createLabel(ps_composite, "", 1); //$NON-NLS-1$
- spacer2 = SystemWidgetHelpers.createLabel(ps_composite, "", 1); //$NON-NLS-1$
- // PROPERTY SHEET VIEWER
- ps = new SystemPropertySheetForm(shell, ps_composite, SWT.BORDER, msgLine);
- }
-
- public void dispose()
- {
- if (tree != null)
- {
- tree.removeSelectionChangedListener(this);
- for (int i = 0; i < listeners.size(); i++)
- {
- tree.removeSelectionChangedListener((ISelectionChangedListener)listeners.get(i));
- }
- }
- }
- /**
- * In this method, we populate the given SWT container with widgets and return the container
- * to the caller.
- * @param parent The parent composite
- */
- public Control createContents(Shell shell, Composite parent)
- {
- contentsCreated = true;
-
- outerParent = parent;
- // OUTER COMPOSITE
- //if (showPropertySheet)
- {
- outerParent = SystemWidgetHelpers.createComposite(parent, showPropertySheet ? 2 : 1);
- }
-
- // INNER COMPOSITE
- int gridColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createFlushComposite(outerParent, gridColumns);
-
- // PROPERTY SHEET COMPOSITE
- if (showPropertySheet)
- {
- createPropertySheet(outerParent, shell);
- }
- else
- {
- //((GridLayout)composite_prompts.getLayout()).margin...
- }
-
- // MESSAGE/VERBAGE TEXT AT TOP
- verbageLabel = SystemWidgetHelpers.createVerbiage(composite_prompts, verbage, gridColumns, false, PROMPT_WIDTH);
- //verbageLabel = SystemWidgetHelpers.createLabel(composite_prompts, verbage, gridColumns);
-
- // SPACER LINE
- SystemWidgetHelpers.createLabel(composite_prompts, "", gridColumns); //$NON-NLS-1$
-
- // LOCATION PROMPT
- if (showLocationPrompt)
- {
- SystemWidgetHelpers.createLabel(composite_prompts, locationPrompt, gridColumns);
- }
-
- // SELECT OBJECT READONLY TEXT FIELD
- Composite nameComposite = composite_prompts;
- int nameSpan = gridColumns;
- nameEntryValue = SystemWidgetHelpers.createReadonlyTextField(nameComposite);
- ((GridData)nameEntryValue.getLayoutData()).horizontalSpan = nameSpan;
-
- // create an array of viewer filters from our list of viewer filters
- ViewerFilter[] initViewerFilters = null;
-
- // if we don't have a viewer filter list, then create an empty array
- if (viewerFilters == null) {
- initViewerFilters = new ViewerFilter[0];
- }
- // otherwise copy from list to array
- else {
- initViewerFilters = new ViewerFilter[viewerFilters.size()];
-
- Iterator iter = viewerFilters.iterator();
-
- int idx = 0;
-
- // copy from list to array
- while (iter.hasNext()) {
- ViewerFilter filter = (ViewerFilter)(iter.next());
- initViewerFilters[idx] = filter;
- idx++;
- }
- }
-
- // TREE
- tree = new SystemViewForm(shell, composite_prompts, SWT.NULL, inputProvider, !multipleSelectionMode, msgLine, gridColumns, 1, initViewerFilters);
-
- if (treeTip != null)
- //tree.setToolTipText(treeTip); //EXTREMELY ANNOYING!
- if (autoExpandDepth != 0)
- {
- tree.getSystemView().setAutoExpandLevel(autoExpandDepth);
- tree.reset(inputProvider);
- }
-
- // initialize fields
- if (!initDone)
- doInitializeFields();
-
- // add selection listeners
- tree.addSelectionChangedListener(this);
- if (listeners.size() > 0)
- for (int idx=0; idx<listeners.size(); idx++)
- tree.addSelectionChangedListener((ISelectionChangedListener)listeners.elementAt(idx));
-
- // pre-select default root folder filter...
- if (preSelectFilter != null)
- {
- tree.select(preSelectFilter, true);
- Object preSelectFilterChildObject = inputProvider.getPreSelectFilterChildObject();
- if (preSelectFilterChildObject != null)
- tree.select(preSelectFilterChildObject, false);
- }
-
- return composite_prompts;
- }
-
- /**
- * Completes processing of the wizard page or dialog. If this
- * method returns true, the wizard/dialog will close;
- * otherwise, it will stay active.
- *
- * @return true if no errors
- */
- public boolean verify()
- {
- msgLine.clearErrorMessage();
- outputConnection = internalGetConnection();
- return true;
- }
-
-
- // -----------------------------------------------------
- // PRIVATE METHODS USED BY US...
- // -----------------------------------------------------
-
- /**
- * Return the current connection
- */
- protected IHost internalGetConnection()
- {
- Object parent = tree.getSystemView().getRootParent();
- if (parent instanceof IHost)
- {
- return (IHost)parent;
- }
- return null;
- }
-
- protected void setNameText(String text)
- {
- nameEntryValue.setText(text);
- }
- private String getNameText()
- {
- return nameEntryValue.getText();
- }
- private void doInitializeFields()
- {
- setPageComplete();
- initDone = true;
- return;
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- private ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- // ---------------------------------------------------
- // METHODS FOR SELECTION CHANGED LISTENER INTERFACE...
- // ---------------------------------------------------
- /**
- * User selected something in the tree.
- */
- public void selectionChanged(SelectionChangedEvent e)
- {
- valid = true;
- ISelection selection = e.getSelection();
-
- if (ps != null)
- ps.selectionChanged(selection);
-
- outputObjects = null;
- int selectionSize = ((IStructuredSelection)selection).size();
- if ((selectionSize > 1) && !tree.sameParent() && !allowForMultipleParents)
- {
- clearErrorMessage();
- setNameText(""); //$NON-NLS-1$
- setPageComplete();
- return; // don't enable OK/Add if selections from different parents
- }
-
- Object errMsg = null;
- Object selectedObject = getFirstSelection(selection);
- if (selectedObject == previousSelection && selectionSize == 1)
- {
- // DKM we null set this before, so we need to reset it
- outputObjects = getSelections(selection);
- return;
- }
- clearErrorMessage();
- setNameText(""); //$NON-NLS-1$
- setPageComplete();
- previousSelection = selectedObject;
- if (selectedObject != null)
- {
-
- ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(selectedObject);
- if (remoteAdapter != null)
- {
- setNameTextFromSelection(selection, selectedObject, remoteAdapter);
-
- outputConnection = internalGetConnection();
- if ((addButtonCallback != null) && (selectedObject instanceof IRemoteFile))
- {
- errMsg = addButtonCallback.okToEnableAddButton(outputConnection, (IRemoteFile[])getSelections(selection));
-
- if (errMsg != null)
- {
- if (errMsg instanceof String)
- setErrorMessage((String)errMsg);
- else
- setErrorMessage((SystemMessage)errMsg);
- }
- }
- else if ((objectMatcher == null) || objectMatcher.appliesTo(remoteAdapter, selectedObject))
- {
- SystemMessage selectionMsg = null;
- if (selectionValidator != null)
- selectionMsg = selectionValidator.isValid(outputConnection, getSelections(selection), getRemoteAdapters(selection));
-
- if (selectionMsg != null)
- {
- valid = false;
- setErrorMessage(selectionMsg);
- setPageComplete();
- }
- }
- // if we're in file mode and folder selection is not allowed, then mark as invlaid selection
- else if (fileMode && !allowFolderSelection) {
-
- if (remoteAdapter.getRemoteType(selectedObject).equals(ISystemFileRemoteTypes.TYPE_FOLDER)) {
- valid = false;
- setPageComplete();
- }
- }
- }
- }
- }
-
- protected ISystemRemoteElementAdapter[] getRemoteAdapters(ISelection selection)
- {
- Object[] selectedObjects = getSelections(selection);
- ISystemRemoteElementAdapter[] adapters = new ISystemRemoteElementAdapter[selectedObjects.length];
- for (int idx=0; idx<adapters.length; idx++)
- {
- adapters[idx] = getRemoteAdapter(selectedObjects[idx]);
- }
- return adapters;
- }
-
-
- private void setNameTextFromSelection(ISelection selection, Object selectedObject,ISystemRemoteElementAdapter remoteAdapter)
- {
- setNameText(remoteAdapter.getAbsoluteName(selectedObject));
- outputObjects = getSelections(selection);
- setPageComplete();
- }
-
- /**
- * Return first item currently selected.
- */
- protected Object getFirstSelection(ISelection selection)
- {
- IStructuredSelection sSelection = (IStructuredSelection)selection;
- if (sSelection != null)
- {
- Iterator selectionIterator = sSelection.iterator();
- if (selectionIterator.hasNext())
- return selectionIterator.next();
- else
- return null;
- }
- return null;
- }
- /**
- * Return all items currently selected.
- */
- protected Object[] getSelections(ISelection selection)
- {
- IStructuredSelection sSelection = (IStructuredSelection)selection;
- if (sSelection != null)
- {
- Object[] selectedObjects = new Object[sSelection.size()];
- Iterator selectionIterator = sSelection.iterator();
- int idx = 0;
- while (selectionIterator.hasNext())
- selectedObjects[idx++] = selectionIterator.next();
- return selectedObjects;
- }
- return null;
- }
-
- /**
- * 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()
- {
- return ( (getNameText().length() > 0) ) && valid;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- if (callerInstanceOfWizardPage)
- {
- ((WizardPage)caller).setPageComplete(isPageComplete());
- }
- else if (callerInstanceOfSystemPromptDialog)
- {
- ((SystemPromptDialog)caller).setPageComplete(isPageComplete());
- }
- }
-
-
- protected void clearErrorMessage()
- {
- if (msgLine != null)
- msgLine.clearErrorMessage();
- }
- protected void setErrorMessage(String msg)
- {
- if (msgLine != null)
- if (msg != null)
- msgLine.setErrorMessage(msg);
- else
- msgLine.clearErrorMessage();
- }
- protected void setErrorMessage(SystemMessage msg)
- {
- if (msgLine != null)
- if (msg != null)
- msgLine.setErrorMessage(msg);
- else
- msgLine.clearErrorMessage();
- }
-
- /**
- * Return shell of parent dialog or wizard
- */
- protected Shell getShell()
- {
- if (callerInstanceOfWizardPage)
- return ((WizardPage)caller).getShell();
- else if (callerInstanceOfSystemPromptDialog)
- return ((SystemPromptDialog)caller).getShell();
- else
- return null;
- }
-
- public void setShowLocationPrompt(boolean show)
- {
- showLocationPrompt = show;
- }
-
- public void setLocationPrompt(String prompt)
- {
- locationPrompt = prompt;
- }
-
- /**
- * Add viewer filter.
- * @param filter a viewer filter.
- * @see SystemActionViewerFilter.
- */
- public void addViewerFilter(ViewerFilter filter) {
- viewerFilters.add(filter);
- }
-
- /**
- * Sets whether to allow folder selection. The default selection validator will use this to
- * determine whether the OK button will be enabled when a folder is selected. The default
- * is <code>true</code>. This call only makes sense if the form is in file selection mode.
- * @param allow <code>true</code> to allow folder selection, <code>false</code> otherwise.
- */
- public void setAllowFolderSelection(boolean allow) {
- allowFolderSelection = allow;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 91c96695d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java
+++ /dev/null
@@ -1,612 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui.widgets;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.viewers.ICheckStateListener;
-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;
-import org.eclipse.rse.ui.view.SystemViewLabelAndContentProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * This re-usable composite widget is for prompting the user to select
- * multiple files from a remote system.
- * <p>
- * The composite is layed as follows:
- * <code>
- * Folder: ______________V Browse...
- *
- * .________________. ____________.
- * | + folder | | file1 |
- * | + subfolder | | file2 |
- * | + subfolder | | file3 |
- * .---------------. .-----------.
- * </code>
- * The tree and list boxes are checkbox widgets, standard in Eclipse.
- * <p>
- * You can also optionally decide to show the standard buttons at the
- * button of the checkbox boxes:
- * <code>
- * .-----------------. .------------. .--------------.
- * | Select Types... | | Select All | | Deselect All |
- * .-----------------. .------------. .--------------.
- * </code>
- *
- * <p>
- * To allow error messages to be issued on a message line versus in message dialogs,
- * pass in an ISystemMessageLine reference. This usually represents the message line
- * of a dialog or wizard. If supplied, messages are written to it.
- * To specify it, call {@link #setMessageLine(ISystemMessageLine)}.
- */
-public class SystemSelectRemoteFilesForm extends Composite
-{
- // widgets
- private SystemQualifiedRemoteFolderCombo dirCombo = null;
- private SystemFileTreeAndListGroup fileSelector = null;
- //private RemoteFileEmptyImpl emptyFileSelectorRoot = null;
- private RemoteFileRoot rootElement = null;
- private Button selectTypesButton, selectAllButton, deselectAllButton;
- // state
- private String historyKey = null;
- private boolean showSelectTypesButton, showSelectAllButtons = false;
- private ISystemMessageLine msgLine = null;
- private java.util.List selectedTypes = new ArrayList();
- private String filterString = null;
- private SystemSelectFileTypesAction typesAction = null;
- private SystemViewLabelAndContentProvider folderProvider, fileProvider;
- // constants
- private final static int SIZING_SELECTION_WIDGET_WIDTH = 400;
- private final static int SIZING_SELECTION_WIDGET_HEIGHT = 150;
- /**
- * Constructor when you want to specify your own history key for the qualified folder
- * nested widget.
- *
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically it is just SWT.NULL
- * @param showSelectTypesButton Specify if you want to have Select Types button
- * @param showSelectAllButtons Specify if you want to have Select All and Deselect All buttons
- * @param key The unique string used as a preferences key to persist the qualified-folder history
- */
- public SystemSelectRemoteFilesForm(Composite parent, int style,
- boolean showSelectTypesButton, boolean showSelectAllButtons,
- String key)
- {
- super(parent, style);
- this.showSelectTypesButton = showSelectTypesButton;
- this.showSelectAllButtons = showSelectAllButtons;
- historyKey = key;
- prepareComposite(1);
- createFolderPrompt(this);
- createFilesSelectorGroup(this);
- if (showSelectTypesButton || showSelectAllButtons)
- createButtons(this, showSelectTypesButton, showSelectAllButtons);
- addOurQualifiedFolderSelectionListener();
- }
- /**
- * Constructor when you want to use the default history key, meaning you share the
- * qualified-folder history with other dialogs/wizards that use the same widget.
- *
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically it is just SWT.NULL
- * @param showSelectTypesButton Specify if you want to have Select Types button
- * @param showSelectAllButtons Specify if you want to have Select All and Deselect All buttons
- */
- public SystemSelectRemoteFilesForm(Composite parent, int style,
- boolean showSelectTypesButton, boolean showSelectAllButtons)
- {
- this(parent, style, showSelectTypesButton, showSelectAllButtons, null);
- }
- /**
- * Constructor when you want to use the default history key and want to show the standard buttons.
- *
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically it is just SWT.NULL
- */
- public SystemSelectRemoteFilesForm(Composite parent, int style)
- {
- this(parent, style, true, true, null);
- }
-
- /**
- * Specify a message line so error messages are written to it versus in message dialogs.
- * @param msgLine An object implementing ISystemMessageLine. Typically pass "this" for
- * your dialog or wizard page, and implement the interface there.
- */
- public void setMessageLine(ISystemMessageLine msgLine)
- {
- this.msgLine = msgLine;
- }
- /**
- * Get the message line specified in setMessageLine.
- */
- public ISystemMessageLine getMessageLine()
- {
- return msgLine;
- }
-
- /**
- * Set the system types to restrict what connections the user sees, and what types of
- * connections they can create.
- * @param systemTypes An array of system type names
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- dirCombo.setSystemTypes(systemTypes);
- }
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new String[] {systemType})
- *
- * @param systemType The name of the system type to restrict to
- *
- * @see org.eclipse.rse.core.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new String[] {systemType});
- }
-
- /**
- * Set a filter string to subset the list by. For example, "A*.java" or "java,class,"
- */
- public void setFilterString(String filterString)
- {
- fileProvider.setFilterString(filterString);
- folderProvider.setFilterString(filterString);
- refresh();
- }
- /**
- * Get the current filter string being used to subset the list by.
- * Will be null unless setFilterString has previously been called.
- */
- public String getFilterString()
- {
- return filterString;
- }
-
- /**
- * Return the nested qualified-folder combo widget
- */
- public SystemQualifiedRemoteFolderCombo getFolderCombo()
- {
- return dirCombo;
- }
-
- /**
- * Disable/Enable all the child controls.
- */
- public void setEnabled(boolean enabled)
- {
- dirCombo.setEnabled(enabled);
- fileSelector.getListTable().setEnabled(enabled);
- }
- /**
- * Set the focus to the combo field
- */
- public boolean setFocus()
- {
- return dirCombo.setFocus();
- }
-
- /**
- * Clear the contents of the file selector widgets
- */
- public void clearAll()
- {
- fileSelector.clearAll();
- enableButtonGroup(false);
- }
- /**
- * Set the root folder from which to populate the widgets
- * @param rootFolder The root folder from which to start the tree
- */
- public void setRootFolder(IRemoteFile rootFolder)
- {
- rootElement.setRootFile(rootFolder);
- fileSelector.setRoot(rootElement);
- enableButtonGroup(true);
- }
-
- /**
- * Refesh the contents of the folder and file-selection checkbox viewers
- */
- public void refresh()
- {
- folderProvider.flushCache();
- fileProvider.flushCache();
- fileSelector.refresh();
- }
-
- /**
- * Add a checkstate listener to be called whenever the checked state of
- * a remote file is changed.
- */
- public void addCheckStateListener(ICheckStateListener l)
- {
- fileSelector.addCheckStateListener(l);
- }
- /**
- * Remove a checkstate listener
- */
- public void removeCheckStateListener(ICheckStateListener l)
- {
- fileSelector.removeCheckStateListener(l);
- }
-
- /**
- * Get the list of selected IRemoteFile objects.
- * Will be length 0 if nothing selected
- */
- public IRemoteFile[] getSelectedFiles()
- {
- java.util.List list = fileSelector.getAllCheckedListItems();
- IRemoteFile[] files = new IRemoteFile[list.size()];
- Iterator i = list.iterator();
- int idx = 0;
- while (i.hasNext())
- {
- files[idx++] = (IRemoteFile)i.next();
- }
- return files;
- }
-
- // -----------------------
- // INTERNAL-USE METHODS...
- // -----------------------
- /**
- * Prepares this composite control and sets the default layout data.
- * @param numColumns Number of columns the new group will contain.
- */
- protected Composite prepareComposite(int numColumns)
- {
- Composite composite = this;
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = 0;
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = false;
- //data.widthHint = SIZING_SELECTION_WIDGET_WIDTH + 20;
- composite.setLayoutData(data);
- return composite;
- }
-
- /**
- * Create qualified-folder prompt
- */
- protected void createFolderPrompt(Composite parent)
- {
- // connection\folder prompt
- dirCombo = new SystemQualifiedRemoteFolderCombo(parent, SWT.NULL, historyKey);
- }
-
- /**
- * Create folder and files selection checkbox viewers
- */
- protected void createFilesSelectorGroup(Composite parent)
- {
- // file selector prompt (checkbox tree and checkbox list)
- folderProvider = new SystemViewLabelAndContentProvider(true,false);
- fileProvider = new SystemViewLabelAndContentProvider(false,true);
- rootElement = new RemoteFileRoot();
- fileSelector = new SystemFileTreeAndListGroup(parent,
- folderProvider, folderProvider, // tree content and label providers
- fileProvider, fileProvider, // list content and label providers
- SWT.NULL, SIZING_SELECTION_WIDGET_WIDTH,
- SIZING_SELECTION_WIDGET_HEIGHT);
- }
- /**
- * Create three buttons under checkbox viewers
- */
- protected void createButtons(Composite parent, boolean showSelectTypes, boolean showSelectAll)
- {
- Composite buttonComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- if (showSelectTypes && showSelectAll)
- layout.numColumns = 3;
- else if (showSelectTypes)
- layout.numColumns = 1;
- else
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = true;
- buttonComposite.setLayout(layout);
- buttonComposite.setLayoutData(
- new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
- if (showSelectTypes)
- {
- selectTypesButton = createPushButton(buttonComposite, SystemResources.RESID_SELECTFILES_SELECTTYPES_BUTTON_ROOT_LABEL, SystemResources.RESID_SELECTFILES_SELECTTYPES_BUTTON_ROOT_TOOLTIP);
- addSelectTypesButtonSelectionListener();
- }
- if (showSelectAll)
- {
- selectAllButton = createPushButton(buttonComposite, SystemResources.RESID_SELECTFILES_SELECTALL_BUTTON_ROOT_LABEL);
- deselectAllButton = createPushButton(buttonComposite, SystemResources.RESID_SELECTFILES_DESELECTALL_BUTTON_ROOT_TOOLTIP);
- addSelectAllButtonSelectionListener();
- addDeselectAllButtonSelectionListener();
- }
-
- enableButtonGroup(false);
- }
- protected static Button createPushButton(Composite group, String label, String tooltip)
- {
- Button button = createPushButton(group,label);
- button.setToolTipText(tooltip);
- return button;
- }
- public static Button createPushButton(Composite group, String label)
- {
- Button button = new Button(group, SWT.PUSH);
- button.setText(label);
- //button.setText("THIS IS A LONG LABEL. I MEAN, IT IS JUST HUGE!");
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- button.setLayoutData(data);
- return button;
- }
-
-
- protected void addOurQualifiedFolderSelectionListener()
- {
- // Add the button listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- clearErrorMessage();
- //clearMessage();
- IRemoteFile selectedFolder = null;
- try
- {
- selectedFolder = dirCombo.getFolder();
- if (selectedFolder == null)
- {
- //displayErrorMessage("Nothing selected?");
- clearAll();
- }
- else
- {
- //displayMessage("Selected folder exist? " + selectedFolder.exists());
- setRootFolder(selectedFolder);
- }
- }
- catch (Exception exc)
- {
- String msg = exc.getMessage();
- if ((msg == null) || (msg.length()==0))
- {
- msg = "Exception: " + exc.getClass().getName();
- displayExceptionMessage(exc);
- }
- else
- displayErrorMessage(msg);
- clearAll();
- }
- }
- };
- dirCombo.addSelectionListener(selectionListener);
- }
-
- protected void addSelectTypesButtonSelectionListener()
- {
- // Add the button listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- handleTypesEditButtonPressed();
- }
- };
- selectTypesButton.addSelectionListener(selectionListener);
- }
- protected void addSelectAllButtonSelectionListener()
- {
- // Add the button listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- fileSelector.setAllSelections(true);
- }
- };
- selectAllButton.addSelectionListener(selectionListener);
- }
- protected void addDeselectAllButtonSelectionListener()
- {
- // Add the button listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- fileSelector.setAllSelections(false);
- }
- };
- deselectAllButton.addSelectionListener(selectionListener);
- }
-
- /**
- * Open a registered type selection dialog and note the selections
- * in the receivers types-to-export field
- */
- protected void handleTypesEditButtonPressed()
- {
- SystemSelectFileTypesAction typesAction = getSelectTypesAction();
- typesAction.setTypes(selectedTypes);
- typesAction.run();
- if (!typesAction.wasCancelled())
- {
- selectedTypes = typesAction.getTypes();
- setupSelectionsBasedOnSelectedTypes();
- }
- /*
- TypeFilteringDialog dialog =
- new TypeFilteringDialog(getShell(), selectedTypes);
- dialog.open();
- Object[] newSelectedTypes = dialog.getResult();
- if (newSelectedTypes != null) // ie.- did not press Cancel
- {
- this.selectedTypes = new ArrayList(newSelectedTypes.length);
- for (int i = 0; i < newSelectedTypes.length; i++)
- {
- //System.out.println(newSelectedTypes[i]);
- this.selectedTypes.add(newSelectedTypes[i]);
- }
- setupSelectionsBasedOnSelectedTypes();
- }
- */
- }
- /**
- * Get the action to run when "Select Types..." is pressed by the user
- */
- protected SystemSelectFileTypesAction getSelectTypesAction()
- {
- if (typesAction == null)
- typesAction = new SystemSelectFileTypesAction(getShell());
- return typesAction;
- }
- /**
- * Update the tree to only select those elements that match the selected types
- */
- protected void setupSelectionsBasedOnSelectedTypes()
- {
- //BusyIndicator.showWhile(getShell().getDisplay(), new Runnable()
- //{
- //public void run()
- //{
- Map selectionMap = new Hashtable();
- IRemoteFile[] filesList = getSelectedFiles();
- for (int idx=0;idx<filesList.length; idx++)
- {
- IRemoteFile file = filesList[idx];
- String extension = file.getExtension();
- //System.out.println("File extension for " + file.getName() + ": " + extension);
- if (isExportableExtension(extension))
- {
- java.util.List elements = new ArrayList();
- IRemoteFile parent = file.getParentRemoteFile();
- if (selectionMap.containsKey(parent))
- elements = (java.util.List)selectionMap.get(parent);
- elements.add(file);
- selectionMap.put(parent, elements);
- }
- }
- fileSelector.updateSelections(selectionMap);
- //}
- //});
- }
- /**
- * Returns whether the extension provided is an extension that
- * has been specified for export by the user.
- *
- * @param extension the resource name
- * @return <code>true</code> if the resource name is suitable for export based
- * upon its extension
- */
- protected boolean isExportableExtension(String extension)
- {
- if (selectedTypes == null) // ie.- all extensions are acceptable
- return true;
- Iterator enumer = selectedTypes.iterator();
- while (enumer.hasNext())
- {
- if (extension.equalsIgnoreCase((String)enumer.next()))
- return true;
- }
- return false;
- }
-
-
- /**
- * Enable or disable the button group.
- */
- protected void enableButtonGroup(boolean enable)
- {
- if (!showSelectTypesButton && !showSelectAllButtons)
- return;
- if (selectTypesButton != null)
- selectTypesButton.setEnabled(enable);
- if (selectAllButton != null)
- selectAllButton.setEnabled(enable);
- if (deselectAllButton != null)
- deselectAllButton.setEnabled(enable);
- }
-
-
- protected void clearErrorMessage()
- {
- if (msgLine != null)
- msgLine.clearErrorMessage();
- }
-
- protected void displayErrorMessage(String msgText)
- {
- if (msgLine != null)
- msgLine.setErrorMessage(msgText);
- else
- SystemMessageDialog.displayErrorMessage(getShell(),msgText);
- }
- protected void displayErrorMessage(SystemMessage msg)
- {
- if (msgLine != null)
- msgLine.setErrorMessage(msg);
- else
- SystemMessageDialog.displayErrorMessage(getShell(),msg);
- }
- protected void displayExceptionMessage(Exception exc)
- {
- if (msgLine != null)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED);
- msg.makeSubstitution(exc);
- msgLine.setErrorMessage(msg);
- }
- else
- SystemMessageDialog.displayExceptionMessage(getShell(), exc);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemFileNewConnectionWizardPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemFileNewConnectionWizardPage.java
deleted file mode 100644
index 6e08bb3f3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemFileNewConnectionWizardPage.java
+++ /dev/null
@@ -1,225 +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.files.ui.wizards;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorServerPortInput;
-import org.eclipse.rse.ui.wizards.AbstractSystemNewConnectionWizardPage;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
-import org.eclipse.rse.ui.wizards.ISystemWizardPage;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-
-
-/**
- * A page that prompts for unique universal files information in the New Connection wizard.
- * This page appears for remote Unix, Linux and Windows connections but not for iSeries or Local connections.
- */
-public class SystemFileNewConnectionWizardPage extends AbstractSystemNewConnectionWizardPage
-
-{
-
- protected Label labelPortPrompt;
- protected Text textPort;
- protected ISystemValidator portValidator;
- protected SystemMessage errorMessage;
- protected boolean enablePortSelection = true;//false; // todo: enable in next releaes
-
- // SEE DEFECTS 43194 AND 42780
-
- /**
- * Constructor
- */
- public SystemFileNewConnectionWizardPage(IWizard wizard, ISubSystemConfiguration parentFactory)
- {
- //super(wizard, parentFactory); todo: use this when we enable port selection
- super(wizard, parentFactory, parentFactory.getId(),
- SystemResources.RESID_NEWCONN_SUBSYSTEMPAGE_FILES_TITLE,
- SystemResources.RESID_NEWCONN_SUBSYSTEMPAGE_FILES_DESCRIPTION);
- if (enablePortSelection)
- getPortValidator();
- }
-
- /**
- * Return true if we support port selection yet
- */
- public boolean isInformationalOnly()
- {
- return !enablePortSelection;
- }
-
- /**
- * @see AbstractSystemWizardPage#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- if (textPort != null)
- return textPort;
- else
- return null;
- }
-
- public void setEnablePortSelection(boolean flag)
- {
- enablePortSelection = flag;
- }
-
- /**
- * Get the port validator. By default returns new ValidatorPortInput
- */
- protected ISystemValidator getPortValidator()
- {
- if (portValidator == null)
- portValidator = new ValidatorServerPortInput();
- return portValidator;
- }
-
- /**
- * @see AbstractSystemWizardPage#createContents(Composite)
- */
- public Control createContents(Composite parent)
- {
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
-
- // Instructional verbage
- String text = null;
- text = SystemResources.RESID_NEWCONN_SUBSYSTEMPAGE_FILES_VERBAGE1;
- //,
- // the following is default English text to use if the string is not found in the mri"
- // "To connect to your remote system, you must first copy and expand the supplied Java server code jar file on that system, and either manually start that server or the supplied daemon. You will find the instructions for this in the Help perspective. ");
- boolean border = false;
- int span = nbrColumns;
- int widthHint = 200;
-
- SystemWidgetHelpers.createVerbiage(composite_prompts, text, span, border, widthHint);
-
- SystemWidgetHelpers.createSpacerLine(composite_prompts, span, false);
-
- text = SystemResources.RESID_NEWCONN_SUBSYSTEMPAGE_FILES_VERBAGE2;
- //,
- // the following is default English text to use if the string is not found in the mri"
- // "If you manually start the communications server, you will need to set the port number property for this connection. To do this, expand your newly created connection in the Remote System Explorer perspective. Right click on the Files subsystem and select Properties. You can specify the port to match the port you specified or were assigned for the server.");
-
- SystemWidgetHelpers.createVerbiage(composite_prompts, text, span, border, widthHint);
-
-
- // Port prompt
- if (enablePortSelection)
- {
- String labelText = SystemWidgetHelpers.appendColon(SystemResources.RESID_SUBSYSTEM_PORT_LABEL);
- labelPortPrompt = SystemWidgetHelpers.createLabel(composite_prompts, labelText);
-
- textPort = SystemWidgetHelpers.createTextField(
- composite_prompts,null,SystemResources.RESID_SUBSYSTEM_PORT_TIP);
- textPort.setText("0");
-
- textPort.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validatePortInput();
- }
- }
- );
- }
-
-
-
- return composite_prompts;
- }
-
-
- /**
- * Return true if the port is editable for this subsystem
- */
- protected boolean isPortEditable()
- {
- return parentFactory.isPortEditable();
- }
-
- /**
- * @see ISystemWizardPage#performFinish()
- */
- public boolean performFinish()
- {
- if (textPort == null)
- return true;
- else
- return (validatePortInput()==null);
- }
-
- /**
- * Return the user-entered port number
- */
- public int getPortNumber()
- {
- Integer iPort = null;
- if (textPort == null)
- {
- iPort = new Integer(0);
- }
- else
- {
- String sPort = textPort.getText().trim();
- try
- {
- iPort = new Integer(sPort);
- }
- catch (Exception exc)
- {
- iPort = new Integer(0);
- }
- }
- return iPort.intValue();
- }
-
- /**
- * Validate port value as it is typed
- */
- protected SystemMessage validatePortInput()
- {
- this.clearErrorMessage();
- errorMessage = getPortValidator().validate(textPort.getText().trim());
- if (errorMessage != null)
- setErrorMessage(errorMessage);
- setPageComplete(errorMessage==null);
- return errorMessage;
- }
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- if (textPort == null)
- return true;
- else
- return (textPort.getText().trim().length()>0);
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 2c29a56f0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizard.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui.wizards;
-
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-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.subsystems.files.core.subsystems.IVirtualRemoteFile;
-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;
-
-
-public class SystemNewFileWizard
- extends AbstractSystemWizard
-{
-
- private SystemNewFileWizardMainPage mainPage;
- //protected IRemoteFile parentFolder;
- //protected IStructuredSelection selection;
-
- private static final String CLASSNAME = "SystemNewFileWizard";
-
- /**
- * Constructor
- */
- public SystemNewFileWizard()
- {
- super(FileResources.RESID_NEWFILE_TITLE,
-// RSEUIPlugin.getDefault().getImageDescriptorFromIDE("wizban/newfile_wiz.gif")
- // RSEUIPlugin.getDefault().getImageDescriptor("wizban/newfile_wiz.gif")
-
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILEWIZARD_ID));
- }
-
- /**
- * Creates the wizard pages.
- * This method is an override from the parent Wizard class.
- */
- public void addPages()
- {
- try {
- mainPage = createMainPage();
- addPage(mainPage);
- //super.addPages();
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("New File: Error in createPages: ",exc);
- }
- }
-
- /**
- * Creates the wizard's main page.
- * This method is an override from the parent class.
- */
- protected SystemNewFileWizardMainPage createMainPage()
- {
- IRemoteFile[] parentFolders = null;
- SystemMessage errMsg = null;
- try {
- parentFolders = getParentFolders();
- } catch (SystemMessageException exc)
- {
- // hmm, this means there are no valid folders so we are in error mode.
- errMsg = exc.getSystemMessage();
- }
- mainPage = new SystemNewFileWizardMainPage(this, parentFolders);
- if (errMsg != null)
- mainPage.setErrorMessage(errMsg);
- return mainPage;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- boolean ok = true;
- if (mainPage.performFinish())
- {
- SystemMessage msg = null;
- IRemoteFile parentFolder = mainPage.getParentFolder();
- String name = mainPage.getfileName();
- String absName = getNewAbsoluteName(parentFolder, name);
- IRemoteFileSubSystem rfss = parentFolder.getParentRemoteFileSubSystem();
- if (!parentFolder.exists())
- {
- /* Be nice to do this someday...
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE);
- msg.makeSubstitution(parentFolder.getAbsolutePath());
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
- if (msgDlg.openQuestionNoException())
- {
- try {
- parentFolder = rfss.createFolder(parentFolder);
- }
- catch (RemoteFileIOException exc)
- {
- 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)
- {
- 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;
- }
- }
- else
- */
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND);
- msg.makeSubstitution(parentFolder.getAbsolutePath());
- mainPage.setMessage(msg);
- return false;
- }
- }
- // if input is a filter, then we need to test if the new file will meet the filtering criteria of
- // that filter...
- if (isInputAFilter())
- {
- if (!meetsFilterCriteria(getSelectedFilterReference(), parentFolder, absName))
- return false;
- }
- // ok, proceed with actual creation...
- IRemoteFile newFile = null;
- try {
- IRemoteFile newFilePath = rfss.getRemoteFileObject(absName);
- newFile = rfss.createFile(newFilePath);
- } catch (RemoteFileIOException exc ) {
- SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " );
- msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FILE_FAILED_EXIST)).makeSubstitution(absName);
- mainPage.setMessage(msg);
- ok = false;
-//DY } catch (Exception RemoteFileSecurityException) {
- } catch (RemoteFileSecurityException e) {
- msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FILE_FAILED)).makeSubstitution(absName);
- SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileSecurityException ");
- //SystemMessage.displayErrorMessage(SystemMessage.getDefaultShell(), msg);
- mainPage.setMessage(msg);
- ok = false;
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError(CLASSNAME+ ":", e);
- mainPage.setMessage(e.getSystemMessage());
- ok = false;
- }
-
- // return ok;
- if (ok)
- updateGUI(parentFolder, newFile, getViewer(), isInputAFilter(), getSelectedFilterReference());
-
- }
- else
- ok = false;
-
-
- return ok;
- }
-
- /**
- * Create a new absolute name from the parent folder, and the new name
- */
- protected static String getNewAbsoluteName(IRemoteFile parentFolder, String newName)
- {
- String newAbsName = null;
- char sep = parentFolder.getSeparatorChar();
- String parentFolderPath = parentFolder.getAbsolutePath();
-
- // hack by Mike to allow virtual files and folders.
- if (parentFolder instanceof IVirtualRemoteFile)
- {
- sep = '/';
- }
- else if (parentFolder.isArchive())
- {
- sep = '/';
- parentFolderPath = parentFolderPath + ArchiveHandlerManager.VIRTUAL_SEPARATOR;
- }
-
- // hack by Phil to fix bug when trying to create file inside root "/"... it
- // tried to create "//file.ext".
- if ((parentFolderPath.length()==1) && (parentFolderPath.charAt(0)=='/') &&
- (parentFolderPath.charAt(0)==sep))
- newAbsName = sep + newName;
- else
- newAbsName = parentFolderPath + sep + newName;
- return newAbsName;
- }
-
- /**
- * Test if the new file/folder will meet the filtering criteria of the selected filter
- */
- protected boolean meetsFilterCriteria(ISystemFilterReference selectedFilterRef, IRemoteFile parentFolder, String newAbsName)
- {
- IRemoteFileSubSystem parentSubSystem = (IRemoteFileSubSystem)selectedFilterRef.getSubSystem();
-
- ISystemFilter filter = selectedFilterRef.getReferencedFilter();
-
- // if the filter is "*", this represents the Drives filter on Windows
- // we can not create a file directly under it since it doesn't actually represent a container
- // if we create a new file or folder by right clicking on this filter, the parent folder defaults to the first drive
- // that shows up when this filter is resolved. Hence we ignore this filter from the filter matching criteria
- String[] strings = filter.getFilterStrings();
-
- if (strings != null) {
-
- for (int idx = 0; idx < strings.length; idx++) {
-
- if (strings[idx].equals("*")) {
- return true;
- }
- }
- }
-
- boolean meets = parentSubSystem.doesFilterMatch(filter, newAbsName);
-
- if (!meets)
- {
- 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
- }
- return meets;
- }
-
-
- /**
- * Called after all a successful create operation to update the GUI in an intuitive way:
- * <ul>
- * <li>The parent folder is refreshed in all views
- * <li>The newly created file or folder is selected in current view
- * </ul>
- */
- protected static void updateGUI(IRemoteFile parentFolder, IRemoteFile newFileOrFolder, Viewer viewer,
- boolean isInputAFilter, ISystemFilterReference selectedFilterRef)
- {
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- if (selectedFilterRef != null)
- {
- selectedFilterRef.markStale(true);
- }
-
- // invalidate filters that reference this object
- // TODO: we shouldn't have to do this. Presumably step 0 below should take care of it.
- SystemRegistry.getSystemRegistry().invalidateFiltersFor(newFileOrFolder, parentFolder.getParentRemoteFileSubSystem());
-
- // step 0: refresh all affected filters...
- ISubSystem fileSS = newFileOrFolder.getParentRemoteFileSubSystem();
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, newFileOrFolder, parentFolder, fileSS, null, viewer);
-
- /*
- // step 1: refresh all occurrences of the parent folder
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(
- parentFolder,ISystemResourceChangeEvent.EVENT_REFRESH_REMOTE, newFileOrFolder);
- event.setOriginatingViewer(viewer); // this allows only the originating view to select the new file
- sr.fireEvent(event);
- */
- // step 2: if the selected input is a filter, vs a folder, refresh that filter...
- if (isInputAFilter && (viewer instanceof ISystemTree))
- {
- // get originating tree view
- ISystemTree treeViewer = (ISystemTree)viewer;
- // select new file/folder in this view only, and expand filter if not already expanded...
- sr.fireEvent((ISystemResourceChangeListener)treeViewer,
- new SystemResourceChangeEvent(newFileOrFolder,ISystemResourceChangeEvents.EVENT_SELECT_REMOTE, selectedFilterRef));
- }
-
- }
-
- /**
- * Return true if input is a system filter reference, versus a folder
- */
- protected boolean isInputAFilter()
- {
- return (getInputObject() instanceof ISystemFilterReference);
- }
- /**
- * Get the selected filter, or null if a filter is not selected.
- */
- protected ISystemFilterReference getSelectedFilterReference()
- {
- if (isInputAFilter())
- return (ISystemFilterReference)getInputObject();
- else
- return null;
- }
-
- /**
- * Deduce the parent remote folder to hold the new folder, by examining the current selection
- */
- protected IRemoteFile[] getParentFolders() throws SystemMessageException
- {
- Object input = getInputObject();
- if (input instanceof IRemoteFile)
- return new IRemoteFile[] {(IRemoteFile)input};
- else if (input instanceof ISystemFilterReference)
- return getParentFolders((ISystemFilterReference)input);
- else
- return null;
- }
-
- /**
- * Given a filter reference, return a list of all the unique root folders, one per filter string at most.
- * If all of these fail to resolve, an exception is thrown. If some fail to resolve, they are just ignored.
- */
- public static IRemoteFile[] getParentFolders(ISystemFilterReference filterRef) throws SystemMessageException
- {
- ISystemFilter filter = filterRef.getReferencedFilter();
- IRemoteFileSubSystem parentSubSystem = (IRemoteFileSubSystem)filterRef.getSubSystem();
- IRemoteFileSubSystemConfiguration parentFactory = parentSubSystem.getParentRemoteFileSubSystemConfiguration();
- String[] filterStrings = filter.getFilterStrings();
- RemoteFileFilterString rffs = null;
- Vector v = new Vector();
- Vector uniqueNames = new Vector();
- IRemoteFile folder = null;
- String pathName = null;
- SystemMessageException lastExc = null;
- for (int idx=0; idx<filterStrings.length; idx++)
- {
- rffs = new RemoteFileFilterString(parentFactory, filterStrings[idx]);
- if (rffs.listRoots())
- {
- try {
- IRemoteFile[] roots = parentSubSystem.listRoots(null);
- for (int rootIdx = 0; (roots!=null) && (rootIdx<roots.length); rootIdx++)
- {
- if (uniqueNames.indexOf(roots[idx].getName())==-1)
- v.add(roots[rootIdx]);
- }
- } catch (Exception exc) {}
- }
- else
- {
- pathName = rffs.getPath();
- if (uniqueNames.indexOf(pathName)==-1)
- {
- uniqueNames.add(pathName);
- try {
- folder = parentSubSystem.getRemoteFileObject(pathName);
- // decided to do folder existence checking when Finish pressed
- //if (folder.exists())
- v.add(folder);
- //else
- //{
- // SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND);
- // msg.makeSubstitution(pathName);
- // lastExc = new SystemMessageException(msg);
- //}
- } catch (SystemMessageException exc)
- {
- lastExc = exc;
- }
- }
- }
- }
- if ((lastExc != null) && (v.size()==0))
- throw lastExc;
- IRemoteFile[] folders = new IRemoteFile[v.size()];
- for (int idx=0; idx<folders.length; idx++)
- folders[idx] = (IRemoteFile)v.elementAt(idx);
- return folders;
- }
-
-} // end class \ No newline at end of file
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
deleted file mode 100644
index 19b149402..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java
+++ /dev/null
@@ -1,223 +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.files.ui.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-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;
-import org.eclipse.rse.ui.validators.ValidatorFileName;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * Default main page of the "New File" wizard.
- * This page asks for the following information:
- * <ul>
- * <li>New File name
- * </ul>
- */
-
-public class SystemNewFileWizardMainPage
- extends AbstractSystemWizardPage
-{
-
- protected String fileNameStr;
- protected Text folderName, connectionName, fileName;
- protected Combo folderNames;
- protected SystemMessage errorMessage;
- protected ISystemValidator nameValidator;
- protected IRemoteFile[] parentFolders;
- protected ISystemMessageLine msgLine;
- public String [] allnames;
-
- /**
- * Constructor.
- */
- public SystemNewFileWizardMainPage(Wizard wizard, IRemoteFile[] parentFolders)
- {
- super(wizard, "NewFile",
- FileResources.RESID_NEWFILE_PAGE1_TITLE, FileResources.RESID_NEWFILE_PAGE1_DESCRIPTION);
- this.parentFolders = parentFolders;
- }
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- */
- public Control createContents(Composite parent)
- {
-
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // Connection name
- connectionName = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, FileResources.RESID_NEWFILE_CONNECTIONNAME_LABEL, FileResources.RESID_NEWFILE_CONNECTIONNAME_TIP);
-
- //labelConnectionName.
-
- // FolderName
- if ((parentFolders == null) || (parentFolders.length == 1))
- folderName = SystemWidgetHelpers.createLabeledTextField(composite_prompts,null, FileResources.RESID_NEWFILE_FOLDER_LABEL, FileResources.RESID_NEWFILE_FOLDER_TIP);
- else
- folderNames = SystemWidgetHelpers.createLabeledReadonlyCombo(composite_prompts, null, FileResources.RESID_NEWFILE_FOLDER_LABEL, FileResources.RESID_NEWFILE_FOLDER_TIP);
-
- // File Name
- fileName = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, FileResources.RESID_NEWFILE_NAME_LABEL, FileResources.RESID_NEWFILE_NAME_TOOLTIP);
-
- initializeInput();
-
- fileName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateNameInput();
- }
- }
- );
-
- SystemWidgetHelpers.setCompositeHelp(composite_prompts, RSEUIPlugin.HELPPREFIX+ISystemMessages.NEW_FILE_WIZARD);
-
- return composite_prompts;
-
- }
-
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return fileName;
- }
-
- /**
- * Init values using input data
- */
- protected void initializeInput()
- {
- connectionName.setEditable(false);
- nameValidator = new ValidatorFileName();
-
- if ((parentFolders == null) || (parentFolders.length == 0))
- {
- folderName.setEditable(false);
- fileName.setEditable(false); // why do we do this??
- setPageComplete(false);
- return;
- }
- IRemoteFileSubSystem rfss = parentFolders[0].getParentRemoteFileSubSystem();
- connectionName.setText(rfss.getHostAliasName());
- connectionName.setToolTipText((rfss.getHost()).getHostName());
-
- if (folderName != null)
- {
- folderName.setText(parentFolders[0].getAbsolutePath());
- folderName.setEditable(false);
- }
- else
- {
- String[] names = new String[parentFolders.length];
- for (int idx=0; idx<names.length; idx++)
- names[idx] = parentFolders[idx].getAbsolutePath();
- folderNames.setItems(names);
- folderNames.select(0);
- }
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateNameInput()
- {
- errorMessage = null;
- this.clearErrorMessage();
- // this.setDescription(SystemResources.RESID_NEWFILE_PAGE1_DESCRIPTION));
- if (nameValidator != null)
- errorMessage= nameValidator.validate(fileName.getText());
- if (errorMessage != null)
- setErrorMessage(errorMessage);
- setPageComplete(errorMessage==null);
- return errorMessage;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
-
- return true;
- }
-
- // --------------------------------- //
- // METHODS FOR EXTRACTING USER DATA ...
- // --------------------------------- //
- /**
- * Return user-entered new file name.
- * Call this after finish ends successfully.
- */
- public String getfileName()
- {
- return fileName.getText();
- }
- /**
- * Return the parent folder selected by the user
- */
- public IRemoteFile getParentFolder()
- {
- if (folderName != null)
- return parentFolders[0];
- else
- {
- int selIdx = folderNames.getSelectionIndex();
- if (selIdx == -1)
- selIdx = 0;
- return parentFolders[selIdx];
- }
- }
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- return (errorMessage==null) && (fileName.getText().trim().length()>0);
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index b9a2d9b53..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizard.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.files.ui.wizards;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.files.ui.FileResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-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.wizards.AbstractSystemWizard;
-
-
-public class SystemNewFolderWizard
- extends AbstractSystemWizard
-{
-
- private SystemNewFolderWizardMainPage mainPage;
- //protected IRemoteFile myObject;
- //protected IStructuredSelection selection;
-
- private static final String CLASSNAME = "SystemNewFolderWizard";
-
- /**
- * Constructor
- */
- public SystemNewFolderWizard()
- {
- super(FileResources.RESID_NEWFOLDER_TITLE,
- // RSEUIPlugin.getDefault().getImageDescriptorFromIDE("wizban/newfolder_wiz.gif")
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFOLDERWIZARD_ID)
- );
- }
-
- /**
- * Creates the wizard pages.
- * This method is an override from the parent AbstractSystemWizard class.
- */
- public void addPages()
- {
- try {
- mainPage = createMainPage();
- addPage(mainPage);
- //super.addPages();
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("New File: Error in createPages: ",exc);
- }
- }
-
- /**
- * Creates the wizard's main page.
- * This method is an override from the parent class.
- */
- protected SystemNewFolderWizardMainPage createMainPage()
- {
- IRemoteFile[] parentFolders = null;
- SystemMessage errMsg = null;
- try {
- parentFolders = getParentFolders();
- } catch (SystemMessageException exc)
- {
- // hmm, this means there are no valid folders so we are in error mode.
- errMsg = exc.getSystemMessage();
- }
- mainPage = new SystemNewFolderWizardMainPage(this, parentFolders);
- if (errMsg != null)
- mainPage.setErrorMessage(errMsg);
- return mainPage;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- boolean ok = true;
- if (mainPage.performFinish())
- {
- SystemMessage msg = null;
- IRemoteFile parentFolder = mainPage.getParentFolder();
- String name = mainPage.getfolderName();
- String absName = SystemNewFileWizard.getNewAbsoluteName(parentFolder, name);
- IRemoteFileSubSystem rfss = parentFolder.getParentRemoteFileSubSystem();
- if (!parentFolder.exists())
- {
- /* Be nice to do this someday...
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE);
- msg.makeSubstitution(parentFolder.getAbsolutePath());
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
- if (msgDlg.openQuestionNoException())
- {
- try {
- parentFolder = rfss.createFolder(parentFolder);
- }
- catch (RemoteFileIOException exc)
- {
- 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)
- {
- 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;
- }
- }
- else
- */
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND);
- msg.makeSubstitution(parentFolder.getAbsolutePath());
- mainPage.setMessage(msg);
- return false;
- }
- }
- // if input is a filter, then we need to test if the new file will meet the filtering criteria of
- // that filter...
- if (isInputAFilter())
- {
- if (!meetsFilterCriteria(getSelectedFilterReference(), parentFolder, absName))
- return false;
- }
- IRemoteFile newFolder = null;
- //IRemoteFile newFolderPath = null;
- try {
- IRemoteFile newFolderPath = rfss.getRemoteFileObject(absName);
- newFolder = rfss.createFolder(newFolderPath);
- } catch (RemoteFileIOException exc ) {
- SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileIOException " );
- if (exc.getRemoteException() instanceof SystemMessageException)
- {
- msg = ((SystemMessageException)exc.getRemoteException()).getSystemMessage();
- }
- else
- {
- msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(absName);
- }
- mainPage.setMessage(msg);
- ok = false;
-// DY } catch (Exception RemoteFileSecurityException) {
- } catch (RemoteFileSecurityException e) {
- SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException ");
- msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(absName);
- //SystemMessage.displayErrorMessage(SystemMessage.getDefaultShell(), msg);
- mainPage.setMessage(msg);
- ok = false;
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError(CLASSNAME+ ":", e);
- mainPage.setMessage(e.getSystemMessage());
- ok = false;
- }
-
- if (ok)
- SystemNewFileWizard.updateGUI(parentFolder, newFolder, getViewer(), isInputAFilter(), getSelectedFilterReference());
-
- }
- else
- ok = false;
- return ok;
- }
- /**
- * Test if the new file/folder will meet the filtering criteria of the selected filter.
- * For folders, since we do not support subsetting by folder names, we simply need to test if any
- * of the filter strings in the filter has showSubDirs() set to true.
- */
- protected boolean meetsFilterCriteria(ISystemFilterReference selectedFilterRef, IRemoteFile parentFolder, String newAbsName)
- {
- boolean meets = false;
- ISystemFilter filter = selectedFilterRef.getReferencedFilter();
- String[] strings = filter.getFilterStrings();
- if (strings != null)
- {
- for (int idx=0; !meets && (idx<strings.length); idx++)
- {
- String filterString = strings[idx];
- if (filterString.indexOf("/ns") == -1) // if this filter string allows folders (no /ns switch) then we have a match!
- {
- if (strings.length > 0 && !filterString.startsWith(parentFolder.getAbsolutePath()))
- {
- if (!filterString.equals("./*")) //DKM - ./ will always meet
- {
- meets = false;
- }
- else
- {
- meets = true;
- }
- }
- else
- {
- meets = true;
- }
- }
- }
- }
- if (!meets)
- {
- 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
- }
- return meets;
- }
-
- /**
- * Return true if input is a system filter reference, versus a folder
- */
- protected boolean isInputAFilter()
- {
- return (getInputObject() instanceof ISystemFilterReference);
- }
- /**
- * Get the selected filter, or null if a filter is not selected.
- */
- protected ISystemFilterReference getSelectedFilterReference()
- {
- if (isInputAFilter())
- return (ISystemFilterReference)getInputObject();
- else
- return null;
- }
-
- /**
- * Deduce the parent remote folder to hold the new folder, by examining the current selection
- */
- protected IRemoteFile[] getParentFolders() throws SystemMessageException
- {
- Object input = getInputObject();
- if (input instanceof IRemoteFile)
- return new IRemoteFile[] {(IRemoteFile)input};
- else if (input instanceof ISystemFilterReference)
- {
- return SystemNewFileWizard.getParentFolders((ISystemFilterReference)input);
- }
- else
- return null;
- }
-
-
-} // end class \ No newline at end of file
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
deleted file mode 100644
index ed94499ff..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java
+++ /dev/null
@@ -1,225 +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.files.ui.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-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;
-import org.eclipse.rse.ui.validators.ValidatorFolderName;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * Default main page of the "New Folder" wizard.
- * This page asks for the following information:
- * <ul>
- * <li>New File name
- * </ul>
- */
-
-public class SystemNewFolderWizardMainPage
- extends AbstractSystemWizardPage
-{
-
- protected String fileNameStr;
- protected Text folderName, connectionName, newfolderName;
- protected Combo folderNames;
- protected SystemMessage errorMessage;
- protected ISystemValidator nameValidator;
- protected IRemoteFile[] parentFolders;
- protected ISystemMessageLine msgLine;
- public String [] allnames;
-
- /**
- * Constructor.
- */
- public SystemNewFolderWizardMainPage(Wizard wizard, IRemoteFile[] parentFolders)
- {
- super(wizard, "NewFolder",
- FileResources.RESID_NEWFOLDER_PAGE1_TITLE,
- FileResources.RESID_NEWFOLDER_PAGE1_DESCRIPTION);
- // nameValidator = new ValidatorProfileName(RSEUIPlugin.getTheSystemRegistry().getAllSystemProfileNamesVector());
- nameValidator = new ValidatorUniqueString(allnames, true);
- this.parentFolders = parentFolders;
- }
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- */
- public Control createContents(Composite parent)
- {
-
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // Connection name
- connectionName = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, FileResources.RESID_NEWFOLDER_CONNECTIONNAME_LABEL, FileResources.RESID_NEWFOLDER_CONNECTIONNAME_TIP);
-
- //labelConnectionName.
-
- // FolderName
- if (parentFolders.length == 1)
- folderName = SystemWidgetHelpers.createLabeledTextField(composite_prompts,null, FileResources.RESID_NEWFOLDER_FOLDER_LABEL, FileResources.RESID_NEWFOLDER_FOLDER_TIP);
- else
- folderNames = SystemWidgetHelpers.createLabeledReadonlyCombo(composite_prompts, null, FileResources.RESID_NEWFOLDER_FOLDER_LABEL, FileResources.RESID_NEWFOLDER_FOLDER_TIP);
-
- // New Folder Name
- newfolderName = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, FileResources.RESID_NEWFOLDER_NAME_LABEL, FileResources.RESID_NEWFOLDER_NAME_TOOLTIP);
-
- initializeInput();
-
- newfolderName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateNameInput();
- }
- }
- );
-
- SystemWidgetHelpers.setCompositeHelp(composite_prompts, RSEUIPlugin.HELPPREFIX+ISystemMessages.NEW_FOLDER_WIZARD);
-
- return composite_prompts;
-
- }
-
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return newfolderName;
- }
-
- /**
- * Init values using input data
- */
- protected void initializeInput()
- {
- connectionName.setEditable(false);
- nameValidator = new ValidatorFolderName();
- if (parentFolders == null)
- {
- folderName.setEditable(false);
- newfolderName.setEditable(false);
- setPageComplete(false);
- return;
- }
- IRemoteFileSubSystem rfss = parentFolders[0].getParentRemoteFileSubSystem();
- connectionName.setText(rfss.getHostAliasName());
- connectionName.setToolTipText((rfss.getHost()).getHostName());
-
- if (folderName != null)
- {
- folderName.setText(parentFolders[0].getAbsolutePath());
- folderName.setEditable(false);
- }
- else
- {
- String[] names = new String[parentFolders.length];
- for (int idx=0; idx<names.length; idx++)
- names[idx] = parentFolders[idx].getAbsolutePath();
- folderNames.setItems(names);
- folderNames.select(0);
- }
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- *
- */
- protected SystemMessage validateNameInput()
- {
- errorMessage = null;
- this.clearErrorMessage();
- // this.setDescription(SystemResources.RESID_NEWFILE_PAGE1_DESCRIPTION));
- if (nameValidator != null)
- errorMessage= nameValidator.validate(newfolderName.getText());
- if (errorMessage != null)
- setErrorMessage(errorMessage);
- setPageComplete(errorMessage==null);
- return errorMessage;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- return true;
- }
-
- // --------------------------------- //
- // METHODS FOR EXTRACTING USER DATA ...
- // --------------------------------- //
- /**
- * Return user-entered new file name.
- * Call this after finish ends successfully.
- */
- public String getfolderName()
- {
- return newfolderName.getText();
- }
- /**
- * Return the parent folder selected by the user
- */
- public IRemoteFile getParentFolder()
- {
- if (folderName != null)
- return parentFolders[0];
- else
- {
- int selIdx = folderNames.getSelectionIndex();
- if (selIdx == -1)
- selIdx = 0;
- return parentFolders[selIdx];
- }
- }
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- return (errorMessage==null) && (newfolderName.getText().trim().length()>0);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/.classpath b/rse/plugins/org.eclipse.rse.logging/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.logging/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.logging/.cvsignore b/rse/plugins/org.eclipse.rse.logging/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.logging/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.logging/.project b/rse/plugins/org.eclipse.rse.logging/.project
deleted file mode 100644
index 993758daf..000000000
--- a/rse/plugins/org.eclipse.rse.logging/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.logging</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.logging/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.logging/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.logging/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.logging/HelpContexts.xml b/rse/plugins/org.eclipse.rse.logging/HelpContexts.xml
deleted file mode 100644
index 065153573..000000000
--- a/rse/plugins/org.eclipse.rse.logging/HelpContexts.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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:
-Michael Berger (IBM Canada) - 148434 Better user assistance for logging preference page.
--->
-<?NLS TYPE="org.eclipse.help.contexts"?>
-
-<contexts>
-<!-- RSE logging -->
-<context id="rsel0000">
-<description>This page allows you to specify the Remote System Explorer logging preferences.
-
-You can specify what severity of messages you wish to log - from informational messages, to warnings, to errors. If it is available, the debug setting provides the most detail.
-
-Messages are logged to the .log file in the .metadata folder of the workspace.
-</description>
-</context>
-
-</contexts> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.logging/META-INF/MANIFEST.MF
deleted file mode 100644
index 079e18f35..000000000
--- a/rse/plugins/org.eclipse.rse.logging/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.logging;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.logging.RemoteSystemsLoggingPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.logging,
- org.eclipse.rse.logging.performance,
- org.eclipse.rse.logging.ui
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.logging/about.html b/rse/plugins/org.eclipse.rse.logging/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.logging/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/build.properties b/rse/plugins/org.eclipse.rse.logging/build.properties
deleted file mode 100644
index d469e8ab9..000000000
--- a/rse/plugins/org.eclipse.rse.logging/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = HelpContexts.xml,\
- plugin.properties,\
- plugin.xml,\
- style/,\
- .,\
- about.html,\
- META-INF/
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.logging/plugin.properties b/rse/plugins/org.eclipse.rse.logging/plugin.properties
deleted file mode 100644
index 1b418561e..000000000
--- a/rse/plugins/org.eclipse.rse.logging/plugin.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# =================================================
-# Remote Systems logging plugin.xml properties file
-# =================================================
-
-# NLS_MESSAGEFORMAT_VAR
-
-pluginName = RSE Logging
-providerName = Eclipse.org
-
-Remote_Systems_Logging = Remote Systems Logging
-
diff --git a/rse/plugins/org.eclipse.rse.logging/plugin.xml b/rse/plugins/org.eclipse.rse.logging/plugin.xml
deleted file mode 100644
index 4f743c2ce..000000000
--- a/rse/plugins/org.eclipse.rse.logging/plugin.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-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.
--->
-
-<?eclipse version="3.1"?>
-
-<plugin>
-
-<!-- ============================================ -->
-<!-- Define Help Context -->
-<!-- ============================================ -->
-<extension point="org.eclipse.help.contexts">
- <contexts
- file="HelpContexts.xml">
- </contexts>
-</extension>
-
-<!-- Preferences -->
-<extension point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.rse.internal.logging.LoggingPreferenceInitializer"/>
-</extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/internal/logging/LoggingPreferenceInitializer.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/internal/logging/LoggingPreferenceInitializer.java
deleted file mode 100644
index 20d1ce883..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/internal/logging/LoggingPreferenceInitializer.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.logging;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.rse.logging.IRemoteSystemsLogging;
-import org.eclipse.rse.logging.RemoteSystemsLoggingPlugin;
-
-/**
- * This class initializes logging preferences.
- */
-public class LoggingPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /**
- * Constructor.
- */
- public LoggingPreferenceInitializer() {
- super();
- }
-
- /**
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- Preferences prefs = RemoteSystemsLoggingPlugin.getDefault().getPluginPreferences();
- prefs.setDefault(IRemoteSystemsLogging.DEBUG_LEVEL, IRemoteSystemsLogging.LOG_ERROR);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/IRemoteSystemsLogging.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/IRemoteSystemsLogging.java
deleted file mode 100644
index 2f5d81052..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/IRemoteSystemsLogging.java
+++ /dev/null
@@ -1,59 +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.logging;
-
-/**
- * Defines all logging constants.
- */
-public interface IRemoteSystemsLogging {
-
- /**
- * Name of the key that controls the logging level.<br>
- */
- public static final String PLUGIN_ID = "org.eclipse.rse.logging"; //$NON-NLS-1$
-
- /**
- * Name of the key that controls the logging level.<br>
- * (value is "debug_level").
- */
- public static final String DEBUG_LEVEL = "debug_level"; //$NON-NLS-1$
-
- /**
- * Set debug_level to this value to get Error messages.<br>
- * (value is 0).
- */
- public static final int LOG_ERROR = 0;
-
- /**
- * Set debug_level to this value to get Warning messages.<br>
- * (value is 1).
- */
- public static final int LOG_WARNING = 1;
-
- /**
- * Set debug_level to this value to get Information messages.<br>
- * (value is 2).
- */
- public static final int LOG_INFO = 2;
-
- /**
- * Set debug_level to this value to get Debug messages.<br>
- * (value is 3).
- */
- public static final int LOG_DEBUG = 3;
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/Logger.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/Logger.java
deleted file mode 100644
index 697c25a0c..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/Logger.java
+++ /dev/null
@@ -1,219 +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.logging;
-
-import org.eclipse.core.runtime.ILog;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-
-/**
- * Generic Logger class for handling Remote Systems logging and tracing.<br>
- * <br>
- * The debug level is determined by a "debug_level" key in the preferences store
- * of the plugin that owns this Logger instance.<br>
- * <br>
- * The debug location is determined by a "log_location" key in the preferences store
- * of the plugin that owns this Logger instance.<br>
- * <br>
- * The valid values for these keys can be found in the javadocs for IRemoteSystemsLogging.<br>.
- * This means that these keys could have been defined through hardcoding in your
- * plugin startup code, through preferences.ini in the plugin install directory,
- * OR from pref_store.ini in the plugin read/write metadata area. <br>
- * The default behavior is to log to file, and to log only errors.
- * <br>
- * A typical usage of this class is as follows: <br>
- * <br>
- * public class myPlugin extends AbstractUIPlugin { <br>
- * <br>
- * // a cached Logger inst for convenience.<br>
- * public static Logger out = null;<br>
- * <br>
- * public myPlugin(IPluginDescriptor descriptor) { <br>
- * super(descriptor);<br>
- * ......<br>
- * ......<br>
- * out = LoggerFactory.getInst(this);<br>
- * out.logInfo("loading myPlugin class.");<br>
- * //out.logWarning("This is a warning message.");<br>
- * //out.logError("This is an error.", new Exception());<br>
- * //out.logDebugMessage(<br>
- * // "myPlugin",<br>
- * // "this is a debug message from class myPlugin.");<br>
- * ......<br>
- * ......<br>
- * }<br>
- * <br>
- * <br>
- * public void shutdown() throws CoreException {<br>
- * super.shutdown();<br>
- * LoggerFactory.freeInst(this);<br>
- * }<br>
- * <br>
- *
- */
-public class Logger implements IPropertyChangeListener {
-
- /**
- * Constant can be used to surround debugging code. Optimizing
- * compilers have the possibility of removing the code from
- * a production copy.
- *
- * Should be set false normally. Only set to true when testing.
- */
- public static final boolean DEBUG = false;
-
- private ILog systemsPluginLog = null;
- private RemoteSystemLogListener logListener = null;
- private String pluginId = null;
- private Plugin systemPlugin = null;
- private int debug_level = IRemoteSystemsLogging.LOG_ERROR;
-
- /**
- * Creates a new Logger. Invoked by the LoggerFactory.
- * @param systemPlugin The preferences for this plugin will determine the detail
- * logged by this logger. This allows different levels of detail to be logged in the
- * workbench.
- * @see LoggerFactory#getLogger(Plugin)
- */
- Logger(Plugin systemPlugin) {
- this.systemPlugin = systemPlugin;
- this.pluginId = systemPlugin.getBundle().getSymbolicName();
- initialize();
- }
-
- /**
- * Initialize the Logger. The logger uses an ILog from the platform for this particular plugin, and
- * establishes a listener on that log to format the items placed in the log.
- */
- private void initialize() {
- systemsPluginLog = systemPlugin.getLog();
- logListener = new RemoteSystemLogListener(systemPlugin);
- systemsPluginLog.addLogListener(logListener);
- Preferences store = systemPlugin.getPluginPreferences();
- debug_level = store.getInt(IRemoteSystemsLogging.DEBUG_LEVEL);
- store.addPropertyChangeListener(this);
- store.addPropertyChangeListener(logListener);
- }
-
- /**
- * Log a Debug message. This is intended to be used as follows:<br>
- * Logger.logDebugMessage("someClassName", "someMessage");<br>
- * <br>
- * and the output will be:<br>
- * <br>
- * ---------------------------------------------------------------<br>
- * DEBUG org.eclipse.rse.logging someClassName<br>
- * someMessage<br>
- * ---------------------------------------------------------------<br>
- * <br>
- * <br>
- * Note that since this message is only for developer debugging, it does not
- * need to be localized to proper local.<br>
- */
- public synchronized void logDebugMessage(String className, String message) {
- if (Logger.DEBUG && debug_level >= IRemoteSystemsLogging.LOG_DEBUG) {
- MultiStatus debugStatus = new MultiStatus(pluginId, IStatus.OK, className, null);
- Status infoStatus = new Status(IStatus.OK, pluginId, IStatus.OK, message, null);
- debugStatus.add(infoStatus);
- systemsPluginLog.log(debugStatus);
- }
- }
-
- /**
- * Log an Error message with an exception. Note that the message should already
- * be localized to proper locale.
- * @param message the message to log.
- * @param ex the exception that caused the condition, may be null.
- */
- public synchronized void logError(String message, Throwable ex) {
- if (debug_level >= IRemoteSystemsLogging.LOG_ERROR) {
- if (message == null) message = ""; //$NON-NLS-1$
- Status errorStatus = new Status(IStatus.ERROR, pluginId, IStatus.OK, message, ex);
- systemsPluginLog.log(errorStatus);
- }
- }
-
- /**
- * Log an Information message. Note that the message should already
- * be localized to proper local.<br>
- * ie: Resource.getString() should already have been called
- */
- public synchronized void logInfo(String message) {
- logInfo(message, null);
- }
-
- /**
- * Log an Information message. Note that the message should already
- * be localized to proper local.<br>
- * ie: Resource.getString() should already have been called
- */
- public synchronized void logInfo(String message, Throwable ex) {
- if (debug_level >= IRemoteSystemsLogging.LOG_INFO) {
- if (message == null) message = ""; //$NON-NLS-1$
- Status infoStatus = new Status(IStatus.INFO, pluginId, IStatus.OK, message, ex);
- systemsPluginLog.log(infoStatus);
- }
- }
-
- /**
- * Log a Warning message. Note that the message should already
- * be localized to proper local.<br>
- * ie: Resource.getString() should already have been called
- */
- public synchronized void logWarning(String message) {
- logWarning(message, null);
- }
-
- /**
- * Log a Warning message. Note that the message should already
- * be localized to proper local.<br>
- * ie: Resource.getString() should already have been called
- */
- public synchronized void logWarning(String message, Throwable ex) {
- if (debug_level >= IRemoteSystemsLogging.LOG_WARNING) {
- if (message == null) message = ""; //$NON-NLS-1$
- Status warningStatus = new Status(IStatus.WARNING, pluginId, IStatus.OK, message, ex);
- systemsPluginLog.log(warningStatus);
- }
- }
-
- public synchronized void setDebugLevel(int level) {
- debug_level = level;
- }
-
- public synchronized int getDebugLevel() {
- return debug_level;
- }
-
- public synchronized void freeResources() {
- logListener.freeResources();
- }
-
- /**
- * Handle changes from a Preferences page.
- */
- public synchronized void propertyChange(PropertyChangeEvent event) {
- Preferences prefs = systemPlugin.getPluginPreferences();
- debug_level = prefs.getInt(IRemoteSystemsLogging.DEBUG_LEVEL);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/LoggerFactory.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/LoggerFactory.java
deleted file mode 100644
index e2ad31243..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/LoggerFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.logging;
-
-import java.util.Hashtable;
-
-import org.eclipse.core.runtime.Plugin;
-
-/**
- * Factory class for creating Logger instances.<br>
- * Keep in mind that this factory class follows the singleton model.<br>
- * ie: once an instance of a Logger class for a given plugin is created,
- * it will always be reused.
- */
-public class LoggerFactory {
-
- private static Hashtable pluginTable = new Hashtable();
-
- /**
- * Returns the Logger instance for a given plugin. There is only
- * one instance of the Logger class per plugin.
- * @param plugin the plugin for which to find or create the log
- * @return the logger for that plugin
- */
- public static Logger getLogger(Plugin plugin) {
- Logger logger = (Logger) pluginTable.get(plugin);
- if (logger == null) {
- logger = new Logger(plugin);
- pluginTable.put(plugin, logger);
- }
- return logger;
- }
-
- /**
- * Frees resources used by the Logger instance for the given plugin.
- * This method must be called as part of the the plugin shutdown life cycle.
- * @param plugin the plugin for which to free logging resources
- */
- public static void freeLogger(Plugin plugin) {
- Logger logger = (Logger) pluginTable.get(plugin);
- if (logger != null) {
- logger.freeResources();
- pluginTable.remove(plugin);
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/RemoteSystemLogListener.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/RemoteSystemLogListener.java
deleted file mode 100644
index ff4f9f78a..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/RemoteSystemLogListener.java
+++ /dev/null
@@ -1,139 +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.logging;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.util.Date;
-
-import org.eclipse.core.runtime.ILogListener;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-
-/**
- * Log Listener is a sink for messages coming from Logger.
- */
-class RemoteSystemLogListener implements ILogListener, IPropertyChangeListener {
-
- private PrintWriter log = null;
- private File outputFile = null;
-
- /**
- * Create a new log listener for a plugin.
- * @param plugin The plugin for which to create a log listener.
- */
- public RemoteSystemLogListener(Plugin plugin) {
- IPath path = plugin.getStateLocation().addTrailingSeparator().append(".log"); //$NON-NLS-1$
- outputFile = path.toFile();
- if ((outputFile != null) && (outputFile.exists())) {
- outputFile.delete();
- }
- initialize();
- }
-
- /**
- * Initialize the logger. Retrieves the logging location preference and sets up the logger
- * to log to that location.
- */
- private void initialize() {
- try {
- freeResources();
- log = new PrintWriter(new BufferedWriter(new FileWriter(outputFile.toString(), true)), true);
- } catch (Exception e) {
- log = null;
- System.err.println("Exception in RemoteSystemLogListener.initialize(): " + e.getMessage()); //$NON-NLS-1$
- e.printStackTrace();
- }
- }
-
- public void logging(IStatus status) {
- if (log == null)
- return;
- else {
- // Need a to string here, because we need to be able to compare dates.
- String date = new Date().toString();
- log.println(date);
- int severity = status.getSeverity();
- if (severity == IStatus.ERROR) {
- log.print("ERROR"); //$NON-NLS-1$
- } else if (severity == IStatus.WARNING) {
- log.print("WARNING"); //$NON-NLS-1$
- } else if (severity == IStatus.INFO) {
- log.print("INFO"); //$NON-NLS-1$
- } else if (severity == IStatus.OK) {
- log.print("DEBUG"); //$NON-NLS-1$
- }
-
- log.print(" "); //$NON-NLS-1$
- log.print(status.getPlugin());
- log.print(" "); //$NON-NLS-1$
- log.println(status.getMessage());
- if (status.getException() != null) status.getException().printStackTrace(log);
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- loggingChild(children[i]);
- }
- }
- log.println("--------------------------------------------"); //$NON-NLS-1$
- }
-
- }
-
- public void logging(IStatus status, String plugin) {
- logging(status);
- }
-
- /**
- * @param tmp org.eclipse.core.runtime.IStatus
- */
- private void loggingChild(IStatus status) {
- if (log == null)
- return;
- else {
- log.print("\t\t"); //$NON-NLS-1$
- log.println(status.getMessage());
- if (status.getException() != null) status.getException().printStackTrace(log);
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++)
- logging(children[i]);
- }
- }
- }
-
- /**
- * Handle changes from Preferences page.
- */
- public synchronized void propertyChange(PropertyChangeEvent event) {
- // refresh the log location from plugin Preference store
- initialize();
- }
-
- public void freeResources() {
- if (log == null) return;
- log.flush();
- log.close();
- log = null;
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/RemoteSystemsLoggingPlugin.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/RemoteSystemsLoggingPlugin.java
deleted file mode 100644
index b434982f2..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/RemoteSystemsLoggingPlugin.java
+++ /dev/null
@@ -1,100 +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.logging;
-
-import java.net.URL;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * Remote Systems Logging plugin.
- */
-public class RemoteSystemsLoggingPlugin extends Plugin {
-
- private static RemoteSystemsLoggingPlugin singleton;
- private ResourceBundle resourceBundle;
- public static Logger out = null;
-
- /**
- * Constructor.
- */
- public RemoteSystemsLoggingPlugin() {
- super();
- singleton = this;
- }
-
- /**
- * Returns the shared plugin instance.
- */
- public static RemoteSystemsLoggingPlugin getDefault() {
- return singleton;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- try {
- ResourceBundle bundle = RemoteSystemsLoggingPlugin.getDefault().getResourceBundle();
- return bundle.getString(key);
- } catch (Exception e) {
- out.logError("could not get resource string for: " + key, e); //$NON-NLS-1$
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle.
- */
- public ResourceBundle getResourceBundle() {
- if (resourceBundle == null) {
- try {
- IPath path = new Path("$nl$/RemoteSystemsLogging.properties"); //$NON-NLS-1$
- URL url = FileLocator.find(getBundle(), path, null);
- resourceBundle = new PropertyResourceBundle(url.openStream());
- } catch (Exception x) {
- resourceBundle = null;
- out.logInfo("RemoteSystemsLoggingPlugin - unable to log resourcebundle"); //$NON-NLS-1$
- }
- }
- return resourceBundle;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- out = LoggerFactory.getLogger(this);
- out.logInfo("loading RemoteSystemsLoggingPlugin class."); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- LoggerFactory.freeLogger(this);
- super.stop(context);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/performance/PerformanceLogger.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/performance/PerformanceLogger.java
deleted file mode 100644
index ed771b7db..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/performance/PerformanceLogger.java
+++ /dev/null
@@ -1,696 +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.logging.performance;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.StringWriter;
-import java.text.MessageFormat;
-import java.util.Calendar;
-import java.util.EmptyStackException;
-import java.util.HashMap;
-import java.util.Stack;
-import java.util.StringTokenizer;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.w3c.dom.Comment;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * A performance measurement class for benchmarking.
- * This performance framework provides stopwatch functions
- * for calculating elapsed time for an operation.
- * <p>
- * This class should be used only at development time since
- * it prints to System.out
- * and contains non-translated strings.
- * <p>
- * It is highly likely that this class will be deprecated in 2.0.
- * Use TPTPs tools for performance monitoring and logging.
- * <pre>
- * Usage example
- * Method_A {
- * String key = PerformanceLogger.register("RSE","WDSC","5120");
- * PerformanceLogger.start(key, "OP1"); //CallerID is OP1
- * Method_B();
- * PerformanceLogger.stop(key);
- * }
- *
- * Method_B {
- * PerformanceLogger.start("RSE"); //"RSE" component, CalleID="class.method"
- * // Do something
- * PerformanceLogger.stop("RSE");
- * }
- *
- * Method_C {
- * PerformanceLogger.start(); //Use the default component for recording
- * // Do something
- * PerformanceLogger.stop();
- * }
- *</pre>
- */
-
-public class PerformanceLogger {
-
- public final static int OPTION_GET_ALL = 1;
- public final static int OPTION_GET_FEATURE = 2;
- public final static int OPTION_GET_VERSION = 3;
- private final static Object[] EMPTY = {};
- private final static String ELEMENT_TASK = "Task"; //$NON-NLS-1$
- private final static String ATTRIBUTE_NAME_TASKID = "CallerID"; //$NON-NLS-1$
- private final static String DEFAULT_COMPONENT = "_PERFORMANCELOGGER_"; //$NON-NLS-1$
- private static boolean ENABLE_PERFORMANCE_LOGGING = false; /*for user logging enabling */
- //static long currentAssignedID = -1;
- private static long samplingTime = -1; /* Elapsed time for normalization operation */
- private static boolean _initialized = false;
- private static HashMap perfLogRegistry = new HashMap();
-
- /*
- * Static initializer to normalize this logger.
- */
- static {
- normalize();
- }
-
- static class StartData {
- long startTime = -1;
- long stopTime = -1;
- String userID = null;
- String startThread = null;
- String startMethod = null;
- String stopThread = null;
- String stopMethod = null;
- Element node = null;
- }
-
- class ComponentData {
- String component = null;
- String timeStamp = null;
- String feature = null;
- String version = null;
- String XMLFileID = null;
- File XMLFile = null;
- Document doc = null;
- Stack taskStack = new Stack();
-
- ComponentData(String comp_id) {
- component = comp_id;
- }
- }
-
- private static void printMessage(String message, Object[] data) {
- System.out.println(MessageFormat.format(message, data));
- }
-
- private static void printMessage(String message, Object value) {
- printMessage(message, new Object[] {value});
- }
-
- private static void printMessage(String message) {
- printMessage(message, EMPTY);
- }
-
- /**
- * Enable performance logging
- * The flag ENABLE_PERFORMANCE_LOGGING is enabled(true or false)
- * @param enable true or false
- */
- public static void enablePerformanceLogging(boolean enable) {
- ENABLE_PERFORMANCE_LOGGING = enable;
- }
-
- /**
- * Check if logging enabled.
- * @return boolean ENABLE_PERFORMANCE_LOGGING
- */
- public static boolean isPerformanceLoggingEnabled() {
- return ENABLE_PERFORMANCE_LOGGING;
- }
-
- /** public static String register(String comp_id) : registering a component using default
- * @param comp_id Component to be registered
- * @return component registered with no product info
- */
- public static String register(String comp_id) {
- return register(comp_id, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /** Registers component using default component id
- * @param feature Identifier for Product Feature attribute in XML
- * @param version Identifier for Product Version attribute in XML
- * @return default component key
- */
- public static String register(String feature, String version) {
- return register(DEFAULT_COMPONENT, feature, version);
- }
-
- /**
- * Registering a component.
- * An XML file is created by concatenating comp_id, feature and version with time stamp appended
- * @param comp_id Component to be registered
- * @param feature Identifier for Product Feature attribute in XML
- * @param version Identifier for Product Version attribute in XML
- * @return comp_id as the registered key
- */
- public static String register(String comp_id, String feature, String version) {
-
- if ((comp_id == null) || (comp_id.length() == 0)) {
- printMessage("PerformanceLogger:register(): Cannot register null or empty component id."); //$NON-NLS-1$
- return comp_id;
- }
-
- if (perfLogRegistry.containsKey(comp_id)) {
- printMessage("PerformanceLogger:register(): component {0} already registered", comp_id); //$NON-NLS-1$
- return comp_id;
- }
-
- ComponentData compData = new PerformanceLogger().new ComponentData(comp_id);
-
- Calendar time = Calendar.getInstance();
- compData.timeStamp = time.getTime().toString();
- String userID = System.getProperty("user.name"); //$NON-NLS-1$
- String idTemplate = "{0}_{1}_{2}_{3}_perf.{4}.xml"; //$NON-NLS-1$
- String id = MessageFormat.format(idTemplate, new Object[] {comp_id, userID, feature, version, compData.timeStamp});
- compData.XMLFileID = id.replace(' ', '_').replace(':', '_');
- compData.XMLFile = new File(compData.XMLFileID);
- compData.feature = feature;
- compData.version = version;
- generateXMLFile(compData);
- compData.taskStack = new Stack();
- perfLogRegistry.put(comp_id, compData);
- _initialized = true;
- printMessage("PerformanceLogger: XML file created is {0}.", compData.XMLFile.getAbsolutePath()); //$NON-NLS-1$
- return comp_id;
- }
-
- /**
- * De-register the default component.
- * Default component "_PERFORMANCELOGGER_" removed,
- * start() will be disabled.
- */
- public static void deRegister() {
- perfLogRegistry.remove(DEFAULT_COMPONENT);
- printMessage("SystemPerformanceLogger: default component de-registered"); //$NON-NLS-1$
- }
-
- /**
- * De-register a component.
- * component identified by key removed,
- * start(comp_id) will be disabled.
- * @param key component to be removed
- */
- public static void deRegister(String key) {
- perfLogRegistry.remove(key);
- printMessage("SystemPerformanceLogger: component {0} de-registered", key); //$NON-NLS-1$
- }
-
- /**
- * Set the normalization unit for this run. Based on a standard method for class instance initialization.
- * @return a string containing the unit.
- */
- public static String normalize() {
- /*
- * Execute some standard code and time it to generate our normalization interval.
- * Return the value to attempt to make sure it is not optimized by the compiler.
- */
- long startTime = System.currentTimeMillis();
- Double q = new Double(0);
- int i = 0;
- int n = 1000000;
- for (i = 0; i < n; i++) {
- Double dd = new Double(n);
- Double dr = new Double(n + i);
- q = new Double(dd.doubleValue() / dr.doubleValue());
- }
- double val = q.doubleValue() / i;
- long stopTime = System.currentTimeMillis();
- samplingTime = stopTime - startTime;
- String template = "SystemPerformanceLogger::Normalization Elapsed time = {0} {1}"; //$NON-NLS-1$
- String result = MessageFormat.format(template, new Object[] {new Long(samplingTime), new Double(val)});
- return result;
- }
-
- /**
- * public static long start(): start timer using default component
- * The Task values will be recorded in the default component XML file
- * @return
- * - started time milliseconds
- */
- public static long start() {
- if (_initialized == false) {
- register(DEFAULT_COMPONENT, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- /*Use the class method name for CallerID*/
- String methodPath = getMethodName(true);
- return start(DEFAULT_COMPONENT, methodPath);
- }
-
- /**
- * public static long start(String comp_id): start timer for component comp_id using default TaskID
- * @param comp_id : component registered previously by register(comp_id,..)
- * @return started time in milliseconds.
- */
- public static long start(String comp_id) {
- String methodPath = getMethodName(true);
- return start(comp_id, methodPath);
- }
-
- /**
- * public long start(String comp_id, String call_id): start the timer for registered component comp_id
- * @param
- * comp_id is the registered component
- * call_id is the "CallID" attribute value for the XML tag "Task"
- * @return
- * - started time in milliseconds.
- */
- public static long start(String comp_id, String call_id) {
-
- if (perfLogRegistry.containsKey(comp_id) == false) {
- printMessage("PerformanceLogger:start(): component {0} not registered", comp_id); //$NON-NLS-1$
- return -1;
- }
-
- ComponentData cd = (ComponentData) perfLogRegistry.get(comp_id);
- StartData td = new StartData();
-
- td.userID = call_id;
- td.startThread = Thread.currentThread().toString();
- td.startMethod = getMethodName(false);
-
- /* Create the new Task Element in the DOC */
- try {
-
- //BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(cd.XMLFile), "UTF8"));
- Element root = cd.doc.getDocumentElement();
- Element task = cd.doc.createElement(ELEMENT_TASK);
- task.setAttribute(ATTRIBUTE_NAME_TASKID, td.userID);
- task.setAttribute("StartAt", td.startMethod); //$NON-NLS-1$
- task.setAttribute("StartThread", td.startThread); //$NON-NLS-1$
-
- td.node = task;
-
- /* Check if start() is nested by checking if the TaskStack is empty */
- if (cd.taskStack.isEmpty()) { /*Empty==>not a nested start()*/
- root.appendChild(task);
- } else { /*Not empty ==> this start() is nested*/
-
- StartData sd = (StartData) cd.taskStack.peek(); /*Peek the parent CallID on the stack*/
- sd.node.appendChild(task);
- }
- } catch (DOMException e) {
- printMessage("PerformanceLogger::updateXMLFileatStart DOM Error: {0}", e); //$NON-NLS-1$
- }
-
- /*Read the current time save it on stack */
- td.startTime = System.currentTimeMillis();
- cd.taskStack.push(td);
- return td.startTime;
- }
-
- /**
- * public static long stop(): stop timer for default component
- * The Task values will be recorded in the default component XML file
- * @return
- * - started time milliseconds
- */
- public static long stop() {
- return stop(DEFAULT_COMPONENT);
- }
-
- /**
- * public long stop(String comp_id): Stopping the timer for component comp_id
- * @return
- * - stopped time in milliseconds.
- */
- public static long stop(String comp_id) {
-
- long st = System.currentTimeMillis();
- ComponentData cd = (ComponentData) perfLogRegistry.get(comp_id);
- if (cd == null) {
- printMessage("SystemPerformanceLogger::stop(): invalid registration key"); //$NON-NLS-1$
- return 0;
- }
- long result = 0;
- try {
- StartData td = (StartData) cd.taskStack.pop();
- td.stopTime = st;
- td.stopThread = Thread.currentThread().toString();
- td.stopMethod = getMethodName(false);
- updateXMLFileAtStop(cd, td);
- result = td.stopTime;
- } catch (EmptyStackException e) {
- printMessage("SystemPerformanceLogger:: Probably too many stop() function calls. - {0}", e); //$NON-NLS-1$
- }
- return result;
- }
-
- /**
- * Create an XML file with "Product" and "System" tags.
- * @param cd component data for creating the XML
- */
- private static void generateXMLFile(ComponentData cd) {
- try {
- BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(cd.XMLFile), "UTF8")); //$NON-NLS-1$
- // DOMImplementation impl = new DOMImplementationImpl();
- // cd.doc = impl.createDocument(null, "Benchmark", null);
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = factory.newDocumentBuilder();
- DOMImplementation impl = builder.getDOMImplementation();
- cd.doc = impl.createDocument(null, "Benchmark", null); //$NON-NLS-1$
- // get root element and set attributes
- Element root = cd.doc.getDocumentElement();
- root.setAttribute("BenchmarkID", cd.XMLFileID); //$NON-NLS-1$
- root.setAttribute("TimeStamp", cd.timeStamp); //$NON-NLS-1$
-
- Element system = cd.doc.createElement("System"); //$NON-NLS-1$
- Element product = cd.doc.createElement("Product"); //$NON-NLS-1$
-
- product.setAttribute("Feature", cd.feature); //$NON-NLS-1$
- product.setAttribute("Version", cd.version); //$NON-NLS-1$
- root.appendChild(product);
-
- system.setAttribute("OSName", System.getProperty("os.name")); //$NON-NLS-1$ //$NON-NLS-2$
- system.setAttribute("OSVersion", System.getProperty("os.version")); //$NON-NLS-1$ //$NON-NLS-2$
- system.setAttribute("JavaVersion", System.getProperty("java.version")); //$NON-NLS-1$ //$NON-NLS-2$
- system.setAttribute("JavaVMVersion", System.getProperty("java.vm.version")); //$NON-NLS-1$ //$NON-NLS-2$
- system.setAttribute("JavaClassPath", System.getProperty("java.class.path")); //$NON-NLS-1$ //$NON-NLS-2$
- system.setAttribute("JavaLibraryPath", System.getProperty("java.library.path")); //$NON-NLS-1$ //$NON-NLS-2$
- root.appendChild(system);
-
- Element norm = cd.doc.createElement("_NORMALIZATION_VALUES"); //$NON-NLS-1$
- Long ems = new Long(samplingTime);
- norm.setAttribute("ElapsedTime", ems.toString()); //$NON-NLS-1$
- root.appendChild(norm);
-
- /* Insert comments for Task tag */
- Comment cmt1 = cd.doc.createComment("Each Task element represents one start/stop timer operation"); //$NON-NLS-1$
- Comment cmt2 = cd.doc.createComment("Time recorded is in milliseconds"); //$NON-NLS-1$
- Comment cmt3 = cd.doc.createComment("NormalizedFactor is the performance indicator. A larger value than the previous run might indicate performance degradation."); //$NON-NLS-1$
- root.appendChild(cmt1);
- root.appendChild(cmt2);
- root.appendChild(cmt3);
-
- try {
- Source source = new DOMSource(cd.doc);
- Result result = new StreamResult(writer);
- Transformer t = TransformerFactory.newInstance().newTransformer();
- t.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- t.transform(source, result);
- } catch (TransformerConfigurationException e2) {
- } catch (TransformerFactoryConfigurationError e2) {
- } catch (TransformerException e2) {
- }
-
- // OutputFormat fmt = new OutputFormat(cd.doc);
- // fmt.setLineSeparator(LineSeparator.Windows);
- // fmt.setIndenting(true);
- // fmt.setPreserveSpace(false);
- // //writer.flush();
- // XMLSerializer serializer = new XMLSerializer(writer, fmt);
- // serializer.serialize(cd.doc);
- // writer.close();
-
- } catch (IOException e) {
- printMessage("PerformanceLogger::updateXML IO Error: {0}", e); //$NON-NLS-1$
- } catch (ParserConfigurationException e) {
- printMessage("PerformanceLogger::updateXML Parser Configuration Error: {0}", e); //$NON-NLS-1$
- } catch (DOMException e) {
- printMessage("PerformanceLogger::updateXML DOM Error: {0}", e); //$NON-NLS-1$
- }
- }
-
- /**
- * Update XML file with performance measurement info
- * - A "Task" tag is created in the XML file with the current start and stop timer information.
- */
- private static void updateXMLFileAtStop(ComponentData cd, StartData td) {
-
- try {
- BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(cd.XMLFile), "UTF8")); //$NON-NLS-1$
- cd.doc.getDocumentElement();
- Element task = td.node;
-
- /* Construct Long class insatnce for string manipulation */
- Long ems = new Long(td.stopTime - td.startTime);
- Long sms = new Long(td.startTime);
- Long tms = new Long(td.stopTime);
- /*Calculate the normalization factor*/
- String normalizedFactor = "invalid"; //$NON-NLS-1$
- if (samplingTime > 0) {
- Long sam = new Long(samplingTime);
- Double val = new Double(ems.doubleValue() / sam.doubleValue());
- normalizedFactor = val.toString();
- }
-
- /* Update the document */
- task.setAttribute("ElapsedTime", ems.toString()); //$NON-NLS-1$
- task.setAttribute("NormalizedFactor", normalizedFactor); //$NON-NLS-1$
- task.setAttribute("StartTime", sms.toString()); //$NON-NLS-1$
- task.setAttribute("StopTime", tms.toString()); //$NON-NLS-1$
- task.setAttribute("StartAt", td.startMethod); //$NON-NLS-1$
- task.setAttribute("StartThread", td.startThread); //$NON-NLS-1$
- task.setAttribute("StopAt", td.stopMethod); //$NON-NLS-1$
- task.setAttribute("StopThread", td.stopThread); //$NON-NLS-1$
-
- try {
- Source source = new DOMSource(cd.doc);
- Result result = new StreamResult(writer);
- Transformer t = TransformerFactory.newInstance().newTransformer();
- t.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- t.transform(source, result);
- } catch (TransformerConfigurationException e2) {
- } catch (TransformerFactoryConfigurationError e2) {
- } catch (TransformerException e2) {
- }
-
- /*Now save the DOM*/
- // OutputFormat fmt = new OutputFormat(cd.doc);
- // fmt.setLineSeparator(LineSeparator.Windows);
- // fmt.setIndenting(true);
- // fmt.setPreserveSpace(false);
- // //writer.flush();
- // XMLSerializer serializer = new XMLSerializer(writer, fmt);
- // serializer.serialize(cd.doc);
- // writer.close();
- } catch (java.io.IOException e) {
- printMessage("PerformanceLogger::updateXMLFileAtStop IO Error: {0}", e); //$NON-NLS-1$
- } catch (DOMException e) {
- printMessage("PerformanceLogger::updateXMLFileAtStop DOM Error: {0}", e); //$NON-NLS-1$
- }
-
- }
-
- /**
- * public String geCurrentProductInfo(int req, String comp_id) : retrieve the product information.
- * @param
- * req : OPTION_GET_FEATURE/OPTION_GET_VERSION
- * comp_id : the component id
- * @return
- * "OPTION_GET_FEATURE":product feature as specified in register()
- * "OPTION_GET_VERSION": product version as specified in register()
- * no match: null
- */
- public static String getCurrentProductInfo(int req, String comp_id) {
- ComponentData cd = (ComponentData) perfLogRegistry.get(comp_id);
- if (cd == null) {
- printMessage("PerformanceLogger::getCurrentProductInfo invalid comp_id"); //$NON-NLS-1$
- return null;
- }
-
- if (req == OPTION_GET_FEATURE)
- return cd.feature;
- else if (req == OPTION_GET_VERSION) return cd.version;
- return null;
- }
-
- /**
- * public String getXMLFileName(String comp_id) : get the XML file pathname
- * @return
- * The XML file fullpath name.
- */
- public static String getXMLFileName(String comp_id) {
- ComponentData cd = (ComponentData) perfLogRegistry.get(comp_id);
- return cd.XMLFile.getAbsolutePath();
- }
-
- /**
- * public String getMethodName(boolean parsed) : get the method name
- * @param
- * parsed : true or false
- * @return
- * if true method name is returned as class.method.
- */
- private static String getMethodName(boolean parsed) {
-
- String methodPath = null;
- Throwable e = new Throwable();
- StringWriter strwriter = new StringWriter(100);
- e.printStackTrace(new java.io.PrintWriter(strwriter));
- String stack = strwriter.toString();
- StringTokenizer tokenizer = new StringTokenizer(stack, "\r\n"); //$NON-NLS-1$
- /*
- * Here to parse the exception string to get the caller which is the current method location
- * to be obtained. The Exception stack should show the PerformanceLogger start() in the stack first:
- * -java.lang.Exception
- * -at org.eclipse.rse.logging.performance.PerformanceLogger.start(PerformanceLogger.java:151)
- * -at org.eclipse.rse.logging.performance.PerformanceLogger.start(PerformanceLogger.java:135)
- * Depending if the caller is using default task ID or not, so the caller is the 3rd or the 4th in the stack.
- */
-
- for (int i = 0; tokenizer.hasMoreTokens(); i++) {
- methodPath = tokenizer.nextToken();
- if ((methodPath.indexOf("java.lang.Throwable") == -1) && (methodPath.indexOf("logging.performance.PerformanceLogger") == -1)) break; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (methodPath != null) {
- methodPath = methodPath.substring(4);
- if (parsed) {
- try {
- int i = methodPath.indexOf('(');
- if (i != -1) methodPath = methodPath.substring(0, i); //strip of the substring enclosed in ()
- //Now we have "org.eclipse.rse.logging.performance.PerformanceLogger.start"
- i = methodPath.lastIndexOf('.'); //Get the method name after the last period (.)
- String methodName = methodPath.substring(i + 1); //Now we have the method name "start"
- String className = methodPath.substring(0, i); //remove method name from the string
- //We are left with "org.eclipse.rse.logging.performance.PerformanceLogger"
- i = className.lastIndexOf('.');
- if (i != -1) className = className.substring(i + 1); //Now we have the class name "PerformanceLogger"
- methodPath = className + "." + methodName; //$NON-NLS-1$
- } catch (IndexOutOfBoundsException ex) {
- printMessage("PerformanceLogger:getMethodName exception {0}", ex); //$NON-NLS-1$
- }
- }
- }
- return methodPath; /*delete " at" in the beginning of the string */
- }
-
- /**
- * Retrieve the system information.
- * These values will be retrieved and printed in stdout:
- * <ul>
- * <li>java.version</li>
- * <li>java.vm.version</li>
- * <li>java.class.version</li>
- * <li>java.class.path</li>
- * <li>java.library.path</li>
- * <li>os.name</li>
- * <li>os.version</li>
- * </ul>
- */
- public static void listSystemProfile() {
- System.out.println("java version : " + System.getProperty("java.version")); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("OS name : " + System.getProperty("os.name")); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("OS version : " + System.getProperty("os.version")); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("working dir : " + System.getProperty("user.dir")); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("home dir : " + System.getProperty("home.dir")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * public static void main() : This main is used for testing this PerformanceLogger functions.
- * The objective is to check the XML output format for nested start() calls.
- */
- public static void main(String[] args) {
-
- int i = 0;
-
- if (isPerformanceLoggingEnabled()) {
- PerformanceLogger.start(); //Start timer using default component
- }
- for (i = 0; i < 1000000; i++) {
- //empty performance test loop
- }
- if (isPerformanceLoggingEnabled()) {
- PerformanceLogger.stop();
- }
-
- PerformanceLogger.enablePerformanceLogging(true);
- String key = PerformanceLogger.register("", "WDSC", "5120"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- key = PerformanceLogger.register("RSE", "WDSC", "5120"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- PerformanceLogger.deRegister("XXX"); //not registered key previously //$NON-NLS-1$
- System.out.println("Product info : " + PerformanceLogger.getCurrentProductInfo(PerformanceLogger.OPTION_GET_FEATURE, key) + " " //$NON-NLS-1$ //$NON-NLS-2$
- + PerformanceLogger.getCurrentProductInfo(PerformanceLogger.OPTION_GET_VERSION, key));
- PerformanceLogger.start(key, "NOT_NESTED_1"); //$NON-NLS-1$
- for (i = 0; i < 1000000; i++) {
- //empty performance test loop
- }
- PerformanceLogger.stop(key);
-
- PerformanceLogger.start(key, "NESTED_ONE"); //$NON-NLS-1$
- for (i = 0; i < 500; i++) {
- //empty performance test loop
- }
- PerformanceLogger.start(key, "NESTED_ONE_CHILD"); //$NON-NLS-1$
- for (i = 0; i < 300; i++) {
- //empty performance test loop
- }
- PerformanceLogger.stop(key);
- PerformanceLogger.stop(key);
-
- PerformanceLogger.start(key, "NOT_NESTED_2"); //$NON-NLS-1$
- for (i = 0; i < 2000000; i++) {
- //empty performance test loop
- }
- PerformanceLogger.stop(key);
-
- PerformanceLogger.start(key, "NESTED_THREE"); //$NON-NLS-1$
- for (i = 0; i < 300; i++) {
- //empty performance test loop
- }
- PerformanceLogger.start(key, "NESTED_TWO_CHILD1"); //$NON-NLS-1$
- PerformanceLogger.start(key, "NESTED_TWO_CHILD2"); //$NON-NLS-1$
- for (i = 0; i < 4000; i++) {
- //empty performance test loop
- }
- PerformanceLogger.start(key, "NESTED_TWO_CHILD3"); //$NON-NLS-1$
- for (i = 0; i < 6000; i++) {
- //empty performance test loop
- }
- PerformanceLogger.stop(key);
- PerformanceLogger.stop(key);
- PerformanceLogger.stop(key);
- PerformanceLogger.stop(key);
-
- PerformanceLogger.start("ABC"); //Expect error: not registered //$NON-NLS-1$
- PerformanceLogger.start(key); //record timer in the previous registered component
- for (i = 0; i < 3000000; i++) {
- //empty performance test loop
- }
- PerformanceLogger.stop(key);
- key = PerformanceLogger.register(key); // Expect error: already registered
- PerformanceLogger.deRegister(key);
- key = PerformanceLogger.register(key);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LabelUtil.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LabelUtil.java
deleted file mode 100644
index c5a4acf91..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LabelUtil.java
+++ /dev/null
@@ -1,162 +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.logging.ui;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Provides a set of utility routines for processing mnemonics for labels that are
- * to be used in dialogs and menus.
- */
-public class LabelUtil {
-
- private final static String upperLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //$NON-NLS-1$
- private final static String lowerLetters = "abcdefghijklmnopqrstuvwxyz"; //$NON-NLS-1$
- private final static char lpar = '(';
- private final static char rpar = ')';
- private final static char trigger = '&';
-
- /**
- * The Assignment class contains the result of a mnemonic assignment.
- */
- private static class Assignment {
- private String label;
- private Character mnemonic;
- Assignment(String label, Character mnemonic) {
- this.label = label;
- this.mnemonic = mnemonic;
- }
- String getLabel() {
- return label;
- }
- Character getMnemonic() {
- return mnemonic;
- }
- boolean hasMnemonic() {
- return mnemonic != null;
- }
- }
-
- /**
- * Assigns a mnemonic to a label and adds it to the set of used mnemonic characters.
- * Used mnemonics are ignored in the search for a valid mnemonic.
- * If there are no characters in the label that can be used as mnemonics then a
- * valid mnemonic is appended to the label in parentheses.
- * If the label already has a mnemonic, its mnemonic is added to the set of used
- * mnemonics, but the label itself is unchanged.
- * @param label the label in which the mnemonic is to be discovered
- * @param used the set of Characters that cannot be used as mnemonics. This set is modified
- * by the operation if a mnemonic could be found.
- * @return the label with the mnemonic identified or the original label if a mnemonic could
- * not be found.
- */
- public static String assignMnemonic(String label, Set used) {
- Assignment result = null;
- Character c = findMnemonic(label);
- if (c != null) {
- used.add(c);
- return label;
- }
- result = assignMnemonic(label, upperLetters, used);
- if (!result.hasMnemonic()) {
- result = assignMnemonic(label, lowerLetters, used);
- if (!result.hasMnemonic()) {
- Assignment temp = assignMnemonic(upperLetters, upperLetters, used);
- if (temp.hasMnemonic()) {
- c = temp.getMnemonic();
- StringBuffer b = new StringBuffer(label.length() + 4);
- b.append(label);
- b.append(lpar);
- b.append(trigger);
- b.append(c);
- b.append(rpar);
- result = new Assignment(b.toString(), c);
- }
- }
- }
- if (result.hasMnemonic()) {
- Character mnemonic = result.getMnemonic();
- Character lower = new Character(Character.toLowerCase(mnemonic.charValue()));
- Character upper = new Character(Character.toUpperCase(mnemonic.charValue()));
- used.add(lower);
- used.add(upper);
-
- }
- return result.getLabel();
- }
-
- /**
- * This is a convenience method for constucting a "used set" by taking
- * the individual characters of a string
- * in both lower and upper cases and adding them to the set. Mnemonics are
- * not case sensitive.
- * @param s the String from which to construct the set.
- * @return the set.
- */
- public static Set usedFromString(String s) {
- Set result = new HashSet();
- char[] characters = s.toLowerCase().toCharArray();
- for (int i = 0; i < characters.length; i++) {
- result.add(new Character(characters[i]));
- }
- characters = s.toUpperCase().toCharArray();
- for (int i = 0; i < characters.length; i++) {
- result.add(new Character(characters[i]));
- }
- return result;
- }
-
- /**
- * Assigns a mnemonic to a label from a List of candidate mnemonics.
- * @param label the label in which the mnemonic is to be discovered.
- * @param candidates the String of valid candidates to use as mnemonics.
- * @param used The Set of Characters that have already been used.
- * @return the Assignment containing the new string with the mnemonic identified. If no
- * mnemonic could be assigned then the Assignment will have no mnemonic specified.
- */
- private static Assignment assignMnemonic(String label, String candidates, Set used) {
- char[] characters = label.toCharArray();
- Assignment result = new Assignment(label, null);
- for (int i = 0; i < characters.length && !result.hasMnemonic(); i++) {
- Character c = new Character(characters[i]);
- if (!used.contains(c) && candidates.indexOf(c.charValue()) >= 0) {
- StringBuffer b = new StringBuffer(label.length() + 1);
- b.append(label.substring(0, i));
- b.append(trigger);
- b.append(label.substring(i));
- result = new Assignment(b.toString(), c);
- }
- }
- return result;
- }
-
- /**
- * Finds the Character used as a mnemonic in a label
- * @param label the label to search
- * @return the Character used as the mnemonic, null if none exists.
- */
- private static Character findMnemonic(String label) {
- Character result = null;
- int i = label.indexOf(trigger);
- if (i >=0 && i < label.length() - 1) {
- result = new Character(label.charAt(i + 1));
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferenceLabels.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferenceLabels.java
deleted file mode 100644
index ff81a062a..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferenceLabels.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - 148434 Better F1 help.
- ********************************************************************************/
-package org.eclipse.rse.logging.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class LoggingPreferenceLabels extends NLS {
-
- private static String BUNDLE_NAME = "org.eclipse.rse.logging.ui.LoggingPreferenceLabels";//$NON-NLS-1$
-
- public static String LOGGING_PREFERENCE_PAGE_TOPLABEL1;
- public static String LOGGING_PREFERENCE_PAGE_TOPLABEL2;
- public static String LOGGING_PREFERENCE_PAGE_ERRORS_ONLY;
- public static String LOGGING_PREFERENCE_PAGE_WARNINGS_ERRORS;
- public static String LOGGING_PREFERENCE_PAGE_INFO_DEBUG;
- public static String LOGGING_PREFERENCE_PAGE_FULL_DEBUG;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, LoggingPreferenceLabels.class);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferenceLabels.properties b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferenceLabels.properties
deleted file mode 100644
index 9c8688def..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferenceLabels.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# =====================================
-# Remote System Logging properties file
-# =====================================
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-# Preference Page
-# ----------------
-LOGGING_PREFERENCE_PAGE_TOPLABEL1 = Specify the logging preferences for {0}
-LOGGING_PREFERENCE_PAGE_TOPLABEL2 = Logging Level
-LOGGING_PREFERENCE_PAGE_ERRORS_ONLY = Errors only
-LOGGING_PREFERENCE_PAGE_WARNINGS_ERRORS = Warnings and errors
-LOGGING_PREFERENCE_PAGE_INFO_DEBUG = Warnings, errors and information messages
-LOGGING_PREFERENCE_PAGE_FULL_DEBUG = Full debug
diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferencePage.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferencePage.java
deleted file mode 100644
index ad90c468e..000000000
--- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferencePage.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Michael Berger (IBM Canada) - 148434 Better F1 help.
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.logging.ui;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.preference.PreferenceStore;
-import org.eclipse.rse.logging.IRemoteSystemsLogging;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.swt.SWT;
-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.Group;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-
-/**
- * An abstract preference page for all remote system logging.<br/>
- * Use a subclass of this page if you need a preference page to control
- * logging.
- */
-public abstract class LoggingPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Button radioButton0;
- private Button radioButton1;
- private Button radioButton2;
- private Button radioButton3;
-
- /**
- * Creates composite control and sets the default layout data.
- *
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @return the newly-created coposite
- */
- private Composite createComposite(Composite parent, int span, int numColumns) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = span;
- composite.setLayoutData(data);
- return composite;
- }
-
- /**
- * Creates group control and sets the default layout data.
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @return the newly-created coposite
- */
- private Group createGroup(Composite parent, int span, int numColumns, String text) {
- Group group = new Group(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- group.setLayout(layout);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = span;
- group.setLayoutData(data);
- group.setText(text);
- return group;
- }
-
- /**
- * Utility method that creates a radio button instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new button
- * @param label the label for the new button
- * @return the newly-created button
- */
- private Button createRadioButton(Composite parent, String label) {
- Button button = new Button(parent, SWT.RADIO | SWT.LEFT);
- button.setText(label);
- GridData data = new GridData();
- button.setLayoutData(data);
- return button;
- }
-
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
-// private Label createLabel(Composite parent, int span, String text) {
-// Label label = new Label(parent, SWT.LEFT);
-// label.setText(text);
-// GridData data = new GridData();
-// data.horizontalSpan = span;
-// data.horizontalAlignment = GridData.FILL;
-// label.setLayoutData(data);
-// return label;
-// }
-
- /**
- * Method declared on PreferencePage
- */
- protected Control createContents(Composite parent) {
- Composite composite_tab = createComposite(parent, 1, 1);
-// String bundleName = (String)(getBundle().getHeaders().get(org.osgi.framework.Constants.BUNDLE_NAME));
-// String topLabel1 = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_TOPLABEL1;
-// topLabel1 = MessageFormat.format(topLabel1, new Object[] {bundleName});
-// createLabel(composite_tab, 1, topLabel1);
- String topLabel2 = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_TOPLABEL2;
- Group group1 = createGroup(composite_tab, 1, 1, topLabel2);
- Set used = LabelUtil.usedFromString("ad"); //$NON-NLS-1$ // the mnemonics already used on preference page (in English)
- String text = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_ERRORS_ONLY;
- radioButton0 = createRadioButton(group1, LabelUtil.assignMnemonic(text, used));
- text = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_WARNINGS_ERRORS;
- radioButton1 = createRadioButton(group1, LabelUtil.assignMnemonic(text, used));
- text = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_INFO_DEBUG;
- radioButton2 = createRadioButton(group1, LabelUtil.assignMnemonic(text, used));
- if (Logger.DEBUG) {
- text = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_FULL_DEBUG;
- radioButton3 = createRadioButton(group1, LabelUtil.assignMnemonic(text, used));
- }
- initializeValues();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, "org.eclipse.rse.logging.rsel0000"); //$NON-NLS-1$
- return composite_tab;
- }
-
- /**
- *
- */
- protected IPreferenceStore doGetPreferenceStore() {
- Bundle bundle = getBundle();
- if (bundle != null) {
- AbstractUIPlugin plugin = getPlugin();
- if (plugin != null) {
- return plugin.getPreferenceStore();
- } else {
- return new PreferenceStore();
- }
- } else {
- return new PreferenceStore();
- }
- }
-
- protected abstract AbstractUIPlugin getPlugin();
-
- private Bundle getBundle() {
- Plugin plugin = getPlugin();
- Bundle bundle = plugin.getBundle();
- return bundle;
- }
-
- /**
- * Method declared on IWorkbenchPreferencePage
- */
- public void init(IWorkbench workbench) {
- }
-
- /**
- * Initializes states of the controls using current values
- * in the preference store.
- */
- private void initializeValues() {
- IPreferenceStore store = getPreferenceStore();
- radioButton0.setSelection(false);
- radioButton1.setSelection(false);
- radioButton2.setSelection(false);
- if (null != radioButton3) radioButton3.setSelection(false);
- int choice = store.getInt(IRemoteSystemsLogging.DEBUG_LEVEL);
- switch (choice) {
- case 0:
- radioButton0.setSelection(true);
- break;
- case 1:
- radioButton1.setSelection(true);
- break;
- case 2:
- radioButton2.setSelection(true);
- break;
- case 3:
- if (null != radioButton3)
- radioButton3.setSelection(true);
- else
- radioButton2.setSelection(true);
- break;
- }
- }
-
- /**
- * Initializes states of the controls using default values
- * in the preference store.
- */
- private void initializeDefaults() {
- IPreferenceStore store = getPreferenceStore();
- radioButton0.setSelection(false);
- radioButton1.setSelection(false);
- radioButton2.setSelection(false);
- if (null != radioButton3) radioButton3.setSelection(false);
- int choice = store.getDefaultInt(IRemoteSystemsLogging.DEBUG_LEVEL);
- switch (choice) {
- case 0:
- radioButton0.setSelection(true);
- break;
- case 1:
- radioButton1.setSelection(true);
- break;
- case 2:
- radioButton2.setSelection(true);
- break;
- case 3:
- if (null != radioButton3)
- radioButton3.setSelection(true);
- else
- radioButton2.setSelection(true);
- break;
- }
- }
-
- /**
- * Method declared on PreferencePage
- */
- protected void performDefaults() {
- super.performDefaults();
- initializeDefaults();
- }
-
- /**
- * Method declared on PreferencePage
- */
- public boolean performOk() {
- storeValues();
- return true;
- }
-
- /**
- * Stores the values of the controls back to the preference store.
- */
- private void storeValues() {
- IPreferenceStore store = getPreferenceStore();
- int choice = 0;
- if (radioButton1.getSelection())
- choice = 1;
- else if (radioButton2.getSelection())
- choice = 2;
- else if (null != radioButton3 && radioButton3.getSelection()) choice = 3;
- store.setValue(IRemoteSystemsLogging.DEBUG_LEVEL, choice);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.logging/style/performancelogtohtml.xsl b/rse/plugins/org.eclipse.rse.logging/style/performancelogtohtml.xsl
deleted file mode 100644
index 629fd7a83..000000000
--- a/rse/plugins/org.eclipse.rse.logging/style/performancelogtohtml.xsl
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0"
- xmlns:xalan="http://xml.apache.org/xslt">
-
-<xsl:template match="/Benchmark">
- <html>
- <body>
- <h2><xsl:value-of select="@BenchmarkID"/></h2>
- <p>
- <xsl:for-each select="System">
- Operating system: <xsl:value-of select="@OSName"/><br />
- </xsl:for-each>
- <xsl:for-each select="_NORMALIZATION_VALUES">
- Normalization value: <xsl:value-of select="@ElapsedTime"/>
- </xsl:for-each>
- </p>
- <table border="1">
- <tr>
- <th>CallerID</th>
- <th>ElapsedTime</th>
- <th>NormalizedFactor</th>
- </tr>
- <xsl:for-each select="Task">
- <tr>
- <td><xsl:value-of select="@CallerID"/></td>
- <td><xsl:value-of select="@ElapsedTime"/></td>
- <td><xsl:value-of select="@NormalizedFactor"/></td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/.classpath b/rse/plugins/org.eclipse.rse.processes.ui/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/.cvsignore b/rse/plugins/org.eclipse.rse.processes.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/.project b/rse/plugins/org.eclipse.rse.processes.ui/.project
deleted file mode 100644
index 82980f892..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.processes.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.processes.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/HelpContexts.xml b/rse/plugins/org.eclipse.rse.processes.ui/HelpContexts.xml
deleted file mode 100644
index 284e1f84b..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/HelpContexts.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<contexts>
-<!-- New/Update Process Filter String controls... -->
-<context id="pfsd0001">
-<description>Specify a simple executable name or a generic name pattern, containing up to 2 wildcard characters <b>*</b>. For example, <b>abc*def*</b>. Specify <b>*</b> to list all executables.
-</description>
-</context>
-<context id="pfsd0002">
-<description>Specify a simple username or a generic name pattern, containing up to 2 wildcard characters <b>*</b>. For example, <b>abc*def*</b>. Specify <b>*</b> to list all users.
-</description>
-</context>
-<context id="pfsd0003">
-<description>Specify an integer group id to list all processes whose owners belong to that group.
-</description>
-</context>
-<context id="pfsd0004">
-<description>Choose one or more status types to restrict. Only processes with the selected states will be shown for this filter string.
-</description>
-</context>
-<context id="pfsd0005">
-<description>Set this to any positive long integer to show only processes with virtual memory usage greater than this value.
-</description>
-</context>
-<context id="pfsd0006">
-<description>Set this to any positive long integer to show only processes with virtual memory usage less than this value.
-</description>
-</context>
-<context id="pfsd0007">
-<description>Check this box to show only processes with virtual memory usage greater than the value specified in the Minimum VM entry field, but with no maximum VM size.
-</description>
-</context>
-<!-- REMOTE PROCESS ACTIONS: Kill action... -->
-<context id="actn0001"><description>Kill the selected process or processes. You will be prompted for the type of kill signal to be sent to the process or processes.
-</description>
-</context>
-<!-- Kill Remote Processes Dialog... -->
-<context id="dkrp0000">
-<description>Select the process or processes to which you wish to send a kill signal. Select the type of signal to be sent from the combo box. Then press OK to send the signal to the process or processes.
-</description>
-</context>
-</contexts> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index e0e7f9e18..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,36 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.processes.ui;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.processes.ui.ProcessesPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.core.resources,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.debug.core,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.jface.text,
- org.eclipse.search,
- org.eclipse.compare,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.subsystems.processes.core,
- org.eclipse.jface,
- org.eclipse.rse.services,
- org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.core.runtime,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Export-Package: org.eclipse.rse.processes.ui,
- org.eclipse.rse.processes.ui.actions,
- org.eclipse.rse.processes.ui.dialogs,
- org.eclipse.rse.processes.ui.propertypages,
- org.eclipse.rse.processes.ui.view
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/about.html b/rse/plugins/org.eclipse.rse.processes.ui/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/build.properties b/rse/plugins/org.eclipse.rse.processes.ui/build.properties
deleted file mode 100644
index 7f3c7ce07..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- HelpContexts.xml,\
- about.html,\
- icons/,\
- messageFile.dtd,\
- plugin.properties,\
- processmessages.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/dlcl16/killprocessj.gif b/rse/plugins/org.eclipse.rse.processes.ui/icons/full/dlcl16/killprocessj.gif
deleted file mode 100644
index 5cc47ff7e..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/dlcl16/killprocessj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/elcl16/killprocessj.gif b/rse/plugins/org.eclipse.rse.processes.ui/icons/full/elcl16/killprocessj.gif
deleted file mode 100644
index ef6a25d94..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/elcl16/killprocessj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess.gif b/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess.gif
deleted file mode 100644
index 7902f8115..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess_obj.gif b/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess_obj.gif
deleted file mode 100644
index 87aa144a8..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/activeprocess_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/inactiveprocess_obj.gif b/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/inactiveprocess_obj.gif
deleted file mode 100644
index c1644b2ec..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/inactiveprocess_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystem_obj.gif b/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystem_obj.gif
deleted file mode 100644
index e07b81aa6..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystem_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystemlive_obj.gif b/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystemlive_obj.gif
deleted file mode 100644
index 96a447a71..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/icons/full/obj16/processsubsystemlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/messageFile.dtd b/rse/plugins/org.eclipse.rse.processes.ui/messageFile.dtd
deleted file mode 100644
index 2f6a27b1f..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/messageFile.dtd
+++ /dev/null
@@ -1,22 +0,0 @@
-<!ELEMENT Component (Subcomponent+)>
-<!ATTLIST Component
- Abbr ID #REQUIRED
- Name CDATA #REQUIRED
->
-<!ELEMENT LevelOne (#PCDATA)>
-<!ELEMENT LevelTwo (#PCDATA)>
-<!ELEMENT Message (LevelOne, LevelTwo)>
-<!ATTLIST Message
- ID CDATA #REQUIRED
- Indicator (I | E | W | U | Q | C) #REQUIRED
->
-<!ELEMENT MessageFile (Component)>
-<!ATTLIST MessageFile
- Version CDATA #FIXED "1.0"
->
-<!ELEMENT MessageList (Message+)>
-<!ELEMENT Subcomponent (MessageList)>
-<!ATTLIST Subcomponent
- Abbr ID #REQUIRED
- Name CDATA #REQUIRED
->
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/plugin.properties b/rse/plugins/org.eclipse.rse.processes.ui/plugin.properties
deleted file mode 100644
index 70469b10e..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2005, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-
-pluginName = RSE Processes UI
-providerName = Eclipse.org
-
-Factory.LocalProcesses = Local Processes
-PropertyPage.ServerLauncherSettings = Server Launcher Settings
-PropertyPage.ServerConnectionSecurity= Server Connection Security
-PropertyPage.Service = Service \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/plugin.xml b/rse/plugins/org.eclipse.rse.processes.ui/plugin.xml
deleted file mode 100644
index 6fd76dca2..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/plugin.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-<!-- ============================================== -->
-<!-- Define subsystem configurations for processes... -->
-<!-- ============================================== -->
-<!-- let's wait until this is supported on windows
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <factory
- systemTypes="Local"
- name="%Factory.LocalProcesses"
- iconlive="icons/full/obj16/activeprocess.gif"
- icon="icons/full/obj16/activeprocess.gif"
- category="processes"
- class="org.eclipse.rse.subsystems.processes.local.LocalProcessSubSystemConfiguration"
- vendor="%providerName"
- id="local.processes">
- </factory>
- </extension>
--->
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- objectClass="org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem"
- name="%PropertyPage.ServerLauncherSettings"
- class="org.eclipse.rse.ui.propertypages.ServerLauncherPropertyPage"
- id="org.eclipse.rse.ui.propertypages.serverLauncherPropertyPage">
- <filter name="serverLaunchPP" value="true"/>
- </page>
- <page
- objectClass="org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem"
- name="%PropertyPage.Service"
- class="org.eclipse.rse.processes.ui.propertypages.ProcessServicesPropertyPage"
- id="org.eclipse.rse.processes.ui.propertypages.ProcessServicesPropertyPage">
- </page>
- </extension>
-
-<!-- ============================================ -->
-<!-- Define Help Context -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.help.contexts">
- <contexts
- file="HelpContexts.xml">
- </contexts>
- </extension>
-
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/processmessages.xml b/rse/plugins/org.eclipse.rse.processes.ui/processmessages.xml
deleted file mode 100644
index 8aef95ea7..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/processmessages.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!--
-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.
--->
-<!DOCTYPE MessageFile SYSTEM "messageFile.dtd">
-
-<MessageFile Version="1.0">
- <Component Name="Remote_System_Explorer_Processes" Abbr="RSEP">
- <Subcomponent Name="General" Abbr="G">
- <MessageList>
- <Message ID="1001" Indicator="E">
- <LevelOne>Maximum VM size must be greater than minimum VM size.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1002" Indicator="E">
- <LevelOne>You do not have permission to kill the process.</LevelOne>
- <LevelTwo>You must own the process or be root in order to kill this process.</LevelTwo>
- </Message>
- <Message ID="1003" Indicator="I">
- <LevelOne>Sending a kill signal...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1004" Indicator="I">
- <LevelOne>Sending the signal %1 to the process %2...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1300" Indicator="E">
- <LevelOne>Kill of the process %1 failed</LevelOne>
- <LevelTwo>The remote system reported the following: %2</LevelTwo>
- </Message>
- <Message ID="1301" Indicator="E">
- <LevelOne>Problem occurred during remote process query</LevelOne>
- <LevelTwo>Could not access the /proc filesystem. You might not have permission to access it.</LevelTwo>
- </Message>
- </MessageList>
- </Subcomponent>
- </Component>
-</MessageFile> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/ProcessesPlugin.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/ProcessesPlugin.java
deleted file mode 100644
index 21f490747..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/ProcessesPlugin.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.processes.ui.view.RemoteProcessSubSystemConfigurationAdapterFactory;
-import org.eclipse.rse.processes.ui.view.SystemViewProcessAdapterFactory;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class ProcessesPlugin extends SystemBasePlugin {
- //The shared instance.
- private static ProcessesPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
- private SystemViewProcessAdapterFactory svpaf;
- private static SystemMessageFile messageFile = null;
- private static SystemMessageFile defaultMessageFile = null;
-
- public static final String HELPPREFIX = "org.eclipse.rse.processes.ui.";
-
-
- /**
- * The constructor.
- */
- public ProcessesPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- messageFile = getMessageFile("processmessages.xml");
- defaultMessageFile = getDefaultMessageFile("processmessages.xml");
-
- IAdapterManager manager = Platform.getAdapterManager();
- svpaf = new SystemViewProcessAdapterFactory();
- svpaf.registerWithManager(manager);
-
- RemoteProcessSubSystemConfigurationAdapterFactory rpssfaf = new RemoteProcessSubSystemConfigurationAdapterFactory();
- rpssfaf.registerWithManager(manager);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static ProcessesPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = ProcessesPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.rse.processes.ui.SystemProcessesResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
- /**
- * Retrieve a message from this plugin's message file
- * @param msgId - the ID of the message to retrieve. This is the concatenation of the
- * message's component abbreviation, subcomponent abbreviation, and message ID as declared
- * in the message xml file.
- */
- public static SystemMessage getPluginMessage(String msgId)
- {
- SystemMessage msg = getMessage(messageFile, msgId);
- if (msg == null)
- {
- msg = getMessage(defaultMessageFile, msgId);
- }
- return msg;
- }
-
- /**
- * Load a message file for this plugin.
- * @param messageFileName - the name of the message xml file. Will look for it in this plugin's install folder.
- * @return a message file object containing the parsed contents of the message file, or null if not found.
- */
- public SystemMessageFile getMessageFile(String messageFileName)
- {
- return loadMessageFile(getBundle(), messageFileName);
- }
-
- /**
- * Load a default message file for this plugin for cases where messages haven't been translated.
- * @param messageFileName - the name of the message xml file. Will look for it in this plugin's install folder.
- * @return a message file object containing the parsed contents of the message file, or null if not found.
- */
- public SystemMessageFile getDefaultMessageFile(String messageFileName)
- {
- return loadDefaultMessageFile(getBundle(), messageFileName);
- }
-
- public ImageDescriptor getImageDescriptorFromPath(String path)
- {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.processes.ui", path);
- }
-
- /**
- * Initialize the image registry by declaring all of the required
- * graphics.
- */
- protected void initializeImageRegistry()
- {
- //String path = getIconPath();
- //putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWPROFILEWIZARD_ID,
- // path+ISystemIconConstants.ICON_SYSTEM_NEWPROFILEWIZARD);
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java
deleted file mode 100644
index 910264240..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java
+++ /dev/null
@@ -1,734 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.processes.ui;
-
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.processes.ui.view.SystemProcessStatesContentProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-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.actions.SystemTestFilterStringAction;
-import org.eclipse.rse.ui.filters.SystemFilterStringEditPane;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.validators.ValidatorIntegerInput;
-import org.eclipse.rse.ui.validators.ValidatorIntegerRangeInput;
-import org.eclipse.rse.ui.validators.ValidatorLongRangeInput;
-import org.eclipse.rse.ui.validators.ValidatorSpecialChar;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-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 SystemProcessFilterStringEditPane extends
- SystemFilterStringEditPane implements ISystemProcessRemoteConstants
-{
-
- // GUI widgets
-
- protected Label lblStatus;
- protected CheckboxTableViewer chkStatus;
- protected Label lblExeName, lblUserName, lblGid;
- protected Text txtExeName, txtUserName, txtGid;
-
- protected Label lblMinVM, lblMaxVM;
- protected Text txtMinVM, txtMaxVM;
- protected Button chkBoxUnlimitedVM;
-
- // limits
- protected int gidLimit = Integer.MAX_VALUE;
- protected long vmMaxValue = Long.MAX_VALUE;
- protected int exeNameLength = 256;
- protected int userNameLength = 256;
-
- // validators
- protected ValidatorLongRangeInput vmRangeValidator = new ValidatorLongRangeInput(0, vmMaxValue);
- protected ValidatorIntegerRangeInput gidValidator = new ValidatorIntegerRangeInput(0, gidLimit);
- protected ValidatorSpecialChar nameValidator = new ValidatorSpecialChar(" \t|", true);
-
- // inputs
- protected String[] inputFilterStrings;
-
- // state
- protected boolean noValidation = false;
- protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
- protected boolean skipUniquenessChecking;
- protected boolean calledFromVerify;
- protected boolean dontStealFocus;
- protected IRemoteProcessSubSystemConfiguration inputSubsystemConfiguration = null;
-
- // actions
- protected SystemTestFilterStringAction testAction = null;
-
- // constants
- protected final static int SIZING_SELECTION_WIDGET_HEIGHT = 90;
- protected final static int SIZING_SELECTION_WIDGET_WIDTH = 145;
-
- /**
- * Constructor for SystemProcessFilterStringEditPane.
- * @param shell
- */
- public SystemProcessFilterStringEditPane(Shell shell)
- {
- super(shell);
- ((ValidatorIntegerInput)gidValidator).setBlankAllowed(true);
- }
-
- // ------------------------------
- // INPUT/CONFIGURATION METHODS...
- // ------------------------------
-
- /**
- * Call this to override the text limit for the filter name, from the default of 256.
- */
- public void setExeNameLength(int max)
- {
- exeNameLength = max;
- if (txtExeName != null)
- txtExeName.setTextLimit(max);
- }
- /**
- * Call this to override the text limit for the filter name, from the default of 256.
- */
- public void setUserNameLength(int max)
- {
- userNameLength = max;
- if (txtUserName != null)
- txtUserName.setTextLimit(max);
- }
- /**
- * Existing strings are used to aid in uniqueness validation.
- */
- public void setExistingStrings(String[] existingStrings)
- {
- this.inputFilterStrings = existingStrings;
- }
-
- // ------------------------------
- // LIFECYCLE METHODS...
- // ------------------------------
-
- /**
- * Populate the pane with the GUI widgets
- * @param parent
- * @return Control
- */
- public Control createContents(Composite parent)
- {
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 1);
- int gridColumns = 2;
- Composite sub_prompts1 = SystemWidgetHelpers.createComposite(composite_prompts, gridColumns);
-
- // Exe name prompt
- lblExeName = SystemWidgetHelpers.createLabel(sub_prompts1, SystemProcessesResources.RESID_PROCESSFILTERSTRING_EXENAME_LABEL);
- lblExeName.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_EXENAME_TOOLTIP);
- txtExeName = SystemWidgetHelpers.createTextField(sub_prompts1, null);
- txtExeName.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_EXENAME_TOOLTIP);
-
- SystemWidgetHelpers.setHelp(txtExeName, ProcessesPlugin.HELPPREFIX+"pfsd0001");
- updateGridData(txtExeName, gridColumns-1);
- txtExeName.setText("*");
-
- // User name prompt
- lblUserName = SystemWidgetHelpers.createLabel(sub_prompts1, SystemProcessesResources.RESID_PROCESSFILTERSTRING_USERNAME_LABEL);
- lblUserName.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_USERNAME_TOOLTIP);
- txtUserName = SystemWidgetHelpers.createTextField(sub_prompts1, null);
- txtUserName.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_USERNAME_TOOLTIP);
-
- SystemWidgetHelpers.setHelp(txtUserName, ProcessesPlugin.HELPPREFIX+"pfsd0002");
- updateGridData(txtUserName, gridColumns-1);
- txtUserName.setText("*");
-
- // Group ID prompt
- lblGid = SystemWidgetHelpers.createLabel(sub_prompts1, SystemProcessesResources.RESID_PROCESSFILTERSTRING_GID_LABEL);
- lblGid.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_GID_TOOLTIP);
- txtGid = SystemWidgetHelpers.createTextField(sub_prompts1, null);
- txtGid.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_GID_TOOLTIP);
-
- SystemWidgetHelpers.setHelp(txtGid, ProcessesPlugin.HELPPREFIX+"pfsd0003");
- updateGridData(txtGid, gridColumns-1);
- txtGid.setText("*");
-
- // status checkbox table
- lblStatus = SystemWidgetHelpers.createLabel(sub_prompts1, SystemProcessesResources.RESID_PROCESSFILTERSTRING_STATUS_LABEL);
- lblStatus.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_STATUS_TOOLTIP);
- chkStatus = CheckboxTableViewer.newCheckList(sub_prompts1, SWT.BORDER);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
- data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT;
- data.widthHint = SIZING_SELECTION_WIDGET_WIDTH;
- chkStatus.getTable().setLayoutData(data);
- chkStatus.setLabelProvider(new LabelProvider());
-
- SystemWidgetHelpers.setHelp(chkStatus.getControl(), ProcessesPlugin.HELPPREFIX+"pfsd0004");
- SystemWidgetHelpers.createLabel(sub_prompts1, " ");
- addSelectionButtons(sub_prompts1);
-
- // Range prompt
- Composite subsub = SystemWidgetHelpers.createComposite(sub_prompts1, gridColumns, 3, false, null, -1, -1);
- lblMinVM = SystemWidgetHelpers.createLabel(subsub, SystemProcessesResources.RESID_PROCESSFILTERSTRING_MINVM_LABEL);
- lblMinVM.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_MINVM_TOOLTIP);
- txtMinVM = SystemWidgetHelpers.createTextField(subsub, null);
- txtMinVM.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_MINVM_TOOLTIP);
-
- SystemWidgetHelpers.setHelp(txtMinVM, ProcessesPlugin.HELPPREFIX+"pfsd0005");
- txtMinVM.setText("0");
- SystemWidgetHelpers.createLabel(subsub, " ");
-
- lblMaxVM = SystemWidgetHelpers.createLabel(subsub, SystemProcessesResources.RESID_PROCESSFILTERSTRING_MAXVM_LABEL);
- lblMaxVM.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_MAXVM_TOOLTIP);
- txtMaxVM = SystemWidgetHelpers.createTextField(subsub, null);
- txtMaxVM.setToolTipText(SystemProcessesResources.RESID_PROCESSFILTERSTRING_MAXVM_TOOLTIP);
-
- SystemWidgetHelpers.setHelp(txtMaxVM, ProcessesPlugin.HELPPREFIX+"pfsd0006");
- txtMaxVM.setEnabled(false);
-
- // Unlimited check box
- chkBoxUnlimitedVM = SystemWidgetHelpers.createCheckBox(subsub, 1, null,
- SystemProcessesResources.RESID_PROCESSFILTERSTRING_UNLIMITED_LABEL, SystemProcessesResources.RESID_PROCESSFILTERSTRING_UNLIMITED_TOOLTIP);
- SystemWidgetHelpers.setHelp(chkBoxUnlimitedVM, ProcessesPlugin.HELPPREFIX+"pfsd0007");
-
- txtExeName.setFocus();
-
- if (refProvider != null)
- inputSubsystemConfiguration = (IRemoteProcessSubSystemConfiguration)((ISubSystem)refProvider).getSubSystemConfiguration();
- else if (provider != null)
- inputSubsystemConfiguration = (IRemoteProcessSubSystemConfiguration)provider;
- IStructuredContentProvider p = new SystemProcessStatesContentProvider();
-
- chkStatus.setContentProvider(p);
- chkStatus.setInput(p.getElements(null));
-
- txtExeName.setTextLimit(exeNameLength);
- txtUserName.setTextLimit(userNameLength);
-
- resetFields();
- doInitializeFields();
-
- txtExeName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateNameInput(txtExeName);
- }
- }
- );
- txtUserName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateNameInput(txtUserName);
- }
- }
- );
- txtGid.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateGidInput();
- }
- }
- );
- txtMinVM.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (validateMinVMInput() == null)
- {
- if (!chkBoxUnlimitedVM.getSelection() && !txtMaxVM.getText().trim().equals(""))
- {
- SystemMessage message = validateMinLessThanMax();
- fireChangeEvent(message);
- }
- }
- }
- }
- );
- txtMaxVM.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (validateMaxVMInput() == null)
- {
- if (!txtMinVM.getText().trim().equals(""))
- {
- SystemMessage message = validateMinLessThanMax();
- fireChangeEvent(message);
- }
- }
- }
- }
- );
-
- chkBoxUnlimitedVM.addSelectionListener(this);
-
- return composite_prompts;
- }
-
- /**
- * Add the selection and deselection buttons to the dialog.
- * @param composite org.eclipse.swt.widgets.Composite
- */
- private void addSelectionButtons(Composite composite)
- {
- Composite buttonComposite = new Composite(composite, SWT.RIGHT);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- buttonComposite.setLayout(layout);
- GridData data =
- new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);
- data.grabExcessHorizontalSpace = true;
- composite.setData(data);
-
- //Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, WorkbenchMessages.getString("WizardTransferPage.selectAll"), false); //$NON-NLS-1$
- Button selectButton = SystemWidgetHelpers.createPushButton(buttonComposite, null,
- SystemResources.RESID_SELECTFILES_SELECTALL_BUTTON_ROOT_LABEL, SystemResources.RESID_SELECTFILES_SELECTALL_BUTTON_ROOT_TOOLTIP);
-
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- chkStatus.setAllChecked(true);
- }
- };
- selectButton.addSelectionListener(listener);
-
-
- //Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, WorkbenchMessages.getString("WizardTransferPage.deselectAll"), false); //$NON-NLS-1$
- Button deselectButton = SystemWidgetHelpers.createPushButton(buttonComposite, null,
- SystemResources.RESID_SELECTFILES_DESELECTALL_BUTTON_ROOT_LABEL, SystemResources.RESID_SELECTFILES_DESELECTALL_BUTTON_ROOT_TOOLTIP);
-
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- chkStatus.setAllChecked(false);
- }
- };
- deselectButton.addSelectionListener(listener);
- }
-
- private void updateGridData(Control widget, int gridColumns)
- {
- GridData data = (GridData)widget.getLayoutData();
- data.horizontalSpan = gridColumns;
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = GridData.HORIZONTAL_ALIGN_BEGINNING;
- }
-
- /**
- * Return the control to recieve initial focus. Should be overridden if you override createContents
- */
- public Control getInitialFocusControl()
- {
- return txtExeName;
- }
-
- /**
- * Override of parent.
- * Called after reset fields, at first create time or when input is reset to a non-null value.
- */
- protected void doInitializeFields()
- {
- if (txtExeName == null) return;
-
- if (inputFilterString != null)
- {
- HostProcessFilterImpl rffs = new HostProcessFilterImpl(inputFilterString);
- String defaultExeName = rffs.getName();
- txtExeName.setText((defaultExeName==null) ? "" : defaultExeName);
- String defaultUserName = rffs.getUsername();
- txtUserName.setText((defaultUserName==null) ? "" : defaultUserName);
-
- String defaultGid = rffs.getGid();
- txtGid.setText((defaultGid==null) ? "" : defaultGid);
- String defaultMinVM = rffs.getMinVM();
- txtMinVM.setText((defaultMinVM==null) ? "" : defaultMinVM);
- String defaultMaxVM = rffs.getMaxVM();
- if (defaultMaxVM.equals("-1") || defaultMaxVM == null)
- {
- txtMaxVM.setText("");
- txtMaxVM.setEnabled(false);
- chkBoxUnlimitedVM.setEnabled(true);
- chkBoxUnlimitedVM.setSelection(true);
- }
- else
- {
- txtMaxVM.setEnabled(true);
- chkBoxUnlimitedVM.setEnabled(false);
- txtMaxVM.setText(defaultMaxVM);
- }
-
- chkStatus.setAllChecked(rffs.getAnyStatus());
-
- String[] stateTypes = SystemProcessStatesContentProvider.getStates();
- for (int i = 0; i < ALL_STATES_STR.length; i++)
- {
- chkStatus.setChecked(stateTypes[i], rffs.getSpecificState(ALL_STATES_STR[i]));
- }
- }
- }
- /**
- * This is called in the change filter dialog when the user selects "new", or selects another string.
- * You must override this if you override createContents. Be sure to test if the contents have even been created yet!
- */
- protected void resetFields()
- {
- if (txtExeName == null)
- return;
- txtExeName.setText("*");
- txtUserName.setText("*");
- txtGid.setText("");
- txtMinVM.setText("0");
- txtMaxVM.setText("");
- chkBoxUnlimitedVM.setSelection(true);
- txtMaxVM.setEnabled(false);
- chkBoxUnlimitedVM.setEnabled(true);
- chkStatus.setAllChecked(false);
- }
-
- /**
- * Must be overridden if createContents is overridden.
- * <p>
- * This is called by the isComplete, to decide if the default information
- * is complete enough to enable finish. It doesn't do validation, that will be done when
- * finish is pressed.
- */
- protected boolean areFieldsComplete()
- {
- if (txtExeName == null) return false;
- else return true;
- }
-
- /**
- * Completes processing of the wizard page or dialog. If this
- * method returns true, the wizard/dialog will close;
- * otherwise, it will stay active.
- *
- * @return error, if there is one
- */
- public SystemMessage verify()
- {
- errorMessage = null;
- Control controlInError = null;
- calledFromVerify = true;
- skipEventFiring = true;
-
- errorMessage = validateNameInput(txtExeName);
- if (errorMessage != null)
- controlInError = txtExeName;
-
- errorMessage = validateNameInput(txtUserName);
- if (errorMessage != null)
- controlInError = txtUserName;
-
- errorMessage = validateGidInput();
- if (errorMessage != null)
- controlInError = txtGid;
-
- errorMessage = validateMinVMInput();
- if (errorMessage != null)
- controlInError = txtMinVM;
-
- if (errorMessage == null)
- {
- if (!chkBoxUnlimitedVM.getSelection())
- {
- errorMessage = validateMaxVMInput();
- if (errorMessage == null)
- {
- errorMessage = validateMinLessThanMax();
- }
- }
- if (errorMessage != null)
- controlInError = txtMaxVM;
-
- }
- if ((errorMessage == null) && (inputFilterStrings!=null) && !skipUniquenessChecking)
- {
- boolean notUnique = false;
- String currFilterString = getFilterString();
- if (containsFilterString(currFilterString))
- notUnique = true;
- if (notUnique)
- {
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString);
- }
- controlInError = txtExeName;
- }
-
- if (errorMessage != null)
- {
- if (!dontStealFocus)
- controlInError.setFocus();
- }
-
- calledFromVerify = false;
- skipEventFiring = false;
- fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- /*
- *
- */
- private boolean containsFilterString(String newString)
- {
- if (inputFilterStrings == null)
- return false;
- else
- {
- for (int idx=0; idx<inputFilterStrings.length; idx++)
- {
- if (inputFilterStrings[idx].equals(newString))
- return true;
- }
- }
- return false;
- }
-
- // ---------------------------------------------
- // METHODS FOR VERIFYING INPUT PER KEYSTROKE ...
- // ---------------------------------------------
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateNameInput(Text txt)
- {
- if (noValidation || ignoreChanges)
- return null;
-
- errorMessage = null;
-
- if (nameValidator != null)
- {
- errorMessage = nameValidator.validate(txt.getText().trim());
- }
-
- fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateGidInput()
- {
- if (noValidation || ignoreChanges)
- return null;
-
- errorMessage = null;
-
- if (gidValidator != null)
- {
- errorMessage = gidValidator.validate(txtGid.getText().trim());
- }
-
- fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateMinVMInput()
- {
- if (noValidation || ignoreChanges)
- return null;
-
- errorMessage = null;
-
- if (vmRangeValidator != null)
- {
- errorMessage = vmRangeValidator.validate(txtMinVM.getText().trim());
- }
-
- fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateMaxVMInput()
- {
- if (noValidation || ignoreChanges || chkBoxUnlimitedVM.getSelection())
- return null;
-
- errorMessage = null;
-
- if (vmRangeValidator != null)
- {
- errorMessage = vmRangeValidator.validate(txtMaxVM.getText().trim());
- }
-
- fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateMinLessThanMax()
- {
- long minVM = 0;
- long maxVM = 0;
- try
- {
- minVM = Long.parseLong(txtMinVM.getText());
- maxVM = Long.parseLong(txtMaxVM.getText());
- }
- catch (Exception e)
- {
- return null;
- }
- if (maxVM < minVM)
- {
- return ProcessesPlugin.getPluginMessage("RSEPG1001");
- }
- return null;
- }
- // ------------------------------
- // DATA EXTRACTION METHODS
- // ------------------------------
-
- /**
- * Get the filter string in its current form.
- * This should be overridden if createContents is overridden.
- */
- public String getFilterString()
- {
- if (txtExeName == null)
- return inputFilterString;
-
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
-
- String exeName = txtExeName.getText().trim();
- if (!exeName.equals("")) rpfs.setName(exeName);
-
- String userName = txtUserName.getText().trim();
- if (!userName.equals("")) rpfs.setUsername(userName);
-
- String gid = txtGid.getText().trim();
- if (!gid.equals("")) rpfs.setGid(gid);
-
- String minVM = txtMinVM.getText().trim();
- if (!minVM.equals("")) rpfs.setMinVM(minVM);
-
- if (chkBoxUnlimitedVM.getSelection())
- {
- rpfs.setMaxVM("-1");
- }
- else
- {
- String maxVM = txtMaxVM.getText().trim();
- if (!maxVM.equals("")) rpfs.setMaxVM(maxVM);
- }
-
- String[] stateStrings = SystemProcessStatesContentProvider.getStates();
- for (int i = 0; i < ALL_STATES_STR.length; i++)
- {
- if (chkStatus.getChecked(stateStrings[i])) rpfs.setSpecificState(ALL_STATES_STR[i]);
- }
- return rpfs.toString();
- }
-
- // ------------------
- // EVENT LISTENERS...
- // ------------------
-
- /**
- * User has selected something
- */
- public void widgetSelected(SelectionEvent event)
- {
- Object src = event.getSource();
- dontStealFocus = true;
- if (src == chkBoxUnlimitedVM)
- {
- txtMaxVM.setEnabled(!chkBoxUnlimitedVM.getSelection());
- if (!chkBoxUnlimitedVM.getSelection())
- {
- txtMaxVM.setFocus();
- if (validateMaxVMInput() == null)
- {
- if (!txtMinVM.getText().trim().equals(""))
- {
- SystemMessage message = validateMinLessThanMax();
- fireChangeEvent(message);
- }
- }
- }
- else verify();
- }
- dontStealFocus = false;
- }
-
- /**
- * Called by us or by owning dialog when common Test button is pressed
- */
- public void processTest(Shell shell)
- {
- if (refProvider == null)
- {
- SystemBasePlugin.logWarning("Programming Error: input subsystem is not set");
- return;
- }
- skipUniquenessChecking = true;
- if (verify() == null)
- {
- SystemTestFilterStringAction testAction = new SystemTestFilterStringAction(getShell());
- testAction.setSubSystem((ISubSystem)refProvider);
- testAction.setFilterString(getFilterString());
- try
- {
- testAction.run();
- }
- catch (Exception exc)
- {
-
- SystemMessage msg = SystemMessageDialog.getExceptionMessage(getShell(), exc);
- fireChangeEvent(msg);
- }
- }
- skipUniquenessChecking = false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessesResources.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessesResources.java
deleted file mode 100644
index 246fb90ad..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessesResources.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SystemProcessesResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.processes.ui.SystemProcessesResources";
-
- // -------------------------
- // ACTIONS...
- // -------------------------
- public static String ACTION_NEWPROCESSFILTER_LABEL;
- public static String ACTION_NEWPROCESSFILTER_TOOLTIP;
-
- public static String ACTION_UPDATEFILTER_LABEL;
- public static String ACTION_UPDATEFILTER_TOOLTIP;
-
- public static String ACTION_KILLPROCESS_LABEL;
- public static String ACTION_KILLPROCESS_TOOLTIP;
-
- // -------------------------
- // WIZARDS...
- // -------------------------
-
- // New System process Filter wizard...
- public static String RESID_NEWPROCESSFILTER_PAGE1_TITLE;
- public static String RESID_NEWPROCESSFILTER_PAGE1_DESCRIPTION;
-
- // Change process filter
- public static String RESID_CHGPROCESSFILTER_TITLE;
-
- // Process Filter String Re-Usable form (used in dialog and wizard)
-
- public static String RESID_PROCESSFILTERSTRING_EXENAME_LABEL;
- public static String RESID_PROCESSFILTERSTRING_USERNAME_LABEL;
- public static String RESID_PROCESSFILTERSTRING_GID_LABEL;
- public static String RESID_PROCESSFILTERSTRING_MINVM_LABEL;
- public static String RESID_PROCESSFILTERSTRING_MAXVM_LABEL;
- public static String RESID_PROCESSFILTERSTRING_UNLIMITED_LABEL;
- public static String RESID_PROCESSFILTERSTRING_STATUS_LABEL;
-
- public static String RESID_PROCESSFILTERSTRING_EXENAME_TOOLTIP;
- public static String RESID_PROCESSFILTERSTRING_USERNAME_TOOLTIP;
- public static String RESID_PROCESSFILTERSTRING_GID_TOOLTIP;
- public static String RESID_PROCESSFILTERSTRING_MINVM_TOOLTIP;
- public static String RESID_PROCESSFILTERSTRING_MAXVM_TOOLTIP;
- public static String RESID_PROCESSFILTERSTRING_UNLIMITED_TOOLTIP;
- public static String RESID_PROCESSFILTERSTRING_STATUS_TOOLTIP;
-
- // Warnings
- public static String RESID_KILL_WARNING_LABEL;
- public static String RESID_KILL_WARNING_TOOLTIP;
-
- // KILL Process dialog
- public static String RESID_KILL_TITLE;
- public static String RESID_KILL_PROMPT;
- public static String RESID_KILL_PROMPT_SINGLE;
- public static String RESID_KILL_BUTTON;
- public static String RESID_KILL_TIP;
- public static String RESID_KILL_SIGNAL_TYPE_LABEL;
- public static String RESID_KILL_SIGNAL_TYPE_TOOLTIP;
- public static String RESID_KILL_SIGNAL_TYPE_DEFAULT;
- public static String RESID_KILL_COLHDG_EXENAME;
- public static String RESID_KILL_COLHDG_PID;
-
- // Remote Processes dialog
- public static String RESID_REMOTE_PROCESSES_EXECUTABLE_LABEL;
- public static String RESID_REMOTE_PROCESSES_EXECUTABLE_TOOLTIP;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemProcessesResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessesResources.properties b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessesResources.properties
deleted file mode 100644
index d6c85ab73..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessesResources.properties
+++ /dev/null
@@ -1,81 +0,0 @@
-################################################################################
-# Copyright (c) 2005, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-#=============================================================
-# PROCESS SUBSYSTEM ACTIONS...
-#=============================================================
-ACTION_NEWPROCESSFILTER_LABEL=Filter...
-ACTION_NEWPROCESSFILTER_TOOLTIP=Create a new process filter
-ACTION_UPDATEFILTER_LABEL=Change...
-ACTION_UPDATEFILTER_TOOLTIP=Change this filter's name or contents
-ACTION_KILLPROCESS_LABEL=Kill...
-ACTION_KILLPROCESS_TOOLTIP=Send this process a kill signal
-
-#=============================================================
-# NEW PROCESS FILTER WIZARD...
-#=============================================================
-RESID_NEWPROCESSFILTER_PAGE1_TITLE=Process Filter
-RESID_NEWPROCESSFILTER_PAGE1_DESCRIPTION=Create a process filter
-
-RESID_PROCESSFILTERSTRING_EXENAME_LABEL=Executable Name
-RESID_PROCESSFILTERSTRING_USERNAME_LABEL=User Name
-RESID_PROCESSFILTERSTRING_GID_LABEL=Group ID
-RESID_PROCESSFILTERSTRING_MINVM_LABEL=Minimum VM Size (kB)
-RESID_PROCESSFILTERSTRING_MAXVM_LABEL=Maximum VM Size (kB)
-RESID_PROCESSFILTERSTRING_UNLIMITED_LABEL=Unlimited
-RESID_PROCESSFILTERSTRING_STATUS_LABEL=Status
-
-RESID_PROCESSFILTERSTRING_EXENAME_TOOLTIP=The name of the executable owning the process
-RESID_PROCESSFILTERSTRING_USERNAME_TOOLTIP=The name of the user owning the process
-RESID_PROCESSFILTERSTRING_GID_TOOLTIP=The group id of the user owning the process
-RESID_PROCESSFILTERSTRING_MINVM_TOOLTIP=The minimum virtual memory size used by the process
-RESID_PROCESSFILTERSTRING_MAXVM_TOOLTIP=The maximum virtual memory size used by the process
-RESID_PROCESSFILTERSTRING_UNLIMITED_TOOLTIP=No limit to virtual memory size
-RESID_PROCESSFILTERSTRING_STATUS_TOOLTIP=The current status of the process
-
-#=============================================================
-# CHANGE FILE FILTER DIALOG...
-#=============================================================
-RESID_CHGPROCESSFILTER_TITLE=Change Process Filter
-
-#=============================================================
-# KILL PROCESS WARNING...
-#=============================================================
-RESID_KILL_WARNING_LABEL=WARNING! Terminating or interrupting a remote process can cause\nsystem instability and other undesirable effects!
-RESID_KILL_WARNING_TOOLTIP=You are confirming that a signal will be sent to the remote process(es). This action cannot be undone
-
-#=============================================================
-# KILL PROCESS DIALOG
-#=============================================================
-RESID_KILL_TITLE=Send a kill signal
-RESID_KILL_PROMPT=Kill selected processes?
-RESID_KILL_PROMPT_SINGLE=Kill selected process?
-RESID_KILL_BUTTON=Kill
-RESID_KILL_TIP=Confirm kill request
-RESID_KILL_SIGNAL_TYPE_LABEL=Signal Type
-RESID_KILL_SIGNAL_TYPE_TOOLTIP=The type of kill signal to send to the process
-RESID_KILL_SIGNAL_TYPE_DEFAULT=default
-RESID_KILL_COLHDG_EXENAME=Executable Name
-RESID_KILL_COLHDG_PID=Process ID
-
-#=============================================================
-# REMOTE PROCESSES DIALOG
-#=============================================================
-RESID_REMOTE_PROCESSES_EXECUTABLE_LABEL=Executable
-RESID_REMOTE_PROCESSES_EXECUTABLE_TOOLTIP=Name of executable \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemKillProcessAction.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemKillProcessAction.java
deleted file mode 100644
index 2ceb0bcd1..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemKillProcessAction.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.processes.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-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.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.processes.ui.ProcessesPlugin;
-import org.eclipse.rse.processes.ui.SystemProcessesResources;
-import org.eclipse.rse.processes.ui.dialogs.SystemKillDialog;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemKillProcessAction extends SystemBaseDialogAction implements IRunnableWithProgress
-{
-
- protected Exception runException = null;
- protected Object[] processesDeathRow;
- protected boolean killedOk = true;
- protected String signalType = null;
-
- /**
- * Constructor for subclass
- */
- public SystemKillProcessAction(Shell shell)
- {
- super(SystemProcessesResources.ACTION_KILLPROCESS_LABEL,
- SystemProcessesResources.ACTION_KILLPROCESS_TOOLTIP,
- ProcessesPlugin.getDefault().getImageDescriptorFromPath("/icons/full/elcl16/killprocessj.gif"),
- shell);
- allowOnMultipleSelection(true);
- setProcessAllSelections(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(ProcessesPlugin.HELPPREFIX+"actn0001");
- setDialogHelp(ProcessesPlugin.HELPPREFIX+"dkrp0000");
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We simply ensure every selected object is an IRemoteProcess
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (!(selectedObject instanceof IRemoteProcess))
- enable = false;
- }
- return enable;
- }
-
- /**
- * Required by parent.
- * It is up to the caller to call wasCancelled() and if not true, do their own killing.
- */
- protected Object getDialogValue(Dialog dlg)
- {
- SystemKillDialog killDlg = (SystemKillDialog)dlg;
- if (!killDlg.wasCancelled())
- signalType = killDlg.getSignal();
- if (signalType.equals(SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_DEFAULT))
- signalType = ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT;
- if (signalType != null)
- {
- IRunnableContext runnableContext = getRunnableContext();
- try
- {
- runnableContext.run(false,false,this); // inthread, cancellable, IRunnableWithProgress
- }
- catch (java.lang.reflect.InvocationTargetException exc) // unexpected error
- {
- showOperationMessage((Exception)exc.getTargetException(), getShell());
- }
- catch (Exception exc)
- {
- showOperationMessage(exc, getShell());
- }
- }
- return null;
- }
-
-
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to create and return
- * the dialog that is displayed by the default run method
- * implementation.
- * <p>
- * If you override run with your own, then
- * simply implement this to return null as it won't be used.
- * @see #run()
- */
- protected Dialog createDialog(Shell shell)
- {
- SystemKillDialog dlg = new SystemKillDialog(shell);
- return dlg;
- }
-
- /**
- * Get an IRunnable context to show progress in. If there is currently a dialog or wizard up with
- * a progress monitor in it, we will use this, else we will create a progress monitor dialog.
- */
- protected IRunnableContext getRunnableContext()
- {
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IRunnableContext irc = sr.getRunnableContext();
- if (irc == null)
- irc = new ProgressMonitorDialog(getShell());
- return irc;
- }
-
- // ----------------------------------
- // INTERNAL METHODS...
- // ----------------------------------
- /**
- * Method required by IRunnableWithProgress interface.
- * Allows execution of a long-running operation modally by via a thread.
- * In our case, it runs the kill operation with a visible progress monitor
- */
- public void run(IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- SystemMessage msg = getKillingMessage();
- runException = null;
- populateSelectedObjects();
-
- try
- {
- int steps = processesDeathRow.length;
- monitor.beginTask(msg.getLevelOneText(), steps);
- killedOk = true;
- IRemoteProcess currentProcess = null;
- for (int idx=0; killedOk && (idx<steps); idx++)
- {
- currentProcess = (IRemoteProcess) processesDeathRow[idx];
- if (signalType.equals(SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_DEFAULT))
- signalType = ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT;
- monitor.subTask(getKillingMessage(signalType, currentProcess.getName()).getLevelOneText());
- killedOk = doKill(monitor, signalType, currentProcess);
- monitor.worked(1);
- }
- monitor.done();
- }
- catch(java.lang.InterruptedException exc)
- {
- monitor.done();
- runException = exc;
- throw (java.lang.InterruptedException)runException;
- }
- catch(Exception exc)
- {
- monitor.done();
- runException = new java.lang.reflect.InvocationTargetException(exc);
- throw (java.lang.reflect.InvocationTargetException)runException;
- }
- killComplete();
- }
-
- /**
- * @param monitor Usually not needed
- * @param signal the signal to be sent to the remote process
- * @param process the process to send the signal to
- */
- protected boolean doKill(IProgressMonitor monitor, String signal, IRemoteProcess process)
- throws Exception
- {
-
- IRemoteProcessSubSystem ss;
- boolean ok = false;
- ss = process.getParentRemoteProcessSubSystem();
-
- ok = ss.kill(process, signal);
- if (!ok)
- {
- SystemMessage msg = ProcessesPlugin.getPluginMessage("RSEPG1300");
- msg.makeSubstitution(process.getName());
- throw new SystemMessageException(msg);
- }
- return ok;
- }
-
- /**
- * Called after all the copy/move operations end, be it successfully or not.
- * Your opportunity to display completion or do post-copy selections/refreshes
- */
- public void killComplete()
- {
- if (processesDeathRow.length == 0)
- return;
-
- // refresh all instances of this parent, and all affected filters...
- ISubSystem processSS = ((IRemoteProcess)processesDeathRow[0]).getParentRemoteProcessSubSystem();
-
- List results = getAffectedFilters(processesDeathRow, processSS);
-
-
- // update the ui
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- for (int i = 0; i < results.size(); i++)
- {
- ISystemFilterReference ref = (ISystemFilterReference)results.get(i);
- ref.markStale(true);
- registry.fireEvent(new SystemResourceChangeEvent(ref, ISystemResourceChangeEvents.EVENT_CHANGE_CHILDREN,ref));
- }
-
-
- }
-
- /**
- * Returns a list of all the filters that are affected by killing the objects in processesDeathRow.
- * @param processesDeathRow the objects that will be sent a kill signal
- * @param subSystem the subsystem to search
- * @return a list of the affected filters
- */
- protected List getAffectedFilters(Object[] processesDeathRow, ISubSystem subSystem)
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- List result = new ArrayList();
- for (int i = 0; i < processesDeathRow.length; i++)
- {
- List refs = registry.findFilterReferencesFor(processesDeathRow[i], subSystem);
-
- result.addAll(refs);
- }
-
- return result;
- }
-
-
- protected void populateSelectedObjects()
- {
- IStructuredSelection selection = getSelection();
- Iterator e = selection.iterator();
- Vector v = new Vector();
- while (e.hasNext())
- {
- v.add(e.next());
- }
- processesDeathRow = v.toArray();
- }
-
- protected SystemMessage getKillingMessage()
- {
- return ProcessesPlugin.getPluginMessage("RSEPG1003");
- }
- /**
- * Get the specific "kill" message
- */
- protected SystemMessage getKillingMessage(String signal, String processName)
- {
- SystemMessage msg = null;
- msg = ProcessesPlugin.getPluginMessage("RSEPG1004");
- msg.makeSubstitution(signal, processName);
- return msg;
- }
-
- /**
- * Helper method to show an error message resulting from the attempted operation.
- */
- protected void showOperationMessage(Exception exc, Shell shell)
- {
- if (exc instanceof java.lang.InterruptedException)
- showOperationCancelledMessage(shell);
- else if (exc instanceof java.lang.reflect.InvocationTargetException)
- showOperationErrorMessage(shell, ((java.lang.reflect.InvocationTargetException)exc).getTargetException());
- else
- showOperationErrorMessage(shell, exc);
- }
-
- /**
- * Show an error message when the operation fails.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showOperationErrorMessage(Shell shell, Throwable exc)
- {
- if (exc instanceof SystemMessageException)
- showOperationErrorMessage(shell, (SystemMessageException)exc);
- else
- {
- String msg = exc.getMessage();
- if ((msg == null) || (exc instanceof ClassCastException))
- msg = exc.getClass().getName();
- SystemMessageDialog msgDlg =
- new SystemMessageDialog(shell,
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED).makeSubstitution(msg));
- msgDlg.setException(exc);
- msgDlg.open();
- }
- }
- /**
- * Show an error message when the operation fails.
- * Shows a SystemMessage that was encapsulated in a SystemMessage exception
- * Overridable.
- */
- protected void showOperationErrorMessage(Shell shell, SystemMessageException exc)
- {
- SystemMessage msg = exc.getSystemMessage();
- SystemMessageDialog msgDlg =
- new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
-
- /**
- * Show an error message when the user cancels the operation.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showOperationCancelledMessage(Shell shell)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED));
- msgDlg.open();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemNewProcessFilterAction.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemNewProcessFilterAction.java
deleted file mode 100644
index d77a8effb..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemNewProcessFilterAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.processes.ui.actions;
-
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.processes.ui.SystemProcessFilterStringEditPane;
-import org.eclipse.rse.processes.ui.SystemProcessesResources;
-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;
-
-
-public class SystemNewProcessFilterAction extends SystemNewFilterAction implements ISystemIconConstants
-{
-
- /**
- * Constructor
- */
- public SystemNewProcessFilterAction(Shell shell, ISystemFilterPool parentPool)
-
- {
- super(shell, parentPool, SystemProcessesResources.ACTION_NEWPROCESSFILTER_LABEL,
- SystemProcessesResources.ACTION_NEWPROCESSFILTER_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(ICON_SYSTEM_NEWFILTER_ID));
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0042");
- setDialogHelp(RSEUIPlugin.HELPPREFIX+"wnfr0000");
- }
-
- /**
- * Set the parent filter pool that the new-filter actions need.
- */
- public void setParentFilterPool(ISystemFilterPool parentPool)
- {
- this.parentPool = parentPool;
- }
- /**
- * Parent intercept.
- * <p>
- * Overridable extension. For those cases when you don't want to create your
- * own wizard subclass, but prefer to simply configure the default wizard.
- * <p>
- * Note, at the point this is called, all the base configuration, based on the
- * setters for this action, have been called.
- * <p>
- * We do it here versus via setters as it defers some work until the user actually
- * selects this action.
- */
- protected void configureNewFilterWizard(SystemNewFilterWizard wizard)
- {
- // configuration that used to only be possible via subclasses...
- wizard.setWizardPageTitle(SystemProcessesResources.RESID_NEWPROCESSFILTER_PAGE1_TITLE);
- wizard.setWizardImage(RSEUIPlugin.getDefault().getImageDescriptor(ICON_SYSTEM_NEWFILTERWIZARD_ID));
- wizard.setPage1Description(SystemProcessesResources.RESID_NEWPROCESSFILTER_PAGE1_DESCRIPTION);
- wizard.setFilterStringEditPane(new SystemProcessFilterStringEditPane(wizard.getShell()));
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemProcessUpdateFilterAction.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemProcessUpdateFilterAction.java
deleted file mode 100644
index 2b614723c..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/actions/SystemProcessUpdateFilterAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.processes.ui.actions;
-
-import org.eclipse.rse.processes.ui.SystemProcessFilterStringEditPane;
-import org.eclipse.rse.processes.ui.SystemProcessesResources;
-import org.eclipse.rse.ui.filters.actions.SystemChangeFilterAction;
-import org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class SystemProcessUpdateFilterAction extends SystemChangeFilterAction
-{
-
- /**
- * Constructor
- */
- public SystemProcessUpdateFilterAction(Shell parent)
- {
- super(parent, SystemProcessesResources.ACTION_UPDATEFILTER_LABEL, SystemProcessesResources.ACTION_UPDATEFILTER_TOOLTIP);
- setDialogTitle(SystemProcessesResources.RESID_CHGPROCESSFILTER_TITLE);
- }
- /**
- * Overridable extension point to configure the filter dialog. Typically you don't need
- * to subclass our default dialog.
- */
- protected void configureFilterDialog(SystemChangeFilterDialog dlg)
- {
- // it is cheaper to do this here, as it defers instantiation of the edit pane until the
- // user actually runs the action!
- Shell shell = dlg.getShell();
- if (shell == null)
- shell = dlg.getParentShell();
-
- dlg.setFilterStringEditPane(new SystemProcessFilterStringEditPane(shell));
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/RemoteProcessesDialog.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/RemoteProcessesDialog.java
deleted file mode 100644
index fecf7e6f9..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/RemoteProcessesDialog.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui.dialogs;
-
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.processes.ui.SystemProcessesResources;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.view.SystemTableView;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- *
- * @author dmcknigh
- *
- */
-public class RemoteProcessesDialog extends SystemPromptDialog implements KeyListener
-{
- private Text _nameFilterText;
- private SystemTableView _viewer;
- private IRemoteProcessSubSystem _subSystem;
- private String _executableFilter;
- private Table _table;
- private IHostProcess _selected;
-
- public RemoteProcessesDialog(Shell shell, String title, IRemoteProcessSubSystem subSystem, String executableFilter)
- {
- super(shell, title);
- _subSystem = subSystem;
- _executableFilter = executableFilter;
- }
-
- protected Control createInner(Composite parent)
- {
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- parent.setLayout(gridLayout);
-
- _nameFilterText = SystemWidgetHelpers.createLabeledTextField(parent, this, SystemProcessesResources.RESID_REMOTE_PROCESSES_EXECUTABLE_LABEL, SystemProcessesResources.RESID_REMOTE_PROCESSES_EXECUTABLE_TOOLTIP);
- _nameFilterText.addKeyListener(this);
-
- // create table portion
- _table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- _viewer = new SystemTableView(_table,this);
-
-
- _viewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
- {
- //handleDoubleClick(event);
- }
- });
-
-
- SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "ucmd0000");
-
- TableLayout layout = new TableLayout();
- _table.setLayout(layout);
- _table.setHeaderVisible(false);
- _table.setLinesVisible(false);
-
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- gridData.heightHint = 200;
- gridData.widthHint = 400;
- _table.setLayoutData(gridData);
- init();
- return _table;
- }
-
- protected Control getInitialFocusControl()
- {
- // TODO Auto-generated method stub
- return _viewer.getControl();
- }
-
-
- public void doubleClick(DoubleClickEvent event)
- {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null)
- return;
- processOK();
- close();
- }
-
-
- protected boolean processOK()
- {
- StructuredSelection sel = (StructuredSelection)_viewer.getSelection();
- IRemoteProcess proc = (IRemoteProcess)sel.getFirstElement();
- if (proc != null)
- {
- _selected = proc;
- }
- return true;
- }
-
- public IHostProcess getSelected()
- {
- return _selected;
- }
-
- protected void init()
- {
- _nameFilterText.setText(_executableFilter);
- Object[] filters = _subSystem.getChildren();
-
- ISystemFilterReference ref = (ISystemFilterReference)filters[0];
- ref.markStale(true);
- updateViewFilter();
- _viewer.setInput(ref);
- }
-
- protected void updateViewFilter()
- {
- if (_executableFilter.indexOf("*") == -1)
- _executableFilter += "*";
- String[] viewFilters = {_executableFilter};
- _viewer.setViewFilters(viewFilters);
- }
-
- public void keyPressed(KeyEvent e)
- {
- }
-
- public void keyReleased(KeyEvent e)
- {
- if (e.widget == _nameFilterText)
- {
- if (!_nameFilterText.getText().equals(_executableFilter))
- {
- _executableFilter = _nameFilterText.getText();
- updateViewFilter();
- }
- }
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillDialog.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillDialog.java
deleted file mode 100644
index 197ff5cc2..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillDialog.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui.dialogs;
-
-import org.eclipse.jface.viewers.ColumnLayoutData;
-import org.eclipse.jface.viewers.ColumnPixelData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.processes.ui.ProcessesPlugin;
-import org.eclipse.rse.processes.ui.SystemProcessesResources;
-import org.eclipse.rse.processes.ui.view.ISystemProcessPropertyConstants;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Combo;
-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.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-
-/**
- * Dialog for confirming killing of a process or group of processes. User
- * selects the type of signal to be sent to the process.
- */
-public class SystemKillDialog extends SystemPromptDialog
-{
- private String warningMessage = SystemProcessesResources.RESID_KILL_WARNING_LABEL;
- private String warningTip = SystemProcessesResources.RESID_KILL_WARNING_TOOLTIP;
- private String promptLabel;
- private SystemKillTableProvider sktp;
- //private Label prompt;
- private Table table;
- private TableViewer tableViewer;
- private GridData tableData;
- private Combo cmbSignal;
- private String signalType;
-
- // column headers
- private String columnHeaders[] = {
- "",
- SystemProcessesResources.RESID_KILL_COLHDG_EXENAME,
- SystemProcessesResources.RESID_KILL_COLHDG_PID
- };
-
- // column layout
- private ColumnLayoutData columnLayouts[] =
- {
- new ColumnPixelData(19, false),
- new ColumnWeightData(150,150,true),
- new ColumnWeightData(120,120,true)
- };
-
- // give each column a property value to identify it
- private static String[] tableColumnProperties =
- {
- ISystemPropertyConstants.P_OK,
- ISystemProcessPropertyConstants.P_PROCESS_NAME,
- ISystemProcessPropertyConstants.P_PROCESS_PID,
- };
-
- /**
- * Constructor for SystemKillDialog
- */
- public SystemKillDialog(Shell shell)
- {
- super(shell, SystemProcessesResources.RESID_KILL_TITLE);
- super.setOkButtonLabel(SystemProcessesResources.RESID_KILL_BUTTON);
- setHelp(ProcessesPlugin.HELPPREFIX+"dkrp0000");
- }
-
- /**
- * Create message line. Intercept so we can set msg line of form.
- */
- protected ISystemMessageLine createMessageLine(Composite c)
- {
- super.createMessageLine(c);
- return fMessageLine;
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return tableViewer.getControl();
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int nbrColumns = 2;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // PROMPT
- if (promptLabel == null) {
- Object input = getInputObject();
-
- if (input != null && input instanceof IStructuredSelection) {
- int size = ((IStructuredSelection)input).size();
-
- if (size > 1) {
- /*prompt =*/ SystemWidgetHelpers.createLabel(composite, SystemProcessesResources.RESID_KILL_PROMPT, nbrColumns);
- }
- else {
- /*prompt =*/ SystemWidgetHelpers.createLabel(composite, SystemProcessesResources.RESID_KILL_PROMPT_SINGLE, nbrColumns);
- }
- }
- // should never get here
- else {
- /*prompt =*/ SystemWidgetHelpers.createLabel(composite, SystemProcessesResources.RESID_KILL_PROMPT, nbrColumns);
- }
- }
- else {
- /*prompt =*/ SystemWidgetHelpers.createVerbiage(composite, promptLabel, nbrColumns, false, 200);
- }
-
- // WARNING
- if (warningMessage != null)
- {
- // filler line
- SystemWidgetHelpers.createLabel(composite, "", nbrColumns);
- // create image
- Image image = getShell().getDisplay().getSystemImage(SWT.ICON_WARNING);
- Label imageLabel = null;
- if (image != null)
- {
- imageLabel = new Label(composite, 0);
- image.setBackground(imageLabel.getBackground());
- imageLabel.setImage(image);
- imageLabel.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_CENTER |
- GridData.VERTICAL_ALIGN_BEGINNING));
- }
- Label warningLabel = SystemWidgetHelpers.createLabel(composite, warningMessage);
- if (warningTip != null)
- {
- warningLabel.setToolTipText(warningTip);
- if (imageLabel!=null) {
- imageLabel.setToolTipText(warningTip);
- }
- }
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.widthHint = 350;
- data.grabExcessVerticalSpace = true;
- warningLabel.setLayoutData(data);
-
- // filler line
- SystemWidgetHelpers.createLabel(composite, "", nbrColumns);
- }
-
- // TABLE
- tableViewer = createTableViewer(composite, nbrColumns);
- createColumns();
- tableViewer.setColumnProperties(tableColumnProperties);
-
- sktp = new SystemKillTableProvider();
-
- int width = tableData.widthHint;
- int nbrRows = Math.min(getRows().length,8);
- int rowHeight = table.getItemHeight() + table.getGridLineWidth();
- int sbHeight = table.getHorizontalBar().getSize().y;
- int height = (nbrRows * rowHeight) + sbHeight;
-
- tableData.heightHint = height;
- table.setLayoutData(tableData);
- table.setSize(width, height);
-
- tableViewer.setLabelProvider(sktp);
- tableViewer.setContentProvider(sktp);
-
- Object input = getInputObject();
- tableViewer.setInput(input);
-
- // Signal Type combo box
- cmbSignal = SystemWidgetHelpers.createLabeledReadonlyCombo(composite, null, SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_LABEL, SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_TOOLTIP);
- cmbSignal.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- selectionChanged();
- }
- }
- );
- cmbSignal.setItems(getSignalTypes());
- cmbSignal.add(SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_DEFAULT, 0);
- cmbSignal.setText(cmbSignal.getItem(0));
- signalType = cmbSignal.getText();
- cmbSignal.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- return composite;
- }
-
- /**
- * @return all the possible signal types that can be sent to the selected processes
- * on that system
- */
- private String[] getSignalTypes()
- {
- Object selObj = getInputObject();
- if (selObj instanceof IStructuredSelection)
- {
- IStructuredSelection selection = (IStructuredSelection) selObj;
- IRemoteProcess process = (IRemoteProcess) selection.getFirstElement();
- String[] types = null;
- try
- {
- types = process.getParentRemoteProcessSubSystem().getSignalTypes();
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logMessage(e.getSystemMessage(), e);
- return new String[] { SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_DEFAULT };
- }
- if (types == null) types = new String[] { SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_DEFAULT };
- return types;
- }
- else return new String[] { SystemProcessesResources.RESID_KILL_SIGNAL_TYPE_DEFAULT };
- }
-
- private TableViewer createTableViewer(Composite parent, int nbrColumns)
- {
- table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.HIDE_SELECTION);
- table.setLinesVisible(true);
- tableViewer = new TableViewer(table);
- tableData = new GridData();
- tableData.horizontalAlignment = GridData.BEGINNING;
- tableData.grabExcessHorizontalSpace = false;
- tableData.widthHint = 350;
- tableData.heightHint = 30;
- tableData.verticalAlignment = GridData.CENTER;
- tableData.grabExcessVerticalSpace = true;
- tableData.horizontalSpan = nbrColumns;
- table.setLayoutData(tableData);
- return tableViewer;
- }
-
- private void createColumns()
- {
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
- table.setHeaderVisible(true);
- for (int i = 0; i < columnHeaders.length; i++)
- {
- layout.addColumnData(columnLayouts[i]);
- TableColumn tc = new TableColumn(table, SWT.NONE,i);
- tc.setResizable(columnLayouts[i].resizable);
- tc.setText(columnHeaders[i]);
- }
- }
-
- public void selectionChanged()
- {
- signalType = cmbSignal.getText();
- }
-
- /**
- * Override of parent. Must pass selected object onto the form for initializing fields.
- * Called by SystemDialogAction's default run() method after dialog instantiated.
- */
- public void setInputObject(Object inputObject)
- {
- super.setInputObject(inputObject);
- }
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- return true;
- }
-
- /**
- * Returns the rows of deletable items.
- */
- public SystemKillTableRow[] getRows()
- {
- return (SystemKillTableRow[])sktp.getElements(getInputObject());
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
-
- public String getSignal()
- {
- if (cmbSignal == null) return "";
- if (cmbSignal.isDisposed()) return signalType;
- String signal = cmbSignal.getText();
- if (signal == null) return "";
- return signal;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillTableProvider.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillTableProvider.java
deleted file mode 100644
index 01c71d7ff..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillTableProvider.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui.dialogs;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.rse.ui.dialogs.SystemDeleteTableProvider;
-
-
-public class SystemKillTableProvider extends SystemDeleteTableProvider
-{
-
- static final int COLUMN_IMAGE = 0;
- static final int COLUMN_NAME = 1;
- static final int COLUMN_TYPE = 2;
-
- /**
- * Return rows. Input must be an IStructuredSelection.
- */
- public Object[] getElements(Object inputElement)
- {
- if (children == null)
- {
- IStructuredSelection iss = (IStructuredSelection)inputElement;
- children = new SystemKillTableRow[iss.size()];
- Iterator i = iss.iterator();
- int idx = 0;
- while (i.hasNext())
- {
- children[idx] = new SystemKillTableRow(i.next(), idx);
- idx++;
- }
- }
- return children;
- }
-
- /**
- * Return the 0-based row number of the given element.
- */
- public int getRowNumber(SystemKillTableRow row)
- {
- return row.getRowNumber();
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int column)
- {
- String text = "";
- if (column == COLUMN_NAME)
- text = getTableRow(element).getName();
- else if (column == COLUMN_TYPE)
- text = getTableRow(element).getType();
- //System.out.println("INSIDE GETCOLUMNTEXT: " + column + ", " + text + ", " + getTableRow(element));
- return text;
- }
-
- private SystemKillTableRow getTableRow(Object element)
- {
- return (SystemKillTableRow)element;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillTableRow.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillTableRow.java
deleted file mode 100644
index 16840a126..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/dialogs/SystemKillTableRow.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.processes.ui.dialogs;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.dialogs.SystemDeleteTableRow;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-
-
-public class SystemKillTableRow extends SystemDeleteTableRow
-{
-
- private Object element;
- private String exename;
- private String pid;
- private ImageDescriptor imageDescriptor;
- private ISystemViewElementAdapter adapter;
- private ISystemRemoteElementAdapter remoteAdapter;
- private int rowNbr = 0;
-
- public SystemKillTableRow(Object element, int rowNbr)
- {
- super(element, rowNbr);
- if (element instanceof SystemSimpleContentElement)
- element = ((SystemSimpleContentElement)element).getData();
- this.element = element;
- this.adapter = getAdapter(element);
- this.remoteAdapter = getRemoteAdapter(element);
- this.rowNbr = rowNbr;
- if (adapter != null)
- this.exename = adapter.getName(element);
- else
- {
- if (element instanceof IRemoteProcess)
- this.exename = ((IRemoteProcess)element).getName();
- }
- if (element instanceof IRemoteProcess)
- this.pid = "" + ((IRemoteProcess)element).getPid();
- if (adapter != null)
- this.imageDescriptor = adapter.getImageDescriptor(element);
- else this.imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROCESS_ID);
- }
-
- /**
- * Return the name of the item to be deleted
- * @return display name of the item.
- */
- public String getName()
- {
- return exename;
- }
- /**
- * Return the resource type of the item to be deleted
- * @return resource type of the item
- */
- public String getType()
- {
- return pid;
- }
- /**
- * Return the 0-based row number of this item
- * @return 0-based row number
- */
- public int getRowNumber()
- {
- return rowNbr;
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- */
- public ImageDescriptor getImageDescriptor()
- {
- return imageDescriptor;
- }
-
- /**
- * Get the input object this row represents
- */
- public Object getElement()
- {
- return element;
- }
- /**
- * Get the input object adapter for the input object this row represents
- */
- public ISystemViewElementAdapter getAdapter()
- {
- return adapter;
- }
- /**
- * Get the input object remote adapter for the input object this row represents
- */
- public ISystemRemoteElementAdapter getRemoteAdapter()
- {
- return remoteAdapter;
- }
- /**
- * Return true if this is a remote object
- */
- public boolean isRemote()
- {
- return (remoteAdapter != null);
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- public String toString()
- {
- return exename;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/propertypages/ProcessServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/propertypages/ProcessServicesPropertyPage.java
deleted file mode 100644
index 385b4fb62..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/propertypages/ProcessServicesPropertyPage.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
-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;
-
-
-public class ProcessServicesPropertyPage extends ServicesPropertyPage
-{
- private IProcessServiceSubSystemConfiguration _currentFactory;
- protected ProcessServiceSubSystem getProcessServiceSubSystem()
- {
- return (ProcessServiceSubSystem)getElement();
- }
-
- protected ServiceElement[] getServiceElements()
- {
- ProcessServiceSubSystem subSystem = getProcessServiceSubSystem();
-
- IHost host = subSystem.getHost();
- _currentFactory = (IProcessServiceSubSystemConfiguration)subSystem.getParentRemoteProcessSubSystemConfiguration();
- IProcessServiceSubSystemConfiguration[] factories = getProcessServiceSubSystemFactories(host.getSystemType());
-
-
- // create elements for each
- ServiceElement[] elements = new ServiceElement[factories.length];
- for (int i = 0; i < factories.length; i++)
- {
- IProcessServiceSubSystemConfiguration factory = factories[i];
- elements[i] = new FactoryServiceElement(host, factory);
- if (factory == _currentFactory)
- {
- elements[i].setSelected(true);
- }
- }
-
- return elements;
- }
-
- protected IProcessServiceSubSystemConfiguration[] getProcessServiceSubSystemFactories(String systemType)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType);
-
- for (int i = 0; i < factories.length; i++)
- {
- ISubSystemConfiguration factory = factories[i];
- if (factory instanceof IProcessServiceSubSystemConfiguration)
- {
- results.add(factory);
- }
- }
-
- return (IProcessServiceSubSystemConfiguration[])results.toArray(new IProcessServiceSubSystemConfiguration[results.size()]);
- }
-
- protected IServiceSubSystemConfiguration getCurrentServiceSubSystemConfiguration()
- {
- return _currentFactory;
- }
-
- public void setSubSystemConfiguration(ISubSystemConfiguration factory)
- {
- _currentFactory = (IProcessServiceSubSystemConfiguration)factory;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/ISystemProcessPropertyConstants.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/ISystemProcessPropertyConstants.java
deleted file mode 100644
index 9ffd71193..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/ISystemProcessPropertyConstants.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui.view;
-
-public interface ISystemProcessPropertyConstants
-{
- public static final String P_PREFIX = org.eclipse.rse.ui.ISystemIconConstants.PREFIX;
-
- // PROCESS PROPERTIES
- public static String P_PROCESS_PID = P_PREFIX+"process.pid";
- public static String P_PROCESS_NAME = P_PREFIX+"process.name";
- public static String P_PROCESS_UID = P_PREFIX+"process.uid";
- public static String P_PROCESS_USERNAME = P_PREFIX+"process.username";
- public static String P_PROCESS_PPID = P_PREFIX+"process.ppid";
- public static String P_PROCESS_GID = P_PREFIX+"process.gid";
- public static String P_PROCESS_STATE = P_PREFIX+"process.state";
- public static String P_PROCESS_TGID = P_PREFIX+"process.tgid";
- public static String P_PROCESS_TRACERPID = P_PREFIX+"process.tracerpid";
- public static String P_PROCESS_VMSIZE = P_PREFIX+"process.vmsize";
- public static String P_PROCESS_VMRSS = P_PREFIX+"process.vmrss";
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/RemoteProcessSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/RemoteProcessSubSystemConfigurationAdapter.java
deleted file mode 100644
index e29c85598..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/RemoteProcessSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui.view;
-
-import java.util.Vector;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.processes.ui.actions.SystemNewProcessFilterAction;
-import org.eclipse.rse.processes.ui.actions.SystemProcessUpdateFilterAction;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class RemoteProcessSubSystemConfigurationAdapter extends SubSystemConfigurationAdapter
-{
-
- SystemNewProcessFilterAction _newProcessFilterAction;
- SystemProcessUpdateFilterAction _changeProcessFilterAction;
-
- Vector _additionalActions;
-
- /**
- * Overridable parent method to return the action for creating a new filter.
- * Returns new SystemNewFileFilterAction.
- */
- protected IAction getNewFilterPoolFilterAction(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
- {
- if (_newProcessFilterAction == null)
- {
- _newProcessFilterAction = new SystemNewProcessFilterAction(shell, selectedPool);
- }
- return _newProcessFilterAction;
- }
-
-
- /**
- * Overridable method to return the action for changing an existing filter.
- * Returns new SystemProcessUpdateFilterAction.
- */
- protected IAction getChangeFilterAction(ISubSystemConfiguration factory, ISystemFilter selectedFilter, Shell shell)
- {
- if (_changeProcessFilterAction == null)
- {
- _changeProcessFilterAction = new SystemProcessUpdateFilterAction(shell);
- }
- return _changeProcessFilterAction;
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/RemoteProcessSubSystemConfigurationAdapterFactory.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/RemoteProcessSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 56381ce1a..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/RemoteProcessSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,59 +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.processes.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-
-
-public class RemoteProcessSubSystemConfigurationAdapterFactory implements IAdapterFactory
-{
-
- private ISubSystemConfigurationAdapter ssFactoryAdapter = new RemoteProcessSubSystemConfigurationAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISubSystemConfigurationAdapter.class};
- }
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, IRemoteProcessSubSystemConfiguration.class);
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof IRemoteProcessSubSystemConfiguration)
- adapter = ssFactoryAdapter;
-
- return adapter;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessStatesContentProvider.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessStatesContentProvider.java
deleted file mode 100644
index 1197ecdcc..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessStatesContentProvider.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui.view;
-
-import java.util.HashMap;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-
-
-/**
- * Content provider for any widget that wishes to get the names of all possible
- * states of a process. Also contains a utility methods for getting the translated
- * information about individual process states.
- * @author mjberger
- *
- */
-public class SystemProcessStatesContentProvider implements ISystemProcessRemoteConstants, IStructuredContentProvider
-{
- private HashMap strIndices;
-
- /**
- * Constructor
- */
- public SystemProcessStatesContentProvider()
- {
- strIndices = new HashMap();
- // construct a mapping from unique state names to integers. Each integer
- // is the index of the associated state name in the array of translated
- // state name strings.
- for (int i = 0; i < ALL_STATES_STR.length; i++)
- {
- strIndices.put(ALL_STATES_STR[i], new Integer(i));
- }
- }
-
- /**
- * @return a String array containing the translated names of all the process states.
- */
- public static String[] getStates()
- {
- return new String[]
- {
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ACTIVE_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_IDLE_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_NONEXISTENT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_PAGING_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_RUNNING_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_SLEEPING_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_TRACED_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_WAITING_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOMBIE_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_SINGLE_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_MSGQRECEIVEWAIT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_MSGQSENDWAIT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_COMSYSKERNELWAIT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_SEMAPHOREWAIT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_QUIESCEFROZEN_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_FILESYSKERNELWAIT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_MVSPAUSEWAIT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_PTHREADCREATEDTASKS_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_SWAPPEDOUT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_PTHREADCREATED_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_OTHERKERNELWAIT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_CANCELLED_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_MULTITHREAD_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_MEDIUMWEIGHTTHREAD_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_ASYNCHRONOUSTHREAD_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_PTRACEKERNELWAIT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_RUNNING_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_SLEEPING_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_STOPPED_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_INITIALPROCESSTHREAD_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_DETACHED_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_WAITINGFORCHILD_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_FORKING_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_MVSWAIT_VALUE,
- SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ZOS_ZOMBIE_VALUE
- };
-
- }
-
- /**
- * Given the unique name/code representing a process state, returns
- * the translated string for the process state.
- * @param state the unique name/code for a process state.
- * @return the associated translated name, or "" if a matching one cannot be found
- */
- public String getStateString(String state)
- {
- Integer index = (Integer) strIndices.get(state);
- if (index == null) return "";
- String[] resources = getStates();
- if (index.intValue() >= resources.length) return "";
- return resources[index.intValue()];
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement)
- {
- return getStates();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose()
- {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessesViewResources.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessesViewResources.java
deleted file mode 100644
index 94d6c9335..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessesViewResources.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui.view;
-
-import org.eclipse.osgi.util.NLS;
-
-
-public class SystemProcessesViewResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.processes.ui.view.SystemProcessesViewResources";
-
- // PROCESS PROPERTIES
- public static String RESID_PROPERTY_PROCESS_PID_LABEL;
- public static String RESID_PROPERTY_PROCESS_NAME_LABEL;
- public static String RESID_PROPERTY_PROCESS_UID_LABEL;
- public static String RESID_PROPERTY_PROCESS_USERNAME_LABEL;
- public static String RESID_PROPERTY_PROCESS_PPID_LABEL;
- public static String RESID_PROPERTY_PROCESS_GID_LABEL;
- public static String RESID_PROPERTY_PROCESS_STATE_LABEL;
- public static String RESID_PROPERTY_PROCESS_TGID_LABEL;
- public static String RESID_PROPERTY_PROCESS_TRACERPID_LABEL;
- public static String RESID_PROPERTY_PROCESS_VMSIZE_LABEL;
- public static String RESID_PROPERTY_PROCESS_VMRSS_LABEL;
-
- public static String RESID_PROPERTY_PROCESS_PID_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_NAME_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_UID_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_USERNAME_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_PPID_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_GID_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_STATE_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_TGID_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_TRACERPID_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_VMSIZE_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_VMSIZE_VALUE;
- public static String RESID_PROPERTY_PROCESS_VMRSS_TOOLTIP;
- public static String RESID_PROPERTY_PROCESS_VMRSS_VALUE;
-
- // Property sheet values: Processes
- public static String RESID_PROPERTY_PROCESS_TYPE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ROOT;
- public static String RESID_PROPERTY_PROCESS_TYPE_ERROR_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_RUNNING_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_SLEEPING_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_WAITING_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOMBIE_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_TRACED_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_PAGING_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ACTIVE_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_IDLE_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_NONEXISTENT_VALUE;
-
- // zOS states
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_SINGLE_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_MSGQRECEIVEWAIT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_MSGQSENDWAIT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_COMSYSKERNELWAIT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_SEMAPHOREWAIT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_QUIESCEFROZEN_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_FILESYSKERNELWAIT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_MVSPAUSEWAIT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_PTHREADCREATEDTASKS_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_SWAPPEDOUT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_PTHREADCREATED_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_OTHERKERNELWAIT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_CANCELLED_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_MULTITHREAD_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_MEDIUMWEIGHTTHREAD_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_ASYNCHRONOUSTHREAD_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_PTRACEKERNELWAIT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_RUNNING_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_SLEEPING_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_STOPPED_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_INITIALPROCESSTHREAD_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_DETACHED_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_WAITINGFORCHILD_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_FORKING_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_MVSWAIT_VALUE;
- public static String RESID_PROPERTY_PROCESS_TYPE_ZOS_ZOMBIE_VALUE;
-
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemProcessesViewResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessesViewResources.properties b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessesViewResources.properties
deleted file mode 100644
index ec391aae4..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemProcessesViewResources.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-################################################################################
-# Copyright (c) 2005, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-#=============================================================
-# PROCESS PROPERTIES
-#=============================================================
-RESID_PROPERTY_PROCESS_TYPE=Process
-RESID_PROPERTY_PROCESS_TYPE_ROOT=Init (Root Process)
-RESID_PROPERTY_PROCESS_TYPE_ERROR_VALUE=Error
-RESID_PROPERTY_PROCESS_TYPE_RUNNING_VALUE=Running
-RESID_PROPERTY_PROCESS_TYPE_SLEEPING_VALUE=Sleeping (Interruptible)
-RESID_PROPERTY_PROCESS_TYPE_WAITING_VALUE=Waiting (Disk Sleep)
-RESID_PROPERTY_PROCESS_TYPE_ZOMBIE_VALUE=Zombie
-RESID_PROPERTY_PROCESS_TYPE_TRACED_VALUE=Traced (Stopped)
-RESID_PROPERTY_PROCESS_TYPE_PAGING_VALUE=Paging
-RESID_PROPERTY_PROCESS_TYPE_ACTIVE_VALUE=Active (AIX only)
-RESID_PROPERTY_PROCESS_TYPE_IDLE_VALUE=Idle (AIX only)
-RESID_PROPERTY_PROCESS_TYPE_NONEXISTENT_VALUE=Non-existent (AIX only)
-
-RESID_PROPERTY_PROCESS_TYPE_ZOS_SINGLE_VALUE=Single task (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_MSGQRECEIVEWAIT_VALUE=Message queue receive wait (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_MSGQSENDWAIT_VALUE=Message queue send wait (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_COMSYSKERNELWAIT_VALUE=Communication system kernel wait (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_SEMAPHOREWAIT_VALUE=Semaphore operation wait (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_QUIESCEFROZEN_VALUE=Quiesce frozen (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_FILESYSKERNELWAIT_VALUE=File system kernel wait (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_MVSPAUSEWAIT_VALUE=MVS Pause wait (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_PTHREADCREATEDTASKS_VALUE=One or more pthread created tasks (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_SWAPPEDOUT_VALUE=Swapped out (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_PTHREADCREATED_VALUE=Pthread created (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_OTHERKERNELWAIT_VALUE=Other kernel wait (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_CANCELLED_VALUE=Canceled (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_MULTITHREAD_VALUE=Multi-thread (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_MEDIUMWEIGHTTHREAD_VALUE=Medium weight thread (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_ASYNCHRONOUSTHREAD_VALUE=Asynchronous thread (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_PTRACEKERNELWAIT_VALUE=Ptrace kernel wait (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_RUNNING_VALUE=Running (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_SLEEPING_VALUE=Sleeping (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_STOPPED_VALUE=Stopped (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_INITIALPROCESSTHREAD_VALUE=Initial process thread (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_DETACHED_VALUE=Detached thread (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_WAITINGFORCHILD_VALUE=Waiting for child (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_FORKING_VALUE=Forking (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_MVSWAIT_VALUE=MVS wait (z/OS)
-RESID_PROPERTY_PROCESS_TYPE_ZOS_ZOMBIE_VALUE=Zombie (z/OS)
-
-RESID_PROPERTY_PROCESS_PID_LABEL=Process ID
-RESID_PROPERTY_PROCESS_NAME_LABEL=Executable Name
-RESID_PROPERTY_PROCESS_UID_LABEL=User ID
-RESID_PROPERTY_PROCESS_USERNAME_LABEL=Username
-RESID_PROPERTY_PROCESS_PPID_LABEL=Parent PID
-RESID_PROPERTY_PROCESS_GID_LABEL=Group ID
-RESID_PROPERTY_PROCESS_STATE_LABEL=State
-RESID_PROPERTY_PROCESS_TGID_LABEL=Task Group ID
-RESID_PROPERTY_PROCESS_TRACERPID_LABEL=Tracer PID
-RESID_PROPERTY_PROCESS_VMSIZE_LABEL=VM Size
-RESID_PROPERTY_PROCESS_VMRSS_LABEL=VM RSS
-RESID_PROPERTY_PROCESS_PID_TOOLTIP=The system ID number of the process
-RESID_PROPERTY_PROCESS_NAME_TOOLTIP=The executable associated with the process
-RESID_PROPERTY_PROCESS_UID_TOOLTIP=The user ID of the owner of the process
-RESID_PROPERTY_PROCESS_USERNAME_TOOLTIP=The username of the owner of the process
-RESID_PROPERTY_PROCESS_PPID_TOOLTIP=The process ID of the parent of the process
-RESID_PROPERTY_PROCESS_GID_TOOLTIP=The group ID of the owner of the process
-RESID_PROPERTY_PROCESS_STATE_TOOLTIP=The state in which the process currently is
-RESID_PROPERTY_PROCESS_TGID_TOOLTIP=The task group to which process belongs
-RESID_PROPERTY_PROCESS_TRACERPID_TOOLTIP=The tracer process ID of the process
-RESID_PROPERTY_PROCESS_VMSIZE_TOOLTIP=The amount of virtual memory taken up by this process
-RESID_PROPERTY_PROCESS_VMSIZE_VALUE=&1 kilobytes
-RESID_PROPERTY_PROCESS_VMRSS_TOOLTIP=The amount of virtual memory resident set size of this process (actual RAM taken up by the process)
-RESID_PROPERTY_PROCESS_VMRSS_VALUE=&1 kilobytes \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewProcessAdapterFactory.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewProcessAdapterFactory.java
deleted file mode 100644
index 1f7bf8e17..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewProcessAdapterFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.processes.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-public class SystemViewProcessAdapterFactory extends AbstractSystemRemoteAdapterFactory
-{
- private SystemViewRemoteProcessAdapter processAdapter = new SystemViewRemoteProcessAdapter();
-
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, IRemoteProcess.class);
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof IRemoteProcess)
- adapter = processAdapter;
-
- if ((adapter != null) && (adapterType == IPropertySource.class))
- {
- ((ISystemViewElementAdapter)adapter).setPropertySourceInput(adaptableObject);
- }
- else if (adapter == null)
- {
- SystemBasePlugin.logWarning("No adapter found for object of type: " + adaptableObject.getClass().getName());
- }
- return adapter;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewRemoteProcessAdapter.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewRemoteProcessAdapter.java
deleted file mode 100644
index f4dfb784c..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewRemoteProcessAdapter.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.processes.ui.view;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.SystemRemoteResourceSet;
-import org.eclipse.rse.processes.ui.ProcessesPlugin;
-import org.eclipse.rse.processes.ui.actions.SystemKillProcessAction;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteTypes;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
- implements ISystemViewElementAdapter, ISystemRemoteElementAdapter,
- ISystemProcessPropertyConstants, ISystemProcessRemoteConstants
-{
- private SystemCopyToClipboardAction copyClipboardAction;
- public boolean canDrag(Object element)
- {
- // DKM - this is just for copy
- return true;
- }
-
- public boolean canDrag(SystemRemoteResourceSet elements)
- {
- // DKM - this is just for copy
- return true;
- }
-
- public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
- {
- return getText(element);
- }
-
- public ISystemResourceSet doDrag(SystemRemoteResourceSet set, IProgressMonitor monitor)
- {
- return set;
- }
-
- private static final Object[] EMPTY_LIST = new Object[0];
- private static PropertyDescriptor[] propertyDescriptorArray = null;
- private SystemKillProcessAction killProcessAction;
-
- public void addActions(SystemMenuManager menu,
- IStructuredSelection selection, Shell parent, String menuGroup)
- {
- if (killProcessAction == null)
- killProcessAction = new SystemKillProcessAction(shell);
- menu.add(ISystemContextMenuConstants.GROUP_CHANGE, killProcessAction);
-
-
- if (copyClipboardAction == null)
- {
- Clipboard clipboard = RSEUIPlugin.getTheSystemRegistry().getSystemClipboard();
- copyClipboardAction = new SystemCopyToClipboardAction(shell, clipboard);
- }
- menu.add(menuGroup, copyClipboardAction);
- }
-
- public ISubSystem getSubSystem(Object element)
- {
- if (element instanceof IRemoteProcess)
- {
- IRemoteProcess process = (IRemoteProcess)element;
- return process.getParentRemoteProcessSubSystem();
- }
- return super.getSubSystem(element);
- }
-
- public ImageDescriptor getImageDescriptor(Object element)
- {
- //return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROCESS_ID);
- return ProcessesPlugin.getDefault().getImageDescriptorFromPath("icons/full/obj16/activeprocess_obj.gif");
- }
-
- public String getText(Object element)
- {
- String text = ((IRemoteProcess) element).getLabel();
- return (text == null) ? "" : text;
- }
-
- /**
- * Used for stuff like clipboard text copy
- */
- public String getAlternateText(Object element)
- {
- IRemoteProcess process = (IRemoteProcess)element;
- String allProperties = process.getAllProperties();
- return allProperties.replace('|', '\t');
- }
-
- public String getAbsoluteName(Object object)
- {
- IRemoteProcess process = (IRemoteProcess) object;
- return "" + process.getPid();
- }
-
- public String getType(Object element)
- {
- IRemoteProcess process = (IRemoteProcess) element;
- if (process.isRoot())
- return SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE_ROOT;
- else return SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TYPE;
- }
-
- public Object getParent(Object element)
- {
- IRemoteProcess process = (IRemoteProcess) element;
- IRemoteProcess parent = process.getParentRemoteProcess();
- if ((parent != null) && parent.getAbsolutePath().equals(process.getAbsolutePath()))
- // should never happen but sometimes it does, leading to infinite loop.
- parent = null;
- return parent;
- }
-
- public boolean hasChildren(Object element)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public Object[] getChildren(Object element)
- {
- IRemoteProcess process = (IRemoteProcess) element;
- IRemoteProcessSubSystem ss = process.getParentRemoteProcessSubSystem();
- IHostProcessFilter orgRpfs = process.getFilterString();
-
- Object[] children = null;
-
- try
- {
- children = ss.listAllProcesses(orgRpfs, process.getContext(), null);
- if ((children == null) || (children.length == 0))
- {
- children = EMPTY_LIST;
- }
- }
- /*catch (InterruptedException exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element);
- }*/
- catch (Exception exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element);
- SystemBasePlugin.logError("Exception resolving file filter strings", exc);
- }
- return children;
- }
-
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
-
- if (propertyDescriptorArray == null)
- {
- int nbrOfProperties = ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT;
-
- propertyDescriptorArray = new PropertyDescriptor[nbrOfProperties];
-
- int idx = -1;
-
- // pid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_PID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_PID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_PID_TOOLTIP);
-
- // name
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_NAME, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_NAME_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_NAME_TOOLTIP);
-
- // state
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_STATE, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_STATE_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_STATE_TOOLTIP);
-
- // uid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_UID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_UID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_UID_TOOLTIP);
-
- // username
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_USERNAME, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_USERNAME_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_USERNAME_TOOLTIP);
-
- // ppid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_PPID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_PPID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_PPID_TOOLTIP);
-
- // gid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_GID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_GID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_GID_TOOLTIP);
-
- // tgid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_TGID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TGID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TGID_TOOLTIP);
-
- // tracerpid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_TRACERPID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TRACERPID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TRACERPID_TOOLTIP);
-
- // virtual memory size
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_VMSIZE, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_VMSIZE_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_VMSIZE_TOOLTIP);
-
- // virtual memory rss
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROCESS_VMRSS, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_VMRSS_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_VMRSS_TOOLTIP);
-
- }
- return propertyDescriptorArray;
- }
-
- /**
- * Returns the current value for the named property.
- * @return the current value of the given property
- */
- protected Object internalGetPropertyValue(Object key)
- {
- return getPropertyValue(key, true);
- }
-
- /**
- * Returns the current value for the named property.
- *
- * @param property the name or key of the property as named by its property descriptor
- * @param formatted indication of whether to return the value in formatted or raw form
- * @return the current value of the given property
- */
- public Object getPropertyValue(Object property, boolean formatted)
- {
- String name = (String) property;
- IRemoteProcess process = (IRemoteProcess) propertySourceInput;
-
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_GID))
- {
- if (formatted)
- {
- return "" + process.getGid();
- }
- else
- {
- return new Long(process.getGid());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_NAME))
- {
- return process.getName();
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_PID))
- {
- if (formatted)
- {
- return "" + process.getPid();
- }
- else
- {
- return new Long(process.getPid());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_PPID))
- {
- if (formatted)
- {
- return "" + process.getPPid();
- }
- else
- {
- return new Long(process.getPPid());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_STATE))
- {
- if (formatted)
- {
- return formatState(process.getState());
- }
- else
- {
- return process.getState();
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_TGID))
- {
- if (formatted)
- {
- return "" + process.getTgid();
- }
- else
- {
- return new Long(process.getTgid());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_TRACERPID))
- {
- if (formatted)
- {
- return "" + process.getTracerPid();
- }
- else
- {
- return new Long(process.getTracerPid());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_UID))
- {
- if (formatted)
- {
- return "" + process.getUid();
- }
- else
- {
- return new Long(process.getUid());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_USERNAME))
- {
- return process.getUsername();
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_VMSIZE))
- {
- if (formatted)
- {
- return sub(SystemProcessesViewResources.RESID_PROPERTY_PROCESS_VMSIZE_VALUE, MSG_SUB1, Long.toString(process.getVmSizeInKB()));
- }
- else
- {
- return new Long(process.getVmSizeInKB());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_VMRSS))
- {
- if (formatted)
- {
- return sub(SystemProcessesViewResources.RESID_PROPERTY_PROCESS_VMRSS_VALUE, MSG_SUB1, Long.toString(process.getVmRSSInKB()));
- }
- else
- {
- return new Long(process.getVmRSSInKB());
- }
- }
- else
- return null; //super.getPropertyValue(name);
- }
-
- protected String formatState(String state)
- {
- if (state == null) return "";
- state = state.trim();
- String longState = "";
- String[] allStates = state.split(",");
- if (allStates == null) return longState;
-
- SystemProcessStatesContentProvider zstates = new SystemProcessStatesContentProvider();
- for (int i = 0; i < allStates.length; i++)
- {
- longState = longState + allStates[i].charAt(0) + "-" + zstates.getStateString(allStates[i]);
- if (i < allStates.length - 1)
- longState = longState + ", ";
- }
- return longState;
- }
-
- /**
- * Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem
- */
- public String getAbsoluteParentName(Object element)
- {
- IRemoteProcess process = (IRemoteProcess) element;
- IRemoteProcess parent = process.getParentRemoteProcess();
- if (parent != null) return parent.getAbsolutePath();
- else return "/proc/0";
- }
-
- /**
- * Given a remote object, returns it remote parent object. Eg, given a process, return the process that
- * spawned it.
- * <p>
- * The shell is required in order to set the cursor to a busy state if a remote trip is required.
- *
- * @return an IRemoteProcess object for the parent
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- return ((IRemoteProcess) element).getParentRemoteProcess();
- }
-
- /**
- * Given a remote object, return the unqualified names of the objects contained in that parent. This is
- * used for testing for uniqueness on a rename operation, for example. Sometimes, it is not
- * enough to just enumerate all the objects in the parent for this purpose, because duplicate
- * names are allowed if the types are different, such as on iSeries. In this case return only
- * the names which should be used to do name-uniqueness validation on a rename operation.
- *
- * @return an array of all file and folder names in the parent of the given IRemoteFile object
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
- {
- String[] pids = EMPTY_STRING_LIST;
-
- IRemoteProcess process = (IRemoteProcess) element;
- String parentName = "" + process.getPPid();
- if (parentName.equals("-1")) // given a root?
- return pids; // not much we can do. Should never happen: you can't rename a root!
-
- Object[] children = getChildren(process.getParentRemoteProcess());
- if ((children == null) || (children.length == 0))
- return pids;
-
- pids = new String[children.length];
- for (int idx = 0; idx < pids.length; idx++)
- pids[idx] = "" + ((IRemoteProcess) children[idx]).getPid();
-
- return pids;
- }
-
- public String getRemoteSubType(Object element)
- {
- return null;
- }
-
- public String getRemoteType(Object element)
- {
- IRemoteProcess process = (IRemoteProcess) element;
- if (process.isRoot())
- return ISystemProcessRemoteTypes.TYPE_ROOT;
- else
- return ISystemProcessRemoteTypes.TYPE_PROCESS;
- }
-
- public String getRemoteTypeCategory(Object element)
- {
- return ISystemProcessRemoteTypes.TYPECATEGORY;
- }
-
- /**
- * Return the subsystem factory id that owns this remote object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getSubSystemConfigurationId(Object element)
- {
- IRemoteProcess process = (IRemoteProcess) element;
- return process.getParentRemoteProcessSubSystem().getSubSystemConfiguration().getId();
- }
-
- public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- /*if (oldElement instanceof IRemoteProcess)
- {
- IRemoteProcess oldProcess = (IRemoteProcess) oldElement;
- IRemoteProcess newProcess = (IRemoteProcess) newElement;
- oldProcess.getParentRemoteProcessSubSystem().setAllProperties(newProcess.getAllProperties());
- return hasChildren(oldElement);
- }*/
- return false;
- }
-
- public boolean supportsUserDefinedActions(Object object)
- {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.sdk/.classpath b/rse/plugins/org.eclipse.rse.sdk/.classpath
deleted file mode 100644
index fd545ef00..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/.classpath
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.sdk/.project b/rse/plugins/org.eclipse.rse.sdk/.project
deleted file mode 100644
index e1897a2e5..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.sdk</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.sdk/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.sdk/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.sdk/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.sdk/META-INF/MANIFEST.MF
deleted file mode 100644
index 5e4d099d0..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,8 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.sdk
-Bundle-Version: 1.0.1.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.sdk/about.html b/rse/plugins/org.eclipse.rse.sdk/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.sdk/about.ini b/rse/plugins/org.eclipse.rse.sdk/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.sdk/about.mappings b/rse/plugins/org.eclipse.rse.sdk/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.sdk/about.properties b/rse/plugins/org.eclipse.rse.sdk/about.properties
deleted file mode 100644
index fce104b35..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/about.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer SDK\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm\n\
-\n\
-This product includes software developed by the\n\
-Apache Software Foundation http://www.apache.org/
diff --git a/rse/plugins/org.eclipse.rse.sdk/build.properties b/rse/plugins/org.eclipse.rse.sdk/build.properties
deleted file mode 100644
index 23516db62..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- eclipse32.png,\
- plugin.properties
diff --git a/rse/plugins/org.eclipse.rse.sdk/eclipse32.png b/rse/plugins/org.eclipse.rse.sdk/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.sdk/plugin.properties b/rse/plugins/org.eclipse.rse.sdk/plugin.properties
deleted file mode 100644
index 4f6318cc8..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE SDK
-providerName = Eclipse.org \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.sdk/src/readme.txt b/rse/plugins/org.eclipse.rse.sdk/src/readme.txt
deleted file mode 100644
index 170b5f81d..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/src/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-This file is present only for build purposes. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/.classpath b/rse/plugins/org.eclipse.rse.services.dstore/.classpath
deleted file mode 100644
index 0133c4fc8..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="miners"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/.cvsignore b/rse/plugins/org.eclipse.rse.services.dstore/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/.project b/rse/plugins/org.eclipse.rse.services.dstore/.project
deleted file mode 100644
index 637caefd5..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.services.dstore</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.services.dstore/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF
deleted file mode 100644
index 3ea1f543d..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.services.dstore
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.services.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.dstore.core,
- org.eclipse.dstore.extra,
- org.eclipse.ui
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.dstore.universal.miners,
- org.eclipse.rse.dstore.universal.miners.command,
- org.eclipse.rse.dstore.universal.miners.command.patterns,
- org.eclipse.rse.dstore.universal.miners.environment,
- org.eclipse.rse.dstore.universal.miners.filesystem,
- org.eclipse.rse.dstore.universal.miners.processes,
- org.eclipse.rse.internal.services.dstore.shell,
- org.eclipse.rse.services.dstore,
- org.eclipse.rse.services.dstore.files,
- org.eclipse.rse.services.dstore.processes,
- org.eclipse.rse.services.dstore.search,
- org.eclipse.rse.services.dstore.shells,
- org.eclipse.rse.services.dstore.util
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/about.html b/rse/plugins/org.eclipse.rse.services.dstore/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/about.ini b/rse/plugins/org.eclipse.rse.services.dstore/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/about.mappings b/rse/plugins/org.eclipse.rse.services.dstore/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/about.properties b/rse/plugins/org.eclipse.rse.services.dstore/about.properties
deleted file mode 100644
index 80c444245..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer DStore Services\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/build.properties b/rse/plugins/org.eclipse.rse.services.dstore/build.properties
deleted file mode 100644
index dfeb22690..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/build.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- about.properties,\
- plugin.properties,\
- dstore_miners.jar,\
- .,\
- about.ini,\
- about.mappings,\
- eclipse32.png
-source.. = src/,miners/
-output.. = bin/
-jars.compile.order = dstore_miners.jar,.
-source.dstore_miners.jar = miners/
-output.dstore_miners.jar = miners.bin/
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc b/rse/plugins/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc
deleted file mode 100644
index e8ea4adf5..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<rmtjardesc>
-<jar path="mjberger.dmcknigh3:/opt/rseserver800/dstore_miners.jar"/>
-<options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc" exportErrors="true" exportWarnings="true" overwrite="false" saveDescription="true" useSourceFolders="false"/>
-<manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
-<sealing sealJar="false">
-<packagesToSeal/>
-<packagesToUnSeal/>
-</sealing>
-</manifest>
-<selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
-<javaElement handleIdentifier="=org.eclipse.rse.services.dstore/miners"/>
-</selectedElements>
-</rmtjardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/eclipse32.png b/rse/plugins/org.eclipse.rse.services.dstore/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/export.jardesc b/rse/plugins/org.eclipse.rse.services.dstore/export.jardesc
deleted file mode 100644
index 5ca861055..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/export.jardesc
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="D:/servers/800/dstore_miners.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/export.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
- <refactoring deprecationInfo="true" structuralOnly="true"/>
- <selectedProjects>
- <project name="org.eclipse.rse.services.dstore"/>
- </selectedProjects>
- <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.rse.services.dstore/miners"/>
- </selectedElements>
-</jardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/exportDstore.jardesc b/rse/plugins/org.eclipse.rse.services.dstore/exportDstore.jardesc
deleted file mode 100644
index 99808fdaf..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/exportDstore.jardesc
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="D:/servers/800/dstore_core.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/exportDstore.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" useSourceFolders="false"/>
- <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.dstore.core/src"/>
- </selectedElements>
-</jardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc b/rse/plugins/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc
deleted file mode 100644
index d6cafaa7b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="D:/servers/800/dstore_miners.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/exportDstoreMiners.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" useSourceFolders="false"/>
- <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.rse.services.dstore/miners"/>
- </selectedElements>
-</jardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/exportclientserver.jardesc b/rse/plugins/org.eclipse.rse.services.dstore/exportclientserver.jardesc
deleted file mode 100644
index 1c52fb77f..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/exportclientserver.jardesc
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="D:/servers/800/clientserver.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.rse.services.dstore/exportclientserver.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" useSourceFolders="false"/>
- <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.rse.services/clientserver"/>
- </selectedElements>
-</jardesc>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/ICancellableHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/ICancellableHandler.java
deleted file mode 100644
index 6e7a35f64..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/ICancellableHandler.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners;
-
-
-
-public interface ICancellableHandler
-{
-
- public boolean isDone();
- public boolean isCancelled();
-
- public void cancel();
-}
- \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalDataStoreConstants.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalDataStoreConstants.java
deleted file mode 100644
index 512ebb13b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalDataStoreConstants.java
+++ /dev/null
@@ -1,103 +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.dstore.universal.miners;
-
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-
-public interface IUniversalDataStoreConstants extends IServiceConstants
-{
-
-
-
- /*
- * Miner names, used for logging
- */
- public static final String UNIVERSAL_FILESYSTEM_MINER = "UniversalFileSystemMiner"; //$NON-NLS-1$
-
- //
- // Universal File descriptors for DataStore DataElements
- //
- public static final String MESSAGE_DESCRIPTOR = "universal.message"; //$NON-NLS-1$
-
- public static final String UNIVERSAL_NODE_DESCRIPTOR = "universal.node"; //$NON-NLS-1$
- public static final String UNIVERSAL_TEMP_DESCRIPTOR = "universal.temp"; //$NON-NLS-1$
- public static final String UNIVERSAL_FILTER_DESCRIPTOR = "universal.FilterObject"; //$NON-NLS-1$
- public static final String UNIVERSAL_FILE_DESCRIPTOR = "universal.FileObject"; //$NON-NLS-1$
- public static final String UNIVERSAL_FOLDER_DESCRIPTOR = "universal.FolderObject"; //$NON-NLS-1$
-
- public static final String UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR = "universal.ArchiveFileObject"; //$NON-NLS-1$
- public static final String UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR = "universal.VirtualFileObject"; //$NON-NLS-1$
- public static final String UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR = "universal.VirtualFolderObject"; //$NON-NLS-1$
-
-
- //
- // Universal File Miner Commands
- //
-
- public static final String C_QUERY_ROOTS = "C_QUERY_ROOTS"; //$NON-NLS-1$
- public static final String C_QUERY_VIEW_ALL = "C_QUERY_VIEW_ALL"; //$NON-NLS-1$
- public static final String C_QUERY_VIEW_FILES = "C_QUERY_VIEW_FILES"; //$NON-NLS-1$
- public static final String C_QUERY_VIEW_FOLDERS = "C_QUERY_VIEW_FOLDERS"; //$NON-NLS-1$
- public static final String C_CREATE_FILE = "C_CREATE_FILE"; //$NON-NLS-1$
- public static final String C_CREATE_FOLDER = "C_CREATE_FOLDER"; //$NON-NLS-1$
- public static final String C_QUERY_GET_REMOTE_OBJECT="C_QUERY_GET_REMOTE_OBJECT"; //$NON-NLS-1$
-
- public static final String C_DELETE = "C_DELETE"; //$NON-NLS-1$
- public static final String C_DELETE_BATCH = "C_DELETE_BATCH"; //$NON-NLS-1$
- public static final String C_RENAME = "C_RENAME"; //$NON-NLS-1$
- public static final String C_COPY = "C_COPY"; //$NON-NLS-1$
- public static final String C_COPY_BATCH = "C_COPY_BATCH"; //$NON-NLS-1$
-
- // Download file command
- public static final String C_DOWNLOAD_FILE = "C_DOWNLOAD_FILE"; //$NON-NLS-1$
-
- // Query system encoding command
- public static final String C_SYSTEM_ENCODING = "C_SYSTEM_ENCODING"; //$NON-NLS-1$
-
- // Query unused port
- public static final String C_QUERY_UNUSED_PORT = "C_QUERY_UNUSED_PORT"; //$NON-NLS-1$
-
- // Qualified class name command and return type
- public static final String C_QUERY_QUALIFIED_CLASSNAME = "C_QUERY_QUALIFIED_CLASSNAME"; //$NON-NLS-1$
- public static final String TYPE_QUALIFIED_CLASSNAME = "fullClassName"; //$NON-NLS-1$
-
-
-
- // Mode of transfer: text or binary
- public static final int TEXT_MODE = -1;
- public static final int BINARY_MODE = -2;
-
-
- // Download result types and download messages
- public static final String DOWNLOAD_RESULT_SUCCESS_TYPE = "universal.download.success"; //$NON-NLS-1$
- public static final String DOWNLOAD_RESULT_SUCCESS_MESSAGE = "successful"; //$NON-NLS-1$
- public static final String DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION = "FileNotFoundException"; //$NON-NLS-1$
- public static final String DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION = "UnsupportedEncodingException"; //$NON-NLS-1$
- public static final String DOWNLOAD_RESULT_IO_EXCEPTION = "IOException"; //$NON-NLS-1$
- public static final String DOWNLOAD_RESULT_EXCEPTION = "Exception"; //$NON-NLS-1$
- public static final String DOWNLOAD_RESULT_UNEXPECTED_ERROR = "UnexpectedError"; //$NON-NLS-1$
-
-
- // Number of bytes in a kilobyte
- public static final int KB_IN_BYTES = 1024;
-
- // Number of kilobytes we want
- public static final int NUM_OF_KB = 10;
-
- // The size of file segments to read and send across connection (in bytes)
- public static final int BUFFER_SIZE = NUM_OF_KB * KB_IN_BYTES;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/ServerLogger.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/ServerLogger.java
deleted file mode 100644
index 03b1e8b69..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/ServerLogger.java
+++ /dev/null
@@ -1,180 +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.dstore.universal.miners;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Date;
-import java.util.ResourceBundle;
-
-
-public class ServerLogger {
-
-
- // Constants for logging - for use in rsecomm.properties
- private static final String DEBUG_LEVEL = "debug_level"; //$NON-NLS-1$
- private static final String LOG_LOCATION = "log_location"; //$NON-NLS-1$
-
- private static final int LOG_WARNING = 1;
- private static final int LOG_INFO = 2;
- private static final int LOG_DEBUG = 3;
-
- private static final String LOG_TO_STDOUT = "Log_To_StdOut"; //$NON-NLS-1$
-
- private static Object writeLock = new Object();
- private static PrintWriter _logFileStream = null;
-
- public static final boolean DEBUG = false;
- private static int log_level = 0;
-
- /**
- *
- */
- public ServerLogger(String logPathName) {
- if (_logFileStream == null) {
- // Read .properties file to configure
- boolean logToFile = true;
-
- try {
- ResourceBundle properties = ResourceBundle.getBundle("rsecomm"); //$NON-NLS-1$
- String debug_level = properties.getString(DEBUG_LEVEL).trim();
- log_level = Integer.parseInt(debug_level);
- String log_location = properties.getString(LOG_LOCATION).trim();
- if (log_location.equalsIgnoreCase(LOG_TO_STDOUT)) {
- logToFile = false;
- _logFileStream = new PrintWriter(System.out);
- }
- } catch (Exception e) {
- // Just use logging defaults: log_level = 0, log to file
- //e.printStackTrace();
- }
-
- if (logToFile) {
- try {
- File _logFile = new File(logPathName, "rsecomm.log"); //$NON-NLS-1$
-
- if (!_logFile.exists()) {
- _logFile.createNewFile();
- }
-
- _logFileStream = new PrintWriter(new FileOutputStream(_logFile));
-
- } catch (IOException e) {
- System.out.println("Error opening log file " + logPathName + "rsecomm.log"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- }
-
-
- /**
- * logInfo
- *
- * @param minerName
- *
- * @param message Message text to be logged.
- */
- public static void logInfo(String minerName, String message) {
- if (log_level >= LOG_INFO) {
- if (_logFileStream != null) {
- synchronized(writeLock) {
- try {
- _logFileStream.println(new Date());
- _logFileStream.println("INFO " + minerName + ": " + message); //$NON-NLS-1$ //$NON-NLS-2$
- _logFileStream.println("---------------------------------------------------------------"); //$NON-NLS-1$
- _logFileStream.flush();
- }catch (Exception e) {}
- }
- }
- }
- }
-
-
- /**
- * logWarning
- *
- * @param minerName
- *
- * @param message Message text to be logged.
- */
- public static void logWarning(String minerName, String message) {
- if (log_level >= LOG_WARNING) {
- if (_logFileStream != null) {
- synchronized(writeLock) {
- try {
- _logFileStream.println(new Date());
- _logFileStream.println("WARNING " + minerName + ": " + message); //$NON-NLS-1$ //$NON-NLS-2$
- _logFileStream.println("---------------------------------------------------------------"); //$NON-NLS-1$
- _logFileStream.flush();
- }catch (Exception e) {}
- }
- }
- }
- }
-
-
- /**
- * logError
- *
- * @param minerName
- *
- * @param message Message text to be logged.
- *
- * @param exception Exception that generated the error. Used to print a stack trace.
- */
- public static void logError(String minerName, String message, Throwable exception) {
- if (_logFileStream != null) {
- synchronized(writeLock) {
- try {
- _logFileStream.println(new Date());
- _logFileStream.println("ERROR " + minerName + ": " + message); //$NON-NLS-1$ //$NON-NLS-2$
- if (exception != null) {
- exception.printStackTrace(_logFileStream);
- }
- _logFileStream.println("---------------------------------------------------------------"); //$NON-NLS-1$
- _logFileStream.flush();
- }catch (Exception e) {}
- }
- }
- }
-
-
- /**
- * logDebugMessage
- *
- * @param minerName
- *
- * @param message Message text to be logged.
- */
- public synchronized static void logDebugMessage(String minerName, String message) {
- if (DEBUG && log_level == LOG_DEBUG) {
- if (_logFileStream != null) {
- synchronized(writeLock) {
- try {
- _logFileStream.println(new Date());
- _logFileStream.println("DEBUG " + minerName + ": " + message); //$NON-NLS-1$ //$NON-NLS-2$
- _logFileStream.println("---------------------------------------------------------------"); //$NON-NLS-1$
- _logFileStream.flush();
- }catch (Exception e) {}
- }
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalServerUtilities.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalServerUtilities.java
deleted file mode 100644
index e45b36cf6..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalServerUtilities.java
+++ /dev/null
@@ -1,112 +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.dstore.universal.miners;
-
-import java.io.File;
-
-public class UniversalServerUtilities {
-
-
- private static String _userPreferencesDirectory = null;
-
- static {
- new ServerLogger(getUserPreferencesDirectory());
- }
-
- /**
- * getUserPreferencesDirectory() - returns directory on IFS where to store user settings
- */
- public static String getUserPreferencesDirectory()
- {
- if (_userPreferencesDirectory == null) {
-
- _userPreferencesDirectory = System.getProperty("user.home"); //$NON-NLS-1$
-
- String clientUserID = System.getProperty("client.username"); //$NON-NLS-1$
- if (clientUserID == null || clientUserID.equals("")) //$NON-NLS-1$
- {
- clientUserID = ""; //$NON-NLS-1$
- }
- else
- {
- clientUserID += File.separator;
- }
-
- // append a '/' if not there
- if ( _userPreferencesDirectory.length() == 0 ||
- _userPreferencesDirectory.charAt( _userPreferencesDirectory.length() -1 ) != File.separatorChar ) {
-
- _userPreferencesDirectory = _userPreferencesDirectory + File.separator;
- }
-
- _userPreferencesDirectory = _userPreferencesDirectory + ".eclipse" + File.separator + //$NON-NLS-1$
- "RSE" + File.separator + clientUserID; //$NON-NLS-1$
- File dirFile = new File(_userPreferencesDirectory);
- if (!dirFile.exists()) {
- dirFile.mkdirs();
- }
- }
- return _userPreferencesDirectory;
- }
-
- /**
- * logInfo
- *
- * @param minerName
- *
- * @param message Message text to be logged.
- */
- public static void logInfo(String minerName, String message) {
- ServerLogger.logInfo(minerName, message);
- }
-
- /**
- * logWarning
- *
- * @param minerName
- *
- * @param message Message text to be logged.
- */
- public static void logWarning(String minerName, String message) {
- ServerLogger.logWarning(minerName, message);
- }
-
- /**
- * logError
- *
- * @param minerName
- *
- * @param message Message text to be logged.
- *
- * @param exception Exception that generated the error. Used to print a stack trace.
- */
- public static void logError(String minerName, String message, Throwable exception) {
- ServerLogger.logError(minerName, message, exception);
- }
-
- /**
- * logDebugMessage
- *
- * @param minerName
- *
- * @param message Message text to be logged.
- */
- public static void logDebugMessage(String minerName, String message) {
- ServerLogger.logDebugMessage(minerName, message);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/CommandMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/CommandMiner.java
deleted file mode 100644
index f1dddf9cf..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/CommandMiner.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.command;
-
-
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.dstore.core.miners.miner.Miner;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStoreAttributes;
-import org.eclipse.dstore.core.model.DataStoreResources;
-import org.eclipse.rse.dstore.universal.miners.command.patterns.Patterns;
-import org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner;
-
-
-
-/**
- * The CommandMiner provides the ability to run remote interactive shell
- * commands via the DataStore.
- */
-public class CommandMiner extends Miner
-{
- public static final String MINER_ID = CommandMiner.class.getName();//"org.eclipse.rse.dstore.universal.miners.command.CommandMiner";
-
- public class CommandMinerDescriptors
- {
- public DataElement _stdout;
- public DataElement _stderr;
- public DataElement _prompt;
- public DataElement _grep;
- public DataElement _pathenvvar;
- public DataElement _envvar;
- public DataElement _libenvvar;
- public DataElement _error;
- public DataElement _warning;
- public DataElement _informational;
- public DataElement _process;
-
- public DataElement getDescriptorFor(String type)
- {
- DataElement descriptor = null;
- if (type.equals("stdout")) //$NON-NLS-1$
- {
- descriptor = _stdout;
- }
- else if (type.equals("pathenvvar")) //$NON-NLS-1$
- {
- descriptor = _pathenvvar;
- }
- else if (type.equals("envvar")) //$NON-NLS-1$
- {
- descriptor = _envvar;
- }
- else if (type.equals("libenvvar")) //$NON-NLS-1$
- {
- descriptor = _libenvvar;
- }
- else if (type.equals("error")) //$NON-NLS-1$
- {
- descriptor = _error;
- }
- else if (type.equals("warning")) //$NON-NLS-1$
- {
- descriptor = _warning;
- }
- else if (type.equals("informational")) //$NON-NLS-1$
- {
- descriptor = _informational;
- }
- else if (type.equals("process")) //$NON-NLS-1$
- {
- descriptor = _process;
- }
- else if (type.equals("grep")) //$NON-NLS-1$
- {
- descriptor = _grep;
- }
- else if (type.equals("stderr")) //$NON-NLS-1$
- {
- descriptor = _stderr;
- }
- return descriptor;
- }
- }
-
- private HashMap _threads = new HashMap();
- private Patterns _patterns;
- private CommandMinerDescriptors _descriptors;
-
-
- public Patterns getPatterns()
- {
- if (_patterns == null)
- {
- _patterns = new Patterns(_dataStore);
- }
- return _patterns;
- }
-
- protected ArrayList getDependencies()
- {
- ArrayList dependencies = new ArrayList();
- dependencies.add(EnvironmentMiner.MINER_ID);
- return dependencies;
- }
-
- public void extendSchema(DataElement schemaRoot)
- {
- //DataElement fsD = _dataStore.findObjectDescriptor("Filesystem Objects");
- DataElement fsD= _dataStore.findObjectDescriptor(DataStoreResources.model_directory);
- DataElement cancellable = _dataStore.findObjectDescriptor(DataStoreResources.model_Cancellable);
-
- DataElement cmdD = createCommandDescriptor(fsD, "Command", "C_COMMAND", false); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createReference(cancellable, cmdD, "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
-
- DataElement shellD = createCommandDescriptor(fsD, "Shell", "C_SHELL", false); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createReference(cancellable, shellD, "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
-
-// DataElement inputD = _dataStore.createObject(cmdD, "input", "Enter command");
- _dataStore.createObject(cmdD, "input", "Enter command"); //$NON-NLS-1$ //$NON-NLS-2$
-// DataElement outputD = _dataStore.createObject(cmdD, "output", "Command Output");
- _dataStore.createObject(cmdD, "output", "Command Output"); //$NON-NLS-1$ //$NON-NLS-2$
-
- _descriptors = new CommandMinerDescriptors();
- _descriptors._stdout = _dataStore.createObjectDescriptor(schemaRoot, "stdout"); //$NON-NLS-1$
- _descriptors._stderr = _dataStore.createObjectDescriptor(schemaRoot, "stderr"); //$NON-NLS-1$
- _descriptors._prompt = _dataStore.createObjectDescriptor(schemaRoot, "prompt"); //$NON-NLS-1$
- _descriptors._grep = _dataStore.createObjectDescriptor(schemaRoot, "grep"); //$NON-NLS-1$
- _descriptors._pathenvvar = _dataStore.createObjectDescriptor(schemaRoot, "pathenvvar"); //$NON-NLS-1$
- _descriptors._envvar = _dataStore.createObjectDescriptor(schemaRoot, "envvar"); //$NON-NLS-1$
- _descriptors._libenvvar = _dataStore.createObjectDescriptor(schemaRoot, "libenvvar"); //$NON-NLS-1$
- _descriptors._error = _dataStore.createObjectDescriptor(schemaRoot, "error"); //$NON-NLS-1$
- _descriptors._warning = _dataStore.createObjectDescriptor(schemaRoot, "warning"); //$NON-NLS-1$
- _descriptors._informational = _dataStore.createObjectDescriptor(schemaRoot, "informational"); //$NON-NLS-1$
- _descriptors._process =_dataStore.createObjectDescriptor(schemaRoot, "process"); //$NON-NLS-1$
-
-
-// DataElement getPossibleCmds = createCommandDescriptor(fsD, "Get Commands", "C_GET_POSSIBLE_COMMANDS", false);
- createCommandDescriptor(fsD, "Get Commands", "C_GET_POSSIBLE_COMMANDS", false); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.refresh(schemaRoot);
- }
-
- public DataElement handleCommand(DataElement theElement)
- {
- String name = getCommandName(theElement);
- DataElement status = getCommandStatus(theElement);
- DataElement subject = getCommandArgument(theElement, 0);
-
- if (name.equals("C_COMMAND")) //$NON-NLS-1$
- {
- DataElement invArg = getCommandArgument(theElement, 1);
- if (invArg != null)
- {
- String invocation = invArg.getName();
- //Remove All extra whitespace from the command
- if (invocation.trim().length() > 0)
- {
- if (invocation.equals("?") || invocation.equals("help")) //$NON-NLS-1$ //$NON-NLS-2$
- invocation = "cat " + theElement.getDataStore().getAttribute(DataStoreAttributes.A_PLUGIN_PATH) + "/org.eclipse.rse.services.dstore/patterns.dat"; //$NON-NLS-1$ //$NON-NLS-2$
- launchCommand(subject, invocation, status);
- }
- return status;
- }
- else
- {
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- }
- }
- else if (name.equals("C_SHELL")) //$NON-NLS-1$
- {
- String invocation = ">"; //$NON-NLS-1$
- launchCommand(subject, invocation, status);
- }
- else if (name.equals("C_SEND_INPUT")) //$NON-NLS-1$
- {
- DataElement input = getCommandArgument(theElement, 1);
-// DataElement de = (DataElement) subject.dereference().get(1);
- subject.dereference().get(1);
- sendInputToCommand(input.getName(), getCommandStatus(subject));
- }
- else if (name.equals("C_CANCEL")) //$NON-NLS-1$
- {
- DataElement de = subject.dereference().get(1);
- DataElement cancelStatus = getCommandStatus(subject);
- cancelCommand(de.getName().trim(), cancelStatus);
- return status;
- }
- else if (name.equals("C_GET_POSSIBLE_COMMANDS")) //$NON-NLS-1$
- {
- getPossibleCommands(status);
- return status;
- }
-
- return status;
- }
-
- public void getPossibleCommands(DataElement status)
- {
- QueryPathThread qpt = new QueryPathThread(status);
- qpt.start();
- }
-
- public void launchCommand(DataElement subject, String invocation, DataElement status)
- {
- //First Check to make sure that there are no "zombie" threads
- Iterator iter = _threads.keySet().iterator();
- try
- {
- while (iter.hasNext())
- {
- String threadName = (String) iter.next();
- CommandMinerThread theThread = (CommandMinerThread) _threads.get(threadName);
- if ((theThread == null) || (!theThread.isAlive()))
- {
- _threads.remove(threadName);
- }
- }
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- CommandMinerThread newCommand = new CommandMinerThread(subject, invocation, status, getPatterns(), _descriptors);
- _threads.put(status.getAttribute(DE.A_ID), newCommand);
- newCommand.start();
- }
-
- private void sendInputToCommand(String input, DataElement status)
- {
- CommandMinerThread theThread = (CommandMinerThread) _threads.get(status.getAttribute(DE.A_ID));
- if (theThread != null)
- {
- theThread.sendInput(input);
- }
- }
-
- private void cancelCommand(String theCommand, DataElement status)
- {
- CommandMinerThread theThread = (CommandMinerThread) _threads.get(status.getAttribute(DE.A_ID));
- if (theThread != null)
- {
- theThread.stopThread();
- theThread.sendExit();
-
- boolean done = false;
- long stopIn = System.currentTimeMillis() + 3000;
- while (!done)
- if ((!theThread.isAlive()) || (stopIn < System.currentTimeMillis()))
- done = true;
- _dataStore.createObject(status, "stdout", "Command Cancelled by User Request"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.refresh(status);
- }
- }
-
- public String getVersion()
- {
- return "6.4.0"; //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/CommandMinerThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/CommandMinerThread.java
deleted file mode 100644
index 12ddc6e3e..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/CommandMinerThread.java
+++ /dev/null
@@ -1,1218 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.dstore.universal.miners.command;
-
-
-
-import java.io.BufferedWriter;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.List;
-
-import org.eclipse.dstore.core.miners.miner.MinerThread;
-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.rse.dstore.universal.miners.command.patterns.ParsedOutput;
-import org.eclipse.rse.dstore.universal.miners.command.patterns.Patterns;
-import org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner;
-
-
-
-/**
- * CommandMinerThread is used for running and handling io for shell commands
- * in a thread.
- */
-public class CommandMinerThread extends MinerThread
-{
-
-
- private DataElement _status;
- private DataStore _dataStore;
- private String _invocation;
-
- private DataInputStream _stdInput;
- private DataInputStream _stdError;
-
-
- private BufferedWriter _stdOutput;
-
- private Patterns _patterns;
-
- private Process _theProcess;
- private ProcessTracker _processTracker;
-
- private DataElement _subject;
- private String _cwdStr;
- private OutputHandler _stdOutputHandler;
- private OutputHandler _stdErrorHandler;
- private boolean _isShell;
- private boolean _isDone;
- private boolean _isWindows;
- private boolean _isTTY;
- private boolean _isOS400 = false;
- private boolean _didInitialCWDQuery = false;
-
- private CommandMiner.CommandMinerDescriptors _descriptors;
-
- // default
- private String PSEUDO_TERMINAL;
-
- private DataElement _lastPrompt;
-
- public CommandMinerThread(DataElement theElement, String invocation, DataElement status, Patterns thePatterns, CommandMiner.CommandMinerDescriptors descriptors)
- {
- _isShell = false;
- _isDone = false;
- _status = status;
- _dataStore = theElement.getDataStore();
- _descriptors = descriptors;
-
- _subject = theElement;
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
-
- _invocation = invocation.trim();
- _patterns = thePatterns;
- _patterns.refresh(_invocation);
-
-
-
-
- if (theOS.toLowerCase().startsWith("os/400")) //$NON-NLS-1$
- {
- _isOS400 = true;
- }
-
- if (theOS.toLowerCase().startsWith("z")) //$NON-NLS-1$
- {
- System.setProperty("dstore.stdin.encoding","Cp037"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- _isWindows = theOS.toLowerCase().startsWith("win"); //$NON-NLS-1$
- if (!_isWindows)
- {
- PSEUDO_TERMINAL = _dataStore.getAttribute(DataStoreAttributes.A_PLUGIN_PATH) + File.separatorChar + "rseterm" + File.separatorChar + "rseterm"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- try
- {
-
- _cwdStr = theElement.getSource();
- if (_cwdStr == null || _cwdStr.length() == 0)
- {
- _cwdStr = System.getProperty("user.home"); //$NON-NLS-1$
- }
-
- File theDirectory = new File(_cwdStr);
- if (!theDirectory.isDirectory())
- theDirectory = theDirectory.getParentFile();
- try
- {
- _cwdStr = theDirectory.getAbsolutePath();
- }
- catch (Exception e)
- {
- _cwdStr = System.getProperty("user.home"); //$NON-NLS-1$
- }
- _status.setAttribute(DE.A_SOURCE, _cwdStr);
-
- String theShell = null;
- if (!_isWindows)
- {
- File psuedoTerminal = new File(PSEUDO_TERMINAL);
- if (psuedoTerminal.exists())
- {
- _isTTY = true;
- PSEUDO_TERMINAL = psuedoTerminal.getAbsolutePath();
- }
- else
- {
- _isTTY = false;
- }
- _patterns.setIsTerminal(_isTTY && !_isOS400);
-
- String property = "SHELL="; //$NON-NLS-1$
-
- String[] env = getEnvironment(_subject);
- for (int i = 0; i < env.length; i++)
- {
- String var = env[i];
- if (var.startsWith(property))
- {
- theShell = var.substring(property.length(), var.length());
- if (theShell.endsWith("bash")) //$NON-NLS-1$
- {
- theShell = "sh"; //$NON-NLS-1$
- }
- }
- if (_isOS400)
- {
- theShell = "/QOpenSys/usr/bin/sh";//var.substring(property.length(), var.length()); //$NON-NLS-1$
- }
- }
-
-
- if (theShell == null)
- {
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = "sh"; //$NON-NLS-1$
- _isShell = true;
- }
- if (_isTTY)
- {
- String args[] = new String[2];
- args[0] = PSEUDO_TERMINAL;
- args[1] = _invocation;
- _theProcess = Runtime.getRuntime().exec(args, env, theDirectory);
- }
- else
- {
- _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
- }
- }
- else
- {
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
-
- _isShell = true;
-
-
- if (_isTTY)
- {
- String args[] = null;
- {
- args = new String[4];
- args[0] = PSEUDO_TERMINAL;
- args[1] = "-w"; //$NON-NLS-1$
- args[2] = "256"; //$NON-NLS-1$
- args[3] = _invocation;
- }
-
-
- _theProcess = Runtime.getRuntime().exec(args, env, theDirectory);
- }
- else
- {
- _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
- }
- }
- else
- {
- _isTTY = false;
-
-
-
- //String[] inv = parseArgs(_invocation);
- if (_isTTY)
- {
- String args[] = new String[4];
- args[0] = PSEUDO_TERMINAL;
- args[1] = theShell;
- args[2] = "-c"; //$NON-NLS-1$
- args[3] = _invocation;
- /*
- for (int i = 0; i < inv.length; i++)
- {
- args[3 + i] = inv[i];
- }
- */
-
- _theProcess = Runtime.getRuntime().exec(args, env, theDirectory);
- }
- else
- {
-
- String args[] = new String[3];
- args[0] = theShell;
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = _invocation;
- /*
- for (int i = 0; i < inv.length; i++)
- {
- args[2 + i] = inv[i];
- }
- */
-
- _theProcess = Runtime.getRuntime().exec(args, env, theDirectory);
- }
- }
- }
- }
- else // windows
- {
- if ((theOS.indexOf("95") >= 0) || (theOS.indexOf("98") >= 0) || (theOS.indexOf("ME") >= 0)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- {
- theShell = "start"; //$NON-NLS-1$
- }
- else
- {
- theShell = "cmd"; //$NON-NLS-1$
- }
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
- _isShell = true;
- }
-
-
- String args[] = new String[3];
- args[0]= theShell;
- if (theShell.equals("start")) //$NON-NLS-1$
- {
- args[1] = "/B "; //$NON-NLS-1$
- }
- else
- {
- args[1] = "/C "; //$NON-NLS-1$
- }
- args[2] = _invocation;
-
- String[] env = getEnvironment(_subject);
-
- if (_invocation.equals(theShell))
- {
-
- _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
- }
- else
- {
- _theProcess = Runtime.getRuntime().exec(args, env, theDirectory);
- }
-
- }
-
-
-
- OutputStream output = _theProcess.getOutputStream();
- _stdInput = new DataInputStream(_theProcess.getInputStream());
- _stdError = new DataInputStream(_theProcess.getErrorStream());
-
-
- String specialEncoding = System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
-
- if (specialEncoding != null)
- {
- /*
- _stdInput = new BufferedReader(new InputStreamReader(_theProcess.getInputStream(), specialEncoding));
- _stdError = new BufferedReader(new InputStreamReader(_theProcess.getErrorStream(), specialEncoding));
- */
- try
- {
- _stdOutput = new BufferedWriter(new OutputStreamWriter(output, specialEncoding));
- }
- catch (UnsupportedEncodingException e)
- {
- _stdOutput = new BufferedWriter(new OutputStreamWriter(output));
- }
- }
- else
- {
- //_stdInput = new BufferedReader(new InputStreamReader(_theProcess.getInputStream()));
- //_stdError = new BufferedReader(new InputStreamReader(_theProcess.getErrorStream()));
- _stdOutput = new BufferedWriter(new OutputStreamWriter(output));
- }
-
- }
- catch (IOException e)
- {
- _theProcess = null;
- e.printStackTrace();
- createObject("command", e.getMessage()); //$NON-NLS-1$
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return;
- }
-
- createObject("command", _invocation); //$NON-NLS-1$
- createObject("stdout", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
-
-
- if (_isShell && !_isWindows && !_isTTY)
- {
- createPrompt(_cwdStr +">", _cwdStr); //$NON-NLS-1$
- //createObject("prompt", _cwdStr + ">");
- }
-
- status.setAttribute(DE.A_NAME, "progress"); //$NON-NLS-1$
- _dataStore.update(status);
- _dataStore.disconnectObjects(status);
- _stdOutputHandler = new OutputHandler(_stdInput, null, _isWindows || _isTTY, false, _isShell, this);
- _stdOutputHandler.setWaitTime(10);
- _stdOutputHandler.start();
- _stdErrorHandler = new OutputHandler(_stdError, null, _isWindows || _isTTY, true, _isShell, this);
- _stdErrorHandler.setWaitTime(10);
- _stdErrorHandler.start();
-
- getCurrentProccesses();
- queryCWD();
- }
-
-
-// private String[] parseArgs(String full)
-// {
-// StringBuffer result = new StringBuffer();
-// char[] chars = full.toCharArray();
-// boolean inQuotes = false;
-// boolean escaping = false;
-// for (int i = 0; i < chars.length; i++)
-// {
-// char c = chars[i];
-// if (c == '\"')
-// {
-// inQuotes = !inQuotes;
-// }
-// else
-// {
-// if (c == '\\')
-// {
-// escaping = true;
-// }
-// else
-// {
-// if (c == ' ')
-// {
-// if (!inQuotes && !escaping)
-// {
-// c = ',';
-// }
-// escaping = false;
-// }
-// }
-// result.append(c);
-// }
-//
-// }
-// return result.toString().split(",");
-// }
-
- public Process getProcess()
- {
- return _theProcess;
- }
-
- public String getCWD()
- {
- return _cwdStr;
- }
-
- public void queryCWD()
- {
- BufferedWriter writer = _stdOutput;
- try
- {
- // hidden command
- writer.write("echo '<'PWD=$PWD"); //$NON-NLS-1$
- writer.newLine();
- writer.flush();
- }
- catch (Exception e)
- {
- }
- _didInitialCWDQuery = true;
-
- }
-
- private void getCurrentProccesses()
- {
- if (!_isWindows)
- {
- /*
- if (_processTracker == null)
- {
- _processTracker = new ProcessTracker();
- _processTracker.start();
- }
- _processTracker.doUpdate();
- */
- }
- }
-
- public void sendBreak()
- {
- if (!_isWindows)
- {
- if (_processTracker != null)
- {
- _processTracker.killLastest();
- }
- }
- }
-
- public void sendInput(String input)
- {
- if (!_isDone)
- {
-
-// byte[] intoout = input.getBytes();
- input.getBytes();
-
- try
- {
- BufferedWriter writer = _stdOutput;
- // pty executable handles the break now
- if (input.equals("#break") && !_isTTY) //$NON-NLS-1$
- {
- sendBreak();
- return;
- }
- else if (input.equals("#enter")) //$NON-NLS-1$
- {
- if (_isOS400)
- {
- writer.write("\r"); //$NON-NLS-1$
- }
- else
- {
- writer.newLine();
- }
- writer.flush();
- return;
- }
-
- if (_isShell)
- {
- if (_lastPrompt != null)
- {
- if (!_isTTY)
- {
- String promptText = _lastPrompt.getName();
- if (promptText.endsWith(">")) //$NON-NLS-1$
- {
- _lastPrompt.setAttribute(DE.A_NAME, promptText + input);
- _dataStore.refresh(_lastPrompt);
- }
-
- else
- {
-// String cwd = getCWD();
-// String line = cwd + ">" + input;
- //createObject("prompt", line);
- //createPrompt(line, cwd);
- }
- }
- }
-
- _patterns.update(input);
- }
-
- if (!_isWindows && !_isTTY)
- {
- createObject("input", input); //$NON-NLS-1$
- }
-
- writer.write(input);
-
- if (_isOS400)
- {
- writer.write("\r"); //$NON-NLS-1$
- }
- else
- {
- writer.newLine();
- }
- writer.flush();
-
-
- if (!_isWindows && (input.startsWith("cd ") || input.equals("cd"))) //$NON-NLS-1$ //$NON-NLS-2$
- {
- queryCWD();
- }
- else if (!_didInitialCWDQuery)
- {
- queryCWD();
- }
- if (!_isWindows && !_isTTY)
- {
- // special case for pattern interpretting
- // if cwd is not set, then files aren't resolved
- // create mock prompt to ensure that they do get resolved
- if (input.startsWith("cd ") || input.equals("cd")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- writer.write("echo $PWD'>'"); //$NON-NLS-1$
- writer.newLine();
- writer.flush();
-
- // sleep to allow reader to interpret before going on
- try
- {
- Thread.sleep(100);
- }
- catch (InterruptedException e)
- {
- }
- }
- }
-
- _stdOutputHandler.newCommand();
- }
- catch (IOException e)
- {
- cleanupThread();
- System.out.println(e);
- }
- }
- }
- private String[] getEnvironment(DataElement theSubject)
- {
- //Grab the system environment:
- DataElement envMiner = _dataStore.findMinerInformation(EnvironmentMiner.MINER_ID);
- DataElement systemEnv = _dataStore.find(envMiner, DE.A_NAME, "System Environment", 1); //$NON-NLS-1$
- //Walk up until we find an element with an inhabits relationship.
- DataElement theProject = theSubject;
- List projectEnvReference = null;
- while (theProject != null && !theProject.getValue().equals("Data")) //$NON-NLS-1$
- {
- projectEnvReference = theProject.getAssociated("inhabits"); //$NON-NLS-1$
- if (projectEnvReference.size() > 0)
- break;
- theProject = theProject.getParent();
- }
- DataElement projectEnv = null;
- if (projectEnvReference != null && (projectEnvReference.size() > 0))
- projectEnv = (DataElement) projectEnvReference.get(0);
-
-
- String[] theEnv = mergeEnvironments(systemEnv, projectEnv);
- return theEnv;
- }
-
- private String[] mergeEnvironments(DataElement systemEnv, DataElement projectEnv)
- {
-
- List prjVars = null;
- List sysVars = null;
- //Fill the ArrayLists with the environment variables
- if (systemEnv != null)
- sysVars = systemEnv.getNestedData();
- if (projectEnv != null)
- prjVars = projectEnv.getNestedData();
- //If one or both of the ArrayLists are null, exit early:
- if ((sysVars == null) || (sysVars.size() == 0))
- return listToArray(prjVars);
- if ((prjVars == null) || (prjVars.size() == 0))
- return listToArray(sysVars);
- //If we get here, then we have both system and project variables...to make merging the 2 lists easier, we'll
- //use a Hashtable (Variable Names are the keys, Variables Values are the values):
- Hashtable varTable = new Hashtable();
-
- //First fill the varTable with the sysVars
- varTable.putAll(mapVars(sysVars));
-
- //Now for every project variable, check to see if it already exists, and if the value contains other variables:
- for (int i = 0; i < prjVars.size(); i++)
- {
- DataElement envElement = (DataElement) prjVars.get(i);
- if (!envElement.getType().equals("Environment Variable")) //$NON-NLS-1$
- continue;
- String theVariable = envElement.getValue();
- String theKey = getKey(theVariable);
- String theValue = getValue(theVariable);
- theValue = calculateValue(theValue, varTable);
- varTable.put(theKey, theValue);
- }
-
-
- if (_isTTY)
- {
- varTable.put("PS1","$PWD/>"); //$NON-NLS-1$ //$NON-NLS-2$
- varTable.put("COLUMNS","256"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-
- /* DKM: for some reason this isn't getting applied properly here
- * but it works via export
- * */
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
- if (theOS.toLowerCase().startsWith("os")) //$NON-NLS-1$
- {
- varTable.put("QIBM_JAVA_STDIO_CONVERT","Y"); //$NON-NLS-1$ //$NON-NLS-2$
- varTable.put("QIBM_USE_DESCRIPTOR_STDIO","I"); //$NON-NLS-1$ //$NON-NLS-2$
- varTable.put("PASE_STDIO_ISATTY","N"); //$NON-NLS-1$ //$NON-NLS-2$
- varTable.put("TERMINAL_TYPE","REMOTE"); //$NON-NLS-1$ //$NON-NLS-2$
- varTable.put("STDIO_ISATTY","Y"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-
-
- return tableToArray(varTable);
- } //This method is responsible for replacing variable references with their values.
- //We support 3 methods of referencing a variable (assume we are referencing a variable called FOO):
- // 1. $FOO - common to most shells (must be followed by a non-alphanumeric or nothing...in other words, we
- // always construct the longest name after the $)
- // 2. ${FOO} - used when you want do something like ${FOO}bar, since $FOObar means a variable named FOObar not
- // the value of FOO followed by "bar".
- // 3. %FOO% - Windows command interpreter
- private String calculateValue(String value, Hashtable theTable)
- {
- value = value.replaceAll("}","\n}"); //$NON-NLS-1$ //$NON-NLS-2$
- StringBuffer theValue = new StringBuffer(value);
- try
- {
- int index = 0;
- char c;
- while (index < theValue.length())
- {
- c = theValue.charAt(index);
- if (c == '{')
- {
- index++;
- c = theValue.charAt(index);
- // skip everything til end quote
- while (index < theValue.length() && c != '}')
- {
- index++;
- c = theValue.charAt(index);
- }
- }
- //If the current char is a $, then look for a { or just match alphanumerics
- else if (c == '$' && !_isWindows)
- {
- int nextIndex = index + 1;
- if (nextIndex < theValue.length())
- {
- c = theValue.charAt(nextIndex);
- //If there is a { then we just look for the closing }, and replace the span with the variable value
- if (c == '{')
- {
- int next = theValue.toString().indexOf("}", nextIndex); //$NON-NLS-1$
- if (next > 0)
- {
- String replacementValue = findValue(theValue.substring(nextIndex + 1, next), theTable, true);
- theValue.replace(index, next + 1, replacementValue);
- index += replacementValue.length() - 1;
- }
- } //If there is no { then we just keep matching alphanumerics to construct the longest possible variable name
- else
- {
- if (Character.isJavaIdentifierStart(c))
- {
- while (nextIndex + 1 < theValue.length() && (Character.isJavaIdentifierPart(c)))
- {
- nextIndex++;
- c = theValue.charAt(nextIndex);
- }
-
- String v = theValue.substring(index + 1, nextIndex);
- String replacementValue = findValue(v, theTable, true);
- theValue.replace(index, nextIndex, replacementValue);
- index += replacementValue.length() - 1;
- }
- }
- }
- } //If the current char is a %, then simply look for a matching %
- else if (c == '%')
- {
- int next = theValue.toString().indexOf("%", index + 1); //$NON-NLS-1$
- if (next > 0)
- {
- String replacementValue = findValue(theValue.substring(index + 1, next), theTable, false);
- theValue.replace(index, next + 1, replacementValue);
- index += replacementValue.length() - 1;
- }
- }
- else if (c == '"')
- {
- index++;
- c = theValue.charAt(index);
- // skip everything til end quote
- while (index < theValue.length() && c != '"')
- {
- index++;
- c = theValue.charAt(index);
- }
-
- }
-
- index++;
- }
- }
- catch (Throwable e)
- {
- e.printStackTrace();
- }
- return theValue.toString();
- }
- private String findValue(String key, Hashtable theTable, boolean caseSensitive)
- {
- Object theValue = null;
- if (caseSensitive)
- theValue = theTable.get(key);
- else
- {
- String matchString = key.toUpperCase();
- for (Enumeration e = theTable.keys(); e.hasMoreElements();)
- {
- String theKey = (String) e.nextElement();
- if (matchString.equals(theKey.toUpperCase()))
- theValue = theTable.get(theKey);
- }
- }
- if (theValue == null)
- return ""; //$NON-NLS-1$
- return (String) theValue;
- }
- private String getKey(String var)
- {
- int index = var.indexOf("="); //$NON-NLS-1$
- if (index < 0)
- return var;
- return var.substring(0, index);
- }
- private String getValue(String var)
- {
- var = var.replaceAll("}","\n}"); //$NON-NLS-1$ //$NON-NLS-2$
- int index = var.indexOf("=") + 1; //$NON-NLS-1$
- int varLength = var.length();
- if ((index < 1) || (index == var.length()))
- return ""; //$NON-NLS-1$
- return var.substring(index, varLength);
- }
- private Hashtable mapVars(List theVars)
- {
- Hashtable theTable = new Hashtable();
- int theSize = theVars.size();
- for (int i = 0; i < theSize; i++)
- {
- String theVar = ((DataElement) theVars.get(i)).getValue();
- theTable.put(getKey(theVar), getValue(theVar));
- }
- return theTable;
- }
- private String[] listToArray(List theList)
- {
- if (theList == null)
- theList = new ArrayList();
- int theSize = theList.size();
- String theArray[] = new String[theSize];
- for (int i = 0; i < theSize; i++)
- theArray[i] = ((DataElement) theList.get(i)).getValue();
- return theArray;
- }
- private String[] tableToArray(Hashtable theTable)
- {
- if (theTable == null)
- theTable = new Hashtable();
- int theSize = theTable.size();
- String theArray[] = new String[theSize];
- int i = 0;
- for (Enumeration e = theTable.keys(); e.hasMoreElements();)
- {
- String theKey = (String) e.nextElement();
- String theValue = (String) theTable.get(theKey);
- theArray[i++] = theKey + "=" + theValue; //$NON-NLS-1$
- }
- return theArray;
- }
- public boolean doThreadedWork()
- {
-
- if (((_stdOutputHandler == null) || _stdOutputHandler.isFinished()) && ((_stdErrorHandler == null) || _stdErrorHandler.isFinished()))
- {
- return false;
- }
- else
- {
- return true;
- }
- }
- public void initializeThread()
- {
- }
-
- public void sendExit()
- {
- if (_isShell)
- {
- sendInput("exit"); //$NON-NLS-1$
- }
- }
-
- public void cleanupThread()
- {
- /*
- if (_isShell)
- {
- sendInput("#exit");
- }*/
-
- _isDone = true;
- try
- {
- _status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- _dataStore.refresh(_status, true);
- _stdOutputHandler.finish();
- _stdErrorHandler.finish();
- _stdInput.close();
- _stdError.close();
- if (_theProcess != null)
- {
- int exitcode;
- try
- {
- if (_isCancelled)
- {
- _theProcess.destroy();
- }
- else
- {
- exitcode = _theProcess.exitValue();
- createObject("prompt", "> Shell Completed (exit code = " + exitcode + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- catch (IllegalThreadStateException e)
- { //e.printStackTrace();
- exitcode = -1;
- _theProcess.destroy();
- }
- _theProcess = null;
- }
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
-
- public void interpretLine(String line, boolean stdError)
- {
- // for prompting
- if (line.startsWith("<PWD")) //$NON-NLS-1$
- {
- // special processing
- String statement = line.substring(1);
- String pair[] = statement.split("="); //$NON-NLS-1$
-// String key = pair[0];
- String value = pair[1];
- _status.setAttribute(DE.A_SOURCE, value);
-
- return;
- }
- if (line.indexOf("echo '<'PWD=$PWD") > 0) //$NON-NLS-1$
- {
- // ignore this line
- return;
- }
-
- ParsedOutput parsedMsg = null;
-
- try
- {
- parsedMsg = _patterns.matchLine(removeWhitespace(line));
- }
- catch (Throwable e)
- {
- e.printStackTrace();
- }
-
- if (parsedMsg == null)
- {
-
- if (stdError)
- {
-
- createObject(_descriptors._stderr, line);
- }
- else
- {
- createObject(_descriptors._stdout, line);
- }
- }
- else
- {
- try
- {
- String fileName = parsedMsg.file;
-// DataElement object = null;
- if (parsedMsg.type.equals("prompt")) //$NON-NLS-1$
- {
- File promptFile = new File(fileName);
- if (promptFile.exists())
- {
- createPrompt(line, fileName);
- }
- else
- {
- createObject(_descriptors._stdout, line);
- }
- }
- else if (parsedMsg.type.equals("file")) //$NON-NLS-1$
- {
-// object = createObject(parsedMsg.type, line, fileName, null);
- createObject(parsedMsg.type, line, fileName, null);
- }
- else
- {
-// object = createObject(parsedMsg.type, line, fileName, new Integer(parsedMsg.line));
- createObject(parsedMsg.type, line, fileName, new Integer(parsedMsg.line));
- }
-
- }
- catch (NumberFormatException e)
- {
- e.printStackTrace();
- }
- }
-
- _dataStore.refresh(_status);
- _dataStore.disconnectObjects(_status);
- }
-
- public void createPrompt(String line, String fileName)
- {
- // prevent duplicate prompts
- DataElement object = null;
- int size = _status.getNestedSize();
- if (size > 0)
- {
- DataElement lastObject = _status.get(size - 1);
- if (!lastObject.getType().equals("prompt")) //$NON-NLS-1$
- {
- line = line.replaceAll("//", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- fileName = fileName.replaceAll("//", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- object = createObject("prompt", line, fileName, null); //$NON-NLS-1$
-
- _lastPrompt = object;
- _cwdStr = object.getSource();
- }
- }
- }
-
- public String removeWhitespace(String theLine)
- {
- StringBuffer strippedLine = new StringBuffer();
- boolean inWhitespace = true;
- char curChar;
- for (int i = 0; i < theLine.length(); i++)
- {
- curChar = theLine.charAt(i);
- if (curChar == '\t')
- {
- if (!inWhitespace)
- {
- strippedLine.append(' ');
- inWhitespace = true;
- }
- }
- else if (curChar == ' ')
- {
- if (!inWhitespace)
- {
- strippedLine.append(' ');
- inWhitespace = true;
- }
- }
- else
- {
- strippedLine.append(curChar);
- inWhitespace = false;
- }
- }
- return strippedLine.toString();
- }
-
- /************************************************************************************************
- private void createObject (String,String)
- Create a simple object with no source information
- *************************************************************************************************/
- public DataElement createObject(String type, String text)
- {
- DataElement newObj = null;
- DataElement descriptorType = _descriptors.getDescriptorFor(type);
- if (descriptorType != null)
- {
- newObj = _dataStore.createObject(_status, descriptorType, text, ""); //$NON-NLS-1$
- }
- else
- {
- newObj = _dataStore.createObject(_status, type, text, ""); //$NON-NLS-1$
- }
- return newObj;
- }
-
- public DataElement createObject(DataElement type, String text)
- {
- return _dataStore.createObject(_status, type, text, ""); //$NON-NLS-1$
- }
-
- /************************************************************************************************
- private void createObject (String,String,String,Integer,Integer)
-
- Create an object that can contain file information as well as line an column.
- Note: currently our editors do not support jumping to a column, so neither
- do we here.
- *************************************************************************************************/
- private DataElement createObject(String type, String text, String file, Integer line)
- {
- DataElement descriptorType = null;
- if (file != null && file.length() > 0)
- {
- boolean foundFile = false;
- String expectedPath = null;
- File aFile = new File(file);
- if (type.equals("prompt")) //$NON-NLS-1$
- {
- descriptorType = _descriptors._prompt;
- expectedPath = file;
- _cwdStr = file.replaceAll("//", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (aFile.exists())
- {
- expectedPath = aFile.getAbsolutePath();
- file = expectedPath;
- if (aFile.isDirectory() && type.equals("file")) //$NON-NLS-1$
- {
- type = "directory"; //$NON-NLS-1$
- }
- foundFile = true;
- }
- else if (_cwdStr.endsWith("/")) //$NON-NLS-1$
- {
- if (file.equals("/")) //$NON-NLS-1$
- {
- expectedPath = _cwdStr;
- }
- else
- {
- expectedPath = _cwdStr + file;
- }
- }
- else
- {
- expectedPath = _cwdStr + "/" + file; //$NON-NLS-1$
- }
-
- if (!foundFile)
- {
-
- File qfile = new File(expectedPath);
- if (!qfile.exists())
- {
- expectedPath = file;
- qfile = new File(expectedPath);
- if (qfile.exists())
- {
- if (qfile.isDirectory() && type.equals("file")) //$NON-NLS-1$
- {
- type = "directory"; //$NON-NLS-1$
- }
- }
- else
- {
- File cwdFile = new File(_cwdStr);
- String cwdParent = cwdFile.getAbsolutePath();
- if (cwdFile.getParent() != null)
- {
- cwdParent = cwdFile.getParentFile().getAbsolutePath();
- }
-
- if (cwdParent.endsWith("/")) //$NON-NLS-1$
- {
- expectedPath = cwdParent + file;
- }
- else
- {
- expectedPath = cwdParent + "/" + file; //$NON-NLS-1$
- }
-
- qfile = new File(expectedPath);
- if (qfile.exists())
- {
- if (qfile.isDirectory() && type.equals("file")) //$NON-NLS-1$
- {
- type = "directory"; //$NON-NLS-1$
- }
- file = expectedPath;
- }
- else
- {
- // no match, so can't be a file
- if (type.equals("file")) //$NON-NLS-1$
- {
- type = "stdout"; //$NON-NLS-1$
- descriptorType = _descriptors._stdout;
- }
- else if (type.equals("error")) //$NON-NLS-1$
- {
- type = "stderr"; //$NON-NLS-1$
- descriptorType = _descriptors._stderr;
- }
- else
- {
- type = "stdout"; //$NON-NLS-1$
- descriptorType = _descriptors._stdout;
- }
- }
- }
- }
- else
- {
- if (qfile.isDirectory() && type.equals("file")) //$NON-NLS-1$
- {
- type = "directory"; //$NON-NLS-1$
- expectedPath = expectedPath.replaceAll("//", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- file = expectedPath;
- }
- }
-
-
- DataElement obj = null;
- if (line == null || (line.intValue() == 1))
- {
- if (descriptorType != null)
- {
- obj = _dataStore.createObject(_status, descriptorType, text, file);
- }
- else
- {
- obj = _dataStore.createObject(_status, type, text, file);
- }
- }
- else
- {
- if (descriptorType != null)
- {
- obj = _dataStore.createObject(_status, descriptorType, text, file);
- }
- else
- {
- obj = _dataStore.createObject(_status, type, text, file);
- }
- obj.setAttribute(DE.A_SOURCE, obj.getSource() + ':' + line.toString());
- }
- _dataStore.refresh(_status);
- _dataStore.disconnectObjects(_status);
- return obj;
- }
- else
- {
-
- return createObject(type, text);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/OutputHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/OutputHandler.java
deleted file mode 100644
index 30bd0b9a1..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/OutputHandler.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.command;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.dstore.core.model.Handler;
-
-/**
- * The OutputHandler class is used to listen to a particular output or error stream,
- * interpret that information and create DataElements for it for use on the client.
- */
-public class OutputHandler extends Handler
-{
-
- private DataInputStream _reader;
- private boolean _isStdError;
- private boolean _isTerminal;
-
- private CommandMinerThread _commandThread;
- private boolean _isShell;
-// private static int MAX_OFFSET = 10000;
- private boolean _endOfStream = false;
-
-
- private List _encodings;
-
-
- public OutputHandler(DataInputStream reader, String qualifier, boolean isTerminal, boolean isStdError, boolean isShell, CommandMinerThread commandThread)
- {
- _reader = reader;
- _isStdError = isStdError;
- _isTerminal = isTerminal;
- _commandThread = commandThread;
- _isShell = isShell;
- _encodings = new ArrayList();
- String system = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
-
- if (system.startsWith("z")) //$NON-NLS-1$
- {
- _encodings.add("IBM-1047"); //$NON-NLS-1$
- /*
- _encodings.add("Cp1047");
- _encodings.add("Cp037");
- _encodings.add("UTF8");
- */
- }
- else
- {
- String specialEncoding = System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
- if (specialEncoding != null)
- {
- _encodings.add(specialEncoding);
- }
- _encodings.add(System.getProperty("file.encoding")); //$NON-NLS-1$
- }
-
- }
-
- public void newCommand()
- {
- }
-
- public void handle()
- {
- String[] lines = readLines();
- if (lines != null)
- {
-
- /*
- if (lines.length == 0)
- {
- _reader.
- }
-
- // don't do anything unless we require output
- if (_newCommand && !_isTerminal)
- {
- doPrompt();
- }
- }
- else
- */
- for (int i = 0; i < lines.length; i++)
- {
- String line = lines[i];
- _commandThread.interpretLine(line, _isStdError);
- }
- if (!_isTerminal)
- doPrompt();
- }
- else
- {
- finish();
- }
- }
-
- private void doPrompt()
- {
- try
- {
- if ((_reader.available() == 0) && !_isStdError && _isShell)
- {
- if (!_isTerminal)
- {
- try
- {
- Thread.sleep(500);
- if (_reader.available() == 0)
- {
- // create fake prompt
- _commandThread.createPrompt(_commandThread.getCWD() + '>', _commandThread.getCWD());
- }
- }
- catch (Exception e)
- {
- }
- }
- }
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
-
- public synchronized void waitForInput()
- {
- try
- {
- Thread.sleep(100);
- }
- catch (Exception e)
- {
-
- }
- }
-
-
- private String[] readLines()
- {
- if (_endOfStream)
- {
- return null;
- }
- String[] output = null;
-
- try
- {
-
- // find out how many bytes are available to be read
- int available = _reader.available();
- int lookahead = 0;
-
- // if there's none, wait a bit and return true to continue
- if (available <= 0)
- {
- sleep(100);
- available = _reader.available();
-
- if (available == 0)
- {
- lookahead = _reader.read();
- if (lookahead == -1)
- {
- return null;
- }
- else
- {
- available = _reader.available() + 1;
- }
- }
- }
-
- byte[] readBytes = new byte[available];
-
- // read the available bytes
- int numRead = 0;
- if (lookahead > 0)
- {
- readBytes[0] = (byte)lookahead;
- numRead = _reader.read(readBytes, 1, available - 1) + 1;
- }
- else
- {
- numRead = _reader.read(readBytes, 0, available);
- }
-
- // if we've reached end of stream, quit
- if (numRead == -1)
- {
- return null;
- }
-
-
- if (readBytes[numRead - 1]== -1)
- {
- _endOfStream = true;
- }
-
- // use various encodings as a precaution
- // note that the first encoding will be the encoding that we were given
- int encodingIndex = 0;
-
- while (encodingIndex < _encodings.size())
- {
- String encoding = (String)(_encodings.get(encodingIndex));
-
- // get the output using the encoding
- try
- {
- String fullOutput = new String(readBytes, 0, numRead, encoding);
-
- // if output is not null, we assume the encoding was correct and process the output
-
- // tokenize the output so that we can get each line of output
- // the delimiters are therefore set to "\n\r"
- StringTokenizer tokenizer = new StringTokenizer(fullOutput, "\n\r"); //$NON-NLS-1$
- int numTokens = tokenizer.countTokens();
- output = new String[numTokens];
- int index = 0;
- while (tokenizer.hasMoreTokens())
- {
- output[index] = tokenizer.nextToken();
- index++;
- }
-
-
- return output;
- }
- catch (Exception e)
- {
- }
- }
- }
- catch (Exception e)
- {
-
- }
- return output;
- }
-/*
- private String readLine()
- {
-
-
- int ch;
- boolean done = false;
- int byteArrayOffset = 0;
- while (!done && !isFinished() && (byteArrayOffset < MAX_OFFSET))
- {
- try
- {
- //synchronized (_reader)
- {
-
- if (byteArrayOffset > 0 && (_reader.available() == 0))
- {
- try
- {
- Thread.sleep(_waitIncrement);
- }
- catch (InterruptedException e)
- {
- }
- if (_reader.available() == 0)
- {
- _isWaiting = true;
- done = true;
- //System.out.println("return nothiong");
- //return "";
- }
-
- }
-
- ch = _reader.read();
-
- _isWaiting = false;
- switch (ch)
- {
- case -1 :
- case 65535 :
- if (byteArrayOffset == 0) //End of Reader
- {
- return null;
- }
- done = true;
- break;
-
- case 10 : // new line
- case 13 : // carriage return
- done = true; //Newline
- break;
-
- case 27:
- break;
-
- case 9 :
-
-
- // DKM - test - can we preserve tabs?
- _byteArray[byteArrayOffset++] = (byte)ch;
-
- //theLine.append(" "); //Tab
- break;
-
- default :
- char tch = (char) ch;
- if (!Character.isISOControl(tch))
- {
- //System.out.println("char="+tch);
- _byteArray[byteArrayOffset++] = (byte)ch;
- }
- else
- {
- //System.out.println("ignoring:"+ch);
- // ignore next char too
- if (_reader.available() > 0)
- _reader.read();
- }
- break;
- }
-
-
- //Check to see if the BufferedReader is still ready which means there are more characters
- //in the Buffer...If not, then we assume it is waiting for input.
- if (_reader.available() == 0)
- {
- //wait to make sure
- try
- {
- Thread.sleep(_waitIncrement);
- }
- catch (InterruptedException e)
- {
- }
- if (_reader.available() == 0)
- {
- _isWaiting = true;
- done = true;
- }
- }
- }
- }
- catch (IOException e)
- {
- return null;
- }
- }
-
- String lineObject = null;
- if (byteArrayOffset > 0)
- {
-
- int encodingIndex = 0;
- //printEncodedLines(_byteArray, 0, byteArrayOffset);
-
-
- while (lineObject == null && encodingIndex < _encodings.size())
- {
- lineObject = getEncodedLine(_byteArray, 0, byteArrayOffset, (String) _encodings.get(encodingIndex));
- encodingIndex++;
- }
-
- if (lineObject == null)
- {
- lineObject = new String(_byteArray, 0, byteArrayOffset);
- }
- }
- else
- {
- lineObject ="";
- }
-
-
- return lineObject;
- }
- */
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/ProcessTracker.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/ProcessTracker.java
deleted file mode 100644
index cac9debcf..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/ProcessTracker.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.command;
-
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.dstore.core.model.Handler;
-
-
-public class ProcessTracker extends Handler
-{
-
- private class ProcessDescriptor
- {
- private String _pid;
- private String _cmd;
-
- public ProcessDescriptor(String pid, String cmd)
- {
- _pid = pid;
- _cmd = cmd;
- }
-
- public String getPID()
- {
- return _pid;
- }
-
- public String getCMD()
- {
- return _cmd;
- }
-
- public String toString()
- {
- String result = getPID() + " " + getCMD(); //$NON-NLS-1$
- if (ProcessDescriptor.this == _newestProcess)
- {
- result += " *"; //$NON-NLS-1$
- }
- return result;
- }
-
- public boolean hasCMD(String cmdname)
- {
- StringTokenizer tokenizer = new StringTokenizer(_cmd, "/"); //$NON-NLS-1$
-
- while (tokenizer.hasMoreTokens())
- {
- String token = tokenizer.nextToken();
- if (!tokenizer.hasMoreElements())
- {
- if (token.equals(cmdname))
- {
- return true;
- }
- }
- }
- return false;
- }
-
- public boolean equals(Object obj)
- {
- if (obj instanceof ProcessDescriptor)
- {
- ProcessDescriptor des = (ProcessDescriptor) obj;
- if (des.getPID().equals(_pid))
- {
- return true;
- }
- }
-
- return false;
- }
- }
-
- private Process _psShell;
-
- private BufferedReader _psReader;
- private BufferedWriter _psWriter;
-
- private boolean _updateFlag;
- private ProcessDescriptor _newestProcess;
- private String _psCommand;
- private boolean _isEnabled;
-
- private List _currentProcesses = new ArrayList();
-
- public ProcessTracker()
- {
- super();
- init();
- }
-
- private String getFormatOptions(String theOS)
- {
- String formatOptions = ""; //$NON-NLS-1$
- if (theOS.startsWith("z")) //$NON-NLS-1$
- {
- formatOptions = "-o pid,comm"; //$NON-NLS-1$
- }
- else if (theOS.startsWith("linux")) //$NON-NLS-1$
- {
- formatOptions = "--format pid,ucomm"; //$NON-NLS-1$
- }
- else if (theOS.startsWith("aix")) //$NON-NLS-1$
- {
- formatOptions = "-F pid,ucomm"; //$NON-NLS-1$
- }
- return formatOptions;
- }
-
- private void init()
- {
- String userID = System.getProperty("user.name"); //$NON-NLS-1$
- String userOptions = "-u " + userID; //$NON-NLS-1$
-
- String theOS = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- String formatOptions = getFormatOptions(theOS);
- if (formatOptions.length() == 0)
- {
- _isEnabled = false;
- }
- else
- {
- _isEnabled = true;
- }
- if (_isEnabled)
- {
-
- _psCommand = "ps " + userOptions + " " + formatOptions; //$NON-NLS-1$ //$NON-NLS-2$
- try
- {
-
- if (_psShell == null)
- {
- _psShell = Runtime.getRuntime().exec("sh"); //$NON-NLS-1$
-
- String specialEncoding = System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
- if (specialEncoding != null)
- {
- _psReader = new BufferedReader(new InputStreamReader(_psShell.getInputStream(), specialEncoding));
- try
- {
- _psWriter = new BufferedWriter(new OutputStreamWriter(_psShell.getOutputStream(), specialEncoding));
- }
- catch (UnsupportedEncodingException e)
- {
- _psWriter = new BufferedWriter(new OutputStreamWriter(_psShell.getOutputStream()));
- }
- }
- else
- {
- _psReader = new BufferedReader(new InputStreamReader(_psShell.getInputStream()));
- _psWriter = new BufferedWriter(new OutputStreamWriter(_psShell.getOutputStream()));
- }
- }
- }
- catch (Exception e)
- {
- }
- }
- }
-
- private static String readLine(BufferedReader reader)
- {
- StringBuffer theLine = new StringBuffer();
- int ch;
- boolean done = false;
- while (!done)
- {
- try
- {
- synchronized (reader)
- {
- if (!reader.ready())
- {
- return theLine.toString();
- }
- ch = reader.read();
- switch (ch)
- {
- case -1 :
- if (theLine.length() == 0) //End of Reader
- return null;
- done = true;
- break;
- case 65535 :
- if (theLine.length() == 0)
- return null;
- done = true;
- break;
- case 10 :
- done = true; //Newline
- break;
- case 13 :
- done = true;
- break; //Carriage Return
- default :
- char tch = (char) ch;
- if (!Character.isISOControl(tch))
- {
- theLine.append(tch); //Any other character
- }
- else
- {
- // ignore next char too
- if (reader.ready())
- reader.read();
- }
- break;
- //Any other character
- }
- //Check to see if the BufferedReader is still ready which means there are more characters
- //in the Buffer...If not, then we assume it is waiting for input.
- if (!reader.ready())
- {
- done = true;
- }
- }
- }
- catch (IOException e)
- {
- return null;
- }
- }
- return theLine.toString();
- }
-
- private void getCurrentProcesses()
- {
- try
- {
- _psWriter.write(_psCommand);
- _psWriter.write("\n"); //$NON-NLS-1$
- _psWriter.flush();
-
- // skip first line
- String line = _psReader.readLine();
- ArrayList newPIDs = new ArrayList();
- line = readLine(_psReader);
- while (line != null && line.length() > 0)
- {
- line = line.trim();
- int firstBlank = line.indexOf(' ');
- if (firstBlank != -1)
- {
- String pid = line.substring(0, firstBlank);
- String cmd = line.substring(firstBlank + 1, line.length());
- ProcessDescriptor descriptor = new ProcessDescriptor(pid, cmd);
- if (!descriptor.hasCMD("ps")) //$NON-NLS-1$
- {
- newPIDs.add(descriptor);
- }
- }
-
- line = readLine(_psReader);
- }
- updateProcesses(newPIDs);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- //listProcesses();
- }
-
- public void finish()
- {
- _updateFlag = false;
- if (_isEnabled)
- {
- endTrackerProcess();
- }
- super.finish();
- }
-
- private void updateProcesses(ArrayList newPIDs)
- {
- boolean firstRun = _currentProcesses.size() == 0;
- // remove finished pids
- for (int c = _currentProcesses.size() - 1; c >= 0; c--)
- {
- ProcessDescriptor p = (ProcessDescriptor) _currentProcesses.get(c);
- if (newPIDs.contains(p))
- {
- newPIDs.remove(p);
- }
- else
- {
- _currentProcesses.remove(p);
- }
- }
-
- // add new pids
- for (int i = 0; i < newPIDs.size(); i++)
- {
- ProcessDescriptor p = (ProcessDescriptor) newPIDs.get(i);
- _currentProcesses.add(p);
- if (!firstRun)
- {
- _newestProcess = p;
- }
- }
- }
-
- public void endTrackerProcess()
- {
- if (_isEnabled)
- {
- try
- {
- _psWriter.write("exit"); //$NON-NLS-1$
- _psWriter.write("\n"); //$NON-NLS-1$
- _psWriter.flush();
-
- _psReader.close();
- _psWriter.close();
- _psShell.waitFor();
- }
- catch (Exception e)
- {
- }
- }
- }
-
- public ProcessDescriptor getNewestProcess()
- {
- return _newestProcess;
- }
-
- private ProcessDescriptor findLast(String cmd)
- {
- if (_newestProcess != null && _newestProcess.hasCMD(cmd))
- {
- return _newestProcess;
- }
- for (int i = _currentProcesses.size() - 1; i > 0; i--)
- {
- ProcessDescriptor descriptor = (ProcessDescriptor) _currentProcesses.get(i);
- if (descriptor.hasCMD(cmd))
- {
- return descriptor;
- }
- }
- return null;
- }
-
- public void killCommand(String cmd)
- {
- ProcessDescriptor descriptor = findLast(cmd);
- if (descriptor != null)
- {
- kill(descriptor);
- }
- }
-
- public void killLastest()
- {
- if (_newestProcess != null)
- {
- kill(_newestProcess);
- }
- }
-
- private void kill(ProcessDescriptor descriptor)
- {
- if (_isEnabled)
- {
- try
- {
- _psWriter.write("kill " + descriptor.getPID()); //$NON-NLS-1$
- _psWriter.write("\n"); //$NON-NLS-1$
- _psWriter.flush();
- _psReader.reset();
- }
- catch (Exception e)
- {
- }
- doUpdate();
- }
- }
-
- public void handle()
- {
- if (!_isEnabled)
- {
- finish();
- }
- if (_updateFlag)
- {
- try
- {
- Thread.sleep(100);
- }
- catch (Exception e)
- {
- }
- getCurrentProcesses();
- _updateFlag = false;
- }
- }
-
- public void doUpdate()
- {
- if (_isEnabled)
- _updateFlag = true;
- else
- _updateFlag = false;
- }
-
- public synchronized void waitForInput()
- {
- try
- {
- Thread.sleep(100);
- }
- catch (Exception e)
- {
-
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/QueryPathThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/QueryPathThread.java
deleted file mode 100644
index 3e3eeb923..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/QueryPathThread.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.command;
-
-
-
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner;
-
-/**
- * QueryPathThread is used to determine available command completions
- */
-public class QueryPathThread extends Thread
-{
-
- private DataStore _dataStore;
- private DataElement _status;
-
- public QueryPathThread(DataElement status)
- {
- super();
- _status = status;
- _dataStore = status.getDataStore();
- }
-
- public void run()
- {
- getPossibleCommands(_status);
-
- }
-
- public List getPathEnvironment()
- {
- DataElement envMinerData = _dataStore.findMinerInformation(EnvironmentMiner.MINER_ID);
- if (envMinerData != null)
- {
- DataElement systemEnvironment = _dataStore.find(envMinerData, DE.A_NAME, "System Environment", 1); //$NON-NLS-1$
- if (systemEnvironment != null)
- {
- // d54675
- // for Windows, ignore the case sensitiveness of PATH variable
- boolean isIgnoreCase = System.getProperty("os.name").toLowerCase().startsWith("win"); //$NON-NLS-1$ //$NON-NLS-2$
- ArrayList vars = _dataStore.searchForPattern(systemEnvironment, DE.A_NAME, "PATH=*", isIgnoreCase); //$NON-NLS-1$
-
- if (vars == null || vars.size() == 0) {
- return new ArrayList();
- }
-
- DataElement pathVariable = (DataElement) vars.get(0);
- if (pathVariable != null)
- {
- String varStr = pathVariable.getValue();
- int separatorIndex = varStr.indexOf("="); //$NON-NLS-1$
- if (separatorIndex > 0)
- {
- varStr = varStr.substring(separatorIndex + 1, varStr.length());
- }
-
- return parsePathEnvironmentVariable(varStr);
- }
- }
- }
- return null;
- }
-
- protected List parsePathEnvironmentVariable(String path)
- {
- ArrayList addedPaths = new ArrayList();
- ArrayList addedFolders = new ArrayList();
-
- boolean isWindows = System.getProperty("os.name").toLowerCase().startsWith("win"); //$NON-NLS-1$ //$NON-NLS-2$
- char separator = isWindows ? ';' : ':';
- StringTokenizer tokenizer = new StringTokenizer(path, separator + ""); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens())
- {
- String token = tokenizer.nextToken();
- if (!addedPaths.contains(token))
- {
- addedPaths.add(token);
-
- File folder = new File(token);
- if (folder.exists() && folder.isDirectory())
- {
- addedFolders.add(folder);
- }
- }
- }
- return addedFolders;
- }
-
- public void getPossibleCommands(DataElement status)
- {
- List resolvedPaths = new ArrayList();
- List paths = getPathEnvironment();
- for (int i = 0; i < paths.size(); i++)
- {
- File folder = (File) paths.get(i);
- String abspath = folder.getAbsolutePath().toLowerCase();
- if (!resolvedPaths.contains(abspath))
- {
- resolveCommandsInPath(folder, status);
- resolvedPaths.add(abspath);
- }
- }
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- _dataStore.refresh(status);
- _dataStore.disconnectObjects(status);
- }
-
- private void resolveCommandsInPath(File file, DataElement status)
- {
- if (file.isDirectory())
- {
- File[] files = file.listFiles();
- for (int i = 0; i < files.length; i++)
- {
- File afile = files[i];
- if (afile.isFile() && !afile.isHidden())
- {
- String name = afile.getName();
- DataElement fileObj = _dataStore.createObject(status, "file", name); //$NON-NLS-1$
- fileObj.setAttribute(DE.A_SOURCE, afile.getAbsolutePath());
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/CommandPattern.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/CommandPattern.java
deleted file mode 100644
index 6c226a19a..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/CommandPattern.java
+++ /dev/null
@@ -1,77 +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.dstore.universal.miners.command.patterns;
-
-import java.util.ArrayList;
-import java.util.regex.Pattern;
-
-/**
- * This class represents a command pattern. It contains a list of
- * output patterns representing the types of output expected from
- * running a command. CommandPattern is used to produce <code>ParsedOutput</code>,
- * enabling output interpretation.
- */
-public class CommandPattern
-{
-
-
- private Pattern _pattern;
- private ArrayList _outputPatterns;
-
- public CommandPattern(Pattern theCommandPattern)
- {
- _pattern = theCommandPattern;
- _outputPatterns = new ArrayList();
- }
-
- public String getPattern()
- {
- return _pattern.pattern();
- }
-
- public void addOutputPattern(OutputPattern op)
- {
- _outputPatterns.add(op);
- }
-
- public boolean matchCommand(String theLine)
- {
- return _pattern.matcher(theLine).matches();
- }
-
- public ParsedOutput matchLine(String theLine)
- {
-
- int patterns = _outputPatterns.size();
- ParsedOutput matchedOutput;
- OutputPattern curPattern;
- for (int i = 0; i < patterns; i++)
- {
- curPattern = (OutputPattern) _outputPatterns.get(i);
-
-
- matchedOutput = curPattern.matchLine(theLine);
-
- if (matchedOutput != null)
- return matchedOutput;
- }
-
-
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/OutputPattern.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/OutputPattern.java
deleted file mode 100644
index f3927af76..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/OutputPattern.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.dstore.universal.miners.command.patterns;
-
-import java.util.ArrayList;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-
-public class OutputPattern
-{
-
-
- private Pattern _pattern;
- private String _objType;
- private ArrayList _matchOrder;
-
- public OutputPattern(String objType, String matchOrder, Pattern thePattern)
- {
- _objType = objType;
- _pattern = thePattern;
-
- _matchOrder = new ArrayList();
- //Here we add a dummy first element to the ArrayList, to mimick how the PatternMatcher stores it's
- //matches (starting with group 1).
- _matchOrder.add(null);
-
- int index = 0;
- int nextSpace = 0;
- //Walk the matchOrder string parsing out words and adding them to _matchOrder...Could use StringTokenizer
- //but this seem much simpler.
- while ((nextSpace = matchOrder.indexOf(" ", index)) > 0) //$NON-NLS-1$
- {
- _matchOrder.add(matchOrder.substring(index, nextSpace).toLowerCase());
- index = nextSpace;
- while ((index < matchOrder.length()) && (matchOrder.charAt(index) == ' '))
- index++;
- }
- _matchOrder.add(matchOrder.substring(index, matchOrder.length()).toLowerCase());
-
- }
-
- public ParsedOutput matchLine(String theLine)
- {
- Matcher matcher = null;
- try
- {
- matcher = _pattern.matcher(theLine);
- if (!matcher.matches())
- return null;
- }
- catch (StringIndexOutOfBoundsException e)
- {
- e.printStackTrace();
- //Getting an exception here, when theLine is an empty line for some patterns..should probably investigate,
- //but for now we'll just handle it...
- return null;
- }
-
- String fileString = ""; //$NON-NLS-1$
- String lineString = ""; //$NON-NLS-1$
-
- //Groups start at 1 (group 0 is the entire match).
- for (int i = 1; i < _matchOrder.size(); i++)
- {
- String mStr = (String)_matchOrder.get(i);
- if (mStr.equals("file")) //$NON-NLS-1$
- {
- fileString = matcher.group(i);
- }
- else if (mStr.equals("line")) //$NON-NLS-1$
- {
- lineString = matcher.group(i);
- }
- }
- int line = 1;
- if (lineString.length() > 0)
- {
- try
- {
- line = Integer.parseInt(lineString);
- }
- catch (NumberFormatException e)
- {
- e.printStackTrace();
- }
- }
-
- return new ParsedOutput(_objType, theLine, fileString, line, 1);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/ParsedOutput.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/ParsedOutput.java
deleted file mode 100644
index 315e6130b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/ParsedOutput.java
+++ /dev/null
@@ -1,40 +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.dstore.universal.miners.command.patterns;
-
-/*
- * This is a convenience object for storing information parsed out of a line of output.
- */
-public class ParsedOutput
-{
-
-
- public String type;
- public String text;
- public String file;
- public int line;
- public int col;
-
- public ParsedOutput(String theType, String theText, String theFile, int theLine, int theColumn)
- {
- type = theType;
- text = theText;
- file = theFile;
- line = theLine;
- col = theColumn;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/Patterns.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/Patterns.java
deleted file mode 100644
index 3c5994b8a..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/command/patterns/Patterns.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.command.patterns;
-
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Pattern;
-
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.dstore.core.model.DataStoreAttributes;
-
-/**
- * This class is used for interpretting standard error and standard output.
- */
-public class Patterns
-{
-
- private ArrayList _theCommands;
- private DataStore _dataStore;
-
- private String _currentCommand = null;
- private List _currentCommandPatterns = null;
-
- //private String _previousCommand = null;
- private long _timeStamp = 0;
- private File _thePatternsFile;
- private boolean _isTerminal = false;
- private String _pluginPath;
-
- private static String MINERS_PACKAGE = "org.eclipse.rse.services.dstore"; //$NON-NLS-1$
- private static String PATTERNS_FILE = "patterns.dat"; //$NON-NLS-1$
-
- // HACK - too late in cycle to deal with version properly - for now this has to be fixed
- private String _version = "8.0.0"; //$NON-NLS-1$
-
- public Patterns(DataStore ds)
- {
- _dataStore = ds;
- _theCommands = new ArrayList();
- _currentCommandPatterns = new ArrayList();
- _pluginPath = ds.getAttribute(DataStoreAttributes.A_ROOT_PATH);
- parsePatternsFile();
- }
-
- public Patterns(DataStore ds, String pluginsPath)
- {
- _dataStore = ds;
- _theCommands = new ArrayList();
- _currentCommandPatterns = new ArrayList();
- _pluginPath = pluginsPath;
- parsePatternsFile();
- }
-
- public void setIsTerminal(boolean isTerminal)
- {
- _isTerminal = isTerminal;
- }
-
- private String cleanCmdString(String theCommand)
- {
- String result = theCommand;
-
- // for multi commands
- int semiIndex = result.indexOf(";"); //$NON-NLS-1$
- if (semiIndex > 0)
- {
- result = result.substring(0, semiIndex);
- }
-
- // for qualified commands
- int spaceIndex = result.indexOf(" "); //$NON-NLS-1$
- if (spaceIndex > -1)
- {
- int slashIndex = result.lastIndexOf("/", spaceIndex); //$NON-NLS-1$
- if ((slashIndex > 0))
- {
- result = result.substring(slashIndex + 1, result.length());
- }
- }
- else
- {
- int slashIndex = result.lastIndexOf("/"); //$NON-NLS-1$
- if ((slashIndex > 0))
- {
- result = result.substring(slashIndex + 1, result.length());
- }
- }
-
- return result;
- }
-
- public void refresh(String theCommand)
- {
- // _previousCommand = _currentCommand;
- _currentCommand = cleanCmdString(theCommand);
- _currentCommandPatterns.clear();
- parsePatternsFile();
- }
-
- public void update(String theCommand)
- {
- // _previousCommand = _currentCommand;
- _currentCommand = cleanCmdString(theCommand);
- _currentCommandPatterns.clear();
-
- // don't reparse patterns file
- }
-
- private File getPatternsFile()
- {
- if (_thePatternsFile == null)
- {
-
- File thePatternsFile = new File(_pluginPath + "/" + MINERS_PACKAGE + "/" + PATTERNS_FILE); //$NON-NLS-1$ //$NON-NLS-2$
- if (!thePatternsFile.exists())
- {
- thePatternsFile = new File(_pluginPath + "/" + PATTERNS_FILE); //$NON-NLS-1$
- if (!thePatternsFile.exists())
- {
- thePatternsFile = new File(_pluginPath + "/" + MINERS_PACKAGE + "_" + _version + "/" + PATTERNS_FILE); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- if (!thePatternsFile.exists())
- {
- File parentFile = new File(_pluginPath);
- if (parentFile.exists())
- {
- // now we're really desparate!
- // search for a file that looks like it
- File[] files = parentFile.listFiles();
- for (int i = 0; i < files.length && !thePatternsFile.exists(); i++)
- {
- File c = files[i];
-
- if (c.getName().startsWith(MINERS_PACKAGE))
- {
- thePatternsFile = c;
- }
- }
- }
- }
- }
- }
- _thePatternsFile = thePatternsFile;
- }
- return _thePatternsFile;
- }
-
- private void parsePatternsFile()
- {
- if (_dataStore == null)
- return;
-
- //Check the timestamp of the patterns.dat file to make sure we need to read it.
- File thePatternsFile = getPatternsFile();
-
- long newTimeStamp = 0;
- if (!thePatternsFile.exists() || ((newTimeStamp = thePatternsFile.lastModified()) == _timeStamp))
- return;
-
- _timeStamp = newTimeStamp;
-
- //If we get here, we are actually going to read\parse the file.
- try
- {
- readPatternsFile(thePatternsFile, DE.ENCODING_UTF_8);
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- _dataStore.trace("failed to load patterns.dat with UTF-8. Trying with native encoding"); //$NON-NLS-1$
-
- try
- {
- readPatternsFile(thePatternsFile, null);
- }
- catch (Exception ex)
- {
- _dataStore.trace(ex);
- }
- }
- }
-
- private void readPatternsFile(File thePatternsFile, String encoding) throws Exception
- {
- FileInputStream fileStream = new FileInputStream(thePatternsFile);
- InputStreamReader inReader = null;
- if (encoding == null)
- {
- inReader = new InputStreamReader(fileStream);
- }
- else
- {
- inReader = new InputStreamReader(fileStream, encoding);
- }
- BufferedReader reader = new BufferedReader(inReader);
-
- _theCommands.clear();
-
- String curLine;
- CommandPattern curCommand = null;
-
- //Main Loop that reads each line.
- while ((curLine = reader.readLine()) != null)
- {
- curLine = curLine.trim();
- //Skip the current line if it is empty or starts with a #
- if ((curLine.length() == 0) || (curLine.charAt(0) == '#'))
- continue;
-
- //Check if this line is the start of a new command section
- if (curLine.startsWith("command")) //$NON-NLS-1$
- {
- int colon = curLine.indexOf(":"); //$NON-NLS-1$
- //Check that there is something after the colon
- if (colon == (curLine.length() - 1))
- continue;
- String cmdStr = curLine.substring(colon + 1, curLine.length()).trim();
-
- Pattern thePattern = Pattern.compile(cmdStr);
- curCommand = new CommandPattern(thePattern);
- _theCommands.add(curCommand);
- }
-
- //If we get here, the line must be an output pattern
- else
- {
- int firstSpace = curLine.indexOf(" "); //$NON-NLS-1$
- int patternWord = curLine.indexOf("pattern"); //$NON-NLS-1$
- int firstEquals = curLine.indexOf("="); //$NON-NLS-1$
- if ((firstEquals == -1) || (firstEquals == (curLine.length() - 1)))
- continue;
- String objType = curLine.substring(0, firstSpace);
- String matchOrder = curLine.substring(firstSpace + 1, patternWord).trim();
- String patternString = curLine.substring(firstEquals + 1, curLine.length());
- Pattern thePattern = Pattern.compile(patternString.trim());
-
- if (curCommand != null)
- curCommand.addOutputPattern(new OutputPattern(objType, matchOrder, thePattern));
- }
- }
- }
-
- private List getCurrentCommandPatterns()
- {
-
- if (_currentCommandPatterns.size() == 0)
- {
- int commands = _theCommands.size();
-
- for (int i = 0; i < commands; i++)
- {
- CommandPattern curCommand = (CommandPattern) _theCommands.get(i);
-
- if (curCommand.matchCommand(_currentCommand))
- {
- _currentCommandPatterns.add(curCommand);
- }
- }
- }
- return _currentCommandPatterns;
- }
-
-
- public ParsedOutput matchLine(String theLine)
- {
-
- CommandPattern curCommand;
- ParsedOutput matchedOutput = null;
-
- List cmdPatterns = getCurrentCommandPatterns();
- for (int i = 0; i < cmdPatterns.size(); i++)
- {
- curCommand = (CommandPattern) cmdPatterns.get(i);
-
- if (curCommand.matchCommand(_currentCommand))
- {
- if (_currentCommand.equals("ls") && _isTerminal && !curCommand.getPattern().equals(".*")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- }
- else
- {
- matchedOutput = curCommand.matchLine(theLine);
- }
- }
-
- if (matchedOutput != null)
- {
- return matchedOutput;
- }
- }
-
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/environment/EnvironmentMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/environment/EnvironmentMiner.java
deleted file mode 100644
index 4da2e0997..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/environment/EnvironmentMiner.java
+++ /dev/null
@@ -1,232 +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.dstore.universal.miners.environment;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.dstore.core.miners.miner.Miner;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-
-public class EnvironmentMiner extends Miner
-{
- public static final String MINER_ID = EnvironmentMiner.class.getName();//"org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner";
-
- private DataElement _system;
-
-
- public void load()
- {
- getSystemNode();
- }
-
- protected ArrayList getDependencies()
- {
- ArrayList dependencies = new ArrayList();
- return dependencies;
- }
-
- private DataElement getSystemNode()
- {
- if (_system == null)
- {
- _system = _dataStore.createObject(_minerData, "Environment Variable", "System Environment"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.refresh(_minerData);
- }
- return _system;
- }
-
- public void extendSchema(DataElement schemaRoot)
- {
- DataElement envVar = _dataStore.createObjectDescriptor(schemaRoot, "Environment Variable"); //$NON-NLS-1$
- _dataStore.createReference(envVar, _dataStore.createRelationDescriptor(schemaRoot,"Parent Environment")); //$NON-NLS-1$
- DataElement containerObjectD = _dataStore.findObjectDescriptor("Container Object"); //$NON-NLS-1$
- _dataStore.createReference(containerObjectD, envVar, "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
-
- createCommandDescriptor(containerObjectD, "Set Environment Variables", "C_SET_ENVIRONMENT_VARIABLES", false); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(containerObjectD, "Set Environment Variables", "C_SET_ENVIRONMENT_VARIABLES_NO_SYSTEM", false); //$NON-NLS-1$ //$NON-NLS-2$
-
- DataElement fsObj = _dataStore.findObjectDescriptor("Filesystem Objects"); //$NON-NLS-1$
- DataElement inhabits = _dataStore.createRelationDescriptor(schemaRoot, "inhabits"); //$NON-NLS-1$
- DataElement sustains = _dataStore.createRelationDescriptor(schemaRoot, "sustains"); //$NON-NLS-1$
-
- _dataStore.createReference(envVar, sustains);
- _dataStore.createReference(fsObj, inhabits);
-
-
- /*
- * DY: Retreive environment values required by user define actions
- * - temp directory (user.temp)
- * - user's home directory (user.home)
- */
- DataElement systemInfo = _dataStore.createObject(_minerData, "dstore.structureNode", "systemInfo"); //$NON-NLS-1$ //$NON-NLS-2$
-
- _dataStore.createObject(systemInfo, "system.property", "user.home", System.getProperty("user.home")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- _dataStore.createObject(systemInfo, "system.property", "temp.dir", System.getProperty("java.io.tmpdir")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- _dataStore.createObject(systemInfo, "system.property", "os.name", System.getProperty("os.name")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- _dataStore.createObject(systemInfo, "system.property", "os.version", System.getProperty("os.version")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- getSystemNode();
- _dataStore.refresh(_minerData);
- getSystemEnvironment();
- }
-
- public DataElement handleCommand (DataElement theElement)
- {
- String name = getCommandName(theElement);
- DataElement status = getCommandStatus(theElement);
- DataElement subject = getCommandArgument(theElement, 0);
- DataElement env = getCommandArgument(theElement, 1);
-
-
- if (name.equals("C_SET_ENVIRONMENT_VARIABLES")) //$NON-NLS-1$
- {
- if (_system.getNestedSize() == 0)
- {
- getSystemEnvironment();
- }
- handleSetEnvironment(subject, env);
- }
- else if (name.equals("C_SET_ENVIRONMENT_VARIABLES_NO_SYSTEM")) //$NON-NLS-1$
- {
- handleSetEnvironment(subject, env);
- }
-
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return status;
- }
-
- public void handleSetEnvironment(DataElement theElement, DataElement environment)
- {
- String envName = theElement.getValue() + ".env"; //$NON-NLS-1$
-
- //First check to see if we already have an Environment for theElement..and get rid of it if we do.
- DataElement envRoot = _dataStore.find(_minerData, DE.A_NAME, envName, 1);
- if (envRoot != null)
- {
- _dataStore.deleteObject(_minerData, envRoot);
- _dataStore.refresh(_minerData);
- List theReferences = theElement.getAssociated("inhabits"); //$NON-NLS-1$
- if (theReferences.size() > 0)
- {
- _dataStore.deleteObject(theElement, (DataElement)theReferences.get(0));
- _dataStore.refresh(theElement);
- }
- }
-
- environment.setAttribute(DE.A_NAME, envName);
- environment.setAttribute(DE.A_VALUE, envName);
-
- _minerData.addNestedData(environment, false);
- environment.setParent(_minerData);
- _dataStore.refresh(_minerData);
- _dataStore.createReference(theElement, environment, "inhabits", "sustains"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.refresh(environment);
- _dataStore.refresh(theElement);
- }
-
- //This sucks, but the best way to get the current list of environment variables is to run the "env" (or "set" on
- //windows), and grab the output. Can't use System.properties since this list only includes environment variables
- //that you passed in as parameters when you started the VM.
- private void getSystemEnvironment()
- {
-
- String envCommand = "sh -c env"; //$NON-NLS-1$
-
- String theOS = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- //If we're on windows, change the envCommand.
- if (theOS.startsWith("win")) //$NON-NLS-1$
- envCommand = "cmd /C set"; //$NON-NLS-1$
-
- if (theOS.startsWith("os/400")) //$NON-NLS-1$
- {
- envCommand = "/QOpenSys/usr/bin/sh -c env"; //$NON-NLS-1$
- }
-
- String specialEncoding= System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
- try
- {
- Process _process = Runtime.getRuntime().exec(envCommand);
-
- BufferedReader _output = null;
- if (specialEncoding != null)
- {
- _output = new BufferedReader(new InputStreamReader(_process.getInputStream(), specialEncoding));
- }
- else
- {
- _output = new BufferedReader(new InputStreamReader(_process.getInputStream()));
- }
-
- String curLine;
- while ( (curLine = _output.readLine()) != null)
- {
- int eqIndex = curLine.indexOf("="); //$NON-NLS-1$
- if (eqIndex > 0)
- {
- if (curLine.indexOf("=()") > 0) //$NON-NLS-1$
- {
- String multiLine =new String(curLine);
-
- if (!curLine.endsWith("}")) //$NON-NLS-1$
- {
- boolean complete = false;
- String subLine = null;
- while (!complete && (subLine = _output.readLine()) != null)
- {
- multiLine += subLine;
- if (subLine.indexOf('}') > -1)
- {
- complete = true;
- }
- }
- }
-
- //String name = curLine.substring(0, eqIndex);
- DataElement var = _dataStore.createObject(_system, "Environment Variable", curLine, multiLine); //$NON-NLS-1$
- var.setAttribute(DE.A_VALUE, multiLine);
- }
- else
- {
- if (curLine.startsWith("PATH=")) //$NON-NLS-1$
- {
- curLine += ":."; //$NON-NLS-1$
- }
- _dataStore.createObject(_system, "Environment Variable", curLine, curLine); //$NON-NLS-1$
- }
-
- }
- }
- _dataStore.refresh(_system);
-
- }
- catch (IOException e)
- {
- System.err.println("Error getting System Environment Variables\n" + e.getMessage()); //$NON-NLS-1$
- }
- }
-
- public String getVersion()
- {
- return "6.4.0"; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/ClassFileParser.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/ClassFileParser.java
deleted file mode 100644
index ec94e2646..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/ClassFileParser.java
+++ /dev/null
@@ -1,155 +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.dstore.universal.miners.filesystem;
-
-import java.io.DataInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-
-public class ClassFileParser {
-
-
- private static final int CONSTANT_Class = 7;
- private static final int CONSTANT_Fieldref = 9;
- private static final int CONSTANT_Methodref = 10;
- private static final int CONSTANT_InterfaceMethodref = 11;
- private static final int CONSTANT_String = 8;
- private static final int CONSTANT_Integer = 3;
- private static final int CONSTANT_Float = 4;
- private static final int CONSTANT_Long = 5;
- private static final int CONSTANT_Double = 6;
- private static final int CONSTANT_NameAndType = 12;
- private static final int CONSTANT_Utf8 = 1;
-
- private DataInputStream in;
-
- private ArrayList classes = new ArrayList();
- private ArrayList utf8s = new ArrayList();
-
- private class _Class {
- public int pool_index;
- public int name_index;
-
- public _Class(int pIndx, int nIndx) {
- pool_index = pIndx;
- name_index = nIndx;
- }
- }
-
- private class _Utf8 {
- public int pool_index;
- public byte[] bytes;
-
- public _Utf8(int pIndx, byte[] bytes) {
- pool_index = pIndx;
- this.bytes = bytes;
- }
- }
-
-
- public ClassFileParser(InputStream stream)
- {
- in = new DataInputStream(stream);
- }
-
- public String getPackageName()
- {
- String packageName = null;
- try {
- // Skip magic / miner / major
- in.skipBytes(8);
-
- int constPoolCount = in.readUnsignedShort();
-
- // Read in the constant_pool storing Class and Utf8 entries
- int tag;
- int index;
- int len;
- byte[] data;
- for (int loop = 1; loop < constPoolCount; loop++) {
- tag = in.readUnsignedByte();
- switch (tag) {
- case CONSTANT_Class:
- index = in.readUnsignedShort();
- classes.add(new _Class(loop, index));
- break;
-
- case CONSTANT_Utf8:
- len = in.readUnsignedShort();
- data = new byte[len];
- in.read(data, 0, len);
- utf8s.add(new _Utf8(loop, data));
- break;
-
- case CONSTANT_Fieldref:
- case CONSTANT_Methodref:
- case CONSTANT_InterfaceMethodref:
- case CONSTANT_Integer:
- case CONSTANT_Float:
- case CONSTANT_NameAndType:
- in.skipBytes(4);
- break;
-
- case CONSTANT_String:
- in.skipBytes(2);
- break;
-
- case CONSTANT_Long:
- case CONSTANT_Double:
- in.skipBytes(8);
- // these take two entries in constant pool
- loop++;
- break;
-
- default:
- break;
- }
- }
-
- // Skip access flags
- in.skipBytes(2);
- int classNameIndex = in.readUnsignedShort();
-
- boolean found = false;
- int utf8Index = -1;
- for(int loop = 0; loop < classes.size() && !found; loop++) {
- if (((_Class)classes.get(loop)).pool_index == classNameIndex) {
- found = true;
- utf8Index = ((_Class)classes.get(loop)).name_index;
- }
- }
-
- found = false;
- for (int loop = 0; loop < utf8s.size() && !found; loop++) {
- if (((_Utf8)utf8s.get(loop)).pool_index == utf8Index) {
- packageName = new String(((_Utf8)utf8s.get(loop)).bytes);
- packageName = packageName.replace('/', '.');
- found = true;
- }
- }
-
- in.close();
-
-
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- return packageName;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/FileClassifier.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/FileClassifier.java
deleted file mode 100644
index 143a5fa30..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/FileClassifier.java
+++ /dev/null
@@ -1,1048 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.filesystem;
-
-import java.io.BufferedReader;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.java.BasicClassFileParser;
-
-
-/*
- * This utility class is for determing file types
- */
-public class FileClassifier extends Thread
-{
- protected class Pair
- {
- private String _fileName;
-
- private String _canonicalName;
-
- private DataElement _element;
-
- public Pair(String fileName, DataElement element)
- {
- _fileName = fileName;
- _element = element;
- }
-
- public DataElement getElement()
- {
- return _element;
- }
-
- public String getFileName()
- {
- return _fileName;
- }
-
- public String getCanonicalName()
- {
- return _canonicalName;
- }
-
- public void setCanonicalName(String canonicalName)
- {
- _canonicalName = canonicalName;
- }
- }
-
- public static final String symbolicLinkStr = "symbolic link to"; //$NON-NLS-1$
-
- public static final String fileSep = System.getProperty("file.separator"); //$NON-NLS-1$
- public static final String defaultType = "file"; //$NON-NLS-1$
-
- public static final String STR_SYMBOLIC_LINK = "symbolic link"; //$NON-NLS-1$
- public static final String STR_SHARED_OBJECT="shared object"; //$NON-NLS-1$
- public static final String STR_OBJECT_MODULE="object module"; //$NON-NLS-1$
- public static final String STR_MODULE="module"; //$NON-NLS-1$
- public static final String STR_ARCHIVE="archive"; //$NON-NLS-1$
- public static final String STR_EXECUTABLE="executable"; //$NON-NLS-1$
- public static final String STR_SCRIPT="script"; //$NON-NLS-1$
- public static final String STR_EXECUTABLE_SCRIPT="executable(script)"; //$NON-NLS-1$
- public static final String STR_EXECUTABLE_BINARY="executable(binary)"; //$NON-NLS-1$
- public static final String STR_DOT_A=".a"; //$NON-NLS-1$
- public static final String STR_DOT_SO=".so"; //$NON-NLS-1$
- public static final String STR_DOT_SO_DOT=".so."; //$NON-NLS-1$
- public static final String STR_DIRECTORY="diectory"; //$NON-NLS-1$
-
-
- private DataElement _subject;
-
- private DataStore _dataStore;
-
- private String _specialEncoding = null;
-
- protected String _systemShell = null;
-
- private List _fileMap;
-
- private boolean _classifyChildren = true;
-
- private boolean _classifyFilter = false;
-
- private boolean _canResolveLinks = false;
-
- private boolean _classifyVirtual = false;
-
- private boolean _systemSupportsClassify = true;
-
- private boolean _systemSupportsClassFilesOnly = false;
-
- private List _lines;
-
- public FileClassifier(DataElement subject)
- {
- _lines = new ArrayList();
- // special encoding passed in when starting server
- _specialEncoding = System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
-
- _subject = subject;
- _dataStore = subject.getDataStore();
- _fileMap = new ArrayList();
-
- // we can resolve links on Linux
- String osName = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- if (osName.startsWith("win")) //$NON-NLS-1$
- {
- _systemSupportsClassify = false;
- }
- else if (osName.equals("z/OS")) { //$NON-NLS-1$
- _systemSupportsClassFilesOnly = true;
- }
-
- _systemShell = "sh"; //$NON-NLS-1$
- _canResolveLinks = osName.startsWith("linux"); //$NON-NLS-1$
-
- init();
- }
-
- private void init()
- {
- String objType = _subject.getType();
-
- // determine if we are classifying virtual files
- // we are if the subject is an archive, virtual folder or a virtual file
- if (objType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR) || objType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)
- || objType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR))
- {
- _classifyVirtual = true;
- }
- else
- {
- _classifyVirtual = false;
- }
-
- _classifyFilter = objType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
-
- // if the subject is a file or a virtual file (i.e. not a directory or
- // an archive), then
- // we do not classify children (since there are no children)
- if (objType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) || objType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR))
- {
- _classifyChildren = false;
- }
- // otherwise, put children in hashmap
- else
- {
- // store all datalements in hashmap
- for (int i = 0; i < _subject.getNestedSize(); i++)
- {
- DataElement child = _subject.get(i);
-
- if (child.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)
- || child.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || child.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR))
- {
- String name = child.getName();
- String properties = child.getSource();
-
- // if this file has already been classified
- // ignore it
- String[] tokens = properties.split("\\" + IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
-
- if (tokens.length < 12)
- {
- putElement(name, child);
- }
- /*
- * StringTokenizer tokenizer = new
- * StringTokenizer(properties,
- * IUniversalDataStoreConstants.TOKEN_SEPARATOR); if
- * (tokenizer.countTokens() < 12) { putElement(name, child); }
- */
- }
- }
-
- _classifyChildren = true;
- }
- }
-
- private void putElement(String name, DataElement child)
- {
- _fileMap.add(new Pair(name, child));
- }
-
- /**
- * Gets the data element for the given name from the name to data element
- * mapping.
- *
- * @param name
- * the name.
- * @return the data element corresponding to that name.
- */
- private List getElementsFor(String fileName)
- {
- boolean matchedCanonical = false;
- ArrayList results = new ArrayList();
- for (int i = 0; i < _fileMap.size(); i++)
- {
- Pair apair = (Pair) _fileMap.get(i);
- String canonicalName = apair.getCanonicalName();
- if (canonicalName != null)
- {
- if (canonicalName.equals(fileName))
- {
-
- if (!matchedCanonical)
- {
- results.clear();
- matchedCanonical = true;
- }
- results.add(apair);
- }
- }
- else if (apair.getFileName().equals(fileName) && !matchedCanonical)
- {
- results.add(apair);
- }
- }
- return results;
- }
-
- public void run()
- {
- if (!_systemSupportsClassify)
- return;
-
- // get full path
- String filePath = null;
- if (!_classifyFilter)
- {
- StringBuffer fPathBuf = new StringBuffer(_subject.getValue());
- fPathBuf.append(File.separatorChar);
- fPathBuf.append(_subject.getName());
- filePath = fPathBuf.toString();
- }
- else
- {
- filePath = _subject.getValue();
- }
-
-
- // if we have to classify children
- if (_classifyChildren)
- {
-
-
- // if it's not a classification of virtual files
- if (!_classifyVirtual)
- {
- File parentFile = new File(filePath);
-
- // if parent file is a directory, classify all its children, and
- // do not
- // resolve links by default
- if (parentFile.isDirectory() && parentFile.list().length > 0)
- {
- classifyChildren(parentFile, "*", false); //$NON-NLS-1$
- }
- }
- else
- {
- classifyVirtualChildren(filePath);
- }
-
- _dataStore.refresh(_subject);
- }
- else
- {
- File theFile = new File(filePath);
-
- if (theFile.exists())
- {
- try
- {
- String type = classifyFile(theFile.getCanonicalFile());
- StringBuffer classifiedProperties = new StringBuffer(_subject.getSource());
- classifiedProperties.append('(');
- classifiedProperties.append(type);
- classifiedProperties.append(')');
- _subject.setAttribute(DE.A_SOURCE, classifiedProperties.toString());
- _dataStore.refresh(_subject);
- }
- catch (Exception e)
- {
- }
- }
- }
- _dataStore.disconnectObject(_subject);
- }
-
- /**
- * Classifies from the given line of classification output.
- *
- * @param parentFile
- * the parent file.
- * @param line
- * the line of output to parse.
- * @param specialEncoding
- * a special encoding, if there is one.
- * @param resolveLink
- * resolve link.
- * @return the classification.
- */
- protected String classify(File parentFile, String line, String specialEncoding, boolean resolveLink)
- {
- // this string should be contained in an output line that indicates a
- // symbolic link
-
-
- // default type
- String type = defaultType;
-
- int colon = line.indexOf(':');
-
- // name appears before colon
- String name = line.substring(0, colon);
-
- // the full type appears after the colon
- String fulltype = line.substring(colon + 1, line.length()).trim();
-
- // if it's a *.class file, then we look for main method and qulaified
- // class name
- // as part of the classification
- if (name.endsWith(".class")) //$NON-NLS-1$
- {
- // get parent path
- String parentPath = parentFile.getAbsolutePath();
-
- // get file separator
-
-
- // if parent path does not end with separator, then add it
- if (!parentPath.endsWith(fileSep))
- {
- parentPath = parentPath + fileSep;
- }
-
- // add name to parent path to get file path
- String filePath = parentPath + name;
-
- // input stream to file
- FileInputStream stream = null;
-
- // class file parser
- BasicClassFileParser parser = null;
-
- boolean isExecutable = false;
-
- try
- {
- stream = new FileInputStream(filePath);
-
- // use class file parser to parse the class file
- parser = new BasicClassFileParser(stream);
- parser.parse();
-
- // query if it is executable, i.e. whether it has main method
- isExecutable = parser.isExecutable();
- }
- catch (IOException e)
- {
- // TODO: log it
-
- // we assume not executable
- isExecutable = false;
- return type;
- }
-
- // if it is executable, then also get qualified class name
- if (isExecutable)
- {
- type = "executable(java"; //$NON-NLS-1$
-
- String qualifiedClassName = parser.getQualifiedClassName();
-
- if (qualifiedClassName != null)
- {
- type = type + ":" + qualifiedClassName; //$NON-NLS-1$
- }
-
- type = type + ")"; //$NON-NLS-1$
- }
- return type;
- }
-
- // if the system supports only classifying *.class files, then return generic type "file".
- if (_systemSupportsClassFilesOnly) {
- return type;
- }
-/* DKM - let the client have the raw type instead of doing this for it
- *
- boolean matchesLib = (fulltype.indexOf(STR_SHARED_OBJECT) > -1) || (fulltype.indexOf(STR_OBJECT_MODULE) > -1) || (fulltype.indexOf(STR_ARCHIVE) > -1);
-
- boolean matchesExe = (fulltype.indexOf(STR_EXECUTABLE) > -1);
- boolean matchesScript = (fulltype.indexOf(STR_SCRIPT) > -1);
-
- // shared
- if (matchesLib && (name.endsWith(STR_DOT_A) || name.endsWith(STR_DOT_SO) || name.indexOf(STR_DOT_SO_DOT) > 0))
- {
- type = STR_MODULE;
- }
- else if (matchesScript)
- {
- if (matchesExe)
- {
- type = STR_EXECUTABLE_SCRIPT;
- }
- else
- {
- type = STR_SCRIPT;
- }
- }
- // if the fullType contains "executable", then it is either a script
- // executable or a binary
- // executable
- else if (matchesExe)
- {
- type = STR_EXECUTABLE_BINARY;
- }
- else if (fulltype.indexOf(STR_DIRECTORY) > -1)
- {
- type = STR_DIRECTORY;
- }
- */
- // finally, if the full type contains the symbolic link string, then we
- // know
- // we have a symbolic link
- if (fulltype.startsWith(symbolicLinkStr))
- {
- type = resolveSymbolicLink(parentFile, name, fulltype, symbolicLinkStr, resolveLink, specialEncoding);
- }
- else
- {
- type = fulltype;
- }
-
- return type;
- }
-
- protected String resolveSymbolicLink(File parentFile, String originalName, String fulltype, String symbolicLinkStr, boolean resolveLink, String specialEncoding)
- {
- // type is "link"
- StringBuffer type = new StringBuffer(STR_SYMBOLIC_LINK);
-
- // find the target (i.e. referenced) file
- String referencedFile = fulltype.substring(symbolicLinkStr.length()).trim();
- File refFile = new File(referencedFile);
- if (refFile.isDirectory())
- {
- type.append("(directory)"); //$NON-NLS-1$
- return type.toString();
- }
-
- try
- {
- // if we are supposed to resolve link, then do so by running "sh -c
- // file <filename>"
- // with <filename> being the reference file name
- if (resolveLink)
- {
-
- String args[] = new String[3];
- args[0] = _systemShell;
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = "file " + PathUtility.enQuoteUnix(referencedFile); //$NON-NLS-1$
-
- Process childProcess = Runtime.getRuntime().exec(args, null, parentFile);
- BufferedReader childReader = null;
-
- if (specialEncoding != null && specialEncoding.length() > 0)
- {
- childReader = new BufferedReader(new InputStreamReader(childProcess.getInputStream(), specialEncoding));
- }
- else
- {
- childReader = new BufferedReader(new InputStreamReader(childProcess.getInputStream()));
- }
-
- String childLine = childReader.readLine().trim();
-
- type.append('(');
- type.append(classify(parentFile, childLine, specialEncoding, resolveLink));
- type.append(')');
-
- childReader.close();
-
- }
- }
- catch (Exception e)
- {
- }
- return type.toString();
- }
-
- /**
- * Classify a file. It classifies the file by running "sh -c file
- * <filename>".
- *
- * @param aFile
- * the file to classify.
- * @return the classification.
- */
- public String classifyFile(File aFile)
- {
- String type = defaultType;
-
- try
- {
- String referencedFile = aFile.getCanonicalPath();
-
- // DKM - not sure why this was commented out but keeping it that way for now
- String specialEncoding = null;//System.getProperty("dstore.stdin.encoding");
- /*
- if (specialEncoding == null)
- {
- specialEncoding = System.getProperty("file.encoding");
- }
-*/
- String args[] = new String[3];
- args[0] = "sh"; //$NON-NLS-1$
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = "file " + PathUtility.enQuoteUnix(referencedFile); //$NON-NLS-1$
-
- Process childProcess = Runtime.getRuntime().exec(args);
-
- BufferedReader childReader = null;
-
- /*
- if (specialEncoding != null && specialEncoding.length() > 0)
- {
- childReader = new BufferedReader(new InputStreamReader(childProcess.getInputStream(), specialEncoding));
- }
- else
- */
- {
- childReader = new BufferedReader(new InputStreamReader(childProcess.getInputStream()));
- }
-
- String childLine = null;
- try
- {
- childLine = childReader.readLine().trim();
- }
- catch (Exception e)
- {
-
- }
-
- type = classify(aFile.getParentFile(), childLine, specialEncoding, true);
-
- childReader.close();
- }
- catch (Exception e)
- {
- }
-
- return type;
- }
-
- protected List readLines(DataInputStream stream, String encoding) throws Exception
- {
-
- if (encoding == null)
- {
- encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
- }
-
-
- try
- {
- byte[] readBytes = new byte[1024];
-
- // find out how many bytes are available to be read
- int available = stream.available();
- while (available > -1)
- {
-
- // read the available bytes
- int numRead = stream.read(readBytes, 0, 1024);
- // if we've reached end of stream, quit
- if (numRead == -1)
- {
- return _lines;
- }
-
-
- // get the output using the encoding
- try
- {
-
- String fullOutput = new String(readBytes, 0, numRead, encoding);
-
- // if output is not null, we assume the encoding was correct and
- // process the output
- // tokenize the output so that we can get each line of
- // output
- // the delimiters are therefore set to "\n\r"
- String[] tokens = fullOutput.split("\n"); //$NON-NLS-1$
- if (tokens.length > 0)
- {
- if (_lines.size() > 0)
- {
- String lastLine = (String)_lines.remove(_lines.size() -1);
- tokens[0] = lastLine + tokens[0];
- }
-
- for (int i = 0; i< tokens.length; i++)
- {
- _lines.add(tokens[i]);
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- available = stream.available();
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- return _lines;
-
- }
-
- protected String readLine(DataInputStream stream, String encoding) throws Exception
- {
- if (_lines.size() == 0)
- {
- _lines = readLines(stream, encoding);
- }
- if (_lines == null)
- {
- return null;
- }
- if (_lines.size() > 0)
- {
- return (String)_lines.remove(0);
- }
- return null;
- }
-
- /**
- * Classifies the children of a given file.
- *
- * @param parentFile
- * the parent file.
- * @param files
- * the files to classify. Specify "*" to classify all files.
- * @param resolveLinks
- * resolve links if possible.
- */
- protected void classifyChildren(File parentFile, String files, boolean resolveLinks)
- {
-
- try
- {
- boolean hasLinks = false;
-
- String[] args = new String[3];
- args[0] = "sh"; //$NON-NLS-1$
-
- args[1] = "-c"; //$NON-NLS-1$
-
- // if we are asked to resolve children, and it is possible to do so
- // then use "file -L". This is slower than if we run without the
- // "-L".
- if (resolveLinks && _canResolveLinks)
- {
- args[2] = "file -L " + files; //dont quote files to allow shell pattern matching //$NON-NLS-1$
- }
- // otherwise, don't use "-L"
- else
- {
- args[2] = "file " + files; //dont quote files to allow shell pattern matching //$NON-NLS-1$
-
- }
-
- // run command with the working directory being the parent file
- Process theProcess = Runtime.getRuntime().exec(args, null, parentFile);
-
- BufferedReader reader = null;
- DataInputStream stream = null;
-
- if (_specialEncoding != null)
- {
- stream = new DataInputStream(theProcess.getInputStream());
- reader = new BufferedReader(new InputStreamReader(stream, _specialEncoding));
- }
- else
- {
- stream = new DataInputStream(theProcess.getInputStream());
- }
-
- // a list of files to be queried after
- List deferredQueries = new ArrayList();
-
- String line = null;
- try
- {
- if (reader != null)
- line = reader.readLine();
- else
- line = readLine(stream, _specialEncoding);//reader.readLine();
- }
- catch (Exception e)
- {
- }
-
- // read each line of output
- while (line != null)
- {
- if (line.length() > 0)
- {
- line = line.trim();
- if (line.indexOf("cannot open ") > 0) //$NON-NLS-1$
- {
-
- }
- else
- {
- int colon = line.indexOf(':');
-
- // sometimes we get two lines of output for each file
- // so ignore second line
- if (colon != -1)
- {
-
- // name of classified file
- String name = line.substring(0, colon);
-
- // get classification from line, and do not resolve
- // link
- String type = classify(parentFile, line, _specialEncoding, false);
-
- // get data elements- may be more than one (in case
- // of link)
- List pairs = getElementsFor(name);
- for (int d = 0; d < pairs.size(); d++)
- {
- Pair pair = (Pair) pairs.get(d);
-
- DataElement element = pair.getElement();
-
- // if the element was in our list of mappings
- if (element != null)
- {
-
- // referencing file
- StringBuffer path = new StringBuffer(element.getValue());
- path.append(File.separatorChar);
- path.append(element.getName());
- File refFile = new File(path.toString());
-
- // canonical file path
-
- String canonicalPath = null;
-
- // if the file is a link resolve it
- // if it's a link and we're already trying
- // to resolve links, ignore it
- if (type.equals(STR_SYMBOLIC_LINK) && !resolveLinks)
- {
-
- // get canonical file path
- canonicalPath = refFile.getCanonicalPath();
-
- // if we can't resolve links, then get
- // the canonical file using Java
- if (!_canResolveLinks)
- {
- // get canonical file
- File canFile = refFile.getCanonicalFile();
-
- // put canonical file in our list of
- // mappings with
- // the current element (so the
- // canonical file name
- // corresponds to this element
- // subsequently)
- pair.setCanonicalName(canonicalPath);
-
- // get parent of canonical file
- File cP = canFile.getParentFile();
-
- // add canonical file parent to
- // deferred query list
- if (!deferredQueries.contains(cP))
- {
- deferredQueries.add(cP);
- }
- }
-
- // we can resolve links, so indicate it
- // with a flag
- hasLinks = true;
- }
- else
- {
- // remove from list
- _fileMap.remove(pair);
-
- if (type.equals(STR_SYMBOLIC_LINK))
- {
- canonicalPath = refFile.getCanonicalPath();
- }
- }
-
- // set current properties
- StringBuffer currentProperties = new StringBuffer(element.getAttribute(DE.A_SOURCE));
-
- // determine text to write
- StringBuffer textToWrite = new StringBuffer(type);
-
- // if type is "link", we write a string of
- // form "link:canonicalPath"
- if (type.equals(STR_SYMBOLIC_LINK))
- {
- if (type.indexOf(":") == -1) //$NON-NLS-1$
- {
- textToWrite.append(':');
- textToWrite.append(canonicalPath);
- }
- }
-
- // determine text to check for
- String textToCheck = STR_SYMBOLIC_LINK;
-
- int linkIndex = currentProperties.lastIndexOf(textToCheck);
-
- if (linkIndex != -1)
- {
- int cutOffIndex = linkIndex + textToCheck.length();
-
- StringBuffer typeBuf = new StringBuffer();
- typeBuf.append('(');
- typeBuf.append(type);
- typeBuf.append(')');
- currentProperties.insert(cutOffIndex, typeBuf.toString());
- element.setAttribute(DE.A_SOURCE, currentProperties.toString());
- }
- else
- {
- currentProperties.append('|');
- currentProperties.append(textToWrite);
- element.setAttribute(DE.A_SOURCE, currentProperties.toString());
- }
- }
- }
- }
- }
- }
-
- try
- {
- if (reader != null)
- line = reader.readLine();
- else
- line = readLine(stream, _specialEncoding);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- if (reader != null)
- reader.close();
- else
- stream.close();
- // we have found links
- if (hasLinks)
- {
- // if we were told not to resolve them, but we are capable of
- // doing so, then
- // let's try again
- if (!resolveLinks && _canResolveLinks)
- {
- // we pass true to indicate we want to resolve links this
- // time
- classifyChildren(parentFile, "*", true); //$NON-NLS-1$
- }
- // otherwise, run deferred queries on parents of target files
- // and try to resolve link
- else
- {
- // run deferred queries on canonical file parents
- for (int i = 0; i < deferredQueries.size(); i++)
- {
- File aFile = (File) deferredQueries.get(i);
-
- // we pass true to indicate we want to resolve links
- // this time
- StringBuffer newPathBuf = new StringBuffer(PathUtility.enQuoteUnix(aFile.getAbsolutePath()));
- newPathBuf.append(File.separatorChar);
- newPathBuf.append('*');
- classifyChildren(parentFile, newPathBuf.toString(), true);
- }
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- }
-
- /**
- * Classify virtual children.
- *
- * @param fullPath
- * the full path of the parent file. The path could represent an
- * archive or a virtual folder.
- */
- protected void classifyVirtualChildren(String parentPath)
- {
- ArchiveHandlerManager mgr = ArchiveHandlerManager.getInstance();
-
- // clean up path
- // DKM - this strips leading / so I'm putting it back
- parentPath = '/' + ArchiveHandlerManager.cleanUpVirtualPath(parentPath);
-
- // check if parent is an archive
- boolean isArchive = mgr.isRegisteredArchive(parentPath);
-
- // check if parent is virtual
- boolean isVirtual = ArchiveHandlerManager.isVirtual(parentPath);
-
- VirtualChild[] children = null;
-
- try
- {
-
- File archiveFile = null;
- String virtualPath = null;
-
- // if the parent is an archive and not a virtual
- if (isArchive && !isVirtual)
- {
-
- // archive file is simply the path passed in
- archiveFile = new File(parentPath);
-
- // virtual path is "" to indicate we want the top level entries
- // in the archive
- virtualPath = ""; //$NON-NLS-1$
- }
- // otherwise, if the parent is a virtual folder
- else
- {
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(parentPath);
-
- // get the path of the containing archive
- String archivePath = avp.getContainingArchiveString();
-
- // get the virtual part of the file path
- virtualPath = avp.getVirtualPart();
-
- // get archive file
- archiveFile = new File(archivePath);
- }
-
- // get the contents of the virtual path within the archive
- children = mgr.getContents(archiveFile, virtualPath);
-
- // go through each virtual child, and set the classification type
- for (int i = 0; i < children.length; i++)
- {
- VirtualChild child = children[i];
-
- String type = defaultType;
-
- // only classify if the virtual child is not a directory
- if (!child.isDirectory)
- {
-
- // name of virtual child
- String name = child.name;
-
- // get classification
- type = mgr.getClassification(archiveFile, child.fullName);
-
- // get data element
- List matches = getElementsFor(name);
- for (int c = 0; c < matches.size(); c++)
- {
- Pair pair = (Pair) matches.get(c);
- DataElement element = pair.getElement();
-
- // if element is in our list of mappings
- if (element != null)
- {
-
- // remove element from list of mappings
- _fileMap.remove(pair);
-
- // add type to current properties
- StringBuffer currentProperties = new StringBuffer(element.getAttribute(DE.A_SOURCE));
- currentProperties.append('|');
- currentProperties.append(type);
-
- element.setAttribute(DE.A_SOURCE, currentProperties.toString());
- }
- }
- }
- }
- }
- catch (IOException e)
- {
- // TODO: log error
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalByteStreamHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalByteStreamHandler.java
deleted file mode 100644
index 31d775213..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalByteStreamHandler.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.filesystem;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-
-import org.eclipse.dstore.core.model.ByteStreamHandler;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-
-
-
-/**
- * This class overrides ByteStreamHandler to handle cases where
- * virtual files are being transfered to the host
- */
-public class UniversalByteStreamHandler extends ByteStreamHandler
-{
-
- public UniversalByteStreamHandler(DataStore dataStore, DataElement log)
- {
- super(dataStore, log);
- }
-
-
-
- /**
- * Save a file in the specified location. This method is called by the
- * DataStore when the communication layer receives a file transfer
- *
- * @param remotePath the path where to save the file
- * @param buffer the bytes to insert in the file
- * @param size the number of bytes to insert
- * @param binary indicates whether to save the bytes as binary or text
- */
- public void receiveBytes(String remotePath, byte[] buffer, int size, boolean binary)
- {
- boolean isVirtual = ArchiveHandlerManager.isVirtual(remotePath);
-
- if (!isVirtual)
- {
- super.receiveBytes(remotePath, buffer, size, binary);
- return;
- }
-
- remotePath = ArchiveHandlerManager.cleanUpVirtualPath(remotePath);
- DataElement status = findStatusFor(remotePath);
- String fileName = _dataStore.mapToLocalPath(remotePath);
-
- if (fileName != null)
- {
- String virtualFileName = fileName;
-
- ArchiveHandlerManager mgr = ArchiveHandlerManager.getInstance();
- VirtualChild child = mgr.getVirtualObject(virtualFileName);
- ISystemArchiveHandler handler = child.getHandler();
-
- try
- {
- File file = child.getExtractedFile();
- fileName = file.getAbsolutePath();
-
- if (!file.exists())
- {
- File parent = new File(file.getParent());
- parent.mkdirs();
- }
- else
- {
- }
-
- File newFile = new File(fileName);
- FileOutputStream fileStream = new FileOutputStream(newFile);
-
- if (binary)
- {
- fileStream.write(buffer, 0, size);
- }
- else
- {
- String bufferString = new String(buffer, 0, size, SystemEncodingUtil.ENCODING_UTF_8);
-
- // hack for zOS
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
- if (theOS.toLowerCase().startsWith("z")) //$NON-NLS-1$
- {
- bufferString = bufferString.replace('\r', ' ');
- }
-
- OutputStreamWriter writer = new OutputStreamWriter(fileStream);
- writer.write(bufferString, 0, size);
- writer.flush();
- }
-
- fileStream.close();
-
- // write the temp file to the archive
- if (handler == null)
- {
- int virtualIndex = virtualFileName.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- String filePath = virtualFileName.substring(0, virtualIndex);
- handler = mgr.getRegisteredHandler(new File(filePath));
- }
- boolean success = handler != null && handler.add(newFile, child.path, child.name);
- if (!success)
- {
- if (status == null) return;
- status.setAttribute(DE.A_VALUE, IClientServerConstants.FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- _dataStore.refresh(status.getParent());
- }
- else
- {
- if (status == null) return;
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- _dataStore.refresh(status.getParent());
- }
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- if (status == null) return;
- status.setAttribute(DE.A_VALUE, IClientServerConstants.FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- _dataStore.refresh(status.getParent());
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- if (status == null) return;
- status.setAttribute(DE.A_VALUE, IClientServerConstants.FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- _dataStore.refresh(status.getParent());
- }
- }
- }
-
- /**
- * Append a bytes to a file at a specified location. This method is called by the
- * DataStore when the communication layer receives a file transfer append.
- *
- * @param remotePath the path where to save the file
- * @param buffer the bytes to append in the file
- * @param size the number of bytes to append in the file
- * @param binary indicates whether to save the bytes as binary or text
- */
- public void receiveAppendedBytes(String remotePath, byte[] buffer, int size, boolean binary)
- {
-
- boolean isVirtual = ArchiveHandlerManager.isVirtual(remotePath);
- if (!isVirtual)
- {
- super.receiveAppendedBytes(remotePath, buffer, size, binary);
- return;
- }
-
- remotePath = ArchiveHandlerManager.cleanUpVirtualPath(remotePath);
- DataElement status = findStatusFor(remotePath);
- String fileName = _dataStore.mapToLocalPath(remotePath);
-
- if (fileName != null)
- {
- String virtualFileName = fileName;
-
- ArchiveHandlerManager mgr = ArchiveHandlerManager.getInstance();
- VirtualChild child = mgr.getVirtualObject(virtualFileName);
- if (!child.exists())
- {
- //System.out.println(virtualFileName + " does not exist.");
- return;
- }
- ISystemArchiveHandler handler = child.getHandler();
-
- try
- {
- boolean success;
-
- File file = child.getExtractedFile();
- fileName = file.getAbsolutePath();
-
- if (!file.exists())
- {
- File parent = new File(file.getParent());
- parent.mkdirs();
-
- File newFile = new File(fileName);
- FileOutputStream fileStream = new FileOutputStream(newFile);
-
- //boolean binary = false;
- if (binary)
- {
- fileStream.write(buffer, 0, size);
- }
- else
- {
- String bufferString = new String(buffer, 0, size, SystemEncodingUtil.ENCODING_UTF_8);
-
- // hack for zOS
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
- if (theOS.toLowerCase().startsWith("z")) //$NON-NLS-1$
- {
- bufferString = bufferString.replace('\r', ' ');
- }
-
- OutputStreamWriter writer = new OutputStreamWriter(fileStream);
- writer.write(bufferString, 0, size);
- writer.flush();
- }
-
- fileStream.close();
- // write the temp file to the archive
- if (handler == null)
- {
- int virtualIndex = virtualFileName.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- String filePath = virtualFileName.substring(0, virtualIndex);
- handler = mgr.getRegisteredHandler(new File(filePath));
- }
- success = handler != null && handler.add(newFile, child.path, child.name);
-
- }
- else
- {
- // need to reorganize this so that we don't use up all the memory
- // divide appendedBuffer into chunks
- // at > 50M this kills Eclipse
- File oldFile = new File(fileName);
- File newFile = new File(fileName + ".new"); //$NON-NLS-1$
- newFile.createNewFile();
-
- FileInputStream oldFileStream = new FileInputStream(oldFile);
- FileOutputStream newFileStream = new FileOutputStream(newFile);
-
- // write old file to new file
- int maxSize = 5000000;
- int written = 0;
- int oldSize = (int) oldFile.length();
- int bufferSize = (oldSize > maxSize) ? maxSize : oldSize;
- byte[] subBuffer = new byte[bufferSize];
-
- while (written < oldSize)
- {
- int subWritten = 0;
-
- while (written < oldSize && subWritten < bufferSize)
- {
- int available = oldFileStream.available();
- available = (bufferSize > available) ? available : bufferSize;
- int read = oldFileStream.read(subBuffer, subWritten, available);
- subWritten += read;
- written += subWritten;
- }
-
- newFileStream.write(subBuffer, 0, subWritten);
- }
-
- oldFileStream.close();
-
- // write new buffer to new file
- if (binary)
- {
- newFileStream.write(buffer, 0, size);
- }
- else
- {
- String bufferString = new String(buffer, 0, size, SystemEncodingUtil.ENCODING_UTF_8);
-
- // hack for zOS
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
- if (theOS.toLowerCase().startsWith("z")) //$NON-NLS-1$
- {
- bufferString = bufferString.replace('\r', ' ');
- }
-
- OutputStreamWriter writer = new OutputStreamWriter(newFileStream);
- writer.write(bufferString, 0, size);
- writer.flush();
- }
-
- newFileStream.close();
-
- // remote old file
- oldFile.delete();
-
- // rename new file
- newFile.renameTo(oldFile);
-
- // write the temp file to the archive
- if (handler == null)
- {
- int virtualIndex = virtualFileName.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- String filePath = virtualFileName.substring(0, virtualIndex);
- handler = mgr.getRegisteredHandler(new File(filePath));
- }
- success = handler != null && handler.add(newFile, child.path, child.name);
-
- }
-
- if (!success)
- {
- if (status == null) return;
- status.setAttribute(DE.A_VALUE, IClientServerConstants.FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- _dataStore.refresh(status.getParent());
- }
- else
- {
- if (status == null) return;
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- _dataStore.refresh(status.getParent());
- }
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- if (status == null) return;
- status.setAttribute(DE.A_VALUE, IClientServerConstants.FILEMSG_REMOTE_SAVE_FAILED);
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- _dataStore.refresh(status.getParent());
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalDownloadHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalDownloadHandler.java
deleted file mode 100644
index c768663c2..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalDownloadHandler.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.filesystem;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-
-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.IByteConverter;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-
-
-public class UniversalDownloadHandler extends Thread implements ICancellableHandler
-{
-
- private boolean _isDone = false;
- private DataStore _dataStore;
- private UniversalFileSystemMiner _miner;
- private DataElement _status;
- private DataElement _cmdElement;
- private boolean _isCancelled= false;
-
- public UniversalDownloadHandler(DataStore dataStore, UniversalFileSystemMiner miner, DataElement cmdElement,
- DataElement status)
- {
- _miner = miner;
- _dataStore = dataStore;
- _status = status;
- _cmdElement = cmdElement;
- }
-
- public void run()
- {
- handleDownload(_cmdElement, _status);
- _isDone = true;
- }
-
- public boolean isDone()
- {
- return _isDone;
- }
-
- public boolean isCancelled()
- {
- return _isCancelled;
- }
-
- public void cancel()
- {
- _dataStore.trace("cancelling download"); //$NON-NLS-1$
- _isCancelled = true;
- }
-
-
- protected DataElement handleDownload(DataElement theElement, DataElement status)
- {
- DataElement arg1 = _miner.getCommandArgument(theElement, 1);
- String elementType = arg1.getType();
- String remotePath = arg1.getName();
-
- int buffer_size = IUniversalDataStoreConstants.BUFFER_SIZE;
- DataElement bufferSizeElement = _dataStore.find(theElement, DE.A_TYPE, "buffer_size", 1); //$NON-NLS-1$
- if (bufferSizeElement != null)
- {
- try
- {
- buffer_size = Integer.parseInt(bufferSizeElement.getName());
- }
- catch (Exception e)
- {
- }
- }
-
- String resultType = null;
- String resultMessage = null;
-
-
- FileInputStream inputStream = null;
- BufferedInputStream bufInputStream = null;
-
-
- try
- {
- if (elementType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) || elementType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR) || elementType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR))
- {
-
- _dataStore.trace("download:" + remotePath + "," + elementType); //$NON-NLS-1$ //$NON-NLS-2$
-
- File file = new File(remotePath);
-
-
- if (elementType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR))
- {
- AbsoluteVirtualPath vpath = _miner.getAbsoluteVirtualPath(remotePath);
-
- ISystemArchiveHandler handler = _miner.getArchiveHandlerFor(vpath.getContainingArchiveString());
- if (handler == null)
- {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- resultType = IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION;
- resultMessage = "Corrupted archive."; //$NON-NLS-1$
- _isDone = true;
- _dataStore.createObject(arg1, resultType, resultMessage);
- _dataStore.refresh(arg1);
- return _miner.statusDone(status);
- }
- VirtualChild vChild = handler.getVirtualFile(vpath.getVirtualPart());
- file = vChild.getExtractedFile();
-
- }
-
- DataElement arg2 = _miner.getCommandArgument(theElement, 2);
-// DataElement arg3 = _miner.getCommandArgument(theElement, 3);
- _miner.getCommandArgument(theElement, 3);
-
- int mode = (Integer.valueOf(arg1.getSource())).intValue();
- String localPath = arg2.getName();
-
- boolean isText = (mode == IUniversalDataStoreConstants.TEXT_MODE);
-
-// String clientEncoding = null;
-
- if (isText)
- {
-// clientEncoding = arg2.getSource();
- arg2.getSource();
- }
-
- // Read in the file
- inputStream = new FileInputStream(file);
- bufInputStream = new BufferedInputStream(inputStream, buffer_size);
-
- int totalBytes = (int)file.length();
- int totalWritten = 0;
-
- boolean first = true;
- byte[] buffer = new byte[buffer_size];
- byte[] convBytes;
- int numToRead = 0;
-
- IByteConverter byteConverter = _dataStore.getByteConverter();
- byteConverter.setContext(file);
-
- int available = bufInputStream.available();
-
- while (available > 0 && !_isCancelled)
- {
- numToRead = (available < buffer_size) ? available : buffer_size;
-
- int bytesRead = bufInputStream.read(buffer, 0, numToRead);
-
- if (bytesRead == -1)
- break;
- if (isText)
- {
- convBytes = byteConverter.convertHostBytesToClientBytes(buffer, 0, bytesRead);
-
- if (first)
- { // send first set of bytes
- first = false;
- _dataStore.updateFile(localPath, convBytes, convBytes.length, true);
- }
- else
- { // append subsequent segments
- _dataStore.updateAppendFile(localPath, convBytes, convBytes.length, true);
- }
- totalWritten += convBytes.length;
- }
- else
- {
-
- if (first)
- { // send first set of bytes
- first = false;
- _dataStore.updateFile(localPath, buffer, bytesRead, true);
- }
- else
- { // append subsequent segments
- _dataStore.updateAppendFile(localPath, buffer, bytesRead, true);
- }
- totalWritten +=bytesRead;
- }
-
- status.setAttribute(DE.A_SOURCE, "sent "+totalWritten + " of "+totalBytes); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.refresh(status);
- available = bufInputStream.available();
- }
-
- resultType = IUniversalDataStoreConstants.DOWNLOAD_RESULT_SUCCESS_TYPE;
- resultMessage = IUniversalDataStoreConstants.DOWNLOAD_RESULT_SUCCESS_MESSAGE;
-
- }
- }
- catch (FileNotFoundException e)
- {
- UniversalServerUtilities.logError(UniversalFileSystemMiner.CLASSNAME, "handleDownload: error reading file " + remotePath, e); //$NON-NLS-1$
- resultType = IUniversalDataStoreConstants.DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION;
- resultMessage = e.getLocalizedMessage();
- }
- catch (UnsupportedEncodingException e)
- {
- UniversalServerUtilities.logError(UniversalFileSystemMiner.CLASSNAME, "handleDownload: error reading file " + remotePath, e); //$NON-NLS-1$
- resultType = IUniversalDataStoreConstants.DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION;
- resultMessage = e.getLocalizedMessage();
- }
- catch (IOException e)
- {
- UniversalServerUtilities.logError(UniversalFileSystemMiner.CLASSNAME, "handleDownload: error reading file " + remotePath, e); //$NON-NLS-1$
- resultType = IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION;
- resultMessage = e.getLocalizedMessage();
- }
- catch (Exception e)
- {
- UniversalServerUtilities.logError(UniversalFileSystemMiner.CLASSNAME, "handleDownload: error reading file " + remotePath, e); //$NON-NLS-1$
- resultType = IUniversalDataStoreConstants.DOWNLOAD_RESULT_EXCEPTION;
- resultMessage = e.getLocalizedMessage();
- }
- finally
- {
-
- try
- {
-
- if (bufInputStream != null)
- bufInputStream.close();
-
- }
- catch (IOException e)
- {
- UniversalServerUtilities.logError(UniversalFileSystemMiner.CLASSNAME, "handleDownload: error closing reader on " + remotePath, e); //$NON-NLS-1$
- resultType = IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION;
- resultMessage = e.getMessage();
- }
- }
- _isDone = true;
-
- _dataStore.createObject(arg1, resultType, resultMessage);
- _dataStore.refresh(arg1);
-
- return _miner.statusDone(status);
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalFileSystemFilter.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalFileSystemFilter.java
deleted file mode 100644
index 575d7c672..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalFileSystemFilter.java
+++ /dev/null
@@ -1,124 +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.dstore.universal.miners.filesystem;
-
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.services.clientserver.FileTypeMatcher;
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.IMatcher;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-
-
-public class UniversalFileSystemFilter implements java.io.FilenameFilter, IUniversalDataStoreConstants, IClientServerConstants{
-
-
- protected String filter;
- protected boolean allowDirs;
- protected boolean allowFiles;
- protected boolean caseSensitive = true;
- protected IMatcher matcher = null;
- protected NamePatternMatcher folderNameMatcher = null;
- protected int includeFilesOrFolders;
-
- /**
- * Insert the method's description here.
- * Creation date: (2/22/01 1:15:54 PM)
- * @param filter java.lang.String
- */
- public UniversalFileSystemFilter(String fString, boolean files, boolean folders, boolean caseSensitive) {
- this.filter = fString;
- this.allowFiles = files;
- this.allowDirs = folders;
- this.caseSensitive = caseSensitive;
- }
-
- /**
- * Tests if a specified file should be included in a file list.
- *
- * @param dir the directory in which the file was found.
- * @param name the name of the file.
- * @return <code>true</code> if and only if the name should be
- * included in the file list; <code>false</code> otherwise.
- */
- public boolean accept(java.io.File dir, String nameFilter) {
-
- boolean match = true;
- java.io.File file = new java.io.File(dir, nameFilter);
- if (!allowDirs && file.isDirectory())
- return false;
-
- if (allowDirs && (file.isDirectory() || ArchiveHandlerManager.getInstance().isArchive(file)))
- return true;
-
- if (!allowFiles && file.isFile())
- return false;
-
- if (allowDirs && allowFiles)
- setListValues(INCLUDE_ALL, filter);
- else if (allowDirs)
- setListValues(INCLUDE_FOLDERS_ONLY, filter);
- else if (allowFiles)
- setListValues(INCLUDE_FILES_ONLY, filter);
- else
- return false;
-
- if ((matcher == null) && (folderNameMatcher == null))
- return true;
- if (includeFilesOrFolders != INCLUDE_ALL)
- match = matcher.matches(nameFilter);
- else {
- if (file.isFile()) {
- if (matcher!=null)
- match = matcher.matches(nameFilter);
- } else {
- if (folderNameMatcher!=null)
- match = folderNameMatcher.matches(nameFilter);
- }
- }
- return match;
- }
-
- protected void setListValues(int includeFilesOrFolders, String nameFilter)
- {
- this.includeFilesOrFolders = includeFilesOrFolders;
- if ((nameFilter!=null) && !nameFilter.equals("*")) //$NON-NLS-1$
- {
- if (nameFilter.endsWith(",")) //$NON-NLS-1$
- matcher = new FileTypeMatcher(FileTypeMatcher.parseTypes(nameFilter), true);
- else
- matcher = new NamePatternMatcher(nameFilter, true, caseSensitive);
- }
- else
- matcher = null;
- folderNameMatcher = null;
- }
- /**
- * Overloaded method to set variables to affect the folder content subsetting,
- * when there is separate filters for both folder names and filter names.
- * @param includeFilesOrFolders A constant from {IFileConstants}
- * @param folderNameFilter The pattern to filter the folder names by. Can be null to include all folders
- * @param nameFilter The pattern to filter the file names by. Can be null to include all files
- */
- protected void setListValues(int includeFilesOrFolders, String folderNameFilter, String fileNameFilter)
- {
- setListValues(includeFilesOrFolders, fileNameFilter);
- if ((folderNameFilter!=null) && !folderNameFilter.equals("*")) //$NON-NLS-1$
- folderNameMatcher = new NamePatternMatcher(folderNameFilter, true, caseSensitive);
- }
-
- } \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalFileSystemMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalFileSystemMiner.java
deleted file mode 100644
index ad1573259..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalFileSystemMiner.java
+++ /dev/null
@@ -1,3013 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.filesystem;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.ServerSocket;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.IdentityHashMap;
-import java.util.List;
-
-import org.eclipse.dstore.core.miners.miner.Miner;
-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.DataStoreResources;
-import org.eclipse.dstore.core.util.StringCompare;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.SystemFileClassifier;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.SystemJarHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.SystemTarHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.SystemZipHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.java.ClassFileUtil;
-
-public class UniversalFileSystemMiner extends Miner implements
- IUniversalDataStoreConstants, IClientServerConstants {
-
-
- public static final String MINER_ID = UniversalFileSystemMiner.class.getName();
-
-
-// private DataElement deUFSfilters;
-
- private DataElement deUFSnode;
-
-// private DataElement deUFStemp;
-
- private DataElement deUFSuploadlog;
-
-// private DataElement dePropertyQuery;
-
-// private DataElement deFileClassificationQuery;
-
-// private DataElement deFolderClassificationQuery;
-
- private DataElement deUniversalFileObject;
- private DataElement deUniversalFolderObject;
- private DataElement deUniversalVirtualFileObject;
- private DataElement deUniversalVirtualFolderObject;
- private DataElement deUniversalArchiveFileObject;
-
-
- protected String filterString = "*"; //$NON-NLS-1$
-
- protected ArchiveHandlerManager _archiveHandlerManager;
-
- protected boolean showHidden = false;
-
-
- public static final String CLASSNAME = "UniversalFileSystemMiner"; //$NON-NLS-1$
-
- protected HashMap _cancellableThreads;
-
- private boolean _isWindows = false;
-
- public UniversalFileSystemMiner() {
- _cancellableThreads = new HashMap();
- _isWindows = System.getProperty("os.name").toLowerCase().startsWith("windows"); //$NON-NLS-1$ //$NON-NLS-2$
- _archiveHandlerManager = ArchiveHandlerManager.getInstance();
- _archiveHandlerManager.setRegisteredHandler("zip", SystemZipHandler.class); //$NON-NLS-1$
- _archiveHandlerManager.setRegisteredHandler("jar", SystemJarHandler.class); //$NON-NLS-1$
- _archiveHandlerManager.setRegisteredHandler("tar", SystemTarHandler.class); //$NON-NLS-1$
- }
-
- protected FileClassifier getFileClassifier(DataElement subject)
- {
- return new FileClassifier(subject);
- }
-
- /**
- * @see Miner#handleCommand(DataElement)
- */
- public DataElement handleCommand(DataElement theElement) {
- String name = getCommandName(theElement);
-
-
-
-
- DataElement status = getCommandStatus(theElement);
- DataElement subject = getCommandArgument(theElement, 0);
-
- UniversalServerUtilities.logInfo(getName(), name + ":" + subject); //$NON-NLS-1$
-
- String queryType = (String) subject.getElementProperty(DE.P_TYPE);
- boolean caseSensitive = !_isWindows;
- // TODO: test on WINDOWS!
-
- if ("C_QUERY_VIEW_ALL".equals(name)) { //$NON-NLS-1$
- DataElement attributes = getCommandArgument(theElement, 1);
- if (attributes != null && attributes.getType().equals("attributes")) //$NON-NLS-1$
- {
- return handleQueryAll(subject, attributes, status, queryType,
- caseSensitive);
- }
- else
- {
- return handleQueryAll(subject, null, status, queryType,
- caseSensitive);
- }
- } else if ("C_QUERY_VIEW_FILES".equals(name)) { //$NON-NLS-1$
- DataElement attributes = getCommandArgument(theElement, 1);
- if (attributes != null && attributes.getType().equals("attributes")) //$NON-NLS-1$
- {
- return handleQueryFiles(subject, attributes, status, queryType,
- caseSensitive);
- }
- else
- {
- return handleQueryFiles(subject, null, status, queryType,
- caseSensitive);
- }
- } else if ("C_QUERY_VIEW_FOLDERS".equals(name)) { //$NON-NLS-1$
- DataElement attributes = getCommandArgument(theElement, 1);
- if (attributes != null && attributes.getType().equals("attributes")) //$NON-NLS-1$
- {
- return handleQueryFolders(subject, attributes, status, queryType,
- caseSensitive);
- }
- else
- {
- return handleQueryFolders(subject, null, status, queryType,
- caseSensitive);
- }
- } else if ("C_QUERY_ROOTS".equals(name)) { //$NON-NLS-1$
- return handleQueryRoots(subject, status);
- } else if ("C_SEARCH".equals(name)) { //$NON-NLS-1$
- return handleSearch(theElement, status, queryType,
- caseSensitive);
- } else if ("C_CANCEL".equals(name)) { //$NON-NLS-1$
- subject.getName();
- return handleCancel(subject, status);
- } else if ("C_RENAME".equals(name)) { //$NON-NLS-1$
- return handleRename(subject, status);
- } else if ("C_DELETE".equals(name)) { //$NON-NLS-1$
- return handleDelete(subject, status, true);
- } else if ("C_DELETE_BATCH".equals(name)) { //$NON-NLS-1$
- return handleDeleteBatch(theElement, status);
- } else if ("C_COPY".equals(name)) { //$NON-NLS-1$
- return handleCopy(subject, getCommandArgument(theElement, 1),
- getCommandArgument(theElement, 2), status);
- } else if ("C_COPY_BATCH".equals(name)) { //$NON-NLS-1$
- return handleCopyBatch(subject, theElement, status);
- } else if ("C_CREATE_FILE".equals(name)) { //$NON-NLS-1$
- return handleCreateFile(subject, status, queryType);
- } else if ("C_CREATE_FOLDER".equals(name)) { //$NON-NLS-1$
- return handleCreateFolder(subject, status, queryType);
- } else if ("C_SET_READONLY".equals(name)) { //$NON-NLS-1$
- return handleSetReadOnly(subject, status);
- } else if ("C_SET_LASTMODIFIED".equals(name)) { //$NON-NLS-1$
- return handleSetLastModified(subject, status);
- } else if ("C_QUERY_BASIC_PROPERTY".equals(name)) { //$NON-NLS-1$
- return handleQueryBasicProperty(subject, status);
- } else if ("C_QUERY_CAN_WRITE_PROPERTY".equals(name)) { //$NON-NLS-1$
- return handleQuerycanWriteProperty(subject, status);
- } else if ("C_QUERY_ADVANCE_PROPERTY".equals(name)) { //$NON-NLS-1$
- return handleQueryAdvanceProperty(subject, status);
- } else if ("C_QUERY_FILE_CLASSIFICATIONS".equals(name)) { //$NON-NLS-1$
- return handleQueryFileClassification(subject, status);
- } else if ("C_QUERY_FILE_CLASSIFICATION".equals(name)) { //$NON-NLS-1$
- return handleQueryFileClassification(subject, status);
- } else if ("C_QUERY_EXISTS".equals(name)) { //$NON-NLS-1$
- return handleQueryExists(subject, status, queryType);
- } else if ("C_QUERY_GET_REMOTE_OBJECT".equals(name)) { //$NON-NLS-1$
- return handleQueryGetRemoteObject(subject, status, queryType);
- } else if ("C_GET_OSTYPE".equals(name)) { //$NON-NLS-1$
- return handleGetOSType(subject, status);
- } else if (C_DOWNLOAD_FILE.equals(name)) {
- return handleDownload(theElement, status);
- } else if (C_SYSTEM_ENCODING.equals(name)) {
- return handleQueryEncoding(subject, status);
- } else if (C_QUERY_UNUSED_PORT.equals(name)) {
- return handleQueryUnusedPort(subject, status);
- } else if ("C_QUERY_CLASSNAME".equals(name)) { //$NON-NLS-1$
- return handleQueryClassName(subject, status);
- } else if (C_QUERY_QUALIFIED_CLASSNAME.equals(name)) {
- return handleQueryQualifiedClassName(subject, status);
- } else {
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query to handlecommand", null); //$NON-NLS-1$
- }
- return statusDone(status);
- }
-
- private DataElement handleCopyBatch(DataElement targetFolder, DataElement theElement, DataElement status)
- {
- String targetType = targetFolder.getType();
- File tgtFolder = getFileFor(targetFolder);
- int numOfSources = theElement.getNestedSize() - 2;
-
- if (targetType.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR) || targetType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- // if target is virtual or an archive, insert into an archive
- AbsoluteVirtualPath vpath = getAbsoluteVirtualPath(targetFolder);
- ISystemArchiveHandler handler = getArchiveHandlerFor(vpath.getContainingArchiveString());
-
- if (handler == null)
- {
- status.setAttribute(DE.A_SOURCE, FAILED);
- return statusDone(status);
- }
-
- File[] srcFiles = new File[numOfSources];
- String[] names = new String[numOfSources];
-
- for (int i = 0; i < numOfSources; i++)
- {
- DataElement sourceFile = getCommandArgument(theElement, i+1);
- String srcType = sourceFile.getType();
- names[i] = sourceFile.getName();
-
- if (srcType.equals(UNIVERSAL_FILE_DESCRIPTOR) || srcType.equals(UNIVERSAL_FOLDER_DESCRIPTOR)
- || srcType.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
- {
- srcFiles[i] = getFileFor(sourceFile);
- }
- else if (srcType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- AbsoluteVirtualPath svpath = getAbsoluteVirtualPath(sourceFile);
- ISystemArchiveHandler shandler = getArchiveHandlerFor(svpath.getContainingArchiveString());
-
- if (shandler == null)
- {
- status.setAttribute(DE.A_SOURCE, FAILED);
- return statusDone(status);
- }
-
- VirtualChild child = shandler.getVirtualFile(svpath.getVirtualPart());
- srcFiles[i] = child.getExtractedFile();
- }
- }
- String virtualContainer = ""; //$NON-NLS-1$
-
- if (targetType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- virtualContainer = vpath.getVirtualPart();
- }
-
- boolean result = handler.add(srcFiles, virtualContainer, names);
-
- if (result) {
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- }
- else {
- status.setAttribute(DE.A_SOURCE, FAILED);
- }
- return statusDone(status);
- }
- else // target is a regular folder
- {
- boolean folderCopy = false;
- String source = ""; //$NON-NLS-1$
- String tgt = enQuote(tgtFolder.getAbsolutePath());
-
- int numOfNonVirtualSources = 0;
- for (int i = 0; i < numOfSources; i++)
- {
- DataElement sourceFile = getCommandArgument(theElement, i+1);
- String srcType = sourceFile.getType();
-
- if (srcType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- // extract from an archive to folder
- AbsoluteVirtualPath svpath = getAbsoluteVirtualPath(sourceFile);
- ISystemArchiveHandler shandler = getArchiveHandlerFor(svpath.getContainingArchiveString());
-
- if (shandler == null)
- {
- status.setAttribute(DE.A_SOURCE, FAILED);
- return statusDone(status);
- }
-
- VirtualChild child = shandler.getVirtualFile(svpath.getVirtualPart());
-
- File parentDir = getFileFor(targetFolder);
- File destination = new File(parentDir, sourceFile.getName());
-
- if (child.isDirectory)
- {
- shandler.extractVirtualDirectory(svpath.getVirtualPart(), parentDir, destination);
- }
- else
- {
- shandler.extractVirtualFile(svpath.getVirtualPart(), destination);
- }
- }
- else // source is regular file or folder
- {
- File srcFile = getFileFor(sourceFile);
- folderCopy = folderCopy || srcFile.isDirectory();
- String src = srcFile.getAbsolutePath();
-
- // handle special characters in source and target strings
- src = enQuote(src);
-
- if (numOfNonVirtualSources == 0)
- {
- source += src;
- }
- else
- {
- source = source + " " + src; //$NON-NLS-1$
- }
- numOfNonVirtualSources++;
- }
- } // end for loop iterating through sources
-
- if (numOfNonVirtualSources > 0)
- {
- doCopyCommand(source, tgt, folderCopy, status);
- }
- } // end if/then/else (target is regular folder)
- return statusDone(status);
- }
-
- protected void doCopyCommand(String source, String tgt, boolean folderCopy, DataElement status)
- {
- String command = null;
- if (_isWindows) {
-
- if (folderCopy) {
- command = "xcopy " + source //$NON-NLS-1$
- + " " + tgt //$NON-NLS-1$
- + " /S /E /K /O /Q /H /I"; //$NON-NLS-1$
- }
- else {
- String unquotedTgt = tgt.substring(1, tgt.length() - 1);
-
- File targetFile = new File(unquotedTgt);
- if (!targetFile.exists())
- {
- // create file so as to avoid ambiguity
- try
- {
- targetFile.createNewFile();
- }
- catch (Exception e)
- {
- status.setAttribute(DE.A_SOURCE, FAILED);
- status.setAttribute(DE.A_VALUE, e.getMessage());
- return;
- }
- }
- command = "xcopy " + source + " " + tgt + " /Y /K /O /Q /H"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- else {
- if (folderCopy) {
- command = "cp -Rp " + source + " " + tgt; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- command = "cp -p " + source + " " + tgt; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- // run copy command
- try
- {
- Runtime runtime = Runtime.getRuntime();
- Process p = null;
-
- if (_isWindows)
- {
- String theShell = "cmd /C "; //$NON-NLS-1$
- p = runtime.exec(theShell + command);
- }
- else
- {
- String theShell = "sh"; //$NON-NLS-1$
- String args[] = new String[3];
- args[0] = theShell;
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = command;
-
- p = runtime.exec(args);
- }
-
- // ensure there is a process
- if (p != null) {
-
- // wait for process to finish
- p.waitFor();
-
- // get the exit value of the process
- int result = p.exitValue();
-
- // if the exit value is not 0, then the process did not terminate normally
- if (result != 0) {
-
- // get the error stream
- InputStream errStream = p.getErrorStream();
-
- // error buffer
- StringBuffer errBuf = new StringBuffer();
-
- byte[] bytes = null;
-
- int numOfBytesRead = 0;
-
- int available = errStream.available();
-
- // read error stream and store in error buffer
- while (available > 0) {
-
- bytes = new byte[available];
-
- numOfBytesRead = errStream.read(bytes);
-
- if (numOfBytesRead > -1) {
- errBuf.append(new String(bytes, 0, numOfBytesRead));
- }
- else {
- break;
- }
-
- available = errStream.available();
- }
-
- String err = errBuf.toString();
-
- // omit new line if there is one at the end because datastore does not
- // handle new line in the attributes
- // TODO: what to do if newline occurs in the middle of the string?
- String newLine = System.getProperty("line.separator"); //$NON-NLS-1$
-
- if (newLine != null && err.endsWith(newLine)) {
- err = err.substring(0, err.length() - newLine.length());
- }
-
- // if there is something in error buffer
- // there was something in the error stream of the process
- if (err.length() > 0) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- status.setAttribute(DE.A_VALUE, err);
- }
- // otherwise, nothing in the error stream
- // but we know process did not exit normally, so we indicate an unexpected error
- else {
- status.setAttribute(DE.A_SOURCE, FAILED);
- status.setAttribute(DE.A_VALUE, UNEXPECTED_ERROR);
- }
- }
- // otherwise if exit value is 0, process terminated normally
- else {
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- }
- }
- // no process, so something is wrong
- else {
- status.setAttribute(DE.A_SOURCE, FAILED);
- status.setAttribute(DE.A_VALUE, UNEXPECTED_ERROR);
- }
- }
- catch (Exception e)
- {
- UniversalServerUtilities.logError(CLASSNAME, "Exception is handleCopy", e); //$NON-NLS-1$
- status.setAttribute(DE.A_SOURCE, FAILED);
- status.setAttribute(DE.A_VALUE, e.getMessage());
- }
- }
-
- /**
- * Delete directory and its children.
- *
- */
- public void deleteDir(File fileObj, DataElement status) {
- try {
- File list[] = fileObj.listFiles();
- for (int i = 0; i < list.length; ++i) {
- if (list[i].isFile()) {
- if (!(list[i].delete())) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- UniversalServerUtilities.logWarning(CLASSNAME,
- "Deletion of dir failed"); //$NON-NLS-1$
- }
- } else {
- deleteDir(list[i], status);
- if (!(list[i].delete())) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- UniversalServerUtilities.logWarning(CLASSNAME,
- "Deletion of dir failed"); //$NON-NLS-1$
- }
- }
- }
- } catch (Exception e) {
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_EXCEPTION);
- status.setAttribute(DE.A_VALUE, e.getLocalizedMessage());
- UniversalServerUtilities.logError(CLASSNAME,
- "Deletion of dir failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * Method to do a search.
- */
- public DataElement handleSearch(DataElement theElement, DataElement status,
- String queryType, boolean fileNamesCaseSensitive) {
- File fileobj = null;
-
- DataElement subject = getCommandArgument(theElement, 0);
-
- // if the query type is against a folder, archive or a virtual folder,
- // we know to handle it
- if (queryType.equals(UNIVERSAL_FOLDER_DESCRIPTOR)
- || queryType.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)
- || queryType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
-
- fileobj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- }
- // otherwise log error, and return as done
- else {
- UniversalServerUtilities.logError(CLASSNAME, "Invalid query type to handleSearch", null); //$NON-NLS-1$
- return statusDone(status);
- }
-
- if (fileobj.exists()) {
- DataElement arg1 = getCommandArgument(theElement, 1);
- DataElement arg2 = getCommandArgument(theElement, 2);
- DataElement arg3 = getCommandArgument(theElement, 3);
-
- String textString = arg1.getType();
- boolean isCaseSensitive = Boolean.valueOf(arg1.getName()).booleanValue();
- boolean isTextRegex = Boolean.valueOf(arg1.getSource()).booleanValue();
-
- String fileNamesString = arg2.getType();
-
- boolean isFileNamesRegex = Boolean.valueOf(arg2.getName()).booleanValue();
- String classification = arg2.getSource();
-
- boolean isIncludeArchives = Boolean.valueOf(arg3.getType()).booleanValue();
- boolean isIncludeSubfolders = Boolean.valueOf(arg3.getName()).booleanValue();
-// boolean showHidden = Boolean.valueOf(arg3.getSource()).booleanValue();
- Boolean.valueOf(arg3.getSource()).booleanValue();
-
- SystemSearchString searchString = new SystemSearchString(
- textString, isCaseSensitive, isTextRegex, fileNamesString,
- isFileNamesRegex, isIncludeArchives, isIncludeSubfolders, classification);
-
- UniversalSearchHandler searchThread = new UniversalSearchHandler(
- _dataStore, this, searchString, !_isWindows, fileobj,
- status);
-
- searchThread.start();
-
- // save search thread in hashmap for retrieval during cancel
- _cancellableThreads.put(status.getParent(), searchThread);
- return status;
- }
-
- return statusDone(status);
- }
-
- public DataElement handleCancel(DataElement subject, DataElement status) {
- ICancellableHandler thread = (ICancellableHandler) _cancellableThreads
- .get(subject);
-
- if (thread != null) {
- if (!thread.isDone()) {
- thread.cancel();
- }
- }
-
- // indicate status cancelled before indicating we are done
- statusCancelled(status);
-
- // indicate status done
- return statusDone(status);
- }
-
- /**
- * Method to list the files and folders for a given filter.
- */
- public DataElement handleQueryAll(DataElement subject, DataElement attributes, DataElement status,
- String queryType, boolean caseSensitive)
- {
- if (queryType.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)
- || queryType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || queryType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- return handleQueryAllArchive(subject, attributes, status, caseSensitive, false);
- }
-
- File fileobj = null;
-
-
- String filter = null;
- if (attributes != null)
- {
- filter = getFilterString(attributes.getAttribute(DE.A_SOURCE));
- showHidden = getShowHiddenFlag(attributes.getAttribute(DE.A_SOURCE));
- }
- else
- {
- filter = getFilterString(subject.getAttribute(DE.A_SOURCE));
- showHidden = getShowHiddenFlag(subject.getAttribute(DE.A_SOURCE));
- }
-
- if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR))
- fileobj = new File(subject.getName());
- else if (queryType.equals(UNIVERSAL_FOLDER_DESCRIPTOR))
- fileobj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- else
- {
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query type to handleQueryAll", null); //$NON-NLS-1$
- }
-
- if (fileobj != null)
- // query all files and folders for the filter
- internalQueryAll(subject, fileobj, queryType, filter,
- caseSensitive, INCLUDE_ALL);
-
- // refresh datastore
- _dataStore.refresh(subject);
-
-
- return statusDone(status);
- }
-
- protected void internalQueryAll(DataElement subject, File fileobj,
- String queryType, String filter, boolean caseSensitive,
- int inclusion) {
- if (fileobj.exists())
- {
-
-
- boolean filterFiles = (inclusion == INCLUDE_ALL) || (inclusion == INCLUDE_FILES_ONLY);
- boolean filterFolders = (inclusion == INCLUDE_ALL) || (inclusion == INCLUDE_FOLDERS_ONLY);
-
- UniversalFileSystemFilter filefilter = new UniversalFileSystemFilter(filter,filterFiles, filterFolders, caseSensitive);
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
- File[] list = null;
- if (theOS.equals("z/OS")) //$NON-NLS-1$
- {
- // filters not supported with z/OS jvm
- File[] tempList = fileobj.listFiles();
- List acceptedList = new ArrayList(tempList.length);
-
- for (int i = 0; i < tempList.length; i++) {
- File afile = tempList[i];
- if (filefilter.accept(fileobj, afile.getName())) {
- acceptedList.add(afile);
- }
- }
- list = new File[acceptedList.size()];
- for (int l = 0; l < acceptedList.size(); l++)
- list[l] = (File) acceptedList.get(l);
- }
- else
- {
- list = fileobj.listFiles(filefilter);
- }
-
- if (list != null)
- {
- createDataElement(_dataStore, subject, list, queryType, filter,inclusion);
- String folderProperties = setProperties(fileobj);
- if (subject.getSource() == null || subject.getSource().equals("")) //$NON-NLS-1$
- subject.setAttribute(DE.A_SOURCE, folderProperties);
-
- FileClassifier clsfy = getFileClassifier(subject);
- clsfy.start();
- }
- }
- else {
- /*
- UniversalServerUtilities
- .logError(
- CLASSNAME,
- "The path specified in handleQueryAll does not exist",
- null);
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_EXIST);
- */
- }
-
- }
-/*
- private void internalLSQueryAll(DataElement subject, File fileobj,
- String queryType, String filter, boolean caseSensitive, int include) {
-
- BufferedReader reader = null; // use 'ls -l' command
- String cmd = "ls -l";
- try {
- String rootSource = fileobj.getAbsolutePath();
-
- Process theProcess = Runtime.getRuntime().exec(cmd, null,
- new File(rootSource));
- String specialEncoding = System
- .getProperty("dstore.stdin.encoding");
- if (specialEncoding != null) {
- reader = new BufferedReader(new InputStreamReader(theProcess
- .getInputStream(), specialEncoding));
- } else {
- reader = new BufferedReader(new InputStreamReader(theProcess
- .getInputStream()));
- }
-
- String line = null;
- while ((line = reader.readLine()) != null) {
- createDataElementFromLSString(subject, rootSource, line,
- include);
- }
- } catch (Exception e) {
- }
- if (reader != null) {
- try {
- reader.close();
- } catch (Exception e) {
- }
- }
- _dataStore.refresh(subject);
- }
-
-private DataElement createDataElementFromLSString(DataElement subject,
- String rootSource, String line, int include)
-{
- boolean isFolder = false;
-
- boolean isExecutable = false;
- String name = line;
- int length =line.length();
-
- if (line.charAt(length - 1) == '/')
- {
- isFolder = true; name =line.substring(0, length - 1);
- }
- else if (line.charAt(length - 1) == '*')
- {
- isExecutable = true; name = line.substring(0, length - 1);
- }
- else if (line.charAt(length - 1) == '@') { name = line.substring(0, length - 1);
- {
- String filePath = rootSource + File.separatorChar + name;
- DataElement deObj = null;
- if (include == INCLUDE_ALL)
- {
- if (isFolder)
- {
- deObj = _dataStore.createObject(subject, UNIVERSAL_FOLDER_DESCRIPTOR, name);
- }
- else // file
- {
- //if (ArchiveHandlerManager.getInstance().isArchive(list[i]))
- //{
- // deObj = ds.createObject(subject, UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR, name);
- // }
- // else
- // {
- deObj = _dataStore.createObject(subject, UNIVERSAL_FILE_DESCRIPTOR, name);
- // }
- }
- }
- return deObj;
- }
- return null;
- }
-
-
- else if (include == INCLUDE_FILES_ONLY)
- {
- if (!isFolder)
- {
- if (ArchiveHandlerManager.getInstance().isArchive(list[i]))
- {
- deObj = ds.createObject(subject, UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR, name);
- }
- else
- {
- deObj = _dataStore.createObject(subject,
- UNIVERSAL_FILE_DESCRIPTOR, name);
- }
- }
- }
- else if (include == INCLUDE_FOLDERS_ONLY)
- {
- if (isFolder)
- {
- deObj = _dataStore.createObject(subject, UNIVERSAL_FOLDER_DESCRIPTOR, name);
- }
- }
- else
- {
- }
- */
-
-
-
-// if (deObj != null)
- // {
- // deObj.setAttribute(DE.A_VALUE, rootSource + File.separatorChar);
-
- //_dataStore.command(dePropertyQuery, deObj); //File fobj = new
- // File(rootSource + File.separatorChar + name);
- //deObj.setAttribute(DE.A_SOURCE, setProperties(fobj, isExecutable)); }
-
- //classifyExecutable(newObject, false); return deObj; }
- // }
-
- /**
- * Method to list the files for a given filter.
- */
- public DataElement handleQueryFiles(DataElement subject, DataElement attributes,
- DataElement status, String queryType, boolean caseSensitive) {
-
- File fileobj = null;
-
- String filter = null;
- if (attributes != null)
- {
- filter = getFilterString(attributes.getAttribute(DE.A_SOURCE));
- showHidden = getShowHiddenFlag(attributes.getAttribute(DE.A_SOURCE));
- }
- else
- {
- filter = getFilterString(subject.getAttribute(DE.A_SOURCE));
- showHidden = getShowHiddenFlag(subject.getAttribute(DE.A_SOURCE));
- }
-
- if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR))
- fileobj = new File(subject.getName());
- else if (queryType.equals(UNIVERSAL_FOLDER_DESCRIPTOR))
- fileobj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- else
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query type to handleQueryFiles", null); //$NON-NLS-1$
-
-
- internalQueryAll(subject, fileobj, queryType, filter, caseSensitive, INCLUDE_FILES_ONLY);
-
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- /**
- * Method to list the folders for a given filter.
- */
- public DataElement handleQueryFolders(DataElement subject, DataElement attributes,
- DataElement status, String queryType, boolean caseSensitive) {
- if (queryType.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)
- || queryType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || queryType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- return handleQueryAllArchive(subject, attributes, status, caseSensitive, true);
- }
-
- File fileobj = null;
- String filter = null;
-
- if (attributes != null)
- {
- filter = getFilterString(attributes.getAttribute(DE.A_SOURCE));
- showHidden = getShowHiddenFlag(attributes.getAttribute(DE.A_SOURCE));
- }
- else
- {
- filter = getFilterString(subject.getAttribute(DE.A_SOURCE));
- showHidden = getShowHiddenFlag(subject.getAttribute(DE.A_SOURCE));
- }
-
- if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR))
- fileobj = new File(subject.getName());
- else if (queryType.equals(UNIVERSAL_FOLDER_DESCRIPTOR))
- fileobj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- else
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query type to handleQueryFolders", null); //$NON-NLS-1$
-
- internalQueryAll(subject, fileobj, queryType, filter, caseSensitive, INCLUDE_FOLDERS_ONLY);
-
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- /**
- * Method to list the roots.
- */
- public DataElement handleQueryRoots(DataElement subject, DataElement status) {
-// File fileobj = new File(subject.getName());
- new File(subject.getName());
- DataElement deObj = null;
-
- if (System.getProperty("os.name").toLowerCase().startsWith("windows")) { //$NON-NLS-1$ //$NON-NLS-2$
- String[] ALLDRIVES = { "c:\\", "d:\\", "e:\\", "f:\\", "g:\\", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- "h:\\", "i:\\", "j:\\", "k:\\", "l:\\", "m:\\", "n:\\", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- "o:\\", "p:\\", "q:\\", "r:\\", "s:\\", "t:\\", "u:\\", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- "v:\\", "w:\\", "x:\\", "y:\\", "z:\\" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- for (int idx = 0; idx < ALLDRIVES.length; idx++) {
- File drive = new File(ALLDRIVES[idx]);
- if (drive.exists()) {
- try {
- String path = drive.getCanonicalPath();
- deObj = _dataStore.createObject(subject,
- UNIVERSAL_FOLDER_DESCRIPTOR, path);
- deObj.setAttribute(DE.A_SOURCE, setProperties(drive));
- deObj.setAttribute(DE.A_NAME, ""); //$NON-NLS-1$
- deObj.setAttribute(DE.A_VALUE, path);
- } catch (IOException e) {
- return statusDone(status);
- }
- }
- }
- } else { // not windows
- File[] list = File.listRoots();
-
- for (int i = 0; i < list.length; ++i) {
- deObj = _dataStore.createObject(subject,
- UNIVERSAL_FOLDER_DESCRIPTOR, list[i].getAbsolutePath());
- deObj.setAttribute(DE.A_SOURCE, setProperties(list[i]));
- deObj.setAttribute(DE.A_NAME, ""); //$NON-NLS-1$
- deObj.setAttribute(DE.A_VALUE, list[i].getAbsolutePath());
- }
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- /**
- * Method to Delete a file or folder.
- */
- public DataElement handleDelete(DataElement subject, DataElement status, boolean refreshDataStore) {
- String type = subject.getType();
- if (type.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || type.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- return handleDeleteFromArchive(subject, status);
- }
-
- File deleteObj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- DataElement deObj = null;
- if (!deleteObj.exists()) {
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_DOES_NOT_EXIST + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- UniversalServerUtilities.logError(CLASSNAME,
- "The object to delete does not exist", null); //$NON-NLS-1$
- } else {
- try {
- if (deleteObj.isFile()) {
- if (deleteObj.delete() == false) {
- status.setAttribute(DE.A_SOURCE, FAILED + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- } else {
- // delete was successful and delete the object from the
- // datastore
- deObj = _dataStore.find(subject, DE.A_NAME, subject
- .getName(), 1);
- _dataStore.deleteObject(subject, deObj);
- status.setAttribute(DE.A_SOURCE, SUCCESS + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- }
- _dataStore.refresh(subject);
- } else if (deleteObj.isDirectory()) { // it is directory and
- // need to delete the
- // entire directory +
- // children
- deleteDir(deleteObj, status);
- if (deleteObj.delete() == false) {
- status.setAttribute(DE.A_SOURCE, FAILED + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- UniversalServerUtilities.logError(CLASSNAME,
- "Deletion of dir fialed", null); //$NON-NLS-1$
- } else {
- _dataStore.deleteObjects(subject);
- DataElement parent = subject.getParent();
- _dataStore.deleteObject(parent, subject);
- _dataStore.refresh(parent);
- }
- } else {
- UniversalServerUtilities
- .logError(
- CLASSNAME,
- "The object to delete is neither a File or Folder! in handleDelete", //$NON-NLS-1$
- null);
- }
- } catch (Exception e) {
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_EXCEPTION + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- status.setAttribute(DE.A_VALUE, e.getLocalizedMessage());
- UniversalServerUtilities.logError(CLASSNAME,
- "Delete of the object failed", e); //$NON-NLS-1$
- }
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- private DataElement handleDeleteBatch(DataElement theElement, DataElement status)
- {
- DataElement substatus = _dataStore.createObject(null, "status", "substatus"); //$NON-NLS-1$ //$NON-NLS-2$
- int numOfSources = theElement.getNestedSize() - 2;
- for (int i = 0; i < numOfSources; i++)
- {
- DataElement subject = getCommandArgument(theElement, i+1);
- handleDelete(subject, substatus, false);
- /*
- if (!substatus.getSource().startsWith(SUCCESS))
- {
- status.setAttribute(DE.A_SOURCE, substatus.getSource());
- return statusDone(status);
- }
- */
- }
- status.setAttribute(DE.A_SOURCE, substatus.getSource());
- return statusDone(status);
- }
-
- /**
- * Method to Rename a file or folder.
- */
- public DataElement handleRename(DataElement subject, DataElement status) {
- File fileoldname = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- File filerename = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getAttribute(DE.A_SOURCE));
-
- // System.out.println(ArchiveHandlerManager.isVirtual(fileoldname
- // .getAbsolutePath()));
- if (ArchiveHandlerManager.isVirtual(fileoldname.getAbsolutePath())) {
- AbsoluteVirtualPath oldAbsPath = new AbsoluteVirtualPath(
- fileoldname.getAbsolutePath());
- AbsoluteVirtualPath newAbsPath = new AbsoluteVirtualPath(filerename
- .getAbsolutePath());
- ISystemArchiveHandler handler = _archiveHandlerManager
- .getRegisteredHandler(new File(oldAbsPath
- .getContainingArchiveString()));
- boolean success = !(handler == null)
- && handler.fullRename(oldAbsPath.getVirtualPart(),
- newAbsPath.getVirtualPart());
- if (success && handler != null) {
- subject.setAttribute(DE.A_NAME, filerename.getName());
- subject.setAttribute(DE.A_SOURCE, setProperties(handler
- .getVirtualFile(newAbsPath.getVirtualPart())));
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- _dataStore.update(subject);
- } else {
- status.setAttribute(DE.A_SOURCE, FAILED);
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
- if (filerename.exists())
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_EXIST);
- else {
- try {
- boolean done = fileoldname.renameTo(filerename);
- if (done) {
- subject.setAttribute(DE.A_NAME, filerename.getName());
- subject
- .setAttribute(DE.A_SOURCE,
- setProperties(filerename));
- status.setAttribute(DE.A_SOURCE, SUCCESS);
-
- if (filerename.isDirectory()) {
- // update children's properties
- updateChildProperties(subject, filerename);
- }
- _dataStore.update(subject);
- } else
- status.setAttribute(DE.A_SOURCE, FAILED);
- } catch (Exception e) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- UniversalServerUtilities.logError(CLASSNAME,
- "handleRename failed", e); //$NON-NLS-1$
- }
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- // DKM: during folder rename we need to recursively update all the parent
- // paths
- private void updateChildProperties(DataElement subject, File filerename) {
-
- int nestedSize = subject.getNestedSize();
- for (int i = 0; i < nestedSize; i++) {
- DataElement child = subject.get(i);
- child.setAttribute(DE.A_VALUE, filerename.getAbsolutePath());
-
- if (child.getNestedSize() > 0) {
- File childFile = new File(filerename, child.getName());
- updateChildProperties(child, childFile);
- }
- }
- }
-
- /**
- * Method to create a new file.
- */
- public DataElement handleCreateFile(DataElement subject,
- DataElement status, String queryType) {
- boolean wasFilter = queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR);
- if (queryType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)) {
- return handleCreateVirtualFile(subject, status, queryType);
- }
-
- File filename = null;
- if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR)) {
- if (subject.getName().indexOf(
- ArchiveHandlerManager.VIRTUAL_SEPARATOR) > 0) {
- subject.setAttribute(DE.A_TYPE,
- UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
- return handleCreateVirtualFile(subject, status, queryType);
- } else {
- filename = new File(subject.getValue());
- subject.setAttribute(DE.A_TYPE, UNIVERSAL_FILE_DESCRIPTOR);
- subject.setAttribute(DE.A_SOURCE, setProperties(filename));
- }
- } else if (queryType.equals(UNIVERSAL_FILE_DESCRIPTOR))
- filename = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- else
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query type to handleCreateFile", null); //$NON-NLS-1$
-
- if (filename != null)
- {
- if (filename.exists())
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_EXIST);
- else {
- try {
- boolean done = filename.createNewFile();
- if (ArchiveHandlerManager.getInstance().isArchive(filename)) {
- done = ArchiveHandlerManager.getInstance()
- .createEmptyArchive(filename);
- if (done)
- subject.setAttribute(DE.A_TYPE,
- UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR);
- } else {
- if (done)
- {
- subject.setAttribute(DE.A_TYPE,
- UNIVERSAL_FILE_DESCRIPTOR);
- }
- }
- subject.setAttribute(DE.A_SOURCE, setProperties(filename));
- if (done) {
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- if (wasFilter) {
- String fullName = subject.getValue();
- String name = fullName.substring(fullName
- .lastIndexOf(File.separatorChar) + 1, fullName
- .length());
- String path = fullName.substring(0, fullName
- .lastIndexOf(File.separatorChar));
- subject.setAttribute(DE.A_NAME, name);
- subject.setAttribute(DE.A_VALUE, path);
- }
- } else
- status.setAttribute(DE.A_SOURCE, FAILED);
- } catch (Exception e) {
- UniversalServerUtilities.logError(CLASSNAME,
- "handleCreateFile failed", e); //$NON-NLS-1$
- status.setAttribute(DE.A_SOURCE, FAILED);
- }
- }
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- /**
- * Method to create a new folder.
- */
- public DataElement handleCreateFolder(DataElement subject,
- DataElement status, String queryType) {
- if (queryType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- return handleCreateVirtualFolder(subject, status, queryType);
- }
-
- File filename = null;
- if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR))
- {
- if (subject.getName().indexOf(
- ArchiveHandlerManager.VIRTUAL_SEPARATOR) > 0)
- {
- subject.setAttribute(DE.A_TYPE,
- UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR);
- return handleCreateVirtualFolder(subject, status, queryType);
- }
- else
- {
- filename = new File(subject.getValue());
- subject.setAttribute(DE.A_TYPE, UNIVERSAL_FOLDER_DESCRIPTOR);
- subject.setAttribute(DE.A_SOURCE, setProperties(filename));
- }
- }
- else if (queryType.equals(UNIVERSAL_FOLDER_DESCRIPTOR))
- {
- filename = new File(subject.getValue());
- }
- else
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query type to handleCreateFolder", null); //$NON-NLS-1$
-
- if (filename != null)
- {
- if (filename.exists())
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_EXIST);
- else
- {
- try {
- boolean done = filename.mkdirs();
- if (done)
- {
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- subject.setAttribute(DE.A_SOURCE, setProperties(filename));
- subject.setAttribute(DE.A_TYPE,UNIVERSAL_FOLDER_DESCRIPTOR);
- subject.setAttribute(DE.A_NAME, filename.getName());
- subject.setAttribute(DE.A_VALUE, filename.getParentFile().getAbsolutePath());
- }
- else
- {
- status.setAttribute(DE.A_SOURCE, FAILED);
- }
-
- } catch (Exception e) {
- UniversalServerUtilities.logError(CLASSNAME,
- "handleCreateFolder failed", e); //$NON-NLS-1$
- status.setAttribute(DE.A_SOURCE, FAILED);
- }
- }
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- /**
- * Method to set ReadOnly to a file or folder.
- */
- public DataElement handleSetReadOnly(DataElement subject, DataElement status) {
-
- File filename = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- if (!filename.exists())
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_DOES_NOT_EXIST);
- else {
- try {
- boolean done = filename.setReadOnly();
- if (done) {
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- subject.setAttribute(DE.A_SOURCE, setProperties(filename));
- _dataStore.refresh(subject);
- } else {
- status.setAttribute(DE.A_SOURCE, FAILED);
- }
- } catch (Exception e) {
- UniversalServerUtilities.logError(CLASSNAME,
- "handleSetreadOnly", e); //$NON-NLS-1$
- }
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- /**
- * Method to set LastModified to a file or folder.
- */
- public DataElement handleSetLastModified(DataElement subject,
- DataElement status) {
-
- File filename = new File(subject.getAttribute(DE.A_VALUE));
- if (!filename.exists())
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_DOES_NOT_EXIST);
- else {
- try {
- String str = subject.getAttribute(DE.A_SOURCE);
-
- long date = Long.parseLong(str);
- boolean done = filename.setLastModified(date);
-
- filename = new File(subject.getAttribute(DE.A_VALUE));
- if (done) {
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- subject.setAttribute(DE.A_SOURCE, setProperties(filename));
- _dataStore.refresh(subject);
- } else
- status.setAttribute(DE.A_SOURCE, FAILED);
- } catch (Exception e) {
- UniversalServerUtilities.logError(CLASSNAME,
- "handleSetLastModified", e); //$NON-NLS-1$
- }
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- /**
- * Method to Retrieve properties of the file or folder.
- */
- protected DataElement handleQueryBasicProperty(DataElement subject,
- DataElement status) {
- File fileobj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- subject.setAttribute(DE.A_SOURCE, setProperties(fileobj));
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- /**
- * Method to Retrieve canWrite property of the file or folder.
- */
- protected DataElement handleQuerycanWriteProperty(DataElement subject,
- DataElement status) {
- File fileObj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
-
- String version = VERSION_1;
- StringBuffer buffer = new StringBuffer(50);
- boolean canWrite = fileObj.canWrite();
-
- buffer.append(version).append(TOKEN_SEPARATOR).append(canWrite);
- subject.setAttribute(DE.A_SOURCE, buffer.toString());
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- /**
- * Method to query advance properties.
- */
-
- protected DataElement handleQueryAdvanceProperty(DataElement subject,
- DataElement status) {
- // log error currently there are no advance properties for Universal
- // Files
- return statusDone(status);
- }
-
- protected DataElement handleQueryFileClassification(DataElement subject, DataElement status) {
-
- FileClassifier classifier = getFileClassifier(subject);
- classifier.start();
- statusDone(status);
-
- return status;
- }
-
- /**
- * Method to query existence of the file or folder.
- */
- protected DataElement handleQueryExists(DataElement subject,
- DataElement status, String queryType) {
-
- File fileobj = null;
- if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR)) {
- if (subject.getName().indexOf(
- ArchiveHandlerManager.VIRTUAL_SEPARATOR) > 0) {
- VirtualChild child = _archiveHandlerManager
- .getVirtualObject(subject.getName());
- if (child.exists()) {
- status.setAttribute(DE.A_SOURCE, "true"); //$NON-NLS-1$
- return statusDone(status);
- } else {
- status.setAttribute(DE.A_SOURCE, "false"); //$NON-NLS-1$
- return statusDone(status);
- }
- } else {
- fileobj = new File(subject.getName());
- }
- } else if (queryType.equals(UNIVERSAL_FILE_DESCRIPTOR)
- || queryType.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
- fileobj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- else if (queryType.equals(UNIVERSAL_FOLDER_DESCRIPTOR))
- fileobj = new File(subject.getAttribute(DE.A_VALUE));
- else if (queryType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || queryType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- AbsoluteVirtualPath vpath = getAbsoluteVirtualPath(subject);
- ISystemArchiveHandler handler = _archiveHandlerManager
- .getRegisteredHandler(new File(vpath
- .getContainingArchiveString()));
- if (handler == null) {
- status.setAttribute(DE.A_SOURCE, "false"); //$NON-NLS-1$
- return statusDone(status);
- }
- VirtualChild child = handler.getVirtualFile(vpath.getVirtualPart());
- if (child.exists()) {
- status.setAttribute(DE.A_SOURCE, "true"); //$NON-NLS-1$
- return statusDone(status);
- }
-
- }
-
- if (fileobj != null && fileobj.exists())
- status.setAttribute(DE.A_SOURCE, "true"); //$NON-NLS-1$
- else
- status.setAttribute(DE.A_SOURCE, "false"); //$NON-NLS-1$
- return statusDone(status);
- }
-
- /**
- * Method to get remote object
- */
- public DataElement handleQueryGetRemoteObject(DataElement subject,
- DataElement status, String queryType) {
- File fileobj = null;
- boolean isVirtual = false;
- String fullName = subject.getValue();
- if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR))
- {
- isVirtual = ArchiveHandlerManager.isVirtual(fullName);
- String filterValue = subject.getValue();
- // . translates to home dir
- if (filterValue.equals(".")) //$NON-NLS-1$
- {
- filterValue = System.getProperty("user.home"); //$NON-NLS-1$
- subject.setAttribute(DE.A_VALUE, filterValue);
- }
- if (!isVirtual)
- fileobj = new File(filterValue);
- }
- else if (queryType.equals(UNIVERSAL_FILE_DESCRIPTOR))
- {
- String name = subject.getName();
- String path = subject.getValue();
- fileobj = new File(path, name);
- }
- else if (queryType.equals(UNIVERSAL_FOLDER_DESCRIPTOR))
- {
- String name = subject.getName();
- String path = subject.getValue();
- if (name.length() == 0)
- {
- fileobj = new File(path);
- }
- else
- {
- fileobj = new File(path, name);
- }
- }
- else {
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query type to handleQueryGetRemoteObject", null); //$NON-NLS-1$
- return statusDone(status);
- }
-
- if (!isVirtual && fileobj != null && fileobj.exists()) {
-
- // Get the canonical path name so that we preserve case for Windows
- // systems.
- // Even though Windows is case insensitive, we still want to
- // preserve case
- // when we show the path as a property to the user
- try {
- fullName = fileobj.getCanonicalPath();
-
- } catch (IOException e) {
- return statusDone(status);
- }
-
- if (fileobj.isFile())
- {
- if (_archiveHandlerManager.isArchive(fileobj)) {
- subject.setAttribute(DE.A_TYPE,UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR);
- } else {
- subject.setAttribute(DE.A_TYPE, UNIVERSAL_FILE_DESCRIPTOR);
- }
- String name = fullName
- .substring(
- fullName.lastIndexOf(File.separatorChar) + 1,
- fullName.length());
- String path = fullName.substring(0, fullName
- .lastIndexOf(File.separatorChar));
- subject.setAttribute(DE.A_NAME, name);
- subject.setAttribute(DE.A_VALUE, path);
- }
- else { // directory
- subject.setAttribute(DE.A_TYPE, UNIVERSAL_FOLDER_DESCRIPTOR);
- subject.setAttribute(DE.A_NAME, ""); //$NON-NLS-1$
- subject.setAttribute(DE.A_VALUE, fullName);
- }
-
- // DKM - do basic property stuff here
- subject.setAttribute(DE.A_SOURCE, setProperties(fileobj));
-
-
- /*
- // classify the file too
- if (fileobj.isFile()) {
- subject.setAttribute(DE.A_SOURCE, subject
- .getAttribute(DE.A_SOURCE)
- + "|" + FileClassifier.classifyFile(fileobj));
- }
- */
-
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- } else if (isVirtual) {
- try {
- String goodFullName = ArchiveHandlerManager
- .cleanUpVirtualPath(fullName);
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(goodFullName);
- VirtualChild child = _archiveHandlerManager
- .getVirtualObject(goodFullName);
- if (child.exists()) {
-
- if (child.isDirectory) {
- subject.setAttribute(DE.A_TYPE,
- UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR);
- subject.setAttribute(DE.A_NAME, child.name);
- if (child.path.equals("")) { //$NON-NLS-1$
- subject.setAttribute(DE.A_VALUE, avp
- .getContainingArchiveString());
- } else {
- subject.setAttribute(DE.A_VALUE, avp
- .getContainingArchiveString()
- + ArchiveHandlerManager.VIRTUAL_SEPARATOR
- + child.path);
- }
-
- } else {
- subject.setAttribute(DE.A_TYPE,
- UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
- String name = child.name;
- String path = avp.getContainingArchiveString();
- if (!child.path.equals("")) { //$NON-NLS-1$
- path = path
- + ArchiveHandlerManager.VIRTUAL_SEPARATOR
- + child.path;
- }
-
- subject.setAttribute(DE.A_NAME, name);
- subject.setAttribute(DE.A_VALUE, path);
- }
-
- subject.setAttribute(DE.A_SOURCE, setProperties(child));
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- } else {
- UniversalServerUtilities.logWarning(CLASSNAME,
- "object does not exist"); //$NON-NLS-1$
- subject.setAttribute(DE.A_SOURCE, setProperties(child));
- status
- .setAttribute(DE.A_SOURCE,
- FAILED_WITH_DOES_NOT_EXIST);
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- } else {
- subject.setAttribute(DE.A_SOURCE, setProperties(fileobj));
- status.setAttribute(DE.A_SOURCE, FAILED_WITH_DOES_NOT_EXIST);
- }
-
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- protected DataElement getFileElement(DataElement subject, File file) {
- String fileName = file.getName();
-
- for (int i = 0; i < subject.getNestedSize(); i++) {
- DataElement child = subject.get(i);
- if (child.getName().equals(fileName)) {
- String type = subject.getType();
- boolean isfile = file.isFile();
-
- if (isfile) {
- return child;
- } else if (type.equals(UNIVERSAL_FOLDER_DESCRIPTOR)) {
- return child;
- }
- }
- }
-
- return null;
- }
-
- protected void createDataElement(DataStore ds, DataElement subject,
- File[] list, String queryType, String filter, int include)
- {
- createDataElement(ds, subject, list, queryType, filter, include, null);
- }
- /**
- * Method to create the DataElement object in the datastore.
- */
-
- protected void createDataElement(DataStore ds, DataElement subject,
- File[] list, String queryType, String filter, int include, String types[])
- {
-
- IdentityHashMap foundMap = new IdentityHashMap(list.length);
- List children = subject.getNestedData();
- if (children != null)
- {
- ArrayList filteredChildren = new ArrayList();
- for (int f = 0; f < children.size(); f++)
- {
- DataElement child = (DataElement)children.get(f);
- String type = child.getType();
- if (type.equals(UNIVERSAL_FILE_DESCRIPTOR) || type.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
- {
- if (StringCompare.compare(filter, child.getName(), false))
- {
- filteredChildren.add(child);
- }
- }
- else
- {
- filteredChildren.add(child);
- }
- }
-
-
- if (filteredChildren.size() != 0)
- {
- boolean found;
- Object[] currentObjList = filteredChildren.toArray();
-
- // Check if the current Objects in the DataStore are valid... exist
- // on the remote host
- try {
- for (int i = 0; i < currentObjList.length; ++i)
- {
- found = false;
- DataElement previousElement = (DataElement) currentObjList[i];
- for (int j = 0; j < list.length && !found; ++j)
- {
-
- if (previousElement.getName().equals(list[j].getName()) && !previousElement.isDeleted())
- {
- // Type have to be equal as well
- String type = ((DataElement) currentObjList[i]).getType();
- boolean isfile = list[j].isFile();
- if (((type.equals(UNIVERSAL_FILE_DESCRIPTOR) || type.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)) && isfile)
- ||
- (type.equals(UNIVERSAL_FOLDER_DESCRIPTOR) && !isfile))
- {
- if (types !=null)
- {
- String attributes = previousElement.getAttribute(DE.A_SOURCE);
- String thisType = types[j];
- if (attributes.indexOf(thisType) != -1)
- {
- foundMap.put(list[j], currentObjList[i]); // already exists so don't recreate the element
- found = true;
- }
- }
- else
- {
- foundMap.put(list[j], currentObjList[i]); // already exists so don't recreate the element
- found = true;
- }
- }
- }
- } // end for j
-
- // Object in DataStore no longer exists in the host. Remove
- // it from DataStore.
- if (found == false)
- {
- //DataElement deObj = ds.find(subject, DE.A_NAME,((DataElement) currentObjList[i]).getName(), 1);
- ds.deleteObject(subject, previousElement);
- }
- } // end for i
- } catch (Exception e) {
- e.printStackTrace();
- UniversalServerUtilities.logError(CLASSNAME,
- "createDataElement failed with exception - isFile ", e); //$NON-NLS-1$
- }
- } // end currentObj not 0
- }
-
- // Now query the other way. If the object queried, exists on the host,
- // then check if
- // it is already in datastore. If so do not recreate it.
-
-
-
- // DKM - test - dummy object
- //ds.createObject(subject,UNIVERSAL_FILE_DESCRIPTOR,"I'm not really here!");
-
- for (int i = 0; i < list.length; i++)
- {
- DataElement deObj = null;
- File file = list[i];
-
- try
- {
- String fileName = file.getName();
- boolean isHidden = file.isHidden() || fileName.charAt(0) == '.';
-
- if (!isHidden || showHidden)
- {
- // check for duplicates
- Object obj = foundMap.get(file);
- if (obj != null && obj instanceof DataElement)
- {
- deObj = (DataElement)obj;
- }
- //deObj = getFileElement(subject, list[i]);
-
- if (deObj == null)
- {
- if (include == INCLUDE_ALL)
- {
- if (file.isDirectory())
- {
- deObj = ds.createObject(subject,deUniversalFolderObject,fileName);
- }
- else
- // file
- {
- if (ArchiveHandlerManager.getInstance().isArchive(file))
- {
- deObj = ds
- .createObject(
- subject,
- deUniversalArchiveFileObject,
- fileName);
- }
- else
- {
- deObj = ds.createObject(subject,
- deUniversalFileObject,
- fileName);
- }
- }
- }
- else if (include == INCLUDE_FOLDERS_ONLY)
- {
- if (ArchiveHandlerManager.getInstance().isArchive(file))
- {
- deObj = ds.createObject(subject,
- deUniversalArchiveFileObject,
- fileName);
- }
- else
- {
- deObj = ds.createObject(subject,
- deUniversalFolderObject,
- fileName);
- }
- }
- else if (include == INCLUDE_FILES_ONLY)
- {
- if (ArchiveHandlerManager.getInstance().isArchive(file))
- {
- deObj = ds.createObject(subject,
- deUniversalArchiveFileObject,
- fileName);
- }
- else
- {
- deObj = ds
- .createObject(subject,
- deUniversalFileObject,
- fileName);
- }
- }
-
- if (deObj != null)
- {
- if (queryType.equals(UNIVERSAL_FILTER_DESCRIPTOR))
- {
- deObj.setAttribute(DE.A_VALUE, subject.getAttribute(DE.A_VALUE));
- }
- else
- {
-
- if (subject.getName().length() > 0)
- {
- String valueStr = subject.getAttribute(DE.A_VALUE);
- //String valueStr = list[i].getParentFile().getAbsolutePath();
- StringBuffer valueBuffer = new StringBuffer(valueStr);
- if ((_isWindows && valueStr.endsWith("\\"))|| valueStr.endsWith("/") || subject.getName().startsWith("/")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- {
- valueBuffer.append(subject.getName());
- deObj.setAttribute(DE.A_VALUE,valueBuffer.toString());
- }
- else
- {
- valueBuffer.append(File.separatorChar);
- valueBuffer.append(subject.getName());
- deObj.setAttribute(DE.A_VALUE,valueBuffer.toString());
- }
- }
- else
- {
- String valueStr = list[i].getParentFile().getAbsolutePath();
- deObj.setAttribute(DE.A_VALUE, valueStr);
- }
- }
- }
- }
- // DKM - do basic property stuff here
- String properties = setProperties(file);
- if (deObj != null)
- {
- if (types != null)
- {
- /*
- String oldClassification = getClassificationString(deObj.getAttribute(DE.A_SOURCE));
- if (oldClassification != null && !oldClassification.equals(types[i]))
- {
- deObj.setAttribute(DE.A_SOURCE, properties + "|" + oldClassification + " " + types[i]);
- }
- else
- */
- {
- deObj.setAttribute(DE.A_SOURCE, properties + "|" + types[i]); //$NON-NLS-1$
- }
- }
- else
- {
- deObj.setAttribute(DE.A_SOURCE, properties);
- }
- }
- }
- } catch (Exception e)
- {
- UniversalServerUtilities
- .logError(
- CLASSNAME,
- "createDataElement failed with exception - isHidden ", //$NON-NLS-1$
- e);
- }
- } // end for
- //*/
-
- }
-
- /**
- * Method to create the DataElement object in the datastore out of a list of
- * VirtualChildren
- */
-
- protected void createDataElement(DataStore ds, DataElement subject,
- VirtualChild[] list, String filter, String rootPath,
- String virtualPath)
- {
-
- IdentityHashMap foundMap = null;
- List children = subject.getNestedData();
- if (children != null)
- {
- ArrayList filteredChildren = new ArrayList();
-
- for (int f = 0; f < children.size(); f++)
- {
- DataElement child = (DataElement)children.get(f);
- String type = child.getType();
- if (type.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) ||
- type.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- if (StringCompare.compare(filter, child.getName(), false))
- {
- filteredChildren.add(child);
- }
- }
- else
- {
- filteredChildren.add(child);
- }
- }
-
- foundMap = new IdentityHashMap(list.length);
-
- if (filteredChildren.size() != 0)
- {
- boolean found;
- Object[] currentObjList = filteredChildren.toArray();
-
- // Check if the current Objects in the DataStore are valid... exist
- // on the remote host
- try {
- for (int i = 0; i < currentObjList.length; ++i) {
- found = false;
- DataElement previousElement = (DataElement) currentObjList[i];
- for (int j = 0; j < list.length && !found; ++j)
- {
-
- if (!previousElement.isDeleted()
- && previousElement.getName().equals(list[j].name))
- {
- // Type have to be equal as well
- String type = previousElement.getType();
- boolean isfile = !list[j].isDirectory;
- if (type.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || (type.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR) && !isfile)
- )
- {
- foundMap.put(list[j], previousElement);
- found = true;
- }
- }
- } // end for j
-
- // Object in DataStore no longer exists in the host. Remove
- // it from DataStore.
- if (found == false)
- {
- ds.deleteObject(subject, previousElement);
- }
- } // end for i
- } catch (Exception e) {
- e.printStackTrace();
- UniversalServerUtilities.logError(CLASSNAME,
- "createDataElement failed with exception - isFile ", e); //$NON-NLS-1$
- }
- } // end currentObj not 0
- }
-
-
- // Now query the other way. If the object queried, exists on the host,
- // then check if
- // it is already in datastore. If so do not recreate it.
-
- if (list != null)
- {
- for (int i = 0; i < list.length; i++)
- {
- DataElement deObj = null;
- VirtualChild child = list[i];
- Object obj = null;
- if (foundMap != null)
- {
- obj = foundMap.get(child);
- }
- if (obj != null && obj instanceof DataElement)
- {
- deObj = (DataElement)obj;
- }
-
- if (deObj == null)
- {
- if (child.isDirectory)
- {
- deObj = _dataStore.createObject(subject, UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR,child.name);
- }
- else // file
- {
- deObj = _dataStore.createObject(subject,UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR, child.name);
- }
-
- }
- deObj.setAttribute(DE.A_VALUE, rootPath + ArchiveHandlerManager.VIRTUAL_SEPARATOR + virtualPath);
- deObj.setAttribute(DE.A_SOURCE, setProperties(child));
- }
- }
-
- //*/
- }
-
- public String setProperties(File fileObj) {
- return setProperties(fileObj, false);
- }
-
- /**
- * Method to obtain the properties of file or folder.
- */
- public String setProperties(File fileObj, boolean doArchiveProperties) {
- String version = VERSION_1;
- StringBuffer buffer = new StringBuffer(500);
- long date = fileObj.lastModified();
- long size = fileObj.length();
- boolean hidden = fileObj.isHidden();
- boolean canWrite = fileObj.canWrite() ;
- boolean canRead = fileObj.canRead();
-
- // These extra properties here might cause problems for older clients,
- // ie: a IndexOutOfBounds in UniversalFileImpl.
-
- // DKM: defer this until later as it is bad for performacnes..
- // I think we're doing the full query on an archive by instantiating a
- // handler
- boolean isArchive = false;//ArchiveHandlerManager.getInstance().isArchive(fileObj);
-
- String comment;
- if (isArchive)
- comment = ArchiveHandlerManager.getInstance().getComment(fileObj);
- else
- comment = " "; //$NON-NLS-1$
-
- long compressedSize = size;
- String compressionMethod = " "; //$NON-NLS-1$
- double compressionRatio = 0;
-
- long expandedSize;
- if (isArchive)
- expandedSize = ArchiveHandlerManager.getInstance().getExpandedSize(
- fileObj);
- else
- expandedSize = size;
-
- buffer.append(version).append(TOKEN_SEPARATOR).append(date).append(
- TOKEN_SEPARATOR).append(size).append(TOKEN_SEPARATOR);
- buffer.append(hidden).append(TOKEN_SEPARATOR).append(canWrite).append(
- TOKEN_SEPARATOR).append(canRead);
-
- // values might not be used but we set them here just so that there are right number
- // of properties
- buffer.append(TOKEN_SEPARATOR);
- buffer.append(comment).append(TOKEN_SEPARATOR).append(compressedSize)
- .append(TOKEN_SEPARATOR).append(compressionMethod).append(
- TOKEN_SEPARATOR);
- buffer.append(compressionRatio).append(TOKEN_SEPARATOR).append(
- expandedSize);
-
-
- String buf = buffer.toString();
- return buf;
- }
-
- public String setProperties(VirtualChild fileObj) {
- String version = VERSION_1;
- StringBuffer buffer = new StringBuffer(500);
- long date = fileObj.getTimeStamp();
- long size = fileObj.getSize();
- boolean hidden = false;
- boolean canWrite = fileObj.getContainingArchive().canWrite();
- boolean canRead = fileObj.getContainingArchive().canRead();
-
- // These extra properties here might cause problems for older clients,
- // ie: a IndexOutOfBounds in UniversalFileImpl.
- String comment = fileObj.getComment();
- if (comment.equals("")) //$NON-NLS-1$
- comment = " "; // make sure this is still a //$NON-NLS-1$
- // token
- long compressedSize = fileObj.getCompressedSize();
- String compressionMethod = fileObj.getCompressionMethod();
- if (compressionMethod.equals("")) //$NON-NLS-1$
- compressionMethod = " "; //$NON-NLS-1$
- double compressionRatio = fileObj.getCompressionRatio();
- long expandedSize = size;
-
- buffer.append(version).append(TOKEN_SEPARATOR).append(date).append(
- TOKEN_SEPARATOR).append(size).append(TOKEN_SEPARATOR);
- buffer.append(hidden).append(TOKEN_SEPARATOR).append(canWrite).append(
- TOKEN_SEPARATOR).append(canRead);
-
- buffer.append(TOKEN_SEPARATOR);
- buffer.append(comment).append(TOKEN_SEPARATOR).append(compressedSize)
- .append(TOKEN_SEPARATOR).append(compressionMethod).append(
- TOKEN_SEPARATOR);
- buffer.append(compressionRatio).append(TOKEN_SEPARATOR).append(
- expandedSize);
-
- return buffer.toString();
- }
-
- /**
- * Method to obtain the classificatoin string of file or folder.
- */
- protected String getClassificationString(String s) {
-
- //StringTokenizer tokenizer = new StringTokenizer(s, TOKEN_SEPARATOR);
- String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
- int tokens = str.length;
- if (tokens < 10)
- return null;
- /*
- int tokens = tokenizer.countTokens();
- if (tokens < 10)
- return null;
-
- String[] str = new String[tokens];
-
- for (int i = 0; i < tokens; ++i) {
- str[i] = tokenizer.nextToken();
- }
-*/
-
- return (str[10]);
- }
- /**
- * Method to obtain the filter string of file or folder.
- */
- protected String getFilterString(String s) {
-
- //StringTokenizer tokenizer = new StringTokenizer(s, TOKEN_SEPARATOR);
- String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
- int tokens = str.length;
-
- /*
- int tokens = tokenizer.countTokens();
- String[] str = new String[tokens];
-
- for (int i = 0; i < tokens; ++i) {
- str[i] = tokenizer.nextToken();
- }
- */
- if (tokens > 1)
- {
- return (str[1]);
- }
- else
- {
- System.out.println("problem with properties:"+s); //$NON-NLS-1$
- return "*"; //$NON-NLS-1$
- }
- }
-
- /**
- * Method to obtain the show Hidden flag for file or folder.
- */
- protected boolean getShowHiddenFlag(String s) {
-
- //StringTokenizer tokenizer = new StringTokenizer(s, TOKEN_SEPARATOR);
- String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
- int tokens = str.length;
- /*
- int tokens = tokenizer.countTokens();
- String[] str = new String[tokens];
-
- for (int i = 0; i < tokens; ++i) {
- str[i] = tokenizer.nextToken();
- }
- */
- if (tokens > 2)
- {
- return ((new Boolean(str[2])).booleanValue());
- }
- else
- {
- System.out.println("show hidden flag problem:"+s); //$NON-NLS-1$
- return true;
- }
- }
-
- /**
- * Method to obtain the depth for a search
- */
- protected int getDepth(String s)
- {
- String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
- int tokens = str.length;
- /*
- StringTokenizer tokenizer = new StringTokenizer(s, TOKEN_SEPARATOR);
-
- int tokens = tokenizer.countTokens();
- */
- if (tokens < 4) {
- return 1;
- }
-/*
- String[] str = new String[tokens];
-
- for (int i = 0; i < tokens; ++i) {
- str[i] = tokenizer.nextToken();
- }
-*/
- return ((new Integer(str[3])).intValue());
- }
-
- /**
- * Method to download a file.
- */
- protected DataElement handleDownload(DataElement theElement, DataElement status)
- {
-
- UniversalDownloadHandler downloadThread = new UniversalDownloadHandler(
- _dataStore, this, theElement, status);
- downloadThread.start();
-
- // save find thread in hashmap for retrieval during cancel
- _cancellableThreads.put(status.getParent(), downloadThread);
- return status;
-
- /*
- * DataElement arg1 = getCommandArgument(theElement, 1); String
- * elementType = arg1.getType(); String remotePath = arg1.getName();
- *
- * String resultType = null; String resultMessage = null;
- *
- * FileInputStream inputStream = null; BufferedInputStream
- * bufInputStream = null;
- *
- * try {
- *
- * if (elementType.equals(UNIVERSAL_FILE_DESCRIPTOR) ||
- * elementType.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR) ||
- * elementType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)) {
- * _dataStore.trace("download:" + remotePath + "," + elementType);
- *
- * File file = new File(remotePath);
- *
- *
- * if (elementType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)) {
- * AbsoluteVirtualPath vpath = getAbsoluteVirtualPath(remotePath);
- *
- * ISystemArchiveHandler handler =
- * _archiveHandlerManager.getRegisteredHandler(new
- * File(vpath.getContainingArchiveString())); VirtualChild vChild =
- * handler.getVirtualFile(vpath.getVirtualPart()); file =
- * vChild.getExtractedFile(); }
- *
- * DataElement arg2 = getCommandArgument(theElement, 2); DataElement
- * arg3 = getCommandArgument(theElement, 3);
- *
- * int mode = (Integer.valueOf(arg1.getSource())).intValue(); String
- * localPath = arg2.getName();
- *
- * boolean isText = (mode == TEXT_MODE);
- *
- * String clientEncoding = null;
- *
- * if (isText) { clientEncoding = arg2.getSource(); } // Read in the
- * file inputStream = new FileInputStream(file); bufInputStream = new
- * BufferedInputStream(inputStream, BUFFER_SIZE);
- *
- * boolean first = true; byte[] buffer = new byte[BUFFER_SIZE]; byte[]
- * convBytes; int numToRead = 0;
- *
- * int available = bufInputStream.available();
- *
- * while (available > 0) { numToRead = (available < BUFFER_SIZE) ?
- * available : BUFFER_SIZE;
- *
- * int bytesRead = bufInputStream.read(buffer, 0, numToRead);
- *
- * if (bytesRead == -1) break;
- *
- * if (isText) { convBytes = (new String(buffer, 0,
- * bytesRead)).getBytes(clientEncoding);
- *
- * if (first) { // send first set of bytes first = false;
- * _dataStore.updateFile(localPath, convBytes, convBytes.length, true); }
- * else { // append subsequent segments
- * _dataStore.updateAppendFile(localPath, convBytes, convBytes.length,
- * true); } } else {
- *
- * if (first) { // send first set of bytes first = false;
- * _dataStore.updateFile(localPath, buffer, bytesRead, true); } else { //
- * append subsequent segments _dataStore.updateAppendFile(localPath,
- * buffer, bytesRead, true); } }
- *
- * available = bufInputStream.available(); }
- *
- * resultType = DOWNLOAD_RESULT_SUCCESS_TYPE; resultMessage =
- * DOWNLOAD_RESULT_SUCCESS_MESSAGE; } } catch (FileNotFoundException e) {
- * UniversalServerUtilities.logError(CLASSNAME, "handleDownload: error
- * reading file " + remotePath, e); resultType =
- * DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION; resultMessage =
- * e.getLocalizedMessage(); } catch (UnsupportedEncodingException e) {
- * UniversalServerUtilities.logError(CLASSNAME, "handleDownload: error
- * reading file " + remotePath, e); resultType =
- * DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION; resultMessage =
- * e.getLocalizedMessage(); } catch (IOException e) {
- * UniversalServerUtilities.logError(CLASSNAME, "handleDownload: error
- * reading file " + remotePath, e); resultType =
- * DOWNLOAD_RESULT_IO_EXCEPTION; resultMessage =
- * e.getLocalizedMessage(); } catch (Exception e) { e.printStackTrace(); }
- * finally {
- *
- * try {
- *
- * if (bufInputStream != null) bufInputStream.close(); } catch
- * (IOException e) { UniversalServerUtilities.logError(CLASSNAME,
- * "handleDownload: error closing reader on " + remotePath, e);
- * resultType = DOWNLOAD_RESULT_IO_EXCEPTION; resultMessage =
- * e.getMessage(); } }
- *
- * _dataStore.createObject(arg1, resultType, resultMessage);
- * _dataStore.refresh(arg1); return statusDone(status);
- */
- }
-
- /**
- * Get the system encoding
- */
- protected DataElement handleQueryEncoding(DataElement subject, DataElement status) {
-
- String encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
-
- subject.setAttribute(DE.A_VALUE, encoding);
- _dataStore.refresh(subject);
-
- return statusDone(status);
- }
-
- /**
- * Get an unused port number.
- */
- protected DataElement handleQueryUnusedPort(DataElement subject, DataElement status) {
-
- int port = -1;
-
- // create a server socket with port 0 (i.e. use any free port)
- try {
- ServerSocket socket = new ServerSocket(0);
- port = socket.getLocalPort();
- socket.close();
- }
- catch (IOException e) {
- UniversalServerUtilities.logError(CLASSNAME, "Can not get unused port", e); //$NON-NLS-1$
- port = -1;
- }
-
- String portNum = String.valueOf(port);
- subject.setAttribute(DE.A_VALUE, portNum);
- _dataStore.refresh(subject);
-
- return statusDone(status);
- }
-
- /**
- * Complete status.
- */
- public DataElement statusDone(DataElement status) {
- status.setAttribute(DE.A_NAME, DataStoreResources.model_done);
- _dataStore.refresh(status);
- return status;
- }
-
- /**
- * Cancel status.
- */
- public DataElement statusCancelled(DataElement status) {
- status.setAttribute(DE.A_NAME, "cancelled"); //$NON-NLS-1$
- _dataStore.refresh(status);
- return status;
- }
-
- /**
- * @see Miner#load()
- */
- public void load() {
- // Create datastore tree structure for UniversalFileSystemMiner
- deUFSnode = _dataStore.createObject(_minerData, UNIVERSAL_NODE_DESCRIPTOR, "universal.node"); //$NON-NLS-1$
-// deUFStemp = _dataStore.createObject(deUFSnode, UNIVERSAL_NODE_DESCRIPTOR, "universal.temp");
- _dataStore.createObject(deUFSnode, UNIVERSAL_NODE_DESCRIPTOR, "universal.temp"); //$NON-NLS-1$
-// deUFSfilters = _dataStore.createObject(deUFSnode, UNIVERSAL_NODE_DESCRIPTOR, "universal.filters");
- _dataStore.createObject(deUFSnode, UNIVERSAL_NODE_DESCRIPTOR, "universal.filters"); //$NON-NLS-1$
- deUFSuploadlog = _dataStore.createObject(deUFSnode, UNIVERSAL_NODE_DESCRIPTOR, "universal.uploadlog"); //$NON-NLS-1$
-
- UniversalByteStreamHandler universalHandler = new UniversalByteStreamHandler(_dataStore, deUFSuploadlog);
-
- //_dataStore.setByteStreamHandler(new UniversalByteStreamHandler(_dataStore, deUFSuploadlog));
- _dataStore.registerByteStreamHandler(universalHandler);
-
- _dataStore.refresh(_minerData);
- _dataStore.refresh(deUFSuploadlog);
- }
-
- public void finish() {
- //_archiveHandlerManager.dispose();
- super.finish();
- }
-
- /**
- * Retrieve the fully qualified class name (including package) for the
- * specified .class file. This information is required by the distributed
- * debugger.
- */
- protected DataElement handleQueryClassName(DataElement subject,
- DataElement status) {
- String filename = subject.getAttribute(DE.A_VALUE) + File.separatorChar
- + subject.getName();
-
- try {
- ClassFileParser parser = new ClassFileParser(
- getInputStreamForFile(filename));
- String name = parser.getPackageName();
- if (name != null) {
- _dataStore.createObject(status, "qualifiedClassName", name); //$NON-NLS-1$
- } else {
- _dataStore.createObject(status, "qualifiedClassName", "null"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } catch (java.io.IOException e) {
- _dataStore.createObject(status, "qualifiedClassName", "null"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return statusDone(status);
- }
-
- /**
- * Retrieve the fully qualified class name (including package) for a class
- * file.
- */
- protected DataElement handleQueryQualifiedClassName(DataElement subject, DataElement status) {
-
- // first get parent path
- String parentPath = subject.getAttribute(DE.A_VALUE);
-
- // get system separator
- String sep = File.separator;
-
- boolean isParentArchive = ArchiveHandlerManager.getInstance().isRegisteredArchive(parentPath);
-
- boolean isParentVirtual = ArchiveHandlerManager.isVirtual(parentPath);
-
- // parent is virtual folder, so make separator "/"
- if (isParentVirtual) {
- sep = "/"; //$NON-NLS-1$
- }
-
- // file path
- String filePath = null;
-
- // parent is not a virtual archive
- if (!isParentArchive) {
-
- // if parent path does not end with separator, then add it
- if (!parentPath.endsWith(sep)) {
- parentPath = parentPath + sep;
- }
-
- // add file name to get the file path
- filePath = parentPath + subject.getName();
- }
- // parent is an archive, so add virtual file separator, then the file name
- else {
- filePath = parentPath + ArchiveHandlerManager.VIRTUAL_SEPARATOR + subject.getName();
- }
-
- try {
-
- String className = null;
-
- // if parent is not an archive or a virtual folder, then file must be
- // a file
- if (!(isParentArchive || isParentVirtual)) {
- className = ClassFileUtil.getInstance().getQualifiedClassName(filePath);
- }
- // otherwise, file is a virtual file
- else {
- String classification = SystemFileClassifier.getInstance().classifyFile(filePath);
- String execJava = "executable(java:"; //$NON-NLS-1$
-
- int idx = classification.indexOf(execJava);
-
- if (idx != -1) {
- idx = idx + execJava.length();
- int jdx = classification.indexOf(")", idx); //$NON-NLS-1$
-
- if (jdx != -1) {
-
- if (jdx > idx) {
- className = classification.substring(idx, jdx);
- }
- else if (jdx == idx) {
- className = ""; //$NON-NLS-1$
- }
- }
- }
- }
-
- if (className != null) {
- _dataStore.createObject(status, TYPE_QUALIFIED_CLASSNAME, className);
- } else {
- _dataStore.createObject(status, TYPE_QUALIFIED_CLASSNAME, "null"); //$NON-NLS-1$
- }
- } catch (IOException e) {
- UniversalServerUtilities.logError(CLASSNAME,
- "I/O error occured trying to read class file " + filePath, //$NON-NLS-1$
- null);
-
- _dataStore.createObject(status, TYPE_QUALIFIED_CLASSNAME, "null"); //$NON-NLS-1$
- }
-
- return statusDone(status);
- }
-
- /**
- * Method to retrieve the OS that the miner is running.
- */
- public DataElement handleGetOSType(DataElement subject, DataElement status) {
- String osType = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- status.setAttribute(DE.A_SOURCE, osType);
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- protected java.io.InputStream getInputStreamForFile(String filename)
- throws java.io.IOException {
- File file = new File(filename);
- return file.toURL().openStream();
- }
-
- /**
- * @see Miner#extendSchema(DataElement)
- */
- public void extendSchema(DataElement schemaRoot) {
-// DataElement root = _dataStore.find(schemaRoot, DE.A_NAME, DataStoreResources.model_root, 1);
- _dataStore.find(schemaRoot, DE.A_NAME, DataStoreResources.model_root, 1);
-// DataElement snode = createObjectDescriptor(schemaRoot, UNIVERSAL_NODE_DESCRIPTOR);
- createObjectDescriptor(schemaRoot, UNIVERSAL_NODE_DESCRIPTOR);
-
- DataElement tempnode = createObjectDescriptor(schemaRoot,
- UNIVERSAL_TEMP_DESCRIPTOR);
-
- // Define filesystem descriptors
- DataElement UniversalFilter = createObjectDescriptor(schemaRoot,
- UNIVERSAL_FILTER_DESCRIPTOR);
- deUniversalFileObject = createObjectDescriptor(schemaRoot,
- UNIVERSAL_FILE_DESCRIPTOR);
- deUniversalFolderObject = createObjectDescriptor(schemaRoot,
- UNIVERSAL_FOLDER_DESCRIPTOR);
- deUniversalArchiveFileObject = createObjectDescriptor(
- schemaRoot, UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR);
- deUniversalVirtualFileObject = createObjectDescriptor(
- schemaRoot, UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
- deUniversalVirtualFolderObject = createObjectDescriptor(
- schemaRoot, UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR);
-
- _dataStore.refresh(schemaRoot);
-
- // Define command descriptors
- createCommandDescriptor(UniversalFilter, "Filter", "C_QUERY_VIEW_ALL"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(UniversalFilter, "Filter", "C_QUERY_VIEW_FILES"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(UniversalFilter, "Filter", //$NON-NLS-1$
- "C_QUERY_VIEW_FOLDERS"); //$NON-NLS-1$
- createCommandDescriptor(UniversalFilter, "Filter", "C_QUERY_ROOTS"); //$NON-NLS-1$ //$NON-NLS-2$
-
- createCommandDescriptor(UniversalFilter, "GetOSType", "C_GET_OSTYPE"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(UniversalFilter, "Exists", "C_QUERY_EXISTS"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(UniversalFilter, "GetRemoteObject", //$NON-NLS-1$
- "C_QUERY_GET_REMOTE_OBJECT"); //$NON-NLS-1$
- createCommandDescriptor(UniversalFilter, "CreateNewFile", //$NON-NLS-1$
- "C_CREATE_FILE"); //$NON-NLS-1$
- createCommandDescriptor(UniversalFilter, "CreateNewFolder", //$NON-NLS-1$
- "C_CREATE_FOLDER"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "Filter", //$NON-NLS-1$
- "C_QUERY_VIEW_ALL"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "Filter", //$NON-NLS-1$
- "C_QUERY_VIEW_FILES"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "Filter", //$NON-NLS-1$
- "C_QUERY_VIEW_FOLDERS"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalArchiveFileObject, "Filter", //$NON-NLS-1$
- "C_QUERY_VIEW_ALL"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalArchiveFileObject, "Filter", //$NON-NLS-1$
- "C_QUERY_VIEW_FILES"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalArchiveFileObject, "Filter", //$NON-NLS-1$
- "C_QUERY_VIEW_FOLDERS"); //$NON-NLS-1$
-
- _dataStore.createReference(deUniversalFileObject,
- deUniversalArchiveFileObject, "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createReference(deUniversalFolderObject,
- deUniversalArchiveFileObject, "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createReference(deUniversalFileObject,
- deUniversalVirtualFileObject, "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createReference(deUniversalFolderObject,
- deUniversalVirtualFolderObject, "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // create the search descriptor and make it cacnellable
- DataElement searchDescriptor = createCommandDescriptor(
- deUniversalFolderObject, "Search", "C_SEARCH"); //$NON-NLS-1$ //$NON-NLS-2$
- DataElement cancellable = _dataStore.find(schemaRoot, DE.A_NAME,
- DataStoreResources.model_Cancellable, 1);
- _dataStore.createReference(cancellable, searchDescriptor, "abstracts", //$NON-NLS-1$
- "abstracted by"); //$NON-NLS-1$
-
- createCommandDescriptor(deUniversalFolderObject, "GetAdvanceProperty", //$NON-NLS-1$
- "C_QUERY_ADVANCE_PROPERTY"); //$NON-NLS-1$
- createCommandDescriptor(tempnode, "Filter", "C_CREATE_TEMP"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFileObject, "Delete", "C_DELETE"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFileObject, "DeleteBatch", "C_DELETE_BATCH"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFileObject, "CreateNewFile", //$NON-NLS-1$
- "C_CREATE_FILE"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFileObject, "CreateNewFolder", //$NON-NLS-1$
- "C_CREATE_FOLDER"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFileObject, "Rename", "C_RENAME"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFileObject, "SetReadOnly", //$NON-NLS-1$
- "C_SET_READONLY"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFileObject, "SetLastModified", //$NON-NLS-1$
- "C_SET_LASTMODIFIED"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFileObject, "GetAdvanceProperty", //$NON-NLS-1$
- "C_QUERY_ADVANCE_PROPERTY"); //$NON-NLS-1$
-// dePropertyQuery = createCommandDescriptor(deUniversalFileObject, "GetBasicProperty", "C_QUERY_BASIC_PROPERTY");
- createCommandDescriptor(deUniversalFileObject, "GetBasicProperty", "C_QUERY_BASIC_PROPERTY"); //$NON-NLS-1$ //$NON-NLS-2$
-
- createCommandDescriptor(deUniversalFileObject, "GetcanWriteProperty", //$NON-NLS-1$
- "C_QUERY_CAN_WRITE_PROPERTY"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFileObject, "Exists", "C_QUERY_EXISTS"); //$NON-NLS-1$ //$NON-NLS-2$
-
- createCommandDescriptor(deUniversalFolderObject, "Delete", "C_DELETE"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFolderObject, "DeleteBatch", "C_DELETE_BATCH"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFolderObject, "Rename", "C_RENAME"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFolderObject, "Copy", "C_COPY"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFolderObject, "CopyBatch", "C_COPY_BATCH"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFolderObject, "CreateNewFolder", //$NON-NLS-1$
- "C_CREATE_FOLDER"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "SetReadOnly", //$NON-NLS-1$
- "C_SET_READONLY"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "SetLastModified", //$NON-NLS-1$
- "C_SET_LASTMODIFIED"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "GetBasicProperty", //$NON-NLS-1$
- "C_QUERY_BASIC_PROPERTY"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "GetcanWriteProperty", //$NON-NLS-1$
- "C_QUERY_CAN_WRITE_PROPERTY"); //$NON-NLS-1$
-
-// deFileClassificationQuery = createCommandDescriptor(deUniversalFileObject, "GetFileClassifications", "C_QUERY_FILE_CLASSIFICATIONS");
- createCommandDescriptor(deUniversalFileObject, "GetFileClassifications", "C_QUERY_FILE_CLASSIFICATIONS"); //$NON-NLS-1$ //$NON-NLS-2$
-// deFolderClassificationQuery = createCommandDescriptor(deUniversalFolderObject, "GetFolderClassifications", "C_QUERY_FILE_CLASSIFICATION");
- createCommandDescriptor(deUniversalFolderObject, "GetFolderClassifications", "C_QUERY_FILE_CLASSIFICATION"); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(deUniversalFolderObject, "Exists", //$NON-NLS-1$
- "C_QUERY_EXISTS"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "CreateNewFile", //$NON-NLS-1$
- "C_CREATE_FILE"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "CreateNewFolder", //$NON-NLS-1$
- "C_CREATE_FOLDER"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFolderObject, "GetOSType", //$NON-NLS-1$
- "C_GET_OSTYPE"); //$NON-NLS-1$
- createCommandDescriptor(deUniversalFileObject, "GetOSType", //$NON-NLS-1$
- "C_GET_OSTYPE"); //$NON-NLS-1$
-
- // create a download command descriptor and make it cancellable
- DataElement downloadDescriptor = createCommandDescriptor(
- deUniversalFileObject, "DownloadFile", C_DOWNLOAD_FILE); //$NON-NLS-1$
- _dataStore.createReference(cancellable, downloadDescriptor,
- "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createReference(cancellable, downloadDescriptor,
- "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
-
- DataElement adownloadDescriptor = createCommandDescriptor(
- deUniversalArchiveFileObject, "DownloadFile", C_DOWNLOAD_FILE); //$NON-NLS-1$
- _dataStore.createReference(cancellable, adownloadDescriptor,
- "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createReference(cancellable, adownloadDescriptor,
- "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$
-
- createCommandDescriptor(tempnode, "SystemEncoding", C_SYSTEM_ENCODING); //$NON-NLS-1$
-
- createCommandDescriptor(tempnode, "UnusedPort", C_QUERY_UNUSED_PORT); //$NON-NLS-1$
-
- // command descriptor to retrieve package name for a class file
- createCommandDescriptor(deUniversalFileObject, "GetQualifiedClassName", //$NON-NLS-1$
- "C_QUERY_CLASSNAME"); //$NON-NLS-1$
-
- // command descriptor to retrieve qualified class name for class file
- createCommandDescriptor(deUniversalFileObject, "GetFullClassName", //$NON-NLS-1$
- C_QUERY_QUALIFIED_CLASSNAME);
- }
-
- private AbsoluteVirtualPath getAbsoluteVirtualPath(DataElement subject) {
- StringBuffer path = new StringBuffer(subject.getAttribute(DE.A_VALUE));
- if (ArchiveHandlerManager.getInstance().isArchive(
- new File(path.toString()))) {
- path.append(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- } else {
- path.append('/');
- }
- path.append(subject.getName());
- return getAbsoluteVirtualPath(path.toString());
- }
-
- public AbsoluteVirtualPath getAbsoluteVirtualPath(String path) {
- AbsoluteVirtualPath vp = new AbsoluteVirtualPath(path);
- return vp;
- }
-
- public DataElement handleDeleteFromArchive(DataElement subject,
- DataElement status) {
- String type = subject.getType();
- DataElement deObj = null;
-
- AbsoluteVirtualPath vpath = getAbsoluteVirtualPath(subject);
- if (vpath != null) {
- ISystemArchiveHandler handler = _archiveHandlerManager
- .getRegisteredHandler(new File(vpath
- .getContainingArchiveString()));
- if (handler == null || !handler.delete(vpath.getVirtualPart())) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- if (type.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)) {
- deObj = _dataStore.find(subject, DE.A_NAME, subject.getName(),
- 1);
- _dataStore.deleteObject(subject, deObj);
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- } else if (type.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- _dataStore.deleteObjects(subject);
- DataElement parent = subject.getParent();
- _dataStore.deleteObject(parent, subject);
- _dataStore.refresh(parent);
- }
- }
-
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- public DataElement handleQueryAllArchive(DataElement subject, DataElement attributes,
- DataElement status, boolean caseSensitive, boolean foldersOnly) {
- File fileobj = null;
- try {
- ArchiveHandlerManager mgr = ArchiveHandlerManager.getInstance();
- char separatorChar = File.separatorChar;
- if (ArchiveHandlerManager.isVirtual(subject
- .getAttribute(DE.A_VALUE))) {
- separatorChar = '/';
- }
-
- String path = subject.getAttribute(DE.A_VALUE) + separatorChar
- + subject.getName();
- String rootPath = path;
- String virtualPath = ""; //$NON-NLS-1$
-
- VirtualChild[] children = null;
-
- if (subject.getType().equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)) {
- // it's an archive file (i.e. file.zip)
- fileobj = new File(rootPath);
- subject.setAttribute(DE.A_SOURCE, setProperties(fileobj, true));
-
- if (foldersOnly) {
- children = mgr.getFolderContents(fileobj, ""); //$NON-NLS-1$
- } else {
- children = mgr.getContents(fileobj, ""); //$NON-NLS-1$
- }
-
- } else if (subject.getType().equals(
- UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- // it's a virtual folder (i.e. a folder within zip)
- // need to determine the associate File object
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(path);
- rootPath = avp.getContainingArchiveString();
- virtualPath = avp.getVirtualPart();
- fileobj = new File(rootPath);
-
- if (fileobj.exists()) {
-
- if (foldersOnly) {
- children = mgr.getFolderContents(fileobj, virtualPath);
- } else {
- children = mgr.getContents(fileobj, virtualPath);
- }
-
- subject.setAttribute(DE.A_SOURCE, setProperties(mgr.getVirtualObject(virtualPath)));
- if (children == null || children.length == 0) {
- _dataStore.trace("problem with virtual:" + virtualPath); //$NON-NLS-1$
- }
- } else {
- _dataStore.trace("problem with File:" + rootPath); //$NON-NLS-1$
- }
- }
- createDataElement(_dataStore, subject, children, "*", rootPath, virtualPath); //$NON-NLS-1$
-
- _dataStore.refresh(subject);
-
- FileClassifier clsfy = getFileClassifier(subject);
- clsfy.start();
-
- return statusDone(status);
- } catch (Exception e) {
- if (!(fileobj == null)) {
- try {
- (new FileReader(fileobj)).read();
- } catch (IOException ex) {
- status.setAttribute(DE.A_VALUE, FILEMSG_NO_PERMISSION);
- status.setAttribute(DE.A_SOURCE, FAILED);
- _dataStore.refresh(subject);
- return statusDone(status);
- }
- }
- status.setAttribute(DE.A_VALUE, FILEMSG_ARCHIVE_CORRUPTED);
- status.setAttribute(DE.A_SOURCE, FAILED);
- return statusDone(status);
- }
- }
-
-// private DataElement findExistingVirtual(DataElement subject, VirtualChild vchild) {
-// String name = vchild.name;
-// for (int i = 0; i < subject.getNestedSize(); i++) {
-// DataElement child = subject.get(i);
-// String deName = child.getName();
-// if (name.equals(deName)) {
-// if (vchild.isDirectory) {
-// if (child.getType().equals(
-// UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
-// return child;
-// }
-// } else {
-// if (child.getType().equals(
-// UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)) {
-// return child;
-// }
-// }
-// }
-// }
-// return null;
-// }
-
- public ISystemArchiveHandler getArchiveHandlerFor(String archivePath) {
- File file = new File(archivePath);
- return _archiveHandlerManager.getRegisteredHandler(file);
- }
-
- public DataElement handleCreateVirtualFile(DataElement subject,
- DataElement status, String type) {
-
- AbsoluteVirtualPath vpath = null;
- if (type.equals(UNIVERSAL_FILTER_DESCRIPTOR)) {
- vpath = getAbsoluteVirtualPath(subject.getValue());
- } else {
- vpath = getAbsoluteVirtualPath(subject);
- }
- ISystemArchiveHandler handler = getArchiveHandlerFor(vpath
- .getContainingArchiveString());
- if (handler == null) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- return statusDone(status);
- }
-// VirtualChild child = handler.getVirtualFile(vpath.getVirtualPart());
- handler.getVirtualFile(vpath.getVirtualPart());
- handler.createFile(vpath.getVirtualPart());
-
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- if (type.equals(UNIVERSAL_FILTER_DESCRIPTOR)) {
- String fullName = subject.getValue();
- String name = fullName.substring(fullName
- .lastIndexOf(File.separatorChar) + 1, fullName.length());
- String path = fullName.substring(0, fullName
- .lastIndexOf(File.separatorChar));
- subject.setAttribute(DE.A_NAME, name);
- subject.setAttribute(DE.A_VALUE, path);
- subject.setAttribute(DE.A_TYPE, UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- public DataElement handleCreateVirtualFolder(DataElement subject,
- DataElement status, String type) {
-
- AbsoluteVirtualPath vpath = null;
- if (type.equals(UNIVERSAL_FILTER_DESCRIPTOR)) {
- vpath = getAbsoluteVirtualPath(subject.getValue());
- } else {
- vpath = getAbsoluteVirtualPath(subject);
- }
- ISystemArchiveHandler handler = getArchiveHandlerFor(vpath
- .getContainingArchiveString());
- if (handler == null) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- return statusDone(status);
- }
-// VirtualChild child = handler.getVirtualFile(vpath.getVirtualPart());
- handler.getVirtualFile(vpath.getVirtualPart());
- handler.createFolder(vpath.getVirtualPart());
-
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- if (type.equals(UNIVERSAL_FILTER_DESCRIPTOR)) {
- String fullName = subject.getValue();
- String name = fullName.substring(fullName
- .lastIndexOf(File.separatorChar) + 1, fullName.length());
- String path = fullName.substring(0, fullName
- .lastIndexOf(File.separatorChar));
- subject.setAttribute(DE.A_NAME, name);
- subject.setAttribute(DE.A_VALUE, path);
- subject
- .setAttribute(DE.A_TYPE,
- UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR);
- }
- _dataStore.refresh(subject);
- return statusDone(status);
- }
-
- private File getFileFor(DataElement element) {
- File result = null;
- String type = element.getType();
- if (type.equals(UNIVERSAL_FILTER_DESCRIPTOR)) {
- result = new File(element.getName());
- } else if (type.equals(UNIVERSAL_FILE_DESCRIPTOR)
- || type.equals(UNIVERSAL_FOLDER_DESCRIPTOR)
- || type.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)) {
- StringBuffer buf = new StringBuffer(element
- .getAttribute(DE.A_VALUE));
- buf.append(File.separatorChar);
- buf.append(element.getName());
- result = new File(buf.toString());
- }
-
- return result;
- }
-
- public DataElement handleCopy(DataElement targetFolder, DataElement sourceFile, DataElement nameObj, DataElement status) {
-
- String newName = nameObj.getName();
- String targetType = targetFolder.getType();
- String srcType = sourceFile.getType();
-
- if (targetType.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR) || targetType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
-
- // insert into an archive
- AbsoluteVirtualPath vpath = getAbsoluteVirtualPath(targetFolder);
- ISystemArchiveHandler handler = getArchiveHandlerFor(vpath.getContainingArchiveString());
-
- if (handler == null) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- return statusDone(status);
- }
-
- File srcFile = null;
-
- if (srcType.equals(UNIVERSAL_FILE_DESCRIPTOR) || srcType.equals(UNIVERSAL_FOLDER_DESCRIPTOR)
- || srcType.equals(UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)) {
-
- srcFile = getFileFor(sourceFile);
- }
- else if (srcType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
-
- AbsoluteVirtualPath svpath = getAbsoluteVirtualPath(sourceFile);
- ISystemArchiveHandler shandler = getArchiveHandlerFor(svpath.getContainingArchiveString());
-
- if (shandler == null) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- return statusDone(status);
- }
-
- VirtualChild child = shandler.getVirtualFile(svpath.getVirtualPart());
- srcFile = child.getExtractedFile();
- }
-
- String virtualContainer = ""; //$NON-NLS-1$
-
- if (targetType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- virtualContainer = vpath.getVirtualPart();
- }
-
- boolean result = handler.add(srcFile, virtualContainer, newName);
-
- if (result) {
- status.setAttribute(DE.A_SOURCE, SUCCESS);
- }
- else {
- status.setAttribute(DE.A_SOURCE, FAILED);
- }
- }
- else if (srcType.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
-
- // extract from an archive to folder
- AbsoluteVirtualPath svpath = getAbsoluteVirtualPath(sourceFile);
- ISystemArchiveHandler shandler = getArchiveHandlerFor(svpath.getContainingArchiveString());
-
- if (shandler == null) {
- status.setAttribute(DE.A_SOURCE, FAILED);
- return statusDone(status);
- }
-
- VirtualChild child = shandler.getVirtualFile(svpath.getVirtualPart());
-
- File parentDir = getFileFor(targetFolder);
- File destination = new File(parentDir, newName);
-
- if (child.isDirectory) {
- shandler.extractVirtualDirectory(svpath.getVirtualPart(), parentDir, destination);
- }
- else {
- shandler.extractVirtualFile(svpath.getVirtualPart(), destination);
- }
- }
- else {
- File tgtFolder = getFileFor(targetFolder);
- File srcFile = getFileFor(sourceFile);
-
- // regular copy
- boolean folderCopy = srcFile.isDirectory();
- String src = srcFile.getAbsolutePath();
- String tgt = tgtFolder.getAbsolutePath() + File.separatorChar + newName;
- File tgtFile = new File(tgt);
-
- if (tgtFile.exists() && tgtFile.isDirectory() && newName.equals(srcFile.getName()))
- {
- tgt = tgtFolder.getAbsolutePath();
- }
-
- doCopyCommand(enQuote(src), enQuote(tgt), folderCopy, status);
- }
-
- return statusDone(status);
- }
-
- /**
- * Quote a file name such that it is valid in a shell
- * @param s file name to quote
- * @return quoted file name
- */
- protected String enQuote(String s)
- {
- if(_isWindows) {
- return '"' + s + '"';
- } else {
- return PathUtility.enQuoteUnix(s);
- }
- }
-
- public String getVersion()
- {
- return "7.0.0"; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalSearchHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalSearchHandler.java
deleted file mode 100644
index 3f202f48d..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/filesystem/UniversalSearchHandler.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Michael Berger (IBM) - Bug 147791 - symbolic links can cause circular search.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.filesystem;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.HashSet;
-
-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.util.StringCompare;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.SystemFileClassifier;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.search.SystemSearchFileNameMatcher;
-import org.eclipse.rse.services.clientserver.search.SystemSearchLineMatch;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatchLocator;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatcher;
-
-public class UniversalSearchHandler extends Thread implements ICancellableHandler
-{
- protected HashSet _alreadySearched;
-
- private File _rootFile;
-
- protected boolean _isCancelled;
- protected boolean _isDone;
- protected int _depth = -1;
-
- protected DataStore _dataStore;
- protected UniversalFileSystemMiner _miner;
- protected DataElement _status;
-
- protected SystemSearchString _searchString;
- protected SystemSearchStringMatcher _stringMatcher;
- protected boolean _isFileSearch;
- protected SystemSearchFileNameMatcher _fileNameMatcher;
- protected String _classificationString;
-
- protected DataElement _deGrep;
- protected DataElement _deFile;
- protected DataElement _deFolder;
- protected DataElement _deArchiveFile;
- protected DataElement _deVirtualFile;
-
- protected boolean _fsCaseSensitive;
-
- public UniversalSearchHandler(DataStore dataStore, UniversalFileSystemMiner miner, SystemSearchString searchString, boolean fsCaseSensitive, File theFile, DataElement status) {
- _dataStore = dataStore;
- _miner = miner;
- _searchString = searchString;
- _fsCaseSensitive = fsCaseSensitive;
- _alreadySearched = new HashSet();
-
- _deGrep = _dataStore.findObjectDescriptor("grep"); //$NON-NLS-1$
- _deFile = _dataStore.findObjectDescriptor(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR);
- _deFolder = _dataStore.findObjectDescriptor(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR);
- _deArchiveFile = _dataStore.findObjectDescriptor(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR);
- _deVirtualFile = _dataStore.findObjectDescriptor(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
- boolean includeSubfolders = searchString.isIncludeSubfolders();
-
- if (includeSubfolders) {
- _depth = -1;
- }
- else {
- _depth = 1;
- }
-
- _rootFile = theFile;
- _status = status;
-
- _isCancelled = false;
- _isDone = false;
-
- _stringMatcher = new SystemSearchStringMatcher(_searchString.getTextString(), _searchString.isCaseSensitive(), _searchString.isTextStringRegex());
-
- // if the search string is empty or if it is an asterisk, then we are doing a file search
- // i.e. we do not want to look inside files
- _isFileSearch = _stringMatcher.isSearchStringEmpty() || _stringMatcher.isSearchStringAsterisk();
-
- _fileNameMatcher = new SystemSearchFileNameMatcher(_searchString.getFileNamesString(), fsCaseSensitive, _searchString.isFileNamesRegex());
-
- // classification of files to restrict the search to
- _classificationString = _searchString.getClassificationString();
- }
-
- public void run() {
-
- try {
- internalSearch(_rootFile, _depth);
- }
- catch (Exception e) {
- UniversalServerUtilities.logError(_miner.getName(), "Error occured when calling internal search", e); //$NON-NLS-1$
- }
-
- _isDone = true;
-
- if (_isCancelled) {
- _miner.statusCancelled(_status);
- }
- else {
- // NOTE: do not call miner statusDone() method since we want to
- // update the status immediately.
- // Otherwise we don't get an event on the client corresponding
- // to status refresh. As a result client thinks
- // search isn't finished.
- // _miner.statusDone(_status);
- _status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- _dataStore.refresh(_status, true); // true indicates refresh immediately
- }
- }
-
- public boolean isCancelled() {
- return _isCancelled;
- }
-
- public boolean isDone() {
- return _isDone;
- }
-
- public void cancel() {
- _isCancelled = true;
- }
-
- protected boolean hasSearchedDirectory(File file)
- {
- try
- {
- return _alreadySearched.contains(file.getCanonicalFile());
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- return _alreadySearched.contains(file);
- }
- }
-
- protected void internalSearch(File theFile, int depth) {
-
- // is it a directory?
- boolean isDirectory = theFile.isDirectory();
-
- // is it an archive?
- boolean isArchive = ArchiveHandlerManager.getInstance().isArchive(theFile);
-
- String absPath = theFile.getAbsolutePath();
- String compareStr = theFile.getName();
-
- // is it a virtual file?
- boolean isVirtual = ArchiveHandlerManager.isVirtual(absPath);
-
- // is it a virtual directory?
- boolean isVirtualDirectory = false;
-
- // if it is a virtual object, then get a reference to it
- if (isVirtual) {
- VirtualChild vc = ArchiveHandlerManager.getInstance().getVirtualObject(absPath);
- isVirtualDirectory = isVirtual && vc.isDirectory;
- }
-
- // base case for the recursive method call
- // if the file is not a directory, an archive or a virtual directory,
- // and we get a match with the file name, then we can search for match within the file
- if (!isDirectory &&
- (!isArchive || _isFileSearch) &&
- !isVirtualDirectory &&
- doesFilePatternMatch(compareStr) &&
- doesClassificationMatch(absPath))
- {
- DataElement deObj = null;
-
- // if the file is a virtual file, then get matches from the archive handler
- if (ArchiveHandlerManager.isVirtual(absPath)) {
- VirtualChild vc = ArchiveHandlerManager.getInstance().getVirtualObject(absPath);
-
- if (!vc.isDirectory) {
- deObj = _dataStore.createObject(null, _deVirtualFile, compareStr);
-
- // if parent of virtual child is archive, then create it this way
- if (vc.path.equals("")) { //$NON-NLS-1$
- deObj.setAttribute(DE.A_VALUE, vc.getContainingArchive().getAbsolutePath());
- }
- else {
- deObj.setAttribute(DE.A_VALUE, vc.getContainingArchive().getAbsolutePath() +
- ArchiveHandlerManager.VIRTUAL_SEPARATOR + vc.path);
- }
-
- deObj.setAttribute(DE.A_SOURCE, _miner.setProperties(vc));
-
- SystemSearchLineMatch[] results = null;
-
- // if it's not a file search, call the handler method to search
- if (!_isFileSearch) {
- results = vc.getHandler().search(vc.fullName, _stringMatcher);
-
- // if at least one match found, then send back the remote file with matches
- if (results != null && results.length > 0) {
- convert(deObj, absPath, results);
- deObj.setParent(_status);
- _status.addNestedData(deObj, false);
- }
- }
- // otherwise if it is a file search, return the remote file back with no children
- else {
- deObj.setParent(_status);
- _status.addNestedData(deObj, false);
- }
- }
- }
- // otherwise, search the file
- else {
-
- if (!isArchive) {
- deObj = _dataStore.createObject(null, _deFile, compareStr);
- }
- else {
- deObj = _dataStore.createObject(null, _deArchiveFile, compareStr);
- }
-
- deObj.setAttribute(DE.A_VALUE, theFile.getParentFile().getAbsolutePath());
- deObj.setAttribute(DE.A_SOURCE, _miner.setProperties(theFile));
-
- // if it is a file search, we send the remote file back
- // otherwise search within the file and see if there is at least one match
- if (_isFileSearch || internalSearchWithinFile(deObj, absPath, theFile)) {
- deObj.setParent(_status);
- _status.addNestedData(deObj, false);
- }
- }
-
- // do a refresh
- _dataStore.refresh(_status, true);
- }
-
- // if the depth is not 0, then we need to recursively search
- if (depth != 0) {
-
- // if it is a directory, or an archive, or a virtual directory, then we need to get the
- // children and search those
- if (isDirectory || ((isArchive || isVirtualDirectory) && _searchString.isIncludeArchives()))
- {
-
- if (!hasSearchedDirectory(theFile)) {
-
- try
- {
- _alreadySearched.add(theFile.getCanonicalFile());
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- _alreadySearched.add(theFile);
- }
-
- File[] children = null;
-
- // if the file is an archive or a virtual directory, then get the children from
- // the archive handler
- if (isArchive || isVirtualDirectory) {
-
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(absPath);
- File archive = new File(avp.getContainingArchiveString());
- String virtualPath = avp.getVirtualPart();
-
- VirtualChild[] virtualchildren = null;
-
- try {
- virtualchildren = ArchiveHandlerManager.getInstance().getContents(archive, virtualPath);
- }
- catch (IOException e) {
- UniversalServerUtilities.logError(_miner.getName(), "Error occured trying to get the canonical file", e); //$NON-NLS-1$
- }
-
- if (virtualchildren != null) {
-
- children = new File[virtualchildren.length];
-
- for (int i = 0; i < virtualchildren.length; i++) {
- AbsoluteVirtualPath newAvp = new AbsoluteVirtualPath(absPath);
- newAvp.setVirtualPart(virtualchildren[i].fullName);
- children[i] = new File(newAvp.toString());
- }
-
- if (virtualchildren.length == 0) {
- children = null;
- }
- }
- }
- // otherwise, get the list of children
- else {
- children = theFile.listFiles();
- }
-
- if (children != null) {
-
- for (int i = 0; i < children.length && !_isCancelled; i++) {
-
- File child = children[i];
- internalSearch(child, depth - 1);
- }
- }
- }
- }
- }
- }
-
- protected boolean internalSearchWithinFile(DataElement remoteFile, String absPath, File theFile) {
-
- // if search string is empty, no need to look for matches within file
- if (_isFileSearch) {
- return true;
- }
-
- FileInputStream inputStream = null;
-
- try {
- inputStream = new FileInputStream(theFile);
- InputStreamReader reader = new InputStreamReader(inputStream);
- BufferedReader bufReader = new BufferedReader(reader);
-
- SystemSearchStringMatchLocator locator = new SystemSearchStringMatchLocator(bufReader, _stringMatcher);
-
- SystemSearchLineMatch[] matches = locator.locateMatches();
-
- boolean foundMatches = ((matches != null) && (matches.length > 0));
-
- if (foundMatches) {
- convert(remoteFile, absPath, matches);
- }
-
- return foundMatches;
- }
- catch (Exception e) {
- UniversalServerUtilities.logError(_miner.getName(), "Error occured when trying to locate matches", e); //$NON-NLS-1$
- remoteFile.setAttribute(DE.A_VALUE, e.getMessage());
- return false;
- }
- }
-
- protected boolean doesFilePatternMatch(String compareStr) {
- return _fileNameMatcher.matches(compareStr);
- }
-
- /**
- * Returns whether classification matches.
- * @param absolutePath the absolute path of the file for which we want to check classification.
- * @return <code>true</code> if the classification matches, <code>false</code> otherwise.
- */
- protected boolean doesClassificationMatch(String absolutePath) {
-
- if (_classificationString == null || _classificationString.equals("")) { //$NON-NLS-1$
- return true;
- }
- else {
- String classification = SystemFileClassifier.getInstance().classifyFile(absolutePath);
- return StringCompare.compare(_classificationString, classification, true);
- }
- }
-
- /**
- * Converts from system line matches to data elements that will be sent back.
- * @param deObj the element representing the file for which matches have been found.
- * @param absPath the absolute path of the file.
- * @param lineMatches an array of line matches, or empty if no matches.
- */
- protected void convert(DataElement deObj, String absPath, SystemSearchLineMatch[] lineMatches) {
-
- SystemSearchLineMatch match = null;
-
- for (int i = 0; i < lineMatches.length; i++) {
- match = lineMatches[i];
- DataElement obj = _dataStore.createObject(deObj, _deGrep, match.getLine(), absPath);
- obj.setAttribute(DE.A_SOURCE, obj.getSource() + ':'+ match.getLineNumber());
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/IUniversalProcessDataStoreConstants.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/IUniversalProcessDataStoreConstants.java
deleted file mode 100644
index ded21ee29..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/IUniversalProcessDataStoreConstants.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.dstore.universal.miners.processes;
-
-public interface IUniversalProcessDataStoreConstants
-{
-
- /*
- * Miner name, used for logging
- */
- public static final String UNIVERSAL_PROCESS_MINER = "UniversalProcessMiner"; //$NON-NLS-1$
-
- //
- // Universal Process descriptors for DataStore DataElements
- //
- public static final String UNIVERSAL_PROCESS_ROOT = "universal.process.root"; //$NON-NLS-1$
- public static final String UNIVERSAL_PROCESS_FILTER = "universal.process.filter"; //$NON-NLS-1$
- public static final String UNIVERSAL_PROCESS_DESCRIPTOR = "universal.process.descriptor"; //$NON-NLS-1$
- public static final String UNIVERSAL_PROCESS_TEMP = "universal.process.temp"; //$NON-NLS-1$
-
- //
- // Universal Process Miner Commands
- //
- public static final String C_PROCESS_FILTER_QUERY_ALL = "C_PROCESS_FILTER_QUERY_ALL"; //$NON-NLS-1$
- public static final String C_PROCESS_KILL = "C_PROCESS_KILL"; //$NON-NLS-1$
- public static final String C_PROCESS_QUERY_ALL_PROPERTIES = "C_PROCESS_QUERY_ALL_PROPERTIES"; //$NON-NLS-1$
- public static final String C_PROCESS_QUERY_USERNAME = "C_PROCESS_QUERY_USERNAME"; //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/ProcessDEComparator.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/ProcessDEComparator.java
deleted file mode 100644
index 104903331..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/ProcessDEComparator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.processes;
-
-import java.util.Comparator;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-/**
- * Compares two DataElements representing processes by extracting
- * their PID's and comparing numerically based on the PID's.
- * @author mjberger
- *
- */
-public class ProcessDEComparator implements Comparator
-{
- public ProcessDEComparator()
- {
- }
-
- public int compare(Object obj1, Object obj2)
- {
- DataElement de1 = (DataElement) obj1;
- DataElement de2 = (DataElement) obj2;
- long pid1 = 0;
- long pid2 = 0;
- try
- {
- pid1 = Long.parseLong(de1.getName());
- pid2 = Long.parseLong(de2.getName());
- }
- catch (NumberFormatException e)
- {
- return de1.toString().compareTo(de2.toString());
- }
- return (int) (pid1 - pid2);
- }
-
- public boolean equals(Object obj)
- {
- return this.equals(obj);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/UniversalProcessMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/UniversalProcessMiner.java
deleted file mode 100644
index ee282064a..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/processes/UniversalProcessMiner.java
+++ /dev/null
@@ -1,418 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners.processes;
-
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.dstore.core.miners.miner.Miner;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-import org.eclipse.rse.services.clientserver.processes.handlers.IRemoteServerProcess;
-import org.eclipse.rse.services.clientserver.processes.handlers.ProcessComparator;
-import org.eclipse.rse.services.clientserver.processes.handlers.ProcessHandler;
-import org.eclipse.rse.services.clientserver.processes.handlers.ProcessHandlerManager;
-import org.eclipse.rse.services.clientserver.processes.handlers.UniversalServerProcessImpl;
-
-/**
- * Miner for getting process information from a remote system.
- * @author mjberger
- */
-public class UniversalProcessMiner extends Miner implements IUniversalProcessDataStoreConstants, IUniversalDataStoreConstants, ISystemProcessRemoteConstants
-{
-
- public static final String MINER_ID = UniversalProcessMiner.class.getName();
-
- private ProcessHandler handler;
-
- private static final String _minerVersion = "7.0.0"; //$NON-NLS-1$
-
- private DataElement deUniversalProcessObject, deUniversalProcessFilter, deKillInfoNode;
- private ProcessDEComparator _processDEcomparator;
-
- public UniversalProcessMiner()
- {
- handler = ProcessHandlerManager.getInstance().getNewProcessHandler();
- }
-
- private ProcessDEComparator getProcessDEComparator()
- {
- if (_processDEcomparator == null)
- {
- try
- {
- _processDEcomparator = new ProcessDEComparator();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- catch (Error err)
- {
- err.printStackTrace();
- }
-
- }
- return _processDEcomparator;
- }
-
- public DataElement handleCommand(DataElement theCommand)
- {
- String name = getCommandName(theCommand);
- DataElement status = getCommandStatus(theCommand);
- DataElement subject = getCommandArgument(theCommand, 0);
-
- //UniversalServerUtilities.logInfo(getMinerName(), name + ":" + subject);
-
- if (subject == null) {
-
- UniversalServerUtilities.logError(UNIVERSAL_PROCESS_MINER, "Subject for UniversalProcessMiner command " + name + " is null", null); //$NON-NLS-1$ //$NON-NLS-2$
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return status;
- }
-
- String subjectType = (String) subject.getElementProperty(DE.P_TYPE);
-
- if (name.equals(C_PROCESS_QUERY_USERNAME))
- {
- return handleQueryUserName(subject, status);
- }
-
- if (subjectType.equals(UNIVERSAL_PROCESS_FILTER))
- {
- if (name.equals(C_PROCESS_FILTER_QUERY_ALL))
- {
- status = handleQuery(subject, status);
- }
- else
- {
- UniversalServerUtilities.logError(UNIVERSAL_PROCESS_MINER, "Unknown filter command: " + name, null); //$NON-NLS-1$
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- }
- }
- else if (subjectType.equals(UNIVERSAL_PROCESS_DESCRIPTOR))
- {
- if (name.equals(C_PROCESS_QUERY_ALL_PROPERTIES))
- {
- handleQueryJobAllProperties(subject, status);
- }
- else if (name.equals(C_PROCESS_KILL))
- {
- status = handleKill(subject, status);
- }
- else
- {
- UniversalServerUtilities.logError(UNIVERSAL_PROCESS_MINER, "Unsupported process command: " + name, null); //$NON-NLS-1$
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- }
- }
- else
- {
- UniversalServerUtilities.logError(UNIVERSAL_PROCESS_MINER, "Unsupported subject for command: " + subject, null); //$NON-NLS-1$
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- }
-
- return status;
- }
-
- /**
- * Get the username
- */
- protected DataElement handleQueryUserName(DataElement subject, DataElement status) {
-
- String encoding = System.getProperty("user.name"); //$NON-NLS-1$
-
- subject.setAttribute(DE.A_VALUE, encoding);
- _dataStore.refresh(subject);
-
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- _dataStore.refresh(status);
- return status;
- }
-
- public void extendSchema(DataElement schemaRoot)
- {
-
- // define process descriptors
- deUniversalProcessFilter = createObjectDescriptor(schemaRoot,
- UNIVERSAL_PROCESS_FILTER);
- deUniversalProcessObject = createObjectDescriptor(schemaRoot,
- UNIVERSAL_PROCESS_DESCRIPTOR);
- DataElement tempnode = createObjectDescriptor(schemaRoot, UNIVERSAL_PROCESS_TEMP);
-
- // define command descriptors
- createCommandDescriptor(deUniversalProcessFilter, "Filter", C_PROCESS_FILTER_QUERY_ALL); //$NON-NLS-1$
- createCommandDescriptor(deUniversalProcessObject, "Kill", C_PROCESS_KILL); //$NON-NLS-1$
- createCommandDescriptor(deUniversalProcessObject, "ProcessQueryAllProperties", C_PROCESS_QUERY_ALL_PROPERTIES); //$NON-NLS-1$
- createCommandDescriptor(tempnode, "QueryUsername", C_PROCESS_QUERY_USERNAME); //$NON-NLS-1$
-
- _dataStore.refresh(schemaRoot);
- }
-
- public void load()
- {
- deKillInfoNode = _dataStore.createObject(_minerData, UNIVERSAL_NODE_DESCRIPTOR, "universal.killinfo"); //$NON-NLS-1$
- deKillInfoNode.setAttribute(DE.A_VALUE, getSignalTypes());
- _dataStore.refresh(_minerData);
-
- }
-
- /**
- * @return a String with a list of signal types that can be sent to processes on this
- * system, separated by newline characters.
- */
- protected String getSignalTypes()
- {
- try
- {
- Process kill = Runtime.getRuntime().exec("kill -l"); //$NON-NLS-1$
- InputStreamReader isr = new InputStreamReader(kill.getInputStream());
- BufferedReader reader = new BufferedReader(isr);
- String nextLine = reader.readLine();
- String output = ""; //$NON-NLS-1$
- while (nextLine != null)
- {
- output = output + nextLine + "\n"; //$NON-NLS-1$
- nextLine = reader.readLine();
- }
- reader.close();
- isr.close();
- return output;
- }
- catch (Exception e)
- {
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * Handle process queries
- */
- private DataElement handleQuery(DataElement subject, DataElement status)
- {
- try
- {
- HostProcessFilterImpl pfs = new HostProcessFilterImpl(subject.getSource());
- lookupProcesses(pfs, subject);
- } catch (Exception e) {
- e.printStackTrace();
- UniversalServerUtilities.logError("UniversalProcessMiner", "handleQuery()", e); //$NON-NLS-1$ //$NON-NLS-2$
- status.setAttribute(DE.A_VALUE, e.getMessage());
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- _dataStore.refresh(status);
- return status;
- }
-
- _dataStore.refresh(subject);
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- status.setAttribute(DE.A_VALUE, PROCESS_MINER_SUCCESS);
-
- return status;
- }
-
- private void lookupProcesses(HostProcessFilterImpl fsObj, DataElement subject) throws Exception
- {
- // we need to synchronize the list of data elements with the fresh
- // results coming back from the query
- if (handler == null) throw new Exception(PROCESS_MINER_ERROR_NO_HANDLER);
- SortedSet processes = handler.lookupProcesses(fsObj);
-
- // sort the data elements
- SortedSet sortedDEs = null;
- List nested = subject.getNestedData();
- if (nested != null)
- {
- Object[] oldDEs = nested.toArray();
- if (oldDEs != null && oldDEs.length > 0)
- {
- sortedDEs = new TreeSet(getProcessDEComparator());
- for (int i = 0; i < oldDEs.length; i++)
- {
- if (fsObj.allows(((DataElement)oldDEs[i]).getValue()))
- sortedDEs.add(oldDEs[i]);
- }
- }
- }
-
- // take care of the special cases where one of the lists has no
- // elements
- if (processes == null || processes.size() == 0)
- {
- deleteDataElements(fsObj, subject);
- return;
- }
- if (sortedDEs == null || sortedDEs.size() == 0)
- {
- createDataElements(processes.toArray(), subject);
- return;
- }
-
- // now we merge the lists
- Iterator pIter = processes.iterator();
- Iterator deIter = sortedDEs.iterator();
-
- DataElement nextDE = null;
- IRemoteServerProcess nextP = null;
- IRemoteServerProcess nextDEP = null;
- try
- {
- // pop the first two elements off the lists
- ProcessComparator comparator = new ProcessComparator();
- nextDE = (DataElement) deIter.next();
- nextDEP = new UniversalServerProcessImpl(nextDE.getValue());
- nextP = (IRemoteServerProcess) pIter.next();
- do
- {
- // compare the pid's of the elements
- int comparison = comparator.compare(nextDEP, nextP);
-
- // data element exists in datastore but no longer returned in query,
- // so delete it, and pop it off the list
- if (comparison < 0)
- {
- _dataStore.deleteObject(subject, nextDE);
- deIter.remove();
- nextDE = (DataElement) deIter.next();
- nextDEP = new UniversalServerProcessImpl(nextDE.getValue());
-
- }
-
- // data element exists in both the query and datastore, so refresh its properties
- // and then pop both top items off their lists
- if (comparison == 0)
- {
- nextDE.setAttribute(DE.A_VALUE, nextP.getAllProperties());
- deIter.remove();
- pIter.remove();
- nextDE = (DataElement) deIter.next();
- nextDEP = new UniversalServerProcessImpl(nextDE.getValue());
- nextP = (IRemoteServerProcess) pIter.next();
- }
-
- // data element does not exist in the data store, so create it
- if (comparison > 0)
- {
- createDataElement(nextP, subject);
- pIter.remove();
- nextP = (IRemoteServerProcess) pIter.next();
- }
- }
- while(true);
- }
- catch (NoSuchElementException e) // we have reached the tail of one of the lists, add or delete the rest
- {
- if (!pIter.hasNext() && !deIter.hasNext()) return;
- if (deIter.hasNext()) deleteRemainingElements(deIter, subject);
- else createDataElements(processes.toArray(), subject);
- }
- }
-
- private void deleteRemainingElements(Iterator iter, DataElement subject)
- {
- while (iter.hasNext())
- {
- DataElement next = (DataElement) iter.next();
- _dataStore.deleteObject(subject, next);
- }
- }
-
- private void deleteDataElements(HostProcessFilterImpl fsObj, DataElement subject)
- {
- List nested = subject.getNestedData();
- if (nested != null)
- {
- Object[] oldDEs = nested.toArray();
- if (oldDEs == null || oldDEs.length == 0) return;
- for (int i = 0; i < oldDEs.length; i++)
- {
- DataElement currentDE = (DataElement) oldDEs[i];
- if (fsObj.allows(currentDE.getValue()))
- _dataStore.deleteObject(subject, currentDE);
- }
- }
- }
-
- private void createDataElements(Object[] processes, DataElement subject)
- {
- if (processes == null || processes.length == 0) return;
- for (int i = 0; i < processes.length; i++)
- {
- createDataElement((IRemoteServerProcess)processes[i], subject);
- }
- }
-
- private void createDataElement(IRemoteServerProcess process, DataElement subject)
- {
- DataElement dsObj = null;
- dsObj = _dataStore.createObject(subject, deUniversalProcessObject, "" + process.getPid()); //$NON-NLS-1$
- dsObj.setAttribute(DE.A_VALUE, process.getAllProperties());
- }
- /**
- * Query all properties of the process.
- */
- private void handleQueryJobAllProperties(DataElement subject, DataElement status)
- {
- }
-
- /**
- * Kill a process.
- */
- private DataElement handleKill(DataElement subject, DataElement status)
- {
- try
- {
- String statusLine = subject.getValue();
- UniversalServerProcessImpl usp = new UniversalServerProcessImpl(statusLine);
- if (handler == null) throw new Exception(PROCESS_MINER_ERROR_NO_HANDLER);
- IHostProcess result = handler.kill(usp, subject.getSource());
-
- if (result == null) _dataStore.deleteObject(subject.getParent(), subject);
- else
- {
- subject.setAttribute(DE.A_SOURCE, ""); //$NON-NLS-1$
- subject.setAttribute(DE.A_VALUE, result.getAllProperties());
- }
- } catch (Exception e) {
- UniversalServerUtilities.logError("UniversalProcessMiner", "handleQuery()", e); //$NON-NLS-1$ //$NON-NLS-2$
- status.setAttribute(DE.A_VALUE, e.getMessage());
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- _dataStore.refresh(status);
- return status;
- }
-
- _dataStore.refresh(subject.getParent());
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- status.setAttribute(DE.A_VALUE, PROCESS_MINER_SUCCESS);
- return status;
- }
-
- public String getVersion()
- {
- return _minerVersion;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/plugin.properties b/rse/plugins/org.eclipse.rse.services.dstore/plugin.properties
deleted file mode 100644
index 4aa10441a..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE DStore Services
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/.cvsignore b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/.cvsignore
deleted file mode 100644
index 30b512fb7..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-rseserver.jar
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/build.dat b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/build.dat
deleted file mode 100644
index 3ee3d7fdf..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/build.dat
+++ /dev/null
@@ -1,2 +0,0 @@
-buildId=@build@
-version=@version@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/minerFile.dat b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/minerFile.dat
deleted file mode 100644
index 3fc1668ea..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/minerFile.dat
+++ /dev/null
@@ -1,4 +0,0 @@
-org.eclipse.rse.dstore.universal.miners.command.CommandMiner
-org.eclipse.rse.dstore.universal.miners.filesystem.UniversalFileSystemMiner
-org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner
-org.eclipse.rse.dstore.universal.miners.processes.UniversalProcessMiner
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/patterns.dat b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/patterns.dat
deleted file mode 100644
index 078fe81f2..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/patterns.dat
+++ /dev/null
@@ -1,282 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. 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:
-# Martin Oberhuber (Wind River) - Adapted from RSE services.local/patterns.dat
-################################################################################
-#
-# parse command line output.
-#
-# CLICK THIS LINE TO EDIT THIS FILE (PATTERNS.DAT). (When viewing from the Output view)
-
-command: grep -n.*
- grep file line pattern =([\w,.,/,(,),\\,\-,\+,\d]*):(\d*):.*
-
-command: grep -.*n.*
- grep file line pattern =([\w,.,/,(,),\\,\-,\+,\d]*):(\d*):.*
-
-command: grep .*
- grep file pattern =([\w,.,/,(,)\\,\-,\+,\d]*):.*
-
-
-command: pwd
- directory file pattern=([\w,.,/,(,),\\,\-,\+,\d,:]*)
-
-command: nmake.*
- error pattern=NMAKE : .*
- error file line pattern =([\w,.,\-,\+,(,),\\,:]*)\((\d*):(\d*)\) : error EDC.*
- error file pattern =[\w,.,\-,\+,(,),\\,:]*\(([\w,.,/,\\]*)\) : error LNK.*
- error file line pattern=([\w,.,/,\-,\+,(,),\\]*):(\d*):\d*\) : error .*
- warning file line pattern=([\w,.,/,\-,\+,(,),\\]*)\((\d*):\d*\) : warning .*
- informational file line pattern=([\w,.,/,\-,\+,(,),\\]*)\((\d*):\d*\) : informational .*
-
-command: make.*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\",, line (\d*)\.\d*: \d*-\d* \(E\).*
- warning file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\w,.,/,(,),\-,\+,\\]*):(\d*): warning: .*
- warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
- informational file pattern =([\w,.,/,\\,\-,\+,(,)]*):.*
- informational file line pattern =In file included from ([\w,.,/,\\,\-,\+,(,)]*):(\d*):
- #iseries c compiler
- error file line pattern=[\w,.,/,\\]* Line \d* \"([\w,.,/,\\]*)\", line (\d*)\.\d*: .*
- error file line pattern=([\w,.,/,\\]*) Line (\d*)\s.*
- #makefile errors
- error file line pattern=\"([\w,\.,/,(,),\-,\+,\\]*)\", line (\d*): make:.*
- #xlc Options warnings
- warning pattern=\(W\) Option .*
- #c89 errors
- error file line pattern=ERROR CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .*
- warning file line pattern=WARNING CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .*
- informational pattern=CBC\d*\(I\) .*
-
-command: gmake.*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- warning file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\w,.,/,(,),\-,\+,\\]*):(\d*): warning: .*
- warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- informational file line pattern =In file included from ([\w,.,/,\\,\-,\+,(,)]*):(\d*):
- # ixlc compiler
- error file line pattern=[\w,.,/,\\]* Line \d* \"([\w,.,/,\\]*)\", line (\d*)\.\d*: .*
- error file line pattern=([\w,.,/,\\]*) Line (\d*)\s.*
- # icc compiler
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.*
- error file line pattern =\"([\w,.,/,\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.*
- #generic
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
-
-command: gcc\s.*
- error file line pattern=\"([\w,.,/,\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- warning file line pattern=\"([\w,.,/,\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\w,.,/,\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*): warning: .*
- warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- error file line pattern =([\w,\.,/,\\,\-,\+,(,)]*):(\d*): error: .*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: [\w,.,/,\\,\-,\+,(,)]*: .*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
- informational file pattern =([\w,.,/,\\,\-,\+,(,)]*):.*
- informational file line pattern =In file included from ([\w,.,/,\\,\-,\+,(,)]*):(\d*):
-
-command: cc\s.*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
-
-command: CC\s.*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
-
-command: c89.*
- error file line pattern=ERROR CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .*
- warning file line pattern=WARNING CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .*
- informational pattern=CBC\d*\(I\) .*
-
-command: icc.*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.*
- error file line pattern =\"([\w,.,/,\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.*
-
-command: javac.*
- warning file line pattern=([\w,.,/,\\,\-,\+,(,),:]*):(\d*): warning.*
- error file line pattern=([\w,.,/,\\,\-,\+,(,),:]*):(\d*):.*
-
-command: .*bat\s.*
- error file line pattern=\[javac\]\s([\w,.,/,\\,:]*):(\d*):.*
- error file line pattern=file:([\w,.,/,\\,:]*):(\d*):.*
-
-command: dir.*
- directory file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
- directory file pattern=.*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
- file file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*[\d,,]*\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
- directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*)
- file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\w,.,/,\\,\s,\-,\+,\d]*)
-
-command: ls -l.*
- file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*)
- file file pattern=l[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*)\s->\s[\w,.,/,(,),\\,\-,\+\s,\d]*
- file file pattern=-.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)
- file file pattern=-.* \d{4} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)
- file file pattern=l.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)\s->\s[\w,.,/,(,),\\,\-,\+\s,\d]*
- file file pattern=l.* \d{4} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)\s->\s[\w,.,/,(,),\\,\-,\+\s,\d]*
- directory file pattern=d.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
- directory file pattern=d.*\d{4} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)
-
-command: ls -a.*
- file file pattern=-.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
- file file pattern=-.* \d{4} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
- directory file pattern=d.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
- directory file pattern=d.*\d{4} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
-
-command: ls
- file file pattern=([\w,\d,.,(,),\-,\+\s]+)
-
-command: ls\s.*
- file file pattern=([\w,\d,.,(,),\-,\+\s]+)
-
-command: .*
- prompt file pattern=([\w,.,/,(,),\\,\-,\+,\d,:,\s]*)>.*
-
-command: find .*
- file file pattern=([\w,.,/,\\,(,),\-]+)
-
-command: env
- envvar pattern=[\w\d]+\=.*
-
-command: ps
- process pattern=[\s]*[\d]+\s.*
-
-command: ps .*
- process pattern=[\s]*[\d]+\s.*
-
-command: xl[C,c].*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\",, line (\d*)\.\d*: \d*-\d* \(S\).*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(E\).*
- warning file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
-
-command: ixlc.*
- error file line pattern=([\w,.,/,\\]*) Line (\d*)\s.*
- error file line pattern=[\w,.,/,\\]* Line \d* \"([\w,.,/,\\]*)\", line (\d*)\.\d*: .*
-
-command: cat.*patterns.*
- warning file pattern=# .*(PATTERNS.DAT).*
- Output pattern=command: .*
- #statement pattern=#.*
- statement pattern=.* pattern.*=.*
-
-# special for autoconf
-command: ./bootstrap.sc.*
- error file line pattern=aclocal: ([\w,.,/,\\]*): (\d*):.*
- warning file line pattern=([\w,.,/,\\]*):(\d*):.*
-
-command: ./configure.*
- error file line pattern=./(configure): line (\d*): .*
-
-# How Patterns Work
-# -----------------
-#
-# Patterns are used by the Output View to allow lines that contain file names and
-# perhaps line numbers to be clicked to cause the file location to be opened in an Editor.
-# A line in this file can be 1 of 3 things:
-# 1. An empty line or a comment line (denoted by a # in column 1)
-# 2. The start of a command description (denoted by a 'command:' at the beginning of the line)
-# 3. A pattern description.
-# A formal description of the syntax of this file is included at the bottom of this file.
-#
-#
-# Command Descriptions
-# --------------------
-#
-# A Command Description consists of 2 things: A regular expression that describes the
-# command invocation, and a list of Pattern Descriptions. The regular expression
-# is used to determine what set of Pattern Descriptons to use when parsing command output.
-# For example, if you type the command 'gmake clean', the Command Descriptions are checked and
-# .*make.* would match that command. Therefore the Pattern Descriptions for .*make.* would
-# be used to parse the output of the 'gmake clean'.
-# Note: The first Command Description that is found to match the command is used, so make
-# sure you put the most specific patterns first. For example, if the nmake.* Command
-# Description appeared after .*make.*, then 'nmake install' would be matched by the .*make.*
-# Command Descripton, which is probably not what was intended.
-#
-#
-# Pattern Descriptions
-# --------------------
-#
-# A Pattern Description has the following form:
-# <obj-name> <match-info> "pattern="<reg-ex>
-#
-# where:
-# <obj-name>: The type of object that will be created in the Output View if
-# a line of output matches this pattern.
-#
-# <match-info>: This is some combination of the words "file" and "line" or nothing
-# at all. This is used to define how the backreferences in the
-# regular expression are to be interpreted. So "file line" means
-# that the first back-reference is a file, and the second is a
-# line number. This may seem unnecessary, but we added this capability
-# in the event that future releases support other types of information
-# that may be useful, such as column info (once we support it).
-#
-# <reg-ex>: A regular expression that describes a line of output. Backreferences
-# are used to store (instead of just match) the filename and line
-# number. To store a filename use the backreference ([\w,.,/,\\]*), and
-# to store a line number, use (\d*)
-#
-#
-# Note: The patterns are checked against command output and only exact matches are dealt with
-# So as an example, if you forget the .* (match everything) at the end of a pattern,
-# the match will fail if there are trailing characters in the output not accounted for by
-# the pattern
-#
-#
-# Pattern File Syntax
-# -------------------
-#
-# The pattern file syntax should be easy to grasp by looking at the ones
-# above, but for those of you who like formal grammars, here it is:
-#
-# patterns-file:
-# commands
-#
-# commands:
-# command
-# commands new-line command
-#
-# command:
-# "command:" reg-ex new-line patterns
-#
-# patterns:
-# pattern
-# patterns new-line pattern
-#
-# pattern:
-# command-name match-list "pattern=" reg-ex
-#
-# command-name:
-# String that denotes what type of object will be created if some output matches this pattern
-#
-# match-list:
-# file-or-line
-# match-list space file-or-line
-#
-# file-or-line:
-# "file" | "line"
-#
-# reg-ex:
-# A regular expression
-#
-# new-line:
-# The new-line character \n
-#
-# space:
-# The space character
-
-
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/rsecomm.properties b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/rsecomm.properties
deleted file mode 100644
index 0be835147..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/rsecomm.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-#
-#
-#
-
-#
-# server.version - DO NOT MODIFY!
-#
-server.version=5.0.0
-
-#
-# Logging level
-# 0 - Log error messages
-# 1 - Log error and warning messages
-# 2 - Log error, warning and info messages
-# 3 - Log error, warning, info and debug messages
-#
-debug_level=0
-
-#
-# Log location
-# Log_To_StdOut
-# Log_To_File
-#
-log_location=Log_To_File
-
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/ssl.properties b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/ssl.properties
deleted file mode 100644
index fdeb76073..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/ssl.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-#
-# SSL Security Properties for RSE server and daemon
-#
-
-# Specify this property as true to enable SSL
-enable_ssl=false
-
-# Specify this property as true to disable SSL for the server when daemon ssl is enabled
-disable_server_ssl=false
-
-###################################
-# Daemon Properties
-###################################
-# The keystore file and password need to be specified for daemon
-# to use.
-#
-#daemon_keystore_file=
-#daemon_keystore_password=
-
-###################################
-# Server Properties
-###################################
-# The keystore file and password need to be specified for the
-# server to use. If none is specified, the server falls back
-# to use the same keystore and password as the daemon
-#
-#server_keystore_file=
-#server_keystore_password= \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/auth.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/auth.pl
deleted file mode 100644
index 068b4d946..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/auth.pl
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-use Shell;
-
-if (!defined($ARGV[0]) || !defined($ARGV[1]) || !defined($ARGV[2]) || !defined($ARGV[3]) || !defined($ARGV[4]))
-{
- print("command usage:\n");
- print("auth.pl USER, PATH, PORT, TIMEOUT, TICKET\n");
-}
-else
-{
- $userIN = $ARGV[0];
- $pathIN = $ARGV[1];
- $portIN = $ARGV[2];
- $timeoutIN = $ARGV[3];
- $ticketIN = $ARGV[4];
-
- if (defined($ARGV[5]))
- {
- $javaHome = $ARGV[5];
- $javaExe = "$javaHome/bin/java";
- }
- else
- {
- $javaExe = "java"
- }
-
- $pwdIN = <STDIN>;
- chomp($pwdIN);
-
-
- @passwdStruct = getpwnam($userIN);
-
- if (@passwdStruct == 0)
- {
- print("invalid user name\n");
- 0;
- }
- else
- {
- $passwd=$passwdStruct[1];
- $encryptedPWD = crypt($pwdIN, $passwd);
- $classpath=$ENV{CLASSPATH};
- $suOptions="-p";
-
- if ($passwd eq $encryptedPWD)
- {
- print("success\n");
-
- $os = uname();
- chomp($os);
-
- if (lc($os) eq "aix")
- {
- $suOptions="-";
- }
-
- system("su $suOptions $userIN -c '$javaExe -cp $classpath -DA_PLUGIN_PATH=$pathIN -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
- 1;
- }
- else
- {
- print("incorrect password\n");
- 0;
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/daemon.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/daemon.pl
deleted file mode 100644
index d101d2933..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/daemon.pl
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-$port = "4035";
-$helpFlag = "-h";
-
-if (defined($ARGV[0]))
-{
- $port = $ARGV[0];
-}
-
-
-$isHelp = $helpFlag cmp $port;
-if ($isHelp == 0)
-{
- print("command usage:\n");
- print("daemon.linux [<port> | <low port>-<high port>] [ <low server port>-<high server port>]\n");
- 0;
-}
-else
-{
- $trace = $ENV{DSTORE_TRACING_ON};
- $user=`whoami`; chomp($user);
- $match = $user cmp "root";
-
- if ($match != 0)
- {
- print("WARNING: To run the server daemon, you must have root authority\n");
- }
-
- {
- $dir= $ENV{PWD};
- $plugins_dir=$dir;
-
- $ENV{A_PLUGIN_PATH}="$plugins_dir/";
-
- $oldClasspath = $ENV{CLASSPATH};
-
- $ENV{"CLASSPATH"}="$plugins_dir:$plugins_dir/dstore_extra_server.jar:$plugins_dir/dstore_core.jar:$plugins_dir/dstore_miners.jar:$plugins_dir/clientserver.jar:$oldClasspath";
-
- if (defined($ARGV[1]))
- {
- system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_TRACING_ON=$trace org.eclipse.dstore.core.server.ServerLauncher $port $ARGV[1]");
- }
- else
- {
- system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_TRACING_ON=$trace org.eclipse.dstore.core.server.ServerLauncher $port");
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl
deleted file mode 100644
index b3c12e4f3..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/perl
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation, Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (Wind River) - Fix bug 149129 - Perl String compare with eq
-#*******************************************************************************
-
-$port = $ARGV[0];
-$timeout = $ARGV[1];
-$packaged_as = $ARGV[2];
-$clientUserID = $ARGV[3];
-
-
-$dir= $ENV{PWD};
-#print("path $dir");
-
-#$plugins_dir=substr($dir,0,rindex($dir,"/"));
-$plugins_dir=$dir;
-
-$ENV{A_PLUGIN_PATH}="$plugins_dir/";
-
-$oldClasspath = $ENV{CLASSPATH};
-
-
-if ($packaged_as eq "jar")
-{
- $ENV{"CLASSPATH"}="$plugins_dir:$plugins_dir/dstore_extra_server.jar:$plugins_dir/dstore_core.jar:$plugins_dir/dstore_miners.jar:$plugins_dir/clientserver.jar:$oldClasspath";
-}
-if ($packaged_as eq "src")
-{
- $ENV{"CLASSPATH"}="$plugins_dir:$oldClasspath";
-}
-if (!defined($packaged_as))
-{
- $ENV{"CLASSPATH"}="$plugins_dir:$plugins_dir/dstore_extra_server.jar:$plugins_dir/dstore_core.jar:$plugins_dir/dstore_miners.jar:$plugins_dir/clientserver.jar:$oldClasspath";
-}
-
-if (!defined($timeout))
-{
- system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port");
-}
-else
-{
- if (!defined($clientUserID))
- {
- system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port $timeout");
- }
- else
- {
- system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -Dclient.username=$clientUserID -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port $timeout");
- }
-}
-
-$ENV{CLASSPATH}=$oldClasspath; \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/auth.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/auth.pl
deleted file mode 100644
index d8cbd2798..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/auth.pl
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# Assumes the $CLASSPATH environment variable is set.
-# Assumes password is supplied on STDIN.
-# Sets return code of 0 on failure, 1 on success.
-
-$user=`whoami`; chomp($user);
-if ($user ne "root") {
- print "The root user must run the authorization script.\n";
- exit 0;
-}
-
-$argc = @ARGV;
-if ($argc < 5 || $argc > 6) {
- print("command usage:\n");
- print("auth.pl USER PATH PORT TIMEOUT TICKET [JAVA_HOME]\n");
- exit 0;
-}
-
-$user = $ARGV[0];
-$plugin_path = $ARGV[1];
-$port = $ARGV[2];
-$timeout = $ARGV[3];
-$ticket = $ARGV[4];
-if ($argc == 6) {
- $java = $ARGV[5]."/bin/java";
-} else {
- $java = "java";
-}
-
-$password = <STDIN>; chomp($password);
-open(CHECK, "su $user -c 'perl check.pl $password'|");
-$rc = <CHECK>; chomp($rc);
-close(CHECK);
-if ($rc > 0) {
- printf("Invalid password.\n");
- exit 0;
-}
-print "success\n";
-
-$classpath = $ENV{CLASSPATH};
-$server = "org.eclipse.dstore.core.server.Server";
-$inner_command = "$java -cp $classpath -DA_PLUGIN_PATH=$plugin_path -DDSTORE_SPIRIT_ON=true $server $port $timeout $ticket";
-$outer_command = "su $user -c '$inner_command'";
-system($outer_command);
-exit 1;
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/check.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/check.pl
deleted file mode 100644
index 8db5df885..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/check.pl
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# On MacOS X the password check must be run under the user's uid.
-# If the password is OK, prints "0\n" to STDOUT.
-# If not OK, prints "1\n" on STDOUT.
-# Password prompt and errors are sent to the bit bucket.
-
-$password = $ARGV[0];
-$user = `whoami`; chomp($user);
-$rc = system ("echo $password | su $user -c 'echo 0' 2> /dev/null");
-if ($rc > 0) {
- print "1\n";
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/daemon.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/daemon.pl
deleted file mode 100644
index 9bec4dfcb..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/daemon.pl
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# Arguments:
-# ARGV[0] is the port number for the daemon to listen on. Default is 4035.
-# ARGV[1] is the directory that contains RSE DStore server jar files and
-# installation supplied miner class files. The default is the working
-# directory.
-#
-# Environment Variables:
-# CLASSPATH - used to form the tail of the classpath for the daemon and server execution.
-# DSTORE_TRACING_ON - 0 means to not trace, 1 means to trace.
-# DSTORE_DEBUG_ON - 0 means to start in normal mode, 1 means to start in debug mode.
-#
-# Results:
-# Returns 1 if there is a startup error of some sort.
-# Does not return if the daemon starts successfully. Terminate the
-# daemon with a signal such as TERM or INT.
-
-$port = $ARGV[0] || "4035";
-$plugin_dir = $ARGV[1] || $ENV{PWD};
-$trace = $ENV{DSTORE_TRACING_ON} || "0";
-$debug = $ENV{DSTORE_DEBUG_ON} || "0";
-
-$user=`whoami`; chomp($user);
-if ($user ne "root") {
- print "The root user must run the RSE DStore server daemon.\n";
- exit 1;
-}
-
-if ($debug) {
- $debug_options = "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000";
-} else {
- $debug_options = "";
-}
-
-$classpath_old = $ENV{CLASSPATH};
-$classpath = "$plugin_dir";
-$classpath .= ":$plugin_dir/dstore_extra_server.jar";
-$classpath .= ":$plugin_dir/dstore_core.jar";
-$classpath .= ":$plugin_dir/dstore_miners.jar";
-$classpath .= ":$plugin_dir/clientserver.jar";
-if ($classpath_old) {
- $classpath .= ":$classpath_old";
-}
-
-
-$ENV{CLASSPATH} = $classpath;
-$launcher = "org.eclipse.dstore.core.server.ServerLauncher";
-$command = "java $debug_options -DA_PLUGIN_PATH=$plugin_dir -DDSTORE_TRACING_ON=$trace $launcher $port";
-print "$command\n";
-system($command);
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh
deleted file mode 100644
index 3c797124a..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-# Shell script to start an RSE communications server
-# This script will start the datastore server listening on an available socket
-serverpath=.;
-CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH;
-export serverpath CLASSPATH
-if [ $1 ]
-then java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$1 -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 &
-else java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 &
-fi
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/auth.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/auth.pl
deleted file mode 100644
index f641c22a4..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/auth.pl
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-use Shell;
-
-if (!defined($ARGV[0]) || !defined($ARGV[1]) || !defined($ARGV[2]) || !defined($ARGV[3]) || !defined($ARGV[4]))
-{
- print("command usage:\n");
- print("auth.pl USER, PATH, PORT, TIMEOUT, TICKET\n");
-}
-else
-{
- $userIN = $ARGV[0];
- $pathIN = $ARGV[1];
- $portIN = $ARGV[2];
- $timeoutIN = $ARGV[3];
- $ticketIN = $ARGV[4];
-
- if (defined($ARGV[5]))
- {
- $javaHome = $ARGV[5];
- $javaExe = "$javaHome/bin/java";
- }
- else
- {
- $javaExe = "java"
- }
-
- $pwdIN = <STDIN>;
- chomp($pwdIN);
-
-
- @passwdStruct = getpwnam($userIN);
-
- if (@passwdStruct == 0)
- {
- print("invalid user name\n");
- 0;
- }
- else
- {
- $passwd=$passwdStruct[1];
- $encryptedPWD = crypt($pwdIN, $passwd);
- $classpath=$ENV{CLASSPATH};
- $suOptions="-p";
-
- if ($passwd eq $encryptedPWD)
- {
- print("success\n");
-
- $os = uname();
- chomp($os);
-
- if (lc($os) eq "aix")
- {
- $suOptions="-";
- }
-
- system("su $suOptions $userIN -c '$javaExe -cp $classpath -DA_PLUGIN_PATH=$pathIN -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $portIN $timeoutIN $ticketIN'");
- 1;
- }
- else
- {
- print("incorrect password\n");
- 0;
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl
deleted file mode 100644
index d101d2933..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-$port = "4035";
-$helpFlag = "-h";
-
-if (defined($ARGV[0]))
-{
- $port = $ARGV[0];
-}
-
-
-$isHelp = $helpFlag cmp $port;
-if ($isHelp == 0)
-{
- print("command usage:\n");
- print("daemon.linux [<port> | <low port>-<high port>] [ <low server port>-<high server port>]\n");
- 0;
-}
-else
-{
- $trace = $ENV{DSTORE_TRACING_ON};
- $user=`whoami`; chomp($user);
- $match = $user cmp "root";
-
- if ($match != 0)
- {
- print("WARNING: To run the server daemon, you must have root authority\n");
- }
-
- {
- $dir= $ENV{PWD};
- $plugins_dir=$dir;
-
- $ENV{A_PLUGIN_PATH}="$plugins_dir/";
-
- $oldClasspath = $ENV{CLASSPATH};
-
- $ENV{"CLASSPATH"}="$plugins_dir:$plugins_dir/dstore_extra_server.jar:$plugins_dir/dstore_core.jar:$plugins_dir/dstore_miners.jar:$plugins_dir/clientserver.jar:$oldClasspath";
-
- if (defined($ARGV[1]))
- {
- system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_TRACING_ON=$trace org.eclipse.dstore.core.server.ServerLauncher $port $ARGV[1]");
- }
- else
- {
- system("java -DA_PLUGIN_PATH=\$A_PLUGIN_PATH -DDSTORE_TRACING_ON=$trace org.eclipse.dstore.core.server.ServerLauncher $port");
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh
deleted file mode 100644
index 544b319b2..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2005, 2006 IBM Corporation, Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (Wind River) - Fix for solaris (Bourne Shell export statement)
-#*******************************************************************************
-# Shell script to start an RSE communications server
-# This script will start the datastore server listening on an available socket
-serverpath=.;
-CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH;
-export serverpath CLASSPATH
-if [ $1 ]
-then java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$1 -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 &
-else java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 &
-fi
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/daemon.bat b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/daemon.bat
deleted file mode 100644
index fe12eb65b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/daemon.bat
+++ /dev/null
@@ -1,50 +0,0 @@
-@ECHO OFF
-rem *******************************************************************************
-rem Copyright (c) 2005, 2006 IBM Corporation, Wind River Systems, Inc. and others.
-rem All rights reserved. This program and the accompanying materials
-rem are made available under the terms of the Eclipse Public License v1.0
-rem which accompanies this distribution, and is available at
-rem http://www.eclipse.org/legal/epl-v10.html
-rem
-rem Contributors:
-rem IBM Corporation - initial API and implementation
-rem Martin Oberhuber (Wind River) - Bug 142952: support run by dbl click
-rem Martin Oberhuber (Wind River) - Add usage print, set variables local
-rem *******************************************************************************
-REM
-REM Start an RSE Windows Daemon
-REM Usage: daemon.bat [<port> | <low port>-<high port>] [ <low server port>-<high server port>]
-REM
-setlocal
-
-SET DaemonPort=4035
-SET ServerPortRange=
-IF NOT "%1"=="" SET DaemonPort=%1
-IF NOT "%2"=="" SET ServerPortRange=%2
-
-if "%1" == "?" goto usage
-if "%1" == "/?" goto usage
-if "%1" == "/h" goto usage
-if "%1" == "help" goto usage
-if "%1" == "/help" goto usage
-
-IF NOT "%A_PLUGIN_PATH%"=="" GOTO DoneSetup
-IF EXIST setup.bat GOTO HaveSetup
-ECHO.
-ECHO Please run setup.bat before running daemon.bat
-PAUSE
-GOTO Done
-:HaveSetup
-CALL setup.bat
-:DoneSetup
-@echo on
-java -DA_PLUGIN_PATH=%A_PLUGIN_PATH% org.eclipse.dstore.core.server.ServerLauncher %DaemonPort% %ServerPortRange%
-@echo off
-GOTO Done
-
-:usage
-@echo Usage: daemon.bat [^<port^> ^| ^<low port^>-^<high port^>] [^<low server port^>-^<high server port^>]
-pause
-
-:Done
-endlocal \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/server.bat b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/server.bat
deleted file mode 100644
index af2b8b99b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/server.bat
+++ /dev/null
@@ -1,61 +0,0 @@
-@echo off
-rem *******************************************************************************
-rem Copyright (c) 2005, 2006 IBM Corporation, Wind River Systems, Inc. and others.
-rem All rights reserved. This program and the accompanying materials
-rem are made available under the terms of the Eclipse Public License v1.0
-rem which accompanies this distribution, and is available at
-rem http://www.eclipse.org/legal/epl-v10.html
-rem
-rem Contributors:
-rem IBM Corporation - initial API and implementation
-rem Martin Oberhuber (Wind River) - Add usage print, support run by dbl click
-rem *******************************************************************************
-REM
-REM Start an RSE Windows Server
-REM Usage: server.bat [<port>] [<timeout>]
-REM
-
-setlocal
-
-set PORT=%1
-set TIMEOUT=%2
-set TICKET=%3
-if "%1" == "" set PORT=4033
-if "%2" == "" set TIMEOUT=120000
-REM set DSTORE_USER_PREFS=-Dclient.username=remoteuser
-
-if "%1" == "?" goto usage
-if "%1" == "/?" goto usage
-if "%1" == "/h" goto usage
-if "%1" == "help" goto usage
-if "%1" == "/help" goto usage
-
-IF NOT "%A_PLUGIN_PATH%"=="" GOTO doneSetup
-IF EXIST setup.bat GOTO HaveSetup
-ECHO.
-ECHO Please run setup.bat before running server.bat
-PAUSE
-GOTO done
-:HaveSetup
-CALL setup.bat
-
-:doneSetup
-if "%3" == "" goto runNoTicket
-REM The ticket parameter may be used internally by the daemon for starting a server
-@echo on
-java %DSTORE_USER_PREFS% -DA_PLUGIN_PATH=%A_PLUGIN_PATH% -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server %PORT% %TIMEOUT% %TICKET%
-@echo off
-goto done
-
-:runNoTicket
-@echo on
-java %DSTORE_USER_PREFS% -DA_PLUGIN_PATH=%A_PLUGIN_PATH% -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server %PORT% %TIMEOUT%
-@echo off
-goto done
-
-:usage
-@echo Usage: server.bat [^<port^>] [^<timeout^>]
-pause
-
-:done
-endlocal \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/setup.bat b/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/setup.bat
deleted file mode 100644
index cf7d05ede..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/windows/setup.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@echo off
-rem *******************************************************************************
-rem Copyright (c) 2005, 2006 IBM Corporation and others.
-rem All rights reserved. This program and the accompanying materials
-rem are made available under the terms of the Eclipse Public License v1.0
-rem which accompanies this distribution, and is available at
-rem http://www.eclipse.org/legal/epl-v10.html
-rem
-rem Contributors:
-rem IBM Corporation - initial API and implementation
-rem *******************************************************************************
-@echo on
-set ECLIPSEDIR=.
-set CORE=%ECLIPSEDIR%\dstore_core.jar
-set MINERS=%ECLIPSEDIR%\dstore_miners.jar
-set EXTRA=%ECLIPSEDIR%\dstore_extra_server.jar
-set CLIENTSERVER=%ECLIPSEDIR%\clientserver.jar
-set A_PLUGIN_PATH=%ECLIPSEDIR%
-set CLASSPATH=%CORE%;%MINERS%;%UNIVERSAL%;%UNIVERSALJAR%;%CLIENTSERVER%;%EXTRA%;%CLASSPATH%
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shell/DStoreShellOutputReader.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shell/DStoreShellOutputReader.java
deleted file mode 100644
index 2482edc11..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shell/DStoreShellOutputReader.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.dstore.shell;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-import org.eclipse.rse.services.dstore.shells.DStoreHostOutput;
-import org.eclipse.rse.services.shells.AbstractHostShellOutputReader;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellOutputReader;
-import org.eclipse.rse.services.shells.SimpleHostOutput;
-
-public class DStoreShellOutputReader extends AbstractHostShellOutputReader implements IHostShellOutputReader, IDomainListener
-{
- protected DataElement _status;
- protected int _statusOffset = 0;
-
- public DStoreShellOutputReader(IHostShell hostShell, DataElement status, boolean isErrorReader)
- {
- super(hostShell, isErrorReader);
- setName("DStoreShellOutputReader"+getName()); //$NON-NLS-1$
- _status = status;
- if (status != null)
- {
- _status.getDataStore().getDomainNotifier().addDomainListener(this);
- }
- }
-
- public String getWorkingDirectory()
- {
- String pwd = _status.getSource();
- return pwd;
- }
-
- protected IHostOutput internalReadLine()
- {
- if (_status != null && _keepRunning)
- {
- int newSize = _status.getNestedSize();
-
- while (newSize > _statusOffset)
- {
- DataElement line = _status.get(_statusOffset++);
-
-
-
- String type = line.getType();
- boolean isError = type.equals("error") || type.equals("stderr"); //$NON-NLS-1$ //$NON-NLS-2$
- if (_isErrorReader && isError)
- {
- return new DStoreHostOutput(line);
- }
- else if (!_isErrorReader && !isError)
- {
- return new DStoreHostOutput(line);
- }
- }
-
-
- try
- {
- waitForResponse();
- return internalReadLine();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- if (_status.getValue().equals("done")) //$NON-NLS-1$
- {
- if (!_isErrorReader)
- {
- DataElement dummyLine = _status.getDataStore().createObject(_status, "stdout", ""); //$NON-NLS-1$ //$NON-NLS-2$
- return new DStoreHostOutput(dummyLine);
- }
- else
- {
- return null;
- }
- }
- return new SimpleHostOutput(""); //$NON-NLS-1$
- }
-
- public boolean listeningTo(DomainEvent e)
- {
- return e.getParent() == _status;
- }
-
- public void domainChanged(DomainEvent event)
- {
- if (_status.getValue().equals("done")) //$NON-NLS-1$
- {
-
- if (_status == event.getParent())
- {
- finish();
- }
- }
- else
- {
- // for now, this is pulled via internalReadLine()
- notifyResponse();
- }
-
- }
-
- /**
- * Causes the current thread to wait until this class request has been
- * fulfilled.
- */
- public synchronized void waitForResponse()
- {
- try
- {
- wait();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- }
-
- /**
- * Causes all threads waiting for this class request to be filled
- * to wake up.
- */
- public synchronized void notifyResponse()
- {
- try
- {
- notifyAll();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void finish()
- {
- super.finish();
- notifyResponse();
- }
-
- /*
- private void handleInput()
- {
- // append new results to existing results
- ArrayList results = _status.getNestedData();
- int totalSize = results.size();
- int currentSize = _linesOfOutput.size();
-
- for (int loop = currentSize; loop < totalSize; loop++)
- {
- DataElement result = (DataElement) results.get(loop);
- addLine(result.getName());
- }
- }
- */
-
-}
- \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shell/DStoreShellThread.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shell/DStoreShellThread.java
deleted file mode 100644
index 6ec878adc..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shell/DStoreShellThread.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.dstore.shell;
-
-import java.io.File;
-
-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.DataStoreSchema;
-import org.eclipse.rse.dstore.universal.miners.command.CommandMiner;
-import org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner;
-
-
-
-public class DStoreShellThread
-{
- protected DataElement _runCmdDescriptor;
- protected DataElement _runShellDescriptor;
- protected DataElement _setEnvironmentDescriptor;
- protected DataElement _sendInputDescriptor;
- protected DataElement _cmdMinerElement;
- protected DataElement _envMinerElement;
-
- private String _encoding;
- private String _cwd;
- private String[] _envVars;
- private DataStore _dataStore;
- private DataElement _status;
- private String _invocation;
-
- /**
- * @param cwd initial working directory
- * @param invocation launch shell command
- * @param encoding
- * @param patterns patterns file for output interpretation
- * @param envVars user and system environment variables to launch shell with
- */
- public DStoreShellThread(DataStore dataStore, String cwd, String invocation, String encoding, String[] envVars)
- {
- super();
- _dataStore = dataStore;
- _encoding = encoding;
- _cwd = cwd;
- _envVars = envVars;
- _invocation = invocation;
- init();
- }
-
- protected void init()
- {
- // make this subsystem a communications listener
- DataElement contextDir = _dataStore.createObject(null, "directory", (new File(_cwd)).getName(), _cwd); //$NON-NLS-1$
- _dataStore.setObject(contextDir);
- setRemoteEnvironment(contextDir);
- if (_invocation== null || _invocation.equals(">")) //$NON-NLS-1$
- {
- sendShellToMiner(contextDir);
- }
- else
- {
- sendCommandToMiner(contextDir, _invocation);
-
- }
- }
-
- public DataElement getStatus()
- {
- return _status;
- }
-
- protected void sendShellToMiner(DataElement contextDir)
- {
- DataElement cmdD = getRunShellDescriptor(contextDir);
-
- if (cmdD != null)
- {
- String encoding = _encoding;
- if (encoding != null && encoding.length() > 0)
- {
- DataElement arg = _dataStore.createObject(null, "shell.encoding", encoding); //$NON-NLS-1$
- _status = _dataStore.command(cmdD, arg, contextDir);
- }
- else
- {
- _status = _dataStore.command(cmdD, contextDir);
- }
- }
- }
-
- protected void sendCommandToMiner(DataElement contextDir, String invocation)
- {
- DataElement cmdD = getRunCommandDescriptor(contextDir);
-
- if (cmdD != null)
- {
-
- if (invocation != null && invocation.length() > 0)
- {
- DataElement arg = _dataStore.createObject(null, "command", invocation); //$NON-NLS-1$
- _status = _dataStore.command(cmdD, arg, contextDir);
- }
- else
- {
- _status = _dataStore.command(cmdD, contextDir);
- }
- }
- }
- /**
- * Set the environment variables for this connection. For universal this sets them in the
- * DataStore tree. When a new shell is launched the environment variables are passed to the
- * shell.
- */
- public void setRemoteEnvironment(DataElement theObject)
- {
-
- if (_envVars != null && _envVars.length > 0)
- {
- DataElement theEnvironment = _dataStore.createObject(null, "Environment Variable", theObject.getName()); //$NON-NLS-1$
- for (int i = 0; i < _envVars.length; i++)
- {
- String var = _envVars[i];
- _dataStore.createObject(theEnvironment, "Environment Variable", var, var); //$NON-NLS-1$
- }
-
- theEnvironment.setAttribute(DE.A_NAME, theObject.getId());
- DataElement contObj = _dataStore.findObjectDescriptor("Container Object"); //$NON-NLS-1$
- DataElement setD = getSetEnvironmentDescriptor(contObj);
- if (setD != null)
- {
- _dataStore.command(setD, theEnvironment, theObject, false);
- }
- }
- }
-
-
- protected DataElement getRunCommandDescriptor(DataElement remoteObject)
- {
- if (_runCmdDescriptor == null || _dataStore != remoteObject.getDataStore())
- {
- _runCmdDescriptor = _dataStore.localDescriptorQuery(remoteObject.getDescriptor(), getRunCommandId());
- }
- return _runCmdDescriptor;
- }
-
- protected DataElement getRunShellDescriptor(DataElement remoteObject)
- {
- if (_runShellDescriptor == null || _dataStore != remoteObject.getDataStore())
- {
- _runShellDescriptor = _dataStore.localDescriptorQuery(remoteObject.getDescriptor(), getRunShellId(), 2);
- }
- return _runShellDescriptor;
- }
-
- protected DataElement getSetEnvironmentDescriptor(DataElement remoteObject)
- {
- if (_setEnvironmentDescriptor == null || _dataStore != remoteObject.getDataStore())
- {
- _setEnvironmentDescriptor = _dataStore.localDescriptorQuery(remoteObject.getDescriptor(), getSetEnvironmentId(), 2);
- }
- return _setEnvironmentDescriptor;
- }
-
-
- protected DataElement getSendInputDescriptor(DataElement remoteObject)
- {
- if (_sendInputDescriptor == null || _dataStore != remoteObject.getDataStore())
- {
- _sendInputDescriptor = _dataStore.findCommandDescriptor(DataStoreSchema.C_SEND_INPUT);
- }
-
- return _sendInputDescriptor;
- }
-
-
- protected DataElement getCmdSystemMinerElement()
- {
-
- if (_cmdMinerElement == null || _cmdMinerElement.getDataStore() != _dataStore)
- {
- _cmdMinerElement = _dataStore.findMinerInformation(getCmdSystemMinerId());
- }
- return _cmdMinerElement;
- }
-
- protected DataElement getEnvSystemMinerElement()
- {
-
- if (_envMinerElement == null || _envMinerElement.getDataStore() != _dataStore)
- {
- _envMinerElement = _dataStore.findMinerInformation(getEnvSystemMinerId());
-
- }
- return _envMinerElement;
- }
-
-
- protected String getCmdSystemMinerId()
- {
- return CommandMiner.MINER_ID;
- }
-
-
- protected String getEnvSystemMinerId()
- {
- return EnvironmentMiner.MINER_ID;
- }
-
- protected String getRunShellId()
- {
- return "C_SHELL"; //$NON-NLS-1$
- }
-
- protected String getRunCommandId()
- {
- return "C_COMMAND"; //$NON-NLS-1$
- }
-
- protected String getSetEnvironmentId()
- {
- return "C_SET_ENVIRONMENT_VARIABLES"; //$NON-NLS-1$
- }
-
-
- public void writeToShell(String command)
- {
- DataElement commandElement = _status.getParent();
- DataStore dataStore = commandElement.getDataStore();
-
- if (command.equals("") || command.equals("#break")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- String cmd = command;
- if (cmd.equals("")) //$NON-NLS-1$
- cmd = "#enter"; //$NON-NLS-1$
- DataElement commandDescriptor = getSendInputDescriptor(commandElement);
- if (commandDescriptor != null)
- {
- DataElement in = dataStore.createObject(null, "input", cmd); //$NON-NLS-1$
- dataStore.command(commandDescriptor, in, commandElement);
- }
- }
- else
- {
- String[] tokens = command.split("\n\r"); //$NON-NLS-1$
- for (int i = 0; i <tokens.length; i++)
- {
- String cmd = tokens[i];
-
- if (cmd != null)
- {
- DataElement commandDescriptor = getSendInputDescriptor(commandElement);
- if (commandDescriptor != null)
- {
- DataElement in = dataStore.createObject(null, "input", cmd); //$NON-NLS-1$
- dataStore.command(commandDescriptor, in, commandElement);
- }
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java
deleted file mode 100644
index 09841fdf1..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.dstore.core.model.IDataStoreProvider;
-import org.eclipse.rse.services.clientserver.messages.ISystemMessageProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.dstore.util.DStoreStatusMonitor;
-
-public abstract class AbstractDStoreService implements IDStoreService
-{
- protected IDataStoreProvider _dataStoreProvider;
- protected ISystemMessageProvider _msgProvider;
- protected DataElement _minerElement;
- protected DStoreStatusMonitor _statusMonitor;
- protected Map _cmdDescriptorMap;
- protected DataElement _initializeStatus;
-
- public AbstractDStoreService(IDataStoreProvider dataStoreProvider, ISystemMessageProvider msgProvider)
- {
- _dataStoreProvider = dataStoreProvider;
- _msgProvider = msgProvider;
- _cmdDescriptorMap = new HashMap();
- }
-
- public DStoreStatusMonitor getStatusMonitor(DataStore dataStore)
- {
- if (_statusMonitor == null || _statusMonitor.getDataStore() != dataStore)
- {
- _statusMonitor = new DStoreStatusMonitor(dataStore);
- }
- return _statusMonitor;
- }
-
- public DataStore getDataStore()
- {
- return _dataStoreProvider.getDataStore();
- }
-
- protected DataElement getMinerElement()
- {
- if (_minerElement == null || _minerElement.getDataStore() != getDataStore())
- {
- _minerElement = getMinerElement(getMinerId());
- }
- return _minerElement;
- }
-
- protected DataElement getMinerElement(String id)
- {
- return getDataStore().findMinerInformation(id);
- }
-
- protected DataElement[] dsQueryCommand(IProgressMonitor monitor, DataElement subject, ArrayList args, String command)
- {
- // query roots
- DataElement queryCmd = getCommandDescriptor(subject, command);
-
- if (queryCmd != null)
- {
- DataElement status = getDataStore().command(queryCmd, args, subject, true);
- try
- {
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- smon.waitForUpdate(status, monitor);
- int resultSize = subject.getNestedSize();
- if (resultSize == 0)
- {
- //System.out.println("status="+status);
- //System.out.println("subject="+subject);
- }
- checkHostJVM();
- // get results
- List nested = subject.getNestedData();
- if (nested != null)
- {
- return (DataElement[])nested.toArray(new DataElement[resultSize]);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- else
- {
- System.out.println("no query command for "+ subject); //$NON-NLS-1$
- }
- return new DataElement[0];
- }
-
- protected DataElement dsStatusCommand(IProgressMonitor monitor, DataElement subject, ArrayList args, String command)
- {
- // query roots
- DataElement queryCmd = getCommandDescriptor(subject, command);
-
- if (queryCmd != null)
- {
- DataElement status = getDataStore().command(queryCmd, args, subject, true);
- try
- {
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- smon.waitForUpdate(status, monitor);
- }
- catch (Exception e)
- {
- }
- return status;
- }
- return null;
- }
-
- protected DataElement[] dsQueryCommand(IProgressMonitor monitor, DataElement subject, String command)
- {
- // query roots
- DataElement queryCmd = getCommandDescriptor(subject, command);
-
- if (queryCmd != null)
- {
- DataStore ds = getDataStore();
- DataElement status = ds.command(queryCmd, subject, true);
- try
- {
- getStatusMonitor(ds).waitForUpdate(status, monitor);
- checkHostJVM();
- // get results
- List nested = subject.getNestedData();
- if (nested != null)
- {
- return (DataElement[])nested.toArray(new DataElement[subject.getNestedSize()]);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- return new DataElement[0];
- }
-
- protected DataElement dsStatusCommand(IProgressMonitor monitor, DataElement subject, String command)
- {
- // query roots
- DataElement queryCmd = getCommandDescriptor(subject, command);
-
- if (queryCmd != null)
- {
- DataStore ds = getDataStore();
- DataElement status = ds.command(queryCmd, subject, true);
- try
- {
- getStatusMonitor(ds).waitForUpdate(status, monitor);
- }
- catch (Exception e)
- {
- }
- return status;
- }
- return null;
- }
-
- protected DataElement getCommandDescriptor(DataElement subject, String command)
- {
- DataStore ds = getDataStore();
- DataElement cmd = (DataElement)_cmdDescriptorMap.get(command);
- if (cmd == null || ds != cmd.getDataStore())
- {
- cmd = getDataStore().localDescriptorQuery(subject.getDescriptor(), command);
- _cmdDescriptorMap.put(command, cmd);
- }
- return cmd;
- }
-
- public int getServerVersion()
- {
- return getDataStore().getServerVersion();
- }
-
- public int getServerMinor()
- {
- return getDataStore().getServerMinor();
- }
-
- protected void checkHostJVM()
- {
- /*
- DataElement status = getDataStore().queryHostJVM();
- String source = status.getSource();
- String[] tokens = source.split(",");
-
- long freeMem = Long.parseLong(tokens[0]);
- long totalMem = Long.parseLong(tokens[1]);
-
- int numElements = Integer.parseInt(tokens[3]);
-
- System.out.println("Host JVM Stats:");
- System.out.println("\tfreeMem="+freeMem);
- System.out.println("\ttotalMem="+totalMem);
-
- System.out.println("\tnumber of elements="+numElements);
-
- String[] lastCreated = tokens[4].split(";");
- System.out.println("\tlast created:");
- for (int i = 0; i < lastCreated.length; i++)
- {
- System.out.println("\t\t" + lastCreated[i]);
- }
- */
- }
-
- public boolean isInitialized()
- {
- if (_initializeStatus != null)
- {
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- return smon.determineStatusDone(_initializeStatus);
- }
- return false;
- }
-
- protected void waitForInitialize(IProgressMonitor monitor)
- {
- if (_initializeStatus != null)
- {
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- try
- {
- smon.waitForUpdate(_initializeStatus, monitor, 100);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
-
- getMinerElement();
- }
- }
-
- public void initService(IProgressMonitor monitor)
- {
- initMiner(monitor);
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- _initializeStatus = null;
- _cmdDescriptorMap.clear();
- _minerElement = null;
- _statusMonitor = null;
- }
-
- protected void initMiner(IProgressMonitor monitor)
- {
- DataElement fsElement = getMinerElement();
- if (fsElement == null)
- {
- if (getServerVersion() >= 8)
- {
- String minerId = getMinerId();
- String message = SystemMessage.sub(ServiceResources.DStore_Service_ProgMon_Initializing_Message, "&1", minerId); //$NON-NLS-1$
- monitor.beginTask(message, IProgressMonitor.UNKNOWN);
- DataStore ds = getDataStore();
- if (_minerElement == null || _minerElement.getDataStore() != ds)
- {
- if (ds != null)
- {
- _initializeStatus = ds.activateMiner(minerId);
- /*
- DStoreStatusMonitor smon = getStatusMonitor(ds);
- try
- {
- smon.waitForUpdate(status, monitor, 50);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
-
- getMinerElement();
- */
- }
- }
- }
- }
- monitor.done();
- }
-
- protected abstract String getMinerId();
-
- /**
- * For now just a dummy method
- * @param messageID
- * @return the message
- */
- public SystemMessage getMessage(String messageID)
- {
- return _msgProvider.getMessage(messageID);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/Activator.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/Activator.java
deleted file mode 100644
index 4a6b21603..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/Activator.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends Plugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/IDStoreService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/IDStoreService.java
deleted file mode 100644
index b40706d26..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/IDStoreService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore;
-
-public interface IDStoreService
-{
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/ServiceResources.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/ServiceResources.java
deleted file mode 100644
index f8d231740..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/ServiceResources.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.services.dstore.ServiceResources";//$NON-NLS-1$
-
- public static String DStore_Shell_Service_Label;
- public static String DStore_Search_Service_Label;
- public static String DStore_File_Service_Label;
- public static String DStore_Process_Service_Label;
-
- public static String DStore_Shell_Service_Description;
- public static String DStore_Search_Service_Description;
- public static String DStore_File_Service_Description;
- public static String DStore_Process_Service_Description;
-
- public static String DStore_Service_ProgMon_Initializing_Message;
- public static String DStore_Service_Percent_Complete_Message;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ServiceResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/ServiceResources.properties b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/ServiceResources.properties
deleted file mode 100644
index 7f2a3e83d..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/ServiceResources.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-DStore_Shell_Service_Label=DStore Shell Service
-DStore_Search_Service_Label=DStore Search Service
-DStore_File_Service_Label=DStore File Service
-DStore_Process_Service_Label=DStore Process Service
-
-DStore_Service_ProgMon_Initializing_Message=Initializing &1...
-DStore_Service_Percent_Complete_Message=&0 of &1 complete (&2)
-
-DStore_Shell_Service_Description=The DStore Shell Service uses the RSE DataStore to provide service for the Shells subsystem. It requires a DataStore server or daemon to be running on the host machine.
-DStore_Search_Service_Description=The DStore Search Service uses the RSE DataStore to provide service for remote searches. It requires a DataStore server or daemon to be running on the host machine.
-DStore_File_Service_Description=The DStore File Service uses the RSE DataStore to provide service for the Files subsystem. It requires a DataStore server or daemon to be running on the host machine.
-DStore_Process_Service_Description=The DStore Process Service uses the RSE DataStore to provide service for the Processes subsystem. It requires a DataStore server or daemon to be running on the host machine. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreFileService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreFileService.java
deleted file mode 100644
index 183cd73d6..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreFileService.java
+++ /dev/null
@@ -1,1232 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.files;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.DataStoreResources;
-import org.eclipse.dstore.core.model.IDataStoreProvider;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.filesystem.UniversalByteStreamHandler;
-import org.eclipse.rse.dstore.universal.miners.filesystem.UniversalFileSystemMiner;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.ISystemFileTypes;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.ISystemMessageProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.dstore.AbstractDStoreService;
-import org.eclipse.rse.services.dstore.ServiceResources;
-import org.eclipse.rse.services.dstore.util.DownloadListener;
-import org.eclipse.rse.services.dstore.util.FileSystemMessageUtil;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-
-public class DStoreFileService extends AbstractDStoreService implements IFileService, IUniversalDataStoreConstants
-{
-
- protected org.eclipse.dstore.core.model.DataElement _uploadLogElement = null;
- protected Map _fileElementMap;
- private int _bufferUploadSize = IUniversalDataStoreConstants.BUFFER_SIZE;
- private int _bufferDownloadSize = IUniversalDataStoreConstants.BUFFER_SIZE;
- protected ISystemFileTypes _fileTypeRegistry;
-
- private static String _percentMsg = SystemMessage.sub(SystemMessage.sub(SystemMessage.sub(ServiceResources.DStore_Service_Percent_Complete_Message, "&0", "{0}"), "&1", "{1}"), "&2", "{2}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
-
- private static String[] _filterAttributes = {
- "attributes", //$NON-NLS-1$
- "filter", //$NON-NLS-1$
- "filter.id", //$NON-NLS-1$
- "doc", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- DataStoreResources.FALSE,
- "2"}; //$NON-NLS-1$
-
- public DStoreFileService(IDataStoreProvider dataStoreProvider, ISystemFileTypes fileTypeRegistry, ISystemMessageProvider msgProvider)
- {
- super(dataStoreProvider, msgProvider);
- _fileElementMap = new HashMap();
- _fileTypeRegistry = fileTypeRegistry;
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- super.uninitService(monitor);
- _fileElementMap.clear();
- }
-
- public String getName()
- {
- return ServiceResources.DStore_File_Service_Label;
- }
-
- public String getDescription()
- {
- return ServiceResources.DStore_File_Service_Description;
- }
-
- public void setBufferUploadSize(int size)
- {
- _bufferUploadSize = size;
- }
-
- public void setBufferDownloadSize(int size)
- {
- _bufferDownloadSize = size;
- }
-
- protected int getBufferUploadSize()
- {
- return _bufferUploadSize;
- }
-
- protected int getBufferDownloadSize()
- {
- return _bufferDownloadSize;
- }
-
- protected String getMinerId()
- {
- return UniversalFileSystemMiner.MINER_ID;
- }
-
- protected String getByteStreamHandlerId()
- {
- return UniversalByteStreamHandler.class.getName();
- }
-
- protected String getDataStoreRoot()
- {
- return getDataStore().getAttribute(DataStoreAttributes.A_LOCAL_PATH);
- }
-
-
- protected String prepareForDownload(String localPath)
- {
- int index = localPath.lastIndexOf(File.separator);
- String parentDir = localPath.substring(0, index + 1);
-
- // change local root for datastore so that the file is downloaded
- // at the specified location
- setDataStoreRoot(parentDir);
-
- String dataStoreLocalPath = localPath.substring(index + 1);
-
- if (!dataStoreLocalPath.startsWith("/")) //$NON-NLS-1$
- dataStoreLocalPath = "/" + dataStoreLocalPath; //$NON-NLS-1$
-
- return dataStoreLocalPath;
- }
-
- protected void setDataStoreRoot(String root)
- {
- getDataStore().setAttribute(DataStoreAttributes.A_LOCAL_PATH, root);
- }
-
- protected DataElement findUploadLog()
- {
- DataElement minerInfo = getMinerElement();
- if (_uploadLogElement == null || _uploadLogElement.getDataStore() != getDataStore())
- {
- _uploadLogElement = getDataStore().find(minerInfo, DE.A_NAME, "universal.uploadlog", 2); //$NON-NLS-1$
- }
- return _uploadLogElement;
- }
-
- protected DataElement getAttributes(String fileNameFilter, boolean showHidden)
- {
- DataElement attributes = getDataStore().createTransientObject(_filterAttributes);
- String version = VERSION_1;
- StringBuffer buffer = new StringBuffer();
- String filter = ((fileNameFilter == null) ? "*" : fileNameFilter); //$NON-NLS-1$
- buffer.append(version).append(TOKEN_SEPARATOR).append(filter).append(TOKEN_SEPARATOR).append(showHidden);
- attributes.setAttribute(DE.A_SOURCE, buffer.toString());
- return attributes;
- }
-
-
-
- public boolean upload(IProgressMonitor monitor, InputStream inputStream, String remoteParent, String remoteFile,
- boolean isBinary, String hostEncoding)
- {
- BufferedInputStream bufInputStream = null;
-
-
- boolean isCancelled = false;
-
-
-
- try
- {
-
-// DataElement uploadLog = findUploadLog();
- findUploadLog();
-// listener = new FileTransferStatusListener(remotePath, shell, monitor, getConnectorService(), ds, uploadLog);
- // ds.getDomainNotifier().addDomainListener(listener);
-
- int buffer_size = getBufferUploadSize();
-
- // read in the file
- bufInputStream = new BufferedInputStream(inputStream, buffer_size);
-
- boolean first = true;
- byte[] buffer = new byte[buffer_size];
- byte[] convBytes;
- int numToRead = 0;
-
- int available = bufInputStream.available();
-
- long totalSent = 0;
-
- // upload bytes while available
- while (available > 0 && !isCancelled)
- {
-
-
- numToRead = (available < buffer_size) ? available : buffer_size;
-
- int bytesRead = bufInputStream.read(buffer, 0, numToRead);
-
- if (bytesRead == -1)
- break;
-
- totalSent += bytesRead;
-
- String byteStreamHandlerId = getByteStreamHandlerId();
- String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
-
- if (!isBinary && hostEncoding != null)
- {
- String tempStr = new String(buffer, 0, bytesRead);
-
- // hack for zOS - \r causes problems for compilers
-// if (osName != null && (osName.startsWith("z") || osName.equalsIgnoreCase("aix")))
-// {
-// tempStr = tempStr.replace('\r', ' ');
-// }
-
- convBytes = tempStr.getBytes(hostEncoding);
-
- if (first)
- { // send first set of bytes
- first = false;
- getDataStore().replaceFile(remotePath, convBytes, convBytes.length, true, byteStreamHandlerId);
- }
- else
- { // append subsequent segments
- getDataStore().replaceAppendFile(remotePath, convBytes, convBytes.length, true, byteStreamHandlerId);
- }
- }
- else // binary
- {
- if (first)
- { // send first set of bytes
- first = false;
- getDataStore().replaceFile(remotePath, buffer, bytesRead, true, byteStreamHandlerId);
- }
- else
- { // append subsequent segments
- getDataStore().replaceAppendFile(remotePath, buffer, bytesRead, true, byteStreamHandlerId);
- }
- }
-
-
- if (monitor != null)
- {
-
- isCancelled = monitor.isCanceled();
-
- }
-
- available = bufInputStream.available();
- }
-// if (listener.uploadHasFailed())
-// {
-// showUploadFailedMessage(listener, source);
-// }
-// else
- {
- // transferSuccessful = true;
- }
- }
-
- catch (FileNotFoundException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- catch (UnsupportedEncodingException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- catch (IOException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- catch (Exception e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- finally
- {
-
- try
- {
-
- if (bufInputStream != null)
- bufInputStream.close();
-
- if (isCancelled)
- {
- return false;
- //throw new RemoteFileCancelledException();
- }
- }
- catch (IOException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
-
- }
-
- return true;
- }
-
- public boolean upload(IProgressMonitor monitor, File file, String remoteParent, String remoteFile,
- boolean isBinary, String srcEncoding, String hostEncoding)
- {
- FileInputStream inputStream = null;
- BufferedInputStream bufInputStream = null;
-
-
- boolean isCancelled = false;
- boolean transferSuccessful = false;
-
- long totalBytes = file.length();
-
- try
- {
- // if the file is empty, create new empty file on host
- if (totalBytes == 0)
- {
- IHostFile created = createFile(monitor, remoteParent, remoteFile);
- return created.exists();
- }
-
- if (monitor != null)
- {
- monitor.setTaskName(file.getName());
- //subMonitor = new SubProgressMonitor(monitor, (int)totalBytes);
- }
-
-
-// DataElement uploadLog = findUploadLog();
- findUploadLog();
-// listener = new FileTransferStatusListener(remotePath, shell, monitor, getConnectorService(), ds, uploadLog);
- // ds.getDomainNotifier().addDomainListener(listener);
-
- int buffer_size = getBufferUploadSize();
-
- // read in the file
- inputStream = new FileInputStream(file);
- bufInputStream = new BufferedInputStream(inputStream, buffer_size);
-
- boolean first = true;
- byte[] buffer = new byte[buffer_size];
- byte[] convBytes;
- int numToRead = 0;
-
- int available = bufInputStream.available();
-
- long totalSent = 0;
-
- // upload bytes while available
- while (available > 0 && !isCancelled)
- {
-
- numToRead = (available < buffer_size) ? available : buffer_size;
-
- int bytesRead = bufInputStream.read(buffer, 0, numToRead);
-
- if (bytesRead == -1)
- break;
-
- totalSent += bytesRead;
-
- String byteStreamHandlerId = getByteStreamHandlerId();
- String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
-
- if (!isBinary && srcEncoding != null && hostEncoding != null)
- {
- String tempStr = new String(buffer, 0, bytesRead, srcEncoding);
-
- // hack for zOS - \r causes problems for compilers
-// if (osName != null && (osName.startsWith("z") || osName.equalsIgnoreCase("aix")))
-// {
-// tempStr = tempStr.replace('\r', ' ');
-// }
-
- convBytes = tempStr.getBytes(hostEncoding);
-
- if (first)
- { // send first set of bytes
- first = false;
- getDataStore().replaceFile(remotePath, convBytes, convBytes.length, true, byteStreamHandlerId);
- }
- else
- { // append subsequent segments
- getDataStore().replaceAppendFile(remotePath, convBytes, convBytes.length, true, byteStreamHandlerId);
- }
- }
- else // binary
- {
- if (first)
- { // send first set of bytes
- first = false;
- getDataStore().replaceFile(remotePath, buffer, bytesRead, true, byteStreamHandlerId);
- }
- else
- { // append subsequent segments
- getDataStore().replaceAppendFile(remotePath, buffer, bytesRead, true, byteStreamHandlerId);
- }
- }
-
-
- if (/*display != null &&*/ monitor != null)
- {
- long percent = (totalSent * 100) / totalBytes;
-
-
- StringBuffer totalSentBuf = new StringBuffer();
- totalSentBuf.append((totalSent / KB_IN_BYTES));
- totalSentBuf.append(" KB"); //$NON-NLS-1$
-
- StringBuffer totalBuf = new StringBuffer();
- totalBuf.append(totalBytes / KB_IN_BYTES);
- totalBuf.append(" KB"); //$NON-NLS-1$
-
- StringBuffer percentBuf = new StringBuffer();
- percentBuf.append(percent);
- percentBuf.append("%"); //$NON-NLS-1$
-
- monitor.worked(bytesRead);
-
- String str = MessageFormat.format(_percentMsg, new Object[] {totalSentBuf, totalBuf, percentBuf});
- monitor.subTask(str);
-
-
-
-
- isCancelled = monitor.isCanceled();
- }
-
- available = bufInputStream.available();
- }
- // if (listener.uploadHasFailed())
- // {
- // showUploadFailedMessage(listener, source);
- // }
- // else
- {
- transferSuccessful = true;
- }
- }
-
- catch (FileNotFoundException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- catch (UnsupportedEncodingException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- catch (IOException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- catch (Exception e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- finally
- {
-
- try
- {
-
- if (bufInputStream != null)
- bufInputStream.close();
-
- if (isCancelled)
- {
- return false;
- //throw new RemoteFileCancelledException();
- }
- }
- catch (IOException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
-
- if (totalBytes > 0)
- {
- if (transferSuccessful)
- {
-
-
-// try
-// {
-// listener.waitForUpdate(null, 2);
-//
-// }
-// catch (InterruptedException e)
-// {
-// UniversalSystemPlugin.logError(CLASSNAME + " InterruptedException while waiting for command", e);
-// }
-
- }
-
- //ds.getDomainNotifier().removeDomainListener(listener);
-
-// if (listener.uploadHasFailed())
-// {
-// showUploadFailedMessage(listener, source);
-// }
- }
- }
-
- return true;
- }
-
-
- public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile,
- boolean isBinary, String encoding) throws SystemMessageException
- {
- DataElement universaltemp = getMinerElement();
-
- if (!localFile.exists())
- {
- File parentDir = localFile.getParentFile();
- parentDir.mkdirs();
- }
-
- try
- {
- if (localFile.exists())
- localFile.delete();
- localFile.createNewFile();
- }
- catch (IOException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error creating local file " + destination, e);
-// throw new RemoteFileIOException(e);
- return false;
- }
-
- int mode;
-
- if (isBinary)
- {
- mode = BINARY_MODE;
- }
- else
- {
- mode = TEXT_MODE;
- }
-
- DataStore ds = getDataStore();
- String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
-
- DataElement de = getElementFor(remotePath);
- if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- // need to refetch
- DStoreHostFile hostFile = (DStoreHostFile)getFile(monitor, remoteParent, remoteFile);
- de = hostFile._element;
- }
- long fileLength = DStoreHostFile.getFileLength(de.getSource());
- if (monitor != null)
- {
- monitor.beginTask(remotePath, (int)fileLength);
- }
-
-
- DataElement remoteElement = ds.createObject(universaltemp, de.getType(), remotePath, String.valueOf(mode));
-
-// String tempRoot = getDataStoreRoot();
- getDataStoreRoot();
-
- DataElement localElement = ds.createObject(universaltemp, de.getType(), localFile.getAbsolutePath(), encoding);
-
- DataElement bufferSizeElement = ds.createObject(universaltemp, "buffer_size", "" + getBufferDownloadSize(), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- DataElement queryCmd = getCommandDescriptor(de,C_DOWNLOAD_FILE);
-
- ArrayList argList = new ArrayList();
- argList.add(remoteElement);
- argList.add(localElement);
- argList.add(bufferSizeElement);
-
- DataElement subject = ds.createObject(universaltemp, de.getType(), remotePath, String.valueOf(mode));
-
- DataElement status = ds.command(queryCmd, argList, subject);
- if (status == null)
- {
- System.out.println("no download descriptor for "+remoteElement); //$NON-NLS-1$
- }
- try
- {
- DownloadListener dlistener = new DownloadListener(monitor, status, localFile, remotePath, fileLength);
- try
- {
- dlistener.waitForUpdate();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
-
- //getStatusMonitor(ds).waitForUpdate(status, monitor);
- }
- catch (Exception e)
- {
- return false;
- }
-
- // now wait till we have all the bytes local
- long localBytes = localFile.length();
- long lastLocalBytes = 0;
- while (localBytes < fileLength && (monitor == null || !monitor.isCanceled()) && lastLocalBytes != localBytes)
- {
- try
- {
- lastLocalBytes= localBytes;
- Thread.sleep(100);
- localBytes = localFile.length();
-
- }
- catch (Exception e)
- {
- }
- }
-
- List resultList = remoteElement.getNestedData();
- DataElement resultChild = null;
-
- for (int i = 0; i < resultList.size(); i++)
- {
-
- resultChild = (DataElement) resultList.get(i);
-
- if (resultChild.getType().equals(DOWNLOAD_RESULT_SUCCESS_TYPE))
- {
- return true;
- }
- else if (resultChild.getType().equals(DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION))
- {
- localFile.delete();
- SystemMessage msg = getMessage("RSEF1001").makeSubstitution(DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION); //$NON-NLS-1$
- throw new SystemMessageException(msg);
- }
- else if (resultChild.getType().equals(DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION))
- {
- //SystemMessage msg = getMessage();
- //throw new SystemMessageException(msg);
- //UnsupportedEncodingException e = new UnsupportedEncodingException(resultChild.getName());
- //UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error reading file " + remotePath, e);
- //throw new RemoteFileIOException(e);
- }
-
- else if (resultChild.getType().equals(DOWNLOAD_RESULT_IO_EXCEPTION))
- {
- localFile.delete();
- SystemMessage msg = getMessage("RSEF1001").makeSubstitution(DOWNLOAD_RESULT_IO_EXCEPTION); //$NON-NLS-1$
- throw new SystemMessageException(msg);
- //IOException e = new IOException(resultChild.getName());
- //UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error reading file " + remotePath, e);
- //throw new RemoteFileIOException(e);
- }
- }
-
-// DownloadListener dlistener = new DownloadListener(shell, monitor, getConnectorService(), status, localFile, remotePath, (long) universalFile.getLength());
-// try
-// {
-// dlistener.waitForUpdate();
-// }
-// catch (InterruptedException e)
-// {
-// UniversalSystemPlugin.logError(CLASSNAME + " InterruptedException while waiting for command", e);
-// }
-
-// if (!dlistener.isCancelled())
-// {
-//
-// setDataStoreRoot(tempRoot);
-//
-// ArrayList resultList = remoteElement.getNestedData();
-// DataElement resultChild = null;
-//
-// for (int i = 0; i < resultList.size(); i++)
-// {
-//
-// resultChild = (DataElement) resultList.get(i);
-//
-// if (resultChild.getType().equals(DOWNLOAD_RESULT_SUCCESS_TYPE))
-// {
-// return;
-// }
-// else if (resultChild.getType().equals(DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION))
-// {
-// FileNotFoundException e = new FileNotFoundException(resultChild.getName());
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error reading file " + remotePath, e);
-// throw new RemoteFileIOException(e);
-// }
-// else if (resultChild.getType().equals(DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION))
-// {
-// UnsupportedEncodingException e = new UnsupportedEncodingException(resultChild.getName());
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error reading file " + remotePath, e);
-// throw new RemoteFileIOException(e);
-// }
-// else if (resultChild.getType().equals(DOWNLOAD_RESULT_IO_EXCEPTION))
-// {
-// IOException e = new IOException(resultChild.getName());
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error reading file " + remotePath, e);
-// throw new RemoteFileIOException(e);
-// }
-// }
-// }
-// else
-// {
-// throw new RemoteFileCancelledException();
-// }
- if (monitor != null)
- {
- //monitor.done();
- }
- return true;
- }
-
- public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String name)
- {
- DataElement de = null;
- if (name.equals(".") && name.equals(remoteParent)) //$NON-NLS-1$
- {
- de = getElementFor(name);
- }
- else
- {
- StringBuffer buf = new StringBuffer(remoteParent);
- buf.append(getSeparator(remoteParent));
- buf.append(name);
- de = getElementFor(buf.toString());
- }
- dsQueryCommand(monitor, de, C_QUERY_GET_REMOTE_OBJECT);
- return new DStoreHostFile(de);
- }
-
- /**
- * Returns what the next part of the path should be, given the current
- * path as parentPath. Returns different separators based on whether the path
- * appears to be a windows, linux, or virtual path.
- * Pass in null to just get the default separator.
- */
- protected String getSeparator(String parentPath)
- {
- if (parentPath == null || parentPath.length() < 2) return "/"; //$NON-NLS-1$
- if (parentPath.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR))
- return ""; //$NON-NLS-1$
- if (parentPath.endsWith(ArchiveHandlerManager.VIRTUAL_CANONICAL_SEPARATOR))
- return "/"; //$NON-NLS-1$
- if (parentPath.charAt(1) == ':') //Windows path
- if (parentPath.indexOf(ArchiveHandlerManager.VIRTUAL_CANONICAL_SEPARATOR) != -1)
- if (parentPath.endsWith("/")) //$NON-NLS-1$
- return ""; //already ends in separator //$NON-NLS-1$
- else return "/"; //$NON-NLS-1$
- else if (ArchiveHandlerManager.getInstance().isArchive(new File(parentPath)))
- return ArchiveHandlerManager.VIRTUAL_SEPARATOR;
- else
- if (parentPath.endsWith("\\")) //$NON-NLS-1$
- return ""; //already ends in separator //$NON-NLS-1$
- else return "\\"; //$NON-NLS-1$
- else if (parentPath.charAt(0) == '/') //UNIX path
- if (ArchiveHandlerManager.getInstance().isArchive(new File(parentPath)))
- return ArchiveHandlerManager.VIRTUAL_SEPARATOR;
- else
- if (parentPath.endsWith("/")) //$NON-NLS-1$
- return ""; //already ends in separator //$NON-NLS-1$
- else return "/"; //$NON-NLS-1$
- else return "/"; //unrecognized path //$NON-NLS-1$
- }
-
- protected IHostFile convertToHostFile(DataElement element)
- {
- String type = element.getType();
- IHostFile file = null;
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) ||
- type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- file = new DStoreVirtualHostFile(element);
- }
- else
- {
- file = new DStoreHostFile(element);
- }
- String path = file.getAbsolutePath();
- _fileElementMap.put(path, element);
- return file;
- }
-
- protected IHostFile[] convertToHostFiles(DataElement[] elements)
- {
- ArrayList results = new ArrayList();
- for (int i = 0; i < elements.length; i++)
- {
- if (!elements[i].isDeleted())
- results.add(convertToHostFile(elements[i]));
- }
- return (IHostFile[]) results.toArray(new IHostFile[results.size()]);
- }
-
- public IHostFile getUserHome()
- {
- return getFile(null, ".","."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
- {
- String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
- DataElement de = getElementFor(remotePath);
-
-
- DataElement status = dsStatusCommand(monitor, de, C_CREATE_FILE);
-
- if (status == null) return null;
- if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
- return new DStoreHostFile(de);
- else
- {
- throw new SystemMessageException(getMessage("RSEF1302").makeSubstitution(remotePath)); //$NON-NLS-1$
- }
- }
-
- public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException
- {
- String remotePath = remoteParent + getSeparator(remoteParent) + folderName;
- DataElement de = getElementFor(remotePath);
-
- DataElement status = dsStatusCommand(monitor, de, C_CREATE_FOLDER);
-
- if (status == null) return null;
- if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
- return new DStoreHostFile(de);
- else
- {
- throw new SystemMessageException(getMessage("RSEF1304").makeSubstitution(remotePath)); //$NON-NLS-1$
- }
-
- }
-
- public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
- {
- String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
- DataElement de = getElementFor(remotePath);
- DataElement status = dsStatusCommand(monitor, de, C_DELETE);
- if (status == null) return false;
- if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR))
- {
- if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) return true;
- else throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$
- }
- else
- {
- return true;
- }
-
- }
-
- public boolean deleteBatch(IProgressMonitor monitor, String[] remoteParents, String[] fileNames) throws SystemMessageException
- {
- if (remoteParents.length == 1) return delete(monitor, remoteParents[0], fileNames[0]);
-
- ArrayList dataElements = new ArrayList(remoteParents.length);
- for (int i = 0; i < remoteParents.length; i++)
- {
- String remotePath = remoteParents[i] + getSeparator(remoteParents[i]) + fileNames[i];
- DataElement de = getElementFor(remotePath);
- if (de != null) dataElements.add(de);
- }
- DataElement status = dsStatusCommand(monitor, (DataElement) dataElements.get(0), dataElements, C_DELETE_BATCH);
- if (status == null) return false;
- if (FileSystemMessageUtil.getSourceMessage(status).startsWith(IServiceConstants.FAILED))
- throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$
- else return true;
- }
-
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName) throws SystemMessageException
- {
- String remotePath = remoteParent + getSeparator(remoteParent) + oldName;
- DataElement de = getElementFor(remotePath);
- de.setAttribute(DE.A_SOURCE, newName);
-
- DataElement status = dsStatusCommand(monitor, de, C_RENAME);
-
- if (status == null) return false;
- if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
- return true;
- else
- {
- throw new SystemMessageException(getMessage("RSEF1301").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$
- }
- }
-
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException
- {
- boolean retVal = rename(monitor, remoteParent, oldName, newName);
- String newPath = remoteParent + getSeparator(remoteParent) + newName;
- oldFile.renameTo(newPath);
- return retVal;
- }
-
- public boolean move(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException
- {
-// String src = srcParent + getSeparator(srcParent) + srcName;
-// String tgt = tgtParent + getSeparator(tgtParent) + tgtName;
-// boolean isVirtual = ArchiveHandlerManager.isVirtual(src) || ArchiveHandlerManager.isVirtual(tgt);
- //if (isVirtual || isArchive)
- {
- if (copy(monitor, srcParent, srcName, tgtParent, tgtName))
- {
- try
- {
- delete(monitor, srcParent, srcName);
- }
- catch (Exception e)
- {
- return false;
- }
- return true;
- }
- return false;
- }
-
-/*
- // handle special characters in source and target strings
- StringBuffer srcBuf = new StringBuffer(src);
- StringBuffer tgtBuf = new StringBuffer(tgt);
-
- for (int i = 0; i < srcBuf.length(); i++)
- {
- char c = srcBuf.charAt(i);
-
- boolean isSpecialChar = isSpecialChar(c);
-
- if (isSpecialChar)
- {
- srcBuf.insert(i, "\\");
- i++;
- }
- }
-
- for (int i = 0; i < tgtBuf.length(); i++)
- {
- char c = tgtBuf.charAt(i);
-
- boolean isSpecialChar = isSpecialChar(c);
-
- if (isSpecialChar)
- {
- tgtBuf.insert(i, "\\");
- i++;
- }
- }
-
- src = "\"" + srcBuf.toString() + "\"";
- tgt = "\"" + tgtBuf.toString() + "\"";
-
- if (systemType.equals(SYSTEMTYPE_WINDOWS))
- {
- if (sourceFolderOrFile.isDirectory() && sourceFolderOrFile.getAbsolutePath().charAt(0) != targetFolder.getAbsolutePath().charAt(0))
- {
- // special case - move across drives
- command = "xcopy " + src + " " + tgt + " /S /E /K /O /Q /H /I && rmdir /S /Q " + src;
- }
- else
- {
- command = "move " + src + " " + tgt;
- }
- }
- else
- {
- command = "mv " + src + " " + tgt;
- }
-
- UniversalCmdSubSystemImpl cmdSubSystem = getUniversalCmdSubSystem();
- IRemoteFile runFile = sourceFolderOrFile;
-
- if (cmdSubSystem != null)
- {
- try
- {
- done = cmdSubSystem.runRemoteCommand(runFile, command);
- runFile.getParentRemoteFile().markStale(true);
- runFile.markStale(true);
-
- }
- catch (InterruptedException e)
- {
- done = false;
- }
- }
- else
- SystemPlugin.logWarning(CLASSNAME + " cmdSubSystem is null in move");
-
- return done;
- */
-
- }
-
- /**
- * Checks whether the given character is a special character in the shell. A special character is
- * '$', '`', '"' and '\'.
- * @param c the character to check.
- * @return <code>true</code> if the character is a special character, <code>false</code> otherwise.
- */
- protected boolean isSpecialChar(char c) {
-
- if ((c == '$') || (c == '`') || (c == '"') || (c == '\\')) {
- return true;
- }
- else {
- return false;
- }
- }
-
- public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException
- {
- DataStore ds = getDataStore();
- String srcRemotePath = srcParent + getSeparator(srcParent) + srcName;
- DataElement srcDE = getElementFor(srcRemotePath);
-
- DataElement tgtDE = getElementFor(tgtParent);
- if (tgtDE.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- dsQueryCommand(monitor, tgtDE, C_QUERY_GET_REMOTE_OBJECT);
- }
-
- DataElement cpCmd = getCommandDescriptor(tgtDE, C_COPY);
-
- if (cpCmd != null)
- {
- ArrayList args = new ArrayList();
- args.add(srcDE);
- DataElement nameObj = ds.createObject(null, "name", tgtName); //$NON-NLS-1$
- args.add(nameObj);
- DataElement status = ds.command(cpCmd, args, tgtDE, true);
-
-
- try
- {
- getStatusMonitor(ds).waitForUpdate(status, monitor);
-
- if (status.getAttribute(DE.A_SOURCE).equals(FAILED)) {
-
- throw new SystemMessageException(getMessage("RSEF1306").makeSubstitution(srcName)); //$NON-NLS-1$
- /*
- // for an unexpected error, we don't have an error message from the server
- if (errMsg.equals(UNEXPECTED_ERROR)) {
- msg = SystemPlugin.getPluginMessage(MSG_ERROR_UNEXPECTED).getLevelOneText();
- }
- else {
- msg = errMsg;
- }
-
-
- throw new RemoteFileIOException(new Exception(msg));
- /*/
-
- }
- }
- catch (InterruptedException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + " InterruptedException while waiting for command", e);
- }
- return true;
- }
- return false;
- }
-
- public boolean copyBatch(IProgressMonitor monitor, String[] srcParents, String[] srcNames, String tgtParent) throws SystemMessageException
- {
- DataStore ds = getDataStore();
-
- DataElement tgtDE = getElementFor(tgtParent);
- DataElement cpCmd = getCommandDescriptor(tgtDE, C_COPY_BATCH);
-
- if (cpCmd != null)
- {
- ArrayList args = new ArrayList();
- for (int i = 0; i < srcParents.length; i++)
- {
- String srcRemotePath = srcParents[i] + getSeparator(srcParents[i]) + srcNames[i];
- DataElement srcDE = getElementFor(srcRemotePath);
- args.add(srcDE);
- }
- DataElement status = ds.command(cpCmd, args, tgtDE, true);
-
- try
- {
- getStatusMonitor(ds).waitForUpdate(status, monitor);
-
- if (status.getAttribute(DE.A_SOURCE).equals(FAILED)) {
- throw new SystemMessageException(getMessage("RSEF1306").makeSubstitution(srcNames[0])); //$NON-NLS-1$
- }
- }
- catch (InterruptedException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + " InterruptedException while waiting for command", e);
- }
- return true;
- }
- return false;
- }
-
-
-
-
-
- public IHostFile[] getRoots(IProgressMonitor monitor)
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- DataStore ds = getDataStore();
- DataElement universaltemp = getMinerElement();
-
- // create filter descriptor
- DataElement deObj = ds.createObject(universaltemp, UNIVERSAL_FILTER_DESCRIPTOR, "", "", "", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- DataElement[] results = dsQueryCommand(monitor, deObj, C_QUERY_ROOTS);
-
- return convertToHostFiles(results);
- }
-
-
-
-
- public IHostFile[] getFolders(IProgressMonitor monitor, String remoteParent, String fileFilter)
- {
- return fetch(monitor, remoteParent, fileFilter, C_QUERY_VIEW_FOLDERS);
- }
-
- public IHostFile[] getFiles(IProgressMonitor monitor, String remoteParent, String fileFilter)
- {
- return fetch(monitor, remoteParent, fileFilter, C_QUERY_VIEW_FILES);
- }
-
- public IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String remoteParent, String fileFilter)
- {
- return fetch(monitor, remoteParent, fileFilter, C_QUERY_VIEW_ALL);
- }
-
- protected DataElement getElementFor(String path)
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
-
-
- String normalizedPath = PathUtility.normalizeUnknown(path);
- DataElement element = (DataElement)_fileElementMap.get(normalizedPath);
- if (element != null && element.isDeleted())
- {
- _fileElementMap.remove(normalizedPath);
- element = null;
- }
- if (element == null || element.isDeleted())
- {
- DataElement universaltemp = getMinerElement();
- element = getDataStore().createObject(universaltemp, UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, "", false); //$NON-NLS-1$
- }
- return element;
- }
-
- protected IHostFile[] fetch(IProgressMonitor monitor, String remoteParent, String fileFilter, String queryType)
- {
- DataStore ds = getDataStore();
-
-
- // create filter descriptor
- DataElement deObj = getElementFor(remoteParent);
- if (deObj == null)
- {
- DataElement universaltemp = getMinerElement();
- ds.createObject(universaltemp, UNIVERSAL_FILTER_DESCRIPTOR, remoteParent, remoteParent, "", false); //$NON-NLS-1$
- }
-
- DataElement attributes = getAttributes(fileFilter, true);
- ArrayList args = new ArrayList(1);
- args.add(attributes);
-
- DataElement[] results = dsQueryCommand(monitor, deObj, args, queryType);
- return convertToHostFiles(results);
- }
-
- public boolean isCaseSensitive()
- {
- return true;
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreHostFile.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreHostFile.java
deleted file mode 100644
index 9bab37168..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreHostFile.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.files;
-
-import java.io.File;
-
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.files.IHostFile;
-
-public class DStoreHostFile implements IHostFile
-{
- public static final int ATTRIBUTE_MODIFIED_DATE=1;
- public static final int ATTRIBUTE_SIZE = 2;
- public static final int ATTRIBUTE_CLASSIFICATION =11;
- public static final int ATTRIBUTE_IS_HIDDEN=3;
- public static final int ATTRIBUTE_CAN_WRITE=4;
- public static final int ATTRIBUTE_CAN_READ=5;
-
-
- protected DataElement _element;
- protected boolean _isArchive;
-
- public DStoreHostFile(DataElement element)
- {
- _element = element;
- _isArchive = internalIsArchive();
- }
-
- public DataElement getDataElement()
- {
- return _element;
- }
-
- public static String getNameFromPath(String path)
- {
- int lastSlash = path.lastIndexOf('/');
- if (lastSlash == -1) // account for windows
- {
- lastSlash = path.lastIndexOf('\\');
- }
- if (lastSlash > 0 && lastSlash != path.length() - 1)
- {
- return path.substring(lastSlash + 1);
- }
- return path;
- }
-
- public static String getParentPathFromPath(String path)
- {
- int lastSlash = path.lastIndexOf('/');
- if (lastSlash == -1) // acount for windows
- {
- lastSlash = path.lastIndexOf('\\');
- }
- if (lastSlash > 0 && lastSlash != path.length() - 1)
- {
- return path.substring(0, lastSlash);
- }
- return path;
- }
-
- public String getName()
- {
- String type = _element.getType();
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- // filter doesn't separate path from name
- String path = _element.getName();
- return getNameFromPath(path);
- }
- else if (isRoot())
- {
- return _element.getValue();
- }
- else
- {
- String name = _element.getName();
- String parentPath = getParentPath();
- if (name.length() == 0 &&
- (parentPath.equals("/") || parentPath.endsWith(":\\"))) //$NON-NLS-1$ //$NON-NLS-2$
- {
-
- return parentPath;
- }
- if (name.length() == 0)
- {
- String path = _element.getValue();
- int lastSep = path.lastIndexOf('/');
- if (lastSep == -1)
- lastSep = path.lastIndexOf('\\');
- name = path.substring(lastSep + 1);
- return name;
- }
-
- return name;
- }
- }
-
- public String getParentPath()
- {
- String type = _element.getType();
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- // filter doesn't separate path from name
- String path = _element.getName();
- return getParentPathFromPath(path);
- }
- else
- {
- if (_element.getName().length() == 0)
- {
- // derive from value
- String fullPath = _element.getValue();
- int sep = fullPath.lastIndexOf('/');
- if (sep == -1)
- sep = fullPath.lastIndexOf('\\');
-
- if (sep == -1)
- return fullPath;
- return fullPath.substring(0, sep);
- }
- else
- {
- return _element.getValue();
- }
- }
- }
-
- public boolean isHidden()
- {
- String name = getName();
- if (name == null || name.length() == 0)
- {
- return false;
- }
- else
- {
-
- if (name.charAt(0) == '.')
- {
- return true;
- }
- else if (isRoot())
- {
- return false;
- }
- else
- {
- String str = getAttribute(_element.getSource(), ATTRIBUTE_IS_HIDDEN);
- return(str.equals("true")); //$NON-NLS-1$
- }
- }
- }
-
- public boolean isDirectory()
- {
- String type = _element.getType();
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)
- || type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- return true;
- }
- return false;
-
- }
-
- public boolean isRoot()
- {
- String parentPath = _element.getValue();
- String name = _element.getName();
- if (parentPath == null || parentPath.length() == 0 ||
- (name.length() == 0 && (parentPath.equals("/") || parentPath.endsWith(":\\"))) //$NON-NLS-1$ //$NON-NLS-2$
- )
-
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- public boolean isFile()
- {
- String type = _element.getType();
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)
- || type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || type.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
- {
- return true;
- }
- return false;
- }
-
- public boolean exists()
- {
- if (_element.isDeleted())
- return false;
- String type = _element.getType();
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) ||
- type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR) ||
- type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) ||
- type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR) ||
- type.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
-
- public String getAbsolutePath()
- {
- String name = _element.getName();
- if (name.length() == 0)
- {
- return _element.getValue();
- }
- String parentPath = getParentPath();
-
-
- String type = _element.getType();
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- return name;
- }
-
- if (name.length() == 0)
- {
- return PathUtility.normalizeUnknown(parentPath);
- }
- else
- {
- return PathUtility.normalizeUnknown(parentPath + "/" + name); //$NON-NLS-1$
- }
- }
-
- public long getSize()
- {
- return getFileLength(_element.getSource());
- }
-
- public long getModifiedDate()
- {
- return getModifiedDate(_element.getSource());
-
- }
-
- public String getClassification()
- {
- String classification = getClassification(_element.getSource());
- if (classification == null)
- {
- if (isFile())
- {
- classification = "file"; //$NON-NLS-1$
- }
- else
- {
- classification = "directory"; //$NON-NLS-1$
- }
- }
- return classification;
- }
-
- protected static String getClassification(String attributes)
- {
- return getAttribute(attributes, ATTRIBUTE_CLASSIFICATION);
- }
-
- protected static long getFileLength(String attributes)
- {
- String str = getAttribute(attributes, ATTRIBUTE_SIZE);
- return Long.parseLong(str);
- }
-
- protected static long getModifiedDate(String attributes)
- {
- String str = getAttribute(attributes, ATTRIBUTE_MODIFIED_DATE);
- return Long.parseLong(str);
- }
-
- protected static String getAttribute(String attributes, int index)
- {
- String[] str = attributes.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
- if (str.length > index)
- {
- return str[index];
- }
- else
- {
- return null;
- }
- }
-
- public void renameTo(String newAbsolutePath)
- {
- String current = getName();
- if (newAbsolutePath.endsWith(current))
- {
- // data element already updated
- }
- else
- {
- int lastSep = newAbsolutePath.lastIndexOf('/');
- if (lastSep == -1)
- lastSep = newAbsolutePath.lastIndexOf('\\');
-
- String newName = newAbsolutePath.substring(lastSep + 1);
-
- _element.setAttribute(DE.A_NAME, newName);
- }
-
- _isArchive = internalIsArchive();
- }
-
- protected boolean internalIsArchive()
- {
- String path = getAbsolutePath();
- return ArchiveHandlerManager.getInstance().isArchive(new File(path))
- && !ArchiveHandlerManager.isVirtual(path);
- }
-
- public boolean isArchive()
- {
- return _isArchive;
- }
-
- public boolean canRead() {
- String str = getAttribute(_element.getSource(), ATTRIBUTE_CAN_READ);
- return(str.equals("true")); //$NON-NLS-1$
- }
-
- public boolean canWrite() {
- String str = getAttribute(_element.getSource(), ATTRIBUTE_CAN_WRITE);
- return(str.equals("true")); //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreVirtualHostFile.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreVirtualHostFile.java
deleted file mode 100644
index deac51563..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/files/DStoreVirtualHostFile.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.files;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-public class DStoreVirtualHostFile extends DStoreHostFile
-{
-
- public static final int ATTRIBUTE_COMMENT = 6;
- public static final int ATTRIBUTE_COMPRESSEDSIZE = 7;
- public static final int ATTRIBUTE_COMPRESSIONMETHOD = 8;
- public static final int ATTRIBUTE_COMPRESSIONRATIO = 9;
- public static final int ATTRIBUTE_EXPANDEDSIZE = 10;
-
- public DStoreVirtualHostFile(DataElement element)
- {
- super(element);
- }
-
- protected static long getCompressedSize(String attributes)
- {
- String str = getAttribute(attributes, ATTRIBUTE_COMPRESSEDSIZE);
- return Long.parseLong(str);
- }
-
- protected static long getExpandedSize(String attributes)
- {
- String str = getAttribute(attributes, ATTRIBUTE_EXPANDEDSIZE);
- return Long.parseLong(str);
- }
-
- protected static double getCompressionRatio(String attributes)
- {
- String str = getAttribute(attributes, ATTRIBUTE_COMPRESSIONRATIO);
- return Double.parseDouble(str);
- }
-
- public String getComment()
- {
- return getAttribute(_element.getSource(), ATTRIBUTE_COMMENT);
- }
-
- public long getCompressedSize()
- {
- return getCompressedSize(_element.getSource());
- }
-
- public String getCompressionMethod()
- {
- return getAttribute(_element.getSource(), ATTRIBUTE_COMPRESSIONMETHOD);
- }
-
- public double getCompressionRatio()
- {
- return getCompressionRatio(_element.getSource());
- }
-
- public long getExpandedSize()
- {
- return getExpandedSize(_element.getSource());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/processes/DStoreHostProcess.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/processes/DStoreHostProcess.java
deleted file mode 100644
index 20002588b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/processes/DStoreHostProcess.java
+++ /dev/null
@@ -1,519 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.processes;
-
-
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-
-/**
- * This class implements the IRemoteClientProcess interface by wrappering a DataElement
- * and returning process attribute information from the underlying DataElement.
- * It also contains client-specific methods for getting contextual information about
- * the process such as the associated subsystem and connection.
- * @author mjberger
- *
- */
-public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants, IAdaptable, org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants
-{
- public static final boolean ROOT_TRUE = true;
- public static final boolean ROOT_FALSE = false;
-
- protected String _name, _username;
- protected long _pid = -1;
- protected long _ppid = -1;
- protected long _tgid = -1;
- protected long _tracerPid = -1;
- protected long _uid = -1;
- protected long _gid = -1;
-
- protected String _label = null;
- protected String _fullyQualifiedProcess;
-
- protected boolean _isRoot = false;
-
- protected Object _remoteObj;
-
- // master hash map
- protected HashMap _contents = new HashMap();
-
- /* container properties */
- protected boolean _isStale = false;
-
- // properties
- protected HashMap _properties = new HashMap();
- protected HashMap _propertyStates = new HashMap();
-
- /**
- * Constructor that takes a dataElement object containing the process information, and
- * a parent process.
- */
- public DStoreHostProcess(DataElement dataElementObj)
- {
- init(dataElementObj);
- }
-
- protected void init(DataElement dataElementObj)
- {
- setProcess(dataElementObj);
- String name = dataElementObj.getName();
- _fullyQualifiedProcess = "/proc/" + name; //$NON-NLS-1$
-
- // if we already have retrieved file properties
- // set them now
- String s = dataElementObj.getAttribute(DE.A_VALUE);
- if (s != null && s.length() > 0)
- {
- getAttributes(null);
- }
- }
-
- /**
- * The Properties of the process are returned from the miner in a string that can be parsed using
- * the String.split method, with delimiter "|".
- * You can also set all attributes at once with your own string passed as a parameter, as long
- * as the string is in the same format as outlined below (pass in null to use the DataElement's string):
- * <p> The string contains properties of the object in the following order
- * <ul>
- * <li>Process Id (pid) - long
- * <li>Executable name - String
- * <li>Status - char
- * <li>Tgid - long
- * <li>Process Parent id (ppid) - long
- * <li>Tracer pid - long
- * <li>User id (uid) - int
- * <li>Username - String
- * <li>Group id (gid) - int
- * <li>VM Size - long
- * <li>VM RSS - long
- * </ul>
- */
- protected String getAttributes(String newAttributes)
- {
- DataElement deObj = (DataElement) this.getObject();
-
- String s = null;
-
- if (newAttributes == null) s = deObj.getAttribute(DE.A_VALUE);
- else s = newAttributes;
-
- if (s != null && s.length() > 0)
- {
- String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
- int tokens = str.length;
- if (tokens > 1)
- {
- try
- {
- setPid(str[PROCESS_ATTRIBUTES_INDEX_PID]);
-
- setName(str[PROCESS_ATTRIBUTES_INDEX_EXENAME]);
-
- setTgid(str[PROCESS_ATTRIBUTES_INDEX_TGID]);
-
- setPPid(str[PROCESS_ATTRIBUTES_INDEX_PPID]);
-
- if (_ppid == 0) _isRoot = true;
-
- setTracerPid(str[PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
-
- setUid(str[PROCESS_ATTRIBUTES_INDEX_UID]);
-
- setUsername(str[PROCESS_ATTRIBUTES_INDEX_USERNAME]);
-
- setGid(str[PROCESS_ATTRIBUTES_INDEX_GID]);
-
- setLabel(str[PROCESS_ATTRIBUTES_INDEX_EXENAME]);
- }
- catch (ArrayIndexOutOfBoundsException e)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.getAttributes(). Attributes = " + s);
- }
- }
- }
- return s;
- }
-
- /**
- * Set the DataElement for this object
- */
- public void setProcess(Object dataElementObj)
- {
- _remoteObj = dataElementObj;
- }
-
- /**
- * Returns the DataElement for this object
- */
- public Object getObject()
- {
- return _remoteObj;
- }
-
- public String getAbsolutePath()
- {
- return _fullyQualifiedProcess;
- }
-
- public String getLabel()
- {
- return _label;
- }
-
- public long getPid()
- {
- return _pid;
- }
-
- public String getName()
- {
- return _name;
- }
-
- public String getState()
- {
- String state = getSubAttribute(PROCESS_ATTRIBUTES_INDEX_STATUS);
- if (state == null)
- {
- //SystemPlugin.logError("Error in UniversalProcessImpl.getAttributes(): status of process " + getPid() + " is not given.");
- return " "; //$NON-NLS-1$
- }
- else return state;
- }
-
- public long getTgid()
- {
- return _tgid;
- }
-
- public long getTracerPid()
- {
- return _tracerPid;
- }
-
- public long getUid()
- {
- return _uid;
- }
-
- public String getUsername()
- {
- return _username;
- }
-
- public long getGid()
- {
- return _gid;
- }
-
- protected void setAbsolutePath(String path)
- {
- _fullyQualifiedProcess = path;
- }
-
- protected void setGid(long gid)
- {
- _gid = gid;
- }
-
- protected void setGid(String newGid)
- {
- try
- {
- _gid = Long.parseLong(newGid);
- }
- catch (NumberFormatException e)
- {
- //SystemPlugin.logError("Error in UniversalProcessImpl.setGid: Could not parse gid into integer.");
- _gid = -1;
- }
- }
-
- public void setLabel(String newLabel)
- {
- _label = newLabel;
- }
-
- protected void setName(String exeName)
- {
- _name = exeName;
- }
-
- protected void setPid(long newPid)
- {
- _pid = newPid;
- }
-
- protected void setPid(String newPid)
- {
- try
- {
- _pid = Long.parseLong(newPid);
- }
- catch (NumberFormatException e)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.setPid: Could not parse pid into integer.");
- _pid = -1;
- }
- }
-
- protected void setState(String newState)
- {
- setSubAttribute(PROCESS_ATTRIBUTES_INDEX_STATUS, newState);
- }
-
- protected void setTgid(long tgid)
- {
- _tgid = tgid;
- }
-
- protected void setTgid(String newTgid)
- {
- try
- {
- _tgid = Long.parseLong(newTgid);
- }
- catch (NumberFormatException e)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.setTgid: Could not parse tgid into integer.");
- _tgid = -1;
- }
- }
-
- protected void setTracerPid(long tracerPid)
- {
- _tracerPid = tracerPid;
- }
-
- protected void setTracerPid(String newTracerPid)
- {
- try
- {
- _tracerPid = Long.parseLong(newTracerPid);
- }
- catch (NumberFormatException e)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.setTracerPid: Could not parse tracerpid into integer.");
- _tracerPid = -1;
- }
- }
-
- protected void setUid(long uid)
- {
- _uid = uid;
- }
-
- protected void setUid(String newUid)
- {
- try
- {
- _uid = Long.parseLong(newUid);
- }
- catch (NumberFormatException e)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.setUid: Could not parse uid into integer.");
- _uid = -1;
- }
- }
-
- protected void setUsername(String username)
- {
- _username = username;
- }
-
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- public long getPPid()
- {
- return _ppid;
- }
-
- protected void setPPid(long newPPid)
- {
- _ppid = newPPid;
- }
-
- protected void setPPid(String newPPid)
- {
- try
- {
- _ppid = Long.parseLong(newPPid);
- }
- catch (NumberFormatException e)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.setPPid: Could not parse ppid into integer.");
- _ppid = -1;
- }
- }
-
- public boolean isRoot()
- {
- return _isRoot;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcess#getAllProperties()
- */
- public String getAllProperties()
- {
- return getAttributes(null);
- }
-
- /**
- * @param allProperties
- */
- protected void setAllProperties(String allProperties)
- {
- getAttributes(allProperties);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcess#getVmSizeInKB()
- */
- public long getVmSizeInKB()
- {
- String sizeStr = getSubAttribute(PROCESS_ATTRIBUTES_INDEX_VMSIZE);
- if (sizeStr == null) return 0;
- long vmsize = 0;
- try
- {
- vmsize = Long.parseLong(sizeStr);
- }
- catch (NumberFormatException e)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.getVMSizeInKB: Could not parse VM Size into integer.");
- return 0;
- }
- return vmsize;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcess#getVmRSSInKB()
- */
- public long getVmRSSInKB()
- {
- String sizeStr = getSubAttribute(PROCESS_ATTRIBUTES_INDEX_VMRSS);
- if (sizeStr == null) return 0;
- long vmrss = 0;
- try
- {
- vmrss = Long.parseLong(sizeStr);
- }
- catch (NumberFormatException e)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.getVMRSSInKB: Could not parse VM RSS into integer.");
- return 0;
- }
- return vmrss;
- }
-
-
- /**
- * @param size the size to set
- */
- protected void setVmSizeInKB(long size)
- {
- String sizeStr = ""; //$NON-NLS-1$
- sizeStr = sizeStr + size;
- setSubAttribute(PROCESS_ATTRIBUTES_INDEX_VMSIZE, sizeStr);
- }
-
- /**
- * @param size the size to set
- */
- protected void setVmRSSInKB(long size)
- {
- String sizeStr = ""; //$NON-NLS-1$
- sizeStr = sizeStr + size;
- setSubAttribute(PROCESS_ATTRIBUTES_INDEX_VMRSS, sizeStr);
- }
-
- /**
- * Returns a subattribute of the A_VALUE of this process's associated
- * data element.
- * @param attIndex the index of the desired subattribute
- * @return a string containing that attribute, or null if that attribute
- * is not specified, if the dataelement does not exist, or if the attIndex
- * is out of bounds.
- */
- protected String getSubAttribute(int attIndex)
- {
- DataElement deObj = (DataElement) this.getObject();
- if (deObj == null) return null;
-
- String s = deObj.getAttribute(DE.A_VALUE);
-
- if (s != null && s.length() > 0)
- {
- String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
- if (attIndex >= str.length) return null;
- if (str[attIndex] == null || str[attIndex].equals("")) return null; //$NON-NLS-1$
- else return str[attIndex];
- }
- else return null;
- }
-
- /**
- * Helper method for setting any attributes of the underlying DataElement.
- * @param attIndex
- * @param newSubAttribute
- */
- protected void setSubAttribute(int attIndex, String newSubAttribute)
- {
- DataElement deObj = (DataElement) this.getObject();
- if (deObj == null)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.setSubAttribute: Could not access dataelement.");
- return;
- }
- String s = deObj.getAttribute(DE.A_VALUE);
-
- if (s != null && s.length() > 0)
- {
- String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
- if (attIndex >= str.length)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.setSubAttribute: Attribute index out of bounds.");
- return;
- }
- s = ""; //$NON-NLS-1$
- str[attIndex] = newSubAttribute;
- for (int i = 0; i < str.length; i++)
- {
- if (i == str.length - 1) s = s + str[i];
- else s = s + str[i] + TOKEN_SEPARATOR;
- }
- deObj.setAttribute(DE.A_VALUE, s);
- DataStore ds = deObj.getDataStore();
- ds.refresh(deObj);
- }
- else
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.setSubAttribute: Dataelement did not contain an attribute string.");
- return;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/processes/DStoreProcessService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/processes/DStoreProcessService.java
deleted file mode 100644
index 0d91d3f21..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/processes/DStoreProcessService.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.processes;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.IDataStoreProvider;
-import org.eclipse.rse.dstore.universal.miners.processes.IUniversalProcessDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.processes.UniversalProcessMiner;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-import org.eclipse.rse.services.dstore.ServiceResources;
-import org.eclipse.rse.services.dstore.util.DStoreStatusMonitor;
-import org.eclipse.rse.services.processes.AbstractProcessService;
-import org.eclipse.rse.services.processes.IProcessService;
-
-
-public class DStoreProcessService extends AbstractProcessService implements IProcessService, IUniversalProcessDataStoreConstants, ISystemProcessRemoteConstants
-{
- protected IDataStoreProvider _provider;
- protected DataElement _minerElement = null;
- protected DStoreStatusMonitor _statusMonitor;
- protected DataElement _procMinerStatus;
- protected String[] _statusTypes;
- protected String _userName;
-
- public DStoreProcessService(IDataStoreProvider provider)
- {
- _provider = provider;
- }
-
- public String getName()
- {
- return ServiceResources.DStore_Process_Service_Label;
- }
-
- public String getDescription()
- {
- return ServiceResources.DStore_Process_Service_Description;
- }
-
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor, IHostProcessFilter filter) throws SystemMessageException
- {
- if (!isInitialized())
- {
- waitForInitialize(monitor);
- }
- IHostProcess[] processes = null;
-
- DataStore ds = getDataStore();
- DataElement universaltemp = getMinerElement();
-
- // create filter descriptor
- DataElement deObj;
- deObj = ds.find(universaltemp, DE.A_NAME, UNIVERSAL_PROCESS_ROOT, 1);
- if (deObj == null) deObj = ds.createObject(universaltemp, UNIVERSAL_PROCESS_FILTER, UNIVERSAL_PROCESS_ROOT, "", "", false); //$NON-NLS-1$ //$NON-NLS-2$
- deObj.setAttribute(DE.A_SOURCE, filter.toString());
-
- // query
- DataElement queryCmd = ds.localDescriptorQuery(deObj.getDescriptor(), C_PROCESS_FILTER_QUERY_ALL);
-
- if (queryCmd != null)
- {
- DataElement status = ds.command(queryCmd, deObj, true);
-
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- try
- {
- smon.waitForUpdate(status);
- }
- catch (InterruptedException e)
- {
- throw new SystemMessageException(getMessage("RSEG1067")); //$NON-NLS-1$
- }
- // get results
- List nested = deObj.getNestedData();
- if (nested != null)
- {
- Object[] results = nested.toArray();
-
- String message = status.getAttribute(DE.A_VALUE);
- if (!message.equals(PROCESS_MINER_SUCCESS))
- {
- throw new SystemMessageException(getMessage("RSEPG1301")); //$NON-NLS-1$
- }
-
- // convert objects to remote files
- String userName = getRemoteUserName();
- if (userName != null && filter.getUsername().equals("${user.id}")) //$NON-NLS-1$
- filter.setUsername(getRemoteUserName());
- processes = convertObjsToHostProcesses(filter, results);
- }
- }
- else
- {
- //SystemPlugin.logWarning(CLASSNAME + " queryCmd is null in listRoots");
- }
-
- return processes;
- }
-
- /**
- * Helper method to convert DataElement objects to IRemoteClientProcess objects.
- */
- protected IHostProcess[] convertObjsToHostProcesses(IHostProcessFilter processFilter, Object[] objs)
- {
- if (objs == null)
- return null;
-
- ArrayList list = new ArrayList(objs.length);
-
- for (int idx = 0; idx < objs.length; idx++)
- {
- DataElement de = (DataElement) objs[idx];
- if (!de.isDeleted())
- {
- if (processFilter == null || processFilter.allows(de.getValue()))
- {
- DStoreHostProcess newProcess = new DStoreHostProcess(de);
- list.add(newProcess);
- }
- }
- }
-
- IHostProcess[] processes = new IHostProcess[list.size()];
-
- for (int idx = 0; idx < list.size(); idx++)
- {
- processes[idx] = (IHostProcess) list.get(idx);
- }
-
- return processes;
- }
-
- /**
- * Helper method to return the DataStore object needed by comm layer.
- */
- protected DataStore getDataStore()
- {
- return _provider.getDataStore();
- }
-
- protected DataElement getMinerElement()
- {
-
- if (_minerElement == null || _minerElement.getDataStore() != getDataStore())
- {
- _minerElement = getDataStore()
- .findMinerInformation(
- "org.eclipse.rse.dstore.universal.miners.processes.UniversalProcessMiner"); //$NON-NLS-1$
- }
- return _minerElement;
- }
-
- public DStoreStatusMonitor getStatusMonitor(DataStore dataStore)
- {
- if (_statusMonitor == null || _statusMonitor.getDataStore() != dataStore)
- {
- _statusMonitor = new DStoreStatusMonitor(dataStore);
- }
- return _statusMonitor;
- }
-
- public boolean kill(IProgressMonitor monitor, long PID, String signal) throws SystemMessageException
- {
- try
- {
- DataStore ds = getDataStore();
-
- // run kill command on host
- DStoreHostProcess process = (DStoreHostProcess) getProcess(monitor, PID);
-
- // if there is no process, simply return true
- if (process == null) {
- return true;
- }
-
- DataElement deObj = (DataElement) process.getObject();
- DataElement killCmd = ds.localDescriptorQuery(deObj.getDescriptor(), C_PROCESS_KILL);
- deObj.setAttribute(DE.A_SOURCE, signal);
-
- if (killCmd != null)
- {
- DataElement status = ds.command(killCmd, deObj, true);
-
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- smon.waitForUpdate(status);
-
- // get results
- String message = status.getAttribute(DE.A_VALUE);
- if (message.equals(PROCESS_MINER_SUCCESS)) return true;
- else
- {
- SystemMessage msg = getMessage("RSEPG1300"); //$NON-NLS-1$
- msg.makeSubstitution(process.getName() + " (" + process.getPid() + ")", message); //$NON-NLS-1$ //$NON-NLS-2$
- throw new SystemMessageException(msg);
- }
- }
- else
- {
- // SystemPlugin.logWarning(CLASSNAME + " queryCmd is null in listRoots");
- }
- }
- catch (InterruptedException e)
- {
- throw new SystemMessageException(getMessage("RSEG1067")); //$NON-NLS-1$
- }
- return false;
- }
-
- public String[] getSignalTypes()
- {
- if (_statusTypes != null)
- {
- return _statusTypes;
- }
- else
- {
- _statusTypes = internalGetSignalTypes();
- }
- return _statusTypes;
- }
-
- /**
- * Returns a list of the types of signals that can be sent to
- * a process on the remote system.
- * @return the signal types, or null if there are none, or they cannot be found.
- */
- private String[] internalGetSignalTypes()
- {
- try
- {
- DataElement sigTypesElement = getSignalTypesMinerElement();
- String sigTypesOutput = sigTypesElement.getValue();
- String[] lines = sigTypesOutput.trim().split("\\s+"); //$NON-NLS-1$
- if (lines == null) throw new Exception();
- return lines;
- }
- catch (Exception e)
- {
- // SystemPlugin.logError("UniversalProcessSubSystemImpl.getSignalTypes() 'kill -l' command failed.", e);
- return null;
- }
- }
-
- protected DataElement getSignalTypesMinerElement()
- {
- return getDataStore().find(_minerElement, DE.A_NAME, "universal.killinfo"); //$NON-NLS-1$
- }
-
- public void initService(IProgressMonitor monitor)
- {
- initMiner(monitor);
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- _minerElement = null;
- _procMinerStatus = null;
- }
-
- public boolean isInitialized()
- {
- if (_procMinerStatus != null)
- {
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- return smon.determineStatusDone(_procMinerStatus);
- }
- return false;
- }
-
- protected void waitForInitialize(IProgressMonitor monitor)
- {
- if (_procMinerStatus!= null)
- {
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- try
- {
- smon.waitForUpdate(_procMinerStatus, monitor);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- getMinerElement();
- }
- }
-
- protected void initMiner(IProgressMonitor monitor)
- {
- DataElement fsElement = getMinerElement();
- if (fsElement == null)
- {
- if (getServerVersion() >= 8)
- {
- String minerId = getMinerId();
- String message = SystemMessage.sub(ServiceResources.DStore_Service_ProgMon_Initializing_Message, "&1", minerId); //$NON-NLS-1$
- monitor.beginTask(message, IProgressMonitor.UNKNOWN);
- DataStore ds = getDataStore();
- if (_minerElement == null || _minerElement.getDataStore() != ds)
- {
- if (ds != null)
- {
- _procMinerStatus = ds.activateMiner(minerId);
-
- }
- }
- }
- }
- monitor.done();
- }
-
- /**
- * Get the username used to connect to the remote machine
- */
- public String getRemoteUserName()
- {
- if (_userName == null)
- {
- DataStore ds = getDataStore();
-
- DataElement encodingElement = ds.createObject(null, UNIVERSAL_PROCESS_TEMP, ""); //$NON-NLS-1$
-
- DataElement queryCmd = ds.localDescriptorQuery(encodingElement.getDescriptor(), C_PROCESS_QUERY_USERNAME);
- DStoreStatusMonitor monitor = getStatusMonitor(ds);
- DataElement status = ds.command(queryCmd, encodingElement, true);
- try
- {
- monitor.waitForUpdate(status);
- }
- catch (Exception e)
- {
- }
-
- _userName = encodingElement.getValue();
- }
- return _userName;
- }
-
- protected String getMinerId()
- {
- return UniversalProcessMiner.MINER_ID;
- }
-
- public int getServerVersion()
- {
- return getDataStore().getServerVersion();
- }
-
- public int getServerMinor()
- {
- return getDataStore().getServerMinor();
- }
-
- protected String getProcessMinerId()
- {
- return UniversalProcessMiner.MINER_ID;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/rmtservice/DStoreRemoteServiceService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/rmtservice/DStoreRemoteServiceService.java
deleted file mode 100644
index 868e0e1fe..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/rmtservice/DStoreRemoteServiceService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.rmtservice;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-import org.eclipse.dstore.core.model.IDataStoreProvider;
-import org.eclipse.rse.services.clientserver.messages.ISystemMessageProvider;
-import org.eclipse.rse.services.dstore.AbstractDStoreService;
-
-public class DStoreRemoteServiceService extends AbstractDStoreService
-{
-
- public DStoreRemoteServiceService(IDataStoreProvider dataStoreProvider, ISystemMessageProvider msgProvider)
- {
- super(dataStoreProvider, msgProvider);
- }
-
- protected String getMinerId()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void runRemoteService(IRemoteClassInstance serviceClass)
- {
- getDataStore().runRemoteClassInstance(serviceClass);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/search/DStoreSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/search/DStoreSearchResultConfiguration.java
deleted file mode 100644
index 92c91573b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/search/DStoreSearchResultConfiguration.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.search;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.search.AbstractSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-
-public abstract class DStoreSearchResultConfiguration extends AbstractSearchResultConfiguration implements IDomainListener
-{
- protected DataElement _status;
- public DStoreSearchResultConfiguration(IHostSearchResultSet set, Object searchObject, SystemSearchString searchString, ISearchService searchService)
- {
- super(set, searchObject, searchString, searchService);
- }
-
- public void setStatusObject(DataElement status)
- {
- _status = status;
- // don't need this anymore
- //_status.getDataStore().getDomainNotifier().addDomainListener(this);
- }
-
- public DataElement getStatusObject()
- {
- return _status;
- }
-
- public boolean listeningTo(DomainEvent e)
- {
- return e.getParent() == _status;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/search/DStoreSearchService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/search/DStoreSearchService.java
deleted file mode 100644
index cd0784057..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/search/DStoreSearchService.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.search;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.dstore.core.model.IDataStoreProvider;
-import org.eclipse.rse.dstore.universal.miners.filesystem.UniversalFileSystemMiner;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.clientserver.messages.ISystemMessageProvider;
-import org.eclipse.rse.services.dstore.AbstractDStoreService;
-import org.eclipse.rse.services.dstore.ServiceResources;
-import org.eclipse.rse.services.dstore.files.DStoreHostFile;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.search.IHostSearchConstants;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.ISearchService;
-
-
-
-public class DStoreSearchService extends AbstractDStoreService implements ISearchService
-{
- public DStoreSearchService(IDataStoreProvider provider, ISystemMessageProvider msgProvider)
- {
- super(provider, msgProvider);
- }
-
- public String getName()
- {
- return ServiceResources.DStore_Search_Service_Label;
- }
-
- protected String getMinerId()
- {
- return UniversalFileSystemMiner.MINER_ID;
- }
-
- public void search(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService)
- {
- DStoreHostFile searchTarget = (DStoreHostFile) searchConfig.getSearchTarget();
-
- SystemSearchString searchString = searchConfig.getSearchString();
- String textString = searchString.getTextString();
- boolean isCaseSensitive = searchString.isCaseSensitive();
- boolean isTextRegex = searchString.isTextStringRegex();
- String fileNamesString = searchString.getFileNamesString();
- boolean isFileNamesRegex = searchString.isFileNamesRegex();
- boolean includeArchives = searchString.isIncludeArchives();
- boolean includeSubfolders = searchString.isIncludeSubfolders();
- String classificationString = searchString.getClassificationString();
-
-
- DataElement deObj = searchTarget.getDataElement();
- DataStore ds = getDataStore();
-
- DataElement queryCmd = ds.localDescriptorQuery(deObj.getDescriptor(), "C_SEARCH"); //$NON-NLS-1$
-
- if (queryCmd != null)
- {
- ArrayList argList = setSearchAttributes(textString, isCaseSensitive, isTextRegex, fileNamesString, isFileNamesRegex, includeArchives, includeSubfolders, classificationString, true);
-
- DataElement status = ds.command(queryCmd, argList, deObj);
- DStoreSearchResultConfiguration config = (DStoreSearchResultConfiguration) searchConfig;
- config.setStatusObject(status);
-
- try
- {
- getStatusMonitor(ds).waitForUpdate(status, monitor);
- config.setStatus(IHostSearchConstants.FINISHED);
- }
- catch (Exception e)
- {
- config.setStatus(IHostSearchConstants.CANCELLED);
- }
- }
- }
-
- private ArrayList setSearchAttributes(
- String textString,
- boolean isCaseSensitive,
- boolean isTextRegex,
- String fileNamesString,
- boolean isFileNamesRegex,
- boolean includeArchives,
- boolean includeSubfolders,
- String classificationString,
- boolean showHidden)
- {
-
- DataStore ds = getDataStore();
- DataElement universaltemp = getMinerElement();
-
- // create the argument data elements
- DataElement arg1 = ds.createObject(universaltemp, textString, String.valueOf(isCaseSensitive), String.valueOf(isTextRegex));
- DataElement arg2 = ds.createObject(universaltemp, fileNamesString, String.valueOf(isFileNamesRegex), classificationString);
- DataElement arg3 = ds.createObject(universaltemp, String.valueOf(includeArchives), String.valueOf(includeSubfolders), String.valueOf(showHidden));
-
- // add the arguments to the argument list
- ArrayList argList = new ArrayList();
- argList.add(arg1);
- argList.add(arg2);
- argList.add(arg3);
-
- return argList;
- }
-
- public void cancelSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig)
- {
- DStoreSearchResultConfiguration config = (DStoreSearchResultConfiguration) searchConfig;
- DataElement status = config.getStatusObject();
-
- if (status != null)
- {
- DataElement command = status.getParent();
- DataStore dataStore = command.getDataStore();
- DataElement cmdDescriptor = command.getDescriptor();
- DataElement cancelDescriptor = dataStore.localDescriptorQuery(cmdDescriptor, "C_CANCEL"); //$NON-NLS-1$
-
- if (cancelDescriptor != null)
- {
- dataStore.command(cancelDescriptor, command);
- }
- }
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreHostOutput.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreHostOutput.java
deleted file mode 100644
index e369f6639..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreHostOutput.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed the initial implementation:
- * David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.shells;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.services.shells.IHostOutput;
-
-public class DStoreHostOutput implements IHostOutput
-{
-
- private DataElement _element;
-
- public DStoreHostOutput(DataElement element)
- {
- _element = element;
- }
-
- public String getString()
- {
- return _element.getName();
- }
-
- public DataElement getElement()
- {
- return _element;
- }
-
- public String toString()
- {
- return getString();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreHostShell.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreHostShell.java
deleted file mode 100644
index 553fafaec..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreHostShell.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.shells;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.rse.internal.services.dstore.shell.DStoreShellOutputReader;
-import org.eclipse.rse.internal.services.dstore.shell.DStoreShellThread;
-import org.eclipse.rse.services.dstore.util.DStoreStatusMonitor;
-import org.eclipse.rse.services.shells.AbstractHostShell;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellOutputReader;
-
-
-public class DStoreHostShell extends AbstractHostShell implements IHostShell
-{
- private DStoreShellThread _shellThread;
- private IHostShellOutputReader _stdoutHandler;
- private IHostShellOutputReader _stderrHandler;
- private DataElement _status;
- private DStoreStatusMonitor _statusMonitor;
-
- public DStoreHostShell(DStoreStatusMonitor statusMonitor, DataStore dataStore, String initialWorkingDirectory, String invocation, String encoding, String[] environment)
- {
- _shellThread = new DStoreShellThread(dataStore, initialWorkingDirectory, invocation, encoding, environment);
- _status = _shellThread.getStatus();
- _stdoutHandler = new DStoreShellOutputReader(this, _status, false);
- _stderrHandler = new DStoreShellOutputReader(this, _status,true);
- _statusMonitor = statusMonitor;
- }
-
- public boolean isActive()
- {
- return !_statusMonitor.determineStatusDone(_status);
- }
-
- public void writeToShell(String command)
- {
- _shellThread.writeToShell(command);
- }
-
- public IHostShellOutputReader getStandardOutputReader()
- {
- return _stdoutHandler;
- }
-
- public IHostShellOutputReader getStandardErrorReader()
- {
- return _stderrHandler;
- }
-
- public void exit()
- {
- writeToShell("exit"); //$NON-NLS-1$
- _stdoutHandler.finish();
- _stderrHandler.finish();
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreShellService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreShellService.java
deleted file mode 100644
index 70538dae0..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/shells/DStoreShellService.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.shells;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.IDataStoreProvider;
-import org.eclipse.rse.dstore.universal.miners.command.CommandMiner;
-import org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner;
-import org.eclipse.rse.services.clientserver.messages.ISystemMessageProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.dstore.AbstractDStoreService;
-import org.eclipse.rse.services.dstore.ServiceResources;
-import org.eclipse.rse.services.dstore.util.DStoreStatusMonitor;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-
-
-public class DStoreShellService extends AbstractDStoreService implements IShellService
-{
- protected String[] _envVars;
- protected DataElement _envMinerElement;
- protected DataElement _envMinerStatus;
-
- public DStoreShellService(IDataStoreProvider dataStoreProvider, ISystemMessageProvider msgProvider)
- {
- super(dataStoreProvider, msgProvider);
- }
-
-
- public String getName()
- {
- return ServiceResources.DStore_Shell_Service_Label;
- }
-
- public String getDescription()
- {
- return ServiceResources.DStore_Shell_Service_Description;
- }
-
-
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String[] environment)
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- return launchShell(monitor, initialWorkingDirectory, null, environment);
- }
-
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String encoding, String[] environment)
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- return new DStoreHostShell(getStatusMonitor(getDataStore()), getDataStore(), initialWorkingDirectory, ">", encoding, environment); //$NON-NLS-1$
- }
-
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command,
- String[] environment)
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- return runCommand(monitor, initialWorkingDirectory, command, null, environment);
- }
-
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command,
- String encoding, String[] environment)
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- return new DStoreHostShell(getStatusMonitor(getDataStore()), getDataStore(), initialWorkingDirectory, command, encoding, environment);
- }
-
- public String[] getHostEnvironment()
- {
- if (_envVars == null || _envVars.length == 0)
- {
- List envVars = new ArrayList();
- DataStore ds = getDataStore();
- DataElement envMinerData = ds.findMinerInformation(getEnvSystemMinerId());
- if (envMinerData != null)
- {
- DataElement systemEnvironment = ds.find(envMinerData, DE.A_NAME, "System Environment", 1); //$NON-NLS-1$
- if (systemEnvironment != null && systemEnvironment.getNestedSize() > 0)
- {
- for (int i = 0; i < systemEnvironment.getNestedSize(); i++)
- {
- DataElement var = systemEnvironment.get(i);
- envVars.add(var.getValue());
- }
- }
- }
- _envVars = (String[])envVars.toArray(new String[envVars.size()]);
- }
- return _envVars;
- }
-
- protected String getMinerId()
- {
- return CommandMiner.MINER_ID;
- }
-
- protected String getEnvSystemMinerId()
- {
- return EnvironmentMiner.MINER_ID;
- }
-
-
- public boolean isInitialized()
- {
- if (_initializeStatus != null)
- {
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- return smon.determineStatusDone(_initializeStatus);
- }
- return false;
- }
-
- protected void waitForInitialize(IProgressMonitor monitor)
- {
- if (_envMinerStatus!= null)
- {
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- try
- {
- smon.waitForUpdate(_envMinerStatus, monitor);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- getMinerElement(getEnvSystemMinerId());
- }
- super.waitForInitialize(monitor);
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- super.uninitService(monitor);
-
- }
-
- protected void initMiner(IProgressMonitor monitor)
- {
- // init env miner first
-
- if (getServerVersion() >= 8)
- {
- String minerId = getEnvSystemMinerId();
- String message = SystemMessage.sub(ServiceResources.DStore_Service_ProgMon_Initializing_Message, "&1", minerId); //$NON-NLS-1$
- monitor.beginTask(message, IProgressMonitor.UNKNOWN);
- DataStore ds = getDataStore();
- if (_envMinerElement == null || _envMinerElement.getDataStore() != ds)
- {
- if (ds != null)
- {
- _envMinerStatus = ds.activateMiner(minerId);
- /*
- DStoreStatusMonitor smon = getStatusMonitor(ds);
- try
- {
- smon.waitForUpdate(status, monitor, 50);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
-
- getMinerElement(getEnvSystemMinerId());
- */
-
-
- }
- }
- super.initMiner(monitor);
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreFileTransferStatusListener.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreFileTransferStatusListener.java
deleted file mode 100644
index 8afb7cc1f..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreFileTransferStatusListener.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.util;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.DataStoreSchema;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author mjberger
- *
- * copyright 2003 IBM Corp.
- */
-public class DStoreFileTransferStatusListener extends StatusChangeListener
-{
-
- protected String _remotePath;
- protected DataElement _log;
- protected DataElement _statusElement;
-
- public DStoreFileTransferStatusListener(String remotePath, Shell shell, IProgressMonitor monitor, DataStore ds, DataElement uploadLog) throws Exception
- {
- super(shell, monitor);
- _remotePath = remotePath.replace('\\', '/');
-
- _log = uploadLog;
- if (_log == null)
- {
- throw new Exception("Could not find log in DataStore."); //$NON-NLS-1$
- }
- setStatus(findOrCreateUploadStatus(ds));
- }
-
- protected DataElement findOrCreateUploadStatus(DataStore ds)
- {
- DataElement result = ds.find(_log, DE.A_NAME, _remotePath,1);
-
- // first upload, this will always ben null
- // but also need to handle case where it's been uploaded before in the sessoin (i.e. for reseting values)
- if (result == null)
- {
- result = _log.getDataStore().createObject(_log, "uploadstatus", _remotePath); //$NON-NLS-1$
- result.setAttribute(DE.A_SOURCE, "running"); //$NON-NLS-1$
- result.setAttribute(DE.A_VALUE, ""); //$NON-NLS-1$
-
- DataElement cmd = ds.findCommandDescriptor(DataStoreSchema.C_SET);
-
-// DataElement setstatus = ds.command(cmd, _log, true);
- ds.command(cmd, _log, true);
- /*
- try
- {
- StatusMonitorFactory.getInstance().getStatusMonitorFor(system, ds).waitForUpdate(setstatus);
- }
- catch (Exception e)
- {
- }
- */
- // DKM: no need for this - turns out the problem was that we need to send the LOG not the result -
- // since the server needs to know the parent!
- //ds.waitUntil(setstatus, "done");
-
- }
- else
- {
-
- result.setAttribute(DE.A_SOURCE, "running"); //$NON-NLS-1$
- result.setAttribute(DE.A_VALUE, ""); //$NON-NLS-1$
- }
- _statusElement = result;
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.dstore.util.StatusChangeListener#determineStatusDone()
- */
- protected boolean determineStatusDone()
- {
- return getStatus().getAttribute(DE.A_SOURCE).equals(IServiceConstants.SUCCESS) || getStatus().getAttribute(DE.A_SOURCE).equals(IServiceConstants.FAILED);
-
- }
-
- public boolean uploadHasFailed()
- {
- return getStatus().getAttribute(DE.A_SOURCE).equals(IServiceConstants.FAILED);
- }
-
- public String getErrorMessage()
- {
- return getStatus().getAttribute(DE.A_VALUE);
- }
-
- public String getRemotePath()
- {
- return _remotePath;
- }
-
- public void setRemotePath(String remotePath)
- {
- _remotePath = remotePath;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java
deleted file mode 100644
index 9576c4250..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java
+++ /dev/null
@@ -1,402 +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.services.dstore.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-import org.eclipse.dstore.extra.internal.extra.IDomainNotifier;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-
-/*
- * This utility class can be used to monitor the status of one more more status DataElements.
- * Only one instanceof of this class is required per DataStore for use in monitoring statuses.
- * This is intended to be used in place of StatusChangeListeners
- *
- * * <p>
- * The following is one example of the use of the StatusMonitor. The code:
- * <blockquote><pre>
- * DataElement status = dataStore.command(dsCmd, args, deObj);
- *
- * StatusMonitor smon = StatusMonitorFactory.getInstance().getStatusMonitorFor(getSystem(), ds);
- * smon.waitForUpdate(status, monitor);
- * </pre></blockquote>
- */
-public class DStoreStatusMonitor implements IDomainListener
-{
-
- protected Shell _shell;
-
- protected boolean _networkDown = false;
-
- protected List _workingStatuses;
- protected List _cancelledStatuses;
- protected List _doneStatuses;
-
- protected DataStore _dataStore;
-
- protected class FindShell implements Runnable
- {
- private Shell shell;
-
- /**
- * @see Runnable#run()
- */
- public void run()
- {
- Display display = Display.getCurrent();
- if (display != null)
- {
- try {
- Shell[] shells = Display.getCurrent().getShells();
- for (int loop = 0; loop < shells.length && shell == null; loop++) {
- if (shells[loop].isEnabled()) {
- shell = shells[loop];
- }
- }
- } catch (Exception e) {
- }
- }
- }
- }
-
- /**
- * Construct a StatusChangeListener
- *
- * @param dataStore the dataStore associated with this monitor
- */
- public DStoreStatusMonitor(DataStore dataStore)
- {
- _dataStore = dataStore;
- reInit();
- }
-
-
-
- public void reInit()
- {
- _networkDown = false;
- _workingStatuses = new ArrayList();
- _doneStatuses = new ArrayList();
- _cancelledStatuses = new ArrayList();
- if (_dataStore != null)
- {
- IDomainNotifier notifier = _dataStore.getDomainNotifier();
- if (notifier != null)
- {
- notifier.addDomainListener(this);
- }}
- }
-
- public DataStore getDataStore()
- {
- return _dataStore;
- }
-
- public void dispose()
- {
- _workingStatuses.clear();
- _doneStatuses.clear();
- _cancelledStatuses.clear();
- _dataStore.getDomainNotifier().removeDomainListener(this);
- }
-
- /**
- * @see IDomainListener#listeningTo(DomainEvent)
- */
- public boolean listeningTo(DomainEvent event)
- {
- if (_workingStatuses.size() == 0)
- {
- return true;
- }
-
- DataElement parent = (DataElement)event.getParent();
- if (_workingStatuses.contains(parent))
- {
- return determineStatusDone(parent);
- }
-
- return false;
- }
-
-
-
- /**
- * @see IDomainListener#domainChanged(DomainEvent)
- */
- public void domainChanged(DomainEvent event)
- {
- if (_workingStatuses.size() == 0)
- {
- return;
- }
-
- DataElement parent = (DataElement)event.getParent();
- if (_workingStatuses.contains(parent))
- {
- boolean isStatusDone = determineStatusDone(parent);
- if (isStatusDone)
- {
- setDone(parent);
- notifyUpdate();
- }
- }
- }
-
-
- /**
- * Determines whether the status is done.
- * @return <code>true</code> if status done, <code>false</code> otherwise.
- */
- public boolean determineStatusDone(DataElement status)
- {
- return status.getAttribute(DE.A_VALUE).equals("done") || status.getAttribute(DE.A_NAME).equals("done"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @return true if the the monitor is passive. In this case it is false.
- */
- public boolean isPassiveCommunicationsListener()
- {
- return false;
- }
-
- /**
- * setDone(boolean)
- */
- public synchronized void setDone(DataElement status)
- {
- _workingStatuses.remove(status);
- _doneStatuses.add(status);
- }
-
-
- public synchronized void setCancelled(DataElement status)
- {
- _workingStatuses.remove(status);
- _cancelledStatuses.add(status);
- }
-
- public synchronized void setWorking(DataElement status)
- {
- _workingStatuses.add(status);
- }
-
-
- public boolean wasCancelled(DataElement status)
- {
- if (_cancelledStatuses.contains(status))
- {
- return true;
- }
- return false;
- }
-
- /**
- * @see IDomainListener#getShell()
- */
- public Shell getShell()
- {
- // dy: DomainNotifier (which calls this method) requires the shell not be disposed
- //if (shell == null) {
- if (_shell == null || _shell.isDisposed())
- {
- FindShell findShell = new FindShell();
- Display.getDefault().syncExec(findShell);
- _shell = findShell.shell;
- }
- return _shell;
- }
-
-
-
- /**
- * Test if the StatusChangeListener returned because the network connection to the
- * remote system was broken.
- */
- public boolean isNetworkDown()
- {
- return _networkDown;
- }
-
- public DataElement waitForUpdate(DataElement status) throws InterruptedException
- {
- return waitForUpdate(status, null, 0);
- }
-
- public DataElement waitForUpdate(DataElement status, IProgressMonitor monitor) throws InterruptedException
- {
- return waitForUpdate(status, monitor, 0);
- }
-
- public DataElement waitForUpdate(DataElement status, int wait) throws InterruptedException
- {
- return waitForUpdate(status, null, wait);
- }
-
- public synchronized DataElement waitForUpdate(DataElement status, IProgressMonitor monitor, int wait) throws InterruptedException
- {
- if (_networkDown && status.getDataStore().isConnected())
- {
- reInit();
- }
- if (determineStatusDone(status))
- {
- setDone(status);
- return status;
- }
-
- setWorking(status);
-
- Display display = Display.getCurrent();
-
-
- // Prevent infinite looping by introducing a threshold for wait
- int WaitThreshold = 600; //default. sleep(100ms) for 600 times
- if ( wait > 0 )
- WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
- else if ( wait == -1 ) // force a diagnostic
- WaitThreshold = -1;
-
-
- if (display != null)
- {
- // Current thread is UI thread
- while (_workingStatuses.contains(status))
- {
- /*
- while (display.readAndDispatch()) {
- //Process everything on event queue
- }
-
- if ((monitor != null) && (monitor.isCanceled()))
- {
- setCancelled(status);
- throw new InterruptedException();
- }
- */
-
- boolean statusDone = determineStatusDone(status);
-
- if (statusDone)
- {
- setDone(status);
- }
- else
- {
- waitForUpdate();
- //Thread.sleep(100);
-
- if (WaitThreshold > 0) // update timer count if
- // threshold not reached
- --WaitThreshold; // decrement the timer count
-
- if (WaitThreshold == 0)
- {
- // no diagnostic factory but there is a timeout
- return status; // returning the undone status object
- }
- else if (_networkDown)
- {
- dispose();
- throw new InterruptedException();
- }
- }
- }
-
- }
- else
- {
- // Current thread is not UI thread
- while (_workingStatuses.contains(status))
- {
- boolean statusDone = determineStatusDone(status);
- if (statusDone)
- {
- setDone(status);
- }
- else
- {
- if ((monitor != null) && (monitor.isCanceled()))
- {
- setCancelled(status);
- throw new InterruptedException();
- }
-
- waitForUpdate();
- //Thread.sleep(200);
-
- if (WaitThreshold > 0) // update timer count if
- // threshold not reached
- --WaitThreshold; // decrement the timer count
-
- if (WaitThreshold == 0)
- {
- // no diagnostic factory but there is a timeout
- return status; // returning the undone status object
- }
- else if (_networkDown)
- {
- dispose();
- throw new InterruptedException();
- }
- }
- }
- }
-
-
- return status;
- }
-
-
- /**
- * Causes the current thread to wait until this class request has been
- * fulfilled.
- */
- public synchronized void waitForUpdate()
- {
- try
- {
- wait(200);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- return;
- }
- }
-
- /**
- * Causes all threads waiting for this class request to be filled
- * to wake up.
- */
- public synchronized void notifyUpdate()
- {
- notifyAll();
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java
deleted file mode 100644
index ea7a79c99..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.util;
-
-
-
-import java.io.File;
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.dstore.ServiceResources;
-import org.eclipse.swt.widgets.Display;
-
-public class DownloadListener implements IDomainListener,IUniversalDataStoreConstants
-{
-
- private DataElement _status;
- private IProgressMonitor _monitor;
- private DataStore _dataStore;
- private File _localFile;
- private Display _display;
-
- private boolean _networkDown = false;
- private boolean _isDone = false;
- private boolean _isCancelled = false;
- private long _totalBytesNotified = 0;
- private long _totalLength;
-
- private static String _percentMsg = SystemMessage.sub(SystemMessage.sub(SystemMessage.sub(ServiceResources.DStore_Service_Percent_Complete_Message, "&0", "{0}"), "&1", "{1}"), "&2", "{2}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
-
- public DownloadListener(IProgressMonitor monitor, DataElement status, File localFile, String remotePath, long totalLength)
- {
- _monitor = monitor;
- _status = status;
- _totalLength = totalLength;
- _display = Display.getCurrent();
-
- if (_status == null)
- {
- System.out.println("Status is null!"); //$NON-NLS-1$
- }
-
- _dataStore = _status.getDataStore();
- _dataStore.getDomainNotifier().addDomainListener(this);
-
- _localFile = localFile;
-
- if (monitor != null)
- {
- /* DKM - DO WE NEED THIS?!!
- while (_display!=null && _display.readAndDispatch()) {
- //Process everything on event queue
- }
- */
- }
- if (_status.getValue().equals("done")) //$NON-NLS-1$
- {
- updateDownloadState();
- setDone(true);
- }
-
- }
- public boolean isCancelled()
- {
- return _isCancelled;
- }
-
- public DataElement getStatus()
- {
- return _status;
- }
-
- /**
- * @see IDomainListener#listeningTo(DomainEvent)
- */
- public boolean listeningTo(DomainEvent event)
- {
- if (_status == null)
- {
- return false;
- }
-
- if (_status == event.getParent())
- {
- return true;
- }
-
- return false;
- }
-
- /**
- * @see IDomainListener#domainChanged(DomainEvent)
- */
- public void domainChanged(DomainEvent event)
- {
- if (_status.getValue().equals("done")) //$NON-NLS-1$
- {
- if (_status == event.getParent())
- {
- setDone(true);
- }
- }
- else
- {
- updateDownloadState();
- }
- }
-
- private void updateDownloadState()
- {
-
- if (_monitor != null)
- {
- long currentLength = _localFile.length();
- long delta = currentLength - _totalBytesNotified;
- if (delta > 0)
- {
- //System.out.println(_status.getAttribute(DE.A_SOURCE));
- _monitor.worked((int)delta);
-
- try
- {
- long percent = (currentLength * 100) / _totalLength;
-
-
- StringBuffer current = new StringBuffer();
- current.append(currentLength /KB_IN_BYTES);
- current.append(" KB"); //$NON-NLS-1$
-
- StringBuffer total = new StringBuffer();
- total.append(_totalLength / KB_IN_BYTES);
- total.append(" KB"); //$NON-NLS-1$
-
- StringBuffer percentBuf = new StringBuffer();
- percentBuf.append(percent);
- percentBuf.append("%"); //$NON-NLS-1$
-
- String str = MessageFormat.format(_percentMsg, new Object[] {current, total, percentBuf});
-
- _monitor.subTask(str);
-
- /* DKM - DO WE NEED THIS?!!
- while (_display != null && _display.readAndDispatch()) {
- //Process everything on event queue
- }
- */
- }
- catch (Exception e)
- {
- }
- _totalBytesNotified = currentLength;
- }
- }
-
- if (!_status.getDataStore().getStatus().getName().equals("okay")) //$NON-NLS-1$
- {
- _networkDown = true;
- }
- }
-
- /**
- * setDone(boolean)
- */
- public void setDone(boolean done)
- {
- this._isDone = done;
- if (done)
- {
- updateDownloadState();
- _status.getDataStore().getDomainNotifier().removeDomainListener(this);
-
- }
- }
-
-
-
- /**
- *
- */
- public boolean wasCancelled()
- {
- return _isCancelled;
- }
-
-
-
- /**
- * Wait for the the status DataElement to be refreshed
- *
- * @param
- * ICommunicationsDiagnosticFactory factory : for creating system specific diagnostic class instance
- * Int wait : threshold for starting diagnostic. Default is 60 seconds; a zero means to use the default.
- * -1 means to force a timeout; mainly for testing purpose.
- *
- * @return The status DataElement after it has been updated, or the user
- * has pressed cancel
- *
- * @throws InterruptedException if the thread was interrupted.
- */
- public DataElement waitForUpdate() throws InterruptedException
- {
- return waitForUpdate(0); //No diagnostic
- }
-
-
- public DataElement waitForUpdate(int wait) throws InterruptedException
- {
- Display display = _display;
-
- if (wait > 0)
- {
- }
- else if (wait == -1)
- {
- }
-
-
-
- if (display != null)
- {
-
- // Current thread is UI thread
- while (!_isDone && !_isCancelled && !_networkDown)
- {
- while (display.readAndDispatch()) {
- //Process everything on event queue
- }
-
- if ((_monitor != null) && (_monitor.isCanceled()))
- {
- // cancel remote request
- cancelDownload();
- _isCancelled = true;
- setDone(true);
- }
- else if (_networkDown)
- {
- _isCancelled = true;
- setDone(true);
- throw new InterruptedException();
- }
-
- if (getStatus().getAttribute(DE.A_NAME).equals("done")) //$NON-NLS-1$
- {
- setDone(true);
- }
- else
- {
- Thread.sleep(100);
- updateDownloadState();
- }
- }
-
- }
- else
- {
- // Current thread is not UI thread
- while (!_isDone && !_isCancelled && !_networkDown)
- {
- if ((_monitor != null) && (_monitor.isCanceled()))
- {
- cancelDownload();
- _isCancelled = true;
- setDone(true);
- }
- else if (_networkDown)
- {
- _isCancelled = true;
- setDone(true);
- throw new InterruptedException();
- }
- if (getStatus().getAttribute(DE.A_NAME).equals("done")) //$NON-NLS-1$
- {
- setDone(true);
- }
- else
- {
- Thread.sleep(100);
- updateDownloadState();
- }
- }
- }
- return _status;
- }
-
- public void cancelDownload()
- {
- DataElement status = _status;
- if (status != null)
- {
- DataElement command = status.getParent();
- DataStore dataStore = command.getDataStore();
- DataElement cmdDescriptor = command.getDescriptor();
- DataElement cancelDescriptor = dataStore.localDescriptorQuery(cmdDescriptor, "C_CANCEL"); //$NON-NLS-1$
- if (cancelDescriptor != null)
- {
- dataStore.command(cancelDescriptor, command);
- }
- _localFile.delete();
- }
- if (_monitor != null)
- {
- _monitor.done();
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/FileSystemMessageUtil.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/FileSystemMessageUtil.java
deleted file mode 100644
index c7f036f0a..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/FileSystemMessageUtil.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.services.dstore.util;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-public class FileSystemMessageUtil
-{
-
- /**
- * Returns the source message (first part of the source attribute) for this element.
- *
- * @return the source message
- */
- public static String getSourceMessage(DataElement element)
- {
- String source = element.getSource();
- if (source == null) return null;
- if (source.equals("")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
- int sepIndex = source.indexOf("|"); //$NON-NLS-1$
- if (sepIndex == -1) return source;
- else return source.substring(0, sepIndex);
- }
-
- /**
- * Returns the source location (second part of the source attribute) for this element.
- *
- * @return the source location
- */
- public static String getSourceLocation(DataElement element)
- {
- String source = element.getSource();
- if (source == null) return null;
- if (source.equals("")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
- int sepIndex = source.indexOf("|"); //$NON-NLS-1$
- if (sepIndex == -1) return ""; //$NON-NLS-1$
- else return source.substring(sepIndex+1);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/StatusChangeListener.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/StatusChangeListener.java
deleted file mode 100644
index 03313728e..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/StatusChangeListener.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.dstore.util;
-
-
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/*
- * Utility class for determining when a DataStore command is complete via the status.
- */
-public class StatusChangeListener implements IDomainListener
-{
-
- protected DataElement target;
- protected Shell shell;
- protected IProgressMonitor monitor;
-
- protected boolean _networkDown = false;
- protected boolean done = false;
- protected boolean cancelled = false;
-
- protected Vector historyOfTargets;
-
- protected static class FindShell implements Runnable {
- private Shell shell;
-
- /**
- * @see Runnable#run()
- */
- public void run() {
- try {
- Shell[] shells = Display.getCurrent().getShells();
- for (int loop = 0; loop < shells.length && shell == null; loop++) {
- if (shells[loop].isEnabled()) {
- shell = shells[loop];
- }
- }
- } catch (Exception e) {
- }
- }
- }
-
-
- /**
- * Construct a StatusChangeListener
- *
- * @param shell A valid Shell object
- *
- * @param monitor A progress monitor if you want this object to check if
- * the user presses cancel while waiting for the status object
- * to be updated
- *
- * @param target The status DataElement for which you wish to wait for an update
- */
- public StatusChangeListener(Shell shell, IProgressMonitor monitor, DataElement target) {
- this.shell = shell;
- this.monitor = monitor;
- this.target = target;
- historyOfTargets = new Vector();
- }
-
-
- public StatusChangeListener(Shell shell, IProgressMonitor monitor) {
- this(shell, monitor, null);
- }
-
-
-// public StatusChangeListener(Shell shell, DataElement target) {
-// this(shell, null, target);
-// }
-
-
- /**
- *
- */
- public void setStatus(DataElement p_target)
- {
- this.target = p_target;
-
- for (int i = 0; i < historyOfTargets.size(); i++)
- {
- if (target == historyOfTargets.elementAt(i))
- {
- setDone( true );
- historyOfTargets.clear();
- return;
- }
- }
-
- historyOfTargets.clear();
- }
-
- /**
- *
- */
- public DataElement getStatus()
- {
- return target;
- }
-
- /**
- * @see IDomainListener#listeningTo(DomainEvent)
- */
- public boolean listeningTo(DomainEvent event) {
- if (target == null)
- {
- return true;
- }
-
- if (target == event.getParent()) {
- return true;
- }
-
- return false;
- }
-
-
- /**
- * @see IDomainListener#domainChanged(DomainEvent)
- */
- public void domainChanged(DomainEvent event) {
- if (target == null)
- {
- if (historyOfTargets.size() < 1000)
- {
- historyOfTargets.addElement(event.getParent());
- }
- }
-
- if (target == event.getParent())
- {
- boolean isStatusDone = determineStatusDone();
-
- if (isStatusDone)
- {
- setDone( true );
- }
- }
- }
-
-
- /**
- * setDone(boolean)
- */
- public void setDone(boolean done)
- {
- this.done = done;
- }
-
- public Shell getShell() {
- // dy: DomainNotifier (which calls this method) requires the shell not be disposed
- //if (shell == null) {
- if (shell == null || shell.isDisposed())
- {
- FindShell findShell = new FindShell();
- Display.getDefault().syncExec(findShell);
- shell = findShell.shell;
- }
- return shell;
- }
-
- /**
- *
- */
- public boolean wasCancelled() {
- return cancelled;
- }
-
-
-
-
- /**
- * Wait for the the status DataElement to be refreshed
- *
- * @param
- * ICommunicationsDiagnosticFactory factory : for creating system specific diagnostic class instance
- * Int wait : threshold for starting diagnostic. Default is 60 seconds; a zero means to use the default.
- * -1 means to force a timeout; mainly for testing purpose.
- *
- * @return The status DataElement after it has been updated, or the user
- * has pressed cancel
- *
- * @throws InterruptedException if the thread was interrupted.
- */
- public DataElement waitForUpdate() throws InterruptedException
- {
- return waitForUpdate( 0); //No diagnostic
- }
-
-
- public DataElement waitForUpdate(int wait) throws InterruptedException
- {
- boolean statusDone = determineStatusDone();
- if (statusDone)
- {
- setDone(true);
- }
- else
- {
- Display display = Display.getCurrent();
-
- if ( wait > 0 )
- {
- }
- else if ( wait == -1 )
- {
- }
-
-
- if (display != null) {
- if (shell == null || shell.isDisposed()) {
- shell = Display.getDefault().getActiveShell();
- }
- // Current thread is UI thread
- while (!done && !cancelled) {
- while (display.readAndDispatch()) {
- //Process everything on event queue
- }
-
- if ((monitor != null) && (monitor.isCanceled())) {
- cancelled = true;
- target.getDataStore().getDomainNotifier().removeDomainListener(this);
- throw new InterruptedException();
- }
-
- statusDone = determineStatusDone();
-
- if (statusDone)
- {
- setDone(true);
- }
- else
- {
- Thread.sleep(100);
- if (_networkDown)
- {
- target.getDataStore().getDomainNotifier().removeDomainListener(this);
- throw new InterruptedException();
- }
- }
- }
-
- } else {
- // Current thread is not UI thread
- while (!done && !cancelled)
- {
-
- if ((monitor != null) && (monitor.isCanceled()))
- {
- cancelled = true;
- target.getDataStore().getDomainNotifier().removeDomainListener(this);
- throw new InterruptedException();
- }
-
- statusDone = determineStatusDone();
-
- if (statusDone)
- {
- setDone(true);
- }
- else {
- Thread.sleep(100);
-
- if (_networkDown)
- {
- target.getDataStore().getDomainNotifier().removeDomainListener(this);
- throw new InterruptedException();
- }
- }
- }
- }
- }
-
- // Reset done so we can detect the next event if waitForUpdate
- // is called again
- done = false;
-
- return target;
- }
-
- /**
- * Determines whether the status is done.
- * @return <code>true</code> if status done, <code>false</code> otherwise.
- */
- protected boolean determineStatusDone() {
- return getStatus().getAttribute(DE.A_VALUE).equals("done") || getStatus().getAttribute(DE.A_NAME).equals("done"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener() {
- return false;
- }
-
-
- /**
- * Test if the StatusChangeListener returned because the network connection to the
- * remote system was broken.
- */
- public boolean isNetworkDown() {
- return _networkDown;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/.classpath b/rse/plugins/org.eclipse.rse.services.files.ftp/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/.cvsignore b/rse/plugins/org.eclipse.rse.services.files.ftp/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/.project b/rse/plugins/org.eclipse.rse.services.files.ftp/.project
deleted file mode 100644
index 88dc1254c..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.services.files.ftp</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/.settings/org.eclipse.core.resources.prefs b/rse/plugins/org.eclipse.rse.services.files.ftp/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.services.files.ftp/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.services.files.ftp/META-INF/MANIFEST.MF
deleted file mode 100644
index 6b9a208b4..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.services.files.ftp
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.rse.services.files.ftp.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.apache.commons.net
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.services.files.ftp
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/about.html b/rse/plugins/org.eclipse.rse.services.files.ftp/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/about.ini b/rse/plugins/org.eclipse.rse.services.files.ftp/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/about.mappings b/rse/plugins/org.eclipse.rse.services.files.ftp/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/about.properties b/rse/plugins/org.eclipse.rse.services.files.ftp/about.properties
deleted file mode 100644
index 5f337cd40..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/about.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer FTP Services\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation, Symbian Software Ltd. and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm\n\
-\n\
-This product includes software developed by the\n\
-Apache Software Foundation http://www.apache.org/
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/build.properties b/rse/plugins/org.eclipse.rse.services.files.ftp/build.properties
deleted file mode 100644
index a6bcdbf40..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- about.properties,\
- plugin.properties,\
- .,\
- about.ini,\
- about.mappings,\
- eclipse32.png
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/eclipse32.png b/rse/plugins/org.eclipse.rse.services.files.ftp/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/plugin.properties b/rse/plugins/org.eclipse.rse.services.files.ftp/plugin.properties
deleted file mode 100644
index 891595027..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE FTP Services
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/Activator.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/Activator.java
deleted file mode 100644
index 3c1edefb0..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/Activator.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.files.ftp;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends Plugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPHostFile.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPHostFile.java
deleted file mode 100644
index 8e00d758a..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPHostFile.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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:
- * Michael Berger (IBM) - Fixing 140408 - FTP upload does not work
- * Javier Montalvo Orús (Symbian) - Migrate to jakarta commons net FTP client
- * Javier Montalvo Orus (Symbian) - Fixing 161211 - Cannot expand /pub folder as
- * anonymous on ftp.wacom.com
- * Javier Montalvo Orus (Symbian) - Fixing 161238 - [ftp] connections to VMS servers are not usable
- ********************************************************************************/
-
-package org.eclipse.rse.services.files.ftp;
-
-
-import java.io.File;
-
-import org.apache.commons.net.ftp.FTPClientConfig;
-import org.apache.commons.net.ftp.FTPFile;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.files.IHostFile;
-
-public class FTPHostFile implements IHostFile
-{
-
- private String _name;
- private String _parentPath;
- private boolean _isDirectory;
- private boolean _isArchive;
- private long _lastModified;
- private long _size;
- private boolean _canRead = true;
- private boolean _canWrite = true;
- private boolean _isRoot;
- private boolean _exists;
-
- public FTPHostFile(String parentPath, String name, boolean isDirectory, boolean isRoot, long lastModified, long size, boolean exists)
- {
- _parentPath = parentPath;
- _name = name;
- _isDirectory = isDirectory;
- _lastModified = lastModified;
- _size = size;
- _isArchive = internalIsArchive();
- _canRead = true;
- _canWrite = false;
- _isRoot = isRoot;
- _exists = exists;
- }
-
- public FTPHostFile(String parentPath, FTPFile ftpFile, String systemName)
- {
- _parentPath = parentPath;
-
- if(systemName.equals(FTPClientConfig.SYST_VMS))
- {
- _name = ftpFile.getName();
- if(_name.indexOf(".DIR")!=-1) //$NON-NLS-1$
- {
- _name = _name.substring(0,_name.indexOf(".DIR")); //$NON-NLS-1$
- }
- else
- {
- _name = _name.substring(0,_name.indexOf(";")); //$NON-NLS-1$
- }
- }
- else
- {
- _name = ftpFile.getName();
- }
-
- _isDirectory = ftpFile.isDirectory();
- _lastModified = ftpFile.getTimestamp().getTimeInMillis();
- _size = ftpFile.getSize();
- _isArchive = internalIsArchive();
-
- //In Windows r/w is not listed
- //In VMS it is not implemented in the Jakarta parser
- if(!systemName.equals(FTPClientConfig.SYST_NT) && !systemName.equals(FTPClientConfig.SYST_VMS))
- {
- _canRead = ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION);
- _canWrite = ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.WRITE_PERMISSION);
- }
-
- _isRoot = false;
- _exists = true;
- }
-
- public long getSize()
- {
- return _size;
- }
-
- public boolean isDirectory()
- {
- return _isDirectory;
- }
-
- public boolean isFile()
- {
- return !(_isDirectory || _isRoot);
- }
-
- public String getName()
- {
- return _name;
- }
-
- public boolean canRead() {
- return _canRead;
- }
-
- public boolean canWrite() {
- return _canWrite;
- }
-
- public boolean exists() {
- return _exists;
- }
-
- public String getAbsolutePath()
- {
- if (isRoot() || _parentPath==null) {
- return getName();
- } else {
- StringBuffer path = new StringBuffer(getParentPath());
- if (!_parentPath.endsWith("/") && !_parentPath.endsWith("\\"))//$NON-NLS-1$ //$NON-NLS-2$
- {
- path.append('/');
- }
- path.append(getName());
- return path.toString();
- }
-
- }
-
- public long getModifiedDate()
- {
- return _lastModified;
- }
-
- public String geParentPath() {
- return _parentPath;
- }
-
- public boolean isArchive() {
- return _isArchive;
- }
-
- public boolean isHidden() {
- return false;
- }
-
- public boolean isRoot() {
- return _isRoot;
-
- }
-
- public String getParentPath() {
- return _parentPath;
- }
-
- public void renameTo(String newAbsolutePath)
- {
- int i = newAbsolutePath.lastIndexOf("/"); //$NON-NLS-1$
- if (i == -1)
- {
- _name = newAbsolutePath;
- }
- else
- {
- _parentPath = newAbsolutePath.substring(0, i);
- _name = newAbsolutePath.substring(i+1);
- }
-
- _isArchive = internalIsArchive();
- }
-
- protected boolean internalIsArchive()
- {
- return ArchiveHandlerManager.getInstance().isArchive(new File(getAbsolutePath()))
- && !ArchiveHandlerManager.isVirtual(getAbsolutePath());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPService.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPService.java
deleted file mode 100644
index 7b2a78e36..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPService.java
+++ /dev/null
@@ -1,983 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Michael Berger (IBM) - Fixing 140408 - FTP upload does not work
- * Javier Montalvo Orus (Symbian) - Fixing 140323 - provided implementation for delete, move and rename.
- * Javier Montalvo Orus (Symbian) - Bug 140348 - FTP did not use port number
- * Michael Berger (IBM) - Fixing 140404 - FTP new file creation does not work
- * Javier Montalvo Orus (Symbian) - Migrate to jakarta commons net FTP client
- * Javier Montalvo Orus (Symbian) - Fixing 161211 - Cannot expand /pub folder as anonymous on ftp.wacom.com
- * Javier Montalvo Orus (Symbian) - Fixing 161238 - [ftp] expand "My Home" node on ftp.ibiblio.org as anonymous fails
- * Javier Montalvo Orus (Symbian) - Fixing 160922 - create folder/file fails for FTP service
- * David Dykstal (IBM) - Fixing 162511 - FTP file service does not process filter strings correctly
- * Javier Montalvo Orus (Symbian) - Fixing 162511 - FTP file service does not process filter strings correctly
- * Javier Montalvo Orus (Symbian) - Fixing 162782 - File filter does not display correct result in RC3
- * Javier Montalvo Orus (Symbian) - Fixing 162878 - New file and new folder dialogs don't work in FTP in a folder with subfolders
- * Javier Montalvo Orus (Symbian) - Fixing 162585 - [FTP] fetch children cannot be canceled
- * Javier Montalvo Orus (Symbian) - Fixing 161209 - Need a Log of ftp commands
- * Javier Montalvo Orus (Symbian) - Fixing 163264 - FTP Only can not delete first subfolder
- * Michael Scharf (Wind River) - Fix 164223 - Wrong call for setting binary transfer mode
- * Martin Oberhuber (Wind River) - Add Javadoc for getFTPClient(), modify move() to use single connected session
- * Javier Montalvo Orus (Symbian) - Fixing 164009 - FTP connection shows as connected when login fails
- * Javier Montalvo Orus (Symbian) - Fixing 164306 - [ftp] FTP console shows plaintext passwords
- * Javier Montalvo Orus (Symbian) - Fixing 161238 - [ftp] connections to VMS servers are not usable
- * Javier Montalvo Orus (Symbian) - Fixing 164304 - [ftp] cannot connect to wftpd server on Windows
- * Javier Montalvo Orus (Symbian) - Fixing 165471 - [ftp] On wftpd-2.0, "." and ".." directory entries should be hidden
- * Javier Montalvo Orus (Symbian) - Fixing 165476 - [ftp] On warftpd-1.65 in MSDOS mode, cannot expand drives
- * Javier Montalvo Orus (Symbian) - Fixing 168120 - [ftp] root filter resolves to home dir
- ********************************************************************************/
-
-package org.eclipse.rse.services.files.ftp;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.net.ftp.FTP;
-import org.apache.commons.net.ftp.FTPClient;
-import org.apache.commons.net.ftp.FTPClientConfig;
-import org.apache.commons.net.ftp.FTPFile;
-import org.apache.commons.net.ftp.FTPReply;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.services.clientserver.FileTypeMatcher;
-import org.eclipse.rse.services.clientserver.IMatcher;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.AbstractFileService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.RemoteFileCancelledException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
-
-
-public class FTPService extends AbstractFileService implements IFileService, IFTPService
-{
- private FTPClient _ftpClient;
- private FTPFile[] _ftpFiles;
-
- private String _systemName;
- private String _userHome;
- private transient String _hostName;
- private transient String _userId;
- private transient String _password;
- private transient int _portNumber;
-
- private OutputStream _ftpLoggingOutputStream;
-
- private Exception _exception;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.IService#getName()
- */
- public String getName()
- {
- return FTPServiceResources.FTP_File_Service_Name;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.IService#getDescription()
- */
- public String getDescription()
- {
- return FTPServiceResources.FTP_File_Service_Description;
- }
-
- public void setHostName(String hostname)
- {
- _hostName = hostname;
- }
-
- public void setPortNumber(int portNumber) {
- _portNumber = portNumber;
- }
-
- public void setUserId(String userId)
- {
- _userId = userId;
- }
-
- public void setPassword(String password)
- {
- _password = password;
- }
-
- public void setLoggingStream(OutputStream ftpLoggingOutputStream)
- {
- _ftpLoggingOutputStream = ftpLoggingOutputStream;
- }
-
- public void connect() throws Exception
- {
- if (_ftpClient == null)
- {
- _ftpClient = new FTPClient();
-
- }
-
- if(_ftpLoggingOutputStream!=null)
- {
- _ftpClient.registerSpyStream(_ftpLoggingOutputStream);
- }
-
- if (_portNumber == 0) {
- _ftpClient.connect(_hostName);
- } else {
- _ftpClient.connect(_hostName, _portNumber);
- }
-
- int userReply = _ftpClient.user(_userId);
-
- if(FTPReply.isPositiveIntermediate(userReply))
- {
- //intermediate response, provide password and hide it from the console
-
- String newLine = System.getProperty("line.separator"); //$NON-NLS-1$
-
- _ftpClient.registerSpyStream(null);
-
- _ftpLoggingOutputStream.write(("PASS ******"+newLine).getBytes()); //$NON-NLS-1$
- int passReply = _ftpClient.pass(_password);
- _ftpLoggingOutputStream.write((_ftpClient.getReplyString()+newLine).getBytes());
-
- if(_ftpLoggingOutputStream!=null)
- {
- _ftpClient.registerSpyStream(_ftpLoggingOutputStream);
- }
-
- if(!FTPReply.isPositiveCompletion(passReply))
- {
- String lastMessage = _ftpClient.getReplyString();
- disconnect();
- throw new Exception(lastMessage);
- }
- }
- else if(!FTPReply.isPositiveCompletion(userReply))
- {
- String lastMessage = _ftpClient.getReplyString();
- disconnect();
- throw new Exception(lastMessage);
- }
-
- //SYSTEM PARSER
-
- FTPClientConfig ftpClientConfig;
-
- _systemName = _ftpClient.getSystemName().toUpperCase();
- if(_systemName.indexOf(' ')!=-1)
- {
- _systemName = _systemName.substring(0,_systemName.indexOf(' '));
- }
-
- //FTPClientConfig.SYST_NT = "WINDOWS"
- if(_systemName.startsWith(FTPClientConfig.SYST_NT))
- {
- _systemName = FTPClientConfig.SYST_NT;
- ftpClientConfig = new FTPClientConfig(FTPClientConfig.SYST_NT);
- }else
- //FTPClientConfig.SYST_MVS = "MVS"
- if(_systemName.startsWith(FTPClientConfig.SYST_MVS))
- {
- _systemName = FTPClientConfig.SYST_MVS;
- ftpClientConfig = new FTPClientConfig(FTPClientConfig.SYST_MVS);
- }else
- //FTPClientConfig.SYST_OS2 = "OS/2"
- if(_systemName.startsWith(FTPClientConfig.SYST_OS2))
- {
- _systemName = FTPClientConfig.SYST_OS2;
- ftpClientConfig = new FTPClientConfig(FTPClientConfig.SYST_OS2);
- }else
- //FTPClientConfig.SYST_OS400 = "OS/400"
- if(_systemName.startsWith(FTPClientConfig.SYST_OS400))
- {
- _systemName = FTPClientConfig.SYST_OS400;
- ftpClientConfig = new FTPClientConfig(FTPClientConfig.SYST_OS400);
- }else
- //FTPClientConfig.SYST_VMS = "VMS"
- if(_systemName.startsWith(FTPClientConfig.SYST_VMS))
- {
- _systemName = FTPClientConfig.SYST_VMS;
- ftpClientConfig = new FTPClientConfig(FTPClientConfig.SYST_VMS);
- }else
- //Default UNIX-like parsing
- //FTPClientConfig.SYST_UNIX = "UNIX"
- {
- _systemName = FTPClientConfig.SYST_UNIX;
- ftpClientConfig = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
- }
-
- _ftpClient.configure(ftpClientConfig);
-
- _userHome = _ftpClient.printWorkingDirectory();
-
- //For VMS, normalize the home location
- if(_systemName.equals(FTPClientConfig.SYST_VMS))
- {
- _userHome = _userHome.replaceAll(":\\[", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- _userHome = '/'+_userHome.substring(0,_userHome.lastIndexOf(']'));
- }
-
- }
-
- public void disconnect()
- {
- try
- {
- getFTPClient().logout();
- _ftpClient = null;
- }
- catch (Exception e)
- {
- _ftpClient = null;
- }
- }
-
- /**
- * Returns the commons.net FTPClient for this session.
- *
- * As a side effect, it also checks the connection
- * by sending a NOOP to the remote side, and initiates
- * a connect in case the NOOP throws an exception.
- *
- * @return The commons.net FTPClient.
- */
- public FTPClient getFTPClient()
- {
- if (_ftpClient == null)
- {
- _ftpClient = new FTPClient();
-
- }
-
- if(_hostName!=null)
- {
- try{
- _ftpClient.sendNoOp();
- }catch (IOException e){
- try {
- connect();
- } catch (Exception e1) {}
- }
- }
-
-
- return _ftpClient;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#getFile(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
- */
- public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
- {
- if (monitor!=null){
- if (monitor.isCanceled()) {
- return null;
- }
- }
-
- FTPHostFile file = null;
-
- try{
-
- //try to retrieve the file
- _ftpClient = getFTPClient();
-
- remoteParent = adaptPath(remoteParent);
-
- if(!_ftpClient.changeWorkingDirectory(remoteParent))
- {
- throw new RemoteFileIOException(new Exception(_ftpClient.getReplyString()));
- }
-
- if(!listFiles(monitor))
- {
- throw new RemoteFileCancelledException();
- }
-
- for (int i = 0; i < _ftpFiles.length; i++)
- {
- FTPHostFile tempFile = new FTPHostFile(remoteParent,_ftpFiles[i],_systemName);
-
- if(tempFile.getName().equalsIgnoreCase(fileName))
- {
- file = tempFile;
- break;
- }
- }
-
- // if not found, create new object with non-existing flag
- if(file == null)
- {
- file = new FTPHostFile(remoteParent,fileName, false, false, 0, 0, false);
- }
-
-
- }catch (Exception e){
- throw new RemoteFileIOException(e);
- }
-
- return file;
- }
-
- public boolean isConnected()
- {
- boolean isConnected = false;
-
- if(_ftpClient!=null) {
- isConnected = _ftpClient.isConnected();
- }
-
- return isConnected;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.AbstractFileService#internalFetch(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, int)
- */
- protected IHostFile[] internalFetch(IProgressMonitor monitor, String parentPath, String fileFilter, int fileType) throws SystemMessageException
- {
- if (monitor!=null){
- if (monitor.isCanceled()) {
- return null;
- }
- }
-
-
- if (fileFilter == null)
- {
- fileFilter = "*"; //$NON-NLS-1$
- }
- IMatcher filematcher = null;
- if (fileFilter.endsWith(",")) { //$NON-NLS-1$
- String[] types = fileFilter.split(","); //$NON-NLS-1$
- filematcher = new FileTypeMatcher(types, true);
- } else {
- filematcher = new NamePatternMatcher(fileFilter, true, true);
- }
- List results = new ArrayList();
-
- try
- {
- _ftpClient = getFTPClient();
-
- parentPath = adaptPath(parentPath);
-
- if(!_ftpClient.changeWorkingDirectory(parentPath))
- {
- throw new RemoteFileIOException(new Exception(_ftpClient.getReplyString()));
- }
-
- if(!listFiles(monitor))
- {
- throw new RemoteFileCancelledException();
- }
-
- for(int i=0; i<_ftpFiles.length; i++)
- {
- FTPHostFile f = new FTPHostFile(parentPath,_ftpFiles[i],_systemName);
- if((filematcher.matches(f.getName()) || f.isDirectory()) && !(f.getName().equals(".") || f.getName().equals(".."))) //$NON-NLS-1$ //$NON-NLS-2$
- {
- results.add(f);
- }
- }
- }
- catch (Exception e)
- {
- throw new RemoteFileIOException(e);
- }
-
- return (IHostFile[])results.toArray(new IHostFile[results.size()]);
- }
-
-
- private char getSeparator()
- {
- char separator = '/';
-
- if(_systemName.equals(FTPClientConfig.SYST_NT) || _userHome.indexOf('\\')!=-1)
- {
- separator = '\\';
- }
-
- return separator;
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#upload(org.eclipse.core.runtime.IProgressMonitor, java.io.File, java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String)
- */
- public boolean upload(IProgressMonitor monitor, File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding) throws SystemMessageException
- {
- boolean retValue = true;
-
- if (monitor!=null){
- if (monitor.isCanceled()) {
- return false;
- }
- }
-
- FTPClient ftpClient = getFTPClient();
-
- MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor);
-
- try
- {
-
- remoteParent = adaptPath(remoteParent);
-
- ftpClient.changeWorkingDirectory(remoteParent);
-
- if (isBinary)
- ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
- else
- ftpClient.setFileType(FTP.ASCII_FILE_TYPE);
-
- FileInputStream input = new FileInputStream(localFile);
- OutputStream output = ftpClient.storeFileStream(remoteFile);
-
- progressMonitor.init(0, localFile.getName(), remoteFile, localFile.length());
- long bytes=0;
- byte[] buffer = new byte[4096];
-
- int readCount;
- while((readCount = input.read(buffer)) > 0)
- {
- bytes+=readCount;
- output.write(buffer, 0, readCount);
- progressMonitor.count(readCount);
- if (monitor!=null){
- if (monitor.isCanceled()) {
- retValue = false;
- break;
- }
- }
- }
-
- input.close();
- output.flush();
- output.close();
-
- ftpClient.completePendingCommand();
-
- if(retValue==false) {
- ftpClient.deleteFile(remoteFile);
- }
-
- progressMonitor.end();
- }
- catch (Exception e)
- {
- throw new RemoteFileIOException(e);
- }
-
- return retValue;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#upload(org.eclipse.core.runtime.IProgressMonitor, java.io.InputStream, java.lang.String, java.lang.String, boolean, java.lang.String)
- */
- public boolean upload(IProgressMonitor monitor, InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding) throws SystemMessageException
- {
- boolean retValue = true;
-
- try
- {
- BufferedInputStream bis = new BufferedInputStream(stream);
- File tempFile = File.createTempFile("ftpup", "temp"); //$NON-NLS-1$ //$NON-NLS-2$
- FileOutputStream os = new FileOutputStream(tempFile);
- BufferedOutputStream bos = new BufferedOutputStream(os);
-
- byte[] buffer = new byte[4096];
- int readCount;
- while( (readCount = bis.read(buffer)) > 0)
- {
- bos.write(buffer, 0, readCount);
- if (monitor!=null){
- if (monitor.isCanceled()) {
- retValue = false;
- break;
- }
- }
- }
- bos.close();
-
- if(retValue == true){
- retValue = upload(monitor, tempFile, remoteParent, remoteFile, isBinary, "", hostEncoding); //$NON-NLS-1$
- }
-
- }
- catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
- return retValue;
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#download(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, java.io.File, boolean, java.lang.String)
- */
- public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding) throws SystemMessageException
- {
-
- if (monitor!=null){
- if (monitor.isCanceled()) {
- return false;
- }
- }
-
- MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor);
-
- IHostFile remoteHostFile = getFile(null,remoteParent,remoteFile);
-
- boolean retValue = false;
-
- FTPClient ftpClient = getFTPClient();
-
- try
- {
- remoteParent = adaptPath(remoteParent);
-
- ftpClient.changeWorkingDirectory(remoteParent);
-
- if (isBinary)
- ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
- else
- ftpClient.setFileType(FTP.ASCII_FILE_TYPE);
-
- if (!localFile.exists())
- {
- File localParentFile = localFile.getParentFile();
- if (!localParentFile.exists())
- {
- localParentFile.mkdirs();
- }
- localFile.createNewFile();
- }
-
- OutputStream output = new FileOutputStream(localFile);
- InputStream input = ftpClient.retrieveFileStream(remoteFile);
-
- progressMonitor.init(0, remoteFile, localFile.getName(), remoteHostFile.getSize());
-
- byte[] buffer = new byte[4096];
-
- int readCount;
- while((readCount = input.read(buffer)) > 0)
- {
- output.write(buffer, 0, readCount);
- progressMonitor.count(readCount);
- if (monitor!=null){
- if (monitor.isCanceled()) {
- retValue = false;
- break;
- }
- }
- }
-
- progressMonitor.end();
-
- output.flush();
- input.close();
- output.close();
-
- ftpClient.completePendingCommand();
- }
- catch (Exception e)
- {
- throw new RemoteFileIOException(e);
- }
-
- return retValue;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#getUserHome()
- */
- public IHostFile getUserHome()
- {
- return new FTPHostFile("",_userHome,true,true,0,0,true); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#getRoots(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IHostFile[] getRoots(IProgressMonitor monitor)
- {
-
- IHostFile[] hostFile;
-
- if(_userHome.startsWith("/")) //$NON-NLS-1$
- {
- hostFile = new IHostFile[]{new FTPHostFile(null, "/", true, true, 0, 0, true)}; //$NON-NLS-1$
- }
- else
- {
- hostFile = new IHostFile[]{new FTPHostFile(null, _userHome, true, true, 0, 0, true)};
- }
-
- return hostFile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#delete(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
- */
- public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException {
- boolean hasSucceeded = false;
-
- FTPClient ftpClient = getFTPClient();
-
- MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor);
-
- progressMonitor.init(FTPServiceResources.FTP_File_Service_Deleting_Task+fileName, 1);
-
- boolean isFile = getFile(null,remoteParent,fileName).isFile();
-
- try {
- hasSucceeded = FTPReply.isPositiveCompletion(ftpClient.cwd(remoteParent));
-
- if(hasSucceeded)
- {
- if(isFile)
- {
- hasSucceeded = ftpClient.deleteFile(fileName);
- }
- else
- {
- hasSucceeded = ftpClient.removeDirectory(fileName);
- }
- }
-
- if(!hasSucceeded){
- throw new Exception(ftpClient.getReplyString()+" ("+fileName+")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else
- {
- progressMonitor.worked(1);
- }
-
- }
- catch (Exception e) {
- if(isFile){
- throw new RemoteFileIOException(e);
- }
- else{
- throw new RemoteFolderNotEmptyException(e);
- }
-
-
- }
-
- return hasSucceeded;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#rename(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, java.lang.String)
- */
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName) throws SystemMessageException {
-
- boolean success = false;
-
- FTPClient ftpClient = getFTPClient();
-
- try {
-
- String source = remoteParent.endsWith(String.valueOf(getSeparator())) ? remoteParent + oldName : remoteParent + getSeparator() + oldName;
-
- success = ftpClient.rename(source, newName);
-
- if(!success)
- {
- throw new Exception(ftpClient.getReplyString());
- }
-
- } catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- return success;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#rename(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, java.lang.String, org.eclipse.rse.services.files.IHostFile)
- */
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) {
- boolean hasSucceeded = false;
-
- oldFile.renameTo(newName);
-
- return hasSucceeded;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#move(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
- */
- public boolean move(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException{
-
- boolean success = false;
-
- FTPClient ftpClient = getFTPClient();
-
- try{
-
- String source = srcParent.endsWith(String.valueOf(getSeparator())) ? srcParent + srcName : srcParent + getSeparator() + srcName;
- String target = tgtParent.endsWith(String.valueOf(getSeparator())) ? tgtParent + tgtName : tgtParent + getSeparator() + tgtName;
-
- success = ftpClient.rename(source, target);
-
- if(!success)
- {
- throw new Exception(ftpClient.getReplyString());
- }
-
- }catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- return success;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#createFolder(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
- */
- public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException
- {
-
- FTPClient ftpClient = getFTPClient();
-
- try
- {
-
- remoteParent = adaptPath(remoteParent);
-
- if(!ftpClient.changeWorkingDirectory(remoteParent))
- {
- throw new Exception(ftpClient.getReplyString()+" ("+remoteParent+")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if(!ftpClient.makeDirectory(folderName))
- {
- throw new Exception(ftpClient.getReplyString()+" ("+folderName+")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
- catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- return getFile(monitor, remoteParent, folderName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#createFile(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
- */
- public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException{
-
- try {
- File tempFile = File.createTempFile("ftp", "temp"); //$NON-NLS-1$ //$NON-NLS-2$
- tempFile.deleteOnExit();
- boolean success = upload(monitor, tempFile, remoteParent, fileName, true, null, null);
-
- if(!success)
- {
- throw new Exception(getFTPClient().getReplyString());
- }
- }
- catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- return getFile(monitor, remoteParent, fileName);
- }
-
- public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException
- {
- throw new RemoteFileIOException(new Exception(FTPServiceResources.FTP_File_Service_Copy_Not_Supported));
- }
-
- public boolean copyBatch(IProgressMonitor monitor, String[] srcParents, String[] srcNames, String tgtParent) throws SystemMessageException
- {
- boolean hasSucceeded = false;
-
- for(int i=0; i<srcNames.length; i++)
- {
- hasSucceeded = copy(monitor, srcParents[i], srcNames[i], tgtParent, srcNames[i]);
- if(!hasSucceeded)
- {
- break;
- }
- }
-
- return hasSucceeded;
- }
-
- public void initService(IProgressMonitor monitor)
- {
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- }
-
- public boolean isCaseSensitive()
- {
- return true;
- }
-
-
- private synchronized boolean listFiles(IProgressMonitor monitor) throws Exception
- {
- boolean result = true;
-
- _exception = null;
-
- Thread listThread = new Thread(new Runnable(){
-
- public void run() {
- try {
- _ftpFiles = _ftpClient.listFiles();
- } catch (IOException e) {
- _exception = e;
- }
- }});
-
- if(monitor != null)
- {
- if(!monitor.isCanceled())
- listThread.start();
- else
- return false;
-
- //wait
-
- while(!monitor.isCanceled() && listThread.isAlive())
- {
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {}
- }
-
- //evaluate result
-
- if(monitor.isCanceled() && listThread.isAlive())
- {
- Thread killThread = listThread;
- listThread = null;
- killThread.interrupt();
-
- _ftpClient.completePendingCommand();
-
- throw new RemoteFileIOException(_exception);
- }
-
- }
- else
- {
- listThread.join();
- if(_exception!=null)
- {
- throw new RemoteFileIOException(_exception);
- }
-
- }
-
- return result;
- }
-
- private String adaptPath(String path)
- {
- Matcher matcher = Pattern.compile("[\\\\/](\\w:.*)").matcher(path); //$NON-NLS-1$
-
- if(matcher.matches())
- {
- path = matcher.group(1);
- }
-
-
- if(path.length()>1)
- {
- path = getSeparator() == '/' ? path.replace('\\', getSeparator()) : path.replace('/', getSeparator());
- }
-
- return path;
- }
-
-
-
- private class MyProgressMonitor
- {
- private IProgressMonitor fMonitor;
- private double fWorkPercentFactor;
- private Long fMaxWorkKB;
- private long fWorkToDate;
-
- public MyProgressMonitor(IProgressMonitor monitor) {
- fMonitor = monitor;
- }
-
- public void init(int op, String src, String dest, long max){
- fWorkPercentFactor = 1.0 / max;
- fMaxWorkKB = new Long(max / 1024L);
- fWorkToDate = 0;
- String srcFile = new Path(src).lastSegment();
- String desc = srcFile;
- fMonitor.beginTask(desc, (int)max);
- }
-
- public void init(String label, int max){
- fMonitor.beginTask(label, max);
- }
-
- public boolean count(long count){
- fWorkToDate += count;
- Long workToDateKB = new Long(fWorkToDate / 1024L);
- Double workPercent = new Double(fWorkPercentFactor * fWorkToDate);
- String subDesc = MessageFormat.format(
- FTPServiceResources.FTP_File_Service_Monitor_Format,
- new Object[] {
- workToDateKB, fMaxWorkKB, workPercent
- });
- fMonitor.subTask(subDesc);
- fMonitor.worked((int)count);
- return !(fMonitor.isCanceled());
- }
-
- public void worked(int work){
- fMonitor.worked(work);
- }
-
- public void end(){
- fMonitor.done();
- }
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPServiceResources.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPServiceResources.java
deleted file mode 100644
index fecc0e5dc..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPServiceResources.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Javier Montalvo Orus (Symbian) - Added Externalized Strings
- ********************************************************************************/
-
-package org.eclipse.rse.services.files.ftp;
-
-import org.eclipse.osgi.util.NLS;
-
-public class FTPServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.services.files.ftp.FTPServiceResources";//$NON-NLS-1$
- public static String FTP_File_Service_Copy_Not_Supported;
- public static String FTP_File_Service_Deleting_Task;
- public static String FTP_File_Service_Listing_Job;
- public static String FTP_File_Service_Listing_Job_Success;
- public static String FTP_File_Service_Monitor_Format;
- public static String FTP_File_Service_Name;
- public static String FTP_File_Service_Description;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, FTPServiceResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPServiceResources.properties b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPServiceResources.properties
deleted file mode 100644
index e9f2babb4..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/FTPServiceResources.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# Javier Montalvo Orus (Symbian) - Added Externalized Strings
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-FTP_File_Service_Name=FTP File Service
-FTP_File_Service_Description=The FTP File Service uses the FTP protocol to provide service for the Files subsystem. It requires an FTP daemon to be running on the host machine.
-FTP_File_Service_Deleting_Task=Deleting
-FTP_File_Service_Copy_Not_Supported=FTP copy not supported, use move instead
-FTP_File_Service_Listing_Job=Listing files...
-FTP_File_Service_Listing_Job_Success=Success
-FTP_File_Service_Monitor_Format={0,number,integer} KB of {1,number,integer} KB complete ({2,number,percent})
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/IFTPService.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/IFTPService.java
deleted file mode 100644
index bf566160b..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/services/files/ftp/IFTPService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.files.ftp;
-
-public interface IFTPService
-{
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/.classpath b/rse/plugins/org.eclipse.rse.services.local/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.services.local/.cvsignore b/rse/plugins/org.eclipse.rse.services.local/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.services.local/.project b/rse/plugins/org.eclipse.rse.services.local/.project
deleted file mode 100644
index edd4638bb..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.services.local</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.core.resources.prefs b/rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.services.local/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.services.local/META-INF/MANIFEST.MF
deleted file mode 100644
index ea0458ad6..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.services.local;singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.rse.services.local.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.services.local.search,
- org.eclipse.rse.internal.services.local.shells,
- org.eclipse.rse.services.local,
- org.eclipse.rse.services.local.files,
- org.eclipse.rse.services.local.processes,
- org.eclipse.rse.services.local.search,
- org.eclipse.rse.services.local.shells
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.services.local/about.html b/rse/plugins/org.eclipse.rse.services.local/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/about.ini b/rse/plugins/org.eclipse.rse.services.local/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/about.mappings b/rse/plugins/org.eclipse.rse.services.local/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/about.properties b/rse/plugins/org.eclipse.rse.services.local/about.properties
deleted file mode 100644
index fc03881bb..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer Local Services\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/build.properties b/rse/plugins/org.eclipse.rse.services.local/build.properties
deleted file mode 100644
index b738c475d..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-# Martin Oberhuber (WindRiver) - Bug 153273: make shell output parsing common
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- about.properties,\
- plugin.properties,\
- .,\
- about.ini,\
- about.mappings,\
- eclipse32.png
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.services.local/eclipse32.png b/rse/plugins/org.eclipse.rse.services.local/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.services.local/plugin.properties b/rse/plugins/org.eclipse.rse.services.local/plugin.properties
deleted file mode 100644
index fc6669d11..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE Local Services
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchResult.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchResult.java
deleted file mode 100644
index 866229f52..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchResult.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.local.search;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.search.AbstractSearchResult;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-
-public class LocalSearchResult extends AbstractSearchResult
-{
- public LocalSearchResult(IHostSearchResultConfiguration configuration, Object parent, SystemSearchString searchString)
- {
- super(configuration, parent, searchString);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellOutputReader.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellOutputReader.java
deleted file mode 100644
index 3c522af8d..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellOutputReader.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.local.shells;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-
-import org.eclipse.rse.services.local.Activator;
-import org.eclipse.rse.services.shells.AbstractHostShellOutputReader;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellOutputReader;
-import org.eclipse.rse.services.shells.SimpleHostOutput;
-
-/**
- * Listener to shell output. As io streams through, refresh events are sent out
- * for the OutputChangeListener to respond to.
- */
-public class LocalShellOutputReader extends AbstractHostShellOutputReader implements IHostShellOutputReader
-{
- protected BufferedReader _reader;
- private String fPromptChars = ">$%#]"; //Characters we accept as the end of a prompt //$NON-NLS-1$;
-
-
- public LocalShellOutputReader(IHostShell hostShell, BufferedReader reader, boolean isErrorReader)
- {
- super(hostShell, isErrorReader);
- _reader = reader;
- }
- /*
- protected Object internalReadLine()
- {
- StringBuffer theLine = new StringBuffer();
- int ch;
- int lastch = 0;
- boolean done = false;
- while (!done && !isFinished())
- {
- try
- {
-
- ch = _reader.read();
- switch (ch)
- {
- case -1:
- if (theLine.length() == 0) // End of Reader
- return null;
- done = true;
- break;
- case 65535:
- if (theLine.length() == 0) // Check why I keep getting
- // this!!!
- return null;
- done = true;
- break;
- case 10:
- done = true; // Newline
-
- break;
- case 9:
- theLine.append(" "); // Tab
- break;
- case 13:
- break; // Carriage Return
- default:
- char tch = (char) ch;
- if (!Character.isISOControl(tch))
- {
- theLine.append(tch); // Any other character
- }
- else
- {
- // ignore next char too
- _reader.read();
- }
- }
-
- boolean ready = _reader.ready();
- if (ch == 10 && lastch == 13)
- {
- return theLine.toString();
- }
- lastch = ch;
-
- // Check to see if the BufferedReader is still ready which means
- // there are more characters
- // in the Buffer...If not, then we assume it is waiting for
- // input.
- if (!ready)
- {
- // wait to make sure
- try
- {
- //_reader.wait(_waitIncrement);
- Thread.sleep(_waitIncrement);
- }
- catch (InterruptedException e)
- {
- }
- if (!_reader.ready())
- {
- if (done)
- {
- return theLine.toString().trim();
- }
- else
- {
- done = true;
- }
-
- }
- }
-
- }
- catch (IOException e)
- {
- return null;
- }
- }
-
- return theLine.toString();
- }
-*/
- protected IHostOutput internalReadLine() {
- if (_reader == null) {
- //Our workaround sets the stderr reader to null, so we never give any stderr output.
- //TODO Check if ssh supports some method of having separate stdout and stderr streams
- return null;
- }
- StringBuffer theLine = new StringBuffer();
- StringBuffer theDebugLine = null;
- theDebugLine = new StringBuffer();
- int ch;
- boolean done = false;
- while (!done && !isFinished()) {
- try {
- ch = _reader.read();
- switch (ch) {
- case -1:
- case 65535:
- if (theLine.length() == 0) // End of Reader
- return null;
- done = true;
- break;
- case '\b': //backspace
- if(theDebugLine!=null) theDebugLine.append((char)ch);
- int len = theLine.length()-1;
- if (len>=0) theLine.deleteCharAt(len);
- break;
- case 13:
- if(theDebugLine!=null) theDebugLine.append((char)ch);
- break; // Carriage Return: dont append to the buffer
- case 10:
- if(theDebugLine!=null) theDebugLine.append((char)ch);
- done = true; // Newline
- break;
- case 9:
- //Tab: we count tabs at column 8
- if(theDebugLine!=null) theDebugLine.append((char)ch);
- int tabIndex = theLine.length() % 8;
- while (tabIndex < 8) {
- theLine.append(' ');
- tabIndex++;
- }
- break;
- default:
- char tch = (char) ch;
- if(theDebugLine!=null) theDebugLine.append(tch);
- if (!Character.isISOControl(tch)) {
- theLine.append(tch); // Any other character
- } else if (ch == 27) {
- // Escape: ignore next char too
- int nch = _reader.read();
- if (theDebugLine!=null) theDebugLine.append((char)nch);
- if (nch == 91) {
- //vt100 escape sequence: read until end-of-command (skip digits and semicolon)
- //e.g. \x1b;13;m --> ignore the entire command, including the trailing m
- do {
- nch = _reader.read();
- if (theDebugLine!=null) theDebugLine.append((char)nch);
- } while (Character.isDigit((char)nch) || nch == ';');
- }
- }
- }
-
- // Check to see if the BufferedReader is still ready which means
- // there are more characters
- // in the Buffer...If not, then we assume it is waiting for
- // input.
- if (!done && !_reader.ready()) {
- // wait to make sure -- max. 500 msec to wait for new chars
- // if we are not at a CRLF seems to be appropriate for the
- // Pipes and Threads in ssh.
- long waitIncrement = 500;
- // Check if we think we are at a prompt
- int len = theLine.length()-1;
- while (len>0 && Character.isSpaceChar(theLine.charAt(len))) {
- len--;
- }
- if (len>=0 && fPromptChars.indexOf(theLine.charAt(len))>=0) {
- waitIncrement = 5; //wait only 5 msec if we think it's a prompt
- }
- try {
- Thread.sleep(waitIncrement);
- } catch (InterruptedException e) {
- }
- if (!_reader.ready()) {
- done = true;
- }
- }
- } catch (IOException e) {
- //FIXME it's dangerous to return null here since this will end
- //our reader thread completely... the exception could just be
- //temporary, and we should keep running!
- Activator.getDefault().logException(e);
- return null;
- }
- }
- if (theDebugLine!=null) {
- String debugLine = theDebugLine.toString();
- debugLine.compareTo(""); //$NON-NLS-1$
- }
- return new SimpleHostOutput(theLine.toString());
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellThread.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellThread.java
deleted file mode 100644
index 8eb6dd980..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellThread.java
+++ /dev/null
@@ -1,536 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Javier Montalvo Orús (Symbian) - 138619: Fix codepage on Win2K
- * Lothar Werzinger (Tradescape) - 161838: Support terminating local shells
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.local.shells;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.URL;
-
-import org.eclipse.core.runtime.Platform;
-
-/**
- * The LocalCommandThread class is used for running and interacting with a
- * local command shell.
- */
-public class LocalShellThread extends Thread
-{
-
- private volatile Thread _commandThread;
- protected boolean _isCancelled;
-
- private String _cwd;
- private String _invocation;
- private String[] _envVars;
- private String PSEUDO_TERMINAL;
-
-
- private boolean _isShell;
- private boolean _isDone;
-
- private Process _theProcess;
-
-
- private boolean _isTTY = false;
-
- private boolean _isWindows;
- private String _encoding;
-
- private BufferedReader _stdInput;
- private BufferedReader _stdError;
-
- /**
- * consturtor for local command shell monitor
- * @param cwd initial working directory
- * @param invocation launch shell command
- * @param encoding
- * @param envVars user and system environment variables to launch shell with
- */
- public LocalShellThread(String cwd, String invocation, String encoding, String[] envVars)
- {
- super();
- _encoding = encoding;
- _isCancelled = false;
- _cwd = cwd;
- _invocation = invocation;
-
- // if pty exists for this client
- // then the rse.pty property will have been set
- // by the contributor of the pty exectuable
- // on linux client this is a likely scenario
- PSEUDO_TERMINAL = System.getProperty("rse.pty"); //$NON-NLS-1$
- try
- {
- PSEUDO_TERMINAL = Platform.resolve(new URL(PSEUDO_TERMINAL)).getPath();
- }
- catch (Exception e)
- {
- }
-
- _envVars = envVars;
- init();
- }
-
-
- public boolean isShell()
- {
- return _isShell;
- }
-
- public boolean isWindows()
- {
- return _isWindows;
- }
-
- public boolean isDone()
- {
- return _isDone || _isCancelled;
- }
-
- public String getInvocation()
- {
- return _invocation;
- }
-
- public String getCWD()
- {
- return _cwd;
- }
-
- public void setCWD(String cwd)
- {
- _cwd = cwd;
- }
-
- private void init()
- {
- try
- {
- File theDirectory = new File(_cwd);
- if (!theDirectory.isDirectory())
- theDirectory = theDirectory.getParentFile();
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
- _isWindows = theOS.toLowerCase().startsWith("win"); //$NON-NLS-1$
- _isTTY = PSEUDO_TERMINAL != null && (new File(PSEUDO_TERMINAL).exists());
-
- String theShell = null;
-
- if (!_isWindows)
- {
- String[] envVars = getEnvironmentVariables(false);
- if (theShell == null)
- {
-
- String property = "SHELL="; //$NON-NLS-1$
-
- for (int i = 0; i < envVars.length; i++)
- {
- String var = envVars[i];
- if (var.startsWith(property))
- {
- theShell = var.substring(property.length(), var.length());
-
- if (theShell.endsWith("bash")) //$NON-NLS-1$
- {
- theShell = "sh"; //$NON-NLS-1$
- }
-
- }
- }
-
- if (theShell == null)
- {
- theShell = "sh"; //$NON-NLS-1$
- }
-
-
- if (_isTTY)
- {
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
- _isShell = true;
- }
-
- String args[] = new String[2];
- args[0] = PSEUDO_TERMINAL;
- args[1] = _invocation;
-
- _theProcess = Runtime.getRuntime().exec(args, envVars, theDirectory);
- }
- else
- {
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
- _isShell = true;
- }
- String args[] = new String[1];
- args[0] = _invocation;
- //args[1] = "-i";
-
- _theProcess = Runtime.getRuntime().exec(args[0], envVars, theDirectory);
- }
- }
- else
- {
- if (_isTTY)
- {
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
- _isShell = true;
- }
-
- String args[] = new String[4];
- args[0] = PSEUDO_TERMINAL;
- args[1] = theShell;
- args[2] = "-c"; //$NON-NLS-1$
- args[3] = _invocation;
-
- _theProcess = Runtime.getRuntime().exec(args, envVars, theDirectory);
- }
- else
- {
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
- _isShell = true;
- }
-
- String args[] = new String[3];
- args[0] = theShell;
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = _invocation;
-
- _theProcess = Runtime.getRuntime().exec(args, envVars, theDirectory);
- }
-
- }
- }
- else
- {
- String[] envVars = getEnvironmentVariables(true);
- if ((theOS.indexOf("95") >= 0) || (theOS.indexOf("98") >= 0) || (theOS.indexOf("ME") >= 0)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- {
- theShell = "start"; //$NON-NLS-1$
- }
- else
- {
- theShell = "cmd"; //$NON-NLS-1$
- }
-
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
- _isShell = true;
- }
-
- if (theShell.equals("start")) //$NON-NLS-1$
- {
- theShell += " /B "; //$NON-NLS-1$
- }
- else
- {
- theShell += " /C "; //$NON-NLS-1$
- }
-
- _theProcess = Runtime.getRuntime().exec(theShell + _invocation, envVars, theDirectory);
- }
-
- // determine the windows encoding
- if (_encoding == null || _encoding.length() == 0)
- {
- try
- {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- OutputStreamWriter osw = new OutputStreamWriter(os);
- _encoding = osw.getEncoding();
- osw.close();
- os.close();
- }
- catch (Exception x)
- {
- }
- if (_encoding == null)
- {
- if (_encoding == null || _encoding.length() == 0)
- {
- _encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
- }
- }
- }
-
- _stdInput = new BufferedReader(new InputStreamReader(_theProcess.getInputStream()));
- _stdError = new BufferedReader(new InputStreamReader(_theProcess.getErrorStream()));
-
- }
- catch (IOException e)
- {
- _theProcess = null;
- e.printStackTrace();
- return;
- }
-
-
- if (_isShell && !_isWindows && !_isTTY)
- {
- OutputStream output = _theProcess.getOutputStream();
-
- BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(output));
- createPrompt(writer);
- //createObject("prompt", _cwdStr + ">");
- }
- }
-
- private void createPrompt(BufferedWriter writer)
- {
-
- try
- {
- writer.write("echo $PWD'>'"); //$NON-NLS-1$
- writer.write('\n');
- writer.flush();
- }
- catch (Exception e)
- {
-
- }
-
- }
-
- public BufferedReader getOutputStream()
- {
- return _stdInput;
- }
-
- public BufferedReader getErrorStream()
- {
- return _stdError;
- }
-
-
-
- public synchronized void stopThread()
- {
- if (_commandThread != null)
- {
- _isCancelled = true;
-
- try
- {
- _commandThread = null;
- }
- catch (Exception e)
- {
- System.out.println(e);
- }
-
- }
- notify();
- }
-
- public void sendInput(String input)
- {
- if (!_isDone)
- {
- byte[] intoout = input.getBytes();
- OutputStream output = _theProcess.getOutputStream();
-
- BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(output));
-
- try
- {
-
- writer.write(input);
- writer.write('\n');
- writer.flush();
-
- if (!_isWindows && !_isTTY)
- {
- // special case for pattern interpretting
- // if cwd is not set, then files aren't resolved
- // create mock prompt to ensure that they do get resolved
- //if (input.startsWith("cd ") || input.equals("cd"))
- {
- createPrompt(writer);
- /*
- writer.write("echo $PWD'>'");
- writer.write('\n');
- writer.flush();
-*/
- // sleep to allow reader to interpret before going on
- try
- {
- Thread.sleep(100);
- }
- catch (InterruptedException e)
- {
- }
- }
- }
- }
- catch (IOException e)
- {
- System.out.println(e);
- // make the thread exit;
- _isShell = false;
- }
-
- }
- }
-
- public void run()
- {
- Thread thisThread = Thread.currentThread();
- _commandThread = thisThread;
-
-
- while (_commandThread != null && _commandThread == thisThread && _commandThread.isAlive() && !_isCancelled)
- {
- try
- {
- Thread.sleep(200);
- }
- catch (InterruptedException e)
- {
- System.out.println(e);
- }
-
- //This function is where the Threads do real work, and return false when finished
- if (!doThreadedWork())
- {
- try
- {
- _commandThread = null;
- }
- catch (Exception e)
- {
- System.out.println(e);
- }
- }
- else
- {
- }
- }
-
- //This function lets derived classes cleanup or whatever
- cleanupThread();
- }
-
- public boolean doThreadedWork()
- {
- if (_stdInput == null || _isShell == false)
- {
- return false;
- }
- else
- {
- return true;
- }
- }
-
- public void cleanupThread()
- {
- if (_isShell)
- {
- sendInput("exit"); //$NON-NLS-1$
- }
-
- _isDone = true;
- try
- {
- _stdInput.close();
- _stdError.close();
-
- if (_theProcess != null)
- {
- int exitcode;
- try
- {
- if (_isCancelled)
- {
- _theProcess.destroy();
- }
- else
- {
- exitcode = _theProcess.exitValue();
- }
- }
- catch (IllegalThreadStateException e)
- {
- //e.printStackTrace();
- exitcode = -1;
- _theProcess.destroy();
- }
- _theProcess = null;
- }
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
-
- }
-
-
- public String getPathEnvironmentVariable()
- {
- String[] vars = _envVars;
- if (vars != null)
- {
-
- for (int i = 0; i < vars.length; i++)
- {
- String var = vars[i].toUpperCase();
- if (var.startsWith("PATH=")) //$NON-NLS-1$
- {
- return var;
- }
- }
-
- }
- return null;
- }
-
- /**
- * Retrieve the system environment variables and append the user defined
- * environment variables to create the String array that can be passed to
- * Runtime.exec(). We need to retrieve the system env vars because the
- * env vars passed to Runtime.exec() prevent the system ones from being
- * inherited.
- */
- private String[] getEnvironmentVariables(boolean windows)
- {
- if (_isTTY)
- {
- String[] newEnv = new String[_envVars.length + 1];
- for (int i = 0; i < _envVars.length; i++)
- newEnv[i] = _envVars[i];
- newEnv[_envVars.length] = "PS1=$PWD/>"; //$NON-NLS-1$
- _envVars = newEnv;
- }
- return _envVars;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/Activator.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/Activator.java
deleted file mode 100644
index 883ed38e2..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/Activator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.local;
-
-import org.eclipse.core.runtime.ILog;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends Plugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * Returns the shared instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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;
- }
-
- /**
- * Logs an throwable to the log for this plugin.
- * @param t the Throwable to be logged.
- */
- public void logException(Throwable t) {
- ILog log = getLog();
- String id = getBundle().getSymbolicName();
- IStatus status = new Status(IStatus.ERROR, id, 0, "Unexpected exception", t);
- log.log(status);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/ILocalService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/ILocalService.java
deleted file mode 100644
index 6f440b7b9..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/ILocalService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.local;
-
-public interface ILocalService
-{
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalFileService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalFileService.java
deleted file mode 100644
index 29e13c7b7..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalFileService.java
+++ /dev/null
@@ -1,1314 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Javier Montalvo Orús (Symbian) - patch for bug 163103 - NPE in filters
- * Martin Oberhuber (Wind River) - fix 168586 - isCaseSensitive() on Windows
- ********************************************************************************/
-
-package org.eclipse.rse.services.local.files;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.clientserver.FileTypeMatcher;
-import org.eclipse.rse.services.clientserver.IMatcher;
-import org.eclipse.rse.services.clientserver.ISystemFileTypes;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.AbstractFileService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.RemoteFileException;
-import org.eclipse.rse.services.local.ILocalService;
-
-public class LocalFileService extends AbstractFileService implements IFileService, ILocalService
-{
- private static final String[] ALLDRIVES =
- {
- "C:\\", //$NON-NLS-1$
- "D:\\", //$NON-NLS-1$
- "E:\\", //$NON-NLS-1$
- "F:\\", //$NON-NLS-1$
- "G:\\", //$NON-NLS-1$
- "H:\\", //$NON-NLS-1$
- "I:\\", //$NON-NLS-1$
- "J:\\", //$NON-NLS-1$
- "K:\\", //$NON-NLS-1$
- "L:\\", //$NON-NLS-1$
- "M:\\", //$NON-NLS-1$
- "N:\\", //$NON-NLS-1$
- "O:\\", //$NON-NLS-1$
- "P:\\", //$NON-NLS-1$
- "Q:\\", //$NON-NLS-1$
- "R:\\", //$NON-NLS-1$
- "S:\\", //$NON-NLS-1$
- "T:\\", //$NON-NLS-1$
- "U:\\", //$NON-NLS-1$
- "V:\\", //$NON-NLS-1$
- "W:\\", //$NON-NLS-1$
- "X:\\", //$NON-NLS-1$
- "Y:\\", //$NON-NLS-1$
- "Z:\\" }; //$NON-NLS-1$
-
- private boolean _checkedOS = false;
- private boolean _isWindows = false;
- private boolean _isWin95 = false;
- private boolean _isWinNT = false;
- private String _osCmdShell = null;
- protected ISystemFileTypes _fileTypeRegistry;
-
- public LocalFileService(ISystemFileTypes fileTypeRegistry)
- {
-
-
- _fileTypeRegistry = fileTypeRegistry;
- }
-
- public String getName()
- {
- return LocalServiceResources.Local_File_Service_Name;
- }
-
- public String getDescription()
- {
- return LocalServiceResources.Local_File_Service_Description;
- }
-
- public boolean isWindows()
- {
- if (!_checkedOS)
- {
- String osName = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- _isWindows = osName.startsWith("win"); //$NON-NLS-1$
- _isWin95 = _isWindows && ((osName.indexOf("95") >= 0) || (osName.indexOf("98") >= 0) || (osName.indexOf("me") >= 0)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- _isWinNT = _isWindows && ((osName.indexOf("nt") >= 0) || (osName.indexOf("2000") >= 0) || (osName.indexOf("xp") >= 0)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- if (_isWinNT)
- {
- _osCmdShell = "cmd /C "; //$NON-NLS-1$
- }
- else if (_isWin95)
- {
- _osCmdShell = "start /B "; //$NON-NLS-1$
- }
- _checkedOS = true;
- }
- return _isWindows;
- }
-
- public class LocalFileNameFilter implements FilenameFilter {
- private IMatcher _matcher;
- private int type;
-
- public LocalFileNameFilter(String filter, int type) {
- if (filter == null) {
- filter = "*"; //$NON-NLS-1$
- }
- if (filter.endsWith(",")) { //$NON-NLS-1$
- String[] types = filter.split(","); //$NON-NLS-1$
- _matcher = new FileTypeMatcher(types);
- } else {
- _matcher = new NamePatternMatcher(filter);
- }
- this.type = type;
- }
-
- public boolean accept(File dir, String name) {
- boolean result = false;
- File entry = new File(dir, name);
- if (entry.exists()) {
- if (entry.isFile()) {
- result = _matcher.matches(name);
- } else if (entry.isDirectory()) {
- if (type == FILE_TYPE_FILES_AND_FOLDERS || type == FILE_TYPE_FOLDERS) {
- result = true;
- }
- }
- }
- return result;
- }
-
- public boolean isGeneric() {
- boolean result = true;
- if (_matcher instanceof NamePatternMatcher) {
- NamePatternMatcher new_name = (NamePatternMatcher) _matcher;
- result = new_name.isGeneric();
- }
- return result;
- }
-
- }
-
- public boolean upload(IProgressMonitor monitor, InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding) throws SystemMessageException
- {
- boolean isCancelled = false;
-
- BufferedInputStream bufInputStream = null;
- FileOutputStream outputStream = null;
- BufferedOutputStream bufOutputStream = null;
- OutputStreamWriter outputWriter = null;
- BufferedWriter bufWriter = null;
-
- try
- {
- File destinationFile = new File(remoteParent, remoteFile);
- if (ArchiveHandlerManager.isVirtual(destinationFile.getAbsolutePath()))
- {
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(destinationFile.getAbsolutePath());
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".upload()"); //$NON-NLS-1$
- else
- return handler.add(stream, child.path, remoteFile, SystemEncodingUtil.ENCODING_UTF_8, hostEncoding, !isBinary);
- }
- if (ArchiveHandlerManager.getInstance().isArchive(destinationFile))
- {
- ISystemArchiveHandler handler = ArchiveHandlerManager.getInstance().getRegisteredHandler(destinationFile);
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".copyToArchive()"); //$NON-NLS-1$
- else
- return handler.add(stream, "", remoteFile, SystemEncodingUtil.ENCODING_UTF_8, hostEncoding, !isBinary); //$NON-NLS-1$
- }
-
- File destinationParent = destinationFile.getParentFile();
- if (!destinationParent.exists())
- {
- destinationParent.mkdirs();
- }
-
- bufInputStream = new BufferedInputStream(stream);
- outputStream = new FileOutputStream(destinationFile);
-
- // if encoding conversion required, then we need a writer
- boolean isEncodingConversionRequired = !isBinary;
- if (isEncodingConversionRequired)
- {
- outputWriter = new OutputStreamWriter(outputStream, hostEncoding);
- bufWriter = new BufferedWriter(outputWriter);
- }
- else
- {
- bufOutputStream = new BufferedOutputStream(outputStream);
- }
-
-
-
- byte[] buffer = new byte[512000];
- int readCount = 0;
-
- while( (readCount = bufInputStream.read(buffer)) > 0 && !isCancelled)
- {
- if (isEncodingConversionRequired && bufWriter != null)
- {
- String s = new String(buffer, 0, readCount, hostEncoding);
- bufWriter.write(s);
- }
- else if (bufOutputStream != null)
- {
- bufOutputStream.write(buffer, 0,readCount);
- }
- if (monitor != null)
- {
- monitor.worked(readCount);
- isCancelled = monitor.isCanceled();
- }
- }
-
- }
- catch (FileNotFoundException e)
- {
- }
- catch (UnsupportedEncodingException e)
- {
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- finally
- {
-
- try
- {
- if (bufWriter != null)
- bufWriter.close();
-
- if (bufInputStream != null)
- bufInputStream.close();
-
- if (bufOutputStream != null)
- bufOutputStream.close();
-
- if (isCancelled)
- {
- // throw new RemoteFileCancelledException();
- return false;
- }
- }
- catch (IOException e)
- {
- }
- }
- return true;
- }
-
-
-
- public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File destinationFile, boolean isBinary, String hostEncoding) throws SystemMessageException
- {
- File file = new File(remoteParent, remoteFile);
- FileInputStream inputStream = null;
- BufferedInputStream bufInputStream = null;
- FileOutputStream outputStream = null;
- BufferedOutputStream bufOutputStream = null;
- OutputStreamWriter outputWriter = null;
- BufferedWriter bufWriter = null;
- boolean isCancelled = false;
-
- boolean sourceIsVirtual = ArchiveHandlerManager.isVirtual(file.getAbsolutePath());
- boolean targetIsVirtual = ArchiveHandlerManager.isVirtual(destinationFile.getParent());
- boolean targetIsArchive = ArchiveHandlerManager.getInstance().isArchive(destinationFile.getParentFile());
- if (sourceIsVirtual)
- {
- return copyFromArchive(file, destinationFile.getParentFile(), destinationFile.getName(), monitor, hostEncoding, SystemEncodingUtil.ENCODING_UTF_8, !isBinary);
- }
- if (targetIsVirtual || targetIsArchive)
- {
- return copyToArchive(file, destinationFile.getParentFile(), destinationFile.getName(), monitor, hostEncoding, SystemEncodingUtil.ENCODING_UTF_8, !isBinary);
- }
-
- try
- {
-
-
- if (!destinationFile.exists())
- {
- File parentDir = destinationFile.getParentFile();
- parentDir.mkdirs();
- }
-
-
-
- // encoding conversion required if it a text file but not an xml file
- boolean isEncodingConversionRequired = !isBinary;
-
- inputStream = new FileInputStream(file);
- bufInputStream = new BufferedInputStream(inputStream);
- outputStream = new FileOutputStream(destinationFile);
-
- if (isEncodingConversionRequired)
- {
- outputWriter = new OutputStreamWriter(outputStream, hostEncoding);
- bufWriter = new BufferedWriter(outputWriter);
- }
- else
- {
- bufOutputStream = new BufferedOutputStream(outputStream);
- }
-
-
- byte[] buffer = new byte[512000];
- long totalSize = file.length();
- int totalRead = 0;
-
- while (totalRead < totalSize && !isCancelled)
- {
-
- int available = bufInputStream.available();
- available = (available < 512000) ? available : 512000;
-
- int bytesRead = bufInputStream.read(buffer, 0, available);
-
- if (bytesRead == -1) {
- break;
- }
-
- // need to convert encoding, i.e. text file, but not xml
- // ensure we read in file using the encoding for the file system
- // which can be specified by user as text file encoding in preferences
- if (isEncodingConversionRequired && bufWriter != null)
- {
- String s = new String(buffer, 0, bytesRead, hostEncoding);
- bufWriter.write(s);
- }
- else if (bufOutputStream != null)
- {
- bufOutputStream.write(buffer, 0, bytesRead);
- }
-
- totalRead += bytesRead;
-
- if (monitor != null)
- {
- monitor.worked(bytesRead);
- isCancelled = monitor.isCanceled();
- }
- }
- }
- catch (FileNotFoundException e)
- {
-// SystemPlugin.logError("Local copy: " + file.getAbsolutePath(), e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- catch (UnsupportedEncodingException e)
- {
-// SystemPlugin.logError("Local copy: " + file.getAbsolutePath(), e);
-// throw new RemoteFileIOException(e);
- return false;
- }
- catch (IOException e)
- {
- // SystemPlugin.logError("Local copy: " + file.getAbsolutePath(), e);
- // throw new RemoteFileIOException(e);
- return false;
- }
- finally
- {
-
- try
- {
- if (bufWriter != null)
- bufWriter.close();
-
- if (bufInputStream != null)
- bufInputStream.close();
-
- if (bufOutputStream != null)
- bufOutputStream.close();
-
- if (isCancelled)
- {
- // throw new RemoteFileCancelledException();
- return false;
- } else if (file.exists()) {
- destinationFile.setLastModified(file.lastModified());
- //TODO check if we want to preserve permissions
- //if(!file.canWrite()) destinationFile.setReadOnly();
- if (destinationFile.length() != file.length()) {
- // throw new RemoteFileCancelledException();
- System.err.println("local.upload: size mismach on "+destinationFile.getAbsolutePath()); //$NON-NLS-1$
- return false;
- }
- }
- }
- catch (IOException e)
- {
- // SystemPlugin.logError("Closing streams: " + file.getAbsolutePath(), e);
- // throw new RemoteFileIOException(e);
- }
- }
- return true;
- }
-
- private boolean copyToArchive(File file, File destination, String newName, IProgressMonitor monitor, String sourceEncoding, String targetEncoding, boolean isText) throws SystemMessageException
- {
- boolean ok = false;
- if (ArchiveHandlerManager.isVirtual(destination.getAbsolutePath()))
- {
- VirtualChild virtualChild = ArchiveHandlerManager.getInstance().getVirtualObject(destination.getAbsolutePath());
- String path = virtualChild.fullName;
- if (!virtualChild.isDirectory)
- {
- path = virtualChild.path;
- }
- ISystemArchiveHandler handler = virtualChild.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".copyToArchive()"); //$NON-NLS-1$
- else
- {
- if (file.isDirectory())
- {
- ok = handler.add(file, path, newName, sourceEncoding, targetEncoding, _fileTypeRegistry);
- }
- else
- {
- ok = handler.add(file, path, newName, sourceEncoding, targetEncoding, isText);
- }
- }
- }
- else if (ArchiveHandlerManager.getInstance().isArchive(destination))
- {
- ISystemArchiveHandler handler = ArchiveHandlerManager.getInstance().getRegisteredHandler(destination);
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".copyToArchive()"); //$NON-NLS-1$
- else
- {
- if (file.isDirectory())
- {
- ok = handler.add(file, "", newName, sourceEncoding, targetEncoding, _fileTypeRegistry); //$NON-NLS-1$
- }
- else
- {
- ok = handler.add(file, "", newName, sourceEncoding, targetEncoding, isText); //$NON-NLS-1$
- }
- }
- }
- if (!ok)
- {
- // SystemPlugin.logError("LocalFileSubSystemImpl.copyToArchive(): Handler's add() method returned false.");
- SystemMessage msg = getMessage("RSEF5006"); //$NON-NLS-1$
- msg.makeSubstitution(destination.getName(), "localhost"); //$NON-NLS-1$
- throw new SystemMessageException(msg);
- }
- else
- return true;
- }
-
- public boolean upload(IProgressMonitor monitor, File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding) throws SystemMessageException
- {
- boolean isCancelled = false;
- FileInputStream inputStream = null;
- BufferedInputStream bufInputStream = null;
- FileOutputStream outputStream = null;
- BufferedOutputStream bufOutputStream = null;
- OutputStreamWriter outputWriter = null;
- BufferedWriter bufWriter = null;
- File destinationFile = null;
-
- File target = new File(remoteParent, remoteFile);
- boolean sourceIsVirtual = ArchiveHandlerManager.isVirtual(localFile.getAbsolutePath());
- boolean targetIsVirtual = ArchiveHandlerManager.isVirtual(target.getAbsolutePath());
- if (sourceIsVirtual)
- {
- return copyFromArchive(localFile, target, remoteFile, monitor, srcEncoding, hostEncoding, !isBinary);
- }
- if (targetIsVirtual)
- {
- return copyToArchive(localFile, target, remoteFile, monitor, srcEncoding, hostEncoding, !isBinary);
- }
-
- try
- {
- destinationFile = new File(remoteParent, remoteFile);
- int totalSize = (int) localFile.length();
-
- File destinationParent = destinationFile.getParentFile();
- if (!destinationParent.exists())
- {
- destinationParent.mkdirs();
- }
-
- inputStream = new FileInputStream(localFile);
- bufInputStream = new BufferedInputStream(inputStream);
- outputStream = new FileOutputStream(destinationFile);
-
- // if encoding conversion required, then we need a writer
- boolean isEncodingConversionRequired = !isBinary && !srcEncoding.equals(hostEncoding);
- if (isEncodingConversionRequired)
- {
- outputWriter = new OutputStreamWriter(outputStream, hostEncoding);
- bufWriter = new BufferedWriter(outputWriter);
- }
- else
- {
- bufOutputStream = new BufferedOutputStream(outputStream);
- }
-
- byte[] buffer = new byte[512000];
- int totalRead = 0;
-
- while (totalRead < totalSize && !isCancelled) {
-
- int available = bufInputStream.available();
- available = (available < 512000) ? available : 512000;
-
- int bytesRead = bufInputStream.read(buffer, 0, available);
-
- if (bytesRead == -1) {
- break;
- }
-
- if (isEncodingConversionRequired && bufWriter != null) {
- String s = new String(buffer, 0, bytesRead, srcEncoding);
- bufWriter.write(s);
- }
- else if (bufOutputStream != null)
- {
- bufOutputStream.write(buffer, 0, bytesRead);
- }
-
- totalRead += bytesRead;
-
- if (monitor != null) {
- monitor.worked(bytesRead);
- isCancelled = monitor.isCanceled();
- }
- }
- }
- catch (FileNotFoundException e)
- {
- }
- catch (UnsupportedEncodingException e)
- {
- }
- catch (IOException e)
- {
- }
- finally
- {
-
- try
- {
- if (bufWriter != null)
- bufWriter.close();
-
- if (bufInputStream != null)
- bufInputStream.close();
-
- if (bufOutputStream != null)
- bufOutputStream.close();
-
- if (isCancelled)
- {
- // throw new RemoteFileCancelledException();
- return false;
- } else if (destinationFile!=null) {
- destinationFile.setLastModified(localFile.lastModified());
- //TODO check if we want to preserve permissions
- //if(!localFile.canWrite()) destinationFile.setReadOnly();
- if (destinationFile.length() != localFile.length()) {
- // throw new RemoteFileCancelledException();
- System.err.println("local.upload: size mismach on "+destinationFile.getAbsolutePath()); //$NON-NLS-1$
- return false;
- }
- }
- }
- catch (IOException e)
- {
- }
- }
- return true;
- }
-
- protected IHostFile[] internalFetch(IProgressMonitor monitor, String remoteParent, String fileFilter, int type) {
- LocalFileNameFilter fFilter = new LocalFileNameFilter(fileFilter, type);
- File localParent = new File(remoteParent);
- // if the system type is Windows, we get the canonical path so that we have the correct case in the path
- // this is needed because Windows paths are case insensitive
- if (isWindows()) {
- try {
- localParent = localParent.getCanonicalFile();
- } catch (IOException e) {
- System.out.println("Can not get canonical path: " + localParent.getAbsolutePath()); //$NON-NLS-1$
- }
- }
- if (remoteParent.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR)) {
- remoteParent = remoteParent.substring(0, remoteParent.length() - ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
- }
- boolean isVirtual = ArchiveHandlerManager.isVirtual(remoteParent);
- boolean isArchive = ArchiveHandlerManager.getInstance().isArchive(localParent);
- if (isVirtual || isArchive) {
- try {
- VirtualChild[] contents = null;
- File theFile = getContainingArchive(localParent);
- if (isArchive) {
- contents = ArchiveHandlerManager.getInstance().getContents(localParent, ""); //$NON-NLS-1$
- } else if (isVirtual) {
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(remoteParent);
- contents = ArchiveHandlerManager.getInstance().getContents(theFile, avp.getVirtualPart());
- }
- if (contents == null) {
- return null;
- }
- IHostFile[] results = new LocalVirtualHostFile[contents.length];
- for (int i = 0; i < contents.length; i++) {
- results[i] = new LocalVirtualHostFile(contents[i]);
- }
- return results;
- } catch (IOException e) {
- // FIXME: Do something!
- return null;
- }
- } else {
- // allow cancel before doing the os query
- if (monitor != null && monitor.isCanceled()) {
- return null;
- }
- if (!fFilter.isGeneric()) {
- File file = new File(localParent, fileFilter);
- return convertToHostFiles(new File[] { file }, type);
- }
- if (localParent.exists()) {
- File[] files = localParent.listFiles(fFilter);
- return convertToHostFiles(files, type);
- } else {
- return new IHostFile[0];
- }
- }
- }
-
- protected IHostFile[] convertToHostFiles(File[] files, int type)
- {
- List results = new ArrayList();
- if (files != null)
- {
- for (int i = 0; i < files.length; i++)
- {
- File file = files[i];
- if (file.isDirectory())
- {
- if (type == FILE_TYPE_FILES_AND_FOLDERS ||
- type == FILE_TYPE_FOLDERS)
- {
- results.add(new LocalHostFile(file));
- }
- }
- else if (file.isFile())
- {
- if (type == FILE_TYPE_FILES_AND_FOLDERS ||
- type == FILE_TYPE_FILES)
- {
- results.add(new LocalHostFile(file));
- }
- }
- else if (!file.exists())
- {
- results.add(new LocalHostFile(file));
- }
- }
- }
- return (IHostFile[])results.toArray(new IHostFile[results.size()]);
- }
-
- public IHostFile getUserHome()
- {
- String userHome =System.getProperty("user.home"); //$NON-NLS-1$
- File userHomeFile = new File(userHome);
- return new LocalHostFile(userHomeFile);
- }
-
-
-
- public IHostFile[] getRoots(IProgressMonitor monitor)
- {
- List v = new ArrayList();
- if (isWindows())
- {
- for (int idx = 0; idx < ALLDRIVES.length; idx++)
- {
- File drive = new File(ALLDRIVES[idx]);
- if (drive.exists())
-
- try
- {
- v.add(drive.getAbsoluteFile());
- }
- catch (Exception e)
- {
- }
- }
- }
- else
- {
- v.add(new File("/")); //$NON-NLS-1$
- }
-
- IHostFile[] fileObjs = new LocalHostFile[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- {
- fileObjs[idx] = new LocalHostFile((File) v.get(idx), true);
- }
-
- return fileObjs;
- }
-
-
-
- public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String name)
- {
- if (name.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR))
- {
- name = name.substring(0, name.length() - ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
- }
- boolean isVirtualParent = ArchiveHandlerManager.isVirtual(remoteParent);
- boolean isArchiveParent = ArchiveHandlerManager.getInstance().isArchive(new File(remoteParent));
- if (!isVirtualParent && !isArchiveParent)
- {
- File file = null;
- if (remoteParent == null)
- {
- file = new File(name);
- }
- else
- {
- file = new File(remoteParent, name);
- }
- return new LocalHostFile(file);
- }
- else
- {
- String fullpath = remoteParent;
- if (isArchiveParent)
- {
- fullpath = fullpath + ArchiveHandlerManager.VIRTUAL_SEPARATOR;
- }
- else
- {
- fullpath = fullpath + "/"; //$NON-NLS-1$
- }
- LocalVirtualHostFile results;
- VirtualChild vc = ArchiveHandlerManager.getInstance().getVirtualObject(fullpath + name);
- results = new LocalVirtualHostFile(vc);
- return results;
- }
- }
-
-
-
- public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
- {
- File parentFile = new File(remoteParent);
- File fileToCreate = new File(parentFile, fileName);
- if (!fileToCreate.exists())
- {
- if (ArchiveHandlerManager.isVirtual(fileToCreate.getAbsolutePath()))
- {
- return createFileInArchive(fileToCreate);
- }
- else if (!parentFile.exists())
- {
- parentFile.mkdirs();
- }
- else
- {
- try
- {
- fileToCreate.createNewFile();
- if (ArchiveHandlerManager.getInstance().isArchive(fileToCreate))
- {
- if (!ArchiveHandlerManager.getInstance().createEmptyArchive(fileToCreate))
- {
- // SystemPlugin.logError("LocalFileSubSystemImpl.createFile(): HandlerManager's createEmptyArchive() method returned false.");
- throw new SystemMessageException(getMessage("RSEG1122")); //$NON-NLS-1$
- }
- }
- }
- catch (Exception e)
- {
- }
- }
- }
- return new LocalHostFile(fileToCreate);
- }
-
- protected LocalVirtualHostFile createFileInArchive(File newFile) throws SystemMessageException
- {
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(newFile.getAbsolutePath());
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".createFileInArchive()"); //$NON-NLS-1$
- else
- {
- if (!handler.createFile(child.fullName))
- {
- //SystemPlugin.logError("LocalFileSubSystemImpl.createFileInArchive(): Archive Handler's createFile method returned false. Couldn't create virtual object.");
- throw new SystemMessageException(getMessage("RSEG1124").makeSubstitution(newFile)); //$NON-NLS-1$
- }
- }
- return new LocalVirtualHostFile(child);
- }
-
- private void throwCorruptArchiveException(String classAndMethod) throws SystemMessageException
- {
- // SystemPlugin.logError(classAndMethod + ": Couldn't instantiate archive handler. Archive could be corrupted.");
- throw new SystemMessageException(getMessage("RSEG1122")); //$NON-NLS-1$
- }
-
- protected File getContainingArchive(File file)
- {
- String absPath = file.getAbsolutePath();
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(absPath);
- return new File(avp.getContainingArchiveString());
- }
-
- protected String getVirtualPart(String absPath)
- {
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(absPath);
- return avp.getVirtualPart();
- }
-
- public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException
- {
- File folderToCreate = new File(remoteParent, folderName);
- if (!folderToCreate.exists())
- {
- if (ArchiveHandlerManager.isVirtual(folderToCreate.getAbsolutePath()))
- {
- return createFolderInArchive(folderToCreate);
- }
- else
- {
- folderToCreate.mkdirs();
- }
- }
- return new LocalHostFile(folderToCreate);
- }
-
- protected LocalVirtualHostFile createFolderInArchive(File newFolder) throws SystemMessageException
- {
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(newFolder.getAbsolutePath());
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".createFolderInArchive()"); //$NON-NLS-1$
- else if (!handler.createFolder(child.fullName))
- {
- // SystemPlugin.logError("LocalFileSubSystemImpl.createFolderInArchive(): Archive Handler's createFolder method returned false. Couldn't create virtual object.");
- throw new SystemMessageException(getMessage("RSEG1124").makeSubstitution(newFolder)); //$NON-NLS-1$
- }
- return new LocalVirtualHostFile(child);
- }
-
- public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
- {
- if (fileName.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR))
- {
- fileName = fileName.substring(0, fileName.length() - ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
- }
- File fileToDelete = new File(remoteParent, fileName);
- if (ArchiveHandlerManager.isVirtual(fileToDelete.getAbsolutePath()))
- {
- return deleteFromArchive(fileToDelete);
- }
- else if (ArchiveHandlerManager.getInstance().isArchive(fileToDelete))
- {
- return deleteArchive(fileToDelete);
- }
- if (fileToDelete.isDirectory())
- {
- return deleteContents(monitor, fileToDelete);
- }
- else
- {
- return fileToDelete.delete();
- }
- }
-
- private boolean deleteContents(IProgressMonitor monitor, File folder)
- {
- boolean result = true;
- File[] files = folder.listFiles();
- for (int i = 0; i < files.length && result; i++)
- {
- File file = files[i];
- if (file.isDirectory())
- {
- result = deleteContents(monitor, file);
- }
- else
- {
- result = file.delete();
- }
- }
- if (result)
- {
- result = folder.delete();
- }
- return result;
- }
-
- /**
- * Deletes a virtual file from its archive.
- *
- * @param destination virtual file to delete from archive
- */
- protected boolean deleteFromArchive(File destination) throws SystemMessageException
- {
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(destination.getAbsolutePath());
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".deleteFromArchive()"); //$NON-NLS-1$
- else if (!handler.delete(child.fullName))
- {
- // SystemPlugin.logError("LocalFileSubSystemImpl.deleteFromArchive(): Archive Handler's delete method returned false. Couldn't delete virtual object.");
- throw new SystemMessageException(getMessage("RSEG1125").makeSubstitution(destination)); //$NON-NLS-1$
- }
- return true;
- }
-
- protected boolean deleteArchive(File file)
- {
- ArchiveHandlerManager.getInstance().disposeOfRegisteredHandlerFor(file);
- return file.delete();
- }
-
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName) throws SystemMessageException
- {
- File fileToRename = new File(remoteParent, oldName);
- if (ArchiveHandlerManager.isVirtual(fileToRename.getAbsolutePath()))
- {
- return renameVirtualFile(fileToRename, newName);
- }
- File newFile = new File(remoteParent, newName);
- return fileToRename.renameTo(newFile);
- }
-
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException
- {
- boolean retVal = rename(monitor, remoteParent, oldName, newName);
- File newFile = new File(remoteParent, newName);
- oldFile.renameTo(newFile.getAbsolutePath());
- return retVal;
- }
-
- /**
- * Renames a virtual file
- *
- * @param destination virtual file to rename
- * @param newName the new name of the virtual file
- * @return whether the operation was successful or not
- */
- protected boolean renameVirtualFile(File destination, String newName) throws SystemMessageException
- {
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(destination.getAbsolutePath());
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- {
- throwCorruptArchiveException(this.getClass() + ".renameVirtualFile()"); //$NON-NLS-1$
- }
- else
- {
- boolean retval = handler.rename(child.fullName, newName);
- if (!retval)
- {
- // SystemPlugin.logError("LocalFileSubSystemImpl.renameVirtualFile(): Archive Handler's rename method returned false. Couldn't rename virtual object.");
- throw new SystemMessageException(getMessage("RSEG1127").makeSubstitution(child.fullName)); //$NON-NLS-1$
- }
- return retval;
- }
- return false;
- }
-
- public boolean move(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException
- {
- File sourceFolderOrFile = new File(srcParent, srcName);
- File targetFolder = new File(tgtParent, tgtName);
- boolean sourceIsVirtual = ArchiveHandlerManager.isVirtual(sourceFolderOrFile.getAbsolutePath());
- boolean targetIsVirtual = ArchiveHandlerManager.isVirtual(targetFolder.getAbsolutePath());
- boolean targetIsArchive = ArchiveHandlerManager.getInstance().isArchive(targetFolder);
- if (sourceIsVirtual || targetIsVirtual || targetIsArchive)
- /* DKM
- * we shouldn't be moving archives like virtuals
- *|| ArchiveHandlerManager.getInstance().isRegisteredArchive(newName)
- *
- */
- {
- if (copy(monitor, srcParent, srcName, tgtParent, tgtName))
- {
- return delete(monitor, srcParent, srcName);
- }
- else return false;
- }
- else
- {
- File fileToMove = new File(srcParent, srcName);
- File newFile = new File(tgtParent, tgtName);
- return fileToMove.renameTo(newFile);
- }
- }
-
-
-
- public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException
- {
- File srcFile = new File(srcParent, srcName);
- File tgtFile = new File(tgtParent, tgtName);
-
- String command = null;
- boolean folderCopy = srcFile.isDirectory();
- String src = srcFile.getAbsolutePath();
-
-
- String target = tgtFile.getAbsolutePath();
-
- boolean sourceIsVirtual = ArchiveHandlerManager.isVirtual(src);
- boolean targetIsVirtual = ArchiveHandlerManager.isVirtual(target);
- boolean targetIsArchive = ArchiveHandlerManager.getInstance().isArchive(new File(tgtParent));
- if (sourceIsVirtual)
- {
- return copyFromArchive(srcFile, new File(tgtParent), tgtName, monitor, SystemEncodingUtil.ENCODING_UTF_8, SystemEncodingUtil.ENCODING_UTF_8, false);
- }
- if (targetIsVirtual || targetIsArchive)
- {
- return copyToArchive(srcFile, new File(tgtParent), tgtName, monitor, SystemEncodingUtil.ENCODING_UTF_8, SystemEncodingUtil.ENCODING_UTF_8, false);
- }
-
-
-// handle special characters in source and target strings
- StringBuffer srcBuf = new StringBuffer(src);
- StringBuffer tgtBuf = new StringBuffer(target);
- handleSpecialChars(srcBuf);
- handleSpecialChars(tgtBuf);
-
- src = "\"" + srcBuf.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- target = "\"" + tgtBuf.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- /*
- // handle imbedded blanks of from or to name...
- if (src.indexOf(' ') >= 0)
- src = "\"" + src + "\"";
- if (target.indexOf(' ') >= 0)
- target = "\"" + target + "\"";
- */
- boolean isWindows = System.getProperty("os.name").toLowerCase().startsWith("win"); //$NON-NLS-1$ //$NON-NLS-2$
- if (isWindows)
- {
- if (folderCopy)
- {
- command = "xcopy " + src + " " + target + " /S /E /K /Q /H /I"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- else
- {
- //command = _osCmdShell + "copy " + src + " " + target; //$NON-NLS-1$ //$NON-NLS-2$
- // create target first so that not prompted
- File targetFile = new File(tgtBuf.toString());
- if (!targetFile.exists())
- {
- // create file so as to avoid ambiguity
- try
- {
- targetFile.createNewFile();
-
- }
- catch (Exception e)
- {
- throw new RemoteFileException(e.getMessage(), e);
- }
- }
- command = _osCmdShell + "xcopy " + src + " " + target + " /Y /K /O /Q /H"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- else
- {
-
- if (folderCopy)
- {
- command = "cp -Rp " + src + " " + target; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else // it is a file
- {
- command = "cp -p " + src + " " + target; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- int rc = -1;
- try
- {
- Process p = null;
- Runtime runtime = Runtime.getRuntime();
- if (isWindows)
- {
- String theShell = "cmd /C "; //$NON-NLS-1$
- p = runtime.exec(theShell + command);
- }
- else
- {
- String theShell = "sh"; //$NON-NLS-1$
- String args[] = new String[3];
- args[0] = theShell;
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = command;
-
- p = runtime.exec(args);
- }
-
- //Process p = Runtime.getRuntime().exec(command);
- rc = p.waitFor();
-
- //rc = p.exitValue();
- }
- catch (Exception e)
- {
- throw new RemoteFileException(e.getMessage(), e);
- }
- return (rc == 0);
- }
-
- protected void handleSpecialChars(StringBuffer buf)
- {
- for (int i = 0; i < buf.length(); i++)
- {
- char c = buf.charAt(i);
-
- boolean isSpecialChar = isSpecialChar(c);
-
- if (isSpecialChar)
- {
- buf.insert(i, "\\"); //$NON-NLS-1$
- i++;
- }
- }
- }
-
- /**
- * Checks whether the given character is a special character in the shell. A special character is
- * '$', '`', '"' and '\'.
- * @param c the character to check.
- * @return <code>true</code> if the character is a special character, <code>false</code> otherwise.
- */
- protected boolean isSpecialChar(char c) {
-
- if ((c == '$') || (c == '`') || (c == '"') || (!isWindows() && (c == '\\')) ) {
-
- return true;
- }
- else {
- return false;
- }
- }
-
- /**
- * Copy a file or folder to a new target parent folder, but if
- * copying from an archive, extract the file in the encoding specified
- *
- * @param sourceFolderOrFile The file or folder to copy
- * @param targetFolder The folder to copy to. No guarantee it is on the same system, so be sure to check getSystemConnection()!
- * @param newName The new name for the copied file or folder
- * @param sourceEncoding encoding of source file
- * @param targetEncoding desired encoding of target file
- * @param isText currently unused
- * @return true iff the copy succeeded
- */
- public boolean copyFromArchive(File sourceFolderOrFile, File targetFolder, String newName, IProgressMonitor monitor, String sourceEncoding, String targetEncoding, boolean isText) throws SystemMessageException
- {
- if (sourceEncoding == null) sourceEncoding = SystemEncodingUtil.ENCODING_UTF_8;
- if (sourceEncoding == null) isText = _fileTypeRegistry.isText(sourceFolderOrFile);
- if (!(ArchiveHandlerManager.isVirtual(sourceFolderOrFile.getAbsolutePath()))) return false;
- String command = null;
- boolean folderCopy = sourceFolderOrFile.isDirectory();
- String src = sourceFolderOrFile.getAbsolutePath();
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(sourceFolderOrFile.getAbsolutePath());
- if (!(ArchiveHandlerManager.isVirtual(targetFolder.getAbsolutePath())) && !ArchiveHandlerManager.getInstance().isArchive(targetFolder))
- {
- // this is an optimization to speed up extractions from large zips. Instead of
- // extracting to a temp location and then copying the temp files to the target location
- // we simply instruct the handler to extract to the target location.
- return child.getExtractedFile(new File(targetFolder, child.name), sourceEncoding, isText);
- }
-
- src = child.getExtractedFile(sourceEncoding, isText).getAbsolutePath();
-
- if (child.isDirectory)
- {
- File tempSource = null;
- try
- {
- tempSource = File.createTempFile(child.name, "virtual"); //$NON-NLS-1$
- tempSource.deleteOnExit();
- }
- catch (IOException e)
- {
- // SystemPlugin.logError("LocalFileSubSystemImpl.copy(): Could not create temp file.", e);
- throw new SystemMessageException(getMessage("Copy failed")); //$NON-NLS-1$
- }
- tempSource.delete();
- if (!tempSource.mkdir())
- {
- // SystemPlugin.logError("LocalFileSubSystemImpl.copy(): Couldn't create temp dir.");
- throw new SystemMessageException(getMessage("RSEG1306").makeSubstitution(sourceFolderOrFile)); //$NON-NLS-1$
- }
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".copy()"); //$NON-NLS-1$
- else
- handler.extractVirtualDirectory(child.fullName, tempSource, sourceEncoding, isText);
- src = tempSource.getAbsolutePath() + File.separatorChar + child.name;
- }
- if (ArchiveHandlerManager.isVirtual(targetFolder.getAbsolutePath()) || ArchiveHandlerManager.getInstance().isArchive(targetFolder))
- {
- File source = new File(src);
- return copyToArchive(source, targetFolder, newName, monitor, SystemEncodingUtil.ENCODING_UTF_8, targetEncoding, isText);
- }
-
- String target = targetFolder.getAbsolutePath() + java.io.File.separator + newName;
- // handle embedded blanks of from or to name...
- if (src.indexOf(' ') >= 0)
- src = "\"" + src + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- if (target.indexOf(' ') >= 0)
- target = "\"" + target + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- if (System.getProperty("os.name").toLowerCase().startsWith("win")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- if (folderCopy)
- {
- command = "xcopy " + src + " " + target + " /S /E /K /Q /H /I"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- else
- command = _osCmdShell + "copy " + src + " " + target; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else
- {
- if (folderCopy)
- {
- command = "cp -r " + src + " " + target; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else // it is a file
- {
- command = "cp " + src + " " + target; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- int rc = -1;
- try
- {
- Process p = Runtime.getRuntime().exec(command);
- rc = p.exitValue();
- }
- catch (Exception e)
- {
-
- }
- return (rc == 0);
- }
-
- public void initService(IProgressMonitor monitor)
- {
-
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- }
-
- public boolean isCaseSensitive()
- {
- return !isWindows();
- }
-
- public boolean copyBatch(IProgressMonitor monitor, String[] srcParents, String[] srcNames, String tgtParent) throws SystemMessageException
- {
- boolean ok = true;
- for (int i = 0; i < srcParents.length; i++)
- {
- ok = ok && copy(monitor, srcParents[i], srcNames[i], tgtParent, srcNames[i]);
- }
- return ok;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalHostFile.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalHostFile.java
deleted file mode 100644
index 14b7b803f..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalHostFile.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix [168591] LocalHostFile missing equals()
- ********************************************************************************/
-
-package org.eclipse.rse.services.local.files;
-
-import java.io.File;
-
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.files.IHostFile;
-
-
-public class LocalHostFile implements IHostFile
-{
- private File _file;
- private boolean _isRoot = false;
- private boolean _isArchive = false;
-
- public LocalHostFile(File file)
- {
- _file = file;
- _isArchive = ArchiveHandlerManager.getInstance().isArchive(_file);
- }
-
- public LocalHostFile(File file, boolean isRoot)
- {
- _file = file;
- _isRoot = isRoot;
- _isArchive = ArchiveHandlerManager.getInstance().isArchive(_file);
-
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj instanceof LocalHostFile) {
- LocalHostFile other = (LocalHostFile)obj;
- return _file.equals(other._file)
- && _isRoot == other._isRoot
- && _isArchive == other._isArchive;
- }
- return false;
- }
-
- public String getName()
- {
- if (_isRoot)
- {
- return _file.getPath();
- }
- else
- {
- return _file.getName();
- }
- }
-
- public boolean isHidden()
- {
- String name = getName();
- return name.charAt(0) == '.';
-
- }
-
- public String getParentPath()
- {
- return _file.getParent();
- }
-
- public boolean isDirectory()
- {
- return _file.isDirectory();
- }
-
- public boolean isRoot()
- {
- return _isRoot;
- }
-
- public boolean isFile()
- {
- return _file.isFile();
- }
-
- public File getFile()
- {
- return _file;
- }
-
- public boolean exists()
- {
- return _file.exists();
- }
-
- public String getAbsolutePath()
- {
- return _file.getAbsolutePath();
- }
-
- public long getSize()
- {
- return _file.length();
- }
-
- public long getModifiedDate()
- {
- return _file.lastModified();
- }
-
- public void renameTo(String newAbsolutePath)
- {
- _file = new File(newAbsolutePath);
- _isArchive = ArchiveHandlerManager.getInstance().isArchive(_file);
- }
-
- public boolean isArchive()
- {
- return _isArchive;
- }
-
- public boolean canRead() {
- return _file.canRead();
- }
-
- public boolean canWrite() {
- return _file.canWrite();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalServiceResources.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalServiceResources.java
deleted file mode 100644
index eb24392f8..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalServiceResources.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.local.files;
-
-import org.eclipse.osgi.util.NLS;
-
-public class LocalServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.services.local.files.LocalServiceResources";//$NON-NLS-1$
-
- public static String Local_File_Service_Name;
- public static String Local_Process_Service_Name;
- public static String Local_Shell_Service_Name;
-
- public static String Local_File_Service_Description;
- public static String Local_Process_Service_Description;
- public static String Local_Shell_Service_Description;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, LocalServiceResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalServiceResources.properties b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalServiceResources.properties
deleted file mode 100644
index bd86626d2..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalServiceResources.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-Local_File_Service_Name=Local File Service
-Local_Process_Service_Name=Local Process Service
-Local_Shell_Service_Name=Local Shell Service
-
-Local_File_Service_Description=The Local File Service uses Java API to provide service to the Files subsystem on the local machine.
-Local_Process_Service_Description=The Local File Service uses Java API to provide service to the Processes subsystem on the local machine.
-Local_Shell_Service_Description=The Local File Service uses Java API to provide service to the Shells subsystem on the local machine. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalVirtualHostFile.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalVirtualHostFile.java
deleted file mode 100644
index 230b8a7ba..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/files/LocalVirtualHostFile.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.local.files;
-
-import java.io.File;
-
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-
-public class LocalVirtualHostFile extends LocalHostFile
-{
- protected File _parentArchive;
- protected VirtualChild _child;
-
- public LocalVirtualHostFile(VirtualChild child)
- {
- super(child.getContainingArchive());
- _child = child;
- _parentArchive = _child.getContainingArchive();
- }
-
- public String getName()
- {
- return _child.name;
- }
-
- public String getParentPath()
- {
- return _parentArchive.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + _child.path;
- }
-
- public boolean isDirectory()
- {
- return _child.isDirectory;
- }
-
- public boolean isRoot()
- {
- return false;
- }
-
- public boolean isFile()
- {
- return !_child.isDirectory;
- }
-
- public File getFile()
- {
- return _parentArchive;
- }
-
- public boolean exists()
- {
- return _child.exists();
- }
-
- public String getAbsolutePath()
- {
- return _child.getContainingArchive().getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + _child.fullName;
- }
-
- public VirtualChild getChild()
- {
- return _child;
- }
-
- public boolean isHidden()
- {
- return false;
- }
-
- public boolean isArchive()
- {
- return false;
- }
-
- /**
- * @see org.eclipse.rse.services.local.files.LocalHostFile#renameTo(java.lang.String)
- */
- public void renameTo(String newAbsolutePath) {
- _child.renameTo(newAbsolutePath);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/processes/LocalProcessService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/processes/LocalProcessService.java
deleted file mode 100644
index 7806c1a88..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/processes/LocalProcessService.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.local.processes;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.util.SortedSet;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.clientserver.processes.handlers.ProcessHandler;
-import org.eclipse.rse.services.clientserver.processes.handlers.ProcessHandlerManager;
-import org.eclipse.rse.services.local.ILocalService;
-import org.eclipse.rse.services.local.files.LocalServiceResources;
-import org.eclipse.rse.services.processes.AbstractProcessService;
-import org.eclipse.rse.services.processes.IProcessService;
-
-public class LocalProcessService extends AbstractProcessService implements ILocalService, IProcessService
-{
- protected String[] _statusTypes;
- protected ProcessHandler handler;
-
- public LocalProcessService()
- {
- handler = ProcessHandlerManager.getInstance().getNewProcessHandler();
- }
-
- public String getName()
- {
- return LocalServiceResources.Local_Process_Service_Name;
- }
-
- public String getDescription()
- {
- return LocalServiceResources.Local_Process_Service_Description;
- }
-
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor, IHostProcessFilter filter) throws SystemMessageException
- {
- IHostProcess[] processes = null;
-
- if (handler == null) return null;
- try
- {
- SortedSet results = handler.lookupProcesses(filter);
- processes = (IHostProcess[]) results.toArray(new IHostProcess[results.size()]);
- }
- catch (Exception e)
- {
- throw new SystemMessageException(getMessage("RSEPG1301"));
- }
- return processes;
- }
-
- public boolean kill(IProgressMonitor monitor, long PID, String signal) throws SystemMessageException
- {
- IHostProcess process = null;
- try
- {
- process = getProcess(monitor, PID);
-
- // if there is no process, simply return true
- if (process == null) {
- return true;
- }
-
- handler.kill(process, signal);
- return true;
- }
- catch (InterruptedException e)
- {
- throw new SystemMessageException(getMessage("RSEG1067"));
- }
- catch (Exception e)
- {
- String name = "";
- if (process != null) name += process.getName();
- String pid = "";
- if (process != null) pid += process.getPid();
-
- SystemMessage msg = getMessage("RSEPG1300");
- msg.makeSubstitution(name + " (" + pid + ")", e.getMessage());
- throw new SystemMessageException(msg);
- }
- }
-
- public String[] getSignalTypes()
- {
- if (_statusTypes != null)
- {
- return _statusTypes;
- }
- else
- {
- _statusTypes = internalGetSignalTypes();
- }
- return _statusTypes;
- }
-
- /**
- * Returns a list of the signal types supported by the 'kill' command on this system
- * @return a list of the signal types or null if there are none or there is an error in
- * executing the kill command.
- */
- protected String[] internalGetSignalTypes()
- {
- try
- {
- // use the kill command to find out the signal types
- Process kill = Runtime.getRuntime().exec("kill -l");
- InputStreamReader isr = new InputStreamReader(kill.getInputStream());
- if (isr == null) return null;
- BufferedReader reader = new BufferedReader(isr);
- if (reader == null) return null;
- String nextLine = reader.readLine();
- String output = "";
- while (nextLine != null)
- {
- output = output + nextLine + "\n";
- nextLine = reader.readLine();
- }
- reader.close();
- isr.close();
- if (output.equals("")) throw new Exception();
- String[] lines = output.trim().split("\\s+");
- if (lines == null) throw new Exception();
- return lines;
- }
- catch (Exception e)
- {
- //SystemPlugin.logError("LocalProcessSubSystemImpl.getSignalTypes() 'kill -l' command failed.", e);
- return null;
- }
- }
-
- public void initService(IProgressMonitor monitor)
- {
-
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/search/LocalSearchHandler.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/search/LocalSearchHandler.java
deleted file mode 100644
index 6de584f12..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/search/LocalSearchHandler.java
+++ /dev/null
@@ -1,519 +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:
- * Michael Berger (IBM) - Bug 147791 - symbolic links can cause circular search.
- ********************************************************************************/
-
-package org.eclipse.rse.services.local.search;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.HashSet;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.internal.services.local.search.LocalSearchResult;
-import org.eclipse.rse.services.clientserver.StringCompare;
-import org.eclipse.rse.services.clientserver.SystemFileClassifier;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.search.SystemSearchFileNameMatcher;
-import org.eclipse.rse.services.clientserver.search.SystemSearchLineMatch;
-import org.eclipse.rse.services.clientserver.search.SystemSearchMatch;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatchLocator;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatcher;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.local.files.LocalHostFile;
-import org.eclipse.rse.services.local.files.LocalVirtualHostFile;
-import org.eclipse.rse.services.search.IHostSearchConstants;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.ISearchHandler;
-
-/**
- * Class used to collect local search results.
- */
-public class LocalSearchHandler implements ISearchHandler
-{
-
- protected HashSet _alreadySearched;
-
- protected IHostSearchResultConfiguration _searchConfig;
-
- protected File _theFile;
-
- protected int _depth = -1;
-
- protected IFileService _fs;
-
- protected boolean _isDone;
-
- protected boolean _isCancelled;
-
- protected LocalHostFile _theRmtFile;
-
- protected SystemSearchString _searchString;
-
- protected SystemSearchStringMatcher _stringMatcher;
-
- protected boolean _isFileSearch;
-
- protected SystemSearchFileNameMatcher _fileNameMatcher;
-
- protected String _classificationString;
-
- /**
- * Constructor for local search handler.
- *
- * @param shell
- * a shell.
- * @param searchConfig
- * a search configuration.
- */
- public LocalSearchHandler(IHostSearchResultConfiguration searchConfig, IFileService fileService)
- {
-
- _searchConfig = searchConfig;
-
- _theRmtFile = (LocalHostFile) (searchConfig.getSearchTarget());
-
- // if the remote file is not virtual, then simply get the file
- if (!(_theRmtFile instanceof LocalVirtualHostFile))
- {
- _theFile = _theRmtFile.getFile();
- }
- // for virtual file, fake it with a non-existent file representing the
- // actual path (note this file won't actually exist on the filesystem)
- else
- {
- String absPath = _theRmtFile.getAbsolutePath();
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(absPath);
- _theFile = new File(avp.toString());
- }
-
- _fs = fileService;
-
- _searchString = searchConfig.getSearchString();
-
-
- boolean includeSubfolders = _searchString.isIncludeSubfolders();
-
- if (includeSubfolders)
- {
- _depth = -1;
- }
- else
- {
- _depth = 1;
- }
-
- _isCancelled = false;
- _isDone = false;
- _alreadySearched = new HashSet();
-
- _stringMatcher = new SystemSearchStringMatcher(_searchString.getTextString(), _searchString.isCaseSensitive(),
- _searchString.isTextStringRegex());
-
- // if the search string is empty or if it is an asterisk, then we are
- // doing a file search
- // i.e. we do not want to look inside files
- _isFileSearch = _stringMatcher.isSearchStringEmpty() || _stringMatcher.isSearchStringAsterisk();
-
- boolean fsCaseSensitive = _fs.isCaseSensitive();
- _fileNameMatcher = new SystemSearchFileNameMatcher(_searchString.getFileNamesString(), fsCaseSensitive,
- _searchString.isFileNamesRegex());
-
- // classification of files to restrict the search to
- _classificationString = _searchString.getClassificationString();
- }
-
- public void search(IProgressMonitor monitor)
- {
-
- // start search
- // pass in the context of the target file
- internalSearch(_theFile, _depth, _theRmtFile);
-
- _isDone = true;
-
- if (!_isCancelled)
- {
- _searchConfig.setStatus(IHostSearchConstants.FINISHED);
- }
- else
- {
- _searchConfig.setStatus(IHostSearchConstants.CANCELLED);
- }
- }
-
- public boolean isDone()
- {
- return _isDone;
- }
-
- public void cancel(IProgressMonitor monitor)
- {
- _isCancelled = true;
- }
-
- private boolean hasSearchedDirectory(File file)
- {
- try
- {
- return _alreadySearched.contains(file.getCanonicalFile());
- }
- catch (IOException e)
- {
- return _alreadySearched.contains(file);
- }
- }
-
- private boolean internalSearch(File theFile, int depth, IHostFile context)
- {
-
- boolean foundFile = false;
-
- // is it a directory? (note that for virtual the file won't exist, so it
- // will
- // return false, which is what we want!)
- boolean isDirectory = theFile.isDirectory();
-
- // is it an archive?
- boolean isArchive = ArchiveHandlerManager.getInstance().isArchive(theFile) && _searchString.isIncludeArchives();
-
- String absPath = theFile.getAbsolutePath();
- String compareStr = theFile.getName();
-
- // is it a virtual file?
- boolean isVirtual = ArchiveHandlerManager.isVirtual(absPath);
-
- // is it a virtual directory?
- boolean isVirtualDirectory = false;
-
- VirtualChild vc = null;
-
- // if it is a virtual object, then get a reference to it
- if (isVirtual)
- {
- vc = ArchiveHandlerManager.getInstance().getVirtualObject(absPath);
- isVirtualDirectory = isVirtual && vc.isDirectory;
- }
-
- // base case for the recursive method call
- // if the file is not a directory, an archive or a virtual directory,
- // and we get a match with the file name, then we can search for match
- // within the file
- if (!isDirectory && !isArchive && !isVirtualDirectory && doesFilePatternMatch(compareStr)
- && doesClassificationMatch(absPath))
- {
-
- LocalHostFile file;
-
- // if the file is a virtual file, then get matches from the archive
- // handler
- if (isVirtual)
- {
- file = new LocalVirtualHostFile(vc);
-
- SystemSearchLineMatch[] matches = null;
-
- // if it is not a file search, then call the handler search
- // method
- if (!_isFileSearch)
- {
- matches = vc.getHandler().search(vc.fullName, _stringMatcher);
- IHostSearchResult[] results = convert(file, matches);
-
- /** TODO - how to store search results related to files
- // if there is at least one match, then add the file to the
- // search results
- if (results != null && results.length > 0)
- {
- file.setContents(IHostSearchResultsContentsType.getInstance(), _searchString.toString(),
- results);
- _searchConfig.addResult(file);
- }
-
- **/
- _searchConfig.addResults(file, results);
- }
- // otherwise add the file to the search results
- else
- {
- _searchConfig.addResult(file);
- }
- }
- // otherwise, search the file
- else
- {
-
- // note that the file can not be root
- file = new LocalHostFile(theFile, false);
-
- /* TODO
- if (!isArchive)
- {
- file.setIsContainer(false);
- }
- else
- {
- file.setIsContainer(true);
- }
- */
-
- // if file search, add the file to the results
- // otherwise, search within the file and if there is at least
- // one text match, then add it
- if (_isFileSearch || internalSearchWithinFile(file, theFile))
- {
- _searchConfig.addResult(file);
- }
- else
- {
- _searchConfig.addResult(file);
- }
- }
-
- // indicate that we have found a file
- foundFile = true;
-
- if (foundFile)
- {
- // TODO refresh(_isDone);
- foundFile = false;
- }
- }
-
- // if the depth is not 0, then we need to recursively search
- if (depth != 0)
- {
-
- // if it is a directory, or an archive, or a virtual directory, then
- // we need to get the
- // children and search those
- if (isDirectory || (_searchString.isIncludeArchives() && (isArchive || isVirtualDirectory)))
- {
-
- if (!hasSearchedDirectory(theFile))
- {
-
- try
- {
- _alreadySearched.add(theFile.getCanonicalFile());
- }
- catch (IOException e)
- {
- _alreadySearched.add(theFile);
- }
-
- File[] children = null;
-
- // if the file is an archive or a virtual directory, then
- // get the children from
- // the archive handler
- if (isArchive || isVirtualDirectory)
- {
-
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(absPath);
- File archive = new File(avp.getContainingArchiveString());
- String virtualPath = avp.getVirtualPart();
-
- VirtualChild[] virtualchildren = null;
-
- try
- {
- virtualchildren = ArchiveHandlerManager.getInstance().getContents(archive, virtualPath);
- }
- catch (IOException e)
- {
- //SystemPlugin.logError("An erorr occured trying to retrieve virtual file " + virtualPath
- // + " for " + archive.getAbsolutePath(), e);
- }
-
- if (virtualchildren != null)
- {
- children = new File[virtualchildren.length];
-
- for (int i = 0; i < virtualchildren.length; i++)
- {
- AbsoluteVirtualPath newAvp = new AbsoluteVirtualPath(absPath);
- newAvp.setVirtualPart(virtualchildren[i].fullName);
- children[i] = new File(newAvp.toString());
- }
-
- if (virtualchildren.length == 0)
- {
- children = null;
- }
- }
- }
- else
- {
- children = theFile.listFiles();
- }
-
- if (children != null)
- {
-
- LocalHostFile fileImpl = null;
-
- // create local file for archive or directory which is
- // not virtual
- if (!isVirtualDirectory)
- {
-
- // if the context's parent file (which is
- // essentially the parent file of
- // the given file) is null, then it means the given
- // file is root
- boolean isRoot = false; //TODO
-
- fileImpl = new LocalHostFile(theFile, isRoot);
- }
- // create local file differently for virtual directory
- else
- {
- fileImpl = new LocalVirtualHostFile(vc);
- }
-
- for (int i = 0; i < children.length && !_isCancelled; i++)
- {
-
- File child = children[i];
-
- if (internalSearch(child, depth - 1, fileImpl))
- {
- foundFile = true;
- }
- }
- }
- }
- }
- }
-
- return foundFile;
- }
-
-
- private boolean internalSearchWithinFile(IHostFile remoteFile, File theFile)
- {
-
- // if file search, no need to look for matches within file
- if (_isFileSearch)
- {
- return true;
- }
-
- FileInputStream inputStream = null;
-
- try
- {
- inputStream = new FileInputStream(theFile);
- InputStreamReader reader = new InputStreamReader(inputStream);
- BufferedReader bufReader = new BufferedReader(reader);
-
- SystemSearchStringMatchLocator locator = new SystemSearchStringMatchLocator(bufReader, _stringMatcher);
-
- SystemSearchLineMatch[] matches = locator.locateMatches();
-
- if (matches == null || matches.length == 0)
- {
- return false;
- }
-
- IHostSearchResult[] results = convert(remoteFile, matches);
- _searchConfig.addResults(remoteFile, results);
-
- // TODO - how to store results related to files
- //remoteFile.setContents(IHostSearchResultsContentsType.getInstance(), _searchString.toString(), results);
-
- return true;
- }
- catch (IOException e)
- {
- //SystemPlugin.logError("Error occured when trying to locate matches", e);
- return false;
- }
- }
-
- protected boolean doesFilePatternMatch(String compareStr)
- {
- return _fileNameMatcher.matches(compareStr);
- }
-
- /**
- * Returns whether classification matches.
- *
- * @param absolutePath
- * the absolute path of the file for which we want to check
- * classification.
- * @return <code>true</code> if the classification matches,
- * <code>false</code> otherwise.
- */
- protected boolean doesClassificationMatch(String absolutePath)
- {
-
- if (_classificationString == null || _classificationString.equals(""))
- {
- return true;
- }
- else
- {
- String classification = SystemFileClassifier.getInstance().classifyFile(absolutePath);
- return StringCompare.compare(_classificationString, classification, true);
- }
- }
-
- /**
- * Converts from system line matches to remote search results that will show
- * up in the remote search view.
- *
- * @param remoteFile
- * the remote file for which line matches have been found.
- * @param lineMatches
- * an array of line matches, or empty if no matches.
- * @return an array of remote search results, or empty if no matches.
- */
- private IHostSearchResult[] convert(IHostFile remoteFile, SystemSearchLineMatch[] lineMatches)
- {
-
- LocalSearchResult[] results = new LocalSearchResult[lineMatches.length];
-
- for (int i = 0; i < lineMatches.length; i++)
- {
- results[i] = new LocalSearchResult(_searchConfig, remoteFile, _searchString);
- results[i].setText(lineMatches[i].getLine());
- results[i].setLine(lineMatches[i].getLineNumber());
- results[i].setIndex(i);
-
- Iterator iter = lineMatches[i].getMatches();
-
- // add matches within the line
- while (iter.hasNext())
- {
- SystemSearchMatch match = (SystemSearchMatch) iter.next();
- int startOffset = match.getStartOffset();
- int endOffset = match.getEndOffset();
- results[i].addMatch(startOffset, endOffset);
- }
- }
-
- return results;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/search/LocalSearchService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/search/LocalSearchService.java
deleted file mode 100644
index dc84fcc53..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/search/LocalSearchService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.local.search;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.search.AbstractSearchService;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.ISearchHandler;
-
-
-
-
-public class LocalSearchService extends AbstractSearchService
-{
-
- public ISearchHandler internalSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService)
- {
- LocalSearchHandler handler = new LocalSearchHandler(searchConfig, fileService);
- searchConfig.setSearchHandler(handler);
- handler.search(monitor);
- return handler;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/shells/LocalHostShell.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/shells/LocalHostShell.java
deleted file mode 100644
index c18bb81d6..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/shells/LocalHostShell.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.services.local.shells;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.internal.services.local.shells.LocalShellOutputReader;
-import org.eclipse.rse.internal.services.local.shells.LocalShellThread;
-import org.eclipse.rse.services.shells.AbstractHostShell;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellOutputReader;
-
-/**
- * @author dmcknigh
- *
- */
-public class LocalHostShell extends AbstractHostShell implements IHostShell
-{
- private LocalShellThread _shellThread;
- private LocalShellOutputReader _stdoutHandler;
- private LocalShellOutputReader _stderrHandler;
-
- public LocalHostShell(String initialWorkingDirectory, String invocation, String encoding, String[] environment)
- {
- _shellThread = new LocalShellThread(initialWorkingDirectory, invocation, encoding, environment);
- _stdoutHandler = new LocalShellOutputReader(this, _shellThread.getOutputStream(), false);
- _stderrHandler = new LocalShellOutputReader(this, _shellThread.getErrorStream(),true);
- }
-
- protected void run(IProgressMonitor monitor)
- {
- _shellThread.start();
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.shells.IHostShell#isActive()
- */
- public boolean isActive()
- {
- return _shellThread.isAlive();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.shells.IHostShell#writeToStdin(java.lang.String)
- */
- public void writeToShell(String command)
- {
- _shellThread.sendInput(command);
- }
-
- public IHostShellOutputReader getStandardOutputReader()
- {
- return _stdoutHandler;
- }
-
- public IHostShellOutputReader getStandardErrorReader()
- {
- return _stderrHandler;
- }
-
- public void exit()
- {
- writeToShell("exit");
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/shells/LocalShellService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/shells/LocalShellService.java
deleted file mode 100644
index 86e425ffa..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/services/local/shells/LocalShellService.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.local.shells;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.local.ILocalService;
-import org.eclipse.rse.services.local.files.LocalServiceResources;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-
-public class LocalShellService implements IShellService, ILocalService
-{
- private static final String SHELL_INVOCATION = ">"; //$NON-NLS-1$
- private String[] _envVars;
-
- public LocalShellService()
- {
- }
-
- public String getName()
- {
- return LocalServiceResources.Local_Shell_Service_Name;
- }
-
- public String getDescription()
- {
- return LocalServiceResources.Local_Shell_Service_Description;
- }
-
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String[] environment)
- {
- String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
- return launchShell(monitor, initialWorkingDirectory, defaultEncoding, environment);
- }
-
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String encoding, String[] environment)
- {
- LocalHostShell hostShell = new LocalHostShell(initialWorkingDirectory,SHELL_INVOCATION, encoding, environment);
- hostShell.run(monitor);
- return hostShell;
- }
-
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command, String[] environment)
- {
- String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
- return runCommand(monitor, initialWorkingDirectory, command, defaultEncoding, environment);
- }
-
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command, String encoding, String[] environment)
- {
- LocalHostShell hostShell = new LocalHostShell(initialWorkingDirectory,command, encoding, environment);
- hostShell.run(monitor);
- return hostShell;
- }
-
- public String[] getHostEnvironment()
- {
- if (_envVars == null)
- {
- List envVars = new ArrayList();
-
- String[] envCommand = new String[3];
- //If we're on windows, change the envCommand.
- if (System.getProperty("os.name").toLowerCase().startsWith("win")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- envCommand[0] = "cmd"; //$NON-NLS-1$
- envCommand[1] = "/c"; //$NON-NLS-1$
- envCommand[2] = "set"; //$NON-NLS-1$
- }
- else
- {
- envCommand[0] = "sh"; //$NON-NLS-1$
- envCommand[1] = "-c"; //$NON-NLS-1$
- envCommand[2] = "env"; //$NON-NLS-1$
- }
-
- BufferedReader reader = null;
- try
- {
- Process process = Runtime.getRuntime().exec(envCommand);
- InputStream stdout = process.getInputStream();
- InputStreamReader ireader = new InputStreamReader(stdout);
-
- reader = new BufferedReader(ireader);
- String curLine = null;
- while ((curLine = reader.readLine()) != null)
- {
- if (curLine.indexOf("=") > 0) //$NON-NLS-1$
- {
- envVars.add(curLine);
- }
- }
- reader.close();
- process.exitValue();
- }
- catch (Exception e)
- {
- if (reader != null)
- {
- try
- {
- reader.close();
- }
- catch (Exception ex)
- {
- }
- }
- }
- _envVars = (String[])envVars.toArray(new String[envVars.size()]);
- }
- return _envVars;
- }
-
- public void initService(IProgressMonitor monitor)
- {
-
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
-
- }
- public SystemMessage getMessage(String messageID)
- {
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/.classpath b/rse/plugins/org.eclipse.rse.services.ssh/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/.cvsignore b/rse/plugins/org.eclipse.rse.services.ssh/.cvsignore
deleted file mode 100644
index e043cc4e2..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-build.xml
-javaCompiler...args
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/.options b/rse/plugins/org.eclipse.rse.services.ssh/.options
deleted file mode 100644
index 536700cae..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.rse.services.ssh/debug = true
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/.project b/rse/plugins/org.eclipse.rse.services.ssh/.project
deleted file mode 100644
index 9c78ce6c1..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.services.ssh</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.core.resources.prefs b/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 15ddd8859..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jul 07 10:39:59 CEST 2006
-eclipse.preferences.version=1
-encoding//src/org/eclipse/rse/services/ssh/SshServiceResources.properties=8859_1
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.jdt.ui.prefs b/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 07346397c..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Jul 07 11:19:10 CEST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;org.eclipse.rse;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.services.ssh/META-INF/MANIFEST.MF
deleted file mode 100644
index 37b13e397..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.services.ssh;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.services.ssh.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services,
- com.jcraft.jsch;bundle-version="[0.1.28,2.0.0)"
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.services.ssh,
- org.eclipse.rse.services.ssh.files,
- org.eclipse.rse.services.ssh.shell
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/about.html b/rse/plugins/org.eclipse.rse.services.ssh/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/about.ini b/rse/plugins/org.eclipse.rse.services.ssh/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/about.mappings b/rse/plugins/org.eclipse.rse.services.ssh/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/about.properties b/rse/plugins/org.eclipse.rse.services.ssh/about.properties
deleted file mode 100644
index 14ec3b628..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation, Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer SSH Services\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/build.properties b/rse/plugins/org.eclipse.rse.services.ssh/build.properties
deleted file mode 100644
index 7a9f53507..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = META-INF/,\
- .,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- plugin.properties,\
- readme.txt,\
- eclipse32.png
-src.includes = readme.txt
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/eclipse32.png b/rse/plugins/org.eclipse.rse.services.ssh/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/plugin.properties b/rse/plugins/org.eclipse.rse.services.ssh/plugin.properties
deleted file mode 100644
index 5baa79d1a..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = RSE SSH Services
-providerName = Eclipse.org
- \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/readme.txt b/rse/plugins/org.eclipse.rse.services.ssh/readme.txt
deleted file mode 100644
index cfee96829..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/readme.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-Readme for RSE ssh service
---------------------------
-
-The RSE ssh plugin allows to connect the RSE Remote Command View to
-a remote host through the secure shell (ssh) protocol.
-This plugin is meant as a proof-of-concept. The code does not have
-product quality yet, and there are lots of open issues (marked as
-TODO in the code). But it is functional for setting up an ssh shell
-connection.
-
-__Requirements:__
-The ssh service plugin has been tested with RSE M2 candidate
-(CVS HEAD as of May 09, 2006) and Eclipse 3.2 RC3.
-The Eclipse Platform Team / CVS feature is needed for the
-com.jcraft.jsh plugin and the org.eclipse.team.cvs.ui plugin.
-
-__Installation:__
-You need an Eclipse PDE Workspace with RSE.
-Then, choose File > Import > Existing Projects > Archive File,
-to import the ssh service archive.
-
-__Usage:__
-* Start RSE, create a new system of type "SSH Only".
-* If you store your ssh private keys in a non-standard place, use
- Window > Preferences > Team > CVS > SSh2 Connection Method > General
- to set the ssh home directory, and private key types to be used.
-* Select the "Shells" node and choose Contextmenu > Launch Shell.
-* Enter your username and password on the remote system. If you want
- to use private-key authentication, just enter any dummy password -
- you will be asked for the passphrase of your keyring later, or
- the connection will succeed without further prompting if your key
- ring has an empty passphrase.
-* When asked to accept remote host authenticity, press OK.
-* Enter the correct password for ssh on the remote system (this is only
- necessary if you are not using a private key).
-
-__Known Limitations:__
-* Symbolic Links are not resolved (readlink not supported by jsch-0.1.28)
-* Ssh timeouts are not observed (no automatic reconnect)
- - after auto-logout, further actions will show a "connect cancel"
- message and connection will go down
-* Password and passphrase internal handling has not been checked for
- security against malicious reading from other Eclipse plugins.
-
-__Known Issues:__
-* A dummy password must be entered on initial connect, empty
- password should be allowed if private key authentication is used
-* After some time, the connection may freeze and need to be
- disconnected.
-* Command service should be provided in addition to the remote shell service.
-* Extremely long remote command output may lead to an Exception
- due to memory exhaustion (ArrayIndexOutOfBoundsException)
-* "Break" can not be sent to the remote system in order to cancel
- long-running jobs on the remote side.
-* The plugin currently uses some "internal" classes from the
- org.eclipse.team.cvs.ui plugin. This needs to be cleaned up.
-* For other internal coding issues, see TODO items in the code.
-
-__Changelog:__
-v0.3:
-* support Keyboard Interactive Authentication.
-* Fix interaction with RSE passwords.
-* Fix connection lost notifications
-v0.2:
-* Re-use Team/CVS/ssh2 preferences for ssh2 home and private keys specification
- Allows to do the ssh login without password if private/public key are set up.
-* Key management from Team/CVS/ssh2 Preferences can also be used
-* Add sftp files subsystem
-* Fix status after disconnect operation
-* Update about.html
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/Activator.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/Activator.java
deleted file mode 100644
index 133f7258b..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/Activator.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.services.ssh;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.core.runtime.ILog;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends Plugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- super();
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Logs an throwable to the log for this plugin.
- * @param t the Throwable to be logged.
- */
- public void logException(Throwable t) {
- ILog log = getLog();
- String id = getBundle().getSymbolicName();
- String message = NLS.bind(SshServiceResources.SshPlugin_Unexpected_Exception, t.getClass().getName(), t.getLocalizedMessage());
- IStatus status = new Status(IStatus.ERROR, id, 0, message, t);
- log.log(status);
- }
-
- //<tracing code>----------------------------------------------------
-
- private static Boolean fTracingOn = null;
- public static boolean isTracingOn() {
- if (fTracingOn==null) {
- String id = plugin.getBundle().getSymbolicName();
- String val = Platform.getDebugOption(id + "/debug"); //$NON-NLS-1$
- if ("true".equals(val)) { //$NON-NLS-1$
- fTracingOn = Boolean.TRUE;
- } else {
- fTracingOn = Boolean.FALSE;
- }
- }
- return fTracingOn.booleanValue();
- }
- public static String getTimestamp() {
- try {
- DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$
- return formatter.format(new Date());
- } catch (Exception e) {
- // If there were problems writing out the date, ignore and
- // continue since that shouldn't stop us from logging the rest
- // of the information
- }
- return Long.toString(System.currentTimeMillis());
- }
- public static void trace(String msg) {
- if (isTracingOn()) {
- String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg; //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(fullMsg);
- System.out.flush();
- }
- }
-
- //</tracing code>---------------------------------------------------
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/ISshService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/ISshService.java
deleted file mode 100644
index 445a3a335..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/ISshService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.services.ssh;
-
-/**
- * Markup Interface for services using the SshConnectorService.
- *
- * By implementing this interface, services can be recognized
- * as operating against an SshConnectorService. The interface
- * is used as the key in a table for looking up the connector
- * service when needed.
- */
-public interface ISshService {
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/ISshSessionProvider.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/ISshSessionProvider.java
deleted file mode 100644
index e85cec551..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/ISshSessionProvider.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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.services.ssh;
-
-import com.jcraft.jsch.Session;
-
-public interface ISshSessionProvider
-{
- /* Return an active SSH session from a ConnectorService. */
- public Session getSession();
-
- /* Inform the connectorService that a session has been lost. */
- public void handleSessionLost();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/SshServiceResources.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/SshServiceResources.java
deleted file mode 100644
index be3dc850e..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/SshServiceResources.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.services.ssh;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SshServiceResources extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.services.ssh.SshServiceResources"; //$NON-NLS-1$
-
- public static String SftpFileService_Error_download_size;
-
- public static String SftpFileService_Error_upload_size;
-
- public static String SshPlugin_Unexpected_Exception;
-
- public static String SftpFileService_Description;
-
- public static String SftpFileService_Error_JschSessionLost;
-
- public static String SftpFileService_Msg_Progress;
-
- public static String SftpFileService_Name;
-
- public static String SshShellService_Description;
-
- public static String SshShellService_Name;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, SshServiceResources.class);
- }
-
- private SshServiceResources() {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/SshServiceResources.properties b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/SshServiceResources.properties
deleted file mode 100644
index 48ac84520..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/SshServiceResources.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-SshPlugin_Unexpected_Exception=Unexpected {0}: {1}
-
-SftpFileService_Name=Ssh / Sftp File Service
-SftpFileService_Description=Access a remote file system via Ssh / Sftp protocol
-SftpFileService_Error_JschSessionLost=jsch session lost
-SftpFileService_Error_upload_size=Ssh upload: file size mismatch for {0}
-SftpFileService_Error_download_size=Ssh download: file size mismatch for {0}
-SftpFileService_Msg_Progress={0,number,integer} KB of {1,number,integer} KB complete ({2,number,percent})
-
-SshShellService_Name=SSH Shell Service
-SshShellService_Description=SSH Shell Service Description
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpFileService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpFileService.java
deleted file mode 100644
index f1b054763..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpFileService.java
+++ /dev/null
@@ -1,755 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- * Dave Dykstal (IBM) - fixing bug 162510: correctly process filter strings
- *******************************************************************************/
-
-package org.eclipse.rse.services.ssh.files;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.osgi.util.NLS;
-
-import com.jcraft.jsch.Channel;
-import com.jcraft.jsch.ChannelExec;
-import com.jcraft.jsch.ChannelSftp;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.SftpATTRS;
-import com.jcraft.jsch.SftpException;
-import com.jcraft.jsch.SftpProgressMonitor;
-
-import org.eclipse.rse.services.Mutex;
-import org.eclipse.rse.services.clientserver.FileTypeMatcher;
-import org.eclipse.rse.services.clientserver.IMatcher;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.AbstractFileService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.services.ssh.Activator;
-import org.eclipse.rse.services.ssh.ISshService;
-import org.eclipse.rse.services.ssh.ISshSessionProvider;
-import org.eclipse.rse.services.ssh.SshServiceResources;
-
-public class SftpFileService extends AbstractFileService implements IFileService, ISshService
-{
- //private SshConnectorService fConnector;
- private ISshSessionProvider fSessionProvider;
- private ChannelSftp fChannelSftp;
- private String fUserHome;
- private Mutex fDirChannelMutex = new Mutex();
- private long fDirChannelTimeout = 5000; //max.5 seconds to obtain dir channel
-
-// public SftpFileService(SshConnectorService conn) {
-// fConnector = conn;
-// }
-
- public SftpFileService(ISshSessionProvider sessionProvider) {
- fSessionProvider = sessionProvider;
- }
-
- public String getName() {
- return SshServiceResources.SftpFileService_Name;
- }
-
- public String getDescription() {
- return SshServiceResources.SftpFileService_Description;
- }
-
- public void connect() throws SystemMessageException {
- Activator.trace("SftpFileService.connecting..."); //$NON-NLS-1$
- try {
- Session session = fSessionProvider.getSession();
- Channel channel=session.openChannel("sftp"); //$NON-NLS-1$
- channel.connect();
- fChannelSftp=(ChannelSftp)channel;
- fUserHome = fChannelSftp.pwd();
- Activator.trace("SftpFileService.connected"); //$NON-NLS-1$
- } catch(Exception e) {
- Activator.trace("SftpFileService.connecting failed: "+e.toString()); //$NON-NLS-1$
- throw makeSystemMessageException(e);
- }
- }
-
- /**
- * Check if the main ssh session is still connected.
- * Notify ConnectorService of lost session if necessary.
- * @return <code>true</code> if the session is still healthy.
- */
- protected boolean checkSessionConnected() {
- Session session = fSessionProvider.getSession();
- if (session==null) {
- // ConnectorService has disconnected already. Nothing to do.
- return false;
- } else if (session.isConnected()) {
- // Session still healthy.
- return true;
- } else {
- // Session was lost, but ConnectorService doesn't know yet.
- // notify of lost session. May reconnect asynchronously later.
- fSessionProvider.handleSessionLost();
- return false;
- }
- }
-
- protected ChannelSftp getChannel(String task) throws SystemMessageException
- {
- Activator.trace(task);
- if (fChannelSftp==null || !fChannelSftp.isConnected()) {
- Activator.trace(task + ": channel not connected: "+fChannelSftp); //$NON-NLS-1$
- if (checkSessionConnected()) {
- //session connected but channel not: try to reconnect
- //(may throw Exception)
- connect();
- } else {
- //session was lost: returned channelSftp will be invalid.
- //This will lead to jsch exceptions (NPE, or disconnected)
- //which are ignored for now since the connection is about
- //to be disconnected anyways.
- throw makeSystemMessageException(new IOException(SshServiceResources.SftpFileService_Error_JschSessionLost));
- }
- }
- return fChannelSftp;
- }
-
- public void disconnect() {
- //disconnect-service may be called after the session is already
- //disconnected (due to event handling). Therefore, don't try to
- //check the session and notify.
- Activator.trace("SftpFileService.disconnect"); //$NON-NLS-1$
- if (fChannelSftp!=null && fChannelSftp.isConnected()) {
- fChannelSftp.disconnect();
- }
- fDirChannelMutex.interruptAll();
- fChannelSftp = null;
- }
-
-
- private SystemMessageException makeSystemMessageException(Exception e) {
- if (e instanceof SystemMessageException) {
- //dont wrap SystemMessageException again
- return (SystemMessageException)e;
- }
- else if (e instanceof SftpException) {
- //Some extra handling to keep Sftp messages
- //TODO more user-friendly messages for more Sftp exception types
- SystemMessageException messageException;
- SftpException sftpe = (SftpException)e;
- if (sftpe.id == ChannelSftp.SSH_FX_PERMISSION_DENIED) {
- messageException = new RemoteFileSecurityException(e);
- } else {
- messageException = new RemoteFileIOException(e);
- }
- messageException.getSystemMessage().makeSubstitution("Sftp: "+sftpe.toString()); //$NON-NLS-1$ //Dont translate since the exception isnt translated either
- return messageException;
- }
- return new RemoteFileIOException(e);
- }
-
- public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
- {
- //TODO getFile() must return a dummy even for non-existent files,
- //or the move() operation will fail. This needs to be described in
- //the API docs.
- SftpHostFile node = null;
- SftpATTRS attrs = null;
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- attrs = getChannel("SftpFileService.getFile").stat(remoteParent+'/'+fileName); //$NON-NLS-1$
- Activator.trace("SftpFileService.getFile done"); //$NON-NLS-1$
- node = makeHostFile(remoteParent, fileName, attrs);
- } catch(Exception e) {
- Activator.trace("SftpFileService.getFile failed: "+e.toString()); //$NON-NLS-1$
- if ( (e instanceof SftpException) && ((SftpException)e).id==ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- //We MUST NOT throw an exception here. API requires that an empty IHostFile
- //is returned in this case.
- } else {
- throw makeSystemMessageException(e);
- }
- } finally {
- fDirChannelMutex.release();
- }
- }
- if (node==null) {
- node = new SftpHostFile(remoteParent, fileName, false, false, false, 0, 0);
- node.setExists(false);
- }
- return node;
- }
-
- public boolean isConnected() {
- try {
- return getChannel("SftpFileService.isConnected()").isConnected(); //$NON-NLS-1$
- } catch(Exception e) {
- /*cannot be connected when we cannot get a channel*/
- }
- return false;
- }
-
- protected IHostFile[] internalFetch(IProgressMonitor monitor, String parentPath, String fileFilter, int fileType) throws SystemMessageException
- {
- if (fileFilter == null) {
- fileFilter = "*"; //$NON-NLS-1$
- }
- IMatcher filematcher = null;
- if (fileFilter.endsWith(",")) { //$NON-NLS-1$
- String[] types = fileFilter.split(","); //$NON-NLS-1$
- filematcher = new FileTypeMatcher(types, true);
- } else {
- filematcher = new NamePatternMatcher(fileFilter, true, true);
- }
- List results = new ArrayList();
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- Vector vv=getChannel("SftpFileService.internalFetch").ls(parentPath); //$NON-NLS-1$
- for(int ii=0; ii<vv.size(); ii++) {
- Object obj=vv.elementAt(ii);
- if(obj instanceof ChannelSftp.LsEntry){
- ChannelSftp.LsEntry lsEntry = (ChannelSftp.LsEntry)obj;
- String fileName = lsEntry.getFilename();
- if (".".equals(fileName) || "..".equals(fileName)) { //$NON-NLS-1$ //$NON-NLS-2$
- //don't show the trivial names
- continue;
- }
- if (filematcher.matches(fileName) || lsEntry.getAttrs().isDir()) {
- SftpHostFile node = makeHostFile(parentPath, fileName, lsEntry.getAttrs());
- if (isRightType(fileType, node)) {
- results.add(node);
- }
- }
- }
- }
- Activator.trace("SftpFileService.internalFetch ok"); //$NON-NLS-1$
- } catch(Exception e) {
- //TODO throw new SystemMessageException.
- //We get a "2: No such file" exception when we try to get contents
- //of a symbolic link that turns out to point to a file rather than
- //a directory. In this case, the result is probably expected.
- //We should try to classify symbolic links as "file" or "dir" correctly.
- if (checkSessionConnected()) {
- Activator.trace("SftpFileService.internalFetch failed: "+e.toString()); //$NON-NLS-1$
- throw makeSystemMessageException(e);
- }
- //TODO if not session connected, do we need to throw?
- //Probably not, since the session is going down anyways.
- } finally {
- fDirChannelMutex.release();
- }
- }
- return (IHostFile[])results.toArray(new IHostFile[results.size()]);
- }
-
- private SftpHostFile makeHostFile(String parentPath, String fileName, SftpATTRS attrs) {
- SftpATTRS attrsTarget = attrs;
- String linkTarget=null;
- if (attrs.isLink()) {
- //TODO remove comments as soon as jsch-0.1.29 is available
- // try {
- // //Note: readlink() is supported only with jsch-0.1.29 or higher.
- // //By catching the exception we remain backward compatible.
- // linkTarget=getChannel("makeHostFile.readlink").readlink(node.getAbsolutePath()); //$NON-NLS-1$
- // //TODO: Classify the type of resource linked to as file, folder or broken link
- // } catch(Exception e) {}
- //check if the link points to a directory
- try {
- getChannel("makeHostFile.chdir").cd(parentPath+'/'+fileName); //$NON-NLS-1$
- linkTarget=getChannel("makeHostFile.chdir").pwd(); //$NON-NLS-1$
- if (linkTarget!=null && !linkTarget.equals(parentPath+'/'+fileName)) {
- attrsTarget = getChannel("SftpFileService.getFile").stat(linkTarget); //$NON-NLS-1$
- } else {
- linkTarget=null;
- }
- } catch(Exception e) {
- //dangling link?
- if (e instanceof SftpException && ((SftpException)e).id==ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- linkTarget=":dangling link"; //$NON-NLS-1$
- }
- }
- }
- SftpHostFile node = new SftpHostFile(parentPath, fileName, attrsTarget.isDir(), false, attrs.isLink(), 1000L * attrs.getMTime(), attrs.getSize());
- if (linkTarget!=null) {
- node.setLinkTarget(linkTarget);
- }
- //Permissions: expect the current user to be the owner
- String perms = attrsTarget.getPermissionsString();
- if (perms.indexOf('r',1)<=0) {
- node.setReadable(false); //not readable by anyone
- }
- if (perms.indexOf('w',1)<=0) {
- node.setWritable(false); //not writable by anyone
- }
- if (node.isDirectory()) {
- if (perms.indexOf('x',1)<=0) {
- node.setWritable(false); //directories that are not executable are also not readable
- }
- } else {
- if (perms.indexOf('x',1)>0) {
- node.setExecutable(true); //executable by someone
- }
- }
- if (attrs.getExtended()!=null) {
- node.setExtendedData(attrs.getExtended());
- }
- return node;
- }
-
- public String getSeparator() {
- return "/"; //$NON-NLS-1$
- }
-
- public boolean upload(IProgressMonitor monitor, File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding) throws SystemMessageException
- {
- //TODO what to do with isBinary?
- ChannelSftp channel = null;
- //Fixing bug 158534. TODO remove when bug 162688 is fixed.
- if (monitor==null) {
- monitor = new NullProgressMonitor();
- }
- try {
- SftpProgressMonitor sftpMonitor=new MyProgressMonitor(monitor);
- int mode=ChannelSftp.OVERWRITE;
- String dst = remoteParent;
- if( remoteFile!=null ) {
- if (!dst.endsWith("/")) { //$NON-NLS-1$
- dst += '/';
- }
- dst += remoteFile;
- }
- getChannel("SftpFileService.upload "+remoteFile); //check the session is healthy //$NON-NLS-1$
- channel=(ChannelSftp)fSessionProvider.getSession().openChannel("sftp"); //$NON-NLS-1$
- channel.connect();
- channel.put(localFile.getAbsolutePath(), dst, sftpMonitor, mode);
- Activator.trace("SftpFileService.upload "+remoteFile+ " ok"); //$NON-NLS-1$ //$NON-NLS-2$
- if (monitor.isCanceled()) {
- return false;
- } else {
- SftpATTRS attr = channel.stat(dst);
- attr.setACMODTIME(attr.getATime(), (int)(localFile.lastModified()/1000));
- ////TODO check if we want to maintain permissions
- //if (!localFile.canWrite()) {
- // attr.setPERMISSIONS( attr.getPermissions() & (~00400));
- //}
- channel.setStat(dst, attr);
- if (attr.getSize() != localFile.length()) {
- //Error: file truncated? - Inform the user!!
- //TODO test if this works
- throw makeSystemMessageException(new IOException(NLS.bind(SshServiceResources.SftpFileService_Error_upload_size,dst)));
- //return false;
- }
- }
- }
- catch (Exception e) {
- Activator.trace("SftpFileService.upload "+remoteFile+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- //return false;
- }
- finally {
- if (channel!=null) channel.disconnect();
- }
- return true;
- }
-
- public static class MyProgressMonitor implements SftpProgressMonitor
- {
- private IProgressMonitor fMonitor;
- private double fWorkPercentFactor;
- private Long fMaxWorkKB;
- private long fWorkToDate;
-
- public MyProgressMonitor(IProgressMonitor monitor) {
- fMonitor = monitor;
- }
- public void init(int op, String src, String dest, long max){
- fWorkPercentFactor = 1.0 / max;
- fMaxWorkKB = new Long(max / 1024L);
- fWorkToDate = 0;
- String srcFile = new Path(src).lastSegment();
- //String desc = ((op==SftpProgressMonitor.PUT)?
- // "Uploading " : "Downloading ")+srcFile;
- String desc = srcFile;
- //TODO avoid cast from long to int
- fMonitor.beginTask(desc, (int)max);
- }
- public boolean count(long count){
- fWorkToDate += count;
- Long workToDateKB = new Long(fWorkToDate / 1024L);
- Double workPercent = new Double(fWorkPercentFactor * fWorkToDate);
- String subDesc = MessageFormat.format(
- SshServiceResources.SftpFileService_Msg_Progress,
- new Object[] {
- workToDateKB, fMaxWorkKB, workPercent
- });
- fMonitor.subTask(subDesc);
- fMonitor.worked((int)count);
- return !(fMonitor.isCanceled());
- }
- public void end(){
- fMonitor.done();
- }
- }
-
- public boolean upload(IProgressMonitor monitor, InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding) throws SystemMessageException
- {
- //TODO hack for now
- try
- {
- BufferedInputStream bis = new BufferedInputStream(stream);
- File tempFile = File.createTempFile("sftp", "temp"); //$NON-NLS-1$ //$NON-NLS-2$
- FileOutputStream os = new FileOutputStream(tempFile);
- BufferedOutputStream bos = new BufferedOutputStream(os);
-
- byte[] buffer = new byte[1024];
- int readCount;
- while( (readCount = bis.read(buffer)) > 0)
- {
- bos.write(buffer, 0, readCount);
- }
- bos.close();
- upload(monitor, tempFile, remoteParent, remoteFile, isBinary, "", hostEncoding); //$NON-NLS-1$
- }
- catch (Exception e) {
- throw makeSystemMessageException(e);
- //return false;
- }
- return true;
- }
-
- public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding) throws SystemMessageException
- {
- ChannelSftp channel = null;
- try {
- if (!localFile.exists()) {
- File localParentFile = localFile.getParentFile();
- if (!localParentFile.exists()) {
- localParentFile.mkdirs();
- }
- //localFile.createNewFile();
- }
- //TODO Ascii/binary?
- String remotePath = remoteParent+'/'+remoteFile;
- int mode=ChannelSftp.OVERWRITE;
- MyProgressMonitor sftpMonitor = new MyProgressMonitor(monitor);
- getChannel("SftpFileService.download "+remoteFile); //check the session is healthy //$NON-NLS-1$
- channel=(ChannelSftp)fSessionProvider.getSession().openChannel("sftp"); //$NON-NLS-1$
- channel.connect();
- channel.get(remotePath, localFile.getAbsolutePath(), sftpMonitor, mode);
- Activator.trace("SftpFileService.download "+remoteFile+ " ok"); //$NON-NLS-1$ //$NON-NLS-2$
- if (monitor.isCanceled()) {
- return false;
- } else {
- SftpATTRS attr = channel.stat(remotePath);
- localFile.setLastModified(1000L * attr.getMTime());
- //TODO should we set the read-only status?
- //if (0==(attrs.getPermissions() & 00400)) localFile.setReadOnly();
- if (attr.getSize() != localFile.length()) {
- //Error: file truncated? - Inform the user!!
- //TODO test if this works
- throw makeSystemMessageException(new IOException(NLS.bind(SshServiceResources.SftpFileService_Error_download_size,remotePath)));
- //return false;
- }
- }
- }
- catch (Exception e) {
- //TODO improve message and handling when trying to download a symlink
- Activator.trace("SftpFileService.download "+remoteFile+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- //Note: In case of an exception, the caller needs to ensure that in case
- //we downloaded to a temp file, the temp file is deleted again, or a
- //broken incorrect file might be synchronized back to the source, thus
- //destroying the original file!!
- //return false;
- }
- finally {
- if (channel!=null) {
- channel.disconnect();
- }
- }
- return true;
- }
-
- public IHostFile getUserHome() {
- //TODO assert: this is only called after we are connected
- int lastSlash = fUserHome.lastIndexOf('/');
- String name = fUserHome.substring(lastSlash + 1);
- String parent = fUserHome.substring(0, lastSlash);
- try {
- return getFile(null, parent, name);
- } catch(SystemMessageException e) {
- //Could not determine user home
- //return new SftpHostFile(".",".",true,false,false,0,0); //$NON-NLS-1$ //$NON-NLS-2$
- return new SftpHostFile("/", "/", true, true, false, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public IHostFile[] getRoots(IProgressMonitor monitor) {
- IHostFile root = new SftpHostFile("/", "/", true, true, false, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$
- return new IHostFile[] { root };
- }
-
- public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
- {
- IHostFile result = null;
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- String fullPath = remoteParent + '/' + fileName;
- OutputStream os = getChannel("SftpFileService.createFile").put(fullPath); //$NON-NLS-1$
- //TODO workaround bug 153118: write a single space
- //since jsch hangs when trying to close the stream without writing
- os.write(32);
- os.close();
- SftpATTRS attrs = getChannel("SftpFileService.createFile.stat").stat(fullPath); //$NON-NLS-1$
- result = makeHostFile(remoteParent, fileName, attrs);
- Activator.trace("SftpFileService.createFile ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.createFile failed: "+e.toString()); //$NON-NLS-1$
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- }
- return result;
- }
-
- public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException
- {
- IHostFile result = null;
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- String fullPath = remoteParent + '/' + folderName;
- getChannel("SftpFileService.createFolder").mkdir(fullPath); //$NON-NLS-1$
- SftpATTRS attrs = getChannel("SftpFileService.createFolder.stat").stat(fullPath); //$NON-NLS-1$
- result = makeHostFile(remoteParent, folderName, attrs);
- Activator.trace("SftpFileService.createFolder ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.createFolder failed: "+e.toString()); //$NON-NLS-1$
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- }
- return result;
- }
-
- public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException
- {
- boolean ok=false;
- Activator.trace("SftpFileService.delete.waitForLock"); //$NON-NLS-1$
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- String fullPath = remoteParent + '/' + fileName;
- SftpATTRS attrs = null;
- try {
- attrs = getChannel("SftpFileService.delete").stat(fullPath); //$NON-NLS-1$
- } catch (SftpException e) {
- //bug 154419: test for dangling symbolic link
- if (e.id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- //simply try to delete --> if it really doesnt exist, this will throw an exception
- getChannel("SftpFileService.delete.rm").rm(fullPath); //$NON-NLS-1$
- } else {
- throw e;
- }
- }
- if (attrs==null) {
- //doesn't exist, nothing to do
- ok=true;
- } else if (attrs.isDir()) {
- try {
- getChannel("SftpFileService.delete.rmdir").rmdir(fullPath); //$NON-NLS-1$
- ok=true;
- } catch(SftpException e) {
- if(e.id==ChannelSftp.SSH_FX_FAILURE) {
- //Bug 153649: Recursive directory delete
- //throw new RemoteFolderNotEmptyException();
- String fullPathQuoted = PathUtility.enQuoteUnix(fullPath);
- int rv = runCommand(monitor, "rm -rf "+fullPathQuoted); //$NON-NLS-1$
- ok = (rv==0);
- } else {
- throw e;
- }
- }
- } else {
- getChannel("SftpFileService.delete.rm").rm(fullPath); //$NON-NLS-1$
- ok=true;
- }
- Activator.trace("SftpFileService.delete ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.delete: "+e.toString()); //$NON-NLS-1$
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- }
- return ok;
- }
-
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName) throws SystemMessageException
- {
- boolean ok=false;
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- String fullPathOld = remoteParent + '/' + oldName;
- String fullPathNew = remoteParent + '/' + newName;
- getChannel("SftpFileService.rename").rename(fullPathOld, fullPathNew); //$NON-NLS-1$
- ok=true;
- Activator.trace("SftpFileService.rename ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.rename failed: "+e.toString()); //$NON-NLS-1$
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- }
- return ok;
- }
-
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException {
- // TODO dont know how to update
- return rename(monitor, remoteParent, oldName, newName);
- }
-
- private boolean progressWorked(IProgressMonitor monitor, int work) {
- boolean cancelRequested = false;
- if (monitor!=null) {
- monitor.worked(work);
- cancelRequested = monitor.isCanceled();
- }
- return cancelRequested;
- }
-
- public int runCommand(IProgressMonitor monitor, String command) throws SystemMessageException
- {
- Activator.trace("SftpFileService.runCommand "+command); //$NON-NLS-1$
- int result = -1;
- if (monitor!=null) {
- monitor.beginTask(command, 20);
- }
- Channel channel = null;
- try {
- channel=fSessionProvider.getSession().openChannel("exec"); //$NON-NLS-1$
- ((ChannelExec)channel).setCommand(command);
-
- //No user input
- channel.setInputStream(null);
- //Capture error output for exception text
- ByteArrayOutputStream err = new ByteArrayOutputStream();
- ((ChannelExec)channel).setErrStream(err);
- InputStream in=channel.getInputStream();
- channel.connect();
- byte[] tmp=new byte[1024];
- while(!channel.isClosed()){
- if( progressWorked(monitor,1) ) {
- break;
- }
- while(in.available()>0){
- int i=in.read(tmp, 0, 1024);
- if(i<0)break;
- //System.out.print(new String(tmp, 0, i));
- }
- try{Thread.sleep(1000);}catch(Exception ee){}
- }
- result = channel.getExitStatus();
- if (result!=0) {
- String errorMsg = err.toString();
- Activator.trace("SftpFileService.runCommand ok, error: "+result+", "+errorMsg); //$NON-NLS-1$ //$NON-NLS-2$
- if (errorMsg.length()>0) {
- throw makeSystemMessageException(new IOException(errorMsg));
- }
- } else {
- Activator.trace("SftpFileService.runCommand ok, result: "+result); //$NON-NLS-1$
- }
- } catch(Exception e) {
- Activator.trace("SftpFileService.runCommand failed: "+e.toString()); //$NON-NLS-1$
- throw makeSystemMessageException(e);
- } finally {
- if (monitor!=null) {
- monitor.done();
- }
- if (channel!=null) {
- channel.disconnect();
- }
- }
- return result;
- }
-
- public boolean move(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException
- {
- // move is not supported by sftp directly. Use the ssh shell instead.
- // TODO check if newer versions of sftp support move directly
- // TODO Interpret some error messages like "command not found" (use ren instead of mv on windows)
- // TODO mimic by copy if the remote does not support copying between file systems?
- Activator.trace("SftpFileService.move "+srcName); //$NON-NLS-1$
- String fullPathOld = PathUtility.enQuoteUnix(srcParent + '/' + srcName);
- String fullPathNew = PathUtility.enQuoteUnix(tgtParent + '/' + tgtName);
- int rv = runCommand(monitor, "mv "+fullPathOld+' '+fullPathNew); //$NON-NLS-1$
- return (rv==0);
- }
-
- public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException {
- // copy is not supported by sftp directly. Use the ssh shell instead.
- // TODO check if newer versions of sftp support copy directly
- // TODO Interpret some error messages like "command not found" (use (x)copy instead of cp on windows)
- Activator.trace("SftpFileService.copy "+srcName); //$NON-NLS-1$
- String fullPathOld = PathUtility.enQuoteUnix(srcParent + '/' + srcName);
- String fullPathNew = PathUtility.enQuoteUnix(tgtParent + '/' + tgtName);
- int rv = runCommand(monitor, "cp -Rp "+fullPathOld+' '+fullPathNew); //$NON-NLS-1$
- return (rv==0);
- }
-
- public boolean copyBatch(IProgressMonitor monitor, String[] srcParents, String[] srcNames, String tgtParent) throws SystemMessageException
- {
- Activator.trace("SftpFileService.copyBatch "+srcNames); //$NON-NLS-1$
- boolean ok = true;
- for (int i = 0; i < srcParents.length; i++)
- {
- //TODO check what should happen if one file throws an Exception
- //should the batch job continue?
- ok = ok && copy(monitor, srcParents[i], srcNames[i], tgtParent, srcNames[i]);
- }
- return ok;
- }
-
- public void initService(IProgressMonitor monitor) {
- Activator.trace("SftpFileService.initService"); //$NON-NLS-1$
- try
- {
- connect();
- }
- catch (Exception e)
- {
- }
- }
-
- public void uninitService(IProgressMonitor monitor) {
- Activator.trace("SftpFileService.uninitService"); //$NON-NLS-1$
- disconnect();
- }
-
- public boolean isCaseSensitive() {
- //TODO find out whether remote is case sensitive or not
- return true;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpHostFile.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpHostFile.java
deleted file mode 100644
index 80764d06e..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpHostFile.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Adapted from FTPHostFile.
- ********************************************************************************/
-
-package org.eclipse.rse.services.ssh.files;
-
-import java.io.File;
-
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.files.IHostFile;
-
-public class SftpHostFile implements IHostFile {
-
- private String fName;
- private String fParentPath;
- private boolean fIsDirectory = false;
- private boolean fIsRoot = false;
- private boolean fIsArchive = false;
- private boolean fIsReadable = true;
- private boolean fIsWritable = true;
- private boolean fIsExecutable = false;
- private boolean fExists = true;
- private long fLastModified = 0;
- private long fSize = 0;
- private boolean fIsLink = false;
- private String fLinkTarget;
- private String[] fExtended = null;
-
- //TODO just re-use or extend FTPHostFile instead of copying here?
- public SftpHostFile(String parentPath, String name, boolean isDirectory, boolean isRoot, boolean isLink, long lastModified, long size) {
- fParentPath = parentPath;
- fName = name;
- fIsDirectory = isDirectory;
- fIsRoot = isRoot;
- fLastModified = lastModified;
- fSize = size;
- fIsLink = isLink;
- fIsArchive = internalIsArchive();
- }
-
- public String getName() {
- return fName;
- }
-
- public boolean isHidden() {
- String name = getName();
- return name.charAt(0) == '.';
- }
-
- public String getParentPath() {
- return fParentPath;
- }
-
- public boolean isDirectory() {
- return fIsDirectory;
- }
-
- public boolean isFile() {
- return !(fIsDirectory || fIsRoot);
- }
-
- public boolean isRoot() {
- return fIsRoot;
- }
-
- public void setExists(boolean b) {
- fExists = b;
- }
-
- public boolean exists() {
- return fExists;
- }
-
- public String getAbsolutePath() {
- if (isRoot()) {
- return getName();
- } else {
- StringBuffer path = new StringBuffer(getParentPath());
- if (!fParentPath.endsWith("/")) //$NON-NLS-1$
- {
- path.append('/');
- }
- path.append(getName());
- return path.toString();
- }
- }
-
- public long getSize() {
- return fSize;
- }
-
- public long getModifiedDate() {
- return fLastModified;
- }
-
- public void renameTo(String newAbsolutePath) {
- int i = newAbsolutePath.lastIndexOf("/"); //$NON-NLS-1$
- if (i == -1) {
- fName = newAbsolutePath;
- }
- else {
- fParentPath = newAbsolutePath.substring(0, i);
- fName = newAbsolutePath.substring(i+1);
- }
- fIsArchive = internalIsArchive();
- }
-
- protected boolean internalIsArchive() {
- return ArchiveHandlerManager.getInstance().isArchive(new File(getAbsolutePath()))
- && !ArchiveHandlerManager.isVirtual(getAbsolutePath());
- }
-
- public boolean isArchive() {
- return fIsArchive;
- }
-
- public boolean isLink() {
- return fIsLink;
- }
-
- public void setLinkTarget(String linkTarget) {
- fLinkTarget = linkTarget;
- }
-
- public String getLinkTarget() {
- return fLinkTarget;
- }
-
- /**
- * Set Extended data as key,value pairs.
- *
- * The data is maintained as a String array, where every element
- * with an even index refers to a key, and the next element
- * refers to its value. Example
- * extended[0] = "acl"
- * extended[1] = "joe,tim"
- * extended[2] = "version"
- * extended[3] = "/main/3"
- *
- * @param extended String[] array of key,value pairs
- */
- public void setExtendedData(String[] extended) {
- fExtended = extended;
- }
-
- /**
- * Return extended data as name,value pairs.
- * @see #setExtendedData(String[])
- *
- * @return String[] array of key,value pairs
- */
- public String[] getExtendedData() {
- return fExtended;
- }
-
- public String getClassification() {
- //TODO: isExecutable(), shellscript vs. binary
- String result;
- if (isLink()) {
- result = "symbolic link"; //$NON-NLS-1$
- if (fLinkTarget!=null) {
- if (fLinkTarget.equals(":dangling link")) { //$NON-NLS-1$
- result = "broken symbolic link to `unknown'"; //$NON-NLS-1$
- } else if(isDirectory()) {
- result += "(directory):" + fLinkTarget; //$NON-NLS-1$
- } else if(canExecute()) {
- result += "(executable):" + fLinkTarget; //$NON-NLS-1$
- } else {
- result += "(file):" + fLinkTarget; //$NON-NLS-1$
- }
- }
- } else if (isFile()) {
- if (canExecute()) {
- result = "executable"; //$NON-NLS-1$
- } else {
- result = "file"; //$NON-NLS-1$
- }
- } else if (isDirectory()) {
- result = "directory"; //$NON-NLS-1$
- } else {
- result = "unknown"; //default-fallback //$NON-NLS-1$
- }
- return result;
- }
-
- public void setReadable(boolean b) {
- fIsReadable=b;
- }
- public void setWritable(boolean b) {
- fIsWritable=b;
- }
- public void setExecutable(boolean b) {
- fIsExecutable=b;
- }
-
- public boolean canRead() {
- return fIsReadable;
- }
- public boolean canWrite() {
- return fIsWritable;
- }
- public boolean canExecute() {
- return fIsExecutable;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshHostShell.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshHostShell.java
deleted file mode 100644
index 17a80e1f3..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshHostShell.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Adapted from LocalHostShell.
- ********************************************************************************/
-
-package org.eclipse.rse.services.ssh.shell;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.Hashtable;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import com.jcraft.jsch.Channel;
-import com.jcraft.jsch.ChannelShell;
-import com.jcraft.jsch.Session;
-
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.shells.AbstractHostShell;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellOutputReader;
-import org.eclipse.rse.services.ssh.ISshSessionProvider;
-
-/**
- * A Shell subsystem for SSH.
- */
-public class SshHostShell extends AbstractHostShell implements IHostShell {
-
- public static final String SHELL_INVOCATION = ">"; //$NON-NLS-1$
-
- private ISshSessionProvider fSessionProvider;
- private Channel fChannel;
- private SshShellOutputReader fStdoutHandler;
- private SshShellOutputReader fStderrHandler;
- private SshShellWriterThread fShellWriter;
-
- public SshHostShell(ISshSessionProvider sessionProvider, String initialWorkingDirectory, String commandToRun, String encoding, String[] environment) {
- try {
- fSessionProvider = sessionProvider;
- fChannel = fSessionProvider.getSession().openChannel("shell"); //$NON-NLS-1$
-
- ////disable pty mode. This works in jsch-0.1.25 and later only.
- ////By default, jsch always creates a vt100 connection sized
- ////80x24 / 640x480 (dimensions can be changed).
- ////I wonder whether jsch could give us a dumb terminal?
- //if(commandToRun!=null && !commandToRun.equals(SHELL_INVOCATION) & (fChannel instanceof ChannelShell)) {
- // ((ChannelShell)fChannel).setPty(false);
- //}
-
- //Try to set the user envionment. On most sshd configurations, this will
- //not work since in sshd_config, PermitUserEnvironment and AcceptEnv
- //settings are disabled. Still, it's worth a try.
- if (environment!=null && environment.length>0 && fChannel instanceof ChannelShell) {
- Hashtable envTable=new Hashtable();
- for(int i=0; i<environment.length; i++) {
- String curStr=environment[i];
- int curLen=environment[i].length();
- int idx = curStr.indexOf('=');
- if (idx>0 && idx<curLen-1) {
- String key=environment[i].substring(0, idx);
- String value=environment[i].substring(idx+1, curLen);
- envTable.put(key, value);
- }
- }
- ((ChannelShell)fChannel).setEnv(envTable);
- }
-
- fStdoutHandler = new SshShellOutputReader(this, new BufferedReader(new InputStreamReader(fChannel.getInputStream())), false);
- fStderrHandler = new SshShellOutputReader(this, null,true);
- OutputStream outputStream = fChannel.getOutputStream();
- //TODO check if encoding or command to execute needs to be considered
- //If a command is given, it might be possible to do without a Thread
- //Charset cs = Charset.forName(encoding);
- //PrintWriter outputWriter = new PrintWriter(
- // new BufferedWriter(new OutputStreamWriter(outputStream,cs)));
- PrintWriter outputWriter = new PrintWriter(outputStream);
- fShellWriter = new SshShellWriterThread(outputWriter);
- fChannel.connect();
- if (initialWorkingDirectory!=null && initialWorkingDirectory.length()>0
- && !initialWorkingDirectory.equals(".") //$NON-NLS-1$
- && !initialWorkingDirectory.equals("Command Shell") //$NON-NLS-1$ //FIXME workaround for bug 153047
- ) {
- writeToShell("cd "+PathUtility.enQuoteUnix(initialWorkingDirectory)); //$NON-NLS-1$
- } else if (SHELL_INVOCATION.equals(commandToRun)) {
- writeToShell(getPromptCommand());
- } else if(commandToRun!=null && commandToRun.length()>0) {
- writeToShell(commandToRun);
- }
- } catch(Exception e) {
- //TODO Forward exception to RSE properly
- e.printStackTrace();
- if (fShellWriter!=null) {
- fShellWriter.stopThread();
- fShellWriter = null;
- }
- }
- }
-
- /**
- * Connect to remote system and launch Threads for the
- * shell as needed.
- * @param monitor
- */
- protected void start(IProgressMonitor monitor)
- {
- //TODO Move stuff from constructor to here
- //TODO Set up environment variables for proper prompting, e.g. like dstore
- //varTable.put("PS1","$PWD/>");
- //varTable.put("COLUMNS","256");
- //alias ls='ls -1'
- }
-
- public boolean isActive() {
- if (fChannel!=null && !fChannel.isEOF()) {
- return true;
- }
- // shell is not active: check for session lost
- exit();
- Session session = fSessionProvider.getSession();
- if (session!=null && !session.isConnected()) {
- fSessionProvider.handleSessionLost();
- }
- return false;
- }
-
- private static final Pattern cdCommands = Pattern.compile("\\A\\s*(cd|chdir|ls)\\b"); //$NON-NLS-1$
-
- public String getPromptCommand() {
- return "echo $PWD'>'"; //$NON-NLS-1$
- }
-
- public void writeToShell(String command) {
- if (isActive()) {
- if ("#break".equals(command)) { //$NON-NLS-1$
- command = "\u0003"; //Unicode 3 == Ctrl+C //$NON-NLS-1$
- } else if (cdCommands.matcher(command).find()) {
- command += "\r\n" + getPromptCommand(); //$NON-NLS-1$
- }
- if (!fShellWriter.sendCommand(command)) {
- //exception occurred: terminate writer thread, cancel connection
- exit();
- isActive();
- }
- }
- }
-
- public IHostShellOutputReader getStandardOutputReader() {
- return fStdoutHandler;
- }
-
- public IHostShellOutputReader getStandardErrorReader() {
- return fStderrHandler;
- }
-
- public void exit() {
- fShellWriter.stopThread();
- fChannel.disconnect();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellOutputReader.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellOutputReader.java
deleted file mode 100644
index e60e36c34..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellOutputReader.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Adapted from LocalShellOutputReader.
- * Martin Oberhuber (Wind River) - Added vt100 escape sequence ignoring.
- ********************************************************************************/
-
-package org.eclipse.rse.services.ssh.shell;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-
-import org.eclipse.rse.services.shells.AbstractHostShellOutputReader;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellOutputReader;
-import org.eclipse.rse.services.shells.SimpleHostOutput;
-import org.eclipse.rse.services.ssh.Activator;
-
-/**
- * Listener to shell output. As io streams through, refresh events are sent out
- * for the OutputChangeListener to respond to.
- * VT100 terminal escape sequences are ignored.
- */
-public class SshShellOutputReader extends AbstractHostShellOutputReader
- implements IHostShellOutputReader {
-
- protected BufferedReader fReader;
- private String fPromptChars = ">$%#]"; //Characters we accept as the end of a prompt //$NON-NLS-1$;
-
- public SshShellOutputReader(IHostShell hostShell, BufferedReader reader,
- boolean isErrorReader) {
- super(hostShell, isErrorReader);
- setName("Ssh ShellOutputReader"+getName()); //$NON-NLS-1$
- fReader = reader;
- }
-
- public void dispose() {
- super.dispose();
- //check for active session and notify lost session if necessary
- getHostShell().isActive();
- }
-
- protected IHostOutput internalReadLine() {
- if (fReader == null) {
- //Our workaround sets the stderr reader to null, so we never give any stderr output.
- //TODO Check if ssh supports some method of having separate stdout and stderr streams
- return null;
- }
- StringBuffer theLine = new StringBuffer();
- StringBuffer theDebugLine = null;
- theDebugLine = new StringBuffer();
- int ch;
- boolean done = false;
- while (!done && !isFinished()) {
- try {
- ch = fReader.read();
- switch (ch) {
- case -1:
- case 65535:
- if (theLine.length() == 0) // End of Reader
- return null;
- done = true;
- break;
- case '\b': //backspace
- if(theDebugLine!=null) theDebugLine.append((char)ch);
- int len = theLine.length()-1;
- if (len>=0) theLine.deleteCharAt(len);
- break;
- case 13:
- if(theDebugLine!=null) theDebugLine.append((char)ch);
- break; // Carriage Return: dont append to the buffer
- case 10:
- if(theDebugLine!=null) theDebugLine.append((char)ch);
- done = true; // Newline
- break;
- case 9:
- //Tab: we count tabs at column 8
- //TODO Check: SystemViewRemoteOutputAdapter.translateTabs() also translates
- //Therefore this special handling here might be unnecessary
- if(theDebugLine!=null) theDebugLine.append((char)ch);
- int tabIndex = theLine.length() % 8;
- while (tabIndex < 8) {
- theLine.append(' ');
- tabIndex++;
- }
- break;
- default:
- char tch = (char) ch;
- if(theDebugLine!=null) theDebugLine.append(tch);
- if (!Character.isISOControl(tch)) {
- theLine.append(tch); // Any other character
- } else if (ch == 27) {
- // Escape: ignore next char too
- int nch = fReader.read();
- if (theDebugLine!=null) theDebugLine.append((char)nch);
- if (nch == 91) {
- //vt100 escape sequence: read until end-of-command (skip digits and semicolon)
- //e.g. \x1b;13;m --> ignore the entire command, including the trailing m
- do {
- nch = fReader.read();
- if (theDebugLine!=null) theDebugLine.append((char)nch);
- } while (Character.isDigit((char)nch) || nch == ';');
- }
- }
- }
-
- // Check to see if the BufferedReader is still ready which means
- // there are more characters
- // in the Buffer...If not, then we assume it is waiting for
- // input.
- if (!done && !fReader.ready()) {
- // wait to make sure -- max. 500 msec to wait for new chars
- // if we are not at a CRLF seems to be appropriate for the
- // Pipes and Threads in ssh.
- long waitIncrement = 500;
- // Check if we think we are at a prompt
- int len = theLine.length()-1;
- while (len>0 && Character.isSpaceChar(theLine.charAt(len))) {
- len--;
- }
- if (len>=0 && fPromptChars.indexOf(theLine.charAt(len))>=0) {
- waitIncrement = 5; //wait only 5 msec if we think it's a prompt
- }
- try {
- Thread.sleep(waitIncrement);
- } catch (InterruptedException e) {
- }
- if (!fReader.ready()) {
- done = true;
- }
- }
- } catch (IOException e) {
- //FIXME it's dangerous to return null here since this will end
- //our reader thread completely... the exception could just be
- //temporary, and we should keep running!
- Activator.getDefault().logException(e);
- return null;
- }
- }
- if (theDebugLine!=null) {
- String debugLine = theDebugLine.toString();
- debugLine.compareTo(""); //$NON-NLS-1$
- }
- return new SimpleHostOutput(theLine.toString());
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellService.java
deleted file mode 100644
index 86be00dce..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellService.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Adapted from LocalShellService.
- ********************************************************************************/
-
-package org.eclipse.rse.services.ssh.shell;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.services.ssh.ISshService;
-import org.eclipse.rse.services.ssh.ISshSessionProvider;
-import org.eclipse.rse.services.ssh.SshServiceResources;
-
-/**
- * A Shell Services for ssh.
- * Adapted from LocalShellService.
- */
-public class SshShellService implements ISshService, IShellService {
-
- private ISshSessionProvider fSessionProvider;
-
- public SshShellService(ISshSessionProvider sessionProvider) {
- fSessionProvider = sessionProvider;
- }
-
- //TODO abstract base class should handle default encodings
- public IHostShell launchShell(IProgressMonitor monitor,
- String initialWorkingDirectory, String[] environment) {
- String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
- return launchShell(monitor, initialWorkingDirectory, defaultEncoding, environment);
- }
-
- public IHostShell launchShell(IProgressMonitor monitor,
- String initialWorkingDirectory, String encoding,
- String[] environment) {
- SshHostShell hostShell = new SshHostShell(fSessionProvider, initialWorkingDirectory, SshHostShell.SHELL_INVOCATION, encoding, environment);
- return hostShell;
- }
-
- //TODO abstract base class should handle default encodings
- public IHostShell runCommand(IProgressMonitor monitor,
- String initialWorkingDirectory, String command, String[] environment) {
- String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
- return runCommand(monitor, initialWorkingDirectory, command, defaultEncoding, environment);
- }
-
- public IHostShell runCommand(IProgressMonitor monitor,
- String initialWorkingDirectory, String command, String encoding,
- String[] environment) {
- SshHostShell hostShell = new SshHostShell(fSessionProvider, initialWorkingDirectory, command, encoding, environment);
- return hostShell;
- }
-
- public String[] getHostEnvironment() {
- //TODO getHostEnvironment is not yet implemented for ssh (needs running remote command and parsing)
- return new String[0];
- }
-
- public String getName() {
- return SshServiceResources.SshShellService_Name;
- }
-
- public String getDescription() {
- return SshServiceResources.SshShellService_Description;
- }
-
- public void initService(IProgressMonitor monitor) {
- // nothing to do
- }
-
- public void uninitService(IProgressMonitor monitor) {
- // nothing to do
- }
-
- public SystemMessage getMessage(String messageID) {
- return null;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellWriterThread.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellWriterThread.java
deleted file mode 100644
index 7c9ab20f5..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellWriterThread.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.services.ssh.shell;
-
-import java.io.PrintWriter;
-
-/**
- * The SshShellWriterThread is a Thread used to print commands into
- * a running ssh shell channel.
- *
- * A separate Thread is needed because the PipedInputStream
- * used by ssh requirs that the writing end of the Pipe be
- * a Thread that remains alive during the entire lifetime
- * of the shell.
- */
-public class SshShellWriterThread extends Thread
-{
- private PrintWriter fOutputWriter;
- private String fNextCommand;
- private boolean fIsCancelled;
-
-
- /**
- * constructor for ssh shell writer thread
- * @param outputWriter PrintWriter to write to in separate Thread
- */
- public SshShellWriterThread(PrintWriter outputWriter)
- {
- super();
- fOutputWriter = outputWriter;
- setName("Ssh ShellWriter"+getName()); //$NON-NLS-1$
- start();
- }
-
- public synchronized boolean isDone()
- {
- return fIsCancelled;
- }
-
- public synchronized void stopThread()
- {
- fIsCancelled = true;
- notifyAll();
- }
-
- /**
- * Write command to remote side. Wait until the
- * thread takes the command (no queueing).
- * @param command to send
- * @return boolean true if command was sent ok
- */
- public synchronized boolean sendCommand(String command)
- {
- try {
- //In case multiple commands try to send:
- //wait until it's our turn
- while (!fIsCancelled && fNextCommand!=null) {
- wait();
- }
- if (!fIsCancelled) {
- //Now it's our turn
- fNextCommand = command;
- notifyAll();
- //Wait until our command is processed
- while (!fIsCancelled && fNextCommand!=null) {
- wait();
- }
- }
- } catch(InterruptedException e) {
- stopThread();
- }
- return !fIsCancelled;
- }
-
- public synchronized void run()
- {
- try {
- while (!fIsCancelled) {
- while (fNextCommand==null && !fIsCancelled) {
- wait();
- }
- if (!fIsCancelled) {
- fOutputWriter.println(fNextCommand);
- fNextCommand=null;
- notifyAll();
- if (fOutputWriter.checkError()) { //flush AND get error
- stopThread();
- }
- }
- }
- } catch(InterruptedException e) {
- /* no special handling -> close stream */
- } finally {
- stopThread();
- fOutputWriter.close();
- fOutputWriter = null;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/.classpath b/rse/plugins/org.eclipse.rse.services/.classpath
deleted file mode 100644
index cffa600eb..000000000
--- a/rse/plugins/org.eclipse.rse.services/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="clientserver"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.services/.cvsignore b/rse/plugins/org.eclipse.rse.services/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.services/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.services/.options b/rse/plugins/org.eclipse.rse.services/.options
deleted file mode 100644
index 128d2c418..000000000
--- a/rse/plugins/org.eclipse.rse.services/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.rse.services/debug = true
diff --git a/rse/plugins/org.eclipse.rse.services/.project b/rse/plugins/org.eclipse.rse.services/.project
deleted file mode 100644
index fe86041f3..000000000
--- a/rse/plugins/org.eclipse.rse.services/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.services</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.ui.prefs b/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 07346397c..000000000
--- a/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Jul 07 11:19:10 CEST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;org.eclipse.rse;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
diff --git a/rse/plugins/org.eclipse.rse.services/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.services/META-INF/MANIFEST.MF
deleted file mode 100644
index 593113c69..000000000
--- a/rse/plugins/org.eclipse.rse.services/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.services
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.services.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.services,
- org.eclipse.rse.services.clientserver,
- org.eclipse.rse.services.clientserver.archiveutils,
- org.eclipse.rse.services.clientserver.java,
- org.eclipse.rse.services.clientserver.messages,
- org.eclipse.rse.services.clientserver.processes,
- org.eclipse.rse.services.clientserver.processes.handlers,
- org.eclipse.rse.services.clientserver.search,
- org.eclipse.rse.services.clientserver.util.tar,
- org.eclipse.rse.services.files,
- org.eclipse.rse.services.processes,
- org.eclipse.rse.services.search,
- org.eclipse.rse.services.shells
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.services/about.html b/rse/plugins/org.eclipse.rse.services/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.services/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/build.properties b/rse/plugins/org.eclipse.rse.services/build.properties
deleted file mode 100644
index b665c7735..000000000
--- a/rse/plugins/org.eclipse.rse.services/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- clientserver.jar,\
- patterns.dat,\
- plugin.properties,\
- .
-jars.compile.order = clientserver.jar,.
-source.clientserver.jar = clientserver/
-output.clientserver.jar = clientserver.bin/
-source.. = src/,clientserver/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/FileTypeMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/FileTypeMatcher.java
deleted file mode 100644
index 8028f390f..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/FileTypeMatcher.java
+++ /dev/null
@@ -1,286 +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.services.clientserver;
-
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-/**
- * This class offers file type matching. A file type is the extension part of a file
- * name, minus the dot. For example, "java" and "class" are types.
- * <p>
- * Recently added is support for full file names, such as "manifest.mf", and even
- * extension-less names which use the placeholder ".null" for the extension, as in
- * "makefile.null" so as to dis-ambiguate from extensions like "cpp".
- * <p>
- * This supports being given a list of file types, via the constructor, to match on. It
- * will return true from the {@link #matches(String)} method if the given file name ends
- * in an extension that matches one of the given types.
- * <p>
- * By default, all matching is done case-insensitive, but this can be overridden in the
- * constructor or by calling {@link #setCaseSensitive(boolean)}.
- * <p>
- * For file name matching, use {@link org.eclipse.rse.services.clientserver.NamePatternMatcher} instead.
- */
-public class FileTypeMatcher implements IMatcher
-{
-
- /**
- * The delimiter that starts the extension part
- */
- public static final char SEP_EXTENSION = '.';
- private String[] orgTypes, types;
- private String[] orgNames, names;
- private boolean caseSensitive = false;
-
- /**
- * Constructor for case-insensitive matching
- *
- * @param types Array of file types to match on. These should not include the dot. Eg, "java"
- */
- public FileTypeMatcher(String[] types)
- {
- this(types, false);
- }
- /**
- * Constructor when specifying if matching is case-sensitive or not
- *
- * @param types Array of file types to match on. These should not include the dot. Eg, "java"
- * @param caseSensitive true if to consider case when matching
- */
- public FileTypeMatcher(String[] types, boolean caseSensitive)
- {
- setTypes(types);
- setCaseSensitive(caseSensitive);
- }
-
- /**
- * Reset the types used to match on
- */
- public void setTypes(String[] types)
- {
- this.types = types;
- this.orgTypes = types;
- setCaseSensitive(caseSensitive);
- }
- /**
- * Reset the types and names used to match on
- */
- public void setTypesAndNames(String[] types, String[] names)
- {
- this.types = types;
- this.orgTypes = types;
- this.names = names;
- this.orgNames = names;
- setCaseSensitive(caseSensitive);
- }
- /**
- * Reset the types and names used to match on
- */
- public void setTypesAndNames(String[] typesAndNames)
- {
- Vector typesVector = new Vector();
- Vector namesVector = new Vector();
- for (int idx=0; idx<typesAndNames.length; idx++)
- {
- if (typesAndNames[idx].indexOf('.')!=-1) // this is a full name!
- namesVector.add(typesAndNames[idx]);
- else
- typesVector.add(typesAndNames[idx]);
- }
- this.orgTypes = new String[typesVector.size()];
- this.orgNames = new String[namesVector.size()];
- for (int idx=0; idx<orgTypes.length; idx++)
- orgTypes[idx] = (String)typesVector.elementAt(idx);
- for (int idx=0; idx<orgNames.length; idx++)
- orgNames[idx] = (String)namesVector.elementAt(idx);
-
- this.types = orgTypes;
- this.names = orgNames;
-
- setCaseSensitive(caseSensitive);
- }
-
- /**
- * Return the types used to match on.
- * @see #toString()
- */
- public String[] getTypes()
- {
- return orgTypes;
- }
- /**
- * Return the names used to match on.
- * @see #toString()
- */
- public String[] getNames()
- {
- return orgNames;
- }
-
- /**
- * Set whether case should be considered when matching
- */
- public void setCaseSensitive(boolean caseSensitive)
- {
- this.caseSensitive = caseSensitive;
- if (!caseSensitive && (types!=null))
- {
- types = new String[orgTypes.length];
- for (int idx=0; idx<types.length; idx++)
- types[idx] = orgTypes[idx].toLowerCase();
- }
- else
- types = orgTypes;
- if (!caseSensitive && (names!=null))
- {
- names = new String[orgNames.length];
- for (int idx=0; idx<names.length; idx++)
- names[idx] = orgNames[idx].toLowerCase();
- }
- else
- names = orgNames;
- }
- /**
- * Return whether case should be considered when matching
- */
- public boolean isCaseSensitive()
- {
- return caseSensitive;
- }
-
- /**
- * Test if a host name matches the pattern of this generic name.
- * @param fileName file name such as MyClass.java
- * @return true if given extension part of name matches any of the given types
- * @see #setCaseSensitive(boolean)
- */
- public boolean matches(String fileName)
- {
- boolean matches = false;
- String type = null;
- if (fileName != null)
- {
- // check for a match of the given file's name with any of the input fullnames
- if (names != null)
- {
- String name = null;
- if (!caseSensitive)
- name = fileName.toLowerCase();
- else
- name = fileName;
- for (int idx=0; !matches && (idx<names.length); idx++)
- {
- if (name.equals(names[idx]))
- matches = true;
- else if (names[idx].endsWith(".null") && //$NON-NLS-1$
- name.equals(names[idx].substring(0,names[idx].indexOf(".null"))) ) //$NON-NLS-1$
- matches = true;
- }
- if (matches)
- return true;
- }
-
- // check for a match of the given file's extension with any of the input extensions
- int dotIdx = fileName.lastIndexOf(SEP_EXTENSION);
- int lastPos = fileName.length() - 1;
- if ((dotIdx >= 0) && (dotIdx < lastPos))
- {
- if (!caseSensitive)
- type = fileName.substring(dotIdx+1).toLowerCase(); // strip off
- else
- type = fileName.substring(dotIdx+1);
- for (int idx=0; !matches && (idx<types.length); idx++)
- if (type.equals(types[idx]))
- matches = true;
- }
- // check for an extenion-less name, and if so see if one of the types is the special-case "null" type...
- else if (dotIdx == -1)
- {
- for (int idx=0; !matches && (idx<types.length); idx++)
- if ("null".equals(types[idx])) //$NON-NLS-1$
- matches = true;
- }
- }
- return matches;
- }
-
- /**
- * For writing this object out.
- * Writes out the list of types given in the constructor, as a comma-separated list.
- * This is in the format directly usable in org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
- */
- public String toString()
- {
- StringBuffer typesBuffer = new StringBuffer(""); //$NON-NLS-1$
- if (orgTypes != null)
- {
- for (int idx=0; idx<orgTypes.length; idx++)
- typesBuffer.append(orgTypes[idx]+","); //$NON-NLS-1$
- }
- if (orgNames != null)
- {
- for (int idx=0; idx<orgNames.length; idx++)
- typesBuffer.append(orgNames[idx]+","); //$NON-NLS-1$
- }
- return typesBuffer.toString();
- }
-
- /**
- * Parse a comma-separated list of strings into an array of strings representing
- * extensions. This ignores any full-names in the input list, and only parses
- * out the extensions...
- */
- public static String[] parseTypes(String typeList)
- {
- StringTokenizer tokens = new StringTokenizer(typeList,","); //$NON-NLS-1$
- Vector v = new Vector();
- while (tokens.hasMoreTokens())
- {
- String token = tokens.nextToken().trim();
- if ((token.length()>0) &&
- (token.indexOf('.') == -1))
- v.addElement(token);
- }
- String[] types = new String[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- types[idx] = (String)v.elementAt(idx);
- return types;
- }
-
- /**
- * Parse a comma-separated list of strings into an array of full-names. This ignores
- * the extensions and only parses out the full names.
- */
- public static String[] parseNames(String typeList)
- {
- StringTokenizer tokens = new StringTokenizer(typeList,","); //$NON-NLS-1$
- Vector v = new Vector();
- while (tokens.hasMoreTokens())
- {
- String token = tokens.nextToken().trim();
- if ((token.length()>0) &&
- (token.indexOf('.') != -1))
- v.addElement(token);
- }
- String[] names = new String[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- names[idx] = (String)v.elementAt(idx);
- return names;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClassifierConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClassifierConstants.java
deleted file mode 100644
index 695562aa7..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClassifierConstants.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-/**
- * This interface defines some constants for classifiers.
- */
-public interface IClassifierConstants {
-
- /**
- * Default type.
- */
- public static final String TYPE_DEFAULT = "file"; //$NON-NLS-1$
-
- /**
- * Link type, "link".
- */
- public static final String TYPE_LINK = "link"; //$NON-NLS-1$
-
- /**
- * Java executable type, "executable(java:*)".
- */
- public static final String TYPE_EXECUTABLE_JAVA = "executable(java:*)"; //$NON-NLS-1$
-
- /**
- * Binary executable type, "executable(binary)".
- */
- public static final String TYPE_EXECUTABLE_BINARY = "executable(binary)"; //$NON-NLS-1$
-
- /**
- * Script executable type, "executable(script)".
- */
- public static final String TYPE_EXECUTABLE_SCRIPT = "executable(script)"; //$NON-NLS-1$
-
- /**
- * Match java executable type, "*executable(java:*)*".
- */
- public static final String MATCH_EXECUTABLE_JAVA = "*executable(java:*)*"; //$NON-NLS-1$
-
- /**
- * Match binary executable type, "*executable(java:*)*".
- */
- public static final String MATCH_EXECUTABLE_BINARY = "*executable(binary)*"; //$NON-NLS-1$
-
- /**
- * Match script executable type, "*executable(java:*)*".
- */
- public static final String MATCH_EXECUTABLE_SCRIPT = "*executable(script)*"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClientServerConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClientServerConstants.java
deleted file mode 100644
index 033c01a6e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClientServerConstants.java
+++ /dev/null
@@ -1,68 +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.services.clientserver;
-
-/**
- * Constants used by the Client and Server
- */
-
-public interface IClientServerConstants {
-
-
-// public static final String PLUGIN_ID ="org.eclipse.rse";
-// public static final String PREFIX = PLUGIN_ID+".";
-// // Resource Bundle ids
-// public static final String RESID_PREFIX = PREFIX+"ui.";
-// // Messages
-// public static final String MSG_PREFIX = RESID_PREFIX+"msg.";
-
- public static final String MSG_EXCEPTION_OCCURRED = "RSEG1003"; //$NON-NLS-1$
- public static final String MSG_EXCEPTION_DELETING = "RSEG1063"; //""RSEG1004"; //$NON-NLS-1$
- public static final String MSG_EXCEPTION_RENAMING = "RSEG1064"; //"RSEG1005"; //MSG_EXCEPTION_PREFIX + "Renaming"; //$NON-NLS-1$
- public static final String MSG_EXCEPTION_MOVING = "RSEG1065"; //MSG_EXCEPTION_PREFIX + "Moving"; //$NON-NLS-1$
-
- public static final String FILEMSG_DELETE_FILE_FAILED = "RSEF1300"; //$NON-NLS-1$
- public static final String FILEMSG_RENAME_FILE_FAILED = "RSEF1301"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_FILE_FAILED = "RSEF1302"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_FILE_FAILED_EXIST = "RSEF1303"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_FOLDER_FAILED = "RSEF1304"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_FOLDER_FAILED_EXIST = "RSEF1309"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_RESOURCE_NOTVISIBLE = "RSEF1310"; //$NON-NLS-1$
- public static final String FILEMSG_RENAME_RESOURCE_NOTVISIBLE = "RSEF1311"; //$NON-NLS-1$
- public static final String FILEMSG_ERROR_NOFILETYPES = "RSEF1010"; //$NON-NLS-1$
- public static final String FILEMSG_COPY_FILE_FAILED = "RSEF1306"; //$NON-NLS-1$
- public static final String FILEMSG_MOVE_FILE_FAILED = "RSEF1307"; //$NON-NLS-1$
- public static final String FILEMSG_MOVE_TARGET_EQUALS_SOURCE = "RSEF1308"; //$NON-NLS-1$
- public static final String FILEMSG_ARCHIVE_CORRUPTED = "RSEG1122"; //$NON-NLS-1$
- public static final String FILEMSG_NO_PERMISSION = "RSEF5001"; //$NON-NLS-1$
-
- public static final String FILEMSG_REMOTE_SAVE_FAILED = "RSEF5006"; //$NON-NLS-1$
- /**
- * Flag to indicate "include files only, not folders"
- */
- public static final int INCLUDE_FILES_ONLY = 2;
- /**
- * Flag to indicate "include files only, not folders"
- */
- public static final int INCLUDE_FOLDERS_ONLY = 4;
- /**
- * Flag to indicate "include files only, not folders"
- */
- public static final int INCLUDE_ALL = 8;
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IMatcher.java
deleted file mode 100644
index 94e1fc655..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IMatcher.java
+++ /dev/null
@@ -1,33 +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.services.clientserver;
-
-/**
- * Generic interface for any class whose job is to test if a given name matches
- * some filtering criteria
- */
-public interface IMatcher
-{
-
- /**
- * Test if the given name matches the given filtering criteria
- * @param input Input string to be matched
- * @return <code>true</code> if the input string matches this
- * matcher's criteria
- */
- public boolean matches(String input);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISearchPatternMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISearchPatternMatcher.java
deleted file mode 100644
index 36198a921..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISearchPatternMatcher.java
+++ /dev/null
@@ -1,27 +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.services.clientserver;
-
-/**
- *
- * Interface for different pattern matchers used in search
- */
-public interface ISearchPatternMatcher
-{
- public boolean stringMatches(String compareStr);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IServiceConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IServiceConstants.java
deleted file mode 100644
index 5101d2f23..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IServiceConstants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-public interface IServiceConstants
-{
- public static final String TOKEN_SEPARATOR = "|"; //$NON-NLS-1$
-
- // Unexpected Error
- public static final String UNEXPECTED_ERROR = "unexpectedError";
-
- // Failure strings
- public static final String FAILED_WITH_EXIST = "failed with exist";
- public static final String FAILED_WITH_DOES_NOT_EXIST = "failed with does not exist";
- public static final String FAILED_WITH_EXCEPTION = "failed with exception";
- public static final String FAILED_WITH_SECURITY = "failed with security";
- public static final String FAILED_TO_DELETE_DIR = "failed to delete directory";
-
- // Status strings for communication
- public static final String SUCCESS = "success"; //$NON-NLS-1$
- public static final String FAILED = "failed"; //$NON-NLS-1$
- public static final String VERSION_1 = "version_1"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISystemFileTypes.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISystemFileTypes.java
deleted file mode 100644
index b55772378..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISystemFileTypes.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.services.clientserver;
-
-import java.io.File;
-
-/**
- * @author dmcknigh
- */
-public interface ISystemFileTypes
-{
- public boolean isBinary(File file);
- public boolean isText(File file);
- public boolean isBinary(String file);
- public boolean isText(String file);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/NamePatternMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/NamePatternMatcher.java
deleted file mode 100644
index 2db11c68f..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/NamePatternMatcher.java
+++ /dev/null
@@ -1,468 +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.services.clientserver;
-
-import java.io.PrintWriter;
-
-/**
- * This class offers generic name pattern matching.
- * <p>
- * This supports one wildcard character ('*") anywhere in
- * the name, or one at the beginning and end of the name.
- * <ol>
- * <li>ABC </li>
- * <li>* </li>
- * <li>ABC* </li>
- * <li>*ABC </li>
- * <li>AB*C </li>
- * <li>*ABC* </li>
- * </ol>
- * <p>
- * This pattern matching class also <i>optionally</i> supports additional
- * advanced patterns beyond the stricter PDM style. These allow
- * for two '*'s anywhere in the name.
- * <ol>
- * <li>AB*C* </li>
- * <li>*A*C </li>
- * <li>A*B*C </li>
- * </ol>
- * <p>
- * Quoted names are supported.
- * <p>
- * All matching is case-sensitive!
- * <p>
- * Instantiate this class for a given generic name, and then
- * call matches(String input) for each input name to see if it
- * matches the pattern.
- * <p>
- * To enable the advanced patterns, pass <code>true</code> to the constructor.
- */
-public class NamePatternMatcher implements IMatcher
-{
-
- /**
- * Wildcard character: *
- */
- public static final char WILDCARD = '*';
- private static final String WILDCARD_DOUBLED = "**"; //$NON-NLS-1$
- /**
- * Example: Quoted name delimiter: "
- */
- public static final char QUOTE = '"';
- /**
- * Example: ABC
- */
- public static final int SCALAR = 0;
- /**
- * Example: *
- */
- public static final int ALL = 1;
- /**
- * Example: ABC*
- */
- public static final int WILDCARD_END = 2;
- /**
- * Example: *ABC
- */
- public static final int WILDCARD_START = 4;
- /**
- * Example: A*C
- */
- public static final int WILDCARD_MIDDLE = 8;
- /**
- * Example: *ABC*
- */
- public static final int WILDCARD_START_END = 16;
- /*
- * Example: A*C*
- */
- public static final int WILDCARD_MIDDLE_END = 32;
- /**
- * Example: *A*F
- */
- public static final int WILDCARD_START_MIDDLE = 64;
- /**
- * Example: A*C*F
- */
- public static final int WILDCARD_MIDDLE_MIDDLE = 128;
-
-
- // used in writeInfo debugging method
- private static final int[] TYPES_IDX = {SCALAR,ALL,WILDCARD_END,WILDCARD_START,WILDCARD_MIDDLE,
- WILDCARD_START_END,WILDCARD_MIDDLE_END,WILDCARD_START_MIDDLE,WILDCARD_MIDDLE_MIDDLE};
- private static final String[] TYPES = {"SCALAR","ALL","END","START","MIDDLE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- "START_END","MIDDLE_END","START_MIDDLE","MIDDLE_MIDDLE"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- private String genericName, part1, part2, part3;
- private int part1len,part2len,part3len,part12len,part123len;
- private int patternType;
- private boolean quotedName, validName;
- private boolean caseSensitive = true;
- /**
- * Constructor for traditional-style only patterns, which allows
- * for one asterisk anywhere in the name,or one asterisk each at the
- * beginning or end of the name.
- * <p>
- * If you don't know for sure the input is generic or valid, after
- * constructing call:
- * <sl>
- * <li> {@link #isValid()} to determine if given generic name was valid. </li>
- * <li> {@link #isGeneric()} to determine if given generic name had a wildcard. </li>
- * </sl>
- * <p>
- * If curious, you can also subsequently call:
- * <sl>
- * <li> {@link #getPatternType()} to determine which type of pattern the generic name follows. </li>
- * </sl>
- * <p>
- * Once constructed for a valid name, you can call
- * <sl>
- * <li> {@link #matches(String)} for each name to see if it matches this generic name pattern.
- * </sl>
- * <p>
- * Quoted names are supported.
- * <p>
- * All matching is case-sensitive!
- *
- * @param genericName generic name to do pattern matching for (ie, ABC*DEF)
- */
- public NamePatternMatcher(String genericName)
- {
- this(genericName, false, true);
- }
- /**
- * Constructor for traditional-style patterns PLUS advanced
- * patterns ABC*DEF* and A*C*F.
- * <p>
- * If you don't know for sure the input is generic or valid, after
- * constructing call:
- * <sl>
- * <li> {@link #isValid()} to determine if given generic name was valid. </li>
- * <li> {@link #isGeneric()} to determine if given generic name had a wildcard. </li>
- * </sl>
- * <p>
- * If curious, you can also subsequently call:
- * <sl>
- * <li> {@link #getPatternType()} to determine which type of pattern the generic name follows. </li>
- * </sl>
- * <p>
- * Once constructed for a valid name, you can call
- * <sl>
- * <li> {@link #matches(String)} for each name to see if it matches this generic name pattern.
- * </sl>
- * <p>
- * Quoted names are supported.
- *
- * @param genericName generic name to do pattern matching for (ie, ABC*DEF)
- * @param advanced true if you want to support the advanced patterns.
- * @param caseSensitive true if the names are case-sensitive, false if case insensitive
- */
- public NamePatternMatcher(String genericName, boolean advanced, boolean caseSensitive)
- {
- this.caseSensitive = caseSensitive;
- if (genericName == null)
- genericName = "*"; //$NON-NLS-1$
- int len = 0;
- // determine if given a null name
- if ((genericName == null) || (genericName.length()==0))
- validName = false;
- else
- validName = true; // for now
- if (validName)
- {
- len = genericName.length();
- // determine if given generic name is a quoted name
- quotedName = genericName.charAt(0) == QUOTE;
- if (quotedName && ((len==1) || (genericName.charAt(len-1)!=QUOTE)))
- validName = false;
- if (!quotedName && !caseSensitive)
- genericName = genericName.toLowerCase();
- }
- if (validName)
- {
- // change *BLANK into 10 blanks
- if (genericName.equals("*BLANK")) //$NON-NLS-1$
- genericName = " "; //$NON-NLS-1$
- // away we go...
- int firstCharPos = quotedName ? 1 : 0;
- int lastCharPos = quotedName ? len-2 : len-1;
- char firstChar = genericName.charAt(firstCharPos);
- char lastChar = genericName.charAt(lastCharPos);
- // determine type of generic name. 6 flavors including SCALAR...
- int wildcardOccurrences = countOccurrencesOf(genericName, WILDCARD);
- if (wildcardOccurrences==0)
- {
- patternType = SCALAR;
- }
- else if (wildcardOccurrences==1)
- {
- if ((!quotedName && (len == 1)) || (quotedName && (len ==3)) || genericName.equals("*ALL") || genericName.equals("\"*ALL\"") || genericName.equals("*LIBL")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- patternType = ALL;
- else if (firstChar == WILDCARD)
- {
- patternType = WILDCARD_START;
- part2 = genericName.substring(firstCharPos+1,lastCharPos+1);
- }
- else if (lastChar == WILDCARD)
- {
- patternType = WILDCARD_END;
- part1 = genericName.substring(firstCharPos,lastCharPos);
- }
- else
- {
- patternType = WILDCARD_MIDDLE;
- int wcPos = genericName.indexOf(WILDCARD);
- part1 = genericName.substring(firstCharPos,wcPos);
- part2 = genericName.substring(wcPos+1,lastCharPos+1);
- }
- }
- else if (wildcardOccurrences==2)
- {
- if (!advanced && (lastChar != WILDCARD) && (firstChar != WILDCARD))
- validName = false;
- else if (genericName.indexOf(WILDCARD_DOUBLED) >= 0)
- validName = false;
- else if ((firstChar == WILDCARD) && (lastChar == WILDCARD)) // pdm-style
- {
- patternType = WILDCARD_START_END;
- part1 = genericName.substring(firstCharPos+1,lastCharPos);
- }
- else if (lastChar == WILDCARD) // advanced: A*C*
- {
- patternType = WILDCARD_MIDDLE_END;
- int wcPos = genericName.indexOf(WILDCARD);
- part1 = genericName.substring(firstCharPos,wcPos);
- part2 = genericName.substring(wcPos+1,lastCharPos);
- part1len = part1.length();
- part2len = part2.length();
- part12len = part1len + part2len;
- }
- else if (firstChar == WILDCARD) // advanced: *B*C
- {
- patternType = WILDCARD_START_MIDDLE;
- int wcPos = genericName.lastIndexOf(WILDCARD);
- part1 = genericName.substring(firstCharPos+1,wcPos);
- part2 = genericName.substring(wcPos+1,lastCharPos+1);
- part1len = part1.length();
- part2len = part2.length();
- part12len = part1len + part2len;
- }
- else // advanced: A*C*F
- {
- patternType = WILDCARD_MIDDLE_MIDDLE;
- int wcPos1 = genericName.indexOf(WILDCARD);
- int wcPos2 = genericName.lastIndexOf(WILDCARD);
- part1 = genericName.substring(firstCharPos,wcPos1);
- part2 = genericName.substring(wcPos1+1,wcPos2);
- part3 = genericName.substring(wcPos2+1,lastCharPos+1);
- part1len = part1.length();
- part2len = part2.length();
- part12len = part1len + part2len;
- part123len = part12len + part3.length();
- }
- }
- else
- validName = false;
- }
- this.genericName = genericName;
- }
- /**
- * Test if a host name matches the pattern of this generic name.
- * @param input Scalar name like ABCDEF
- * @return true if given name matches this generic name pattern.
- */
- public boolean matches(String input)
- {
- boolean matches = false;
- if (validName)
- {
- if ((input.length()>2) &&
- (input.charAt(0) == QUOTE))
- input = input.substring(1,input.length()-1);
- else if (!caseSensitive)
- input = input.toLowerCase();
- switch (patternType)
- {
- case SCALAR:
- matches = input.equals(genericName);
- break;
- case ALL:
- matches = true;
- break;
- case WILDCARD_END:
- matches = input.startsWith(part1);
- break;
- case WILDCARD_START:
- matches = input.endsWith(part2);
- break;
- case WILDCARD_MIDDLE:
- matches = input.startsWith(part1) && input.endsWith(part2);
- break;
- case WILDCARD_START_END:
- matches = (input.indexOf(part1) >= 0);
- break;
- case WILDCARD_MIDDLE_END:
- if (input.startsWith(part1) && (input.length()>=part12len))
- matches = (input.indexOf(part2,part1len) >= 0);
- else
- matches = false;
- break;
- case WILDCARD_START_MIDDLE: // *B*F
- if (input.endsWith(part2) && (input.length()>=part12len))
- {
- int idx = input.indexOf(part1);
- int startOfEndPart = input.length() - part2len;
- matches = ((idx >= 0) && (idx+part1len <= startOfEndPart));
- }
- else
- matches = false;
- break;
- case WILDCARD_MIDDLE_MIDDLE: // A*C*D
- if (input.startsWith(part1) && input.endsWith(part3) && (input.length()>=part123len))
- {
- int idx = input.indexOf(part2);
- int startOfEndPart = input.length() - part3len;
- matches = ((idx >= 0) && (idx >= part1len) && (idx <= startOfEndPart));
- }
- else
- matches = false;
- break;
- }
- }
- return matches;
- }
-
- /**
- * Was generic name given in the constructor a valid scalar or generic name?
- * @return true if name contained 0, 1 or 2 wildcards.
- */
- public boolean isValid()
- {
- return validName;
- }
- /**
- * Was generic name given in the constructor a valid generic name (one or 2 '*'s)?
- */
- public boolean isGeneric()
- {
- return patternType != SCALAR;
- }
- /**
- * Was quoted name given in the constructor a quoted name like "abcDEF"?
- */
- public boolean isQuoted()
- {
- return quotedName;
- }
- /**
- * What type of pattern is it? One of:
- * {@link #SCALAR}, {@link #ALL}, {@link #WILDCARD_END}, {@link #WILDCARD_START}, {@link #WILDCARD_MIDDLE},
- * {@link #WILDCARD_START_END}, or {@link #WILDCARD_MIDDLE_END}
- */
- public int getPatternType()
- {
- return patternType;
- }
- /**
- * Helper method.
- * Count occurrences of given character in given string.
- * Does NOT take into account quoted names.
- */
- private static int countOccurrencesOf(String haystack, char needle)
- {
- int count = 0;
- for (int idx=0; idx<haystack.length(); idx++)
- {
- if (haystack.charAt(idx) == needle)
- ++count;
- }
- return count;
- }
-
- /**
- * For writing this object out.
- * Writes out the original generic name specified in the constructor.
- */
- public String toString()
- {
- return genericName;
- }
- /**
- * For debugging/testing purposes.
- * Writes out information about this generic name to the given stream file.
- */
- public void writeInfo(PrintWriter stream)
- {
- stream.println("GENERIC NAME: " + genericName); //$NON-NLS-1$
- stream.println(" isValid: " + isValid()); //$NON-NLS-1$
- stream.println(" isGeneric: " + isGeneric()); //$NON-NLS-1$
- stream.println(" isQuoted: " + isQuoted()); //$NON-NLS-1$
- int type = getPatternType();
- int typeidx = 0;
- boolean match=false;
- for (int idx=0; !match && (idx<TYPES_IDX.length); idx++)
- if (type == TYPES_IDX[idx])
- {
- typeidx = idx;
- match = true;
- }
- stream.println(" patternType: " + TYPES[typeidx]); //$NON-NLS-1$
- if (part1 != null)
- stream.println(" part1: " + part1); //$NON-NLS-1$
- if (part2 != null)
- stream.println(" part2: " + part2); //$NON-NLS-1$
- if (part3 != null)
- stream.println(" part3: " + part3); //$NON-NLS-1$
- stream.println();
- stream.flush();
- }
-
- /**
- * Static method to test if a given pattern is a valid generic name
- * @param genericName pattern to test
- * @param advanced true if advanced pattern allowed: ABC*DEF* and A*C*F
- * @true if there are no obvious syntactical errors, like two asterisks together.
- */
- public static boolean verifyPattern(String genericName, boolean advanced)
- {
- if (genericName != null)
- genericName = genericName.trim();
- else
- return false;
- // determine if given a null name
- if (genericName.length()==0)
- return false;
- int len = genericName.length();
- // determine if given generic name is a quoted name
- boolean quotedName = (genericName.charAt(0) == QUOTE);
- if (quotedName && ((len==1) || (genericName.charAt(len-1)!=QUOTE)))
- return false;
- int wildcardOccurrences = countOccurrencesOf(genericName, WILDCARD);
- if (wildcardOccurrences==2)
- {
- char firstChar = genericName.charAt((quotedName ? 1 : 0));
- char lastChar = genericName.charAt((quotedName ? (len-2) : (len-1)));
- if (!advanced && (lastChar != WILDCARD) && (firstChar != WILDCARD))
- return false;
- else if (genericName.indexOf(WILDCARD_DOUBLED) >= 0)
- return false;
- }
- else if (wildcardOccurrences > 2)
- return false;
- return true;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java
deleted file mode 100644
index 6b32b1c8e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 161844 - regex matching backslashes
- * Martin Oberhuber (Wind River) - Fix 162781 - normalize without replaceAll()
- * Martin Oberhuber (Wind River) - Use pre-compiled regex Pattern
- * Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-import java.util.regex.Pattern;
-
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-
-public class PathUtility
-{
- //Regex pattern: / or \\
- private static Pattern badSlashPatternWin=Pattern.compile("/|\\\\\\\\"); //$NON-NLS-1$
-
- public static String normalizeWindows(String path)
- {
- if (path == null || path.length() < 2) {
- return path;
- }
- boolean endsWithSlash = (path.endsWith("\\") || path.endsWith("/")); //$NON-NLS-1$ //$NON-NLS-2$
- if (badSlashPatternWin.matcher(path).find()) {
- //Replace /->\, then replace \\->\
- StringBuffer buf = new StringBuffer(path.length());
- boolean foundBackslash=false;
- for (int i=0; i<path.length(); i++) {
- char c = path.charAt(i);
- if (c=='/') {
- c='\\';
- }
- if (c=='\\') {
- if (!foundBackslash) {
- foundBackslash=true;
- buf.append(c);
- }
- } else {
- foundBackslash=false;
- buf.append(c);
- }
- }
- if (endsWithSlash && buf.length()!=3) {
- buf.deleteCharAt(buf.length()-1);
- }
- path = buf.toString();
- } else if (endsWithSlash && path.length()!=3) {
- //remove trailing slash only
- path = path.substring(0, path.length() - 1);
- }
- return path;
- }
-
- //Regex pattern: \ or //
- private static Pattern badSlashPatternUnix=Pattern.compile("\\\\|//"); //$NON-NLS-1$
-
- public static String normalizeUnix(String path)
- {
- if (path == null || path.length() < 2) {
- return path;
- }
- boolean endsWithSlash = (path.endsWith("\\") || path.endsWith("/")); //$NON-NLS-1$ //$NON-NLS-2$
- if (badSlashPatternUnix.matcher(path).find()) {
- //Replace \->/, then replace //->/
- StringBuffer buf = new StringBuffer(path.length());
- boolean foundSlash=false;
- for (int i=0; i<path.length(); i++) {
- char c = path.charAt(i);
- if (c=='\\') {
- c='/';
- }
- if (c=='/') {
- if (!foundSlash) {
- foundSlash=true;
- buf.append(c);
- }
- } else {
- foundSlash=false;
- buf.append(c);
- }
- }
- if (endsWithSlash && buf.length()!=1) {
- buf.deleteCharAt(buf.length()-1);
- }
- path = buf.toString();
- } else if (endsWithSlash && path.length()!=1) {
- //remove trailing slash only
- path = path.substring(0, path.length() - 1);
- }
- return path;
- }
-
- public static String normalizeVirtualWindows(String path)
- {
- if (path == null || path.length() < 2) return path;
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(path);
- String realPart = avp.getContainingArchiveString();
- if (ArchiveHandlerManager.isVirtual(realPart))
- realPart = normalizeVirtualWindows(realPart);
- else realPart = normalizeWindows(realPart);
- return realPart + ArchiveHandlerManager.VIRTUAL_SEPARATOR + avp.getVirtualPart();
- }
-
- public static String normalizeVirtualUnix(String path)
- {
- if (path == null || path.length() < 2) return path;
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(path);
- String realPart = avp.getContainingArchiveString();
- if (ArchiveHandlerManager.isVirtual(realPart))
- realPart = normalizeVirtualUnix(realPart);
- else realPart = normalizeUnix(realPart);
- return realPart + ArchiveHandlerManager.VIRTUAL_SEPARATOR + avp.getVirtualPart();
- }
-
- public static String normalizeUnknown(String path)
- {
- if (path == null || path.length() < 2) return path;
- if (path.charAt(1) == ':')
- if (path.indexOf(ArchiveHandlerManager.VIRTUAL_CANONICAL_SEPARATOR) == -1)
- return normalizeWindows(path);
- else return normalizeVirtualWindows(path);
- else if (path.charAt(0) == '/')
- if (path.indexOf(ArchiveHandlerManager.VIRTUAL_CANONICAL_SEPARATOR) == -1)
- return normalizeUnix(path);
- else return normalizeVirtualUnix(path);
- else return path;
- }
-
- public static String getSeparator(String path)
- {
- if (path.length() > 1 && path.charAt(1) == ':')
- {
- return "\\"; //$NON-NLS-1$
- }
- else
- {
- return "/"; //$NON-NLS-1$
- }
- }
-
- /**
- * Quotes a string such that it can be used in a remote UNIX shell.
- *
- * This has been tested with sh, bash and tcsh shells.
- * On Windows, special characters likes quotes and dollar sign. and
- * - most importantly - the backslash will not be quoted correctly.
- *
- * Newline is only quoted correctly in tcsh. But since this is mainly
- * intended for file names, it should work OK in almost every case.
- *
- * @param s String to be quoted
- * @return quoted string, or original if no quoting was necessary.
- */
- public static String enQuoteUnix(String s) {
- if(fValidShellPattern.matcher(s).matches()) {
- return s;
- } else {
- StringBuffer buf = new StringBuffer(s.length()+16);
- buf.append('"');
- for(int i=0; i<s.length(); i++) {
- char c=s.charAt(i);
- switch(c) {
- case '$':
- //Need to treat specially to work in both bash and tcsh:
- //close the quote, insert quoted $, reopen the quote
- buf.append('"');
- buf.append('\\');
- buf.append('$');
- buf.append('"');
- break;
- case '"':
- case '\\':
- case '\'':
- case '`':
- case '\n':
- //just quote it. The newline will work in tcsh only -
- //bash replaces it by the empty string. But newlines
- //in filenames are an academic issue, hopefully.
- buf.append('\\');
- buf.append(c);
- break;
- default:
- buf.append(c);
- }
- }
- buf.append('"');
- return buf.toString();
- }
- }
- private static Pattern fValidShellPattern = Pattern.compile("[a-zA-Z0-9._/]*"); //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/RegexPatternMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/RegexPatternMatcher.java
deleted file mode 100644
index fb6b27480..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/RegexPatternMatcher.java
+++ /dev/null
@@ -1,40 +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.services.clientserver;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * A pattern matcher used for search that uses regex
- */
-public class RegexPatternMatcher implements ISearchPatternMatcher
-{
- private Pattern _regexPattern;
-
- public RegexPatternMatcher(String pattern)
- {
- _regexPattern = Pattern.compile(pattern);
- }
-
- public boolean stringMatches(String compareString)
- {
- Matcher matcher = _regexPattern.matcher(compareString);
- return matcher.matches();
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringCompare.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringCompare.java
deleted file mode 100644
index 8ea884047..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringCompare.java
+++ /dev/null
@@ -1,123 +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.services.clientserver;
-
-/**
- * Utility class for comparing a wildcard string to another string
- */
-public class StringCompare
-{
-
- /**
- * Constructor
- */
- public StringCompare()
- {
- }
-
- /**
- * Compare two strings
- *
- * @param pattern the pattern to match
- * @param compareStr the string to compare against the pattern
- * @param noCase indicates whether the strings should be compared based on case
- * @return true if the compare string matches the pattern
- */
- public static boolean compare(String pattern, String compareStr, boolean noCase)
- {
- if ((pattern == null) || (compareStr == null))
- return false;
-
- if (noCase)
- {
- pattern = pattern.toUpperCase();
- compareStr = compareStr.toUpperCase();
- }
-
- int iText = 0;
- int iPattern = 0;
- int lastStar = 0;
- int len = compareStr.length();
-
- int patternLen = pattern.length();
-
- while (iPattern < patternLen)
- {
- char p = pattern.charAt(iPattern++);
- if (p == '*')
- {
-
- if (iPattern >= patternLen)
- {
- while (iText < len)
- {
- iText++;
- }
- return true;
- }
- else
- {
- lastStar = iPattern;
- }
- }
- else
- {
- if (iText >= len)
- {
- return false;
- }
- else
- {
- char t = compareStr.charAt(iText++);
- if (p == t)
- {
- if ((lastStar > 0) && (iPattern >= patternLen) && (iText < len))
- {
- }
- else
- {
- continue;
- }
-
- }
- else
- {
- if (lastStar == 0)
- {
- return false;
- }
- }
-
- int matched = iPattern - lastStar - 1;
- iPattern = lastStar;
-
- iText -= matched;
- }
- }
- }
-
- if (iText >= len)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringComparePatternMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringComparePatternMatcher.java
deleted file mode 100644
index 5929d4780..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/StringComparePatternMatcher.java
+++ /dev/null
@@ -1,35 +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.services.clientserver;
-
-/*
- * A pattern matcher for search that uses wildcard based compares
- */
-public class StringComparePatternMatcher implements ISearchPatternMatcher
-{
- private String _pattern;
-
- public StringComparePatternMatcher(String pattern)
- {
- _pattern = pattern;
- }
-
- public boolean stringMatches(String compareString)
- {
- return StringCompare.compare(_pattern, compareString, true);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemEncodingUtil.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemEncodingUtil.java
deleted file mode 100644
index 5a7b8f47e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemEncodingUtil.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-/**
- * A singleton class that contains useful methods related to encodings.
- */
-public class SystemEncodingUtil {
-
- private static SystemEncodingUtil instance;
- public static String ENCODING_UTF_8 = "UTF-8"; //$NON-NLS-1$
-
- /**
- * Constructor to create the utility class.
- */
- private SystemEncodingUtil() {
- super();
- }
-
- /**
- * Returns the singleton instance of the utility class.
- * @return the singleton instance.
- */
- public static SystemEncodingUtil getInstance() {
-
- if (instance == null) {
- instance = new SystemEncodingUtil();
- }
-
- return instance;
- }
-
- /**
- * Gets the encoding of the environment. This is the encoding being used by the JVM,
- * which by default is the machine encoding, unless changed explicitly.
- * @return the evironment encoding.
- */
- public String getEnvironmentEncoding() {
- return System.getProperty("file.encoding"); //$NON-NLS-1$
- }
-
- /**
- * Returns whether the file is an XML file.
- * @param filePath the file path.
- * @return <code>true</code> if the file is an XML file, <code>false</code> otherwise.
- */
- public boolean isXML(String filePath) {
-
- int index = filePath.lastIndexOf("."); //$NON-NLS-1$
-
- // check if there is a "."
- if (index == -1) {
- return false;
- }
- else {
-
- // check if the name ends with "."
- if (index == filePath.length() - 1) {
- return false;
- }
- else {
- String extension = filePath.substring(index+1);
-
- if (extension.equalsIgnoreCase("xml") || extension.equalsIgnoreCase("xmi")) { //$NON-NLS-1$ //$NON-NLS-2$
- return true;
- }
- else {
- return false;
- }
- }
- }
- }
-
- /**
- * Gets the encoding of an XML file.
- * @param filePath the file path.
- * @return the encoding, or <code>null</code> if the encoding could not be determined.
- */
- public String getXMLFileEncoding(String filePath) throws IOException {
-
- String encoding = null;
-
- // this is an implementation of the encoding detection algorithm
- // as specified in Appendix F of the XML specification
-
- FileInputStream stream = new FileInputStream(filePath);
-
- // try to get the encoding if the file starts with a BOM
- String encodingGuess = getEncodingFromBOM(stream);
-
- stream.close();
-
- // if no BOM, read in bytes corresponding to the first four chars in the header, i.e. "<?xm"
- // and try to determine the encoding from that
- if (encodingGuess == null) {
-
- stream = new FileInputStream(filePath);
-
- byte[] temp = new byte[4];
-
- stream.read(temp);
-
- stream.close();
-
- // UTF-8, ISO 646, ASCII, some part of ISO 8859, Shift-JIS, EUC, or any other 7-bit,
- // 8-bit, or mixed-width encoding which ensures that the characters of ASCII have their
- // normal positions, width, and values; the actual encoding declaration must be read to
- // detect which of these applies, but since all of these encodings use the same bit patterns
- // for the relevant ASCII characters, the encoding declaration itself may be read reliably
- if (temp[0] == 0x3C && temp[1] == 0x3F && temp[2] == 0x78 && temp[3] == 0x6D) {
- encodingGuess = SystemEncodingUtil.ENCODING_UTF_8;
- }
-
- // UCS-4 or other encoding with a 32-bit code unit and ASCII characters encoded as
- // ASCII values, in respectively big-endian (1234), little-endian (4321) and two
- // unusual byte orders (2143 and 3412). The encoding declaration must be read to
- // determine which of UCS-4 or other supported 32-bit encodings applies.
-
- // UCS-4, big-endian order (1234 order)
- else if (temp[0] == 0x00 && temp[1] == 0x00 && temp[2] == 0x00 && temp[3] == 0x3C) {
- encodingGuess = null;
- }
- // UCS-4, little-endian order (4321 order)
- else if (temp[0] == 0x3C && temp[1] == 0x00 && temp[2] == 0x00 && temp[3] == 0x00) {
- encodingGuess = null;
- }
- // UCS-4, unusual octet order (2143)
- else if (temp[0] == 0x00 && temp[1] == 0x00 && temp[2] == 0x3C && temp[3] == 0x00) {
- encodingGuess = null;
- }
- // UCS-4, unusual octet order (3412)
- else if (temp[0] == 0x00 && temp[1] == 0x3C && temp[2] == 0x00 && temp[3] == 0x00) {
- encodingGuess = null;
- }
-
-
- // UTF-16BE or big-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit
- // in big-endian order and ASCII characters encoded as ASCII values (the encoding
- // declaration must be read to determine which)
- else if (temp[0] == 0x00 && temp[1] == 0x3C && temp[2] == 0x00 && temp[3] == 0x3F) {
- encodingGuess = "UnicodeBigUnmarked"; //$NON-NLS-1$
- }
-
-
- // UTF-16LE or little-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit
- // in little-endian order and ASCII characters encoded as ASCII values (the encoding
- // declaration must be read to determine which)
- else if (temp[0] == 0x3C && temp[1] == 0x00 && temp[2] == 0x3F && temp[3] == 0x00) {
- encodingGuess = "UnicodeLittleUnmarked"; //$NON-NLS-1$
- }
-
-
- // EBCDIC (in some flavor; the full encoding declaration must be read to tell which
- // code page is in use)
- else if (temp[0] == 0x4C && temp[1] == 0x6F && temp[2] == 0xA7 && temp[3] == 0x94) {
- encodingGuess = "Cp037"; //$NON-NLS-1$
- }
-
-
- // UTF-8 without an encoding declaration, or else the data stream is mislabeled
- // (lacking a required encoding declaration), corrupt, fragmentary, or enclosed in a
- // wrapper of some kind
- else {
-
- // From section 4.3.3 of the XML specification:
- // In the absence of information provided by an external transport protocol
- // (e.g. HTTP or MIME), it is an error for an entity including an encoding declaration
- // to be presented to the XML processor in an encoding other than that named in the
- // declaration, or for an entity which begins with neither a Byte Order Mark nor an
- // encoding declaration to use an encoding other than UTF-8. Note that since ASCII is
- // a subset of UTF-8, ordinary ASCII entities do not strictly need an encoding declaration.
-
- // We'll assume that this is UTF-8 or ASCII encoding without an encoding declaration.
- // Of course, it could also be another encoding that doesn't have an encoding declaration
- // in which case it has violated the XML specification (any encoding beside UTF-8 or UTF-16
- // must specify the character encoding). From section 4.3.3 of the XML specification:
- // In the absence of external character encoding information (such as MIME headers),
- // parsed entities which are stored in an encoding other than UTF-8 or UTF-16 must begin
- // with a text declaration (see 4.3.1 The Text Declaration) containing an encoding declaration.
- encodingGuess = SystemEncodingUtil.ENCODING_UTF_8;
- }
- }
-
- // if we have a guess, we need to read in the encoding declaration to get the actual encoding
- // the guess tells us the encoding of the family
- if (encodingGuess != null) {
-
- boolean encodingFound = false;
-
- FileInputStream inputStream = new FileInputStream(filePath);
- InputStreamReader reader = new InputStreamReader(inputStream, encodingGuess);
-
- // note that buffer capacity must be 1, otherwise we run into a problem
- // if the XML file has a non UTF-8 encoding and accented characters in the file
- BufferedReader bufReader = new BufferedReader(reader, 1);
-
- String line = bufReader.readLine();
-
- while (line != null) {
-
- int encodingIndex = line.indexOf("encoding"); //$NON-NLS-1$
-
- // look for the encoding attribute
- if (encodingIndex != -1) {
-
- // we look in the same line first
- boolean sameLine = true;
-
- boolean doubleQuoteFound = false;
- boolean singleQuoteFound = false;
-
- while (line != null) {
-
- // now look for the begin quote, which does not have to be
- // on the same line as the encoding attribute declaration
- int beginQuote = -1;
-
- // search in same line first
- if (sameLine) {
-
- // look for double quote
- beginQuote = line.indexOf('\"', encodingIndex+9);
-
- // if double quote not found, then try single quote
- if (beginQuote == -1) {
- beginQuote = line.indexOf('\'', encodingIndex+9);
-
- // single quote found, so flag it
- if (beginQuote != -1) {
- singleQuoteFound = true;
- }
- }
- // double quote found, so flag it
- else {
- doubleQuoteFound = true;
- }
- }
- // search in another line now
- else {
-
- // look for double quote
- beginQuote = line.indexOf('\"');
-
- // if single quote not found, then try single quote
- if (beginQuote == -1) {
- beginQuote = line.indexOf('\'');
-
- // single quote found, so flag it
- if (beginQuote != -1) {
- singleQuoteFound = true;
- }
- }
- // double quote found, so flag it
- else {
- doubleQuoteFound = true;
- }
- }
-
- // if begin quote found, look for endquote which should be on the same line
- if (beginQuote != -1) {
- int endQuote = -1;
-
- if (doubleQuoteFound) {
- endQuote = line.indexOf('\"', beginQuote+1);
- }
- else if (singleQuoteFound){
- endQuote = line.indexOf('\'', beginQuote+1);
- }
-
- // if end quote found, encoding is in between begin quote and end quote
- if (endQuote != -1) {
- encoding = line.substring(beginQuote+1, endQuote);
- encodingFound = true;
- }
-
- break;
- }
-
- if (sameLine) {
- sameLine = false;
- }
-
- line = bufReader.readLine();
- }
- }
-
- if (encodingFound) {
- break;
- }
-
- line = bufReader.readLine();
- }
-
- if (bufReader != null) {
- bufReader.close();
- }
-
- // if the encoding declaration was not found
- if (encoding == null) {
-
- // check if our initial guess was UTF-8 or UTF-16
- // those do not have to have an encoding declaration
- if (encodingGuess.equals(SystemEncodingUtil.ENCODING_UTF_8) || encodingGuess.startsWith("UnicodeBig") || //$NON-NLS-1$
- encodingGuess.equals("UnicodeLittle")) { //$NON-NLS-1$
- encoding = encodingGuess;
- }
- }
- }
-
- return encoding;
- }
-
- /**
- * Gets the encoding from the Byte Order Mark (BOM).
- * @param filePath the file path.
- * @return the encoding, or <code>null</code> if there is no BOM.
- */
- public String getEncodingFromBOM(String filePath) throws IOException {
- FileInputStream stream = new FileInputStream(filePath);
-
- String encoding = getEncodingFromBOM(stream);
-
- stream.close();
-
- return encoding;
- }
-
- /**
- * Gets the encoding from the Byte Order Mark (BOM).
- * @param filePath the file path.
- * @return the encoding, or <code>null</code> if there is no BOM.
- */
- private String getEncodingFromBOM(InputStream stream) throws IOException {
-
- byte[] bomBytes = new byte[4];
-
- // read the first three bytes
- stream.read(bomBytes, 0, 3);
-
- // check if UTF-8 BOM
- if (bomBytes[0] == 0xEF && bomBytes[1] == 0xBB && bomBytes[2] == 0xBF) {
- return SystemEncodingUtil.ENCODING_UTF_8;
- }
-
- // now read the fourth byte
- stream.read(bomBytes, 3, 1);
-
- // check if it matches some other encoding BOM
-
- // UCS-4, big-endian order (1234 order)
- if (bomBytes[0] == 0x00 && bomBytes[1] == 0x00 && bomBytes[2] == 0xFE && bomBytes[3] == 0xFF) {
- return null;
- }
- // UCS-4, little-endian order (4321 order)
- else if (bomBytes[0] == 0xFF && bomBytes[1] == 0xFE && bomBytes[2] == 0x00 && bomBytes[3] == 0x00) {
- return null;
- }
- // UCS-4, unusual octet order (2143)
- else if (bomBytes[0] == 0x00 && bomBytes[1] == 0x00 && bomBytes[2] == 0xFF && bomBytes[3] == 0xFE) {
- return null;
- }
- // UCS-4, unusual octet order (3412)
- else if (bomBytes[0] == 0xFE && bomBytes[1] == 0xFF && bomBytes[2] == 0x00 && bomBytes[3] == 0x00) {
- return null;
- }
- // UTF-16, big-endian order
- else if (bomBytes[0] == 0xFE && bomBytes[1] == 0xFF && !(bomBytes[2] == 0x00 && bomBytes[3] == 0x00)) {
- return "UnicodeBig"; //$NON-NLS-1$
- }
- // UTF-16, little-endian order
- else if (bomBytes[0] == 0xFF && bomBytes[1] == 0xFE && !(bomBytes[2] == 0x00 && bomBytes[3] == 0x00)) {
- return "UnicodeLittle"; //$NON-NLS-1$
- }
- // not a BOM
- else {
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemFileClassifier.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemFileClassifier.java
deleted file mode 100644
index c6424f041..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemFileClassifier.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.java.BasicClassFileParser;
-
-
-/**
- * This singleton class classifies a file on the remote system.
- */
-public class SystemFileClassifier {
-
- private static SystemFileClassifier instance;
-
- /**
- * Constructor.
- */
- private SystemFileClassifier() {
- super();
- }
-
- /**
- * Returns the singleton instance.
- * @return the singleton instance.
- */
- public static SystemFileClassifier getInstance() {
-
- if (instance == null) {
- instance = new SystemFileClassifier();
- }
-
- return instance;
- }
-
- /**
- * Classifies the file with the given absolute path. The absolute path can represent a virtual file.
- * By default, returns <code>"file"</code>.
- * @param absolutePath the absolute path.
- * @return the classification.
- */
- public String classifyFile(String absolutePath) {
-
- // first check if the absolute path is virtual
- boolean isVirtual = ArchiveHandlerManager.isVirtual(absolutePath);
-
- // if virtual, classify using archive handler manager
- if (isVirtual) {
- return classifyVirtual(absolutePath);
- }
- // otherwise, we classify using our way
- else {
- return classifyNonVirtual(absolutePath);
- }
- }
-
- /**
- * Classifies a virtual file with the given path.
- * @param absolutePath the absolute path of the virtual file.
- * @return the classification.
- */
- protected String classifyVirtual(String absolutePath) {
-
- // create an abolute virtual path object
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(absolutePath);
-
- // get the path of the containing archive
- String archivePath = avp.getContainingArchiveString();
-
- // get the virtual part of the file path
- String virtualPath = avp.getVirtualPart();
-
- // get archive file
- File archiveFile = new File(archivePath);
-
- // get classification of virtual file
- return ArchiveHandlerManager.getInstance().getClassification(archiveFile, virtualPath);
- }
-
- /**
- * Classifies a non-virtual file with the given path.
- * @param absolutePath the absolute path of the file.
- * @return the classification.
- */
- protected String classifyNonVirtual(String absolutePath) {
-
- // default type
- String type = "file"; //$NON-NLS-1$
-
- File file = new File(absolutePath);
-
- // check if file exists
- if (!file.exists()) {
- return type;
- }
-
- // find out if we are on Windows
- boolean isWindows = System.getProperty("os.name").toLowerCase().startsWith("win"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // for Windows, we only detect *.exe and *.dll files
- if (isWindows)
- {
- absolutePath = absolutePath.toLowerCase();
- // classify *.class file
- if (absolutePath.endsWith(".class")) { //$NON-NLS-1$
- type = classifyClassFile(absolutePath);
- }
- // *.exe files are binary executables
- else if (absolutePath.endsWith(".exe")) { //$NON-NLS-1$
- type = "executable(binary)"; //$NON-NLS-1$
- }
- // *.dll files are of type "module"
- else if (absolutePath.endsWith(".dll")) { //$NON-NLS-1$
- type = "module"; //$NON-NLS-1$
- }
-
- return type;
- }
-
- // get specified encoding if any
- String encoding = System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
-
- // otherwise, default to system encoding
- if (encoding == null || encoding.equals("")) { //$NON-NLS-1$
- encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
- }
-
- // create command "sh -c file <absolutePath>"
- String args[] = new String[3];
- args[0] = "sh"; //$NON-NLS-1$
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = "file " + PathUtility.enQuoteUnix(absolutePath); //$NON-NLS-1$
-
- BufferedReader poutReader = null;
-
- try {
- Process childProcess = Runtime.getRuntime().exec(args);
- InputStreamReader reader = new InputStreamReader(childProcess.getInputStream(), encoding);
- poutReader = new BufferedReader(reader);
-
- // get line of output
- String line = poutReader.readLine();
-
- if (line != null) {
- line = line.trim();
-
- // classify from line of output
- type = getClassification(absolutePath, line);
-
- // close stream
- poutReader.close();
-
- // if it a symbolic link, then get the canonical path and classify it as well
- if (type.equals("link")) { //$NON-NLS-1$
- String canonicalPath = file.getCanonicalPath();
- return type + "(" + classifyNonVirtual(canonicalPath) + ")" + ":" + canonicalPath; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- else {
- return type;
- }
- }
- }
- catch (UnsupportedEncodingException e) {
- // TODO: log it
- return type;
- }
- catch (IOException e) {
- // TODO: log it
- return type;
- }
-
- return type;
- }
-
- /**
- * Classifies from the given line of classification output.
- * @param absolutePath the absolute path of the file that was classified.
- * @param line the line of output to parse.
- * @return the classification.
- */
- protected String getClassification(String absolutePath, String line) {
-
- // default type
- String type = "file"; //$NON-NLS-1$
-
- String name = line;
- String fulltype = ""; //$NON-NLS-1$
-
- // Look for colon. Name appears before colon. Full type appears after the colon
- int colon = line.indexOf(':');
- if (colon >= 0) {
- name = line.substring(0, colon);
- fulltype = line.substring(colon + 1, line.length()).trim();
- }
-
- // if it is a *.class file, then we look for main method and qulaified class name
- // as part of the classification
- if (name.endsWith(".class")) { //$NON-NLS-1$
- type = classifyClassFile(absolutePath);
- }
-
- // check if it is a shared library
- boolean matchesLib = (fulltype.indexOf("shared object") > -1) || //$NON-NLS-1$
- (fulltype.indexOf("object module") > -1) || //$NON-NLS-1$
- (fulltype.indexOf("archive") > -1); //$NON-NLS-1$
-
- // check if it is an executable
- boolean matchesExe = (fulltype.indexOf("executable") > -1); //$NON-NLS-1$
-
- // check if it is a script
- boolean matchesScript = (fulltype.indexOf("script") > -1); //$NON-NLS-1$
-
- // shared library
- if (matchesLib) {
-
- // all *.a, *.so and *.so.* files are of type "module"
- if (name.endsWith(".a") || name.endsWith(".so") || (name.indexOf(".so.") > 0)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- type = "module"; //$NON-NLS-1$
- }
- }
-
- // a script file
- else if (matchesScript) {
-
- // an executable script file
- if (matchesExe) {
- type = "executable(script)"; //$NON-NLS-1$
- }
- // non-executable script file
- else {
- type = "script"; //$NON-NLS-1$
- }
- }
-
- // binary executable
- else if (matchesExe) {
- type = "executable(binary)"; //$NON-NLS-1$
- }
-
- // on iSeries we look for "OS/400 object" as a type
- else if (fulltype.indexOf("OS/400 object") > -1) { //$NON-NLS-1$
- type = "OS/400 object"; //$NON-NLS-1$
- }
-
- // finally, if the full type contains the symbolic link string, then type is simply "link"
- else if (fulltype.startsWith("symbolic link to")) { //$NON-NLS-1$
- type = "link"; //$NON-NLS-1$
- }
-
- return type;
- }
-
- /**
- * Classifies a class file.
- * @param absolutePath the absolute path of the class file.
- * @return the classification.
- */
- protected String classifyClassFile(String absolutePath) {
-
- // default type
- String type = "file"; //$NON-NLS-1$
-
- // input stream to file
- FileInputStream stream = null;
-
- // class file parser
- BasicClassFileParser parser = null;
-
- boolean isExecutable = false;
-
- try {
- stream = new FileInputStream(absolutePath);
-
- // use class file parser to parse the class file
- parser = new BasicClassFileParser(stream);
- parser.parse();
-
- // query if it is executable, i.e. whether it has main method
- isExecutable = parser.isExecutable();
- }
- catch (IOException e) {
- // TODO: log it
-
- // we assume not executable
- isExecutable = false;
- return type;
- }
-
- // if it is executable, then also get qualified class name
- if (isExecutable) {
- type = "executable(java"; //$NON-NLS-1$
-
- String qualifiedClassName = parser.getQualifiedClassName();
-
- if (qualifiedClassName != null) {
- type = type + ":" + qualifiedClassName; //$NON-NLS-1$
- }
-
- type = type + ")"; //$NON-NLS-1$
- }
-
- return type;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemSearchString.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemSearchString.java
deleted file mode 100644
index b60cd152e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemSearchString.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver;
-
-
-/**
- * This class represents search string.
- */
-public class SystemSearchString {
-
- /**
- * Constant indicating that the depth is infinite, -1.
- */
- public static final int DEPTH_INFINITE = -1;
-
- protected String textString;
- protected boolean isCaseSensitive;
- protected boolean isTextStringRegex;
- protected String fileNamesString;
- protected boolean isFileNamesRegex;
- protected boolean includeArchives;
- protected boolean includeSubfolders;
- protected String classificationString;
-
- /**
- * Creates a new search string.
- * @param textString the text string.
- * @param isCaseSensitive <code>true</code> if the search should be case sensitive, <code>false</code> otherwise.
- * @param isTextStringRegex <code>true</code> if the text string is a regular expression, <code>false</code> otherwise.
- * @param fileNamesString the file names pattern.
- * @param isFileNamesRegex <code>true</code> if the file names string is a regular expression, <code>false</code> otherwise.
- * @param includeArchives <code>true</code> to search inside archives, <code>false</code> otherwise.
- * @param includeSubfolders <code>true</code> to search subfolders, <code>false</code> otherwise.
- */
- public SystemSearchString(String textString, boolean isCaseSensitive, boolean isTextStringRegex,
- String fileNamesString, boolean isFileNamesRegex, boolean includeArchives,
- boolean includeSubfolders) {
- this(textString, isCaseSensitive, isTextStringRegex, fileNamesString, isFileNamesRegex, includeArchives,
- includeSubfolders, ""); //$NON-NLS-1$
- }
-
- /**
- * Creates a new search string that allows search to be restricted to files with a certain classification.
- * @param textString the text string.
- * @param isCaseSensitive <code>true</code> if the search should be case sensitive, <code>false</code> otherwise.
- * @param isTextStringRegex <code>true</code> if the text string is a regular expression, <code>false</code> otherwise.
- * @param fileNamesString the file names pattern.
- * @param isFileNamesRegex <code>true</code> if the file names string is a regular expression, <code>false</code> otherwise.
- * @param includeArchives <code>true</code> to search inside archives, <code>false</code> otherwise.
- * @param includeSubfolders <code>true</code> to search subfolders, <code>false</code> otherwise.
- * @param classificationString the classification string that file classifications should match with.
- */
- public SystemSearchString(String textString, boolean isCaseSensitive, boolean isTextStringRegex,
- String fileNamesString, boolean isFileNamesRegex, boolean includeArchives,
- boolean includeSubfolders, String classificationString) {
- this.textString = textString;
- this.isCaseSensitive = isCaseSensitive;
- this.isTextStringRegex = isTextStringRegex;
- this.fileNamesString = fileNamesString;
- this.isFileNamesRegex = isFileNamesRegex;
- this.includeArchives = includeArchives;
- this.includeSubfolders = includeSubfolders;
- this.classificationString = classificationString;
- }
-
- /**
- * Returns the text string.
- * @return the text string.
- */
- public String getTextString() {
- return textString;
- }
-
- /**
- * Returns whether the search is case sensitive.
- * @return <code>true</code> if the search is case sensitive, <code>false</code> otherwise.
- */
- public boolean isCaseSensitive() {
- return isCaseSensitive;
- }
-
- /**
- * Returns whether the text string is a regular expression.
- * @return <code>true</code> if the text string is a regular expression, <code>false</code> otherwise.
- */
- public boolean isTextStringRegex() {
- return isTextStringRegex;
- }
-
- /**
- * Returns the file names string.
- * @return the file names string.
- */
- public String getFileNamesString() {
- return fileNamesString;
- }
-
- /**
- * Returns whether the file names string is a regular expression.
- * @return <code>true</code> if the file names string is a regular expression, <code>false</code> otherwise.
- */
- public boolean isFileNamesRegex() {
- return isFileNamesRegex;
- }
-
- /**
- * Returns whether archives should be searched.
- * @return <code>true</code> to search archives, <code>false</code> otherwise.
- */
- public boolean isIncludeArchives() {
- return includeArchives;
- }
-
- /**
- * Returns whether subfolders should be searched.
- * @return <code>true</code> to search subfolders, <code>false</code> otherwise.
- */
- public boolean isIncludeSubfolders() {
- return includeSubfolders;
- }
-
- /**
- * Returns the classification string that file classifications should match with.
- * @return the classification.
- */
- public String getClassificationString() {
- return classificationString;
- }
-
- /**
- * Writes the contents of the search string
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return textString + " - " + isCaseSensitive + " - " + isTextStringRegex + " - " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- fileNamesString + " - " + isFileNamesRegex + " - " + includeArchives + " - " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- includeSubfolders + " - " + classificationString; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/VirtualSearchResult.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/VirtualSearchResult.java
deleted file mode 100644
index 10c1be35c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/VirtualSearchResult.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver;
-
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-
-/**
- * @author mjberger
- *
- * Represents a search result in a virtual file.
- */
-public final class VirtualSearchResult
-{
- private VirtualChild _virtualChild;
- private long _lineNumber;
- private String _matchingLine;
-
- public VirtualSearchResult(VirtualChild vc, long lineNumber, String matchingLine)
- {
- _virtualChild = vc;
- _lineNumber = lineNumber;
- _matchingLine = matchingLine;
- }
-
- public long getLineNumber()
- {
- return _lineNumber;
- }
-
- public String getMatchingLine() {
- return _matchingLine;
- }
-
- public VirtualChild getVirtualChild() {
- return _virtualChild;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/AbsoluteVirtualPath.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/AbsoluteVirtualPath.java
deleted file mode 100644
index 8519cb4fe..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/AbsoluteVirtualPath.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.archiveutils;
-
-/**
- * @author mjberger
- *
- * Represents an absolute virtual path, which contains a real part
- * (the part of the path that locates the containing archive) and a
- * virtual part (the part that locates the file in the virtual file
- * system within the archive).
- */
-public class AbsoluteVirtualPath
-{
-
- protected AbsoluteVirtualPath _realPart;
- protected String _realPartName;
- protected String _virtualPart;
- protected boolean _isVirtual;
- protected String _absVirtualPath;
-
- /**
- * Sets up a new AbsoluteVirtualPath object, by parsing <code>absolutePath</code>
- * into a "real" part (the containing archive) and a "virtual" part (the path to
- * the entry in the archive). Note that the real part is also an AbsoluteVirtualPath
- * in order to account for nested archives.
- */
- public AbsoluteVirtualPath(String absolutePath)
- {
- String sep = ArchiveHandlerManager.VIRTUAL_SEPARATOR;
- _absVirtualPath = ArchiveHandlerManager.cleanUpVirtualPath(absolutePath);
- int i = _absVirtualPath.lastIndexOf(sep);
- if (i == -1)
- {
- // no more nesting, this is the actual container archive.
- _absVirtualPath = absolutePath; // fix for defect 51898 and related defects
- _virtualPart = "";
- _realPartName = _absVirtualPath;
- _realPart = this;
- _isVirtual = false;
- }
- else
- {
- // there could be nesting further below, so parse out the real part
- // by recursively calling the constructor.
- _virtualPart = _absVirtualPath.substring(i+sep.length());
- _realPartName = _absVirtualPath.substring(0,i);
- _realPart = new AbsoluteVirtualPath(_realPartName);
- _isVirtual = true;
- }
- }
-
- /**
- * @return Whether or not this AbsoluteVirtualPath is virtual.
- */
- public boolean isVirtual()
- {
- return _isVirtual;
- }
-
- /**
- * @return The AbsoluteVirtualPath of the archive that contains the object specified
- * by this AbsoluteVirtualPath. Note that the archive can itself be virtual as well.
- */
- public AbsoluteVirtualPath getContainingArchivePath()
- {
- return _realPart;
- }
-
- /**
- * @return The name of the AbsoluteVirtualPath of the archive that contains the object
- * specified by this AbsoluteVirtualPath.
- */
- public String getContainingArchiveString()
- {
- return _realPartName;
- }
-
- /**
- * @return The virtual path to the virtual object referred to by this AbsoluteVirtualPath.
- */
- public String getVirtualPart()
- {
- return _virtualPart;
- }
-
- /**
- * Returns this AbsoluteVirtualPath as a string.
- */
- public String toString()
- {
- return _absVirtualPath;
- }
-
- /**
- * Sets the virtual part of this AbsoluteVirtualPath to be newVirtualPart
- */
- public void setVirtualPart(String newVirtualPart)
- {
- _virtualPart = newVirtualPart;
- if (newVirtualPart == "")
- {
- int i = _absVirtualPath.lastIndexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- _absVirtualPath = _absVirtualPath.substring(0, i);
- _isVirtual = _realPart._isVirtual;
- }
- else
- {
- _absVirtualPath = _realPartName + ArchiveHandlerManager.VIRTUAL_SEPARATOR + newVirtualPart;
- }
- }
-
- public String getName()
- {
- return _absVirtualPath.substring(_absVirtualPath.lastIndexOf("/") + 1);
- }
-
- public String getPath()
- {
- String path = _absVirtualPath.substring(0, _absVirtualPath.lastIndexOf("/"));
- return path;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ArchiveHandlerManager.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ArchiveHandlerManager.java
deleted file mode 100644
index d51afe4e8..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ArchiveHandlerManager.java
+++ /dev/null
@@ -1,500 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.archiveutils;
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-
-/**
- * This class manages all the Archive Handlers that correspond to the archive file that the system
- * would like to deal with. It contains methods for registering handlers with file types, as well as
- * utilities for getting at the contents of archives that the Manager represents.
- * This class is designed to be a singleton class, so the best way to use it is
- * to use statements of the form "ArchiveHandlerManager.getInstance().method".
- * @author mjberger
- */
-public class ArchiveHandlerManager
-{
- // The string that separates the virtual part of an absolute path from the real part
- public static final String VIRTUAL_SEPARATOR = "#virtual#/";
- public static final String VIRTUAL_CANONICAL_SEPARATOR = "#virtual#";
-
- // the singleton instance
- protected static ArchiveHandlerManager _instance = new ArchiveHandlerManager();
-
- // a mapping from Files to ISystemArchiveHandlers
- protected HashMap _handlers;
-
- // a mapping from Strings (file extensions) to Classes (the type of handler to use)
- protected HashMap _handlerTypes;
-
- /**
- * @return The singleton instance of this class.
- */
- public static ArchiveHandlerManager getInstance()
- {
- return _instance;
- }
-
- public ArchiveHandlerManager()
- {
- _handlers = new HashMap();
- _handlerTypes = new HashMap();
- }
-
- /**
- * Returns the children of an object in the virtual file system.
- * @param file The archive in whose virtual file system the children reside.
- * @param virtualpath The parent virtual object whose children this method is to return. To
- * get the top level virtualchildren in the archive, set virtualpath to "" or null.
- * @return An array of VirtualChild objects representing the children of the virtual object
- * in <code>file</code> referred to by <code>virtualpath</code>. If no class implementing
- * ISystemArchiveHandler can be found that corresponds to file, then this method returns null.
- * If the virtual object has no children, this method also returns null.
- * @throws IOException if there was a problem getting the registered handler for the
- * file. This usually means the archive is corrupted.
- */
- public VirtualChild[] getContents(File file, String virtualpath) throws IOException
- {
- if (virtualpath == null) virtualpath = "";
- ISystemArchiveHandler handler = getRegisteredHandler(file);
- if (handler == null || !handler.exists()) throw new IOException();
- return handler.getVirtualChildren(virtualpath);
- }
-
- /**
- * Returns the children of an object in the virtual file system that are folders.
- * @param file The archive in whose virtual file system the children reside.
- * @param virtualpath The parent virtual object whose children this method is to return. To
- * get the top level virtualchildren in the archive, set virtualpath to "" or null.
- * @return An array of VirtualChild objects representing the children of the virtual object
- * in <code>file</code> referred to by <code>virtualpath</code> that are themselves folders.
- * If no class implementing ISystemArchiveHandler can be found that corresponds to file, then
- * this method returns null. If the virtual object has no children, this method also returns null.
- */
- public VirtualChild[] getFolderContents(File file, String virtualpath)
- {
- if (virtualpath == null) virtualpath = "";
- ISystemArchiveHandler handler = getRegisteredHandler(file);
- if (handler == null) return null;
- return handler.getVirtualChildFolders(virtualpath);
- }
-
- /**
- * Tests whether a file is an known type of archive.
- * @param file the file to test.
- * @return true if and only if the file is an archive whose
- * type is registered with the ArchiveHandlerManager.
- */
- public boolean isArchive(File file)
- {
- if (_handlers.containsKey(file))
- {
- return true;
- }
- else
- {
- if (_handlerTypes.containsKey(getExtension(file)))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- }
-
- /**
- * Tests whether a file is an known type of archive, based on the file name.
- * @param file the name of the file to test.
- * @return true if and only if the file is an archive whose
- * type is registered with the ArchiveHandlerManager.
- */
- public boolean isRegisteredArchive(String filename)
- {
- if (_handlerTypes.containsKey(getExtension(filename)))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- /**
- * @param file the file whose extension we are computing.
- * @return the extension of <code>file</code>. "Extension" is
- * defined as any letters in the filename after the last ".".
- * Returns "" if there is no extension.
- */
- protected String getExtension(File file)
- {
- String filename = file.getName();
- int i = filename.lastIndexOf(".");
- if (i == -1) return "";
- return filename.substring(i+1).toLowerCase();
- }
-
- /**
- * @param filename the name of the file whose extension we are computing.
- * @return the extension of <code>filename</code>. "Extension" is
- * defined as any letters in the filename after the last ".".
- * Returns "" if there is no extension.
- */
- protected String getExtension(String filename)
- {
- int i = filename.lastIndexOf(".");
- if (i == -1) return "";
- return filename.substring(i+1).toLowerCase();
- }
-
- /**
- * Given the absolute path to a virtual object, returns that object
- * as a VirtualChild.
- * @param fullyQualifiedName The absolute path to the object. Usually consists
- * of the fullyQualifiedName of the archive, followed by the virtual path separator
- * (defined in ArchiveHandlerManager.VIRTUAL_SEPARATOR) followed by the virtual path to
- * the object within the archive's virtual file system.
- */
- public VirtualChild getVirtualObject(String fullyQualifiedName)
- {
- String cleanName = cleanUpVirtualPath(fullyQualifiedName);
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(cleanName);
- if (!avp.isVirtual()) return new VirtualChild("", new File(avp.getContainingArchiveString()));
- String zipfile = avp.getContainingArchiveString();
- File file = new File(zipfile);
- ISystemArchiveHandler handler = getRegisteredHandler(file);
- if (handler == null) return new VirtualChild(avp.getVirtualPart(), new File(avp.getContainingArchiveString()));
- VirtualChild vc = handler.getVirtualFile(avp.getVirtualPart());
- return vc;
- }
-
- /**
- * Returns the registered handler for the File <code>file</code>. If
- * no handler exists for that file yet, create it. If the extension of
- * <code>file</code> is not registered, then returns null.
- */
- public ISystemArchiveHandler getRegisteredHandler(File file)
- {
- ISystemArchiveHandler handler = null;
- if (_handlers.containsKey(file))
- {
- handler = (ISystemArchiveHandler) _handlers.get(file);
- }
-
- if (handler != null && handler.exists())
- {
- return handler;
- }
- else {
- // find registered handler based on file's extension
- String ext = getExtension(file);
- if (!_handlerTypes.containsKey(ext))
- {
- //System.out.println("Unknown archive file type: " + ext);
- return null;
- }
- else
- {
- Class handlerType = (Class) _handlerTypes.get(ext);
- Constructor newHandlerType = getProperConstructor(handlerType);
- Object[] files = new Object[1];
- files[0] = file;
- try
- {
- handler = (ISystemArchiveHandler) newHandlerType.newInstance(files);
- }
- catch (InvocationTargetException e)
- {
- //Throwable target = e.getCause();
- System.out.println(e.getMessage());
- e.printStackTrace();
- System.out.println("Could not instantiate handler for " + file.getName());
- return null;
-
- }
- catch (Exception e)
- {
- System.out.println(e.getMessage());
- System.out.println("Could not instantiate handler for " + file.getName());
- return null;
- }
- _handlers.put(file, handler);
- return handler;
- }
- }
- }
-
- public Constructor getProperConstructor(Class handlerType)
- {
- Constructor[] constructors = handlerType.getConstructors();
- for (int i = 0; i < constructors.length; i++)
- {
- if (constructors[i].getParameterTypes().length != 1)
- {
- continue;
- }
- else if (!constructors[i].getParameterTypes()[0].equals(File.class))
- {
- continue;
- }
- else return constructors[i];
- }
- return null; // should never get to this point
- }
-
- /**
- * Registers an extension and a handler type.
- * @param ext The extension to register with the ArchiveHandlerManager
- * @param handlerType The class of handler to register with <code>ext</code>.
- * Note that any class passed in must implement ISystemArchiveHandler.
- * @return Whether or not the registration was successful.
- */
- public boolean setRegisteredHandler(String ext, Class handlerType)
- {
- if (!handlerHasProperConstructor(handlerType))
- {
- System.out.println("Cannot register archive handler " + handlerType);
- System.out.println(handlerType + " does not contain a constructor whose signature is 'Constructor(File file)'");
- return false;
- }
- if (handlerImplementsISystemArchiveHandler(handlerType))
- {
- if (_handlerTypes.containsKey(ext)) _handlerTypes.remove(ext);
- _handlerTypes.put(ext, handlerType);
- return true;
- }
- else
- {
- System.out.println("Cannot register archive handler " + handlerType);
- System.out.println("Neither " + handlerType + ", nor any of its superclasses implements ISystemArchiveHandler.");
- return false;
- }
- }
-
- /**
- * Returns whether or not handlerType has a constructor that takes only one
- * parameter, a java.io.File.
- */
- protected boolean handlerHasProperConstructor(Class handlerType)
- {
- Constructor[] constructors = handlerType.getConstructors();
- boolean ok = false;
- for (int i = 0; i < constructors.length; i++)
- {
- if (constructors[i].getParameterTypes().length == 1)
- {
- if (constructors[i].getParameterTypes()[0].equals(File.class))
- {
- ok = true;
- break;
- }
- }
- }
- return ok;
- }
-
- /**
- * Returns whether or not handlerType or one of its superclasses implements ISystemArchiveHandler.
- */
- protected boolean handlerImplementsISystemArchiveHandler(Class handlerType)
- {
- Class[] interfaces = handlerType.getInterfaces();
- boolean okay = false;
- for (int i = 0; i < interfaces.length; i++)
- {
- if (interfaces[i].getName().equals(ISystemArchiveHandler.class.getName())) okay = true;
- }
- if (!okay)
- {
- Class superclass = handlerType.getSuperclass();
- if (superclass.getName().equals(Object.class.getName())) return false;
- return handlerImplementsISystemArchiveHandler(superclass);
- }
- else return true;
- }
-
- /**
- * Removes the handler associated with <code>file</code>, freeing the file
- * to be used by other processes.
- */
- public void disposeOfRegisteredHandlerFor(File file)
- {
- _handlers.remove(file);
- }
-
- /**
- * Tests whether the absolute path given by <code>path</code>
- * refers to a virtual object.
- * @param path
- * @return True if and only if the absolute path refers to a virtual object.
- */
- public static boolean isVirtual(String path)
- {
- return path.indexOf(VIRTUAL_CANONICAL_SEPARATOR) != -1;
- }
-
- /**
- * Converts the virtual path given by <code>fullVirtualName</code>
- * to the standard virtual form ('/' as separator, no leading or trailing '/'s)
- * @param fullVirtualName the path to convert
- * @return the new path in standard form
- */
- public static String cleanUpVirtualPath(String fullVirtualName)
- {
- int j = fullVirtualName.indexOf(VIRTUAL_CANONICAL_SEPARATOR);
- if (j == -1 && fullVirtualName.indexOf(":") != -1) return fullVirtualName;
- String realPart = "";
- String newPath = fullVirtualName;
- if (j != -1)
- {
- realPart = fullVirtualName.substring(0, j) + VIRTUAL_SEPARATOR;
- newPath = fullVirtualName.substring(j + VIRTUAL_SEPARATOR.length());
- }
- // use only forward slash separator
- newPath = newPath.replace('\\', '/');
-
- //get rid of any double slashes
- int i = newPath.indexOf("//");
- while (i != -1)
- {
- newPath = newPath.substring(0,i) + newPath.substring(i+1);
- i = newPath.indexOf("//");
- }
-
- // get rid of any leading or trailing slashes
- if (j != -1 && newPath.startsWith("/")) newPath = newPath.substring(1);
- if (newPath.endsWith("/")) newPath = newPath.substring(0, newPath.length() - 1);
- return realPart + newPath;
- }
-
- /**
- * Disposes of all registered handlers.
- */
- public void dispose()
- {
- _handlers.clear();
- }
-
- public boolean createEmptyArchive(File newFile)
- {
- if (!isRegisteredArchive(newFile.getName()))
- {
- System.out.println("Could not create new archive.");
- System.out.println(newFile + " is not a registered type of archive.");
- return false;
- }
-
- if (newFile.exists())
- {
- if (!newFile.isFile())
- {
- System.out.println("Could not create new archive.");
- System.out.println(newFile + " is not a file.");
- return false;
- }
- if (!newFile.delete())
- {
- System.out.println("Could not create new archive.");
- System.out.println(newFile + " could not be deleted.");
- return false;
- }
- }
-
- try
- {
- if (!newFile.createNewFile())
- {
- System.out.println("Could not create new archive.");
- System.out.println(newFile + " could not be created.");
- return false;
- }
- }
- catch (IOException e)
- {
- System.out.println("Could not create new archive.");
- System.out.println(e.getMessage());
- return false;
- }
-
- ISystemArchiveHandler handler = getRegisteredHandler(newFile);
- return handler.create();
- }
-
- /**
- * Returns the extensions for archive types that have been registered
- * with the ArchiveHandlerManager.
- */
- public String[] getRegisteredExtensions()
- {
- Object[] exts = _handlerTypes.keySet().toArray();
- String[] extensions = new String[exts.length];
- for (int i = 0; i < exts.length; i++)
- {
- extensions[i] = (String) exts[i];
- }
- return extensions;
- }
-
- public String getComment(File archive)
- {
- ISystemArchiveHandler handler = getRegisteredHandler(archive);
- if (handler == null || !handler.exists()) return "";
- return handler.getArchiveComment();
- }
-
- public long getExpandedSize(File archive)
- {
- ISystemArchiveHandler handler = getRegisteredHandler(archive);
- if (handler == null || !handler.exists()) return 0;
- VirtualChild[] allEntries = handler.getVirtualChildrenList();
- int total = 0;
- for (int i = 0; i < allEntries.length; i++)
- {
- total += allEntries[i].getSize();
- }
- return total;
- }
-
- /**
- * Returns the classification for the entry in a archive with the given virtual path.
- * @param file the archive file.
- * @param virtualPath the virtual path.
- * @return the classification for the virtual file.
- */
- public String getClassification(File file, String virtualPath) {
-
- // if archive file is null, or if it does not exist, or if the virtual path
- // is null, then return null for the classification
- if (file == null || !file.exists()) {
- return null;
- }
-
- // get archive handler
- ISystemArchiveHandler handler = getRegisteredHandler(file);
-
- if (handler == null || !handler.exists()) {
- return null;
- }
-
- return handler.getClassification(virtualPath);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandler.java
deleted file mode 100644
index f7ae942d1..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandler.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.archiveutils;
-
-import java.io.File;
-import java.io.InputStream;
-
-import org.eclipse.rse.services.clientserver.ISystemFileTypes;
-import org.eclipse.rse.services.clientserver.search.SystemSearchLineMatch;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatcher;
-
-
-/**
- * @author mjberger
- * An interface that allows implementing classes to create their own
- * Handlers for various types of Archive files, ie: zip, jar, tar, rpm
- */
-public interface ISystemArchiveHandler
-{
-
- /**
- * Turns the archive that this handler represents into a new, empty archive.
- * (The archive could not exist before, in which case this would be a true
- * creation).
- * @return Whether or not the blank archive was successfuly created.
- */
- public boolean create();
-
- /**
- * @return an array containing all the entries in the archive file
- * in a flat format, where the entries' filenames are prepended by
- * the path to the entry within the virtual file system. If there
- * are no entries in the file, returns an array of size 0.
- */
- public VirtualChild[] getVirtualChildrenList();
-
- /**
- * @return an array containing all the entries in the archive file
- * in a flat format, whose full paths begin with the String <code>parent</code>.
- * Returns an array of length 0 if there are no such entries.
- */
- public VirtualChild[] getVirtualChildrenList(String parent);
-
- /**
- * @return an array containing the virtual children of the virtual
- * directory named <code>fullVirtualName</code>. If <code>fullVirtualName</code> is "",
- * returns the top level in the virtual file system tree. If there are no
- * values to return, returns null.
- */
- public VirtualChild[] getVirtualChildren(String fullVirtualName);
-
- /**
- * @return an array containing the virtual children of the virtual
- * directory named <code>fullVirtualName</code> that are themselves directories.
- * If <code>fullVirtualName</code> is "",
- * returns the top level of directories in the virtual file system tree.
- * If there are no values to return, returns null.
- */
- public VirtualChild[] getVirtualChildFolders(String fullVirtualName);
-
- /**
- * @return the virtual File or Folder referred to by <code>fullVirtualName</code>.
- * This method never returns null. In cases where the VirtualChild does not
- * physically exist in the archive, this method returns a new VirtualChild object
- * whose exists() method returns false.
- */
- public VirtualChild getVirtualFile(String fullVirtualName);
-
- /**
- * @return Whether or not the virtual file or folder named <code>fullVirtualName</code>
- * exists in the archive (physically).
- */
- public boolean exists(String fullVirtualName);
-
- /**
- * @return Whether or not the handler exists. Usually false if the archive
- * is corrupted or unreadable.
- */
- public boolean exists();
-
- /**
- * @return the archive that this handler deals with
- */
- public File getArchive();
-
- /**
- * @return the current timestamp (last modified) for the entry in the archive named
- * <code>fullVirtualName</code>
- */
- public long getTimeStampFor(String fullVirtualName);
-
- /**
- * @return the current size (uncompressed) for the entry in the archive named
- * <code>fullVirtualName</code>
- */
- public long getSizeFor(String fullVirtualName);
-
- /**
- * Extracts the virtual file named <code>fullVirtualName</code> from the archive,
- * placing the results in <code>destination</code>.
- * @param fullVirtualName The full path and name of the virtual file in the archive.
- * @param destination The destination file for the extracted virtual file.
- * @return true iff the extraction is successful
- */
- public boolean extractVirtualFile(String fullVirtualName, File destination);
-
- /**
- * Extracts the virtual file named <code>fullVirtualName</code> from the archive,
- * placing the results in <code>destination</code>. Extracts to the native encoding, but assumes
- * that the source was archived using <code>sourceEncoding</code> if <code>isText</code> is true.
- * @param fullVirtualName The full path and name of the virtual file in the archive.
- * @param destination The destination file for the extracted virtual file.
- * @param sourceEncoding The encoding of the file in the archive.
- * @param isText Whether or not the virtual file is a text file.
- * @return true iff the extraction is successful
- */
- public boolean extractVirtualFile(String fullVirtualName, File destination, String sourceEncoding, boolean isText);
-
- /**
- * Extracts the directory <code>dir</code> (and its children) from
- * the archive and places the results in the directory <code>destinationParent</code>.
- * @param dir The full name of the virtual directory to extract
- * @param destinationParent A handle to the directory in which the extracted
- * directory will be placed as a subdirectory.
- * @return true iff the extraction is successful
- */
- public boolean extractVirtualDirectory(String dir, File destinationParent);
-
- /**
- * Extracts the directory <code>dir</code> (and its children) from
- * the archive and places the results in the directory <code>destinationParent</code>.
- * Extracts to the native encoding (if <code>isText</code>), but assumes
- * that the source was archived using <code>sourceEncoding</code>.
- * @param dir The full name of the virtual directory to extract
- * @param destinationParent A handle to the directory in which the extracted
- * directory will be placed as a subdirectory.
- * @param sourceEncoding The encoding of the files in the archive.
- * @param isText Whether or not the files in the directory are text files
- * @return true iff the extraction is successful
- */
- public boolean extractVirtualDirectory(String dir, File destinationParent, String sourceEncoding, boolean isText);
-
- /**
- * Extracts the directory <code>dir</code> (and its children) from
- * the archive and places the results in the directory <code>destinationParent</code>.
- * The results will be named destination.getName() rather than <code>dir</code>'s name.
- * @param dir The full name of the virtual directory to extract
- * @param destinationParent A handle to the directory in which the extracted
- * directory will be placed as a subdirectory.
- * @param destination A handle to the directory that will be created. Whatever
- * contents are in that directory will be replaced with what is extracted from
- * the archive.
- * @return true iff the extraction is successful
- */
- public boolean extractVirtualDirectory(String dir, File destinationParent, File destination);
-
- /**
- * Extracts the directory <code>dir</code> (and its children) from
- * the archive and places the results in the directory <code>destinationParent</code>.
- * The results will be named destination.getName() rather than <code>dir</code>'s name.
- * Extracts to the native encoding (if <code>isText</code>), but assumes
- * that the source was archived using <code>sourceEncoding</code>.
- * @param dir The full name of the virtual directory to extract
- * @param destinationParent A handle to the directory in which the extracted
- * directory will be placed as a subdirectory.
- * @param destination A handle to the directory that will be created. Whatever
- * contents are in that directory will be replaced with what is extracted from
- * the archive.
- * @param sourceEncoding The encoding of the files in the archive.
- * @param isText Whether or not the files to be extracted in the directory are all text files
- * @return true iff the extraction is successful
- */
- public boolean extractVirtualDirectory(String dir, File destinationParent, File destination, String sourceEncoding, boolean isText);
-
- /**
- * Compresses the file <code>file</code> and adds it to the archive,
- * placing it in the virtual directory <code>virtualPath</code>. Pass the
- * name as the parameter <code>name</code>. If the virtual path does not exist
- * in the archive, create it. If <code>file</code> is a directory, copy it and
- * its contents into the archive, maintaining the tree structure.
- * @return true if and only if the add was successful
- */
- public boolean add(File file, String virtualPath, String name);
-
- /**
- * Compresses the file <code>file</code> and adds it to the archive,
- * saving it in the encoding specified by <code>encoding</code> if the isText is true.
- * placing it in the virtual directory <code>virtualPath</code>. Pass the
- * name as the parameter <code>name</code>. If the virtual path does not exist
- * in the archive, create it. If <code>file</code> is a directory, copy it and
- * its contents into the archive, maintaining the tree structure.
- * @return true if and only if the add was successful
- */
- public boolean add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText);
-
- /**
- * Compresses the bytes in the InputStream <code>stream</code> and adds them as an entry to the archive,
- * saving them in the encoding specified by <code>encoding</code> if <code>isText</code> is true, and
- * placing it in the virtual directory <code>virtualPath</code>. Pass the
- * name as the parameter <code>name</code>. If the virtual path does not exist
- * in the archive, create it.
- * @return true if and only if the add was successful
- */
- public boolean add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText);
-
- /**
- * Compresses the file <code>file</code> and adds it to the archive,
- * saving it in the encoding specified by <code>encoding</code> if the isText is true.
- * placing it in the virtual directory <code>virtualPath</code>. Pass the
- * name as the parameter <code>name</code>. If the virtual path does not exist
- * in the archive, create it. If <code>file</code> is a directory, copy it and
- * its contents into the archive, maintaining the tree structure.
- * @return true if and only if the add was successful
- */
- public boolean add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes typeRegistery);
-
- /**
- * A generalization of the add method.
- * Compresses the array of files <code>files</code> and adds each of them to the archive, placing them
- * in the virtual directory <code>virtualPath</code>. Pass the names of the files
- * as the parameter <code>names</code>, where <code>files[i]</code> has the name <code>names[i]</code>.
- * If the virtual path does not exist in the archive, create it.
- * @return true if and only if the add was successful
- */
- public boolean add(File[] files, String virtualPath, String[] names);
-
- /**
- * A generalization of the add method.
- * Compresses the array of files <code>files</code> and adds each of them to the archive, placing them
- * in the virtual directory <code>virtualPath</code>. Save the i'th file in the i'th encoding (if isText[i] is true)
- * specified by <code>encodings</code>. Pass the names of the files
- * as the parameter <code>names</code>, where <code>files[i]</code> has the name <code>names[i]</code>.
- * If the virtual path does not exist in the archive, create it.
- * @return true if and only if the add was successful
- */
- public boolean add(File[] files, String virtualPath, String[] names, String[] sourceEncodings, String[] targetEncodings, boolean[] isText);
-
- /**
- * Compress the file <code>file</code> and replace the virtual file
- * referred to by <code>fullVirtualName</code> with the compressed file.
- * Pass the name of the file as the parameter <code>name</code>.
- * @return true if and only if the replace was successful
- */
- public boolean replace(String fullVirtualName, File file, String name);
-
- /**
- * Compress the InputStream <code>stream</code> and replace the virtual file
- * referred to by <code>fullVirtualName</code> with the compressed stream.
- * Pass the name of the new entry as the parameter <code>name</code>, the
- * encoding of the entry as <code>encoding</code> and whether or not the entry
- * <code>isText</code> or not.
- * @return true if and only if the replace was successful
- */
- public boolean replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText);
-
- /**
- * Deletes the entry <code>fullVirtualName</code> from the archive, and returns
- * whether or not the deletion was successful.
- */
- public boolean delete(String fullVirtualName);
-
- /**
- * Renames the entry <code>fullVirtualName</code> to the new name
- * <code>newName</code> while still leaving the entry in the same virtual
- * directory. Returns true if and only if the rename was successfull.
- */
- public boolean rename(String fullVirtualName, String newName);
-
- /**
- * Moves the entry <code>fullVirtualName</code> to the location
- * specified by <code>destinationVirtualPath</code>, while leaving the entry with
- * the same name as before. Returns true if and only if the move was successfull.
- */
- public boolean move(String fullVirtualName, String destinationVirtualPath);
-
- /**
- * Replaces the full name and path of the entry <code>fullVirtualName</code>
- * with the new full name and path <code>newFullVirtualName</code>.
- * Returns true if and only if the operation was successfull.
- */
- public boolean fullRename(String fullVirtualName, String newFullVirtualName);
-
- /**
- * Extracts and returns the specified list of virtual files from the archive.
- * @param fullNames The list of files to return
- * @return An array of handles to the extracted files. If fullNames has length 0
- * then this method returns an array of length 0.
- */
- public File[] getFiles(String[] fullNames);
-
- /**
- * Creates a new, empty folder in the archive. If parent folders do not exist either, creates them.
- * @param fullVirtualName The full name and path of the new folder within the virtual file system.
- * @return Whether or not the creation was successful.
- */
- public boolean createFolder(String fullVirtualName);
-
- /**
- * Creates a new, empty file in the archive. If parent folders do not exist either, creates them.
- * @param fullVirtualName The full name and path of the new file within the virtual file system.
- * @return Whether or not the creation was successful.
- */
- public boolean createFile(String fullVirtualName);
-
- /**
- * Gets the archive-type specific standard name for the VirtualChild
- * <code>vc</code>. For example, for Zips, if vc is a directory, then
- * the standard name must end with a "/".
- */
- public String getStandardName(VirtualChild vc);
-
- /**
- * Searches for text within a virtual file in this archive.
- * A good implementation will not actually extract the file to disk.
- * @param fullVirtualName the virtual file to search.
- * @param matcher the pattern matcher to use.
- * @return an array of match objects corresponding to lines where matches were found.
- * Returns an empty array if there are no results.
- */
- public SystemSearchLineMatch[] search(String fullVirtualName, SystemSearchStringMatcher matcher);
-
- /**
- * Gets the user-defined comment for a specific entry in the archive.
- * @param fullVirtualName The entry who's comment is desired
- * @return the comment as a String or "" if there is none
- */
- public String getCommentFor(String fullVirtualName);
-
- /**
- * Gets the amount of space taken up by a specific entry in the archive
- * when it is in compressed form. Compare with getSizeFor(String) which gets
- * the size of the entry after it is decompressed.
- * @param fullVirtualName The entry who's compressed size is desired
- * @return the compressed size of the specified entry, or 0 if the entry is not
- * found. If the archive is not a compression type (ie. tar), return the same as getSizeFor(String).
- */
- public long getCompressedSizeFor(String fullVirtualName);
-
- /**
- * Gets the method used to compress a specific entry in the archive.
- * @param fullVirtualName The entry who's compression method is desired
- * @return The compression method of the specified entry, or "" if none.
- */
- public String getCompressionMethodFor(String fullVirtualName);
-
- /**
- * @return The comment associated with this archive, or "" if there is none.
- */
- public String getArchiveComment();
-
- /**
- * Returns the classification for the entry with the given path.
- * @param fullVirtualName the virtual name.
- * @return the classification.
- */
- public String getClassification(String fullVirtualName);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandlerConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandlerConstants.java
deleted file mode 100644
index 009160391..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandlerConstants.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.archiveutils;
-
-/**
- * Interface for general archive handler constants.
- */
-public interface ISystemArchiveHandlerConstants {
-
- /**
- * Zip archive extension, "zip".
- */
- public static final String ZIP_ARCHIVE_EXTENSION = "zip";
-
- /**
- * Jar archive extension, "jar".
- */
- public static final String JAR_ARCHIVE_EXTENSION = "jar";
-
- /**
- * Tar archive extension, "tar".
- */
- public static final String TAR_ARCHIVE_EXTENSION = "tar";
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemArchiveUtil.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemArchiveUtil.java
deleted file mode 100644
index ffe8f9015..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemArchiveUtil.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.archiveutils;
-
-import java.io.File;
-import java.util.HashSet;
-
-public class SystemArchiveUtil {
-
- /**
- * Helper method to delete a directory. Deletes the children of the directory before
- * deleting the directory itself. This method is required because a directory can not be deleted if it
- * is not empty.
- * @return <code>true</code> if the deletion was successful, <code>false</code> otherwise.
- */
- public static boolean delete(File file) {
- HashSet set = new HashSet();
- return recursiveDelete(file, set);
- }
-
- /**
- * Recursively delete a file.
- * @param file the file or directory.
- * @param found a set of files that have been considered.
- * @return <code>true</code> if deletion successful, <code>false</code> otherwise.
- */
- protected static boolean recursiveDelete(File file, HashSet found) {
- boolean success = true;
- found.add(file);
- File[] children = file.listFiles();
-
- if (children != null) {
-
- for (int i = 0; i < children.length; i++) {
-
- if (!found.contains(children[i])) {
-
- success = recursiveDelete(children[i], found);
-
- if (!success) {
- return false;
- }
- }
- }
- }
-
- if (file.exists()) {
- success = file.delete();
- }
-
- return success;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemJarHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemJarHandler.java
deleted file mode 100644
index 660386b38..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemJarHandler.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.archiveutils;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * @author mjberger
- * Implements an ISystemArchiveHandler for Java JAR files.
- */
-public class SystemJarHandler extends SystemZipHandler
-{
-
- public SystemJarHandler(File file) throws IOException
- {
- super(file);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java
deleted file mode 100644
index 5c71200a1..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java
+++ /dev/null
@@ -1,2262 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.archiveutils;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FilePermission;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.ISystemFileTypes;
-import org.eclipse.rse.services.clientserver.java.BasicClassFileParser;
-import org.eclipse.rse.services.clientserver.search.SystemSearchLineMatch;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatchLocator;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatcher;
-import org.eclipse.rse.services.clientserver.util.tar.ITarConstants;
-import org.eclipse.rse.services.clientserver.util.tar.TarEntry;
-import org.eclipse.rse.services.clientserver.util.tar.TarFile;
-import org.eclipse.rse.services.clientserver.util.tar.TarOutputStream;
-
-
-/**
- * This class deals with tar files.
- */
-public class SystemTarHandler implements ISystemArchiveHandler {
-
- protected File file;
- protected long modTimeDuringCache;
- protected VirtualFileSystem vfs;
-
- /**
- * This class represents a virtual file system. A virtual file system is simply a data structure that
- * helps manage the contents of an archive file. It provides services that a handler can use.
- */
- private class VirtualFileSystem {
-
- private VirtualFileNode rootNode;
-
- /**
- * Constructor for the virtual file system.
- * @param root the root entry.
- */
- public VirtualFileSystem(VirtualChild root) {
- this.rootNode = new VirtualFileNode(root);
- }
-
- /**
- * Adds the entry to the tree according to its full path. Creates the parents
- * of the entry if they don't exist.
- * If the entry already exists in the tree, it is overwritten.
- * @param entry the entry to be added to the tree.
- */
- public void addEntry(VirtualChild entry) {
- addEntry(entry, true);
- }
-
- /**
- * Adds the entry to the tree according to its full path. Creates the parents
- * of the entry if they don't exist.
- * @param entry the entry to be added to the tree.
- * @param replace whether to replace if an entry with the same path
- * already exists in the tree.
- */
- public void addEntry(VirtualChild entry, boolean replace) {
-
- String path = entry.fullName;
-
- VirtualFileNode parentNode = rootNode;
-
- int idx = path.indexOf("/");
- String name = path;
-
- String segPath = "";
-
- // ensure each segment exists or is created if it does not exist
- while (idx > 0) {
- name = path.substring(0, idx);
- path = path.substring(idx+1);
-
- segPath = segPath + name + "/";
-
- boolean exists = parentNode.childExists(name);
-
- // only create new parent if it does not already exist
- if (!exists) {
- VirtualChild child = new VirtualChild(SystemTarHandler.this, segPath);
- child.isDirectory = true;
- parentNode.addChild(name, new VirtualFileNode(child), true);
- }
-
- // the new parent is the child (which may have been created)
- parentNode = parentNode.getChild(name);
-
- idx = path.indexOf("/");
- }
-
- parentNode.addChild(path, new VirtualFileNode(entry), replace);
- }
-
- /**
- * Removes the entry from the tree.
- * @param entry the entry to be removed from the tree.
- * @return the removed virtual child, or <code>null</code> if the entry
- * does not exist.
- */
- public VirtualChild removeEntry(VirtualChild entry) {
- return removeEntry(entry.fullName);
- }
-
- /**
- * Removes the entry with the given path from the tree.
- * @param path path of the entry to be removed from the tree.
- * @return the removed virtual child, or <code>null</code> if the entry
- * does not exist.
- */
- public VirtualChild removeEntry(String path) {
-
- // strip out trailing separator
- if (path.charAt(path.length()-1) == '/') {
- path = path.substring(0, path.length()-1);
- }
-
- // get the parent node
- VirtualFileNode parent = getParentNode(path);
-
- // get the name of the entry
- String name = null;
-
- int idx = path.lastIndexOf('/');
-
- if (idx == -1) {
- name = path;
- }
- else {
- name = path.substring(idx+1);
- }
-
- // remove the entry from the parent
- VirtualFileNode removedChild = parent.removeChild(name);
-
- if (removedChild == null) {
- return null;
- }
- else {
- return removedChild.getEntry();
- }
- }
-
- /**
- * Gets an entry from the given path.
- * @param path the path of the entry.
- * @return the entry, or <code>null</code> if the entry does not exist.
- */
- public VirtualChild getEntry(String path) {
- VirtualFileNode node = getNode(path);
-
- if (node == null) {
- return null;
- }
- else {
- return node.getEntry();
- }
- }
-
- /**
- * Returns an array of children of the given entry.
- * @param entry the parent entry.
- * @return an array of children, or an empty array if none exists. Returns <code>null</code>
- * if the parent entry isn't a directory.
- */
- public VirtualChild[] getChildren(VirtualChild entry) {
- return getChildren(entry.fullName);
- }
-
- /**
- * Returns an array of children folders of the given entry.
- * @param entry the parent entry.
- * @return an array of children, or an empty array if none exists. Returns <code>null</code>
- * if the parent entry isn't a directory.
- */
- public VirtualChild[] getChildrenFolders(VirtualChild entry) {
- return getChildrenFolders(entry.fullName);
- }
-
- /**
- * Returns an array of children of the entry with the given path.
- * @param the path of the parent entry, or "" to indicate the root entry.
- * @return an array of children, or an empty array if none exists, or if the entry is not a directory.
- */
- public VirtualChild[] getChildren(String path) {
- VirtualFileNode node = getNode(path);
-
- if (node == null) {
- return new VirtualChild[0];
- }
-
- VirtualFileNode[] childNodes = node.getChildren();
- VirtualChild[] children = new VirtualChild[childNodes.length];
-
- for (int i = 0; i < children.length; i++) {
- children[i] = childNodes[i].getEntry();
- }
-
- return children;
- }
-
- /**
- * Returns an array of children folders of the entry with the given path.
- * @param the path of the parent entry, or "" to indicate the root entry.
- * @return an array of children, or an empty array if none exists, or if the entry is not a directory.
- */
- public VirtualChild[] getChildrenFolders(String path) {
- VirtualFileNode node = getNode(path);
- VirtualFileNode[] childNodes = node.getChildrenFolders();
- VirtualChild[] children = new VirtualChild[childNodes.length];
-
- for (int i = 0; i < children.length; i++) {
- children[i] = childNodes[i].getEntry();
- }
-
- return children;
- }
-
- /**
- * Gets the parent entry.
- * @param entry the entry whose parent we want.
- * @return the parent of the entry, or <code>null</code> if the parent does not exist.
- */
- public VirtualChild getParent(VirtualChild entry) {
- VirtualFileNode node = getParentNode(entry.fullName);
-
- if (node == null) {
- return null;
- }
- else {
- return node.getEntry();
- }
- }
-
- /**
- * Returns the parent node for the entry with the given path.
- * @param path the path of the entry whose parent we want.
- * @return the node representing the parent entry, or <code>null</code> if the parent
- * node doesn't exist.
- */
- private VirtualFileNode getParentNode(String path) {
-
- // strip out trailing separator
- if (path.charAt(path.length()-1) == '/') {
- path = path.substring(0, path.length()-1);
- }
-
- int idx = path.lastIndexOf('/');
-
- if (idx == -1) {
- return rootNode;
- }
- else {
- return getNode(path.substring(0, idx));
- }
- }
-
- /**
- * Returns the node representing the entry with the given path.
- * @param path the path of the entry, or <code>""</code> to indicate the root node.
- * @return the node at the given path, or <code>null</code> if no such node exists.
- */
- private VirtualFileNode getNode(String path) {
-
- if (path.equals("")) {
- return rootNode;
- }
-
- // strip out trailing separator
- if (path.charAt(path.length()-1) == '/') {
- path = path.substring(0, path.length()-1);
- }
-
- int idx = 0;
- int jdx = 0;
- VirtualFileNode tempNode = rootNode;
- boolean done = false;
-
- while (true) {
- jdx = path.indexOf('/', idx);
-
- if (jdx == -1) {
- jdx = path.length();
- done = true;
- }
-
- String tempName = path.substring(idx, jdx);
- tempNode = tempNode.getChild(tempName);
-
- if (tempNode == null) {
- return null;
- }
-
- if (!done) {
- idx = jdx + 1;
- }
- else {
- break;
- }
- }
-
- return tempNode;
- }
- }
-
- /**
- * This class represents a node in the tree.
- */
- private class VirtualFileNode {
-
- private static final int MODE_ALL = 1;
- private static final int MODE_FILES_ONLY = 2;
- private static final int MODE_FOLDERS_ONLY = 3;
-
- private VirtualChild entry;
- private HashMap map;
- private boolean isDir;
-
- /**
- * Constructor for the virtual file node.
- * @param name the name of the node.
- * @param entry the entry that this node represents.
- */
- public VirtualFileNode(VirtualChild entry) {
- this.entry = entry;
- this.isDir = entry.isDirectory;
- this.map = new HashMap();
- }
-
- /**
- * Returns the entry represented by this node.
- * @return the entry represented by this node.
- */
- public VirtualChild getEntry() {
- return entry;
- }
-
- /**
- * Returns whether the node represents a directory or a file.
- * @return <code>true</code> if the node represents a directory, <code>false</code> otherwise;
- */
- public boolean isDir() {
- return isDir;
- }
-
- /**
- * Adds a child if this node is a directory.
- * @param childName the name with which to identify the child.
- * @param child the child.
- * @param replace <code>true</code> to replace an existing child with the same
- * name (if any), <code>false</code> otherwise. If <code>true</code>, and there
- * is an existing child that is a directory, then its children will be added to
- * to the new child.
- */
- public void addChild(String childName, VirtualFileNode child, boolean replace) {
-
- if (isDir) {
-
- // if replace is true, replace an existing node (if any) with this one
- // note that is a
- if (replace) {
-
- // get the existing child
- VirtualFileNode oldChild = getChild(childName);
-
- // if there is an existing child which is a directory, and we want to replace it
- // with a directory
- if (oldChild != null && oldChild.isDir() && child.isDir()) {
- Iterator iter = oldChild.getChildrenNames();
-
- while (iter.hasNext()) {
- String name = (String)(iter.next());
- VirtualFileNode grandChild = oldChild.getChild(name);
- child.addChild(name, grandChild, true);
- }
- }
-
- map.put(childName, child);
- }
- // otherwise first check if it already exists, and only add if it doesn't
- else {
- boolean exists = childExists(childName);
-
- if (!exists) {
- map.put(childName, child);
- }
- }
- }
- }
-
- /**
- * Removes the child with the given name only if the node is a directory.
- * @param childName the name of the child.
- * @return the child that was removed, or <code>null</code> if a child with
- * the given name wasn't found or this node isn't a directory.
- */
- public VirtualFileNode removeChild(String childName) {
-
- if (isDir) {
- return (VirtualFileNode)map.remove(childName);
- }
- else {
- return null;
- }
- }
-
- /**
- * Gets the child with the given name.
- * @param childName the name of the child.
- * @return the child with the given name, or <code>null</code> if a child with
- * the given name wasn't found or this node isn't a directory.
- */
- public VirtualFileNode getChild(String childName) {
-
- if (isDir) {
- return (VirtualFileNode)map.get(childName);
- }
- else {
- return null;
- }
- }
-
- /**
- * Returns an array of children.
- * @return an array of children, or an empty array if none exists, or if the node is not a directory.
- */
- public VirtualFileNode[] getChildren() {
- return getChildren(MODE_ALL);
- }
-
- /**
- * Returns an array of children that are folders.
- * @return an array of children, or an empty array if none exists, or if the node is not a directory.
- */
- public VirtualFileNode[] getChildrenFolders() {
- return getChildren(MODE_FOLDERS_ONLY);
- }
-
- /**
- * Returns an array of children.
- * @param mode the mode. One of <code>MODE_ALL</code>, <code>MODE_FILES_ONLY</code> and <code>MODE_FOLDERS_ONLY</code>.
- * @return an array of children, or an empty array if none exists, or if the node is not a directory.
- */
- public VirtualFileNode[] getChildren(int mode) {
-
- if (isDir) {
-
- // if we want all children (i.e. files and folders), then this
- // is probably quicker than getting each value and casting
- if (mode == MODE_ALL) {
- int num = map.size();
- VirtualFileNode[] children = new VirtualFileNode[num];
- map.values().toArray(children);
- return children;
- }
- // either we want only files or only folders
- else {
- Vector v = new Vector();
- Iterator iter = map.values().iterator();
-
- while (iter.hasNext()) {
- VirtualFileNode node = (VirtualFileNode)iter.next();
- boolean isDir = node.isDir();
-
- if (mode == MODE_FILES_ONLY && !isDir) {
- v.add(node);
- }
- else if (mode == MODE_FOLDERS_ONLY && isDir) {
- v.add(node);
- }
- }
-
- VirtualFileNode[] children = new VirtualFileNode[v.size()];
- v.toArray(children);
- return children;
- }
- }
- else {
- return new VirtualFileNode[0];
- }
- }
-
- /**
- * Returns whether the child with the given name exists.
- * @param childName the name of the child.
- * @return <code>true</code> if the child exists, <code>false</code>otherwise.
- * Returns <code>false</code> if this node isn't a directory.
- */
- public boolean childExists(String childName) {
-
- if (isDir) {
- return map.containsKey(childName);
- }
- else {
- return false;
- }
- }
-
- /**
- * Returns an iterator of the names of all the children of this node.
- * @return a iterator of all the names of the children, or <code>null</code> if the node
- * is not a directory.
- */
- public Iterator getChildrenNames() {
-
- if (isDir) {
- return map.keySet().iterator();
- }
- else {
- return null;
- }
- }
- }
-
- /**
- * Constructor for handler. Calls <code>init</code>.
- * @param file the tar file.
- */
- public SystemTarHandler(File file) throws IOException {
- super();
- init(file);
- createCache();
- modTimeDuringCache = file.lastModified();
- }
-
- /**
- * Initializes the handler from the given file and does caching.
- * @param file
- * @throws IOException
- */
- protected void init(File file) throws IOException {
- this.file = file;
- }
-
- /**
- * Reads the contents of the tar file, and caches the entries.
- */
- protected void createCache() {
-
- TarFile tarFile = getTarFile();
-
- Enumeration entries = tarFile.entries();
-
- VirtualChild root = new VirtualChild(this);
- root.isDirectory = true;
-
- vfs = new VirtualFileSystem(root);
-
- while (entries.hasMoreElements()) {
- TarEntry entry = (TarEntry)entries.nextElement();
- VirtualChild child = getVirtualChild(entry);
- vfs.addEntry(child);
- }
- }
-
- /**
- * Gets a tar file from the underlying file.
- * @return the tar file, or <code>null</code> if the tar file does not exist.
- */
- protected TarFile getTarFile() {
-
- TarFile tarFile = null;
-
- try {
- tarFile = new TarFile(file);
- }
- catch (IOException e) {
- // TODO: log error
- }
-
- return tarFile;
- }
-
- /**
- * Updates the cache if the tar file has changed since the last time
- * we cached. Will not change the cache if the tar file hasn't been
- * updated. Other methods should call this method before performing
- * any operations on the cache and the underlying tar file.
- */
- protected void updateCache() throws IOException {
- File newFile = new File(file.getAbsolutePath());
- long modTime = newFile.lastModified();
-
- // if the modified time of the file is not the same as the modified time before last
- // cache, then recreate cache
- if (modTime != modTimeDuringCache) {
- // reinitialize
- init(newFile);
- createCache();
- modTimeDuringCache = newFile.lastModified();
- }
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildrenList()
- */
- public VirtualChild[] getVirtualChildrenList() {
-
- // this method does not read from cache
- Vector v = new Vector();
-
- TarFile tarFile = getTarFile();
- Enumeration entries = tarFile.entries();
-
- while (entries.hasMoreElements()) {
- TarEntry entry = (TarEntry)entries.nextElement();
- VirtualChild child = new VirtualChild(this, entry.getName());
- child.isDirectory = entry.isDirectory();
- v.add(child);
- }
-
- int numOfChildren = v.size();
-
- VirtualChild[] children = new VirtualChild[numOfChildren];
-
- for (int i = 0; i < numOfChildren; i++) {
- children[i] = (VirtualChild)v.get(i);
- }
-
- return children;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildrenList(java.lang.String)
- */
- public VirtualChild[] getVirtualChildrenList(String parent) {
- parent = ArchiveHandlerManager.cleanUpVirtualPath(parent);
-
- // this method does not read from cache
- Vector v = new Vector();
-
- TarFile tarFile = getTarFile();
- Enumeration entries = tarFile.entries();
-
- while (entries.hasMoreElements()) {
- TarEntry entry = (TarEntry)entries.nextElement();
-
- // only add those entries that have names that begin with the parent name
- // also check that the entry name isn't just the parent name + '/' (i.e. still the same
- // as the parent)
- if (entry.getName().startsWith(parent) && !entry.getName().equals(parent + "/")) {
- VirtualChild child = new VirtualChild(this, entry.getName());
- child.isDirectory = entry.isDirectory();
- v.add(child);
- }
- }
-
- int numOfChildren = v.size();
-
- VirtualChild[] children = new VirtualChild[numOfChildren];
-
- for (int i = 0; i < numOfChildren; i++) {
- children[i] = (VirtualChild)v.get(i);
- }
-
- return children;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildren(java.lang.String)
- */
- public VirtualChild[] getVirtualChildren(String fullVirtualName) {
-
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return new VirtualChild[0];
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- return vfs.getChildren(fullVirtualName);
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildFolders(java.lang.String)
- */
- public VirtualChild[] getVirtualChildFolders(String fullVirtualName) {
-
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return new VirtualChild[0];
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- return vfs.getChildrenFolders(fullVirtualName);
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualFile(java.lang.String)
- */
- public VirtualChild getVirtualFile(String fullVirtualName) {
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- if (fullVirtualName == null || fullVirtualName.equals("")) {
- return new VirtualChild(this);
- }
-
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return new VirtualChild(this, fullVirtualName);
- }
-
- VirtualChild entry = vfs.getEntry(fullVirtualName);
-
- // if entry is null, then create a new virtual child object
- // for which exists will return false
- if (entry == null) {
- entry = new VirtualChild(this, fullVirtualName);
- }
-
- return entry;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#exists(java.lang.String)
- */
- public boolean exists(String fullVirtualName) {
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- if (fullVirtualName == null || fullVirtualName.equals("")) {
- return false;
- }
-
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
-
- VirtualChild child = vfs.getEntry(fullVirtualName);
-
- if (child != null) {
- return true;
- }
- else {
- return false;
- }
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getArchive()
- */
- public File getArchive() {
- return file;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getTimeStampFor(java.lang.String)
- */
- public long getTimeStampFor(String fullVirtualName) {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- // get the entry with that name
- TarEntry entry = getTarFile().getEntry(fullVirtualName);
-
- // if the entry exists, return its last modified time
- if (entry != null) {
- return entry.getModificationTime();
- }
- // otherwise return the last modified time of the file
- // TODO: is this correct?
- else {
- return file.lastModified();
- }
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getSizeFor(java.lang.String)
- */
- public long getSizeFor(String fullVirtualName) {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- // get the entry with that name
- TarEntry entry = getTarFile().getEntry(fullVirtualName);
-
- // if the entry exists, return the size
- if (entry != null) {
- return entry.getSize();
- }
- // otherwise return 0
- // TODO: is this correct?
- else {
- return 0;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualFile(java.lang.String, java.io.File)
- */
- public boolean extractVirtualFile(String fullVirtualName, File destination) {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- TarEntry entry = getTarFile().getEntry(fullVirtualName);
-
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
-
- // if the entry is a directory, simply create the destination and set the last modified time to
- // the entry's last modified time
- if (entry.isDirectory()) {
-
- // if destination exists, then delete it
- if (destination.exists()) {
- destination.delete();
- }
-
- // create destination directory, and set the last modified time to
- // the entry's last modified time
- destination.mkdirs();
- destination.setLastModified(entry.getModificationTime());
- return true;
- }
-
- // entry is not a directory
- InputStream inStream = null;
- OutputStream outStream = null;
-
- try {
- inStream = getTarFile().getInputStream(entry);
-
- if (inStream == null) {
- destination.setLastModified(entry.getModificationTime());
- return false; // TODO: return true or false?
- }
-
- outStream = new FileOutputStream(destination);
-
- byte[] buf = new byte[ITarConstants.BLOCK_SIZE];
- int numRead = inStream.read(buf);
-
- while (numRead > 0) {
- outStream.write(buf, 0, numRead);
- numRead = inStream.read(buf);
- }
- }
- catch (IOException e) {
- // TODO: log error
- }
- finally {
-
- try {
-
- if (outStream != null) {
- outStream.close();
- }
-
- if (inStream != null) {
- inStream.close();
- }
- }
- catch (IOException e) {
- // TODO: log error
- }
-
- // finished creating and writing to the file, so now set the last modified time
- // to the entry's last modified time
- destination.setLastModified(entry.getModificationTime());
-
- }
- return true;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File)
- */
- public boolean extractVirtualDirectory(String fullVirtualName, File destinationParent) {
- return extractVirtualDirectory(fullVirtualName, destinationParent, (File) null);
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.io.File)
- */
- public boolean extractVirtualDirectory(String fullVirtualName, File destinationParent, File destination) {
-
- // if the destination directory doesn't exist, create it
- if (!destinationParent.exists()) {
-
- if (!destinationParent.mkdirs()) {
- // TODO: log error
- return false; // quit if we fail to create the destination directory
- }
- }
- // otherwise if the destination directory does exist, but is not a directory, then quit
- else if (!destinationParent.isDirectory()) {
- return false;
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- // update our cache before accessing cache
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
-
- VirtualChild dir = vfs.getEntry(fullVirtualName);
-
- if (dir == null || !dir.isDirectory) {
- return false;
- }
-
- if (destination == null) {
-
- if (fullVirtualName.equals("")) {
- destination = destinationParent;
- }
- else {
- destination = new File(destinationParent, dir.name);
- }
- }
-
- File topDir = destination;
- String topDirPath = topDir.getAbsolutePath();
-
- // TODO: why are we checking that destination and destination parent are not equal?
- if (!destination.equals(destinationParent)) {
-
- if (destination.isFile() && destination.exists()) {
- SystemArchiveUtil.delete(destination);
- }
-
- destination.mkdirs();
- }
-
- // if the directory does not exist, try to create it
- if (!topDir.exists() && !topDir.mkdirs()) {
- // TODO: log error
- return false; // log error and quit if we fail to create the directory
- }
- else {
- extractVirtualFile(fullVirtualName, topDir);
- }
-
- // get the children of this directory
- VirtualChild[] children = vfs.getChildren(fullVirtualName);
-
- for (int i = 0; i < children.length; i++) {
- VirtualChild tempChild = children[i];
- String childPath = topDirPath + File.separator + tempChild.name;
- File childFile = new File(childPath);
-
- // if the child is a directory, then we need to extract it and its children
- if (tempChild.isDirectory) {
-
- // and now extract its children
- extractVirtualDirectory(tempChild.fullName, childFile, (File) null);
- }
- // otherwise if the child is a file, simply extract it
- else {
- extractVirtualFile(tempChild.fullName, childFile);
- }
- }
-
- return true;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File, java.lang.String, java.lang.String)
- */
- public boolean add(File file, String virtualPath, String name) {
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
-
- if (!file.isDirectory()) {
-
- // if it exists, call replace
- if (exists(virtualPath + "/" + name)) {
- return replace(virtualPath + "/" + name, file, name);
- }
- else {
- File[] files = new File[1];
- files[0] = file;
- String[] names = new String[1];
- names[0] = name;
- return add(files, virtualPath, names);
- }
- }
- else {
- Vector children = new Vector();
- listAllFiles(file, children);
- int numOfChildren = children.size();
- File[] sources = new File[numOfChildren + 1];
- String[] newNames = new String[numOfChildren + 1];
- int charsToTrim = file.getParentFile().getAbsolutePath().length() + 1;
- for (int i = 0; i < numOfChildren; i++)
- {
- sources[i] = (File)children.get(i);
- newNames[i] = sources[i].getAbsolutePath().substring(charsToTrim);
- newNames[i] = newNames[i].replace('\\','/');
-
- if (sources[i].isDirectory() && !newNames[i].endsWith("/")) {
- newNames[i] = newNames[i] + "/";
- }
- }
-
- sources[numOfChildren] = file;
- newNames[numOfChildren] = name;
-
- if (!newNames[numOfChildren].endsWith("/")) {
- newNames[numOfChildren] = newNames[numOfChildren] + "/";
- }
-
- return add(sources, virtualPath, newNames);
- }
- }
-
- /**
- * Helper method. . . populates <code>found</code> with a
- * collapsed list of all nodes in the subtree
- * of the file system rooted at <code>parent</code>.
- */
- public void listAllFiles(File parent, Vector found) {
-
- File[] children = parent.listFiles();
-
- for (int i = 0; i < children.length; i++) {
-
- if (children[i].isDirectory()) {
- listAllFiles(children[i], found);
- }
-
- found.add(children[i]);
- }
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File[], java.lang.String, java.lang.String[])
- */
- public boolean add(File[] files, String virtualPath, String[] names) {
-
- // update our cache before accessing cache
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
-
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
-
- int numFiles = files.length;
-
- for (int i = 0; i < numFiles; i++) {
-
- if (!files[i].exists() || !files[i].canRead()) {
- return false;
- }
-
- // if the entry already exists, then we should do a replace
- // TODO (KM): should we simply replace and return?
- // I think we should check each entry and replace or create for each one
- if (exists(virtualPath + "/" + names[i])) {
- return replace(virtualPath + "/" + names[i], files[i], names[i]);
- }
- }
-
- try {
-
- // open a new temp file which will be our destination for the new tar file
- File outFile = new File(file.getAbsolutePath() + "temp");
- TarOutputStream outStream = new TarOutputStream(new FileOutputStream(outFile));
-
- // get all the entries in the current tar
- VirtualChild[] children = getVirtualChildrenList();
-
- // if it is an empty temp file, no need to recreate it
- if (children.length != 0) {
- createTar(children, outStream, (HashSet)null);
- }
-
- // for each new file to add
- for (int i = 0; i < numFiles; i++) {
-
- String childVirtualPath = virtualPath + "/" + names[i];
-
- TarEntry newEntry = createTarEntry(files[i], childVirtualPath);
-
- // append the additional entry to the tar file
- appendFile(files[i], newEntry, outStream);
-
- // add the new entry to the cache, so that the cache is updated
- VirtualChild temp = getVirtualChild(newEntry);
- vfs.addEntry(temp);
- }
-
- // close output stream
- outStream.close();
-
- // replace the current tar file with the new one, and do not update cache since
- // we just did
- replaceFile(outFile, false);
-
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
-
- return true;
- }
-
- /**
- * Create a tar file from the given virtual child objects, using the given output stream and omitting
- * the children in the given set.
- * @param children an array of virtual children from which to create a tar file.
- * @param outStream the tar output stream to use.
- * @param omitChildren the set of names for children that should be omitted from the given array of virtual children.
- * @throws IOException if an I/O exception occurs.
- */
- protected void createTar(VirtualChild[] children, TarOutputStream outStream, HashSet omitChildren) throws IOException {
-
- // TODO: if all children are to be deleted, we leave the tar file with a dummy entry
- if (omitChildren != null && children.length == omitChildren.size()) {
- return;
- }
-
- TarFile tarFile = getTarFile();
-
- // go through each child
- for (int i = 0; i < children.length; i++) {
-
- // if entry name is in the omit set, then do not include it
- if (omitChildren != null && omitChildren.contains(children[i].fullName)) {
- continue;
- }
-
- // if child is a directory, then just add an entry for it
- // there is no data
- if (children[i].isDirectory) {
-
- // include a '/' at the end, since it is a directory
- TarEntry nextEntry = tarFile.getEntry(children[i].fullName + "/");
-
- // put the entry
- outStream.putNextEntry(nextEntry);
-
- // close the entry
- outStream.closeEntry();
- }
- // otherwise child is a file, so add an entry for it
- // and then add data (i.e. file contents).
- else {
-
- TarEntry nextEntry = tarFile.getEntry(children[i].fullName);
-
- // get the input stream for the file contents
- InputStream inStream = tarFile.getInputStream(nextEntry);
-
- // put the entry
- outStream.putNextEntry(nextEntry);
-
- // write data
- byte[] buf = new byte[ITarConstants.BLOCK_SIZE];
- int numRead = inStream.read(buf);
-
- while (numRead > 0) {
- outStream.write(buf, 0, numRead);
- numRead = inStream.read(buf);
- }
-
- // close input stream
- inStream.close();
-
- // close entry, but do not close the output stream
- outStream.closeEntry();
- }
- }
- }
-
- /**
- * Appends a file to a tar output stream, using the given entry that represents the file.
- * @param file the file to be appended to the tar output stream.
- * @param entry the entry which represents the file.
- * @param outStream the tar output stream.
- * @throws IOException if an I/O error occurs.
- */
- protected void appendFile(File file, TarEntry entry, TarOutputStream outStream) throws IOException {
-
- // put the next entry in the output stream
- outStream.putNextEntry(entry);
-
- // now write data if it is a file
- // there is no data for folders
- if (!file.isDirectory()) {
- BufferedInputStream inStream = new BufferedInputStream(new FileInputStream(file));
-
- byte[] buf = new byte[ITarConstants.BLOCK_SIZE];
- int numRead = inStream.read(buf);
-
- while (numRead > 0) {
- outStream.write(buf, 0, numRead);
- numRead = inStream.read(buf);
- }
-
- // close the input stream
- inStream.close();
- }
-
- // close the entry
- outStream.closeEntry();
- }
-
- /**
- * Creates a tar entry for a file with the given virtual path. The entry
- * will contain the size and last modified time of the file. The entry's
- * checksum will be calculated.
- * @param file the file for which to create a tar entry.
- * @param name the virtual path for the entry.
- * @return the tar entry representing the given file.
- */
- protected TarEntry createTarEntry(File file, String virtualPath) {
-
- String fullName = virtualPath;
-
- // if directory, end with a '/'
- if (file.isDirectory()) {
-
- if (!fullName.endsWith("/")) {
- fullName = fullName + "/";
- }
- }
-
- // strip out leading '/'
- // TODO (KM): Why?
- if (fullName.startsWith("/")) {
- fullName = fullName.substring(1);
- }
-
- // create a new entry and set its size and last modified time
- TarEntry entry = new TarEntry(fullName);
-
- // set the size if the file is not a directory
- if (!file.isDirectory()) {
- long size = file.length();
- entry.setSize(size);
- }
- else {
- entry.setSize(0);
- }
-
- // set modified time
- long lastModified = file.lastModified();
- entry.setModificationTime(lastModified);
-
- // set the user name
- String userName = System.getProperty("user.name");
-
- if (userName != null) {
- entry.setUserName(userName);
- }
-
- // set user permissions
- boolean canRead = file.canRead();
- boolean canWrite = file.canWrite();
-
- // getting execute permission is a bit tricky
- // need to go through security manager
- boolean canExecute = false;
-
- // first get the system security manager
- SecurityManager sm = System.getSecurityManager();
-
- // if there is no security manager then create a new one
- if (sm == null) {
- sm = new SecurityManager();
- }
-
- try {
-
- // if security manager successfully created, check permission
- if (sm != null) {
-
- // create a file permission to check execute
- FilePermission permission = new FilePermission(file.getAbsolutePath(), "execute");
-
- // this call will throw a SecurityException if permission does not exist
- sm.checkPermission(permission);
- canExecute = true;
- }
- else {
- canExecute = false;
- }
- }
- catch(SecurityException e) {
- canExecute = false;
- }
-
- entry.setUserMode(canRead, canWrite, canExecute);
-
- // calculate checksum
- entry.calculateChecksum();
-
- return entry;
- }
-
- /**
- * Changes a tar entry according to the file information and given path. The given path
- * will be the new name of the entry. The size and last modified fields will be changed
- * to the file's size and last modified time. The entry's checksum will be calculated.
- * @param entry the entry that needs to be changed.
- * @param file the file for which the tar entry is being changed.
- * @param virtualPath the virtual path for the entry.
- * @return the changed entry.
- */
- protected TarEntry changeTarEntry(TarEntry entry, File file, String virtualPath) {
-
- // TODO (KM): This does not update the permissions in the entry according to the
- // file permissions on disk. Need to look at how to retrieve permissions for owner, group
- // and other, and then have to set these in the entry accordingly.
-
- String fullName = virtualPath;
-
- // if directory, end with a '/'
- if (file.isDirectory()) {
-
- if (!fullName.endsWith("/")) {
- fullName = fullName + "/";
- }
- }
-
- // strip out leading '/'
- // TODO (KM): Why?
- if (fullName.startsWith("/")) {
- fullName = fullName.substring(1);
- }
-
- // change entry name
- entry.setName(fullName);
-
- // update size field in entry
- if (!file.isDirectory()) {
- long size = file.length();
- entry.setSize(size);
- }
- else {
- entry.setSize(0);
- }
-
- // update last modified field in entry
- long lastModified = file.lastModified();
- entry.setModificationTime(lastModified);
-
- // calculate checksum
- entry.calculateChecksum();
-
- return entry;
- }
-
- /**
- * Returns a virtual child given a tar entry.
- * @param entry a tar entry.
- * @return the virtual child that represents the tar entry.
- */
- protected VirtualChild getVirtualChild(TarEntry entry) {
- VirtualChild child = new VirtualChild(this, entry.getName());
- child.isDirectory = entry.isDirectory();
- return child;
- }
-
- /**
- * Replaces the old tar file managed by the handler with the given file, and optionally update
- * the cache.
- * @param newFile the new tar file.
- * @param updateCache <code>true</code> to update the cache, <code>false</code> otherwise.
- * Only specify <code>false</code> if the cache has already been updated to reflect the
- * contents of this new file.
- * @throws IOException if an I/O problem occurs.
- */
- protected void replaceFile(File newFile, boolean updateCache) throws IOException {
- String name = file.getAbsolutePath();
-
- // create a temp file (in case something goes wrong)
- File tempFile = new File(name + ".old");
-
- // rename current file to tempFile
- file.renameTo(tempFile);
-
- // rename the new file to the file this handler manages
- newFile.renameTo(file);
-
- // reinitialize
- init(file);
-
- // if we do not want to update the cache, we set the last modified time during cache to
- // the modified time of the file, so when we call updateCache, it'll do nothing
- if (!updateCache) {
- modTimeDuringCache = file.lastModified();
- }
-
- // update cache if necessary
- updateCache();
-
- // delete the temporary file
- tempFile.delete();
- }
-
-
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#replace(java.lang.String, java.io.File, java.lang.String)
- */
- public boolean replace(String fullVirtualName, File file, String name) {
-
- // update our cache before accessing cache
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
-
- if (!file.exists() && !file.canRead()) {
- return false;
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- // if the virtual file does not exist, we actually want to add
- if (!exists(fullVirtualName)) {
- return add(file, fullVirtualName, name);
- }
-
- try {
-
- // open a new temp file which will be our destination for the new tar file
- File outFile = new File(getArchive().getAbsolutePath() + "temp");
-
- TarOutputStream outStream = new TarOutputStream(new FileOutputStream(outFile));
-
- // get all the entries
- VirtualChild[] children = getVirtualChildrenList();
-
- // create a set of omissions
- HashSet omissions = new HashSet();
-
- // add the virtual file to be replaced
- omissions.add(fullVirtualName);
-
- // create the temp tar
- createTar(children, outStream, omissions);
-
- // now append the new file to the tar
- String parentVirtualPath = null;
-
- int i = fullVirtualName.lastIndexOf("/");
-
- // if the virtual name has no '/', then we will replace it with the
- // new name
- if (i == -1) {
- parentVirtualPath = "";
- }
- // otherwise, we get the parent path to which the new name will be appended
- else {
- parentVirtualPath = fullVirtualName.substring(0, i);
- }
-
- String virtualPath = parentVirtualPath + "/" + name;
-
- // get the existing entry for the file
- TarFile tarFile = getTarFile();
- TarEntry entry = tarFile.getEntry(fullVirtualName);
-
- // update the entry with the file information
- entry = changeTarEntry(entry, file, virtualPath);
-
- // now append this entry to the output stream
- appendFile(file, entry, outStream);
-
- // remove old entry from cache
- vfs.removeEntry(vfs.getEntry(fullVirtualName));
-
- // add the new entry to cache
- VirtualChild temp = getVirtualChild(entry);
- vfs.addEntry(temp);
-
- // close output stream
- outStream.close();
-
- // replace the current tar file with the new one, and do not update cache since
- // we just did
- replaceFile(outFile, false);
-
- return true;
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#delete(java.lang.String)
- */
- public boolean delete(String fullVirtualName) {
-
- // update our cache before accessing cache
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- VirtualChild child = getVirtualFile(fullVirtualName);
- VirtualChild[] omitArray = new VirtualChild[0];
-
- // child does not exist, so quit
- if (!child.exists()) {
- return false;
- }
-
- // child is a directory, so get its children since we need to delete them as well
- if (child.isDirectory) {
- omitArray = getVirtualChildrenList(fullVirtualName);
- }
-
- try {
-
- // open a new temp file which will be our destination for the new tar file
- File outFile = new File(file.getAbsolutePath() + "temp");
- TarOutputStream outStream = new TarOutputStream(new FileOutputStream(outFile));
-
- // get all the entries in the current tar
- VirtualChild[] children = getVirtualChildrenList();
-
- // create a set to hold omissions
- HashSet omissions = new HashSet();
-
- // add the child to it
- omissions.add(child.fullName);
-
- // now go through array of children to be deleted
- // this will be of length 0 if the child is not a directory
- for (int i = 0; i < omitArray.length; i++) {
- omissions.add(omitArray[i].fullName);
- }
-
- // create the tar
- createTar(children, outStream, omissions);
-
- // delete the child from the cache (this will also delete its children if it
- // is a directory)
- vfs.removeEntry(child);
-
- // close output stream
- outStream.close();
-
- // replace the current tar file with the new one, and do not update cache since
- // we just did
- replaceFile(outFile, false);
-
- return true;
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#rename(java.lang.String, java.lang.String)
- */
- public boolean rename(String fullVirtualName, String newName) {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- int i = fullVirtualName.lastIndexOf("/");
-
- // if the original does not have any separator, simply rename it.
- if (i == -1) {
- return fullRename(fullVirtualName, newName);
- }
- // otherwise, get the parent path and append the new name to it.
- else {
- String fullNewName = fullVirtualName.substring(0, i+1) + newName;
- return fullRename(fullVirtualName, fullNewName);
- }
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#move(java.lang.String, java.lang.String)
- */
- public boolean move(String fullVirtualName, String destinationVirtualPath) {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- destinationVirtualPath = ArchiveHandlerManager.cleanUpVirtualPath(destinationVirtualPath);
-
- int i = fullVirtualName.lastIndexOf("/");
-
- // if the original does not have any separator, simply append it to the destination path.
- if (i == -1) {
- return fullRename(fullVirtualName, destinationVirtualPath + "/" + fullVirtualName);
- }
- // otherwise, get the last segment (the name) and append that to the destination path.
- else {
- String name = fullVirtualName.substring(i);
- return fullRename(fullVirtualName, destinationVirtualPath + name);
- }
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#fullRename(java.lang.String, java.lang.String)
- */
- public boolean fullRename(String fullVirtualName, String newFullVirtualName) {
-
- // update our cache before accessing cache
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- newFullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(newFullVirtualName);
- VirtualChild child = getVirtualFile(fullVirtualName);
-
- // if the virtual file to be renamed does not exist, then quit
- if (!child.exists()) {
- return false;
- }
-
- try {
-
- // open a new temp file which will be our destination for the new tar file
- File outFile = new File(file.getAbsolutePath() + "temp");
- TarOutputStream outStream = new TarOutputStream(new FileOutputStream(outFile));
-
- // get all the entries
- VirtualChild[] children = getVirtualChildrenList();
-
- // the rename list
- // a hashmap containing old name, new name associations for each
- // child that has to be renamed
- HashMap names = new HashMap();
-
- // if the entry to rename is a directory, we need to rename all
- // its children entries
- if (child.isDirectory) {
-
- // add the entry itself to the rename list
- // include '/' in both the old name and the new name since it is a directory
- names.put(fullVirtualName + "/", newFullVirtualName + "/");
-
- // get all the children of the entry to be renamed
- VirtualChild[] childrenArray = getVirtualChildrenList(fullVirtualName);
-
- // now we need to get the relative path of each child with respect to the virtual name
- // and append the relative path to the new virtual name
- for (int i = 0; i < childrenArray.length; i++) {
-
- int j = fullVirtualName.length();
-
- // get the relative path with respect to the virtual name
- String suffix = childrenArray[i].fullName.substring(j);
-
- // add the relative path to the new virtual name
- String newName = newFullVirtualName + suffix;
-
- // if a child is a directory, ensure that '/'s are added both for the old name
- // and the new name
- if (childrenArray[i].isDirectory) {
- names.put(childrenArray[i].fullName + "/", newName + "/");
- }
- else {
- names.put(childrenArray[i].fullName, newName);
- }
- }
- }
- // otherwise entry is not a directory, so simply add it to the rename list
- else {
- names.put(fullVirtualName, newFullVirtualName);
- }
-
- // create tar with renamed entries
- createTar(children, outStream, names);
-
- // close the output stream
- outStream.close();
-
- // replace the current tar file with the new one, and force an update of the cache.
- // TODO: we force a fresh update of the cache because it is seemingly complicated
- // to do the delta upgrade of the cache. But investigate this, since it will
- // probably be more efficient
- replaceFile(outFile, true);
-
- return true;
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
- }
-
- /**
- * Creates a tar file from the given virtual child objects, using the given output stream and renaming entries
- * according to hash map entries.
- * @param children an array of virtual children from which to create a tar file.
- * @param outStream the tar output stream to use.
- * @param renameMap a map containing associations between old names and new names. Old names are the keys
- * in the map, and the values are the new names.
- * @throws IOException if an I/O exception occurs.
- */
- protected void createTar(VirtualChild[] children, TarOutputStream outStream, HashMap renameMap) throws IOException {
-
- TarFile tarFile = getTarFile();
-
- // go through each child
- for (int i = 0; i < children.length; i++) {
-
- VirtualChild child = children[i];
- String oldPath = child.getArchiveStandardName();
- String newPath = oldPath;
- boolean needToRename = false;
-
- // if entry is to be renamed, get the new path
- if (renameMap.containsKey(oldPath)) {
- newPath = (String)(renameMap.get(oldPath));
- child.renameTo(newPath);
- needToRename = true;
- }
-
- TarEntry nextEntry = tarFile.getEntry(oldPath);
-
- // if child is a directory, then just add an entry for it
- // there is no data
- if (children[i].isDirectory) {
-
- // if we need to rename the entry, then do so now
- if (needToRename) {
- nextEntry = changeTarEntryName(nextEntry, newPath);
- }
-
- // put the entry
- outStream.putNextEntry(nextEntry);
-
- // close the entry
- outStream.closeEntry();
- }
- // otherwise child is a file, so add an entry for it
- // and then add data (i.e. file contents).
- else {
-
- // get the input stream for the file contents
- InputStream inStream = tarFile.getInputStream(nextEntry);
-
- // if we need to rename the entry, then do so now
- // this must be done after we have obtained the input stream
- // since tarFile.getInputStream() depends on the entry name
- if (needToRename) {
- nextEntry = changeTarEntryName(nextEntry, newPath);
- }
-
- // put the entry
- outStream.putNextEntry(nextEntry);
-
- // write data
- byte[] buf = new byte[ITarConstants.BLOCK_SIZE];
- int numRead = inStream.read(buf);
-
- while (numRead > 0) {
- outStream.write(buf, 0, numRead);
- numRead = inStream.read(buf);
- }
-
- // close input stream
- inStream.close();
-
- // close entry, but do not close the output stream
- outStream.closeEntry();
- }
- }
- }
-
- /**
- * Changes the name of a tar entry. Also calculates the new checksum for the entry.
- * @param entry the entry for which the name has to be changed.
- * @param newName the new name for the entry.
- * @return the changed entry.
- */
- protected TarEntry changeTarEntryName(TarEntry entry, String newName) {
-
- // change entry path
- entry.setName(newName);
-
- // calculate checksum
- entry.calculateChecksum();
-
- return entry;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getFiles(java.lang.String[])
- */
- public File[] getFiles(String[] fullNames) {
-
- File[] files = new File[fullNames.length];
-
- for (int i = 0; i < fullNames.length; i++) {
- String name;
- String fullName = fullNames[i];
- fullName = ArchiveHandlerManager.cleanUpVirtualPath(fullName);
- int j = fullName.lastIndexOf("/");
-
- if (j == -1) {
- name = fullName;
- }
- else {
- name = fullName.substring(j+1);
- }
-
- try {
- files[i] = File.createTempFile(name, "virtual");
- files[i].deleteOnExit();
- extractVirtualFile(fullNames[i], files[i]);
- }
- catch (IOException e) {
- // TODO: log error
- return null;
- }
- }
-
- return files;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#createFolder(java.lang.String)
- */
- public boolean createFolder(String fullVirtualName) {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- fullVirtualName = fullVirtualName + "/";
- return createVirtualObject(fullVirtualName);
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#createFile(java.lang.String)
- */
- public boolean createFile(String fullVirtualName) {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- return createVirtualObject(fullVirtualName);
- }
-
- /**
- * Creates a virtual object that does not already exist in the virtual file system.
- * Creates an empty file in the tar file.
- * @param name the name of the virtual object.
- * @return <code>true</code> if the object was created successfully, <code>false</code> otherwise.
- */
- protected boolean createVirtualObject(String name) {
-
- // update our cache before accessing cache
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
-
- // if the object already exists, return false
- if (exists(name)) {
- return false;
- }
-
- try {
-
- // open a new temp file which will be our destination for the new tar file
- File outFile = new File(file.getAbsolutePath() + "temp");
- TarOutputStream outStream = new TarOutputStream(new FileOutputStream(outFile));
-
- // get all the entries
- VirtualChild[] children = getVirtualChildrenList();
-
- // if it is an empty temp file, no need to recreate it
- if (children.length != 0) {
- createTar(children, outStream, (HashSet)null);
- }
-
- // append an empty file to the tar file
- TarEntry newEntry = appendEmptyFile(outStream, name);
-
- // add to cache
- VirtualChild temp = getVirtualChild(newEntry);
- vfs.addEntry(temp);
-
- // close the output stream
- outStream.close();
-
- // replace the current tar file with the new one, but do not update the cache
- // since we have already updated to the cache
- replaceFile(outFile, false);
-
- return true;
- }
- catch (IOException e) {
- // TODO: log error
- return false;
- }
- }
-
- /**
- * Creates a new tar entry and appends it to the tar output stream with the given name.
- * @param outStream the tar output stream.
- * @param name the name of the new tar entry.
- * @return the newly created tar entry.
- * @throws IOException if an I/O error occurs.
- */
- protected TarEntry appendEmptyFile(TarOutputStream outStream, String name) throws IOException {
-
- // create a new entry with size 0 and the last modified time as the current time
- TarEntry newEntry = new TarEntry(name);
- newEntry.setSize(0);
- newEntry.setModificationTime(System.currentTimeMillis());
-
- // set the user name
- String userName = System.getProperty("user.name");
-
- if (userName != null) {
- newEntry.setUserName(userName);
- }
-
- // set user permissions
- boolean canRead = file.canRead();
- boolean canWrite = file.canWrite();
-
- // getting execute permission is a bit tricky
- // need to go through security manager
- boolean canExecute = false;
-
- // first get the system security manager
- SecurityManager sm = System.getSecurityManager();
-
- // if there is no security manager then create a new one
- if (sm == null) {
- sm = new SecurityManager();
- }
-
- try {
-
- // if security manager successfully created, check permission
- if (sm != null) {
-
- // create a file permission to check execute
- FilePermission permission = new FilePermission(file.getAbsolutePath(), "execute");
-
- // this call will throw a SecurityException if permission does not exist
- sm.checkPermission(permission);
- canExecute = true;
- }
- else {
- canExecute = false;
- }
- }
- catch(SecurityException e) {
- canExecute = false;
- }
-
- newEntry.setUserMode(canRead, canWrite, canExecute);
-
- // calculate checksum
- newEntry.calculateChecksum();
-
- // put the entry
- outStream.putNextEntry(newEntry);
-
- // close the entry
- outStream.closeEntry();
-
- return newEntry;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getStandardName(org.eclipse.rse.services.clientserver.archiveutils.VirtualChild)
- */
- public String getStandardName(VirtualChild vc) {
-
- if (vc.isDirectory) {
- return vc.fullName + "/";
- }
-
- return vc.fullName;
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#create()
- */
- public boolean create() {
-
- try {
-
- // create output stream
- TarOutputStream outStream = new TarOutputStream(new FileOutputStream(file));
-
- // close output stream, so we have an empty tar file
- outStream.close();
-
- // recreate cache
- createCache();
-
- // set cache time
- modTimeDuringCache = file.lastModified();
- }
- catch (IOException e) {
- return false;
- }
-
- return true;
- }
-
- public SystemSearchLineMatch[] search(String fullVirtualName, SystemSearchStringMatcher matcher) {
- // if the search string is empty or if it is "*", then return no matches
- // since it is a file search
- if (matcher.isSearchStringEmpty() || matcher.isSearchStringAsterisk()) {
- return new SystemSearchLineMatch[0];
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- VirtualChild vc = getVirtualFile(fullVirtualName);
-
- if (!vc.exists() || vc.isDirectory) {
- return new SystemSearchLineMatch[0];
- }
-
- TarFile tarFile = getTarFile();
- TarEntry entry = tarFile.getEntry(fullVirtualName);
- InputStream is = null;
-
- try {
- tarFile.getInputStream(entry);
-
- if (is == null) {
- return new SystemSearchLineMatch[0];
- }
-
- InputStreamReader isr = new InputStreamReader(is);
- BufferedReader bufReader = new BufferedReader(isr);
-
- SystemSearchStringMatchLocator locator = new SystemSearchStringMatchLocator(bufReader, matcher);
- SystemSearchLineMatch[] matches = locator.locateMatches();
-
- if (matches == null) {
- return new SystemSearchLineMatch[0];
- }
- else {
- return matches;
- }
- }
- catch (IOException e) {
- // TODO: log error
- return new SystemSearchLineMatch[0];
- }
- }
-
- public boolean exists()
- {
- return true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getCommentFor(java.lang.String)
- */
- public String getCommentFor(String fullVirtualName)
- {
- return "";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getCompressedSizeFor(java.lang.String)
- */
- public long getCompressedSizeFor(String fullVirtualName)
- {
- return getSizeFor(fullVirtualName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getCompressionMethodFor(java.lang.String)
- */
- public String getCompressionMethodFor(String fullVirtualName)
- {
- return "";
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getArchiveComment()
- */
- public String getArchiveComment()
- {
- return "";
- }
-
- /**
- * @param file
- * @param virtualPath
- * @param name
- * @param encoding
- * @param registry
- * @return
- */
- public boolean add(File file, String virtualPath, String name,
- String encoding, ISystemFileTypes registry) {
- return add(file, virtualPath, name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
- */
- public boolean add(File file, String virtualPath, String name,
- String sourceEncoding, String targetEncoding, boolean isText) {
- return add(file, virtualPath, name);
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File[], java.lang.String, java.lang.String[], java.lang.String[], java.lang.String[], boolean[])
- */
- public boolean add(File[] files, String virtualPath, String[] names,
- String[] sourceEncodings, String[] targetEncodings, boolean[] isTexts) {
- return add(files, virtualPath, names);
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.io.File, java.lang.String, boolean)
- */
- public boolean extractVirtualDirectory(String dir, File destinationParent,
- File destination, String sourceEncoding, boolean isText) {
- return extractVirtualDirectory(dir, destinationParent, destination);
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.lang.String, boolean)
- */
- public boolean extractVirtualDirectory(String dir, File destinationParent,
- String sourceEncoding, boolean isText) {
- return extractVirtualDirectory(dir, destinationParent);
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualFile(java.lang.String, java.io.File, java.lang.String, boolean)
- */
- public boolean extractVirtualFile(String fullVirtualName, File destination,
- String sourceEncoding, boolean isText) {
- return extractVirtualFile(fullVirtualName, destination);
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getClassification(java.lang.String)
- */
- public String getClassification(String fullVirtualName) {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- // default type
- String type = "file";
-
- // if it's not a class file, we do not classify it
- if (!fullVirtualName.endsWith(".class")) {
- return type;
- }
-
- // get the entry with that name
- TarEntry entry = getTarFile().getEntry(fullVirtualName);
-
- // get the input stream for the entry
- InputStream stream = null;
-
- // class file parser
- BasicClassFileParser parser = null;
-
- boolean isExecutable = false;
-
- try {
- stream = getTarFile().getInputStream(entry);
-
- // use class file parser to parse the class file
- parser = new BasicClassFileParser(stream);
- parser.parse();
-
- // query if it is executable, i.e. whether it has main method
- isExecutable = parser.isExecutable();
- }
- catch (IOException e) {
- // TODO: log it
-
- // we assume not executable
- isExecutable = false;
- }
-
- // if it is executable, then also get qualified class name
- if (isExecutable) {
- type = "executable(java";
-
- String qualifiedClassName = parser.getQualifiedClassName();
-
- if (qualifiedClassName != null) {
- type = type + ":" + qualifiedClassName;
- }
-
- type = type + ")";
- }
-
- return type;
- }
-
- public boolean add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes typeRegistery) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText) {
- // TODO Auto-generated method stub
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemUniversalZipEntry.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemUniversalZipEntry.java
deleted file mode 100644
index ae5f7a1cc..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemUniversalZipEntry.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.archiveutils;
-
-import java.util.zip.ZipEntry;
-
-/**
- * @author mjberger
- *
- * This is a wrapper class for a ZipEntry object that contains some
- * extra helper methods for processing the ZipEntry that are not included
- * in java.util.zip.ZipEntry.
- */
-public class SystemUniversalZipEntry
-{
-
- protected ZipEntry _entry;
- protected String _entryFullName;
- protected String _entryFullPath;
- protected String _entryName;
- protected String _extension;
- protected boolean _nested;
-
- public SystemUniversalZipEntry(ZipEntry entry)
- {
- _entry = entry;
- doNameProcessing();
- }
-
- /**
- * Returns the ZipEntry associated with this SystemUniversalZipEntry
- */
- public ZipEntry getEntry()
- {
- return _entry;
- }
-
- /**
- * Sets the ZipEntry associated with this SystemUniversalZipEntry
- */
- public void setEntry(ZipEntry newEntry)
- {
- _entry = newEntry;
- doNameProcessing();
- }
-
- private void doNameProcessing()
- {
- if (_entry.isDirectory())
- {
- _entryFullName = _entry.getName().substring(0, _entry.getName().length()-1);
- }
- else
- {
- _entryFullName = _entry.getName();
- }
- int endOfPathPosition = _entryFullName.lastIndexOf("/");
- if (endOfPathPosition != -1)
- {
- _entryFullPath = _entryFullName.substring(0,endOfPathPosition);
- _entryName = _entryFullName.substring(endOfPathPosition+1);
- }
- else
- {
- _entryFullPath = "";
- _entryName = _entryFullName;
- }
- int i = _entryFullName.lastIndexOf(".");
- if (i == -1)
- {
- _extension = "";
- } else _extension = _entryFullName.substring(i + 1);
- if (_entryFullName.indexOf("/") != -1) _nested = true;
- }
-
- /**
- * Returns the full path to the entry within the ZipFile file structure.
- * Note: this is NOT the full path to the ZipFile in the regular file
- * system.
- * @return a String containing the full path leading to the ZipEntry within
- * the ZipFile file structure. Does not include the file name.
- */
- public String getFullPath()
- {
- return _entryFullPath;
- }
-
- /**
- * Returns the full name associated with this entry (including path to the
- * entry) within the ZipFile file structure. Note: this is NOT the full path to the
- * ZipFile in the regular file system.
- * @return a String containing the full name including path of the ZipEntry
- * within the ZipFile file structure. Includes the file name.
- */
- public String getFullName()
- {
- return _entryFullName;
- }
-
- /**
- * Returns only the filename associated with this entry in the ZipFile
- * file structure.
- * @return a String containing only the file name of this ZipEntry.
- */
- public String getName()
- {
- return _entryName;
- }
-
- /**
- * Returns the extension of this entry, if the entry is a file,
- * null string otherwise.
- */
- public String getExtension()
- {
- return _extension;
- }
-
- /**
- * Returns whether or not this entry is nested within folders within the zip file.
- */
- public boolean isNested()
- {
- return _nested;
- }
-
- /**
- * @return Whether or not this zipentry is a directory.
- */
- public boolean isDirectory()
- {
- return _entry.isDirectory();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemZipHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemZipHandler.java
deleted file mode 100644
index 857784757..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemZipHandler.java
+++ /dev/null
@@ -1,2227 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.archiveutils;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Vector;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import java.util.zip.ZipOutputStream;
-
-import org.eclipse.rse.services.clientserver.ISystemFileTypes;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.java.BasicClassFileParser;
-import org.eclipse.rse.services.clientserver.search.SystemSearchLineMatch;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatchLocator;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatcher;
-
-
-/**
- * @author mjberger
- * Implements an ISystemArchiveHandler for ZIP files.
- */
-public class SystemZipHandler implements ISystemArchiveHandler
-{
-
- protected ZipFile _zipfile; // The underlying zipfile associated with this handler.
- protected HashMap _virtualFS; // The virtual file system formed by the entries in _zipfile.
- //--------------------------------------------------------------------------------------------------------------------
- // Explanation of how the virtual file system is stored in a HashMap:
- //
- // _virtualFS is a HashMap of HashMaps. How does this suggest a tree structure?
- // The keys in _virtualFS are all Strings. There is one key in _virtualFS for every directory
- // in the virtual file system. The root directory has the key "". Associated with each key, is a value, and that value
- // is itself another HashMap, representing the contents of that directory. In the "inner" HashMap, each key is
- // a String giving the name of an object in the directory, and each associated value is a
- // VirtualChild representing that object itself.
- //
- // Note that if the object is a directory, then
- // the value representing it in the inner HashMap is still a VirtualChild, not another
- // HashMap. There are only two levels of HashMaps in the virtual file system. If the
- // object is a directory, then the VirtualChild object representing it will have
- // isDirectory == true. We can then find the contents of this directory, by going
- // back out to the outer HashMap, and retrieving the inner HashMap associated
- // with our directory's name.
- //
- // This file system is designed for quick retrieval of virtual objects.
- // Retrieving a single object whose full path is known can be done
- // in worst case O(1) time rather than O(h) time for a tree file system with height h.
- // Retrieving the children of an object takes worst case O(s) time, where s is the size
- // of the inner HashMap containing those children.
- // For insertion, the object must be inserted into its appropriate inner HashMap,
- // and then the HashMaps for all ancestors must either be created or updated, so this
- // takes worst case O(d) time, where d is the depth of the object in the virtual file tree.
- // For deletion, the argument is similar, that this takes O(d) time.
- // For renames, the worst case is O(n) time, where n is the number of nodes in the
- // virtual file tree. This is because if we change the name of a directory under the root,
- // then we must change all of its children's VirtualChild objects as well. It is advisable
- // to just rebuild the tree for a rename.
- //
- // Building the tree from a list of entries in a zipfile takes O(nh) time, where n
- // is the number of entries in the zipfile, and h is the maximum height of an entry in
- // the virtual file system.
- //--------------------------------------------------------------------------------------------------------------------
-
- protected File _file; // The underlying file associated with this handler.
- protected long _vfsLastModified; // The timestamp of the file that the virtual file system reflects.
- protected boolean _exists; // Whether or not the zipfile "exists" (in order to exist, must be uncorrupted too)
-
- /**
- * Creates a new SystemZipHandler and associates it with <code>file</code>.
- * @param file The file that this handler will wrapper.
- * @throws IOException If there is an error handling <code>file</code>
- */
- public SystemZipHandler(File file)
- {
- _file = file;
- _vfsLastModified = _file.lastModified();
- if (openZipFile())
- {
- buildTree();
- closeZipFile();
- _exists = true;
- }
- else
- {
- _exists = false;
- }
- }
-
- /**
- * Builds the virtual file system tree out of the entries in
- * the zipfile.
- *
- */
- protected void buildTree()
- {
- _virtualFS = new HashMap();
- Enumeration entries = _zipfile.entries();
- while (entries.hasMoreElements())
- {
- ZipEntry next = (ZipEntry) entries.nextElement();
- fillBranch(next);
- }
- }
-
- /**
- * Populates an entire branch of the tree that comprises the
- * virtual file system. The parameter is the leaf node, and from
- * the virtual path of the parameter, we can deduce what the ancestors
- * of the leaves are, and populate the tree from there.
- * @param next The ZipEntry from which the branch will be built.
- */
- protected void fillBranch(ZipEntry next)
- {
- VirtualChild nextChild;
- if (next.getName().equals("/")) return; // dummy entry
- if (!next.isDirectory())
- {
- SystemUniversalZipEntry nextEntry = new SystemUniversalZipEntry(next);
- nextChild = new VirtualChild(this, nextEntry.getFullName());
- }
- else // it is a directory
- {
- SystemUniversalZipEntry nextEntry = new SystemUniversalZipEntry(next);
- nextChild = new VirtualChild(this, nextEntry.getFullName());
- nextChild.isDirectory = true;
-
- if (!_virtualFS.containsKey(nextChild.fullName))
- {
- _virtualFS.put(nextChild.fullName, new HashMap());
- }
-
- }
- // key has not been encountered before, create a new
- // element in the virtualFS.
- if (!_virtualFS.containsKey(nextChild.path))
- {
- recursivePopulate(nextChild.path, nextChild);
- }
- else // key has been encountered before, no need to recursively
- // populate the subdirectories
- {
- HashMap hm = (HashMap) _virtualFS.get(nextChild.path);
- hm.put(nextChild.name, nextChild);
- }
- }
-
- /**
- * Actually does the work for the fillBranch method. Recursively
- * inserts key/value pairs into the virtualFS, then uses the key
- * to get the next parent (moving up one level) and thus recursively
- * populates one branch.
- */
- protected void recursivePopulate(String key, VirtualChild value)
- {
- // base case 1: key has been encountered before, finish recursing
- if (_virtualFS.containsKey(key))
- {
- HashMap hm = (HashMap) _virtualFS.get(key);
- hm.put(value.name, value);
- return;
- }
-
- // else
- HashMap newValue = new HashMap();
- newValue.put(value.name, value);
- _virtualFS.put(key, newValue);
-
- // base case 2
- if (key.equals(""))
- {
- return;
- }
- else
- {
- int i = key.lastIndexOf("/");
- if (i == -1) // recursive last step
- {
- VirtualChild nextValue = new VirtualChild(this, key);
- nextValue.isDirectory = true;
- recursivePopulate("", nextValue);
- return;
- }
- else // recursive step
- {
- String newKey = key.substring(0, i);
- VirtualChild nextValue = new VirtualChild(this, key);
- nextValue.isDirectory = true;
- recursivePopulate(newKey, nextValue);
- return;
- }
-
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildrenList()
- */
- public VirtualChild[] getVirtualChildrenList()
- {
- return getVirtualChildrenList(true);
- }
-
- /**
- * Same as getVirtualChildrenList(), but you can choose whether
- * to leave the zip file open or closed upon return.
- */
- public VirtualChild[] getVirtualChildrenList(boolean closeZipFile)
- {
- if (!_exists) return new VirtualChild[0];
- if (!updateVirtualFSIfNecessary()) return new VirtualChild[0];
-
- if (openZipFile())
- {
- Vector children = new Vector();
- Enumeration entries = _zipfile.entries();
- while (entries.hasMoreElements())
- {
- ZipEntry next = (ZipEntry) entries.nextElement();
- SystemUniversalZipEntry nextEntry = new SystemUniversalZipEntry(next);
- VirtualChild nextChild = new VirtualChild(this, nextEntry.getFullName());
- nextChild.isDirectory = next.isDirectory();
- children.add(nextChild);
- }
- VirtualChild[] retVal = new VirtualChild[children.size()];
- for (int i = 0; i < children.size(); i++)
- {
- retVal[i] = (VirtualChild) children.get(i);
- }
- if (closeZipFile) closeZipFile();
- return retVal;
- }
- else return new VirtualChild[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildrenList(java.lang.String)
- */
- public VirtualChild[] getVirtualChildrenList(String parent)
- {
- return getVirtualChildrenList(parent, true);
- }
-
- /**
- * Same as getVirtualChildrenList(String parent) but you can choose whether
- * or not you want to leave the zipfile open after return.
- */
- public VirtualChild[] getVirtualChildrenList(String parent, boolean closeZipFile)
- {
- if (!_exists) return new VirtualChild[0];
- if (!updateVirtualFSIfNecessary()) return new VirtualChild[0];
-
- if (openZipFile())
- {
- parent = ArchiveHandlerManager.cleanUpVirtualPath(parent);
- Vector children = new Vector();
- Enumeration entries = _zipfile.entries();
- while (entries.hasMoreElements())
- {
- ZipEntry next = (ZipEntry) entries.nextElement();
- String nextName = ArchiveHandlerManager.cleanUpVirtualPath(next.getName());
- if (nextName.startsWith(parent) && !nextName.equals(parent+"/"))
- {
- SystemUniversalZipEntry nextEntry = new SystemUniversalZipEntry(next);
- VirtualChild nextChild = new VirtualChild(this, nextEntry.getFullName());
- nextChild.isDirectory = next.isDirectory();
- children.add(nextChild);
- }
- }
- VirtualChild[] retVal = new VirtualChild[children.size()];
- for (int i = 0; i < children.size(); i++)
- {
- retVal[i] = (VirtualChild) children.get(i);
- }
- if (closeZipFile) closeZipFile();
- return retVal;
- }
- else return new VirtualChild[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildren(java.lang.String)
- */
- public VirtualChild[] getVirtualChildren(String fullVirtualName)
- {
- if (!_exists) return null;
- if (!updateVirtualFSIfNecessary()) return null;
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- VirtualChild[] values = null;
- if (_virtualFS.containsKey(fullVirtualName))
- {
- HashMap hm = (HashMap) _virtualFS.get(fullVirtualName);
- Object valueArray[] = hm.values().toArray();
- values = new VirtualChild[hm.size()];
- for (int i = 0; i < hm.size(); i++)
- {
- values[i] = (VirtualChild) valueArray[i];
- }
-
- }
- return values;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildFolders(java.lang.String)
- */
- public VirtualChild[] getVirtualChildFolders(String fullVirtualName)
- {
- if (!_exists) return null;
- if (!updateVirtualFSIfNecessary()) return null;
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- Vector folders = new Vector();
- VirtualChild[] values = null;
- if (_virtualFS.containsKey(fullVirtualName))
- {
- HashMap hm = (HashMap) _virtualFS.get(fullVirtualName);
- Object valueArray[] = hm.values().toArray();
- for (int i = 0; i < hm.size(); i++)
- {
- if (((VirtualChild) valueArray[i]).isDirectory) folders.add(valueArray[i]);
- }
- values = new VirtualChild[folders.size()];
- for (int i = 0; i < folders.size(); i++)
- {
- values[i] = (VirtualChild) folders.get(i);
- }
- }
- return values;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualFile(java.lang.String)
- */
- public VirtualChild getVirtualFile(String fullVirtualName)
- {
- if (!_exists) return new VirtualChild(this, fullVirtualName);
- if (!updateVirtualFSIfNecessary()) return new VirtualChild(this, fullVirtualName);
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- if (fullVirtualName == "" || fullVirtualName == null) return new VirtualChild(this);
- int i = fullVirtualName.lastIndexOf("/");
- String path;
- String name;
- if (i == -1)
- {
- path = "";
- name = fullVirtualName;
- }
- else
- {
- path = fullVirtualName.substring(0, i);
- name = fullVirtualName.substring(i+1);
- }
- HashMap hm = (HashMap) _virtualFS.get(path);
- if (hm == null) return new VirtualChild(this, fullVirtualName);
- VirtualChild vc = (VirtualChild) hm.get(name);
- if (vc == null) return new VirtualChild(this, fullVirtualName);
- return vc;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#exists(java.lang.String)
- */
- public boolean exists(String fullVirtualName)
- {
- if (!_exists) return false;
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- if (fullVirtualName == "" || fullVirtualName == null) return false;
-
- if (_vfsLastModified == _file.lastModified())
- {
- int i = fullVirtualName.lastIndexOf("/");
- String path;
- String name;
- if (i == -1)
- {
- path = "";
- name = fullVirtualName;
- }
- else
- {
- path = fullVirtualName.substring(0, i);
- name = fullVirtualName.substring(i+1);
- }
- HashMap hm = (HashMap) _virtualFS.get(path);
- if (hm == null) return false;
- if (hm.get(name) == null) return false;
- return true;
- }
- else
- {
- boolean retval = false;
- boolean keepOpen = _zipfile != null;
- if (openZipFile())
- {
- try
- {
- safeGetEntry(fullVirtualName);
- retval = true;
- }
- catch (IOException e)
- {
- try
- {
- safeGetEntry(fullVirtualName + "/");
- retval = true;
- }
- catch (IOException f)
- {
- retval = false;
- }
- }
- buildTree();
- _vfsLastModified = _file.lastModified();
- if (!keepOpen) closeZipFile();
- return retval;
- }
- else
- {
- System.out.println("Could not open the ZipFile " + _file.toString());
- return false;
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getArchive()
- */
- public File getArchive()
- {
- return _file;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getTimeStampFor(java.lang.String)
- */
- public long getTimeStampFor(String fullVirtualName)
- {
- return getTimeStampFor(fullVirtualName, true);
- }
-
- /**
- * Same as getTimeStampFor(String fullVirtualName) but you can choose whether
- * or not you want to leave the zipfile open after return.
- */
- public long getTimeStampFor(String fullVirtualName, boolean closeZipFile)
- {
- if (!_exists) return 0;
-
- if (openZipFile())
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- ZipEntry entry = null;
- try
- {
- entry = safeGetEntry(fullVirtualName);
- }
- catch (IOException e)
- {
- if (closeZipFile) closeZipFile();
- return _file.lastModified();
- }
- if (closeZipFile) closeZipFile();
- return entry.getTime();
- }
- else return _file.lastModified();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getSizeFor(java.lang.String)
- */
- public long getSizeFor(String fullVirtualName)
- {
- return getSizeFor(fullVirtualName, true);
- }
-
- public long getSizeFor(String fullVirtualName, boolean closeZipFile)
- {
- if (!_exists) return 0;
-
- if (openZipFile())
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- ZipEntry entry = null;
- try
- {
- entry = safeGetEntry(fullVirtualName);
- }
- catch (IOException e)
- {
- if (closeZipFile) closeZipFile();
- return 0;
- }
- if (closeZipFile) closeZipFile();
- return entry.getSize();
- }
- else return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualFile(java.lang.String, java.io.File)
- */
- public boolean extractVirtualFile(String fullVirtualName, File destination)
- {
- return extractVirtualFile(fullVirtualName, destination, true, SystemEncodingUtil.ENCODING_UTF_8, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualFile(java.lang.String, java.io.File, java.lang.String, boolean)
- */
- public boolean extractVirtualFile(String fullVirtualName, File destination, String sourceEncoding, boolean isText)
- {
- return extractVirtualFile(fullVirtualName, destination, true, sourceEncoding, isText);
- }
-
- /**
- * Same as extractVirtualFile(String fullVirtualName, File destination) but you can choose whether
- * or not you want to leave the zipfile open after return.
- */
- public boolean extractVirtualFile(String fullVirtualName, File destination, boolean closeZipFile, String sourceEncoding, boolean isText)
- {
- if (!_exists) return false;
-
- if (openZipFile())
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- ZipEntry entry = null;
- try
- {
- entry = safeGetEntry(fullVirtualName);
- if (entry.isDirectory())
- {
- destination.delete();
- destination.mkdirs();
- destination.setLastModified(entry.getTime());
- if (closeZipFile) closeZipFile();
- return true;
- }
- InputStream is = _zipfile.getInputStream(entry);
- if (is == null)
- {
- destination.setLastModified(entry.getTime());
- if (closeZipFile) closeZipFile();
- return true;
- }
- BufferedInputStream reader = new BufferedInputStream(is);
-
- if (!destination.exists())
- {
- File parentFile = destination.getParentFile();
- if (!parentFile.exists())
- parentFile.mkdirs();
- destination.createNewFile();
- }
- BufferedOutputStream writer = new BufferedOutputStream(
- new FileOutputStream(destination));
-
- byte[] buf = new byte[1024];
- int numRead = reader.read(buf);
-
- while (numRead > 0)
- {
- if (isText)
- {
- String bufString = new String(buf, sourceEncoding);
- byte[] convertedBuf = bufString.getBytes();
- int newSize = convertedBuf.length;
- writer.write(convertedBuf, 0, newSize);
- }
- else
- {
- writer.write(buf, 0, numRead);
- }
- numRead = reader.read(buf);
- }
- writer.close();
- reader.close();
- }
- catch (IOException e)
- {
- if (_virtualFS.containsKey(fullVirtualName))
- {
- destination.delete();
- destination.mkdirs();
- destination.setLastModified(_file.lastModified());
- if (closeZipFile) closeZipFile();
- return true;
- }
- System.out.println(e.getMessage());
- if (closeZipFile) closeZipFile();
- return false;
- }
- destination.setLastModified(entry.getTime());
- if (closeZipFile) closeZipFile();
- return true;
- }
- else return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File)
- */
- public boolean extractVirtualDirectory(String dir, File destinationParent)
- {
- return extractVirtualDirectory(dir, destinationParent, (File) null, SystemEncodingUtil.ENCODING_UTF_8, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.lang.String, boolean)
- */
- public boolean extractVirtualDirectory(String dir, File destinationParent, String sourceEncoding, boolean isText)
- {
- return extractVirtualDirectory(dir, destinationParent, (File) null, sourceEncoding, isText);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.io.File)
- */
- public boolean extractVirtualDirectory(String dir, File destinationParent, File destination)
- {
- return extractVirtualDirectory(dir, destinationParent, destination, SystemEncodingUtil.ENCODING_UTF_8, false);
- }
-
- public boolean extractVirtualDirectory(String dir, File destinationParent, File destination, String sourceEncoding, boolean isText)
- {
- if (!_exists) return false;
-
- if (!destinationParent.isDirectory()) return false;
- dir = ArchiveHandlerManager.cleanUpVirtualPath(dir);
- if (!_virtualFS.containsKey(dir)) return false;
-
- String name;
- int charsToTrim;
- int j = dir.lastIndexOf("/");
- if (j == -1)
- {
- charsToTrim = 0;
- name = dir;
- }
- else
- {
- charsToTrim = dir.substring(0,j).length() + 1;
- name = dir.substring(j+1);
- }
-
- if (destination == null)
- {
- if (dir.equals(""))
- {
- destination = destinationParent;
- }
- else
- {
- destination = new File(destinationParent, name);
- }
- }
-
- if (!(destination == destinationParent))
- {
- if (destination.isFile() && destination.exists())
- {
- if (!SystemArchiveUtil.delete(destination))
- {
- System.out.println("Could not overwrite directory " + destination);
- System.out.println("(Could not delete old directory)");
- return false;
- }
- }
-
- if (!destination.exists())
- {
- if (!destination.mkdirs())
- {
- System.out.println("Could not overwrite directory " + destination);
- System.out.println("(Could not create new directory)");
- return false;
- }
- }
- }
-
- File topFile = destination;
- String topFilePath = topFile.getAbsolutePath().replace('\\', '/');
- //if (!dir.equals(topFile.getName()))
- if (!topFilePath.endsWith(dir))
- {
- rename(dir, topFile.getName());
- dir = topFile.getName();
- }
- VirtualChild[] newChildren = getVirtualChildrenList(dir);
-
-
- extractVirtualFile(dir + '/', topFile, sourceEncoding, isText);
-
- for (int i = 0; i < newChildren.length; i++)
- {
- String newName = newChildren[i].fullName.substring(charsToTrim);
- char separator = File.separatorChar;
- newName = newName.replace('/', separator);
-
- File nextFile = new File(destinationParent, newName);
- /*
- // DKM: case where a rename has taken place
- // don't want to extract root folder as it appears in zip
- if (!nextFile.getParent().equals(destination.getPath()) &&
- nextFile.getParentFile().getParent().equals(destination.getParent()))
- {
- nextFile = new File(destination, nextFile.getName());
- }
- */
- if (!nextFile.exists())
- {
- if (newChildren[i].isDirectory)
- {
- if (!nextFile.mkdirs())
- {
- System.out.println("Could not create folder " + nextFile.toString());
- return false;
- }
- }
- else
- {
- createFile(nextFile);
- }
- boolean success = false;
- if (newChildren[i].isDirectory)
- {
- success = extractVirtualFile(newChildren[i].fullName + '/', nextFile, sourceEncoding, isText);
- }
- else
- {
- success = extractVirtualFile(newChildren[i].fullName, nextFile, sourceEncoding, isText);
- }
- if (!success) return false;
- }
- }
- return true;
- }
-
- protected boolean createFile(File file)
- {
- try
- {
- if (!file.createNewFile())
- {
- System.out.println("File already exists: " + file.toString());
- return false;
- }
- else
- {
- return true;
- }
- }
- catch (IOException e)
- {
- if (!file.getParentFile().exists() && file.getParentFile().mkdirs())
- {
- return createFile(file);
- }
- else
- {
- System.out.println("Could not create " + file.toString());
- System.out.println(e.getMessage());
- return false;
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File, java.lang.String, java.lang.String)
- */
- public boolean add(File file, String virtualPath, String name)
- {
- return add(file, virtualPath, name, SystemEncodingUtil.ENCODING_UTF_8, SystemEncodingUtil.ENCODING_UTF_8, false);
- }
-
- public boolean add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText)
- {
- if (!_exists) return false;
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
-
- if (exists(virtualPath + "/" + name))
- {
- // wrong method
- return replace(virtualPath + "/" + name, stream, name, sourceEncoding, targetEncoding, isText);
- }
- else
- {
- if (openZipFile())
- {
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
- File outputTempFile;
- try
- {
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp");
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
-
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false);
-
- // if it is an empty zip file, no need to recreate it
- if (!(vcList.length == 1) || !vcList[0].fullName.equals(""))
- {
- recreateZipDeleteEntries(vcList, dest, null);
- }
-
- // append the additional entry to the zip file.
- ZipEntry newEntry = appendBytes(stream, dest, virtualPath, name, sourceEncoding, targetEncoding, isText);
- // Add the new entry to the virtual file system in memory
- fillBranch(newEntry);
-
- dest.close();
-
- // Now replace the old zip file with the new one
- replaceOldZip(outputTempFile);
-
- }
- catch (IOException e)
- {
- System.out.println("Could not add a file.");
- System.out.println(e.getMessage());
- closeZipFile();
- return false;
- }
- closeZipFile();
- return true;
- }
- else return false;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File[], java.lang.String, java.lang.String[])
- */
- public boolean add(File[] files, String virtualPath, String[] names)
- {
- String[] encodings = new String[files.length];
- boolean[] isTexts = new boolean[files.length];
- for (int i = 0; i < files.length; i++)
- {
- encodings[i] = SystemEncodingUtil.ENCODING_UTF_8;
- isTexts[i] = false;
- }
- return add(files, virtualPath, names, encodings, encodings, isTexts, true);
- }
-
- public boolean add(File[] files, String virtualPath, String[] names, String[] sourceEncodings, String[] targetEncodings, boolean[] isText)
- {
- return add(files, virtualPath, names, sourceEncodings, targetEncodings, isText, true);
- }
-
-
- /**
- * Same as add(File[] files, String virtualPath, String[] names, String[] encodings) but you can choose whether
- * or not you want to leave the zipfile open after return.
- */
- public boolean add(File[] files, String virtualPath, String[] names, String[] sourceEncodings, String[] targetEncodings, boolean[] isText, boolean closeZipFile)
- {
- if (!_exists) return false;
- if (openZipFile())
- {
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
- int numFiles = files.length;
- for (int i = 0; i < numFiles; i++)
- {
- if (!files[i].exists() || !files[i].canRead()) return false;
- if (exists(virtualPath + "/" + names[i]))
- {
- // sorry, wrong method buddy
- return replace(virtualPath + "/" + names[i], files[i], names[i]);
- }
- }
- File outputTempFile;
- try
- {
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp");
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
-
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false);
-
- // if it is an empty zip file, no need to recreate it
- if (!(vcList.length == 1) || !vcList[0].fullName.equals(""))
- {
- recreateZipDeleteEntries(vcList, dest, null);
- }
-
- // Now for each new file to add
- for (int i = 0; i < numFiles; i++)
- {
- // append the additional entry to the zip file.
- ZipEntry newEntry = appendFile(files[i], dest, virtualPath, names[i], sourceEncodings[i], targetEncodings[i], isText[i]);
- // Add the new entry to the virtual file system in memory
- fillBranch(newEntry);
- }
- dest.close();
-
- // Now replace the old zip file with the new one
- replaceOldZip(outputTempFile);
-
- }
- catch (IOException e)
- {
- System.out.println("Could not add a file.");
- System.out.println(e.getMessage());
- if (closeZipFile) closeZipFile();
- return false;
- }
- if (closeZipFile) closeZipFile();
- return true;
- }
- else return false;
- }
-
- /**
- * Helper method. . . populates <code>found</code> with a
- * collapsed list of all nodes in the subtree
- * of the file system rooted at <code>parent</code>.
- */
- public static void listAllFiles(File parent, HashSet found)
- {
- File[] children = parent.listFiles();
- if (children == null) // DKM - 56031, no authority on parent yields null
- {
- found.remove(parent);
- return;
- }
- for (int i = 0; i < children.length; i++)
- {
- if (!found.contains(children[i])) // prevent infinite loops due to symlinks
- {
- if (children[i].canRead())
- {
- found.add(children[i]);
- if (children[i].isDirectory())
- {
- listAllFiles(children[i], found);
- }
- }
- }
- }
- }
-
- /**
- * Recreates a zip file from a list of virtual children, optionally
- * omitting a group of children whose names are in the Set omitChildren
- * @param vcList The list of virtual children to create the zip from
- * @param dest The ZipOutputStream representing the zip file where the
- * children are to be recreated
- * @param omitChildren The set of names of children to omit when creating
- * the zipfile. Null or empty set if there are no ommisions.
- * @throws IOException
- */
- protected void recreateZipDeleteEntries(VirtualChild[] vcList, ZipOutputStream dest, HashSet omitChildren) throws IOException
- {
- if (!(omitChildren == null) && vcList.length == omitChildren.size())
- {
- // the zip file will be empty, but it must have at least one entry,
- // so we will put in a dummy entry.
- ZipEntry entry = new ZipEntry("/");
- dest.putNextEntry(entry);
- dest.closeEntry();
- return;
- }
- //else
- for (int i = 0; i < vcList.length; i++)
- {
- // for each entry, append it to the new temp zip
- // unless it is in the set of omissions
- if (omitChildren != null && omitChildren.contains(vcList[i].fullName)) continue;
- if (vcList[i].isDirectory)
- {
- ZipEntry nextEntry = safeGetEntry(vcList[i].fullName + "/");
- dest.putNextEntry(nextEntry);
- dest.closeEntry();
- continue;
- }
- ZipEntry nextEntry = safeGetEntry(vcList[i].fullName);
- BufferedInputStream source = new BufferedInputStream(
- _zipfile.getInputStream(nextEntry));
- nextEntry.setCompressedSize(-1);
- dest.putNextEntry(nextEntry);
- byte[] buf = new byte[1024];
- int numRead = source.read(buf);
-
- while (numRead > 0)
- {
- dest.write(buf, 0, numRead);
- numRead = source.read(buf);
- }
- dest.closeEntry();
- source.close();
- }
- }
-
- /**
- * Recreates a zip file from a list of virtual children, but renaming the
- * one of the VirtualChildren.
- * @param vcList The list of virtual children to create the zip from
- * @param dest The ZipOutputStream representing the zip file where the
- * children are to be recreated
- * @param oldName The name of the virtual child to rename
- * @param newName The new name for the renamed virtual child.
- * @throws IOException
- */
- protected void recreateZipRenameEntries(VirtualChild[] vcList, ZipOutputStream dest, HashMap names) throws IOException
- {
- for (int i = 0; i < vcList.length; i++)
- {
- // for each entry, append it to the new temp zip
- ZipEntry nextEntry;
- ZipEntry newEntry;
- if (names.containsKey(vcList[i].getArchiveStandardName()))
- {
- // rename the entry
- String oldName = vcList[i].getArchiveStandardName();
- String newName = (String) names.get(oldName);
- vcList[i].renameTo(newName);
- nextEntry = safeGetEntry(oldName);
- newEntry = createSafeZipEntry(newName);
- newEntry.setComment(nextEntry.getComment());
- newEntry.setExtra(nextEntry.getExtra());
- newEntry.setTime(nextEntry.getTime());
- }
- else
- {
- nextEntry = safeGetEntry(vcList[i].getArchiveStandardName());
- newEntry = nextEntry;
- }
- if (nextEntry.isDirectory())
- {
- dest.putNextEntry(newEntry);
- dest.closeEntry();
- continue;
- }
- BufferedInputStream source = new BufferedInputStream(
- _zipfile.getInputStream(nextEntry));
- newEntry.setCompressedSize(-1);
- dest.putNextEntry(newEntry);
- byte[] buf = new byte[1024];
- int numRead = source.read(buf);
-
- while (numRead > 0)
- {
- dest.write(buf, 0, numRead);
- numRead = source.read(buf);
- }
- dest.closeEntry();
- source.close();
- }
- }
-
- /**
- * Compresses the contents of <code>file</code>, adding them to the
- * ZipFile managed by <code>dest</code>. The file is encoded in the encoding
- * specified by <code>encoding</code>. A new entry is created in the
- * ZipFile with virtual path and name of <code>virtualPath</code> and <code>name</code>
- * respectively.
- * @return The ZipEntry that was added to the destination zip file.
- * @throws IOException
- */
- protected ZipEntry appendFile(File file, ZipOutputStream dest, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText) throws IOException
- {
- ZipEntry newEntry;
- if (file.isDirectory())
- {
- String fullName = virtualPath + "/" + name;
- if (!fullName.endsWith("/")) fullName = fullName + "/";
- newEntry = createSafeZipEntry(fullName);
- }
- else
- {
- newEntry = createSafeZipEntry(virtualPath + "/" + name);
- }
- newEntry.setTime(file.lastModified());
- dest.putNextEntry(newEntry);
- if (!file.isDirectory())
- {
- BufferedInputStream source = new BufferedInputStream(
- new FileInputStream(file));
-
- byte[] buf = new byte[1024];
- int numRead = source.read(buf);
- long fileSize = file.length();
- long totalRead = 0;
- while (numRead > 0 && totalRead < fileSize)
- {
- totalRead += numRead;
- if (isText)
- {
- // DKM - if you don't specify numRead here, then buf will get picked up wiht extra bytes from b4!!!!
- String bufString = new String(buf, 0, numRead, sourceEncoding);
- byte[] convertedBuf = bufString.getBytes(targetEncoding);
- int newSize = convertedBuf.length;
- dest.write(convertedBuf, 0, newSize);
- }
- else
- {
- dest.write(buf, 0, numRead);
- }
- // specify max size here
- long maxRead = 1024;
- long deltaLeft = fileSize - totalRead;
- if (deltaLeft > 1024)
- {
- numRead = source.read(buf, 0, (int)maxRead);
- }
- else
- {
- numRead = source.read(buf, 0, (int)deltaLeft);
- }
-
- }
- dest.closeEntry();
- source.close();
- }
- return newEntry;
- }
-
- /**
- * Compresses the contents of <code>stream</code>, adding them to the
- * ZipFile managed by <code>dest</code>. The stream is encoded in the encoding
- * specified by <code>encoding</code>. A new entry is created in the
- * ZipFile with virtual path and name of <code>virtualPath</code> and <code>name</code>
- * respectively.
- * @return The ZipEntry that was added to the destination zip file.
- * @throws IOException
- */
- protected ZipEntry appendBytes(InputStream stream, ZipOutputStream dest, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText) throws IOException
- {
- ZipEntry newEntry;
- newEntry = createSafeZipEntry(virtualPath + "/" + name);
- dest.putNextEntry(newEntry);
- BufferedInputStream source = new BufferedInputStream(stream);
-
- byte[] buf = new byte[1024];
- int numRead = source.read(buf);
- long totalRead = 0;
- while (numRead > 0 && source.available() > 0)
- {
- totalRead += numRead;
- if (isText)
- {
- // DKM - if you don't specify numRead here, then buf will get picked up wiht extra bytes from b4!!!!
- String bufString = new String(buf, 0, numRead, sourceEncoding);
- byte[] convertedBuf = bufString.getBytes(targetEncoding);
- int newSize = convertedBuf.length;
- dest.write(convertedBuf, 0, newSize);
- }
- else
- {
- dest.write(buf, 0, numRead);
- }
- // specify max size here
- long maxRead = 1024;
- long deltaLeft = source.available();
- if (deltaLeft > 1024)
- {
- numRead = source.read(buf, 0, (int)maxRead);
- }
- else
- {
- numRead = source.read(buf, 0, (int)deltaLeft);
- }
-
- }
- dest.closeEntry();
- source.close();
- return newEntry;
- }
-
- /**
- * Replaces the old zip file managed by this SystemZipHandler, with
- * the zip file referred to by outputTempFile.
- * @throws IOException if outputTempFile cannot be used as a ZipFile.
- */
- protected void replaceOldZip(File outputTempFile) throws IOException
- {
- String oldName = _file.getAbsolutePath();
- _zipfile.close();
- File oldFile = new File(oldName + "old");
- System.out.println(_file.renameTo(oldFile));
- System.out.println(outputTempFile.renameTo(_file));
- _vfsLastModified = _file.lastModified();
- _zipfile = new ZipFile(_file);
- oldFile.delete();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#delete(java.lang.String)
- */
- public boolean delete(String fullVirtualName)
- {
- return delete(fullVirtualName, true);
- }
-
- /**
- * Same as delete(String fullVirtualName) but you can choose whether
- * or not you want to leave the zipfile open after return.
- */
- public boolean delete(String fullVirtualName, boolean closeZipFile)
- {
- if (!_exists) return false;
-
- if (openZipFile())
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- VirtualChild vc = getVirtualFile(fullVirtualName);
- VirtualChild[] vcList;
- VirtualChild[] vcOmmit = new VirtualChild[1];
- if (!vc.exists())
- {
- if (closeZipFile) closeZipFile();
- return false;
- } // file doesn't exist
-
- if (vc.isDirectory) // file is a directory, we must delete the contents
- {
- vcOmmit = getVirtualChildrenList(fullVirtualName, false);
- }
-
- File outputTempFile = null;
- try
- {
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp");
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
-
- // get all the entries in the old zip
- vcList = getVirtualChildrenList(false);
-
- HashSet omissions = new HashSet();
-
- if (vc.isDirectory)
- {
- for (int i = 0; i < vcOmmit.length; i++)
- {
- omissions.add(vcOmmit[i].fullName);
- }
- try
- {
- safeGetEntry(vc.fullName);
- omissions.add(vc.fullName);
- }
- catch (IOException e) {}
- }
- else
- {
- omissions.add(fullVirtualName);
- }
-
- // recreate the zip file without the omissions
- recreateZipDeleteEntries(vcList, dest, omissions);
- dest.close();
-
- // Now replace the old zip file with the new one
- replaceOldZip(outputTempFile);
-
- // Now update the tree
- HashMap hm = (HashMap) _virtualFS.get(vc.path);
- hm.remove(vc.name);
- if (vc.isDirectory)
- {
- delTree(vc);
- }
- }
- catch (IOException e)
- {
- System.out.println(e.getMessage());
- System.out.println("Could not delete " + fullVirtualName);
- if (!(outputTempFile == null)) outputTempFile.delete();
- if (closeZipFile) closeZipFile();
- return false;
- }
- if (closeZipFile) closeZipFile();
- return true;
- }
- else return false;
- }
-
- /**
- * Deletes all the children of the directory VirtualChild <code>vc</code>
- * recursively down to the leaves.
- * Pre: vc.isDirectory is true
- * @param vc The child whose children we are deleting.
- */
- protected void delTree(VirtualChild vc)
- {
- HashMap hm = (HashMap) _virtualFS.get(vc.fullName);
- Object[] children = hm.values().toArray();
- for (int i = 0; i < children.length; i++)
- {
- VirtualChild next = (VirtualChild) children[i];
- hm.remove(next.name);
- if (next.isDirectory) delTree(next);
- }
- return;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#replace(java.lang.String, java.io.File, java.lang.String)
- */
- public boolean replace(String fullVirtualName, File file, String name)
- {
- return replace(fullVirtualName, file, name, true);
- }
-
- /**
- * Same as replace(String fullVirtualName, File file, String name) but you can choose whether
- * or not you want to leave the zipfile open after return.
- */
- public boolean replace(String fullVirtualName, File file, String name, boolean closeZipFile)
- {
- if (!_exists) return false;
-
- if (!file.exists() || !file.canRead()) return false;
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- if (!exists(fullVirtualName))
- {
- // sorry, wrong method buddy
- return add(file, fullVirtualName, name);
- }
- if (openZipFile())
- {
- File outputTempFile = null;
- try
- {
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp");
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false);
- HashSet omissions = new HashSet();
- omissions.add(fullVirtualName);
- recreateZipDeleteEntries(vcList, dest, omissions);
-
- // Now append the additional entry to the zip file.
- int i = fullVirtualName.lastIndexOf("/");
- String virtualPath;
- if (i == -1)
- {
- virtualPath = "";
- }
- else
- {
- virtualPath = fullVirtualName.substring(0,i);
- }
- ZipEntry newEntry = appendFile(file, dest, virtualPath, name, SystemEncodingUtil.ENCODING_UTF_8, SystemEncodingUtil.ENCODING_UTF_8, false);
- dest.close();
-
- // Now replace the old zip file with the new one
- replaceOldZip(outputTempFile);
-
- }
- catch (IOException e)
- {
- System.out.println("Could not replace " + file.getName());
- if (!(outputTempFile == null)) outputTempFile.delete();
- if (closeZipFile) closeZipFile();
- return false;
- }
- if (closeZipFile) closeZipFile();
- return true;
- }
- else return false;
- }
-
- public boolean replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText)
- {
- if (!_exists) return false;
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- if (!exists(fullVirtualName))
- {
- // wrong method
- return add(stream, fullVirtualName, name, sourceEncoding, targetEncoding, isText);
- }
- if (openZipFile())
- {
- File outputTempFile = null;
- try
- {
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp");
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false);
- HashSet omissions = new HashSet();
- omissions.add(fullVirtualName);
- recreateZipDeleteEntries(vcList, dest, omissions);
-
- // Now append the additional entry to the zip file.
- int i = fullVirtualName.lastIndexOf("/");
- String virtualPath;
- if (i == -1)
- {
- virtualPath = "";
- }
- else
- {
- virtualPath = fullVirtualName.substring(0,i);
- }
- ZipEntry newEntry = appendBytes(stream, dest, virtualPath, name, sourceEncoding, targetEncoding, isText);
- dest.close();
-
- // Now replace the old zip file with the new one
- replaceOldZip(outputTempFile);
-
- }
- catch (IOException e)
- {
- System.out.println("Could not replace " + fullVirtualName);
- if (!(outputTempFile == null)) outputTempFile.delete();
- closeZipFile();
- return false;
- }
- closeZipFile();
- return true;
- }
- else return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#fullRename(java.lang.String, java.lang.String)
- */
- public boolean fullRename(String fullVirtualName, String newFullVirtualName)
- {
- return fullRename(fullVirtualName, newFullVirtualName, true);
- }
-
- /**
- * Same as fullRename(String fullVirtualName, String newFullVirtualName) but you can choose whether
- * or not you want to leave the zipfile open after return.
- */
- public boolean fullRename(String fullVirtualName, String newFullVirtualName, boolean closeZipFile)
- {
- if (!_exists) return false;
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- newFullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(newFullVirtualName);
- VirtualChild vc = getVirtualFile(fullVirtualName);
- if (!vc.exists())
- {
- System.out.println("The virtual file " + fullVirtualName + " does not exist.");
- return false;
- }
- if (openZipFile())
- {
- File outputTempFile = null;
- try
- {
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp");
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false);
- VirtualChild[] renameList;
- HashMap names = new HashMap();
- // if the entry to rename is a directory, we must then rename
- // all files and directories below it en masse.
- if (vc.isDirectory)
- {
- renameList = getVirtualChildrenList(fullVirtualName, false);
- for (int i = 0; i < renameList.length; i++)
- {
- int j = fullVirtualName.length();
- String suffix = renameList[i].fullName.substring(j);
- String newName = newFullVirtualName + suffix;
- if (renameList[i].isDirectory)
- {
- newName = newName + "/";
- names.put(renameList[i].fullName + "/", newName);
- }
- else
- {
- names.put(renameList[i].fullName, newName);
- }
- }
- try
- {
- safeGetEntry(fullVirtualName);
- names.put(fullVirtualName + "/", newFullVirtualName + "/");
- }
- catch (IOException e) {}
- }
- else
- {
- names.put(fullVirtualName, newFullVirtualName);
- }
- // find the entry to rename and rename it
- recreateZipRenameEntries(vcList, dest, names);
-
- dest.close();
-
- // Now replace the old zip file with the new one
- replaceOldZip(outputTempFile);
-
- // Now rebuild the tree
- buildTree();
- }
- catch (IOException e)
- {
- System.out.println("Could not rename " + fullVirtualName);
- if (!(outputTempFile == null)) outputTempFile.delete();
- if (closeZipFile) closeZipFile();
- return false;
- }
- if (closeZipFile) closeZipFile();
- return true;
- }
- else return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#move(java.lang.String, java.lang.String)
- */
- public boolean move(String fullVirtualName, String destinationVirtualPath)
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- destinationVirtualPath = ArchiveHandlerManager.cleanUpVirtualPath(destinationVirtualPath);
- int i = fullVirtualName.lastIndexOf("/");
- if (i == -1)
- {
- return fullRename(fullVirtualName, destinationVirtualPath + "/" + fullVirtualName);
- }
- String name = fullVirtualName.substring(i);
- return fullRename(fullVirtualName, destinationVirtualPath + name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#rename(java.lang.String, java.lang.String)
- */
- public boolean rename(String fullVirtualName, String newName)
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- int i = fullVirtualName.lastIndexOf("/");
- if (i == -1)
- {
- return fullRename(fullVirtualName, newName);
- }
- String fullNewName = fullVirtualName.substring(0, i+1) + newName;
- return fullRename(fullVirtualName, fullNewName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getFiles(java.lang.String[])
- */
- public File[] getFiles(String[] fullNames)
- {
- if (!_exists) return new File[0];
-
- File[] files = new File[fullNames.length];
- for (int i = 0; i < fullNames.length; i++)
- {
- String name;
- String fullName = fullNames[i];
- fullName = ArchiveHandlerManager.cleanUpVirtualPath(fullName);
- int j = fullName.lastIndexOf("/");
- if (j == -1)
- {
- name = fullName;
- }
- else
- {
- name = fullName.substring(j+1);
- }
- try
- {
- files[i] = File.createTempFile(name, "virtual");
- files[i].deleteOnExit();
- extractVirtualFile(fullNames[i], files[i]);
- }
- catch (IOException e)
- {
- System.out.println(e.getMessage());
- System.out.println("Could not extract virtual file: " + fullNames[i]);
- return null;
- }
- }
- return files;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#createFolder(java.lang.String)
- */
- public boolean createFolder(String name)
- {
- name = ArchiveHandlerManager.cleanUpVirtualPath(name);
- name = name + "/";
- return createVirtualObject(name, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#createFile(java.lang.String)
- */
- public boolean createFile(String name)
- {
- name = ArchiveHandlerManager.cleanUpVirtualPath(name);
- return createVirtualObject(name, true);
- }
-
- /**
- * Creates a new, empty object in the virtual File system, and
- * creates an empty file or folder in the physical zip file.
- * @param name The name of the file or folder to create. The object
- * created will be a folder if and only if
- * <code>name</code> ends in a "/".
- * @return Whether the creation was successful or not.
- */
- protected boolean createVirtualObject(String name, boolean closeZipFile)
- {
- if (!_exists) return false;
- if (exists(name))
- {
- // The object already exists.
- return false;
- }
-
- if (openZipFile())
- {
- File outputTempFile;
- try
- {
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp");
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false);
-
- // if it is an empty zip file, no need to recreate it
- if (!(vcList.length == 1) || !vcList[0].fullName.equals(""))
- {
- recreateZipDeleteEntries(vcList, dest, null);
- }
-
- // append the additional entry to the zip file.
- ZipEntry newEntry = appendEmptyFile(dest, name);
- // Add the new entry to the virtual file system in memory
- fillBranch(newEntry);
-
- dest.close();
-
- // Now replace the old zip file with the new one
- replaceOldZip(outputTempFile);
-
- }
- catch (IOException e)
- {
- System.out.println("Could not add a file.");
- System.out.println(e.getMessage());
- if (closeZipFile) closeZipFile();
- return false;
- }
- if (closeZipFile) closeZipFile();
- return true;
- }
- else return false;
- }
-
- /**
- * Works similarly to appendFile, except no actual data is appended
- * to the zipfile, only an entry is created. Thus, if the file were
- * to be extracted, it would be of length 0.
- * @param dest The destination zip stream to append the entry.
- * @param name The new, virtual fullname to give the entry.
- * @return The ZipEntry that was created.
- * @throws IOException If there was an error appending the entry to the stream.
- */
- protected ZipEntry appendEmptyFile(ZipOutputStream dest, String name) throws IOException
- {
- boolean isDirectory = name.endsWith("/");
- ZipEntry newEntry;
- newEntry = createSafeZipEntry(name);
- dest.putNextEntry(newEntry);
- if (!isDirectory)
- {
- dest.write(new byte[0], 0, 0);
- dest.closeEntry();
- }
- return newEntry;
- }
-
- /**
- * A "safe" ZipEntry is one whose virtual path does not begin with a
- * "/". This seems to cause the least problems for archive utilities,
- * including this one.
- * @param name The virtual name for the new, safe ZipEntry.
- * @return The ZipEntry that is created.
- */
- protected ZipEntry createSafeZipEntry(String name)
- {
- if (name.startsWith("/")) name = name.substring(1);
- return new ZipEntry(name);
- }
-
- public String getStandardName(VirtualChild vc)
- {
- if (vc.isDirectory) return vc.fullName + "/";
- return vc.fullName;
- }
-
- /**
- * Opens the zipfile that this handler manages.
- * @return Whether the zipfile was successfully opened.
- */
- protected boolean openZipFile()
- {
- if (!(_zipfile == null)) closeZipFile();
- try
- {
- _zipfile = new ZipFile(_file);
- }
- catch (IOException e)
- {
- System.out.println("Could not open zipfile: " + _file);
- System.out.println(e.getMessage());
- return false;
- }
- return true;
- }
-
- protected boolean closeZipFile()
- {
- try
- {
- _zipfile.close();
- }
- catch (IOException e)
- {
- System.out.println("Could not close zipfile: " + _file);
- System.out.println(e.getMessage());
- return false;
- }
- return true;
- }
-
- /**
- * If the mod-times of the underlying zip file and the file used to
- * create the virtualFS are different, update the virtualFS.
- * @return whether or not the op was successful.
- */
- protected boolean updateVirtualFSIfNecessary()
- {
- if (_vfsLastModified != _file.lastModified())
- {
- if (openZipFile())
- {
- buildTree();
- _vfsLastModified = _file.lastModified();
- closeZipFile();
- return true;
- }
- else return false;
- }
- else return true;
- }
-
- /**
- * Returns the entry corresponding to <code>name</code> from _zipfile. Never returns
- * null, but rather, throws an IOException if it cannot find the entry. Tries to retrieve
- * both <code>name</code> and <code>"/" + name<code>, to accomodate for zipfiles created
- * in a unix environment. ASSUMES THAT _zipfile IS ALREADY OPEN!
- */
- protected ZipEntry safeGetEntry(String name) throws IOException
- {
- ZipEntry entry = _zipfile.getEntry(name);
- if (entry == null) entry = _zipfile.getEntry("/" + name);
- if (entry == null) throw new IOException("SystemZipHandler.safeGetEntry(): The ZipEntry " + name + " cannot be found in " + _file.toString());
- return entry;
- }
-
- public boolean create()
- {
- try
- {
- // The zipfile is our destination
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(_file));
- dest.setMethod(ZipOutputStream.DEFLATED);
-
- VirtualChild[] vcList = new VirtualChild[0];
-
- HashSet omissions = new HashSet();
- // the above two statements force recreateZipDeleteEntries to create a dummy entry
- recreateZipDeleteEntries(vcList, dest, omissions);
- dest.close();
-
- if (openZipFile())
- {
- buildTree();
- closeZipFile();
- }
- else
- {
- return false;
- }
- }
- catch (IOException e)
- {
- System.out.println(e.getMessage());
- return false;
- }
- _exists = true;
- return true;
- }
-
- public SystemSearchLineMatch[] search(String fullVirtualName, SystemSearchStringMatcher matcher)
- {
-
- // if the search string is empty or if it is "*", then return no matches
- // since it is a file search
- if (matcher.isSearchStringEmpty() || matcher.isSearchStringAsterisk()) {
- return new SystemSearchLineMatch[0];
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- VirtualChild vc = getVirtualFile(fullVirtualName);
-
- if (!vc.exists() || vc.isDirectory) {
- return new SystemSearchLineMatch[0];
- }
-
- if (openZipFile()) {
-
- ZipEntry entry = null;
-
- SystemSearchLineMatch[] matches = null;
-
- try
- {
- entry = safeGetEntry(fullVirtualName);
- InputStream is = _zipfile.getInputStream(entry);
-
- if (is == null)
- {
- return new SystemSearchLineMatch[0];
- }
-
- InputStreamReader isr = new InputStreamReader(is);
- BufferedReader bufReader = new BufferedReader(isr);
-
- SystemSearchStringMatchLocator locator = new SystemSearchStringMatchLocator(bufReader, matcher);
- matches = locator.locateMatches();
- }
- catch (IOException e)
- {
- System.out.println(e.getMessage());
- }
-
- closeZipFile();
-
- if (matches == null) {
- return new SystemSearchLineMatch[0];
- }
- else {
- return matches;
- }
- }
- else {
- return new SystemSearchLineMatch[0];
- }
- }
-
- public boolean exists()
- {
- return _exists;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getCommentFor(java.lang.String)
- */
- public String getCommentFor(String fullVirtualName)
- {
- return getCommentFor(fullVirtualName, true);
- }
-
- /**
- * same as getCommentFor(String) but you can choose whether or not to leave
- * the zipfile open after the method is closed
- */
- public String getCommentFor(String fullVirtualName, boolean closeZipFile)
- {
- if (!_exists) return "";
-
- if (openZipFile())
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- ZipEntry entry = null;
- try
- {
- entry = safeGetEntry(fullVirtualName);
- }
- catch (IOException e)
- {
- if (closeZipFile) closeZipFile();
- return "";
- }
- if (closeZipFile) closeZipFile();
- String comment = entry.getComment();
- if (comment == null) return "";
- else return comment;
- }
- else return "";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.archiveutils.ISystemArchiveHandler#getCompressedSizeFor(java.lang.String)
- */
- public long getCompressedSizeFor(String fullVirtualName)
- {
- return getCompressedSizeFor(fullVirtualName, true);
- }
-
- /**
- * same as getCompressedSizeFor(String) but you can choose whether or not to leave
- * the zipfile open after the method is closed
- */
- public long getCompressedSizeFor(String fullVirtualName, boolean closeZipFile)
- {
- if (!_exists) return 0;
-
- if (openZipFile())
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- ZipEntry entry = null;
- try
- {
- entry = safeGetEntry(fullVirtualName);
- }
- catch (IOException e)
- {
- if (closeZipFile) closeZipFile();
- return 0;
- }
- if (closeZipFile) closeZipFile();
- return entry.getCompressedSize();
- }
- else return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.archiveutils.ISystemArchiveHandler#getCompressionMethodFor(java.lang.String)
- */
- public String getCompressionMethodFor(String fullVirtualName)
- {
- return getCompressionMethodFor(fullVirtualName, true);
- }
-
- /**
- * same as getCompressionMethodFor(String) but you can choose whether or not to leave
- * the zipfile open after the method is closed
- */
- public String getCompressionMethodFor(String fullVirtualName, boolean closeZipFile)
- {
- if (!_exists) return "";
-
- if (openZipFile())
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- ZipEntry entry = null;
- try
- {
- entry = safeGetEntry(fullVirtualName);
- }
- catch (IOException e)
- {
- if (closeZipFile) closeZipFile();
- return "";
- }
- if (closeZipFile) closeZipFile();
- return (new Integer(entry.getMethod())).toString();
- }
- else return "";
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.archiveutils.ISystemArchiveHandler#getArchiveComment()
- */
- public String getArchiveComment()
- {
- return "";
- }
-
- /**
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#isExecutable(java.lang.String)
- */
- public String getClassification(String fullVirtualName) {
- return getClassification(fullVirtualName, true);
- }
-
- /**
- * Same as getClassification(String), but you can choose whether to leave the zip file
- * open after the method is closed.
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#isExecutable(java.lang.String)
- */
- public String getClassification(String fullVirtualName, boolean closeZipFile) {
-
- // default type
- String type = "file";
-
- if (!_exists) {
- return type;
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- // if it's not a class file, we do not classify it
- if (!fullVirtualName.endsWith(".class")) {
- return type;
- }
-
- // class file parser
- BasicClassFileParser parser = null;
-
- boolean isExecutable = false;
-
- if (openZipFile()) {
-
- // get the input stream for the entry
- InputStream stream = null;
-
- try {
- ZipEntry entry = safeGetEntry(fullVirtualName);
- stream = _zipfile.getInputStream(entry);
-
- // use class file parser to parse the class file
- parser = new BasicClassFileParser(stream);
- parser.parse();
-
- // query if it is executable, i.e. whether it has main method
- isExecutable = parser.isExecutable();
-
- if (closeZipFile) {
- closeZipFile();
- }
- }
- catch (IOException e) {
-
- if (closeZipFile) {
- closeZipFile();
- }
-
- return type;
- }
- }
-
- // if it is executable, then also get qualified class name
- if (isExecutable) {
- type = "executable(java";
-
- String qualifiedClassName = parser.getQualifiedClassName();
-
- if (qualifiedClassName != null) {
- type = type + ":" + qualifiedClassName;
- }
-
- type = type + ")";
- }
-
- return type;
- }
-
- public boolean add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes registry)
- {
- if (!_exists) return false;
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
- if (!file.isDirectory())
- {
- if (exists(virtualPath + "/" + name))
- {
- // wrong method
- return replace(virtualPath + "/" + name, file, name);
- }
- else
- {
- File[] files = new File[1];
- files[0] = file;
- String[] names = new String[1];
- names[0] = name;
- String[] sourceEncodings = new String[1];
- sourceEncodings[0] = sourceEncoding;
- String[] targetEncodings = new String[1];
- targetEncodings[0] = targetEncoding;
- boolean[] isTexts = new boolean[1];
- isTexts[0] = registry.isText(file);
- return add(files, virtualPath, names, sourceEncodings, targetEncodings, isTexts);
- }
- }
- else
- {
- //String sourceName = name;
- HashSet children = new HashSet();
- listAllFiles(file, children);
- File[] sources = new File[children.size() + 1];
- String[] newNames = new String[children.size() + 1];
- Object[] kids = children.toArray();
- String[] sourceEncodings = new String[children.size() + 1];
- String[] targetEncodings = new String[children.size() + 1];
- boolean[] isTexts = new boolean[children.size() + 1];
- int charsToTrim = file.getParentFile().getAbsolutePath().length() + 1;
- if (file.getParentFile().getAbsolutePath().endsWith(File.separator)) charsToTrim--; // accounts for root
- for (int i = 0; i < children.size(); i++)
- {
- sources[i] = (File) kids[i];
- newNames[i] = sources[i].getAbsolutePath().substring(charsToTrim);
- newNames[i] = newNames[i].replace('\\','/');
- if (sources[i].isDirectory() && !newNames[i].endsWith("/")) newNames[i] = newNames[i] + "/";
-
- // this part can be changed to allow different encodings for different files
- sourceEncodings[i] = sourceEncoding;
- targetEncodings[i] = targetEncoding;
- isTexts[i] = registry.isText(sources[i]);
- }
- sources[children.size()] = file;
- newNames[children.size()] = name;
- sourceEncodings[children.size()] = sourceEncoding;
- targetEncodings[children.size()] = targetEncoding;
-
- isTexts[children.size()] = registry.isText(file);
- if (!newNames[children.size()].endsWith("/")) newNames[children.size()] = newNames[children.size()] + "/";
- return add(sources, virtualPath, newNames, sourceEncodings, targetEncodings, isTexts);
- }
- }
-
- public boolean add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText)
- {
- if (!_exists) return false;
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
- if (!file.isDirectory())
- {
- if (exists(virtualPath + "/" + name))
- {
- // wrong method
- return replace(virtualPath + "/" + name, file, name);
- }
- else
- {
- File[] files = new File[1];
- files[0] = file;
- String[] names = new String[1];
- names[0] = name;
- String[] sourceEncodings = new String[1];
- sourceEncodings[0] = sourceEncoding;
- String[] targetEncodings = new String[1];
- targetEncodings[0] = targetEncoding;
- boolean[] isTexts = new boolean[1];
- isTexts[0] = isText;
- return add(files, virtualPath, names, sourceEncodings, targetEncodings, isTexts);
- }
- }
- else
- {
- String sourceName = name;
- HashSet children = new HashSet();
- listAllFiles(file, children);
- File[] sources = new File[children.size() + 1];
- String[] newNames = new String[children.size() + 1];
- Object[] kids = children.toArray();
- String[] sourceEncodings = new String[children.size() + 1];
- String[] targetEncodings = new String[children.size() + 1];
- boolean[] isTexts = new boolean[children.size() + 1];
- int charsToTrim = file.getParentFile().getAbsolutePath().length() + 1;
- if (file.getParentFile().getAbsolutePath().endsWith(File.separator)) charsToTrim--; // accounts for root
- for (int i = 0; i < children.size(); i++)
- {
- sources[i] = (File) kids[i];
- newNames[i] = sources[i].getAbsolutePath().substring(charsToTrim);
- newNames[i] = newNames[i].replace('\\','/');
- if (sources[i].isDirectory() && !newNames[i].endsWith("/")) newNames[i] = newNames[i] + "/";
-
- // this part can be changed to allow different encodings for different files
- sourceEncodings[i] = sourceEncoding;
- targetEncodings[i] = targetEncoding;
- isTexts[i] = isText;
- }
- sources[children.size()] = file;
- newNames[children.size()] = name;
- sourceEncodings[children.size()] = sourceEncoding;
- targetEncodings[children.size()] = targetEncoding;
- isTexts[children.size()] = isText;
- if (!newNames[children.size()].endsWith("/")) newNames[children.size()] = newNames[children.size()] + "/";
- return add(sources, virtualPath, newNames, sourceEncodings, targetEncodings, isTexts);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/VirtualChild.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/VirtualChild.java
deleted file mode 100644
index 0d2eebf93..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/VirtualChild.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.archiveutils;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-
-
-/**
- * @author mjberger
- * A simple structure for passing information about virtual files and folders.
- */
-public final class VirtualChild {
-
- public String fullName;
- public String name;
- public String path;
- public boolean isDirectory;
- protected ISystemArchiveHandler _handler;
- protected File _extractedFile;
- protected File _containingArchive;
-
- /**
- * Constructs a new VirtualChild given a reference to its parent archive's
- * handler, but does not populate any fields in the child. Clients must
- * populate the fullName, name, path, and isDirectory fields.
- */
- public VirtualChild(ISystemArchiveHandler handler)
- {
- fullName = "";
- name = "";
- path = "";
- isDirectory = false;
- _handler = handler;
- _extractedFile = null;
- _containingArchive = null;
- }
-
- /**
- * Constructs a new VirtualChild given a reference to its parent archive's
- * handler (<code>handler</code>), and immediately populates the name and path info
- * for the VirtualChild given its <code>fullVirtualName</code>. Clients
- * must still populate the isDirectory field.
- */
- public VirtualChild(ISystemArchiveHandler handler, String fullVirtualName)
- {
- this(handler);
- renameTo(fullVirtualName);
- }
-
- /**
- * Constructs a new VirtualChild given the name of its parent archive,
- * and immediately populates the name and path info
- * for the VirtualChild given its <code>fullVirtualName</code>. Clients
- * must still populate the isDirectory field.
- * NOTE: This constructor is intended only to be used for creating NON-EXISTENT
- * virtual children.
- */
- public VirtualChild(String fullVirtualName, File containingArchive)
- {
- this(null);
- renameTo(fullVirtualName);
- _containingArchive = containingArchive;
- }
-
- /**
- * @return This VirtualChild's parent archive's Handler.
- */
- public ISystemArchiveHandler getHandler()
- {
- return _handler;
- }
-
- /**
- * @return This VirtualChild's time stamp (retrieves the latest one
- * from the archive).
- */
- public long getTimeStamp()
- {
- if (_handler == null) return 0;
- return _handler.getTimeStampFor(fullName);
- }
-
- /**
- * @return This VirtualChild's uncompressed size (retrieves the latest one
- * from the archive).
- */
- public long getSize()
- {
- if (_handler == null) return 0;
- return _handler.getSizeFor(fullName);
- }
-
- /**
- * @return The comment associated with this VirtualChild.
- */
- public String getComment()
- {
- if (_handler == null) return "";
- return _handler.getCommentFor(fullName);
- }
-
- /**
- * @return The amount of space this VirtualChild takes up in the archive
- * in compressed form.
- */
- public long getCompressedSize()
- {
- if (_handler == null) return 0;
- return _handler.getCompressedSizeFor(fullName);
- }
-
- /**
- * @return The method used to compress this VirtualChild.
- */
- public String getCompressionMethod()
- {
- if (_handler == null) return "";
- return _handler.getCompressionMethodFor(fullName);
- }
-
- /**
- * @return The actual minus compressed size of this VirtualChild, divided
- * by the actual size.
- */
- public double getCompressionRatio()
- {
- if (getSize() == 0)
- {
- return 1;
- }
- else return ((double)getSize() - (double)getCompressedSize()) / getSize();
- }
-
- /**
- * @return The extracted file or directory represented by this VirtualChild from the archive.
- * Note that the extracted file is cached after it is extracted once, but if the
- * timestamps on the cached and archived files do not match, the cached file is erased,
- * and reextracted from the archive.
- */
- public File getExtractedFile()
- {
- return getExtractedFile(SystemEncodingUtil.ENCODING_UTF_8, false);
- }
-
- /**
- * @return The extracted file or directory represented by this VirtualChild from the archive.
- * Assumes that the file has been encoded in the encoding specified.
- * Note that the extracted file is cached after it is extracted once, but if the
- * timestamps on the cached and archived files do not match, the cached file is erased,
- * and reextracted from the archive.
- */
- public File getExtractedFile(String sourceEncoding, boolean isText)
- {
- if (_extractedFile == null || _extractedFile.lastModified() != getTimeStamp())
- {
- try
- {
- int i = name.lastIndexOf(".");
- String ext = "";
- if (i != -1) ext = name.substring(i+1);
- if (i < 3)
- {
- _extractedFile = File.createTempFile(name + "123", "virtual." + ext);
- }
- else
- {
- _extractedFile = File.createTempFile(name, "virtual." + ext);
- }
- _extractedFile.deleteOnExit();
- if (_handler == null) return _extractedFile;
- if (isDirectory)
- {
- if (!_extractedFile.isDirectory())
- {
- if (!(_extractedFile.delete() && _extractedFile.mkdirs()))
- {
- System.out.println("VirtualChild.getExtractedFile(): Could not create temp dir.");
- return null;
- }
- }
- _handler.extractVirtualDirectory(fullName, _extractedFile, sourceEncoding, isText);
- }
- else
- {
- _handler.extractVirtualFile(fullName, _extractedFile, sourceEncoding, isText);
- }
- }
- catch (IOException e)
- {
- System.out.println("VirtualChild.getExtractedFile(): ");
- System.out.println(e.getMessage());
- }
- }
-
- if (isDirectory)
- {
- return new File(_extractedFile, name);
- }
- else
- {
- return _extractedFile;
- }
- }
-
- /**
- * Gets the extracted file or directory represented by this VirtualChild from the archive,
- * and replaces the object referred to by <code>destination</code> with that extracted file or directory.
- * Note that the extracted file is cached after it is extracted once, but if the
- * timestamps on the cached and archived files do not match, the cached file is erased,
- * and reextracted from the archive.
- * <code>destination</code> is always overwritten with either what is cached, or
- * what is in the archive.
- * @return true if and only if the extraction succeeded.
- */
- public boolean getExtractedFile(File destination)
- {
- return getExtractedFile(destination, SystemEncodingUtil.ENCODING_UTF_8, false);
- }
-
- /**
- * Gets the extracted file or directory represented by this VirtualChild from the archive,
- * and replaces the object referred to by <code>destination</code> with that extracted file or directory.
- * Note that the extracted file is cached after it is extracted once, but if the
- * timestamps on the cached and archived files do not match, the cached file is erased,
- * and reextracted from the archive.
- * <code>destination</code> is always overwritten with either what is cached, or
- * what is in the archive.
- * @return true if and only if the extraction succeeded.
- */
- public boolean getExtractedFile(File destination, String sourceEncoding, boolean isText)
- {
- boolean success = true;
- if (_handler == null) return false;
- if (_extractedFile == null ||
- _extractedFile.lastModified() != getTimeStamp() ||
- !destination.getAbsolutePath().equals(_extractedFile.getAbsolutePath())
- )
- {
- if (isDirectory)
- {
- success = _handler.extractVirtualDirectory(fullName, destination.getParentFile(), destination, sourceEncoding, isText);
- }
- else
- {
- success = _handler.extractVirtualFile(fullName, destination, sourceEncoding, isText);
- }
- _extractedFile = destination;
- }
- return success;
- }
-
- /**
- * @return Whether or not this VirtualChild exists in the archive.
- */
- public boolean exists()
- {
- if (_handler == null) return false;
- return _handler.exists(fullName);
- }
-
- /**
- * Renames this virtual child to newName. WARNING!!
- * This method does not change the underlying zip file,
- * you must rename the entry in the zip file for subsequent
- * calls to any of the getters to work.
- */
- public void renameTo(String newName)
- {
- newName = ArchiveHandlerManager.cleanUpVirtualPath(newName);
- fullName = newName;
- int i = newName.lastIndexOf("/");
- if (i == -1)
- {
- name = newName;
- path = "";
- }
- else
- {
- name = newName.substring(i+1);
- path = newName.substring(0, i);
- }
- // force reextraction of temp file
- _extractedFile = null;
-
- }
-
- /**
- * @return The "standard" name for this VirtualChild, based on
- * the handler type.
- */
- public String getArchiveStandardName()
- {
- if (_handler == null) return fullName;
- return _handler.getStandardName(this);
- }
-
- public File getContainingArchive()
- {
- if (_handler == null) return _containingArchive;
- return _handler.getArchive();
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/Abstract4ByteNumericInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/Abstract4ByteNumericInfo.java
deleted file mode 100644
index b7bde700f..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/Abstract4ByteNumericInfo.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents 4 byte numeric information.
- */
-public abstract class Abstract4ByteNumericInfo extends AbstractCPInfo {
-
- protected long bytes;
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param bytes the bytes.
- */
- public Abstract4ByteNumericInfo(short tag, long bytes) {
- super(tag);
- setBytes(bytes);
- }
-
- /**
- * Returns the bytes.
- * @return the bytes.
- */
- public long getBytes() {
- return bytes;
- }
-
- /**
- * Sets the bytes.
- * @param bytes the bytes.
- */
- private void setBytes(long bytes) {
- this.bytes = bytes;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/Abstract8ByteNumericInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/Abstract8ByteNumericInfo.java
deleted file mode 100644
index f019e5f5a..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/Abstract8ByteNumericInfo.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents 8 byte numeric information.
- */
-public abstract class Abstract8ByteNumericInfo extends AbstractCPInfo {
-
- protected long highBytes;
- protected long lowBytes;
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param highBytes high bytes.
- * @param lowBytes low bytes.
- */
- public Abstract8ByteNumericInfo(short tag, long highBytes, long lowBytes) {
- super(tag);
- setHighBytes(highBytes);
- setLowBytes(lowBytes);
- }
-
- /**
- * Returns the high bytes.
- * @return the high bytes.
- */
- public long getHighBytes() {
- return highBytes;
- }
-
- /**
- * Sets the high bytes.
- * @param highBytes the high bytes.
- */
- private void setHighBytes(long highBytes) {
- this.highBytes = highBytes;
- }
-
- /**
- * Returns the low bytes.
- * @return the low bytes.
- */
- public long getLowBytes() {
- return lowBytes;
- }
-
- /**
- * Sets the low bytes.
- * @param lowBytes the low bytes.
- */
- private void setLowBytes(long lowBytes) {
- this.lowBytes = lowBytes;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractAttributeInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractAttributeInfo.java
deleted file mode 100644
index 4e11cd3af..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractAttributeInfo.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents a attribute.
- */
-public class AbstractAttributeInfo {
-
- protected int attributeNameIndex;
- protected long attributeLength;
-
- /**
- * Constructor.
- * @param attributeNameIndex the attribute name index.
- * @param attributeLength the attribute length.
- */
- public AbstractAttributeInfo(int attributeNameIndex, long attributeLength) {
- super();
- setAttributeNameIndex(attributeNameIndex);
- setAttributeLength(attributeLength);
- }
-
- /**
- * Returns the attribute length.
- * @return the attribute length.
- */
- public long getAttributeLength() {
- return attributeLength;
- }
-
- /**
- * Sets the attribute length.
- * @param attributeLength the attribute length.
- */
- public void setAttributeLength(long attributeLength) {
- this.attributeLength = attributeLength;
- }
-
- /**
- * Returns the attribute name index.
- * @return the attribute name index.
- */
- public int getAttributeNameIndex() {
- return attributeNameIndex;
- }
-
- /**
- * Sets the attribute name index.
- * @param attributeNameIndex the attribute name index.
- */
- public void setAttributeNameIndex(int attributeNameIndex) {
- this.attributeNameIndex = attributeNameIndex;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractCPInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractCPInfo.java
deleted file mode 100644
index 559fae7b8..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractCPInfo.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents various string constants, class and interface names, field names, and other constants
- * that are referred to within the BasicClassFileParser structure.
- *
- * @see BasicClassFileParser
- */
-public abstract class AbstractCPInfo {
-
- protected short tag;
-
- /**
- * Constructor.
- * @param tag the tag.
- */
- public AbstractCPInfo(short tag) {
- super();
- setTag(tag);
- }
-
- /**
- * Returns the tag.
- * @return the tag.
- */
- public int getTag() {
- return tag;
- }
-
- /**
- * Sets the tag.
- * @param tag the tag.
- */
- private void setTag(short tag) {
- this.tag = tag;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractCommonInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractCommonInfo.java
deleted file mode 100644
index ab9df6a01..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractCommonInfo.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents information about a field or method.
- */
-public abstract class AbstractCommonInfo {
-
- protected int accessFlags;
- protected int nameIndex;
- protected int descriptorIndex;
- protected int attributesCount;
- protected AbstractAttributeInfo[] attributes;
-
- /**
- * Constructor.
- * @param accessFlags the access flags.
- * @param nameIndex the name index.
- * @param descriptorIndex the descriptor index.
- * @param attributesCount the number of attributes.
- * @param attributes the attributes.
- */
- public AbstractCommonInfo(int accessFlags, int nameIndex, int descriptorIndex, int attributesCount, AbstractAttributeInfo[] attributes) {
- super();
- setAccessFlags(accessFlags);
- setNameIndex(nameIndex);
- setDescriptorIndex(descriptorIndex);
- setAttributesCount(attributesCount);
- setAttributes(attributes);
- }
-
- /**
- * Returns the access flags.
- * @return the access flags.
- */
- public int getAccessFlags() {
- return accessFlags;
- }
-
- /**
- * Sets the access flags.
- * @param accessFlags the access flags.
- */
- public void setAccessFlags(int accessFlags) {
- this.accessFlags = accessFlags;
- }
-
- /**
- * Returns the attributes.
- * @return the array of attributes.
- */
- public AbstractAttributeInfo[] getAttributes() {
- return attributes;
- }
- /**
- * Sets the attributes.
- * @param attributes the attributes.
- */
- public void setAttributes(AbstractAttributeInfo[] attributes) {
- this.attributes = attributes;
- }
-
- /**
- * Returns the number of attributes.
- * @return the number of attributes.
- */
- public int getAttributesCount() {
- return attributesCount;
- }
-
- /**
- * Sets the number of attributes.
- * @param attributesCount the number of attributes.
- */
- public void setAttributesCount(int attributesCount) {
- this.attributesCount = attributesCount;
- }
-
- /**
- * Returns the descriptor index.
- * @return the descriptor index.
- */
- public int getDescriptorIndex() {
- return descriptorIndex;
- }
-
- /**
- * Sets the descriptor index.
- * @param descriptorIndex the descriptor index.
- */
- public void setDescriptorIndex(int descriptorIndex) {
- this.descriptorIndex = descriptorIndex;
- }
-
- /**
- * Returns the name index.
- * @return the name index.
- */
- public int getNameIndex() {
- return nameIndex;
- }
-
- /**
- * Sets the name index.
- * @param nameIndex the name index.
- */
- public void setNameIndex(int nameIndex) {
- this.nameIndex = nameIndex;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractRefInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractRefInfo.java
deleted file mode 100644
index 684b85e24..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/AbstractRefInfo.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents reference information.
- */
-public abstract class AbstractRefInfo extends AbstractCPInfo {
-
- protected int classIndex;
- protected int nameAndTypeIndex;
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param classIndex the class index.
- * @param nameAndTypeIndex
- */
- public AbstractRefInfo(short tag, int classIndex, int nameAndTypeIndex) {
- super(tag);
- setClassIndex(classIndex);
- setNameAndTypeIndex(nameAndTypeIndex);
- }
-
- /**
- * Returns the class index.
- * @return the class index.
- */
- public int getClassIndex() {
- return classIndex;
- }
-
- /**
- * Sets the class index.
- * @param classIndex the class index.
- */
- private void setClassIndex(int classIndex) {
- this.classIndex = classIndex;
- }
-
- /**
- * Returns the name and type index.
- * @return the name and type index.
- */
- public int getNameAndTypeIndex() {
- return nameAndTypeIndex;
- }
-
- /**
- * Sets the name and type index.
- * @param nameAndTypeIndex the name and type index.
- */
- private void setNameAndTypeIndex(int nameAndTypeIndex) {
- this.nameAndTypeIndex = nameAndTypeIndex;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/BasicClassFileParser.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/BasicClassFileParser.java
deleted file mode 100644
index b7dc9354d..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/BasicClassFileParser.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This is a basic class file parser that returns a package name from a class file.
- */
-public class BasicClassFileParser {
-
- //private long magic;
- //private int minor_version;
- //private int major_version;
- private int constant_pool_count;
- private List constant_pool;
- //private int access_flags;
- private int this_class;
- //private int super_class;
- private int interfaces_count;
- private int[] interfaces;
- private int fields_count;
- private int methods_count;
- private MethodInfo[] methods;
- private int attributes_count;
- private InputStream stream;
-
- /**
- * Constuctor.
- * @param stream the input stream to parse.
- */
- public BasicClassFileParser(InputStream stream) {
- this.stream = stream;
- }
-
- /**
- * Returns the package.
- * @return the package.
- */
- public String getQualifiedClassName() {
-
- ClassInfo info = (ClassInfo)(getCPInfo(this_class));
-
- int nameIndex = info.getNameIndex();
- String name = getString(nameIndex);
-
- return name.replace('/', '.');
- }
-
- /**
- * Returns whether there is a <code>public static void main(String[])</code> method.
- * @return <code>true</code> if there is, otherwise <code>false</code>.
- */
- public boolean isExecutable() {
-
- for (int i = 0; i < methods_count; i++) {
- MethodInfo info = methods[i];
-
- // first ensure method name is "main"
- int nameIndex = info.getNameIndex();
- String name = getString(nameIndex);
-
- if (name.equals("main")) {
-
- // check access flags for public and static
- int accessFlags = info.getAccessFlags();
-
- if ((accessFlags & 0x000F) == 0x0009) {
-
- // now check descriptor for parameter and return value
- int descriptorIndex = info.getDescriptorIndex();
- String descriptor = getString(descriptorIndex);
-
- if (descriptor.equals("([Ljava/lang/String;)V")) {
- return true;
- }
- }
- }
- }
-
- return false;
- }
-
- /**
- * Parses a class file.
- * @throws IOException if an I/O error occurs.
- */
- public void parse() throws IOException {
-
- EnhancedDataInputStream dataStream = new EnhancedDataInputStream(stream);
-
- /*magic = */ dataStream.readUnsignedInt();
- /*minor_version =*/ dataStream.readUnsignedShort();
- /*major_version =*/ dataStream.readUnsignedShort();
- constant_pool_count = dataStream.readUnsignedShort();
-
- readConstantPool(dataStream);
-
- /*access_flags =*/ dataStream.readUnsignedShort();
-
- this_class = dataStream.readUnsignedShort();
-
- /*super_class =*/ dataStream.readUnsignedShort();
-
- interfaces_count = dataStream.readUnsignedShort();
-
- readInterfaces(dataStream);
-
- fields_count = dataStream.readUnsignedShort();
-
- readFields(dataStream);
-
- methods_count = dataStream.readUnsignedShort();
-
- readMethods(dataStream);
-
- dataStream.close();
- }
-
- /**
- * Reads the constant pool.
- * @param dataStream the data stream.
- * @throws IOException if an I/O error occurs.
- */
- protected void readConstantPool(EnhancedDataInputStream dataStream) throws IOException {
-
- constant_pool = new ArrayList();
-
- for (int i = 0; i < constant_pool_count-1; i++) {
- AbstractCPInfo info = readConstantInfo(dataStream);
- constant_pool.add(i, info);
-
- // each long or double info takes two spaces, so fill in the next entry with an empty object
- // this entry is not usable according to the VM Specification
- if (info instanceof LongInfo || info instanceof DoubleInfo) {
- i++;
- constant_pool.add(i, new Object());
- }
- }
- }
-
- /**
- * Gets the constant info.
- * @param dataStream the data stream.
- * @return the constant info.
- * @throws IOException if an I/O error occurs.
- */
- protected AbstractCPInfo readConstantInfo(EnhancedDataInputStream dataStream) throws IOException {
- short tag = (short)(dataStream.readUnsignedByte());
-
- switch (tag) {
-
- case IClassFileConstants.CONSTANT_CLASS: {
- int nameIndex = dataStream.readUnsignedShort();
- return new ClassInfo(tag, nameIndex);
- }
- case IClassFileConstants.CONSTANT_FIELD_REF: {
- int classIndex = dataStream.readUnsignedShort();
- int nameAndTypeIndex = dataStream.readUnsignedShort();
- return new FieldRefInfo(tag, classIndex, nameAndTypeIndex);
- }
- case IClassFileConstants.CONSTANT_METHOD_REF: {
- int classIndex = dataStream.readUnsignedShort();
- int nameAndTypeIndex = dataStream.readUnsignedShort();
- return new MethodRefInfo(tag, classIndex, nameAndTypeIndex);
- }
- case IClassFileConstants.CONSTANT_INTERFACE_METHOD_REF: {
- int classIndex = dataStream.readUnsignedShort();
- int nameAndTypeIndex = dataStream.readUnsignedShort();
- return new InterfaceMethodRefInfo(tag, classIndex, nameAndTypeIndex);
- }
- case IClassFileConstants.CONSTANT_STRING: {
- int stringIndex = dataStream.readUnsignedShort();
- return new StringInfo(tag, stringIndex);
- }
- case IClassFileConstants.CONSTANT_INTEGER: {
- long bytes = dataStream.readUnsignedInt();
- return new IntegerInfo(tag, bytes);
- }
- case IClassFileConstants.CONSTANT_FLOAT: {
- long bytes = dataStream.readUnsignedInt();
- return new FloatInfo(tag, bytes);
- }
- case IClassFileConstants.CONSTANT_LONG: {
- long highBytes = dataStream.readUnsignedInt();
- long lowBytes = dataStream.readUnsignedInt();
- return new LongInfo(tag, highBytes, lowBytes);
- }
- case IClassFileConstants.CONSTANT_DOUBLE: {
- long highBytes = dataStream.readUnsignedInt();
- long lowBytes = dataStream.readUnsignedInt();
- return new DoubleInfo(tag, highBytes, lowBytes);
- }
- case IClassFileConstants.CONSTANT_NAME_AND_TYPE: {
- int nameIndex = dataStream.readUnsignedShort();
- int descriptorIndex = dataStream.readUnsignedShort();
- return new NameAndTypeInfo(tag, nameIndex, descriptorIndex);
- }
- case IClassFileConstants.CONSTANT_UTF8: {
- int length = dataStream.readUnsignedShort();
- short[] bytes = new short[length];
-
- for (int i = 0; i < length; i++) {
- bytes[i] = (short)(dataStream.readUnsignedByte());
- }
-
- return new UTF8Info(tag, length, bytes);
- }
- default: {
- return null;
- }
- }
- }
-
- /**
- * Reads the interfaces.
- * @param dataStream the data stream.
- * @throws IOException if an I/O error occurs.
- */
- protected void readInterfaces(EnhancedDataInputStream dataStream) throws IOException {
- interfaces = new int[interfaces_count];
-
- for (int i = 0; i < interfaces_count; i++) {
- interfaces[i] = dataStream.readUnsignedShort();
- }
- }
-
- /**
- * Reads the fields.
- * @param dataStream the data stream.
- * @throws IOException if an I/O error occurs.
- */
- protected void readFields(EnhancedDataInputStream dataStream) throws IOException {
-
- for (int i = 0; i < fields_count; i++) {
- readField(dataStream);
- }
- }
-
- /**
- * Reads a field.
- * @param dataStream the data stream.
- * @throws IOException if an I/O error occurs.
- */
- protected FieldInfo readField(EnhancedDataInputStream dataStream) throws IOException {
- /*int accessFlags = */ dataStream.readUnsignedShort();
- /*int nameIndex = */ dataStream.readUnsignedShort();
- /*int descriptorIndex =*/ dataStream.readUnsignedShort();
- int attributesCount = dataStream.readUnsignedShort();
-
- for (int i = 0; i < attributesCount; i++) {
- readAttribute(dataStream);
- }
-
- return null;
- }
-
- /**
- * Reads the methods.
- * @param dataStream the data stream.
- * @throws IOException if an I/O error occurs.
- */
- protected void readMethods(EnhancedDataInputStream dataStream) throws IOException {
-
- methods = new MethodInfo[methods_count];
-
- for (int i = 0; i < methods_count; i++) {
- methods[i] = readMethod(dataStream);
- }
- }
-
- /**
- * Reads a method.
- * @param dataStream the data stream.
- * @throws IOException if an I/O error occurs.
- */
- protected MethodInfo readMethod(EnhancedDataInputStream dataStream) throws IOException {
-
- int accessFlags = dataStream.readUnsignedShort();
- int nameIndex = dataStream.readUnsignedShort();
- int descriptorIndex = dataStream.readUnsignedShort();
- int attributesCount = dataStream.readUnsignedShort();
-
- for (int i = 0; i < attributesCount; i++) {
- readAttribute(dataStream);
- }
-
- return new MethodInfo(accessFlags, nameIndex, descriptorIndex, attributes_count, null);
- }
-
- /**
- * Reads an attribute.
- * @param dataStream the data stream.
- * @throws IOException if an I/O error occurs.
- */
- protected AbstractAttributeInfo readAttribute(EnhancedDataInputStream dataStream) throws IOException {
- dataStream.skip(2);
- long length = dataStream.readUnsignedInt();
-
- if (length > 0) {
- dataStream.skip(length);
- }
-
- return null;
- }
-
- /**
- * Returns the entry at the constant pool index.
- * @param index the index.
- * @return the constant pool table entry.
- */
- protected AbstractCPInfo getCPInfo(int index) {
- return (AbstractCPInfo)(constant_pool.get(index-1));
- }
-
- /**
- * Returns the name given an index to the constant pool table.
- * The entry at the index must be a UTF8 string entry
- */
- protected String getString(int index) {
- UTF8Info nameInfo = (UTF8Info)(getCPInfo(index));
- String name = ClassFileUTF8Reader.getInstance().getString(nameInfo.getBytes());
- return name;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUTF8Reader.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUTF8Reader.java
deleted file mode 100644
index 5ce413c72..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUTF8Reader.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This singleton class converts an array of unsigned bytes (represented by shorts) to UTF-8
- * strings as per the UTF-8 format that the JVM uses. Note that the JVM's version
- * of UTF8 is different to the standard UTF-8 format.
- */
-public class ClassFileUTF8Reader {
-
- private static ClassFileUTF8Reader instance;
-
- /**
- * Constructor.
- */
- private ClassFileUTF8Reader() {
- super();
- }
-
- /**
- * Returns the singleton instance of the reader.
- * @return the singleton instance.
- */
- public static final ClassFileUTF8Reader getInstance() {
-
- if (instance == null) {
- instance = new ClassFileUTF8Reader();
- }
-
- return instance;
- }
-
- /**
- * Returns a string given an unsigned array of bytes (represented as an array of shorts). Converts to
- * a string assuming the bytes represent the UTF8 format used by JVM.
- * @param bytes the bytes.
- * @return the string.
- */
- public String getString(short[] bytes) {
- StringBuffer buf = new StringBuffer();
-
- char c;
-
- int i = 0;
-
- while (i < bytes.length) {
-
- // first bit is 0
- // char is represented by one byte
- // char is in the range '\u0001' to '\u007F'
- // format: x byte
- // x: 0xxxxxxx
- if ((bytes[i] & 0x80) == 0) {
- c = (char)(bytes[i]);
- i = i + 1;
- }
- // first three bits are 110 and first two bits of next byte are 10
- // char is represented by two bytes
- // char is either null character ('\u0000') or in the range '\u0080' to '\u07FF'
- // format: x byte followed by y byte
- // x: 110xxxxx
- // y: 10xxxxxx
- else if (((bytes[i] & 0xE0) == 0xC0) && ((bytes[i+1] & 0xC0) == 0x80)) {
- c = (char)(((bytes[i] & 0x1F) << 6) + (bytes[i+1] & 0x3F));
- i = i + 2;
- }
- // first three bits are 1110 and first two bits of next bytes are 10
- // char is represented by three bytes
- // char is in the range '\u0800' to '\uFFFF'
- // format: x byte, y byte and z byte
- // x: 1110xxxx
- // y: 10xxxxxx
- // z: 10xxxxxx
- else if (((bytes[i] & 0xF0) == 0xE0) && ((bytes[i+1] & 0xC0) == 0x80) && ((bytes[i+2] & 0xC0) == 0x80)) {
- c = (char)(((bytes[i] & 0x0F) << 12) + ((bytes[i+1] & 0x3F) << 6) + (bytes[i+2] & 0x3F));
- i = i + 3;
- }
- // we should not never be here
- else {
- continue;
- }
-
- // append character
- buf.append(c);
- }
-
- return buf.toString();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUtil.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUtil.java
deleted file mode 100644
index 6720ccd22..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUtil.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Singleton class for obtaining various information about class files.
- */
-public class ClassFileUtil {
-
- private static ClassFileUtil instance;
-
- /**
- * Constructor.
- */
- private ClassFileUtil() {
- super();
- }
-
- /**
- * Returns the singleton instance.
- * @return the singleton instance.
- */
- public static final ClassFileUtil getInstance() {
-
- if (instance == null) {
- instance = new ClassFileUtil();
- }
-
- return instance;
- }
-
- /**
- * Returns whether the class with the given path is runnable, i.e. whether it contains <code>public
- * static void main (String[])</code> method.
- * @param classFilePath the class file path.
- * @return <code>true</code> if the class file is runnable, <code>false</code> otherwise.
- * @throws IOException if an I/O error occurs.
- */
- public boolean isRunnable(String classFilePath) throws IOException {
- File classFile = new File(classFilePath);
- return isRunnable(classFile);
- }
-
- /**
- * Returns whether the class is runnable, i.e. whether it contains <code>public
- * static void main (String[])</code> method.
- * @param classFile the class file.
- * @return <code>true</code> if the class file is runnable, <code>false</code> otherwise.
- * @throws IOException if an I/O error occurs.
- */
- public boolean isRunnable(File classFile) throws IOException {
- FileInputStream stream = new FileInputStream(classFile);
- return isRunnable(stream);
- }
-
- /**
- * Returns whether the class represented by the given input stream is runnable,
- * i.e. whether it contains <code>public static void main (String[])</code> method.
- * @param stream the input stream.
- * @return <code>true</code> if the class file is runnable, <code>false</code> otherwise.
- * @throws IOException if an I/O error occurs.
- */
- public boolean isRunnable(InputStream stream) throws IOException {
- BasicClassFileParser parser = new BasicClassFileParser(stream);
- parser.parse();
- return parser.isExecutable();
- }
-
- /**
- * Gets the qualified class name for the file with the given path.
- * @param classFilePath the class file path.
- * @throws IOException if an I/O error occurs.
- */
- public String getQualifiedClassName(String classFilePath) throws IOException {
- File classFile = new File(classFilePath);
- return getQualifiedClassName(classFile);
- }
-
- /**
- * Gets the qualified class name.
- * @param classFile the class file.
- * @throws IOException if an I/O error occurs.
- */
- public String getQualifiedClassName(File classFile) throws IOException {
- FileInputStream stream = new FileInputStream(classFile);
- return getQualifiedClassName(stream);
- }
-
- /**
- * Gets the qualified class name for the class represented by the given input stream.
- * @param classFilePath the class file path.
- * @throws IOException if an I/O error occurs.
- */
- public String getQualifiedClassName(InputStream stream) throws IOException {
- BasicClassFileParser parser = new BasicClassFileParser(stream);
- parser.parse();
- return parser.getQualifiedClassName();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassInfo.java
deleted file mode 100644
index 06fb88de2..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassInfo.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents class information.
- */
-public class ClassInfo extends AbstractCPInfo {
-
- protected int nameIndex;
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param nameIndex the name index.
- */
- public ClassInfo(short tag, int nameIndex) {
- super(tag);
- setNameIndex(nameIndex);
- }
-
- /**
- * Returns the name index.
- * @return the name index.
- */
- public int getNameIndex() {
- return nameIndex;
- }
-
- /**
- * Sets the name index.
- * @param nameIndex the name index.
- */
- private void setNameIndex(int nameIndex) {
- this.nameIndex = nameIndex;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/DoubleInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/DoubleInfo.java
deleted file mode 100644
index 6bbea4949..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/DoubleInfo.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents double information.
- */
-public class DoubleInfo extends Abstract8ByteNumericInfo {
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param highBytes the high bytes.
- * @param lowBytes the low bytes.
- */
- public DoubleInfo(short tag, long highBytes, long lowBytes) {
- super(tag, highBytes, lowBytes);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/EnhancedClassLoader.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/EnhancedClassLoader.java
deleted file mode 100644
index 60f2ea7e7..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/EnhancedClassLoader.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-/**
- * This class loader is used to load classes given a root path.
- */
-public class EnhancedClassLoader extends ClassLoader {
-
- private String rootPath;
-
- /**
- * Constructor.
- * @param rootPath the root path.
- */
- public EnhancedClassLoader(String rootPath) {
- super();
- setRootPath(rootPath);
- }
-
- /**
- * Returns the root path.
- * @return the root path.
- */
- public String getRootPath() {
- return rootPath;
- }
-
- /**
- * Sets the root path.
- * @param rootPath the root path.
- */
- public void setRootPath(String rootPath) {
- this.rootPath = rootPath;
- }
-
- /**
- * Finds the class with the given name.
- * @see java.lang.ClassLoader#findClass(java.lang.String)
- */
- protected Class findClass(String name) throws ClassNotFoundException {
-
- try {
- byte[] b = loadClassData(name);
- return defineClass(name, b, 0, b.length);
- }
- catch (IOException e) {
- throw new ClassNotFoundException();
- }
- }
-
- /**
- * Returns the class data.
- * @param name the name of the class.
- * @return the contents of the class.
- */
- private byte[] loadClassData(String name) throws IOException {
-
- // parent path
- String parentPath = rootPath;
-
- // system file separator
- String fileSep = System.getProperty("file.separator");
-
- // add file separator to the parent path if it does not end with it
- if (!parentPath.endsWith(fileSep)) {
- parentPath = parentPath + fileSep;
- }
-
- StringBuffer buf = new StringBuffer(parentPath);
-
- // replace '.' in class name with file separator
- for (int i = 0; i < name.length(); i++) {
- char c = name.charAt(i);
-
- if (c == '.') {
- buf.append(fileSep);
- }
- else {
- buf.append(c);
- }
- }
-
- String filePath = buf.append(".class").toString();
-
- File file = new File(filePath);
-
- FileInputStream fileStream = new FileInputStream(file);
-
- int length = (int)(file.length());
- byte[] classData = new byte[length];
-
- int bytesRead = 0;
- int offset = 0;
-
- int available = fileStream.available();
-
- while (available > 0) {
- int bytesToRead = Math.min(available, 256000);
- bytesRead = fileStream.read(classData, offset, bytesToRead);
-
- if (bytesRead == -1) {
- break;
- }
-
- offset += bytesRead;
-
- available = fileStream.available();
- }
-
- return classData;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/EnhancedDataInputStream.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/EnhancedDataInputStream.java
deleted file mode 100644
index b6d107249..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/EnhancedDataInputStream.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-import java.io.DataInputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A data input stream that adds a method for reading an unsigned integer.
- */
-public class EnhancedDataInputStream extends DataInputStream {
-
- /**
- * Creates a data input stream that uses the specified underlying input stream.
- * @param in the specified input stream.
- */
- public EnhancedDataInputStream(InputStream in) {
- super(in);
- }
-
- /**
- * Reads the next four bytes of this input stream as an unsigned 32-bit long.
- * <p>
- * Bytes
- * for this operation are read from the contained
- * input stream.
- *
- * @return the next four bytes of this input stream, interpreted as an
- * unsigned 32-bit long.
- * @exception EOFException if this input stream reaches the end before
- * reading four bytes.
- * @exception IOException if an I/O error occurs.
- * @see java.io.FilterInputStream#in
- */
- public final long readUnsignedInt() throws IOException {
- long ch1 = in.read();
- long ch2 = in.read();
- long ch3 = in.read();
- long ch4 = in.read();
-
- if ((ch1 | ch2 | ch3 | ch4) < 0) {
- throw new EOFException();
- }
-
- return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FieldInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FieldInfo.java
deleted file mode 100644
index 2521b1da6..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FieldInfo.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents a field.
- */
-public class FieldInfo extends AbstractCommonInfo {
-
- /**
- * Constructor.
- * @param accessFlags the access flags.
- * @param nameIndex the name index.
- * @param descriptorIndex the descriptor index.
- * @param attributesCount the number of attributes.
- * @param attributes the attributes.
- */
- public FieldInfo(int accessFlags, int nameIndex, int descriptorIndex, int attributesCount, AbstractAttributeInfo[] attributes) {
- super(accessFlags, nameIndex, descriptorIndex, attributesCount, attributes);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FieldRefInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FieldRefInfo.java
deleted file mode 100644
index 7611494b8..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FieldRefInfo.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents field reference inforamtion.
- */
-public class FieldRefInfo extends AbstractRefInfo {
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param classIndex the class index.
- * @param nameAndTypeIndex the name and type index.
- */
- public FieldRefInfo(short tag, int classIndex, int nameAndTypeIndex) {
- super(tag, classIndex, nameAndTypeIndex);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FloatInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FloatInfo.java
deleted file mode 100644
index 36d7be8b0..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/FloatInfo.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents float information.
- */
-public class FloatInfo extends Abstract4ByteNumericInfo {
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param bytes the bytes.
- */
- public FloatInfo(short tag, long bytes) {
- super(tag, bytes);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/IClassFileConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/IClassFileConstants.java
deleted file mode 100644
index 73876f080..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/IClassFileConstants.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-public interface IClassFileConstants {
-
- public static final int CONSTANT_CLASS = 7;
- public static final int CONSTANT_FIELD_REF = 9;
- public static final int CONSTANT_METHOD_REF = 10;
- public static final int CONSTANT_INTERFACE_METHOD_REF = 11;
- public static final int CONSTANT_STRING = 8;
- public static final int CONSTANT_INTEGER = 3;
- public static final int CONSTANT_FLOAT = 4;
- public static final int CONSTANT_LONG = 5;
- public static final int CONSTANT_DOUBLE = 6;
- public static final int CONSTANT_NAME_AND_TYPE = 12;
- public static final int CONSTANT_UTF8 = 1;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/IntegerInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/IntegerInfo.java
deleted file mode 100644
index 7f146db5a..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/IntegerInfo.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents integer information.
- */
-public class IntegerInfo extends Abstract4ByteNumericInfo {
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param bytes the bytes.
- */
- public IntegerInfo(short tag, long bytes) {
- super(tag, bytes);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/InterfaceMethodRefInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/InterfaceMethodRefInfo.java
deleted file mode 100644
index c8e8eeb7e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/InterfaceMethodRefInfo.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents
- */
-public class InterfaceMethodRefInfo extends AbstractRefInfo {
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param classIndex the class index.
- * @param nameAndTypeIndex the name and type index.
- */
- public InterfaceMethodRefInfo(short tag, int classIndex, int nameAndTypeIndex) {
- super(tag, classIndex, nameAndTypeIndex);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/LongInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/LongInfo.java
deleted file mode 100644
index a2977a12e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/LongInfo.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents long information.
- */
-public class LongInfo extends Abstract8ByteNumericInfo {
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param highBytes the high bytes.
- * @param lowBytes the low bytes.
- */
- public LongInfo(short tag, long highBytes, long lowBytes) {
- super(tag, highBytes, lowBytes);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/MethodInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/MethodInfo.java
deleted file mode 100644
index e0b355e18..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/MethodInfo.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents a method.
- */
-public class MethodInfo extends AbstractCommonInfo {
-
- /**
- * Constructor.
- * @param accessFlags the access flags.
- * @param nameIndex the name index.
- * @param descriptorIndex the descriptor index.
- * @param attributesCount the number of attributes.
- * @param attributes the attributes.
- */
- public MethodInfo(int accessFlags, int nameIndex, int descriptorIndex, int attributesCount, AbstractAttributeInfo[] attributes) {
- super(accessFlags, nameIndex, descriptorIndex, attributesCount, attributes);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/MethodRefInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/MethodRefInfo.java
deleted file mode 100644
index 9d59227b9..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/MethodRefInfo.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents method reference information.
- */
-public class MethodRefInfo extends AbstractRefInfo {
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param classIndex the class index.
- * @param nameAndTypeIndex the name and type index.
- */
- public MethodRefInfo(short tag, int classIndex, int nameAndTypeIndex) {
- super(tag, classIndex, nameAndTypeIndex);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/NameAndTypeInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/NameAndTypeInfo.java
deleted file mode 100644
index 254645835..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/NameAndTypeInfo.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents name and type information.
- */
-public class NameAndTypeInfo extends ClassInfo {
-
- protected int descriptorIndex;
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param nameIndex the name index.
- * @param descriptorIndex the descriptor index.
- */
- public NameAndTypeInfo(short tag, int nameIndex, int descriptorIndex) {
- super(tag, nameIndex);
- setDescriptorIndex(descriptorIndex);
- }
-
- /**
- * Returns the descriptor index.
- * @return the descriptorIndex.
- */
- public int getDescriptorIndex() {
- return descriptorIndex;
- }
-
- /**
- * Sets the descriptor index.
- * @param descriptorIndex the descriptor index.
- */
- private void setDescriptorIndex(int descriptorIndex) {
- this.descriptorIndex = descriptorIndex;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/StringInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/StringInfo.java
deleted file mode 100644
index 708d5e24d..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/StringInfo.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents a string information.
- */
-public class StringInfo extends AbstractCPInfo {
-
- protected int stringIndex;
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param stringIndex the string index.
- */
- public StringInfo(short tag, int stringIndex) {
- super(tag);
- setStringIndex(stringIndex);
- }
-
- /**
- * @return the stringIndex.
- */
- public int getStringIndex() {
- return stringIndex;
- }
-
- /**
- * Sets the stringIndex.
- * @param stringIndex the stringIndex.
- */
- private void setStringIndex(int stringIndex) {
- this.stringIndex = stringIndex;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/UTF8Info.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/UTF8Info.java
deleted file mode 100644
index 56d799f45..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/UTF8Info.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-/**
- * This class represents a UTF-8 string.
- */
-public class UTF8Info extends AbstractCPInfo {
-
- protected int length;
- protected short[] bytes;
-
- /**
- * Constructor.
- * @param tag the tag.
- * @param length the length;
- * @param bytes the array of bytes with the given length.
- */
- public UTF8Info(short tag, int length, short[] bytes) {
- super(tag);
- setLength(length);
- setBytes(bytes);
- }
-
- /**
- * Returns the bytes.
- * @return the bytes.
- */
- public short[] getBytes() {
- return bytes;
- }
-
- /**
- * Sets the bytes.
- * @param bytes the bytes.
- */
- private void setBytes(short[] bytes) {
- this.bytes = bytes;
- }
-
- /**
- * Returns the length.
- * @return the length.
- */
- public int getLength() {
- return length;
- }
-
- /**
- * Sets the length.
- * @param length the length.
- */
- private void setLength(int length) {
- this.length = length;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ISystemMessageProvider.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ISystemMessageProvider.java
deleted file mode 100644
index 032e0c233..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ISystemMessageProvider.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.services.clientserver.messages;
-
-public interface ISystemMessageProvider {
- public SystemMessage getMessage(String id);
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/IndicatorException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/IndicatorException.java
deleted file mode 100644
index 73de67cc9..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/IndicatorException.java
+++ /dev/null
@@ -1,33 +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.services.clientserver.messages;
-
-/**
- * used to indicate that the indicator is not valid.
- */
-public class IndicatorException extends Exception
-{
- /**
- *
- */
- private static final long serialVersionUID = 3884986031505435750L;
-
- public IndicatorException(String text)
- {
- super(text);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessage.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessage.java
deleted file mode 100644
index 6aaeb3551..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessage.java
+++ /dev/null
@@ -1,490 +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.services.clientserver.messages;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-/**
- * SystemMessage is used to supply detailed status when an error or other significant event occurs that should
- * be presented to the user or logged. It is structured to capture information from a variety of remote systems.
- */
-public class SystemMessage
-{
-
- /**
- * Completion message indicator
- */
- public static final char COMPLETION = 'C';
- /**
- * Inquiry message indicator
- */
- public static final char INQUIRY = 'Q';
- /**
- * Information message indicator
- */
- public static final char INFORMATION = 'I';
- /**
- * Error message indicator
- */
- public static final char ERROR = 'E';
- /**
- * Warning message indicator
- */
- public static final char WARNING = 'W';
- /**
- * Unexpected message indicator (same as warning but will log exception & stack in message log)
- */
- public static final char UNEXPECTED = 'U';
-
- // Private variables
- private char subPrefix = '%';
- private char indicator;
- private String level1NS, level2NS; // level 1 & 2 with NO substitution made
- private String level1WS, level2WS; // level 1 & 2 with substitutions made.
- private String component, subComponent;
- private String messageNumber;
- private int numSubs = -1;
- private Object[] subs = null;
-
- protected static final String NESTING_INDENT = " "; //$NON-NLS-1$
-
- /** SystemMesssage constructor
- * <p>Throws:
- * <li>IndicatorException: the indicator specified is not a valid indicator
- * @param comp Component code. Usually a 3 letter component code like "RSE".
- * @param sub Subcomponent code. Usually a 1 letter subcomponent such as "F" for files
- * @param ind Message type indicator. See constants for values.
- * @param number a string that gives the 4 digit message number
- * @param l1 Level 1 text that describes the error
- * @param l2 Level 2 text that describes any recovery actions or further details
- * @throws IndicatorException if a message is attempted to be constructed with an invalid indicator.
- */
- public SystemMessage(String comp, String sub, String number, char ind, String l1, String l2) throws IndicatorException {
- component = comp.toUpperCase();
- subComponent = sub.toUpperCase();
- messageNumber = number.toUpperCase();
- setIndicator(ind);
- level1NS = l1.trim();
- level2NS = l2.trim();
- level1WS = l1.trim();
- level2WS = l2.trim();
-
- }
-
- /**
- * Use this method to override the default indicator of the message
- * @param ind the new indicator. See constants for values.
- * @throws IndicatorException if the indicator is not valid
- */
- public void setIndicator(char ind) throws IndicatorException {
- // check that a valid indicator was specified
- if (ind != INQUIRY && ind != INFORMATION && ind != ERROR && ind != WARNING && ind != UNEXPECTED && ind != COMPLETION)
- throw (new IndicatorException("Indicator specified not valid. Unable to set Indicator."));
- indicator = ind;
- }
-
- /**
- * Use this method to get the message type indicator. Will be one of:
- * <ul>
- * <li>{@link #INQUIRY} for a question message.
- * <li>{@link #COMPLETION} for a completion message.
- * <li>{@link #INFORMATION} for an informational message.
- * <li>{@link #ERROR} for an error message.
- * <li>{@link #WARNING} for a warning message.
- * <li>{@link #UNEXPECTED} for an unexpected-situation-encountered message.
- * </ul>
- * @return the indicator for this message.
- **/
- public char getIndicator() {
- return indicator;
- }
-
- /**
- * @return the message number of this message.
- */
- public String getMessageNumber() {
- return messageNumber;
- }
-
- /**
- * @return the component of this message.
- */
- public String getComponent() {
- return component;
- }
-
- /**
- * @return the subcomponent of this message.
- */
- public String getSubComponent() {
- return subComponent;
- }
-
- /**
- * Use this method to retrieve the unique number of substitution variables
- * in this message (this would include level 1 and 2 text
- * @return (int) number of unique substitution variables variables
- **/
- public int getNumSubstitutionVariables() {
- // see if we already have this information stored
- if (numSubs >= 0)
- return numSubs;
- // otherwise we need to count the substitution variables.
- else {
- numSubs = 0; // initial value
- String allText = level1NS + " " + level2NS;
- String subVar = subPrefix + new Integer(numSubs + 1).toString();
- int subLoc = allText.indexOf(subVar);
- while (subLoc >= 0) {
- // in first position
- if ((subLoc == 0 && !Character.isDigit(allText.substring(subVar.length()).toCharArray()[0])) ||
- // in last position
- (subLoc == allText.length() - subVar.length() && allText.substring(subLoc - 1).toCharArray()[0] != subPrefix) ||
- // somewhere in the middle
- (!Character.isDigit(allText.substring(subLoc + subVar.length()).toCharArray()[0]) && allText.substring(subLoc - 1).toCharArray()[0] != subPrefix)) numSubs++;
- subVar = subPrefix + new Integer(numSubs + 1).toString();
- subLoc = allText.indexOf(subVar);
- }
- return numSubs;
- }
- }
-
- /**
- * Use this method to retrieve level one text
- * @return String - level one text with subsitutions made.
- **/
- public String getLevelOneText() {
- return level1WS;
- }
-
- /**
- * Use this method to retrieve level two text
- * @return String - level two text with subsitutions made.
- **/
- public String getLevelTwoText() {
- return level2WS;
- }
-
- /**
- * Use this method to retrieve the full message ID:
- * Component + SubComponent + Number + indicator
- * @return String - the full message ID
- **/
- public String getFullMessageID() {
- return component + subComponent + messageNumber + indicator;
- }
-
- /**
- * Use this method to retrieve 'long' message ID format:
- * Component + SubComponent + Number.
- * The long message ID is used for retrieving messages from a message file.
- * @return String - the long message ID
- **/
- public String getLongMessageID() {
- return component + subComponent + messageNumber;
- }
-
- /**
- * Use this method to retrieve 'standard' message ID format:
- * Component + Number
- * @return String - the full message ID
- **/
- public String getMessageID() {
- return component + messageNumber;
- }
-
- /**
- * Tests if this message has a long id equal to the one supplied in the argument.
- * @param messageId the long message id to compare against.
- * @return a boolean indicating if the message ids are equal.
- */
- public boolean hasLongID(String messageId) {
- return getLongMessageID().equals(messageId);
- }
-
- /**
- * Use this method to set substitution value %1.
- * <br>Generally toString() is used on the substitution objects, but there is
- * special case handling for exception objects and IStatus objects.
- * @param sub1 the substitution object for the first value.
- * @return the SystemMessage being operated on.
- */
- public SystemMessage makeSubstitution(Object sub1) {
- level1WS = level1NS;
- level2WS = level2NS;
- makeSub(1, sub1);
- // save subs
- subs = new Object[1];
- subs[0] = sub1;
- return this;
- }
-
- /**
- * Use this method to set substitution value %1 %2
- * <br>Generally toString() is used on the substitution objects, but there is
- * special case handling for exception objects and IStatus objects.
- * @param sub1 the substitution object for the first value.
- * @param sub2 the substitution object for the second value.
- * @return the SystemMessage being operated on.
- */
- public SystemMessage makeSubstitution(Object sub1, Object sub2) {
- level1WS = level1NS;
- level2WS = level2NS;
- makeSub(1, sub1);
- makeSub(2, sub2);
- // save subs
- subs = new Object[2];
- subs[0] = sub1;
- subs[1] = sub2;
- return this;
- }
-
- /**
- * Use this method to set substitution value %1 %2 %3
- * <br>Generally toString() is used on the substitution objects, but there is
- * special case handling for exception objects and IStatus objects.
- * @param sub1 the substitution object for the first value.
- * @param sub2 the substitution object for the second value.
- * @param sub3 the substitution object for the third value.
- * @return the SystemMessage being operated on.
- */
- public SystemMessage makeSubstitution(Object sub1, Object sub2, Object sub3) {
- level1WS = level1NS;
- level2WS = level2NS;
- makeSub(1, sub1);
- makeSub(2, sub2);
- makeSub(3, sub3);
- // save subs
- subs = new Object[3];
- subs[0] = sub1;
- subs[1] = sub2;
- subs[2] = sub3;
- return this;
- }
-
- /**
- * Use this method to set substitution value %1 %2 %3 %4
- * <br>Generally toString() is used on the substitution objects, but there is
- * special case handling for exception objects and IStatus objects.
- * @param sub1 the substitution object for the first value.
- * @param sub2 the substitution object for the second value.
- * @param sub3 the substitution object for the third value.
- * @param sub4 the substitution object for the fourth value.
- * @return the SystemMessage being operated on.
- */
- public SystemMessage makeSubstitution(Object sub1, Object sub2, Object sub3, Object sub4) {
- level1WS = level1NS;
- level2WS = level2NS;
- makeSub(1, sub1);
- makeSub(2, sub2);
- makeSub(3, sub3);
- makeSub(4, sub4);
- // save subs
- subs = new Object[4];
- subs[0] = sub1;
- subs[1] = sub2;
- subs[2] = sub3;
- subs[3] = sub4;
- return this;
- }
-
- /**
- * Use this method to set substitution values
- * <br>Generally toString() is used on the substitution objects, but there is
- * special case handling for exception objects and IStatus objects.
- * @param subsList the array of substitution objects
- * @return the SystemMessage being operated on.
- */
- public SystemMessage makeSubstitution(Object[] subsList) {
- level1WS = level1NS;
- level2WS = level2NS;
-
- if ((subsList != null) && (subsList.length > 0)) for (int i = 0; i < subsList.length; i++)
- makeSub(i + 1, subsList[i]);
- // save subs
- subs = subsList;
- return this;
- }
-
- /**
- * retrieves an array of substitution variables
- * @return Object[] array of substitution variables used
- */
- public Object[] getSubVariables() {
- return subs;
- }
-
- /**
- * private method to make a substitution
- */
- private void makeSub(int subNumber, Object sub) {
- if (sub == null) return;
-
- String subValue = getSubValue(sub);
-
- // check that substitution is needed
- if (subNumber > getNumSubstitutionVariables()) return;
-
- String subVar = subPrefix + new Integer(subNumber).toString();
- int subLoc = -1;
-
- // set level 1
- // - quick test added by Phil
- if (level1WS.equals(subVar))
- level1WS = subValue;
- else {
- subLoc = level1WS.indexOf(subVar);
-
- // FIXES BY PHIL
- // 1.
- // in the following code we were doing toCharArray only to index and get the first char.
- // this is not required! there is a charAt method in String for this. Phil. EG:
- //!Character.isDigit(level1WS.substring(subVar.length()).toCharArray()[0])) ||
-
- // 2. compared subLoc to gt zero, vs gte zero
- // 3. fixing that exposed a bug for the case when level one or two is only '%1'
- //
- // This code is hard to read and maintain and should be fixed up someday.
- // -- why do we check if the next or previous char is a digit? For double digit sub vars like %11?
-
- //while (subLoc>0) fixed. phil
- while (subLoc >= 0) {
- // in first position
- if ((subLoc == 0 && !Character.isDigit(level1WS.substring(subVar.length()).charAt(0))) ||
- // in last position
- (subLoc == level1WS.length() - subVar.length() && level1WS.substring(subLoc - 1).charAt(0) != subPrefix) ||
- // somewhere in the middle
- (!Character.isDigit(level1WS.substring(subLoc + subVar.length()).charAt(0)) && level1WS.substring(subLoc - 1).charAt(0) != subPrefix))
- level1WS = level1WS.substring(0, subLoc) + subValue + level1WS.substring(subLoc + subVar.length());
- subLoc = level1WS.indexOf(subVar, subLoc + subValue.length());
- }
- }
- // set level 2
- // - quick test added by Phil
- if (level2WS.equals(subVar))
- level2WS = subValue;
- else {
- subLoc = level2WS.indexOf(subVar);
- //while (subLoc>0) fixed. phil
- while (subLoc >= 0) {
- // in first position
- if ((subLoc == 0 &&
- //!Character.isDigit(level2WS.substring(subVar.length()).charAt(0))) ||
- !Character.isDigit(level2WS.charAt(subVar.length())))
- ||
- // in last position
- (subLoc == level2WS.length() - subVar.length() && level2WS.substring(subLoc - 1).charAt(0) != subPrefix) ||
- // somewhere in the middle
- (!Character.isDigit(level2WS.substring(subLoc + subVar.length()).charAt(0)) && level2WS.substring(subLoc - 1).charAt(0) != subPrefix))
- level2WS = level2WS.substring(0, subLoc) + subValue + level2WS.substring(subLoc + subVar.length());
- subLoc = level2WS.indexOf(subVar, subLoc + subValue.length());
- }
- }
- }
-
- public void setPrefixChar(char prefixChar) {
- subPrefix = prefixChar;
- }
-
- /**
- * Replace a string with another string throughout a target string.
- * @param target - string containing substring to be substituted.
- * @param subOld - substitution variable. Eg "%1"
- * @param subNew - substitution data. Eg "001"
- * @return message with all occurrences of subOld substituted with subNew.
- */
- public static String sub(String target, String subOld, String subNew) {
- StringBuffer temp = new StringBuffer();
- int lastHit = 0;
- int newHit = 0;
- for (newHit = target.indexOf(subOld, lastHit); newHit != -1; lastHit = newHit, newHit = target.indexOf(subOld, lastHit)) {
- if (newHit >= 0) temp.append(target.substring(lastHit, newHit));
- temp.append(subNew);
- newHit += subOld.length();
- }
- if (lastHit >= 0) temp.append(target.substring(lastHit));
- return temp.toString();
- }
-
- /**
- * Convert this message to a string.
- * Returns string of the form: msgId + severity + ":" + first-level-text
- */
- public String toString() {
- return getFullMessageID() + ": " + getLevelOneText();
- }
-
- /**
- * used to determine the string value of the object
- * it calls toString for all object types except for Exceptions
- * where the stack is also rendered
- * @param sub the substitution object
- * @return the string value for the object
- */
- public String getSubValue(Object sub) {
-
- // the following code caused a crash so I changed it. Phil.
- /*
- Class subClass=sub.getClass();
- // loop through all the classes for the object
- try {
- while (subClass!=null) {
- if (subClass.equals(Class.forName("Exception"))) {
- Exception exc=(Exception)sub;
- StringWriter excWriter = new StringWriter();
- exc.printStackTrace(new PrintWriter(excWriter));
- return exc.toString()+"\n"+ excWriter.toString();
- }
- subClass=subClass.getSuperclass();
- }
- }
- catch(ClassNotFoundException e) {
- // class was not found
- SystemBasePlugin.logError("SystemMessge: getSubValue (Class not found) "+e.toString(), e);
- }
- */
-
- if (sub == null) return "";
-
- if (sub instanceof Exception) {
- Exception exc = (Exception) sub;
- StringWriter excWriter = new StringWriter();
- exc.printStackTrace(new PrintWriter(excWriter));
- String msg = exc.toString();
- //String msg = exc.getMessage();
- if ((msg == null) || (exc instanceof ClassCastException)) msg = exc.getClass().getName();
- return msg + "\n" + excWriter.toString();
- }
-
- return sub.toString();
- }
-
- /**
- * Creates a new message with the same component, subcomponent, number, level 1 and level 2 text as this message.
- * @see java.lang.Object#clone()
- */
- protected Object clone() throws CloneNotSupportedException {
-
- try {
- return new SystemMessage(component, subComponent, messageNumber, indicator, level1NS, level2NS);
- }
- catch (IndicatorException e) {
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java
deleted file mode 100644
index ef0bd43c0..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.services.clientserver.messages;
-/**
- * Encapsulates a system message
- */
-public class SystemMessageException extends Exception
-{
-
- /**
- * A serialVersionUID is recommended for all serializable classes.
- * This trait is inherited from Throwable.
- * This should be updated if there is a schema change for this class.
- */
- private static final long serialVersionUID = 6695260563678942200L;
- private SystemMessage msg;
-
- /**
- * Constructor
- * @param msg - a message to wrap.
- */
- protected SystemMessageException(String msg)
- {
- super(msg);
- }
-
- /**
- * Constructor
- * @param msg - a system message to wrap.
- */
- public SystemMessageException(SystemMessage msg)
- {
- super(msg.getLevelOneText());
- this.msg = msg;
- }
-
- /**
- * @return the SystemMessage wrapped by this SystemMessageException
- */
- public SystemMessage getSystemMessage()
- {
- return msg;
- }
-
- /**
- * Tests if the SystemMessage encapsulated by this exception has a long id equal to the
- * argument.
- * @param longMessageID the String containing the message id to test.
- * @return true if the long message id of the message is equal to the supplied message id.
- */
- public boolean hasLongID(String longMessageID) {
- return getSystemMessage().hasLongID(longMessageID);
- }
-
- /**
- * Set the SystemMessage being wrapped
- * @param msg the SystemMessage wrapped by this SystemMessageException
- */
- public void setSystemMessage(SystemMessage msg)
- {
- this.msg = msg;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java
deleted file mode 100644
index c273e9845..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java
+++ /dev/null
@@ -1,737 +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.services.clientserver.messages;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Hashtable;
-import java.util.LinkedList;
-import java.util.Vector;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-
-/**
- * Use this class to open, and parse, a RSE-style message file.
- */
-public class SystemMessageFile implements ErrorHandler
-{
-
-
- private static final LinkedList msgfList=new LinkedList();
- private MessageFileInfo msgFile;
- private String defaultMsgFileLocation;
- private InputStream dtdInputStream;
- // the following is an attempt to improve response time, and reduce memory requirements, by
- // caching SystemMessage objects for previously issued messages. Phil
- private Hashtable messages = new Hashtable();
- // XML TAG AND ELEMENT NAMES...
- private static final String XML_TAG_COMPONENT = "Component";
- private static final String XML_TAG_SUBCOMPONENT = "Subcomponent";
- private static final String XML_TAG_MESSAGeList = "MessageList";
- private static final String XML_TAG_MESSAGE = "Message";
- private static final String XML_TAG_LEVELONE = "LevelOne";
- private static final String XML_TAG_LEVELTWO = "LevelTwo";
- private static final String XML_ATTR_ABBR = "Abbr";
- private static final String XML_ATTR_ID = "ID";
- private static final String XML_ATTR_INDICATOR = "Indicator";
- private static final String XML_ATTR_NAME = "Name";
-
-
-
- /**
- * Inner class
- */
- private class MessageFileInfo
- {
- private String filename=null;
- private String shortName=null;
- private Document xmlDocument=null;
-
- public MessageFileInfo(String ucFileName, String lcFileName, Document doc)
- {
- filename=ucFileName;
- int idx=lcFileName.lastIndexOf('\\');
- if (idx == -1)
- idx = lcFileName.lastIndexOf('/');
- if (idx >= 0)
- shortName = lcFileName.substring(idx+1);
- else
- shortName = lcFileName;
- xmlDocument=doc;
- }
-
- public String getMessageFullFileName()
- {
- return filename;
- }
- public String getMessageShortFileName()
- {
- return shortName;
- }
-
- public Document getXMLDocument()
- {
- return xmlDocument;
- }
- }
-
- /**
- * Constructor
- * @param messageFileName - a key used to determine if a message file has already been loaded.
- * Usually the name of the xml file containing the message file.
- * @param messageFile the stream containing the message file.
- * @param dtdStream the stream containing the dtd for this message file.
- */
- public SystemMessageFile (String messageFileName, InputStream messageFile, InputStream dtdStream)
- {
- // have we already loaded this message file?
- msgFile = getFromCache(messageFileName);
-
- // now, we haven't. Load it now.
- this.dtdInputStream = dtdStream;
- if (msgFile == null)
- {
- Document doc = loadAndParseXMLFile(messageFile);
- msgFile=new MessageFileInfo(messageFileName.toUpperCase(), messageFileName, doc);
- msgfList.add(msgFile);
- //scanForDuplicates(); // don't keep this for production. Too expensive
- }
- }
-
- /**
- * If the named message file has already been loaded return its
- * MessageFileInfo
- * @param messageFileName
- * @return the MessageFileInfo for this message file
- */
- protected MessageFileInfo getFromCache(String messageFileName)
- {
- for (int i=0; i<msgfList.size(); i++)
- {
- MessageFileInfo msgf=(MessageFileInfo)msgfList.get(i);
- if (msgf.getMessageFullFileName().equals(messageFileName.toUpperCase()))
- {
- return msgf;
- }
- }
- return null;
- }
-
-
- /**
- * Use this method to retrieve a message from the message file.
- * @param msgId - the ID of the message to retrieve. This is the concatenation of the
- * message's component abbreviation, subcomponent abbreviation, and message ID as declared
- * in the message xml file.
- * @return SystemMessage object
- */
- public SystemMessage getMessage(String msgId)
- {
- boolean echoErrorsToStandardOut = true;
- // DY Defect 42605
- if (msgFile.getXMLDocument() == null)
- {
- issueErrorMessage("No XML document for message file", echoErrorsToStandardOut);
- return null;
- }
-
- // caching added by Phil to increase performance, and not to leave a trail of SystemMessage objects for
- // the garbage collector. Hopefully, the extra memory for the cache does not defeat these benefits.
- SystemMessage msg = (SystemMessage)messages.get(msgFile.getMessageShortFileName()+":"+msgId);
- if (msg != null)
- {
- //System.out.println("Reusing msg " + msgId);
- return msg;
- }
-
- // I guess the following line of code implies we only support a single component per message file... phil.
- // Code tweaked by Phil.
- //String componentAbbr=msgFile.getXMLDocument().getElementsByTagName("Component").item(0).getAttributes().getNamedItem("Abbr").getFirstChild().getNodeValue();
- //NodeList subComponentList=msgFile.getXMLDocument().getElementsByTagName("Subcomponent");
-
- // parse out the Abbr attr of the first Component element
- NodeList componentElementList = msgFile.getXMLDocument().getElementsByTagName(XML_TAG_COMPONENT);
- if ((componentElementList == null) || (componentElementList.getLength() == 0))
- {
- issueErrorMessage("Unable to find any Component elements",echoErrorsToStandardOut);
- return null;
- }
-
- Element componentElement = (Element)componentElementList.item(0);
- String componentAbbr = componentElement.getAttribute(XML_ATTR_ABBR);
-
- // get list of all Subcomponent elements...
- NodeList subComponentList=msgFile.getXMLDocument().getElementsByTagName(XML_TAG_SUBCOMPONENT);
-
- if ((subComponentList == null) || (subComponentList.getLength() == 0))
- {
- issueErrorMessage("Unable to find any Subcomponent elements",echoErrorsToStandardOut);
- return null;
- }
-
- // fold given msg ID to uppercase
- msgId = msgId.toUpperCase();
-
- // search for the right component/subcomponent match
- for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++)
- {
- //String subComponentAbbr=subComponentList.item(subComponentIdx).getAttributes().getNamedItem("Abbr").getFirstChild().getNodeValue();
- Element subComponentElement = (Element)subComponentList.item(subComponentIdx);
- String subComponentAbbr = subComponentElement.getAttribute(XML_ATTR_ABBR);
- //String msgPrefix=componentAbbr+subComponentAbbr;
- String msgPrefix = (componentAbbr + subComponentAbbr).toUpperCase();
- char msgIndicator=' ';
- String msgL1="";
- String msgL2="";
-
- // if the message prefix matches, then try to find the message
- //if (msgPrefix.toUpperCase().equals(msgId.toUpperCase().substring(0,msgPrefix.length())) &&
- //if (msgPrefix.equals(msgId.substring(0,msgPrefix.length())) &&
- if (msgId.startsWith(msgPrefix) &&
- Character.isDigit(msgId.charAt(msgPrefix.length())))
- {
- //String msgNumber=msgId.toUpperCase().substring(msgPrefix.length());
- String msgNumber=msgId.substring(msgPrefix.length());
- Element messageListNode=null;
-
- // search for the message list node
- /*
- for (Node node=subComponentList.item(subComponentIdx).getFirstChild();
- node!=null; node=node.getNextSibling())
- {
- if (node.getNodeName().equals("MessageList"))
- {
- messageListNode=node;
- break;
- }
- }*/
- NodeList msgListNodes = subComponentElement.getElementsByTagName(XML_TAG_MESSAGeList);
- if ((msgListNodes!=null) && (msgListNodes.getLength()>0))
- messageListNode = (Element)msgListNodes.item(0);
- else
- {
- issueWarningMessage("unable to find MessageList nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut);
- continue;
- }
-
- // search for the message node which has the right number
- //for (Node node=messageListNode.getFirstChild();
- // node!=null; node=node.getNextSibling())
- NodeList msgNodes = messageListNode.getElementsByTagName(XML_TAG_MESSAGE);
- if ((msgNodes==null) || (msgNodes.getLength()==0))
- {
- issueWarningMessage("unable to find Message nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut);
- continue;
- }
- boolean match = false; // I added this so we stop looping when we find what we are looking for!!! Phil.
- for (int msgIdx = 0; !match && (msgIdx < msgNodes.getLength()); msgIdx++)
- {
- Element node = (Element)msgNodes.item(msgIdx);
- // if the message number matches...
- //if (node.getNodeName().equals("Message") && node.getAttributes().getNamedItem("ID").getFirstChild().getNodeValue().toUpperCase().equals(msgNumber))
- if (node.getAttribute(XML_ATTR_ID).equals(msgNumber))
- {
- match = true;
- // save the indicator value
- //msgIndicator=(node.getAttributes().getNamedItem("Indicator").getFirstChild().getNodeValue().toUpperCase().toCharArray())[0];
- msgIndicator=node.getAttribute(XML_ATTR_INDICATOR).toUpperCase().charAt(0);
- // search for the l1 & l2 text
- for (Node msgNode=node.getFirstChild();
- msgNode!=null; msgNode=msgNode.getNextSibling())
- {
- // get Level One text
- if (msgNode.getNodeName().equals(XML_TAG_LEVELONE))
- msgL1 = getNodeText(msgNode);
- // get Level Two text
- else if (msgNode.getNodeName().equals(XML_TAG_LEVELTWO))
- msgL2 = getNodeText(msgNode);
- }
- break;
- }
- }
- if (!match)
- {
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- SystemBasePlugin.logError("Requested Message " + msgId + " not found in message file " + msgFile.getMessageShortFileName());
- */
- return null;
- }
- try
- {
- msg = loadSystemMessage(componentAbbr, subComponentAbbr, msgNumber, msgIndicator, msgL1, msgL2);
- messages.put(msgFile.getMessageShortFileName()+":"+msgId, msg); // add to cache so we find it immediately next time!!
- return msg;
- }
- catch (IndicatorException e)
- {
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- SystemBasePlugin.logError("MessageFile:getMessage: "+e.toString(), e);
- */
- }
- break;
- }
- }
- return null;
- }
-
- /**
- * Override this to provide different extended SystemMessage implementation
- * @param componentAbbr a three letter component name
- * @param subComponentAbbr a one letter subcomponent name
- * @param msgNumber a four digit message number
- * @param msgIndicator a single character message type indicator
- * @param msgL1 the first level text that describes the error
- * @param msgL2 the second level text that provides details about the error and possible recovery
- * @return the SystemMessage
- * @throws IndicatorException if the message type indicator is invalid.
- * @see SystemMessage for message type indicator constants
- */
- protected SystemMessage loadSystemMessage(String componentAbbr, String subComponentAbbr, String msgNumber, char msgIndicator,
- String msgL1, String msgL2) throws IndicatorException
- {
- return new SystemMessage(componentAbbr, subComponentAbbr, msgNumber, msgIndicator, msgL1, msgL2);
- }
-
- /**
- * Get the level one text
- */
- private String getNodeText(Node msgNode)
- {
- String nodeText = "";
- for (Node textNode=msgNode.getFirstChild();
- textNode!=null; textNode=textNode.getNextSibling())
- {
- if ((textNode.getNodeType()==Node.TEXT_NODE) && (textNode.getNodeValue().trim().length()>0))
- nodeText += textNode.getNodeValue();
- }
- return nodeText.trim();
- }
-
- /**
- * Use this method to scan message file for duplicate messages. You typically do this only during development!!
- * If a duplicate is found, its message id is written to standard out, and to the systems.core
- * log file.
- * @return true if duplicates found.
- */
- public boolean scanForDuplicates()
- {
- boolean echoErrorsToStandardOut = true;
- if (msgFile.getXMLDocument() == null)
- return issueErrorMessage("No XML document for message file", echoErrorsToStandardOut);
-
- // parse out the Abbr attr of the first Component element
- NodeList componentElementList = msgFile.getXMLDocument().getElementsByTagName(XML_TAG_COMPONENT);
- if ((componentElementList == null) || (componentElementList.getLength() == 0))
- return issueErrorMessage("Unable to find any Component elements",echoErrorsToStandardOut);
-
- Element componentElement = (Element)componentElementList.item(0);
- String componentAbbr = componentElement.getAttribute(XML_ATTR_ABBR);
-
- // get list of all Subcomponent elements...
- NodeList subComponentList=msgFile.getXMLDocument().getElementsByTagName(XML_TAG_SUBCOMPONENT);
-
- if ((subComponentList == null) || (subComponentList.getLength() == 0))
- return issueErrorMessage("Unable to find any Subcomponent elements",echoErrorsToStandardOut);
-
- // scan all subcomponents...
- boolean anyDupes = false;
- for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++)
- {
- Element subComponentElement = (Element)subComponentList.item(subComponentIdx);
- String subComponentAbbr = subComponentElement.getAttribute(XML_ATTR_ABBR);
- String msgPrefix = (componentAbbr + subComponentAbbr).toUpperCase();
- Vector msgsById = new Vector();
-
- // search for the message list node
- Element messageListNode=null;
- NodeList msgListNodes = subComponentElement.getElementsByTagName(XML_TAG_MESSAGeList);
- if ((msgListNodes!=null) && (msgListNodes.getLength()>0))
- messageListNode = (Element)msgListNodes.item(0);
- else
- {
- issueWarningMessage("unable to find MessageList nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut);
- continue;
- }
-
- NodeList msgNodes = messageListNode.getElementsByTagName(XML_TAG_MESSAGE);
- if ((msgNodes==null) || (msgNodes.getLength()==0))
- {
- issueWarningMessage("unable to find Message nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut);
- continue;
- }
- for (int msgIdx = 0; (msgIdx < msgNodes.getLength()); msgIdx++)
- {
- Element node = (Element)msgNodes.item(msgIdx);
- String msgId = msgPrefix + node.getAttribute(XML_ATTR_ID);
- if (msgsById.contains(msgId))
- {
- anyDupes = true;
- issueWarningMessage("Warning: duplicate message " + msgId + " found", echoErrorsToStandardOut);
- }
- else
- msgsById.addElement(msgId);
- }
- }
- return anyDupes;
- }
-
- /**
- * Use this method to generate html documentation for the messages in the message file.
- * This is useful for reference information, or to give to Level 2 for service support.
- * @param fullFileName - the fully qualified name of the file to write to. Overwrites current contents.
- * @return true if it went well, false if it failed for some reason, such as given a bad file name. Errors written to standard out.
- */
- public boolean printHTML(String fullFileName)
- {
- boolean echoErrorsToStandardOut = true;
- if (msgFile.getXMLDocument() == null)
- return issueErrorMessage("No XML document for message file", echoErrorsToStandardOut);
-
- // parse out the Abbr attr of the first Component element
- NodeList componentElementList = msgFile.getXMLDocument().getElementsByTagName(XML_TAG_COMPONENT);
- if ((componentElementList == null) || (componentElementList.getLength() == 0))
- return issueErrorMessage("Unable to find any Component elements",echoErrorsToStandardOut);
-
- Element componentElement = (Element)componentElementList.item(0);
- String componentAbbr = componentElement.getAttribute(XML_ATTR_ABBR);
-
- // get list of all Subcomponent elements...
- NodeList subComponentList=msgFile.getXMLDocument().getElementsByTagName(XML_TAG_SUBCOMPONENT);
-
- if ((subComponentList == null) || (subComponentList.getLength() == 0))
- return issueErrorMessage("Unable to find any Subcomponent elements",echoErrorsToStandardOut);
-
- File outFile = new File(fullFileName);
- PrintWriter outFileStream = null;
- try
- {
- outFileStream = new PrintWriter(new FileOutputStream(outFile));
- outFileStream.println("<HTML> <HEAD> <TITLE> Message File "+msgFile.getMessageShortFileName()+" </TITLE>");
- outFileStream.println("<style type=\"text/css\">");
- outFileStream.println("h2 { background-color: #CCCCFF }");
- outFileStream.println("</style>");
- outFileStream.println("</HEAD> <BODY>");
- outFileStream.println("<H1>"+componentElement.getAttribute(XML_ATTR_NAME)+" Messages</H1>");
- outFileStream.println("<br>");
- outFileStream.println("<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\">");
- outFileStream.println("<TR BGCOLOR=\"#CCCCFF\">");
- outFileStream.println("<TD COLSPAN=2><FONT SIZE=\"+2\">");
- outFileStream.println("<B>Sub-Component Summary</B></FONT></TD>");
- outFileStream.println("</TR>");
- }
- catch (IOException exc)
- {
- return issueErrorMessage("Unable to open given html file in printHTML: " + exc.getMessage(), echoErrorsToStandardOut);
- }
-
- // pre-scan all subcomponents...
- for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++)
- {
- Element subComponentElement = (Element)subComponentList.item(subComponentIdx);
- String subComponentAbbr = subComponentElement.getAttribute(XML_ATTR_ABBR);
- String msgPrefix = (componentAbbr + subComponentAbbr).toUpperCase();
- String scName = subComponentElement.getAttribute(XML_ATTR_NAME);
-
- outFileStream.println("<TR BGCOLOR=\"white\">");
- outFileStream.println("<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\">");
- outFileStream.println("<A href=#"+scName+">"+scName+"</A></TD>");
- outFileStream.println("<TD><b>Message prefix</b>="+msgPrefix+"</TD></TR>");
- }
- outFileStream.println("</TABLE>");
-
- // scan all subcomponents...
- for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++)
- {
- Element subComponentElement = (Element)subComponentList.item(subComponentIdx);
- String subComponentAbbr = subComponentElement.getAttribute(XML_ATTR_ABBR);
- String msgPrefix = (componentAbbr + subComponentAbbr).toUpperCase();
-
- // search for the message list node
- Element messageListNode=null;
- NodeList msgListNodes = subComponentElement.getElementsByTagName(XML_TAG_MESSAGeList);
- if ((msgListNodes!=null) && (msgListNodes.getLength()>0))
- messageListNode = (Element)msgListNodes.item(0);
- else
- {
- issueWarningMessage("unable to find MessageList nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut);
- continue;
- }
-
- NodeList msgNodes = messageListNode.getElementsByTagName(XML_TAG_MESSAGE);
- if ((msgNodes==null) || (msgNodes.getLength()==0))
- {
- issueWarningMessage("unable to find Message nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut);
- continue;
- }
- if (subComponentIdx > 0)
- outFileStream.println("<hr>");
- String scName = subComponentElement.getAttribute(XML_ATTR_NAME);
- outFileStream.println("<A NAME=\""+scName+"\"><!-- --></A><H2>"+scName+" Messages</H2>");
- for (int msgIdx = 0; (msgIdx < msgNodes.getLength()); msgIdx++)
- {
- Element node = (Element)msgNodes.item(msgIdx);
- String msgId = msgPrefix + node.getAttribute(XML_ATTR_ID);
- char msgIndicator=node.getAttribute(XML_ATTR_INDICATOR).toUpperCase().charAt(0);
- String msgSeverity = "Unknown";
- if (msgIndicator == SystemMessage.ERROR)
- msgSeverity = "Error";
- else if (msgIndicator == SystemMessage.WARNING)
- msgSeverity = "Warning";
- else if (msgIndicator == SystemMessage.INQUIRY)
- msgSeverity = "Question";
- else if (msgIndicator == SystemMessage.INFORMATION)
- msgSeverity = "Information";
- else if (msgIndicator == SystemMessage.COMPLETION)
- msgSeverity = "Completion";
- else if (msgIndicator == SystemMessage.UNEXPECTED)
- msgSeverity = "Unexpected";
-
- String msgL1 = "";
- String msgL2 = "";
- // search for the l1 & l2 text
- for (Node msgNode=node.getFirstChild();
- msgNode!=null; msgNode=msgNode.getNextSibling())
- {
- // get Level One text
- if (msgNode.getNodeName().equals(XML_TAG_LEVELONE))
- msgL1 = getNodeText(msgNode);
- // get Level Two text
- else if (msgNode.getNodeName().equals(XML_TAG_LEVELTWO))
- msgL2 = getNodeText(msgNode);
- }
- outFileStream.println("<H3>"+msgId+"</H3>");
- outFileStream.println("<b>Severity: </b>"+msgSeverity+"<br>");
- outFileStream.println("<b>LevelOne: </b>"+msgL1+"<br>");
- outFileStream.println("<b>LevelTwo: </b>"+msgL2+"<br>");
- }
- outFileStream.println("<br>");
- }
- outFileStream.println("</BODY></HTML>");
- outFileStream.close();
- return true;
- }
-
- /**
- * Issue an error message
- */
- private boolean issueErrorMessage(String errormsg, boolean echoStandardOut)
- {
-
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- *
- SystemBasePlugin.logError("MessageFile error for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg);
- **/
- if (echoStandardOut)
- System.out.println("MessageFile error for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg);
- return false;
- }
- /**
- * Issue a warning message
- */
- private boolean issueWarningMessage(String errormsg, boolean echoStandardOut)
- {
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- SystemBasePlugin.logError("MessageFile warning for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg);
- */
- if (echoStandardOut)
- System.out.println("MessageFile warning for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg);
- return false;
- }
-
- /**
- * Create the XML parser
- * Set its entity resolver and error handler.
- * @return DocumentBuilder
- */
- private DocumentBuilder createXmlParser()
- {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(true);
- DocumentBuilder parser;
- try {
- parser = factory.newDocumentBuilder();
- } catch (ParserConfigurationException e) {
- // the configuration was not valid
- /** TODO -move this elsewhere - can't depend on ui stuff
- SystemBasePlugin.logError("SystemMessageFile: loadAndParseXMLFile, configuration not valid "+e.toString(), e);
- */
- return null;
- }
-// DOMParser parser=new DOMParser();
-// try
-// {
-// parser.setFeature( "http://xml.org/sax/features/validation", true);
-// }
-// catch (SAXNotRecognizedException e)
-// {
-// // the feature was not recognized
-// /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
-// SystemBasePlugin.logError("SystemMessageFile: loadAndParseXMLFile, feature not recognized "+e.toString(), e);
-// */
-// return null;
-// }
-// catch (SAXNotSupportedException e)
-// {
-// // the feature requested was not supported
-// /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
-// SystemBasePlugin.logError("SystemMessageFile: loadAndParseXMLFile, feature not recognized "+e.toString(), e);
-// */
-// return null;
-// }
- parser.setEntityResolver(new EntityResolver() {
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, java.io.IOException
- {
- /*
- // This code does not work with fragments
- Path path = new Path(systemId);
- if (systemId.toUpperCase().endsWith("MESSAGEFILE.DTD"))
- {
- if (SystemPlugin.getBaseDefault().getDescriptor().find(path)==null)
- {
- path = new Path("messageFile.dtd");
- }
- }
- return new InputSource(SystemBasePlugin.getBaseDefault().getDescriptor().find(path).toString());
- */
- // If we have the input stream of the DTD just use it
- if (dtdInputStream != null)
- {
- return new InputSource(dtdInputStream);
- }
- else // if we have the directory containing the DTD use that
- {
- // yantzi:artemis6.2 changed to use URI instead of URL (URIs handle the spaces)
- //URL url = new URL(systemId);
- //File dtdFile = new File(url.getFile());
- try
- {
- URI url = new URI(systemId);
- File dtdFile = new File(url.getPath());
- if (!dtdFile.exists())
- {
- // use default locaiton
- systemId = defaultMsgFileLocation + File.separatorChar + dtdFile.getName();
- }
- }
- catch (URISyntaxException e)
- {
- // ignore and continue
- }
-
- return new InputSource(systemId);
- }
- }
- });
- parser.setErrorHandler(this);
- return parser;
- }
- /**
- * loadAndParseXMLFile:
- * tries to load and parse the specified XML file .
- * @param String messageFile: InputStream containing the XML file
- */
- private Document loadAndParseXMLFile (InputStream messageFile)
- {
- DocumentBuilder parser = createXmlParser();
- try
- {
- InputSource in = new InputSource(messageFile);
-
- // DKM - hack!
- // If systemId is null for the InputSource, then
- // the current parser hits a fatal exception.
- // This hack prevents that exception so that the
- // specified EntityResolver will get used.
- in.setSystemId("foo");
- Document document = parser.parse(in);
-
- //Document document = parser.parse(messageFile);
- return document;
- }
- catch (SAXException e)
- {
- e.printStackTrace();
- // the parser was unable to parse the file.
- return null;
- }
- catch (IOException e)
- {
- e.printStackTrace();
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- */
- return null;
- }
- }
-
- /**
- * XML Parser-required method: XML-parser warning.
- */
- public void warning(SAXParseException ex)
- {
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- SystemBasePlugin.logError("SystemMessageFile: warning parsing message file: "+ex.toString());
- */
- }
-
- /**
- * XML Parser-required method: XML-parser Error.
- */
- public void error(SAXParseException ex)
- {
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- SystemBasePlugin.logError("SystemMessageFile: Error parsing message file: "+ex.toString(), ex);
- Shell shell = SystemPlugin.getActiveWorkbenchShell();
- if (shell.isEnabled() && !shell.isDisposed())
- {
- MessageBox mb = new MessageBox(shell);
- mb.setText("Error loading message file: "+ex.getMessage());
- mb.setMessage("Unable to load message file " + currMsgFile +". Error at line "+ex.getLineNumber()+" and column "+ex.getColumnNumber());
- mb.open();
- }
- */
- }
-
- /**
- * XML Parser-required method: XML-parser Fatal error.
- */
- public void fatalError(SAXParseException ex) throws SAXException
- {
- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent
- SystemBasePlugin.logError("SystemMessageFile: Fatal Error parsing message file: "+ex.toString(), ex);
- */
- throw(ex);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/HostProcessFilterImpl.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/HostProcessFilterImpl.java
deleted file mode 100644
index 01da45855..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/HostProcessFilterImpl.java
+++ /dev/null
@@ -1,476 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.services.clientserver.processes;
-
-
-import java.util.HashMap;
-import java.util.StringTokenizer;
-
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-
-/**
- * A class representing a remote process filter string. This is a name pattern
- * for returning lists of remote processes when used as input to the
- * UniversalProcessMiner class.
- *
- * Valid generic names are names with one or two asterisks
- * anywhere in the name, as in:
- * <sl>
- * <code>ABC*</code> or <code>*ABC</code> or <code>A*C</code>
- * <code>*ABC*</code> or <code>*A*C</code> or <code>A*C*</code>
- * </sl>
- *
- * To get the actual filter string back from objects of this class, just call {@link #toString()}.
- *
- */
-public class HostProcessFilterImpl implements IHostProcessFilter, Cloneable, ISystemProcessRemoteConstants
-{
-
- public static final String ALL = "*";
-
- protected static final char WILDCARD = '*';
-
- protected String name, username, gid, ppid, pid;
- protected long minVM, maxVM;
- protected boolean anystatus;
- protected String status;
- protected HashMap states;
- protected boolean _resolveVariables;
-
- /**
- * Constructor to use when there is no existing filter string.
- */
- public HostProcessFilterImpl()
- {
- _resolveVariables = false;
- init();
- }
-
- /**
- * Constructor to use when there is no existing filter string.
- */
- public HostProcessFilterImpl(boolean resolveVariables)
- {
- _resolveVariables = resolveVariables;
- init();
- }
-
- protected void initStates()
- {
- states = new HashMap();
- for (int i = 0; i < ALL_STATES_STR.length; i++)
- {
- states.put(ALL_STATES_STR[i], new Boolean(false));
- }
- }
-
- /**
- * Constructor to use when filter string already exists.
- */
- public HostProcessFilterImpl(String input)
- {
- _resolveVariables = false;
- initInput(input);
- }
-
- /**
- * Constructor to use when filter string already exists.
- */
- public HostProcessFilterImpl(String input, boolean resolveVariables)
- {
- _resolveVariables = resolveVariables;
- initInput(input);
- }
-
- protected void init()
- {
- name = ALL;
- username = ALL;
- gid = ALL;
- ppid = ALL;
- pid = ALL;
- minVM = 0;
- maxVM = -1;
- anystatus = true;
- initStates();
- status = "";
- }
-
- protected void initInput(String input)
- {
- anystatus = true;
- StringTokenizer tz = new StringTokenizer(input, "|");
- String strMinVM = "0";
- String strMaxVM = "-1";
-
- if (tz.hasMoreTokens())
- {
- name = tz.nextToken();
-
- if (tz.hasMoreTokens())
- {
- username = tz.nextToken();
-
- if (tz.hasMoreTokens())
- {
- gid = tz.nextToken();
- if (tz.hasMoreTokens())
- {
- status = tz.nextToken().trim();
- if (tz.hasMoreTokens())
- {
- ppid = tz.nextToken();
- if (tz.hasMoreTokens())
- {
- pid = tz.nextToken();
- if (tz.hasMoreTokens())
- {
- strMinVM = tz.nextToken();
- if (tz.hasMoreTokens())
- {
- strMaxVM = tz.nextToken();
- }
- }
- }
- }
- }
- }
- }
- }
-
- if (!(status == null))
- {
- if (!status.equals(""))
- {
- String[] allStates = status.split(",");
- if (!(allStates == null))
- {
- initStates();
- anystatus = false;
- for (int i = 0; i < allStates.length; i++)
- {
- states.put(allStates[i], new Boolean(true));
- }
- }
- }
- }
-
- if (name == null || name.equals(""))
- name = ALL;
-
- if (username == null || username.equals(""))
- username = ALL;
-
- if (gid == null || gid.equals(""))
- gid = ALL;
-
- if (ppid == null || ppid.equals(""))
- ppid = ALL;
-
- if (pid == null || pid.equals(""))
- pid = ALL;
- try
- {
- minVM = Long.parseLong(strMinVM);
- }
- catch (Exception e)
- {
- minVM = 0;
- }
- try
- {
- maxVM = Long.parseLong(strMaxVM);
- }
- catch (Exception e)
- {
- maxVM = -1;
- }
- if (minVM < 0)
- {
- minVM = 0;
- }
- if (maxVM < 0)
- {
- maxVM = -1;
- }
- }
-
- public HashMap getStates()
- {
- return states;
- }
-
- /**
- * Return the process name part of this filter string.
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Return the username part of this filter string.
- */
- public String getUsername()
- {
- if (_resolveVariables && username.equals("${user.id}"))
- {
- return ALL;
- }
- else return username;
- }
-
- /**
- * Return the process group id (gid) part of this filter string.
- */
- public String getGid()
- {
- return gid;
- }
-
- /**
- * Return the process parent id (ppid) part of this filter string.
- */
- public String getPpid()
- {
- return ppid;
- }
-
- /**
- * Return the process id (pid) part of this filter string.
- */
- public String getPid()
- {
- return pid;
- }
-
- /**
- * Returns true when all process states are selected. The individal state
- * queries will return false in this case.
- */
- public boolean getAnyStatus()
- {
- return anystatus;
- }
-
- /**
- * Returns the minimum VM size for processes allowed by this filter
- */
- public String getMinVM()
- {
- return "" + minVM;
- }
-
- /**
- * Returns the maximum VM size for processes allowed by this filter
- */
- public String getMaxVM()
- {
- return "" + maxVM;
- }
-
-
- /**
- * Set the name part of this filter string. This can be simple or
- * generic, where generic is a name containing one or two asterisks
- * anywhere in the name.
- */
- public void setName(String obj)
- {
- name = obj;
- }
-
- /**
- * Set the user id (uid) part of this filter string. This can be simple or
- * generic, where generic is a uid containing one or two asterisks anywhere
- * in the name.
- */
- public void setUsername(String obj)
- {
- username = obj;
- }
-
- /**
- * Set the process group id (gid) part of this filter string.
- */
- public void setGid(String obj)
- {
- gid = obj;
- }
-
- /**
- * Set the process parent id part of this filter string.
- */
- public void setPpid(String obj)
- {
- ppid = obj;
- }
-
- /**
- * Set the process id part of this filter string.
- */
- public void setPid(String obj)
- {
- pid = obj;
- }
-
- /**
- * Select all/any process states
- */
- public void setAnyStatus()
- {
- anystatus = true;
- initStates();
- }
-
- /**
- * Sets the minimum VM size for processes allowed by this filter
- */
- public void setMinVM(String strMinVM)
- {
- try
- {
- minVM = Long.parseLong(strMinVM);
- }
- catch (Exception e)
- {
- minVM = 0;
- }
- }
-
- /**
- * Sets the maximum VM size for processes allowed by this filter
- */
- public void setMaxVM(String strMaxVM)
- {
- try
- {
- maxVM = Long.parseLong(strMaxVM);
- }
- catch (Exception e)
- {
- maxVM = 0;
- }
- }
-
- /**
- * Convert this filter into a filter string.
- */
- public String toString()
- {
- return name + "|" + username + "|" + gid + "|" + toStateString() + "|" + ppid + "|" + pid + "|" + minVM + "|" + maxVM;
- }
-
- protected String toStateString()
- {
- String s = " ";
-
- if (!anystatus)
- {
- for (int i = 0; i < ALL_STATES_STR.length; i++)
- {
- Boolean currentState = (Boolean) states.get(ALL_STATES_STR[i]);
- if (currentState.booleanValue()) s = s + ALL_STATES_STR[i];
- if (currentState.booleanValue()) s = s + ",";
- }
- if (!s.trim().equals("")) s = s.trim();
- if (s.endsWith(",")) s = s.substring(0, s.length() - 1);
- }
- return s;
- }
-
- /**
- * Returns whether this filter allows a process with the status line
- * <code>status</code> to pass through. The status line contains some of the contents of
- * the <i>status</i> file contained in the processes numbered directory in
- * the /proc filesystem. For example, the status line of process 12345 is
- * the contents of the file <i>/proc/12345/stat</i>.
- * The status line must be structured as follows:
- * "pid|name|status|tgid|ppid|tracerpid|uid|username|gid|vmSize|vmRSS"
- */
- public boolean allows(String status)
- {
- NamePatternMatcher matcher = null;
- String[] tokens = status.split("\\|");
- if (tokens.length < (PROCESS_ATTRIBUTES_COUNT -1)) return false;
-
- matcher = new NamePatternMatcher(gid, true, false);
- if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_GID])) return false;
-
- matcher = new NamePatternMatcher(name, true, false);
- if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_EXENAME])) return false;
-
- String state = tokens[PROCESS_ATTRIBUTES_INDEX_STATUS].trim();
- if (!satisfiesState(state)) return false;
-
- if (getUsername().equals("${user.id}"))
- matcher = new NamePatternMatcher(ALL, true, false);
- else
- matcher = new NamePatternMatcher(getUsername(), true, false);
- if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_USERNAME])) return false;
- matcher = new NamePatternMatcher(ppid, true, false);
- if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_PPID])) return false;
- matcher = new NamePatternMatcher(pid, true, false);
- if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_PID])) return false;
- long vmSize = 0;
- try
- {
- vmSize = Long.parseLong(tokens[PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
- }
- catch (Exception e)
- {
- if (tokens[PROCESS_ATTRIBUTES_INDEX_VMSIZE].trim().equals("")) vmSize = 0;
- else return false;
- }
- if (!(vmSize >= minVM)) return false;
- if (maxVM > -1 && !(vmSize <= maxVM)) return false;
-
- return true;
- }
-
- public boolean getSpecificState(String stateCode)
- {
- Boolean state = (Boolean) states.get(stateCode);
- if (state == null) return false;
- return state.booleanValue();
- }
-
- public void setSpecificState(String stateCode)
- {
- anystatus = false;
- states.put(stateCode, new Boolean(true));
- }
-
- public boolean satisfiesState(String state)
- {
- if (!anystatus)
- {
- String[] allStates = state.split(",");
- if (allStates == null) return false;
- if (allStates.length == 0) return false;
- boolean satisfied = false;
- for (int i = 0; i < allStates.length; i++)
- {
- String nextState = allStates[i];
- satisfied = getSpecificState(nextState);
- if (satisfied) break;
- }
- if (!satisfied) return false;
- }
- return true;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcess.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcess.java
deleted file mode 100644
index 00cac6237..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcess.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.services.clientserver.processes;
-
-/**
- *
- * @author mjberger
- *
- * This interface represents a simple abstract process on a host
- * system.
- */
-public interface IHostProcess
-{
-
-
- /**
- * Get the process id (pid) associated with this process.
- */
- public long getPid();
-
- /**
- * Get the parent process id (ppid) associated with this process.
- */
- public long getPPid();
-
- /**
- * Get the name of the executable owning this process
- */
- public String getName();
-
- /**
- * Get the state of the process
- */
- public String getState();
-
- /**
- * Get the Tgid
- */
- public long getTgid();
-
- /**
- * Get the TracerPid
- */
- public long getTracerPid();
-
- /**
- * Get the process owner's user id (uid)
- */
- public long getUid();
-
- /**
- * Get the process owner's username
- */
- public String getUsername();
-
- /**
- * Get the process owner's group id (gid)
- */
- public long getGid();
-
- /**
- * Returns whether this is the root process or not
- */
- public boolean isRoot();
-
- /**
- * Returns the virtual memory size of this process (in kB)
- */
- public long getVmSizeInKB();
-
- /**
- * Returns the virtual memory resident set size of this process (in kB).
- * This is the actual amount of RAM used by the process.
- */
- public long getVmRSSInKB();
-
- /**
- * Get the display name for this process.
- */
- public String getLabel();
-
- /**
- * Returns all properties of this process in the same format as given in the
- * dataelement
- */
- public String getAllProperties();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcessFilter.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcessFilter.java
deleted file mode 100644
index 7da76330f..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcessFilter.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.processes;
-
-import java.util.HashMap;
-
-public interface IHostProcessFilter
-{
- public HashMap getStates();
-
- /**
- * Return the process name part of this filter string.
- */
- public String getName();
-
- /**
- * Return the username part of this filter string.
- */
- public String getUsername();
-
- /**
- * Return the process group id (gid) part of this filter string.
- */
- public String getGid();
-
- /**
- * Return the process parent id (ppid) part of this filter string.
- */
- public String getPpid();
-
- /**
- * Return the process id (pid) part of this filter string.
- */
- public String getPid();
-
- /**
- * Returns true when all process states are selected. The individal state
- * queries will return false in this case.
- */
- public boolean getAnyStatus();
-
- /**
- * Returns the minimum VM size for processes allowed by this filter
- */
- public String getMinVM();
-
- /**
- * Returns the maximum VM size for processes allowed by this filter
- */
- public String getMaxVM();
-
- /**
- * Set the name part of this filter string. This can be simple or
- * generic, where generic is a name containing one or two asterisks
- * anywhere in the name.
- */
- public void setName(String obj);
-
- /**
- * Set the user id (uid) part of this filter string. This can be simple or
- * generic, where generic is a uid containing one or two asterisks anywhere
- * in the name.
- */
- public void setUsername(String obj);
-
- /**
- * Set the process group id (gid) part of this filter string.
- */
- public void setGid(String obj);
-
- /**
- * Set the process parent id part of this filter string.
- */
- public void setPpid(String obj);
-
- /**
- * Set the process id part of this filter string.
- */
- public void setPid(String obj);
-
- /**
- * Select all/any process states
- */
- public void setAnyStatus();
-
- /**
- * Sets the minimum VM size for processes allowed by this filter
- */
- public void setMinVM(String strMinVM);
-
- /**
- * Sets the maximum VM size for processes allowed by this filter
- */
- public void setMaxVM(String strMaxVM);
-
- /**
- * Returns whether this filter allows a process with the status line
- * <code>status</code> to pass through. The status line contains some of the contents of
- * the <i>status</i> file contained in the processes numbered directory in
- * the /proc filesystem. For example, the status line of process 12345 is
- * the contents of the file <i>/proc/12345/stat</i>.
- * The status line must be structured as follows:
- * "pid|name|status|tgid|ppid|tracerpid|uid|username|gid|vmSize|vmRSS"
- */
- public boolean allows(String status);
-
- public boolean getSpecificState(String stateCode);
-
- public void setSpecificState(String stateCode);
-
- public boolean satisfiesState(String state);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteConstants.java
deleted file mode 100644
index bbf629fe2..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteConstants.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.processes;
-
-
-public interface ISystemProcessRemoteConstants
-{
- public static final int PROCESS_ATTRIBUTES_INDEX_PID = 0;
- public static final int PROCESS_ATTRIBUTES_INDEX_EXENAME = 1;
- public static final int PROCESS_ATTRIBUTES_INDEX_STATUS = 2;
- public static final int PROCESS_ATTRIBUTES_INDEX_TGID = 3;
- public static final int PROCESS_ATTRIBUTES_INDEX_PPID = 4;
- public static final int PROCESS_ATTRIBUTES_INDEX_TRACERPID = 5;
- public static final int PROCESS_ATTRIBUTES_INDEX_UID = 6;
- public static final int PROCESS_ATTRIBUTES_INDEX_USERNAME = 7;
- public static final int PROCESS_ATTRIBUTES_INDEX_GID = 8;
- public static final int PROCESS_ATTRIBUTES_INDEX_VMSIZE = 9;
- public static final int PROCESS_ATTRIBUTES_INDEX_VMRSS = 10;
- public static final int PROCESS_ATTRIBUTES_COUNT = 11;
-
- public static final char STATE_ACTIVE = 'A';
- public static final char STATE_IDLE = 'I';
- public static final char STATE_NONEXISTENT = 'O';
- public static final char STATE_PAGING = 'W';
- public static final char STATE_RUNNING = 'R';
- public static final char STATE_SLEEPING = 'S';
- public static final char STATE_TRACED = 'T';
- public static final char STATE_WAITING = 'D';
- public static final char STATE_ZOMBIE = 'Z';
-
- public static final char STATE_ZOS_SINGLE = '1';
- public static final char STATE_ZOS_MSGQRECEIVEWAIT = 'A';
- public static final char STATE_ZOS_MSGQSENDWAIT = 'B';
- public static final char STATE_ZOS_COMSYSKERNELWAIT = 'C';
- public static final char STATE_ZOS_SEMAPHOREWAIT = 'D';
- public static final char STATE_ZOS_QUIESCEFROZEN = 'E';
- public static final char STATE_ZOS_FILESYSKERNELWAIT = 'F';
- public static final char STATE_ZOS_MVSPAUSEWAIT = 'G';
- public static final char STATE_ZOS_PTHREADCREATEDTASKS = 'H';
- public static final char STATE_ZOS_SWAPPEDOUT = 'I';
- public static final char STATE_ZOS_PTHREADCREATED = 'J';
- public static final char STATE_ZOS_OTHERKERNELWAIT = 'K';
- public static final char STATE_ZOS_CANCELLED = 'L';
- public static final char STATE_ZOS_MULTITHREAD = 'M';
- public static final char STATE_ZOS_MEDIUMWEIGHTTHREAD = 'N';
- public static final char STATE_ZOS_ASYNCHRONOUSTHREAD = 'O';
- public static final char STATE_ZOS_PTRACEKERNELWAIT = 'P';
- public static final char STATE_ZOS_RUNNING = 'R';
- public static final char STATE_ZOS_SLEEPING = 'S';
- public static final char STATE_ZOS_STOPPED = 'T';
- public static final char STATE_ZOS_INITIALPROCESSTHREAD = 'U';
- public static final char STATE_ZOS_DETACHED = 'V';
- public static final char STATE_ZOS_WAITINGFORCHILD = 'W';
- public static final char STATE_ZOS_FORKING = 'X';
- public static final char STATE_ZOS_MVSWAIT = 'Y';
- public static final char STATE_ZOS_ZOMBIE = 'Z';
-
- public static final int STATE_STARTING_INDEX = 0;
- public static final int STATE_ACTIVE_INDEX = 0;
- public static final int STATE_IDLE_INDEX = 1;
- public static final int STATE_NONEXISTENT_INDEX = 2;
- public static final int STATE_PAGING_INDEX = 3;
- public static final int STATE_RUNNING_INDEX = 4;
- public static final int STATE_SLEEPING_INDEX = 5;
- public static final int STATE_TRACED_INDEX = 6;
- public static final int STATE_WAITING_INDEX = 7;
- public static final int STATE_ZOMBIE_INDEX = 8;
- public static final int STATE_ENDING_INDEX = 9;
- public static final int STATE_ZOS_STARTING_INDEX = 9;
- public static final int STATE_ZOS_SINGLE_INDEX = 9;
- public static final int STATE_ZOS_MSGQRECEIVEWAIT_INDEX = 10;
- public static final int STATE_ZOS_MSGQSENDWAIT_INDEX = 11;
- public static final int STATE_ZOS_COMSYSKERNELWAIT_INDEX = 12;
- public static final int STATE_ZOS_SEMAPHOREWAIT_INDEX = 13;
- public static final int STATE_ZOS_QUIESCEFROZEN_INDEX = 14;
- public static final int STATE_ZOS_FILESYSKERNELWAIT_INDEX = 15;
- public static final int STATE_ZOS_MVSPAUSEWAIT_INDEX = 16;
- public static final int STATE_ZOS_PTHREADCREATEDTASKS_INDEX = 17;
- public static final int STATE_ZOS_SWAPPEDOUT_INDEX = 18;
- public static final int STATE_ZOS_PTHREADCREATED_INDEX = 19;
- public static final int STATE_ZOS_OTHERKERNELWAIT_INDEX = 20;
- public static final int STATE_ZOS_CANCELLED_INDEX = 21;
- public static final int STATE_ZOS_MULTITHREAD_INDEX = 22;
- public static final int STATE_ZOS_MEDIUMWEIGHTTHREAD_INDEX = 23;
- public static final int STATE_ZOS_ASYNCHRONOUSTHREAD_INDEX = 24;
- public static final int STATE_ZOS_PTRACEKERNELWAIT_INDEX = 25;
- public static final int STATE_ZOS_RUNNING_INDEX = 26;
- public static final int STATE_ZOS_SLEEPING_INDEX = 27;
- public static final int STATE_ZOS_STOPPED_INDEX = 28;
- public static final int STATE_ZOS_INITIALPROCESSTHREAD_INDEX = 29;
- public static final int STATE_ZOS_DETACHED_INDEX = 30;
- public static final int STATE_ZOS_WAITINGFORCHILD_INDEX = 31;
- public static final int STATE_ZOS_FORKING_INDEX = 32;
- public static final int STATE_ZOS_MVSWAIT_INDEX = 33;
- public static final int STATE_ZOS_ZOMBIE_INDEX = 34;
- public static final int STATE_ZOS_ENDING_INDEX = 35;
-
- public static final char[] ALL_STATES =
- {
- STATE_ACTIVE,
- STATE_IDLE,
- STATE_NONEXISTENT,
- STATE_PAGING,
- STATE_RUNNING,
- STATE_SLEEPING,
- STATE_TRACED,
- STATE_WAITING,
- STATE_ZOMBIE,
- STATE_ZOS_SINGLE,
- STATE_ZOS_MSGQRECEIVEWAIT,
- STATE_ZOS_MSGQSENDWAIT,
- STATE_ZOS_COMSYSKERNELWAIT,
- STATE_ZOS_SEMAPHOREWAIT,
- STATE_ZOS_QUIESCEFROZEN,
- STATE_ZOS_FILESYSKERNELWAIT,
- STATE_ZOS_MVSPAUSEWAIT,
- STATE_ZOS_PTHREADCREATEDTASKS,
- STATE_ZOS_SWAPPEDOUT,
- STATE_ZOS_PTHREADCREATED,
- STATE_ZOS_OTHERKERNELWAIT,
- STATE_ZOS_CANCELLED,
- STATE_ZOS_MULTITHREAD,
- STATE_ZOS_MEDIUMWEIGHTTHREAD,
- STATE_ZOS_ASYNCHRONOUSTHREAD,
- STATE_ZOS_PTRACEKERNELWAIT,
- STATE_ZOS_RUNNING,
- STATE_ZOS_SLEEPING,
- STATE_ZOS_STOPPED,
- STATE_ZOS_INITIALPROCESSTHREAD,
- STATE_ZOS_DETACHED,
- STATE_ZOS_WAITINGFORCHILD,
- STATE_ZOS_FORKING,
- STATE_ZOS_MVSWAIT,
- STATE_ZOS_ZOMBIE
- };
-
- public static final String[] ALL_STATES_STR =
- {
- "ASTATE_ACTIVE",
- "ISTATE_IDLE",
- "OSTATE_NONEXISTENT",
- "WSTATE_PAGING",
- "RSTATE_RUNNING",
- "SSTATE_SLEEPING",
- "TSTATE_TRACED",
- "DSTATE_WAITING",
- "ZSTATE_ZOMBIE",
- "1STATE_ZOS_SINGLE",
- "ASTATE_ZOS_MSGQRECEIVEWAIT",
- "BSTATE_ZOS_MSGQSENDWAIT",
- "CSTATE_ZOS_COMSYSKERNELWAIT",
- "DSTATE_ZOS_SEMAPHOREWAIT",
- "ESTATE_ZOS_QUIESCEFROZEN",
- "FSTATE_ZOS_FILESYSKERNELWAIT",
- "GSTATE_ZOS_MVSPAUSEWAIT",
- "HSTATE_ZOS_PTHREADCREATEDTASKS",
- "ISTATE_ZOS_SWAPPEDOUT",
- "JSTATE_ZOS_PTHREADCREATED",
- "KSTATE_ZOS_OTHERKERNELWAIT",
- "LSTATE_ZOS_CANCELLED",
- "MSTATE_ZOS_MULTITHREAD",
- "NSTATE_ZOS_MEDIUMWEIGHTTHREAD",
- "OSTATE_ZOS_ASYNCHRONOUSTHREAD",
- "PSTATE_ZOS_PTRACEKERNELWAIT",
- "RSTATE_ZOS_RUNNING",
- "SSTATE_ZOS_SLEEPING",
- "TSTATE_ZOS_STOPPED",
- "USTATE_ZOS_INITIALPROCESSTHREAD",
- "VSTATE_ZOS_DETACHED",
- "WSTATE_ZOS_WAITINGFORCHILD",
- "XSTATE_ZOS_FORKING",
- "YSTATE_ZOS_MVSWAIT",
- "ZSTATE_ZOS_ZOMBIE"
- };
-
- public static final String PROCESS_MINER_ERROR_NO_HANDLER = "No handler for this system type";
- public static final String PROCESS_MINER_SUCCESS = "SUCCESS";
-
- public static final String PROCESS_SIGNAL_TYPE_DEFAULT = "default";
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteTypes.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteTypes.java
deleted file mode 100644
index 4462e7460..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteTypes.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.services.clientserver.processes;
-
-
-/**
- * All remote object types we support.
- * These can be used when registering property pages against remote universal process system objects.
- */
-public interface ISystemProcessRemoteTypes
-{
-
- // ------------------
- // TYPE CATEGORIES...
- // ------------------
-
- /**
- * There is only one type category for remote processes.
- * It is "processes".
- */
- public static final String TYPECATEGORY = "processes";
-
- // -----------
- // TYPES...
- // -----------
-
- /**
- * A process object
- */
- public static final String TYPE_PROCESS = "process";
-
- /**
- * A root process object
- */
- public static final String TYPE_ROOT = "rootprocess";
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/IRemoteServerProcess.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/IRemoteServerProcess.java
deleted file mode 100644
index a61982fa4..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/IRemoteServerProcess.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.processes.handlers;
-
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-
-/**
- *
- * @author mjberger
- *
- * This interface represents a simple process on the remote server.
- * It is simply a data structure for the passing of information about
- * a process from the UniversalProcessMiner to the ProcessHandler
- * that actually gets all the process information. The setters all
- * take strings as input for the sake of convenience, since that is
- * how the process information is mined. However, the getters continue
- * to return the attributes as their real data types. NOTE THAT THE SETTERS
- * HERE DO NOT ACTUALLY MODIFY ANY PROPERTIES OF THE UNDERLYING PROCESS. IN
- * ORDER TO DO THIS YOU MUST SEND THE PROCESS A KILL SIGNAL THROUGH THE
- * SUBSYSTEM.
- * <p>
- */
-public interface IRemoteServerProcess extends IHostProcess
-{
- /**
- * Set the process id (pid) associated with this process.
- */
- public void setPid(String pid);
-
- /**
- * Set the parent process id (ppid) associated with this process.
- */
- public void setPPid(String ppid);
-
- /**
- * Set the name of the executable owning this process
- */
- public void setName(String name);
-
- /**
- * Set the state of the process
- */
- public void setState(String state);
-
- /**
- * Set the Tgid
- */
- public void setTgid(String tgid);
-
- /**
- * Set the TracerPid
- */
- public void setTracerPid(String tracerpid);
-
- /**
- * Set the process owner's user id (uid)
- */
- public void setUid(String uid);
-
- /**
- * Set the process owner's username
- */
- public void setUsername(String username);
-
- /**
- * Set the process owner's group id (gid)
- */
- public void setGid(String gid);
-
- /**
- * Sets all properties of this process in the same format as given in the
- * dataelement
- */
- public void setAllProperties(String allProperties);
-
- /**
- * Sets the virtual memory size of this process (in kB)
- */
- public void setVmSizeInKB(String size);
-
- /**
- * Sets the virtual memory resident set size of this process (in kB).
- * This is the actual amount of RAM used by the process.
- */
- public void setVmRSSInKB(String size);
-
- /**
- * Set the display name for this process.
- */
- public void setLabel(String label);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessComparator.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessComparator.java
deleted file mode 100644
index 2f7b36175..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessComparator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.processes.handlers;
-
-import java.util.Comparator;
-
-/**
- * Class for comparing two UniversalServerProcessImpl objects
- * @author mjberger
- *
- */
-public class ProcessComparator implements Comparator
-{
- /**
- * Compares two UniversalServerProcessImpl objects by their PID's.
- */
- public int compare(Object obj1, Object obj2)
- {
- UniversalServerProcessImpl p1 = (UniversalServerProcessImpl) obj1;
- UniversalServerProcessImpl p2 = (UniversalServerProcessImpl) obj2;
- return (int) (p1.getPid() - p2.getPid());
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandler.java
deleted file mode 100644
index 4f95bd3aa..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandler.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.services.clientserver.processes.handlers;
-
-import java.util.SortedSet;
-
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-
-/**
- * Because process mining is system-specific, this interface abstracts out
- * the work from the UniversalProcessMiner, and allows system-specific classes
- * to take care of the work individually.
- */
-public interface ProcessHandler
-{
-
- /**
- * Given a filter string, returns the results of querying all processes that match the filter.
- * The results MUST BE SORTED NUMERICALLY BY PID.
- * @return a list of the results of the query. Does not ever return null!
- * @param rpfs The filter string to which the objects will be matched.
- */
- public SortedSet lookupProcesses(IHostProcessFilter rpfs) throws Exception;
-
- /**
- * Sends a kill signal to a process.
- * @return the process after the signal is sent, or null if the process no longer exists.
- * @param process The process to which the signal will be sent
- * @param type The type of signal to send to the process, "default" for default
- */
- public IHostProcess kill(IHostProcess process, String type) throws Exception;
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java
deleted file mode 100644
index 2075d67e8..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.processes.handlers;
-
-
-
-public class ProcessHandlerManager
-{
-
- // the singleton instance
- protected static ProcessHandlerManager _instance = new ProcessHandlerManager();
-
- /**
- * @return The singleton instance of this class.
- */
- public static ProcessHandlerManager getInstance()
- {
- return _instance;
- }
-
- /**
- * Returns the ProcessHandler associated with the system type on which
- * the server is running, or null if there is no associated ProcessHandler.
- */
- public ProcessHandler getNewProcessHandler()
- {
- String osName = System.getProperty("os.name").toLowerCase();
- if (osName.startsWith("linux")) return new UniversalLinuxProcessHandler();
- else if (osName.startsWith("aix")) return new UniversalAIXProcessHandler();
- else if (osName.startsWith("z/os")) return new UniversalZOSProcessHandler();
- else if (osName.startsWith("mac os x")) return new UniversalMacOSXProcessHandler();
- else return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalAIXProcessHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalAIXProcessHandler.java
deleted file mode 100644
index 1ef039fbc..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalAIXProcessHandler.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.services.clientserver.processes.handlers;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.util.HashMap;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-
-
-public class UniversalAIXProcessHandler implements ProcessHandler, ISystemProcessRemoteConstants
-{
- private static final String[] processAttributes = {"pid","ppid","comm","uid","user","gid","vsz","s","rss"};
- private static final String firstColumnHeader = "PID";
- protected HashMap _usernamesByUid;
- protected HashMap _uidsByUserName;
- private HashMap stateMap;
-
- /**
- * Creates a new ProcessHandler for AIX platforms.
- */
- public UniversalAIXProcessHandler()
- {
- stateMap = new HashMap();
- for (int i = STATE_STARTING_INDEX; i < STATE_ENDING_INDEX; i++)
- {
- stateMap.put(new Character(ALL_STATES[i]), ALL_STATES_STR[i]);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.handlers.ProcessHandler#lookupProcesses
- */
- public SortedSet lookupProcesses(IHostProcessFilter rpfs)
- throws Exception
- {
- SortedSet results = new TreeSet(new ProcessComparator());
-
- // create the remote command with the AIX specific attributes
- String cmdLine = "/usr/sysv/bin/ps -Alf -o ";
- for (int i = 0; i < processAttributes.length; i++)
- {
- cmdLine = cmdLine + processAttributes[i];
- if ((processAttributes.length - i > 1)) cmdLine = cmdLine + ",";
- }
- // run the command and get output
- Process ps = Runtime.getRuntime().exec(cmdLine);
- InputStreamReader isr = new InputStreamReader(ps.getInputStream());
- if (isr == null) return null;
- BufferedReader reader = new BufferedReader(isr);
- if (reader == null) return null;
- String nextLine = reader.readLine();
- if (nextLine != null && nextLine.trim().startsWith(firstColumnHeader)) nextLine = reader.readLine();
- while (nextLine != null)
- {
- String statusLine = "";
- // put the details of each process into a hashmap
- HashMap psLineContents = getPSOutput(nextLine);
- if (psLineContents == null)
- {
- nextLine = reader.readLine();
- continue;
- }
-
- String pid = (String) psLineContents.get("pid");
- statusLine = pid + "|";
-
- // add the name to the status string
- String name = (String) psLineContents.get("comm");
- if (name == null) name = " ";
- statusLine = statusLine + name + "|";
-
- // add the status letter to the status string
- String state = (String) psLineContents.get("s");
- if (state == null) state = " ";
- String stateCode = convertToStateCode(state);
- statusLine = statusLine + stateCode + "|";
-
- // add the Tgid
- String tgid = (String) psLineContents.get("tgid");
- if (tgid == null) tgid = " ";
- statusLine = statusLine + tgid + "|";
-
- // add the Ppid
- String pPid = (String) psLineContents.get("ppid");
- if (pPid == null) pPid = " ";
- statusLine = statusLine + pPid + "|";
-
- // add the TracerPid
- String tracerpid = (String) psLineContents.get("tracerpid");
- if (tracerpid == null) tracerpid = " ";
- statusLine = statusLine + tracerpid + "|";
-
- String uid = (String) psLineContents.get("uid");
- if (uid == null) uid = " ";
- statusLine = statusLine + uid + "|"; // add the uid to the status string
-
- String username = (String) psLineContents.get("user");
- if (username == null) username = " ";
- statusLine = statusLine + username + "|"; // add the username to the status string
-
- // add the gid to the status string
- String gid = (String) psLineContents.get("gid");
- if (gid == null) gid = " ";
- statusLine = statusLine + gid + "|";
-
- // add the VmSize to the status string
- String vmsize = (String) psLineContents.get("vsz");
- if (vmsize == null) vmsize = " ";
- statusLine = statusLine + vmsize + "|";
-
- // add the VmRSS to the status string
- String vmrss = (String) psLineContents.get("rss");
- if (vmrss == null) vmrss = " ";
- statusLine = statusLine + vmrss;
-
- if (rpfs.allows(statusLine))
- {
- UniversalServerProcessImpl usp = new UniversalServerProcessImpl(statusLine);
- results.add(usp);
- }
- nextLine = reader.readLine();
- }
- reader.close();
- isr.close();
- if (results.size() == 0) return null;
- return results;
- }
-
- /**
- * Parses one line of output from the ps command - placing the contents into
- * a hashmap, where the keys are the names of process attributes and the values
- * are the attribute values
- * @param nextLine a line of output from the ps command
- * @return a map of names-values of process attributes
- */
- protected HashMap getPSOutput(String nextLine)
- {
- HashMap contents = new HashMap();
- String[] values = nextLine.trim().split("\\s+");
- if (values == null || values.length < processAttributes.length) return null;
- for (int i = 0; i < processAttributes.length; i++)
- {
- contents.put(processAttributes[i], values[i]);
- }
- return contents;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.ProcessHandler#kill
- */
- public IHostProcess kill(IHostProcess process, String type)
- throws Exception
- {
- if (type.equals(PROCESS_SIGNAL_TYPE_DEFAULT)) type = "";
- else type = "-" + type;
- // formulate command to send kill signal
- String cmdLine = "kill " + type + " " + process.getPid();
- Runtime.getRuntime().exec(cmdLine);
-
- // after the kill command is executed, the process might have changed
- // attributes, or might be gone, so requery
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPid("" + process.getPid());
- SortedSet results = lookupProcesses(rpfs);
- if (results == null || results.size() == 0) return null;
- else return (IHostProcess) results.first();
- }
-
- /**
- * Populates the internal hashmap with uid/username info
- protected void populateUsernames()
- {
- _usernamesByUid = new HashMap();
- _uidsByUserName = new HashMap();
-
- try
- {
- // read the uid info from the lsuser command
- Process ps = Runtime.getRuntime().exec("lsuser -c -a id ALL");
- InputStreamReader isr = new InputStreamReader(ps.getInputStream());
- if (isr == null) return;
- BufferedReader reader = new BufferedReader(isr);
- if (reader == null) return;
-
- String nextLine;
-
- while ((nextLine = reader.readLine()) != null)
- {
- if (nextLine.trim().startsWith("#name")) continue;
- String[] fields = nextLine.split(":");
- int length = fields.length;
- if (length < 2) continue;
- String uid = fields[1];
- String username = fields[0];
- if (uid != null && username != null)
- {
- _usernamesByUid.put(uid, username);
- _uidsByUserName.put(username, uid);
- }
- }
- reader.close();
- isr.close();
- }
- catch (IOException e)
- { return; }
- catch (Exception e)
- { return; }
- }*/
-
- /**
- * Return the unique state code assocated with the state given by
- * the ps listing on the AIX machine.
- */
- protected String convertToStateCode(String state)
- {
- String stateCode = " ";
- if (state == null) return stateCode;
- if (state.trim().equals("")) return stateCode;
- for (int i = 0; i < state.length(); i++)
- {
- String nextState = (String) stateMap.get(new Character(state.charAt(i)));
- if (nextState != null)
- {
- stateCode = stateCode + nextState;
- if (i < state.length() - 1) stateCode = stateCode + ",";
- }
- }
- if (stateCode.trim().equals("")) return " ";
- else return stateCode.trim();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalLinuxProcessHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalLinuxProcessHandler.java
deleted file mode 100644
index 73d80d2f3..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalLinuxProcessHandler.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.services.clientserver.processes.handlers;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.HashMap;
-import java.util.SortedSet;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-
-public class UniversalLinuxProcessHandler implements ProcessHandler, IServiceConstants, ISystemProcessRemoteConstants
-{
-
- protected HashMap _usernamesByUid;
- protected HashMap _uidsByUserName;
- private HashMap stateMap;
-
- /**
- * Creates a new ProcessHandler for Linux platforms.
- */
- public UniversalLinuxProcessHandler()
- {
- stateMap = new HashMap();
- for (int i = STATE_STARTING_INDEX; i < STATE_ENDING_INDEX; i++)
- {
- stateMap.put(new Character(ALL_STATES[i]), ALL_STATES_STR[i]);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.ProcessHandler#kill
- */
- public IHostProcess kill(IHostProcess process, String type) throws Exception
- {
- if (type.equals(PROCESS_SIGNAL_TYPE_DEFAULT)) type = "";
- else type = "-" + type;
- // formulate command to send kill signal
- String cmdLine = "kill " + type + " " + process.getPid();
- Runtime.getRuntime().exec(cmdLine);
-
- // after the kill command is executed, the process might have changed
- // attributes, or might be gone, so requery
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPid("" + process.getPid());
- SortedSet results = lookupProcesses(rpfs);
- if (results == null || results.size() == 0) return null;
- else return (IHostProcess) results.first();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.ProcessHandler#lookupProcesses
- */
- public SortedSet lookupProcesses(IHostProcessFilter rpfs) throws Exception
- {
- File procDir = new File("/proc");
-
- if (!procDir.exists())
- throw new Exception(FAILED_WITH_DOES_NOT_EXIST);
-
- if (!procDir.canRead())
- throw new Exception(FAILED_WITH_SECURITY);
-
- // list all subdirectories of /proc
- File[] processes;
- if (rpfs.getPid().indexOf("*") == -1)
- {
- processes = new File[1];
- processes[0] = new File(procDir, rpfs.getPid());
- }
- else processes = procDir.listFiles();
-
- SortedSet results = new TreeSet(new ProcessComparator());
-
- for (int i = 0; i < processes.length; i++)
- {
- // make sure the directory is a process directory (an integer)
- try
- { Integer.valueOf(processes[i].getName()); }
- catch (NumberFormatException e)
- { continue; }
-
- String statusLine = "";
- try
- {
- // open the file containing the human-readable status info for the process
- File statusFile = new File(processes[i], "status");
- if (!statusFile.exists() || !statusFile.canRead())
- continue;
-
- // read the status info from the stat file
- FileReader fr = new FileReader(statusFile);
- if (fr == null) continue;
- BufferedReader reader = new BufferedReader(fr);
- if (reader == null) continue;
- HashMap statusFileContents = getStatusFileContents(reader);
-
- statusLine = processes[i].getName() + "|"; // add the pid to the status string
-
- // add the name to the status string
- String name = (String) statusFileContents.get("name");
- if (name == null) name = " ";
- //if (!pexematcher.matches(name)) continue;
- statusLine = statusLine + name + "|";
-
- // add the status letter to the status string
- String state = (String) statusFileContents.get("state");
- if (state == null) state = " ";
- String stateCode = convertToStateCode(state);
- statusLine = statusLine + stateCode + "|";
-
- // add the Tgid
- String tgid = (String) statusFileContents.get("tgid");
- if (tgid == null) tgid = " ";
- statusLine = statusLine + tgid + "|";
-
- // add the Ppid
- String pPid = (String) statusFileContents.get("ppid");
- if (pPid == null) pPid = " ";
- //if (!ppidmatcher.matches(pPid)) continue;
- statusLine = statusLine + pPid + "|";
-
- // add the TracerPid
- String tracerpid = (String) statusFileContents.get("tracerpid");
- if (tracerpid == null) tracerpid = " ";
- statusLine = statusLine + tracerpid + "|";
-
- String uid = (String) statusFileContents.get("uid");
- if (uid == null) uid = " ";
- statusLine = statusLine + uid + "|"; // add the uid to the status string
-
- String username = getUsername(uid);
- if (username == null) username = " ";
- statusLine = statusLine + username + "|"; // add the username to the status string
-
- // add the gid to the status string
- String gid = (String) statusFileContents.get("gid");
- if (gid == null) gid = " ";
- statusLine = statusLine + gid + "|";
-
- // add the VmSize to the status string
- String vmsize = (String) statusFileContents.get("vmsize");
- if (vmsize == null) vmsize = " ";
- statusLine = statusLine + vmsize + "|";
-
- // add the VmRSS to the status string
- String vmrss = (String) statusFileContents.get("vmrss");
- if (vmrss == null) vmrss = " ";
- statusLine = statusLine + vmrss;
-
- reader.close();
- fr.close();
- }
- catch (Exception e)
- {
- continue;
- }
- if (rpfs.allows(statusLine))
- {
- UniversalServerProcessImpl usp = new UniversalServerProcessImpl(statusLine);
- results.add(usp);
- }
- } // for loop
- return results;
- }
-
- /**
- * Gets the uid associated with the given username on this system
- */
- public String getUid(String username)
- {
- if (_uidsByUserName == null) populateUsernames();
- return (String) _uidsByUserName.get(username);
- }
-
- /**
- * Gets the username associated with the given uid on this system
- */
- public String getUsername(String uid)
- {
- if (_usernamesByUid == null) populateUsernames();
- return (String) _usernamesByUid.get(uid);
- }
-
- /**
- * Given a handle to the status file for a process, parses the data
- * in that status file and returns it as a key-value hashmap of
- * attributes.
- * @param reader A buffered reader of the status file
- * @return a hashmap indexed by attribute name
- */
- private HashMap getStatusFileContents(BufferedReader reader)
- {
-
- HashMap contents = new HashMap();
- String nextLine;
- try
- {
- while ((nextLine = reader.readLine()) != null)
- {
- if (nextLine == null) break;
- String key = nextLine.substring(0, nextLine.indexOf(":")).trim().toLowerCase();
- String theRest = processStatusLine(nextLine, -1);
- StringTokenizer tz = new StringTokenizer(theRest);
- String value = null;
- if (tz.hasMoreTokens()) value = tz.nextToken();
- if (key != null && value != null) contents.put(key, value);
- }
- }
- catch (Exception e)
- {
- }
- return contents;
- }
-
- /**
- * Returns all or part of <code>line</code> after the first ':' character, trimmed.
- * @param line the line to process
- * @param length the number of characters (after trimming) to return (-1 for all)
- */
- private String processStatusLine(String line, int length)
- {
- if (length == -1)
- {
- return line.substring(line.indexOf(":") + 1).trim();
- }
- else
- return line.substring(line.indexOf(":") + 1).trim().substring(0, length);
- }
-
- /**
- * Populates the internal hashmap with uid/username info
- */
- private void populateUsernames()
- {
- _usernamesByUid = new HashMap();
- _uidsByUserName = new HashMap();
-
- try
- {
- // read the uid info using the getent command
- Process ps = Runtime.getRuntime().exec("getent passwd");
- InputStreamReader isr = new InputStreamReader(ps.getInputStream());
- if (isr == null) return;
- BufferedReader reader = new BufferedReader(isr);
- if (reader == null) return;
-
- String nextLine;
-
- while ((nextLine = reader.readLine()) != null)
- {
- String[] fields = nextLine.split(":");
- int length = fields.length;
- if (length < 3) continue;
- String uid = fields[2];
- String username = fields[0];
- if (uid != null && username != null)
- {
- _usernamesByUid.put(uid, username);
- _uidsByUserName.put(username, uid);
- }
- }
- reader.close();
- isr.close();
- }
- catch (IOException e)
- { return; }
- catch (Exception e)
- { return; }
- }
-
- /**
- * Return the unique state code assocated with the state given by
- * the status file on the Linux machine.
- */
- protected String convertToStateCode(String state)
- {
- String stateCode = " ";
- if (state == null) return stateCode;
- if (state.trim().equals("")) return stateCode;
- for (int i = 0; i < state.length(); i++)
- {
- String nextState = (String) stateMap.get(new Character(state.charAt(i)));
- if (nextState != null)
- {
- stateCode = stateCode + nextState;
- if (i < state.length() - 1) stateCode = stateCode + ",";
- }
- }
- if (stateCode.trim().equals("")) return " ";
- else return stateCode.trim();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalMacOSXProcessHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalMacOSXProcessHandler.java
deleted file mode 100644
index 40fcbd990..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalMacOSXProcessHandler.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.services.clientserver.processes.handlers;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-
-public class UniversalMacOSXProcessHandler implements ProcessHandler {
- private static final Map stateMap = new HashMap();
-
- static {
- String[] strings = ISystemProcessRemoteConstants.ALL_STATES_STR;
- stateMap.put("I", strings[ISystemProcessRemoteConstants.STATE_IDLE_INDEX]);
- stateMap.put("R", strings[ISystemProcessRemoteConstants.STATE_RUNNING_INDEX]);
- stateMap.put("S", strings[ISystemProcessRemoteConstants.STATE_SLEEPING_INDEX]);
- stateMap.put("T", strings[ISystemProcessRemoteConstants.STATE_NONEXISTENT_INDEX]);
- stateMap.put("U", strings[ISystemProcessRemoteConstants.STATE_WAITING_INDEX]);
- stateMap.put("Z", strings[ISystemProcessRemoteConstants.STATE_ZOMBIE_INDEX]);
- }
-
- /**
- * Creates a new ProcessHandler for Mac OS X platforms.
- */
- public UniversalMacOSXProcessHandler() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.handlers.ProcessHandler#lookupProcesses
- */
- public SortedSet lookupProcesses(IHostProcessFilter rpfs) throws Exception {
- SortedSet results = new TreeSet(new ProcessComparator());
- // Using -A is problematic - the command never returns! Using -a for now.
- String command = "/bin/ps -awwo pid,ucomm,state,ppid,uid,user,gid,vsz,rss";
- Process ps = Runtime.getRuntime().exec(command);
- InputStreamReader isr = new InputStreamReader(ps.getInputStream());
- BufferedReader reader = new BufferedReader(isr);
- String line = reader.readLine(); // Header line
- line = reader.readLine();
- while (line != null) {
- // Input line looks like "pid ucomm state ppid uid user gid vsz rss"
- String[] words = line.trim().split("\\s+");
- UniversalServerProcessImpl usp = new UniversalServerProcessImpl();
- usp.setPid(words[0]);
- usp.setName(words[1]);
- usp.setState(convertToStateCode(words[2]));
- usp.setPPid(words[3]);
- usp.setUid(words[4]);
- usp.setUsername(words[5]);
- usp.setGid(words[6]);
- usp.setVmSizeInKB(words[7]);
- usp.setVmRSSInKB(words[8]);
- usp.setTgid("");
- usp.setTracerPid("");
- if (rpfs.allows(usp.getAllProperties())) {
- results.add(usp);
- }
- line = reader.readLine();
- }
- reader.close();
- isr.close();
- return results;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.ProcessHandler#kill
- */
- public IHostProcess kill(IHostProcess process, String type) throws Exception {
- if (type.equals(ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT)) {
- type = "";
- } else {
- type = "-" + type;
- }
-
- // formulate command to send kill signal
- String cmdLine = "kill " + type + " " + process.getPid();
- Runtime.getRuntime().exec(cmdLine);
-
- // after the kill command is executed, the process might have changed
- // attributes, or might be gone, so requery
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPid("" + process.getPid());
- SortedSet results = lookupProcesses(rpfs);
- if (results == null || results.size() == 0) {
- return null;
- } else {
- return (IHostProcess) results.first();
- }
- }
-
- /**
- * Return the unique state code assocated with the state given by
- * the ps listing on Mac OS X.
- */
- protected String convertToStateCode(String state) {
- String key = state.substring(0, 1);
- String stateCode = (String) stateMap.get(key);
- if (stateCode == null) {
- stateCode = Character.toString(ISystemProcessRemoteConstants.STATE_RUNNING);
- }
- return stateCode;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalServerProcessImpl.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalServerProcessImpl.java
deleted file mode 100644
index 342c550f1..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalServerProcessImpl.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.processes.handlers;
-
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-
-/**
- * @author mjberger
- */
-public class UniversalServerProcessImpl implements IRemoteServerProcess, IServiceConstants, ISystemProcessRemoteConstants
-{
- protected Object[] _properties = new Object[PROCESS_ATTRIBUTES_COUNT+1];
-
- /**
- * create a new UniversalServerProcessImpl with the default property set
- */
- public UniversalServerProcessImpl()
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = " ";
- _properties[PROCESS_ATTRIBUTES_INDEX_GID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_PID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_PPID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" ");
- _properties[PROCESS_ATTRIBUTES_INDEX_TGID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_UID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = " ";
- _properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_VMRSS] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_COUNT] = " "; //set the label
- }
-
- /**
- * create a new UniversalServerProcessImpl with initial Attributes.
- * This is equivalent to constructing the object, then calling setAllProperties(initialAttributes)
- */
- public UniversalServerProcessImpl(String initialAttributes)
- {
- setAllProperties(initialAttributes);
- }
-
- protected Long getLongAttribute(String value, long dflt)
- {
- long result;
- try
- {
- result = Long.parseLong(value);
- }
- catch (NumberFormatException e)
- {
- return new Long(dflt);
- }
- return new Long(result);
- }
-
- protected Integer getIntAttribute(String value, int dflt)
- {
- int result;
- try
- {
- result = Integer.parseInt(value);
- }
- catch (NumberFormatException e)
- {
- return new Integer(dflt);
- }
- return new Integer(result);
- }
-
- public void setPid(String pid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_PID] = getLongAttribute(pid, -1);
- }
-
- public void setPPid(String ppid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_PPID] = getLongAttribute(ppid, -1);
-
- }
-
- public void setName(String name)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IRemoteProcess#getLabel()
- */
- public String getLabel()
- {
- return (String) _properties[PROCESS_ATTRIBUTES_COUNT];
- }
-
- public void setLabel(String label)
- {
- _properties[PROCESS_ATTRIBUTES_COUNT] = label;
- }
-
- public void setState(String state)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = state;
- }
-
- public void setTgid(String tgid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_TGID] = getLongAttribute(tgid, -1);
- }
-
- public void setTracerPid(String tracerpid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID] = getLongAttribute(tracerpid, -1);
- }
-
- public void setUid(String uid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_UID] = getLongAttribute(uid, -1);
- }
-
- public void setUsername(String username)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = username;
- }
-
- public void setGid(String gid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_GID] = getLongAttribute(gid, -1);
- }
-
- public void setVmSizeInKB(String size)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE] = getLongAttribute(size, 0);
- }
-
- public void setVmRSSInKB(String size)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_VMRSS] = getLongAttribute(size, 0);
- }
-
- /**
- * You can also set all attributes at once with your own string passed as a parameter, as long
- * as the string is in the same format as outlined below (pass in null to use the DataElement's string):
- * <p> The string contains properties of the object in the following order
- * <ul>
- * <li>Process Id (pid) - long
- * <li>Executable name - String
- * <li>Status - char
- * <li>Tgid - long
- * <li>Process Parent id (ppid) - long
- * <li>Tracer pid - long
- * <li>User id (uid) - long
- * <li>Username - String
- * <li>Group id (gid) - long
- * <li>VM Size - long
- * <li>VM RSS - long
- * </ul>
- */
- public void setAllProperties(String allProperties)
- {
- String s = allProperties;
-
- if (s != null && s.length() > 0)
- {
- String[] str = s.split("\\"+TOKEN_SEPARATOR);
- int numOfExpectedTokens = PROCESS_ATTRIBUTES_COUNT;
- int tokens = str.length;
- if (tokens == numOfExpectedTokens)
- {
- try
- {
- setPid(str[PROCESS_ATTRIBUTES_INDEX_PID]);
-
- setName(str[PROCESS_ATTRIBUTES_INDEX_EXENAME]);
-
- setTgid(str[PROCESS_ATTRIBUTES_INDEX_TGID]);
-
- setPPid(str[PROCESS_ATTRIBUTES_INDEX_PPID]);
-
- setTracerPid(str[PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
-
- setUid(str[PROCESS_ATTRIBUTES_INDEX_UID]);
-
- setUsername(str[PROCESS_ATTRIBUTES_INDEX_USERNAME]);
-
- setGid(str[PROCESS_ATTRIBUTES_INDEX_GID]);
-
- setVmSizeInKB(str[PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
-
- setVmRSSInKB(str[PROCESS_ATTRIBUTES_INDEX_VMRSS]);
-
- setState(str[PROCESS_ATTRIBUTES_INDEX_STATUS]);
-
- setLabel(getName());
-
- }
- catch (ArrayIndexOutOfBoundsException e)
- {
- // SystemPlugin.logError("Error in UniversalProcessImpl.getAttributes(). Attributes in unexpected format. Attributes = " + s);
- }
- }
- }
- }
-
- public long getPid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_PID]).longValue();
- }
-
- public long getPPid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_PPID]).longValue();
- }
-
- public String getName()
- {
- return (String) _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME];
- }
-
- public String getState()
- {
- return (String) _properties[PROCESS_ATTRIBUTES_INDEX_STATUS];
- }
-
- public long getTgid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_TGID]).longValue();
- }
-
- public long getTracerPid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID]).longValue();
- }
-
- public long getUid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_UID]).intValue();
- }
-
- public String getUsername()
- {
- return (String) _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME];
- }
-
- public long getGid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_GID]).intValue();
- }
-
- public boolean isRoot()
- {
- return (getPPid() == 0);
- }
-
- public long getVmSizeInKB()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE]).longValue();
- }
-
- public long getVmRSSInKB()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_VMRSS]).longValue();
- }
-
- /**
- * Return all the properties of this data structure in one string.
- * Properties are separated by IUniversalDataStoreConstants.TOKEN_SEPARATOR;
- */
- public String getAllProperties()
- {
- String properties = "";
- for (int i = 0; i < PROCESS_ATTRIBUTES_COUNT; i++)
- {
- properties = properties + _properties[i].toString();
- if (i != PROCESS_ATTRIBUTES_COUNT - 1)
- properties = properties + TOKEN_SEPARATOR;
- }
- return properties;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java
deleted file mode 100644
index 51fade3b0..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.services.clientserver.processes.handlers;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.util.HashMap;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-
-
-public class UniversalZOSProcessHandler extends UniversalAIXProcessHandler
-{
- private static final String[] processAttributes = {"pid","ppid","comm","uid","user","gid","vsz","state"};
- private static final String firstColumnHeader = "PID";
- private HashMap stateMap;
-
- /**
- * Creates a new ProcessHandler for z/OS platforms.
- */
- public UniversalZOSProcessHandler()
- {
- super();
- stateMap = new HashMap();
- for (int i = STATE_ZOS_STARTING_INDEX; i < STATE_ZOS_ENDING_INDEX; i++)
- {
- stateMap.put(new Character(ALL_STATES[i]), ALL_STATES_STR[i]);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.handlers.ProcessHandler#lookupProcesses
- */
- public SortedSet lookupProcesses(HostProcessFilterImpl rpfs)
- throws Exception
- {
- SortedSet results = new TreeSet(new ProcessComparator());
-
- // create the remote command with the AIX specific attributes
- String cmdLine = "ps -A -o ";
- for (int i = 0; i < processAttributes.length; i++)
- {
- cmdLine = cmdLine + processAttributes[i];
- if ((processAttributes.length - i > 1)) cmdLine = cmdLine + ",";
- }
- // run the command and get output
- Process ps = Runtime.getRuntime().exec(cmdLine);
- InputStreamReader isr = new InputStreamReader(ps.getInputStream());
- if (isr == null) return null;
- BufferedReader reader = new BufferedReader(isr);
- if (reader == null) return null;
- String nextLine = reader.readLine();
- if (nextLine != null && nextLine.trim().startsWith(firstColumnHeader)) nextLine = reader.readLine();
- while (nextLine != null)
- {
- String statusLine = "";
- // put the details of each process into a hashmap
- HashMap psLineContents = getPSOutput(nextLine);
- if (psLineContents == null)
- {
- nextLine = reader.readLine();
- continue;
- }
-
- String pid = (String) psLineContents.get("pid");
- statusLine = pid + "|";
-
- // add the name to the status string
- String name = (String) psLineContents.get("comm");
- if (name == null) name = " ";
- statusLine = statusLine + name + "|";
-
- // add the status letter to the status string
- String state = (String) psLineContents.get("state");
- if (state == null) state = " ";
- String stateCode = convertToStateCode(state);
- statusLine = statusLine + stateCode + "|";
-
- // add the Tgid
- String tgid = (String) psLineContents.get("tgid");
- if (tgid == null) tgid = " ";
- statusLine = statusLine + tgid + "|";
-
- // add the Ppid
- String pPid = (String) psLineContents.get("ppid");
- if (pPid == null) pPid = " ";
- statusLine = statusLine + pPid + "|";
-
- // add the TracerPid
- String tracerpid = (String) psLineContents.get("tracerpid");
- if (tracerpid == null) tracerpid = " ";
- statusLine = statusLine + tracerpid + "|";
-
- String uid = (String) psLineContents.get("uid");
- if (uid == null) uid = " ";
- statusLine = statusLine + uid + "|"; // add the uid to the status string
-
- String username = (String) psLineContents.get("user");
- if (username == null) username = " ";
- statusLine = statusLine + username + "|"; // add the username to the status string
-
- // add the gid to the status string
- String gid = (String) psLineContents.get("gid");
- if (gid == null) gid = " ";
- statusLine = statusLine + gid + "|";
-
- // add the VmSize to the status string
- String vmsize = (String) psLineContents.get("vsz");
- if (vmsize == null) vmsize = " ";
- statusLine = statusLine + vmsize +"|";
-
- // add a dummy vmrss to the status string
- // vmRss is not available on ZOS
- String vmrss = " ";
- statusLine = statusLine + vmrss;
-
- if (rpfs.allows(statusLine))
- {
- UniversalServerProcessImpl usp = new UniversalServerProcessImpl(statusLine);
- results.add(usp);
- }
- nextLine = reader.readLine();
- }
- reader.close();
- isr.close();
- if (results.size() == 0) return null;
- return results;
- }
-
- /**
- * Parses one line of output from the ps command - placing the contents into
- * a hashmap, where the keys are the names of process attributes and the values
- * are the attribute values
- * @param nextLine a line of output from the ps command
- * @return a map of names-values of process attributes
- */
- protected HashMap getPSOutput(String nextLine)
- {
- HashMap contents = new HashMap();
- String[] values = nextLine.trim().split("\\s+");
- if (values == null || values.length < processAttributes.length) return null;
- for (int i = 0; i < processAttributes.length; i++)
- {
- contents.put(processAttributes[i], values[i]);
- }
- return contents;
- }
-
- /**
- * Return the unique state code assocated with the state given by
- * the ps listing on the z/OS machine.
- */
- protected String convertToStateCode(String state)
- {
- String stateCode = " ";
- if (state == null) return stateCode;
- if (state.trim().equals("")) return stateCode;
- for (int i = 0; i < state.length(); i++)
- {
- String nextState = (String) stateMap.get(new Character(state.charAt(i)));
- if (nextState != null)
- {
- stateCode = stateCode + nextState;
- if (i < state.length() - 1) stateCode = stateCode + ",";
- }
- }
- if (stateCode.trim().equals("")) return " ";
- else return stateCode.trim();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchConstants.java
deleted file mode 100644
index 2cfffd949..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchConstants.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.search;
-
-/**
- * An interface for search constants.
- */
-public interface ISystemSearchConstants {
-
- public static final int LF_CHAR = '\n';
- public static final int CR_CHAR = '\r';
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchMatcher.java
deleted file mode 100644
index ec22d5765..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/ISystemSearchMatcher.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.search;
-
-import org.eclipse.rse.services.clientserver.IMatcher;
-
-/**
- * An interface for matching that search will use.
- */
-public interface ISystemSearchMatcher extends IMatcher {
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemNonRegexMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemNonRegexMatcher.java
deleted file mode 100644
index e2b34c40a..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemNonRegexMatcher.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.search;
-
-import java.util.Vector;
-
-/**
- * A string pattern matcher, suppporting * and ? wildcards.
- */
-public class SystemNonRegexMatcher {
- protected String fPattern;
- protected int fLength; // pattern length
- protected boolean fIgnoreWildCards;
- protected boolean fIgnoreCase;
- protected boolean fHasLeadingStar;
- protected boolean fHasTrailingStar;
- protected String fSegments[]; //the given pattern is split into * separated segments
-
- /* boundary value beyond which we don't need to search in the text */
- protected int fBound= 0;
-
-
- protected static final char fSingleWildCard= '\u0000';
-
- public static class Position {
- int start; //inclusive
- int end; //exclusive
- public Position(int start, int end) {
- this.start= start;
- this.end= end;
- }
- public int getStart() {
- return start;
- }
- public int getEnd() {
- return end;
- }
- }
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain '*' for 0 and many characters and
- * '?' for exactly one character.
- *
- * Literal '*' and '?' characters must be escaped in the pattern
- * e.g., "\*" means literal "*", etc.
- *
- * Escaping any other character (including the escape character itself),
- * just results in that character in the pattern.
- * e.g., "\a" means "a" and "\\" means "\"
- *
- * If invoking the StringMatcher with string literals in Java, don't forget
- * escape characters are represented by "\\".
- *
- * @param pattern the pattern to match text against
- * @param ignoreCase if true, case is ignored
- * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
- * (everything is taken literally).
- */
- public SystemNonRegexMatcher(String pattern, boolean ignoreCase, boolean ignoreWildCards) {
- if (pattern == null)
- throw new IllegalArgumentException();
- fIgnoreCase= ignoreCase;
- fIgnoreWildCards= ignoreWildCards;
- fPattern= pattern;
- fLength= pattern.length();
-
- if (fIgnoreWildCards) {
- parseNoWildCards();
- } else {
- parseWildCards();
- }
- }
- /**
- * Find the first occurrence of the pattern between <code>start</code)(inclusive)
- * and <code>end</code>(exclusive).
- * @param text the String object to search in
- * @param start the starting index of the search range, inclusive
- * @param end the ending index of the search range, exclusive
- * @return an <code>StringMatcher.Position</code> object that keeps the starting
- * (inclusive) and ending positions (exclusive) of the first occurrence of the
- * pattern in the specified range of the text; return null if not found or subtext
- * is empty (start==end). A pair of zeros is returned if pattern is empty string
- * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
- * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
- */
- public SystemNonRegexMatcher.Position find(String text, int start, int end) {
- if (text == null)
- throw new IllegalArgumentException();
-
- int tlen= text.length();
- if (start < 0)
- start= 0;
- if (end > tlen)
- end= tlen;
- if (end < 0 ||start >= end )
- return null;
- if (fLength == 0)
- return new Position(start, start);
- if (fIgnoreWildCards) {
- int x= posIn(text, start, end);
- if (x < 0)
- return null;
- return new Position(x, x+fLength);
- }
-
- int segCount= fSegments.length;
- if (segCount == 0)//pattern contains only '*'(s)
- return new Position (start, end);
-
- int curPos= start;
- int matchStart= -1;
- int i;
- for (i= 0; i < segCount && curPos < end; ++i) {
- String current= fSegments[i];
- int nextMatch= regExpPosIn(text, curPos, end, current);
- if (nextMatch < 0 )
- return null;
- if(i == 0)
- matchStart= nextMatch;
- curPos= nextMatch + current.length();
- }
- if (i < segCount)
- return null;
- return new Position(matchStart, curPos);
- }
- /**
- * match the given <code>text</code> with the pattern
- * @return true if matched eitherwise false
- * @param text a String object
- */
- public boolean match(String text) {
- return match(text, 0, text.length());
- }
- /**
- * Given the starting (inclusive) and the ending (exclusive) positions in the
- * <code>text</code>, determine if the given substring matches with aPattern
- * @return true if the specified portion of the text matches the pattern
- * @param text a String object that contains the substring to match
- * @param start marks the starting position (inclusive) of the substring
- * @param end marks the ending index (exclusive) of the substring
- */
- public boolean match(String text, int start, int end) {
- if (null == text)
- throw new IllegalArgumentException();
-
- if (start > end)
- return false;
-
- if (fIgnoreWildCards)
- return (end - start == fLength) && fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);
- int segCount= fSegments.length;
- if (segCount == 0 && (fHasLeadingStar || fHasTrailingStar)) // pattern contains only '*'(s)
- return true;
- if (start == end)
- return fLength == 0;
- if (fLength == 0)
- return start == end;
-
- int tlen= text.length();
- if (start < 0)
- start= 0;
- if (end > tlen)
- end= tlen;
-
- int tCurPos= start;
- int bound= end - fBound;
- if ( bound < 0)
- return false;
- int i=0;
- String current= fSegments[i];
- int segLength= current.length();
-
- /* process first segment */
- if (!fHasLeadingStar){
- if(!regExpRegionMatches(text, start, current, 0, segLength)) {
- return false;
- } else {
- ++i;
- tCurPos= tCurPos + segLength;
- }
- }
- if ((fSegments.length == 1) && (!fHasLeadingStar) && (!fHasTrailingStar)) {
- // only one segment to match, no wildcards specified
- return tCurPos == end;
- }
- /* process middle segments */
- while (i < segCount) {
- current= fSegments[i];
- int currentMatch;
- int k= current.indexOf(fSingleWildCard);
- if (k < 0) {
- currentMatch= textPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- } else {
- currentMatch= regExpPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- }
- tCurPos= currentMatch + current.length();
- i++;
- }
-
- /* process final segment */
- if (!fHasTrailingStar && tCurPos != end) {
- int clen= current.length();
- return regExpRegionMatches(text, end - clen, current, 0, clen);
- }
- return i == segCount ;
- }
-
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * Since wildcards are not being used in this case, the pattern consists of a single segment.
- */
- private void parseNoWildCards() {
- fSegments= new String[1];
- fSegments[0]= fPattern;
- fBound= fLength;
- }
- /**
- * Parses the given pattern into segments separated by wildcard '*' characters.
- */
- private void parseWildCards() {
- if(fPattern.startsWith("*"))//$NON-NLS-1$
- fHasLeadingStar= true;
- if(fPattern.endsWith("*")) {//$NON-NLS-1$
- /* make sure it's not an escaped wildcard */
- if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
- fHasTrailingStar= true;
- }
- }
-
- Vector temp= new Vector();
-
- int pos= 0;
- StringBuffer buf= new StringBuffer();
- while (pos < fLength) {
- char c= fPattern.charAt(pos++);
- switch (c) {
- case '\\':
- if (pos >= fLength) {
- buf.append(c);
- } else {
- char next= fPattern.charAt(pos++);
- /* if it's an escape sequence */
- if (next == '*' || next == '?' || next == '\\') {
- buf.append(next);
- } else {
- /* not an escape sequence, just insert literally */
- buf.append(c);
- buf.append(next);
- }
- }
- break;
- case '*':
- if (buf.length() > 0) {
- /* new segment */
- temp.addElement(buf.toString());
- fBound += buf.length();
- buf.setLength(0);
- }
- break;
- case '?':
- /* append special character representing single match wildcard */
- buf.append(fSingleWildCard);
- break;
- default:
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.addElement(buf.toString());
- fBound += buf.length();
- }
-
- fSegments= new String[temp.size()];
- temp.copyInto(fSegments);
- }
- /**
- * @param text a string which contains no wildcard
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int posIn(String text, int start, int end) {//no wild card in pattern
- int max= end - fLength;
-
- if (!fIgnoreCase) {
- int i= text.indexOf(fPattern, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i= start; i <= max; ++i) {
- if (text.regionMatches(true, i, fPattern, 0, fLength))
- return i;
- }
-
- return -1;
- }
- /**
- * @param text a simple regular expression that may only contain '?'(s)
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a simple regular expression that may contains '?'
- * @param caseIgnored wether the pattern is not casesensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int regExpPosIn(String text, int start, int end, String p) {
- int plen= p.length();
-
- int max= end - plen;
- for (int i= start; i <= max; ++i) {
- if (regExpRegionMatches(text, i, p, 0, plen))
- return i;
- }
- return -1;
- }
- /**
- *
- * @return boolean
- * @param text a String to match
- * @param start int that indicates the starting index of match, inclusive
- * @param end int that indicates the ending index of match, exclusive
- * @param p a simple regular expression that may contain '?'
- * @param ignoreCase boolean indicating wether <code>p</code> is case sensitive
- */
- protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
- while (plen-- > 0) {
- char tchar= text.charAt(tStart++);
- char pchar= p.charAt(pStart++);
-
- /* process wild cards */
- if (!fIgnoreWildCards) {
- /* skip single wild cards */
- if (pchar == fSingleWildCard) {
- continue;
- }
- }
- if (pchar == tchar)
- continue;
- if (fIgnoreCase) {
- if (Character.toUpperCase(tchar) == Character.toUpperCase(pchar))
- continue;
- // comparing after converting to upper case doesn't handle all cases;
- // also compare after converting to lower case
- if (Character.toLowerCase(tchar) == Character.toLowerCase(pchar))
- continue;
- }
- return false;
- }
- return true;
- }
- /**
- * @param text the string to match
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a string that has no wildcard
- * @param ignoreCase boolean indicating wether <code>p</code> is case sensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int textPosIn(String text, int start, int end, String p) {
-
- int plen= p.length();
- int max= end - plen;
-
- if (!fIgnoreCase) {
- int i= text.indexOf(p, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i= start; i <= max; ++i) {
- if (text.regionMatches(true, i, p, 0, plen))
- return i;
- }
-
- return -1;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchFileNameMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchFileNameMatcher.java
deleted file mode 100644
index d2bab3420..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchFileNameMatcher.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.search;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-import java.util.regex.Pattern;
-
-
-/**
- * A file name matcher for search.
- */
-public class SystemSearchFileNameMatcher implements ISystemSearchMatcher {
-
- private String fileNamesString;
- private boolean isRegex;
-
- // for non regular expression
- private List nonRegexMatchers;
-
- // for regular regular expression
- private Pattern pattern;
-
- /**
- * Constructor to create a file name matcher.
- * @param fileNamesString the file names string.
- * @param isCaseSensitive <code>true</code> if the matching should be done in a case sensitive manner, <code>false</code> otherwise.
- * @param isRegex <code>true</code> if the file names string is a regular expression, <code>false</code> otherwise.
- * @throws NullPointerException if the file names string is <code>null</code>.
- */
- public SystemSearchFileNameMatcher(String fileNamesString, boolean isCaseSensitive, boolean isRegex) {
-
- if (fileNamesString == null) {
- throw new NullPointerException();
- }
-
- this.fileNamesString = fileNamesString;
- this.isRegex = isRegex;
-
- // if the file names string is a regular expression, then simply add it
- if (isRegex) {
-
-
- try {
- if (isCaseSensitive) {
- pattern = Pattern.compile(fileNamesString);
- }
- else {
- pattern = Pattern.compile(fileNamesString, Pattern.CASE_INSENSITIVE);
- }
- }
- catch (Exception e) {
- // TODO: log it. How?
- }
- }
- // otherwise, get all the names from the names string, and add a non regex matcher for each
- else {
- nonRegexMatchers = new Vector();
-
- Set names = SystemSearchUtil.getInstance().typesStringToSet(fileNamesString);
-
- Iterator iter = names.iterator();
-
- while (iter.hasNext()) {
- String name = (String)(iter.next());
- SystemNonRegexMatcher nonRegexMatcher = new SystemNonRegexMatcher(name, !isCaseSensitive, false);
- nonRegexMatchers.add(nonRegexMatcher);
- }
- }
- }
-
- /**
- * Returns whether the file names string is empty.
- * @return <code>true</code> if the file names string is empty, <code>false</code> otherwise.
- */
- public boolean isFileNamesStringEmpty() {
- return fileNamesString.length() == 0;
- }
-
- /**
- * Returns whether the file names string is "*".
- * @return <code>true</code> if the file names string is "*", <code>false</code> otherwise.
- */
- public boolean isFileNamesStringAsterisk() {
- return fileNamesString.equals("*");
- }
-
- /**
- * Returns whether there is a match for the given input. Returns <code>true</code> if the file names string
- * is an empty string.
- * @see org.eclipse.rse.services.clientserver.ISystemSearchMatcher#matches(java.lang.String)
- */
- public boolean matches(String input) {
-
- if (isFileNamesStringEmpty()) {
- return true;
- }
-
- if (isRegex) {
- return pattern.matcher(input).find();
- }
- else {
- Iterator iter = nonRegexMatchers.iterator();
-
- while (iter.hasNext()) {
- SystemNonRegexMatcher matcher = (SystemNonRegexMatcher)iter.next();
-
- // TODO (KM): in SystemSearchStringMatcher, we had to use find() instead of match().
- // Should we use this here as well? What is the difference between match() and find()? Investigate.
- if (matcher.match(input)) {
- return true;
- }
- }
-
- return false;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchLineMatch.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchLineMatch.java
deleted file mode 100644
index 9f17693bb..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchLineMatch.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.search;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This class holds information about search results for a line of text. Its instance variables
- * are public so that we can access them without having to call methods (for performance reasons).
- */
-public class SystemSearchLineMatch {
-
- private String line;
- private int lineNumber;
- private List matches;
-
- /**
- * Constructor to create a search result for a line.
- * @param line the line.
- * @param lineNumber the line number.
- */
- public SystemSearchLineMatch(String line, int lineNumber) {
- this.line = line;
- this.lineNumber = lineNumber;
- this.matches = new ArrayList();
- }
-
- /**
- * Returns the line that matched.
- * @return the line.
- */
- public String getLine() {
- return line;
- }
-
- /**
- * Returns the line number of the line that matched.
- * @return the line number.
- */
- public int getLineNumber() {
- return lineNumber;
- }
-
- /**
- * Gets the iterator for the matches in the line.
- * @return the iterator over the list of matches.
- */
- public Iterator getMatches() {
- return matches.iterator();
- }
-
- /**
- * Gets the number of matches in the line.
- * @return the number of matches.
- */
- public int getNumOfMatches() {
- return matches.size();
- }
-
- /**
- * Adds an entry.
- * @param startOffset the offset from the beginning of the file where the match begins.
- * @param endOffset the offset from the beginning of the file where the match ends.
- */
- public void addEntry(int startOffset, int endOffset) {
- matches.add(new SystemSearchMatch(startOffset, endOffset));
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchMatch.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchMatch.java
deleted file mode 100644
index 05e6e8863..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchMatch.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.search;
-
-/**
- * This class holds information about a particular match.
- */
-public class SystemSearchMatch {
-
- private int startOffset;
- private int endOffset;
-
- /**
- * Constructor for system search match.
- * @param startOffset the offset from the beginning of the file where the match begins.
- * @param endOffset the offset from the beginning of the file where the match ends.
- */
- public SystemSearchMatch(int startOffset, int endOffset) {
- this.startOffset = startOffset;
- this.endOffset = endOffset;
- }
-
- /**
- * Gets offset from the beginning of the file where the match begins.
- * @return the offset where the match begins.
- */
- public int getStartOffset() {
- return startOffset;
- }
-
- /**
- * Gets offset from the beginning of the file where the match ends.
- * @return the offset where the match ends.
- */
- public int getEndOffset() {
- return endOffset;
- }
-
- /**
- * Gets the length of the match. Start offset subtracted from end offset plus 1.
- * @return the length of the match.
- */
- public int getLength() {
- //TODO: check this
- return (endOffset - startOffset + 1);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatchLocator.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatchLocator.java
deleted file mode 100644
index 95bf7be4e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatchLocator.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.search;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This class locates matches.
- */
-public class SystemSearchStringMatchLocator implements ISystemSearchConstants {
-
- private Reader reader;
- private SystemSearchStringMatcher stringMatcher;
- private int fPushbackChar;
- private boolean fPushback;
-
- /**
- * Constructor for creating a match locator.
- * @param reader the reader from which to read and look for matches.
- * @param stringMatcher the search string matcher.
- */
- public SystemSearchStringMatchLocator(Reader reader, SystemSearchStringMatcher stringMatcher) {
- this.reader = reader;
- this.stringMatcher = stringMatcher;
- }
-
- /**
- * Gets the search string matcher.
- * @return the string matcher.
- */
- public SystemSearchStringMatcher getStringMatcher() {
- return stringMatcher;
- }
-
- /**
- * Gets the reader.
- * @return the reader.
- */
- public Reader getReader() {
- return reader;
- }
-
- /**
- * Locates matches.
- * @return an array of matches, or an empty array if none exists.
- * @throws IOException if an I/O error occurs.
- */
- public SystemSearchLineMatch[] locateMatches() throws IOException {
-
- int lineCounter = 1;
- int charCounter = 0;
- boolean eof = false;
-
- List matches = new ArrayList();
-
- try {
-
- while (!eof) {
-
- StringBuffer sb = new StringBuffer(200);
- int eolStrLength = readLine(reader, sb);
-
- eof = (eolStrLength == -1);
-
- int lineLength = sb.length();
-
- String line = sb.toString();
-
-// boolean firstMatch = false;
-// SystemSearchLineMatch match = null;
-
- // TODO: need to handle gettting correct positions for non-regex at least
-// while (lineLength != 0 && matcher.contains(input, pattern)) {
-//
-// int beginOffset = charCounter + input.getBeginOffset();
-// int endOffset = charCounter + input.getEndOffset();
-//
-// // if we get a match for the first time, create a new line match
-// if (!firstMatch) {
-// match = new SystemSearchLineMatch(line.trim(), lineCounter);
-// firstMatch = true;
-// }
-//
-// // now add the match to the line match so that we store all the matches in the line
-// match.addEntry(beginOffset, endOffset);
-// }
-
- // this just assumes one match per line, there may be more (if we use the non-regex matcher)
- if (lineLength != 0) {
-
- if (stringMatcher.matches(line)) {
-
- int beginOffset = charCounter + 0;
- int endOffset = charCounter + lineLength;
-
- SystemSearchLineMatch match = new SystemSearchLineMatch(line.trim(), lineCounter);
- match.addEntry(beginOffset, endOffset);
- matches.add(match);
- }
- }
-
- charCounter += lineLength + eolStrLength;
- lineCounter++;
- }
- }
- catch (IOException e) {
- // TODO: log error
- }
- finally {
-
- if (reader != null) {
- reader.close();
- }
- }
-
- SystemSearchLineMatch[] matchArray = new SystemSearchLineMatch[matches.size()];
-
- matches.toArray(matchArray);
-
- return matchArray;
- }
-
- /**
- * Reads a line of text from the given reader.
- * @param reader the reader.
- * @param sb the buffer.
- * @return the result of reading the line.
- * @throws IOException if an I/O error occurs.
- */
- protected int readLine(Reader reader, StringBuffer sb) throws IOException {
- int ch = -1;
-
- // if there is a character from a previous read that we needs to be added
- if (fPushback) {
- ch = fPushbackChar;
- fPushback = false;
- }
- else {
- ch = reader.read();
- }
-
- // keep reading until eof
- while (ch >= 0) {
-
- // if we get a line feed character, then we have read a line (in Unix)
- if (ch == LF_CHAR) {
- return 1;
- }
-
- // otherwise if we get a carriage return character, then we need to check the next character
- if (ch == CR_CHAR) {
- ch = reader.read();
-
- // if the character is a line feed, then we have read a line (in Windows)
- if (ch == LF_CHAR) {
- return 2;
- }
- // otherwise, we assume we are still in the same line (i.e. a carriage return does not count as a line separator)
- // we remember the character for the next read
- else {
- fPushbackChar = ch;
- fPushback = true;
- return 1;
- }
- }
-
- sb.append((char)ch);
- ch = reader.read();
- }
-
- return -1;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatcher.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatcher.java
deleted file mode 100644
index 23ee01dbb..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatcher.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.search;
-
-import java.util.regex.Pattern;
-
-
-/**
- * A string matcher for search.
- */
-public class SystemSearchStringMatcher implements ISystemSearchMatcher {
-
- private String searchString;
- private boolean isRegex;
-
- // for a regular expression
- private Pattern regexPattern;
-
- // for non regular expression
- private SystemNonRegexMatcher nonRegexMatcher;
-
- /**
- * Constructor to create a string matcher.
- * @param searchString the search string.
- * @param isCaseSensitive <code>true</code> if the matching should be done in a case sensitive manner, <code>false</code> otherwise.
- * @param isRegex <code>true</code> if the search string is a regular expression, <code>false</code> otherwise.
- * @throws
- */
- public SystemSearchStringMatcher(String searchString, boolean isCaseSensitive, boolean isRegex) {
-
- if (searchString == null) {
- throw new NullPointerException();
- }
-
- this.searchString = searchString;
- this.isRegex = isRegex;
-
- // if the string pattern is a regular expression
- if (isRegex) {
-
-
- try {
-
- if (isCaseSensitive) {
- regexPattern = Pattern.compile(searchString);
- }
- else {
- regexPattern = Pattern.compile(searchString, Pattern.CASE_INSENSITIVE);
- }
- }
- catch (Exception e) {
- // TODO: log it
- }
- }
- else {
- nonRegexMatcher = new SystemNonRegexMatcher(searchString, !isCaseSensitive, false);
- }
- }
-
- /**
- * Returns whether the search string is empty.
- * @return <code>true</code> if the search string is empty, <code>false</code> otherwise.
- */
- public boolean isSearchStringEmpty() {
- return searchString.length() == 0;
- }
-
- /**
- * Returns whether the search string is "*".
- * @return <code>true</code> if the search string is "*", <code>false</code> otherwise.
- */
- public boolean isSearchStringAsterisk() {
- return searchString.equals("*");
- }
-
- /**
- * Returns whether there is a match for the given input. Returns <code>true</code> if the search string
- * is an empty string.
- * @see org.eclipse.rse.services.clientserver.ISystemSearchMatcher#matches(java.lang.String)
- */
- public boolean matches(String input) {
-
- if (isSearchStringEmpty()) {
- return true;
- }
-
- if (isRegex) {
- return regexPattern.matcher(input).find();
- }
- else {
- // TODO (KM): can't use nonRegexMatcher.match(input) here because it returns
- // false even when there is a match inside the input. Investigate what is wrong.
- return nonRegexMatcher.find(input, 0, input.length()) != null;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchUtil.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchUtil.java
deleted file mode 100644
index 3f676172c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchUtil.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.search;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.regex.Pattern;
-
-
-/**
- * A utility class useful for search. It is a singleton.
- */
-public class SystemSearchUtil {
-
- private static SystemSearchUtil instance;
-
- public static String FILE_NAMES_SEP_STRING = ",";
-
- /**
- * Constructor for the utility class.
- */
- private SystemSearchUtil() {
- super();
- }
-
- /**
- * Gets the singleton instance of the class.
- * @return the singleton instance.
- */
- public static SystemSearchUtil getInstance() {
-
- if (instance == null) {
- instance = new SystemSearchUtil();
- }
-
- return instance;
- }
-
- /**
- * Check whether a regex string is valid.
- * @param regexString the regex string.
- * @return <code>true</code> if the regex string is valid, <code>false</code> otherwise.
- */
- public boolean isValidRegex(String regexString) {
-
-
- try {
- Pattern.compile(regexString);
- return true;
- }
- // if we get an exception, then pattern is not valid
- catch (Exception e) {
- return false;
- }
- }
-
- /**
- * Returns the file names from the given file names string.
- * @param fileNamesString the file names string.
- * @return a set of file names, or an empty set if none.
- * @throws NullPointerException if the file names string is <code>null</code>.
- */
- public Set typesStringToSet(String fileNamesString) {
-
- if (fileNamesString == null) {
- throw new NullPointerException();
- }
-
- if (fileNamesString.equals("")) {
- return new HashSet();
- }
-
- Set result = new HashSet();
-
- // create a string tokenizer which has ',' as its delimiter
- StringTokenizer tokenizer = new StringTokenizer(fileNamesString, FILE_NAMES_SEP_STRING);
-
- // go through each token
- while (tokenizer.hasMoreTokens()) {
-
- // get rid of whitespace
- String currentExtension = tokenizer.nextToken().trim();
- result.add(currentExtension);
- }
-
- return result;
- }
-
- /**
- * Returns the file names from the given file names string.
- * @param fileNamesString the file names string.
- * @return a list of file names, or an empty list if none.
- * @throws NullPointerException if the file names string is <code>null</code>.
- */
- public List typesStringToList(String fileNamesString) {
-
- if (fileNamesString == null) {
- throw new NullPointerException();
- }
-
- if (fileNamesString.equals("")) {
- return new ArrayList();
- }
-
- List result = new ArrayList();
-
- // create a string tokenizer which has ',' as its delimiter
- StringTokenizer tokenizer = new StringTokenizer(fileNamesString, FILE_NAMES_SEP_STRING);
-
- // go through each token
- while (tokenizer.hasMoreTokens()) {
-
- // get rid of whitespace
- String currentExtension = tokenizer.nextToken().trim();
- result.add(currentExtension);
- }
-
- return result;
- }
-
- /**
- * Convert list of types to string.
- * @param types the list of types.
- * @return the string representing the list of types.
- */
- public String typesListToString(List types) {
-
- // get the iterator for the list of types
- Iterator iter = types.iterator();
-
- return typesIterToString(iter);
- }
-
- /**
- * Convert set of types to string.
- * @param types the set of types.
- * @return the string representing the set of types.
- */
- public String typesSetToString(Set types) {
-
- // get the iterator for the set of types
- Iterator iter = types.iterator();
-
- return typesIterToString(iter);
- }
-
- /**
- * Convert iterator of types to string.
- * @param iter iterator for types.
- * @return the string representing the set of types.
- */
- public String typesIterToString(Iterator iter) {
- StringBuffer result = new StringBuffer();
-
- boolean first = true;
-
- // iterate over the types
- while (iter.hasNext()) {
-
- // if it's not the first entry, then precede with ',' followed by space, i.e. ' '
- if (!first) {
- result.append(FILE_NAMES_SEP_STRING);
- result.append(" ");
- }
- // if first entry, don't do anything
- else {
- first = false;
- }
-
- result.append(iter.next());
- }
-
- return result.toString();
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/ITarConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/ITarConstants.java
deleted file mode 100644
index ff346c13d..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/ITarConstants.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.util.tar;
-
-/**
- * This interface contains all constants needed for the tar package.s
- */
-public interface ITarConstants {
-
- /**
- * The block size, 512.
- */
- public static final int BLOCK_SIZE = 512;
-
- /**
- * The separator character in tar entry paths, '/'.
- */
- public static final char SEPARATOR_CHAR = '/';
-
- /**
- * The length of the name field, 100.
- */
- public static final int NAME_LENGTH = 100;
-
- /**
- * The length of the mode field, 8.
- */
- public static final int MODE_LENGTH = 8;
-
- /**
- * The length of the uid field, 8.
- */
- public static final int UID_LENGTH = 8;
-
- /**
- * The length of the gid field, 8.
- */
- public static final int GID_LENGTH = 8;
-
- /**
- * The length of the size field, 12.
- */
- public static final int SIZE_LENGTH = 12;
-
- /**
- * The length of the mtime field, 12.
- */
- public static final int MTIME_LENGTH = 12;
-
- /**
- * The length of the chksum field, 8.
- */
- public static final int CHKSUM_LENGTH = 8;
-
- /**
- * The length of the typeflag field, 1.
- */
- public static final int TYPEFLAG_LENGTH = 1;
-
- /**
- * The length of the linkname field, 100.
- */
- public static final int LINKNAME_LENGTH = 100;
-
- /**
- * The length of the magic field, 6.
- */
- public static final int MAGIC_LENGTH = 6;
-
- /**
- * The length of the version field, 2.
- */
- public static final int VERSION_LENGTH = 2;
-
- /**
- * The length of the uname field, 32.
- */
- public static final int UNAME_LENGTH = 32;
-
- /**
- * The length of the gname field, 32.
- */
- public static final int GNAME_LENGTH = 32;
-
- /**
- * The length of the devmajor field, 8.
- */
- public static final int DEVMAJOR_LENGTH = 8;
-
- /**
- * The length of the devminor field, 8.
- */
- public static final int DEVMINOR_LENGTH = 8;
-
- /**
- * The length of the prefix field, 155.
- */
- public static final int PREFIX_LENGTH = 155;
-
- /**
- * The total length of the header.
- */
- public static final int HEADER_LENGTH = NAME_LENGTH + MODE_LENGTH + UID_LENGTH + GID_LENGTH + SIZE_LENGTH +
- MTIME_LENGTH + CHKSUM_LENGTH + TYPEFLAG_LENGTH + LINKNAME_LENGTH +
- MAGIC_LENGTH + VERSION_LENGTH + UNAME_LENGTH + GNAME_LENGTH +
- DEVMAJOR_LENGTH + DEVMINOR_LENGTH + PREFIX_LENGTH;
-
- // type flag constants
- public static final char TF_OLDNORMAL = '\0';
- public static final char TF_NORMAL = '0';
- public static final char TF_LINK = '1';
- public static final char TF_SYMLINK = '2';
- public static final char TF_CHAR = '3';
- public static final char TF_BLOCK = '4';
- public static final char TF_DIR = '5';
- public static final char TF_FIFO = '6';
- public static final char TF_CONTIGUOUS = '7';
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarEntry.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarEntry.java
deleted file mode 100644
index 7b2800bd5..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarEntry.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.util.tar;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * This class represents a tar file entry.
- */
-public class TarEntry implements ITarConstants, Cloneable {
-
- // NOTE: Read the GNU tar specification to understand what each of the fields mean.
- // http://www.gnu.org/software/tar/manual/html_mono/tar.html#SEC118
-
- // TODO (KM): Do we need to worry about ASCII? I think we do. We are constantly
- // switching between bytes and String assuming local encoding. However, the tar specification states
- // local ASCII variant must always be used. I think our code will probably fail on non-ASCII machines
- // (e.g. Japanese, iSeries IFS, etc.). Need to test such a scenario to be sure though.
- // Also, what does local variant of ASCII mean anyway? In a Japanese locale, what would be the
- // local variant of ASCII? Can we just use US-ASCII everywhere and get away with it. I think
- // that should work. Local variant of ASCII possibly means slightly different versions of ASCII used
- // on different machines, but not between locales.
-
- // block header fields
- public byte[] name = new byte[NAME_LENGTH];
- public byte[] mode = new byte[MODE_LENGTH];
- public byte[] uid = new byte[UID_LENGTH];
- public byte[] gid = new byte[GID_LENGTH];
- public byte[] size = new byte[SIZE_LENGTH];
- public byte[] mtime = new byte[MTIME_LENGTH];
- public byte[] chksum = new byte[CHKSUM_LENGTH];
- public byte typeflag;
- public byte[] linkname = new byte[LINKNAME_LENGTH];
- public byte[] magic = new byte[MAGIC_LENGTH];
- public byte[] version = new byte[VERSION_LENGTH];
- public byte[] uname = new byte[UNAME_LENGTH];
- public byte[] gname = new byte[GNAME_LENGTH];
- public byte[] devmajor = new byte[DEVMAJOR_LENGTH];
- public byte[] devminor = new byte[DEVMINOR_LENGTH];
- public byte[] prefix = new byte[PREFIX_LENGTH];
-
- /**
- * Creates a new tar entry with the specified name. Use the setter methods to
- * populate the other fields of the entry.
- * @param name the name of the tar entry.
- * @throws NullPointerException if the name is <code>null</code>.
- * @throws IllegalArgumentException if the length of the name is greater that
- */
- public TarEntry(String name) {
- setName(name);
- }
-
- /**
- * Creates a new tar entry from the given block data. Fills in all the fields from the
- * block data.
- * @param blockData the block data.
- * @throws NullPointerException if block data is null.
- * @throws IllegalArgumentException if the block data is less than the length of a block.
- * @throws IOException if an I/O error occurs.
- */
- TarEntry(byte[] blockData) throws IOException {
- checkNull(blockData);
-
- if (blockData.length != BLOCK_SIZE) {
- throw new IllegalArgumentException();
- }
-
- populateFields(blockData);
- }
-
- /**
- * Fills in the fields of the entry from block data.
- * @param blockData data in a header block.
- * @throws IOException if an I/O error occurs.
- */
- private void populateFields(byte[] blockData) throws IOException {
-
- InputStream byteStream = new ByteArrayInputStream(blockData);
-
- // read the name
- byteStream.read(name);
-
- // if the name is an empty string, then don't fill in other fields,
- // since this indicates that we have reached end of file
- if (getName().equals("")) {
- return;
- }
-
- byteStream.read(mode);
- byteStream.read(uid);
- byteStream.read(gid);
- byteStream.read(size);
- byteStream.read(mtime);
- byteStream.read(chksum);
- typeflag = (byte)byteStream.read();
- byteStream.read(linkname);
- byteStream.read(magic);
- byteStream.read(version);
- byteStream.read(uname);
- byteStream.read(gname);
- byteStream.read(devmajor);
- byteStream.read(devminor);
- byteStream.read(prefix);
- }
-
- /**
- * Checks whether the given object is null, and throws a <code>NullPointerException</code> if the
- * obect is <code>null</code>.
- * @param o an object
- * @throws NullPointerException if the given object is <code>null</code>.
- */
- private void checkNull(Object o) {
-
- if (o == null) {
- throw new NullPointerException();
- }
- }
-
- /**
- * Sets the name of the tar entry.
- * @param fileName the name for the tar entry.
- * @throws NullPointerException if the name is <code>null</code>.
- */
- public void setName(String fileName) {
- checkNull(fileName);
-
- int length = NAME_LENGTH - fileName.length();
-
- // append null characters to the name
- for (int i = 0; i < length; i++) {
- fileName = fileName + "\0";
- }
-
- name = fileName.getBytes();
- }
-
- /**
- * Gets the name.
- * @return the name.
- */
- public String getName() {
- return (new String(name)).trim();
- }
-
- /**
- * Sets the user mod.
- * @param canRead <code>true</code> if the user has read permission, <code>false</code> otherwise.
- * @param canWrite <code>true</code> if the user has write permission, <code>false</code> otherwise.
- * @param canExecute <code>true</code> if the user has execute permission, <code>false</code> otherwise.
- */
- public void setUserMode(boolean canRead, boolean canWrite, boolean canExecute) {
-
- int mod = 00;
-
- if (canRead) {
- mod += 04;
- }
-
- if (canWrite) {
- mod += 02;
- }
-
- if (canExecute) {
- mod += 01;
- }
-
- String modString = "0100" + Integer.toString(mod, 8) + "44";
- modString = modString + "\0";
-
- mode = modString.getBytes();
- }
-
- /**
- * Gets the mode in octal.
- * @return the mode.
- */
- public String getMode() {
- return (new String(mode)).trim();
- }
-
- /**
- * Gets the uid in octal.
- * @return the uid.
- */
- public String getUID() {
- return (new String(uid)).trim();
- }
-
- /**
- * Gets the gid in octal.
- * @return the gid.
- */
- public String getGID() {
- return (new String(gid)).trim();
- }
-
- /**
- * Sets the file size in bytes.
- * @param fileSize the file size.
- */
- public void setSize(long fileSize) {
-
- // get the octal representation of the file size as a string
- String sizeString = Long.toString(fileSize, 8).trim();
-
- // get the length of the string
- int length = sizeString.length();
-
- int diff = SIZE_LENGTH - length - 1;
-
- // prepend the string with 0s
- for (int i = 0; i < diff; i++) {
- sizeString = "0" + sizeString;
- }
-
- // append a space at the end
- sizeString = sizeString + " ";
-
- size = sizeString.getBytes();
- }
-
- /**
- * Gets the size in bytes.
- * @return the size.
- */
- public long getSize() {
- return Long.parseLong((new String(size)).trim(), 8);
- }
-
- /**
- * Sets the modification time.
- * @param modTime the modification time, in milliseconds since 00:00:00 GMT, January 1, 1970.
- */
- public void setModificationTime(long modTime) {
-
- // get the octal representation of the modification time as a string
- String mtimeString = Long.toString(modTime/1000, 8).trim();
-
- // get the length of the string
- int length = mtimeString.length();
-
- int diff = MTIME_LENGTH - length - 1;
-
- // prepend the string with 0s
- for (int i = 0; i < diff; i++) {
- mtimeString = "0" + mtimeString;
- }
-
- // append a space at the end
- mtimeString = mtimeString + " ";
-
- mtime = mtimeString.getBytes();
- }
-
- /**
- * Gets the modification time, in milliseconds since 00:00:00 GMT, January 1, 1970.
- * @return the modification time.
- */
- public long getModificationTime() {
- return Long.parseLong((new String(mtime)).trim(), 8) * 1000;
- }
-
- /**
- * Gets the checksum.
- * @return the checksum.
- */
- public long getChecksum() {
- return Long.parseLong((new String(chksum)).trim(), 8);
- }
-
- /**
- * Gets the type of file archived.
- * @return the type flag.
- */
- public char getTypeFlag() {
- return (char)typeflag;
- }
-
- /**
- * Gets the link name.
- * @return the link name.
- */
- public String getLinkName() {
- return (new String(linkname)).trim();
- }
-
- /**
- * Returns whether the archive was output in the P1003 archive format.
- * This is not used.
- * @return the magic field.
- */
- public String getMagic() {
- return (new String(magic)).trim();
- }
-
- /**
- * Gets the version in octal.
- * @return the version.
- */
- public String getVersion() {
- return (new String(version)).trim();
- }
-
- /**
- * Sets the user name of the tar entry.
- * @param userName the user name for the tar entry.
- * @throws NullPointerException if the user name is <code>null</code>.
- */
- public void setUserName(String userName) {
- checkNull(userName);
-
- int length = UNAME_LENGTH - userName.length();
-
- // append null characters to the user name
- for (int i = 0; i < length; i++) {
- userName = userName + "\0";
- }
-
- uname = userName.getBytes();
- }
-
- /**
- * Gets the user name.
- * @return the user name.
- */
- public String getUserName() {
- return (new String(uname)).trim();
- }
-
- /**
- * Gets the group name.
- * @return the group name.
- */
- public String getGroupName() {
- return (new String(gname)).trim();
- }
-
- /**
- * Gets the major device number in octal.
- * @return the major device number.
- */
- public String getDevMajor() {
- return (new String(devmajor)).trim();
- }
-
- /**
- * Gets the minor device number in octal.
- * @return the minor device number.
- */
- public String getDevMinor() {
- return (new String(devminor)).trim();
- }
-
- /**
- * Gets the prefix in octal.
- * @return the prefix.
- */
- public String getPrefix() {
- return (new String(prefix)).trim();
- }
-
- /**
- * Returns whether the entry represents a directory.
- * @return <code>true</code> if the entry represents a directory, <code>false</code> otherwise.
- */
- public boolean isDirectory() {
-
- String entryName = getName();
-
- if (entryName.endsWith("/")) {
- return true;
- }
- else {
- return false;
- }
- }
-
- /**
- * Write the fields to the given output stream.
- * @param out the output stream to write to.
- */
- public void writeFields(OutputStream outStream) throws IOException {
- outStream.write(name);
- outStream.write(mode);
- outStream.write(uid);
- outStream.write(gid);
- outStream.write(size);
- outStream.write(mtime);
- outStream.write(chksum);
- outStream.write(typeflag);
- outStream.write(linkname);
- outStream.write(magic);
- outStream.write(version);
- outStream.write(uname);
- outStream.write(gname);
- outStream.write(devmajor);
- outStream.write(devminor);
- outStream.write(prefix);
- }
-
- /**
- * Calculates the checksum of the entry.
- */
- public void calculateChecksum() {
- int sum = 0;
-
- // add name bytes
- for (int i = 0; i < name.length; i++) {
- sum += name[i];
- }
-
- // add mode bytes
- for (int i = 0; i < mode.length; i++) {
- sum += mode[i];
- }
-
- // add uid bytes
- for (int i = 0; i < uid.length; i++) {
- sum += uid[i];
- }
-
- // add gid bytes
- for (int i = 0; i < gid.length; i++) {
- sum += gid[i];
- }
-
- // add size bytes
- for (int i = 0; i < size.length; i++) {
- sum += size[i];
- }
-
- // add mtime bytes
- for (int i = 0; i < mtime.length; i++) {
- sum += mtime[i];
- }
-
- // add checksum bytes assuming check sum is blank spaces
- char space = ' ';
- byte spaceByte = (byte)space;
-
- for (int i = 0; i < chksum.length; i++) {
- sum += spaceByte;
- }
-
- // add typeflag byte
- sum += typeflag;
-
- // add linkname bytes
- for (int i = 0; i < linkname.length; i++) {
- sum += linkname[i];
- }
-
- // add magic bytes
- for (int i = 0; i < magic.length; i++) {
- sum += magic[i];
- }
-
- // add version bytes
- for (int i = 0; i < version.length; i++) {
- sum += version[i];
- }
-
- // add uname bytes
- for (int i = 0; i < uname.length; i++) {
- sum += uname[i];
- }
-
- // add gname bytes
- for (int i = 0; i < gname.length; i++) {
- sum += gname[i];
- }
-
- // add devmajor bytes
- for (int i = 0; i < devmajor.length; i++) {
- sum += devmajor[i];
- }
-
- // add devminor bytes
- for (int i = 0; i < devminor.length; i++) {
- sum += devminor[i];
- }
-
- // add prefix bytes
- for (int i = 0; i < prefix.length; i++) {
- sum += prefix[i];
- }
-
- // get the octal representation of the sum as a string
- String sumString = Long.toString(sum, 8).trim();
-
- // get the length of the string
- int length = sumString.length();
-
- int diff = CHKSUM_LENGTH - length - 2;
-
- // prepend the string with 0s
- for (int i = 0; i < diff; i++) {
- sumString = "0" + sumString;
- }
-
- // append a null character
- sumString = sumString + "\0";
-
- // append a space
- sumString = sumString + " ";
-
- // set the checksum
- chksum = sumString.getBytes();
- }
-
- /**
- * @see java.lang.Object#clone()
- */
- public Object clone() throws CloneNotSupportedException {
- TarEntry newEntry = new TarEntry(getName());
- newEntry.mode = this.mode;
- newEntry.uid = this.uid;
- newEntry.gid = this.gid;
- newEntry.size = this.size;
- newEntry.mtime = this.mtime;
- newEntry.chksum = this.chksum;
- newEntry.typeflag = this.typeflag;
- newEntry.linkname = this.linkname;
- newEntry.magic = this.magic;
- newEntry.version = this.version;
- newEntry.uname = this.uname;
- newEntry.gname = this.gname;
- newEntry.devmajor = this.devmajor;
- newEntry.devminor = this.devminor;
- newEntry.prefix = this.prefix;
- return newEntry;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarFile.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarFile.java
deleted file mode 100644
index e1d03802a..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarFile.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.util.tar;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Enumeration;
-import java.util.Vector;
-
-/**
- * This class is used to read entries from a tar file.
- */
-public class TarFile implements ITarConstants {
-
- private File file;
- private Vector blockHeaders;
-
- private class TarEntryInputStream extends InputStream {
-
- private long size;
- private InputStream stream;
- private long numRead;
-
- /**
- * Creates a tar entry input stream.
- * @param size the size of the data in the tar entry.
- * @param stream the underlying input stream.
- */
- public TarEntryInputStream(long size, InputStream stream) {
- this.size = size;
- this.stream = stream;
- numRead = 0;
- }
-
- /**
- * @see java.io.InputStream#read()
- */
- public int read() throws IOException {
-
- if (numRead >= size) {
- return -1;
- }
- else {
- numRead += 1;
- return stream.read();
- }
- }
-
- /**
- * @see java.io.InputStream#available()
- */
- public int available() throws IOException {
-
- // get difference between file size and how much we have already read
- long diff = size - numRead;
-
- // get how much we can read from underlying stream.
- int av = stream.available();
-
- // return the smaller of the two
- // note although diff is a long, if it's smaller than av, we know it must fit
- // in an integer.
- return (int)Math.min(diff, av);
- }
-
-
- /**
- * @see java.io.InputStream#close()
- */
- public void close() throws IOException {
- stream.close();
- }
-
- /**
- * @see java.io.InputStream#mark(int)
- */
- public synchronized void mark(int readLimit) {
- stream.mark(readLimit);
- }
-
- /**
- * @see java.io.InputStream#markSupported()
- */
- public boolean markSupported() {
- return stream.markSupported();
- }
-
- /**
- * @see java.io.InputStream#reset()
- */
- public synchronized void reset() throws IOException {
- stream.reset();
- }
- }
-
- /**
- * Opens a tar file for reading given the specified File object.
- * @param file the tar file to be opened for reading.
- * @throws FileNotFoundException if the file does not exist.
- * @throws IOException if an I/O error occurs.
- */
- public TarFile(File file) throws FileNotFoundException, IOException {
- this.file = file;
- loadTarEntries();
- }
-
- /**
- * Opens a tar file for reading given the file name.
- * @param name the name of the tar file to be opened for reading.
- * @throws FileNotFoundException if the file with the given name does not exist.
- * @throws IOException if an I/O error occurs.
- */
- public TarFile(String name) throws FileNotFoundException, IOException {
- this(new File(name));
- }
-
- /**
- * Loads tar entries.
- * @throws FileNotFoundException if the file does not exist.
- * @throws IOException if an I/O error occurs.
- */
- private void loadTarEntries() throws FileNotFoundException, IOException {
- InputStream stream = getInputStream();
- blockHeaders = new Vector();
-
- // now read all the block headers
- byte[] blockData = readBlock(stream);
-
- // while end of stream is not reached, extract block headers
- while (blockData.length != 0) {
-
- // extract the header from the block
- TarEntry header = extractBlockHeader(blockData);
-
- // if header is not null, we add it to our list of headers
- if (header != null) {
-
- // determine how many blocks make up the contents of the file
- long fileSize = 0;
-
- // Bug 139207: Browsing into some tar archives failed
- // The reason was that the last entry in the file did not necessarily have an empty string as the name
- // of the entry and so the header is not null. The tar format does not guarantee an empty name.
- // Instead we get a NumberFormatException when reading the size. We assume that the entries
- // are not valid in such cases.
- try {
- fileSize = header.getSize();
- }
- catch (NumberFormatException e) {
- break;
- }
-
- // add header only if the size is valid
- blockHeaders.add(header);
-
- int numFileBlocks = (int)(fileSize / BLOCK_SIZE);
- numFileBlocks += (fileSize % BLOCK_SIZE) > 0 ? 1 : 0;
-
- // if the file is a symbolic link, number of blocks will be 0
- if (header.getTypeFlag() == ITarConstants.TF_SYMLINK) {
- numFileBlocks = 0;
- }
-
- // skip the blocks that contain file content
- stream.skip(numFileBlocks * BLOCK_SIZE);
- }
-
- // now read the next block
- blockData = readBlock(stream);
- }
-
- stream.close();
- }
-
- /**
- * Gets the input stream for the tar file.
- * @return the input stream for the tar file.
- * @throws FileNotFoundException if the file does not exist.
- */
- private InputStream getInputStream() throws FileNotFoundException {
- FileInputStream stream = new FileInputStream(file);
- return stream;
- }
-
- /**
- * Reads the next block.
- * @param stream the input stream of the tar file.
- * @return the data in the next block, or an empty array if end of stream has been reached.
- * @throws IOException if an I/O error occurs.
- */
- private byte[] readBlock(InputStream stream) throws IOException {
- byte[] blockData = new byte[BLOCK_SIZE];
-
- // read a block of data
- int byteRead = 0;
-
- for (int i = 0; i < BLOCK_SIZE; i++) {
- byteRead = stream.read();
-
- if (byteRead != -1) {
- blockData[i] = (byte)byteRead;
- }
- else {
- break;
- }
- }
-
- // if end of stream has been reached, return an empty array
- if (byteRead == -1) {
- return new byte[0];
- }
-
- return blockData;
- }
-
- /**
- * Extracts the header of a block given the block data.
- * @param blockData the block data.
- * @return the header of the block, or <code>null</code> if the block indicates end of file.
- */
- private TarEntry extractBlockHeader(byte[] blockData) throws IOException {
-
- TarEntry entry = new TarEntry(blockData);
-
- // if the name of the entry is an empty string, it means we have reached end of file
- // so just return null
- if (entry.getName().equals("")) {
- return null;
- }
- else {
- return entry;
- }
- }
-
- /**
- * Returns an enumeration of the tar file entries.
- * @return an enumeration of the tar file entries.
- */
- public Enumeration entries() {
- return blockHeaders.elements();
- }
-
- /**
- * Returns the number of entries in the tar file.
- * @return the number of entries in the tar file.
- */
- public int size() {
- return blockHeaders.size();
- }
-
- /**
- * Returns the tar file entry with that name, or <code>null</code> if not found.
- * @param name the name of the entry.
- * @return the tar file entry, or <code>null</code> if not found.
- */
- public TarEntry getEntry(String name) {
-
- // TODO: could we maybe keep a hash instead to make it faster?
- // The hash could be keyed by names. But tars do allow headers with the same name.
- // Research this.
- Enumeration headers = entries();
-
- // go through all block headers
- while (headers.hasMoreElements()) {
- TarEntry entry = (TarEntry)(headers.nextElement());
- String entryName = entry.getName();
-
- // if name of entry matches the given name, then that is the entry we are looking for
- if (entryName.equals(name) || entryName.equals(name + "/")) {
- return entry;
- }
- }
-
- return null;
- }
-
- /**
- * Returns the input stream of the data in the given entry.
- * @param entry the entry.
- * @return the input stream containing the data in that entry.
- * @throws IOException if an I/O error occurs.
- */
- public InputStream getInputStream(TarEntry entry) throws IOException {
- InputStream stream = getInputStream();
-
- // now read all the block headers
- byte[] blockData = readBlock(stream);
-
- // while end of stream is not reached, extract block headers
- while (blockData.length != 0) {
-
- // extract the header from the block
- TarEntry header = extractBlockHeader(blockData);
-
- // if header is not null, we add it to our list of headers
- if (header != null) {
-
- long fileSize = 0;
-
- // Bug 139207: Browsing into some tar archives failed
- // The reason was that the last entry in the file did not necessarily have an empty string as the name
- // of the entry and so the header is not null. The tar format does not guarantee an empty name.
- // Instead we get a NumberFormatException when reading the size. We assume that the entries
- // are not valid in such cases.
- try {
- fileSize = header.getSize();
- }
- catch (NumberFormatException e) {
- break;
- }
-
- // if the header name does not match the entry name
- if (!header.getName().equals(entry.getName())) {
-
- // determine how many blocks make up the contents of the file
- int numFileBlocks = (int)(fileSize / BLOCK_SIZE);
- numFileBlocks += (fileSize % BLOCK_SIZE) > 0 ? 1 : 0;
-
- // if the file is a symbolic link, number of blocks will be 0
- if (header.getTypeFlag() == ITarConstants.TF_SYMLINK) {
- numFileBlocks = 0;
- }
-
- // skip the blocks that contain file content
- stream.skip(numFileBlocks * BLOCK_SIZE);
- }
- // the header name matches the entry name, so return the input stream with
- // the data for that entry
- else {
- return new TarEntryInputStream(fileSize, stream);
- }
- }
-
- // now read the next block
- blockData = readBlock(stream);
- }
-
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarOutputStream.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarOutputStream.java
deleted file mode 100644
index 53d516d8c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/util/tar/TarOutputStream.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.services.clientserver.util.tar;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * This class implements an output stream filter for writing files in the
- * tar file format.
- */
-public class TarOutputStream extends OutputStream implements ITarConstants {
-
- private OutputStream out;
- private boolean isClosed;
- private boolean entryOpen;
- private long dataCount;
-
- /**
- * Creates a new tar output stream.
- * @param out the actual output stream.
- */
- public TarOutputStream(OutputStream out) {
- this.out = out;
- isClosed = false;
- entryOpen = false;
- }
-
- /**
- * @see java.io.OutputStream#close()
- */
- public void close() throws IOException {
-
- // if not already closed, then close the stream
- // before closing though, write out a block of empty data
- if (!isClosed) {
-
- byte[] dummy = new byte[BLOCK_SIZE];
- out.write(dummy);
-
- out.close();
-
- isClosed = true;
- }
- }
-
- /**
- * Ensure that the stream is open.
- * @throws IOException if the stream is closed.
- */
- private void ensureOpen() throws IOException {
-
- if (isClosed) {
- throw new IOException("Stream closed");
- }
- }
-
- /**
- * @see java.io.OutputStream#write(int)
- */
- public void write(int b) throws IOException {
- ensureOpen();
- out.write(b);
- dataCount += 1;
- }
-
- /**
- * Begins writing a new tar entry, and positions the stream to the start of the entry data.
- * Closes the current entry if still active.
- * @throws IOException if an I/O occurs.
- */
- public void putNextEntry(TarEntry entry) throws IOException {
-
- // previous entry open, so close it
- if (entryOpen) {
- closeEntry();
- }
-
- // defer to the entry to write the entry fields
- entry.writeFields(out);
-
- // get the part of a block we need to fill
- int diff = BLOCK_SIZE - HEADER_LENGTH;
-
- // fill the block if we have used a part of it
- if (diff != 0) {
- byte[] dummy = new byte[diff];
- out.write(dummy);
- }
-
- // set data count to 0
- dataCount = 0;
-
- // indicate that entry is open
- entryOpen = true;
- }
-
- /**
- * Closes the current tar entry, and positions the stream for writing the next entry.
- * @throws IOException if an I/O error occurs.
- */
- public void closeEntry() throws IOException {
-
- // get the part of a block
- int temp = (int)(dataCount % BLOCK_SIZE);
-
- // fill the rest of the block with dummy data if we have filled part of a block
- if (temp != 0) {
- int diff = BLOCK_SIZE - temp;
- byte[] dummy = new byte[diff];
- out.write(dummy);
- }
-
- // indicate that entry has been closed
- entryOpen = false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/patterns.dat b/rse/plugins/org.eclipse.rse.services/patterns.dat
deleted file mode 100644
index d0406e9a8..000000000
--- a/rse/plugins/org.eclipse.rse.services/patterns.dat
+++ /dev/null
@@ -1,282 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - Adapted from RSE services.local/patterns.dat
-################################################################################
-#
-# parse command line output.
-#
-# CLICK THIS LINE TO EDIT THIS FILE (PATTERNS.DAT). (When viewing from the Output view)
-
-command: grep -n.*
- grep file line pattern =([\w,.,/,(,),\\,\-,\+,\d]*):(\d*):.*
-
-command: grep -.*n.*
- grep file line pattern =([\w,.,/,(,),\\,\-,\+,\d]*):(\d*):.*
-
-command: grep .*
- grep file pattern =([\w,.,/,(,)\\,\-,\+,\d]*):.*
-
-
-command: pwd
- directory file pattern=([\w,.,/,(,),\\,\-,\+,\d,:]*)
-
-command: nmake.*
- error pattern=NMAKE : .*
- error file line pattern =([\w,.,\-,\+,(,),\\,:]*)\((\d*):(\d*)\) : error EDC.*
- error file pattern =[\w,.,\-,\+,(,),\\,:]*\(([\w,.,/,\\]*)\) : error LNK.*
- error file line pattern=([\w,.,/,\-,\+,(,),\\]*):(\d*):\d*\) : error .*
- warning file line pattern=([\w,.,/,\-,\+,(,),\\]*)\((\d*):\d*\) : warning .*
- informational file line pattern=([\w,.,/,\-,\+,(,),\\]*)\((\d*):\d*\) : informational .*
-
-command: make.*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\",, line (\d*)\.\d*: \d*-\d* \(E\).*
- warning file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\w,.,/,(,),\-,\+,\\]*):(\d*): warning: .*
- warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
- informational file pattern =([\w,.,/,\\,\-,\+,(,)]*):.*
- informational file line pattern =In file included from ([\w,.,/,\\,\-,\+,(,)]*):(\d*):
- #iseries c compiler
- error file line pattern=[\w,.,/,\\]* Line \d* \"([\w,.,/,\\]*)\", line (\d*)\.\d*: .*
- error file line pattern=([\w,.,/,\\]*) Line (\d*)\s.*
- #makefile errors
- error file line pattern=\"([\w,\.,/,(,),\-,\+,\\]*)\", line (\d*): make:.*
- #xlc Options warnings
- warning pattern=\(W\) Option .*
- #c89 errors
- error file line pattern=ERROR CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .*
- warning file line pattern=WARNING CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .*
- informational pattern=CBC\d*\(I\) .*
-
-command: gmake.*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- warning file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\w,.,/,(,),\-,\+,\\]*):(\d*): warning: .*
- warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- informational file line pattern =In file included from ([\w,.,/,\\,\-,\+,(,)]*):(\d*):
- # ixlc compiler
- error file line pattern=[\w,.,/,\\]* Line \d* \"([\w,.,/,\\]*)\", line (\d*)\.\d*: .*
- error file line pattern=([\w,.,/,\\]*) Line (\d*)\s.*
- # icc compiler
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.*
- error file line pattern =\"([\w,.,/,\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.*
- #generic
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
-
-command: gcc\s.*
- error file line pattern=\"([\w,.,/,\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- warning file line pattern=\"([\w,.,/,\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\w,.,/,\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*): warning: .*
- warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- error file line pattern =([\w,\.,/,\\,\-,\+,(,)]*):(\d*): error: .*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: [\w,.,/,\\,\-,\+,(,)]*: .*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
- informational file pattern =([\w,.,/,\\,\-,\+,(,)]*):.*
- informational file line pattern =In file included from ([\w,.,/,\\,\-,\+,(,)]*):(\d*):
-
-command: cc\s.*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
-
-command: CC\s.*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.*
-
-command: c89.*
- error file line pattern=ERROR CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .*
- warning file line pattern=WARNING CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .*
- informational pattern=CBC\d*\(I\) .*
-
-command: icc.*
- error file line pattern =([\w,.,/,\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.*
- error file line pattern =\"([\w,.,/,\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.*
-
-command: javac.*
- warning file line pattern=([\w,.,/,\\,\-,\+,(,),:]*):(\d*): warning.*
- error file line pattern=([\w,.,/,\\,\-,\+,(,),:]*):(\d*):.*
-
-command: .*bat\s.*
- error file line pattern=\[javac\]\s([\w,.,/,\\,:]*):(\d*):.*
- error file line pattern=file:([\w,.,/,\\,:]*):(\d*):.*
-
-command: dir.*
- directory file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
- directory file pattern=.*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
- file file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*[\d,,]*\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
- directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*)
- file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\w,.,/,\\,\s,\-,\+,\d]*)
-
-command: ls -l.*
- file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*)
- file file pattern=l[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*)\s->\s[\w,.,/,(,),\\,\-,\+\s,\d]*
- file file pattern=-.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)
- file file pattern=-.* \d{4} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)
- file file pattern=l.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)\s->\s[\w,.,/,(,),\\,\-,\+\s,\d]*
- file file pattern=l.* \d{4} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)\s->\s[\w,.,/,(,),\\,\-,\+\s,\d]*
- directory file pattern=d.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
- directory file pattern=d.*\d{4} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)
-
-command: ls -a.*
- file file pattern=-.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
- file file pattern=-.* \d{4} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
- directory file pattern=d.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
- directory file pattern=d.*\d{4} ([\w,.,/,(,),\\,\-,\+\s,\d]*)
-
-command: ls
- file file pattern=([\w,\d,.,(,),\-,\+\s]+)
-
-command: ls\s.*
- file file pattern=([\w,\d,.,(,),\-,\+\s]+)
-
-command: .*
- prompt file pattern=([\w,.,/,(,),\\,\-,\+,\d,:,\s]*)>.*
-
-command: find .*
- file file pattern=([\w,.,/,\\,(,),\-]+)
-
-command: env
- envvar pattern=[\w\d]+\=.*
-
-command: ps
- process pattern=[\s]*[\d]+\s.*
-
-command: ps .*
- process pattern=[\s]*[\d]+\s.*
-
-command: xl[C,c].*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\",, line (\d*)\.\d*: \d*-\d* \(S\).*
- error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(E\).*
- warning file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
-
-command: ixlc.*
- error file line pattern=([\w,.,/,\\]*) Line (\d*)\s.*
- error file line pattern=[\w,.,/,\\]* Line \d* \"([\w,.,/,\\]*)\", line (\d*)\.\d*: .*
-
-command: cat.*patterns.*
- warning file pattern=# .*(PATTERNS.DAT).*
- Output pattern=command: .*
- #statement pattern=#.*
- statement pattern=.* pattern.*=.*
-
-# special for autoconf
-command: ./bootstrap.sc.*
- error file line pattern=aclocal: ([\w,.,/,\\]*): (\d*):.*
- warning file line pattern=([\w,.,/,\\]*):(\d*):.*
-
-command: ./configure.*
- error file line pattern=./(configure): line (\d*): .*
-
-# How Patterns Work
-# -----------------
-#
-# Patterns are used by the Output View to allow lines that contain file names and
-# perhaps line numbers to be clicked to cause the file location to be opened in an Editor.
-# A line in this file can be 1 of 3 things:
-# 1. An empty line or a comment line (denoted by a # in column 1)
-# 2. The start of a command description (denoted by a 'command:' at the beginning of the line)
-# 3. A pattern description.
-# A formal description of the syntax of this file is included at the bottom of this file.
-#
-#
-# Command Descriptions
-# --------------------
-#
-# A Command Description consists of 2 things: A regular expression that describes the
-# command invocation, and a list of Pattern Descriptions. The regular expression
-# is used to determine what set of Pattern Descriptons to use when parsing command output.
-# For example, if you type the command 'gmake clean', the Command Descriptions are checked and
-# .*make.* would match that command. Therefore the Pattern Descriptions for .*make.* would
-# be used to parse the output of the 'gmake clean'.
-# Note: The first Command Description that is found to match the command is used, so make
-# sure you put the most specific patterns first. For example, if the nmake.* Command
-# Description appeared after .*make.*, then 'nmake install' would be matched by the .*make.*
-# Command Descripton, which is probably not what was intended.
-#
-#
-# Pattern Descriptions
-# --------------------
-#
-# A Pattern Description has the following form:
-# <obj-name> <match-info> "pattern="<reg-ex>
-#
-# where:
-# <obj-name>: The type of object that will be created in the Output View if
-# a line of output matches this pattern.
-#
-# <match-info>: This is some combination of the words "file" and "line" or nothing
-# at all. This is used to define how the backreferences in the
-# regular expression are to be interpreted. So "file line" means
-# that the first back-reference is a file, and the second is a
-# line number. This may seem unnecessary, but we added this capability
-# in the event that future releases support other types of information
-# that may be useful, such as column info (once we support it).
-#
-# <reg-ex>: A regular expression that describes a line of output. Backreferences
-# are used to store (instead of just match) the filename and line
-# number. To store a filename use the backreference ([\w,.,/,\\]*), and
-# to store a line number, use (\d*)
-#
-#
-# Note: The patterns are checked against command output and only exact matches are dealt with
-# So as an example, if you forget the .* (match everything) at the end of a pattern,
-# the match will fail if there are trailing characters in the output not accounted for by
-# the pattern
-#
-#
-# Pattern File Syntax
-# -------------------
-#
-# The pattern file syntax should be easy to grasp by looking at the ones
-# above, but for those of you who like formal grammars, here it is:
-#
-# patterns-file:
-# commands
-#
-# commands:
-# command
-# commands new-line command
-#
-# command:
-# "command:" reg-ex new-line patterns
-#
-# patterns:
-# pattern
-# patterns new-line pattern
-#
-# pattern:
-# command-name match-list "pattern=" reg-ex
-#
-# command-name:
-# String that denotes what type of object will be created if some output matches this pattern
-#
-# match-list:
-# file-or-line
-# match-list space file-or-line
-#
-# file-or-line:
-# "file" | "line"
-#
-# reg-ex:
-# A regular expression
-#
-# new-line:
-# The new-line character \n
-#
-# space:
-# The space character
-
-
diff --git a/rse/plugins/org.eclipse.rse.services/plugin.properties b/rse/plugins/org.eclipse.rse.services/plugin.properties
deleted file mode 100644
index 70b15f253..000000000
--- a/rse/plugins/org.eclipse.rse.services/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE Services Framework
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Activator.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Activator.java
deleted file mode 100644
index b6833c4da..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Activator.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.core.runtime.ILog;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends Plugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Logs an throwable to the log for this plugin.
- * @param t the Throwable to be logged.
- */
- public void logException(Throwable t) {
- ILog log = getLog();
- String id = getBundle().getSymbolicName();
- IStatus status = new Status(IStatus.ERROR, id, 0, "Unexpected exception", t);
- log.log(status);
- }
-
- //<tracing code>----------------------------------------------------
-
- private static Boolean fTracingOn = null;
- public static boolean isTracingOn() {
- if (fTracingOn==null) {
- String id = plugin.getBundle().getSymbolicName();
- String val = Platform.getDebugOption(id + "/debug"); //$NON-NLS-1$
- if ("true".equals(val)) { //$NON-NLS-1$
- fTracingOn = Boolean.TRUE;
- } else {
- fTracingOn = Boolean.FALSE;
- }
- }
- return fTracingOn.booleanValue();
- }
- public static String getTimestamp() {
- try {
- DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$
- return formatter.format(new Date());
- } catch (Exception e) {
- // If there were problems writing out the date, ignore and
- // continue since that shouldn't stop us from logging the rest
- // of the information
- }
- return Long.toString(System.currentTimeMillis());
- }
- public static void trace(String msg) {
- if (isTracingOn()) {
- String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg; //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(fullMsg);
- System.out.flush();
- }
- }
-
- //</tracing code>---------------------------------------------------
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/IService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/IService.java
deleted file mode 100644
index 70e3c5a91..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/IService.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-public interface IService
-{
- public String getName();
- public String getDescription();
- public void initService(IProgressMonitor monitor);
- public void uninitService(IProgressMonitor monitor);
- public SystemMessage getMessage(String messageID);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Mutex.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Mutex.java
deleted file mode 100644
index 60816c069..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Mutex.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.services;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A Mutual Exclusion Lock for Threads that need to access a resource
- * in a serialized manner.
- *
- * Usage Example:
- * <code>
- * private Mutex fooMutex;
- * boolean doFooSerialized()(IProgressMonitor monitor) {
- * if (fooMutex.waitForLock(monitor, 1000)) {
- * try {
- * return doFoo();
- * } finally {
- * fooMutex.release();
- * }
- * }
- * return false;
- * }
- * </code>
- */
-public class Mutex {
-
- private boolean fLocked = false;
- private List fWaitQueue = new LinkedList();
-
- /**
- * Try to acquire the lock maintained by this mutex.
- *
- * If the thread needs to wait before it can acquire the mutex, it
- * will wait in a first-come-first-serve fashion. In case a progress
- * monitor was given, it will be updated and checked for cancel every
- * second.
- *
- * @param monitor Eclipse Progress Monitor. May be <code>null</code>.
- * @param timeout Maximum wait time given in milliseconds.
- * @return <code>true</code> if the lock was obtained successfully.
- */
- public boolean waitForLock(IProgressMonitor monitor, long timeout) {
- if (Thread.interrupted()) {
- return false;
- }
- final Thread myself = Thread.currentThread();
- synchronized(fWaitQueue) {
- if (!fLocked) {
- //acquire the lock immediately.
- fLocked = true;
- return true;
- } else {
- fWaitQueue.add(myself);
- Activator.trace("Mutex: added "+myself+", size="+fWaitQueue.size()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- //need to wait for the lock.
- boolean lockAcquired = false;
- try {
- long start = System.currentTimeMillis();
- long timeLeft = timeout;
- long pollTime = (monitor!=null) ? 1000 : timeLeft;
- long nextProgressUpdate = start+500;
- boolean canceled = false;
- while (timeLeft>0 && !canceled && !lockAcquired) {
- //is it my turn yet? Check wait queue and wait
- synchronized(fWaitQueue) {
- if (!fLocked && fWaitQueue.get(0) == myself) {
- fWaitQueue.remove(0);
- Activator.trace("Mutex: SUCCESS, removed "+myself+", size="+fWaitQueue.size()); //$NON-NLS-1$ //$NON-NLS-2$
- fLocked = true;
- lockAcquired = true;
- } else {
- fWaitQueue.wait(timeLeft > pollTime ? pollTime : timeLeft);
- if (!fLocked && fWaitQueue.get(0) == myself) {
- fWaitQueue.remove(0);
- Activator.trace("Mutex: SUCCESS, removed "+myself+", size="+fWaitQueue.size()); //$NON-NLS-1$ //$NON-NLS-2$
- fLocked = true;
- lockAcquired = true;
- }
- }
- }
- if (!lockAcquired) {
- //Need to continue waiting
- Activator.trace("Mutex: wakeup "+myself+" ?"); //$NON-NLS-1$ //$NON-NLS-2$
- long curTime = System.currentTimeMillis();
- timeLeft = start + timeout - curTime;
- if (monitor!=null) {
- canceled = monitor.isCanceled();
- if (!canceled && (curTime>nextProgressUpdate)) {
- monitor.worked(1);
- nextProgressUpdate+=1000;
- }
- }
- }
- }
- } catch(InterruptedException e) {
- //canceled waiting -> no lock aquired
- } finally {
- if (!lockAcquired) {
- synchronized(fWaitQueue) {
- fWaitQueue.remove(myself);
- Activator.trace("Mutex: FAIL, removed "+myself+", size="+fWaitQueue.size()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- return lockAcquired;
- }
-
- /**
- * Release this mutex's lock.
- *
- * May only be called by the same thread that originally acquired
- * the Mutex.
- */
- public void release() {
- synchronized(fWaitQueue) {
- fLocked=false;
- if (!fWaitQueue.isEmpty()) {
- Object nextOneInQueue = fWaitQueue.get(0);
- Activator.trace("Mutex: releasing "+nextOneInQueue); //$NON-NLS-1$
- fWaitQueue.notifyAll();
- }
- }
- }
-
- /**
- * Return this Mutex's lock status.
- * @return <code>true</code> if this mutex is currently acquired by a thread.
- */
- public boolean isLocked() {
- synchronized(fWaitQueue) {
- return fLocked;
- }
- }
-
- /**
- * Interrupt all threads waiting for the Lock, causing their
- * {@link #waitForLock(IProgressMonitor, long)} method to return
- * <code>false</code>.
- * This should be called if the resource that the Threads are
- * contending for, becomes unavailable for some other reason.
- */
- public void interruptAll() {
- synchronized(fWaitQueue) {
- Iterator it = fWaitQueue.iterator();
- while (it.hasNext()) {
- Thread aThread = (Thread)it.next();
- aThread.interrupt();
- }
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java
deleted file mode 100644
index 3044c7269..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-
-public abstract class AbstractFileService implements IFileService
-{
-
- public static final int FILE_TYPE_FILES_AND_FOLDERS = 0;
- public static final int FILE_TYPE_FILES = 1;
- public static final int FILE_TYPE_FOLDERS = 2;
-
- public IHostFile[] getFiles(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException
- {
- return internalFetch(monitor, remoteParent, fileFilter, FILE_TYPE_FILES);
- }
-
- public IHostFile[] getFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException
- {
- return internalFetch(monitor, remoteParent, fileFilter, FILE_TYPE_FOLDERS);
- }
-
- public IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String parentPath, String fileFilter) throws SystemMessageException
- {
- return internalFetch(monitor, parentPath, fileFilter, FILE_TYPE_FILES_AND_FOLDERS);
- }
-
- protected abstract IHostFile[] internalFetch(IProgressMonitor monitor, String parentPath, String fileFilter, int fileType) throws SystemMessageException;
-
-
- protected boolean isRightType(int fileType, IHostFile node)
- {
- switch (fileType)
- {
- case FILE_TYPE_FILES_AND_FOLDERS:
- return true;
- case FILE_TYPE_FILES:
- if (node.isFile())
- {
- return true;
- }
- else
- {
- return false;
- }
- case FILE_TYPE_FOLDERS:
- if (node.isDirectory())
- {
- return true;
- }
- else
- {
- return false;
- }
- default:
- return true;
- }
- }
-
- /**
- * Dummy impl for now
- */
- public SystemMessage getMessage(String messageID)
- {
- return null;
- }
-
- public boolean deleteBatch(IProgressMonitor monitor, String[] remoteParents, String[] fileNames) throws SystemMessageException
- {
- boolean ok = true;
- for (int i = 0; i < remoteParents.length; i++)
- {
- ok = ok && delete(monitor, remoteParents[i], fileNames[i]);
- }
- return ok;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
deleted file mode 100644
index b7867b584..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-import java.io.File;
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-
-/**
- * A IFileService is an abstraction of a file service that runs over some sort of connection.
- * It can be shared among multiple instances of a subsystem. At some point this file
- * service layer may become official API but for now it is experimental. Each
- * subsystem is currently responsible for layering an abstraction over whatever it
- * wants to construct as a service.
- * <p>
- * This is a very bare bones definition. A real definition would probably have changed
- * terminology, use URI's rather than Strings, and have much more robust error handling.
- * <p>
- * Implementers of this interface will have to either be instantiated, initialized, or
- * somehow derive a connection as part of its state.
- */
-public interface IFileService extends IService
-{
-
- /**
- * Copy a file to the remote file system. The remote target is denoted by a
- * string representing the parent and a string representing the file.
- * @param monitor the monitor for this potentially long running operation
- * @param stream input stream to transfer
- * @param remoteParent - a string designating the parent folder of the target for this file.
- * @param remoteFile - a string designating the name of the file to be written on the remote system.
- * @param isBinary - indicates whether the file is text or binary
- * @param hostEncoding - the tgt encoding of the file (if text)
- * @return true if the file was uploaded
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean upload(IProgressMonitor monitor, InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding) throws SystemMessageException;
-
- /**
- * Copy a file to the remote file system. The remote target is denoted by a
- * string representing the parent and a string representing the file.
- * @param monitor the monitor for this potentially long running operation
- * @param localFile - a real file in the local file system.
- * @param remoteParent - a string designating the parent folder of the target for this file.
- * @param remoteFile - a string designating the name of the file to be written on the remote system.
- * @param isBinary - indicates whether the file is text or binary
- * @param srcEncoding - the src encoding of the file (if text)
- * @param hostEncoding - the tgt encoding of the file (if text)
- * @return true if the file was uploaded
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean upload(IProgressMonitor monitor, File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding) throws SystemMessageException;
-
- /**
- * Copy a file from the remote file system to the local system.
- * @param monitor the monitor for this potentially long running operation
- * @param remoteParent - a String designating the remote parent.
- * @param remoteFile - a String designating the remote file residing in the parent.
- * @param localFile - The file that is to be written. If the file exists it is
- * overwritten.
- * @param isBinary - indicates whether the file is text on binary
- * @param hostEncoding - the encoding on the host (if text)
- * @return true if the file was copied from the remote system.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding) throws SystemMessageException;
-
- /**
- * @param monitor the monitor for this potentially long running operation
- * @param remoteParent
- * @param name
- * @return the host file given the parent path and file name
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public IHostFile getFile(IProgressMonitor monitor, String remoteParent, String name) throws SystemMessageException;
-
- /**
- * @param monitor the monitor for this potentially long running operation
- * @param remoteParent - the name of the parent directory on the remote file
- * system from which to retrieve the child list.
- * @param fileFilter - a string that can be used to filter the children. Only
- * those files matching the filter make it into the list. The interface
- * does not dictate where the filtering occurs.
- * @return the list of host files.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException;
-
- /**
- * @param monitor the monitor for this potentially long running operation
- * @param remoteParent - the name of the parent directory on the remote file
- * system from which to retrieve the child list.
- * @param fileFilter - a string that can be used to filter the children. Only
- * those files matching the filter make it into the list. The interface
- * does not dictate where the filtering occurs.
- * @return the list of host files.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public IHostFile[] getFiles(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException;
-
- /**
- * @param monitor the monitor for this potentially long running operation
- * @param remoteParent - the name of the parent directory on the remote file
- * system from which to retrieve the child list.
- * @param fileFilter - a string that can be used to filter the children. Only
- * those files matching the filter make it into the list. The interface
- * does not dictate where the filtering occurs.
- * @return the list of host files.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public IHostFile[] getFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) throws SystemMessageException;
-
- /**
- * @param monitor the monitor for this potentially long running operation
- * Return the list of roots for this system
- * @return the list of host files.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public IHostFile[] getRoots(IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * @return the String containing the name of the user's home directory on this
- * connection that would be contained in implementations of this service.
- */
- public IHostFile getUserHome();
-
- /**
- * Create a file on the host
- * @param monitor the monitor for this potentially long running operation
- * @param remoteParent the parent directory
- * @param fileName the name of the new file
- * @return the newly created file
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public IHostFile createFile(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException;
-
- /**
- * Create a folder on the host
- * @param monitor the progress monitor
- * @param remoteParent the parent directory
- * @param folderName the name of the new folder
- * @return the newly created folder
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public IHostFile createFolder(IProgressMonitor monitor, String remoteParent, String folderName) throws SystemMessageException;
-
- /**
- * Deletes a file or folder on the host
- * @param monitor the progress monitor
- * @param remoteParent the folder containing the file to delete
- * @param fileName the name of the file or folder to delete
- * @return true if successful
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean delete(IProgressMonitor monitor, String remoteParent, String fileName) throws SystemMessageException;
-
- /**
- * Deletes a set of files or folders on the host. Should throw an exception if some files and folders were deleted and others were not
- * due to an exception during the operation. Without an exception thrown in such cases, views may not be refreshed correctly to account
- * for deleted resources.
- * @param monitor the progress monitor
- * @param remoteParents the array of folders containing the files to delete
- * @param fileNames the names of the files or folders to delete
- * @return true iff all deletes are successful
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean deleteBatch(IProgressMonitor monitor, String[] remoteParents, String[] fileNames) throws SystemMessageException;
-
- /**
- * Renames a file or folder on the host
- * @param monitor the progress monitor
- * @param remoteParent the folder containing the file to rename
- * @param oldName the old name of the file or folder to rename
- * @param newName the new name for the file
- * @return true if successful
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName) throws SystemMessageException;
-
- /**
- * Renames a file or folder on the host
- * @param monitor the progress monitor
- * @param remoteParent the folder containing the file to rename
- * @param oldName the old name of the file or folder to rename
- * @param newName the new name for the file
- * @param oldFile the file to update with the change
- * @return true if successful
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean rename(IProgressMonitor monitor, String remoteParent, String oldName, String newName, IHostFile oldFile) throws SystemMessageException;
-
- /**
- * Move the file or folder specified
- * @param monitor the progress monitor
- * @param srcParent the folder containing the file or folder to move
- * @param srcName the new of the file or folder to move
- * @param tgtParent the destination folder for the move
- * @param tgtName the name of the moved file or folder
- * @return true if the file was moved
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean move(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException;
-
- /**
- * Copy the file or folder to the specified destination
- * @param monitor the progress monitor
- * @param srcParent the folder containing the file or folder to copy
- * @param srcName the new of the file or folder to copy
- * @param tgtParent the destination folder for the copy
- * @param tgtName the name of the copied file or folder
- * @return true if the file was copied successfully
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException;
-
- /**
- * Copy a set of files or folders to the specified destination
- * @param monitor the progress monitor
- * @param srcParents the folders containing each file or folder to copy
- * @param srcNames the names of the files or folders to copy
- * @param tgtParent the destination folder for the copy
- * @return true if all files were copied
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public boolean copyBatch(IProgressMonitor monitor, String[] srcParents, String[] srcNames, String tgtParent) throws SystemMessageException;
-
- /**
- * Indicates whether the file system is case sensitive
- * @return true if the file system has case sensitive file names
- */
- public boolean isCaseSensitive();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFile.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFile.java
deleted file mode 100644
index 6e4d1947c..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFile.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-/**
- * Objects that conform to this interface are delivered by the file services to their clients.
- * These objects are meant to represent objects that are files or file-like objects on a
- * remote system. These would include files, folders, directories, archives and the like.
- * <p>
- * These objects are typically "handle" objects and can be created even though their corresponding
- * remote resources do not exist - in this case, the {@link #exists()} method will return
- * <code>false</code>.
- * <p>
- * @see IFileService
- */
-public interface IHostFile {
- /**
- * Gets the simple name of the file object on the remote system.
- * @return The name of the file object on the remote system devoid of any qualifying path
- * information.
- */
- public String getName();
-
- /**
- * Gets the absolute path name of the parent object of this object on the remote file system.
- * @return The fully qualified path of any parent object for this file. This would typically be the
- * string representation of the absolute path as interpreted by the remote file system. Returns
- * <code>null</code> if {@link #isRoot()} is true.
- */
- public String getParentPath();
-
- /**
- * Gets the fully qualified path to this object in the remote file system. The name is constructed
- * as it would be used on the remote file system.
- * @return a string representing the path name. This string can be interpreted and used by its file service
- * to locate this object on the remote file system beginning
- * at the file system root.
- */
- public String getAbsolutePath();
-
- /**
- * Determines if the file system object is hidden on the remote file system.
- * @return true if and only if the file on the remote system has a "hidden" attribute or a naming
- * convention that would normal indicate that it was hidden when listing the contents of its parent
- * on that file system. It is up to the file services to conform to the correct notion of "hidden" for
- * the remote systems they support.
- */
- public boolean isHidden();
-
- /**
- * Determines if the file system object is a directory on the remote file system.
- * @return true if and only if the object on the remote system is a directory. That is, it contains
- * entries that can be interpreted as other IHostFile objects. A return value of true does not
- * necessarily imply that isFile() returns false.
- */
- public boolean isDirectory();
-
- /**
- * Determines if the file system object is a "root" directory on the remote file system.
- * @return true if and only if the object on the remote system is a directory whose simple name and
- * absolute path name are the same.
- */
- public boolean isRoot();
-
- /**
- * Determines if the file system object is a file on the remote file system.
- * @return true if and only if the object on the remote system can be considered to have "contents" that
- * have the potential to be read and written as a byte or character stream. A return value of true
- * does not necessarily imply that {@link #isDirectory()} returns false.
- */
- public boolean isFile();
-
- /**
- * Determines if the file system object is "writeable" on the remote file system.
- * @return true if and only if the object on the remote system is a file that can be written. This could
- * mean that there is write permission granted to this user or perhaps a "writable" attribute is set for the
- * file. It is up to the file services to conform to the correct notion of "writable" for the remote
- * systems they support. For directory objects this should return true if the child objects may be added
- * to or removed from the directory.
- */
- public boolean canWrite();
-
- /**
- * Determines if the file system object is "readable" on the remote file system.
- * @return true if and only if the object on the remote system is a file that can be read. This could
- * mean that there is read permission granted to this user or perhaps a "readable" attribute is set for the
- * file. It is up to the file services to conform to the correct notion of "readable" for the remote
- * systems they support. For directory objects this should return true if the user can determine the children
- * of the directory.
- */
- public boolean canRead();
-
- /**
- * Determines if the file system object exists on the remote file system.
- * @return true if and only if the remote object represented by this object exists
- * in the remote file system. Symbolic links on a UNIX file system exist even if
- * the target they point to does not exist.
- */
- public boolean exists();
-
- /**
- * Determines if the file system object represents an archive on the remote file system.
- * @return true if and only if the remote object is a file that can be "extracted" to contain other files.
- * Examples would be tar and zip files. It is up to the file services to conform to the correct notion of
- * "archive" for the remote systems they support. If a file service creates an object with
- * this attribute as true then the file service must be able to extract the contents of the archive.
- */
- public boolean isArchive();
-
- /**
- * Gets the size of the file system object on the remote file system in bytes if isFile() is true.
- * If the storage unit on the remote system is not bytes then the file service creating this must
- * convert the remote value to bytes.
- * @return the size in bytes of the file if {@link #isFile()} is true, 0L otherwise.
- */
- public long getSize();
-
- /**
- * Gets a timestamp representing the date and time of last modification to the file.
- * @return the timestamp as obtained from the remote file system.
- * The timestamp represents the time the file was modified in milliseconds from January 1, 1970, 00:00:00 UTC.
- * Note that even so, comparison of timestamps between systems should be avoided since clock resolution and
- * accuracy vary widely from system to system.
- * It may be necessary to convert from the timestamp of a remote file system to this format.
- */
- public long getModifiedDate();
-
- /**
- * Renames this abstract file handle.
- *
- * This does not physically rename the corresponding file on the
- * remote system, it merely updates internal bookkeeping for a
- * rename operation that needs to be performed separately through
- * an instance of @see IFileService.
- *
- * Therefore, this method cannot fail and no return value is given.
- *
- * @param newAbsolutePath The new path on the remote file system that
- * this file will be renamed to.
- */
- public void renameTo(String newAbsolutePath);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java
deleted file mode 100644
index c0a6b8d87..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.services.files;
-
-import org.eclipse.rse.services.clientserver.messages.IndicatorException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * Exception thrown when attempting an operation and it fails for IO reasons, such as
- * the file is read-only.
- * <p>
- * The original remote system's io message is always embedded and retrievable
- * via getRemoteException().
- */
-public class RemoteFileCancelledException extends RemoteFileIOException {
-
- /**
- * A serialVersionUID is recommended for all serializable classes.
- * This trait is inherited from Throwable.
- * This should be updated if there is a schema change for this class.
- */
- private static final long serialVersionUID = 1L;
- private static SystemMessage myMessage = null;
-
- /**
- * Constructor
- */
- public RemoteFileCancelledException() {
- super(new SystemMessageException(getMyMessage()));
- }
-
- /*
- * TODO dwd update this to retrieve the new messages when those are created
- * myMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED);
- * public static final String MSG_OPERATION_CANCELLED = "RSEG1067";
- * <Message ID="1067" Indicator="E">
- * <LevelOne>Operation cancelled.</LevelOne>
- * <LevelTwo></LevelTwo>
- * </Message>
- */
- private static SystemMessage getMyMessage() {
- String l1 = "Operation cancelled.";
- String l2 = "";
- try {
- myMessage = new SystemMessage("RSE", "G", "1067", SystemMessage.ERROR, l1, l2);
- } catch (IndicatorException e) {
- }
- return myMessage;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java
deleted file mode 100644
index 19dca2a16..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.services.files;
-import java.util.ResourceBundle;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-
-/**
- * Base class for remote file system exceptions.
- * <p>
- * All remote file exceptions are guaranteed to have a translated message retrievable
- * via getMessage(), to make it easy to display to the user.
- * <p>
- * All child exceptions potentially contain an imbedded exception that
- * is the original exception from the remote system.
- * <p>
- * Use {#link getRemoteException()} to retrieve that wrapped exception, if any.
- */
-public class RemoteFileException extends SystemMessageException
-{
- /**
- * A serialVersionUID is recommended for all serializable classes.
- * This trait is inherited from Throwable.
- * This should be updated if there is a schema change for this class.
- */
- private static final long serialVersionUID = 1L;
- private Exception wrappedException = null;
-
- /**
- * Constructor for RemoteFileException with an error message for getMessage() to return.
- * @param bundle The ResourceBundle containing the error message
- * @param key The key to retrieve the message
- */
- public RemoteFileException(ResourceBundle bundle, String key)
- {
- this(getString(bundle,key), null);
- }
- /**
- * Constructor for RemoteFileException with an error message for getMessage() to return.
- * @param msg The fully resolved message
- */
- public RemoteFileException(String msg)
- {
- this(msg, null);
- }
- /**
- * Constructor for RemoteFileException with an error message for getMessage() to return,
- * and a wrapped exception to contain. It is accessed via getRemoteException().
- * @param bundle The ResourceBundle containing the error message
- * @param key The key to retrieve the message
- * @param remoteException The exception to contain within this exception
- */
- public RemoteFileException(ResourceBundle bundle, String key, Exception remoteException)
- {
- this(getString(bundle,key), remoteException);
- }
- /**
- * Constructor for RemoteFileException with an error message for getMessage() to return.
- * and a wrapped exception to contain. It is accessed via getRemoteException().
- * @param msg The fully resolved message
- * @param remoteException The exception to contain within this exception
- */
- public RemoteFileException(String msg, Exception remoteException)
- {
- super(msg);
- wrappedException = remoteException;
- }
-
- /**
- * Constructor for RemoteFileException with an error message for getMessage() to return.
- * @param msg The fully resolved message
- */
- public RemoteFileException(SystemMessage msg)
- {
- this(msg, null);
- }
- /**
- * Constructor for RemoteFileException with an error message for getMessage() to return.
- * and a wrapped exception to contain. It is accessed via getRemoteException().
- * @param msg The fully resolved message
- * @param remoteException The exception to contain within this exception
- */
- public RemoteFileException(SystemMessage msg, Exception remoteException)
- {
- super(msg);
- wrappedException = remoteException;
- }
- /**
- * @return the original remote exception
- */
- public Exception getRemoteException()
- {
- return wrappedException;
- }
-
-
- private static String getString(ResourceBundle bundle, String key)
- {
- String msg = null;
- try { msg = bundle.getString(key); } catch (Exception exc) {}
- if (msg == null)
- msg = "Message with key " + key + " not found";
- return msg;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java
deleted file mode 100644
index 870577c61..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.services.files;
-
-import org.eclipse.rse.services.clientserver.messages.IndicatorException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * Exception thrown when attempting an operation and it fails for IO reasons, such as
- * the file is read-only.
- * <p>
- * The original remote system's io message is always embedded and retrievable
- * via getRemoteException().
- */
-public class RemoteFileIOException extends RemoteFileException {
-
- /**
- * A serialVersionUID is recommended for all serializable classes.
- * This trait is inherited from Throwable.
- * This should be updated if there is a schema change for this class.
- */
- private static final long serialVersionUID = 1L;
- private static SystemMessage myMessage = null;
-
- /**
- * Constructor for RemoteFileIOException
- * @param remoteException the initial cause of this exception
- */
- public RemoteFileIOException(Exception remoteException) {
- super(getMyMessage(), remoteException);
- String secondLevel = remoteException.getMessage();
- if (secondLevel == null) {
- secondLevel = remoteException.getClass().getName();
- }
- getSystemMessage().makeSubstitution(secondLevel);
- }
-
- /*
- * TODO dwd update this to retrieve the new messages when those are created
- * myMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IO_ERROR);
- * public static final String FILEMSG_IO_ERROR = "RSEF1002";
- * <Message ID="1002" Indicator="E">
- * <LevelOne>Operation failed. File system input or output error</LevelOne>
- * <LevelTwo>Message reported from file system: %1</LevelTwo>
- * </Message>
- */
- private static SystemMessage getMyMessage() {
- String l1 = "Operation failed. File system input or output error";
- String l2 = "Message reported from file system: %1";
- try {
- myMessage = new SystemMessage("RSE", "F", "1002", SystemMessage.ERROR, l1, l2);
- } catch (IndicatorException e) {
- }
- return myMessage;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java
deleted file mode 100644
index 5d34cdd88..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.services.files;
-
-import org.eclipse.rse.services.clientserver.messages.IndicatorException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * Exception thrown when attempting an operation and it fails for security reasons.
- * The original remote system's security message is always embedded and retrievable
- * via getRemoteException().
- */
-public class RemoteFileSecurityException extends RemoteFileException {
-
- /**
- * A serialVersionUID is recommended for all serializable classes.
- * This trait is inherited from Throwable.
- * This should be updated if there is a schema change for this class.
- */
- private static final long serialVersionUID = 1L;
- private static SystemMessage myMessage = null;
-
- /**
- * Constructor
- * @param remoteException the original cause of this exception.
- */
- public RemoteFileSecurityException(Exception remoteException) {
- super(getMyMessage(), remoteException);
- String secondLevel = remoteException.getMessage();
- if (secondLevel == null) {
- secondLevel = remoteException.getClass().getName();
- }
- getSystemMessage().makeSubstitution(secondLevel);
- }
-
- /*
- * TODO dwd update this to retrieve the new messages when those are created
- * super(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR), remoteException);
- * public static final String FILEMSG_SECURITY_ERROR = "RSEF1001";
- * <Message ID="1001" Indicator="E">
- * <LevelOne>Operation failed. Security violation</LevelOne>
- * <LevelTwo>Message reported from file system: %1</LevelTwo>
- * </Message>
- */
- private static SystemMessage getMyMessage() {
- if (myMessage == null) {
- String l1 = "Operation failed. Security violation";
- String l2 = "Message reported from file system: %1";
- try {
- myMessage = new SystemMessage("RSE", "F", "1001", SystemMessage.ERROR, l1, l2);
- } catch (IndicatorException e) {
- }
- }
- return myMessage;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java
deleted file mode 100644
index dd976b132..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.services.files;
-
-import org.eclipse.rse.services.clientserver.messages.IndicatorException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * Exception thrown when attempting to delete a folder, and the folder is not empty.
- */
-public class RemoteFolderNotEmptyException extends RemoteFileException {
-
- /**
- * A serialVersionUID is recommended for all serializable classes.
- * This trait is inherited from Throwable.
- * This should be updated if there is a schema change for this class.
- */
- private static final long serialVersionUID = 1L;
- private static SystemMessage myMessage = null;
-
- /**
- * Constructor for RemoteFolderNotEmptyException when there is no remote exception to wrap
- */
- public RemoteFolderNotEmptyException() {
- this(null);
- }
-
- /**
- * Constructor for RemoteFolderNotEmptyException when there is a remote exception to wrap
- * @param remoteException the exception that caused this one to be constructed.
- */
- public RemoteFolderNotEmptyException(Exception remoteException) {
- super(getMyMessage(), remoteException);
- }
-
- /*
- * TODO dwd update this to retrieve the new messages when those are created
- * super(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTEMPTY), remoteException);
- * public static final String FILEMSG_FOLDER_NOTEMPTY = "RSEF1003";
- * <Message ID="1003" Indicator="E">
- * <LevelOne>Folder is not empty. Cannot delete</LevelOne>
- * <LevelTwo>The operation failed. One possible reason is that the folder is not empty</LevelTwo>
- * </Message>
- */
- private static SystemMessage getMyMessage() {
- if (myMessage == null) {
- String l1 = "Folder is not empty. Cannot delete";
- String l2 = "The operation failed. One possible reason is that the folder is not empty";
- try {
- myMessage = new SystemMessage("RSE", "F", "1003", SystemMessage.ERROR, l1, l2);
- } catch (IndicatorException e) {
- }
- }
- return myMessage;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java
deleted file mode 100644
index a77438f53..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.processes;
-
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-
-public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISystemProcessRemoteConstants
-{
- protected Object[] _properties = new Object[PROCESS_ATTRIBUTES_COUNT+1];
-
- /**
- * create a new AbstractHostProcess with the default property set
- */
- public AbstractHostProcess()
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = " "; //$NON-NLS-1$
- _properties[PROCESS_ATTRIBUTES_INDEX_GID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_PID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_PPID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" "); //$NON-NLS-1$
- _properties[PROCESS_ATTRIBUTES_INDEX_TGID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_UID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = " "; //$NON-NLS-1$
- _properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_VMRSS] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_COUNT] = " "; //set the label //$NON-NLS-1$
- }
-
- /**
- * create a new AbstractHostProcess with initial Attributes.
- * This is equivalent to constructing the object, then calling
- * setAllProperties(initialAttributes).
- * @param initialAttributes String of initial attributes
- * @see #setAllProperties(String)
- */
- public AbstractHostProcess(String initialAttributes)
- {
- setAllProperties(initialAttributes);
- }
-
- protected Long getLongAttribute(String value, long dflt)
- {
- long result;
- try
- {
- result = Long.parseLong(value);
- }
- catch (NumberFormatException e)
- {
- return new Long(dflt);
- }
- return new Long(result);
- }
-
- protected Integer getIntAttribute(String value, int dflt)
- {
- int result;
- try
- {
- result = Integer.parseInt(value);
- }
- catch (NumberFormatException e)
- {
- return new Integer(dflt);
- }
- return new Integer(result);
- }
-
- public void setPid(String pid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_PID] = getLongAttribute(pid, -1);
- }
-
- public void setPPid(String ppid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_PPID] = getLongAttribute(ppid, -1);
-
- }
-
- public void setName(String name)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcess#getLabel()
- */
- public String getLabel()
- {
- return (String) _properties[PROCESS_ATTRIBUTES_COUNT];
- }
-
- public void setLabel(String label)
- {
- _properties[PROCESS_ATTRIBUTES_COUNT] = label;
- }
-
- public void setState(String state)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = state;
- }
-
- public void setTgid(String tgid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_TGID] = getLongAttribute(tgid, -1);
- }
-
- public void setTracerPid(String tracerpid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID] = getLongAttribute(tracerpid, -1);
- }
-
- public void setUid(String uid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_UID] = getLongAttribute(uid, -1);
- }
-
- public void setUsername(String username)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = username;
- }
-
- public void setGid(String gid)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_GID] = getLongAttribute(gid, -1);
- }
-
- public void setVmSizeInKB(String size)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE] = getLongAttribute(size, 0);
- }
-
- public void setVmRSSInKB(String size)
- {
- _properties[PROCESS_ATTRIBUTES_INDEX_VMRSS] = getLongAttribute(size, 0);
- }
-
- /**
- * This method allows to set all attributes at once with your own string
- * passed as a parameter, as long as the string is in the same format as
- * outlined below (pass in null to use the DataElement's string).
- * <p> The string contains properties of the object in the following order,
- * separated by {@link IServiceConstants#TOKEN_SEPARATOR}:
- * <ul>
- * <li>Process Id (pid) - long
- * <li>Executable name - String
- * <li>Status - char
- * <li>Tgid - long
- * <li>Process Parent id (ppid) - long
- * <li>Tracer pid - long
- * <li>User id (uid) - long
- * <li>Username - String
- * <li>Group id (gid) - long
- * <li>VM Size - long
- * <li>VM RSS - long
- * </ul>
- * @param allProperties Property String as defined above
- */
- public void setAllProperties(String allProperties)
- {
- String s = allProperties;
-
- if (s != null && s.length() > 0)
- {
- String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
- int numOfExpectedTokens = PROCESS_ATTRIBUTES_COUNT;
- int tokens = str.length;
- if (tokens == numOfExpectedTokens)
- {
- try
- {
- setPid(str[PROCESS_ATTRIBUTES_INDEX_PID]);
-
- setName(str[PROCESS_ATTRIBUTES_INDEX_EXENAME]);
-
- setTgid(str[PROCESS_ATTRIBUTES_INDEX_TGID]);
-
- setPPid(str[PROCESS_ATTRIBUTES_INDEX_PPID]);
-
- setTracerPid(str[PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
-
- setUid(str[PROCESS_ATTRIBUTES_INDEX_UID]);
-
- setUsername(str[PROCESS_ATTRIBUTES_INDEX_USERNAME]);
-
- setGid(str[PROCESS_ATTRIBUTES_INDEX_GID]);
-
- setVmSizeInKB(str[PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
-
- setVmRSSInKB(str[PROCESS_ATTRIBUTES_INDEX_VMRSS]);
-
- setState(str[PROCESS_ATTRIBUTES_INDEX_STATUS]);
-
- setLabel(getName());
-
- }
- catch (ArrayIndexOutOfBoundsException e)
- {
- // SystemPlugin.logError("Error in AbstractHostProcess.getAttributes(). Attributes in unexpected format. Attributes = " + s);
- }
- }
- }
- }
-
- public long getPid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_PID]).longValue();
- }
-
- public long getPPid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_PPID]).longValue();
- }
-
- public String getName()
- {
- return (String) _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME];
- }
-
- public String getState()
- {
- return (String) _properties[PROCESS_ATTRIBUTES_INDEX_STATUS];
- }
-
- public long getTgid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_TGID]).longValue();
- }
-
- public long getTracerPid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID]).longValue();
- }
-
- public long getUid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_UID]).intValue();
- }
-
- public String getUsername()
- {
- return (String) _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME];
- }
-
- public long getGid()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_GID]).intValue();
- }
-
- public boolean isRoot()
- {
- return (getPPid() == 0);
- }
-
- public long getVmSizeInKB()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE]).longValue();
- }
-
- public long getVmRSSInKB()
- {
- return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_VMRSS]).longValue();
- }
-
- /**
- * Return all the properties of this data structure in one string.
- * Properties are separated by {@link IServiceConstants#TOKEN_SEPARATOR}.
- * @see #setAllProperties(String)
- * @return String of Properties
- */
- public String getAllProperties()
- {
- String properties = ""; //$NON-NLS-1$
- for (int i = 0; i < PROCESS_ATTRIBUTES_COUNT; i++)
- {
- properties = properties + _properties[i].toString();
- if (i != PROCESS_ATTRIBUTES_COUNT - 1)
- properties = properties + TOKEN_SEPARATOR;
- }
- return properties;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java
deleted file mode 100644
index 0095ca8ac..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.processes;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-public abstract class AbstractProcessService implements IProcessService
-{
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor, String exeNameFilter, String userNameFilter, String stateFilter) throws SystemMessageException
- {
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setName(exeNameFilter);
- rpfs.setUsername(userNameFilter);
- rpfs.setSpecificState(stateFilter);
- return listAllProcesses(monitor, rpfs);
- }
-
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor) throws SystemMessageException
- {
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- return listAllProcesses(monitor, rpfs);
- }
-
- /**
- * Return a single IHostProcess object for the 'init' process with pid 1.
- * @param monitor Progress monitor
- * @return Array with 1 element, the IHostProcess object for the root process
- * @throws SystemMessageException
- * @see org.eclipse.rse.services.processes.IProcessService#listRootProcesses(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IHostProcess[] listRootProcesses(IProgressMonitor monitor) throws SystemMessageException
- {
- IHostProcess[] roots = new IHostProcess[1];
- roots[0] = getProcess(monitor, 1);
- return roots;
- }
-
- public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID) throws SystemMessageException
- {
- String pPidString = "" + parentPID; //$NON-NLS-1$
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPpid(pPidString);
-
- return listAllProcesses(monitor, rpfs);
- }
-
- public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID, IHostProcessFilter filter) throws SystemMessageException
- {
- String pPidString = "" + parentPID; //$NON-NLS-1$
- filter.setPpid(pPidString);
-
- return listAllProcesses(monitor, filter);
- }
-
- public IHostProcess getParentProcess(IProgressMonitor monitor, long PID) throws SystemMessageException
- {
- return getProcess(monitor, getProcess(monitor, PID).getPPid());
- }
-
- public IHostProcess getProcess(IProgressMonitor monitor, long PID) throws SystemMessageException
- {
- String pidString = "" + PID; //$NON-NLS-1$
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPid(pidString);
-
- IHostProcess[] results = listAllProcesses(monitor, rpfs);
- if ((results == null) || (results.length == 0)) return null;
- else return results[0];
- }
-
- public SystemMessage getMessage(String messageID)
- {
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java
deleted file mode 100644
index 04fe7f4a1..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.processes;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-/**
- * An IProcessService is an abstraction of a process service that runs over some sort of connection.
- * It can be shared among multiple instances of a subsystem. Each
- * subsystem is currently responsible for layering an abstraction over whatever it
- * wants to construct as a service.
- * <p>
- * Implementers of this interface will have to either be instantiated, initialized, or
- * somehow derive a connection as part of its state.
- */
-public interface IProcessService extends IService
-{
- /**
- * Return a list of all processes on the remote system.
- * @param monitor A progress monitor to which progress will be reported
- * @return List of all processes
- * @throws SystemMessageException
- */
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a filtered list of all processes on the remote system.
- * @param monitor A progress monitor to which progress will be reported
- * @param filter An object to filter results by
- * @return Filtered list of processes
- * @throws SystemMessageException
- */
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor, IHostProcessFilter filter) throws SystemMessageException;
-
- /**
- * Return a filtered list of all processes on the remote system.
- * @param monitor A progress monitor to which progress will be reported
- * @param exeNameFilter The executable name to filter results by, or null if no exeName filtering
- * @param userNameFilter The user name to filter results by, or null if no userName filtering
- * @param stateFilter The state code to filter results by, or null if no state filtering
- * @return Filtered list of processes
- * @throws SystemMessageException
- */
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor, String exeNameFilter, String userNameFilter, String stateFilter) throws SystemMessageException;
-
- /**
- * Returns root processes on the remote system
- * @param monitor A progress monitor to which progress will be reported
- * @return List of root processes
- * @throws SystemMessageException
- */
- public IHostProcess[] listRootProcesses(IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of all remote child processes of the given parent process on the remote system
- * @param monitor A progress monitor to which progress will be reported
- * @param parentPID The ID of the parent process whose children are to be listed
- * @return List of child processes
- * @throws SystemMessageException
- */
- public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID) throws SystemMessageException;
-
- /**
- * Return a filtered list of remote child processes of the given parent process on the remote system
- * @param monitor A progress monitor to which progress will be reported
- * @param parentPID The ID of the parent process whose children are to be listed
- * @param filter A filter to narrow results by
- * @return Filtered list of child processes
- * @throws SystemMessageException
- */
- public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID, IHostProcessFilter filter) throws SystemMessageException;
-
- /**
- * Given a process, return its parent process object.
- * @param monitor A progress monitor to which progress will be reported
- * @param PID the ID of the process to return parent of.
- * @return The parent process
- * @throws SystemMessageException
- */
- public IHostProcess getParentProcess(IProgressMonitor monitor, long PID) throws SystemMessageException;
-
- /**
- * Given a pid, return an IHostProcess object for it.
- * @param monitor A progress monitor to which progress will be reported
- * @param PID The process ID of the desired process
- * @return IHostProcess object for the given pid
- * @throws SystemMessageException
- */
- public IHostProcess getProcess(IProgressMonitor monitor, long PID) throws SystemMessageException;
-
- /**
- * Kills a process.
- * @param monitor A progress monitor to which progress will be reported
- * @param PID the ID of the process to be killed.
- * @param signal the signal to send to the process
- * @return <code>false</code> if the given process doesn't exist, else <code>true</code>.
- * Throws an exception if anything fails.
- * @throws SystemMessageException
- */
- public boolean kill(IProgressMonitor monitor, long PID, String signal) throws SystemMessageException;
-
- /**
- * Returns a list of the types of signals that can be sent to
- * a process on the remote system.
- * @return the signal types, or null if there are none, or they cannot be found.
- */
- public String[] getSignalTypes();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResult.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResult.java
deleted file mode 100644
index 862dd9c6f..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResult.java
+++ /dev/null
@@ -1,252 +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.services.search;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.files.IHostFile;
-
-
-/**
- * The RemoteSearchResultImpl class is an implementation of IRemoteSearchResult.
- * It is used for storing information about a particular search result.
- */
-public class AbstractSearchResult implements IAdaptable, IHostSearchResult
-{
-
-
- private String _text;
- private int _line = 0;
- private int _index = -1;
-
- private Object _parent;
- private SystemSearchString _matchingSearchString;
- private IHostSearchResultConfiguration _configuration;
-
- private List _matches;
-
- protected class RemoteSearchResultMatch
- {
-
- private int _startOffset = -1;
- private int _endOffset = -1;
-
- private RemoteSearchResultMatch(int startOffset, int endOffset) {
- this._startOffset = startOffset;
- this._endOffset = endOffset;
- }
- }
-
- /**
- * Constructor to create a result.
- * @param parent container of the result.
- * @param searchString the search string for which the result was produced.
- */
- public AbstractSearchResult(IHostSearchResultConfiguration configuration, Object parent, SystemSearchString searchString)
- {
- _parent = parent;
- _matchingSearchString = searchString;
- _matches = new ArrayList();
- _configuration = configuration;
- }
-
-
-
- /**
- * Sets the displayable text for the search result.
- * @param text the displayable text.
- */
- public void setText(String text) {
- _text = text;
- }
-
- /**
- * Sets the associated line number for the result.
- * @param line the line number.
- */
- public void setLine(int line) {
- _line = line;
- }
-
- /**
- * Sets the index of the search result in the context of its parent.
- * @param index the index.
- */
- public void setIndex(int index) {
- _index = index;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResult#getText()
- */
- public String getText() {
- return _text;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResult#getLine()
- */
- public int getLine() {
- return _line;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResult#getIndex()
- */
- public int getIndex() {
- return _index;
- }
-
- /**
- * Gets the absolute path of the file for which the result was found.
- * @return the absolute path of the file.
- */
- public String getAbsolutePath() {
-
- if (_parent instanceof IHostFile) {
- return ((IHostFile)_parent).getAbsolutePath();
- }
- else {
- return null;
- }
- }
-
- /**
- * Gets the containing object for the search result.
- * @return the containing parent.
- */
- public Object getParent() {
- return _parent;
- }
-
- public void setParent(Object parent)
- {
- _parent = parent;
- }
-
- /**
- * Gets the associated adapter for this search result.
- * @param adapterType the adapter type.
- */
- public Object getAdapter(Class adapterType) {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Returns children of the search result, if applicable.
- * @return <code>null</code> for this implementation.
- */
- public Object[] getChildren() {
- return null;
- }
-
- /**
- * Indicates whether this search result has children
- * @return <code>false</code> since there are no children.
- */
- public boolean hasChildren() {
- return false;
- }
-
- /**
- * Gets the displayable label for this output. Calls getText().
- * @return the label.
- */
- public String getLabel() {
- return getText();
- }
-
- /**
- * Gets the search string that this result matches.
- * @return the search string.
- */
- public SystemSearchString getMatchingSearchString() {
- return _matchingSearchString;
- }
-
- /**
- * Add a match to the result. A match comprises a char start offset and a char end offset, both
- * relative to the beginning of the file. The matches are added in order.
- * @param startOffset the char start offset, from the beginning of the file.
- * @param endOffset the char end offset, from the beginning of the file.
- */
- public void addMatch(int startOffset, int endOffset) {
- _matches.add(new RemoteSearchResultMatch(startOffset, endOffset));
- }
-
- /**
- * Gets the number of matches in this line.
- * @return the number of matches.
- */
- public int numOfMatches() {
- return _matches.size();
- }
-
- /**
- * Gets the char start offset for the given match index.
- * @param matchIndex the match index. For example, to get the start offset for the first match, specify 0.
- * @return the char start offset, or -1 if there is no match corresponding to the given index.
- */
- public int getCharStart(int matchIndex) {
- RemoteSearchResultMatch match = (RemoteSearchResultMatch)(_matches.get(matchIndex));
-
- if (match != null) {
- return match._startOffset;
- }
- else {
- return -1;
- }
- }
-
- /**
- * Gets the char end offset for the given match index.
- * @param matchIndex the match index. For example, to get the end offset for the first match, specify 0.
- * @return the char end offset, or -1 if there is no match corresponding to the given index.
- */
- public int getCharEnd(int matchIndex) {
- RemoteSearchResultMatch match = (RemoteSearchResultMatch)(_matches.get(matchIndex));
-
- if (match != null) {
- return match._endOffset;
- }
- else {
- return -1;
- }
- }
-
- /**
- * @return the char start offset of the first match.
- */
- public int getCharEnd() {
- return getCharEnd(0);
- }
-
- /**
- * @return the char end offset of the first match.
- */
- public int getCharStart() {
- return getCharStart(0);
- }
-
- public IHostSearchResultConfiguration getConfiguration()
- {
- return _configuration;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResultConfiguration.java
deleted file mode 100644
index 55e3774f0..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResultConfiguration.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-
-
-/**
- * This class represents a search result configuration. A configuration
- * consists of a search target and a search string, and belongs to a search
- * result set. Once a search has been started via a subsystem, the results
- * are stored in the configuration itself. The status of the search can also be queried from
- * the configuration.
- */
-public abstract class AbstractSearchResultConfiguration implements IHostSearchResultConfiguration
-{
-
- protected IHostSearchResultSet parentResultSet;
- protected Object searchTarget;
- protected SystemSearchString searchString;
- protected Vector results;
- protected Map _containedResults;
- protected int status;
- protected ISearchService _searchService;
- protected ISearchHandler _searchHandler;
-
-
- /**
- * Constructor for a result set configuration. Sets status to <code>RUNNING</code>.
- * @param resultSet the parent result set.
- * @param searchObject the target of the search.
- * @param searchString the search string.
- */
- public AbstractSearchResultConfiguration(IHostSearchResultSet resultSet, Object searchObject, SystemSearchString string, ISearchService searchService)
- {
- results = new Vector();
- setParentResultSet(resultSet);
- setSearchTarget(searchObject);
- setSearchString(string);
- setStatus(RUNNING);
- _searchService = searchService;
- _containedResults = new HashMap();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#setParentResultSet(org.eclipse.rse.services.search.IHostSearchResultSet)
- */
- public void setParentResultSet(IHostSearchResultSet resultSet)
- {
- this.parentResultSet = resultSet;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getParentResultSet()
- */
- public IHostSearchResultSet getParentResultSet() {
- return parentResultSet;
- }
-
- public ISearchService getSearchService()
- {
- return _searchService;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#setSearchTarget(java.lang.Object)
- */
- public void setSearchTarget(Object searchObject) {
- this.searchTarget = searchObject;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getSearchTarget()
- */
- public Object getSearchTarget() {
- return searchTarget;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#setSearchString(org.eclipse.rse.services.clientserver.SystemSearchString)
- */
- public void setSearchString(SystemSearchString string) {
- this.searchString = string;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getSearchString()
- */
- public SystemSearchString getSearchString()
- {
- return searchString;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#addResult(java.lang.Object)
- */
- public void addResult(Object result)
- {
- results.add(result);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#removeResult(java.lang.Object)
- */
- public void removeResult(Object result)
- {
- results.remove(result);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#removeAndAddResult(java.lang.Object, java.lang.Object)
- */
- public void removeAndAddResult(Object oldResult, Object newResult)
- {
- results.remove(oldResult);
- results.add(newResult);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getResults()
- */
- public Object[] getResults()
- {
- return results.toArray();
- }
-
- public IHostSearchResult[] getContainedResults(Object resultContainer)
- {
- return (IHostSearchResult[])_containedResults.get(resultContainer);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getResultsSize()
- */
- public int getResultsSize()
- {
- return results.size();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#removeResults()
- */
- public void removeResults()
- {
- results.removeAllElements();
- _containedResults.clear();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#setStatus(int)
- */
- public void setStatus(int status) {
- this.status = status;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getStatus()
- */
- public int getStatus() {
- return status;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#cancel()
- */
- public void cancel() {
-
- // if not running, return
- if (getStatus() != RUNNING) {
- return;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#dispose()
- */
- public void dispose() {
-
- // cancel search first
- cancel();
-
- // remove results
- removeResults();
- }
-
- public void addResults(Object container, IHostSearchResult[] results)
- {
- _containedResults.put(container, results);
- }
-
- public void setSearchHandler(ISearchHandler searchHandler)
- {
- _searchHandler = searchHandler;
- }
-
-
- /**
- * Gets the search handler.
- * @return the search handler.
- */
- public ISearchHandler getSearchHandler()
- {
- return _searchHandler;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java
deleted file mode 100644
index 32d81dd9b..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.files.IFileService;
-
-
-
-public abstract class AbstractSearchService implements ISearchService
-{
- protected Map _searches;
-
- public AbstractSearchService()
- {
- _searches = new HashMap();
- }
-
- public final void search(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService)
- {
- ISearchHandler handler = internalSearch(monitor, searchConfig, fileService);
- _searches.put(searchConfig, handler);
- }
-
-
- public final void cancelSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig)
- {
- ISearchHandler handler = (ISearchHandler)_searches.get(searchConfig);
- handler.cancel(monitor);
- }
-
-
- protected abstract ISearchHandler internalSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/HostSearchResultSet.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/HostSearchResultSet.java
deleted file mode 100644
index b647081bb..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/HostSearchResultSet.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-
-
-/**
- * A remote search result set represents a page in the Remote Search view.
- * A search result set contains multiple search configurations and their results.
- * This allows it to contain results from multiple connections, filters, and folders
- * (from different systems).
- */
-public class HostSearchResultSet implements IHostSearchResultSet, IAdaptable
-{
-
- protected Vector configurations;
- protected String name;
-
- /**
- * Constructor to create a result set.
- */
- public HostSearchResultSet() {
- configurations = new Vector();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#setName(java.lang.String)
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#getName()
- */
- public String getName() {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#addSearchConfiguration(org.eclipse.rse.services.search.IHostSearchResultConfiguration)
- */
- public void addSearchConfiguration(IHostSearchResultConfiguration config) {
- configurations.add(config);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#removeSearchConfiguration(org.eclipse.rse.services.search.IHostSearchResultConfiguration)
- */
- public void removeSearchConfiguration(IHostSearchResultConfiguration config) {
- configurations.remove(config);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#getSearchConfigurations()
- */
- public Iterator getSearchConfigurations() {
- return configurations.iterator();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#addResult(org.eclipse.rse.services.search.IHostSearchResultConfiguration, java.lang.Object)
- */
- public void addResult(IHostSearchResultConfiguration config, Object result) {
- config.addResult(result);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#removeResult(org.eclipse.rse.services.search.IHostSearchResultConfiguration, java.lang.Object)
- */
- public void removeResult(IHostSearchResultConfiguration config, Object result) {
- config.removeResult(result);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#getResultsForConfiguration(org.eclipse.rse.services.search.IHostSearchResultConfiguration)
- */
- public Object[] getResultsForConfiguration(IHostSearchResultConfiguration config) {
- return config.getResults();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#getAllResults()
- */
- public Object[] getAllResults() {
-
- List list = new ArrayList();
-
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext())
- {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
-
- list.addAll(Arrays.asList(config.getResults()));
- }
-
- return list.toArray();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#removeAllResults()
- */
- public void removeAllResults() {
-
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
- config.removeResults();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#getNumOfResults()
- */
- public int getNumOfResults() {
-
- int resultSize = 0;
-
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
- resultSize += config.getResultsSize();
- }
-
- return resultSize;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#cancel()
- */
- public void cancel() {
-
- // cancel each config that is running
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
-
- if (config.getStatus() == IHostSearchConstants.RUNNING) {
- config.cancel();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#removeResult(java.lang.Object)
- */
- public void removeResult(Object result) {
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
- config.removeResult(result);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#removeAndAddResult(java.lang.Object, java.lang.Object)
- */
- public void removeAndAddResult(Object oldResult, Object newResult) {
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
- config.removeAndAddResult(oldResult, newResult);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#dispose()
- */
- public void dispose() {
-
- // first cancel all configs that are still running
- cancel();
-
- // now dispose each configuration
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
- config.dispose();
- }
-
- // remove all the configurations
- configurations.removeAllElements();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#isCancelled()
- */
- public boolean isCancelled() {
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
-
- // if a config is not cancelled, the search is not cancelled
- if (config.getStatus() != IHostSearchConstants.CANCELLED) {
- return false;
- }
- }
-
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#isFinished()
- */
- public boolean isFinished() {
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
-
- // if a config is not finished, the search is not finished
- if (config.getStatus() != IHostSearchConstants.FINISHED) {
- return false;
- }
- }
-
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#isRunning()
- */
- public boolean isRunning() {
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
-
- // if a config is running, the search is running
- if (config.getStatus() == IHostSearchConstants.RUNNING) {
- return true;
- }
- }
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.search.IHostSearchResultSet#isDisconnected()
- */
- public boolean isDisconnected() {
- Iterator iter = getSearchConfigurations();
-
- while (iter.hasNext()) {
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)iter.next();
-
- // if a config is not disconnected, the search is not disconnected
- if (config.getStatus() != IHostSearchConstants.DISCONNECTED) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * @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.services/src/org/eclipse/rse/services/search/IHostSearchConstants.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchConstants.java
deleted file mode 100644
index 99e752495..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchConstants.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-public interface IHostSearchConstants {
-
- /**
- * Status indicating configuration is still running, 0.
- */
- public static final int RUNNING = 0;
-
- /**
- * Status indicating configuration has finished, 1.
- */
- public static final int FINISHED = 1;
-
- /**
- * Status indicating configuration has been cancelled, 2.
- */
- public static final int CANCELLED = 2;
-
- /**
- * Status indicating configuration has been disconnected, 3.
- */
- public static final int DISCONNECTED = 3;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResult.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResult.java
deleted file mode 100644
index f75a48c11..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResult.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-
-
-public interface IHostSearchResult
-{
- public static final String SEARCH_RESULT_DELIMITER = ":SEARCH";
- public static final String SEARCH_RESULT_OPEN_DELIMITER = "<";
- public static final String SEARCH_RESULT_CLOSE_DELIMITER = ">";
- public static final String SEARCH_RESULT_INDEX_DELIMITER = ":";
-
- public void setParent(Object parent);
-
- public Object getParent();
-
-
- public int getLine();
-
- /**
- * Gets the search string that this result matches.
- * @return the search string.
- */
- public SystemSearchString getMatchingSearchString();
-
- /**
- * Gets the path to the file that this output references if it references any. It may return null if
- * no such association exists. This may be used to jump to an editor from a view which displays
- * this
- *
- * @return the path of the referenced file if there is one
- */
- public String getAbsolutePath();
-
- /**
- * Gets the text to display for a search result.
- * @return the text.
- */
- public String getText();
-
- /**
- * Gets the index of this search result in the context of its parent.
- * @return the index.
- */
- public int getIndex();
-
-
- /**
- * Add a match to the result. A match comprises a char start offset and a char end offset, both
- * relative to the beginning of the file. The matches are added in order.
- * @param startOffset the char start offset, from the beginning of the file.
- * @param endOffset the char end offset, from the beginning of the file.
- */
- public void addMatch(int startOffset, int endOffset);
-
- /**
- * Gets the number of matches in this line.
- * @return the number of matches.
- */
- public int numOfMatches();
-
- /**
- * Gets the char start offset for the given match index.
- * @param matchIndex the match index. For example, to get the start offset for the first match, specify 0.
- * @return the char start offset.
- */
- public int getCharStart(int matchIndex);
-
- /**
- * Gets the char end offset for the given match index.
- * @param matchIndex the match index. For example, to get the end offset for the first match, specify 0.
- * @return the char end offset.
- */
- public int getCharEnd(int matchIndex);
-
-
- public IHostSearchResultConfiguration getConfiguration();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfiguration.java
deleted file mode 100644
index 5bf8e016a..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfiguration.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-
-/**
- * An interface representing a search result configuration.
- */
-public interface IHostSearchResultConfiguration extends IHostSearchConstants {
-
- /**
- * Sets the parent result set.
- * @param resultSet the parent result set.
- */
- public void setParentResultSet(IHostSearchResultSet resultSet);
-
- /**
- * Gets the parent result set.
- * @return the parent result set.
- */
- public IHostSearchResultSet getParentResultSet();
-
- /**
- * Gets the results contained within the resultContainer
- * @param resultContainer
- * @return
- */
- public IHostSearchResult[] getContainedResults(Object resultContainer);
-
- /**
- * Sets the object to be searched.
- * @param searchObject the object to be searched.
- */
- public void setSearchTarget(Object searchObject);
-
- /**
- * Gets the object to be searched.
- * @return the object to be searched.
- */
- public Object getSearchTarget();
-
- /**
- * Sets the search string.
- * @param string the search string.
- */
- public void setSearchString(SystemSearchString string);
-
- /**
- * Gets the search string.
- * @return string the search string.
- */
- public SystemSearchString getSearchString();
-
- /**
- * Adds a search result.
- * @param result a search result.
- */
- public void addResult(Object result);
-
- /**
- * Adds a set of search results along their associated container
- * @param container
- * @param results
- */
- public void addResults(Object container, IHostSearchResult[] results);
-
- /**
- * Removes a search result.
- * @param result a search result.
- */
- public void removeResult(Object result);
-
- /**
- * Removes the old result and adds a new result.
- * @param oldResult the old result.
- * @param newResult the new result.
- */
- public void removeAndAddResult(Object oldResult, Object newResult);
-
- /**
- * Gets search results.
- * @return search results.
- */
- public Object[] getResults();
-
- /**
- * Gets the size of the results.
- * @return the size of the results.
- */
- public int getResultsSize();
-
- /**
- * Removes all search results.
- */
- public void removeResults();
-
- /**
- * Sets the status of the search. One of <code>RUNNING</code>, <code>FINISHED</code>,
- * <code>CANCELLED</code>, or <code>DISCONNECTED</code>.
- * @param the status.
- */
- public void setStatus(int status);
-
- /**
- * Gets the status of the search. One of <code>RUNNING</code>, <code>FINISHED</code>,
- * <code>CANCELLED</code>, or <code>DISCONNECTED</code>.
- * @return the status of the search.
- */
- public int getStatus();
-
- /**
- * Cancels the search if it is running.
- */
- public void cancel();
-
- /**
- * Cancels the search and then removes the search results. Implementors should call <code>super</code> first.
- */
- public void dispose();
-
- /**
- * Sets the search handler
- * @param handler
- */
- public void setSearchHandler(ISearchHandler handler);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfigurationFactory.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfigurationFactory.java
deleted file mode 100644
index baf0d9d82..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfigurationFactory.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-
-public interface IHostSearchResultConfigurationFactory
-{
- public IHostSearchResultConfiguration createSearchConfiguration(IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultSet.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultSet.java
deleted file mode 100644
index dad13692f..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultSet.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import java.util.Iterator;
-
-/**
- * A remote search result set represents a page in the Remote Search view.
- * A search result set contains multiple search configurations and their results.
- * This allows it to contain results from multiple connections, filters, and folders
- * (from different systems).
- */
-public interface IHostSearchResultSet {
-
- /**
- * Sets the name of the search.
- * @param name the name of the search.
- */
- public void setName(String name);
-
- /**
- * Gets the name of the search that is being run.
- * @return the name of the search.
- */
- public String getName();
-
- /**
- * Add a search configuration.
- * @param config a search configuration.
- */
- public void addSearchConfiguration(IHostSearchResultConfiguration config);
-
- /**
- * Removes a search configuration.
- * @param config a search configuration.
- */
- public void removeSearchConfiguration(IHostSearchResultConfiguration config);
-
- /**
- * Returns an iterator over search configurations.
- * @return an iterator over search configurations.
- */
- public Iterator getSearchConfigurations();
-
- /**
- * Add a result for a search configuration.
- * @param config a search configuration that was previously added.
- * @param result a search result.
- */
- public void addResult(IHostSearchResultConfiguration config, Object result);
-
- /**
- * Removes a result from a search configuration.
- * @param config a search configuration that was previously added.
- * @param result a search result.
- */
- public void removeResult(IHostSearchResultConfiguration config, Object result);
-
- /**
- * Removes a result from all search configurations where it exists.
- * @param result a search result.
- */
- public void removeResult(Object result);
-
- /**
- * Removes the old result from configurations where it is found, and
- * add the new result to those configurations.
- * @param oldResult the old result.
- * @param newResult the new result.
- */
- public void removeAndAddResult(Object oldResult, Object newResult);
-
- /**
- * Returns the results of a particular search configuration.
- * @param config a search configuration.
- * @return the results for the given search configuration.
- */
- public Object[] getResultsForConfiguration(IHostSearchResultConfiguration config);
-
- /**
- * Returns all results of the search.
- * @return all results of the search.
- */
- public Object[] getAllResults();
-
- /**
- * Removes all results of the search.
- */
- public void removeAllResults();
-
- /**
- * Gets the number of results.
- * @return the number of results.
- */
- public int getNumOfResults();
-
- /**
- * Cancels the search. Cancel those configurations that are still running.
- */
- public void cancel();
-
- /**
- * Removes all configurations. First cancels the search, then calls the <code>dispose</code> method of
- * the configurations before removing them.
- */
- public void dispose();
-
- /**
- * Returns whether search is running. A search is running if any of the configurations is running.
- * @return <code>true</code> if the search is running, <code>false</code> otherwise.
- */
- public boolean isRunning();
-
- /**
- * Returns whether the search is cancelled. A search is cancelled if all of the configurations are
- * cancelled.
- * @return <code>true</code> if the search is cancelled, <code>false</code> otherwise.
- */
- public boolean isCancelled();
-
- /**
- * Returns whether the search is finished. A search is finished if all the configurations are finished.
- * @return <code>true</code> if the search is finished, <code>false</code> otherwise.
- */
- public boolean isFinished();
-
- /**
- * Returns whether the search is disconnected. A search is disconnected if all the configurations are
- * disconnected.
- * @return <code>true</code> if the search is disconnected, <code>false</code> otherwise.
- */
- public boolean isDisconnected();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchHandler.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchHandler.java
deleted file mode 100644
index 1fc97b5ae..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-public interface ISearchHandler
-{
- public void search(IProgressMonitor monitor);
- public void cancel(IProgressMonitor monitor);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.java
deleted file mode 100644
index 401fcef26..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.files.IFileService;
-
-public interface ISearchService
-{
- public void search(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig, IFileService fileService);
- public void cancelSearch(IProgressMonitor monitor, IHostSearchResultConfiguration searchConfig);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java
deleted file mode 100644
index 0ac8e3f75..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-
-public abstract class AbstractHostShell implements IHostShell
-{
-
- public void addOutputListener(IHostShellOutputListener listener)
- {
- IHostShellOutputReader outReader = getStandardOutputReader();
- if (outReader != null)
- {
- outReader.addOutputListener(listener);
- }
- IHostShellOutputReader errReader = getStandardErrorReader();
- if (errReader != null)
- {
- errReader.addOutputListener(listener);
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java
deleted file mode 100644
index 97fb596ec..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public abstract class AbstractHostShellOutputReader extends Thread implements IHostShellOutputReader
-{
- protected List _listeners;
- protected int _waitIncrement = 2;
- protected boolean _keepRunning = true;
-
- protected List _linesOfOutput;
- protected int _consumerOffset;
- protected IHostShell _hostShell;
- protected boolean _isErrorReader = false;
-
-
- protected long _timeOfLastEvent = 0;
- protected int _sizeAtLastEvent = 0;
-
- public AbstractHostShellOutputReader(IHostShell hostShell, boolean isErrorReader)
- {
- _hostShell = hostShell;
- _listeners = new ArrayList();
- _linesOfOutput = new ArrayList();
- _consumerOffset = 0;
- _isErrorReader = isErrorReader;
- _timeOfLastEvent = System.currentTimeMillis();
- }
-
- public boolean isErrorReader()
- {
- return _isErrorReader;
- }
-
- public IHostShell getHostShell()
- {
- return _hostShell;
- }
-
- public void setWaitTime(int value)
- {
- _waitIncrement = value;
- }
-
- public int getWaitTime()
- {
- return _waitIncrement;
- }
-
-
- public void handle()
- {
- IHostOutput line = internalReadLine();
-
- if (line != null)
- {
- addLine(line);
- }
-
- else
- {
- finish();
- }
-
- }
-
- protected void addLine(IHostOutput line)
- {
- _linesOfOutput.add(line);
- int sizenow = _linesOfOutput.size();
- int deltaSize = sizenow - _sizeAtLastEvent;
-
- long timenow = System.currentTimeMillis();
- //if ((timenow - _timeOfLastEvent) > 10 || deltaSize > 2)
- {
-
-
- // notify listeners
- HostShellChangeEvent event = new HostShellChangeEvent(_hostShell, this, _sizeAtLastEvent, deltaSize);
- fireOutputChanged(event);
- _timeOfLastEvent = timenow;
- _sizeAtLastEvent = sizenow;
- }
- }
-
- public IHostOutput readLine()
- {
- if (!isAlive())
- {
- internalReadLine();
- start();
- }
- return (IHostOutput)_linesOfOutput.get(_consumerOffset++);
- }
-
- public IHostOutput readLine(int lineNumber)
- {
- return (IHostOutput)_linesOfOutput.get(lineNumber);
- }
-
-
-
- public void setLineOffset(int lineNumber)
- {
- _consumerOffset = lineNumber;
- }
- public void addOutputListener(IHostShellOutputListener listener)
- {
- _listeners.add(listener);
- if (!isAlive())
- {
- start();
- }
- }
-
-
- public void fireOutputChanged(IHostShellChangeEvent event)
- {
- for (int i = 0; i < _listeners.size(); i++)
- {
- IHostShellOutputListener listener = (IHostShellOutputListener)_listeners.get(i);
- listener.shellOutputChanged(event);
- }
- if (!_keepRunning)
- dispose();
- }
-
- public void dispose()
- {
- _listeners.clear();
- }
-
- public boolean isFinished()
- {
- return !_keepRunning;
- }
-
- public void finish()
- {
- if (_keepRunning)
- {
-
- _waitIncrement = 0;
- _keepRunning = false;
- //dispose();
- }
- }
-
- public void run()
- {
- while (_keepRunning)
- {
- try
- {
- Thread.sleep(_waitIncrement);
- Thread.yield();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- finish();
- return;
- }
-
- handle();
- }
- }
-
- protected abstract IHostOutput internalReadLine();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/CommandPattern.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/CommandPattern.java
deleted file mode 100644
index b0fe42fd4..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/CommandPattern.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.services.shells;
-
-import java.util.ArrayList;
-import java.util.regex.Pattern;
-
-public class CommandPattern
-{
-
-
- private Pattern _pattern;
- private ArrayList _outputPatterns;
-
- public CommandPattern(Pattern theCommandPattern)
- {
- _pattern = theCommandPattern;
- _outputPatterns = new ArrayList();
- }
-
- public void addOutputPattern(OutputPattern op)
- {
- _outputPatterns.add(op);
- }
-
- public boolean matchCommand(String theLine)
- {
- return _pattern.matcher(theLine).matches();
- }
-
- public ParsedOutput matchLine(String theLine)
- {
- int patterns = _outputPatterns.size();
- ParsedOutput matchedOutput;
- OutputPattern curPattern;
- for (int i = 0; i < patterns; i++)
- {
- curPattern = (OutputPattern) _outputPatterns.get(i);
- matchedOutput = curPattern.matchLine(theLine);
- if (matchedOutput != null)
- return matchedOutput;
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellChangeEvent.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellChangeEvent.java
deleted file mode 100644
index 18775d953..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellChangeEvent.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-public class HostShellChangeEvent implements IHostShellChangeEvent
-{
- protected IHostShell _hostShell;
- protected IHostShellOutputReader _reader;
- protected int _offset;
- protected int _range;
-
- public HostShellChangeEvent(IHostShell shell, IHostShellOutputReader reader, int offset, int range)
- {
- _hostShell = shell;
- _reader = reader;
- _offset = offset;
- _range = range;
- }
-
- public IHostShell getHostShell()
- {
- return _hostShell;
- }
-
- public IHostShellOutputReader getReader()
- {
- return _reader;
- }
-
- public IHostOutput[] getLines()
- {
- IHostOutput[] lines = new IHostOutput[_range];
- int r = 0;
- int size = _offset + _range ;
- for (int i= _offset; i < size; i++)
- {
- lines[r] = _reader.readLine(i);
- r++;
- }
- return lines;
- }
-
- public IHostOutput[] getLineObjects()
- {
- return getLines();
- }
-
- public boolean isError()
- {
- return _reader.isErrorReader();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellOutputStream.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellOutputStream.java
deleted file mode 100644
index f0bc76658..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellOutputStream.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
- * 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:
- * Ewa Matejska (PalmSource)
- * Martin Oberhuber (Wind River) - moved from org.eclipse.rse.remotecdt (bug 161777)
- * Martin Oberhuber (Wind River) - improved Javadoc
- *******************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-
-/**
- * An adapter between the OutputStream and the IHostShell objects.
- * @author Ewa Matejska
- * @see IHostShell
- * @see java.io.OutputStream
- */
-public class HostShellOutputStream extends OutputStream {
-
- private IHostShell hostShell;
-
- /**
- * Constructor.
- * @param hostShell An instance of the IHostShell class.
- * The output will be sent to this instance.
- */
- public HostShellOutputStream(IHostShell hostShell) {
- this.hostShell = hostShell;
- }
-
- /**
- * Writes one byte to the shell.
- * @see java.io.OutputStream#write(byte[])
- */
- public void write(byte[] b) {
- if(hostShell != null && b != null)
- hostShell.writeToShell(new String(b));
- }
-
- /**
- * Writes multiple bytes to the shell.
- * @see java.io.OutputStream#write(byte[], int, int)
- */
- public void write(byte[] b, int off, int len) {
- if(hostShell != null && b != null)
- hostShell.writeToShell(new String(b, off, len));
- }
-
- /**
- * Writes one character to the shell.
- * @see java.io.OutputStream#write(int)
- */
- public void write(int b) throws IOException {
- char[] array = { (char) b };
- if(hostShell != null)
- hostShell.writeToShell(new String(array));
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java
deleted file mode 100644
index e728e464f..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 PalmSource, Inc.
- * 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:
- * Ewa Matejska (PalmSource) - initial version
- * Martin Oberhuber (Wind River) - adapt to IHostOutput API (bug 161773, 158312)
- * Martin Oberhuber (Wind River) - moved from org.eclipse.rse.remotecdt (bug 161777)
- * Martin Oberhuber (Wind River) - renamed from HostShellAdapter (bug 161777)
- * Martin Oberhuber (Wind River) - improved Javadoc
- *******************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-
-
-/**
- * This class represents a host shell process. It does not
- * represent one process running in the shell. This means
- * that the output of multiple shell commands will be returned
- * until the shell exits.
- *
- * @author Ewa Matejska
- */
-public class HostShellProcessAdapter extends Process implements
-IHostShellOutputListener {
-
- private IHostShell hostShell;
- private PipedInputStream inputStream = null;
- private PipedInputStream errorStream = null;
- private HostShellOutputStream outputStream = null;
-
- private PipedOutputStream hostShellInput = null;
- private PipedOutputStream hostShellError = null;
-
- /**
- * Constructor.
- * @param hostShell An instance of the IHostShell class.
- * @throws java.io.IOException
- */
- public HostShellProcessAdapter(IHostShell hostShell) throws java.io.IOException {
- this.hostShell = hostShell;
- hostShellInput = new PipedOutputStream();
- hostShellError = new PipedOutputStream();
- inputStream = new PipedInputStream(hostShellInput);
- errorStream = new PipedInputStream(hostShellError);
- outputStream = new HostShellOutputStream(hostShell);
- this.hostShell.getStandardOutputReader().addOutputListener(this);
- this.hostShell.getStandardErrorReader().addOutputListener(this);
- }
-
- /**
- * Exits the shell.
- * @see java.lang.Process#destroy()
- */
- public synchronized void destroy() {
- hostShell.exit();
- notifyAll();
- try {
- hostShellInput.close();
- hostShellError.close();
- inputStream.close();
- errorStream.close();
- outputStream.close();
- } catch (IOException e) {
- //FIXME IOException when closing one of the streams will leave others open
- // Ignore
- }
- }
-
- /**
- * There is no relevant exit value to return when the shell exits.
- * This always returns 0.
- */
- public synchronized int exitValue() {
- if(hostShell.isActive())
- throw new IllegalThreadStateException();
- // No way to tell what the exit value was.
- // TODO it would be possible to get the exit value
- // when the remote process is started like this:
- // sh -c 'remotecmd ; echo "-->RSETAG<-- $?\"'
- // Then the output steram could be examined for -->RSETAG<-- to get the exit value.
- return 0;
- }
-
- /**
- * Returns the error stream of the shell.
- * @see java.lang.Process#getErrorStream()
- */
- public InputStream getErrorStream() {
- return errorStream;
- }
-
- /**
- * Returns the input stream for the shell.
- * @see java.lang.Process#getInputStream()
- */
- public InputStream getInputStream() {
- return inputStream;
- }
-
- /**
- * Returns the output stream for the shell.
- * @see java.lang.Process#getOutputStream()
- */
- public OutputStream getOutputStream() {
- return outputStream;
- }
-
- /**
- * Waits for the shell to exit.
- * @see java.lang.Process#waitFor()
- */
- public synchronized int waitFor() throws InterruptedException {
-
- while(hostShell.isActive()) {
- try {
- wait(1000);
- } catch (InterruptedException e) {
- // ignore because we're polling to see if shell is still active.
- }
- }
-
- try {
- // Wait a second to try to get some more output from the target shell before closing.
- wait(1000);
- // Allow for the data from the stream to be read if it's available
- if (inputStream.available() != 0 || errorStream.available() != 0)
- throw new InterruptedException();
-
- hostShellInput.close();
- hostShellError.close();
- inputStream.close();
- errorStream.close();
- outputStream.close();
- } catch (IOException e) {
- // Ignore
- }
- return 0;
- }
-
- /**
- * Process an RSE Shell event, by writing the lines of text contained
- * in the event into the adapter's streams.
- * @see org.eclipse.rse.services.shells.IHostShellOutputListener#shellOutputChanged(org.eclipse.rse.services.shells.IHostShellChangeEvent)
- */
- public void shellOutputChanged(IHostShellChangeEvent event) {
- IHostOutput[] input = event.getLines();
- OutputStream outputStream = event.isError() ? hostShellError : hostShellInput;
- try {
- for(int i = 0; i < input.length; i++) {
- outputStream.write(input[i].getString().getBytes());
- outputStream.write('\n');
- outputStream.flush();
- }
- } catch(IOException e) {
- // Ignore
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostOutput.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostOutput.java
deleted file mode 100644
index 2cc4126d3..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostOutput.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed the initial implementation:
- * David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-public interface IHostOutput
-{
- public String getString();
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShell.java
deleted file mode 100644
index 8139cfcb5..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShell.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-
-public interface IHostShell
-{
- public boolean isActive();
- public void writeToShell(String command);
-
- public void addOutputListener(IHostShellOutputListener listener);
-
- public IHostShellOutputReader getStandardOutputReader();
- public IHostShellOutputReader getStandardErrorReader();
-
- public void exit();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellChangeEvent.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellChangeEvent.java
deleted file mode 100644
index 68be8f284..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellChangeEvent.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-public interface IHostShellChangeEvent
-{
- public IHostShell getHostShell();
- public IHostShellOutputReader getReader();
- public IHostOutput[] getLines();
- public boolean isError();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputListener.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputListener.java
deleted file mode 100644
index 2eba910ab..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputListener.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-public interface IHostShellOutputListener
-{
- public void shellOutputChanged(IHostShellChangeEvent event);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputNotifier.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputNotifier.java
deleted file mode 100644
index da7273e44..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputNotifier.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-public interface IHostShellOutputNotifier
-{
- public void fireOutputChanged(IHostShellChangeEvent event);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputReader.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputReader.java
deleted file mode 100644
index 103c31ff2..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IHostShellOutputReader.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-public interface IHostShellOutputReader extends IHostShellOutputNotifier
-{
- public IHostOutput readLine();
- public IHostOutput readLine(int index);
- public void addOutputListener(IHostShellOutputListener listener);
- public boolean isErrorReader();
- public void finish();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.java
deleted file mode 100644
index f57ebefda..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.IService;
-
-/**
- * IShellService is an abstraction for running shells and
- * shell commands
- *
- */
-public interface IShellService extends IService
-{
- /**
- * Launch a new shell in the specified directory
- * @param monitor
- * @param initialWorkingDirectory
- * @param environment Array of environment variable Strings of the form "var=text"
- * @return the shell object
- */
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String[] environment);
-
- /**
- * Launch a new shell in the specified directory
- * @param monitor
- * @param initialWorkingDirectory
- * @param encoding
- * @param environment Array of environment variable Strings of the form "var=text"
- * @return the shell object
- */
- public IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String encoding, String[] environment);
-
- /**
- * Run a command in it's own shell
- * @param monitor
- * @param initialWorkingDirectory
- * @param command
- * @param environment Array of environment variable Strings of the form "var=text"
- * @return the shell object for getting output and error streams
- */
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command, String[] environment);
-
- /**
- * Run a command in it's own shell
- * @param monitor
- * @param initialWorkingDirectory
- * @param command
- * @param encoding
- * @param environment Array of environment variable Strings of the form "var=text"
- * @return the shell object for getting output and error streams
- */
- public IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command, String encoding, String[] environment);
-
- /**
- * Return an array of environment variables that describe the environment on the host.
- * Each String returned is of the format "var=text": Everything up to the
- * first equals sign is the name of the given environment variable, everything
- * after the equals sign is its contents.
- * @return Array of environment variable Strings of the form "var=text"
- */
- public String[] getHostEnvironment();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/OutputPattern.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/OutputPattern.java
deleted file mode 100644
index 1974f2216..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/OutputPattern.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and International Business Machines 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.services.shells;
-
-import java.util.ArrayList;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class OutputPattern
-{
-
-
- private Pattern _pattern;
- private String _objType;
- private ArrayList _matchOrder;
-
- public OutputPattern(String objType, String matchOrder, Pattern thePattern)
- {
- _objType = objType;
- _pattern = thePattern;
-
- _matchOrder = new ArrayList();
- //Here we add a dummy first element to the ArrayList, to mimick how the PatternMatcher stores it's
- //matches (starting with group 1).
- _matchOrder.add(null);
-
- int index = 0;
- int nextSpace = 0;
- //Walk the matchOrder string parsing out words and adding them to _matchOrder...Could use StringTokenizer
- //but this seem much simpler.
- while ((nextSpace = matchOrder.indexOf(" ", index)) > 0) //$NON-NLS-1$
- {
- _matchOrder.add(matchOrder.substring(index, nextSpace).toLowerCase());
- index = nextSpace;
- while ((index < matchOrder.length()) && (matchOrder.charAt(index) == ' '))
- index++;
- }
- _matchOrder.add(matchOrder.substring(index, matchOrder.length()).toLowerCase());
-
- }
-
- public ParsedOutput matchLine(String theLine)
- {
- Matcher matcher = null;
- try
- {
- matcher = _pattern.matcher(theLine);
- if (!matcher.matches())
- return null;
- }
- catch (StringIndexOutOfBoundsException e)
- {
- //Getting an exception here, when theLine is an empty line for some patterns..should probably investigate,
- //but for now we'll just handle it...
- return null;
- }
-
- String fileString = ""; //$NON-NLS-1$
- String lineString = ""; //$NON-NLS-1$
- //Groups start at 1 (group 0 is the entire match).
- for (int i = 1; i < _matchOrder.size(); i++)
- {
- String mStr = (String)_matchOrder.get(i);
- if (mStr.equals("file")) //$NON-NLS-1$
- fileString = matcher.group(i);
- else if (mStr.equals("line")) //$NON-NLS-1$
- lineString = matcher.group(i);
- }
- int line = 1;
- if (lineString.length() > 0)
- {
- try
- {
- line = Integer.parseInt(lineString);
- }
- catch (NumberFormatException e)
- {
- }
- }
-
- return new ParsedOutput(_objType, theLine, fileString, line, 1);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/ParsedOutput.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/ParsedOutput.java
deleted file mode 100644
index 82e37851b..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/ParsedOutput.java
+++ /dev/null
@@ -1,38 +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.services.shells;
-
-//This is just a convenience object for storing information parsed out of a line of output.
-public class ParsedOutput
-{
-
-
- public String type;
- public String text;
- public String file;
- public int line;
- public int col;
-
- public ParsedOutput (String theType, String theText, String theFile, int theLine, int theColumn)
- {
- type = theType;
- text = theText;
- file = theFile;
- line = theLine;
- col = theColumn;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/Patterns.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/Patterns.java
deleted file mode 100644
index ab53981ed..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/Patterns.java
+++ /dev/null
@@ -1,120 +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.services.shells;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.regex.Pattern;
-
-import org.eclipse.rse.services.Activator;
-import org.osgi.framework.Bundle;
-
-public class Patterns {
- private ArrayList _theCommands;
- private String _currentCommand;
-
- public Patterns() {
- _theCommands = new ArrayList();
- parsePatterns();
- }
-
- private void parsePatterns() {
- Bundle bundle = Activator.getDefault().getBundle();
- URL patterns = bundle.getEntry("/patterns.dat"); //$NON-NLS-1$
- if (patterns != null) {
- try {
- InputStream in = patterns.openStream();
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
- _theCommands.clear();
- String curLine;
- CommandPattern curCommand = null;
- while ((curLine = reader.readLine()) != null) {
- curLine = curLine.trim();
- // Skip the current line if it is empty or starts with a #
- if ((curLine.length() == 0) || (curLine.charAt(0) == '#')) {
- continue;
- }
- // Check if this line is the start of a new command section
- if (curLine.startsWith("command")) { //$NON-NLS-1$
- int colon = curLine.indexOf(":"); //$NON-NLS-1$
- // Check that there is something after the colon
- if (colon == (curLine.length() - 1)) {
- continue;
- }
- Pattern thePattern = Pattern.compile(curLine.substring(colon + 1, curLine.length()).trim());
- curCommand = new CommandPattern(thePattern);
- _theCommands.add(curCommand);
- }
- // If we get here, the line must be an output pattern
- else {
- int firstSpace = curLine.indexOf(" "); //$NON-NLS-1$
- int patternWord = curLine.indexOf("pattern"); //$NON-NLS-1$
- int firstEquals = curLine.indexOf("="); //$NON-NLS-1$
- if ((firstEquals == -1) || (firstEquals == (curLine.length() - 1))) {
- continue;
- }
- String objType = curLine.substring(0, firstSpace);
- String matchOrder = curLine.substring(firstSpace + 1, patternWord).trim();
- String patternString = curLine.substring(firstEquals + 1, curLine.length());
- Pattern thePattern = Pattern.compile(patternString.trim());
- if (curCommand != null) {
- curCommand.addOutputPattern(new OutputPattern(objType, matchOrder, thePattern));
- }
- }
- }
- in.close();
- } catch (IOException e) {
- Activator.getDefault().logException(e);
- }
- }
- }
-
- public void refresh(String theCommand) {
- _currentCommand = theCommand;
- parsePatterns();
- }
-
- public void update(String theCommand) {
- _currentCommand = theCommand;
- }
-
- public ParsedOutput matchLine(String theLine) {
- CommandPattern curCommand;
- ParsedOutput matchedOutput = null;
- int commands = _theCommands.size();
- if (_currentCommand != null)
- {
-
- for (int i = 0; i < commands; i++)
- {
- curCommand = (CommandPattern) _theCommands.get(i);
- if (curCommand.matchCommand(_currentCommand))
- {
- matchedOutput = curCommand.matchLine(theLine);
- }
- if (matchedOutput != null)
- {
- return matchedOutput;
- }
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/SimpleHostOutput.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/SimpleHostOutput.java
deleted file mode 100644
index c95791008..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/SimpleHostOutput.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed the initial implementation:
- * David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.services.shells;
-
-public class SimpleHostOutput implements IHostOutput
-{
- private String _line;
- public SimpleHostOutput(String line)
- {
- _line = line;
- }
-
- public String getString()
- {
- return _line;
- }
-
- public String toString()
- {
- return _line;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/.classpath b/rse/plugins/org.eclipse.rse.shells.ui/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/.cvsignore b/rse/plugins/org.eclipse.rse.shells.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/.project b/rse/plugins/org.eclipse.rse.shells.ui/.project
deleted file mode 100644
index 9ab0849b0..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.shells.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.shells.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.shells.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 8313d7f3c..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.shells.ui;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.shells.ui.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.core.resources,
- org.eclipse.ui.views,
- org.eclipse.jface.text,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.ui.editors,
- org.eclipse.ui.forms,
- org.eclipse.ui.ide,
- org.eclipse.rse.files.ui,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.shells.ui,
- org.eclipse.rse.shells.ui.actions,
- org.eclipse.rse.shells.ui.propertypages,
- org.eclipse.rse.shells.ui.view
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/about.html b/rse/plugins/org.eclipse.rse.shells.ui/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/build.properties b/rse/plugins/org.eclipse.rse.shells.ui/build.properties
deleted file mode 100644
index 03a717010..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- about.html,\
- icons/,\
- plugin.properties,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/cview16/commands_view.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/cview16/commands_view.gif
deleted file mode 100644
index 093c6bad0..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/cview16/commands_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/cview16/errorlist_view.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/cview16/errorlist_view.gif
deleted file mode 100644
index cc87d38aa..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/cview16/errorlist_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/eview16/commands_view.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/eview16/commands_view.gif
deleted file mode 100644
index 093c6bad0..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/eview16/commands_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/eview16/errorlist_view.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/eview16/errorlist_view.gif
deleted file mode 100644
index cc87d38aa..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/eview16/errorlist_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/exportshellhistory.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/exportshellhistory.gif
deleted file mode 100644
index f4ec50b5d..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/exportshellhistory.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/exportshelloutput.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/exportshelloutput.gif
deleted file mode 100644
index 0270198bd..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/exportshelloutput.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommands_obj.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommands_obj.gif
deleted file mode 100644
index 4b42e5702..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommandslive_obj.gif
deleted file mode 100644
index 8710ab849..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshell.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshell.gif
deleted file mode 100644
index 15e833644..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshell.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshelllive.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshelllive.gif
deleted file mode 100644
index a3f79194a..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemshelllive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/view16/commands_view.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/view16/commands_view.gif
deleted file mode 100644
index 093c6bad0..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/view16/commands_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/view16/errorlist_view.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/view16/errorlist_view.gif
deleted file mode 100644
index cc87d38aa..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/view16/errorlist_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/plugin.properties b/rse/plugins/org.eclipse.rse.shells.ui/plugin.properties
deleted file mode 100644
index 4d4ce035d..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/plugin.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE Shells UI
-providerName = Eclipse.org
-
-View.Commands = Commands
-View.RemoteCommands = Remote Shell
-
-PropertyPage.ShellSettings = Shell Settings
-
-PropertyPage.ServerLauncherSettings = Server Launcher Settings
-PropertyPage.ServerConnectionSecurity = Server Connection Security
-PropertyPage.Service = Service
-PropertyPage.EnvVariables = Environment Variables
-
-Launch_Shell=Launch Shell
-Launch_Shell_Tooltip=Launch a command shell from the selected directory \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/plugin.xml b/rse/plugins/org.eclipse.rse.shells.ui/plugin.xml
deleted file mode 100644
index e892ecc87..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/plugin.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%View.RemoteCommands"
- icon="icons/full/cview16/commands_view.gif"
- category="org.eclipse.rse.ui.view"
- class="org.eclipse.rse.shells.ui.view.SystemCommandsViewPart"
- id="org.eclipse.rse.shells.ui.view.commandsView">
- </view>
- </extension>
-
-
-<!-- ============================================ -->
-<!-- Define Workbench Properties Pages -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.ui.propertyPages">
-
- <page
- objectClass="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem"
- name="%PropertyPage.EnvVariables"
- class="org.eclipse.rse.shells.ui.propertypages.EnvironmentVariablesPropertyPage"
- id="org.eclipse.rse.shells.ui.propertypages.EnvironmentVariablesPropertyPage">
-
- <!--
- <filter name="envVarPP" value="true"/>
- -->
-
- </page>
-
-
- <page
- objectClass="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem"
- name="%PropertyPage.ShellSettings"
- class="org.eclipse.rse.shells.ui.propertypages.SystemShellPropertyPage"
- id="org.eclipse.rse.shells.ui.propertypages.SystemShellPropertyPage">
- </page>
-
- <page
- objectClass="org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem"
- name="%PropertyPage.Service"
- class="org.eclipse.rse.shells.ui.propertypages.ShellServicesPropertyPage"
- id="org.eclipse.rse.shells.ui.propertypages.ShellServicesPropertyPage">
- </page>
-
- </extension>
-
-
- <extension
- point="org.eclipse.rse.ui.popupMenus">
- <objectContribution
- adaptable="false"
- typecategoryfilter="files"
- id="org.eclipse.rse.shells.ui.launch">
- <visibility>
- <and>
- <objectClass name="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- <objectState name="isdirectory" value="true"/>
- </and>
- </visibility>
- <action
- label="%Launch_Shell"
- icon="icons/full/obj16/systemshell.gif"
- tooltip="%Launch_Shell_Tooltip"
- class="org.eclipse.rse.shells.ui.actions.LaunchShellActionDelegate"
- enablesFor="1"
- id="org.eclipse.rse.shells.ui.actions.LaunchShellActionDelegate">
- </action>
- <!--
- <action
- label="test command"
- icon="icons/full/obj16/systemshell.gif"
- tooltip="%Launch_Shell_Tooltip"
- class="org.eclipse.rse.shells.ui.actions.LaunchCommandActionDelegate"
- enablesFor="1"
- id="org.eclipse.rse.shells.ui.actions.LaunchCommandActionDelegate">
- </action>
- -->
- </objectContribution>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/Activator.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/Activator.java
deleted file mode 100644
index 3d4e13a3a..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/Activator.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui;
-
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.shells.ui.view.ShellServiceSubSystemConfigurationAdapterFactory;
-import org.eclipse.rse.shells.ui.view.SystemViewOutputAdapterFactory;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
- SystemViewOutputAdapterFactory _svoaf;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception
- {
- super.start(context);
-
- IAdapterManager manager = Platform.getAdapterManager();
-
- _svoaf = new SystemViewOutputAdapterFactory();
- _svoaf.registerWithManager(manager);
-
- ShellServiceSubSystemConfigurationAdapterFactory fac = new ShellServiceSubSystemConfigurationAdapterFactory();
- fac.registerWithManager(manager);
- }
-
- /**
- * For pathpath access to our adapters for viewable remote output objects. Exploits the knowledge we use singleton adapters.
- */
- public SystemViewOutputAdapterFactory getSystemViewOutputAdapterFactory()
- {
- return _svoaf;
- }
-
- /**
- * 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.shells.ui", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java
deleted file mode 100644
index efda9bcb2..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCommandShell;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.shells.ui.view.SystemCommandsViewPart;
-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.IRemoteFileSubSystemConfiguration;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Static helpers to simplify the act of running a universal command against
- * a local or remote Unix, Windows or Linux command shell.
- */
-public class RemoteCommandHelpers
-{
-
- /**
- * Constructor for RemoteCommandHelpers.
- */
- public RemoteCommandHelpers()
- {
- super();
- }
-
- /**
- * Helper method to return the path to change-directory to, given a selected remote file object
- */
- public static String getWorkingDirectory(IRemoteFile selectedFile)
- {
- String path = null;
- if (selectedFile.isDirectory())
- path = selectedFile.getAbsolutePath();
- else
- path = selectedFile.getParentPath();
- return path;
- }
-
-
- public static IRemoteCmdSubSystem getCmdSubSystem(IHost connection)
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] sses = sr.getSubSystems(connection);
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteCmdSubSystem)
- {
- IRemoteCmdSubSystem cmdSubSystem = (RemoteCmdSubSystem)sses[i];
- return cmdSubSystem;
- }
- }
- return null;
- }
-
- public static IRemoteCmdSubSystem[] getCmdSubSystems(IHost connection)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] sses = sr.getSubSystems(connection);
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteCmdSubSystem)
- {
- IRemoteCmdSubSystem cmdSubSystem = (RemoteCmdSubSystem)sses[i];
- results.add(cmdSubSystem);
- }
- }
- return (IRemoteCmdSubSystem[])results.toArray(new IRemoteCmdSubSystem[results.size()]);
- }
-
- public static boolean runUniversalCommand(Shell shell, String cmdString, String path,
- IRemoteCmdSubSystem cmdSubSystem)
- {
- return runUniversalCommand(shell, cmdString, path, cmdSubSystem, false);
- }
-
- /**
- * Encapsulation of code needed to run a universal subsystem command. A universal
- * command is a command that runs in a Unix or Linux or Windows command shell, as
- * opposed to something unique like an OS/400 or z/OS command.
- * This:
- * <ul>
- * <li>Sets the current directory to the given path
- * <li>Runs the given command remotely
- * <li>Logs the command and its output in the command view
- * </ul>
- *
- * @param shell - the shell to use if need to prompt for password or show msg dialog
- * @param cmdString - the resolved command
- * @param path - the path to run the command against
- * @param cmdSubSystem - this connection's command subsystem, which will run the command
- * @return true if we should continue, false if something went wrong
- */
- public static boolean runUniversalCommand(Shell shell, String cmdString, String path,
- IRemoteCmdSubSystem cmdSubSystem, boolean isCompile)
- {
- boolean ok = false;
- if (cmdSubSystem != null)
- {
- ok = true;
- try
- {
-
- IRemoteCommandShell defaultShell= cmdSubSystem.getDefaultShell();
-
-
- showInView(defaultShell, isCompile, cmdString);
-
- IRemoteFileSubSystemConfiguration fileSSF = RemoteFileUtility.getFileSubSystemConfiguration(cmdSubSystem.getHost().getSystemType());
- IRemoteFile pwd = ((RemoteCommandShell)defaultShell).getWorkingDirectory();
- if (pwd == null || !pwd.getAbsolutePath().equals(path))
- {
- String cdCmd = "cd " + PathUtility.enQuoteUnix(path); //$NON-NLS-1$
- if (!fileSSF.isUnixStyle())
- {
- if (path.endsWith(":")) //$NON-NLS-1$
- {
- path += "\\"; //$NON-NLS-1$
- }
- cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
- }
-
- cmdSubSystem.sendCommandToShell(cdCmd, defaultShell);
- }
- cmdSubSystem.sendCommandToShell(cmdString, defaultShell);
-
-
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("Run Remote Command failed", e); //$NON-NLS-1$
- SystemMessageDialog.displayExceptionMessage(shell, e);
- ok = false;
- }
- } // end if
- return ok;
- } // end method
-
-
-
-
- public static void showInView(IRemoteCommandShell cmd, boolean isCompile, String cmdString) {
- SystemCommandsViewPart cmdsPart = SystemCommandsUI.getInstance().activateCommandsView();
- cmdsPart.updateOutput(cmd);
- /* DKM - no longer show this for compile commands
- if (isCompile) {
- SystemBuildErrorViewPart errorPart = SystemCommandsUI.getInstance().activateBuildErrorView();
- errorPart.setInput((IAdaptable)cmd, cmdString);
- }
- */
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/ShellResources.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/ShellResources.java
deleted file mode 100644
index a72442773..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/ShellResources.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ShellResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.shells.ui.ShellResources"; //$NON-NLS-1$
-
- public static String RESID_SHELL_PROPERTYPAGE_TITLE;
- public static String RESID_SHELL_PROPERTYPAGE_DESCRIPTION;
- public static String RESID_SHELL_PROPERTYPAGE_ENCODING;
- public static String RESID_SHELL_PROPERTYPAGE_DEFAULT_ENCODING;
- public static String RESID_SHELL_PROPERTYPAGE_HOST_ENCODING;
- public static String RESID_SHELL_PROPERTYPAGE_OTHER_ENCODING;
- public static String RESID_UNSUPPORTED_ENCODING;
-
-
- public static String RESID_SHELLS_RUN_IN_NEW_SHELL_LABEL;
- public static String RESID_SHELLS_RUN_IN_NEW_SHELL_TOOLTIP;
- public static String RESID_SHELLS_RUN_COMMAND_LABEL;
- public static String RESID_SHELLS_COMMAND_LABEL;
- public static String RESID_SHELLS_COMMAND_TOOLTIP;
- public static String RESID_SHELLS_COMMAND_SHELL_LABEL;
-
- // COMMANDS VIEW
- public static String RESID_COMMANDSVIEW_RUN_LABEL;
- public static String RESID_COMMANDSVIEW_RUN_TOOLTIP;
- public static String RESID_COMMANDSVIEW_CMDCOMBO_TOOLTIP;
- public static String RESID_COMMANDSVIEW_SUBSYSCOMBO_TOOLTIP;
- public static String RESID_PREF_COMMANDSVIEW_BRINGTOFRONT_LABEL;
- public static String RESID_PREF_COMMANDSVIEW_BRINGTOFRONT_TOOLTIP;
-
- // UNIVERSAL COMMMANDS VIEW
- public static String RESID_COMMANDSVIEW_COMMAND_LABEL;
- public static String RESID_COMMANDSVIEW_COMMAND_TOOLTIP;
- public static String RESID_COMMANDSVIEW_PREVIOUS_TOOLTIP;
-
- // ACTIONS
- public static String ACTION_RUN_COMMAND_LABEL;
- public static String ACTION_RUN_COMMAND_TOOLTIP;
-
- public static String ACTION_RUN_SHELL_LABEL;
- public static String ACTION_RUN_SHELL_TOOLTIP;
-
- public static String ACTION_LAUNCH_LABEL;
- public static String ACTION_LAUNCH_TOOLTIP;
-
- public static String ACTION_SHOW_SHELL_LABEL;
- public static String ACTION_SHOW_SHELL_TOOLTIP;
-
- public static String ACTION_CANCEL_SHELL_LABEL;
- public static String ACTION_CANCEL_SHELL_TOOLTIP;
-
- public static String ACTION_CANCEL_REMOVE_SHELL_LABEL;
- public static String ACTION_CANCEL_REMOVE_SHELL_TOOLTIP;
-
- public static String ACTION_EXPORT_SHELL_OUTPUT_LABEL;
- public static String ACTION_EXPORT_SHELL_OUTPUT_TOOLTIP;
-
- public static String ACTION_EXPORT_SHELL_HISTORY_LABEL;
- public static String ACTION_EXPORT_SHELL_HISTORY_TOOLTIP;
-
- public static String ACTION_OPEN_OUTPUT_LABEL;
- public static String ACTION_OPEN_OUTPUT_TOOLTIP;
-
- static
- {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ShellResources.class);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/ShellResources.properties b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/ShellResources.properties
deleted file mode 100644
index bd0a5fa97..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/ShellResources.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-###################################################################################
-############################ Universal Commands ############################
-###################################################################################
-RESID_SHELL_PROPERTYPAGE_TITLE=Shell Settings
-RESID_SHELL_PROPERTYPAGE_DESCRIPTION=Configure settings for shells
-RESID_SHELL_PROPERTYPAGE_ENCODING=Shell Encoding
-RESID_SHELL_PROPERTYPAGE_DEFAULT_ENCODING=Default
-RESID_SHELL_PROPERTYPAGE_HOST_ENCODING=Host encoding
-RESID_SHELL_PROPERTYPAGE_OTHER_ENCODING=Select or enter an encoding
-RESID_UNSUPPORTED_ENCODING=This is not a supported encoding
-
-RESID_SHELLS_RUN_IN_NEW_SHELL_LABEL = Run in new shell
-RESID_SHELLS_RUN_IN_NEW_SHELL_TOOLTIP = Indicate whether the command is to be launched in a new shell or the system default shell
-RESID_SHELLS_RUN_COMMAND_LABEL = Run Command
-RESID_SHELLS_COMMAND_LABEL = Command
-RESID_SHELLS_COMMAND_TOOLTIP = Enter the command to invoke
-RESID_SHELLS_COMMAND_SHELL_LABEL = Command Shell
-
-#=============================================================
-# Remote Shell View
-#=============================================================
-RESID_COMMANDSVIEW_RUN_LABEL=Run
-RESID_COMMANDSVIEW_RUN_TOOLTIP=Run the specified command on the selected subsystem and connection
-RESID_COMMANDSVIEW_CMDCOMBO_TOOLTIP=Specify the command to run
-RESID_COMMANDSVIEW_SUBSYSCOMBO_TOOLTIP=Select the subsystem on which to run a command
-RESID_PREF_COMMANDSVIEW_BRINGTOFRONT_LABEL=Show Remote Shell view when command is run
-RESID_PREF_COMMANDSVIEW_BRINGTOFRONT_TOOLTIP=Force the Remote Shell view to the foreground when a remote system command is run
-
-#=============================================================
-# Remote Shell View
-#=============================================================
-RESID_COMMANDSVIEW_COMMAND_LABEL=Command
-RESID_COMMANDSVIEW_COMMAND_TOOLTIP=Specify a command to run
-RESID_COMMANDSVIEW_PREVIOUS_TOOLTIP=Specify a previously run command
-
-#=============================================================
-# Actions
-#=============================================================
-ACTION_RUN_COMMAND_LABEL=Run Command...
-ACTION_RUN_COMMAND_TOOLTIP=Issue a command from the selected resource
-
-ACTION_RUN_SHELL_LABEL=Launch Shell
-ACTION_RUN_SHELL_TOOLTIP=Launch a new shell on the selected system
-
-ACTION_LAUNCH_LABEL=Launch
-ACTION_LAUNCH_TOOLTIP=Launch a new shell on the selected system
-
-ACTION_SHOW_SHELL_LABEL=Show in Remote Shell View
-ACTION_SHOW_SHELL_TOOLTIP=Show the selected shell in the Remote Shell view
-
-ACTION_CANCEL_SHELL_LABEL=Cancel Shell
-ACTION_CANCEL_SHELL_TOOLTIP=Terminate the selected shell
-
-ACTION_CANCEL_REMOVE_SHELL_LABEL=Remove Shell
-ACTION_CANCEL_REMOVE_SHELL_TOOLTIP=Terminate the selected shell and remove it from the Remote Shell view
-
-ACTION_EXPORT_SHELL_OUTPUT_LABEL=Export Shell Output...
-ACTION_EXPORT_SHELL_OUTPUT_TOOLTIP=Export the output of the selected shell to a file
-
-ACTION_EXPORT_SHELL_HISTORY_LABEL=Export Shell History...
-ACTION_EXPORT_SHELL_HISTORY_TOOLTIP=Export the command history for the selected shell to a file
-
-ACTION_OPEN_OUTPUT_LABEL= Goto
-ACTION_OPEN_OUTPUT_TOOLTIP= Open the selected output object in an editor or view \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/SystemRemoteCommandEntryForm.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/SystemRemoteCommandEntryForm.java
deleted file mode 100644
index d069cca1c..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/SystemRemoteCommandEntryForm.java
+++ /dev/null
@@ -1,285 +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.shells.ui;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISubSystemConfigurationCategories;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.subsystems.files.core.model.ISystemRemoteCommand;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.widgets.SystemHostCombo;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-
-/**
- * A composite encapsulating the GUI widgets for a command console. Used in the CommandView view
- * but can also be instantiated and used anywhere.
- */
-public class SystemRemoteCommandEntryForm extends Composite
- implements org.eclipse.rse.model.ISystemResourceChangeListener
-{
- private SystemHostCombo sysConnCombo;
- private IRemoteCmdSubSystem[] subSystems = null;
- private int subSystemIndex = -1;
-
- private Combo cmdCombo;
- private Combo subSysCombo;
- private Button runButton;
-
- public SystemRemoteCommandEntryForm( Composite parent, int style )
- {
- super(parent, style);
-
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 4;
- setLayout(gridLayout);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- gridData.grabExcessVerticalSpace = false;
- setLayoutData(gridData);
-
- sysConnCombo = new SystemHostCombo(this, SWT.NULL, null, false, ISubSystemConfigurationCategories.SUBSYSTEM_CATEGORY_CMDS, false);
- sysConnCombo.setWidthHint(100);
- sysConnCombo.addSelectionListener( new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- sysConnChanged();
- }
- });
- sysConnCombo.listenToConnectionEvents(true);
-
- subSysCombo = SystemWidgetHelpers.createReadonlyCombo(this, new Listener() {
- public void handleEvent(Event e) {
- subSysChanged();
- }
- }, ShellResources.RESID_COMMANDSVIEW_SUBSYSCOMBO_TOOLTIP);
- ((GridData)subSysCombo.getLayoutData()).widthHint = 100;
-
- cmdCombo = SystemWidgetHelpers.createCombo(this, new Listener() {
- public void handleEvent(Event e) {
- commandChanged();
- }
- }, ShellResources.RESID_COMMANDSVIEW_CMDCOMBO_TOOLTIP);
- cmdCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- checkRunButtonEnablement();
- }
- }
- );
- ((GridData)cmdCombo.getLayoutData()).widthHint = 250;
- cmdCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetDefaultSelected( SelectionEvent e )
- {
- handleCmdComboEnter();
- }
- } );
-
- runButton = SystemWidgetHelpers.createPushButton(this, new Listener() {
- public void handleEvent(Event e) {
- runCommand();
- }
- }, ShellResources.RESID_COMMANDSVIEW_RUN_LABEL, ShellResources.RESID_COMMANDSVIEW_RUN_TOOLTIP);
- //((GridData)runButton.getLayoutData()).widthHint = 30;
-
- pack();
-
- populateSubSysCombo();
- populateCommandCombo();
- checkRunButtonEnablement();
-
- cmdCombo.setFocus();
-
- // ----------------------------------------
- // register with system registry for events
- // ----------------------------------------
- RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- }
-
- private void runCommand()
- {
- String cmd = cmdCombo.getText();
- if ( cmd.length() > 0 )
- {
- IHost sysConn = sysConnCombo.getHost();
- if ( sysConn != null )
- {
- //SubSystem[] cmdSubSystems = RSEUIPlugin.getDefault().getSystemRegistry().getSubSystemsBySubSystemConfigurationCategory(ISubSystemConfigurationCategories.SUBSYSTEM_CATEGORY_CMDS, sysConn);
- IRemoteCmdSubSystem[] cmdSubSystems = RemoteCommandHelpers.getCmdSubSystems(sysConn);
- IRemoteCmdSubSystem currSubSystem = null;
- String subSystemName = subSysCombo.getText();
- for (int i = 0; i < cmdSubSystems.length && currSubSystem == null; i++)
- {
- if ( subSystemName.equals(cmdSubSystems[i].getName() ) )
- currSubSystem = cmdSubSystems[i];
- }
-
- if ( currSubSystem != null )
- {
- try
- {
- currSubSystem.runCommand(cmd, null);
- }
- catch ( Exception e )
- {
- SystemBasePlugin.logInfo("Exception invoking command "+cmd+" on " + sysConn.getAliasName() ); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- }
- }
-
- /**
- * Handle a change in the command combo
- */
- private void commandChanged()
- {
- checkRunButtonEnablement();
- }
-
-
- /**
- * Handle a change in the subsystem combo
- */
- private void subSysChanged()
- {
- subSystemIndex = subSysCombo.getSelectionIndex();
- populateCommandCombo();
- checkRunButtonEnablement();
- }
-
- /**
- * Handle a change in the system connection combo
- */
- private void sysConnChanged()
- {
- populateSubSysCombo();
- populateCommandCombo();
- checkRunButtonEnablement();
- }
-
- /**
- * Determine if the Run button should be enabled
- */
- private void checkRunButtonEnablement()
- {
- if ( sysConnCombo.getText().length() > 0 && subSysCombo.getText().length() > 0 && cmdCombo.getText().trim().length() > 0 )
- runButton.setEnabled(true);
- else
- runButton.setEnabled(false);
- }
-
- /**
- * Populate the list command subsystems for the selected connection
- */
- private void populateSubSysCombo()
- {
- subSysCombo.removeAll();
- IHost sysConn = sysConnCombo.getHost();
- if ( sysConn != null )
- {
- //subSystems = RSEUIPlugin.getDefault().getSystemRegistry().getSubSystemsBySubSystemConfigurationCategory(ISubSystemConfigurationCategories.SUBSYSTEM_CATEGORY_CMDS, sysConn);
- subSystems = RemoteCommandHelpers.getCmdSubSystems(sysConn);
- for (int i = 0; i < subSystems.length; i++)
- {
- if ( i == 0 )
- subSystemIndex = 0;
- subSysCombo.add(subSystems[i].getName());
- }
- subSysCombo.select(0);
- }
- }
-
- /**
- * Populate the command combo with the history of executed commands on that subsystemlist command subsystems for the selected connection
- */
- private void populateCommandCombo()
- {
- cmdCombo.removeAll();
- if ( subSystemIndex >= 0 )
- {
- String[] cmds = subSystems[subSystemIndex].getExecutedCommands();
- if ( cmds != null )
- cmdCombo.setItems( cmds );
- }
- }
-
- /**
- * This is the method in your class that will be called when a
- * system resource changes. Listen for run commands.
- * @see ISystemResourceChangeEvent
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- int type = event.getType();
- Object src = event.getSource();
- //Object parent = event.getParent();
- switch ( type )
- {
- case ISystemResourceChangeEvents.EVENT_COMMAND_RUN:
- if ( src instanceof ISystemRemoteCommand )
- {
- if ( subSystemIndex >= 0 && subSystems[subSystemIndex] == ((ISystemRemoteCommand)src).getSubSystem() )
- {
- // use asyncExec to avoid invalid Thread exceptions
- Display.getDefault().asyncExec(new Runnable() {
- public void run()
- {
- populateCommandCombo();
- }
- }
- );
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_COMMAND_MESSAGE:
- break;
- case ISystemResourceChangeEvents.EVENT_COMMAND_HISTORY_UPDATE:
- // use asyncExec to avoid invalid Thread exceptions
- Display.getDefault().asyncExec(new Runnable() {
- public void run()
- {
- populateCommandCombo();
- }
- }
- );
- break;
- }
- }
-
- private void handleCmdComboEnter()
- {
- if ( runButton.isEnabled() )
- runCommand();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/LaunchCommandActionDelegate.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/LaunchCommandActionDelegate.java
deleted file mode 100644
index d381c34bc..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/LaunchCommandActionDelegate.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.actions.ActionDelegate;
-
-public class LaunchCommandActionDelegate extends ActionDelegate implements IActionDelegate
-{
- private SystemCommandAction _launchAction;
- private ISelection _selection;
- public LaunchCommandActionDelegate()
- {
- super();
- }
-
- public void run(IAction action)
- {
- if (_launchAction == null)
- {
- _launchAction = new SystemCommandAction(SystemBasePlugin.getActiveWorkbenchShell(), false);
- }
- _launchAction.updateSelection((IStructuredSelection)_selection);
- _launchAction.run();
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection)
- {
- _selection = selection;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/LaunchShellActionDelegate.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/LaunchShellActionDelegate.java
deleted file mode 100644
index e55875db3..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/LaunchShellActionDelegate.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.actions.ActionDelegate;
-
-public class LaunchShellActionDelegate extends ActionDelegate implements IActionDelegate
-{
- private SystemCommandAction _launchAction;
- private ISelection _selection;
- public LaunchShellActionDelegate()
- {
- super();
- }
-
- public void run(IAction action)
- {
- if (_launchAction == null)
- {
- _launchAction = new SystemCommandAction(SystemBasePlugin.getActiveWorkbenchShell(), true);
- }
- _launchAction.updateSelection((IStructuredSelection)_selection);
- _launchAction.run();
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection)
- {
- _selection = selection;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemBaseShellAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemBaseShellAction.java
deleted file mode 100644
index 99cc51420..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemBaseShellAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.shells.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public abstract class SystemBaseShellAction extends SystemBaseAction
-{
- protected List _selected;
-
- public SystemBaseShellAction(String name, String tooltip, ImageDescriptor image, Shell parent)
- {
- super(name,
- tooltip,
- image,
- parent);
- setAvailableOffline(true);
- allowOnMultipleSelection(true);
- _selected = new ArrayList();
- }
-
- /**
- * Called when the selection changes. The selection is checked to
- * make sure this action can be performed on the selected object.
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = false;
- Iterator e = selection.iterator();
- _selected.clear();
- while (e.hasNext())
- {
- Object selected = e.next();
- if (selected instanceof IRemoteCommandShell)
- {
- if (isApplicable((IRemoteCommandShell)selected))
- {
- _selected.add(selected);
- enable = true;
- }
- else
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- }
-
-
- return enable;
- }
-
- protected boolean isApplicable(IRemoteCommandShell cmdShell)
- {
- return true;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemCommandAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemCommandAction.java
deleted file mode 100644
index 397449b43..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemCommandAction.java
+++ /dev/null
@@ -1,573 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.shells.ui.view.SystemCommandsViewPart;
-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.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.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Launches a shell and/or runs a shell command, displaying the output
- * in the Remote Shell view.
- */
-public class SystemCommandAction extends SystemBaseAction
-{
- private IRemoteFile _selected;
- private ISystemFilterReference _selectedFilterRef;
-
-
- private boolean _isShell;
- private IRemoteCmdSubSystem _cmdSubSystem;
-
-
- /**
- * The command dialog used when running a command.
- */
- public class CommandDialog extends SystemPromptDialog
- {
- private Combo _cmdText;
- private Button _launchNewShellButton;
- private SystemMessage _errorMessage;
-
- private String _cmdStr;
- private boolean _launchNewShell;
-
- /**
- * Constructor for the CommandDialog
- * @param shell the parent of the dialog
- */
- public CommandDialog(Shell shell)
- {
- super(shell, ShellResources.RESID_SHELLS_RUN_COMMAND_LABEL);
- //pack();
- }
-
- /**
- * @return the user-specified command invocation
- */
- public String getCmdStr()
- {
- return _cmdStr;
- }
-
- /**
- * @return whether the specified command is to be launched in a new shell or not
- */
- public boolean launchNewShell()
- {
- return _launchNewShell;
- }
-
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
- _cmdStr = _cmdText.getText();
- _launchNewShell = _launchNewShellButton.getSelection();
- close();
- }
-
- /**
- * Constructs the dialog
- * @param parent the parent of the dialog
- */
- public Control createInner(Composite parent)
- {
- Composite c = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- c.setLayout(layout);
- c.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label aLabel = new Label(c, SWT.NONE);
- aLabel.setText(ShellResources.RESID_SHELLS_COMMAND_LABEL);
-
- _cmdText = new Combo(c, SWT.SINGLE | SWT.BORDER);
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- _cmdText.setLayoutData(textData);
- _cmdText.setText(""); //$NON-NLS-1$
- _cmdText.setToolTipText(ShellResources.RESID_SHELLS_COMMAND_TOOLTIP);
-
- // add keystroke listeners...
- _cmdText.addModifyListener(new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateInvocation();
- }
- });
-
- IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
- if (cmdSubSystem != null)
- {
- String[] cmds = cmdSubSystem.getExecutedCommands();
- if (cmds != null)
- _cmdText.setItems(cmds);
- }
-
-
- _launchNewShellButton = new Button(c, SWT.CHECK);
- _launchNewShellButton.setText(ShellResources.RESID_SHELLS_RUN_IN_NEW_SHELL_LABEL);
- _launchNewShellButton.setToolTipText(ShellResources.RESID_SHELLS_RUN_IN_NEW_SHELL_TOOLTIP);
-
- setHelp();
-
- enableOkButton(false);
- return c;
- }
-
-
- /**
- * returns the initial focus control
- */
- protected Control getInitialFocusControl()
- {
- enableOkButton(false);
- return _cmdText;
- }
-
- private void setHelp()
- {
- setHelp(RSEUIPlugin.HELPPREFIX + "cmdi0000"); //$NON-NLS-1$
- }
-
- /**
- * validate the invocation
- * @return a SystemMessage if the invocation is invalid.
- */
- protected SystemMessage validateInvocation()
- {
- _errorMessage = null;
- String theNewName = _cmdText.getText();
-
- if (theNewName.length() == 0)
- {
- _errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UCMD_INVOCATION_EMPTY);
- }
-
- if (_errorMessage != null)
- {
- setErrorMessage(_errorMessage);
- enableOkButton(false);
- }
- else
- {
- clearErrorMessage();
- enableOkButton(true);
- }
-
- return _errorMessage;
- }
- }
-
- /**
- * Constructor for SystemCommandAction
- * @param parent
- */
- public SystemCommandAction(Shell parent)
- {
- this(parent, false);
- }
-
- /**
- * Constructor for SystemCommandAction
- * @param parent
- * @param isShell indication of whether this action launches a shell or runs a command
- */
- public SystemCommandAction(Shell parent, boolean isShell)
- {
- this(parent, isShell, null);
- }
-
- /**
- * Constructor for SystemCommandAction
- * @param parent
- * @param isShell indication of whether this action launches a shell or runs a command
- * @param cmdSubSystem the command subsystem to use if launching a shell
- */
- public SystemCommandAction(Shell parent, boolean isShell, IRemoteCmdSubSystem cmdSubSystem)
- {
- this(
- isShell ? ShellResources.ACTION_RUN_SHELL_LABEL : ShellResources.ACTION_RUN_COMMAND_LABEL,
- isShell ? ShellResources.ACTION_RUN_SHELL_TOOLTIP : ShellResources.ACTION_RUN_COMMAND_TOOLTIP,
- parent,
- isShell,
- cmdSubSystem);
- }
-
- /**
- * Constructor for SystemCommandAction
- * @param title the title of the action
- * @param parent
- * @param isShell indication of whether this action launches a shell or runs a command
- * @param cmdSubSystem the command subsystem to use if launching a shell
- */
- public SystemCommandAction(String title, Shell parent, boolean isShell, IRemoteCmdSubSystem cmdSubSystem)
- {
- this(title, null, parent, isShell, cmdSubSystem);
- }
-
-
- /**
- * Constructor for SystemCommandAction
- * @param title the title of the action
- * @param tooltip the tooltip for the action
- * @param parent
- * @param isShell indication of whether this action launches a shell or runs a command
- * @param cmdSubSystem the command subsystem to use if launching a shell
- */
- public SystemCommandAction(String title, String tooltip, Shell parent, boolean isShell, IRemoteCmdSubSystem cmdSubSystem)
- {
- this(
- title,
- tooltip,
- isShell ? RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHELL_ID) : RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_RUN_ID),
- parent,
- isShell,
- cmdSubSystem);
- }
-
-
- /**
- * Constructor for SystemCommandAction
- * @param title the title of the action
- * @param tooltip the tooltip for the action
- * @param descriptor the image descriptor for the action
- * @param parent
- * @param isShell indication of whether this action launches a shell or runs a command
- * @param cmdSubSystem the command subsystem to use if launching a shell
- */
- public SystemCommandAction(String title, String tooltip, ImageDescriptor descriptor, Shell parent, boolean isShell, IRemoteCmdSubSystem cmdSubSystem)
- {
- super(title, tooltip, descriptor, parent);
- _isShell = isShell;
- _cmdSubSystem = cmdSubSystem;
- if (_isShell)
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0113"); //$NON-NLS-1$
- else
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0114"); //$NON-NLS-1$
- }
-
- public void setSubSystem(IRemoteCmdSubSystem ss)
- {
- _cmdSubSystem = ss;
- }
-
- /**
- * Runs the command action. If the action is for launching a shell, the shell is launched
- * and the remote shell view shows it's output. If the action is for running a command, a
- * dialog pops up prompting for the invocation.
- */
- public void run()
- {
- if (_isShell)
- {
- runShell();
- }
- else
- {
- CommandDialog cmdDialog = new CommandDialog(getShell());
- if (cmdDialog.open() == Window.OK)
- {
- String cmdStr = cmdDialog.getCmdStr();
- if (cmdStr != null)
- {
- // run the command
- runCommand(cmdStr, cmdDialog.launchNewShell());
- }
- }
- }
- }
-
- private IRemoteCmdSubSystem getCommandSubSystem()
- {
- if (_selectedFilterRef != null)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)_selectedFilterRef).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null)
- {
- ISubSystem ss = adapter.getSubSystem(_selectedFilterRef);
- if (ss != null)
- {
- return RemoteCommandHelpers.getCmdSubSystem(ss.getHost());
- }
- }
- }
-
- IRemoteFile selectedFile = _selected;
- if (_selected == null)
- {
- return _cmdSubSystem;
- }
-
- IHost sysConn = selectedFile.getSystemConnection();
- if (sysConn != null)
- {
- ISubSystem currSubSystem = selectedFile.getParentRemoteFileSubSystem();
- if (currSubSystem != null)
- {
- try
- {
- //Shell shell = getShell();
- IRemoteCmdSubSystem cmdSubSystem = RemoteCommandHelpers.getCmdSubSystem(currSubSystem.getHost());
- return cmdSubSystem;
- }
- catch (Exception e)
- {
- }
- }
- }
-
- return null;
- }
-
- /**
- * runs the command
- */
- private void runCommand(String cmd, boolean launchNewShell)
- {
- if (cmd.length() > 0)
- {
-
- try
- {
- //Shell shell = getShell();
-
- if (_selectedFilterRef != null)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)_selectedFilterRef).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null)
- {
- ISubSystem ss = adapter.getSubSystem(_selectedFilterRef);
- if (ss != null)
- {
- Object target = ss.getTargetForFilter(_selectedFilterRef);
- if (target != null && target instanceof IRemoteFile)
- {
- _selected = (IRemoteFile)target;
- }
- }
- }
- }
-
- if (_selected != null)
- {
- IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
- String path = _selected.getAbsolutePath();
-
- if (launchNewShell)
- {
- Object[] results = cmdSubSystem.runCommand(cmd, _selected);
- Object cmdObject = results[0];
- if (cmdObject instanceof IRemoteCommandShell)
- {
- showInView((IRemoteCommandShell) cmdObject);
- }
- }
- else
- {
- // run command in shell
- IRemoteCommandShell defaultShell = cmdSubSystem.getDefaultShell();
- if (defaultShell != null)
- {
- showInView(defaultShell);
- }
-
- String cdCmd = "cd " + PathUtility.enQuoteUnix(path); //$NON-NLS-1$
- if ((cmdSubSystem.getHost().getSystemType().equals("Local") && System.getProperty("os.name").toLowerCase().startsWith("win")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- || cmdSubSystem.getHost().getSystemType().equals("Windows")) //$NON-NLS-1$
- {
- cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
- }
- cmdSubSystem.sendCommandToShell(cdCmd, defaultShell);
- cmdSubSystem.sendCommandToShell(cmd, defaultShell);
- }
- }
- else
- {
- IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
- if (cmdSubSystem != null)
- {
- Object[] results = cmdSubSystem.runCommand(cmd, _selected);
- Object cmdObject = results[0];
- if (cmdObject instanceof IRemoteCommandShell)
- {
- showInView((IRemoteCommandShell) cmdObject);
- }
- }
- }
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- }
- }
-
- /**
- * launches a new shell
- */
- private void runShell()
- {
- try
- {
- //Shell shell = getShell();
- if (_selectedFilterRef != null)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)_selectedFilterRef).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null)
- {
- ISubSystem ss = adapter.getSubSystem(_selectedFilterRef);
- if (ss != null)
- {
- Object target = ss.getTargetForFilter(_selectedFilterRef);
- if (target != null && target instanceof IRemoteFile)
- {
- _selected = (IRemoteFile)target;
- }
- }
- }
- }
-
- IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
- if (cmdSubSystem != null)
- {
- if (cmdSubSystem.isConnected())
- {
- SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
- SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
- IRemoteCommandShell cmd = cmdSubSystem.runShell(_selected);
- cmdsPart.updateOutput(cmd);
- }
- else
- {
- cmdSubSystem.connect();
- if (cmdSubSystem.isConnected())
- {
- SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
- SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
- IRemoteCommandShell cmd = cmdSubSystem.runShell( _selected);
- cmdsPart.updateOutput(cmd);
- }
- //showInView(cmd);
- }
- }
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- // RSEUIPlugin.getDefault().logInfo("Exception invoking command " + cmd + " on " + sysConn.getAliasName());
- }
-
- }
-
- /**
- * shows the command in the remote shell view
- */
- private void showInView(IRemoteCommandShell cmd)
- {
- SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
- SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
- cmdsPart.updateOutput(cmd);
- }
-
- /**
- * Called when the selection changes in the systems view. This determines
- * the input object for the command and whether to enable or disable
- * the action.
- *
- * @param selection the current seleciton
- * @return whether to enable or disable the action
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = false;
-
- Iterator e = selection.iterator();
- Object selected = e.next();
-
- if (selected != null)
- {
- if (selected instanceof ISystemFilterReference)
- {
- _selectedFilterRef = (ISystemFilterReference)selected;
- _selected = null;
- enable = true;
- }
- if (selected instanceof IRemoteFile)
- {
- _selected = (IRemoteFile) selected;
- _selectedFilterRef = null;
- if (!_selected.isFile())
- {
- enable = checkObjectType(_selected);
- }
- }
- }
-
- if (enable)
- {
- IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
- if (_cmdSubSystem != cmdSubSystem)
- {
- _cmdSubSystem = cmdSubSystem;
- enable = _cmdSubSystem.canRunCommand();
- }
- }
- else if (_cmdSubSystem != null)
- {
- enable = _cmdSubSystem.canRunShell();
- }
-
- return enable;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemExportShellHistoryAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemExportShellHistoryAction.java
deleted file mode 100644
index 18aa8425d..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemExportShellHistoryAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.actions;
-
-import java.io.FileWriter;
-
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * @author dmcknigh
- */
-public class SystemExportShellHistoryAction extends SystemBaseShellAction
-{
- public SystemExportShellHistoryAction(Shell parent)
- {
- super(ShellResources.ACTION_EXPORT_SHELL_HISTORY_LABEL,
- ShellResources.ACTION_EXPORT_SHELL_HISTORY_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXPORT_SHELL_HISTORY_ID),
- parent);
- allowOnMultipleSelection(false);
- }
-
-
- /**
- * Called when this action is selected from the popup menu.
- */
- public void run()
- {
- //SystemCommandsViewPart viewPart = \
- SystemCommandsUI.getInstance().activateCommandsView();
- for (int i = 0; i < _selected.size(); i++)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell)_selected.get(i);
-
-
- FileDialog fdlg = new FileDialog(getShell(), SWT.SAVE);
- fdlg.setText(SystemFileResources.RESID_ENTER_OR_SELECT_FILE_TITLE);
- fdlg.setFileName(cmdShell.getId() + "-history.txt"); //$NON-NLS-1$
- fdlg.setFilterExtensions(new String[] {"*.txt"}); //$NON-NLS-1$
- String fileName = fdlg.open();
- try
- {
- //FileOutputStream stream = new FileOutputStream(fileName);
- //OutputStreamWriter writer = new OutputStreamWriter(stream, "UTF-8");
- // DKM - file writer writes to local encoding
- FileWriter writer= new FileWriter(fileName);
- String[] cmds = cmdShell.getHistory();
- for (int o = 0; o < cmds.length; o++)
- {
- String cmd = cmds[o];
- writer.write(cmd);
- writer.write("\r\n"); //$NON-NLS-1$
-
- }
- writer.close();
- }
- catch (Exception e)
- {
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemExportShellOutputAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemExportShellOutputAction.java
deleted file mode 100644
index be1b247f9..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemExportShellOutputAction.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.actions;
-
-import java.io.FileWriter;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * @author dmcknigh
- */
-public class SystemExportShellOutputAction extends SystemBaseShellAction
-{
- public SystemExportShellOutputAction(Shell parent)
- {
- super(ShellResources.ACTION_EXPORT_SHELL_OUTPUT_LABEL,
- ShellResources.ACTION_EXPORT_SHELL_OUTPUT_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXPORT_SHELL_OUTPUT_ID),
- parent);
- allowOnMultipleSelection(false);
- }
-
-
- /**
- * Called when this action is selected from the popup menu.
- */
- public void run()
- {
- //SystemCommandsViewPart viewPart = \
- SystemCommandsUI.getInstance().activateCommandsView();
- for (int i = 0; i < _selected.size(); i++)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell)_selected.get(i);
-
- FileDialog fdlg = new FileDialog(getShell(),SWT.SAVE);
- fdlg.setText(SystemFileResources.RESID_ENTER_OR_SELECT_FILE_TITLE);
- fdlg.setFileName(cmdShell.getId() + "-output.txt"); //$NON-NLS-1$
- fdlg.setFilterExtensions(new String[] {"*.txt"}); //$NON-NLS-1$
- String fileName = fdlg.open();
- try
- {
-
- //FileOutputStream stream = new FileOutputStream(fileName);
- //OutputStreamWriter writer = new OutputStreamWriter(stream, "UTF-8");
- // dkm - using local encoding
- FileWriter writer = new FileWriter(fileName);
-
- Object[] outputs = cmdShell.listOutput();
- for (int o = 0; o < outputs.length; o++)
- {
- IAdaptable output = (IAdaptable)outputs[o];
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)output.getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null)
- {
- writer.write(adapter.getText(output));
- writer.write("\r\n"); //$NON-NLS-1$
- }
- }
- writer.close();
- }
- catch (Exception e)
- {
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemShowInShellViewAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemShowInShellViewAction.java
deleted file mode 100644
index 8f1391820..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemShowInShellViewAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.actions;
-
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.shells.ui.view.SystemCommandsViewPart;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class SystemShowInShellViewAction extends SystemBaseShellAction
-{
- /**
- * Constructor.
- * @param parent Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- */
- public SystemShowInShellViewAction(Shell parent)
- {
- super(ShellResources.ACTION_SHOW_SHELL_LABEL,
- ShellResources.ACTION_SHOW_SHELL_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHOW_SHELL_ID),
- parent);
- allowOnMultipleSelection(false);
- }
-
- /**
- * Called when this action is selected from the popup menu.
- */
- public void run()
- {
- SystemCommandsViewPart viewPart = SystemCommandsUI.getInstance().activateCommandsView();
- for (int i = 0; i < _selected.size(); i++)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell)_selected.get(i);
- viewPart.updateOutput(cmdShell);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemTerminateRemoveShellAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemTerminateRemoveShellAction.java
deleted file mode 100644
index 91c7e2f95..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemTerminateRemoveShellAction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.shells.ui.actions;
-
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class SystemTerminateRemoveShellAction extends SystemTerminateShellAction
-{
- public SystemTerminateRemoveShellAction(Shell parent)
- {
- super(ShellResources.ACTION_CANCEL_REMOVE_SHELL_LABEL,
- ShellResources.ACTION_CANCEL_REMOVE_SHELL_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_REMOVE_SHELL_ID),
- parent);
- }
-
- protected boolean isApplicable(IRemoteCommandShell cmdShell)
- {
- return true;
- }
-
-
- public void cancel(IRemoteCommandShell command)
- {
- try
- {
- IRemoteCmdSubSystem cmdSubSystem = command.getCommandSubSystem();
- if (cmdSubSystem != null)
- {
- cmdSubSystem.removeShell(command);
- }
- }
- catch (Exception e)
- {
- // RSEUIPlugin.getDefault().logInfo("Exception invoking command " + cmd + " on " + sysConn.getAliasName());
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemTerminateShellAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemTerminateShellAction.java
deleted file mode 100644
index 694566e1c..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemTerminateShellAction.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class SystemTerminateShellAction extends SystemBaseShellAction
-{
- public SystemTerminateShellAction(Shell parent)
- {
- this(ShellResources.ACTION_CANCEL_SHELL_LABEL,
- ShellResources.ACTION_CANCEL_SHELL_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CANCEL_ID),
- parent);
- }
-
- public SystemTerminateShellAction(String label,
- String tooltip,
- ImageDescriptor image,
- Shell parent)
- {
- super(label,
- tooltip,
- image,
- parent);
- }
-
- public void run()
- {
- // DKM - need to deselect in tree
- //SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- //registry.fireEvent(new SystemResourceChangeEvent())
- List selected = new ArrayList();
- selected.addAll(_selected);
- for (int i = selected.size() -1; i >= 0; i--)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell)selected.get(i);
- terminateShell(cmdShell);
- }
- }
-
- protected boolean isApplicable(IRemoteCommandShell cmdShell)
- {
- return cmdShell.isActive();
- }
-
- protected void terminateShell(IRemoteCommandShell command)
- {
- cancel(command);
- }
-
- public void cancel(IRemoteCommandShell command)
- {
- try
- {
- IRemoteCmdSubSystem cmdSubSystem = command.getCommandSubSystem();
- if (cmdSubSystem != null)
- {
- cmdSubSystem.cancelShell(command);
- }
- }
- catch (Exception e)
- {
- // RSEUIPlugin.getDefault().logInfo("Exception invoking command " + cmd + " on " + sysConn.getAliasName());
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/EnvironmentVariablesPropertyPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/EnvironmentVariablesPropertyPage.java
deleted file mode 100644
index 2e0c47e4a..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/EnvironmentVariablesPropertyPage.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.propertypages;
-
-
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.subsystems.IRemoteSystemEnvVar;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-import org.eclipse.rse.ui.widgets.EnvironmentVariablesForm;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-/**
- * Property page for editing persistant environment variables for an
- * RSE connection.
- */
-public class EnvironmentVariablesPropertyPage extends SystemBasePropertyPage
-{
- private EnvironmentVariablesForm _form;
-
- /**
- * Constructor for EnvironmentVariablesPropertyPage.
- */
- public EnvironmentVariablesPropertyPage()
- {
- super();
- }
-
- /**
- * @see org.eclipse.rse.ui.propertypages.SystemBasePropertyPage#createContentArea(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
-
- IRemoteCmdSubSystem cmdSubSystem = getCmdSubSystem();
- if (cmdSubSystem != null)
- {
-
- // Create property page UI
- _form =
- new EnvironmentVariablesForm(
- getShell(),
- getMessageLine(),
- getElement(),
- cmdSubSystem.getInvalidEnvironmentVariableNameCharacters());
-
- // Load existing environment variables
- IRemoteSystemEnvVar[] envVars = getCmdSubSystem().getEnvironmentVariableList();
- // Form only works with a simple inner class since it cannot easily instantiate
- // RemoteSystemEnvVarImpl classes. We leave this complexity (via MOF) to the
- // subsystem.
- Vector envVarsVector = new Vector();
- for (int idx = 0; idx < envVars.length; idx++)
- {
- envVarsVector.add(_form.new EnvironmentVariable(envVars[idx].getName(), envVars[idx].getValue()));
- }
- _form.setEnvVars(envVarsVector);
-
- _form.createContents(parent);
-
- }
- else
- {
- // Create property page UI
- _form =
- new EnvironmentVariablesForm(
- getShell(),
- getMessageLine(),
- null,
- null);
-
- _form.createContents(parent);
- }
- return parent;
- }
-
- /**
- * @see org.eclipse.rse.ui.propertypages.SystemBasePropertyPage#verifyPageContents()
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * Return the command subsystem implementation object.
- */
- private IRemoteCmdSubSystem getCmdSubSystem()
- {
- Object subsystem = getElement();
- if (subsystem instanceof ISubSystem)
- {
- return RemoteCommandHelpers.getCmdSubSystem(((ISubSystem)subsystem).getHost());
- }
- else
- {
- SystemBasePlugin.logError(
- "EnvironmentVariablesPropertyPage.getCmdSubSystem: input element for property page is not an instanceof SubSystem: " //$NON-NLS-1$
- + subsystem);
- return null;
- }
- }
-
- /**
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk()
- {
- Collection envVars = _form.getEnvVars();
- String[] names = new String[envVars.size()];
- String[] values = new String[envVars.size()];
-
- Iterator i = envVars.iterator();
- EnvironmentVariablesForm.EnvironmentVariable variable;
- for (int idx = 0; i.hasNext(); idx++)
- {
- variable = (EnvironmentVariablesForm.EnvironmentVariable) i.next();
- names[idx] = variable.getName();
- values[idx] = variable.getValue();
- }
-
- getCmdSubSystem().setEnvironmentVariableList(names, values);
-
- return true;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/ShellServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/ShellServicesPropertyPage.java
deleted file mode 100644
index 16bd5b0de..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/ShellServicesPropertyPage.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.model.DummyHost;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
-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;
-
-
-public class ShellServicesPropertyPage extends ServicesPropertyPage
-{
-
- private IShellServiceSubSystemConfiguration _currentFactory;
-
-
- protected ShellServiceSubSystem getShellServiceSubSystem()
- {
- return (ShellServiceSubSystem)getElement();
- }
-
-
- protected ServiceElement[] getServiceElements()
- {
- ShellServiceSubSystem subSystem = getShellServiceSubSystem();
- IShellServiceSubSystemConfiguration[] factories = null;
- IHost host = null;
- if (subSystem == null || _currentFactory != null)
- {
- // create dummy host
- factories = getShellServiceSubSystemFactories(getSystemType());
- host = new DummyHost(getHostname(), getSystemType());
- }
- else
- {
- host = subSystem.getHost();
- _currentFactory = (IShellServiceSubSystemConfiguration)subSystem.getParentRemoteCmdSubSystemConfiguration();
- factories = getShellServiceSubSystemFactories(host.getSystemType());
- }
-
- // create elements for each
- ServiceElement[] elements = new ServiceElement[factories.length];
- for (int i = 0; i < factories.length; i++)
- {
- IShellServiceSubSystemConfiguration factory = factories[i];
-
- elements[i] = new FactoryServiceElement(host, factory);
- if (factory == _currentFactory)
- {
- elements[i].setSelected(true);
- }
- }
- return elements;
- }
-
-
- protected IShellServiceSubSystemConfiguration[] getShellServiceSubSystemFactories(String systemType)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType);
-
- for (int i = 0; i < factories.length; i++)
- {
- ISubSystemConfiguration factory = factories[i];
- if (factory instanceof IShellServiceSubSystemConfiguration)
- {
- results.add(factory);
- }
- }
-
- return (IShellServiceSubSystemConfiguration[])results.toArray(new IShellServiceSubSystemConfiguration[results.size()]);
- }
-
-
- protected IServiceSubSystemConfiguration getCurrentServiceSubSystemConfiguration()
- {
- return _currentFactory;
- }
-
- public void setSubSystemConfiguration(ISubSystemConfiguration factory)
- {
- _currentFactory = (IShellServiceSubSystemConfiguration)factory;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/SystemShellPropertyPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/SystemShellPropertyPage.java
deleted file mode 100644
index 92e88baf1..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/propertypages/SystemShellPropertyPage.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.shells.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem;
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.shells.ui.view.EncodingForm;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-
-
-
-public class SystemShellPropertyPage extends SystemBasePropertyPage
-{
- private EncodingForm _form;
-
- public SystemShellPropertyPage()
- {
- super();
- setDescription(ShellResources.RESID_SHELL_PROPERTYPAGE_DESCRIPTION);
- }
-
- public void setShellEncodingDefaults(List encodings)
- {
- StringBuffer history = new StringBuffer();
- for (int i = 0; i < encodings.size(); i++)
- {
- String encoding = (String)encodings.get(i);
- history.append(encoding);
- if (i < encodings.size())
- {
- history.append(',');
- }
- }
-
- RSEUIPlugin.getDefault().getPreferenceStore().setValue("shell.encodingDefaults", history.toString()); //$NON-NLS-1$
- }
-
- public List getShellEncodingDefaults()
- {
- List result = new ArrayList();
- String attribute = RSEUIPlugin.getDefault().getPreferenceStore().getString("shell.encodingDefaults"); //$NON-NLS-1$
- if (attribute != null && attribute.length() > 0)
- {
- String[] list = attribute.split(","); //$NON-NLS-1$
- for (int i = 0; i < list.length; i++)
- {
- result.add(list[i]);
- }
- }
- else
- {
- result.add("UTF-8"); //$NON-NLS-1$
- result.add("UTF-16"); //$NON-NLS-1$
- result.add("US-ASCII"); //$NON-NLS-1$
- result.add("ISO-8859-1"); //$NON-NLS-1$
- result.add("Cp1252"); //$NON-NLS-1$
- result.add("Cp1256"); //$NON-NLS-1$
- }
- return result;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.propertypages.SystemBasePropertyPage#createContentArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- Font font = parent.getFont();
- Group group = new Group(parent, SWT.NONE);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- group.setLayoutData(data);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- group.setLayout(layout);
- group.setText(ShellResources.RESID_SHELL_PROPERTYPAGE_ENCODING);
- group.setFont(font);
-
- _form = new EncodingForm(getShell(), getMessageLine());
- _form.createContents(group);
-
- RemoteCmdSubSystem cmdSS = getCmdSubSystem();
- _form.initialize(getShellEncodingDefaults(), cmdSS.getShellEncoding());
- return _form.getDefaultControl();
- }
-
- public RemoteCmdSubSystem getCmdSubSystem()
- {
- return (RemoteCmdSubSystem)getElement();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.propertypages.SystemBasePropertyPage#verifyPageContents()
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk()
- {
- String encoding = _form.getEncoding();
- getCmdSubSystem().setShellEncoding(encoding);
-
- List defaults = getShellEncodingDefaults();
- if (!defaults.contains(encoding))
- {
- defaults.add(encoding);
- setShellEncodingDefaults(defaults);
- }
-
- return true;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java
deleted file mode 100644
index 1cba260bb..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java
+++ /dev/null
@@ -1,640 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - fix 158766: content assist works 1st time only
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.view;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ContextInformation;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-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.RemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileChildrenContentsType;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFolderChildrenContentsType;
-import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes;
-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.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * Class that implements the content assist processor interface for the command line.
- */
-public class CommandEntryContentAssistProcessor implements IContentAssistProcessor
-{
-
- private class CompletionResults
- {
- private List _nameResults;
- private List _proposalResults;
- private List _proposalHelpResults;
- private List _images;
-
- public CompletionResults()
- {
- _nameResults = new ArrayList();
- _proposalResults = new ArrayList();
- _proposalHelpResults = new ArrayList();
- _images = new ArrayList();
- }
-
- public int size()
- {
- return _nameResults.size();
- }
-
- public void addResult(String name, String text, String help, Image image)
- {
- _nameResults.add(name);
- _proposalResults.add(text);
- _proposalHelpResults.add(help);
- _images.add(image);
- }
-
- public String getNameAt(int i)
- {
- return (String) _nameResults.get(i);
- }
-
- public String getTextAt(int i)
- {
- return (String) _proposalResults.get(i);
- }
-
- public String getHelpAt(int i)
- {
- return (String) _proposalHelpResults.get(i);
- }
-
- public Image getImageAt(int i)
- {
- return (Image) _images.get(i);
- }
- }
-
- private CommandEntryViewerConfiguration _configurator;
- //private SystemTableViewProvider _provider;
- private HashMap _imageMap;
- private IRemoteCommandShell _remoteCommand;
- private char _fileSeparator;
- private char _foreignFileSeparator;
- private IRemoteFile _lastFolderContext;
- private boolean _isWindows;
- private Image _envImage;
-
- private static int FILES_ONLY = 0;
- private static int FOLDERS_ONLY = 1;
- private static int FILES_AND_FOLDERS = 2;
-
- /**
- * Constructor
- */
- public CommandEntryContentAssistProcessor(CommandEntryViewerConfiguration configurator)
- {
- _configurator = configurator;
- //_provider = new SystemTableViewProvider();
- _imageMap = new HashMap();
- }
-
- public void setRemoteCommand(IRemoteCommandShell cmd)
- {
- if (cmd != _remoteCommand)
- {
-
- _remoteCommand = cmd;
- if (_remoteCommand != null)
- {
- RemoteCmdSubSystem cmdSubsystem = (RemoteCmdSubSystem) _remoteCommand.getCommandSubSystem();
- //String type = cmdSubsystem.getHost().getSystemType();
- if (cmdSubsystem.isWindows())
- {
- _isWindows = true;
- _fileSeparator = '\\';
- _foreignFileSeparator = '/';
- }
- else
- {
- _isWindows = false;
- _fileSeparator = '/';
- _foreignFileSeparator = '\\';
- }
-
- _remoteCommand.getCandidateCommands();
- }
- }
- }
-
- public IRemoteCommandShell getRemoteCommand()
- {
- return _remoteCommand;
- }
-
- private boolean isDeliminator(char c)
- {
- if (c == ' ' || c == ';' || c == ':' || c == '&' || c == '|' || c == '=')
- return true;
- return false;
- }
-
- private String getCurrentText(ITextViewer viewer, int documentOffset)
- {
- StringBuffer currentText = new StringBuffer();
- String text = viewer.getDocument().get();
- if (documentOffset > -1)
- {
- boolean noWhiteSpace = true;
- int firstChar = documentOffset - 1;
- while (firstChar > -1 && noWhiteSpace)
- {
- char c = text.charAt(firstChar);
- if (isDeliminator(c))
- {
- noWhiteSpace = false;
- }
- else
- {
- currentText.insert(0, c);
- }
- firstChar--;
- }
- }
- return currentText.toString();
- }
-
- private boolean isAtFirstToken(IDocument document)
- {
- String text = document.get();
- if (text.length() > 0)
- {
- int spaceIndex = text.indexOf(' ');
- if (spaceIndex > 0)
- {
- return false;
- }
- }
-
- return true;
- }
-
- private String getFirstToken(IDocument document)
- {
- StringBuffer buf = new StringBuffer();
- String text = document.get();
- int index = 0;
- while (index < text.length())
- {
- char c = text.charAt(index);
- if (c == ' ')
- {
- return buf.toString();
- }
- else
- {
- buf.append(c);
- }
- index++;
- }
- return buf.toString();
- }
-
- /**
- * @see IContentAssistProcessor#computeCompletionProposals(ITextViewer, int)
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset)
- {
- //String text = viewer.getDocument().get();
- boolean atFirstToken = isAtFirstToken(viewer.getDocument());
- String firstToken = getFirstToken(viewer.getDocument());
- String currentText = getCurrentText(viewer, documentOffset);
-
- CompletionResults completions = getCompletions(firstToken, currentText, atFirstToken);
- if (completions != null && completions.size() > 0)
- {
- ICompletionProposal[] proposalList = new ICompletionProposal[completions.size()];
-
- int replacementOffset = documentOffset - currentText.length();
- int replacementLength = 0;
-
- replacementLength = documentOffset - replacementOffset;
-
- for (int idx = 0; idx < proposalList.length; idx++)
- {
- String name = completions.getNameAt(idx);
- String proposal = completions.getTextAt(idx);
- String help = completions.getHelpAt(idx);
- Image image = completions.getImageAt(idx);
-
- // @param replacementString the actual string to be inserted into the document
- // @param replacementOffset the offset of the text to be replaced
- // @param replacementLength the length of the text to be replaced
- // @param cursorPosition the position of the cursor following the insert relative to replacementOffset
- // @param image the image to display for this proposal
- // @param displayString the string to be displayed for the proposal
- // @param contentInformation the context information associated with this proposal
- // @param additionalProposalInfo the additional information associated with this proposal
- ContextInformation info = new ContextInformation(proposal, help);
- proposalList[idx] = new CompletionProposal(proposal, replacementOffset, replacementLength, documentOffset + proposal.length(), image, name, info, help);
-
- }
- return proposalList;
- }
- return new ICompletionProposal[0];
- }
-
- private Image getImageFor(Object object)
- {
- ImageDescriptor descriptor = null;
- Image image = null;
- if (object instanceof ICandidateCommand)
- {
- ICandidateCommand cmd = (ICandidateCommand) object;
- descriptor = cmd.getImageDescriptor();
- if (descriptor == null)
- {
- String type = cmd.getType();
- if (type.equals(ISystemOutputRemoteTypes.TYPE_FILE))
- {
- descriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
- }
- else
- {
- descriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_RUN_ID);
- }
- }
- }
- else if (object instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) object).getAdapter(ISystemViewElementAdapter.class);
- descriptor = adapter.getImageDescriptor(object);
- }
-
- if (descriptor!=null)
- {
- image = (Image) _imageMap.get(descriptor);
- if (image == null)
- {
- image = descriptor.createImage();
- _imageMap.put(descriptor, image);
- }
- }
- return image;
- }
-
- private Image getEnvironmentVariableImage()
- {
- if (_envImage == null)
- {
- _envImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_ENVVAR_ID).createImage();
- }
- return _envImage;
- }
-
- private CompletionResults getCompletions(String firstToken, String currentText, boolean atFirstToken)
- {
- CompletionResults results = new CompletionResults();
- if (_remoteCommand != null && _remoteCommand.isActive())
- {
- Object context = _remoteCommand.getContext();
- if (context instanceof IRemoteFile)
- {
- IRemoteFile workingDirectory = (IRemoteFile)context;
-
- int separatorIndex = currentText.lastIndexOf(_fileSeparator);
- int foreignseparatorIndex = currentText.lastIndexOf(_foreignFileSeparator);
- if (foreignseparatorIndex > separatorIndex)
- {
- separatorIndex = foreignseparatorIndex;
- }
-
- if (separatorIndex > 0)
- {
- String previousText = currentText.substring(0, separatorIndex + 1).replace(_foreignFileSeparator, _fileSeparator);
- String nextText = ""; //$NON-NLS-1$
- if (separatorIndex < currentText.length())
- {
- nextText = currentText.substring(separatorIndex + 1, currentText.length());
- }
-
- IRemoteFile contextDirectory = null;
- String contextPath = null;
- if (!_isWindows && currentText.charAt(0) == _fileSeparator)
- {
- contextPath = previousText;
- }
- else
- {
- contextPath = workingDirectory.getAbsolutePath() + _fileSeparator + previousText;
- }
-
- if (_lastFolderContext != null && _lastFolderContext.getAbsolutePath().equals(contextPath))
- {
- contextDirectory = _lastFolderContext;
- }
- else
- {
- try
- {
- contextDirectory = RemoteFileUtility.getFileSubSystem(_remoteCommand.getCommandSubSystem().getHost()).getRemoteFileObject(contextPath);
- _lastFolderContext = contextDirectory;
- }
- catch (Exception e)
- {
- }
- }
- getFileCompletions(contextDirectory, previousText, nextText, results, FILES_AND_FOLDERS);
-
- }
- else
- {
- if (atFirstToken)
- {
- if (!_isWindows && currentText.length() > 0 && currentText.charAt(0) == _fileSeparator)
- {
- getAbsoluteFileCompletions("", currentText, results, FILES_AND_FOLDERS); //$NON-NLS-1$
- }
- else
- {
- getFileCompletions(workingDirectory, "", currentText, results, FILES_ONLY); //$NON-NLS-1$
- getCommandCompletions(currentText, results);
- }
- }
- else
- {
- int flag = FILES_AND_FOLDERS;
-
- if (firstToken.equals("cd")) //$NON-NLS-1$
- {
- flag = FOLDERS_ONLY;
- }
- else
- {
- if (_isWindows)
- {
- if (firstToken.equals("set") || currentText.startsWith("%")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- getEnvironmentCompletions(currentText, results);
- return results;
- }
- }
- else if (firstToken.equals("export") || currentText.startsWith("$")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- getEnvironmentCompletions(currentText, results);
- return results;
- }
- }
-
- getFileCompletions(workingDirectory, "", currentText, results, flag); //$NON-NLS-1$
- }
- }
- }
- else
- {
- getCommandCompletions(currentText, results);
- }
- }
-
- return results;
- }
-
- private void getEnvironmentCompletions(String currentText, CompletionResults results)
- {
- IRemoteCmdSubSystem cmdSubsystem = _remoteCommand.getCommandSubSystem();
- if (cmdSubsystem != null)
- {
- List vars = cmdSubsystem.getHostEnvironmentVariables();
- if (vars != null)
- {
- for (int i = 0; i < vars.size(); i++)
- {
- String var = (String) vars.get(i);
- int eqSepIndex = var.indexOf('=');
- String name = var.substring(0, eqSepIndex);
- String value = var.substring(eqSepIndex + 1, var.length());
- boolean hasDollars = currentText.startsWith("$"); //$NON-NLS-1$
- String compareName = name;
- if (hasDollars)
- {
- compareName = "$" + name; //$NON-NLS-1$
- }
- boolean hasPercent = currentText.startsWith("%"); //$NON-NLS-1$
- if (hasPercent)
- {
- compareName = "%" + name + "%"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (compareName.toLowerCase().startsWith(currentText.toLowerCase()))
- {
-
- results.addResult(name, compareName, value, getEnvironmentVariableImage());
- }
- }
- }
- }
- }
-
- private void getCommandCompletions(String currentText, CompletionResults results)
- {
- IRemoteCmdSubSystem cmdSubsystem = _remoteCommand.getCommandSubSystem();
- if (cmdSubsystem != null)
- {
- ICandidateCommand[] cmds = cmdSubsystem.getCandidateCommands(_remoteCommand);
- if (cmds != null)
- {
- for (int i = 0; i < cmds.length; i++)
- {
- ICandidateCommand cmd = cmds[i];
- String name = cmd.getName();
- if (name.toLowerCase().startsWith(currentText.toLowerCase()))
- {
-
- results.addResult(name, name, cmd.getDescription(), getImageFor(cmd));
- }
- }
- }
- }
- }
-
- private void getAbsoluteFileCompletions(String prefix, String currentText, CompletionResults results, int flag)
- {
- if (!_isWindows)
- {
- int lastSlashIndex = currentText.lastIndexOf("/"); //$NON-NLS-1$
- String parentPath = currentText.substring(0, lastSlashIndex);
- IRemoteFileSubSystem fs = RemoteFileUtility.getFileSubSystem(_remoteCommand.getCommandSubSystem().getHost());
- try
- {
- IRemoteFile parent = fs.getRemoteFileObject(parentPath);
-
- Object[] fileList = null;
-
- if (parent.hasContents(RemoteChildrenContentsType.getInstance()))
- {
- fileList = parent.getContents(RemoteChildrenContentsType.getInstance());
- }
- else
- {
- fileList = parent.getParentRemoteFileSubSystem().listFoldersAndFiles(parent, currentText + "*", null); //$NON-NLS-1$
- }
-
-
- for (int f1 = 0; f1 < fileList.length; f1++)
- {
- if (fileList[f1] instanceof IRemoteFile)
- {
- RemoteFile file = (RemoteFile) fileList[f1];
- if ((flag == FILES_ONLY && file.isFile()) || (flag == FOLDERS_ONLY && file.isDirectory()) || (flag == FILES_AND_FOLDERS))
- {
- String name = file.getName();
- String proposal = prefix + name;
-
- if (name.startsWith(currentText))
- {
- results.addResult(name, proposal, file.getAbsolutePath(), getImageFor(file));
- }
- else if (_isWindows && name.toLowerCase().startsWith(currentText.toLowerCase()))
- {
- results.addResult(name, proposal, file.getAbsolutePath(), getImageFor(file));
- }
- }
- }
- }
- }
- catch (Exception e)
- {
- }
- }
- }
-
- private void getFileCompletions(IRemoteFile workingDirectory, String prefix, String currentText, CompletionResults results, int flag)
- {
-
- Object[] fileList = null;
- String filterString = currentText + "*"; //$NON-NLS-1$
-
- if (workingDirectory.hasContents(RemoteChildrenContentsType.getInstance()) && !workingDirectory.isStale())
- {
- if (flag == FILES_ONLY)
- {
- fileList = workingDirectory.getContents(RemoteFileChildrenContentsType.getInstance(), filterString);
- }
- else if (flag == FOLDERS_ONLY)
- {
- fileList = workingDirectory.getContents(RemoteFolderChildrenContentsType.getInstance(), filterString);
- }
- else
- {
- fileList = workingDirectory.getContents(RemoteChildrenContentsType.getInstance(), filterString);
- }
- }
- if (fileList==null || fileList.length==0)
- {
- try
- {
- fileList = workingDirectory.getParentRemoteFileSubSystem().listFoldersAndFiles(workingDirectory, filterString, null);
- }
- catch (SystemMessageException e)
- {
- }
- }
- //_provider.getChildren(workingDirectory);
-
- if (fileList != null && fileList.length > 0)
- {
- for (int f1 = 0; f1 < fileList.length; f1++)
- {
- if (fileList[f1] instanceof IRemoteFile)
- {
- RemoteFile file = (RemoteFile) fileList[f1];
- if ((flag == FILES_ONLY && file.isFile()) || (flag == FOLDERS_ONLY && file.isDirectory()) || (flag == FILES_AND_FOLDERS))
- {
- String name = file.getName();
- String proposal = prefix + name;
-
- if (name.startsWith(currentText))
- {
- results.addResult(name, proposal, file.getAbsolutePath(), getImageFor(file));
- }
- else if (_isWindows && name.toLowerCase().startsWith(currentText.toLowerCase()))
- {
- results.addResult(name, proposal, file.getAbsolutePath(), getImageFor(file));
- }
- }
- }
- }
- }
- }
-
- /*
- * @see IContentAssistProcessor#computeContextInformation(ITextViewer, int)
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset)
- {
- return null;
- }
-
- /*
- * @see IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
- */
- public char[] getCompletionProposalAutoActivationCharacters()
- {
- return _configurator.getCompletionProposalAutoActivationCharacters();
- }
-
- /*
- * @see IContentAssistProcessor#getContextInformationAutoActivationCharacters()
- */
- public char[] getContextInformationAutoActivationCharacters()
- {
- return null;
- }
-
- /*
- * @see IContentAssistProcessor#getErrorMessage()
- */
- public String getErrorMessage()
- {
- return null;
- }
-
- /*
- * @see IContentAssistProcessor#getContextInformationValidator()
- */
- public IContextInformationValidator getContextInformationValidator()
- {
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryViewerConfiguration.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryViewerConfiguration.java
deleted file mode 100644
index 1f678d026..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryViewerConfiguration.java
+++ /dev/null
@@ -1,87 +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.shells.ui.view;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-
-
-/**
- * Source viewer configuration class for command line content assist.
- *
- */
-public class CommandEntryViewerConfiguration extends SourceViewerConfiguration
-{
-
- private CommandEntryContentAssistProcessor _contentAssistantProcessor;
- private ContentAssistant _contentAssistant;
- /**
- * Constructor
- */
- public CommandEntryViewerConfiguration()
- {
- super();
- _contentAssistantProcessor = new CommandEntryContentAssistProcessor(this);
-
- }
-
- public void setRemoteCommand(IRemoteCommandShell cmd)
- {
- _contentAssistantProcessor.setRemoteCommand(cmd);
- }
-
- public IRemoteCommandShell getRemoteCommand()
- {
- return _contentAssistantProcessor.getRemoteCommand();
- }
-
- /**
- * Parent override.
- * Returns the content assistant ready to be used with the given source viewer.
- *
- * @param sourceViewer the source viewer to be configured by this configuration
- * @return a content assistant or <code>null</code> if content assist should not be supported
- */
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer)
- {
- if (_contentAssistant == null)
- {
- _contentAssistant = new ContentAssistant();
- _contentAssistant.setContentAssistProcessor(_contentAssistantProcessor, IDocument.DEFAULT_CONTENT_TYPE);
- _contentAssistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
- //_contentAssistant.enableAutoActivation(true);
- _contentAssistant.enableAutoInsert(true);
-
- _contentAssistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
- }
- return _contentAssistant;
- }
-
- /**
- * Return the characters which trigger the auto-display of the list
- * substitution variables. We return '$' by default, but this can be
- * overridden.
- */
- protected char[] getCompletionProposalAutoActivationCharacters()
- {
- return new char[] { '/', '\\', '$', '%'};
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewPage.java
deleted file mode 100644
index dceb44f74..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewPage.java
+++ /dev/null
@@ -1,687 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-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.jface.viewers.TableLayout;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteOutput;
-import org.eclipse.rse.model.ISystemRegistryUI;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-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;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-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.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.CellEditorActionHandler;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-import org.eclipse.ui.themes.IThemeManager;
-
-
-/**
- * Class for a remote shell session on a connection
- */
-public class CommandsViewPage implements SelectionListener, ISystemThemeConstants, IPropertyChangeListener, ISelectionChangedListener,
-FocusListener
-{
-
- private Listener _keyListener = new Listener()
- {
- private boolean checkState(Event event)
- {
- boolean isEnabled = !_inputEntry.isInCodeAssist();
- if (event.character == '\r')
- {
- _inputEntry.setInCodeAssist(false);
- }
-
- return isEnabled;
- }
-
- public void handleEvent(Event e)
- {
- if (checkState(e))
- {
-
- if (e.character == '\r' && e.stateMask!=262144) // "enter" key, but not Ctrl+M (bug 160786)
- {
- sendInput();
- }
- else if (e.keyCode == 13)
- {
- sendInput();
- }
- else if (e.keyCode == 16777217) // "up" arrow
- {
- handleUp();
- }
- else if (e.keyCode == 16777218) // "down" arrow
- {
- handleDown();
- }
- else if (e.stateMask == 262144)
- {
- if (e.character == 3)
- {
- if (_inputEntry.getSelectedText().length() == 0)
- {
- sendBreak();
- }
- else
- {
- _inputEntry.doOperation(ITextOperationTarget.COPY);
- }
- }
- }
- }
- }
- };
-
- class SelectAllAction extends Action
- {
- public SelectAllAction()
- {
- super(SystemResources.ACTION_SELECT_ALL_LABEL, null);
- setToolTipText(SystemResources.ACTION_SELECT_ALL_TOOLTIP);
- }
-
- public void checkEnabledState()
- {
- setEnabled(true);
- }
-
- public void run()
- {
- SystemCommandsView view = _viewer;
- view.getTable().selectAll();
- view.setSelection(view.getSelection());
- }
- }
-
-
- private CommandEntryViewerConfiguration _entryViewerConfiguration;
-
- private SystemCommandsView _viewer;
-
- private SystemCommandEditor _inputEntry;
-
- private Button _upButton;
- private Button _downButton;
- private Composite _inputContainer;
- private Composite _tabFolderPage;
-
- private int _commandHistoryOffset;
- private SystemCommandsViewPart _viewPart;
-
- private String _title;
-
- private SystemCopyToClipboardAction _copyAction;
- private SystemPasteFromClipboardAction _pasteAction;
- private SelectAllAction _selectAllAction;
- private IActionBars _actionBars;
-
- public CommandsViewPage(SystemCommandsViewPart viewPart)
- {
- _commandHistoryOffset = 0;
- _entryViewerConfiguration = new CommandEntryViewerConfiguration();
- _viewPart = viewPart;
- _actionBars = _viewPart.getViewSite().getActionBars();
- }
-
- public Composite createTabFolderPage(CTabFolder tabFolder, CellEditorActionHandler editorActionHandler)
- {
- _tabFolderPage = new Composite(tabFolder, SWT.NULL);
-
- Font font = tabFolder.getFont();
- _tabFolderPage.setFont(font);
- // dummy title so that sizings work
- // fix for 138311
- // String dummyTitle = ShellResources.RESID_SHELLS_COMMAND_SHELL_LABEL;
-
-// _tabFolderPage.setText(dummyTitle);
- GridLayout gridLayout = new GridLayout();
- _tabFolderPage.setLayout(gridLayout);
- createControl(_tabFolderPage);
-
- ISystemRegistryUI registry = RSEUIPlugin.getTheSystemRegistry();
-
- // global actions
- Clipboard clipboard = registry.getSystemClipboard();
- _copyAction = new SystemCopyToClipboardAction(_viewer.getShell(), clipboard);
- _copyAction.setEnabled(false);
-
- _pasteAction = new SystemPasteFromClipboardAction(_viewer.getShell(), clipboard);
- _pasteAction.setEnabled(false);
-
- editorActionHandler.setCopyAction(_copyAction);
- editorActionHandler.setPasteAction(_pasteAction);
-
- _selectAllAction = new SelectAllAction();
- _selectAllAction.setEnabled(false);
- editorActionHandler.setSelectAllAction(_selectAllAction);
-
-
- _viewer.addSelectionChangedListener(this);
- _viewer.getControl().addFocusListener(this);
- _inputEntry.getControl().addFocusListener(this);
-
- return _tabFolderPage;
- }
-
- public void setFocus()
- {
- _inputEntry.getTextWidget().setFocus();
-
- _viewPart.getSite().setSelectionProvider(_viewer);
- }
-
- public IActionBars getActionBars()
- {
- return _actionBars;
- }
-
- public void selectionChanged(SelectionChangedEvent e)
- {
- IStructuredSelection sel = (IStructuredSelection) e.getSelection();
- _copyAction.setEnabled(_copyAction.updateSelection(sel));
- _pasteAction.setEnabled(_pasteAction.updateSelection(sel));
- _selectAllAction.setEnabled(true);
-
- //setActionHandlers();
- }
-
-
-
-
- public void setEnabled(boolean flag)
- {
- if (!flag)
- {
- _inputEntry.getTextWidget().setEnabled(flag);
- _inputEntry.setEditable(flag);
-
- Table table = _viewer.getTable();
-
- //Display display = _viewer.getShell().getDisplay();
- Color bgcolour = _tabFolderPage.getBackground();
-
- table.setBackground(bgcolour);
- _inputEntry.getTextWidget().setBackground(bgcolour);
- }
- }
-
- public void createControl(Composite parent)
- {
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- parent.setLayout(gridLayout);
-
- // create table portion
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- _viewer = new SystemCommandsView(table, _viewPart);
- _viewer.setWorkbenchPart(_viewPart);
-
- _viewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
- {
- handleDoubleClick(event);
- }
- });
-
-
- SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "ucmd0000"); //$NON-NLS-1$
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
- table.setHeaderVisible(false);
- table.setLinesVisible(false);
-
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- table.setLayoutData(gridData);
-
- _inputContainer = new Composite(parent, SWT.NONE);
- GridLayout ilayout = new GridLayout();
- ilayout.numColumns = 4;
-
- Label label = new Label(_inputContainer, SWT.NONE);
- label.setText(ShellResources.RESID_COMMANDSVIEW_COMMAND_LABEL);
-
- _inputEntry = new SystemCommandEditor(_viewPart.getViewSite(), _inputContainer, SWT.SINGLE | SWT.BORDER, 50, _entryViewerConfiguration, "", SystemResources.ACTION_CONTENT_ASSIST); //$NON-NLS-1$
- _inputEntry.getTextWidget().setToolTipText(ShellResources.RESID_COMMANDSVIEW_COMMAND_TOOLTIP);
-
-
- _upButton = new Button(_inputContainer, SWT.ARROW | SWT.UP);
- _upButton.addSelectionListener(this);
- _upButton.setToolTipText(ShellResources.RESID_COMMANDSVIEW_PREVIOUS_TOOLTIP);
-
- _downButton = new Button(_inputContainer, SWT.ARROW | SWT.DOWN);
- _downButton.addSelectionListener(this);
- _downButton.setToolTipText(ShellResources.RESID_COMMANDSVIEW_PREVIOUS_TOOLTIP);
-
- GridData idata = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_VERTICAL | GridData.FILL_HORIZONTAL);
- idata.heightHint = 22;
- _inputEntry.getTextWidget().setLayoutData(idata);
- _inputEntry.getTextWidget().addListener(SWT.KeyUp, _keyListener);
-
- enableEntry(false);
-
- GridData gridData1 = new GridData(GridData.FILL_HORIZONTAL);
- _inputContainer.setLayout(ilayout);
- _inputContainer.setLayoutData(gridData1);
-
- updateTheme();
- IThemeManager mgr = PlatformUI.getWorkbench().getThemeManager();
- mgr.addPropertyChangeListener(this);
-
-
-
- }
-
- public void propertyChange(PropertyChangeEvent e)
- {
- updateTheme();
- }
- public void updateTheme()
- {
- //Display display = getViewer().getControl().getDisplay();
- IThemeManager mgr = PlatformUI.getWorkbench().getThemeManager();
- Color bg = mgr.getCurrentTheme().getColorRegistry().get(REMOTE_COMMANDS_VIEW_BG_COLOR);
- Color fg = mgr.getCurrentTheme().getColorRegistry().get(REMOTE_COMMANDS_VIEW_FG_COLOR);
- Font fFont =mgr.getCurrentTheme().getFontRegistry().get(REMOTE_COMMANDS_VIEW_FONT);
-
- _inputEntry.getControl().setBackground(bg);
- _inputEntry.getControl().setForeground(fg);
- _inputEntry.getControl().setFont(fFont);
- }
-
- private void handleDoubleClick(DoubleClickEvent event)
- {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null)
- return;
-
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);
- //boolean alreadyHandled = false;
- if (adapter != null)
- {
- if (adapter.hasChildren(element))
- {
- // special case for folders
- if (element instanceof IRemoteFile)
- {
- IRemoteFile folder = (IRemoteFile) element;
- if (folder.isDirectory())
- {
- String path = folder.getAbsolutePath();
- ISubSystem cmdSubSystem = adapter.getSubSystem(element);
-
- String cdCmd = "cd " + PathUtility.enQuoteUnix(path); //$NON-NLS-1$
- if (cmdSubSystem.getHost().getSystemType().equals("Local") //$NON-NLS-1$
- && System.getProperty("os.name").toLowerCase().startsWith("win") //$NON-NLS-1$ //$NON-NLS-2$
- || cmdSubSystem.getHost().getSystemType().equals("Windows")) //$NON-NLS-1$
- {
- cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
- }
- sendInput(cdCmd);
- }
- }
- }
- else if (element instanceof RemoteOutput)
- {
- RemoteOutput out = (RemoteOutput)element;
- if (out.getType().equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY))
- {
- String path = out.getAbsolutePath();
- ISubSystem cmdSubSystem = adapter.getSubSystem(element);
-
- String cdCmd = "cd " + PathUtility.enQuoteUnix(path); //$NON-NLS-1$
- if (cmdSubSystem.getHost().getSystemType().equals("Local") //$NON-NLS-1$
- && System.getProperty("os.name").toLowerCase().startsWith("win") //$NON-NLS-1$ //$NON-NLS-2$
- || cmdSubSystem.getHost().getSystemType().equals("Windows")) //$NON-NLS-1$
- {
- cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
- }
- sendInput(cdCmd);
- }
- else
- {
- /*alreadyHandled =*/ adapter.handleDoubleClick(element);
- }
- }
- else
- {
- /*alreadyHandled =*/ adapter.handleDoubleClick(element);
- }
- }
- }
-
- public void dispose()
- {
- IThemeManager mgr = PlatformUI.getWorkbench().getThemeManager();
- mgr.removePropertyChangeListener(this);
-
- _inputEntry.getTextWidget().removeListener(SWT.KeyUp, _keyListener);
- _inputEntry.getTextWidget().dispose();
- _inputContainer.dispose();
- _viewer.dispose();
- _tabFolderPage.dispose();
- }
-
- private void enableEntry(boolean flag)
- {
- if (!_inputEntry.getTextWidget().isDisposed())
- _inputEntry.getTextWidget().setEnabled(flag);
- }
-
- public void sendInput()
- {
- String inputStr = _inputEntry.getTextWidget().getText();
- sendInput(inputStr);
- }
-
- public void sendInput(String inputStr)
- {
- Object input = _viewer.getInput();
- if (input instanceof IRemoteCommandShell)
- {
- _commandHistoryOffset = getCommandHistory().length + 1;
- IRemoteCommandShell remoteCommand = (IRemoteCommandShell) input;
- IRemoteCmdSubSystem commandSubSystem = remoteCommand.getCommandSubSystem();
- try
- {
- commandSubSystem.sendCommandToShell(inputStr, remoteCommand);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- _inputEntry.getTextWidget().setText(""); //$NON-NLS-1$
- _inputEntry.getTextWidget().setFocus();
- }
-
- public void sendBreak()
- {
- Object input = _viewer.getInput();
- if (input instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell remoteCommand = (IRemoteCommandShell) input;
- IRemoteCmdSubSystem commandSubSystem = remoteCommand.getCommandSubSystem();
- try
- {
- commandSubSystem.sendCommandToShell("#break", remoteCommand); //$NON-NLS-1$
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- public Object getInput()
- {
- if (_viewer != null)
- return _viewer.getInput();
- return null;
- }
-
- public void setInput(IAdaptable object)
- {
- setInput(object, true);
- updateTitle(object);
- }
-
- public void updateTitle(IAdaptable object)
- {
- if (object instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell command = (IRemoteCommandShell) object;
- String title = command.getType();
-
- SystemMessage msg = null;
- if (!command.isActive())
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FINISHED);
- }
- else
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_RUNNING);
- }
-
- msg.makeSubstitution(title);
- _title = msg.getLevelOneText();
-// _tabFolderPage.setText(_title);
- }
- }
-
- public String getTitle()
- {
- return _title;
- }
-
- public void setInput(IAdaptable object, boolean updateHistory)
- {
- if (_viewer != null && object != null)
- {
- _viewer.setInput(object);
- _entryViewerConfiguration.setRemoteCommand((IRemoteCommandShell) object);
- //_inputEntry.getTextWidget().setFocus();
- }
- }
-
- public void clearInput()
- {
- if (_viewer != null)
- {
- _viewer.setInput(null);
- _entryViewerConfiguration.setRemoteCommand(null);
- }
- }
-
- public SystemCommandsView getViewer()
- {
- return _viewer;
- }
-
- public void updateOutput()
- {
- if (_viewer != null)
- {
- ((SystemTableViewProvider) _viewer.getContentProvider()).flushCache();
- _viewer.updateChildren();
- _commandHistoryOffset = getCommandHistory().length;
- }
- }
-
- public void updateActionStates()
- {
- Object input = _viewer.getInput();
- if (input != null)
- {
- if (input instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmdInput = (IRemoteCommandShell) input;
- if (cmdInput.isActive())
- {
- enableEntry(true);
- }
- else
- {
- enableEntry(false);
- }
- }
- else
- {
- enableEntry(false);
- }
- }
- else
- {
- enableEntry(false);
- }
-
- }
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- Widget source = e.widget;
-
- if (source == _upButton)
- {
- handleUp();
- }
- else if (source == _downButton)
- {
- handleDown();
- }
- }
-
- private String[] getCommandHistory()
- {
- Object input = _viewer.getInput();
- if (input != null && input instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell command = (IRemoteCommandShell) input;
- return command.getHistory();
- }
- return null;
- }
-
- private void handleUp()
- {
- String[] history = getCommandHistory();
- _commandHistoryOffset--;
- if (_commandHistoryOffset > 0)
- {
- if (history.length > _commandHistoryOffset)
- {
- String lastCommand = history[_commandHistoryOffset];
- _inputEntry.getTextWidget().setText(lastCommand);
- _inputEntry.getTextWidget().setCaretOffset(_inputEntry.getTextWidget().getCharCount());
- }
- }
- else
- {
- _commandHistoryOffset = 0;
-
- if (history.length > 0)
- {
- _inputEntry.getTextWidget().setText(history[0]);
- _inputEntry.getTextWidget().setCaretOffset(_inputEntry.getTextWidget().getCharCount());
- }
- }
- }
-
- private void handleDown()
- {
- _commandHistoryOffset++;
- if (_commandHistoryOffset >= getCommandHistory().length)
- {
- _commandHistoryOffset = getCommandHistory().length;
- _inputEntry.getTextWidget().setText(""); //$NON-NLS-1$
- }
- else
- {
- String[] history = getCommandHistory();
- if (history.length > 0)
- {
- String lastCommand = history[_commandHistoryOffset];
- _inputEntry.getTextWidget().setText(lastCommand);
- _inputEntry.getTextWidget().setCaretOffset(_inputEntry.getTextWidget().getCharCount());
- }
- }
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
- */
- public void focusGained(FocusEvent arg0)
- {
- IActionBars actionBars = getActionBars();
- if (actionBars != null)
- {
- if (arg0.widget == _viewer.getControl())
- {
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, _copyAction);
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.PASTE, _pasteAction);
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, _selectAllAction);
- actionBars.updateActionBars();
-
- }
- else if (arg0.widget == _inputEntry.getControl())
- {
- _inputEntry.setActionHandlers();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
- */
- public void focusLost(FocusEvent arg0)
- {
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewWorkbook.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewWorkbook.java
deleted file mode 100644
index d1358b775..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewWorkbook.java
+++ /dev/null
@@ -1,252 +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.shells.ui.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableView;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-
-
-
-/**
- * This is the desktop view wrapper of the System View viewer.
- */
-public class CommandsViewWorkbook extends Composite
-{
-
-
- private CTabFolder _folder;
- private SystemCommandsViewPart _viewPart;
-
- public CommandsViewWorkbook(Composite parent, SystemCommandsViewPart viewPart)
- {
- super(parent, SWT.NONE);
-
- _folder = new CTabFolder(this, SWT.NONE);
- _folder.setLayout(new TabFolderLayout());
- _folder.setLayoutData(new GridData(GridData.FILL_BOTH));
- setLayout(new FillLayout());
- _viewPart = viewPart;
- }
-
- public void dispose()
- {
- if (!_folder.isDisposed())
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- if (!item.isDisposed())
- {
- CommandsViewPage page = (CommandsViewPage) item.getData();
- page.dispose();
- }
- }
- _folder.dispose();
- }
- super.dispose();
- }
-
- public CTabFolder getFolder()
- {
- return _folder;
- }
-
- public void remove(Object root)
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- if (!item.isDisposed())
- {
- CommandsViewPage page = (CommandsViewPage) item.getData();
-
- if (page != null && root == page.getInput())
- {
- item.dispose();
- page.dispose();
-
- page = null;
- item = null;
-
- _folder.redraw();
-
- return;
- }
- }
- }
- }
-
- public CTabItem getSelectedTab()
- {
- if (_folder.getItemCount() > 0)
- {
- int index = _folder.getSelectionIndex();
- CTabItem item = _folder.getItem(index);
- return item;
- }
-
- return null;
- }
-
- public CommandsViewPage getCurrentTabItem()
- {
- if (_folder.getItemCount() > 0)
- {
- int index = _folder.getSelectionIndex();
- CTabItem item = _folder.getItem(index);
- return (CommandsViewPage) item.getData();
- }
- return null;
- }
-
- public void showCurrentPage()
- {
- _folder.setFocus();
- }
-
- public Object getInput()
- {
- CommandsViewPage page = getCurrentTabItem();
- if (page != null)
- {
- // page.setFocus();
- return page.getInput();
- }
-
- return null;
- }
-
- public SystemCommandsView getViewer()
- {
- if (getCurrentTabItem() != null)
- {
- return getCurrentTabItem().getViewer();
- }
- return null;
- }
-
- public void updateOutput(IRemoteCommandShell root, boolean createTab)
- {
- if (!_folder.isDisposed())
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- CommandsViewPage page = (CommandsViewPage) item.getData();
- if (page != null && root == page.getInput())
- {
- if (!root.isActive())
- {
- setTabTitle((IAdaptable) root, item);
- page.updateTitle((IAdaptable) root);
- page.setEnabled(false);
- }
-
- page.updateOutput();
-
- /* DKM - changing focus can get annoying
- * see defect 142978
- *
- if (_folder.getSelectionIndex() != i)
- {
- _folder.setSelection(item);
- }
- */
- updateActionStates();
- //page.setFocus();
- return;
- }
- }
-
- if (/*root.isActive() &&*/ createTab)
- {
- // never shown this, so add it
- createTabItem((IAdaptable) root);
- }
- }
- }
-
- private void createTabItem(IAdaptable root)
- {
- CommandsViewPage commandsViewPage = new CommandsViewPage(_viewPart);
-
- CTabItem titem = new CTabItem(_folder, SWT.NULL);
- setTabTitle(root, titem);
-
- titem.setData(commandsViewPage);
- titem.setControl(commandsViewPage.createTabFolderPage(_folder, _viewPart.getEditorActionHandler()));
- _folder.setSelection(titem );
-
- commandsViewPage.setInput(root);
-
- SystemTableView viewer = commandsViewPage.getViewer();
- _viewPart.getSite().setSelectionProvider(viewer);
- _viewPart.getSite().registerContextMenu(viewer.getContextMenuManager(), viewer);
- //commandsViewPage.getViewer().addSelectionChangedListener((SystemCommandsViewPart)_viewPart);
-
- commandsViewPage.setFocus();
- }
-
- private void setTabTitle(IAdaptable root, CTabItem titem)
- {
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) root.getAdapter(ISystemViewElementAdapter.class);
- if (va != null)
- {
- titem.setText(va.getName(root));
- titem.setImage(va.getImageDescriptor(root).createImage());
- }
- }
-
- public void setInput(IAdaptable root)
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- CommandsViewPage page = (CommandsViewPage) item.getData();
- if (root == page.getInput())
- {
- _folder.setSelection(i);
- page.getViewer().updateChildren();
- return;
- }
- }
- }
-
- public void updateActionStates()
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- if (!item.isDisposed())
- {
- CommandsViewPage page = (CommandsViewPage) item.getData();
- if (page != null)
- {
- page.updateActionStates();
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/EncodingForm.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/EncodingForm.java
deleted file mode 100644
index cffb0f868..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/EncodingForm.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.shells.ui.view;
-
-import java.io.UnsupportedEncodingException;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class EncodingForm extends SystemBaseForm
-{
- // State for encoding group
- private String _encoding;
- private String _defaultEncoding;
-
- private Button _defaultEncodingButton;
- private Button _otherEncodingButton;
- private Combo _encodingCombo;
-
-
- public EncodingForm(Shell shell, ISystemMessageLine line)
- {
- super(shell, line);
- _defaultEncoding = ShellResources.RESID_SHELL_PROPERTYPAGE_DEFAULT_ENCODING;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.SystemBaseForm#createContents(org.eclipse.swt.widgets.Composite)
- */
- public Control createContents(Composite group)
- {
-
- SelectionAdapter buttonListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent e) {
- updateEncodingState(_defaultEncodingButton.getSelection());
- updateValidState();
- }
- };
-
- _defaultEncodingButton = new Button(group, SWT.RADIO);
- _defaultEncodingButton.setText(ShellResources.RESID_SHELL_PROPERTYPAGE_HOST_ENCODING);
- GridData data = new GridData();
- Font font = group.getFont();
-
- data.horizontalSpan = 2;
- _defaultEncodingButton.setLayoutData(data);
- _defaultEncodingButton.addSelectionListener(buttonListener);
- _defaultEncodingButton.setFont(font);
-
- _otherEncodingButton = new Button(group, SWT.RADIO);
- _otherEncodingButton.setText(ShellResources.RESID_SHELL_PROPERTYPAGE_OTHER_ENCODING);
- _otherEncodingButton.addSelectionListener(buttonListener);
- _otherEncodingButton.setFont(font);
-
- _encodingCombo = new Combo(group, SWT.NONE);
- data = new GridData();
- _encodingCombo.setFont(font);
- _encodingCombo.setLayoutData(data);
- _encodingCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateValidState();
- }
- });
-
- return _encodingCombo;
- }
-
- public void initialize(List defaults, String encoding)
- {
- _encoding = encoding;
-
- boolean isDefault = _encoding == null || _encoding.length() == 0 || encoding.equals(_defaultEncoding);
-
- if (!isDefault && !defaults.contains(_encoding))
- {
- defaults.add(_encoding);
- }
- Collections.sort(defaults);
- for (int i = 0; i < defaults.size(); ++i) {
- _encodingCombo.add((String) defaults.get(i));
- }
-
- _encodingCombo.setText(isDefault ? _defaultEncoding : _encoding);
- updateEncodingState(isDefault);
- }
-
- public Control getDefaultControl()
- {
- return _encodingCombo;
- }
-
- public boolean usingDefault()
- {
- return _defaultEncodingButton.getSelection();
- }
-
- public String getEncoding()
- {
- if (usingDefault())
- {
- return ""; //$NON-NLS-1$
- }
- return _encodingCombo.getText();
- }
-
- protected void updateValidState()
- {
- if (!isEncodingValid())
- {
- getMessageLine().setErrorMessage(ShellResources.RESID_UNSUPPORTED_ENCODING);
- }
- else
- {
- getMessageLine().clearErrorMessage();
- }
- }
-
- private boolean isEncodingValid()
- {
- return _defaultEncodingButton.getSelection()
- || isValidEncoding(_encodingCombo.getText());
- }
-
- private boolean isValidEncoding(String enc)
- {
- try {
- new String(new byte[0], enc);
- return true;
- } catch (UnsupportedEncodingException e) {
- return false;
- }
- }
-
- private void updateEncodingState(boolean useDefault)
- {
- _defaultEncodingButton.setSelection(useDefault);
- _otherEncodingButton.setSelection(!useDefault);
- _encodingCombo.setEnabled(!useDefault);
- updateValidState();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ISystemCommandTextModifyListener.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ISystemCommandTextModifyListener.java
deleted file mode 100644
index 7e3f152fe..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ISystemCommandTextModifyListener.java
+++ /dev/null
@@ -1,35 +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.shells.ui.view;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * Interface that is to be implemented by anyone interested in
- * listening to modify events on the command widget.
- */
-public interface ISystemCommandTextModifyListener
-{
-
- /**
- * Callback from SystemCommandTextField when the user modifies the command.
- * @param cmdText - current contents of the field
- * @param errorMessage - potential error detected by the default validator
- */
- public void commandModified(String cmdText, SystemMessage errorMessage);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ShellServiceSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ShellServiceSubSystemConfigurationAdapter.java
deleted file mode 100644
index a1e47ccce..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ShellServiceSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.view;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.shells.ui.actions.SystemCommandAction;
-import org.eclipse.rse.shells.ui.actions.SystemExportShellHistoryAction;
-import org.eclipse.rse.shells.ui.actions.SystemExportShellOutputAction;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class ShellServiceSubSystemConfigurationAdapter extends SubSystemConfigurationAdapter
-{
- protected IAction _exportShellHistoryAction;
- protected IAction _exportShellOutputAction;
- protected SystemCommandAction _commandAction;
- protected ImageDescriptor _activeShellImageDescriptor;
- protected ImageDescriptor _inactiveShellImageDescriptor;
-
- public IAction[] getSubSystemActions(ISubSystemConfiguration factory, ISubSystem selectedSubSystem, Shell shell)
- {
- List allActions = new ArrayList();
- IAction[] baseActions = super.getSubSystemActions(factory, selectedSubSystem, shell);
- for (int i = 0; i < baseActions.length; i++)
- {
- allActions.add(baseActions[i]);
- }
-
- //launching shells and finding files
- if (selectedSubSystem instanceof IRemoteFileSubSystem)
- {
- IRemoteFileSubSystem fs = (IRemoteFileSubSystem) selectedSubSystem;
- IRemoteCmdSubSystem cmdSubSystem = RemoteCommandHelpers.getCmdSubSystem(fs.getHost());
- if (cmdSubSystem != null)
- {
- allActions.add(getCommandShellAction(cmdSubSystem, shell));
- }
- }
- else if (selectedSubSystem instanceof IRemoteCmdSubSystem)
- {
- allActions.add(getCommandShellAction((IRemoteCmdSubSystem)selectedSubSystem, shell));
- }
-
- return (IAction[])allActions.toArray(new IAction[allActions.size()]);
- }
-
-
-
- public IAction getCommandShellAction(IRemoteCmdSubSystem selectedSubSystem, Shell shell)
- {
- if (_commandAction == null)
- {
- _commandAction = new SystemCommandAction(shell, true, selectedSubSystem);
- }
- else
- {
- _commandAction.setSubSystem(selectedSubSystem);
- }
- return _commandAction;
- }
-
- /**
- * Return the command shell history export action for the subsystem. If there is none, return null
- */
- public IAction getCommandShellHistoryExportAction(Shell shell)
- {
- if (_exportShellHistoryAction == null)
- {
- _exportShellHistoryAction = new SystemExportShellHistoryAction(shell);
- }
- return _exportShellHistoryAction;
- }
-
- /**
- * Return the command shell output export action for the subsystem. If there is none, return null
- */
- public IAction getCommandShellOutputExportAction(Shell shell)
- {
- if (_exportShellOutputAction == null)
- {
- _exportShellOutputAction = new SystemExportShellOutputAction(shell);
- }
- return _exportShellOutputAction;
- }
-
-
- /**
- * Return the active command shell icon for this subsystem
- */
- public ImageDescriptor getActiveCommandShellImageDescriptor()
- {
- if (_activeShellImageDescriptor == null)
- {
- _activeShellImageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHELLLIVE_ID);
-
- }
- return _activeShellImageDescriptor;
- }
-
- /**
- * Return the inactive command shell icon for this subsystem
- */
- public ImageDescriptor getInactiveCommandShellImageDescriptor()
- {
- if (_inactiveShellImageDescriptor == null)
- {
- _inactiveShellImageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHELL_ID);
- }
- return _inactiveShellImageDescriptor;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ShellServiceSubSystemConfigurationAdapterFactory.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ShellServiceSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 7349e50ac..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/ShellServiceSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystemConfiguration;
-
-
-public class ShellServiceSubSystemConfigurationAdapterFactory implements IAdapterFactory
-{
-
- private ISubSystemConfigurationAdapter ssFactoryAdapter = new ShellServiceSubSystemConfigurationAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISubSystemConfigurationAdapter.class};
- }
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, IShellServiceSubSystemConfiguration.class);
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof ShellServiceSubSystemConfiguration)
- adapter = ssFactoryAdapter;
-
- return adapter;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorView.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorView.java
deleted file mode 100644
index b795bd311..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorView.java
+++ /dev/null
@@ -1,177 +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.shells.ui.view;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteError;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.SystemTableView;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-public class SystemBuildErrorView extends SystemTableView
-{
-
- private class ErrorViewerFilter extends ViewerFilter
- {
- public boolean select(Viewer viewer, Object obj1, Object obj2)
- {
- if (obj2 instanceof IRemoteError)
- {
- return true;
- }
- return false;
- }
- }
-
-
- private Color _errColor;
- private Color _outColor;
- private Color _infColor;
- private Color _warColor;
- private Color _prmColor;
-
-
-
- public SystemBuildErrorView(Table table, ISystemMessageLine msgLine)
- {
- super(table, msgLine);
-
- Display display = getControl().getDisplay();
-
- _errColor = new Color(display, 255, 0, 0);
- _outColor = new Color(display, 50, 50, 50);
- _infColor = new Color(display, 0, 0, 255);
- _warColor = new Color(display, 200, 150, 0);
- _prmColor = new Color(display, 0, 50, 0);
-
- _provider = new SystemBuildErrorViewProvider();
- setContentProvider(_provider);
- addFilter(new ErrorViewerFilter());
- }
-
- public void refresh()
- {
- super.refresh();
-
- Table table = getTable();
- if (table != null && table.getItemCount() > 0)
- {
- TableItem lastItem = table.getItem(table.getItemCount() - 1);
- table.showItem(lastItem);
- }
- }
-
- public IPropertyDescriptor[] getVisibleDescriptors(Object object)
- {
- SystemViewRemoteErrorAdapter adpt = new SystemViewRemoteErrorAdapter();
- return adpt.getUniquePropertyDescriptors();
- }
-
- public IPropertyDescriptor getNameDescriptor(Object object)
- {
- SystemViewRemoteErrorAdapter adpt = new SystemViewRemoteErrorAdapter();
- return adpt.getPropertyDescriptors()[0];
- }
-
- public void setOffset(int offset)
- {
- ((SystemBuildErrorViewProvider)_provider).setOffset(offset);
- }
-
- public synchronized void updateChildren()
- {
- computeLayout();
- internalRefresh(getInput());
-
- }
-
-
- public void clearAllItems()
- {
- Object input = getInput();
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- Object[] children = provider.getChildren(input);
-
- ((SystemBuildErrorViewProvider)_provider).moveOffsetToEnd();
- clearFirstItems(children, children.length - 1);
- provider.flushCache();
-
- }
-
- private void clearFirstItems(Object[] children, int items)
- {
- Table table = getTable();
-
- table.setRedraw(false);
- synchronized (table)
- {
- //int count = table.getItemCount();
- table.remove(0, items);
-
- }
- table.setRedraw(true);
- }
-
- protected Item newItem(Widget parent, int flags, int ix)
- {
- if (parent instanceof Table)
- {
- return new TableItem((Table) parent, flags);
- }
-
- return null;
- }
-
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- Object child = event.getSource();
-
- if (event.getType() == ISystemResourceChangeEvents.EVENT_REFRESH)
- {
- if (child == getInput())
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- if (provider != null)
- {
- provider.flushCache();
-
- updateChildren();
- return;
- }
- }
- }
-
- //super.systemResourceChanged(event);
- }
-
- protected Object getParentForContent(Object element)
- {
- return getAdapter(element).getParent(element);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorViewPart.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorViewPart.java
deleted file mode 100644
index ce45e6a52..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorViewPart.java
+++ /dev/null
@@ -1,482 +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.shells.ui.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.core.subsystems.IRemoteLineReference;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.ISystemIconConstants;
-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;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.ViewPart;
-
-
-
-
-
-/**
- * This is the wrapper class to SystemBuildErrorView.
- */
-public class SystemBuildErrorViewPart extends ViewPart implements ISelectionListener, SelectionListener, ISystemResourceChangeListener, ISystemMessageLine
-{
-
-
- class BrowseAction extends Action
- {
- public BrowseAction(String label, ImageDescriptor des)
- {
- super(label, des);
-
- setToolTipText(label);
- }
-
- public void checkEnabledState()
- {
- if (getViewer().getInput() != null)
- {
- setEnabled(true);
- }
- else
- {
- setEnabled(false);
- }
- }
-
- public void run()
- {
- }
- }
-
- public class ClearAction extends BrowseAction
- {
- public ClearAction()
- {
- super(SystemResources.ACTION_CLEAR_LABEL,
- // DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_CLEAR));
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ID));
-
- ImageDescriptor des = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ID);
-
- /*
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_CLEAR));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_CLEAR));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_CLEAR));
- */
- setImageDescriptor(des);
-
- // TODO DKM - get help for this!
- //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CLEAR_CONSOLE_ACTION);
- }
-
- public void checkEnabledState()
- {
- Object input = getViewer().getInput();
- if (input != null)
- {
- if (input instanceof IRemoteCommandShell)
- {
- setEnabled(((IRemoteCommandShell) input).isActive());
- return;
- }
- }
-
- setEnabled(false);
- }
-
- public void run()
- {
- clear();
- }
-
- // clear contents of the current command viewer
- private void clear()
- {
- getViewer().clearAllItems();
- }
- }
-
-
- // constants
- public static final String ID = "org.eclipse.rse.shells.ui.view.buildErrorView"; //$NON-NLS-1$
- // matches id in plugin.xml, view tag
-
- private SystemBuildErrorView _viewer;
- private ClearAction _clearAction;
- private boolean _enableUpdates = true;
-
- // for ISystemMessageLine
- private String _message, _errorMessage;
- private SystemMessage sysErrorMessage;
- private IStatusLineManager _statusLine = null;
-
- public void setFocus()
- {
- _viewer.getControl().setFocus();
- }
-
- public SystemBuildErrorView getViewer()
- {
- return _viewer;
- }
-
- public Shell getShell()
- {
- return _viewer.getShell();
- }
-
- public void fillLocalToolBar()
- {
- boolean firstCall = false;
- if (_clearAction == null)
- {
- firstCall = true;
- _clearAction = new ClearAction();
- }
-
- IActionBars actionBars = getViewSite().getActionBars();
- IToolBarManager toolBarManager = actionBars.getToolBarManager();
- addToolBarItems(toolBarManager);
-
- if (firstCall)
- {
- //IMenuManager menuManager = actionBars.getMenuManager();
- _statusLine = actionBars.getStatusLineManager();
- //addMenuItems(menuManager);
- }
- }
-
- private void addToolBarItems(IToolBarManager toolBarManager)
- {
- toolBarManager.removeAll();
-
- toolBarManager.add(_clearAction);
- }
-
- public void createPartControl(Composite parent)
- {
- // create table portion
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- _viewer = new SystemBuildErrorView(table, this);
- table.setLinesVisible(true);
-
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.addSelectionListener(this);
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
-
- registry.addSystemResourceChangeListener(this);
-
- _viewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
- {
- handleDoubleClick(event);
- }
- });
- SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "uerr0000"); //$NON-NLS-1$
- fillLocalToolBar();
- }
-
- private void handleDoubleClick(DoubleClickEvent event)
- {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null)
- return;
-
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);
- //boolean alreadyHandled = false;
- if (adapter != null)
- {
- if (!adapter.hasChildren(element))
- {
- /*alreadyHandled =*/ adapter.handleDoubleClick(element);
- }
- }
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection sel)
- {
- }
-
- public void dispose()
- {
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.removeSelectionListener(this);
- _viewer.dispose();
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.removeSystemResourceChangeListener(this);
- super.dispose();
- }
-
-
-
-
-
- public void selectionChanged(SelectionChangedEvent e)
- {
- }
-
- public void resetOffset()
- {
- SystemBuildErrorViewProvider provider = (SystemBuildErrorViewProvider)_viewer.getContentProvider();
- int size = ((IRemoteCommandShell)_viewer.getInput()).getSize();
- provider.setOffset(size - 1);
- }
-
- public void setInput(IAdaptable object, String cmdString)
- {
- setInput(object, true, cmdString);
- }
-
- public void setInput(IAdaptable object, boolean updateHistory, String cmdString)
- {
- _viewer.getTable().removeAll();
- setEnableUpdates(true);
-
- if (object instanceof IRemoteCommandShell)
- {
- _viewer.setInput(object);
- }
- else
- {
- if (object instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput)object;
- _viewer.setInput(output.getParent());
- SystemBuildErrorViewProvider provider = (SystemBuildErrorViewProvider)_viewer.getContentProvider();
- provider.setOffset(output.getIndex() - 1);
- }
- else if (object instanceof IRemoteLineReference)
- {
- _viewer.setInput(((IRemoteLineReference)object).getParent());
- }
-
- }
-
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_LIST_TITLE);
- msg.makeSubstitution(cmdString);
- setPartName(msg.getLevelOneText());
- }
-
- public void updateOutput()
- {
- if (_viewer != null)
- {
- ((SystemTableViewProvider) _viewer.getContentProvider()).flushCache();
- _viewer.updateChildren();
- }
- }
-
-
- private void updateOutput(IRemoteCommandShell root)
- {
- if (root != null && _enableUpdates)
- {
- if (_viewer.getInput() != root)
- {
- _viewer.clearAllItems();
- _viewer.setInput(root);
- }
- updateOutput();
- }
- }
-
- /*
- * Lock view from updates since the compile has ended
- */
- public void setEnableUpdates(boolean enable)
- {
- if (!enable)
- {
- // do one last refresh to make sure
- // last compile got shown
- updateOutput();
- }
- _enableUpdates= enable;
- }
-
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- if (event.getType() == ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_FINISHED)
- {
- Object source = event.getSource();
- if (source instanceof IRemoteCmdSubSystem)
- {
- //Shell shell = RSEUIPlugin.getTheSystemRegistry().getShell();
- //shell.getDisplay().asyncExec(new CommandSubSystemDisconnectedRunnable((RemoteCmdSubSystem) source));
- }
- else
- if (source instanceof IRemoteCommandShell)
- {
- // find out if we're listening to this
- updateOutput((IRemoteCommandShell) source);
- }
- }
- else
- if (event.getType() == ISystemResourceChangeEvents.EVENT_REFRESH)
- {
-
- Object parent = event.getParent();
- if (parent instanceof IRemoteCommandShell)
- {
- updateOutput((IRemoteCommandShell) parent);
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e)
- {
-
-
- }
-
-
-
-// -------------------------------
- // ISystemMessageLine interface...
- // -------------------------------
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- _errorMessage = null;
- sysErrorMessage = null;
- if (_statusLine != null)
- _statusLine.setErrorMessage(_errorMessage);
- }
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- _message = null;
- if (_statusLine != null)
- _statusLine.setMessage(_message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage()
- {
- return _errorMessage;
- }
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage()
- {
- return _message;
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- this._errorMessage = message;
- if (_statusLine != null)
- _statusLine.setErrorMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- return sysErrorMessage;
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- sysErrorMessage = message;
- setErrorMessage(message.getLevelOneText());
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(Throwable exc)
- {
- setErrorMessage(exc.getMessage());
- }
-
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- this._message = message;
- if (_statusLine != null)
- _statusLine.setMessage(message);
- }
- /**
- *If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- setMessage(message.getLevelOneText());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorViewProvider.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorViewProvider.java
deleted file mode 100644
index 6d27b4a8a..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemBuildErrorViewProvider.java
+++ /dev/null
@@ -1,124 +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.shells.ui.view;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.subsystems.IRemoteLineReference;
-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.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-
-
-
-/**
- * This is the content and label provider for the SystemTableView.
- * This class is used both to populate the SystemTableView but also
- * to resolve the icon and labels for the cells in the table.
- *
- */
-public class SystemBuildErrorViewProvider extends SystemTableViewProvider
-{
-
- private int _offset = 0;
- private Object[] _unfilteredResults = null;
-
- public SystemBuildErrorViewProvider()
- {
- super();
- }
-
-
- public void inputChanged(Viewer visualPart, Object oldInput, Object newInput)
- {
- if (newInput instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmd = (IRemoteCommandShell)newInput;
- Object[] output = cmd.listOutput();
- if (_offset == 0)
- setOffset(output.length);
- }
- else if (newInput instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput)newInput;
- //IRemoteCommandShell cmd = (IRemoteCommandShell)output.getParent();
- setOffset(output.getIndex());
- }
- else if (newInput instanceof IRemoteLineReference)
- {
- //IRemoteLineReference output = (IRemoteLineReference)newInput;
- //IRemoteCommandShell cmd = (IRemoteCommandShell)output.getParent();
- //setOffset(output.getIndex());
- }
- }
-
-
- public void setOffset(int offset)
- {
- _offset = offset;
- }
-
- public void moveOffsetToEnd()
- {
- if (_unfilteredResults != null)
- {
- _offset = _unfilteredResults.length;
- }
- }
-
- public Object[] getElements(Object object)
- {
- Object[] results = null;
- if (object == _lastObject && _lastResults != null)
- {
- return _lastResults;
- }
- else
- if (object instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- results = adapter.getChildren(object);
-
- ArrayList filterredResults = new ArrayList();
- for (int i = _offset+ 1; i <results.length;i++)
- {
- if (results[i] instanceof IRemoteError)
- {
- filterredResults.add(results[i]);
- }
- }
-
- _lastResults = filterredResults.toArray();//results;
- _unfilteredResults = results;
- _lastObject = object;
- }
- }
- if (results == null)
- {
- return new Object[0];
- }
-
- return _lastResults;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java
deleted file mode 100644
index 2287773f7..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - fix 158765: content assist miss disables enter
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.view;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextListener;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.IWidgetTokenKeeper;
-import org.eclipse.jface.text.TextEvent;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorUserActionCommand;
-import org.eclipse.rse.ui.view.SystemViewMenuListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.custom.VerifyKeyListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-import org.eclipse.ui.texteditor.IUpdate;
-
-
-
-/**
- * Class used for constructing a command editor widget with
- * UDA substitution variable completion
- */
-public class SystemCommandEditor extends SourceViewer
-{
- protected boolean menuListenerAdded;
- private Map fGlobalActions = new HashMap(10);
- private java.util.List fSelectionActions = new ArrayList(3);
- protected ISystemValidator cmdValidator;
- protected boolean ignoreChanges;
- private String contentAssistText;
- private boolean isInCodeAssist = false;
- private IViewSite _site;
- private Vector listeners = new Vector();
-
- private TextViewerAction _undoAction = null;
- private TextViewerAction _cutAction = null;
- private TextViewerAction _copyAction = null;
- private TextViewerAction _pasteAction = null;
- private TextViewerAction _selectAllAction = null;
- private TextViewerAction _caAction = null;
-
- /**
- * Constructor for the editor
- * Create the editor widget
- */
- public SystemCommandEditor(
- IViewSite site,
- Composite parent,
- int attributes,
- int columnSpan,
- SourceViewerConfiguration sourceViewerConfiguration,
- String cmd,
- String contentAssistText)
- {
- super(parent, null, attributes);
- this.contentAssistText = contentAssistText;
- _site = site;
- init(columnSpan, sourceViewerConfiguration, cmd);
- }
- private void init(int columnSpan, SourceViewerConfiguration sourceViewerConfiguration, String cmd)
- {
- if (cmdValidator == null)
- {
- setCommandValidator(new ValidatorUserActionCommand());
- }
- IDocument document = new Document();
- configure(sourceViewerConfiguration);
- setEditable(true);
- setDocument(document);
- Control control = getControl();
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = columnSpan;
- data.widthHint = 200;
- data.heightHint = 45;
- control.setLayoutData(data);
- document.set(cmd);
- addSelectionChangedListener(new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent event)
- {
- updateSelectionDependentActions();
- }
- });
- addTextListener(new ITextListener()
- {
- public void textChanged(TextEvent event)
- {
- updateUndoAction();
- if (ignoreChanges || !getTextWidget().isEnabled())
- return;
- String cmdText = getCommandText();
- updateSelectionDependentActions(); // defect 46369 ... just in case
- _selectAllAction.setEnabled(cmdText.length() > 0); // defect 46369
- SystemMessage errorMessage = validateCommand();
- fireModifyEvents(cmdText, errorMessage);
- }
- });
- getTextWidget().addKeyListener(new KeyAdapter()
- {
- public void keyReleased(KeyEvent e)
- {
-
- if (!e.doit)
- return;
-
- if (e.stateMask == SWT.CTRL)
- {
- // DKM - using this now since SWT isn't providing statemask with verify key events
- switch (e.character)
- {
- case ' ' :
- //bug 158765: enter may be disabled only when the widget is shown,
- //not if content assist is requested (since results may be empty)
- //setInCodeAssist(true);
- doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
- //e.doit = false;
- break;
-
- case 'z' - 'a' + 1 :
- // CTRL-Z
- doOperation(ITextOperationTarget.UNDO);
- //e.doit = false;
- break;
- }
- }
-
- }
- });
- prependVerifyKeyListener(new VerifyKeyListener()
- {
- public void verifyKey(VerifyEvent event)
- {
- handleVerifyKeyPressed(event);
- }
- });
- initializeActions();
- }
- public String getCommandText()
- {
- return getDocument().get().trim();
- }
-
- public String getSelectedText()
- {
- return getTextWidget().getSelectionText();
- }
- /**
- * Add a modify listener
- */
- public void addModifyListener(ISystemCommandTextModifyListener listener)
- {
- listeners.add(listener);
- }
- /**
- * Remove a modify listener
- */
- public void removeModifyListener(ISystemCommandTextModifyListener listener)
- {
- listeners.remove(listener);
- }
- /**
- * Fire an event to listeners
- */
- private void fireModifyEvents(String cmdText, SystemMessage errorMessage)
- {
- for (int idx = 0; idx < listeners.size(); idx++)
- ((ISystemCommandTextModifyListener) listeners.elementAt(idx)).commandModified(cmdText, errorMessage);
- }
- /**
- * Turn on or off event ignoring flag
- */
- public void setIgnoreChanges(boolean ignore)
- {
- ignoreChanges = ignore;
- }
- /**
- * Validate command input
- */
- public SystemMessage validateCommand()
- {
- if (cmdValidator != null)
- return cmdValidator.validate(getCommandText());
- else
- return null;
- }
- /**
- * Set the command validator to validate contents per keystroke
- */
- public void setCommandValidator(ISystemValidator cmdValidator)
- {
- this.cmdValidator = cmdValidator;
- }
- private void fillContextMenu(IMenuManager menu)
- {
- menu.add(new GroupMarker(ITextEditorActionConstants.GROUP_UNDO));
- menu.appendToGroup(
- ITextEditorActionConstants.GROUP_UNDO,
- (IAction) fGlobalActions.get(ITextEditorActionConstants.UNDO));
- menu.add(new Separator(ITextEditorActionConstants.GROUP_EDIT));
- menu.appendToGroup(
- ITextEditorActionConstants.GROUP_EDIT,
- (IAction) fGlobalActions.get(ITextEditorActionConstants.CUT));
- menu.appendToGroup(
- ITextEditorActionConstants.GROUP_EDIT,
- (IAction) fGlobalActions.get(ITextEditorActionConstants.COPY));
- menu.appendToGroup(
- ITextEditorActionConstants.GROUP_EDIT,
- (IAction) fGlobalActions.get(ITextEditorActionConstants.PASTE));
- menu.appendToGroup(
- ITextEditorActionConstants.GROUP_EDIT,
- (IAction) fGlobalActions.get(ITextEditorActionConstants.SELECT_ALL));
- menu.add(new Separator("group.generate")); //$NON-NLS-1$
- menu.appendToGroup("group.generate", (IAction) fGlobalActions.get("ContentAssistProposal")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- private IActionBars getActionBars()
- {
- if (_site != null)
- {
- IActionBars actionBars = _site.getActionBars();
- return actionBars;
- }
- return null;
- }
- public void setViewSite(IViewSite site)
- {
- _site = site;
- }
- private void initializeActions()
- {
- _undoAction = new TextViewerAction(this, UNDO);
- _undoAction.setText(SystemResources.ACTION_UNDO_LABEL);
- fGlobalActions.put(ITextEditorActionConstants.UNDO, _undoAction);
- _undoAction.setEnabled(false); // defect 46369
- _cutAction = new TextViewerAction(this, CUT);
- _cutAction.setText(SystemResources.ACTION_CUT_LABEL);
- fGlobalActions.put(ITextEditorActionConstants.CUT, _cutAction);
- _cutAction.setEnabled(false); // defect 46369
- _copyAction = new TextViewerAction(this, COPY);
- _copyAction.setText(SystemResources.ACTION_COPY_LABEL);
- fGlobalActions.put(ITextEditorActionConstants.COPY, _copyAction);
- _copyAction.setEnabled(false); // defect 46369
- _pasteAction = new TextViewerAction(this, PASTE);
- _pasteAction.setText(SystemResources.ACTION_PASTE_LABEL);
- fGlobalActions.put(ITextEditorActionConstants.PASTE, _pasteAction);
- _pasteAction.setEnabled(false); // defect 46369
- if (_pasteAction != null) {
- _pasteAction.update();
- }
- _selectAllAction = new TextViewerAction(this, SELECT_ALL);
- _selectAllAction.setText(SystemResources.ACTION_SELECT_ALL_LABEL);
- fGlobalActions.put(ITextEditorActionConstants.SELECT_ALL, _selectAllAction);
- _selectAllAction.setEnabled(false); // defect 46369
- _caAction = new TextViewerAction(this, CONTENTASSIST_PROPOSALS);
- _caAction.setText(contentAssistText);
- _caAction.setEnabled(true);
- fGlobalActions.put("ContentAssistProposal", _caAction); //$NON-NLS-1$
-
-
- setActionHandlers();
-
- fSelectionActions.add(ITextEditorActionConstants.CUT);
- fSelectionActions.add(ITextEditorActionConstants.COPY);
- fSelectionActions.add(ITextEditorActionConstants.PASTE);
- // create context menu
- MenuManager manager = new MenuManager();
- manager.setRemoveAllWhenShown(true);
- manager.addMenuListener(new IMenuListener()
- {
- public void menuAboutToShow(IMenuManager mgr)
- {
- fillContextMenu(mgr);
- if (!menuListenerAdded)
- {
- if (mgr instanceof MenuManager)
- {
- Menu m = ((MenuManager) mgr).getMenu();
- if (m != null)
- {
- menuListenerAdded = true;
- SystemViewMenuListener ml = new SystemViewMenuListener();
- //if (messageLine != null)
- // ml.setShowToolTipText(true, messageLine);
- m.addMenuListener(ml);
- }
- }
- }
- }
- });
- StyledText text = this.getTextWidget();
- Menu menu = manager.createContextMenu(text);
- text.setMenu(menu);
- }
-
- public void setActionHandlers()
- {
- IActionBars actionBars = getActionBars();
- if (actionBars != null)
- {
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.UNDO, _undoAction);
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.CUT, _cutAction);
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, _copyAction);
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.PASTE, _pasteAction);
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, _selectAllAction);
- actionBars.updateActionBars();
- }
- }
-
- protected void updateSelectionDependentActions()
- {
- Iterator iterator = fSelectionActions.iterator();
- while (iterator.hasNext())
- updateAction((String) iterator.next());
- }
- protected void updateUndoAction()
- {
- Object obj = fGlobalActions.get(ITextEditorActionConstants.UNDO);
- if (obj instanceof IAction)
- {
- IAction action = (IAction) obj;
- if (action instanceof IUpdate)
- ((IUpdate) action).update();
- }
- }
- protected void updateAction(String actionId)
- {
- Object obj = fGlobalActions.get(actionId);
- if (obj instanceof IAction)
- {
- IAction action = (IAction) obj;
- if (action instanceof IUpdate)
- ((IUpdate) action).update();
- }
- }
- private void handleVerifyKeyPressed(VerifyEvent event)
- {
- if (!event.doit)
- return;
-
- // DKM - moved to key press handler since for some reason SWT doesn't provide statemask anymore
- /*
- if (event.character == 0 && (event.keyCode & SWT.KEYCODE_BIT) == 0)
- {
- return;
- }
- switch (event.character)
- {
- case ' ' :
- doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
- event.doit = false;
- break;
- // CTRL-Z
- case (int) 'z' - (int) 'a' + 1 :
- doOperation(ITextOperationTarget.UNDO);
- event.doit = false;
- break;
- }
- */
- }
-
-
- public void setInCodeAssist(boolean flag)
- {
- isInCodeAssist = flag;
- }
-
- public boolean requestWidgetToken(IWidgetTokenKeeper requester)
- {
- boolean result = super.requestWidgetToken(requester);
- if (result)
- {
- setInCodeAssist(true);
- }
- return result;
- }
- public boolean requestWidgetToken(IWidgetTokenKeeper requester, int priority)
- {
- boolean result = super.requestWidgetToken(requester, priority);
- if (result) {
- setInCodeAssist(true);
- }
- return result;
- }
- public void releaseWidgetToken(IWidgetTokenKeeper tokenKeeper)
- {
- super.releaseWidgetToken(tokenKeeper);
- DelayedIsInCodeAssistUntoggler untoggler = new DelayedIsInCodeAssistUntoggler();
- untoggler.start();
- }
- public boolean isInCodeAssist()
- {
- return isInCodeAssist;
- }
- private class DelayedIsInCodeAssistUntoggler extends Thread
- {
- public void run()
- {
- try
- {
- Thread.sleep(200);
- }
- catch (InterruptedException e)
- {
- }
- setInCodeAssist(false);
- }
- }
- private static class TextViewerAction extends Action implements IUpdate
- {
- private int fOperationCode = -1;
- private ITextOperationTarget fOperationTarget;
- public TextViewerAction(ITextViewer viewer, int operationCode)
- {
- fOperationCode = operationCode;
- fOperationTarget = viewer.getTextOperationTarget();
- update();
- }
- /**
- * Updates the enabled state of the action.
- * Fires a property change if the enabled state changes.
- *
- * @see Action#firePropertyChange(String, Object, Object)
- */
- public void update()
- {
- boolean wasEnabled = isEnabled();
- boolean isEnabled = (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode));
- setEnabled(isEnabled);
- if (wasEnabled != isEnabled)
- {
- firePropertyChange(
- ENABLED,
- wasEnabled ? Boolean.TRUE : Boolean.FALSE,
- isEnabled ? Boolean.TRUE : Boolean.FALSE);
- }
- }
- /**
- * @see Action#run()
- */
- public void run()
- {
- if (fOperationCode != -1 && fOperationTarget != null)
- {
- fOperationTarget.doOperation(fOperationCode);
- }
- }
- }
-
- public void doOperation(int operation)
- {
- //bug 158765: enter may be disabled only when the widget is shown,
- //not if content assist is requested (since results may be empty)
- //if (operation == CONTENTASSIST_PROPOSALS)
- //{
- // isInCodeAssist = true;
- //}
- super.doOperation(operation);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsUI.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsUI.java
deleted file mode 100644
index dff8e43b5..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsUI.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.shells.ui.view;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * A singleton class for dealing with remote commands
- */
-public class SystemCommandsUI
-{
-
-
- // singleton instance
- private static SystemCommandsUI instance;
- private static SystemCommandsViewPart _viewPart;
- private static SystemBuildErrorViewPart _errorPart;
-
- public static final String COMMANDS_VIEW_ID = SystemCommandsViewPart.ID;
- public static final String BUILD_ERROR_VIEW_ID = SystemBuildErrorViewPart.ID;
-
- private SystemCommandsUI()
- {
- super();
- }
-
- /**
- * Get the singleton instance.
- * @return the singleton object of this type
- */
- public static SystemCommandsUI getInstance()
- {
- if (instance == null)
- {
- instance = new SystemCommandsUI();
- }
-
- return instance;
- }
-
- public SystemBuildErrorViewPart activateBuildErrorView()
- {
- try
- {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- _errorPart = (SystemBuildErrorViewPart) page.showView(SystemCommandsUI.BUILD_ERROR_VIEW_ID);
- page.bringToTop(_errorPart);
- }
- catch (PartInitException e)
- {
- SystemBasePlugin.logError("Can not open build error view", e); //$NON-NLS-1$
- }
-
- return _errorPart;
- }
-
- public SystemCommandsViewPart activateCommandsView()
- {
- try
- {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- _viewPart = (SystemCommandsViewPart) page.showView(SystemCommandsUI.COMMANDS_VIEW_ID);
- page.bringToTop(_viewPart);
- }
- catch (PartInitException e)
- {
- e.printStackTrace();
- SystemBasePlugin.logError("Can not open remote shell view", e); //$NON-NLS-1$
- }
-
- return _viewPart;
- }
-
- public static SystemBuildErrorViewPart getBuildErrorView()
- {
- return _errorPart;
- }
-
- public static SystemCommandsViewPart getCommandsView()
- {
- return _viewPart;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java
deleted file mode 100644
index 3e7663df6..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java
+++ /dev/null
@@ -1,316 +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.shells.ui.view;
-
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput;
-import org.eclipse.rse.ui.ISystemThemeConstants;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.SystemTableView;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.themes.IThemeManager;
-
-public class SystemCommandsView extends SystemTableView implements ISystemThemeConstants, IPropertyChangeListener
-{
- public class CommandsViewFilter extends ViewerFilter
- {
- public boolean select(Viewer viewer, Object parent, Object element)
- {
- if (element instanceof IRemoteOutput)
- {
- IRemoteOutput remoteOutput = (IRemoteOutput) element;
- if (remoteOutput.getText().indexOf("BEGIN-END-TAG:") > -1) //$NON-NLS-1$
- {
- return false;
- }
- }
- return true;
- }
- }
-
- private static int MAX_BUFFER = 20000;
- private Color _errColor;
- private Color _outColor;
- private Color _infColor;
- private Color _warColor;
- private Color _prmColor;
- private int _maxCharWidth = 256;
-
- public SystemCommandsView(Table table, ISystemMessageLine msgLine)
- {
- super(table, msgLine);
- addFilter(new CommandsViewFilter());
- updateTheme();
- int[] colWidths = new int[1];
- colWidths[0] = 1000;
- setLastColumnWidths(colWidths);
- }
-
- // overridden to produce custom provider
- protected SystemTableViewProvider getProvider()
- {
- if (_provider == null)
- {
- _provider = new SystemCommandsViewProvider();
- }
- return _provider;
- }
-
- public void propertyChange(PropertyChangeEvent e)
- {
- // for now always update
- updateTheme();
- }
-
- public void updateTheme()
- {
- Table table = getTable();
- if (table != null)
- {
- IThemeManager mgr = PlatformUI.getWorkbench().getThemeManager();
- Color bg = mgr.getCurrentTheme().getColorRegistry().get(REMOTE_COMMANDS_VIEW_BG_COLOR);
- Color fg = mgr.getCurrentTheme().getColorRegistry().get(REMOTE_COMMANDS_VIEW_FG_COLOR);
- Font fFont = mgr.getCurrentTheme().getFontRegistry().get(REMOTE_COMMANDS_VIEW_FONT);
- table.setBackground(bg);
- table.setForeground(fg);
- table.setFont(fFont);
- if (_errColor == null)
- {
- mgr.addPropertyChangeListener(this);
- }
- _errColor = mgr.getCurrentTheme().getColorRegistry().get(MESSAGE_ERROR_COLOR);
- _outColor = mgr.getCurrentTheme().getColorRegistry().get(REMOTE_COMMANDS_VIEW_FG_COLOR);
- _infColor = mgr.getCurrentTheme().getColorRegistry().get(MESSAGE_INFORMATION_COLOR);
- _warColor = mgr.getCurrentTheme().getColorRegistry().get(MESSAGE_WARNING_COLOR);
- _prmColor = mgr.getCurrentTheme().getColorRegistry().get(REMOTE_COMMANDS_VIEW_PROMPT_COLOR);
- }
- }
-
- public void refresh()
- {
- super.refresh();
- Table table = getTable();
- if (table != null && table.getItemCount() > 0)
- {
- TableItem lastItem = table.getItem(table.getItemCount() - 1);
- table.showItem(lastItem);
- }
- }
-
- public synchronized void updateChildren()
- {
- // updateTheme();
- Object input = getInput();
- if (input instanceof IRemoteCommandShell)
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- Table table = getTable();
- Object[] children = provider.getChildren(input);
- if (children != null && children.length > 0)
- {
- boolean needsLayout = false;
- TableItem[] tableItems = table.getItems();
- if (tableItems == null || tableItems.length == 0)
- {
- needsLayout = true;
- } else
- {
- int widest = provider.getMaxCharsInColumnZero();
- if (widest > _maxCharWidth)
- {
- needsLayout = true;
- _maxCharWidth = widest;
- }
- }
- synchronized (children)
- {
- int index = table.getItemCount();
- if (index > MAX_BUFFER)
- {
- table.setRedraw(false);
- clearFirstItems(children, index - (MAX_BUFFER / 2));
- table.setRedraw(true);
- provider.flushCache();
- internalRefresh(input);
- } else
- {
- // update previous item
- /*
- if (index > 0 && (children.length > index - 1))
- {
- Object lastObject = children[index - 1];
-
- TableItem lastItem = table.getItem(index - 1);
- if (lastObject != null && lastItem != null)
- {
- colorItem(lastItem, lastObject);
- updateItem(lastItem, lastObject);
- }
- }*/
- for (int i = index; i < children.length; i++)
- {
- Object child = children[i];
- if (child != null)
- {
- boolean isVisible = true;
- if (isVisible)
- {
- TableItem newItem = (TableItem) newItem(table, SWT.NONE, index);
- colorItem(newItem, child);
- updateItem(newItem, child);
- index++;
- }
- }
- }
- int y = table.getSize().y;
- int h = table.getItemHeight();
- int n = y / h - 1;
- table.setTopIndex(Math.max(0, index - n));
- }
- }
- if (needsLayout)
- {
- computeLayout(true);
- }
- }
- }
- }
-
- private void colorItem(TableItem newItem, Object child)
- {
- if (child instanceof IRemoteOutput)
- {
- IRemoteOutput rmtOutput = (IRemoteOutput) child;
- String type = rmtOutput.getType();
- if (type.equals("stderr") || type.equals(ISystemOutputRemoteTypes.TYPE_ERROR)) //$NON-NLS-1$
- {
- newItem.setForeground(_errColor);
- } else if (type.equals(ISystemOutputRemoteTypes.TYPE_WARNING))
- {
- newItem.setForeground(_warColor);
- } else if (type.equals(ISystemOutputRemoteTypes.TYPE_INFORMATIONAL))
- {
- newItem.setForeground(_infColor);
- } else if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT))
- {
- newItem.setForeground(_prmColor);
- } else
- {
- newItem.setForeground(_outColor);
- }
- }
- }
-
- public void clearAllItems()
- {
- Object input = getInput();
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- Object[] children = provider.getChildren(input);
- clearFirstItems(children, children.length);
- }
-
- public void dispose()
- {
- IThemeManager mgr = PlatformUI.getWorkbench().getThemeManager();
- mgr.removePropertyChangeListener(this);
- }
-
- private void clearFirstItems(Object[] children, int items)
- {
- Table table = getTable();
- table.setRedraw(false);
- synchronized (table)
- {
- if (items > 0)
- {
- int count = table.getItemCount();
- if (count >= items)
- {
- table.remove(0, items - 1);
- IRemoteCommandShell input = (IRemoteCommandShell) getInput();
- // remove items from command
- for (int i = 0; i < items && i < children.length; i++)
- {
- Object item = children[i];
- input.removeOutput(item);
- }
- }
- }
- }
- table.setRedraw(true);
- }
-
- protected Item newItem(Widget parent, int flags, int ix)
- {
- if (parent instanceof Table)
- {
- return new TableItem((Table) parent, flags);
- }
- return null;
- }
-
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- Object child = event.getSource();
- if (event.getType() == ISystemResourceChangeEvents.EVENT_REFRESH)
- {
- if (child == getInput())
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- if (provider != null)
- {
- provider.flushCache();
- updateChildren();
- return;
- }
- }
- } else if (event.getType() == ISystemResourceChangeEvents.EVENT_ICON_CHANGE)
- {
- try
- {
- Widget w = findItem(child);
- if (w != null)
- {
- updateItem(w, child);
- }
- } catch (Exception e)
- {
- }
- }
- //super.systemResourceChanged(event);
- }
-
- protected Object getParentForContent(Object element)
- {
- return getAdapter(element).getParent(element);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsViewPart.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsViewPart.java
deleted file mode 100644
index ea103c5aa..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsViewPart.java
+++ /dev/null
@@ -1,887 +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.shells.ui.view;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.shells.ui.actions.SystemBaseShellAction;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-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.rse.ui.actions.SystemBaseDummyAction;
-import org.eclipse.rse.ui.actions.SystemTablePrintAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.IRSEViewPart;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.CellEditorActionHandler;
-import org.eclipse.ui.part.ViewPart;
-
-
-
-/**
- * This is the desktop view wrapper of the System View viewer.
- */
-public class SystemCommandsViewPart
- extends ViewPart
- implements
- ISelectionListener,
- SelectionListener,
- ISelectionChangedListener,
- ISystemResourceChangeListener,
- IRSEViewPart,
- IMenuListener,
- ISystemMessageLine
-{
-
-
- class RestoreStateRunnable implements Runnable
- {
- public void run()
- {
- initDefaultCommandShells();
- }
- }
-
- class BrowseAction extends Action
- {
- public BrowseAction(String label, ImageDescriptor des)
- {
- super(label, des);
-
- setToolTipText(label);
- }
-
- public void checkEnabledState()
- {
- if (_folder != null && _folder.getInput() != null)
- {
- setEnabled(true);
- }
- else
- {
- setEnabled(false);
- }
- }
-
- public void run()
- {
- }
- }
-
-
-
-
- public class ShellAction extends BrowseAction
- {
- private IRemoteCmdSubSystem _cmdSubSystem;
-
- public ShellAction(String title, ImageDescriptor image, IRemoteCmdSubSystem cmdSubSystem)
- {
- super(title, image);
-
- setToolTipText(ShellResources.ACTION_RUN_SHELL_TOOLTIP);
- _cmdSubSystem = cmdSubSystem;
- }
-
- public void checkEnabledState()
- {
- setEnabled(_cmdSubSystem.canRunShell());
- }
-
- public void run()
- {
- try
- {
- IRemoteCommandShell cmd = _cmdSubSystem.runShell( null);
- if (cmd != null)
- {
- showInView(cmd);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- }
-
- private void showInView(IRemoteCommandShell cmd)
- {
- SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
- SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
- cmdsPart.updateOutput(cmd);
- }
- }
-
- public class ClearAction extends BrowseAction
- {
- public ClearAction()
- {
-
- super(SystemResources.ACTION_CLEAR_LABEL,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ID));
-
- ImageDescriptor des = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ID);
-
- setImageDescriptor(des);
-
- setEnabled(false);
- // TODO DKM - get help for this!
- //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CLEAR_CONSOLE_ACTION);
- }
-
- public void checkEnabledState()
- {
- Object input = _folder.getInput();
- if (input != null)
- {
- if (input instanceof IRemoteCommandShell)
- {
- setEnabled(((IRemoteCommandShell) input).isActive());
- return;
- }
- }
-
- setEnabled(false);
- }
-
- public void run()
- {
- if (_folder.getInput() != null)
- {
- clear();
- }
- }
-
- // clear contents of the current command viewer
- private void clear()
- {
- _folder.getViewer().clearAllItems();
- }
- }
-
-
- public class CommandSubSystemDisconnectedRunnable implements Runnable
- {
- private IRemoteCmdSubSystem _subsystem;
- public CommandSubSystemDisconnectedRunnable(IRemoteCmdSubSystem subsystem)
- {
- _subsystem = subsystem;
- }
-
- public void run()
- {
- IRemoteCommandShell[] cmds = _subsystem.getShells();
- if (cmds != null)
- {
- for (int i = 0; i < cmds.length; i++)
- {
- _folder.remove(cmds[i]);
- }
- }
- }
- }
-
- public class CommandMenuManager extends MenuManager
- {
- public CommandMenuManager()
- {
- super(ShellResources.ACTION_LAUNCH_LABEL);
- }
- }
-
- public class CommandSubmenuManager extends MenuManager
- {
- private IRemoteCmdSubSystem[] _subsystems;
- public CommandSubmenuManager(IHost connection, IRemoteCmdSubSystem[] subsystems)
- {
- super(connection.getAliasName());
- _subsystems = subsystems;
- }
-
- public IRemoteCmdSubSystem[] getSubSystems()
- {
- return _subsystems;
- }
- }
-
- private ClearAction _clearAction = null;
-
-
-
- private List _shellActions = null;
-
- private SystemTablePrintAction _printTableAction = null;
- private CommandsViewWorkbook _folder = null;
- private IRemoteCommandShell _lastSelected = null;
- private CellEditorActionHandler _editorActionHandler = null;
-
- // for ISystemMessageLine
- private String _message, _errorMessage;
- private SystemMessage sysErrorMessage;
- private IStatusLineManager _statusLine = null;
-
- // constants
- public static final String ID = "org.eclipse.rse.shells.ui.view.commandsView"; //$NON-NLS-1$
- // matches id in plugin.xml, view tag
-
- public void setFocus()
- {
- _folder.showCurrentPage();
- }
-
- public Shell getShell()
- {
- return _folder.getShell();
- }
-
- public Viewer getRSEViewer()
- {
- return _folder.getViewer();
- }
-
- public CellEditorActionHandler getEditorActionHandler()
- {
- if (_editorActionHandler == null)
- {
- _editorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars());
- }
- return _editorActionHandler;
- }
-
- public void createPartControl(Composite parent)
- {
- _folder = new CommandsViewWorkbook(parent, this);
- _folder.getFolder().addSelectionListener(this);
-
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.addSelectionListener(this);
-
-
- SystemWidgetHelpers.setHelp(_folder, RSEUIPlugin.HELPPREFIX + "ucmd0000"); //$NON-NLS-1$
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
-
-
-
- registry.addSystemResourceChangeListener(this);
-
- RestoreStateRunnable restore = new RestoreStateRunnable();
- Display.getCurrent().asyncExec(restore);
-
- fillLocalToolBar();
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection sel)
- {
- }
-
- public void dispose()
- {
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.removeSelectionListener(this);
- _folder.dispose();
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.removeSystemResourceChangeListener(this);
- super.dispose();
- }
-
- public void updateActionStates()
- {
- if (_shellActions == null || (_shellActions.size() == 0 && _folder != null && _folder.getInput() != null))
- fillLocalToolBar();
-
- if (_folder != null && _folder.getInput() != null)
- {
- IRemoteCommandShell currentSelected = (IRemoteCommandShell)_folder.getInput();
- if (currentSelected != null)
- {
- if (currentSelected != _lastSelected)
- {
- // reset the actions
- IActionBars actionBars = getViewSite().getActionBars();
- IToolBarManager toolBarManager = actionBars.getToolBarManager();
- updateShellActions();
- addToolBarItems(toolBarManager);
- }
- _lastSelected = currentSelected;
-
- _folder.updateActionStates();
- CommandsViewPage page = _folder.getCurrentTabItem();
- if (page != null)
- {
- _printTableAction.setTableView(page.getTitle(), page.getViewer());
- }
- else
- {
- _printTableAction.setTableView("", null); //$NON-NLS-1$
- }
-
- _clearAction.checkEnabledState();
-
- StructuredSelection cmdSelection = new StructuredSelection(_folder.getInput());
- for (int i =0; i < _shellActions.size(); i++)
- {
- Object action = _shellActions.get(i);
- if (action instanceof SystemBaseShellAction)
- {
- SystemBaseShellAction shellAction = (SystemBaseShellAction)action;
- shellAction.setEnabled(shellAction.updateSelection(cmdSelection));
- }
- }
-
- _printTableAction.checkEnabledState();
- }
- }
-
-
- }
-
- protected void updateShellActions()
- {
- if (_folder != null && _folder.getInput() != null)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell)_folder.getInput();
- SystemViewRemoteOutputAdapter adapter = (SystemViewRemoteOutputAdapter)((IAdaptable)cmdShell).getAdapter(ISystemViewElementAdapter.class);
-
- _shellActions = adapter.getShellActions(cmdShell.getCommandSubSystem().getParentRemoteCmdSubSystemConfiguration());
- }
- else if (_shellActions != null)
- {
- _shellActions.clear();
- }
- else
- {
- _shellActions = new ArrayList();
- }
- }
-
- public void fillLocalToolBar()
- {
- boolean firstCall = false;
- if (_folder != null )
- {
- firstCall = (_shellActions == null || _shellActions.size() == 0);
-
- if (firstCall) {
- updateShellActions();
- }
-
- updateActionStates();
-
- IActionBars actionBars = getViewSite().getActionBars();
-
- if (firstCall)
- {
- _clearAction = new ClearAction();
- _printTableAction = new SystemTablePrintAction(getTitle(), null);
- IMenuManager menuManager = actionBars.getMenuManager();
- addMenuItems(menuManager);
- _statusLine = actionBars.getStatusLineManager();
- }
- IToolBarManager toolBarManager = actionBars.getToolBarManager();
- addToolBarItems(toolBarManager);
- }
- }
-
- private void addToolBarItems(IToolBarManager toolBarManager)
- {
- toolBarManager.removeAll();
- if (_clearAction != null)
- {
- toolBarManager.add(_clearAction);
- }
- if (_shellActions != null && _shellActions.size() > 0)
- {
- for (int i =0; i < _shellActions.size(); i++)
- {
- Object shellAction = _shellActions.get(i);
- if (shellAction instanceof IContributionItem)
- {
- toolBarManager.add((IContributionItem)shellAction);
- }
- else if (shellAction instanceof IAction)
- {
- toolBarManager.add((IAction)shellAction);
- }
- }
- }
- toolBarManager.update(true);
- }
-
- private void addMenuItems(IMenuManager menuManager)
- {
- menuManager.removeAll();
-
- IMenuManager launchMenu = new CommandMenuManager();
-
- launchMenu.add(new SystemBaseDummyAction());
- launchMenu.addMenuListener(this);
- launchMenu.setRemoveAllWhenShown(true);
- menuManager.add(launchMenu);
- menuManager.addMenuListener(this);
-
- menuManager.add(new Separator());
- menuManager.add(_printTableAction);
- }
-
- public void menuAboutToShow(IMenuManager menuManager)
- {
- if (menuManager instanceof CommandSubmenuManager)
- {
- IRemoteCmdSubSystem[] cmdSubSystems = ((CommandSubmenuManager)menuManager).getSubSystems();
- for (int c = 0; c < cmdSubSystems.length; c++)
- {
- IRemoteCmdSubSystem cmdSubSystem = cmdSubSystems[c];
-
- if (cmdSubSystem != null && cmdSubSystem.canRunShell())
- {
- String name = cmdSubSystem.getName();
- ISystemViewElementAdapter ssva =
- (ISystemViewElementAdapter) ((IAdaptable) cmdSubSystem).getAdapter(
- ISystemViewElementAdapter.class);
- ImageDescriptor icon = ssva.getImageDescriptor(cmdSubSystem);
- ShellAction action =
- new ShellAction(
- name,
- icon,
- cmdSubSystem);
- menuManager.add(action);
- }
- }
- }
- else
- {
- boolean hasItem = false;
-
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- IHost[] connections = registry.getHosts();
-
- for (int i = 0; i < connections.length; i++)
- {
- IHost connection = connections[i];
- if (registry.isAnySubSystemConnected(connection) || connection.getSystemType().equals("Local")) //$NON-NLS-1$
- {
- IRemoteCmdSubSystem[] cmdSubSystems = RemoteCommandHelpers.getCmdSubSystems(connection);
- if (cmdSubSystems.length == 1)
- {
- IRemoteCmdSubSystem cmdSubSystem = cmdSubSystems[0];
- if (cmdSubSystem != null && cmdSubSystem.canRunShell())
- {
- hasItem = true;
-
- if (menuManager instanceof CommandMenuManager)
- {
- ISystemViewElementAdapter va =
- (ISystemViewElementAdapter) ((IAdaptable) connection).getAdapter(
- ISystemViewElementAdapter.class);
-
- String name = connection.getAliasName();
- ImageDescriptor icon = va.getImageDescriptor(connection);
-
-
- ShellAction action =
- new ShellAction(
- name,
- icon,
- cmdSubSystem);
- menuManager.add(action);
- }
- }
- }
- else if (cmdSubSystems.length > 1)
- {
- if (menuManager instanceof CommandMenuManager)
- {
- /*
- ISystemViewElementAdapter va =
- (ISystemViewElementAdapter) ((IAdaptable) connection).getAdapter(
- ISystemViewElementAdapter.class);
- */
-
- IMenuManager sublaunchMenu = new CommandSubmenuManager(connection, cmdSubSystems);
- sublaunchMenu.add(new SystemBaseDummyAction());
- sublaunchMenu.addMenuListener(this);
- sublaunchMenu.setRemoveAllWhenShown(true);
-
- menuManager.add(sublaunchMenu);
- menuManager.addMenuListener(this);
- }
-
-
- }
- }
- }
-
- if (!(menuManager instanceof CommandMenuManager))
- {
- if (!hasItem)
- {
- if (menuManager.getItems().length > 0)
- {
- MenuManager lmgr = (MenuManager) menuManager.getItems()[0];
- if (lmgr.getMenu() != null)
- {
- lmgr.getMenu().getParentItem().setEnabled(false);
- }
- }
- }
- else
- {
- if (menuManager.getItems().length > 0)
- {
- MenuManager lmgr = (MenuManager) menuManager.getItems()[0];
- if (lmgr.getMenu() != null)
- {
- lmgr.getMenu().getParentItem().setEnabled(true);
- }
- }
- }
- }
- }
- }
-
- public void selectionChanged(SelectionChangedEvent e)
- {
- }
-
- /**
- * Update or create a view tab for the specified command
- * If there is no tab for the command, create one.
- *
- * @param root command to view
- *
- */
- public void updateOutput(IRemoteCommandShell root)
- {
- updateOutput(root, true);
- }
-
- private void updateOutput(IRemoteCommandShell root, boolean createTab)
- {
- if (root != null)
- {
- _folder.updateOutput(root, createTab);
- if (createTab)
- updateActionStates();
- }
- }
-
- public void setInput(IAdaptable object)
- {
- setInput(object, true);
- }
-
- public void setInput(IAdaptable object, boolean updateHistory)
- {
- _folder.setInput(object);
- }
-
-
- protected void initDefaultCommandShells()
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- IHost[] connections = registry.getHosts();
- CommandsViewPage curpage = _folder.getCurrentTabItem();
-
- for (int i = 0; i < connections.length; i++)
- {
- IHost connection = connections[i];
- if (registry.isAnySubSystemConnected(connection) || connection.getSystemType().equals("Local")) //$NON-NLS-1$
- {
- IRemoteCmdSubSystem[] cmdSubSystems = RemoteCommandHelpers.getCmdSubSystems(connection);
- if (cmdSubSystems.length > 0)
- {
- for (int c= 0; c < cmdSubSystems.length; c++)
- {
- IRemoteCmdSubSystem cmdSubSystem = cmdSubSystems[c];
-
- if (cmdSubSystem != null && cmdSubSystem.canRunShell())
- {
- restoreCommandShells(cmdSubSystem);
- }
- }
- }
- }
- }
-
- if (curpage != null)
- {
- updateOutput((IRemoteCommandShell)curpage.getInput());
- //curpage.setFocus();
- }
-
- }
-
- protected void restoreCommandShells(IRemoteCmdSubSystem cmdSS)
- {
-
- try
- {
- IRemoteCommandShell[] cmds = cmdSS.getShells();
- if (cmds == null || cmds.length == 0)
- {
- cmds = cmdSS.restoreShellState(getShell());
- if (cmds!=null)
- {
- for (int i = 0; i < cmds.length; i++)
- {
- updateOutput(cmds[i]);
- }
- }
- }
- }
- catch (Exception e)
- {
- }
-
-
- }
-
-
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- if (event.getType() == ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_FINISHED)
- {
- Object source = event.getSource();
- if (source instanceof IRemoteCmdSubSystem)
- {
- Shell shell = RSEUIPlugin.getTheSystemRegistry().getShell();
- shell.getDisplay().asyncExec(new CommandSubSystemDisconnectedRunnable((IRemoteCmdSubSystem) source));
- }
- else if (source instanceof IRemoteCommandShell)
- {
- // find out if we're listening to this
-
- updateOutput((IRemoteCommandShell) source, false);
- updateActionStates();
- }
- }
-
- if (event.getType() == ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_REMOVED)
- {
- Object source = event.getSource();
- if (source instanceof IRemoteCommandShell)
- {
- updateOutput((IRemoteCommandShell) source, false);
- _folder.remove(source);
- updateActionStates();
- }
- }
- else if (event.getType() == ISystemResourceChangeEvents.EVENT_REFRESH)
- {
- Object parent = event.getParent();
- if (parent instanceof IRemoteCommandShell)
- {
- updateOutput((IRemoteCommandShell) parent, false);
- }
- }
- else if (event.getType() == ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE)
- {
- IRemoteCmdSubSystem cmdSS = null;
- Object parent = event.getSource();
-
- if (parent instanceof IRemoteFileSubSystem)
- {
- IRemoteFileSubSystem ss = (IRemoteFileSubSystem)parent;
- cmdSS = RemoteCommandHelpers.getCmdSubSystem(ss.getHost());
- }
- else if (parent instanceof IRemoteCmdSubSystem)
- {
- cmdSS = (IRemoteCmdSubSystem)parent;
- }
- else if (parent instanceof ISubSystem)
- {
- // DKM - for now assuming only 1 cmd subsystem
- //SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- //registry.getCmdSubSystems()
- cmdSS = RemoteCommandHelpers.getCmdSubSystem(((ISubSystem)parent).getHost());
- }
- if (cmdSS != null)
- {
- if (cmdSS.isConnected())
- restoreCommandShells(cmdSS);
- }
- }
- else if (event.getType() == ISystemResourceChangeEvents.EVENT_MUST_COLLAPSE)
- {
- Object source = event.getSource();
- if (source instanceof IRemoteCmdSubSystem)
- {
- Shell shell = RSEUIPlugin.getTheSystemRegistry().getShell();
- shell.getDisplay().asyncExec(new CommandSubSystemDisconnectedRunnable((IRemoteCmdSubSystem) source));
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- Widget source = e.widget;
-
- if (source == _folder.getFolder())
- {
- if (_folder.getInput() != null)
- {
- updateActionStates();
- }
- }
- }
-
-
-// -------------------------------
- // ISystemMessageLine interface...
- // -------------------------------
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- _errorMessage = null;
- sysErrorMessage = null;
- if (_statusLine != null)
- _statusLine.setErrorMessage(_errorMessage);
- }
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- _message = null;
- if (_statusLine != null)
- _statusLine.setMessage(_message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage()
- {
- return _errorMessage;
- }
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage()
- {
- return _message;
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- this._errorMessage = message;
- if (_statusLine != null)
- _statusLine.setErrorMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- return sysErrorMessage;
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- sysErrorMessage = message;
- setErrorMessage(message.getLevelOneText());
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(Throwable exc)
- {
- setErrorMessage(exc.getMessage());
- }
-
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- this._message = message;
- if (_statusLine != null)
- _statusLine.setMessage(message);
- }
- /**
- *If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- setMessage(message.getLevelOneText());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsViewProvider.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsViewProvider.java
deleted file mode 100644
index 5c05a035a..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsViewProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui.view;
-
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-
-public class SystemCommandsViewProvider extends SystemTableViewProvider
-{
- /**
- * Overridden to provide alternate text for special views of
- * model objects
- */
- public String getText(Object object)
- {
- String result = getAdapterFor(object).getAlternateText(object);
- int len = result.length();
- if (len > _maxCharsInColumnZero)
- {
- _maxCharsInColumnZero = len;
- }
- return result;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewOutputAdapterFactory.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewOutputAdapterFactory.java
deleted file mode 100644
index 369d732d8..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewOutputAdapterFactory.java
+++ /dev/null
@@ -1,84 +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.shells.ui.view;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.subsystems.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.view.ISystemDragDropAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.IActionFilter;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-/**
- * This factory maps requests for an adapter object from a given
- * element object. This is for the universal command subsystem.
- */
-public class SystemViewOutputAdapterFactory implements IAdapterFactory
-{
- private SystemViewRemoteOutputAdapter outputAdapter = new SystemViewRemoteOutputAdapter();
- private SystemViewRemoteErrorAdapter errorAdapter = new SystemViewRemoteErrorAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISystemViewElementAdapter.class, ISystemDragDropAdapter.class, ISystemRemoteElementAdapter.class, IPropertySource.class, IWorkbenchAdapter.class, IActionFilter.class};
- }
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, IRemoteError.class);
- manager.registerAdapters(this, IRemoteOutput.class);
- manager.registerAdapters(this, IRemoteCommandShell.class);
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof IRemoteError)
- adapter = errorAdapter;
- else if (adaptableObject instanceof IRemoteOutput)
- adapter = outputAdapter;
- else if (adaptableObject instanceof IRemoteCommandShell)
- adapter = outputAdapter;
-
- if ((adapter != null) && (adapterType == IPropertySource.class))
- {
- ((ISystemViewElementAdapter)adapter).setPropertySourceInput(adaptableObject);
- }
- else if (adapter == null)
- {
- SystemBasePlugin.logWarning("No adapter found for object of type: " + adaptableObject.getClass().getName()); //$NON-NLS-1$
- }
- return adapter;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteErrorAdapter.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteErrorAdapter.java
deleted file mode 100644
index de6ca9a3b..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteErrorAdapter.java
+++ /dev/null
@@ -1,120 +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.shells.ui.view;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteError;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Comment goes here
- */
-public class SystemViewRemoteErrorAdapter extends SystemViewRemoteOutputAdapter
-{
-
- protected IPropertyDescriptor[] _uniquePropertyDescriptorArray;
- /**
- * Used to add context menu actions for the given remote output
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- super.addActions(menu, selection, shell, menuGroup);
-
- }
-
- public IPropertyDescriptor[] getUniquePropertyDescriptors()
- {
- if (_uniquePropertyDescriptorArray == null)
- {
- int nbrOfProperties = 2;
-
- _uniquePropertyDescriptorArray = new PropertyDescriptor[nbrOfProperties];
- //PropertyDescriptor[] defaultProperties = (PropertyDescriptor[]) getDefaultDescriptors();
-
- int i = -1;
-
- // add our unique property descriptors...
- //RSEUIPlugin plugin = RSEUIPlugin.getDefault();
-
- // path
- _uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(P_ERROR_FILENAME, SystemViewResources.RESID_PROPERTY_ERROR_FILENAME_LABEL, SystemViewResources.RESID_PROPERTY_ERROR_FILENAME_TOOLTIP);
-
- // line
- _uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(P_ERROR_LINENO, SystemViewResources.RESID_PROPERTY_ERROR_LINENO_LABEL, SystemViewResources.RESID_PROPERTY_ERROR_LINENO_TOOLTIP);
- }
-
- return _uniquePropertyDescriptorArray;
-
- }
-
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (_propertyDescriptors == null)
- {
- // unique ones
- IPropertyDescriptor[] unique = getUniquePropertyDescriptors();
- // our additional
- _propertyDescriptors = new PropertyDescriptor[1+ unique.length];
- int idx = -1;
-
- // path
- _propertyDescriptors[++idx] = createSimplePropertyDescriptor(P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
- // append...
- for (int i = 0; i < unique.length; i++)
- {
- _propertyDescriptors[++idx] = unique[i];
- }
- }
- return _propertyDescriptors;
- }
-
- /**
- * Returns the current collection of property descriptors.
- * @return an array containing all descriptors.
- */
- protected Object internalGetPropertyValue(Object key)
- {
- String name = (String) key;
- if (propertySourceInput instanceof IRemoteError)
- {
- IRemoteError output = (IRemoteError) propertySourceInput;
-
- if (name.equals(P_FILE_PATH))
- {
- return output.getAbsolutePath();
- }
- else if (name.equals(P_ERROR_FILENAME))
- {
- return output.getAbsolutePath();
- }
- else if (name.equals(P_ERROR_LINENO))
- {
- return new Integer(output.getLine());
- }
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java
deleted file mode 100644
index c0e4b3fce..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java
+++ /dev/null
@@ -1,1217 +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.shells.ui.view;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.subsystems.IRemoteLineReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.files.ui.actions.SystemRemoteFileLineOpenWithMenu;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
-import org.eclipse.rse.shells.ui.ShellResources;
-import org.eclipse.rse.shells.ui.actions.SystemShowInShellViewAction;
-import org.eclipse.rse.shells.ui.actions.SystemTerminateRemoveShellAction;
-import org.eclipse.rse.shells.ui.actions.SystemTerminateShellAction;
-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.shells.core.model.ISystemOutputRemoteTypes;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystemConfiguration;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemDragDropAdapter;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-/**
- * This is the adapter for smart output from remote commands, such that they can support right click actions and such.
- */
-public class SystemViewRemoteOutputAdapter extends AbstractSystemViewAdapter
-implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemOutputRemoteTypes
-{
-
-
- protected IPropertyDescriptor[] _propertyDescriptors;
-
- private SystemCopyToClipboardAction _copyOutputAction = null;
- private SystemPasteFromClipboardAction _pasteToPromptAction = null;
-
- private SystemShowInShellViewAction _showInShellView = null;
- private SystemTerminateShellAction _terminateShellAction = null;
- private SystemTerminateRemoveShellAction _terminateRemoveShellAction = null;
- private IAction _exportShellHistoryAction = null;
- private IAction _exportShellOutputAction = null;
- private List _shellActions = null;
-
- private IPropertyDescriptor _shellPropertyDescriptors[];
- private IPropertyDescriptor _outputPropertyDescriptors[];
-
- public SystemViewRemoteOutputAdapter()
- {
- _shellActions = new ArrayList();
- }
-
- /**
- * Used to add context menu actions for the given remote output
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- Object firstSelection = selection.getFirstElement();
-
- if (firstSelection != null)
- {
- if (firstSelection instanceof IRemoteOutput)
- {
- if (_copyOutputAction == null)
- {
- _copyOutputAction = new SystemCopyToClipboardAction(shell, RSEUIPlugin.getTheSystemRegistry().getSystemClipboard());
- }
-
- menu.add(menuGroup, _copyOutputAction);
-
- if (selection.size() == 1)
- {
- if (firstSelection instanceof IRemoteLineReference)
- {
- IRemoteOutput result = (IRemoteOutput) firstSelection;
- String type = result.getType();
- if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT))
- {
- if (_pasteToPromptAction == null)
- {
- _pasteToPromptAction = new SystemPasteFromClipboardAction(shell, RSEUIPlugin.getTheSystemRegistry().getSystemClipboard());
- }
-
- menu.add(menuGroup, _pasteToPromptAction);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY))
- {
- IRemoteOutput output = (IRemoteOutput)firstSelection;
- if (output.getAbsolutePath() != null)
- {
- // TODO
- // add directory actions here
- }
- }
- else
- {
- IRemoteOutput output = (IRemoteOutput)firstSelection;
- if (output.getAbsolutePath() != null)
- {
- //SystemCreateEditLineActions createActions = new SystemCreateEditLineActions();
- //createActions.create(menu, selection, shell, menuGroup);
- // open with ->
- MenuManager submenu =
- new MenuManager(org.eclipse.ui.internal.views.navigator.ResourceNavigatorMessages.ResourceNavigator_openWith,
- ISystemContextMenuConstants.GROUP_OPENWITH);
-
- SystemRemoteFileLineOpenWithMenu openWithMenu = new SystemRemoteFileLineOpenWithMenu();
- openWithMenu.updateSelection(selection);
- submenu.add(openWithMenu);
- menu.getMenuManager().appendToGroup(ISystemContextMenuConstants.GROUP_OPENWITH, submenu);
-
- }
- }
- }
-
-
-
- }
- }
- else if (firstSelection instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell)firstSelection;
- if (_showInShellView == null)
- {
- _showInShellView = new SystemShowInShellViewAction(shell);
-
- }
- menu.add(ISystemContextMenuConstants.GROUP_OPEN,_showInShellView);
-
- getShellActions(cmdShell.getCommandSubSystem().getParentRemoteCmdSubSystemConfiguration());
-
- menu.add(ISystemContextMenuConstants.GROUP_CHANGE, _terminateShellAction);
- menu.add(ISystemContextMenuConstants.GROUP_CHANGE, _terminateRemoveShellAction);
- menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, _exportShellOutputAction);
- menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, _exportShellHistoryAction);
- }
- }
- else
- {
- return;
- }
- }
-
- public List getShellActions(IRemoteCmdSubSystemConfiguration factory)
- {
- getShell();
- _shellActions.clear();
- if (_shellActions.size()== 0)
- {
- if (_terminateShellAction == null)
- {
- _terminateShellAction = new SystemTerminateShellAction(shell);
- }
- _shellActions.add(_terminateShellAction);
- if (_terminateRemoveShellAction == null)
- {
- _terminateRemoveShellAction = new SystemTerminateRemoveShellAction(shell);
- }
- _shellActions.add(_terminateRemoveShellAction);
-
- _shellActions.add(new Separator());
-
- ShellServiceSubSystemConfigurationAdapter factoryAdapter = (ShellServiceSubSystemConfigurationAdapter)factory.getAdapter(ISubSystemConfigurationAdapter.class);
-
- _exportShellOutputAction = factoryAdapter.getCommandShellOutputExportAction(shell);
- _shellActions.add(_exportShellOutputAction);
- _exportShellHistoryAction = factoryAdapter.getCommandShellHistoryExportAction(shell);
- _shellActions.add(_exportShellHistoryAction);
-
- }
- return _shellActions;
- }
-
- /**
- * Returns the parent command object for a line of output
- */
- public Object getParent(Object element)
- {
- if (element instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput) element;
- return output.getParent();
- }
- return null;
- }
-
- /**
- * Returns the text to display in a view for this element.
- */
- public String getText(Object element)
- {
- if (element instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput) element;
- String text = output.getText();
-
- if (text.indexOf('\t') > 0)
- {
- text = translateTabs(text);
- }
-
- int tagIndex = text.indexOf("BEGIN-END-TAG"); //$NON-NLS-1$
- if (tagIndex == 0)
- {
- return ""; //$NON-NLS-1$
- }
- else if (tagIndex > 0)
- {
- //return text.substring(0, tagIndex - 6);
- return text.substring(0, tagIndex);
- }
-
- return text;
- }
- else if (element instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell outputRoot = (IRemoteCommandShell) element;
- return outputRoot.getId();
- }
- return null;
- }
-
-
- protected String translateTabs(String tabbedString)
- {
- int columnWidth = 8;
-
- int currentOffset = 0;
- StringBuffer untabbedBuf = new StringBuffer();
- for (int i = 0; i < tabbedString.length();i++)
- {
- char c = tabbedString.charAt(i);
-
- if (c == '\t')
- {
- untabbedBuf.append(' ');
- currentOffset++;
- while ((currentOffset % columnWidth) >0)
- {
- untabbedBuf.append(' ');
- currentOffset++;
- }
- }
- else if (c == ' ')
- {
- untabbedBuf.append(' ');
- currentOffset++;
- }
- else
- {
- untabbedBuf.append(c);
- currentOffset++;
- }
- }
-
- return untabbedBuf.toString();
- }
- /**
- * Returns the type attribute of a line of output or command.
- */
- public String getType(Object element)
- {
- if (element instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput) element;
- return output.getType();
- }
- else if (element instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell root = (IRemoteCommandShell) element;
- return root.getType();
- }
- return null;
- }
-
- /**
- * Returns the children of a remote command if the element is a remote command
- */
- public Object[] getChildren(Object element)
- {
-
- if (element instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell output = (IRemoteCommandShell) element;
- return output.listOutput();
- }
-
- return null;
- }
-
- /**
- * Returns true if the element is a remote command and false if it is a remote output.
- */
- public boolean hasChildren(Object element)
- {
- if (element instanceof IRemoteCommandShell)
- {
- if (!(getViewer() instanceof SystemView))
- {
- return true;
- }
- return false;
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Returns the associated IRemoteFile for this line of remote output if one exists
- * @param output the line of remote output
- * @return the associated remote file
- */
- public static IRemoteFile outputToFile(IRemoteOutput output)
- {
- IRemoteFile file = null;
- Object parent = output.getParent();
- IRemoteFileSubSystem fs = null;
- if (parent instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell root = (IRemoteCommandShell) output.getParent();
- fs = RemoteFileUtility.getFileSubSystem(root.getCommandSubSystem().getHost());
- }
- else if (parent instanceof IRemoteFile)
- {
- return (IRemoteFile) parent;
- }
-
- if (fs != null)
- {
- String path = output.getAbsolutePath();
- if (path != null && path.length() > 0)
- {
- Object obj = null;
- try
- {
- obj = fs.getObjectWithAbsoluteName(path);
- }
- catch (Exception e)
- {
- return null;
- }
- if (obj != null && obj instanceof IRemoteFile)
- {
- file = (IRemoteFile) obj;
-
- return file;
- }
- }
- }
-
- return file;
- }
-
-
-
- protected IEditorRegistry getEditorRegistry()
- {
- return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry();
- }
-
- protected IEditorDescriptor getDefaultTextEditor()
- {
- IEditorRegistry registry = getEditorRegistry();
- return registry.findEditor("org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
- }
-
- /**
- * Open workspace file associated with IRemoteCommandShell. If there is no associated project
- * return.
- * @param remoteFile
- * @param output
- * @return
- */
- // DKM - this is should no longer used. Used to be for opening corresponding workspace IFile from remote error
- // but remote error as is will not be the project integration point for this.
-// protected boolean openWorkspaceFile(IRemoteFile remoteFile, IRemoteOutput output)
-// {
-// IRemoteCommandShell cmd = (IRemoteCommandShell)(output.getParent());
-// IProject associatedProject = cmd.getAssociatedProject();
-// if (associatedProject != null)
-// {
-// ProjectSourceContainer container = new ProjectSourceContainer(associatedProject, false);
-// ISourceLookupDirector director = new RemoteSourceLookupDirector();
-// container.init(director);
-// try
-// {
-// Object[] matches = container.findSourceElements(remoteFile.getName());
-// for (int i = 0; i < matches.length; i++)
-// {
-// //System.out.println("match="+matches[i]);
-// }
-//
-// if (matches.length == 1)
-// {
-// IFile localMatch = (IFile)matches[0];
-//
-//
-//
-// IWorkbenchPage activePage = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
-//
-// FileEditorInput finput = new FileEditorInput(localMatch);
-//
-//
-// IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(remoteFile.getName());
-// if (desc == null)
-// {
-// desc = getDefaultTextEditor();
-// }
-// String editorid = desc.getId();
-// IEditorPart editor = activePage.openEditor(finput, editorid);
-//
-// int line = output.getLine();
-// int charStart = output.getCharStart();
-// int charEnd = output.getCharEnd();
-//
-// try
-// {
-// IMarker marker = null;
-//
-// // DKM - should we? this will populate the Problems view..but resources are actually remote
-// if (output instanceof IRemoteError)
-// {
-// IRemoteError error = (IRemoteError)output;
-// String type = error.getType();
-//
-// marker = localMatch.createMarker(IMarker.TEXT);
-//
-// if (type.equals(ISystemOutputRemoteTypes.TYPE_ERROR))
-// {
-// marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
-// }
-// else if (type.equals(ISystemOutputRemoteTypes.TYPE_WARNING))
-// {
-// marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);
-// }
-// else if (type.equals(ISystemOutputRemoteTypes.TYPE_INFORMATIONAL))
-// {
-// marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
-// }
-//
-// marker.setAttribute(IMarker.MESSAGE, output.getText());
-// marker.setAttribute(IMarker.LINE_NUMBER, line);
-// marker.setAttribute(IMarker.CHAR_START, charStart);
-// marker.setAttribute(IMarker.CHAR_END, charEnd);
-//
-// }
-// else
-// {
-// marker = localMatch.createMarker(IMarker.TEXT);
-// marker.setAttribute(IMarker.LINE_NUMBER, line);
-// marker.setAttribute(IMarker.CHAR_START, charStart);
-// marker.setAttribute(IMarker.CHAR_END, charEnd);
-// }
-// IDE.gotoMarker(editor, marker);
-//
-//
-// }
-// catch (CoreException e)
-// {
-// e.printStackTrace();
-// }
-// return true;
-// }
-// }
-// catch(Exception e)
-// {
-// e.printStackTrace();
-// }
-// }
-//
-// return false;
-// }
-
- /**
- * Opens the appropriate editor for a remote output object
- */
- public boolean handleDoubleClick(Object element)
- {
- boolean result = false;
- if (element instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput) element;
-
- IRemoteFile file = outputToFile(output);
- if (file != null && file.isFile())
- {
- // no longer doing opening of workspace files here
- //if (!openWorkspaceFile(file, output))
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) file).getAdapter(ISystemViewElementAdapter.class);
- result = adapter.handleDoubleClick(file);
- int line = output.getLine();
-
- if (result)
- {
- DelayedGotoLine dgoto = new DelayedGotoLine(file, line, output.getCharStart(), output.getCharEnd());
- Display.getDefault().asyncExec(dgoto);
- /*
- //if (line > 0)
- {
- SystemRemoteFileLineOpenWithMenu.handleGotoLine(file, line, output.getCharStart(), output.getCharEnd());
- }
- */
- return true;
- }
- }
- }
- }
- else if (element instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmdshell = (IRemoteCommandShell) element;
- if (cmdshell.getType().equals(ShellResources.RESID_SHELLS_COMMAND_SHELL_LABEL))
- {
- SystemCommandsViewPart viewPart = SystemCommandsUI.getInstance().activateCommandsView();
- viewPart.updateOutput(cmdshell);
- result = true;
- }
- }
- return result;
- }
-
- public class DelayedGotoLine implements Runnable
- {
- private IRemoteFile _file;
- private int _line;
- private int _charStart;
- private int _charEnd;
-
- public DelayedGotoLine(IRemoteFile file, int line, int charStart, int charEnd)
- {
- _file = file;
- _line = line;
- _charStart = charStart;
- _charEnd = charEnd;
- }
-
- public void run()
- {
- if (checkEditorOpen())
- {
- SystemRemoteFileLineOpenWithMenu.handleGotoLine(_file, _line, _charStart, _charEnd);
- }
- else
- {
- Display.getDefault().asyncExec(this);
- }
- }
-
- private boolean checkEditorOpen()
- {
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchPage persp = desktop.getActiveWorkbenchWindow().getActivePage();
- String fileName = _file.getAbsolutePath();
- IEditorReference[] editors = persp.getEditorReferences();
- for (int i = 0; i < editors.length; i++)
- {
- IEditorReference ref = editors[i];
- IEditorPart editorp = ref.getEditor(false);
- if (editorp != null)
- {
- IEditorInput einput = editorp.getEditorInput();
- if (einput instanceof IFileEditorInput)
- {
- IFileEditorInput input = (IFileEditorInput) einput;
- IFile efile = input.getFile();
-
- SystemIFileProperties properties = new SystemIFileProperties(efile);
- String comparePath = properties.getRemoteFilePath();
-
- if (comparePath != null && (comparePath.replace('\\','/').equals(fileName.replace('\\','/'))))
- {
- return true;
- }
- }
- }
- }
- return false;
- }
- }
-
-
- /**
- * Returns the associated subsystem for this line of remote output or remote command
- */
- public ISubSystem getSubSystem(Object element)
- {
- if (element instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmd = (IRemoteCommandShell) element;
- return cmd.getCommandSubSystem();
- }
- else if (element instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput) element;
- Object parent = output.getParent();
- if (parent instanceof IRemoteCommandShell)
- {
- return getSubSystem(parent);
- }
- }
-
- return null;
- }
-
- /**
- * Return the fully qualified name of this remote object.
- */
- public String getAbsoluteName(Object element)
- {
- if (element instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmd = (IRemoteCommandShell) element;
- return cmd.getId();
- }
- else if (element instanceof IRemoteOutput)
- {
- IRemoteOutput out = (IRemoteOutput) element;
- String str = getAbsoluteParentName(element);
- return str + ":" + out.getIndex(); //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem
- */
- public String getAbsoluteParentName(Object element)
- {
- return getAbsoluteName(getParent(element));
- }
-
- /**
- * Return the subsystem factory id that owns this remote object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getSubSystemConfigurationId(Object element)
- {
- return null;
- }
-
- /**
- * Return a value for the type category property for this object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteTypeCategory(Object element)
- {
- return null;
- }
-
- /**
- * Return a value for the type property for this object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteType(Object element)
- {
- if (element instanceof IRemoteOutput)
- {
- return ((IRemoteOutput) element).getType();
- }
- else if (element instanceof IRemoteCommandShell)
- {
- return ((IRemoteCommandShell) element).getType();
- }
- return null;
- }
-
- /**
- * Return a value for the subtype property for this object.
- * Not all object types support a subtype, so returning null is ok.
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteSubType(Object element)
- {
- return null;
- }
-
- /**
- * Return a value for the sub-subtype property for this object.
- * Not all object types support a sub-subtype, so returning null is ok.
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteSubSubType(Object element)
- {
- return null;
- }
- /**
- * Return the source type of the selected object. Typically, this only makes sense for compilable
- * source members. For non-compilable remote objects, this typically just returns null.
- */
- public String getRemoteSourceType(Object element)
- {
- return null;
- }
-
- /**
- * Some view has updated the name or properties of this remote object. As a result, the
- * remote object's contents need to be refreshed. You are given the old remote object that has
- * old data, and you are given the new remote object that has the new data. For example, on a
- * rename the old object still has the old name attribute while the new object has the new
- * new attribute.
- * <p>
- * This is called by viewers like SystemView in response to rename and property change events.
- * <p>
- * @param oldElement the element that was found in the tree
- * @param newElement the updated element that was passed in the REFRESH_REMOTE event
- * @return true if you want the viewer that called this to refresh the children of this object,
- * such as is needed on a rename of a folder, say.
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- return false;
- }
-
- /**
- * Given a remote object, returns it remote parent object. Eg, given a file, return the folder
- * it is contained in.
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- if (element instanceof IRemoteOutput)
- {
- return ((IRemoteOutput) element).getParent();
- }
- return null;
- }
-
- /**
- * Given a remote object, return the unqualified names of the objects contained in that parent. This is
- * used for testing for uniqueness on a rename operation, for example. Sometimes, it is not
- * enough to just enumerate all the objects in the parent for this purpose, because duplicate
- * names are allowed if the types are different, such as on iSeries. In this case return only
- * the names which should be used to do name-uniqueness validation on a rename operation.
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
- {
- return null;
- }
-
-
- /**
- * Returns the current collection of property descriptors.
- * By default returns descriptors for name and type only.
- * Override if desired.
- * @return an array containing all descriptors.
- */
- protected Object internalGetPropertyValue(Object key)
- {
- return getPropertyValue(key, true);
- }
-
- /**
- * Returns the icon to display for this object
- * @param element the remote output object
- * @return the associated image descriptor
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- if (element instanceof IRemoteOutput)
- {
- ImageDescriptor imageDescriptor = null;
- IRemoteOutput output = (IRemoteOutput) element;
- String type = output.getType();
- if (type.equals(TYPE_ERROR))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_ERROR_ID);
- }
- else if (type.equals(TYPE_WARNING))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_WARNING_ID);
- }
- else if (type.equals(TYPE_INFORMATIONAL))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_INFO_ID);
- }
- else if (type.equals(TYPE_DIRECTORY))
- {
- imageDescriptor = //PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID);
- }
- else if (type.equals(TYPE_FILE))
- {
- imageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
- //RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILE_ID);
- }
- else if (type.equals(TYPE_GREP))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID);
- }
- else if (type.equals(TYPE_COMMAND))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHELL_ID);
- }
- else if (type.equals(TYPE_PROMPT))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHELL_ID);
- }
- else if (type.equals(TYPE_PROCESS))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROCESS_ID);
- }
- else if (type.equals(TYPE_ENVVAR))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_ENVVAR_ID);
- }
- else if (type.equals(TYPE_ENVVAR_LIBPATH))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_ENVVAR_LIBPATH_ID);
- }
- else if (type.equals(TYPE_ENVVAR_PATH))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_ENVVAR_PATH_ID);
- }
- else
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_BLANK_ID);
- }
-
- return imageDescriptor;
- }
-
- else if (element instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell command = (IRemoteCommandShell) element;
- IRemoteCmdSubSystemConfiguration factory = command.getCommandSubSystem().getParentRemoteCmdSubSystemConfiguration();
- ShellServiceSubSystemConfigurationAdapter factoryAdapter = (ShellServiceSubSystemConfigurationAdapter)factory.getAdapter(ISubSystemConfigurationAdapter.class);
- ImageDescriptor imageDescriptor = null;
- if (command.isActive())
- {
- imageDescriptor = factoryAdapter.getActiveCommandShellImageDescriptor();
- }
- else
- {
- imageDescriptor = factoryAdapter.getInactiveCommandShellImageDescriptor();
- }
- return imageDescriptor;
- }
-
- else
- { // return some default
- ImageDescriptor imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_BLANK_ID);
- return imageDescriptor;
- }
- }
-
- /**
- * Return true if we should show the delete action in the popup for the given element.
- * If true, then canDelete will be called to decide whether to enable delete or not.
- */
- public boolean showDelete(Object element)
- {
- return false;
- }
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- * By default, returns false. Override if your object is deletable.
- */
- public boolean canDelete(Object element)
- {
- return false;
- }
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON REFRESH ACTION...
- // ------------------------------------------
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showRefresh(Object element)
- {
- return false;
- }
-
- // ------------------------------------------------------------
- // METHODS TO SUPPORT COMMON OPEN-IN-NEW-PERSPECTIVE ACTIONS...
- // ------------------------------------------------------------
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showOpenViewActions(Object element)
- {
- return false;
- }
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON RENAME ACTION...
- // ------------------------------------------
-
- /**
- * Return true if we should show the rename action in the popup for the given element.
- * If true, then canRename will be called to decide whether to enable rename or not.
- */
- public boolean showRename(Object element)
- {
- return false;
- }
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename popup menu item will be enabled.
- * By default, returns false. Override if your object is renamable.
- */
- public boolean canRename(Object element)
- {
- return false;
- }
-
- /**
- * Perform the rename action. By default does nothing. Override if your object is renamable.
- * Return true if this was successful. Return false if it failed and you issued a msg.
- * Throw an exception if it failed and you want to use the generic msg.
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception
- {
- return false;
- }
-
- // Drag and drop
-
- /**
- * Indicates whether the specified object can have another object copied to it
- * @param element the object to copy to
- * @return whether this object can be copied to or not
- */
- public boolean canDrop(Object element)
- {
- /*DKM -for now disabling - the function doesn't
- * make sense for other types of prompts like
- * RAD4z
- if (element instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput) element;
- if (output.getType().equals(TYPE_PROMPT))
- {
- return true;
- }
- }
- */
-
- return false;
- }
-
- /**
- * Indicates whether the specified object can be copied
- * @param element the object to copy
- */
- public boolean canDrag(Object element)
- {
- if (element instanceof IRemoteOutput)
- {
- return true;
- }
- else if (element instanceof IRemoteCommandShell)
- {
- return true;
- }
-
- return false;
- }
-
- /**
- * Copy the specified remote output object. This method returns a string representing
- * the text of the remote output;
- *
- * @param element the output to copy
- * @param sameSystemType not applicable for remote output
- * @param monitor the progress monitor
- */
- public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
- {
- if (element instanceof List)
- {
- List resultSet = new ArrayList();
- List set = (List)element;
- for (int i = 0; i < set.size(); i++)
- {
- resultSet.add(getText(set.get(i)));
- }
- return resultSet;
- }
- else
- {
- return getText(element);
- }
- }
-
- /**
- * Return true if it is valid for the src object to be dropped in the target
- * @param src the object to drop
- * @param target the object which src is dropped in
- * @param sameSystem whether this is the same system
- * @return whether this is a valid operation
- */
- public boolean validateDrop(Object src, Object target, boolean sameSystem)
- {
- if (target instanceof IRemoteOutput)
- {
- IRemoteOutput targetOutput = (IRemoteOutput) target;
- if (targetOutput.getType().equals(TYPE_PROMPT))
- {
- if (src instanceof IRemoteFile)
- {
- return true;
- }
- else if (src instanceof IResource)
- {
- return true;
- }
- else if (src instanceof String)
- {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Perform a copy via drag and drop.
- * @param src the object to be copied. If the target and source are not on the same system, then this is a
- * temporary object produced by the doDrag.
- * @param target the object to be copied to.
- * @param sameSystemType an indication whether the target and source reside on the same type of system
- * @param sameSystem an indication whether the target and source reside on the same system
- * @param srcType the type of source
- * @param monitor the progress monitor
- * @return an indication whether the operation was successful or not.
- */
- public Object doDrop(Object src, Object target, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
- {
- IRemoteFile folder = outputToFile((IRemoteOutput) target);
- if (folder != null)
- {
- ISystemDragDropAdapter adapter = (ISystemDragDropAdapter) ((IAdaptable) folder).getAdapter(ISystemDragDropAdapter.class);
- return adapter.doDrop(src, folder, sameSystemType, sameSystem, srcType, monitor);
- }
- return null;
- }
-
- /**
- * Determines whether the line of remote output can be edited in an editor
- * @param element the remote output object
- * @return true if this can be edited in an editor
- */
- public boolean canEdit(Object element)
- {
- if (element instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput) element;
- IRemoteFile file = outputToFile(output);
- if (file != null && file.isFile())
- {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns the associated remote editable object for this line of output
- * @param element the remote output object
- * @return the associated ediable object if one exists
- */
- public ISystemEditableRemoteObject getEditableRemoteObject(Object element)
- {
- if (element instanceof IRemoteOutput)
- {
- IRemoteOutput output = (IRemoteOutput) element;
- IRemoteFile file = outputToFile(output);
- if (file != null && file.isFile())
- {
- return new SystemEditableRemoteFile(file);
- }
- }
- return null;
- }
-
- /**
- * Return a filter string that corresponds to this object.
- * @param object the object to obtain a filter string for
- * @return the corresponding filter string if applicable
- */
- public String getFilterStringFor(Object object)
- {
- return null;
- }
-
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- return getUniquePropertyDescriptors();
- }
-
- public IPropertyDescriptor[] getUniquePropertyDescriptors()
- {
- if (propertySourceInput instanceof IRemoteCommandShell)
- {
- if (_shellPropertyDescriptors == null)
- {
- _shellPropertyDescriptors = new IPropertyDescriptor[2];
-
- _shellPropertyDescriptors[0] = createSimplePropertyDescriptor(P_SHELL_STATUS, SystemViewResources.RESID_PROPERTY_SHELL_STATUS_LABEL, SystemViewResources.RESID_PROPERTY_SHELL_STATUS_TOOLTIP);
- _shellPropertyDescriptors[1] = createSimplePropertyDescriptor(P_SHELL_CONTEXT, SystemViewResources.RESID_PROPERTY_SHELL_CONTEXT_LABEL, SystemViewResources.RESID_PROPERTY_SHELL_CONTEXT_TOOLTIP);
- }
- return _shellPropertyDescriptors;
- }
- else
- {
- if (_outputPropertyDescriptors == null)
- {
- _outputPropertyDescriptors = new IPropertyDescriptor[0];
- }
- return _outputPropertyDescriptors;
- }
- }
-
- /**
- * Returns the current value for the named property.
- *
- * @param property the name or key of the property as named by its property descriptor
- * @param formatted indication of whether to return the value in formatted or raw form
- * @return the current value of the given property
- */
- public Object getPropertyValue(Object property, boolean formatted)
- {
- String name = (String) property;
- if (propertySourceInput instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell) propertySourceInput;
- if (name.equals(ISystemPropertyConstants.P_SHELL_STATUS))
- {
- if (cmdShell.isActive())
- {
- return SystemViewResources.RESID_PROPERTY_SHELL_STATUS_ACTIVE_VALUE;
- }
- else
- {
- return SystemViewResources.RESID_PROPERTY_SHELL_STATUS_INACTIVE_VALUE;
- }
- }
- else if (name.equals(ISystemPropertyConstants.P_SHELL_CONTEXT))
- {
- Object context = cmdShell.getContext();
- if (context instanceof IRemoteFile)
- {
- IRemoteFile cwd = (IRemoteFile)context;
- return cwd.getAbsolutePath();
- }
- else
- {
- return context;
- }
- }
- }
- return ""; //$NON-NLS-1$
- }
-
-
- /**
- * Returns <code>false</code>.
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/TabFolderLayout.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/TabFolderLayout.java
deleted file mode 100644
index 65835a85f..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/TabFolderLayout.java
+++ /dev/null
@@ -1,61 +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.shells.ui.view;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Layout;
-
-public class TabFolderLayout extends Layout {
-
-
-
- protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {
- if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
- return new Point(wHint, hHint);
-
- Control [] children = composite.getChildren ();
- int count = children.length;
- int maxWidth = 0, maxHeight = 0;
- for (int i=0; i<count; i++) {
- Control child = children [i];
- Point pt = child.computeSize (SWT.DEFAULT, SWT.DEFAULT, flushCache);
- maxWidth = Math.max (maxWidth, pt.x);
- maxHeight = Math.max (maxHeight, pt.y);
- }
-
- if (wHint != SWT.DEFAULT)
- maxWidth= wHint;
- if (hHint != SWT.DEFAULT)
- maxHeight= hHint;
-
- return new Point(maxWidth, maxHeight);
-
- }
-
- protected void layout (Composite composite, boolean flushCache) {
- Rectangle rect= composite.getClientArea();
-
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- children[i].setBounds(rect);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/.classpath b/rse/plugins/org.eclipse.rse.subsystems.files.core/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.files.core/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/.project b/rse/plugins/org.eclipse.rse.subsystems.files.core/.project
deleted file mode 100644
index 4629439da..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.files.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.files.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 1ab9d557c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.files.core
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.files.core.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.core.resources,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.subsystems.files.core,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.subsystems.files.core.model,
- org.eclipse.rse.subsystems.files.core.servicesubsystem,
- org.eclipse.rse.subsystems.files.core.subsystems,
- org.eclipse.rse.subsystems.files.core.util
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/about.html b/rse/plugins/org.eclipse.rse.subsystems.files.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/build.properties b/rse/plugins/org.eclipse.rse.subsystems.files.core/build.properties
deleted file mode 100644
index 686ff4c33..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.properties
deleted file mode 100644
index 43b95a397..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE Files Core
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractJavaLanguageUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractJavaLanguageUtility.java
deleted file mode 100644
index 179089670..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractJavaLanguageUtility.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-/**
- * This class is a Java language utility.
- */
-public abstract class AbstractJavaLanguageUtility extends AbstractLanguageUtility implements IJavaLanguageUtility {
-
- /**
- * Constructor.
- * @param subsystem the subsystem with which the utility is associated.
- * @param language the language.
- */
- public AbstractJavaLanguageUtility(IRemoteFileSubSystem subsystem, String language) {
- super(subsystem, language);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtility.java
deleted file mode 100644
index d97b14f40..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtility.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-/**
- * Abstract class for language utility. Language utilities are expected to subclass
- * it.
- */
-public abstract class AbstractLanguageUtility implements ILanguageUtility {
-
- protected IRemoteFileSubSystem subsystem;
- protected String language;
-
- /**
- * Constructor.
- * @param subsystem the subsystem with which the utility is associated.
- * @param language the language.
- */
- protected AbstractLanguageUtility(IRemoteFileSubSystem subsystem, String language) {
- super();
- setSubSystem(subsystem);
- setLanguage(language);
- }
-
- /**
- * Sets the subsystem with which the utility is associated.
- * @param the subsystem.
- */
- private void setSubSystem(IRemoteFileSubSystem subsystem) {
- this.subsystem = subsystem;
- }
-
- /**
- * Sets the language to which this utility applies. It could be one of
- * <code>LANGUAGE_JAVA</code>, <code>LANGUAGE_C</code>, and <code>LANGUAGE_CPP</code>, or
- * another language.
- * @return the language.
- */
- private void setLanguage(String language) {
- this.language = language;
- }
-
- /**
- * @see org.eclipse.rse.internal.subsystems.files.core.ILanguageUtility#getSubSystem()
- */
- public IRemoteFileSubSystem getSubSystem() {
- return subsystem;
- }
-
- /**
- * @see org.eclipse.rse.internal.subsystems.files.core.ILanguageUtility#getLanguage()
- */
- public String getLanguage() {
- return language;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtilityFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtilityFactory.java
deleted file mode 100644
index 8d015ce9c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtilityFactory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-/**
- * A language utility factory associated with a subsystem.
- */
-public abstract class AbstractLanguageUtilityFactory implements ILanguageUtilityFactory {
-
- protected IRemoteFileSubSystem subsystem;
-
- /**
- * Constructor.
- * @param subsystem the subsystem with which this factory is associated.
- */
- protected AbstractLanguageUtilityFactory(IRemoteFileSubSystem subsystem) {
- super();
- setSubSystem(subsystem);
- }
-
- /**
- * Sets the subsystem with which the factory is associated.
- * @param subsystem the subsystem.
- */
- private void setSubSystem(IRemoteFileSubSystem subsystem) {
- this.subsystem = subsystem;
- }
-
- /**
- * @see org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory#getSubSystem()
- */
- public IRemoteFileSubSystem getSubSystem() {
- return subsystem;
- }
-
- /**
- * For Java, subclasses should return an instance of <code>IJavaLanguageUtility</code>
- * @see org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory#getUtility(java.lang.String)
- *
- * @see IJavaLanguageUtility
- */
- public abstract ILanguageUtility getUtility(String language);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/IJavaLanguageUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/IJavaLanguageUtility.java
deleted file mode 100644
index ce75bd02c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/IJavaLanguageUtility.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-/**
- * Interface for Java language utility.
- */
-public interface IJavaLanguageUtility extends ILanguageUtility {
-
- /**
- * Returns the qualified class name for the remote file.
- * @param remoteFile the remote file.
- * @return the qualified class name.
- */
- public String getQualifiedClassName(IRemoteFile remoteFile);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ILanguageUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ILanguageUtility.java
deleted file mode 100644
index 90c72db4c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ILanguageUtility.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-/**
- * Interface for a language utility. Each programming language should have its own utility,
- * for example Java, C/C++, etc.
- */
-public interface ILanguageUtility {
-
- /**
- * Constant for Java language.
- */
- public static final String LANGUAGE_JAVA = "Java";
-
- /**
- * Constant for C language.
- */
- public static final String LANGUAGE_C = "C";
-
- /**
- * Constant for C++ language.
- */
- public static final String LANGUAGE_CPP = "C++";
-
- /**
- * Returns the subsystem with which the utility is associated.
- * @return the subsystem.
- */
- public IRemoteFileSubSystem getSubSystem();
-
- /**
- * Returns the language to which this utility applies. It could be one of
- * <code>LANGUAGE_JAVA</code>, <code>LANGUAGE_C</code>, and <code>LANGUAGE_CPP</code>, or
- * another language.
- * @return the language.
- */
- public String getLanguage();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ILanguageUtilityFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ILanguageUtilityFactory.java
deleted file mode 100644
index 92d628387..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ILanguageUtilityFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-/**
- * A factory for creating language specific utility.
- */
-public interface ILanguageUtilityFactory {
-
- /**
- * Returns the subsystem with which the factory is associated.
- * @return the subsystem.
- */
- public IRemoteFileSubSystem getSubSystem();
-
- /**
- * Returns the language utility for the given language identifier.
- * Identifiers for popular languages are available in <code>ILanguageUtility</code>.
- * For Java, the identifier is <code>LANGUAGE_JAVA</code>.
- * For C, the identifier is <code>LANGUAGE_C</code>.
- * For C++, the identifier is <code>LANGUAGE_CPP</code>.
- * @param language the language identifier.
- * @return the language utility.
- *
- * @see ILanguageUtility
- */
- public ILanguageUtility getUtility(String language);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java
deleted file mode 100644
index c99030c1f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileAPIProvider;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-
-
-/**
- * Where to start when looking to traverse a remote file system.
- */
-public class SystemFileAPIProviderImpl
- extends SystemAbstractAPIProvider
- implements ISystemFileAPIProvider
-{
-
-
- protected SystemRegistry sr = null;
- protected boolean directoryMode = false;
- //protected Object[] emptyList = new Object[0];
-
- /**
- * Constructor for SystemFileAPIProvider
- * @param directoryMode true if you only want to traverse directories, false for both files and directories.
- */
- public SystemFileAPIProviderImpl(boolean directoryMode)
- {
- super();
- this.directoryMode = directoryMode;
- sr = RSEUIPlugin.getTheSystemRegistry();
- }
-
- /**
- * Get the directories-only mode.
- */
- public boolean isDirectoriesOnly()
- {
- return directoryMode;
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * We return all connections containing a remote file subsystem, for all active profiles.
- */
- public Object[] getSystemViewRoots()
- {
-
- return getConnections();
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return true if there are any connections containing a remote file subsystem, for any active profile.
- */
- public boolean hasSystemViewRoots()
- {
- return (getConnectionCount()>0);
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return sr.getConnectionChildren(selectedConnection);
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return sr.hasConnectionChildren(selectedConnection);
- }
-
- /**
- * Return true to show the action bar (ie, toolbar) above the viewer.
- * The action bar contains connection actions, predominantly.
- */
- public boolean showActionBar()
- {
- return true;
- }
- /**
- * Return true to show the button bar above the viewer.
- * The tool bar contains "Get List" and "Refresh" buttons and is typicall
- * shown in dialogs that list only remote system objects.
- */
- public boolean showButtonBar()
- {
- return false;
- }
- /**
- * Return true to show right-click popup actions on objects in the tree.
- */
- public boolean showActions()
- {
- return true;
- }
-
-
- // ----------------------------------
- // OUR OWN METHODS...
- // ----------------------------------
-
- /**
- * Return all connections which have at least one subsystem that implements/extends RemoteFileSubSystem
- */
- public IHost[] getConnections()
- {
- int connCount = getConnectionCount();
- IHost[] ourConns = new IHost[connCount];
- IHost[] allConns = sr.getHosts();
- int ourConnsIdx = 0;
- if (allConns != null)
- {
- for (int idx=0; idx<allConns.length; idx++)
- {
- ISubSystem[] subsystems = sr.getSubSystems(allConns[idx]);
- if (subsystems != null)
- {
- boolean match = false;
- for (int jdx=0; !match && (jdx<subsystems.length); jdx++)
- {
- if (subsystems[jdx] instanceof IRemoteFileSubSystem)
- {
- ourConns[ourConnsIdx++] = allConns[idx];
- match = true;
- }
- }
- }
- }
- }
- return ourConns;
- }
-
- /**
- * Return a count of all connections which have at least one subsystem that implements/extends RemoteFileSubSystem
- */
- public int getConnectionCount()
- {
- int count = 0;
- IHost[] allConns = sr.getHosts();
- if (allConns != null)
- {
- for (int idx=0; idx<allConns.length; idx++)
- {
- ISubSystem[] subsystems = sr.getSubSystems(allConns[idx]);
- boolean match = false;
- if (subsystems != null)
- {
- for (int jdx=0; !match && (jdx<subsystems.length); jdx++)
- {
- if (subsystems[jdx] instanceof IRemoteFileSubSystem)
- match = true;
- }
- }
- if (match)
- ++count;
- }
- }
- return count;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemAPIProviderImpl.java
deleted file mode 100644
index 451f7999d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemAPIProviderImpl.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileAPIProvider;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is used when the contents are to be subset to a particular remote file subsystem instance.
- */
-public class SystemFileSubSystemAPIProviderImpl
- extends SystemFileAPIProviderImpl
- implements ISystemFileAPIProvider
-{
-
-
- protected IRemoteFileSubSystem subsystem = null;
- //protected Object[] emptyList = new Object[0];
-
- /**
- * Constructor for SystemFileAPIProvider
- * @param subsystem The remote file subsystem from which we want to list referenced filter pools, filters and file system objects.
- * @param directoryMode true if you only want to traverse directories, false for both files and directories.
- */
- public SystemFileSubSystemAPIProviderImpl(IRemoteFileSubSystem subsystem, boolean directoryMode)
- {
- super(directoryMode);
- this.subsystem = subsystem;
- }
-
- /**
- * Get the input subsystem object.
- */
- public IRemoteFileSubSystem getSubSystem()
- {
- return subsystem;
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * We return all filter pools for this subsystem
- */
- public Object[] getSystemViewRoots()
- {
- // todo: maybe return a non-filter root for direct drill-down
- return subsystem.getChildren();
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return true if there are any connections containing a remote file subsystem, for any active profile.
- */
- public boolean hasSystemViewRoots()
- {
- return (subsystem.hasChildren());
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return sr.getConnectionChildren(selectedConnection);
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return sr.hasConnectionChildren(selectedConnection);
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- // ----------------------------------
- // OUR OWN METHODS...
- // ----------------------------------
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemConfigurationAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemConfigurationAPIProviderImpl.java
deleted file mode 100644
index 96fa640a9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemConfigurationAPIProviderImpl.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileAPIProvider;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-
-
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is used when the intial connections are to be subset to those that support a particular remote file subsystem factory,
- * and subsystems shown within those connections are to be subset to only those from this subsystem factory.
- */
-public class SystemFileSubSystemConfigurationAPIProviderImpl
- extends SystemFileAPIProviderImpl
- implements ISystemFileAPIProvider
-{
-
-
- private IRemoteFileSubSystemConfiguration subsystemFactory = null;
- //protected Object[] emptyList = new Object[0];
-
- /**
- * Constructor
- * @param subsystemFactory The remote file subsystem factory. Users will drill down from connections that support this factory.
- * @param directoryMode true if you only want to traverse directories, false for both files and directories.
- */
- public SystemFileSubSystemConfigurationAPIProviderImpl(IRemoteFileSubSystemConfiguration subsystemFactory, boolean directoryMode)
- {
- super(directoryMode);
- this.subsystemFactory = subsystemFactory;
- }
-
- /**
- * Get the input subsystem object.
- */
- public IRemoteFileSubSystemConfiguration getSubSystemConfiguration()
- {
- return subsystemFactory;
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * We return all filter pools for this subsystem
- */
- public Object[] getSystemViewRoots()
- {
- return getConnections();
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return true if there are any connections containing a remote file subsystem, for any active profile.
- */
- public boolean hasSystemViewRoots()
- {
- return hasConnections();
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return sr.getConnectionChildren(selectedConnection);
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return sr.hasConnectionChildren(selectedConnection);
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- // ----------------------------------
- // OUR OWN METHODS...
- // ----------------------------------
- /**
- * Return connections defined which this factory supports
- */
- public IHost[] getConnections()
- {
- return sr.getHostsBySubSystemConfiguration(subsystemFactory);
- }
- /**
- * Return a count of all connections which have at least one subsystem that implements/extends RemoteFileSubSystem
- */
- public int getConnectionCount()
- {
- return getConnections().length;
- }
- /**
- * Return true if there are any connections defined which this factory supports
- */
- public boolean hasConnections()
- {
- ISubSystem[] allOurSubSystems = subsystemFactory.getSubSystems(true); // true => full get; do restore from disk if not already
- return ((allOurSubSystems!=null) && (allOurSubSystems.length>0));
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemRemoteDirectoryMatcher.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemRemoteDirectoryMatcher.java
deleted file mode 100644
index 8f4937218..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemRemoteDirectoryMatcher.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-import org.eclipse.rse.core.SystemRemoteObjectMatcher;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes;
-
-
-
-/**
- * This class encapsulates all the criteria required to identify a match on a remote
- * system directory object.
- * <p>
- * Use the static method {@link #getDirectoryMatcher()}
- * to get an default instance that matches on any directory of any name.
- * <p>
- * You only need to instantiate this class if you want to match on a directory of a
- * particular name.
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter
- */
-public class SystemRemoteDirectoryMatcher extends SystemRemoteObjectMatcher
-{
- public static SystemRemoteDirectoryMatcher inst = null;
- public static final String category = ISystemFileRemoteTypes.TYPECATEGORY;
- public static final String type = ISystemFileRemoteTypes.TYPE_FOLDER;
-
- /**
- * Constructor.
- * You only need to instantiate yourself if you want to match on a directory
- * of a particular name.
- * Otherwise, call {@link #getDirectoryMatcher()}.
- */
- public SystemRemoteDirectoryMatcher(String nameFilter)
- {
- super(null, category, nameFilter, type, null, null);
- }
-
- /**
- * Return an instance that will match on any directory of any name from any remote system
- */
- public static SystemRemoteDirectoryMatcher getDirectoryMatcher()
- {
- if (inst == null)
- inst = new SystemRemoteDirectoryMatcher(null);
- return inst;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/Activator.java
deleted file mode 100644
index cea6575e3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/Activator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.files.core", path);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemFileResources.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemFileResources.java
deleted file mode 100644
index a40101371..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemFileResources.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core;
-
-import org.eclipse.osgi.util.NLS;
-
-
-public class SystemFileResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.subsystems.files.core.SystemFileResources"; //$NON-NLS-1$
-
- // -------------------
- // DEFAULT FILTERS...
- // -------------------
- public static String RESID_FILTER_ROOTS;
- public static String RESID_FILTER_ROOTFILES;
- public static String RESID_FILTER_ROOTFOLDERS;
- public static String RESID_FILTER_DRIVES;
- public static String RESID_FILTER_HOME;
- public static String RESID_FILTER_USERHOME;
- public static String RESID_FILTER_MYHOME;
-
- // -------------------------
- // MISCELLANEOUS...
- // -------------------------
- public static String RESID_PROPERTY_FILE_FILTER_VALUE;
-
- // -------------------------
- // WIZARDS...
- // -------------------------
-
- // New System File Filter wizard...
- public static String RESID_NEWFILEFILTER_PAGE1_TITLE;
- public static String RESID_NEWFILEFILTER_PAGE1_DESCRIPTION;
-
- // New Filter String wizard...
- public static String RESID_NEWFILTERSTRING_TITLE;
- public static String RESID_NEWFILTERSTRING_PAGE1_TITLE;
- public static String RESID_NEWFILTERSTRING_PAGE1_DESCRIPTION;
-
- // File Filter String Re-Usable form (used in dialog and wizard)
-
- public static String RESID_FILEFILTERSTRING_FOLDER_LABEL;
- public static String RESID_FILEFILTERSTRING_FILE_LABEL;
- public static String RESID_FILEFILTERSTRING_INCFOLDERS_LABEL;
- public static String RESID_FILEFILTERSTRING_INCFILES_LABEL;
- public static String RESID_FILEFILTERSTRING_INCFILESONLY_LABEL;
- public static String RESID_FILEFILTERSTRING_BYFILENAME_LABEL;
- public static String RESID_FILEFILTERSTRING_BYFILETYPES_LABEL;
- public static String RESID_FILEFILTERSTRING_TYPES_LABEL;
- public static String RESID_FILEFILTERSTRING_SELECTTYPES_LABEL;
- public static String RESID_FILEFILTERSTRING_TEST_LABEL;
-
- public static String RESID_FILEFILTERSTRING_FOLDER_TOOLTIP;
- public static String RESID_FILEFILTERSTRING_FILE_TOOLTIP;
- public static String RESID_FILEFILTERSTRING_INCFOLDERS_TOOLTIP;
- public static String RESID_FILEFILTERSTRING_INCFILES_TOOLTIP;
- public static String RESID_FILEFILTERSTRING_INCFILESONLY_TOOLTIP;
- public static String RESID_FILEFILTERSTRING_BYFILENAME_TOOLTIP;
- public static String RESID_FILEFILTERSTRING_BYFILETYPES_TOOLTIP;
- public static String RESID_FILEFILTERSTRING_TYPES_TOOLTIP;
- public static String RESID_FILEFILTERSTRING_SELECTTYPES_TOOLTIP;
- public static String RESID_FILEFILTERSTRING_TEST_TOOLTIP;
-
- // -------------------------
- // DIALOGS...
- // -------------------------
- // Change System File Filter dialog...
- public static String RESID_CHGFILEFILTER_TITLE;
-
- // Change System File Filter String dialog...
- public static String RESID_CHGFILEFILTERSTRING_TITLE;
-
- // Select Directory dialog...
- public static String RESID_SELECTDIRECTORY_TITLE;
- public static String RESID_SELECTDIRECTORY_VERBAGE;
- public static String RESID_SELECTDIRECTORY_SELECT_LABEL;
- public static String RESID_SELECTDIRECTORY_SELECT_TOOLTIP;
-
- // Select File dialog...
- public static String RESID_SELECTFILE_TITLE;
- public static String RESID_SELECTFILE_VERBAGE;
- public static String RESID_SELECTFILE_SELECT_LABEL;
- public static String RESID_SELECTFILE_SELECT_TOOLTIP;
-
- // Prompt for home folder dialog...
- public static String RESID_HOMEPROMPT_TITLE;
- public static String RESID_HOMEPROMPT_VERBAGE;
- public static String RESID_HOMEPROMPT_PROMPT_LABEL;
- public static String RESID_HOMEPROMPT_PROMPT_TOOLTIP;
-
- // -------------------------
- // ACTIONS...
- // -------------------------
- public static String ACTION_NEWFILTER_LABEL;
- public static String ACTION_NEWFILTER_TOOLTIP;
-
- public static String ACTION_NEWNESTEDFILTER_LABEL;
- public static String ACTION_NEWNESTEDFILTER_TOOLTIP;
-
-
- public static String ACTION_NEWFILTERSTRING_LABEL;
- public static String ACTION_NEWFILTERSTRING_TOOLTIP;
-
- public static String ACTION_ADDFILTERSTRING_LABEL;
- public static String ACTION_AddFILTERSTRING_TOOLTIP;
-
- public static String ACTION_UPDATEFILTERSTRING_LABEL;
- public static String ACTION_UPDATEFILTERSTRING_TOOLTIP;
-
- public static String ACTION_SELECTFILETYPES_LABEL;
- public static String ACTION_SELECTFILETYPES_TOOLTIP;
-
- // -------------------------
- // WIDGETS...
- // -------------------------
- public static String WIDGET_FOLDER_LABEL;
- public static String WIDGET_FOLDER_TOOLTIP;
-
- public static String WIDGET_BROWSE_LABEL;
- public static String WIDGET_BROWSE_TOOLTIP;
-
- // -------------------------
- // PROPERTY PAGES...
- // -------------------------
- public static String RESID_PP_FILE_TITLE;
- public static String RESID_PP_FILE_TYPE_LABEL;
- public static String RESID_PP_FILE_TYPE_TOOLTIP;
- public static String RESID_PP_FILE_TYPE_FILE_VALUE;
- public static String RESID_PP_FILE_TYPE_FOLDER_VALUE;
- public static String RESID_PP_FILE_TYPE_ROOT_VALUE;
- public static String RESID_PP_FILE_NAME_LABEL;
- public static String RESID_PP_FILE_PATH_LABEL;
- public static String RESID_PP_FILE_SIZE_LABEL;
- public static String RESID_PP_FILE_SIZE_VALUE;
- public static String RESID_PP_FILE_MODIFIED_LABEL;
- public static String RESID_PP_FILE_READONLY_LABEL;
- public static String RESID_PP_FILE_WRITABLE_LABEL;
- public static String RESID_PP_FILE_HIDDEN_LABEL;
-
- public static String RESID_PP_FILE_NAME_TOOLTIP;
- public static String RESID_PP_FILE_PATH_TOOLTIP;
- public static String RESID_PP_FILE_SIZE_TOOLTIP;
- public static String RESID_PP_FILE_MODIFIED_TOOLTIP;
- public static String RESID_PP_FILE_READONLY_TOOLTIP;
- public static String RESID_PP_FILE_READABLE_TOOLTIP;
- public static String RESID_PP_FILE_WRITABLE_TOOLTIP;
- public static String RESID_PP_FILE_HIDDEN_TOOLTIP;
-
- // -------------------------------
- // Enter or select file form
- // -------------------------------
- public static String RESID_ENTER_OR_SELECT_FILE_TITLE;
- public static String RESID_ENTER_OR_SELECT_FILE_VERBAGE_LABEL;
- public static String RESID_ENTER_OR_SELECT_FILE_ENTER_LABEL;
- public static String RESID_ENTER_OR_SELECT_FILE_ENTER_TOOLTIP;
- public static String RESID_ENTER_OR_SELECT_FILE_SELECT_TOOLTIP;
- public static String RESID_ENTER_OR_SELECT_FILE_FILE_LABEL;
- public static String RESID_ENTER_OR_SELECT_FILE_FILE_TOOLTIP;
-
- public static String RESID_JOB_SEARCH_NAME;
- public static String RESID_JOB_DECORATEFILES_NAME;
-
- public static String RESID_FTP_CONNECTORSERVICE_NAME;
- public static String RESID_FTP_CONNECTORSERVICE_DESCRIPTION;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemFileResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemFileResources.properties b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemFileResources.properties
deleted file mode 100644
index 508cba09c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemFileResources.properties
+++ /dev/null
@@ -1,219 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-##############################################################
-# Button values. Mnemonics will be assigned automatically, don't set them here.
-##############################################################
-
-
-#=============================================================
-# FILE SUBSYSTEM ACTIONS...
-#=============================================================
-ACTION_NEWFILTER_LABEL=Filter...
-ACTION_NEWFILTER_TOOLTIP=Create a new file system filter
-
-ACTION_NEWNESTEDFILTER_LABEL=Nested Filter...
-ACTION_NEWNESTEDFILTER_TOOLTIP=Create a new file system filter within the selected filter
-
-
-ACTION_NEWFILTERSTRING_LABEL=Filter String...
-ACTION_NEWFILTERSTRING_TOOLTIP=Create a new file filter string
-
-ACTION_ADDFILTERSTRING_LABEL=Add...
-ACTION_AddFILTERSTRING_TOOLTIP=Create a new file filter string
-
-ACTION_UPDATEFILTERSTRING_LABEL=Change
-ACTION_UPDATEFILTERSTRING_TOOLTIP=Edit this filter string
-
-ACTION_SELECTFILETYPES_LABEL=Select...
-ACTION_SELECTFILETYPES_TOOLTIP=Select file types
-
-
-##############################################################
-# REMOTE FILE SYSTEM TRANSLATABLE STRINGS
-##############################################################
-#=============================================================
-# DEFAULT FILTERS...
-#=============================================================
-RESID_FILTER_ROOTS=Roots
-RESID_FILTER_ROOTFILES=Root
-RESID_FILTER_ROOTFOLDERS=Folders
-RESID_FILTER_DRIVES=Drives
-RESID_FILTER_HOME=Home
-RESID_FILTER_USERHOME=Home
-RESID_FILTER_MYHOME=My Home
-#=============================================================
-# NEW FILE FILTER WIZARD...
-#=============================================================
-RESID_NEWFILEFILTER_PAGE1_TITLE=File Filter
-RESID_NEWFILEFILTER_PAGE1_DESCRIPTION=Create a file filter
-
-#=============================================================
-# NEW FILE FILTER STRING WIZARD...
-#=============================================================
-RESID_NEWFILTERSTRING_TITLE=New File Filter String
-RESID_NEWFILTERSTRING_PAGE1_TITLE=File Filter String
-RESID_NEWFILTERSTRING_PAGE1_DESCRIPTION=Create a file name filter string
-
-
-#=============================================================
-# CHANGE FILE FILTER DIALOG...
-#=============================================================
-RESID_CHGFILEFILTER_TITLE=Change File Filter
-
-#=============================================================
-# CHANGE FILE FILTER STRING DIALOG...
-#=============================================================
-RESID_CHGFILEFILTERSTRING_TITLE=Change File Filter String
-
-#=============================================================
-# SELECT DIRECTORY DIALOG...
-#=============================================================
-RESID_SELECTDIRECTORY_TITLE=Browse For Folder
-RESID_SELECTDIRECTORY_VERBAGE=Select a folder
-RESID_SELECTDIRECTORY_SELECT_LABEL=Selected folder:
-RESID_SELECTDIRECTORY_SELECT_TOOLTIP=Expand tree and select folder
-
-#=============================================================
-# SELECT FILE DIALOG...
-#=============================================================
-RESID_SELECTFILE_TITLE=Browse For File
-RESID_SELECTFILE_VERBAGE=Select a file
-RESID_SELECTFILE_SELECT_LABEL=Selected file:
-RESID_SELECTFILE_SELECT_TOOLTIP=Expand tree and select file
-
-#=============================================================
-# PROMPT FOR HOME FOLDER DIALOG...
-#=============================================================
-RESID_HOMEPROMPT_TITLE=Prompt For Home Folder
-
-RESID_HOMEPROMPT_VERBAGE=Please enter or select your personal home folder for this remote system
-RESID_HOMEPROMPT_PROMPT_LABEL=Home folder
-RESID_HOMEPROMPT_PROMPT_TOOLTIP=Enter or select the folder assigned to your user ID
-
-
-
-#=============================================================
-# REMOTE FILE SYSTEM PROPERTY VALUES
-#=============================================================
-RESID_PROPERTY_FILE_FILTER_VALUE=File filter
-
-#=============================================================
-# REMOTE FILE PROPERTIES PAGE...
-#=============================================================
-RESID_PP_FILE_TITLE=Properties for File System Object
-RESID_PP_FILE_TYPE_ROOT_VALUE=Root
-RESID_PP_FILE_TYPE_FOLDER_VALUE=Folder
-RESID_PP_FILE_TYPE_FILE_VALUE=File
-RESID_PP_FILE_SIZE_VALUE=&1 bytes
-
-
-#=============================================================
-# ENTER OR SELECT FILE DIALOG...
-#=============================================================
-RESID_ENTER_OR_SELECT_FILE_TITLE= Specify File
-RESID_ENTER_OR_SELECT_FILE_VERBAGE_LABEL= Enter or select a file
-RESID_ENTER_OR_SELECT_FILE_ENTER_LABEL= Enter parent folder:
-RESID_ENTER_OR_SELECT_FILE_ENTER_TOOLTIP= Enter the path of the parent folder
-RESID_ENTER_OR_SELECT_FILE_SELECT_TOOLTIP= Expand tree and select file or parent folder
-RESID_ENTER_OR_SELECT_FILE_FILE_LABEL= File name:
-RESID_ENTER_OR_SELECT_FILE_FILE_TOOLTIP= Enter the name of the file
-
-
-#=============================================================
-# NEW FILTER WIZARD...
-#=============================================================
-
-
-RESID_FILEFILTERSTRING_FOLDER_LABEL=Folder path
-RESID_FILEFILTERSTRING_FOLDER_TOOLTIP=Folder containing the files to list
-RESID_FILEFILTERSTRING_FILE_LABEL=File name filter
-RESID_FILEFILTERSTRING_FILE_TOOLTIP=File name filter pattern
-
-RESID_FILEFILTERSTRING_INCFOLDERS_LABEL=Include folders
-RESID_FILEFILTERSTRING_INCFOLDERS_TOOLTIP=Select to includes folders in the list
-
-RESID_FILEFILTERSTRING_INCFILES_LABEL=Include files
-RESID_FILEFILTERSTRING_INCFILES_TOOLTIP=Select to includes files in the list
-
-RESID_FILEFILTERSTRING_INCFILESONLY_LABEL=Show files only
-RESID_FILEFILTERSTRING_INCFILESONLY_TOOLTIP=Select to exclude folders from the list
-
-
-RESID_FILEFILTERSTRING_BYFILENAME_LABEL=Subset by file name
-RESID_FILEFILTERSTRING_BYFILENAME_TOOLTIP=Select to subset the list by generic file name
-
-RESID_FILEFILTERSTRING_BYFILETYPES_LABEL=Subset by file types
-RESID_FILEFILTERSTRING_BYFILETYPES_TOOLTIP=Select to subset the list by one or more file types
-
-RESID_FILEFILTERSTRING_TYPES_LABEL=File types filter
-RESID_FILEFILTERSTRING_TYPES_TOOLTIP=Select the file types to restrict the list by
-
-
-RESID_FILEFILTERSTRING_SELECTTYPES_LABEL=Select...
-RESID_FILEFILTERSTRING_SELECTTYPES_TOOLTIP=Select the file types to subset the list by
-
-
-RESID_FILEFILTERSTRING_TEST_LABEL=Test...
-RESID_FILEFILTERSTRING_TEST_TOOLTIP=Display results of running this filter string
-
-
-RESID_PP_FILE_PATH_LABEL=Location:
-RESID_PP_FILE_PATH_TOOLTIP=Path of the remote file or folder
-
-RESID_PP_FILE_NAME_LABEL=Name:
-RESID_PP_FILE_NAME_TOOLTIP=Name of the remote file or folder
-
-RESID_PP_FILE_TYPE_LABEL=Object type:
-RESID_PP_FILE_TYPE_TOOLTIP=Type of the remote file or folder
-
-RESID_PP_FILE_SIZE_LABEL=Size:
-RESID_PP_FILE_SIZE_TOOLTIP=Size in bytes of the remote file
-RESID_PP_FILE_SIZE_VALUE=&1 bytes
-
-RESID_PP_FILE_MODIFIED_LABEL=Last modified:
-RESID_PP_FILE_MODIFIED_TOOLTIP=Date this file or folder was last modified
-
-RESID_PP_FILE_READONLY_LABEL=Read-only
-RESID_PP_FILE_READONLY_TOOLTIP=Is this file or folder read-only
-
-RESID_PP_FILE_READABLE_TOOLTIP=Is reading of this file or folder permitted
-
-RESID_PP_FILE_WRITABLE_LABEL=Writable
-RESID_PP_FILE_WRITABLE_TOOLTIP=Is writing of this file or folder permitted
-
-RESID_PP_FILE_HIDDEN_LABEL=Hidden
-RESID_PP_FILE_HIDDEN_TOOLTIP=Is this file or folder typically hidden from lists
-
-
-
-#=============================================================
-# RE-USABLE COMPOSITE FILE SYSTEM WIDGETS
-#=============================================================
-WIDGET_FOLDER_LABEL=Folder:
-WIDGET_FOLDER_TOOLTIP=Select or specify folder path
-
-WIDGET_BROWSE_LABEL=Browse...
-WIDGET_BROWSE_TOOLTIP=Browse for folder path
-
-RESID_JOB_SEARCH_NAME=Search
-RESID_JOB_DECORATEFILES_NAME=Decorate Files
-
-RESID_FTP_CONNECTORSERVICE_NAME=FTP Connector Service
-RESID_FTP_CONNECTORSERVICE_DESCRIPTION=The FTP Connector Service uses the FTP protocol to connect to a remote host. You must have an FTP daemon running on the host. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/IRemotePath.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/IRemotePath.java
deleted file mode 100644
index 2143d27ac..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/IRemotePath.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.model;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-/**
- * This interface represents a remote path.
- */
-public interface IRemotePath {
-
- /**
- * Returns the profile name.
- * @return the profile name.
- */
- public String getProfileName();
-
- /**
- * Returns the connection name.
- * @return the connection name.
- */
- public String getConnectionName();
-
- /**
- * Returns the absolute path.
- * @return the absolute path.
- */
- public String getAbsolutePath();
-
- /**
- * Returns the fully qualified path. The fully qualified path is the absolute path on the remote machine,
- * prefixed by profile name and connection name. It is of the form "profileName.connectionName:absolutePath".
- * If the profile name, connection name or absolute path is <code>null</code>, then the fully qualified path
- * will also be <code>null</code>.
- * @return the fully qualified path.
- */
- public String getFullyQualifiedPath();
-
- /**
- * Returns the file extension for the path. The file extension portion is
- * defined as the string following the last period (".") character in the path.
- * @return the extension, or <code>null</code> if none.
- */
- public String getFileExtension();
-
- /**
- * Returns a new path with the file extension added to this path. The file extension portion is
- * defined as the string following the last period (".") character in the path. If this path ends
- * with a separator, i.e. '/' or '\\', then this path is returned.
- * The given extension should not include a leading ".".
- * @param extension the file extension to append to the path.
- * @return the new path.
- */
- public IRemotePath addFileExtension(String extension);
-
- /**
- * Returns a new path with the file extension removed from this path. The file extension portion is
- * defined as the string following the last period (".") character in the path. If this path ends
- * with a separator, i.e. '/' or '\\', or if it does not have an extension, then this path is returned.
- * The given extension should not include a leading ".".
- * @param the new path.
- */
- public IRemotePath removeFileExtension();
-
- /**
- * Returns whether this path represents a virtual file.
- * @return <code>true</code> if the path represents a virtual file, <code>false</code> otherwise.
- */
- public boolean isVirtual();
-
- /**
- * Returns the remote file represented by the remote path.
- * @return the remote file.
- */
- public IRemoteFile toRemoteFile();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileAPIProvider.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileAPIProvider.java
deleted file mode 100644
index 62a9d84f8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileAPIProvider.java
+++ /dev/null
@@ -1,41 +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.subsystems.files.core.model;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.view.ISystemViewInputProvider;
-
-
-
-/**
- * Where to start when looking to traverse a remote file system
- * @see org.eclipse.rse.internal.subsystems.files.core.SystemFileAPIProviderImpl
- */
-public interface ISystemFileAPIProvider extends ISystemViewInputProvider
-{
- /**
- * Get the directories-only mode.
- */
- public boolean isDirectoriesOnly();
- /**
- * Return all connections which have at least one subsystem that implements/extends RemoteFileSubSystem
- */
- public IHost[] getConnections();
- /**
- * Return a count of all connections which have at least one subsystem that implements/extends RemoteFileSubSystem
- */
- public int getConnectionCount();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileRemoteTypes.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileRemoteTypes.java
deleted file mode 100644
index d83f3649c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileRemoteTypes.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.subsystems.files.core.model;
-/**
- * All remote object types we support.
- * These can be used when registering property pages against remote universal file system objects.
- */
-public interface ISystemFileRemoteTypes
-{
-
- // ------------------
- // TYPE CATEGORIES...
- // ------------------
-
- /**
- * There is only one type category for remote files.
- * It is "files".
- */
- public static final String TYPECATEGORY = "files";
- /**
- * There is only one type category for remote cmds.
- * It is "cmds".
- */
- public static final String TYPECMDCATEGORY = "cmds";
-
- // -----------
- // TYPES...
- // -----------
-
- /**
- * A folder object
- */
- public static final String TYPE_FOLDER = "folder";
- /**
- * A file object
- */
- public static final String TYPE_FILE = "file";
-
- // -----------
- // SUBTYPES...
- // -----------
-
- /**
- * A folder object
- */
- public static final String SUBTYPE_SUBFOLDER = "subfolder";
- /**
- * A root object
- */
- public static final String SUBTYPE_ROOT = "root";
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeMapping.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeMapping.java
deleted file mode 100644
index 2011e6697..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeMapping.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.model;
-
-public interface ISystemFileTransferModeMapping {
-
-
-
-
- /**
- * Get the extension
- *
- * @return the extension for the mapping
- */
- public String getExtension();
-
-
- /**
- * Get the label
- *
- * @return the label for the mapping
- */
- public String getLabel();
-
-
- /**
- * Get the name
- *
- * @return the name for the mapping
- */
- public String getName();
-
-
- /**
- * Returns if the mapping is binary
- *
- * @return true if binary, false if text
- */
- public boolean isBinary();
-
-
- /**
- * Returns if the mapping is text
- *
- * @return true if text, false if binary
- */
- public boolean isText();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeRegistry.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeRegistry.java
deleted file mode 100644
index 46799713f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeRegistry.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.model;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.rse.services.clientserver.ISystemFileTypes;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-
-
-public interface ISystemFileTransferModeRegistry extends ISystemFileTypes
-{
-
- // Default text file names
- public static final String[] DEFAULT_TEXT_FILE_NAMES = {"application.xml", "build.properties", "fragment.xml",
- "install.xml", "plugin.xml", "server-cfg.xml", "web.xml"};
-
- // Default text file types
- public static final String[] DEFAULT_TEXT_FILE_EXTENSIONS = {"conxmi", "css", "dad", "dadx", "dbxmi", "dtd",
- "ent", "htm", "html", "html-ss", "jardesc",
- "java", "jhtml", "jpage", "jsp", "nst",
- "properties", "schxmi", "shtm", "shtml", "tblxmi",
- "tld", "txt", "wsdl", "xhtml", "xmi", "xml",
- "xsd", "xsl"};
-
- // Default text file types that only we recognize through LPEX
- public static final String[] DEFAULT_LPEX_TEXT_FILE_EXTENSIONS = {"app", "asm", "c", "c++", "cbl", "cc", "ccs",
- "cmd", "cpp", "cpy", "cxx", "f", "f90", "f95",
- "h", "h++", "hh", "hla", "hpp", "htm", "html",
- "hxx", "inc", "inl", "jav", "java", "jcl",
- "jj", "lx", "lxl", "lxu", "mac", "pli", "pro",
- "properties", "rc", "rex", "rexx", "s", "sqc",
- "sql", "sqlj", "xml", "xsl"};
-
- // the following need to match what is in plugin.xml! */
- /* scrubbed by phil 10/16/2002... removed old code/400 extensions not used anymore, and added .cpy for cobol on ifs
- public static final String[] DEFAULT_ISERIES_LPEX_TEXT_FILE_EXTENSIONS = {"c", "cbl", "cblle", "cicsc",
- "cicscbl", "cicscblle", "cicssqlcbl",
- "cl", "cle", "clle", "clp", "cmd",
- "cpp", "cpple", "dsp", "dspf",
- "dspf400", "icf", "icff", "icff400",
- "irp", "lf", "lf4", "lf400", "mnudds",
- "pf", "pf4", "pf400", "pnlgrp", "prt",
- "prtf", "prtf400", "rpg", "rpg36",
- "rpg38", "rpgle", "rpgleinc", "rpt",
- "sir", "sqlc", "sqlcbl", "sqlcblle",
- "sqlcpple", "sqlrpg", "sqlrpgle",
- "srg"}; */
- public static final String[] DEFAULT_ISERIES_LPEX_TEXT_FILE_EXTENSIONS = {"c", "cbl", "cblle", "cicsc",
- "cicscbl", "cicscblle", "cicssqlcbl",
- "cl", "cle", "clle", "clp", "cmd",
- "cob",
- "cpp", "cpple", "cpy", "dspf",
- "icff",
- "lf", "mbr", "mnudds",
- "pcml",
- "pf", "pnlgrp",
- "prtf", "rpg", "rpg36",
- "rpg38", "rpgle", "rpgleinc", "rpt",
- "sqlc", "sqlcbl", "sqlcblle",
- "sqlcpple", "sqlrpg", "sqlrpgle",
- };
- /* added by phil 10/16/2002... */
- public static final String[] DEFAULT_UNIX_LPEX_TEXT_FILE_EXTENSIONS = {"csh", "ksh", "mak", "pl", "profile", "py",
- };
-
- public static final String[] DEFAULT_BINARY_FILE_EXTENSIONS = {"xml", "jar", "zip", "tar", "exe", "gz", "z",
- "gif","jpg"};
-
-
- // Get all file transfer mode mappings
- public ISystemFileTransferModeMapping[] getModeMappings();
-
-
- // Query whether a file should be treated as binary
- public boolean isBinary(IFile file);
- public boolean isBinary(IRemoteFile remoteFile);
-
-
- // Query whether a file should be treated as text
- public boolean isText(IFile file);
- public boolean isText(IRemoteFile remoteFile);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommand.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommand.java
deleted file mode 100644
index 6ef864f03..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommand.java
+++ /dev/null
@@ -1,34 +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.subsystems.files.core.model;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-
-public interface ISystemRemoteCommand {
-
-
-
- public String getCommand();
-
- public ISubSystem getSubSystem();
-
- public ISystemRemoteCommandMessage[] getMessages();
-
- public Object getObject();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommandMessage.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommandMessage.java
deleted file mode 100644
index fe0d4c0c9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemRemoteCommandMessage.java
+++ /dev/null
@@ -1,26 +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.subsystems.files.core.model;
-public interface ISystemRemoteCommandMessage {
-
-
-
-
- public String getMessageText();
-
- public String getMessageHelp();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileFilterString.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileFilterString.java
deleted file mode 100644
index 422f5f2c0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileFilterString.java
+++ /dev/null
@@ -1,402 +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.subsystems.files.core.model;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-
-
-/**
- * A string representing a filter sent to remote file subsystems.
- * <p>
- * Filters can be absolute or relative. Absolute contains a folder path, while relative do not.
- * <p>
- * The files can be filtered by name, or by a list of file types. If by name, it can have
- * up to 2 asterisks anywhere in the name for wildcarding. If by types, multiple types can
- * by specified. The types are the file extensions without the dot, as in "java" or "class".
- * <p>
- * Examples:
- * <ul>
- * <li>Absolute file name filter: <code>d:\mystuff\phil*.abc</code>
- * <li>Relative file name filter: <code>phil*.abc</code>
- * <li>Absolute file type filter: <code>d:\mystuff\java,class,</code>
- * <li>Relative file type filter: <code>java,class,</code>
- * <p>
- * Syntactically, file type filter strings have at least one comma.
- * Note that the file name filter string "*.java" is semantically the same
- * as a type filter string "java,". Either one can be used and will get
- * the same results. However, if you specify "java" you will be in trouble,
- * as it will mean look for a file explicitly named "java".
- * <p>
- * It is invalid to have both a comma and an asterisk in the same filter string.
- * It is also invalid to have both a comma and a period in the same filter string.
- */
-public class RemoteFileFilterString implements Cloneable
-{
- protected String path, file;
- protected String[] types;
- protected boolean subdirs, files, filterByTypes;
- //private RemoteFileSubSystemConfiguration subsysFactory;
- protected String PATH_SEP = java.io.File.separator;
- public static final char TYPE_SEP = ',';
- public static final String TYPE_SEP_STRING = ",";
- public static final String SWITCH_NOSUBDIRS = " /ns";
- public static final String SWITCH_NOFILES = " /nf";
-
- /**
- * Constructor to use for a filter to list roots when used absolutely, or list all contents
- * when used relatively.
- */
- public RemoteFileFilterString()
- {
- file = "*";
- subdirs = true;
- files = true;
- }
- /**
- * Constructor to use when there is no existing filter string.
- * <p>
- * This constructor is better that the default constructor, because it takes a remote file subsystem
- * factory, from which we can query the folder and path separator characters, which are needed
- * to parse and re-build filter strings.
- * @see #setPath(String)
- * @see #setFile(String)
- * @see #setTypes(String[])
- */
- public RemoteFileFilterString(IRemoteFileSubSystemConfiguration subsysFactory)
- {
- PATH_SEP = subsysFactory.getSeparator();
- file = "*";
- subdirs = true;
- files = true;
- }
- /**
- * Constructor to use when an absolute filter string already exists.
- */
- public RemoteFileFilterString(IRemoteFileSubSystemConfiguration subsysFactory, String input)
- {
- this(subsysFactory);
- parse(null, input);
- }
- /**
- * Constructor to use when you have a path and filename filter or comma-separated file types list.
- * In the latter case, the last char must be a TYPE_SEP or comma, even for a single type.
- */
- public RemoteFileFilterString(IRemoteFileSubSystemConfiguration subsysFactory, String path, String input)
- {
- this(subsysFactory);
- parse(path, input);
- }
-
- public void setSubSystemConfiguration(IRemoteFileSubSystemConfiguration subsysFactory)
- {
- PATH_SEP = subsysFactory.getSeparator();
- }
- /**
- * Set the file name filter. You either call this or setTypes!
- */
- public void setFile(String obj)
- {
- file = obj;
- }
- /**
- * Set the path to list files and/or folders in
- */
- public void setPath(String path)
- {
- this.path = path;
- }
- /**
- * Set the file types to subset by. These are extensions, without the dot, as
- * in java, class, gif, etc.
- * You either call this or setFile!
- */
- public void setTypes(String[] types)
- {
- this.types = types;
- filterByTypes = (types != null);
- }
- /**
- * Allow files?
- */
- public void setShowFiles(boolean set)
- {
- files = set;
- }
- /**
- * Allow subdirs?
- */
- public void setShowSubDirs(boolean set)
- {
- subdirs = set;
- }
-
- /**
- * Get the file name filter
- */
- public String getFile()
- {
- return file;
- }
- /**
- * Return the file part of the filter string, without the path.
- * This is either the file name filter or a comma-separated list of types if this
- * is a file type filter string.
- */
- public String getFileOrTypes()
- {
- if (!filterByTypes || (types==null))
- return file;
- else
- {
- return getTypesString(types);
- }
- }
- /**
- * Concatenate the given file types as a single string, each type comma-separated
- */
- public static String getTypesString(String[] typesArray)
- {
- StringBuffer typesBuffer = new StringBuffer("");
- for (int idx=0; idx<typesArray.length; idx++)
- typesBuffer.append(typesArray[idx]+",");
- return typesBuffer.toString();
- }
- /**
- * For file types filters, returns the types as a string of concatenated types,
- * comma-delimited. For file name filters, returns null;
- */
- public String getTypesAsString()
- {
- if (!filterByTypes || (types==null))
- return null;
- return getTypesString(types);
- }
-
- /**
- * Get the path to list files and/or folders in
- */
- public String getPath()
- {
- return path;
- }
- /**
- * Get the types to subset by, if specified.
- * Will be null if this is not a by-type filter string.
- */
- public String[] getTypes()
- {
- return types;
- }
- /**
- * Subdirs allowed?
- */
- public boolean getShowFiles()
- {
- return files;
- }
- /**
- * Subdirs allowed?
- */
- public boolean getShowSubDirs()
- {
- return subdirs;
- }
- /**
- * Return true if this filter string filters by file types versus by file name
- */
- public boolean getFilterByTypes()
- {
- return filterByTypes;
- }
-
- /**
- * This filter string represent a list-roots filter string?
- */
- public boolean listRoots()
- {
- //return toStringNoSwitches().equals("*");
- return (path==null || path.equals("/"));
- }
-
- /**
- * This filter string represent a list-files-in-root filter string?
- */
- public boolean listRoot()
- {
- return toStringNoSwitches().equals("/*");
- }
-
-
- /**
- *
- */
- protected void parse(String inputPath, String input)
- {
- int idx = input.indexOf(SWITCH_NOSUBDIRS);
- if (idx >= 0)
- {
- subdirs = false;
- input = input.substring(0,idx);
- }
- else
- subdirs = true;
- idx = input.indexOf(SWITCH_NOFILES);
- if (idx >= 0)
- {
- files = false;
- input = input.substring(0,idx);
- }
- else
- files = true;
- if (inputPath != null)
- {
- path = inputPath;
- parseFileOrTypes(input); // file = input;
- }
- else
- {
- int pathidx = input.lastIndexOf(PATH_SEP);
- if (pathidx == 0)
- {
- // hmm, we have been given say \*.java -> what does this mean? On Windows, it
- // would mean "*.java" in the current drive, whereas on Unix/Linux it would
- // mean "*.java" in the root directory.
- // For now, we are going with the Unix interpretation, and see if that leads
- // to any problems on Windows, which should not allow such a filter anyway, unless
- // it is absolute.
- //path = null;
- path = PATH_SEP;
- if (input.length()>1)
- //file = input.substring(1); // from the 2nd char on
- parseFileOrTypes(input.substring(1)); // from the 2nd char on
- else
- file = "*";
- }
- else if (pathidx>0)
- {
- path = input.substring(0,pathidx);
- if (path.endsWith(":")) // special case: eg, given e:
- path = path + PATH_SEP; // need it to be e:\ !!
- if (pathidx == (input.length()-1))
- file = "*";
- else
- //file = input.substring(pathidx+1);
- parseFileOrTypes(input.substring(pathidx+1));
- }
- else
- {
- path = null;
- //file = input;
- parseFileOrTypes(input);
- }
- }
- ///File fileObj = (path==null)? new File(input) : new File(path, input);
- //this.path = fileObj.getParent();
- //if (this.path == null)
- //this.path = fileObj.getAbsolutePath(); // happens for root drives
- //this.file = fileObj.getName();
- }
- /**
- * Parse the non-folder part of the filter string. Will either be a
- * generic name or comma-separated list of types.
- */
- protected void parseFileOrTypes(String filter)
- {
- filterByTypes = false;
- types = null;
- if ((filter == null) || (filter.length()==0))
- {
- file = "*";
- }
- else if (filter.endsWith(TYPE_SEP_STRING))
- {
- types = parseTypes(filter);
- filterByTypes = true;
- }
- else
- file = filter;
- }
- /**
- * Parse a comma-separated list of strings into an array of strings
- */
- public static String[] parseTypes(String typeList)
- {
- StringTokenizer tokens = new StringTokenizer(typeList,TYPE_SEP_STRING);
- Vector v = new Vector();
- while (tokens.hasMoreTokens())
- {
- String token = tokens.nextToken().trim();
- if (token.length()>0)
- v.addElement(token);
- }
- String[] types = new String[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- types[idx] = (String)v.elementAt(idx);
- return types;
- }
-
- /**
- * De-hydrate into a string capturing all the attributes
- */
- public String toString()
- {
- String fs = toStringNoSwitches();
- if (!getShowSubDirs())
- fs += SWITCH_NOSUBDIRS;
- if (!getShowFiles())
- fs += SWITCH_NOFILES;
- return fs;
- }
- /**
- * Return the filter as a string, without the switches for no-files, no-folders
- */
- public String toStringNoSwitches()
- {
- String fs = null;
-
- // KM: defect 53009. Check where path is empty, so we don't add path separator to it
- if (path == null || path.length() == 0)
- fs = getFileOrTypes();
- else if (!path.endsWith(PATH_SEP))
- fs = path+PATH_SEP+getFileOrTypes();
- else
- fs = path+getFileOrTypes();
- return fs;
- }
- /**
- * Clone this into another filter string object with the same attributes.
- */
- public Object clone()
- {
- RemoteFileFilterString copy = new RemoteFileFilterString();
- copy.path = path;
- copy.file = file;
- copy.subdirs = subdirs;
- copy.files = files;
- copy.PATH_SEP = PATH_SEP;
- copy.filterByTypes = filterByTypes;
- if (types!=null)
- {
- copy.types = new String[types.length];
- for (int idx=0; idx<types.length; idx++)
- copy.types[idx] = types[idx]; // don't think we need to clone strings as they are immutable
- }
- return copy;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileUtility.java
deleted file mode 100644
index f988d74d2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileUtility.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-public class RemoteFileUtility
-{
-
- public static IRemoteFileSubSystem getFileSubSystem(IHost connection)
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] sses = sr.getSubSystems(connection);
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteFileSubSystem)
- {
- IRemoteFileSubSystem subSystem = (IRemoteFileSubSystem)sses[i];
- return subSystem;
- }
- }
- return null;
- }
-
- public static IRemoteFileSubSystem[] getFileSubSystems(IHost connection)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] sses = sr.getSubSystems(connection);
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteFileSubSystem)
- {
- IRemoteFileSubSystem subSystem = (IRemoteFileSubSystem)sses[i];
- results.add(subSystem);
- }
- }
- return (IRemoteFileSubSystem[])results.toArray(new IRemoteFileSubSystem[results.size()]);
- }
-
- public static IRemoteFileSubSystemConfiguration getFileSubSystemConfiguration(String systemType)
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] sses = sr.getSubSystemConfigurationsBySystemType(systemType);
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteFileSubSystemConfiguration)
- {
- return (IRemoteFileSubSystemConfiguration)sses[i];
- }
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemotePath.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemotePath.java
deleted file mode 100644
index 8bd09c147..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemotePath.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.model;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-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.RSEUIPlugin;
-
-
-/**
- * Class representing a remote path.
- */
-public class RemotePath implements IRemotePath {
-
- protected String profileName;
- protected String connectionName;
- protected String absolutePath;
-
- /**
- * Constructor.
- * @param profileName the profile name.
- * @param connectionName the connection name.
- * @param absolutePath the absolute path.
- */
- public RemotePath(String profileName, String connectionName, String absolutePath) {
- super();
- setProfileName(profileName);
- setConnectionName(connectionName);
- setAbsolutePath(absolutePath);
- }
-
-
- /**
- * Sets the profile name, connection name and absolute path on the remote machine
- * from the fully qualified path. The fully qualified path is the absolute path on the remote machine,
- * prefixed by profile name and connection name. It must be of the form <code>"profileName.connectionName:absolutePath"</code>.
- * @param fullyQualifiedPath the fully qualified path.
- */
- public RemotePath(String fullyQualifiedPath) {
-
- if (fullyQualifiedPath != null) {
-
- int dotIndex = fullyQualifiedPath.indexOf('.');
-
- if ((dotIndex != -1) && (dotIndex != (fullyQualifiedPath.length() - 1))) {
- int colonIndex = fullyQualifiedPath.indexOf(':', dotIndex+1);
-
- if ((colonIndex != -1) && (colonIndex != (fullyQualifiedPath.length() - 1))) {
- setProfileName(fullyQualifiedPath.substring(0, dotIndex));
- setConnectionName(fullyQualifiedPath.substring(dotIndex+1, colonIndex));
- setAbsolutePath(fullyQualifiedPath.substring(colonIndex+1));
- }
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#setProfileName(java.lang.String)
- */
- protected void setProfileName(String profileName) {
- this.profileName = profileName;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#setConnectionName(java.lang.String)
- */
- protected void setConnectionName(String connectionName) {
- this.connectionName = connectionName;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#setAbsolutePath(java.lang.String)
- */
- protected void setAbsolutePath(String absolutePath) {
- this.absolutePath = absolutePath;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#getProfileName()
- */
- public String getProfileName() {
- return profileName;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#getConnectionName()
- */
- public String getConnectionName() {
- return connectionName;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#getAbsolutePath()
- */
- public String getAbsolutePath() {
- return absolutePath;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#getFullyQualifiedPath()
- */
- public String getFullyQualifiedPath() {
-
- if ((profileName == null) || (connectionName == null) || (absolutePath == null)) {
- return null;
- }
- else {
- return profileName + "." + connectionName + ":" + absolutePath; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#getFileExtension()
- */
- public String getFileExtension() {
-
- if (absolutePath == null) {
- return null;
- }
- else {
-
- int dotIndex = absolutePath.lastIndexOf('.');
-
- if (dotIndex != -1) {
-
- if (dotIndex != (absolutePath.length() - 1)) {
- return absolutePath.substring(dotIndex+1);
- }
- else {
- return ""; //$NON-NLS-1$
- }
- }
- else {
- return null;
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#addFileExtension(java.lang.String)
- */
- public IRemotePath addFileExtension(String extension) {
-
- if (absolutePath == null) {
- return null;
- }
-
- if (absolutePath.endsWith("/") || absolutePath.endsWith("\\")) { //$NON-NLS-1$ //$NON-NLS-2$
- return this;
- }
- else {
- String newAbsolutePath = absolutePath + "." + extension; //$NON-NLS-1$
- return new RemotePath(profileName, connectionName, newAbsolutePath);
- }
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#removeFileExtension(java.lang.String)
- */
- public IRemotePath removeFileExtension() {
-
- if (absolutePath == null) {
- return null;
- }
-
- if (absolutePath.endsWith("/") || absolutePath.endsWith("\\")) { //$NON-NLS-1$ //$NON-NLS-2$
- return this;
- }
- else {
- int dotIndex = absolutePath.lastIndexOf('.');
-
- if (dotIndex == -1) {
- return this;
- }
- else {
- String newAbsolutePath = absolutePath.substring(0, dotIndex);
- return new RemotePath(profileName, connectionName, newAbsolutePath);
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#isVirtual()
- */
- public boolean isVirtual() {
- return ArchiveHandlerManager.isVirtual(absolutePath);
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#toRemoteFile()
- */
- public IRemoteFile toRemoteFile() {
-
- if ((profileName == null) || (connectionName == null) || (absolutePath == null)) {
- return null;
- }
-
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.getSystemProfile(profileName);
-
- if (profile == null) {
- return null;
- }
-
- IHost conn = registry.getHost(profile, connectionName);
-
- if (conn == null) {
- return null;
- }
-
- IRemoteFileSubSystem subsys = RemoteFileUtility.getFileSubSystem(conn);
- IRemoteFile remoteFile = null;
-
- try {
- remoteFile = subsys.getRemoteFileObject(absolutePath);
- }
- catch (SystemMessageException e) {
- SystemBasePlugin.logError("Error occured trying to get remote file", e);
- remoteFile = null;
- }
-
- return remoteFile;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemotePathUtil.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemotePathUtil.java
deleted file mode 100644
index 911bcefc5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemotePathUtil.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.model;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- * Singleton utility class for remote paths.
- */
-public class RemotePathUtil {
-
- private static RemotePathUtil instance;
-
- /**
- * Constructor.
- */
- private RemotePathUtil() {
- super();
- }
-
- /**
- * Returns the singleton instance.
- * @return the singleton instance.
- */
- public static RemotePathUtil getInstance() {
-
- if (instance == null) {
- instance = new RemotePathUtil();
- }
-
- return instance;
- }
-
- /**
- * Returns the path of the temp location corresponding to the remote path. The remote
- * path must represent a file (i.e. can not be a directory).
- * The temp path is simply the default temp location on the client system (given by system property
- * "java.io.tmpdir"), with the name of the remote file appended (not the path of the
- * remote file).
- * @param remotePath the remote path.
- * @return the path of the temporary file, or <code>null</code> if the default temporary location
- * is not available.
- */
- public IPath getClientTempLocationForFile(IRemotePath remotePath) {
- String tempDirString = System.getProperty("java.io.tmpdir");
-
- IPath tempPath = new Path(tempDirString);
-
- if (tempDirString == null) {
- return null;
- }
- else {
-
- String absolutePath = remotePath.getAbsolutePath();
-
- // try '/' first
- String sep = "/";
-
- boolean isVirtual = remotePath.isVirtual();
-
- IPath newPath = new Path(tempPath.toOSString());
-
- newPath = appendRemoteFileNameToPath(newPath, absolutePath, sep);
-
- if (!newPath.equals(tempPath)) {
- return newPath;
- }
- else {
-
- // for virtual separator is '/'
- if (isVirtual) {
- return null;
- }
-
- sep = "\\";
-
- newPath = appendRemoteFileNameToPath(newPath, absolutePath, sep);
-
- if (!newPath.equals(tempPath)) {
- return newPath;
- }
- else {
- return null;
- }
- }
- }
- }
-
- /**
- * Apnnds a file name to a path given the absolute path of a file.
- * The absolute path name of the file must not end with the given separator (we assume
- * that a directory will end with a separator).
- * @param path the path to which to append.
- * @param absolutePath the absolute path from which the name will be obtained.
- * @param sep the separator to parse the absolute path, and get the name.
- * @return the new path, or the same path if the separator was not found, or
- * was found to be the last character in the absolute path.
- */
- private IPath appendRemoteFileNameToPath(IPath path, String absolutePath, String sep) {
-
- int sepIndex = absolutePath.lastIndexOf(sep);
-
- // found separator
- if (sepIndex != -1) {
-
- // if not the last character in the path, then strip out the last segment
- if (sepIndex != (absolutePath.length()-1)) {
- return path.append(absolutePath.substring(sepIndex+1));
- }
- // separator is last character in path, so it must be a directory
- else {
- return path;
- }
- }
- // no separator found so simply append the absolute path
- else {
- return path.append(absolutePath);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeMapping.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeMapping.java
deleted file mode 100644
index 75070beaf..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeMapping.java
+++ /dev/null
@@ -1,144 +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.subsystems.files.core.model;
-
-
-/**
- * An internal class. Clients must not instantiate or subclass it.
- */
-
-public class SystemFileTransferModeMapping
- implements ISystemFileTransferModeMapping, Cloneable {
-
-
-
-
- private String name;
- private String extension;
- private boolean isBinary = true;
-
-
- /**
- * Constructor for SystemFileTransferModeMapping
- */
- public SystemFileTransferModeMapping(String extension) {
- this("*", extension);
- }
-
-
- /**
- * Constructor for SystemFileTransferModeMapping
- */
- public SystemFileTransferModeMapping(String name, String extension) {
-
- if ((name == null) || (name.length() < 1)) {
- setName("*");
- }
- else {
- setName(name);
- }
-
- setExtension(extension);
- }
-
-
-
- /**
- * @see ISystemFileTransferModeMapping#getExtension()
- */
- public String getExtension() {
- return extension;
- }
-
-
- /**
- * @see ISystemFileTransferModeMapping#getLabel()
- */
- public String getLabel() {
- return (name + "." + extension);
- }
-
-
- /**
- * @see ISystemFileTransferModeMapping#getName()
- */
- public String getName() {
- return name;
- }
-
-
- /**
- * @see ISystemFileTransferModeMapping#isBinary()
- */
- public boolean isBinary() {
- return isBinary;
- }
-
-
- /**
- * @see ISystemFileTransferModeMapping#isText()
- */
- public boolean isText() {
- return !isBinary();
- }
-
-
- /**
- * Set whether transfer mode is binary
- */
- public void setAsBinary() {
- isBinary = true;
- }
-
-
- /**
- * Set whether transfer mode is text
- */
- public void setAsText() {
- isBinary = false;
- }
-
-
- /**
- * Set the name
- */
- public void setName(String name) {
- this.name = name;
- }
-
-
- /**
- * Set the extension
- */
- public void setExtension(String extension) {
- this.extension = extension;
- }
-
-
- /**
- * Clone this object
- */
- public Object clone() {
-
- try {
- return ((SystemFileTransferModeMapping)(super.clone()));
- }
- catch (CloneNotSupportedException e) {
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeRegistry.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeRegistry.java
deleted file mode 100644
index 513ecdf92..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeRegistry.java
+++ /dev/null
@@ -1,598 +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.subsystems.files.core.model;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemSorter;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IFileEditorMapping;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.XMLMemento;
-import org.eclipse.ui.internal.Workbench;
-
-
-
-/**
- * An internal class. Clients must not instantiate or subclass it.
- */
-
-public class SystemFileTransferModeRegistry
- implements ISystemFileTransferModeRegistry, IPropertyListener {
-
-
-
-
- private static SystemFileTransferModeRegistry instance;
-
- private HashMap typeModeMappings;
-
- private RSEUIPlugin plugin;
-
- // Constants for reading from and writing to xml file
- private static final String FILENAME = "fileTransferMode.xml";
- private static final String ENCODING = SystemEncodingUtil.ENCODING_UTF_8;
- private static final String ROOT_NODE = "mode";
- private static final String INFO_NODE = "info";
- private static final String NAME_ATTRIBUTE = "name";
- private static final String EXTENSION_ATTRIBUTE = "extension";
- private static final String MODE_ATTRIBUTE = "mode";
- private static final String BINARY_VALUE = "binary";
- private static final String TEXT_VALUE = "text";
-
-
- /**
- * Constructor for SystemFileTransferModeRegistry
- */
- private SystemFileTransferModeRegistry() {
- super();
- this.plugin = RSEUIPlugin.getDefault();
- initialize();
- }
-
-
- /**
- * Get the singleton instance
- */
- public static SystemFileTransferModeRegistry getDefault() {
-
- if (instance == null) {
- instance = new SystemFileTransferModeRegistry();
- }
-
- return instance;
- }
-
-
- /**
- * Initialize the registry from storage.
- */
- private void initialize() {
-
- // load our current associations (if any)
- loadAssociations();
-
- // now we need to ensure that our mapping is in sync with the
- // editor registry. We can be out of sync because we may not have
- // been listening for editor registry changes (e.g. if our plugin wasn't
- // started while those changes were made).
- IWorkbench wb = Workbench.getInstance();
- if (wb != null)
- {
- IEditorRegistry registry = wb.getEditorRegistry();
- syncWithEditorRegistry(registry);
-
- registry.addPropertyListener(this);
- }
- }
-
-
- /**
- * Listen for changes to the Editor Registry content.
- * Update our registry by changing the hashmap and saving the new
- * mappings on disk.
- * @see org.eclipse.ui.IPropertyListener#propertyChanged(Object, int)
- */
- public void propertyChanged(Object source, int propId) {
-
- if ((source instanceof IEditorRegistry) && (propId == IEditorRegistry.PROP_CONTENTS)) {
- IEditorRegistry registry = (IEditorRegistry)source;
- syncWithEditorRegistry(registry);
- }
- }
-
-
- /**
- * Ensures that our registry is in sync with the editor registry, e.g.
- * we have exactly the same types as in the editor registry. We can be
- * out of sync if changes are made to the registry while we are not listening.
- */
- private void syncWithEditorRegistry(IEditorRegistry registry) {
-
- IFileEditorMapping[] editorMappings = registry.getFileEditorMappings();
-
- SystemFileTransferModeMapping[] modeMappings = new SystemFileTransferModeMapping[editorMappings.length];
-
- for (int i = 0; i < editorMappings.length; i++) {
- modeMappings[i] = getMapping(editorMappings[i]);
- }
-
- setModeMappings(modeMappings); // set new mappings
- saveAssociations(); // now save associations
- }
-
-
- /**
- * @see ISystemFileTransferModeRegistry#getModeMappings()
- */
- public ISystemFileTransferModeMapping[] getModeMappings() {
- List sortedMappings = sortedTypeModeMappings(); // sort hash table elements
- ISystemFileTransferModeMapping[] array = new ISystemFileTransferModeMapping[sortedMappings.size()];
- sortedMappings.toArray(array);
- return array;
- }
-
-
- /**
- * The mappings are kept in a hash map for fast lookup. Sorting is
- * typically only needed for certain dialogs/choices etc.
- */
- private List sortedTypeModeMappings() {
-
- Object[] array = new Object[typeModeMappings.size()];
- Iterator iter = typeModeMappings.values().iterator();
-
- int j = 0;
-
- while (iter.hasNext()) {
- array[j++] = iter.next();
- }
-
- SystemSorter s = new SystemSorter() {
-
- public boolean compare(Object o1, Object o2) {
-
- String s1 = ((ISystemFileTransferModeMapping)o1).getLabel().toUpperCase();
- String s2 = ((ISystemFileTransferModeMapping)o2).getLabel().toUpperCase();
- return s2.compareTo(s1) > 0;
- }
- };
-
- array = s.sort(array);
-
- List result = new ArrayList();
-
- for (int i = 0; i < array.length; i++) {
- result.add(array[i]);
- }
-
- return result;
- }
-
-
- /**
- * Sets new mode mappings
- */
- public void setModeMappings(SystemFileTransferModeMapping[] newMappings) {
- typeModeMappings = new HashMap();
-
- for (int i = 0; i < newMappings.length; i++) {
- SystemFileTransferModeMapping mapping = newMappings[i];
- typeModeMappings.put(getMappingKey(mapping), mapping);
- }
- }
-
-
- /**
- * Return a key given the mapping
- */
- private String getMappingKey(ISystemFileTransferModeMapping mapping) {
- return mapping.getLabel().toLowerCase();
- }
-
-
- /**
- * @see ISystemFileTransferModeRegistry#isBinary(String)
- */
- public boolean isBinary(String fileName) {
- return getMapping(fileName).isBinary();
- }
-
-
- /**
- * @see ISystemFileTransferModeRegistry#isBinary(File)
- */
- public boolean isBinary(File file) {
- return isBinary(file.getName());
- }
-
-
- /**
- * @see ISystemFileTransferModeRegistry#isBinary(IFile)
- */
- public boolean isBinary(IFile file) {
- return isBinary(file.getName());
- }
-
-
- /**
- * @see ISystemFileTransferModeRegistry#isBinary(IRemoteFile)
- */
- public boolean isBinary(IRemoteFile remoteFile) {
- return isBinary(remoteFile.getName());
- }
-
-
- /**
- * @see ISystemFileTransferModeRegistry#isText(String)
- */
- public boolean isText(String fileName) {
- return getMapping(fileName).isText();
- }
-
-
- /**
- * @see ISystemFileTransferModeRegistry#isText(File)
- */
- public boolean isText(File file) {
- return isText(file.getName());
- }
-
-
- /**
- * @see ISystemFileTransferModeRegistry#isText(IFile)
- */
- public boolean isText(IFile file) {
- return isText(file.getName());
- }
-
-
- /**
- * @see ISystemFileTransferModeRegistry#isText(IRemoteFile)
- */
- public boolean isText(IRemoteFile remoteFile) {
- return isText(remoteFile.getName());
- }
-
-
- /**
- * Get a mode mapping given a file editor mapping
- */
- public SystemFileTransferModeMapping getMapping(IFileEditorMapping editorMapping) {
- return getMapping(editorMapping.getLabel());
- }
-
-
- /**
- * Get the mode mapping given a file name
- */
- private SystemFileTransferModeMapping getMapping(String fileName) {
- SystemFileTransferModeMapping mapping = (SystemFileTransferModeMapping)(typeModeMappings.get(fileName.toLowerCase()));
-
- if (mapping == null) {
- mapping = createMappingFromModeMappings(fileName);
- }
-
- if (mapping == null) {
- return getDefaultMapping(fileName);
- }
-
- return mapping;
- }
-
- private SystemFileTransferModeMapping createMappingFromModeMappings(String fileName)
- {
- // get file extension
- //DY int extIndex = fileName.indexOf('.');
- int extIndex = fileName.lastIndexOf('.');
-
-
- // if there is no extension
- if ((extIndex == -1) || (extIndex == (fileName.length() - 1))) {
- return null;
- }
-
-
- String name = fileName.substring(0, extIndex);
- String extension = fileName.substring(extIndex + 1);
-
- SystemFileTransferModeMapping mapping = (SystemFileTransferModeMapping)(typeModeMappings.get(getMappingKey(new SystemFileTransferModeMapping(extension))));
-
- if (mapping == null)
- return null;
-
-
- SystemFileTransferModeMapping fileMapping = new SystemFileTransferModeMapping(name, extension);
-
- if (mapping.isText())
- {
- fileMapping.setAsText();
- }
- else
- {
- fileMapping.setAsBinary();
- }
-
- return fileMapping;
- }
-
- /**
- * Return whether to automatically detect, use binary or text during file transfer
- * for unspecified file types
- */
- public static int getFileTransferModeDefaultPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getInt(ISystemPreferencesConstants.FILETRANSFERMODEDEFAULT);
- }
-
- /**
- * Get a default mapping given an extension. Should never return null.
- */
- private SystemFileTransferModeMapping getDefaultMapping(String fileName) {
-
- // now we check if the file has an extension
- // DY int extIndex = fileName.indexOf('.');
- int extIndex = fileName.lastIndexOf('.');
- String name, extension;
-
- // if there is no extension
- // DY 04-23-2002 changed from default binary to default text for files that
- // a) Have no extension
- // b) Ends with a period
- // c) Start with a '.' i.e. .bash_history
- if ((extIndex == -1) || (extIndex == (fileName.length() - 1)) || (extIndex == 0))
- {
- name = fileName;
- extension = null;
- }
- else
- {
- name = fileName.substring(0, extIndex);
- extension = fileName.substring(extIndex + 1);
- }
-
- SystemFileTransferModeMapping mapping = new SystemFileTransferModeMapping(name, extension);
-
-
- // check if it's a default text file name
- for (int i = 0; i < DEFAULT_TEXT_FILE_NAMES.length; i++)
- {
- if (fileName.equalsIgnoreCase(DEFAULT_TEXT_FILE_NAMES[i]))
- {
- mapping.setAsText();
- return mapping;
- }
- }
-
- // DKM
- // no longer default to text - instead we default based on preferences
- // after the if (extension != null), we pick up preferences for default
- /*
- if (extension == null)
- {
- // DY mapping.setAsBinary();
- mapping.setAsText();
- return mapping;
- } */
-
-
-
- if (extension != null)
- {
- // check if it's a default text file extension
- for (int i = 0; i < DEFAULT_TEXT_FILE_EXTENSIONS.length; i++)
- {
- if (extension.equalsIgnoreCase(DEFAULT_TEXT_FILE_EXTENSIONS[i]))
- {
- mapping.setAsText();
- return mapping;
- }
- }
-
- // check if it's a default LPEX text file extension
- for (int i = 0; i < DEFAULT_LPEX_TEXT_FILE_EXTENSIONS.length; i++)
- {
- if (extension.equalsIgnoreCase(DEFAULT_LPEX_TEXT_FILE_EXTENSIONS[i]))
- {
- mapping.setAsText();
- return mapping;
- }
- }
-
- // check if it's a default iSeries LPEX text file extension
- for (int i = 0; i < DEFAULT_ISERIES_LPEX_TEXT_FILE_EXTENSIONS.length; i++)
- {
- if (extension.equalsIgnoreCase(DEFAULT_ISERIES_LPEX_TEXT_FILE_EXTENSIONS[i]))
- {
- mapping.setAsText();
- return mapping;
- }
- }
-
- // check if it's a default Universal LPEX text file extension (Phil 10/16/2002)
- for (int i = 0; i < DEFAULT_UNIX_LPEX_TEXT_FILE_EXTENSIONS.length; i++)
- {
- if (extension.equalsIgnoreCase(DEFAULT_UNIX_LPEX_TEXT_FILE_EXTENSIONS[i]))
- {
- mapping.setAsText();
- return mapping;
- }
- }
-
- // check for known binary types
- for (int i = 0; i < DEFAULT_BINARY_FILE_EXTENSIONS.length; i++)
- {
- if (extension.equalsIgnoreCase(DEFAULT_BINARY_FILE_EXTENSIONS[i]))
- {
- mapping.setAsBinary();
- return mapping;
- }
- }
- }
-
- // default
- int defaultFileTransferMode = getFileTransferModeDefaultPreference();
-
- if (defaultFileTransferMode == ISystemPreferencesConstants.FILETRANSFERMODE_BINARY)
- {
- mapping.setAsBinary();
- }
- else if (defaultFileTransferMode == ISystemPreferencesConstants.FILETRANSFERMODE_TEXT)
- {
- mapping.setAsText();
- }
-
- return mapping;
- }
-
-
- /**
- * Load the saved associations to the registry
- *
- * @return true if operation successful, false otherwise
- */
- public boolean loadAssociations() {
-
- typeModeMappings = new HashMap();
-
- String location = getFileLocation();
-
- File file = new File(location);
-
- if (!file.exists())
- return false;
-
- FileInputStream stream = null;
- InputStreamReader reader = null;
-
- boolean result = false;
-
- try {
- stream = new FileInputStream(file);
- reader = new InputStreamReader(stream, ENCODING);
- XMLMemento memento = XMLMemento.createReadRoot(reader);
- IMemento[] mementos = memento.getChildren(INFO_NODE);
-
- for (int i = 0; i < mementos.length; i++) {
- String name = mementos[i].getString(NAME_ATTRIBUTE);
- String extension = mementos[i].getString(EXTENSION_ATTRIBUTE);
- String mode = mementos[i].getString(MODE_ATTRIBUTE);
-
- SystemFileTransferModeMapping mapping = new SystemFileTransferModeMapping(name, extension);
-
- if (mode.equals(TEXT_VALUE)) {
- mapping.setAsText();
- }
- else {
- mapping.setAsBinary();
- }
-
- typeModeMappings.put(getMappingKey(mapping), mapping);
- }
-
- result = true;
- }
- catch (Exception e) {
- SystemBasePlugin.logError("Could not read transfer mode xml file", e);
- result = false;
- }
- finally {
-
- try {
-
- if (reader != null)
- reader.close();
- }
- catch (Exception e) {
- SystemBasePlugin.logError("Could not close reader for transfer mode xml file", e);
- }
- }
-
-
- return result;
- }
-
-
- /**
- * Save the contents of the registry
- */
- public void saveAssociations() {
-
- String location = getFileLocation();
-
- XMLMemento memento = XMLMemento.createWriteRoot(ROOT_NODE);
-
- Iterator iter = typeModeMappings.values().iterator();
-
- while (iter.hasNext()) {
- ISystemFileTransferModeMapping mapping = (ISystemFileTransferModeMapping)iter.next();
- IMemento infoMemento = memento.createChild(INFO_NODE);
- infoMemento.putString(NAME_ATTRIBUTE, mapping.getName());
- infoMemento.putString(EXTENSION_ATTRIBUTE, mapping.getExtension());
- infoMemento.putString(MODE_ATTRIBUTE, mapping.isBinary() ? BINARY_VALUE : TEXT_VALUE);
- }
-
- FileOutputStream stream = null;
- OutputStreamWriter writer = null;
-
- try {
- stream = new FileOutputStream(location);
- writer = new OutputStreamWriter(stream, ENCODING);
- memento.save(writer);
- }
- catch (Exception e) {
- SystemBasePlugin.logError("Could not write to transfer mode xml file", e);
- }
- finally {
-
- try {
-
- if (writer != null)
- writer.close();
- }
- catch (Exception e) {
- SystemBasePlugin.logError("Could not close writer for transfer mode xml file", e);
- }
- }
- }
-
-
- /**
- * Get the file location
- */
- private String getFileLocation() {
- return plugin.getStateLocation().append(FILENAME).toOSString();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/AbstractRemoteFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/AbstractRemoteFile.java
deleted file mode 100644
index aa19736bd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/AbstractRemoteFile.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile;
-
-
-public abstract class AbstractRemoteFile extends RemoteFile implements IRemoteFile
-{
- protected IHostFile _hostFile;
- protected FileServiceSubSystem _subSystem;
- protected String _classiciation;
-
-
- public AbstractRemoteFile(FileServiceSubSystem subSystem, IRemoteFileContext context, IRemoteFile parent, IHostFile hostFile)
- {
- super(context);
- _subSystem = subSystem;
- _hostFile = hostFile;
- setParentRemoteFile(parent);
- }
-
- public IRemoteFileSubSystem getParentRemoteFileSubSystem()
- {
- return _subSystem;
- }
-
- public IHost getSystemConnection()
- {
- return _subSystem.getHost();
- }
-
- public String getAbsolutePath()
- {
- return _hostFile.getAbsolutePath();
- }
-
-
- public String getLabel()
- {
- return _hostFile.getName();
- }
-
- public String getName()
- {
- return _hostFile.getName();
- }
-
- public String getParentPath()
- {
- return _hostFile.getParentPath();
- }
-
- public boolean isRoot()
- {
- return _hostFile.isRoot();
- }
-
- public boolean isDirectory()
- {
- return _hostFile.isDirectory();
- }
-
- public boolean isFile()
- {
- return _hostFile.isFile();
- }
-
-
- public boolean exists()
- {
- return _hostFile.exists();
- }
-
- public long getLastModified()
- {
- return _hostFile.getModifiedDate();
- }
-
-
- public long getLength()
- {
- return _hostFile.getSize();
- }
-
- public int compareTo(Object other) throws ClassCastException
- {
- IRemoteFile otherFile = (IRemoteFile)other;
- if (otherFile.isFile())
- {
- if (isFile())
- {
- String otherPath = otherFile.getAbsolutePath();
- String thisPath = getAbsolutePath();
-
- return thisPath.compareToIgnoreCase(otherPath);
- }
- else
- {
- return -1;
- }
- }
- else // not file
- {
- if (isDirectory())
- {
- String otherPath = otherFile.getAbsolutePath();
- String thisPath = getAbsolutePath();
-
- return thisPath.compareToIgnoreCase(otherPath);
- }
- else
- {
- return 1;
- }
- }
- }
-
- public boolean showBriefPropertySet()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- /**
- * @deprecated - shouldn't need apis like this
- */
- public String getParentNoRoot()
- {
- String parentPath = getParentPath();
- return parentPath;
- }
-
- /**
- * @deprecated - shouldn't need apis like this
- */
- public String getRoot()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getParentName()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isHidden()
- {
- return _hostFile.isHidden();
- }
-
- public boolean isVirtual()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean canRead()
- {
- return _hostFile.canRead();
- }
-
- public boolean canWrite()
- {
- return _hostFile.canWrite();
- }
-
- public boolean showReadOnlyProperty()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public IHostFile getHostFile()
- {
- return _hostFile;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
deleted file mode 100644
index 09ed421d5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
+++ /dev/null
@@ -1,879 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 158534 - NPE in upload/download after conflict
- * Martin Oberhuber (Wind River) - Fix 162962 - recursive removeCachedRemoteFile()
- * Martin Oberhuber (Wind River) - [168596] FileServiceSubSystem.isCaseSensitive()
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-
-import java.io.File;
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
-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;
-
-
-
-
-public final class FileServiceSubSystem extends RemoteFileSubSystem implements IFileServiceSubSystem
-{
- protected ILanguageUtilityFactory _languageUtilityFactory;
- protected IFileService _hostFileService;
- protected ISearchService _hostSearchService;
- protected IHostFileToRemoteFileAdapter _hostFileToRemoteFileAdapter;
- protected IRemoteFile _userHome;
-
-
-
-
- public FileServiceSubSystem(IHost host, IConnectorService connectorService, IFileService hostFileService, IHostFileToRemoteFileAdapter fileAdapter, ISearchService searchService)
- {
- super(host, connectorService);
- _hostFileService = hostFileService;
- _hostFileToRemoteFileAdapter = fileAdapter;
- _hostSearchService = searchService;
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem#isCaseSensitive()
- */
- public boolean isCaseSensitive() {
- return getFileService().isCaseSensitive();
- }
-
- public IRemoteFileContext getContextFor(IRemoteFile file)
- {
- return getContext(file);
- }
-
- public IRemoteFileContext getTheDefaultContext()
- {
- return getDefaultContextNoFilterString();
- }
-
- public IFileService getFileService()
- {
- return _hostFileService;
- }
-
- public void setFileService(IFileService service)
- {
- _hostFileService = service;
- }
-
- public ISearchService getSearchService()
- {
- return _hostSearchService;
- }
-
- public void setSearchService(ISearchService service)
- {
- _hostSearchService = service;
- }
-
- public IHostFileToRemoteFileAdapter getHostFileToRemoteFileAdapter()
- {
- return _hostFileToRemoteFileAdapter;
- }
-
-
-
- public String getRemoteEncoding()
- {
- return System.getProperty("file.encoding"); //$NON-NLS-1$
- }
-
- public void setHostFileToRemoteFileAdapter(IHostFileToRemoteFileAdapter hostFileAdapter)
- {
- _hostFileToRemoteFileAdapter = hostFileAdapter;
- }
-
- /**
- * Constructs an IRemoteFile object given
- * an unqualified file or folder name and its parent folder object.
- * @param parent Folder containing the folder or file
- * @param folderOrFileName Un-qualified folder or file name
- * @return an IRemoteFile object for the file.
- * @see IRemoteFile
- */
- public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName) throws SystemMessageException
- {
- String fullPath = parent.getAbsolutePath() + getSeparator() + folderOrFileName;
- IRemoteFile file = getCachedRemoteFile(fullPath);
- if (file != null && !file.isStale())
- {
- return file;
- }
-
- IHostFile node = getFile(null, parent.getAbsolutePath(), folderOrFileName);
- return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, node);
- }
-
- /**
- * Constructs and returns an IRemoteFile object given a fully-qualified
- * file or folder name.
- * @param folderOrFileName Fully qualified folder or file name
- * @return The constructed IRemoteFile
- * @see IRemoteFile
- */
- public IRemoteFile getRemoteFileObject(String folderOrFileName) throws SystemMessageException
- {
- String fofName = ArchiveHandlerManager.cleanUpVirtualPath(folderOrFileName);
- IRemoteFile file = getCachedRemoteFile(fofName);
- if (file != null && !file.isStale()) {
- return file;
- }
-
- if (fofName.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR))
- {
- fofName = fofName.substring(0, fofName.length() - ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
- }
-
-
- int j = fofName.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- if (j == -1)
- {
- if (fofName.equals("/")) //$NON-NLS-1$
- {
- try
- {
- return listRoots(null)[0];
- }
- catch (Exception e)
- {
-
- }
- }
-
- if (fofName.equals(".")) { //$NON-NLS-1$
- return getUserHome();
- }
-
- String sep = PathUtility.getSeparator(folderOrFileName);
- if (fofName.endsWith(sep))
- {
- fofName = fofName.substring(0, fofName.length() - sep.length());
- }
-
- if (fofName.endsWith(":")) //$NON-NLS-1$
- {
- try
- {
- IHostFile[] roots = getRoots(null);
- for (int i = 0; i < roots.length; i++)
- if (roots[i].getAbsolutePath().toLowerCase().startsWith(fofName.toLowerCase()))
- return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), null, roots[i]);
- }
- catch (InterruptedException e)
- {
- }
- return null;
- }
-
- int lastSep = fofName.lastIndexOf(sep);
-
- if (lastSep > -1)
- {
- String parentPath = fofName.substring(0, lastSep);
-
-
- if (parentPath.length() == 0) parentPath = "/"; //$NON-NLS-1$
- String name = fofName.substring(lastSep + 1, fofName.length());
-
- IHostFile node = getFile(new NullProgressMonitor(), parentPath, name);
- if (node != null)
- {
- IRemoteFile parent = null;
- if (!node.isRoot())
- {
- //parent = getRemoteFileObject(parentPath);
- }
- return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, node);
- }
- }
- return null;
- }
- else
- {
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(fofName);
- IHostFile node = getFile(null, avp.getPath(), avp.getName());
- if (node != null)
- {
- return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), null, node);
- }
- else return null;
- }
- }
-
-
-
-
-
- /**
- * @return The IRemoteFile that is the user's home directory on this remote file system.
- * The remote file system is assumed to have a concept of a home directory.
- */
- protected IRemoteFile getUserHome()
- {
- if (_userHome != null)
- {
- return _userHome;
- }
- IRemoteFile root = getCachedRemoteFile("."); //$NON-NLS-1$
- if (root != null && !root.isStale()) {
- return root;
- }
- IHostFile userHome = getFileService().getUserHome();
- IRemoteFile parent = null;
- if (!userHome.getParentPath().equals(".")) //$NON-NLS-1$
- {
- try
- {
- //parent = getRemoteFileObject(userHome.getParentPath());
- }
- catch (Exception e)
- {
- }
- }
- root = getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, userHome);
- cacheRemoteFile(root, "."); //$NON-NLS-1$
- _userHome = root;
- return root;
- }
-
- protected IHostFile[] getFolders(IProgressMonitor monitor, String parentPath, String fileNameFilter) throws SystemMessageException
- {
- return getFileService().getFolders(monitor, parentPath, fileNameFilter);
- }
-
- protected IHostFile[] getFiles(IProgressMonitor monitor, String parentPath, String fileNameFilter) throws SystemMessageException
- {
- return getFileService().getFiles(monitor, parentPath, fileNameFilter);
- }
-
- protected IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String parentPath, String fileNameFilter) throws SystemMessageException
- {
- return getFileService().getFilesAndFolders(monitor, parentPath, fileNameFilter);
- }
-
- protected IHostFile getFile(IProgressMonitor monitor, String parentPath, String fileName) throws SystemMessageException
- {
- return getFileService().getFile(monitor, parentPath, fileName);
- }
-
- protected IHostFile[] getRoots(IProgressMonitor monitor) throws InterruptedException, SystemMessageException
- {
- return getFileService().getRoots(monitor);
- }
-
- /**
- * Return a list of remote folders and files in the given folder.
- * <p>
- * The files part of the list is subsetted by the given file name filter.
- * It can be null for no subsetting.
- * This version is called by RemoteFileSubSystemImpl's resolveFilterString(s).
- * @param parent The parent folder to list folders and files in
- * @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
- * @param context The holder of state information
- */
- public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException
- {
- String parentPath = null;
- if (parent != null) {
- parentPath = parent.getAbsolutePath();
- } else {
- parentPath = "/"; //$NON-NLS-1$
- }
-
- if (!parent.canRead())
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_UNREADABLE).makeSubstitution(parentPath);
- throw new SystemMessageException(msg);
- }
-
- IHostFile[] results = getFilesAndFolders(monitor, parentPath, fileNameFilter);
-
- IRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results);
- parent.setContents(RemoteChildrenContentsType.getInstance(), fileNameFilter, farr);
- return farr;
- }
-
- /**
- * Return the array of IRemoteFile instances, matching the given pattern,
- * that are contained in the given folder.
- * This version is called by RemoteFileSubSystemImpl's resolveFilterString(s)
- * @param parent The parent folder to list files in
- * @param fileNameFilter The name pattern to subset the list by, or null to return all files.
- * @param context The holder of state information
- */
- public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context,IProgressMonitor monitor) throws SystemMessageException
- {
- String parentPath = null;
- if (parent != null) {
- parentPath = parent.getAbsolutePath();
- } else {
- parentPath = "/"; //$NON-NLS-1$
- }
-
- if (!parent.canRead())
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_UNREADABLE).makeSubstitution(parentPath);
- throw new SystemMessageException(msg);
- }
-
- IHostFile[] results = null;
- try
- {
- results = getFiles(monitor, parentPath, fileNameFilter);
- }
- catch (SystemMessageException e)
- {
-
- }
- IRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results);
- parent.setContents(RemoteChildrenContentsType.getInstance(), fileNameFilter, farr);
- return farr;
- }
-
- /**
- * Return a subsetted list of remote folders in the given parent folder on the remote system.
- * This version is called by RemoteFileSubSystemImpl's resolveFilterString(s)
- * @param parent The parent folder to list folders in
- * @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
- * @param context The holder of state information
- */
- public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException
- {
- String parentPath = null;
- if (parent != null) {
- parentPath = parent.getAbsolutePath();
- } else {
- parentPath = "/"; //$NON-NLS-1$
- }
-
- if (!parent.canRead())
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_UNREADABLE).makeSubstitution(parentPath);
- throw new SystemMessageException(msg);
- }
-
- IHostFile[] results = null;
- try
- {
- results = getFolders(monitor, parentPath, fileNameFilter);
- }
- catch (SystemMessageException e)
- {
- }
- IRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results);
- parent.setContents(RemoteChildrenContentsType.getInstance(), fileNameFilter, farr);
- return farr;
- }
-
- public IRemoteFile[] listRoots(IRemoteFileContext context, IProgressMonitor monitor) throws InterruptedException
- {
- IHostFile[] roots = null;
- try
- {
- roots = getRoots(monitor);
- }
- catch (SystemMessageException e)
- {
-
- }
- IRemoteFile[] results = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, null, roots);
- return results;
- }
-
-
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * specified.
- * @param file remote file that represents the file to be obtained
- * @param localpath the absolute path of the local file
- * @param encoding the encoding of the local file
- * @param monitor progress monitor
- */
- public void download(IRemoteFile file, String localpath, String encoding, IProgressMonitor monitor)
- {
- //Fixing bug 158534. TODO remove when bug 162688 is fixed.
- if (monitor==null) {
- monitor = new NullProgressMonitor();
- }
- String parentPath = file.getParentPath();
- File localFile = new File(localpath);
- try
- {
- getFileService().download(monitor, parentPath, file.getName(), localFile, isBinary(file), encoding);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- }
-
- if (monitor.isCanceled())
- {
- localFile.delete();
- }
- }
-
- protected boolean isBinary(String localEncoding, String hostEncoding, String remotePath)
- {
- boolean isText = !hostEncoding.equals(localEncoding) &&
- SystemFileTransferModeRegistry.getDefault().isText(remotePath) &&
- !SystemEncodingUtil.getInstance().isXML(remotePath) ;
- return !isText;
- }
-
- protected boolean isBinary(IRemoteFile source)
- {
- // if binary or XML file, transfer in binary mode
- if (source.isBinary() || SystemEncodingUtil.getInstance().isXML(source.getAbsolutePath()))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system
- * @param source the absolute path of the local copy
- * @param srcEncoding The encoding of the local copy
- * @param remotePath remote file that represents the file on the server
- * @param rmtEncoding The encoding of the remote file.
- */
- public void upload(String source, String srcEncoding, String remotePath, String rmtEncoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException {
- int slashIndex = remotePath.lastIndexOf(getSeparator());
- if (slashIndex > -1) {
- String remoteParentPath = remotePath.substring(0, slashIndex);
- String remoteFileName = remotePath.substring(slashIndex + 1, remotePath.length());
- boolean isBinary = isBinary(srcEncoding, rmtEncoding, remotePath);
- if (ArchiveHandlerManager.isVirtual(remotePath))
- {
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(remotePath);
- remoteParentPath = avp.getPath();
- remoteFileName = avp.getName();
- }
- try
- {
- getFileService().upload(monitor, new File(source), remoteParentPath, remoteFileName, isBinary, srcEncoding, rmtEncoding);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- }
- }
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system
- * @param source the absolute path of the local copy
- * @param destination location to copy to
- * @param encoding The encoding of the local copy
- * @param monitor progress monitor
- */
- public void upload(String source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- String remoteParentPath = destination.getParentPath();
- String remoteFileName = destination.getName();
- String hostEncoding = getRemoteEncoding(); // default host encoding
- boolean isBinary = isBinary(encoding, hostEncoding, destination.getAbsolutePath());
-
- if (!destination.canWrite())
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage("RSEF5003").makeSubstitution(remoteFileName, getHostName()); //$NON-NLS-1$
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.open();
- return;
- }
-
- try
- {
- getFileService().upload(monitor, new File(source), remoteParentPath, remoteFileName, isBinary, encoding, hostEncoding);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- }
- }
-
- public void upload(InputStream stream, long totalBytes, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- String remoteParentPath = destination.getParentPath();
- String remoteFileName = destination.getName();
- String hostEncoding = getRemoteEncoding(); // default host encoding
- boolean isBinary = isBinary(encoding, hostEncoding, destination.getAbsolutePath());
- try
- {
- getFileService().upload(monitor, stream, remoteParentPath, remoteFileName, isBinary, hostEncoding);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- }
- }
-
-
-
- public boolean copy(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- IFileService service = getFileService();
- try
- {
- return service.copy(monitor, sourceFolderOrFile.getParentPath(), sourceFolderOrFile.getName(), targetFolder.getAbsolutePath(), newName);
- }
- catch (SystemMessageException e)
- {
- Display dis = Display.getDefault();
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dis.syncExec(new SystemMessageDialogRunnable(dlg));
- }
- return false;
- }
-
- public boolean copyBatch(IRemoteFile[] sourceFolderOrFiles, IRemoteFile targetFolder, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- IFileService service = getFileService();
- String[] sourceParents = new String[sourceFolderOrFiles.length];
- String[] sourceNames = new String[sourceFolderOrFiles.length];
-
- for (int i = 0; i < sourceFolderOrFiles.length; i++)
- {
- sourceParents[i] = sourceFolderOrFiles[i].getParentPath();
- sourceNames[i] = sourceFolderOrFiles[i].getName();
- }
- try
- {
- return service.copyBatch(monitor, sourceParents, sourceNames, targetFolder.getAbsolutePath());
- }
- catch (SystemMessageException e)
- {
- Display dis = Display.getDefault();
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dis.syncExec(new SystemMessageDialogRunnable(dlg));
- }
- return false;
- }
-
- public IRemoteFile getParentFolder(IRemoteFile folderOrFile)
- {
- try
- {
- return getRemoteFileObject(folderOrFile.getParentPath());
- }
- catch (Exception e)
- {
- return null;
- }
- }
-
- public IRemoteFile createFile(IRemoteFile fileToCreate) throws RemoteFileSecurityException, RemoteFileIOException
- {
- IFileService service = getFileService();
- String parent = fileToCreate.getParentPath();
- String name = fileToCreate.getName();
- IHostFile newFile = null;
-
- try
- {
- newFile = service.createFile(monitor, parent, name);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- SystemMessageDialogRunnable runnable = new SystemMessageDialogRunnable(dlg);
- Display.getDefault().asyncExec(runnable);
-
- return null;
- }
- return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), fileToCreate.getParentRemoteFile(), newFile);
- }
-
- public IRemoteFile createFolder(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException
- {
- IFileService service = getFileService();
- String parent = folderToCreate.getParentPath();
- String name = folderToCreate.getName();
- IHostFile newFolder = null;
- try
- {
- newFolder = service.createFolder(monitor, parent, name);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- return null;
- }
- return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), folderToCreate.getParentRemoteFile(), newFolder);
- }
-
- public IRemoteFile createFolders(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException
- {
- return createFolder(folderToCreate);
- }
-
- public boolean delete(IRemoteFile folderOrFile, IProgressMonitor monitor) throws RemoteFolderNotEmptyException, RemoteFileSecurityException, RemoteFileIOException
- {
- boolean result = false;
- IFileService service = getFileService();
- String parent = folderOrFile.getParentPath();
- String name = folderOrFile.getName();
- try
- {
- result = service.delete(monitor, parent, name);
- folderOrFile.markStale(true);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- return false;
- }
- return result;
- }
-
- public boolean deleteBatch(IRemoteFile[] folderOrFiles, IProgressMonitor monitor) throws RemoteFolderNotEmptyException, RemoteFileSecurityException, RemoteFileIOException
- {
- boolean result = false;
- String[] parents = new String[folderOrFiles.length];
- String[] names = new String[folderOrFiles.length];
- for (int i = 0; i < folderOrFiles.length; i++)
- {
- parents[i] = folderOrFiles[i].getParentPath();
- names[i] = folderOrFiles[i].getName();
- folderOrFiles[i].markStale(true);
- //bug 162962: need to recursively remove children from cache
- removeCachedRemoteFile(folderOrFiles[i]);
- }
- IFileService service = getFileService();
- try
- {
- result = service.deleteBatch(monitor, parents, names);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- return false;
- }
- return result;
- }
-
- public boolean rename(IRemoteFile folderOrFile, String newName) throws RemoteFileSecurityException, RemoteFileIOException
- {
- boolean result = false;
- removeCachedRemoteFile(folderOrFile);
- IFileService service = getFileService();
- String srcParent = folderOrFile.getParentPath();
- String oldName = folderOrFile.getName();
- String newPath = srcParent + folderOrFile.getSeparator() + newName;
- try
- {
- result = service.rename(monitor, srcParent, oldName, newName);
- folderOrFile.getHostFile().renameTo(newPath);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- return false;
- }
- return result;
- }
-
- public boolean move(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- boolean result = false;
- IFileService service = getFileService();
- String srcParent = sourceFolderOrFile.getParentPath();
- String srcName = sourceFolderOrFile.getName();
- String tgtParent = targetFolder.getAbsolutePath();
- try
- {
- removeCachedRemoteFile(sourceFolderOrFile);
- result = service.move(monitor, srcParent, srcName, tgtParent, newName);
- sourceFolderOrFile.markStale(true);
- targetFolder.markStale(true);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), e.getSystemMessage());
- dlg.open();
- return false;
- }
- return result;
- }
-
-
- public boolean setLastModified(IRemoteFile folderOrFile, long newDate) throws RemoteFileSecurityException, RemoteFileIOException
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean setReadOnly(IRemoteFile folderOrFile) throws RemoteFileSecurityException, RemoteFileIOException
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public ILanguageUtilityFactory getLanguageUtilityFactory()
- {
- if (_languageUtilityFactory == null)
- {
- _languageUtilityFactory = ((IFileServiceSubSystemConfiguration)getParentRemoteFileSubSystemConfiguration()).getLanguageUtilityFactory(this);
- }
- return _languageUtilityFactory;
- }
-
- public void setLanguageUtilityFactory(ILanguageUtilityFactory factory)
- {
- _languageUtilityFactory = factory;
- }
-
- public void search(IHostSearchResultConfiguration searchConfig)
- {
- ISearchService searchService = getSearchService();
- if (searchService != null)
- {
- SearchJob job = new SearchJob(searchConfig, searchService, getFileService());
- job.schedule();
- }
- }
-
- public void cancelSearch(IHostSearchResultConfiguration searchConfig)
- {
- ISearchService searchService = getSearchService();
- if (searchService != null)
- {
- searchService.cancelSearch(null, searchConfig);
- }
- }
-
- public IHostSearchResultConfiguration createSearchConfiguration(IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString)
- {
- ISearchService searchService = getSearchService();
- if (searchService != null)
- {
- IFileServiceSubSystemConfiguration factory = (IFileServiceSubSystemConfiguration)getParentRemoteFileSubSystemConfiguration();
- if (factory != null)
- {
- return factory.createSearchConfiguration(getHost(), resultSet, searchTarget, searchString);
- }
- }
- return null;
- }
-
-
-
- /**
- * Switch to use another protocol
- */
- public void switchServiceFactory(IServiceSubSystemConfiguration fact)
- {
- if (fact != getSubSystemConfiguration() && fact instanceof IFileServiceSubSystemConfiguration)
- {
- IFileServiceSubSystemConfiguration factory = (IFileServiceSubSystemConfiguration)fact;
- try
- {
- _cachedRemoteFiles.clear();
- disconnect();
- }
- catch (Exception e)
- {
- }
-
- _languageUtilityFactory = null;
- IHost host = getHost();
- setSubSystemConfiguration(factory);
-
- IConnectorService oldConnectorService = getConnectorService();
- oldConnectorService.deregisterSubSystem(this);
-
- IConnectorService newConnectorService = factory.getConnectorService(host);
- setConnectorService(newConnectorService);
-
- oldConnectorService.commit();
- newConnectorService.commit();
-
- setName(factory.getName());
- setFileService(factory.getFileService(host));
- setHostFileToRemoteFileAdapter(factory.getHostFileAdapter());
- setSearchService(factory.getSearchService(host));
-
- }
- }
-
- public Class getServiceType()
- {
- return IFileService.class;
- }
-
- public void initializeSubSystem(IProgressMonitor monitor)
- {
- super.initializeSubSystem(monitor);
- getFileService().initService(monitor);
- }
-
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- super.uninitializeSubSystem(monitor);
- getFileService().uninitService(monitor);
- _userHome = null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystemConfiguration.java
deleted file mode 100644
index 0dee9969d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration;
-
-
-
-public abstract class FileServiceSubSystemConfiguration extends RemoteFileSubSystemConfiguration implements IFileServiceSubSystemConfiguration
-{
- private Map _services;
- private Map _searchServices;
-
- protected FileServiceSubSystemConfiguration()
- {
- super();
- _services = new HashMap();
- _searchServices = new HashMap();
- }
-
- public final Class getServiceType()
- {
- return IFileService.class;
- }
-
- public final IService getService(IHost host)
- {
- return getFileService(host);
- }
-
- public final IFileService getFileService(IHost host)
- {
- IFileService service = (IFileService)_services.get(host);
- if (service == null)
- {
- service = createFileService(host);
- _services.put(host, service);
- }
- return service;
- }
-
- public final ISearchService getSearchService(IHost host)
- {
- ISearchService service = (ISearchService)_searchServices.get(host);
- if (service == null)
- {
- service = createSearchService(host);
- _searchServices.put(host, service);
- }
- return service;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.model.IHost)
- */
- public final boolean supportsServerLaunchProperties(IHost host)
- {
- return getConnectorService(host).supportsServerLaunchProperties();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java
deleted file mode 100644
index 6e56d32c1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-
-
-public interface IFileServiceSubSystem extends IRemoteFileSubSystem, IServiceSubSystem
-{
-
- /**
- * Returns the file service used by this subsystem. By wrapping this service
- * we can easily share it among connections or subsystems if that is desired.
- * @return the file service wrapped by this subsystem.
- */
- public IFileService getFileService();
- public IHostFileToRemoteFileAdapter getHostFileToRemoteFileAdapter();
- public IHostSearchResultConfiguration createSearchConfiguration(IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString);
-
-
-
-} //DefaultFileSubSystem \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystemConfiguration.java
deleted file mode 100644
index 4e3856da3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-
-
-
-public interface IFileServiceSubSystemConfiguration extends IRemoteFileSubSystemConfiguration, IServiceSubSystemConfiguration
-{
- public IFileService getFileService(IHost host);
- public IFileService createFileService(IHost host);
- public IHostFileToRemoteFileAdapter getHostFileAdapter();
- public ISearchService getSearchService(IHost host);
- public ISearchService createSearchService(IHost host);
- public IHostSearchResultConfiguration createSearchConfiguration(IHost host, IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString);
- public ILanguageUtilityFactory getLanguageUtilityFactory(IRemoteFileSubSystem ss);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/OutputRefresh.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/OutputRefresh.java
deleted file mode 100644
index 4edce04d1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/OutputRefresh.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.search.IHostSearchConstants;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-public class OutputRefresh implements Runnable
-{
- private IHostSearchResultConfiguration searchConfig;
- private boolean isDone = false;
-
- public OutputRefresh(IHostSearchResultConfiguration searchConfig)
- {
- this.searchConfig = searchConfig;
- this.isDone = searchConfig.getStatus() == IHostSearchConstants.FINISHED;
- }
-
- public void run() {
-
- if (searchConfig != null)
- {
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(searchConfig, ISystemResourceChangeEvents.EVENT_REFRESH, null));
-
- if (isDone)
- {
- registry.fireEvent(new SystemResourceChangeEvent(searchConfig, ISystemResourceChangeEvents.EVENT_SEARCH_FINISHED, null));
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/SearchJob.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/SearchJob.java
deleted file mode 100644
index 9bdc97114..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/SearchJob.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.swt.widgets.Display;
-
-
-public class SearchJob extends Job
-{
- IHostSearchResultConfiguration _searchConfig;
- ISearchService _searchService;
- IFileService _fileService;
-
- public SearchJob(IHostSearchResultConfiguration searchConfig, ISearchService searchService, IFileService fileService)
- {
- super(SystemFileResources.RESID_JOB_SEARCH_NAME);
- _searchConfig = searchConfig;
- _searchService = searchService;
- _fileService = fileService;
- }
-
- protected IStatus run(IProgressMonitor monitor)
- {
- _searchService.search(monitor, _searchConfig, _fileService);
-
- OutputRefresh refresh = new OutputRefresh(_searchConfig);
- Display.getDefault().asyncExec(refresh);
- monitor.done();
- return Status.OK_STATUS;
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IHostFileToRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IHostFileToRemoteFileAdapter.java
deleted file mode 100644
index edf844d59..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IHostFileToRemoteFileAdapter.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-
-
-
-public interface IHostFileToRemoteFileAdapter
-{
- public IRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes);
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.java
deleted file mode 100644
index 830dc2608..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.java
+++ /dev/null
@@ -1,291 +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.subsystems.files.core.subsystems;
-import java.util.Date;
-
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IRemoteContainer;
-import org.eclipse.rse.core.subsystems.IRemotePropertyHolder;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-
-/**
- * This interface represents a handle to a remote file system object,
- * which is either a file or a folder. This interface is similar to
- * a java.io.File object, but with some significant differences:
- * <ul>
- * <li>This is an interface, so there are no static methods
- * <li>This represents a "handle" to the remote file or folder. For editing purposes,
- * you may want to manage a local copy of the remote file. The support
- * for this is captured in the child interface IRemoteEditableFile
- * <li>This are no action methods, only read methods. The action methods
- * such as delete and rename are found in the file subsystem interface.
- * All remote commands/actions are funnelled through subsystems in this
- * remote system framework.
- * <li>Similarly, the methods for listing objects are in IRemoteFileSubSystem, not here
- * <li>Similarly, the methods for return an IRemoteFile object of the parent folder or
- * root drive are in IRemoteFileSubSystem, not here.
- * <li>Similarly, you do not construct these objects directly. Rather, there are
- * factory methods in IRemoteFileSubSystem to create them.
- * <li>There is no relative names. All names are fully qualified, and include
- * the root, the path and the file name (unless this is a folder).
- * <li>There are additional methods for querying the root (ie, c:\) and the
- * parent directory (unqualified name of the parent directory).
- * </ul>
- * <p>
- * Note for subsystem providers: this method does not capture the set methods that the
- * RemoteFileImpl class defines. For that, cast to IRemoteFileMutable.
- */
-public interface IRemoteFile extends IRemoteContainer, IRemotePropertyHolder, ISchedulingRule
-{
- public static final char CONNECTION_DELIMITER = ':';
- public static final boolean ISROOT_YES = true;
- public static final boolean ISROOT_NO = false;
-
- /**
- * Querying properties for the property sheet can be expensive on some operating systems.
- * By default all properties are shown on the property sheet for this object, unless true
- * is returned from this query, in which only a couple properties are shown.
- */
- public boolean showBriefPropertySet();
- /**
- * Get parent subsystem
- */
- public IRemoteFileSubSystem getParentRemoteFileSubSystem();
- /**
- * Return the separator character for this file system: \ or /.
- * Queries it from the subsystem factory.
- */
- public char getSeparatorChar();
- /**
- * Return the separator character for this file system, as a string: "\" or "/".
- * Queries it from the subsystem factory.
- */
- public String getSeparator();
- /**
- * Return as a string the line separator for this file system
- * Queries it from the subsystem factory.
- */
- public String getLineSeparator();
- /**
- * Return the connection this remote file is from.
- */
- public IHost getSystemConnection();
- /**
- * Return the parent remote file object expanded to get this object, or null if no such parent
- */
- public IRemoteFile getParentRemoteFile();
- /**
- * Return the filter string resolved to get this object
- */
- public RemoteFileFilterString getFilterString();
- /**
- * If this is a folder, it is possible that it is listed as part of a multiple filter string
- * filter. In this case, when the folder is expanded, we want to filter the file names to
- * show all the files that match any of the filter strings that have the same parent path.
- * <p>
- * This method supports that by returning all the filter strings in the filter which have the
- * same parent path as was used to produce this file.
- */
- public RemoteFileFilterString[] getAllFilterStrings();
- /**
- * Get fully qualified name: root plus path plus name. No connection name.
- */
- public String getAbsolutePath();
- /**
- * Get fully qualified connection and file name: profile.connection\path\file.
- * Note the separator character between the profile name and the connection name is always '.'
- * Note the separator character between the connection and qualified-file is always ':'
- */
- public String getAbsolutePathPlusConnection();
-
- /**
- * Get the display name for this file. By default, this should be the same as the name
- * If this object represents only a root drive, this is the same as getRoot().
- */
- public String getLabel();
-
- /**
- * Get unqualified file name. No root and no path.
- * If this object represents only a root drive, this is the same as getRoot().
- */
- public String getName();
- /**
- * Get fully qualified path and name of folder containing this file or folder.
- * Returns the root and path. No file name, and no ending separator.
- * <p>
- * If this object represent only a root drive, this returns null;
- * <p>
- * Example: <code>c:\folder1\folder2\file1.ext</code> results in <code>c:\folder1\folder2</code>
- */
- public String getParentPath();
- /**
- * Get fully qualified path and name of folder containing this file or folder, minus the root.
- * Returns the path. No root prefix. No file name, and no ending separator.
- * <p>
- * If this object represent only a root drive, this returns null;
- * <p>
- * Example: <code>c:\folder1\folder2\file1.ext</code> results in <code>folder1\folder2</code>
- */
- public String getParentNoRoot();
- /**
- * Get the root part of the name.
- * <p>
- * <ul>
- * <li>Example: <code>c:\folder1\folder2\file1.ext</code> results in <code>c:\</code>
- * <li>Example: <code>/folder1/folder2/file1.ext</code> results in <code>/</code>
- * </ul>
- */
- public String getRoot();
- /**
- * Get the unqualified name of the parent directory containing this file or folder.
- * Compare this to getParent() that returns the fully qualified parent directory.
- * If this object represents only a root drive, this returns null.
- * <p>
- * Example: <code>c:\folder1\folder2\file1.ext</code> results in <code>folder2</code>
- */
- public String getParentName();
- /**
- * Return the extension part of a file name.
- * Eg, for abc.java, return "java"
- */
- public String getExtension();
- /**
- * Returns true if this represents a root folder (eg: c:\\ or /).
- */
- public boolean isRoot();
- /**
- * Returns true if this represents a folder (eg: c:\\folder)
- */
- public boolean isDirectory();
- /**
- * Returns true if this represents a file, versus a root or folder
- */
- public boolean isFile();
- /**
- * Returns true if this represents an archive file, versues a non-archive file
- */
- public boolean isArchive();
-
-
- /**
- * Returns true if this is a binary file
- */
- public boolean isBinary();
- /**
- * Returns true if this is a text file
- */
- public boolean isText();
- /**
- * Returns true if this is a hidden file.
- */
- public boolean isHidden();
- /**
- * Returns true if the application can read this file.
- */
- public boolean canRead();
- /**
- * Returns true if the application can write to this file.
- */
- public boolean canWrite();
-
- /**
- * Returns true if this folder or file actually exists.
- */
- public boolean exists();
- /**
- * Returns the time (in milliseconds since epoch) this file was last modified.
- */
- public long getLastModified();
- /**
- * Return the last modified time as a Date object.
- */
- public Date getLastModifiedDate() ;
- /**
- * Returns the length, in bytes, of this file.
- */
- public long getLength();
-
- /**
- * Returns true if the ReadOnly Property should be shown in the property page.
- */
- public boolean showReadOnlyProperty();
-
- // ==================================
- // for comparator interface...
- // ==================================
- /**
- * Compare one remote file to another. This enables us to sort the files so they
- * are shown folders-first, and in alphabetical order.
- */
- public int compareTo(Object other) throws ClassCastException;
-
- /**
- * Get the object.
- */
- public Object getFile();
-
- /**
- * Note: if this remoteFile is the same as the file passed
- * as parameter, then this method returns true.
- */
- public boolean isAncestorOf(IRemoteFile file);
-
- /**
- * Note: if this remoteFile is the same as the file passed
- * as parameter, then this method returns true.
- */
- public boolean isDescendantOf(IRemoteFile file);
-
- /**
- * @return Any comments stored with the file in the file system or archive.
- */
- public String getComment();
-
- /**
- * Returns the classification of this file. If the file is
- * an executable, then "executable(...)" will be returned. If the
- * file is a symbolic link then it will appear as "link(....):resolvedPath".
- * The resolvedPath is the path that the link resolves to.
- * A symbolic link that resolves to an executable would appear as "link(executable(...)):resolvedPath".
- * By default this should just return "file".
- * @return the classification.
- */
- public String getClassification();
-
- /**
- * Returns whether the file is executable or not.
- * @return <code>true</code> if the file is executable, <code>false</code> otherwise.
- */
- public boolean isExecutable();
-
- /**
- * Returns whether the file is a symbolic link or not.
- * @return <code>true</code> if the file is a symbolic link, <code>false</code> otherwise.
- */
- public boolean isLink();
-
- /**
- * Returns the canonical path of the remote file.
- * @return the resolved path if the file is a symbolic link, or
- */
- public String getCanonicalPath();
-
- public IHostFile getHostFile();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileContext.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileContext.java
deleted file mode 100644
index 2499c1353..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileContext.java
+++ /dev/null
@@ -1,68 +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.subsystems.files.core.subsystems;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-
-/**
- * This interface represents a place to hold contextual information stored within
- * each remote file object.
- * <p>
- * We store in here information that might be the same for multiple remote file objects,
- * in order to save memory. This way, we can merely hold a reference to a single object,
- * which itself may have numerous pieces of information helpful when processing actions
- * on a particular remote object.
- */
-public interface IRemoteFileContext
-{
-
- /**
- * Get parent subsystem
- */
- public IRemoteFileSubSystem getParentRemoteFileSubSystem();
- /**
- * Return the parent remote file object expanded to get this object, or null if no such parent
- */
- public IRemoteFile getParentRemoteFile();
- /**
- * Return the filter string used to resolve the list resulting in this remote object.
- */
- public RemoteFileFilterString getFilterString();
- /**
- * Return all the filter string objects applicable to this folder object.
- */
- public RemoteFileFilterString[] getAllFilterStrings();
-
- /**
- * Set parent subsystem
- */
- public void setParentRemoteFileSubSystem(IRemoteFileSubSystem parentSubSystem);
- /**
- * Set the parent remote file object expanded to get this object, or null if no such parent
- */
- public void setParentRemoteFile(IRemoteFile parentFile);
- /**
- * Set the filter string used to resolve the list resulting in this remote object.
- */
- public void setFilterString(RemoteFileFilterString filterString);
- /**
- * Add an additional filter string. This is called for folders in a multi-filter string
- * filter. It is called for each filter string that lists the contents of the same parent
- * path, when show subdirs is true. It is needed to support the subsequent expansion of
- * this subdirectory, so that it can filter on all the appropriate filter strings.
- */
- public void addFilterString(RemoteFileFilterString additionalFilterString);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionCodes.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionCodes.java
deleted file mode 100644
index 76edf2969..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionCodes.java
+++ /dev/null
@@ -1,27 +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.subsystems.files.core.subsystems;
-
-/**
- * Intended as a placeholder for all exception code constants
- */
-
-public interface IRemoteFileExceptionCodes {
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionMessages.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionMessages.java
deleted file mode 100644
index 6ff78c0e2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionMessages.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.subsystems.files.core.subsystems;
-/**
- * Keys into the core plugin's resource bundle for error messages related
- * to exceptions thrown by the remote file system framework.
- */
-public interface IRemoteFileExceptionMessages
-{
- //public static final String PLUGIN_ID ="org.eclipse.rse.systems";
- //public static final String PLUGIN_ID =ISystemMessages.PLUGIN_ID;
- // Message prefix
- //public static final String FILEMSG_PREFIX = PLUGIN_ID+".ui.filemsg.";
-
- // Messages
- public static final String FILEMSG_IO_ERROR = "RSEF1001";
- public static final String FILEMSG_SECURITY_ERROR = "RSEF1002";
-
- public static final String FILEMSG_FOLDER_NOTEMPTY = "RSEF1003";
- public static final String FILEMSG_FOLDER_NOTFOUND = "RSEF1004";
-
- public static final String FILEMSG_FILE_NOTFOUND = "RSEF1005";
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileFactory.java
deleted file mode 100644
index 44427c225..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileFactory.java
+++ /dev/null
@@ -1,42 +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.subsystems.files.core.subsystems;
-
-/**
- * This interface represents a handle to a remote file object,
- * which is either a universalFileSystem or an ifsFileSystem.
- */
-
-public interface IRemoteFileFactory
-{
-
- /**
- * Get the RemoteFile object
- */
- public IRemoteFile createRemoteFile(IRemoteFileContext context, Object obj, boolean isRoot);
-
- /**
- * Get the RemoteFile object when we know if it is a exists or not
- */
- public IRemoteFile createRemoteFile(IRemoteFileContext context, Object obj, boolean isRoot, boolean exists);
-
- /**
- * Get the RemoteFile object when we know if it is a exists or not and whether it is a directory or not
- */
- public IRemoteFile createRemoteFile(IRemoteFileContext context, Object obj, boolean isRoot, boolean exists, boolean isDir);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
deleted file mode 100644
index 6ef28becf..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
+++ /dev/null
@@ -1,707 +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.subsystems.files.core.subsystems;
-import java.io.File;
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.model.SystemRemoteResourceSet;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-
-
-//
-/**
- * Specialized interface for remote file subsystems.
- * <p>
- * These are unix/windows like file systems, versus native OS/400 or OS/390
- * file subsystems. Rather, it is more like the IFS and HFS systems on
- * these operating systems.
- * <p>
- * The idea is to encourage a common API and GUI layer that works
- * with any remote unix-like file system on any remote operating system.
- */
-/**
- * @lastgen interface RemoteFileSubSystem extends SubSystem {}
- */
-
-public interface IRemoteFileSubSystem extends ISubSystem{
-
- // ----------------------
- // HELPER METHODS...
- // ----------------------
-
- /**
- * Return parent subsystem factory, cast to a RemoteFileSubSystemConfiguration
- */
- public IRemoteFileSubSystemConfiguration getParentRemoteFileSubSystemConfiguration();
- /**
- * Return true if file names are case-sensitive. Used when doing name or type filtering
- */
- public boolean isCaseSensitive();
-
- // --------------------------------
- // FILE SYSTEM ATTRIBUTE METHODS...
- // --------------------------------
- /**
- * Return in string format the character used to separate folders. Eg, "\" or "/".
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getSeparator()
- */
- public String getSeparator();
-
- /**
- * Return in character format the character used to separate folders. Eg, "\" or "/"
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getSeparatorChar()
- */
- public char getSeparatorChar();
-
- /**
- * Return in string format the character used to separate paths. Eg, ";" or ":"
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getPathSeparator()
- */
- public String getPathSeparator();
-
- /**
- * Return in char format the character used to separate paths. Eg, ";" or ":"
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getPathSeparatorChar()
- */
- public char getPathSeparatorChar();
-
- /**
- * Return as a string the line separator.
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getLineSeparator()
- */
- public String getLineSeparator();
-
- // ----------------------
- // FILE SYSTEM METHODS...
- // ----------------------
-
- /**
- * Return a list of roots/drives on the remote system.
- * This version is called directly by users.
- */
- public IRemoteFile[] listRoots(IProgressMonitor monitor) throws InterruptedException, SystemMessageException;
- /**
- * Return a list of all remote folders in the given parent folder on the remote system
- * @param parent The parent folder to list folders in
- * @param monitor the progress monitor
- */
- public IRemoteFile[] listFolders(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a full list of remote folders in the given parent folder on the remote system.
- * @param parent The parent folder to list folders in
- * @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
- * @param monitor the progress monitor
- */
- public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of all remote files in the given parent folder on the remote system
- * @param parent The parent folder to list files in
- * @param monitor the progress monitor
- */
- public IRemoteFile[] listFiles(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote files in the given folder, which match the given name pattern.
- * @param parent The parent folder to list files in
- * @param fileNameFilter The name pattern to subset the list by, or null to return all files.
- * @param monitor the progress monitor
- */
- public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of all remote folders and files in the given folder. The list is not subsetted.
- * @param parent The parent folder to list folders and files in
- * @param monitor the progress monitor
- */
- public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote folders and files in the given folder. Only file names are subsettable
- * by the given file name filter. It can be null for no subsetting.
- * @param parent The parent folder to list folders and files in
- * @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
- * @param monitor the progress monitor
- */
- public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote folders and files in the given folder.
- * <p>
- * The files part of the list is subsetted by the given file name filter.
- * It can be null for no subsetting.
- * This version is called by RemoteFileSubSystemImpl's resolveFilterString(s).
- * @param parent The parent folder to list folders and files in
- * @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
- * @param context The holder of state information
- * @param monitor the progress monitor
- */
- public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a subsetted list of remote folders in the given parent folder on the remote system.
- * This version is called by RemoteFileSubSystemImpl's resolveFilterString(s)
- * <b>note</b>This method should be abstract but MOF doesn't allow abstract impl classes at this point
- * @param parent The parent folder to list folders in
- * @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
- * @param context The holder of state information
- * @param monitor the progress monitor
- */
- public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote files in the given folder, which match the given name pattern.
- * This version is called by RemoteFileSubSystemImpl's resolveFilterString(s)
- * <b>note</b>This method should be abstract but MOF doesn't allow abstract impl classes at this point
- * @param parent The parent folder to list files in
- * @param fileNameFilter The name pattern to subset the list by, or null to return all files.
- * @param context The holder of state information
- * @param monitor the progress monitor
- */
- public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, IProgressMonitor monitor) throws SystemMessageException;
- /**
- * Given a search configuration, searches for its results.
- * @param searchConfig a search configuration.
- */
- public void search(IHostSearchResultConfiguration searchConfig);
-
- /**
- * Given a search configuration, cancel the search.
- * @param searchConfig a search configuration.
- */
- public void cancelSearch(IHostSearchResultConfiguration searchConfig);
-
-
- /**
- * Given a folder or file, return its parent folder object.
- * @param folderOrFile folder or file to return parent of.
- */
- public IRemoteFile getParentFolder(IRemoteFile folderOrFile);
-
- /**
- * Given a folder or file, return its parent folder name, fully qualified
- * @param folderOrFile folder or file to return parent of.
- */
- public String getParentFolderName(IRemoteFile folderOrFile);
-
- /**
- * Get the default encoding of the target system
- * @return the encoding
- */
- public String getRemoteEncoding();
-
- /**
- * Given a set of fully qualified file or folder names, return an ISystemResourceSet object for it.
- * @param folderOrFileNames Fully qualified folder or file names
- */
- public SystemRemoteResourceSet getRemoteFileObjects(List folderOrFileNames) throws SystemMessageException;
-
- /**
- * Given a fully qualified file or folder name, return an IRemoteFile object for it.
- * @param folderOrFileName Fully qualified folder or file name
- */
- public IRemoteFile getRemoteFileObject(String folderOrFileName) throws SystemMessageException;
-
- /**
- * Given a un-qualified file or folder name, and its parent folder object,
- * return an IRemoteFile object for the file.
- * @param parent Folder containing the folder or file
- * @param folderOrFileName Un-qualified folder or file name
- */
- public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName) throws SystemMessageException;
-
- /**
- * Given a key, returns a search result object for it. For the key, see <
- * @param key the key that uniquely identifies a search result.
- */
- public IRemoteSearchResult getRemoteSearchResultObject(String key) throws SystemMessageException;
-
- /**
- * Create a new file, given its IRemoteFile object (these do not have to represent existing files).
- * <p>
- * <ul>
- * <li>The parent folder must exist for this to succeed.
- * <li>If this file already exists, this is a no-op.
- * <li>If the given object is a folder, not a file, this is a no-op.
- * </ul>
- *
- * @see #createFolders(IRemoteFile)
- *
- * @param fileToCreate The object representing the file to be created.
- * @return The same input object returned for convenience. Will throw exception if it fails.
- */
- public IRemoteFile createFile(IRemoteFile fileToCreate) throws RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Create a new folder, given its IRemoteFile object (these do not have to represent existing folders)
- * <p>
- * <ul>
- * <li>The parent folder must exist for this to succeed.
- * <li>If this folder already exists, this is a no-op.
- * <li>If the given object is a file, not a folder, this is a no-op.
- * </ul>
- *
- * @see #createFolders(IRemoteFile)
- *
- * @param folderToCreate The object representing the folder to be created.
- * @return The same input object returned for convenience. Will throw exception if it fails.
- */
- public IRemoteFile createFolder(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Given an IRemoteFile for a folder, this will create that folder and any missing parent folders in its path.
- * Use getParentFolder to get the parent object of your file or folder in order to call this method.
- * <p>
- * <ul>
- * <li>If this folder already exists, this is a no-op.
- * <li>If the given object is a file, not a folder, this is a no-op.
- * </ul>
- *
- * @see #getParentFolder(IRemoteFile)
- *
- * @param folderToCreate The object representing the folder to be created, along with its parents.
- * @return The same input object returned for convenience. Will throw exception if it fails.
- */
- public IRemoteFile createFolders(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
-
- /**
- * Delete the given remote file or folder.
- * <ul>
- * <li>If the input is a folder, that folder must be empty for this to succeed.
- * </ul>
- *
- * @param folderOrFile represents the object to be deleted.
- * @param monitor progressMonitor
- * @return false if the given folder/file didn't exist to begin with, else true. Throws an exception if anything fails.
- */
- public boolean delete(IRemoteFile folderOrFile, IProgressMonitor monitor) throws RemoteFolderNotEmptyException, RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Delete the given batch of remote file or folder.
- * <ul>
- * <li>If any of the inputs are a folder, those folders must be empty for this to succeed.
- * </ul>
- * Should throw an exception if some files and folders were deleted and others were not due to an exception during the operation.
- * Without an exception thrown in such cases, views may not be refreshed correctly to account for deleted resources.
- * @param folderOrFiles represents the objects to be deleted.
- * @param monitor progressMonitor
- * @return false if any of the given folder/file dont exist to begin with, else true. Throws an exception if anything fails.
- */
- public boolean deleteBatch(IRemoteFile[] folderOrFiles, IProgressMonitor monitor) throws RemoteFolderNotEmptyException, RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Rename the given remote file or folder. This renames it in memory and, iff it exists, on disk.
- * @param folderOrFile represents the object to be renamed.
- * @param newName new name to give it.
- * @return false if the given folder/file didn't exist on disk (still renamed in memory), else true. Throws an exception if anything fails.
- */
- public boolean rename(IRemoteFile folderOrFile, String newName) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Move a file or folder to a new target parent folder.
- *
- * @param sourceFolderOrFile The file or folder to move
- * @param targetFolder The folder to move to. No guarantee it is on the same system, so be sure to check getSystemConnection()!
- * @param newName The new name for the moved file or folder
- * @param monitor progress monitor
- * @return false true iff the move succeeded
- */
- public boolean move(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName,IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Set the last modified date for the given file or folder. Like a Unix "touch" operation.
- * Folder or file must exist on disk for this to succeed.
- *
- * @param folderOrFile represents the object to be renamed.
- * @param newDate new date, in milliseconds from epoch, to assign.
- * @return false if the given folder/file didn't exist on disk (operation fails), else true. Throws an exception if anything fails.
- */
- public boolean setLastModified(IRemoteFile folderOrFile, long newDate) throws RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Set a file to readonly.
- * Folder or file must exist on disk for this to succeed.
- *
- * @param folderOrFile represents the object to be renamed.
- * @return false if the given folder/file didn't exist on disk (operation fails), else true. Throws an exception if anything fails.
- */
- public boolean setReadOnly(IRemoteFile folderOrFile) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- // ----------------------------
- // METHODS FOR FILE TRANSFER...
- // ----------------------------
-
- // Beginning of methods for downloading remote files from the server
-
- /**
- * Copy a file or folder to a new target parent folder.
- *
- * @param sourceFolderOrFile The file or folder to copy
- * @param targetFolder The folder to copy to. No guarantee it is on the same system, so be sure to check getSystemConnection()!
- * @param newName The new name for the copied file or folder
- * @return false true iff the copy succeeded
- */
- public boolean copy(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Copy a set of remote files or folders to a new target parent folder. Precondition: Sources and target must all be on the same system!
- *
- * @param sourceFolderOrFiles The file or folder to copy
- * @param targetFolder The folder to copy to.
- * @return false true iff all copies succeeded
- */
- public boolean copyBatch(IRemoteFile[] sourceFolderOrFile, IRemoteFile targetFolder, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * of the operating system. Two exceptions: if the remote file is binary, encoding does not apply.
- * If the remote file is a XML file, then it will be copied to local in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source remote file that represents the file to be obtained
- * @param destination the absolute path of the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, String destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * specified. Two exceptions: if the remote file is binary, encoding does not apply.
- * If the remote file is a XML file, then it will be copied to local in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source remote file that represents the file to be obtained
- * @param destination the absolute path of the local file
- * @param encoding the encoding of the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, String destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Get the remote file and save it locally. The file is saved in UTF-8 encoding.
- * Two exceptions: if the remote file is binary, encoding does not apply.
- * If the remote file is a XML file, then it will be copied to local in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * This is a recommended method to use for file transfer.
- * @param source remote file that represents the file to be obtained
- * @param destination the absolute path of the local file
- * @param monitor the progress monitor
- */
- public void downloadUTF8(IRemoteFile source, String destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * of the operating system. Two exceptions: if the remote file is binary, encoding does not apply.
- * If the remote file is a XML file, then it will be copied to local in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, File destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * specified. Two exceptions: if the remote file is binary, encoding does not apply.
- * If the remote file is a XML file, then it will be copied to local in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param encoding the encoding of the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, File destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Get the remote file and save it locally. The file is saved in UTF-8 encoding.
- * Two exceptions: if the remote file is binary, encoding does not apply.
- * If the remote file is a XML file, then it will be copied to local in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * This is a recommended method to use for file transfer.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param monitor the progress monitor
- */
- public void downloadUTF8(IRemoteFile source, File destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * of the operating system. Two exceptions: if the remote file is binary, encoding does not apply.
- * If the remote file is a XML file, then it will be copied to local in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, IFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * specified. Two exceptions: if the remote file is binary, encoding does not apply.
- * If the remote file is a XML file, then it will be copied to local in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param encoding the encoding of the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, IFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Get the remote file and save it locally. The file is saved in UTF-8 encoding.
- * Two exceptions: if the remote file is binary, encoding does not apply.
- * If the remote file is a XML file, then it will be copied to local in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * This is a recommended method to use for file transfer.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param monitor the progress monitor
- */
- public void downloadUTF8(IRemoteFile source, IFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
- // End of methods to download remote files from the server
-
-
- // Beginning of methods to upload local files to the server
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the absolute path of the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void upload(String source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding specified.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the absolute path of the local copy
- * @param destination remote file that represents the file on the server
- * @param encoding the encoding of the local copy
- * @param monitor the progress monitor
- */
- public void upload(String source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Put local data to a remote location. The local data is assumed to be in the encoding specified.
- * @param stream the input stream containing the local data.
- * @param totalBytes the total number of bytes in the stream, or -1 if unknown. If -1 is specified, then the progress monitor must be <code>null</code>.
- * @param destination remote file that represents the file on the server.
- * @param encoding the encoding of the local data, or <code>null</code> to specify binary.
- * @param monitor the progress monitor.
- * @throws RemoteFileSecurityException
- * @throws RemoteFileIOException
- */
- public void upload(InputStream stream, long totalBytes, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the absolute path of the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void upload(String source, String destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the absolute path of the local copy
- * @param srcEncoding the encoding of the local copy
- * @param remotePath remote file that represents the file on the server
- * @param rmtEncoding the encoding of the remote file.
- */
- public void upload(String source, String srcEncoding, String remotePath, String rmtEncoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
- /**
- * Put the local copy of the remote file back to the remote location. The local file
- * must be in UTF-8 encoding.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the absolute path of the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void uploadUTF8(String source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void upload(File source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding specified.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param encoding the encoding of the local copy
- * @param monitor the progress monitor
- */
- public void upload(File source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Put the local copy of the remote file back to the remote location. The local file
- * must be in UTF-8 encoding.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void uploadUTF8(File source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void upload(IFile source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding specified
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param encoding the encoding of the local copy
- * @param monitor the progress monitor
- */
- public void upload(IFile source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * Put the local copy of the remote file back to the remote location. The local file
- * must be in UTF-8 encoding.
- * Two exceptions: if the local file is binary, encoding does not apply.
- * If the local file is a XML file, then it will be copied to remote in the encoding
- * specified in the XML declaration, or as determined from the XML specification.
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void uploadUTF8(IFile source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException;
-
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the HomeFolder attribute
- */
- String getHomeFolder();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value The new value of the HomeFolder attribute
- */
- void setHomeFolder(String value);
-
- /**
- * Returns a language utility factory associated with this subsystem.
- * @return the language utility factory associated with this subsystem.
- */
- public ILanguageUtilityFactory getLanguageUtilityFactory();
-
- /**
- * Returns an unused port number on the remote host that could be used
- * by any tool on the host.
- * @return an unused port number on the host, or -1 if none could be found.
- */
- public int getUnusedPort();
-
-
- /**
- * Return a list of roots/drives on the remote system.
- * This version is called by RemoteFileSubSystemImpl's resolveFilterString(s)
- * <b>note</b>This method should be abstract but MOF doesn't allow abstract impl classes at this point
- */
- public IRemoteFile[] listRoots(IRemoteFileContext context, IProgressMonitor monitor) throws InterruptedException;
-
- /**
- * Returns the TCP/IP address for the local system that is accessible from
- * the remote server. If the local system has multiple IP addresses (because of multiple
- * network cards or VPN), then this will return the address that the remote system
- * can use to "call back" to the PC. There must be a network connection between the local
- * system and the remote system for this method to work. If no network connection exists,
- * then this method returns <code>null</code>.
- *
- * @return the local TCP/IP address accessible from the remote system, or <code>null</code> if
- * no address can be resolved.
- */
- public InetAddress getLocalAddress();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystemConfiguration.java
deleted file mode 100644
index 7a6a3c097..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,111 +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.subsystems.files.core.subsystems;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFileName;
-import org.eclipse.rse.ui.validators.ValidatorFolderName;
-
-
-//
-/**
- * Specialization for file subsystem factories.
- */
-/**
- * @lastgen interface RemoteFileSubSystemConfiguration extends SubSystemConfiguration {}
- */
-
-public interface IRemoteFileSubSystemConfiguration extends ISubSystemConfiguration
-{
- /**
- * Return true if subsystems of this factory support the environment variables property.
- * Return true to show it, return false to hide it.
- */
- public boolean supportsEnvironmentVariablesPropertyPage();
-
- /**
- * Return true if subsystems for this configuration support search functionality.
- * @return true if search is supported
- */
- public boolean supportsSearch();
-
- /**
- * Return true if subsystems for this configuration support archive management.
- * @return true if archive management is supported
- */
- public boolean supportsArchiveManagement();
-
- /**
- * Tell us if this is a unix-style file system or a windows-style file system. The
- * default is windows.
- * Child classes must call this, so we know how to respond to separator and path-separator requests.
- */
- public boolean isUnixStyle();
- /**
- * Tell us if this file system is case sensitive. The default is isUnixStyle(), and so should
- * rarely need to be overridden.
- */
- public boolean isCaseSensitive();
-
- // --------------------------------
- // VALIDATOR METHODS...
- // --------------------------------
- /**
- * Return validator used in filter string dialog for the path part of the filter string
- */
- public ISystemValidator getPathValidator();
- /**
- * Return validator used in filter string dialog for the file part of the filter string
- */
- public ISystemValidator getFileFilterStringValidator();
- /**
- * Return validator used when creating or renaming files
- */
- public ValidatorFileName getFileNameValidator();
- /**
- * Return validator used when creating or renaming folders
- */
- public ValidatorFolderName getFolderNameValidator();
- // --------------------------------
- // FILE SYSTEM ATTRIBUTE METHODS...
- // --------------------------------
- /**
- * Return in string format the character used to separate folders. Eg, "\" or "/"
- */
- public String getSeparator();
- /**
- * Return in character format the character used to separate folders. Eg, "\" or "/"
- */
- public char getSeparatorChar();
- /**
- * Return in string format the character used to separate paths. Eg, ";" or ":"
- */
- public String getPathSeparator();
- /**
- * Return in char format the character used to separate paths. Eg, ";" or ":"
- */
- public char getPathSeparatorChar();
- /**
- * Return as a string the line separator.
- */
- public String getLineSeparator();
- /**
- * Return the default remote systems editor profile ID for files on this subsystem
- */
- public String getEditorProfileID();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileWrapper.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileWrapper.java
deleted file mode 100644
index d169156e8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileWrapper.java
+++ /dev/null
@@ -1,23 +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.subsystems.files.core.subsystems;
-public interface IRemoteFileWrapper
-{
-
-
- IRemoteFile getRemoteFile();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchConstants.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchConstants.java
deleted file mode 100644
index 0131361dc..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchConstants.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-public interface IRemoteSearchConstants {
-
- /**
- * Status indicating configuration is still running, 0.
- */
- public static final int RUNNING = 0;
-
- /**
- * Status indicating configuration has finished, 1.
- */
- public static final int FINISHED = 1;
-
- /**
- * Status indicating configuration has been cancelled, 2.
- */
- public static final int CANCELLED = 2;
-
- /**
- * Status indicating configuration has been disconnected, 3.
- */
- public static final int DISCONNECTED = 3;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchResult.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchResult.java
deleted file mode 100644
index 5571a7855..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchResult.java
+++ /dev/null
@@ -1,78 +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.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.core.subsystems.IRemoteLineReference;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.search.IHostSearchResult;
-
-
-/**
- * This interface represents a handle to a search result.
- */
-public interface IRemoteSearchResult extends IRemoteLineReference, IHostSearchResult
-{
-
-
-
-
- /**
- * Gets the text to display for a search result.
- * @return the text.
- */
- public String getText();
-
- /**
- * Gets the index of this search result in the context of its parent.
- * @return the index.
- */
- public int getIndex();
-
- /**
- * Gets the search string that this result matches.
- * @return the search string.
- */
- public SystemSearchString getMatchingSearchString();
-
- /**
- * Add a match to the result. A match comprises a char start offset and a char end offset, both
- * relative to the beginning of the file. The matches are added in order.
- * @param startOffset the char start offset, from the beginning of the file.
- * @param endOffset the char end offset, from the beginning of the file.
- */
- public void addMatch(int startOffset, int endOffset);
-
- /**
- * Gets the number of matches in this line.
- * @return the number of matches.
- */
- public int numOfMatches();
-
- /**
- * Gets the char start offset for the given match index.
- * @param matchIndex the match index. For example, to get the start offset for the first match, specify 0.
- * @return the char start offset.
- */
- public int getCharStart(int matchIndex);
-
- /**
- * Gets the char end offset for the given match index.
- * @param matchIndex the match index. For example, to get the end offset for the first match, specify 0.
- * @return the char end offset.
- */
- public int getCharEnd(int matchIndex);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IVirtualRemoteFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IVirtualRemoteFile.java
deleted file mode 100644
index da721c093..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IVirtualRemoteFile.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-public interface IVirtualRemoteFile extends IRemoteFile
-{
- public String getVirtualName();
- public boolean isVirtualFolder();
- public boolean isVirtualFile();
- public String getComment();
- public long getCompressedSize();
- public String getCompressionMethod();
- public double getCompressionRatio();
- public long getExpandedSize();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java
deleted file mode 100644
index b81ada9e1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java
+++ /dev/null
@@ -1,1145 +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.subsystems.files.core.subsystems;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemContentsType;
-import org.eclipse.rse.core.subsystems.IRemoteContainer;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.services.clientserver.StringComparePatternMatcher;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * A remote file represents a named file on a remote file system. This class
- * works with remote file names that do not include the preceding "<connectionName/subsystemName>"
- * prefix. Such ultimately-qualified names are known as IRemoteFilePath names.
- * <p>
- * Base parent class that supplies all of the
- * functionality required by the IRemoteFile interface.
- * <p>
- * This base functionality is possible because this is a
- * read-only representation of a remote file ... all actions
- * like delete and rename are handled by the subsystem.
- * <p>
- * For all this base functionality to work, the subsystem
- * that creates this object must call the setter methods to
- * prefill this object with the core required information:
- * <ul>
- * <li>{@link #RemoteFileImpl(IRemoteFileContext)} constructor sets the parent subsystem
- * <li>{@link #setAbsolutePath(String, String, boolean, boolean)} to set core attributes
- * <li>{@link #setExists(boolean)} to set existence attribute
- * <li>{@link #setLastModified(long)} to set last-modified date
- * <li>{@link #setLength(long)} to set length in bytes
- * </ul>
- */
-public abstract class RemoteFile implements IRemoteFile, IAdaptable, Comparable, Cloneable
-{
-
-
- protected IRemoteFileContext _context;
- protected String fullyQualifiedName;
-
- protected String _label;
- protected Object remoteObj;
- protected IRemoteFile _parentFile;
-
- /* Archived file properties */
- // DKM - let's get rid of these fields
- // - they should now be in IHostfile
- protected boolean isContainer = false;
-
- // master hash map
- protected HashMap _contents = new HashMap();
-
- /* container properties */
- protected boolean _isStale = false;
-
- // properties
- protected HashMap properties = new HashMap();
- protected HashMap propertyStates = new HashMap();
-
- /**
- * Constructor that takes a context object containing important information.
- * @param context An object holding contextual information about this object
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext
- */
- public RemoteFile(IRemoteFileContext context)
- {
- this._context = context;
- if ((context!=null) && (context.getParentRemoteFileSubSystem()!=null) &&
- !context.getParentRemoteFileSubSystem().isConnected())
- try
- {
- // deduce active shell from display
- context.getParentRemoteFileSubSystem().connect();
- } catch (Exception exc) {}
- }
-
-
- /**
- * Set the filter string resolved to get this object
- */
- public void setFilterString(RemoteFileFilterString filterString)
- {
- _context.setFilterString(filterString);
- }
-
-
- public void setLabel(String newLabel)
- {
- _label = newLabel;
- }
-
-
- // ------------------------------------------------------------------------
- // GETTER METHODS. ALL FULLY IMPLEMENTED ASSUMING SETTERS HAVE BEEN CALLED.
- // ------------------------------------------------------------------------
-
- /**
- * Return the context associated with this remote file
- */
- public IRemoteFileContext getContext()
- {
- return _context;
- }
-
- /**
- * Return the parent subsystem
- */
- public IRemoteFileSubSystem getParentRemoteFileSubSystem()
- {
- return _context.getParentRemoteFileSubSystem();
- }
- /**
- * Return the parent subsystem factory
- */
- public IRemoteFileSubSystemConfiguration getParentRemoteFileSubSystemConfiguration()
- {
- IRemoteFileSubSystem ss = _context.getParentRemoteFileSubSystem();
- if (ss == null)
- return null;
- else
- return ss.getParentRemoteFileSubSystemConfiguration();
- }
-
- public void setParentRemoteFile(IRemoteFile parentFile)
- {
- this._parentFile = parentFile;
- }
-
- /**
- * Return the parent remote file object expanded to get this object, or null if no such parent
- */
- public IRemoteFile getParentRemoteFile()
- {
- if (this._parentFile == null)
- {
- if (isRoot())
- {
- return null;
- }
-
- IRemoteFile parentFile = null;
-
-// _context.getParentRemoteFile();
-
- String pathOnly = getParentPath();
- if ((parentFile == null) && (pathOnly != null))
- {
- IRemoteFileSubSystem ss = _context.getParentRemoteFileSubSystem();
- if (ss != null)
- {
- try {
- char sep = getSeparatorChar();
- if (pathOnly.length() == 0)
- parentFile = ss.getRemoteFileObject(pathOnly);
- else if (pathOnly.length() == 1)
- parentFile = null;
- else if (!(pathOnly.charAt(pathOnly.length()-1)==sep))
- parentFile = ss.getRemoteFileObject(pathOnly+sep);
- else
- parentFile = ss.getRemoteFileObject(pathOnly);
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError("RemoteFileImpl.getParentRemoteFile()", e);
- }
- }
- }
- else if (parentFile != null)
- {
- }
- else
- {
- }
- this._parentFile = parentFile;
- }
- return this._parentFile;
- }
- /**
- * Return the filter string resolved to get this object
- */
- public RemoteFileFilterString getFilterString()
- {
- return _context.getFilterString();
- }
- /**
- * If this is a folder, it is possible that it is listed as part of a multiple filter string
- * filter. In this case, when the folder is expanded, we want to filter the file names to
- * show all the files that match any of the filter strings that have the same parent path.
- * <p>
- * This method supports that by returning all the filter strings in the filter which have the
- * same parent path as was used to produce this file.
- */
- public RemoteFileFilterString[] getAllFilterStrings()
- {
- return _context.getAllFilterStrings();
- }
- /**
- * Return the separator character for this file system: \ or /.
- * Queries it from the subsystem factory.
- */
- public char getSeparatorChar()
- {
- IRemoteFileSubSystemConfiguration ssf = getParentRemoteFileSubSystemConfiguration();
- if (ssf != null)
- return ssf.getSeparatorChar();
- else
- return java.io.File.separatorChar;
- }
- /**
- * Return the separator character for this file system, as a string: "\" or "/".
- * Queries it from the subsystem factory.
- */
- public String getSeparator()
- {
- IRemoteFileSubSystemConfiguration ssf = getParentRemoteFileSubSystemConfiguration();
- if (ssf != null)
- return ssf.getSeparator();
- else
- return java.io.File.separator;
- }
- /**
- * Return as a string the line separator character values
- */
- public String getLineSeparator()
- {
- IRemoteFileSubSystemConfiguration ssf = getParentRemoteFileSubSystemConfiguration();
- if (ssf != null)
- return ssf.getLineSeparator();
- else
- return System.getProperty("line.separator"); //$NON-NLS-1$
- }
- /**
- * Return if this is a file on Unix, versus windows say
- * Queries it from the subsystem factory.
- */
- public boolean isUnix()
- {
- IRemoteFileSubSystemConfiguration ssf = getParentRemoteFileSubSystemConfiguration();
- if (ssf != null)
- return ssf.isUnixStyle();
- else
- return System.getProperty("os.name").toLowerCase().startsWith("windows"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public boolean isLink()
- {
- String classifyString = getClassification();
-
- if (classifyString == null)
- {
- return false;
- }
- else if (classifyString.indexOf("symbolic link") > -1) //$NON-NLS-1$
- {
- return true;
- }
- return false;
- }
-
-
- public boolean isExecutable()
- {
- String classifyString = getClassification();
-
- if (classifyString == null)
- {
- return false;
- }
- else if (classifyString.indexOf("executable") > -1) //$NON-NLS-1$
- {
- return true;
- }
- return false;
- }
-
-
- public boolean isArchive()
- {
- File file = new File(getAbsolutePath());
- return ArchiveHandlerManager.getInstance().isArchive(file);
- }
-
- /**
- * Return the connection this remote file is from.
- */
- public IHost getSystemConnection()
- {
- IRemoteFileSubSystem ss = _context.getParentRemoteFileSubSystem();
- if (ss == null)
- return null;
- else
- return ss.getHost();
- }
-
- /**
- * @see IRemoteFile#getAbsolutePath()
- */
- public String getAbsolutePath()
- {
- return fullyQualifiedName;
- }
- /**
- * Get fully qualified connection and file name: connection:\path\file
- * Note the separator character between the profile name and the connection name is always '.'
- * Note the separator character between the connection and qualified-file is always ':'
- */
- public String getAbsolutePathPlusConnection()
- {
- IHost conn = getSystemConnection();
- if (conn == null)
- return getAbsolutePath();
- else
- return conn.getSystemProfileName()+'.'+conn.getAliasName() + CONNECTION_DELIMITER + getAbsolutePath();
- }
-
- /**
- * @see IRemoteFile#getLabel()
- */
- public String getLabel()
- {
- if (_label != null)
- {
- return _label;
- }
- return getName();
- }
-
-
- /**
- * @see IRemoteFile#isBinary()
- */
- public boolean isBinary()
- {
- if (isDirectory())
- return false;
- else
- return SystemFileTransferModeRegistry.getDefault().isBinary(this);
- }
-
- /**
- * @see IRemoteFile#isText()
- */
- public boolean isText()
- {
- if (isDirectory())
- return false;
- else
- return SystemFileTransferModeRegistry.getDefault().isText(this);
- }
-
-
-
-
- /**
- * @see IRemoteFile#getLastModifiedDate()
- */
- public Date getLastModifiedDate()
- {
- return new Date(getLastModified());
- }
-
-
- /**
- * Return the extension part of a file name.
- * Eg, for abc.java, return "java"
- */
- public String getExtension()
- {
- String nameOnly = getName();
- if (nameOnly == null)
- return null;
- int idx = nameOnly.lastIndexOf('.');
- if (idx >= 0)
- return nameOnly.substring(idx+1);
- return null; // TODO - why null?
- }
-
-
- /**
- * Return the cached copy of this remote file. The returned IFile must be used for read-only
- * purposes since no locks are acquired on the remote file.
- *
- * @return IFile The cached copy of this file if it exists AND it is upto date. null is returned if a local
- * cached copy of this file is not available or the local cached copy is not upto date (last modified
- * timestamp comparison.)
- */
-// FIXME - core and ui separate now (editor is ui)
-// public IFile getCachedCopy() throws SystemMessageException
-// {
-// if (SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist())
-// {
-// IResource replica = UniversalFileTransferUtility.getTempFileFor(this);
-// if (replica != null && replica.exists())
-// {
-// return (IFile)replica;
-// }
-// }
-// return null;
-// }
-
- // -----------------------
- // HOUSEKEEPING METHODS...
- // -----------------------
- public String toString()
- {
- return getName();
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- * <p>
- * By default this returns Platform.getAdapterManager().getAdapter(this, adapterType);
- * This in turn results in the default subsystem adapter SystemViewSubSystemAdapter,
- * in package org.eclipse.rse.ui.view.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- // -------------------------------
- // java.util.Comparable methods...
- // -------------------------------
- /**
- * Compare one remote file to another. This enables us to sort the files so they
- * are shown folders-first, and in alphabetical order.
- */
- public int compareTo(Object other) throws ClassCastException
- {
- IRemoteFile otherFile = (IRemoteFile)other;
- if (isDirectory() && !otherFile.isDirectory())
- return -1; // we are a folder so we are less than a file
- else if (!isDirectory() && otherFile.isDirectory())
- return 1; // we are a file so we are more than a folder
- String comp1 = getName();
-
- String comp2 = otherFile.getName();
- if (comp2 == null)
- comp2 = otherFile.getParentPath();
- return comp1.toLowerCase().compareTo(comp2.toLowerCase());
- }
-
- // ==================================
- // for a proxy mimicing java.io.File
- // ==================================
-
- public void setFile (Object obj)
- {
- remoteObj = obj;
- }
-
- public Object getFile()
- {
- return remoteObj;
- }
-
- public boolean isAncestorOf(IRemoteFile file)
- {
- String separator = this.getSeparator();
- if (this instanceof IVirtualRemoteFile) separator = "/"; //$NON-NLS-1$
- if (this.isArchive()) separator = ArchiveHandlerManager.VIRTUAL_SEPARATOR;
-
- return file.getAbsolutePathPlusConnection().startsWith(this.getAbsolutePathPlusConnection() + separator);
- }
-
- public boolean isDescendantOf(IRemoteFile file)
- {
- String separator = file.getSeparator();
- if (this instanceof IVirtualRemoteFile) separator = "/"; //$NON-NLS-1$
- if (file.isArchive()) separator = ArchiveHandlerManager.VIRTUAL_SEPARATOR;
-
- return this.getAbsolutePathPlusConnection().startsWith(file.getAbsolutePathPlusConnection() + separator);
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#hasContents(java.lang.String)
- */
- public boolean hasContents(ISystemContentsType contentsType)
- {
- boolean result = _contents.containsKey(contentsType);
-
-// KM: comment out this code to prevent us picking up wrong cache
-// KM: defect 45072
-// if (!result)
-// {
-// if (contentsType == RemoteFileChildrenContentsType.getInstance())
-// {
-// return hasContents(RemoteChildrenContentsType.getInstance());
-// }
-// else if (contentsType == RemoteFolderChildrenContentsType.getInstance())
-// {
-// return hasContents(RemoteChildrenContentsType.getInstance());
-// }
-// }
-
- return result;
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#hasContents(java.lang.String, java.lang.String)
- */
- public boolean hasContents(ISystemContentsType contentsType, String filter) {
- HashMap filters = (HashMap)(_contents.get(contentsType));
-
- if (filters == null) {
- return false;
- }
-
- if (filter == null) {
- filter = "*"; //$NON-NLS-1$
- }
-
- boolean result = containsFilterKey(filters, filter);
-
-// KM: comment out this code to prevent us picking up wrong cache
-// KM: defect 45072
-// if (!result)
-// {
-// if (contentsType == RemoteFileChildrenContentsType.getInstance())
-// {
-// return hasContents(RemoteChildrenContentsType.getInstance(), filter);
-// }
-// else if (contentsType == RemoteFolderChildrenContentsType.getInstance())
-// {
-// return hasContents(RemoteChildrenContentsType.getInstance(), filter);
-// }
-// }
-
- return result;
- }
-
- protected boolean containsFilterKey(HashMap filters, String filter)
- {
- if (filters.containsKey(filter))
- {
- return true;
- }
- else
- {
-
- Set keySet = filters.keySet();
- Object[] keyArray = keySet.toArray();
- for (int i = 0; i < keyArray.length; i++)
- {
- String key = (String)keyArray[i];
- StringComparePatternMatcher matcher = new StringComparePatternMatcher(key);
- if (matcher.stringMatches(filter))
- {
- return true;
- }
- /*
- StringComparePatternMatcher matcher = new StringComparePatternMatcher(filter);
- if (matcher.stringMatches(key))
- {
- return true;
- }
- */
- }
- }
- return false;
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#getContents(java.lang.String)
- */
- public Object[] getContents(ISystemContentsType contentsType)
- {
- return getContents(contentsType, "*"); //$NON-NLS-1$
- }
-
- private Object[] combineAndFilterHidden(Object[] set1, Object[] set2)
- {
- boolean showHidden = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.SHOWHIDDEN);
- ArrayList result = new ArrayList(set1.length + set2.length);
- for (int i = 0; i < set1.length; i++)
- {
- if (set1[1] instanceof IRemoteFile)
- {
- if (showHidden)
- {
- result.add(set1[i]);
- }
- else
- {
- if (!((IRemoteFile)set1[i]).isHidden())
- {
- result.add(set1[i]);
- }
- }
- }
- else
- {
- result.add(set1[i]);
- }
- }
- for (int j = 0; j < set2.length; j++)
- {
- if (set2[j] instanceof IRemoteFile)
- {
- if (showHidden)
- {
- result.add(set2[j]);
- }
- else
- {
- if (!((IRemoteFile)set2[j]).isHidden())
- {
- result.add(set2[j]);
- }
- }
- }
- else
- {
- result.add(set2[j]);
- }
- }
- return result.toArray(new IRemoteFile[result.size()]);
- }
-
- private Object[] filterHidden(Object[] set, boolean checkInstanceOf)
- {
- boolean showHidden = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.SHOWHIDDEN);
- ArrayList result = new ArrayList(set.length);
- for (int i = 0; i < set.length; i++)
- {
- if (set[i] instanceof IRemoteFile)
- {
- if (showHidden)
- {
- result.add(set[i]);
- }
- else
- {
- if (!checkInstanceOf || set[i] instanceof IRemoteFile)
- {
- if (!((IRemoteFile)set[i]).isHidden())
- {
- result.add(set[i]);
- }
- }
- }
- }
-
-
- }
- return result.toArray(new IRemoteFile[result.size()]);
- }
-
- private Object[] getFiles(Object[] filesAndFolders)
- {
- List results = new ArrayList();
- for (int i = 0; i < filesAndFolders.length; i++)
- {
- IRemoteFile fileOrFolder = (IRemoteFile)filesAndFolders[i];
- boolean supportsArchiveManagement = fileOrFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- if (fileOrFolder.isFile() || (fileOrFolder.isArchive() && supportsArchiveManagement))
- {
- results.add(fileOrFolder);
- }
- }
- return results.toArray();
- }
-
- private Object[] getFolders(Object[] filesAndFolders)
- {
- List results = new ArrayList();
- for (int i = 0; i < filesAndFolders.length; i++)
- {
- IRemoteFile fileOrFolder = (IRemoteFile)filesAndFolders[i];
- boolean supportsArchiveManagement = fileOrFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- if (!fileOrFolder.isFile() || (fileOrFolder.isArchive() && supportsArchiveManagement))
- {
- results.add(fileOrFolder);
- }
- }
- return results.toArray();
- }
-
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#getContents(java.lang.String, java.lang.String)
- */
- public Object[] getContents(ISystemContentsType contentsType, String filter)
- {
- HashMap filters = (HashMap)(_contents.get(contentsType));
-
- if (filters == null || filters.isEmpty())
- {
- if (contentsType == RemoteChildrenContentsType.getInstance())
- {
- if (hasContents(RemoteFileChildrenContentsType.getInstance()) && hasContents(RemoteFolderChildrenContentsType.getInstance()))
- {
- // implies both files and folders
- Object[] folders = getContents(RemoteFolderChildrenContentsType.getInstance(), filter);
- Object[] files = getContents(RemoteFileChildrenContentsType.getInstance(), filter);
-
- return combineAndFilterHidden(folders, files);
- }
- }
- else if (contentsType == RemoteFileChildrenContentsType.getInstance())
- {
- if (hasContents(RemoteChildrenContentsType.getInstance()))
- {
- Object[] filesAndFolders = getContents(RemoteChildrenContentsType.getInstance());
- return filterHidden(getFiles(filesAndFolders), false);
- }
- }
- else if (contentsType == RemoteFolderChildrenContentsType.getInstance())
- {
- if (hasContents(RemoteChildrenContentsType.getInstance()))
- {
- Object[] filesAndFolders = getContents(RemoteChildrenContentsType.getInstance());
- return filterHidden(getFolders(filesAndFolders), false);
- }
- }
- return null;
- }
-
- if (filter == null) {
- filter = "*"; //$NON-NLS-1$
- }
-
- if (filters.containsKey(filter))
- {
- Object[] filterResults = (Object[])filters.get(filter);
- if (contentsType == RemoteChildrenContentsType.getInstance() ||
- contentsType == RemoteFileChildrenContentsType.getInstance() ||
- contentsType == RemoteFolderChildrenContentsType.getInstance()
- )
- {
- return filterHidden(filterResults, true);
- }
- else
- {
- return filterResults;
- }
- }
-
- ArrayList calculatedResults = new ArrayList();
-
-
- StringComparePatternMatcher fmatcher = new StringComparePatternMatcher(filter);
-
- // the filter may be a subset of existing filters
- Object[] keySet = filters.keySet().toArray();
-
- for (int i = 0; i < keySet.length; i++) {
-
- String key = (String)keySet[i];
-
- // KM: we need to match with the key to ensure that the filter is a subset
- StringComparePatternMatcher matcher = new StringComparePatternMatcher(key);
-
- if (matcher.stringMatches(filter))
- {
- // get all children, i.e. the superset
- Object[] all = (Object[])filters.get(key);
-
- if (all != null) {
-
- for (int s = 0; s < all.length; s++) {
-
- Object subContent = all[s];
-
- if (!calculatedResults.contains(subContent))
- {
- if (subContent instanceof IRemoteFile)
- {
- // match with the filter to take out those that do not match the filter
- if (fmatcher.stringMatches(((IRemoteFile)subContent).getName()))
- {
- calculatedResults.add(subContent);
- }
- }
- else
- {
- calculatedResults.add(subContent);
- }
- }
- }
- }
- }
- }
-
- return calculatedResults.toArray();
- }
-
-
-
- public void setIsContainer(boolean con) {
- isContainer = con;
- }
-
- /*
- * Replace occurrences of cached object with new object
- */
- public void replaceContent(Object oldObject, Object newObject)
- {
- HashMap filters = (HashMap)(_contents.get(RemoteChildrenContentsType.getInstance()));
- if (filters != null)
- {
- Collection values = filters.values();
- Object[] valuesArray = values.toArray();
- for (int i = 0; i < valuesArray.length; i++)
- {
- Object[] children = (Object[])valuesArray[i];
- for (int j = 0; j < children.length; j++)
- {
- if (children[j]== oldObject)
- {
- children[j]= newObject;
- }
- }
- }
- }
- }
-
-
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#setContents(java.lang.String, java.lang.String, java.lang.Object[])
- */
- public void setContents(ISystemContentsType contentsType, String filter, Object[] con) {
-
- if (filter == null) {
- filter = "*"; //$NON-NLS-1$
- }
-
- // DKM - consider all containers so that we can tell if an empty one
- // has been queried before (i.e. via IRemoteFile[0] as it's contents vs null)
-// if (con != null && con.length > 0)
- {
- isContainer = true;
- }
-
- HashMap filters = (HashMap)(_contents.get(contentsType));
-
- if (filters == null)
- {
- filters = new HashMap();
- }
-
- if (isContainer)
- {
- filters.put(filter, con);
- _contents.put(contentsType, filters);
- }
-
- // set parent folders
- if (isContainer && con != null)
- {
- for (int i = 0; i < con.length; i++)
- {
- if (con[i] instanceof RemoteFile)
- {
- RemoteFile rFile = (RemoteFile)con[i];
- rFile.setParentRemoteFile(this);
- }
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#isStale()
- */
- public boolean isStale()
- {
- return _isStale || !exists();
- }
-
-
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#markStale(boolean)
- */
- public void markStale(boolean isStale)
- {
- markStale(isStale, true);
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#markStale(boolean)
- */
- public void markStale(boolean isStale, boolean clearCache)
- {
- _isStale = isStale;
-
- if (isStale && clearCache)
- {
-
- Iterator iter = _contents.keySet().iterator();
-
- while (iter.hasNext()) {
- Object contentsType = iter.next();
- if (contentsType instanceof ISystemContentsType)
- {
- if (!((ISystemContentsType)contentsType).isPersistent())
- {
- HashMap filters = (HashMap)(_contents.get(contentsType));
-
- if (filters != null)
- {
- filters.clear();
- }
- }
- }
- }
-
- IRemoteFile parent = getParentRemoteFile();
- if (parent != null)
- {
- parent.markStale(isStale, false);
- }
- }
- }
-
- public void copyContentsTo(IRemoteContainer target)
- {
- Iterator iter = _contents.keySet().iterator();
-
- while (iter.hasNext())
- {
- Object contentsType = iter.next();
- if (contentsType instanceof ISystemContentsType)
- {
- ISystemContentsType ct = (ISystemContentsType)contentsType;
- if (ct.isPersistent())
- {
- HashMap filters = (HashMap)(_contents.get(ct));
-
- Iterator fiter = filters.keySet().iterator();
-
- while (fiter.hasNext())
- {
- Object filter = fiter.next();
- Object fcontents = filters.get(filter);
- if (fcontents != null && fcontents instanceof Object[])
- {
- target.setContents(ct, (String)filter, (Object[])fcontents);
- }
- }
- }
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemotePropertyHolder#getProperties(java.lang.String[])
- */
- public Object[] getProperties(String[] keys) {
-
- Object[] values = new Object[keys.length];
-
- for (int i = 0; i < keys.length; i++) {
- values[i] = properties.get(keys[i]);
- }
-
- return values;
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemotePropertyHolder#getProperty(java.lang.String)
- */
- public Object getProperty(String key) {
- return properties.get(key);
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemotePropertyHolder#isPropertyStale(java.lang.String)
- */
- public boolean isPropertyStale(String key) {
-
- Boolean b = (Boolean)(propertyStates.get(key));
-
- if (b == null) {
- return false;
- }
- else {
- return b.booleanValue();
- }
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemotePropertyHolder#markAllPropertiesStale()
- */
- public void markAllPropertiesStale() {
- Iterator iter = propertyStates.keySet().iterator();
-
- while (iter.hasNext()) {
- String key = (String)(iter.next());
- markPropertyStale(key);
- }
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemotePropertyHolder#markPropertyStale(java.lang.String)
- */
- public void markPropertyStale(String key) {
- propertyStates.put(key, Boolean.FALSE);
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemotePropertyHolder#setProperties(java.lang.String[], java.lang.Object[])
- */
- public void setProperties(String[] keys, Object[] values) {
-
- for (int i = 0; i < keys.length; i++) {
- setProperty(keys[i], values[i]);
- }
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemotePropertyHolder#setProperty(java.lang.String, java.lang.Object)
- */
- public void setProperty(String key, Object value) {
- properties.put(key, value);
- propertyStates.put(key, Boolean.TRUE);
- }
-
- public String getComment()
- {
- return ""; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- * @see ISchedulingRule#contains(ISchedulingRule)
- */
- public boolean contains(ISchedulingRule rule) {
- if (this == rule)
- return true;
- if (rule instanceof MultiRule) {
- MultiRule multi = (MultiRule) rule;
- ISchedulingRule[] children = multi.getChildren();
- for (int i = 0; i < children.length; i++)
- if (!contains(children[i]))
- return false;
- return true;
- }
- if (rule instanceof IResource)
- return true;
- if (rule instanceof IRemoteFile)
- {
- RemoteFile rf = (RemoteFile)rule;
- return getHostName().equals(rf.getHostName()) &&
- rf.getAbsolutePath().startsWith(getAbsolutePath());
- }
- //if (!(rule instanceof RemoteFileSchedulingRule))
- // return false;
- if (rule instanceof RemoteFileSchedulingRule)
- {
- return getHostName().equals(((RemoteFileSchedulingRule) rule).getHostName()) &&
- ((RemoteFileSchedulingRule) rule).getAbsolutePath().startsWith(getAbsolutePath());
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see ISchedulingRule#isConflicting(ISchedulingRule)
- */
- public boolean isConflicting(ISchedulingRule rule)
- {
- if (rule instanceof RemoteFile)
- {
- String otherPath = ((RemoteFile)rule).getAbsolutePath();
- String path = this.getAbsolutePath();
- String otherHost = ((RemoteFile)rule).getHostName();
- return getHostName().equals(otherHost) && path.startsWith(otherPath) || otherPath.startsWith(path);
- }
- else if (rule instanceof RemoteFileSchedulingRule)
- {
- String otherPath = ((RemoteFileSchedulingRule) rule).getAbsolutePath();
- String path = this.getAbsolutePath();
- String otherHost = ((RemoteFileSchedulingRule) rule).getHostName();
- return getHostName().equals(otherHost) && path.startsWith(otherPath) || otherPath.startsWith(path);
- }
- else
- {
- return false;
- }
- }
-
- public boolean equals(Object otherObj)
- {
- if (otherObj instanceof RemoteFile)
- {
- RemoteFile other = (RemoteFile)otherObj;
- if (this == other) return true;
-
- String otherPath = other.getAbsolutePath();
- String path = this.getAbsolutePath();
- String otherHost = other.getHostName();
-
- String alias1 = this.getParentRemoteFileSubSystem().getHostAliasName();
- String alias2 = other.getParentRemoteFileSubSystem().getHostAliasName();
-
- //return getHostName().equals(otherHost) && path.equals(otherPath);
- return alias1.equals(alias2) && path.equals(otherPath);
- }
- else
- {
- return false;
- }
- }
-
- public String getHostName()
- {
- return getSystemConnection().getHostName();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileChildrenContentsType.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileChildrenContentsType.java
deleted file mode 100644
index 993474161..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileChildrenContentsType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.core.model.ISystemContentsType;
-
-/**
- * Represents contents that are children of a container
- */
-public class RemoteFileChildrenContentsType implements ISystemContentsType
-{
- public static String CONTENTS_TYPE_CHILDREN = "contents_file_children"; //$NON-NLS-1$
- public static RemoteFileChildrenContentsType _instance = new RemoteFileChildrenContentsType();
-
- public static RemoteFileChildrenContentsType getInstance()
- {
- return _instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_CHILDREN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContentsType#isPersistent()
- */
- public boolean isPersistent()
- {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileCodeException.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileCodeException.java
deleted file mode 100644
index 596e30f8d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileCodeException.java
+++ /dev/null
@@ -1,99 +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.subsystems.files.core.subsystems;
-
-/**
- * This exception class should be used to return exception codes to
- * clients. Codes can be either integers or strings, or both may be
- * used at the same time for better subclassing of similar errors that
- * occur due to slightly different reasons.
- */
-
-public class RemoteFileCodeException extends Exception {
-
-
-
- private int code;
- private String codeString;
-
-
- /**
- * Constructor for RemoteFileCodeException
- */
- public RemoteFileCodeException() {
- super();
- }
-
-
- /**
- * Constructor for RemoteFileCodeException
- */
- public RemoteFileCodeException(int code) {
- this.code = code;
- }
-
-
- /**
- * Constructor for RemoteFileCodeException
- */
- public RemoteFileCodeException(String codeString) {
- this.codeString = codeString;
- }
-
-
- /**
- * Constructor for RemoteFileCodeException
- */
- public RemoteFileCodeException(int code, String codeString) {
- this.code = code;
- this.codeString = codeString;
- }
-
-
- /**
- * Set the error code
- * @param the error code
- */
- public void setErrorCode(int code) {
- this.code = code;
- }
-
-
- /**
- * Get the error code
- * @return the error code that was set
- */
- public int getErrorCode() {
- return code;
- }
-
-
- /**
- * Set the error code string
- */
- public void setErrorCodeString(String codeString) {
- this.codeString = codeString;
- }
-
-
- /**
- * Get the error code string
- */
- public String getErrorCodeString() {
- return codeString;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileContext.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileContext.java
deleted file mode 100644
index b4789a902..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileContext.java
+++ /dev/null
@@ -1,149 +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.subsystems.files.core.subsystems;
-import java.util.Vector;
-
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-
-/**
- * This interface represents a place to hold contextual information stored within
- * each remote file object.
- * <p>
- * We store in here information that might be the same for multiple remote file objects,
- * in order to save memory. This way, we can merely hold a reference to a single object,
- * which itself may have numerous pieces of information helpful when processing actions
- * on a particular remote object.
- */
-public class RemoteFileContext implements IRemoteFileContext
-{
-
- protected IRemoteFileSubSystem subsystem;
- protected IRemoteFile parentFile;
- protected RemoteFileFilterString filterString;
- protected Vector allFilterStrings;
-
- /**
- * Constructor that takes all inputs.
- */
- public RemoteFileContext(IRemoteFileSubSystem subsystem, IRemoteFile parentFileObject,
- RemoteFileFilterString filterString)
- {
- this.subsystem = subsystem;
- this.parentFile = parentFileObject;
- this.filterString = filterString;
- }
- /**
- * Constructor that takes no inputs.
- */
- public RemoteFileContext()
- {
- }
-
- // ------------------------------------------------------------------------
- // SETTER METHODS...
- // ------------------------------------------------------------------------
- /**
- * Set the parent subsystem
- */
- public void setParentRemoteFileSubSystem(IRemoteFileSubSystem subsystem)
- {
- this.subsystem = subsystem;
- }
- /**
- * Set the parent remote file object expanded to get this object
- */
- public void setParentRemoteFile(IRemoteFile parentFileObject)
- {
- this.parentFile = parentFileObject;
- }
- /**
- * Set the filter string object resolved to get this object
- */
- public void setFilterString(RemoteFileFilterString filterString)
- {
- this.filterString = filterString;
- allFilterStrings = null;
- }
- /**
- * Add an additional filter string. This is called for folders in a multi-filter string
- * filter. It is called for each filter string that lists the contents of the same parent
- * path, when show subdirs is true. It is needed to support the subsequent expansion of
- * this subdirectory, so that it can filter on all the appropriate filter strings.
- */
- public void addFilterString(RemoteFileFilterString additionalFilterString)
- {
- if (allFilterStrings == null)
- {
- allFilterStrings = new Vector();
- if (filterString != null)
- allFilterStrings.addElement(filterString);
- }
- // ensure this filter string is not already in the list...
- boolean match = false;
- String newfs = additionalFilterString.toString();
- for (int idx=0; !match && (idx<allFilterStrings.size()); idx++)
- {
- RemoteFileFilterString prevfs = (RemoteFileFilterString)allFilterStrings.elementAt(idx);
- if (newfs.equals(prevfs.toString()))
- match = true;
- }
- if (!match)
- allFilterStrings.addElement(additionalFilterString);
- }
-
- // ------------------------------------------------------------------------
- // GETTER METHODS...
- // ------------------------------------------------------------------------
-
- /**
- * Return the parent subsystem
- */
- public IRemoteFileSubSystem getParentRemoteFileSubSystem()
- {
- return subsystem;
- }
- /**
- * Return the parent remote file object expanded to get this object, or null if no such parent
- */
- public IRemoteFile getParentRemoteFile()
- {
- return parentFile;
- }
- /**
- * Return the filter string object resolved to get this object
- */
- public RemoteFileFilterString getFilterString()
- {
- return filterString;
- }
- /**
- * Return all the filter string objects applicable to this folder object.
- */
- public RemoteFileFilterString[] getAllFilterStrings()
- {
- if (allFilterStrings == null)
- return new RemoteFileFilterString[] {filterString};
- else
- {
- RemoteFileFilterString[] all = new RemoteFileFilterString[allFilterStrings.size()];
- for (int idx=0; idx<all.length; idx++)
- all[idx] = (RemoteFileFilterString)allFilterStrings.elementAt(idx);
- return all;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEmpty.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEmpty.java
deleted file mode 100644
index 0f1029d57..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEmpty.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.services.files.IHostFile;
-
-
-/**
- * A "dummy" node to use as a place holder
- */
-public class RemoteFileEmpty extends RemoteFile
-{
-
-
- /**
- * Constructor for RemoteFileEmptyImpl
- */
- public RemoteFileEmpty()
- {
- super(new RemoteFileContext(null,null,null));
- }
-
-
-
- public String getName()
- {
- return "dummy";
- }
-
-
- public int compareTo(Object o)
- {
- // TODO Auto-generated method stub
- return 0;
- }
-
-
- public boolean isVirtual()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public boolean showBriefPropertySet()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public String getParentPath()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- public String getParentNoRoot()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- public String getRoot()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- public String getParentName()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- public boolean isRoot()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public boolean isDirectory()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public boolean isFile()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public boolean isHidden()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public boolean canRead()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public boolean canWrite()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public boolean exists()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public long getLastModified()
- {
- // TODO Auto-generated method stub
- return 0;
- }
-
-
-
- public long getLength()
- {
- // TODO Auto-generated method stub
- return 0;
- }
-
-
-
- public boolean showReadOnlyProperty()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-
- public String getClassification()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- public String getCanonicalPath()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- public IHostFile getHostFile()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileRoot.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileRoot.java
deleted file mode 100644
index 009b8633e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileRoot.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.services.files.IHostFile;
-
-/**
- * A root node used to drive a CheckboxTreeAndListGroup, or any viewer which
- * takes a root which should return a single IRemoteFile object in the initial
- * getChildren query.
- */
-public class RemoteFileRoot extends RemoteFile
-{
- private IRemoteFile rootFile;
- private IRemoteFile[] rootFiles;
-
- /**
- * Constructor when root is known
- */
- public RemoteFileRoot(IRemoteFile rootFile)
- {
- super(new RemoteFileContext(null,null,null));
- }
- /**
- * Constructor when root is not known
- */
- public RemoteFileRoot()
- {
- super(new RemoteFileContext(null,null,null));
- }
-
- /**
- * Return the root file node
- */
- public IRemoteFile getRootFile()
- {
- return rootFile;
- }
-
- /**
- * Reset the root file node
- */
- public void setRootFile(IRemoteFile rootFile)
- {
- this.rootFile = rootFile;
- rootFiles = new IRemoteFile[1];
- rootFiles[0] = rootFile;
- }
-
- /**
- * Return the root file node as an array of 1
- */
- public IRemoteFile[] getRootFiles()
- {
- return rootFiles;
- }
-
- public String getName()
- {
- return "dummy";
- }
-
- public int compareTo(Object o)
- {
- // TODO Auto-generated method stub
- return 0;
- }
- public boolean isVirtual()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public boolean showBriefPropertySet()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public String getParentPath()
- {
- // TODO Auto-generated method stub
- return null;
- }
- public String getParentNoRoot()
- {
- // TODO Auto-generated method stub
- return null;
- }
- public String getRoot()
- {
- // TODO Auto-generated method stub
- return null;
- }
- public String getParentName()
- {
- // TODO Auto-generated method stub
- return null;
- }
- public boolean isRoot()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public boolean isDirectory()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public boolean isFile()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public boolean isHidden()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public boolean canRead()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public boolean canWrite()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public boolean exists()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public long getLastModified()
- {
- // TODO Auto-generated method stub
- return 0;
- }
- public long getLength()
- {
- // TODO Auto-generated method stub
- return 0;
- }
- public boolean showReadOnlyProperty()
- {
- // TODO Auto-generated method stub
- return false;
- }
- public String getClassification()
- {
- // TODO Auto-generated method stub
- return null;
- }
- public String getCanonicalPath()
- {
- // TODO Auto-generated method stub
- return null;
- }
- public IHostFile getHostFile()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSchedulingRule.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSchedulingRule.java
deleted file mode 100644
index 696d3488b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSchedulingRule.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-
-
-public class RemoteFileSchedulingRule implements ISchedulingRule
-{
- private IRemoteFile _file;
-
- public RemoteFileSchedulingRule(IRemoteFile file)
- {
- _file = file;
- }
-
- /*
- * (non-Javadoc)
- * @see ISchedulingRule#contains(ISchedulingRule)
- */
- public boolean contains(ISchedulingRule rule) {
- if (this == rule)
- return true;
- if (rule instanceof MultiRule) {
- MultiRule multi = (MultiRule) rule;
- ISchedulingRule[] children = multi.getChildren();
- for (int i = 0; i < children.length; i++)
- if (!contains(children[i]))
- return false;
- return true;
- }
- if (!(rule instanceof RemoteFileSchedulingRule))
- return false;
- return getHostName().equals(((RemoteFileSchedulingRule) rule).getHostName()) &&
- ((RemoteFileSchedulingRule) rule).getAbsolutePath().startsWith(getAbsolutePath());
- }
-
- /* (non-Javadoc)
- * @see ISchedulingRule#isConflicting(ISchedulingRule)
- */
- public boolean isConflicting(ISchedulingRule rule)
- {
- if (!(rule instanceof RemoteFileSchedulingRule))
- return false;
- String otherPath = ((RemoteFileSchedulingRule) rule).getAbsolutePath();
- String path = this.getAbsolutePath();
- String otherHost = ((RemoteFileSchedulingRule) rule).getHostName();
- return getHostName().equals(otherHost) && path.startsWith(otherPath) || otherPath.startsWith(path);
- }
-
- public String getAbsolutePath()
- {
- return _file.getAbsolutePath();
- }
-
- public String getHostName()
- {
- return _file.getSystemConnection().getHostName();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java
deleted file mode 100644
index a3e6fd115..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java
+++ /dev/null
@@ -1,1761 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 162962 - recursive removeCachedRemoteFile()
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-// copy all the following imports to your child class...
-// remote system framework packages...
-
-import java.io.BufferedReader;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.SystemChildrenContentsType;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IRemoteContainer;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.model.SystemRemoteResourceSet;
-import org.eclipse.rse.services.clientserver.FileTypeMatcher;
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.IMatcher;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.propertypages.SystemSubSystemPropertyPageCore;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-
-/**
- * Specialization for file subsystem factories.
- * It is subclassed via use of a Rose model and MOF/EMF, or better yet
- * by subclassing {@link org.eclipse.rse.core.servicesubsystem.impl.FileServiceSubSystem}.
- * <p>
- * For your convenience, there is built-in name filtering support. To use it,
- * call:
- * <ul>
- * <li>{@link #setListValues(int, String)} or {@link #setListValues(int, String, String)} to set the filter criteria
- * <li>{@link #accept(String, boolean)} to test a given name for a match
- * </ul>
- *
- * <p>This class returns instances of {@link RemoteFile} objects.
- */
-
-public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFileSubSystem, ICommunicationsListener
-{
- /**
- * The default value of the '{@link #getHomeFolder() <em>Home Folder</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHomeFolder()
- * @generated
- * @ordered
- */
- protected static final String HOME_FOLDER_EDEFAULT = null;
-
- public boolean osVarsSet, osWindows, osWindows95, osWindowsNT;
- public String osName, osCmdShell;
- // variables to affect the list method for subsetting folder contents
- private int includeFilesOrFolders = IClientServerConstants.INCLUDE_ALL;
- //private NamePatternMatcher matcher = null;
- protected IMatcher matcher = null;
- protected NamePatternMatcher folderNameMatcher = null;
- protected RemoteFileFilterString currFilterString = null;
- protected RemoteFileFilterString FILTERSTRING_LISTROOTS = null;
- protected RemoteFileContext DEFAULT_CONTEXT = null;
- protected RemoteFileContext DEFAULT_CONTEXT_NOFILTERSTRING = null;
-
- protected ArrayList _searchHistory;
-
- // all created IRemoteFiles mapped in cache to quick retreival
- protected HashMap _cachedRemoteFiles = new HashMap();
-
- protected IProgressMonitor monitor;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String homeFolder = HOME_FOLDER_EDEFAULT;
- /**
- * Default constructor. Do not call directly! Rather, use the mof generated factory method to create.
- * After instantiation, be sure to call {@link #setSubSystemConfiguration(ISubSystemConfiguration)}.
- */
- public RemoteFileSubSystem(IHost host, IConnectorService connectorService)
- {
- super(host, connectorService);
- _searchHistory = new ArrayList();
- }
- /**
- * @return true if this subsystem's properties should take precedence
- * over other subsystems that share the same {@link IConnectorService}
- */
- public boolean isPrimarySubSystem()
- {
- return true;
- }
-
- /**
- * Return parent subsystem factory, cast to a RemoteFileSubSystemConfiguration
- * Assumes {@link #setSubSystemConfiguration(ISubSystemConfiguration)} has already been called.
- */
- public IRemoteFileSubSystemConfiguration getParentRemoteFileSubSystemConfiguration()
- {
- return (IRemoteFileSubSystemConfiguration) super.getSubSystemConfiguration();
- }
-
- /**
- * Return true if file names are case-sensitive. Used when doing name or type filtering
- * Default is false, but can be overridden.
- */
- public boolean isCaseSensitive()
- {
- return false;
- }
-
- /**
- * Long running list processing calls this method to check for a user-cancel event.
- * If user did cancel, an exception is thrown.
- * @return true if caller wants to cancel
- */
- public boolean checkForCancel()
- {
- if ((monitor != null) && monitor.isCanceled())
- throw new OperationCanceledException(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED).getLevelOneText());
- return false;
- }
-
- protected RemoteFileFilterString getCurrentFilterString()
- {
- RemoteFileFilterString crffs = currFilterString;
- currFilterString = null;
- return crffs;
- }
-
- protected RemoteFileFilterString getFilterStringListRoots()
- {
- if (FILTERSTRING_LISTROOTS == null)
- FILTERSTRING_LISTROOTS = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
- return FILTERSTRING_LISTROOTS;
- }
- protected RemoteFileContext getDefaultContext()
- {
- if (DEFAULT_CONTEXT == null)
- DEFAULT_CONTEXT = new RemoteFileContext(this, null, getFilterStringListRoots());
- return DEFAULT_CONTEXT;
- }
- protected RemoteFileContext getDefaultContextNoFilterString()
- {
- if (DEFAULT_CONTEXT_NOFILTERSTRING == null)
- DEFAULT_CONTEXT_NOFILTERSTRING = new RemoteFileContext(this, null, null);
- return DEFAULT_CONTEXT_NOFILTERSTRING;
- }
- protected RemoteFileContext getContext(IRemoteFile parent)
- {
- return new RemoteFileContext(this, parent, null);
- }
- protected RemoteFileContext getContext(IRemoteFile parent, RemoteFileFilterString rffs)
- {
- return new RemoteFileContext(this, parent, rffs);
- }
-
- // --------------------------------
- // FILE SYSTEM ATTRIBUTE METHODS...
- // --------------------------------
- /**
- * Return in string format the character used to separate folders. Eg, "\" or "/".
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getSeparator()
- */
- public String getSeparator()
- {
- return getParentRemoteFileSubSystemConfiguration().getSeparator();
- }
- /**
- * Return in character format the character used to separate folders. Eg, "\" or "/"
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getSeparatorChar()
- */
- public char getSeparatorChar()
- {
- return getParentRemoteFileSubSystemConfiguration().getSeparatorChar();
- }
- /**
- * Return in string format the character used to separate paths. Eg, ";" or ":"
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getPathSeparator()
- */
- public String getPathSeparator()
- {
- return getParentRemoteFileSubSystemConfiguration().getPathSeparator();
- }
- /**
- * Return in char format the character used to separate paths. Eg, ";" or ":"
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getPathSeparatorChar()
- */
- public char getPathSeparatorChar()
- {
- return getParentRemoteFileSubSystemConfiguration().getPathSeparatorChar();
- }
- /**
- * Return as a string the line separator.
- * <br>
- * Shortcut to {@link #getParentRemoteFileSubSystemConfiguration()}.getLineSeparator()
- */
- public String getLineSeparator()
- {
- return getParentRemoteFileSubSystemConfiguration().getLineSeparator();
- }
-
-
- // -------------------------------------
- // GUI methods
- // -------------------------------------
- /**
- * Return the single property page to show in the tabbed notebook for the
- * for SubSystem property of the parent Connection. Return null if no
- * page is to be contributed for this. You are limited to a single page,
- * so you may have to compress. It is recommended you prompt for the port
- * if applicable since the common base subsystem property page is not shown
- * To help with this you can use the SubSystemPortPrompt widget.
- */
- public PropertyPage getPropertyPage(Composite parent)
- {
- return new SystemSubSystemPropertyPageCore();
- }
-
- // -------------------------
- // Filter Testing Methods...
- // -------------------------
-
- /**
- * @see org.eclipse.rse.core.subsystems.SubSystem#doesFilterMatch(org.eclipse.rse.core.filters.ISystemFilter, java.lang.String)
- */
- public boolean doesFilterMatch(ISystemFilter filter, String remoteObjectAbsoluteName) {
-
- if (filter.isPromptable() || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName)) {
- return false;
- }
-
- boolean would = false;
-
- String[] strings = filter.getFilterStrings();
-
- if (strings != null) {
-
- for (int idx = 0; !would && (idx < strings.length); idx++) {
-
- // for "Drives" filter on Windows, only return match if the absolute path is a drive letter
- if (strings[idx].equals("*")) {
- IPath path = new Path(remoteObjectAbsoluteName);
-
- if (path.segmentCount() == 0) {
- return true;
- }
- else {
- return false;
- }
- }
- //else if (strings[idx].equals("./*")) {
- // would = true;
- //}
- else {
- would = doesFilterStringMatch(strings[idx], remoteObjectAbsoluteName, filter.areStringsCaseSensitive());
- }
- }
- }
-
- return would;
- }
-
- /**
- * Return true if the given remote object name will pass the filtering criteria for
- * the given filter string.
- * <p>
- * Subclasses need to override this.
- * If in doubt, return true.
- * <p>
- * There is a hack here if you want to tell us the absolute name is that of a folder: append " -folder" to the name!
- */
- public boolean doesFilterStringMatch(String filterString, String remoteObjectAbsoluteName, boolean caseSensitive)
- {
- RemoteFileFilterString rffs = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), filterString);
- // ok, this is a tweak: if the absolute name has " -folder" at the end, that means it is a folder...
- if (remoteObjectAbsoluteName.endsWith(" -folder")) //$NON-NLS-1$
- {
- if (!rffs.getShowSubDirs())
- return false;
- remoteObjectAbsoluteName = remoteObjectAbsoluteName.substring(0, remoteObjectAbsoluteName.indexOf(" -folder")); //$NON-NLS-1$
- }
- // problem 1: we don't know if the given remote object name represents a file or folder. We have to assume a file,
- // since we don't support filtering by folder names.
- if (!rffs.getShowFiles())
- return false;
-
- // step 1: verify the path of the remote object matches the path of the filter string
- String container = rffs.getPath();
- if (container == null)
- return false;
-
- if (container.equals(".")) //$NON-NLS-1$
- {
- try
- {
- container = getRemoteFileObject(container).getAbsolutePath();
- }
- catch (Exception e)
- {
-
- }
- //return true;
- }
-
- // trick: use filter string code to parse remote absolute name
- RemoteFileFilterString rmtName = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), remoteObjectAbsoluteName);
- boolean pathMatch = false;
- if (caseSensitive)
- pathMatch = container.equals(rmtName.getPath());
- else
- pathMatch = container.equalsIgnoreCase(rmtName.getPath());
- if (!pathMatch)
- return false;
-
- // step 2: test if the given file name matches the filter criteria
- String nameFilter = rffs.getFileOrTypes();
- if (nameFilter == null)
- return false;
- if (!nameFilter.equals("*")) //$NON-NLS-1$
- {
- IMatcher matcher = null;
- if (nameFilter.endsWith(",")) //$NON-NLS-1$
- matcher = new FileTypeMatcher(FileTypeMatcher.parseTypes(nameFilter), true);
- else
- matcher = new NamePatternMatcher(nameFilter, true, caseSensitive);
- return matcher.matches(rmtName.getFile());
- }
- else
- return true;
- }
-
- /**
- * Return true if the given filter string lists the contents of the given remote object.
- * For example, if given a folder, return true if the given filter string
- * lists the contents of that folder. Used in impact analysis when a remote object is
- * created, deleted, renamed, copied or moved, so as to establish which filters need to be
- * refreshed or collapsed (if the folder is deleted, say).
- * <p>
- * This should only return true if the filter string directly lists the contents of the given
- * object, versus indirectly.
- * <p>
- * Subclasses should override this.
- */
- public boolean doesFilterStringListContentsOf(ISystemFilterString filterString, String remoteObjectAbsoluteName)
- {
- RemoteFileFilterString rffs = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), filterString.getString());
- String container = rffs.getPath();
-
- if (container == null)
- return false;
- boolean affected = false;
-
- String remoteObjectContainer = remoteObjectAbsoluteName;
- int lastSep = remoteObjectAbsoluteName.lastIndexOf(getSeparator());
- if (lastSep != -1)
- {
- remoteObjectContainer = remoteObjectAbsoluteName.substring(0, lastSep);
- }
- if (filterString.getParentSystemFilter().isStringsCaseSensitive())
- affected = container.equals(remoteObjectContainer);
- else
- affected = container.equalsIgnoreCase(remoteObjectContainer);
-
- //UniversalSystemPlugin.logDebugMessage(
- // "UniversalFileSubSystemImpl::doesFilterStringListContentsOf",
- // "Univ Filter String Testing '" + container + "' versus '" + remoteObjectAbsoluteName + "' => " + affected);
- return affected;
- }
-
- // -------------------------------
- // SubSystem METHODS ...
- // -------------------------------
-
- /**
- * Resolves filter strings.
- * The default implementation of this simply calls {@link #internalResolveFilterString(IProgressMontior, String)}.
- * If the result for each filter string is a SystemMessage (e.g. an error), then the messages are returned.
- * If the result for any filter string is not a message (i.e. an array of children), then the children are returned,
- * and the messages are not. This avoids mixing chuldren as a result of successful resolution of a filter string with
- * messages that might result for other filter strings.
- * So the returned results are always the successful results, or messages (never a mix of the two).
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterStrings(org.eclipse.core.runtime.IProgressMonitor, java.lang.String[])
- * @param monitor the progress monitor we are running under
- * @param filterStrings array of filter patterns for objects to return.
- * @return Array of objects that are the result of resolving all the filter strings
- */
- public Object[] internalResolveFilterStrings(IProgressMonitor monitor, String[] filterStrings)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
-
- if (!isConnected()) {
- return null;
- }
-
- Object[] children = null;
- Vector vChildren = new Vector();
- Vector vMessages = new Vector();
-
- boolean oneSuccess = false;
- boolean success = false;
- if (filterStrings == null)
- {
- System.out.println("filterStrings==null!");
- System.out.println("connection == "+getHostAliasName());
- return null;
- }
-
- for (int idx=0; idx<filterStrings.length; idx++)
- {
- if (monitor != null)
- {
- monitor.setTaskName(getResolvingMessage(filterStrings[idx]));
- }
-
- children = internalResolveFilterString(monitor, filterStrings[idx]);
-
- if (!(children != null && children.length == 1 && children[0] instanceof SystemMessageObject)) {
- success = true;
-
- // one has been successful
- oneSuccess = true;
- }
- else {
- success = false;
- }
-
- // if successful, then add to list
- if (children != null && success) {
- addResolvedFilterStringObjects(vChildren, children, filterStrings, idx);
- }
- // otherwise add to messages list
- else if (children != null){
- super.addResolvedFilterStringObjects(vMessages, children, filterStrings, idx);
- }
- }
-
- if (oneSuccess) {
- int nbrChildren = vChildren.size();
- children = new Object[nbrChildren];
-
- for (int idx=0; idx<nbrChildren; idx++)
- children[idx] = vChildren.elementAt(idx);
- }
- else {
- int nbrMessages = vMessages.size();
- children = new Object[nbrMessages];
-
- for (int idx=0; idx<nbrMessages; idx++)
- children[idx] = vMessages.elementAt(idx);
- }
-
- return children;
- }
-
- /**
- * Overridable parent extension point for adding the results of a filter string
- * to the overall list of results.
- * <p>
- * Can be used to filter out redundant entries in the concatenated list, if this
- * is desired.
- */
- protected void addResolvedFilterStringObjects(Vector allChildrenSoFar, Object[] childrenForThisFilterString, String[] allFilterStrings, int currFilterStringIndex)
- {
- if (currFilterStringIndex == 0)
- super.addResolvedFilterStringObjects(allChildrenSoFar, childrenForThisFilterString, allFilterStrings, currFilterStringIndex);
- else
- {
- // for defect 42095, we filter out redundancies...
- RemoteFileFilterString currFS = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), allFilterStrings[currFilterStringIndex]);
- String currPath = currFS.getPath();
- if (currPath == null)
- currPath = ""; //$NON-NLS-1$
- boolean matchingPaths = false;
- boolean caseSensitive = getParentRemoteFileSubSystemConfiguration().isCaseSensitive();
- // test if we are listing in the same folder as any previous filter string...
- // ... if we are not, we can save time and skip the redundancy checking..
- for (int idx = 0; idx < currFilterStringIndex; idx++)
- {
- RemoteFileFilterString prevFS = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), allFilterStrings[idx]);
- String prevPath = prevFS.getPath();
- if (prevPath == null)
- prevPath = ""; //$NON-NLS-1$
-
- if ((caseSensitive && prevPath.equals(currPath)) || (!caseSensitive && prevPath.equalsIgnoreCase(currPath)))
- {
- matchingPaths = true;
- }
- }
-
- // ok, what through the current resolved list, and if appropriate strip out
- // any entries that are already in the list. That is, any entries with the same
- // absolute path name...
- // ... for performance reasons, we don't want to waste time checking items in our
- // our own list, so we do this in two passes, first marking redundant entries by
- // nulling them out...
- if (matchingPaths)
- {
- for (int jdx = 0; jdx < childrenForThisFilterString.length; jdx++)
- {
- if (childrenForThisFilterString[jdx] instanceof IRemoteFile)
- {
- IRemoteFile child = (IRemoteFile) childrenForThisFilterString[jdx];
- String path1 = child.getAbsolutePath();
- if (path1 == null)
- path1 = ""; //$NON-NLS-1$
- IRemoteFile match = null;
- for (int idx = 0;(match == null) && (idx < allChildrenSoFar.size()); idx++)
- {
- Object prevChild = allChildrenSoFar.elementAt(idx);
- if (prevChild instanceof IRemoteFile)
- {
- String path2 = ((IRemoteFile) prevChild).getAbsolutePath();
- if (path2 == null)
- path2 = ""; //$NON-NLS-1$
- if (path1.equals(path2))
- match = (IRemoteFile) prevChild;
- }
- }
- if (match != null)
- {
- childrenForThisFilterString[jdx] = null; // mark as redundant
- // if this redundant entry is a folder, that implies there are multiple
- // filter strings that would have resulted in seeing this folder. We need
- // to record all such filter strings in the folder's context, so that when
- // subsequently expanded, all applicable filter strings will be used to get
- // the children of this subdirectory...
- if (match.isDirectory() && (match instanceof RemoteFile))
- {
- IRemoteFileContext context = ((RemoteFile) match).getContext();
- if (context != null)
- {
- context.addFilterString(currFS);
- }
- }
- }
- }
- } // end for loop
- }
- // second pass...
- for (int jdx = 0; jdx < childrenForThisFilterString.length; jdx++)
- if (childrenForThisFilterString[jdx] != null)
- allChildrenSoFar.addElement(childrenForThisFilterString[jdx]);
- }
- }
-
- /**
- * Actually resolve an absolute filter string. This is called by the
- * run(IProgressMonitor monitor) method, which in turn is called by resolveFilterString.
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(IProgressMonitor,String)
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
- {
- this.monitor = monitor;
- boolean debugMode = false;
- IRemoteFileSubSystemConfiguration rfssf = getParentRemoteFileSubSystemConfiguration();
- boolean windows = !rfssf.isUnixStyle();
- if (debugMode)
- SystemBasePlugin.logInfo("INTERNALRESOLVEFILTERSTRING: INPUT FILTERSTRING: " + filterString);
- if (filterString.startsWith("/") && windows) // request to list root files? //$NON-NLS-1$
- { // convert to request to list drives on Windows
- int len = filterString.length();
- if (len == 1)
- filterString = "*"; // hmm, should never happen //$NON-NLS-1$
- else
- filterString = filterString.substring(1);
- if (debugMode)
- SystemBasePlugin.logInfo("...FINAL FILTERSTRING: " + filterString);
- }
- RemoteFileFilterString fs = new RemoteFileFilterString(rfssf, filterString);
- currFilterString = fs;
- if (debugMode)
- SystemBasePlugin.logInfo("...LISTROOTS = " + fs.listRoots());
- if (fs.listRoots())
- return listRoots(new RemoteFileContext(this, null, fs), monitor);
- else
- {
- boolean showDirs = fs.getShowSubDirs();
- boolean showFiles = fs.getShowFiles();
- String path = fs.getPath();
- if (windows && (path != null) && !path.endsWith(rfssf.getSeparator()))
- path = path + rfssf.getSeparatorChar();
- String filter = fs.getFileOrTypes();
- if (debugMode)
- SystemBasePlugin.logInfo("...path='" + path + "', filter='" + filter + "', showDirs=" + showDirs + ", showFiles=" + showFiles);
-
- IRemoteFile parent = null;
- try
- {
- parent = getRemoteFileObject(path);
-
- /* DKM - now filters should get invalidated via SystemRegistry event firing so this should not be needed
- *
- // DKM: this may be a filter refresh - to be safe I'm marking it stale
- if (parent != null)
- parent.markStale(true);
- */
-
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("RemoteFileSubSystemImpl.logError()", e);
- parent = null;
- }
-
- boolean parentExists = true;
-
- if (parent != null) {
- parentExists = parent.exists();
- }
-
- Object[] children = null;
- try
- {
- // if parent exists, get its children according to the filter
- if (parent != null && parentExists)
- {
- boolean hasFileContents = !parent.isStale() && parent.hasContents(RemoteFileChildrenContentsType.getInstance(), filter);
- boolean hasFolderContents = !parent.isStale() && parent.hasContents(RemoteFolderChildrenContentsType.getInstance(), filter);
- boolean hasFileAndFolderContents = !parent.isStale() && parent.hasContents(RemoteChildrenContentsType.getInstance(), filter);
- if (showDirs && showFiles)
- {
-
- if (hasFileAndFolderContents)
- {
- }
- else if (hasFileContents)
- {
- // already have the files, now add the folders
- listFolders(parent, filter, monitor);
- }
- else if (hasFolderContents)
- {
- // already have the folders, now add the files
- listFiles(parent, filter, monitor);
- }
- else
- {
- // don't have anything - query both
- listFoldersAndFiles(parent, filter, monitor);
- }
- children = parent.getContents(RemoteChildrenContentsType.getInstance(), filter);
- }
- else if (showDirs)
- {
- if (hasFolderContents)
- {
- children = parent.getContents(RemoteFolderChildrenContentsType.getInstance(), filter);
- }
- else
- {
- children = listFolders(parent, filter, monitor);
- }
- }
- else
- {
- if (hasFileContents)
- {
- children = parent.getContents(RemoteFileChildrenContentsType.getInstance(), filter);
- }
- else
- {
- children = listFiles(parent, filter, monitor);
- }
- }
- }
- // otherwise return message saying parent could not be found
- else if (parent != null && !parentExists) {
- children = new SystemMessageObject[1];
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND);
- msg.makeSubstitution(parent.getAbsolutePath());
- children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, null);
- }
- }
- catch (SystemMessageException e)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(e.getSystemMessage(), ISystemMessageObject.MSGTYPE_ERROR, null);
- }
-
- return children;
- }
- //return null;
- }
- /**
- * Sort the concatenated list of all objects returned by resolving one or more
- * filter strings.
- * The default implementation does nothing. Child classes can override if they wish
- * to show their resulting objects sorted.
- */
- public Object[] sortResolvedFilterStringObjects(Object[] children)
- {
- if ((children != null) && (children.length > 1))
- Arrays.sort(children);
- return children;
- }
-
- /**
- * Called by parent when we defer getting a filter string until later, where we query it from
- * the parent. In this case we need the first filter string for the progress monitor msg.
- */
- protected String getFirstParentFilterString(Object parent)
- {
- RemoteFileFilterString[] allFilterStrings = ((IRemoteFile) parent).getAllFilterStrings();
- if ((allFilterStrings == null) || (allFilterStrings.length == 0))
- return "*"; //$NON-NLS-1$
- else
- {
- return allFilterStrings[0].getFileOrTypes();
- }
- }
- /**
- * Actually resolve a relative filter string. This is called by the
- * run(IProgressMonitor monitor) method, which in turn is called by resolveFilterString.
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
- {
-
- this.monitor = monitor;
- RemoteFileFilterString fs = null;
- try
- {
- //System.out.println("Inside internalResolveFilterString for parent '"+parent+"' for filterstring '" + filterString+"'");
- if (filterString == null) // this will be the case when we want to support merging of filter strings
- {
- // this is all for defect 42095. Phil
- RemoteFileFilterString[] allFilterStrings = ((IRemoteFile) parent).getAllFilterStrings();
- if (allFilterStrings == null)
- fs = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), "*"); //$NON-NLS-1$
- else
- {
- boolean onlyOne = (allFilterStrings.length == 1);
- Object[] children = null;
- Vector vChildren = null;
- if (!onlyOne)
- vChildren = new Vector();
- String[] allStrings = new String[allFilterStrings.length];
- for (int idx = 0; idx < allFilterStrings.length; idx++)
- allStrings[idx] = allFilterStrings[idx].toString();
- for (int idx = 0; idx < allFilterStrings.length; idx++)
- {
- fs = (RemoteFileFilterString) allFilterStrings[idx].clone();
- fs.setPath(null);
- children = internalResolveOneFilterString(monitor, parent, fs, onlyOne);
- if (!onlyOne && (children != null))
- {
- addResolvedFilterStringObjects(vChildren, children, allStrings, idx);
- }
- }
- if (!onlyOne)
- {
- children = new Object[vChildren.size()];
- for (int cdx = 0; cdx < children.length; cdx++)
- children[cdx] = vChildren.elementAt(cdx);
- Arrays.sort(children);
- }
- else
- {
- /*
- System.out.println("Returning " + children.length + " children " );
- System.out.println();
- for (int idx=0;idx<children.length;idx++)
- System.out.print(children[idx] + "; ");
- System.out.println();
- */
- }
- return children;
- }
- }
- else
- {
- fs = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), filterString);
- }
- if (fs != null)
- {
- return internalResolveOneFilterString(monitor, parent, fs, true);
- }
- else
- return new Object[] {
- };}
-
- catch (SystemMessageException e)
- {
- SystemMessageObject[] children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(e.getSystemMessage(), ISystemMessageObject.MSGTYPE_ERROR, null);
- return children;
- }
- }
- /**
- * Do one filter string relative resolve
- */
- protected Object[] internalResolveOneFilterString(IProgressMonitor monitor, Object parent, RemoteFileFilterString fs, boolean sort)
- throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException, SystemMessageException
- {
- currFilterString = fs;
- String filterString = fs.toStringNoSwitches();
- boolean showDirs = fs.getShowSubDirs();
- boolean showFiles = fs.getShowFiles();
- //String path = fs.getPath();
- //String filter = fs.getFile();
- //System.out.println("...path='"+path+"', filter='"+filter+"', showDirs="+showDirs+", showFiles="+showFiles);
- //System.out.println("...toStringNoSwitches='"+filterString+"'");
- Object[] children = null;
- if (parent != null)
- {
- if (showDirs && showFiles)
- //children = listFoldersAndFiles((IRemoteFile)parent, filterString);
- children = listFoldersAndFiles((IRemoteFile) parent, filterString, monitor);
- else if (showDirs)
- children = listFolders((IRemoteFile) parent, filterString, monitor);
- else
- children = listFiles((IRemoteFile) parent, filterString, monitor);
- if (sort && (children != null) && (children.length > 1))
- Arrays.sort(children);
- }
- return children;
- }
- // ---------------------------------------
- // RemoteFileSubSystem WRAPPER METHODS ...
- // ... we set the filterstring objects
- // ---------------------------------------
-
- // -------------------------------
- // RemoteFileSubSystem METHODS ...
- // -------------------------------
- /**
- * Return a list of roots/drives on the remote system
- */
- public IRemoteFile[] listRoots(IProgressMonitor monitor) throws InterruptedException
- {
- return listRoots(getDefaultContext(), monitor);
- }
-
-
- /**
- * Return a list of all remote folders in the given parent folder on the remote system
- * @param parent The parent folder to list folders in
- */
- public IRemoteFile[] listFolders(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException
- {
- return listFolders(parent, null, monitor);
- }
-
- /**
- * Return a full list of remote folders in the given parent folder on the remote system.
- * @param parent The parent folder to list folders in
- * @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
- */
- public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
- {
- RemoteFileFilterString filterString = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration());
- filterString.setPath(parent.getAbsolutePath());
- filterString.setFile((fileNameFilter == null) ? "*" : fileNameFilter); //$NON-NLS-1$
- filterString.setShowFiles(false);
- filterString.setShowSubDirs(true);
- RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
- //return listFolders(parent, fileNameFilter, context);
- return listFolders(parent, null, context, monitor);
- }
-
-
- /**
- * Return a list of all remote files in the given parent folder on the remote system
- * @param parent The parent folder to list files in
- */
- public IRemoteFile[] listFiles(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException
- {
- return listFiles(parent, null, monitor);
- }
-
- /**
- * Return a list of remote files in the given folder, which match the given name pattern.
- * @param parent The parent folder to list files in
- * @param fileNameFilter The name pattern to subset the list by, or null to return all files.
- */
- public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
- {
- fileNameFilter = (fileNameFilter == null) ? "*" : fileNameFilter;
- String parentPath = parent.getAbsolutePath();
- IRemoteFileSubSystemConfiguration config = getParentRemoteFileSubSystemConfiguration();
- RemoteFileFilterString filterString = new RemoteFileFilterString(config, parentPath, fileNameFilter);
- filterString.setShowFiles(true);
- filterString.setShowSubDirs(false);
- RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
- return listFiles(parent, fileNameFilter, context, monitor);
- }
-
-
- /**
- * Return a list of all remote folders and files in the given folder. The list is not subsetted.
- * @param parent The parent folder to list folders and files in
- */
- public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException
- {
- return listFoldersAndFiles(parent, (String) null, monitor);
- }
-
- /**
- * Return a list of remote folders and files in the given folder.
- * <p>
- * The files part of the list is subsetted by the given file name filter. It can be null for no subsetting.
- *
- * @param parent The parent folder to list folders and files in
- * @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
- */
- public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IProgressMonitor monitor) throws SystemMessageException
- {
- String path = parent.getAbsolutePath();
- fileNameFilter = (fileNameFilter == null) ? "*" : fileNameFilter;
- IRemoteFileSubSystemConfiguration config = getParentRemoteFileSubSystemConfiguration();
- RemoteFileFilterString filterString = new RemoteFileFilterString(config, path, fileNameFilter);
- filterString.setShowFiles(true);
- filterString.setShowSubDirs(true);
- RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
- return listFoldersAndFiles(parent, fileNameFilter, context, monitor);
- }
-
-
-
-
- /**
- * Given a folder or file, return its parent folder name, fully qualified
- * @param folderOrFile folder or file to return parent of.
- */
- public String getParentFolderName(IRemoteFile folderOrFile)
- {
- return folderOrFile.getParentPath();
- }
-
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem#getRemoteSearchResultObject(java.lang.String)
- */
- public IRemoteSearchResult getRemoteSearchResultObject(String key) throws SystemMessageException {
-
- int idx = key.indexOf(IHostSearchResult.SEARCH_RESULT_DELIMITER);
-
- if (idx != -1) {
- String remoteFilePath = key.substring(0, idx);
- IRemoteFile remoteFile = getRemoteFileObject(remoteFilePath);
-
- if (remoteFile != null) {
-
- int jdx = idx + IHostSearchResult.SEARCH_RESULT_DELIMITER.length() + IHostSearchResult.SEARCH_RESULT_OPEN_DELIMITER.length();
-
- int kdx = key.indexOf(IHostSearchResult.SEARCH_RESULT_INDEX_DELIMITER, jdx);
-
- String searchString = key.substring(jdx, kdx);
-
- Object[] children = remoteFile.getContents(RemoteSearchResultsContentsType.getInstance(), searchString);
-
- if (children != null) {
-
- int ldx = key.indexOf(IHostSearchResult.SEARCH_RESULT_CLOSE_DELIMITER, kdx+1);
-
- int index = Integer.valueOf(key.substring(kdx+1, ldx)).intValue();
-
- if (children.length > index) {
- IRemoteSearchResult result = (IRemoteSearchResult)(children[index]);
- return result;
- }
- else {
- return null;
- }
- }
- else {
- return null;
- }
- }
- else {
- return null;
- }
- }
- else {
- return null;
- }
- }
-
- /**
- * <b>Overrideable</b> Override this method to provide optimized implementation
- * Given a set of fully qualified file or folder names, return an ISystemResourceSet object for it.
- * @param folderOrFileNames Fully qualified folder or file names
- */
- public SystemRemoteResourceSet getRemoteFileObjects(List folderOrFileNames) throws SystemMessageException
- {
- SystemRemoteResourceSet results = new SystemRemoteResourceSet(this);
- for (int i = 0; i < folderOrFileNames.size(); i++)
- {
- String path = (String)folderOrFileNames.get(i);
- IRemoteFile nextFile = getRemoteFileObject(path);
- if (nextFile != null) results.addResource(nextFile);
- }
- return results;
- }
-
- /**
- * Given a un-qualified file or folder name, and its parent folder object,
- * return an IRemoteFile object for the file.
- * <b>note</b>This method should be abstract but MOF doesn't allow abstract impl classes at this point
- * @param parent Folder containing the folder or file
- * @param folderOrFileName Un-qualified folder or file name
- */
- public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName) throws SystemMessageException
- {
- // child subclasses must override
- return null;
- }
-
- /**
- * Return the object within the subsystem that corresponds to
- * the specified unique ID. For remote files, assuming the key
- * is the absolute path of a file, this is simply a wrapper to
- * getRemoteFileObject().
- */
- public Object getObjectWithAbsoluteName(String key) throws Exception
- {
- Object filterRef = getFilterReferenceWithAbsoluteName(key);
-
- if (filterRef != null) {
- return filterRef;
- }
-
- // look to see if there is a search result delimiter
- // if not, the key must be for a file
- if (key.lastIndexOf(IHostSearchResult.SEARCH_RESULT_DELIMITER) == -1) {
-
- IRemoteFile remoteFile = getRemoteFileObject(key);
-
- if (remoteFile != null) {
- return remoteFile;
- }
- else {
- return null;
- }
- }
- // otherwise, it's a search result
- else {
- return getRemoteSearchResultObject(key);
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- // -----------------------------------------------------------------
- // CONVENIENCE METHODS FOR CHILD CLASSES FOR DOING NAME FILTERING...
- // -----------------------------------------------------------------
- /**
- * Method to set variables to affect the folder content subsetting.
- * Use this when only listing <i>either</i> files <i>or</i> folders, but not both.
- * @param includeFilesOrFolders A constant from {@link org.eclipse.rse.core.subsystems.IFileConstants}
- * @param nameFilter The pattern to filter the file or folder names by. Can be null to include all.
- */
- protected void setListValues(int includeFilesOrFolders, String nameFilter)
- {
- this.includeFilesOrFolders = includeFilesOrFolders;
- if ((nameFilter != null) && !nameFilter.equals("*")) //$NON-NLS-1$
- {
- if (nameFilter.endsWith(",")) //$NON-NLS-1$
- matcher = new FileTypeMatcher(FileTypeMatcher.parseTypes(nameFilter), isCaseSensitive());
- else
- matcher = new NamePatternMatcher(nameFilter, true, isCaseSensitive());
- }
- else
- matcher = null;
- folderNameMatcher = null;
- }
- /**
- * Overloaded method to set variables to affect the folder content subsetting,
- * when there is separate filters for both folder names and filter names.
- * @param includeFilesOrFolders A constant from {@link org.eclipse.rse.core.subsystems.IFileConstants}
- * @param folderNameFilter The pattern to filter the folder names by. Can be null to include all folders
- * @param nameFilter The pattern to filter the file names by. Can be null to include all files
- */
- protected void setListValues(int includeFilesOrFolders, String folderNameFilter, String fileNameFilter)
- {
- setListValues(includeFilesOrFolders, fileNameFilter);
- if ((folderNameFilter != null) && !folderNameFilter.equals("*")) //$NON-NLS-1$
- folderNameMatcher = new NamePatternMatcher(folderNameFilter, true, isCaseSensitive());
- }
-
- /**
- * Method to decide if a given folder or file name matches the present criteria.
- * You must have previously called {@link #setListValues(int, String)} or {@link #setListValues(int, String, String)}
- * @param name The file or folder name to test
- * @param isFile true if this is a file name, false if it is a folder name.
- * @return true if the name matches the previously specified criteria
- */
- protected boolean accept(String name, boolean isFile)
- {
- checkForCancel();
- boolean match = true;
- if (includeFilesOrFolders == IClientServerConstants.INCLUDE_FILES_ONLY)
- {
- if (!isFile)
- return false;
- }
- else if (includeFilesOrFolders == IClientServerConstants.INCLUDE_FOLDERS_ONLY)
- {
- if (isFile)
- return false;
- }
- if ((matcher == null) && (folderNameMatcher == null))
- return true;
- if (includeFilesOrFolders != IClientServerConstants.INCLUDE_ALL)
- match = matcher.matches(name);
- else
- {
- if (isFile)
- {
- if (matcher != null)
- match = matcher.matches(name);
- }
- else
- {
- if (folderNameMatcher != null)
- match = folderNameMatcher.matches(name);
- }
- }
- return match;
- }
-
- /**
- * Copy a file or folder to a new target parent folder.
- *
- * @param sourceFolderOrFile The file or folder to copy
- * @param targetFolder The folder to copy to. No guarantee it is on the same system, so be sure to check getSystemConnection()!
- * @param newName The new name for the copied file or folder
- * @return false true iff the copy succeeded
- */
-// public boolean copy(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
-// {
-// return false;
-// }
-
-
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * of the operating system.
- * @param source remote file that represents the file to be obtained
- * @param destination the absolute path of the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, String destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- download(source, destination, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
- }
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * specified.
- * @param source remote file that represents the file to be obtained
- * @param destination the absolute path of the local file
- * @param encoding the encoding of the local file
- * @param monitor the progress monitor
- */
-// public void copy(IRemoteFile source, String destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
-// {
-// return;
-// }
-
- /**
- * Get the remote file and save it locally. The file is saved in UTF-8 encoding.
- * This is a recommended method to use for file transfer
- * @param source remote file that represents the file to be obtained
- * @param destination the absolute path of the local file
- * @param monitor the progress monitor
- */
- public void downloadUTF8(IRemoteFile source, String destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- download(source, destination, SystemEncodingUtil.ENCODING_UTF_8, monitor);
- }
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * of the operating system.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, File destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- download(source, destination.getAbsolutePath(), monitor);
- }
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * specified.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param encoding the encoding of the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, File destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- download(source, destination.getAbsolutePath(), encoding, monitor);
- }
-
- /**
- * Get the remote file and save it locally. The file is saved in UTF-8 encoding.
- * This is a recommended method to use for file transfer
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param monitor the progress monitor
- */
- public void downloadUTF8(IRemoteFile source, File destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- downloadUTF8(source, destination.getAbsolutePath(), monitor);
- }
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * of the operating system.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, IFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- download(source, destination.getLocation().makeAbsolute().toOSString(), monitor);
- }
-
- /**
- * Get the remote file and save it locally. The file is saved in the encoding
- * specified.
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param encoding the encoding of the local file
- * @param monitor the progress monitor
- */
- public void download(IRemoteFile source, IFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- download(source, destination.getLocation().makeAbsolute().toOSString(), encoding, monitor);
- }
-
- /**
- * Get the remote file and save it locally. The file is saved in UTF-8 encoding.
- * This is a recommended method to use for file transfer
- * @param source remote file that represents the file to be obtained
- * @param destination the local file
- * @param monitor the progress monitor
- */
- public void downloadUTF8(IRemoteFile source, IFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- downloadUTF8(source, destination.getLocation().makeAbsolute().toOSString(), monitor);
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system
- * @param source the absolute path of the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void upload(String source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- upload(source, destination, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
- destination.markStale(true);
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding specified
- * @param source the absolute path of the local copy
- * @param destination remote file that represents the file on the server
- * @param encoding the encoding of the local copy
- * @param monitor the progress monitor
- */
-
-// public void copy(String source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
-// {
-// return;
-// }
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system
- * @param source the absolute path of the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void upload(String source, String destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- upload(source, SystemEncodingUtil.ENCODING_UTF_8, destination, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The local file
- * must be in UTF-8 encoding.
- * @param source the absolute path of the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void uploadUTF8(String source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- upload(source, destination, SystemEncodingUtil.ENCODING_UTF_8, monitor);
- destination.markStale(true);
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void upload(File source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- upload(source.getAbsolutePath(), destination, monitor);
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding specified
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param encoding the encoding of the local copy
- * @param monitor the progress monitor
- */
- public void upload(File source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- upload(source.getAbsolutePath(), destination, encoding, monitor);
- destination.markStale(true);
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The local file
- * must be in UTF-8 encoding.
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void uploadUTF8(File source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- uploadUTF8(source.getAbsolutePath(), destination, monitor);
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding of the local operating system
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void upload(IFile source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- upload(source.getLocation().makeAbsolute().toOSString(), destination, monitor);
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The file
- * is assumed to be in the encoding specified
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param encoding the encoding of the local copy
- * @param monitor the progress monitor
- */
- public void upload(IFile source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- upload(source.getLocation().makeAbsolute().toOSString(), destination, encoding, monitor);
- }
-
- /**
- * Put the local copy of the remote file back to the remote location. The local file
- * must be in UTF-8 encoding.
- * @param source the local copy
- * @param destination remote file that represents the file on the server
- * @param monitor the progress monitor
- */
- public void uploadUTF8(IFile source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
- {
- uploadUTF8(source.getLocation().makeAbsolute().toOSString(), destination, monitor);
- }
-
-
-
- /**
- * helper method to run an external command
- */
- public static int runLocalCommand(String cmd, Vector lines) throws Exception
- {
-
- boolean debug = true;
- int rc = -99;
- Process process;
- try
- {
- if (debug)
- SystemBasePlugin.logInfo("Running local command: " + cmd);
- process = Runtime.getRuntime().exec(cmd);
- }
- catch (IOException exc)
- {
- if (debug)
- {
- String msg = exc.getMessage();
- if (msg == null)
- msg = exc.getClass().getName();
- SystemBasePlugin.logInfo("...Unexpected error running command '" + cmd + "'. Error msg: " + msg);
- }
- throw exc;
- }
- String line;
- DataInputStream err = new DataInputStream(process.getErrorStream()); // capture standard err
- BufferedReader berr = new BufferedReader(new InputStreamReader(err));
- try
- {
- while ((line = berr.readLine()) != null)
- {
- if (debug)
- SystemBasePlugin.logInfo("...System.err: " + line);
- if ((lines != null) && (line.trim().length() > 0))
- lines.addElement(line);
- }
- }
- catch (IOException exc)
- {
- }
- DataInputStream in = new DataInputStream(process.getInputStream()); // capture standard out
- BufferedReader bin = new BufferedReader(new InputStreamReader(in));
- try
- {
- while ((line = bin.readLine()) != null)
- {
- if (debug)
- SystemBasePlugin.logInfo("...System out: " + line);
- if ((lines != null) && (line.trim().length() > 0))
- lines.addElement(line);
- }
- }
- catch (IOException exc)
- {
- }
- try
- {
- rc = process.waitFor();
- }
- catch (InterruptedException exc)
- {
- }
- return rc;
- } // end runCmd method
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getHomeFolder()
- {
- return homeFolder;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setHomeFolder(String newHomeFolder)
- {
- homeFolder = newHomeFolder;
- }
-
- public void initializeSubSystem(IProgressMonitor monitor)
- {
- getConnectorService().addCommunicationsListener(this);
- }
-
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- getConnectorService().removeCommunicationsListener(this);
- }
-
- /**
- * Store the IRemoteFile in a hashmap to quick subsequent retrieval
- * @param file the file
- */
- public void cacheRemoteFile(IRemoteFile file, String path)
- {
-
- if (_cachedRemoteFiles.containsKey(path))
- {
- IRemoteFile oldFile = (IRemoteFile)_cachedRemoteFiles.remove(path);
- if (oldFile == file)
- {
- // already cached - recache
- _cachedRemoteFiles.put(path, file);
- return;
- }
-
- // replace file under parent
- if (oldFile != null && oldFile.getParentRemoteFile() != null)
- {
- oldFile.getParentRemoteFile().replaceContent(oldFile, file);
- }
-
- // preserve persistent information from old file to new
- oldFile.copyContentsTo(file);
-
- }
- _cachedRemoteFiles.put(path, file);
- }
-
- /**
- * Store the IRemoteFile in a hashmap to quick subsequent retrieval
- * @param file the file
- */
- public void cacheRemoteFile(IRemoteFile file)
- {
- if (file.exists())
- {
- cacheRemoteFile(file, file.getAbsolutePath());
- }
- }
- /**
- * Returns the cached remote file with the specified path. If no such file
- * is found, returns null
- * @param path
- * @return the cached file, if found in the cache, else null
- */
- public IRemoteFile getCachedRemoteFile(String path)
- {
- if (_cachedRemoteFiles.size() > 0)
- {
- path = path.replaceAll("//", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- if (path.endsWith("\\") || (path.endsWith("/") && path.length() > 1)) //$NON-NLS-1$ //$NON-NLS-2$
- {
- path = path.substring(0, path.length() - 1);
- }
- if (_cachedRemoteFiles.containsKey(path))
- {
- {return (IRemoteFile)_cachedRemoteFiles.get(path);}
- }
-
- }
- return null;
- }
-
- protected void removeCachedRemoteFile(IRemoteFile file)
- {
- if (file != null)
- {
- Object[] children = ((IRemoteContainer)file).getContents(SystemChildrenContentsType.getInstance());
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- if (children[i] instanceof IRemoteFile)
- {
- removeCachedRemoteFile((IRemoteFile)children[i]);
- }
- }
- }
- //Workaround for bug 162962: getContents() incomplete, children not deleted
- //If getContents() is implemented correctly, no matches should be removed
- String prefix = file.getAbsolutePath() + file.getSeparator();
- //Clone the hashMap in order to avoid ConcurrentModificationException in the iterator
- HashMap tmpMap = (HashMap)_cachedRemoteFiles.clone();
- Iterator it = tmpMap.keySet().iterator();
- while (it.hasNext()) {
- String remotePath = (String)it.next();
- if (remotePath.startsWith(prefix)) {
- //FIXME this should never be called if getContents() is implemented correctly
- //such that children are already removed in the code above.
- removeCachedRemoteFile(remotePath);
- }
- }
-
- }
- _cachedRemoteFiles.remove(file.getAbsolutePath());
- }
-
- protected void removeCachedRemoteFile(String path)
- {
- _cachedRemoteFiles.remove(path);
- }
-
-
- public void communicationsStateChange(CommunicationsEvent e)
- {
- switch (e.getState())
- {
- case CommunicationsEvent.AFTER_DISCONNECT :
- _cachedRemoteFiles.clear();
- // DKM - taking this out because it causes an exception when the event occurs in Modal Context
- //SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- //sr.connectedStatusChange(this, false, true, true);
- getConnectorService().removeCommunicationsListener(this);
-
- break;
-
- case CommunicationsEvent.BEFORE_DISCONNECT :
- case CommunicationsEvent.CONNECTION_ERROR :
- break;
- default :
- break;
- }
- }
-
- /**
- * @see ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener()
- {
- return true;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString()
- {
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (homeFolder: "); //$NON-NLS-1$
- result.append(homeFolder);
- result.append(')');
- return result.toString();
- }
-
-
-
- /**
- * Returns -1 by default. Subclasses should override if necessary.
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem#getUnusedPort()
- */
- public int getUnusedPort()
- {
-
- return -1;
- }
-
- /**
- * Returns the address found by calling <code>InetAddress.getLocalHost()</code>. If that
- * call returns the local loopback address, it returns <code>null</code>.
- * Subclasses should reimplement to handle cases where systems have multiple IP addresses due
- * to multiple network cards or VPN. This method should return an address
- * that is usable from the remote system to connect back to the local system.
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem#getLocalAddress()
- */
- public InetAddress getLocalAddress() {
-
- InetAddress addr = null;
-
- try {
- addr = InetAddress.getLocalHost();
- }
- catch (UnknownHostException e) {
- SystemBasePlugin.logError("Error occured trying to get local host address", e);
- addr = null;
- }
-
- // if the address is the loopback address
- if (addr != null && addr.isLoopbackAddress()) {
- return null;
- }
-
- return addr;
- }
-
-
- public Object getTargetForFilter(ISystemFilterReference filterRef)
- {
- String firstFilterString = filterRef.getReferencedFilter().getFilterStrings()[0];
- RemoteFileFilterString fs = new RemoteFileFilterString(getParentRemoteFileSubSystemConfiguration(), firstFilterString);
- try
- {
- // change target to be referenced remote folder
- return getRemoteFileObject(fs.getPath());
- }
- catch (Exception e)
- {
- }
- return null;
- }
-
-
-
- /**
- * @deprecated
- */
- public void cancelSearch(IHostSearchResultConfiguration searchConfig)
- {
- // TODO Auto-generated method stub
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java
deleted file mode 100644
index 7aac9d8f4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,484 +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.subsystems.files.core.subsystems;
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.subsystems.IFileConstants;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.util.ValidatorFileFilterString;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFileName;
-import org.eclipse.rse.ui.validators.ValidatorFolderName;
-
-
-/**
- * Specialization for file subsystem configurations.
- * It is best used by subclassing
- * {@link org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystemConfiguration}.
- *
- * @see RemoteFileSubSystem
- */
-
-public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfiguration implements IRemoteFileSubSystemConfiguration
-{
-
- protected boolean unixStyle = false;
- protected String translatedType;
-
- /**
- * Constructor
- */
- public RemoteFileSubSystemConfiguration()
- {
- super();
- }
- /**
- * Tell us if this is a unix-style file system or a windows-style file system. The
- * default is windows.
- * Child classes must call this, so we know how to respond to separator and path-separator requests.
- */
- protected void setIsUnixStyle(boolean isUnixStyle)
- {
- this.unixStyle = isUnixStyle;
- }
- /**
- * Tell us if this is a unix-style file system or a windows-style file system. The
- * default is windows.
- * Child classes must call this, so we know how to respond to separator and path-separator requests.
- */
- public boolean isUnixStyle()
- {
- return unixStyle;
- }
- /**
- * Tell us if this file system is case sensitive. The default is isUnixStyle(), and so should
- * rarely need to be overridden.
- */
- public boolean isCaseSensitive()
- {
- return isUnixStyle();
- }
- /**
- * Tell us if this subsystem factory supports targets, which are destinations for
- * pushes and builds. Normally only true for file system factories.
- * <p>We return true.
- */
- public boolean supportsTargets()
- {
- return true;
- }
- /**
- * Tell us if this subsystem factory supports server launch properties, which allow the user
- * to configure how the server-side code for these subsystems are started. There is a Server
- * Launch Setting property page, with a pluggable composite, where users can configure these
- * properties.
- * <br> By default we return false.
- */
- public abstract boolean supportsServerLaunchProperties(IHost host);
- /**
- * Return true if subsystems of this factory support the environment variables property.
- * Return true to show it, return false to hide it. We return true.
- */
- public boolean supportsEnvironmentVariablesPropertyPage()
- {
- return true;
- }
-
- /**
- * By default this returns true. Override if the file subsystem
- * does not support search.
- */
- public boolean supportsSearch()
- {
- return true;
- }
-
-
-
- // --------------------------------
- // VALIDATOR METHODS...
- // --------------------------------
- /**
- * Return validator used in filter string dialog for the path part of the filter string.
- * By default, returns ValidatorPathName which does very limited checking.
- * Override as appropriate.
- */
- public ISystemValidator getPathValidator()
- {
- return new org.eclipse.rse.ui.validators.ValidatorPathName();
- }
- /**
- * Return validator used in filter string dialog for the file part of the filter string
- * By default, returns ValidatorFileFilterString.
- * Override as appropriate.
- */
- public ISystemValidator getFileFilterStringValidator()
- {
- return new ValidatorFileFilterString(this);
- }
- /**
- * Return validator used when creating or renaming files
- */
- public ValidatorFileName getFileNameValidator()
- {
- return new ValidatorFileName();
- }
- /**
- * Return validator used when creating or renaming folders
- */
- public ValidatorFolderName getFolderNameValidator()
- {
- return new ValidatorFolderName();
- }
- // --------------------------------
- // FILE SYSTEM ATTRIBUTE METHODS...
- // --------------------------------
- /**
- * Return in string format the character used to separate folders. Eg, "\" or "/"
- */
- public String getSeparator()
- {
- return (unixStyle) ? IFileConstants.SEPARATOR_UNIX : IFileConstants.SEPARATOR_WINDOWS;
- }
- /**
- * Return in character format the character used to separate folders. Eg, "\" or "/"
- */
- public char getSeparatorChar()
- {
- return (unixStyle) ? IFileConstants.SEPARATOR_CHAR_UNIX : IFileConstants.SEPARATOR_CHAR_WINDOWS;
- }
- /**
- * Return in string format the character used to separate paths. Eg, ";" or ":"
- */
- public String getPathSeparator()
- {
- return (unixStyle) ? IFileConstants.PATH_SEPARATOR_UNIX : IFileConstants.PATH_SEPARATOR_WINDOWS;
- }
- /**
- * Return in char format the character used to separate paths. Eg, ";" or ":"
- */
- public char getPathSeparatorChar()
- {
- return (unixStyle) ? IFileConstants.PATH_SEPARATOR_CHAR_UNIX : IFileConstants.PATH_SEPARATOR_CHAR_WINDOWS;
- }
- /**
- * Return as a string the line separator.
- */
- public String getLineSeparator()
- {
- if (isUnixStyle()) {
- return "\n"; //$NON-NLS-1$
- }
- else {
- return "\r\n"; //$NON-NLS-1$
- }
- }
- // --------------------------------------------
- // PARENT METHODS RELATED TO WHAT WE SUPPORT...
- // --------------------------------------------
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsSubSystemConnect()
- */
- public boolean supportsSubSystemConnect()
- {
- return true;
- }
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isPortEditable()
- */
- public boolean isPortEditable()
- {
- return true;
- }
-
- /**
- * We return false.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsCommands()
- */
- public boolean supportsCommands()
- {
- return false;
- }
- /**
- * We return false.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsProperties()
- */
- public boolean supportsProperties()
- {
- return false;
- }
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters()
- {
- return true;
- }
-
- /**
- * Return true if filters of this subsystem factory support dropping into.
- */
- public boolean supportsDropInFilters()
- {
- return true;
- }
-
- /**
- * Indicates that a drop on a filter will be handled as a copy by the file subsystem
- * rather than having a filter update.
- */
- public boolean providesCustomDropInFilters()
- {
- return true;
- }
-
- /**
- * We return supportsFilters()
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsNestedFilters()
- */
- public boolean supportsNestedFilters()
- {
- return supportsFilters();
- }
-
- /**
- * Return true if you support user-defined actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem factory.
- * <p>We return true.
- * @see #createActionSubSystem()
- */
- public boolean supportsUserDefinedActions()
- {
- return true;
- }
-
-
-
- /**
- * Return true if you support user-defined/managed named file types
- * <p>We return true
- */
- public boolean supportsFileTypes()
- {
- return true;
- }
-
- /**
- * Return true if you support compile actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem factory.
- * <p>
- * By returning true, user sees a "Work with->Compile Commands..." action item in the popup menu for this
- * subsystem. The action is supplied by the framework, but is populated using overridable methods in this subsystem.
- * <p>We return false, but really we expect subclasses to return true
- */
- public boolean supportsCompileActions()
- {
- return false;
- }
-
- // -------------------------------------------------------
- // PARENT METHODS RELATED TO FILTERS...
- // ... ONLY INTERESTING IF supportsFilters() returns true!
- // -------------------------------------------------------
-
- /**
- * Override from parent.
- * <p>
- * Here we create the default filter pool for this subsystem factory, and populate it
- * with default filters.
- * <p>
- * This is overridden for local, windows and ifs file subsystem factories, so what we
- * default here applies to Unix and Linux only.
- */
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"in createDefaultFilterPool for remote file subsystem factory");
- ISystemFilterPool pool = null;
- try {
- // -----------------------------------------------------
- // create a pool named filters
- // -----------------------------------------------------
- pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
- //System.out.println("Pool created");
- // ---------------------------------------------------------------------------------------------
- // create default filters in that pool iff this is the user's private profile we are creating...
- // ---------------------------------------------------------------------------------------------
- if (isUserPrivateProfile(mgr))
- {
-
- Vector filterStrings = new Vector();
- /*
- RemoteFileFilterString rootsFilterString = new RemoteFileFilterString(this);
- filterStrings.add(rootsFilterString.toString());
- mgr.createSystemFilter(pool, rb.getString(ISystemFileConstants.RESID_FILTER_ROOTS),filterStrings);
- */
-
-
- // ----------------------
- // "My Home" filter...
- // ----------------------
- filterStrings = new Vector();
- RemoteFileFilterString myHomeFilterString = new RemoteFileFilterString(this);
- myHomeFilterString.setPath(getSeparator());
- filterStrings.add("./*"); //$NON-NLS-1$
- ISystemFilter filter = mgr.createSystemFilter(pool, SystemFileResources.RESID_FILTER_MYHOME,filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
-
- // ----------------------
- // "Home" filter...
- // ----------------------
- // Bug 142070: Get rid of the default "Home" filter because it is an invalid
- // path in many cases
-/* String name = null;
- String path = null;
- if (mgr.getName().equals("Team"))
- {
- path = "/home";
- name = SystemFileResources.RESID_FILTER_HOME;
- }
- else
- {
- path = "/home"; //"/home/username";
- name = SystemFileResources.RESID_FILTER_USERHOME;
- }
- filterStrings.clear();
- RemoteFileFilterString homeFilterString = new RemoteFileFilterString(this);
- homeFilterString.setPath(path);
- filterStrings.add(homeFilterString.toString());
- mgr.createSystemFilter(pool, name, filterStrings);*/
-
-
- // ----------------------
- // "Root Files" filter...
- // ----------------------
- filterStrings = new Vector();
- RemoteFileFilterString rootFilesFilterString = new RemoteFileFilterString(this);
- rootFilesFilterString.setPath(getSeparator());
- filterStrings.add(rootFilesFilterString.toString());
- mgr.createSystemFilter(pool, SystemFileResources.RESID_FILTER_ROOTFILES,filterStrings);
- }
- //else
- //System.out.println("Did not create default filters because this is not the default private profile: " + mgr.getName());
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Error creating default filter pool",exc);
- }
- return pool;
- }
-
- /**
- * Return the translated string to show in the property sheet for the type property.
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
- {
- if (translatedType == null)
- translatedType = SystemFileResources.RESID_PROPERTY_FILE_FILTER_VALUE;
- return translatedType;
- }
-
- // -------------------------------------------------------
- // PARENT METHODS RELATED TO SUBSYSTEMS... VERY IMPORTANT!
- // -------------------------------------------------------
-
-
- /**
- * Instantiate and return an instance of OUR subystem. Do not populate it yet though!
- * Eg:
- * <pre><code>
- * SubSystem subsys = ((AcmesubsysFactoryImpl)factory).createAcmeSubSystem();
- * return subsys;
- * </code></pre>
- * <b>note</b>This method should be abstract but MOF doesn't allow abstract impl classes at this point
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(IHost)
- */
- public ISubSystem createSubSystemInternal(IHost conn)
- {
- // example code for subclasses...
- //SubSystem subsys = factory.createRemoteCmdSubSystem();
- //return subsys;
- return null;
- }
-
- /**
- * Populate a new subsystem with our unique attributes, and/or create default filter references.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#initializeSubSystem(ISubSystem,ISystemNewConnectionWizardPage[])
- * @see org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)
- */
- protected void initializeSubSystem(ISubSystem ss, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
- {
- super.initializeSubSystem(ss, yourNewConnectionWizardPages); // add a reference to the default filter pool
-
- /** FIXME - decouple wiz pages from core - do we still need this?
- // Find the "set port" page we contributed to the New Connection wizard, reads it value, and
- // default the subsystem's port value to it.
- if (yourNewConnectionWizardPages != null)
- {
- SystemFileNewConnectionWizardPage ourPage = null;
- for (int idx=0; (ourPage==null) && (idx<yourNewConnectionWizardPages.length); idx++)
- {
- if (yourNewConnectionWizardPages[idx] instanceof SystemFileNewConnectionWizardPage)
- ourPage = (SystemFileNewConnectionWizardPage)yourNewConnectionWizardPages[idx];
- }
- if ((ourPage != null) && !ourPage.isInformationalOnly())
- {
- int port = ourPage.getPortNumber();
- ss.getConnectorService().setPort(port);
- }
- }
- */
- }
-
- /**
- * Return the default remote systems editor profile ID for files on this subsystem
- */
- public String getEditorProfileID()
- {
- return "universal"; //$NON-NLS-1$
- }
-
-
-
-
-
-
- /**
- * Determines whether this factory is responsible for the creation of subsytems of the specified type
- * Subsystem factories should override this to indicate which subsystems they support.
- *
- * @param subSystemType type of subsystem
- * @return whether this factory is for the specified subsystemtype
- */
- public boolean isFactoryFor(Class subSystemType)
- {
- boolean isFor = IRemoteFileSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFolderChildrenContentsType.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFolderChildrenContentsType.java
deleted file mode 100644
index 40afbdaa5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFolderChildrenContentsType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.core.model.ISystemContentsType;
-
-/**
- * Represents contents that are children of a container
- */
-public class RemoteFolderChildrenContentsType implements ISystemContentsType
-{
- public static String CONTENTS_TYPE_CHILDREN = "contents_folder_children"; //$NON-NLS-1$
- public static RemoteFolderChildrenContentsType _instance = new RemoteFolderChildrenContentsType();
-
- public static RemoteFolderChildrenContentsType getInstance()
- {
- return _instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_CHILDREN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContentsType#isPersistent()
- */
- public boolean isPersistent()
- {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResult.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResult.java
deleted file mode 100644
index 26b9baf0d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResult.java
+++ /dev/null
@@ -1,248 +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.subsystems.files.core.subsystems;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-
-
-/**
- * The RemoteSearchResultImpl class is an implementation of IRemoteSearchResult.
- * It is used for storing information about a particular search result.
- */
-public class RemoteSearchResult implements IAdaptable, IRemoteSearchResult {
-
-
- private String _text;
- private int _line = 0;
- private int _index = -1;
-
- private Object _parent;
- private SystemSearchString _matchingSearchString;
- private IHostSearchResultConfiguration _configuration;
- private List _matches;
-
- protected class RemoteSearchResultMatch {
-
- private int _startOffset = -1;
- private int _endOffset = -1;
-
- private RemoteSearchResultMatch(int startOffset, int endOffset) {
- this._startOffset = startOffset;
- this._endOffset = endOffset;
- }
- }
-
- /**
- * Constructor to create a result.
- * @param parent container of the result.
- * @param searchString the search string for which the result was produced.
- */
- public RemoteSearchResult(IHostSearchResultConfiguration configuration, Object parent, SystemSearchString searchString) {
- _parent = parent;
- _matchingSearchString = searchString;
- _matches = new ArrayList();
- _configuration = configuration;
- }
-
- /**
- * Sets the displayable text for the search result.
- * @param text the displayable text.
- */
- public void setText(String text) {
- _text = text;
- }
-
- /**
- * Sets the associated line number for the result.
- * @param line the line number.
- */
- public void setLine(int line) {
- _line = line;
- }
-
- /**
- * Sets the index of the search result in the context of its parent.
- * @param index the index.
- */
- public void setIndex(int index) {
- _index = index;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult#getText()
- */
- public String getText() {
- return _text;
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.IRemoteLineReference#getLine()
- */
- public int getLine() {
- return _line;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult#getIndex()
- */
- public int getIndex() {
- return _index;
- }
-
- /**
- * Gets the absolute path of the file for which the result was found.
- * @return the absolute path of the file.
- */
- public String getAbsolutePath() {
-
- if (_parent instanceof IRemoteFile) {
- return ((IRemoteFile)_parent).getAbsolutePath();
- }
- else {
- return null;
- }
- }
-
- /**
- * Gets the containing object for the search result.
- * @return the containing parent.
- */
- public Object getParent() {
- return _parent;
- }
-
- /**
- * Gets the associated adapter for this search result.
- * @param adapterType the adapter type.
- */
- public Object getAdapter(Class adapterType) {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Returns children of the search result, if applicable.
- * @return <code>null</code> for this implementation.
- */
- public Object[] getChildren() {
- return null;
- }
-
- /**
- * Indicates whether this search result has children
- * @return <code>false</code> since there are no children.
- */
- public boolean hasChildren() {
- return false;
- }
-
- /**
- * Gets the displayable label for this output. Calls getText().
- * @return the label.
- */
- public String getLabel() {
- return getText();
- }
-
- /**
- * Gets the search string that this result matches.
- * @return the search string.
- */
- public SystemSearchString getMatchingSearchString() {
- return _matchingSearchString;
- }
-
- /**
- * Add a match to the result. A match comprises a char start offset and a char end offset, both
- * relative to the beginning of the file. The matches are added in order.
- * @param startOffset the char start offset, from the beginning of the file.
- * @param endOffset the char end offset, from the beginning of the file.
- */
- public void addMatch(int startOffset, int endOffset) {
- _matches.add(new RemoteSearchResultMatch(startOffset, endOffset));
- }
-
- /**
- * Gets the number of matches in this line.
- * @return the number of matches.
- */
- public int numOfMatches() {
- return _matches.size();
- }
-
- /**
- * Gets the char start offset for the given match index.
- * @param matchIndex the match index. For example, to get the start offset for the first match, specify 0.
- * @return the char start offset, or -1 if there is no match corresponding to the given index.
- */
- public int getCharStart(int matchIndex) {
- RemoteSearchResultMatch match = (RemoteSearchResultMatch)(_matches.get(matchIndex));
-
- if (match != null) {
- return match._startOffset;
- }
- else {
- return -1;
- }
- }
-
- /**
- * Gets the char end offset for the given match index.
- * @param matchIndex the match index. For example, to get the end offset for the first match, specify 0.
- * @return the char end offset, or -1 if there is no match corresponding to the given index.
- */
- public int getCharEnd(int matchIndex) {
- RemoteSearchResultMatch match = (RemoteSearchResultMatch)(_matches.get(matchIndex));
-
- if (match != null) {
- return match._endOffset;
- }
- else {
- return -1;
- }
- }
-
- /**
- * Returns the char start offset of the first match.
- * @see org.eclipse.rse.core.subsystems.IRemoteLineReference#getCharEnd()
- */
- public int getCharEnd() {
- return getCharEnd(0);
- }
-
- /**
- * Returns the char end offset of the first match.
- * @see org.eclipse.rse.core.subsystems.IRemoteLineReference#getCharStart()
- */
- public int getCharStart() {
- return getCharStart(0);
- }
-
- public IHostSearchResultConfiguration getConfiguration()
- {
- return _configuration;
- }
-
- public void setParent(Object parent)
- {
- _parent = parent;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultConfiguration.java
deleted file mode 100644
index 6ca5cbefd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultConfiguration.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchHandler;
-
-
-/**
- * This class represents a search result configuration. A configuration
- * consists of a search target and a search string, and belongs to a search
- * result set. Once a search has been started via a subsystem, the results
- * are stored in the configuration itself. The status of the search can also be queried from
- * the configuration.
- */
-public class RemoteSearchResultConfiguration implements IHostSearchResultConfiguration {
-
- protected IHostSearchResultSet parentResultSet;
- protected Object searchTarget;
- protected SystemSearchString searchString;
- protected Vector results;
- protected int status;
- protected Map _containedResults;
- protected ISearchHandler _searchHandler;
-
- /**
- * Constructor for a result set configuration. Sets status to <code>RUNNING</code>.
- * @param resultSet the parent result set.
- * @param searchObject the target of the search.
- * @param searchString the search string.
- */
- public RemoteSearchResultConfiguration(IHostSearchResultSet resultSet, Object searchObject, SystemSearchString string) {
- results = new Vector();
- setParentResultSet(resultSet);
- setSearchTarget(searchObject);
- setSearchString(string);
- setStatus(RUNNING);
- _containedResults = new HashMap();
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#setParentResultSet(org.eclipse.rse.services.search.IHostSearchResultSet)
- */
- public void setParentResultSet(IHostSearchResultSet resultSet) {
- this.parentResultSet = resultSet;
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getParentResultSet()
- */
- public IHostSearchResultSet getParentResultSet() {
- return parentResultSet;
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#setSearchTarget(java.lang.Object)
- */
- public void setSearchTarget(Object searchObject) {
- this.searchTarget = searchObject;
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getSearchTarget()
- */
- public Object getSearchTarget() {
- return searchTarget;
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#setSearchString(org.eclipse.rse.services.clientserver.SystemSearchString)
- */
- public void setSearchString(SystemSearchString string) {
- this.searchString = string;
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getSearchString()
- */
- public SystemSearchString getSearchString() {
- return searchString;
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#addResult(java.lang.Object)
- */
- public void addResult(Object result) {
- results.add(result);
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#removeResult(java.lang.Object)
- */
- public void removeResult(Object result) {
- results.remove(result);
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#removeAndAddResult(java.lang.Object, java.lang.Object)
- */
- public void removeAndAddResult(Object oldResult, Object newResult) {
- results.remove(oldResult);
- results.add(newResult);
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getResults()
- */
- public Object[] getResults() {
- return results.toArray();
- }
-
- public IHostSearchResult[] getContainedResults(Object resultContainer)
- {
- return (IHostSearchResult[])_containedResults.get(resultContainer);
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getResultsSize()
- */
- public int getResultsSize() {
- return results.size();
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#removeResults()
- */
- public void removeResults() {
- results.removeAllElements();
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#setStatus(int)
- */
- public void setStatus(int status) {
- this.status = status;
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getStatus()
- */
- public int getStatus() {
- return status;
- }
-
- /**
- * Does nothing.
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#cancel()
- */
- public void cancel() {
-
- // if not running, return
- if (getStatus() != RUNNING) {
- return;
- }
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#dispose()
- */
- public void dispose() {
-
- // cancel search first
- cancel();
-
- // remove results
- removeResults();
- }
-
- public void addResults(Object container, IHostSearchResult[] results)
- {
- addResult(container);
- _containedResults.put(container, results);
-
- }
-
- public void setSearchHandler(ISearchHandler handler)
- {
- _searchHandler = handler;
- }
-
- /**
- * Gets the search handler.
- * @return the search handler.
- */
- public ISearchHandler getSearchHandler()
- {
- return _searchHandler;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultsContentsType.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultsContentsType.java
deleted file mode 100644
index 929193451..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultsContentsType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.core.model.ISystemContentsType;
-
-/**
- * Represents contents that are children of a container
- */
-public class RemoteSearchResultsContentsType implements ISystemContentsType
-{
- public static String CONTENTS_TYPE_SEARCH_RESULTS = "contents_search_results"; //$NON-NLS-1$
- public static RemoteSearchResultsContentsType _instance = new RemoteSearchResultsContentsType();
-
- public static RemoteSearchResultsContentsType getInstance()
- {
- return _instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_SEARCH_RESULTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContentsType#isPersistent()
- */
- public boolean isPersistent()
- {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/SystemRemoteFileMatcher.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/SystemRemoteFileMatcher.java
deleted file mode 100644
index 65a056c6b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/SystemRemoteFileMatcher.java
+++ /dev/null
@@ -1,93 +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.subsystems.files.core.util;
-import org.eclipse.rse.core.SystemRemoteObjectMatcher;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes;
-
-
-
-/**
- * This class encapsulates all the criteria required to identify a match on a remote
- * system file object.
- * <p>
- * Use the static method {@link #getFileOrFolderMatcher()} to get an default instance that
- * matches on any directory of any name.
- * <p>
- * You only need to instantiate this class if you want to match on a file of a
- * particular name.
- *
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter
- */
-public class SystemRemoteFileMatcher extends SystemRemoteObjectMatcher
-{
- public static SystemRemoteFileMatcher inst, instFiles, instFolders;
- public static final String category = ISystemFileRemoteTypes.TYPECATEGORY;
- public static final String fileType = ISystemFileRemoteTypes.TYPE_FILE;
- public static final String folderType = ISystemFileRemoteTypes.TYPE_FOLDER;
-
- /**
- * Constructor when you want to match on either folders or files
- * You only need to instantiate yourself if you want to match on files/folder of a
- * particular name
- * Otherwise, call {@link #SystemRemoteFileMatcher(String, boolean)}.
- */
- public SystemRemoteFileMatcher(String nameFilter)
- {
- super(null, category, nameFilter, null, null, null);
- }
- /**
- * Constructor when you want to only list files or only list folders
- * You only need to instantiate yourself if you want to match on files/folder of a
- * particular name
- * Otherwise, call {@link #SystemRemoteFileMatcher(String)}.
- */
- public SystemRemoteFileMatcher(String nameFilter, boolean foldersOnly)
- {
- super(null, category, nameFilter, foldersOnly ? folderType : fileType, null, null);
- }
-
-
- /**
- * Return an instance that will match on any file or folder of any name from any remote system
- */
- public static SystemRemoteFileMatcher getFileOrFolderMatcher()
- {
- if (inst == null)
- inst = new SystemRemoteFileMatcher(null);
- return inst;
- }
- /**
- * Return an instance that will match on any folder of any name from any remote system
- */
- public static SystemRemoteFileMatcher getFolderOnlyMatcher()
- {
- if (instFolders == null)
- instFolders = new SystemRemoteFileMatcher(null, true);
- return instFolders;
- }
- /**
- * Return an instance that will match on any file of any name from any remote system
- */
- public static SystemRemoteFileMatcher getFileOnlyMatcher()
- {
- if (instFiles == null)
- instFiles = new SystemRemoteFileMatcher(null, false);
- return instFiles;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileFilterString.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileFilterString.java
deleted file mode 100644
index 9912d8b7d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileFilterString.java
+++ /dev/null
@@ -1,211 +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.subsystems.files.core.util;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.validators.ValidatorFileName;
-import org.eclipse.rse.ui.validators.ValidatorFolderName;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-
-
-
-/**
- * This class is used in dialogs that prompt for file filter strings.
- * File filter strings are a bit complex to validate. They have to be:
- * <ul>
- * <li>Unique within their filter
- * <li>Valid generic names (there are rules regarding number and location of asterisks)
- * <li>Either a valid file or folder name, or both, when the asterisks are substituted with a letter like 'A'
- * </ul>
- * <p>
- * The IInputValidator interface is implemented by our parent and it
- * is used by jface's InputDialog class and property sheet window.
- * <p>
- * If you subclass this, consider overriding the getFileNameValidator and
- * getFolderNameValidator methods.
- */
-public class ValidatorFileFilterString
- extends ValidatorUniqueString
-{
- //public static final boolean CASE_SENSITIVE = true;
- //public static final boolean CASE_INSENSITIVE = false;
- protected SystemMessage msg_Invalid;
- protected IWorkspace workspace = ResourcesPlugin.getWorkspace();
- protected boolean isFileName, isFolderName;
- private ValidatorFileName fileNameValidator;
- private ValidatorFolderName folderNameValidator;
- private IRemoteFileSubSystemConfiguration ssConfiguration;
-
- /**
- * Constructor accepting a Vector for the list of existing names.
- * @param ssConfig - The remote subsystem configuration we are validating filter strings in
- * @param existingList - A vector containing list of existing filter names to compare against.
- * Note that toString() is used to get the string from each item.
- */
- public ValidatorFileFilterString(IRemoteFileSubSystemConfiguration ssConfig, Vector existingList)
- {
- super(existingList, ssConfig.isCaseSensitive()); // case sensitive uniqueness
- this.ssConfiguration = ssConfig;
- init();
- }
- /**
- * Constructor accepting an Array for the list of existing names.
- * @param ssConfig - The remote subsystem configuration we are validating filter strings in
- * @param existingList - An array containing list of existing strings to compare against.
- */
- public ValidatorFileFilterString(IRemoteFileSubSystemConfiguration ssConfig, String[] existingList)
- {
- super(existingList, ssConfig.isCaseSensitive()); // case sensitive uniqueness
- this.ssConfiguration = ssConfig;
- init();
- }
-
- /**
- * Use this constructor when the name need not be unique, and you just want
- * the syntax checking.
- * @param ssConfig - The remote subsystem configuration we are validating filter strings in
- */
- public ValidatorFileFilterString(IRemoteFileSubSystemConfiguration ssConfig)
- {
- super(new String[0], ssConfig.isCaseSensitive());
- this.ssConfiguration = ssConfig;
- init();
- }
-
-
- private void init()
- {
- //setErrorMessages(RSEUIPlugin.getPluginMessage(FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY),
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE),
- RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID));
- isFileName = isFolderName = true;
- }
-
- /**
- * 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
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- /**
- * Call this before calling isValid!
- * Specify true if this is a file name filter
- * @see #setIsFolderName(boolean)
- */
- public void setIsFileName(boolean is)
- {
- this.isFileName = is;
- }
- /**
- * Call this before calling isValid!
- * Specify true if this is a folder name filter
- * @see #setIsFileName(boolean)
- */
- public void setIsFolderName(boolean is)
- {
- this.isFolderName = is;
- }
-
-
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- boolean ok = NamePatternMatcher.verifyPattern(newText, true); // true=>advanced-style-patterns
- if (!ok)
- return msg_Invalid;
- String tempText = newText;
- if (isFileName || isFolderName)
- tempText = newText.replace('*','A');
- //if (isFileName && (errMsg==null))
- if (isFileName)
- return getFileNameValidator().isSyntaxOk(tempText);
- else if (isFolderName)
- return getFolderNameValidator().isSyntaxOk(tempText);
- return null;
- }
-
- /**
- * Overridable extension point to get basic file name validator
- * By default, queries it from the file subsystem configuration
- */
- protected ValidatorFileName getFileNameValidator()
- {
- if (fileNameValidator == null)
- fileNameValidator = ssConfiguration.getFileNameValidator();
- return fileNameValidator;
- }
- /**
- * Overridable extension point to get basic folder name validator
- * By default, queries it from the file subsystem configuration
- */
- protected ValidatorFolderName getFolderNameValidator()
- {
- if (folderNameValidator == null)
- folderNameValidator = ssConfiguration.getFolderNameValidator();
- return folderNameValidator;
- }
-
- /**
- * Return true if case sensitive, false it not.
- * By default, return ssConfiguration.isUnixStyle()
- * @param ssConfig subsystem configuration
- */
- protected boolean isCaseSensitive(IRemoteFileSubSystemConfiguration ssConfig)
- {
- return ssConfig.isUnixStyle();
- }
-
- /**
- * Return the max length for this file or folder name
- */
- public int getMaximumNameLength()
- {
- /* should probably do the following but too high risk right now
- if (isFileName)
- return getFileNameValidator().getMaximumNameLength();
- else if (isFolderName)
- return getFolderNameValidator().getMaximumNameLength();
- */
- return -1;
- }
-
-
- public String toString()
- {
- return "ValidatorFileFilterString class";
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileUniqueName.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileUniqueName.java
deleted file mode 100644
index ce34613c5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileUniqueName.java
+++ /dev/null
@@ -1,164 +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.subsystems.files.core.util;
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-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.validators.ValidatorFileName;
-import org.eclipse.rse.ui.validators.ValidatorFolderName;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * This class is used in dialogs that prompt for file or folder names, and those names need to be unique
- * within a given folder. To make sure error checking while typing is fast, we go get the list of names
- * of the files and folders in the constructor and re-use it from then on.
- * <p>
- * The IInputValidator interface is implemented by our parent and it
- * is used by jface's InputDialog class and property sheet window.
- * <p>
- * If you subclass this, consider overriding the getFileNameValidator and
- * getFolderNameValidator methods.
- */
-public class ValidatorFileUniqueName
- extends ValidatorUniqueString
-{
- //public static final boolean CASE_SENSITIVE = true;
- //public static final boolean CASE_INSENSITIVE = false;
- protected SystemMessage msg_Invalid;
- private ValidatorFileName fileNameValidator = new ValidatorFileName();
- private ValidatorFolderName folderNameValidator = new ValidatorFolderName();
- protected IRemoteFile parentFolder;
- protected Vector names;
- protected boolean isFolder;
-
- /**
- * Constructor
- * @param parentFolder the folder within which the name must be unique.
- * @param isFolder true if validating a folder name versus a file name
- */
- public ValidatorFileUniqueName(Shell shell, IRemoteFile parentFolder, boolean isFolder)
- {
- super((Vector)null, parentFolder.getParentRemoteFileSubSystem().isCaseSensitive() );
- this.parentFolder = parentFolder;
- this.isFolder = isFolder;
- init(shell);
- }
-
-
- private void init(Shell shell)
- {
- Cursor busyCursor = new Cursor(shell.getDisplay(), SWT.CURSOR_WAIT);
- //shell.setCursor(busyCursor);
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(shell, busyCursor);
-
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE),
- isFolder ? RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FOLDERNAME_NOTVALID) :
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILENAME_NOTVALID)
- );
- try
- {
- IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().listFoldersAndFiles(parentFolder, null);
- if (contents!=null)
- {
- String[] names = new String[contents.length];
- for (int idx=0; idx<names.length; idx++)
- names[idx] = contents[idx].getName();
- setExistingNamesList(names);
- }
- }
- catch (SystemMessageException e)
- {
- }
-
- //shell.setCursor(null);
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(shell, null);
- busyCursor.dispose();
- }
-
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- if (!isFolder)
- return getFileNameValidator().isSyntaxOk(newText);
- else
- return getFolderNameValidator().isSyntaxOk(newText);
- }
-
- /**
- * Overridable extension point to get basic file name validator
- * By default, queries it from the file subsystem factory of the parent folder
- */
- protected ValidatorFileName getFileNameValidator()
- {
- if (fileNameValidator == null)
- fileNameValidator = parentFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().getFileNameValidator();
- return fileNameValidator;
- }
- /**
- * Overridable extension point to get basic folder name validator.
- * By default, queries it from the file subsystem factory of the parent folder
- */
- protected ValidatorFolderName getFolderNameValidator()
- {
- if (folderNameValidator == null)
- folderNameValidator = parentFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().getFolderNameValidator();
- return folderNameValidator;
- }
-
- /**
- * Return the max length for this file or folder name
- */
- public int getMaximumNameLength()
- {
- if (isFolder)
- return getFolderNameValidator().getMaximumNameLength();
- else
- return getFileNameValidator().getMaximumNameLength();
- }
-
-
- public String toString()
- {
- return "ValidatorFileFilterString class";
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.classpath b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.project b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.project
deleted file mode 100644
index 4b8a7699a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.files.dstore</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/META-INF/MANIFEST.MF
deleted file mode 100644
index 65b8171dd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.files.dstore;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.files.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.services.dstore,
- org.eclipse.dstore.core,
- org.eclipse.rse.connectorservice.dstore,
- org.eclipse.dstore.extra,
- org.eclipse.rse.files.ui,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.subsystems.files.dstore,
- org.eclipse.rse.subsystems.files.dstore.model,
- org.eclipse.rse.subsystems.files.dstore.subsystem
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/about.html b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/build.properties b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/build.properties
deleted file mode 100644
index 4ab720d92..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfiles_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfiles_obj.gif
deleted file mode 100644
index 874c99262..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfiles_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfileslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfileslive_obj.gif
deleted file mode 100644
index 885b8a69e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/icons/full/obj16/systemfileslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.properties
deleted file mode 100644
index 2be250860..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE DStore Files
-providerName = Eclipse.org
-
-Files=Files
-FilesDescription=This configuration allows you to work with files on local or remote systems using the DataStore protocol. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.xml
deleted file mode 100644
index 3f3124184..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Linux;Unix"
- name="%Files"
- description="%FilesDescription"
- iconlive="icons/full/obj16/systemfileslive_obj.gif"
- icon="icons/full/obj16/systemfiles_obj.gif"
- category="files"
- class="org.eclipse.rse.subsystems.files.dstore.subsystem.DStoreFileSubSystemConfiguration"
- vendor="%providerName"
- priority="100"
- id="dstore.files">
- </configuration>
-
- <configuration
- systemTypes="Windows"
- name="%Files"
- description="%FilesDescription"
- iconlive="icons/full/obj16/systemfileslive_obj.gif"
- icon="icons/full/obj16/systemfiles_obj.gif"
- category="files"
- class="org.eclipse.rse.subsystems.files.dstore.subsystem.DStoreWindowsFileSubSystemConfiguration"
- vendor="%providerName"
- priority="100"
- id="dstore.windows.files">
- </configuration>
-
- </extension>
-
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/Activator.java
deleted file mode 100644
index f02753159..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/Activator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends SystemBasePlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-// make sure files.ui is activated
- org.eclipse.rse.files.ui.Activator.getDefault();
- }
-
- /**
- * 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- protected void initializeImageRegistry()
- {
- // TODO Auto-generated method stub
-
- }
-
-
-} \ 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/DStoreFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreFile.java
deleted file mode 100644
index f4c3a7bda..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreFile.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.model;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.services.dstore.files.DStoreHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.AbstractRemoteFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-
-public class DStoreFile extends AbstractRemoteFile implements IRemoteFile
-{
- protected DStoreHostFile _dstoreHostFile;
- public DStoreFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, DStoreHostFile hostFile)
- {
- super(ss,context, parent, hostFile);
- _dstoreHostFile = hostFile;
- }
-
- public boolean isVirtual()
- {
- DataElement element = _dstoreHostFile.getDataElement();
- String type = element.getType();
- if (
- type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) ||
- type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR) )
- {
- return true;
- }
- return false;
- }
-
- public String getCanonicalPath()
- {
- return getAbsolutePath();
- }
-
- public String getClassification()
- {
- return _dstoreHostFile.getClassification();
- }
-
-
-
-
-
-
-} \ 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
deleted file mode 100644
index cee033a40..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreFileAdapter.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.connectorservice.dstore.DStoreConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.services.dstore.files.DStoreHostFile;
-import org.eclipse.rse.services.dstore.files.DStoreVirtualHostFile;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-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.swt.widgets.Shell;
-
-public class DStoreFileAdapter implements IHostFileToRemoteFileAdapter
-{
- private RemoteFilePropertyChangeListener _listener;
-
- private void registerFilePropertyChangeListener(FileServiceSubSystem ss)
- {
- if (_listener == null)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)ss.getConnectorService();
- Shell shell = SubSystem.getActiveWorkbenchShell();
- _listener = new RemoteFilePropertyChangeListener(shell, connectorService, connectorService.getDataStore(), ss);
- }
- }
-
-
- public IRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes)
- {
- registerFilePropertyChangeListener(ss);
- boolean showHidden = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.SHOWHIDDEN);
-
- List results = new ArrayList();
- for (int i = 0; i < nodes.length; i++)
- {
- DStoreHostFile node = (DStoreHostFile)nodes[i];
- if (showHidden || !node.isHidden())
- {
- IRemoteFile lfile = null;
-
- if (node instanceof DStoreVirtualHostFile)
- {
- lfile = new DStoreVirtualFile(ss, context, parent, (DStoreVirtualHostFile) node);
- }
- else
- {
- lfile = new DStoreFile(ss, context, parent, node);
- }
- results.add(lfile);
- ss.cacheRemoteFile(lfile);
- }
- }
- return (IRemoteFile[])results.toArray(new IRemoteFile[results.size()]);
- }
-
-
-
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node)
- {
- registerFilePropertyChangeListener(ss);
-
- IRemoteFile file = null;
-
- if (node instanceof DStoreVirtualHostFile)
- {
- file = new DStoreVirtualFile(ss, context, parent, (DStoreVirtualHostFile)node);
- }
- else
- {
- file = new DStoreFile(ss, context, parent, (DStoreHostFile)node);
- }
- ss.cacheRemoteFile(file);
- return file;
- }
-
-
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, String name, boolean isDirectory, boolean isRoot)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, Object object)
- {
- registerFilePropertyChangeListener(ss);
- if (object instanceof DataElement)
- {
- DStoreHostFile hostFile = new DStoreHostFile((DataElement)object);
- IRemoteFile file = null;
-
- {
- file = new DStoreFile(ss, context, parent, hostFile);
- }
- ss.cacheRemoteFile(file);
- return file;
- }
- else
- {
- return null;
- }
- }
-} \ 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/DStoreSearchResult.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreSearchResult.java
deleted file mode 100644
index ed2b95543..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreSearchResult.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.model;
-
-
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResult;
-
-/**
- * Class for describing a line of command output on a
- * universal system
- */
-public class DStoreSearchResult extends RemoteSearchResult
-{
-
-
- public int getLine()
- {
- String src=_element.getSource();
- int colonIndex = src.indexOf(':');
- if (colonIndex > 2)
- {
- String srcNum = src.substring(colonIndex + 1);
- return Integer.parseInt(srcNum);
- }
- return 0;
- }
-
-
- private DataElement _element;
-
- public DStoreSearchResult(IHostSearchResultConfiguration configuration, Object parent, DataElement element, SystemSearchString searchString)
- {
- super(configuration, parent, searchString);
- _element = element;
- }
-
-
- public String getText()
- {
- if (_element != null && !_element.isDeleted() && _element.getName() != null)
- {
- String name = _element.getName();
- setText(name);
- return name;
- }
- else
- {
- return super.getText();
- }
- }
-
- public void dispose()
- {
- _element.getDataStore().deleteObject(_element.getParent(), _element);
- _element.getParent().removeNestedData(_element);
- _element = null;
- }
-} \ 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/DStoreVirtualFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreVirtualFile.java
deleted file mode 100644
index 17fd61eb2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreVirtualFile.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.model;
-
-import org.eclipse.rse.services.dstore.files.DStoreVirtualHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
-
-public class DStoreVirtualFile extends DStoreFile implements IVirtualRemoteFile
-{
-
- protected DStoreVirtualHostFile _node;
-
- public DStoreVirtualFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, DStoreVirtualHostFile hostFile)
- {
- super(ss, context, parent, hostFile);
- _node = hostFile;
- }
-
- public String getVirtualName()
- {
- return _node.getName();
- }
-
- public boolean isVirtualFolder()
- {
- return _node.isDirectory();
- }
-
- public boolean isVirtualFile()
- {
- return _node.isFile();
- }
-
- public long getCompressedSize()
- {
- return _node.getCompressedSize();
- }
-
- public String getCompressionMethod()
- {
- return _node.getCompressionMethod();
- }
-
- public double getCompressionRatio()
- {
- return _node.getCompressionRatio();
- }
-
- public long getExpandedSize()
- {
- return _node.getExpandedSize();
- }
-
- public String getComment()
- {
- return _node.getComment();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/FileTransferStatusListener.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/FileTransferStatusListener.java
deleted file mode 100644
index 1994e8dfc..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/FileTransferStatusListener.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.old;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.DataStoreSchema;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class FileTransferStatusListener extends StatusChangeListener
-{
-
- protected String _remotePath;
- protected DataElement _log;
- protected DataElement _statusElement;
-
- public FileTransferStatusListener(String remotePath, Shell shell, IProgressMonitor monitor, IConnectorService system, DataStore ds, DataElement uploadLog) throws Exception
- {
- super(shell, monitor, system);
- _remotePath = remotePath.replace('\\', '/');
-
- _log = uploadLog;
- if (_log == null)
- {
- throw new Exception("Could not find log in DataStore.");
- }
- setStatus(findOrCreateUploadStatus(ds));
- }
-
- protected DataElement findOrCreateUploadStatus(DataStore ds)
- {
- DataElement result = ds.find(_log, DE.A_NAME, _remotePath,1);
-
- // first upload, this will always ben null
- // but also need to handle case where it's been uploaded before in the sessoin (i.e. for reseting values)
- if (result == null)
- {
- result = _log.getDataStore().createObject(_log, "uploadstatus", _remotePath);
- result.setAttribute(DE.A_SOURCE, "running");
- result.setAttribute(DE.A_VALUE, "");
-
- DataElement cmd = ds.findCommandDescriptor(DataStoreSchema.C_SET);
-
- DataElement setstatus = ds.command(cmd, _log, true);
- /*
- try
- {
- StatusMonitorFactory.getInstance().getStatusMonitorFor(system, ds).waitForUpdate(setstatus);
- }
- catch (Exception e)
- {
- }
- */
- // DKM: no need for this - turns out the problem was that we need to send the LOG not the result -
- // since the server needs to know the parent!
- //ds.waitUntil(setstatus, "done");
-
- }
- else
- {
-
- result.setAttribute(DE.A_SOURCE, "running");
- result.setAttribute(DE.A_VALUE, "");
- }
- _statusElement = result;
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.dstore.old.StatusChangeListener#determineStatusDone()
- */
- protected boolean determineStatusDone()
- {
- return getStatus().getAttribute(DE.A_SOURCE).equals(IServiceConstants.SUCCESS) || getStatus().getAttribute(DE.A_SOURCE).equals(IServiceConstants.FAILED);
-
- }
-
- public boolean uploadHasFailed()
- {
- return getStatus().getAttribute(DE.A_SOURCE).equals(IServiceConstants.FAILED);
- }
-
- public String getErrorMessage()
- {
- return getStatus().getAttribute(DE.A_VALUE);
- }
-
- public String getRemotePath()
- {
- return _remotePath;
- }
-
- public void setRemotePath(String remotePath)
- {
- _remotePath = remotePath;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 3198a3de2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/SearchResultsChangeListener.java
+++ /dev/null
@@ -1,400 +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.subsystems.files.dstore.old;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchConstants;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileContext;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResult;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
-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;
-
-
-public class SearchResultsChangeListener implements IDomainListener, ICommunicationsListener {
-
-
- private Shell _shell;
- private UniversalSearchResultConfigurationImpl _searchConfig;
- private DataElement _status;
- private IRemoteFileSubSystem _subsys;
- private DataStore _dataStore;
- private IRemoteFileContext _defaultContext;
- private IRemoteFileContext _currentContext;
- //private IRemoteFileFactory _factory;
- private long _lastUpdateTime;
- private boolean _disconnected = false;
- private boolean _cancelled = false;
-
- private static int MAX_RESULTS = 10000;
-
- public SearchResultsChangeListener(Shell shell, UniversalSearchResultConfigurationImpl searchConfig) {
- _shell = shell;
- _searchConfig = searchConfig;
-
- IRemoteFile rmtFile = (IRemoteFile)_searchConfig.getSearchTarget();
- _subsys = rmtFile.getParentRemoteFileSubSystem();
-
- _status = _searchConfig.getStatusObject();
- _dataStore = _status.getDataStore();
-
- _dataStore.getDomainNotifier().addDomainListener(this);
- _subsys.getConnectorService().addCommunicationsListener(this);
-
- _lastUpdateTime = 0;
-
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
-
- //_factory = ((FileServiceSubSystem)_subsys).getRemoteFileFactory();
-
- if (_status.getValue().equals("done")) {
- setDone();
- }
- else if (_status.getValue().equals("cancelled")) {
- _cancelled = true;
- setDone();
- }
- }
-
- public IHostSearchResultConfiguration getSearchResults() {
- return _searchConfig;
- }
-
- public DataElement getStatus() {
- return _status;
- }
-
- /**
- * @see IDomainListener#listeningTo(DomainEvent)
- */
- public boolean listeningTo(DomainEvent event) {
-
-
- DataElement parent = (DataElement)event.getParent();
- if (_status == null) {
- return false;
- }
- else if (_status == parent) {
- return true;
- }
- else if (_status.getParent() == parent)
- {
- return true;
- }
-
- return false;
- }
-
- /**
- * @see IDomainListener#domainChanged(DomainEvent)
- */
- public void domainChanged(DomainEvent event) {
-
- if (!_subsys.isConnected())
- {
- _disconnected = true;
- setDone();
- return;
- }
-
- if (_status.getValue().equals("done")) {
- setDone();
- }
- else if (_status.getValue().equals("cancelled")) {
- _cancelled = true;
- setDone();
- }
- else {
- long currentTime = System.currentTimeMillis();
- long deltaTime = currentTime - _lastUpdateTime;
-
- // update frequency is inversely proportional to the number of search results
- if (deltaTime > _searchConfig.getResultsSize() && _searchConfig.getResultsSize() < MAX_RESULTS) {
- _lastUpdateTime = currentTime;
- handleSearchResults();
- }
- }
- }
-
- private void handleSearchResults() {
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
-
- // append new results to existing results
- List results = _status.getNestedData();
- if (results != null)
- {
- int totalSize = results.size();
- int currentSize = _searchConfig.getResultsSize();
-
- for (int loop = currentSize; loop < totalSize && loop < MAX_RESULTS; loop++) {
-
- DataElement result = (DataElement)results.get(loop);
-
- if (_defaultContext == null) {
- _defaultContext = new RemoteFileContext(_subsys, null, null);
- _currentContext = _defaultContext;
- }
-
- if (result.getName().length() > 0) {
-
- // for defect 47414, this code changes the context used for creating IRemoteFiles
- char slash = '/';
-
- if (_subsys.getHost().getSystemType().equals("Windows")) {
- slash = '\\';
- }
-
- String parentPath = result.getValue();
-
- // check if parent is an archive
- boolean isParentArchive = ArchiveHandlerManager.getInstance().isRegisteredArchive(parentPath);
-
- int lastSlash = parentPath.lastIndexOf(slash);
-
- if (lastSlash > 0) {
-
- String parentName = parentPath.substring(lastSlash + 1, parentPath.length());
- String parentRoot = parentPath.substring(0, lastSlash);
-
- if ((_currentContext.getParentRemoteFile() == null) || !_currentContext.getParentRemoteFile().getAbsolutePath().equals(parentPath)) {
-
- // change the current context
- DataElement parentElement = null;
-
- if (ArchiveHandlerManager.isVirtual(parentRoot)) {
- parentElement = result.getDataStore().createObject(null, IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR, parentName);
- }
- else {
-
- if (!isParentArchive) {
- parentElement = result.getDataStore().createObject(null, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR, parentName);
- }
- else {
- parentElement = result.getDataStore().createObject(null, IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR, parentName);
- }
- }
-
- parentElement.setAttribute(DE.A_VALUE, parentRoot);
-
- try
- {
- IRemoteFile remoteFileParent = _subsys.getRemoteFileObject(parentPath);
- //_factory.createRemoteFile(_defaultContext, parentElement, false, true);
- // DKM - need to see why we're not checking the cache first...
- //((RemoteFileSubSystemImpl)_subsys).cacheRemoteFile(remoteFileParent, parentPath);
- _currentContext = new RemoteFileContext(_subsys, remoteFileParent, null);
- }
- catch (Exception e)
- {
-
- }
- }
- }
- else {
- _currentContext = _defaultContext;
- }
-
- if (!_subsys.isConnected())
- {
- _disconnected = true;
- setDone();
- return;
- }
-
- IRemoteFile remoteFile = null;
- String remotePath = parentPath + slash + result.getName();
- if (_subsys instanceof FileServiceSubSystem)
- {
- remoteFile = ((FileServiceSubSystem)_subsys).getCachedRemoteFile(remotePath);
- }
-
- if (remoteFile == null)
- {
- try
- {
- remoteFile = _subsys.getRemoteFileObject(remotePath);
- //_factory.createRemoteFile(_currentContext, result, false, true);
- ((RemoteFileSubSystem)_subsys).cacheRemoteFile(remoteFile, remotePath);
- ((RemoteFile)remoteFile).setParentRemoteFile(_currentContext.getParentRemoteFile());
- }
- catch (Exception e)
- {
-
- }
- }
-
- if (remoteFile != null) {
-
- if (result.getNestedSize() > 0) {
-
- boolean isWindows = _subsys.getHost().getSystemType().equals("Windows");
- char separator = isWindows ? '\\' : '/';
- List contents = new ArrayList();
-
- // go through search results
- for (int i = 0; i < result.getNestedSize(); i++) {
-
- DataElement resultElement = result.get(i);
-
- // search result object
- DStoreSearchResult searchResult = new DStoreSearchResult(_searchConfig, remoteFile, resultElement, _searchConfig.getSearchString());
-
- // set the name which should be the line
- searchResult.setText(resultElement.getName());
-
- String source = resultElement.getSource().replace('\\', separator).replace('/', separator);
- String path = source;
- String lineNumStr = null;
- int colonIndex = source.indexOf(":");
- if (colonIndex > 2)
- {
- path = source.substring(0, colonIndex);
- lineNumStr = source.substring(colonIndex);
- }
-
- int lineNum = 0;
-
- if (lineNumStr != null && lineNumStr.length() > 0) {
- Integer lineLocation = new Integer(lineNumStr);
- lineNum = lineLocation.intValue();
- }
-
- // set the line number
- searchResult.setLine(lineNum);
-
- // set the index
- searchResult.setIndex(i);
-
- // add the search result
- contents.add(searchResult);
- }
-
- // set search results to contents of remote file
- ((DStoreFile)remoteFile).setContents(RemoteSearchResultsContentsType.getInstance(), _searchConfig.getSearchString().toString(), contents.toArray());
- }
-
- // add remote file to search result set
- _searchConfig.addResult(remoteFile);
- }
- }
- }
-
- if (totalSize >= MAX_RESULTS) {
- RemoteSearchResult warning = new RemoteSearchResult(_searchConfig, _searchConfig, _searchConfig.getSearchString());
- warning.setLine(0);
- warning.setText(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_LIST_CANCELLED).getLevelOneText());
- _searchConfig.addResult(warning);
- }
-
- registry.fireEvent(new SystemResourceChangeEvent(_searchConfig, ISystemResourceChangeEvents.EVENT_REFRESH, null));
- }
- }
-
- /**
- * Indicates search is done.
- */
- public void setDone() {
-
- _status.getDataStore().getDomainNotifier().removeDomainListener(this);
-
- _subsys.getConnectorService().removeCommunicationsListener(this);
-
- if (!_disconnected) {
- handleSearchResults();
-
- if (_cancelled) {
- _searchConfig.setStatus(IRemoteSearchConstants.CANCELLED);
- }
- else {
- _searchConfig.setStatus(IRemoteSearchConstants.FINISHED);
- }
- }
- else {
- _searchConfig.setStatusObject(null);
- _searchConfig.setStatus(IRemoteSearchConstants.DISCONNECTED);
- }
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(_searchConfig, ISystemResourceChangeEvents.EVENT_SEARCH_FINISHED, null));
- }
-
- /**
- * @see IDomainListener#getShell()
- */
- public Shell getShell() {
- return _shell;
- }
-
- /**
- *
- */
- public boolean wasCancelled() {
- return _cancelled;
- }
-
- /**
- * @see ICommunicationsListener#communicationsStateChange(CommunicationsEvent)
- */
- public void communicationsStateChange(CommunicationsEvent e) {
-
- int connState = e.getState();
-
- if (connState == CommunicationsEvent.CONNECTION_ERROR || connState == CommunicationsEvent.AFTER_DISCONNECT) {
- _disconnected = true;
-
- Display.getDefault().asyncExec(new Runnable() {
-
- public void run() {
- setDone();
- }
- });
- }
- }
-
- /**
- * @see ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener() {
- return true;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/StatusChangeListener.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/StatusChangeListener.java
deleted file mode 100644
index c4d5646c9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/StatusChangeListener.java
+++ /dev/null
@@ -1,478 +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.subsystems.files.dstore.old;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-import org.eclipse.rse.connectorservice.dstore.util.ICommunicationsDiagnostic;
-import org.eclipse.rse.connectorservice.dstore.util.ICommunicationsDiagnosticFactory;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/*
- * Utility class for determining when a DataStore command is complete via the status.
- */
-public class StatusChangeListener implements IDomainListener, ICommunicationsListener
-{
-
-
- protected DataElement target;
- protected Shell shell;
- protected IProgressMonitor monitor;
- protected IConnectorService system;
-
- protected boolean _networkDown = false;
- protected boolean done = false;
- protected boolean cancelled = false;
-
- protected Vector historyOfTargets;
-
- protected static class FindShell implements Runnable {
- private Shell shell;
-
- /**
- * @see Runnable#run()
- */
- public void run() {
- try {
- Shell[] shells = Display.getCurrent().getShells();
- for (int loop = 0; loop < shells.length && shell == null; loop++) {
- if (shells[loop].isEnabled()) {
- shell = shells[loop];
- }
- }
- } catch (Exception e) {
- SystemBasePlugin.logError("StatusChangeListener.FindShell exception: ", e);
- }
- }
- }
-
-
- /**
- * Construct a StatusChangeListener
- *
- * @param shell A valid Shell object
- *
- * @param monitor A progress monitor if you want this object to check if
- * the user presses cancel while waiting for the status object
- * to be updated
- *
- * @param target The status DataElement for which you wish to wait for an update
- */
- public StatusChangeListener(Shell shell, IProgressMonitor monitor, IConnectorService system, DataElement target) {
- this.shell = shell;
- this.monitor = monitor;
- this.target = target;
- this.system = system;
- system.addCommunicationsListener(this);
- historyOfTargets = new Vector();
- }
-
-
-// public StatusChangeListener(Shell shell, IProgressMonitor monitor, DataElement target) {
-// this.shell = shell;
-// this.monitor = monitor;
-// this.target = target;
-// historyOfTargets = new Vector();
-// }
-
-
- public StatusChangeListener(Shell shell, IProgressMonitor monitor, IConnectorService system) {
- this(shell, monitor, system, null);
- }
-
- public StatusChangeListener(IConnectorService system) {
- this (null, null, system, null);
- }
-
-// public StatusChangeListener(Shell shell, DataElement target) {
-// this(shell, null, target);
-// }
-
-
- /**
- *
- */
- public void setStatus(DataElement p_target)
- {
- this.target = p_target;
-
- for (int i = 0; i < historyOfTargets.size(); i++)
- {
- if (target == historyOfTargets.elementAt(i))
- {
- setDone( true );
- historyOfTargets.clear();
- return;
- }
- }
-
- historyOfTargets.clear();
- }
-
- /**
- *
- */
- public DataElement getStatus()
- {
- return target;
- }
-
- /**
- * @see IDomainListener#listeningTo(DomainEvent)
- */
- public boolean listeningTo(DomainEvent event) {
- if (target == null)
- {
- return true;
- }
-
- if (target == event.getParent()) {
- return true;
- }
-
- return false;
- }
-
-
- /**
- * @see IDomainListener#domainChanged(DomainEvent)
- */
- public void domainChanged(DomainEvent event) {
- if (target == null)
- {
- if (historyOfTargets.size() < 1000)
- {
- historyOfTargets.addElement(event.getParent());
- }
- }
-
- if (target == event.getParent())
- {
- boolean isStatusDone = determineStatusDone();
-
- if (isStatusDone)
- {
- setDone( true );
- }
- }
- }
-
-
- /**
- * setDone(boolean)
- */
- public void setDone(boolean done)
- {
- this.done = done;
- }
-
- public Shell getShell() {
- // dy: DomainNotifier (which calls this method) requires the shell not be disposed
- //if (shell == null) {
- if (shell == null || shell.isDisposed())
- {
- FindShell findShell = new FindShell();
- Display.getDefault().syncExec(findShell);
- shell = findShell.shell;
- }
- return shell;
- }
-
- /**
- *
- */
- public boolean wasCancelled() {
- return cancelled;
- }
-
- /**
- * @see ICommunicationsListener#communicationsStateChange(CommunicationsEvent)
- */
- public void communicationsStateChange(CommunicationsEvent e) {
- if (e.getState() == CommunicationsEvent.CONNECTION_ERROR) {
- _networkDown = true;
- }
- }
-
-
- /**
- * Wait for the the status DataElement to be refreshed
- *
- * @param
- * ICommunicationsDiagnosticFactory factory : for creating system specific diagnostic class instance
- * Int wait : threshold for starting diagnostic. Default is 60 seconds; a zero means to use the default.
- * -1 means to force a timeout; mainly for testing purpose.
- *
- * @return The status DataElement after it has been updated, or the user
- * has pressed cancel
- *
- * @throws InterruptedException if the thread was interrupted.
- */
- public DataElement waitForUpdate() throws InterruptedException
- {
- return waitForUpdate(null, 0); //No diagnostic
- }
-
- public DataElement waitForUpdate(ICommunicationsDiagnosticFactory factory) throws InterruptedException
- {
- return waitForUpdate(factory, 0); //Use the default wait threshold
- }
-
- public DataElement waitForUpdate(ICommunicationsDiagnosticFactory factory, int wait) throws InterruptedException
- {
- boolean statusDone = determineStatusDone();
- if (statusDone)
- {
- setDone(true);
- }
- else
- {
- Display display = Display.getCurrent();
-
- // Prevent infinite looping by introducing a threshold for wait
- int WaitThreshold = 600; //default. sleep(100ms) for 600 times
- if ( wait > 0 )
- WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
- else if ( wait == -1 ) // force a diagnostic
- WaitThreshold = -1;
-
- ICommunicationsDiagnostic diagnostic = null;
- boolean diagnosticStarted = false; //Flag to indicate diagnostic started
-
- if (display != null) {
- if (shell == null || shell.isDisposed()) {
- shell = Display.getDefault().getActiveShell();
- }
- // Current thread is UI thread
- while (!done && !cancelled) {
- while (display.readAndDispatch()) {
- //Process everything on event queue
- }
-
- if ((monitor != null) && (monitor.isCanceled())) {
- cancelled = true;
- target.getDataStore().getDomainNotifier().removeDomainListener(this);
- system.removeCommunicationsListener(this);
- throw new InterruptedException();
- }
-
- statusDone = determineStatusDone();
-
- if (statusDone)
- {
- setDone(true);
- }
- else
- {
- Thread.sleep(100);
-
- if (factory != null) {
-
- if (WaitThreshold > 0) // update timer count if
- // threshold not reached
- --WaitThreshold; // decrement the timer count
-
- //Check if timeout threshold reached @01
- if ((WaitThreshold < 1) && !diagnosticStarted && (diagnostic == null))
- {
- diagnosticStarted = true;
- diagnostic = whatIsGoingOn(factory, false);
- }
- else
- {
- if (diagnosticStarted && (diagnostic != null))
- {
-
- if (ICommunicationsDiagnostic.CANCEL_WAIT_REQUESTED == diagnostic.diagnosticStatus()) {
- cancelled = true;
- SystemBasePlugin.logError("StatusChangeListener.waitForUpdate cancelled by user.");
- }
- }
- }
- }
- else if (_networkDown)
- {
- target.getDataStore().getDomainNotifier().removeDomainListener(this);
- system.removeCommunicationsListener(this);
- throw new InterruptedException();
- }
- }
- }
-
- } else {
- // Current thread is not UI thread
- while (!done && !cancelled)
- {
-
- if ((monitor != null) && (monitor.isCanceled()))
- {
- cancelled = true;
- target.getDataStore().getDomainNotifier().removeDomainListener(this);
- system.removeCommunicationsListener(this);
- throw new InterruptedException();
- }
-
- statusDone = determineStatusDone();
-
- if (statusDone)
- {
- setDone(true);
- }
- else {
- Thread.sleep(100);
-
- if (factory != null) {
-
- if (WaitThreshold > 0) // update timer count if
- // threshold not reached
- --WaitThreshold; // decrement the timer count
-
- //Check if timeout threshold reached @01
- if ((WaitThreshold < 1) && !diagnosticStarted && (diagnostic == null))
- {
- diagnosticStarted = true;
- diagnostic = whatIsGoingOn(factory, false);
- }
- else
- {
- if (diagnosticStarted && (diagnostic != null))
- {
- if (ICommunicationsDiagnostic.CANCEL_WAIT_REQUESTED == diagnostic.diagnosticStatus())
- {
- cancelled = true;
- SystemBasePlugin.logError("StatusChangeListener.waitForUpdate cancelled by user.");
- }
- }
- }
- }
- else if (_networkDown)
- {
- target.getDataStore().getDomainNotifier().removeDomainListener(this);
- system.removeCommunicationsListener(this);
- throw new InterruptedException();
- }
- }
- }
- }
- }
-
- // Reset done so we can detect the next event if waitForUpdate
- // is called again
- done = false;
- system.removeCommunicationsListener(this);
-
- return target;
- }
-
- /**
- * Determines whether the status is done.
- * @return <code>true</code> if status done, <code>false</code> otherwise.
- */
- protected boolean determineStatusDone() {
- return getStatus().getAttribute(DE.A_VALUE).equals("done") || getStatus().getAttribute(DE.A_NAME).equals("done");
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener() {
- return false;
- }
-
- /**
- * Start diagnostic
- *
- * @param Class diagnostic is the an implementation of ICommunicationsDiagnostic
- * @param quiet is the flag to indicate if user should be prompted
- * - true for no prompt
- * @return ICommunciationsDiagnostic class instance
- */
- public ICommunicationsDiagnostic whatIsGoingOn(ICommunicationsDiagnosticFactory factory, boolean quiet ) throws InterruptedException //@01
- {
- if (target == null)
- return null;
-
- ICommunicationsDiagnostic d = null;
- DataStore ds = null;
- try {
- String name = getStatus().getName(); /* Get the current element status name: started/working/done */
- /* Log the current status */
- SystemBasePlugin.logError("StatusChangeListener."+name+": " + "Communications Diagnostic started");
- SystemBasePlugin.logError("StatusChangeListener."+name +
- ": done = " + done +
- "; cancelled = " + cancelled +
- "; _networkDown = " + _networkDown );
-
- ds = target.getDataStore();
- /* Log the status in DataStore */
- SystemBasePlugin.logError("StatusChangeListener."+name+"(DataStore): " + " isConnected = " + ds.isConnected() + "; isWaiting = " + ds.isWaiting(target));
-
- /*Log all nested DataElement's in target's parent*/
- List deList = target.getParent().getNestedData();
- if (deList != null && !deList.isEmpty() ) {
- int num = deList.size();
- for ( int i = 0; i < num; i++)
- {
- DataElement child = (DataElement) deList.get(i);
- if (child != null) {
- SystemBasePlugin.logError("StatusChangeListener."+name+".child"+i+"(DataElement): " + child.toString());
- DataElement descriptor = child.getDescriptor();
- if (descriptor != null)
- SystemBasePlugin.logError("StatusChangeListener."+name+".child"+i+"(Descriptor): " + descriptor.toString());
- }
- }
- }
- //Spawn off a diagnostic to check more stuff
- if (factory != null) {
- d = factory.createInstance();
-
- //Initialize the diagnostic instance
- //Set diagnostic id(name), server name(ds.getName()), this connection(system)
- d.setUp(name, quiet, ds.getName(),system, null ,null, null);
-
- new Thread(d).start();
- }
-
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("StatusChangeListener.ICommunicationsDiagnostic exception: ", e);
- }
-
- return d; // return the created diagnostic class instance
- }
-
- /**
- * Test if the StatusChangeListener returned because the network connection to the
- * remote system was broken.
- */
- public boolean isNetworkDown() {
- return _networkDown;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/UniversalSearchResultConfigurationFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/UniversalSearchResultConfigurationFactory.java
deleted file mode 100644
index 298670160..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/UniversalSearchResultConfigurationFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.old;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultConfigurationFactory;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-
-/**
- * Singleton class that is a factory for creating search result configurations.
- */
-public class UniversalSearchResultConfigurationFactory implements IHostSearchResultConfigurationFactory {
-
- private static UniversalSearchResultConfigurationFactory instance;
-
- /**
- * Constructor for creating a search configuration factory.
- */
- private UniversalSearchResultConfigurationFactory() {
- }
-
- /**
- * Gets the singleton instance of the factory.
- * @return the singleton instance of the factory.
- */
- public static UniversalSearchResultConfigurationFactory getInstance() {
-
- if (instance == null) {
- instance = new UniversalSearchResultConfigurationFactory();
- }
-
- return instance;
- }
-
- /**
- * Creates a config and adds it to the result set.
- */
- public IHostSearchResultConfiguration createSearchConfiguration(IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString) {
- IHostSearchResultConfiguration config = new UniversalSearchResultConfigurationImpl(resultSet, searchTarget, searchString);
- resultSet.addSearchConfiguration(config);
- return config;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/UniversalSearchResultConfigurationImpl.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/UniversalSearchResultConfigurationImpl.java
deleted file mode 100644
index 0ac839090..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/UniversalSearchResultConfigurationImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.old;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-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.RemoteSearchResultConfiguration;
-
-public class UniversalSearchResultConfigurationImpl extends RemoteSearchResultConfiguration {
-
- protected DataElement statusObject;
-
- /**
- * Constructor to create a universal search result configuration.
- * @param resultSet the parent result set.
- * @param searchObject the search target.
- * @param string the search string.
- */
- public UniversalSearchResultConfigurationImpl(IHostSearchResultSet resultSet, Object searchObject, SystemSearchString string) {
- super(resultSet, searchObject, string);
- }
-
- public void setStatusObject(DataElement statusObject) {
- this.statusObject = statusObject;
- }
-
- public DataElement getStatusObject() {
- return statusObject;
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#cancel()
- */
- public void cancel() {
-
- if (getStatus() != RUNNING) {
- super.cancel();
- return;
- }
-
- IRemoteFile remoteFile = (IRemoteFile)getSearchTarget();
- IRemoteFileSubSystem subsys = remoteFile.getParentRemoteFileSubSystem();
- subsys.cancelSearch(this);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreFileSubSystemConfiguration.java
deleted file mode 100644
index 8610ae38b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.subsystem;
-
-import org.eclipse.rse.connectorservice.dstore.DStoreConnectorService;
-import org.eclipse.rse.connectorservice.dstore.DStoreConnectorServiceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.dstore.IDStoreService;
-import org.eclipse.rse.services.dstore.files.DStoreFileService;
-import org.eclipse.rse.services.dstore.search.DStoreSearchService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.dstore.model.DStoreFileAdapter;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * Provides a factory for generating instances of the class
- * SampleFileSubSystem.
- */
-public class DStoreFileSubSystemConfiguration extends FileServiceSubSystemConfiguration
-{
- protected boolean _isWindows;
- protected IHostFileToRemoteFileAdapter _hostFileAdapter;
- public DStoreFileSubSystemConfiguration()
- {
- super();
- _isWindows = false;
- setIsUnixStyle(!_isWindows);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType)
- {
- boolean isFor = FileServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration#supportsArchiveManagement()
- */
- public boolean supportsArchiveManagement()
- {
- return true;
- }
-
- /**
- * Instantiate and return an instance of OUR subystem.
- * Do not populate it yet though!
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(IHost)
- */
- public ISubSystem createSubSystemInternal(IHost host)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
- ISubSystem subsys = new FileServiceSubSystem(host, connectorService, getFileService(host), getHostFileAdapter(), getSearchService(host));
- return subsys;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsFileTypes()
- */
- public boolean supportsFileTypes()
- {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsSearch()
- */
- public boolean supportsSearch()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsEnvironmentVariablesPropertyPage()
- */
- public boolean supportsEnvironmentVariablesPropertyPage()
- {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters()
- {
- return true;
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- DStoreConnectorServiceManager.getTheUniversalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return DStoreConnectorServiceManager.getTheUniversalSystemManager().getConnectorService(host, getServiceImplType());
- }
-
- public IFileService createFileService(IHost host)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
- return new DStoreFileService(connectorService, SystemFileTransferModeRegistry.getDefault(), RSEUIPlugin.getDefault());
- }
-
- public ISearchService createSearchService(IHost host)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
- return new DStoreSearchService(connectorService, RSEUIPlugin.getDefault());
- }
-
- public IHostFileToRemoteFileAdapter getHostFileAdapter()
- {
- if (_hostFileAdapter == null)
- {
- _hostFileAdapter = new DStoreFileAdapter();
- }
- return _hostFileAdapter;
- }
-
- public IHostSearchResultConfiguration createSearchConfiguration(IHost host, IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString)
- {
- DStoreFileSubSystemSearchResultConfiguration config = new DStoreFileSubSystemSearchResultConfiguration(resultSet, searchTarget, searchString, getSearchService(host), getHostFileAdapter());
- resultSet.addSearchConfiguration(config);
- return config;
- }
-
- public ILanguageUtilityFactory getLanguageUtilityFactory(IRemoteFileSubSystem ss)
- {
- return DStoreLanguageUtilityFactory.getInstance(ss);
- }
-
- public Class getServiceImplType()
- {
- return IDStoreService.class;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreFileSubSystemSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreFileSubSystemSearchResultConfiguration.java
deleted file mode 100644
index 5d9ba7a03..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreFileSubSystemSearchResultConfiguration.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.subsystem;
-
-import java.util.List;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.extra.internal.extra.DomainEvent;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.dstore.search.DStoreSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.OutputRefresh;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
-import org.eclipse.rse.subsystems.files.dstore.model.DStoreSearchResult;
-import org.eclipse.swt.widgets.Display;
-
-public class DStoreFileSubSystemSearchResultConfiguration extends DStoreSearchResultConfiguration
-{
- private FileServiceSubSystem _fileSubSystem;
- private IRemoteFile _searchObject;
-
- public DStoreFileSubSystemSearchResultConfiguration(IHostSearchResultSet set, Object searchObject, SystemSearchString searchString, ISearchService searchService, IHostFileToRemoteFileAdapter fileAdapter)
- {
- super(set, searchObject, searchString, searchService);
- _searchObject = (IRemoteFile)searchObject;
- _fileSubSystem = (FileServiceSubSystem)_searchObject.getParentRemoteFileSubSystem();
- }
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#getResultsSize()
- */
- public int getResultsSize()
- {
- DataElement status = getStatusObject();
- if (status != null)
- {
- return getStatusObject().getNestedSize();
- }
- else
- {
- return 0;
- }
- }
-
- public Object[] getResults()
- {
- List results = getStatusObject().getNestedData();
- if (results != null)
- {
- IRemoteFile[] convertedResults = new IRemoteFile[results.size()];
- for (int i = 0; i < results.size(); i++)
- {
- DataElement fileNode = (DataElement)results.get(i);
- if (fileNode != null)
- {
- IRemoteFile parentRemoteFile = null;
- try
- {
- parentRemoteFile = _fileSubSystem.getRemoteFileObject(fileNode.getValue());
- if (!parentRemoteFile.hasContents(RemoteChildrenContentsType.getInstance()))
- {
- // query all files to save time (so we can retrieve cached files
- _fileSubSystem.listFiles(parentRemoteFile, null);
- }
-
- String path = fileNode.getValue() + "/" + fileNode.getName(); //$NON-NLS-1$
- IRemoteFile remoteFile = _fileSubSystem.getRemoteFileObject(path);
-
- List contained = fileNode.getNestedData();
- if (contained != null)
- {
- IHostSearchResult[] searchResults = new IHostSearchResult[contained.size()];
- // reset the parent of search results to the remote file
- for (int c = 0; c < contained.size(); c++)
- {
- searchResults[c] = new DStoreSearchResult(this, remoteFile, (DataElement)contained.get(c), getSearchString());
- }
- remoteFile.setContents(RemoteSearchResultsContentsType.getInstance(), getSearchString().getTextString(), searchResults);
- }
- convertedResults[i] = remoteFile;
- }
- catch (Exception e)
- {
-
- }
- }
- }
- return convertedResults;
- }
- else
- {
- return new IRemoteFile[0];
- }
-
- }
-
- public Object getSearchTarget()
- {
- try
- {
- return _fileSubSystem.getFileService().getFile(null, _searchObject.getParentPath(), _searchObject.getName());
- }
- catch (Exception e)
- {
-
- }
- return null;
- }
-
- public void domainChanged(DomainEvent e)
- {
- if (_status.getValue().equals("done"))
- {
- setStatus(FINISHED);
-
- _status.getDataStore().getDomainNotifier().removeDomainListener(this);
- }
-
- OutputRefresh refresh = new OutputRefresh(this);
- Display.getDefault().asyncExec(refresh);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreJavaLanguageUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreJavaLanguageUtility.java
deleted file mode 100644
index 89f11888d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreJavaLanguageUtility.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.subsystem;
-
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.internal.subsystems.files.core.AbstractJavaLanguageUtility;
-import org.eclipse.rse.services.dstore.files.DStoreHostFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.dstore.model.DStoreFile;
-
-/**
- * This class is the Java language utility for universal.
- */
-public class DStoreJavaLanguageUtility extends AbstractJavaLanguageUtility implements IUniversalDataStoreConstants {
-
- /**
- * Constructor.
- * @param subsystem the subsystem with which the utility is associated.
- * @param language the language.
- */
- public DStoreJavaLanguageUtility(IRemoteFileSubSystem subsystem, String language) {
- super(subsystem, language);
- }
-
- /**
- * The given remote file must be an instance of <code>DStoreFileImpl</code>.
- * @see org.eclipse.rse.internal.subsystems.files.core.IJavaLanguageUtility#getQualifiedClassName(org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile)
- */
- public String getQualifiedClassName(IRemoteFile remoteFile) {
-
- DStoreFile univFile = null;
-
- if (remoteFile instanceof DStoreFile) {
- univFile = (DStoreFile)remoteFile;
- }
- else {
- return null;
- }
-
- String remotePath = remoteFile.getAbsolutePath();
- DataElement deObj = ((DStoreHostFile)univFile.getHostFile()).getDataElement();
-
- DataStore ds = deObj.getDataStore();
- DataElement queryCmd = ds.localDescriptorQuery(deObj.getDescriptor(), C_QUERY_QUALIFIED_CLASSNAME);
-
- if (queryCmd != null) {
- DataElement status = ds.synchronizedCommand(queryCmd, deObj, true);
- DataElement className = ds.find(status, DE.A_TYPE, TYPE_QUALIFIED_CLASSNAME, 1);
-
- if (className != null && !className.equals("null")) {
- return className.getName();
- }
- else {
- SystemBasePlugin.logWarning("Qualified class name for " + remoteFile.getAbsolutePath() + " is null");
- }
- }
-
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreLanguageUtilityFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreLanguageUtilityFactory.java
deleted file mode 100644
index 058887219..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreLanguageUtilityFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore.subsystem;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.internal.subsystems.files.core.AbstractLanguageUtilityFactory;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtility;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-
-/**
- * This is a singleton factory class associated each universal subsystem.
- */
-public class DStoreLanguageUtilityFactory extends AbstractLanguageUtilityFactory {
-
- private static Map instances;
-
- /**
- * Constructor.
- * @param subsystem the universal subsystem with which this factory is associated.
- */
- private DStoreLanguageUtilityFactory(IRemoteFileSubSystem subsystem) {
- super(subsystem);
- }
-
- /**
- * Returns an instance for each subsystem. Note that there is just a singleton instance for
- * each universal subsystem.
- * @param subsystem the universal subsystem.
- * @return the singleton instance associated with the subsystem.
- */
- public static ILanguageUtilityFactory getInstance(IRemoteFileSubSystem subsystem) {
-
- // initialize map if needed
- if (instances == null) {
- instances = new HashMap();
- }
-
- // check if there is a factory for the subsystem already
- ILanguageUtilityFactory factory = (ILanguageUtilityFactory)(instances.get(subsystem));
-
- // if none, then create the factory, and store the factory for this subsystem
- if (factory == null) {
- factory = new DStoreLanguageUtilityFactory(subsystem);
- instances.put(subsystem, factory);
- }
-
- return factory;
- }
-
- /**
- * @see org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory#getUtility(java.lang.String)
- */
- public ILanguageUtility getUtility(String language) {
-
- if (language.equals(ILanguageUtility.LANGUAGE_JAVA)) {
- return new DStoreJavaLanguageUtility(getSubSystem(), language);
- }
-
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreWindowsFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreWindowsFileSubSystemConfiguration.java
deleted file mode 100644
index f6ad237ca..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/DStoreWindowsFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,85 +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.subsystems.files.dstore.subsystem;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-
-public class DStoreWindowsFileSubSystemConfiguration extends DStoreFileSubSystemConfiguration
-{
-
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- ISystemFilterPool pool = null;
- try {
- // -----------------------------------------------------
- // create a pool named filters
- // -----------------------------------------------------
- pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
- if (pool == null) // hmmm, why would this happen?
- {
- SystemBasePlugin.logError("Creating default filter pool "+getDefaultFilterPoolName(mgr.getName(), getId())+" for mgr "+mgr.getName()+" failed.",null);
- return null;
- }
- if (isUserPrivateProfile(mgr))
- {
-
- // ----------------------
- // "My Home" filter...
- // ----------------------
- Vector filterStrings = new Vector();
- RemoteFileFilterString myHomeFilterString = new RemoteFileFilterString(this);
- myHomeFilterString.setPath(getSeparator());
- filterStrings.add(".\\*");
- ISystemFilter filter = mgr.createSystemFilter(pool, SystemFileResources.RESID_FILTER_MYHOME,filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
-
- filterStrings = new Vector();
- RemoteFileFilterString defaultFilterString = new RemoteFileFilterString(this);
- filterStrings.add(defaultFilterString.toString());
- String filterName = SystemFileResources.RESID_FILTER_DRIVES;
-
- mgr.createSystemFilter(pool, filterName, filterStrings);
- }
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error creating default filter pool",exc);
- }
- return pool;
- }
-
- public String getSeparator()
- {
- return "\\";
- }
-
- public char getSeparatorChar()
- {
- return '\\';
- }
-
-
-
-}
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
deleted file mode 100644
index d7ad8d099..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/RemoteFilePropertyChangeListener.java
+++ /dev/null
@@ -1,308 +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.subsystems.files.dstore.subsystem;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-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.extra.internal.extra.DomainEvent;
-import org.eclipse.dstore.extra.internal.extra.IDomainListener;
-import org.eclipse.rse.core.SystemBasePlugin;
-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.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-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;
-
-
-
-public class RemoteFilePropertyChangeListener implements IDomainListener,
- ICommunicationsListener
-{
-
- protected DataStore dataStore;
-
- protected FileServiceSubSystem _fileSubSystem;
-
- protected Shell shell;
-
- protected SystemRegistry _registry;
-
- protected IConnectorService system;
-
- protected boolean _networkDown = false;
-
- protected HashMap _decorateJobs;
-
- protected static class FindShell implements Runnable
- {
-
- private Shell shell;
-
- /**
- * @see Runnable#run()
- */
- public void run()
- {
- try
- {
- Shell[] shells = Display.getCurrent().getShells();
- for (int loop = 0; loop < shells.length && shell == null; loop++)
- {
- if (shells[loop].isEnabled())
- {
- shell = shells[loop];
- }
- }
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(
- "StatusChangeListener.FindShell exception: ", e);
- }
- }
- }
-
- public class DecorateJob extends UIJob
- {
- private DStoreFile[] _files;
- private DStoreFile _parentFile;
- private boolean _isDone = false;
- public DecorateJob(DStoreFile[] files, DStoreFile parentFile)
- {
- super(SystemFileResources.RESID_JOB_DECORATEFILES_NAME);
- _files= files;
- _parentFile = parentFile;
- }
-
- public boolean isDone()
- {
- return _isDone;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- _isDone = false;
- for (int i = 0; i < _files.length; i++)
- {
- _registry.fireEvent(new
- org.eclipse.rse.model.SystemResourceChangeEvent(_files[i],
- ISystemResourceChangeEvents.EVENT_ICON_CHANGE,
- _parentFile));
- }
-
- /*
- _registry.fireEvent(new
- org.eclipse.rse.model.SystemResourceChangeEvent(_files,
- ISystemResourceChangeEvent.EVENT_REPLACE_CHILDREN,
- _parentFile));
- */
- _isDone = true;
- _decorateJobs.remove(_parentFile);
- return Status.OK_STATUS;
- }
-
- }
-
- public RemoteFilePropertyChangeListener(Shell shell, IConnectorService system,
- DataStore dataStore, FileServiceSubSystem fileSS)
- {
- this.shell = shell;
- this._fileSubSystem = fileSS;
- this.dataStore = dataStore;
- this.system = system;
- this._registry = RSEUIPlugin.getTheSystemRegistry();
- system.addCommunicationsListener(this);
- dataStore.getDomainNotifier().addDomainListener(this);
- _decorateJobs = new HashMap();
- }
-
- public DataStore getDataStore()
- {
- return dataStore;
- }
-
- /**
- * @see IDomainListener#listeningTo(DomainEvent)
- */
- public boolean listeningTo(DomainEvent event)
- {
-
- DataElement parent = (DataElement) event.getParent();
-
- if (dataStore == parent.getDataStore())
- {
- String dataElementType = parent.getType();
- if (dataElementType
- .equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR) ||
- dataElementType
- .equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)
- )
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- return false;
- }
-
- public void finish()
- {
- dataStore.getDomainNotifier().removeDomainListener(this);
- }
-
- /**
- * @see IDomainListener#domainChanged(DomainEvent)
- */
- public void domainChanged(DomainEvent event)
- {
- DataElement parent = (DataElement)event.getParent();
-
- List children = parent.getNestedData();
- if (children != null)
- {
-
- StringBuffer parentPath = new StringBuffer(parent.getAttribute(DE.A_VALUE));
- parentPath.append(_fileSubSystem.getSeparatorChar());
- parentPath.append(parent.getName());
- DStoreFile parentFile = (DStoreFile) _fileSubSystem.getCachedRemoteFile(parentPath.toString());
-
- boolean refreshParent = false;
- List toUpdate = new ArrayList();
- for (int i = 0; i < children.size(); i++)
- {
-
- DataElement subject = (DataElement) children.get(i);
- String type = subject.getType();
- if (type
- .equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) ||
- type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR))
-
- {
- StringBuffer path = new StringBuffer(subject.getAttribute(DE.A_VALUE));
- path.append(_fileSubSystem.getSeparatorChar());
- path.append(subject.getName());
-
-
- // find cached copy
- try
- {
- DStoreFile updated = (DStoreFile) _fileSubSystem.getCachedRemoteFile(path.toString());
-
- if (updated != null)
- {
- String classification = updated.getClassification();
- if (!classification.equals("file") && !classification.equals("directory")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- refreshParent = true;
- toUpdate.add(updated);
- }
-
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- if (refreshParent)
- {
- DecorateJob job = getDecorateJob(parentFile);
- if (job == null)
- {
- job = new DecorateJob((DStoreFile[])toUpdate.toArray(new DStoreFile[toUpdate.size()]), parentFile);
- job.setRule(parentFile);
- putDecorateJob(parentFile, job);
- job.schedule(5000);
- }
-
- }
- }
-
- }
-
- protected DecorateJob getDecorateJob(IRemoteFile file)
- {
- return (DecorateJob)_decorateJobs.get(file);
- }
-
- protected void putDecorateJob(IRemoteFile file, DecorateJob job)
- {
- _decorateJobs.put(file, job);
- }
-
-
- public Shell getShell()
- {
- // dy: DomainNotifier (which calls this method) requires the shell not
- // be disposed
- //if (shell == null) {
- if (shell == null || shell.isDisposed())
- {
- FindShell findShell = new FindShell();
- Display.getDefault().syncExec(findShell);
- shell = findShell.shell;
- }
- return shell;
- }
-
- /**
- * @see ICommunicationsListener#communicationsStateChange(CommunicationsEvent)
- */
- public void communicationsStateChange(CommunicationsEvent e)
- {
- if (e.getState() == CommunicationsEvent.CONNECTION_ERROR)
- {
- _networkDown = true;
- }
- else if (e.getState() == CommunicationsEvent.BEFORE_DISCONNECT)
- {
- finish();
- }
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener()
- {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.classpath b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.project b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.project
deleted file mode 100644
index 88cd944a1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.files.ftp</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.settings/org.eclipse.core.resources.prefs b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b6e2f767c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Oct 08 00:09:13 CEST 2006
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/META-INF/MANIFEST.MF
deleted file mode 100644
index b08d6d492..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.files.ftp;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.files.ftp.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.services.files.ftp,
- org.eclipse.rse.files.ui,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.core,
- org.eclipse.rse.ui,
- org.eclipse.ui.console
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.subsystems.files.ftp,
- org.eclipse.rse.subsystems.files.ftp.connectorservice,
- org.eclipse.rse.subsystems.files.ftp.model
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/about.html b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/build.properties b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/build.properties
deleted file mode 100644
index 34e219f76..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/icons/full/obj16/systemfiles_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/icons/full/obj16/systemfiles_obj.gif
deleted file mode 100644
index 874c99262..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/icons/full/obj16/systemfiles_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/icons/full/obj16/systemfileslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/icons/full/obj16/systemfileslive_obj.gif
deleted file mode 100644
index 885b8a69e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/icons/full/obj16/systemfileslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.properties
deleted file mode 100644
index 3385e9171..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE FTP Files
-providerName = Eclipse.org
-
-FtpSystemName=FTP Only
-FtpSystemDescription=Connection for FTP access to remote systems
-
-Files=Files
-FilesDescription=This configuration allows you to work with files on local or remote systems using the FTP protocol. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml
deleted file mode 100644
index 06f79d267..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006 IBM Corporation, Symbian Software Ltd. and Wind River Systems, Inc. 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:
-Javier Montalvo Orús (Symbian) - add Windows to list of valid FTP systems
-Martin Oberhuber (Wind River) - add FTP Only system type
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension point="org.eclipse.rse.core.systemTypes">
- <systemType
- description="%FtpSystemDescription"
- icon="icons/full/obj16/systemfiles_obj.gif"
- iconLive="icons/full/obj16/systemfileslive_obj.gif"
- id="org.eclipse.rse.systemtype.ftp"
- name="FTP Only"/>
- </extension>
- <extension point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Linux;Unix;Windows;FTP Only"
- name="%Files"
- description="%FilesDescription"
- iconlive="icons/full/obj16/systemfileslive_obj.gif"
- icon="icons/full/obj16/systemfiles_obj.gif"
- category="files"
- class="org.eclipse.rse.subsystems.files.ftp.FTPFileSubSystemConfiguration"
- vendor="%providerName"
- priority="100"
- id="ftp.files">
- </configuration>
- </extension>
-
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/Activator.java
deleted file mode 100644
index c0bf42add..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/Activator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ftp;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
-// make sure files.ui is activated
- org.eclipse.rse.files.ui.Activator.getDefault();
- }
-
- /**
- * 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.files.ftp", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/FTPFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/FTPFileSubSystemConfiguration.java
deleted file mode 100644
index d196b1fef..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/FTPFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ftp;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.ftp.IFTPService;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.ftp.connectorservice.FTPConnectorService;
-import org.eclipse.rse.subsystems.files.ftp.connectorservice.FTPConnectorServiceManager;
-import org.eclipse.rse.subsystems.files.ftp.model.FTPFileAdapter;
-
-
-/**
- * Provides a factory for generating instances of the class
- * SampleFileSubSystem.
- */
-public class FTPFileSubSystemConfiguration extends FileServiceSubSystemConfiguration
-{
- protected IHostFileToRemoteFileAdapter _hostFileAdapter;
- public FTPFileSubSystemConfiguration()
- {
- super();
- setIsUnixStyle(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = FileServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration#supportsArchiveManagement()
- */
- public boolean supportsArchiveManagement() {
- return false;
- }
-
- /**
- * Instantiate and return an instance of OUR subystem.
- * Do not populate it yet though!
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(IHost)
- */
- public ISubSystem createSubSystemInternal(IHost host)
- {
- FTPConnectorService connectorService = (FTPConnectorService)getConnectorService(host);
- ISubSystem subsys = new FileServiceSubSystem(host, connectorService, getFileService(host), getHostFileAdapter(), getSearchService(host));
- return subsys;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsFileTypes()
- */
- public boolean supportsFileTypes() {
- return false;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsSearch()
- */
- public boolean supportsSearch() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsEnvironmentVariablesPropertyPage()
- */
- public boolean supportsEnvironmentVariablesPropertyPage() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters() {
- return true;
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return FTPConnectorServiceManager.getDefault().getConnectorService(host, getServiceImplType());
- }
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- FTPConnectorServiceManager.getDefault().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
-
- public IFileService createFileService(IHost host)
- {
- FTPConnectorService connectorService = (FTPConnectorService)getConnectorService(host);
- return connectorService.getFileService();
- }
-
- public ISearchService createSearchService(IHost host)
- {
- // no search service supported for ftp at moment
- return null;
- }
-
- public IHostFileToRemoteFileAdapter getHostFileAdapter()
- {
- if (_hostFileAdapter == null)
- {
- _hostFileAdapter = new FTPFileAdapter();
- }
- return _hostFileAdapter;
- }
-
- public IHostSearchResultConfiguration createSearchConfiguration(IHost host, IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public ILanguageUtilityFactory getLanguageUtilityFactory(IRemoteFileSubSystem ss)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Class getServiceImplType()
- {
- return IFTPService.class;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/FTPConnectorService.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/FTPConnectorService.java
deleted file mode 100644
index d63138b4f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/FTPConnectorService.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Javier Montalvo Orus (Symbian) - Bug 140348 - FTP did not use port number
- * Javier Montalvo Orus (Symbian) - Bug 161209 - Need a Log of ftp commands
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ftp.connectorservice;
-
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.core.subsystems.AbstractConnectorService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.ftp.FTPService;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.ui.console.ConsolePlugin;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.MessageConsole;
-
-
-
-public class FTPConnectorService extends AbstractConnectorService
-{
- protected FTPService _ftpService;
-
- public FTPConnectorService(IHost host, int port)
- {
- super(SystemFileResources.RESID_FTP_CONNECTORSERVICE_NAME,SystemFileResources.RESID_FTP_CONNECTORSERVICE_DESCRIPTION, host, port);
- _ftpService = new FTPService();
- }
-
- public void internalConnect(IProgressMonitor monitor) throws Exception
- {
- internalConnect();
- }
-
- private void internalConnect() throws Exception
- {
-
- SystemSignonInformation info = getPasswordInformation();
- _ftpService.setHostName(info.getHostname());
- _ftpService.setUserId(info.getUserid());
- _ftpService.setPassword(info.getPassword());
- _ftpService.setPortNumber(getPort());
- _ftpService.setLoggingStream(getLoggingStream(info.getHostname(),getPort()));
- _ftpService.connect();
- }
-
- private OutputStream getLoggingStream(String hostName,int portNumber)
- {
- MessageConsole messageConsole=null;
-
- IConsole[] consoles = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
- for (int i = 0; i < consoles.length; i++) {
- if(consoles[i].getName().equals("FTP log: "+hostName+":"+portNumber)) { //$NON-NLS-1$ //$NON-NLS-2$
- messageConsole = (MessageConsole)consoles[i];
- break;
- }
- }
-
- if(messageConsole==null){
- messageConsole = new MessageConsole("FTP log: "+hostName+":"+portNumber, null); //$NON-NLS-1$ //$NON-NLS-2$
- ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{ messageConsole });
- }
-
- ConsolePlugin.getDefault().getConsoleManager().showConsoleView(messageConsole);
-
- return messageConsole.newOutputStream();
- }
-
- public IFileService getFileService()
- {
- return _ftpService;
- }
-
- public void internalDisconnect(IProgressMonitor monitor)
- {
- _ftpService.disconnect();
- }
-
-
- public boolean hasRemoteServerLauncherProperties()
- {
- return false;
- }
-
- public boolean supportsRemoteServerLaunching()
- {
- return false;
- }
-
- public boolean isConnected()
- {
- return (_ftpService != null && _ftpService.isConnected());
- }
-
- public boolean supportsServerLaunchProperties()
- {
- return false;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java
deleted file mode 100644
index 29a631e30..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ftp.connectorservice;
-
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-
-/**
- * IConnectorService manager class.
- * There should be only one of these instantiated.
- * The job of this manager is to manage and return IConnectorService objects.
- * It ensures there is only ever one per unique SystemConnection,
- * so that both the file and cmd subsystems can share the same system object.
- */
-public class FTPConnectorServiceManager extends AbstractConnectorServiceManager
-{
- private static FTPConnectorServiceManager inst = null;
-
- /**
- * Private constructor to ensure not instantiated this way.
- * Use getDefault instead.
- */
- private FTPConnectorServiceManager()
- {
- }
-
- /**
- * Return singleton instance of this class
- */
- public static FTPConnectorServiceManager getDefault()
- {
- if (inst == null)
- inst = new FTPConnectorServiceManager();
- return inst;
- }
-
- /**
- * Return true if the singleton has been created.
- * This saves creating it at shutdown just to test for isConnected.
- */
- public static boolean isInstantiated()
- {
- return (inst != null);
- }
-
- // -------------------------------------
- // ABSTRACT METHODS FROM PARENT CLASS...
- // -------------------------------------
-
- /**
- * Return the actual IConnectorService object. We return an instance of UniversalSystem.
- */
- public IConnectorService createConnectorService(IHost host)
- {
- return new FTPConnectorService(host, 21);
- }
-
- /**
- * For all subsystems in a particular SystemConnection, we need to know which
- * ones are to share a single IConnectorService object. To do this, we need a key which
- * is canonical for all subsystems in a given connection. This can be anything,
- * but is typically a unique interface that all subsystems supported a shared
- * IConnectorService object implement.
- * <p>
- * Whatever is returned from here is used as the key into a hashtable to find the
- * singleton IConnectorService object in getSystemObject.
- */
- public Class getSubSystemCommonInterface(ISubSystem subsystem)
- {
- return IFTPSubSystem.class;
- }
- /**
- * Given another subsystem, return true if that subsystem shares a single IConnectorService object
- * with this one. You must override this to return true if you recognize that subsystem
- * as one of your own. You are guaranteed the other subsystem will be from the same
- * SystemConnection as this one.
- * <p>
- * You can't assume a SystemConnection will you only have subsystems of that you created,
- * so you should only return true if it implements your interface or you know it is an
- * instance of your subsystem class.
- * <p>
- * This should simply return (otherSubSystem instanceof interface) where interface is
- * the same one returned from getSubSystemCommonInterface
- *
- * @return true if otherSubSystem instanceof IUniversalSubSystem
- */
- public boolean sharesSystem(ISubSystem otherSubSystem)
- {
- return (otherSubSystem instanceof IFTPSubSystem);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/IFTPSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/IFTPSubSystem.java
deleted file mode 100644
index 49bc64220..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/connectorservice/IFTPSubSystem.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ftp.connectorservice;
-
-public interface IFTPSubSystem {
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/model/FTPFileAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/model/FTPFileAdapter.java
deleted file mode 100644
index c0a1113fd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/model/FTPFileAdapter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ftp.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.ftp.FTPHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-public class FTPFileAdapter implements IHostFileToRemoteFileAdapter
-{
-
- public IRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes)
- {
- boolean showHidden = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.SHOWHIDDEN);
-
- List results = new ArrayList();
- for (int i = 0; i < nodes.length; i++)
- {
- FTPHostFile node = (FTPHostFile)nodes[i];
- if (showHidden || !node.isHidden())
- {
- IRemoteFile ftpFile = new FTPRemoteFile(ss, context, parent, node);
- results.add(ftpFile);
- ss.cacheRemoteFile(ftpFile);
- }
- }
- return (IRemoteFile[])results.toArray(new IRemoteFile[results.size()]);
- }
-
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, String name, boolean isDirectory, boolean isRoot)
- {
- return null;
- }
-
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node)
- {
- IRemoteFile file = new FTPRemoteFile(ss, context, parent, (FTPHostFile)node);
- ss.cacheRemoteFile(file);
- return file;
- }
-
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, Object object)
- {
- // TODO Auto-generated method stub
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/model/FTPRemoteFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/model/FTPRemoteFile.java
deleted file mode 100644
index 3d095a91e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/model/FTPRemoteFile.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ftp.model;
-
-
-import org.eclipse.rse.services.files.ftp.FTPHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.AbstractRemoteFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-
-
-
-public class FTPRemoteFile extends AbstractRemoteFile
-{
- protected FTPHostFile _ftpHostFile;
-
- public FTPRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, FTPHostFile hostFile)
- {
- super(ss, context, parent, hostFile);
- _ftpHostFile = hostFile;
- }
-
- public boolean isVirtual()
- {
- return false;
- }
-
- public String getCanonicalPath()
- {
- return getAbsolutePath();
- }
-
- public String getClassification()
- {
- if (isFile())
- {
- return "file"; //$NON-NLS-1$
- }
- else
- {
- return "directory"; //$NON-NLS-1$
- }
- }
-
-
-
-
-
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/.classpath b/rse/plugins/org.eclipse.rse.subsystems.files.local/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.files.local/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/.project b/rse/plugins/org.eclipse.rse.subsystems.files.local/.project
deleted file mode 100644
index 34f32642d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.files.local</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.files.local/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF
deleted file mode 100644
index d78ceb777..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.files.local;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.files.local.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.services.local,
- org.eclipse.rse.connectorservice.local,
- org.eclipse.rse.files.ui,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.rse.subsystems.files.local,
- org.eclipse.rse.subsystems.files.local.model
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/about.html b/rse/plugins/org.eclipse.rse.subsystems.files.local/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/build.properties b/rse/plugins/org.eclipse.rse.subsystems.files.local/build.properties
deleted file mode 100644
index 34e219f76..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfiles_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfiles_obj.gif
deleted file mode 100644
index 874c99262..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfiles_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfileslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfileslive_obj.gif
deleted file mode 100644
index 885b8a69e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/icons/full/obj16/systemfileslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.properties
deleted file mode 100644
index 2e51fbe47..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE Local Files
-providerName = Eclipse.org
-
-Files=Local Files
-FilesDescription=This configuration allows you to work with files on the local system and doesn't require any communication server to be running. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.xml
deleted file mode 100644
index f3f72c758..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Local"
- name="%Files"
- description="%FilesDescription"
- iconlive="icons/full/obj16/systemfileslive_obj.gif"
- icon="icons/full/obj16/systemfiles_obj.gif"
- category="files"
- class="org.eclipse.rse.subsystems.files.local.LocalFileSubSystemConfiguration"
- vendor="%providerName"
- priority="100"
- id="local.files">
- </configuration>
- </extension>
-
-</plugin>
- \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/Activator.java
deleted file mode 100644
index 30f913c3b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/Activator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.local;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- // make sure files.ui is activated
- org.eclipse.rse.files.ui.Activator.getDefault();
- }
-
- /**
- * 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.files.local", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java
deleted file mode 100644
index 2db600213..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.local;
-
-import java.util.Vector;
-
-import org.eclipse.rse.connectorservice.local.LocalConnectorService;
-import org.eclipse.rse.connectorservice.local.LocalConnectorServiceManager;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.local.ILocalService;
-import org.eclipse.rse.services.local.files.LocalFileService;
-import org.eclipse.rse.services.local.search.LocalSearchService;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.local.model.LocalFileAdapter;
-
-
-/**
- * Provides a factory for generating instances of the class
- * SampleFileSubSystem.
- */
-public class LocalFileSubSystemConfiguration extends FileServiceSubSystemConfiguration
-{
- protected boolean _isWindows;
- protected IHostFileToRemoteFileAdapter _hostFileAdapter;
- public LocalFileSubSystemConfiguration()
- {
- super();
- String osName = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
-
- _isWindows = (osName.startsWith("windows")); //$NON-NLS-1$
- setIsUnixStyle(!_isWindows);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = FileServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsArchiveManagement()
- */
- public boolean supportsArchiveManagement() {
- return true;
- }
-
- /**
- * Override from parent.
- * Create the default filter pool when this factory is first created, and populate it with
- * default filters.
- * <p>
- * For local, what default filters we create we depends on the local operating system:
- * <ul>
- * <li>_isWindows: "Drives" listing all the local drives
- * <li>Others: "Root files" listing all the contents of the root drive
- * </ul>
- */
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"in createDefaultFilterPool for remote file subsystem factory");
- ISystemFilterPool pool = null;
- try {
- // -----------------------------------------------------
- // create a pool named filters
- // -----------------------------------------------------
- pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
- if (pool == null) // hmmm, why would this happen?
- {
- SystemBasePlugin.logError("Creating default filter pool "+getDefaultFilterPoolName(mgr.getName(), getId())+" for mgr "+mgr.getName()+" failed.",null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return null;
- }
- //System.out.println("Pool created");
- // ---------------------------------------------------------------------------------------------
- // create default filters in that pool iff this is the user's private profile we are creating...
- // ---------------------------------------------------------------------------------------------
- if (isUserPrivateProfile(mgr))
- {
- // Create 'My Home' filter for local (should apply to both _isWindows and linux clients)
- String myHomeFilterName = SystemFileResources.RESID_FILTER_MYHOME;
- RemoteFileFilterString myDocsFilterString = new RemoteFileFilterString(this);
- myDocsFilterString.setPath(System.getProperty("user.home") + getSeparator()); //$NON-NLS-1$
- Vector myDocsFilterStrings = new Vector();
- myDocsFilterStrings.add(myDocsFilterString.toString());
- mgr.createSystemFilter(pool, myHomeFilterName, myDocsFilterStrings);
-
-
- Vector filterStrings = new Vector();
- RemoteFileFilterString defaultFilterString = new RemoteFileFilterString(this);
- if (!_isWindows)
- defaultFilterString.setPath(getSeparator());
- filterStrings.add(defaultFilterString.toString());
- //System.out.println("creating filter...");
- String filterName = null;
- if (_isWindows)
- filterName = SystemFileResources.RESID_FILTER_DRIVES;
- else
- filterName = SystemFileResources.RESID_FILTER_ROOTFILES;
- mgr.createSystemFilter(pool, filterName, filterStrings);
- }
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Error creating default filter pool",exc); //$NON-NLS-1$
- }
- return pool;
- }
-
- /**
- * Instantiate and return an instance of OUR subystem.
- * Do not populate it yet though!
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(IHost)
- */
- public ISubSystem createSubSystemInternal(IHost host)
- {
- LocalConnectorService connectorService = (LocalConnectorService)getConnectorService(host);
- ISubSystem subsys = new FileServiceSubSystem(host, connectorService, getFileService(host), getHostFileAdapter(), getSearchService(host));
- return subsys;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFileTypes()
- */
- public boolean supportsFileTypes() {
- return false;
- }
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsSearch()
- */
- public boolean supportsSearch() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsEnvironmentVariablesPropertyPage()
- */
- public boolean supportsEnvironmentVariablesPropertyPage() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters() {
- return true;
- }
-
- /**
- * Returns <code>false</code>.
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration#supportsSubSystemConnect()
- */
- public boolean supportsSubSystemConnect() {
- return false;
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return LocalConnectorServiceManager.getTheLocalSystemManager().getConnectorService(host, getServiceImplType());
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- LocalConnectorServiceManager.getTheLocalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public IFileService createFileService(IHost host)
- {
- return new LocalFileService(SystemFileTransferModeRegistry.getDefault());
- }
-
- public ISearchService createSearchService(IHost host)
- {
- return new LocalSearchService();
- }
-
- /**
- * Creates a config and adds it to the result set.
- * @see org.eclipse.rse.services.search.IHostSearchResultConfigurationFactory#createSearchConfiguration(org.eclipse.rse.services.search.IHostSearchResultSet, java.lang.Object, org.eclipse.rse.services.clientserver.SystemSearchString)
- */
- public IHostSearchResultConfiguration createSearchConfiguration(IHost host, IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString)
- {
- IHostSearchResultConfiguration config = new LocalSearchResultConfiguration(resultSet, searchTarget, searchString, getSearchService(host));
- resultSet.addSearchConfiguration(config);
- return config;
- }
-
- public IHostFileToRemoteFileAdapter getHostFileAdapter()
- {
- if (_hostFileAdapter == null)
- {
- _hostFileAdapter = new LocalFileAdapter();
- }
- return _hostFileAdapter;
- }
-
- public ILanguageUtilityFactory getLanguageUtilityFactory(IRemoteFileSubSystem ss)
- {
- return LocalLanguageUtilityFactory.getInstance(ss);
- }
-
- public Class getServiceImplType()
- {
- return ILocalService.class;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalJavaLanguageUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalJavaLanguageUtility.java
deleted file mode 100644
index 25df9b329..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalJavaLanguageUtility.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.local;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.internal.subsystems.files.core.AbstractJavaLanguageUtility;
-import org.eclipse.rse.services.clientserver.java.ClassFileUtil;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.local.model.LocalFile;
-
-/**
- * This class is the Java language utility for local.
- */
-public class LocalJavaLanguageUtility extends AbstractJavaLanguageUtility {
-
- /**
- * Constructor.
- * @param subsystem the subsystem with which the utility is associated.
- * @param language the language.
- */
- public LocalJavaLanguageUtility(IRemoteFileSubSystem subsystem, String language) {
- super(subsystem, language);
- }
-
- /**
- * The given remote file must be an instance of <code>LocalFileImpl</code>.
- * @see org.eclipse.rse.internal.subsystems.files.core.IJavaLanguageUtility#getQualifiedClassName(org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile)
- */
- public String getQualifiedClassName(IRemoteFile remoteFile) {
-
- try {
- if (remoteFile instanceof LocalFile) {
- File file = (File)(remoteFile.getFile());
- return ClassFileUtil.getInstance().getQualifiedClassName(file);
- }
- else {
- return null;
- }
- }
- catch (IOException e) {
- SystemBasePlugin.logError("Error occurred trying to get qualified class name", e); //$NON-NLS-1$
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalLanguageUtilityFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalLanguageUtilityFactory.java
deleted file mode 100644
index 321f13601..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalLanguageUtilityFactory.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.local;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.internal.subsystems.files.core.AbstractLanguageUtilityFactory;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtility;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-/**
- * This is a singleton factory class associated each universal subsystem.
- */
-public class LocalLanguageUtilityFactory extends AbstractLanguageUtilityFactory {
-
- private static Map instances;
-
- /**
- * Constructor.
- * @param subsystem the local subsystem with which this factory is associated.
- */
- private LocalLanguageUtilityFactory(IRemoteFileSubSystem subsystem) {
- super(subsystem);
- }
-
- /**
- * Returns an instance for each subsystem. Note that there is just a singleton instance for
- * each local subsystem.
- * @param subsystem the local subsystem.
- * @return the singleton instance associated with the subsystem.
- */
- public static ILanguageUtilityFactory getInstance(IRemoteFileSubSystem subsystem) {
-
- // initialize map if needed
- if (instances == null) {
- instances = new HashMap();
- }
-
- // check if there is a factory for the subsystem already
- ILanguageUtilityFactory factory = (ILanguageUtilityFactory)(instances.get(subsystem));
-
- // if none, then create the factory, and store the factory for this subsystem
- if (factory == null) {
- factory = new LocalLanguageUtilityFactory(subsystem);
- instances.put(subsystem, factory);
- }
-
- return factory;
- }
-
- /**
- * @see org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory#getUtility(java.lang.String)
- */
- public ILanguageUtility getUtility(String language) {
-
- if (language.equals(ILanguageUtility.LANGUAGE_JAVA)) {
- return new LocalJavaLanguageUtility(getSubSystem(), language);
- }
-
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalSearchResultConfiguration.java
deleted file mode 100644
index 48c2f87ad..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalSearchResultConfiguration.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.local;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.search.AbstractSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
-
-
-public class LocalSearchResultConfiguration extends AbstractSearchResultConfiguration
-{
- protected IHostFileToRemoteFileAdapter _fileAdapter;
- protected IRemoteFile _searchObject;
- protected FileServiceSubSystem _fileSubSystem;
-
- /**
- * Constructor to create a local search result configuration.
- * @param resultSet the parent result set.
- * @param searchObject the search target.
- * @param string the search string.
- */
- public LocalSearchResultConfiguration(IHostSearchResultSet resultSet, Object searchObject, SystemSearchString string, ISearchService searchService)
- {
- super(resultSet, searchObject, string, searchService);
- if (searchObject instanceof IRemoteFile)
- {
- _searchObject = (IRemoteFile)searchObject;
- _fileSubSystem = (FileServiceSubSystem)_searchObject.getParentRemoteFileSubSystem();
- _fileAdapter = _fileSubSystem.getHostFileToRemoteFileAdapter();
- }
- }
-
- public Object[] getResults()
- {
- Object[] results = super.getResults();
- IRemoteFile[] convertedResults = new IRemoteFile[results.length];
- for (int i = 0; i < results.length; i++)
- {
- IHostFile fileNode = (IHostFile)results[i];
- if (fileNode != null)
- {
- IRemoteFile remoteFile = _fileAdapter.convertToRemoteFile(_fileSubSystem, _fileSubSystem.getContextFor(_searchObject), null, fileNode);
-
- Object[] contained = getContainedResults(fileNode);
-
- if (contained != null)
- {
- // reset the parent of search results to the remote file
- for (int c = 0; c < contained.length; c++)
- {
- ((IHostSearchResult)contained[c]).setParent(remoteFile);
- }
- remoteFile.setContents(RemoteSearchResultsContentsType.getInstance(), getSearchString().getTextString(), contained);
- }
- convertedResults[i] = remoteFile;
- }
- }
-
- return convertedResults;
- }
-
-
-
-
-
- /**
- * @see org.eclipse.rse.services.search.IHostSearchResultConfiguration#cancel()
- */
- public void cancel() {
-
- // if not running, call super
- if (getStatus() != RUNNING) {
- super.cancel();
- return;
- }
-
- // cancel search
- getSearchService().cancelSearch(null, this);
- }
-
- public Object getSearchTarget()
- {
- try
- {
- return _fileSubSystem.getFileService().getFile(null, _searchObject.getParentPath(), _searchObject.getName());
- //return _searchObject.getAbsolutePath();
- }
- catch (Exception e)
- {
-
- }
- return null;
- }
-
- public FileServiceSubSystem getFileServiceSubSystem()
- {
- return _fileSubSystem;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalFile.java
deleted file mode 100644
index aee1781e8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalFile.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.local.model;
-
-import org.eclipse.rse.services.clientserver.SystemFileClassifier;
-import org.eclipse.rse.services.local.files.LocalHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.AbstractRemoteFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-
-
-
-public class LocalFile extends AbstractRemoteFile implements IRemoteFile
-{
- protected LocalHostFile _localHostFile;
- protected String _classification;
-
- public LocalFile(FileServiceSubSystem subSystem, IRemoteFileContext context, IRemoteFile parent, LocalHostFile hostFile)
- {
- super(subSystem, context, parent, hostFile);
- _localHostFile = hostFile;
- }
-
- public Object getFile()
- {
- return _localHostFile.getFile();
- }
-
- public boolean isVirtual()
- {
- return false;
- }
-
- public String getCanonicalPath()
- {
- try
- {
- return _localHostFile.getFile().getCanonicalPath();
- }
- catch (Exception e)
- {
- return ""; //$NON-NLS-1$
- }
- }
-
- public String getClassification() {
-
- if (_classification == null && isFile())
- {
- _classification = SystemFileClassifier.getInstance().classifyFile(getAbsolutePath());
- }
-
- return _classification;
- }
-
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalFileAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalFileAdapter.java
deleted file mode 100644
index 1d811a0cc..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalFileAdapter.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.local.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.local.files.LocalHostFile;
-import org.eclipse.rse.services.local.files.LocalVirtualHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-public class LocalFileAdapter implements IHostFileToRemoteFileAdapter
-{
-
-
-
- public IRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes)
- {
- if (nodes == null) return null;
- boolean showHidden = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.SHOWHIDDEN);
-
- List results = new ArrayList();
- for (int i = 0; i < nodes.length; i++)
- {
- IHostFile child = nodes[i];
- if (showHidden || !child.isHidden())
- {
- IRemoteFile lfile;
- if (child instanceof LocalVirtualHostFile)
- {
- LocalVirtualHostFile node = (LocalVirtualHostFile)child;
- lfile = new LocalVirtualFile(ss, context, node);
- }
- else
- {
- LocalHostFile node = (LocalHostFile)child;
- lfile = new LocalFile(ss, context, parent, node);
- }
- results.add(lfile);
- ss.cacheRemoteFile(lfile);
- }
- }
- return (IRemoteFile[])results.toArray(new IRemoteFile[results.size()]);
-
- }
-
-
-
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node)
- {
- IRemoteFile file = null;
- if (node instanceof LocalVirtualHostFile)
- file = new LocalVirtualFile(ss, context, (LocalVirtualHostFile) node);
- else file = new LocalFile(ss, context, parent, (LocalHostFile)node);
- ss.cacheRemoteFile(file);
- return file;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalVirtualFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalVirtualFile.java
deleted file mode 100644
index 267843e50..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/model/LocalVirtualFile.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.subsystems.files.local.model;
-
-import java.io.File;
-
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.local.files.LocalVirtualHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class LocalVirtualFile extends LocalFile implements IVirtualRemoteFile
-{
-
- protected File _parentArchive;
- protected LocalVirtualHostFile _node;
- protected String _absolutePath = null;
-
- public LocalVirtualFile(FileServiceSubSystem ss, IRemoteFileContext context, LocalVirtualHostFile node)
- {
- super(ss, context, context.getParentRemoteFile(), node);
- _node = node;
- _parentArchive = _node.getChild().getContainingArchive();
- }
-
-
- public String getAbsolutePath()
- {
- return _parentArchive.getAbsolutePath() + ArchiveHandlerManager.VIRTUAL_SEPARATOR + getVirtualFullName();
- }
-
- public File getParentArchive()
- {
- return _parentArchive;
- }
-
- public VirtualChild getVirtualChild()
- {
- return _node.getChild();
- }
-
- public boolean isVirtual()
- {
- return true;
- }
-
- public String getVirtualFullName()
- {
- return _node.getChild().fullName;
- }
-
- public String getVirtualFullPath()
- {
- return _node.getChild().path;
- }
-
- public String getVirtualName()
- {
- return _node.getChild().name;
- }
-
- public void setVirtualFullName(String string)
- {
- _node.getChild().renameTo(string);
- }
-
- public void setVirtualFullPath(String string)
- {
- if (string.equals("")) //$NON-NLS-1$
- {
- _node.getChild().renameTo(_node.getChild().name);
- }
- else
- {
- _node.getChild().renameTo(string + "/" + _node.getChild().name); //$NON-NLS-1$
- }
- }
-
- public void setVirtualName(String string)
- {
- if (_node.getChild().path.equals("")) //$NON-NLS-1$
- {
- _node.getChild().renameTo(string);
- }
- else
- {
- _node.getChild().renameTo(_node.getChild().path + "/" + string); //$NON-NLS-1$
- }
- }
-
- public File getFileWrapper()
- {
- return _node.getFile();
- }
-
- public boolean canRead()
- {
- return _parentArchive.canRead();
- }
-
- public boolean canWrite()
- {
- return _parentArchive.canWrite();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile#getComment()
- */
- public String getComment()
- {
- return _node.getChild().getComment();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile#getCompressedSize()
- */
- public long getCompressedSize()
- {
- return _node.getChild().getCompressedSize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile#getCompressionMethod()
- */
- public String getCompressionMethod()
- {
- return _node.getChild().getCompressionMethod();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile#getCompressionRatio()
- */
- public double getCompressionRatio()
- {
- return _node.getChild().getCompressionRatio();
- }
-
- public Object getFile(String srcEncoding, boolean isText)
- {
- return _node.getChild().getExtractedFile(srcEncoding, isText);
- }
-
- public String getContainingArchiveFullName()
- {
- return _node.getChild().getContainingArchive().getAbsolutePath();
- }
-
-
- public long getExpandedSize()
- {
- return _node.getSize();
- }
-
-
- public boolean isVirtualFile()
- {
- return !_node.getChild().isDirectory;
- }
-
-
- public boolean isVirtualFolder()
- {
- return _node.getChild().isDirectory;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.classpath b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.project b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.project
deleted file mode 100644
index bffdbdcd6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.files.ssh</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.ui.prefs b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 07346397c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Jul 07 11:19:10 CEST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;org.eclipse.rse;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/META-INF/MANIFEST.MF
deleted file mode 100644
index 1f24bb671..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.files.ssh; singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.files.ssh.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.connectorservice.ssh,
- org.eclipse.rse.services.ssh,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.core,
- org.eclipse.rse.ui,
- org.eclipse.rse.files.ui
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.subsystems.files.ssh
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/about.html b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/build.properties b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/build.properties
deleted file mode 100644
index 26166e45d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/icons/full/obj16/systemfiles_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/icons/full/obj16/systemfiles_obj.gif
deleted file mode 100644
index 874c99262..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/icons/full/obj16/systemfiles_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/icons/full/obj16/systemfileslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/icons/full/obj16/systemfileslive_obj.gif
deleted file mode 100644
index 885b8a69e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/icons/full/obj16/systemfileslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.properties
deleted file mode 100644
index eb37b776a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = RSE SSH Files
-providerName = Eclipse.org
-
-SshFileSubsystemName=Sftp Files
-SshFileSubsystemDescription=Work with files on remote systems using the Secure Shell (ssh) protocol.
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.xml
deleted file mode 100644
index 116f0d593..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006 Wind River Systems, Inc.
-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:
-Martin Oberhuber - initial API and implementation
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Linux;Unix;AIX;SSH Only"
- name="%SshFileSubsystemName"
- description="%SshFileSubsystemDescription"
- iconlive="icons/full/obj16/systemfileslive_obj.gif"
- icon="icons/full/obj16/systemfiles_obj.gif"
- category="files"
- class="org.eclipse.rse.subsystems.files.ssh.SftpFileSubSystemConfiguration"
- vendor="%providerName"
- priority="100"
- id="ssh.files">
- </configuration>
- </extension>
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/Activator.java
deleted file mode 100644
index b1fe2adb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/Activator.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- * Dave McKnight (IBM) - Fix bug 148971: activate files.ui on startup
- *******************************************************************************/
-package org.eclipse.rse.subsystems.files.ssh;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rse.subsystems.files.ssh"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- // make sure files.ui is activated
- org.eclipse.rse.files.ui.Activator.getDefault();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileAdapter.java
deleted file mode 100644
index 2423e0678..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileAdapter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted from FTPFileAdapter.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ssh;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.ssh.files.SftpHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-public class SftpFileAdapter implements IHostFileToRemoteFileAdapter {
-
- public IRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes) {
- boolean showHidden = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.SHOWHIDDEN);
-
- List results = new ArrayList();
- if (nodes!=null) {
- for (int i = 0; i < nodes.length; i++) {
- SftpHostFile node = (SftpHostFile)nodes[i];
- if (showHidden || !node.isHidden()) {
- IRemoteFile remoteFile = new SftpRemoteFile(ss, context, parent, node);
- results.add(remoteFile);
- ss.cacheRemoteFile(remoteFile);
- }
- }
- }
- return (IRemoteFile[])results.toArray(new IRemoteFile[results.size()]);
- }
-
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, String name, boolean isDirectory, boolean isRoot) {
- return null;
- }
-
- public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node) {
- IRemoteFile file = new SftpRemoteFile(ss, context, parent, (SftpHostFile)node);
- ss.cacheRemoteFile(file);
- return file;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileSubSystemConfiguration.java
deleted file mode 100644
index 08a9b0d1d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ssh;
-
-import org.eclipse.rse.connectorservice.ssh.SshConnectorService;
-import org.eclipse.rse.connectorservice.ssh.SshConnectorServiceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.services.ssh.ISshService;
-import org.eclipse.rse.services.ssh.files.SftpFileService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-public class SftpFileSubSystemConfiguration extends FileServiceSubSystemConfiguration {
-
- protected IHostFileToRemoteFileAdapter _hostFileAdapter;
-
- public SftpFileSubSystemConfiguration() {
- super();
- setIsUnixStyle(true);
- }
-
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = FileServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
- public ISubSystem createSubSystemInternal(IHost host) {
- SshConnectorService connectorService = (SshConnectorService)getConnectorService(host);
- ISubSystem subsys = new FileServiceSubSystem(host, connectorService, getFileService(host), getHostFileAdapter(), getSearchService(host));
- return subsys;
- }
-
- public IConnectorService getConnectorService(IHost host) {
- return SshConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService) {
- SshConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public IFileService createFileService(IHost host) {
- SshConnectorService connectorService = (SshConnectorService)getConnectorService(host);
- return new SftpFileService(connectorService);
- }
-
- public ISearchService createSearchService(IHost host) {
- // no search service supported for ssh/sftp at moment
- return null;
- }
-
- public IHostFileToRemoteFileAdapter getHostFileAdapter() {
- if (_hostFileAdapter == null) {
- _hostFileAdapter = new SftpFileAdapter();
- }
- return _hostFileAdapter;
- }
-
- public Class getServiceImplType() {
- return ISshService.class;
- }
-
- public IHostSearchResultConfiguration createSearchConfiguration(IHost host, IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString) {
- return null;
- }
-
- public ILanguageUtilityFactory getLanguageUtilityFactory(IRemoteFileSubSystem ss) {
- return null;
- }
-
- public boolean supportsArchiveManagement() {
- return false;
- }
-
- public boolean supportsFileTypes() {
- return false;
- }
-
- public boolean supportsSearch() {
- return false;
- }
-
- public boolean supportsEnvironmentVariablesPropertyPage() {
- return false;
- }
-
- public boolean supportsFilters() {
- return true;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpRemoteFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpRemoteFile.java
deleted file mode 100644
index 6a5c308be..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpRemoteFile.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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:
- * Martin Oberhuber (Wind River) - Adapted from FTPRemoteFile.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.ssh;
-
-import org.eclipse.rse.services.ssh.files.SftpHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.AbstractRemoteFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-
-public class SftpRemoteFile extends AbstractRemoteFile {
-
- public SftpRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, SftpHostFile hostFile) {
- super(ss, context, parent, hostFile);
- }
-
- public SftpHostFile getSftpHostFile() {
- return (SftpHostFile)getHostFile();
- }
-
- public boolean isVirtual() {
- return false;
- }
-
- public String getCanonicalPath() {
- return getAbsolutePath();
- }
-
- public String getClassification() {
- return getSftpHostFile().getClassification();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.classpath b/rse/plugins/org.eclipse.rse.subsystems.processes.core/.classpath
deleted file mode 100644
index b7464f3ca..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.processes.core/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.project b/rse/plugins/org.eclipse.rse.subsystems.processes.core/.project
deleted file mode 100644
index 7651403d0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.processes.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.processes.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF
deleted file mode 100644
index e35922434..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.processes.core;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.rse.subsystems.processes.core,
- org.eclipse.rse.subsystems.processes.core.subsystem,
- org.eclipse.rse.subsystems.processes.core.subsystem.impl,
- org.eclipse.rse.subsystems.processes.servicesubsystem
-art: true
-Require-Bundle: org.eclipse.rse.services,
- org.eclipse.core.runtime,
- org.eclipse.swt,
- org.eclipse.ui,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Bundle-Activator: org.eclipse.rse.subsystems.processes.core.Activator
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/about.html b/rse/plugins/org.eclipse.rse.subsystems.processes.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties
deleted file mode 100644
index 737bcabbe..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- .,\
- plugin.properties
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties
deleted file mode 100644
index c7956888c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE Processes Core
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/Activator.java
deleted file mode 100644
index 46f2c3b55..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/Activator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.processes.core", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IHostProcessToRemoteProcessAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IHostProcessToRemoteProcessAdapter.java
deleted file mode 100644
index d210ce6ea..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IHostProcessToRemoteProcessAdapter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem;
-
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-
-/**
- * An adapter for converting from IHostProcesses to IRemoteProcesses. An IHostProcess is an abstract representation of a
- * process on a host machine, whereas an IRemoteProcess also contains information that is RSE specific.
- * @author mjberger
- *
- */
-public interface IHostProcessToRemoteProcessAdapter
-{
- /**
- * Convert a set of IHostProcess objects to IRemoteProcess objects.
- * @param context An object representing some contextual information for the processes
- * @param parent The parent process object
- * @param nodes The set of IHostProcess objects to convert
- * @return the converted objects
- */
- public IRemoteProcess[] convertToRemoteProcesses(IRemoteProcessContext context, IRemoteProcess parent, IHostProcess[] nodes);
-
- /**
- * Convert a single IHostProcess object to an IRemoteProcess object.
- * @param context An object representing some contextual information for the process
- * @param parent The parent process object
- * @param node The IHostProcess object to convert
- * @return the converted object
- */
- public IRemoteProcess convertToRemoteProcess(IRemoteProcessContext context, IRemoteProcess parent, IHostProcess node);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java
deleted file mode 100644
index 88f121d91..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem;
-
-
-
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-
-/**
- *
- * @author mjberger
- *
- * This interface represents a handle to a remote process object
- * It differs from an IHostProcess in that it contains extra, RSE-specific
- * information.
- * <ul>
- * <li>This is an interface, so there are no static methods
- * <li>This are no action methods, only read methods. The action methods
- * such as kill are found in the process subsystem interface.
- * All remote commands/actions are funnelled through subsystems in this
- * remote system framework.
- * <li>Similarly, you do not construct these objects directly. Rather, there are
- * factory methods in IRemoteProcessSubSystem to create them.
- * </ul>
- * <p>
- */
-public interface IRemoteProcess extends IHostProcess, IAdaptable
-{
-
- /**
- * Get parent subsystem
- */
- public IRemoteProcessSubSystem getParentRemoteProcessSubSystem();
-
- /**
- * Return the connection this remote process is from.
- */
- public IHost getSystemConnection();
-
- /**
- * Return the filter string resolved to get this object
- */
- public IHostProcessFilter getFilterString();
-
- /**
- * Set the filter string resolved to get this object
- */
- public void setFilterString(IHostProcessFilter filterString);
-
- /**
- * Get fully qualified connection and folder name of associated object in /proc filesystem: profile.connection/path/procfolder.
- * Note the separator character between the profile name and the connection name is always '.'
- * Note the separator character between the connection and qualified-folder is always ':'
- */
- public String getAbsolutePathPlusConnection();
-
- /**
- * Get the parent remote process of this process
- */
- public IRemoteProcess getParentRemoteProcess();
-
- /**
- * Return the context associated with this remote file
- */
- public IRemoteProcessContext getContext();
-
- /**
- * Get fully qualified name of associated object in /proc filesystem: root plus path plus pid. No connection name.
- */
- public String getAbsolutePath();
-
- /**
- * Get the underlying object that this object wrappers, whether that is a
- * DataElement or an IRemoteServerProcess, or something else is implementation specific.
- */
- public Object getObject();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessContext.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessContext.java
deleted file mode 100644
index 3fb4667cb..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessContext.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.subsystems.processes.core.subsystem;
-
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-
-/**
- * This interface represents a place to hold contextual information stored within
- * each remote process object.
- * <p>
- * We store in here information that might be the same for multiple remote process objects,
- * in order to save memory. This way, we can merely hold a reference to a single object,
- * which itself may have numerous pieces of information helpful when processing actions
- * on a particular remote object.
- */
-public interface IRemoteProcessContext
-{
-
- /**
- * Get parent subsystem
- */
- public IRemoteProcessSubSystem getParentRemoteProcessSubSystem();
-
- /**
- * Return the parent remote process object expanded to get this object, or null if no such parent
- */
- public IRemoteProcess getParentRemoteProcess();
-
- /**
- * Return the filter string used to resolve the list resulting in this remote object.
- */
- public IHostProcessFilter getFilterString();
-
- /**
- * Return all the filter string objects applicable to this folder object.
- */
- public IHostProcessFilter[] getAllFilterStrings();
-
- /**
- * Set parent subsystem
- */
- public void setParentRemoteProcessSubSystem(IRemoteProcessSubSystem parentSubSystem);
-
- /**
- * Set the parent remote process object expanded to get this object, or null if no such parent
- */
- public void setParentRemoteProcess(IRemoteProcess parentProcess);
-
- /**
- * Set the filter string used to resolve the list resulting in this remote object.
- */
- public void setFilterString(IHostProcessFilter filterString);
-
- /**
- * Add an additional filter string. This is called for processes in a multi-filter string
- * filter. It is called for each filter string that lists the contents of the same parent
- * path, when show subprocesses is true. It is needed to support the subsequent expansion of
- * this branch of the process tree, so that it can filter on all the appropriate filter strings.
- */
- public void addFilterString(IHostProcessFilter additionalFilterString);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystem.java
deleted file mode 100644
index 2e367683a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystem.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.subsystems.processes.core.subsystem;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-/**
- * The RSE subsystem for Remote Processes
- * @author mjberger
- *
- */
-public interface IRemoteProcessSubSystem extends ISubSystem
-{
-
- // ----------------------
- // HELPER METHODS...
- // ----------------------
-
- /**
- * Return parent subsystem factory, cast to a RemoteProcessSubSystemConfiguration
- */
- public IRemoteProcessSubSystemConfiguration getParentRemoteProcessSubSystemConfiguration();
-
- /**
- * Return true if names are case-sensitive. Used when doing name or type filtering
- */
- public boolean isCaseSensitive();
-
- // ----------------------
- // PROCESS METHODS...
- // ----------------------
-
- /**
- * Return a list of all processes on the remote system.
- * This version is called directly by users.
- * @param processNameFilter filter the results according to this object
- * @param context A context object that will be associated with each returned process
- * @param monitor the progress monitor
- * @return the list of all processes running on the host machine that correspond to the filter,
- * or null if there are none.
- */
- public IRemoteProcess[] listAllProcesses(IHostProcessFilter processNameFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws InterruptedException, SystemMessageException;
-
- /**
- * Returns root processes
- * @param context A context object that will be associated with each returned process
- * @param monitor the progress monitor
- */
- public IRemoteProcess[] listRoots(IRemoteProcessContext context, IProgressMonitor monitor);
-
- /**
- * Return a list of all remote child processes of the given parent process on the remote system
- * @param parent The parent process whose children to list
- * @param context A context object that will be associated with each returned process
- * @param monitor the progress monitor
- */
- public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote child processes of the given process, which match the filter.
- * @param parent The parent process whose children to list
- * @param processFilter The process filter to subset the list by, or null to return all child processes.
- * @param context A context object that will be associated with each returned process
- * @param monitor the progress monitor
- */
- public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Given a process, return its parent process object.
- * @param process the process to return parent of.
- */
- public IRemoteProcess getParentProcess(IRemoteProcess process);
-
- /**
- * Given a pid, return an IRemoteProcess object for it.
- * @param pid The pid of the desired process
- */
- public IRemoteProcess getRemoteProcessObject(long pid) throws SystemMessageException;
-
- /**
- * Kill the given process.
- *
- * @param process represents the object to be killed.
- * @return false if the given process doesn't exist, else true. Throws an exception if anything fails.
- */
- public boolean kill(IRemoteProcess process, String signal) throws SystemMessageException;
-
- /**
- * Returns a list of the types of signals that can be sent to
- * a process on the remote system.
- * @return the signal types, or null if there are none, or they cannot be found.
- */
- public String[] getSignalTypes() throws SystemMessageException;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystemConfiguration.java
deleted file mode 100644
index 7ee9fa99d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.subsystems.processes.core.subsystem;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * An interface representing factories for creating RemoteProcessSubSystem objects.
- * @author mjberger
- *
- */
-public interface IRemoteProcessSubSystemConfiguration extends ISubSystemConfiguration
-{
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java
deleted file mode 100644
index 5b5d08d52..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem;
-
-import org.eclipse.osgi.util.NLS;
-
-
-public class SystemProcessesCoreResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.subsystems.processes.core.subsystem.SystemProcessesCoreResources"; //$NON-NLS-1$
-
- // PROCESS PROPERTIES
- public static String RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL;
- public static String RESID_PROPERTY_PROCESS_MYPROCESSESFILTER_LABEL;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemProcessesCoreResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties
deleted file mode 100644
index f3e2a0e76..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2005, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL=All Processes
-RESID_PROPERTY_PROCESS_MYPROCESSESFILTER_LABEL=My Processes \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessContext.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessContext.java
deleted file mode 100644
index 42dd1d4aa..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessContext.java
+++ /dev/null
@@ -1,157 +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.subsystems.processes.core.subsystem.impl;
-
-
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-
-/**
- * This class represents a place to hold contextual information stored within
- * each remote process object.
- * <p>
- * We store in here information that might be the same for multiple remote process objects,
- * in order to save memory. This way, we can merely hold a reference to a single object,
- * which itself may have numerous pieces of information helpful when processing actions
- * on a particular remote object.
- */
-public class RemoteProcessContext implements IRemoteProcessContext
-{
-
- protected IRemoteProcessSubSystem subsystem;
- protected IRemoteProcess parentProcess;
- protected IHostProcessFilter filterString;
- protected Vector allFilterStrings;
-
- /**
- * Constructor that takes all inputs.
- */
- public RemoteProcessContext(IRemoteProcessSubSystem subsystem, IRemoteProcess parentProcessObject,
- IHostProcessFilter filterString)
- {
- this.subsystem = subsystem;
- this.parentProcess = parentProcessObject;
- this.filterString = filterString;
- }
-
- /**
- * Constructor that takes no inputs.
- */
- public RemoteProcessContext()
- {
- }
- // ------------------------------------------------------------------------
- // SETTER METHODS...
- // ------------------------------------------------------------------------
- /**
- * Set the parent subsystem
- */
- public void setParentRemoteProcessSubSystem(IRemoteProcessSubSystem subsystem)
- {
- this.subsystem = subsystem;
- }
-
- /**
- * Set the parent remote process object of this process
- */
- public void setParentRemoteProcess(IRemoteProcess parentProcessObject)
- {
- this.parentProcess = parentProcessObject;
- }
-
- /**
- * Set the filter string object resolved to get this object
- */
- public void setFilterString(IHostProcessFilter filterString)
- {
- this.filterString = filterString;
- allFilterStrings = null;
- }
-
- /**
- * Add an additional filter string. This is called for folders in a multi-filter string
- * filter. It is needed to support the subsequent expansion of
- * this process, so that it can filter on all the appropriate filter strings.
- */
- public void addFilterString(IHostProcessFilter additionalFilterString)
- {
- if (allFilterStrings == null)
- {
- allFilterStrings = new Vector();
- if (filterString != null)
- allFilterStrings.addElement(filterString);
- }
- // ensure this filter string is not already in the list...
- boolean match = false;
- String newfs = additionalFilterString.toString();
- for (int idx=0; !match && (idx<allFilterStrings.size()); idx++)
- {
- IHostProcessFilter prevfs = (IHostProcessFilter)allFilterStrings.elementAt(idx);
- if (newfs.equals(prevfs.toString()))
- match = true;
- }
- if (!match)
- allFilterStrings.addElement(additionalFilterString);
- }
-
- // ------------------------------------------------------------------------
- // GETTER METHODS...
- // ------------------------------------------------------------------------
-
- /**
- * Return the parent subsystem
- */
- public IRemoteProcessSubSystem getParentRemoteProcessSubSystem()
- {
- return subsystem;
- }
- /**
- * Return the parent remote process object expanded to get this object, or null if no such parent
- */
- public IRemoteProcess getParentRemoteProcess()
- {
- return parentProcess;
- }
-
- /**
- * Return the filter string object resolved to get this object
- */
- public IHostProcessFilter getFilterString()
- {
- return filterString;
- }
-
- /**
- * Return all the filter string objects applicable to this folder object.
- */
- public IHostProcessFilter[] getAllFilterStrings()
- {
- if (allFilterStrings == null)
- return new IHostProcessFilter[] {filterString};
- else
- {
- IHostProcessFilter[] all = new IHostProcessFilter[allFilterStrings.size()];
- for (int idx=0; idx<all.length; idx++)
- all[idx] = (IHostProcessFilter)allFilterStrings.elementAt(idx);
- return all;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java
deleted file mode 100644
index 262fa5334..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.subsystems.processes.core.subsystem.impl;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-
-
-/**
- * Represents a remote process on the client machine. Wrappers an IRemoteServerProcess,
- * with methods for returning information about the underlying process, as well
- * as more client-oriented methods for returning information about the associated
- * subsystem, connection, and filter string.
- * @author mjberger
- *
- */
-public class RemoteProcessImpl implements IRemoteProcess, ISystemProcessRemoteConstants
-{
- public static final char CONNECTION_DELIMITER = ':';
- protected IRemoteProcessContext _context;
- protected IHostProcess _underlyingProcess;
- protected IRemoteProcess _parentProcess;
-
- /**
- * Constructor that takes a context object containing important information.
- * @param context An object holding contextual information about this object
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext
- */
- public RemoteProcessImpl(IRemoteProcessContext context, IHostProcess process)
- {
- _context = context;
- if ((context!=null) && (context.getParentRemoteProcessSubSystem()!=null) &&
- !context.getParentRemoteProcessSubSystem().isConnected())
- try
- {
- // deduce active shell from display
- context.getParentRemoteProcessSubSystem().connect();
- } catch (Exception exc) {}
-
- _underlyingProcess = process;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getParentRemoteProcessSubSystem()
- */
- public IRemoteProcessSubSystem getParentRemoteProcessSubSystem()
- {
- return _context.getParentRemoteProcessSubSystem();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getSystemConnection()
- */
- public IHost getSystemConnection()
- {
- IRemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
- if (ss == null)
- return null;
- else
- return ss.getHost();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getFilterString()
- */
- public IHostProcessFilter getFilterString()
- {
- return _context.getFilterString();
- }
-
- /**
- * Set the filter string resolved to get this object
- */
- public void setFilterString(IHostProcessFilter filterString)
- {
- _context.setFilterString(filterString);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getAbsolutePathPlusConnection()
- */
- public String getAbsolutePathPlusConnection()
- {
- IHost conn = getSystemConnection();
- if (conn == null)
- return getAbsolutePath();
- else
- return conn.getSystemProfileName()+'.'+conn.getAliasName() + CONNECTION_DELIMITER + getAbsolutePath();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getParentRemoteProcess()
- */
- public IRemoteProcess getParentRemoteProcess()
- {
- if (_parentProcess == null)
- {
- IRemoteProcess parentProcess = _context.getParentRemoteProcess();
- if ((parentProcess == null) && getPPid() != -1)
- {
- IRemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
- if (ss != null)
- {
- try
- {
- parentProcess = ss.getRemoteProcessObject(getPPid());
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("UniversalProcessImpl.getParentRemoteProcess()", e); //$NON-NLS-1$
- }
-
- }
- }
- _parentProcess = parentProcess;
- }
- return _parentProcess;
- }
-
- /**
- * Return the context associated with this remote process
- */
- public IRemoteProcessContext getContext()
- {
- return _context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getAbsolutePath()
- */
- public String getAbsolutePath()
- {
- return "/proc/" + getPid(); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getPid()
- */
- public long getPid()
- {
- return _underlyingProcess.getPid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getPPid()
- */
- public long getPPid()
- {
- return _underlyingProcess.getPPid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getName()
- */
- public String getName()
- {
- return _underlyingProcess.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getState()
- */
- public String getState()
- {
- return _underlyingProcess.getState();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getTgid()
- */
- public long getTgid()
- {
- return _underlyingProcess.getTgid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getTracerPid()
- */
- public long getTracerPid()
- {
- return _underlyingProcess.getTracerPid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getUid()
- */
- public long getUid()
- {
- return _underlyingProcess.getUid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getUsername()
- */
- public String getUsername()
- {
- return _underlyingProcess.getUsername();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getGid()
- */
- public long getGid()
- {
- return _underlyingProcess.getGid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#isRoot()
- */
- public boolean isRoot()
- {
- return _underlyingProcess.isRoot();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getAllProperties()
- */
- public String getAllProperties()
- {
- return _underlyingProcess.getAllProperties();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getVmSizeInKB()
- */
- public long getVmSizeInKB()
- {
- return _underlyingProcess.getVmSizeInKB();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getVmRSSInKB()
- */
- public long getVmRSSInKB()
- {
- return _underlyingProcess.getVmRSSInKB();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getLabel()
- */
- public String getLabel()
- {
- return _underlyingProcess.getLabel();
- }
-
- /**
- * Subclasses must override to return the underlying object,
- * whether that is a DataElement, or an IRemoteServerProcess
- */
- public Object getObject()
- {
- return null;
- }
-
- 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.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java
deleted file mode 100644
index db84de7d7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.subsystems.processes.core.subsystem.impl;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-import org.eclipse.rse.subsystems.processes.core.subsystem.SystemProcessesCoreResources;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorServerPortInput;
-
-/**
- * The implementation of the RemoteProcessSubSystemConfiguration interface
- * Contains information about what features the subsystem supports
- * @author mjberger
- *
- */
-public abstract class RemoteProcessSubSystemConfiguration extends
- SubSystemConfiguration implements IRemoteProcessSubSystemConfiguration
-{
-
- public RemoteProcessSubSystemConfiguration()
- {
- super();
- }
-
- // --------------------------------------------
- // PARENT METHODS RELATED TO WHAT WE SUPPORT...
- // --------------------------------------------
-
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsSubSystemConnect()
- */
- public boolean supportsSubSystemConnect()
- {
- return true;
- }
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isPortEditable()
- */
- public boolean isPortEditable()
- {
- return true;
- }
-
- /**
- * We return false.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsCommands()
- */
- public boolean supportsCommands()
- {
- return false;
- }
- /**
- * We return false.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsProperties()
- */
- public boolean supportsProperties()
- {
- return false;
- }
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters()
- {
- return true;
- }
-
- /**
- * We return false
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsNestedFilters()
- */
- public boolean supportsNestedFilters()
- {
- return false;
- }
- /**
- * Return true if you support compile actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem factory.
- * <p>
- * By returning true, user sees a "Work with->Compile Commands..." action item in the popup menu for this
- * subsystem. The action is supplied by the framework, but is populated using overridable methods in this subsystem.
- * <p>We return true.
- */
- public boolean supportsCompileActions()
- {
- return false;
- }
-
- /**
- * Tell us if this subsystem factory supports server launch properties, which allow the user
- * to configure how the server-side code for these subsystems are started. There is a Server
- * Launch Setting property page, with a pluggable composite, where users can configure these
- * properties.
- * <br> We return true.
- */
- public boolean supportsServerLaunchProperties()
- {
- return true;
- }
-
-
-
- // ------------------------------------------------------
- // PARENT METHODS RELATED TO FILTERS...
- // ... ONLY INTERESTING IF supportsFilters() return true!
- // ------------------------------------------------------
-
- /**
- * Override from parent.
- * <p>
- * Here we create the default filter pool for this subsystem factory, and populate it
- * with default filters.
- * <p>
- */
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- ISystemFilterPool pool = null;
- try {
- // -----------------------------------------------------
- // create a pool named filters
- // -----------------------------------------------------
- pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
-
- // ---------------------------------------------------------------------------------------------
- // create default filters in that pool iff this is the user's private profile we are creating...
- // ---------------------------------------------------------------------------------------------
- if (isUserPrivateProfile(mgr))
- {
-
- Vector filterStrings = new Vector();
-
- // ----------------------
- // "All Processes" filter...
- // ----------------------
- filterStrings = new Vector();
- HostProcessFilterImpl allProcessesFilterString = new HostProcessFilterImpl();
- filterStrings.add(allProcessesFilterString.toString());
- ISystemFilter filter = mgr.createSystemFilter(pool, SystemProcessesCoreResources.RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL,filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
-
- //------------------------
- // "My Processes" filter...
- // ----------------------
- filterStrings = new Vector();
- HostProcessFilterImpl myProcessesFilterString = new HostProcessFilterImpl();
- myProcessesFilterString.setUsername("${user.id}"); //$NON-NLS-1$
-
- filterStrings.add(myProcessesFilterString.toString());
- filter = mgr.createSystemFilter(pool, SystemProcessesCoreResources.RESID_PROPERTY_PROCESS_MYPROCESSESFILTER_LABEL,filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
- }
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Error creating default filter pool",exc); //$NON-NLS-1$
- }
- return pool;
- }
-
-
-
- /**
- * Return the translated string to show in the property sheet for the type property.
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
- {
- return super.getTranslatedFilterTypeProperty(selectedFilter);
- }
-
- public ISystemValidator getPortValidator()
- {
- ISystemValidator portValidator = new ValidatorServerPortInput();
- return portValidator;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java
deleted file mode 100644
index 4cf600d3a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-
-/**
- * The implementation of the RemoteProcessSubSystem interface.
- * Some of the methods are simply convenience methods - these are
- * implemented here, whereas the real work takes place in the
- * ProcessServiceSubSystem.
- * @author mjberger
- *
- */
-/**
- * @author mjberger
- *
- */
-public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
- IRemoteProcessSubSystem, ICommunicationsListener
-{
-
- public RemoteProcessSubSystemImpl(IHost host, IConnectorService connectorService)
- {
- super(host, connectorService);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#getParentRemoteProcessSubSystemConfiguration()
- */
- public IRemoteProcessSubSystemConfiguration getParentRemoteProcessSubSystemConfiguration()
- {
- return (IRemoteProcessSubSystemConfiguration) super.getSubSystemConfiguration();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#isCaseSensitive()
- */
- public boolean isCaseSensitive()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#communicationsStateChange(org.eclipse.rse.core.subsystems.CommunicationsEvent)
- */
- public void communicationsStateChange(CommunicationsEvent e)
- {
- switch (e.getState())
- {
- case CommunicationsEvent.BEFORE_CONNECT :
- break;
- case CommunicationsEvent.AFTER_DISCONNECT :
- getConnectorService().removeCommunicationsListener(this);
-
- break;
-
- case CommunicationsEvent.BEFORE_DISCONNECT :
- case CommunicationsEvent.CONNECTION_ERROR :
- break;
- default :
- break;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeSubSystem(IProgressMonitor monitor)
- {
- getConnectorService().addCommunicationsListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- getConnectorService().removeCommunicationsListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#getParentProcess(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess)
- */
- public IRemoteProcess getParentProcess(IRemoteProcess process)
- {
- return process.getParentRemoteProcess();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
- throws InvocationTargetException,
- InterruptedException
- {
- if (!isConnected()) {
- return null;
- }
-
- HostProcessFilterImpl rpf = new HostProcessFilterImpl(filterString);
- IRemoteProcessContext context = new RemoteProcessContext(this, null, rpf);
- IRemoteProcess[] ps = null;
- try
- {
- ps = listAllProcesses(rpf, context, monitor);
- }
- catch (SystemMessageException e)
- {
- displayAsyncMsg(e);
- }
- return ps;
- }
-
- /**
- * At this point there is only one root process, the 'init' process with pid 1
- */
- public IRemoteProcess[] listRoots(IRemoteProcessContext context, IProgressMonitor monitor)
- {
- IRemoteProcess[] roots = new IRemoteProcess[1];
- try
- {
- roots[0] = getRemoteProcessObject(1);
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("Exception resolving roots", e); //$NON-NLS-1$
- }
- return roots;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#listAllProcesses(org.eclipse.rse.services.clientserver.processes.IHostProcessFilter, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
- */
- public abstract IRemoteProcess[] listAllProcesses(
- IHostProcessFilter processNameFilter,
- IRemoteProcessContext context,
- IProgressMonitor monitor) throws InterruptedException,
- SystemMessageException;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#getRemoteProcessObject(long)
- */
- public abstract IRemoteProcess getRemoteProcessObject(long pid)
- throws SystemMessageException;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#kill(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, java.lang.String)
- */
- public abstract boolean kill(IRemoteProcess process, String signal)
- throws SystemMessageException;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#getSignalTypes()
- */
- public abstract String[] getSignalTypes() throws SystemMessageException;
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#getObjectWithAbsoluteName(java.lang.String)
- */
- public Object getObjectWithAbsoluteName(String key) throws Exception
- {
- try
- {
- long pid = Long.parseLong(key);
- return getRemoteProcessObject(pid);
- }
- catch (NumberFormatException e)
- {
- return super.getObjectWithAbsoluteName(key);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java
deleted file mode 100644
index ffd6f2f6b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-
-
-public interface IProcessServiceSubSystem extends IRemoteProcessSubSystem, IServiceSubSystem
-{
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java
deleted file mode 100644
index 9adef1954..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-
-/**
- * Factory for creating the ProcessServiceSubSystem and for getting the associated
- * service and adapter.
- * @author mjberger
- *
- */
-public interface IProcessServiceSubSystemConfiguration extends IServiceSubSystemConfiguration, IRemoteProcessSubSystemConfiguration
-{
- /**
- * @param host The object representing the remote machine to which the process service is associated
- * @return The process service associated with the host.
- */
- public IProcessService getProcessService(IHost host);
-
- /**
- * Creates a new process service object associated with a specific remote host
- * @param host The object representing the remote machine to which the process service is associated
- * @return The process service associated with the host.
- */
- public IProcessService createProcessService(IHost host);
-
- /**
- * @return An adapter for converting IHostProcess objects to IRemoteProcess
- */
- public IHostProcessToRemoteProcessAdapter getHostProcessAdapter();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
deleted file mode 100644
index 38e4f44d2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl;
-
-/**
- * The subsystem that, coupled with a ProcessService implementation,
- * can query and kill remote processes on a remote system.
- * @author mjberger
- *
- */
-public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implements IProcessServiceSubSystem
-{
- protected IProcessService _hostProcessService;
- protected IHostProcessToRemoteProcessAdapter _hostProcessToRemoteProcessAdapter;
-
- public ProcessServiceSubSystem(IHost host, IConnectorService connectorService, IProcessService hostProcessService, IHostProcessToRemoteProcessAdapter adapter)
- {
- super(host, connectorService);
- _hostProcessService = hostProcessService;
- _hostProcessToRemoteProcessAdapter = adapter;
- }
-
- /**
- * @return the process service associated with this subsystem.
- */
- public IProcessService getProcessService()
- {
- return _hostProcessService;
- }
-
- /**
- * Sets which process service is associated with and used by this subsystem.
- * @param service The IProcessService with which to associate this subsystem.
- */
- public void setProcessService(IProcessService service)
- {
- _hostProcessService = service;
- }
-
- /**
- * @return the associated adapter for converting IHostProcess objects to IRemoteProcess objects
- */
- public IHostProcessToRemoteProcessAdapter getHostProcessToRemoteProcessAdapter()
- {
- return _hostProcessToRemoteProcessAdapter;
- }
-
- /**
- * Sets the associated adapter for converting IHostProcess objects to IRemoteProcess objects
- */
- public void setHostProcessToRemoteProcessAdapter(IHostProcessToRemoteProcessAdapter hostProcessAdapter)
- {
- _hostProcessToRemoteProcessAdapter = hostProcessAdapter;
- }
-
- /**
- * Returns the IRemoteProcess representing the process on the remote machine that has a
- * certain pid.
- * @param pid The pid of the process to return
- */
- public IRemoteProcess getRemoteProcessObject(long pid) throws SystemMessageException
- {
- checkIsConnected();
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPid("" + pid); //$NON-NLS-1$
- IRemoteProcessContext context = new RemoteProcessContext(this, null, rpfs);
- IHostProcess process = getProcessService().getProcess(null, pid);
- return getHostProcessToRemoteProcessAdapter().convertToRemoteProcess(context, null, process);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#getSignalTypes()
- */
- public String[] getSignalTypes() throws SystemMessageException
- {
- return getProcessService().getSignalTypes();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#kill(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, java.lang.String)
- */
- public boolean kill(IRemoteProcess process, String signal) throws SystemMessageException
- {
- checkIsConnected();
- return getProcessService().kill(null, process.getPid(), signal);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#listAllProcesses(org.eclipse.rse.services.clientserver.processes.IHostProcessFilter, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
- */
- public IRemoteProcess[] listAllProcesses(IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws InterruptedException, SystemMessageException
- {
- checkIsConnected();
- IHostProcess[] processes = getProcessService().listAllProcesses(monitor, processFilter);
- return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, null, processes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#listChildProcesses(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.services.clientserver.processes.IHostProcessFilter, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
- */
- public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
- {
- checkIsConnected();
- IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid(), processFilter);
- return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#listChildProcesses(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
- */
- public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
- {
- checkIsConnected();
- IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid());
- return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystem#switchServiceFactory(org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration)
- */
- public void switchServiceFactory(IServiceSubSystemConfiguration fact)
- {
- if (fact != getSubSystemConfiguration() && fact instanceof IProcessServiceSubSystemConfiguration)
- {
- IProcessServiceSubSystemConfiguration factory = (IProcessServiceSubSystemConfiguration)fact;
- try
- {
- disconnect();
- }
- catch (Exception e)
- {
- }
-
- IHost host = getHost();
- setSubSystemConfiguration(factory);
- setName(factory.getName());
-
- IConnectorService oldConnectorService = getConnectorService();
- oldConnectorService.deregisterSubSystem(this);
-
- IConnectorService newConnectorService = factory.getConnectorService(host);
- setConnectorService(newConnectorService);
-
- oldConnectorService.commit();
- newConnectorService.commit();
-
- setProcessService(factory.getProcessService(host));
- setHostProcessToRemoteProcessAdapter(factory.getHostProcessAdapter());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystem#getServiceType()
- */
- public Class getServiceType()
- {
- return IProcessService.class;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeSubSystem(IProgressMonitor monitor)
- {
- super.initializeSubSystem(monitor);
- getProcessService().initService(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- super.uninitializeSubSystem(monitor);
- getProcessService().uninitService(monitor);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java
deleted file mode 100644
index 306d0b64a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemConfiguration;
-
-/**
- * Factory for creating the ProcessServiceSubSystem and for getting the associated
- * service and adapter.
- * @author mjberger
- *
- */
-public abstract class ProcessServiceSubSystemConfiguration extends RemoteProcessSubSystemConfiguration implements IProcessServiceSubSystemConfiguration
-{
-
- protected Map _services;
-
- protected ProcessServiceSubSystemConfiguration()
- {
- super();
- _services = new HashMap();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystemConfiguration#getProcessService(org.eclipse.rse.model.IHost)
- */
- public IProcessService getProcessService(IHost host)
- {
- IProcessService service = (IProcessService)_services.get(host);
- if (service == null)
- {
- service = createProcessService(host);
- _services.put(host, service);
- }
- return service;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration#getServiceType()
- */
- public final Class getServiceType()
- {
- return IProcessService.class;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.model.IHost)
- */
- public boolean supportsServerLaunchProperties(IHost host)
- {
- return getConnectorService(host).supportsServerLaunchProperties();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration#getService(org.eclipse.rse.model.IHost)
- */
- public IService getService(IHost host)
- {
- return getProcessService(host);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.classpath b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.project b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.project
deleted file mode 100644
index 2e36b31bd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.processes.dstore</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/META-INF/MANIFEST.MF
deleted file mode 100644
index 35f2feda7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.processes.dstore;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.processes.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.services.dstore,
- org.eclipse.dstore.core,
- org.eclipse.dstore.extra,
- org.eclipse.rse.connectorservice.dstore,
- org.eclipse.rse.subsystems.processes.core,
- org.eclipse.rse.processes.ui,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/about.html b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/build.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/build.properties
deleted file mode 100644
index cbb0844a9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- icons/,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/activeprocess.gif b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/activeprocess.gif
deleted file mode 100644
index 7902f8115..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/activeprocess.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/processsubsystem_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/processsubsystem_obj.gif
deleted file mode 100644
index e07b81aa6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/processsubsystem_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/processsubsystemlive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/processsubsystemlive_obj.gif
deleted file mode 100644
index 96a447a71..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/icons/full/obj16/processsubsystemlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.properties
deleted file mode 100644
index 421ef9877..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE DStore Processes
-providerName = Eclipse.org
-
-Processes=Processes
-ProcessesDescription=This configuration allows you to work with processes on local or remote systems using the DataStore protocol. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.xml
deleted file mode 100644
index 2609b2e84..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
-
-<!-- ============================================== -->
-<!-- Define subsystem factories for sample -->
-<!-- ============================================== -->
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Linux;Unix"
- name="%Processes"
- description="%ProcessesDescription"
- iconlive="icons/full/obj16/processsubsystemlive_obj.gif"
- icon="icons/full/obj16/processsubsystem_obj.gif"
- category="processes"
- class="org.eclipse.rse.subsystems.processes.dstore.DStoreProcessSubSystemConfiguration"
- vendor="%providerName"
- priority="200"
- id="dstore.processes">
- </configuration>
- </extension>
-
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/Activator.java
deleted file mode 100644
index de074cdac..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/Activator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.dstore;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.processes.ui.ProcessesPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- ProcessesPlugin.getDefault();
- }
-
- /**
- * 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.processes.dstore", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessAdapter.java
deleted file mode 100644
index b634d764b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessAdapter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.dstore;
-
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.dstore.processes.DStoreHostProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessImpl;
-
-/**
- * Adapter for converting DStoreHostProcess objects (objects where the underlying
- * process is represented by a DataElement) to IRemoteProcess objects
- *
- * @author mjberger
- *
- */
-public class DStoreProcessAdapter implements IHostProcessToRemoteProcessAdapter {
-
- /**
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter#convertToRemoteProcesses(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.services.clientserver.processes.IHostProcess[])
- * Precondition: each element of nodes must be a DStoreHostProcess
- */
- public IRemoteProcess[] convertToRemoteProcesses(IRemoteProcessContext context, IRemoteProcess parent, IHostProcess[] nodes)
- {
- if (nodes == null)
- return null;
-
- ArrayList list = new ArrayList(nodes.length);
-
- for (int idx = 0; idx < nodes.length; idx++)
- {
- DStoreHostProcess node = (DStoreHostProcess) nodes[idx];
- DataElement de = (DataElement) node.getObject();
- if (!de.isDeleted())
- {
- IRemoteProcess newProcess = new RemoteProcessImpl(context, node);
- list.add(newProcess);
- }
- }
-
- IRemoteProcess[] processes = new IRemoteProcess[list.size()];
-
- for (int idx = 0; idx < list.size(); idx++)
- {
- processes[idx] = (IRemoteProcess) list.get(idx);
- }
-
- return processes;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter#convertToRemoteProcess(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.services.clientserver.processes.IHostProcess)
- * Precondition: node must be a DStoreHostProcess
- */
- public IRemoteProcess convertToRemoteProcess(IRemoteProcessContext context, IRemoteProcess parent, IHostProcess node)
- {
- IHostProcess[] nodes = new IHostProcess[1];
- nodes[0] = node;
-
- IRemoteProcess[] processes = convertToRemoteProcesses(context, parent, nodes);
- if (processes != null && processes.length > 0)
- return processes[0];
- else return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java
deleted file mode 100644
index 401bbe07a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.dstore;
-
-import org.eclipse.rse.connectorservice.dstore.DStoreConnectorService;
-import org.eclipse.rse.connectorservice.dstore.DStoreConnectorServiceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.dstore.IDStoreService;
-import org.eclipse.rse.services.dstore.processes.DStoreProcessService;
-import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
-import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
-import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystemConfiguration;
-
-
-public class DStoreProcessSubSystemConfiguration extends ProcessServiceSubSystemConfiguration
-{
- protected IHostProcessToRemoteProcessAdapter _hostProcessAdapter;
-
- public DStoreProcessSubSystemConfiguration()
- {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = ProcessServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(org.eclipse.rse.model.IHost)
- */
- public ISubSystem createSubSystemInternal(IHost host)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
- ISubSystem subsys = new ProcessServiceSubSystem(host, connectorService, getProcessService(host), getHostProcessAdapter());
- return subsys;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFileTypes()
- */
- public boolean supportsFileTypes() {
- return false;
- }
-
- /**
- * @return true if the subsystem supports remote search
- */
- public boolean supportsSearch() {
- return false;
- }
-
- /**
- * @return
- */
- public boolean supportsEnvironmentVariablesPropertyPage() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystemConfiguration#createProcessService(org.eclipse.rse.model.IHost)
- */
- public IProcessService createProcessService(IHost host)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
- return new DStoreProcessService(connectorService);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystemConfiguration#getHostProcessAdapter()
- */
- public IHostProcessToRemoteProcessAdapter getHostProcessAdapter()
- {
- if (_hostProcessAdapter == null)
- {
- _hostProcessAdapter = new DStoreProcessAdapter();
- }
- return _hostProcessAdapter;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host)
- {
- return DStoreConnectorServiceManager.getTheUniversalSystemManager().getConnectorService(host, getServiceImplType());
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- DStoreConnectorServiceManager.getTheUniversalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public Class getServiceImplType()
- {
- return IDStoreService.class;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.classpath b/rse/plugins/org.eclipse.rse.subsystems.processes.local/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.processes.local/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.project b/rse/plugins/org.eclipse.rse.subsystems.processes.local/.project
deleted file mode 100644
index 20b02bee4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.processes.local</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.processes.local/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.processes.local/META-INF/MANIFEST.MF
deleted file mode 100644
index 8cffc0bf0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.processes.local;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.processes.local.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.services.local,
- org.eclipse.rse.connectorservice.local,
- org.eclipse.rse.subsystems.processes.core,
- org.eclipse.rse.processes.ui,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.rse.subsystems.processes.local
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/about.html b/rse/plugins/org.eclipse.rse.subsystems.processes.local/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/build.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.local/build.properties
deleted file mode 100644
index 34e219f76..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/activeprocess.gif b/rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/activeprocess.gif
deleted file mode 100644
index 7902f8115..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/activeprocess.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/processsubsystem_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/processsubsystem_obj.gif
deleted file mode 100644
index e07b81aa6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/processsubsystem_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/processsubsystemlive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/processsubsystemlive_obj.gif
deleted file mode 100644
index 96a447a71..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/icons/full/obj16/processsubsystemlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.properties
deleted file mode 100644
index 0dbfee090..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE Local Processes
-providerName = Eclipse.org
-
-Processes=Processes \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.xml
deleted file mode 100644
index e22c10b3a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
-
-<!-- ============================================== -->
-<!-- Define subsystem factories for sample -->
-<!-- ============================================== -->
-<!--
- <extension
- point="org.eclipse.rse.core.subsystemfactory">
- <factory
- systemTypes="Local"
- name="Local Processes (new)"
- iconlive="icons/full/obj16/processsubsystemlive_obj.gif"
- icon="icons/full/obj16/processsubsystem_obj.gif"
- category="processes"
- class="org.eclipse.rse.subsystems.processes.local.LocalProcessSubSystemFactory"
- vendor="%providerName"
- priority="200"
- id="local.processes">
- </factory>
- </extension>
- -->
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/Activator.java
deleted file mode 100644
index fb686c382..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/Activator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.local;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.processes.ui.ProcessesPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- ProcessesPlugin.getDefault();
- }
-
- /**
- * 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.processes.local", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessAdapter.java
deleted file mode 100644
index 176ede61b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessAdapter.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.local;
-
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessImpl;
-
-/**
- * Adapter for converting IHostProcess objects (objects where the underlying
- * process resides on the local machine) to IRemoteProcess objects
- *
- * @author mjberger
- *
- */
-public class LocalProcessAdapter implements IHostProcessToRemoteProcessAdapter {
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter#convertToRemoteProcesses(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.services.clientserver.processes.IHostProcess[])
- */
- public IRemoteProcess[] convertToRemoteProcesses(
- IRemoteProcessContext context, IRemoteProcess parent,
- IHostProcess[] nodes)
- {
- if (nodes == null)
- return null;
-
- IRemoteProcess[] processes = new IRemoteProcess[nodes.length];
-
- for (int idx = 0; idx < nodes.length; idx++)
- {
- processes[idx] = new RemoteProcessImpl(context, nodes[idx]);
- }
-
- return processes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter#convertToRemoteProcess(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.services.clientserver.processes.IHostProcess)
- */
- public IRemoteProcess convertToRemoteProcess(IRemoteProcessContext context,
- IRemoteProcess parent, IHostProcess node)
- {
- IHostProcess[] nodes = new IHostProcess[1];
- nodes[0] = node;
-
- IRemoteProcess[] processes = convertToRemoteProcesses(context, parent, nodes);
- if (processes != null && processes.length > 0)
- return processes[0];
- else return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java
deleted file mode 100644
index 3b5517826..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.local;
-
-
-import org.eclipse.rse.connectorservice.local.LocalConnectorService;
-import org.eclipse.rse.connectorservice.local.LocalConnectorServiceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.local.ILocalService;
-import org.eclipse.rse.services.local.processes.LocalProcessService;
-import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
-import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
-import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystemConfiguration;
-
-
-public class LocalProcessSubSystemConfiguration extends ProcessServiceSubSystemConfiguration
-{
- public LocalProcessSubSystemConfiguration()
- {
- super();
- }
- protected IHostProcessToRemoteProcessAdapter _hostProcessAdapter;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = ProcessServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
- /**
- * Instantiate and return an instance of OUR subystem. Do not populate it yet though!
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(IHost)
- */
- public ISubSystem createSubSystemInternal(IHost host)
- {
- LocalConnectorService connectorService = (LocalConnectorService)getConnectorService(host);
- ISubSystem subsys = new ProcessServiceSubSystem(host, connectorService, getProcessService(host), getHostProcessAdapter());
- return subsys;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFileTypes()
- */
- public boolean supportsFileTypes() {
- return false;
- }
-
- /**
- * @return <code>false</code>
- */
- public boolean supportsSearch() {
- return false;
- }
-
- /**
- * @return <code>false</code>
- */
- public boolean supportsEnvironmentVariablesPropertyPage() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters() {
- return true;
- }
-
- /**
- * Returns <code>false</code>.
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemConfiguration#supportsSubSystemConnect()
- */
- public boolean supportsSubSystemConnect() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host)
- {
- return LocalConnectorServiceManager.getTheLocalSystemManager().getConnectorService(host, getServiceImplType());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystemConfiguration#createProcessService(org.eclipse.rse.model.IHost)
- */
- public IProcessService createProcessService(IHost host)
- {
- //LocalConnectorService connectorService = (LocalConnectorService)getConnectorService(host);
- return new LocalProcessService();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystemConfiguration#getHostProcessAdapter()
- */
- public IHostProcessToRemoteProcessAdapter getHostProcessAdapter()
- {
- if (_hostProcessAdapter == null)
- {
- _hostProcessAdapter = new LocalProcessAdapter();
- }
- return _hostProcessAdapter;
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- LocalConnectorServiceManager.getTheLocalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public Class getServiceImplType()
- {
- return ILocalService.class;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.classpath b/rse/plugins/org.eclipse.rse.subsystems.shells.core/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.shells.core/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.project b/rse/plugins/org.eclipse.rse.subsystems.shells.core/.project
deleted file mode 100644
index 2bfc13924..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.shells.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.shells.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.shells.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 36e979810..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.shells.core
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.shells.core.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.core.resources,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.ui,
- org.eclipse.rse.core
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.subsystems.shells.servicesubsystem,
- org.eclipse.rse.internal.subsystems.shells.subsystems,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.subsystems.shells.core.model,
- org.eclipse.rse.subsystems.shells.core.subsystems,
- org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/about.html b/rse/plugins/org.eclipse.rse.subsystems.shells.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/build.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.core/build.properties
deleted file mode 100644
index 686ff4c33..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.core/plugin.properties
deleted file mode 100644
index 4508014a7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE Shells Core
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java
deleted file mode 100644
index 9e3d80c26..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.servicesubsystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.subsystems.shells.core.ShellStrings;
-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.ui.progress.UIJob;
-
-
-public class OutputRefreshJob extends UIJob
- {
- private IRemoteCommandShell _command;
- private IRemoteOutput[] _outputs;
- private boolean _cwdChanged = false;
- private boolean _isComplete = false;
-
-
- public OutputRefreshJob(IRemoteCommandShell command, IRemoteOutput[] outputs, boolean cwdChanged)
- {
- super(ShellStrings.RSESubSystemOperation_Refresh_Output);
- _command = command;
- _cwdChanged = cwdChanged;
- _outputs = outputs;
- }
-
- public void addOutputs(IRemoteOutput[] outputs)
- {
- IRemoteOutput[] oldOutputs = _outputs;
- int total = oldOutputs.length + outputs.length;
- IRemoteOutput[] newOutputs = new IRemoteOutput[total];
- int k = 0;
- for (int i = 0; i < oldOutputs.length; i++)
- {
- newOutputs[k] = oldOutputs[i];
- k++;
- }
- for (int j = 0; j < outputs.length; j++)
- {
- newOutputs[k] = outputs[j];
- k++;
- }
- _outputs = newOutputs;
- }
-
- public boolean isComplete()
- {
- return _isComplete;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- try
- {
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- if (_outputs != null)
- {
- if ((_outputs.length > 0) && (_outputs[0] != null)) {
- registry.fireEvent(
- new SystemResourceChangeEvent(_outputs, ISystemResourceChangeEvents.EVENT_REFRESH, _command));
- }
-
- if (_cwdChanged)
- {
- registry.fireEvent(
- new SystemResourceChangeEvent(_command, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, _command.getCommandSubSystem()));
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- _isComplete= true;
- return Status.OK_STATUS;
- }
- } \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/CandidateCommand.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/CandidateCommand.java
deleted file mode 100644
index 4ac218173..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/CandidateCommand.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.subsystems.shells.core.subsystems.ICandidateCommand;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * class represents a candidate command to run
- */
-public class CandidateCommand implements IAdaptable, ICandidateCommand
-{
-
- protected String _name;
- protected String _type;
- protected String _description;
- protected String _path;
- protected ImageDescriptor _imageDescriptor;
-
- /**
- * Constructor
- *
- * @param type indicates the type of the candidate command
- * @param name indicates the name of the candidate command
- * @param description describes the candidate command
- * @param path indicates the path of the candidate command if one exists
- */
- public CandidateCommand(String type, String name, String description, String path)
- {
- _name = name;
- _type = type;
- _description = description;
- _path = path;
- }
-
- /**
- * Gets the name of the candidate command
- * @return the name of the candidate command
- */
- public String getName()
- {
- return _name;
- }
-
- /**
- * Gets the type of the candidate command.
- * @return the type of the command
- */
- public String getType()
- {
- return _type;
- }
-
- /**
- * Gets the path of a candidate command.
- * @return the path to the command, if one exists
- */
- public String getPath()
- {
- return _path;
- }
-
- /**
- * Gets the description for a candidate command.
- * @return the description of the command
- */
- public String getDescription()
- {
- return _description;
- }
-
- /**
- * Gets the image descriptor to display for a candidate command
- * @return the image descriptor for the command
- */
- public ImageDescriptor getImageDescriptor()
- {
- if (_imageDescriptor == null)
- {
- _imageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
- //_imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_RUN_ID);
- }
- return _imageDescriptor;
- }
-
-
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystem.java
deleted file mode 100644
index ae52b6f63..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystem.java
+++ /dev/null
@@ -1,1261 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IRemoteSystemEnvVar;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-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.shells.core.ShellStrings;
-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.IRemoteCmdSubSystemConfiguration;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This is the abstraction of a subsystem specialized for remote execution of
- * commands.
- */
-
-public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmdSubSystem, ICommunicationsListener
-{
-
- public static String COMMAND_SHELLS_MEMENTO = "commandshells"; //$NON-NLS-1$
-
- protected java.util.List envVars = null;
-
- protected List _envVars;
-
- protected ArrayList _cmdShells;
-
- protected IRemoteCommandShell _defaultShell;
-
- protected IRemoteFileSubSystem _fileSubSystem;
-
- public RemoteCmdSubSystem(IHost host, IConnectorService connectorService)
- {
- super(host, connectorService);
- _cmdShells = new ArrayList();
- }
-
- /**
- * Return parent subsystem factory, cast to a RemoteCmdSubSystemConfiguration
- */
- public IRemoteCmdSubSystemConfiguration getParentRemoteCmdSubSystemConfiguration()
- {
- return (IRemoteCmdSubSystemConfiguration) super.getSubSystemConfiguration();
- }
-
- public String getShellEncoding()
- {
- IPropertySet set = getPropertySet("Remote"); //$NON-NLS-1$
- if (set != null)
- {
- return set.getPropertyValue("shell.encoding"); //$NON-NLS-1$
- }
- return null;
- }
-
- public void setShellEncoding(String encoding)
- {
- IPropertySet set = getPropertySet("Remote"); //$NON-NLS-1$
- if (set == null)
- {
- set = createPropertySet("Remote", getDescription()); //$NON-NLS-1$
- }
- set.addProperty("shell.encoding", encoding); //$NON-NLS-1$
- setDirty(true);
- commit();
- }
-
- /**
- * Long running list processing calls this method to check for a user-cancel
- * event. If user did cancel, an exception is thrown.
- *
- * @return true if caller wants to cancel
- */
- public boolean checkForCancel(IProgressMonitor monitor)
- {
- if ((monitor != null) && monitor.isCanceled())
- throw new OperationCanceledException(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED)
- .getLevelOneText());
- return false;
- }
-
- // ---------------------------------
- // ENVIRONMENT VARIABLE METHODS ...
- // ---------------------------------
-
- /**
- * Get the initial environment variable list as a string of
- * RemoteSystemEnvVar objects. Array returned may be size zero but will not
- * be null.
- */
- public IRemoteSystemEnvVar[] getEnvironmentVariableList()
- {
- java.util.List initEVL = getEnvVars();
- IRemoteSystemEnvVar[] envl = new IRemoteSystemEnvVar[initEVL.size()];
- Iterator i = initEVL.iterator();
- int idx = 0;
- while (i.hasNext())
- envl[idx++] = (IRemoteSystemEnvVar) i.next();
- return envl;
- }
-
- /**
- * Set the initial environment variable list entries, all in one shot, using
- * a pair of String arrays: the first is the environment variable names, the
- * second is the corresponding environment variable values.
- * <p>
- * Note, this calls getParentSubSystemConfiguration().saveSubSystem(this) for you.
- */
- public void setEnvironmentVariableList(String[] envVarNames, String[] envVarValues)
- {
- java.util.List initEVL = getEnvVars();
- initEVL.clear();
- if (envVarNames != null)
- {
- IRemoteSystemEnvVar rsev = null;
- for (int idx = 0; idx < envVarNames.length; idx++)
- {
- rsev = new RemoteSystemEnvVar();
- rsev.setName(envVarNames[idx]);
- rsev.setValue(envVarValues[idx]);
- initEVL.add(rsev);
- }
- }
- try
- {
- if (getSubSystemConfiguration() != null)
- getSubSystemConfiguration().saveSubSystem(this);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving command subsystem after setting env var entries", exc); //$NON-NLS-1$
- }
- }
-
- /**
- * Add environment variable entry, given a name and value
- */
- public void addEnvironmentVariable(String name, String value)
- {
- /*
- * FIXME RemoteSystemEnvVar rsev =
- * SubSystemConfigurationImpl.getSSMOFfactory().createRemoteSystemEnvVar();
- * rsev.setName(name); rsev.setValue(value);
- * addEnvironmentVariable(rsev);
- */
- RemoteSystemEnvVar rsev = new RemoteSystemEnvVar();
- rsev.setName(name);
- rsev.setValue(value);
- addEnvironmentVariable(rsev);
- return;
- }
-
- /**
- * Add environment variable entry, given a RemoteSystemEnvVar object
- */
- public void addEnvironmentVariable(IRemoteSystemEnvVar rsev)
- {
- getEnvVars().add(rsev);
- try
- {
- getSubSystemConfiguration().saveSubSystem(this);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving command subsystem after adding env var entry", exc); //$NON-NLS-1$
- }
- }
-
- /**
- * Remove environment variable entry given its RemoteSystemEnvVar object
- */
- public void removeEnvironmentVariable(IRemoteSystemEnvVar rsev)
- {
- getEnvVars().remove(rsev);
- try
- {
- getSubSystemConfiguration().saveSubSystem(this);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving command subsystem after removing env var entry", exc); //$NON-NLS-1$
- }
- }
-
- /**
- * Remove environment variable entry given only its environment variable
- * name
- */
- public void removeEnvironmentVariable(String name)
- {
- IRemoteSystemEnvVar rsev = getEnvironmentVariable(name);
- if (rsev != null)
- removeEnvironmentVariable(rsev);
- }
-
- /**
- * Given an environment variable name, find its RemoteSystemEnvVar object.
- * Returns null if not found!
- */
- public IRemoteSystemEnvVar getEnvironmentVariable(String name)
- {
- java.util.List envVarList = getEnvVars();
- IRemoteSystemEnvVar match = null;
- Iterator i = envVarList.iterator();
- while ((match == null) && i.hasNext())
- {
- IRemoteSystemEnvVar rsev = (IRemoteSystemEnvVar) i.next();
- if (rsev.getName().equals(name))
- match = rsev;
- }
- return match;
- }
-
- /**
- * Given an environment variable name, find its value. Returns null if not
- * found.
- */
- public String getEnvironmentVariableValue(String name)
- {
- IRemoteSystemEnvVar match = getEnvironmentVariable(name);
- if (match != null)
- return match.getValue();
- else
- return null;
- }
-
- /**
- *
- */
- protected String[] getEnvVarsAsStringArray()
- {
- String[] envVars = null;
- IRemoteSystemEnvVar[] list = getEnvironmentVariableList();
- if (list != null && list.length > 0)
- {
- envVars = new String[list.length];
- for (int i = 0; i < list.length; i++)
- {
- String name = list[i].getName();
- if (isWindows())
- {
- name = name.toUpperCase();
- }
- envVars[i] = name + "=" + list[i].getValue(); //$NON-NLS-1$
- }
- }
-
- return envVars;
- }
-
- protected boolean isUniqueVariable(List variables, String varName)
- {
- for (int i = 0; i < variables.size(); i++)
- {
- String variableStr = (String) variables.get(i);
- if (variableStr.startsWith(varName))
- {
- return false;
- }
- }
- return true;
- }
-
- protected String[] getUserAndHostEnvVarsAsStringArray()
- {
- String[] userVars = getEnvVarsAsStringArray();
- List systemVars = getHostEnvironmentVariables();
-
- List combinedVars = new ArrayList();
-
- // add user vars first
- // going in reverse order so that last set takes precedence over
- // previous
- // note that we currently don't support variable substituation via
- // multiple user
- // definitions of same variable
- if (userVars != null)
- {
- for (int i = userVars.length - 1; i >= 0; i--)
- {
- String userVar = userVars[i];
- String varName = null;
- int assignIndex = userVar.indexOf('=');
- if (assignIndex > 0)
- {
- varName = userVar.substring(0, assignIndex + 1);
- if (isUniqueVariable(combinedVars, varName))
- {
- combinedVars.add(userVar);
- }
- }
- }
- }
-
- // add system vars that are unique
- // any system var currently defined as user var is considered
- // overridden
- // note that we currently don't support variable sbustitution via user
- // variable extension over system vars
- for (int s = 0; s < systemVars.size(); s++)
- {
- String systemVar = (String) systemVars.get(s);
- String varName = null;
- int assignIndex = systemVar.indexOf('=');
- if (assignIndex > 0)
- {
- varName = systemVar.substring(0, assignIndex + 1);
-
- if (isUniqueVariable(combinedVars, varName))
- {
- combinedVars.add(systemVar);
- }
- }
- }
-
- // convert to string array
- String[] result = new String[combinedVars.size()];
- for (int a = 0; a < combinedVars.size(); a++)
- {
- result[a] = (String) combinedVars.get(a);
- }
-
- return result;
- }
-
- public boolean isWindows()
- {
- String type = getSystemType();
- return (type.equals("Windows") || type.equals("Local") //$NON-NLS-1$ //$NON-NLS-2$
- && System.getProperty("os.name").toLowerCase().startsWith("win")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Lists the possible commands for the given context
- *
- * @param context
- * the context for a command
- * @return the list of possible commands
- */
- public ICandidateCommand[] getCandidateCommands(Object context)
- {
- if (context instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell command = (IRemoteCommandShell) context;
- return command.getCandidateCommands();
- }
- return null;
- }
-
- protected List parsePathEnvironmentVariable(String path)
- {
- ArrayList addedPaths = new ArrayList();
- ArrayList addedFolders = new ArrayList();
-
- char separator = isWindows() ? ';' : ':';
- StringTokenizer tokenizer = new StringTokenizer(path, separator + ""); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens())
- {
- String token = tokenizer.nextToken();
- if (!addedPaths.contains(token))
- {
- addedPaths.add(token);
-
- // resolve folder
- IRemoteFileSubSystem fs = getFileSubSystem();
- try
- {
- IRemoteFile file = fs.getRemoteFileObject(token);
- addedFolders.add(file);
- }
- catch (Exception e)
- {
- }
- }
- }
- return addedFolders;
- }
-
- public IRemoteFileSubSystem getFileSubSystem()
- {
- if (_fileSubSystem == null)
- {
- _fileSubSystem = RemoteFileUtility.getFileSubSystem(getHost());
- }
- return _fileSubSystem;
- }
-
- /**
- * Default implementation of getInvalidEnvironmentVariableNameCharacters.
- * This default implementation just returns "=" (the only invalid character
- * is the = sign.) Subclasses can override this to provide a more
- * comprehensive list.
- *
- * @see org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem#getInvalidEnvironmentVariableNameCharacters()
- */
- public String getInvalidEnvironmentVariableNameCharacters()
- {
- return "="; //$NON-NLS-1$
- }
-
- // -------------------------------
- // SubSystem METHODS ...
- // -------------------------------
-
- /**
- * Return the associated command subsystem. By default, returns the first
- * command subsystem found for this connection, but can be refined by each
- * subsystem implementation. For command subsystems, returns "this".
- */
- public IRemoteCmdSubSystem getCommandSubSystem()
- {
- return this;
- }
-
- /**
- * Actually resolve an absolute filter string. This is called by the
- * run(IProgressMonitor monitor) method, which in turn is called by
- * resolveFilterString.
- *
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(IProgressMonitor,String)
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
- throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
- {
- return null;
- }
-
- public Object[] getChildren()
- {
- return getShells();
- // return null;
- }
-
- public boolean hasChildren()
- {
- if (_cmdShells == null)
- return false;
- return _cmdShells.size() > 0;
- }
-
- /**
- * Get the default running command shell for this command subsystem. If no
- * such shell exists or is running, a new one is launched.
- *
- * @return the default running command shell
- */
- public IRemoteCommandShell getDefaultShell() throws Exception
- {
- IRemoteCommandShell[] shells = getShells();
- if (shells == null || shells.length == 0)
- {
- return runShell( null);
- }
- else
- {
- return shells[0];
- }
- }
-
- /**
- * Get all command shells and transient commands that have been run or are
- * running for this command subsystem.
- *
- * @return the list of running command shells and commands
- */
- public IRemoteCommandShell[] getShells()
- {
- IRemoteCommandShell[] shells = new IRemoteCommandShell[_cmdShells.size()];
- for (int i = 0; i < _cmdShells.size(); i++)
- {
- shells[i] = (IRemoteCommandShell) _cmdShells.get(i);
- }
- return shells;
- }
-
- /**
- * Determine whether the command subsystem can run a shell
- *
- * @return whether a shell can be run or not
- */
- public boolean canRunShell()
- {
- return true;
- }
-
- /**
- * Determine whether the command subsystem can run a command
- *
- * @return whether a command can be run or not
- */
- public boolean canRunCommand()
- {
- return true;
- }
-
- /**
- * Return the object within the subsystem that corresponds to the specified
- * unique ID. For remote command, the key is determined by the command ID
- * and the ouput ID
- */
- public Object getObjectWithAbsoluteName(String key) throws Exception
- {
- String cmdKey = key;
- String outKey = null;
- int indexOfColon = key.indexOf(':');
- if (indexOfColon > 0)
- {
- // get an output
- cmdKey = key.substring(0, indexOfColon);
- outKey = key.substring(indexOfColon + 1, key.length());
- }
-
- IRemoteCommandShell theCmd = null;
- // get a command
- IRemoteCommandShell[] cmds = getShells();
- for (int i = 0; i < cmds.length && theCmd == null; i++)
- {
- IRemoteCommandShell cmd = cmds[i];
- if (cmd != null && cmd.getId().equals(cmdKey))
- {
- theCmd = cmd;
- }
- }
- if (theCmd != null && outKey != null)
- {
- int outIndex = Integer.parseInt(outKey);
- return theCmd.getOutputAt(outIndex);
- }
- else
- {
- return theCmd;
- }
- }
-
- // called by subsystem on disconnect
- protected void saveShellState(List cmdShells)
- {
- // DKM: changing this so that only first active shell is saved
- StringBuffer shellBuffer = new StringBuffer();
- boolean gotShell = false;
- for (int i = 0; i < cmdShells.size() && !gotShell; i++)
- {
- /*
- * if (i != 0) { shellBuffer.append('|'); }
- */
- IRemoteCommandShell cmd = (IRemoteCommandShell) cmdShells.get(i);
- if (cmd.isActive())
- {
- Object context = cmd.getContext();
- if (context instanceof IRemoteFile)
- {
- IRemoteFile pwdf = (IRemoteFile) context;
- String pwd = pwdf.getAbsolutePath();
- shellBuffer.append(pwd);
- gotShell = true;
- }
- else
- {
- shellBuffer.append(cmd.getType());
- gotShell = true;
- }
- }
- }
-
- setRemoteAttribute(COMMAND_SHELLS_MEMENTO, shellBuffer.toString());
- }
-
- protected void internalRemoveShell(Object command) throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- if (command instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell) command;
- if (cmdShell.isActive())
- {
- internalCancelShell(null, command);
- }
- if (_defaultShell == command)
- {
- _defaultShell = null;
- }
- _cmdShells.remove(command);
- Display.getDefault().asyncExec(new RefreshRemovedShell(this, cmdShell));
- }
-
-
-
- }
-
- // called to restore running shells - behaviour determined by UI
- public IRemoteCommandShell[] restoreShellState(Shell shellWindow)
- {
- this.shell = shellWindow;
- IRemoteCommandShell[] results = null;
- String shellStr = getRemoteAttribute(COMMAND_SHELLS_MEMENTO);
- int numShells = 0;
- if (shellStr != null && shellStr.length() > 0)
- {
- StringTokenizer tok = new StringTokenizer(shellStr, "|"); //$NON-NLS-1$
- results = new IRemoteCommandShell[tok.countTokens()];
-
- while (tok.hasMoreTokens())
- {
- String context = tok.nextToken();
- if (context != null && context.length() > 0)
- {
- try
- {
- IRemoteCommandShell rmtCmd = internalRunShell(null, context);
- results[numShells] = rmtCmd;
- numShells++;
- }
- catch (Exception e)
- {
- }
- }
- }
- }
-
- //ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
-// registry.fireEvent(new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, this));
-
- Display.getDefault().asyncExec(new Refresh(this));
- return results;
- }
-
- public void cancelAllShells()
- {
-
- for (int i = _cmdShells.size() - 1; i >= 0; i--)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell) _cmdShells.get(i);
-
- try
- {
- internalRemoveShell(cmdShell);
- }
- catch (Exception exc)
- {
- exc.printStackTrace();
- }
-
- }
-
- _cmdShells.clear();
- _defaultShell = null;
- // registry.fireEvent(new
- // org.eclipse.rse.model.SystemResourceChangeEvent(this,
- // ISystemResourceChangeEvent.EVENT_COMMAND_SHELL_FINISHED, null));
- Display.getDefault().asyncExec(new Refresh(this));
-
- }
-
- public class Refresh implements Runnable
- {
- private RemoteCmdSubSystem _ss;
- public Refresh(RemoteCmdSubSystem ss)
- {
- _ss = ss;
- }
-
- public void run()
- {
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(_ss, ISystemResourceChangeEvents.EVENT_REFRESH, _ss));
- }
- }
-
-
- public class RefreshRemovedShell implements Runnable
- {
- private RemoteCmdSubSystem _ss;
- private IRemoteCommandShell _cmdShell;
- public RefreshRemovedShell(RemoteCmdSubSystem ss, IRemoteCommandShell cmdShell)
- {
- _ss = ss;
- _cmdShell = cmdShell;
- }
-
- public void run()
- {
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(_cmdShell, ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_REMOVED, null));
- registry.fireEvent(new SystemResourceChangeEvent(_ss, ISystemResourceChangeEvents.EVENT_REFRESH, _ss));
- }
- }
-
-
- /**
- * @see ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener()
- {
- return true;
- }
-
- private class CancelAllShells implements Runnable
- {
- public void run()
- {
- cancelAllShells();
- }
- }
-
- public class RefreshSubSystem implements Runnable
- {
- RemoteCmdSubSystem _ss;
-
- public RefreshSubSystem(RemoteCmdSubSystem ss)
- {
- _ss = ss;
- }
-
- public void run()
- {
- RSEUIPlugin.getTheSystemRegistry().fireEvent(
- new SystemResourceChangeEvent(_ss, ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_REMOVED, _ss));
- }
-
- }
-
- public void communicationsStateChange(CommunicationsEvent e)
- {
- switch (e.getState())
- {
- case CommunicationsEvent.AFTER_DISCONNECT:
- // no longer listen
- getConnectorService().removeCommunicationsListener(this);
- // if (_cmdShells != null) _cmdShells.clear();
- // if (_envVars != null) _envVars.clear();
- // _defaultShell = null;
-
- break;
-
- case CommunicationsEvent.BEFORE_DISCONNECT:
- case CommunicationsEvent.CONNECTION_ERROR:
- // remove all shells
- saveShellState(_cmdShells);
- if (getShells().length > 0)
- {
- Display.getDefault().asyncExec(new CancelAllShells());
- // cancelAllShells();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public java.util.List getEnvVars()
- {
- if (envVars == null)
- {
- envVars = new ArrayList();// FIXME new
- // EObjectContainmenteList(RemoteSystemEnvVar.class,
- // this,
- // SubsystemsPackage.REMOTE_CMD_SUB_SYSTEM__ENV_VARS);
- }
- return envVars;
- }
-
- /**
- * overridden so that for universal we don't need to do in modal thread
- */
- public Object[] runCommand(String command, Object context, boolean interpretOutput) throws Exception
- {
-//dwd if (shell != null)
-//dwd this.shell = shell;
- if (isConnected())
- {
- return internalRunCommand(null, command, context, interpretOutput);
- }
- else
- {
- try
- {
-//dwd this.shell = shell; // FIXME remove this
-
- RunCommandJob job = new RunCommandJob(command, context, interpretOutput);
-
- IStatus status = scheduleJob(job, null, true);
- if (status.isOK())
- {
- return job.getOutputs();
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null)
- throw exc;
- else
- showOperationCancelledMessage(shell);
- }
- return null;
- }
- }
-
- /**
- * overridden so that for universal we don't need to do in modal thread
- */
- public IRemoteCommandShell runShell(Object context) throws Exception
- {
-//dwd if (shell != null)
-//dwd this.shell = shell;
- IRemoteCommandShell cmdShell = null;
- if (isConnected())
- {
- cmdShell = internalRunShell(null, context);
- }
- else
- {
- try
- {
-//dwd this.shell = shell; // FIXME remove this
- RunShellJob job = new RunShellJob(context);
-
- IStatus status = scheduleJob(job, null, true);
- if (status.isOK())
- {
- return (IRemoteCommandShell) job.getOutputs()[0];
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null)
- throw exc;
- else
- showOperationCancelledMessage(shell);
- }
- }
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, this));
-
- return cmdShell;
- }
-
- /**
- * Execute a remote command. This is only applicable if the subsystem
- * factory reports true for supportsCommands().
- *
- * @param command Command to be executed remotely.
- * @param context context of a command (i.e. working directory). <code>null</code> is
- * valid and means to use the default context.
- * @return Array of objects that are the result of running this command.
- * Typically, these are messages logged by the command.
- */
- public Object[] runCommand(String command, Object context) throws Exception
- {
- return runCommand(command, context, true);
- }
-
- /**
- * Send a command as input to a running command shell.
- *
- * @param input the command to invoke in the shell.
- * @param commandObject the shell or command to send the invocation to.
- */
- public void sendCommandToShell(String input, Object commandObject) throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- Display display = Display.getCurrent();
- if (display != null)
- {
- internalSendCommandToShell(new NullProgressMonitor(), input, commandObject);
- }
- else
- {
- try
- {
-//dwd this.shell = shell; // FIXME remove this
- SendCommandToShellJob job = new SendCommandToShellJob(input, commandObject);
-
- IStatus status = scheduleJob(job, null, true);
- if (status.isOK())
- {
- return;
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null)
- throw exc;
- else
- showOperationCancelledMessage(shell);
- }
- }
- }
- else
- SystemBasePlugin.logDebugMessage(this.getClass().getName(),
- "in SubSystemImpl.sendCommandToShell: isConnected() returning false!"); //$NON-NLS-1$
-
- }
-
- /**
- * Cancel a shell or running command.
- *
- * @param commandObject the shell or command to cancel.
- */
- public void cancelShell(Object commandObject) throws Exception
- {
- if (isConnected())
- {
- internalCancelShell(null, commandObject);
- }
- else
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- try
- {
-//dwd this.shell = shell; // FIXME remove this
- CancelShellJob job = new CancelShellJob(commandObject);
- scheduleJob(job, null, false);
- }
- catch (InterruptedException exc)
- {
- if (shell == null)
- throw exc;
- else
- showOperationCancelledMessage(shell);
- }
- }
- else
- SystemBasePlugin.logDebugMessage(this.getClass().getName(),
- "in SubSystemImpl.cancelShell: isConnected() returning false!"); //$NON-NLS-1$
- }
- }
-
- /**
- * Remove and Cancel a shell or running command.
- *
- * @param commandObject the shell or command to cancel.
- */
- public void removeShell(Object commandObject) throws Exception
- {
- if (isConnected())
- {
- internalRemoveShell(commandObject);
- }
- else
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- try
- {
-//dwd this.shell = shell; // FIXME remove this
- RemoveShellJob job = new RemoveShellJob(commandObject);
- scheduleJob(job, null, false);
- }
- catch (InterruptedException exc)
- {
- if (shell == null)
- throw exc;
- else
- showOperationCancelledMessage(shell);
- }
- }
- else
- SystemBasePlugin.logDebugMessage(this.getClass().getName(),
- "in SubSystemImpl.removeShell: isConnected() returning false!"); //$NON-NLS-1$
- }
- }
-
- /**
- * Represents the subsystem operation of running a remote command.
- */
- protected class RunCommandJob extends SubSystemOperationJob
- {
- protected String _cmd;
-
- protected Object _runContext;
-
- protected boolean _runInterpret;
-
- /**
- * Creates a new RunCommandJob
- *
- * @param cmd
- * The remote command to run
- * @param runContext
- * The context in which to run the command
- * @param runInterpret
- * Whether or not to interpret results of the command as RSE
- * objects
- */
- public RunCommandJob(String cmd, Object runContext, boolean runInterpret)
- {
- super(ShellStrings.RSESubSystemOperation_Run_command_message);
- _cmd = cmd;
- _runContext = runContext;
- _runInterpret = runInterpret;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException,
- Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getRunningMessage(_cmd);
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits))
- throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
- getHostName()).getLevelOneText());
- runOutputs = internalRunCommand(mon, _cmd, _runContext, _runInterpret);
- }
- }
-
- /**
- * Represents the subsystem operation of running a remote shell.
- */
- protected class RunShellJob extends SubSystemOperationJob
- {
- protected Object _runContext;
-
- /**
- * Creates a new RunShellJob
- *
- * @param runContext
- * the context within which the shell will be ran
- */
- public RunShellJob(Object runContext)
- {
- super(ShellStrings.RSESubSystemOperation_Run_Shell_message);
- _runContext = runContext;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException,
- Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits))
- throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
- getHostName()).getLevelOneText());
- runOutputs = new Object[]
- {
- internalRunShell(mon, _runContext)
- };
- }
- }
-
- /**
- * Represents the subsystem operation of cancelling a remote shell.
- */
- protected class CancelShellJob extends SubSystemOperationJob
- {
- protected Object _runContext;
-
- /**
- * Constructs a new CancelShellJob
- *
- * @param runContext
- * The context for the cancelled shell
- */
- public CancelShellJob(Object runContext)
- {
- super(ShellStrings.RSESubSystemOperation_Cancel_Shell_message);
- _runContext = runContext;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException,
- Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits))
- throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
- getHostName()).getLevelOneText());
- internalCancelShell(mon, _runContext);
- }
- }
-
- /**
- * Represents the subsystem operation of sending a command to a remote
- * shell.
- */
- protected class SendCommandToShellJob extends SubSystemOperationJob
- {
- protected Object _runContext;
-
- protected String _cmd;
-
- /**
- * Constructs a new SendCommandToShellJob
- *
- * @param cmd
- * The command to send to the shell
- * @param runContext
- * The context in which the command is to be run
- */
- public SendCommandToShellJob(String cmd, Object runContext)
- {
- super(ShellStrings.RSESubSystemOperation_Send_command_to_Shell_message);
- _cmd = cmd;
- _runContext = runContext;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException,
- Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getRunningMessage(_cmd);
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits))
- throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
- getHostName()).getLevelOneText());
- internalSendCommandToShell(mon, _cmd, _runContext);
- }
- }
-
- /**
- * Represents the subsystem operation of cancelling and removing a remote
- * shell from the view.
- */
- protected class RemoveShellJob extends SubSystemOperationJob
- {
- protected Object _runContext;
-
- /**
- * Constructs a new RemoveShellJob
- *
- * @param runContext
- * the context for the removed shell
- */
- public RemoveShellJob(Object runContext)
- {
- super(ShellStrings.RSESubSystemOperation_Remove_Shell_message);
- _runContext = runContext;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException,
- Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits))
- throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
- getHostName()).getLevelOneText());
- internalRemoveShell(_runContext);
- }
- }
-
- /**
- * Actually run a remote command. This is called by the run(IProgressMonitor
- * monitor) method, which in turn is called by runCommand(...).
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new
- * InterruptedException()
- * <li>if something else bad happens, throw new
- * java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT COMMANDS!
- */
- protected Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context)
- throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException, SystemMessageException
- {
- return null;
- }
-
- /**
- * Actually run a remote command. This is called by the run(IProgressMonitor
- * monitor) method, which in turn is called by runCommand(...).
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new
- * InterruptedException()
- * <li>if something else bad happens, throw new
- * java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT COMMANDS!
- */
- protected Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context, boolean interpretOutput)
- throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException, SystemMessageException
- {
- return null;
- }
-
- protected IRemoteCommandShell internalRunShell(IProgressMonitor monitor, Object context)
- throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException, SystemMessageException
- {
- return null;
- }
-
- protected void internalCancelShell(IProgressMonitor monitor, Object command)
- throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
- {
- }
-
- protected void internalSendCommandToShell(IProgressMonitor monitor, String cmd, Object command)
- throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
- {
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 74cb509f8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystemConfiguration.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystemConfiguration;
-
-
-
-public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfiguration implements IRemoteCmdSubSystemConfiguration
-{
- protected String translatedType;
-
-
- /**
- * Default constructor.
- */
- public RemoteCmdSubSystemConfiguration()
- {
- super();
- }
- // --------------------------------------------
- // PARENT METHODS RELATED TO WHAT WE SUPPORT...
- // --------------------------------------------
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsSubSystemConnect()
- */
- public boolean supportsSubSystemConnect()
- {
- return true;
- }
-
- /**
- * Return true if the subsystem supports more than one filter string
- */
- public boolean supportsMultiStringFilters()
- {
- return false;
- }
-
- /**
- * Return true if the subsystem supports the exporting of filter strings from it's filters
- */
- public boolean supportsFilterStringExport()
- {
- return false;
- }
-
- /**
- * Return true if subsystems of this configuration support the environment variables property.
- * For default remote command subsystems, we return <code>true</code>.
- * @see org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystemConfiguration#supportsEnvironmentVariablesPropertyPage()
- */
- public boolean supportsEnvironmentVariablesPropertyPage()
- {
- return true;
- }
-
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isPortEditable()
- */
- public boolean isPortEditable()
- {
- return true;
- }
-
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsCommands()
- */
- public boolean supportsCommands()
- {
- return true;
- }
- /**
- * We return false.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsProperties()
- */
- public boolean supportsProperties()
- {
- return false;
- }
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters()
- {
- return false;
- }
- /**
- * We return false
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsNestedFilters()
- */
- public boolean supportsNestedFilters()
- {
- return false;
- }
- /**
- * Tell us if filter strings are case sensitive. The default is false.
- */
- public boolean isCaseSensitive()
- {
- return false;
- }
- /**
- * Tell us if duplicate filter strings are supported. The default is true for command subsystem factories!
- */
- public boolean supportsDuplicateFilterStrings()
- {
- return true;
- }
-
- // ------------------------------------------------------
- // PARENT METHODS RELATED TO FILTERS...
- // ... ONLY INTERESTING IF supportsFilters() return true!
- // ------------------------------------------------------
-
- /**
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createDefaultFilterPool(ISystemFilterPoolManager)
- */
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"in createDefaultFilterPool for remote file subsystem factory");
- ISystemFilterPool pool = null;
- //try {
- // -----------------------------------------------------
- // create a pool named filters
- // -----------------------------------------------------
- // PHIL HERE: SINCE WE DON'T SHOW CMD SUBSYSTEMS BY DEFAULT, WHY BOTHER CREATING A DEFAULT POOL?
- //pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName()), true); // true=>is deletable by user
- //System.out.println("Pool created");
- // ---------------------------------------------------------------------------------------------
- // create default filters in that pool iff this is the user's private profile we are creating...
- // ---------------------------------------------------------------------------------------------
- //if (isUserPrivateProfile(mgr))
- //{
- //}
- //} catch (Exception exc)
- //{
- //RSEUIPlugin.logError("Error creating default filter pool",exc);
- //}
- return pool;
- }
-
-
-
-
- /**
- * Return the translated string to show in the property sheet for the type property.
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
- {
- // do we really need this?
- //if (translatedType == null)
- // translatedType = SystemResources.RESID_PROPERTY_FILE_FILTER_VALUE;
- return translatedType;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystemConfiguration#getCommandSeparator()
- */
- public String getCommandSeparator()
- {
- return ";"; //$NON-NLS-1$
- }
-
-
-
-
-
-
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 68aeb831c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCommandShell.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-import java.util.ArrayList;
-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.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-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.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
-{
-
-
- protected String _id;
- protected String _name;
- protected String _type;
- protected IRemoteFile _cwd;
- protected ArrayList _output;
- protected IRemoteFileSubSystem _fileSubSystem;
- protected IRemoteCmdSubSystem _cmdSubSystem;
- protected ArrayList _cmdHistory;
- protected IProject _project;
-
-
-
- public RemoteCommandShell(IRemoteCmdSubSystem cmdSubSystem)
- {
- _output = new ArrayList();
- _cmdHistory = new ArrayList();
- _cmdSubSystem = cmdSubSystem;
- }
-
- public void setName(String name)
- {
- _name = name;
- }
-
- public String getName()
- {
- return _name;
- }
-
-
-
- public String getId()
- {
- if (_id == null)
- {
- IRemoteCmdSubSystem subSystem = getCommandSubSystem();
- IHost connection = subSystem.getHost();
- String name = connection.getAliasName();
-
- IRemoteCommandShell[] shells = subSystem.getShells();
-
- List currentNames = new ArrayList();
- for (int i = 0; i < shells.length; i++)
- {
- IRemoteCommandShell shell = shells[i];
- if (shell != this)
- {
- // DKM - noticed that this caused a stack overflow in one scenario
- if (shell instanceof RemoteCommandShell)
- {
- currentNames.add(((RemoteCommandShell)shell)._id);
- }
- }
- }
- if (currentNames.size() > 0)
- {
- int number = 2;
- String newName = name + " " + number; //$NON-NLS-1$
- if (currentNames.contains(name)) {
- while (currentNames.contains(newName))
- {
- number++;
- newName = name + " " + number; //$NON-NLS-1$
- }
- name = newName;
- }
- }
- _id = name;
-
- }
- return _id;
- }
-
-
-
- public void setType(String type)
- {
- _type = type;
- }
-
- public String getType()
- {
- return _type;
- }
-
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- public Object[] listOutput()
- {
- return _output.toArray();
- }
-
- public int getIndexOf(Object output)
- {
- return _output.indexOf(output);
- }
-
- public Object getOutputAt(int index)
- {
- return _output.get(index);
- }
-
- public int getSize()
- {
- return _output.size();
- }
-
- public void addOutput(Object output)
- {
- _output.add(output);
- }
-
- public void removeOutput()
- {
- _output.clear();
- }
-
- public void removeOutput(Object output)
- {
- _output.remove(output);
- }
-
- public IRemoteFileSubSystem getFileSubSystem()
- {
- if (_fileSubSystem == null)
- {
- if (_cmdSubSystem != null)
- {
- _fileSubSystem = RemoteFileUtility.getFileSubSystem(_cmdSubSystem.getHost());
- }
- }
- return _fileSubSystem;
- }
-
- public IRemoteCmdSubSystem getCommandSubSystem()
- {
- if (_cmdSubSystem == null)
- {
- if (_fileSubSystem != null)
- {
- try
- {
- IHost host = _fileSubSystem.getHost();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] sses = sr.getSubSystems(host);
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteCmdSubSystem)
- {
- IRemoteCmdSubSystem cmdSubSystem = (RemoteCmdSubSystem)sses[i];
- _cmdSubSystem = cmdSubSystem;
- }
- }
- }
- catch (Exception e)
- {
- }
- }
- }
-
- return _cmdSubSystem;
- }
-
- public Object[] getRoots()
- {
- RemoteOutput[] results = new RemoteOutput[_output.size()];
- for (int i = 0; i < _output.size(); i++)
- {
- results[i] = (RemoteOutput) _output.get(i);
- }
- return results;
- }
-
- public abstract String getTitle();
-
- public abstract boolean isActive();
-
- public void updateHistory(String cmd)
- {
- /*
- String text = cmd;
- int tagIndex = text.indexOf("BEGIN-END-TAG");
- if (tagIndex > 0)
- {
- text= text.substring(0, tagIndex - 6);
- cmd = text;
- }
- */
- _cmdHistory.add(cmd);
- }
-
- public String[] getHistory()
- {
- String[] cmds = null;
- if (_cmdHistory.size() > 0)
- {
- cmds = new String[_cmdHistory.size()];
- for (int i = 0; i < cmds.length; i++)
- cmds[i] = (String) _cmdHistory.get(i);
- }
- else
- {
- cmds = new String[0];
- }
- return cmds;
- }
-
-
- /**
- * Get the current working directory for this command
- * @return the current working directory
- */
- public Object getContext()
- {
- return _cwd;
- }
-
- /**
- * Get the current working directory for this command
- * @return the current working directory
- */
- public IRemoteFile getWorkingDirectory()
- {
- return _cwd;
- }
-
- /**
- * Set the current working directory for this command
- * @param file
- */
- public void setWorkingDirectory(IRemoteFile file)
- {
- _cwd = file;
- }
-
- protected boolean isWindows()
- {
- String type = getCommandSubSystem().getHost().getSystemType();
-
- return (type.equals("Windows") || //$NON-NLS-1$
- type.equals("Local") && System.getProperty("os.name").toLowerCase().startsWith("win")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
-
-
- /**
- * Override to provide a list of possible commands
- */
- public abstract ICandidateCommand[] getCandidateCommands();
-
-
- public void associateProject(IProject project)
- {
- _project = project;
- }
-
-
- public IProject getAssociatedProject()
- {
- return _project;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteError.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteError.java
deleted file mode 100644
index 627ea232a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteError.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteError;
-
-/**
- * The RemoteOuputImpl class is an implementation of IRemoteOutput.
- * It is used for storing information about a particular line of output
- */
-public class RemoteError extends RemoteOutput implements IRemoteError
-{
-
- /**
- * Constructor
- * @param parent container of the output
- */
- public RemoteError(Object parent, String type)
- {
- super(parent, type);
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteOutput.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteOutput.java
deleted file mode 100644
index 6e8a49fdf..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteOutput.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput;
-
-
-/**
- * The RemoteOuputImpl class is an implementation of IRemoteOutput.
- * It is used for storing information about a particular line of output
- */
-public class RemoteOutput implements IAdaptable, IRemoteOutput
-{
-
- protected String _type;
- protected String _text;
- protected String _path;
- protected int _line = 0;
- protected int _startOffset = -1;
- protected int _endOffset = -1;
-
- private Object _parent;
-
- /**
- * Constructor
- * @param parent container of the output
- */
- public RemoteOutput(Object parent, String type)
- {
- _parent = parent;
- _type = type;
- }
-
- /**
- * Sets the type of remote output
- * @param type
- */
- public void setType(String type)
- {
- _type = type;
- }
-
- /**
- * Sets the displayable text for the remote output
- * @param text
- */
- public void setText(String text)
- {
- _text = text;
- }
-
- /**
- * Sets the absolute path for an associated file if applicable
- * @param path
- */
- public void setAbsolutePath(String path)
- {
- _path = path;
- }
-
- /**
- * Sets the associated line number for a particular source if applicable
- * @param line
- */
- public void setLine(int line)
- {
- _line = line;
- }
-
- /**
- * Gets the type of this output
- */
- public String getType()
- {
- return _type;
- }
-
- /**
- * Gets the displayable text for this output
- */
- public String getText()
- {
- return _text;
- }
-
- /**
- * Gets the index of this object within a command object
- */
- public int getIndex()
- {
- if (_parent instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmd = (IRemoteCommandShell) _parent;
- return cmd.getIndexOf(this);
- }
- return -1;
- }
-
- /**
- * Gets the absolute path of an associated file if applicable
- */
- public String getAbsolutePath()
- {
- return _path;
- }
-
- /**
- * Gets the associated line within a file if applicable
- */
- public int getLine()
- {
- return _line;
- }
-
- /**
- * Gets the containing object for this output
- */
- public Object getParent()
- {
- return _parent;
- }
-
- /**
- * Gets the associated adapter for this output
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Returns children of the output, if applicable
- * @return null for this implementation
- */
- public Object[] getChildren()
- {
- return null;
- }
-
- /**
- * Indicates whether this output has children
- * @return false since there are no children
- */
- public boolean hasChildren()
- {
- return false;
- }
-
- /**
- * Gets the displayable label for this output
- * @return the label
- */
- public String getLabel()
- {
- return getText();
- }
-
- /**
- * set the start offset for the line
- * @param offset
- */
- public void setCharStart(int offset)
- {
- _startOffset = offset;
- }
-
- /**
- * set the end offset for the line
- * @param offset
- */
- public void setCharEnd(int offset)
- {
- _endOffset = offset;
- }
-
- /**
- * Gets the associated char start offset for the line
- */
- public int getCharStart()
- {
- return _startOffset;
- }
-
- /**
- * Gets the associated char end offset for the line
- */
- public int getCharEnd()
- {
- return _endOffset;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java
deleted file mode 100644
index 52487f70a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-
-
-
-
-
-
-
-import org.eclipse.rse.core.subsystems.IRemoteSystemEnvVar;
-
-/**
- * Encapsulation of environment variable properties set uniquely per connection.
- */
-/**
- * @lastgen class RemoteSystemEnvVarImpl Impl implements RemoteSystemEnvVar {}
- */
-public class RemoteSystemEnvVar implements IRemoteSystemEnvVar
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String name = NAME_EDEFAULT;
- /**
- * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected static final String VALUE_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String value = VALUE_EDEFAULT;
- /**
- * The default value of the '{@link #getAdditionalAttributes() <em>Additional Attributes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAdditionalAttributes()
- * @generated
- * @ordered
- */
- protected static final String ADDITIONAL_ATTRIBUTES_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String additionalAttributes = ADDITIONAL_ATTRIBUTES_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public RemoteSystemEnvVar()
- {
- super();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The name of the environment variable to set at connect time
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setName(String newName)
- {
- name = newName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The value to set this environment variable to at connect time
- */
- public String getValue()
- {
- return value;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setValue(String newValue)
- {
- value = newValue;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Additional attributes that may need to be persisted per environment variable.
- */
- public String getAdditionalAttributes()
- {
- return additionalAttributes;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setAdditionalAttributes(String newAdditionalAttributes)
- {
- additionalAttributes = newAdditionalAttributes;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString()
- {
-
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: "); //$NON-NLS-1$
- result.append(name);
- result.append(", value: "); //$NON-NLS-1$
- result.append(value);
- result.append(", additionalAttributes: "); //$NON-NLS-1$
- result.append(additionalAttributes);
- result.append(')');
- return result.toString();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommand.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommand.java
deleted file mode 100644
index d76b5a381..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommand.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.subsystems.files.core.model.ISystemRemoteCommand;
-import org.eclipse.rse.subsystems.files.core.model.ISystemRemoteCommandMessage;
-
-
-
-/**
- * A remote command with the command string, messages retrieved, and possibly additional information
- */
-public class SystemRemoteCommand implements ISystemRemoteCommand {
-
-
-
- private String cmd = null;
- private String info = null;
- private Object object = null;
- private ISystemRemoteCommandMessage[] msgs = null;
- private ISubSystem subSys;
-
-
- public SystemRemoteCommand(String cmd, String[] msgsText)
- {
- this(cmd, msgsText, null, null);
- }
-
- public SystemRemoteCommand(String cmd, String[] msgsText, ISubSystem subSys)
- {
- this(cmd, msgsText, null, subSys);
- }
-
- public SystemRemoteCommand(String cmd, String[] msgsText, String[] msgsHelp)
- {
- this(cmd, msgsText, msgsHelp, null);
- }
-
- public SystemRemoteCommand(String cmd, String[] msgsText, String[] msgsHelp, ISubSystem subSys)
- {
- this.cmd = cmd;
- this.subSys = subSys;
- if ( msgsText != null )
- {
- this.msgs = new SystemRemoteCommandMessage[ msgsText.length ];
- for ( int i = 0; i < msgsText.length; i++)
- {
- String msgHelp = null;
- if ( msgsHelp != null && msgsHelp[i] != null )
- msgHelp = msgsHelp[i];
- this.msgs[i] = new SystemRemoteCommandMessage(msgsText[i], msgHelp );
- }
- }
- }
-
-
- public SystemRemoteCommand(String cmd, ISystemRemoteCommandMessage[] msgs)
- {
- this(cmd, msgs, null);
- }
-
- public SystemRemoteCommand(String cmd, ISystemRemoteCommandMessage[] msgs, ISubSystem subSys)
- {
- this.cmd = cmd;
- this.msgs = msgs;
- this.subSys = subSys;
- }
-
-
- /**
- * @return command string
- */
- public String getCommand()
- {
- return cmd;
- }
-
- /**
- * @return any additional information that has been set for the command
- */
- public String getInfo()
- {
- return info;
- }
-
- /**
- * @return any additional object that has been set for the command
- */
- public Object getObject()
- {
- return object;
- }
-
- /**
- * @return the subsystem the command is run on
- */
- public ISubSystem getSubSystem()
- {
- return subSys;
- }
-
- /**
- * @return the messages retrieved by running the command
- */
- public ISystemRemoteCommandMessage[] getMessages()
- {
- return msgs;
- }
-
- public void setSubSystem(ISubSystem sys)
- {
- subSys = sys;
- }
-
- public void setInfo(String info)
- {
- this.info = info;
- }
-
- public void setObject(Object object)
- {
- this.object = object;
- }
-
- public String toString()
- {
- StringBuffer text = new StringBuffer();
- text.append( cmd + '\n');
- for ( int j = 0; j < msgs.length; j++)
- {
- text.append( msgs[j].getMessageText() + '\n' );
- String msgHelp = msgs[j].getMessageHelp();
- if ( msgHelp != null )
- text.append( msgHelp + '\n' );
- }
- return text.toString();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommandMessage.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommandMessage.java
deleted file mode 100644
index b8aef97b7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/SystemRemoteCommandMessage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-
-import org.eclipse.rse.subsystems.files.core.model.ISystemRemoteCommandMessage;
-
-public class SystemRemoteCommandMessage
- implements ISystemRemoteCommandMessage {
-
-
-
- private String msg;
- private String help;
-
- public SystemRemoteCommandMessage(String msg, String help)
- {
- this.msg = msg;
- this.help = help;
- }
-
- public String getMessageText()
- {
- return msg;
- }
-
- public String getMessageHelp()
- {
- return help;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/Activator.java
deleted file mode 100644
index 89ad30416..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/Activator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.shells.core", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.java
deleted file mode 100644
index 83fe1d227..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ShellStrings extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.subsystems.shells.core.ShellStrings"; //$NON-NLS-1$
-
- public static String RESID_SHELLS_COMMAND_SHELL_LABEL;
- public static String RSESubSystemOperation_Cancel_Shell_message;
- public static String RSESubSystemOperation_Remove_Shell_message;
- public static String RSESubSystemOperation_Run_command_message;
- public static String RSESubSystemOperation_Run_Shell_message;
- public static String RSESubSystemOperation_Send_command_to_Shell_message;
- public static String RSESubSystemOperation_Refresh_Output;
-
- static
- {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ShellStrings.class);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.properties
deleted file mode 100644
index cb5aefb44..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RESID_SHELLS_COMMAND_SHELL_LABEL = Command Shell
-RSESubSystemOperation_Cancel_Shell_message = Cancel Shell
-RSESubSystemOperation_Remove_Shell_message = Remove Shell
-RSESubSystemOperation_Run_command_message = Run command
-RSESubSystemOperation_Run_Shell_message = Run Shell
-RSESubSystemOperation_Send_command_to_Shell_message = Send command to Shell
-RSESubSystemOperation_Refresh_Output = Refresh Output \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/ISystemOutputRemoteTypes.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/ISystemOutputRemoteTypes.java
deleted file mode 100644
index 03ea12539..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/ISystemOutputRemoteTypes.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.subsystems.shells.core.model;
-/**
- * All remote object types we support.
- * These can be used when registering property pages against remote output objects.
- */
-public interface ISystemOutputRemoteTypes
-{
-
- // ------------------
- // TYPE CATEGORIES...
- // ------------------
-
- /**
- * There is only one type category for remote output.
- * It is "output".
- */
- public static final String TYPECATEGORY = "output"; //$NON-NLS-1$
-
-
- // -----------
- // TYPES...
- // -----------
-
- /**
- * A folder object
- */
- public static final String TYPE_DIRECTORY = "directory"; //$NON-NLS-1$
-
- /**
- * A file object
- */
- public static final String TYPE_FILE = "file"; //$NON-NLS-1$
-
- /**
- * A command object
- */
- public static final String TYPE_COMMAND = "command"; //$NON-NLS-1$
-
- /**
- * A prompt object
- */
- public static final String TYPE_PROMPT = "prompt"; //$NON-NLS-1$
-
- /**
- * An error object
- */
- public static final String TYPE_ERROR = "error"; //$NON-NLS-1$
-
- /**
- * A warning object
- */
- public static final String TYPE_WARNING = "warning"; //$NON-NLS-1$
-
- /**
- * An informational object
- */
- public static final String TYPE_INFORMATIONAL = "informational"; //$NON-NLS-1$
-
- /**
- * A grep object
- */
- public static final String TYPE_GREP = "grep"; //$NON-NLS-1$
-
-
- /**
- * An environment variable object
- */
- public static final String TYPE_ENVVAR = "envvar"; //$NON-NLS-1$
-
- /**
- * A libpath environment variable object
- */
- public static final String TYPE_ENVVAR_LIBPATH = "libpathenvvar"; //$NON-NLS-1$
-
- /**
- * The path environment variable object
- */
- public static final String TYPE_ENVVAR_PATH = "pathenvvar"; //$NON-NLS-1$
-
- /**
- * A process object
- */
- public static final String TYPE_PROCESS = "process"; //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java
deleted file mode 100644
index b2876cdb3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java
+++ /dev/null
@@ -1,166 +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.subsystems.shells.core.model;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystemConfiguration;
-
-
-/**
- * A string representing a filter sent to remote file subsystems.
- * <p>
- * Filters can be absolute or relative. Absolute contains a folder path, while relative do not.
- * <p>
- * The files can be filtered by name, or by a list of file types. If by name, it can have
- * up to 2 asterisks anywhere in the name for wildcarding. If by types, multiple types can
- * by specified. The types are the file extensions without the dot, as in "java" or "class".
- * <p>
- * Examples:
- * <ul>
- * <li>Absolute file name filter: <code>d:\mystuff\phil*.abc</code>
- * <li>Relative file name filter: <code>phil*.abc</code>
- * <li>Absolute file type filter: <code>d:\mystuff\java,class,</code>
- * <li>Relative file type filter: <code>java,class,</code>
- * <p>
- * Syntactically, file type filter strings have at least one comma.
- * Note that the file name filter string "*.java" is semantically the same
- * as a type filter string "java,". Either one can be used and will get
- * the same results. However, if you specify "java" you will be in trouble,
- * as it will mean look for a file explicitly named "java".
- * <p>
- * It is invalid to have both a comma and an asterisk in the same filter string.
- * It is also invalid to have both a comma and a period in the same filter string.
- */
-public class RemoteCommandFilterString implements Cloneable
-{
- protected String shellStr;
- protected String[] types;
- protected boolean filterByTypes;
-
- /**
- * Constructor to use for a filter to list roots when used absolutely, or list all contents
- * when used relatively.
- */
- public RemoteCommandFilterString()
- {
- shellStr = "*"; //$NON-NLS-1$
- }
- /**
- * Constructor to use when there is no existing filter string.
- * <p>
- * This constructor is better that the default constructor, because it takes a remote file subsystem
- * factory, from which we can query the folder and path separator characters, which are needed
- * to parse and re-build filter strings.
- * @see #setTypes(String[])
- */
- public RemoteCommandFilterString(IRemoteCmdSubSystemConfiguration subsysFactory)
- {
- shellStr = "*"; //$NON-NLS-1$
- }
- /**
- * Constructor to use when an absolute filter string already exists.
- */
- public RemoteCommandFilterString(IRemoteCmdSubSystemConfiguration subsysFactory, String input)
- {
- this(subsysFactory);
- }
- /**
- * Constructor to use when you have a path and filename filter or comma-separated file types list.
- * In the latter case, the last char must be a TYPE_SEP or comma, even for a single type.
- */
- public RemoteCommandFilterString(IRemoteCmdSubSystemConfiguration subsysFactory, String path, String input)
- {
- this(subsysFactory);
- }
-
- public void setSubSystemConfiguration(IRemoteCmdSubSystemConfiguration subsysFactory)
- {
- }
-
- /**
- * Set the file types to subset by. These are extensions, without the dot, as
- * in java, class, gif, etc.
- * You either call this or setFile!
- */
- public void setTypes(String[] types)
- {
- this.types = types;
- filterByTypes = (types != null);
- }
-
-
- /**
- * Concatenate the given file types as a single string, each type comma-separated
- */
- public static String getTypesString(String[] typesArray)
- {
- StringBuffer typesBuffer = new StringBuffer(""); //$NON-NLS-1$
- for (int idx=0; idx<typesArray.length; idx++)
- typesBuffer.append(typesArray[idx]+","); //$NON-NLS-1$
- return typesBuffer.toString();
- }
- /**
- * For file types filters, returns the types as a string of concatenated types,
- * comma-delimited. For file name filters, returns null;
- */
- public String getTypesAsString()
- {
- if (!filterByTypes || (types==null))
- return null;
- return getTypesString(types);
- }
-
- /**
- * Get the types to subset by, if specified.
- * Will be null if this is not a by-type filter string.
- */
- public String[] getTypes()
- {
- return types;
- }
-
- /**
- * Return true if this filter string filters by file types versus by file name
- */
- public boolean getFilterByTypes()
- {
- return filterByTypes;
- }
-
- /**
- * De-hydrate into a string capturing all the attributes
- */
- public String toString()
- {
- return shellStr;
- }
-
- /**
- * Clone this into another filter string object with the same attributes.
- */
- public Object clone()
- {
- RemoteCommandFilterString copy = new RemoteCommandFilterString();
- copy.shellStr = shellStr;
- copy.filterByTypes = filterByTypes;
- if (types!=null)
- {
- copy.types = new String[types.length];
- for (int idx=0; idx<types.length; idx++)
- copy.types[idx] = types[idx]; // don't think we need to clone strings as they are immutable
- }
- return copy;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index b93c5c971..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.model;
-
-import java.util.Random;
-import java.util.Stack;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-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;
-
-
-
-/*
- * This abstract class can be extended to provide a command shell wrapper.
- * When running a shell, commands can be piped to the shell via the
- * sendCommand() method. Echo commands are used to determine when each command
- * is complete. Whenever a command completes, the handleCommandFinished() method
- * is called.
- *
- */
-public abstract class RemoteCommandShellOperation implements ISystemResourceChangeListener
-{
-
- protected class CommandAlias
- {
- private String _alias;
- private String _command;
- public CommandAlias(String alias, String command)
- {
- _alias = alias;
- _command = command;
- }
-
- public String getAlias()
- {
- return _alias;
- }
-
- public String getCommand()
- {
- return _command;
- }
- }
-
-
- protected IRemoteCmdSubSystem _cmdSubSystem;
- protected IRemoteFile _pwd;
- protected Shell _shell;
-
- protected IRemoteCommandShell _remoteCmdShell;
-
- private Stack _commandStack;
- private int _outputOffset = 0;
- private String _cmdSeparator = ";"; //$NON-NLS-1$
-
- private Random _random;
-
- /*
- * Constructor
- */
- public RemoteCommandShellOperation(Shell shell, IRemoteCmdSubSystem cmdSubSystem, IRemoteFile pwd)
- {
- _random = new Random(System.currentTimeMillis());
- _pwd = pwd;
- _cmdSubSystem = cmdSubSystem;
- _shell = shell;
- _commandStack = new Stack();
- _cmdSeparator = _cmdSubSystem.getParentRemoteCmdSubSystemConfiguration().getCommandSeparator();
- }
-
- public void setWorkingDirectory(IRemoteFile pwd)
- {
- _pwd = pwd;
- }
-
- /*
- * Launches a new remote shell
- */
- public IRemoteCommandShell run()
- {
- try
- {
- RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- _remoteCmdShell = _cmdSubSystem.runShell( _pwd);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return _remoteCmdShell;
- }
-
- public IRemoteCommandShell getRemoteCommandShell()
- {
- return _remoteCmdShell;
- }
-
- public void associateProject(IProject project)
- {
- if (_remoteCmdShell != null)
- {
- _remoteCmdShell.associateProject(project);
- }
- }
-
- /*
- * Called when a shell is complete.
- */
- public void finish()
- {
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- if (_remoteCmdShell != null && _remoteCmdShell.isActive())
- {
- try
- {
- _cmdSubSystem.cancelShell( _remoteCmdShell);
- }
- catch (Exception e)
- {
- }
- }
-
- }
-
- private String getEchoCmd(CommandAlias alias)
- {
- return "echo " + getEchoResult(alias); //$NON-NLS-1$
- }
-
- private String getEchoResult(CommandAlias alias)
- {
- return "BEGIN-END-TAG:" + alias.getAlias() + " done"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public String getCurrentCommand()
- {
- if (_commandStack != null && _commandStack.size() > 0)
- {
- CommandAlias firstCommand = (CommandAlias)_commandStack.firstElement();
- return firstCommand.getCommand();
- }
- return null;
- }
-
- /**
- * Send a command to the running command shell.
- * @param cmd the command to run in the shell
- */
- public void sendCommand(String cmd)
- {
- if (_remoteCmdShell != null)
- {
- try
- {
- String newId = String.valueOf(_random.nextInt());
- CommandAlias alias = new CommandAlias(newId, cmd);
- _commandStack.push(alias);
- String echoCmd = getEchoCmd(alias);
-
- // echo command appended after ; so that
- // it isn't treated like stdin for the intial command
- _cmdSubSystem.sendCommandToShell(cmd + _cmdSeparator + echoCmd, _remoteCmdShell);
-
- }
- catch (Exception e)
- {
- }
- }
- }
-
- /**
- * Send input to the running command shell. The input is treated as input to
- * a running program - rather than a new command. As such, no echos are used
- * and it's not logged for completion.
- * @param input the input to send to the running program
- */
- public void sendInput(String input)
- {
- if (_remoteCmdShell != null)
- {
- try
- {
- _cmdSubSystem.sendCommandToShell(input, _remoteCmdShell);
-
- }
- catch (Exception e)
- {
- }
- }
- }
-
-
- public Shell getShell()
- {
- if (_shell.isDisposed())
- {
- _shell = SystemBasePlugin.getActiveWorkbenchShell();
- }
- return _shell;
- }
-
-
-
- /**
- * Indicates whether the command shell is active or not
- * @return true if the command shell is running
- */
- public boolean isActive()
- {
- if (_remoteCmdShell != null)
- {
- return _remoteCmdShell.isActive() && _cmdSubSystem.isConnected();
- }
- return false;
- }
-
- /*
- * Check for remote changes
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- if (event.getType() == ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_FINISHED)
- {
- Object source = event.getSource();
- if (source == _cmdSubSystem)
- {
- handleShellFinished();
- }
- else if (source == _remoteCmdShell)
- {
- handleShellFinished();
- }
- }
- else if (event.getType() == ISystemResourceChangeEvents.EVENT_REFRESH)
- {
- Object parent = event.getParent();
- if (parent == _remoteCmdShell)
- {
- outputUpdated();
- }
- }
- }
-
- /**
- * Called whenever output is retrieved from the host
- */
- public void outputUpdated()
- {
- // check for command completion
- synchronized(_commandStack)
- {
- if (!_commandStack.empty())
- {
- Object[] outputs = _remoteCmdShell.listOutput();
- synchronized(outputs)
- {
- for (int i = _outputOffset; i < outputs.length && !_commandStack.empty(); i++)
- {
- boolean handledOutput = false;
-
- CommandAlias firstCommand = (CommandAlias)_commandStack.firstElement();
-
- Object output = outputs[_outputOffset];
- if (output instanceof IRemoteOutput)
- {
- IRemoteOutput rmtOutput = (IRemoteOutput)output;
- String text = rmtOutput.getText();
- if (commandMatches(text, firstCommand))
- {
- _commandStack.remove(0);
- handleCommandFinished(firstCommand.getCommand());
- handledOutput = true;
- }
- }
- if (!handledOutput)
- {
- handleOutputChanged(firstCommand.getCommand(), output);
- }
- _outputOffset++;
- }
- }
-
- }
- }
- }
-
- protected boolean commandMatches(String outputEcho, CommandAlias firstCommand)
- {
- String expected = getEchoResult(firstCommand);
- if (outputEcho.equals(expected))
- {
- return true;
- }
- else
- {
- int index = outputEcho.indexOf(expected);
- if (index > 0)
- {
- if (outputEcho.charAt(index - 1) != ';' && (outputEcho.indexOf("echo") == -1)) //$NON-NLS-1$
- {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /*
- * Called when the shell is complete
- */
- public void handleShellFinished()
- {
- finish();
- }
-
- /*
- * Called when the specified command is complete
- * @param cmd the completed command
- */
- public abstract void handleCommandFinished(String cmd);
-
- /*
- * Called whenever output has changed
- * @param command the current command
- * @param output the new output object
- */
- public abstract void handleOutputChanged(String command, Object output);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperationManager.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperationManager.java
deleted file mode 100644
index 118320359..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperationManager.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-
-
-/**
- * class for managing sets of remote command shell operations.
- */
-public class RemoteCommandShellOperationManager
-{
- protected List _commandShellOperations;
- protected static RemoteCommandShellOperationManager _instance= new RemoteCommandShellOperationManager();
-
- protected RemoteCommandShellOperationManager()
- {
- _commandShellOperations = new ArrayList();
- }
-
- public static RemoteCommandShellOperationManager getInstance()
- {
- return _instance;
- }
-
- public RemoteCommandShellOperation findRemoteCommandShellOperation(IRemoteCmdSubSystem ss, IProject project, Class type)
- {
- for (int i = 0; i < _commandShellOperations.size();i++)
- {
- RemoteCommandShellOperation op = (RemoteCommandShellOperation)_commandShellOperations.get(i);
- if (op.isActive())
- {
- if (op.getClass() == type)
- {
- IRemoteCommandShell rmtShell = op.getRemoteCommandShell();
- if (rmtShell.getCommandSubSystem() == ss && rmtShell.getAssociatedProject() == project)
- {
- return op;
- }
- }
- }
- else
- {
- _commandShellOperations.remove(op);
- }
- }
-
- return null;
- }
-
- public void registerRemoteCommandShellOperation(RemoteCommandShellOperation newOp)
- {
- _commandShellOperations.add(newOp);
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 309e4f6cd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.model;
-
-
-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.swt.widgets.Display;
-
-
-public class SimpleCommandOperation
-{
- private IRemoteCmdSubSystem _subsystem;
- private IRemoteFile _workingDirectory;
- private IRemoteCommandShell _cmdShell;
- private int _outputLineIndex = 0;
-
- public SimpleCommandOperation(IRemoteCmdSubSystem subsystem, IRemoteFile workingDirectory)
- {
- _subsystem = subsystem;
- _workingDirectory = workingDirectory;
- }
-
- public void runCommand(String command) throws Exception
- {
- Object[] result =_subsystem.runCommand(command, _workingDirectory, false);
- _cmdShell = (IRemoteCommandShell)result[0];
- }
-
- public IRemoteCommandShell getCommandShell()
- {
- return _cmdShell;
- }
-
- public void putInput(String input) throws Exception
- {
- if (isActive())
- {
- _subsystem.sendCommandToShell(input, _cmdShell);
- }
- }
-
- public boolean isActive()
- {
- if (_cmdShell != null)
- {
- return _cmdShell.isActive();
- }
- return false;
- }
-
- protected boolean hasMoreOutput()
- {
- if (_cmdShell != null)
- {
-
- if (_cmdShell.listOutput().length > _outputLineIndex)
- {
- return true;
- }
- }
- return false;
- }
-
- public void cancelCommand() throws Exception
- {
- if (_cmdShell != null && _cmdShell.isActive())
- {
- _cmdShell.getCommandSubSystem().cancelShell(_cmdShell);
- }
- }
-
-
- public String readLine(boolean waitForOutput)
- {
- if (_cmdShell != null)
- {
- if (!hasMoreOutput() && waitForOutput)
- {
- Display display = Display.getCurrent();
- try
- {
- while (!hasMoreOutput() && isActive())
- {
- while (display!=null && display.readAndDispatch()) {
- //Process everything on event queue
- }
- if (!hasMoreOutput() && isActive()) Thread.sleep(100);
- }
- }
- catch (InterruptedException e)
- {
- //Cancel waiting
- }
- if (!isActive())
- {
- return null;
- }
- }
-
- {
- Object output = _cmdShell.getOutputAt(_outputLineIndex);
- _outputLineIndex++;
- if (output instanceof IRemoteOutput)
- {
- return ((IRemoteOutput)output).getText();
- }
- else if (output instanceof IRemoteFile)
- {
- return ((IRemoteFile)output).getLabel();
- }
-
- }
- }
- return ""; //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/ICandidateCommand.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/ICandidateCommand.java
deleted file mode 100644
index 89c59134f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/ICandidateCommand.java
+++ /dev/null
@@ -1,60 +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.subsystems.shells.core.subsystems;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * This interface represents a candidate command. A candidate command is a command that can be
- * run in a command subsystem. The command subsystem api, getCandidateCommands(), returns a list
- * of candidate commands. The primary use of candidate commands is for command line content assist.
- * Implement this interface to provide unique command candidates for a particular command subsystem.
- */
-public interface ICandidateCommand
-{
-
- /**
- * Gets the name of the candidate command
- * @return the name of the candidate command
- */
- public String getName();
-
- /**
- * Gets the type of the candidate command.
- * @return the type of the command
- */
- public String getType();
-
- /**
- * Gets the description for a candidate command.
- * @return the description of the command
- */
- public String getDescription();
-
- /**
- * Gets the image descriptor to display for a candidate command
- * @return the image descriptor for the command
- */
- public ImageDescriptor getImageDescriptor();
-
- /**
- * Gets the path for a candidate command
- * @return the path of the command if one exists
- */
- public String getPath();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java
deleted file mode 100644
index 3b708495c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java
+++ /dev/null
@@ -1,213 +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.subsystems.shells.core.subsystems;
-
-//
-
-
-import java.util.List;
-
-import org.eclipse.rse.core.subsystems.IRemoteSystemEnvVar;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @lastgen interface RemoteCmdSubSystem extends SubSystem {}
- */
-
-public interface IRemoteCmdSubSystem extends ISubSystem{
-
-
-
-
- /**
- * Return parent subsystem factory, cast to a RemoteCmdSubSystemConfiguration
- */
- public IRemoteCmdSubSystemConfiguration getParentRemoteCmdSubSystemConfiguration();
-
- /**
- * Execute a remote command. This is only applicable if the subsystem factory reports
- * true for supportsCommands().
- * @param command Command to be executed remotely.
- * @param context context of a command (i.e. working directory). Null is valid and means to run the
- * command as a shell command in the default shell.
- * @return Array of objects that are the result of running this command. Typically, these
- * are messages logged by the command.
- * @see org.eclipse.rse.shells.ui.RemoteCommandHelpers
- */
- public Object[] runCommand(String command, Object context) throws Exception;
-
- /**
- * Execute a remote command. This is only applicable if the subsystem factory reports
- * true for supportsCommands().
- * @param command Command to be executed remotely.
- * @param context context of a command (i.e. working directory). Null is valid and means to run the
- * command as a shell command in the default shell.
- * @param interpretOutput whether to interpret the output or not
- * @return Array of objects that are the result of running this command. Typically, these
- * are messages logged by the command.
- * @see org.eclipse.rse.shells.ui.RemoteCommandHelpers
- */
- public Object[] runCommand(String command, Object context, boolean interpretOutput) throws Exception;
-
-
- /**
- * Launch a new command shell. This is only applicable if the subsystem factory reports
- * true for supportsCommands().
- * @param context context of a shell (i.e. working directory). Null is valid and means to use the default context.
- * @return An object that represents the command and it's output.
- * @see org.eclipse.rse.shells.ui.RemoteCommandHelpers
- */
- public IRemoteCommandShell runShell(Object context) throws Exception;
-
-
- /**
- * Send a command as input to a running command shell.
- * @param input the command to invoke in the shell.
- * @param commandObject the shell or command to send the invocation to.
- * @see org.eclipse.rse.shells.ui.RemoteCommandHelpers
- */
- public void sendCommandToShell(String input, Object commandObject) throws Exception;
-
- /**
- * Cancel a shell or running command.
- * @param commandObject the shell or command to cancel.
- */
- public void cancelShell(Object commandObject) throws Exception;
-
- /**
- * Remove a shell. If the shell is running cancel it first.
- * @param commandObject the shell or command to cancel & remove.
- */
- public void removeShell(Object commandObject) throws Exception;
-
- /**
- * Get the default running command shell for this command subsystem. If no such shell exists or is running, a new one is launched.
- * @return the default running command shell
- */
- public IRemoteCommandShell getDefaultShell() throws Exception;
-
- /**
- * Get all command shells and transient commands that have been run or are running for this command subsystem.
- * @return the list of running command shells and commands
- */
- public IRemoteCommandShell[] getShells();
-
- /**
- * Restore all the command shells that were open before disconnecting during
- * the previous session
- * @param shell a window used for notification
- * @return the command shells that were restored
- */
- public IRemoteCommandShell[] restoreShellState(Shell shell);
-
- /**
- * Determine whether the command subsystem can run a shell
- * @return whether a shell can be run or not
- */
- public boolean canRunShell();
-
- /**
- * Determine whether the command subsystem can run a command
- * @return whether a command can be run or not
- */
- public boolean canRunCommand();
-
-
- /**
- * Provide list of executed commands on subsystem.This is only applicable if the subsystem factory reports
- * true for supportsCommands().
- */
- public String[] getExecutedCommands();
-
-
- /**
- * Returns the shell encoding to assume when reading IO from a remote shell
- */
- public String getShellEncoding();
-
-
- /**
- * Provide a list of possible commands for the specified context. This method is primarily used
- * for command line assist to get a list of possible command completions. Typically the context is
- * a handle to a shell or command, such as an IRemoteCommandShell, but the interface is left generic, with Object,
- * because some command subsystems have different notions of context.
- *
- * @param context the context for the possible commands
- * @return a list of possible commands
- */
- public ICandidateCommand[] getCandidateCommands(Object context);
-
- // ----------------------------------------
- // ENVIRONMENT VARIABLE METHODS ...
- // ----------------------------------------
- /**
- * Get the initial environment variable list as a string of RemoteSystemEnvVar objects.
- * Array returned may be size zero but will not be null.
- */
- public IRemoteSystemEnvVar[] getEnvironmentVariableList();
- /**
- * Set the initial environment variable list entries, all in one shot, using
- * a pair of String arrays: the first is the environment variable names,
- * the second is the corresponding environment variable values.
- */
- public void setEnvironmentVariableList(String[] envVarNames, String[] envVarValues);
- /**
- * Add environment variable entry, given a name and value
- */
- public void addEnvironmentVariable(String name, String value);
- /**
- * Add environment variable entry, given a RemoteSystemEnvVar object
- */
- public void addEnvironmentVariable(IRemoteSystemEnvVar rsev);
- /**
- * Remove environment variable entry given its RemoteSystemEnvVar object
- */
- public void removeEnvironmentVariable(IRemoteSystemEnvVar rsev);
- /**
- * Remove environment variable entry given only its environment variable name
- */
- public void removeEnvironmentVariable(String name);
- /**
- * Given an environment variable name, find its RemoteSystemEnvVar object.
- * Returns null if not found!
- */
- public IRemoteSystemEnvVar getEnvironmentVariable(String name);
- /**
- * Given an environment variable name, find its value.
- * Returns null if not found.
- */
- public String getEnvironmentVariableValue(String name);
-
- /**
- * Get the invalid characters for an environment variable name. Used
- * by the environment variables property page to diagnose invalid
- * environment variable names.
- */
- public String getInvalidEnvironmentVariableNameCharacters();
-
- /**
- * <i><b>Private</b>. Do not override or call.</i>
- * @generated This field/method will be replaced during code generation
- * @return The list of EnvVars references
- */
- java.util.List getEnvVars();
-
- public List getHostEnvironmentVariables();
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystemConfiguration.java
deleted file mode 100644
index c5588be38..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystemConfiguration.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * @lastgen interface RemoteCmdSubSystemConfiguration extends SubSystemConfiguration {}
- */
-public interface IRemoteCmdSubSystemConfiguration extends ISubSystemConfiguration
-{
-
- /**
- * Return true if subsystems of this factory support the environment variables property.
- * Return true to show it, return false to hide it.
- * @return <code>true</code> if environment variables are fully supported
- */
- public boolean supportsEnvironmentVariablesPropertyPage();
-
-
- /**
- * Return in string format the character used to separate commands. Eg, ";" or "&"
- * @return command separator String
- */
- public String getCommandSeparator();
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java
deleted file mode 100644
index 5aede73fe..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java
+++ /dev/null
@@ -1,149 +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.subsystems.shells.core.subsystems;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-
-/**
- * This interface represents a handle to a remote command,
- * which is either a transient command or a command shell.
- */
-public interface IRemoteCommandShell
-{
-
- /**
- * Gets the ID of the command shell
- * @return the id
- */
- public String getId();
-
-
- /**
- * Gets the name of the command shell or command that is being run.
- * @return the name of the command
- */
- public String getName();
-
- /**
- * Gets the type of the command shell or command that is being run. The type may either be a "Shell" or a "Command".
- * @return the type of the command
- */
- public String getType();
-
- /**
- * Get the list of output objects for this command.
- * @return the list of output objects
- */
- public Object[] listOutput();
-
- /**
- * Get the current context for this command shell. In the case of a unix shell, this
- * will be the working directory as an
- * @link{org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile}.
- *
- * This is used in order to store the state of the current shell on disconnect,
- * such that the same directory can be set on reconnect. It may also be used
- * as input for content assist.
- *
- * @return the current context
- */
- public Object getContext();
-
-
- /**
- * Return the number of output objects for this command.
- * @return the number of output objects
- */
- public int getSize();
-
- /**
- * Return the file subsystem associated with this command
- * @return the file subsystem associated with this command
- */
- public IRemoteFileSubSystem getFileSubSystem();
-
- /**
- * Return the command subsystem associated with this command
- * @return the command subsystem associated with this command
- */
- public IRemoteCmdSubSystem getCommandSubSystem();
-
-
- /*
- * Set the associated project for this command shell. The
- * associated project is looked up first when resolving files
- * from shell (i.e. during double click on errors)
- * @param the project to associate with this shell
- */
- public void associateProject(IProject project);
-
- /*
- * Return the associated project for this command shell. The
- * associated project is looked up first when resolving files
- * from shell (i.e. during double click on errors)
- * @return the associated project for this command shell
- */
- public IProject getAssociatedProject();
-
- /**
- * Add an output object to the list of output for this command
- * @param output the output object to add
- */
- public void addOutput(Object output);
-
- /**
- * Remove output from the list of output for this command
- */
- public void removeOutput();
-
- /**
- * Remove output from the list of output for this command
- */
- public void removeOutput(Object output);
-
- /**
- * Get the position of this output object in the command container
- */
- public int getIndexOf(Object output);
-
- /**
- * Get the output object the specified index
- */
- public Object getOutputAt(int index);
-
- /**
- * Indicate whether the corresponding command is running or not
- * @return whether the command is running or not
- */
- public boolean isActive();
-
- /**
- * Return the list of commands passed into this command
- * @return the list of commands issued
- */
- public String[] getHistory();
-
- public void updateHistory(String cmd);
-
- /**
- * Return the list of possible commands for this command shell
- * @return the list of possible commands
- */
- public ICandidateCommand[] getCandidateCommands();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteError.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteError.java
deleted file mode 100644
index 70fd3df8c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteError.java
+++ /dev/null
@@ -1,23 +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.subsystems.shells.core.subsystems;
-/**
- * This interface represents a handle to a line of remote command error.
- */
-public interface IRemoteError extends IRemoteOutput
-{
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteOutput.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteOutput.java
deleted file mode 100644
index ad6052e71..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteOutput.java
+++ /dev/null
@@ -1,52 +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.subsystems.shells.core.subsystems;
-
-import org.eclipse.rse.core.subsystems.IRemoteLineReference;
-
-/**
- * This interface represents a handle to a line of remote command output.
- */
-public interface IRemoteOutput extends IRemoteLineReference
-{
-
-
- /**
- * Gets the type of a line of output. By default remote output is "stdout", but it could be one of a
- * number of things (i.e. "error", "warning", "file", "directory", "grep", etc.)
- *
- * @return the output type
- */
- public String getType();
-
- /**
- * Gets the text to display for a line of output.
- *
- * @return the output text
- */
- public String getText();
-
- /**
- * Gets the index of this output within a command
- *
- * @return the index within the command
- */
- public int getIndex();
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IServiceCommandShell.java
deleted file mode 100644
index 6688c1e80..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IServiceCommandShell.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellOutputListener;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-
-
-public interface IServiceCommandShell extends IRemoteCommandShell, IHostShellOutputListener
-{
- public IHostShell getHostShell();
- public void writeToShell(String cmd);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java
deleted file mode 100644
index 564e81591..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-
-
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-
-
-
-public interface IShellServiceSubSystem extends IRemoteCmdSubSystem, IServiceSubSystem
-{
- public IShellService getShellService();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java
deleted file mode 100644
index c0db48e0d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystemConfiguration;
-
-
-/**
- * @lastgen interface DefaultCmdSubSystemConfiguration extends RemoteCmdSubSystemConfiguration {}
- */
-public interface IShellServiceSubSystemConfiguration extends IRemoteCmdSubSystemConfiguration, IServiceSubSystemConfiguration
-{
- public IShellService getShellService(IHost host);
- public IShellService createShellService(IHost host);
- public IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell);
-
-} //DefaultCmdSubSystemConfiguration \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ServiceCommandShell.java
deleted file mode 100644
index 56f52795b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ServiceCommandShell.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-
-import org.eclipse.rse.internal.subsystems.shells.servicesubsystem.OutputRefreshJob;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCommandShell;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteError;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteOutput;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellChangeEvent;
-import org.eclipse.rse.services.shells.SimpleHostOutput;
-import org.eclipse.rse.subsystems.shells.core.ShellStrings;
-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.IRemoteOutput;
-
-
-public class ServiceCommandShell extends RemoteCommandShell implements IServiceCommandShell
-{
- protected IHostShell _hostShell;
- protected OutputRefreshJob _lastRefreshJob;
- public ServiceCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- super(cmdSS);
- _hostShell = hostShell;
- setType(ShellStrings.RESID_SHELLS_COMMAND_SHELL_LABEL);
- }
-
- public String getTitle()
- {
- return getId();
- }
-
- public boolean isActive()
- {
- return _hostShell.isActive();
- }
-
-
- public IHostShell getHostShell()
- {
- return _hostShell;
- }
-
-
-
- public void shellOutputChanged(IHostShellChangeEvent event)
- {
- IHostOutput[] lines = event.getLines();
- IRemoteOutput[] outputs = new IRemoteOutput[lines.length];
- for (int i = 0; i < lines.length; i++)
- {
- RemoteOutput output = null;
- IHostOutput lineObj = lines[i];
- if (lineObj instanceof SimpleHostOutput)
- {
- SimpleHostOutput line = (SimpleHostOutput)lineObj;
-
- String type = event.isError() ? "stderr" : "stdout";
- if (event.isError())
- {
- output = new RemoteError(this, type);
- }
- else
- {
- output = new RemoteOutput(this, type);
- }
- String str = line.getString();
- output.setText(str);
-
- addOutput(output);
- outputs[i] = output;
- }
- }
- if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
- {
- _lastRefreshJob = new OutputRefreshJob(this, outputs, false);
- _lastRefreshJob.schedule();
- }
- else
- {
- _lastRefreshJob.addOutputs(outputs);
- }
- }
-
-
- public ICandidateCommand[] getCandidateCommands()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void writeToShell(String cmd)
- {
- _hostShell.writeToShell(cmd);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ddef2d0ea..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-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;
-
-
-
-public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements IShellServiceSubSystem
-{
- protected String _userHome = null;
- protected IShellService _hostService;
-
-
- public ShellServiceSubSystem(IHost host, IConnectorService connectorService, IShellService hostService)
- {
- super(host, connectorService);
- _hostService = hostService;
- }
-
- public IShellService getShellService()
- {
- return _hostService;
- }
-
- public void setShellService(IShellService service)
- {
- _hostService = service;
- }
-
- protected String getUserHome()
- {
- if (_userHome == null)
- {
- if (getSystemType() == IRSESystemType.SYSTEMTYPE_WINDOWS)
- {
- _userHome = "c:\\"; //$NON-NLS-1$
- }
- else if (getSystemType() == IRSESystemType.SYSTEMTYPE_LOCAL)
- {
- _userHome = System.getProperty("user.home"); //$NON-NLS-1$
- }
- else
- {
- // Assume UNIX compatible file system
- _userHome = "/home/" + getUserId(); //$NON-NLS-1$
- }
- }
- return _userHome;
- }
-
-
- protected Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context) throws InvocationTargetException, InterruptedException, SystemMessageException
- {
- return internalRunCommand(monitor, cmd, context, false);
- }
-
- protected Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context, boolean interpretOutput) throws InvocationTargetException, InterruptedException, SystemMessageException
- {
- String cwd = ""; //$NON-NLS-1$
- if (context instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) context;
- cwd = file.getAbsolutePath();
- }
- else if (context instanceof String)
- {
- // assume the string is a remote path
- cwd = (String)context;
- }
- if (cwd == null || cwd.equals("null")) //$NON-NLS-1$
- {
- cwd = getUserHome();
- }
-
-
- IShellService service = getShellService();
- IHostShell hostShell = service.runCommand(monitor, cwd, cmd, getUserAndHostEnvVarsAsStringArray());
- IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
- hostShell.addOutputListener(cmdShell);
-
-
- if (_cmdShells.size() == 0)
- {
- // if this is first shell, start listening so that on disconnect, we persist
- getConnectorService().addCommunicationsListener(this);
- }
- _cmdShells.add(cmdShell);
-
-
-
- return new Object[] {cmdShell};
- }
-
- protected IRemoteCommandShell internalRunShell(IProgressMonitor monitor, Object context) throws InvocationTargetException, InterruptedException, SystemMessageException
- {
- String cwd = ""; //$NON-NLS-1$
- if (context instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) context;
- cwd = file.getAbsolutePath();
- }
- else if (context instanceof String)
- {
- // assume the string is a remote path
- cwd = (String)context;
- }
- if (cwd == null || cwd.equals("null")) //$NON-NLS-1$
- {
- cwd = getUserHome();
- }
-
-
- IShellService service = getShellService();
- IHostShell hostShell = service.launchShell(monitor, cwd, getUserAndHostEnvVarsAsStringArray());
- IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
- if (cmdShell != null)
- {
- hostShell.addOutputListener(cmdShell);
-
-
- if (_cmdShells.size() == 0)
- {
- // if this is first shell, start listening so that on disconnect, we persist
- getConnectorService().addCommunicationsListener(this);
- }
- _cmdShells.add(cmdShell);
-
- }
-
- return cmdShell;
- }
-
-
- protected void internalCancelShell(IProgressMonitor monitor, Object command) throws InvocationTargetException, InterruptedException
- {
- if (command instanceof IServiceCommandShell)
- {
- IServiceCommandShell cmd = (IServiceCommandShell)command;
- cmd.getHostShell().exit();
- }
- }
-
- protected void internalSendCommandToShell(IProgressMonitor monitor, String cmd, Object command) throws InvocationTargetException, InterruptedException
- {
- if (command instanceof IServiceCommandShell)
- {
- IServiceCommandShell cmdWrapper = (IServiceCommandShell)command;
- cmdWrapper.writeToShell(cmd);
- cmdWrapper.updateHistory(cmd);
- }
- }
-
- protected IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- IShellServiceSubSystemConfiguration config = (IShellServiceSubSystemConfiguration)getParentRemoteCmdSubSystemConfiguration();
- return config.createRemoteCommandShell(cmdSS, hostShell);
- }
-
- public String[] getHostEnvironment()
- {
- return getShellService().getHostEnvironment();
- }
-
- public List getHostEnvironmentVariables()
- {
- List l = new ArrayList();
- String[] vars = getHostEnvironment();
- for (int i = 0; i < vars.length; i++)
- {
- l.add(vars[i]);
- }
- return l;
- }
-
- /**
- * swtich from one protocol to another
- */
- public void switchServiceFactory(IServiceSubSystemConfiguration fact)
- {
- if (fact != getSubSystemConfiguration() && fact instanceof IShellServiceSubSystemConfiguration)
- {
- IShellServiceSubSystemConfiguration factory = (IShellServiceSubSystemConfiguration)fact;
- try
- {
- disconnect();
- }
- catch (Exception e)
- {
- }
-
- IHost host = getHost();
- setSubSystemConfiguration(factory);
- setName(factory.getName());
- IConnectorService oldConnectorService = getConnectorService();
- oldConnectorService.deregisterSubSystem(this);
-
- IConnectorService newConnectorService = factory.getConnectorService(host);
- setConnectorService(newConnectorService);
-
- oldConnectorService.commit();
- newConnectorService.commit();
-
- setShellService(factory.getShellService(host));
- }
- }
-
- public Class getServiceType()
- {
- return IShellService.class;
- }
-
- public void initializeSubSystem(IProgressMonitor monitor)
- {
- getShellService().initService(monitor);
- }
-
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- cancelAllShells();
- getShellService().uninitService(monitor);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystemConfiguration.java
deleted file mode 100644
index 89eed108d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystemConfiguration;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-
-
-
-
-public abstract class ShellServiceSubSystemConfiguration extends RemoteCmdSubSystemConfiguration implements IShellServiceSubSystemConfiguration
-{
- private Map _services;
- protected ShellServiceSubSystemConfiguration()
- {
- super();
- _services = new HashMap();
- }
-
- public final Class getServiceType()
- {
- return IShellService.class;
- }
-
- public final IShellService getShellService(IHost host)
- {
- IShellService service = (IShellService)_services.get(host);
- if (service == null)
- {
- service = createShellService(host);
- _services.put(host, service);
- }
- return service;
- }
-
- public final IService getService(IHost host)
- {
- return getShellService(host);
- }
-
- public boolean supportsServerLaunchProperties(IHost host)
- {
- return getConnectorService(host).supportsServerLaunchProperties();
- }
-
- public IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- return new ServiceCommandShell(cmdSS, hostShell);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.classpath b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.project b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.project
deleted file mode 100644
index b7d397786..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.shells.dstore</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/META-INF/MANIFEST.MF
deleted file mode 100644
index 4bc765c88..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.shells.dstore;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.shells.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.services.dstore,
- org.eclipse.dstore.core,
- org.eclipse.dstore.extra,
- org.eclipse.rse.connectorservice.dstore,
- org.eclipse.rse.shells.ui,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.core,
- org.eclipse.rse.ui,
- org.eclipse.rse.subsystems.files.core
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.rse.subsystems.shells.dstore,
- org.eclipse.rse.subsystems.shells.dstore.model
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/about.html b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/build.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/build.properties
deleted file mode 100644
index 4ab720d92..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommands_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommands_obj.gif
deleted file mode 100644
index 061b6e226..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommandslive_obj.gif
deleted file mode 100644
index 3faca4474..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/icons/full/obj16/systemcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.properties
deleted file mode 100644
index 525af9d8a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE DStore Shells
-providerName = Eclipse.org
-
-Shells=Shells
-ShellsDescription=This configuration allows you to work with shells and commands on local or remote systems using the DataStore protocol. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml
deleted file mode 100644
index b010ab700..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
-
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Linux;Unix;Windows"
- name="%Shells"
- description="%ShellsDescription"
- iconlive="icons/full/obj16/systemcommandslive_obj.gif"
- icon="icons/full/obj16/systemcommands_obj.gif"
- category="shells"
- class="org.eclipse.rse.subsystems.shells.dstore.DStoreShellSubSystemConfiguration"
- vendor="%providerName"
- priority="300"
- id="dstore.shells">
- </configuration>
-
- </extension>
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/Activator.java
deleted file mode 100644
index a8163fffb..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/Activator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.dstore;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception
- {
- super.start(context);
-
- // shells ui needs to be started for proper UI init
- org.eclipse.rse.shells.ui.Activator.getDefault();
- }
-
- /**
- * 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.shells.dstore", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java
deleted file mode 100644
index 2be13e29f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.dstore;
-
-import org.eclipse.dstore.core.model.IDataStoreProvider;
-import org.eclipse.rse.connectorservice.dstore.DStoreConnectorService;
-import org.eclipse.rse.connectorservice.dstore.DStoreConnectorServiceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.dstore.IDStoreService;
-import org.eclipse.rse.services.dstore.shells.DStoreShellService;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IServiceCommandShell;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.shells.dstore.model.DStoreServiceCommandShell;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * Provides a factory for generating instances of the class
- * ShellServiceSubSystem.
- */
-public class DStoreShellSubSystemConfiguration extends ShellServiceSubSystemConfiguration
-{
- protected boolean _isWindows;
- public DStoreShellSubSystemConfiguration()
- {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = ShellServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
-
-
- /**
- * Instantiate and return an instance of OUR subystem.
- * Do not populate it yet though!
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(IHost)
- */
- public ISubSystem createSubSystemInternal(IHost host)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
- ISubSystem subsys = new ShellServiceSubSystem(host, connectorService, new DStoreShellService(connectorService, RSEUIPlugin.getDefault()));
- return subsys;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters() {
- return false;
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return DStoreConnectorServiceManager.getTheUniversalSystemManager().getConnectorService(host, getServiceImplType());
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- DStoreConnectorServiceManager.getTheUniversalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public IShellService createShellService(IHost host)
- {
- return new DStoreShellService((IDataStoreProvider)getConnectorService(host), RSEUIPlugin.getDefault());
- }
-
- public boolean supportsCommands()
- {
- return true;
- }
- public boolean canRunCommand()
- {
- return true;
- }
-
- public IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- return new DStoreServiceCommandShell(cmdSS, hostShell);
- }
-
- public Class getServiceImplType()
- {
- return IDStoreService.class;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/model/DStoreServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/model/DStoreServiceCommandShell.java
deleted file mode 100644
index f4dbe7685..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/model/DStoreServiceCommandShell.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.dstore.model;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.internal.services.dstore.shell.DStoreShellOutputReader;
-import org.eclipse.rse.internal.subsystems.shells.servicesubsystem.OutputRefreshJob;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteError;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteOutput;
-import org.eclipse.rse.services.dstore.shells.DStoreHostOutput;
-import org.eclipse.rse.services.dstore.shells.DStoreHostShell;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellChangeEvent;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ServiceCommandShell;
-
-public class DStoreServiceCommandShell extends ServiceCommandShell
-{
-
- public DStoreServiceCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- super(cmdSS, hostShell);
- }
-
- public Object getContext()
- {
- DStoreHostShell shell = (DStoreHostShell)getHostShell();
- DStoreShellOutputReader reader = (DStoreShellOutputReader)shell.getStandardOutputReader();
- String workingDir = reader.getWorkingDirectory();
- if (workingDir != null && workingDir.length() > 0)
- {
- try
- {
- return getFileSubSystem().getRemoteFileObject(workingDir);
- }
- catch (Exception e)
- {
- }
- }
- return null;
-
- }
-
- public void shellOutputChanged(IHostShellChangeEvent event)
- {
- IHostOutput[] lines = event.getLines();
- IRemoteOutput[] outputs = new IRemoteOutput[lines.length];
- for (int i = 0; i < lines.length; i++)
- {
- RemoteOutput output = null;
- Object lineObj = lines[i];
- if (lineObj instanceof DStoreHostOutput)
- {
- DataElement line = ((DStoreHostOutput)lineObj).getElement();
- String type = line.getType();
- String src = line.getSource();
- if (event.isError())
- {
- output = new RemoteError(this, type);
-
- }
- else
- {
- output = new RemoteOutput(this, type);
- }
- output.setText(line.getName());
-
- int colonSep = src.indexOf(':');
- // line numbers
- if (colonSep > 0)
- {
-
- String lineNo = src.substring(colonSep + 1);
- String file = src.substring(0, colonSep);
- int linen = 0;
- try
- {
- linen = Integer.parseInt(lineNo);
- }
- catch (Exception e)
- {
-
- }
- if (linen != 0)
- {
- output.setAbsolutePath(file);
- output.setLine(linen);
- }
- else
- {
- output.setAbsolutePath(src);
- }
- }
- else
- {
- output.setAbsolutePath(src);
- }
-
-
- addOutput(output);
- outputs[i] = output;
- }
- }
- //if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
- {
- _lastRefreshJob = new OutputRefreshJob(this, outputs, false);
- _lastRefreshJob.schedule();
- }
- /*
- else
- {
- _lastRefreshJob.addOutputs(outputs);
- _lastRefreshJob.schedule();
- }
- */
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.classpath b/rse/plugins/org.eclipse.rse.subsystems.shells.local/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.shells.local/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.project b/rse/plugins/org.eclipse.rse.subsystems.shells.local/.project
deleted file mode 100644
index 45811d023..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.shells.local</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.shells.local/META-INF/MANIFEST.MF
deleted file mode 100644
index ef40fe100..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.shells.local;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.shells.local.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.services.local,
- org.eclipse.rse.connectorservice.local,
- org.eclipse.rse.shells.ui,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.core,
- org.eclipse.rse.ui,
- org.eclipse.rse.subsystems.files.core
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.rse.subsystems.shells.local
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/about.html b/rse/plugins/org.eclipse.rse.subsystems.shells.local/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/build.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.local/build.properties
deleted file mode 100644
index 34e219f76..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommands_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommands_obj.gif
deleted file mode 100644
index 061b6e226..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommandslive_obj.gif
deleted file mode 100644
index 3faca4474..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.properties
deleted file mode 100644
index 1ed70df4a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE Local Shells
-providerName = Eclipse.org
-
-Shells=Local Shells
-ShellsDescription=This configuration allows you to work with shells and commands on the local system and doesn't require any communication server to be running. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml
deleted file mode 100644
index f03bd883c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
-
-<!-- ============================================== -->
-<!-- Define subsystem factories for sample -->
-<!-- ============================================== -->
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Local"
- name="%Shells"
- description="%ShellsDescription"
- iconlive="icons/full/obj16/systemcommandslive_obj.gif"
- icon="icons/full/obj16/systemcommands_obj.gif"
- category="shells"
- class="org.eclipse.rse.subsystems.shells.local.LocalShellSubSystemConfiguration"
- vendor="%providerName"
- priority="300"
- id="local.shells">
- </configuration>
- </extension>
-
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/Activator.java
deleted file mode 100644
index 2228cdeff..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/Activator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.local;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception
- {
- super.start(context);
-
- // shells ui needs to be started for proper UI init
- org.eclipse.rse.shells.ui.Activator.getDefault();
- }
-
- /**
- * 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.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.shells.local", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java
deleted file mode 100644
index 80893d396..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.local;
-
-import org.eclipse.rse.connectorservice.local.LocalConnectorService;
-import org.eclipse.rse.connectorservice.local.LocalConnectorServiceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.local.ILocalService;
-import org.eclipse.rse.services.local.shells.LocalShellService;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IServiceCommandShell;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.shells.local.model.LocalServiceCommandShell;
-
-
-
-public class LocalShellSubSystemConfiguration extends ShellServiceSubSystemConfiguration
-{
- public LocalShellSubSystemConfiguration()
- {
- super();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystemConfiguration#getCommandSeparator()
- */
- public String getCommandSeparator()
- {
- String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- if (os.startsWith("win")) //$NON-NLS-1$
- {
- return "&"; //$NON-NLS-1$
- }
- else
- {
- return ";"; //$NON-NLS-1$
- }
-
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = ShellServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
-
-
- /**
- * Instantiate and return an instance of OUR subystem.
- * Do not populate it yet though!
- */
- public ISubSystem createSubSystemInternal(IHost host)
- {
- LocalConnectorService connectorService = (LocalConnectorService)getConnectorService(host);
- ISubSystem subsys = new ShellServiceSubSystem(host, connectorService, getShellService(host));
- return subsys;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters() {
- return false;
- }
-
- /**
- * Returns <code>false</code>
- * @see org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystemConfiguration#supportsSubSystemConnect()
- */
- public boolean supportsSubSystemConnect() {
- return false;
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return LocalConnectorServiceManager.getTheLocalSystemManager().getConnectorService(host, getServiceImplType());
- }
-
- public IShellService createShellService(IHost host)
- {
- return new LocalShellService();
- }
-
- public boolean supportsCommands()
- {
- return true;
- }
- public boolean canRunCommand()
- {
- return true;
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- LocalConnectorServiceManager.getTheLocalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public Class getServiceImplType()
- {
- return ILocalService.class;
- }
-
- public IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- return new LocalServiceCommandShell(cmdSS, hostShell);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java
deleted file mode 100644
index 1f83279a8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.local.model;
-
-
-import java.io.File;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.shells.servicesubsystem.OutputRefreshJob;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteError;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteOutput;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellChangeEvent;
-import org.eclipse.rse.services.shells.ParsedOutput;
-import org.eclipse.rse.services.shells.Patterns;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ServiceCommandShell;
-
-public class LocalServiceCommandShell extends ServiceCommandShell
-{
- private Patterns _patterns;
- private String _workingDir;
- private IRemoteFileSubSystem _fs;
-
- public LocalServiceCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- super(cmdSS, hostShell);
- _patterns = new Patterns();
- _patterns.update("cmd"); //$NON-NLS-1$
- ISubSystem[] sses = cmdSS.getHost().getSubSystems();
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteFileSubSystem)
- {
- _fs = (IRemoteFileSubSystem)sses[i];
- }
- }
- }
-
- public Object getContext()
- {
- String workingDir = _workingDir;
- if (workingDir != null && workingDir.length() > 0)
- {
- try
- {
- return _fs.getRemoteFileObject(workingDir);
- }
- catch (Exception e)
- {
- }
- }
- return null;
-
- }
-
-
-
- public void shellOutputChanged(IHostShellChangeEvent event)
- {
- IHostOutput[] lines = event.getLines();
- IRemoteOutput[] outputs = new IRemoteOutput[lines.length];
- for (int i = 0; i < lines.length; i++)
- {
- String line = lines[i].getString();
- ParsedOutput parsedMsg = null;
-
- try
- {
- parsedMsg = _patterns.matchLine(line);
- }
- catch (Throwable e)
- {
- e.printStackTrace();
- }
-
- RemoteOutput output = null;
- String type = "stdout"; //$NON-NLS-1$
- if (parsedMsg != null)
- {
- type = parsedMsg.type;
- }
- else
- {
- //System.out.println("parsedMsg = null");
- }
- if (event.isError())
- {
- output = new RemoteError(this, type);
- }
- else
- {
- output = new RemoteOutput(this, type);
- }
-
- output.setText(line);
- if (parsedMsg != null)
- {
- String file = parsedMsg.file;
- if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT))
- {
- _workingDir = file;
- output.setAbsolutePath(_workingDir);
- }
- /*
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_FILE) || type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY))
- {
- output.setAbsolutePath(parsedMsg.file);
- }
- */
- else
- {
- output.setAbsolutePath(_workingDir + File.separatorChar + file);
- }
- }
-
- addOutput(output);
- outputs[i] = output;
- }
- //if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
- {
- _lastRefreshJob = new OutputRefreshJob(this, outputs, false);
- _lastRefreshJob.schedule();
- }
- /*
- else
- {
- _lastRefreshJob.addOutputs(outputs);
- _lastRefreshJob.schedule();
- }
- */
- }
-
- public void writeToShell(String cmd)
- {
- _patterns.update(cmd);
- super.writeToShell(cmd);
-
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.classpath b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.project b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.project
deleted file mode 100644
index 8762a137e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.shells.ssh</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.ui.prefs b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 07346397c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Jul 07 11:19:10 CEST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;org.eclipse.rse;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/META-INF/MANIFEST.MF
deleted file mode 100644
index f7823a242..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.shells.ssh; singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.shells.ssh.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.connectorservice.ssh,
- org.eclipse.rse.services.ssh,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.shells.ui,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.subsystems.shells.ssh
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/about.html b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/build.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/build.properties
deleted file mode 100644
index 34e219f76..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/icons/full/obj16/systemcommands_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/icons/full/obj16/systemcommands_obj.gif
deleted file mode 100644
index 061b6e226..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/icons/full/obj16/systemcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/icons/full/obj16/systemcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/icons/full/obj16/systemcommandslive_obj.gif
deleted file mode 100644
index 3faca4474..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/icons/full/obj16/systemcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.properties
deleted file mode 100644
index 53ce2abe7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = RSE SSH Shells
-providerName = Eclipse.org
-
-SshShellSubsystemName=Ssh Shells
-SshShellSubsystemDescription=Work with shells and commands on remote systems using the Secure Shell (ssh) protocol.
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.xml
deleted file mode 100644
index 04eb20a88..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006 Wind River Systems, Inc.
-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:
-Martin Oberhuber - initial API and implementation
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Linux;Unix;AIX;SSH Only"
- name="%SshShellSubsystemName"
- description="%SshShellSubsystemDescription"
- iconlive="icons/full/obj16/systemcommandslive_obj.gif"
- icon="icons/full/obj16/systemcommands_obj.gif"
- category="shells"
- class="org.eclipse.rse.subsystems.shells.ssh.SshShellSubSystemConfiguration"
- vendor="%providerName"
- priority="300"
- id="ssh.shells">
- </configuration>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/Activator.java
deleted file mode 100644
index b112d4923..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/Activator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.subsystems.shells.ssh;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rse.subsystems.shells.ssh"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- // shells ui needs to be started for proper UI init
- org.eclipse.rse.shells.ui.Activator.getDefault();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java
deleted file mode 100644
index 941116038..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted from LocalServiceCommandShell
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.ssh;
-
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.shells.servicesubsystem.OutputRefreshJob;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteError;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteOutput;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellChangeEvent;
-import org.eclipse.rse.services.shells.ParsedOutput;
-import org.eclipse.rse.services.shells.Patterns;
-import org.eclipse.rse.services.ssh.shell.SshHostShell;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ServiceCommandShell;
-
-public class SshServiceCommandShell extends ServiceCommandShell implements ISystemOutputRemoteTypes
-{
- private Patterns _patterns;
- private String _curCommand;
- private String _workingDir;
- private IRemoteFileSubSystem _fs;
-
- public SshServiceCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- super(cmdSS, hostShell);
- _patterns = new Patterns();
- _patterns.update("cmd"); //$NON-NLS-1$
- ISubSystem[] sses = cmdSS.getHost().getSubSystems();
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteFileSubSystem)
- {
- _fs = (IRemoteFileSubSystem)sses[i];
- }
- }
- }
-
- public Object getContext()
- {
- String workingDir = _workingDir;
- if (workingDir != null && workingDir.length() > 0)
- {
- try
- {
- return _fs.getRemoteFileObject(workingDir);
- }
- catch (Exception e)
- {
- }
- }
- return null;
-
- }
-
- public void shellOutputChanged(IHostShellChangeEvent event)
- {
- IHostOutput[] lines = event.getLines();
- boolean gotCommand = false;
- ArrayList outputs = new ArrayList(lines.length);
- for (int i = 0; i < lines.length; i++)
- {
- String line = lines[i].getString();
- if (line.endsWith(getPromptCommand())) {
- continue; //ignore our synthetic prompt command
- }
-
- ParsedOutput parsedMsg = null;
- if (!gotCommand && line.equals(_curCommand)) {
- gotCommand = true;
- continue; //ignore remote command echo
- } else {
- try {
-
- // Bug 160202: Remote shell dies.
- if ((_curCommand == null) || (!_curCommand.trim().equals("ls"))) { //$NON-NLS-1$
- parsedMsg = _patterns.matchLine(line);
-
- // Bug 160202: Remote shell dies.
- if (_curCommand != null) {
- String temp = _curCommand.trim();
- StringTokenizer tokenizer = new StringTokenizer(temp);
-
- if (tokenizer.countTokens() == 2) {
- String token1 = tokenizer.nextToken();
- String token2 = tokenizer.nextToken();
-
- if ((token1.equals("ls")) && (token2.indexOf('-') == 0) && (token2.indexOf('l') > 0)) { //$NON-NLS-1$
- if (line.startsWith("total")) { //$NON-NLS-1$
- parsedMsg = null;
- }
- }
- }
- }
- }
- }
- catch (Throwable e) {
- e.printStackTrace();
- }
- }
-
- RemoteOutput output = null;
-
- String type = "stdout"; //$NON-NLS-1$
-
- if (parsedMsg != null) {
- type = parsedMsg.type;
- }
-
- if (event.isError()) {
- output = new RemoteError(this, type);
- }
- else {
- output = new RemoteOutput(this, type);
- }
-
- output.setText(line);
- if (parsedMsg != null)
- {
- String file = parsedMsg.file;
- if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT))
- {
- _workingDir = file;
- output.setAbsolutePath(_workingDir);
- }
- else if(_workingDir!=null)
- {
- IPath p = new Path(_workingDir).append(file);
- output.setAbsolutePath(p.toString());
- }
- else
- {
- output.setAbsolutePath(file);
- }
- }
-
- addOutput(output);
- outputs.add(output);
- }
- IRemoteOutput[] remoteOutputs = (IRemoteOutput[])outputs.toArray(new IRemoteOutput[outputs.size()]);
- //if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
- {
- _lastRefreshJob = new OutputRefreshJob(this, remoteOutputs, false);
- _lastRefreshJob.schedule();
- }
- /*
- else
- {
- _lastRefreshJob.addOutputs(remoteOutputs);
- _lastRefreshJob.schedule();
- }
- */
- }
-
- /**
- * Return the prompt command, such that lines ending with the
- * prompt command can be removed from output.
- * Should be overridden in case the IHostShell used for this
- * service is not an SshHostShell.
- * @return String promptCommand
- */
- protected String getPromptCommand() {
- IHostShell shell = getHostShell();
- //assert shell instanceof SshHostShell;
- if (shell instanceof SshHostShell) {
- return ((SshHostShell)shell).getPromptCommand();
- }
- //return something impossible such that nothing is ever matched
- return "\uffff"; //$NON-NLS-1$
- }
-
- public void writeToShell(String cmd)
- {
- _curCommand = cmd;
- _patterns.update(cmd);
- super.writeToShell(cmd);
-
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java
deleted file mode 100644
index 50543a265..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - Adapted template for ssh service.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.ssh;
-
-import org.eclipse.rse.connectorservice.ssh.SshConnectorService;
-import org.eclipse.rse.connectorservice.ssh.SshConnectorServiceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.services.ssh.ISshService;
-import org.eclipse.rse.services.ssh.shell.SshShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IServiceCommandShell;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystemConfiguration;
-
-public class SshShellSubSystemConfiguration extends
- ShellServiceSubSystemConfiguration {
-
- public SshShellSubSystemConfiguration() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = ShellServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
- /**
- * Instantiate and return an instance of OUR subystem.
- * Do not populate it yet though!
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(IHost)
- */
- public ISubSystem createSubSystemInternal(IHost host)
- {
- SshConnectorService connectorService = (SshConnectorService)getConnectorService(host);
- ISubSystem subsys = new ShellServiceSubSystem(host, connectorService, createShellService(host));
- return subsys;
- }
-
- public IShellService createShellService(IHost host) {
- SshConnectorService cserv = (SshConnectorService)getConnectorService(host);
- return new SshShellService(cserv);
- }
-
- public IConnectorService getConnectorService(IHost host) {
- return SshConnectorServiceManager.getInstance().getConnectorService(host, ISshService.class);
- }
-
- public void setConnectorService(IHost host,
- IConnectorService connectorService) {
- SshConnectorServiceManager.getInstance().setConnectorService(host, ISshService.class, connectorService);
- }
-
- public Class getServiceImplType() {
- return ISshService.class;
- }
-
- public IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell) {
- return new SshServiceCommandShell(cmdSS, hostShell);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/.classpath b/rse/plugins/org.eclipse.rse.ui/.classpath
deleted file mode 100644
index 4566be8c7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="filters"/>
- <classpathentry kind="src" path="model"/>
- <classpathentry kind="src" path="UI"/>
- <classpathentry kind="src" path="subsystems"/>
- <classpathentry kind="src" path="systems"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.ui/.cvsignore b/rse/plugins/org.eclipse.rse.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.ui/.project b/rse/plugins/org.eclipse.rse.ui/.project
deleted file mode 100644
index 31dbfcb6c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs b/rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index d97f5cff5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,5 +0,0 @@
-#Fri Oct 27 10:57:59 EDT 2006
-eclipse.preferences.version=1
-encoding//UI/org/eclipse/rse/ui/SystemWidgetHelpers.java=UTF-8
-encoding//UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizard.java=UTF-8
-encoding//UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardMainPage.java=UTF-8
diff --git a/rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.ui/HelpContexts.xml b/rse/plugins/org.eclipse.rse.ui/HelpContexts.xml
deleted file mode 100644
index c32bab0b8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/HelpContexts.xml
+++ /dev/null
@@ -1,970 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<contexts>
-
-<!-- System types table in RS preferences -->
-<context id="systype_preferences">
- <description>Click in the columns to change the enablement state or default user ID for a given system type. Disabled system types do not appear in the New Connection wizard. Default user IDs are used when connecting to a remote system of that type.</description>
-</context>
-
-<!-- Import wizard help -->
-<context id="import_context">
- <description>Import files from a remote server to a project on your local workstation.</description>
- <topic href="../org.eclipse.rse.doc.user/tasks/tremoimp.htm" label="Importing resources from a remote file system"/>
-</context>
-
-<!-- Export wizard help -->
-<context id="export_context">
- <description>Export files from your local workstation to a folder on a remote server.</description>
- <topic href="../org.eclipse.rse.doc.user/tasks/tremoexp.htm" label="Exporting resources to a remote file system"/>
-</context>
-
-<!-- PULLDOWN ACTION: New Connection action... -->
-<context id="actn0000">
-<description>Open a wizard to create a new connection to a remote system.</description>
-</context>
-<!-- CONNECTION ACTION: MoveUp Connection action...-->
-<context id="actn0001">
-<description>Move the selected connections up within its profile. This is disabled if the first connection is selected. Connection order is a local preference not shared by the team.</description>
-</context>
-<!-- CONNECTION ACTION: MoveDown Connection action...-->
-<context id="actn0002">
-<description>Move a connection down within its profile. This is disabled if the last connection is selected. Connection order is a local preference not shared by the team.</description>
-</context>
-
-<!-- TEAM VIEW -->
-<context id="teamview">
-<description>Use this view to work with the team-sharable artifacts from the Remote System Explorer: connection, filters, user actions and compile commands. These are contained in profiles. Use this view to see the sharable artifacts by profile, and share those artifacts using the popup menu of the root node. </description>
-<topic href="../org.eclipse.rse.doc.user/concepts/cprofile.htm" label="Remote System Explorer Profiles" />
-</context>
-<!-- TEAM VIEW ACTION: New Profile action... -->
-<context id="actn0003">
-<description>Open a wizard to create a new profile for partitioning your connections, filters, user actions and compile commands.</description>
-<topic href="../org.eclipse.rse.doc.user/concepts/cprofile.htm" label="Remote System Explorer Profiles" />
-</context>
-<!-- TEAM VIEW ACTION: Active profile action... -->
-<context id="actnactp">
-<description>Toggle this profile between active and not active. The Remote Systems view only shows connections, filters, user actions and compile commands from active profiles.
-</description>
-<topic href="../org.eclipse.rse.doc.user/concepts/cprofile.htm" label="Remote System Explorer Profiles" />
-</context>
-<!-- TEAM VIEW ACTION: Make Active profile action... -->
-<context id="ActionMakeActive">
-<description>Make all the selected profiles active, such that their connections, filters, user actions and compile commands are visible in the Remote Systems view.
-</description>
-<topic href="../org.eclipse.rse.doc.user/concepts/cprofile.htm" label="Remote System Explorer Profiles" />
-</context>
-<!-- TEAM VIEW ACTION: Make Inactive profile action... -->
-<context id="ActionMakeInactive">
-<description>Make all the selected profiles inactive, such that their connections, filters, user actions and compile commands are not visible in the Remote Systems view.
-</description>
-<topic href="../org.eclipse.rse.doc.user/concepts/cprofile.htm" label="Remote System Explorer Profiles" />
-</context>
-
-<!-- TEAM VIEW ACTION: Rename profile action... -->
-<context id="actnrnpr">
-<description>Rename selected profile.
-<topic href="../org.eclipse.rse.doc.user/concepts/cprofile.htm" label="Remote System Explorer Profiles" />
-</description>
-</context>
-<!-- TEAM VIEW ACTION: Delete profiles action... -->
-<context id="actndlpr">
-<description>Delete selected profiles, including all of their connections, filters, user actions and compile commands.</description>
-<topic href="../org.eclipse.rse.doc.user/concepts/cprofile.htm" label="Remote System Explorer Profiles" />
-</context>
-<!-- TEAM VIEW ACTION: Duplicate profile action... -->
-<context id="actndupr">
-<description>Copy selected profile, including all its connections, filters, user actions and compile commands.
-</description>
-<topic href="../org.eclipse.rse.doc.user/concepts/cprofile.htm" label="Remote System Explorer Profiles" />
-</context>
-
-<!-- PULLDOWN ACTION: Work with profiles action...-->
-<context id="actnwwpr">
-<description>Switch to the Team view, where you can create, delete, copy, rename and activate profiles</description>
-<topic href="../org.eclipse.rse.doc.user/concepts/cprofile.htm" label="Remote System Explorer Profiles" />
-</context>
-<!-- PULLDOWN ACTION: Qualify connections action...-->
-<context id="actn0008">
-<description>Show connections and filter pools in the Remote Systems view prefixed by profile name. This is recommended if two profiles have connections or filter pools with the same names.</description>
-</context>
-<!-- PULLDOWN ACTION: Reload-RSE action... -->
-<context id="actn0009">
-<description>Use this action after receiving Remote System Explorer files from the team repository, such as after a synchronize action. It reloads the contents of the Remote System Explore from the workspace, processing the new files.</description>
-</context>
-<!-- PULLDOWN ACTION: Default userID action... -->
-<context id="actn0010">
-<description>Set as the default user ID for a given system type when creating a new connection, or change it for existing connections that inherit the user ID.</description>
-</context>
-<!-- PULLDOWN ACTION: Preferences cascading action... -->
-<context id="actnpref">
-<description>Go directly to a preference page. Saves drilling down via Windows->Preferences.</description>
-</context>
-<!-- PULLDOWN ACTION: Preferences->RSE cascaded action... -->
-<context id="aprefrse">
-<description>Go directly to the main preference page for the Remote System Explorer. From there, you can also access the subpages.
-</description>
-</context>
-<!-- PULLDOWN ACTION: Preferences->LPEX cascaded action... -->
-<context id="apreflpx">
-<description>Go directly to the main preference page for the LPEX editor. From there, you can also access the subpages. </description>
-</context>
-<!-- PULLDOWN ACTION: Show filter pools action... -->
-<context id="actn0011">
-<description>Specify whether to show filter pools when subsystems are expanded in the Remote Systems view. Filter pools allow you to partition filters into named groups for easier management.</description>
-</context>
-<!-- PULLDOWN ACTION: Restore State action... -->
-<context id="aprefres">
-<description>Select this to restore the Remote Systems tree view to its previous expanded state the next time you start the workbench. Previous selections and active connections are also restored. This preference increases the amount of time needed to start the Remote System Explorer, but improves productivity overall since you do not need to reconfigure the view.
-</description>
-</context>
-<!-- PULLDOWN ACTION: Team Synch action... -->
-<context id="actn0013">
-<description>All your connections, filters, and user-defined actions can be shared by your team. Use this to synchronize your latest changes with those of the team. Only valid if a team repository has been identified within the team properties.
-</description>
-</context>
-<!-- PULLDOWN ACTION: Team Properties action... -->
-<context id="actn0014">
-<description>All your connections, filters, and user-defined actions can be shared by your team. Use this to identify the remote repository that will centrally host the Remote Systems Connections project containing all the Remote Systems information.
-</description>
-</context>
-<!-- CONNECTION ACTION: Create Another Connection action... -->
-<context id="actn0015">
-<description>Open a wizard to create a new connection to a remote system. By default, the values are used from the selected connection.
-</description>
-</context>
-<!-- CONNECTION ACTION: Open in New Perspective action... -->
-<context id="actn0016">
-<description>Open a new instance of the Remote Systems view, within its own perspective page. Its contents will start with those of the child of the selected resource.
-</description>
-</context>
-<!-- CONNECTION ACTION: Refresh action... -->
-<context id="actn0017">
-<description>Refresh the contents of the current selection. If the node is expanded, all children are re-retrieved successively.
-</description>
-</context>
-<!-- CONNECTION ACTION: Rename action... -->
-<context id="actn0018">
-<description>Open a dialog for renaming the currently selected resources.
-</description>
-</context>
-<!-- CONNECTION ACTION: Copy action... -->
-<context id="actn0019">
-<description>Copy this connection and resources to the same profile, or a different profile.
-</description>
-</context>
-<!-- CONNECTION ACTION: Move action... -->
-<context id="actn0020">
-<description>Move this connection to a different profile.
-</description>
-</context>
-<!-- CONNECTION ACTION: Delete action... -->
-<context id="actn0021">
-<description>Permanently delete the selected resources.
-</description>
-</context>
-<!-- CONNECTION ACTION: Disconnect All action... -->
-<context id="actn0022"><description>Ask each subsystem to disconnect from the remote system. Disabled unless at least one subsystem is currently connected.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: New Filter Pool action... -->
-<context id="actn0040"><description>Open a wizard to create a new filter pool in any profile, and a reference to the new pool in this subsystem.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: New Filter Pool Reference action... -->
-<context id="actn0041"><description>Add a reference to an existing filter pool to this subsystem. Multiple subsystems can reference the same pool, and subsystems can contain multiple filter pool references.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: New Filter action... -->
-<context id="actn0042"><description>Open a wizard to create a new filter in the selected or default filter pool.
-</description>
-</context>
-
-<!-- ACTION: Remote Servers cascading action... -->
-<context id="actnsrsv"><description>For remotely starting or stopping servers (or daemons) on this remote system.
-</description>
-</context>
-<!-- ACTION: Start action cascaded from an action underneath the Remote Servers cascading action... -->
-<context id="actnstsv"><description>Start this remote server or daemon.</description></context>
-<!-- ACTION: Stop action cascaded from an action underneath the Remote Servers cascading action... -->
-<context id="actnspsv"><description>Stop this remote server or daemon.</description></context>
-
-<!-- SUBSYSTEM ACTION: Select Filter Pools action... -->
-<context id="actn0043"><description>Select the filter pools referenced by this subsystem.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: WorkWith Filter Pools action... -->
-<context id="actn0044"><description>Work with all filter pools in all active profiles for this subsystem type.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: WorkWith User Actions action... -->
-<context id="actn0045"><description>Work with user-defined actions that appear in the pop-up menu of remote system objects for subsystems of this subsystem type.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: Work With Named Types action... -->
-<context id="actn0046"><description>Work with named types that group one or more resource types into named collections.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: Connect action... -->
-<context id="actn0047"><description>Connect this subsystem's service to the remote system identified by the parent connection. This is disabled if already connected.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: Disconnect action... -->
-<context id="actn0048"><description>Disconnect this subsystem's service from the remote system identified by the parent connection. This is disabled if not connected.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: Clear Password Cache action... -->
-<context id="actn0049"><description>Clear the password retained in memory after this subsystem is disconnected. This is disabled if not connected, or there is no password cached in memory.
-</description>
-</context>
-<!-- FILTERPOOL ACTION: Copy action... -->
-<context id="actn0060"><description>Copy this filter pool, and all of its filters, to another profile, or copy and rename to the same profile.
-</description>
-</context>
-<!-- FILTERPOOL ACTION: Move action... -->
-<context id="actn0061"><description>Move this filter pool to another profile.
-</description>
-</context>
-<!-- FILTERPOOL ACTION: Remove Reference action... -->
-<context id="actn0062"><description>Remove this subsystem's reference to this filter pool. This action does not delete the filter pool.
-</description>
-</context>
-<!-- FILTERPOOL ACTION: Move Up action... -->
-<context id="actn0063"><description>Move the selected filter pool references up within this subsystem. This is disabled if first filter pool reference is selected.
-</description>
-</context>
-<!-- FILTERPOOL ACTION: Move Down action... -->
-<context id="actn0064"><description>Move the selected filter pool references down within this subsystem. This is disabled if the last filter pool reference is selected.
-</description>
-</context>
-<!-- FILTER ACTION: New Filter String action... -->
-<context id="actn0080"><description>Open a wizard to create a new filter string within the selected filter.
-</description>
-</context>
-<!-- FILTER ACTION: Change Filter action... -->
-<context id="acfr0000"><description>Change this filter by adding, editing, removing or re-ordering filter strings within it</description>
-</context>
-<!-- FILTER ACTION: New Filter String action... -->
-<context id="actn0082"><description>Copy the selected filters to a different filter pool, or copy and rename in the same pool.
-</description>
-</context>
-<!-- FILTER ACTION: New Filter String action... -->
-<context id="actn0083"><description>Move the selected filters to a different filter pool.
-</description>
-</context>
-<!-- FILTER ACTION: New Filter String action... -->
-<context id="actn0084"><description>Move the selected filters up within their filter. This is disabled if the first filter is selected.
-</description>
-</context>
-<!-- FILTER ACTION: New Filter String action... -->
-<context id="actn0085"><description>Move the selected filters down within their filter pool. This is disabled if the last filter is selected.
-</description>
-</context>
-<!-- FILTERSTRING ACTION: Change action... -->
-<context id="actn0090"><description>Edit this filter string.
-</description>
-</context>
-<!-- FILTERSTRING ACTION: Copy action... -->
-<context id="actn0091"><description>Copy the selected filter strings to a different filter.
-</description>
-</context>
-<!-- FILTERSTRING ACTION: Move action... -->
-<context id="actn0092"><description>Move the selected filter strings to a different filter.
-</description>
-</context>
-<!-- FILTERSTRING ACTION: Move Up action... -->
-<context id="actn0093"><description>Move the selected filter strings up within their filter. This is disabled if the first filter string is selected.
-</description>
-</context>
-<!-- FILTERSTRING ACTION: Move Down action... -->
-<context id="actn0094"><description>Move the selected filter strings down within their filter. This is disabled if the last filter string is selected.
-</description>
-</context>
-<!-- PROMPTABLE OBJECT ACTION: Run action... -->
-<context id="actn0100"><description>Run the selected prompt to open a wizard to create a new object. </description>
-</context>
-<!-- REMOTE FILE ACTION: Copy action... -->
-<context id="actn0110"><description>Copy the selected folders or files. You will be prompted for the target folder, and for a new name if a folder or file name is already in use in that target folder.
-</description>
-</context>
-<!-- REMOTE FILE ACTION: Move action... -->
-<context id="actn0111"><description>Move the selected folders or files. You will be prompted for the target folder, and for a new name if a folder or file name is already in use in that target folder.
-</description>
-</context>
-<!-- REMOTE FILE ACTION: New Filter From Folder action... -->
-<context id="actn0112"><description>Open a wizard to create a new filter from the selected folder.
-</description>
-</context>
-<!-- SUBSYSTEM ACTION: Launch Shell action... -->
-<context id="actn0113"><description>Launch a command shell on the remote host. The Remote Shell view will allow you to interact with the remote shell.
-</description>
-</context>
-<!-- REMOTE FILE ACTION: Run Command action... -->
-<context id="actn0114"><description>Run a command on the remote host. You will be prompted for the command to run on the host.
-</description>
-</context>
-<!-- REMOTE FILE ACTION: Search action... -->
-<context id="actn0115"><description>Search files and file contents within the selected folder. You will be prompted with the Remote Search dialog.
-</description>
-</context>
-<!-- REMOTE RESOURCE ACTION: Copy to clipboard action... -->
-<context id="actn0116"><description>Copy the selected resource to the system clipboard.
-</description>
-</context>
-<!-- REMOTE RESOURCE ACTION: Paste from clipboard action... -->
-<context id="actn0117"><description>Paste the contents of the system clipboard into the selected resource.
-</description>
-</context>
-<!-- REMOTE RESOURCE ACTION: Extract Archive action... -->
-<context id="actn0118"><description>Extract the selected archive's contents to the same folder in which the archive is located. A new folder will be created with the same name as the archive for the archive's contents.
-</description>
-</context>
-<!-- REMOTE RESOURCE ACTION: Extract Archive To action... -->
-<context id="actn0119"><description>Extract the selected archive's contents to another folder. You will be prompted to select the destination folder.
-</description>
-</context>
-<!-- REMOTE RESOURCE ACTION: Combine action... -->
-<context id="actn0120"><description>Combine the selected archives into a single archive. You will be prompted to create the destination archive.
-</description>
-</context>
-<!-- REMOTE RESOURCE ACTION: Convert action... -->
-<context id="actn0121"><description>Convert the selected archives into another type of archive. You will be prompted to create the destination archive.
-</description>
-</context>
-<!-- REMOTE RESOURCE ACTION: Add to archive action... -->
-<context id="actn0122"><description>Add the selected files to a new or existing archive. You will be prompted to select or create the destination archive.
-</description>
-</context>
-<!-- CASCADING COMPILE PROMPT ACTION: Compile -->
-<context id="ccpa0000"><description>Select a command to compile this resource with. The command will first be prompted, then run.
-</description></context>
-<!-- CASCADING COMPILE NOPROMPT ACTION: Compile -->
-<context id="ccna0000"><description>Select a command to compile this resource with. The command will be run without prompting.
-</description></context>
-<!-- SINGLE COMPILE ACTION: PROMPT... -->
-<context id="scpa0000"><description>Compile the selected resource with this compile command. The command is prompted first, then run.
-</description></context>
-<!-- SINGLE COMPILE ACTION: NO PROMPT... -->
-<context id="scna0000"><description>Compile the selected resource with this compile command. The command is not prompted.
-</description></context>
-<!-- WORK WITH COMPILE COMMANDS ACTION... -->
-<context id="actnwwcc"><description>Work with commands for compiling selected resources.
-</description></context>
-
-<!-- Duplicate Profile dialog... -->
-<context id="drnp0000">
-<description>Specify a new, unique name for the profile. Profiles can be unique to a person and specific to a task, such as <b>Release 1</b>.
-</description>
-</context>
-<context id="drnp0002"><description>Specify the name for the copied profile.
-</description>
-</context>
-<context id="drnp0003"><description>Specify if the new copied profile is to be made active. If active, its connections are visible.
-</description>
-</context>
-<!-- New Profile wizard... -->
-<context id="wnpr0000">
-<description>This wizard will guide you through the creation of a new profile to hold connections and filters. Profiles are folders that hold connections and filter pools. They enable team support by allowing you to decide which connections will be private and which will be shared. Team members only see connections within the profiles they make active.
-</description>
-</context>
-<context id="wnpr0001"><description>Specify a name for the profile. This might be a personal name that is unique within the team, or a name such as <b>Release 1</b>.
-</description>
-</context>
-<context id="wnpr0002"><description>If you do not make this profile active, its connections will not be visible. If you want to share the profile, inform other team members to make it active after team synchronization.
-</description>
-</context>
-<!-- New Connection wizard page 1 (name profile)... -->
-<context id="wncp0000">
-<description>This is your first connection. Connections are grouped into profiles to facilitate team sharing. Specify the name for your personal profile to contain connections unique to you. The default is your local machine hostname.
-</description>
-</context>
-<!-- New Connection wizard page 2 (connection properties)... -->
-<context id="wncc0000">
-<description>Specify the information needed to create a connection to a remote system.
-</description>
-</context>
-<context id="ccon0001"><description>Select a profile to contain this connection.
-</description>
-</context>
-<context id="ccon0002"><description>Arbitrary name for this connection. It must be unique to this profile.
-</description>
-</context>
-<context id="ccon0003"><description>Operating system type of the remote host.
-</description>
-</context>
-<context id="ccon0004"><description>Hostname or IP address of the remote host.
-</description>
-</context>
-<context id="ccon0005"><description>Default user ID that is used by subsystems that do not have a specific user ID. If the arrow is to the left, the user ID comes from the preferences settings for this system type, and can only be changed. Changing it affects all connections that inherit this user ID. If you toggle the arrow to the right, the user ID will be set locally for this connection and not inherited from the preferences setting.
-</description>
-</context>
-<context id="ccon0006"><description>A brief description of the connection.
-</description>
-</context>
-<!-- Default User Id dialog... -->
-<context id="ddid0000">
-<description>Set the default user ID for all connections to systems of the selected type. This can be overridden within a particular connection or connection subsystem.
-</description>
-</context>
-<!-- Single Resource Rename dialog... -->
-<context id="drns0000">
-<description>Specify the new name for the selected resource.
-</description>
-</context>
-<context id="drns0001">
-<description>Indicate whether to overwrite the existing resource or specify a unique name.
-</description>
-</context>
-
-<!-- Single Profile Rename dialog... -->
-<context id="drnsprfl">
-<description>Specify the new name for the selected profile.
-</description>
-</context>
-<!-- Multiple Resource Rename dialog... -->
-<context id="drnm0000">
-<description>Specify the new name for each of the selected resources. Use the <b>Tab</b> key to move to the next resource name.
-</description>
-</context>
-<!-- Multiple Profile Rename dialog... -->
-<context id="drnmprfl">
-<description>Specify the new name for each of the selected profiles. Use the <b>Tab</b> key to move to the next profile name.
-</description>
-</context>
-
-<!-- Work With History dialog... -->
-<context id="dwwh0000">
-<description>Delete or re-order the items in the drop-down list. The items all represent previously-typed or selected values for this drop-down list.
-</description>
-</context>
-<!-- Copy/Move Collision dialog... -->
-<context id="dccc0000">
-<description>Select the target profile. The connection's profile is preselected. If you select the existing parent profile, you will be asked to rename the connection.
-</description>
-</context>
-<!-- Delete Confirmation dialog... -->
-<context id="ddlt0000">
-<description>Confirm that you want to delete the selected resources that are listed. Select <b>Delete</b> to confirm the deletion. Select <b>Cancel</b> if you decide not to delete the resources.
-</description>
-</context>
-<!-- Delete Profile Confirmation dialog... -->
-<context id="ddltprfl">
-<description>Confirm that you want to delete the selected profiles that are listed, including their connections, filters and user actions. Select <b>Delete</b> to confirm the deletion. Select <b>Cancel</b> if you decide not to delete the profiles.
-</description>
-</context>
-<!-- Copy Connection dialog... -->
-<context id="dccn0000">
-<description>Select the target profile. The connection's profile is preselected. If you select the existing parent profile, you will be asked to rename the connection.
-</description>
-</context>
-<!-- Move Connection dialog... -->
-<context id="dmcn0000">
-<description>Select the target profile. The connection's profile is excluded.
-</description>
-</context>
-<!-- Select Filter Pools dialog... -->
-<context id="dsfp0000">
-<description>Select the filter pools to reference in this subsystem. All filters from the referenced pools will be available when the subsystem is expanded.
-</description>
-</context>
-<!-- Work With Filter Pools dialog... -->
-<context id="dwfp0000">
-<description>Create, delete, rename, copy, and move filter pools. The filter pools for each active profile are listed under that profile. Select a profile or filter pool to enable the toolbar actions. The actions are also available in the pop-up menu.
-</description>
-</context>
-<!-- Copy Filter Pool dialog... -->
-<context id="dcfp0000">
-<description>Select the target profile. The filter pool's profile is preselected. If you select the existing parent profile, you will be asked to rename the filter pool.
-</description>
-</context>
-<!-- Move Filter Pool dialog... -->
-<context id="dmfp0000">
-<description>Select the target profile. The filter pool's profile is excluded.
-</description>
-</context>
-<!-- Copy Filter dialog... -->
-<context id="dcfr0000">
-<description>Select the target filter pool within a profile. If you select the existing parent filter pool, you will be asked to rename the filter.
-</description>
-</context>
-<!-- Move Filter dialog... -->
-<context id="dmfr0000">
-<description>Select the target filter pool within a profile.
-</description>
-</context>
-<!-- CHANGE FILTER DIALOG... -->
-<context id="dufr0000">
-<description>Use this dialog to change your filter. Filters can contain one or more filter strings. In the Remote Systems view, when a filter is expanded, the results of resolving all the strings are concatenated together. Use this dialog to add additional strings, and to order, delete or change the strings. Use the context menu on a string for additional actions.</description>
-</context>
-<!-- CHANGE FILTER DIALOG ACTION: Delete... -->
-<context id="dufr1000"><description>Delete the selected filter string. You will be asked to confirm your action.</description></context>
-<!-- CHANGE FILTER DIALOG ACTION: Copy -->
-<context id="dufr2000"><description>Copy the selected filter string to the clipboard. The copy can be pasted to create a new filter string.</description></context>
-<!-- CHANGE FILTER DIALOG ACTION: Paste -->
-<context id="dufr3000"><description>Paste a copy of a filter string from the clipboard.</description></context>
-<!-- CHANGE FILTER DIALOG ACTION: Move Up -->
-<context id="dufr4000"><description>Move the selected filter string up in the list.</description></context>
-<!-- CHANGE FILTER DIALOG ACTION: Move Down -->
-<context id="dufr5000"><description>Move the selected filter string down in the list.</description></context>
-
-<!-- Copy Filter String dialog... -->
-<context id="dcfs0000">
-<description>Select the target filter within a profile and filter pool.
-</description>
-</context>
-<!-- Move Filter String dialog... -->
-<context id="dmfs0000">
-<description>Select the target filter within a profile and filter pool.
-</description>
-</context>
-<!-- Remote Shell View... -->
-<context id="cmdv0000">
-<description>This view shows the commands that have been run on remote systems, along with the resulting messages.
-</description>
-</context>
-<!-- Connection Properties Page... -->
-<context id="pcon0000">
-<description>Browse or update information about the selected connection.
-</description>
-</context>
-<!-- SubSystem Properties Page... -->
-<context id="psub0000">
-<description>Browse or update information about the selected subsystem.
-</description>
-</context>
-<!-- FilterPool Properties Page 1... -->
-<context id="pfp10000">
-<description>Browse information about the selected filter pool reference. Subsystems contain references to filter pools that physically exist within profiles. Multiple subsystems can reference the same filter pool.
-</description>
-</context>
-<!-- FilterPool Properties Page 2... -->
-<context id="pfp20000">
-<description>Browse information about the filter pool being referenced. Subsystems contain references to filter pools that physically exist within profiles. Multiple subsystems can reference the same filter pool.
-</description>
-</context>
-<!-- Filter Properties Page ... -->
-<context id="pflr0000">
-<description>Browse information about the selected filter.
-</description>
-</context>
-<!-- FilterString Properties Page 1... -->
-<context id="pfls0000">
-<description>Browse information about the selected filter string.</description>
-</context>
-<!-- New Filter Pool Wizard... -->
-<context id="wnfp0000">
-<description>Specify the name and parent profile for the new filter pool. Profiles own filter pools, while subsystems reference them.
-</description>
-</context>
-<!-- New Filter Wizard... -->
-<context id="wnfr0000">
-<description>Specify a unique name for the filter, and click <b>Add</b> to create one or more filter strings. When this filter is expanded, the filter strings will be resolved and the results listed in the tree.
-</description>
-</context>
-<context id="nfp20000">
-<description>On this page, specify a unique name for the filter, and whether it is unique for this connection or will appear in all applicable connections. For the latter, you also specify what filter pool to contain the filter.
-</description>
-</context>
-<!-- Copy Remote Files Dialog... -->
-<context id="dcrf0000">
-<description>Select the folder where you want to copy the selected folders or files. The folder they exist in is pre-selected. If you leave this as the default, you will be prompted for new names for the copied folders and files.
-</description>
-</context>
-<!-- Move Remote Files Dialog... -->
-<context id="dmrf0000">
-<description>Select the folder where you want to move the selected folders or files. The folder they exist in is pre-selected. If you leave this as the default, you will be prompted for new names for the moved folders and files.
-</description>
-</context>
-<context id="pwdp0000">
-<description>Specify the user ID and password used to log onto the remote system.
-</description>
-</context>
-<context id="rsep0000">
-<description>Specify the settings used by the Remote System Explorer.
-</description>
-</context>
-<context id="sysv0000">
-<description>This view lets you create connections to remote systems and work with them.
-</description>
-</context>
-<context id="ufwf0000">
-<description>This wizard will guide you through the creation of a new file.
-</description>
-</context>
-<context id="ufwr0000">
-<description>This wizard will guide you through the creation of a new folder.
-</description>
-</context>
-<context id="ufaf0000">
-<description>This command creates a new file.
-</description>
-</context>
-<context id="ufar0000">
-<description>This command creates a new folder resource.
-</description>
-</context>
-<context id="ufac0000">
-<description>This command copies an object to another location.
-</description>
-</context>
-<context id="ufam0000">
-<description>This command moves an object to another location.
-</description>
-</context>
-<context id="ufpf0000">
-<description>Specify options for the Files System.
-</description>
-</context>
-<!-- ============================================ -->
-<!-- File filter string wizard, dialog, form... -->
-<!-- ============================================ -->
-<!-- New File Filter String Wizard... -->
-<context id="ffsw0000">
-<description>This wizard will guide you through the creation of a filter string for listing files.
-</description>
-</context>
-<!-- Update File Filter String Dialog... -->
-<context id="ffsd0000">
-<description>This dialog updates your filter string that are used for listing files.
-</description>
-</context>
-<!-- New/Update File Filter String controls... -->
-<context id="ffsd0001">
-<description> Type or select the fully-qualified folder of the files that you want to list.
-</description>
-</context>
-<context id="ffsd0002">
-<description>Select this to list all files, or all files whose name meets a generic pattern.
-</description>
-</context>
-<context id="ffsd0003">
-<description>Specify a simple file name or a generic name pattern, containing up to 2 wildcard characters <b>*</b>. For example, <b>abc*def*</b>. Specify <b>*</b> to list all files.
-</description>
-</context>
-<context id="ffsd0004">
-<description>Select this to list all files that match one or more file types.
-</description>
-</context>
-<context id="ffsd0005">
-<description>Click <b>Select</b> to choose one or more file types to restrict. Only files of the selected types will be shown for this filter string.
-</description>
-</context>
-<context id="ffsd0006">
-<description>Select this to list only matching files within the given folder. Deselect this to list all folders within the given folder.
-</description>
-</context>
-<context id="ffsd0007">
-<description>Select this to test the filter string and see the list of files that match its criteria.
-</description>
-</context>
-<!-- PULLDOWN ACTION: Collapse-all action... -->
-<context id="actn0023">
-<description>Collapses all currently expanded resources in the Remote Systems view.
-</description>
-</context>
-<!-- PULLDOWN ACTION: Collapse action... -->
-<context id="actn0024">
-<description>Collapses all selected resources in the view.
-</description>
-</context>
-<!-- PULLDOWN ACTION: Expand action... -->
-<context id="actn0025"><description>Expands all selected resources in the view.</description></context>
-
-<!-- WORK WITH USER DEFINED ACTIONS DIALOG... -->
-<context id="wwua0000"><description>Use this dialog to create or edit user actions that appear in the User Actions pop-up menu for remote objects. Each active profile can contain unique actions, and all applicable actions from all active profiles are shown in the User Actions menu.
-The list on the left shows the existing user actions:
-- To <b>create</b> a new action, select the "New" node at the top of the list, enter information in the edit pane on the right, and press the <b>Create</b> button.
-- To <b>edit</b> an existing action, select the action in the list, update the information in the edit pane on the right, and press the <b>Apply</b> button.
-- To copy, paste, delete or re-order existing actions, use the pop-up menu.
-</description>
-<topic label="Working with user actions" href="../org.eclipse.rse.doc.user/tasks/tworkuseract.htm" />
-</context>
-
-
-<!-- WORK WITH NAMED TYPES DIALOG... -->
-<context id="wwnt0000"><description>Use this dialog to create or edit named types, which are named collections of resource types. These named types make it easier to identify resources which match one or more resource types.
-The list on the left shows the existing named types:
-- To <b>create</b> a new type, select the "New" node at the top of the list, enter information in the edit pane on the right, and press the <b>Create</b> button.
-- To <b>edit</b> an existing type, select the type in the list, update the information in the edit pane on the right, and press the <b>Apply</b> button.
-- To copy, paste, delete or re-order existing types, use the pop-up menu.
-Supplied types cannot be edited, but you can create a new type based on them by using copy and paste.
-</description></context>
-<context id="wwnt0002"><description>Enter a comma-separated list of file extensions or file names. For file names that have no extension, such as "makefile", specify ".null" for the extension, as in "makefile.null".</description></context>
-
-<!-- USER DEFINED ACTIONS DIALOG ACTION: Delete... -->
-<context id="udad0000"><description>Delete the selected action or type. You will be asked to confirm your action.</description></context>
-<!-- USER DEFINED ACTIONS DIALOG ACTION: Copy -->
-<context id="udac0000"><description>Copy the selected action or type to the clipboard.</description></context>
-<!-- USER DEFINED ACTIONS DIALOG ACTION: Paste -->
-<context id="udap0000"><description>Paste an action or type from the clipboard. You will be asked for a new name.</description></context>
-<!-- USER DEFINED ACTIONS DIALOG ACTION: Move Up -->
-<context id="udmu0000"><description>Move the selected action or type up in the list.</description></context>
-<!-- USER DEFINED ACTIONS DIALOG ACTION: Move Down -->
-<context id="udmd0000"><description>Move the selected action or type down in the list.</description></context>
-<!-- USER DEFINED ACTIONS DIALOG ACTION: Restore Defaults -->
-<context id="udrd0000"><description>Restore the action or type to its original values.</description></context>
-
-<!-- WORK WITH COMPILE COMMANDS DIALOG... -->
-<context id="wwcc0000"><description>Use this dialog to create or edit compile commands that appear in the Compile pop-up menu for remote resources. Each active profile can contain unique compile commands, and all applicable commands from all active profiles are shown in the Compile menu.
-The list on the left shows the existing compile commands:
-- To <b>create</b> a new compile command, select the "New" node at the top of the list, enter information in the edit pane on the right, and press the <b>Create</b> button.
-- To <b>edit</b> an existing compile command, select the command in the list, update the information in the edit pane on the right, and press the <b>Apply</b> button.
-- To copy, paste, delete or re-order existing compile commands, use the pop-up menu.
-</description>
-</context>
-<!-- WORK WITH COMPILE COMMANDS DIALOG ACTION: Delete... -->
-<context id="wwcc1000"><description>Delete the selected compile command. You will be asked to confirm your action.</description></context>
-<!-- WORK WITH COMPILE COMMANDS DIALOG ACTION: Copy -->
-<context id="wwcc2000"><description>Copy the selected compile command to the clipboard. The copy can be pasted to create a new compile command.</description></context>
-<!-- WORK WITH COMPILE COMMANDS DIALOG ACTION: Paste -->
-<context id="wwcc3000"><description>Paste a copy of a compile command from the clipboard.</description></context>
-<!-- WORK WITH COMPILE COMMANDS DIALOG ACTION: Move Up -->
-<context id="wwcc4000"><description>Move the selected compile command up in the list.</description></context>
-<!-- WORK WITH COMPILE COMMANDS DIALOG ACTION: Move Down -->
-<context id="wwcc5000"><description>Move the selected compile command down in the list.</description></context>
-<!-- WORK WITH COMPILE COMMANDS DIALOG ACTION: Restore Defaults -->
-<context id="wwcc6000"><description>Restore the compile command to its original values.</description></context>
-
-<!-- Save password dialogs -->
-<context id="pwdi0000">
-<description>Use the password information preference page to add, change, and remove stored passwords for remote systems. The stored passwords are used whenever a password is required to connect to the remote system.</description>
-<topic label="Changing your saved password for a remote host connection" href="../org.eclipse.rse.doc.user/tasks/tbeginpass.htm" />
-</context>
-<context id="pwdi0001">
-<description>Type the password information for the remote system and click <b>OK</b> to save the information or <b>Cancel</b> to exit without saving.</description>
-<topic label="Changing your saved password for a remote host connection" href="../org.eclipse.rse.doc.user/tasks/tbeginpass.htm" />
-</context>
-<context id="pwdi0002">
-<description>Modify the saved password information for the remote system and click <b>OK</b> to update the saved information or <b>Cancel</b> to exit without updating.</description>
-<topic label="Changing your saved password for a remote host connection" href="../org.eclipse.rse.doc.user/tasks/tbeginpass.htm" />
-</context>
-
-<!-- SubSystem property page -->
-<context id="psubs0000">
-<description>Use the subsystem property page to see and edit common information about the subsystem:
-<b>Vendor:</b> - the company who created this subsystem
-<b>Name:</b> - the name of this subsystem, as shown in the Remote Systems view
-<b>Parent connection:</b> - the connection that owns this subsystem
-<b>Parent profile:</b> - the system profile that owns the connection
-<b>Port:</b> - the port used for the communication between this client, and the remote server for this subsystem
-<b>User ID:</b> - the user ID to use to signon to the remote server
-</description>
-</context>
-
-<!-- Environment variables property page -->
-<context id="envv0000">
-<description>Use the environment variables property page to specify environment variables for the remote system. These environment variables will be set when the remote system is connected. Any changes made to the environment variables while connected, will not be set on the remote system until it is disconnected and reconnected.</description>
-</context>
-<context id="envv0001">
-<description>Type the name and value for the new environment variable. Click <b>OK</b> to add the new environment variable or <b>Cancel</b> to exit without adding it.</description>
-</context>
-<context id="envv0002">
-<description>Modify the name or value for the environment variable. Click <b>OK</b> to update the existing environment variable or <b>Cancel</b> to exit without modifying.</description>
-</context>
-
-<!-- Server launcher property page -->
-<context id="srln0000">
-<description>Use the server launcher settings property page to specify how to connect to a remote server on the remote system. To connect to a remote Linux, Unix or Windows host you must first install the Remote System Explorer server on the remote host.</description>
-<topic label="Connecting to a remote Linux or UNIX host" href="../org.eclipse.rse.doc.user/tasks/tbeginlinux.htm" />
-<topic label="Connecting to a remote Windows host" href="../org.eclipse.rse.doc.user/tasks/tbeginwindows.htm" />
-</context>
-<context id="srln0001">
-<description>Indicate that a connection should be established with a server on the remote system using the remote daemon to start the server. To use this option, the remote daemon must be running on the remote system.</description>
-</context>
-<context id="srln0002">
-<description>Indicate that a connection should be established with a server on the remote system using the REXEC service to start the server. To use this option, the REXEC service must be running on the remote system.</description>
-</context>
-<context id="srln0003">
-<description>Indicate that a connection should be established with a server that is already running on some known port. To use this option, the server needs to be started up before attempting to connect in the Remote System Explorer.</description>
-</context>
-<context id="srln0004">
-<description>Specify the location of the server installed on the host. REXEC uses this location to determine where to run the startup script from.</description>
-</context>
-<context id="srln0005">
-<description>Specify the name of the command or script that REXEC needs to run to invoke the server installed on the host.</description>
-</context>
-
-
-
-<!-- Installing remote server -->
-<context id="rsrv0000">
-<description>To connect to a remote Linux, Unix or Windows host you must first install the Remote System Explorer server on the remote host.</description>
-<topic label="Connecting to a remote Linux or UNIX host" href="../org.eclipse.rse.doc.user/tasks/tbeginlinux.htm" />
-<topic label="Connecting to a remote Windows host" href="../org.eclipse.rse.doc.user/tasks/tbeginwindows.htm" />
-</context>
-
-
-<!-- Universal Command Dialog -->
-<context id="cmdi0000">
-<description>Specify a command to run on the remote system.</description>
-</context>
-
-<!-- Remote Search Dialog -->
-<context id="rsdi0000">
-<description>Specify a search string and optionally limit the search to a subset of files by specifying file name patterns. Leave the search string empty to search for files only.</description>
-<topic label="Search for text and files on remote servers" href="../org.eclipse.rse.doc.user/tasks/tmanagesearch.htm"/>
-</context>
-<context id="rsac0000">
-<description>Opens Remote Search dialog page for text and file searching on remote systems.</description>
-</context>
-
-<!-- Extract To Dialog -->
-<context id="exdi0000">
-<description>Specify the name and location of a new folder which will be created to hold the extracted contents of the archive.</description>
-</context>
-
-<!-- Combine Dialog -->
-<context id="cmbd0000">
-<description>Specify the name, type and location of a new file which will be created to hold the combined archives.</description>
-</context>
-
-<!-- Convert Dialog -->
-<context id="cnvd0000">
-<description>Specify the name, type and location of the file to which the archive will be converted.</description>
-</context>
-
-<!-- Add to Archive Dialog -->
-<context id="atad0000">
-<description>Specify the name, type and location of the archive file to which the selected files will be added.</description>
-</context>
-
-<!-- Generic Position To Dialog -->
-<context id="gnpt0000">
-<description>Specify a name filter to use in locating objects in the view.</description>
-</context>
-
-<!-- Generic Subset Dialog -->
-<context id="gnss0000">
-<description>Specify a set of property filters to use as criteria in populating the table.</description>
-</context>
-
-<!-- Generic Table Customization Dialog -->
-<context id="gntc0000">
-<description>Specify the list of columns and the order in which to display them in the table.</description>
-</context>
-
-<!-- Remote System Details View -->
-<context id="sysd0000">
-<description>This view lets you view the contents and properties of remote objects.</description>
-</context>
-
-<!-- Remote Search View -->
-<context id="srch0000">
-<description>This view shows you the results of a remote file search.</description>
-</context>
-
-<context id="search_cancel">
-<description>This action cancels the search operation. If the search is not complete, partial results may be shown in
-the view.</description>
-</context>
-
-<context id="search_remove_selected">
-<description>This action removes the selected matches from the view. If files are selected in the view, then all
-selected matches in that file will also be removed from the view.</description>
-</context>
-
-<context id="search_remove_all">
-<description>This action removes all matches from the view.</description>
-</context>
-
-<context id="search_history">
-<description>This action will bring up results for a previous search in the view.</description>
-</context>
-
-<context id="search_clear_history">
-<description>This action will remove the results of all searches from the view.</description>
-</context>
-
-<!-- Remote Shell View -->
-<context id="ucmd0000">
-<description>This view allows you to run and view shell commands.</description>
-</context>
-
-<!-- Remote Scratchpad View -->
-<context id="scrp0000">
-<description>Drag and drop objects here from other Remote System Explorer views to work with them in isolation.</description>
-</context>
-
-<!-- Remote Error List View -->
-<context id="uerr0000">
-<description>This view shows you errors, warnings and informational messages resulting from a compile command.</description>
-</context>
-
-<!-- Save Conflict Dialog -->
-<context id="scdl0000">
-<description>You are about to save your changes to a file on the remote system that has been modified since you started editing. Choose whether you want to overwrite the remote file, replace your changes with those of the file on the remote system, save your changes to another remote file or cancel the save.</description>
-</context>
-
-<!-- Local Changes Pending Dialog -->
-<context id="lcdl0000">
-<description>You have made changes to this file during a previous editing session that have not been saved on the remote system. If you open the remote file, you will lose all pending changes. Choose whether you want to replace your changes with the remote file, keep your changes or cancel the operation. You will be able to save your file to a different location without overwriting the remote file if you choose to keep your pending changes.</description>
-</context>
-
-<context id="ecth0000">
-<description>Select this option to enable the help to work in the CODE tools, and VisualAge RPG tools. It uncompresses the html help files for these tools.
-</description>
-</context>
-
-<!-- General RSE communications preference page -->
-<context id="cmmp0000">
-<description>This is the RSE communications preferences page. These preferences are not specific to any single RSE connection. The <b>RSE communications daemon</b> can be used by local Workbench functions to listen for incoming socket requests from remote systems. The daemon can be started and stopped from the pull down menu in the RSE's Remote Systems view.
-
-Use the start RSE communications daemon checkbox to automatically start the daemon when the Workbench is started.
-
-Use the port preference to change which local TCP/IP port the daemon uses to listen for incoming requests. A valid TCP/IP port number must be entered. If the port is changed and the daemon is currently running then the daemon will be stopped and restarted on the new port when the preference page is closed.</description>
-</context>
-
-<!-- file cache preference page -->
-<context id="fchp0000">
-<description>This is the RSE file cache preference page.
-
-Remote files are cached locally when RSE is used for editing. Use the <b>Maximum cache size</b> settings to specify a limit to the amount of disk space used for this cache.
-
-Click the <b>Clear Cached Files</b> button to remove all cached files. Clearing the cache will close any editors open for these files.
-</description>
-</context>
-
-<!-- RSE Communications daemon action -->
-<context id="dmna0000">
-<description>This action starts and stops the local Remote System Explorer (RSE) communications daemon. This daemon is not directly used by individual RSE connections. Instead it allows local Workbench functions to accept incoming socket requests from remote systems. You can set the daemon to automatically start and configure the port used by the daemon in the Workbench preferences under Remote Systems->Communications.</description>
-<!-- FIXME need to add these htm files to user doc
-<topic href="../org.eclipse.rse.doc.user/reference/rports.htm" label="Port information for Development Studio Client" />
-<topic href="../org.eclipse.rse.doc.user/reference/rprefcom.htm" label="Preferences: communications" />
- -->
-</context>
-
-<!-- Work offline support -->
-<context id="wofa0000">
-<description>The Work Offline action toggles the connection between offline and online modes. In offline mode information is retrieved from the cache if available and supported by the connection type. If the action currently has a check mark beside it then the connection is offline and selecting this action will put the connection in online mode so it can be connected to the remote system.</description>
-</context>
-<context id="wofp0000">
-<description>Select the Work Offline property to set the connection offline. In offline mode the connection cannot be connected to the remote system. Information is retrieved from the cache if available and supported by the connection type.</description>
-</context>
-
-<!-- SSL support -->
-<context id="ssls0000">
-<description>This is the RSE SSL preference page.
-From here you can manage the certificates that the RSE client uses when connecting to a server that is configured to use SSL.
-</description>
-</context>
-<context id="ssls0001">
-<description>Use the server connection security property page to indicate whether the server you are connecting to is running in SSL mode.
-</description>
-</context>
-
-</contexts> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 33b02e2cc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,50 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.ui;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.ui.RSEUIPlugin
-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.ui.workbench.texteditor,
- org.eclipse.rse.core
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.core,
- org.eclipse.rse.core.comm,
- org.eclipse.rse.core.internal.subsystems,
- org.eclipse.rse.core.servicesubsystem,
- org.eclipse.rse.core.subsystems,
- org.eclipse.rse.core.subsystems.util,
- org.eclipse.rse.filters,
- org.eclipse.rse.internal.filters,
- org.eclipse.rse.internal.model,
- org.eclipse.rse.model,
- org.eclipse.rse.ui,
- org.eclipse.rse.ui.actions,
- org.eclipse.rse.ui.dialogs,
- org.eclipse.rse.ui.filters,
- org.eclipse.rse.ui.filters.actions,
- org.eclipse.rse.ui.filters.dialogs,
- org.eclipse.rse.ui.messages,
- org.eclipse.rse.ui.open,
- org.eclipse.rse.ui.operations,
- org.eclipse.rse.ui.propertypages,
- org.eclipse.rse.ui.validators,
- org.eclipse.rse.ui.view,
- org.eclipse.rse.ui.view.monitor,
- org.eclipse.rse.ui.view.scratchpad,
- org.eclipse.rse.ui.view.search,
- org.eclipse.rse.ui.view.team,
- org.eclipse.rse.ui.widgets,
- org.eclipse.rse.ui.widgets.services,
- org.eclipse.rse.ui.wizards
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
deleted file mode 100644
index e2717a368..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
+++ /dev/null
@@ -1,5341 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Michael Berger (IBM) - Patch to remove non-standard expand/collapse from menu.
- * Tobias Schwarz (Wind River) - Fix 166343 getChildCount() counts invalid items
- * Martin Oberhuber (Wind River) - Improve fix for 166343 getChildCount()
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.ITreeViewerListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeExpansionEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.window.SameShellProvider;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemElapsedTimer;
-import org.eclipse.rse.core.SystemPopupMenuActionContributorManager;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterContainerReference;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemPromptableObject;
-import org.eclipse.rse.model.ISystemRemoteChangeEvent;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemRemoteChangeListener;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemRemoteElementResourceSet;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemCascadingGoToAction;
-import org.eclipse.rse.ui.actions.SystemCollapseAction;
-import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.ui.actions.SystemExpandAction;
-import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
-import org.eclipse.rse.ui.actions.SystemOpenExplorerPerspectiveAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.actions.SystemRemotePropertiesAction;
-import org.eclipse.rse.ui.actions.SystemShowInMonitorAction;
-import org.eclipse.rse.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.TreeEvent;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.part.EditorInputTransfer;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.progress.PendingUpdateAdapter;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.ui.views.framelist.GoIntoAction;
-
-/**
- * This subclass of the standard JFace tree viewer is used to show a tree
- * view of connections to remote systems, which can be manipulated and expanded
- * to access remote objects in the remote system.
- */
-/*
- * At one time implemented the following as well: MenuListener, IDoubleClickListener, ArmListener, IWireEventTarget
- */
-public class SystemView extends TreeViewer implements ISystemTree, ISystemResourceChangeListener, ISystemRemoteChangeListener, IMenuListener,
- ISelectionChangedListener, ISelectionProvider, ITreeViewerListener, ISystemResourceChangeEvents, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelectAllTarget
-{
-
- protected Shell shell; // shell hosting this viewer
- protected ISystemViewInputProvider inputProvider; // who is supplying our tree root elements?
- protected ISystemViewInputProvider previousInputProvider; // who is supplying our tree root elements?
- protected Object previousInput;
- protected IHost previousInputConnection;
- // protected actions
- protected SystemNewConnectionAction newConnectionAction;
- protected SystemRefreshAction refreshAction;
- protected PropertyDialogAction propertyDialogAction;
- protected SystemRemotePropertiesAction remotePropertyDialogAction;
- protected SystemCollapseAction collapseAction; // defect 41203
- protected SystemExpandAction expandAction; // defect 41203
- protected SystemOpenExplorerPerspectiveAction openToPerspectiveAction;
-
- protected SystemShowInTableAction showInTableAction;
- protected SystemShowInMonitorAction showInMonitorAction;
- protected GoIntoAction goIntoAction;
- protected SystemCascadingGoToAction gotoActions;
- // global actions
- // Note the Edit menu actions are set in SystemViewPart. Here we use these
- // actions from our own popup menu actions.
- protected SystemCommonDeleteAction deleteAction; // for global delete menu item
- protected SystemCommonRenameAction renameAction; // for common rename menu item
- protected SystemCommonSelectAllAction selectAllAction; // for common Ctrl+A select-all
- // special flags needed when building popup menu, set after examining selections
- protected boolean selectionShowRefreshAction;
- protected boolean selectionShowOpenViewActions;
- protected boolean selectionShowGenericShowInTableAction;
- protected boolean selectionShowDeleteAction;
- protected boolean selectionShowRenameAction;
- protected boolean selectionEnableDeleteAction;
- protected boolean selectionEnableRenameAction;
- protected boolean selectionIsRemoteObject;
- protected boolean selectionHasAncestorRelation;
- protected boolean selectionFlagsUpdated = false;
- // misc
- protected MenuManager menuMgr;
- protected boolean showActions = true;
- protected boolean hardCodedConnectionSelected = false;
- protected boolean mixedSelection = false;
- protected boolean specialMode = false;
- protected boolean menuListenerAdded = false;
- protected boolean fromSystemViewPart = false;
- protected boolean areAnyRemote = false;
- protected boolean enabledMode = true;
- protected Widget previousItem = null;
- protected int searchDepth = 0;
- //protected Vector remoteItemsToSkip = null;
- protected Cursor busyCursor;
- protected TreeItem inputTreeItem = null;
- protected static final int SEARCH_INFINITE = 10; // that's far enough down to search!
- public boolean debug = false;
- public boolean debugRemote = false;
- public boolean debugProperties = debug && false;
- public boolean doTimings = false;
- public SystemElapsedTimer elapsedTime = new SystemElapsedTimer();
- // for support of Expand To actions ... transient filters really.
- // we need to record these per tree node they are applied to.
- protected Hashtable expandToFiltersByObject; // most efficient way to find these is by binary object
- protected Hashtable expandToFiltersByTreePath; // however, we lose that after a refresh so we also record by tree path
-
- // message line
- protected ISystemMessageLine messageLine = null;
- // button pressed
- protected static final int LEFT_BUTTON = 1;
- protected int mouseButtonPressed = LEFT_BUTTON; //d40615
- protected boolean expandingTreeOnly = false; //d40615
- protected ViewerFilter[] initViewerFilters = null;
-
- protected List _setList;
-
- /**
- * Constructor
- * @param shell The shell hosting this tree viewer widget
- * @param parent The composite widget into which to place this widget
- * @param inputProvider The input object which will supply the initial root objects in the tree.
- * Can be null initially, but be sure to call #setInputProvider(ISystemViewInputProvider) later.
- * @param msgLine Where to display messages and tooltip text
- */
- public SystemView(Shell shell, Composite parent, ISystemViewInputProvider inputProvider, ISystemMessageLine msgLine) {
- super(parent);
- this.shell = shell;
- this.inputProvider = inputProvider;
- this.inputProvider.setShell(shell); // DY: defect 44544
- this.messageLine = msgLine;
- init();
- }
-
- /**
- * Constructor to use when you want to specify styles for the tree widget
- * @param shell The shell hosting this tree viewer widget
- * @param parent The composite widget into which to place this widget
- * @param style The style to give the tree widget
- * @param inputProvider The input object which will supply the initial root objects in the tree.
- * Can be null initially, but be sure to call #setInputProvider(ISystemViewInputProvider) later.
- * @param msgLine Where to display messages and tooltip text
- */
- public SystemView(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider, ISystemMessageLine msgLine) {
- super(parent, style);
- this.shell = shell;
- this.inputProvider = inputProvider;
- this.inputProvider.setShell(shell); // DY: defect 44544
- this.messageLine = msgLine;
- init();
- }
-
- /**
- * Constructor to use when you want to specify styles for the tree widget
- * @param shell The shell hosting this tree viewer widget
- * @param parent The composite widget into which to place this widget
- * @param style The style to give the tree widget
- * @param inputProvider The input object which will supply the initial root objects in the tree.
- * Can be null initially, but be sure to call #setInputProvider(ISystemViewInputProvider) later.
- * @param msgLine Where to display messages and tooltip text
- * @param initViewerFilters the initial viewer filters to apply.
- */
- public SystemView(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider, ISystemMessageLine msgLine, ViewerFilter[] initViewerFilters) {
- super(parent, style);
- this.shell = shell;
- this.inputProvider = inputProvider;
- this.inputProvider.setShell(shell); // DY: defect 44544
- this.messageLine = msgLine;
- this.initViewerFilters = initViewerFilters;
- init();
- }
-
- /**
- * Constructor to use when you create your own tree widget.
- * @param shell The shell hosting this tree viewer widget
- * @param tree The Tree widget you created.
- * @param inputProvider The input object which will supply the initial root objects in the tree.
- * Can be null initially, but be sure to call #setInputProvider(ISystemViewInputProvider) later.
- * @param msgLine Where to display messages and tooltip text
- */
- public SystemView(Shell shell, Tree tree, ISystemViewInputProvider inputProvider, ISystemMessageLine msgLine) {
- super(tree);
- this.shell = shell;
- this.inputProvider = inputProvider;
- this.inputProvider.setShell(shell); // DY: defect 44544
- this.messageLine = msgLine;
- init();
- }
-
- /**
- * Set the input provider. Sometimes this is delayed, or can change.
- * @param inputProvider the input provider for this view.
- */
- public void setInputProvider(ISystemViewInputProvider inputProvider) {
- this.inputProvider = inputProvider;
- inputProvider.setViewer(this);
- inputProvider.setShell(getShell()); // DY: Defect 44544, shell was not being set for Test dialogs, when they
- // tried to connect there was not shell for the password prompt
- // and an error message (expand failed) occured.
- setInput(inputProvider);
- }
-
- /**
- * Get the SystemViewPart that encapsulates us.
- * Will be null unless fromSystemViewPart is true.
- */
- public SystemViewPart getSystemViewPart() {
- if (fromSystemViewPart)
- return ((SystemViewPart) messageLine);
- else
- return null;
- }
-
- /**
- * Get the workbench window containing this view part. Will only be non-null for the explorer view part,
- * not when used within, say, a dialog
- */
- protected IWorkbenchWindow getWorkbenchWindow() {
- if (fromSystemViewPart)
- return getSystemViewPart().getSite().getWorkbenchWindow();
- else
- return null;
- }
-
- /**
- * Get the workbench part containing this view. Will only be non-null for the explorer view part,
- * not when used within, say, a dialog
- */
- protected IWorkbenchPart getWorkbenchPart() {
- return getSystemViewPart();
- }
-
- /**
- * Disable/Enable the viewer. We do this by blocking keystrokes without visually greying out
- */
- public void setEnabled(boolean enabled) {
- enabledMode = enabled;
- }
-
- /**
- * Sets the label and content provider for the system view.
- * This can be called externally if a custom RSE label and content provider is desired
- * @param lcProvider the provider
- */
- public void setLabelAndContentProvider(SystemViewLabelAndContentProvider lcProvider) {
- ILabelDecorator decorator = null;
- if (PlatformUI.isWorkbenchRunning()) {
- IWorkbench wb = PlatformUI.getWorkbench();
- decorator = wb.getDecoratorManager().getLabelDecorator();
- }
- setLabelProvider(new DecoratingLabelProvider(lcProvider, decorator));
- setContentProvider(lcProvider);
- }
-
- protected void init() {
- _setList = new ArrayList();
- busyCursor = new Cursor(shell.getDisplay(), SWT.CURSOR_WAIT);
- setUseHashlookup(true); // new for our 2nd release. Attempt to fix 38 minutes to refresh for 15K elements
-
- // set content provider
- SystemViewLabelAndContentProvider lcProvider = new SystemViewLabelAndContentProvider();
- setLabelAndContentProvider(lcProvider);
-
- // set initial viewer filters
- if (initViewerFilters != null) {
-
- for (int i = 0; i < initViewerFilters.length; i++) {
- addFilter(initViewerFilters[i]);
- }
- }
-
- fromSystemViewPart = ((messageLine != null) && (messageLine instanceof SystemViewPart));
-
- // set the tree's input. Provides initial roots.
- if (inputProvider != null) {
- inputProvider.setViewer(this);
- setInput(inputProvider);
- if (fromSystemViewPart) {
- previousInputConnection = getInputConnection(getWorkbenchPart().getSite().getPage().getInput());
- }
- }
- //addDoubleClickListener(this);
- addSelectionChangedListener(this);
- addTreeListener(this);
- // ----------------------------------------
- // register with system registry for events
- // ----------------------------------------
- RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this);
- // -----------------------------
- // Enable right-click popup menu
- // -----------------------------
- menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(this);
- Menu menu = menuMgr.createContextMenu(getTree());
- getTree().setMenu(menu);
- // -------------------------------------------
- // Enable specific keys: dbl-click, Delete, F5
- // -------------------------------------------
- addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleDoubleClick(event);
- }
- });
- getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleKeyPressed(e);
- }
- });
- getControl().addMouseListener(new MouseAdapter() {
- public void mouseDown(MouseEvent e) {
- mouseButtonPressed = e.button; //d40615
- if (!enabledMode) {
- //e.doit = false;
- return;
- }
- }
- });
-
- initRefreshKey();
-
- // initialize drag and drop
- initDragAndDrop();
- }
-
- /**
- * Create the KeyListener for doing the refresh on the viewer.
- */
- protected void initRefreshKey() {
- /* DKM - no need for explicit key listener since we
- * have global action
- getControl().addKeyListener(new KeyAdapter()
- {
- public void keyReleased(KeyEvent event)
- {
- if (!enabledMode)
- return;
- if (event.keyCode == SWT.F5)
- {
- //if (debug)
- // System.out.println("F5 pressed");
- refreshAll();
- }
- }
- });
- */
- }
-
- /**
- * Handles double clicks in viewer.
- * Opens editor if file double-clicked.
- */
- protected void handleDoubleClick(DoubleClickEvent event) {
- if (!enabledMode) {
- //event.doit = false;
- return;
- }
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null) return;
- ISystemViewElementAdapter adapter = getAdapter(element);
- boolean alreadyHandled = false;
- if (adapter != null) alreadyHandled = adapter.handleDoubleClick(element);
- if (!alreadyHandled && isExpandable(element)) {
- boolean expandedState = getExpandedState(element);
- setExpandedState(element, !expandedState);
- // DY: fire collapse / expand event
- if (expandedState) {
- fireTreeCollapsed(new TreeExpansionEvent(this, element));
- } else {
- fireTreeExpanded(new TreeExpansionEvent(this, element));
- }
- return;
- }
- }
-
- /**
- * Handles key events in viewer.
- */
- void handleKeyPressed(KeyEvent event) {
- if ((event.character == SWT.DEL) && (event.stateMask == 0) && (((IStructuredSelection) getSelection()).size() > 0)) {
- scanSelections("handleKeyPressed"); //$NON-NLS-1$
- /* DKM - 53694
- if (showDelete() && canDelete())
- {
-
- SystemCommonDeleteAction dltAction = (SystemCommonDeleteAction)getDeleteAction();
- dltAction.setShell(getShell());
- dltAction.setSelection(getSelection());
- dltAction.setViewer(this);
- dltAction.run();
-
- }
- */
- } else if ((event.character == '-') && (event.stateMask == SWT.CTRL)) {
- collapseAll();
- } else if ((event.character == 1) && // for some reason Ctrl+A comes in as Ctrl plus the number 1!
- (event.stateMask == SWT.CTRL) && !fromSystemViewPart) {
- //System.out.println("Inside Ctrl+A processing");
- if (enableSelectAll(null)) doSelectAll(null);
- } else if ((event.character == '-') && (((IStructuredSelection) getSelection()).size() > 0)) {
- //System.out.println("Inside Ctrl+- processing");
- collapseSelected();
- } else if ((event.character == '+') && (((IStructuredSelection) getSelection()).size() > 0)) {
- //System.out.println("Inside Ctrl++ processing");
- expandSelected();
- }
-
- }
-
- /**
- * Handles a collapse-selected request
- */
- public void collapseSelected() {
- TreeItem[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- for (int idx = 0; idx < selectedItems.length; idx++)
- selectedItems[idx].setExpanded(false);
- }
- }
-
- /**
- * Handles an expand-selected request
- */
- public void expandSelected() {
- TreeItem[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- for (int idx = 0; idx < selectedItems.length; idx++) {
- if (!selectedItems[idx].getExpanded()) {
- createChildren(selectedItems[idx]);
- }
- selectedItems[idx].setExpanded(true);
- }
- }
- }
-
- /**
- * Display a message/status on the message/status line
- */
- public void displayMessage(String msg) {
- if (messageLine != null) messageLine.setMessage(msg);
- }
-
- /**
- * Clear message/status shown on the message/status line
- */
- public void clearMessage() {
- if (messageLine != null) messageLine.clearMessage();
- }
-
- /**
- * Turn off right-click actions
- */
- public void setShowActions(boolean show) {
- this.showActions = show;
- }
-
- /**
- * Return the input provider
- */
- public ISystemViewInputProvider getInputProvider() {
- inputProvider.setViewer(this); // just in case. Added by Phil in V5.0
- inputProvider.setShell(getShell()); // just in case. Added by Phil
- return inputProvider;
- }
-
- /**
- * Return the popup menu for the tree
- */
- public Menu getContextMenu() {
- return getTree().getMenu();
- }
-
- /**
- * Return the popup menu for the tree
- */
- public MenuManager getContextMenuManager() {
- return menuMgr;
- }
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- public IAction getNewConnectionAction() {
- if (newConnectionAction == null) newConnectionAction = new SystemNewConnectionAction(getShell(), true, this); // true=>from popup menu
- return newConnectionAction;
- }
-
- /**
- * Return the refresh action
- */
- public IAction getRefreshAction() {
- if (refreshAction == null) refreshAction = new SystemRefreshAction(getShell());
- return refreshAction;
- }
-
- /**
- * @return the collapse action. Lazily creates it.
- */
- public IAction getCollapseAction() {
- if (collapseAction == null) collapseAction = new SystemCollapseAction(getShell());
- return collapseAction;
- }
-
- /**
- * @return the expand action. Lazily creates it.
- */
- public IAction getExpandAction() {
- if (expandAction == null) expandAction = new SystemExpandAction(getShell());
- return expandAction;
- }
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- public PropertyDialogAction getPropertyDialogAction() {
- if (propertyDialogAction == null) {
- propertyDialogAction = new PropertyDialogAction(new SameShellProvider(getShell()), this);
- //propertyDialogAction.setToolTipText(" ");
- }
-
-
- propertyDialogAction.selectionChanged(getSelection());
-
- return propertyDialogAction;
- }
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- public SystemRemotePropertiesAction getRemotePropertyDialogAction() {
- if (remotePropertyDialogAction == null) {
- remotePropertyDialogAction = new SystemRemotePropertiesAction(getShell());
- }
- remotePropertyDialogAction.setSelection(getSelection());
- return remotePropertyDialogAction;
- }
-
- /**
- * Return the select All action
- */
- public IAction getSelectAllAction() {
- if (selectAllAction == null) selectAllAction = new SystemCommonSelectAllAction(getShell(), this, this);
- return selectAllAction;
- }
-
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- public IAction getRenameAction() {
- if (renameAction == null) renameAction = new SystemCommonRenameAction(getShell(), this);
- return renameAction;
- }
-
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- public IAction getDeleteAction() {
- if (deleteAction == null) deleteAction = new SystemCommonDeleteAction(getShell(), this);
- return deleteAction;
- }
-
- /*
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- *
- protected SystemCascadingOpenToAction getOpenToAction()
- {
- if (openToAction == null)
- openToAction = new SystemCascadingOpenToAction(getShell(),getWorkbenchWindow());
- return openToAction;
- } NOT USED YET */
-
- /**
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- */
- public SystemOpenExplorerPerspectiveAction getOpenToPerspectiveAction() {
- if (openToPerspectiveAction == null) openToPerspectiveAction = new SystemOpenExplorerPerspectiveAction(getShell(), getWorkbenchWindow());
- return openToPerspectiveAction;
- }
-
- public SystemShowInTableAction getShowInTableAction() {
- if (showInTableAction == null) showInTableAction = new SystemShowInTableAction(getShell());
- return showInTableAction;
- }
-
- public SystemShowInMonitorAction getShowInMonitorAction() {
- if (showInMonitorAction == null) showInMonitorAction = new SystemShowInMonitorAction(getShell());
- return showInMonitorAction;
- }
-
- /**
- * Get the common "Go Into" action for drilling down in the Remote System Explorer view,
- * scoped to the currently selected object.
- */
- public GoIntoAction getGoIntoAction() {
- if (goIntoAction == null) {
- goIntoAction = new GoIntoAction(getSystemViewPart().getFrameList());
- goIntoAction.setText(SystemResources.ACTION_CASCADING_GOINTO_LABEL);
- goIntoAction.setToolTipText(SystemResources.ACTION_CASCADING_GOINTO_TOOLTIP);
- }
- return goIntoAction;
- }
-
- /**
- * Get the common "Go To->" cascading menu action for navigating the frame list.
- */
- public SystemCascadingGoToAction getGoToActions() {
- if (gotoActions == null) gotoActions = new SystemCascadingGoToAction(getShell(), getSystemViewPart());
- return gotoActions;
- }
-
- /**
- * Helper method to collapse a node in the tree.
- * Called when a currently expanded subsystem is disconnected.
- * @param forceRefresh true if children should be deleted from memory so re-expand forces refresh.
- */
- public void collapseNode(Object element, boolean forceRefresh) {
- // First, collapse this element and all its children.
- collapseToLevel(element, ALL_LEVELS);
-
- // Collapsed just changes expanded state but leaves existing child
- // widgets in memory so they are re-shown on next expansion.
- // To force the next expand to re-get the children, we have to delete the
- // children.
- if (forceRefresh) {
- refresh(element); // look at AbstractTreeViewer.updateChildren which this
- // will call. If the element is collapsed (which we just
- // did) then its children are simply disposed of, and
- // not re-queried. Just what we want!
- }
- }
-
- /**
- * This is method is called to populate the popup menu
- */
- public void fillContextMenu(IMenuManager menu) {
-
- if (!showActions) return;
- //SystemViewPlugin.getDefault().logMessage("inside fillContextMenu");
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- boolean allSelectionsFromSameParent = true;
- int selectionCount = selection.size();
-
- if (selectionCount == 0) // nothing selected
- {
- menu.add(getNewConnectionAction());
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- } else {
- if (selectionCount > 1) {
- allSelectionsFromSameParent = sameParent();
- if (!allSelectionsFromSameParent) {
- if (selectionHasAncestryRelationship()) {
- // don't show the menu because actions with
- // multiple select on objects that are ancestors
- // of each other is problematic
- // still create the standard groups
- createStandardGroups(menu);
- return;
- }
- }
- }
- // Partition into groups...
- createStandardGroups(menu);
-
- // PRESET INSTANCE VARIABLES ABOUT WHAT COMMON ACTIONS ARE TO BE SHOWN...
- // PERFORMANCE TWEAK: OUR GLOBAL DELETE ACTION LISTENS FOR SELECTION CHANGES, AND
- // WHEN THAT CHANGES, WILL CALL CANDELETE() HERE. THAT IN TURN WILL CALL SCANSELECTIONS.
- // THIS MEANS SCAN SELECTIONS GETS CALL TWICE ON MOST RIGHT CLICK ACTIONS.
- if (!selectionFlagsUpdated) // might already be called by the global delete action wh
- scanSelections("fillContextMenu"); //$NON-NLS-1$
-
- // ADD COMMON ACTIONS...
-
- // COMMON REFRESH ACTION...
- if (showRefresh()) {
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_BUILD, getRefreshAction());
-
- // MJB: Removed as per bugzilla entry # 145843
- //menu.appendToGroup(ISystemContextMenuConstants.GROUP_BUILD, getExpandAction()); // defect 41203
- //menu.appendToGroup(ISystemContextMenuConstants.GROUP_BUILD, getCollapseAction()); // defect 41203
- }
-
- // COMMON RENAME ACTION...
- if (showRename()) {
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getRenameAction());
- ((ISystemAction) getRenameAction()).setInputs(getShell(), this, selection);
- }
-
- // ADAPTER SPECIFIC ACTIONS
- SystemMenuManager ourMenu = new SystemMenuManager(menu);
-
- // yantzi:artemis 6.0 (defect 53970), do not show adapter specific actions when
- // there is not a common adapter for all selected elements (i.e. there are 2 or
- // more selected elements that have different adapters
- Iterator elements = selection.iterator();
- //Hashtable adapters = new Hashtable();
- ISystemViewElementAdapter adapter = null;
- boolean skipAdapterActions = false;
-
- while (elements.hasNext() && !skipAdapterActions) {
- Object element = elements.next();
- if (adapter == null) {
- adapter = getAdapter(element);
- } else if (adapter != getAdapter(element)) {
- // selected elements have different adapters
- skipAdapterActions = true;
- }
- //if (adapter != null)
- // adapters.put(adapter,element); // want only unique adapters
- }
-
-
- //Enumeration uniqueAdapters = adapters.keys();
- if (!skipAdapterActions && adapter != null) {
- Shell shell = getShell();
-
- //while (uniqueAdapters.hasMoreElements())
- //{
- // ISystemViewElementAdapter nextAdapter = (ISystemViewElementAdapter)uniqueAdapters.nextElement();
- adapter.addActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
- if (adapter instanceof AbstractSystemViewAdapter) {
-
- AbstractSystemViewAdapter aVA = (AbstractSystemViewAdapter) adapter;
- // add remote actions
- aVA.addCommonRemoteActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
-
- // add dynamic menu popups
- aVA.addDynamicPopupMenuActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADDITIONS);
- }
- //}
- }
-
-
- // whale through all actions, updating shell and selection
- IContributionItem[] items = menu.getItems();
- for (int idx = 0; idx < items.length; idx++) {
- if ((items[idx] instanceof ActionContributionItem) && (((ActionContributionItem) items[idx]).getAction() instanceof ISystemAction)) {
- ISystemAction item = (ISystemAction) (((ActionContributionItem) items[idx]).getAction());
- try {
- item.setInputs(getShell(), this, selection);
- } catch (Exception e) {
- SystemBasePlugin.logError("Error configuring action " + item.getClass().getName(), e); //$NON-NLS-1$
- }
- } else if (items[idx] instanceof SystemSubMenuManager) {
- SystemSubMenuManager item = (SystemSubMenuManager) items[idx];
- item.setInputs(getShell(), this, selection);
- }
- }
-
- // COMMON DELETE ACTION...
- if (showDelete()) {
- //menu.add(getDeleteAction());
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getDeleteAction());
- ((ISystemAction) getDeleteAction()).setInputs(getShell(), this, selection);
- menu.add(new Separator());
- }
-
-
-
-
-
- // PROPERTIES ACTION...
- // This is supplied by the system, so we pretty much get it for free. It finds the
- // registered propertyPages extension points registered for the selected object's class type.
- //propertyDialogAction.selectionChanged(selection);
-
- if (!selectionIsRemoteObject) // is not a remote object
- {
- PropertyDialogAction pdAction = getPropertyDialogAction();
-
- if (pdAction.isApplicableForSelection()) menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
-
-
- // GO INTO ACTION...
- // OPEN IN NEW WINDOW ACTION...
- if (fromSystemViewPart && showOpenViewActions()) {
-
-
- GoIntoAction goIntoAction = getGoIntoAction();
- goIntoAction.setEnabled(selection.size() == 1);
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_GOTO, goIntoAction);
-
- SystemOpenExplorerPerspectiveAction openToPerspectiveAction = getOpenToPerspectiveAction();
- openToPerspectiveAction.setSelection(selection);
- menu.appendToGroup(openToPerspectiveAction.getContextMenuGroup(), openToPerspectiveAction);
-
- if (showGenericShowInTableAction()) {
-
-
- SystemShowInTableAction showInTableAction = getShowInTableAction();
- showInTableAction.setSelection(selection);
- menu.appendToGroup(openToPerspectiveAction.getContextMenuGroup(), showInTableAction);
-
- SystemShowInMonitorAction showInMonitorAction = getShowInMonitorAction();
- showInMonitorAction.setSelection(selection);
- menu.appendToGroup(openToPerspectiveAction.getContextMenuGroup(), showInMonitorAction);
-
- }
-
-
- }
-
- } else // is a remote object
- {
- //Object firstSelection = selection.getFirstElement();
- //ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(firstSelection);
- //logMyDebugMessage(this.getClass().getName(), ": there is a remote adapter");
- SystemRemotePropertiesAction pdAction = getRemotePropertyDialogAction();
- if (pdAction.isApplicableForSelection()) menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- //else
- //logMyDebugMessage(this.getClass().getName(), ": but it is not applicable for selection");
- // --------------------------------------------------------------------------------------------------------------------
- // look for and add any popup menu actions registered via our org.eclipse.rse.core.popupMenus extension point...
- // --------------------------------------------------------------------------------------------------------------------
- if (fromSystemViewPart) // these require an IWorkbenchPart as a parameter, so we can't support them from within dialogs
- addObjectActions(ourMenu);
- }
-
-
- // GO TO CASCADING ACTIONS...
- if (fromSystemViewPart && (selectionIsRemoteObject || showOpenViewActions())) {
- SystemCascadingGoToAction gotoActions = getGoToActions();
- gotoActions.setSelection(selection);
- menu.appendToGroup(gotoActions.getContextMenuGroup(), gotoActions.getSubMenu());
- }
-
-
- }
-
- }
-
- /**
- * Contributes popup menu actions and submenus registered for the object type(s) in the current selection.
- * Patterned after addObjectActions in PopupMenuExtender class supplied by Eclipse.
- */
- protected void addObjectActions(SystemMenuManager menu) {
- if (SystemPopupMenuActionContributorManager.getManager().contributeObjectActions(getWorkbenchPart(), menu, this, null)) {
- //menu.add(new Separator());
- }
- }
-
- /**
- * Called when the context menu is about to open.
- * Calls {@link #fillContextMenu(IMenuManager)}
- */
- public void menuAboutToShow(IMenuManager menu) {
- if (!enabledMode) return;
- fillContextMenu(menu);
- if (!menuListenerAdded) {
- if (menu instanceof MenuManager) {
- Menu m = ((MenuManager) menu).getMenu();
- if (m != null) {
- menuListenerAdded = true;
- SystemViewMenuListener ml = new SystemViewMenuListener();
- if (messageLine != null) ml.setShowToolTipText(true, messageLine);
- m.addMenuListener(ml);
- }
- }
- }
- //System.out.println("Inside menuAboutToShow: menu null? "+( ((MenuManager)menu).getMenu()==null));
- }
-
- /**
- * Creates the Systems plugin standard groups in a context menu.
- */
- public static IMenuManager createStandardGroups(IMenuManager menu) {
- if (!menu.isEmpty()) return menu;
- // simply sets partitions in the menu, into which actions can be directed.
- // Each partition can be delimited by a separator (new Separator) or not (new GroupMarker).
- // Deleted groups are not used yet.
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_NEW)); // new->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GOTO)); // goto into, go->
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_EXPANDTO)); // expand to->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_EXPAND)); // expand, collapse
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPEN)); // open xxx
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPENWITH)); // open with->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_BROWSEWITH)); // open with->
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_WORKWITH)); // work with->
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_SHOW)); // show->type hierarchy, in-navigator
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_BUILD)); // build, rebuild, refresh
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CHANGE)); // update, change
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORGANIZE)); // rename,move,copy,delete,bookmark,refactoring
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORDER)); // move up, move down
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GENERATE)); // getters/setters, etc. Typically in editor
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_SEARCH)); // search
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CONNECTION)); // connection-related actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_STARTSERVER)); // start/stop remote server actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_IMPORTEXPORT)); // get or put actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADAPTERS)); // actions queried from adapters
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_VIEWER_SETUP)); // ? Probably View->by xxx, yyy
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_TEAM)); // Team
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_COMPAREWITH));
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_REPLACEWITH));
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_PROPERTIES)); // Properties
-
- return menu;
- }
-
- /**
- * protected helper method to add an Action to a given menu.
- * To give the action the opportunity to grey out, we call selectionChanged, but
- * only if the action implements ISelectionChangedListener
- */
- protected void menuAdd(MenuManager menu, IAction action) {
- if (action instanceof ISelectionChangedListener) ((ISelectionChangedListener) action).selectionChanged(new SelectionChangedEvent(this, getSelection()));
- }
-
- /**
- * Determines whether the view has an ancestor relation selection so
- * that actions can be enable/disabled appropriately.
- * For example, delete needs to be disabled when a parent and it's child
- * are both selected.
- * @return true if the selection has one or more ancestor relations
- */
- protected boolean hasAncestorRelationSelection() {
- return selectionHasAncestryRelationship();
- /*
- TreeItem[] elements = getTree().getSelection();
-
-
- //Item[] elements = getSelection(getControl());
- for (int i = 0; i < elements.length; i++) {
- TreeItem parentItem = elements[i];
- //for (int j = 0; j < elements.length; j++) {
- //if (j != i) {
- if (isAncestorOf(parentItem, elements))
- {
- return true;
- }
- //}
- // }
- }
- return false;
- */
- }
-
- /**
- * Handles selection changed in viewer.
- * Updates global actions.
- * Links to editor (if option enabled)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- selectionFlagsUpdated = false;
- _setList = new ArrayList();
- IStructuredSelection sel = (IStructuredSelection) event.getSelection();
- Object firstSelection = sel.getFirstElement();
- if (firstSelection == null) return;
-
- // added by Phil. Noticed Edit->Delete not enabled when it should be
- boolean enableDelete = true;
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
-
- while (enableDelete && elements.hasNext()) {
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (adapter == null) continue;
- if (enableDelete) enableDelete = adapter.showDelete(element) && adapter.canDelete(element);
- }
- //System.out.println("Enabling delete action: "+enableDelete);
- //System.out.println("Enabling selectAll action: "+enableSelectAll(sel));
- ((SystemCommonDeleteAction) getDeleteAction()).setEnabled(enableDelete);
- ((SystemCommonSelectAllAction) getSelectAllAction()).setEnabled(enableSelectAll(sel)); // added by Phil. Noticed Edit->Select All not enabled when it should be
-
- ISystemViewElementAdapter adapter = getAdapter(firstSelection);
- if (adapter != null) {
- displayMessage(adapter.getStatusLineText(firstSelection));
- if ((mouseButtonPressed == LEFT_BUTTON) && (!expandingTreeOnly)) //d40615
- adapter.selectionChanged(firstSelection); //d40615
- } else
- clearMessage();
- //System.out.println("Inside selectionChanged in SystemView");
- expandingTreeOnly = false; //d40615
- if (debugProperties) {
- ISystemRemoteElementAdapter element = getRemoteAdapter(firstSelection);
- if (element == null)
- return;
- else {
- logMyDebugMessage(this.getClass().getName(), ": -----------------------------------------------------------"); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE SSFID.......: " + element.getSubSystemConfigurationId(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE NAME........: " + element.getName(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE TYPECATEGORY: " + element.getRemoteTypeCategory(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE TYPE........: " + element.getRemoteType(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE SUBTYPE.....: " + element.getRemoteSubType(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE SUBSUBTYPE..: " + element.getRemoteSubSubType(firstSelection)); //$NON-NLS-1$
- }
- }
- }
-
- protected void logMyDebugMessage(String prefix, String msg) {
- if (!debugProperties) return;
- //RSEUIPlugin.logDebugMessage(prefix, msg);
- System.out.println(prefix + " " + msg); //$NON-NLS-1$
- }
-
- /**
- * Convenience method for returning the shell of this viewer.
- */
- public Shell getShell() {
- //return shell;
- return getTree().getShell();
- }
-
- /**
- * Helper method to determine if a given object is currently selected.
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isSelected(Object element) {
- return isSelected(element, (IStructuredSelection) getSelection());
- }
-
- /**
- * Helper method to determine if a given tree item is currently selected.
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isTreeItemSelected(Widget w) {
- boolean match = false;
- TreeItem[] items = getTree().getSelection();
- if ((items != null) && (items.length > 0)) {
- for (int idx = 0; !match && (idx < items.length); idx++)
- if (items[idx] == w) match = true;
- }
- return match;
- }
-
- /**
- * Helper method to determine if any of a given array of objects is currently selected
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isSelected(Object[] elementArray) {
- return isSelected(elementArray, (IStructuredSelection) getSelection());
- }
-
- /**
- * Helper method to determine if a given object is in given selection
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isSelected(Object element, IStructuredSelection selection) {
- boolean isSelected = false;
- Iterator elements = selection.iterator();
- while (!isSelected && elements.hasNext()) {
- if (element.equals(elements.next())) isSelected = true;
- }
- return isSelected;
- }
-
- /**
- * Helper method to determine if any of a given array of objects is in given selection
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isSelected(Object[] elementArray, IStructuredSelection selection) {
- boolean isSelected = false;
- Iterator elements = selection.iterator();
- while (!isSelected && elements.hasNext()) {
- Object nextSelection = elements.next();
- for (int idx = 0; !isSelected && (idx < elementArray.length); idx++) {
- if (elementArray[idx].equals(nextSelection)) isSelected = true;
- }
- }
- return isSelected;
- }
-
- /**
- * Helper method to determine if a given object is currently selected.
- * Does consider if a child node of the given object is currently selected.
- */
- protected boolean isSelectedOrChildSelected(Object[] parentElements) {
- boolean isSelected = false;
- if ((parentElements == null) || (parentElements.length == 0)) return false;
- for (int idx = 0; !isSelected && (idx < parentElements.length); idx++)
- isSelected = isSelectedOrChildSelected(parentElements[idx]);
- return isSelected;
- }
-
- protected boolean searchToRoot(TreeItem selectedItem, TreeItem searchItem) {
- boolean found = false;
- boolean done = false;
- while (!found && !done) {
- if (selectedItem == searchItem)
- found = true;
- else {
- if (selectedItem != null)
- {
- selectedItem = selectedItem.getParentItem();
- if (selectedItem == null) done = true;
- }
- }
- }
- return found;
- }
-
- /**
- * Called after tree item collapsed. Updates the children of the tree item being
- * collapsed by removing the widgets associated with any transient message objects
- * that were in the tree.
- * @param event the event that caused the collapse. The event data will include the
- * tree element being collapsed.
- */
- public void treeCollapsed(TreeExpansionEvent event) {
- final Object element = event.getElement(); // get parent node being collapsed
- // we always allow adapters opportunity to show a different icon depending on collapsed state
- getShell().getDisplay().asyncExec(new Runnable() {
- public void run() {
- String[] allProps = {IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE};
- update(element, allProps); // for refreshing non-structural properties in viewer when model changes
- }
- });
- }
-
- /**
- * Called after tree item expanded.
- * We need this hook to potentially undo user expand request.
- * @param event the SWT TreeExpansionEvent that caused the expansion.
- */
- public void treeExpanded(TreeExpansionEvent event) {
- expandingTreeOnly = true;
- final Object element = event.getElement();
- // we always allow adapters opportunity to show a different icon depending on expanded state
- getShell().getDisplay().asyncExec(new Runnable() {
- public void run() {
- updatePropertySheet();
- String[] allProps = { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
- update(element, allProps); // for refreshing non-structural properties in viewer when model changes
- }
- });
- }
-
- /* (non-Javadoc)
- * Here only for observability.
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#handleTreeCollapse(org.eclipse.swt.events.TreeEvent)
- */
- protected void handleTreeCollapse(TreeEvent event) {
- super.handleTreeCollapse(event);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#handleTreeExpand(org.eclipse.swt.events.TreeEvent)
- */
- protected void handleTreeExpand(TreeEvent event) {
- TreeItem item = (TreeItem) event.item;
- // Remove any transient messages prior to finding children. They will be regenerated if they are needed.
- Item[] children = getItems(item);
- if (children != null) {
- for (int i = 0; i < children.length; i++) {
- Item child = children[i];
- Object data = child.getData();
- if (data instanceof ISystemMessageObject) {
- ISystemMessageObject message = (ISystemMessageObject) data;
- if (message.isTransient()) {
- remove(message);
- }
- }
- }
- }
- Shell shell = getShell();
- Object data = item.getData();
- boolean isTiming = (data != null) && doTimings;
- boolean showBusy = (data instanceof IHost) && ((IHost)data).isOffline();
- if (isTiming) elapsedTime.setStartTime();
- if (showBusy) SystemPromptDialog.setDisplayCursor(shell, busyCursor);
- super.handleTreeExpand(event);
- if (showBusy) SystemPromptDialog.setDisplayCursor(shell, null);
- if (isTiming) {
- elapsedTime.setEndTime();
- System.out.println("Time to expand for " + item.getItemCount() + " items: " + elapsedTime); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Clear current selection. Ignore widget disposed message.
- */
- protected void clearSelection() {
- try {
- setSelection((ISelection) null);
- } catch (Exception exc) {
- }
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o) {
-
- ISystemViewInputProvider provider = getInputProvider();
-
- // should never be null, but we check just to be safe
- // the input provider should be set because for things like connections, the select
- // dialogs may set a different input provider for the connection adapter which is subsequently
- // not updated when selecting a connection in the Remote Systems view.
- // This ensures that the input provider for the Remote Systems view is set for the adapter.
- if (provider != null) {
- return SystemAdapterHelpers.getAdapter(o, this, provider);
- } else {
- return SystemAdapterHelpers.getAdapter(o, this);
- }
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o) {
- return SystemAdapterHelpers.getRemoteAdapter(o, this);
- }
-
- /**
- *
- */
- public void handleDispose(DisposeEvent event) {
- //if (debug)
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Inside handleDispose for SystemView");
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this);
- busyCursor.dispose();
- super.handleDispose(event);
- }
-
- /**
- * Return the connection of the selected object, whatever it is.
- */
- public IHost getSelectedConnection() {
- Object firstSelection = ((StructuredSelection) getSelection()).getFirstElement();
- if (firstSelection == null)
- return null;
- else if (firstSelection instanceof IHost)
- return (IHost) firstSelection;
- else if (firstSelection instanceof ISubSystem)
- return ((ISubSystem) firstSelection).getHost();
- else if (firstSelection instanceof ISystemFilterPoolReference)
- return ((ISubSystem) (((ISystemFilterPoolReference) firstSelection).getProvider())).getHost();
- else if (firstSelection instanceof ISystemFilterReference)
- return ((ISubSystem) (((ISystemFilterReference) firstSelection).getProvider())).getHost();
- else if (getRemoteAdapter(firstSelection) != null) {
- ISubSystem ss = getRemoteAdapter(firstSelection).getSubSystem(firstSelection);
- if (ss != null)
- return ss.getHost();
- else
- return null;
- } else
- return null;
- }
-
- /**
- * We override getSelection(Control) so that a list of items
- * under the same parent always gets returned in the order in which
- * they appear in the tree view. Otherwise, after a "move up" or
- * "move down", the order of selection can come back wrong.
- */
- protected Item[] getSelection(Control widget) {
- Tree tree = (Tree) widget;
- Item[] oldResult = tree.getSelection();
- if (oldResult != null && oldResult.length > 0) {
- if (oldResult[0] instanceof TreeItem) {
- Widget parentItem = ((TreeItem) oldResult[0]).getParentItem();
- if (parentItem == null) {
- parentItem = tree;
- }
- if (itemsShareParent(parentItem, oldResult)) {
- Item[] newResult = sortSelection(parentItem, oldResult);
- return newResult;
- }
- }
- }
- return oldResult;
- }
-
- protected boolean itemsShareParent(Widget parentItem, Item[] items) {
- for (int i = 0; i < items.length; i++) {
- Widget itemParent = ((TreeItem) items[i]).getParentItem();
- if (parentItem instanceof TreeItem) {
- if (itemParent != parentItem) {
- return false;
- }
- } else if (itemParent != null) {
- return false;
- }
- }
-
- return true;
- }
-
- protected Item[] sortSelection(Widget parentItem, Item[] oldResult) {
- Item[] newResult = new Item[oldResult.length];
- Item[] children = null;
- if (parentItem instanceof Item) {
- if (oldResult == null)
- children = getItems((Item) parentItem);
- else
- children = oldResult;
- } else
- children = getChildren(parentItem);
- /*
- for (int i = 0; i < oldResult.length; i++)
- {
- Item first = removeFirstItem(oldResult, children);
- newResult[i] = first;
- }
-
- return newResult;
- */
- return oldResult;
- }
-
- protected Item removeFirstItem(Item[] items, Item[] children) {
- int firstIndex = 0;
- Item firstItem = null;
- int firstItemPosition = 0;
-
-
- if (items != null)
- {
- for (int i = 0; i < items.length; i++) {
- if (items[i] != null)
- {
- Item current = items[i];
- int position = getTreeItemPosition(current, children);
-
- if (firstItem == null || position < firstItemPosition) {
- firstItem = current;
- firstItemPosition = position;
- firstIndex = i;
- }
- }
- }
-
- items[firstIndex] = null;
- }
- return firstItem;
- }
-
-
- /**
- * Move one tree item to a new location
- */
- protected void moveTreeItem(Widget parentItem, Item item, Object src, int newPosition) {
- if (getExpanded(item)) {
- setExpanded(item, false);
- refresh(src); // flush items from memory
- }
-
- createTreeItem(parentItem, src, newPosition);
-
- //createTreeItem(parentItem, (new String("New")), newPosition);
- //remove(src);
-
- disassociate(item);
- item.dispose();
- // TODO: make this work so the selection order doesn't get screwed up!
- }
-
- /**
- * Move existing items a given number of positions within the same node.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- */
- protected void moveTreeItems(Widget parentItem, Object[] src, int delta) {
- int[] oldPositions = new int[src.length];
- Item[] oldItems = new Item[src.length];
-
- for (int idx = 0; idx < src.length; idx++)
- oldItems[idx] = (Item) internalFindRelativeItem(parentItem, src[idx], 1);
-
- Item[] children = null;
- if (parentItem instanceof Item) {
- children = getItems((Item) parentItem);
- } else
- children = getChildren(parentItem);
-
- for (int idx = 0; idx < src.length; idx++)
- {
- oldPositions[idx] = getTreeItemPosition(oldItems[idx], children) + 1;
- }
-
- if (delta > 0) // moving down, process backwards
- {
- for (int idx = src.length - 1; idx >= 0; idx--) {
- moveTreeItem(parentItem, oldItems[idx], src[idx], oldPositions[idx] + delta);
- }
- } else // moving up, process forewards
- {
- for (int idx = 0; idx < src.length; idx++) {
- moveTreeItem(parentItem, oldItems[idx], src[idx], oldPositions[idx] + delta - 1);
- }
- }
- }
-
-
-
- /**
- * Get the position of a tree item within its parent
- */
- /*
- protected int getTreeItemPosition(Widget parentItem, Item childItem, Item[] items) {
- int pos = -1;
- Item[] children = null;
- if (parentItem instanceof Item) {
- if (items == null)
- children = getItems((Item) parentItem);
- else
- children = items;
- } else
- children = getChildren(parentItem);
- for (int idx = 0; (pos == -1) && (idx < children.length); idx++) {
- if (children[idx] == childItem) pos = idx;
- }
- return pos;
- }
- */
-
-
- /**
- * Get the position of a tree item within its parent
- */
- protected int getTreeItemPosition(Item childItem, Item[] children) {
- int pos = -1;
- for (int idx = 0; (pos == -1) && (idx < children.length); idx++) {
- if (children[idx] == childItem) pos = idx;
- }
- return pos;
- }
-
- /**
- * Expand a given filter, given a subsystem that contains a reference to the filter's pool.
- * This will expand down to the filter if needed
- * @param parentSubSystem - the subsystem containing a reference to the filter's parent pool
- * @param filter - the filter to find, reveal, and expand within the subsystem context
- * @return the filter reference to the filter if found and expanded. This is a unique binary address
- * within the object's in this tree, so can be used in the viewer methods to affect this particular
- * node.
- */
- public ISystemFilterReference revealAndExpand(ISubSystem parentSubSystem, ISystemFilter filter) {
- setExpandedState(parentSubSystem.getHost(), true); // expand the connection
- setExpandedState(parentSubSystem, true); // expand the subsystem
- Object filterParentInTree = parentSubSystem; // will be case unless in show filter pool mode
- // if showing filter pools, expand parent filter pool reference...
- if (SystemPreferencesManager.getPreferencesManager().getShowFilterPools()) {
- ISystemFilterPoolReference poolRef = parentSubSystem.getFilterPoolReferenceManager().getReferenceToSystemFilterPool(filter.getParentFilterPool());
- setExpandedState(poolRef, true);
- filterParentInTree = poolRef;
- }
- // now, find the filter reference, and expand it...
- Widget parentItem = findItem(filterParentInTree); // find tree widget of parent
- if ((parentItem == null) || !(parentItem instanceof Item)) return null;
- TreeItem child = (TreeItem) internalFindReferencedItem(parentItem, filter, 1);
- if (child == null) return null;
- // found it! Now expand it...
- setExpandedState(child.getData(), true);
- return (ISystemFilterReference) child.getData();
- }
-
- // ------------------------------------
- // ISYSTEMRESOURCEChangeListener METHOD
- // ------------------------------------
-
- /**
- * Called when something changes in the model
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event) {
- ResourceChangedJob job = new ResourceChangedJob(event, this);
- job.setPriority(Job.INTERACTIVE);
- //job.setUser(true);
- job.schedule();
- /*
- Display display = Display.getCurrent();
- try {
- while (job.getResult() == null) {
- while (display != null && display.readAndDispatch()) {
- //Process everything on event queue
- }
- if (job.getResult() == null) Thread.sleep(200);
- }
- } catch (InterruptedException e) {
- }
- */
- }
-
- /**
- * Inner class which extends UIJob to connect this connection
- * on the UI Thread when no Shell is available from
- * the caller
- */
- public class ResourceChangedJob extends UIJob {
-
- protected ISystemResourceChangeEvent _event;
- protected SystemView _originatingViewer;
-
- public ResourceChangedJob(ISystemResourceChangeEvent event, SystemView originatingViewer) {
- super("Resource Changed..."); //$NON-NLS-1$
- _originatingViewer = originatingViewer;
- _event = event;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- int type = _event.getType();
- Object src = _event.getSource();
- Object parent = _event.getParent();
-
- String[] properties = new String[1];
- if (parent == RSEUIPlugin.getTheSystemRegistry()) parent = inputProvider;
- ISubSystem ss = null;
- Widget item = null;
- Widget parentItem = null;
- Object[] multiSource = null;
- Object previous = null;
- if (_event.getViewerItem() instanceof TreeItem)
- inputTreeItem = (TreeItem) _event.getViewerItem();
- else
- inputTreeItem = null;
- boolean wasSelected = false;
- boolean originatedHere = (_event.getOriginatingViewer() == null) || (_event.getOriginatingViewer() == _originatingViewer);
-
- //logDebugMsg("INSIDE SYSRESCHGD: " + type + ", " + src + ", " + parent);
- switch (type) {
- // SPECIAL CASES: ANYTHING TO DO WITH FILTERS!!
- case EVENT_RENAME_FILTER_REFERENCE:
- case EVENT_CHANGE_FILTER_REFERENCE:
- findAndUpdateFilter(_event, type);
- break;
- case EVENT_CHANGE_FILTERSTRING_REFERENCE:
- findAndUpdateFilterString(_event, type);
- break;
-
- case EVENT_ADD_FILTERSTRING_REFERENCE:
- case EVENT_DELETE_FILTERSTRING_REFERENCE:
- case EVENT_MOVE_FILTERSTRING_REFERENCES:
- //findAndUpdateFilterStringParent(event, type);
- //break;
- case EVENT_ADD_FILTER_REFERENCE:
- case EVENT_DELETE_FILTER_REFERENCE:
- case EVENT_MOVE_FILTER_REFERENCES:
- // are we a secondary perspective, and our input or parent of our input was deleted?
- if (((type == EVENT_DELETE_FILTERSTRING_REFERENCE) || (type == EVENT_DELETE_FILTER_REFERENCE)) && affectsInput(src)) {
- close();
- return Status.OK_STATUS;
- }
-
- findAndUpdateFilterParent(_event, type);
- break;
-
- case EVENT_ADD:
- case EVENT_ADD_RELATIVE:
- if (debug) {
- logDebugMsg("SV event: EVENT_ADD "); //$NON-NLS-1$
- }
- clearSelection();
- //refresh(parent);
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem)) {
- refresh(parent); // flush cached stuff so next call will show new item
- } else if ((parentItem instanceof Item) || // regular node
- (parent == inputProvider)) // root node. Hmm, hope this is going to work in all cases
- {
- boolean addingConnection = (src instanceof IHost);
- //System.out.println("ADDING CONNECTIONS.........................: " + addingConnection);
- //System.out.println("event.getParent() instanceof SystemRegistry: " + (event.getParent() instanceof SystemRegistry));
- //System.out.println("inputProvider.showingConnections().........: " + (inputProvider.showingConnections()));
- if ((parent == inputProvider) && addingConnection && (_event.getParent() instanceof ISystemRegistry) && !inputProvider.showingConnections()) return Status.OK_STATUS; // only reflect new connections in main perspective. pc42742
- int pos = -1;
- if (type == EVENT_ADD_RELATIVE) {
- previous = _event.getRelativePrevious();
- if (previous != null) pos = getItemIndex(parentItem, previous);
- if (pos >= 0) pos++; // want to add after previous
- } else
- pos = _event.getPosition();
- //logDebugMsg("ADDING CONN? "+ addingConnection + ", position="+pos);
- createTreeItem(parentItem, src, pos);
- setSelection(new StructuredSelection(src), true);
- }
- break;
- case EVENT_ADD_MANY:
- if (debug) {
- logDebugMsg("SV event: EVENT_ADD_MANY"); //$NON-NLS-1$
- }
- multiSource = _event.getMultiSource();
- clearSelection();
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem)) {
- refresh(parent); // flush cached stuff so next call will show new items
- } else if (multiSource.length > 0) {
- boolean addingConnections = (multiSource[0] instanceof IHost);
- // are we restoring connections previously removed due to making a profile inactive,
- // and is one of these connections the one we were opened with?
- if (addingConnections && (_event.getParent() instanceof ISystemRegistry) && (inputProvider instanceof SystemEmptyListAPIProviderImpl)) {
- boolean done = false;
- for (int idx = 0; !done && (idx < multiSource.length); idx++) {
- if (multiSource[idx] == previousInputConnection) {
- done = true;
- setInputProvider(previousInputProvider);
- previousInput = null;
- previousInputProvider = null;
- }
- }
- if (done) return Status.OK_STATUS;
- }
- // are we adding connections and yet we are not a secondary perspective?
- // If so, this event does not apply to us.
- else if (addingConnections && (_event.getParent() instanceof ISystemRegistry) && !inputProvider.showingConnections()) return Status.OK_STATUS;
-
- for (int idx = 0; idx < multiSource.length; idx++) {
- if (debug && addingConnections) logDebugMsg("... new connection " + ((IHost) multiSource[idx]).getAliasName()); //$NON-NLS-1$
- createTreeItem(parentItem, multiSource[idx], -1);
- }
- setSelection(new StructuredSelection(multiSource), true);
- }
- break;
- case EVENT_REPLACE_CHILDREN:
- if (debug) {
- logDebugMsg("SV event: EVENT_REPLACE_CHILDREN"); //$NON-NLS-1$
- }
- multiSource = _event.getMultiSource();
- //logDebugMsg("MULTI-SRC LENGTH : " + multiSource.length);
- clearSelection();
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if (multiSource.length > 0 && parentItem instanceof Item) {
- getControl().setRedraw(false);
- collapseNode(parent, true); // collapse and flush gui widgets from memory
- //setExpandedState(parent, true); // expand the parent
- setExpanded((Item) parentItem, true); // expand the parent without calling resolveFilterString
- TreeItem[] kids = ((TreeItem) parentItem).getItems(); // any kids? Like a dummy node?
- if (kids != null) for (int idx = 0; idx < kids.length; idx++)
- kids[idx].dispose();
- //boolean addingConnections = (multiSource[0] instanceof SystemConnection);
- for (int idx = 0; idx < multiSource.length; idx++) {
- //if (debug && addingConnections)
- // logDebugMsg("... new connection " + ((SystemConnection)multiSource[idx]).getAliasName());
- createTreeItem(parentItem, multiSource[idx], -1);
- }
- getControl().setRedraw(true);
- //setSelection(new StructuredSelection(multiSource),true);
- }
- break;
- case EVENT_CHANGE_CHILDREN:
- if (debug) {
- logDebugMsg("SV event: EVENT_CHANGE_CHILDREN. src=" + src + ", parent=" + parent); //$NON-NLS-1$ //$NON-NLS-2$
- //Exception e = new Exception();
- //e.fillInStackTrace();
- //e.printStackTrace();
- }
- // I HAVE DECIDED TO CHANGE THE SELECTION ALGO TO ONLY RESELECT IF THE CURRENT
- // SELECTION IS A CHILD OF THE PARENT... PHIL
- boolean wasSrcSelected = false;
- if (src != null) {
- wasSrcSelected = isSelectedOrChildSelected(src);
- //System.out.println("WAS SELECTED? " + wasSrcSelected);
- }
- item = findItem(parent);
- //logDebugMsg(" parent = " + parent);
- //logDebugMsg(" item = " + item);
- // INTERESTING BUG HERE. GETEXPANDED WILL RETURN TRUE IF THE TREE ITEM HAS EVER BEEN
- // EXPANDED BUT IS NOW COLLAPSED! I CANNOT FIND ANY API IN TreeItem or TreeViewer THAT
- // WILL TELL ME IF A TREE ITEM IS SHOWING OR NOT!
- if ((item != null) && (item instanceof TreeItem) && ((TreeItem) item).getExpanded()) {
- if (wasSrcSelected) {
- //System.out.println("...Clearing selection");
- clearSelection();
- }
- //refresh(parent);
- if (debug) System.out.println("Found item and it was expanded for " + parent); //$NON-NLS-1$
- getControl().setRedraw(false);
- collapseNode(parent, true); // collapse and flush gui widgets from memory
- setExpandedState(parent, true); // expand the parent
- getControl().setRedraw(true);
- if (wasSrcSelected) {
- //System.out.println("Setting selection to " + src);
- setSelection(new StructuredSelection(src), true);
- }
- } else
- collapseNode(parent, true);
- break;
- case EVENT_DELETE:
- if (debug) logDebugMsg("SV event: EVENT_DELETE "); //$NON-NLS-1$
- // are we a secondary perspective, and our input or parent of our input was deleted?
- if (affectsInput(src)) {
- close();
- return Status.OK_STATUS;
- }
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem))
- refresh(parent); // flush memory
- else {
- wasSelected = isSelectedOrChildSelected(src);
- if (wasSelected) clearSelection();
- _originatingViewer.remove(src);
- if (wasSelected) setSelection(new StructuredSelection(parent), true);
- }
- break;
-
- case EVENT_DELETE_MANY:
- if (debug) logDebugMsg("SV event: EVENT_DELETE_MANY "); //$NON-NLS-1$
- multiSource = _event.getMultiSource();
- // are we a secondary perspective, and our input or parent of our input was deleted?
- if (affectsInput(multiSource)) {
- close();
- return Status.OK_STATUS;
- }
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem))
- refresh(parent); // flush memory
- else if (parentItem instanceof Tree) {
- refresh();
- } else {
- wasSelected = isSelectedOrChildSelected(multiSource);
- if (wasSelected) clearSelection();
- if (_originatingViewer != null) _originatingViewer.remove(multiSource);
- if (wasSelected) setSelection(new StructuredSelection(parent), true);
- }
- break;
- /* Now done below in systemRemoteResourceChanged
- case EVENT_DELETE_REMOTE:
- if (debug)
- logDebugMsg("SV event: EVENT_DELETE_REMOTE ");
- deleteRemoteObject(src);
- break;
-
- case EVENT_DELETE_REMOTE_MANY:
- // multi-source: array of objects to delete
- if (debug)
- logDebugMsg("SV event: EVENT_DELETE_REMOTE_MANY ");
- multiSource = event.getMultiSource();
- //remoteItemsToSkip = null; // reset
- if ((multiSource == null) || (multiSource.length==0))
- return;
- for (int idx=0; idx<multiSource.length; idx++)
- deleteRemoteObject(multiSource[idx]);
- break;
- */
- case EVENT_RENAME:
- if (debug) logDebugMsg("SV event: EVENT_RENAME "); //$NON-NLS-1$
- properties[0] = IBasicPropertyConstants.P_TEXT;
- update(src, properties); // for refreshing non-structural properties in viewer when model changes
- updatePropertySheet();
- break;
- /* Now done below in systemRemoteResourceChanged
- case EVENT_RENAME_REMOTE:
- // SRC: the updated remote object, after the rename
- // PARENT: the String from calling getAbsoluteName() on the remote adapter BEFORE updating the remote object's name
- if (debug)
- logDebugMsg("SV event: EVENT_RENAME_REMOTE ");
-
- renameRemoteObject(src, (String)parent);
- break;
- */
- case EVENT_ICON_CHANGE:
- if (debug) logDebugMsg("SV event: EVENT_ICON_CHANGE "); //$NON-NLS-1$
-
- if (initViewerFilters != null && initViewerFilters.length > 0) {
- Widget w = findItem(src);
- if (w == null) {
- refresh(parent);
- } else {
- properties[0] = IBasicPropertyConstants.P_IMAGE;
- update(src, properties); // for refreshing non-structural properties in viewer when model changes
-
- }
- } else {
- properties[0] = IBasicPropertyConstants.P_IMAGE;
- update(src, properties); // for refreshing non-structural properties in viewer when model changes
- }
-
- //updatePropertySheet();
- break;
- //case EVENT_CHANGE:
- //if (debug)
- //logDebugMsg("SV event: EVENT_CHANGE ");
- //refresh(src); THIS IS AN EVIL OPERATION: CAUSES ALL EXPANDED NODES TO RE-REQUEST THEIR CHILDREN. OUCH!
- //updatePropertySheet();
- //break;
- case EVENT_REFRESH:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH "); //$NON-NLS-1$
- //if (src != null)
- // refresh(src); // ONLY VALID WHEN USER TRULY WANTS TO REQUERY CHILDREN FROM HOST
- //else
- // refresh(); // refresh entire tree
- if ((src == null) || (src == RSEUIPlugin.getTheSystemRegistry()))
- refreshAll();
- else {
- //smartRefresh(src, false);
- smartRefresh(src, true);
- }
- updatePropertySheet();
- break;
- // refresh the parent of the currently selected items.
- // todo: intelligently re-select previous selections
- case EVENT_REFRESH_SELECTED_PARENT:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH_SELECTED_PARENT "); //$NON-NLS-1$
- TreeItem[] items = getTree().getSelection();
- if ((items != null) && (items.length > 0) && (items[0] != null)) {
- //System.out.println("Selection not empty");
- parentItem = getParentItem(items[0]); // get parent of first selection. Only allowed to select items of same parent.
- if ((parentItem != null) && (parentItem instanceof Item)) {
- //System.out.println("parent of selection not empty: "+parentItem.getData());
- smartRefresh(new TreeItem[] { (TreeItem) parentItem });
- }
- //else
- //System.out.println("parent of selection is empty");
- }
- //else
- //System.out.println("Selection is empty");
- break;
- case EVENT_REFRESH_SELECTED:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH_SELECTED "); //$NON-NLS-1$
- IStructuredSelection selected = (IStructuredSelection) getSelection();
- Iterator i = selected.iterator();
- // the following is a tweak. Refresh only re-queries the children. If the selected item has no
- // childen, then refresh does nothing. Instead of that outcome, we re-define it to mean refresh
- // the parent. The tricky part is to prevent multiple refreshes on multiple selections so we have
- // to pre-scan for this scenario.
- // We also want to re-select any remote objects currently selected. They lose their selection as their
- // memory address changes.
- Item parentElementItem = null;
- Vector selectedRemoteObjects = new Vector();
- items = getTree().getSelection();
- int itemIdx = 0;
- SystemElapsedTimer timer = null;
- if (doTimings) timer = new SystemElapsedTimer();
- //System.out.println("Inside EVENT_REFRESH_SELECTED. FIRST SELECTED OBJECT = " + items[0].handle);
- while (i.hasNext()) {
-
- Object element = i.next();
- ISystemViewElementAdapter adapter = _originatingViewer.getAdapter(element);
- if ((parentElementItem == null) && (adapter != null) && (!adapter.hasChildren(element))) {
- //parentItem = getParentItem((Item)findItem(element));
- parentItem = getParentItem(items[itemIdx]);
- if ((parentItem != null) && (parentItem instanceof Item)) parentElementItem = (Item) parentItem; //.getData();
- }
- if (getRemoteAdapter(element) != null) {
- selectedRemoteObjects.addElement(element);
- if (ss == null) ss = getRemoteAdapter(element).getSubSystem(element);
- }
- itemIdx++;
- }
- if (parentElementItem != null) {
- //refresh(parentElement);
- smartRefresh(new TreeItem[] { (TreeItem) parentElementItem });
- if (selectedRemoteObjects.size() > 0) {
- selectRemoteObjects(selectedRemoteObjects, ss, parentElementItem);
- }
- }
- // the following is another tweak. If an expanded object is selected for refresh, which has remote children,
- // and any of those children are expanded, then on refresh the resulting list may be in a different
- // order and the silly algorithm inside tree viewer will simply re-expand the children at the previous
- // relative position. If that position has changed, the wrong children are re-expanded!
- // How to fix this? Ugly code to get the query the list of expanded child elements prior to refresh,
- // collapse them, do the refresh, then re-expand them based on absolute name versus tree position.
- // Actually, to do this right we need to test if the children of the selected item are remote objects
- // versus just the selected items because they may have selected a filter!
- // We go straight the TreeItem level for performance and ease of programming.
- else {
- smartRefresh(getTree().getSelection());
- }
- if (doTimings && timer != null) {
- timer.setEndTime();
- System.out.println("Time to refresh selected: " + timer); //$NON-NLS-1$
- }
- //else
- //{
- //i = selected.iterator();
- //while (i.hasNext())
- //refresh(i.next());
- //}
-
- updatePropertySheet();
- break;
- case EVENT_REFRESH_SELECTED_FILTER:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH_SELECTED_FILTER "); //$NON-NLS-1$
- IStructuredSelection selectedItems = (IStructuredSelection) getSelection();
- Iterator j = selectedItems.iterator();
- // We climb up the tree here until we find a SystemFilterReference data member in the tree.
- // If we do find a reference of SystemFilterReference we refresh on it.
- // If we do not find a reference of SystemFilterReference we.....TODO: WHAT DO WE DO???
- // We also want to re-select any remote objects currently selected. They lose their selection as their
- // memory address changes.
- Item parentElemItem = null;
- Vector selRemoteObjects = new Vector();
- if (j.hasNext()) {
- Object element = j.next();
- ISystemViewElementAdapter adapter = _originatingViewer.getAdapter(element);
- if (adapter != null) {
- Item parItem = getParentItem((Item) findItem(element));
-
- if (parItem != null) parentElemItem = parItem; //.getData();
-
- while (parItem != null && !(parItem.getData() instanceof ISystemFilterReference)) {
- parItem = getParentItem(parItem);
-
- if (parItem != null) parentElemItem = parItem; //.getData();
- }
- }
- if (getRemoteAdapter(element) != null) {
- selRemoteObjects.addElement(element);
- ss = getRemoteAdapter(element).getSubSystem(element);
- }
- }
-
- if (parentElemItem != null && (parentElemItem.getData() instanceof ISystemFilterReference)) {
- smartRefresh(new TreeItem[] { (TreeItem) parentElemItem });
- if (selRemoteObjects.size() > 0) {
- selectRemoteObjects(selRemoteObjects, ss, parentElemItem);
- }
-
- updatePropertySheet();
- } else {
- // if we cannot find a parent element that has a system filter reference then we refresh
- // everything since the explorer must be within a filter
- _event.setType(ISystemResourceChangeEvents.EVENT_REFRESH);
- systemResourceChanged(_event);
- }
- break;
- case EVENT_REFRESH_REMOTE:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH_REMOTE: src = " + src); //$NON-NLS-1$
- refreshRemoteObject(src, parent, originatedHere);
- break;
- case EVENT_SELECT_REMOTE:
- if (debug) logDebugMsg("SV event: EVENT_SELECT_REMOTE: src = " + src); //$NON-NLS-1$
- //remoteItemsToSkip = null; // reset
- selectRemoteObjects(src, (ISubSystem) null, parent);
- break;
-
- case EVENT_MOVE_MANY:
- if (debug) logDebugMsg("SV event: EVENT_MOVE_MANY "); //$NON-NLS-1$
- multiSource = _event.getMultiSource();
- if ((multiSource == null) || (multiSource.length == 0)) return Status.OK_STATUS;
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem))
- refresh(parent); // flush memory
- else {
- clearSelection();
- moveTreeItems(parentItem, multiSource, _event.getPosition());
- setSelection(new StructuredSelection(multiSource), true);
- }
- break;
- case EVENT_PROPERTY_CHANGE:
- if (debug) logDebugMsg("SV event: EVENT_PROPERTY_CHANGE "); //$NON-NLS-1$
- String[] allProps = { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
- ISystemRemoteElementAdapter ra = getRemoteAdapter(src);
- if (ra != null) {
- updateRemoteObjectProperties(src);
- } else
- update(src, allProps); // for refreshing non-structural properties in viewer when model changes
- updatePropertySheet();
- break;
- case EVENT_PROPERTYSHEET_UPDATE:
- if (debug) logDebugMsg("SV event: EVENT_PROPERTYSHEET_UPDATE "); //$NON-NLS-1$
- updatePropertySheet();
- break;
- case EVENT_MUST_COLLAPSE:
- if (debug) logDebugMsg("SV event: EVENT_MUST_COLLAPSE "); //$NON-NLS-1$
- collapseNode(src, true); // collapse and flush gui widgets from memory
- break;
- case EVENT_COLLAPSE_ALL:
- if (debug) logDebugMsg("SV event: EVENT_COLLAPSE_ALL "); //$NON-NLS-1$
- collapseAll(); // collapse all
- if ((src != null) && (src instanceof String) && ((String) src).equals("false")) // defect 41203 //$NON-NLS-1$
- {
- } else
- refresh(); // flush gui widgets from memory
- break;
- case EVENT_COLLAPSE_SELECTED: // defect 41203
- if (debug) logDebugMsg("SV event: EVENT_COLLAPSE_SELECTED "); //$NON-NLS-1$
- collapseSelected();
- break;
- case EVENT_EXPAND_SELECTED: // defect 41203
- if (debug) logDebugMsg("SV event: EVENT_EXPAND_SELECTED "); //$NON-NLS-1$
- expandSelected();
- break;
-
- case EVENT_REVEAL_AND_SELECT:
- if (debug) logDebugMsg("SV event: EVENT_REVEAL_AND_SELECT "); //$NON-NLS-1$
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem)) {
- setExpandedState(parent, true);
- Object toSelect = src;
- //if (event.getMultiSource() != null)
- //toSelect = event.getMultiSource();
- //clearSelection();
- if (toSelect != null) {
- if (parent instanceof IRSEBaseReferencingObject) {
- TreeItem child = (TreeItem) internalFindReferencedItem(parentItem, toSelect, 1);
- if (child != null) toSelect = child.getData();
- } else if ((parent instanceof ISystemFilterPoolReferenceManagerProvider) && !(src instanceof IRSEBaseReferencingObject)) {
- // we are in "don't show filter pools" mode and a new filter was created
- // (we get the actual filter, vs on pool ref creation when we get the pool ref)
- TreeItem child = (TreeItem) internalFindReferencedItem(parentItem, toSelect, 1);
- if (child != null) toSelect = child.getData();
- }
- setSelection(new StructuredSelection(toSelect), true);
- }
- }
- break;
- case EVENT_SELECT:
- if (debug) logDebugMsg("SV event: EVENT_SELECT "); //$NON-NLS-1$
- item = findItem(src);
- if (item == null) // if not showing item, this is a no-op
- return Status.OK_STATUS;
- setSelection(new StructuredSelection(src), true);
- break;
- case EVENT_SELECT_EXPAND:
- if (debug) logDebugMsg("SV event: EVENT_SELECT_EXPAND "); //$NON-NLS-1$
- item = findItem(src);
- if (item == null) // if not showing item, this is a no-op
- return Status.OK_STATUS;
- if (!getExpanded((Item) item)) setExpandedState(src, true);
- setSelection(new StructuredSelection(src), true);
- break;
-
- }
- return Status.OK_STATUS;
- }
- }
-
- // ------------------------------------
- // ISYSTEMREMOTEChangeListener METHOD
- // ------------------------------------
-
- /**
- * This is the method in your class that will be called when a remote resource
- * changes. You will be called after the resource is changed.
- * @see org.eclipse.rse.model.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event) {
- int eventType = event.getEventType();
- Object remoteResourceParent = event.getResourceParent();
- Object remoteResource = event.getResource();
- boolean originatedHere = (event.getOriginatingViewer() == this);
- Vector remoteResourceNames = null;
- if (remoteResource instanceof Vector) {
- remoteResourceNames = (Vector) remoteResource;
- remoteResource = remoteResourceNames.elementAt(0);
- }
- getRemoteResourceAbsoluteName(remoteResourceParent); // DWD may not be necessary
- String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource);
- if (remoteResourceName == null) return;
-
- ISubSystem ss = getSubSystem(event, remoteResource, remoteResourceParent);
-
- Vector filterMatches = null;
-
- switch (eventType) {
- // --------------------------
- // REMOTE RESOURCE CHANGED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CHANGED:
- updatePropertySheet(); // just in case
- break;
- // --------------------------
- // REMOTE RESOURCE CREATED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED:
- // we can easily lose our original selection so we need save and restore it if needed
- Vector prevSelection = null;
- TreeItem parentSelectionItem = null;
- if (originatedHere) {
- prevSelection = getRemoteSelection();
- parentSelectionItem = getSelectedParentItem();
- }
-
- // when a new remote resource is created, we need to interrogate all filters
- // within connections to the same hostname, to see if the filter results are
- // affected by this change. If so, we refresh the filter.
- filterMatches = findAllRemoteItemFilterReferences(remoteResourceName, ss, null);
- ArrayList selectedFilters = null;
- if (filterMatches != null) {
- for (int idx = 0; idx < filterMatches.size(); idx++) {
- FilterMatch match = (FilterMatch) filterMatches.elementAt(idx);
- TreeItem filterItem = match.getTreeItem();
- if (isTreeItemSelected(filterItem)) // if this filter is currently selected, we will lose that selection!
- {
- if (selectedFilters == null) selectedFilters = new ArrayList();
- selectedFilters.add(filterItem);
- }
- smartRefresh(new TreeItem[] { filterItem }, null, true);
- }
- }
- // now, refresh all occurrences of the remote parent object.
- refreshRemoteObject(remoteResourceParent, null, false);
- // restore selected filters...
- if (selectedFilters != null) setSelection(selectedFilters);
- // if the create event originated here, then expand the selected node and
- // select the new resource under it.
- if (originatedHere) {
- // first, restore previous selection...
- if (prevSelection != null) selectRemoteObjects(prevSelection, ss, parentSelectionItem);
- TreeItem selectedItem = getFirstSelectedTreeItem();
- if (selectedItem != null) {
- if (!selectedItem.getExpanded()) // if the filter is expanded, then we already refreshed it...
- {
- createChildren(selectedItem);
- selectedItem.setExpanded(true);
- }
- if (remoteResourceNames != null)
- selectRemoteObjects(remoteResourceNames, ss, selectedItem);
- else
- selectRemoteObjects(remoteResourceName, ss, selectedItem);
- }
- //else
- //System.out.println("Hmm, nothing selected");
- }
- break;
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED:
- // delete all existing references to the remote object(s)...
- if (remoteResourceNames != null) {
- for (int idx = 0; idx < remoteResourceNames.size(); idx++)
- deleteRemoteObject(remoteResourceNames.elementAt(idx), ss);
- } else
- deleteRemoteObject(remoteResourceName, ss);
-
- // now, find all filters that either list this remote resource or list the contents of it,
- // if it is a container... for expediency we only test for the first resource, even if given
- // a list of them...
- filterMatches = findAllRemoteItemFilterReferences(remoteResourceName, ss, null);
- if (filterMatches != null) {
- for (int idx = 0; idx < filterMatches.size(); idx++) {
- FilterMatch match = (FilterMatch) filterMatches.elementAt(idx);
- TreeItem filterItem = match.getTreeItem();
- if (match.listsElement()) {
- // if the filter is expanded, we are ok. If not, we need to flush its memory...
- if (!getExpanded(filterItem)) refresh(filterItem.getData());
- } else // else this filter lists the contents of the deleted container element, so refresh it:
- {
- // if the filter is not expanded, we need to flush its memory...
- if (!getExpanded(filterItem))
- refresh(filterItem.getData());
- else
- // if the filter is expanded, we need to refresh it
- smartRefresh(new TreeItem[] { filterItem }, null, true);
- }
- }
- }
-
- break;
-
- // --------------------------
- // REMOTE RESOURCE RENAMED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED:
- // we can easily lose our original selection so we need save and restore it if needed
- prevSelection = null;
- parentSelectionItem = null;
- if (originatedHere) {
- prevSelection = getRemoteSelection();
- parentSelectionItem = getSelectedParentItem();
- }
-
- // rename all existing references to the remote object...
- renameRemoteObject(remoteResource, event.getOldName(), ss);
-
- // now, find all filters that list the contents of the OLD name container.
- filterMatches = findAllRemoteItemFilterReferences(event.getOldName(), ss, null);
- if (filterMatches != null) {
- for (int idx = 0; idx < filterMatches.size(); idx++) {
- FilterMatch match = (FilterMatch) filterMatches.elementAt(idx);
- TreeItem filterItem = match.getTreeItem();
- if (match.listsElementContents()) // this filter lists the contents of the renamed container element, so refresh it:
- {
- // if the filter is not expanded, we need only flush its memory...
- if (!getExpanded(filterItem))
- refresh(filterItem.getData());
- else
- // the filter is expanded, so refresh its contents. This will likely result in an empty list
- smartRefresh(new TreeItem[] { filterItem }, null, true);
- }
- }
- }
- // now, find all filters that list the contents of the NEW name container.
- filterMatches = findAllRemoteItemFilterReferences(remoteResourceName, ss, null);
- if (filterMatches != null) {
- for (int idx = 0; idx < filterMatches.size(); idx++) {
- FilterMatch match = (FilterMatch) filterMatches.elementAt(idx);
- TreeItem filterItem = match.getTreeItem();
- if (match.listsElementContents()) // this filter lists the contents of the renamed container element, so refresh it:
- {
- // if the filter is not expanded, we need only flush its memory...
- if (!getExpanded(filterItem))
- refresh(filterItem.getData());
- else
- // the filter is expanded, so refresh its contents. This will likely result in an empty list
- smartRefresh(new TreeItem[] { filterItem }, null, true);
- }
- }
- }
-
- // restore selection
- if (originatedHere && (prevSelection != null)) {
- selectRemoteObjects(prevSelection, ss, parentSelectionItem);
- updatePropertySheet(); // just in case
- }
- break;
- }
- }
-
- /**
- * Turn selection into an array of remote object names
- */
- protected Vector getRemoteSelection() {
- Vector prevSelection = null;
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator i = selection.iterator();
- while (i.hasNext()) {
- Object element = i.next();
- ISystemRemoteElementAdapter ra = getRemoteAdapter(element);
- if (ra != null) {
- if (prevSelection == null) prevSelection = new Vector();
- prevSelection.addElement(ra.getAbsoluteName(element));
- }
- }
- return prevSelection;
- }
-
- /**
- * Turn a given remote object reference into a fully qualified absolute name
- */
- protected String getRemoteResourceAbsoluteName(Object remoteResource) {
- if (remoteResource == null) return null;
- String remoteResourceName = null;
- if (remoteResource instanceof String)
- remoteResourceName = (String) remoteResource;
- else {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
- if (ra == null) return null;
- remoteResourceName = ra.getAbsoluteName(remoteResource);
- }
- return remoteResourceName;
- }
-
- /**
- * Deduce the subsystem from the event or remote object
- */
- protected ISubSystem getSubSystem(ISystemRemoteChangeEvent event, Object remoteResource, Object remoteParent) {
- if (event.getSubSystem() != null) return event.getSubSystem();
- ISubSystem ss = null;
- if ((remoteResource != null) && !(remoteResource instanceof String)) {
- if (remoteResource instanceof Vector) {
- Vector v = (Vector) remoteResource;
- if (v.size() > 0) ss = getSubSystem(event, v.elementAt(0), null);
- } else {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
- if (ra != null) ss = ra.getSubSystem(remoteResource);
- }
- }
- if ((ss == null) && (remoteParent != null) && !(remoteParent instanceof String)) {
- if (remoteParent instanceof Vector) {
- Vector v = (Vector) remoteParent;
- if (v.size() > 0) ss = getSubSystem(event, null, v.elementAt(0));
- } else {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteParent);
- if (ra != null) ss = ra.getSubSystem(remoteParent);
- }
- }
- return ss;
- }
-
- // ------------------------------------
- // MISCELLANEOUS METHODS...
- // ------------------------------------
-
- /**
- * Close us!
- */
- protected void close() {
- previousInputProvider = inputProvider;
- previousInput = getWorkbenchPart().getSite().getPage().getInput();
- ISystemViewInputProvider ip = new SystemEmptyListAPIProviderImpl();
- setInputProvider(ip);
- }
-
- /**
- * Test if the given input is our view's input object. This is designed to only
- * consider instances of ourself in non-primary perspectives.
- */
- protected boolean affectsInput(Object[] elements) {
- boolean affected = false;
- IWorkbenchPart viewPart = getWorkbenchPart();
- if ((viewPart != null) && (getInput() != RSEUIPlugin.getTheSystemRegistry()) && !(getInput() instanceof SystemEmptyListAPIProviderImpl)) {
- for (int idx = 0; !affected && (idx < elements.length); idx++)
- affected = affectsInput(elements[idx]);
- }
- return affected;
- }
-
- /**
- * Test if the given input is our view's input object. This is designed to only
- * consider instances of ourself in non-primary perspectives.
- */
- protected boolean affectsInput(Object element) {
- boolean affected = false;
- IWorkbenchPart viewPart = getWorkbenchPart();
- if ((viewPart != null) && (getInput() != RSEUIPlugin.getTheSystemRegistry()) && !(getInput() instanceof SystemEmptyListAPIProviderImpl)) {
-
- Object input = viewPart.getSite().getPage().getInput();
- if (input != null) {
- Object referencedElement = getReferencedObject(element);
- Object referencedInput = getReferencedObject(input);
- //System.out.println("TESTING1 " + input + " vs " + element);
- //System.out.println("TESTING2 " + referencedInput + " vs " + referencedElement);
- if ((input == element) || (referencedInput == referencedElement))
- affected = true;
- else {
- while (!affected && (input != null)) {
- input = getElementParent(input);
- if (input != null) {
- referencedInput = getReferencedObject(input);
- //System.out.println("...TESTING1 " + input + " vs " + element);
- //System.out.println("...TESTING2 " + referencedInput + " vs " + referencedElement);
- affected = ((input == element) || (referencedInput == referencedElement));
- }
- }
- }
- }
- }
- return affected;
- }
-
- protected Object getReferencedObject(Object inputObj) {
- if (inputObj instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference) inputObj).getReferencedFilterPool();
- else if (inputObj instanceof ISystemFilterReference)
- return ((ISystemFilterReference) inputObj).getReferencedFilter();
- else if (inputObj instanceof ISystemFilterStringReference)
- return ((ISystemFilterStringReference) inputObj).getReferencedFilterString();
- else
- return inputObj;
- }
-
- protected Object getElementParent(Object inputObj) {
- if (inputObj instanceof IHost)
- return ((IHost) inputObj).getSystemProfile();
- else if (inputObj instanceof ISubSystem)
- return ((ISubSystem) inputObj).getHost();
- else if (inputObj instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference) inputObj).getProvider(); // will be a subsystem
- else if (inputObj instanceof ISystemFilterPool)
- return ((ISystemFilterPool) inputObj).getProvider(); // will be a subsystem factory. Hmm!
- else if (inputObj instanceof ISystemFilterReference)
- return ((ISystemFilterReference) inputObj).getParent(); // will be filter reference or filter pool reference
- else if (inputObj instanceof ISystemFilter) {
- ISystemFilter filter = (ISystemFilter) inputObj;
- if (filter.getParentFilter() != null)
- return filter.getParentFilter();
- else
- return filter.getParentFilterPool();
- } else if (inputObj instanceof ISystemFilterStringReference)
- return ((ISystemFilterStringReference) inputObj).getParent(); // will be a SystemFilterReference
- else if (inputObj instanceof ISystemFilterString)
- return ((ISystemFilterString) inputObj).getParentSystemFilter();
- else
- return null;
- }
-
- protected IHost getInputConnection(Object inputObj) {
- if (inputObj instanceof IHost)
- return (IHost) inputObj;
- else if (inputObj instanceof ISubSystem)
- return ((ISubSystem) inputObj).getHost();
- else if (inputObj instanceof ISystemFilterPoolReference) {
- ISubSystem ss = (ISubSystem) ((ISystemFilterPoolReference) inputObj).getProvider(); // will be a subsystem
- if (ss == null) return null;
- return ss.getHost();
- } else if (inputObj instanceof ISystemFilterReference) {
- ISubSystem ss = (ISubSystem) ((ISystemFilterReference) inputObj).getProvider(); // will be a subsystem
- if (ss == null) return null;
- return ss.getHost();
- } else if (inputObj instanceof ISystemFilterStringReference) {
- ISubSystem ss = (ISubSystem) ((ISystemFilterStringReference) inputObj).getProvider(); // will be a subsystem
- if (ss == null) return null;
- return ss.getHost();
- } else
- return null;
- }
-
- /**
- * Handy debug method to print a tree item
- */
- protected String printTreeItem(Item item) {
- if (item == null)
- return ""; //$NON-NLS-1$
- else if (item instanceof TreeItem) {
- TreeItem ti = (TreeItem) item;
- return printTreeItem(ti.getParentItem()) + "/" + ti.getText(); //$NON-NLS-1$
- } else
- return item.toString();
- }
-
- /**
- * Delete all occurrences of a given remote object
- */
- protected void deleteRemoteObject(Object deleteObject, ISubSystem subsystem) {
- Vector matches = null;
- String oldElementName = null;
-
- // STEP 1: get the object's remote adapter and subsystem
- if (deleteObject instanceof String)
- oldElementName = (String) deleteObject;
- else {
- ISystemRemoteElementAdapter rmtAdapter = getRemoteAdapter(deleteObject);
- if (rmtAdapter == null) return;
- oldElementName = rmtAdapter.getAbsoluteName(deleteObject);
- subsystem = rmtAdapter.getSubSystem(deleteObject);
- }
- // STEP 2: find all references to the object
- matches = findAllRemoteItemReferences(oldElementName, deleteObject, subsystem, matches);
- if (matches == null) {
- //System.out.println("matches is null");
- return;
- }
-
- boolean wasSelected = false;
- Item parentItem = null;
-
- boolean dupes = false;
- Object prevData = null;
- for (int idx = 0; !dupes && (idx < matches.size()); idx++) {
- Item match = (Item) matches.elementAt(idx);
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- if (match.getData() == prevData)
- dupes = true;
- else
- prevData = match.getData();
- }
- }
- //System.out.println("matches size = " + matches.size() + ", any binary duplicates? " + dupes);
-
- // STEP 3: process all references to the object
- for (int idx = 0; idx < matches.size(); idx++) {
- Item match = (Item) matches.elementAt(idx);
- //System.out.println("...match " + idx + ": TreeItem? " + (match instanceof TreeItem) + ", disposed? " + ((TreeItem)match).isDisposed());
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- ((TreeItem) match).getParentItem(); // DWD may not be necessary
- Object data = match.getData();
- if (!wasSelected) {
- //wasSelected = isSelectedOrChildSelected(data);
- wasSelected = isTreeItemSelectedOrChildSelected(match);
- if (wasSelected) {
- clearSelection();
- parentItem = ((TreeItem) match).getParentItem();
- //System.out.println("...current item was selected");
- }
- }
- if (dupes) // defect 46818
- { // if there are multiple references to the same binary object, ...
- //System.out.println(".....calling refresh(data) on this match");
- /*
- if (pItem!=null)
- smartRefresh(new TreeItem[] {pItem}); // just refresh the parent node
- else
- refreshAll();
- */
- disassociate(match);
- match.dispose();
- } else {
- //System.out.println(".....calling remove(data) on this match");
- remove(data); // remove this item from the tree
- }
- }
- }
-
- // STEP 4: if we removed a selected item, select its parent
- if (wasSelected && (parentItem != null) && (parentItem instanceof TreeItem) && (parentItem.getData() != null)) {
- //System.out.println("Resetting selection to parent");
- setSelection(new StructuredSelection(parentItem.getData()), true);
- }
- return;
- }
-
- /**
- * Rename a remote object. Renames all references to it currently displayed in this tree.
- */
- protected void renameRemoteObject(Object renameObject, String oldElementName, ISubSystem subsystem) {
- String[] properties = new String[1];
- properties[0] = IBasicPropertyConstants.P_TEXT;
-
- // STEP 0: do we have the physical remote object that has been renamed? If so, update it directly
- /*
- Item item = (Item)findItem(renameObject);
- if (item != null)
- {
- update(renameObject, properties); // for refreshing non-structural properties in viewer when model changes
- if (item instanceof TreeItem)
- smartRefresh(new TreeItem[] {(TreeItem)item}); // we update the kids because they typically store references to their parent
- }
- */
-
- Vector matches = null;
-
- // STEP 1: get the object's remote adapter and subsystem
- //String newElementName = null;
- ISystemRemoteElementAdapter rmtAdapter = null;
- if (renameObject instanceof String) {
- //FIXME How to get the adapter based on the String name?
- //newElementName = (String)renameObject;
- } else {
- rmtAdapter = getRemoteAdapter(renameObject);
- subsystem = rmtAdapter.getSubSystem(renameObject);
- }
-
- // STEP 2: find all references to the old name object
- matches = findAllRemoteItemReferences(oldElementName, renameObject, subsystem, matches);
- if (matches == null) return;
-
- TreeItem[] selected = getTree().getSelection();
- getTree().deselectAll();
-
- boolean refresh = false;
- // STEP 3: process all references to the old name object
- for (int idx = 0; idx < matches.size(); idx++) {
- Item match = (Item) matches.elementAt(idx);
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- Object data = match.getData();
-
- if (data != renameObject) // not a binary match
- {
- if (rmtAdapter == null) rmtAdapter = getRemoteAdapter(data);
- refresh = rmtAdapter.refreshRemoteObject(data, renameObject); // old, new
- } else {
- refresh = true;
- }
-
-
- internalUpdate(match, data, properties);
-
- //update(data, properties); // for refreshing non-structural properties in viewer when model changes
- //System.out.println("Match found. refresh required? " + refresh);
-// if (refresh)
- //refreshRemoteObject(data,null,false);
- // smartRefresh(new TreeItem[] { (TreeItem) match });
- }
- }
-
- if (refresh)
- {
- smartRefresh((TreeItem[])matches.toArray(new TreeItem[matches.size()]));
- getTree().setSelection(selected);
- }
-
- // STEP 4: update property sheet, just in case.
- updatePropertySheet();
-
- return;
- }
-
- /**
- * Update properties of remote object. Update all references to this object
- */
- protected void updateRemoteObjectProperties(Object remoteObject) {
- Vector matches = new Vector();
-
- // STEP 1: get the object's remote adapter and subsystem
- ISystemRemoteElementAdapter rmtAdapter = getRemoteAdapter(remoteObject);
- ISubSystem subsystem = rmtAdapter.getSubSystem(remoteObject);
-
- // STEP 2: find all references to the object
- String oldElementName = rmtAdapter.getAbsoluteName(remoteObject);
- findAllRemoteItemReferences(oldElementName, remoteObject, subsystem, matches);
-
- // STEP 3: process all references to the object
- String[] allProps = { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
- for (int idx = 0; idx < matches.size(); idx++) {
- Item match = (Item) matches.elementAt(idx);
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- Object data = match.getData();
- if (data == remoteObject) // same binary object as given?
- update(data, allProps); // for refreshing non-structural properties in viewer when model changes
- else // match by name
- {
- rmtAdapter.refreshRemoteObject(data, remoteObject); // old, new
- update(data, allProps);
- }
- }
- }
-
- // STEP 4: update the property sheet in case we changed properties of first selected item
- updatePropertySheet();
- return;
- }
-
- /**
- * Refresh contents of remote container. Refreshes all references to this container including filters that
- * display the contents of this container.
- * @param remoteObject - either an actual remote object, or the absolute name of a remote object
- * @param toSelect - the child object to select after refreshing the given object. This will force the
- * object to be expanded, and then select this object which can be a remote object or absolute name of a
- * remote object. To simply force an expand of the remote object, without bothering to select a child,
- * pass an instance of SystemViewDummyObject.
- * @return true if a refresh done, false if given a non-remote object.
- */
- protected boolean refreshRemoteObject(Object remoteObject, Object toSelect, boolean originatedHere) {
- if (remoteObject == null) return false;
-
- // STEP 1: get the object's remote adapter and subsystem, or use its name if only given that
- ISystemRemoteElementAdapter rmtAdapter = null;
- ISubSystem subsystem = null;
- String oldElementName = null;
- if (!(remoteObject instanceof String)) {
- rmtAdapter = getRemoteAdapter(remoteObject);
- if (rmtAdapter == null) return false;
- subsystem = rmtAdapter.getSubSystem(remoteObject);
- oldElementName = rmtAdapter.getAbsoluteName(remoteObject);
- } else
- oldElementName = (String) remoteObject;
-
- Vector matches = new Vector();
- // STEP 2: find all references to the object
- findAllRemoteItemReferences(oldElementName, remoteObject, subsystem, matches);
- if (remoteObject instanceof String) remoteObject = getFirstRemoteObject(matches);
-
- if (remoteObject instanceof ISystemContainer) {
- ((ISystemContainer) remoteObject).markStale(true);
- }
-
- // STEP 3: process all references to the object
- boolean firstSelection = true;
- for (int idx = 0; idx < matches.size(); idx++) {
- Item match = (Item) matches.elementAt(idx);
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- Object data = match.getData();
- smartRefresh(new TreeItem[] { (TreeItem) match }); // refresh the remote object
- if (firstSelection && // for now, we just select the first binary occurrence we find
- (data == remoteObject)) // same binary object as given?
- {
- firstSelection = false;
- if ((toSelect != null) && originatedHere) {
- if (!getExpanded(match)) // assume if callers wants to select kids that they want to expand parent
- {
- createChildren(match);
- setExpanded(match, true);
- }
- // todo: handle cumulative selections.
- // STEP 4: If requested, select the kids in the newly refreshed object.
- // If the same binary object appears multiple times, select the kids in the first occurrence.
- // ... what else to do?
- if (!(toSelect instanceof SystemViewDummyObject)) selectRemoteObjects(toSelect, null, match); // select the given kids in this parent
- }
- }
- }
- }
- return true;
- }
-
- /**
- * Given the result of findAllRemoteItemReferences, scan for first non-filter object
- */
- protected Object getFirstRemoteObject(Vector matches) {
- if ((matches == null) || (matches.size() == 0)) return null;
- Object firstRemote = matches.elementAt(0);
- if (firstRemote != null) firstRemote = ((Item) firstRemote).getData();
- return firstRemote;
- }
-
- /**
- * Refreshes the tree starting at the given widget.
- *
- * @param widget the widget
- * @param element the element
- * @param doStruct <code>true</code> if structural changes are to be picked up,
- * and <code>false</code> if only label provider changes are of interest
- */
- protected void ourInternalRefresh(Widget widget, Object element, boolean doStruct, boolean forceRemote, boolean doTimings) {
- final Widget fWidget = widget;
- final Object fElement = element;
- final boolean fDoStruct = doStruct;
-
- // we have to take special care if one of our kids are selected and it is a remote object...
- if (forceRemote || (isSelectionRemote() && isTreeItemSelectedOrChildSelected(widget))) {
- if (!isTreeItemSelected(widget)) // it is one of our kids that is selected
- {
- clearSelection(); // there is nothing much else we can do. Calling code will restore it anyway hopefully
- doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings, true);
- } else // it is us that is selected. This might be a refresh selected operation. TreeItem address won't change
- {
- doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings, true);
- }
- } else {
- final boolean finalDoTimings = doTimings;
- preservingSelection(new Runnable() {
- public void run() {
- doOurInternalRefresh(fWidget, fElement, fDoStruct, finalDoTimings, true);
- }
- });
- }
- }
-
- protected boolean isSelectionRemote() {
- ISelection s = getSelection();
- if ((s != null) && (s instanceof IStructuredSelection)) {
- IStructuredSelection ss = (IStructuredSelection) s;
- Object firstSel = ss.getFirstElement();
- if ((firstSel != null) && (getRemoteAdapter(firstSel) != null)) return true;
- }
- return false;
- }
-
- protected void doOurInternalRefresh(Widget widget, Object element, boolean doStruct, boolean doTimings, boolean firstCall) {
- if (debug) {
- logDebugMsg("in doOurInternalRefresh on " + getAdapter(element).getName(element)); //$NON-NLS-1$
- logDebugMsg("...current selection is " + getFirstSelectionName(getSelection())); //$NON-NLS-1$
- }
- SystemElapsedTimer timer = null;
- if (doTimings) timer = new SystemElapsedTimer();
- if (widget instanceof Item) {
- //System.out.println("Inside doOurInternalRefresh. widget = " + ((TreeItem)widget).handle);
- if (doStruct) {
- updatePlus((Item) widget, element);
- }
- updateItem(widget, element);
- if (doTimings && timer != null) {
- System.out.println("doOurInternalRefresh timer 1: time to updatePlus and updateItem:" + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
-
- if (doStruct) {
- // pass null for children, to allow updateChildren to get them only if needed
- // Object[] newChildren = null;
- if ((widget instanceof Item) && getExpanded((Item) widget)) {
- // DKM - get raw children does a query but so does internalRefresh()
- // newChildren = getRawChildren(widget);
- if (doTimings && timer != null) {
- System.out.println("doOurInternalRefresh timer 2: time to getRawChildren:" + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
- // DKM - without the else we get duplicate queries on expanded folder
- // uncommented - seems new results after query aren't showing up
- //else
-// {
-// internalRefresh(element);
-// }
-
- if (doTimings && timer != null) {
- System.out.println("doOurInternalRefresh timer 3: time to updateChildren:" + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
- // recurse
- Item[] children = getChildren(widget);
- if (children != null) {
- //SystemElapsedTimer timer2 = null;
- //int intervalCount = 0;
- //if (doTimings)
- //timer2 = new SystemElapsedTimer();
- for (int i = 0; i < children.length; i++) {
- Widget item = children[i];
- Object data = item.getData();
- if (data != null) doOurInternalRefresh(item, data, doStruct, false, false);
- /*
- if (doTimings)
- {
- ++intervalCount;
- if (intervalCount == 1000)
- {
- System.out.println("...time to recurse next 1000 children: " + timer2.setEndTime());
- intervalCount = 0;
- timer2.setStartTime();
- }
- }*/
- }
- }
- if (firstCall)
- {
- internalRefresh(element);
- }
- if (doTimings && timer != null) {
- System.out.println("doOurInternalRefresh timer 4: time to recurse children:" + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
-
- protected Object[] getRawChildren(Widget w) {
- Object parent = w.getData();
-
- if (parent.equals(getRoot())) return super.getRawChildren(parent);
- Object[] result = ((ITreeContentProvider) getContentProvider()).getChildren(parent);
- if (result != null) return result;
-
- return new Object[0];
- }
-
- /*
- protected void preservingSelection(Runnable updateCode)
- {
- super.preservingSelection(updateCode);
- System.out.println("After preservingSelection: new selection = "+getFirstSelectionName(getSelection()));
- }
- protected void handleInvalidSelection(ISelection invalidSelection, ISelection newSelection)
- {
- System.out.println("Inside handleInvalidSelection: old = "+getFirstSelectionName(invalidSelection)+", new = "+getFirstSelectionName(newSelection));
- updateSelection(newSelection);
- }
- */
- protected String getFirstSelectionName(ISelection s) {
- if ((s != null) && (s instanceof IStructuredSelection)) {
- IStructuredSelection ss = (IStructuredSelection) s;
- Object firstSel = ss.getFirstElement();
- String name = null;
- if (firstSel != null) {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(firstSel);
- if (ra != null)
- name = ra.getAbsoluteName(firstSel);
- else
- name = getAdapter(firstSel).getName(firstSel);
- }
- return name;
- } else
- return null;
- }
-
- /**
- * Expand a remote object within the tree. Must be given its parent element within the tree,
- * in order to uniquely find it. If not given this, we expand the first occurrence we find!
- * @param remoteObject - either a remote object or a remote object absolute name
- * @param subsystem - the subsystem that owns the remote objects, to optimize searches.
- * @param parentObject - the parent that owns the remote objects, to optimize searches. Can
- * be an object or the absolute name of a remote object.
- * @return the tree item of the remote object if found and expanded, else null
- */
- public Item expandRemoteObject(Object remoteObject, ISubSystem subsystem, Object parentObject) {
- // given the parent? Should be easy
- Item remoteItem = null;
- if (parentObject != null) {
- Item parentItem = null;
- if (parentObject instanceof Item)
- parentItem = (Item) parentObject;
- else if (parentObject instanceof String) // given absolute name of remote object
- parentItem = findFirstRemoteItemReference((String) parentObject, subsystem, (Item) null); // search all roots for the parent
- else // given actual remote object
- {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(parentObject);
- if (ra != null) {
- if (subsystem == null) subsystem = ra.getSubSystem(parentObject);
- parentItem = findFirstRemoteItemReference(ra.getAbsoluteName(parentObject), subsystem, (Item) null); // search all roots for the parent
- } else // else parent is not a remote object. Probably its a filter
- {
- Widget parentWidget = findItem(parentObject);
- if (parentWidget instanceof Item) parentItem = (Item) parentWidget;
- }
- }
- // ok, we have the parent item! Hopefully!
- if (remoteObject instanceof String)
- remoteItem = findFirstRemoteItemReference((String) remoteObject, subsystem, parentItem);
- else
- remoteItem = findFirstRemoteItemReference(remoteObject, parentItem);
- if (remoteItem == null) return null;
- setExpandedState(remoteItem.getData(), true);
- } else // not given a parent to refine search with. Better have a subsystem!!
- {
- if (remoteObject instanceof String)
- remoteItem = findFirstRemoteItemReference((String) remoteObject, subsystem, (Item) null);
- else {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteObject);
- if (ra != null) {
- if (subsystem == null) subsystem = ra.getSubSystem(remoteObject);
- remoteItem = findFirstRemoteItemReference(ra.getAbsoluteName(remoteObject), subsystem, (Item) null);
- }
- }
- if (remoteItem == null) return null;
- setExpandedState(remoteItem.getData(), true);
- }
- return remoteItem;
- }
-
- /**
- * Select a remote object or objects given the parent remote object (can be null) and subsystem (can be null)
- * @param src - either a remote object, a remote object absolute name, or a vector of remote objects or remote object absolute names
- * @param subsystem - the subsystem that owns the remote objects, to optimize searches.
- * @param parentObject - the parent that owns the remote objects, to optimize searches.
- * @return true if found and selected
- */
- public boolean selectRemoteObjects(Object src, ISubSystem subsystem, Object parentObject) {
- //String parentName = null;
- // given a parent object? That makes it easy...
- if (parentObject != null) {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(parentObject);
- if (ra != null) {
- //parentName = ra.getAbsoluteName(parentObject);
- if (subsystem == null) subsystem = ra.getSubSystem(parentObject);
- Item parentItem = findFirstRemoteItemReference(parentObject, (Item) null); // search all roots for the parent
- return selectRemoteObjects(src, subsystem, parentItem);
- } else // else parent is not a remote object. Probably its a filter
- {
- Item parentItem = null;
- if (parentObject instanceof Item)
- parentItem = (Item) parentObject;
- else {
- Widget parentWidget = findItem(parentObject);
- if (parentWidget instanceof Item) parentItem = (Item) parentWidget;
- }
- if (parentItem != null)
- return selectRemoteObjects(src, (ISubSystem) null, parentItem);
- else
- return false;
- }
- } else
- //return selectRemoteObjects(src, (SubSystem)null, (Item)null); // Phil test
- return selectRemoteObjects(src, subsystem, (Item) null);
- }
-
- /**
- * Select a remote object or objects given the parent remote object (can be null) and subsystem (can be null) and parent TreeItem to
- * start the search at (can be null)
- * @param src - either a remote object, a remote object absolute name, or a vector of remote objects or remote object absolute names
- * @param subsystem - the subsystem that owns the remote objects, to optimize searches.
- * @param parentItem - the parent at which to start the search to find the remote objects. Else, starts at the roots.
- * @return true if found and selected
- */
- protected boolean selectRemoteObjects(Object src, ISubSystem subsystem, Item parentItem) {
- clearSelection();
- Item selItem = null;
-
- if (parentItem != null && parentItem.isDisposed()) {
- return false;
- }
-
- if ((parentItem != null) && !getExpanded(parentItem))
- //setExpanded(parentItem, true);
- setExpandedState(parentItem.getData(), true);
-
- //System.out.println("SELECT_REMOTE: PARENT = " + parent + ", PARENTITEM = " + parentItem);
- if (src instanceof Vector) {
- //String elementName = null;
- Vector selVector = (Vector) src;
- ArrayList selItems = new ArrayList();
- // our goal here is to turn the vector of names or remote objects into a collection of
- // actual TreeItems we matched them on...
- for (int idx = 0; idx < selVector.size(); idx++) {
- Object o = selVector.elementAt(idx);
- //elementName = null;
- if (o instanceof String)
- selItem = findFirstRemoteItemReference((String) o, subsystem, parentItem);
- else
- selItem = findFirstRemoteItemReference(o, parentItem);
-
- if (selItem != null) {
- selItems.add(selItem);
- // when selecting multiple items, we optimize by assuming they have the same parent...
- if ((parentItem == null) && (selItem instanceof TreeItem)) parentItem = ((TreeItem) selItem).getParentItem();
- }
- }
- if (selItems.size() > 0) {
- setSelection(selItems);
- updatePropertySheet();
- return true;
- }
- } else {
- if (src instanceof String)
- //selItem = (Item)findFirstRemoteItemReference((String)src, (SubSystem)null, parentItem); Phil test
- selItem = findFirstRemoteItemReference((String) src, subsystem, parentItem);
- else
- selItem = findFirstRemoteItemReference(src, parentItem);
-
- if (selItem != null) {
- ArrayList selItems = new ArrayList();
- selItems.add(selItem);
- setSelection(selItems);
- updatePropertySheet();
- return true;
- }
- }
- return false;
- }
-
- /**
- * Refresh the whole tree. We have special code to reselect remote objects after the refresh
- */
- public void refreshAll() {
- IStructuredSelection selected = (IStructuredSelection) getSelection();
- Iterator i = selected.iterator();
- Object parentElement = null;
- Vector selectedRemoteObjects = new Vector();
- Widget parentItem = null;
- ISubSystem ss = null;
- while (i.hasNext()) {
- Object element = i.next();
- if (parentElement == null) {
- parentItem = getParentItem((Item) findItem(element));
- if ((parentItem != null) && (parentItem instanceof Item)) parentElement = ((Item) parentItem).getData();
- }
- if (getRemoteAdapter(element) != null) {
- selectedRemoteObjects.addElement(element);
- if (ss == null) ss = getRemoteAdapter(element).getSubSystem(element);
- }
- }
-
- //super.refresh();
- smartRefresh((Object) null, (selectedRemoteObjects.size() > 0));
-
- if (selectedRemoteObjects.size() > 0) {
- selectRemoteObjects(selectedRemoteObjects, ss, parentElement);
- }
- }
-
- /**
- * Do an intelligent refresh of an expanded item. The inherited algorithm for refresh is stupid,
- * in that it reexpands children based on their original ordinal position which can change after a
- * refresh, resulting in the wrong children being expanded. Currently this only truly comes to light
- * for remote objects, where refresh really can change the resulting list and hence each child's
- * ordinal position. So, to be safe we only override the inherited algorithm if any nested child
- * is a remote object
- */
- protected void smartRefresh(TreeItem[] itemsToRefresh) {
- smartRefresh(itemsToRefresh, null, false);
- }
-
- protected void smartRefresh(TreeItem[] itemsToRefresh, ArrayList expandedChildren, boolean forceRemote) {
- SystemElapsedTimer timer = null;
- if (doTimings) timer = new SystemElapsedTimer();
- areAnyRemote = false; // set in ExpandedItem constructor
- boolean fullRefresh = false;
- // for each selected tree item gather a list of expanded child nodes...
- if (expandedChildren == null)
- expandedChildren = new ArrayList();
- else
- fullRefresh = true;
- boolean[] wasExpanded = new boolean[itemsToRefresh.length];
- //boolean anyGivenItemsRemote = false;
- for (int idx = 0; idx < itemsToRefresh.length; idx++) {
- TreeItem currItem = itemsToRefresh[idx];
- // ...if this selected item is expanded, recursively gather up all its expanded descendents
- Object data = currItem.getData();
- ISystemViewElementAdapter adapter = null;
- if (data != null) adapter = getAdapter(data);
- //if (adapter instanceof ISystemRemoteElementAdapter) {
- // anyGivenItemsRemote = true;
- //}
- if (currItem.getExpanded() && (adapter != null) && adapter.isPromptable(data))
- setExpandedState(data, false); // collapse temp expansion of prompts
- else if (currItem.getExpanded()) {
- //expandedChildren.add(new ExpandedItem(currItem)); we don't need special processing for given items themselves as they will not be refreshed, only their kids
- if (doTimings && timer != null) timer.setStartTime();
- gatherExpandedChildren((fullRefresh ? null : currItem), currItem, expandedChildren);
- wasExpanded[idx] = true;
- if (doTimings && timer != null) System.out.println("Refresh Timer 1: time to gatherExpandedChildren: " + timer.setEndTime()); //$NON-NLS-1$
- } else
- wasExpanded[idx] = false;
- }
- // ok, we have found all expanded descendents of all selected items.
-
- // If none of the expanded sub-nodes are remote simply use the inherited algorithm for refresh
- if (!areAnyRemote) {
- for (int idx = 0; idx < itemsToRefresh.length; idx++)
- //ourInternalRefresh(itemsToRefresh[idx], itemsToRefresh[idx].getData(), wasExpanded[idx]);
- ourInternalRefresh(itemsToRefresh[idx], itemsToRefresh[idx].getData(), true, forceRemote, doTimings); // defect 42321
- return;
- }
- getControl().setRedraw(false);
- // If any selected nodes are remote use our own algorithm:
- // 1. collapse each given node and refresh it to remove the children from memory, then
- // expand it again. It doesn't matter if it is remote or not since its own memory
- // address won't change, only that of its children.
- for (int idx = 0; idx < itemsToRefresh.length; idx++) {
- TreeItem currItem = itemsToRefresh[idx];
- if (doTimings && timer != null) timer.setStartTime();
- setExpanded(currItem, false); // collapse node
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 2: time to setExpanded(false): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- ourInternalRefresh(currItem, currItem.getData(), true, true, doTimings); // dispose of children, update plus
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 3: time to do ourInternalRefresh(...): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- if (wasExpanded[idx]) {
- createChildren(currItem); // re-expand
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 4: time to createChildren(...): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- currItem.setExpanded(true);
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 5: time to setExpanded(true): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- } else // hmm, item was not expanded so just flush its memory
- {
-
- }
- }
- // 2. expand each previously expanded sub-node, recursively
- for (int idx = 0; idx < expandedChildren.size(); idx++) {
- ExpandedItem itemToExpand = (ExpandedItem) expandedChildren.get(idx);
- if (itemToExpand.isRemote()) {
- // find remote item based on its original name and unchanged root parent
- Item item = null;
- //if (itemToExpand.parentItem != null)
- //item = (Item)recursiveFindRemoteItem(itemToExpand.parentItem, itemToExpand.remoteName, itemToExpand.subsystem);
- //else
- //item = (Item)findRemoteItem(itemToExpand.remoteName, itemToExpand.subsystem);
- item = findFirstRemoteItemReference(itemToExpand.remoteName, itemToExpand.subsystem, itemToExpand.parentItem);
- // if found, re-expand it
- if (item != null) {
- //setExpanded(item, true);
- createChildren(item);
- ((TreeItem) item).setExpanded(true);
- if (debug) System.out.println("Re-Expanded RemoteItem: " + itemToExpand.remoteName); //$NON-NLS-1$
- } else if (debug) System.out.println("Re-Expand of RemoteItem '" + itemToExpand.remoteName + "' failed. Not found"); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- setExpandedState(itemToExpand.data, true);
- if (debug) System.out.println("Re-Expanded non-remote Item: " + itemToExpand.data); //$NON-NLS-1$
- }
- }
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 6: time to reExpanded expanded subnodes: " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- getControl().setRedraw(true);
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 7: time to setRedraw(true): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
-
- /**
- * Do an intelligent refresh of the given element. Can be null for full refresh
- */
- protected void smartRefresh(Object element, boolean forceRemote) {
- if ((element == null) || (element == getInput())) {
- // fullRefresh
- Tree tree = getTree();
- TreeItem[] roots = tree.getItems();
- boolean anyExpanded = false;
- areAnyRemote = false; // set in ExpandedItem constructor
- ArrayList expandedChildren = new ArrayList();
- if (roots != null) {
- for (int idx = 0; idx < roots.length; idx++) {
- TreeItem currItem = roots[idx];
- Object data = currItem.getData();
- ISystemViewElementAdapter adapter = null;
- if (data != null) adapter = getAdapter(data);
- if (currItem.getExpanded() && (adapter != null) && adapter.isPromptable(data))
- setExpandedState(data, false);
- else if (currItem.getExpanded()) {
- //setExpanded(roots[idx], false);
- expandedChildren.add(new ExpandedItem(null, currItem));
- anyExpanded = true;
- //gatherExpandedChildren(currItem, currItem, expandedChildren);
- }
- }
- }
- if (!anyExpanded)
- super.refresh();
- else {
- internalRefresh(getInput());
- roots = tree.getItems(); // re-query roots
- smartRefresh(roots, expandedChildren, forceRemote);
- }
- } else if (getRemoteAdapter(element) != null) {
-
- Item item = null;
- if (element instanceof String) {
- item = findFirstRemoteItemReference((String) element, (ISubSystem) null, (Item) null);
- if (item != null) {
- smartRefresh(new TreeItem[] { (TreeItem) item });
- }
- } else {
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(element);
- String elementName = adapter.getName(element);
- ISubSystem subSystem = adapter.getSubSystem(element);
-
- Vector matches = new Vector();
- findAllRemoteItemReferences(elementName, element, subSystem, matches);
- if (matches.size() > 0) {
- for (int i = 0; i < matches.size(); i++) {
- Item match = (Item) matches.get(i);
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- smartRefresh(new TreeItem[] { (TreeItem) match });
- }
- }
- }
- }
-
- /*
- Item item = null;
- if (element instanceof String)
- item = findFirstRemoteItemReference((String)element, (SubSystem)null, (Item)null);
- else
- item = findFirstRemoteItemReference(element, (Item)null);
- if (item != null)
- smartRefresh(new TreeItem[] {(TreeItem)item});
-
- */
- } else {
- Item item = (Item) findItem(element);
- //System.out.println("Inside SV smartRefresh for "+element+". Item found? " + (item!=null));
- if (item != null) smartRefresh(new TreeItem[] { (TreeItem) item });
- }
- }
-
- class ExpandedItem {
- TreeItem item, parentItem;
- Object data;
- String remoteName;
- ISystemRemoteElementAdapter remoteAdapter;
- ISubSystem subsystem;
-
- ExpandedItem(TreeItem parentItem, TreeItem item) {
- this.parentItem = parentItem;
- this.item = item;
- this.data = item.getData();
- if (data != null) {
- remoteAdapter = getRemoteAdapter(data);
- if (remoteAdapter != null) {
- remoteName = remoteAdapter.getAbsoluteName(data);
- subsystem = remoteAdapter.getSubSystem(data);
- areAnyRemote = true;
- if (debug) System.out.println("ExpandedRemoteItem added. remoteName = " + remoteName); //$NON-NLS-1$
- } else if (debug) System.out.println("ExpandedItem added. Data = " + data); //$NON-NLS-1$
- } else if (debug) System.out.println("ExpandedItem added. Data = null"); //$NON-NLS-1$
- }
-
- boolean isRemote() {
- return (remoteAdapter != null);
- }
- }
-
- /**
- * Gather up all expanded children of the given tree item into a list that can be used later to
- * reexpand.
- * @param parentItem The root parent which will not be refreshed itself (only its kids) and hence will remain valid after refresh.
- * In a full refresh this will be null.
- * @param startingItem The starting item for this search. Usually same as parentItem, but changes via recursion
- * @param listToPopulate An array list that will be populated with instances of our inner class ExpandedItem
- */
- protected void gatherExpandedChildren(TreeItem parentItem, TreeItem startingItem, ArrayList listToPopulate) {
- TreeItem[] itemChildren = startingItem.getItems();
- if (itemChildren != null) {
- for (int idx = 0; idx < itemChildren.length; idx++) {
- TreeItem currChild = itemChildren[idx];
- Object data = currChild.getData();
- ISystemViewElementAdapter adapter = null;
- if (data != null) adapter = getAdapter(data);
- if (currChild.getExpanded() && (adapter != null) && adapter.isPromptable(data))
- setExpandedState(data, false);
- else if (currChild.getExpanded()) {
- listToPopulate.add(new ExpandedItem(parentItem, currChild));
- gatherExpandedChildren(parentItem, currChild, listToPopulate);
- }
- }
- }
- }
-
- /**
- * Get index of item given its data element
- */
- protected int getItemIndex(Widget parent, Object element) {
- int index = -1;
- Item[] kids = getChildren(parent);
- if (kids != null) for (int idx = 0; idx < kids.length; idx++)
- if (kids[idx].getData() == element) index = idx;
- return index;
- }
-
- /**
- * We don't show actual filters, only filter references that are unique generated
- * for each subtree of each subsystem. Yet, each event is relative to the filter,
- * not our special filter references. Hence, all this code!!
- * <p>
- * Special case handling for updates to filters which affect the filter
- * but not the filter parent:
- * 1. Existing filter renamed (RENAME)
- * 2. Existing filter's filter strings changed (CHANGE)
- * <p>
- * Assumption:
- * 1. event.getGrandParent() == subsystem (one event fired per affected subsystem)
- * 2. event.getSource() == filter or filter string (not the reference, the real filter or string)
- * 3. event.getParent() == parent of filter or filter string. One of:
- * a. filterPool reference or filter reference (nested)
- * b. filterPool for non-nested filters when showing filter pools
- * c. subsystem for non-nested filters when not showing filter pools
- * d. filter for nested filters
- * <p>
- * Our job here:
- * 1. Determine if we are even showing the given subsystem
- * 2. Find the reference to the updated filter in that subsystem's subtree
- * 3. Ask that parent to either update its name or collapse and refresh its children
- * 4. Forget selecting something ... the original item remains selected!
- */
- protected void findAndUpdateFilter(ISystemResourceChangeEvent event, int type) {
- ISystemFilter filter = (ISystemFilter) event.getSource();
- //Object parent = event.getParent();
- if (debug) {
- String eventType = null;
- switch (type) {
- case EVENT_RENAME_FILTER_REFERENCE:
- eventType = "EVENT_RENAME_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_CHANGE_FILTER_REFERENCE:
- eventType = "EVENT_CHANGE_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- }
- logDebugMsg("SV event: " + eventType); //$NON-NLS-1$
- }
-
- // STEP 1. ARE WE EVEN SHOWING THE GIVEN SUBSYSTEM?
- ISubSystem ss = (ISubSystem) event.getGrandParent();
- Widget widget = findItem(ss);
-
- if (widget != null) {
-
- // STEP 2: ARE WE SHOWING A REFERENCE TO RENAMED OR UPDATED FILTER?
- Widget item = null;
-
- Control c = getControl();
-
- // KM: defect 53008.
- // Yes we are showing the subsystem, so widget is the subsystem item
- if (widget != c && widget instanceof Item) {
-
- if (debug) logDebugMsg("...Found ss " + ss); //$NON-NLS-1$
-
- item = internalFindReferencedItem(widget, filter, SEARCH_INFINITE);
- }
- // No, we are not showing the subsystem, so widget is the control
- else if (widget == c) {
-
- if (debug) logDebugMsg("...Din not find ss " + ss); //$NON-NLS-1$
-
- item = internalFindReferencedItem(widget, filter, SEARCH_INFINITE);
- }
-
- if (item == null)
- logDebugMsg("......didn't find renamed/updated filter's reference!"); //$NON-NLS-1$
- else {
- // STEP 3: UPDATE THAT FILTER...
- if (type == EVENT_RENAME_FILTER_REFERENCE) {
- String[] rproperties = { IBasicPropertyConstants.P_TEXT };
- update(item.getData(), rproperties); // for refreshing non-structural properties in viewer when model changes
- } else if (type == EVENT_CHANGE_FILTER_REFERENCE) {
- //if (((TreeItem)item).getExpanded())
- //refresh(item.getData());
- smartRefresh(new TreeItem[] { (TreeItem) item });
- /*
- Object data = item.getData();
- boolean wasExpanded = getExpanded((Item)item);
- setExpandedState(data, false); // collapse node
- refresh(data); // clear all cached widgets
- if (wasExpanded)
- setExpandedState(data, true); // by doing this all subnodes that were expanded are now collapsed
- */
- }
- updatePropertySheet();
- }
- }
- }
-
- protected void findAndUpdateFilterString(ISystemResourceChangeEvent event, int type) {
- ISystemFilterString filterString = (ISystemFilterString) event.getSource();
- // STEP 1. ARE WE EVEN SHOWING THE GIVEN SUBSYSTEM?
- ISubSystem ss = (ISubSystem) event.getGrandParent();
- Widget item = findItem(ss);
- if (item != null && item != getControl()) {
- Item ssItem = (Item) item;
- if (debug) logDebugMsg("...Found ss " + ss); //$NON-NLS-1$
- // STEP 2: ARE WE SHOWING A REFERENCE TO THE UPDATED FILTER STRING?
- item = internalFindReferencedItem(ssItem, filterString, SEARCH_INFINITE);
- if (item == null)
- logDebugMsg("......didn't find updated filter string's reference!"); //$NON-NLS-1$
- else {
- // STEP 3: UPDATE THAT FILTER STRING...
- if (type == EVENT_CHANGE_FILTERSTRING_REFERENCE) // HAD BETTER!
- {
- //if (((TreeItem)item).getExpanded())
- //refresh(item.getData());
- // boolean wasExpanded = getExpanded((Item)item);
- Object data = item.getData();
- setExpandedState(data, false); // collapse node
- refresh(data); // clear all cached widgets
- //if (wasExpanded)
- //setExpandedState(data, true); // hmm, should we?
- String properties[] = { IBasicPropertyConstants.P_TEXT };
- update(item.getData(), properties); // for refreshing non-structural properties in viewer when model changes
- updatePropertySheet();
- }
- }
- }
- }
-
- /**
- * We don't show actual filters, only filter references that are unique generated
- * for each subtree of each subsystem. Yet, each event is relative to the filter,
- * not our special filter references. Hence, all this code!!
- * <p>
- * Special case handling for updates to filters which affect the parent of the
- * filter, such that the parent's children must be re-generated:
- * 1. New filter created (ADD)
- * 2. Existing filter deleted (DELETE)
- * 3. Existing filters reordered (MOVE)
- * <p>
- * Assumption:
- * 1. event.getGrandParent() == subsystem (one event fired per affected subsystem)
- * 2. event.getSource() == filter (not the reference, the real filter)
- * 3. event.getParent() == parent of filter. One of:
- * a. filterPool reference or filter reference (nested)
- * b. filterPool for non-nested filters when showing filter pools
- * c. subsystem for non-nested filters when not showing filter pools
- * d. filter for nested filters
- * <p>
- * Our job here:
- * 1. Determine if we are even showing the given subsystem
- * 2. Find the parent to the given filter: filterPool or subsystem
- * 3. Ask that parent to refresh its children (causes re-gen of filter references)
- * 4. Select something: QUESTION: is this subsystem the origin of this action??
- * a. For ADD, select the newly created filter reference for the new filter
- * ANSWER: IF PARENT OF NEW FILTER IS WITHIN THIS SUBSYSTEM, AND WAS SELECTED PREVIOUSLY
- * b. For DELETE, select the parent of the filter?
- * ANSWER: IF DELETED FILTER IS WITHING THIS SUBSYSTEM AND WAS SELECTED PREVIOUSLY
- * c. For MOVE, select the moved filters
- * ANSWER: IF MOVED FILTERS ARE WITHIN THIS SUBSYSTEM, AND WERE SELECTED PREVIOUSLY
- */
- protected void findAndUpdateFilterParent(ISystemResourceChangeEvent event, int type) {
- ISubSystem ss = (ISubSystem) event.getGrandParent();
-
-
- boolean add = false, move = false, delete = false;
- boolean afilterstring = false;
- //if (debug)
- //{
- String eventType = null;
- switch (type) {
- case EVENT_ADD_FILTER_REFERENCE:
- add = true;
- if (debug) eventType = "EVENT_ADD_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_DELETE_FILTER_REFERENCE:
- delete = true;
- if (debug) eventType = "EVENT_DELETE_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_MOVE_FILTER_REFERENCES:
- move = true;
- if (debug) eventType = "EVENT_MOVE_FILTER_REFERENCES"; //$NON-NLS-1$
- break;
- case EVENT_ADD_FILTERSTRING_REFERENCE:
- add = true;
- afilterstring = true;
- if (debug) eventType = "EVENT_ADD_FILTERSTRING_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_DELETE_FILTERSTRING_REFERENCE:
- delete = true;
- afilterstring = true;
- if (debug) eventType = "EVENT_DELETE_FILTERSTRING_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_MOVE_FILTERSTRING_REFERENCES:
- move = true;
- afilterstring = true;
- if (debug) eventType = "EVENT_MOVE_FILTERSTRING_REFERENCES"; //$NON-NLS-1$
- break;
-
- }
- if (debug) logDebugMsg("SV event: " + eventType); //$NON-NLS-1$
- //}
- //clearSelection();
-
- ISystemFilter filter = null;
- ISystemFilterString filterstring = null;
- if (!afilterstring)
- filter = (ISystemFilter) event.getSource(); // for multi-source move, gets first filter
- else
- filterstring = (ISystemFilterString) event.getSource();
-
- boolean multiSource = move;
- // STEP 1: ARE WE SHOWING THE SUBSYSTEM GRANDPARENT OF CURRENT REFRESH?
- Widget item = findItem(ss);
-
- if (item == null) {
- refresh();
-
- if (debug) logDebugMsg("...Did not find ss " + ss.getName()); //$NON-NLS-1$
- return;
- }
- Item ssItem = (Item) item;
- boolean wasSelected = false;
- IStructuredSelection oldSelections = (IStructuredSelection) getSelection();
-
- Object parent = event.getParent();
- if (debug) logDebugMsg("...Found ss " + ss); //$NON-NLS-1$
-
- // STEP 2: ARE WE SHOWING A REFERENCE TO THE FILTER's PARENT POOL?
- Item parentRefItem = null;
- ISystemFilterContainer refdParent = null;
- // 3a (reference to filter pool or filter)
- if (parent instanceof ISystemFilterContainerReference) // given a reference to parent?
- {
- refdParent = ((ISystemFilterContainerReference) parent).getReferencedSystemFilterContainer();
- parentRefItem = (Item) internalFindReferencedItem(ssItem, refdParent, SEARCH_INFINITE);
- }
- // 3b and 3d. (filter pool or filter)
- else if (parent instanceof ISystemFilterContainer) {
- refdParent = (ISystemFilterContainer) parent;
- parentRefItem = (Item) internalFindReferencedItem(ssItem, refdParent, SEARCH_INFINITE);
- }
- // 3c (subsystem)
- else {
- parentRefItem = ssItem;
- }
- if (parentRefItem != null) {
- if (debug) logDebugMsg("......We are showing reference to parent"); //$NON-NLS-1$
- // STEP 3... YES, SO REFRESH PARENT... IT WILL RE-GEN THE FILTER REFERENCES FOR EACH CHILD FILTER
- // ... actually, call off the whole show if that parent is currently not expanded!!
- // HMMM... WE NEED TO REFRESH EVEN IF NOT EXPANDED IF ADDING FIRST CHILD
- if (!add) // move or delete
- {
- if (!(((TreeItem) parentRefItem).getExpanded())) {
- refresh(parentRefItem.getData()); // flush cached widgets so next expand is fresh
- return;
- }
- // move or delete and parent is expanded...
- Item oldItem = (Item) internalFindReferencedItem(parentRefItem, afilterstring ? (Object) filterstring : (Object) filter, 1);
- //if (debug)
- //logDebugMsg("oldItem null? " + (oldItem==null));
- if (oldItem != null) // found moved or deleted filter in our subtree
- {
- wasSelected = isSelected(oldItem.getData(), oldSelections); // was it selected before?
- //if (debug)
- //logDebugMsg("was selected? " + wasSelected);
- } else {
- // else interesting case ... we are showing the parent, but can't find the child!
- }
- if (move) {
- Object[] srcObjects = null;
- if (multiSource)
- srcObjects = event.getMultiSource();
- else {
- srcObjects = new Object[1];
- srcObjects[0] = event.getSource();
- }
- moveReferencedTreeItems(parentRefItem, srcObjects, event.getPosition());
- //refresh(parentRefItem.getData());
- } else // remove
- {
- if (oldItem != null)
- remove(oldItem.getData());
- }
- } else // add operation
- {
- if (!(((TreeItem) parentRefItem).getExpanded())) {
- refresh(parentRefItem.getData()); // delete cached GUIs
- //setExpandedState(parentRefItem,true); // not our job to expand here.
- } else if (afilterstring) {
- ISystemFilterReference fr = (ISystemFilterReference) parentRefItem.getData();
- ISystemFilterStringReference fsr = fr.getSystemFilterStringReference(filterstring);
- createTreeItem(parentRefItem, fsr, event.getPosition());
- //setSelection(new StructuredSelection(fsr),true);
- } else {
- Object data = parentRefItem.getData();
- if (data instanceof ISystemFilterContainerReference) {
- ISystemFilterContainerReference sfcr = (ISystemFilterContainerReference) data;
- ISystemFilterReference sfr = sfcr.getSystemFilterReference(ss, filter);
- createTreeItem(parentRefItem, sfr, event.getPosition());
- } else // hmm, could be parent is a subsystem, child is a filter in no-show-filter-pools mode
- {
- if (data instanceof ISystemFilterPoolReferenceManagerProvider) // that's a subsystem!
- {
- ISystemFilterPoolReferenceManagerProvider sfprmp = (ISystemFilterPoolReferenceManagerProvider) data;
- ISystemFilterPoolReferenceManager sfprm = sfprmp.getSystemFilterPoolReferenceManager();
- ISystemFilterReference sfr = sfprm.getSystemFilterReference(ss, filter);
- createTreeItem(parentRefItem, sfr, sfprm.getSystemFilterReferencePosition(sfr));
- }
- }
- }
- //refresh(parentRefItem.getData());
- }
-
- // STEP 4: DECIDE WHAT TO SELECT:
-
- // 4a. ADD ... only select if parent of new filter was previously selected...
- if (add && isSelected(parentRefItem.getData(), oldSelections)) {
- if (debug) logDebugMsg(".........that parent was previously selected"); //$NON-NLS-1$
- // .... YES, SO SELECT NEW FILTER'S REFERENCE
- Item filterItem = (Item) internalFindReferencedItem(parentRefItem, afilterstring ? (Object) filterstring : (Object) filter, 1); // start at filter's parent, search for filter
- if (filterItem == null) {
- if (debug) logDebugMsg("Hmm, didn't find new filter's reference!"); //$NON-NLS-1$
- } else {
- if (debug) logDebugMsg(".........Trying to set selection to " + filterItem.getData()); //$NON-NLS-1$
- setSelection(new StructuredSelection(filterItem.getData()), true);
- }
- }
- // 4b. DELETE ... select parent if deleted filter was previously selected
- else if (delete && wasSelected) {
- setSelection(new StructuredSelection(parentRefItem.getData())); // select parent
- }
- // 4c. MOVE ... only select if any of moved references were previously selected...
- else if (move && wasSelected && !afilterstring) {
- ISystemFilter[] filters = (ISystemFilter[]) event.getMultiSource();
- if (filters != null) {
- ISystemFilterReference[] newRefs = new ISystemFilterReference[filters.length];
- for (int idx = 0; idx < newRefs.length; idx++) {
- Widget w = internalFindReferencedItem(parentRefItem, filters[idx], 1);
- newRefs[idx] = (ISystemFilterReference) ((Item) w).getData();
- }
- setSelection(new StructuredSelection(newRefs), true);
- }
- } else if (move && wasSelected && afilterstring) {
- ISystemFilterString[] filterStrings = (ISystemFilterString[]) event.getMultiSource();
- if (filterStrings != null) {
- ISystemFilterStringReference[] newRefs = new ISystemFilterStringReference[filterStrings.length];
- for (int idx = 0; idx < newRefs.length; idx++) {
- Widget w = internalFindReferencedItem(parentRefItem, filterStrings[idx], 1);
- newRefs[idx] = (ISystemFilterStringReference) ((Item) w).getData();
- }
- setSelection(new StructuredSelection(newRefs), true);
- }
- }
-
- } else if (debug) logDebugMsg("Did not find parent ref " + parent); //$NON-NLS-1$
- }
-
- /**
- * Move existing items a given number of positions within the same node.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- */
- protected void moveReferencedTreeItems(Widget parentItem, Object[] masterSrc, int delta) {
- int[] oldPositions = new int[masterSrc.length];
- Item[] oldItems = new Item[masterSrc.length];
- Object[] src = new Object[masterSrc.length];
-
- for (int idx = 0; idx < src.length; idx++) {
- oldItems[idx] = (Item) internalFindReferencedItem(parentItem, masterSrc[idx], 1);
- src[idx] = oldItems[idx].getData();
- }
- Item[] children = null;
- if (parentItem instanceof Item) {
- children = getItems((Item) parentItem);
- } else
- children = getChildren(parentItem);
-
- for (int idx = 0; idx < src.length; idx++) {
- oldPositions[idx] = getTreeItemPosition(oldItems[idx], children) + 1;
- //logDebugMsg("::: Old position : " + oldPositions[idx]);
- }
-
- if (delta > 0) // moving down, process backwards
- {
- for (int idx = src.length - 1; idx >= 0; idx--) {
- //logDebugMsg("DN: Old position : " + oldPositions[idx] + ", new position : " + (oldPositions[idx]+delta));
- moveTreeItem(parentItem, oldItems[idx], src[idx], oldPositions[idx] + delta);
- }
- } else // moving up, process forewards
- {
- for (int idx = 0; idx < src.length; idx++) {
- //logDebugMsg("UP: Old position : " + oldPositions[idx] + ", new position : " + (oldPositions[idx]+delta-1));
- moveTreeItem(parentItem, oldItems[idx], src[idx], oldPositions[idx] + delta - 1);
- }
- }
- }
-
- /**
- * Recursively tries to find a reference to the given referenced item
- *
- * @param parent the parent item at which to start the search.
- * @param element the master element to which we want to find a tree item which references it
- * @param searchLimit how deep to search
- */
- protected Widget internalFindReferencedItem(Widget parent, Object element, int searchLimit) {
- previousItem = null;
- searchDepth = 0;
- return recursiveInternalFindReferencedItem(parent, element, searchLimit);
- }
-
- /**
- * Recursively tries to find a reference the given filtercontainer
- * Limits search depth to when we find an item that is not a connection,
- * subsystem, filter pool, filter or filter string.
- * @param parent the parent item at which to start the search.
- * @param element the master element to which we want to find a tree item which references it
- * @param searchLimit how deep to search
- */
- protected Widget recursiveInternalFindReferencedItem(Widget parent, Object element, int searchLimit) {
- // compare with node
- Object data = parent.getData();
- if ((data != null) && (data instanceof IRSEBaseReferencingObject)) {
- IRSEBaseReferencingObject refingData = (IRSEBaseReferencingObject) data;
- Object refedData = refingData.getReferencedObject();
- //logDebugMsg("data is a refing obj to " + refingData);
- if (refedData == element)
- //if (refedData.equals(element))
- return parent;
- else
- previousItem = parent;
- }
- // recurse over children if we are listing a subsystem or connection or
- // filter framework reference object, and nesting limit not reached.
- if (((data instanceof ISubSystem) || (data instanceof IHost) || (data instanceof ISystemFilterContainer) || (data instanceof ISystemFilterContainerReference) || (data instanceof ISystemFilterStringReference))
- && (searchDepth < searchLimit)) {
- ++searchDepth;
- int oldDepth = searchDepth;
- Item[] items = getChildren(parent);
- for (int i = 0; (i < items.length); i++) {
- Widget o = recursiveInternalFindReferencedItem(items[i], element, searchLimit);
- if (o != null) return o;
- searchDepth = oldDepth;
- }
- }
- return null;
- }
-
- /**
- * Recursively tries to find an item starting at the given item.
- * (base viewer classes do not offer a relative search!)
- *
- * @param parent the parent item at which to start the search.
- * @param element the element to match on. Matches on "==" versus equals()
- */
- protected Widget internalFindRelativeItem(Widget parent, Object element, int searchLimit) {
- searchDepth = 0;
- return recursiveInternalFindRelativeItem(parent, element, searchLimit);
- }
-
- /**
- * Recursively tries to find an item starting at the given item.
- * (base viewer classes do not offer a relative search!)
- *
- * @param parent the parent item at which to start the search.
- * @param element the element to match on. Matches on "==" versus equals()
- */
- protected Widget recursiveInternalFindRelativeItem(Widget parent, Object element, int searchLimit) {
- // compare with node
- Object data = parent.getData();
- if ((data != null) && (data == element)) return parent;
- // recurse over children
- if (searchDepth < searchLimit) {
- ++searchDepth;
- int oldDepth = searchDepth;
- Item[] items = getChildren(parent);
- for (int i = 0; i < items.length; i++) {
- Widget o = recursiveInternalFindRelativeItem(items[i], element, searchLimit);
- if (o != null) return o;
- searchDepth = oldDepth;
- }
- }
- return null;
- }
-
- protected ISystemRemoteElementAdapter getRemoteData(Item item, Object rawData) {
- if (rawData != null)
- return getRemoteAdapter(rawData);
- else
- return null;
- }
-
- /**
- * Find the first binary-match or name-match of remote object, given its absolute name.
- * @param remoteObjectName The absolute name of the remote object to find.
- * @param subsystem The subsystem of the remote object to find. Optional.
- * @param parentItem The parent item at which to start the search. Optional.
- * @return TreeItem hit if found
- */
- public Item findFirstRemoteItemReference(String remoteObjectName, ISubSystem subsystem, Item parentItem) {
- //Vector matches = new Vector();
- Item match = null;
- if (parentItem == null)
- //findAllRemoteItemReferences(remoteObjectName, null, subsystem, matches);
- match = internalFindFirstRemoteItemReference(remoteObjectName, null, subsystem);
- else {
- //recursiveFindAllRemoteItemReferences(parentItem, remoteObjectName, null, subsystem, matches);
- match = recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, null, subsystem);
- if (debugRemote) System.out.println("Returning " + match + " from findFirstRemoteItemReference(1,2,3)"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- //if (matches.size() > 0)
- // return (Item)matches.elementAt(0);
- //else
- // return null;
- return match;
- }
-
- /**
- * Find the first binary-match or name-match of a remote object, given its binary object.
- * @param remoteObject - The remote object to find.
- * @param parentItem - Optionally, the parent item to start the search at
- * @return TreeItem hit if found
- */
- public Item findFirstRemoteItemReference(Object remoteObject, Item parentItem) {
- //Vector matches = new Vector();
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(remoteObject);
- if (adapter == null) return null;
- Item match = null;
- ISubSystem subsystem = adapter.getSubSystem(remoteObject);
- String remoteObjectName = adapter.getAbsoluteName(remoteObject);
- if (parentItem == null)
- //findAllRemoteItemReferences(remoteObjectName, remoteObject, subsystem, matches);
- match = internalFindFirstRemoteItemReference(remoteObjectName, remoteObject, subsystem);
- else {
- //recursiveFindAllRemoteItemReferences(parentItem, remoteObjectName, remoteObject, subsystem, matches);
- match = recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, remoteObject, subsystem);
- if (debugRemote) System.out.println("Returning " + match + " from findFirstRemoteItemReference(1,2)"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- //if (matches.size() > 0)
- // return (Item)matches.elementAt(0);
- //else
- // return null;
- return match;
- }
-
- /**
- * Recursively tries to find a given remote object. Since the object memory object
- * for a remote object is not dependable we call getAbsoluteName() on the adapter to
- * do the comparisons. Note this does not take into account the parent connection or
- * subsystem or filter, hence you must know where to start the search, else you risk
- * finding the wrong one.
- *
- * @param element the remote object to which we want to find a tree item which references it. Can be a string or an object
- * @param elementObject the actual remote element to find, for binary matching, optionally for cases when element is a string
- * @param matches the vector to populate with hits
- */
- protected Vector findAllRemoteItemReferences(Object element, Object elementObject, Vector matches) {
- String searchString = null;
- ISubSystem subsystem = null;
- if (element instanceof String)
- searchString = (String) element;
- else {
- if (elementObject == null) elementObject = element;
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(element);
- if (adapter == null) return matches;
- subsystem = adapter.getSubSystem(element);
- searchString = adapter.getAbsoluteName(element);
- }
- Tree tree = getTree();
- Item[] roots = tree.getItems();
- if (roots == null) return matches;
- if (matches == null) matches = new Vector();
- for (int idx = 0; idx < roots.length; idx++) {
- matches = recursiveFindAllRemoteItemReferences(roots[idx], searchString, elementObject, subsystem, matches);
- }
- return matches;
- }
-
- /**
- * Recursively tries to find all occurrences of a given remote object, starting at the tree root.
- * Since the object memory object for a remote object is not dependable we call getAbsoluteName()
- * on the adapter to do the comparisons.
- * <p>
- * This overload takes a string and a subsystem.
- *
- * @param searchString the absolute name of the remote object to which we want to find a tree item which references it.
- * @param elementObject the actual remote element to find, for binary matching
- * @param subsystem optional subsystem to search within
- * @param matches the vector to populate with hits
- */
- protected Vector findAllRemoteItemReferences(String searchString, Object elementObject, ISubSystem subsystem, Vector matches) {
- Tree tree = getTree();
- Item[] roots = tree.getItems();
- if (roots == null) return matches;
- if (matches == null) matches = new Vector();
- for (int idx = 0; idx < roots.length; idx++)
- matches = recursiveFindAllRemoteItemReferences(roots[idx], searchString, elementObject, subsystem, matches);
- return matches;
- }
-
- /**
- * Recursively tries to find the first occurrence of a given remote object, starting at the tree root.
- * Optionally scoped to a specific subsystem.
- * Since the object memory object for a remote object is not dependable we call getAbsoluteName()
- * on the adapter to do the comparisons.
- * <p>
- * This overload takes a string and a subsystem.
- *
- * @param searchString the absolute name of the remote object to which we want to find a tree item which references it.
- * @param elementObject the actual remote element to find, for binary matching
- * @param subsystem optional subsystem to search within
- * @return TreeItem hit if found
- */
- protected Item internalFindFirstRemoteItemReference(String searchString, Object elementObject, ISubSystem subsystem) {
- Item[] roots = getTree().getItems();
- if ((roots == null) || (roots.length == 0)) return null;
- Item match = null;
- if (debugRemote) {
- System.out.println("Inside internalFindFirstRemoteItemReference for searchString: " + searchString + ", subsystem null? " + (subsystem == null) + ", nbr roots = " + roots.length); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- for (int idx = 0; (match == null) && (idx < roots.length); idx++) {
- match = recursiveFindFirstRemoteItemReference(roots[idx], searchString, elementObject, subsystem);
- if (debugRemote) System.out.println("...Inside internalFindFirstRemoteItemReference. Result of searching root " + idx + ": " + roots[idx].getText() + ": " + match); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- if (debugRemote) {
- System.out.println("...Inside internalFindFirstRemoteItemReference. Returning " + match); //$NON-NLS-1$
- if (match != null) System.out.println("......set bp here"); //$NON-NLS-1$
- }
- return match;
- }
-
- /**
- * Recursively tries to find all references to a remote object.
- * @param parent the parent item at which to start the search.
- * @param elementName the absolute name of the remote element to find
- * @param elementObject the actual remote element to find, for binary matching
- * @param subsystem optional subsystem to search within
- * @param occurrences the vector to populate with hits
- */
- protected Vector recursiveFindAllRemoteItemReferences(Item parent, String elementName, Object elementObject, ISubSystem subsystem, Vector occurrences) {
- Object rawData = parent.getData();
- ISystemRemoteElementAdapter remoteAdapter = null;
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
- if (rawData != null) remoteAdapter = getRemoteAdapter(rawData);
- // -----------------------------------------------------------------------
- // if this is a remote object, test if it is the one we are looking for...
- // -----------------------------------------------------------------------
- if (remoteAdapter != null) {
- // first test for binary match
- if (elementObject == rawData) {
- occurrences.addElement(parent); // found a match!
- if (debugRemote) System.out.println("Find All: Remote item binary match found"); //$NON-NLS-1$
- return occurrences; // no point in checking the kids
- }
- // now test for absolute name match
- String fqn = remoteAdapter.getAbsoluteName(rawData);
- if (debugRemote) System.out.println("TESTING FINDALL: '" + fqn + "' vs '" + elementName + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if ((fqn != null) && fqn.equals(elementName)) {
- occurrences.addElement(parent); // found a match!
- if (debugRemote) System.out.println("...and remote item name match found"); //$NON-NLS-1$
- return occurrences; // no point in checking the kids
- }
- }
- // -------------------------------------------------------------------------
- // if we have been given a subsystem to restrict to, that is a hint to us...
- // -------------------------------------------------------------------------
- else if ((rawData != null) && (subsystem != null)) // test for hints we are in the wrong place
- {
- // if we are currently visiting a subsystem, and that subsystem is not from the same
- // factory, then we can assume the remote object occurrences we are looking for are
- // not to be found within this branch...
- if ((rawData instanceof ISubSystem) && (((ISubSystem) rawData).getSubSystemConfiguration() != subsystem.getSubSystemConfiguration())) {
- return occurrences; // they don't match, so don't bother checking the kids
- }
- // if we are currently visiting a connection, and that connection's hostname is not the same
- // as that of our given subsystem, then we can assume the remote object occurrences we are
- // looking for are not to be found within this branch...
- else if ((rawData instanceof IHost) && (!((IHost) rawData).getHostName().equals(subsystem.getHost().getHostName()))) {
- return occurrences; // they don't match, so don't bother checking the kids
- }
- }
- // recurse over children
- Item[] items = getChildren(parent);
- for (int i = 0; (i < items.length); i++) {
- if (!items[i].isDisposed()) occurrences = recursiveFindAllRemoteItemReferences(items[i], elementName, elementObject, subsystem, occurrences);
- }
- return occurrences;
- }
-
- /**
- * Recursively tries to find the first references to a remote object.
- * This search is restricted to the given subsystem, if given.
- * @param parent the parent item at which to start the search.
- * @param elementName the absolute name of the remote element to find
- * @param elementObject the actual remote element to find, for binary matching
- * @param subsystem optional subsystem to search within
- * @return TreeItem match if found, null if not found.
- */
- protected Item recursiveFindFirstRemoteItemReference(Item parent, String elementName, Object elementObject, ISubSystem subsystem) {
- Object rawData = parent.getData();
- ISystemRemoteElementAdapter remoteAdapter = null;
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
- if (rawData != null) remoteAdapter = getRemoteAdapter(rawData);
- // -----------------------------------------------------------------------
- // if this is a remote object, test if it is the one we are looking for...
- // -----------------------------------------------------------------------
- if (remoteAdapter != null) {
- // first test for binary match
- if (elementObject == rawData) {
- if (debugRemote) System.out.println("Remote item binary match found"); //$NON-NLS-1$
- return parent; // return the match
- }
- // now test for absolute name match
- String fqn = remoteAdapter.getAbsoluteName(rawData);
- if (debugRemote) System.out.println("TESTING FINDFIRST: '" + fqn + "' vs '" + elementName + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if ((fqn != null) && fqn.equals(elementName)) {
- if ((subsystem != null) && (subsystem == remoteAdapter.getSubSystem(rawData))) {
- if (debugRemote) System.out.println("Remote item name match found and subsystems matched"); //$NON-NLS-1$
- return parent; // return the match
- } else if (subsystem == null) {
- if (debugRemote) System.out.println("Remote item name match found and subsystem null"); //$NON-NLS-1$
- return parent;
- } else if (debugRemote) System.out.println("Remote item name match found but subsystem mismatch"); //$NON-NLS-1$
- }
- }
- // -------------------------------------------------------------------------
- // if we have been given a subsystem to restrict to, that is a hint to us...
- // -------------------------------------------------------------------------
- else if ((rawData != null) && (subsystem != null)) // test for hints we are in the wrong place
- {
- // if we are currently visiting a subsystem, and that subsystem is not from the same
- // factory, then we can assume the remote object occurrences we are looking for are
- // not to be found within this branch...
- if ((rawData instanceof ISubSystem) && (rawData != subsystem)) {
- return null; // they don't match, so don't bother checking the kids
- }
- // if we are currently visiting a connection, and that connection's hostname is not the same
- // as that of our given subsystem, then we can assume the remote object occurrences we are
- // looking for are not to be found within this branch...
- else if ((rawData instanceof IHost) && !((IHost) rawData).getHostName().equals(subsystem.getHost().getHostName())) {
- return null; // they don't match, so don't bother checking the kids
- }
- }
- // recurse over children
- Item[] items = getChildren(parent);
- Item match = null;
- for (int i = 0; (match == null) && (i < items.length); i++) {
- if (!items[i].isDisposed()) match = recursiveFindFirstRemoteItemReference(items[i], elementName, elementObject, subsystem);
- }
- return match;
- }
-
- /**
- * Recursively tries to find all filters affected by a given remote object.
- *
- * @param elementName the absolute name of the remote object to which we want to find a filters which result in it.
- * @param subsystem The subsystem which owns the remote resource. Necessary to scope the search for impacted filters.
- * @param matches the vector to populate with hits. Can be null, in which case a new vector is created.
- *
- * @return Vector of FilterMatch objects for each affected filter
- */
- protected Vector findAllRemoteItemFilterReferences(String elementName, ISubSystem subsystem, Vector matches) {
- Tree tree = getTree();
- Item[] roots = tree.getItems();
- if (roots == null) return matches;
- if (matches == null) matches = new Vector();
- for (int idx = 0; idx < roots.length; idx++)
- matches = recursiveFindAllRemoteItemFilterReferences(roots[idx], elementName, subsystem, matches);
- return matches;
-
- }
-
- /**
- * Recursively tries to find all filters which are affected by a given remote object, such that we can subsequently refresh that filter
- * after a remote resource change.
- * @param parent the parent item at which to start the search.
- * @param elementName the absolute name of the remote element that has been created, changed, deleted or renamed.
- * @param subsystem The subsystem which owns the remote resource. Necessary to scope the search for impacted filters.
- * @param occurrences the vector to populate with hits
- *
- * @return Vector of FilterMatch objects for each affected filter
- */
- protected Vector recursiveFindAllRemoteItemFilterReferences(Item parent, String elementName, ISubSystem subsystem, Vector occurrences) {
- Object rawData = parent.getData();
-
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
-
- // ---------------------------------------------------------------------
- // if this is a filter object, test for two things:
- // #1. does this filter list this remote object if expanded/refreshed?
- // #2. does this filter list the contents of this remote object?
- // ---------------------------------------------------------------------
- if (rawData instanceof ISystemFilterReference) {
- ISystemFilterReference filterRef = (ISystemFilterReference) rawData;
- if (filterRef.getReferencedFilter().isPromptable()) return occurrences;
- if (debugRemote) System.out.println("Testing filter: " + filterRef.getReferencedFilter().getName()); //$NON-NLS-1$
- ISubSystem fss = (ISubSystem) filterRef.getProvider();
- if (fss != null) // should never happen!!
- {
- // #1
- if (fss.doesFilterMatch(filterRef.getReferencedFilter(), elementName)) {
- occurrences.addElement(new FilterMatch((TreeItem) parent, true)); // found a match!
- if (debugRemote) System.out.println("...Filter match found for " + elementName + ": " + filterRef.getReferencedFilter().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- return occurrences; // no point in checking the kids
- }
- // #2
- else if (fss.doesFilterListContentsOf(filterRef.getReferencedFilter(), elementName)) {
- occurrences.addElement(new FilterMatch((TreeItem) parent, false)); // found a match!
- if (debugRemote) System.out.println("...Filter content match found for " + elementName + ": " + filterRef.getReferencedFilter().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- return occurrences; // no point in checking the kids
- } else if (debugRemote) System.out.println("... no match on the filter for element name " + elementName); //$NON-NLS-1$
- }
- }
- // ----------------------------------------------------------------------
- // if this is not a filter, then before recursing on its kids, check for
- // hints that such recursion is a waste of time, for performance reasons
- // ----------------------------------------------------------------------
- else if (rawData != null) {
- // ---------------------------------------------------------------------------------
- // if we are currently visiting a subsystem, and that subsystem is not from the same
- // factory, then we can assume the remote object occurrences we are looking for are
- // not to be found within this branch...
- // ---------------------------------------------------------------------------------
- if ((rawData instanceof ISubSystem) && (subsystem != null)) {
- ISubSystem currSS = (ISubSystem) rawData;
- if (currSS.getSubSystemConfiguration() != subsystem.getSubSystemConfiguration()) return occurrences; // they don't match, so don't bother checking the kids
- }
- // -----------------------------------------------------------------------------------------
- // if we are currently visiting a connection, and that connection's hostname is not the same
- // as that of our given subsystem, then we can assume the remote object occurrences we are
- // looking for are not to be found within this branch...
- // -----------------------------------------------------------------------------------------
- else if (rawData instanceof IHost) {
- IHost currConn = (IHost) rawData;
- if (!currConn.getHostName().equals(subsystem.getHost().getHostName())) return occurrences; // they don't match, so don't bother checking the kids
- }
- // skip the new connection prompts...
- else if (rawData instanceof ISystemPromptableObject)
- return occurrences;
- // ------------------------------------------------------------------------
- // if this is a remote object, we are too deep into this branch of the tree
- // for filters, so stop here
- // ------------------------------------------------------------------------
- else if (getRemoteAdapter(rawData) != null) return occurrences;
- }
- // recurse over children
- Item[] items = getChildren(parent);
- for (int i = 0; (i < items.length); i++) {
- occurrences = recursiveFindAllRemoteItemFilterReferences(items[i], elementName, subsystem, occurrences);
- }
- return occurrences;
- }
-
- /**
- * Inner class to ensapsulate what is put in the vector for the recursiveFindAllRemoteItemFilterReferences() method.
- */
- protected class FilterMatch {
- protected boolean filterListsElement;
- protected boolean filterListsElementContents;
- protected TreeItem match;
-
- FilterMatch(TreeItem match, boolean filterListsElement) {
- this.match = match;
- this.filterListsElement = filterListsElement;
- this.filterListsElementContents = !filterListsElement;
- }
-
- boolean listsElement() {
- return filterListsElement;
- }
-
- boolean listsElementContents() {
- return filterListsElementContents;
- }
-
- TreeItem getTreeItem() {
- return match;
- }
- }
-
- /**
- * --------------------------------------------------------------------------------
- * For many actions we have to walk the selection list and examine each selected
- * object to decide if a given common action is supported or not.
- * <p>
- * Walking this list multiple times while building the popup menu is a performance
- * hit, so we have this common method that does it only once, setting instance
- * variables for all of the decisions we are in interested in.
- * --------------------------------------------------------------------------------
- */
- protected void scanSelections(String whereFrom) {
- //System.out.println("inside scanSelections. Called from " + whereFrom);
- // here are the instance variables we set...
- // protected boolean selectionShowRefreshAction;
- // protected boolean selectionShowOpenViewActions;
- // protected boolean selectionShowDeleteAction;
- // protected boolean selectionShowRenameAction;
- // protected boolean selectionIsRemoteObject;
- // protected boolean selectionEnableDeleteAction;
- // protected boolean selectionEnableRenameAction;
-
-
- // initial these variables to true. Then if set to false even once, leave as false always...
- selectionShowRefreshAction = true;
- selectionShowOpenViewActions = true;
- selectionShowGenericShowInTableAction = true;
- selectionShowDeleteAction = true;
- selectionShowRenameAction = true;
- selectionEnableDeleteAction = true;
- selectionEnableRenameAction = true;
- selectionIsRemoteObject = true;
-
- selectionHasAncestorRelation = hasAncestorRelationSelection();
-
-
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- SystemRemoteElementResourceSet lastSet = null;
- while (elements.hasNext()) {
-
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (adapter == null) continue;
-
- if (selectionShowRefreshAction) selectionShowRefreshAction = adapter.showRefresh(element);
-
- if (selectionShowOpenViewActions) selectionShowOpenViewActions = adapter.showOpenViewActions(element);
-
- if (selectionShowGenericShowInTableAction) selectionShowGenericShowInTableAction = adapter.showGenericShowInTableAction(element);
-
- if (selectionShowDeleteAction) selectionShowDeleteAction = adapter.showDelete(element);
-
- if (selectionShowRenameAction) selectionShowRenameAction = adapter.showRename(element);
-
- if (selectionEnableDeleteAction) selectionEnableDeleteAction = selectionShowDeleteAction && adapter.canDelete(element) && !selectionHasAncestorRelation;
- //System.out.println("ENABLE DELETE SET TO " + selectionEnableDeleteAction);
-
- if (selectionEnableRenameAction) selectionEnableRenameAction = selectionShowRenameAction && adapter.canRename(element);
-
- if (selectionIsRemoteObject) selectionIsRemoteObject = (getRemoteAdapter(element) != null);
-
- if (selectionIsRemoteObject && !selectionFlagsUpdated) {
- ISubSystem srcSubSystem = adapter.getSubSystem(element);
- if (srcSubSystem.isConnected() || element instanceof ISystemFilterReference || element instanceof ISubSystem)
- {
- SystemRemoteElementResourceSet set = null;
- if (lastSet != null)
- {
- if (lastSet.getAdapter() == adapter && lastSet.getSubSystem() == srcSubSystem)
- {
- set = lastSet;
- }
- }
- if (set == null)
- {
- set = getSetFor(srcSubSystem, adapter);
- lastSet = set;
- }
- set.addResource(element);
- }
- }
-
- }
-
-
- selectionFlagsUpdated = true;
- //System.out.println("Inside scan selections: selectionShowOpenViewActions = " + selectionShowOpenViewActions);
-
- }
-
- /**
- * Decides whether to even show the refresh menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showRefresh() {
- return selectionShowRefreshAction;
- /*
- boolean ok = true;
- IStructuredSelection selection= (IStructuredSelection)getSelection();
- Iterator elements= selection.iterator();
- int count = 0;
- while (ok && elements.hasNext())
- {
- Object element= elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (!adapter.showRefresh(element))
- ok = false;
- }
- return ok;
- */
- }
-
- /**
- * Decides whether to even show the "open in new perspective" menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showOpenViewActions() {
- return selectionShowOpenViewActions;
- }
-
- /**
- * Decides whether to even show the generic "show in table" menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showGenericShowInTableAction() {
- return selectionShowGenericShowInTableAction;
- }
-
- /**
- * Decides whether all the selected objects are remote objects or not
- * Assumes scanSelections() has already been called
- */
- protected boolean areSelectionsRemote() {
- return selectionIsRemoteObject;
- }
-
- // ---------------------------
- // ISYSTEMDELETETARGET METHODS
- // ---------------------------
-
- /**
- * Required method from ISystemDeleteTarget.
- * Decides whether to even show the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showDelete() {
- if (!selectionFlagsUpdated) {
- //System.out.println("Inside showDelete. selectFlagsUpdated = false");
- scanSelections("showDelete"); //$NON-NLS-1$
- }
- return selectionShowDeleteAction;
- }
-
- /**
- * Required method from ISystemDeleteTarget
- * Decides whether to enable the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canDelete() {
- if (!selectionFlagsUpdated) {
- //System.out.println("Inside canDelete. selectFlagsUpdated = false");
- scanSelections("canDelete"); //$NON-NLS-1$
- }
- return selectionEnableDeleteAction;
- }
-
- /**
- * Required method from ISystemDeleteTarget
- */
- public boolean doDelete(IProgressMonitor monitor) {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- //int selectedCount = selection.size();
- //Object multiSource[] = new Object[selectedCount];
- //int idx = 0;
- Object element = null;
- //Object parentElement = getSelectedParent();
- ISystemViewElementAdapter adapter = null;
- boolean ok = true;
- boolean anyOk = false;
- Vector deletedVector = new Vector();
-
- // keep track of the current set
- SystemRemoteElementResourceSet set = null;
-
- try {
- while (ok && elements.hasNext()) {
- element = elements.next();
- //multiSource[idx++] = element;
- adapter = getAdapter(element);
- if (getRemoteAdapter(element) != null) continue;
- ok = adapter.doDelete(getShell(), element, monitor);
- if (ok) {
- anyOk = true;
- deletedVector.addElement(element);
- }
- }
- // now we have things divided into sets
- // delete 1 set at a time
- for (int s = 0; s < _setList.size() && ok; s++) {
- set = (SystemRemoteElementResourceSet) _setList.get(s);
- ISubSystem srcSubSystem = set.getSubSystem();
- ISystemViewElementAdapter srcAdapter = set.getAdapter();
-
- if (srcSubSystem != null) {
-
- // this call can throw an exception
- ok = srcAdapter.doDeleteBatch(getShell(), set.getResourceSet(), monitor);
-
- if (ok) {
- anyOk = true;
- deletedVector.addAll(set.getResourceSet());
- }
- }
- }
- } catch (SystemMessageException exc) {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- } catch (Exception exc) {
- String msg = exc.getMessage();
- if ((msg == null) || (exc instanceof ClassCastException)) msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg));
-
- // refresh all parents if selection is remote objects
- if (selectionIsRemoteObject) {
-
- // we only need to iterate over the last set in the list of sets since presumably the sets before did not cause any exceptions
- // if elements in the list before were deleted successfully, then the code after this catch block will handle them (by firing delete events)
- // for the current set that caused the exception, we refresh the parents of the elements in the set (since we don't know which
- // elements in the set may have been deleted successfully before the exception occurred).
- if (set != null) {
- List list = set.getResourceSet();
-
- if (list != null && list.size() > 0) {
-
- Iterator iter = list.iterator();
-
- Vector refreshedList = new Vector();
-
- while (iter.hasNext()) {
- Object obj = iter.next();
- ISystemViewElementAdapter adp = getAdapter(obj);
- Object parent = adp.getParent(obj);
-
- if ((parent != null) && !(refreshedList.contains(parent))) {
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(parent, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null);
- sr.fireEvent(event);
- refreshedList.add(parent);
- }
- }
- }
- }
- }
-
- ok = false;
- }
- //System.out.println("in doDelete. Any ok? " + anyOk + ", selectionIsRemoteObject? " + selectionIsRemoteObject);
- if (anyOk) {
- if (selectionIsRemoteObject)
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, deletedVector, null, null, null, this);
- else {
- Object[] deleted = new Object[deletedVector.size()];
- for (int idx = 0; idx < deleted.length; idx++)
- deleted[idx] = deletedVector.elementAt(idx);
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(deleted, ISystemResourceChangeEvents.EVENT_DELETE_MANY, getSelectedParent()));
- }
- }
- return ok;
- }
-
- // ---------------------------
- // ISYSTEMRENAMETARGET METHODS
- // ---------------------------
-
- /**
- * Required method from ISystemRenameTarget.
- * Decides whether to even show the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showRename() {
- return selectionShowRenameAction;
- }
-
- /**
- * Required method from ISystemRenameTarget
- * Decides whether to enable the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canRename() {
- if (!selectionFlagsUpdated) scanSelections("canRename"); //$NON-NLS-1$
- return selectionEnableRenameAction;
- }
-
- /**
- * Required method from ISystemRenameTarget
- */
- public boolean doRename(String[] newNames) {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- Object element = null;
- Object parentElement = getSelectedParent();
- ISystemViewElementAdapter adapter = null;
- ISystemRemoteElementAdapter remoteAdapter = null;
- String oldFullName = null;
- boolean ok = true;
- try {
- int nameIdx = 0;
- while (ok && elements.hasNext()) {
- element = elements.next();
- adapter = getAdapter(element);
- remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter != null) oldFullName = remoteAdapter.getAbsoluteName(element); // pre-rename
- ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
- if (ok) {
- if (remoteAdapter != null)
- {
- ISubSystem ss = adapter.getSubSystem(element);
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, ss, oldFullName, this);
- }
-
- else
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
- }
- }
- } catch (SystemMessageException exc) {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- } catch (Exception exc) {
- //String msg = exc.getMessage();
- //if ((msg == null) || (exc instanceof ClassCastException))
- // msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), //msg),
- exc);
- ok = false;
- }
- return ok;
- }
-
- protected void logDebugMsg(String msg) {
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),msg);
- msg = this.getClass().getName() + ": " + msg; //$NON-NLS-1$
- SystemBasePlugin.logInfo(msg);
- System.out.println(msg);
- }
-
- // -----------------------------------------------------------------
- // ISystemSelectAllTarget methods to facilitate the global action...
- // -----------------------------------------------------------------
- /**
- * Return true if select all should be enabled for the given object.
- * For a tree view, you should return true if and only if the selected object has children.
- * You can use the passed in selection or ignore it and query your own selection.
- */
- public boolean enableSelectAll(IStructuredSelection selection) {
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items == null) || (items.length != 1)) // only allow for single selections
- return false;
-
- TreeItem ti = items[0];
- int count = getItemCount(ti);
- if (count == 1) // is it a dummy?
- {
- if ((getItems(ti)[0]).getData() == null) count = 0; // assume a dummy
- }
- return (count > 0);
- }
-
- /**
- * When this action is run via Edit->Select All or via Ctrl+A, perform the
- * select all action. For a tree view, this should select all the children
- * of the given selected object. You can use the passed in selected object
- * or ignore it and query the selected object yourself.
- */
- public void doSelectAll(IStructuredSelection selection) {
- Tree tree = getTree();
- TreeItem[] currSel = tree.getSelection();
- TreeItem[] childItems = currSel[0].getItems();
- if (childItems.length == 0) return;
- tree.setSelection(childItems);
- Object[] childObjects = new Object[childItems.length];
- for (int idx = 0; idx < childObjects.length; idx++)
- childObjects[idx] = childItems[idx].getData();
- fireSelectionChanged(new SelectionChangedEvent(this, new StructuredSelection(childObjects)));
- }
-
- // --------------------------------------------
- // ISystemTree methods to facilitate our GUI...
- // --------------------------------------------
- /**
- * This is called to ensure all elements in a multiple-selection have the same parent in the
- * tree viewer. If they don't we automatically disable all actions.
- * <p>
- * Designed to be as fast as possible by going directly to the SWT widgets
- */
- public boolean sameParent() {
- boolean same = true;
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items == null) || (items.length == 0)) return true;
- TreeItem prevParent = null;
- TreeItem currParent = null;
- for (int idx = 0; same && (idx < items.length); idx++) {
- currParent = items[idx].getParentItem();
- if ((idx > 0) && (currParent != prevParent))
- same = false;
- else {
- prevParent = currParent;
- }
- }
- return same;
- }
-
- protected boolean selectionHasAncestryRelationship() {
- if (selectionFlagsUpdated) return selectionHasAncestorRelation;
-
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- return hasSelectedAncestor(items);
- /*
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
-
- for (int idx = 0; idx < items.length; idx++) {
- TreeItem item = items[idx];
- // for (int c = 0; c < items.length; c++) {
- // if (item != items[c]) {
- if (isAncestorOf(item, items)) {
- return true;
- }
-// }
- // }
- }
- return false;
- */
- }
-
- protected boolean isAncestorOf(TreeItem container, TreeItem[] items) {
- TreeItem[] children = container.getItems();
- for (int i = 0; i < children.length; i++) {
- TreeItem child = children[i];
- for (int j = 0; j < items.length; j++)
- {
- TreeItem item = items[j];
- if (child == item) {
- return true;
- }
- else if (child.getItemCount() > 0)
- {
- if (isAncestorOf(child, items))
- {
- return true;
- }
- }
- }
- }
- return false;
- }
-
-
- protected boolean hasSelectedAncestor(TreeItem[] items) {
-
- List cleanParents = new ArrayList();
-
- for (int j = 0; j < items.length; j++)
- {
- TreeItem item = items[j];
- TreeItem parent = item.getParentItem();
- while (parent != null && !cleanParents.contains(parent))
- {
- if (isTreeItemSelected(parent))
- {
- return true;
- }
- else
- {
- cleanParents.add(parent);
- parent = parent.getParentItem();
- }
- }
- }
- return false;
- }
-
-
-
-
-
-
-/*
- protected boolean isAncestorOf(TreeItem container, TreeItem item) {
- TreeItem[] children = container.getItems();
- for (int i = 0; i < children.length; i++) {
- TreeItem child = children[i];
- if (child == item) {
- return true;
- } else if (child.getItemCount() > 0) {
- if (isAncestorOf(child, item)) {
- return true;
- }
- }
- }
- return false;
- }
-*/
-
- /**
- * This is called to accurately get the parent object for the current selection
- * for this viewer.
- * <p>
- * The getParent() method in the adapter is very unreliable... adapters can't be sure
- * of the context which can change via filtering and view options.
- */
- public Object getSelectedParent() {
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items == null) || (items.length == 0)) {
- return tree.getData();
- } else {
- TreeItem parentItem = items[0].getParentItem();
- if (parentItem != null)
- return parentItem.getData();
- else
- return tree.getData();
- }
- }
-
- /**
- * Return the TreeItem of the parent of the selected node. Or null if a root is selected.
- */
- public TreeItem getSelectedParentItem() {
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items == null) || (items.length == 0)) {
- return null;
- } else {
- return items[0].getParentItem();
- }
- }
-
- /**
- * This returns the element immediately before the first selected element in this tree level.
- * Often needed for enablement decisions for move up actions.
- */
- public Object getPreviousElement() {
- Object prevElement = null;
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items != null) && (items.length > 0)) {
- TreeItem item1 = items[0];
- TreeItem[] parentItems = null;
- TreeItem parentItem = item1.getParentItem();
- if (parentItem != null)
- parentItems = parentItem.getItems();
- else
- parentItems = item1.getParent().getItems();
- if (parentItems != null) {
- TreeItem prevItem = null;
- for (int idx = 0; (prevItem == null) && (idx < parentItems.length); idx++)
- if ((parentItems[idx] == item1) && (idx > 0)) prevItem = parentItems[idx - 1];
- if (prevItem != null) prevElement = prevItem.getData();
- }
- }
- return prevElement;
- }
-
- /**
- * This returns the element immediately after the last selected element in this tree level
- * Often needed for enablement decisions for move down actions.
- */
- public Object getNextElement() {
- Object nextElement = null;
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items != null) && (items.length > 0)) {
- TreeItem itemN = items[items.length - 1];
- TreeItem[] parentItems = null;
- TreeItem parentItem = itemN.getParentItem();
- if (parentItem != null)
- parentItems = parentItem.getItems();
- else
- parentItems = itemN.getParent().getItems();
- if (parentItems != null) {
- TreeItem nextItem = null;
- for (int idx = 0; (nextItem == null) && (idx < parentItems.length); idx++)
- if ((parentItems[idx] == itemN) && (idx < (parentItems.length - 1))) nextItem = parentItems[idx + 1];
- if (nextItem != null) nextElement = nextItem.getData();
- }
- }
- return nextElement;
- }
-
- /**
- * This is called to walk the tree back up to the roots and return the visible root
- * node for the first selected object.
- */
- public Object getRootParent() {
- Tree tree = getTree();
- TreeItem[] selectedItems = tree.getSelection();
- Object rootElement = null;
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- TreeItem item = selectedItems[0];
- TreeItem parentItem = item.getParentItem();
- if (parentItem == null) // item is a root element
- rootElement = item.getData();
- else
- while (rootElement == null) {
- item = parentItem;
- parentItem = item.getParentItem();
- if (parentItem == null) // item is a root element
- rootElement = item.getData();
- }
- }
- //logDebugMsg("getRootParent returned: "+rootElement);
- return rootElement;
- }
-
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- */
- public Object[] getElementNodes(Object element) {
- Widget w = findItem(element);
- if ((w != null) && (w instanceof TreeItem)) return getElementNodes((TreeItem) w);
- return null;
- }
-
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- * This flavour is optimized for the case when you have the tree item directly.
- */
- public Object[] getElementNodes(TreeItem item) {
- Vector v = new Vector();
- v.addElement(item.getData());
- while (item != null) {
- item = item.getParentItem();
- if (item != null) v.addElement(item.getData());
- }
- Object[] nodes = new Object[v.size()];
- for (int idx = 0; idx < nodes.length; idx++)
- nodes[idx] = v.elementAt(idx);
- return nodes;
- }
-
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- * This flavour returns a vector of TreeItem objects versus element objects.
- */
- public TreeItem[] getItemNodes(TreeItem item) {
- Vector v = new Vector();
- v.addElement(item);
- while (item != null) {
- item = item.getParentItem();
- if (item != null) v.addElement(item);
- }
- TreeItem[] nodes = new TreeItem[v.size()];
- for (int idx = 0; idx < nodes.length; idx++)
- nodes[idx] = (TreeItem) v.elementAt(idx);
- return nodes;
- }
-
- /**
- * Helper method to determine if a given object is currently selected.
- * Does consider if a child node of the given object is currently selected.
- */
- public boolean isSelectedOrChildSelected(Object parentElement) {
- boolean isSelected = false;
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- Widget w = findItem(parentElement);
- if (!(w instanceof TreeItem)) return true; // assume we have been given the root, which means any selection is a child
- TreeItem item = (TreeItem) w;
- // for every selected tree item, scan upwards to the root to see if
- // it or any of its parents are the given element.
- for (int idx = 0; !isSelected && (idx < selectedItems.length); idx++) {
- if (selectedItems[idx] instanceof TreeItem) {
- if (selectedItems[idx] == item)
- isSelected = true;
- else
- isSelected = searchToRoot((TreeItem) selectedItems[idx], item);
- }
- }
- }
- return isSelected;
- //return isSelected(element, (IStructuredSelection)getSelection());
- }
-
- /**
- * Override that takes a widget.
- */
- public boolean isTreeItemSelectedOrChildSelected(Widget w) {
- boolean isSelected = false;
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- if (!(w instanceof TreeItem)) return true; // assume we have been given the root, which means any selection is a child
- TreeItem item = (TreeItem) w;
- // for every selected tree item, scan upwards to the root to see if
- // it or any of its parents are the given element.
- for (int idx = 0; !isSelected && (idx < selectedItems.length); idx++) {
- if (selectedItems[idx] instanceof TreeItem) {
- if (selectedItems[idx] == item)
- isSelected = true;
- else
- isSelected = searchToRoot((TreeItem) selectedItems[idx], item);
- }
- }
- }
- return isSelected;
- //return isSelected(element, (IStructuredSelection)getSelection());
- }
-
- /**
- * Return the number of immediate children in the tree, for the given tree node
- */
- public int getChildCount(Object element) {
- if (getTree().isDisposed()) return 0;
- Widget w = findItem(element);
- if (w == null)
- return 0;
-
- // modified patch initially provided by Tobias Schwarz
- if (w instanceof TreeItem) {
- TreeItem ti = (TreeItem) w;
- int count = getItemCount((Item) w);
- int ignoreItems = 0;
- if (count > 0) {
- Item[] items = getItems(ti);
- for (int i=0; i<count; i++) {
- Object itemData = items[i].getData();
- if (itemData==null
- || itemData instanceof SystemMessageObject
- || itemData instanceof PendingUpdateAdapter
- ) {
- ignoreItems++;
- } else {
- break;
- }
- }
- }
- return count - ignoreItems;
- }
- return getItemCount((Control) w);
- }
-
- protected Widget doFindItem(Object element) {
- // compare with root
- Object root = getRoot();
- if (root == null) {
- return null;
- }
-
- Item[] items = getChildren(getControl());
- if (items != null) {
- for (int i = 0; i < items.length; i++) {
- Widget o = findExactItem(items[i], element);
- if (o != null) {
- return o;
- }
- }
- }
- return null;
- }
- private Widget findExactItem(Item parent, Object element) {
-
- // compare with node
- Object data = parent.getData();
- if (data != null) {
- if (data == element) {
- return parent;
- }
- }
- // recurse over children
- Item[] items = getChildren(parent);
- for (int i = 0; i < items.length; i++) {
- Item item = items[i];
- Widget o = findExactItem(item, element);
- if (o != null) {
- return o;
- }
- }
- return null;
- }
-
- /**
- * Return the tree item of the first selected object
- */
- protected TreeItem getFirstSelectedTreeItem() {
- // find the selected tree item...
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems == null) || (selectedItems.length == 0) || !(selectedItems[0] instanceof TreeItem)) return null;
- return (TreeItem) selectedItems[0];
- }
-
- /**
- * Refresh the given tree item node
- */
- protected void refreshTreeItem(TreeItem item) {
- // if we are already expanded, collapse and refresh to clear memory
- if (getExpanded(item)) {
- collapseNode(item.getData(), true);
- //setExpanded(selectedItem, false);
- //refreshItem(selectedItem, selectedItem.getData());
- }
- // ok, now time to force an expand...
- createChildren(item); // re-expand. this calls the content provider, which calls the getChildren() method in the adapter. That will call us back.
- item.setExpanded(true);
- }
-
- /**
- * Called when a property is updated and we need to inform the Property Sheet viewer.
- * There is no formal mechanism for this so we simulate a selection changed event as
- * this is the only event the property sheet listens for.
- */
- public void updatePropertySheet() {
- ISelection selection = getSelection();
- if (selection == null) return;
- // create an event
- SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());
- // fire the event
- fireSelectionChanged(event);
- }
-
- /**
- * Called to select an object within the tree, and optionally expand it
- */
- public void select(Object element, boolean expand) {
- setSelection(new StructuredSelection(element), true); // true => reveal
- if (expand) setExpandedState(element, true);
- }
-
- /**
- * Returns the tree item of the first selected object. Used for setViewerItem in a resource
- * change event.
- */
- public Item getViewerItem() {
- TreeItem[] selectedItems = getTree().getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0))
- return selectedItems[0];
- else
- return null;
- }
-
- /**
- * Returns true if any of the selected items are currently expanded
- */
- public boolean areAnySelectedItemsExpanded() {
- boolean expanded = false;
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- // for every selected tree item, see if it is currently expanded...
- for (int idx = 0; !expanded && (idx < selectedItems.length); idx++) {
- if (selectedItems[idx] instanceof TreeItem) {
- if (((TreeItem) selectedItems[idx]).getExpanded()) expanded = true;
- }
- }
- }
- return expanded;
- }
-
- /**
- * Returns true if any of the selected items are expandable but not yet expanded
- */
- public boolean areAnySelectedItemsExpandable() {
- boolean expandable = false;
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- // for every selected tree item, see if needs expanding...
- for (int idx = 0; !expandable && (idx < selectedItems.length); idx++) {
- if (selectedItems[idx] instanceof TreeItem) {
- if ((((TreeItem) selectedItems[idx]).getItemCount() > 0) && !((TreeItem) selectedItems[idx]).getExpanded()) expandable = true;
- }
- }
- }
- return expandable;
- }
-
- /**
- * Initialize drag and drop support for this view.
- *
- */
- protected void initDragAndDrop() {
- int ops = DND.DROP_COPY | DND.DROP_MOVE;
- Transfer[] transfers = new Transfer[] { PluginTransfer.getInstance(),
- /*ResourceTransfer.getInstance(),*/
- FileTransfer.getInstance(), EditorInputTransfer.getInstance() };
- addDragSupport(ops | DND.DROP_DEFAULT, transfers, new SystemViewDataDragAdapter(this));
- addDropSupport(ops | DND.DROP_DEFAULT, transfers, new SystemViewDataDropAdapter(this));
- }
-
- // ----------------------------------
- // Support for EXPAND TO-> ACTIONS...
- // ----------------------------------
- /**
- * Called when user selects an Expand To action to expand the selected remote object with a quick filter
- */
- public void expandTo(String filterString) {
- SystemViewPart svp = getSystemViewPart();
- if (svp == null) return;
- // find the selected tree item...
- TreeItem selectedItem = getFirstSelectedTreeItem();
- if (selectedItem == null) return;
- Object element = selectedItem.getData();
- ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter == null) return;
- // update our hashtables, keyed by object address and tree path...
- if (expandToFiltersByObject == null) expandToFiltersByObject = new Hashtable();
- if (expandToFiltersByTreePath == null) expandToFiltersByTreePath = new Hashtable();
- if (filterString != null)
- expandToFiltersByObject.put(selectedItem.getData(), filterString);
- else
- expandToFiltersByObject.remove(selectedItem.getData());
- if (filterString != null)
- expandToFiltersByTreePath.put(getItemPath(selectedItem), filterString);
- else
- expandToFiltersByTreePath.remove(getItemPath(selectedItem));
-
- // now refresh this tree item node...
- refreshTreeItem(selectedItem);
- }
-
- /**
- * Return the fully-qualified path up to the given item, expressible as a string
- */
- protected String getItemPath(TreeItem item) {
- StringBuffer idBuffer = new StringBuffer(getItemNodeID(item));
- TreeItem[] elementNodes = getItemNodes(item);
- if (elementNodes != null) {
- for (int idx = elementNodes.length - 1; idx >= 0; idx--) {
- item = elementNodes[idx];
- idBuffer.append(SystemViewPart.MEMENTO_DELIM + getItemNodeID(item));
- }
- }
- //System.out.println("MEMENTO HANDLE: " + idBuffer.toString());
- return idBuffer.toString();
- }
-
- /**
- * Return the string identifying this node in the tree
- */
- protected String getItemNodeID(TreeItem item) {
- //ISystemViewElementAdapter adapter = getAdapter(item.getData());
- //return adapter.getMementoHandle(item.getData());
- return item.getText();
- }
-
- /**
- * Callback from the input provider to test if the given node has expand-to filtering criteria
- */
- public String getExpandToFilter(Object element) {
- String filter = null;
- // for performance reasons, we first test for a binary match...
- if (expandToFiltersByObject != null) {
- filter = (String) expandToFiltersByObject.get(element);
- }
- // if binary match fails, look for tree path match...
- if ((filter == null) && (expandToFiltersByTreePath != null)) {
- Widget item = findItem(element);
- if ((item != null) && (item instanceof TreeItem)) {
- filter = (String) expandToFiltersByTreePath.get(getItemPath((TreeItem) item));
- if (filter != null) {
- if (expandToFiltersByObject == null) expandToFiltersByObject = new Hashtable();
- expandToFiltersByObject.put(element, filter); // so next time it will be faster
- }
- }
- }
- return filter;
- }
-
- /**
- * To support restoring state we need to write out to disk out current table that maps
- * tree items to their current expand-to filter. That means we need access to the table.
- */
- public Hashtable getExpandToFilterTable() {
- return expandToFiltersByTreePath;
- }
-
- /**
- * To support restoring state we need to write out to disk out current table that maps
- * tree items to their current expand-to filter. That means we need to be able to set the table.
- */
- public void setExpandToFilterTable(Hashtable ht) {
- expandToFiltersByTreePath = ht;
- }
-
- protected SystemRemoteElementResourceSet getSetFor(ISubSystem subSystem, ISystemViewElementAdapter adapter) {
- for (int i = 0; i < _setList.size(); i++) {
- SystemRemoteElementResourceSet set = (SystemRemoteElementResourceSet) _setList.get(i);
- if (set.getAdapter() == adapter && set.getSubSystem() == subSystem) {
- return set;
- }
- }
-
- // no existing set - create one
- SystemRemoteElementResourceSet newSet = new SystemRemoteElementResourceSet(subSystem, adapter);
- _setList.add(newSet);
- return newSet;
- }
-
- protected boolean usingElementMap() {
- return false;
- }
-
- public void add(Object parentElementOrTreePath, Object[] childElements) {
- assertElementsNotNull(childElements);
-
- Vector matches = new Vector();
- matches = findAllRemoteItemReferences(parentElementOrTreePath, parentElementOrTreePath, matches);
-
- // get rid of references to items for different connection
- if (parentElementOrTreePath instanceof IAdaptable)
- {
- List invalidMatches = new ArrayList();
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null)
- {
- IHost parentHost = adapter.getSubSystem(parentElementOrTreePath).getHost();
- for (int i = 0; i < matches.size(); i++)
- {
- Widget match = (Widget) matches.get(i);
- Object data = match.getData();
- if (data instanceof IAdaptable)
- {
- ISystemViewElementAdapter madapter = (ISystemViewElementAdapter)((IAdaptable)data).getAdapter(ISystemViewElementAdapter.class);
- if (madapter != null)
- {
- IHost mHost = madapter.getSubSystem(data).getHost();
- if (mHost != parentHost)
- {
- invalidMatches.add(match);
- }
- }
- }
- }
- }
-
- if (invalidMatches.size() > 0)
- {
- for (int m = invalidMatches.size() - 1; m >= 0 ; m--)
- {
- Object match = invalidMatches.get(m);
- matches.remove(match);
- }
- }
- }
-
- //Widget[] widgets = internalFindItems(parentElementOrTreePath);
- // If parent hasn't been realized yet, just ignore the add.
- if (matches.size() == 0) {
- super.add(parentElementOrTreePath, childElements);
- }
- else
- {
- for (int i = 0; i < matches.size(); i++) {
- Widget match = (Widget) matches.get(i);
- internalAdd(match, parentElementOrTreePath, childElements);
- }
- }
-
- TreeItem item = getFirstSelectedTreeItem();
- if (item != null)
- {
- if (item.getData() == parentElementOrTreePath)
- {
- updatePropertySheet();
- }
- }
-
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/AbstractElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/AbstractElement.java
deleted file mode 100644
index f7d64d7f9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/AbstractElement.java
+++ /dev/null
@@ -1,39 +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;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * In order to populate the PropertySheet, an object must implement the
- * IAdaptable interface. Thus, this is the minimum requirement for any
- * object that we wish to represent in a tree or table viewer. We simply
- * defer the request for an adapter to the platform, assuming that the
- * adapter has been registered with it.
- */
-public class AbstractElement implements IAdaptable
-{
-
- /**
- * @see IAdaptable#getAdapter(Class)
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/GenericMessages.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/GenericMessages.java
deleted file mode 100644
index 42501af5f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/GenericMessages.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class GenericMessages extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.ui.GenericMessages";//$NON-NLS-1$
-
- public static String ResourceNavigator_goto;
-
- public static String RefreshAction_text;
- public static String RefreshAction_toolTip;
- public static String RefreshAction_progressMessage;
- public static String RefreshAction_problemTitle;
- public static String RefreshAction_problemMessage;
- public static String RefreshAction_locationDeletedMessage;
- public static String RefreshAction_dialogTitle;
-
- public static String TransferOperation_message;
- public static String RSESubSystemOperation_message;
- public static String RSESubSystemOperation_Connect_message;
- public static String RSESubSystemOperation_Disconnect_message;
- public static String RSESubSystemOperation_Get_properties_message;
- public static String RSESubSystemOperation_Get_property_message;
- public static String RSESubSystemOperation_Resolve_filter_strings_message;
- public static String RSESubSystemOperation_Set_properties_message;
- public static String RSESubSystemOperation_Set_property_message;
- public static String RSESubSystemOperation_Notifying_registry_message;
-
- // ==============================================================================
- // Property Pages
- // ==============================================================================
- public static String PropertyDialog_messageTitle;
- public static String PropertyDialog_noPropertyMessage;
- public static String PropertyDialog_propertyMessage;
-
- // ==============================================================================
- // Editor Framework
- // ==============================================================================
- public static String EditorManager_saveResourcesMessage;
- public static String EditorManager_saveResourcesTitle;
-
- public static String TypesFiltering_title;
- public static String TypesFiltering_message;
- public static String TypesFiltering_otherExtensions;
- public static String TypesFiltering_typeDelimiter;
-
-
- public static String FileExtension_extensionEmptyMessage;
- public static String FileExtension_fileNameInvalidMessage;
- public static String FilteredPreferenceDialog_PreferenceSaveFailed;
-
- public static String RSEQuery_task;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, GenericMessages.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/GenericMessages.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/GenericMessages.properties
deleted file mode 100644
index 10e8c9d33..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/GenericMessages.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-ResourceNavigator_goto = Goto
-
-RefreshAction_text = Re&fresh
-RefreshAction_toolTip = Refresh
-RefreshAction_progressMessage = Refreshing...
-RefreshAction_problemTitle = Refresh Problems
-RefreshAction_problemMessage = Problems occurred refreshing the selected resources.
-RefreshAction_locationDeletedMessage = The location for project ''{0}'' ({1}) has been deleted.\n Delete ''{0}'' from the workspace?
-RefreshAction_dialogTitle = Project location has been deleted
-
-EditorManager_saveResourcesMessage = Select the &resources to save:
-EditorManager_saveResourcesTitle = Save Resources
-
-# ==============================================================================
-# Editors
-# ==============================================================================
-
-TypesFiltering_title = Select Types
-TypesFiltering_message = Reduce selection to only files of &type(s):
-TypesFiltering_otherExtensions = &Other Extensions:
-TypesFiltering_typeDelimiter = ,
-
-FileExtension_extensionEmptyMessage = The file extension cannot be empty
-FileExtension_fileNameInvalidMessage = The file name cannot include the wild card character (*) in the current location
-FilteredPreferenceDialog_PreferenceSaveFailed=Preferences save failed.
-
-TransferOperation_message = Transfer Operation
-RSESubSystemOperation_message = RSE SubSystem Operation:
-RSESubSystemOperation_Connect_message = Connect
-RSESubSystemOperation_Disconnect_message = Disconnect
-RSESubSystemOperation_Get_properties_message = Get properties
-RSESubSystemOperation_Get_property_message = Get property
-RSESubSystemOperation_Resolve_filter_strings_message = Resolve filter strings
-RSESubSystemOperation_Set_properties_message = Set properties
-RSESubSystemOperation_Set_property_message = Set property
-RSESubSystemOperation_Notifying_registry_message = Notifying registry of connection status change...
-
-PropertyDialog_messageTitle = Properties
-PropertyDialog_noPropertyMessage Properties
-PropertyDialog_propertyMessage = Properties for {0}
-
-RSEQuery_task = RSE Query \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEAdapter.java
deleted file mode 100644
index 9644c54fd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEAdapter.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.ui;
-
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.model.IWorkbenchAdapter2;
-
-/**
- * Base interface for all RSE adapters.
- */
-public interface IRSEAdapter extends IWorkbenchAdapter, IWorkbenchAdapter2 {
-
- /**
- * Returns the description text for this element. This is typically used to show the description of an object
- * when displayed in the UI. Returns an empty string if there is no appropriate description text for this object.
- * @param o the object to get the description text for
- * @return the description text for the given object
- */
- public String getDescription(Object o);
-
- /**
- * Returns the RSE UI registry.
- * @return the RSE UI registry
- */
- public IRSEUIRegistry getRegistry();
-}
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
deleted file mode 100644
index dce401ddb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEUIRegistry.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * 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/IRemoteSelectionAddListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRemoteSelectionAddListener.java
deleted file mode 100644
index c608ca516..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRemoteSelectionAddListener.java
+++ /dev/null
@@ -1,67 +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;
-import org.eclipse.rse.core.model.IHost;
-
-/**
- * <p>
- * This interface is used by the remote object selection dialogs when Add mode is enabled.
- * <p>
- * This interface allows you to listen generically for selection events on any remote object,
- * and be called when the user selects something or presses. You can use instanceof to
- * decide what was selected.
- * <p>
- * If you call the enableAddButton method you must pass an object that implements this interface.
- * The dialog will call you back when the user presses the Add button, so you can take
- * appropriate action.
- */
-public interface IRemoteSelectionAddListener
-{
-
-
- /**
- * The user has selected a remote object. Is this object valid to be added?
- * If so, return null. If not, return a string to display on the
- * message line indicating why it is not valid, such as it already has
- * been added.
- *
- * @param selectedConnection The connection the object was selected in
- * @param selectedObjects Will be a list of objects such as AS400Library or IRemoteFile. They are
- * resolved so that the remote adapter is not required.
- *
- * @return A String or SystemMessage object that will be displayed if the
- * action fails, null if the action was successfull
- */
- public Object okToEnableAddButton(IHost selectedConnection, Object[] selectedObjects);
-
- /**
- * The user has pressed the Add button.
- * Do something appropriate with the request.
- * If this action fails for some reason, or you wish to display a completion
- * message, return message text that will be displayed in the dialog's message
- * line. Else, return null.
- *
- * @param selectedConnection The connection the object was selected in
- * @param selectedObjects Will be a list of objects such as AS400Library or IRemoteFile. They are
- * resolved so that the remote adapter is not required.
- *
- * @return A String or SystemMessage object that will be displayed if the
- * action fails, null if the action was successfull
- */
- public Object addButtonPressed(IHost selectedConnection, Object[] selectedObjects);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemConnectionFormCaller.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemConnectionFormCaller.java
deleted file mode 100644
index a35ea42cf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemConnectionFormCaller.java
+++ /dev/null
@@ -1,38 +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;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Interface that any UI that uses the SystemConnectionForm must implement
- */
-public interface ISystemConnectionFormCaller
-{
-
-
- /**
- * Event: the user has selected a system type.
- * @param systemType the type of system selected
- * @param duringInitialization true if this is being set at page initialization time versus selected by the user
- */
- public void systemTypeSelected(String systemType, boolean duringInitialization);
- /**
- * Return the shell hosting this form
- */
- public Shell getShell();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemContextMenuConstants.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemContextMenuConstants.java
deleted file mode 100644
index 09ede41aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemContextMenuConstants.java
+++ /dev/null
@@ -1,296 +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;
-import org.eclipse.ui.IWorkbenchActionConstants;
-/**
- * Constants defining our groups inside our right-click popup menu in the system view.
- * <pre><code>
- * // simply sets partitions in the menu, into which actions can be directed.
- * // Each partition can be delimited by a separator (new Separator) or not (new GroupMarker).
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_NEW)); // new->
- * menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GOTO)); // goto into, go->
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_EXPANDTO)); // expand to->
- * menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_EXPAND)); // expand, collapse
- * menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPEN)); // open xxx
- * menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPENWITH)); // open with->
- * menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_BROWSEWITH)); // open with->
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_WORKWITH)); // work with->
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_BUILD)); // build, rebuild, refresh
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_CHANGE)); // update, change
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORGANIZE)); // rename,move,copy,delete,bookmark,refactoring
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORDER)); // move up, move down
- * menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GENERATE)); // getters/setters, etc. Typically in editor
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_SEARCH)); // search
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_CONNECTION)); // connection-related actions
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_IMPORTEXPORT)); // get or put actions
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADAPTERS)); // actions queried from adapters
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_TEAM)); // Team
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_PROPERTIES)); // Properties
- * </code></pre>
- */
-public interface ISystemContextMenuConstants
-{
- /**
- * Pop-up menu: name of group for goto actions (value <code>"group.goto"</code>).
- * <p>
- * Examples for open actions are:
- * <ul>
- * <li>Go Into</li>
- * <li>Go To</li>
- * </ul>
- * </p>
- */
- public static final String GROUP_GOTO= "group.goto"; //$NON-NLS-1$
- /**
- * ID of the submenu for "Go To->"
- */
- public static final String MENU_GOTO= "menu.goto"; //$NON-NLS-1$
- /**
- * ID of the submenu for "Preferences->"
- */
- public static final String MENU_PREFERENCES= "menu.preferences"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for open-with actions (value <code>"group.openwith"</code>).
- * <p>
- * Examples for open-with actions are:
- * <ul>
- * <li>Open With->Editor</li>
- * <li>Open With->Designer</li>
- * </ul>
- * </p>
- */
- public static final String GROUP_OPENWITH= "group.openwith"; //$NON-NLS-1$
- /**
- * ID of the submenu for "Open With->"
- */
- public static final String MENU_OPENWITH= "menu.openwith"; //$NON-NLS-1$
-
- /**
- * Group name for the "Browse With" submenu
- */
- public static final String GROUP_BROWSEWITH= "group.browsewith"; //$NON-NLS-1$
-
- /**
- * Group name for the "Compare With" submenu
- */
- public static final String GROUP_COMPAREWITH= "group.comparewith"; //$NON-NLS-1$
-
- /**
- * Group name for the "Replace With" submenu
- */
- public static final String GROUP_REPLACEWITH= "group.replacewith"; //$NON-NLS-1$
-
- /**
- * ID for "Browse With" submenu
- */
- public static final String MENU_BROWSEWITH = "menu.browsewith"; //$NON-NLS-1$
-
- /**
- * ID for "Compare With" submenu
- */
- public static final String MENU_COMPAREWITH = "menu.comparewith"; //$NON-NLS-1$
-
- /**
- * ID for "Compare With" submenu
- */
- public static final String MENU_REPLACEWITH = "menu.replacewith"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for expand actions (value <code>"group.expand"</code>).
- */
- public static final String GROUP_EXPAND = "group.expand"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for expand-to cascading actions (value <code>"group.expandto"</code>).
- */
- public static final String GROUP_EXPANDTO= "group.expandto"; //$NON-NLS-1$
- /**
- * ID of the submenu for "Expand to->"
- */
- public static final String MENU_EXPANDTO= "menu.expandto"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for open-to actions (value <code>"group.opento"</code>).
- * <p>
- * Examples for open-to actions are:
- * <ul>
- * <li>Open To->Navigator</li>
- * <li>Open To->iSeries Navigator</li>
- * </ul>
- * </p>
- */
- public static final String GROUP_OPENTO= "group.opento"; //$NON-NLS-1$
- /**
- * ID of the submenu for "Open To->"
- */
- public static final String MENU_OPENTO= "menu.opento"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for work-with actions (value <code>"group.workwith"</code>).
- * <p>
- * Examples for work-with actions are:
- * <ul>
- * <li>Work with->Filter Pools...</li>
- * <li>Work with->User Actions...</li>
- * <li>Work with->File Types...</li>
- * </ul>
- * </p>
- */
- public static final String GROUP_WORKWITH= "group.workwith"; //$NON-NLS-1$
- /**
- * ID of the submenu for "Work Work->"
- */
- public static final String MENU_WORKWITH= "menu.workwith"; //$NON-NLS-1$
- /**
- * Pop-up menu: name of group for open actions (value <code>"group.open"</code>).
- * <p>
- * Examples for open actions are:
- * <ul>
- * <li>Open To</li>
- * <li>Open With</li>
- * </ul>
- * </p>
- */
- public static final String GROUP_OPEN= "group.open"; //$NON-NLS-1$
- /**
- * Pop-up menu: name of group for show actions (value <code>"group.show"</code>).
- * <p>
- * Examples for show actions are:
- * <ul>
- * <li>Show in Navigator</li>
- * <li>Show in Type Hierarchy</li>
- * </ul>
- * </p>
- */
- public static final String GROUP_SHOW= "group.show"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for new actions (value <code>"group.new"</code>).
- * This is a cascading group.
- * <p>
- * Examples for new actions are:
- * <ul>
- * <li>Create new filter</li>
- * <li>Create new folder</li>
- * </ul>
- * </p>
- */
- public static final String GROUP_NEW= "group.new"; //$NON-NLS-1$
- /**
- * ID of the submenu for "New->"
- */
- public static final String MENU_NEW= "menu.new"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for new actions (value <code>"group.new.noncascade"</code>).
- * This is a non-cascading group.
- * <p>
- * This is used in the Team view
- * </p>
- */
- public static final String GROUP_NEW_NONCASCADING="group.new.noncascade"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for build actions (value <code>"group.build"</code>).
- */
- public static final String GROUP_BUILD= "group.build"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for reorganize actions (value <code>"group.reorganize"</code>).
- */
- public static final String GROUP_REORGANIZE= "group.reorganize"; //$NON-NLS-1$
- /**
- * Pop-up menu: name of group for reorder actions like move up/down(value <code>"group.reorder"</code>).
- */
- public static final String GROUP_REORDER= "group.reorder"; //$NON-NLS-1$
- /**
- * Pop-up menu: name of group for CHANGE actions. (value <code>"group.change"</code>).
- * <p>
- * Examples for change actions are:
- * <ul>
- * <li>Change...</li>
- * <li>Update...</li>
- * </ul>
- * SHould you even have a change action? Maybe it should be a PropertyPage instead!
- * </p>
- */
- public static final String GROUP_CHANGE = "group.change"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for code generation or refactoring actions (
- * value <code>"group.generate"</code>).
- */
- public static final String GROUP_GENERATE= "group.generate"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for search actions (value <code>"group.search"</code>).
- */
- public static final String GROUP_SEARCH= "group.search"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for additional actions (value <code>"group.additions"</code>).
- */
- public static final String GROUP_ADDITIONS= IWorkbenchActionConstants.MB_ADDITIONS; //"additions";
-
- /**
- * Pop-up menu: name of group for viewer setup actions (value <code>"group.viewerSetup"</code>).
- */
- public static final String GROUP_VIEWER_SETUP= "group.viewerSetup"; //$NON-NLS-1$
-
- /**
- * Pop-up menu: name of group for properties actions (value <code>"group.properties"</code>).
- */
- public static final String GROUP_PROPERTIES= "group.properties"; //$NON-NLS-1$
- /**
- * Pop-up menu: name of group for actions contributed by the adaptors for the selected object, which
- * are related to the live connection.
- */
- public static final String GROUP_CONNECTION= "group.connection"; //$NON-NLS-1$
- /**
- * Pop-up menu: name of group for actions related to getting and putting the selected object.
- */
- public static final String GROUP_IMPORTEXPORT= "group.importexport"; //$NON-NLS-1$
- /**
- * Pop-up menu: name of group for actions contributed by the adaptors for the selected object
- */
- public static final String GROUP_ADAPTERS= "group.adapters"; //$NON-NLS-1$
- /**
- * Pop-up menu: name of group for team actions
- */
- public static final String GROUP_TEAM= "group.team"; //$NON-NLS-1$
-
-
- /**
- * ID of the submenu for "Compile->"
- */
- public static final String MENU_COMPILE= "menu.compile"; //$NON-NLS-1$
- /**
- * ID of the submenu for "User Actions->"
- */
- public static final String MENU_USERACTIONS= "menu.useractions"; //$NON-NLS-1$
-
- /**
- * Group for "Start Server->"
- */
- public static final String GROUP_STARTSERVER= "group.remoteservers"; //$NON-NLS-1$
- /**
- * ID of the submenu for "Start Server->"
- */
- public static final String MENU_STARTSERVER= "menu.remoteservers"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemDeleteTarget.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemDeleteTarget.java
deleted file mode 100644
index fa90538d5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemDeleteTarget.java
+++ /dev/null
@@ -1,43 +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;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-
-/**
- * Any UI part that supports global deletion can implement
- * this to enable the Edit menu's delete item.
- */
-public interface ISystemDeleteTarget extends ISelectionProvider
-{
- /**
- * Return true if delete should even be shown in the popup menu
- */
- public boolean showDelete();
- /**
- * Return true if delete should be enabled based on your current selection.
- */
- public boolean canDelete();
- /**
- * Actually do the delete of currently selected items.
- * Return true if it worked. Return false if it didn't (you display msg), or throw an exception (framework displays msg)
- */
- public boolean doDelete(IProgressMonitor monitor);
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java
deleted file mode 100644
index 8ba7e8ea2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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:
- * Michael Berger (IBM) - 146339 Added refresh action graphic.
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-/**
- * Constants used throughout the System plugin.
- */
-public interface ISystemIconConstants
-{
- public static final String PLUGIN_ID ="org.eclipse.rse.ui"; //$NON-NLS-1$
- public static final String PREFIX = PLUGIN_ID + "."; //$NON-NLS-1$
-
- // Icons
- public static final String ICON_SUFFIX = "Icon"; //$NON-NLS-1$
- public static final String ICON_BANNER_SUFFIX = "BannerIcon"; //$NON-NLS-1$
- public static final String ICON_EXT = ".gif"; //$NON-NLS-1$
-
- // WIZARD ICONS...
- public static final String ICON_WIZARD_DIR = "full/wizban/"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWPROFILEWIZARD_ROOT = "newprofile_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWPROFILEWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWPROFILEWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWPROFILEWIZARD_ID = PREFIX + ICON_SYSTEM_NEWPROFILEWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWCONNECTIONWIZARD_ROOT = "newconnection_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWCONNECTIONWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWCONNECTIONWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWCONNECTIONWIZARD_ID = PREFIX + ICON_SYSTEM_NEWCONNECTIONWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWFILTERWIZARD_ROOT = "newfilter_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWFILTERWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWFILTERWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILTERWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFILTERWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWFILTERPOOLWIZARD_ROOT = "newfilterpool_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWFILTERPOOLWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWFILTERPOOLWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILTERPOOLWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFILTERPOOLWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWFILEWIZARD_ROOT = "newfile_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWFILEWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWFILEWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILEWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFILEWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWFOLDERWIZARD_ROOT = "newfolder_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWFOLDERWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWFOLDERWIZARD_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_NEWFOLDERWIZARD_ID = PREFIX + ICON_SYSTEM_NEWFOLDERWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
-
- // THING ICONS...
- public static final String ICON_MODEL_DIR = "full/obj16/"; //$NON-NLS-1$
-
- public static final String ICON_SYSTEM_PROFILE_ROOT = "systemprofile"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_PROFILE = ICON_MODEL_DIR + ICON_SYSTEM_PROFILE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_PROFILE_ID = PREFIX+ICON_SYSTEM_PROFILE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_PROFILE_ACTIVE_ROOT = "systemprofile_active"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_PROFILE_ACTIVE = ICON_MODEL_DIR + ICON_SYSTEM_PROFILE_ACTIVE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_PROFILE_ACTIVE_ID = PREFIX+ICON_SYSTEM_PROFILE_ACTIVE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_CONNECTION_ROOT = "systemconnection"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_CONNECTION = ICON_MODEL_DIR + ICON_SYSTEM_CONNECTION_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_CONNECTION_ID = PREFIX+ICON_SYSTEM_CONNECTION_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_CONNECTIONLIVE_ROOT = "systemconnectionlive"; // not currently used //$NON-NLS-1$
- public static final String ICON_SYSTEM_CONNECTIONLIVE = ICON_MODEL_DIR + ICON_SYSTEM_CONNECTIONLIVE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_CONNECTIONLIVE_ID = PREFIX+ICON_SYSTEM_CONNECTIONLIVE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_FILTERPOOL_ROOT = "systemfilterpool"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_FILTERPOOL = ICON_MODEL_DIR + ICON_SYSTEM_FILTERPOOL_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_FILTERPOOL_ID = PREFIX+ICON_SYSTEM_FILTERPOOL_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_FILTER_ROOT = "systemfilter"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_FILTER_ID = PREFIX + ICON_SYSTEM_FILTER_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_FILTER = ICON_MODEL_DIR + ICON_SYSTEM_FILTER_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_FILTERSTRING_ROOT = "systemfilterstring"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_FILTERSTRING_ID = PREFIX + ICON_SYSTEM_FILTERSTRING_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_FILTERSTRING = ICON_MODEL_DIR + ICON_SYSTEM_FILTERSTRING_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_ROOTDRIVE_ROOT = "systemrootdrive"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_ROOTDRIVE = ICON_MODEL_DIR + ICON_SYSTEM_ROOTDRIVE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_ROOTDRIVE_ID = PREFIX+ICON_SYSTEM_ROOTDRIVE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_ROOTDRIVEOPEN_ROOT = "systemrootdriveopen"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_ROOTDRIVEOPEN = ICON_MODEL_DIR + ICON_SYSTEM_ROOTDRIVEOPEN_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_ROOTDRIVEOPEN_ID = PREFIX+ICON_SYSTEM_ROOTDRIVEOPEN_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_FOLDER_ROOT = "systemfolder"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_FOLDER = ICON_MODEL_DIR + ICON_SYSTEM_FOLDER_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_FOLDER_ID = PREFIX+ICON_SYSTEM_FOLDER_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_ENVVAR_ROOT = "systemenvvar"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_ENVVAR = ICON_MODEL_DIR + ICON_SYSTEM_ENVVAR_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_ENVVAR_ID = PREFIX+ICON_SYSTEM_ENVVAR+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_ENVVAR_LIBPATH_ROOT = "systemenvvarlibpath"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_ENVVAR_LIBPATH = ICON_MODEL_DIR + ICON_SYSTEM_ENVVAR_LIBPATH_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_ENVVAR_LIBPATH_ID = PREFIX+ICON_SYSTEM_ENVVAR_LIBPATH+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_ENVVAR_PATH_ROOT = "systemenvvarpath"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_ENVVAR_PATH = ICON_MODEL_DIR + ICON_SYSTEM_ENVVAR_PATH_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_ENVVAR_PATH_ID = PREFIX+ICON_SYSTEM_ENVVAR_PATH+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_PROCESS_ROOT = "systemprocess"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_PROCESS = ICON_MODEL_DIR + ICON_SYSTEM_PROCESS_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_PROCESS_ID = PREFIX+ICON_SYSTEM_PROCESS+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_TARGET_ROOT = "systemTarget"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_TARGET = ICON_MODEL_DIR + ICON_SYSTEM_TARGET_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_TARGET_ID = PREFIX+ICON_SYSTEM_TARGET_ROOT+ICON_SUFFIX;
-
- // NEW ACTION ICONS...
- public static final String ICON_NEWACTIONS_DIR = "full/ctool16/"; //$NON-NLS-1$
-
- public static final String ICON_SYSTEM_NEW_ROOT = "new"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEW = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEW_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_NEW_ID = PREFIX+ICON_SYSTEM_NEW_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWPROFILE_ROOT = "newprofile_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWPROFILE = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEWPROFILE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_NEWPROFILE_ID = PREFIX+ICON_SYSTEM_NEWPROFILE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWCONNECTION_ROOT = "newconnection_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWCONNECTION = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEWCONNECTION_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_NEWCONNECTION_ID = PREFIX+ICON_SYSTEM_NEWCONNECTION_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWFILTERPOOL_ROOT = "newfilterpool_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWFILTERPOOL = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEWFILTERPOOL_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILTERPOOL_ID = PREFIX+ICON_SYSTEM_NEWFILTERPOOL_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWFILTERPOOLREF_ROOT = "newfilterpoolref_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWFILTERPOOLREF = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEWFILTERPOOLREF_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILTERPOOLREF_ID = PREFIX+ICON_SYSTEM_NEWFILTERPOOLREF_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWFILTER_ROOT = "newfilter_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWFILTER = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEWFILTER_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILTER_ID = PREFIX+ICON_SYSTEM_NEWFILTER_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWFILE_ROOT = "newfile_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWFILE = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEWFILE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_NEWFILE_ID = PREFIX+ICON_SYSTEM_NEWFILE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_NEWFOLDER_ROOT = "newfolder_wiz"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_NEWFOLDER = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEWFOLDER_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_NEWFOLDER_ID = PREFIX+ICON_SYSTEM_NEWFOLDER_ROOT+ICON_SUFFIX;
-
-
- // OTHER ACTION ICONS...
- public static final String ICON_ACTIONS_DIR = "full/elcl16/"; //$NON-NLS-1$
-
- public static final String ICON_SYSTEM_COMPILE_ROOT = "compile"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_COMPILE = ICON_ACTIONS_DIR + ICON_SYSTEM_COMPILE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_COMPILE_ID = PREFIX+ICON_SYSTEM_COMPILE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_LOCK_ROOT = "lock"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_LOCK = ICON_ACTIONS_DIR + ICON_SYSTEM_LOCK_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_LOCK_ID = PREFIX+ICON_SYSTEM_LOCK_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_MOVEUP_ROOT = "up"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_MOVEUP = ICON_ACTIONS_DIR + ICON_SYSTEM_MOVEUP_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_MOVEUP_ID = PREFIX+ICON_SYSTEM_MOVEUP_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_MOVEDOWN_ROOT = "down"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_MOVEDOWN = ICON_ACTIONS_DIR + ICON_SYSTEM_MOVEDOWN_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_MOVEDOWN_ID = PREFIX+ICON_SYSTEM_MOVEDOWN_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_MOVE_ROOT = "move"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_MOVE = ICON_ACTIONS_DIR + ICON_SYSTEM_MOVE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_MOVE_ID = PREFIX+ICON_SYSTEM_MOVE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_CLEAR_ROOT = "clear"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_CLEAR = ICON_ACTIONS_DIR + ICON_SYSTEM_CLEAR_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_CLEAR_ID = PREFIX+ICON_SYSTEM_CLEAR_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_CLEAR_ALL_ROOT = "clearall"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_CLEAR_ALL = ICON_ACTIONS_DIR + ICON_SYSTEM_CLEAR_ALL_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_CLEAR_ALL_ID = PREFIX+ICON_SYSTEM_CLEAR_ALL_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_CLEAR_SELECTED_ROOT = "clearselected"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_CLEAR_SELECTED = ICON_ACTIONS_DIR + ICON_SYSTEM_CLEAR_SELECTED_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_CLEAR_SELECTED_ID = PREFIX+ICON_SYSTEM_CLEAR_SELECTED_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_DELETEREF_ROOT = "deletereference"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_DELETEREF = ICON_ACTIONS_DIR + ICON_SYSTEM_DELETEREF_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_DELETEREF_ID = PREFIX+ICON_SYSTEM_DELETEREF_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_RUN_ROOT = "run"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_RUN = ICON_ACTIONS_DIR + ICON_SYSTEM_RUN_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_RUN_ID = PREFIX+ICON_SYSTEM_RUN_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_STOP_ROOT = "stop"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_STOP = ICON_ACTIONS_DIR + ICON_SYSTEM_STOP_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_STOP_ID = PREFIX+ICON_SYSTEM_STOP_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_RENAME_ROOT = "rename"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_RENAME = ICON_ACTIONS_DIR + ICON_SYSTEM_RENAME_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_RENAME_ID = PREFIX+ICON_SYSTEM_RENAME_ROOT+ICON_SUFFIX;
-
- public static final String ICON_IDE_REFRESH_ID = "elcl16/refresh_nav.gif"; //$NON-NLS-1$
- public static final String ICON_IDE_COLLAPSEALL_ID = "elcl16/collapseall.gif"; //$NON-NLS-1$
- public static final String ICON_IDE_LINKTOEDITOR_ID = "elcl16/synced.gif"; //$NON-NLS-1$
- public static final String ICON_IDE_FILTER_ID = "elcl16/filter_ps.gif"; //$NON-NLS-1$
-
- public static final String ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT = "makeprofileactive"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_MAKEPROFILEACTIVE = ICON_ACTIONS_DIR + ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_MAKEPROFILEACTIVE_ID = PREFIX+ICON_SYSTEM_MAKEPROFILEACTIVE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_MAKEPROFILEINACTIVE_ROOT = "makeprofileinactive"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_MAKEPROFILEINACTIVE = ICON_ACTIONS_DIR + ICON_SYSTEM_MAKEPROFILEINACTIVE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_MAKEPROFILEINACTIVE_ID = PREFIX+ICON_SYSTEM_MAKEPROFILEINACTIVE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_CHANGEFILTER_ROOT = "editfilter"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_CHANGEFILTER = ICON_ACTIONS_DIR + ICON_SYSTEM_CHANGEFILTER_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_CHANGEFILTER_ID = PREFIX+ICON_SYSTEM_CHANGEFILTER_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_SELECTPROFILE_ROOT = "selectprofile"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_SELECTPROFILE = ICON_ACTIONS_DIR + ICON_SYSTEM_SELECTPROFILE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_SELECTPROFILE_ID = PREFIX+ICON_SYSTEM_SELECTPROFILE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_SELECTFILTERPOOLS_ROOT = "selectpool"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_SELECTFILTERPOOLS = ICON_ACTIONS_DIR + ICON_SYSTEM_SELECTFILTERPOOLS_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_SELECTFILTERPOOLS_ID = PREFIX+ICON_SYSTEM_SELECTFILTERPOOLS_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_WORKWITHFILTERPOOLS_ROOT = "workwithfilterpools"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_WORKWITHFILTERPOOLS = ICON_ACTIONS_DIR + ICON_SYSTEM_WORKWITHFILTERPOOLS_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_WORKWITHFILTERPOOLS_ID = PREFIX+ICON_SYSTEM_WORKWITHFILTERPOOLS_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_WORKWITHUSERACTIONS_ROOT = "workwithuseractions"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_WORKWITHUSERACTIONS = ICON_ACTIONS_DIR + ICON_SYSTEM_WORKWITHUSERACTIONS_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_WORKWITHUSERACTIONS_ID = PREFIX+ICON_SYSTEM_WORKWITHUSERACTIONS_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_WORKWITHNAMEDTYPES_ROOT = "workwithnamedtypes"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_WORKWITHNAMEDTYPES = ICON_ACTIONS_DIR + ICON_SYSTEM_WORKWITHNAMEDTYPES_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_WORKWITHNAMEDTYPES_ID = PREFIX+ICON_SYSTEM_WORKWITHNAMEDTYPES_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_WORKWITHCOMPILECMDS_ROOT = "workwithcompilecmds"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_WORKWITHCOMPILECMDS = ICON_ACTIONS_DIR + ICON_SYSTEM_WORKWITHCOMPILECMDS_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_WORKWITHCOMPILECMDS_ID = PREFIX+ICON_SYSTEM_WORKWITHCOMPILECMDS_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_REMOVE_SHELL_ROOT = "removeshell"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_REMOVE_SHELL_ID = PREFIX + ICON_SYSTEM_REMOVE_SHELL_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_REMOVE_SHELL = ICON_ACTIONS_DIR + ICON_SYSTEM_REMOVE_SHELL_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_CANCEL_SHELL_ROOT = "cancelshell"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_CANCEL_SHELL_ID = PREFIX + ICON_SYSTEM_CANCEL_SHELL_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_CANCEL_SHELL = ICON_ACTIONS_DIR + ICON_SYSTEM_CANCEL_SHELL_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_EXTRACT_ROOT = "xtrctarchv_tsk"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_EXTRACT = ICON_ACTIONS_DIR + ICON_SYSTEM_EXTRACT_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_EXTRACT_ID = PREFIX+ICON_SYSTEM_EXTRACT_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_EXTRACTTO_ROOT = "xtrctarchvto_tsk"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_EXTRACTTO = ICON_ACTIONS_DIR + ICON_SYSTEM_EXTRACTTO_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_EXTRACTTO_ID = PREFIX+ICON_SYSTEM_EXTRACTTO_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_CONVERT_ROOT = "convertarchive_tsk"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_CONVERT = ICON_ACTIONS_DIR + ICON_SYSTEM_CONVERT_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_CONVERT_ID = PREFIX+ICON_SYSTEM_CONVERT_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_COMBINE_ROOT = "combine_tsk"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_COMBINE = ICON_ACTIONS_DIR + ICON_SYSTEM_COMBINE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_COMBINE_ID = PREFIX+ICON_SYSTEM_COMBINE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_SHOW_TABLE_ROOT = "systemshowintable"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_SHOW_TABLE = ICON_ACTIONS_DIR + ICON_SYSTEM_SHOW_TABLE_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_SHOW_TABLE_ID = PREFIX + ICON_SYSTEM_SHOW_TABLE_ROOT + ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_SHOW_MONITOR_ROOT = "monitor_view"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_SHOW_MONITOR = ICON_ACTIONS_DIR + ICON_SYSTEM_SHOW_MONITOR_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_SHOW_MONITOR_ID = PREFIX + ICON_SYSTEM_SHOW_MONITOR_ROOT + ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_SHOW_SHELL_ROOT = "systemshell"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_SHOW_SHELL = ICON_ACTIONS_DIR + ICON_SYSTEM_SHOW_SHELL_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_SHOW_SHELL_ID = PREFIX + ICON_SYSTEM_SHOW_SHELL_ROOT + ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_EXPORT_SHELL_OUTPUT_ROOT = "exportshelloutput"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_EXPORT_SHELL_OUTPUT = ICON_ACTIONS_DIR + ICON_SYSTEM_EXPORT_SHELL_OUTPUT_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_EXPORT_SHELL_OUTPUT_ID = PREFIX + ICON_SYSTEM_EXPORT_SHELL_OUTPUT_ROOT + ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_EXPORT_SHELL_HISTORY_ROOT = "exportshellhistory"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_EXPORT_SHELL_HISTORY = ICON_ACTIONS_DIR + ICON_SYSTEM_EXPORT_SHELL_HISTORY_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_EXPORT_SHELL_HISTORY_ID = PREFIX + ICON_SYSTEM_EXPORT_SHELL_HISTORY_ROOT + ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_REFRESH_ROOT = "refresh_nav"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_REFRESH = ICON_ACTIONS_DIR + ICON_SYSTEM_REFRESH_ROOT + ICON_EXT;
- public static final String ICON_SYSTEM_REFRESH_ID = PREFIX + ICON_SYSTEM_REFRESH_ROOT + ICON_SUFFIX;
-
- // SPECIAL MODEL OBJECT ICONS...
- public static final String ICON_OBJS_DIR = "full/obj16/"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_ERROR_ROOT = "error"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_ERROR_ID = PREFIX + ICON_SYSTEM_ERROR_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_ERROR = ICON_OBJS_DIR + ICON_SYSTEM_ERROR_ROOT + ICON_EXT;
-
- // info is to be used in dialogs
- public static final String ICON_SYSTEM_INFO_ROOT = "info"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_INFO_ID = PREFIX + ICON_SYSTEM_INFO_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_INFO = ICON_OBJS_DIR + ICON_SYSTEM_INFO_ROOT + ICON_EXT;
-
- // systeminfo is to be used in tree view
- public static final String ICON_SYSTEM_INFO_TREE_ROOT = "systeminfo"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_INFO_TREE_ID = PREFIX + ICON_SYSTEM_INFO_TREE_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_INFO_TREE = ICON_OBJS_DIR + ICON_SYSTEM_INFO_TREE_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_HELP_ROOT = "systemhelp"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_HELP_ID = PREFIX + ICON_SYSTEM_HELP_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_HELP = ICON_OBJS_DIR + ICON_SYSTEM_HELP_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_CANCEL_ROOT = "systemcancel"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_CANCEL_ID = PREFIX + ICON_SYSTEM_CANCEL_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_CANCEL = ICON_OBJS_DIR + ICON_SYSTEM_CANCEL_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_EMPTY_ROOT = "systemempty"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_EMPTY_ID = PREFIX + ICON_SYSTEM_EMPTY_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_EMPTY = ICON_OBJS_DIR + ICON_SYSTEM_EMPTY_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_OK_ROOT = "systemok"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_OK_ID = PREFIX + ICON_SYSTEM_OK_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_OK = ICON_OBJS_DIR + ICON_SYSTEM_OK_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_WARNING_ROOT = "warning"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_WARNING_ID = PREFIX + ICON_SYSTEM_WARNING_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_WARNING = ICON_OBJS_DIR + ICON_SYSTEM_WARNING_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_FAILED_ROOT = "systemfailed"; // not used yet //$NON-NLS-1$
- public static final String ICON_SYSTEM_FAILED_ID = PREFIX + ICON_SYSTEM_FAILED_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_FAILED = ICON_OBJS_DIR + ICON_SYSTEM_FAILED_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_BLANK_ROOT = "systemblank"; // not used yet //$NON-NLS-1$
- public static final String ICON_SYSTEM_BLANK_ID = PREFIX + ICON_SYSTEM_BLANK_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_BLANK = ICON_OBJS_DIR + ICON_SYSTEM_BLANK_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_SEARCH_ROOT = "system_search"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_SEARCH_ID = PREFIX + ICON_SYSTEM_SEARCH_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_SEARCH = ICON_OBJS_DIR + ICON_SYSTEM_SEARCH_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_SEARCH_RESULT_ROOT = "systemsearchresult"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_SEARCH_RESULT_ID = PREFIX + ICON_SYSTEM_SEARCH_RESULT_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_SEARCH_RESULT = ICON_OBJS_DIR + ICON_SYSTEM_SEARCH_RESULT_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_SHELL_ROOT = "systemshell"; // not used yet //$NON-NLS-1$
- public static final String ICON_SYSTEM_SHELL_ID = PREFIX + ICON_SYSTEM_SHELL_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_SHELL = ICON_OBJS_DIR + ICON_SYSTEM_SHELL_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_SHELLLIVE_ROOT = "systemshelllive"; // not used yet //$NON-NLS-1$
- public static final String ICON_SYSTEM_SHELLLIVE_ID = PREFIX + ICON_SYSTEM_SHELLLIVE_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_SHELLLIVE = ICON_OBJS_DIR + ICON_SYSTEM_SHELLLIVE_ROOT + ICON_EXT;
-
- public static final String ICON_SYSTEM_PERSPECTIVE_ROOT ="system_persp"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_PERSPECTIVE_ID = PREFIX + ICON_SYSTEM_PERSPECTIVE_ROOT + ICON_SUFFIX;
- public static final String ICON_SYSTEM_PERSPECTIVE = ICON_OBJS_DIR + ICON_SYSTEM_PERSPECTIVE_ROOT + ICON_EXT;
-
-
-
- public static final String ICON_SYSTEM_ARROW_UP_ROOT = "arrowup_obj"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_ARROW_UP = ICON_OBJS_DIR + ICON_SYSTEM_ARROW_UP_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_ARROW_UP_ID = PREFIX+ICON_SYSTEM_ARROW_UP_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_ARROW_DOWN_ROOT = "arrowdown_obj"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_ARROW_DOWN = ICON_OBJS_DIR + ICON_SYSTEM_ARROW_DOWN_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_ARROW_DOWN_ID = PREFIX+ICON_SYSTEM_ARROW_DOWN_ROOT+ICON_SUFFIX;
-
-
- public static final String ICON_SYSTEM_CONNECTOR_SERVICE_ROOT = "connectorservice_obj"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_CONNECTOR_SERVICE = ICON_OBJS_DIR + ICON_SYSTEM_CONNECTOR_SERVICE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_CONNECTOR_SERVICE_ID = PREFIX+ICON_SYSTEM_CONNECTOR_SERVICE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_SERVICE_ROOT = "service_obj"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_SERVICE = ICON_OBJS_DIR + ICON_SYSTEM_SERVICE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_SERVICE_ID = PREFIX+ICON_SYSTEM_SERVICE_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_LAUNCHER_CONFIGURATION_ROOT = "launcher_config_obj"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_LAUNCHER_CONFIGURATION = ICON_OBJS_DIR + ICON_SYSTEM_LAUNCHER_CONFIGURATION_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_LAUNCHER_CONFIGURATION_ID = PREFIX+ICON_SYSTEM_LAUNCHER_CONFIGURATION_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_PROPERTIES_ROOT = "properties_obj"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_PROPERTIES = ICON_OBJS_DIR + ICON_SYSTEM_PROPERTIES_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_PROPERTIES_ID = PREFIX+ICON_SYSTEM_PROPERTIES_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SEARCH_REMOVE_SELECTED_MATCHES_ROOT = "searchremoveselected"; //$NON-NLS-1$
- public static final String ICON_SEARCH_REMOVE_SELECTED_MATCHES = ICON_ACTIONS_DIR + ICON_SEARCH_REMOVE_SELECTED_MATCHES_ROOT + ICON_EXT;
- public static final String ICON_SEARCH_REMOVE_SELECTED_MATCHES_ID = PREFIX + ICON_SEARCH_REMOVE_SELECTED_MATCHES_ROOT + ICON_SUFFIX;
-
- public static final String ICON_SEARCH_REMOVE_ALL_MATCHES_ROOT = "searchremoveall"; //$NON-NLS-1$
- public static final String ICON_SEARCH_REMOVE_ALL_MATCHES = ICON_ACTIONS_DIR + ICON_SEARCH_REMOVE_ALL_MATCHES_ROOT + ICON_EXT;
- public static final String ICON_SEARCH_REMOVE_ALL_MATCHES_ID = PREFIX + ICON_SEARCH_REMOVE_ALL_MATCHES_ROOT + ICON_SUFFIX;
-
- // we reuse the Remove all matches action icon
- public static final String ICON_SEARCH_CLEAR_HISTORY_ROOT = ICON_SEARCH_REMOVE_ALL_MATCHES_ROOT;
- public static final String ICON_SEARCH_CLEAR_HISTORY = ICON_ACTIONS_DIR + ICON_SEARCH_CLEAR_HISTORY_ROOT + ICON_EXT;
- public static final String ICON_SEARCH_CLEAR_HISTORY_ID = PREFIX + ICON_SEARCH_CLEAR_HISTORY_ROOT + ICON_SUFFIX;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMassager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMassager.java
deleted file mode 100644
index 354ee1eaa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMassager.java
+++ /dev/null
@@ -1,38 +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;
-//import org.eclipse.jface.dialogs.*;
-//import org.eclipse.jface.viewers.*;
-
-/**
- * This interface is used to identify objects whose job is to massage user-entered
- * text before saving it to a model. Eg, the text, while valid, may need to be folded
- * to uppercase or trimmed of blanks, or resolved if it has a substitution variable.
- * <p>
- * This interface, like IInputValidator, allows this work to be abstracted such that one
- * object that does it can be used in various dialogs or wizards or property sheets.
- */
-public interface ISystemMassager
-{
-
-
- /**
- * Given the user-entered input, return the massaged version of it.
- * If no massaging required, return the input as is.
- */
- public String massage(String text);
-} \ No newline at end of file
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
deleted file mode 100644
index d3637eb4d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java
+++ /dev/null
@@ -1,460 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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;
-
-/**
- * Message IDs
- */
-public interface ISystemMessages
-{
- //public static final String PLUGIN_ID ="org.eclipse.rse.ui";
- //public static final String PREFIX = PLUGIN_ID+".";
- // Resource Bundle ids
- //public static final String RESID_PREFIX = PREFIX+"ui.";
- // Messages
- //public static final String MSG_PREFIX = RESID_PREFIX+"msg.";
- //public static final String MSG_TITLE = MSG_PREFIX + "Title";
- //public static final String MSG_TITLEWARNING = MSG_PREFIX + "TitleWarning";
- //public static final String MSG_TITLEINFORMATION = MSG_PREFIX + "TitleInformation";
- //public static final String MSG_TITLECONFIRMATION = MSG_PREFIX + "TitleConfirmation";
-
- //public static final String MSG_CREATE_PROJECT_ERROR = "RSEG1002"; //MSG_PREFIX + "CreateProjectFailed";
-
- //public static final String MSG_VALIDATE_PREFIX = MSG_PREFIX + "Validate.";
- //public static final String MSG_UNDERCONSTRUCTION = "RSEG1001";
-
- public static final String MSG_CONFIRM_RELOADRSE = "RSEG1002"; //$NON-NLS-1$
-
- public static final String MSG_CONFIRM_ENABLE_CLASSIC_HELP = "RSEG1400"; //$NON-NLS-1$
- public static final String MSG_ERROR_ENABLE_CLASSIC_HELP = "RSEG1401"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_NAME_EMPTY = "RSEG1006"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_NAME_NOTUNIQUE= "RSEG1007"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_NAME_NOTVALID = "RSEG1008"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_RENAME_EMPTY = "RSEG1012"; //MSG_VALIDATE_PREFIX + "ReName.Required"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_RENAME_NOTUNIQUE= "RSEG1010"; //MSG_VALIDATE_PREFIX + "ReName.NotUnique"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_RENAME_NOTVALID = "RSEG1011"; //MSG_VALIDATE_PREFIX + "ReName.NotValid"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_RENAME_OLDEQUALSNEW = "RSEG1009"; //MSG_VALIDATE_PREFIX+"ReName.OldEqualsNew"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_PROFILENAME_EMPTY = "RSEG1014"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_PROFILENAME_NOTUNIQUE= "RSEG1015"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_PROFILENAME_NOTVALID = "RSEG1016"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_PROFILENAME_RESERVED = "RSEG1040"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_PATH_EMPTY = "RSEG1032"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_PATH_NOTUNIQUE= "RSEG1033"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_PATH_NOTVALID = "RSEG1034"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_NOT_NUMERIC = "RSEG1017"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_PORT_EMPTY = "RSEG1027"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_PORT_NOTVALID = "RSEG1028"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FOLDERNAME_NOTVALID = "RSEG1018"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILENAME_NOTVALID = "RSEG1019"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_CONNECTIONNAME_EMPTY= "RSEG1021"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE = "RSEG1022"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE_OTHERPROFILE = "RSEG1041"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_CONNECTIONNAME_NOTVALID = "RSEG1023"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_HOSTNAME_EMPTY= "RSEG1024"; //MSG_VALIDATE_PREFIX + "HostNameRequired"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_USERID_EMPTY = "RSEG1025"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_USERID_NOTVALID = "RSEG1026"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_ENTRY_EMPTY = "RSEG1029"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_ENTRY_NOTUNIQUE= "RSEG1030"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_ENTRY_NOTVALID = "RSEG1031"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_FILTERPOOLNAME_EMPTY = "RSEG1037"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERPOOLNAME_NOTUNIQUE= "RSEG1038"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERPOOLNAME_NOTVALID = "RSEG1039"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_FILTERNAME_EMPTY = "RSEG1042"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERNAME_NOTUNIQUE= "RSEG1043"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERNAME_NOTVALID = "RSEG1044"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_PASSWORD_EMPTY = "RSEG1035"; //MSG_VALIDATE_PREFIX + "PasswordRequired"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_PASSWORD_EXPIRED = "RSEG1036"; //MSG_VALIDATE_PREFIX + "PasswordExpired"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_PASSWORD_INVALID = "RSEG1297"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERSTRING_EMPTY = "RSEG1045"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERSTRING_NOTUNIQUE= "RSEG1046"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERSTRING_NOTVALID = "RSEG1047"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERSTRING_DUPLICATES = "RSEG1048"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERSTRING_ALREADYEXISTS = "RSEG1049"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_NUMBER_EMPTY = "RSEG1170"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_NUMBER_NOTVALID = "RSEG1171"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_NUMBER_OUTOFRANGE= "RSEG1172"; //$NON-NLS-1$
-
- public static final String MSG_CONFIRM_DELETE = "RSEG1052"; //$NON-NLS-1$
- public static final String MSG_CONFIRM_DELETEREMOTE = "RSEG1130"; //$NON-NLS-1$
- public static final String MSG_CONFIRM_DELETEPROFILE = "RSEG1053"; //$NON-NLS-1$
- public static final String MSG_CONFIRM_CHANGES = "RSEG1201"; //$NON-NLS-1$
- public static final String MSG_CONFIRM_CHANGES_CANCELABLE = "RSEG1202"; //$NON-NLS-1$
-
- //public static final String MSG_CONNECT_PREFIX = MSG_PREFIX + "Connect.";
- public static final String MSG_CONNECT_PROGRESS = "RSEG1054"; //MSG_CONNECT_PREFIX + "Connecting"; //$NON-NLS-1$
- public static final String MSG_CONNECTWITHPORT_PROGRESS = "RSEG1055"; //MSG_CONNECT_PREFIX + "ConnectingWithPort"; //$NON-NLS-1$
- public static final String MSG_CONNECT_FAILED = "RSEG1056"; //MSG_CONNECT_PREFIX + "Failed"; //$NON-NLS-1$
- public static final String MSG_CONNECT_UNKNOWNHOST = "RSEG1057"; //MSG_CONNECT_PREFIX + "UnknownHost"; //$NON-NLS-1$
- public static final String MSG_CONNECT_CANCELLED = "RSEG1058"; //MSG_CONNECT_PREFIX + "Cancelled"; //$NON-NLS-1$
-
-
- public static final String MSG_CONNECT_DAEMON_FAILED = "RSEG1242"; //MSG_CONNECT_PREFIX + "Failed"; //$NON-NLS-1$
- public static final String MSG_CONNECT_DAEMON_FAILED_EXCEPTION = "RSEG1243"; //MSG_CONNECT_PREFIX + "Failed"; //$NON-NLS-1$
- public static final String MSG_CONNECT_SSL_EXCEPTION = "RSEC2307"; //MSG_CONNECT_PREFIX + "Failed"; //$NON-NLS-1$
-
- public static final String MSG_STARTING_SERVER_VIA_REXEC = "RSEC2310"; //$NON-NLS-1$
- public static final String MSG_STARTING_SERVER_VIA_DAEMON = "RSEC2311"; //$NON-NLS-1$
- public static final String MSG_CONNECTING_TO_SERVER= "RSEC2312"; //$NON-NLS-1$
- public static final String MSG_INITIALIZING_SERVER= "RSEC2313"; //$NON-NLS-1$
- public static final String MSG_PORT_OUT_RANGE = "RSEC2316"; //$NON-NLS-1$
-
- //public static final String MSG_DISCONNECT_PREFIX = MSG_PREFIX + "Disconnect.";
- public static final String MSG_DISCONNECT_PROGRESS = "RSEG1059"; //MSG_DISCONNECT_PREFIX + "Disconnecting"; //$NON-NLS-1$
- public static final String MSG_DISCONNECTWITHPORT_PROGRESS = "RSEG1060"; //MSG_DISCONNECT_PREFIX + "DisconnectingWithPort"; //$NON-NLS-1$
- public static final String MSG_DISCONNECT_FAILED = "RSEG1061"; // MSG_DISCONNECT_PREFIX + "Failed"; //$NON-NLS-1$
- public static final String MSG_DISCONNECT_CANCELLED = "RSEG1062"; //MSG_DISCONNECT_PREFIX + "Cancelled"; //$NON-NLS-1$
-
- //public static final String MSG_SAVE_PREFIX = MSG_PREFIX + "Save.";
- public static final String MSG_SAVE_FAILED = "RSEG1050"; //MSG_SAVE_PREFIX + "Failed"; //$NON-NLS-1$
- public static final String MSG_RESTORE_FAILED = "RSEG1051"; //$NON-NLS-1$
- public static final String MSG_SAVE_CHANGES_PENDING = "RSEG1201"; //$NON-NLS-1$
-
- //public static final String MSG_EXCEPTION_PREFIX = MSG_PREFIX + "Exception.";
- public static final String MSG_EXCEPTION_OCCURRED = "RSEG1003"; //$NON-NLS-1$
- public static final String MSG_EXCEPTION_DELETING = "RSEG1063"; //""RSEG1004"; //$NON-NLS-1$
- public static final String MSG_EXCEPTION_RENAMING = "RSEG1064"; //"RSEG1005"; //MSG_EXCEPTION_PREFIX + "Renaming"; //$NON-NLS-1$
- public static final String MSG_EXCEPTION_MOVING = "RSEG1065"; //MSG_EXCEPTION_PREFIX + "Moving"; //$NON-NLS-1$
-
- //public static final String MSG_RESOLVE_PREFIX = MSG_PREFIX + "Resolve.";
- public static final String MSG_RESOLVE_PROGRESS = "RSEG1070"; //$NON-NLS-1$
-
- //public static final String MSG_QUERY_PREFIX = MSG_PREFIX + "Query.";
- public static final String MSG_QUERY_PROGRESS = "RSEG1095"; //$NON-NLS-1$
- public static final String MSG_QUERY_PROPERTIES_PROGRESS = "RSEG1096"; //$NON-NLS-1$
-
- //public static final String MSG_SET_PREFIX = MSG_PREFIX + "Set.";
- public static final String MSG_SET_PROGRESS = "RSEG1093"; //$NON-NLS-1$
- public static final String MSG_SET_PROPERTIES_PROGRESS = "RSEG1094"; //$NON-NLS-1$
-
- //public static final String MSG_RUN_PREFIX = MSG_PREFIX + "Run.";
- public static final String MSG_RUN_PROGRESS = "RSEG1071"; //$NON-NLS-1$
-
- //public static final String MSG_COPY_PREFIX = MSG_PREFIX + "Copy.";
- public static final String MSG_COPY_PROGRESS = "RSEG1072"; //$NON-NLS-1$
- public static final String MSG_COPYCONNECTION_PROGRESS = "RSEG1073"; //$NON-NLS-1$
- public static final String MSG_COPYCONNECTIONS_PROGRESS = "RSEG1074"; //$NON-NLS-1$
- public static final String MSG_COPYFILTERPOOLS_PROGRESS = "RSEG1075"; //$NON-NLS-1$
- public static final String MSG_COPYFILTERPOOL_PROGRESS = "RSEG1076"; //$NON-NLS-1$
- public static final String MSG_COPYFILTERS_PROGRESS = "RSEG1077"; //$NON-NLS-1$
- public static final String MSG_COPYFILTER_PROGRESS = "RSEG1078"; //$NON-NLS-1$
- public static final String MSG_COPYFILTERSTRINGS_PROGRESS="RSEG1079"; //$NON-NLS-1$
- public static final String MSG_COPYFILTERSTRING_PROGRESS ="RSEG1080"; //$NON-NLS-1$
- public static final String MSG_COPYSUBSYSTEMS_PROGRESS = "RSEG1081"; //$NON-NLS-1$
-
- public static final String MSG_DOWNLOAD_PROGRESS = "RSEG1280"; //$NON-NLS-1$
- public static final String MSG_UPLOAD_PROGRESS = "RSEG1281"; //$NON-NLS-1$
- public static final String MSG_SYNCHRONIZE_PROGRESS = "RSEG1282"; //$NON-NLS-1$
- public static final String MSG_EXTRACT_PROGRESS = "RSEG1285"; //$NON-NLS-1$
- public static final String MSG_PERCENT_DONE = "RSEG1290"; //$NON-NLS-1$
- public static final String MSG_DOWNLOADING_PROGRESS = "RSEG1295"; //$NON-NLS-1$
- public static final String MSG_UPLOADING_PROGRESS = "RSEG1296"; //$NON-NLS-1$
-
- public static final String MSG_COPYFILTERPOOL_COMPLETE = "RSEG1082"; //$NON-NLS-1$
-
- //public static final String MSG_MOVE_PREFIX = MSG_PREFIX + "Move.";
- public static final String MSG_MOVE_PROGRESS = "RSEG1083"; // "moving %1 to %2" //$NON-NLS-1$
- public static final String MSG_MOVECONNECTION_PROGRESS = "RSEG1084"; //$NON-NLS-1$
- public static final String MSG_MOVECONNECTIONS_PROGRESS = "RSEG1085"; //$NON-NLS-1$
- public static final String MSG_MOVEFILTERPOOLS_PROGRESS = "RSEG1086"; //$NON-NLS-1$
- public static final String MSG_MOVEFILTERPOOL_PROGRESS = "RSEG1087"; //$NON-NLS-1$
- public static final String MSG_MOVEFILTERS_PROGRESS = "RSEG1088"; //$NON-NLS-1$
- public static final String MSG_MOVEFILTER_PROGRESS = "RSEG1089"; //$NON-NLS-1$
- public static final String MSG_MOVEFILTERSTRINGS_PROGRESS="RSEG1090"; //$NON-NLS-1$
- public static final String MSG_MOVEFILTERSTRING_PROGRESS ="RSEG1091"; //$NON-NLS-1$
- public static final String MSG_MOVEFILTERPOOL_COMPLETE = "RSEG1092"; //$NON-NLS-1$
-
- public static final String MSG_COPYGENERIC_PROGRESS = "RSEG1115"; //$NON-NLS-1$
- public static final String MSG_MOVEGENERIC_PROGRESS = "RSEG1116"; //$NON-NLS-1$
- public static final String MSG_COPYTHINGGENERIC_PROGRESS = "RSEG1117"; //$NON-NLS-1$
- public static final String MSG_MOVETHINGGENERIC_PROGRESS = "RSEG1118"; //$NON-NLS-1$
-
- public static final String MSG_SAVING_PROGRESS = "RSEG1119"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_UDANAME_EMPTY = "RSEG1180"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDANAME_NOTUNIQUE= "RSEG1181"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDANAME_NOTVALID = "RSEG1182"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_UDACMT_EMPTY = "RSEG1183"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDACMT_NOTVALID = "RSEG1184"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_UDACMD_EMPTY = "RSEG1185"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDACMD_NOTVALID = "RSEG1186"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_UDTNAME_EMPTY = "RSEG1187"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDTNAME_NOTUNIQUE= "RSEG1188"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDTNAME_NOTVALID = "RSEG1189"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_UDTTYPES_EMPTY = "RSEG1190"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDTTYPES_NOTVALID = "RSEG1191"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_SRCTYPE_EMPTY = "RSEG1192"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_SRCTYPE_NOTVALID = "RSEG1193"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_SRCTYPE_NOTUNIQUE= "RSEG1194"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_COMPILELABEL_EMPTY = "RSEG1195"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_COMPILELABEL_NOTUNIQUE= "RSEG1196"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_COMPILELABEL_NOTVALID = "RSEG1197"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_COMPILESTRING_EMPTY = "RSEG1198"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_COMPILESTRING_NOTVALID = "RSEG1199"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_ARCHIVE_NAME = "RSEG1120"; //$NON-NLS-1$
- public static final String MSG_COMBINETO_VIRTUAL_DEST = "RSEG1121"; //$NON-NLS-1$
- public static final String MSG_CONVERTTO_VIRTUAL_DEST = "RSEG1127"; //$NON-NLS-1$
- public static final String MSG_ADDTO_VIRTUAL_DEST = "RSEG1128"; //$NON-NLS-1$
- public static final String MSG_DEST_NOT_IN_SOURCE = "RSEG1129"; //$NON-NLS-1$
- public static final String MSG_DEST_TARGET_READONLY = "RSEF1313"; //$NON-NLS-1$
-
- public static final String FILEMSG_ARCHIVE_CORRUPTED = "RSEG1122"; //$NON-NLS-1$
- public static final String MSG_FOLDER_INUSE = "RSEG1150"; // defect 42138 //$NON-NLS-1$
- public static final String MSG_FILE_INUSE = "RSEG1151"; // defect 42332 //$NON-NLS-1$
-
- public static final String MSG_FILTERPOOL_CREATED = "RSEG1160"; // defect 42503 //$NON-NLS-1$
- public static final String MSG_UPDATEFILTER_FAILED = "RSEG1161"; //$NON-NLS-1$
- public static final String MSG_RENAMEFILTER_FAILED = "RSEG1162"; //$NON-NLS-1$
-
- //public static final String MSG_OPERATION_PREFIX = MSG_PREFIX + "Operation.";
- public static final String MSG_OPERATION_FAILED = "RSEG1066"; //$NON-NLS-1$
- public static final String MSG_OPERATION_CANCELLED = "RSEG1067"; //$NON-NLS-1$
-
-
- //public static final String MSG_LOADING_PREFIX = MSG_PREFIX + "Loading.";
- public static final String MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED = "RSEG1068"; //$NON-NLS-1$
- public static final String MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED = "RSEG1069"; //$NON-NLS-1$
-
- public static final String MSG_UDA_LOAD_ERROR = "RSEG1140"; //$NON-NLS-1$
- public static final String MSG_UDA_ROOTTAG_ERROR = "RSEG1141"; //$NON-NLS-1$
-
- public static final String MSG_HOSTNAME_NOTFOUND = "RSEG1220"; //$NON-NLS-1$
- public static final String MSG_HOSTNAME_VERIFYING = "RSEG1221"; //$NON-NLS-1$
-
- public static final String MSG_CONFIRM_DELETE_USERACTION = "RSEG1230"; //$NON-NLS-1$
- public static final String MSG_CONFIRM_DELETE_USERTYPE = "RSEG1231"; //$NON-NLS-1$
-
- public static final String MSG_WIZARD_PAGE_ERROR = "RSEG1240"; //$NON-NLS-1$
-
- // universal find files
- public static final String MSG_UFF_PATTERN_EMPTY = "RSEG1250"; //$NON-NLS-1$
- public static final String MSG_UFF_PATTERN_INVALID_REGEX = "RSEG1251"; //$NON-NLS-1$
-
- // universal commands
- public static final String MSG_UCMD_INVOCATION_EMPTY = "RSEG1260"; //$NON-NLS-1$
-
- // operation status
- public static final String MSG_OPERATION_RUNNING = "RSEG1255"; //$NON-NLS-1$
- public static final String MSG_OPERATION_FINISHED = "RSEG1256"; //$NON-NLS-1$
- public static final String MSG_OPERTION_STOPPED = "RSEG1257"; //$NON-NLS-1$
- public static final String MSG_OPERATION_DISCONNECTED = "RSEG1258"; //$NON-NLS-1$
-
-
-
- // --------------------------
- // UNIVERSAL FILE MESSAGES...
- // --------------------------
- public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY = "RSEF1011"; //$NON-NLS-1$
- public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE= "RSEF1007"; //$NON-NLS-1$
- public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID = "RSEF1008"; //$NON-NLS-1$
- public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_NOINCLUDES = "RSEF1009"; //$NON-NLS-1$
- public static final String FILEMSG_DELETE_FILE_FAILED = "RSEF1300"; //$NON-NLS-1$
- public static final String FILEMSG_RENAME_FILE_FAILED = "RSEF1301"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_FILE_FAILED = "RSEF1302"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_FILE_FAILED_EXIST = "RSEF1303"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_FOLDER_FAILED = "RSEF1304"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_FOLDER_FAILED_EXIST = "RSEF1309"; //$NON-NLS-1$
- public static final String FILEMSG_CREATE_RESOURCE_NOTVISIBLE = "RSEF1310"; //$NON-NLS-1$
- public static final String FILEMSG_RENAME_RESOURCE_NOTVISIBLE = "RSEF1311"; //$NON-NLS-1$
- public static final String FILEMSG_ERROR_NOFILETYPES = "RSEF1010"; //$NON-NLS-1$
- public static final String FILEMSG_COPY_FILE_FAILED = "RSEF1306"; //$NON-NLS-1$
- public static final String FILEMSG_MOVE_FILE_FAILED = "RSEF1307"; //$NON-NLS-1$
- public static final String FILEMSG_MOVE_TARGET_EQUALS_SOURCE = "RSEF1308"; //$NON-NLS-1$
- public static final String FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE = "RSEF1312"; //$NON-NLS-1$
- public static final String FILEMSG_DELETING = "RSEF1315"; //$NON-NLS-1$
-
- // -------------------------
- // IMPORT/EXPORT MESSAGES...
- // -------------------------
- public static final String FILEMSG_COPY_ROOT = "RSEF8050"; //$NON-NLS-1$
- public static final String FILEMSG_IMPORT_ERROR = "RSEF8052"; //$NON-NLS-1$
- public static final String FILEMSG_IMPORT_PROBLEMS = "RSEF8054"; //$NON-NLS-1$
- public static final String FILEMSG_IMPORT_SELF = "RSEF8056"; //$NON-NLS-1$
- public static final String FILEMSG_EXPORT_ERROR = "RSEF8057"; //$NON-NLS-1$
- public static final String FILEMSG_EXPORT_PROBLEMS = "RSEF8058"; //$NON-NLS-1$
- public static final String FILEMSG_NOT_WRITABLE = "RSEF8059"; //$NON-NLS-1$
-
- public static final String FILEMSG_TARGET_EXISTS = "RSEF8060"; //$NON-NLS-1$
- public static final String FILEMSG_FOLDER_IS_FILE = "RSEF8061"; //$NON-NLS-1$
- public static final String FILEMSG_DESTINATION_CONFLICTING = "RSEF8062"; //$NON-NLS-1$
- public static final String FILEMSG_SOURCE_IS_FILE = "RSEF8063"; //$NON-NLS-1$
- public static final String FILEMSG_SOURCE_EMPTY = "RSEF8066"; //$NON-NLS-1$
- public static final String FILEMSG_EXPORT_FAILED = "RSEF8067"; //$NON-NLS-1$
- public static final String FILEMSG_EXPORT_NONE_SELECTED = "RSEF8068"; //$NON-NLS-1$
- public static final String FILEMSG_DESTINATION_EMPTY = "RSEF8069"; //$NON-NLS-1$
- public static final String FILEMSG_IMPORT_FAILED = "RSEF8070"; //$NON-NLS-1$
- public static final String FILEMSG_IMPORT_NONE_SELECTED = "RSEF8071"; //$NON-NLS-1$
- public static final String FILEMSG_IMPORT_FILTERING = "RSEF8072"; //$NON-NLS-1$
-
- // --------------------------------
- // INFO-POPS FOR UNIVERSAL FILE
- // -------------------------------
-
- public static final String NEW_FILE_WIZARD = "ufwf0000"; //$NON-NLS-1$
- public static final String NEW_FOLDER_WIZARD = "ufwr0000"; //$NON-NLS-1$
- public static final String NEW_FILE_ACTION = "ufaf0000"; //$NON-NLS-1$
- public static final String NEW_FOLDER_ACTION = "ufar0000"; //$NON-NLS-1$
-
-
- // Remote File Exception Messages
- public static final String FILEMSG_SECURITY_ERROR = "RSEF1001"; //$NON-NLS-1$
- public static final String FILEMSG_IO_ERROR = "RSEF1002"; //$NON-NLS-1$
-
- public static final String FILEMSG_FOLDER_NOTEMPTY = "RSEF1003"; //$NON-NLS-1$
- public static final String FILEMSG_FOLDER_NOTFOUND = "RSEF1004"; //$NON-NLS-1$
- public static final String FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE = "RSEF1005"; //$NON-NLS-1$
- public static final String FILEMSG_FILE_NOTFOUND = "RSEF1006"; //$NON-NLS-1$
-
- // --------------------------
- // SYSTEM VIEW MESSAGES...
- // --------------------------
- //public static final String MSG_EXPAND_PREFIX = MSG_PREFIX + "Expand.";
- public static final String MSG_EXPAND_FAILED = "RSEG1098"; //MSG_EXPAND_PREFIX + "Failed"; //$NON-NLS-1$
- public static final String MSG_EXPAND_CANCELLED = "RSEG1067"; //MSG_EXPAND_PREFIX + "Cancelled"; //$NON-NLS-1$
- // Message vetoed by UCD
- //public static final String MSG_EXPAND_CANCELLED = "RSEG1099"; //MSG_EXPAND_PREFIX + "Cancelled";
- public static final String MSG_EXPAND_EMPTY = "RSEG1100"; //MSG_EXPAND_PREFIX + "Empty"; //$NON-NLS-1$
- public static final String MSG_EXPAND_FILTERCREATED = "RSEG1102"; //MSG_EXPAND_PREFIX + "FilterCreated"; //$NON-NLS-1$
- public static final String MSG_EXPAND_CONNECTIONCREATED = "RSEG1108"; //MSG_EXPAND_PREFIX + "ConnectionCreated"; //$NON-NLS-1$
-
- //public static final String MSG_LIST_PREFIX = MSG_PREFIX + "List.";
- public static final String MSG_LIST_CANCELLED = "RSEG1101"; //MSG_LIST_PREFIX + "Cancelled"; //$NON-NLS-1$
-
- // ----------------------------------
- // GENERIC ERROR CHECKING MESSAGES...
- // ----------------------------------
- public static final String MSG_ERROR_CONNECTION_NOTFOUND = "RSEG1103"; //$NON-NLS-1$
- public static final String MSG_ERROR_PROFILE_NOTFOUND = "RSEG1104"; //$NON-NLS-1$
- public static final String MSG_ERROR_FOLDER_NOTFOUND = "RSEG1105"; //$NON-NLS-1$
- public static final String MSG_ERROR_FILE_NOTFOUND = "RSEG1106"; //$NON-NLS-1$
- public static final String MSG_ERROR_FOLDERORFILE_NOTFOUND = "RSEG1107"; //$NON-NLS-1$
- public static final String MSG_ERROR_ARCHIVEMANAGEMENT_NOTSUPPORTED = "RSEG1304"; //$NON-NLS-1$
-
- // --------------------------
- // Generic messages, must substitute in values...
- // --------------------------
- public static final String MSG_GENERIC_I = "RSEO1010"; //$NON-NLS-1$
- public static final String MSG_GENERIC_W = "RSEO1011"; //$NON-NLS-1$
- public static final String MSG_GENERIC_E = "RSEO1012"; //$NON-NLS-1$
- public static final String MSG_GENERIC_U = "RSEO1013"; //$NON-NLS-1$
- public static final String MSG_GENERIC_Q = "RSEO1014"; //$NON-NLS-1$
- public static final String MSG_GENERIC_I_HELP = "RSEO1000"; //$NON-NLS-1$
- public static final String MSG_GENERIC_W_HELP = "RSEO1001"; //$NON-NLS-1$
- public static final String MSG_GENERIC_E_HELP = "RSEO1002"; //$NON-NLS-1$
- public static final String MSG_GENERIC_U_HELP = "RSEO1003"; //$NON-NLS-1$
- public static final String MSG_GENERIC_Q_HELP = "RSEO1004"; //$NON-NLS-1$
- public static final String MSG_GENERIC_I_TWOPARMS_HELP = "RSEO1005"; //$NON-NLS-1$
- public static final String MSG_GENERIC_W_TWOPARMS_HELP = "RSEO1006"; //$NON-NLS-1$
- public static final String MSG_GENERIC_E_TWOPARMS_HELP = "RSEO1007"; //$NON-NLS-1$
- public static final String MSG_GENERIC_U_TWOPARMS_HELP = "RSEO1008"; //$NON-NLS-1$
- public static final String MSG_GENERIC_Q_TWOPARMS_HELP = "RSEO1009"; //$NON-NLS-1$
-
- // ----------------------------------
- // COMMUNICATIONS ERROR CHECKING MESSAGES...
- // ----------------------------------
- public static final String MSG_COMM_CONNECT_FAILED = "RSEC1001"; //$NON-NLS-1$
- public static final String MSG_COMM_AUTH_FAILED = "RSEC1002"; //$NON-NLS-1$
- public static final String MSG_COMM_PWD_INVALID = "RSEC1004"; //$NON-NLS-1$
-
- public static final String MSG_COMM_PWD_EXISTS = "RSEC2101"; //$NON-NLS-1$
- public static final String MSG_COMM_PWD_MISMATCH = "RSEC2102"; //$NON-NLS-1$
- public static final String MSG_COMM_PWD_BLANKFIELD = "RSEC2103"; //$NON-NLS-1$
-
- public static final String MSG_COMM_ENVVAR_DUPLICATE = "RSEC2001"; //$NON-NLS-1$
- public static final String MSG_COMM_ENVVAR_NONAME = "RSEC2002"; //$NON-NLS-1$
- public static final String MSG_COMM_ENVVAR_INVALIDCHAR = "RSEC2004"; //$NON-NLS-1$
-
- public static final String MSG_COMM_DAEMON_NOTSTARTED = "RSEC2201"; //$NON-NLS-1$
-
- public static final String MSG_COMM_SERVER_NOTSTARTED = "RSEC2301"; //$NON-NLS-1$
- public static final String MSG_COMM_INVALID_LOGIN = "RSEC2302"; //$NON-NLS-1$
-
- public static final String MSG_COMM_INCOMPATIBLE_PROTOCOL = "RSEC2303"; //$NON-NLS-1$
- public static final String MSG_COMM_INCOMPATIBLE_UPDATE = "RSEC2304"; //$NON-NLS-1$
-
-
- public static final String MSG_COMM_REXEC_NOTSTARTED = "RSEC2305"; //$NON-NLS-1$
-
- public static final String MSG_COMM_PORT_WARNING = "RSEC2306"; //$NON-NLS-1$
-
- public static final String MSG_COMM_SERVER_OLDER_WARNING = "RSEC2308"; //$NON-NLS-1$
- public static final String MSG_COMM_CLIENT_OLDER_WARNING = "RSEC2309"; //$NON-NLS-1$
-
- public static final String MSG_COMM_USING_SSL = "RSEC2314"; //$NON-NLS-1$
- public static final String MSG_COMM_NOT_USING_SSL = "RSEC2315"; //$NON-NLS-1$
-
- // Unexpected error message
- public static final String MSG_ERROR_UNEXPECTED = "RSEF8002"; //$NON-NLS-1$
-
- // Connection doesn't exist
- public static final String MSG_CONNECTION_DELETED = "RSEF5011"; //$NON-NLS-1$
-
- // Remote editing messages
- public static final String MSG_DOWNLOAD_NO_WRITE = "RSEF5002"; //$NON-NLS-1$
- public static final String MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR = "RSEF5009"; //$NON-NLS-1$
- public static final String MSG_UPLOAD_FILE_EXISTS = "RSEF5012"; //$NON-NLS-1$
-
- public static final String MSG_FOLDER_UNREADABLE = "RSEF5020"; //$NON-NLS-1$
-
- // General error message
- public static final String MSG_ERROR_GENERAL = "RSEO1002"; //$NON-NLS-1$
-
- // file transfer message
- public static final String MSG_TRANSFER_INVALID = "RSEG1270"; //$NON-NLS-1$
-
-
- // remote error list title message
- public static final String MSG_ERROR_LIST_TITLE = "RSEG1500"; //$NON-NLS-1$
-
- // name validation
- public static final String MSG_ERROR_EXTENSION_EMPTY = "RSEF6001"; //$NON-NLS-1$
- public static final String MSG_ERROR_FILENAME_INVALID = "RSEF6002"; //$NON-NLS-1$
-
- // cache preferences
- public static final String MSG_CACHE_UPLOAD_BEFORE_DELETE = "RSEF6101"; //$NON-NLS-1$
- public static final String MSG_CACHE_UNABLE_TO_SYNCH = "RSEF6102"; //$NON-NLS-1$
-
- // remote search messages
- public static final String MSG_REMOTE_SEARCH_INVALID_REGEX = "RSEG1601"; //$NON-NLS-1$
-
- // yantzi: artemis 6.0, offline messages
- public static final String MSG_OFFLINE_CANT_CONNECT = "RSEC3001"; //$NON-NLS-1$
-
- // file import/export messages
- public static final String MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION = "RSEF5101"; //$NON-NLS-1$
- public static final String MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION = "RSEF5102"; //$NON-NLS-1$
-
- // jar export messages
- public static final String MSG_REMOTE_JAR_EXPORT_OVERWRITE_FILE = "RSEF5103"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPageCompleteListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPageCompleteListener.java
deleted file mode 100644
index 15055ba96..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPageCompleteListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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;
-/**
- * This is used in forms that are used within dialogs and pages, and
- * specifically with {@link org.eclipse.rse.ui.SystemBaseForm}.
- * It allows the dialog or page to be called back when the form code calls
- * setPageComplete, a method within the form class. This way the diaog or
- * page can themselves call their own setPageComplete method.
- */
-public interface ISystemPageCompleteListener
-{
- /**
- * The callback method.
- * This is called whenever setPageComplete is called by the form code.
- * @param complete complete indicator as set by the caller
- * @see SystemBaseForm#addPageCompleteListener(ISystemPageCompleteListener)
- */
- public void setPageComplete(boolean complete);
-
-} \ No newline at end of file
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
deleted file mode 100644
index 0574a04ab..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPreferencesConstants.java
+++ /dev/null
@@ -1,101 +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;
-/**
- * Keys into preferences bundle.
- */
-public interface ISystemPreferencesConstants
-{
-
- // root
- public static final String ROOT = "org.eclipse.rse.preferences."; //$NON-NLS-1$
-
- // keys
- public static final String SYSTEMTYPE = ROOT + "systemtype"; //$NON-NLS-1$
- public static final String SYSTEMTYPE_VALUES = ROOT + "systemtype.info"; //$NON-NLS-1$
- public static final String USERIDPERKEY = ROOT + "useridperkey"; //$NON-NLS-1$
- public static final String USERIDKEYS = ROOT + "userid.keys"; //$NON-NLS-1$
- public static final String SHOWFILTERPOOLS = ROOT + "filterpools.show"; //$NON-NLS-1$
- public static final String ACTIVEUSERPROFILES = ROOT + "activeuserprofiles"; //$NON-NLS-1$
- public static final String QUALIFY_CONNECTION_NAMES= ROOT + "qualifyconnectionnames"; //$NON-NLS-1$
- public static final String ORDER_CONNECTIONS = ROOT + "order.connections"; //$NON-NLS-1$
- public static final String HISTORY_FOLDER = ROOT + "history.folder"; //$NON-NLS-1$
- public static final String HISTORY_QUALIFIED_FOLDER= ROOT + "history.qualified.folder"; //$NON-NLS-1$
- public static final String SHOWHIDDEN = ROOT + "showhidden"; //$NON-NLS-1$
- public static final String SHOWNEWCONNECTIONPROMPT = ROOT + "shownewconnection"; //$NON-NLS-1$
- public static final String REMEMBER_STATE = ROOT + "rememberState"; //$NON-NLS-1$
- public static final String USE_DEFERRED_QUERIES = ROOT + "useDeferredQueries"; //$NON-NLS-1$
- public static final String RESTORE_STATE_FROM_CACHE = ROOT + "restoreStateFromCache"; //$NON-NLS-1$
- public static final String CASCADE_UDAS_BYPROFILE = ROOT + "uda.cascade"; //$NON-NLS-1$
- public static final String FILETRANSFERMODEDEFAULT = ROOT + "filetransfermodedefault"; //$NON-NLS-1$
- public static final String DAEMON_AUTOSTART = ROOT + "daemon.autostart"; //$NON-NLS-1$
- public static final String DAEMON_PORT = ROOT + "daemon.port"; //$NON-NLS-1$
-
- public static final String LIMIT_CACHE = ROOT + "limit.cache"; //$NON-NLS-1$
- public static final String MAX_CACHE_SIZE = ROOT + "max.cache.size"; //$NON-NLS-1$
-
- public static final String DOSUPERTRANSFER = ROOT + "dosupertransfer"; //$NON-NLS-1$
- public static final String SUPERTRANSFER_ARC_TYPE = ROOT + "supertransfer.archivetype"; //$NON-NLS-1$
-
- public static final String DOWNLOAD_BUFFER_SIZE = ROOT + "download.buffer.size"; //$NON-NLS-1$
- public static final String UPLOAD_BUFFER_SIZE = ROOT + "upload.buffer.size"; //$NON-NLS-1$
-
- public static final String VERIFY_CONNECTION = ROOT + "verify.connection"; //$NON-NLS-1$
-
- public static final String ALERT_SSL = ROOT + "alert.ssl"; //$NON-NLS-1$
- public static final String ALERT_NONSSL = ROOT + "alert.nonssl"; //$NON-NLS-1$
-
- // DEFAULTS
- public static final boolean DEFAULT_SHOWFILTERPOOLS = false;
- public static final boolean DEFAULT_QUALIFY_CONNECTION_NAMES = false;
- public static final String DEFAULT_SYSTEMTYPE = ""; //$NON-NLS-1$
- public static final String DEFAULT_USERID = ""; //$NON-NLS-1$
- //DKM public static final String DEFAULT_ACTIVEUSERPROFILES = "Team;Private";
- public static final String DEFAULT_ACTIVEUSERPROFILES = "Team"; //$NON-NLS-1$
-
- public static final String DEFAULT_ORDER_CONNECTIONS = ""; //$NON-NLS-1$
- public static final String DEFAULT_HISTORY_FOLDER = ""; //$NON-NLS-1$
- public static final boolean DEFAULT_SHOW_HIDDEN = 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;
- public static final int DEFAULT_FILETRANSFERMODE = 0;
- public static final boolean DEFAULT_USE_DEFERRED_QUERIES = true;
-
- public static final String DEFAULT_TEAMPROFILE = "Team"; //$NON-NLS-1$
-
- public static final int FILETRANSFERMODE_BINARY = 0;
- public static final int FILETRANSFERMODE_TEXT = 1;
-
- public static final boolean DEFAULT_DAEMON_AUTOSTART = false;
- public static final int DEFAULT_DAEMON_PORT = 4300;
-
- public static final boolean DEFAULT_LIMIT_CACHE = false;
- public static final String DEFAULT_MAX_CACHE_SIZE = "512"; //$NON-NLS-1$
-
- public static final String DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE = "zip"; //$NON-NLS-1$
- public static final boolean DEFAULT_DOSUPERTRANSFER = true;
-
- public static final int DEFAULT_DOWNLOAD_BUFFER_SIZE = 40;
-
- 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/ISystemRenameTarget.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemRenameTarget.java
deleted file mode 100644
index f02c0eb56..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemRenameTarget.java
+++ /dev/null
@@ -1,41 +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;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-
-/**
- * Any UI part that supports the common rename action can implement
- * this to enable the rename popup menu action, supplied by the system explorer view.
- */
-public interface ISystemRenameTarget extends ISelectionProvider
-{
- /**
- * Return true if rename should even be shown in the popup menu
- */
- public boolean showRename();
- /**
- * Return true if rename should be enabled based on your current selection.
- */
- public boolean canRename();
- /**
- * Actually do the rename of currently selected items.
- * The array of new names matches the currently selected items.
- * Return true if it worked. Return false if it didn't (you display msg), or throw an exception (framework displays msg)
- */
- public boolean doRename(String[] newNames);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemStringsInputAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemStringsInputAction.java
deleted file mode 100644
index 4137d6916..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemStringsInputAction.java
+++ /dev/null
@@ -1,28 +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;
-/**
- *
- */
-public interface ISystemStringsInputAction
-{
- /**
- * Set the list of existing filter strings to help with validation.
- * Called when launched from WorkWithList widget
- */
- public void setExistingStrings(String[] existingStrings, boolean caseSensitive);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemThemeConstants.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemThemeConstants.java
deleted file mode 100644
index 5be818c8b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemThemeConstants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-/**
- * This interface should be used to maintain all constants related to colors and fonts
- * that are settable by the user through preferences
- */
-public interface ISystemThemeConstants {
-
- // color constants used for messages
- public static final String MESSAGE_ERROR_COLOR = "MESSAGE_ERROR_COLOR"; //$NON-NLS-1$
- public static final String MESSAGE_WARNING_COLOR = "MESSAGE_WARNING_COLOR" ; //$NON-NLS-1$
- public static final String MESSAGE_INFORMATION_COLOR = "MESSAGE_INFORMATION_COLOR"; //$NON-NLS-1$
-
- // color constants used by Remote Shell view
- public static final String REMOTE_COMMANDS_VIEW_BG_COLOR = "REMOTE_COMMANDS_VIEW_BG_COLOR"; //$NON-NLS-1$
- public static final String REMOTE_COMMANDS_VIEW_FG_COLOR = "REMOTE_COMMANDS_VIEW_FG_COLOR"; //$NON-NLS-1$
- public static final String REMOTE_COMMANDS_VIEW_PROMPT_COLOR = "REMOTE_COMMANDS_VIEW_PROMPT_COLOR"; //$NON-NLS-1$
-
- // font constant used by Remote Shell view
- public static final String REMOTE_COMMANDS_VIEW_FONT = "REMOTE_COMMANDS_VIEW_FONT"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemVerifyListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemVerifyListener.java
deleted file mode 100644
index 6e46f787f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemVerifyListener.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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;
-/**
- * @author mjberger
- * This is used in forms that are used within dialogs and pages, and
- * specifically with {@link org.eclipse.rse.ui.RemoteBaseServerLauncherForm}.
- * It allows the dialog or page to be called back when the form code calls
- * verify, a method within the form class. This way the diaog or
- * page can update their error messages if there are any.
- */
-public interface ISystemVerifyListener
-{
- /**
- * The callback method.
- * This is called whenever verify is called by the form code.
- */
- public void handleVerifyComplete();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerAddQuotes.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerAddQuotes.java
deleted file mode 100644
index 93006be85..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerAddQuotes.java
+++ /dev/null
@@ -1,86 +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;
-
-/**
- * This massager will take a string an add quotes to it by
- * wrapping the string in the quote character and doubling
- * any interior instances of the quote character.
- */
-public class MassagerAddQuotes implements ISystemMassager {
-
-
-
- private char quote = '\'';
-
- /**
- * Construct a new instance of the massager. This instance
- * assumes the quote character is the apostrophe '\''.
- */
- public MassagerAddQuotes() {
- super();
- }
-
- /**
- * Construct a new instance of the massager. This instance
- * uses the supplied character as the quoting character.
- *
- * @param quote the quote character to use in quoting strings
- */
- public MassagerAddQuotes(char quote) {
- this.quote = quote;
- }
-
- /**
- * Quotes the string by surround the original string with
- * the quote character and doubling any internal occurences of
- * the character.
- *
- * @param text the string to be quoted
- * @return the quoted string
- * @see org.eclipse.rse.ui.ISystemMassager#massage(String)
- */
- public String massage(String text) {
-
- char[] chars = text.toCharArray();
-
- /* determine the number of extra quotes needed */
- int n = 0;
- for (int i = 0; i < chars.length; i++) {
- if (chars[i] == quote) {
- n++;
- }
- }
- n += 2;
-
- /* Allocate and move the characters into the buffer */
- StringBuffer buf = new StringBuffer(chars.length + n);
- buf.append(quote);
- for (int i = 0; i < chars.length; i++) {
- if (chars[i] == quote) {
- buf.append(quote);
- }
- buf.append(chars[i]);
- }
- buf.append(quote);
-
- return buf.toString();
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCase.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCase.java
deleted file mode 100644
index 761b4ad25..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCase.java
+++ /dev/null
@@ -1,110 +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;
-/**
- * This massager folds the input text into either uppercase or lowercase,
- * depending on the value pass to the constructor or setter.
- * <p>
- * Note by default this also trims the
- */
-public class MassagerFoldCase implements ISystemMassager
-{
-
- private boolean uppercase;
- private boolean trim;
-
- /**
- * Constructor using uppercase as the case direction
- */
- public MassagerFoldCase()
- {
- this(true);
- }
- /**
- * Constructor using given case direction
- * @param foldToUpperCase - whether to fold to uppercase (true) or lowercase (false).
- */
- public MassagerFoldCase(boolean foldToUpperCase)
- {
- super();
- setFoldToUpperCase(foldToUpperCase);
- setTrimBlanks(true);
- }
-
- /**
- * Toggle whether to fold to uppercase or lowercase
- * @param foldToUpperCase - whether to fold to uppercase (true) or lowercase (false).
- */
- public void setFoldToUpperCase(boolean foldToUpperCase)
- {
- this.uppercase = foldToUpperCase;
- }
- /**
- * Toggle whether to trim blanks for not
- * @param trimBlanks - whether to trim blanks (true) or leave them (false).
- */
- public void setTrimBlanks(boolean trimBlanks)
- {
- this.trim = trimBlanks;
- }
-
- /**
- * Return property about whether to fold to uppercase or lowercase
- * @return true if folder to uppercase, false if folded to lowercaese
- */
- public boolean getFoldToUpperCase()
- {
- return uppercase;
- }
- /**
- * Return property about whether to trim blanks for not
- * @return true if blanks are trimmed
- */
- public boolean getTrimBlanks()
- {
- return trim;
- }
- /**
- * @see org.eclipse.rse.ui.ISystemMassager#massage(String)
- */
- public String massage(String text)
- {
- if (text == null)
- return null;
- if (trim)
- text = text.trim();
- if (uppercase)
- return toUpperCase(text);
- else
- return toLowerCase(text);
- }
-
- /**
- * Overrridable method that actually does the uppercasing
- */
- protected String toUpperCase(String input)
- {
- return input.toUpperCase();
- }
- /**
- * Overrridable method that actually does the lowercasing
- */
- protected String toLowerCase(String input)
- {
- return input.toLowerCase();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseOutsideQuotes.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseOutsideQuotes.java
deleted file mode 100644
index f87d2773b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseOutsideQuotes.java
+++ /dev/null
@@ -1,197 +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;
-/**
- * This massager folds the input text into either uppercase or lowercase,
- * but ONLY for those portions of the string that are not inside delimiters.
- * <p>
- * The default delimiter characters checked for are single or double quote characters, but this
- * can be changed by a setter method. When any of the delimiter characters are
- * first found we enter delimited (non-folding) mode, until the same
- * non-escaped delimiter character is found.
- * <p>
- * This massager assumes an imbedded delimiter is denoted by a doubled up
- * delimiter. If this is not the case, a setter can be used for the escape
- * character.
- * <p>
- * This massager takes more time than the MassageFoldCaseUnlessQuoted massager,
- * as that one just checks if the entire string is delimited, while this one
- * attempts to check for ranges of delimiting.
- */
-public class MassagerFoldCaseOutsideQuotes extends MassagerFoldCase
-{
-
- private static final char[] DEFAULT_DELIMITERS = {'\"', '\''};
- private char[] delimiters;
- private char escape = ' ';
-
- /**
- * Constructor using uppercase and using single and double quotes as delimiters
- */
- public MassagerFoldCaseOutsideQuotes()
- {
- this(true, DEFAULT_DELIMITERS);
- }
- /**
- * Constructor using given case direction, using single and double quotes as delimiters
- * @param foldToUpperCase - whether to fold to uppercase (true) or lowercase (false).
- */
- public MassagerFoldCaseOutsideQuotes(boolean foldToUpperCase)
- {
- this(foldToUpperCase, DEFAULT_DELIMITERS);
- }
- /**
- * Constructor using given case direction, using given delimiters
- * @param foldToUpperCase - whether to fold to uppercase (true) or lowercase (false).
- * @param delimiters - chars to trigger delimited mode. Delimited sections are not folded.
- */
- public MassagerFoldCaseOutsideQuotes(boolean foldToUpperCase, char[] delimiters)
- {
- super(foldToUpperCase);
- setDelimiters(delimiters);
- }
-
- /**
- * Set the delimiter characters
- * @param delimiters - chars to trigger delimited mode. Delimited sections are not folded.
- */
- public void setDelimiters(char[] delimiters)
- {
- this.delimiters = delimiters;
- }
- /**
- * Set the escape character used for denoted an imbedded delimiter. By default, it is assumed
- * a doubled up delimiter is used for this.
- * @param escapeChar - char that escapes the delimiter. Eg '\'
- */
- public void setEscapeCharacter(char escapeChar)
- {
- this.escape = escapeChar;
- }
-
- /**
- * Get the delimiter characters
- */
- public char[] getDelimiters()
- {
- return delimiters;
- }
- /**
- * Get the escape character
- */
- public char getEscapeCharacter()
- {
- return escape;
- }
-
- /**
- * Overrridable method that actually does the uppercasing
- */
- protected String toUpperCase(String input)
- {
- if ((input==null) || (input.length() == 0))
- return input;
- else if (!hasAnyDelimiters(input)) // no delimit characters?
- return input.toUpperCase(); // fold it all!
- else
- return doFolding(input, true);
- }
- /**
- * Overrridable method that actually does the lowercasing
- */
- protected String toLowerCase(String input)
- {
- if ((input==null) || (input.length() == 0))
- return input;
- else if (!hasAnyDelimiters(input)) // no delimit characters?
- return input.toLowerCase(); // fold it all!
- else
- return doFolding(input, false);
- }
- /**
- * Check for existence of any delimiters
- */
- protected boolean hasAnyDelimiters(String input)
- {
- boolean hasAny = false;
- for (int idx=0; !hasAny && (idx<delimiters.length); idx++)
- if (input.indexOf(delimiters[idx]) != -1)
- hasAny = true;
- return hasAny;
- }
-
- /**
- * Method that actually walks the given string, character by character,
- * folding all those which are not inside delimiters
- */
- protected String doFolding(String input, boolean upperCase)
- {
- StringBuffer buffer = new StringBuffer(input.length());
- boolean insideDelimiters = false;
- boolean checkForEscape = (escape != ' ');
- char currDelimiter = ' ';
- char prevChar = ' ';
- char currChar = ' ';
- for (int idx=0; idx<input.length(); idx++)
- {
- prevChar = currChar;
- currChar = input.charAt(idx);
- // ------------------------
- // outside of delimiters...
- // ------------------------
- if (!insideDelimiters)
- {
- // append folded
- if (upperCase)
- buffer.append(Character.toUpperCase(currChar));
- else
- buffer.append(Character.toLowerCase(currChar));
- // check if this is the start of delimiting...
- if (isDelimiter(currChar))
- {
- currDelimiter = currChar;
- insideDelimiters = true; // enter delimited mode
- }
- }
- // -----------------------
- // inside of delimiters...
- // -----------------------
- else
- {
- buffer.append(currChar); // append as is
- // check if this is the end of delimiting...
- if (currChar == currDelimiter)
- {
- // ensure this isn't an escaped delimiter
- if (!checkForEscape || (prevChar != escape))
- insideDelimiters = false; // exit delimited mode
- }
- }
- }
- return buffer.toString();
- }
- /**
- * Check if given character is one of the delimiters
- */
- protected boolean isDelimiter(char currChar)
- {
- for (int idx=0; idx<delimiters.length; idx++)
- if (currChar == delimiters[idx])
- return true;
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseUnlessQuoted.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseUnlessQuoted.java
deleted file mode 100644
index 6dcbbbf8b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseUnlessQuoted.java
+++ /dev/null
@@ -1,95 +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;
-/**
- * This massager folds the input text into either uppercase or lowercase,
- * but ONLY if the given input is not delimited. The default delimiter checked
- * for is the double quote character, but this can be changed by a setter method.
- */
-public class MassagerFoldCaseUnlessQuoted extends MassagerFoldCase
-{
-
- private char delimiter;
-
- /**
- * Constructor using uppercase and using a double quote as delimiter
- */
- public MassagerFoldCaseUnlessQuoted()
- {
- this(true, '\"');
- }
- /**
- * Constructor using given case direction, using a double quote as delimiter
- * @param foldToUpperCase - whether to fold to uppercase (true) or lowercase (false).
- */
- public MassagerFoldCaseUnlessQuoted(boolean foldToUpperCase)
- {
- this(foldToUpperCase, '\"');
- }
- /**
- * Constructor using given case direction, using given delimiter
- * @param foldToUpperCase - whether to fold to uppercase (true) or lowercase (false).
- * @param delimiter - char to check if text is enclosed with. If it is, then no folding is done.
- */
- public MassagerFoldCaseUnlessQuoted(boolean foldToUpperCase, char delimiter)
- {
- super(foldToUpperCase);
- setDelimiter(delimiter);
- }
-
- /**
- * Set the delimiter character
- * @param delimiter - char to check if text is enclosed with. If it is, then no folding is done.
- */
- public void setDelimiter(char delimiter)
- {
- this.delimiter = delimiter;
- }
-
- /**
- * Get the delimiter character
- */
- public char getDelimiter()
- {
- return delimiter;
- }
-
- /**
- * Overrridable method that actually does the uppercasing
- */
- protected String toUpperCase(String input)
- {
- if ((input.length() >= 2) &&
- (input.charAt(0) == delimiter) && // start with delimiter?
- (input.charAt(input.length()-1) == delimiter)) // end with delimiter?
- return input; // do nothing
- else
- return input.toUpperCase(); // fold
- }
- /**
- * Overrridable method that actually does the lowercasing
- */
- protected String toLowerCase(String input)
- {
- if ((input.length() >= 2) &&
- (input.charAt(0) == delimiter) && // start with delimiter?
- (input.charAt(input.length()-1) == delimiter)) // end with delimiter?
- return input; // do nothing
- else
- return input.toLowerCase(); // fold
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerRemoveQuotes.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerRemoveQuotes.java
deleted file mode 100644
index 92e614a3e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerRemoveQuotes.java
+++ /dev/null
@@ -1,192 +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;
-
-/**
- * Utility class used by UI widgets to format a srcpf or member Description string.<br>
- * It checks to see if the string is legally quoted, and if not, it returns it as is. A legally quoted
- * string is one which begins and ends with single quotes, and where all single quotes inside the
- * string are escaped with another single quote. If the string is legally quoted, it de-quotes it
- * (hence the name). Dequoting means remove the single quotes, and remove any escape quotes
- * from the inside of the string.
- * There is also a general constructor that takes in the quoting character, the character to escape,
- * and the character to use as an escape charcter. It also takes n a boolean flag that decides wether
- * or not the string has to be quoted before this massager actually does the job.
- */
-public class MassagerRemoveQuotes implements ISystemMassager {
-
-
-
- private String quoteChar;
- private String charToEscape;
- private String escapeChar;
- private boolean mustBeQuoted;
-
- /**
- * Default constructor for MassagerRemoveQuotes.<br>
- * Assumes that a legal string is one where the string is quoted with single quotes,
- * and all inner quotes are escaped with a single quote.
- */
- public MassagerRemoveQuotes() {
- this('\'', '\'', '\'', true);
- }
-
- /**
- * Generic constructor. A valid string is one where every charToEscape is actually
- * escaped with an escapeChar before it. If mustBeQuoted is true, then the string
- * is only valid if it is quoted with the quoteChar, and the characters inside the
- * string itself are properly escaped. If the string is determined to be a valid string,
- * this massager returns the string with the quotes and escape characters stripped out.
- * if not, the string is returned as is.
- */
- public MassagerRemoveQuotes(
- char quoteChar,
- char charToEscape,
- char escapeChar,
- boolean mustBeQuoted) {
-
- this.quoteChar = String.valueOf(quoteChar);
- this.charToEscape = String.valueOf(charToEscape);
- this.escapeChar = String.valueOf(escapeChar);
- this.mustBeQuoted = mustBeQuoted;
- }
-
- public String massage(String text) {
- String strippedText = text;
-
- if (mustBeQuoted) {
- if (!isQuoted(text))
- // String is not quoted, when it should be, return it as is.
- // No need to de-quote since it is not a legal string.
- return text;
- else
- strippedText = stripQuotes(text);
- }
-
- // check to see if string is a legal string, and if it is, de-quote it.
- boolean islegal = isLegalString(strippedText);
- if (islegal)
- return deQuote(strippedText);
- else
- return text;
- }
-
- /**
- * Returns true if string is single quoted.
- */
- protected boolean isQuoted(String text) {
- if (text.startsWith(quoteChar) && text.endsWith(quoteChar))
- return true;
- else
- return false;
- }
-
- /**
- * Checks to see if we have a valid string. A valid string is one where all
- * quotes are escaped with another quote.
- */
- protected boolean isLegalString(String text) {
- if (charToEscape.equals(escapeChar))
- return doForwardChecking(text);
- else
- return doBackwardChecking(text);
- }
-
- private boolean doForwardChecking(String text) {
- int index = text.indexOf(charToEscape);
- while (index != -1) {
- // check the char AFTER the escape char since they are both the
- // same. . Be careful if it is the last char.
- if ((index == text.length() - 1)
- || (text.charAt(index + 1) != escapeChar.charAt(0)))
- // we have a quote that is not escaped => not a legal string.
- return false;
-
- // search for another quote *after* the escaped one.
- index = text.indexOf(charToEscape, index + 2);
- }
-
- // all quotes are escaped, legal string.
- return true;
-
- }
-
- private boolean doBackwardChecking(String text) {
- int index = text.indexOf(charToEscape);
- while (index != -1) {
- // check the char before the character to escape. Be careful if it is the first char.
- if ((index == 0)
- || (text.charAt(index - 1) != escapeChar.charAt(0)))
- // we have a quote that is not escaped => not a legal string.
- return false;
-
- // search for another quote *after* the escaped one.
- index = text.indexOf(charToEscape, index + 1);
- }
-
- // all quotes are escaped, legal string.
- return true;
-
- }
-
- /**
- * Removes first and last chars if they are single quotes, otherwise
- * returns the string as is.
- */
- private String stripQuotes(String text) {
- if (isQuoted(text)) {
- text = text.substring(1, text.length() - 1);
- }
- return text;
- }
-
- /**
- * This method assumes that the passed string is a legal string, and it does
- * the qe-quoting.
- */
- private String deQuote(String text) {
- if (charToEscape.equals(escapeChar))
- return doForwardDeQuote(text);
- else
- return doBackwardDeQuote(text);
- }
-
- private String doForwardDeQuote(String text) {
- int index = text.indexOf(charToEscape);
- while (index != -1) {
- // strip the escape char.
- text = text.substring(0, index) + text.substring(index + 1);
-
- // search for another quote *after* the escaped one.
- index = text.indexOf(charToEscape, index + 2);
- }
- return text;
- }
-
- private String doBackwardDeQuote(String text) {
- int index = text.indexOf(charToEscape);
- while (index != -1) {
- // strip the escape char.
- text = text.substring(0, index - 1) + text.substring(index);
-
- // search for another quote *after* the escaped one.
- index = text.indexOf(charToEscape, index + 1);
- }
- return text;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/Mnemonics.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/Mnemonics.java
deleted file mode 100644
index 39f46624f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/Mnemonics.java
+++ /dev/null
@@ -1,575 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.rse.ui.widgets.InheritableEntryField;
-import org.eclipse.swt.events.ArmListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Text;
-
-
-
-/**
- * A class for creating unique mnemonics per control per window.
- */
-public class Mnemonics
-{
- private static final String[] TransparentEndings = { // endings that should appear after a mnemonic
- "...", // ellipsis //$NON-NLS-1$
- ">>", // standard "more" //$NON-NLS-1$
- "<<", // standard "less" //$NON-NLS-1$
- ">", // "more" -- non-standard usage, must appear in list after >> //$NON-NLS-1$
- "<", // "less" -- non-standard usage, must appear in list after << //$NON-NLS-1$
- ":", // colon //$NON-NLS-1$
- "\uff0e\uff0e\uff0e", // wide ellipsis //$NON-NLS-1$
- "\uff1e\uff1e", // wide standard "more" //$NON-NLS-1$
- "\uff1c\uff1c", // wide standard "less" //$NON-NLS-1$
- "\uff1e", // wide non-standard "more" //$NON-NLS-1$
- "\uff1c", // wide non-standard "less" //$NON-NLS-1$
- "\uff1a" // wide colon //$NON-NLS-1$
- };
-
- private StringBuffer mnemonics = new StringBuffer(); // mnemonics used so far
- private static final String candidateChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; //$NON-NLS-1$
- private String preferencePageMnemonics = null; // mnemonics used by Eclipse on preference pages
- private String wizardPageMnemonics = null; // mnemonics used by Eclipse on wizard pages
- // private static String preferencePageMnemonics = "AD"; // mnemonics used by Eclipse on preference pages
- // private static String wizardPageMnemonics = "FBN"; // mnemonics used by Eclipse on wizard pages
- public static final char MNEMONIC_CHAR = '&';
- private boolean onPrefPage = false;
- private boolean onWizardPage = false;
- private boolean applyMnemonicsToPrecedingLabels = true;
-
- /**
- * Clear the list for re-use
- */
- public void clear()
- {
- mnemonics = new StringBuffer();
- }
-
- /**
- * Inserts an added mnemonic of the form (&x) into a StringBuffer at the correct point.
- * Checks for transparent endings and trailing spaces.
- * @param label the label to check
- */
- private static void insertMnemonic(StringBuffer label, String mnemonic) {
- int p = label.length();
- // check for trailing spaces #1
- while (p > 0 && label.charAt(p - 1) == ' ') {
- p--;
- }
- // check for transparent endings
- for (int i = 0; i < TransparentEndings.length; i++) {
- String transparentEnding = TransparentEndings[i];
- int l = transparentEnding.length();
- int n = p - l;
- if (n >= 0) {
- String labelEnding = label.substring(n, n + l);
- if (labelEnding.equals(transparentEnding)) {
- p = n;
- break;
- }
- }
- }
- // check for trailing spaces #2
- while (p > 0 && label.charAt(p - 1) == ' ') {
- p--;
- }
- // make sure there is something left to attach a mnemonic to
- if (p > 0) {
- label.insert(p, mnemonic);
- }
- }
-
- /**
- * Given a string, this starts at the first character and iterates until
- * it finds a character not previously used as a mnemonic on this page.
- * Not normally called from other classes, but rather by the setMnemonic
- * methods in this class.
- * @param label String to which to generate and apply the mnemonic
- * @return input String with '&' inserted in front of the unique character
- */
- public String setUniqueMnemonic(String label)
- {
-
- // Kludge for now
- // If there is already a mnemonic, remove it
- label = removeMnemonic(label);
- //int iMnemonic = label.indexOf( MNEMONIC_CHAR );
- //if( iMnemonic >= 0 && iMnemonic < label.length() - 1 ){
- //mnemonics.append( label.charAt( iMnemonic + 1 ) );
- //return label;
- //}
-
- int labelLen = label.length();
- if (labelLen == 0)
- return label;
- else if ((labelLen == 1) && label.equals("?")) //$NON-NLS-1$
- return label;
- StringBuffer newLabel = new StringBuffer(label);
- int mcharPos = findUniqueMnemonic(label);
- if (mcharPos != -1)
- newLabel.insert(mcharPos,MNEMONIC_CHAR);
- // if no unique character found, then
- // find a new arbitrary one from the alphabet...
- else
- {
- mcharPos = findUniqueMnemonic(candidateChars);
- if (mcharPos != -1)
- {
- String addedMnemonic = "(" + MNEMONIC_CHAR + candidateChars.charAt(mcharPos) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- insertMnemonic(newLabel, addedMnemonic);
- }
- }
- return newLabel.toString();
- } // end getUniqueMnemonic
- /**
- * Given a label and mnemonic, this applies that mnemonic to the label.
- * Not normally called from other classes, but rather by the setUniqueMnemonic
- * methods in this class.
- * @param label String to which to apply the mnemonic
- * @param mnemonicChar the character that is to be the mnemonic character
- * @return input String with '&' inserted in front of the given character
- */
- public static String applyMnemonic(String label, char mnemonicChar)
- {
- int labelLen = label.length();
- if (labelLen == 0)
- return label;
- StringBuffer newLabel = new StringBuffer(label);
- int mcharPos = findCharPos(label, mnemonicChar);
- if (mcharPos != -1)
- newLabel.insert(mcharPos,MNEMONIC_CHAR);
- else
- {
- String addedMnemonic = new String("("+MNEMONIC_CHAR + mnemonicChar + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- insertMnemonic(newLabel, addedMnemonic);
- }
- return newLabel.toString();
- } // end getUniqueMnemonic
- /**
- * Given a char, find its position in the given string
- */
- private static int findCharPos(String label, char charToFind)
- {
- int pos = -1;
- for (int idx=0; (pos==-1) && (idx<label.length()); idx++)
- if (label.charAt(idx) == charToFind)
- pos = idx;
- return pos;
- }
-
- /**
- * Determine if given char is a unique mnemonic
- */
- public boolean isUniqueMnemonic(char currchar)
- {
- boolean isUnique = true;
- for (int idx=0; isUnique && (idx < mnemonics.length()); idx++)
- if (mnemonics.charAt(idx) == currchar)
- isUnique = false;
- return isUnique;
- }
- /**
- * Find a uniqe mnemonic char in given string.
- * Note if one is found, it is added to the list of currently used mnemonics!
- *
- * @return index position of unique character in input string, or -1 if none found.
- */
- public int findUniqueMnemonic(String label)
- {
- int labelLen = label.length();
- if (labelLen == 0)
- return -1;
- int retcharPos = -1;
- label = label.toUpperCase();
- char currchar = label.charAt(0);
- boolean isUnique = false;
-
- // if we're on a preference page, get the preference page mnemonics
- if (onPrefPage) {
-
- if (preferencePageMnemonics == null) {
- preferencePageMnemonics = getPreferencePageMnemonics();
- }
- }
-
- // if we're on a wizard page, get the wizard page mnemonics
- if (onWizardPage) {
-
- if (wizardPageMnemonics == null) {
- wizardPageMnemonics = getWizardPageMnemonics();
- }
- }
-
- // attempt to find the first character in the given
- // string that has not already been used as a mnemonic
- for (int idx=0; (idx<labelLen) && (retcharPos==-1); idx++)
- {
- currchar = label.charAt(idx);
-
- if ( !(onPrefPage && preferencePageMnemonics.indexOf( currchar ) != -1)
- && !(onWizardPage && wizardPageMnemonics.indexOf( currchar ) != -1)
- && candidateChars.indexOf( currchar ) != -1 )
- {
- isUnique = isUniqueMnemonic(currchar);
- if (isUnique)
- {
- mnemonics.append(currchar);
- retcharPos = idx;
- }
- }
- }
- return retcharPos;
- }
-
- /**
- * Returns a string containing the mnemonics for a preference page.
- * @return the mnemonics.
- */
- private String getPreferencePageMnemonics() {
- String[] labels = JFaceResources.getStrings(new String[] { "defaults", "apply" }); //$NON-NLS-1$ //$NON-NLS-2$
- return getMnemonicsFromStrings(labels).toUpperCase();
- }
-
- /**
- * Returns a string containing the mnemonics for a wizard page.
- * @return the mnemonics.
- */
- private String getWizardPageMnemonics() {
- String[] labels = new String[] {IDialogConstants.BACK_LABEL, IDialogConstants.NEXT_LABEL, IDialogConstants.FINISH_LABEL};
- return getMnemonicsFromStrings(labels).toUpperCase();
- }
-
- /**
- * Returns a string with the mnemonics for a given array of strings.
- * @param strings the array of strings.
- * @return a string containing the mnemonics.
- */
- private String getMnemonicsFromStrings(String[] strings) {
-
- StringBuffer result = new StringBuffer();
-
- for (int i = 0; i < strings.length; i++) {
- int idx = strings[i].indexOf(MNEMONIC_CHAR);
-
- if (idx != -1) {
- result.append(strings[i].charAt(idx+1));
- }
- }
-
- return result.toString();
- }
-
- /**
- * Adds a mnemonic to an SWT Button such that the user can select it via Ctrl/Alt+mnemonic.
- * Note a mnemonic unique to this window is chosen
- */
- public void setMnemonic(Button button)
- {
- removeMnemonic(button); // just in case it already has a mnemonic
- String text = button.getText();
- if ((text != null) && (text.trim().length() > 0))
- button.setText(setUniqueMnemonic(text));
- }
- /**
- * If a button is removed from a dialog window, call this method to remove its mnemonic from the list for this dialog.
- * This frees it up for another button to use.
- */
- public void removeMnemonic(Button button)
- {
- String text = button.getText();
- if (text == null)
- return;
- int idx = text.indexOf(MNEMONIC_CHAR);
- if (idx >= 0)
- {
- StringBuffer buffer = new StringBuffer(text);
- char mchar = buffer.charAt(idx+1); // the char after the &
- buffer.deleteCharAt(idx); // delete the &
- boolean found = false;
- for (int mdx=0; !found && (mdx < mnemonics.length()); mdx++)
- if (mnemonics.charAt(mdx) == mchar)
- {
- found = true;
- mnemonics.deleteCharAt(mdx);
- }
-
- button.setText(buffer.toString());
- }
- }
- /**
- * Helper method to strip the mnemonic from a string.
- * Useful if using Eclipse supplied labels
- */
- public static String removeMnemonic(String text)
- {
- int idx = text.indexOf(MNEMONIC_CHAR);
- if (idx >= 0)
- {
- StringBuffer buffer = new StringBuffer(text);
- buffer.deleteCharAt(idx); // delete the &
-
- // in case of already appended (&X), remove the remaining (X)
- if ( buffer.length() > (1 + idx) && idx > 1 && buffer.charAt(idx+1) == ')' && buffer.charAt(idx-1) == '(' )
- buffer.delete(idx - 1, idx + 2);
- return buffer.toString();
- }
- else
- return text;
- }
- /**
- * Remove and free up mnemonic
- */
- public String removeAndFreeMnemonic(String text)
- {
- int idx = text.indexOf(MNEMONIC_CHAR);
- if (idx >= 0)
- {
- StringBuffer buffer = new StringBuffer(text);
- char mchar = buffer.charAt(idx+1); // the char after the &
- buffer.deleteCharAt(idx); // delete the &
- boolean found = false;
- for (int mdx=0; !found && (mdx < mnemonics.length()); mdx++)
- if (mnemonics.charAt(mdx) == mchar)
- {
- found = true;
- mnemonics.deleteCharAt(mdx);
- }
- return buffer.toString();
- }
- else
- return text;
- }
-
- /**
- * Helper method to return the mnemonic from a string.
- * Helpful when it is necessary to know the mnemonic assigned so it can be reassigned,
- * such as is necessary for buttons which toggle their text.
- * @return the mnemonic if assigned, else a blank character.
- */
- public static char getMnemonic(String text)
- {
- int idx = text.indexOf(MNEMONIC_CHAR);
- if (idx >= 0)
- return text.charAt(idx+1);
- else
- return ' ';
- }
-
- /**
- * Given a Composite, this method walks all the children recursively and
- * and sets the mnemonics uniquely for each child control where a
- * mnemonic makes sense (eg, buttons).
- * The letter/digit chosen for the mnemonic is unique for this Composite,
- * so you should call this on as high a level of a composite as possible
- * per Window.
- * Call this after populating your controls.
- */
- public void setMnemonics(Composite parent)
- {
- Control children[] = parent.getChildren();
- if (children != null)
- {
- Control currChild = null;
- boolean bSetText = false;
- for (int idx=0; idx < children.length; idx++)
- {
- currChild = children[idx];
- // composite? Recurse
- // d54732: but do not recurse if it is a combo! For a combo, we want to check
- // if there is a preceding label. It's meaningless for a combo to
- // have children anyway (KM)
- if ((currChild instanceof Composite) &&
- (!applyMnemonicsToPrecedingLabels || (applyMnemonicsToPrecedingLabels &&
- !(currChild instanceof Combo) && !(currChild instanceof InheritableEntryField))))
- setMnemonics((Composite)currChild);
- // button? select and apply unique mnemonic...
- else if (currChild instanceof Button)
- {
- Button currButton = (Button)currChild;
- String text = currButton.getText();
- if ((text!=null) && (text.trim().length()>0))
- {
- currButton.setText(setUniqueMnemonic(text));
- bSetText = true;
- }
- }
- // entry field or combo box? select and apply unique mnemonic to preceding label...
- else if (applyMnemonicsToPrecedingLabels && (idx>0) && ((currChild instanceof Text) || (currChild instanceof Combo) || (currChild instanceof InheritableEntryField)) &&
- (children[idx-1] instanceof Label))
- {
- Label currLabel = (Label)children[idx-1];
- String text = currLabel.getText();
- if ((text!=null) && (text.trim().length()>0))
- {
- currLabel.setText(setUniqueMnemonic(text));
- bSetText = true;
- }
- }
- }
- if ( bSetText == true )
- parent.layout(true); // in case a (x) was appended, we need to layout the controls again
- }
- }
-
- /**
- * Given a menu, this method walks all the items and assigns each a unique
- * memnonic. Also handles casdading submenus.
- * Call this after populating the menu.
- */
- public void setMnemonics(Menu menu)
- {
- MenuItem[] children = menu.getItems();
- if ((children != null) && (children.length>0))
- {
- MenuItem currChild = null;
- for (int idx=0; idx < children.length; idx++)
- {
- currChild = children[idx];
- String text = currChild.getText();
- if ((text!=null)&&(text.length()>0))
- {
- if (text.indexOf(MNEMONIC_CHAR) < 0) // bad things happen when setting mnemonics twice!
- {
- Image image = currChild.getImage();
- currChild.setText(setUniqueMnemonic(text));
- if (image != null)
- currChild.setImage(image);
- }
- }
- }
- }
- }
-
- /**
- * Given a menu, this method walks all the items and assigns each a unique
- * memnonic. Also handles casdading submenus.
- * <p>
- * Also, since while we are at it, this overloaded method also sets a given ArmListener
- * to each menu item, perhaps for the purpose of displaying tooltip text.
- * It makes sense to do this when doing mnemonics because both must be done for every menu item
- * with text and must be done exactly once for each.
- * <p>
- * Call this after populating the menu.
- */
- public void setMnemonicsAndArmListener(Menu menu, ArmListener listener)
- {
- MenuItem[] children = menu.getItems();
- if ((children != null) && (children.length>0))
- {
- MenuItem currChild = null;
- for (int idx=0; idx < children.length; idx++)
- {
- currChild = children[idx];
- String text = currChild.getText();
- if ((text!=null)&&(text.length()>0))
- {
- int mnemonicIndex = text.indexOf(MNEMONIC_CHAR);
- if (mnemonicIndex < 0) // bad things happen when setting mnemonics twice!
- {
- Image image = currChild.getImage();
- currChild.setText(setUniqueMnemonic(text));
- if (image != null)
- currChild.setImage(image);
- currChild.addArmListener(listener);
- }
- else
- // hmm, already has a mnemonic char. Either it is an Eclipse/BP-supplied action, or we have been here before.
- // The distinction is important as want to add an Arm listener, but only once!
- {
- // for now we do the brute force ugly thing...
- Image image = currChild.getImage();
-
- // need to adjust any action that already has this mnemonic
- char c = text.charAt(mnemonicIndex + 1);
-
- // anything already have this?
- if (!isUniqueMnemonic(c))
- {
- // if so, we need to adjust existing action
- for (int n = 0; n < idx; n++)
- {
- MenuItem oChild = children[n];
- String oText = oChild.getText();
- char oldN = getMnemonic(oText);
- if (oldN == c)
- {
- // this one now needs to change
- String cleanText = removeMnemonic(oText);
- oChild.setText(setUniqueMnemonic(cleanText));
- }
- }
- }
-
- text = removeAndFreeMnemonic(text);
- currChild.setText(setUniqueMnemonic(text));
- if (image != null)
- currChild.setImage(image);
- currChild.removeArmListener(listener); // just in case
- currChild.addArmListener(listener);
- }
- }
- }
- }
- }
-
- /**
- * Set if the mnemonics are for a preference page
- * Preference pages already have a few buttons with mnemonics set by Eclipse
- * We have to make sure we do not use the ones they use
- */
- public Mnemonics setOnPreferencePage(boolean page)
- {
- this.onPrefPage = page;
- return this;
- }
-
- /**
- * Set if the mnemonics are for a wizard page
- * Wizard pages already have a few buttons with mnemonics set by Eclipse
- * We have to make sure we do not use the ones they use
- */
- public Mnemonics setOnWizardPage(boolean page)
- {
- this.onWizardPage = page;
- return this;
- }
-
- /**
- * Set whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields.
- * This is for consistency with Eclipse. Only set to <code>false</code> if it does not work
- * in your dialog, wizard, preference or property page, i.e. you have labels preceding these
- * widgets that do not necessarily refer to them.
- * @param apply <code>true</code> to apply mnemonic to preceding labels, <code>false</code> otherwise.
- * @return this instance, for convenience
- */
- public Mnemonics setApplyMnemonicsToPrecedingLabels(boolean apply) {
- this.applyMnemonicsToPrecedingLabels = apply;
- return this;
- }
-
-} \ 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
deleted file mode 100644
index 23264c8a8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.ui;
-
-import org.eclipse.ui.model.WorkbenchAdapter;
-
-/**
- * Abstract base class with basic implementations of the <code>IRSEAdapter</code> interface.
- * Intended to be subclassed.
- */
-public abstract class RSEAdapter extends WorkbenchAdapter implements IRSEAdapter {
-
- /**
- * Constructor.
- */
- public RSEAdapter() {
- super();
- }
-
- /**
- * The default implementation of this <code>IRSEAdapter<code> method returns the empty string.
- * Subclasses may override.
- * @see org.eclipse.rse.ui.IRSEAdapter#getDescription(java.lang.Object)
- */
- public String getDescription(Object object) {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * 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
deleted file mode 100644
index d6f126bba..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.ui;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.IRSEPreferenceNames;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSESystemTypeConstants;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.osgi.framework.Bundle;
-
-/**
- * Adapter for RSE system types.
- */
-public class RSESystemTypeAdapter extends RSEAdapter implements IRSESystemTypeConstants {
-
- public RSESystemTypeAdapter() {
- super();
- }
-
- /**
- * Returns the image descriptor for the icon of this system type.
- * Returns the default live connection image descriptor if no icon has been configured.
- * @see org.eclipse.ui.model.WorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- ImageDescriptor img = getImage(object, ICON);
- if (img==null) img = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID);
- return img;
- }
-
- /**
- * Returns the "live" image descriptor for this system type.
- *
- * If no "live" icon is found, but a non-live icon was specified,
- * the non-live icon is returned instead. If a non-live icon also
- * was not specified, the default live connection image descriptor
- * is returned.
- *
- * @param object The object to get an image descriptor for.
- * @return ImageDescriptor
- */
- public ImageDescriptor getLiveImageDescriptor(Object object) {
- ImageDescriptor img = getImage(object, ICON_LIVE);
- if (img==null) img = getImage(object, ICON);
- if (img==null) img = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTIONLIVE_ID);
- return img;
- }
-
- 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 ImageDescriptor
- */
- public static ImageDescriptor getImage(String value, Bundle definingBundle) {
- URL url = getUrl(value, definingBundle);
- return url == null ? null : ImageDescriptor.createFromURL(url);
- }
-
- /**
- * Create a URL from the argument absolute or relative path. The bundle parameter is
- * used as the base for relative paths and may be null.
- *
- * @param value
- * the absolute or relative path
- * @param definingBundle
- * bundle to be used for relative paths (may be null)
- * @return the URL to the resource
- */
- public static URL getUrl(String value, Bundle definingBundle) {
- URL result = null;
- try {
- if (value != null) {
- result = new URL(value);
- }
- } catch (MalformedURLException e) {
- if (definingBundle != null) {
- IPath path = new Path(value);
- result = FileLocator.find(definingBundle, path, null);
- }
- }
- return result;
- }
-
- /**
- * Returns the name of the system type if the object passed in is of type <code>IRSESystemType</code>. 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 <code>IRSESystemType</code>.
- * 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;
- }
- }
-
- /**
- * Returns the enabled state of a particular system type.
- * @param object the object being adapted, usually a system type.
- * @return true if that system type is enabled. false if the object is
- * not a system type or if it is not enabled.
- */
- public boolean isEnabled(Object object) {
- boolean result = false;
- IRSESystemType systemType = getSystemType(object);
- if ( systemType != null) {
- Preferences prefs = RSECorePlugin.getDefault().getPluginPreferences();
- String key = getPreferencesKey(systemType, IRSEPreferenceNames.ST_ENABLED);
- if (!prefs.contains(key)) {
- prefs.setDefault(key, true);
- }
- result = prefs.getBoolean(key);
- }
- return result;
- }
-
- /**
- * Sets the enabled state of a particular system type.
- * @param object The system type being adapted.
- * @param isEnabled true if the system type is enabled. false if it is not.
- */
- public void setIsEnabled(Object object, boolean isEnabled) {
- IRSESystemType systemType = getSystemType(object);
- if ( systemType != null) {
- Plugin core = RSECorePlugin.getDefault();
- Preferences prefs = core.getPluginPreferences();
- String key = getPreferencesKey(systemType, IRSEPreferenceNames.ST_ENABLED);
- prefs.setValue(key, isEnabled);
- core.savePluginPreferences();
- }
- }
-
- /**
- * Return the default user id for a particular system type. If none
- * is defined then the "user.name" system property is used.
- * @param object The system type being adapted.
- * @return The default user id. Will be null if the object is not a system type
- */
- public String getDefaultUserId(Object object) {
- String result = null;
- IRSESystemType systemType = getSystemType(object);
- if ( systemType != null) {
- Preferences prefs = RSECorePlugin.getDefault().getPluginPreferences();
- String key = getPreferencesKey(systemType, IRSEPreferenceNames.ST_DEFAULT_USERID);
- if (!prefs.contains(key)) {
- prefs.setDefault(key, System.getProperty("user.name")); //$NON-NLS-1$
- }
- result = prefs.getString(key);
- }
- return result;
- }
-
- /**
- * Set the default user id for this system type. Stored in the RSE core preferences.
- * @param object the system type that we are adapting
- * @param defaultUserId the id to set for this system type
- */
- public void setDefaultUserId(Object object, String defaultUserId) {
- IRSESystemType systemType = getSystemType(object);
- if ( systemType != null) {
- Plugin core = RSECorePlugin.getDefault();
- Preferences prefs = core.getPluginPreferences();
- String key = getPreferencesKey(systemType, IRSEPreferenceNames.ST_DEFAULT_USERID);
- prefs.setValue(key, defaultUserId);
- core.savePluginPreferences();
- }
- }
-
- private String getPreferencesKey(IRSESystemType systemType, String preference) {
- String key = systemType.getName() + "." + preference; //$NON-NLS-1$
- return key;
- }
-
- private IRSESystemType getSystemType(Object systemTypeCandidate) {
- IRSESystemType result = null;
- if (systemTypeCandidate instanceof IRSESystemType) {
- result = (IRSESystemType) systemTypeCandidate;
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java
deleted file mode 100644
index e009d91fc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java
+++ /dev/null
@@ -1,1227 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-import java.net.InetAddress;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.ISystemViewSupplier;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemPropertyPageExtension;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.core.comm.ISystemKeystoreProvider;
-import org.eclipse.rse.core.comm.SystemCommunicationsDaemon;
-import org.eclipse.rse.core.comm.SystemKeystoreProviderManager;
-import org.eclipse.rse.core.internal.subsystems.SubSystemConfigurationProxy;
-import org.eclipse.rse.core.internal.subsystems.SubSystemConfigurationProxyComparator;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.model.SystemStartHere;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.ISystemMessageProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-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.view.SubSystemConfigurationAdapterFactory;
-import org.eclipse.rse.ui.view.SystemViewAdapterFactory;
-import org.eclipse.rse.ui.view.team.SystemTeamViewResourceAdapterFactory;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * Plugin for the core remote systems support.
- */
-public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvider
-{
- public static final String PLUGIN_ID = "org.eclipse.rse.ui"; //$NON-NLS-1$
- public static final String HELPPREFIX = "org.eclipse.rse.ui."; //$NON-NLS-1$
-
- public static final boolean INCLUDE_LOCAL_YES = true;
- public static final boolean INCLUDE_LOCAL_NO = false;
- private static RSEUIPlugin inst = null;
-
- private static SystemMessageFile messageFile = null;
- private static SystemMessageFile defaultMessageFile = null;
-
-// private SystemType[] allSystemTypes = null;
- private String enabledSystemTypes;
- private SystemRegistry _systemRegistry = null;
-
-
-
- private ISubSystemConfigurationProxy[] subsystemConfigurations = null;
-
-
- private Vector viewSuppliers = new Vector();
- private SystemViewAdapterFactory svaf; // for fastpath access
- private SystemTeamViewResourceAdapterFactory svraf; // for fastpath
- private SystemShowPreferencesPageAction[] showPrefPageActions = null;
- private boolean dontShowLocalConnection, dontShowProfilePageInitially;
- private boolean loggingSystemMessageLine = false;
-
- /**
- * Constructor for SystemsPlugin
- */
- public RSEUIPlugin()
- {
- super();
-
- if (inst == null)
- {
- inst = this;
- }
- }
-
- /**
- * Return singleton. Same as inherited getBaseDefault but returned object
- * is typed as RSEUIPlugin versus SystemBasePlugin.
- */
- public static RSEUIPlugin getDefault()
- {
- return inst;
- }
-
- /**
- * Initializes default preferences.
- */
- public void initializeDefaultPreferences() {
-
- boolean showNewConnPromptPref = ISystemPreferencesConstants.DEFAULT_SHOWNEWCONNECTIONPROMPT;
- dontShowLocalConnection = false;
- dontShowProfilePageInitially = false;
-
- String showNewConn = System.getProperty("rse.showNewConnectionPrompt"); //$NON-NLS-1$
-
- if (showNewConn != null) {
- showNewConnPromptPref = showNewConn.equals("true"); //$NON-NLS-1$
- }
-
- String showLocalConn = System.getProperty("rse.showLocalConnection"); //$NON-NLS-1$
-
- if (showLocalConn != null) {
- dontShowLocalConnection = showLocalConn.equals("false"); //$NON-NLS-1$
- }
-
- enabledSystemTypes = System.getProperty("rse.enableSystemTypes"); //$NON-NLS-1$
-
- if ((enabledSystemTypes != null) && (enabledSystemTypes.length() == 0)) {
- enabledSystemTypes = null;
- }
-
- String showProfileInitially = System.getProperty("rse.showProfilePage"); //$NON-NLS-1$
-
- if (showProfileInitially != null) {
- dontShowProfilePageInitially = showProfileInitially.equals("false"); //$NON-NLS-1$
- }
-
- RemoteSystemsPreferencePage.initDefaults(getPreferenceStore(), showNewConnPromptPref);
- SystemCommunicationsPreferencePage.initDefaults(getPreferenceStore());
- }
-
- /**
- * Returns whether to show profile page initially, i.e. during the first new connection creation.
- * @return <code>true</code> to show profile page initially, <code>false</code> otherwise.
- */
- public boolean getShowProfilePageInitially() {
- return !dontShowProfilePageInitially;
- }
-
- /**
- * Set whether or not to log the messages shown on the system message line for dialogs
- * and wizards. These message are typically validation messages for fields.
- * These are logged using the RSE logging settings. The default is to not log
- * these messages.
- * @param flag true if logging of these messages is desired, false otherwise.
- */
- public void setLoggingSystemMessageLine(boolean flag) {
- loggingSystemMessageLine = flag;
- }
-
- /**
- * @return true if we are logging messages displayed on the system message line.
- */
- public boolean getLoggingSystemMessageLine() {
- return loggingSystemMessageLine;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.SystemBasePlugin#initializeImageRegistry()
- */
- protected void initializeImageRegistry()
- {
- //SystemElapsedTimer timer = new SystemElapsedTimer();
- //timer.setStartTime();
- String path = getIconPath();
- // Wizards...
- /*
- putImageInRegistry(ISystemConstants.ICON_SYSTEM_NEWWIZARD_ID,
- path+ISystemConstants.ICON_SYSTEM_NEWWIZARD);
- */
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWPROFILEWIZARD_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWPROFILEWIZARD);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTIONWIZARD_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWCONNECTIONWIZARD);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLWIZARD_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLWIZARD);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD);
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_NEWFILTERSTRINGWIZARD_ID,
- // path+ISystemConstants.ICON_SYSTEM_NEWFILTERSTRINGWIZARD);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILEWIZARD_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWFILEWIZARD);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFOLDERWIZARD_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWFOLDERWIZARD);
-
- // Things...
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_PROFILE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID,
- path+ISystemIconConstants.ICON_SYSTEM_CONNECTION);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CONNECTIONLIVE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_CONNECTIONLIVE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID,
- path+ISystemIconConstants.ICON_SYSTEM_FILTERPOOL);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_FILTER_ID,
- path+ISystemIconConstants.ICON_SYSTEM_FILTER);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_FILTERSTRING_ID,
- path+ISystemIconConstants.ICON_SYSTEM_FILTERSTRING);
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_FILE_ID,
- // path+ISystemConstants.ICON_SYSTEM_FILE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID,
- path+ISystemIconConstants.ICON_SYSTEM_FOLDER);
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_FOLDEROPEN_ID,
- // path+ISystemConstants.ICON_SYSTEM_FOLDEROPEN);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ROOTDRIVE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_ROOTDRIVE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ROOTDRIVEOPEN_ID,
- path+ISystemIconConstants.ICON_SYSTEM_ROOTDRIVEOPEN);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ENVVAR_ID,
- path+ISystemIconConstants.ICON_SYSTEM_ENVVAR);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ENVVAR_LIBPATH_ID,
- path+ISystemIconConstants.ICON_SYSTEM_ENVVAR_LIBPATH);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ENVVAR_PATH_ID,
- path+ISystemIconConstants.ICON_SYSTEM_ENVVAR_PATH);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PROCESS_ID,
- path+ISystemIconConstants.ICON_SYSTEM_PROCESS);
-
-// putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_TARGET_ID,
- // path+ISystemIconConstants.ICON_SYSTEM_TARGET);
-
- // Message icons: REDUNDANT
- /*
- putImageInRegistry(ISystemConstants.ICON_SYSTEM_SMALLERROR_ID,
- path+ISystemConstants.ICON_SYSTEM_SMALLERROR);
- putImageInRegistry(ISystemConstants.ICON_SYSTEM_SMALLWARNING_ID,
- path+ISystemConstants.ICON_SYSTEM_SMALLWARNING);
- putImageInRegistry(ISystemConstants.ICON_SYSTEM_SMALLINFO_ID,
- path+ISystemConstants.ICON_SYSTEM_SMALLINFO);
- */
-
- // New Actions...
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEW_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEW);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWPROFILE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWPROFILE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTION_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWCONNECTION);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOL_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOL);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLREF_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLREF);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILTER_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWFILTER);
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_NEWFILTERSTRING_ID,
- // path+ISystemConstants.ICON_SYSTEM_NEWFILTERSTRING);
-
- // Other Actions...
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_PULLDOWN_ID,
- // path+ISystemConstants.ICON_SYSTEM_PULLDOWN);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_LOCK_ID,
- path+ISystemIconConstants.ICON_SYSTEM_LOCK);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID,
- path+ISystemIconConstants.ICON_SYSTEM_MOVEUP);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID,
- path+ISystemIconConstants.ICON_SYSTEM_MOVEDOWN);
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_COPY_ID,
- // path+ISystemConstants.ICON_SYSTEM_COPY);
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_PASTE_ID,
- // path+ISystemConstants.ICON_SYSTEM_PASTE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_MOVE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_MOVE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CLEAR_ID,
- path+ISystemIconConstants.ICON_SYSTEM_CLEAR);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL_ID,
- path+ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED_ID,
- path+ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED);
-
-
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_DELETE_ID,
- // path+ISystemConstants.ICON_SYSTEM_DELETE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_DELETEREF_ID,
- path+ISystemIconConstants.ICON_SYSTEM_DELETEREF);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_RENAME_ID,
- path+ISystemIconConstants.ICON_SYSTEM_RENAME);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_RUN_ID,
- path+ISystemIconConstants.ICON_SYSTEM_RUN);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_STOP_ID,
- path+ISystemIconConstants.ICON_SYSTEM_STOP);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_COMPILE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEINACTIVE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEINACTIVE);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CHANGEFILTER_ID,
- path+ISystemIconConstants.ICON_SYSTEM_CHANGEFILTER);
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_CHANGEFILTERSTRING_ID,
- // path+ISystemConstants.ICON_SYSTEM_CHANGEFILTERSTRING);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SELECTPROFILE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_SELECTPROFILE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SELECTFILTERPOOLS_ID,
- path+ISystemIconConstants.ICON_SYSTEM_SELECTFILTERPOOLS);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHFILTERPOOLS_ID,
- path+ISystemIconConstants.ICON_SYSTEM_WORKWITHFILTERPOOLS);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHUSERACTIONS_ID,
- path+ISystemIconConstants.ICON_SYSTEM_WORKWITHUSERACTIONS);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHNAMEDTYPES_ID,
- path+ISystemIconConstants.ICON_SYSTEM_WORKWITHNAMEDTYPES);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHCOMPILECMDS_ID,
- path+ISystemIconConstants.ICON_SYSTEM_WORKWITHCOMPILECMDS);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_REFRESH_ID,
- path+ISystemIconConstants.ICON_SYSTEM_REFRESH);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWFILE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFOLDER_ID,
- path+ISystemIconConstants.ICON_SYSTEM_NEWFOLDER);
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_COLLAPSEALL_ID,
- // path+ISystemConstants.ICON_SYSTEM_COLLAPSEALL); // defect 41203 D54577
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_EXTRACT_ID,
- path+ISystemIconConstants.ICON_SYSTEM_EXTRACT);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_EXTRACTTO_ID,
- path+ISystemIconConstants.ICON_SYSTEM_EXTRACTTO);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_COMBINE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_COMBINE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CONVERT_ID,
- path+ISystemIconConstants.ICON_SYSTEM_CONVERT);
-
-
-
-
-
-
- // System view icons...
- //putImageInRegistry(ISystemConstants.ICON_SYSTEM_VIEW_ID, // only needed from plugin.xml
- // path+ISystemConstants.ICON_SYSTEM_VIEW);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ERROR_ID,
- path+ISystemIconConstants.ICON_SYSTEM_ERROR);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_INFO_ID,
- path+ISystemIconConstants.ICON_SYSTEM_INFO);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_INFO_TREE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_INFO_TREE);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CANCEL_ID,
- path+ISystemIconConstants.ICON_SYSTEM_CANCEL);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_HELP_ID,
- path+ISystemIconConstants.ICON_SYSTEM_HELP);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_EMPTY_ID,
- path+ISystemIconConstants.ICON_SYSTEM_EMPTY);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_OK_ID,
- path+ISystemIconConstants.ICON_SYSTEM_OK);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WARNING_ID,
- path+ISystemIconConstants.ICON_SYSTEM_WARNING);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SHELL_ID,
- path+ISystemIconConstants.ICON_SYSTEM_SHELL);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SHELLLIVE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_SHELLLIVE);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_REMOVE_SHELL_ID,
- path+ISystemIconConstants.ICON_SYSTEM_REMOVE_SHELL);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_EXPORT_SHELL_OUTPUT_ID,
- path+ISystemIconConstants.ICON_SYSTEM_EXPORT_SHELL_OUTPUT);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_EXPORT_SHELL_HISTORY_ID,
- path+ISystemIconConstants.ICON_SYSTEM_EXPORT_SHELL_HISTORY);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_BLANK_ID,
- path+ISystemIconConstants.ICON_SYSTEM_BLANK);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SEARCH_ID,
- path+ISystemIconConstants.ICON_SYSTEM_SEARCH);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID,
- path+ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SHOW_TABLE_ID,
- path + ISystemIconConstants.ICON_SYSTEM_SHOW_TABLE);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SHOW_MONITOR_ID,
- path + ISystemIconConstants.ICON_SYSTEM_SHOW_MONITOR);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PERSPECTIVE_ID,
- path + ISystemIconConstants.ICON_SYSTEM_PERSPECTIVE);
-
- putImageInRegistry(ISystemIconConstants.ICON_SEARCH_REMOVE_SELECTED_MATCHES_ID,
- path + ISystemIconConstants.ICON_SEARCH_REMOVE_SELECTED_MATCHES);
-
- putImageInRegistry(ISystemIconConstants.ICON_SEARCH_REMOVE_ALL_MATCHES_ID,
- path + ISystemIconConstants.ICON_SEARCH_REMOVE_ALL_MATCHES);
-
- /**
- putImageInRegistry(ISystemConstants.ICON_INHERITWIDGET_LOCAL_ID,
- path+ISystemConstants.ICON_INHERITWIDGET_LOCAL);
- putImageInRegistry(ISystemConstants.ICON_INHERITWIDGET_INHERIT_ID,
- path+ISystemConstants.ICON_INHERITWIDGET_INHERIT);
- putImageInRegistry(ISystemConstants.ICON_INHERITWIDGET_INTERIM_ID,
- path+ISystemConstants.ICON_INHERITWIDGET_INTERIM);
- */
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ARROW_UP_ID,
- path+ISystemIconConstants.ICON_SYSTEM_ARROW_UP);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ARROW_DOWN_ID,
- path+ISystemIconConstants.ICON_SYSTEM_ARROW_DOWN);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CONNECTOR_SERVICE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_CONNECTOR_SERVICE);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SERVICE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_SERVICE);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_LAUNCHER_CONFIGURATION_ID,
- path+ISystemIconConstants.ICON_SYSTEM_LAUNCHER_CONFIGURATION);
-
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PROPERTIES_ID,
- path+ISystemIconConstants.ICON_SYSTEM_PROPERTIES);
-
- // close to 1 second...
- //timer.setEndTime();
- //System.out.println("Time to load images: "+timer);
- }
-
- /**
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception
- {
-
- // call super first
- super.start(context);
-
- messageFile = getMessageFile("systemmessages.xml"); //$NON-NLS-1$
- defaultMessageFile = getDefaultMessageFile("systemmessages.xml"); //$NON-NLS-1$
-
- ISystemRegistry registry = getSystemRegistry();
-
- RSECorePlugin.getDefault().setSystemRegistry(registry);
- SystemResourceManager.getRemoteSystemsProject(); // create core folder tree
- try
- {
- SystemStartHere.getSystemProfileManager(); // create folders per profile
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- IAdapterManager manager = Platform.getAdapterManager();
-
- // DKM
- // for subsystem factories
- SubSystemConfigurationAdapterFactory ssfaf = new SubSystemConfigurationAdapterFactory();
- ssfaf.registerWithManager(manager);
-
- RSESystemTypeAdapterFactory rseSysTypeFactory = new RSESystemTypeAdapterFactory();
- manager.registerAdapters(rseSysTypeFactory, IRSESystemType.class);
-
- svaf = new SystemViewAdapterFactory();
- svaf.registerWithManager(manager);
-
- svraf = new SystemTeamViewResourceAdapterFactory();
- svraf.registerWithManager(manager);
-
-
-// getInstallLocation();
-
- //org.eclipse.rse.core.ui.uda.UserDefinedActionAdapterFactory udaaf = new org.eclipse.rse.core.ui.uda.UserDefinedActionAdapterFactory();
- //udaaf.registerWithManager(manager);
-
- // DKM - 49648 - need to make sure that this is first called on the main thread so
- // we don't hit an SWT invalid thread exception later when getting the shell
-
-
-
-
- // add workspace listener for our project
- SystemResourceManager.startResourceEventListening();
-
- // DKM - moved to files.ui plugin
- // refresh the remote edit project at plugin startup, to ensure
- // it's never closed
- // SystemRemoteEditManager.getDefault().refreshRemoteEditProject();
-
- // Auto-start RSE communications daemon if required
- SystemCommunicationsDaemon daemon = SystemCommunicationsDaemon.getInstance();
-
- if (SystemCommunicationsDaemon.isAutoStart()) {
- daemon.startDaemon(false);
- }
-
- registerArchiveHandlers();
- registerDynamicPopupMenuExtensions();
- registerKeystoreProviders();
-
- // if first time creating the remote systems project, add some default connections...
-// if (SystemResourceManager.isFirstTime()
-// && !dontShowLocalConnection) // new support to allow products to not pre-create a local connection
-// {
- //try
- //{
-
-// registry.createLocalHost(null, SystemResources.TERM_LOCAL, SystemProfileManager.getSystemProfileManager().getDefaultPrivateSystemProfileName()); // profile, name, userId
- /* replaced with re-usable method by Phil, in v5.1.2
- SystemConnection localConn = registry.createConnection(
- //SystemResourceConstants.RESOURCE_TEAMPROFILE_NAME, IRSESystemType.SYSTEMTYPE_LOCAL,
- SystemResourceConstants.RESOURCE_PRIVATEPROFILE_NAME, IRSESystemType.SYSTEMTYPE_LOCAL,
- getString(ISystemConstants.TERM_LOCAL, "Local"), // connection name
- "localhost", // hostname
- "", // description
- // DY: defect 42101, description cannot be null
- // null, // description
- getLocalMachineName(), // userId
- ISystemUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE, null);
- */
- //}
- //catch (Exception exc)
- //{
- //logError("Error creating default Local connection", exc);
- //}
-// }
- // new support to allow products to not pre-create a local connection
- if (SystemResourceManager.isFirstTime() && !dontShowLocalConnection) {
- ISystemProfileManager profileManager = SystemProfileManager.getSystemProfileManager();
- ISystemProfile profile = profileManager.getDefaultPrivateSystemProfile();
- String userName = System.getProperty("user.name"); //$NON-NLS-1$
- registry.createLocalHost(profile, SystemResources.TERM_LOCAL, userName);
- }
- }
-
- /**
- * For pathpath access to our adapters for non-local objects in our model. Exploits the knowledge we use singleton adapters.
- */
- public SystemViewAdapterFactory getSystemViewAdapterFactory()
- {
- return svaf;
- }
-
-
- /**
- * Restart the whole thing after a team synchronization
- */
- public void restart()
- {
- if (_systemRegistry != null)
- {
- // disconnect all active connections
- disconnectAll(false); // don't save ?
- // collapse and flush all nodes in all views
- _systemRegistry.fireEvent(new SystemResourceChangeEvent("dummy", ISystemResourceChangeEvents.EVENT_COLLAPSE_ALL, null)); //$NON-NLS-1$
-
- // allow child classes to override
- closeViews();
-
- // clear in-memory settings for all filter pools and subsystems
- ISubSystemConfigurationProxy[] proxies = getSystemRegistry().getSubSystemConfigurationProxies();
- if (proxies != null)
- for (int idx=0; idx < proxies.length; idx++)
- proxies[idx].reset();
- // clear in-memory settings for all profiles
- SystemProfileManager.clearDefault();
-
- // rebuild profiles
- SystemStartHere.getSystemProfileManager(); // create folders per profile
- // clear in-memory settings for all connections, then restore from disk
- _systemRegistry.reset();
- // restore in-memory settings for all filter pools and subsystems
- if (proxies != null)
- for (int idx=0; idx < proxies.length; idx++)
- proxies[idx].restore();
-
- // refresh GUIs
- _systemRegistry.fireEvent(new SystemResourceChangeEvent(_systemRegistry, ISystemResourceChangeEvents.EVENT_REFRESH, null));
-
- // allow child classes to override
- openViews();
- }
- }
-
- /**
- * Close or reset views prior to full refresh after team synch
- */
- public void closeViews()
- {
- for (int idx=0; idx<viewSuppliers.size(); idx++)
- {
- try {
- ((ISystemViewSupplier)viewSuppliers.elementAt(idx)).closeViews();
- } catch (Exception exc)
- {
- }
- }
- }
-
- /**
- * Restore views prior to full refresh after team synch
- */
- public void openViews()
- {
- for (int idx=0; idx<viewSuppliers.size(); idx++)
- {
- try {
- ((ISystemViewSupplier)viewSuppliers.elementAt(idx)).openViews();
- } catch (Exception exc)
- {
- }
- }
- }
-
- /**
- * Return the project used to hold all the Remote System Framework files
- */
- public IProject getRemoteSystemsProject()
- {
- return SystemResourceManager.getRemoteSystemsProject();
- }
-
- /**
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
-
-
-
- // disconnect all active connections
- disconnectAll(true);
-
- // remove workspace listener for our project
- SystemResourceManager.endResourceEventListening();
-
- // Stop RSE communications daemon if required, the stopDaemon method checks if the daemon is running or not
- SystemCommunicationsDaemon daemon = SystemCommunicationsDaemon.getInstance();
- daemon.stopDaemon();
-
-
-
- // call this last
- super.stop(context);
- }
-
- /**
- * Disconnect all subsystems
- */
- protected void disconnectAll(boolean doSave)
- {
- if (isSystemRegistryActive())
- {
- ISubSystemConfigurationProxy[] proxies = getSystemRegistry().getSubSystemConfigurationProxies();
- if (proxies != null)
- {
- for (int idx=0; idx < proxies.length; idx++)
- {
- //System.out.println("In shutdown. proxy " + proxies[idx].getId() + " active? " + proxies[idx].isSubSystemConfigurationActive());
- if (proxies[idx].isSubSystemConfigurationActive())
- {
- ISubSystemConfiguration ssf = proxies[idx].getSubSystemConfiguration();
- try
- {
- ssf.disconnectAllSubSystems();
- } catch(Exception exc)
- {
- logError("Error disconnecting for "+ssf.getId(),exc); //$NON-NLS-1$
- }
- if (doSave)
- {
- try
- {
- // TODO on shutdown classloader might not be able to do this properly
- // ssf.commit();
- } catch(Exception exc)
- {
- logError("Error saving subsystems for "+ssf.getId(),exc); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
- }
-
-
-
- /**
- * Returns a qualified hostname given a potentially unqualified hostname
- */
- public static String getQualifiedHostName(String hostName)
- {
- try
- {
- InetAddress address = InetAddress.getByName(hostName);
- return address.getCanonicalHostName();
- }
- catch (java.net.UnknownHostException exc)
- {
- return hostName;
- }
- }
-
- /**
- * Return an array of SubSystemConfigurationProxy objects.
- * These represent all extensions to our subsystemConfigurations extension point.
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies()
- {
- if (subsystemConfigurations != null) // added by PSC
- return subsystemConfigurations;
-
- IConfigurationElement[] factoryPlugins = getSubSystemConfigurationPlugins();
- if (factoryPlugins != null)
- {
- Vector v = new Vector();
- for (int idx=0; idx<factoryPlugins.length; idx++)
- {
- SubSystemConfigurationProxy ssf =
- new SubSystemConfigurationProxy(factoryPlugins[idx]);
-
- v.addElement(ssf);
- }
- if (v.size() != 0)
- {
- subsystemConfigurations = new ISubSystemConfigurationProxy[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- subsystemConfigurations[idx] = (ISubSystemConfigurationProxy)v.elementAt(idx);
- }
- }
-
- Arrays.sort(subsystemConfigurations, new SubSystemConfigurationProxyComparator());
-
- return subsystemConfigurations;
- }
-
- /**
- * Return all elements that extend the org.eclipse.rse.ui.subsystemConfigurations extension point
- */
- private IConfigurationElement[] getSubSystemConfigurationPlugins()
- {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- // Get configured extenders
- IConfigurationElement[] subsystemFactoryExtensions =
- registry.getConfigurationElementsFor("org.eclipse.rse.ui","subsystemConfigurations"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return subsystemFactoryExtensions;
- }
-
- /**
- * Returns true if the SystemRegistry has been instantiated already.
- * Use this when you don't want to start the system registry as a side effect of retrieving it.
- */
- public boolean isSystemRegistryActive()
- {
- return (_systemRegistry != null);
- }
-
- /**
- * @return the persistence manager used for persisting RSE profiles
- */
- public IRSEPersistenceManager getPersistenceManager()
- {
- return RSECorePlugin.getThePersistenceManager();
- }
-
-
-
- /**
- * Return the SystemRegistry singleton
- */
- public SystemRegistry getSystemRegistry()
- {
- if (_systemRegistry == null)
- {
- String logfilePath = getStateLocation().toOSString();
-
- _systemRegistry = (SystemRegistry)SystemRegistry.getSystemRegistry(logfilePath);
-
- ISubSystemConfigurationProxy[] proxies = getSubSystemConfigurationProxies();
- if (proxies != null)
- {
- _systemRegistry.setSubSystemConfigurationProxies(proxies);
- }
-
- }
- return _systemRegistry;
- }
-
- /**
- * A static version for convenience
- * Returns the master registry singleton.
- */
- public static SystemRegistry getTheSystemRegistry()
- {
- return getDefault().getSystemRegistry();
- }
-
- public static IRSEPersistenceManager getThePersistenceManager()
- {
- return RSECorePlugin.getThePersistenceManager();
- }
-
-
-
- /**
- * A static version for convenience
- * Returns the master profile manager singleton.
- */
- public static ISystemProfileManager getTheSystemProfileManager()
- {
- return SystemProfileManager.getSystemProfileManager();
- }
-
- /**
- * A static version for convenience
- */
- public static boolean isTheSystemRegistryActive()
- {
- if (inst == null)
- return false;
- else
- return getDefault().isSystemRegistryActive();
- }
-
-
-
- /**
- * Return an array of SystemPropertyPageExtension objects.
- * These represent all extensions to our propertyPage extension point.
- */
- public SystemPropertyPageExtension[] getPropertyPageExtensions()
- {
- SystemPropertyPageExtension[] propertyPageExtensions = null;
- IConfigurationElement[] propertyPagePlugins = getPropertyPagePlugins();
- if (propertyPagePlugins != null)
- {
- Vector v = new Vector();
- for (int idx=0; idx<propertyPagePlugins.length; idx++)
- {
- SystemPropertyPageExtension sppe =
- new SystemPropertyPageExtension(propertyPagePlugins[idx]);
- v.addElement(sppe);
- }
-
- propertyPageExtensions = new SystemPropertyPageExtension[v.size()];
-
- // prescan for first
- boolean foundFirst = false;
-
- for (int idx=0; !foundFirst && (idx<v.size()); idx++)
- if (((SystemPropertyPageExtension)v.elementAt(idx)).isAtTop())
- {
- propertyPageExtensions[0] = (SystemPropertyPageExtension)v.elementAt(idx);
- foundFirst = true;
- }
-
- int ppIdx = foundFirst ? 1: 0;
-
- for (int idx=0; idx<v.size(); idx++)
- if (!((SystemPropertyPageExtension)v.elementAt(idx)).isAtTop())
- propertyPageExtensions[ppIdx++] = (SystemPropertyPageExtension)v.elementAt(idx);
- }
-
- return propertyPageExtensions;
- }
-
- /**
- * Return all elements that extend the org.eclipse.rse.ui.propertyPage extension point
- */
- private IConfigurationElement[] getPropertyPagePlugins()
- {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- // Get configured extenders
- IConfigurationElement[] propertyPageExtensions =
- registry.getConfigurationElementsFor(PLUGIN_ID,"propertyPages"); //$NON-NLS-1$
-
- return propertyPageExtensions;
- }
- /**
- * Return all elements that extend the org.eclipse.rse.ui.remoteSystemsViewPreferencesActions extension point
- */
- private IConfigurationElement[] getPreferencePageActionPlugins()
- {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- // Get configured extenders
- IConfigurationElement[] prefPageExtensions =
- registry.getConfigurationElementsFor(PLUGIN_ID,"remoteSystemsViewPreferencesActions"); //$NON-NLS-1$
-
- return prefPageExtensions;
- }
-
- /**
- * Return an array of action objects registered via our org.eclipse.rse.ui.remoteSystemsViewPreferencesActions
- * extension point. <br>
- * This may return null if there are no extenders.
- */
- public SystemShowPreferencesPageAction[] getShowPreferencePageActions()
- {
- if (showPrefPageActions == null)
- {
- IConfigurationElement[] showPrefPagePlugins = getPreferencePageActionPlugins();
- if (showPrefPagePlugins != null)
- {
- Vector v = new Vector();
- for (int idx=0; idx<showPrefPagePlugins.length; idx++)
- {
- SystemShowPreferencesPageAction action = new SystemShowPreferencesPageAction();
-
- String prefPageId = showPrefPagePlugins[idx].getAttribute("preferencePageId"); //$NON-NLS-1$
- if ((prefPageId!=null)&&(prefPageId.length()>0))
- {
- action.setPreferencePageID(prefPageId);
- }
- String prefPageCategory = showPrefPagePlugins[idx].getAttribute("preferencePageCategory"); //$NON-NLS-1$
- if ((prefPageCategory!=null)&&(prefPageCategory.length()>0))
- {
- action.setPreferencePageCategory(prefPageCategory);
- }
- String iconFile = showPrefPagePlugins[idx].getAttribute("icon"); //$NON-NLS-1$
-
- if ((iconFile!=null)&&(iconFile.length()>0))
- {
- // get namespace of extension (i.e. the id of the declaring plugin)
- String nameSpace = showPrefPagePlugins[idx].getDeclaringExtension().getNamespace();
-
- // now get the associated bundle
- Bundle bundle = Platform.getBundle(nameSpace);
-
- ImageDescriptor id = getPluginImage(bundle, iconFile);
-
- if (id != null) {
- action.setImageDescriptor(id);
- }
- }
- String label = showPrefPagePlugins[idx].getAttribute("label"); //$NON-NLS-1$
- if ((label!=null)&&(label.length()>0))
- {
- action.setText(label);
- }
- String tooltip = showPrefPagePlugins[idx].getAttribute("tooltip"); //$NON-NLS-1$
- if ((tooltip!=null)&&(tooltip.length()>0))
- {
- action.setToolTipText(tooltip);
- }
- String heldId = showPrefPagePlugins[idx].getAttribute("helpContextId"); //$NON-NLS-1$
- if ((heldId!=null)&&(heldId.length()>0))
- {
- action.setHelp(heldId);
- }
- v.addElement(action);
- } // end for all plugins loop
- showPrefPageActions = new SystemShowPreferencesPageAction[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- showPrefPageActions[idx] = (SystemShowPreferencesPageAction)v.elementAt(idx);
- }
- }
- return showPrefPageActions;
- }
-
- /**
- * @return The URL to the message file DTD. Null if it is not found.
- */
- public URL getMessageFileDTD() {
- URL result = getBundle().getEntry("/messageFile.dtd"); //$NON-NLS-1$
- return result;
- }
-
- /**
- * Load a message file for this plugin.
- * @param messageFileName - the name of the message xml file. Will look for it in this plugin's install folder.
- * @return a message file object containing the parsed contents of the message file, or null if not found.
- */
- public SystemMessageFile getMessageFile(String messageFileName)
- {
- return loadMessageFile(getBundle(), messageFileName);
- }
-
- /**
- * Load a default message file for this plugin for cases where messages haven't been translated.
- * @param messageFileName - the name of the message xml file. Will look for it in this plugin's install folder.
- * @return a message file object containing the parsed contents of the message file, or null if not found.
- */
- public SystemMessageFile getDefaultMessageFile(String messageFileName)
- {
- return loadDefaultMessageFile(getBundle(), messageFileName);
- }
-
- /**
- * Return this plugin's message file. Assumes it has already been loaded via a call to getMessageFile.
- */
- public static SystemMessageFile getPluginMessageFile()
- {
- return messageFile;
- }
-
- public SystemMessage getMessage(String msgId)
- {
- return getPluginMessage(msgId);
- }
-
- /**
- * Retrieve a message from this plugin's message file
- * @param msgId - the ID of the message to retrieve. This is the concatenation of the
- * message's component abbreviation, subcomponent abbreviation, and message ID as declared
- * in the message xml file.
- */
- public static SystemMessage getPluginMessage(String msgId)
- {
- SystemMessage msg = getMessage(messageFile, msgId);
- if (msg == null)
- {
- msg = getMessage(defaultMessageFile, msgId);
- }
- return msg;
- }
- /**
- * Retrieve a message from this plugin's message file and do multiple substitution on it.
- * @param msgId - the ID of the message to retrieve. This is the concatenation of the
- * message's component abbreviation, subcomponent abbreviation, and message ID as declared
- * in the message xml file.
- * @param subsVars - an array of objects to substitute in for %1, %2, etc
- */
- public static SystemMessage getPluginMessage(String msgId, Object[] subsVars)
- {
- SystemMessage msg = getMessage(messageFile, msgId);
- if (msg == null)
- {
- msg = getMessage(defaultMessageFile, msgId);
- }
- if ((msg != null) && (subsVars!=null) && (subsVars.length>0) && (msg.getNumSubstitutionVariables()>0))
- {
- msg.makeSubstitution(subsVars);
- }
- return msg;
- }
- /**
- * Retrieve a message from this plugin's message file and do single substitution on it.
- * @param msgId - the ID of the message to retrieve. This is the concatenation of the
- * message's component abbreviation, subcomponent abbreviation, and message ID as declared
- * in the message xml file.
- * @param subsVar - an array of objects to substitute in for %1, %2, etc.
- * @return the message.
- */
- public static SystemMessage getPluginMessage(String msgId, Object subsVar)
- {
- SystemMessage msg = getMessage(messageFile, msgId);
- if (msg == null)
- {
- msg = getMessage(defaultMessageFile, msgId);
- }
- if ((msg != null) && (subsVar!=null) && (msg.getNumSubstitutionVariables()>0))
- {
- msg.makeSubstitution(subsVar);
- }
- return msg;
- }
-
- /**
- * Register a view supplier so we can ask them to participate in team synchs
- */
- public void registerViewSupplier(ISystemViewSupplier vs)
- {
- viewSuppliers.add(vs);
- }
- /**
- * UnRegister a previously registered view supplier
- */
- public void unRegisterViewSupplier(ISystemViewSupplier vs)
- {
- if (viewSuppliers.contains(vs))
- viewSuppliers.remove(vs);
- }
-
- /**
- * Initializes the Archive Handler Manager, by registering archive \
- * file types with their handlers.
- * @author mjberger
- */
- protected void registerArchiveHandlers()
- {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // Get configured extenders
- IConfigurationElement[] systemTypeExtensions = registry.getConfigurationElementsFor("org.eclipse.rse.ui", "archivehandlers"); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < systemTypeExtensions.length; i++) {
- String ext = systemTypeExtensions[i].getAttribute("fileNameExtension"); //$NON-NLS-1$
- if (ext.startsWith(".")) ext = ext.substring(1); //$NON-NLS-1$
- String handlerType = systemTypeExtensions[i].getAttribute("class"); //$NON-NLS-1$
- try
- {
- // get the name space of the declaring extension
- String nameSpace = systemTypeExtensions[i].getDeclaringExtension().getNamespace();
-
- // use the name space to get the bundle
- Bundle bundle = Platform.getBundle(nameSpace);
-
- // if the bundle has not been uninstalled, then load the handler referred to in the
- // extension, and load it using the bundle
- // then register the handler
- if (bundle.getState() != Bundle.UNINSTALLED) {
- Class handler = bundle.loadClass(handlerType);
- ArchiveHandlerManager.getInstance().setRegisteredHandler(ext, handler);
- }
- }
- catch (ClassNotFoundException e)
- {
- logError("Cound not find archive handler class", e); //$NON-NLS-1$
- }
- }
- }
-
-
- /**
- * Initializes the System View Adapter Menu Extension Manager, by registering menu extensions
- */
- protected void registerDynamicPopupMenuExtensions()
- {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // Get configured extenders
- IConfigurationElement[] systemTypeExtensions = registry.getConfigurationElementsFor("org.eclipse.rse.ui", "dynamicPopupMenuExtensions"); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < systemTypeExtensions.length; i++)
- {
- try
- {
- // get the name space of the declaring extension
- String nameSpace = systemTypeExtensions[i].getDeclaringExtension().getNamespace();
-
- String menuExtensionType = systemTypeExtensions[i].getAttribute("class"); //$NON-NLS-1$
-
- // use the name space to get the bundle
- Bundle bundle = Platform.getBundle(nameSpace);
-
- // if the bundle has not been uninstalled, then load the handler referred to in the
- // extension, and load it using the bundle
- // then register the handler
- if (bundle.getState() != Bundle.UNINSTALLED)
- {
- Class menuExtension = bundle.loadClass(menuExtensionType);
-
- ISystemDynamicPopupMenuExtension extension = (ISystemDynamicPopupMenuExtension)menuExtension.getConstructors()[0].newInstance(null);
- SystemDynamicPopupMenuExtensionManager.getInstance().registerMenuExtension(extension);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- protected void registerKeystoreProviders()
- {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // Get configured extenders
- IConfigurationElement[] systemTypeExtensions = registry.getConfigurationElementsFor("org.eclipse.rse.ui", "keystoreProviders"); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < systemTypeExtensions.length; i++)
- {
- try
- {
- // get the name space of the declaring extension
- String nameSpace = systemTypeExtensions[i].getDeclaringExtension().getNamespace();
-
- String keystoreProviderType = systemTypeExtensions[i].getAttribute("class"); //$NON-NLS-1$
-
- // use the name space to get the bundle
- Bundle bundle = Platform.getBundle(nameSpace);
-
-
- if (bundle.getState() != Bundle.UNINSTALLED)
- {
- Class keystoreProvider = bundle.loadClass(keystoreProviderType);
-
- ISystemKeystoreProvider extension = (ISystemKeystoreProvider)keystoreProvider.getConstructors()[0].newInstance(null);
- SystemKeystoreProviderManager.getInstance().registerKeystoreProvider(extension);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Returns the RSE UI registry. Clients should use this method to get the registry which
- * is the starting point for working with UI elements in the RSE framework.
- * @return the RSE UI registry.
- */
- public IRSEUIRegistry getRegistry() {
- return RSEUIRegistry.getDefault();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBaseForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBaseForm.java
deleted file mode 100644
index 863039260..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBaseForm.java
+++ /dev/null
@@ -1,303 +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;
-
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.propertypages.ISystemConnectionWizardErrorUpdater;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * A reusable base form.
- * <p>
- * May be used to populate a dialog or a wizard page or properties page.
- * Often we need to support multiple ways to edit the same thing, and we need to
- * abstract out the client area. This base class puts some structure around these
- * abstractions. Note we don't extend Composite. Rather the subclass will create
- * and return the composite in createContents(). This offers us more flexibility
- * in how/where this is used.
- * <p>
- * For error checking, subclasses should simply call setPageComplete whenever they
- * do error checking (such as in response to an event). This will then call any
- * interested listeners who have registered via {@link #addPageCompleteListener(ISystemPageCompleteListener)}.
- * Error messages should be set via {@link #showErrorMessage(SystemMessage)}.
- */
-
-public abstract class SystemBaseForm
- implements Listener, ISystemConnectionWizardErrorUpdater //
-{
-
- private ISystemMessageLine msgLine;
- private Shell shell;
- private Object inputObject, outputObject;
- private Vector pageCompleteListeners;
- private boolean complete;
- protected Vector verifyListeners;
- protected boolean alreadyNotified;
-
- /**
- * Constructor.
- * @deprecated You should now use the constructor that takes a shell.
- * @param msgLine A GUI widget capable of writing error messages to.
- */
- public SystemBaseForm(ISystemMessageLine msgLine)
- {
- this.msgLine = msgLine;
- }
- /**
- * Constructor.
- * @param shell The parent shell.
- * @param msgLine A GUI widget capable of writing error messages to.
- */
- public SystemBaseForm(Shell shell, ISystemMessageLine msgLine)
- {
- this.msgLine = msgLine;
- this.shell = shell;
- }
-
- /**
- * Often the message line is null at the time of instantiation, so we have to call this after
- * it is created.
- */
- public void setMessageLine(ISystemMessageLine msgLine)
- {
- this.msgLine = msgLine;
- }
- /**
- * Return the message line as set via setMessageLine
- */
- public ISystemMessageLine getMessageLine()
- {
- return msgLine;
- }
- /**
- * Occassionally we don't know the shell at constructor time, so we need to be able to set it later
- */
- public void setShell(Shell shell)
- {
- this.shell = shell;
- }
- /**
- * Return the shell as set via setShell(Shell)
- */
- public Shell getShell()
- {
- return shell;
- }
- /**
- * Set the input object. This is usually set to the current selection, from where
- * the dialog/page is launched. This matches similar inputObject support in the
- * RSE classes for dialogs and wizards.<br>
- * This is usually set by the using dialog/pane, and queried by this object.
- */
- public void setInputObject(Object inputObject)
- {
- this.inputObject = inputObject;
- }
- /**
- * Return the input object as set by {@link #setInputObject(Object)}.
- */
- protected Object getInputObject()
- {
- return inputObject;
- }
- /**
- * Set the output object. This is usually set by this object, and is subsequently
- * queried by the using dialog/page.
- */
- protected void setOutputObject(Object outputObject)
- {
- this.outputObject = outputObject;
- }
- /**
- * Return the output object as set by {@link #setOutputObject(Object)}.
- */
- public Object getOutputObject()
- {
- return outputObject;
- }
-
- /**
- * Default implementation to satisfy Listener interface. Does nothing.
- */
- public void handleEvent(Event evt) {}
-
- /**
- * Register an interest in knowing whenever {@link #setPageComplete(boolean)} is
- * called by subclass code.
- */
- public void addPageCompleteListener(ISystemPageCompleteListener l)
- {
- if (pageCompleteListeners == null)
- pageCompleteListeners = new Vector();
- pageCompleteListeners.add(l);
- }
- /**
- * De-register a page complete listener.
- */
- public void removePageCompleteListener(ISystemPageCompleteListener l)
- {
- if (pageCompleteListeners != null)
- pageCompleteListeners.remove(l);
- }
-
- /**
- * The completeness of the page has changed.
- * We direct it to the Apply button versus just the OK button
- * @see {@link #addPageCompleteListener(ISystemPageCompleteListener)}
- */
- protected void setPageComplete(boolean complete)
- {
- this.complete = complete;
- if (pageCompleteListeners != null)
- {
- for (int idx=0; idx<pageCompleteListeners.size(); idx++)
- {
- ISystemPageCompleteListener l = (ISystemPageCompleteListener)pageCompleteListeners.elementAt(idx);
- l.setPageComplete(complete);
- }
- }
- }
- /**
- * Return the current completeness value, as last set by {@link #setPageComplete(boolean)}.
- */
- public boolean isPageComplete()
- {
- return complete;
- }
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- * @param parent The parent composite
- */
- public abstract Control createContents(Composite parent);
-
-
-
- // -----------------
- // HELPER METHODS...
- // -----------------
-
- /**
- * Display error message or clear error message (if passed null)
- */
- protected void showErrorMessage(SystemMessage msg)
- {
- if (msgLine != null)
- {
- if (msg != null)
- msgLine.setErrorMessage(msg);
- else
- msgLine.clearErrorMessage();
- }
- }
-
- /**
- * Add a separator line. This is a physically visible line.
- */
- protected Label addSeparatorLine(Composite parent, int nbrColumns)
- {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- separator.setLayoutData(data);
- return separator;
- }
- /**
- * Add a spacer line
- */
- protected Label addFillerLine(Composite parent, int nbrColumns)
- {
- Label filler = new Label(parent, SWT.LEFT);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- filler.setLayoutData(data);
- return filler;
- }
- /**
- * Add a spacer line that grows in height to absorb extra space
- */
- protected Label addGrowableFillerLine(Composite parent, int nbrColumns)
- {
- Label filler = new Label(parent, SWT.LEFT);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- data.verticalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- filler.setLayoutData(data);
- return filler;
- }
-
- /**
- * Register an interest in knowing whenever the form is
- * verified and error messages are updated.
- */
- public void addVerifyListener(ISystemVerifyListener l)
- {
- if (verifyListeners == null)
- verifyListeners = new Vector();
- verifyListeners.add(l);
- }
-
- protected void notifyVerifyListeners()
- {
- if (alreadyNotified == true)
- return; // prevent recursion
- if (verifyListeners == null) return;
- alreadyNotified = true;
- for (int i = 0; i < verifyListeners.size(); i++)
- {
- ((ISystemVerifyListener)verifyListeners.get(i)).handleVerifyComplete();
- }
- alreadyNotified = false;
- }
-
-
- /**
- * De-register a verify listener.
- */
- public void removePageCompleteListener(ISystemVerifyListener l)
- {
- if (verifyListeners != null)
- verifyListeners.remove(l);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.propertypages.ISystemConnectionWizardErrorUpdatingPropertyPage#getTheErrorMessage()
- */
- public String getTheErrorMessage()
- {
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java
deleted file mode 100644
index 75cceb118..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java
+++ /dev/null
@@ -1,1309 +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;
-import java.lang.reflect.InvocationTargetException;
-import java.net.InetAddress;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSEUserIdConstants;
-import org.eclipse.rse.core.ISystemUserIdConstants;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.propertypages.RemoteSystemsPreferencePage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorConnectionName;
-import org.eclipse.rse.ui.validators.ValidatorUserId;
-import org.eclipse.rse.ui.widgets.InheritableEntryField;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
-import org.eclipse.rse.ui.wizards.RSENewConnectionWizard;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-
-
-/**
- * A reusable form for prompting for connection information,
- * in new or update mode.
- * May be used to populate a dialog or a wizard page.
- * <p>
- * You may subclass this to refine the form. In this case you can
- * override the getForm method of SystemNewConnectionWizardDefaultMainPage
- * and SystemUpdateConnection to return your subclass.
- * </p>
- */
-
-public class SystemConnectionForm
- implements Listener, ISystemUserIdConstants,
- SelectionListener, Runnable, IRunnableWithProgress
-{
-
- public static final boolean CREATE_MODE = false;
- public static final boolean UPDATE_MODE = true;
- public static String lastSystemType = null;
-
-
- // GUI widgets
- protected Label labelType, labelConnectionName,labelHostName,labelUserId, labelDescription, labelProfile;
- protected Label labelTypeValue, labelSystemTypeValue, labelProfileValue;
- protected Combo textSystemType,textHostName, profileCombo;
- protected Text textConnectionName, textDescription;
- protected Button verifyHostNameCB;
-
- // yantzi:artemis 6.0, work offline support
- protected Button workOfflineCB;
-
- protected InheritableEntryField textUserId;
- protected Label textSystemTypeReadOnly; // for update mode
-
- // validators
- protected ISystemValidator[] nameValidators;
- protected ISystemValidator hostValidator;
- protected ISystemValidator userIdValidator;
-
- // other inputs
- protected ISystemMessageLine msgLine;
- protected ISystemConnectionFormCaller caller;
- protected String[] restrictSystemTypesTo;
- protected String defaultSystemType, defaultConnectionName, defaultHostName;
- protected String defaultUserId, defaultDescription, defaultProfile; // update mode initial values
- protected String[] defaultProfileNames;
- protected boolean defaultWorkOffline;
-
- protected boolean userPickedVerifyHostnameCB = false;
-
- // max lengths
- protected int hostNameLength = 100;
- protected int connectionNameLength = ValidatorConnectionName.MAX_CONNECTIONNAME_LENGTH;
- protected int userIdLength = 100;
- protected int descriptionLength = 100;
-
- // state/output
- protected int userIdLocation = IRSEUserIdConstants.USERID_LOCATION_HOST;
- protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog, callerInstanceOfPropertyPage;
- protected boolean userIdFromSystemTypeDefault;
- protected boolean updateMode = false;
- protected boolean initDone = false;
- protected boolean contentsCreated = false;
- protected boolean connectionNameEmpty = false;
- protected boolean connectionNameListen = true;
- protected boolean singleTypeMode = false;
- protected String originalHostName = null;
- protected String currentHostName = null;
- protected SystemMessage errorMessage = null;
- protected SystemMessage verifyingHostName;
-
- /**
- * Constructor.
- * @param msgLine A GUI widget capable of writing error messages to.
- * @param caller The wizardpage or dialog hosting this form.
- */
- public SystemConnectionForm(ISystemMessageLine msgLine, ISystemConnectionFormCaller caller)
- {
- this.msgLine = msgLine;
- this.caller = caller;
- this.defaultProfileNames = RSEUIPlugin.getTheSystemRegistry().getActiveSystemProfileNames();
- callerInstanceOfWizardPage = (caller instanceof WizardPage);
- callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
- callerInstanceOfPropertyPage = (caller instanceof PropertyPage);
-
- userIdValidator = new ValidatorUserId(true); // false => allow empty? Yes.
- defaultUserId = ""; //$NON-NLS-1$
- }
-
- // -------------------------------------------------------------
- // INPUT METHODS CALLABLE BY CALLER TO INITIALIZE INPUT OR STATE
- // -------------------------------------------------------------
-
- /**
- * Often the message line is null at the time of instantiation, so we have to call this after
- * it is created.
- */
- public void setMessageLine(ISystemMessageLine msgLine)
- {
- this.msgLine = msgLine;
- }
-
- /**
- * Call this to specify a validator for the connection name. It will be called per keystroke.
- * You must supply one per active profile, as connections must be unique per profile.
- * The order must be the same as the order of profiles given by getActiveSystemProfiles() in
- * the system registry.
- */
- public void setConnectionNameValidators(ISystemValidator[] v)
- {
- nameValidators = v;
- }
- /**
- * Call this to specify a validator for the hostname. It will be called per keystroke.
- */
- public void setHostNameValidator(ISystemValidator v)
- {
- hostValidator = v;
- }
- /**
- * Call this to specify a validator for the userId. It will be called per keystroke.
- */
- public void setUserIdValidator(ISystemValidator v)
- {
- userIdValidator = v;
- }
-
- /**
- * Set the profile names to show in the combo
- */
- public void setProfileNames(String[] names)
- {
- this.defaultProfileNames = names;
- if (profileCombo != null)
- profileCombo.setItems(names);
- }
- /**
- * Set the profile name to preselect
- */
- public void setProfileNamePreSelection(String selection)
- {
- this.defaultProfile = selection;
- if ((profileCombo != null) && (selection != null))
- {
- int selIdx = profileCombo.indexOf(selection);
- if (selIdx >= 0)
- profileCombo.select(selIdx);
- else
- profileCombo.select(0);
- }
- }
-
- /**
- * For "new" mode, allows setting of the initial user Id. Sometimes subsystems
- * like to have their own default userId preference page option. If so, query
- * it and set it here by calling this.
- */
- public void setUserId(String userId)
- {
- defaultUserId = userId;
- }
- /**
- * Set the currently selected connection so as to better initialize input fields
- */
- public void setCurrentlySelectedConnection(IHost connection)
- {
- if (connection != null)
- {
- initializeInputFields(connection, false);
- }
- }
- /**
- * Call this to restrict the system type that the user is allowed to choose
- */
- public void restrictSystemType(String systemType)
- {
- if (systemType.equals("*")) //$NON-NLS-1$
- return;
- this.restrictSystemTypesTo = new String[1];
- this.restrictSystemTypesTo[0] = systemType;
- if (defaultSystemType == null)
- defaultSystemType = systemType;
- }
- /**
- * Call this to restrict the system types that the user is allowed to choose
- */
- public void restrictSystemTypes(String[] systemTypes)
- {
- if (systemTypes == null)
- return;
- else if ((systemTypes.length==1) && (systemTypes[0].equals("*"))) //$NON-NLS-1$
- return;
- this.restrictSystemTypesTo = systemTypes;
- if (defaultSystemType == null)
- defaultSystemType = systemTypes[0];
- }
-
-
- /**
- * Initialize input fields to current values in update mode.
- * Note in update mode we do NOT allow users to change the system type.
- * <b>This must be called <i>after</i> calling getContents!
- * You must also be sure to pass true in createContents in order to call this method.
- * @param conn The SystemConnection object that is being modified.
- */
- public void initializeInputFields(IHost conn)
- {
- initializeInputFields(conn, true);
- }
- /**
- * Initialize input fields to current values in update mode.
- * Note in update mode we do NOT allow users to change the system type.
- * <b>This must be called <i>after</i> calling getContents!
- * You must also be sure to pass true in createContents in order to call this method.
- * @param conn The SystemConnection object that is being modified.
- */
- public void initializeInputFields(IHost conn, boolean updateMode)
- {
- this.updateMode = updateMode;
- defaultSystemType = conn.getSystemType();
- defaultConnectionName = conn.getAliasName();
- defaultHostName = conn.getHostName();
- defaultUserId = conn.getLocalDefaultUserId();
- defaultDescription = conn.getDescription();
- defaultProfile = conn.getSystemProfile().getName();
- defaultWorkOffline = conn.isOffline();
-
- if (updateMode)
- {
- defaultProfileNames = new String[1];
- defaultProfileNames[0] = defaultProfile;
- }
-
- if (contentsCreated)
- doInitializeFields();
- }
-
- /**
- * Preset the connection name
- */
- public void setConnectionName(String name)
- {
- defaultConnectionName = name;
- }
- /**
- * Preset the host name
- */
- public void setHostName(String name)
- {
- defaultHostName = name;
- }
-
-
- /**
- * 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) {
- pageComplete = ((getConnectionName().length() > 0)
- && (getHostName().length() > 0)
- && (getProfileName().length() > 0));
- }
-
- return pageComplete;
- }
-
- /**
- * @return whether the connection name is unique or not
- */
- public boolean isConnectionUnique()
- {
- // DKM - d53587 - used to check connection name uniqueness without displaying the error
- // TODO - need to display a directive for the user to specify a unique connection name
- // when it's invalid to be consistent with the rest of eclipse rather than
- // an error message
- int selectedProfile = 0;
- if (profileCombo != null)
- {
- selectedProfile = profileCombo.getSelectionIndex();
- }
- if (selectedProfile < 0)
- selectedProfile = 0;
-
- ISystemValidator nameValidator = null;
- if ((nameValidators!=null) && (nameValidators.length>0))
- nameValidator = nameValidators[selectedProfile];
- String connName = textConnectionName.getText().trim();
- if (nameValidator != null)
- errorMessage = nameValidator.validate(connName);
-
- if (errorMessage != null)
- {
- return false;
- }
- else
- {
- return true;
- }
-
- }
-
-
- // ---------------------------------------------
- // OUTPUT METHODS FOR EXTRACTING USER DATA ...
- // ---------------------------------------------
- /**
- * Verifies all input. Call this when user presses OK or Finish your dialog or wizard.
- * @param okPressed true if this verify is being done when OK is pressed. If so, we position
- * cursor on error checking, else we do not.
- * @return true if there are no errors in the user input
- */
- public boolean verify(boolean okPressed)
- {
- boolean ok = true;
-
- //SystemMessage errMsg = null;
- Control controlInError = null;
- if (msgLine != null)
- msgLine.clearErrorMessage();
-
- // validate connection name...
- errorMessage = validateConnectionNameInput(false);
- if (errorMessage != null)
- controlInError = textConnectionName;
-
- // validate host name...
- if ((errorMessage == null) && (textHostName != null))
- {
- errorMessage = validateHostNameInput();
- if (errorMessage != null)
- controlInError = textHostName;
- }
- // validate user Id...
- if ((errorMessage == null) && (textUserId != null))
- {
- errorMessage = validateUserIdInput();
- if (errorMessage != null)
- controlInError = textUserId;
- }
- // verify host name...
- if ((errorMessage == null) && okPressed && (textHostName != null) && verifyHostNameCB.getSelection())
- {
- currentHostName = textHostName.getText().trim();
- if (currentHostName.length() > 0)
- {
- if (verifyingHostName == null) {
- verifyingHostName = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_HOSTNAME_VERIFYING);
- }
-
- try
- {
- getRunnableContext().run(true, true, this);
- }
- catch (InterruptedException e)
- {
- // user canceled
- ok = false;
- controlInError = textHostName;
- }
- catch (InvocationTargetException e)
- {
- // error found
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_HOSTNAME_NOTFOUND);
- errorMessage.makeSubstitution(currentHostName);
- controlInError = textHostName;
- }
- }
- }
-
- // if ok pressed, test for warning situation that connection name is in use in another profile...
- if (ok && (errorMessage==null) && okPressed)
- {
- String connectionName = textConnectionName.getText().trim();
- if (!connectionName.equals(defaultConnectionName))
- {
- ok = ValidatorConnectionName.validateNameNotInUse(connectionName, caller.getShell());
- }
- controlInError = textConnectionName;
- }
-
- // ...end of validation...
-
- if (!ok || (errorMessage != null))
- {
- ok = false;
- if (okPressed)
- controlInError.setFocus();
- showErrorMessage(errorMessage);
- }
- // DETERMINE DEFAULT USER ID AND WHERE IT IS TO BE SET...
- // Possibly prompt for where to set user Id...
- else
- {
- boolean isLocal = false;
- if (textUserId != null)
- {
- isLocal = textUserId.isLocal();
- if (isLocal)
- userIdLocation = IRSEUserIdConstants.USERID_LOCATION_HOST; // edit this connection's local value
- else
- userIdLocation = IRSEUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE; // edit the preference value
- }
- else
- userIdLocation = IRSEUserIdConstants.USERID_LOCATION_NOTSET;
- SystemPreferencesManager.getPreferencesManager().setVerifyConnection(verifyHostNameCB.getSelection());
- }
-
- return ok;
- }
-
- /**
- * Return the runnable context from the hosting dialog or wizard, if
- * applicable
- */
- protected IRunnableContext getRunnableContext()
- {
- if (callerInstanceOfWizardPage)
- {
- return ((WizardPage)caller).getWizard().getContainer();
- }
- else if (callerInstanceOfSystemPromptDialog)
- {
- return ((SystemPromptDialog)caller);
- }
- else
- {
- return new ProgressMonitorDialog(caller.getShell());
- }
- }
-
- /**
- * Check if this system type is enabled for offline support
- */
- private boolean enableOfflineCB()
- {
- // disabled offline checkbox for new connections
- if (!updateMode)
- {
- return false;
- }
-
- IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(defaultSystemType);
- RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class));
- return sysTypeAdapter.isEnableOffline(sysType);
- }
-
- /**
- * Return user-entered System Type.
- * Call this after finish ends successfully.
- */
- public String getSystemType()
- {
- if (textSystemType != null)
- return textSystemType.getText().trim();
- else
- return defaultSystemType;
- }
- /**
- * Return user-entered Connection Name.
- * Call this after finish ends successfully.
- */
- public String getConnectionName()
- {
- return textConnectionName.getText().trim();
- }
- /**
- * Return user-entered Host Name.
- * Call this after finish ends successfully.
- */
- public String getHostName()
- {
- return textHostName.getText().trim();
- }
- /**
- * Return user-entered Default User Id.
- * Call this after finish ends successfully.
- */
- public String getDefaultUserId()
- {
- if (textUserId != null)
- return textUserId.getText().trim();
- else
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Return the user-entered value for work offline.
- * Call this after finish ends successfully.
- */
- public boolean isWorkOffline()
- {
- if (workOfflineCB != null)
- {
- return workOfflineCB.getSelection();
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Return user-entered Description.
- * Call this after finish ends successfully.
- */
- public String getConnectionDescription()
- {
- return textDescription.getText().trim();
- }
- /**
- * Return user-selected profile to contain this connection
- * Call this after finish ends successfully, and only in update mode.
- */
- public String getProfileName()
- {
- return (labelProfileValue!=null)?labelProfileValue.getText():profileCombo.getText();
- }
-
- /**
- * If a default userId was specified, the user may have been queried
- * where to put the userId. This returns one of the constants from
- * ISystemUserIdConstants
- */
- public int getUserIdLocation()
- {
- if ((textUserId != null) && (textUserId.getText().trim().length()>0))
- return userIdLocation;
- else
- return IRSEUserIdConstants.USERID_LOCATION_NOTSET;
- }
-
- // --------------------
- // INTERNAL METHODS...
- // --------------------
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- * @param parent The parent composite
- * @param updateMode true if we are in update mode versus create mode.
- */
- public Control createContents(Composite parent, boolean updateMode, String parentHelpId)
- {
- contentsCreated = true;
- Label labelSystemType = null;
- String temp = null;
-
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- SystemWidgetHelpers.setCompositeHelp(composite_prompts, parentHelpId);
-
- // Type display
- if (updateMode)
- {
- temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_TYPE_LABEL);
- labelType = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- labelTypeValue = SystemWidgetHelpers.createLabel(
- composite_prompts, SystemResources.RESID_CONNECTION_TYPE_VALUE);
- }
-
- // PROFILE SELECTION
- if (updateMode)
- {
- temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_PROFILE_LABEL);
- labelProfile = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- labelProfile.setToolTipText(SystemResources.RESID_CONNECTION_PROFILE_READONLY_TIP);
- labelProfileValue = SystemWidgetHelpers.createLabel(composite_prompts, ""); //$NON-NLS-1$
- labelProfileValue.setToolTipText(SystemResources.RESID_CONNECTION_PROFILE_READONLY_TIP);
- }
- else //if (!updateMode)
- {
- temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_PROFILE_LABEL);
- labelProfile = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- labelProfile.setToolTipText(SystemResources.RESID_CONNECTION_PROFILE_TIP);
- if (!updateMode)
- {
- profileCombo = SystemWidgetHelpers.createReadonlyCombo(
- composite_prompts,null,SystemResources.RESID_CONNECTION_PROFILE_TIP);
- SystemWidgetHelpers.setHelp(profileCombo, RSEUIPlugin.HELPPREFIX + "ccon0001"); //$NON-NLS-1$
- }
- }
-
- if (!updateMode)
- SystemWidgetHelpers.createLabel(composite_prompts, " ", 2); // filler //$NON-NLS-1$
-
- // SYSTEMTYPE PROMPT IN UPDATE MODE OR RESTRICTED MODE
- if (updateMode || ((restrictSystemTypesTo != null) && (restrictSystemTypesTo.length==1)) )
- {
- if (updateMode)
- {
- temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_SYSTEMTYPE_LABEL);
- labelSystemType = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- labelSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_READONLY_TIP);
- textSystemTypeReadOnly = SystemWidgetHelpers.createLabel(composite_prompts,""); //$NON-NLS-1$
- textSystemTypeReadOnly.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_READONLY_TIP);
- }
- else
- singleTypeMode = true;
- }
-
- if (updateMode)
- SystemWidgetHelpers.createLabel(composite_prompts, " ", nbrColumns); // filler //$NON-NLS-1$
-
- // CONNECTION NAME PROMPT
- temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_CONNECTIONNAME_LABEL);
- labelConnectionName = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- labelConnectionName.setToolTipText(SystemResources.RESID_CONNECTION_CONNECTIONNAME_TIP);
- textConnectionName = SystemWidgetHelpers.createTextField(
- composite_prompts,null,SystemResources.RESID_CONNECTION_CONNECTIONNAME_TIP);
- SystemWidgetHelpers.setHelp(textConnectionName, RSEUIPlugin.HELPPREFIX + "ccon0002"); //$NON-NLS-1$
-
- // SYSTEMTYPE PROMPT IN CREATE MODE
- //if (!updateMode)
- if ((labelSystemType == null) && !singleTypeMode)
- {
- temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_SYSTEMTYPE_LABEL);
- labelSystemType = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- labelSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP);
- textSystemType = SystemWidgetHelpers.createSystemTypeCombo(composite_prompts,null,restrictSystemTypesTo);
- textSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP);
- SystemWidgetHelpers.setHelp(textSystemType, RSEUIPlugin.HELPPREFIX + "ccon0003"); //$NON-NLS-1$
- }
-
- // HOSTNAME PROMPT
- temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_HOSTNAME_LABEL);
- labelHostName = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- labelHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP);
-
- if (!updateMode && (defaultSystemType==null))
- {
- defaultSystemType = RemoteSystemsPreferencePage.getSystemTypePreference();
- if ((defaultSystemType == null) || (defaultSystemType.length() == 0))
- defaultSystemType = lastSystemType;
- if ((defaultSystemType == null) || (defaultSystemType.length() == 0))
- defaultSystemType = textSystemType.getItem(0);
- }
-
- textHostName = SystemWidgetHelpers.createHostNameCombo(composite_prompts,null,defaultSystemType);
- textHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP);
- SystemWidgetHelpers.setHelp(textHostName, RSEUIPlugin.HELPPREFIX + "ccon0004"); //$NON-NLS-1$
-
- // USERID PROMPT
- /* We are testing the usability of not prompting for the user ID, so that the
- * user has less to think about when creating a new connection. Phil.
- */
- if (updateMode) // added for this experiment
- {
- temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_DEFAULTUSERID_LABEL);
- labelUserId = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- 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, RSEUIPlugin.HELPPREFIX + "ccon0005"); //$NON-NLS-1$
- }
-
- // DESCRIPTION PROMPT
- temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_DESCRIPTION_LABEL);
- labelDescription = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- labelDescription.setToolTipText(SystemResources.RESID_CONNECTION_DESCRIPTION_TIP);
- textDescription = SystemWidgetHelpers.createTextField(
- composite_prompts,null,SystemResources.RESID_CONNECTION_DESCRIPTION_TIP);
- SystemWidgetHelpers.setHelp(textDescription, RSEUIPlugin.HELPPREFIX + "ccon0006"); //$NON-NLS-1$
-
- // VERIFY HOST NAME CHECKBOX
- SystemWidgetHelpers.createLabel(composite_prompts, " ", nbrColumns); // filler //$NON-NLS-1$
- verifyHostNameCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, null, SystemResources.RESID_CONNECTION_VERIFYHOSTNAME_LABEL, SystemResources.RESID_CONNECTION_VERIFYHOSTNAME_TOOLTIP);
- if (updateMode)
- verifyHostNameCB.setSelection(false);
- else
- verifyHostNameCB.setSelection(SystemPreferencesManager.getPreferencesManager().getVerifyConnection());
-
- // yantzi: artemis 6.0, work offline
- if (enableOfflineCB())
- {
- workOfflineCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, null, SystemResources.RESID_OFFLINE_WORKOFFLINE_LABEL, SystemResources.RESID_OFFLINE_WORKOFFLINE_TOOLTIP);
- SystemWidgetHelpers.setHelp(workOfflineCB, RSEUIPlugin.HELPPREFIX + "wofp0000"); //$NON-NLS-1$
- }
-
- if (!initDone)
- doInitializeFields();
-
- connectionNameEmpty = (textConnectionName.getText().trim().length() == 0); // d43191
-
- textConnectionName.setFocus();
-
-
- // add keystroke listeners...
- textConnectionName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateConnectionNameInput(true);
- }
- }
- );
- textHostName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateHostNameInput();
- validateConnectionNameInput(false);
- }
- }
- );
- if (textUserId!=null)
- textUserId.addModifyListener(
- new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateUserIdInput();
- }
- });
-
- if (profileCombo != null) {
- profileCombo.addSelectionListener(this);
- }
-
- if (textSystemType != null) {
- originalHostName = textHostName.getText();
- textSystemType.addSelectionListener(this);
- }
-
- if (verifyHostNameCB != null) {
- verifyHostNameCB.addSelectionListener(this);
- }
-
- if ((textSystemType!=null) && (textSystemType.getText()!=null))
- caller.systemTypeSelected(textSystemType.getText(), true);
- else if ((restrictSystemTypesTo!=null) && (restrictSystemTypesTo.length==1))
- caller.systemTypeSelected(restrictSystemTypesTo[0], true);
-
- if (textUserId == null)
- userIdLocation = IRSEUserIdConstants.USERID_LOCATION_NOTSET;
-
- return composite_prompts; // composite;
- }
-
- /**
- * Return control to recieve initial focus
- */
- public Control getInitialFocusControl()
- {
- if (updateMode || !singleTypeMode)
- return textConnectionName;
- else
- return textHostName; // create mode and restricted to one system type
- }
-
- /**
- * Default implementation to satisfy Listener interface. Does nothing.
- */
- public void handleEvent(Event evt) {}
-
- /**
- * Combo selection listener method
- */
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
- /**
- * Combo selection listener method
- */
- public void widgetSelected(SelectionEvent event)
- {
- Object src = event.getSource();
-
- if (src == profileCombo)
- {
- profileCombo.getDisplay().asyncExec(this);
- }
- else if (src == textSystemType) // can only happen in create mode
- {
- String currHostName = textHostName.getText().trim();
- boolean hostNameChanged = !currHostName.equals(originalHostName);
- String currSystemType = textSystemType.getText().trim();
- textHostName.setItems(RSEUIPlugin.getTheSystemRegistry().getHostNames(currSystemType));
- if (hostNameChanged)
- {
- textHostName.setText(currHostName);
- }
- else if (textHostName.getItemCount()>0)
- {
- textHostName.setText(textHostName.getItem(0));
- originalHostName = textHostName.getText();
- }
- else
- {
- String connName = textConnectionName.getText().trim();
- if (connName.indexOf(' ') == -1)
- textHostName.setText(connName);
- else
- textHostName.setText(""); //$NON-NLS-1$
- originalHostName = textHostName.getText();
- }
-
- initializeUserIdField(currSystemType, null);
-
- verify(false); // re-check all fields in top-down order
-
- caller.systemTypeSelected(currSystemType, false);
- }
- // if verify host name checkbox event
- else if (src == verifyHostNameCB) {
-
- userPickedVerifyHostnameCB = true;
- // if the check box was unselected
- if (!verifyHostNameCB.getSelection()) {
-
- // clear host name not valid or not found error message so that wizard next page is enabled
- if (errorMessage != null && errorMessage == RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_HOSTNAME_NOTFOUND)) {
- errorMessage = null;
-
- if (msgLine != null) {
- msgLine.clearErrorMessage();
- }
-
- // set this page to complete so we can go to next page
- setPageComplete();
-
- // now go through each page and clear error message if there is one
- if (callerInstanceOfWizardPage) {
- IWizard wizard = ((WizardPage)caller).getWizard();
-
- IWizardPage[] pages = null;
-
- if (wizard instanceof RSENewConnectionWizard) {
- RSENewConnectionWizard connWizard = (RSENewConnectionWizard)wizard;
- AbstractSystemWizardPage mainPage = (AbstractSystemWizardPage)(connWizard.getStartingPage());
-
- Vector pageList = new Vector();
-
- IWizardPage page = mainPage;
-
- while (page != null) {
-
- if (page != mainPage) {
- pageList.add(page);
- }
-
- page = connWizard.getNextPage(page);
- }
-
- pages = new IWizardPage[pageList.size()];
-
- for (int j = 0; j < pageList.size(); j++) {
- pages[j] = (IWizardPage)(pageList.get(j));
- }
- }
- else {
- pages = wizard.getPages();
- }
-
- for (int i = 0; i < pages.length; i++) {
-
- IWizardPage page = pages[i];
-
- if (page instanceof AbstractSystemWizardPage) {
- ((AbstractSystemWizardPage)page).clearErrorMessage();
- }
- else if (page instanceof WizardPage) {
- ((WizardPage)page).setErrorMessage(null);
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * Initialize values of input fields based on input
- */
- private void doInitializeFields()
- {
- // -------
- // profile
- // -------
- // ...output-only:
- if (labelProfileValue != null)
- {
- if (defaultProfile != null)
- labelProfileValue.setText(defaultProfile);
- }
- // ...selectable:
- else
- {
- if (defaultProfileNames != null)
- profileCombo.setItems(defaultProfileNames);
-
- if (defaultProfile != null)
- {
- int selIdx = profileCombo.indexOf(defaultProfile);
- if (selIdx >= 0)
- profileCombo.select(selIdx);
- else
- profileCombo.select(0);
- }
- }
-
- // -----------
- // system type
- // -----------
- // ...output-only:
- if ((textSystemTypeReadOnly != null) || singleTypeMode)
- {
- if (restrictSystemTypesTo != null)
- {
- if (textSystemTypeReadOnly != null)
- textSystemTypeReadOnly.setText(restrictSystemTypesTo[0]);
- if (defaultSystemType == null)
- defaultSystemType = restrictSystemTypesTo[0];
- }
- else if (defaultSystemType != null)
- {
- if (textSystemTypeReadOnly != null)
- textSystemTypeReadOnly.setText(defaultSystemType);
- }
- }
- // ...selectable:
- else
- {
- if (defaultSystemType == null)
- {
- defaultSystemType = RemoteSystemsPreferencePage.getSystemTypePreference();
- if ((defaultSystemType == null) || (defaultSystemType.length()==0))
- defaultSystemType = lastSystemType;
- }
- if (defaultSystemType != null)
- {
- int selIdx = textSystemType.indexOf(defaultSystemType);
- if (selIdx >= 0)
- textSystemType.select(selIdx);
- }
- else
- {
- textSystemType.select(0);
- defaultSystemType = textSystemType.getText();
- }
- }
-
- // ---------------
- // connection name
- // ---------------
- if (defaultConnectionName != null)
- textConnectionName.setText(defaultConnectionName);
- textConnectionName.setTextLimit(connectionNameLength);
-
- // -----------
- // host name
- // -----------
- if (defaultHostName != null)
- {
- textHostName.setText(defaultHostName);
- }
- else if (textHostName.getItemCount() > 0)
- {
- textHostName.select(0);
- }
- textHostName.setTextLimit(hostNameLength);
- textHostName.clearSelection(); // should unselect the text, but it does not!
-
- // ---------------
- // default user id
- // ---------------
- initializeUserIdField(defaultSystemType, defaultUserId);
- if (textUserId!=null)
- textUserId.setTextLimit(userIdLength);
- // description
- if (defaultDescription != null)
- textDescription.setText(defaultDescription);
- textDescription.setTextLimit(descriptionLength);
-
- // ---------------
- // Work offline
- // ---------------
- if (workOfflineCB != null)
- {
- workOfflineCB.setSelection(defaultWorkOffline);
- }
-
- initDone = true;
- }
-
- /**
- * Initialize userId values.
- * We have to reset after user changes the system type
- */
- private void initializeUserIdField(String systemType, String currentUserId)
- {
- // ---------------
- // default user id
- // ---------------
- String parentUserId = SystemPreferencesManager.getPreferencesManager().getDefaultUserId(systemType);
- if (textUserId!=null)
- {
- textUserId.setInheritedText(parentUserId);
- boolean allowEditingOfInherited = ((parentUserId == null) || (parentUserId.length()==0));
- textUserId.setAllowEditingOfInheritedText(allowEditingOfInherited); // if not set yet, let user set it!
- }
- // ----------------------------
- // default user id: update-mode
- // ----------------------------
- if ((currentUserId != null) && (currentUserId.length()>0))
- {
- if (textUserId != null)
- {
- textUserId.setLocalText(currentUserId);
- textUserId.setLocal(true);
- }
- }
- // ----------------------------
- // default user id: create-mode
- // ----------------------------
- else
- {
- if (textUserId != null)
- textUserId.setLocalText(""); //$NON-NLS-1$
- if ((parentUserId != null) && (parentUserId.length() > 0))
- {
- userIdFromSystemTypeDefault = true;
- defaultUserId = parentUserId;
- if (textUserId != null)
- textUserId.setLocal(false);
- }
- // there is no local override, and no inherited value. Default to setting inherited value.
- else
- {
- if (textUserId != null)
- textUserId.setLocal(false);
- }
- }
- }
-
- // ------------------------------------------------------
- // INTERNAL METHODS FOR VERIFYING INPUT PER KEYSTROKE ...
- // ------------------------------------------------------
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- * @see #setConnectionNameValidators(ISystemValidator[])
- */
- protected SystemMessage validateConnectionNameInput(boolean userTyped)
- {
- if (!connectionNameListen)
- return null;
- errorMessage= null;
- int selectedProfile = 0;
- if (profileCombo != null)
- {
- selectedProfile = profileCombo.getSelectionIndex();
- }
- if (selectedProfile < 0)
- selectedProfile = 0;
- ISystemValidator nameValidator = null;
- if ((nameValidators!=null) && (nameValidators.length>0))
- nameValidator = nameValidators[selectedProfile];
- String connName = textConnectionName.getText().trim();
- if (nameValidator != null)
- {
- errorMessage = nameValidator.validate(connName);
- }
- showErrorMessage(errorMessage);
- setPageComplete();
- if (userTyped)
- connectionNameEmpty = (connName.length()==0); // d43191
- return errorMessage;
- }
- /**
- * Set the connection name internally without validation
- */
- protected void internalSetConnectionName(String name)
- {
- SystemMessage currErrorMessage = errorMessage;
- connectionNameListen = false;
- textConnectionName.setText(name);
- connectionNameListen = true;
- errorMessage = currErrorMessage;
- }
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- * @see #setHostNameValidator(ISystemValidator)
- */
- protected SystemMessage validateHostNameInput()
- {
- String hostName = textHostName.getText().trim();
- if (connectionNameEmpty) // d43191
- internalSetConnectionName(hostName);
- errorMessage= null;
- if (hostValidator != null)
- errorMessage= hostValidator.validate(hostName);
- else if (getHostName().length() == 0)
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_HOSTNAME_EMPTY);
- if (updateMode && !userPickedVerifyHostnameCB)
- {
- boolean hostNameChanged = !hostName.equals(defaultHostName);
- verifyHostNameCB.setSelection(hostNameChanged);
- }
- showErrorMessage(errorMessage);
- setPageComplete();
- return errorMessage;
- }
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- * @see #setUserIdValidator(ISystemValidator)
- */
- protected SystemMessage validateUserIdInput()
- {
- errorMessage= null;
- if (textUserId != null)
- {
- if (userIdValidator != null)
- errorMessage= userIdValidator.validate(textUserId.getText());
- else if (getDefaultUserId().length()==0)
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY);
- }
- showErrorMessage(errorMessage);
- setPageComplete();
- return errorMessage;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- boolean complete = isPageComplete();
- if (complete && (textSystemType!=null))
- lastSystemType = textSystemType.getText().trim();
- if (callerInstanceOfWizardPage)
- {
- ((WizardPage)caller).setPageComplete(complete);
- }
- else if (callerInstanceOfSystemPromptDialog)
- {
- ((SystemPromptDialog)caller).setPageComplete(complete);
- }
- else if (callerInstanceOfPropertyPage)
- {
- ((PropertyPage)caller).setValid(complete);
- }
- }
-
- /**
- * Display error message or clear error message
- */
- private void showErrorMessage(SystemMessage msg)
- {
- if (msgLine != null)
- if (msg != null)
- msgLine.setErrorMessage(msg);
- else
- msgLine.clearErrorMessage();
- else
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "MSGLINE NULL. TRYING TO WRITE MSG " + msg); //$NON-NLS-1$
- }
-
- // ---------------------------------------------------------------
- // STATIC METHODS FOR GETTING A CONNECTION NAME VALIDATOR...
- // ---------------------------------------------------------------
-
- /**
- * Reusable method to return a name validator for renaming a connection.
- * @param conn the current connection object on updates. Can be null for new names. Used
- * to remove from the existing name list the current connection.
- */
- public static ISystemValidator getConnectionNameValidator(IHost conn)
- {
- ISystemProfile profile = conn.getSystemProfile();
- 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);
- return connNameValidator;
- }
- /**
- * Reusable method to return a name validator for renaming a connection.
- * @param profile the current connection object's profile from which to get the existing names.
- * Can be null for syntax checking only, versus name-in-use.
- */
- public static ISystemValidator getConnectionNameValidator(ISystemProfile profile)
- {
- Vector v = RSEUIPlugin.getTheSystemRegistry().getHostAliasNames(profile);
- ValidatorConnectionName connNameValidator = new ValidatorConnectionName(v);
- return connNameValidator;
- }
-
- /**
- * Reusable method to return name validators for creating a connection.
- * There is one validator per active system profile.
- */
- public static ISystemValidator[] getConnectionNameValidators()
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISystemProfile[] profiles = sr.getActiveSystemProfiles();
- ISystemValidator[] connNameValidators = new ISystemValidator[profiles.length];
- for (int idx=0; idx<profiles.length; idx++)
- {
- Vector v = sr.getHostAliasNames(profiles[idx]);
- connNameValidators[idx] = new ValidatorConnectionName(v);
- }
- return connNameValidators;
- }
-
- // -------------------------------------------------------
- // METHOD REQUIRED BY RUNNABLE, USED IN CALL TO ASYNCEXEC
- // -------------------------------------------------------
-
- public void run()
- {
- verify(false);
- }
-
- /**
- * METHOD REQUIRED BY IRunnableWithProgress, USED TO SHOW PROGRESS WHILE
- * VERIFYING HOSTNAME
- */
- public void run(IProgressMonitor pm) throws InvocationTargetException, InterruptedException
- {
- pm.beginTask(verifyingHostName.getLevelOneText(),IProgressMonitor.UNKNOWN);
- try
- {
- InetAddress.getByName(currentHostName);
- }
- catch (java.net.UnknownHostException exc)
- {
- pm.done();
- throw new InvocationTargetException(exc);
- }
- pm.done();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemMenuManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemMenuManager.java
deleted file mode 100644
index 6204c7ec1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemMenuManager.java
+++ /dev/null
@@ -1,359 +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;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-import org.eclipse.rse.ui.actions.SystemCascadingBrowseWithAction;
-import org.eclipse.rse.ui.actions.SystemCascadingCompareWithAction;
-import org.eclipse.rse.ui.actions.SystemCascadingExpandToAction;
-import org.eclipse.rse.ui.actions.SystemCascadingNewAction;
-import org.eclipse.rse.ui.actions.SystemCascadingOpenWithAction;
-import org.eclipse.rse.ui.actions.SystemCascadingRemoteServersAction;
-import org.eclipse.rse.ui.actions.SystemCascadingReplaceWithAction;
-import org.eclipse.rse.ui.actions.SystemCascadingViewAction;
-import org.eclipse.rse.ui.actions.SystemCascadingWorkWithAction;
-import org.eclipse.rse.ui.actions.SystemSeparatorAction;
-
-/**
- * Override/wrapper of JFace MenuManager so we can redirect any
- * menu additions to specific menu groups to go into
- * pre-defined submenus.
- * <p>
- * Only exposes core set of MenuManager methods. Rest can be
- * accessed by calling getMenuManger().
- */
-public class SystemMenuManager //implements IMenuManager
- implements ISystemContextMenuConstants
-{
- private IMenuManager mgr;
- private IMenuManager newSubMenu, expandtoSubMenu, openwithSubMenu, browsewithSubMenu, comparewithSubMenu, replacewithSubMenu, workwithSubMenu, viewSubMenu, serverSubMenu;
- private boolean menuCreated = false;
-
- /**
- * Constructor for SystemMenuManager
- * @param menuManager existing JFace menu manager
- */
- public SystemMenuManager(IMenuManager menuManager)
- {
- super();
- mgr = menuManager;
- }
-
- /**
- * Get the wrapped IMenuManager manager
- */
- public IMenuManager getMenuManager()
- {
- return mgr;
- }
-
- /**
- * Method declared on IContributionManager.
- * Add an action to this menu.
- * COMMENTED OUT TO PREVENT CALLING IT. YOU SHOULD EXPLICITLY
- * DECIDE WHAT GROUP EACH ACTION SHOULD BE ADDED TO, SO WE FORCE
- * YOU TO CALL APPENDTOGROUP!
- *
- public void add(IAction action)
- {
- mgr.add(action);
- }*/
-
- /**
- * Method declared on IContributionManager.
- * Append an action to the menu.
- * <p>
- * Intercepted so we can direct appends to certain groups into appropriate cascading submenus.
- * <p>
- * @param groupName group to append to. See {@link org.eclipse.rse.ui.ISystemContextMenuConstants}.
- * @param action action to append.
- */
- public void appendToGroup(String groupName, IAction action)
- {
- if (!checkForSpecialGroup(groupName, action, true))
- if (groupName != null)
- mgr.appendToGroup(groupName, action);
- else
- mgr.add(action);
- }
- /**
- * Method declared on IContributionManager.
- * Append a submenu to the menu.
- * <p>
- * Intercepted so we can direct appends to certain groups into appropriate cascading submenus.
- * <p>
- * @param groupName group to append to. See {@link org.eclipse.rse.ui.ISystemContextMenuConstants}.
- * @param submenu submenu to append.
- */
- public void appendToGroup(String groupName, IContributionItem menuOrSeparator)
- {
- if (!checkForSpecialGroup(groupName, menuOrSeparator, true))
- if (groupName != null)
- mgr.appendToGroup(groupName, menuOrSeparator);
- else
- mgr.add(menuOrSeparator);
- }
-
- /**
- * Method declared on IContributionManager.
- * Prepend an action to the menu.
- * <p>
- * Intercepted so we can direct appends to certain groups into appropriate cascading submenus.
- * <p>
- * @param groupName group to append to. See {@link org.eclipse.rse.ui.ISystemContextMenuConstants}.
- * @param action action to prepend.
- */
- public void prependToGroup(String groupName, IAction action)
- {
- if (!checkForSpecialGroup(groupName, action, false))
- mgr.prependToGroup(groupName, action);
- }
- /**
- * Method declared on IContributionManager.
- * Prepend a submenu to the menu.
- * <p>
- * Intercepted so we can direct appends to certain groups into appropriate cascading submenus.
- * <p>
- * @param groupName group to append to. See {@link org.eclipse.rse.ui.ISystemContextMenuConstants}.
- * @param submenu submenu to append.
- */
- public void prependToGroup(String groupName, IContributionItem subMenu)
- {
- if (!checkForSpecialGroup(groupName, subMenu, true))
- mgr.prependToGroup(groupName, subMenu);
- }
-
- /**
- * Add a separator.
- * HOPEFULLY THIS IS NEVER CALLED. RATHER, BY USING GROUPS AND DECIDING PER GROUP IF THERE
- * SHOULD BE SEPARATORS, WE AVOID HARDCODING SEPARATORS LIKE THIS.
- */
- public void addSeparator()
- {
- mgr.add(new Separator());
- }
-
- /**
- * Special helper that intelligently adds system framework actions
- * @param menuGroup default menuGroup to add to, if action doesn't contain an explicit location
- * @param action action to add to the menu
- */
- public void add(String menuGroup, IAction action)
- {
- if (action instanceof SystemBaseSubMenuAction)
- appendToGroup(getMenuGroup(action,menuGroup),
- ((SystemBaseSubMenuAction)action).getSubMenu());
- else if (!(action instanceof SystemSeparatorAction))
- appendToGroup(getMenuGroup(action,menuGroup),action);
- else // hopefully we don't have these!
- appendToGroup(menuGroup, new Separator()); // add a separator, which is an IContributionItem
- }
-
- private String getMenuGroup(IAction action, String defaultGroup)
- {
- if ( (action instanceof ISystemAction) &&
- (((ISystemAction)action).getContextMenuGroup()!=null) )
- return ((ISystemAction)action).getContextMenuGroup();
- else
- return defaultGroup;
- }
-
- private boolean checkForSpecialGroup(String groupName, IAction action, boolean add)
- {
- boolean takenCareOf = false;
- IMenuManager subMenu = getSpecialSubMenu(groupName);
- if (subMenu != null)
- {
- takenCareOf = true;
- if (action instanceof SystemSeparatorAction)
- {
- subMenu.add(new Separator());
- if (((SystemSeparatorAction)action).isRealAction())
- subMenu.add(action);
- }
- else
- subMenu.add(action);
- }
-
- return takenCareOf;
- }
-
- private boolean checkForSpecialGroup(String groupName, IContributionItem contribution, boolean add)
- {
- boolean takenCareOf = false;
- IMenuManager subMenu = getSpecialSubMenu(groupName);
- if (subMenu != null)
- {
- takenCareOf = true;
- subMenu.add(contribution);
- }
- return takenCareOf;
- }
-
- private IMenuManager getSpecialSubMenu(String groupName)
- {
- IMenuManager subMenu = null;
- menuCreated = false;
- if (groupName!=null)
- {
- if (groupName.equals(GROUP_NEW))
- {
- if (newSubMenu == null)
- {
- newSubMenu = (new SystemCascadingNewAction()).getSubMenu();
- mgr.appendToGroup(GROUP_NEW, newSubMenu);
- menuCreated = true;
- }
- subMenu = newSubMenu;
- }
- /*
- else if (groupName.equals(GROUP_GOTO))
- {
- if (gotoSubMenu == null)
- {
- gotoSubMenu = (new SystemCascadingGoToAction()).getSubMenu();
- mgr.appendToGroup(GROUP_GOTO, gotoSubMenu);
- menuCreated = true;
- }
- subMenu = gotoSubMenu;
- }
- */
- else if (groupName.equals(GROUP_EXPANDTO))
- {
- if (expandtoSubMenu == null)
- {
- expandtoSubMenu = (new SystemCascadingExpandToAction()).getSubMenu();
- mgr.appendToGroup(GROUP_EXPANDTO, expandtoSubMenu);
- menuCreated = true;
- }
- subMenu = expandtoSubMenu;
- }
- else if (groupName.equals(GROUP_OPENWITH))
- {
- if (openwithSubMenu == null)
- {
- openwithSubMenu = (new SystemCascadingOpenWithAction()).getSubMenu();
- mgr.appendToGroup(GROUP_OPENWITH, openwithSubMenu);
- menuCreated = true;
- }
- subMenu = openwithSubMenu;
- }
- else if (groupName.equals(GROUP_BROWSEWITH))
- {
- if (browsewithSubMenu == null)
- {
- browsewithSubMenu = (new SystemCascadingBrowseWithAction()).getSubMenu();
- mgr.appendToGroup(GROUP_BROWSEWITH, browsewithSubMenu);
- menuCreated = true;
- }
- subMenu = browsewithSubMenu;
- }
- else if (groupName.equals(GROUP_COMPAREWITH))
- {
- if (comparewithSubMenu == null)
- {
- comparewithSubMenu = (new SystemCascadingCompareWithAction()).getSubMenu();
- mgr.appendToGroup(GROUP_COMPAREWITH, comparewithSubMenu);
- menuCreated = true;
- }
- subMenu = comparewithSubMenu;
- }
- else if (groupName.equals(GROUP_REPLACEWITH))
- {
- if (replacewithSubMenu == null)
- {
- replacewithSubMenu = (new SystemCascadingReplaceWithAction()).getSubMenu();
- mgr.appendToGroup(GROUP_REPLACEWITH, replacewithSubMenu);
- menuCreated = true;
- }
- subMenu = replacewithSubMenu;
- }
- else if (groupName.equals(GROUP_WORKWITH))
- {
- if (workwithSubMenu == null)
- {
- workwithSubMenu = (new SystemCascadingWorkWithAction()).getSubMenu();
- mgr.appendToGroup(GROUP_WORKWITH, workwithSubMenu);
- menuCreated = true;
- }
- subMenu = workwithSubMenu;
- }
- else if (groupName.equals(GROUP_VIEWER_SETUP))
- {
- if (viewSubMenu == null)
- {
- viewSubMenu = (new SystemCascadingViewAction()).getSubMenu();
- mgr.appendToGroup(GROUP_VIEWER_SETUP, viewSubMenu);
- menuCreated = true;
- }
- subMenu = viewSubMenu;
- }
- else if (groupName.equals(GROUP_STARTSERVER))
- {
- if (serverSubMenu == null)
- {
- serverSubMenu = (new SystemCascadingRemoteServersAction()).getSubMenu();
- mgr.appendToGroup(GROUP_STARTSERVER, serverSubMenu);
- menuCreated = true;
- }
- subMenu = serverSubMenu;
- }
- }
- return subMenu;
- }
-
- public IMenuManager getSpecialSubMenuByMenuID(String menuID)
- {
- IMenuManager subMenu = null;
- String groupName = null;
- menuCreated = false;
- if (menuID!=null)
- {
- if (menuID.equals(MENU_NEW))
- groupName = GROUP_NEW;
- else if (menuID.equals(MENU_GOTO))
- groupName = GROUP_GOTO;
- else if (menuID.equals(MENU_EXPANDTO))
- groupName = GROUP_EXPANDTO;
- else if (menuID.equals(MENU_OPENWITH))
- groupName = GROUP_OPENWITH;
- else if (menuID.equals(MENU_BROWSEWITH))
- groupName = GROUP_BROWSEWITH;
- else if (menuID.equals(MENU_COMPAREWITH))
- groupName = GROUP_COMPAREWITH;
- else if (menuID.equals(MENU_REPLACEWITH))
- groupName = GROUP_REPLACEWITH;
- else if (menuID.equals(MENU_WORKWITH))
- groupName = GROUP_WORKWITH;
- else if (menuID.equals(MENU_STARTSERVER))
- groupName = GROUP_STARTSERVER;
-
- if (groupName != null)
- subMenu = getSpecialSubMenu(groupName);
- }
- return subMenu;
- }
-
- public boolean wasMenuCreated()
- {
- return menuCreated;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemProfileForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemProfileForm.java
deleted file mode 100644
index 724d6c5ce..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemProfileForm.java
+++ /dev/null
@@ -1,264 +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;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorProfileName;
-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.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * A reusable form for prompting for profile information,
- * in new or update mode.
- * <p>
- * May be used to populate a dialog or a wizard page.
- */
-
-public class SystemProfileForm
- implements Listener
-{
-
- // GUI widgets
- protected Label profileLabel;
- protected Control verbage;
- //protected Combo profileCombo;
- protected Text profileName;
- protected ISystemMessageLine msgLine;
- // validators
- protected ISystemValidator nameValidator;
- protected Object caller;
- protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
-
- // max lengths
- protected static final int profileNameLength = ValidatorProfileName.MAX_PROFILENAME_LENGTH;
- // state
- protected ISystemProfile profile;
- private boolean showVerbage = true;
- private SystemMessage errorMessage = null;
-
- /**
- * Constructor.
- * @param msgLine A GUI widget capable of writing error messages to.
- * @param caller The wizardpage or dialog hosting this form.
- * @param profile The existing profile being updated, or null for New action.
- * @param showVerbage Specify true to show first-time-user verbage.
- */
- public SystemProfileForm(ISystemMessageLine msgLine, Object caller, ISystemProfile profile, boolean showVerbage)
- {
- this.msgLine = msgLine;
- this.caller = caller;
- this.profile = profile;
- this.showVerbage = showVerbage;
- callerInstanceOfWizardPage = (caller instanceof WizardPage);
- callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
-
- // FIXME cast to SystemProfileManager is temporary to get at api - need to use an adapter for getting validators
- SystemProfileManager mgr = (SystemProfileManager)RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager();
- nameValidator = mgr.getProfileNameValidator(profile);
- }
-
- /**
- * Often the message line is null at the time of instantiation, so we have to call this after
- * it is created.
- */
- public void setMessageLine(ISystemMessageLine msgLine)
- {
- this.msgLine = msgLine;
- }
-
- /**
- * Call this to specify a validator for the profile name. It will be called per keystroke.
- * If not specified, a default is used.
- */
- public void setNameValidators(ISystemValidator v)
- {
- nameValidator = v;
- }
- /**
- * Call to initialize the profile name in create mode. Must be called after createContents
- */
- public void setProfileName(String name)
- {
- if ((name != null) && (profileName != null))
- profileName.setText(name);
- }
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- * @param parent The parent composite
- */
- public Control createContents(Composite parent)
- {
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // VERBAGE LABEL
- if (showVerbage)
- {
- verbage = SystemWidgetHelpers.createVerbiage(
- composite_prompts, SystemResources.RESID_PROFILE_PROFILENAME_VERBAGE, nbrColumns, false, 200);
- SystemWidgetHelpers.createLabel(composite_prompts, "", nbrColumns); // dummy line for spacing //$NON-NLS-1$
- }
-
- // NAME PROMPT
- String temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_PROFILE_PROFILENAME_LABEL);
- profileLabel = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- profileName = SystemWidgetHelpers.createTextField(
- composite_prompts,this,
- SystemResources.RESID_PROFILE_PROFILENAME_TIP);
- profileName.setTextLimit(profileNameLength);
-
- if (profile != null)
- profileName.setText(profile.getName());
-
- profileName.setFocus();
-
-
- // add keystroke listeners...
- profileName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateNameInput();
- }
- }
- );
- return composite_prompts;
- }
-
- /**
- * Return control to recieve initial focus
- */
- public Control getInitialFocusControl()
- {
- return profileName;
- }
-
- /**
- * Default implementation to satisfy Listener interface. Does nothing.
- */
- public void handleEvent(Event evt) {}
-
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify()
- {
- SystemMessage errMsg = null;
- Control controlInError = null;
- if (msgLine != null)
- {
- msgLine.clearErrorMessage();
- }
- errMsg = validateNameInput();
- if (errMsg != null)
- {
- controlInError = profileName;
- controlInError.setFocus();
- showErrorMessage(errMsg);
- }
- return (errMsg == null);
- }
-
- // --------------------------------- //
- // METHODS FOR EXTRACTING USER DATA ...
- // --------------------------------- //
- /**
- * Return user-entered profile Name.
- * Call this after finish ends successfully.
- */
- public String getProfileName()
- {
- return profileName.getText().trim();
- }
- /**
- * Display error message or clear error message
- */
- private void showErrorMessage(SystemMessage msg)
- {
- if (msgLine != null)
- if (msg != null)
- msgLine.setErrorMessage(msg);
- else
- msgLine.clearErrorMessage();
- else
- System.out.println("MSGLINE NULL. TRYING TO WRITE MSG " + msg); //$NON-NLS-1$
- }
-
- // ---------------------------------------------
- // METHODS FOR VERIFYING INPUT PER KEYSTROKE ...
- // ---------------------------------------------
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- * @see #setNameValidators(ISystemValidator)
- */
- protected SystemMessage validateNameInput()
- {
- errorMessage= null;
- errorMessage= nameValidator.validate(profileName.getText().trim());
- showErrorMessage(errorMessage);
- 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)
- pageComplete = (getProfileName().length() > 0);
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- boolean complete = isPageComplete();
- if (callerInstanceOfWizardPage)
- {
- ((WizardPage)caller).setPageComplete(complete);
- }
- else if (callerInstanceOfSystemPromptDialog)
- {
- ((SystemPromptDialog)caller).setPageComplete(complete);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPropertyResources.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPropertyResources.java
deleted file mode 100644
index 1bd1d9a56..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPropertyResources.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SystemPropertyResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.ui.SystemPropertyResources";//$NON-NLS-1$
-
-// ------------------------------
- // PROPERTY SHEET VALUES
- // ------------------------------
- // PROPERTY SHEET VALUES: GENERIC
-
- public static String RESID_PROPERTY_NAME_LABEL;
- public static String RESID_PROPERTY_NAME_TOOLTIP;
-
- public static String RESID_PROPERTY_TYPE_LABEL;
- public static String RESID_PROPERTY_TYPE_TOOLTIP;
-
- public static String RESID_PROPERTY_DESCRIPTION_LABEL;
- public static String RESID_PROPERTY_DESCRIPTION_TOOLTIP;
-
- public static String RESID_PROPERTY_FILTERTYPE_VALUE;
-
- public static String RESID_TERM_NOTAPPLICABLE;
- public static String RESID_TERM_NOTAVAILABLE;
-
- public static String RESID_PORT_DYNAMICSELECT;
- public static String RESID_PROPERTY_INHERITED;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemPropertyResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPropertyResources.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPropertyResources.properties
deleted file mode 100644
index fab9d610d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPropertyResources.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-##############################################################
-# PROPERTY VALUES...
-##############################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RESID_PROPERTY_NAME_LABEL=Name
-RESID_PROPERTY_NAME_TOOLTIP=Name of resources
-RESID_PROPERTY_TYPE_LABEL=Type
-RESID_PROPERTY_TYPE_TOOLTIP=Type of resource
-RESID_PROPERTY_DESCRIPTION_LABEL=Description
-RESID_PROPERTY_DESCRIPTION_TOOLTIP=Description of resource
-
-RESID_TERM_NOTAPPLICABLE=Not applicable
-RESID_TERM_NOTAVAILABLE=Not available
-RESID_PORT_DYNAMICSELECT=(First-available)
-RESID_PROPERTY_INHERITED=(Inherited)
-
-RESID_PROPERTY_FILTERTYPE_VALUE=Remote system filter \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemResources.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemResources.java
deleted file mode 100644
index fc38e7293..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemResources.java
+++ /dev/null
@@ -1,1251 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-
-/**
- * Constants used throughout the System plugin.
- */
-public class SystemResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.ui.SystemResources";//$NON-NLS-1$
-
- /**
- * Current release as a number (multiplied by 10). E.g. 30 is for release 3.0.
- */
- public static final int CURRENT_RELEASE = 100; // updated to new release
-
- /**
- * Current release as a string.
- */
- public static final String CURRENT_RELEASE_NAME = "1.0.0"; //$NON-NLS-1$
-
-
- // Buttons
- // *** NOT GOOD TO USE BUTTONS. BETTER TO USE ACTIONS WITH THEIR
- // .label,.tooltip and .description ASSOCIATIONS
- // THESE BUTTON LABELS ARE USED IN SYSTEMPROMPTDIALOG
- public static String BUTTON_BROWSE;
- public static String BUTTON_TEST;
- public static String BUTTON_CLOSE;
- public static String BUTTON_ADD;
- public static String BUTTON_CREATE_LABEL;
- public static String BUTTON_CREATE_TOOLTIP;
- public static String BUTTON_APPLY_LABEL;
- public static String BUTTON_APPLY_TOOLTIP;
- public static String BUTTON_RESET_LABEL;
- public static String BUTTON_RESET_TOOLTIP;
- public static String BUTTON_CANCEL_ALL;
- public static String BUTTON_CANCEL_ALL_TOOLTIP;
-
- // THESE TERMS ARE USED POTENTIALLY ANYWHERE
- public static String TERM_YES;
- public static String TERM_NO;
-
- public static String TERM_TRUE;
- public static String TERM_FALSE;
-
- public static String TERM_LOCAL;
- public static String TERM_ALL;
-
- public static String RESID_MSGLINE_TIP;
-
- // ----------------------------------------
- // GENERIC/COMMON WIZARD AND DIALOG STRINGS
- // ----------------------------------------
- // GENERIC MULTI-SELECT RENAME DIALOG...
- public static String RESID_RENAME_TITLE;
- public static String RESID_RENAME_SINGLE_TITLE;
- public static String RESID_RENAME_VERBAGE;
- public static String RESID_RENAME_COLHDG_OLDNAME;
- public static String RESID_RENAME_COLHDG_NEWNAME;
- public static String RESID_RENAME_COLHDG_TYPE;
-
- // SPECIALIZED PROMPTS FOR GENERIC RENAME DIALOG...
- public static String RESID_MULTI_RENAME_PROFILE_VERBAGE;
-
- // GENERIC SINGLE-SELECT RENAME DIALOG...
-
- public static String RESID_SIMPLE_RENAME_PROMPT_LABEL;
- public static String RESID_SIMPLE_RENAME_PROMPT_TOOLTIP;
-
-
-
- public static String RESID_SIMPLE_RENAME_RESOURCEPROMPT_LABEL;
- public static String RESID_SIMPLE_RENAME_RESOURCEPROMPT_TOOLTIP;
- public static String RESID_SIMPLE_RENAME_RADIO_OVERWRITE_LABEL;
- public static String RESID_SIMPLE_RENAME_RADIO_OVERWRITE_TOOLTIP;
- public static String RESID_SIMPLE_RENAME_RADIO_RENAME_LABEL;
- public static String RESID_SIMPLE_RENAME_RADIO_RENAME_TOOLTIP;
-
- // SPECIALIZED PROMPTS FOR GENERIC RENAME DIALOG...
- public static String RESID_SIMPLE_RENAME_PROFILE_PROMPT_LABEL;
-
- public static String RESID_SIMPLE_RENAME_PROFILE_PROMPT_TIP;
-
- // GENERIC DELETE DIALOG...
- public static String RESID_DELETE_TITLE;
-
- public static String RESID_DELETE_PROMPT;
-
- public static String RESID_DELETE_PROMPT_SINGLE;
-
-
- public static String RESID_DELETE_RESOURCEPROMPT_LABEL;
- public static String RESID_DELETE_RESOURCEPROMPT_TOOLTIP;
-
- public static String RESID_DELETE_TIP;
-
- public static String RESID_DELETE_WARNING_LABEL;
- public static String RESID_DELETE_WARNING_TOOLTIP;
-
- public static String RESID_DELETE_WARNINGLOCAL_LABEL;
- public static String RESID_DELETE_WARNINGLOCAL_TOOLTIP;
-
- public static String RESID_DELETE_COLHDG_OLDNAME;
-
- public static String RESID_DELETE_COLHDG_TYPE;
-
- public static String RESID_DELETE_BUTTON;
-
- // SPECIALIZED PROMPTS FOR GENERIC DELETE DIALOG...
- public static String RESID_DELETE_PROFILES_PROMPT;
-
- // GENERIC COPY DIALOG...
- public static String RESID_COPY_TITLE;
- public static String RESID_COPY_SINGLE_TITLE;
- public static String RESID_COPY_PROMPT;
- public static String RESID_COPY_TARGET_PROFILE_PROMPT;
- public static String RESID_COPY_TARGET_FILTERPOOL_PROMPT;
- public static String RESID_COPY_TARGET_FILTER_PROMPT;
-
- // GENERIC MOVE DIALOG...
- public static String RESID_MOVE_TITLE;
- public static String RESID_MOVE_SINGLE_TITLE;
- public static String RESID_MOVE_PROMPT;
- public static String RESID_MOVE_TARGET_PROFILE_PROMPT;
- public static String RESID_MOVE_TARGET_FILTERPOOL_PROMPT;
- public static String RESID_MOVE_TARGET_FILTER_PROMPT;
-
- // GENERIC RESOURCE NAME COLLISION DIALOG...
- public static String RESID_COLLISION_RENAME_TITLE;
- public static String RESID_COLLISION_RENAME_VERBAGE;
- public static String RESID_COLLISION_RENAME_LABEL;
- public static String RESID_COLLISION_RENAME_TOOLTIP;
-
- // GENERIC SELECT CONNECTION DIALOG...
- public static String RESID_SELECTCONNECTION_TITLE;
- public static String RESID_SELECTCONNECTION_VERBAGE;
-
- // -------------------------
- // WIZARD AND DIALOG STRINGS
- // -------------------------
- // NEW PROFILE WIZARD...
- public static String RESID_NEWPROFILE_TITLE;
- public static String RESID_NEWPROFILE_PAGE1_TITLE;
- public static String RESID_NEWPROFILE_PAGE1_DESCRIPTION;
- public static String RESID_NEWPROFILE_NAME_LABEL;
- public static String RESID_NEWPROFILE_NAME_TOOLTIP;
- public static String RESID_NEWPROFILE_MAKEACTIVE_LABEL;
- public static String RESID_NEWPROFILE_MAKEACTIVE_TOOLTIP;
- public static String RESID_NEWPROFILE_VERBAGE;
-
- // RENAME DEFAULT PROFILE WIZARD PAGE...
- public static String RESID_RENAMEDEFAULTPROFILE_PAGE1_TITLE;
-
- public static String RESID_RENAMEDEFAULTPROFILE_PAGE1_DESCRIPTION;
-
- public static String RESID_PROFILE_PROFILENAME_LABEL;
- public static String RESID_PROFILE_PROFILENAME_TIP;
- public static String RESID_PROFILE_PROFILENAME_VERBAGE;
-
-
- // COPY SYSTEM PROFILE DIALOG...
- public static String RESID_COPY_PROFILE_TITLE;
-
- public static String RESID_COPY_PROFILE_PROMPT_LABEL;
- public static String RESID_COPY_PROFILE_PROMPT_TOOLTIP;
-
- // NEW SYSTEM CONNECTION WIZARD...
- public static String RESID_NEWCONN_PROMPT_LABEL;
- public static String RESID_NEWCONN_PROMPT_TOOLTIP;
- public static String RESID_NEWCONN_PROMPT_VALUE;
- public static String RESID_NEWCONN_EXPANDABLEPROMPT_VALUE;
- public static String RESID_NEWCONN_TITLE;
- public static String RESID_NEWCONN_PAGE1_TITLE;
- public static String RESID_NEWCONN_PAGE1_REMOTE_TITLE;
- public static String RESID_NEWCONN_PAGE1_LOCAL_TITLE;
- public static String RESID_NEWCONN_PAGE1_DESCRIPTION;
- public static String RESID_NEWCONN_SUBSYSTEMPAGE_FILES_DESCRIPTION;
- public static String RESID_NEWCONN_SUBSYSTEMPAGE_FILES_TITLE;
- public static String RESID_NEWCONN_SUBSYSTEMPAGE_FILES_VERBAGE1;
- public static String RESID_NEWCONN_SUBSYSTEMPAGE_FILES_VERBAGE2;
- public static String RESID_NEWCONN_SUBSYSTEMPAGE_DESCRIPTION;
-
- public static String RESID_CONNECTION_TYPE_LABEL;
- public static String RESID_CONNECTION_TYPE_VALUE;
- public static String RESID_CONNECTION_SYSTEMTYPE_LABEL;
- public static String RESID_CONNECTION_SYSTEMTYPE_TIP;
- public static String RESID_CONNECTION_SYSTEMTYPE_READONLY_LABEL;
- public static String RESID_CONNECTION_SYSTEMTYPE_READONLY_TIP;
-
- public static String RESID_CONNECTION_CONNECTIONNAME_LABEL;
- public static String RESID_CONNECTION_CONNECTIONNAME_TIP;
-
- public static String RESID_CONNECTION_HOSTNAME_LABEL;
- public static String RESID_CONNECTION_HOSTNAME_TIP;
-
- public static String RESID_CONNECTION_HOSTNAME_READONLY_LABEL;
- public static String RESID_CONNECTION_HOSTNAME_READONLY_TIP;
-
- public static String RESID_CONNECTION_VERIFYHOSTNAME_LABEL;
- public static String RESID_CONNECTION_VERIFYHOSTNAME_TOOLTIP;
-
- public static String RESID_CONNECTION_USERID_LABEL;
- public static String RESID_CONNECTION_USERID_TIP;
-
- public static String RESID_CONNECTION_DEFAULTUSERID_LABEL;
- public static String RESID_CONNECTION_DEFAULTUSERID_TIP;
- public static String RESID_CONNECTION_DEFAULTUSERID_INHERITBUTTON_TIP;
-
- public static String RESID_CONNECTION_RUNNING_PORT_LABEL;
- public static String RESID_CONNECTION_RUNNING_PORT_TIP;
-
- public static String RESID_CONNECTION_PORT_LABEL;
- public static String RESID_CONNECTION_PORT_TIP;
-
- public static String RESID_CONNECTION_DAEMON_PORT_LABEL;
- public static String RESID_CONNECTION_DAEMON_PORT_TIP;
-
- public static String RESID_CONNECTION_DEFAULTPORT_LABEL;
- public static String RESID_CONNECTION_DEFAULTPORT_TIP;
-
- public static String RESID_CONNECTION_DESCRIPTION_LABEL;
- public static String RESID_CONNECTION_DESCRIPTION_TIP;
-
- public static String RESID_CONNECTION_PROFILE_LABEL;
- public static String RESID_CONNECTION_PROFILE_TIP;
-
- public static String RESID_CONNECTION_PROFILE_READONLY_TIP;
-
- // CHANGE SYSTEM CONNECTION DIALOG...
- public static String RESID_CHGCONN_TITLE;
-
- // SET DEFAULT USERID PER SYSTEM TYPE DIALOG...
- public static String RESID_USERID_PER_SYSTEMTYPE_TITLE;
- public static String RESID_USERID_PER_SYSTEMTYPE_SYSTEMTYPE_LABEL;
- public static String RESID_USERID_PER_SYSTEMTYPE_SYSTEMTYPE_TOOLTIP;
- public static String RESID_USERID_PER_SYSTEMTYPE_LABEL;
- public static String RESID_USERID_PER_SYSTEMTYPE_TOOLTIP;
-
-
-
- // NEW FILTER POOL WIZARD...
- public static String RESID_NEWFILTERPOOL_TITLE;
-
- public static String RESID_NEWFILTERPOOL_PAGE1_TITLE;
-
- public static String RESID_NEWFILTERPOOL_PAGE1_DESCRIPTION;
-
- // WIDGETS FOR THIS WIZARD...
- public static String RESID_FILTERPOOLNAME_LABEL;
- public static String RESID_FILTERPOOLNAME_TIP;
-
- public static String RESID_FILTERPOOLMANAGERNAME_LABEL;
- public static String RESID_FILTERPOOLMANAGERNAME_TIP;
-
- // SELECT FILTER POOLS DIALOG...
- public static String RESID_SELECTFILTERPOOLS_TITLE;
-
- public static String RESID_SELECTFILTERPOOLS_PROMPT;
-
- // WORK WITH FILTER POOLS DIALOG...
- public static String RESID_WORKWITHFILTERPOOLS_TITLE;
-
- public static String RESID_WORKWITHFILTERPOOLS_PROMPT;
-
- // NEW SYSTEM FILTER WIZARD...
- public static String RESID_NEWFILTER_TITLE;
-
- public static String RESID_NEWFILTER_PAGE_TITLE;
-
- // MAIN PAGE (page 1) OF NEW FILTER WIZARD...
- public static String RESID_NEWFILTER_PAGE1_DESCRIPTION;
-
- public static String RESID_NEWFILTER_POOLTIP;
-
- // NAME PAGE (page 2) OF NEW FILTER WIZARD...
- public static String RESID_NEWFILTER_PAGE2_DESCRIPTION;
-
- public static String RESID_NEWFILTER_PAGE2_NAME_VERBAGE;
-
- public static String RESID_NEWFILTER_PAGE2_POOL_VERBAGE;
-
- public static String RESID_NEWFILTER_PAGE2_POOL_VERBAGE_TIP;
-
- public static String RESID_NEWFILTER_PAGE2_PROFILE_VERBAGE;
-
- public static String RESID_NEWFILTER_PAGE2_NAME_LABEL;
- public static String RESID_NEWFILTER_PAGE2_NAME_TOOLTIP;
-
- public static String RESID_NEWFILTER_PAGE2_PROFILE_LABEL;
- public static String RESID_NEWFILTER_PAGE2_PROFILE_TOOLTIP;
-
- public static String RESID_NEWFILTER_PAGE2_POOL_LABEL;
- public static String RESID_NEWFILTER_PAGE2_POOL_TOOLTIP;
-
- public static String RESID_NEWFILTER_PAGE2_UNIQUE_LABEL;
- public static String RESID_NEWFILTER_PAGE2_UNIQUE_TOOLTIP;
-
- // INFO PAGE (page 3) OF NEW FILTER WIZARD...
- public static String RESID_NEWFILTER_PAGE3_DESCRIPTION;
- public static String RESID_NEWFILTER_PAGE3_STRINGS_VERBAGE;
- public static String RESID_NEWFILTER_PAGE3_POOLS_VERBAGE;
-
- public static String RESID_FILTERALIAS_LABEL;
- public static String RESID_FILTERALIAS_TIP;
- public static String RESID_FILTERPARENTPOOL_LABEL;
- public static String RESID_FILTERPARENTPOOL_TIP;
- public static String RESID_FILTERSTRINGS_LABEL;
- public static String RESID_FILTERSTRINGS_TIP;
-
-
- // CHANGE SYSTEM FILTER DIALOG...
- public static String RESID_CHGFILTER_TITLE;
- public static String RESID_CHGFILTER_LIST_NEWITEM;
- public static String RESID_CHGFILTER_NAME_LABEL;
- public static String RESID_CHGFILTER_NAME_TOOLTIP;
- public static String RESID_CHGFILTER_POOL_LABEL;
- public static String RESID_CHGFILTER_POOL_TOOLTIP;
- public static String RESID_CHGFILTER_LIST_LABEL;
- public static String RESID_CHGFILTER_LIST_TOOLTIP;
- public static String RESID_CHGFILTER_FILTERSTRING_LABEL;
- public static String RESID_CHGFILTER_FILTERSTRING_TOOLTIP;
- public static String RESID_CHGFILTER_NEWFILTERSTRING_LABEL;
- public static String RESID_CHGFILTER_NEWFILTERSTRING_TOOLTIP;
- public static String RESID_CHGFILTER_BUTTON_TEST_LABEL;
- public static String RESID_CHGFILTER_BUTTON_TEST_TOOLTIP;
- public static String RESID_CHGFILTER_BUTTON_APPLY_LABEL;
- public static String RESID_CHGFILTER_BUTTON_APPLY_TOOLTIP;
- public static String RESID_CHGFILTER_BUTTON_REVERT_LABEL;
- public static String RESID_CHGFILTER_BUTTON_REVERT_TOOLTIP;
- public static String RESID_CHGFILTER_BUTTON_CREATE_LABEL;
- public static String RESID_CHGFILTER_BUTTON_CREATE_TOOLTIP;
-
-
- // CREATE UNNAMED FILTER DIALOG...
- public static String RESID_CRTFILTER_TITLE;
-
- // RENAME SYSTEM FILTER DIALOG...
- public static String RESID_RENAME_FILTER_TITLE;
-
- public static String RESID_RENAME_FILTER_PROMPT;
-
- // COPY SYSTEM FILTER DIALOG...
- public static String RESID_COPY_FILTER_TITLE;
-
- public static String RESID_COPY_FILTER_PROMPT;
-
- // NEW SYSTEM FILTER STRING WIZARD...
- public static String RESID_NEWFILTERSTRING_TITLE;
- public static String RESID_NEWFILTERSTRING_ADD_TITLE;
- public static String RESID_NEWFILTERSTRING_PAGE1_TITLE;
- public static String RESID_NEWFILTERSTRING_PAGE1_DESCRIPTION;
-
- public static String RESID_NEWFILTERSTRING_PREFIX_LABEL;
- public static String RESID_NEWFILTERSTRING_PREFIX_TOOLTIP;
- public static String RESID_NEWFILTERSTRING_PREFIX_PROMPT;
-
- public static String RESID_FILTERSTRING_STRING_LABEL;
- public static String RESID_FILTERSTRING_STRING_TIP;
-
- // CHANGE FILTER STRING ACTION AND DIALOG...
- public static String RESID_CHGFILTERSTRING_PREFIX_LABEL;
- public static String RESID_CHGFILTERSTRING_PREFIX_TOOLTIP;
- public static String RESID_CHGFILTERSTRING_TITLE;
- public static String RESID_CHGFILTERSTRING_PREFIX_PROMPT;
-
- // TEST SYSTEM FILTER STRING DIALOG...
- public static String RESID_TESTFILTERSTRING_TITLE;
-
- public static String RESID_TESTFILTERSTRING_PROMPT_LABEL;
- public static String RESID_TESTFILTERSTRING_PROMPT_TOOLTIP;
-
- public static String RESID_TESTFILTERSTRING_TREE_TIP;
-
-
- // WORK WITH HISTORY DIALOG...
- public static String RESID_WORKWITHHISTORY_TITLE;
- public static String RESID_WORKWITHHISTORY_VERBAGE;
- public static String RESID_WORKWITHHISTORY_PROMPT;
- public static String RESID_WORKWITHHISTORY_BUTTON_LABEL;
- public static String RESID_WORKWITHHISTORY_BUTTON_TIP;
-
- // PROMPT FOR PASSWORD DIALOG...
- public static String RESID_PASSWORD_TITLE;
-
- public static String RESID_PASSWORD_LABEL;
- public static String RESID_PASSWORD_TIP;
-
- public static String RESID_PASSWORD_SYSTEMTYPE_LABEL;
- public static String RESID_PASSWORD_HOSTNAME_LABEL;
-
- public static String RESID_PASSWORD_USERID_LABEL;
- public static String RESID_PASSWORD_USERID_TIP;
-
- public static String RESID_PASSWORD_USERID_ISPERMANENT_LABEL;
- public static String RESID_PASSWORD_USERID_ISPERMANENT_TIP;
-
- public static String RESID_PASSWORD_SAVE_LABEL;
- public static String RESID_PASSWORD_SAVE_TOOLTIP;
-
- // CHANGE PASSWORD DIALOG
- public static String RESID_CHANGE_PASSWORD_TITLE;
- public static String RESID_CHANGE_PASSWORD_NEW_LABEL;
- public static String RESID_CHANGE_PASSWORD_NEW_TOOLTIP;
- public static String RESID_CHANGE_PASSWORD_CONFIRM_LABEL;
- public static String RESID_CHANGE_PASSWORD_CONFIRM_TOOLTIP;
-
- // TABLE VIEW DIALOGS
- public static String RESID_TABLE_POSITIONTO_LABEL;
- public static String RESID_TABLE_POSITIONTO_ENTRY_TOOLTIP;
-
- public static String RESID_TABLE_SUBSET_LABEL;
- public static String RESID_TABLE_SUBSET_ENTRY_TOOLTIP;
-
- public static String RESID_TABLE_PRINTLIST_TITLE;
-
- // TABLE view column selection
- public static String RESID_TABLE_SELECT_COLUMNS_LABEL;
- public static String RESID_TABLE_SELECT_COLUMNS_TOOLTIP;
-
- public static String RESID_TABLE_SELECT_COLUMNS_ADD_LABEL;
- public static String RESID_TABLE_SELECT_COLUMNS_ADD_TOOLTIP;
-
- public static String RESID_TABLE_SELECT_COLUMNS_REMOVE_LABEL;
- public static String RESID_TABLE_SELECT_COLUMNS_REMOVE_TOOLTIP;
-
- public static String RESID_TABLE_SELECT_COLUMNS_UP_LABEL;
- public static String RESID_TABLE_SELECT_COLUMNS_UP_TOOLTIP;
-
- public static String RESID_TABLE_SELECT_COLUMNS_DOWN_LABEL;
- public static String RESID_TABLE_SELECT_COLUMNS_DOWN_TOOLTIP;
-
- public static String RESID_TABLE_SELECT_COLUMNS_AVAILABLE_LABEL;
-
- public static String RESID_TABLE_SELECT_COLUMNS_DISPLAYED_LABEL;
- public static String RESID_TABLE_SELECT_COLUMNS_DESCRIPTION_LABEL;
-
- // MONITOR VIEW DIALGOS
- public static String RESID_MONITOR_POLL_INTERVAL_LABEL;
- public static String RESID_MONITOR_POLL_INTERVAL_TOOLTIP;
- public static String RESID_MONITOR_POLL_LABEL;
- public static String RESID_MONITOR_POLL_TOOLTIP;
- public static String RESID_MONITOR_POLL_CONFIGURE_POLLING_LABEL;
- public static String RESID_MONITOR_POLL_CONFIGURE_POLLING_EXPAND_TOOLTIP;
- public static String RESID_MONITOR_POLL_CONFIGURE_POLLING_COLLAPSE_TOOLTIP;
-
- // TEAM VIEW
- public static String RESID_TEAMVIEW_SUBSYSFACTORY_VALUE;
- public static String RESID_TEAMVIEW_USERACTION_VALUE;
- public static String RESID_TEAMVIEW_CATEGORY_VALUE;
-
- public static String RESID_TEAMVIEW_CATEGORY_CONNECTIONS_LABEL;
- public static String RESID_TEAMVIEW_CATEGORY_CONNECTIONS_TOOLTIP;
-
- public static String RESID_TEAMVIEW_CATEGORY_FILTERPOOLS_LABEL;
- public static String RESID_TEAMVIEW_CATEGORY_FILTERPOOLS_TOOLTIP;
-
- public static String RESID_TEAMVIEW_CATEGORY_USERACTIONS_LABEL;
- public static String RESID_TEAMVIEW_CATEGORY_USERACTIONS_TOOLTIP;
-
- public static String RESID_TEAMVIEW_CATEGORY_COMPILECMDS_LABEL;
- public static String RESID_TEAMVIEW_CATEGORY_COMPILECMDS_TOOLTIP;
-
- public static String RESID_TEAMVIEW_CATEGORY_TARGETS_LABEL;
- public static String RESID_TEAMVIEW_CATEGORY_TARGETS_TOOLTIP;
-
- // ------------------------------
- // REUSABLE WIDGET STRINGS...
- // ------------------------------
- // SELECT MULTIPLE REMOTE FILES WIDGET...
- public static String RESID_SELECTFILES_SELECTTYPES_BUTTON_ROOT_LABEL;
- public static String RESID_SELECTFILES_SELECTTYPES_BUTTON_ROOT_TOOLTIP;
-
- public static String RESID_SELECTFILES_SELECTALL_BUTTON_ROOT_LABEL;
- public static String RESID_SELECTFILES_SELECTALL_BUTTON_ROOT_TOOLTIP;
-
- public static String RESID_SELECTFILES_DESELECTALL_BUTTON_ROOT_LABEL;
- public static String RESID_SELECTFILES_DESELECTALL_BUTTON_ROOT_TOOLTIP;
-
-
- // ------------------------------
- // PROPERTY PAGE STRINGS...
- // ------------------------------
- // SYSTEMREGISTRY PROPERTIES PAGE...
- public static String RESID_SYSTEMREGISTRY_TEXT;
-
- public static String RESID_SYSTEMREGISTRY_CONNECTIONS;
-
- // SUBSYSTEM PROPERTIES PAGE...
- public static String RESID_SUBSYSTEM_TITLE;
- public static String RESID_SUBSYSTEM_TYPE_LABEL;
- public static String RESID_SUBSYSTEM_TYPE_VALUE;
- public static String RESID_SUBSYSTEM_VENDOR_LABEL;
- public static String RESID_SUBSYSTEM_NAME_LABEL;
- public static String RESID_SUBSYSTEM_CONNECTION_LABEL;
- public static String RESID_SUBSYSTEM_PROFILE_LABEL;
-
- public static String RESID_SUBSYSTEM_PORT_LABEL;
- public static String RESID_SUBSYSTEM_PORT_TIP;
- public static String RESID_SUBSYSTEM_PORT_INHERITBUTTON_TIP;
- public static String RESID_SUBSYSTEM_PORT_INHERITBUTTON_INHERIT_TIP;
- public static String RESID_SUBSYSTEM_PORT_INHERITBUTTON_LOCAL_TIP;
-
- public static String RESID_SUBSYSTEM_USERID_LABEL;
- public static String RESID_SUBSYSTEM_USERID_TIP;
-
- public static String RESID_SUBSYSTEM_USERID_INHERITBUTTON_TIP;
- public static String RESID_SUBSYSTEM_USERID_INHERITBUTTON_INHERIT_TIP;
- public static String RESID_SUBSYSTEM_USERID_INHERITBUTTON_LOCAL_TIP;
-
- public static String RESID_SUBSYSTEM_SSL_LABEL;
- public static String RESID_SUBSYSTEM_SSL_TIP;
-
- public static String RESID_SUBSYSTEM_AUTODETECT_LABEL;
- public static String RESID_SUBSYSTEM_AUTODETECT_TIP;
-
- public static String RESID_SUBSYSTEM_SSL_ALERT_LABEL;
- public static String RESID_SUBSYSTEM_SSL_ALERT_TIP;
-
- public static String RESID_SUBSYSTEM_NONSSL_ALERT_LABEL;
- public static String RESID_SUBSYSTEM_NONSSL_ALERT_TIP;
-
- public static String RESID_SUBSYSTEM_ENVVAR_TITLE;
- public static String RESID_SUBSYSTEM_ENVVAR_DESCRIPTION;
- public static String RESID_SUBSYSTEM_ENVVAR_TOOLTIP;
-
- public static String RESID_SUBSYSTEM_ENVVAR_NAME_TITLE;
- public static String RESID_SUBSYSTEM_ENVVAR_NAME_LABEL;
- public static String RESID_SUBSYSTEM_ENVVAR_NAME_TOOLTIP;
-
- public static String RESID_SUBSYSTEM_ENVVAR_VALUE_TITLE;
- public static String RESID_SUBSYSTEM_ENVVAR_VALUE_LABEL;
- public static String RESID_SUBSYSTEM_ENVVAR_VALUE_TOOLTIP;
-
- public static String RESID_SUBSYSTEM_ENVVAR_ADD_TOOLTIP;
- public static String RESID_SUBSYSTEM_ENVVAR_REMOVE_TOOLTIP;
- public static String RESID_SUBSYSTEM_ENVVAR_CHANGE_TOOLTIP;
-
- public static String RESID_SUBSYSTEM_ENVVAR_MOVEUP_LABEL;
- public static String RESID_SUBSYSTEM_ENVVAR_MOVEUP_TOOLTIP;
- public static String RESID_SUBSYSTEM_ENVVAR_MOVEDOWN_LABEL;
- public static String RESID_SUBSYSTEM_ENVVAR_MOVEDOWN_TOOLTIP;
-
- public static String RESID_SUBSYSTEM_ENVVAR_ADD_TITLE;
- public static String RESID_SUBSYSTEM_ENVVAR_CHANGE_TITLE;
-
- // COMMON PROPERTIES PAGE UI...
- public static String RESID_PP_PROPERTIES_TYPE_LABEL;
- public static String RESID_PP_PROPERTIES_TYPE_TOOLTIP;
-
- // FILTER POOL PROPERTIES PAGE...
- public static String RESID_FILTERPOOL_TITLE;
- public static String RESID_FILTERPOOL_TYPE_VALUE;
-
- public static String RESID_FILTERPOOL_NAME_LABEL;
- public static String RESID_FILTERPOOL_NAME_TOOLTIP;
-
- public static String RESID_FILTERPOOL_PROFILE_LABEL;
- public static String RESID_FILTERPOOL_PROFILE_TOOLTIP;
-
- public static String RESID_FILTERPOOL_REFERENCECOUNT_LABEL;
- public static String RESID_FILTERPOOL_REFERENCECOUNT_TOOLTIP;
-
- public static String RESID_FILTERPOOL_RELATEDCONNECTION_LABEL;
- public static String RESID_FILTERPOOL_RELATEDCONNECTION_TOOLTIP;
-
- // FILTER POOL REFERENCE PROPERTIES PAGE...
- public static String RESID_FILTERPOOLREF_TITLE;
- public static String RESID_FILTERPOOLREF_TYPE_VALUE;
-
- public static String RESID_FILTERPOOLREF_NAME_LABEL;
- public static String RESID_FILTERPOOLREF_NAME_TOOLTIP;
-
- public static String RESID_FILTERPOOLREF_SUBSYSTEM_LABEL;
- public static String RESID_FILTERPOOLREF_SUBSYSTEM_TOOLTIP;
-
- public static String RESID_FILTERPOOLREF_CONNECTION_LABEL;
- public static String RESID_FILTERPOOLREF_CONNECTION_TOOLTIP;
-
- public static String RESID_FILTERPOOLREF_PROFILE_LABEL;
- public static String RESID_FILTERPOOLREF_PROFILE_TOOLTIP;
-
- // FILTER PROPERTIES PAGE...
- public static String RESID_PP_FILTER_TITLE_LABEL;
- public static String RESID_PP_FILTER_TYPE_VALUE;
-
- public static String RESID_PP_FILTER_TYPE_PROMPTABLE_VALUE;
- public static String RESID_PP_FILTER_TYPE_PROMPTABLE_TOOLTIP;
-
- public static String RESID_PP_FILTER_NAME_LABEL;
- public static String RESID_PP_FILTER_NAME_TOOLTIP;
-
- public static String RESID_PP_FILTER_STRINGCOUNT_LABEL;
- public static String RESID_PP_FILTER_STRINGCOUNT_TOOLTIP;
-
- public static String RESID_PP_FILTER_FILTERPOOL_LABEL;
- public static String RESID_PP_FILTER_FILTERPOOL_TOOLTIP;
-
- public static String RESID_PP_FILTER_PROFILE_LABEL;
- public static String RESID_PP_FILTER_PROFILE_TOOLTIP;
-
- public static String RESID_PP_FILTER_ISCONNECTIONPRIVATE_LABEL;
- public static String RESID_PP_FILTER_ISCONNECTIONPRIVATE_TOOLTIP;
-
- // FILTER STRING PROPERTIES PAGE...
- public static String RESID_PP_FILTERSTRING_TITLE;
- public static String RESID_PP_FILTERSTRING_TYPE_VALUE;
-
- public static String RESID_PP_FILTERSTRING_STRING_LABEL;
- public static String RESID_PP_FILTERSTRING_STRING_TOOLTIP;
-
- public static String RESID_PP_FILTERSTRING_FILTER_LABEL;
- public static String RESID_PP_FILTERSTRING_FILTER_TOOLTIP;
-
- public static String RESID_PP_FILTERSTRING_FILTERPOOL_LABEL;
- public static String RESID_PP_FILTERSTRING_FILTERPOOL_TOOLTIP;
-
-
- public static String RESID_PP_FILTERSTRING_PROFILE_LABEL;
- public static String RESID_PP_FILTERSTRING_PROFILE_TOOLTIP;
-
- // SUBSYSTEM FACTORY PROPERTIES PAGE...
- public static String RESID_PP_SUBSYSFACTORY_TITLE;
- public static String RESID_PP_SUBSYSFACTORY_ID_LABEL;
- public static String RESID_PP_SUBSYSFACTORY_ID_TOOLTIP;
-
- public static String RESID_PP_SUBSYSFACTORY_VENDOR_LABEL;
- public static String RESID_PP_SUBSYSFACTORY_VENDOR_TOOLTIP;
-
- public static String RESID_PP_SUBSYSFACTORY_TYPES_LABEL;
- public static String RESID_PP_SUBSYSFACTORY_TYPES_TOOLTIP;
-
- public static String RESID_PP_SUBSYSFACTORY_VERBAGE;
-
- // REMOTE SERVER LAUNCH PROPERTIES PAGE...
- public static String RESID_PROP_SERVERLAUNCHER_MEANS;
- public static String RESID_PROP_SERVERLAUNCHER_MEANS_LABEL;
- public static String RESID_PROP_SERVERLAUNCHER_RADIO_DAEMON;
- public static String RESID_PROP_SERVERLAUNCHER_RADIO_REXEC;
- public static String RESID_PROP_SERVERLAUNCHER_RADIO_NONE;
- public static String RESID_PROP_SERVERLAUNCHER_RADIO_DAEMON_TOOLTIP;
- public static String RESID_PROP_SERVERLAUNCHER_RADIO_REXEC_TOOLTIP;
- public static String RESID_PROP_SERVERLAUNCHER_RADIO_NONE_TOOLTIP;
- public static String RESID_PROP_SERVERLAUNCHER_PATH;
- public static String RESID_PROP_SERVERLAUNCHER_PATH_TOOLTIP;
- public static String RESID_PROP_SERVERLAUNCHER_INVOCATION;
- public static String RESID_PROP_SERVERLAUNCHER_INVOCATION_TOOLTIP;
-
-
-
-
- // ---------------------------
- // RE-USABLE WIDGET STRINGS...
- // ---------------------------
-
- // WIDGETS IN SYSTEMCONNECTIONCOMBO.JAVA
- public static String WIDGET_CONNECTION_LABEL;
- public static String WIDGET_CONNECTION_TOOLTIP;
- public static String WIDGET_CONNECTION_NAME;
-
- public static String WIDGET_BUTTON_NEWCONNECTION_LABEL;
- public static String WIDGET_BUTTON_NEWCONNECTION_TOOLTIP;
-
- // -------------------------
- // PREFERENCES...
- // -------------------------
- public static String RESID_PREF_ROOT_PAGE;
- public static String RESID_PREF_ROOT_TITLE;
-
- public static String RESID_PREF_SYSTYPE_COLHDG_NAME;
- public static String RESID_PREF_SYSTYPE_COLHDG_ENABLED;
- public static String RESID_PREF_SYSTYPE_COLHDG_DESC;
- public static String RESID_PREF_SYSTYPE_COLHDG_USERID;
-
- //
- // Signon Information Preferences Page
- //
- public static String RESID_PREF_SIGNON_DESCRIPTION;
-
- public static String RESID_PREF_SIGNON_HOSTNAME_TITLE;
- public static String RESID_PREF_SIGNON_HOSTNAME_LABEL;
- public static String RESID_PREF_SIGNON_HOSTNAME_TOOLTIP;
-
- public static String RESID_PREF_SIGNON_SYSTYPE_TITLE;
- public static String RESID_PREF_SIGNON_SYSTYPE_LABEL;
- public static String RESID_PREF_SIGNON_SYSTYPE_TOOLTIP;
-
- public static String RESID_PREF_SIGNON_USERID_TITLE;
- public static String RESID_PREF_SIGNON_USERID_LABEL;
- public static String RESID_PREF_SIGNON_USERID_TOOLTIP;
-
- public static String RESID_PREF_SIGNON_PASSWORD_LABEL;
- public static String RESID_PREF_SIGNON_PASSWORD_TOOLTIP;
-
- public static String RESID_PREF_SIGNON_PASSWORD_VERIFY_LABEL;
- public static String RESID_PREF_SIGNON_PASSWORD_VERIFY_TOOLTIP;
-
- public static String RESID_PREF_SIGNON_ADD_LABEL;
- public static String RESID_PREF_SIGNON_ADD_TOOLTIP;
-
- public static String RESID_PREF_SIGNON_REMOVE_LABEL;
- public static String RESID_PREF_SIGNON_REMOVE_TOOLTIP;
-
- public static String RESID_PREF_SIGNON_CHANGE_LABEL;
- public static String RESID_PREF_SIGNON_CHANGE_TOOLTIP;
-
- public static String RESID_PREF_SIGNON_ADD_DIALOG_TITLE;
-
- public static String RESID_PREF_SIGNON_CHANGE_DIALOG_TITLE;
-
- // Unable to load message
- public static String RESID_MSG_UNABLETOLOAD;
-
- // Default filter pool name
- public static String RESID_DEFAULT_FILTERPOOL;
-
- public static String RESID_PERCONNECTION_FILTERPOOL;
-
- // RSE Communication Perferences
- public static String RESID_PREF_COMMUNICATIONS_TITLE;
- public static String RESID_PREF_DAEMON_PORT_LABEL;
- public static String RESID_PREF_DAEMON_PORT_TOOLTIP;
- public static String RESID_PREF_DAEMON_AUTOSTART_LABEL;
- public static String RESID_PREF_DAEMON_AUTOSTART_TOOLTIP;
-
- public static String RESID_PREF_IP_ADDRESS_LABEL;
- public static String RESID_PREF_IP_AUTO_LABEL;
- public static String RESID_PREF_IP_AUTO_TOOLTIP;
- public static String RESID_PREF_IP_MANUAL_LABEL;
- public static String RESID_PREF_IP_MANUAL_TOOLTIP;
- public static String RESID_PREF_IP_MANUAL_ENTER_LABEL;
- public static String RESID_PREF_IP_MANUAL_ENTER_TOOLTIP;
-
- // Offline constants (yantzi:3.0)
- public static String RESID_OFFLINE_LABEL;
- public static String RESID_OFFLINE_WORKOFFLINE_LABEL;
- public static String RESID_OFFLINE_WORKOFFLINE_TOOLTIP;
- public static String RESID_OFFLINE_WORKOFFLINE_DESCRIPTION;
-
- // -------------------------------------------
- // remote search view constants
- // -------------------------------------------
-
- // Search view constants
- public static String RESID_SEARCH_VIEW_DEFAULT_TITLE;
-
- // Remove selected matches action
- public static String RESID_SEARCH_REMOVE_SELECTED_MATCHES_LABEL;
- public static String RESID_SEARCH_REMOVE_SELECTED_MATCHES_TOOLTIP;
-
- // Remove all matches action
- public static String RESID_SEARCH_REMOVE_ALL_MATCHES_LABEL;
- public static String RESID_SEARCH_REMOVE_ALL_MATCHES_TOOLTIP;
-
- // Clear history action
- public static String RESID_SEARCH_CLEAR_HISTORY_LABEL;
- public static String RESID_SEARCH_CLEAR_HISTORY_TOOLTIP;
-
- /** ******************************************* */
- /* Generated Vars */
- /** ******************************************* */
- public static String RESID_PREF_SYSTEMTYPE_PREFIX_LABEL;
- public static String RESID_PREF_SYSTEMTYPE_PREFIX_TOOLTIP;
-
- public static String RESID_PREF_USERID_PREFIX_LABEL;
- public static String RESID_PREF_USERID_PREFIX_TOOLTIP;
-
- public static String RESID_PREF_USERID_PERTYPE_PREFIX_LABEL;
- public static String RESID_PREF_USERID_PERTYPE_PREFIX_TOOLTIP;
-
- public static String RESID_PREF_SHOWFILTERPOOLS_PREFIX_LABEL;
- public static String RESID_PREF_SHOWFILTERPOOLS_PREFIX_TOOLTIP;
-
- public static String RESID_PREF_SHOWNEWCONNECTIONPROMPT_PREFIX_LABEL;
- public static String RESID_PREF_SHOWNEWCONNECTIONPROMPT_PREFIX_TOOLTIP;
-
- public static String RESID_PREF_QUALIFYCONNECTIONNAMES_PREFIX_LABEL;
- public static String RESID_PREF_QUALIFYCONNECTIONNAMES_PREFIX_TOOLTIP;
-
- public static String RESID_PREF_REMEMBERSTATE_PREFIX_LABEL;
- public static String RESID_PREF_REMEMBERSTATE_PREFIX_TOOLTIP;
-
- public static String RESID_PREF_USEDEFERREDQUERIES_PREFIX_LABEL;
- public static String RESID_PREF_USEDEFERREDQUERIES_PREFIX_TOOLTIP;
-
- public static String RESID_PREF_RESTOREFROMCACHE_PREFIX_LABEL;
- public static String RESID_PREF_RESTOREFROMCACHE_PREFIX_TOOLTIP;
-
-
-
- //
- // Actions
- //
- // Browse with menu item
- public static String ACTION_CASCADING_BROWSEWITH_LABEL;
- public static String ACTION_CASCADING_BROWSEWITH_TOOLTIP;
-
- // Compare with menu item
- public static String ACTION_CASCADING_COMPAREWITH_LABEL;
- public static String ACTION_CASCADING_COMPAREWITH_TOOLTIP;
-
-
- // Replace with menu item
- public static String ACTION_CASCADING_REPLACEWITH_LABEL;
- public static String ACTION_CASCADING_REPLACEWITH_TOOLTIP;
-
- public static String ACTION_RENAME_LABEL;
- public static String ACTION_RENAME_TOOLTIP;
-
- public static String ACTION_IMPORT_TO_PROJECT_LABEL;
- public static String ACTION_IMPORT_TO_PROJECT_TOOLTIP;
-
- public static String ACTION_EXPORT_FROM_PROJECT_LABEL;
- public static String ACTION_EXPORT_FROM_PROJECT_TOOLTIP;
-
- public static String ACTION_NEWFILE_LABEL;
- public static String ACTION_NEWFILE_TOOLTIP;
-
- public static String ACTION_DAEMON_START_LABEL;
- public static String ACTION_DAEMON_START_TOOLTIP;
-
- public static String ACTION_DAEMON_STOP_LABEL;
- public static String ACTION_DAEMON_STOP_TOOLTIP;
-
- public static String ACTION_CASCADING_NEW_LABEL;
- public static String ACTION_CASCADING_NEW_TOOLTIP;
-
- public static String ACTION_CASCADING_GOTO_LABEL;
- public static String ACTION_CASCADING_GOTO_TOOLTIP;
-
- public static String ACTION_CASCADING_GOINTO_LABEL;
- public static String ACTION_CASCADING_GOINTO_TOOLTIP;
-
- public static String ACTION_CASCADING_OPEN_LABEL;
- public static String ACTION_CASCADING_OPEN_TOOLTIP;
-
- public static String ACTION_CASCADING_OPENWITH_LABEL;
- public static String ACTION_CASCADING_OPENWITH_TOOLTIP;
-
- public static String ACTION_CASCADING_WORKWITH_LABEL;
- public static String ACTION_CASCADING_WORKWITH_TOOLTIP;
-
- public static String ACTION_CASCADING_REMOTESERVERS_LABEL;
- public static String ACTION_CASCADING_REMOTESERVERS_TOOLTIP;
-
- public static String ACTION_REMOTESERVER_START_LABEL;
- public static String ACTION_REMOTESERVER_START_TOOLTIP;
-
- public static String ACTION_REMOTESERVER_STOP_LABEL;
- public static String ACTION_REMOTESERVER_STOP_TOOLTIP;
-
- public static String ACTION_CASCADING_EXPAND_LABEL;
- public static String ACTION_CASCADING_EXPAND_TOOLTIP;
-
- public static String ACTION_CASCADING_EXPAND_TO_LABEL;
- public static String ACTION_CASCADING_EXPAND_TO_TOOLTIP;
-
- public static String ACTION_CASCADING_EXPAND_ALL_LABEL;
- public static String ACTION_CASCADING_EXPAND_ALL_TOOLTIP;
-
- public static String ACTION_CASCADING_EXPAND_BY_LABEL;
- public static String ACTION_CASCADING_EXPAND_BY_TOOLTIP;
-
- public static String ACTION_CASCADING_EXPAND_WORKWITH_LABEL;
- public static String ACTION_CASCADING_EXPAND_WORKWITH_TOOLTIP;
-
- public static String ACTION_CASCADING_VIEW_LABEL;
- public static String ACTION_CASCADING_VIEW_TOOLTIP;
-
- public static String ACTION_CASCADING_USERID_LABEL;
- public static String ACTION_CASCADING_USERID_TOOLTIP;
-
- public static String ACTION_CASCADING_PREFERENCES_LABEL;
- public static String ACTION_CASCADING_PREFERENCES_TOOLTIP;
-
- public static String ACTION_CASCADING_TEAM_LABEL;
- public static String ACTION_CASCADING_TEAM_TOOLTIP;
-
- public static String ACTION_TEAM_SYNC_LABEL;
- public static String ACTION_TEAM_SYNC_TOOLTIP;
-
- public static String ACTION_CASCADING_PULLDOWN_LABEL;
- public static String ACTION_CASCADING_PULLDOWN_TOOLTIP;
-
- public static String ACTION_CASCADING_FILTERPOOL_NEWREFERENCE_LABEL;
- public static String ACTION_CASCADING_FILTERPOOL_NEWREFERENCE_TOOLTIP;
-
- public static String ACTION_TEAM_RELOAD_LABEL;
- public static String ACTION_TEAM_RELOAD_TOOLTIP;
-
- public static String ACTION_PROFILE_ACTIVATE_LABEL;
- public static String ACTION_PROFILE_ACTIVATE_TOOLTIP;
-
- public static String ACTION_PROFILE_MAKEACTIVE_LABEL;
- public static String ACTION_PROFILE_MAKEACTIVE_TOOLTIP;
-
- public static String ACTION_PROFILE_MAKEINACTIVE_LABEL;
- public static String ACTION_PROFILE_MAKEINACTIVE_TOOLTIP;
-
- public static String ACTION_PROFILE_COPY_LABEL;
- public static String ACTION_PROFILE_COPY_TOOLTIP;
-
- public static String ACTION_NEWPROFILE_LABEL;
- public static String ACTION_NEWPROFILE_TOOLTIP;
-
- public static String ACTION_NEW_PROFILE_LABEL;
- public static String ACTION_NEW_PROFILE_TOOLTIP;
-
- public static String ACTION_QUALIFY_CONNECTION_NAMES_LABEL;
- public static String ACTION_QUALIFY_CONNECTION_NAMES_TOOLTIP;
-
- public static String ACTION_RESTORE_STATE_PREFERENCE_LABEL;
- public static String ACTION_RESTORE_STATE_PREFERENCE_TOOLTIP;
-
- public static String ACTION_PREFERENCE_SHOW_FILTERPOOLS_LABEL;
- public static String ACTION_PREFERENCE_SHOW_FILTERPOOLS_TOOLTIP;
-
- public static String ACTION_NEWCONN_LABEL;
- public static String ACTION_NEWCONN_TOOLTIP;
-
- public static String ACTION_ANOTHERCONN_LABEL;
- public static String ACTION_ANOTHERCONN_TOOLTIP;
-
- public static String ACTION_UPDATECONN_LABEL;
- public static String ACTION_UPDATECONN_TOOLTIP;
-
- public static String ACTION_NEWFILTERSTRING_LABEL;
- public static String ACTION_NEWFILTERSTRING_TOOLTIP;
-
- public static String ACTION_ADDFILTERSTRING_LABEL;
- public static String ACTION_ADDFILTERSTRING_TOOLTIP;
-
- public static String ACTION_UPDATEFILTERSTRING_LABEL;
- public static String ACTION_UPDATEFILTERSTRING_TOOLTIP;
-
- public static String ACTION_TESTFILTERSTRING_LABEL;
- public static String ACTION_TESTFILTERSTRING_TOOLTIP;
-
- public static String ACTION_NEWFILTER_LABEL;
- public static String ACTION_NEWFILTER_TOOLTIP;
-
- public static String ACTION_NEWNESTEDFILTER_LABEL;
- public static String ACTION_NEWNESTEDFILTER_TOOLTIP;
-
- public static String ACTION_UPDATEFILTER_LABEL;
- public static String ACTION_UPDATEFILTER_TOOLTIP;
-
- public static String ACTION_NEWFILTERPOOL_LABEL;
- public static String ACTION_NEWFILTERPOOL_TOOLTIP;
-
- public static String ACTION_ADDFILTERPOOLREF_LABEL;
- public static String ACTION_ADDFILTERPOOLREF_TOOLTIP;
-
- public static String ACTION_RMVFILTERPOOLREF_LABEL;
- public static String ACTION_RMVFILTERPOOLREF_TOOLTIP;
-
- public static String ACTION_SELECTFILTERPOOLS_LABEL;
- public static String ACTION_SELECTFILTERPOOLS_TOOLTIP;
-
- public static String ACTION_WORKWITH_FILTERPOOLS_LABEL;
- public static String ACTION_WORKWITH_FILTERPOOLS_TOOLTIP;
-
- public static String ACTION_WORKWITH_WWFILTERPOOLS_LABEL;
- public static String ACTION_WORKWITH_WWFILTERPOOLS_TOOLTIP;
-
- public static String ACTION_WORKWITH_PROFILES_LABEL;
- public static String ACTION_WORKWITH_PROFILES_TOOLTIP;
-
- public static String ACTION_RUN_LABEL;
- public static String ACTION_RUN_TOOLTIP;
-
- public static String ACTION_SIMPLERENAME_LABEL;
- public static String ACTION_SIMPLERENAME_TOOLTIP;
-
- public static String ACTION_REFRESH_ALL_LABEL;
- public static String ACTION_REFRESH_ALL_TOOLTIP;
-
- public static String ACTION_REFRESH_LABEL;
- public static String ACTION_REFRESH_TOOLTIP;
-
-
- public static String ACTION_DELETE_LABEL;
- public static String ACTION_DELETE_TOOLTIP;
-
- public static String ACTION_CLEAR_LABEL;
- public static String ACTION_CLEAR_TOOLTIP;
-
- public static String ACTION_CLEAR_ALL_LABEL;
- public static String ACTION_CLEAR_ALL_TOOLTIP;
-
- public static String ACTION_CLEAR_SELECTED_LABEL;
- public static String ACTION_CLEAR_SELECTED_TOOLTIP;
-
- public static String ACTION_MOVEUP_LABEL;
- public static String ACTION_MOVEUP_TOOLTIP;
-
- public static String ACTION_MOVEDOWN_LABEL;
- public static String ACTION_MOVEDOWN_TOOLTIP;
-
- public static String ACTION_CONNECT_LABEL;
- public static String ACTION_CONNECT_TOOLTIP;
-
- public static String ACTION_CLEARPASSWORD_LABEL;
- public static String ACTION_CLEARPASSWORD_TOOLTIP;
-
- public static String ACTION_DISCONNECT_LABEL;
- public static String ACTION_DISCONNECT_TOOLTIP;
-
- public static String ACTION_DISCONNECTALLSUBSYSTEMS_LABEL;
- public static String ACTION_DISCONNECTALLSUBSYSTEMS_TOOLTIP;
-
- public static String ACTION_CONNECT_ALL_LABEL;
- public static String ACTION_CONNECT_ALL_TOOLTIP;
-
- public static String ACTION_CLEARPASSWORD_ALL_LABEL;
- public static String ACTION_CLEARPASSWORD_ALL_TOOLTIP;
-
- public static String ACTION_SET_LABEL;
- public static String ACTION_SET_TOOLTIP;
-
- public static String ACTION_HISTORY_DELETE_LABEL;
- public static String ACTION_HISTORY_DELETE_TOOLTIP;
-
- public static String ACTION_HISTORY_CLEAR_LABEL;
- public static String ACTION_HISTORY_CLEAR_TOOLTIP;
-
- public static String ACTION_HISTORY_MOVEUP_LABEL;
- public static String ACTION_HISTORY_MOVEUP_TOOLTIP;
-
- public static String ACTION_HISTORY_MOVEDOWN_LABEL;
- public static String ACTION_HISTORY_MOVEDOWN_TOOLTIP;
-
- public static String ACTION_HISTORY_MOVEFORWARD_LABEL;
- public static String ACTION_HISTORY_MOVEFORWARD_TOOLTIP;
-
- public static String ACTION_HISTORY_MOVEBACKWARD_LABEL;
- public static String ACTION_HISTORY_MOVEBACKWARD_TOOLTIP;
-
-
- public static String ACTION_CONTENT_ASSIST;
- public static String ACTION_SHOW_TOOLTIP_INFORMATION;
-
-
- public static String ACTION_COPY_LABEL;
- public static String ACTION_COPY_TOOLTIP;
-
- public static String ACTION_CUT_LABEL;
- public static String ACTION_CUT_TOOLTIP;
-
- public static String ACTION_UNDO_LABEL;
- public static String ACTION_UNDO_TOOLTIP;
-
- public static String ACTION_PASTE_LABEL;
- public static String ACTION_PASTE_TOOLTIP;
-
- public static String ACTION_COPY_CONNECTION_LABEL;
- public static String ACTION_COPY_CONNECTION_TOOLTIP;
-
- public static String ACTION_COPY_FILTERPOOL_LABEL;
- public static String ACTION_COPY_FILTERPOOL_TOOLTIP;
-
- public static String ACTION_COPY_FILTER_LABEL;
- public static String ACTION_COPY_FILTER_TOOLTIP;
-
- public static String ACTION_COPY_FILTERSTRING_LABEL;
- public static String ACTION_COPY_FILTERSTRING_TOOLTIP;
-
- public static String ACTION_MOVE_LABEL;
- public static String ACTION_MOVE_TOOLTIP;
-
- public static String ACTION_MOVE_CONNECTION_LABEL;
- public static String ACTION_MOVE_CONNECTION_TOOLTIP;
-
- public static String ACTION_MOVE_FILTERPOOL_LABEL;
- public static String ACTION_MOVE_FILTERPOOL_TOOLTIP;
-
- public static String ACTION_MOVE_FILTER_LABEL;
- public static String ACTION_MOVE_FILTER_TOOLTIP;
-
- public static String ACTION_MOVE_FILTERSTRING_LABEL;
- public static String ACTION_MOVE_FILTERSTRING_TOOLTIP;
-
- public static String ACTION_TEAM_BROWSEHISTORY_LABEL;
- public static String ACTION_TEAM_BROWSEHISTORY_TOOLTIP;
-
- public static String ACTION_TABLE_LABEL;
- public static String ACTION_TABLE_TOOLTIP;
-
- public static String ACTION_MONITOR_LABEL;
- public static String ACTION_MONITOR_TOOLTIP;
-
- public static String ACTION_ERROR_LIST_LABEL;
- public static String ACTION_ERROR_LIST_TOOLTIP;
-
- public static String ACTION_FIND_FILES_LABEL;
- public static String ACTION_FIND_FILES_TOOLTIP;
-
- public static String ACTION_SEARCH_LABEL;
- public static String ACTION_SEARCH_TOOLTIP;
-
- public static String ACTION_CANCEL_FIND_FILES_LABEL;
- public static String ACTION_CANCEL_FIND_FILES_TOOLTIP;
-
- public static String ACTION_CANCEL_SEARCH_LABEL;
- public static String ACTION_CANCEL_SEARCH_TOOLTIP;
-
- public static String ACTION_LOCK_LABEL;
- public static String ACTION_LOCK_TOOLTIP;
-
- public static String ACTION_UNLOCK_LABEL;
- public static String ACTION_UNLOCK_TOOLTIP;
-
-
- public static String ACTION_POSITIONTO_LABEL;
- public static String ACTION_POSITIONTO_TOOLTIP;
-
- public static String ACTION_SUBSET_LABEL;
- public static String ACTION_SUBSET_TOOLTIP;
-
- public static String ACTION_PRINTLIST_LABEL;
- public static String ACTION_PRINTLIST_TOOLTIP;
-
- public static String ACTION_SELECTCOLUMNS_LABEL;
- public static String ACTION_SELECTCOLUMNS_TOOLTIP;
-
- public static String ACTION_OPENEXPLORER_CASCADE_LABEL;
- public static String ACTION_OPENEXPLORER_CASCADE_TOOLTIP;
-
- public static String ACTION_OPENEXPLORER_SAMEPERSP_LABEL;
- public static String ACTION_OPENEXPLORER_SAMEPERSP_TOOLTIP;
-
- public static String ACTION_OPENEXPLORER_DIFFPERSP_LABEL;
- public static String ACTION_OPENEXPLORER_DIFFPERSP_TOOLTIP;
-
- public static String ACTION_OPENEXPLORER_DIFFPERSP2_LABEL;
- public static String ACTION_OPENEXPLORER_DIFFPERSP2_TOOLTIP;
-
- public static String ACTION_REMOTE_PROPERTIES_LABEL;
- public static String ACTION_REMOTE_PROPERTIES_TOOLTIP;
-
- public static String ACTION_VIEWFORM_REFRESH_LABEL;
- public static String ACTION_VIEWFORM_REFRESH_TOOLTIP;
-
- public static String ACTION_VIEWFORM_GETLIST_LABEL;
- public static String ACTION_VIEWFORM_GETLIST_TOOLTIP;
-
- public static String ACTION_COMMANDSVIEW_SAVEASFILTER_LABEL;
- public static String ACTION_COMMANDSVIEW_SAVEASFILTER_TOOLTIP;
-
- public static String ACTION_EXPAND_SELECTED_LABEL;
- public static String ACTION_EXPAND_SELECTED_TOOLTIP;
-
- public static String ACTION_COLLAPSE_SELECTED_LABEL;
- public static String ACTION_COLLAPSE_SELECTED_TOOLTIP;
-
- public static String ACTION_COLLAPSE_ALL_LABEL;
- public static String ACTION_COLLAPSE_ALL_TOOLTIP;
-
- public static String ACTION_EXPAND_BY_LABEL;
- public static String ACTION_EXPAND_BY_TOOLTIP;
-
- public static String ACTION_EXPAND_ALL_LABEL;
- public static String ACTION_EXPAND_ALL_TOOLTIP;
-
- public static String ACTION_EXPAND_OTHER_LABEL;
- public static String ACTION_EXPAND_OTHER_TOOLTIP;
-
- public static String ACTION_SELECT_ALL_LABEL;
- public static String ACTION_SELECT_ALL_TOOLTIP;
-
- public static String ACTION_SELECT_INPUT_LABEL;
- public static String ACTION_SELECT_INPUT_DLG;
- public static String ACTION_SELECT_INPUT_TOOLTIP;
-
- public static String ACTION_SELECTCONNECTION_LABEL;
- public static String ACTION_SELECTCONNECTION_TOOLTIP;
-
- public static String RESID_CHANGE_PREFIX_LABEL;
- public static String RESID_CHANGE_PREFIX_TOOLTIP;
-
- public static String RESID_CHANGEVIAENTRY_PREFIX_LABEL;
- public static String RESID_CHANGEVIAENTRY_PREFIX_TOOLTIP;
-
- public static String RESID_ADDVIAENTRY_PREFIX_LABEL;
- public static String RESID_ADDVIAENTRY_PREFIX_TOOLTIP;
-
- public static String RESID_COPYFROM_PREFIX_LABEL;
- public static String RESID_COPYFROM_PREFIX_TOOLTIP;
-
- public static String RESID_COPYTO_PREFIX_LABEL;
- public static String RESID_COPYTO_PREFIX_TOOLTIP;
-
- public static String RESID_DUPLICATE_PREFIX_LABEL;
- public static String RESID_DUPLICATE_PREFIX_TOOLTIP;
-
-
- // services and connector services property pages
- public static String RESID_PROPERTIES_SERVICES_NAME;
- public static String RESID_PROPERTIES_SERVICES_LABEL;
- public static String RESID_PROPERTIES_SERVICES_TOOLTIP;
- public static String RESID_PROPERTIES_DESCRIPTION_LABEL;
- public static String RESID_PROPERTIES_CONNECTOR_SERVICES_LABEL;
- public static String RESID_PROPERTIES_CONNECTOR_SERVICES_TOOLTIP;
- public static String RESID_PROPERTIES_FACTORIES_LABEL;
- public static String RESID_PROPERTIES_FACTORIES_TOOLTIP;
- public static String RESID_PROPERTIES_PROPERTIES_LABEL;
- public static String RESID_PROPERTIES_PROPERTIES_TOOLTIP;
-
-
- public static String ACTION_COMPILE_NOPROMPT_LABEL;
-
- // RSE Model Objects
- public static String RESID_MODELOBJECTS_FILTERSTRING_DESCRIPTION;
- public static String RESID_MODELOBJECTS_HOSTPOOL_DESCRIPTION;
- public static String RESID_MODELOBJECTS_PROFILE_DESCRIPTION;
- public static String RESID_MODELOBJECTS_SERVERLAUNCHER_DESCRIPTION;
- public static String RESID_MODELOBJECTS_FILTER_DESCRIPTION;
- public static String RESID_MODELOBJECTS_FILTERPOOL_DESCRIPTION;
-
- // Services form
- public static String RESID_SERVICESFORM_CONFIGURATION_TOOLTIP;
- public static String RESID_SERVICESFORM_SERVICES_TOOLTIP;
- public static String RESID_SERVICESFORM_CONNECTORSERVICES_TOOLTIP;
- public static String RESID_SERVICESFORM_PROPERTIES_TOOLTIP;
-
- // Do not show again message
- public static String RESID_DO_NOT_SHOW_MESSAGE_AGAIN_LABEL;
- public static String RESID_DO_NOT_SHOW_MESSAGE_AGAIN_TOOLTIP;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemResources.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemResources.properties
deleted file mode 100644
index e07d382a8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemResources.properties
+++ /dev/null
@@ -1,1433 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-##############################################################
-# Button values. Mnemonics will be assigned automatically, don't set them here.
-##############################################################
-BUTTON_BROWSE=Browse...
-BUTTON_CLOSE=Close
-BUTTON_TEST=Test
-BUTTON_ADD=Add
-BUTTON_CREATE_LABEL=Create
-BUTTON_CREATE_TOOLTIP=Press to create the new resource
-BUTTON_APPLY_LABEL=Apply
-BUTTON_APPLY_TOOLTIP=Press to apply pending changes
-BUTTON_RESET_LABEL=Reset
-BUTTON_RESET_TOOLTIP=Press to reset to original values
-BUTTON_CANCEL_ALL = Cancel All
-BUTTON_CANCEL_ALL_TOOLTIP = Cancel for all
-
-TERM_YES=Yes
-TERM_NO=No
-TERM_TRUE=True
-TERM_FALSE=False
-TERM_LOCAL=Local
-TERM_ALL=All
-
-#=============================================================
-# RE-USABLE COMPOSITE WIDGETS
-#=============================================================
-# RE-USABLE CONNECTION-SELECTION COMPOSITE WIDGETS
-WIDGET_CONNECTION_LABEL=Connection:
-WIDGET_CONNECTION_TOOLTIP=Select remote system connection
-WIDGET_CONNECTION_NAME=%1 in profile %2
-WIDGET_BUTTON_NEWCONNECTION_LABEL=New...
-WIDGET_BUTTON_NEWCONNECTION_TOOLTIP=Create a new remote system connection
-
-
-#=============================================================
-# MESSAGE LINE MRI
-#=============================================================
-RESID_MSGLINE_TIP=Press to see additional message details
-
-##############################################################
-# Preference pages
-##############################################################
-RESID_PREF_ROOT_PAGE=Remote Systems
-RESID_PREF_ROOT_TITLE=Remote Systems Overall Preferences
-RESID_PREF_SYSTEMTYPE_PREFIX_LABEL=Default System Type
-RESID_PREF_SYSTEMTYPE_PREFIX_TOOLTIP=Default for New Connection wizard
-RESID_PREF_USERID_PREFIX_LABEL=Overall Default User ID
-RESID_PREF_USERID_PREFIX_TOOLTIP=Overall default, overriddable per system type
-RESID_PREF_USERID_PERTYPE_PREFIX_LABEL=System type information
-RESID_PREF_USERID_PERTYPE_PREFIX_TOOLTIP=Set enablement state and default user ID for the selected system type. Press F1 for details.
-#RESID_PREF_USERID_PERTYPE_SYSTEMTYPES_LABEL=System Types
-#RESID_PREF_USERID_PERTYPE_USERID_LABEL=User ID
-RESID_PREF_SHOWFILTERPOOLS_PREFIX_LABEL=Show filter pools in Remote Systems view
-RESID_PREF_SHOWFILTERPOOLS_PREFIX_TOOLTIP=Show filter pools when expanding subsystems
-RESID_PREF_SHOWNEWCONNECTIONPROMPT_PREFIX_LABEL=Show "New Connection" prompt in Remote Systems view
-RESID_PREF_SHOWNEWCONNECTIONPROMPT_PREFIX_TOOLTIP=Show the prompt for a new connection in the Remote Systems view
-RESID_PREF_QUALIFYCONNECTIONNAMES_PREFIX_LABEL=Show connection names prefixed by profile name
-RESID_PREF_QUALIFYCONNECTIONNAMES_PREFIX_TOOLTIP=Select this if two connections or filter pools have the same name across different profiles
-RESID_PREF_REMEMBERSTATE_PREFIX_LABEL=Re-open Remote Systems view to previous state
-RESID_PREF_REMEMBERSTATE_PREFIX_TOOLTIP=Re-expand previously expanded connections when starting up
-RESID_PREF_USEDEFERREDQUERIES_PREFIX_LABEL=Use deferred queries in the Remote Systems view
-RESID_PREF_USEDEFERREDQUERIES_PREFIX_TOOLTIP=Select this if, when expanding nodes in the Remote Systems view, you would like queries to happen asynchronously
-RESID_PREF_RESTOREFROMCACHE_PREFIX_LABEL=Use cached information to restore the Remote Systems view
-RESID_PREF_RESTOREFROMCACHE_PREFIX_TOOLTIP=If cached information is available then it is used to restore the Remote Systems view instead of connecting to the remote system
-RESID_PREF_SYSTYPE_COLHDG_NAME=System Type
-RESID_PREF_SYSTYPE_COLHDG_ENABLED=Enabled
-RESID_PREF_SYSTYPE_COLHDG_DESC=Description
-RESID_PREF_SYSTYPE_COLHDG_USERID=Default User ID
-
-##############################################################
-# Preference pages for general communications
-##############################################################
-RESID_PREF_COMMUNICATIONS_TITLE=RSE Communications Preferences
-RESID_PREF_DAEMON_PORT_LABEL=RSE communications daemon port number (1 - 65536)
-RESID_PREF_DAEMON_PORT_TOOLTIP=Enter the local port number for the daemon to listen on
-RESID_PREF_DAEMON_AUTOSTART_LABEL=Start RSE communications daemon on Workbench startup
-RESID_PREF_DAEMON_AUTOSTART_TOOLTIP=Select the checkbox to start daemon on startup
-
-RESID_PREF_IP_ADDRESS_LABEL= Workstation network address
-RESID_PREF_IP_AUTO_LABEL= Automatically detect IP address of workstation
-RESID_PREF_IP_AUTO_TOOLTIP= Allow automatic detection of the IP address of your workstation. This setting should work in most cases
-RESID_PREF_IP_MANUAL_LABEL= Specify IP address or host name of workstation
-RESID_PREF_IP_MANUAL_TOOLTIP= Specify the IP address or host name of your workstation
-RESID_PREF_IP_MANUAL_ENTER_LABEL= IP address or host name:
-RESID_PREF_IP_MANUAL_ENTER_TOOLTIP= Enter the IP address or host name of your workstation
-
-##############################################################
-# Miscellaneous Actions that appear as either buttons and/or menu items.
-# Actions use the following keys:
-# xxx.label=Text shown on button or menu item
-# xxx.tooltip=Short help shown in hover help box
-##############################################################
-# Style popup menu (cascading) on common Work-With lists...
-# labels...
-#MENUITEM_WWSTYLE_LABEL=Style
-#MENUITEM_WWSTYLE_NEXT_LABEL=Next style
-#MENUITEM_WWSTYLE_1_LABEL=1. Entry field and buttons on side
-#MENUITEM_WWSTYLE_2_LABEL=2. Entry field and buttons on top
-#MENUITEM_WWSTYLE_3_LABEL=3. No entry field and buttons on top
-#MENUITEM_WWSTYLE_4_LABEL=4. No entry field and no buttons
-#MENUITEM_WWSTYLE_5_LABEL=5. No entry field and buttons on side
-#MENUITEM_WWSTYLE_6_LABEL=6. No entry field, Add buttons on top, other buttons on side
-# descriptions...
-#MENUITEM_WWSTYLE_DESCRIPTION=Switch to another style of work-with list
-#MENUITEM_WWSTYLE_NEXT_DESCRIPTION=Switch to the next style of work-with list
-#MENUITEM_WWSTYLE_1_DESCRIPTION=Switch to style 1
-#MENUITEM_WWSTYLE_2_DESCRIPTION=Switch to style 2
-#MENUITEM_WWSTYLE_3_DESCRIPTION=Switch to style 3
-#MENUITEM_WWSTYLE_4_DESCRIPTION=Switch to style 4
-#MENUITEM_WWSTYLE_5_DESCRIPTION=Switch to style 5
-#MENUITEM_WWSTYLE_6_DESCRIPTION=Switch to style 6
-
-##############################################################
-# Wizard and dialog resources
-##############################################################
-
-#=============================================================
-# SINGLE-SELECT RENAME DIALOG...
-#=============================================================
-RESID_RENAME_SINGLE_TITLE=Rename Resource
-RESID_SIMPLE_RENAME_PROMPT_LABEL=New name
-RESID_SIMPLE_RENAME_PROMPT_TOOLTIP=Enter unique new resource name
-RESID_SIMPLE_RENAME_RESOURCEPROMPT_LABEL=Resource type:
-RESID_SIMPLE_RENAME_RESOURCEPROMPT_TOOLTIP=Type of object being renamed
-RESID_SIMPLE_RENAME_RADIO_OVERWRITE_LABEL =Overwrite
-RESID_SIMPLE_RENAME_RADIO_OVERWRITE_TOOLTIP =Replace the existing file with the new one.
-RESID_SIMPLE_RENAME_RADIO_RENAME_LABEL =Rename
-RESID_SIMPLE_RENAME_RADIO_RENAME_TOOLTIP =Rename the file to something else.
-
-
-# SPECIALIZED PROMPTS FOR SPECIFIC TYPES OF RESOURCES...
-RESID_SIMPLE_RENAME_PROFILE_PROMPT_LABEL=New profile name:
-RESID_SIMPLE_RENAME_PROFILE_PROMPT_TIP=Enter unique new name for this profile
-
-
-
-
-#=============================================================
-# MULTI-SELECT RENAME DIALOG...
-#=============================================================
-RESID_RENAME_TITLE=Rename Resources
-RESID_RENAME_VERBAGE=Enter a unique new name for each resource. You can Tab between the names.
-#column headings...
-RESID_RENAME_COLHDG_OLDNAME=Resource
-RESID_RENAME_COLHDG_NEWNAME=New name
-RESID_RENAME_COLHDG_TYPE=Resource Type
-# SPECIALIZED PROMPTS FOR SPECIFIC TYPES OF RESOURCES...
-RESID_MULTI_RENAME_PROFILE_VERBAGE=Enter unique new names for each profile
-
-#=============================================================
-# GENERIC DELETE DIALOG...
-#=============================================================
-RESID_DELETE_TITLE=Delete Confirmation
-RESID_DELETE_PROMPT=Delete selected resources?
-RESID_DELETE_PROMPT_SINGLE=Delete selected resource?
-RESID_DELETE_COLHDG_OLDNAME=Resource
-RESID_DELETE_COLHDG_TYPE=Resource Type
-RESID_DELETE_BUTTON=Delete
-RESID_DELETE_TIP=Confirm delete request
-
-RESID_DELETE_RESOURCEPROMPT_LABEL=Selected resource(s) type:
-RESID_DELETE_RESOURCEPROMPT_TOOLTIP=Type of object(s) being deleted
-RESID_DELETE_WARNING_LABEL=WARNING! Remote objects are permanently deleted!
-RESID_DELETE_WARNING_TOOLTIP=You are confirming permanent deletion of the selected resource(s) from the remote system. This action cannot be undone
-RESID_DELETE_WARNINGLOCAL_LABEL=WARNING! Local objects are permanently deleted!
-RESID_DELETE_WARNINGLOCAL_TOOLTIP=You are confirming permanent deletion of the selected resource(s) from the local system. This action cannot be undone
-
-# SPECIALIZED PROMPTS FOR SPECIFIC TYPES OF RESOURCES...
-RESID_DELETE_PROFILES_PROMPT=Delete selected profiles, including their connections, filters and user actions?
-
-
-#=============================================================
-# GENERIC COPY DIALOG...
-#=============================================================
-RESID_COPY_SINGLE_TITLE=Copy Resource
-RESID_COPY_TITLE=Copy Resources
-RESID_COPY_PROMPT=Select the copy destination
-RESID_COPY_TARGET_PROFILE_PROMPT=Select the active profile to copy into
-RESID_COPY_TARGET_FILTERPOOL_PROMPT=Select the filter pool to copy into
-RESID_COPY_TARGET_FILTER_PROMPT=Select the filter to copy into
-
-#=============================================================
-# GENERIC MOVE DIALOG...
-#=============================================================
-RESID_MOVE_SINGLE_TITLE=Move Resource
-RESID_MOVE_TITLE=Move Resources
-RESID_MOVE_PROMPT=Select the move destination
-RESID_MOVE_TARGET_PROFILE_PROMPT=Select the active profile to move into
-RESID_MOVE_TARGET_FILTERPOOL_PROMPT=Select the filter pool to move into
-RESID_MOVE_TARGET_FILTER_PROMPT=Select the filter to move into
-
-#=============================================================
-# GENERIC COPY/MOVE NAME-COLLISION DIALOG...
-#=============================================================
-RESID_COLLISION_RENAME_TITLE=Duplicate Name Collision
-RESID_COLLISION_RENAME_VERBAGE=A resource named "&1" already exists.
-RESID_COLLISION_RENAME_LABEL=Rename to
-RESID_COLLISION_RENAME_TOOLTIP=Enter unique new resource name
-
-
-#=============================================================
-# USERID PER SYSTEMTYPE DIALOG...
-#=============================================================
-RESID_USERID_PER_SYSTEMTYPE_TITLE=Default User ID Preference
-RESID_USERID_PER_SYSTEMTYPE_SYSTEMTYPE_LABEL=System type:
-RESID_USERID_PER_SYSTEMTYPE_SYSTEMTYPE_TOOLTIP=The system type to set the default user ID for
-RESID_USERID_PER_SYSTEMTYPE_LABEL=User ID
-RESID_USERID_PER_SYSTEMTYPE_TOOLTIP=Enter default user ID to use for all connections of this system type
-
-
-#=============================================================
-# SELECT CONNECTION DIALOG...
-#=============================================================
-RESID_SELECTCONNECTION_TITLE=Select Connection
-RESID_SELECTCONNECTION_VERBAGE=Select a connection
-
-#=============================================================
-# NEW PROFILE WIZARD...
-#=============================================================
-RESID_NEWPROFILE_TITLE=New
-RESID_NEWPROFILE_PAGE1_TITLE=Remote System Profile
-RESID_NEWPROFILE_PAGE1_DESCRIPTION=Define profile to hold connections
-RESID_NEWPROFILE_VERBAGE=Profiles enable team support. They contain all the connections, filters, user actions and compile commands. Whenever these items are created, you are prompted for the profile to create them in. Whenever they are shown, the total from all active profiles are shown. By default, team members only have active their own profiles and the Team profile.
-RESID_NEWPROFILE_NAME_LABEL=Name
-RESID_NEWPROFILE_NAME_TOOLTIP=Unique profile name
-RESID_NEWPROFILE_MAKEACTIVE_LABEL=Make active
-RESID_NEWPROFILE_MAKEACTIVE_TOOLTIP=Show connections in this profile
-
-#======================================================================
-# NEW CONNECTION PROMPT ("New Connection..." SPECIAL CONNECTION IN RSE)
-#======================================================================
-RESID_NEWCONN_PROMPT_LABEL=New Connection
-RESID_NEWCONN_PROMPT_TOOLTIP=Expand to create a new connection to a remote system
-RESID_NEWCONN_PROMPT_VALUE=A prompt for a new connection
-RESID_NEWCONN_EXPANDABLEPROMPT_VALUE=An expandable prompt for a new connection
-
-#=============================================================
-# NEW CONNECTION WIZARD...
-#=============================================================
-RESID_NEWCONN_TITLE=New
-RESID_NEWCONN_PAGE1_TITLE=Remote System Connection
-RESID_NEWCONN_PAGE1_LOCAL_TITLE=Local System Connection
-RESID_NEWCONN_PAGE1_REMOTE_TITLE=Remote &1 System Connection
-RESID_NEWCONN_PAGE1_DESCRIPTION=Define connection information
-
-#=============================================================
-# NEW CONNECTION WIZARD INFORMATION PAGE FOR UNIX/LINUX/WINDOWS
-#=============================================================
-RESID_NEWCONN_SUBSYSTEMPAGE_DESCRIPTION=Define subsystem information
-RESID_NEWCONN_SUBSYSTEMPAGE_FILES_TITLE=Communications Server
-RESID_NEWCONN_SUBSYSTEMPAGE_FILES_DESCRIPTION=How to install server support
-RESID_NEWCONN_SUBSYSTEMPAGE_FILES_VERBAGE1=To connect to your remote system, you must first copy and expand the supplied Java server code jar file on that system, and either manually start that server or the supplied daemon. You will find the instructions for this in the Help.
-RESID_NEWCONN_SUBSYSTEMPAGE_FILES_VERBAGE2=If you manually start the communications server, you will need to set the port number property for this connection. To do this, expand your newly created connection in the Remote System Explorer perspective. Right click on the Files subsystem and select Properties. You can specify the port to match the port you specified or were assigned for the server.
-
-#=============================================================
-# RENAME PROFILE PAGE...
-#=============================================================
-RESID_RENAMEDEFAULTPROFILE_PAGE1_TITLE=Name personal profile
-RESID_RENAMEDEFAULTPROFILE_PAGE1_DESCRIPTION=Uniquely name user profile
-RESID_PROFILE_PROFILENAME_LABEL=Profile
-RESID_PROFILE_PROFILENAME_TIP=New name for the profile
-RESID_PROFILE_PROFILENAME_VERBAGE=Welcome to Remote Systems. Connections can be sharable by the team or private to you. Enter a profile name to uniquely identify you from your team members. You will decide for each new connection whether it is owned by the team profile or your profile.
-
-#=============================================================
-# DUPLICATE PROFILE DIALOG...
-#=============================================================
-RESID_COPY_PROFILE_TITLE=Duplicate Profile
-RESID_COPY_PROFILE_PROMPT_LABEL=New profile name
-RESID_COPY_PROFILE_PROMPT_TOOLTIP=Enter a unique name for the new profile
-
-
-#=============================================================
-# UPDATE CONNECTION DIALOG...
-#=============================================================
-RESID_CHGCONN_TITLE=Change Connection
-
-RESID_CONNECTION_TYPE_LABEL=Resource type
-RESID_CONNECTION_TYPE_VALUE=Connection to remote system
-
-RESID_CONNECTION_SYSTEMTYPE_LABEL=System type
-RESID_CONNECTION_SYSTEMTYPE_TIP=Operating system type of the remote host
-
-RESID_CONNECTION_SYSTEMTYPE_READONLY_LABEL=System type
-RESID_CONNECTION_SYSTEMTYPE_READONLY_TIP=Operating system type of the remote host
-
-RESID_CONNECTION_CONNECTIONNAME_LABEL=Connection name
-RESID_CONNECTION_CONNECTIONNAME_TIP=Arbitrary name for this connection, unique to this profile
-
-RESID_CONNECTION_HOSTNAME_LABEL=Host name
-RESID_CONNECTION_HOSTNAME_TIP=Hostname or IP address of target system
-
-RESID_CONNECTION_HOSTNAME_READONLY_LABEL=Host name
-RESID_CONNECTION_HOSTNAME_READONLY_TIP=Hostname or IP address of system this connects to
-
-RESID_CONNECTION_USERID_LABEL=User ID
-RESID_CONNECTION_USERID_TIP=User ID to use when connecting
-
-RESID_CONNECTION_DEFAULTUSERID_LABEL=Default User ID
-RESID_CONNECTION_DEFAULTUSERID_TIP=Default user ID for subsystems that don't specify a user ID
-RESID_CONNECTION_DEFAULTUSERID_INHERITBUTTON_TIP=Inherit from preferences, or set locally for this connection
-
-RESID_CONNECTION_RUNNING_PORT_LABEL=Running Server Port
-RESID_CONNECTION_RUNNING_PORT_TIP=Port number used by a running server
-
-RESID_CONNECTION_PORT_LABEL=Port
-RESID_CONNECTION_PORT_TIP=Port number used to do the connection
-
-RESID_CONNECTION_DAEMON_PORT_LABEL=Daemon Port
-RESID_CONNECTION_DAEMON_PORT_TIP=Port number used to connect to the daemon that launches Remote System Explorer servers
-
-RESID_CONNECTION_DEFAULTPORT_LABEL=Default port
-RESID_CONNECTION_DEFAULTPORT_TIP=Default port for subsystems
-
-RESID_CONNECTION_DESCRIPTION_LABEL=Description
-RESID_CONNECTION_DESCRIPTION_TIP=Commentary description of the connection
-
-RESID_CONNECTION_PROFILE_LABEL=Parent profile
-RESID_CONNECTION_PROFILE_TIP=Select profile to contain this connection
-RESID_CONNECTION_PROFILE_READONLY_TIP=The profile containing this connection
-
-RESID_CONNECTION_VERIFYHOSTNAME_LABEL=Verify host name
-RESID_CONNECTION_VERIFYHOSTNAME_TOOLTIP=Verify a host of the given name or IP address exists
-
-
-
-#=============================================================
-# SYSTEMREGISTRY PROPERTY PAGE DIALOG...
-#=============================================================
-RESID_SYSTEMREGISTRY_TEXT=RemoteSystemsConnections project
-RESID_SYSTEMREGISTRY_CONNECTIONS=Connections
-
-#=============================================================
-# SUBSYSTEM PROPERTY PAGE DIALOG...
-#=============================================================
-RESID_SUBSYSTEM_TITLE=Properties for Subsystem
-RESID_SUBSYSTEM_NAME_LABEL=Name
-RESID_SUBSYSTEM_TYPE_LABEL=Resource type
-RESID_SUBSYSTEM_TYPE_VALUE=Subsystem
-RESID_SUBSYSTEM_VENDOR_LABEL=Vendor
-RESID_SUBSYSTEM_CONNECTION_LABEL=Parent connection
-RESID_SUBSYSTEM_PROFILE_LABEL=Parent profile
-RESID_SUBSYSTEM_PORT_LABEL=Port
-RESID_SUBSYSTEM_PORT_TIP=Port number to connect with
-RESID_SUBSYSTEM_PORT_INHERITBUTTON_TIP=Use first available port, or explicitly set the port number
-RESID_SUBSYSTEM_PORT_INHERITBUTTON_INHERIT_TIP=Click to explicitly set the port number
-RESID_SUBSYSTEM_PORT_INHERITBUTTON_LOCAL_TIP=Click to use first available port
-RESID_SUBSYSTEM_USERID_LABEL=User ID
-RESID_SUBSYSTEM_USERID_TIP=User ID to connect with
-RESID_SUBSYSTEM_USERID_INHERITBUTTON_TIP=Inherit user ID from connection, or set locally for this subsystem
-RESID_SUBSYSTEM_USERID_INHERITBUTTON_INHERIT_TIP=Click to explicitly set the user ID for this subsystem
-RESID_SUBSYSTEM_USERID_INHERITBUTTON_LOCAL_TIP=Click to inherit the user ID from the connection
-
-# Communications property page
-RESID_SUBSYSTEM_SSL_LABEL=Use SSL for network communications
-RESID_SUBSYSTEM_SSL_TIP=Use Secure Sockets Layer (SSL) for communicating with the server
-RESID_SUBSYSTEM_AUTODETECT_LABEL=Auto-detect SSL
-RESID_SUBSYSTEM_AUTODETECT_TIP=Automatically detect whether or not the server uses SSL. On some systems this may cause a longer connection time.
-RESID_SUBSYSTEM_SSL_ALERT_LABEL=Alert me when connecting using SSL
-RESID_SUBSYSTEM_SSL_ALERT_TIP=Show a confirmation dialog when the Secure Sockets Layer (SSL) is used for connecting with the RSE server
-RESID_SUBSYSTEM_NONSSL_ALERT_LABEL=Alert me when connecting insecurely
-RESID_SUBSYSTEM_NONSSL_ALERT_TIP=Show a confirmation dialog when no security layer is used for connecting with the RSE server
-
-# Single signon (Kerberos) Properties Page
-
-# Environment Properties Page
-RESID_SUBSYSTEM_ENVVAR_TITLE= Environment Variables
-RESID_SUBSYSTEM_ENVVAR_DESCRIPTION= Specify the environment variables that will be set when a connection is established:
-RESID_SUBSYSTEM_ENVVAR_TOOLTIP= The environment variables that will be set when a connection is established
-
-RESID_SUBSYSTEM_ENVVAR_NAME_TITLE= Name
-RESID_SUBSYSTEM_ENVVAR_NAME_LABEL= Name:
-RESID_SUBSYSTEM_ENVVAR_NAME_TOOLTIP= Enter a name for the environment variable
-
-RESID_SUBSYSTEM_ENVVAR_VALUE_TITLE= Value
-RESID_SUBSYSTEM_ENVVAR_VALUE_LABEL= Value:
-RESID_SUBSYSTEM_ENVVAR_VALUE_TOOLTIP= Enter a value for the environment variable
-
-
-RESID_SUBSYSTEM_ENVVAR_ADD_TOOLTIP= Add a new environment variable
-RESID_SUBSYSTEM_ENVVAR_REMOVE_TOOLTIP= Remove the selected environment variable
-RESID_SUBSYSTEM_ENVVAR_CHANGE_TOOLTIP= Change the selected environment variable
-RESID_SUBSYSTEM_ENVVAR_MOVEUP_LABEL= Move Up
-RESID_SUBSYSTEM_ENVVAR_MOVEUP_TOOLTIP= Move the selected environment variable(s) up in the list
-RESID_SUBSYSTEM_ENVVAR_MOVEDOWN_LABEL= Move Down
-RESID_SUBSYSTEM_ENVVAR_MOVEDOWN_TOOLTIP= Move the selected environment variable(s) down in the list
-
-# Add / Change Environment Variable Dialog
-RESID_SUBSYSTEM_ENVVAR_ADD_TITLE= Add Environment Variable
-RESID_SUBSYSTEM_ENVVAR_CHANGE_TITLE= Change Environment Variable
-
-#=============================================================
-# PROPERTY PAGE DIALOG...
-#=============================================================
-RESID_PROP_SERVERLAUNCHER_MEANS=Indicate how the remote server should be launched
-RESID_PROP_SERVERLAUNCHER_MEANS_LABEL=Launcher
-RESID_PROP_SERVERLAUNCHER_RADIO_DAEMON=Remote daemon
-RESID_PROP_SERVERLAUNCHER_RADIO_REXEC=REXEC
-RESID_PROP_SERVERLAUNCHER_RADIO_NONE=Connect to running server
-RESID_PROP_SERVERLAUNCHER_RADIO_DAEMON_TOOLTIP=Launch the server using a daemon running on the host.
-RESID_PROP_SERVERLAUNCHER_RADIO_REXEC_TOOLTIP=Launch the server using REXEC.
-RESID_PROP_SERVERLAUNCHER_RADIO_NONE_TOOLTIP=Manually launch the server and then connect to it from RSE.
-RESID_PROP_SERVERLAUNCHER_PATH=Path to installed server on host
-RESID_PROP_SERVERLAUNCHER_PATH_TOOLTIP=Specify where the installed server is located on the host.
-RESID_PROP_SERVERLAUNCHER_INVOCATION=Server launch command
-RESID_PROP_SERVERLAUNCHER_INVOCATION_TOOLTIP=Specify the name of the command that invokes the server.
-
-#=============================================================
-# NEW FILTERPOOL WIZARD...
-#=============================================================
-RESID_NEWFILTERPOOL_TITLE=New Filter Pool
-RESID_NEWFILTERPOOL_PAGE1_TITLE=System Filter Pool
-RESID_NEWFILTERPOOL_PAGE1_DESCRIPTION=Define a new pool for filters
-#WIDGETS ON NEW FILTER POOL WIZARD
-RESID_FILTERPOOLNAME_LABEL=Pool name
-RESID_FILTERPOOLNAME_TIP=Enter unique name for the pool within profile
-RESID_FILTERPOOLMANAGERNAME_LABEL=Profile
-RESID_FILTERPOOLMANAGERNAME_TIP=Select profile to contain this pool
-
-#=============================================================
-# COMMON PROPERTIES PAGE WIDGETS...
-#=============================================================
-RESID_PP_PROPERTIES_TYPE_LABEL=Resource type
-RESID_PP_PROPERTIES_TYPE_TOOLTIP=What type of artifact is this?
-
-
-#=============================================================
-# FILTERPOOL PROPERTIES PAGE...
-#=============================================================
-RESID_FILTERPOOL_TITLE=Properties for Filter Pool
-RESID_FILTERPOOL_TYPE_VALUE=Filter pool
-
-RESID_FILTERPOOL_NAME_LABEL=Name
-RESID_FILTERPOOL_NAME_TOOLTIP=Name of this filter pool
-
-RESID_FILTERPOOL_PROFILE_LABEL=Parent profile
-RESID_FILTERPOOL_PROFILE_TOOLTIP=Profile that owns this filter pool
-
-RESID_FILTERPOOL_REFERENCECOUNT_LABEL=Reference count
-RESID_FILTERPOOL_REFERENCECOUNT_TOOLTIP=How many connections show the filters in this pool?
-
-RESID_FILTERPOOL_RELATEDCONNECTION_LABEL=Related connection
-RESID_FILTERPOOL_RELATEDCONNECTION_TOOLTIP=Name of the single connection this pool is private to
-
-#=============================================================
-# FILTERPOOL REFERENCE PROPERTIES PAGE...
-#=============================================================
-RESID_FILTERPOOLREF_TITLE=Properties for Filter Pool Reference
-RESID_FILTERPOOLREF_TYPE_VALUE=Reference to filter pool
-
-RESID_FILTERPOOLREF_NAME_LABEL=Name
-RESID_FILTERPOOLREF_NAME_TOOLTIP=Name of the referenced filter pool
-
-RESID_FILTERPOOLREF_SUBSYSTEM_LABEL=Parent subsystem
-RESID_FILTERPOOLREF_SUBSYSTEM_TOOLTIP=The subsystem which contains this reference
-
-RESID_FILTERPOOLREF_CONNECTION_LABEL=Parent connection
-RESID_FILTERPOOLREF_CONNECTION_TOOLTIP=The connection which owns the subsystem containing this reference
-
-RESID_FILTERPOOLREF_PROFILE_LABEL=Parent profile
-RESID_FILTERPOOLREF_PROFILE_TOOLTIP=The profile which owns the connection containing the subsystem with this reference
-
-#=============================================================
-# FILTER PROPERTIES PAGE...
-#=============================================================
-RESID_PP_FILTER_TITLE_LABEL=Properties for Filter
-RESID_PP_FILTER_TYPE_VALUE=Filter
-RESID_PP_FILTER_TYPE_PROMPTABLE_VALUE=Prompting filter
-RESID_PP_FILTER_TYPE_PROMPTABLE_TOOLTIP=Whether this is a filter that prompts the user when its expanded
-
-RESID_PP_FILTER_NAME_LABEL=Name
-RESID_PP_FILTER_NAME_TOOLTIP=The name of this filter
-
-RESID_PP_FILTER_STRINGCOUNT_LABEL=Number of filter strings
-RESID_PP_FILTER_STRINGCOUNT_TOOLTIP=The number of filter strings contained in this filter
-
-RESID_PP_FILTER_FILTERPOOL_LABEL=Parent filter pool
-RESID_PP_FILTER_FILTERPOOL_TOOLTIP=The filter pool which contains this filter
-
-RESID_PP_FILTER_PROFILE_LABEL=Parent profile
-RESID_PP_FILTER_PROFILE_TOOLTIP=The profile which contains the filter pool with this filter
-
-RESID_PP_FILTER_ISCONNECTIONPRIVATE_LABEL=Connection private
-RESID_PP_FILTER_ISCONNECTIONPRIVATE_TOOLTIP=Whether this is a filter contained in a filter pool that is private to a single connection
-
-#=============================================================
-# FILTERSTRING PROPERTIES PAGE...
-#=============================================================
-RESID_PP_FILTERSTRING_TITLE=Properties for Filter String
-RESID_PP_FILTERSTRING_TYPE_VALUE=Filter string
-
-#=============================================================
-# FILTERSTRING PROPERTIES PAGE...
-#=============================================================
-RESID_PP_FILTERSTRING_TITLE=Properties for Filter String
-
-RESID_PP_FILTERSTRING_TYPE_VALUE==Filter string
-
-RESID_PP_FILTERSTRING_STRING_LABEL=String
-RESID_PP_FILTERSTRING_STRING_TOOLTIP=The actual filter string
-
-RESID_PP_FILTERSTRING_FILTER_LABEL=Parent filter
-RESID_PP_FILTERSTRING_FILTER_TOOLTIP=The filter that contains this filter string
-
-RESID_PP_FILTERSTRING_FILTERPOOL_LABEL=Parent filter pool
-RESID_PP_FILTERSTRING_FILTERPOOL_TOOLTIP=The filter pool that contains the filter with this filter string
-
-RESID_PP_FILTERSTRING_PROFILE_LABEL=Parent profile
-RESID_PP_FILTERSTRING_PROFILE_TOOLTIP=The profile that contains the filter pool with this filter string's filter
-
-#=============================================================
-# SUBSYSTEMFACTORY PROPERTIES PAGE...
-#=============================================================
-RESID_PP_SUBSYSFACTORY_TITLE=Properties for SubSystem Factory
-RESID_PP_SUBSYSFACTORY_VERBAGE=A subsystem factory is responsible for creating and owning subsystem instances, one per connection typically. They may also contain, per profile, team-sharable artifacts.
-
-RESID_PP_SUBSYSFACTORY_ID_LABEL=Identifier
-RESID_PP_SUBSYSFACTORY_ID_TOOLTIP=Unique identifier for this subsystem factory
-
-RESID_PP_SUBSYSFACTORY_VENDOR_LABEL=Vendor
-RESID_PP_SUBSYSFACTORY_VENDOR_TOOLTIP=Vendor who created this subsystem factory
-
-RESID_PP_SUBSYSFACTORY_TYPES_LABEL=System types
-RESID_PP_SUBSYSFACTORY_TYPES_TOOLTIP=System types supported by this factory
-
-#=============================================================
-# NEW FILTER WIZARD...
-#=============================================================
-RESID_NEWFILTER_TITLE=New
-RESID_NEWFILTER_PAGE_TITLE=Filter
-# PAGE 1 OF NEW FILTER WIZARD...
-RESID_NEWFILTER_PAGE1_DESCRIPTION=Create a new filter
-# PAGE 2 OF NEW FILTER WIZARD...
-RESID_NEWFILTER_PAGE2_DESCRIPTION=Name the new filter
-RESID_NEWFILTER_PAGE2_NAME_VERBAGE=Filters are saved for easy re-use. Specify a unique name for this filter. This name will appear in the Remote Systems view, and will be expandable.
-RESID_NEWFILTER_PAGE2_POOL_VERBAGE=Filters are created in filter pools, which are re-usable in multiple connections. Select the pool to create this filter in. The pool names are qualified by their profile name.
-RESID_NEWFILTER_PAGE2_PROFILE_VERBAGE=Select a profile to own the new filter. This determines if it is unique to you, or sharable by the team. It will be placed in the default filter pool for that profile.
-RESID_NEWFILTER_PAGE2_POOL_VERBAGE_TIP=Tip: too many filters? Turn on "Show filter pools in Remote Systems view". Select Preferences from the Window pulldown, then Remote Systems
-
-# PAGE 3 OF NEW FILTER WIZARD...
-RESID_NEWFILTER_PAGE3_DESCRIPTION=Additional Information
-RESID_NEWFILTER_PAGE3_STRINGS_VERBAGE=Tip: Filters can contain multiple filter strings, although this wizard only prompts for one. To add more filter strings, select the filter in the Remote Systems view, and select the Change action from its pop-up menu.
-RESID_NEWFILTER_PAGE3_POOLS_VERBAGE=Tip: Too many filters? Turn on "Show filter pools in Remote Systems view." Select Preferences from the Window pulldown, then Remote Systems.
-
-RESID_FILTERALIAS_LABEL=Filter name:
-RESID_FILTERALIAS_TIP=Enter filter name unique for this filter pool
-RESID_FILTERPARENTPOOL_LABEL=Parent filter pool:
-RESID_FILTERPARENTPOOL_TIP=Filter pool in which this filter will be created
-RESID_FILTERSTRINGS_LABEL=Filter Strings
-RESID_FILTERSTRINGS_TIP=Strings to filter by. Use the pop-up menu for additional actions
-RESID_NEWFILTER_POOLTIP=Tip: too many filters? Turn on "Show filter pools in Remote Systems view." Select Preferences from the Windows pulldown, then Remote Systems.
-
-
-#=============================================================
-# CHANGE SYSTEM FILTER DIALOG...
-#=============================================================
-RESID_CHGFILTER_TITLE=Change System Filter
-RESID_CHGFILTER_LIST_NEWITEM=New filter string
-RESID_CHGFILTER_NAME_LABEL=Filter name:
-RESID_CHGFILTER_NAME_TOOLTIP=Name for this filter. A filter is a named collection of filter strings
-RESID_CHGFILTER_POOL_LABEL=Parent filter pool:
-RESID_CHGFILTER_POOL_TOOLTIP=Filter pool in which this filter exists
-RESID_CHGFILTER_LIST_LABEL=Filter strings:
-RESID_CHGFILTER_LIST_TOOLTIP=Strings to filter by. Use the pop-up menu for additional actions
-RESID_CHGFILTER_LIST_NEWITEM=New filter string
-RESID_CHGFILTER_FILTERSTRING_LABEL=Selected filter string:
-RESID_CHGFILTER_FILTERSTRING_TOOLTIP=Edit the filter string and press Apply to change it in the list
-RESID_CHGFILTER_NEWFILTERSTRING_LABEL=New filter string:
-RESID_CHGFILTER_NEWFILTERSTRING_TOOLTIP=Specify the new filter string, then press Create to add it to this filter
-RESID_CHGFILTER_BUTTON_TEST_LABEL=Test
-RESID_CHGFILTER_BUTTON_TEST_TOOLTIP=Press to test the currently selected filter string
-RESID_CHGFILTER_BUTTON_APPLY_LABEL=Apply
-RESID_CHGFILTER_BUTTON_APPLY_TOOLTIP=Press to apply the changes to the currently selected filter string
-RESID_CHGFILTER_BUTTON_REVERT_LABEL=Revert
-RESID_CHGFILTER_BUTTON_REVERT_TOOLTIP=Press to revert to the last saved values for the currently selected filter string
-RESID_CHGFILTER_BUTTON_CREATE_LABEL=Create
-RESID_CHGFILTER_BUTTON_CREATE_TOOLTIP=Press to create a new filter string in this filter
-
-#=============================================================
-# CREATE UNNAMED FILTER DIALOG...
-#=============================================================
-RESID_CRTFILTER_TITLE=Create Filter
-
-#=============================================================
-# RENAME FILTER DIALOG...
-#=============================================================
-RESID_RENAME_FILTER_TITLE=Rename Filter
-RESID_RENAME_FILTER_PROMPT=Enter the new filter name
-#=============================================================
-# COPY FILTER DIALOG...
-#=============================================================
-RESID_COPY_FILTER_TITLE=Copy Filter
-RESID_COPY_FILTER_PROMPT=Select system to copy to
-#=============================================================
-# NEW FILTER STRING ACTION AND WIZARD...
-#=============================================================
-RESID_NEWFILTERSTRING_TITLE=New System Filter
-RESID_NEWFILTERSTRING_ADD_TITLE=Add...
-RESID_NEWFILTERSTRING_PAGE1_TITLE=System Filter String
-RESID_NEWFILTERSTRING_PAGE1_DESCRIPTION=Create a new filter string
-
-RESID_NEWFILTERSTRING_PREFIX_LABEL=Add...
-RESID_NEWFILTERSTRING_PREFIX_TOOLTIP=Add a new filter string
-
-RESID_NEWFILTERSTRING_PREFIX_PROMPT=Enter a filter string
-
-RESID_FILTERSTRING_STRING_LABEL=Filter string:
-RESID_FILTERSTRING_STRING_TIP=Enter a filter string
-
-#=============================================================
-# CHANGE FILTER STRING ACTION AND DIALOG...
-#=============================================================
-RESID_CHGFILTERSTRING_PREFIX_LABEL=Change...
-RESID_CHGFILTERSTRING_PREFIX_TOOLTIP=Change selected filter string
-RESID_CHGFILTERSTRING_TITLE=Change Filter String
-RESID_CHGFILTERSTRING_PREFIX_PROMPT=Edit the filter string
-
-#=============================================================
-# TEST FILTER STRING DIALOG...
-#=============================================================
-RESID_TESTFILTERSTRING_TITLE=Test Filter String
-RESID_TESTFILTERSTRING_PROMPT_LABEL=Filter string:
-RESID_TESTFILTERSTRING_PROMPT_TOOLTIP=Filter string being tested
-RESID_TESTFILTERSTRING_TREE_TIP=Results of resolving the filter string
-
-
-#=============================================================
-# SELECT REMOTE OBJECT DIALOG...
-#=============================================================
-# unused
-#RESID_SELECTREMOTEOBJECT_PREFIX_QUICKFILTERSTRINGS_LABEL=Quick filter string:
-#RESID_SELECTREMOTEOBJECT_PREFIX_QUICKFILTERSTRINGS_TOOLTIP=Enter simple or generic name to change contents of tree view
-#RESID_SELECTREMOTEOBJECT_PREFIX_GETLISTBUTTON_LABEL=Get list
-#RESID_SELECTREMOTEOBJECT_PREFIX_GETLISTBUTTON_TOOLTIP=Resolves entered filter string and populates tree
-#RESID_SELECTREMOTEOBJECT_EXISTINGFILTERSTRINGS=Existing filter strings
-
-#=============================================================
-# PROMPT FOR PASSWORD DIALOG...
-#=============================================================
-RESID_PASSWORD_TITLE = Enter Password
-RESID_PASSWORD_LABEL = Password
-RESID_PASSWORD_TIP = Enter password for connecting to this host
-RESID_PASSWORD_SYSTEMTYPE_LABEL=System type
-RESID_PASSWORD_HOSTNAME_LABEL=Host name
-RESID_PASSWORD_USERID_LABEL = User ID
-RESID_PASSWORD_USERID_TIP = Enter user ID for connecting to this host
-RESID_PASSWORD_USERID_ISPERMANENT_LABEL = Save user ID
-RESID_PASSWORD_USERID_ISPERMANENT_TIP = Save the user ID for later use when connecting to this host
-RESID_PASSWORD_SAVE_LABEL = Save password
-RESID_PASSWORD_SAVE_TOOLTIP = Save the password for later use when connecting to this host with this user ID
-
-#=============================================================
-# CHANGE PASSWORD DIALOG...
-#=============================================================
-RESID_CHANGE_PASSWORD_TITLE=Change password
-RESID_CHANGE_PASSWORD_NEW_LABEL=New password:
-RESID_CHANGE_PASSWORD_NEW_TOOLTIP=Enter your new password
-RESID_CHANGE_PASSWORD_CONFIRM_LABEL=Re-enter to confirm:
-RESID_CHANGE_PASSWORD_CONFIRM_TOOLTIP=Enter your new password again to confirm it
-
-#=============================================================
-# SELECT FILTER POOL DIALOG...
-#=============================================================
-RESID_SELECTFILTERPOOLS_TITLE=Select Filter Pools
-RESID_SELECTFILTERPOOLS_PROMPT=Select filter pools to include in this connection
-
-#=============================================================
-# WORK WITH FILTER POOLS DIALOG...
-#=============================================================
-RESID_WORKWITHFILTERPOOLS_TITLE=Work With Filter Pools
-RESID_WORKWITHFILTERPOOLS_PROMPT=Work with filter pools
-
-#=============================================================
-# WORK WITH HISTORY DIALOG...
-#=============================================================
-RESID_WORKWITHHISTORY_TITLE=Work With History
-RESID_WORKWITHHISTORY_VERBAGE=Remove or re-order history for this GUI control
-RESID_WORKWITHHISTORY_PROMPT=History
-RESID_WORKWITHHISTORY_BUTTON_LABEL=...
-RESID_WORKWITHHISTORY_BUTTON_TIP=Bring up the Work With History dialog
-
-#=============================================================
-# Team View
-#=============================================================
-RESID_TEAMVIEW_SUBSYSFACTORY_VALUE=SubSystem factory
-RESID_TEAMVIEW_USERACTION_VALUE=User action
-RESID_TEAMVIEW_CATEGORY_VALUE=Category
-
-
-RESID_TEAMVIEW_CATEGORY_CONNECTIONS_LABEL=Connections
-RESID_TEAMVIEW_CATEGORY_CONNECTIONS_TOOLTIP=Lists all connections in this profile
-
-RESID_TEAMVIEW_CATEGORY_FILTERPOOLS_LABEL=Filter pools
-RESID_TEAMVIEW_CATEGORY_FILTERPOOLS_TOOLTIP=Lists all filter pools and filters in this profile, per subsystem type that contains them.
-
-RESID_TEAMVIEW_CATEGORY_USERACTIONS_LABEL=User actions
-RESID_TEAMVIEW_CATEGORY_USERACTIONS_TOOLTIP=Lists all user actions defined in this profile, per subsystem type that contains them.
-
-RESID_TEAMVIEW_CATEGORY_COMPILECMDS_LABEL=Compile commands
-RESID_TEAMVIEW_CATEGORY_COMPILECMDS_TOOLTIP=Lists all compile commands defined in this profile, per subsystem type that contains them.
-
-RESID_TEAMVIEW_CATEGORY_TARGETS_LABEL=Targets
-RESID_TEAMVIEW_CATEGORY_TARGETS_TOOLTIP=Lists all targets defined in this profile, per subsystem type that contains them. Targets are used in remote-enabled projects.
-
-
-#=============================================================
-# Specific actions. All actions support:
-# .label for button/menu-item text
-# .tooltip for hover help on pushbuttons
-#=============================================================
-##############################################################
-# ACTION LABELS AND DESCRIPTIONS...
-##############################################################
-ACTION_CASCADING_NEW_LABEL=New
-ACTION_CASCADING_NEW_TOOLTIP=Create a new resource
-
-ACTION_CASCADING_GOTO_LABEL=Go To
-ACTION_CASCADING_GOTO_TOOLTIP=Replace view with previous contents
-
-ACTION_CASCADING_GOINTO_LABEL=Go Into
-ACTION_CASCADING_GOINTO_TOOLTIP=Replace view with children of selected resource. Use Go To to return
-
-ACTION_CASCADING_OPEN_LABEL=Open
-ACTION_CASCADING_OPEN_TOOLTIP=Open in editor
-
-ACTION_CASCADING_OPENWITH_LABEL=Open With
-ACTION_CASCADING_OPENWITH_TOOLTIP=Open new view
-
-ACTION_CASCADING_WORKWITH_LABEL=Work With
-ACTION_CASCADING_WORKWITH_TOOLTIP=Work with resources
-
-ACTION_CASCADING_REMOTESERVERS_LABEL=Remote Servers
-ACTION_CASCADING_REMOTESERVERS_TOOLTIP=Start or stop a server/daemon on the remote system
-ACTION_REMOTESERVER_START_LABEL=Start
-ACTION_REMOTESERVER_START_TOOLTIP=Start this server/daemon on the remote system
-ACTION_REMOTESERVER_STOP_LABEL=Stop
-ACTION_REMOTESERVER_STOP_TOOLTIP=Stop this server/daemon on the remote system
-
-ACTION_CASCADING_EXPAND_LABEL=Expand
-ACTION_CASCADING_EXPAND_TOOLTIP=Expand children with or without subsetting criteria
-ACTION_CASCADING_EXPAND_TO_LABEL=Expand To
-ACTION_CASCADING_EXPAND_TO_TOOLTIP=Expand children with subsetting criteria
-ACTION_CASCADING_EXPAND_ALL_LABEL=All
-ACTION_CASCADING_EXPAND_ALL_TOOLTIP=Expand to show all children
-ACTION_CASCADING_EXPAND_BY_LABEL=By New Expansion Filter...
-ACTION_CASCADING_EXPAND_BY_TOOLTIP=Specify subsetting criteria for children
-ACTION_CASCADING_EXPAND_WORKWITH_LABEL=History...
-ACTION_CASCADING_EXPAND_WORKWITH_TOOLTIP=Work with history of expansion filters
-
-ACTION_CASCADING_VIEW_LABEL=View
-ACTION_CASCADING_VIEW_TOOLTIP=Set viewing options
-
-ACTION_CASCADING_USERID_LABEL=Default User ID
-ACTION_CASCADING_USERID_TOOLTIP=Set default user ID per remote system type
-
-ACTION_CASCADING_PREFERENCES_LABEL=Preferences
-ACTION_CASCADING_PREFERENCES_TOOLTIP=Go to the appropriate preferences page
-
-ACTION_CASCADING_TEAM_LABEL=Team
-ACTION_CASCADING_TEAM_TOOLTIP=Team repository related actions
-ACTION_TEAM_SYNC_LABEL=Synchronize with Stream
-ACTION_TEAM_SYNC_TOOLTIP=Send and receive changes to and from team repository
-
-ACTION_CASCADING_PULLDOWN_LABEL=Profile actions
-ACTION_CASCADING_PULLDOWN_TOOLTIP=Remote system profile actions
-
-ACTION_CASCADING_FILTERPOOL_NEWREFERENCE_LABEL=Filter Pool Reference
-ACTION_CASCADING_FILTERPOOL_NEWREFERENCE_TOOLTIP=Add new reference to existing filter pool
-
-ACTION_TEAM_RELOAD_LABEL=Reload Remote System Explorer
-ACTION_TEAM_RELOAD_TOOLTIP=Reload the Remote System Explorer contents, after synchronizing with a shared repository
-
-ACTION_PROFILE_ACTIVATE_LABEL=Active
-ACTION_PROFILE_ACTIVATE_TOOLTIP=Toggle profile between active and not active
-
-ACTION_PROFILE_MAKEACTIVE_LABEL=Make Active
-ACTION_PROFILE_MAKEACTIVE_TOOLTIP=Make the selected profile(s) active, so its connections, filters and so on are visible in the Remote Systems view.
-
-ACTION_PROFILE_MAKEINACTIVE_LABEL=Make Inactive
-ACTION_PROFILE_MAKEINACTIVE_TOOLTIP=Make the selected profile(s) inactive, so its connections, filters and so on are not visible in the Remote Systems view.
-
-ACTION_PROFILE_COPY_LABEL=Duplicate...
-ACTION_PROFILE_COPY_TOOLTIP=Create a copy of this profile, with a new name. Copies all connections, filters, user actions and compile commands.
-
-ACTION_NEWPROFILE_LABEL=Profile...
-ACTION_NEWPROFILE_TOOLTIP=Create a new profile
-
-ACTION_NEW_PROFILE_LABEL=New Profile...
-ACTION_NEW_PROFILE_TOOLTIP=Create a new profile
-
-ACTION_QUALIFY_CONNECTION_NAMES_LABEL=Qualify Connection Names
-ACTION_QUALIFY_CONNECTION_NAMES_TOOLTIP=Show connection and filter pool names qualified by their profile name
-
-ACTION_RESTORE_STATE_PREFERENCE_LABEL=Restore Previous State
-ACTION_RESTORE_STATE_PREFERENCE_TOOLTIP=If selected, the tree is re-expanded to its previous state, upon startup
-
-ACTION_PREFERENCE_SHOW_FILTERPOOLS_LABEL=Show Filter Pools
-ACTION_PREFERENCE_SHOW_FILTERPOOLS_TOOLTIP=Show filter pools when expanding subsystems
-
-ACTION_NEWCONN_LABEL=New Connection...
-ACTION_NEWCONN_TOOLTIP=Define a connection to remote system
-
-ACTION_ANOTHERCONN_LABEL=Connection...
-ACTION_ANOTHERCONN_TOOLTIP=Define another connection to the same or another remote system
-
-ACTION_UPDATECONN_LABEL=Change
-ACTION_UPDATECONN_TOOLTIP=Change information
-
-ACTION_NEWFILTERSTRING_LABEL=Filter String...
-ACTION_NEWFILTERSTRING_TOOLTIP=Create new filter string for this filter
-
-ACTION_ADDFILTERSTRING_LABEL=Add...
-ACTION_ADDFILTERSTRING_TOOLTIP=Create new filter string
-
-ACTION_UPDATEFILTER_LABEL=Change...
-ACTION_UPDATEFILTER_TOOLTIP=Change this filter's name or contents
-
-ACTION_UPDATEFILTERSTRING_LABEL=Change
-ACTION_UPDATEFILTERSTRING_TOOLTIP=Change this filter string
-
-ACTION_TESTFILTERSTRING_LABEL=Test
-ACTION_TESTFILTERSTRING_TOOLTIP=Test this filter string by resolving it
-
-ACTION_NEWFILTER_LABEL=Filter...
-ACTION_NEWFILTER_TOOLTIP=Create new filter for this filter pool
-
-ACTION_NEWNESTEDFILTER_LABEL=Nested Filter...
-ACTION_NEWNESTEDFILTER_TOOLTIP=Create new filter inside this filter
-
-ACTION_UPDATEFILTER_LABEL=Change...
-ACTION_UPDATEFILTER_TOOLTIP=Work with the filter strings in this filter
-
-ACTION_NEWFILTERPOOL_LABEL=Filter Pool...
-ACTION_NEWFILTERPOOL_TOOLTIP=Create new pool to hold filters
-
-ACTION_ADDFILTERPOOLREF_LABEL=Add Filter Pool Reference
-ACTION_ADDFILTERPOOLREF_TOOLTIP=Add a reference to another existing filter pool
-
-ACTION_RMVFILTERPOOLREF_LABEL=Remove Reference
-ACTION_RMVFILTERPOOLREF_TOOLTIP=Remove filter pool reference
-
-ACTION_SELECTFILTERPOOLS_LABEL=Select Filter Pools...
-ACTION_SELECTFILTERPOOLS_TOOLTIP=Add or remove filter pool references
-
-
-RESID_NEWFILTER_PAGE2_NAME_LABEL=Filter name:
-RESID_NEWFILTER_PAGE2_NAME_TOOLTIP=Enter a unique name for this filter, to show in the Remote Systems view
-RESID_NEWFILTER_PAGE2_PROFILE_LABEL=Owner profile:
-RESID_NEWFILTER_PAGE2_PROFILE_TOOLTIP=Select the profile whose default filter pool is to contain the new filter
-RESID_NEWFILTER_PAGE2_POOL_LABEL=Parent filter pool:
-RESID_NEWFILTER_PAGE2_POOL_TOOLTIP=Select the filter pool in which this filter will be created
-RESID_NEWFILTER_PAGE2_UNIQUE_LABEL=Only create filter in this connection
-RESID_NEWFILTER_PAGE2_UNIQUE_TOOLTIP=Select to create filter in this connection only, de-select to create filter in all applicable connections
-
-
-ACTION_WORKWITH_FILTERPOOLS_LABEL=Filter Pools...
-ACTION_WORKWITH_FILTERPOOLS_TOOLTIP=Create or manage filter pools
-
-ACTION_WORKWITH_WWFILTERPOOLS_LABEL=Work With Filter Pools...
-ACTION_WORKWITH_WWFILTERPOOLS_TOOLTIP=Create or manage filter pools
-
-
-ACTION_WORKWITH_PROFILES_LABEL=Work With Profiles
-ACTION_WORKWITH_PROFILES_TOOLTIP=Switch to the Team view to work with profiles
-
-ACTION_RUN_LABEL=Run
-ACTION_RUN_TOOLTIP=Run this prompt. Same as expanding it
-
-ACTION_SIMPLERENAME_LABEL=Rename...
-ACTION_SIMPLERENAME_TOOLTIP=Rename selected resources
-
-ACTION_IMPORT_TO_PROJECT_LABEL= Import To Project...
-ACTION_IMPORT_TO_PROJECT_TOOLTIP= Import contents of selected folder to a project
-
-ACTION_EXPORT_FROM_PROJECT_LABEL= Export From Project...
-ACTION_EXPORT_FROM_PROJECT_TOOLTIP= Export contents of project to the selected folder
-
-ACTION_REFRESH_ALL_LABEL=Refresh All
-ACTION_REFRESH_ALL_TOOLTIP=Refresh all resource information
-
-ACTION_REFRESH_LABEL=Refresh
-ACTION_REFRESH_TOOLTIP=Refresh information of selected resource
-
-
-ACTION_DELETE_LABEL=Delete...
-ACTION_DELETE_TOOLTIP=Prompts for confirmation to delete selected resources
-
-ACTION_RENAME_LABEL=Rename...
-ACTION_RENAME_TOOLTIP=Rename selected resources
-
-ACTION_NEWFILE_LABEL=File
-ACTION_NEWFILE_TOOLTIP=Create a new File
-
-ACTION_CLEAR_LABEL=Clear
-ACTION_CLEAR_TOOLTIP=Clear the default value for the selected key
-
-ACTION_CLEAR_ALL_LABEL=Remove All From View
-ACTION_CLEAR_ALL_TOOLTIP=Remove all items from the view
-
-ACTION_CLEAR_SELECTED_LABEL=Remove Selected From View
-ACTION_CLEAR_SELECTED_TOOLTIP=Remove the selection from the view
-
-ACTION_MOVEUP_LABEL=Move Up
-ACTION_MOVEUP_TOOLTIP=Move selected resources up by one
-
-ACTION_MOVEDOWN_LABEL=Move Down
-ACTION_MOVEDOWN_TOOLTIP=Move selected resources down by one
-
-ACTION_CONNECT_LABEL=Connect...
-ACTION_CONNECT_TOOLTIP=Connect to remote subsystem
-
-ACTION_CLEARPASSWORD_LABEL=Clear Password
-ACTION_CLEARPASSWORD_TOOLTIP=Clear password from memory and disk
-
-ACTION_DISCONNECT_LABEL=Disconnect
-ACTION_DISCONNECT_TOOLTIP=Disconnect from remote subsystem
-
-ACTION_DISCONNECTALLSUBSYSTEMS_LABEL=Disconnect
-ACTION_DISCONNECTALLSUBSYSTEMS_TOOLTIP=Disconnect all subsystems
-
-ACTION_CONNECT_ALL_LABEL=Connect
-ACTION_CONNECT_ALL_TOOLTIP=Connect all subsystems
-
-ACTION_CLEARPASSWORD_ALL_LABEL=Clear Passwords
-ACTION_CLEARPASSWORD_ALL_TOOLTIP=Clear passwords from memory and disk for all subsystems
-
-ACTION_SET_LABEL=Set
-ACTION_SET_TOOLTIP=Set the default value for the selected key
-
-ACTION_HISTORY_DELETE_LABEL=Remove
-ACTION_HISTORY_DELETE_TOOLTIP=Remove this item from the history
-
-ACTION_HISTORY_CLEAR_LABEL=Clear
-ACTION_HISTORY_CLEAR_TOOLTIP=Clear all items in this widget's history
-
-ACTION_HISTORY_MOVEUP_LABEL=Move Up
-ACTION_HISTORY_MOVEUP_TOOLTIP=Move selected item up in history
-
-ACTION_HISTORY_MOVEDOWN_LABEL=Move Down
-ACTION_HISTORY_MOVEDOWN_TOOLTIP=Move selected item down in history
-
-ACTION_HISTORY_MOVEFORWARD_LABEL=Move Forward
-ACTION_HISTORY_MOVEFORWARD_TOOLTIP=Move to the next item in history
-
-ACTION_HISTORY_MOVEBACKWARD_LABEL=Move Backward
-ACTION_HISTORY_MOVEBACKWARD_TOOLTIP=Move to the previous item in history
-
-ACTION_COPY_LABEL=Copy
-ACTION_COPY_TOOLTIP=Copy selected resources to same or different parent
-
-ACTION_CUT_LABEL=Cut
-ACTION_CUT_TOOLTIP=Copy selection to clipboard and delete
-
-ACTION_UNDO_LABEL=Undo
-ACTION_UNDO_TOOLTIP=Undo previous edit action
-
-ACTION_PASTE_LABEL=Paste
-ACTION_PASTE_TOOLTIP=Copy clipboard contents
-
-ACTION_COPY_CONNECTION_LABEL=Copy
-ACTION_COPY_CONNECTION_TOOLTIP=Copy selected connection to same or different profile
-
-ACTION_COPY_FILTERPOOL_LABEL=Copy
-ACTION_COPY_FILTERPOOL_TOOLTIP=Copy selected filter pool to same or different profile
-
-ACTION_COPY_FILTER_LABEL=Copy
-ACTION_COPY_FILTER_TOOLTIP=Copy selected filter to same or different filter pool
-
-ACTION_COPY_FILTERSTRING_LABEL=Copy
-ACTION_COPY_FILTERSTRING_TOOLTIP=Copy selected filter string to same or different filter
-
-ACTION_MOVE_LABEL=Move...
-ACTION_MOVE_TOOLTIP=Move selected resources to a different parent
-
-ACTION_MOVE_CONNECTION_LABEL=Move...
-ACTION_MOVE_CONNECTION_TOOLTIP=Move selected connection to a different profile
-
-ACTION_MOVE_FILTERPOOL_LABEL=Move...
-ACTION_MOVE_FILTERPOOL_TOOLTIP=Move selected filter pool to a different profile
-
-ACTION_MOVE_FILTER_LABEL=Move...
-ACTION_MOVE_FILTER_TOOLTIP=Move selected filter to a different filter pool
-
-ACTION_MOVE_FILTERSTRING_LABEL=Move...
-ACTION_MOVE_FILTERSTRING_TOOLTIP=Move selected filter string to a different filter
-
-ACTION_TEAM_BROWSEHISTORY_LABEL=Show in Resource History
-ACTION_TEAM_BROWSEHISTORY_TOOLTIP=Display the version history of this resource
-
-ACTION_TABLE_LABEL=Show in Table
-ACTION_TABLE_TOOLTIP=Display the contents of this resource in a table
-
-ACTION_MONITOR_LABEL=Monitor
-ACTION_MONITOR_TOOLTIP=Display the contents of this resource in a monitoring table
-
-ACTION_ERROR_LIST_LABEL=Show Subsequent Problems in Error List
-ACTION_ERROR_LIST_TOOLTIP=Display all errors, warnings and informational messages that appear from here on in this shell in the Remote Error List view.
-
-ACTION_FIND_FILES_LABEL=Find Files...
-ACTION_FIND_FILES_TOOLTIP=Search for files under the selected resource
-
-ACTION_SEARCH_LABEL=Search...
-ACTION_SEARCH_TOOLTIP=Opens a dialog to search for text and files
-
-ACTION_CANCEL_FIND_FILES_LABEL=Cancel Find Files
-ACTION_CANCEL_FIND_FILES_TOOLTIP=Terminate find files operation
-
-ACTION_CANCEL_SEARCH_LABEL=Cancel Search
-ACTION_CANCEL_SEARCH_TOOLTIP=Terminate search operation
-
-ACTION_LOCK_LABEL=Lock
-ACTION_LOCK_TOOLTIP=Disable the change of view input from another view.
-
-ACTION_UNLOCK_LABEL=Unlock
-ACTION_UNLOCK_TOOLTIP=Enable the change of view input from another view.
-
-ACTION_POSITIONTO_LABEL=Position To...
-ACTION_POSITIONTO_TOOLTIP=Specify objects for the view to scroll to and select
-
-ACTION_SUBSET_LABEL=Subset...
-ACTION_SUBSET_TOOLTIP=Specify objects for the view to show
-
-ACTION_PRINTLIST_LABEL=Print...
-ACTION_PRINTLIST_TOOLTIP=Print the current table
-
-ACTION_SELECTCOLUMNS_LABEL=Customize Table...
-ACTION_SELECTCOLUMNS_TOOLTIP=Select columns to display in the table
-
-ACTION_OPENEXPLORER_CASCADE_LABEL=Open Explorer
-ACTION_OPENEXPLORER_CASCADE_TOOLTIP=Explore this resource in its own view
-
-ACTION_OPENEXPLORER_SAMEPERSP_LABEL=In Same Perspective
-ACTION_OPENEXPLORER_SAMEPERSP_TOOLTIP=Open a new Remote Systems view rooted at this resource
-
-ACTION_OPENEXPLORER_DIFFPERSP_LABEL=In New Perspective
-ACTION_OPENEXPLORER_DIFFPERSP_TOOLTIP=Open a new Remote System Explorer perspective rooted at this resource
-
-ACTION_OPENEXPLORER_DIFFPERSP2_LABEL=Open in New Window
-ACTION_OPENEXPLORER_DIFFPERSP2_TOOLTIP=Open a new workbench window, with the Remote Systems view rooted at this resource
-
-ACTION_REMOTE_PROPERTIES_LABEL=Properties
-ACTION_REMOTE_PROPERTIES_TOOLTIP=Shows remote object properties
-
-ACTION_VIEWFORM_REFRESH_LABEL=Refresh
-ACTION_VIEWFORM_REFRESH_TOOLTIP=Refresh all resource information from disk
-
-ACTION_VIEWFORM_GETLIST_LABEL=Get List
-ACTION_VIEWFORM_GETLIST_TOOLTIP=Retrieve list and populate tree view
-
-
-ACTION_COMMANDSVIEW_SAVEASFILTER_LABEL=Save as Command Set
-ACTION_COMMANDSVIEW_SAVEASFILTER_TOOLTIP=Save the command as a new Command Set
-
-
-ACTION_EXPAND_SELECTED_LABEL=Expand
-ACTION_EXPAND_SELECTED_TOOLTIP=Expand selected elements. '+'
-
-ACTION_COLLAPSE_SELECTED_LABEL=Collapse
-ACTION_COLLAPSE_SELECTED_TOOLTIP=Collapse selected elements. '-'
-
-ACTION_COLLAPSE_ALL_LABEL=Collapse All
-ACTION_COLLAPSE_ALL_TOOLTIP=Collapse whole tree. Ctrl+-
-
-ACTION_EXPAND_BY_LABEL=Expand By
-ACTION_EXPAND_BY_TOOLTIP=Expand with subsetting
-
-ACTION_EXPAND_ALL_LABEL=All
-ACTION_EXPAND_ALL_TOOLTIP=Show all contents
-
-ACTION_EXPAND_OTHER_LABEL=All
-ACTION_EXPAND_OTHER_TOOLTIP=Specify subset criteria for expansion
-
-ACTION_SELECT_ALL_LABEL=Select All
-ACTION_SELECT_ALL_TOOLTIP=Select all child elements. '+'
-
-ACTION_SELECT_INPUT_LABEL=Select Input...
-ACTION_SELECT_INPUT_DLG=Select Input
-ACTION_SELECT_INPUT_TOOLTIP=Select the input for the view
-
-ACTION_DAEMON_START_LABEL=Start Communications Daemon
-ACTION_DAEMON_START_TOOLTIP=Start the RSE communications daemon
-ACTION_DAEMON_STOP_LABEL=Stop Communications Daemon
-ACTION_DAEMON_STOP_TOOLTIP=Stop the RSE communications daemon
-
-ACTION_SELECTCONNECTION_LABEL=Select Connection
-ACTION_SELECTCONNECTION_TOOLTIP=Bring up a dialog for selecting a connection
-
-RESID_USERID_PER_SYSTEMTYPE_LABEL=Default User ID
-RESID_USERID_PER_SYSTEMTYPE_TOOLTIP=Set default user ID per remote system type
-
-#=============================================================
-# Common actions OR menuitems. All actions support:
-# .label for button/menu-item text
-# .tooltip for hover help on pushbuttons
-#=============================================================
-RESID_CHANGE_PREFIX_LABEL=Change
-RESID_CHANGE_PREFIX_TOOLTIP=Change selected item
-
-RESID_CHANGEVIAENTRY_PREFIX_LABEL=Change
-RESID_CHANGEVIAENTRY_PREFIX_TOOLTIP=Replace selected list item with entry field contents
-
-RESID_ADDVIAENTRY_PREFIX_LABEL=Add
-RESID_ADDVIAENTRY_PREFIX_TOOLTIP=Add entry field contents to list
-
-RESID_COPYFROM_PREFIX_LABEL=Copy From...
-RESID_COPYFROM_PREFIX_TOOLTIP=Copy items here from another source
-
-RESID_COPYTO_PREFIX_LABEL=Copy To...
-RESID_COPYTO_PREFIX_TOOLTIP=Copy selected items
-
-RESID_DUPLICATE_PREFIX_LABEL=Duplicate
-RESID_DUPLICATE_PREFIX_TOOLTIP=Create copy of selected item
-
-
-##############################################################
-# Content Assist action
-##############################################################
-ACTION_CONTENT_ASSIST=Content Assist@Ctrl+SPACE
-ACTION_SHOW_TOOLTIP_INFORMATION=Show Tooltip Description@F2
-
-##############################################################
-# COMMON POPUP MENU ITEMS. MNEMONICS WILL BE ASSIGNED AUTOMATICALLY, DON'T SET THEM HERE.
-# THESE ARE MENU-ONLY ITEMS, VS MENU OR BUTTON ACTIONS.
-# THEY GENERALLY ARE USED IN THE SYSTEM TREE VIEW SOMEWHERE.
-##############################################################
-
-
-
-
-##############################################################
-# ERROR MESSAGES
-##############################################################
-
-RESID_MSG_UNABLETOLOAD=Unable to load message &1
-
-
-##############################################################
-# REMOTE FILE SYSTEM TRANSLATABLE STRINGS
-##############################################################
-#=============================================================
-# DEFAULT FILTERS...
-#=============================================================
-#=============================================================
-# NEW FILE FILTER WIZARD...
-#=============================================================
-
-#=============================================================
-# NEW FILE FILTER STRING WIZARD...
-#=============================================================
-
-
-#=============================================================
-# CHANGE FILE FILTER DIALOG...
-#=============================================================
-
-#=============================================================
-# CHANGE FILE FILTER STRING DIALOG...
-#=============================================================
-
-#=============================================================
-# SELECT DIRECTORY DIALOG...
-#=============================================================
-
-
-#=============================================================
-# SELECT FILE DIALOG...
-#=============================================================
-
-
-#=============================================================
-# SELECT FILE OR MEMBER DIALOG...
-#=============================================================
-
-
-#=============================================================
-# PROMPT FOR HOME FOLDER DIALOG...
-#=============================================================
-
-
-#=============================================================
-# FILE SUBSYSTEM ACTIONS...
-#=============================================================
-
-
-
-
-
-
-
-
-#=============================================================
-# REMOTE FILE SYSTEM PROPERTY VALUES
-#=============================================================
-
-#=============================================================
-# REMOTE FILE PROPERTIES PAGE...
-#=============================================================
-
-#=============================================================
-# RE-USABLE COMPOSITE FILE SYSTEM WIDGETS
-#=============================================================
-#=============================================================
-# REMOTE FILE SYSTEM EXCEPTION ERROR MESSAGES
-#=============================================================
-
-#=============================================================
-# REMOTE FILE SYSTEM ERROR MESSAGES
-#=============================================================
-
-# Remote editing progress monitor messages
-
-# Remote edit functionality
-
-# iSeries Editor Save As... Dialog
-
-# CODE editor
-
-# Default Filter Pool names
-RESID_DEFAULT_FILTERPOOL=%1 Filter Pool
-RESID_PERCONNECTION_FILTERPOOL=%1 Filter Pool for connection %2
-
-# Default Team profile name
-
-#==============================================================
-# Signon Information Preferences Page
-#==============================================================
-RESID_PREF_SIGNON_DESCRIPTION= The following user IDs have password information associated with them:
-
-RESID_PREF_SIGNON_HOSTNAME_TITLE= Host Name
-RESID_PREF_SIGNON_HOSTNAME_LABEL= Host name:
-RESID_PREF_SIGNON_HOSTNAME_TOOLTIP= Hostname or IP address of target system
-
-RESID_PREF_SIGNON_SYSTYPE_TITLE= System Type
-RESID_PREF_SIGNON_SYSTYPE_LABEL= System type:
-RESID_PREF_SIGNON_SYSTYPE_TOOLTIP= System type for the remote system
-
-RESID_PREF_SIGNON_USERID_TITLE= User ID
-RESID_PREF_SIGNON_USERID_LABEL= User ID:
-RESID_PREF_SIGNON_USERID_TOOLTIP= User ID used to signon to the remote system
-
-RESID_PREF_SIGNON_ADD_LABEL= Add...
-RESID_PREF_SIGNON_ADD_TOOLTIP= Add a new user ID and password
-
-RESID_PREF_SIGNON_REMOVE_LABEL= Remove
-RESID_PREF_SIGNON_REMOVE_TOOLTIP= Remove the selected user ID and password
-
-RESID_PREF_SIGNON_CHANGE_LABEL= Change...
-RESID_PREF_SIGNON_CHANGE_TOOLTIP= Change the password for the selected user ID
-
-RESID_PREF_SIGNON_PASSWORD_LABEL= Password:
-RESID_PREF_SIGNON_PASSWORD_TOOLTIP= Enter the password for the remote system
-
-RESID_PREF_SIGNON_PASSWORD_VERIFY_LABEL= Verify password:
-RESID_PREF_SIGNON_PASSWORD_VERIFY_TOOLTIP= Re-enter the password for the remote system
-
-RESID_PREF_SIGNON_ADD_DIALOG_TITLE= New Saved Password
-RESID_PREF_SIGNON_CHANGE_DIALOG_TITLE= Change Saved Password
-
-###################################################################################
-######################## Remote Search View ############################
-###################################################################################
-RESID_SEARCH_VIEW_DEFAULT_TITLE= Remote Search
-RESID_SEARCH_REMOVE_SELECTED_MATCHES_LABEL= Remove Selected Matches
-RESID_SEARCH_REMOVE_SELECTED_MATCHES_TOOLTIP= Remove selected matches
-RESID_SEARCH_REMOVE_ALL_MATCHES_LABEL= Remove All Matches
-RESID_SEARCH_REMOVE_ALL_MATCHES_TOOLTIP= Remove all matches
-RESID_SEARCH_CLEAR_HISTORY_LABEL= Clear History
-RESID_SEARCH_CLEAR_HISTORY_TOOLTIP= Clear all search results
-
-###################################################################################
-############################ Table View Dlgs ############################
-###################################################################################
-RESID_TABLE_SELECT_COLUMNS_AVAILABLE_LABEL= Available contents:
-RESID_TABLE_SELECT_COLUMNS_DISPLAYED_LABEL= Displayed contents:
-RESID_TABLE_SELECT_COLUMNS_DESCRIPTION_LABEL= Choose contents to display in the table view.
-
-
-
-###################################################################################
-############################ Monitor View ############################
-###################################################################################
-RESID_MONITOR_POLL_INTERVAL_LABEL=Wait Interval
-RESID_MONITOR_POLL_INTERVAL_TOOLTIP=Specify how long to wait before refreshing the view
-RESID_MONITOR_POLL_LABEL=Poll
-RESID_MONITOR_POLL_TOOLTIP=Periodically refresh the contents
-RESID_MONITOR_POLL_CONFIGURE_POLLING_LABEL=Poll Configuration
-RESID_MONITOR_POLL_CONFIGURE_POLLING_EXPAND_TOOLTIP=Expand to configure polling
-RESID_MONITOR_POLL_CONFIGURE_POLLING_COLLAPSE_TOOLTIP=Collapse to hide polling controls
-
-###################################################################################
-############################ Work With Compile Commands #####################
-###################################################################################
-
-
-##################################################################################
-############################ Browse menu item ##############################
-##################################################################################
-ACTION_CASCADING_BROWSEWITH_LABEL= Browse With
-ACTION_CASCADING_BROWSEWITH_TOOLTIP= Browse resource
-
-##################################################################################
-############################ Compare menu item #############################
-##################################################################################
-ACTION_CASCADING_COMPAREWITH_LABEL= Compare With
-ACTION_CASCADING_COMPAREWITH_TOOLTIP= Compare remote resources
-##################################################################################
-############################ Replace menu item #############################
-##################################################################################
-ACTION_CASCADING_REPLACEWITH_LABEL= Replace With
-ACTION_CASCADING_REPLACEWITH_TOOLTIP= Remote remote resources with local editions
-
-#=============================================================
-# SELECT REMOTE FILES RE-USABLE WIDGET...
-#=============================================================
-RESID_SELECTFILES_SELECTTYPES_BUTTON_ROOT_LABEL=Select Types
-RESID_SELECTFILES_SELECTTYPES_BUTTON_ROOT_TOOLTIP=Select file types to filter by
-RESID_SELECTFILES_SELECTALL_BUTTON_ROOT_LABEL=Select All
-RESID_SELECTFILES_SELECTALL_BUTTON_ROOT_TOOLTIP=Select all files
-RESID_SELECTFILES_DESELECTALL_BUTTON_ROOT_LABEL=Deselect All
-RESID_SELECTFILES_DESELECTALL_BUTTON_ROOT_TOOLTIP=Deselect all files
-
-
-
-
-# Additions May 15, 2003
-
-##################################################################################
-############################ Offline Support #########################
-##################################################################################
-RESID_OFFLINE_LABEL= Offline
-RESID_OFFLINE_WORKOFFLINE_LABEL= Work Offline
-RESID_OFFLINE_WORKOFFLINE_TOOLTIP= Switch the connection between offline and online modes
-RESID_OFFLINE_WORKOFFLINE_DESCRIPTION= Switch the connection between offline and online modes
-
-#=============================================================
-# ENTER OR SELECT FILE DIALOG...
-#=============================================================
-
-
-##===============================
-# Quick Open
-#================================
-
-#=============================================================
-# RE-USABLE COMPOSITE FILE SYSTEM WIDGETS
-#=============================================================
-
-#==========================
-# Generic Editor Actions
-#==========================
-
-
-###################################################################################
-############################ Table View Dlgs ############################
-###################################################################################
-
-
-RESID_TABLE_POSITIONTO_LABEL=Position To
-RESID_TABLE_POSITIONTO_ENTRY_TOOLTIP=Enter the name filter for the objects that the view is to locate
-RESID_TABLE_SUBSET_LABEL=Subset
-RESID_TABLE_SUBSET_ENTRY_TOOLTIP=Enter a filter pattern for the specified property.
-RESID_TABLE_PRINTLIST_TITLE=Remote Systems Details
-
-
-
-RESID_TABLE_SELECT_COLUMNS_LABEL=Customize Table
-RESID_TABLE_SELECT_COLUMNS_TOOLTIP=Select columns to display in the table
-
-RESID_TABLE_SELECT_COLUMNS_ADD_LABEL=Add>
-RESID_TABLE_SELECT_COLUMNS_ADD_TOOLTIP=Add the selected properties to be displayed as a column in the table
-
-RESID_TABLE_SELECT_COLUMNS_REMOVE_LABEL= <Remove
-RESID_TABLE_SELECT_COLUMNS_REMOVE_TOOLTIP=Remove the selected column from the table display
-
-RESID_TABLE_SELECT_COLUMNS_UP_LABEL=Move Up
-RESID_TABLE_SELECT_COLUMNS_UP_TOOLTIP=Move the selected column to the left in the table
-
-RESID_TABLE_SELECT_COLUMNS_DOWN_LABEL=Move Down
-RESID_TABLE_SELECT_COLUMNS_DOWN_TOOLTIP=Move the selected column to the right in the table
-
-RESID_TABLE_SELECT_COLUMNS_AVAILABLE_LABEL=Available contents:
-
-RESID_TABLE_SELECT_COLUMNS_DISPLAYED_LABEL=Displayed contents:
-RESID_TABLE_SELECT_COLUMNS_DESCRIPTION_LABEL=Choose contents to display in the table view.
-
-
-#### connectors and services $$$$
-RESID_PROPERTIES_SERVICES_NAME=Services
-RESID_PROPERTIES_SERVICES_LABEL=Available Services
-RESID_PROPERTIES_SERVICES_TOOLTIP=
-RESID_PROPERTIES_DESCRIPTION_LABEL=Description
-RESID_PROPERTIES_CONNECTOR_SERVICES_LABEL=Connector Services
-RESID_PROPERTIES_CONNECTOR_SERVICES_TOOLTIP=
-RESID_PROPERTIES_FACTORIES_LABEL=Configuration
-RESID_PROPERTIES_FACTORIES_TOOLTIP=
-RESID_PROPERTIES_PROPERTIES_LABEL=Properties
-RESID_PROPERTIES_PROPERTIES_TOOLTIP=
-
-ACTION_COMPILE_NOPROMPT_LABEL=Compile
-#### RSE Model Objects ####
-RESID_MODELOBJECTS_FILTERSTRING_DESCRIPTION=A filter string is a single string in a filter. It describes which files will pass through the filter.
-RESID_MODELOBJECTS_HOSTPOOL_DESCRIPTION=A host pool is a group of hosts. There is one host pool associated with each profile.
-RESID_MODELOBJECTS_PROFILE_DESCRIPTION=Your profile is the object with which all your unique settings and RSE objects such as connections are associated.
-RESID_MODELOBJECTS_SERVERLAUNCHER_DESCRIPTION=The Server Launcher is an object for storing configuration details about how to launch servers on the remote host.
-RESID_MODELOBJECTS_FILTER_DESCRIPTION=A filter is a collection of filter strings that determines which files will pass through it.
-RESID_MODELOBJECTS_FILTERPOOL_DESCRIPTION=A filter pool is a group of filters. There is one filter pool associated with each profile.
-
-RESID_SERVICESFORM_CONFIGURATION_TOOLTIP=Select the configuration you wish to use to enable this subsystem. A configuration comprises a connector service and a subsystem service.
-RESID_SERVICESFORM_SERVICES_TOOLTIP=Select the elements of your chosen configuration and you can view and edit their properties in the Properties section.
-RESID_SERVICESFORM_CONNECTORSERVICES_TOOLTIP=Select the connector services available to you for this connection and you can view and edit their properties in the Properties section.
-RESID_SERVICESFORM_PROPERTIES_TOOLTIP=Edit the properties of the item selected in the Available Services section by clicking on the property's value.
-
-## Do not show this message again
-RESID_DO_NOT_SHOW_MESSAGE_AGAIN_LABEL = Do not show this message again
-RESID_DO_NOT_SHOW_MESSAGE_AGAIN_TOOLTIP = Select this option if you do not want to see this message again
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemSortableSelection.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemSortableSelection.java
deleted file mode 100644
index 995e20e3a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemSortableSelection.java
+++ /dev/null
@@ -1,132 +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;
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-/**
- * The TreeViewer widget does not seem to guarantee that multiple-selections are
- * returned sorted in order of appearance in the tree. Some action require they be,
- * such as MoveUp and MoveDown. This class captures the information for each selected item
- * and permits sorting via position, using the Arrays helper class in java.util.
- */
-public class SystemSortableSelection implements Comparable
-{
-
- private Object selectedObject;
- private int position;
-
- /**
- * Constructor for SystemSortableSelection
- */
- public SystemSortableSelection(Object selectedObject)
- {
- super();
- this.selectedObject = selectedObject;
- }
-
- /**
- * Get the selected object
- */
- public Object getSelectedObject()
- {
- return selectedObject;
- }
-
- /**
- * Set the position of the selected object within its parent list
- */
- public void setPosition(int position)
- {
- this.position = position;
- }
-
- /**
- * Get the poisition of the selected object within its parent list
- */
- public int getPosition()
- {
- return position;
- }
-
- /**
- * @see Comparable#compareTo(Object)
- */
- public int compareTo(Object other)
- {
- SystemSortableSelection otherSelectableObject = (SystemSortableSelection)other;
- int otherPosition = otherSelectableObject.getPosition();
- if (position < otherPosition)
- return -1;
- else if (position == otherPosition)
- return 0;
- else
- return 1;
- }
-
- public boolean equals(Object other)
- {
- if (!(other instanceof SystemSortableSelection))
- return super.equals(other);
- SystemSortableSelection otherSelectableObject = (SystemSortableSelection)other;
- int otherPosition = otherSelectableObject.getPosition();
- return (position == otherPosition);
- }
-
- /**
- * Convert structured selection into an array of these objects.
- * YOU MUST CALL SET POSITION AFTER FOR EACH ITEM, BEFORE YOU CAN SORT THIS ARRAY!
- */
- public static SystemSortableSelection[] makeSortableArray(IStructuredSelection selection)
- {
- SystemSortableSelection[] array = new SystemSortableSelection[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- array[idx++] = new SystemSortableSelection(i.next());
- return array;
- }
-
- /**
- * IF YOU HAVE CALLED SETPOSITION ON EACH ITEM IN THE GIVEN ARRAY, THIS WILL SORT THAT ARRAY
- * BY THE POSITION
- */
- public static void sortArray(SystemSortableSelection[] sortableArray)
- {
- Arrays.sort(sortableArray);
- }
-
- /**
- * IF YOU HAVE CALLED SETPOSITION ON EACH ITEM IN THE GIVEN ARRAY, AND CALLED SORTARRAY,
- * THIS CONVERTS INTO A SORTED ARRAY THAT JUST HAS THE ORIGINAL OBJECTS IN IT FROM THE SELECTION LIST.
- */
- public static Object[] getSortedObjects(SystemSortableSelection[] sortedArray, Object[] outputArray)
- {
- //System.out.println("in SystemSortableSelection#getSortedObjects:");
- for (int idx=0;idx<outputArray.length; idx++)
- {
- outputArray[idx] = sortedArray[idx].getSelectedObject();
- //System.out.println("...selected Object: " + outputArray[idx]);
- //System.out.println("...position.......: " + sortedArray[idx].getPosition());
- }
- //System.out.println();
- return outputArray;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemTabFolderLayout.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemTabFolderLayout.java
deleted file mode 100644
index 952256c6c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemTabFolderLayout.java
+++ /dev/null
@@ -1,61 +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;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Layout;
-
-public class SystemTabFolderLayout extends Layout
-{
-
- protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {
- if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
- return new Point(wHint, hHint);
-
- Control [] children = composite.getChildren ();
- int count = children.length;
- int maxWidth = 0, maxHeight = 0;
- for (int i=0; i<count; i++) {
- Control child = children [i];
- Point pt = child.computeSize (SWT.DEFAULT, SWT.DEFAULT, flushCache);
- maxWidth = Math.max (maxWidth, pt.x);
- maxHeight = Math.max (maxHeight, pt.y);
- }
-
- if (wHint != SWT.DEFAULT)
- maxWidth= wHint;
- if (hHint != SWT.DEFAULT)
- maxHeight= hHint;
-
- return new Point(maxWidth, maxHeight);
-
- }
- protected void layout (Composite composite, boolean flushCache) {
- Rectangle rect= composite.getClientArea();
-
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- children[i].setBounds(rect);
- }
-
- // System.out.println("Setting bounds of each page to " + rect);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java
deleted file mode 100644
index 51ac63184..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java
+++ /dev/null
@@ -1,1480 +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:
- * Javier Montalvo Orús (Symbian) - Bug 149151: New Connection first page should use a Listbox for systemtype
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Locale;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.widgets.InheritableEntryField;
-import org.eclipse.rse.ui.widgets.SystemHistoryCombo;
-import org.eclipse.rse.ui.widgets.SystemHostCombo;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Static methods that can be used when writing SWT GUI code.
- * They simply make it more productive.
- */
-public class SystemWidgetHelpers {
- public static boolean traceHelpIDs = false;
- public static Label previousLabel;
-
- /**
- * This is the most flexible composite creation method.
- * @param parent Parent composite
- * @param parentSpan number of columns this is to span in the parent's composite
- * @param numColumns number of columns this composite is to have
- * @param border true if you want to show an etched border around the composite
- * @param label optional label to show in the border. Forces border to true
- * @param marginSize the number pixels around the composite. -1 means Eclipse default
- * @param spacingSize the number pixels around the composite controls. -1 means Eclipse default
- */
- public static Composite createComposite(Composite parent, int parentSpan, int numColumns, boolean border, String label, int marginSize, int spacingSize) {
- return createAlignedComposite(parent, parentSpan, numColumns, border, label, marginSize, spacingSize, GridData.FILL);
- }
-
- /**
- * Creates a composite with vertical alignment GridData.VERTICAL_ALIGN_BEGINNING.
- * @param parent Parent composite
- * @param parentSpan number of columns this is to span in the parent's composite
- * @param numColumns number of columns this composite is to have
- * @param border true if you want to show an etched border around the composite
- * @param label optional label to show in the border. Forces border to true
- * @param marginSize the number pixels around the composite. -1 means Eclipse default
- * @param spacingSize the number pixels around the composite controls. -1 means Eclipse default
- */
- public static Composite createVerticalBeginComposite(Composite parent, int parentSpan, int numColumns, boolean border, String label, int marginSize, int spacingSize) {
- return createAlignedComposite(parent, parentSpan, numColumns, border, label, marginSize, spacingSize, GridData.VERTICAL_ALIGN_BEGINNING);
- }
-
- /**
- * Created a composite
- */
- private static Composite createAlignedComposite(Composite parent, int parentSpan, int numColumns, boolean border, String label, int marginSize, int spacingSize, int verticalAlignment) {
- //border = true;
- boolean borderNeeded = border;
- if (label != null)
- borderNeeded = true; // force the case
- int style = SWT.NULL;
- if (borderNeeded)
- style |= SWT.SHADOW_ETCHED_IN;
- Composite composite = null;
- if (borderNeeded) {
- composite = new Group(parent, style);
- if (label != null)
- ((Group) composite).setText(label);
- } else {
- composite = new Composite(parent, style);
- }
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- if (marginSize != -1) {
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- }
- if (spacingSize != -1) {
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- }
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- data.horizontalSpan = parentSpan;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
-
- data.verticalAlignment = verticalAlignment;
- data.grabExcessVerticalSpace = false;
-
- composite.setLayoutData(data);
- return composite;
- }
-
- /**
- * Creates composite control and sets the default layout data.
- * @param parent GridLayout composite to put the new group composite into.
- * @param numColumns Number of columns the new group will contain.
- */
- public static Composite createComposite(Composite parent, int numColumns) {
- boolean testing = false; //true;
- if (testing)
- return createComposite(parent, 1, numColumns, true, Integer.toString(numColumns), -1, -1);
- else
- return createComposite(parent, 1, numColumns, false, null, -1, -1);
- }
-
- /**
- * Creates group composite control and sets the default layout data.
- * Group composites show a visible border line and optional text in it.
- * @param parent GridLayout composite to put the new group composite into.
- * @param numColumns Number of columns the new group will contain.
- * @param label Text to display in the group border. Can be null.
- */
- public static Group createGroupComposite(Composite parent, int numColumns, String label) {
- return (Group) createComposite(parent, 1, numColumns, true, label, -1, -1);
- }
-
- /**
- * Creates "tight" composite control and sets the default layout data.
- * A tight composite is one with no vertical or horizontal spacing, or margin spacing.
- * @param parent GridLayout composite to put the new group composite into.
- * @param numColumns Number of columns the new group will contain.
- */
- public static Composite createTightComposite(Composite parent, int numColumns) {
- return createComposite(parent, 1, numColumns, false, null, 0, 0);
- }
-
- /**
- * Creates "flush" composite control and sets the default layout data.
- * A flush composite is one with no margin spacing but normal inter-component spacing
- * @param parent GridLayout composite to put the new group composite into.
- * @param numColumns Number of columns the new group will contain.
- */
- public static Composite createFlushComposite(Composite parent, int numColumns) {
- return createComposite(parent, 1, numColumns, false, null, 0, -1);
- }
-
- /**
- * Creates a label for use a simple filler, to eat up space. This is for a rigid
- * filler that doesn't consume space.
- * @param parent Composite to put the field into.
- * @param span Horizontal span
- * @param widthHint How wide to make it. Pass -1 to use SWT default
- */
- public static Label createRigidFillerLabel(Composite parent, int span, int widthHint) {
- Label label = new Label(parent, SWT.CENTER);
- label.setText(" "); //$NON-NLS-1$
- GridData data = new GridData();
- data.horizontalSpan = span;
- //System.out.println("in createRigidFillerLabel. span = " + span);
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = false;
- if (widthHint != -1)
- data.widthHint = widthHint;
- //else
- // data.widthHint = 5;
- label.setLayoutData(data);
- return label;
- }
-
- /**
- * Creates a label instance and inserts it into a given GridLayout.
- * @param parent GridLayout composite to put the field into.
- * @param text Text to display in the label.
- */
- public static Label createLabel(Composite parent, String text) {
- return createLabel(parent, text, 1);
- }
-
- /**
- * Creates a label instance and inserts it into a given GridLayout.
- * @param parent Composite to put the field into.
- * @param text Text to display in the label.
- * @param span Horizontal span
- */
- public static Label createLabel(Composite parent, String text, int span) {
- return createLabel(parent, text, span, false);
- }
-
- /**
- * Creates a label instance and inserts it into a given GridLayout, optionally
- * with a border style
- * @param parent Composite to put the field into.
- * @param text Text to display in the label.
- * @param span Horizontal span
- * @param wantBorder true to place border around the label
- */
- public static Label createLabel(Composite parent, String text, int span, boolean wantBorder) {
- int style = SWT.LEFT;
- if (wantBorder)
- style |= SWT.BORDER;
- if (span > 1)
- style |= SWT.WRAP;
- Label label = new Label(parent, style);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- //data.grabExcessHorizontalSpace = true;
- label.setLayoutData(data);
- return label;
- }
-
- /**
- * Creates a label instance and inserts it into a given GridLayout. Supports tooltip text
- * @param parent GridLayout composite to put the field into.
- * @param text
- * @param tooltip
- */
- public static Label createLabel(Composite parent, String text, String tooltip)
- {
- Label label = createLabel(parent, text);
- setToolTipText(label, tooltip);
- return label;
- }
-
- /**
- * Creates a label instance and inserts it into a given GridLayout.
- * @param parent Composite to put the field into.
- * @param text
- * @param tooltip
- * @param span Horizontal span
- * @param wantBorder true to place border around the label
- */
- public static Label createLabel(Composite parent, String text, String tooltip, int span, boolean wantBorder)
- {
- Label label = createLabel(parent, text, span, wantBorder);
- setToolTipText(label, tooltip);
- return label;
- }
-
- /**
- * Create a pair of labels, the first being a prompt and the second being a value. A colon
- * is appended to the text of the first label. The text value of the second will be set to "".
- * <p>
- * The first label is set to not grab excess horizontal space, while the second one is, since
- * its contents are variable.
- * <p>
- * To help with initial sizing, the widthHint of the second is set to 100.
- * <p>
- * If you need a handle to the prompting label, immediately call {@link #getLastLabel()}
- *
- * @param parent composite to put the fields into. Will be added sequentially
- * @param label
- * @param tooltip
- * @param wantBorder true if a border is desired around the second label (the value vs the prompt)
- * @return the second label created. Use setText to place the value in it.
- */
- public static Label createLabeledLabel(Composite parent, String label, String tooltip, boolean wantBorder) {
- previousLabel = createLabel(parent, label);
- String text = previousLabel.getText();
- previousLabel.setText(appendColon(text));
- ((GridData) previousLabel.getLayoutData()).grabExcessHorizontalSpace = false;
- Label label2 = createLabel(parent, "", 1, wantBorder); //$NON-NLS-1$
- ((GridData) label2.getLayoutData()).grabExcessHorizontalSpace = true;
- ((GridData) label2.getLayoutData()).widthHint = 100;
- setToolTipText(label2, tooltip);
- return label2;
- }
-
- /**
- * Return the prompting label from the last call to createLabeledXXXX.
- * These methods only return the second control, but we sometimes need access to the label.
- */
- public static Label getLastLabel() {
- return previousLabel;
- }
-
- /**
- * Create a spacer line. No widget returned so we have the freedom to change it over time
- */
- public static void createSpacerLine(Composite parent, int columnSpan, boolean wantBorder) {
- int style = SWT.LEFT; // | SWT.SEPARATOR;
- if (wantBorder)
- style |= SWT.BORDER | SWT.LINE_SOLID;
- if (columnSpan > 1)
- style |= SWT.WRAP;
- Label label = new Label(parent, style);
- //label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = columnSpan;
- data.horizontalAlignment = GridData.FILL;
- //data.grabExcessHorizontalSpace = true;
- label.setLayoutData(data);
- }
-
-
-
- /**
- * Creates a widget for displaying text verbiage that spans multiple lines. Takes resolved text vs resource bundle id.
- * The returned widget is not typed so we can easily change it in the future if we decide on a better widget.
- * @param parent Composite to put the field into.
- * @param text String is the verbiage text to display
- * @param span Horizontal span
- * @param border true if you want a border around the verbiage
- * @param widthHint number of pixels to limit width to before wrapping. 200 is a reasonable number
- * @return the Label widget, in case you want to tweak it
- */
- public static Label createVerbiage(Composite parent, String text, int span, boolean border, int widthHint) {
- Label widget = new Label(parent, border ? (SWT.LEFT | SWT.WRAP | SWT.BORDER) : (SWT.LEFT | SWT.WRAP));
- widget.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- data.widthHint = widthHint;
- data.grabExcessHorizontalSpace = true;
- widget.setLayoutData(data);
- return widget;
- }
-
- /**
- * Create a labeled verbage (wrappable label) field and insert it into a GridLayout, and assign tooltip text.
- * After calling this, you must call setText on the result to set its contents.
- * <p>
- * If you need a handle to the prompting label, immediately call {@link #getLastLabel()}
- *
- * @param parent composite to put the field into.
- * @param labelText
- * @param tooltip
- * @param span Horizontal span
- * @param border true if you want a border around the verbage
- * @param widthHint number of pixels to limit width to before wrapping. 200 is a reasonable number
- * @return Label created.
- */
- public static Label createLabeledVerbage(Composite parent, String labelText, String tooltip, int span, boolean border, int widthHint) {
- previousLabel = createLabel(parent, appendColon(labelText));
- Label verbage = createVerbiage(parent, labelText, span, border, widthHint);
- setToolTipText(previousLabel, tooltip);
- setToolTipText(verbage, tooltip);
- return verbage;
- }
-
- /**
- * Create a label to show a command string as it is being built-up in a dialog
- * This version uses a default height of 3 normal lines.
- */
- public static Label createCommandStatusLine(Composite parent, int horizontalSpan) {
- return createCommandStatusLine(parent, horizontalSpan, 3);
- }
-
- /**
- * Create a label to show a command string as it is being built-up in a dialog.
- * This version allows you specify how tall to make it, in terms of normal line height.
- */
- public static Label createCommandStatusLine(Composite parent, int horizontalSpan, int heightInLines) {
- Label commandSoFar = new Label(parent, SWT.LEFT | SWT.WRAP);
- int dx = commandSoFar.getBounds().height;
- //System.out.println("Default label height = " + dx); ALWAYS 0!
- if (dx == 0)
- //dx = 12; // what else?
- dx = 15; // d47377
- GridData data = new GridData();
- data.horizontalSpan = horizontalSpan;
- data.horizontalAlignment = GridData.FILL;
- //data.widthHint = 300;
- data.heightHint = heightInLines * dx;
- data.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
- //data.grabExcessVerticalSpace = true;
- commandSoFar.setLayoutData(data);
- return commandSoFar;
- }
-
- /**
- * Create a text field and insert it into a GridLayout.
- * Assign the listener to the passed in implementer of Listener.
- * @param parent GridLayout composite to put the field into.
- * @param listener Listener object to listen for events. Can be null.
- */
- public static Text createTextField(Composite parent, Listener listener) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
- if (listener != null)
- text.addListener(SWT.Modify, listener);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = 150;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- text.setLayoutData(data);
- return text;
- }
-
- /**
- * Create a text field and insert it into a GridLayout, and assign tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * @param parent composite to put the field into.
- * @param listener object to listen for events. Can be null.
- * @param toolTip tooltip text
- */
- public static Text createTextField(Composite parent, Listener listener, String toolTip) {
- Text text = createTextField(parent, listener);
- setToolTipText(text, toolTip);
- return text;
- }
-
- /**
- * Create a labeled text field and insert it into a GridLayout, and assign tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * <p>
- * If you need a handle to the prompting label, immediately call {@link #getLastLabel()}
- *
- * @param parent composite to put the field into.
- * @param listener object to listen for events. Can be null.
- * @param labelText the label
- * @param tooltip the tooltip
- * @return TextField created.
- */
- public static Text createLabeledTextField(Composite parent, Listener listener, String labelText, String tooltip) {
- previousLabel = createLabel(parent, appendColon(labelText));
- Text entry = createTextField(parent, listener, tooltip);
- setToolTipText(previousLabel, tooltip);
- return entry;
- }
-
- /**
- * Create a readonly text field and insert it into a GridLayout.
- * @param parent GridLayout composite to put the field into.
- */
- public static Text createReadonlyTextField(Composite parent) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- text.setEnabled(false);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = 150; // defect 45789
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- text.setLayoutData(data);
- return text;
- }
-
- /**
- * Create a readonly text field and insert it into a GridLayout,
- * and assign tooltip text.
- * @param parent composite to put the field into.
- * @param toolTip
- */
- public static Text createReadonlyTextField(Composite parent, String toolTip)
- {
- Text text = createReadonlyTextField(parent);
- setToolTipText(text, toolTip);
- return text;
- }
-
- /**
- * Create a labeled readonly text field and insert it into a GridLayout, and assign tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * <p>
- * If you need a handle to the prompting label, immediately call {@link #getLastLabel()}
- *
- * @param parent composite to put the field into.
- * @param text the label
- * @param tooltip the tooltip
- * @return TextField created.
- */
- public static Text createLabeledReadonlyTextField(Composite parent, String text, String tooltip) {
- previousLabel = createLabel(parent, appendColon(text));
- Text entry = createReadonlyTextField(parent, tooltip);
- setToolTipText(previousLabel, tooltip);
- return entry;
- }
-
- /**
- * Create a multiline text field and insert it into a GridLayout.
- * Assign the listener to the passed in implementer of Listener.
- * @param parent GridLayout composite to put the field into.
- * @param listener Listener object to listen for events. Can be null.
- */
- public static Text createMultiLineTextField(Composite parent, Listener listener, int heightHint) {
- Text text = new Text(parent, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
-
- if (listener != null)
- text.addListener(SWT.Modify, listener);
-
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.heightHint = heightHint;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- text.setLayoutData(data);
- return text;
- } // end createMultiLineTextField()
-
- /**
- * Create a multiline labeled text field and insert it into a GridLayout, and assign tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * @param parent composite to put the field into.
- * @param listener object to listen for events. Can be null.
- * @param labelString the label
- * @param tooltip the tooltip
- * @return TextField created.
- */
- public static Text createMultiLineLabeledTextField(Composite parent, Listener listener, String labelString, String tooltip, int heightHint) {
- Label label = createLabel(parent, appendColon(labelString));
- Text text = createMultiLineTextField(parent, listener, heightHint);
- setToolTipText(label, tooltip);
- return text;
- } // end createMultiLineLabeledTextField()
-
- /**
- * Creates a new checkbox instance and sets the default
- * layout data. Spans 1 column horizontally.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the checkbox into.
- * @param label to display in the checkbox.
- * @param listener object to listen for events. Can be null.
- */
- public static Button createCheckBox(Composite group, String label, Listener listener) {
- return createCheckBox(group, 1, label, listener);
- }
-
- /**
- * Creates a new checkbox instance with the given horizontal span and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the checkbox into.
- * @param horizontalSpan number of columns this checkbox is to span.
- * @param label to display in the checkbox.
- * @param listener object to listen for events. Can be null.
- */
- public static Button createCheckBox(Composite group, int horizontalSpan, String label, Listener listener) {
- Button button = new Button(group, SWT.CHECK | SWT.LEFT);
- button.setText(label);
- if (listener != null)
- button.addListener(SWT.Selection, listener);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.horizontalSpan = horizontalSpan;
- button.setLayoutData(data);
- return button;
- }
-
- /**
- * Creates a new checkbox instance and sets the default
- * layout data, and sets the tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the checkbox into.
- * @param listener object to listen for events. Can be null.
- * @param label the label
- * @param tooltip the tooltip
- */
- public static Button createCheckBox(Composite group, Listener listener, String label, String tooltip)
- {
- Button button = createCheckBox(group, label, listener);
- setToolTipText(button, tooltip);
- return button;
- }
-
- /**
- * Creates a new checkbox instance with the given horizontal span and sets the default
- * layout data, and sets the tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the checkbox into.
- * @param horizontalSpan number of columns to span.
- * @param listener object to listen for events. Can be null.
- * @param label the label
- * @param tooltip the tooltip
- */
- public static Button createCheckBox(Composite group, int horizontalSpan, Listener listener, String label, String tooltip)
- {
- Button button = createCheckBox(group, horizontalSpan, label, listener);
- setToolTipText(button, tooltip);
- return button;
- }
-
- /**
- * Creates a new radiobutton instance and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param label to display in the button
- * @param listener object to listen for events. Can be null.
- */
- public static Button createRadioButton(Composite group, String label, Listener listener) {
- Button button = new Button(group, SWT.RADIO | SWT.LEFT);
- button.setText(label);
- if (listener != null)
- button.addListener(SWT.Selection, listener);
- GridData data = new GridData();
- // following 2 lines added in R2 by Phil, to be consistent with checkboxes
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- button.setLayoutData(data);
- return button;
- }
-
- /**
- * Creates a new radiobutton instance and sets the default
- * layout data, and assigns tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
- * @param label the label
- * @param tooltip the tooltip
- */
- public static Button createRadioButton(Composite group, Listener listener, String label, String tooltip)
- {
- Button button = createRadioButton(group, label, listener);
- setToolTipText(button, tooltip);
- return button;
- }
-
- /**
- * Creates a new radiobutton instance and sets the default
- * layout data, and assigns tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
- * @param label the label
- */
- public static Button createRadioButton(Composite group, Listener listener, String label)
- {
- Button button = createRadioButton(group, label, listener);
- return button;
- }
-
- /**
- * Creates a new pushbutton instance with an image, vs text.
- * SWT does not allow both image and text on a button.
- * Assign the listener to the passed in implementer of Listener.
- * @param group The composite to put the button into.
- * @param image The image to display in the button
- * @param listener The object to listen for events. Can be null.
- */
- public static Button createImageButton(Composite group, Image image, Listener listener) {
- Button button = new Button(group, SWT.PUSH);
- button.setImage(image);
- if (listener != null)
- button.addListener(SWT.Selection, listener);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- button.setLayoutData(data);
- return button;
- }
-
- /**
- * Creates a new pushbutton instance and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param label to display in the button
- * @param listener object to listen for events. Can be null.
- */
- public static Button createPushButton(Composite group, String label, Listener listener) {
- Button button = new Button(group, SWT.PUSH);
- button.setText(label);
- if (listener != null)
- button.addListener(SWT.Selection, listener);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- button.setLayoutData(data);
- return button;
- }
-
- /**
- * Creates a new pushbutton instance and sets the default
- * layout data, and assign tooltip text
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param label to display in the button
- * @param listener object to listen for events. Can be null.
- * @param tooltip the tooltip
- */
- public static Button createPushButton(Composite group, String label, Listener listener, String tooltip) {
- Button button = createPushButton(group, label, listener);
- setToolTipText(button, tooltip);
- return button;
- }
-
- /**
- * This one takes the resource bundle key and appends "label" and "tooltip" to it to
- * get the label and tooltip text.
- * @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
- * @param label the label
- * @param tooltip the tooltip
- */
- public static Button createPushButton(Composite group, Listener listener, String label, String tooltip)
- {
- Button button = createPushButton(group, label, listener);
- setToolTipText(button, tooltip);
- return button;
- }
-
- /**
- * Creates a new "Browse..." pushbutton instance and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
- */
- public static Button createBrowseButton(Composite group, Listener listener)
- {
- String label = SystemResources.BUTTON_BROWSE;
- return createPushButton(group, label, listener);
- }
- /**
- * Creates a new "Browse..." pushbutton instance and sets the default
- * layout data, with tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
- * @param bundle ResourceBundle of tooltip text
- * @param id bundle key for tooltip text
- * @deprecated
- */
- public static Button createBrowseButton(Composite group, Listener listener, String tooltip) {
- String label = SystemResources.BUTTON_BROWSE;
- return createPushButton(group, label, listener, tooltip);
- }
-
- /**
- * Creates a readonly system type listbox.
- * Does NOT create the leading prompt or anything except the listbox.
- * @param group composite to put the listbox into.
- * @param listener object to listen for events. Can be null.
- * @return empty listbox
- */
- public static List createSystemTypeListBox(Composite group, Listener listener) {
- return createSystemTypeListBox(group, listener, null);
- }
-
- /**
- * Creates a readonly system type listbox with the given system types.
- * Does NOT create the leading prompt or anything except the listbox.
- * @param group composite to put the listbox into.
- * @param listener object to listen for events. Can be null.
- * @param systemTypes array of system types to add to the listbox
- * @return listbox containing the given system types
-
- */
- public static List createSystemTypeListBox(Composite group, Listener listener, String[] systemTypes) {
- ArrayList arrayList = new ArrayList();
-
- List list = createListBox(group, listener, false, null, SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP);
-
- String[] typeItems = ((systemTypes == null) ? RSECorePlugin.getDefault().getRegistry().getSystemTypeNames() : systemTypes);
-
- if (systemTypes == null) {
- for (int i = 0; i < typeItems.length; i++) {
- ISubSystemConfiguration[] configurations = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfigurationsBySystemType(typeItems[i]);
-
- if (configurations != null && configurations.length > 0) {
- arrayList.add(typeItems[i]);
- }
- }
-
- systemTypes = (String[])arrayList.toArray(new String[arrayList.size()]);
- Arrays.sort(systemTypes);
- }
-
- for(int i=0; i<systemTypes.length; i++){
- list.add(systemTypes[i]);
- }
-
- if(list.getItemCount()>0){
- list.select(0);
- }
-
- return list;
- }
-
-
- /**
- * Creates a new listbox instance and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param label to display above the list box (can be null).
- * @param listener object to listen for events. Can be null.
- * @param multiSelect true if this is to be a multiple selection list. False for single selection.
- */
- public static List createListBox(Composite group, String label, Listener listener, boolean multiSelect) {
- return createListBox(group, label, listener, multiSelect, 1);
- }
-
- /**
- * Creates a new listbox instance and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param label to display above the list box (can be null).
- * @param listener object to listen for events. Can be null.
- * @param multiSelect true if this is to be a multiple selection list. False for single selection.
- * @param columnSpan number of columns this should span
- */
- public static List createListBox(Composite group, String label, Listener listener, boolean multiSelect, int columnSpan) {
- Composite composite_list = null;
- if (label != null) {
- composite_list = createComposite(group, 1);
- ((GridLayout) composite_list.getLayout()).marginWidth = 0;
- GridData data = new GridData();
- data.horizontalSpan = columnSpan;
- data.grabExcessVerticalSpace = true;
- data.verticalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- composite_list.setLayoutData(data);
- previousLabel = createLabel(composite_list, label);
- }
- int styles = SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER;
- List list = new List((composite_list != null) ? composite_list : group, multiSelect ? (SWT.MULTI | styles) : (SWT.SINGLE | styles));
- if (listener != null)
- list.addListener(SWT.Selection, listener);
- GridData data = new GridData();
- data.widthHint = 100;
- data.heightHint = 150;
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- data.verticalAlignment = GridData.FILL;
- list.setLayoutData(data);
- return list;
- }
-
- /**
- * Creates a new listbox instance and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param label to display above the list box (can be null).
- * @param listener object to listen for events. Can be null.
- * @param multiSelect true if this is to be a multiple selection list. False for single selection.
- * @param tooltip the tooltip
- */
- public static List createListBox(Composite group, String label, Listener listener, boolean multiSelect, String tooltip) {
- List list = createListBox(group, label, listener, multiSelect);
- setToolTipText(list, tooltip);
- return list;
- }
-
- /**
- * Creates a new listbox instance and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param group composite to put the button into.
- * @param listener object to listen for events. Can be null.
- * @param multiSelect true if this is to be a multiple selection list. False for single selection.
- * @param label the label
- * @param tooltip the tooltip
- */
- public static List createListBox(Composite group, Listener listener, boolean multiSelect, String label, String tooltip) {
- List list = createListBox(group, label, listener, multiSelect);
- setToolTipText(list, tooltip);
- return list;
- }
-
- /**
- * Creates a new combobox instance and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param parent composite to put the button into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- */
- public static Combo createCombo(Composite parent, Listener listener) {
- Combo combo = createCombo(parent, SWT.DROP_DOWN);
- if (listener != null)
- combo.addListener(SWT.Selection, listener);
- return combo;
- }
-
- /**
- * private method for re-use
- */
- private static Combo createCombo(Composite parent, int style) {
- Combo combo = new Combo(parent, style);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = 150;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- combo.setLayoutData(data);
- return combo;
- }
-
- /**
- * Creates a new combobox instance and sets the default
- * layout data, with tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * @param parent composite to put the combo into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- * @param toolTip tooltip text
- */
- public static Combo createCombo(Composite parent, Listener listener, String toolTip)
- {
- Combo combo = createCombo(parent, listener);
- setToolTipText(combo, toolTip);
- return combo;
- }
-
- /**
- * Create a labeled combo field and insert it into a GridLayout, and assign tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * <p>
- * If you need a handle to the prompting label, immediately call {@link #getLastLabel()}
- *
- * @param parent composite to put the field into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- * @param label the label text
- * @param tooltip the tooltip for the combo field
- * @return Combo created.
- */
- public static Combo createLabeledCombo(Composite parent, Listener listener, String label, String tooltip)
- {
- previousLabel = createLabel(parent, appendColon(label));
- Combo entry = createCombo(parent, listener, tooltip);
- setToolTipText(previousLabel, tooltip);
- return entry;
- }
-
- /**
- * Creates a new readonly combobox instance and sets the default
- * layout data.
- * Assign the listener to the passed in implementer of Listener.
- * @param parent composite to put the button into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- */
- public static Combo createReadonlyCombo(Composite parent, Listener listener) {
- Combo combo = createCombo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
- if (listener != null)
- combo.addListener(SWT.Selection, listener);
- return combo;
- }
-
- /**
- * Creates a new readonly combobox instance and sets the default
- * layout data, with tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * @param parent composite to put the button into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- * @param tooltip
- */
- public static Combo createReadonlyCombo(Composite parent, Listener listener, String tooltip)
- {
- Combo combo = createReadonlyCombo(parent, listener);
- setToolTipText(combo, tooltip);
- return combo;
- }
-
- /**
- * Create a labeled readonly combo field and insert it into a GridLayout, and assign tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * <p>
- * If you need a handle to the prompting label, immediately call {@link #getLastLabel()}
- *
- * @param parent composite to put the field into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- * @param labelText the label
- * @param tooltip the tooltip
- * @return Combo created.
- */
- public static Combo createLabeledReadonlyCombo(Composite parent, Listener listener, String labelText, String tooltip)
- {
- labelText = appendColon(labelText);
- previousLabel = createLabel(parent, labelText);
- Combo entry = createReadonlyCombo(parent, listener, tooltip);
- setToolTipText(previousLabel, tooltip);
- return entry;
- }
-
- /**
- * Creates a new historical combobox instance and sets the default
- * layout data, with tooltip text.
- * <p>
- * Assign the listener to the passed in implementer of Listener.
- * <p>
- * A historical combobox is one that persists its contents between sessions. The management
- * of that persistence is handled for you!.
- * <p>
- * @param parent composite to put the combo into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.
- * @param historyKey the preferences key (any unique string) to use to persist this combo's history
- * @param readonly true if this combo is to be readonly, forcing user to select from the history
- * @param tooltip the tooltip
- */
- public static SystemHistoryCombo createHistoryCombo(Composite parent, SelectionListener listener, String historyKey, boolean readonly, String tooltip)
- {
- SystemHistoryCombo combo = new SystemHistoryCombo(parent, SWT.NULL, historyKey, readonly);
- if (listener != null)
- combo.addSelectionListener(listener);
- boolean hasGridData = (combo.getLayoutData() != null) && (combo.getLayoutData() instanceof GridData);
- //System.out.println("history combo griddata non-null? " + hasGridData);
- int minwidth = 150;
- if (!hasGridData) {
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = minwidth;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- combo.setLayoutData(data);
- } else {
- ((GridData) combo.getLayoutData()).horizontalAlignment = GridData.FILL;
- ((GridData) combo.getLayoutData()).grabExcessHorizontalSpace = true;
- ((GridData) combo.getLayoutData()).widthHint = minwidth;
- }
- setToolTipText(combo, tooltip);
- return combo;
- }
-
-
-
-
- /**
- * Creates a new remote system connection combobox instance and sets the default
- * layout data, with tooltip text.
- * <p>
- * Assign the listener to the passed in implementer of Listener.
- * <p>
- * A remote system connection combobox is one that allows users to select a connection. The connection
- * list can be subsetted by system type, subsystem factory or subsystem factory category.
- * It has a "Connection:" prompt in front of it and optionally a "New..." button beside it.
- * <p>
- * @param parent composite to put the combo into.
- * @param listener object to listen for selection events. Can be null.
- * If you want to listen for modify events, call addSelectionListener(...) on your own.
- * @param systemTypes array of system types to subset connection list by. Specify a single entry of '*' for
- * all system types. Specify this <i>OR</i> specify factory <i>OR</i> specify factoryCategory
- * <i>OR</i> specify factory Id
- * @param factory the subsystem factory to subset connection list by. Only connections with a subsystem
- * owned by this factory are listed. Specify this <i>OR</i> specify systemTypes <i>OR</i> specify factoryCategory
- * <i>OR</i> specify factory Id
- * @param factoryId the subsystem factory id to subset connection list by. Only connections with a
- * subsystem owned by this factory are listed, where id is a string specified in the
- * plugin.xml file for the subsystem factory extension point definition.
- * Specify this <i>OR</i> specify factory <i>OR</i> specify systemTypes <i>OR</i> specify factory category
- * @param factoryCategory the subsystem factory category to subset connection list by. Only connections with a
- * subsystem owned by a factory of this category are listed, where category is a string specified in the
- * plugin.xml file for the subsystem factory extension point definition.
- * Specify this <i>OR</i> specify factory <i>OR</i> specify factory Id <i>OR</i> specify systemTypes
- * @param defaultConnection the connection to pre-select. Can be null.
- * @param horizontalSpan number of columns this should span
- * @param newButton true if the combo is to have a "New..." button beside it
- */
- public static SystemHostCombo createConnectionCombo(Composite parent, SelectionListener listener, String[] systemTypes, ISubSystemConfiguration factory, String factoryId, String factoryCategory, IHost defaultConnection, int horizontalSpan, boolean newButton) {
- SystemHostCombo combo = null;
- if (systemTypes != null)
- combo = new SystemHostCombo(parent, SWT.NULL, systemTypes, defaultConnection, newButton);
- else if (factory != null)
- combo = new SystemHostCombo(parent, SWT.NULL, factory, defaultConnection, newButton);
- else if (factoryId != null)
- combo = new SystemHostCombo(parent, SWT.NULL, defaultConnection, factoryId, newButton);
- else if (factoryCategory != null)
- combo = new SystemHostCombo(parent, SWT.NULL, defaultConnection, newButton, factoryCategory);
- if (listener != null)
- combo.addSelectionListener(listener);
- boolean hasGridData = (combo.getLayoutData() != null) && (combo.getLayoutData() instanceof GridData);
- //System.out.println("history directory griddata non-null? " + hasGridData);
- int minwidth = 250; // todo: tweak this?
- if (!hasGridData) {
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = minwidth;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- data.horizontalSpan = horizontalSpan;
- combo.setLayoutData(data);
- } else {
- ((GridData) combo.getLayoutData()).horizontalSpan = horizontalSpan;
- ((GridData) combo.getLayoutData()).horizontalAlignment = GridData.FILL;
- ((GridData) combo.getLayoutData()).grabExcessHorizontalSpace = true;
- ((GridData) combo.getLayoutData()).widthHint = minwidth;
- }
- return combo;
- }
-
- /**
- * Creates a readonly system type combination box.
- * Does NOT create the leading prompt or anything except the combo.
- */
- public static Combo createSystemTypeCombo(Composite parent, Listener listener) {
- return createSystemTypeCombo(parent, listener, null);
- }
-
- /**
- * Creates a readonly system type combination box with the given system types.
- * Does NOT create the leading prompt or anything except the combo.
- */
- public static Combo createSystemTypeCombo(Composite parent, Listener listener, String[] systemTypes) {
- Combo combo = createReadonlyCombo(parent, listener, SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP);
- String[] typeItems = ((systemTypes == null) ? RSECorePlugin.getDefault().getRegistry().getSystemTypeNames() : systemTypes);
-
- ArrayList list = new ArrayList();
-
- if (systemTypes == null) {
- for (int i = 0; i < typeItems.length; i++) {
- ISubSystemConfiguration[] configurations = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfigurationsBySystemType(typeItems[i]);
-
- if (configurations != null && configurations.length > 0) {
- list.add(typeItems[i]);
- }
- }
- }
-
- typeItems = new String[list.size()];
-
- for (int i = 0; i < list.size(); i++) {
- typeItems[i] = (String)(list.get(i));
- }
-
- combo.setItems(typeItems);
- combo.select(0);
- return combo;
- }
-
- /**
- * Creates a hostname combination box. It if prefilled with all previously specified hostnames
- * for the given system type.
- * <p>
- * Does NOT create the leading prompt or anything except the combo.
- */
- public static Combo createHostNameCombo(Composite parent, Listener listener, String systemType) {
- //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(RSEUIPlugin.getTheSystemRegistry().getHostNames(systemType));
- combo.select(0);
- return combo;
- }
-
-
-
-
-
- /**
- * Create an entry field controlled by an inherit/override switch button
- * <p>
- * After creating the widget, call setLocal to set initial state, and setInheritedText/setLocalText to set inherited/local text
- * @param parent composite to put the button into.
- * @param toggleToolTip text for the toggle. Can be null
- * @param entryToolTip text for the entry field. Can be null
- * @return The text field widget
- */
- public static InheritableEntryField createInheritableTextField(Composite parent, String toggleToolTip, String entryToolTip)
- {
- InheritableEntryField entryField = new InheritableEntryField(parent, SWT.NULL);
- if (toggleToolTip != null)
- entryField.setToggleToolTipText(toggleToolTip);
- if (entryToolTip != null)
- entryField.setTextFieldToolTipText(entryToolTip);
- return entryField;
- }
-
- /**
- * Helper method to line up the leading prompts in a composite, taking
- * into account composite prompts nested within.
- */
- public static void lineUpPrompts(Composite composite) {
- //System.out.println("Inside lineUpPrompts:");
- composite.layout(true);
- // FIND SIZE OF FIRST LABEL IN FIRST COLUMN (WILL ALL BE SAME SIZE)...
- Label firstLabel = getFirstColumnOneLabel(composite);
- // FIND MAX SIZE OF FIRST LABEL IN ALL NESTED COMPOSITES (WILL ALL BE DIFFERENT SIZES)...
- //System.out.println("Scanning nested composites:");
- int nbrColumns = ((GridLayout) composite.getLayout()).numColumns;
- Control[] childControls = composite.getChildren();
- int maxNestedLabelWidth = 0;
- int currColumn = 0;
- if ((childControls != null) && (childControls.length > 0)) {
- for (int idx = 0;(idx < childControls.length); idx++) {
- int rem = currColumn % nbrColumns;
- //System.out.println("...1.rem = " + rem);
- if ((currColumn == 0) || (rem == 0)) {
- if (childControls[idx] instanceof Composite) {
- Label firstNestedLabel = getFirstColumnOneLabel((Composite) childControls[idx]);
- if (firstNestedLabel != null) {
- if (firstNestedLabel.getSize().x > maxNestedLabelWidth)
- maxNestedLabelWidth = firstNestedLabel.getSize().x;
- }
- }
- }
- currColumn += ((GridData) childControls[idx].getLayoutData()).horizontalSpan;
- }
- //System.out.println("Max nested label size = " + maxNestedLabelWidth);
- }
-
- // DECIDE WHAT MAXIMUM WIDTH IS
- int columnOneWidth = 0;
- if (firstLabel != null)
- columnOneWidth = firstLabel.getSize().x;
- if (maxNestedLabelWidth > columnOneWidth)
- columnOneWidth = maxNestedLabelWidth;
- //System.out.println("Calculated column one width = " + columnOneWidth);
- // APPLY NEW WIDTH TO FIRST COLUMN ONE LABEL
- if (firstLabel != null)
- ((GridData) firstLabel.getLayoutData()).widthHint = columnOneWidth;
- // APPLY NEW WIDTH TO FIRST COLUMN ONE LABEL OF ALL NESTED COMPOSITES...
- currColumn = 0;
- if ((childControls != null) && (childControls.length > 0)) {
- for (int idx = 0;(idx < childControls.length); idx++) {
- int rem = currColumn % nbrColumns;
- if ((currColumn == 0) || (rem == 0)) {
- if (childControls[idx] instanceof Composite) {
- Label firstNestedLabel = getFirstColumnOneLabel((Composite) childControls[idx]);
- if (firstNestedLabel != null)
- ((GridData) firstNestedLabel.getLayoutData()).widthHint = columnOneWidth;
- }
- }
- currColumn += ((GridData) childControls[idx].getLayoutData()).horizontalSpan;
- }
- }
- composite.layout(true);
- }
-
- /**
- * Given a composite that has been layed out, return the first label found in the first column.
- */
- public static Label getFirstColumnOneLabel(Composite composite) {
- //System.out.println("...Inside getFirstColumnOneLabel:");
- int nbrColumns = ((GridLayout) composite.getLayout()).numColumns;
- Control[] childControls = composite.getChildren();
- Label firstLabel = null;
- int currColumn = 0;
- if ((childControls != null) && (childControls.length > 0)) {
- for (int idx = 0;(firstLabel == null) && (idx < childControls.length); idx++) {
- int rem = currColumn % nbrColumns;
- //System.out.println("......0.rem = " + rem);
- if ((currColumn == 0) || (rem == 0)) {
- if (childControls[idx] instanceof Label) {
- firstLabel = (Label) childControls[idx];
- if (firstLabel.getText().trim().length() == 0)
- firstLabel = null; // skip it. Only a filler.
- }
- }
- currColumn += ((GridData) childControls[idx].getLayoutData()).horizontalSpan;
- }
- }
- //if (firstLabel != null)
- // System.out.println("...returning first label of '"+firstLabel.getText()+"', width = " + firstLabel.getSize().x);
- //else
- // System.out.println("...no first label found");
- return firstLabel;
- }
-
- /**
- * Given a Composite, this method walks all the children recursively and
- * and sets the mnemonics uniquely for each child control where a
- * mnemonic makes sense (eg, buttons).
- * The letter/digit chosen for the mnemonic is unique for this Composite,
- * so you should call this on as high a level of a composite as possible
- * per Window.
- * Call this after populating your controls.
- * @return mnemonics object used for recording used-mnemonics. Use this
- * as input to subsequent calls to setMnemonics for the same window/dialog.
- */
- public static Mnemonics setMnemonics(Composite parent) {
- Mnemonics mnemonics = new Mnemonics(); // instance of this class to get unique mnemonics for composite and nested composites
- mnemonics.setMnemonics(parent);
- return mnemonics;
- }
-
- /**
- * Same as above but also whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields.
- */
- public static Mnemonics setMnemonics(Composite parent, boolean applyToPrecedingLabels) {
- Mnemonics mnemonics = new Mnemonics(); // instance of this class to get unique mnemonics for composite and nested composites
- mnemonics.setApplyMnemonicsToPrecedingLabels(applyToPrecedingLabels);
- mnemonics.setMnemonics(parent);
- return mnemonics;
- }
-
- /**
- * Same as above but specifically for wizard pages
- */
- public static Mnemonics setWizardPageMnemonics(Composite parent) {
- Mnemonics mnemonics = new Mnemonics(); // instance of this class to get unique mnemonics for composite and nested composites
- mnemonics.setOnWizardPage(true);
- mnemonics.setMnemonics(parent);
- return mnemonics;
- }
-
- /**
- * Same as above but also whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields.
- */
- public static Mnemonics setWizardPageMnemonics(Composite parent, boolean applyToPrecedingLabels) {
- Mnemonics mnemonics = new Mnemonics(); // instance of this class to get unique mnemonics for composite and nested composites
- mnemonics.setOnWizardPage(true);
- mnemonics.setApplyMnemonicsToPrecedingLabels(applyToPrecedingLabels);
- mnemonics.setMnemonics(parent);
- return mnemonics;
- }
-
- /**
- * Same as above but specifically for preference pages
- */
- public static Mnemonics setPreferencePageMnemonics(Composite parent) {
- Mnemonics mnemonics = new Mnemonics(); // instance of this class to get unique mnemonics for composite and nested composites
- mnemonics.setOnPreferencePage(true);
- mnemonics.setMnemonics(parent);
- return mnemonics;
- }
-
- /**
- * Same as above but also whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields.
- */
- public static Mnemonics setPreferencePageMnemonics(Composite parent, boolean applyToPrecedingLabels) {
- Mnemonics mnemonics = new Mnemonics(); // instance of this class to get unique mnemonics for composite and nested composites
- mnemonics.setOnPreferencePage(true);
- mnemonics.setApplyMnemonicsToPrecedingLabels(applyToPrecedingLabels);
- mnemonics.setMnemonics(parent);
- return mnemonics;
- }
-
- /**
- * Same as above but takes as input a previously populated mnemonics object,
- * which records already-used mnemonics for whatever scope you want (a dialog usually).
- */
- public static Mnemonics setMnemonics(Mnemonics mnemonics, Composite parent) {
- mnemonics.setMnemonics(parent);
- return mnemonics;
- }
- /**
- * Given an SWT Menu, "walk it" and automatically assign unique
- * mnemonics for every menu item in it, and then for each
- * submenu, do so for it too.
- * @param menu the menubar to add mnemonics for
- */
- public static void setMnemonics(Menu menu) {
- Mnemonics mnemonics = new Mnemonics(); // instance of this class to get unique mnemonics FOR THIS MENU ONLY
- // walk the menu bar getting each menu...
- MenuItem menuItems[] = menu.getItems();
- for (int idx = 0; idx < menuItems.length; idx++) {
- MenuItem currMenuItem = menuItems[idx];
- // assign unique mnemonic from characters in menu text...
- currMenuItem.setText(mnemonics.setUniqueMnemonic(currMenuItem.getText()));
- // for a cascade or popup, this menuitem is itself a menu
- Menu nestedMenu = currMenuItem.getMenu();
- if (nestedMenu != null)
- setMnemonics(nestedMenu);
- } // end for all menus loop
- } // end addMnemonicsForMenuBar
-
- /**
- * Given a Composite, this method walks all the children recursively and
- * and sets the infopop help id for each child control where help
- * makes sense (eg, buttons, combos, entry fields, lists, trees).
- * <p>
- * Call this after populating your controls.
- */
- public static void setCompositeHelp(Composite parent, String helpID) {
- //setCompositeHelp(parent, helpID, (Hashtable)null);
- setHelp(parent, helpID);
- }
-
- /**
- * Set the context id for a control on a view part
- * @deprecated
- */
- public static void setHelp(Control c, IViewPart view, Object id) {
- //ViewContextComputer comp = new ViewContextComputer(view, id);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(c, id.toString());
- if (traceHelpIDs)
- SystemBasePlugin.logInfo("Setting help id: " + id); //$NON-NLS-1$
- }
-
- /**
- * Set the context id for a control
- */
- public static void setHelp(Control c, String id) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(c, id);
- }
-
- /**
- * Set the context id for an action
- */
- public static void setHelp(IAction c, String id) {
- String[] ids = new String[1];
- ids[0] = id;
- PlatformUI.getWorkbench().getHelpSystem().setHelp(c, id);
- }
-
- /**
- * Set the context id for a menu item
- */
- public static void setHelp(MenuItem c, String id) {
- String[] ids = new String[1];
- ids[0] = id;
- PlatformUI.getWorkbench().getHelpSystem().setHelp(c, id);
- //setHelp(c, ids);
- }
-
- private static char STANDARD_COLON = ':';
- private static char WIDE_COLON = '\uFF1A';
- /**
- * Appends a colon to a label, if the label doesn't already end in a colon of the proper size.
- * If the wrong size colon is already there, it strips it first.
- * @param label
- * @return the label ending with a colon of the appropriate size
- */
- public static String appendColon(String label) {
- /* Added for Defect 47275 */
- String result = label;
- boolean append = false;
- boolean strip = false;
- Locale currentLocale = Locale.getDefault();
- String language = currentLocale.getLanguage();
- boolean cjk = language.equals("zh") || language.equals("ja") || language.equals("ko"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- int n = result.length();
- if (n > 0) {
- char lastCharacter = label.charAt(n - 1);
- if (cjk) {
- strip = (lastCharacter == STANDARD_COLON);
- append = (lastCharacter != WIDE_COLON);
- } else {
- strip = (lastCharacter == WIDE_COLON);
- append = (lastCharacter != STANDARD_COLON);
- }
- } else {
- strip = false;
- append = true;
- }
- if (strip) {
- result = result.substring(0, n - 1);
- }
- if (append) {
- result += (cjk ? WIDE_COLON : STANDARD_COLON);
- }
- return result;
- }
-
-
-
-
- /**
- * Set tooltip text
- * If key does not end in "tooltip", then this is appended to it
- */
- private static void setToolTipText(Control widget, String tooltip) {
- if (tooltip != null)
- widget.setToolTipText(tooltip);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayDialogAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayDialogAction.java
deleted file mode 100644
index 6aecd17dd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayDialogAction.java
+++ /dev/null
@@ -1,60 +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.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * DisplayDialogAction can be used to display a JFace Dialog when
- * not running on the UI thread and no shell is availble. For example:
- * <code>
- * Display.getDefault().syncExec(new DisplayDialogAction(myDialog));
- * </code>
- */
-public class DisplayDialogAction implements Runnable {
-
-
- private Dialog _dialog;
-
- /**
- * Constructor for DisplayDialogAction.
- *
- * @param dialog The dialog to be displayed.
- */
- public DisplayDialogAction(Dialog dialog) {
- _dialog = dialog;
- }
-
- /**
- * @see java.lang.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())
- {
- _dialog.open();
- finished = true;
- }
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index be1c441a0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * 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
deleted file mode 100644
index e1d54fc8d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplaySystemMessageAction.java
+++ /dev/null
@@ -1,64 +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.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This class can be used to display SystemMessages via the Display.async
- * and sync methods.
- */
-public class DisplaySystemMessageAction implements Runnable {
-
-
- protected SystemMessage message;
- protected int rc;
-
- public DisplaySystemMessageAction(SystemMessage message) {
- this.message = message;
- }
-
-
- /**
- * @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.open();
- rc = dialog.getButtonPressedId();
- finished = true;
- }
- }
- }
-
- /**
- * Retrieve the return code from displaying the SystemMessageDialog
- */
- public int getReturnCode() {
- return rc;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemAction.java
deleted file mode 100644
index c1149ee41..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemAction.java
+++ /dev/null
@@ -1,111 +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.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Shell;
-/**
- * Suggested interface for actions in popup menus of the Remote System Explorer view.
- * While suggested, it is not required to implement this interface.
- * @see SystemBaseAction
- */
-public interface ISystemAction extends IAction, ISelectionChangedListener
-{
-
- // ------------------------
- // CONFIGURATION METHODS...
- // ------------------------
- /**
- * Set the help id for the action
- */
- public void setHelp(String id);
- /**
- * Set the context menu group this action is to go into, for popup menus. If not set,
- * someone else will make this decision.
- */
- public void setContextMenuGroup(String group);
- /**
- * Is this action to be enabled or disabled when multiple items are selected.
- */
- public void allowOnMultipleSelection(boolean allow);
- /**
- * Specify whether this action is selection-sensitive. The default is true.
- * This means the enabled state is tested and set when the selection is set.
- */
- public void setSelectionSensitive(boolean sensitive);
-
- // -----------------------------------------------------------
- // STATE METHODS CALLED BY VIEWER AT FILL CONTEXT MENU TIME...
- // -----------------------------------------------------------
- /**
- * Set shell of parent window. Remote System Explorer will call this.
- */
- public void setShell(Shell shell);
- /**
- * Set the Viewer that called this action. It is good practice for viewers to call this
- * so actions can directly access them if needed.
- */
- public void setViewer(Viewer v);
- /**
- * Sometimes we can't call selectionChanged() because we are not a selection provider.
- * In this case, use this to set the selection.
- */
- public void setSelection(ISelection selection);
- /**
- * An optimization for performance reasons that allows all inputs to be set in one call
- */
- public void setInputs(Shell shell, Viewer v, ISelection selection);
-
-
- // ----------------------------------------------------------------
- // GET METHODS FOR RETRIEVING STATE OR CONFIGURATION INFORMATION...
- // ----------------------------------------------------------------
- /**
- * Get the help id for this action
- */
- public String getHelpContextId();
- /**
- * Convenience method to get shell of parent window, as set via setShell.
- */
- public Shell getShell();
- /**
- * Get the Viewer that called this action. Not guaranteed to be set,
- * depends if that viewer called setViewer or not. SystemView does.
- */
- public Viewer getViewer();
- /**
- * Retrieve selection as set by selectionChanged() or setSelection()
- */
- public IStructuredSelection getSelection();
- /**
- * Get the context menu group this action is to go into, for popup menus. By default is
- * null, meaning there is no recommendation
- */
- public String getContextMenuGroup();
- /**
- * Return whether this action is selection-sensitive. The default is true.
- * This means the enabled state is tested and set when the selection is set.
- */
- public boolean isSelectionSensitive();
- /**
- * Return if true if this is a dummy action
- */
- public boolean isDummy();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemCopyTargetSelectionCallback.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemCopyTargetSelectionCallback.java
deleted file mode 100644
index e13e98b32..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemCopyTargetSelectionCallback.java
+++ /dev/null
@@ -1,33 +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.rse.ui.dialogs.SystemSimpleContentElement;
-
-
-/**
- * Callback interface between copy-actions and copy select-target-parent dialogs
- */
-public interface ISystemCopyTargetSelectionCallback
-{
-
- /**
- * This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected
- * object is a valid parent object. This affects the enabling of the OK button on that dialog.
- */
- public boolean isValidTargetParent(SystemSimpleContentElement selectedElement);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDialogAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDialogAction.java
deleted file mode 100644
index bdaeeda98..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDialogAction.java
+++ /dev/null
@@ -1,57 +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;
-/**
- * Suggested interface for actions in popup menus of the Remote System Explorer view,
- * which put up dialogs.
- * @see SystemBaseDialogAction
- */
-public interface ISystemDialogAction extends ISystemAction
-{
- /*
- * Return the parent window/dialog of this action. Same as getShell()
- *
- public Shell getParent();*/
-
- /*
- * Set the parent window/dialog of this action. Same as setShell(Shell parent)
- *
- public void setParent(Shell parent);*/
-
- /**
- * Set the value used as input to the dialog. Usually for update mode.
- * This is an alternative to selectionChanged or setSelection, as typically it is
- * the selection that is used as the input to the dialog.
- */
- public void setValue(Object value);
- /**
- * If this action supports allowOnMultipleSelection, then whether the action is to
- * be invoked once per selected item (false), or once for all selected items (true)
- */
- public void setProcessAllSelections(boolean all);
-
- /**
- * Get the output of the dialog.
- */
- public Object getValue();
- /**
- * Returns true if the user cancelled the dialog.
- * The default way to guess at this is to test if the output from
- * getDialogValue was null or not. Override if you need to refine this.
- */
- public boolean wasCancelled();
-} \ No newline at end of file
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
deleted file mode 100644
index 0a6e073d5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtension.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Required interface for use in making contributions view the
- * adapter menu extension extension point (org.eclipse.rse.ui.dynamicPopupMenuExtensions).
- */
-public interface ISystemDynamicPopupMenuExtension
-{
- /**
- * Returns true if this menu extension supports the specified selection.
- * @param selection the resources to contriubte menu items to
- * @return true if the extension will be used for menu population
- */
- public boolean supportsSelection(IStructuredSelection selection);
-
- /**
- * Populates the menu with specialized actions.
- * @param shell the shell
- * @param menu the menu to contribute actions to
- * @param menuGroup the defect menu group to add actions to
- * @param selection the resources to contriubte menu items to
- *
- */
- 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/ISystemDynamicPopupMenuExtensionManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtensionManager.java
deleted file mode 100644
index 4b7c976d8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtensionManager.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-/**
- * @author dmcknigh
- */
-public interface ISystemDynamicPopupMenuExtensionManager {
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemWizardAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemWizardAction.java
deleted file mode 100644
index 9b065447b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemWizardAction.java
+++ /dev/null
@@ -1,25 +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;
-/**
- * Suggested interface for actions in popup menus of the Remote System Explorer view,
- * which put up wizards.
- * @see SystemBaseWizardAction
- */
-public interface ISystemWizardAction extends ISystemDialogAction
-{
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemAbstractPopupMenuExtensionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemAbstractPopupMenuExtensionAction.java
deleted file mode 100644
index 2a91f175a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemAbstractPopupMenuExtensionAction.java
+++ /dev/null
@@ -1,389 +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 java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-/**
- * This is a base class to simplify the creation of actions supplied via the
- * org.eclipse.rse.core.popupMenus extension point.
- * <p>
- * The only method you must implement is {@link #run()}.
- * You may optionally override {@link #getEnabled(Object[])}
- * <p>
- * Convenience methods are:
- * <ul>
- * <li>{@link #getShell()}
- * <li>{@link #getProxyAction()}
- * <li>{@link #getSelection()}
- * <li>{@link #getSelectionCount()}
- * <li>{@link #getSelectedRemoteObjects()}
- * <li>{@link #getFirstSelectedRemoteObject()}
- * <li>{@link #getRemoteAdapter(Object)}
- *
- * <li>{@link #getSubSystem()}
- * <li>{@link #getSubSystemConfiguration()}
- * <li>{@link #getSystemConnection()}
- *
- * <li>{@link #getRemoteObjectName(Object obj, ISystemRemoteElementAdapter adapter)}
- * <li>{@link #getRemoteObjectSubSystemConfigurationId(Object obj, ISystemRemoteElementAdapter adapter)}
- * <li>{@link #getRemoteObjectTypeCategory(Object obj, ISystemRemoteElementAdapter adapter)}
- * <li>{@link #getRemoteObjectType(Object obj, ISystemRemoteElementAdapter adapter)}
- * <li>{@link #getRemoteObjectSubType(Object obj, ISystemRemoteElementAdapter adapter)}
- * <li>{@link #getRemoteObjectSubSubType(Object obj, ISystemRemoteElementAdapter adapter)}
- * </ul>
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter
- * @see org.eclipse.rse.ui.dialogs.SystemPromptDialog
- */
-public abstract class SystemAbstractPopupMenuExtensionAction
- implements IObjectActionDelegate
-{
- protected IWorkbenchPart viewPart = null;
- protected IStructuredSelection sel = null;
- protected IAction proxyAction;
- protected Shell shell;
- protected static final Object[] EMPTY_ARRAY = new Object[0];
-
- /**
- * Constructor
- */
- public SystemAbstractPopupMenuExtensionAction()
- {
- super();
- }
-
- // ------------------------
- // OVERRIDABLE METHODS...
- // ------------------------
-
- /**
- * The user has selected this action. This is where the actual code for the action goes.
- */
- public abstract void run();
-
- /**
- * The user has selected one or more objects. This is an opportunity to enable/disable
- * this action based on the current selection. By default, it is always enabled. Return
- * false to disable it.
- */
- public boolean getEnabled(Object[] currentlySelected)
- {
- return true;
- }
-
- // ---------------------------------
- // IOBJECTACTIONDELEGATE METHODS...
- // ---------------------------------
-
- /**
- * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart part)
- {
- this.viewPart = part;
- this.proxyAction = action;
- this.shell = part.getSite().getShell();
- }
- /**
- * Get the current view part.
- * Handy for things like getting the shell.
- */
- public IWorkbenchPart getActivePart()
- {
- return viewPart;
- }
-
- /**
- * The Eclipse-supplied proxy action has been selected to run.
- * This is the foreward to us, the actual action. This method's default
- * implementation is to simply call {@link #run()}.
- *
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action)
- {
- run();
- }
-
- /**
- * Called by Eclipse when the user selects something. Our opportunity
- * to enable or disable this menu item. The default implementation of this
- * method calls getEnabled to determine if the proxy action should be enabled
- * or not, then calls setEnabled on that proxy action with the result.
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection sel)
- {
- if (!action.isEnabled())
- return; // defect 43471: we were overriding the enableFor attribute enablement
- if (sel instanceof IStructuredSelection)
- {
- this.sel = (IStructuredSelection)sel;
- action.setEnabled(getEnabled(getSelectedRemoteObjects()));
- }
- else
- {
- this.sel = null;
- action.setEnabled(false);
- }
- }
-
- // ---------------------------------------------
- // CONVENIENCE METHODS FOR SUBCLASSES TO USE...
- // ---------------------------------------------
- /**
- * For toggle actions (attribute state specified in action tag), set the toggle state
- */
- public void setChecked(boolean checked)
- {
- proxyAction.setChecked(checked);
- }
-
- /**
- * Change the enabled state of the action
- */
- public void setEnabled(boolean enabled)
- {
- proxyAction.setEnabled(enabled);
- }
-
- /**
- * Return the proxy action for this action delegate
- */
- public IAction getProxyAction()
- {
- return proxyAction;
- }
-
- /**
- * Return the shell hosting this action
- */
- public Shell getShell()
- {
- return shell;
- }
-
- /**
- * Retrieve the current selected objects as a structured selection
- */
- public IStructuredSelection getSelection()
- {
- return sel;
- }
- /**
- * Retrieve the number of items currently selected
- */
- public int getSelectionCount()
- {
- return ((sel==null)?0:sel.size());
- }
-
- /**
- * Retrieve the currently selected objects as an array of Object objects.
- * Array may be length 0, but will never be null, for convenience.
- * To do anything interesting with the object, you will also need to retrieve its adapter
- * @see #getRemoteAdapter(Object)
- */
- public Object[] getSelectedRemoteObjects()
- {
- Object[] seld = new Object[(sel!=null) ? sel.size() : 0];
- if (sel == null)
- return seld;
- Iterator i = sel.iterator();
- int idx=0;
- while (i.hasNext())
- seld[idx++] = i.next();
- return seld;
- }
- /**
- * Retrieve the first selected object, for convenience.
- * Will be null if there is nothing selected
- * To do anything interesting with the object, you will also need to retrieve its adapter
- * @see #getRemoteAdapter(Object)
- */
- public Object getFirstSelectedRemoteObject()
- {
- if (sel == null)
- return null;
- return sel.getFirstElement();
- }
- /**
- * Retrieve the adapters of the currently selected objects as an array of ISystemRemoteElementAdapter objects.
- * Array may be length 0, but will never be null, for convenience.
- */
- public ISystemRemoteElementAdapter[] getSelectedRemoteObjectAdapters()
- {
- ISystemRemoteElementAdapter[] seld = new ISystemRemoteElementAdapter[(sel!=null) ? sel.size() : 0];
- if (sel == null)
- return seld;
- Iterator i = sel.iterator();
- int idx=0;
- while (i.hasNext())
- seld[idx++] = getRemoteAdapter(i.next());
- return seld;
- }
- /**
- * Retrieve the adapter of the first selected object as an ISystemRemoteElementAdapter object, for convenience.
- * Will be null if there is nothing selected
- */
- public ISystemRemoteElementAdapter getFirstSelectedRemoteObjectAdapter()
- {
- if (sel == null)
- return null;
- return getRemoteAdapter(sel.getFirstElement());
- }
-
- /**
- * Returns the implementation of ISystemRemoteElementAdapter for the given
- * object. Returns null if this object does not adaptable to this.
- */
- public ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- if (!(o instanceof IAdaptable))
- return (ISystemRemoteElementAdapter)Platform.getAdapterManager().getAdapter(o,ISystemRemoteElementAdapter.class);
- return (ISystemRemoteElementAdapter)((IAdaptable)o).getAdapter(ISystemRemoteElementAdapter.class);
- }
-
- /**
- * Returns the name of the given remote object, given its remote object adapter.
- * Same as <code>adapter.getName(obj);</code>
- */
- public String getRemoteObjectName(Object obj, ISystemRemoteElementAdapter adapter)
- {
- return adapter.getName(obj);
- }
- /**
- * Returns the id of the subsystem factory of the given remote object, given its remote object adapter.
- * Same as <code>adapter.getSubSystemConfigurationId(obj);</code>
- */
- public String getRemoteObjectSubSystemConfigurationId(Object obj, ISystemRemoteElementAdapter adapter)
- {
- return adapter.getSubSystemConfigurationId(obj);
- }
- /**
- * Returns the type category of the given remote object, given its remote object adapter.
- * Same as <code>adapter.getRemoteTypeCategory(obj);</code>
- */
- public String getRemoteObjectTypeCategory(Object obj, ISystemRemoteElementAdapter adapter)
- {
- return adapter.getRemoteTypeCategory(obj);
- }
- /**
- * Returns the type of the given remote object, given its remote object adapter.
- * Same as <code>adapter.getRemoteType(obj);</code>
- */
- public String getRemoteObjectType(Object obj, ISystemRemoteElementAdapter adapter)
- {
- return adapter.getRemoteType(obj);
- }
- /**
- * Returns the subtype of the given remote object, given its remote object adapter.
- * Same as <code>adapter.getRemoteSubType(obj);</code>
- */
- public String getRemoteObjectSubType(Object obj, ISystemRemoteElementAdapter adapter)
- {
- return adapter.getRemoteSubType(obj);
- }
- /**
- * Returns the sub-subtype of the given remote object, given its remote object adapter.
- * Same as <code>adapter.getRemoteSubSubType(obj);</code>
- */
- public String getRemoteObjectSubSubType(Object obj, ISystemRemoteElementAdapter adapter)
- {
- return adapter.getRemoteSubSubType(obj);
- }
- /**
- * Returns the subsystem from which the selected remote objects were resolved.
- */
- public ISubSystem getSubSystem()
- {
- ISystemRemoteElementAdapter ra = getFirstSelectedRemoteObjectAdapter();
- if (ra != null)
- return ra.getSubSystem(getFirstSelectedRemoteObject());
- else
- return null;
- }
- /**
- * Returns the subsystem factory which owns the subsystem from which the selected remote objects were resolved
- */
- public ISubSystemConfiguration getSubSystemConfiguration()
- {
- ISubSystem ss = getSubSystem();
- if (ss != null)
- return ss.getSubSystemConfiguration();
- else
- return null;
- }
-
- /**
- * Return the SystemConnection from which the selected remote objects were resolved
- */
- public IHost getSystemConnection()
- {
- IHost conn = null;
- ISystemRemoteElementAdapter ra = getFirstSelectedRemoteObjectAdapter();
- if (ra != null)
- {
- ISubSystem ss = ra.getSubSystem(getFirstSelectedRemoteObject());
- if (ss != null)
- conn = ss.getHost();
- }
- return conn;
- }
-
- /**
- * Debug method to print out details of given selected object...
- */
- public void printTest()
- {
- System.out.println("Testing. Number of selected objects = "+getSelectionCount()); //$NON-NLS-1$
- Object obj = getFirstSelectedRemoteObject();
- if (obj == null)
- System.out.println("selected obj is null"); //$NON-NLS-1$
- else
- {
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(obj);
- System.out.println();
- System.out.println("REMOTE INFORMATION FOR FIRST SELECTION"); //$NON-NLS-1$
- System.out.println("--------------------------------------"); //$NON-NLS-1$
- System.out.println("Remote object name................: " + getRemoteObjectName(obj,adapter)); //$NON-NLS-1$
- System.out.println("Remote object subsystem factory id: " + getRemoteObjectSubSystemConfigurationId(obj,adapter)); //$NON-NLS-1$
- System.out.println("Remote object type category.......: " + getRemoteObjectTypeCategory(obj,adapter)); //$NON-NLS-1$
- System.out.println("Remote object type ...............: " + getRemoteObjectType(obj,adapter)); //$NON-NLS-1$
- System.out.println("Remote object subtype ............: " + getRemoteObjectSubType(obj,adapter)); //$NON-NLS-1$
- System.out.println("Remote object subsubtype .........: " + getRemoteObjectSubSubType(obj,adapter)); //$NON-NLS-1$
- System.out.println();
- }
- System.out.println();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseAction.java
deleted file mode 100644
index d1f47a39d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseAction.java
+++ /dev/null
@@ -1,818 +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 java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A suggested base class for remote systems related actions.
- * <p>
- * What this offers beyond the basic Action class:
- * <ul>
- * <li>Support for setting label and tooltip and description from a resource bundle and single key prefix,
- * from which each string is derived by appending ".label", ".tooltip" and ".description" to the prefix.
- * <li>Support for setting and retrieving the shell from which the action is launched. Can be
- * set in the parent, or passed as null there and set later via setShell. Retrieve via getShell.
- * <li>Support actions that are selection-dependent, but need not be informed of every selection change.
- * For performance reasons, only track selections if the action is displayed in the toolbar where
- * state change needs to be visible. For popup actions, we only need to be informed of the
- * currently selection at the time the popup is built. Popup menu builders call selectionChanged
- * in this class at popup population time, so you need only subclass this method. However, even
- * that is made easier. The default implementation of this method in this class converts the
- * selection to an IStructuredSelection, and calls an overridable method named updateSelection
- * passing the structured selection. The action is enabled or disabled based on the returned
- * boolean value. Just override updateSelection to enable or disable based on selection.
- * Indeed, the default implementation of the updateSelection method is to return the result of
- * AND-ED result of calling checkObjectType on each item in the selection. So the easiest thing
- * you can do to enable/disable is to override checkObjectType.
- * <li>Support actions that are selection-dependent and need to be informed of every selection change
- * as it happens. To enable this, simply call setSelectionProvider to supply the GUI object such
- * as a viewer which fires the selection changed events we wish to monitor for. For the Remote
- * System Explorer viewer, we would get call setSelectionProvider(SystemViewPlugin.getSystemView());
- * <li>Support for actions that are only to be enabled when a single item is selected. To enable this
- * and save from testing for it yourself, simply call the method allowOnMultipleSelection(false).
- * The default is true, multiple selections are allowed.
- * <li>Support for disabling actions when the corresponding SystemConnection for the selected object
- * is offline. The SystemConnection can be automatically determined for some of the common
- * objects (subsystems, IRemoteFiles), for others you must set the SystemConnection for
- * this offline support.</li>
- * </ul>
- * There are many constructors but they can be broken down into permutations of the following info:
- * <ul>
- * <li>Label, tooltip and description. These can be supplied as strings, or via resource bundle and key.
- * This requires four flavors of constructor to except varying of these four pieces of information.
- * <li>Images. There are four flavors of constructors that take an image, and four identical that do not.
- * </ul>
- *
- * <p>To use this dialog, subclass it and <b>override</b> the following methods</p>:
- * <sl>
- * <li>{@link #run()}, where you place the code to do the actual work when this action is invoked.
- * <li>{@link #updateSelection(IStructuredSelection)}, for selection sensitive actions. This is your first
- * opporunity to enable/disable the action when the selection changes, by looking at the given selection
- * and returning true or false. The default implementation calls checkObjectType for each selected object.
- * <li>{@link #checkObjectType(Object)}, for selection sensitive actions. This is your second
- * opporunity to enable/disable the action when the selection changes, by looking at each individual
- * selected object, and returning true or false.
- * </sl>
- * <p>In addition to the methods you must override, you can optionally call various methods to configure
- * this action:</p>
- * <sl>
- * <li>{@link #setInputs(Shell, Viewer,ISelection)} or {@link #setShell(Shell)} and {@link #setViewer(Viewer)} and
- * {@link #setSelection(ISelection)}. These methods are called by the RSE viewers for context menu actions, and
- * can be called directly for actions used in other contexts.
- * <li>{@link #setSelectionProvider(ISelectionProvider)}, for those cases when your action monitors for selection
- * changes (pull) versus being told about them (push) via setSelection. This is less efficient, and should only
- * be used for selection-dependent actions in toolbars and pull-down menus, versus popup menus.
- * <li>{@link #setHelp(String)} to set the ID of the F1 context help for this action.
- * <li>{@link #setContextMenuGroup(String)} to set the menu group in which to place this action, when used in menus.
- * <li>{@link #allowOnMultipleSelection(boolean)} to specify if this action is to be enabled or disabled when multiple
- * objects are selected. The default is disabled.
- * <li>{@link #setSelectionSensitive(boolean)} to specify if this action's enabled state is not sensitive to what
- * is currently selected.
- * </sl>
- * <p>Further, the code you write can use the properties captured by this action and retrievable by the getter methods
- * supplied by this class.</p>
- *
- * @see ISystemAction
- * @see SystemBaseDialogAction
- * @see SystemBaseWizardAction
- */
-public class SystemBaseAction extends Action implements ISystemAction
-{
- protected Shell shell;
- protected boolean allowOnMultipleSelection = false;
- protected IStructuredSelection sSelection = null;
- private Iterator selectionIterator = null;
- private String contextMenuGroup = null;
- protected boolean selectionSensitive = true;
- protected boolean traceSelections = false;
- protected String traceTarget;
- protected Viewer viewer = null;
- protected String helpId;
- protected Cursor waitCursor;
- protected Cursor arrowCursor;
- private ISelectionProvider fSelectionProvider;
- private Vector previousShells = new Vector();
- private Vector previousViewers = new Vector();
- //private Vector previousSelections = new Vector(); hmm, a problem here: can't just test for disposed.
- // todo: remember previous selections stack, and add a restoreSelection() method that the SystemView
- // will call after the context menu is disposed
-
- // yantzi: artemis 6.0: offline support
- private boolean isAvailableOffline;
- private IHost conn;
-
- /**
- * Constructor for SystemBaseAction when translated label is known. You must separately
- * call setToolTipText and setDescription to enable these if desired.
- * @param text string to display in menu or toolbar
- * @param image icon to display in menu or toolbar. Can be null.
- * @param shell Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- public SystemBaseAction(String text, ImageDescriptor image, Shell shell)
- {
- this(text, null, null, image, shell);
- }
- /**
- * Constructor for SystemBaseAction when translated label and tooltip are known. You must
- * separately call setDescription to enable this if desired.
- * @param text string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- * @param image icon to display in menu or toolbar. Can be null.
- * @param parent Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- public SystemBaseAction(String text, String tooltip, ImageDescriptor image, Shell parent)
- {
- this(text, tooltip, null, image, parent);
- }
- /**
- * Constructor for SystemBaseAction when translated label and tooltip and description are
- * all known.
- * @param text string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- * @param description string displayed in status bar of some displays. Longer than tooltip.
- * @param image icon to display in menu or toolbar. Can be null.
- * @param shell Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- public SystemBaseAction(String text, String tooltip, String description, ImageDescriptor image, Shell shell)
- {
- super(text, image);
- this.shell = shell;
- if (tooltip != null)
- setToolTipText(tooltip);
- if (description != null)
- setDescription(description);
- //setTracing("SystemFilterPoolReferenceSelectAction");
- }
-
- /**
- * Constructor for SystemBaseAction when translated label and tooltip and description are
- * all known.
- * @param text string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- * @param description string displayed in status bar of some displays. Longer than tooltip.
- * @param image icon to display in menu or toolbar. Can be null.
- * @param style one of <code>AS_PUSH_BUTTON</code>, <code>AS_CHECK_BOX</code>,
- * <code>AS_DROP_DOWN_MENU</code>, <code>AS_RADIO_BUTTON</code>, and <code>AS_UNSPECIFIED</code>.
- * @param shell Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- public SystemBaseAction(String text, String tooltip, String description, ImageDescriptor image, int style, Shell shell)
- {
- super(text, style);
- this.shell = shell;
- if (image != null)
- setImageDescriptor(image);
- if (tooltip != null)
- setToolTipText(tooltip);
- if (description != null)
- setDescription(description);
- //setTracing("SystemFilterPoolReferenceSelectAction");
- }
-
-
- /**
- * Used for actions with no image icon.
- * Constructor for SystemBaseAction when translated label is known. You must separately
- * call setToolTipText and setDescription to enable these if desired.
- * @param text string to display in menu or toolbar
- * @param shell Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- public SystemBaseAction(String text, Shell shell)
- {
- this(text, null, null, null, shell);
- }
- /**
- * Used for actions with no image icon.
- * Constructor for SystemBaseAction when translated label and tooltip are known. You must
- * separately call setDescription to enable this if desired.
- * @param text string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- * @param shell Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- public SystemBaseAction(String text, String tooltip, Shell shell)
- {
- this(text, tooltip, null, null, shell);
- }
- /**
- * Used for actions with no image icon.
- * Constructor for SystemBaseAction when translated label and tooltip and description are
- * all known.
- * @param text string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- * @param description string displayed in status bar of some displays. Longer than tooltip.
- * @param shell Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- public SystemBaseAction(String text, String tooltip, String description, Shell shell)
- {
- this(text, tooltip, description, null, shell);
- }
-
-
- // ------------------------
- // HELPER METHODS...
- // ------------------------
-
- /**
- * Set the cursor to the wait cursor (true) or restores it to the normal cursor (false).
- */
- public void setBusyCursor(boolean setBusy)
- {
- if (setBusy)
- {
- // Set the busy cursor to all shells.
- Display d = getShell().getDisplay();
- waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
- setDisplayCursor(waitCursor);
- }
- else
- {
- setDisplayCursor(null);
- if (waitCursor != null)
- waitCursor.dispose();
- waitCursor = null;
- }
- }
- /**
- * Sets the given cursor for all shells currently active
- * for this window's display.
- *
- * @param c the cursor
- */
- protected void setDisplayCursor(Cursor c)
- {
- setDisplayCursor(getShell(), c);
- }
- /**
- * Sets the given cursor for all shells currently active for the given shell's display.
- *
- * @param c the cursor
- */
- public static void setDisplayCursor(Shell shell, Cursor c)
- {
- if (c == null)
- {
- // attempt to fix problem that the busy cursor sometimes stays. Phil
- shell.forceActive();
- shell.forceFocus();
- }
- Shell[] shells = shell.getDisplay().getShells();
- for (int i = 0; i < shells.length; i++)
- {
- shells[i].setCursor(c);
- }
- }
- /**
- * Turn on tracing for selections, shell and viewer to watch as it is set
- */
- protected void setTracing(boolean tracing)
- {
- traceSelections = tracing;
- }
- /**
- * Turn on tracing for selections, shell and viewer to watch as it is set,
- * scoped to a particular class name (will use indexOf('xxx') to match).
- */
- protected void setTracing(String tracingClassTarget)
- {
- traceSelections = true;
- traceTarget = tracingClassTarget;
- }
- /**
- * Issue trace message
- */
- protected void issueTraceMessage(String msg)
- {
- if (traceSelections)
- {
- String className = this.getClass().getName();
- if ((traceTarget==null) || (className.indexOf(traceTarget)>=0))
- SystemBasePlugin.logInfo(this.getClass().getName()+": "+getText()+": "+msg); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- // -----------------------------------------------------------
- // CONFIGURATION METHODS...
- // -----------------------------------------------------------
-
- /**
- * An optimization for performance reasons that allows all inputs to be set in one call
- */
- public void setInputs(Shell shell, Viewer v, ISelection selection)
- {
- if (traceSelections)
- issueTraceMessage(" INSIDE SETINPUTS IN BASE ACTION CLASS"); //$NON-NLS-1$
- setShell(shell);
- setViewer(v);
- setSelection(selection);
- }
-
- /**
- * Sets the parent shell for this action. Usually context dependent.
- */
- public void setShell(Shell shell)
- {
- // in defect 42399 it was reported the shell for persistent actions gets reset in browse
- // dialogs, on a right click, overriding the real shell with the browse dialog's shell.
- // When the browse dialog is closed, we only retain the disposed shell. To solve this
- // we have to return a stack of shells and on getShell peel back to the last non-disposed
- // one...
- this.previousShells.add(this.shell);
- this.shell = shell;
- if (traceSelections)
- issueTraceMessage(" INSIDE SETSHELL. shell = " + shell); //$NON-NLS-1$
- }
- /**
- * Set the Viewer that called this action. It is good practice for viewers to call this
- * so actions can directly access them if needed.
- */
- public void setViewer(Viewer v)
- {
- this.previousViewers.add(this.viewer); // see comment in setShell
- this.viewer = v;
- if (traceSelections)
- issueTraceMessage(" INSIDE SETVIEWER. viewer = " + viewer); //$NON-NLS-1$
- }
- /**
- * This is called when the user selects something in the tree.
- * This is your opportunity to disable the action based on the current selection.
- * The default implementation of this method:
- * <ul>
- * <li>Disables the action if the selection is not a structured selection. Should never happen.
- * <li>Disables the action if more than one item is selected and allowOnMultipleSelection is false.
- * <li>Converts the selection to a structured selection and calls updateSelection. Uses returned
- * boolean value to setEnabled() this action.
- * </ul>
- */
- public void selectionChanged(SelectionChangedEvent event)
- {
- ISelection selection = event.getSelection();
- if (traceSelections)
- issueTraceMessage("INSIDE SELECTIONCHANGED. Selection null? " + (selection==null)); //$NON-NLS-1$
- setSelection(selection);
- }
- /**
- * This is called by the UI calling the action, if that UI is not a selection provider.
- * That is, this is an alternative to calling selectionChanged when there is no SelectionChangedEvent.
- * @see #selectionChanged(SelectionChangedEvent event)
- */
- public void setSelection(ISelection selection)
- {
- if (traceSelections)
- issueTraceMessage(" INSIDE SETSELECTION. Selection null? " + (selection==null)); //$NON-NLS-1$
- if ( !(selection instanceof IStructuredSelection) )
- {
- if (selectionSensitive)
- setEnabled(false);
- if (traceSelections)
- System.out.println(this.getClass().getName() + ". Returning false in setSelection. selection= " + selection); //$NON-NLS-1$
- return;
- }
- if (selectionSensitive)
- {
- // see comment in setShell
- //this.previousSelections.add(this.sSelection);
- }
- sSelection = (IStructuredSelection)selection;
- if (!selectionSensitive || (selection == null))
- {
- if (traceSelections)
- System.out.println(this.getClass().getName() + ". Returning. selectionSensitive = " + selectionSensitive); //$NON-NLS-1$
- return;
- }
- boolean multiSelect = (sSelection.size() > 1);
- if (!allowOnMultipleSelection && multiSelect)
- {
- setEnabled(false);
- if (traceSelections)
- System.out.println(this.getClass().getName() + ". Returning false in setSelection. #selected = " + sSelection.size()); //$NON-NLS-1$
- }
- else
- {
- boolean enable = false;
- /*
- boolean debug = getText().equals("Copy");
- if (debug)
- enable = updateSelection(sSelection);
- else */
- enable = updateSelection(sSelection);
- setEnabled(enable);
- }
- }
- /**
- * Identify the UI object that will be used to get the selection
- * list from. <b>Only call this if your action is displayed in a toolbar
- * or non-popup menu<b>, as it will impact performance. It results in your
- * action getting called every time the user changes his selection in
- * the given provider viewer.
- */
- public void setSelectionProvider(ISelectionProvider provider)
- {
- if (fSelectionProvider != null)
- fSelectionProvider.removeSelectionChangedListener(this);
-
- fSelectionProvider = provider;
- if (traceSelections)
- issueTraceMessage(" INSIDE SETSELECTIONPROVIDER. fSelectionProvider = " + fSelectionProvider); //$NON-NLS-1$
-
-
- if (fSelectionProvider != null)
- fSelectionProvider.addSelectionChangedListener(this);
- }
-
-
- // ---------------------------------------------------------------------------
- // CONFIGURATION METHODS CHILD CLASSES OR OTHERS CALL TO CONFIGURE THIS ACTION
- // ---------------------------------------------------------------------------
- /**
- * Set the help id for the action
- */
- public void setHelp(String id)
- {
- SystemWidgetHelpers.setHelp(this, id);
- this.helpId = id;
- }
-
- /**
- * Set the context menu group this action is to go into, for popup menus. If not set,
- * someone else will make this decision.
- */
- public void setContextMenuGroup(String group)
- {
- contextMenuGroup = group;
- }
- /**
- * This method is supplied for actions that are to be enable even when more than
- * one item is selected. The default is to only enable on single selections.
- */
- public void allowOnMultipleSelection(boolean allow)
- {
- allowOnMultipleSelection = allow;
- }
- /**
- * Specify whether this action is selection-sensitive. The default is true.
- * This means the enabled state is tested and set when the selection is set.
- */
- public void setSelectionSensitive(boolean sensitive)
- {
- selectionSensitive = sensitive;
- }
-
- // ---------------------------------------------------------------------------
- // METHODS THAT CAN OR SHOULD BE OVERRIDDEN BY CHILD CLASSES...
- // ---------------------------------------------------------------------------
-
- /**
- * First opportunity to decide if the action should be enabled or not based on the
- * current selection. Called by default implementation of selectionChanged, which
- * converts the ISelection to an IStructuredSelection, which is all we support. The
- * return result is used to enable or disable this action.
- * <p>
- * The default implementation of this method:
- * <ul>
- * <li>Returns false if calling checkObjectType on any object in the selection list returns false.
- * <li>Returns true otherwise.
- * </ul>
- * If desired, override this method for a different algorithm to decide enablement.
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- Iterator e= selection.iterator();
- while (enable && e.hasNext())
- {
- enable = checkObjectType(e.next());
- }
- return enable;
- }
-
- /**
- * Second and easiest opportunity to decide if the action should be enabled or not based
- * on the current selection. Called by default implementation of updateSelection, once for
- * each item in the selection. If any call to this returns false, the action is disabled.
- * The default implementation returns true.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- return true;
- }
-
-
- /**
- * This is the method called when the user selects this action.
- * Child classes need to override this. If you need the parent shell,
- * call getShell. If you need to know the current selection, call
- * getSelection(), or getFirstSelection() followed by getNextSelection()
- * until null is returned.
- * @see Action#run()
- */
- public void run()
- {
-
- }
-
-
- // -----------------------------------------------------------
- // GETTER METHODS RETURNING INFORMATION CAPTURED IN BASE CLASS
- // -----------------------------------------------------------
- /**
- * Return if true if this is a dummy action
- */
- public boolean isDummy()
- {
- String label = getText();
- if (label == null)
- return false;
- return label.equals("dummy"); //$NON-NLS-1$
- }
-
- /**
- * Retrieve the help id for this action
- */
- public String getHelpContextId()
- {
- return helpId;
- }
-
- /**
- * Retrieves the parent shell for this action. Will be null if setShell has not been called.
- */
- public Shell getShell()
- {
- return internalGetShell(true);
- }
- /**
- * Retrieves the parent shell for this action. Will be null if setShell has not been called.
- * Method for subclasses that want to call this and not do the test for null.
- */
- protected Shell getShell(boolean doTest)
- {
- return internalGetShell(doTest);
- }
- /**
- * Abstraction
- */
- private Shell internalGetShell(boolean doTest)
- {
- // in defect 42399 it was reported the shell for persistent actions gets reset in browse
- // dialogs, on a right click, overriding the real shell with the browse dialog's shell.
- // When the browse dialog is closed, we only retain the disposed shell. To solve this
- // we have to return a stack of shells and on getShell peel back to the last non-disposed
- // one...
- if ((shell!=null) && (shell.isDisposed()))
- {
- boolean found = false;
- Vector disposedShells = new Vector();
- for (int idx=previousShells.size()-1; !found && (idx>=0); idx--)
- {
- shell = (Shell)previousShells.elementAt(idx);
- if (shell.isDisposed())
- disposedShells.add(shell);
- else
- found = true;
- }
- if (!found)
- shell = null;
- for (int idx=0; idx<disposedShells.size(); idx++)
- previousShells.remove(disposedShells.elementAt(idx));
- }
- if (doTest && (shell == null))
- {
- System.out.println("Inside getShell for " + this.getClass().getName() + " and the shell is null! This needs to be investigated"); //$NON-NLS-1$ //$NON-NLS-2$
- SystemBasePlugin.logDebugMessage("SystemBaseAction", "Inside getShell for " + this.getClass().getName() + " and the shell is null! This needs to be investigated"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- return shell;
- }
- /**
- * Get the Viewer that called this action. Not guaranteed to be set,
- * depends if that viewer called setViewer or not. SystemView does.
- */
- public Viewer getViewer()
- {
- // see comment in getShell()...
- if ((viewer!=null) && (viewer.getControl().isDisposed()))
- {
- boolean found = false;
- Vector disposedViewers = new Vector();
- for (int idx=disposedViewers.size()-1; !found && (idx>=0); idx--)
- {
- viewer = (Viewer)previousViewers.elementAt(idx);
- if (viewer.getControl().isDisposed())
- disposedViewers.add(viewer);
- else
- found = true;
- }
- if (!found)
- viewer = null;
- for (int idx=0; idx<disposedViewers.size(); idx++)
- previousViewers.remove(disposedViewers.elementAt(idx));
- }
- return viewer;
- }
- /**
- * Return the current viewer as an ISystemTree if it is one, or null otherwise
- */
- protected ISystemTree getCurrentTreeView()
- {
- Viewer v = getViewer();
- if (v instanceof ISystemTree)
- return (ISystemTree)v;
- else
- return null;
- }
-
- /**
- * Get the context menu group this action is to go into, for popup menus. By default is
- * null, meaning there is no recommendation
- */
- public String getContextMenuGroup()
- {
- return contextMenuGroup;
- }
-
- /**
- * Return whether this action is selection-sensitive. The default is true.
- * This means the enabled state is tested and set when the selection is set.
- */
- public boolean isSelectionSensitive()
- {
- return selectionSensitive;
- }
-
- /**
- * Return value of last call to getSelectionProvider.
- */
- public ISelectionProvider getSelectionProvider()
- {
- return fSelectionProvider;
- }
-
- /**
- * Return current selection, as per last call to selectionChanged.
- */
- public IStructuredSelection getSelection()
- {
- if (traceSelections)
- issueTraceMessage(" INSIDE GETSELECTION. sSelection null? " + (sSelection==null)); //$NON-NLS-1$
- return sSelection;
- }
-
- /**
- * Return first item currently selected, as per last call to selectionChanged.
- * This is handy for actions where allowOnMultipleSelection is false.
- * This method also starts a new iterator, and after you can call getNextSelection()
- * until it returns null. This is handy for actions where allowOnMultipleSelection is true.
- * @see #getNextSelection()
- */
- protected Object getFirstSelection()
- {
- if (sSelection != null)
- {
- selectionIterator = sSelection.iterator();
- if (selectionIterator.hasNext())
- return selectionIterator.next();
- else
- return null;
- }
- else
- selectionIterator = null;
- return null;
- }
- /**
- * Return next item currently selection, as per last call to selectionChanged.
- * YOU MUST HAVE CALLED GETFIRSTSELECTION() PRIOR TO CALLING THIS.
- * Your code can loop until this returns null.
- * @see #getFirstSelection()
- */
- protected Object getNextSelection()
- {
- if ((sSelection != null) && (selectionIterator != null))
- {
- if (selectionIterator.hasNext())
- return selectionIterator.next();
- else
- return null;
- }
- else
- selectionIterator = null;
- return null;
- }
-
- /**
- * Disables this action if offline mode, otherwise delegates to the super class.
- *
- * @see org.eclipse.jface.action.IAction#isEnabled()
- */
- public boolean isEnabled()
- {
- if (!isAvailableOffline)
- {
- if (conn != null && conn.isOffline())
- {
- return false;
- }
- else
- {
- Object selection = getFirstSelection();
- while (selection != null)
- {
- if (selection instanceof ISubSystem && ((ISubSystem)selection).isOffline())
- {
- return false;
- }
-
- // yantzi: this disables all actions on SystemConnection
- //else if (selection instanceof SystemConnection)
- //{
- // connection = (SystemConnection)selection;
- // if (connection.isOffline())
- // return false;
- //}
-
- selection = getNextSelection();
- }
- }
-
- }
-
- return super.isEnabled();
- }
-
- /**
- * If this is one of those rare actions that is to be made available in offline mode, then call this
- * during or immediately after constructing to state that. The default is false.
- */
- public void setAvailableOffline(boolean availableOffline)
- {
- this.isAvailableOffline = availableOffline;
- }
-
- /**
- * Set the SystemConnection used by this action for disabling the action
- * in offline mode, or for whatever reason subclasses may need it.
- */
- public void setHost(IHost connection)
- {
- conn = connection;
- }
-
- /**
- * Return the system connection which is the parent of whatever is currently selected.
- */
- public IHost getSystemConnection()
- {
- return conn;
- }
-
-} \ 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
deleted file mode 100644
index 265854371..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java
+++ /dev/null
@@ -1,436 +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.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * An abstract base class for all copy actions. Defers minimal requirements to
- * child classes.
- */
-public abstract class SystemBaseCopyAction extends SystemBaseDialogAction
- implements IRunnableWithProgress, ISystemCopyTargetSelectionCallback
-{
- protected ISystemProfileManager mgr;
- protected ISystemRegistry sr;
- protected String[] oldNames;
- protected String[] newNames;
- protected Object[] oldObjects;
- protected Object targetContainer;
- protected boolean copiedOk = true;
- //private boolean makeActive;
- protected Exception runException = null;
- protected int mode = SystemSimpleCopyDialog.MODE_COPY;
- protected int runCount = 0;
- public static final int MODE_COPY = SystemSimpleCopyDialog.MODE_COPY;
- public static final int MODE_MOVE = SystemSimpleCopyDialog.MODE_MOVE;
-
-
- /**
- * Constructor when using default action ID
- * @param parent Owning shell
- * @param mode Either MODE_COPY or MODE_MOVE from this class
- */
- public SystemBaseCopyAction(Shell parent, int mode)
- {
- this(parent, mode==MODE_COPY ? SystemResources.ACTION_COPY_LABEL : SystemResources.ACTION_MOVE_LABEL, mode);
- }
-
- /**
- * Constructor
- * @param parent Owning shell
- * @param label
- * @param mode Either MODE_COPY or MODE_MOVE from this class
- */
- public SystemBaseCopyAction(Shell parent, String label, int mode)
- {
- super(label,
- (mode==MODE_COPY ?
- PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY)
- //RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_COPY_ID)
- : RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVE_ID)),
- parent);
- this.mode = mode;
- mgr = SystemProfileManager.getSystemProfileManager();
- sr = RSEUIPlugin.getTheSystemRegistry();
- allowOnMultipleSelection(true);
- setProcessAllSelections(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- }
-
- /**
- * Reset. This is a re-run of this action
- */
- protected void reset()
- {
- oldNames = null;
- newNames = null;
- oldObjects = null;
- targetContainer = null;
- copiedOk = true;
- runException = null;
- //System.out.println("inside base reset()");
- }
-
- /**
- * Override of parent.
- * Return the dialog that will be used to prompt for the copy/move target location
- * @see #run()
- */
- protected Dialog createDialog(Shell parent)
- {
- ++runCount;
- if (runCount > 1)
- reset();
- SystemSimpleCopyDialog copyDlg = new SystemSimpleCopyDialog(parent, getPromptString(), mode, this, getTreeModel(), getTreeInitialSelection());
-
- // our title now reflects multiple selection. If single change it.
- IStructuredSelection sel = getSelection();
- //System.out.println("size = "+sel.size());
- if (sel.size() == 1)
- {
- String singleTitle = null;
- if (mode == MODE_COPY)
- singleTitle = SystemResources.RESID_COPY_SINGLE_TITLE;
- else
- singleTitle = SystemResources.RESID_MOVE_SINGLE_TITLE;
- //System.out.println("..."+singleTitle);
- if (!singleTitle.startsWith("Missing")) // TODO: remove test after next mri rev //$NON-NLS-1$
- copyDlg.setTitle(singleTitle);
- }
-
- return copyDlg;
- }
-
- protected abstract String[] getOldNames();
- protected abstract Object[] getOldObjects();
- /**
- * Get the verbage prompt to show on line one of the copy dialog
- */
- protected String getPromptString()
- {
- if (mode == MODE_COPY)
- return SystemResources.RESID_COPY_PROMPT;
- else
- return SystemResources.RESID_MOVE_PROMPT;
- }
-
- protected abstract SystemSimpleContentElement getTreeModel();
- protected abstract SystemSimpleContentElement getTreeInitialSelection();
-
- /**
- * This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected
- * object is a valid parent object. This affects the enabling of the OK button on that dialog.
- * <p>
- * The default is to return true if the selected element has no children. This is sufficient for most cases. However,
- * in some cases it is not, such as for filter strings where we want to only enable OK if a filter is selected. It is
- * possible that filter pools have no filters, so the default algorithm is not sufficient. In these cases the child class
- * can override this method.
- */
- public boolean isValidTargetParent(SystemSimpleContentElement selectedElement)
- {
- return !selectedElement.hasChildren();
- }
-
-
- /**
- * Required by parent. We use it to actually do the work.
- */
- protected Object getDialogValue(Dialog dlg)
- {
- targetContainer = getTargetContainer(dlg);
- if (targetContainer != null)
- {
- boolean okToProceed = preCheckForCollision();
- if (!okToProceed)
- return null;
- IRunnableContext runnableContext = getRunnableContext();
- try
- {
- runnableContext.run(false,false,this); // inthread, cancellable, IRunnableWithProgress
- if (copiedOk)
- {
- SystemMessage completeMsg = getCompletionMessage(targetContainer, oldNames, newNames);
- if (completeMsg != null)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(),completeMsg);
- msgDlg.open();
- }
- }
- }
- catch (java.lang.reflect.InvocationTargetException exc) // unexpected error
- {
- showOperationMessage((Exception)exc.getTargetException(), getShell());
- //throw (Exception) exc.getTargetException();
- }
- catch (Exception exc)
- {
- showOperationMessage(exc, getShell());
- //throw exc;
- }
- }
- return null;
- }
- /**
- * Get an IRunnable context to show progress in. If there is currently a dialog or wizard up with
- * a progress monitor in it, we will use this, else we will create a progress monitor dialog.
- */
- protected IRunnableContext getRunnableContext()
- {
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IRunnableContext irc = sr.getRunnableContext();
- if (irc == null)
- irc = new ProgressMonitorDialog(getShell());
- return irc;
- }
- /**
- * Override this method if you supply your own copy/move target dialog.
- * Return the user-selected target or null if cancelled
- */
- protected Object getTargetContainer(Dialog dlg)
- {
- SystemSimpleCopyDialog cpyDlg = (SystemSimpleCopyDialog)dlg;
- Object targetContainer = null;
- if (!cpyDlg.wasCancelled())
- targetContainer = cpyDlg.getTargetContainer();
- return targetContainer;
- }
-
- /**
- * Do a pre-check for a collision situation.
- * This really is only a problem for filter strings, when a name collision is fatal verus
- * recoverable via a new-name prompt.
- */
- protected boolean preCheckForCollision()
- {
- boolean ok = true;
- oldNames = getOldNames();
- oldObjects = getOldObjects();
- int steps = oldObjects.length;
-
- String oldName = null;
- Object oldObject = null;
- for (int idx=0; ok && (idx<steps); idx++)
- {
- oldName = oldNames[idx];
- oldObject = oldObjects[idx];
- ok = preCheckForCollision(getShell(), targetContainer, oldObject, oldName);
- }
- return ok;
- }
- /**
- * Overridable entry point when you want to prevent any copies/moves if any of the
- * selected objects have a name collision.
- * <p>
- * If you decide to override this, it is your responsibility to issue the error
- * message to the user and return false here.
- * <p>
- * @return true if there is no problem, false if there is a fatal collision
- */
- protected boolean preCheckForCollision(Shell shell, Object targetContainer,
- Object oldObject, String oldName)
- {
- return true;
- }
-
- /**
- * Called after all the copy/move operations end, be it successfully or not.
- * Your opportunity to display completion or do post-copy selections/refreshes
- */
- public void copyComplete() {}
-
- // ----------------------------------
- // INTERNAL METHODS...
- // ----------------------------------
- /**
- * Method required by IRunnableWithProgress interface.
- * Allows execution of a long-running operation modally by via a thread.
- * In our case, it runs the copy operation with a visible progress monitor
- */
- public void run(IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- SystemMessage msg = getCopyingMessage();
- runException = null;
-
- try
- {
- //oldNames = getOldNames();
- //oldObjects = getOldObjects();
- int steps = oldObjects.length;
- monitor.beginTask(msg.getLevelOneText(), steps);
- copiedOk = true;
- String oldName = null;
- String newName = null;
- Object oldObject = null;
- newNames = new String[oldNames.length];
- for (int idx=0; copiedOk && (idx<steps); idx++)
- {
- oldName = oldNames[idx];
- oldObject = oldObjects[idx];
- monitor.subTask(getCopyingMessage(oldName).getLevelOneText());
- newName = checkForCollision(getShell(), monitor, targetContainer, oldObject, oldName);
- if (newName == null)
- copiedOk = false;
- else
- copiedOk = doCopy(monitor, targetContainer, oldObject, newName);
- newNames[idx] = newName;
- monitor.worked(1);
- }
- monitor.done();
- }
- catch(java.lang.InterruptedException exc)
- {
- monitor.done();
- runException = exc;
- throw (java.lang.InterruptedException)runException;
- }
- catch(Exception exc)
- {
- monitor.done();
- runException = new java.lang.reflect.InvocationTargetException(exc);
- throw (java.lang.reflect.InvocationTargetException)runException;
- }
- if (copiedOk)
- copyComplete();
- }
-
- protected abstract String checkForCollision(Shell shell, IProgressMonitor monitor, Object targetContainer, Object oldObject, String oldName);
- /**
- * Get the generic "Copying..." or "Moving..." message
- */
- protected SystemMessage getCopyingMessage()
- {
- if (mode == MODE_COPY)
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYGENERIC_PROGRESS);
- else
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVEGENERIC_PROGRESS);
- }
- /**
- * Get the specific "Copying %1..." or "Moving %1..." message
- */
- protected SystemMessage getCopyingMessage(String oldName)
- {
- SystemMessage msg = null;
- if (mode == MODE_COPY)
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYTHINGGENERIC_PROGRESS);
- else
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVETHINGGENERIC_PROGRESS);
- msg.makeSubstitution(oldName);
- return msg;
- }
-
- /**
- * DO THE ACTUAL COPY OR MOVE. THIS MUST BE IMPLEMENTED BY CHILD CLASSES
- */
- protected abstract boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception;
-
- /**
- * Return complete message.
- * Override if you want to popup a completion message after a successful copy/move
- */
- public SystemMessage getCompletionMessage(Object targetContainer, String[] oldNames, String[] newNames)
- {
- return null;
- }
-
- /**
- * Helper method to show an error message resulting from the attempted operation.
- */
- protected void showOperationMessage(Exception exc, Shell shell)
- {
- if (exc instanceof java.lang.InterruptedException)
- showOperationCancelledMessage(shell);
- else if (exc instanceof java.lang.reflect.InvocationTargetException)
- showOperationErrorMessage(shell, ((java.lang.reflect.InvocationTargetException)exc).getTargetException());
- else
- showOperationErrorMessage(shell, exc);
- }
-
- /**
- * Show an error message when the operation fails.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showOperationErrorMessage(Shell shell, Throwable exc)
- {
- if (exc instanceof SystemMessageException)
- showOperationErrorMessage(shell, (SystemMessageException)exc);
- else
- {
- String msg = exc.getMessage();
- if ((msg == null) || (exc instanceof ClassCastException))
- msg = exc.getClass().getName();
- SystemMessageDialog msgDlg =
- new SystemMessageDialog(shell,
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED).makeSubstitution(msg));
- msgDlg.setException(exc);
- msgDlg.open();
- //RSEUIPlugin.logError("Copy/Move operation failed",exc);
- }
- }
- /**
- * Show an error message when the operation fails.
- * Shows a SystemMessage that was encapsulated in a SystemMessage exception
- * Overridable.
- */
- protected void showOperationErrorMessage(Shell shell, SystemMessageException exc)
- {
- SystemMessage msg = exc.getSystemMessage();
- SystemMessageDialog msgDlg =
- new SystemMessageDialog(shell, msg);
- msgDlg.open();
- //RSEUIPlugin.logError("Copy/Move operation failed",exc);
- }
-
- /**
- * Show an error message when the user cancels the operation.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showOperationCancelledMessage(Shell shell)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED));
- msgDlg.open();
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDialogAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDialogAction.java
deleted file mode 100644
index ffa61bcb7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDialogAction.java
+++ /dev/null
@@ -1,360 +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.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.ui.dialogs.ISystemPromptDialog;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.dialogs.SystemWizardDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * A specialization for Action for actions that put up dialogs.
- * These actions have some common requirements:
- * <sl>
- * <li>They need to take the parent Shell object in the constructor or later perhaps via setParent
- * <li>They need to be able to set the input value for the dialog. This is typically related to
- * what is currently selected.
- * <li>They need to be able to get the output value from the dialog. This can be queried by
- * calling getValue after the action runs.
- * </sl>
- * <p>This subclass of SystemBaseAction implements the run() method in a way optimized for the processing
- * of dialogs: it calls an abstract method to create the dialog, then sets the input from the action's
- * value (if set) or selection (otherwise) and opens the dialog. After, it calls an abstract method to
- * extract the dialog's output object which is used to set this action's value, for the benefit of the
- * caller.
- * </p>
- * <p>To use this dialog, subclass it and <b>override</b> the following methods</p>:
- * <sl>
- * <li>{@link #createDialog(Shell)}
- * <li>{@link #getDialogValue(Dialog)}
- * <li>{@link #run()} but ONLY if you don't want the default implementation of this method.
- * </sl>
- * <p>In addition to the methods you must override, you can optionally call various methods to configure
- * this action. In addition to those in the parent class, this class offers these configuration methods:</p>
- * <sl>
- * <li>{@link #setDialogHelp(String)} to set the context help ID for the dialog, for cases where the dialog is generic
- * and its help depends on context and hence cannot be hardcoded in the dialog class.
- * <li>{@link #setValue(Object)} to the set the input object to pass to the dialog, for cases where the current selection
- * is not what you want to pass to the dialog.
- * <li>{@link #setNeedsProgressMonitor(boolean)} to specify if the dialog is to display a progress monitor or not, for cases
- * where this decision depends on context and hence cannot be hardcoded in the dialog class.
- * <li>{@link #setProcessAllSelections(boolean)} to specify the behaviour when there are multiple objects selected. By
- * default, the dialog will be created and processed once for each selected object, but you can specify that you instead
- * want to only invoke the dialog once and pass in all selected objects as a single ISelection object.
- * </sl>
- *
- */
-public abstract class SystemBaseDialogAction extends SystemBaseAction
- implements ISystemDialogAction
-{
- protected Object value;
- protected boolean processAll;
- protected boolean needsProgressMonitor, needsProgressMonitorSet;
- protected boolean cancelled;
- protected String dlgHelpId;
-
- /**
- * Constructor for SystemBaseDialogAction when translated label is known. You must separately
- * call setToolTipText and setDescription to enable these if desired.
- * @param text string to display in menu or toolbar
- * @param image icon to display in menu or toolbar. Can be null.
- * @param shell Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- protected SystemBaseDialogAction(String text, ImageDescriptor image, Shell shell)
- {
- super(text, image, shell);
- }
- /**
- * Constructor for SystemBaseDialogAction when translated label and tooltip are known. You must
- * separately call setDescription to enable this if desired.
- * @param text string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- * @param image icon to display in menu or toolbar. Can be null.
- * @param shell Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- protected SystemBaseDialogAction(String text, String tooltip, ImageDescriptor image, Shell shell)
- {
- super(text, tooltip, image, shell);
- }
-
-
- /**
- * Constructor for SystemBaseDialogAction when translated label and tooltip and description are
- * all known.
- * @param text string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- * @param description string displayed in status bar of some displays. Longer than tooltip.
- * @param image icon to display in menu or toolbar. Can be null.
- * @param shell Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- protected SystemBaseDialogAction(String text, String tooltip, String description, ImageDescriptor image, Shell shell)
- {
- super(text, tooltip, description, image, shell);
- }
-
-
-
-
- // ------------------------
- // HELPER/GETTER METHODS...
- // ------------------------
- /**
- * Return the help Id destined for the dialog this action brings up
- */
- public String getDialogHelpContextId()
- {
- return dlgHelpId;
- }
- /**
- * Get the value, typically set in actionPerformed
- * after putting up the dialog, and holds the output
- * from the dialog.
- */
- public Object getValue()
- {
- return value;
- }
- /**
- * Return true if the action's dialog/wizard is to include a progress monitor
- */
- public boolean getNeedsProgressMonitor()
- {
- return needsProgressMonitor;
- }
- /**
- * Return true if the caller explicitly called setNeedsProgressMonitor
- */
- protected boolean wasNeedsProgressMonitorSet()
- {
- return needsProgressMonitorSet;
- }
- /**
- * Return setting of setProcessAllSelections.
- * @see #setProcessAllSelections(boolean)
- */
- protected boolean getProcessAllSelections()
- {
- return this.processAll;
- }
- /**
- * Returns true if the user cancelled the dialog.
- * The default way to guess at this is to test if the output from
- * getDialogValue was null or not. Override if you need to refine this.
- */
- public boolean wasCancelled()
- {
- if (cancelled) // most accurate
- return true;
- else
- return (value == null);
- }
-
- // -----------------------------------------------------------
- // CONFIGURATION METHODS...
- // -----------------------------------------------------------
-
- /**
- * When using generic dialogs, it is nice to offer non-generic help.
- * If desired, set the help context ID here, and it will be passed on
- * to the generic dialog after instantiation of it.
- */
- public void setDialogHelp(String id)
- {
- this.dlgHelpId = id;
- }
- /**
- * Set the value used as input to the dialog
- */
- public void setValue(Object value)
- {
- this.value = value;
- }
- /**
- * If desired, specify if you want to include a progress monitor in your
- * dialog or wizard. If the dialog is a SystemPromptDialog or the Wizard
- * is a SystemWizardDialog, it will be passed on after instantiating the
- * dialog or wizard.
- */
- public void setNeedsProgressMonitor(boolean needs)
- {
- this.needsProgressMonitor = needs;
- this.needsProgressMonitorSet = true;
- }
- /**
- * If this action supports being enabled for multiple selections (the default,
- * but changable by calling allowOnMultipleSelections(false)), then by default
- * the default run() implementation will create and invoke the dialog once for each
- * item selected. Call this with true to change that behaviour so that the dialog
- * is only created and processed once.
- * <p>
- * Use this when the dialog itself will process all selected items at once.
- * <p>
- * The default is false.
- */
- public void setProcessAllSelections(boolean all)
- {
- this.processAll = all;
- }
-
- // -----------------------------------------------------------
- // OVERRIDABLE METHODS...
- // -----------------------------------------------------------
-
- /**
- * This is the method called by the system when the user
- * selects this action. This is a default implementation
- * which:
- * <ul>
- * <li>calls abstract method createDialog() to get the dialog
- * object. Child classes must implement this method.
- * <li>if the returned dialog implements ISystemPromptDialog, then
- * it will call setInputObject passing getValue() as the paramter.
- * If getValue returns null, then instead the currently selected objects
- * are passed as the parameter. If setProcessAllSelections has been called
- * then the current ISelection is passed, else the each object in the selection
- * is passed, and the dialog is displayed once per selected object.
- * Your dialog can then cast this input as necessary to initialize its input
- * fields, say. Presumably it knows what to cast it to. Note: code that
- * creates actions does not typically call setValue unless
- * the action is used in a UI that has no concept of ISelection, such as a
- * raw swt widget. ISelection is a JFace viewer concept.
- * <li>calls dlg.open(getShell()) on the dialog to display it.
- * <li>calls setValue(getDialogValue(dlg)) so callers can get the dialog output
- * via a call to getValue() on this action object. Again, this is typically only
- * used when launching actions from non-viewers, such as launching one dialog from
- * another dialog. When launching from popup-menus of viewers, use selectionChanged
- * instead. Either way, the object set or selected is passed on to the dialog,
- * if not null, by way of a call to the dialog's setInputObject method.
- * </ul>
- * If this action is to be enabled when multiple items are selected
- * (the default) then the processing above is repeated once for every object
- * selected. If your dialog actually processes all the selected items, then
- * call setProcessAllSelections(true) to change the behaviour to only do all
- * of this once. In this case setInputObject will be called with the
- * entire IStructuredSelection object, and your dialog code can process each
- * of the objects in it.
- * <p>
- * Please note that if NO ITEMS are selected, we will still call createDialog
- * but not call setInput.
- * <p>
- * To use this default implementation you must implement
- * the createDialog method. Note we will also call
- * dlg.setBlockOnOpen(true) on the returned dialog to
- * force it to be modal.
- */
- public void run()
- {
- Shell shell = getShell();
- if (shell == null)
- SystemBasePlugin.logDebugMessage(this.getClass().getName(),"Warning: shell is null!"); //$NON-NLS-1$
- Object currentSelection = null;
- if (!getProcessAllSelections())
- currentSelection = getFirstSelection();
- else
- currentSelection = getSelection();
- boolean cancelled = false;
-
- do
- {
- Dialog dlg = createDialog(getShell());
- if (dlg == null)
- return;
- dlg.setBlockOnOpen(true);
- Object dialogInputValue = currentSelection;
- if (getValue() != null)
- dialogInputValue = getValue();
- if ((dialogInputValue != null) && (dlg instanceof ISystemPromptDialog))
- {
- ((ISystemPromptDialog)dlg).setInputObject(dialogInputValue);
- }
- if (dlgHelpId!=null)
- {
- if (dlg instanceof SystemPromptDialog)
- ((SystemPromptDialog)dlg).setHelp(dlgHelpId);
- else if (dlg instanceof SystemWizardDialog)
- ((SystemWizardDialog)dlg).setHelp(dlgHelpId);
- }
- if (dlg instanceof SystemPromptDialog)
- {
- if (needsProgressMonitorSet)
- ((SystemPromptDialog)dlg).setNeedsProgressMonitor(needsProgressMonitor);
- }
-
- dlg.open();
-
- // if (rc != 0) NOT RELIABLE!
- if (dlg instanceof SystemWizardDialog)
- {
- if (((SystemWizardDialog)dlg).wasCancelled())
- cancelled = true;
- //System.out.println("Testing cancelled state of SystemWizardDialog: " + cancelled);
- }
- else if (dlg instanceof SystemPromptDialog)
- {
- if (((SystemPromptDialog)dlg).wasCancelled())
- cancelled = true;
- //System.out.println("Testing cancelled state of SystemPromptDialog: " + cancelled);
- }
-
- if (!cancelled)
- {
- setValue(getDialogValue(dlg));
-
- if ((currentSelection != null) && !getProcessAllSelections())
- currentSelection = getNextSelection();
- else if (currentSelection != null)
- currentSelection = null;
- }
- else
- setValue(null);
- } while (!cancelled && (currentSelection != null));
- }
-
- // -----------------------------------------------------------
- // ABSTRACT METHODS...
- // -----------------------------------------------------------
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to create and return
- * the dialog that is displayed by the default run method
- * implementation.
- * <p>
- * If you override actionPerformed with your own, then
- * simply implement this to return null as it won't be used.
- * @see #run()
- */
- protected abstract Dialog createDialog(Shell parent);
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to retrieve the data
- * from the dialog. For SystemPromptDialog dialogs, this is simply
- * a matter of returning dlg.getOutputObject();
- * <p>
- * This is called by the run method after the dialog returns, and
- * wasCancelled() is false. Callers of this object can subsequently
- * retrieve this returned value by calling getValue. If you don't need
- * to pass a value back to the caller of this action, simply return null
- * from this method.
- *
- * @param dlg The dialog object, after it has returned from open.
- */
- protected abstract Object getDialogValue(Dialog dlg);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDummyAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDummyAction.java
deleted file mode 100644
index be36882dd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDummyAction.java
+++ /dev/null
@@ -1,29 +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;
-
-/**
- * A dummy "placeholder" action for submenus that will be dynamically populated
- */
-public class SystemBaseDummyAction extends SystemBaseAction
-{
- public SystemBaseDummyAction()
- {
- super("dummy", null); //$NON-NLS-1$
- setSelectionSensitive(false);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java
deleted file mode 100644
index 662997f00..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java
+++ /dev/null
@@ -1,477 +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 java.util.ResourceBundle;
-import java.util.Vector;
-
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.ui.view.SystemViewMenuListener;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Our framework is designed to allow actions to be added to popup menus.
- * Sometimes, we want an expandable or cascading menu item for an action.
- * That is what this class is designed for. It represents a populated submenu.
- */
-public abstract class SystemBaseSubMenuAction
- extends SystemBaseAction
-
-{
-
- protected SystemSubMenuManager subMenu = null;
- protected String actionLabel;
- protected String menuID;
- protected boolean createMenuEachTime = true;
- protected boolean populateMenuEachTime = true;
- private boolean dontCascade = false;
- private boolean test;
- private static final IAction[] EMPTY_ACTION_ARRAY = new IAction[0];
-
- /**
- * Constructor for SystemBaseSubMenuAction when there is an image
- * @param label
- * @param tooltip
- * @param image The image to display for this action
- * @param shell the parent shell. If you pass <code>null</code> now, be sure to call {@link #setShell(Shell)} later.
- *
- * @deprecated use fields from resource class directly now instead of via ResourceBundle
- */
- protected SystemBaseSubMenuAction(ResourceBundle rb, String label, String tooltip,ImageDescriptor image,Shell shell)
- {
- super(label, tooltip, image, shell);
- actionLabel = label;
- //setTracing(true);
- }
-
-
- /**
- * Constructor for SystemBaseSubMenuAction when there is just a string
- * @param label the label to display.
- * @param shell the parent shell. If you pass <code>null</code> now, be sure to call {@link #setShell(Shell)} later.
- */
- protected SystemBaseSubMenuAction(String label, Shell shell)
- {
- super(label, shell);
- actionLabel = label;
- //setTracing(true);
- }
- /**
- * Constructor for SystemBaseSubMenuAction when there is just a string
- * @param label the label to display.
- * @param tooltip the tooltip to display.
- * @param shell the parent shell. If you pass <code>null</code> now, be sure to call {@link #setShell(Shell)} later.
- */
- protected SystemBaseSubMenuAction(String label, String tooltip, Shell shell)
- {
- super(label, tooltip, shell);
- actionLabel = label;
- //setTracing(true);
- }
- /**
- * Constructor for SystemBaseSubMenuAction when there is just a string and image
- * @param label the label to display.
- * @param image the image descriptor for the action.
- * @param shell the parent shell. If you pass <code>null</code> now, be sure to call {@link #setShell(Shell)} later.
- */
- protected SystemBaseSubMenuAction(String label, ImageDescriptor image, Shell shell)
- {
- super(label, image, shell);
- actionLabel = label;
- //setTracing(true);
- }
-
- /**
- * Constructor for SystemBaseSubMenuAction when there is just a string and image
- * @param label the label to display.
- * @param tooltip the tooltip to display.
- * @param image the image descriptor for the action.
- * @param shell the parent shell. If you pass <code>null</code> now, be sure to call {@link #setShell(Shell)} later.
- */
- protected SystemBaseSubMenuAction(String label, String tooltip, ImageDescriptor image, Shell shell)
- {
- super(label, tooltip, image, shell);
- actionLabel = label;
- //setTracing(true);
- }
-
- /**
- * Set the menu ID. This is important to allow action contributions via the popupMenus extension point.
- */
- public void setMenuID(String Id)
- {
- this.menuID = Id;
- }
-
- /**
- * Call this if the submenu should be created on-the-fly every time, versus creating and populating it
- * only on the first usage.
- */
- public void setCreateMenuEachTime(boolean eachTime)
- {
- this.createMenuEachTime = eachTime;
- }
- /**
- * Call this if the submenu should be populated on-the-fly every time, versus populating it
- * only on the first usage. This only makes sense to be true if setCreateMenuEachTime is false.
- */
- public void setPopulateMenuEachTime(boolean eachTime)
- {
- this.populateMenuEachTime = eachTime;
- }
-
- /**
- * Set test mode on
- */
- public void setTest(boolean testMode)
- {
- this.test = testMode;
- }
-
-
- /**
- * <i>Must be overridden</i>
- * <p>Example of this:<p>
- * <pre><code>
- * menu.add(new MyAction1());
- * </code></pre>
- * @param menu The cascading menu, which is created for you. Add your actions to it.
- * @return The given menu if you just populated it, or a new menu if you want to create the menu yourself.
- */
- public abstract IMenuManager populateSubMenu(IMenuManager menu);
-
- /**
- * Return the MenuManager object. It is this that is added to the primary popup menu.
- */
- public IMenuManager getSubMenu()
- {
- if ((subMenu == null) || createMenuEachTime)
- {
- if (menuID == null)
- {
- if (test)
- subMenu = new SystemSubMenuManagerForTesting(this,actionLabel);
- else
- subMenu = new SystemSubMenuManager(this,actionLabel);
- }
- else
- {
- if (test)
- subMenu = new SystemSubMenuManagerForTesting(this, actionLabel, menuID);
- else
- subMenu = new SystemSubMenuManager(this,actionLabel, menuID);
- }
- createStandardGroups(subMenu);
- subMenu.setTracing(traceSelections, traceTarget);
- populateSubMenu(subMenu);
- if (traceSelections)
- {
- issueTraceMessage("*** INSIDE GETSUBMENU for "+actionLabel+". createMenuEachTime = " + createMenuEachTime); //$NON-NLS-1$ //$NON-NLS-2$
- }
- subMenu.setToolTipText(getToolTipText());
- //cascadeAllInputs(); no point in doing in now, setInputs will be called later by SV
- subMenu.addMenuListener(createMnemonicsListener(!populateMenuEachTime));
- }
- else if (populateMenuEachTime)
- {
- subMenu.removeAll();
- createStandardGroups(subMenu);
- populateSubMenu(subMenu);
- if (traceSelections)
- {
- issueTraceMessage("*** INSIDE GETSUBMENU for "+actionLabel+". populateMenuEachTime = " + populateMenuEachTime); //$NON-NLS-1$ //$NON-NLS-2$
- }
- //cascadeAllInputs(); no point in doing in now, setInputs will be called later by SV
- //Menu m = subMenu.getMenu();
- //System.out.println("SubMenu's menu null? " + (m==null));
- //if (m != null)
- //m.addMenuListener(new SystemViewMenuListener());
- }
- else if (traceSelections)
- {
- issueTraceMessage("*** INSIDE GETSUBMENU for "+actionLabel+". SUBMENU ALREADY CREATED. "); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return subMenu;
- }
- /**
- * Creates the standard groups for the context sub-menu.
- */
- protected void createStandardGroups(IMenuManager menu)
- {
- if (!menu.isEmpty())
- return;
- // simply sets partitions in the menu, into which actions can be directed.
- // Each partition can be delimited by a separator (new Separator) or not (new GroupMarker).
- // Deleted groups are not used yet.
- //... decided it is better to let this get created when needed, else will be at the top of the menu.
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
-
- }
-
- /**
- * Return the actions currently in the menu.
- * Never returns null, but may return an empty array.
- */
- public IAction[] getActions()
- {
- //System.out.println("in getActions. subMenu null? "+(subMenu==null));
- if (subMenu==null)
- return EMPTY_ACTION_ARRAY;
- else
- {
- IContributionItem[] items = subMenu.getItems();
- //System.out.println("in getActions. #items "+items.length);
- Vector v = new Vector();
- for (int idx=0; idx<items.length; idx++)
- if (items[idx] instanceof ActionContributionItem)
- v.add( ((ActionContributionItem)items[idx]).getAction() );
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager menu = (SystemSubMenuManager)items[idx];
- v.add(menu.getParentCascadingAction());
- }
- //else
- //System.out.println("...item: "+items[idx].getClass().getName());
- IAction[] actions = new IAction[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- actions[idx] = (IAction)v.elementAt(idx);
- return actions;
- }
- }
-
-
-
- /**
- * Overridable method that instantiates the menu listener who job is to add mnemonics.
- * @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics need only be set once. False if it is dynamic
- */
- protected SystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
- {
- return new SystemViewMenuListener(setMnemonicsOnlyOnce);
- }
-
- /**
- * Sets the parent shell for this action. This is an override of our parent's method so we can
- * cascade it to each sub-action.
- */
- public void setShell(Shell shell)
- {
- super.setShell(shell);
- if (!dontCascade)
- cascadeShell();
- }
-
- /**
- * This is called by the framework to set the selection input, just prior to showing the popup menu.
- * We cascade this down to all of the actions added to this submenu.
- */
- public void setSelection(ISelection selection)
- {
- super.setSelection(selection);
- if (!dontCascade)
- cascadeSelection(selection);
- }
-
- /**
- * This is called by the framework to set the selection input, just prior to showing the popup menu.
- * We cascade this down to all of the actions added to this submenu.
- */
- public void setViewer(Viewer v)
- {
- super.setViewer(v);
- if (!dontCascade)
- cascadeViewer();
- }
-
- /**
- * Return the shell. If not set locally, queries it from the submenu, which is where it is set by the RSE framework
- */
- public Shell getShell()
- {
- if (super.getShell(false) != null)
- return super.getShell(false);
- else if (subMenu != null)
- return subMenu.getShell();
- else
- return null;
- }
- /**
- * Return the selection. If not set locally, queries it from the submenu, which is where it is set by the RSE framework
- */
- public IStructuredSelection getSelection()
- {
- if (super.getSelection() != null)
- return super.getSelection();
- else if (subMenu != null)
- return subMenu.getSelection();
- else
- return null;
- }
- /**
- * Return the viewer. If not set locally, queries it from the submenu, which is where it is set by the RSE framework
- */
- public Viewer getViewer()
- {
- if (super.getViewer() != null)
- return super.getViewer();
- else if (subMenu != null)
- return subMenu.getViewer();
- else
- return null;
- }
-
- /**
- * Special method called by our submenu manager when from its setInputs method. No need to
- * cascade as the menu manager will do it for us.
- */
- public void setInputsFromSubMenuManager(Shell shell, Viewer v, ISelection selection)
- {
- dontCascade = true; // so we don't redundantly do cascading. Phil
- super.setInputs(shell, v, selection); // calls setSelection+Shell+Viewer
- dontCascade = false;
- }
-
- /**
- * An optimization for performance reasons that allows all inputs to be set in one call.
- * Intercept of parent so we can cascade to sub-actions. Note however this won't really ever
- * get called. This is because for cascading menu actions we don't put this action object into
- * the menumanager ... we put the SystemSubMenu object so that is what the SystemView will call.
- */
- public void setInputs(Shell shell, Viewer v, ISelection selection)
- {
- dontCascade = true; // so we don't redundantly do cascading. Phil
- super.setInputs(shell, v, selection); // calls setSelection+Shell+Viewer
- dontCascade = false;
- if (traceSelections)
- issueTraceMessage(" INSIDE SETINPUTS IN BASE ACTION CLASS"); //$NON-NLS-1$
- cascadeAllInputs();
- }
-
- /**
- * Cascade the current selection to all actions
- */
- private void cascadeSelection(ISelection selection)
- {
- if (traceSelections)
- {
- issueTraceMessage("*** INSIDE CASCADESELECTION ***"); //$NON-NLS-1$
- issueTraceMessage(" subMenu = " + subMenu); //$NON-NLS-1$
- issueTraceMessage(" selection = " + selection); //$NON-NLS-1$
- }
- if (subMenu == null)
- return;
- subMenu.setSelection(selection);
- /*
- IAction[] actions = subMenu.getActions();
- for (int idx=0; idx<actions.length; idx++)
- {
- if (actions[idx] instanceof ISystemAction)
- {
- ((ISystemAction)actions[idx]).setSelection(selection);
- }
- }
- */
- }
-
- /**
- * Cascade the current shell to all actions
- */
- private void cascadeShell()
- {
- if (subMenu == null)
- return;
- Shell shell = super.getShell(false);
- if (shell != null)
- {
- subMenu.setShell(shell);
- /*
- IAction[] items = subMenu.getActions();
- for (int idx=0; idx<items.length; idx++)
- if (items[idx] instanceof ISystemAction)
- ((ISystemAction)items[idx]).setShell(shell);
- */
- }
- }
-
- /**
- * Cascade the current viewer to all actions
- */
- private void cascadeViewer()
- {
- if (subMenu == null)
- return;
- if (viewer != null)
- {
- subMenu.setViewer(viewer);
- /*
- IAction[] items = subMenu.getActions();
- for (int idx=0; idx<items.length; idx++)
- if (items[idx] instanceof ISystemAction)
- ((ISystemAction)items[idx]).setViewer(viewer);
- */
- }
- }
-
- /**
- * Called when actions added dynamically
- */
- protected void cascadeAllInputs()
- {
- if (subMenu == null)
- return;
- Shell shell = super.getShell(false);
- Viewer viewer = super.getViewer();
- ISelection selection = super.getSelection();
- subMenu.setInputs(shell, viewer, selection);
- /*
- IAction[] actions = subMenu.getActions();
- if (traceSelections)
- {
- issueTraceMessage("INSIDE CASCADEALLINPUTS FOR "+actionLabel+". NBR ACTIONS = "+actions.length);
- }
-
- for (int idx=0; idx<actions.length; idx++)
- {
- if (actions[idx] instanceof ISystemAction)
- {
- ISystemAction action = (ISystemAction)actions[idx];
- action.setInputs(shell, viewer, selection);
- }
- }
- */
- }
-
- /**
- * Enable/disable this menu action. This amounts to enabling/disabling the associated sub menu.
- * Unfortunately, there is no way to do this!
- */
- public void setEnabled(boolean enable)
- {
- super.setEnabled(enable);
- if (subMenu!=null)
- {
- //subMenu.setEnabled(enable);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseWizardAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseWizardAction.java
deleted file mode 100644
index 4ca9186f2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseWizardAction.java
+++ /dev/null
@@ -1,280 +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.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.rse.ui.dialogs.SystemWizardDialog;
-import org.eclipse.rse.ui.wizards.ISystemWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * A specialization for the eclipse Action method, for actions that put up wizards.
- * <p> This class is most effective when used with actions that extend {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard},
- * or implement {@link org.eclipse.rse.ui.wizards.ISystemWizard}. It supports
- * settings that are propogated to the wizard, and wizard pages if they extend {@link org.eclipse.rse.ui.wizards.AbstractSystemWizardPage},
- * or implement {@link org.eclipse.rse.ui.wizards.ISystemWizardPage}.
- * </p>
- * The advantages to using this class over the base action class are:
- * <ul>
- * <li>Supports setting the label, description, image and tooltip text for this action, via constructors.
- * <li>Sets {@link org.eclipse.rse.ui.SystemBaseAction#allowOnMultipleSelection(boolean)} to false, since most wizard actions are not permitted on multiple selection.
- * <li>Supports setting whether the wizard requires a {@link org.eclipse.rse.ui.actions.SystemBaseDialogAction#setNeedsProgressMonitor() progress-monitor} or not, which is propogated to the wizard.
- * <li>Supports setting the overall wizard {@link #setWizardTitle(String) title}, which is propogated to the wizard.
- * <li>Supports setting the overall wizard {@link #setWizardImage(ImageDescriptor) image}, which is propogated to the wizard.
- * <li>Supports setting the default wizard {@link #setWizardPageTitle(String) page-title}, which is propogated to the wizard and the wizard pages.
- * <li>Supports setting the wizard;s default {@link #setHelp(String) contextual-help}, which is propogated to the wizard and the wizard pages.
- * <li>Supports setting the wizard's {@link #setMinimumPageSize(int,int) minimum-size}, which is propogated and applied to the wizard.
- * <li>Supports setting an {@link org.eclipse.rse.ui.SystemBaseAction#setInputObject(Object) input-object}, which is propogated to the wizard and wizard pages. By default, this
- * is set the current StructuredSelection.
- * <li>Supports querying a {@link org.eclipse.rse.ui.SystemBaseAction#getOutputObject() output-object} which is set by the wizard class.
- * <li>Supports a {@link #wasCancelled()} method so the caller can easily determine if the wizard was dismissed or cancelled by the user.
- * <li>Supports propogation of the {@link org.eclipse.rse.ui.SystemBaseAction#getViewer() current-viewer}.
- * </ul>
- *
- * <p>To use this class:</p>
- * <ol>
- * <li>Create your wizard class that extends {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard}, and is populated with
- * pages that extend {@link org.eclipse.rse.ui.wizards.AbstractSystemWizardPage}.
- * <li>Define your action's label and tooltip translatable strings in a resource bundle, where the former's key ends with "label" and the latter's
- * key ends with "tooltip".
- * <li>Define your subclass of this wizard. Decide if you want to set the wizard's title, page-title, image, help and optionally minimum size
- * in your wizard subclass, or here in your action subclass. For re-use it is best to set it in the wizard, if possible.
- * <li>Override {@link #createWizard()} to instantiate, configure and return your wizard.
- * <li>Decide if you will do the work of the wizard in the wizard's performFinish method, or here in this action subclass. If here,
- * override {@link #postProcessWizard(IWizard)}. You might also override this if you need to set output variables in the action,
- * after the sucessful completion of the wizard.
- * </ol>
- */
-public abstract class SystemBaseWizardAction extends SystemBaseDialogAction
- implements ISystemWizardAction
-{
-
- private IWizard newWizard;
- private String wizardTitle, pageTitle;
- private ImageDescriptor wizardImage;
- private int minPageWidth=-1, minPageHeight=-1;
-
- /**
- * Constructor for SystemBaseWizardAction when translated label is known. You must separately
- * call setToolTipText and setDescription to enable these if desired.
- * @param text string to display in menu or toolbar
- * @param image icon to display in menu or toolbar. Can be null.
- * @param parent Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- protected SystemBaseWizardAction(String text, ImageDescriptor image, Shell parent)
- {
- super(text, image, parent);
- allowOnMultipleSelection(false);
- }
- /**
- * Constructor for SystemBaseWizardAction when translated label and tooltip are known. You must
- * separately call setDescription to enable this if desired.
- * @param text string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- * @param image icon to display in menu or toolbar. Can be null.
- * @param parent Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- protected SystemBaseWizardAction(String text, String tooltip, ImageDescriptor image, Shell parent)
- {
- super(text, tooltip, image, parent);
- allowOnMultipleSelection(false);
- }
- /**
- * Constructor for SystemBaseWizardAction when translated label and tooltip and description are
- * all known.
- * @param text string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- * @param description string displayed in status bar of some displays. Longer than tooltip.
- * @param image icon to display in menu or toolbar. Can be null.
- * @param parent Shell of parent window. Can be null if you don't know it, but call setShell when you do.
- */
- protected SystemBaseWizardAction(String text, String tooltip, String description, ImageDescriptor image, Shell parent)
- {
- super(text, tooltip, description, image, parent);
- allowOnMultipleSelection(false);
- }
-
-
-
- /**
- * Set the wizard title. Using this makes it possible to avoid subclassing a wizard
- */
- public void setWizardTitle(String title)
- {
- this.wizardTitle = title;
- }
- /**
- * Set the wizard image. Using this makes it possible to avoid subclassing a wizard
- */
- public void setWizardImage(ImageDescriptor wizardImage)
- {
- this.wizardImage = wizardImage;
- }
- /**
- * Set the wizard page title. Using this makes it possible to avoid subclassing.
- * The page title goes below the wizard title, and can be unique per page. However,
- * typically the wizard page title is the same for all pages... eg "Filter".
- * <p>
- * This is not used by default, but can be queried via getPageTitle() when constructing
- * pages.
- */
- public void setWizardPageTitle(String pageTitle)
- {
- this.pageTitle = pageTitle;
- }
- /**
- * Return the page title as set via setWizardPageTitle
- */
- public String getWizardPageTitle()
- {
- return pageTitle;
- }
- /**
- * Call this method to set the wizard's dimensions without having to subclass the wizard.
- * If you pass zero for either value, then the default will be used for that.
- */
- public void setMinimumPageSize(int width, int height)
- {
- //if (width <= 0)
- // width = 300; // found this number in WizardDialog code
- //if (height<= 0)
- // height = 225; // found this number in WizardDialog code
- this.minPageWidth = width;
- this.minPageHeight = height;
- }
- /**
- * Override of parent's method. Does the following:
- * <ul>
- * <li>Calls abstract createWizard() method to get wizard instance
- * <li>If wizard implements ISystemWizard, calls setInputValue(...), passing in
- * getValue() if not null, else passing in getFirstSelection() if not null.
- * <li>Instantiates a WizardDialog object with the wizard object from createWizard().
- * Returns this to run() in our parent class which then opens this dialog.
- * </ul>
- *
- */
- protected Dialog createDialog(Shell shell)
- {
- newWizard = createWizard();
-
- if ((newWizard instanceof Wizard) && wasNeedsProgressMonitorSet())
- ((Wizard)newWizard).setNeedsProgressMonitor(getNeedsProgressMonitor());
-
- if (newWizard instanceof Wizard)
- {
- if (wizardTitle != null)
- ((Wizard)newWizard).setWindowTitle(wizardTitle);
- if (wizardImage != null)
- ((Wizard)newWizard).setDefaultPageImageDescriptor(wizardImage);
- }
-
-
- WizardDialog dialog = null;
-
- if (newWizard instanceof ISystemWizard)
- {
- ISystemWizard swizard = (ISystemWizard)newWizard;
- if (pageTitle != null)
- swizard.setWizardPageTitle(pageTitle);
- swizard.setViewer(getViewer());
- dialog = new SystemWizardDialog(shell,swizard);
- int w = swizard.getMinimumPageWidth();
- int h = swizard.getMinimumPageHeight();
- if (minPageWidth > 0)
- w = minPageWidth;
- if (minPageHeight > 0)
- h = minPageHeight;
- //System.out.println("In SystemBaseWizardAction. minPageWidth = " + w + ", minPageHeight = " + h);
- if ((w>0) && (h>0))
- dialog.setMinimumPageSize(w,h);
-
- /*
- * Don't do the following here as it is redundant! The run method in the parent SystemBaseDialogAction
- * does this already
- Object wizardInputValue = null;
- if (getValue() != null)
- wizardInputValue = getValue();
- else
- wizardInputValue = getFirstSelection();
- if (wizardInputValue != null)
- ((SystemWizardDialog)dialog).setInputObject(wizardInputValue);
- */
- }
- else
- dialog = new WizardDialog(shell,newWizard);
-
- return dialog;
- }
-
- /**
- * The default processing for the run method calls createDialog, which
- * we override in this class. The implementation of createDialog calls
- * this method that you must override, to create the wizard. The result
- * goes into a WizardDialog which is opened and hence displayed to the
- * user.
- */
- protected abstract IWizard createWizard();
-
- /**
- * By default, we try to get the wizard's value by calling getOutputObject()
- */
- protected Object getDialogValue(Dialog dlg)
- {
- postProcessWizard(newWizard);
- if (newWizard instanceof ISystemWizard)
- {
- ISystemWizard ourWizard = (ISystemWizard)newWizard;
- return ourWizard.getOutputObject();
- }
- else
- return null;
- }
-
- /**
- * Typically, the wizard's performFinish method does the work required by
- * a successful finish of the wizard. However, often we also want to be
- * able to extract user-entered data from the wizard, by calling getters
- * in this action. To enable this, override this method to populate your
- * output instance variables from the completed wizard, which is passed
- * as a parameter. This is only called after successful completion of the
- * wizard.
- */
- protected void postProcessWizard(IWizard wizard)
- {
- }
-
- /**
- * Returns true if the user cancelled the wizard.
- * This is an override of the parent method, since we can be more
- * accurate with wizards than we can with dialogs.
- */
- public boolean wasCancelled()
- {
- if (newWizard instanceof ISystemWizard)
- {
- ISystemWizard ourWizard = (ISystemWizard)newWizard;
- return ourWizard.wasCancelled();
- }
- else
- return super.wasCancelled();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingBrowseWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingBrowseWithAction.java
deleted file mode 100644
index 6e2b73e3b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingBrowseWithAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A cascading menu action for "Browse With->"
- */
-public class SystemCascadingBrowseWithAction extends SystemBaseSubMenuAction
-{
-
- /**
- * Constructor
- */
- public SystemCascadingBrowseWithAction()
- {
- super(SystemResources.ACTION_CASCADING_BROWSEWITH_LABEL,SystemResources.ACTION_CASCADING_BROWSEWITH_TOOLTIP, null);
- setMenuID(ISystemContextMenuConstants.MENU_BROWSEWITH);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- return menu;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingCompareWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingCompareWithAction.java
deleted file mode 100644
index ebf10a73d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingCompareWithAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A cascading menu action for "Compare With->"
- */
-public class SystemCascadingCompareWithAction extends SystemBaseSubMenuAction
-{
-
- /**
- * Constructor
- */
- public SystemCascadingCompareWithAction()
- {
- super(SystemResources.ACTION_CASCADING_COMPAREWITH_LABEL, SystemResources.ACTION_CASCADING_COMPAREWITH_TOOLTIP, null);
- setMenuID(ISystemContextMenuConstants.MENU_COMPAREWITH);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- return menu;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingExpandToAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingExpandToAction.java
deleted file mode 100644
index 2bdbba0d4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingExpandToAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A cascading menu action for "Expand To->"
- */
-public class SystemCascadingExpandToAction extends SystemBaseSubMenuAction
-{
-
- /**
- * Constructor
- */
- public SystemCascadingExpandToAction()
- {
- super(SystemResources.ACTION_CASCADING_EXPAND_TO_LABEL, SystemResources.ACTION_CASCADING_EXPAND_TO_TOOLTIP, null);
- setMenuID(ISystemContextMenuConstants.MENU_EXPANDTO);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- return menu;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingGoToAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingGoToAction.java
deleted file mode 100644
index 4e9389ed7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingGoToAction.java
+++ /dev/null
@@ -1,81 +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.action.IMenuManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.view.SystemViewPart;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.framelist.BackAction;
-import org.eclipse.ui.views.framelist.ForwardAction;
-import org.eclipse.ui.views.framelist.FrameList;
-import org.eclipse.ui.views.framelist.UpAction;
-
-
-/**
- * A cascading menu action for "Go To->"
- */
-public class SystemCascadingGoToAction extends SystemBaseSubMenuAction
-{
- //private IAdaptable pageInput;
- //private IMenuManager parentMenuManager;
- private boolean actionsMade = false;
-
- private SystemViewPart fSystemViewPart;
- private BackAction backAction;
- private ForwardAction forwardAction;
- private UpAction upAction;
-
-
- /**
- * Constructor
- */
- public SystemCascadingGoToAction(Shell shell, SystemViewPart systemViewPart)
- {
- super(SystemResources.ACTION_CASCADING_GOTO_LABEL, SystemResources.ACTION_CASCADING_GOTO_TOOLTIP, shell);
- setMenuID(ISystemContextMenuConstants.MENU_GOTO);
- this.fSystemViewPart = systemViewPart;
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(false);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_GOTO);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager gotoMenu)
- {
- if (!actionsMade)
- makeActions();
- gotoMenu.add(backAction);
- gotoMenu.add(forwardAction);
- gotoMenu.add(upAction);
- return gotoMenu;
- }
-
- protected void makeActions()
- {
- FrameList frameList = fSystemViewPart.getFrameList();
- backAction = new BackAction(frameList);
- forwardAction = new ForwardAction(frameList);
- upAction = new UpAction(frameList);
-
- actionsMade = true;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingGotoActionOLD.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingGotoActionOLD.java
deleted file mode 100644
index b33b91434..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingGotoActionOLD.java
+++ /dev/null
@@ -1,48 +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.action.IMenuManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A cascading menu action for "View->"
- */
-public class SystemCascadingGotoActionOLD extends SystemBaseSubMenuAction
-{
-
- /**
- * Constructor
- */
- public SystemCascadingGotoActionOLD()
- {
- super(SystemResources.ACTION_CASCADING_GOTO_LABEL, SystemResources.ACTION_CASCADING_GOTO_TOOLTIP, null);
- setMenuID(ISystemContextMenuConstants.MENU_GOTO);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- return menu;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingNewAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingNewAction.java
deleted file mode 100644
index c11482cb1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingNewAction.java
+++ /dev/null
@@ -1,48 +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.action.IMenuManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A cascading menu action for "New->"
- */
-public class SystemCascadingNewAction extends SystemBaseSubMenuAction
-{
-
- /**
- * Constructor for SystemCascadingNewAction
- */
- public SystemCascadingNewAction()
- {
- super(SystemResources.ACTION_CASCADING_NEW_LABEL, SystemResources.ACTION_CASCADING_NEW_TOOLTIP, null);
- setMenuID(ISystemContextMenuConstants.MENU_NEW);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- return menu;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingOpenWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingOpenWithAction.java
deleted file mode 100644
index 925c13ea7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingOpenWithAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A cascading menu action for "Open With->"
- */
-public class SystemCascadingOpenWithAction extends SystemBaseSubMenuAction
-{
-
- /**
- * Constructor
- */
- public SystemCascadingOpenWithAction()
- {
- super(SystemResources.ACTION_CASCADING_OPENWITH_LABEL, SystemResources.ACTION_CASCADING_OPENWITH_TOOLTIP, null);
- setMenuID(ISystemContextMenuConstants.MENU_OPENWITH);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- return menu;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index e9a425bf8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPreferencesAction.java
+++ /dev/null
@@ -1,85 +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.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * A cascading menu action for "Preferences->".
- * @see org.eclipse.rse.ui.actions.SystemShowPreferencesPageAction
- */
-public class SystemCascadingPreferencesAction
- extends SystemBaseSubMenuAction implements IMenuListener
-{
-
- /**
- * Constructor
- */
- public SystemCascadingPreferencesAction(Shell shell)
- {
- super(SystemResources.ACTION_CASCADING_PREFERENCES_LABEL, SystemResources.ACTION_CASCADING_PREFERENCES_TOOLTIP, shell);
- setMenuID(ISystemContextMenuConstants.MENU_PREFERENCES);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(false);
- setSelectionSensitive(false);
-
- setHelp(RSEUIPlugin.HELPPREFIX+"actnpref"); //$NON-NLS-1$
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager ourSubMenu)
- {
- // WE DON'T WANT TO FIRE UP ALL PLUGINS THAT USE OUR EXTENSION POINT,
- // AT THE TIEM WE ARE CREATING OUR VIEW! SO WE DEFER IT UNTIL THIS CASCADING
- // MENU IS FIRST EXPANDED...
- ourSubMenu.addMenuListener(this);
- ourSubMenu.setRemoveAllWhenShown(true);
- //menu.setEnabled(true);
- ourSubMenu.add(new SystemBaseAction("dummy",null)); //$NON-NLS-1$
-
- return ourSubMenu;
- }
-
- /**
- * Called when submenu is about to show
- */
- public void menuAboutToShow(IMenuManager ourSubMenu)
- {
- //System.out.println("In menuAboutToShow!");
- setBusyCursor(true);
- ourSubMenu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- SystemShowPreferencesPageAction[] prefPageActions = RSEUIPlugin.getDefault().getShowPreferencePageActions();
- if (prefPageActions!=null)
- {
- for (int idx=0; idx<prefPageActions.length; idx++)
- {
- prefPageActions[idx].setShell(getShell());
- ourSubMenu.appendToGroup(ISystemContextMenuConstants.GROUP_ADDITIONS, prefPageActions[idx]);
- }
- }
- setBusyCursor(false);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPulldownMenuAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPulldownMenuAction.java
deleted file mode 100644
index 5a0a6f6f9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPulldownMenuAction.java
+++ /dev/null
@@ -1,105 +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.action.IMenuCreator;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.view.SystemViewPart;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * A cascading menu action for a toolbar, emulating the pulldown menu view parts have.
- */
-public class SystemCascadingPulldownMenuAction
- extends SystemBaseSubMenuAction
- implements IMenuListener, IMenuCreator
-{
-
- private SystemSubMenuManager dropDownMenuMgr;
- private ISelectionProvider sp = null;
-
- /**
- * Constructor
- */
- public SystemCascadingPulldownMenuAction(Shell shell, ISelectionProvider selectionProviderForToolbarActions)
- {
- super(SystemResources.ACTION_CASCADING_PULLDOWN_LABEL, SystemResources.ACTION_CASCADING_PULLDOWN_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID),shell);
- sp = selectionProviderForToolbarActions;
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(false);
- setMenuCreator(this); // this IAction method tells JFace this is a dropdown menu
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- menu.addMenuListener(this);
- menu.setRemoveAllWhenShown(false);
- boolean showConnectionActions = true;
- SystemViewPart.populateSystemViewPulldownMenu(menu, getShell(), showConnectionActions, null, sp);
- return menu;
- }
-
- /**
- * Called when submenu is about to show
- */
- public void menuAboutToShow(IMenuManager ourSubMenu)
- {
- }
-
- //------------------------
- // IMenuCreator methods...
- //------------------------
- /**
- * dispose method comment.
- */
- public void dispose()
- {
- if (dropDownMenuMgr != null)
- {
- dropDownMenuMgr.dispose();
- dropDownMenuMgr = null;
- }
- }
- /**
- * getMenu method comment.
- */
- public Menu getMenu(Control parent)
- {
- if (dropDownMenuMgr == null)
- {
- //dropDownMenuMgr = new MenuManager();
- dropDownMenuMgr = (SystemSubMenuManager)getSubMenu();
- }
- return dropDownMenuMgr.createContextMenu(parent);
- }
- public Menu getMenu(Menu parent)
- {
- //System.out.println("In SystemCascadingPulldownMenuAction#getMenu(Menu)");
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingRemoteServerBaseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingRemoteServerBaseAction.java
deleted file mode 100644
index cfd68fa6f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingRemoteServerBaseAction.java
+++ /dev/null
@@ -1,138 +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.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This is the base class for actions that populate the "Remote Servers" cascading
- * menu. The actions in this menu cascade again, into Start and Stop actions.
- * These cascading actions are handling automatically by this base class, but when
- * they are run, they call back into abstract methods in this base class, to
- * actually start and stop the remote server/daemon.
- *
- */
-public abstract class SystemCascadingRemoteServerBaseAction extends SystemBaseSubMenuAction implements IMenuListener
-{
- private SystemRemoteServerStartAction startAction;
- private SystemRemoteServerStopAction stopAction;
-
- /**
- * Constructor
- * @deprecated
- */
- public SystemCascadingRemoteServerBaseAction(String label, String tooltip, Shell shell)
- {
- super(label, tooltip, shell);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(false);
- }
-
- /**
- * Populate the submenu for this action. Here is where we add the start and stop actions.
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- startAction = new SystemRemoteServerStartAction(getShell(), this);
- stopAction = new SystemRemoteServerStopAction(getShell(), this);
- startAction.setHelp(getHelpContextId());
- stopAction.setHelp(getHelpContextId());
- menu.add(startAction);
- menu.add(stopAction);
- menu.addMenuListener(this); // we want to know when menu is about to be shown.
- //System.out.println("in populateSubMenu in "+getClass().getName());
- return menu;
- }
-
- /**
- * Called when submenu is about to show.
- * We use this to decide whether to enable/disable the start and stop actions underneath.
- */
- public void menuAboutToShow(IMenuManager subMenu)
- {
- //System.out.println("menuAboutToShow");
- /*
- IStructuredSelection selection = getSelection();
- if( selection == null )
- {
- subMenu.add(new SystemBaseAction("Programming error. Selection is null! ", null));
- return;
- } // end if(nothing is selected)
- */
- if (!isEnabled())
- {
- startAction.setEnabled(false);
- stopAction.setEnabled(false);
- }
- else if (canDetectServerState())
- {
- //System.out.println("in action itself. getSystemConnection() = "+getSystemConnection());
- boolean started = isServerStarted(getSystemConnection());
- //System.out.println("... started? "+started);
- startAction.setEnabled(started);
- stopAction.setEnabled(!started);
- }
- }
- /**
- * This method is an opportunity to decide whether to enable this action or not.
- * Sometimes we can determine if the connection is connected or not, in which case
- * we want to disable this action if the connection is not connected.
- */
- protected boolean shouldEnable(IHost connection)
- {
- return true;
- }
-
- /**
- * Overridable method to tell the base code if you are able to determine dynamically if
- * the server is currently running or not. The default is true, and so {@link #isStarted(IHost)} is
- * called to determine enablement state of the cascading start and stop actions. If you
- * cannot determine this, override this method and return false, and both start and stop
- * will be enabled always.
- * @return true if you have the capability of dynamically determining if this server is running.
- */
- protected boolean canDetectServerState()
- {
- return true;
- }
-
- /**
- * Overridable method to compute if this remote server/daemon is currently running or not.
- * This decides the enablement of the start and stop actions underneath. If there is no way
- * to determine this, return false from {@link #canDetectServerState()}, and ignore this method.
- * @return true if the server is currently running or not.
- */
- protected abstract boolean isServerStarted(IHost connection);
-
- /**
- * Callback from the {@link org.eclipse.rse.ui.actions.SystemRemoteServerStartAction} class
- * that is called when the user selects to start this remote server/daemon.
- * @return true if the remote server was successfully started, false if not.
- */
- public abstract boolean startServer();
-
- /**
- * Callback from the {@link org.eclipse.rse.ui.actions.SystemRemoteServerStartAction} class
- * that is called when the user selects to stop this remote server/daemon.
- * @return true if the remote server was successfully stopped, false if not.
- */
- public abstract boolean stopServer();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingRemoteServersAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingRemoteServersAction.java
deleted file mode 100644
index 911fea658..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingRemoteServersAction.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A cascading menu action for "Remote Servers->". The actions contributed to the
- * menu must implement the ISystemRemoteServerAction interface.
- * @see org.eclipse.rse.ui.actions.ISystemRemoteServerAction
- */
-public class SystemCascadingRemoteServersAction extends SystemBaseSubMenuAction implements IMenuListener
-{
-
- /**
- * Constructor
- */
- public SystemCascadingRemoteServersAction()
- {
- super(SystemResources.ACTION_CASCADING_REMOTESERVERS_LABEL, SystemResources.ACTION_CASCADING_REMOTESERVERS_TOOLTIP, null);
- setMenuID(ISystemContextMenuConstants.MENU_STARTSERVER);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(false);
- setHelp(RSEUIPlugin.HELPPREFIX+"actnsrsv"); //$NON-NLS-1$
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- menu.addMenuListener(this);
- //System.out.println("in populateSubMenu");
- return menu;
- }
-
- /**
- * Called when submenu is about to show
- */
- public void menuAboutToShow(IMenuManager subMenu)
- {
- //System.out.println("menuAboutToShow");
- IStructuredSelection selection = getSelection();
- if( selection == null )
- {
- subMenu.add(new SystemBaseAction("Programming error. Selection is null! ", null)); //$NON-NLS-1$
- return;
- } // end if(nothing is selected)
- Object firstSelection = selection.getFirstElement();
- IHost conn = null;
- if (firstSelection instanceof IHost)
- conn = (IHost)firstSelection;
- else if (firstSelection instanceof ISubSystem)
- conn = ((ISubSystem)firstSelection).getHost();
-
- // decide whether or not to enable/disable each entry, by letting it decide...
- IAction[] actions = getActions();
- //System.out.println("...how many actions? "+actions.length);
- //System.out.println("...connection null ? "+(conn==null));
- for (int idx=0; idx<actions.length; idx++)
- {
- if (actions[idx] instanceof SystemCascadingRemoteServerBaseAction)
- {
- SystemCascadingRemoteServerBaseAction action = (SystemCascadingRemoteServerBaseAction)actions[idx];
- action.setHost(conn);
- if (conn.isOffline())
- action.setEnabled(false);
- else
- action.setEnabled(action.shouldEnable(conn));
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingReplaceWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingReplaceWithAction.java
deleted file mode 100644
index 445938ca8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingReplaceWithAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A cascading menu action for "Replace With->"
- */
-public class SystemCascadingReplaceWithAction extends SystemBaseSubMenuAction
-{
-
- /**
- * Constructor
- */
- public SystemCascadingReplaceWithAction()
- {
- super(SystemResources.ACTION_CASCADING_REPLACEWITH_LABEL, SystemResources.ACTION_CASCADING_REPLACEWITH_TOOLTIP, null);
- setMenuID(ISystemContextMenuConstants.MENU_REPLACEWITH);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- return menu;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingViewAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingViewAction.java
deleted file mode 100644
index 1690dba88..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingViewAction.java
+++ /dev/null
@@ -1,47 +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.action.IMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-
-
-
-/**
- * A cascading menu action for "View->"
- */
-public class SystemCascadingViewAction extends SystemBaseSubMenuAction
-{
-
- /**
- * Constructor
- */
- public SystemCascadingViewAction()
- {
- super(SystemResources.ACTION_CASCADING_VIEW_LABEL, SystemResources.ACTION_CASCADING_VIEW_TOOLTIP, null);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- return menu;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingWorkWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingWorkWithAction.java
deleted file mode 100644
index addbdc66d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingWorkWithAction.java
+++ /dev/null
@@ -1,48 +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.action.IMenuManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A cascading menu action for "Work With->"
- */
-public class SystemCascadingWorkWithAction extends SystemBaseSubMenuAction
-{
-
- /**
- * Constructor
- */
- public SystemCascadingWorkWithAction()
- {
- super(SystemResources.ACTION_CASCADING_WORKWITH_LABEL, SystemResources.ACTION_CASCADING_WORKWITH_TOOLTIP, null);
- setMenuID(ISystemContextMenuConstants.MENU_WORKWITH);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- // we don't populate it. SystemView populates it by calling each adapter and letting them populate it.
- return menu;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemClearAllPasswordsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemClearAllPasswordsAction.java
deleted file mode 100644
index 00aa52d3b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemClearAllPasswordsAction.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.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;
-
-
-/**
- * Action to clear cached passwords for all subsystems in a connection.
- */
-public class SystemClearAllPasswordsAction extends SystemBaseAction {
-
- /**
- * Constructor.
- * @param shell the parent shell.
- */
- public SystemClearAllPasswordsAction(Shell shell) {
- super(SystemResources.ACTION_CLEARPASSWORD_ALL_LABEL, SystemResources.ACTION_CLEARPASSWORD_ALL_TOOLTIP, shell);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- }
-
- /**
- * @see org.eclipse.rse.ui.actions.SystemBaseAction#checkObjectType(java.lang.Object)
- */
- public boolean checkObjectType(Object selectedObject) {
-
- if (!(selectedObject instanceof IHost)) {
- return false;
- }
- else {
-
- IHost conn = (IHost)selectedObject;
-
- ISubSystem[] subsystems = conn.getSubSystems();
-
- boolean anyOk = false;
-
- for (int i = 0; i < subsystems.length; i++) {
-
- ISubSystem subsystem = subsystems[i];
- IConnectorService system = subsystem.getConnectorService();
-
- anyOk = !system.isConnected() && system.isPasswordCached(true);
-
- if (anyOk)
- {
- return true;
- }
- }
-
- return anyOk;
- }
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
-
- IHost conn = (IHost)getFirstSelection();
-
- ISubSystem[] subsystems = conn.getSubSystems();
-
- for (int i = 0; i < subsystems.length; i++)
- {
- ISubSystem ss = subsystems[i];
- try
- {
- IConnectorService system = ss.getConnectorService();
-
- if (system.isPasswordCached() || system.isPasswordCached(true))
- {
- // get the user id
- String userId = system.getUserId();
-
- // clear userid/password from memory and fire event
- //DKM and disk now
- system.clearPasswordCache(true);
- RSEUIPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(ss,
- ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE,
- ss.getHost()));
- }
-
- }
- catch (Exception exc)
- {
- // msg already shown
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemClearPasswordAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemClearPasswordAction.java
deleted file mode 100644
index bdd350839..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemClearPasswordAction.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.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-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;
-
-
-
-/**
- * This is the action for clearing in-memory userId and password cache
- */
-public class SystemClearPasswordAction extends SystemBaseAction
-{
-
- /**
- * Constructor.
- * @param shell Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- */
- public SystemClearPasswordAction(Shell shell)
- {
- super(SystemResources.ACTION_CLEARPASSWORD_LABEL, SystemResources.ACTION_CLEARPASSWORD_TOOLTIP, shell);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0049"); //$NON-NLS-1$
- }
-
- /**
- * Override of parent.
- * Called when testing if an action should be enabled based on the current selection.
- * The clear password action can be enabled if the selected object is a subsystem
- * that is not connected and has a password that is saved.
- * @return true if the clear password action can be enabled.
- */
- public boolean checkObjectType(Object obj) {
- boolean result = false;
- if (obj instanceof ISubSystem) {
- ISubSystem subsystem = (ISubSystem) obj;
- IConnectorService cs = subsystem.getConnectorService();
- result = !cs.isConnected() && cs.isPasswordCached(true);
- }
- return result;
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run()
- {
- ISubSystem ss = (ISubSystem)getFirstSelection();
- try {
- IConnectorService system = ss.getConnectorService();
- system.clearPasswordCache(true);
- RSEUIPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(ss,
- ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE,
- ss.getHost()));
- }
- catch (Exception exc) {
- // msg already shown
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCollapseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCollapseAction.java
deleted file mode 100644
index 0e889bd71..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCollapseAction.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 java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The action allows users to collapse the selected nodes in the Remote System Explorer tree view
- */
-public class SystemCollapseAction extends SystemBaseAction {
- /**
- * Constructor
- * @param parent the parent shell for this action
- */
- public SystemCollapseAction(Shell parent) {
- super(SystemResources.ACTION_COLLAPSE_SELECTED_LABEL, SystemResources.ACTION_COLLAPSE_SELECTED_TOOLTIP, parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_EXPAND);
- setAccelerator('-');
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0024"); //$NON-NLS-1$
- setAvailableOffline(true);
- }
-
- /**
- * We intercept to ensure at least one selected item is collapsable
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection) {
- boolean enable = false;
- if ((viewer != null) && (viewer instanceof ISystemTree)) {
- return ((ISystemTree) viewer).areAnySelectedItemsExpanded();
- }
- Iterator e = selection.iterator();
- ISystemViewElementAdapter adapter = null;
- while (!enable && e.hasNext()) {
- Object selectedObject = e.next();
- adapter = getAdapter(selectedObject);
- if (adapter != null) {
- if (adapter.hasChildren(selectedObject)) enable = true;
- }
- }
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- //System.out.println("Inside run of SystemRefreshAction");
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- if ((viewer != null) && (viewer instanceof ISystemResourceChangeListener)) {
- sr.fireEvent((ISystemResourceChangeListener) viewer, new SystemResourceChangeEvent("dummy", ISystemResourceChangeEvents.EVENT_COLLAPSE_SELECTED, null)); //$NON-NLS-1$
- } else
- sr.fireEvent(new SystemResourceChangeEvent("dummy", ISystemResourceChangeEvents.EVENT_COLLAPSE_SELECTED, null)); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCollapseAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCollapseAllAction.java
deleted file mode 100644
index 3d3e8495c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCollapseAllAction.java
+++ /dev/null
@@ -1,69 +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.viewers.IStructuredSelection;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The action allows users to collapse the entire Remote System Explorer tree view.
- */
-public class SystemCollapseAllAction extends SystemBaseAction {
- /**
- * Constructor
- * @param parent the shell that is employing this action
- */
- public SystemCollapseAllAction(Shell parent) {
- super(SystemResources.ACTION_COLLAPSE_ALL_LABEL, SystemResources.ACTION_COLLAPSE_ALL_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_COLLAPSEALL_ID), // D54577
- parent);
- setHoverImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptorFromIDE("elcl16/collapseall.gif")); //$NON-NLS-1$
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_EXPAND); // should never be used
- setSelectionSensitive(false);
-
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0023"); //$NON-NLS-1$
- setAccelerator(SWT.CTRL | '-');
- }
-
- /**
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return true;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- if ((viewer != null) && (viewer instanceof ISystemResourceChangeListener)) {
- sr.fireEvent((ISystemResourceChangeListener) viewer, new SystemResourceChangeEvent("false", ISystemResourceChangeEvents.EVENT_COLLAPSE_ALL, null)); //$NON-NLS-1$
- } else
- sr.fireEvent(new SystemResourceChangeEvent("false", ISystemResourceChangeEvents.EVENT_COLLAPSE_ALL, null)); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonDeleteAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonDeleteAction.java
deleted file mode 100644
index fbaf25f32..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonDeleteAction.java
+++ /dev/null
@@ -1,205 +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.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-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.SystemAdapterHelpers;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemDeleteTarget;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemDeleteDialog;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * The action that displays the Delete confirmation dialog.There are two ways to use this action:
- * <ol>
- * <li>When invoking from a class that implements ISystemDeleteTarget. In this case, that class
- * will be called back to determine if this action is to be enabled or not, and to do the actual delete for
- * each selected object, after the dialog is dismissed.
- * <li>When used without an ISystemDeleteTarget, in which case you need to call wasCancelled() after
- * running the action, and then do your own delete.
- * </ol>
- * <p>
- * If the input objects do not adapt to {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter} or
- * {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter}, then you
- * should call {@link #setNameValidator(org.eclipse.rse.core.ui.validators.ISystemValidator)} to
- * specify a validator that is called to verify the typed new name is valid. Further, to show the type value
- * of the input objects, they should implement {@link org.eclipse.rse.ui.dialogs.ISystemTypedObject}.
- *
- * @see org.eclipse.rse.ui.dialogs.SystemDeleteDialog
- */
-public class SystemCommonDeleteAction
- extends SystemBaseDialogAction
- implements ISystemIconConstants
-{
- private String promptLabel;
-
- /**
- * Constructor for SystemDeleteAction when using a delete target
- * @param parent The Shell of the parent UI for this dialog
- * @param deleteTarget The UI part that has selectable and deletable parts.
- */
- public SystemCommonDeleteAction(Shell parent, ISystemDeleteTarget deleteTarget)
- {
- super(SystemResources.ACTION_DELETE_LABEL, SystemResources.ACTION_DELETE_TOOLTIP,
- PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)
- , parent);
- setSelectionProvider(deleteTarget);
- allowOnMultipleSelection(true);
- setProcessAllSelections(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0021"); //$NON-NLS-1$
- }
-
- /**
- * Constructor for SystemDeleteAction when not using a delete target
- * @param parent The Shell of the parent UI for this dialog
- */
- public SystemCommonDeleteAction(Shell parent)
- {
- this(parent, null);
- }
-
- /**
- * Specify the text to show for the label prompt. The default is
- * "Delete selected resources?"
- */
- public void setPromptLabel(String text)
- {
- this.promptLabel = text;
- }
-
- private ISystemDeleteTarget getDeleteTarget()
- {
- return (ISystemDeleteTarget)getSelectionProvider();
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- ISystemDeleteTarget deleteTarget = getDeleteTarget();
- if (deleteTarget == null)
- return true;
- else
- return deleteTarget.showDelete() && getDeleteTarget().canDelete();
- }
-
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to create and return
- * the dialog that is displayed by the default run method
- * implementation.
- * <p>
- * If you override run with your own, then
- * simply implement this to return null as it won't be used.
- * @see #run()
- */
- protected Dialog createDialog(Shell shell)
- {
- SystemDeleteDialog dlg = new SystemDeleteDialog(shell);
- if (promptLabel != null)
- dlg.setPromptLabel(promptLabel);
- Object firstSelection = getFirstSelection();
- if (getRemoteAdapter(firstSelection) != null)
- {
- String warningMsg = null;
- String warningTip = null;
-
- warningMsg = SystemResources.RESID_DELETE_WARNING_LABEL;
- warningTip = SystemResources.RESID_DELETE_WARNING_TOOLTIP;
- dlg.setWarningMessage(warningMsg,warningTip);
- }
- return dlg;
- }
-
- public class DeleteRunnable implements IRunnableWithProgress
- {
- private ISystemDeleteTarget _target;
- public DeleteRunnable(ISystemDeleteTarget target)
- {
- _target = target;
- }
-
- public void run(IProgressMonitor monitor)
- {
- _target.doDelete(monitor); // deletes all the currently selected items
- }
- }
-
- /**
- * Required by parent.
- * In our case, we overload it to also perform the deletion, but only if using a delete target,
- * else it is up to the caller to call wasCancelled() and if not true, do their own deletion.
- */
- protected Object getDialogValue(Dialog dlg)
- {
- if (!((SystemDeleteDialog)dlg).wasCancelled() && (getDeleteTarget() != null))
- {
- ISystemDeleteTarget target = getDeleteTarget();
- DeleteRunnable delRunnable = new DeleteRunnable(target);
- IRunnableContext runnableContext = getRunnableContext(dlg.getShell());
- try
- {
- runnableContext.run(false, true, delRunnable);
- }
- catch (Exception e)
- {
- }
- RSEUIPlugin.getTheSystemRegistry().clearRunnableContext();
- setEnabled(target.canDelete());
- }
- return null;
- }
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
- else
- {
- irc = new ProgressMonitorDialog(shell);
- RSEUIPlugin.getTheSystemRegistry().setRunnableContext(shell, irc);
- return irc;
- }
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonRenameAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonRenameAction.java
deleted file mode 100644
index 387c842b9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonRenameAction.java
+++ /dev/null
@@ -1,237 +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.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemRenameTarget;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemRenameDialog;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action that displays the Rename dialog. There are two ways to use this action:
- * <ol>
- * <li>When invoking from a class that implements ISystemRenameTarget. In this case, that class
- * will be called back to determine if this action is to be enabled or not, and to do the actual rename for
- * each selected object, after the dialog is dismissed.
- * <li>When used without an ISystemRenameTarget, in which case you need to call getNewNames() after
- * running the action, and then use the new names to do the rename. This will return null if the dialog
- * was cancelled.
- * </ol>
- * <p>
- * If the input objects do not adapt to {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter} or
- * {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter}, then you
- * should call {@link #setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator)} to
- * specify a validator that is called to verify the typed new name is valid. Further, to show the type value
- * of the input objects, they should implement {@link org.eclipse.rse.ui.dialogs.ISystemTypedObject}.
- *
- * @see org.eclipse.rse.ui.dialogs.SystemRenameDialog
- * @see org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog
- */
-public class SystemCommonRenameAction extends SystemBaseDialogAction
-
-{
- private ISystemRenameTarget renameTarget;
- private boolean copyCollisionMode = false;
- private String newNames[];
- private ISystemValidator nameValidator;
- private String singleSelectionHelp, multiSelectionHelp, promptLabel, promptTip, verbage;
-
- /**
- * Constructor when using a rename target
- * @param parent The Shell of the parent UI for this dialog
- * @param target The UI part that has selectable and renamable parts.
- */
- public SystemCommonRenameAction(Shell parent, ISystemRenameTarget target)
- {
- super(SystemResources.ACTION_RENAME_LABEL, SystemResources.ACTION_RENAME_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_RENAME_ID), parent);
- setSelectionProvider(target);
- allowOnMultipleSelection(true);
- setProcessAllSelections(true);
- renameTarget = target;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0018"); //$NON-NLS-1$
- }
-
- /**
- * Constructor when not using a rename target
- * @param parent The Shell of the parent UI for this dialog
- */
- public SystemCommonRenameAction(Shell parent)
- {
- this(parent, null);
- }
- /**
- * Set the help to use in the dialog when there is a single selection
- */
- public void setDialogSingleSelectionHelp(String helpID)
- {
- this.singleSelectionHelp = helpID;
- }
- /**
- * Set the help to use in the dialog when there are multiple selections
- */
- public void setDialogMultiSelectionHelp(String helpID)
- {
- this.multiSelectionHelp = helpID;
- }
- /**
- * Set the label and tooltip of the prompt, used when only one thing is selected. The default is "New name:"
- */
- public void setSingleSelectPromptLabel(String label, String tooltip)
- {
- this.promptLabel = label;
- this.promptTip = tooltip;
- }
- /**
- * Set the verbage to show at the top of the table, used when multi things are selected. The default is "Enter a new name for each resource"
- */
- public void setMultiSelectVerbage(String verbage)
- {
- this.verbage = verbage;
- }
-
- /**
- * Set the validator for the new name,as supplied by the adaptor for name checking.
- * Overrides the default which is to query it from the object's adapter.
- */
- public void setNameValidator(ISystemValidator nameValidator)
- {
- this.nameValidator = nameValidator;
- }
-
- /**
- * Indicate this dialog is the result of a copy/move name collision.
- * Affects the title, verbage at the top of the dialog, and context help.
- */
- public void setCopyCollisionMode(boolean copyCollisionMode)
- {
- this.copyCollisionMode = copyCollisionMode;
- }
- /**
- * Query if this dialog is the result of a copy/move name collision.
- * Affects the title, verbage at the top of the dialog, and context help.
- */
- public boolean getCopyCollisionMode()
- {
- return copyCollisionMode;
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- * We overload it to call canRename() in the SystemView class.
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- if (renameTarget == null)
- return true;
- else
- return renameTarget.canRename();
- }
-
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to create and return
- * the dialog that is displayed by the default run method
- * implementation.
- * <p>
- * If you override run with your own, then
- * simply implement this to return null as it won't be used.
- * @see #run()
- */
- protected Dialog createDialog(Shell parent)
- {
- // multi-select
- if (getSelection().size() > 1)
- {
- SystemRenameDialog dlg = new SystemRenameDialog(parent);
- if (nameValidator != null)
- dlg.setNameValidator(nameValidator);
- if (multiSelectionHelp != null)
- dlg.setHelp(multiSelectionHelp);
- if (verbage != null)
- dlg.setVerbage(verbage);
- return dlg;
- }
- // single-select
- else
- {
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(parent);
- if (copyCollisionMode)
- dlg.setCopyCollisionMode(copyCollisionMode);
- if (nameValidator != null)
- dlg.setNameValidator(nameValidator);
- if (singleSelectionHelp != null)
- dlg.setHelp(singleSelectionHelp);
- if ((promptLabel != null) || (promptTip != null))
- dlg.setPromptLabel(promptLabel, promptTip);
- return dlg;
- }
- }
-
- /**
- * Required by parent. We use it to actually do the rename by calling doRename
- * in the supplied ISystemRenameTarget, if we are in that mode.
- * As a result, we return null from here.
- * @see #getNewNames()
- */
- protected Object getDialogValue(Dialog dlg)
- {
- newNames = null;
- if (dlg instanceof SystemRenameDialog)
- {
- SystemRenameDialog rnmDlg = (SystemRenameDialog)dlg;
- if (!rnmDlg.wasCancelled())
- {
- newNames = rnmDlg.getNewNames();
- if (renameTarget != null)
- renameTarget.doRename(newNames); // perform the actual renames.
- }
- }
- else
- {
- SystemRenameSingleDialog rnmDlg = (SystemRenameSingleDialog)dlg;
- if (!rnmDlg.wasCancelled())
- {
- String name = rnmDlg.getNewName();
- newNames = new String[1];
- newNames[0] = name;
- if (renameTarget != null)
- renameTarget.doRename(newNames); // perform the actual renames.
- }
- }
- return null;
- }
-
- /**
- * Return the new names entered by the user. You only need to call this when you don't supply a
- * rename target. In this case, it is your responsibility to do the actual renames.
- * @return - array of new names, with the order matching the order of the input selection. Null if dialog cancelled.
- */
- public String[] getNewNames()
- {
- return newNames;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonSelectAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonSelectAllAction.java
deleted file mode 100644
index e0ae3eb84..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCommonSelectAllAction.java
+++ /dev/null
@@ -1,72 +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.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.view.ISystemSelectAllTarget;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * The global action that enables select all.
- * For the RSE tree view, we interpret select all to mean select all the
- * children of the currently selected parent, if applicable.
- */
-public class SystemCommonSelectAllAction
- extends SystemBaseAction
-
-{
- private ISystemSelectAllTarget target;
-
- /**
- * Constructor
- * @param parent The Shell of the parent UI for this dialog
- * @param selProvider The viewer that provides the selections
- * @param target The viewer that is running this action
- */
- public SystemCommonSelectAllAction(Shell parent, ISelectionProvider selProvider, ISystemSelectAllTarget target)
- {
- //super(RSEUIPlugin.getResourceBundle(), ISystemConstants.ACTION_SELECTALL, null, parent); TODO: XLATE!
- super("Select All", (ImageDescriptor)null, parent); //$NON-NLS-1$
- setSelectionProvider(selProvider);
- this.target = target;
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- //setHelp(RSEUIPlugin.HELPPREFIX+"actn0021"); // TODO: ADD HELP!
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- return target.enableSelectAll(selection);
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run()
- {
- target.doSelectAll(getSelection());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemConnectAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemConnectAction.java
deleted file mode 100644
index bfdb0c39d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemConnectAction.java
+++ /dev/null
@@ -1,73 +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.rse.core.IRSESystemType;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-//import org.eclipse.rse.core.ui.SystemMessage;
-
-
-/**
- * This is the action for connecting to the remote subsystem
- */
-public class SystemConnectAction extends SystemBaseAction
-{
- /**
- * Constructor.
- * @param shell Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- */
- public SystemConnectAction(Shell shell)
- {
- super(SystemResources.ACTION_CONNECT_LABEL,SystemResources.ACTION_CONNECT_TOOLTIP, shell);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0047"); //$NON-NLS-1$
- }
- /**
- * Override of parent. Called when testing if action should be enabled base on current
- * selection. We check the selected object is one of our subsystems, and we are not
- * already connected.
- */
- public boolean checkObjectType(Object obj)
- {
- if ( !(obj instanceof ISubSystem) ||
- ((ISubSystem)obj).getConnectorService().isConnected() )
- return false;
- else
- return true;
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run()
- {
- ISubSystem ss = (ISubSystem)getFirstSelection();
- try {
- if (ss.getHost().getSystemType().equals(IRSESystemType.SYSTEMTYPE_WINDOWS))
- ss.connect();
- else
- ss.connect(true);
- } catch (Exception exc) {} // msg already shown
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemConnectAllSubSystemsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemConnectAllSubSystemsAction.java
deleted file mode 100644
index 9cb29b37e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemConnectAllSubSystemsAction.java
+++ /dev/null
@@ -1,108 +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 java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This is the action for connecting all subsystems for a given connection.
- */
-public class SystemConnectAllSubSystemsAction extends SystemBaseAction
-{
-
- private ISystemRegistry sr = null;
- /**
- * Constructor.
- * @param shell Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- */
- public SystemConnectAllSubSystemsAction(Shell shell)
- {
- super(SystemResources.ACTION_CONNECT_ALL_LABEL,SystemResources.ACTION_CONNECT_ALL_TOOLTIP, shell);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- sr = RSEUIPlugin.getTheSystemRegistry();
- //setHelp(RSEUIPlugin.HELPPREFIX+"actn0022");
- }
- /**
- * Override of parent. Called when testing if action should be enabled base on current
- * selection. We check the selected object is one of our subsystems, and if we are
- * currently connected.
- */
- public boolean checkObjectType(Object obj)
- {
- if ((obj instanceof IHost) &&
- !sr.areAllSubSystemsConnected((IHost)obj))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run()
- {
- List failedSystems = new ArrayList();
- IHost conn = (IHost)getFirstSelection();
- try
- {
- Shell shell = getShell();
- ISubSystem[] subsystems = conn.getSubSystems();
- for (int i = 0; i < subsystems.length; i++)
- {
- ISubSystem subsystem = subsystems[i];
- IConnectorService system = subsystem.getConnectorService();
- if (!subsystem.isConnected() && !failedSystems.contains(system))
- {
- try
- {
- subsystem.connect(false);
- }
- catch (Exception e)
- {
- failedSystems.add(system);
-
- // if the user was prompted for password and cancelled
- // or if the connect was interrupted for some other reason
- // we don't attempt to connect the other subsystems
- if (e instanceof InterruptedException) {
- break;
- }
- }// msg already shown
- }
- }
- }
- catch (Exception exc)
- {
- } // msg already shown
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyConnectionAction.java
deleted file mode 100644
index f7dd38bc9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyConnectionAction.java
+++ /dev/null
@@ -1,246 +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 java.util.Iterator;
-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.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.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.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Copy a connection action.
- */
-public class SystemCopyConnectionAction extends SystemBaseCopyAction
-{
- private ISystemRegistry sr = null;
- private SystemSimpleContentElement initialSelectionElement = null;
- /**
- * Constructor for SystemCopyConnectionAction
- */
- public SystemCopyConnectionAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_COPY_CONNECTION_LABEL, MODE_COPY);
- sr = RSEUIPlugin.getTheSystemRegistry();
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0019"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX+"dccn0000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We intercept to ensure only connections from the same profile are selected.
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- ISystemProfile prevProfile = null;
- Iterator e= selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof IHost)
- {
- IHost conn = (IHost)selectedObject;
- if (prevProfile == null)
- prevProfile = conn.getSystemProfile();
- else
- enable = (prevProfile == conn.getSystemProfile());
- if (enable)
- prevProfile = conn.getSystemProfile();
- }
- else
- enable = false;
- }
- return enable;
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
-
- /**
- * @see SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)
- */
- protected String checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, Object oldObject, String oldName)
- {
- ISystemProfile profile = (ISystemProfile)targetContainer;
- String newName = oldName;
- IHost match = sr.getHost(profile, oldName);
- if (match != null)
- {
- //monitor.setVisible(false); wish we could!
- //ValidatorConnectionName validator = new ValidatorConnectionName(sr.getConnectionAliasNames(profile));
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(shell, true, match, null); // true => copy-collision-mode
- dlg.open();
- if (!dlg.wasCancelled())
- newName = dlg.getNewName();
- else
- newName = null;
- }
- return newName;
- }
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- IHost oldConnection = (IHost)oldObject;
- //String oldName = oldConnection.getAliasName();
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"starting to copy "+oldName+" to "+newName);
- ISystemProfile targetProfile = (ISystemProfile)targetContainer;
- IHost newConn = sr.copyHost(monitor, oldConnection, targetProfile, newName);
- return (newConn != null);
- }
-
- /**
- * @see SystemBaseCopyAction#getTreeModel()
- */
- protected SystemSimpleContentElement getTreeModel()
- {
- return getProfileTreeModel(getFirstSelectedConnection().getSystemProfile());
- }
- /**
- * @see SystemBaseCopyAction#getTreeInitialSelection()
- */
- protected SystemSimpleContentElement getTreeInitialSelection()
- {
- return initialSelectionElement;
- }
-
- /**
- * @see SystemBaseCopyAction#getPromptString()
- */
- protected String getPromptString()
- {
- return SystemResources.RESID_COPY_TARGET_PROFILE_PROMPT;
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage()
- */
- protected SystemMessage getCopyingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYCONNECTIONS_PROGRESS);
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage( String)
- */
- protected SystemMessage getCopyingMessage(String oldName)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYCONNECTION_PROGRESS).makeSubstitution(oldName);
- }
-
- /**
- * @see SystemBaseCopyAction#getOldObjects()
- */
- protected Object[] getOldObjects()
- {
- return getSelectedConnections();
- }
-
- /**
- * @see SystemBaseCopyAction#getOldNames()
- */
- protected String[] getOldNames()
- {
- IHost[] conns = getSelectedConnections();
- String[] names = new String[conns.length];
- for (int idx=0; idx<conns.length; idx++)
- names[idx] = conns[idx].getAliasName();
- return names;
- }
-
- /**
- * Get the currently selected connections
- */
- protected IHost[] getSelectedConnections()
- {
- IStructuredSelection selection = getSelection();
- IHost[] conns = new IHost[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- {
- conns[idx++] = (IHost)i.next();
- }
- return conns;
- }
- /**
- * Get the first selected connection
- */
- protected IHost getFirstSelectedConnection()
- {
- return (IHost)getFirstSelection();
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-
- /**
- * Create and return data model to populate selection tree with.
- * @param profile whose tree model element is to be selected
- */
- protected SystemSimpleContentElement getProfileTreeModel(ISystemProfile profile)
- {
- SystemSimpleContentElement veryRootElement =
- new SystemSimpleContentElement("Profiles", //$NON-NLS-1$
- null, null, (Vector)null);
- veryRootElement.setRenamable(false);
- veryRootElement.setDeletable(false);
-
- ISystemProfile[] profiles = RSEUIPlugin.getTheSystemRegistry().getActiveSystemProfiles();
- ImageDescriptor image = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID);
-
- if (profiles == null)
- return veryRootElement;
-
- Vector veryRootChildren = new Vector();
- for (int idx=0; idx<profiles.length; idx++)
- {
- SystemSimpleContentElement profileElement =
- new SystemSimpleContentElement(profiles[idx].getName(),
- profiles[idx], veryRootElement, (Vector)null);
- profileElement.setRenamable(false);
- profileElement.setDeletable(false);
- profileElement.setImageDescriptor(image);
- veryRootChildren.addElement(profileElement);
- if (profiles[idx] == profile)
- initialSelectionElement = profileElement;
- }
- veryRootElement.setChildren(veryRootChildren);
- return veryRootElement;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java
deleted file mode 100644
index 9869f1ede..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java
+++ /dev/null
@@ -1,233 +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 java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemDropActionDelegate;
-import org.eclipse.rse.ui.view.SystemViewDataDropAdapter;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.part.PluginTransferData;
-
-
-/**
- * Copy selected objects to clipboard action.
- */
-public class SystemCopyToClipboardAction extends SystemBaseAction implements IValidatorRemoteSelection
-{
-
-
- private IStructuredSelection _selection;
- private Clipboard _clipboard;
-
- /**
- * Constructor
- */
- public SystemCopyToClipboardAction(Shell shell, Clipboard clipboard)
- {
- super(SystemResources.ACTION_COPY_LABEL,
- PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY),
- shell);
-
- _clipboard = clipboard;
-
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0116"); //$NON-NLS-1$
- }
-
- public void run()
- {
- if (_selection != null)
- {
- copySelectionToClipboard(_selection);
- }
- }
-
- private void copySelectionToClipboard(IStructuredSelection ss)
- {
- Iterator iterator = ss.iterator();
-
- // marshall data
- StringBuffer textStream = new StringBuffer(""); //$NON-NLS-1$
- StringBuffer dataStream = new StringBuffer(""); //$NON-NLS-1$
- ArrayList fileNames = new ArrayList();
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
-
- while (iterator.hasNext())
- {
- Object dragObject = iterator.next();
-
- if (dragObject instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) dragObject).getAdapter(ISystemViewElementAdapter.class);
-
- if (adapter != null)
- {
- String text = adapter.getAlternateText(dragObject);
- textStream.append(getTextTransferPrepend(dragObject, adapter));
- textStream.append(text);
- textStream.append(getTextTransferAppend(dragObject, adapter));
-
- if (adapter.canDrag(dragObject))
- {
- // get the subsystem id
- ISubSystem subSystem = adapter.getSubSystem(dragObject);
- String subSystemId = registry.getAbsoluteNameForSubSystem(subSystem);
-
- dataStream.append(subSystemId);
- dataStream.append(":"); //$NON-NLS-1$
-
- String objectId = adapter.getAbsoluteName(dragObject);
- dataStream.append(objectId);
-
- if (iterator.hasNext())
- {
- dataStream.append(SystemViewDataDropAdapter.RESOURCE_SEPARATOR);
- }
-
- /** FIXME - files can't be coupled to systems.core!
- // support for external copy for local files
- if (dragObject instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) dragObject;
-
- String connectionType = file.getParentRemoteFileSubSystem().getHost().getSystemType();
-
- if (connectionType.equals("Local"))
- {
- fileNames.add(file.getAbsolutePath());
- }
- }
- */
- }
- }
- }
- }
-
- PluginTransferData data = new PluginTransferData(SystemDropActionDelegate.ID, dataStream.toString().getBytes());
-
- // put data in clipboard
- if (fileNames.size() == 0)
- {
- _clipboard.setContents(new Object[] { data, textStream.toString() }, new Transfer[] { PluginTransfer.getInstance(), TextTransfer.getInstance()});
- }
- else
- {
- String[] ft = new String[fileNames.size()];
- for (int i = 0; i < ft.length; i++)
- {
- ft[i] = (String) fileNames.get(i);
- }
-
- _clipboard.setContents(new Object[] { data, ft, textStream.toString() }, new Transfer[] { PluginTransfer.getInstance(), FileTransfer.getInstance(), TextTransfer.getInstance()});
- }
- }
-
- /**
- * Returns the string to prepend for the selected object for text transfer.
- * Default implementation returns the empty string.
- * @param obj the selected object.
- * @param adapter the adapter of the selected object.
- * @return the string to prepend for the selected object.
- */
- protected String getTextTransferPrepend(Object obj, ISystemViewElementAdapter adapter) {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Returns the string to append for the selected object for text transfer.
- * Default implementation returns the system line separator (i.e. the line.separator property).
- * @param obj the selected object.
- * @param adapter the adapter of the selected object.
- * @return the string to append for the selected object.
- */
- protected String getTextTransferAppend(Object obj, ISystemViewElementAdapter adapter) {
- return System.getProperty("line.separator"); //$NON-NLS-1$
- }
-
- /**
- * The user has selected a remote object. Return null if OK is to be enabled, or a SystemMessage
- * if it is not to be enabled. The message will be displayed on the message line.
- * <p>
- * This is overridden in SystemMoveRemoteFileAction
- */
- public SystemMessage isValid(IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects)
- {
- return null;
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We simply ensure every selected object has a system view element adapter.
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof IAdaptable)
- {
- IAdaptable adaptable = (IAdaptable) selectedObject;
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) (adaptable.getAdapter(ISystemViewElementAdapter.class));
- if (va != null)
- {
- enable = va.canDrag(selectedObject);
- }
- else
- {
- enable = false;
- }
- }
- else
- {
- enable = false;
- }
- }
-
- if (enable)
- {
- _selection = selection;
- }
- return enable;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDisconnectAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDisconnectAction.java
deleted file mode 100644
index 84624fc92..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDisconnectAction.java
+++ /dev/null
@@ -1,69 +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.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * This is the action for disconnecting from a remote subsystem.
- */
-public class SystemDisconnectAction extends SystemBaseAction
-{
-
- /**
- * Constructor.
- * @param shell Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- */
- public SystemDisconnectAction(Shell shell)
- {
- super(SystemResources.ACTION_DISCONNECT_LABEL, SystemResources.ACTION_DISCONNECT_TOOLTIP, shell);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0048"); //$NON-NLS-1$
- }
- /**
- * Override of parent. Called when testing if action should be enabled based on current
- * selection. We check the selected object is one of our subsystems, and if we are
- * currently connected.
- */
- public boolean checkObjectType(Object obj)
- {
- if ( !(obj instanceof ISubSystem) ||
- !((ISubSystem)obj).getConnectorService().isConnected() )
- return false;
- else
- return true;
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run()
- {
- ISubSystem ss = (ISubSystem)getFirstSelection();
- try {
- ss.disconnect();
- } catch (Exception exc) {} // msg already shown
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDisconnectAllSubSystemsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDisconnectAllSubSystemsAction.java
deleted file mode 100644
index bf9d4a576..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDisconnectAllSubSystemsAction.java
+++ /dev/null
@@ -1,72 +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.rse.core.model.IHost;
-import org.eclipse.rse.core.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;
-
-
-/**
- * This is the action forconnecting all subsystems for a given connection.
- */
-public class SystemDisconnectAllSubSystemsAction extends SystemBaseAction
-{
-
- private ISystemRegistry sr = null;
- /**
- * Constructor.
- * @param shell Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- */
- public SystemDisconnectAllSubSystemsAction(Shell shell)
- {
- super(SystemResources.ACTION_DISCONNECTALLSUBSYSTEMS_LABEL, SystemResources.ACTION_DISCONNECTALLSUBSYSTEMS_TOOLTIP, shell);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- sr = RSEUIPlugin.getTheSystemRegistry();
- // TODO help for connect all
- //setHelp(RSEUIPlugin.HELPPREFIX+"actn0022");
- }
- /**
- * Override of parent. Called when testing if action should be enabled base on current
- * selection. We check the selected object is one of our subsystems, and if we are
- * currently connected.
- */
- public boolean checkObjectType(Object obj)
- {
- if ( !(obj instanceof IHost) ||
- !(sr.isAnySubSystemConnected((IHost)obj) ))
- return false;
- else
- return true;
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run()
- {
- IHost conn = (IHost)getFirstSelection();
- try {
- sr.disconnectAllSubSystems(conn);
- } catch (Exception exc) {} // msg already shown
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDynamicPopupMenuExtensionManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDynamicPopupMenuExtensionManager.java
deleted file mode 100644
index 8ac97dbf2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemDynamicPopupMenuExtensionManager.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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 java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- *
- * Singleton class for managing adapter menu extensions.
- * View adapters that support this feature, should call populateMenu to allow for
- * extended menu contributions.
- */
-public class SystemDynamicPopupMenuExtensionManager implements
- ISystemDynamicPopupMenuExtensionManager
-{
- private static SystemDynamicPopupMenuExtensionManager _instance = new SystemDynamicPopupMenuExtensionManager();
-
- private List _extensions;
-
- private SystemDynamicPopupMenuExtensionManager()
- {
- _extensions= new ArrayList();
- }
-
- public static SystemDynamicPopupMenuExtensionManager getInstance()
- {
- return _instance;
- }
-
- public void registerMenuExtension(ISystemDynamicPopupMenuExtension ext)
- {
- _extensions.add(ext);
- }
-
- /**
- * Actions are added to a contribution menu.
- * @param shell the shell
- * @param menu the menu to contribute to
- * @param selection(s) are processed to determine the resource source file
- * @param menuGroup the default menu group to add actions to
- * @return the menu is populated with actions
- */
- public void populateMenu(Shell shell, SystemMenuManager menu,IStructuredSelection selection, String menuGroup)
- {
- for (int i = 0; i <_extensions.size(); i++)
- {
- ISystemDynamicPopupMenuExtension extension = (ISystemDynamicPopupMenuExtension)_extensions.get(i);
- if (extension.supportsSelection(selection))
- {
- extension.populateMenu(shell, menu, selection, menuGroup);
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemExpandAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemExpandAction.java
deleted file mode 100644
index 0b2d18fdc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemExpandAction.java
+++ /dev/null
@@ -1,86 +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 java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The action allows users to expand the selected nodes in the Remote System Explorer tree view
- */
-public class SystemExpandAction extends SystemBaseAction {
-
- /**
- * Constructor
- * @param parent the shell that employs this action
- */
- public SystemExpandAction(Shell parent) {
- super(SystemResources.ACTION_EXPAND_SELECTED_LABEL, SystemResources.ACTION_EXPAND_SELECTED_TOOLTIP, parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_EXPAND);
- setAccelerator('+');
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0025"); //$NON-NLS-1$
- setAvailableOffline(true);
- }
-
- /**
- * <p>
- * We intercept to ensure at least one selected item is expandable
- *
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection) {
- boolean enable = false;
- if ((viewer != null) && (viewer instanceof ISystemTree)) {
- return ((ISystemTree) viewer).areAnySelectedItemsExpandable();
- }
- Iterator e = selection.iterator();
- ISystemViewElementAdapter adapter = null;
- while (!enable && e.hasNext()) {
- Object selectedObject = e.next();
- adapter = getAdapter(selectedObject);
- if (adapter != null) {
- if (adapter.hasChildren(selectedObject)) enable = true;
- }
- }
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- //System.out.println("Inside run of SystemRefreshAction");
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- if ((viewer != null) && (viewer instanceof ISystemResourceChangeListener)) {
- sr.fireEvent((ISystemResourceChangeListener) viewer, new SystemResourceChangeEvent("dummy", ISystemResourceChangeEvents.EVENT_EXPAND_SELECTED, null)); //$NON-NLS-1$
- } else
- sr.fireEvent(new SystemResourceChangeEvent("dummy", ISystemResourceChangeEvents.EVENT_EXPAND_SELECTED, null)); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveConnectionAction.java
deleted file mode 100644
index d1aafdf75..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveConnectionAction.java
+++ /dev/null
@@ -1,255 +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 java.util.Iterator;
-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.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.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.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Move a connection action.
- */
-public class SystemMoveConnectionAction extends SystemBaseCopyAction
-{
-
- private ISystemRegistry sr = null;
- private SystemSimpleContentElement initialSelectionElement = null;
-
- /**
- * Constructor
- */
- public SystemMoveConnectionAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_MOVE_CONNECTION_LABEL, MODE_MOVE);
- //allowOnMultipleSelection(false); // too hard to handle, for now!
- sr = RSEUIPlugin.getTheSystemRegistry();
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0020"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX+"dmcn0000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We intercept to ensure only connections from the same profile are selected.
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- if (sr.getActiveSystemProfiles().length <= 1)
- return false;
- boolean enable = true;
- ISystemProfile prevProfile = null;
- Iterator e= selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof IHost)
- {
- IHost conn = (IHost)selectedObject;
- if (prevProfile == null)
- prevProfile = conn.getSystemProfile();
- else
- enable = (prevProfile == conn.getSystemProfile());
- if (enable)
- prevProfile = conn.getSystemProfile();
- }
- else
- enable = false;
- }
- return enable;
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
-
- /**
- * @see SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)
- */
- protected String checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, Object oldObject, String oldName)
- {
- ISystemProfile profile = (ISystemProfile)targetContainer;
- String newName = oldName;
- IHost match = sr.getHost(profile, oldName);
- if (match != null)
- {
- //monitor.setVisible(false); wish we could!
- //ValidatorConnectionName validator = new ValidatorConnectionName(sr.getConnectionAliasNames(profile));
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(shell, true, match, null); // true => copy-collision-mode
- dlg.open();
- if (!dlg.wasCancelled())
- newName = dlg.getNewName();
- else
- newName = null;
- }
- return newName;
- }
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- IHost oldConnection = (IHost)oldObject;
- //String oldName = oldConnection.getAliasName();
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"starting to copy "+oldName+" to "+newName);
- ISystemProfile targetProfile = (ISystemProfile)targetContainer;
- IHost newConn = sr.moveHost(monitor, oldConnection, targetProfile, newName);
- return (newConn != null);
- }
-
- /**
- * @see SystemBaseCopyAction#getTreeModel()
- */
- protected SystemSimpleContentElement getTreeModel()
- {
- return getProfileTreeModel(getFirstSelectedConnection().getSystemProfile());
- }
- /**
- * @see SystemBaseCopyAction#getTreeInitialSelection()
- */
- protected SystemSimpleContentElement getTreeInitialSelection()
- {
- return initialSelectionElement;
- }
-
- /**
- * @see SystemBaseCopyAction#getPromptString()
- */
- protected String getPromptString()
- {
- return SystemResources.RESID_MOVE_TARGET_PROFILE_PROMPT;
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage()
- */
- protected SystemMessage getCopyingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVECONNECTIONS_PROGRESS);
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage( String)
- */
- protected SystemMessage getCopyingMessage(String oldName)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVECONNECTION_PROGRESS).makeSubstitution(oldName);
- }
-
- /**
- * @see SystemBaseCopyAction#getOldObjects()
- */
- protected Object[] getOldObjects()
- {
- return getSelectedConnections();
- }
-
- /**
- * @see SystemBaseCopyAction#getOldNames()
- */
- protected String[] getOldNames()
- {
- IHost[] conns = getSelectedConnections();
- String[] names = new String[conns.length];
- for (int idx=0; idx<conns.length; idx++)
- names[idx] = conns[idx].getAliasName();
- return names;
- }
-
- /**
- * Get the currently selected connections
- */
- protected IHost[] getSelectedConnections()
- {
- IStructuredSelection selection = getSelection();
- IHost[] conns = new IHost[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- {
- conns[idx++] = (IHost)i.next();
- }
- return conns;
- }
- /**
- * Get the first selected connection
- */
- protected IHost getFirstSelectedConnection()
- {
- return (IHost)getFirstSelection();
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-
- /**
- * Create and return data model to populate selection tree with.
- * @param profile whose tree model element is not to be include
- */
- protected SystemSimpleContentElement getProfileTreeModel(ISystemProfile profile)
- {
- SystemSimpleContentElement veryRootElement =
- new SystemSimpleContentElement("Profiles", //$NON-NLS-1$
- null, null, (Vector)null);
- veryRootElement.setRenamable(false);
- veryRootElement.setDeletable(false);
-
- ISystemProfile[] profiles = RSEUIPlugin.getTheSystemRegistry().getActiveSystemProfiles();
- ImageDescriptor image = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID);
-
- if (profiles == null)
- return veryRootElement;
-
- Vector veryRootChildren = new Vector();
-
- for (int idx=0; idx<profiles.length; idx++)
- {
- if (!(profiles[idx]==profile))
- {
- SystemSimpleContentElement profileElement =
- new SystemSimpleContentElement(profiles[idx].getName(),
- profiles[idx], veryRootElement, (Vector)null);
- profileElement.setRenamable(false);
- profileElement.setDeletable(false);
- profileElement.setImageDescriptor(image);
- veryRootChildren.addElement(profileElement);
- if (initialSelectionElement == null)
- initialSelectionElement = profileElement;
- }
- }
- veryRootElement.setChildren(veryRootChildren);
- return veryRootElement;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveDownConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveDownConnectionAction.java
deleted file mode 100644
index 9872e376a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveDownConnectionAction.java
+++ /dev/null
@@ -1,108 +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 java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.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.swt.widgets.Shell;
-
-
-/**
- * The action allows users to move the current connection down in the list
- */
-public class SystemMoveDownConnectionAction extends SystemBaseAction
-
-{
-
- private ISystemProfile prevProfile = null;
-
- /**
- * Constructor for SystemMoveDownAction
- */
- public SystemMoveDownConnectionAction(Shell parent)
- {
- super(SystemResources.ACTION_MOVEDOWN_LABEL, SystemResources.ACTION_MOVEDOWN_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID),
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0002"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We intercept to ensure only connections from the same profile are selected.
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- prevProfile = null;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof IHost)
- {
- IHost conn = (IHost)selectedObject;
- int connCount = sr.getHostCountWithinProfile(conn)-1;
- if (prevProfile == null)
- prevProfile = conn.getSystemProfile();
- else
- enable = (prevProfile == conn.getSystemProfile());
- if (enable)
- {
- enable = (sr.getHostPosition(conn) < connCount);
- prevProfile = conn.getSystemProfile();
- }
- }
- else
- enable = false;
- }
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- SystemSortableSelection[] sortableArray = SystemSortableSelection.makeSortableArray(getSelection());
- IHost conn = null;
- for (int idx=0; idx<sortableArray.length; idx++)
- {
- conn = (IHost)sortableArray[idx].getSelectedObject();
- sortableArray[idx].setPosition(sr.getHostPosition(conn));
- }
- SystemSortableSelection.sortArray(sortableArray);
- IHost[] conns = (IHost[])SystemSortableSelection.getSortedObjects(sortableArray, new IHost[sortableArray.length]);
- sr.moveHosts(prevProfile.getName(),conns,1);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveUpConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveUpConnectionAction.java
deleted file mode 100644
index f39fdd152..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemMoveUpConnectionAction.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.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.swt.widgets.Shell;
-
-
-/**
- * The action allows users to move the current connection up in the list
- */
-public class SystemMoveUpConnectionAction extends SystemBaseAction
-
-{
-
- private ISystemProfile prevProfile = null;
-
- /**
- * Constructor for SystemMoveUpAction
- */
- public SystemMoveUpConnectionAction(Shell parent)
- {
- super(SystemResources.ACTION_MOVEUP_LABEL, SystemResources.ACTION_MOVEUP_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID),
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0001"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We intercept to ensure only connections from the same profile are selected.
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- prevProfile = null;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof IHost)
- {
- IHost conn = (IHost)selectedObject;
- if (prevProfile == null)
- prevProfile = conn.getSystemProfile();
- else
- enable = (prevProfile == conn.getSystemProfile());
- if (enable)
- {
- enable = (sr.getHostPosition(conn) > 0);
- prevProfile = conn.getSystemProfile();
- }
- }
- else
- enable = false;
- }
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
-
- SystemSortableSelection[] sortableArray = SystemSortableSelection.makeSortableArray(getSelection());
- IHost conn = null;
- for (int idx=0; idx<sortableArray.length; idx++)
- {
- conn = (IHost)sortableArray[idx].getSelectedObject();
- sortableArray[idx].setPosition(sr.getHostPosition(conn));
- }
- SystemSortableSelection.sortArray(sortableArray);
- IHost[] conns = (IHost[])SystemSortableSelection.getSortedObjects(sortableArray, new IHost[sortableArray.length]);
-
- sr.moveHosts(prevProfile.getName(),conns,-1);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionAction.java
deleted file mode 100644
index d93b6beee..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionAction.java
+++ /dev/null
@@ -1,208 +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.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.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.wizards.RSENewConnectionWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action that displays the New Connection wizard
- */
-public class SystemNewConnectionAction extends SystemBaseWizardAction
-
-{
-
- private IHost currConn;
- private boolean fromPopupMenu = true;
- private ISelectionProvider sp = null;
- private String[] restrictSystemTypesTo;
- private String defaultConnectionName, defaultHostName;
-
- /**
- * Constructor for SystemNewConnectionAction
- * @param shell The parent shell to host the new wizard
- * @param fromPopupMenu true if being launched from the Remote System Explorer view directly,
- * false if being launched from a dialog
- * @param sp The selection provider that will supply the selection via getSelection, if
- * fromPopupMenu is false
- */
- public SystemNewConnectionAction(Shell shell, boolean fromPopupMenu, ISelectionProvider sp)
- {
- this(shell, fromPopupMenu, true, sp);
- }
- /**
- * Constructor for SystemNewConnectionAction when you don't want the icon.
- * @param shell The parent shell to host the new wizard
- * @param fromPopupMenu true if being launched from the Remote System Explorer view directly,
- * false if being launched from a dialog
- * @param wantIcon true if you want the icon to show beside the action, false if not
- * @param sp The selection provider that will supply the selection via getSelection, if
- * fromPopupMenu is false
- */
- public SystemNewConnectionAction(Shell shell, boolean fromPopupMenu, boolean wantIcon, ISelectionProvider sp)
- {
- this(shell, SystemResources.ACTION_NEWCONN_LABEL, SystemResources.ACTION_NEWCONN_TOOLTIP, fromPopupMenu, wantIcon, sp);
- }
- /**
- * Constructor for SystemNewConnectionAction when you possibly don't want the icon, and want to
- * supply your own label. This is the "full" flavoured constructor!
- *
- * @param shell The parent shell to host the new wizard
- * @param label The label for the action
- * @param tooltip the tooltip for the action
- * @param fromPopupMenu true if being launched from the Remote System Explorer view directly,
- * false if being launched from a dialog
- * @param wantIcon true if you want the icon to show beside the action, false if not
- * @param sp The selection provider that will supply the selection via getSelection, if
- * fromPopupMenu is false
- */
- public SystemNewConnectionAction(Shell shell, String label, String tooltip,
- boolean fromPopupMenu, boolean wantIcon, ISelectionProvider sp)
- {
- super(label, tooltip,
- wantIcon ? RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTION_ID) : null ,
- shell);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- this.fromPopupMenu = fromPopupMenu;
- this.sp = sp;
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0000"); //$NON-NLS-1$
- }
-
- /**
- * The default processing for the run method calls createDialog, which
- * in turn calls this method to return an instance of our wizard.
- * <p>
- * Our default implementation is to return SystemNewConnectionWizard.
- */
- protected IWizard createWizard()
- {
- RSENewConnectionWizard newConnWizard = new RSENewConnectionWizard();
- if (!fromPopupMenu && (sp!=null))
- {
- setSelection(sp.getSelection());
- }
-
- // newConnWizard.setCurrentlySelectedConnection(currConn);
- if (restrictSystemTypesTo != null) {
-
- IRSESystemType[] systemTypes = new IRSESystemType[restrictSystemTypesTo.length];
- for (int i = 0; i < restrictSystemTypesTo.length; i++) {
- systemTypes[i] = RSECorePlugin.getDefault().getRegistry().getSystemType(restrictSystemTypesTo[i]);
- }
-
- newConnWizard.restrictToSystemTypes(systemTypes);
- }
-
- // if (defaultHostName != null)
- // newConnWizard.setHostName(defaultHostName);
- // if (defaultConnectionName != null)
- // newConnWizard.setConnectionName(defaultConnectionName);
- return newConnWizard;
- }
-
- /**
- * Set the current selected connection so we can better intelligently set
- * the defaults.
- */
- public void setCurrentConnection(IHost conn)
- {
- this.currConn = conn;
- }
- /**
- * Call this to restrict the system type that the user is allowed to choose
- */
- public void restrictSystemType(String systemType)
- {
- restrictSystemTypesTo = new String[1];
- restrictSystemTypesTo[0] = systemType;
- }
- /**
- * Call this to restrict the system types that the user is allowed to choose
- */
- public void restrictSystemTypes(String[] systemTypes)
- {
- this.restrictSystemTypesTo = systemTypes;
- }
- /**
- * Preset the connection name
- */
- public void setConnectionName(String name)
- {
- defaultConnectionName = name;
- }
- /**
- * Preset the host name
- */
- public void setHostName(String name)
- {
- defaultHostName = name;
- }
-
- /**
- * Override of parent method so we can deduce currently selected connection (direct or indirect if child object selected).
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = super.updateSelection(selection);
- if (enable)
- {
- Object firstSelection = getFirstSelection();
- IHost conn = null;
- if (firstSelection != null)
- {
- if (firstSelection instanceof IHost)
- conn = (IHost)firstSelection;
- else if (firstSelection instanceof ISubSystem)
- conn = ((ISubSystem)firstSelection).getHost();
- else if (firstSelection instanceof ISystemFilterPoolReference)
- {
- ISystemFilterPoolReference sfpr = (ISystemFilterPoolReference)firstSelection;
- ISubSystem ss = (ISubSystem)sfpr.getProvider();
- conn = ss.getHost();
- }
- else if (firstSelection instanceof ISystemFilterReference)
- {
- ISystemFilterReference sfr = (ISystemFilterReference)firstSelection;
- ISubSystem ss = (ISubSystem)sfr.getProvider();
- conn = ss.getHost();
- }
- else if (firstSelection instanceof ISystemFilterStringReference)
- {
- ISystemFilterStringReference sfsr = (ISystemFilterStringReference)firstSelection;
- ISubSystem ss = (ISubSystem)sfsr.getProvider();
- conn = ss.getHost();
- }
- }
- setCurrentConnection(conn);
- }
- return enable;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionFromExistingConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionFromExistingConnectionAction.java
deleted file mode 100644
index 939bb6acf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionFromExistingConnectionAction.java
+++ /dev/null
@@ -1,41 +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.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action that displays the Create Another Connection wizard
- */
-public class SystemNewConnectionFromExistingConnectionAction extends SystemNewConnectionAction
-
-{
-
- /**
- * Constructor
- * @param shell The parent shell to host the new wizard
- */
- public SystemNewConnectionFromExistingConnectionAction(Shell shell)
- {
- super(shell, SystemResources.ACTION_ANOTHERCONN_LABEL, SystemResources.ACTION_ANOTHERCONN_TOOLTIP, false, true, null);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0015"); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewProfileAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewProfileAction.java
deleted file mode 100644
index c04c1561e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewProfileAction.java
+++ /dev/null
@@ -1,112 +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.wizard.IWizard;
-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.team.SystemTeamView;
-import org.eclipse.rse.ui.wizards.SystemNewProfileWizard;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The action that displays the New Profile wizard
- */
-public class SystemNewProfileAction extends SystemBaseWizardAction {
-
- /**
- * Constructor for SystemNewProfileAction for "New -> Profile..."
- * @param parent the parent shell in which this action executes
- */
- public SystemNewProfileAction(Shell parent) {
- super(SystemResources.ACTION_NEWPROFILE_LABEL, SystemResources.ACTION_NEWPROFILE_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWPROFILE_ID), parent);
- setSelectionSensitive(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0003"); //$NON-NLS-1$
- }
-
- /**
- * Constructor for SystemNewProfileAction where you can choose between "New profile..." and "New -> Profile"
- * @param parent the parent shell in which this action executes
- * @param cascading if true then use the "New -> Profile" style, else use the "New profile..." style.
- */
- public SystemNewProfileAction(Shell parent, boolean cascading) {
- super(cascading ? SystemResources.ACTION_NEWPROFILE_LABEL : SystemResources.ACTION_NEW_PROFILE_LABEL, cascading ? SystemResources.ACTION_NEWPROFILE_TOOLTIP
- : SystemResources.ACTION_NEW_PROFILE_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWPROFILE_ID), parent);
- setSelectionSensitive(false);
- if (cascading)
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- else
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW_NONCASCADING);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0003"); //$NON-NLS-1$
- }
-
- /**
- * Refresh the enabled state
- */
- public void refreshEnablement() {
- setEnabled(isEnabled());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.actions.SystemBaseAction#isEnabled()
- */
- public boolean isEnabled() {
- return true;
- /*
- * From the old javadoc:
- * We disable this action if it is a new workspace and the user has yet to create
- * their first connection, and hence rename their default profile.
- * @return true if the action is enabled
- *
- * defect 43428 was an early RSE defect whose fix prevented the creation of profiles until the first
- * connection was created. However, new default profiles are created when RSE is initially activated
- * so there is no need to inhibit profile creation.
- */
-// ISystemProfile defaultProfile = SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile();
-// if (defaultProfile != null)
-// return false;
-// else
-// return true;
- }
-
- /**
- * @return a new Wizard object for creating a profile.
- */
- protected IWizard createWizard() {
- return new SystemNewProfileWizard();
- }
-
- /**
- * Typically, the wizard's performFinish method does the work required by
- * a successful finish of the wizard. However, often we also want to be
- * able to extract user-entered data from the wizard, by calling getters
- * in this action. To enable this, override this method to populate your
- * output instance variables from the completed wizard, which is passed
- * as a parameter. This is only called after successful completion of the
- * wizard.
- * @param wizard the wizard that was just completed
- */
- protected void postProcessWizard(IWizard wizard) {
- if (getViewer() instanceof SystemTeamView) {
- getViewer().refresh();
- }
-
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 1b2597bd0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java
+++ /dev/null
@@ -1,122 +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.core.runtime.IAdaptable;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.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.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.OpenInNewWindowAction;
-
-
-/**
- * The action allows users to open a new Remote System Explorer perspective, anchored
- * by the currently selected resource.
- */
-public class SystemOpenExplorerPerspectiveAction
- extends SystemBaseAction
-
-{
- //private boolean replaceEnabled = true;
- private IWorkbenchWindow window;
-
- /**
- * Constructor
- */
- public SystemOpenExplorerPerspectiveAction(Shell parent, IWorkbenchWindow currentWorkbenchWindow)
- {
- super(SystemResources.ACTION_OPENEXPLORER_DIFFPERSP2_LABEL, SystemResources.ACTION_OPENEXPLORER_DIFFPERSP2_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PERSPECTIVE_ID),
- parent);
- this.window = currentWorkbenchWindow;
-
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPEN);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0016"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We intercept to ensure only connections from the same profile are selected.
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- Object selected = selection.getFirstElement();
- if (selected instanceof ISystemFilterReference)
- {
- if ( ((ISystemFilterReference)selected).getReferencedFilter().isPromptable() )
- enable = false;
- }
- else if (selected instanceof ISystemPromptableObject)
- enable = false;
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see Action#run()
- */
- public void run()
- {
- /* OLD RELEASE 1 CODE
- IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore();
- String perspectiveSetting =
- store.getString(IWorkbenchPreferenceConstants.OPEN_NEW_PERSPECTIVE);
- runWithPerspectiveValue(desc, perspectiveSetting);
- */
- OpenInNewWindowAction workbenchOpenAction = // NEW FOR RELEASE 2
- new OpenInNewWindowAction(window,getPageInput());
- workbenchOpenAction.run();
- }
-
- /**
- * Sets the page input.
- *
- * @param input the page input
- */
- public void setPageInput(IAdaptable input)
- {
- }
- /**
- * Get the page input.
- * Will use explicitly set input if given, else deduces from selection
- */
- public IAdaptable getPageInput()
- {
- //if (pageInput != null) safer to always recalculate!
- // return pageInput;
- //else
- {
- Object firstSel = getFirstSelection();
- if ((firstSel != null) && (firstSel instanceof IAdaptable))
- return (IAdaptable)firstSel;
- else
- return null;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenRSEPerspectiveAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenRSEPerspectiveAction.java
deleted file mode 100644
index b402d077d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenRSEPerspectiveAction.java
+++ /dev/null
@@ -1,42 +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.action.Action;
-import org.eclipse.rse.core.SystemPerspectiveHelpers;
-
-
-/**
- * Open the RSE perspective (used in welcome.xml)
- */
-public class SystemOpenRSEPerspectiveAction extends Action {
-
-
- public SystemOpenRSEPerspectiveAction()
- {
- super();
- }
-
- /**
- * @see Action#run()
- */
- public void run()
- {
- SystemPerspectiveHelpers.openRSEPerspective();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index a651b5e2c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java
+++ /dev/null
@@ -1,351 +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 java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-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.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemDNDTransferRunnable;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.part.PluginTransferData;
-import org.eclipse.ui.part.ResourceTransfer;
-
-
-/**
- * Paste resources in system clipboard to the selected resource action.
- */
-public class SystemPasteFromClipboardAction extends SystemBaseAction implements IValidatorRemoteSelection
-{
-
-
- private int _srcType;
- private Object _selection;
- private Clipboard _clipboard;
- /**
- * Constructor
- */
- public SystemPasteFromClipboardAction(Shell shell, Clipboard clipboard)
- {
- super(SystemResources.ACTION_PASTE_LABEL,
- PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE),
- //RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_PASTE_ID),
- shell);
- _clipboard = clipboard;
- _srcType = SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE;
- setEnabled(false);
-
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0117"); //$NON-NLS-1$
- }
-
- public void run()
- {
- if (_selection != null)
- {
- pasteClipboardToSelection(_selection);
- }
- }
-
-
- private void pasteClipboardToSelection(Object target)
- {
- List srcObjects = RSEUIPlugin.getTheSystemRegistry().getSystemClipboardObjects(_srcType);
- if (srcObjects.size() > 0)
- {
- // do the transfer
- SystemDNDTransferRunnable runnable = new SystemDNDTransferRunnable(target, (ArrayList)srcObjects, getViewer(), _srcType);
- if (target instanceof IAdaptable)
- {
- ISystemDragDropAdapter targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
-
- if (targetAdapter != null)
- {
- List rulesList = new ArrayList();
- int j = 0;
- for (int i = 0; i < srcObjects.size(); i++)
- {
- if (srcObjects.get(i) instanceof ISchedulingRule)
- {
- rulesList.add(srcObjects.get(i));
- j++;
- }
- /** FIXME - IREmoteFile is systems.core independent now
- else if (srcObjects.get(i) instanceof IRemoteFile)
- {
- rulesList.add(new RemoteFileSchedulingRule((IRemoteFile)srcObjects.get(i)));
- j++;
- }
- **/
- }
- /*
- if (target instanceof ISchedulingRule)
- {
- rulesList.add(target);
- }
- */
- /** FIXME - IREmoteFile is systems.core independent now
- else if (target instanceof IRemoteFile)
- {
- rulesList.add(new RemoteFileSchedulingRule((IRemoteFile)target));
- }
- */
- /*
- else
- {
- rulesList.add(targetSubSystem);
- }
- */
- ISchedulingRule[] rules = (ISchedulingRule[])rulesList.toArray(new ISchedulingRule[rulesList.size()]);
- MultiRule rule = new MultiRule(rules);
- runnable.setRule(rule);
- }
- }
- runnable.schedule();
- RSEUIPlugin.getTheSystemRegistry().clearRunnableContext();
- }
- // clear clipboard
- // _clipboard.setContents(new Object[] { null }, new Transfer[] { PluginTransfer.getInstance()});
- // setEnabled(false);
- }
-
-
- /**
- * The user has selected a remote object. Return null if OK is to be enabled, or a SystemMessage
- * if it is not to be enabled. The message will be displayed on the message line.
- * <p>
- * This is overridden in SystemMoveRemoteFileAction
- */
- public SystemMessage isValid(IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects)
- {
- return null;
- }
-
- public boolean hasSource()
- {
- synchronized (_clipboard)
- {
- try
- {
- Object object = _clipboard.getContents(PluginTransfer.getInstance());
- if (object != null)
- {
- if (object instanceof PluginTransferData)
- {
- PluginTransferData data = (PluginTransferData) object;
- byte[] result = data.getData();
- if (result != null)
- {
- _srcType = SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE;
- return true;
- }
- }
- }
- else
- {
- // clipboard must have resources or files
- ResourceTransfer resTransfer = ResourceTransfer.getInstance();
- object = _clipboard.getContents(resTransfer);
- if (object != null)
- {
- IResource[] resourceData = (IResource[]) object;
- if (resourceData.length > 0)
- {
- _srcType = SystemDNDTransferRunnable.SRC_TYPE_ECLIPSE_RESOURCE;
- return true;
- }
- }
- else
- {
- FileTransfer fileTransfer = FileTransfer.getInstance();
- object = _clipboard.getContents(fileTransfer);
-
- if (object != null)
- {
- String[] fileData = (String[]) object;
- if (fileData.length > 0)
- {
- _srcType = SystemDNDTransferRunnable.SRC_TYPE_OS_RESOURCE;
- return true;
- }
- }
- else
- {
- TextTransfer textTransfer = TextTransfer.getInstance();
- object = _clipboard.getContents(textTransfer);
-
- if (object != null)
- {
- //String textData = (String) object;
- _srcType = SystemDNDTransferRunnable.SRC_TYPE_TEXT;
- return true;
- }
- }
- }
- }
- }
- catch (Exception e)
- {
- }
- }
- return false;
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We simply ensure every selected object is an IRemoteFile
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- if (hasSource())
- {
- boolean enable = true;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof IAdaptable)
- {
- IAdaptable adaptable = (IAdaptable) selectedObject;
- ISystemDragDropAdapter va = (ISystemDragDropAdapter) (adaptable.getAdapter(ISystemDragDropAdapter.class));
- if (va != null)
- {
- enable = va.canDrop(selectedObject);
- /* to allow disable of paste
- * not sure if this is a performance hit or not
- if (enable)
- {
- SubSystem tgtSS = va.getSubSystem(selectedObject);
- List srcObjects = getClipboardObjects();
- if (_srcType == SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE)
- {
-
- for (int i = 0; i < srcObjects.size() && enable; i++)
- {
- Object srcObject = srcObjects.get(i);
- ISystemDragDropAdapter srcAdapter = (ISystemDragDropAdapter)((IAdaptable)srcObject).getAdapter(ISystemDragDropAdapter.class);
- SubSystem srcSS = srcAdapter.getSubSystem(srcObject);
- boolean sameSystem = (srcSS == tgtSS);
- enable = va.validateDrop(srcObject, selectedObject, sameSystem);
- }
- }
- else if (_srcType == SystemDNDTransferRunnable.SRC_TYPE_ECLIPSE_RESOURCE)
- {
- for (int i = 0; i < srcObjects.size() && enable; i++)
- {
- Object srcObject = srcObjects.get(i);
- boolean sameSystem = false;
- enable = va.validateDrop(srcObject, selectedObject, sameSystem);
- }
- }
- else if (_srcType == SystemDNDTransferRunnable.SRC_TYPE_OS_RESOURCE)
- {
- for (int i = 0; i < srcObjects.size() && enable; i++)
- {
- Object srcObject = srcObjects.get(i);
- boolean sameSystem = false;
- enable = va.validateDrop(srcObject, selectedObject, sameSystem);
- }
- }
-
- }
- */
- }
- else
- {
- enable = false;
- }
- }
- else
- {
- enable = false;
- }
- }
- if (enable)
- {
- _selection = selection.getFirstElement();
- }
- return enable;
- }
- else
- {
- return false;
- }
-
- }
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
- else
- {
- /*
- // for other cases, use statusbar
- IWorkbenchWindow win = RSEUIPlugin.getActiveWorkbenchWindow();
- if (win != null)
- {
- Shell winShell = RSEUIPlugin.getActiveWorkbenchShell();
- if (winShell != null && !winShell.isDisposed() && winShell.isVisible())
- {
- RSEUIPlugin.logInfo("Using active workbench window as runnable context");
- shell = winShell;
- return win;
- }
- else
- {
- win = null;
- }
- }
- */
-
- irc = new ProgressMonitorDialog(shell);
- 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/actions/SystemPreferenceQualifyConnectionNamesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java
deleted file mode 100644
index 6eef06447..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java
+++ /dev/null
@@ -1,73 +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.rse.core.model.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action is a shortcut to the preferences setting for showing connection names
- * qualified by profile name.
- */
-public class SystemPreferenceQualifyConnectionNamesAction extends SystemBaseAction
-
-{
-
- private ISystemRegistry sr = null;
- /**
- * Constructor
- */
- public SystemPreferenceQualifyConnectionNamesAction(Shell parent)
- {
- super(SystemResources.ACTION_QUALIFY_CONNECTION_NAMES_LABEL,SystemResources.ACTION_QUALIFY_CONNECTION_NAMES_TOOLTIP,
- parent);
- setSelectionSensitive(false);
- allowOnMultipleSelection(true);
- sr = RSEUIPlugin.getTheSystemRegistry();
- setChecked(sr.getQualifiedHostNames());
-
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0008"); //$NON-NLS-1$
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- boolean newState = isChecked();
- sr.setQualifiedHostNames(newState);
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_QUALIFYCONNECTIONNAMES,
- !newState,newState); // defect 41794
- }
-
- /**
- * Fire a preference change event
- */
- private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue)
- {
- RSEUIPlugin.getDefault().getSystemRegistry().fireEvent(
- new SystemPreferenceChangeEvent(type,
- oldValue ? Boolean.TRUE : Boolean.FALSE,
- newValue ? Boolean.TRUE : Boolean.FALSE));
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 273b65d49..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java
+++ /dev/null
@@ -1,70 +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.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action is a shortcut to the preferences setting for restoring the RSE to its
- * previous state.
- */
-public class SystemPreferenceRestoreStateAction extends SystemBaseAction
-{
- //private ISystemRegistry sr = null;
-
- /**
- * Constructor
- */
- public SystemPreferenceRestoreStateAction(Shell parent)
- {
- super(SystemResources.ACTION_RESTORE_STATE_PREFERENCE_LABEL,SystemResources.ACTION_RESTORE_STATE_PREFERENCE_TOOLTIP, parent);
- setSelectionSensitive(false);
- allowOnMultipleSelection(true);
- //sr = RSEUIPlugin.getTheSystemRegistry();
- setChecked(SystemPreferencesManager.getPreferencesManager().getRememberState());
-
- setHelp(RSEUIPlugin.HELPPREFIX+"aprefres"); //$NON-NLS-1$
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- boolean newState = isChecked();
- SystemPreferencesManager.getPreferencesManager().setRememberState(newState);
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_RESTORESTATE,
- !newState,newState);
- }
-
- /**
- * Fire a preference change event
- */
- private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue)
- {
- RSEUIPlugin.getDefault().getSystemRegistry().fireEvent(
- new SystemPreferenceChangeEvent(type,
- oldValue ? Boolean.TRUE : Boolean.FALSE,
- newValue ? Boolean.TRUE : Boolean.FALSE));
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 8b05c418e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java
+++ /dev/null
@@ -1,72 +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.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action allows users to decide whether or not to show filter pools in the Remote System Explorer.
- * It is a fastpath/convenience method for this option in the preferences page.
- */
-public class SystemPreferenceShowFilterPoolsAction extends SystemBaseAction
-
-{
-
- //private SystemRegistry sr = null;
- /**
- * Constructor
- */
- public SystemPreferenceShowFilterPoolsAction(Shell parent)
- {
- super(SystemResources.ACTION_PREFERENCE_SHOW_FILTERPOOLS_LABEL,SystemResources.ACTION_PREFERENCE_SHOW_FILTERPOOLS_TOOLTIP,
- parent);
- allowOnMultipleSelection(true);
- setChecked(SystemPreferencesManager.getPreferencesManager().getShowFilterPools());
- setSelectionSensitive(false);
-
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0011"); //$NON-NLS-1$
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- boolean newState = isChecked();
- SystemPreferencesManager.getPreferencesManager().setShowFilterPools(newState);
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_SHOWFILTERPOOLS,
- !newState,newState); // defect 41794
- }
-
- /**
- * Fire a preference change event
- */
- private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue)
- {
- RSEUIPlugin.getDefault().getSystemRegistry().fireEvent(
- new SystemPreferenceChangeEvent(type,
- oldValue ? Boolean.TRUE : Boolean.FALSE,
- newValue ? Boolean.TRUE : Boolean.FALSE));
- }
-
-} \ 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
deleted file mode 100644
index 9006af65f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameCopyAction.java
+++ /dev/null
@@ -1,219 +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.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-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.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.model.SystemRegistry;
-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;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * A copy profile action. Will copy the profile, and all connections for the profile.
- * We must first prompt user for a new name for the copied profile.
- */
-public class SystemProfileNameCopyAction extends SystemBaseDialogAction
- implements IRunnableWithProgress
-{
- private ISystemProfile profile, newProfile;
- //private ISystemProfileManager mgr;
- private ISystemRegistry sr;
- private String oldName,newName;
- private boolean makeActive;
- private Exception runException = null;
-
- /**
- * Constructor for selection-sensitive popup menu for profiles in Team view.
- */
- public SystemProfileNameCopyAction(Shell shell)
- {
- super(SystemResources.ACTION_PROFILE_COPY_LABEL, SystemResources.ACTION_PROFILE_COPY_TOOLTIP,
- PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY),
- shell);
- //mgr = SystemProfileManager.getSystemProfileManager();
- sr = RSEUIPlugin.getTheSystemRegistry();
- setSelectionSensitive(true);
- allowOnMultipleSelection(false);
- setHelp(RSEUIPlugin.HELPPREFIX+"actndupr"); //$NON-NLS-1$
- }
-
- /**
- * Set the profile
- */
- public void setProfile(ISystemProfile profile)
- {
- this.profile = profile;
- }
-
- /**
- * Override of parent
- * @see #run()
- */
- protected Dialog createDialog(Shell parent)
- {
- return new SystemCopyProfileDialog(parent, profile);
- }
-
- /**
- * Required by parent. We use it to return the new name
- */
- protected Object getDialogValue(Dialog dlg)
- {
- newName = null;
- SystemCopyProfileDialog rnmDlg = (SystemCopyProfileDialog)dlg;
- if (!rnmDlg.wasCancelled())
- {
- oldName = profile.getName();
- newName = rnmDlg.getNewName();
- makeActive = rnmDlg.getMakeActive();
- IRunnableContext runnableContext = getRunnableContext();
- try
- {
- runnableContext.run(false,false,this); // inthread, cancellable, IRunnableWithProgress
- if (makeActive && (newProfile!=null))
- sr.setSystemProfileActive(newProfile, true);
- }
- catch (java.lang.reflect.InvocationTargetException exc) // unexpected error
- {
- showOperationMessage(exc, getShell());
- //throw (Exception) exc.getTargetException();
- }
- catch (Exception exc)
- {
- showOperationMessage(exc, getShell());
- //throw exc;
- }
- }
- return newName;
- }
- /**
- * Get an IRunnable context to show progress in. If there is currently a dialog or wizard up with
- * a progress monitor in it, we will use this, else we will create a progress monitor dialog.
- */
- protected IRunnableContext getRunnableContext()
- {
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IRunnableContext irc = sr.getRunnableContext();
- if (irc == null)
- irc = new ProgressMonitorDialog(getShell());
- return irc;
- }
-
-
- // ----------------------------------
- // INTERNAL METHODS...
- // ----------------------------------
- /**
- * Method required by IRunnableWithProgress interface.
- * Allows execution of a long-running operation modally by via a thread.
- * In our case, it runs the copy operation with a visible progress monitor
- */
- public void run(IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- String msg = getCopyingMessage(oldName,newName);
- runException = null;
-
- try
- {
- int steps = 0;
- IHost[] conns = sr.getHostsByProfile(profile);
- if ((conns != null) && (conns.length > 0))
- steps = conns.length;
- steps += 2; // for filterpools and subsystems
- monitor.beginTask(msg, steps);
- newProfile = sr.copySystemProfile(monitor, profile,newName,makeActive);
- monitor.done();
- }
- catch(java.lang.InterruptedException exc)
- {
- monitor.done();
- runException = exc;
- throw (java.lang.InterruptedException)runException;
- }
- catch(Exception exc)
- {
- monitor.done();
- runException = new java.lang.reflect.InvocationTargetException(exc);
- throw (java.lang.reflect.InvocationTargetException)runException;
- }
-
- }
-
-
- /**
- * Helper method to return the message "Copying &1 to &2..."
- */
- public static String getCopyingMessage(String oldName, String newName)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS);
- msg.makeSubstitution(oldName,newName);
- return msg.getLevelOneText();
- }
-
- /**
- * Helper method to show an error message resulting from the attempted operation.
- */
- protected void showOperationMessage(Exception exc, Shell shell)
- {
- if (exc instanceof java.lang.InterruptedException)
- showOperationCancelledMessage(shell);
- else if (exc instanceof java.lang.reflect.InvocationTargetException)
- showOperationErrorMessage(shell, ((java.lang.reflect.InvocationTargetException)exc).getTargetException());
- else
- showOperationErrorMessage(shell, exc);
- }
-
- /**
- * Show an error message when the operation fails.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showOperationErrorMessage(Shell shell, Throwable exc)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED).makeSubstitution(exc.getMessage()));
- msgDlg.open();
- SystemBasePlugin.logError("Copy profile operation failed",exc); //$NON-NLS-1$
- }
- /**
- * Show an error message when the user cancels the operation.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showOperationCancelledMessage(Shell shell)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED));
- msgDlg.open();
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index b72123062..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameSelectAction.java
+++ /dev/null
@@ -1,57 +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.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * A selectable profile name action.
- */
-public class SystemProfileNameSelectAction extends SystemBaseAction
-{
- private ISystemProfile profile;
-
- /**
- * Constructor
- */
- public SystemProfileNameSelectAction(Shell parent, ISystemProfile profile)
- {
- super(profile.getName(),parent);
- this.profile = profile;
- ISystemProfileManager mgr = SystemProfileManager.getSystemProfileManager();
- setChecked(mgr.isSystemProfileActive(profile.getName()));
- setSelectionSensitive(false);
-
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0004"); //$NON-NLS-1$
- }
-
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- 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
deleted file mode 100644
index e6ebc854d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java
+++ /dev/null
@@ -1,120 +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:
- * Michael Berger (IBM) - 146339 Added refresh action graphic.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.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.ISystemViewElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action allows users to refresh the selected node in the Remote System Explorer tree view
- */
-public class SystemRefreshAction extends SystemBaseAction
- //
-{
- private IStructuredSelection _selection = null;
-
- /**
- * Constructor
- */
- public SystemRefreshAction(Shell parent)
- {
- super(SystemResources.ACTION_REFRESH_LABEL, SystemResources.ACTION_REFRESH_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_REFRESH_ID), // D54577
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_BUILD);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0017"); //$NON-NLS-1$
- setAvailableOffline(true);
- }
-
- /**
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- _selection = selection;
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- if (_selection != null)
- {
- Vector parents = new Vector();
-
- Iterator iter = _selection.iterator();
-
- while(iter.hasNext())
- {
- Object obj = iter.next();
-
- if (obj instanceof ISystemContainer)
- {
- ((ISystemContainer)obj).markStale(true);
- }
-
- // get the adapter and find out if it's a leaf node. If so, refresh the parent as well.
- ISystemViewElementAdapter adapter = getAdapter(obj);
-
- if (adapter != null) {
- Object parent = adapter.getParent(obj);
- boolean hasChildren = adapter.hasChildren(obj);
-
- if ((parent != null) && !hasChildren && (!parents.contains(parent))) {
- parents.add(parent);
- sr.fireEvent(new SystemResourceChangeEvent(parent, ISystemResourceChangeEvents.EVENT_REFRESH, parent));
- }
-
- sr.fireEvent(new SystemResourceChangeEvent(obj, ISystemResourceChangeEvents.EVENT_REFRESH, obj));
- }
- else {
- sr.fireEvent(new SystemResourceChangeEvent(obj, ISystemResourceChangeEvents.EVENT_REFRESH, obj));
- }
- }
- }
- else
- {
- if ((viewer != null) && (viewer instanceof ISystemResourceChangeListener))
- {
- sr.fireEvent((ISystemResourceChangeListener)viewer,
- new SystemResourceChangeEvent(sr,
- ISystemResourceChangeEvents.EVENT_REFRESH_SELECTED, null));
- }
- else
- sr.fireEvent(new SystemResourceChangeEvent(sr, ISystemResourceChangeEvents.EVENT_REFRESH_SELECTED, null));
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ed8c5325c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAllAction.java
+++ /dev/null
@@ -1,102 +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 java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-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;
-
-
-/**
- * The action allows users to refresh the entire Remote System Explorer tree view
- */
-public class SystemRefreshAllAction extends SystemBaseAction
-
-{
-
- //private SystemProfile prevProfile = null;
- private IStructuredSelection _selection = null;
- private Object _rootObject = null;
-
- /**
- * Constructor for SystemRefreshAllAction
- */
- public SystemRefreshAllAction(Shell parent)
- {
- super(SystemResources.ACTION_REFRESH_ALL_LABEL,SystemResources.ACTION_REFRESH_ALL_TOOLTIP,
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_BUILD);
- //setSelectionSensitive(false);
- setSelectionSensitive(true);// use selection to decide what to invalidate
-
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0009"); //$NON-NLS-1$
- }
-
- public void setRootObject(Object object)
- {
- _rootObject = object;
- }
-
- /**
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- _selection = selection;
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- if (_selection != null)
- {
- // mark all selected objects as stale if applicable
- Iterator iter = _selection.iterator();
- while(iter.hasNext())
- {
- Object obj = iter.next();
-
- if (obj instanceof ISystemContainer)
- {
- ((ISystemContainer)obj).markStale(true);
- }
- }
- }
- if (_rootObject != null)
- {
- if (_rootObject instanceof ISystemContainer)
- {
- ((ISystemContainer)_rootObject).markStale(true);
- }
- }
- SystemRegistry 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/SystemRemotePropertiesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemotePropertiesAction.java
deleted file mode 100644
index 3884eabc7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemotePropertiesAction.java
+++ /dev/null
@@ -1,162 +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 java.text.MessageFormat;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.PreferenceManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemPropertyPageExtensionManager;
-import org.eclipse.rse.ui.GenericMessages;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.dialogs.PropertyDialog;
-import org.eclipse.ui.internal.dialogs.PropertyPageManager;
-
-
-/**
- * The action shows properties for remote objects
- */
-public class SystemRemotePropertiesAction
- extends SystemBaseAction
-
-{
-
- /**
- * Constructor
- */
- public SystemRemotePropertiesAction(Shell shell)
- {
- super(SystemResources.ACTION_REMOTE_PROPERTIES_LABEL, SystemResources.ACTION_REMOTE_PROPERTIES_TOOLTIP,shell);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_PROPERTIES);
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * It is too expense to check for registered property pages at popup time, so we just return true.
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- return enable;
- }
-
- /**
- * Returns the name of the given element.
- * @param element the element
- * @return the name of the element
- */
- private String getName(Object element)
- {
- return getAdapter(element).getName(element);
- }
- /**
- * Returns whether the provided object has pages registered in the property page
- * manager.
- */
- public boolean hasPropertyPagesFor(Object object)
- {
- //PropertyPageContributorManager manager = PropertyPageContributorManager.getManager();
- return getOurPropertyPageManager().hasContributorsFor(getRemoteAdapter(object), object);
- }
- /**
- * Get the remote property page extension manager
- */
- private SystemPropertyPageExtensionManager getOurPropertyPageManager()
- {
- return SystemPropertyPageExtensionManager.getManager();
- }
- /**
- * Returns whether this action is actually applicable to the current selection.
- * Returns true if there are any registered property pages applicable for the
- * given input object.
- * <p>
- * This method is generally too expensive to use when updating the enabled state
- * of the action.
- * </p>
- *
- * @return <code>true</code> if there are property pages for the currently
- * selected element, and <code>false</code> otherwise
- */
- public boolean isApplicableForSelection()
- {
- return hasPropertyPagesFor(getFirstSelection());
- }
- /**
- * The <code>PropertyDialogAction</code> implementation of this
- * <code>IAction</code> method performs the action by opening the Property Page
- * Dialog for the current selection. If no pages are found, an informative
- * message dialog is presented instead.
- */
- public void run()
- {
- PropertyPageManager pageManager = new PropertyPageManager();
- String title = "";//$NON-NLS-1$
-
- // get selection
- //Object element = getFirstSelection();
- IAdaptable element = (IAdaptable)getFirstSelection();
- if (element == null)
- return;
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(element);
- if (adapter == null)
- return;
-
- // load pages for the selection
- // fill the manager with contributions from the matching contributors
- getOurPropertyPageManager().contribute(pageManager, getRemoteAdapter(element), element);
- //PropertyPageContributorManager.getManager().contribute(pageManager, element);
-
- Shell shell = getShell();
-
- // testing if there are pages in the manager
- Iterator pages = pageManager.getElements(PreferenceManager.PRE_ORDER).iterator();
- String name = getName(element);
- if (!pages.hasNext()) {
- MessageDialog.openInformation(
- shell,
- GenericMessages.PropertyDialog_messageTitle,
- MessageFormat.format(GenericMessages.PropertyDialog_noPropertyMessage, new Object[] {name}));
- return;
- }
- else
- {
- title = MessageFormat.format(GenericMessages.PropertyDialog_propertyMessage, new Object[] {name});
- }
-
- PropertyDialog propertyDialog = new PropertyDialog(shell, pageManager, getSelection());
- propertyDialog.create();
- propertyDialog.getShell().setText(title);
-
-
-
- // TODO - hack to make this work in 3.1
- String id = PlatformUI.PLUGIN_ID + ".property_dialog_context"; //$NON-NLS-1$
- PlatformUI.getWorkbench().getHelpSystem().setHelp(propertyDialog.getShell(), id);
-
- propertyDialog.open();
- }
-} \ 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
deleted file mode 100644
index 66a7f1e25..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStartAction.java
+++ /dev/null
@@ -1,57 +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.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * This is the "Start" action that shows up under a remote server action
- * within the Remote Servers cascading menu.
- */
-public class SystemRemoteServerStartAction extends SystemBaseAction
-{
- private SystemCascadingRemoteServerBaseAction parentAction;
-
- /**
- * Constructor.
- * @param shell Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- * @param parentAction The action that cascades into this action.
- */
- public SystemRemoteServerStartAction(Shell shell, SystemCascadingRemoteServerBaseAction parentAction)
- {
- super(SystemResources.ACTION_REMOTESERVER_START_LABEL,SystemResources.ACTION_REMOTESERVER_START_TOOLTIP, shell);
- this.parentAction = parentAction;
- allowOnMultipleSelection(false);
- //setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- setHelp(RSEUIPlugin.HELPPREFIX+"actnstsv"); //$NON-NLS-1$
- }
-
- /**
- * Called when this action is selection from the popup menu.
- * Calls {@link SystemCascadingRemoteServerBaseAction#startServer()} in the parent action.
- */
- public void run()
- {
- boolean ok = parentAction.startServer();
- setEnabled(!ok);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 10021ce3a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStopAction.java
+++ /dev/null
@@ -1,57 +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.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * This is the "Stop" action that shows up under a remote server action
- * within the Remote Servers cascading menu.
- */
-public class SystemRemoteServerStopAction extends SystemBaseAction
-{
- private SystemCascadingRemoteServerBaseAction parentAction;
-
- /**
- * Constructor.
- * @param shell Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- * @param parentAction The action that cascades into this action.
- */
- public SystemRemoteServerStopAction(Shell shell, SystemCascadingRemoteServerBaseAction parentAction)
- {
- super(SystemResources.ACTION_REMOTESERVER_STOP_LABEL,SystemResources.ACTION_REMOTESERVER_STOP_TOOLTIP, shell);
- this.parentAction = parentAction;
- allowOnMultipleSelection(false);
- //setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- setHelp(RSEUIPlugin.HELPPREFIX+"actnspsv"); //$NON-NLS-1$
- }
-
- /**
- * Called when this action is selection from the popup menu.
- * Calls {@link SystemCascadingRemoteServerBaseAction#stopServer()} in the parent action.
- */
- public void run()
- {
- boolean ok = parentAction.stopServer();
- setEnabled(!ok);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemResolveFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemResolveFilterStringAction.java
deleted file mode 100644
index 823d68187..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemResolveFilterStringAction.java
+++ /dev/null
@@ -1,76 +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.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.dialogs.SystemResolveFilterStringDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action for testing a given filter string by resolving it and showing the resolve results
- */
-public class SystemResolveFilterStringAction extends SystemTestFilterStringAction
-{
-
-
- /**
- * Constructor when input subsystem and filter string are known already
- */
- public SystemResolveFilterStringAction(Shell shell, ISubSystem subsystem, String filterString)
- {
- super(shell, subsystem, filterString);
- }
-
- /**
- * Constructor when input subsystem and filter string are not known already.
- * @see #setSubSystem(ISubSystem)
- * @see #setFilterString(String)
- */
- public SystemResolveFilterStringAction(Shell shell)
- {
- super(shell);
- }
-
-
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to create and return
- * the dialog that is displayed by the default run method
- * implementation.
- * <p>
- * If you override run with your own, then
- * simply implement this to return null as it won't be used.
- * @see #run()
- */
- protected Dialog createDialog(Shell shell)
- {
- dlg = new SystemResolveFilterStringDialog(shell, subsystem, filterString);
-
- return dlg;
- } // end createDialog()
-
- /**
- * Return selected object. If multiple objects are selected,
- * returns the first selected object.
- */
- public Object getSelectedObject()
- {
- return getValue();
- }
-
-} // end class SystemResolveFilterStringAction \ No newline at end of file
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
deleted file mode 100644
index 71845957a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRunAction.java
+++ /dev/null
@@ -1,94 +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.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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;
-
-
-/**
- * The action is for any object that wants a "Run" action in their popup menu.
- * The object must support the ISystemViewRunnableObject interface.
- */
-public class SystemRunAction extends SystemBaseAction
-
-{
-
- /**
- * Constructor.
- */
- public SystemRunAction(Shell shell)
- {
- this(SystemResources.ACTION_RUN_LABEL, SystemResources.ACTION_RUN_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_RUN_ID),
- shell);
- }
-
-
- /**
- * Constructor.
- * @param label
- * @param tooltip
- * @param image the image.
- * @param shell the parent shell.
- */
- public SystemRunAction(String label, String tooltip, ImageDescriptor image, Shell shell)
- {
- super(label, tooltip, image, shell);
- init();
- }
-
- /**
- * Initialize.
- */
- protected void init() {
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPEN);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0100"); //$NON-NLS-1$
- }
-
-
- /**
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- Object selectedObject = getFirstSelection();
- if ((selectedObject == null) || !(selectedObject instanceof ISystemViewRunnableObject))
- enable = false;
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- Object selectedObject = getFirstSelection();
- if ((selectedObject == null) || !(selectedObject instanceof ISystemViewRunnableObject))
- return;
- ISystemViewRunnableObject runnable = (ISystemViewRunnableObject)selectedObject;
- runnable.run(getShell());
- }
-} \ No newline at end of file
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
deleted file mode 100644
index afbd16558..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSelectConnectionAction.java
+++ /dev/null
@@ -1,187 +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.rse.core.model.IHost;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemSelectConnectionDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Use this action to put up a dialog allowing users to select one or
- * more connections.
- */
-public class SystemSelectConnectionAction extends SystemBaseDialogAction
-{
- private boolean multiSelect;
- private boolean showPropertySheetInitialState;
- private boolean showPropertySheet;
- private String message;
- private boolean showNewConnectionPrompt = true;
- private String[] systemTypes;
- private String systemType;
- private IHost defaultConn;
- private Object result;
-
- /**
- * Constructor
- */
- public SystemSelectConnectionAction(Shell shell)
- {
- super(SystemResources.ACTION_SELECTCONNECTION_LABEL, SystemResources.ACTION_SELECTCONNECTION_TOOLTIP,null, shell);
- }
-
- /**
- * Set the connection to default the selection to
- */
- public void setDefaultConnection(IHost conn)
- {
- this.defaultConn = conn;
- }
- /**
- * 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.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * 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.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- this.systemType = systemType;
- }
- /**
- * Set to true/false if a "New Connection..." special connection is to be shown for creating new connections.
- * Defaault is true.
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- this.showNewConnectionPrompt = show;
- }
- /**
- * Set the label text shown at the top of the dialog
- */
- public void setInstructionLabel(String message)
- {
- this.message = message;
- }
-
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload always shows the property sheet
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- this.showPropertySheet = show;
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload shows a Details>>> button so the user can decide if they want to see the
- * property sheet.
- * <p>
- * @param show True if show the property sheet within the dialog
- * @param initialState True if the property is to be initially displayed, false if it is not
- * to be displayed until the user presses the Details button.
- */
- public void setShowPropertySheet(boolean show, boolean initialState)
- {
- this.showPropertySheet = show;
- this.showPropertySheetInitialState = initialState;
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedObjects()
- * method to retrieve the list of selected objects.
- * <p>
- * Further, if you turn this on, it has the side effect of allowing the user
- * to select any remote object. The assumption being if you are prompting for
- * files, you also want to allow the user to select a folder, with the meaning
- * being that all files within the folder are implicitly selected.
- *
- * @see #getSelectedObjects()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- this.multiSelect = multiple;
- }
-
- /**
- * Return the selected connection in single select mode
- */
- public IHost getSystemConnection()
- {
- if (result instanceof IHost)
- return (IHost)result;
- else if (result instanceof IHost[])
- return ((IHost[])result)[0];
- else
- return null;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.actions.SystemBaseDialogAction#createDialog(org.eclipse.swt.widgets.Shell)
- */
- protected Dialog createDialog(Shell shell)
- {
- SystemSelectConnectionDialog selectDlg = new SystemSelectConnectionDialog(shell);
- if (defaultConn != null)
- selectDlg.setDefaultConnection(defaultConn);
- if (systemTypes != null)
- selectDlg.setSystemTypes(systemTypes);
- else if (systemType != null)
- selectDlg.setSystemType(systemType);
- selectDlg.setShowNewConnectionPrompt(showNewConnectionPrompt);
- if (message != null)
- selectDlg.setInstructionLabel(message);
- if (showPropertySheet)
- selectDlg.setShowPropertySheet(showPropertySheet,showPropertySheetInitialState);
- selectDlg.setMultipleSelectionMode(multiSelect);
- return selectDlg;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.actions.SystemBaseDialogAction#getDialogValue(org.eclipse.jface.dialogs.Dialog)
- */
- protected Object getDialogValue(Dialog dlg)
- {
- SystemSelectConnectionDialog selectDlg = (SystemSelectConnectionDialog)dlg;
- result = selectDlg.getOutputObject();
- return result;
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSeparatorAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSeparatorAction.java
deleted file mode 100644
index 701433d63..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSeparatorAction.java
+++ /dev/null
@@ -1,58 +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.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.widgets.Shell;
-/**
- * Dummy action representing a separator in menus.
- */
-public class SystemSeparatorAction extends SystemBaseAction
-{
- private boolean realAction;
-
- /**
- * Constructor for SystemSeparatorAction when you intend to subclass
- */
- public SystemSeparatorAction(Shell parent)
- {
- super("_separator_",(ImageDescriptor)null,parent); //$NON-NLS-1$
- realAction = true;
- }
- /**
- * Constructor for SystemSeparatorAction when you just want the separator
- */
- public SystemSeparatorAction()
- {
- super("_separator_",(ImageDescriptor)null,null); //$NON-NLS-1$
- realAction = false;
- }
-
- public Separator getSeparator()
- {
- return new Separator();
- }
-
- /**
- * Return true if this is both a separator and a real action, false if this is only
- * a separator
- */
- public boolean isRealAction()
- {
- return realAction;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 15c80ad13..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInMonitorAction.java
+++ /dev/null
@@ -1,103 +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 java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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;
-import org.eclipse.rse.ui.view.monitor.SystemMonitorViewPart;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * This is the default action for showing a remote object in a table
- */
-public class SystemShowInMonitorAction extends SystemBaseAction
-{
- private Object _selected;
-
- /**
- * Constructor.
- * @param shell Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- */
- public SystemShowInMonitorAction(Shell parent)
- {
- super(SystemResources.ACTION_MONITOR_LABEL,
- SystemResources.ACTION_MONITOR_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHOW_MONITOR_ID),
- parent);
- setAvailableOffline(true);
- }
-
- /**
- * Called when this action is selected from the popup menu.
- */
- public void run()
- {
- SystemMonitorViewPart viewPart = null;
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- try
- {
- viewPart = (SystemMonitorViewPart) page.showView(SystemMonitorUI.MONITOR_VIEW_ID, null, IWorkbenchPage.VIEW_CREATE);
- }
- catch (PartInitException e)
- {
- return;
- }
- catch (Exception e)
- {
- return;
- }
-
- viewPart.addItemToMonitor((IAdaptable) _selected);
- page.activate(viewPart);
-
- }
-
- /**
- * Called when the selection changes. The selection is checked to
- * make sure this action can be performed on the selected object.
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = false;
- Iterator e = selection.iterator();
- Object selected = e.next();
-
- if (selected != null && selected instanceof IAdaptable)
- {
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) ((IAdaptable) selected).getAdapter(ISystemViewElementAdapter.class);
- if (va.hasChildren(selected))
- {
- _selected = selected;
- enable = true;
- }
- }
-
- return enable;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 9d2f64159..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInTableAction.java
+++ /dev/null
@@ -1,102 +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 java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * This is the default action for showing a remote object in a table
- */
-public class SystemShowInTableAction extends SystemBaseAction
-{
- private Object _selected;
-
- /**
- * Constructor.
- * @param shell Shell of parent window, used as the parent for the dialog.
- * Can be null, but be sure to call setParent before the action is used (ie, run).
- */
- public SystemShowInTableAction(Shell parent)
- {
- super(SystemResources.ACTION_TABLE_LABEL,
- SystemResources.ACTION_TABLE_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHOW_TABLE_ID),
- parent);
- setAvailableOffline(true);
- }
-
- /**
- * Called when this action is selected from the popup menu.
- */
- public void run()
- {
- SystemTableViewPart viewPart = null;
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- try
- {
- viewPart = (SystemTableViewPart) page.showView("org.eclipse.rse.ui.view.systemTableView", null, IWorkbenchPage.VIEW_CREATE); //$NON-NLS-1$
- }
- catch (PartInitException e)
- {
- return;
- }
- catch (Exception e)
- {
- return;
- }
-
- viewPart.setInput((IAdaptable) _selected);
- page.activate(viewPart);
-
- }
-
- /**
- * Called when the selection changes. The selection is checked to
- * make sure this action can be performed on the selected object.
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = false;
- Iterator e = selection.iterator();
- Object selected = e.next();
-
- if (selected != null && selected instanceof IAdaptable)
- {
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) ((IAdaptable) selected).getAdapter(ISystemViewElementAdapter.class);
- if (va.hasChildren(selected))
- {
- _selected = selected;
- enable = true;
- }
- }
-
- return enable;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 33df3805a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowPreferencesPageAction.java
+++ /dev/null
@@ -1,219 +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 java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.action.IAction;
-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.ui.RSEUIPlugin;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog;
-
-
-
-/**
- * This action will launch the Prefences dialog, but only rooted at a given
- * preference page (it will include its children underneath), including the
- * child pages registered under that page ("category").
- * <p>
- * This is used by the org.eclipse.rse.core.remoteSystemsViewPreferencesActions
- * extension point.
- * @see org.eclipse.rse.ui.actions.SystemCascadingPreferencesAction
- */
-/**
- * @author kmunir
- *
- */
-public class SystemShowPreferencesPageAction extends SystemBaseAction implements IViewActionDelegate
-{
-
- private PreferenceManager preferenceManager;
- private String[] preferencePageIDs;
- private String preferencePageCategory;
-
- /**
- * Constructor. We are instantiated inside {@link RSEUIPlugin#getShowPreferencePageActions()}
- * for each extension of our extension point <code>org.eclipse.rse.core.remoteSystemsViewPreferencesActions</code>
- */
- public SystemShowPreferencesPageAction()
- {
- super("temp label", null); //$NON-NLS-1$
- }
-
- /**
- * Set ID of the preference root page to show.
- * @param preferencePageID The ID of the preference page root to show. All child nodes will also be shown.
- */
- public void setPreferencePageID(String preferencePageID)
- {
- setPreferencePageID(new String[] {preferencePageID});
- }
- /**
- * Set IDs of the preference root pages to show.
- * @param preferencePageIDs The IDs of the preference page roots to show. All child nodes will also be shown.
- */
- public void setPreferencePageID(String[] preferencePageIDs)
- {
- allowOnMultipleSelection(false);
- setSelectionSensitive(false);
- this.preferencePageIDs = preferencePageIDs;
- }
- /**
- * Set the category of the pages to be shown. This only needs to be called
- * for non-root pages. Note that the ID to give here is not of the immediate
- * parent, but that of the root parent. It tells us which root subtree to
- * search for the given page(s).
- */
- public void setPreferencePageCategory(String preferencePageCategory)
- {
- this.preferencePageCategory = preferencePageCategory;
- }
-
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view)
- {
- setShell(view.getSite().getShell());
- }
-
-
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action)
- {
- run();
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection)
- {
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- // Bring up the preferences page
- /*
- PreferenceManager prefMgr = new PreferenceManager();
- prefMgr.addToRoot(new PreferenceNode("tempid", new RemoteSystemsPreferencePage()));
- PreferenceDialog dialog = new PreferenceDialog(shell, prefMgr);
- dialog.open();
- */
- PreferenceManager pm = getPreferenceManager();
-
- if (pm != null)
- {
- PreferenceDialog d = new WorkbenchPreferenceDialog(shell, pm);
- d.create();
- // TODO - hack to make this work in 3.1
- String id = PlatformUI.PLUGIN_ID + ".preference_dialog_context"; //$NON-NLS-1$
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(d.getShell(), id);
- d.open();
- }
- }
- /*
- * Get the preference manager.
- */
- public PreferenceManager getPreferenceManager()
- {
- if (preferenceManager == null)
- {
- preferenceManager = new PreferenceManager('/');
-
- //Get the pages from the registry
- //PreferencePageRegistryReader registryReader = new PreferencePageRegistryReader(PlatformUI.getWorkbench());
-
- //List pageContributions = registryReader.getPreferenceContributions(Platform.getExtensionRegistry());
-
- PreferenceManager workbenchMgr = PlatformUI.getWorkbench().getPreferenceManager();
-
- List pageContributions = workbenchMgr.getElements(PreferenceManager.POST_ORDER);
-
-
-
- //Add the contributions to the manager
- Iterator iter = pageContributions.iterator();
- while (iter.hasNext())
- {
- IPreferenceNode prefNode = (IPreferenceNode) iter.next();
- //System.out.println("prefNode.getId() == "+prefNode.getId());
- //System.out.println(" getLabelText() == "+prefNode.getLabelText());
- boolean match = false;
- String prefNodeID = prefNode.getId();
- if (preferencePageCategory == null)
- {
- match = testForMatch(prefNodeID);
- }
- else if (prefNodeID.equals(preferencePageCategory))
- {
- //System.out.println("Made it here");
- prefNode = searchForSubPage(prefNode, prefNodeID);
- if (prefNode != null)
- match = true;
- }
- if (match)
- preferenceManager.addToRoot(prefNode);
- }
-
- }
- return preferenceManager;
- }
-
- private IPreferenceNode searchForSubPage(IPreferenceNode parent, String prefNodeID)
- {
- IPreferenceNode match = null;
-
- IPreferenceNode[] subNodes = parent.getSubNodes();
- if (subNodes!=null)
- for (int idx=0; (match==null) && (idx<subNodes.length); idx++)
- {
- if (testForMatch(subNodes[idx].getId()))
- match = subNodes[idx];
- else
- match = searchForSubPage(subNodes[idx], prefNodeID);
- }
-
- return match;
- }
-
- private boolean testForMatch(String prefNodeID)
- {
- boolean match = false;
- for (int idx=0; !match && (idx<preferencePageIDs.length); idx++)
- {
- if (prefNodeID.equals(preferencePageIDs[idx]))
- match = true;
- }
- return match;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 3429dbbc9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStartCommunicationsDaemonAction.java
+++ /dev/null
@@ -1,92 +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.action.IAction;
-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;
-
-
-/**
- * Action to start and stop RSE communications daemon
- */
-public class SystemStartCommunicationsDaemonAction extends SystemBaseAction implements IAction
-{
-
- /**
- * Constructor
- *
- * @param shell
- */
- public SystemStartCommunicationsDaemonAction(Shell shell)
- {
- super(SystemResources.ACTION_DAEMON_STOP_LABEL,
- SystemResources.ACTION_DAEMON_STOP_TOOLTIP,
- shell);
-
- setHelp(RSEUIPlugin.HELPPREFIX + "dmna0000"); //$NON-NLS-1$
-
- if (!SystemCommunicationsDaemon.isAutoStart() || !SystemCommunicationsDaemon.getInstance().isRunning())
- {
- setActionLabelToStart();
- }
-
- SystemCommunicationsDaemon.setAction(this);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- SystemCommunicationsDaemon daemon = SystemCommunicationsDaemon.getInstance();
- if (daemon.isRunning())
- {
- daemon.stopDaemon();
-
- // Change the menu label for the action
- setActionLabelToStart();
- }
- else
- {
- daemon.startDaemon();
- // Change the menu label for the action
- setActionLabelToStop();
- }
- }
-
- /**
- * Helper method for changing the action text and tooltip to start
- */
- public void setActionLabelToStart()
- {
- setText(SystemResources.ACTION_DAEMON_START_LABEL);
- setToolTipText(SystemResources.ACTION_DAEMON_START_TOOLTIP);
- }
-
- /**
- * Helper method for changing the action text and tooltip to stop
- */
- public void setActionLabelToStop()
- {
- setText(SystemResources.ACTION_DAEMON_STOP_LABEL);
- setToolTipText(SystemResources.ACTION_DAEMON_STOP_TOOLTIP);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStringPromptAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStringPromptAction.java
deleted file mode 100644
index e53677d80..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStringPromptAction.java
+++ /dev/null
@@ -1,97 +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.dialogs.InputDialog;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * This is a default action for prompting for a string.
- * It puts up a simple dialog with an entry field. You specify the button/menuitem
- * strings, and the title and prompt on the resulting dialog.
- * You can also optionally specify an input validator that is called to verify the
- * contents of the entry field.
- */
-public class SystemStringPromptAction extends SystemBaseDialogAction
-{
-
- private String title, prompt;
- private ISystemValidator inputValidator;
-
- /**
- * @param rb Resource bundle where to find following keys
- * @param key Key used as prefix in resource bundle to get:
- * <sl>
- * <li>button/menuitem label -> appends ".label" to key
- * <li>button/menuitem tooltip -> appends ".tooltip" to key
- * <li>button/menuitem description on status line -> appends ".description" to key
- * <li>title of generic prompt dialog box displayed -> appends ".title"
- * <li>prompt text in generic prompt dialog box displayed -> appends ".prompt"
- * </sl>
- * @param parent Shell of parent window
- *
- * @deprecated use fields from resource class directly now
- */
- public SystemStringPromptAction(String label, String tooltip, String title, String prompt, Shell parent)
- {
- super(label, tooltip, null, parent); // null => no image
- this.title = title;
- this.prompt = prompt;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPEN);
- }
-
-
- /**
- * Set validator to use to check validity of input
- * @param text validator
- */
- public void setValidator(ISystemValidator inputValidator)
- {
- this.inputValidator = inputValidator;
- }
-
- /**
- * We use the default inherited actionPerformed method,
- * which calls this method to create our dialog.
- */
- public Dialog createDialog(Shell parent)
- {
- InputDialog dlg= new InputDialog(parent, title, prompt,null,inputValidator);
- //dlg.getShell().setSize(300, 200); // ? right thing to do ?
- dlg.setBlockOnOpen(true); // modal
- return dlg;
- }
-
- /**
- * We use the default inherited actionPerformed method,
- * which calls this method after the dialog is closed in
- * order to retrieve the dialog's data. This is then
- * placed in this object's value property and can be
- * retrieved publicly via getValue().
- */
- protected Object getDialogValue(Dialog dlg)
- {
- String value = ((InputDialog)dlg).getValue();
- if (value != null)
- value = value.trim();
- return value;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSubMenuManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSubMenuManager.java
deleted file mode 100644
index ba6fa2264..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSubMenuManager.java
+++ /dev/null
@@ -1,403 +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.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * For cascading menus, we need our own menu subclass so we can intercept
- * the state-setting methods of our frameworks, and foreword those onto the
- * sub-menu actions.
- * <p>
- * The state-setting methods including setShell, setSelection and setValue.
- */
-public class SystemSubMenuManager
- extends MenuManager
- //implements ISelectionChangedListener
- //implements ISystemAction
-{
- protected String toolTipText;
- protected ImageDescriptor image = null;
- protected Shell shell = null;
- protected Viewer viewer = null;
- protected boolean deferPopulation;
- protected boolean traceSelections = false;
- protected String traceTarget;
- protected ISelection selection;
- protected String label;
- protected SystemBaseSubMenuAction parentCascadingAction;
-
- /**
- * Constructor for SystemSubMenuManager
- */
- public SystemSubMenuManager(SystemBaseSubMenuAction parentAction)
- {
- super();
- this.parentCascadingAction = parentAction;
- }
- /**
- * Constructor for SystemSubMenuManager
- */
- public SystemSubMenuManager(SystemBaseSubMenuAction parentAction, String text)
- {
- super(text);
- this.label = text;
- this.parentCascadingAction = parentAction;
- }
- /**
- * Constructor for SystemSubMenuManager
- */
- public SystemSubMenuManager(SystemBaseSubMenuAction parentAction, String text, String id)
- {
- super(text, id);
- this.label = text;
- this.parentCascadingAction = parentAction;
- }
- /**
- * Constructor for SystemSubMenuManager
- */
- public SystemSubMenuManager(SystemBaseSubMenuAction parentAction, String text, String id, ImageDescriptor image)
- {
- super(text, id);
- this.label = text;
- this.image = image;
- this.parentCascadingAction = parentAction;
- }
-
- /**
- * Return the parent cascading menu action that created this.
- */
- public SystemBaseSubMenuAction getParentCascadingAction()
- {
- return parentCascadingAction;
- }
-
- /**
- * Set the tooltip text when this is used for in a cascading menu.
- * @see org.eclipse.rse.ui.actions.SystemBaseSubMenuAction
- */
- public void setToolTipText(String tip)
- {
- this.toolTipText = tip;
- }
- /**
- * Get the tooltip text when this is used for in a cascading menu
- */
- public String getToolTipText()
- {
- return toolTipText;
- }
-
- /**
- * Return the label for this submenu
- */
- public String getLabel()
- {
- return label;
- }
-
- // ------------------------
- // ISYSTEMACTION METHODS...
- // ------------------------
- /**
- * An optimization for performance reasons that allows all inputs to be set in one call.
- * This is called by SystemView's fillContextMenu method.
- */
- public void setInputs(Shell shell, Viewer v, ISelection selection)
- {
- if (traceSelections)
- issueTraceMessage(" INSIDE SETINPUTS FOR SUBMENUMGR FOR '"+label+"'"); //$NON-NLS-1$ //$NON-NLS-2$
- this.shell = shell;
- this.viewer = v;
- this.selection = selection;
- if (parentCascadingAction != null)
- parentCascadingAction.setInputsFromSubMenuManager(shell, v, selection);
- cascadeAllInputs();
- }
-
-
- /**
- * Sets the parent shell for this action. Usually context dependent.
- * We cascade this down to all of the actions added to this submenu.
- */
- public void setShell(Shell shell)
- {
- this.shell = shell;
- IContributionItem[] items = getItems();
- for (int idx=0; idx < items.length; idx++)
- {
- if ((items[idx] instanceof ActionContributionItem) &&
- (((ActionContributionItem)items[idx]).getAction() instanceof ISystemAction))
- {
- ISystemAction item = (ISystemAction) ( ((ActionContributionItem)items[idx]).getAction() );
- item.setShell(shell);
- }
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager)items[idx];
- item.setShell(shell);
- }
- }
- if (traceSelections)
- {
- issueTraceMessage("*** INSIDE SETSHELL FOR SUBMENUMGR "+label+". #ITEMS = "+items.length); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
-
- /**
- * This is called by the framework to set the selection input, just prior to showing the popup menu.
- * We cascade this down to all of the actions added to this submenu.
- */
- public void setSelection(ISelection selection)
- {
- this.selection = selection;
- IContributionItem[] items = getItems();
- for (int idx=0; idx < items.length; idx++)
- {
- if ((items[idx] instanceof ActionContributionItem) &&
- (((ActionContributionItem)items[idx]).getAction() instanceof ISystemAction))
- {
- ISystemAction item = (ISystemAction) ( ((ActionContributionItem)items[idx]).getAction() );
- item.setSelection(selection);
- }
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager)items[idx];
- item.setSelection(selection);
- }
- }
- if (traceSelections)
- {
- issueTraceMessage("*** INSIDE SETSELECTION FOR SUBMENUMGR"+label+". #ITEMS = "+items.length); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
- /**
- * Set the Viewer that called this action. It is good practice for viewers to call this
- * so actions can directly access them if needed.
- */
- public void setViewer(Viewer v)
- {
- this.viewer = v;
- IContributionItem[] items = getItems();
- for (int idx=0; idx < items.length; idx++)
- {
- if ((items[idx] instanceof ActionContributionItem) &&
- (((ActionContributionItem)items[idx]).getAction() instanceof ISystemAction))
- {
- ISystemAction item = (ISystemAction) ( ((ActionContributionItem)items[idx]).getAction() );
- item.setViewer(viewer);
- }
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager)items[idx];
- item.setViewer(viewer);
- }
- }
- }
-
- /**
- * Get the Viewer that called this action. Not guaranteed to be set,
- * depends if that viewer called setViewer or not. SystemView does.
- */
- public Viewer getViewer()
- {
- return viewer;
- }
- /**
- * Get the Shell that hosts this action. Not guaranteed to be set,
- */
- public Shell getShell()
- {
- return shell;
- }
- /**
- * Get the Selection
- */
- public IStructuredSelection getSelection()
- {
- return (IStructuredSelection)selection;
- }
-
- /**
- * @see ContributionManager#add(IAction)
- */
-
- // add(): solve problem that cascaded menu items were not receiving their
- // setSelection() call, due to them only being constructed on the
- // cascade's MenuAboutToShow(), after the setSelections have run.
-
- // THE QUESTION IS, IF WE DO THIS HERE WHEN ITEMS ARE ADDED TO THIS SUBMENU,
- // IS IT REDUNDANT TO ALSO DO IT WHEN SETINPUTS IS CALLED?
-
- /**
- * Intercept so we can cascade the selection, viewer and shell down
- */
- public void appendToGroup(String groupName, IAction action)
- {
- super.appendToGroup(groupName, action);
- if (action instanceof ISystemAction)
- cascadeAllInputs((ISystemAction)action);
- }
- /**
- * Intercept so we can cascade the selection, viewer and shell down
- */
- public void appendToGroup(String groupName, IContributionItem item)
- {
- super.appendToGroup(groupName, item);
- if (item instanceof SystemSubMenuManager)
- cascadeAllInputs((SystemSubMenuManager)item);
- }
- /**
- * Intercept so we can cascade the selection, viewer and shell down
- * THIS WAS ONLY CATCHING ACTIONS, NOT NESTED SUBMENUS. THE SUPER OF THIS
- * METHOD CALLS ADD(new ActionContributionItem(action)) SO WE NOW INTERCEPT
- * THERE INSTEAD, AS THAT IS WHAT IS CALLED FOR MULTI-CASCADING MENUS
- public void add(IAction action)
- {
- super.add(action);
- if (action instanceof ISystemAction)
- cascadeAllInputs((ISystemAction)action);
- }*/
- /**
- * Intercept so we can cascade the selection, viewer and shell down
- */
- public void add(IContributionItem item)
- {
- super.add(item);
- if (item instanceof ActionContributionItem)
- {
- IAction action = ((ActionContributionItem)item).getAction();
- if (action instanceof ISystemAction)
- cascadeAllInputs((ISystemAction)action);
- }
- else if (item instanceof SystemSubMenuManager)
- cascadeAllInputs((SystemSubMenuManager)item);
- }
-
- /**
- * Cascade in one shot all input state inputs to all actions
- */
- protected void cascadeAllInputs()
- {
- //super.menuAboutToShow(ourSubMenu);
- IContributionItem[] items = getItems();
- if (traceSelections)
- {
- issueTraceMessage("INSIDE CASCADEALLINPUTS FOR SUBMENUMGR FOR "+label+". NBR ITEMS = "+items.length); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- for (int idx=0; idx < items.length; idx++)
- {
- if ((items[idx] instanceof ActionContributionItem) &&
- (((ActionContributionItem)items[idx]).getAction() instanceof ISystemAction))
- {
- ISystemAction item = (ISystemAction) ( ((ActionContributionItem)items[idx]).getAction() );
- if (!item.isDummy())
- cascadeAllInputs(item);
- }
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager)items[idx];
- cascadeAllInputs(item);
- }
- }
-
- }
- /**
- * Cascade in one shot all input state inputs to one action
- */
- protected void cascadeAllInputs(ISystemAction action)
- {
- if (action.isDummy())
- return; // waste of time
- if (shell != null)
- action.setShell(shell);
- if (viewer != null)
- action.setViewer(viewer);
- if (selection != null)
- action.setSelection(selection);
- }
- /**
- * Cascade in one shot all input state inputs to one submenu
- */
- protected void cascadeAllInputs(SystemSubMenuManager submenu)
- {
- if (shell != null)
- submenu.setShell(shell);
- if (viewer != null)
- submenu.setViewer(viewer);
- if (selection != null)
- submenu.setSelection(selection);
- }
- // ------------------------
- // HELPER METHODS...
- // ------------------------
- /**
- * Turn on tracing for selections, shell and viewer to watch as it is set
- */
- public void setTracing(boolean tracing)
- {
- traceSelections = tracing;
- }
- /**
- * Turn on tracing for selections, shell and viewer to watch as it is set,
- * scoped to a particular class name (will use indexOf('xxx') to match).
- */
- public void setTracing(String tracingClassTarget)
- {
- traceSelections = (tracingClassTarget != null);
- traceTarget = tracingClassTarget;
- }
- /**
- * Turn on tracing for selections, shell and viewer to watch as it is set,
- * scoped to a particular class name (will use indexOf('xxx') to match).
- */
- public void setTracing(boolean tracing, String tracingClassTarget)
- {
- traceSelections = tracing;
- traceTarget = tracingClassTarget;
- }
-
- /**
- * Issue trace message
- */
- protected void issueTraceMessage(String msg)
- {
- if (traceSelections)
- {
- String className = this.getClass().getName();
- if ((traceTarget==null) || (className.indexOf(traceTarget)>=0))
- {
- className = className.substring(className.lastIndexOf('.'));
- SystemBasePlugin.logInfo(className+": "+msg); //$NON-NLS-1$
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSubMenuManagerForTesting.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSubMenuManagerForTesting.java
deleted file mode 100644
index f82629f65..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSubMenuManagerForTesting.java
+++ /dev/null
@@ -1,180 +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.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * For cascading menus, we need our own menu subclass so we can intercept
- * the state-setting methods our frameworks, and foreword those onto the
- * sub-menu actions.
- * <p>
- * The state-setting methods including setShell, setSelection and setValue.
- * <p>
- * We often have trouble tracking down when the shell, selection and viewer is
- * not properly set for cascading actions. For these cases, we can use this
- * override of the SystemSubMenuManager to trace what happens.
- */
-public class SystemSubMenuManagerForTesting
- extends SystemSubMenuManager
- //implements ISelectionChangedListener
- //implements ISystemAction
-{
- private String prefix = ""; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction)
- {
- super(parentAction);
- }
- /**
- * Constructor
- */
- public SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction, String text)
- {
- super(parentAction, text);
- System.out.println("SUBMENUMGR CTOR " + text); //$NON-NLS-1$
- }
- /**
- * Constructor
- */
- public SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction, String text, String id)
- {
- super(parentAction, text, id);
- System.out.println("SUBMENUMGR CTOR " + text); //$NON-NLS-1$
- }
- /**
- * Constructor
- */
- public SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction, String text, String id, ImageDescriptor image)
- {
- super(parentAction, text, id, image);
- }
-
-
- /**
- * Override of parent so we can trace it....
- */
- public void setInputs(Shell shell, Viewer v, ISelection selection)
- {
- System.out.println(" INSIDE SETINPUTS FOR SUBMENUMGR '"+label+"': selection = "+selection); //$NON-NLS-1$ //$NON-NLS-2$
- super.setInputs(shell, v, selection);
- }
-
-
-
-
- // add(): solve problem that cascaded menu items were not receiving their
- // setSelection() call, due to them only being constructed on the
- // cascade's MenuAboutToShow(), after the setSelections have run.
-
- // THE QUESTION IS, IF WE DO THIS HERE WHEN ITEMS ARE ADDED TO THIS SUBMENU,
- // IS IT REDUNDANT TO ALSO DO IT WHEN SETINPUTS IS CALLED?
-
- /**
- * Intercept so we can cascade the selection, viewer and shell down
- */
- public void appendToGroup(String groupName, IAction action)
- {
- System.out.println("INSIDE APPENDTOGROUP OF ISYSTEMACTION FOR SUBMENUMGR FOR '"+label+"'"); //$NON-NLS-1$ //$NON-NLS-2$
- prefix = " "; //$NON-NLS-1$
- super.appendToGroup(groupName, action);
- prefix = ""; //$NON-NLS-1$
- }
- /**
- * Intercept so we can cascade the selection, viewer and shell down
- */
- public void appendToGroup(String groupName, IContributionItem item)
- {
- System.out.println("INSIDE APPENDTOGROUP OF SYSTEMSUBMENUMGR FOR SUBMENUMGR FOR '"+label+"'"); //$NON-NLS-1$ //$NON-NLS-2$
- prefix = " "; //$NON-NLS-1$
- super.appendToGroup(groupName, item);
- prefix = ""; //$NON-NLS-1$
- }
- /**
- * Intercept so we can cascade the selection, viewer and shell down
- * THIS WAS ONLY CATCHING ACTIONS, NOT NESTED SUBMENUS. THE SUPER OF THIS
- * METHOD CALLS ADD(new ActionContributionItem(action)) SO WE NOW INTERCEPT
- * THERE INSTEAD, AS THAT IS WHAT IS CALLED FOR MULTI-CASCADING MENUS
- public void add(IAction action)
- {
- super.add(action);
- if (action instanceof ISystemAction)
- cascadeAllInputs((ISystemAction)action);
- }*/
- /**
- * Intercept so we can cascade the selection, viewer and shell down
- */
- public void add(IContributionItem item)
- {
- prefix = " "; //$NON-NLS-1$
- if (item instanceof ActionContributionItem)
- {
- IAction action = ((ActionContributionItem)item).getAction();
- if (action instanceof ISystemAction)
- System.out.println("INSIDE ADD OF ISYSTEMACTION(action="+action.getText()+") FOR THIS MNUMGR: "+label); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (item instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager submenu = (SystemSubMenuManager)item;
- System.out.println("INSIDE ADD OF SUBMENUMGR(submenu="+submenu.getLabel()+") FOR THIS MNUMGR: "+label); //$NON-NLS-1$ //$NON-NLS-2$
- }
- super.add(item);
- prefix = ""; //$NON-NLS-1$
- }
-
- /**
- * Cascade in one shot all input state inputs to all actions
- */
- protected void cascadeAllInputs()
- {
- //super.menuAboutToShow(ourSubMenu);
- IContributionItem[] items = getItems();
- System.out.println(prefix+"INSIDE CASCADEALLINPUTS TO ALL ITEMS FOR SUBMENUMGR FOR "+label+". NBR ITEMS = "+items.length); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(prefix+"...shell = "+shell+", viewer = "+viewer+", selection = "+selection); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String oldPrefix = prefix;
- prefix += " "; //$NON-NLS-1$
- super.cascadeAllInputs();
- prefix = oldPrefix;
- }
- /**
- * Cascade in one shot all input state inputs to one action
- */
- protected void cascadeAllInputs(ISystemAction action)
- {
- System.out.println(prefix+"INSIDE CASCADEALLINPUTS TO ISYSTEMACTION(action="+action.getText()+") FOR THIS MNUMGR: "+label); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(prefix+"...shell = "+shell+", viewer = "+viewer+", selection = "+selection); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- super.cascadeAllInputs(action);
- }
- /**
- * Cascade in one shot all input state inputs to one submenu
- */
- protected void cascadeAllInputs(SystemSubMenuManager submenu)
- {
- System.out.println("INSIDE CASCADEALLINPUTS TO SUBMENUMGR(submenu="+submenu.getLabel()+") FOR THIS MNUMGR: "+label); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("...shell = "+shell+", viewer = "+viewer+", selection = "+selection); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- super.cascadeAllInputs(submenu);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTablePrintAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTablePrintAction.java
deleted file mode 100644
index 40a113898..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTablePrintAction.java
+++ /dev/null
@@ -1,524 +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 java.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.view.SystemDecoratingLabelProvider;
-import org.eclipse.rse.ui.view.SystemTableView;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.printing.PrintDialog;
-import org.eclipse.swt.printing.Printer;
-import org.eclipse.swt.printing.PrinterData;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-
-/**
- * This is the action for printing the contents of the table view
- */
-public class SystemTablePrintAction extends SystemBaseAction
-{
-
- private int[] _columnWidths = null;
- private int[] _columnAlignments = null;
-
- private boolean bPrintSelection;
- private boolean bPageRange;
-
- private int endLine;
- private int bottomMargin = 100;
- private int leftMargin = 100;
- private int rightMargin = 100;
- private int topMargin = 100;
-
- private String sPrintOutputName = null;
- private String sPageTitle = null;
- private String sTableTitle = null;
- private String sColumnHeader = null;
- private String sUnderLine = null;
- private String sEndOfListing = null;
-
- private int pageNumber = 1;
- private boolean startedPage = false;
- int startPage;
- int endPage;
-
- private int pageHeight;
- private int pageWidth;
- private int x;
- private int y = 0;
- private int w;
- private int textHeight;
-
- private Printer printer;
- private boolean bPrintPage;
- private GC g;
-
- private SystemTableView _viewer = null;
- private String _title = null;
- private boolean _hasColumns = false;
-
- /**
- * Constructor.
- * @param title the title for the print document
- * @param viewer the viewer to print the contents of
- */
- public SystemTablePrintAction(String title, SystemTableView viewer)
- {
- super(SystemResources.ACTION_PRINTLIST_LABEL, null);
- setToolTipText(SystemResources.ACTION_PRINTLIST_TOOLTIP);
- setTableView(title, viewer);
- }
-
- /**
- * Sets the title for the print document and the table view to print from
- * @param title the title for the print document
- * @param viewer the viewer to print the contents of
- */
- public void setTableView(String title, SystemTableView viewer)
- {
- _title = title;
- _viewer = viewer;
- }
-
- /**
- * Called to check whether this action should be enabled.
- */
- public void checkEnabledState()
- {
- if (_viewer != null && _viewer.getInput() != null)
- {
- setEnabled(true);
- }
- else
- {
- setEnabled(false);
- }
- }
-
- /**
- * Called when the user chooses to print
- */
- public void run()
- {
- // page format info
- DateFormat dateFormatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
- String sCurrentDate = dateFormatter.format(new Date());
-
- sPrintOutputName = SystemResources.RESID_TABLE_PRINTLIST_TITLE;
- sPageTitle = sPrintOutputName;
- sPageTitle = sPageTitle + sCurrentDate;
-
- // Table title
- sTableTitle = _title;
-
- /*============================*/
- /* Present the print dialog */
- /*============================*/
- PrintDialog printDialog = new PrintDialog(_viewer.getShell());
-
- PrinterData printerData = printDialog.open();
- if (printerData == null) // user cancelled the print job?
- {
- return;
- }
- // get updated settings from the print dialog
- bPrintSelection = (printerData.scope & PrinterData.SELECTION) != 0;
- bPageRange = printerData.scope == PrinterData.PAGE_RANGE;
-
- Table table = _viewer.getTable();
-
- TableItem[] printItems = table.getItems();
- if (bPrintSelection)
- {
- printItems = table.getSelection();
- endLine = printItems.length;
- if (endLine == 0)
- return; // nothing to print
- }
- else if (bPageRange)
- {
- endLine = printItems.length;
- startPage = printerData.startPage;
- endPage = printerData.endPage;
- if (endPage < startPage)
- return; // nothing to print
- }
-
- /*===================*/
- /* do the printing */
- /*===================*/
- // start print job
- printer = new Printer(printerData);
-
- if (!printer.startJob(sPrintOutputName))
- {
- printer.dispose();
- return;
- }
-
- Rectangle clientArea = printer.getClientArea();
-
- pageHeight = clientArea.height;
- pageWidth = clientArea.width;
- g = new GC(printer);
-
- textHeight = g.getFontMetrics().getHeight();
-
- /*----------------------------------------*/
- /* go through all the lines to print... */
- /*----------------------------------------*/
- pageNumber = 1;
- startedPage = false;
-
- // scale factor
- int scaleFactor = 1;
- Rectangle tableClientArea = table.getClientArea();
- int tableWidth = tableClientArea.width - 5;
- if (tableWidth > pageWidth)
- {
- scaleFactor = tableWidth / pageWidth;
- }
-
- int columnCount = table.getColumnCount();
- if (columnCount > 1)
- {
- _hasColumns = true;
- }
- else
- {
- _hasColumns = false;
- }
-
- // header info
-
- getColumnInfo(scaleFactor);
- sColumnHeader = getColumnHeader();
- sUnderLine = getHeaderSeparator();
-
- sEndOfListing = getTableFooter();
-
- for (int i = 0; i < printItems.length; i++)
- {
- TableItem item = printItems[i];
- Object data = item.getData();
-
- String line = getLine(data, columnCount);
-
- printLine(line);
- }
-
- printLine(" "); //$NON-NLS-1$
- printLine(sEndOfListing);
-
- /*=======================*/
- /* finish up print job */
- /*=======================*/
- g.dispose();
-
- printer.endJob();
- printer.dispose();
-
- System.gc();
- return;
- }
-
- /*
- * Print one line
- */
- private void printLine(String text)
- {
- do // until the text of one line is printed
- {
- // start a new page
- if (!startedPage)
- {
- if (bPageRange)
- {
- if (pageNumber >= startPage && pageNumber <= endPage)
- bPrintPage = true;
- else
- bPrintPage = false;
- }
- else
- bPrintPage = true;
-
- startedPage = true;
- x = leftMargin;
- y = topMargin;
- if (bPrintPage)
- {
- printer.startPage();
- g.drawString(sPageTitle + pageNumber, x, y);
-
- y += textHeight * 2;
-
- g.drawString(sTableTitle, x, y);
- y += textHeight * 2;
-
- g.drawString(sColumnHeader, x, y);
- y += textHeight;
-
- g.drawString(sUnderLine, x, y);
- y += textHeight;
- }
- else
- {
- y = topMargin + textHeight * 6;
- }
- pageNumber++;
- }
- // start at beginning of the line
- x = leftMargin;
-
- if (text != null)
- {
- int l = text.length();
- while (l > 0)
- {
- w = g.stringExtent(text.substring(0, l)).x;
- if (x + w <= pageWidth - rightMargin)
- {
- break;
- }
- l--;
- }
- String remainingText = null; // text spillin' to next print line
- if (l > 0 && l < text.length())
- {
- remainingText = text.substring(l);
- text = text.substring(0, l);
- }
- if (bPrintPage)
- g.drawString(text, x, y);
- text = remainingText; // still to print text spillin' over edge
- }
- // finished a print line, go to next
- y += textHeight;
- // done with this page (a new line height doesn't fit)?
- if (y + textHeight > pageHeight - bottomMargin)
- {
- if (bPrintPage)
- printer.endPage();
- startedPage = false;
- }
- }
- while (text != null); //end do
- }
-
- private void getColumnInfo(int scaleFactor)
- {
- // scale widths
- Table table = _viewer.getTable();
- if (table.getColumnCount() > 1)
- {
- _hasColumns = true;
- }
- else
- {
- _hasColumns = false;
- }
-
- if (_hasColumns)
- {
- _columnWidths = new int[table.getColumnCount()];
- _columnAlignments = new int[table.getColumnCount()];
-
- for (int i = 0; i < table.getColumnCount(); i++)
- {
- TableColumn column = table.getColumn(i);
- int width = column.getWidth();
- _columnWidths[i] = width / 9;
- _columnAlignments[i] = column.getAlignment();
- }
- }
- }
-
- private String getColumnHeader()
- {
- StringBuffer sbColumnHeader = new StringBuffer(""); //$NON-NLS-1$
- sbColumnHeader.append(getBlankLine());
-
- if (_hasColumns)
- {
- IPropertyDescriptor[] descriptors = _viewer.getVisibleDescriptors(_viewer.getInput());
- sbColumnHeader.insert(0, SystemPropertyResources.RESID_PROPERTY_NAME_LABEL);
-
- int offset = _columnWidths[0];
- sbColumnHeader.insert(offset, " "); //$NON-NLS-1$
- offset++;
-
- for (int i = 0; i < descriptors.length; i++)
- {
- String label = descriptors[i].getDisplayName();
- int columnWidth = _columnWidths[i + 1];
- int labelWidth = label.length();
-
- if (_columnAlignments[i + 1] == SWT.LEFT)
- {
- if (labelWidth > columnWidth)
- {
- label = label.substring(0, columnWidth - 3);
- label += "..."; //$NON-NLS-1$
- }
- sbColumnHeader.insert(offset, label);
- }
- else
- {
-
- int rightOffset = offset + (columnWidth - labelWidth) - 1;
-
- if (rightOffset < offset)
- {
- int delta = (offset - rightOffset) - 3;
- label = label.substring(0, delta);
- label += "..."; //$NON-NLS-1$
- rightOffset = offset;
- }
-
- sbColumnHeader.insert(rightOffset, label);
- }
-
- offset += columnWidth;
- sbColumnHeader.insert(offset, " "); //$NON-NLS-1$
- offset++;
- }
- }
- return sbColumnHeader.toString();
- }
-
- private String getHeaderSeparator()
- {
- StringBuffer separator = new StringBuffer(""); //$NON-NLS-1$
- if (_hasColumns)
- {
- for (int i = 0; i < _columnWidths.length; i++)
- {
- int width = _columnWidths[i];
- for (int t = 0; t < width; t++)
- {
- separator.append("-"); //$NON-NLS-1$
- }
-
- separator.append(" "); //$NON-NLS-1$
- }
- }
-
- return separator.toString();
- }
-
- private String getTableFooter()
- {
- String footer = " * * * * * E N D O F L I S T I N G * * * * *"; //$NON-NLS-1$
- return footer;
- }
-
- private int getTotalWidth()
- {
- int totalWidth = 0;
- if (_hasColumns)
- {
- for (int i = 0; i < _columnWidths.length; i++)
- {
- totalWidth += _columnWidths[i];
- }
- }
- else
- {
- totalWidth = pageWidth;
- }
-
- return totalWidth;
- }
-
- private String getBlankLine()
- {
- StringBuffer blankLine = new StringBuffer();
-
- int totalWidth = getTotalWidth();
- for (int b = 0; b < totalWidth; b++)
- {
- blankLine.append(" "); //$NON-NLS-1$
- }
-
- return blankLine.toString();
- }
-
- private String getLine(Object object, int numColumns)
- {
- StringBuffer line = new StringBuffer(""); //$NON-NLS-1$
-
- //SystemTableViewProvider lprovider = (SystemTableViewProvider) _viewer.getLabelProvider();
- SystemDecoratingLabelProvider lprovider = (SystemDecoratingLabelProvider)_viewer.getLabelProvider();
- if (_hasColumns)
- {
- line.append(getBlankLine());
- int offset = 0;
- for (int column = 0; column < numColumns; column++)
- {
- String columnText = lprovider.getColumnText(object, column);
- int labelWidth = columnText.length();
-
- int columnWidth = _columnWidths[column];
- if (_columnAlignments[column] == SWT.LEFT)
- {
- if (labelWidth > columnWidth)
- {
- columnText = columnText.substring(0, columnWidth - 3);
- columnText += "..."; //$NON-NLS-1$
- }
-
- line.insert(offset, columnText);
-
- }
- else
- {
- int rightOffset = offset + (columnWidth - labelWidth) - 1;
- if (rightOffset < offset)
- {
- int delta = (offset - rightOffset) + 3;
- columnText = columnText.substring(0, labelWidth - delta);
- columnText += "..."; //$NON-NLS-1$
- rightOffset = offset;
- }
-
- line.insert(rightOffset, columnText);
- }
-
- offset += columnWidth;
- line.insert(offset, " "); //$NON-NLS-1$
- offset++;
- }
- }
- else
- {
- String columnText = lprovider.getColumnText(object, 0);
- line.append(columnText);
- }
-
- return line.toString();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 6929bbc26..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTeamReloadAction.java
+++ /dev/null
@@ -1,76 +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.viewers.IStructuredSelection;
-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;
-
-
-/**
- * The action allows users to refresh the entire Remote System Explorer tree view,
- * by reloading it from disk. This is to be done after the user does a synchronization
- * with the repository.
- */
-public class SystemTeamReloadAction extends SystemBaseAction
-
-{
-
- //private SystemProfile prevProfile = null;
-
- /**
- * Constructor
- */
- public SystemTeamReloadAction(Shell parent)
- {
- super(SystemResources.ACTION_TEAM_RELOAD_LABEL,SystemResources.ACTION_TEAM_RELOAD_TOOLTIP,
- parent);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_BUILD);
- //setSelectionSensitive(false);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0009"); //$NON-NLS-1$
- }
-
- /**
- * Selection has been changed. Decide to enable or not.
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = SystemResourceListener.changesPending();
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action to run.
- */
- public void run()
- {
- //SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- SystemMessage confirmMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_RELOADRSE);
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), confirmMsg);
- boolean ok = msgDlg.openQuestionNoException();
- if (ok)
- {
- SystemResourceListener.reloadRSE();
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTestFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTestFilterStringAction.java
deleted file mode 100644
index d72f482a3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTestFilterStringAction.java
+++ /dev/null
@@ -1,102 +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.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemTestFilterStringDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action for testing a given filter string by resolving it and showing the resolve results
- */
-public class SystemTestFilterStringAction extends SystemBaseDialogAction
-
-{
-
- protected ISubSystem subsystem;
- protected String filterString;
- protected SystemTestFilterStringDialog dlg;
-
-
- /**
- * Constructor when input subsystem and filter string are known already
- */
- public SystemTestFilterStringAction(Shell shell, ISubSystem subsystem, String filterString)
- {
- super(SystemResources.ACTION_TESTFILTERSTRING_LABEL, SystemResources.ACTION_TESTFILTERSTRING_TOOLTIP, null,
- shell);
- allowOnMultipleSelection(false);
- setSubSystem(subsystem);
- setFilterString(filterString);
- }
- /**
- * Constructor when input subsystem and filter string are not known already.
- * @see #setSubSystem(ISubSystem)
- * @see #setFilterString(String)
- */
- public SystemTestFilterStringAction(Shell shell)
- {
- this(shell, null, null);
- }
-
- /**
- * Set the subsystem within the context of which this filter string is to be tested.
- */
- public void setSubSystem(ISubSystem subsystem)
- {
- this.subsystem = subsystem;
- }
-
- /**
- * Set the filter string to test
- */
- public void setFilterString(String filterString)
- {
- this.filterString = filterString;
- }
-
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to create and return
- * the dialog that is displayed by the default run method
- * implementation.
- * <p>
- * If you override run with your own, then
- * simply implement this to return null as it won't be used.
- * @see #run()
- */
- protected Dialog createDialog(Shell shell)
- {
- //if (dlg == null) // I hoped to reduce memory requirements by re-using but doesn't work. Phil
- dlg = new SystemTestFilterStringDialog(shell, subsystem, filterString);
- //else
- //{
- //dlg.reset(subsystem, filterString);
- //}
- return dlg;
- }
-
- /**
- * Required by parent. We just return null.
- */
- protected Object getDialogValue(Dialog dlg)
- {
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemUpdateConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemUpdateConnectionAction.java
deleted file mode 100644
index 68d786613..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemUpdateConnectionAction.java
+++ /dev/null
@@ -1,75 +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.rse.core.model.IHost;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemUpdateConnectionDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action that displays the Change Connection dialog
- * THIS DIALOG AND ITS ACTION ARE NO LONGER USED. THEY ARE REPLACED WITH A PROPERTIES DIALOG.
- */
-public class SystemUpdateConnectionAction extends SystemBaseDialogAction
-
-{
-
- /**
- * Constructor for SystemUpdateConnectionAction
- */
- public SystemUpdateConnectionAction(Shell parent)
- {
- super(SystemResources.ACTION_UPDATECONN_LABEL, SystemResources.ACTION_UPDATECONN_TOOLTIP, null, parent);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- return (selectedObject instanceof IHost);
- }
-
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to create and return
- * the dialog that is displayed by the default run method
- * implementation.
- * <p>
- * If you override run with your own, then
- * simply implement this to return null as it won't be used.
- * @see #run()
- */
- protected Dialog createDialog(Shell parent)
- {
- return new SystemUpdateConnectionDialog(parent);
- }
-
- /**
- * Required by parent but we do not use it so return null;
- */
- protected Object getDialogValue(Dialog dlg)
- {
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemViewExpandToAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemViewExpandToAllAction.java
deleted file mode 100644
index 12d56f9c7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemViewExpandToAllAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * When we support Expand-To menu items to expand a remote item via subsetting criteria,
- * we should also support an Expand-To->All action. This is it.
- */
-public class SystemViewExpandToAllAction extends SystemViewExpandToBaseAction
-{
-
-
-
- /**
- * Constructor for SystemViewExpandToAllAction.
- * @param rb
- * @param prefix
- * @param image
- * @param parent
- */
- public SystemViewExpandToAllAction(Shell parent)
- {
- super(SystemResources.ACTION_EXPAND_ALL_LABEL, SystemResources.ACTION_EXPAND_ALL_TOOLTIP,null, parent);
- }
-
- /**
- * @see org.eclipse.rse.ui.actions.SystemViewExpandToBaseAction#getFilterString(Object)
- */
- protected String getFilterString(Object selectedObject)
- {
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemViewExpandToBaseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemViewExpandToBaseAction.java
deleted file mode 100644
index 5231d71a5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemViewExpandToBaseAction.java
+++ /dev/null
@@ -1,98 +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.resource.ImageDescriptor;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Base class for Expand To actions on a container
- */
-public abstract class SystemViewExpandToBaseAction extends SystemBaseAction
-{
-
-
-
- /**
- * Constructor.
- */
- public SystemViewExpandToBaseAction(String label, String tooltip, ImageDescriptor image, Shell parent)
- {
- super(label, tooltip, image, parent);
- allowOnMultipleSelection(false);
- setContextMenuGroup(org.eclipse.rse.ui.ISystemContextMenuConstants.GROUP_EXPANDTO);
- setChecked(false); // will reset once we know the selection.
- }
-
- /**
- * Second and easiest opportunity to decide if the action should be enabled or not based
- * on the current selection. Called by default implementation of updateSelection, once for
- * each item in the selection. If any call to this returns false, the action is disabled.
- * The default implementation returns true.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- SystemView sv = getSystemView();
- if (sv == null)
- return false;
- String currentFilter = sv.getExpandToFilter(selectedObject);
- String thisFilter = getFilterString(selectedObject);
- if (currentFilter != null)
- {
- if ((thisFilter!=null) && currentFilter.equals(thisFilter))
- setChecked(true);
- }
- else if (thisFilter == null) // I assume this is only the case for Expand To->All.
- setChecked(true);
- return true;
- }
-
- /**
- * Actually do the work
- */
- public void run()
- {
- Object element = getFirstSelection();
- if (element != null)
- {
- SystemView view = (SystemView)getCurrentTreeView();
- view.expandTo(getFilterString(element));
- }
- }
-
- /**
- * Overridable extension point to get the fully resolved filter string at the time
- * action is run.
- */
- protected abstract String getFilterString(Object selectedObject);
-
- /**
- * Return the current SystemView or null if the current viewer is not a system view
- */
- protected SystemView getSystemView()
- {
- ISystemTree tree = getCurrentTreeView();
- if ((tree instanceof SystemView) && (((SystemView)tree).getSystemViewPart() != null))
- return (SystemView)tree;
- else
- return null;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 6cd691802..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkOfflineAction.java
+++ /dev/null
@@ -1,128 +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.viewers.IStructuredSelection;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Action for switching RSE Connections offline
- *
- * @author yantzi
- */
-public class SystemWorkOfflineAction extends SystemBaseAction
-{
- /**
- * Constructor
- *
- * @param shell
- */
- public SystemWorkOfflineAction(Shell shell) {
- super(SystemResources.RESID_OFFLINE_WORKOFFLINE_LABEL, SystemResources.RESID_OFFLINE_WORKOFFLINE_TOOLTIP, shell);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- setHelp(RSEUIPlugin.HELPPREFIX+"wofa0000"); //$NON-NLS-1$
- }
-
- /**
- * Override of parent. Called when testing if action should be enabled base on current
- * selection. We check the selected object is one of our subsystems, and if we are
- * currently connected.
- */
- public boolean checkObjectType(Object obj)
- {
- if (obj instanceof IHost)
- return true;
- else
- return false;
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run()
- {
- IHost conn = (IHost)getFirstSelection();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
-
- if (conn.isOffline())
- {
- // offline going online
- setChecked(false);
- sr.setHostOffline(conn, false);
- }
- else
- {
- // these need to be set before calling disconnect so the iSeires subsystems know not
- // to collapse
- sr.setHostOffline(conn, true);
- setChecked(true);
-
- // online going offline, disconnect all subsystems
- ISubSystem[] subsystems = sr.getSubSystems(conn);
- if (subsystems != null)
- {
- boolean cancelled = false;
- for (int i = 0; i < subsystems.length && !cancelled; i++)
- {
- try
- {
- subsystems[i].disconnect(false);
- } catch (InterruptedException e) {
- // user cancelled disconnect
- cancelled = true;
- } catch (Exception e) {
- SystemBasePlugin.logError("SystemWorkOfflineAction.run", e); //$NON-NLS-1$
- }
- }
- }
-
- // check that everything was disconnedted okay and this is not the local connection
- if(sr.isAnySubSystemConnected(conn) && !IRSESystemType.SYSTEMTYPE_LOCAL.equals(conn.getSystemType()))
- {
- // backout changes, likely because user cancelled the disconnect
- setChecked(false);
- sr.setHostOffline(conn, false);
- }
- }
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.actions.SystemBaseAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection) {
- if (super.updateSelection(selection))
- {
- setChecked(((IHost) selection.getFirstElement()).isOffline());
- return true;
- }
-
- return false;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 2beecf79f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkWithProfilesAction.java
+++ /dev/null
@@ -1,55 +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.rse.core.SystemPerspectiveHelpers;
-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;
-
-
-/**
- * The action shows in the local toolbar of the Remote Systems View, and
- * users can select it to give the Team view focus.
- */
-public class SystemWorkWithProfilesAction extends SystemBaseAction
-
-{
- //private ISystemRegistry sr = null;
-
- /**
- * Constructor
- */
- public SystemWorkWithProfilesAction(Shell parent)
- {
- super(SystemResources.ACTION_WORKWITH_PROFILES_LABEL, SystemResources.ACTION_WORKWITH_PROFILES_TOOLTIP, parent);
- setSelectionSensitive(false);
- allowOnMultipleSelection(true);
- //sr = RSEUIPlugin.getTheSystemRegistry();
- setHelp(RSEUIPlugin.HELPPREFIX+"actnwwpr"); //$NON-NLS-1$
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- SystemPerspectiveHelpers.showView(SystemTeamViewPart.ID);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/TestPopupMenuAction1.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/TestPopupMenuAction1.java
deleted file mode 100644
index bdee9f2fc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/TestPopupMenuAction1.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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;
-/**
- * This is just a test action to ensure the popupMenus extension point works
- * for adding popup menu actions to remote objects
- */
-public class TestPopupMenuAction1 extends SystemAbstractPopupMenuExtensionAction
-{
-
-
-
- /**
- * Constructor for TestPopupMenuAction1
- */
- public TestPopupMenuAction1()
- {
- super();
- }
-
- /**
- * Called when the user selects this action
- */
- public void run()
- {
- printTest();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index bdf37af36..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/EnvironmentVariablesPromptDialog.java
+++ /dev/null
@@ -1,248 +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.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;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * Dialog for prompting the user to add / change an environment variable.
- */
-public class EnvironmentVariablesPromptDialog extends SystemPromptDialog implements ModifyListener {
-
-
- private Text nameTextField, valueTextField;
- private String name, value, systemType, invalidNameChars;
- private boolean change; // Is this dialog for add or change
- private String[] existingNames;
-
- /**
- * Constructor for EnvironmentVariablesPromptDialog.
- * @param shell
- * @param title
- */
- public EnvironmentVariablesPromptDialog(Shell shell, String title, String systemType, String invalidNameChars, String[] existingNames, boolean change) {
- super(shell, title);
- this.change = change;
- this.systemType = systemType;
- this.invalidNameChars = invalidNameChars;
- this.existingNames = existingNames;
- }
-
- /**
- * Constructor for EnvironmentVariablesPromptDialog.
- * @param shell
- * @param title
- * @param inputObject
- */
- public EnvironmentVariablesPromptDialog(Shell shell, String title, Object inputObject, String invalidNameChars, String[] existingNames, boolean change) {
- super(shell, title, inputObject);
- this.change = change;
- this.invalidNameChars = invalidNameChars;
- this.existingNames = existingNames;
- }
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent) {
-
- Composite page = SystemWidgetHelpers.createComposite(parent, 2);
-
- // Prompt for name
- SystemWidgetHelpers.createLabel(page, SystemResources.RESID_SUBSYSTEM_ENVVAR_NAME_LABEL);
- nameTextField = SystemWidgetHelpers.createTextField(page, null);
- nameTextField.setToolTipText(SystemResources.RESID_SUBSYSTEM_ENVVAR_NAME_TOOLTIP);
- if (name != null && !name.trim().equals("")) //$NON-NLS-1$
- {
- nameTextField.setText(name);
- setInitialOKButtonEnabledState(true);
- }
- else
- {
- setInitialOKButtonEnabledState(false);
- }
- nameTextField.addModifyListener(this);
-
- // Prompt for value
- SystemWidgetHelpers.createLabel(page, SystemResources.RESID_SUBSYSTEM_ENVVAR_VALUE_LABEL);
- valueTextField = SystemWidgetHelpers.createTextField(page, null);
- valueTextField.setToolTipText(SystemResources.RESID_SUBSYSTEM_ENVVAR_VALUE_TOOLTIP);
- if (value != null)
- {
- valueTextField.setText(value);
- }
-
- if (!change)
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "envv0001"); //$NON-NLS-1$
- else
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "envv0002"); //$NON-NLS-1$
-
-
- // Set name and value limits for known system types
- if (systemType != null)
- {
- if (systemType.equals("iSeries")) //$NON-NLS-1$
- {
- nameTextField.setTextLimit(128);
- valueTextField.setTextLimit(1024);
- }
- else if (systemType.equals("Windows")) //$NON-NLS-1$
- {
- nameTextField.setTextLimit(300);
- valueTextField.setTextLimit(1024);
- }
- else if (systemType.equals("Local")) //$NON-NLS-1$
- {
- if (System.getProperty("os.name").toLowerCase().indexOf("win") != -1) //$NON-NLS-1$ //$NON-NLS-2$
- {
- nameTextField.setTextLimit(300);
- valueTextField.setTextLimit(1024);
- }
- }
- }
-
- return parent;
- }
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl() {
- return nameTextField;
- }
-
- /**
- * Get the environment varaible name entered in the dialog.
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Get the environment varaible value entered in the dialog.
- */
- public String getValue()
- {
- return value;
- }
-
- /**
- * Preset the name for the environment variable
- */
- public void setName(String name)
- {
- this.name = name;
- }
-
- /**
- * Preset the value for the environment variable
- */
- public void setValue(String value)
- {
- this.value = value;
- }
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemPromptDialog#processOK()
- */
- protected boolean processOK() {
- if (nameTextField.getText() != null && !nameTextField.getText().trim().equals("")) //$NON-NLS-1$
- {
- String nameStr;
- if (invalidNameChars != null && invalidNameChars.indexOf(' ') != -1)
- {
- nameStr = nameTextField.getText().trim();
- }
- else
- {
- nameStr = nameTextField.getText();
- }
-
- // dy: Change to use a String of invalid charactes supplied by the subsystem
- //if (nameStr.indexOf('=') > 0 || nameStr.indexOf(' ') > 0)
- if (invalidNameChars != null)
- {
- for (int i = 0; i < invalidNameChars.length(); i++)
- {
- if (nameStr.indexOf(invalidNameChars.charAt(i)) != -1)
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_INVALIDCHAR));
- nameTextField.setFocus();
- return false;
- }
- }
- }
-
- if (existingNames != null)
- {
- // Check if this one already exists
- for (int i = 0; i < existingNames.length; i++)
- {
- if (nameStr.equals(existingNames[i]))
- {
- if (!change || !nameStr.equals(name))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_DUPLICATE);
- msg.makeSubstitution(nameStr);
- setErrorMessage(msg);
- nameTextField.setFocus();
- return false;
- }
- }
- }
- }
-
- name = nameStr;
- value = valueTextField.getText();
- return true;
- }
- else
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_NONAME));
- nameTextField.setFocus();
- return false;
- }
- }
-
- /**
- * @see org.eclipse.swt.events.ModifyListener#modifyText(ModifyEvent)
- */
- public void modifyText(ModifyEvent e) {
- if (nameTextField.getText().trim().equals("")) //$NON-NLS-1$
- {
- enableOkButton(false);
- }
- else
- {
- enableOkButton(true);
- }
-
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISignonValidator.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISignonValidator.java
deleted file mode 100644
index 876d69a3a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISignonValidator.java
+++ /dev/null
@@ -1,48 +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.model.SystemSignonInformation;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Interace for providing a signon validator to the password prompt dialog.
- */
-public interface ISignonValidator
-{
-
- /**
- * Used by ISystemPasswordPromptDialog to verify if the password entered by the user
- * is correct.
- *
- * @return null if the password is valid, otherwise a SystemMessage is returned that can
- * be displayed to the end user.
- */
- public SystemMessage isValid(ISystemPasswordPromptDialog dialog, String userid, String password);
-
- /**
- * Verify if persisted userid and password are still valid
- *
- * @param shell Shell: if null the validator will run headless, if not null then the validator
- * may use the shell to prompt the user (for example, if the password has expired.)
- *
- * @return true if signonInfo contains a valid signon, false otherwise.
- */
- public boolean isValid(Shell shell, SystemSignonInformation signonInfo);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPasswordPromptDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPasswordPromptDialog.java
deleted file mode 100644
index cdcb64ab7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPasswordPromptDialog.java
+++ /dev/null
@@ -1,100 +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.subsystems.IConnectorService;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Suggested interface for a dialog used to prompt user for a password.
- */
-public interface ISystemPasswordPromptDialog
-{
- /**
- * Set modal vs modeless
- */
- public void setBlockOnOpen(boolean block);
- /**
- * Open the dialog
- */
- public int open();
- /**
- * Set the input System object in which the user is attempting to do a connect action.
- * This is used to query the system type, host name and userId to display to the user for
- * contextual information.
- * <p>
- * This must be called right after instantiating this dialog.
- */
- public void setSystemInput(IConnectorService systemObject);
- /**
- * Allow caller to determine if window was cancelled or not.
- */
- public boolean wasCancelled();
- /**
- * Call this to specify a validator for the userId. It will be called per keystroke.
- */
- public void setUserIdValidator(ISystemValidator v);
- /**
- * Call this to specify a validator for the password. It will be called per keystroke.
- */
- public void setPasswordValidator(ISystemValidator v);
- /**
- * Call this to specify a validator for the signon. It will be called when the OK button is pressed.
- */
- public void setSignonValidator(ISignonValidator v);
- /**
- * Call this to force the userId and password to uppercase
- */
- public void setForceToUpperCase(boolean force);
- /**
- * Call this to query the force-to-uppercase setting
- */
- public boolean getForceToUpperCase();
- /**
- * Return the userId entered by user
- */
- public String getUserId();
- /**
- * Return the password entered by user
- */
- public String getPassword();
- /**
- * Sets the password
- */
- public void setPassword(String password);
- /**
- * Preselect the save password checkbox. Default value is to not
- * select the save password checkbox.
- */
- public void setSavePassword(boolean save);
- /**
- * Return true if the user changed the user id
- */
- public boolean getIsUserIdChanged();
- /**
- * Return true if the user elected to make the changed user Id a permanent change.
- */
- public boolean getIsUserIdChangePermanent();
- /**
- * Return true if the user elected to save the password
- */
- public boolean getIsSavePassword();
- /**
- * Return the shell for this dialog
- */
- public Shell getShell();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPromptDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPromptDialog.java
deleted file mode 100644
index 7c204f143..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPromptDialog.java
+++ /dev/null
@@ -1,57 +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;
-
-
-/**
- * Suggested interface for dialogs used in actions in remote system framework.
- */
-public interface ISystemPromptDialog
-{
- /**
- * For explicitly setting input object
- */
- public void setInputObject(Object inputObject);
-
- /**
- * For explicitly getting input object
- */
- public Object getInputObject();
-
- /**
- * For explicitly getting output object after dialog is dismissed. Set by the
- * dialog's processOK method.
- */
- public Object getOutputObject();
-
- /**
- * Allow caller to determine if window was cancelled or not.
- */
- public boolean wasCancelled();
-
- /**
- * Expose inherited protected method convertWidthInCharsToPixels as a publicly
- * excessible method
- */
- public int publicConvertWidthInCharsToPixels(int chars);
- /**
- * Expose inherited protected method convertHeightInCharsToPixels as a publicly
- * excessible method
- */
- public int publicConvertHeightInCharsToPixels(int chars);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemTypedObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemTypedObject.java
deleted file mode 100644
index 8a86b0cb2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemTypedObject.java
+++ /dev/null
@@ -1,42 +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.jface.resource.ImageDescriptor;
-
-/**
- * The re-usable rename and delete dialogs in RSE require the objects to be adaptable to
- * ISystemViewElementAdapter, in order to show the object's type in the dialog. If you
- * want to re-use these dialogs for inputs that do not adapt to ISystemViewElementAdapter,
- * then ensure your input objects implement this interface.
- */
-public interface ISystemTypedObject
-{
- /**
- * Return the name of the object.
- */
- public String getName();
- /**
- * Return the type of the object. This is a displayable string, used to tell the user
- * what type of resource this is.
- */
- public String getType();
- /**
- * Returns an image descriptor for the image to represent this object. More efficient than getting the image.
- */
- public ImageDescriptor getImageDescriptor();
-} \ No newline at end of file
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
deleted file mode 100644
index b8f660e98..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemChangePasswordDialog.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.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;
-
-/**
- * A SystemChangePasswordDialog is typically presented when the password on the remote system has expired
- * and a new one needs to be saved. This dialog presents presents two enabled text fields - the first holds
- * the new password, the second holds its confirmation.
- * There is also a checkbox to save the password. Actually saving the password is the responsibility of the client.
- */
-public class SystemChangePasswordDialog extends SystemPromptDialog
-{
- private String _hostname;
- private String _user;
- private String _newPassword = ""; //$NON-NLS-1$
-
- private Text _txtNewPassword;
- private Text _txtConfirmPassword;
-
- private boolean savePassword = false;
- protected Button _chkBoxSavePassword;
-
- private boolean newPasswordModified = false;
- private boolean confirmModified = false;
-
- /**
- * Construct a new SystemChangePasswordDialog. Since this dialog is asking for a new password
- * there is no need to supply the old password, however a remote system will usually require
- * the old password to effect a change. Thus clients of this class would typically be expected
- * to have this available.
- * @param shell The shell the dialog will use to present itself.
- * @param hostname The remote host name.
- * @param userid The user id that will be presented. May be the empty string.
- * @param msg The message that will be presented when the dialog is initially shown. This may be null.
- */
- 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("")) //$NON-NLS-1$
- {
- 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/SystemControlEnableState.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemControlEnableState.java
deleted file mode 100644
index 23b35feb3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemControlEnableState.java
+++ /dev/null
@@ -1,155 +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 java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.ui.view.SystemPropertySheetForm;
-import org.eclipse.rse.ui.view.SystemViewForm;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-/**
- * Helper class to save the enable/disable state of a control
- * including all its descendent controls.
- */
-public class SystemControlEnableState
-{
-
-
-
- /**
- * List of exception controls (element type: <code>Control</code>);
- * <code>null</code> if none.
- */
- private List exceptions = null;
-
- /**
- * List of saved states (element type: <code>ItemState</code>).
- */
- private List states;
-
- /**
- * Internal class for recording the enable/disable state of a
- * single control.
- */
- private class ItemState
- {
- protected Control item;
- protected boolean state;
- public ItemState(Control item, boolean state)
- {
- this.item = item;
- this.state = state;
- }
- public void restore()
- {
- if (item != null)
- item.setEnabled(state);
- }
- }
-
- /**
- * Creates a new object and saves in it the current enable/disable
- * state of the given control and its descendents; the controls
- * that are saved are also disabled.
- *
- * @param w the control
- */
- protected SystemControlEnableState(Control w)
- {
- this(w, null);
- }
- /**
- * Creates a new object and saves in it the current enable/disable
- * state of the given control and its descendents except for the
- * given list of exception cases; the controls that are saved
- * are also disabled.
- *
- * @param w the control
- * @param exceptions the list of controls to not disable
- * (element type: <code>Control</code>), or <code>null</code> if none
- */
- protected SystemControlEnableState(Control w, List exceptions)
- {
- super();
- states = new ArrayList();
- this.exceptions = exceptions;
- readStateForAndDisable(w);
- }
- /**
- * Saves the current enable/disable state of the given control
- * and its descendents in the returned object; the controls
- * are all disabled.
- *
- * @param w the control
- * @return an object capturing the enable/disable state
- */
- public static SystemControlEnableState disable(Control w)
- {
- return new SystemControlEnableState(w);
- }
- /**
- * Saves the current enable/disable state of the given control
- * and its descendents in the returned object except for the
- * given list of exception cases; the controls that are saved
- * are also disabled.
- *
- * @param w the control
- * @param exceptions the list of controls to not disable
- * (element type: <code>Control</code>)
- * @return an object capturing the enable/disable state
- */
- public static SystemControlEnableState disable(Control w, List exceptions)
- {
- return new SystemControlEnableState(w, exceptions);
- }
- /**
- * Recursively reads the enable/disable state for the given window
- * and disables all controls.
- */
- private void readStateForAndDisable(Control w)
- {
- if ((exceptions != null && exceptions.contains(w)))
- return;
-
- if ((w instanceof Composite) && !(w instanceof SystemViewForm) && !(w instanceof SystemPropertySheetForm))
- {
- Composite c = (Composite) w;
- Control[] children = c.getChildren();
- for (int i = 0; i < children.length; i++)
- {
- readStateForAndDisable(children[i]);
- }
- }
- // XXX: Workaround for 1G2Q8SS: ITPUI:Linux - Combo box is not enabled in "File->New->Solution"
- states.add(new ItemState(w, w.getEnabled()));
- w.setEnabled(false);
- }
- /**
- * Restores the window enable state saved in this object.
- */
- public void restore()
- {
- int size = states.size();
- for (int i = 0; i < size; i++)
- {
- ((ItemState) states.get(i)).restore();
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index e5c84cd97..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemCopyProfileDialog.java
+++ /dev/null
@@ -1,283 +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.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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.ValidatorProfileName;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Dialog for copying a system profile.
- */
-public class SystemCopyProfileDialog extends SystemPromptDialog
- implements ISystemPropertyConstants
-{
- private Text newName;
- private Button makeActiveCB;
- private String newNameString, inputName;
- private boolean makeActive = false;
- private SystemMessage errorMessage;
- private ISystemValidator nameValidator;
- private boolean initialized = false;
- private ISystemProfile profile;
-
- /**
- * Constructor when profile not already known
- * @param shell The parent window hosting this dialog
- */
- public SystemCopyProfileDialog(Shell shell)
- {
- this(shell, null);
- }
- /**
- * Constructor when profile known
- * @param shell The parent window hosting this dialog
- * @param profile The profile to be copied
- */
- public SystemCopyProfileDialog(Shell shell, ISystemProfile profile)
- {
- super(shell, SystemResources.RESID_COPY_PROFILE_TITLE);
- this.profile = profile;
- if (profile != null)
- {
- setInputObject(profile);
- }
-
- // FIXME cast to SystemProfileManager is temporary to get at api - need to use an adapter for getting validators
- SystemProfileManager mgr = (SystemProfileManager)RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager();
- nameValidator = mgr.getProfileNameValidator((String)null);
- //pack();
- setHelp(RSEUIPlugin.HELPPREFIX+"drnp0000"); //$NON-NLS-1$
- }
- /**
- * Create message line. Intercept so we can set msg line of form.
- */
- protected ISystemMessageLine createMessageLine(Composite c)
- {
- super.createMessageLine(c);
- //form.setMessageLine(msgLine);
- return fMessageLine;
- }
-
-
- /**
- * Return widget to set focus to initially
- */
- protected Control getInitialFocusControl()
- {
- return newName;
- }
-
- /**
- * Set the name validator
- */
- public void setNameValidator(ISystemValidator nv)
- {
- nameValidator = nv;
- }
-
- /**
- * Create widgets, and populate given composite with them
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // ENTRY FIELD
- newName = SystemWidgetHelpers.createLabeledTextField(composite_prompts,null,
- SystemResources.RESID_COPY_PROFILE_PROMPT_LABEL, SystemResources.RESID_COPY_PROFILE_PROMPT_TOOLTIP);
- newName.setTextLimit(ValidatorProfileName.MAX_PROFILENAME_LENGTH); // defect 41816
- // Make active
- makeActiveCB = SystemWidgetHelpers.createCheckBox(
- composite_prompts, nbrColumns, null, SystemResources.RESID_NEWPROFILE_MAKEACTIVE_LABEL, SystemResources.RESID_NEWPROFILE_MAKEACTIVE_TOOLTIP);
-
- // SET HELP CONTEXT IDS...
- //SystemWidgetHelpers.setHelp(newName, RSEUIPlugin.HELPPREFIX+"drnp0002", RSEUIPlugin.HELPPREFIX+"drnp0000");
- SystemWidgetHelpers.setHelp(newName, RSEUIPlugin.HELPPREFIX+"drnp0002"); //$NON-NLS-1$
- //SystemWidgetHelpers.setHelp(makeActiveCB, RSEUIPlugin.HELPPREFIX+"drnp0003", RSEUIPlugin.HELPPREFIX+"drnp0000");
- SystemWidgetHelpers.setHelp(makeActiveCB, RSEUIPlugin.HELPPREFIX+"drnp0003"); //$NON-NLS-1$
-
- initialize();
-
- // add keystroke listeners...
- newName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateNameInput();
- }
- }
- );
-
- 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.
- */
- public void setInputObject(Object inputObject)
- {
- //System.out.println("INSIDE SETINPUTOBJECT: " + inputObject + ", "+inputObject.getClass().getName());
- super.setInputObject(inputObject);
- if (inputObject instanceof SystemSimpleContentElement)
- {
- SystemSimpleContentElement element = (SystemSimpleContentElement)inputObject;
- inputName = element.getName();
- }
- else if (inputObject instanceof ISelection)
- {
- SystemSimpleContentElement element = (SystemSimpleContentElement)(((IStructuredSelection)inputObject).getFirstElement());
- inputName = element.getName();
- }
- else if (inputObject instanceof ISystemProfile)
- inputName = profile.getName();
- initialize();
- }
-
- /**
- * Initialize input fields from input
- */
- protected void initialize()
- {
- if (!initialized && (newName!=null) && (inputName!=null))
- {
- initialized = true;
- newName.setText(inputName);
- newName.selectAll();
- if (makeActiveCB != null)
- makeActiveCB.setSelection(true);
- setPageComplete(false);
- }
- }
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- newNameString = newName.getText().trim();
- boolean closeDialog = verify();
- if (closeDialog)
- {
- if (makeActiveCB != null)
- makeActive = makeActiveCB.getSelection();
- setOutputObject(newNameString);
- }
- return closeDialog;
- }
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify()
- {
- clearErrorMessage();
- errorMessage = validateNameInput();
- if (errorMessage != null)
- newName.setFocus();
- return (errorMessage == null);
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- * @see #setNameValidator(ISystemValidator)
- */
- protected SystemMessage validateNameInput()
- {
- errorMessage = nameValidator.validate(newName.getText());
- 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 theNewName = newName.getText().trim();
- pageComplete = (theNewName.length() > 0) && !(theNewName.equalsIgnoreCase(inputName));
- }
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- setPageComplete(isPageComplete());
- }
-
- /**
- * Returns the user-entered new name
- */
- public String getNewName()
- {
- return newNameString;
- }
- /**
- * Returns the make-active checkbox state
- */
- public boolean getMakeActive()
- {
- return makeActive;
- }
-
-
- /**
- * Returns the user-entered new name as an array for convenience to ISystemRenameTarget hosts.
- */
- public String[] getNewNameArray()
- {
- String[] newNames = new String[1];
- newNames[0] = newNameString;
- return newNames;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index a2bebb358..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteDialog.java
+++ /dev/null
@@ -1,294 +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.jface.viewers.ColumnLayoutData;
-import org.eclipse.jface.viewers.ColumnPixelData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-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.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-/**
- * Dialog for confirming resource deletion.
- * <p>
- * This is a re-usable dialog that you can use directly, or via the {@link org.eclipse.rse.ui.actions.SystemCommonDeleteAction}
- * action. It asks the user to confirm the deletion of the input selection.
- * <p>If the input objects do not adapt to {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter} or
- * {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter}, then they should implement the
- * interface {@link org.eclipse.rse.ui.dialogs.ISystemTypedObject} so that their type can be
- * displayed in this delete confirmation dialog.
- *
- * @see org.eclipse.rse.ui.actions.SystemCommonDeleteAction
- */
-public class SystemDeleteDialog extends SystemPromptDialog
- implements ISystemPropertyConstants,
- ISelectionChangedListener
-{
- private String warningMessage, warningTip;
- private String promptLabel;
- private SystemDeleteTableProvider sdtp;
- //private Label prompt;
- private Table table;
- private TableViewer tableViewer;
- private GridData tableData;
-
- // column headers
- private String columnHeaders[] = {
- "", //$NON-NLS-1$
- SystemResources.RESID_DELETE_COLHDG_OLDNAME,
- SystemResources.RESID_DELETE_COLHDG_TYPE
- };
-
- // column layout
- private ColumnLayoutData columnLayouts[] =
- {
- new ColumnPixelData(19, false),
- new ColumnWeightData(150,150,true),
- new ColumnWeightData(120,120,true)
- };
-
- // give each column a property value to identify it
- private static String[] tableColumnProperties =
- {
- ISystemPropertyConstants.P_OK,
- IBasicPropertyConstants.P_TEXT,
- ISystemPropertyConstants.P_TYPE,
- };
-
- /**
- * Constructor for SystemUpdateConnectionDialog
- */
- public SystemDeleteDialog(Shell shell)
- {
- super(shell, SystemResources.RESID_DELETE_TITLE);
- super.setOkButtonLabel(SystemResources.RESID_DELETE_BUTTON);
- setHelp(RSEUIPlugin.HELPPREFIX+"ddlt0000"); //$NON-NLS-1$
- }
-
- /**
- * Create message line. Intercept so we can set msg line of form.
- */
- protected ISystemMessageLine createMessageLine(Composite c)
- {
- /*ISystemMessageLine msgLine =*/ super.createMessageLine(c);
- return fMessageLine;
- }
-
- /**
- * Specify a warning message to show at the top of the dialog
- */
- public void setWarningMessage(String msg, String tip)
- {
- this.warningMessage = msg;
- this.warningTip = tip;
- }
-
- /**
- * Specify the text to show for the label prompt. The default is
- * "Delete selected resources?"
- */
- public void setPromptLabel(String text)
- {
- this.promptLabel = text;
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return tableViewer.getControl();
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int nbrColumns = 2;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // PROMPT
- if (promptLabel == null) {
- Object input = getInputObject();
-
- if (input != null && input instanceof IStructuredSelection) {
- int size = ((IStructuredSelection)input).size();
-
- if (size > 1) {
- /*prompt =*/ SystemWidgetHelpers.createLabel(composite, SystemResources.RESID_DELETE_PROMPT, nbrColumns);
- }
- else {
- /*prompt =*/ SystemWidgetHelpers.createLabel(composite, SystemResources.RESID_DELETE_PROMPT_SINGLE, nbrColumns);
- }
- }
- // should never get here
- else {
- /*prompt =*/ SystemWidgetHelpers.createLabel(composite, SystemResources.RESID_DELETE_PROMPT, nbrColumns);
- }
- }
- else {
- /*prompt =*/ SystemWidgetHelpers.createVerbiage(composite, promptLabel, nbrColumns, false, 200);
- }
-
- // WARNING
- if (warningMessage != null)
- {
- // filler line
- SystemWidgetHelpers.createLabel(composite, "", nbrColumns); //$NON-NLS-1$
- // create image
- Image image = getShell().getDisplay().getSystemImage(SWT.ICON_WARNING);
- Label imageLabel = null;
- if (image != null)
- {
- imageLabel = new Label(composite, 0);
- image.setBackground(imageLabel.getBackground());
- imageLabel.setImage(image);
- imageLabel.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_CENTER |
- GridData.VERTICAL_ALIGN_BEGINNING));
- }
- Label warningLabel = SystemWidgetHelpers.createLabel(composite, warningMessage);
- if (warningTip != null)
- {
- warningLabel.setToolTipText(warningTip);
- if (imageLabel!=null) {
- imageLabel.setToolTipText(warningTip);
- }
- }
- // filler line
- SystemWidgetHelpers.createLabel(composite, "", nbrColumns); //$NON-NLS-1$
- }
-
- // TABLE
- tableViewer = createTableViewer(composite, nbrColumns);
- createColumns();
- tableViewer.setColumnProperties(tableColumnProperties);
-
- sdtp = new SystemDeleteTableProvider();
-
- int width = tableData.widthHint;
- int nbrRows = Math.min(getRows().length,8);
- int rowHeight = table.getItemHeight() + table.getGridLineWidth();
- int sbHeight = table.getHorizontalBar().getSize().y;
- int height = (nbrRows * rowHeight) + sbHeight;
-
- tableData.heightHint = height;
- table.setLayoutData(tableData);
- table.setSize(width, height);
-
- tableViewer.setLabelProvider(sdtp);
- tableViewer.setContentProvider(sdtp);
-
- Object input = getInputObject();
- tableViewer.setInput(input);
-
- return composite;
- }
-
- private TableViewer createTableViewer(Composite parent, int nbrColumns)
- {
- table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.HIDE_SELECTION);
- table.setLinesVisible(true);
- tableViewer = new TableViewer(table);
- tableData = new GridData();
- tableData.horizontalAlignment = GridData.FILL;
- tableData.grabExcessHorizontalSpace = true;
- tableData.widthHint = 350;
- tableData.heightHint = 30;
- tableData.verticalAlignment = GridData.CENTER;
- tableData.grabExcessVerticalSpace = true;
- tableData.horizontalSpan = nbrColumns;
- table.setLayoutData(tableData);
- return tableViewer;
- }
-
- private void createColumns()
- {
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
- table.setHeaderVisible(true);
- for (int i = 0; i < columnHeaders.length; i++)
- {
- layout.addColumnData(columnLayouts[i]);
- TableColumn tc = new TableColumn(table, SWT.NONE,i);
- tc.setResizable(columnLayouts[i].resizable);
- tc.setText(columnHeaders[i]);
- }
- }
-
- public void selectionChanged(SelectionChangedEvent event)
- {
- }
-
- /**
- * Override of parent. Must pass selected object onto the form for initializing fields.
- * Called by SystemDialogAction's default run() method after dialog instantiated.
- */
- public void setInputObject(Object inputObject)
- {
- super.setInputObject(inputObject);
- }
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- return true;
- }
-
- /**
- * Returns the rows of deletable items.
- */
- public SystemDeleteTableRow[] getRows()
- {
- return (SystemDeleteTableRow[])sdtp.getElements(getInputObject());
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableProvider.java
deleted file mode 100644
index 3295b84c4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableProvider.java
+++ /dev/null
@@ -1,173 +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 java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-/**
- * This class is the table provider class for the delete dialog
- */
-public class SystemDeleteTableProvider implements ITableLabelProvider, IStructuredContentProvider
-{
-
- static final int COLUMN_IMAGE = 0;
- static final int COLUMN_NAME = 1;
- static final int COLUMN_TYPE = 2;
- protected Map imageTable = new Hashtable(20);
- protected Object[] children = null;
-
- /**
- * Constructor for SystemDeleteTableProvider
- */
- public SystemDeleteTableProvider()
- {
- super();
- }
-
- private SystemDeleteTableRow getTableRow(Object element)
- {
- return (SystemDeleteTableRow)element;
- }
-
- private Image getImageFromDescriptor(ImageDescriptor descriptor)
- {
- if (descriptor == null)
- return null;
- //obtain the cached image corresponding to the descriptor
- Image image = (Image) imageTable.get(descriptor);
- if (image == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- //System.out.println("...image = " + image);
- return image;
- }
-
- /**
- * @see ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int column)
- {
- if (column == COLUMN_IMAGE)
- return getImageFromDescriptor(getTableRow(element).getImageDescriptor());
- else
- return null;
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int column)
- {
- String text = ""; //$NON-NLS-1$
- if (column == COLUMN_NAME)
- text = getTableRow(element).getName();
- else if (column == COLUMN_TYPE)
- text = getTableRow(element).getType();
- //System.out.println("INSIDE GETCOLUMNTEXT: " + column + ", " + text + ", " + getTableRow(element));
- return text;
- }
-
- /**
- * @see IBaseLabelProvider#addListener(ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener)
- {
- }
-
- /**
- * @see IBaseLabelProvider#dispose()
- */
- public void dispose()
- {
- // The following we got from WorkbenchLabelProvider
- if (imageTable != null)
- {
- Collection imageValues = imageTable.values();
- if (imageValues!=null)
- {
- Iterator images = imageValues.iterator();
- if (images!=null)
- while (images.hasNext())
- ((Image)images.next()).dispose();
- imageTable = null;
- }
- }
- }
-
- /**
- * @see IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property)
- {
- return true;
- }
-
- /**
- * @see IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener)
- {
- }
-
- /**
- * Return rows. Input must be an IStructuredSelection.
- */
- public Object[] getElements(Object inputElement)
- {
- if (children == null)
- {
- IStructuredSelection iss = (IStructuredSelection)inputElement;
- children = new SystemDeleteTableRow[iss.size()];
- Iterator i = iss.iterator();
- int idx = 0;
- while (i.hasNext())
- {
- children[idx] = new SystemDeleteTableRow(i.next(), idx);
- idx++;
- }
- }
- return children;
- }
-
- /**
- * Return the 0-based row number of the given element.
- */
- public int getRowNumber(SystemDeleteTableRow row)
- {
- return row.getRowNumber();
- }
-
- /**
- *
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index e166955c2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableRow.java
+++ /dev/null
@@ -1,202 +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.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-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.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;
-
-
-/**
- * Represents one row in the table in the SystemDeleteDialog dialog.
- */
-public class SystemDeleteTableRow
-{
-
- private Object element;
- private String name;
- private String type;
- private ImageDescriptor imageDescriptor;
- private ISystemViewElementAdapter adapter;
- private ISystemRemoteElementAdapter remoteAdapter;
- private int rowNbr = 0;
-
- public SystemDeleteTableRow(Object element, int rowNbr)
- {
- if (element instanceof SystemSimpleContentElement)
- element = ((SystemSimpleContentElement)element).getData();
- this.element = element;
- this.adapter = getAdapter(element);
- this.remoteAdapter = getRemoteAdapter(element);
- this.rowNbr = rowNbr;
- //this.oldName = getAdapter(element).getText(element);
- if (adapter != null)
- this.name = adapter.getName(element);
- else
- {
- if (element instanceof ISystemTypedObject)
- this.name = ((ISystemTypedObject)element).getName();
- else if (element instanceof IResource)
- this.name = ((IResource)element).getName();
- }
- ISystemViewElementAdapter typeAdapter = adapter;
- Object typeElement = element;
- if (typeElement instanceof ISystemFilterPoolReference)
- {
- typeElement = ((ISystemFilterPoolReference)typeElement).getReferencedFilterPool();
- typeAdapter = getAdapter(typeElement);
- }
- if (typeAdapter != null)
- this.type = typeAdapter.getType(typeElement);
- else
- {
- if (element instanceof ISystemTypedObject)
- this.type = ((ISystemTypedObject)element).getType();
- else if (element instanceof IResource)
- {
- if ((element instanceof IFolder) || (element instanceof IProject))
- this.type = SystemViewResources.RESID_PROPERTY_FILE_TYPE_FOLDER_VALUE;
- else
- this.type = SystemViewResources.RESID_PROPERTY_FILE_TYPE_FILE_VALUE;
- }
- else
- this.type = element.getClass().getName();
- }
- if (adapter != null)
- this.imageDescriptor = adapter.getImageDescriptor(element);
- else if (element instanceof ISystemTypedObject)
- this.imageDescriptor = ((ISystemTypedObject)element).getImageDescriptor();
- else if (element instanceof IFolder)
- this.imageDescriptor = //PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID);
- else if (element instanceof IFile)
- this.imageDescriptor = RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry().getImageDescriptor(name);
- }
-
- /**
- * Return the name of the item to be deleted
- * @return display name of the item.
- */
- public String getName()
- {
- return name;
- }
- /**
- * Return the resource type of the item to be deleted
- * @return resource type of the item
- */
- public String getType()
- {
- return type;
- }
- /**
- * Return the 0-based row number of this item
- * @return 0-based row number
- */
- public int getRowNumber()
- {
- return rowNbr;
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- */
- public ImageDescriptor getImageDescriptor()
- {
- return imageDescriptor;
- }
-
- /**
- * Get the input object this row represents
- */
- public Object getElement()
- {
- return element;
- }
- /**
- * Get the input object adapter for the input object this row represents
- */
- public ISystemViewElementAdapter getAdapter()
- {
- return adapter;
- }
- /**
- * Get the input object remote adapter for the input object this row represents
- */
- public ISystemRemoteElementAdapter getRemoteAdapter()
- {
- return remoteAdapter;
- }
- /**
- * Return true if this is a remote object
- */
- public boolean isRemote()
- {
- return (remoteAdapter != null);
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- public String toString()
- {
- return name;
- }
-
-
- /* THESE CAUSE GRIEF IF TWO OBJECTS WITH SAME NAME ARE SHOWN
- public boolean equals(Object o)
- {
- if (o instanceof SystemRenameTableRow)
- return ((SystemRenameTableRow)o).getOldName().equalsIgnoreCase(getOldName());
- else if (o instanceof SystemDeleteTableRow)
- return ((SystemDeleteTableRow)o).getOldName().equalsIgnoreCase(getOldName());
- else if (o instanceof String)
- return ((String)o).equalsIgnoreCase(getOldName());
- else
- return super.equals(o);
- }
- public int hashCode()
- {
- return getOldName().hashCode();
- }
- */
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemFilterTableDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemFilterTableDialog.java
deleted file mode 100644
index 4a7c4bdf0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemFilterTableDialog.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.StringComparePatternMatcher;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableView;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-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.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Widget;
-
-
-/**
- * @author dmcknigh
- */
-public class SystemFilterTableDialog extends SystemPromptDialog implements KeyListener, IDoubleClickListener
-{
- class InitialInputRunnable implements Runnable
- {
- public void run()
- {
- initInput();
- }
- }
-
- private SystemTableView _viewer;
- private Table table;
- private List _inputs;
- private IAdaptable _currentInput;
- private String _lastFilter;
- private String _lastType;
-
- private String[] _viewFilterStrings;
- private String[] _typeFilterStrings;
-
- private ISubSystem _subSystem;
-
- private Combo _inputText;
- private Button _browseButton;
-
- private Combo _typeCombo;
- private Combo _filterCombo;
-
- private String selected = null;
- private boolean _allowInputChange = true;
-
-
- public SystemFilterTableDialog(Shell shell, String title, ISubSystem subSystem, String input, String[] viewFilterStrings, String[] typeFilterStrings, boolean allowInputChange)
- {
- super(shell, title);
- _subSystem = subSystem;
- setNeedsProgressMonitor(true);
- _inputs = new ArrayList();
- _inputs.add(input);
- _viewFilterStrings = viewFilterStrings;
- _typeFilterStrings = typeFilterStrings;
- _allowInputChange = allowInputChange;
- }
-
-
- public SystemFilterTableDialog(Shell shell, String title, ISubSystem subSystem, List inputs, String[] viewFilterStrings, String[] typeFilterStrings, boolean allowInputChange)
- {
- super(shell, title);
- _subSystem = subSystem;
- setNeedsProgressMonitor(true);
- _inputs = inputs;
-
- _viewFilterStrings = viewFilterStrings;
- _typeFilterStrings = typeFilterStrings;
- _allowInputChange = allowInputChange;
- }
-
-
- protected ISystemViewElementAdapter getAdatperFor(IAdaptable obj)
- {
- return (ISystemViewElementAdapter)obj.getAdapter(ISystemViewElementAdapter.class);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.dialogs.SystemPromptDialog#createInner(org.eclipse.swt.widgets.Composite)
- */
- protected Control createInner(Composite parent)
- {
- Composite c = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- c.setLayout(layout);
- layout.numColumns =1;
- GridData gd = new GridData(GridData.FILL_BOTH);
- c.setLayoutData(gd);
-
- Composite inputC = new Composite(c, SWT.NONE);
- GridLayout ilayout = new GridLayout();
- inputC.setLayout(ilayout);
-
- if (_allowInputChange)
- {
- ilayout.numColumns =4;
- }
- else
- {
- ilayout.numColumns = 3;
- }
-
- GridData igd = new GridData(GridData.FILL_BOTH);
- inputC.setLayoutData(igd);
-
- // input
- SystemWidgetHelpers.createLabel(inputC, "Input"); //$NON-NLS-1$
- _inputText = new Combo(inputC, SWT.DROP_DOWN | SWT.READ_ONLY);
- _inputText.addListener(SWT.Selection, this);
-
-
- for (int i = 0; i < _inputs.size(); i++)
- {
- String input = (String)_inputs.get(i);
- if (input != null)
- {
- _inputText.add(input);
- }
- }
- _inputText.select(0);
-
- if (_allowInputChange)
- {
- _browseButton = SystemWidgetHelpers.createPushButton(inputC, SystemResources.BUTTON_BROWSE, this);
- }
-
- Composite filterC = new Composite(c, SWT.NONE);
- GridLayout flayout = new GridLayout();
- filterC.setLayout(flayout);
- flayout.numColumns =4;
-
- GridData fgd = new GridData(GridData.FILL_BOTH);
- filterC.setLayoutData(fgd);
-
- // type filter strings
- SystemWidgetHelpers.createLabel(filterC, SystemPropertyResources.RESID_PROPERTY_TYPE_LABEL);
- _typeCombo = new Combo(filterC, SWT.DROP_DOWN | SWT.READ_ONLY);
- for (int i = 0; i < _typeFilterStrings.length; i++)
- {
- if (null != _typeFilterStrings[i])
- {
- _typeCombo.add(_typeFilterStrings[i]);
- }
- }
- _typeCombo.select(0);
- _typeCombo.addKeyListener(this);
- _typeCombo.addListener(SWT.Selection, this);
-
- // view filter strings
- SystemWidgetHelpers.createLabel(filterC, SystemResources.RESID_FILTERSTRING_STRING_LABEL);
- _filterCombo = SystemWidgetHelpers.createCombo(filterC, this);
- _filterCombo.setText(_viewFilterStrings[0]);
- for (int i = 0; i < _viewFilterStrings.length; i++)
- {
- if (null != _viewFilterStrings[i])
- {
- _filterCombo.add(_viewFilterStrings[i]);
- }
- }
- _filterCombo.addKeyListener(this);
-
- // table
- table = new Table(c, SWT.BORDER);
- _viewer = new SystemTableView(table, this);
- _viewer.showColumns(false);
- _viewer.addDoubleClickListener(this);
-
- TableLayout tlayout = new TableLayout();
- table.setLayout(tlayout);
- table.setHeaderVisible(false);
- table.setLinesVisible(false);
-
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- gridData.heightHint = 200;
- gridData.widthHint = 200;
- table.setLayoutData(gridData);
-
-
-
-
- enableOkButton(false);
-
- return c;
- }
-
-
- protected void initInput()
- {
- if (_currentInput == null)
- {
- String input = (String)_inputs.get(0);
- try
- {
- _currentInput = (IAdaptable)_subSystem.getObjectWithAbsoluteName(input);
-
- ISystemViewElementAdapter adapter = getAdatperFor(_currentInput);
- if (adapter != null)
- {
- applyViewFilter(false);
- _viewer.setInput(_currentInput);
- _viewer.refresh();
- }
- }
- catch (Exception e)
- {
-
- }
- }
- }
-
- protected void applyViewFilter(boolean refresh)
- {
- String[] vfilters = new String[1];
-
- String typeFilter = _typeCombo.getText().toUpperCase();
-
- vfilters[0] = _filterCombo.getText().toUpperCase();
- if (!vfilters[0].endsWith("*")) //$NON-NLS-1$
- vfilters[0] += "*"; //$NON-NLS-1$
-
- if (_lastFilter != vfilters[0])
- {
- StringComparePatternMatcher matcher = new StringComparePatternMatcher(_lastFilter != null ?_lastFilter.toUpperCase() : null);
- if (_lastFilter == null || !matcher.stringMatches(vfilters[0]))
- {
- _lastFilter = vfilters[0];
- _lastType = typeFilter;
- if (_currentInput != null)
- {
- getAdatperFor(_currentInput).setFilterString(_lastFilter);
- }
-
- }
- else
- {
- _lastFilter = vfilters[0];
- _lastType = typeFilter;
- }
- ((SystemTableViewProvider)_viewer.getContentProvider()).flushCache();
- String[] tfilters = new String[1];
- tfilters[0] = _lastFilter + typeFilter;
- _viewer.setViewFilters(tfilters);
- }
- else if (_lastType != typeFilter)
- {
- _lastType = typeFilter;
- String[] tfilters = new String[1];
- tfilters[0] = _lastFilter + typeFilter;
- _viewer.setViewFilters(tfilters);
- }
-
- }
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.dialogs.SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- Display.getCurrent().asyncExec(new InitialInputRunnable());
- //initInput();
- return _filterCombo;
- }
-
- public void handleEvent(Event e)
- {
- Widget source = e.widget;
-
- if (source == _typeCombo)
- {
- applyViewFilter(true);
- }
- else if (source == _filterCombo)
- {
- if (_lastFilter == null || !_lastFilter.equals(_filterCombo.getText() + "*")) //$NON-NLS-1$
- {
- applyViewFilter(true);
- }
- }
- else if (source == _browseButton)
- {
- SystemSelectAnythingDialog dlg = new SystemSelectAnythingDialog(getShell(), SystemResources.ACTION_SELECT_INPUT_DLG);
- dlg.setInputObject(_currentInput);
- if (dlg.open() == Window.OK)
- {
- _currentInput = (IAdaptable)dlg.getSelectedObject();
- ISystemViewElementAdapter adapter = getAdatperFor(_currentInput);
- String objName = adapter.getAbsoluteName(_currentInput);
- if (!_inputs.contains(objName))
- {
- _inputs.add(0, objName);
- }
-
- _inputText.setText(objName);
- applyViewFilter(false);
- _viewer.setInput(_currentInput);
- _viewer.refresh();
- }
- }
- else if (source == _inputText)
- {
- int selected = _inputText.getSelectionIndex();
- String inputStr = (String)_inputs.get(selected);
- try
- {
- IAdaptable input = (IAdaptable)_subSystem.getObjectWithAbsoluteName(inputStr);
- if (input != _currentInput)
- {
- _currentInput = input;
- _inputText.setText(inputStr);
- applyViewFilter(false);
- _viewer.setInput(_currentInput);
- _viewer.refresh();
- }
- }
- catch (Exception e2)
- {
- }
- }
- }
-
- public void keyPressed(KeyEvent e)
- {
- }
-
- public void keyReleased(KeyEvent e)
- {
- if (e.widget == _filterCombo)
- {
- String vfilter = _filterCombo.getText();
- if (!vfilter.endsWith("*")) //$NON-NLS-1$
- vfilter += "*"; //$NON-NLS-1$
- if (_lastFilter == null || !_lastFilter.equals(vfilter))
- {
- //System.out.println("handling event");
- // System.out.println("\tchar ="+e.character);
- applyViewFilter(true);
- _filterCombo.clearSelection();
- _filterCombo.setFocus();
- }
- }
- }
- public void doubleClick(DoubleClickEvent event)
- {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null)
- return;
- processOK();
- close();
- }
-
-
- protected boolean processOK()
- {
- TableItem[] thisRow = table.getSelection();
- if (null != thisRow && thisRow.length == 1)
- {
- selected = thisRow[0].getText(0);
- }
- return true;
- }
-
- public String getSelected()
- {
- return selected;
- }
-
-
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java
deleted file mode 100644
index 240d0a7de..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-
-import java.util.List;
-
-import org.eclipse.rse.core.PasswordPersistenceManager;
-import org.eclipse.rse.core.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;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * SystemPasswordPersistencePrompt is used with the save password preference page
- * to prompt the user to add or change password information.
- */
-public final class SystemPasswordPersistencePrompt extends SystemPromptDialog implements ModifyListener
-{
-
-
-
- private Text hostname, userid, password, passwordVerify;
- private Combo systemType;
- private SystemSignonInformation signonInfo;
- private boolean change;
- private String originalHostname, originalUserid, originalSystemType;
-
- private List existingEntries;
-
- /**
- * Constructor for SystemPasswordPersistencePrompt.
- * @param shell
- * @param title
- */
- public SystemPasswordPersistencePrompt(Shell shell, String title, List existingEntries, boolean change) {
- super(shell, title);
- this.change = change;
- this.existingEntries = existingEntries;
- setInitialOKButtonEnabledState(false);
- }
-
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent) {
-
- Composite page = SystemWidgetHelpers.createComposite(parent, 2);
-
- // Hostname prompt
- SystemWidgetHelpers.createLabel(page, SystemResources.RESID_PREF_SIGNON_HOSTNAME_LABEL);
- hostname = SystemWidgetHelpers.createTextField(page, null, SystemResources.RESID_PREF_SIGNON_HOSTNAME_TOOLTIP);
- if (originalHostname != null)
- hostname.setText(originalHostname);
- hostname.addModifyListener(this);
-
- // System type prompt
- SystemWidgetHelpers.createLabel(page, SystemResources.RESID_PREF_SIGNON_SYSTYPE_LABEL, SystemResources.RESID_PREF_SIGNON_SYSTYPE_TOOLTIP);
- systemType = SystemWidgetHelpers.createReadonlyCombo(page, null);
- systemType.setItems(PasswordPersistenceManager.getInstance().getRegisteredSystemTypes());
- if (originalSystemType != null)
- systemType.setText(originalSystemType);
- systemType.addModifyListener(this);
-
- // User ID prompt
- SystemWidgetHelpers.createLabel(page, SystemResources.RESID_PREF_SIGNON_USERID_LABEL);
- userid = SystemWidgetHelpers.createTextField(page, null, SystemResources.RESID_PREF_SIGNON_USERID_TOOLTIP);
- if (originalUserid != null)
- userid.setText(originalUserid);
- userid.addModifyListener(this);
-
- // Password prompt
- SystemWidgetHelpers.createLabel(page, SystemResources.RESID_PREF_SIGNON_PASSWORD_LABEL);
- password = SystemWidgetHelpers.createTextField(page, null, SystemResources.RESID_PREF_SIGNON_PASSWORD_TOOLTIP);
- password.setEchoChar('*');
- password.addModifyListener(this);
-
- // Confirm password prompt
- SystemWidgetHelpers.createLabel(page, SystemResources.RESID_PREF_SIGNON_PASSWORD_VERIFY_LABEL);
- passwordVerify = SystemWidgetHelpers.createTextField(page, null,SystemResources.RESID_PREF_SIGNON_PASSWORD_TOOLTIP);
- passwordVerify.setEchoChar('*');
- passwordVerify.addModifyListener(this);
-
- return page;
- }
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl() {
- return hostname;
- }
-
- public SystemSignonInformation getSignonInformation() {
- return signonInfo;
- }
-
- /**
- * @see org.eclipse.rse.ui.dialogs.SystemPromptDialog#processOK()
- */
- protected boolean processOK() {
- // Check for blank fields
- String sHostName = hostname.getText();
- if (sHostName == null || sHostName.trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- okButton.setEnabled(false);
- hostname.setFocus();
- return false;
- }
-
- String sSystemType = systemType.getText();
- if (sSystemType == null || sSystemType.trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- okButton.setEnabled(false);
- systemType.setFocus();
- return false;
- }
-
- String sUserID = userid.getText();
- if (sUserID == null || sUserID.trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- okButton.setEnabled(false);
- userid.setFocus();
- return false;
- }
-
- String sPwd1 = password.getText();
- if (sPwd1 == null || sPwd1.trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- okButton.setEnabled(false);
- password.setFocus();
- return false;
- }
-
- String sPwd2 = passwordVerify.getText();
- if (sPwd2 == null || sPwd2.trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- okButton.setEnabled(false);
- passwordVerify.setFocus();
- return false;
- }
-
- // Check if new and verify passwords match
- if (!sPwd1.equals(sPwd2))
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_MISMATCH));
- okButton.setEnabled(false);
- password.setFocus();
- password.setSelection(0, sPwd1.length());
- return false;
- }
-
- signonInfo = new SystemSignonInformation(hostname.getText(), userid.getText(), password.getText(), systemType.getText());
-
- if (change)
- {
- if (exists(signonInfo.getHostname(), signonInfo.getUserid(), signonInfo.getSystemType()))
- {
- if (!signonInfo.getSystemType().equals(originalSystemType) ||
- !signonInfo.getHostname().equalsIgnoreCase(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 = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_EXISTS);
- msg.makeSubstitution(sUserID, sHostName);
- setErrorMessage(msg);
- okButton.setEnabled(false);
- hostname.setFocus();
- return false;
- }
- }
- }
- else
- {
- // Adding a new entry, make sure it doesn't already exist
- if (exists(signonInfo.getHostname(), signonInfo.getUserid(), signonInfo.getSystemType()))
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_EXISTS);
- msg.makeSubstitution(sUserID, sHostName);
- setErrorMessage(msg);
- okButton.setEnabled(false);
- hostname.setFocus();
- return false;
- }
- }
-
- return super.processOK();
- }
-
- /**
- * Check if a password is already saved for the given hostname, user ID and system type
- */
- private boolean exists(String hostname, String userID, String systemType)
- {
- SystemSignonInformation info;
- PasswordPersistenceManager manager = PasswordPersistenceManager.getInstance();
- boolean found = false;
-
- for (int i = 0; !found && i < existingEntries.size(); i++)
- {
- info = (SystemSignonInformation) existingEntries.get(i);
- if (hostname.equalsIgnoreCase(info.getHostname()) &&
- systemType.equals(info.getSystemType()))
- {
- if (!manager.isUserIDCaseSensitive(info.getSystemType()))
- {
- found = userID.equalsIgnoreCase(info.getUserid());
- }
- else
- {
- found = userID.equals(info.getUserid());
- }
- }
- }
-
- return found;
- }
-
- /**
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- super.createControl(parent);
- if (change)
- {
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "pwdi0002"); //$NON-NLS-1$
- password.setFocus();
- }
- else
- {
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "pwdi0001"); //$NON-NLS-1$
- hostname.setFocus();
- }
- }
-
- /**
- * Set the input data to prepopulate the change dialog
- */
- public void setInputData(String systemtype, String hostname, String userid)
- {
- originalSystemType = systemtype;
- originalHostname = hostname;
- originalUserid = userid;
- }
- /**
- * @see org.eclipse.swt.events.ModifyListener#modifyText(ModifyEvent)
- */
- public void modifyText(ModifyEvent e) {
- if (e.getSource() == hostname && hostname.getText().trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- hostname.setFocus();
- okButton.setEnabled(false);
- }
- else if (e.getSource() == userid && userid.getText().trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- userid.setFocus();
- okButton.setEnabled(false);
- }
- else if (e.getSource() == systemType && systemType.getText().trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- systemType.setFocus();
- okButton.setEnabled(false);
- }
- else if (e.getSource() == password && password.getText().trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- password.setFocus();
- okButton.setEnabled(false);
- }
- else if (e.getSource() == passwordVerify && passwordVerify.getText().trim().equals("")) //$NON-NLS-1$
- {
- setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD));
- passwordVerify.setFocus();
- okButton.setEnabled(false);
- }
- else
- {
- clearErrorMessage();
-
- if (hostname.getText().trim().equals("") || //$NON-NLS-1$
- userid.getText().trim().equals("") || //$NON-NLS-1$
- systemType.getText().trim().equals("") || //$NON-NLS-1$
- password.getText().trim().equals("") || //$NON-NLS-1$
- passwordVerify.getText().trim().equals("")) //$NON-NLS-1$
- {
- // clear error messages but button stays disabled
- okButton.setEnabled(false);
- }
- else
- {
- okButton.setEnabled(true);
- }
- }
-
- }
-
- /**
- * @see org.eclipse.jface.window.Window#open()
- */
- public int open()
- {
- return super.open();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 80b842549..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java
+++ /dev/null
@@ -1,487 +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.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;
-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;
-
-/**
- * Prompt user for password.
- * This class is final due to the sensitive nature of the information being prompted for.
- */
-public final class SystemPasswordPromptDialog extends SystemPromptDialog implements ISystemPasswordPromptDialog {
-
- // labels are not as big as text fields so we need to set the height for the system type
- // and hostname labels so they are equally spaced with the user ID and password entry fields
-// private static final int LABEL_HEIGHT = 17;
-
- private Text textPassword;
- private Text textUserId;
- private Button userIdPermanentCB;
- private Button savePasswordCB;
- private String originalUserId;
- private String userId;
- private String password;
- private boolean userIdPermanent = false;
- private boolean savePassword = false;
- private boolean forceToUpperCase;
- private boolean userIdChanged = false;
- private boolean validate = true;
- private ISystemValidator userIdValidator;
- private ISystemValidator passwordValidator;
- private ISignonValidator signonValidator;
- private IConnectorService connectorService = null;
-
- /**
- * Constructor for SystemPasswordPromptDialog
- * @param shell The shell in which to base this dialog.
- */
- public SystemPasswordPromptDialog(Shell shell) {
- super(shell, SystemResources.RESID_PASSWORD_TITLE);
- setHelp(RSEUIPlugin.HELPPREFIX + "pwdp0000"); //$NON-NLS-1$
- }
-
- /**
- * Set the connector service from which the user is attempting to do a connect action.
- * This is used to query the system type, host name and user id to display to the user for
- * contextual information.
- * <p>
- * This must be called prior to opening this dialog.
- * @param connectorService the connector service associated with this dialog
- */
- public void setSystemInput(IConnectorService connectorService) {
- this.connectorService = connectorService;
- }
-
- /**
- * Sets the validator for the userId. If not null it will be called per keystroke.
- * <p>
- * This must be called prior to opening this dialog if something other than the default is needed.
- * @param v a validator
- */
- public void setUserIdValidator(ISystemValidator v) {
- userIdValidator = v;
- }
-
- /**
- * Sets the validator for the password. If not null it will be called per keystroke.
- * The default validator is null.
- * <p>
- * This must be called prior to opening this dialog if something other than the default is needed.
- * @param v a validator
- */
- public void setPasswordValidator(ISystemValidator v) {
- passwordValidator = v;
- }
-
- /**
- * Sets the validator for the signon.
- * The default validator is null.
- * If not null the validator will be called when the user presses OK.
- * <p>
- * This must be called prior to opening this dialog if something other than the default is needed.
- * @param v a signon validator
- */
- public void setSignonValidator(ISignonValidator v) {
- signonValidator = v;
- }
-
- /**
- * Sets the option to force the userId and password to uppercase. This use should be rare.
- * Use this with caution.
- * <p>
- * The default is false.
- * This must be called prior to opening this dialog if something other than the default is needed.
- * @param force true if the user id and password are to be forced to uppercase
- */
- public void setForceToUpperCase(boolean force) {
- this.forceToUpperCase = force;
- }
-
- /**
- * Call this to query the force-to-uppercase setting
- * @return the setting for forcing the user id and password to upper case
- */
- public boolean getForceToUpperCase() {
- return forceToUpperCase;
- }
-
- /**
- * Creates the dialog controls.
- * @param parent the containing composite control in which our controls will be created. It is assumed
- * to have a grid layout.
- * @return the composite control we create that nests inside the parent
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent) {
-
- // top level composite
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
- // Inner composite
- Composite composite_prompts = SystemWidgetHelpers.createComposite(composite, 2);
-
- // yantzi: artemis 6.0, at request of zOS team I am changing the system type and hostname
- // to labels so they are clearer to read than non-editable entry fields
-
- // dwd: cannot set height hints on labels since that causes cut off text for large fonts used by those with impaired vision
-
- // System type
- String text = SystemWidgetHelpers.appendColon(SystemResources.RESID_PASSWORD_SYSTEMTYPE_LABEL);
- Label label = SystemWidgetHelpers.createLabel(composite_prompts, text);
- GridData gd = new GridData();
- label.setLayoutData(gd);
- label = SystemWidgetHelpers.createLabel(composite_prompts, connectorService.getHostType());
- gd = new GridData();
- label.setLayoutData(gd);
-
- // Host name
- text = SystemWidgetHelpers.appendColon(SystemResources.RESID_PASSWORD_HOSTNAME_LABEL);
- label = SystemWidgetHelpers.createLabel(composite_prompts, text);
- gd = new GridData();
- label.setLayoutData(gd);
- label = SystemWidgetHelpers.createLabel(composite_prompts, connectorService.getHostName());
- gd = new GridData();
- label.setLayoutData(gd);
-
- // UserId
- if (connectorService.supportsUserId()) {
- textUserId = SystemWidgetHelpers.createLabeledTextField(composite_prompts, this, SystemResources.RESID_PASSWORD_USERID_LABEL, SystemResources.RESID_PASSWORD_USERID_TIP);
- }
-
- // Password prompt
- if (connectorService.supportsPassword()) {
- textPassword = SystemWidgetHelpers.createLabeledTextField(composite_prompts, this, SystemResources.RESID_PASSWORD_LABEL, SystemResources.RESID_PASSWORD_TIP);
- textPassword.setEchoChar('*');
- }
-
- // UserId_make_permanent checkbox
- // DY: align user ID checkbox with entry fields
- // yantzi:5.1 move checkboxes to be below entry fields
- if (connectorService.supportsUserId()) {
- SystemWidgetHelpers.createLabel(composite_prompts, ""); //$NON-NLS-1$
- userIdPermanentCB = SystemWidgetHelpers.createCheckBox(composite_prompts, 1, this, SystemResources.RESID_PASSWORD_USERID_ISPERMANENT_LABEL,
- SystemResources.RESID_PASSWORD_USERID_ISPERMANENT_TIP);
- userIdPermanentCB.setEnabled(false);
- }
-
- // Save signon information checkbox
- // DY: align password checkbox with entry fields
- if (connectorService.supportsPassword()) {
- SystemWidgetHelpers.createLabel(composite_prompts, ""); //$NON-NLS-1$
- savePasswordCB = SystemWidgetHelpers.createCheckBox(composite_prompts, 1, this, SystemResources.RESID_PASSWORD_SAVE_LABEL, SystemResources.RESID_PASSWORD_SAVE_TOOLTIP);
- savePasswordCB.setSelection(savePassword);
- }
-
- initializeInput();
-
- // add keystroke listeners...
- if (textUserId != null) {
- textUserId.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- processUserIdField();
- }
- });
- }
- if (textPassword != null) {
- textPassword.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- processPasswordField();
- }
- });
- }
-
- return composite;
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl() {
- okButton.setEnabled(true);
- processUserIdField();
- if (textUserId != null) {
- if (userId.length() == 0 || textPassword == null) {
- return textUserId;
- }
- }
- if (textPassword != null) {
- textPassword.selectAll();
- return textPassword;
- }
- if (okButton.isEnabled()) return okButton;
- return cancelButton;
- }
-
- /**
- * Initialize values using input data
- */
- private void initializeInput() {
- originalUserId = connectorService.getUserId();
- userId = originalUserId;
- if (connectorService.supportsUserId() && (userId == null || userId.length() == 0)) {
- userId = SystemPreferencesManager.getPreferencesManager().getDefaultUserId(connectorService.getHostType());
- }
- if (textUserId != null && userId != null) {
- textUserId.setText(userId);
- textUserId.setSelection(0, userId.length());
- }
- if (textPassword != null && password != null) {
- textPassword.setText(password);
- textPassword.setSelection(0, password.length());
- }
- }
-
- /**
- * Retrieves the userId entered by user
- */
- private void internalGetUserId() {
- if (textUserId != null) {
- userId = textUserId.getText().trim();
- }
- }
-
- /**
- * Retrieves the password entered by user
- */
- private void internalGetPassword() {
- if (textPassword != null) {
- password = textPassword.getText().trim();
- }
- }
-
- /**
- * Retrieves the value of the "save user id" checkbox
- */
- private void internalGetIsUserIdChangePermanent() {
- if (userIdPermanentCB != null) {
- userIdPermanent = userIdPermanentCB.isEnabled() && userIdPermanentCB.getSelection();
- }
- }
-
- /**
- * Retrieves the value of the "save password" checkbox
- */
- private void internalGetIsSavePassword() {
- if (savePasswordCB != null) {
- savePassword = savePasswordCB.isEnabled() && savePasswordCB.getSelection();
- }
- }
-
- /**
- * This method is called whenever the text changes in the user id input field.
- * Checks the user id field and if there are no errors, other fields on the dialog.
- * If an error was reported it is displayed on the message line.
- * @see #setUserIdValidator(ISystemValidator)
- */
- private void processUserIdField() {
- clearErrorMessage();
- SystemMessage m = checkUserId();
- if (m == null) {
- m = checkPassword();
- }
- if (m != null) {
- setErrorMessage(m);
- }
- okButton.setEnabled(m == null);
- if (userId == null || originalUserId == null) {
- userIdChanged = (userId != originalUserId);
- } else {
- userIdChanged = !userId.equals(originalUserId);
- }
- if (userIdPermanentCB != null) {
- userIdPermanentCB.setEnabled(userIdChanged);
- }
- }
-
- /**
- * Performs the actual validation check for the user id.
- * Delegates the request to an <code>ISystemValidator</code> object.
- * @return the message returned by the validator or null.
- */
- private SystemMessage checkUserId() {
- internalGetUserId();
- SystemMessage m = null;
- if (connectorService.supportsUserId() && validate) {
- if (userIdValidator != null) {
- m = userIdValidator.validate(userId);
- } else if (connectorService.requiresUserId() && userId.length() == 0) {
- m = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY);
- }
- }
- return m;
- }
-
- /**
- * This method is called whenever the text changes in the password input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- * @see #setPasswordValidator(ISystemValidator)
- */
- private void processPasswordField() {
- clearErrorMessage();
- SystemMessage m = checkPassword();
- if (m == null) {
- m = checkUserId();
- }
- if (m != null) {
- setErrorMessage(m);
- }
- okButton.setEnabled(m == null);
- if (savePasswordCB != null) {
- savePasswordCB.setEnabled(!(connectorService.requiresPassword() && password.length() == 0));
- }
- }
-
- /**
- * Checks the value of the password instance variable.
- */
- private SystemMessage checkPassword() {
- internalGetPassword();
- SystemMessage m = null;
- if (connectorService.supportsPassword() && validate) {
- if (passwordValidator != null) {
- m = passwordValidator.validate(password);
- } else if (connectorService.requiresPassword() && password.length() == 0) {
- m = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PASSWORD_EMPTY);
- }
- }
- return m;
- }
-
- /**
- * @return the userId entered by user
- */
- public String getUserId() {
- return userId;
- }
-
- /**
- * @return the password may have been modified by the user.
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * Sets the password, may be null if no password is available.
- * @param password the password to provide for the password field.
- */
- public void setPassword(String password) {
- this.password = password;
- }
-
- /**
- * @return true if the user changed the user id
- */
- public boolean getIsUserIdChanged() {
- return userIdChanged;
- }
-
- /**
- * @return true if the user elected to make the changed user Id a permanent change.
- */
- public boolean getIsUserIdChangePermanent() {
- return userIdPermanent;
- }
-
- /**
- * @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.
- * @param save true if the save password box should be checked.
- */
- public void setSavePassword(boolean save) {
- savePassword = save;
- }
-
- /**
- * Verifies all input. Sets the error message if there are any conditions that are found.
- */
- private void verify() {
- Control controlInError = null;
- processUserIdField();
- if (getErrorMessage() != null) {
- controlInError = textUserId;
- } else {
- processPasswordField();
- if (getErrorMessage() != null) {
- controlInError = textPassword;
- }
- }
- if (controlInError != null) {
- controlInError.setFocus(); // validate methods already displayed error message
- }
- }
-
- /**
- * Called when user presses OK button.
- * @return true to close dialog, false to not close dialog.
- */
- protected boolean processOK() {
- setBusyCursor(true);
- internalGetPassword();
- internalGetUserId();
- internalGetIsUserIdChangePermanent();
- internalGetIsSavePassword();
- if (forceToUpperCase) {
- userId = userId.toUpperCase();
- password = password.toUpperCase();
- validate = false;
- textUserId.setText(userId);
- textPassword.setText(password);
- validate = true;
- }
-
- verify();
- setBusyCursor(false); // phil
-
- // If all inputs are OK then validate signon
- if (getErrorMessage() == null && (signonValidator != null)) {
- SystemMessage m = signonValidator.isValid(this, userId, password);
- setErrorMessage(m);
- }
- boolean closeDialog = (getErrorMessage() == null);
- return closeDialog;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index a9f6c6bf3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPromptDialog.java
+++ /dev/null
@@ -1,1849 +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 java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.IDialogConstants;
-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.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;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.messages.SystemMessageLine;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Image;
-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.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;
-
-
-/**
- * Base dialog class. Use this whenever more than a simple string
- * prompt is needed (which InputDialog gives you).
- * <p>
- * By default we configure the dialog as modal. If you do not want this,
- * call setBlockOnOpen(false) after instantiating.
- * <p>
- * This base class offers the following ease-of-use features:
- * <ul>
- * <li>automatic support for typical buttons OK, Browse and Cancel.
- * <ul>
- * <li>just override the processOk, processBrowse and processCancel methods to process them
- * <li>constructor option whether to enable Browse or not
- * <li>ability to override default labels for all three.
- * </ul>
- * <li>automatic support for a message line
- * <ul>
- * <li>can turn it off
- * <li>methods for writing messages to the message line
- * </ul>
- * <li>override just one method (<b>createInner</b>) to populate the client area
- * <li>support for automatically assigning unique mnemonics to all buttons
- * <ul>
- * <li>easier to code, easier to translate
- * <li>this is always done for you, so do not put your own mnemonics in your button text!
- * </ul>
- * <li>support for an input object for change mode vs "new" mode:
- * <ul>
- * <li>in change mode, callers pass this in via ctor or setInputObject method
- * <li>in your child class, get it via inherited getInputObject and cast to what it is you are expecting
- * </ul>
- * <li>support for output object:
- * <ul>
- * <li>when ok pressed, built up the output object and then call inherited setOutputObject object method
- * <li>dialog callers can then retrieve it via getOuputObject method.
- * </ul>
- * <li>support for {@link #wasCancelled()} method so callers can easily determine how user exited the dialog
- * <li>special affinity if you use an imbedded WorkWith widget:
- * <ul>
- * <li>call WorkWith's setPromptDialog(this) method to tell it the parent dialog is a PromptDialog
- * <li>WorkWith widget will use PromptDialog's message line vs its own
- * <li>WorkWith widget will know how to reassign mnemonics for its buttons when style is switched.
- * </ul>
- * <li>optional support (mri) for additional buttons (which your code handles):
- * <ul>
- * <li>Add
- * <li>Browse
- * <li>Test
- * <li>Details>>
- * </ul>
- * <li>optional support for a built-in progress monitor just like wizards have. Call {@link #setNeedsProgressMonitor(boolean)}
- * <li>a simple {@link #setBusyCursor(boolean)} method to toggle the cursor between busy and normal
- * </ul>
- *
- * <p>To use this class: </p>
- * <ol>
- * <li>Subclass it, specifying the dialog title in the constructor. Optionally, also call {@link #setHelp(String)} to set the dialog's help in the constructor.
- * <li>Override {@link #createInner(Composite)} to populate the contents
- * <li>Override {@link #processOK()} to process the pressing of the OK button
- * </ol>
- * <p>For error checking, add modify listeners to entry fields and if needed selection listeners to buttons, then in your event handler </p>
- * <ol>
- * <li>Call {@link #setErrorMessage(SystemMessage)} to display an error if detected. Pass null to clear previous error.
- * <li>Call {@link #setPageComplete(boolean)} with true if there are no errors and all required data is supplied. This enables/disables OK.
- * <li>The same two error-reporting strategies described in {@link org.eclipse.rse.ui.wizards.AbstractSystemWizardPage} apply here.
- * </ol>
- */
-public abstract class SystemPromptDialog
- extends org.eclipse.jface.dialogs.Dialog
- implements Listener, IDialogConstants, ISystemPromptDialog,
- ISystemMessageLine, org.eclipse.jface.dialogs.IDialogPage, IRunnableContext, Runnable
-{
-
- protected boolean okPressed = false;
- protected boolean cancelAllPressed = false;
- protected boolean showBrowseButton = false;
- protected boolean showTestButton = false;
- protected boolean showAddButton = false;
- protected boolean showDetailsButton = false;
- protected boolean pack = false;
- protected boolean initialOKButtonEnabledState = true;
- protected boolean initialAddButtonEnabledState = false;
- protected boolean initialDetailsButtonEnabledState = true;
- protected boolean detailsButtonHideMode = false;
- protected boolean showOkButton = true;
- protected boolean showCancelAllButton = false;
- protected Shell overallShell = null;
- protected Composite parentComposite, dialogAreaComposite;
- protected Composite buttonsComposite;
- protected Button okButton, cancelButton, cancelAllButton, testButton, browseButton, addButton, detailsButton;
- protected String title, labelOk, labelBrowse, labelTest, labelCancel, labelCancelAll, labelAdd, labelDetailsShow, labelDetailsHide;
- protected String tipOk, tipBrowse, tipTest, tipCancel, tipCancelAll, tipAdd, tipDetailsShow, tipDetailsHide;
- protected boolean noShowAgainOption;
- protected Button noShowAgainButton;
- protected String detailsShowLabel;
- protected String detailsHideLabel;
- protected String helpId;
- //protected Hashtable helpIdPerControl;
- protected Image titleImage;
- protected Object inputObject, outputObject; // input and output objects
- protected SystemMessageLine fMessageLine;
- protected SystemMessage pendingMessage, pendingErrorMessage;
- protected int minWidth, minHeight;
- protected int marginWidth = 3;
- protected int marginHeight = 3;
- protected int verticalSpacing = 2;
- protected int horizontalSpacing = 3;
-
- //protected Composite parent;
- //protected Composite contentsComposite, buttonsComposite;
- protected Mnemonics dialogMnemonics; // list of all unique mnemonics used in this dialog
- protected ISystemValidator outputObjectValidator;
-
- protected long activeRunningOperations = 0;
- protected boolean operationCancelableState;
- protected boolean needsProgressMonitor;
- protected ProgressMonitorPart progressMonitorPart;
- protected Cursor waitCursor;
- protected Cursor arrowCursor;
- protected MessageDialog windowClosingDialog;
- 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$
-
- protected static final int BROWSE_ID = 50;
- protected static final int TEST_ID = 60;
- protected static final int ADD_ID = 70;
- protected static final int DETAILS_ID = 80;
- protected static final int CANCEL_ALL_ID = 90;
-
- protected static final boolean BROWSE_BUTTON_YES = true;
- protected static final boolean BROWSE_BUTTON_NO = false;
- protected static final boolean TEST_BUTTON_YES = true;
- protected static final boolean TEST_BUTTON_NO = false;
- protected static final boolean ADD_BUTTON_YES = true;
- protected static final boolean ADD_BUTTON_NO = false;
- protected static final boolean DETAILS_BUTTON_YES = true;
- protected static final boolean DETAILS_BUTTON_NO = false;
-
- /**
- * Constructor one: ok and cancel buttons
- * @param shell - parent window this dialog is modal to.
- * @param title - the title for the dialog. Typically translated.
- * @see #setInputObject(Object)
- */
- public SystemPromptDialog(Shell shell, String title)
- {
- this(shell, title, null, false);
- }
- /**
- * Constructor two: ok and cancel buttons and an icon for the dialog title area
- * @param shell - parent window this dialog is modal to.
- * @param title - the title for the dialog. Typically translated.
- * @param titleImage - the icon for the dialog's title area.
- * @see #setInputObject(Object)
- */
- public SystemPromptDialog(Shell shell, String title, Image titleImage)
- {
- this(shell, title, null, false, titleImage);
- }
- /**
- * Constructor three: ok and cancel buttons, plus explicit setting of input object
- * @param shell - parent window this dialog is modal to.
- * @param title - the title for the dialog. Typically translated.
- * @param inputObject - the contextual input data, which can be queried via {@link #getInputObject()}.
- */
- public SystemPromptDialog(Shell shell, String title, Object inputObject)
- {
- this(shell, title, inputObject, false);
- }
- /**
- * Constructor four: ok, browse and cancel buttons
- * @param shell - parent window this dialog is modal to.
- * @param title - the title for the dialog. Typically translated.
- * @param browse - true if to show a Browse button, false if no Browse button desired.
- * @see #setInputObject(Object)
- */
- public SystemPromptDialog(Shell shell, String title, boolean browse)
- {
- this(shell, title, null, browse);
- }
- /**
- * Constructor five: ok, browse and cancel buttons, plus explicit setting of input object
- * @param shell - parent window this dialog is modal to.
- * @param title - the title for the dialog. Typically translated.
- * @param inputObject - the contextual input data, which can be queried via {@link #getInputObject()}.
- * @param browse - true if to show a Browse button, false if no Browse button desired.
- */
- public SystemPromptDialog(Shell shell, String title, Object inputObject, boolean browse)
- {
- this(shell, title, inputObject, browse, null);
- }
- /**
- * Constructor six: ok, browse and cancel buttons, plus explicit setting of input object and
- * an icon for the dialog title area
- * @param shell - parent window this dialog is modal to.
- * @param title - the title for the dialog. Typically translated.
- * @param inputObject - the contextual input data, which can be queried via {@link #getInputObject()}.
- * @param browse - true if to show a Browse button, false if no Browse button desired.
- * @param titleImage - the icon for the dialog's title area.
- */
- public SystemPromptDialog(Shell shell, String title, Object inputObject, boolean browse,
- Image titleImage)
- {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle()); // dwd
- this.title = title;
- this.titleImage = titleImage;
- this.inputObject = inputObject;
- this.showBrowseButton = browse;
- super.setBlockOnOpen(true);
- }
- /**
- * Constructor six: an input object. true/false for browse button, true/false for test button, a title image
- */
- public SystemPromptDialog(Shell shell, String title, Object inputObject, boolean browse, boolean test,
- Image titleImage)
- {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle()); // dwd
- this.title = title;
- this.titleImage = titleImage;
- this.inputObject = inputObject;
- this.showBrowseButton = browse;
- this.showTestButton = test;
- super.setBlockOnOpen(true);
- }
-
-
- /* (non-Javadoc)
- * Method declared in Window.
- */
- protected void configureShell(Shell shell)
- {
- super.configureShell(shell);
- overallShell = shell;
- if (title != null)
- shell.setText(title);
- //if (titleImage != null)
- // shell.setImage(titleImage); // ?correct method?
- //shell.setSize(300,200); // default w,h
- }
-
- /**
- * Specify if a progress monitor is desired in this dialog. Should be called right after instantiation.
- * The default is false. If true is specified, area on the dialog is reserved for the progress monitor,
- * and the monitor can be retrieved via {@link #getProgressMonitor()}.
- * <p>Support is patterned after WizardDialog in JFace.
- */
- public void setNeedsProgressMonitor(boolean needs)
- {
- this.needsProgressMonitor = needs;
- }
-
- /**
- * For setting the default overall help for the dialog.
- * This can be overridden per control by calling {@link #setHelp(Control, String)}.
- */
- public void setHelp(String helpId)
- {
- if (parentComposite != null)
- {
- SystemWidgetHelpers.setHelp(parentComposite, helpId);
- SystemWidgetHelpers.setHelp(buttonsComposite, helpId);
- //SystemWidgetHelpers.setCompositeHelp(parentComposite, helpId, helpIdPerControl);
- //SystemWidgetHelpers.setCompositeHelp(buttonsComposite, helpId, helpIdPerControl);
- }
- this.helpId = helpId;
- }
- /**
- * For retrieving the help Id
- */
- public String getHelpContextId()
- {
- return helpId;
- }
- /**
- * For setting control-specific help for a control on the wizard page.
- * <p>
- * This overrides the default set in the call to {@link #setHelp(String)}.
- */
- public void setHelp(Control c, String helpId)
- {
- SystemWidgetHelpers.setHelp(c, helpId);
- //if (helpIdPerControl == null)
- // helpIdPerControl = new Hashtable();
- //helpIdPerControl.put(c, helpId);
- }
-
- /**
- * For explicitly setting input object. Called by SystemDialogAction
- */
- public void setInputObject(Object inputObject)
- {
- this.inputObject = inputObject;
- }
- /**
- * For explicitly getting input object
- */
- public Object getInputObject()
- {
- return inputObject;
- }
-
- /**
- * For explicitly getting output object after dialog is dismissed. Set by the
- * dialog's processOK method.
- */
- public Object getOutputObject()
- {
- return outputObject;
- }
-
- /**
- * Allow caller to determine if window was cancelled or not.
- * Will return <code>false</code> if Cancel All was pressed.
- */
- public boolean wasCancelled()
- {
- return !okPressed;
- }
-
- public boolean wasCancelledAll() {
- return cancelAllPressed;
- }
-
- /**
- * If validation of the output object is desired, set the validator here.
- * It will be used when the child class calls setOutputObject().
- */
- public void setOutputObjectValidator(ISystemValidator outputObjectValidator)
- {
- this.outputObjectValidator = outputObjectValidator;
- }
-
- /**
- * Return the output object validator
- */
- public ICellEditorValidator getOutputObjectValidator()
- {
- return outputObjectValidator;
- }
-
- /**
- * Get the ISystemMessageLine control reference.
- */
- public ISystemMessageLine getMessageLine()
- {
- return fMessageLine;
- }
-
- /**
- * For explicitly setting output object. Call this in your processOK method.
- * If an output object validator has been set via setOutputObjectValidator, then
- * this will call its isValid method on the outputObject and will return the error
- * message if any that it issues. A return of null always means no errors and
- * hence it is ok to dismiss the dialog.
- */
- protected SystemMessage setOutputObject(Object outputObject)
- {
- this.outputObject = outputObject;
- if ((outputObjectValidator != null) && (outputObject instanceof String))
- return outputObjectValidator.validate((String)outputObject);
- else
- return null;
- }
-
- /**
- * Set the cursor to the wait cursor (true) or restores it to the normal cursor (false).
- */
- public void setBusyCursor(boolean setBusy)
- {
- if (setBusy)
- {
- // Set the busy cursor to all shells.
- Display d = getShell().getDisplay();
- waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
- setDisplayCursor(waitCursor);
- }
- else
- {
- setDisplayCursor(null);
- if (waitCursor != null)
- waitCursor.dispose();
- waitCursor = null;
- }
- }
-
- // --------------------------
- // OK BUTTON CONFIGURATION...
- // --------------------------
- /**
- * Disable showing of Ok button
- */
- public void setShowOkButton(boolean showOk)
- {
- this.showOkButton = showOk;
- }
-
- /**
- * For explicitly setting ok button label
- */
- public void setOkButtonLabel(String label)
- {
- this.labelOk = label;
- }
-
- /**
- * For explicitly setting ok button tooltip text
- */
- public void setOkButtonToolTipText(String tip)
- {
- this.tipOk = tip;
- }
-
- /**
- * For explicitly enabling/disabling ok button.
- */
- public void enableOkButton(boolean enable)
- {
- if (okButton != null)
- okButton.setEnabled(enable);
- }
- /**
- * Return ok button widget
- */
- public Button getOkButton()
- {
- return okButton;
- }
- /**
- * Set initial enabled state of ok button.
- * Call this from createContents, which is called before the ok button is created.
- */
- public void setInitialOKButtonEnabledState(boolean enabled)
- {
- initialOKButtonEnabledState = enabled;
- }
- /**
- * To be overridden by children.
- * Called when user presses OK button.
- * Child dialog class should set output object.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- return true;
- }
-
- // ------------------------------
- // CANCEL BUTTON CONFIGURATION...
- // ------------------------------
- /**
- * For explicitly setting cancel button label
- */
- public void setCancelButtonLabel(String label)
- {
- this.labelCancel = label;
- }
- /**
- * For explicitly setting cancel button tooltip text
- */
- public void setCancelButtonToolTipText(String tip)
- {
- this.tipCancel = tip;
- }
- /**
- * For explicitly enabling/disabling cancel button.
- */
- public void enableCancelButton(boolean enable)
- {
- if (cancelButton != null)
- cancelButton.setEnabled(enable);
- }
- /**
- * Return cancel button widget.
- * Be careful <i>not</i> to call the deprecated inherited method getCancelButton()!
- */
- public Button getCancelOrCloseButton()
- {
- return cancelButton;
- }
- /**
- * To be overridden by children.
- * Called when user presses CANCEL button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processCancel()
- {
- return true;
- }
-
- // ------------------------------
- // CANCEL ALL BUTTON CONFIGURATION...
- // ------------------------------
- /**
- * Enable or disable showing of Cancel All button
- */
- public void setShowCancelAllButton(boolean showCancelAll)
- {
- this.showCancelAllButton = showCancelAll;
- }
-
- /**
- * For explicitly setting cancel button label
- */
- public void setCancelAllButtonLabel(String label)
- {
- this.labelCancelAll = label;
- }
- /**
- * For explicitly setting cancel button tooltip text
- */
- public void setCancelAllButtonToolTipText(String tip)
- {
- this.tipCancelAll = tip;
- }
- /**
- * For explicitly enabling/disabling cancel button.
- */
- public void enableCancelAllButton(boolean enable)
- {
- if (cancelAllButton != null)
- cancelAllButton.setEnabled(enable);
- }
- /**
- * Return cancel button widget.
- * Be careful <i>not</i> to call the deprecated inherited method getCancelButton()!
- */
- public Button getCancelAllButton()
- {
- return cancelAllButton;
- }
- /**
- * To be overridden by children.
- * Called when user presses CANCEL button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processCancelAll()
- {
- return true;
- }
-
- // ------------------------------
- // BROWSE BUTTON CONFIGURATION...
- // ------------------------------
- /**
- * Explicitly specify if Browse Button to be shown
- */
- public void setShowBrowseButton(boolean show)
- {
- this.showBrowseButton = show;
- }
- /**
- * For explicitly setting browse button label
- */
- public void setBrowseButtonLabel(String label)
- {
- this.labelBrowse = label;
- }
- /**
- * For explicitly setting Browse button tooltip text
- */
- public void setBrowseButtonToolTipText(String tip)
- {
- this.tipBrowse = tip;
- }
- /**
- * For explicitly enabling/disabling Browse button.
- */
- public void enableBrowseButton(boolean enable)
- {
- if (browseButton != null)
- browseButton.setEnabled(enable);
- }
- /**
- * Return browse button widget
- */
- public Button getBrowseButton()
- {
- return browseButton;
- }
- /**
- * To be overridden by children.
- * Called when user presses BROWSE button.
- * Return false always!
- */
- protected boolean processBrowse()
- {
- return false;
- }
-
- // ------------------------------
- // TEST BUTTON CONFIGURATION...
- // ------------------------------
- /**
- * Explicitly specify if Test Button to be shown
- */
- public void setShowTestButton(boolean show)
- {
- this.showTestButton = show;
- }
- /**
- * For explicitly setting test button label
- */
- public void setTestButtonLabel(String label)
- {
- this.labelTest = label;
- }
- /**
- * For explicitly setting Test button tooltip text
- */
- public void setTestButtonToolTipText(String tip)
- {
- this.tipTest = tip;
- }
- /**
- * For explicitly enabling/disabling Test button.
- */
- public void enableTestButton(boolean enable)
- {
- if (testButton != null)
- testButton.setEnabled(enable);
- }
- /**
- * Return test button widget
- */
- public Button getTestButton()
- {
- return testButton;
- }
- /**
- * To be overridden by children.
- * Called when user presses TEST button.
- * Return false always!
- */
- protected boolean processTest()
- {
- return false;
- }
-
- // ------------------------------
- // ADD BUTTON CONFIGURATION...
- // ------------------------------
- /**
- * Explicitly specify if Add Button to be shown
- */
- public void setShowAddButton(boolean show)
- {
- this.showAddButton = show;
- }
- /**
- * For explicitly setting Add button label
- */
- public void setAddButtonLabel(String label)
- {
- this.labelAdd = label;
- }
- /**
- * For explicitly setting Add button tooltip text
- */
- public void setAddButtonToolTipText(String tip)
- {
- this.tipAdd = tip;
- }
- /**
- * For explicitly enabling/disabling Add button.
- */
- public void enableAddButton(boolean enable)
- {
- if (addButton != null)
- addButton.setEnabled(enable);
- else
- initialAddButtonEnabledState = enable;
- }
- /**
- * Return Add button widget
- */
- public Button getAddButton()
- {
- return addButton;
- }
- /**
- * To be overridden by children.
- * Called when user presses ADD button.
- * Return false always!
- */
- protected boolean processAdd()
- {
- return false;
- }
-
- // ------------------------------
- // DETAILS BUTTON CONFIGURATION...
- // ------------------------------
- /**
- * Explicitly specify if Details Button to be shown.
- * There is support to automatically toggle the text.
- * @param true if the Details button is to be shown
- * @param true if the button should initially be in "hide mode" versus "hide mode"
- */
- public void setShowDetailsButton(boolean show, boolean hideMode)
- {
- this.showDetailsButton = show;
- this.detailsButtonHideMode = hideMode;
- }
- /**
- * For explicitly setting Details button label
- */
- public void setDetailsButtonLabel(String showLabel, String hideLabel)
- {
- this.labelDetailsShow = showLabel;
- this.labelDetailsHide = hideLabel;
- }
- /**
- * For explicitly setting Details button tooltip text
- */
- public void setDetailsButtonToolTipText(String showTip, String hideTip)
- {
- this.tipDetailsShow = showTip;
- this.tipDetailsHide = hideTip;
- }
- /**
- * For explicitly enabling/disabling Details button.
- */
- public void enableDetailsButton(boolean enable)
- {
- if (detailsButton != null)
- detailsButton.setEnabled(enable);
- else
- initialDetailsButtonEnabledState = enable;
- }
- /**
- * Return Details button widget
- */
- public Button getDetailsButton()
- {
- return detailsButton;
- }
- /**
- * To be overridden by children.
- * Called when user presses DETAILS button.
- * <p>
- * Note the text is automatically toggled for you! You need only
- * do whatever the functionality is that you desire
- *
- * @param hideMode the current state of the details toggle, prior to this request. If you return true from
- * this method, this state and the button text will be toggled.
- *
- * @return true if the details state toggle was successful, false if it failed.
- */
- protected boolean processDetails(boolean hideMode)
- {
- return true;
- }
-
-
-
- /**
- * Get the list of all unique mnemonics used by buttons on this dialog. This is only
- * set at the time createButtonBar is called by the parent, and this is after the createContents
- * method call. It will return null until then. So, it is not available for you at constructor time.
- * Use setUniqueMnemonic(Button) on the returned object if you want to add a mnemonic to
- * button after the fact.
- */
- public Mnemonics getDialogMnemonics()
- {
- return dialogMnemonics;
- }
-
- /**
- * Create message line.
- */
- protected ISystemMessageLine createMessageLine(Composite c)
- {
- //System.out.println("INSIDE CREATEMESSAGELINE");
- fMessageLine= new SystemMessageLine(c);
- fMessageLine.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- Display.getCurrent().asyncExec(this);
- return fMessageLine;
- }
- /**
- * For asynch exec we defer some operations until other pending events are processed.
- * For now, this is used to display pending error messages
- */
- public void run()
- {
- if (pendingErrorMessage != null)
- setErrorMessage(pendingErrorMessage);
- else if (pendingMessage != null)
- setMessage(pendingMessage);
- pendingErrorMessage = pendingMessage = null;
- }
-
- /**
- * 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);
- }
- }
- }
- }
- }
-
- /**
- * Swing-like method to auto-set the size of this dialog by
- * looking at the preferred sizes of all constituents.
- * @deprecated
- */
- protected void pack()
- {
- // pack = true; // defer until controls are all created.
- }
-
- /**
- * Called by createContents method.
- * Create this dialog's widgets inside a composite.
- * Child classes must override this.
- */
- protected abstract Control createInner(Composite parent);
-
- /**
- * Return the Control to be given initial focus.
- * Child classes must override this, but can return null.
- */
- protected abstract Control getInitialFocusControl();
-
-
-
- /**
- * Override of parent method.
- * Called by IDE when button is pressed.
- */
- protected void buttonPressed(int buttonId)
- {
- okPressed = false;
- if (buttonId == OK_ID)
- {
- //setReturnId(buttonId);
- setReturnCode(OK);
- if (processOK())
- {
- okPressed = true;
- close();
- }
- }
- /* Now handled by the cancelListener
- else if (buttonId == CANCEL_ID)
- {
- if (processCancel())
- super.buttonPressed(buttonId);
- }*/
- else if (buttonId == BROWSE_ID)
- {
- processBrowse();
- }
- else if (buttonId == TEST_ID)
- {
- processTest();
- }
- else if (buttonId == ADD_ID)
- {
- processAdd();
- }
- else if (buttonId == DETAILS_ID)
- {
- if (processDetails(detailsButtonHideMode))
- {
- detailsButtonHideMode = !detailsButtonHideMode;
- detailsButton.setText(detailsButtonHideMode ? detailsShowLabel : detailsHideLabel);
- if (detailsButtonHideMode && (tipDetailsShow != null))
- detailsButton.setToolTipText(tipDetailsShow);
- else if (!detailsButtonHideMode && (tipDetailsHide != null))
- detailsButton.setToolTipText(tipDetailsHide);
- }
- }
- else if (buttonId == CANCEL_ALL_ID) {
-
- if (processCancelAll()) {
- cancelAllPressed = true;
- close();
- }
- }
- }
-
- /**
- * Intercept of parent, so we can create the msg line above the button bar.
- */
- protected Control createButtonBar(Composite parent)
- {
- createMessageLine(parent);
- return super.createButtonBar(parent);
- }
-
- /**
- * Adjust the width hint of a button to account for the presumed addition of a mnemonic.
- * @param button the button whose width is to be adjusted.
- */
- protected void adjustButtonWidth(Button button) {
- String text = button.getText();
- // adjust the width hint to allow for a mnemonic to be added.
- if (text != null) {
- if (text.indexOf('&') < 0) {
- Object layoutData = button.getLayoutData();
- if (layoutData instanceof GridData) {
- GridData gd = (GridData) layoutData;
- if (gd.widthHint != SWT.DEFAULT) {
- gd.widthHint += convertWidthInCharsToPixels(3);
- }
- }
- }
- }
- }
-
- /**
- * Add buttons to the dialog's button bar.
- *
- * Subclasses may override.
- *
- * @param parent the button bar composite
- */
- protected void createButtonsForButtonBar(Composite parent)
- {
- //System.out.println("Inside createButtonsForButtonBar");
- //System.out.println("Vertical spacing="+((GridLayout)parent.getLayout()).verticalSpacing);
- //System.out.println("Margin height="+((GridLayout)parent.getLayout()).marginHeight);
- ((GridLayout)parent.getLayout()).verticalSpacing = verticalSpacing;
- //((GridLayout)parent.getLayout()).horizontalSpacing = horizontalSpacing;
- ((GridLayout)parent.getLayout()).marginWidth = marginWidth;
- ((GridLayout)parent.getLayout()).marginHeight = marginHeight;
- //System.out.println("INSIDE CREATEBUTTONSFORBUTTONBAR");
-
- // create requested buttons...
-
- if (showOkButton)
- {
- String okLabel = (labelOk!=null)?labelOk: IDialogConstants.OK_LABEL;
- okButton = createButton(parent, IDialogConstants.OK_ID, okLabel, true);
- okButton.setEnabled(initialOKButtonEnabledState);
- if (tipOk != null)
- okButton.setToolTipText(tipOk);
- }
- if (showBrowseButton)
- {
- String browseLabel = (labelBrowse!=null)?labelBrowse: SystemResources.BUTTON_BROWSE;
- browseButton = createButton(parent, BROWSE_ID, browseLabel, false);
- if (tipBrowse != null)
- browseButton.setToolTipText(tipBrowse);
- }
- if (showTestButton)
- {
- String testLabel = (labelTest!=null)?labelTest: SystemResources.BUTTON_TEST;
- testButton = createButton(parent, TEST_ID, testLabel, false);
- if (tipTest != null)
- testButton.setToolTipText(tipTest);
- }
- if (showAddButton)
- {
- String addLabel = (labelAdd!=null)?labelAdd: SystemResources.BUTTON_ADD;
- addButton = createButton(parent, ADD_ID, addLabel, !showOkButton);
- if (tipAdd != null)
- addButton.setToolTipText(tipAdd);
- addButton.setEnabled(initialAddButtonEnabledState);
- }
- if (showDetailsButton)
- {
- detailsShowLabel = Mnemonics.removeMnemonic((labelDetailsShow!=null)?labelDetailsShow: IDialogConstants.SHOW_DETAILS_LABEL);
- detailsHideLabel = Mnemonics.removeMnemonic((labelDetailsHide!=null)?labelDetailsHide: IDialogConstants.HIDE_DETAILS_LABEL);
- String detailsLabel = detailsButtonHideMode ? detailsShowLabel : detailsHideLabel;
- detailsButton = createButton(parent, DETAILS_ID, detailsLabel, false);
- adjustButtonWidth(detailsButton);
- if (detailsButtonHideMode && (tipDetailsShow != null))
- detailsButton.setToolTipText(tipDetailsShow);
- else if (!detailsButtonHideMode && (tipDetailsHide != null))
- detailsButton.setToolTipText(tipDetailsHide);
- detailsButton.setEnabled(initialDetailsButtonEnabledState);
- }
-
- String cancelLabel = (labelCancel!=null)?labelCancel: IDialogConstants.CANCEL_LABEL;
- cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, cancelLabel, false);
- if (tipCancel != null)
- cancelButton.setToolTipText(tipCancel);
- cancelListener= new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent e)
- {
- if (activeRunningOperations <= 0)
- {
- if (processCancel())
- doCancel();
- }
- else
- cancelButton.setEnabled(false);
- }
- };
- cancelButton.addSelectionListener(cancelListener);
-
- if (showCancelAllButton) {
- String cancelAllLabel = (labelCancelAll != null) ? labelCancelAll: SystemResources.BUTTON_CANCEL_ALL;
- cancelAllButton = createButton(parent, CANCEL_ALL_ID, cancelAllLabel, false);
-
- if (tipCancelAll != null) {
- cancelAllButton.setToolTipText(tipCancelAll);
- }
- }
-
- buttonsComposite = parent;
- if (helpId != null)
- SystemWidgetHelpers.setHelp(buttonsComposite, helpId);
- //SystemWidgetHelpers.setCompositeHelp(buttonsComposite, helpId);
- }
-
- private void doCancel()
- {
- super.buttonPressed(CANCEL_ID);
- }
-
- /**
- * Set minimum width and height for this dialog.
- * Pass zero for either to not affect it.
- */
- public void setMinimumSize(int width, int height)
- {
- minWidth = width;
- minHeight = height;
- }
- /**
- * Override of parent.
- */
- protected Control createContents(Composite parent)
- {
- //System.out.println("INSIDE SYSTEMPROMPTDIALOG#CREATECONTENTS");
-
- Control c = super.createContents(parent);
-
- this.parentComposite = (Composite)c;
- if (helpId != null)
- SystemWidgetHelpers.setHelp(parentComposite, helpId);
- //SystemWidgetHelpers.setCompositeHelp(parentComposite, helpId, helpIdPerControl);
-
- // OK, parent method created dialog area and button bar.
- // Time now to do our thing...
-
- // Insert a progress monitor if requested
- if (needsProgressMonitor)
- {
-
- boolean showSeparators = false;
- // Build the first separator line
- Label separator = null;
- if (showSeparators)
- {
- separator= new Label(parentComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
- separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
- GridLayout pmlayout= new GridLayout();
- pmlayout.numColumns= 1;
-
- progressMonitorPart= new ProgressMonitorPart(parentComposite, pmlayout, SWT.DEFAULT);
- progressMonitorPart.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- progressMonitorPart.setVisible(false);
-
- // Build the second separator line
- if (showSeparators)
- {
- separator= new Label(parentComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
- separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
- if (RSEUIPlugin.isTheSystemRegistryActive())
- {
- 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");
- RSEUIPlugin.getTheSystemRegistry().clearRunnableContext();
- }
- });
- }
- }
-
- //createMessageLine((Composite)c); now done before buttons are created. d54501
-
- Control initialFocusControl = getInitialFocusControl();
- if (initialFocusControl != null)
- initialFocusControl.setFocus();
-
- //buttonsComposite = buttons; // remember the buttons part of the dialog so we can add mnemonics
- /*
- * OK now is a good time to add the mnemonics!
- * This is because both the contents and buttons have been created.
- */
- dialogMnemonics = SystemWidgetHelpers.setMnemonics((Composite)getButtonBar());
- applyMnemonics(dialogMnemonics, (Composite)getDialogArea());
-
- /*
- * OK, now that mnemonics for the buttons are set, query the mnemonic for the details button and its
- * two states... defect 42904
- */
- if (showDetailsButton)
- {
- if (detailsButtonHideMode)
- {
- detailsShowLabel = detailsButton.getText();
- char m = Mnemonics.getMnemonic(detailsShowLabel);
- detailsHideLabel = Mnemonics.applyMnemonic(detailsHideLabel, m);
- }
- else
- {
- detailsHideLabel = detailsButton.getText();
- char m = Mnemonics.getMnemonic(detailsHideLabel);
- detailsShowLabel = Mnemonics.applyMnemonic(detailsShowLabel, m);
- }
- }
- if (labelCancel != null)
- labelCancel = cancelButton.getText(); // reset to include the mnemonic, in case we need to restore it
-
- if (pack)
- {
- Shell shell = getShell();
- shell.setSize(shell.computeSize(SWT.DEFAULT, SWT.DEFAULT, true));
- }
- // return composite created by call to parent's method
- return c;
- }
-
- /**
- * Apply mnemonic to the composite.
- * @param c the composite.
- */
- protected void applyMnemonics(Mnemonics mnemonics, Composite c) {
- SystemWidgetHelpers.setMnemonics(mnemonics, c);
- }
-
- /**
- * Called by parent.
- * Create overall dialog page layout.
- */
- protected Control createDialogArea(Composite parent)
- {
- //System.out.println("INSIDE CREATEDIALOGAREA");
- Composite c = new Composite(parent, SWT.NONE);
- this.dialogAreaComposite = c;
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight= marginWidth;
- layout.marginWidth = marginHeight;
- layout.verticalSpacing = verticalSpacing;
- layout.horizontalSpacing= horizontalSpacing;
- c.setLayout(layout);
- 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...
- */
- if (minWidth > 0)
- {
- boolean newData = false;
- GridData data = (GridData)inner.getLayoutData();
- if (data == null)
- {
- newData = true;
- data = new GridData();
- }
- data.widthHint = minWidth;
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- if (newData)
- inner.setLayoutData(data);
- }
- if (minHeight > 0)
- {
- boolean newData = false;
- GridData data = (GridData)inner.getLayoutData();
- if (data == null)
- {
- newData = true;
- data = new GridData();
- }
- data.heightHint = minHeight;
- data.grabExcessVerticalSpace = true;
- data.verticalAlignment = GridData.FILL;
- if (newData)
- inner.setLayoutData(data);
- }
- //this.parent = c;
- //contentsComposite = c; // remember the contents part of the dialog so we can add mnemonics
- 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 <code>true</code> to show the option in the dialog, <code>false</code> 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
- * <code>true</code>, then the value stored in the preference is <code>true</code> if the user selects the option,
- * and <code>false</code> if the user does not select the option. If this is set to <code>false</code>, then the
- * value stored in the preference will be <code>false</code> if the user selects the option, and <code>true</code>
- * 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.
- */
- public void setPageComplete(boolean complete)
- {
- if (okButton != null)
- okButton.setEnabled(complete);
- else
- initialOKButtonEnabledState = complete;
- }
-
- // -----------------
- // HELPER METHODS...
- // -----------------
- /**
- * Add a separator line. This is a physically visible line.
- */
- protected Label addSeparatorLine(Composite parent, int nbrColumns)
- {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- separator.setLayoutData(data);
- return separator;
- }
- /**
- * Add a spacer line
- */
- protected Label addFillerLine(Composite parent, int nbrColumns)
- {
- Label filler = new Label(parent, SWT.LEFT);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- filler.setLayoutData(data);
- return filler;
- }
- /**
- * Add a spacer line that grows in height to absorb extra space
- */
- protected Label addGrowableFillerLine(Composite parent, int nbrColumns)
- {
- Label filler = new Label(parent, SWT.LEFT);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- data.verticalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- filler.setLayoutData(data);
- return filler;
- }
-
- /**
- * Expose inherited protected method convertWidthInCharsToPixels as a publicly
- * excessible method
- */
- public int publicConvertWidthInCharsToPixels(int chars)
- {
- return convertWidthInCharsToPixels(chars);
- }
- /**
- * Expose inherited protected method convertHeightInCharsToPixels as a publicly
- * excessible method
- */
- public int publicConvertHeightInCharsToPixels(int chars)
- {
- return convertHeightInCharsToPixels(chars);
- }
-
- // -----------------------------
- // ISystemMessageLine METHODS...
- // -----------------------------
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- if (fMessageLine != null)
- fMessageLine.clearErrorMessage();
- }
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- if (fMessageLine != null)
- fMessageLine.clearMessage();
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage()
- {
- if (fMessageLine != null)
- return fMessageLine.getErrorMessage();
- else
- return null;
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- if (fMessageLine != null)
- return fMessageLine.getSystemErrorMessage();
- else
- return null;
- }
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage()
- {
- if (fMessageLine != null)
- return fMessageLine.getMessage();
- else
- return null;
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- if (fMessageLine != null)
- fMessageLine.setErrorMessage(message);
- else
- SystemMessageDialog.displayErrorMessage(getShell(),message);
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- if (fMessageLine != null)
- {
- if (message != null)
- fMessageLine.setErrorMessage(message);
- else
- fMessageLine.clearErrorMessage();
- }
- else //if (message != null)
- {
- //(new SystemMessageDialog(getShell(),message)).open();
- pendingErrorMessage = message;
- }
- }
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- if (fMessageLine != null)
- {
- if (message != null)
- fMessageLine.setMessage(message);
- else
- fMessageLine.clearMessage();
- }
- }
-
- /**
- *If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- if (fMessageLine != null)
- fMessageLine.setMessage(message);
- else if (message != null)
- //(new SystemMessageDialog(getShell(),message)).open();
- pendingMessage = message;
- }
-
-
- /**
- * Convenience method to set an error message from an exception
- */
- public void setErrorMessage(Throwable exc)
- {
- if (fMessageLine != null)
- fMessageLine.setErrorMessage(exc);
- else
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
- msg.makeSubstitution(exc);
- (new SystemMessageDialog(getShell(),msg)).open();
- }
- }
-
- // -------------------------------------------------------------------------------
- // IDialogPage interface methods, which we only implement to enable dialog help...
- // -------------------------------------------------------------------------------
- public void setDescription(String description) {}
- public String getDescription() {return null;}
- public Image getImage() {return titleImage;}
- public void performHelp() {}
- public void setVisible(boolean visible) {}
- public void dispose() {}
- public Control getControl() {return parentComposite;}
- public void setControl(Control c) {}
- public void createControl(Composite parent) {}
- public void setImageDescriptor(ImageDescriptor id) {}
- /**
- * Get the dialog's title
- */
- public String getTitle()
- {
- return title;
- }
- /**
- * Set the dialog's title
- */
- public void setTitle(String title)
- {
- this.title = title;
- if (overallShell != null)
- overallShell.setText(title);
- }
-
-
- // --------------------------------------------
- // Methods to support a progress monitor...
- // using WizardDialog as an example.
- // --------------------------------------------
-
- /**
- * Returns the progress monitor for this dialog (if it has one).
- *
- * @return the progress monitor, or <code>null</code> if
- * this dialog does not have one
- */
- public IProgressMonitor getProgressMonitor()
- {
- return progressMonitorPart;
- }
-
- /**
- * About to start a long running operation tiggered through
- * the dialog. Shows the progress monitor and disables the dialog's
- * buttons and controls.
- *
- * @param enableCancelButton <code>true</code> if the Cancel button should
- * be enabled, and <code>false</code> if it should be disabled
- * @return the saved UI state
- */
- protected Object aboutToStart(boolean enableCancelButton)
- {
- Map savedState = null;
- operationCancelableState = enableCancelButton;
- if ((getShell() != null) && (activeRunningOperations <= 0))
- {
- // Save focus control
- Control focusControl = getShell().getDisplay().getFocusControl();
- if (focusControl != null && focusControl.getShell() != getShell())
- focusControl = null;
- cancelButton.removeSelectionListener(cancelListener);
- // Set the busy cursor to all shells.
- Display d = getShell().getDisplay();
- waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
- setDisplayCursor(waitCursor);
-
- // Set the arrow cursor to the cancel component.
- arrowCursor= new Cursor(d, SWT.CURSOR_ARROW);
- cancelButton.setCursor(arrowCursor);
-
- // Set the cancel button label to "Cancel" if it isn't already
- if (labelCancel != null)
- cancelButton.setText("&" + IDialogConstants.CANCEL_LABEL); //$NON-NLS-1$
-
- // Deactivate shell
- savedState = saveUIState(needsProgressMonitor && enableCancelButton);
- if (focusControl != null)
- savedState.put(FOCUS_CONTROL, focusControl);
-
- // Attach the progress monitor part to the cancel button
- if (needsProgressMonitor)
- {
- progressMonitorPart.attachToCancelComponent(cancelButton);
- progressMonitorPart.setVisible(true);
- }
- }
- return savedState;
- }
-
- /**
- * Creates and returns a new wizard closing dialog without opening it.
- */
- protected MessageDialog createWizardClosingDialog()
- {
- MessageDialog result= new MessageDialog(getShell(),
- JFaceResources.getString("WizardClosingDialog.title"),//$NON-NLS-1$
- null,
- JFaceResources.getString("WizardClosingDialog.message"),//$NON-NLS-1$
- MessageDialog.QUESTION,
- new String[] {IDialogConstants.OK_LABEL}, 0 );
- return result;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- public boolean close()
- {
- if (okToClose())
- return hardClose();
- else
- return false;
- }
- /**
- * Checks whether it is alright to close this wizard dialog
- * and perform standard cancel processing. If there is a
- * long running operation in progress, this method posts an
- * alert message saying that the wizard cannot be closed.
- *
- * @return <code>true</code> if it is alright to close this dialog, and
- * <code>false</code> if it is not
- */
- protected boolean okToClose()
- {
- if (activeRunningOperations > 0)
- {
- synchronized (this)
- {
- windowClosingDialog = createWizardClosingDialog();
- }
- windowClosingDialog.open();
- synchronized (this)
- {
- windowClosingDialog = null;
- }
- return false;
- }
- return true;
- }
-
- /**
- * Closes this window. Really closes it. Calls super.close()
- *
- * @return <code>true</code> if the window is (or was already) closed,
- * and <code>false</code> if it is still open
- */
- protected boolean hardClose()
- {
- return super.close();
- }
-
- /**
- * Restores the enabled/disabled state of the given control.
- *
- * @param w the control
- * @param h the map (key type: <code>String</code>, element type:
- * <code>Boolean</code>)
- * @param key the key
- * @see #saveEnableStateAndSet
- */
- protected void restoreEnableState(Control w, Map h, String key)
- {
- if (w != null) {
- Boolean b = (Boolean) h.get(key);
- if (b != null)
- w.setEnabled(b.booleanValue());
- }
- }
- /**
- * Restores the enabled/disabled state of the wizard dialog's
- * buttons and the tree of controls for the currently showing page.
- *
- * @param state a map containing the saved state as returned by
- * <code>saveUIState</code>
- * @see #saveUIState
- */
- protected void restoreUIState(Map state)
- {
- //protected Button okButton, cancelButton, testButton, browseButton, addButton, detailsButton;
- restoreEnableState(okButton, state, "ok"); //$NON-NLS-1$
- restoreEnableState(testButton, state, "test"); //$NON-NLS-1$
- restoreEnableState(browseButton, state, "browse"); //$NON-NLS-1$
- restoreEnableState(cancelButton, state, "cancel"); //$NON-NLS-1$
- restoreEnableState(addButton, state, "add"); //$NON-NLS-1$
- restoreEnableState(detailsButton,state, "details"); //$NON-NLS-1$
- SystemControlEnableState pageState = (SystemControlEnableState) state.get("page");//$NON-NLS-1$
- pageState.restore();
- }
-
- /**
- * Captures and returns the enabled/disabled state of the wizard dialog's
- * buttons and the tree of controls for the currently showing page. All
- * these controls are disabled in the process, with the possible excepton of
- * the Cancel button.
- *
- * @param keepCancelEnabled <code>true</code> if the Cancel button should
- * remain enabled, and <code>false</code> if it should be disabled
- * @return a map containing the saved state suitable for restoring later
- * with <code>restoreUIState</code>
- * @see #restoreUIState
- */
- protected Map saveUIState(boolean keepCancelEnabled)
- {
- Map savedState= new HashMap(10);
- saveEnableStateAndSet(okButton, savedState, "ok", false); //$NON-NLS-1$
- saveEnableStateAndSet(testButton, savedState, "test", false); //$NON-NLS-1$
- saveEnableStateAndSet(browseButton, savedState, "browse", false); //$NON-NLS-1$
- saveEnableStateAndSet(cancelButton, savedState, "cancel", keepCancelEnabled); //$NON-NLS-1$
- saveEnableStateAndSet(addButton, savedState, "add", false); //$NON-NLS-1$
- saveEnableStateAndSet(detailsButton,savedState, "details",false); //$NON-NLS-1$
- //savedState.put("page", ControlEnableState.disable(getControl()));
- savedState.put("page", SystemControlEnableState.disable(dialogAreaComposite)); //$NON-NLS-1$
- return savedState;
- }
-
- /**
- * Saves the enabled/disabled state of the given control in the
- * given map, which must be modifiable.
- *
- * @param w the control, or <code>null</code> if none
- * @param h the map (key type: <code>String</code>, element type:
- * <code>Boolean</code>)
- * @param key the key
- * @param enabled <code>true</code> to enable the control,
- * and <code>false</code> to disable it
- * @see #restoreEnableState(Control,Map,String)
- */
- protected void saveEnableStateAndSet(Control w, Map h, String key, boolean enabled)
- {
- if (w != null) {
- h.put(key, new Boolean(w.isEnabled()));
- w.setEnabled(enabled);
- }
- }
-
- /**
- * Sets the given cursor for all shells currently active
- * for this window's display.
- *
- * @param c the cursor
- */
- protected void setDisplayCursor(Cursor c)
- {
- setDisplayCursor(getShell(), c);
- }
- /**
- * Sets the given cursor for all shells currently active for the given shell's display.
- *
- * @param c the cursor
- */
- public static void setDisplayCursor(Shell shell, Cursor c)
- {
- if (c == null)
- {
- // attempt to fix problem that the busy cursor sometimes stays. Phil
- // DKM - commenting this out since the attempt to fix problem didn't work
- // and it causes accessibility problems when expanding a system via keyboard
- // shell.forceActive();
- // shell.forceFocus();
- }
- if (shell != null && shell.getDisplay() != null)
- {
- Shell[] shells = shell.getDisplay().getShells();
- for (int i = 0; i < shells.length; i++)
- {
- shells[i].setCursor(c);
- }
- }
- }
-
-
- /**
- * For IRunnableContext.
- */
- public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
- throws InvocationTargetException, InterruptedException
- {
- // The operation can only be canceled if it is executed in a separate thread.
- // Otherwise the UI is blocked anyway.
- Object state = aboutToStart(fork && cancelable);
- activeRunningOperations++;
- if (activeRunningOperations > 1)
- {
- //System.out.println("Nested operation!");
- //(new Exception()).fillInStackTrace().printStackTrace();
- }
- try {
- ModalContext.run(runnable, fork, getProgressMonitor(), getShell().getDisplay());
- } finally {
- activeRunningOperations--;
- stopped(state);
- }
- }
- /**
- * A long running operation triggered through the wizard
- * was stopped either by user input or by normal end.
- * Hides the progress monitor and restores the enable state
- * wizard's buttons and controls.
- *
- * @param savedState the saved UI state as returned by <code>aboutToStart</code>
- * @see #aboutToStart
- */
- private void stopped(Object savedState)
- {
- if ((getShell() != null) && (activeRunningOperations <= 0))
- {
- if (needsProgressMonitor)
- {
- progressMonitorPart.setVisible(false);
- progressMonitorPart.removeFromCancelComponent(cancelButton);
- }
- Map state = (Map)savedState;
- restoreUIState(state);
- cancelButton.addSelectionListener(cancelListener);
- setDisplayCursor(null);
- cancelButton.setCursor(null);
- if (labelCancel != null)
- cancelButton.setText(labelCancel);
- waitCursor.dispose();
- waitCursor = null;
- arrowCursor.dispose();
- arrowCursor = null;
- Control focusControl = (Control)state.get(FOCUS_CONTROL);
- if (focusControl != null)
- focusControl.setFocus();
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java
deleted file mode 100644
index 8fda6dee2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.rse.ui.view.SystemActionViewerFilter;
-import org.eclipse.rse.ui.view.SystemResourceSelectionForm;
-import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
-{
- private SystemResourceSelectionForm _form;
- private SystemResourceSelectionInputProvider _inputProvider;
- private Object _preSelection;
- private IValidatorRemoteSelection _selectionValidator;
- private boolean _multipleSelectionMode;
- private boolean _showPropertySheet = false;
- //private IHost _outputConnection;
- private SystemActionViewerFilter _customViewerFilter;
- private String _message, _tip;
-
-
- public SystemRemoteResourceDialog(Shell shell, String title, SystemResourceSelectionInputProvider inputProvider)
- {
- super(shell, title);
- _inputProvider = inputProvider;
- }
-
- protected Control createInner(Composite parent)
- {
- _form = new SystemResourceSelectionForm(getShell(), parent, this, _inputProvider, getVerbage(), _multipleSelectionMode, getMessageLine());
- initForm();
- createMessageLine(parent);
- return _form.getInitialFocusControl();
- }
-
- /**
- * 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;
- }
-
- public void initForm()
- {
- _form.setPreSelection(_preSelection);
- if (_customViewerFilter != null)
- {
- _form.applyViewerFilter(_customViewerFilter);
- }
- else
- {
- _form.applyViewerFilter(getViewerFilter());
- }
- _form.setSelectionValidator(_selectionValidator);
- _form.setShowPropertySheet(_showPropertySheet);
- _form.setSelectionTreeToolTipText(getTreeTip());
- if (_message != null)
- _form.setMessage(_message);
- if (_tip != null)
- _form.setSelectionTreeToolTipText(_tip);
- }
-
- public void setDefaultSystemConnection(IHost connection, boolean onlyConnection)
- {
- _inputProvider.setSystemConnection(connection, onlyConnection);
- }
-
- public void setSystemTypes(String[] types)
- {
- _inputProvider.setSystemTypes(types);
- }
-
- protected Control getInitialFocusControl()
- {
- return _form.getInitialFocusControl();
- }
-
- public void setPreSelection(Object selection)
- {
- _preSelection = selection;
- if (_form != null)
- {
- _form.setPreSelection(selection);
- }
- }
-
- public void setSelectionValidator(IValidatorRemoteSelection validator)
- {
- _selectionValidator = validator;
- }
-
- public void setCustomViewerFilter(SystemActionViewerFilter viewerFilter)
- {
- _customViewerFilter = viewerFilter;
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedObjects()
- * method to retrieve the list of selected objects.
- * <p>
- * Further, if you turn this on, it has the side effect of allowing the user
- * to select any remote object. The assumption being if you are prompting for
- * files, you also want to allow the user to select a folder, with the meaning
- * being that all files within the folder are implicitly selected.
- *
- * @see #getSelectedObjects()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- _multipleSelectionMode = multiple;
-
- }
-
- /**
- * Set the message shown at the top of the form
- */
- public void setMessage(String message)
- {
- _message = message;
- if (_form != null)
- {
- _form.setMessage(message);
- }
- }
- /**
- * Set the tooltip text for the remote systems tree from which an item is selected.
- */
- public void setSelectionTreeToolTipText(String tip)
- {
- _tip = tip;
- if (_tip != null)
- {
- _form.setSelectionTreeToolTipText(tip);
- }
- }
-
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload always shows the property sheet
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- _showPropertySheet = show;
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload shows a Details>>> button so the user can decide if they want to see the
- * property sheet.
- * <p>
- * @param show True if show the property sheet within the dialog
- * @param initialState True if the property is to be initially displayed, false if it is not
- * to be displayed until the user presses the Details button.
- */
- public void setShowPropertySheet(boolean show, boolean initialState)
- {
- if (show)
- {
- _showPropertySheet = initialState;
- setShowDetailsButton(true, !initialState);
- }
- }
-
- /**
- * Return selected file or folder
- */
- public Object getSelectedObject()
- {
- if (getOutputObject() instanceof Object[])
- return ((Object[])getOutputObject())[0];
- else
- return getOutputObject();
- }
- /**
- * Return all selected objects. This method will return an array of one
- * unless you have called setMultipleSelectionMode(true)!
- * @see #setMultipleSelectionMode(boolean)
- */
- public Object[] getSelectedObjects()
- {
- if (getOutputObject() instanceof Object[])
- return (Object[])getOutputObject();
- else if (getOutputObject() != null)
- return new Object[] {getOutputObject()};
- else
- return null;
- }
-
- public IHost getSelectedConnection()
- {
- return _form.getSelectedConnection();
- }
-
- /**
- * Private method.
- * <p>
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- boolean closeDialog = _form.verify();
- if (closeDialog)
- {
- //_outputConnection = _form.getSelectedConnection();
- if (_multipleSelectionMode)
- setOutputObject(_form.getSelectedObjects());
- else
- setOutputObject(_form.getSelectedObject());
- }
- else
- setOutputObject(null);
- return closeDialog;
- }
- /**
- * Private method.
- * <p>
- * Called when user presses DETAILS button.
- * <p>
- * Note the text is automatically toggled for us! We need only
- * do whatever the functionality is that we desire
- *
- * @param hideMode the current state of the details toggle, prior to this request. If we return true from
- * this method, this state and the button text will be toggled.
- *
- * @return true if the details state toggle was successful, false if it failed.
- */
- protected boolean processDetails(boolean hideMode)
- {
- _form.toggleShowPropertySheet(getShell(), getContents());
- return true;
- }
-
- public abstract SystemActionViewerFilter getViewerFilter();
- public abstract String getVerbage();
- public abstract String getTreeTip();
-} \ No newline at end of file
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
deleted file mode 100644
index be46cf320..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameDialog.java
+++ /dev/null
@@ -1,688 +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 java.util.Hashtable;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnLayoutData;
-import org.eclipse.jface.viewers.ColumnPixelData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.jface.viewers.ICellEditorListener;
-import org.eclipse.jface.viewers.ICellModifier;
-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.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.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;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ISystemValidatorUniqueString;
-import org.eclipse.rse.ui.validators.ValidatorConnectionName;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * Dialog for renaming multiple resources.
- * <p>
- * This is a re-usable dialog that you can use directly, or via the {@link org.eclipse.rse.ui.actions.SystemCommonRenameAction}
- * action.
- * <p>
- * To use this dialog, you must call setInputObject with a StructuredSelection of the objects to be renamed.
- * If those objects adapt to {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter} or
- * {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter}, the dialog will offer built-in error checking.
- * <p>
- * If the input objects do not adapt to org.eclipse.rse.ui.view.ISystemRemoteElementAdapter or ISystemViewElementAdapter, then you
- * should call {@link #setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator)} to
- * specify a validator that is called to verify the typed new name is valid. Further, to show the type value
- * of the input objects, they should implement {@link org.eclipse.rse.ui.dialogs.ISystemTypedObject}.
- * <p>
- * This dialog does not do the actual renames. Rather, it will return an array of the user-typed new names. These
- * are queriable via {@link #getNewNames()}, after testing that {@link #wasCancelled()} is false. The array entries
- * will match the input order.
- *
- * @see org.eclipse.rse.ui.actions.SystemCommonRenameAction
- */
-public class SystemRenameDialog extends SystemPromptDialog
- implements ISystemPropertyConstants,
- ISelectionChangedListener,
- TraverseListener,
- ICellEditorListener, Runnable, FocusListener
-{
-
- private SystemMessage errorMessage;
- private TextCellEditor cellEditor;
- private int currRow = 0;
- private GridData tableData = null;
- private boolean ignoreSelection = false;
- private Hashtable uniqueNameValidatorPerParent = new Hashtable();
-
- private String verbage;
-
- private SystemRenameTableProvider srtp;
- private Table table;
- private TableViewer tableViewer;
- private static final int COLUMN_NEWNAME = SystemRenameTableProvider.COLUMN_NEWNAME;
- private String columnHeaders[] = {
- "",SystemResources.RESID_RENAME_COLHDG_OLDNAME, //$NON-NLS-1$
- SystemResources.RESID_RENAME_COLHDG_NEWNAME,
- SystemResources.RESID_RENAME_COLHDG_TYPE
- };
- private ColumnLayoutData columnLayouts[] =
- {
- new ColumnPixelData(19, false),
- new ColumnWeightData(125,125,true),
- new ColumnWeightData(150,150,true),
- new ColumnWeightData(120,120,true)
- };
- // give each column a property value to identify it
- private static String[] tableColumnProperties =
- {
- ISystemPropertyConstants.P_ERROR,
- IBasicPropertyConstants.P_TEXT,
- ISystemPropertyConstants.P_NEWNAME,
- ISystemPropertyConstants.P_TYPE,
- };
- // inner class to support cell editing
- private ICellModifier cellModifier = new ICellModifier()
- {
- public Object getValue(Object element, String property)
- {
- SystemRenameTableRow row = (SystemRenameTableRow)element;
- String value = ""; //$NON-NLS-1$
- if (property.equals(P_TEXT))
- value = row.getName();
- else
- value = row.getNewName();
- //System.out.println("inside getvalue: " + row + "; " + property + " = " + value);
- return value;
- }
-
- public boolean canModify(Object element, String property)
- {
- boolean modifiable = property.equals(P_NEWNAME);
- if ((cellEditor != null) && (cellEditor.getControl() != null))
- {
- SystemRenameTableRow row = (SystemRenameTableRow)element;
- int limit = row.getNameLengthLimit();
- if (limit == -1)
- limit = 1000;
- ((Text)cellEditor.getControl()).setTextLimit(limit);
- }
- return modifiable;
- }
- /**
- * Modifies a marker as a result of a successfully completed direct editing.
- */
- public void modify(Object element, String property, Object value)
- {
- SystemRenameTableRow row = (SystemRenameTableRow)(((TableItem)element).getData());
- //System.out.println("inside modify: " + row+"; "+property+", "+value);
- if (property.equals(P_NEWNAME))
- {
- row.setNewName((String)value);
- tableViewer.update(row, null);
- }
- }
- };
-
-
- /**
- * Constructor for SystemRenameDialog
- */
- public SystemRenameDialog(Shell shell)
- {
- this(shell, SystemResources.RESID_RENAME_TITLE);
- }
- /**
- * Constructor when you have your own title
- */
- public SystemRenameDialog(Shell shell, String title)
- {
- super(shell, title);
-
- //pack();
- setHelp(RSEUIPlugin.HELPPREFIX+"drnm0000"); //$NON-NLS-1$
- }
- /**
- * Set the verbage to show above the table. The default is "Enter new name for each resource"
- */
- public void setVerbage(String verbage)
- {
- this.verbage = verbage;
- }
- /**
- * Set the validator for the new name,as supplied by the adaptor for name checking.
- * Overrides the default which is to query it from the object's adapter.
- */
- public void setNameValidator(ISystemValidator nameValidator)
- {
- }
-
- /**
- * Create message line. Intercept so we can set msg line of form.
- */
- protected ISystemMessageLine createMessageLine(Composite c)
- {
- ISystemMessageLine msgLine = super.createMessageLine(c);
- return fMessageLine;
- }
-
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- SystemRenameTableRow[] rows = getRows();
- tableViewer.setSelection(new StructuredSelection(rows[0]),true);
- tableViewer.editElement(rows[0], COLUMN_NEWNAME);
- return null;
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int nbrColumns = 1;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- if (verbage != null)
- SystemWidgetHelpers.createVerbiage(composite, verbage, nbrColumns, false, 200);
- else
- SystemWidgetHelpers.createVerbiage(composite, SystemResources.RESID_RENAME_VERBAGE, nbrColumns, false, 200);
-
- table = createTable(composite);
- tableViewer = new TableViewer(table);
- createColumns();
- tableViewer.setColumnProperties(tableColumnProperties);
- tableViewer.setCellModifier(cellModifier);
- CellEditor editors[] = new CellEditor[columnHeaders.length];
- cellEditor = new TextCellEditor(table);
- cellEditor.addListener(this);
- editors[COLUMN_NEWNAME] = cellEditor;
- tableViewer.setCellEditors(editors);
- cellEditor.getControl().addTraverseListener(this);
- //System.out.println("CELL EDITOR CONTROL: " + cellEditor.getControl());
-
- srtp = new SystemRenameTableProvider();
- int width = tableData.widthHint;
- int nbrRows = Math.min(getRows().length,8);
- int rowHeight = table.getItemHeight() + table.getGridLineWidth();
- int sbHeight = table.getHorizontalBar().getSize().y;
- int height = (nbrRows * rowHeight) + sbHeight;
- //System.out.println("#rows = "+nbrRows+", sbHeight = " + sbHeight+", totalHeight="+height);
- tableData.heightHint = height;
- table.setLayoutData(tableData);
- table.setSize(width, height);
- tableViewer.setLabelProvider(srtp);
- tableViewer.setContentProvider(srtp);
- //System.out.println("Input Object: "+getInputObject());
- tableViewer.setInput(getInputObject());
-
- tableViewer.addSelectionChangedListener(this);
- tableViewer.getTable().addFocusListener(this);
-
- // test if we need a unique name validator
- Shell shell = getShell();
- Display display = shell.getDisplay();
- if (display != null)
- display.asyncExec(this);
- else
- run();
-
- return composite;
- }
-
-
- private Table createTable(Composite parent)
- {
- //table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.SINGLE | SWT.BORDER);
- table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- table.setLinesVisible(true);
- tableData = new GridData();
- tableData.horizontalAlignment = GridData.FILL;
- tableData.grabExcessHorizontalSpace = true;
- tableData.widthHint = 450;
- tableData.heightHint= 30;
- tableData.verticalAlignment = GridData.CENTER;
- tableData.grabExcessVerticalSpace = true;
- table.setLayoutData(tableData);
-
- //table.addTraverseListener(this);
- //getShell().addTraverseListener(this);
-
-
- return table;
- }
- private void createColumns()
- {
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
- table.setHeaderVisible(true);
- for (int i = 0; i < columnHeaders.length; i++)
- {
- layout.addColumnData(columnLayouts[i]);
- TableColumn tc = new TableColumn(table, SWT.NONE,i);
- tc.setResizable(columnLayouts[i].resizable);
- tc.setText(columnHeaders[i]);
- //tc.addSelectionListener(headerListener);
- }
- }
- public void selectionChanged(SelectionChangedEvent event)
- {
- //System.out.println("Selection changed. ignoreSelection? "+ignoreSelection);
- if (ignoreSelection)
- return;
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- if (selection.isEmpty())
- {
- currRow = -1;
- return;
- }
- SystemRenameTableRow selectedRow = (SystemRenameTableRow)selection.getFirstElement();
- int rowIdx = srtp.getRowNumber(selectedRow);
- if (rowIdx == currRow)
- return;
- currRow = rowIdx;
- tableViewer.editElement(getRows()[rowIdx], COLUMN_NEWNAME);
- }
- /**
- * Override of parent. Must pass selected object onto the form for initializing fields.
- * Called by SystemDialogAction's default run() method after dialog instantiated.
- */
- public void setInputObject(Object inputObject)
- {
- //System.out.println("INSIDE SETINPUTOBJECT: " + inputObject);
- super.setInputObject(inputObject);
- }
-
- /**
- * Called when user presses OK button.
- * This does not do the actual renames, but rather updates the new name array.
- * You need to query this via {@link #getNewNames()}, after ensuring the dialog was not
- * cancelled by calling {@link #wasCancelled()}.
- */
- protected boolean processOK()
- {
- // the following is for defect 41565 where the changed name is not used when enter pressed after typing
- if ((currRow >=0) && (currRow <= (getRows().length - 1)))
- {
- String newName = ((Text)cellEditor.getControl()).getText();
- //System.out.println("Testing. newName = "+newName);
- getRows()[currRow].setNewName(newName);
- }
- //else
- // System.out.println("currRow = "+currRow);
-
- boolean closeDialog = verify();
- if (closeDialog)
- {
- }
- return closeDialog;
- }
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify()
- {
- SystemMessage errMsg = null;
- SystemMessage firstErrMsg = null;
- SystemRenameTableRow firstErrRow = null;
- clearErrorMessage();
- SystemRenameTableRow[] rows = getRows();
- Vector newNames = new Vector();
- // first, clear pending errors...
- for (int idx=0; (idx<rows.length); idx++)
- rows[idx].setErrorMessage(null);
- // check 1: all entries have a new name, and the new name is unique for this list.
- for (int idx=0; (firstErrMsg==null) && (idx<rows.length); idx++)
- //for (int idx=0; (idx<rows.length); idx++)
- {
- errMsg = null;
- String oldName = rows[idx].getName();
- String newName = rows[idx].getNewName();
- 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 = RSEUIPlugin.getPluginMessage(ISystemMessages.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 = RSEUIPlugin.getPluginMessage(ISystemMessages.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();
- if (nameValidator != null)
- errMsg = nameValidator.validate(newName);
- if (errMsg == null)
- {
- ValidatorUniqueString vun = rows[idx].getUniqueNameValidator();
- if (vun != null)
- errMsg = vun.validate(newName);
- }
- if ((errMsg == null) && (rows[idx].getElement() instanceof IHost))
- {
- boolean ok = ValidatorConnectionName.validateNameNotInUse(newName, getShell());
- if (!ok)
- errMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED);
- }
-
- }
- if (errMsg == null)
- {
- //newNames.addElement(newName);
- newNames.addElement(canonicalNewName); // defect 42145
- }
- if ((errMsg != null) && (firstErrMsg == null))
- {
- firstErrMsg = errMsg;
- firstErrRow = rows[idx];
- }
- rows[idx].setErrorMessage(errMsg); // todo: convert to handle SystemMessage object
- }
- if (firstErrMsg != null)
- {
- setErrorMessage(firstErrMsg);
- tableViewer.update(rows,null);
- tableViewer.setSelection(new StructuredSelection(firstErrRow),true);
- tableViewer.editElement(firstErrRow,COLUMN_NEWNAME);
- }
- return (firstErrMsg == null);
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- * @see #setNameValidator(ISystemValidator)
- */
- protected SystemMessage validateNameInput()
- {
- errorMessage= null;
- if (errorMessage == null)
- clearErrorMessage();
- else
- setErrorMessage(errorMessage);
- 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)
- pageComplete = true;
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- setPageComplete(isPageComplete());
- }
-
- /**
- * Required by TraverseListener.
- * We want to know when the tab key is pressed so we can give edit focus to the next name
- */
- public void keyTraversed(TraverseEvent e)
- {
- int detail = e.detail;
- //System.out.println("in keyTraversed: " + keycode + ", " + detail + ", " + doit);
- e.doit = false;
- ignoreSelection = true;
-
- Control focusControl = Display.getCurrent().getFocusControl();
-
- //System.out.println("...Key pressed. currRow = "+currRow);
-
- // DEFECT 41807 STATED USERS SHOULD BE ALLOWED TO TAB TO THE BUTTONS
- if (detail == SWT.TRAVERSE_TAB_NEXT)
- {
- if (currRow != getRows().length-1)
- {
- ++currRow;
- //System.out.println("...D TAB pressed. currRow = "+currRow);
- //tableViewer.setSelection(new StructuredSelection(getRows()[currRow]),true);
- tableViewer.editElement(getRows()[currRow], COLUMN_NEWNAME);
- }
- else
- {
- tableViewer.editElement(getRows()[0], COLUMN_NEWNAME);
- currRow = 0;
- e.doit = true;
- }
- }
- else if (detail == SWT.TRAVERSE_TAB_PREVIOUS)
- {
- if (currRow != 0)
- {
- if (currRow > 0)
- --currRow;
- else
- currRow = 0;
- //System.out.println("...D BACKTAB pressed. currRow = "+currRow);
- //tableViewer.setSelection(new StructuredSelection(getRows()[currRow]),true);
- tableViewer.editElement(getRows()[currRow], COLUMN_NEWNAME);
- }
- else
- {
- tableViewer.editElement(getRows()[getRows().length-1], COLUMN_NEWNAME);
- currRow = getRows().length-1;
- e.doit = true;
- }
- }
- else
- e.doit = true;
- ignoreSelection = false;
- }
-
- /**
- * Returns the rows of rename items.
- */
- public SystemRenameTableRow[] getRows()
- {
- return (SystemRenameTableRow[])srtp.getElements(getInputObject());
- }
-
- /**
- * Returns an array of the new names.
- */
- public String[] getNewNames()
- {
- SystemRenameTableRow[] rows = getRows();
- String[] names = new String[rows.length];
- for (int idx=0; idx<rows.length; idx++)
- names[idx] = rows[idx].getNewName();
- return names;
- }
-
- // CELL EDITOR METHODS
- public void applyEditorValue()
- {
- //System.out.println("CELLEDITOR: INSIDE APPLYEDITORVALUE");
- }
- public void cancelEditor()
- {
- //System.out.println("CELLEDITOR: INSIDE CANCELEDITOR");
- }
- public void editorValueChanged(boolean oldValidState,boolean newValidState)
- {
- //System.out.println("CELLEDITOR: INSIDE EDITORVALUECHANGED: "+oldValidState+","+newValidState);
- }
-
- /**
- * Runnable method
- */
- public void run()
- {
- SystemRenameTableRow[] rows = getRows();
- ValidatorUniqueString uniqueNameValidator = null;
- Object inputElement = null;
- ISystemValidator nameValidator = null;
- for (int idx=0; idx<rows.length; idx++)
- {
- nameValidator = rows[idx].getNameValidator();
- inputElement = rows[idx].getElement();
- uniqueNameValidator = setUniqueNameValidator(inputElement, nameValidator);
- rows[idx].setUniqueNameValidator(uniqueNameValidator);
- }
- }
-
- /**
- * Given an input element and externally-suppplied name validator for it, determine if we
- * need to augment that validator with one that will check for uniqueness, and if so
- * create and register that uniqueness validator
- */
- protected ValidatorUniqueString setUniqueNameValidator(Object inputElement, ISystemValidator nameValidator)
- {
- ValidatorUniqueString uniqueNameValidator = null;
- ISystemRemoteElementAdapter ra = getRemoteAdapter(inputElement);
- boolean debug = false;
- String parentName = null;
- if (ra != null)
- parentName = ra.getAbsoluteParentName(inputElement);
- if ((ra != null) && (parentName != null))
- {
- uniqueNameValidator = (ValidatorUniqueString)uniqueNameValidatorPerParent.get(parentName);
- if (uniqueNameValidator != null)
- {
- if (debug)
- System.out.println("Existing name list found for parent " + parentName); //$NON-NLS-1$
- return uniqueNameValidator;
- }
- else if (debug)
- System.out.println("No existing name list found for parent " + parentName); //$NON-NLS-1$
- }
- if ((ra != null) && (parentName != null))
- {
- String[] names = null;
- boolean caseSensitive = ra.getSubSystem(inputElement).getSubSystemConfiguration().isCaseSensitive();
- boolean needUniqueNameValidator = !(nameValidator instanceof ISystemValidatorUniqueString);
- if (!needUniqueNameValidator)
- {
- String[] existingNames = ((ISystemValidatorUniqueString)nameValidator).getExistingNamesList();
- needUniqueNameValidator = ((existingNames == null) || (existingNames.length==0));
- }
- if (needUniqueNameValidator)
- {
- // Set the busy cursor to all shells.
- super.setBusyCursor(true);
- try {
- names = ra.getRemoteParentNamesInUse(getShell(), inputElement);
- } catch (Exception exc) {SystemBasePlugin.logError("Exception getting parent's child names in rename dialog",exc);} //$NON-NLS-1$
- if ((names != null) && (names.length>0))
- {
- uniqueNameValidator = new ValidatorUniqueString(names,caseSensitive);
- uniqueNameValidator.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- uniqueNameValidatorPerParent.put(parentName, uniqueNameValidator);
- if (debug)
- {
- System.out.println("Name validator set. Names = "); //$NON-NLS-1$
- for (int idx=0; idx<names.length; idx++)
- System.out.println("..."+idx+": "+names[idx]); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- // Restore cursor
- super.setBusyCursor(false);
- }
- }
- return uniqueNameValidator;
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- if (!(o instanceof IAdaptable))
- return (ISystemRemoteElementAdapter)Platform.getAdapterManager().getAdapter(o,ISystemRemoteElementAdapter.class);
- return (ISystemRemoteElementAdapter)((IAdaptable)o).getAdapter(ISystemRemoteElementAdapter.class);
- }
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
- */
- public void focusGained(FocusEvent e)
- {
- /*
- IStructuredSelection selection = (IStructuredSelection)tableViewer.getSelection();
- if (selection.isEmpty())
- {
- currRow = -1;
- return;
- }
- SystemRenameTableRow selectedRow = (SystemRenameTableRow)selection.getFirstElement();
- int rowIdx = srtp.getRowNumber(selectedRow);
- if (rowIdx == currRow)
- return;
- currRow = rowIdx;
- tableViewer.editElement(getRows()[rowIdx], COLUMN_NEWNAME);
- */
- //System.out.println("Focus gained");
- }
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
- */
- public void focusLost(FocusEvent e)
- {
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 49fdbf32b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java
+++ /dev/null
@@ -1,713 +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.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-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.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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.ISystemValidatorUniqueString;
-import org.eclipse.rse.ui.validators.ValidatorConnectionName;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-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.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-
-
-
-/**
- * Dialog for renaming a single resource. Used when only one item selected.
- * <p>
- * This is a re-usable dialog that you can use directly, or via the {@link org.eclipse.rse.ui.actions.SystemCommonRenameAction}
- * action.
- * <p>
- * To use this dialog, you must call setInputObject with a StructuredSelection of the objects to be renamed.
- * If those objects adapt to {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter} or
- * {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter}, the dialog will offer built-in error checking.
- * <p>
- * If the input object does not adapt to org.eclipse.rse.ui.view.ISystemRemoteElementAdapter or ISystemViewElementAdapter, then you
- * should call {@link #setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator)} to
- * specify a validator that is called to verify the user-typed new name is valid. Further, to show the type value
- * of the input object, it should implement {@link org.eclipse.rse.ui.dialogs.ISystemTypedObject}.
- * <p>
- * This dialog does not do the actual renames. Rather, it will return the user-typed new name. This is
- * queriable via {@link #getNewName()}, after testing that {@link #wasCancelled()} is false.
- *
- * @see org.eclipse.rse.ui.actions.SystemCommonRenameAction
- */
-public class SystemRenameSingleDialog extends SystemPromptDialog
- implements ISystemPropertyConstants,
- Runnable
-{
-
- public static final boolean COLLISION_MODE = true;
-
- private Button overwriteRadio;
- //private Button renameRadio;
- private boolean overwriteMode = true;
-
- private Composite renameGroup;
-
- private Text newName;
- private String promptLabel, promptTip;
- private String newNameString;
- private String inputName = ""; //$NON-NLS-1$
- private Label resourceTypePrompt, resourceTypeValue, verbageLabel, renameLabel;
- private SystemMessage errorMessage;
- private ISystemValidator nameValidator;
- private ValidatorUniqueString uniqueNameValidator;
- private boolean initialized = false;
- private boolean copyCollisionMode = false;
- private boolean isRemote = true;
- private ISystemViewElementAdapter adapter = null;
- private Object inputElement = null;
- private String description = null;
-
- /**
- * Constructor
- */
- public SystemRenameSingleDialog(Shell shell)
- {
- this(shell, SystemResources.RESID_RENAME_TITLE);
- String singleTitle = SystemResources.RESID_RENAME_SINGLE_TITLE;
- if (!singleTitle.startsWith("Missing")) // TODO: remove test after next mri rev //$NON-NLS-1$
- setTitle(singleTitle);
- }
- /**
- * Constructor with a title
- */
- public SystemRenameSingleDialog(Shell shell, String title)
- {
- super(shell, title);
-
- //pack();
- setBlockOnOpen(true);
- setHelp(RSEUIPlugin.HELPPREFIX+"drns0000"); //$NON-NLS-1$
- }
-
- /**
- * Constructor with an input object and validator
- * This constructor is in copy/move dialogs when there is a collision
- * @param shell The parent dialog
- * @param copyCollisionMode true if this is being called because of a name collision on a copy or move operation
- * @param inputObject The object that is being renamed, or on a copy/move the object in the target container which already exists. Used to get the old name and the name validator
- * @param nameValidator The name validator to use. Can be null, in which case it is queried from the adapter of the input object
- */
- public SystemRenameSingleDialog(Shell shell, boolean copyCollisionMode, Object inputObject, ISystemValidator nameValidator)
- {
- this(shell);
- setInputObject(inputObject);
- setCopyCollisionMode(copyCollisionMode);
- setNameValidator(nameValidator);
-
- }
-
- /**
- * Set the label and tooltip of the prompt. The default is "New name:"
- */
- public void setPromptLabel(String label, String tooltip)
- {
- this.promptLabel = label;
- this.promptTip = tooltip;
- }
-
- /**
- * Indicate this dialog is the result of a copy/move name collision.
- * Affects the title, verbage at the top of the dialog, and context help.
- */
- public void setCopyCollisionMode(boolean copyCollisionMode)
- {
- if (copyCollisionMode)
- {
- if (this.inputObject != null && this.inputObject instanceof IHost)
- {
- setHelp(RSEUIPlugin.HELPPREFIX+"dccc0000"); //$NON-NLS-1$
- }
- else
- {
- setHelp(RSEUIPlugin.HELPPREFIX+"drns0001"); //$NON-NLS-1$
- }
- setTitle(SystemResources.RESID_COLLISION_RENAME_TITLE);
- }
- else if (this.copyCollisionMode) // from true to false
- {
- setHelp(RSEUIPlugin.HELPPREFIX+"drns0000"); //$NON-NLS-1$
- String singleTitle = SystemResources.RESID_RENAME_SINGLE_TITLE;
- if (!singleTitle.startsWith("Missing")) // TODO: remove test after next mri rev //$NON-NLS-1$
- setTitle(singleTitle);
- else
- setTitle(SystemResources.RESID_RENAME_TITLE); // older string we know exists
- }
- this.copyCollisionMode = copyCollisionMode;
- }
- /**
- * Query if this dialog is the result of a copy/move name collision.
- * Affects the title, verbage at the top of the dialog, and context help.
- */
- public boolean getCopyCollisionMode()
- {
- return copyCollisionMode;
- }
-
-
- /**
- * Set the validator for the new name,as supplied by the adaptor for name checking.
- * Overrides the default which is to query it from the object's adapter.
- */
- public void setNameValidator(ISystemValidator nameValidator)
- {
- this.nameValidator = nameValidator;
- }
-
- /**
- * 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()
- {
- //uSystem.out.println("here! " + (newName == null));
- return newName;
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int nbrColumns = 1;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- Object inputObject = getInputObject();
-
- if (copyCollisionMode)
- {
- // VERBAGE
- verbageLabel = SystemWidgetHelpers.createLabel(composite, " ", nbrColumns); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(composite, " ", nbrColumns); //filler //$NON-NLS-1$
- }
- else if (description != null)
- {
- // VERBAGE
- verbageLabel = SystemWidgetHelpers.createLabel(composite, description, nbrColumns);
- SystemWidgetHelpers.createLabel(composite, " ", nbrColumns); //filler //$NON-NLS-1$
- }
-
- if (copyCollisionMode)
- {
- overwriteRadio = SystemWidgetHelpers.createRadioButton(composite, this, SystemResources.RESID_SIMPLE_RENAME_RADIO_OVERWRITE_LABEL, SystemResources.RESID_SIMPLE_RENAME_RADIO_OVERWRITE_TOOLTIP);
- overwriteRadio.setSelection(true);
- /*renameRadio =*/ SystemWidgetHelpers.createRadioButton(composite, this, SystemResources.RESID_SIMPLE_RENAME_RADIO_RENAME_LABEL, SystemResources.RESID_SIMPLE_RENAME_RADIO_RENAME_TOOLTIP);
- }
-
- int nbrRenameColumns = 2;
- // BEGIN RENAME
- renameGroup = SystemWidgetHelpers.createComposite(composite, nbrRenameColumns);
-
- // RESOURCE TYPE
- resourceTypePrompt = SystemWidgetHelpers.createLabel(
- renameGroup, SystemResources.RESID_SIMPLE_RENAME_RESOURCEPROMPT_LABEL);
- resourceTypeValue = SystemWidgetHelpers.createLabel(renameGroup, ""); //$NON-NLS-1$
- resourceTypeValue.setToolTipText(SystemResources.RESID_SIMPLE_RENAME_RESOURCEPROMPT_TOOLTIP);
-
-
- // PROMPT
- if (promptLabel == null)
- {
- String labelText = copyCollisionMode ? SystemResources.RESID_COLLISION_RENAME_LABEL : SystemResources.RESID_SIMPLE_RENAME_PROMPT_LABEL;
- labelText = SystemWidgetHelpers.appendColon(labelText);
- renameLabel = SystemWidgetHelpers.createLabel(renameGroup, labelText);
- newName = SystemWidgetHelpers.createTextField(renameGroup, null);
- }
- else
- {
- renameLabel = SystemWidgetHelpers.createLabel(renameGroup, promptLabel);
- newName = SystemWidgetHelpers.createTextField(renameGroup, null);
- if (promptTip != null)
- newName.setToolTipText(promptTip);
- }
-
- // END RENAME
-
-
-
- if (inputObject != null)
- {
- initializeInput();
- }
-
- // init ok to disabled, until they type a new name
- setPageComplete(false);
-
- // add keystroke listeners...
- newName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateNameInput();
- }
- }
- );
-
- if (copyCollisionMode)
- {
- enableRename(false);
- }
-
-
- return composite;
- }
-
-
- /**
- * Override of parent. Must pass selected object onto the form for initializing fields.
- * Called by SystemDialogAction's default run() method after dialog instantiated.
- */
- public void setInputObject(Object inputObject)
- {
- //System.out.println("INSIDE SETINPUTOBJECT: " + inputObject + ", "+inputObject.getClass().getName());
- super.setInputObject(inputObject);
- if (newName != null)
- {
- initializeInput();
- }
- }
-
- private void initializeInput()
- {
- if (!initialized)
- {
- inputElement = getInputElement(inputObject);
- adapter = getAdapter(inputElement);
- if (adapter != null)
- inputName = adapter.getName(inputElement);
- else if (inputElement instanceof ISystemTypedObject)
- inputName = ((ISystemTypedObject)inputElement).getName();
- else if (inputElement instanceof IResource)
- inputName = ((IResource)inputElement).getName();
- else if (inputElement instanceof String)
- inputName = (String)inputElement;
- newName.setText(inputName);
-
- if (copyCollisionMode)
- {
- verbageLabel.setText(SystemMessage.sub(SystemResources.RESID_COLLISION_RENAME_VERBAGE, "&1", inputName)); //$NON-NLS-1$
- }
-
-
-
- if ((nameValidator == null) && (adapter != null))
- nameValidator = adapter.getNameValidator(inputElement);
- if (nameValidator != null)
- {
- int maxLen = nameValidator.getMaximumNameLength();
- if (maxLen != -1)
- newName.setTextLimit(maxLen);
- }
- // test if we need a unique name validator
- Shell shell = getShell();
- Display display = shell.getDisplay();
- if (display != null)
- display.asyncExec(this);
- else
- run();
-
- // the rename action for system filter pool reference selections is really
- // a rename of the actual pool, versus the reference...
- if (inputElement instanceof ISystemFilterPoolReference)
- {
- inputElement = ((ISystemFilterPoolReference)inputElement).getReferencedFilterPool();
- adapter = getAdapter(inputElement);
- }
-
- if (adapter != null)
- resourceTypeValue.setText(adapter.getType(inputElement));
- else if (inputElement instanceof ISystemTypedObject)
- resourceTypeValue.setText(((ISystemTypedObject)inputElement).getType());
- else if (inputElement instanceof IResource)
- {
- if ((inputElement instanceof IFolder) || (inputElement instanceof IProject))
- resourceTypeValue.setText(SystemViewResources.RESID_PROPERTY_FILE_TYPE_FOLDER_VALUE);
- else
- resourceTypeValue.setText(SystemViewResources.RESID_PROPERTY_FILE_TYPE_FILE_VALUE);
- }
- initialized = true;
- }
- }
-
- /**
- * Runnable method
- */
- public void run()
- {
- uniqueNameValidator = getUniqueNameValidator(inputElement, nameValidator);
- }
-
- /**
- * Given an input element and externally-suppplied name validator for it, determine if we
- * need to augment that validator with one that will check for uniqueness, and if so
- * create and return that uniqueness validator
- */
- protected ValidatorUniqueString getUniqueNameValidator(Object inputElement, ISystemValidator nameValidator)
- {
- ValidatorUniqueString uniqueNameValidator = null;
- ISystemRemoteElementAdapter ra = getRemoteAdapter(inputElement);
- if (ra != null)
- {
- isRemote = true;
- String[] names = null;
- boolean debug = false;
- boolean caseSensitive = ra.getSubSystem(inputElement).getSubSystemConfiguration().isCaseSensitive();
- boolean needUniqueNameValidator = !(nameValidator instanceof ISystemValidatorUniqueString);
- if (!needUniqueNameValidator)
- {
- String[] existingNames = ((ISystemValidatorUniqueString)nameValidator).getExistingNamesList();
- needUniqueNameValidator = ((existingNames == null) || (existingNames.length==0));
- }
- if (needUniqueNameValidator)
- {
- // Set the busy cursor to all shells.
- super.setBusyCursor(true);
- try {
- Shell shell = getShell();
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- RSEUIPlugin.getTheSystemRegistry().clearRunnableContext();
- names = ra.getRemoteParentNamesInUse(shell, inputElement);
- RSEUIPlugin.getTheSystemRegistry().setRunnableContext(shell, irc);
- } catch (Exception exc) {SystemBasePlugin.logError("Exception getting parent's child names in rename dialog",exc);} //$NON-NLS-1$
- if ((names != null) && (names.length>0))
- {
- uniqueNameValidator = new ValidatorUniqueString(names,caseSensitive);
- uniqueNameValidator.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- if (debug)
- {
- System.out.println("Name validator set. Names = "); //$NON-NLS-1$
- for (int idx=0; idx<names.length; idx++)
- System.out.println("..."+idx+": "+names[idx]); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- // Restore cursor
- super.setBusyCursor(false);
- }
- }
- else
- isRemote = false;
- newName.setFocus();
- return uniqueNameValidator;
- }
-
- /**
- * Returns the selected element given the current input, which is
- * an IStructuredSelection.
- */
- protected Object getInputElement(Object inputObject)
- {
- if (inputObject instanceof IStructuredSelection)
- {
- inputObject = ((IStructuredSelection)inputObject).getFirstElement();
- }
- if (inputObject instanceof SystemSimpleContentElement)
- {
- inputObject = ((SystemSimpleContentElement)inputObject).getData();
- }
- return inputObject;
- }
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- newNameString = newName.getText();
- if (!isRemote)
- newNameString = newNameString.trim();
- else
- newNameString = trimTrailing(newNameString); // defect 43173
- boolean closeDialog = verify();
- if (closeDialog)
- {
- if (inputElement instanceof IHost)
- {
- closeDialog = ValidatorConnectionName.validateNameNotInUse(newNameString, getShell());
- if (!closeDialog)
- newName.setFocus();
- }
- }
- if (closeDialog)
- {
- setOutputObject(newNameString);
- }
- return closeDialog;
- }
- /**
- * Trim leading blanks
- */
- public static String trimTrailing(String text)
- {
- return ("."+text).trim().substring(1); //$NON-NLS-1$
- }
-
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify()
- {
- if (copyCollisionMode && overwriteMode)
- return true;
-
- SystemMessage errMsg = null;
- Control controlInError = null;
- clearErrorMessage();
- errMsg = validateNameInput(newNameString);
- if (errMsg != null) {
- controlInError = newName;
- controlInError.setFocus();
- }
- else if (isRemote && checkIfWillBeFilteredOut(inputElement, newNameString)) {
- return false;
- }
- return (errMsg == null);
- }
-
- /**
- * If renaming a remote object, which is listed in a tree view under an expanded filter,
- * this tests to see if the rename will cause that object to suddenly not meet the filtering
- * criteria of the parent filter, and hence disappear. If so, issue warning message before
- * proceeding.
- * @return true if will be filtered out and user chose to cancel operation
- */
- protected boolean checkIfWillBeFilteredOut(Object remoteObject, String newName)
- {
- // after breaking my pick on this, I have decide it simply is too much work, and
- // too error-prone, to do. The reason is that we really cannot accurately determine
- // if the new name will meet the criteria of the filter, short of re-resolving the
- // filter and looking for the new name. That is just too expensive, I think. Phil.
- // See defect 42094.
- return false;
- /*
- boolean ok = false;
- // step 1: check if we are invoked from a tree view
- if (inputTreeViewer == null)
- return false;
- // step 2: check if the parent of the selected object is a filter
- if (inputTreeViewer.getSelectedParent() instanceof SystemFilterReference)
- {
- SystemFilterReference parentFilterRef = (SystemFilterReference)inputTreeViewer.getSelectedParent();
- SystemFilter parentFilter = parentFilterRef.getReferencedFilter();
- // step 3: check if the new name meets the criteria of the filter
- SubSystem ss = getRemoteAdapter(remoteObject).getSubSystem(remoteObject);
- boolean matches = ss.doesFilterMatch(parentFilter, newName);
- if (!matches)
- {
- // todo: issue warning msg 1311, and allow user to cancel operation
- }
- }
- return ok;
- */
- }
-
- /**
- * Called directly as user types.
- */
- protected SystemMessage validateNameInput()
- {
- newNameString = newName.getText();
- if (!isRemote)
- newNameString = newNameString.trim();
- else
- newNameString = trimTrailing(newNameString); // defect 43173
-
-
- return validateNameInput(newNameString);
- }
- /**
- * Called directly from verify.
- */
- protected SystemMessage validateNameInput(String theNewName)
- {
- errorMessage= null;
-
- if (theNewName == null)
- {
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY);
- }
- else
- {
- if (nameValidator != null)
- errorMessage= nameValidator.validate(theNewName);
- else if (theNewName.length() == 0)
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY);
- if (errorMessage == null)
- {
- if (adapter != null && adapter.namesAreEqual(inputElement, theNewName))
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_RENAME_OLDEQUALSNEW).makeSubstitution(inputName);
- }
- }
-
- if ((errorMessage == null) && (uniqueNameValidator != null))
- errorMessage = uniqueNameValidator.validate(theNewName);
- 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 (copyCollisionMode && overwriteMode)
- {
- return true;
- }
-
-
- if (errorMessage == null)
- {
- String theNewName = newName.getText().trim();
- pageComplete = (theNewName.length() > 0);
- if (pageComplete && adapter != null)
- {
- pageComplete = !adapter.namesAreEqual(inputElement, theNewName);
- //System.out.println("back from namesAreEqual: " + pageComplete);
-
- }
- }
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- setPageComplete(isPageComplete());
- }
-
- /**
- * Returns the user-entered new name
- */
- public String getNewName()
- {
- return newNameString;
- }
-
- /**
- * Returns the user-entered new name as an array for convenience to ISystemRenameTarget hosts.
- */
- public String[] getNewNameArray()
- {
- String[] newNames = new String[1];
- newNames[0] = newNameString;
- return newNames;
- }
-
- public void setDescription(String description)
- {
- this.description = description;
- }
-
- public String getDescription()
- {
- return this.description;
- }
-
- public void handleEvent(Event e)
- {
- Widget source = e.widget;
- if (source == overwriteRadio)
- {
- enableRename(!overwriteRadio.getSelection());
- }
- }
-
- private void enableRename(boolean flag)
- {
- if (newName != null)
- {
- renameLabel.setEnabled(flag);
- newName.setEnabled(flag);
-
- resourceTypePrompt.setEnabled(flag);
- resourceTypeValue.setEnabled(flag);
-
- overwriteMode = !flag;
- setPageComplete();
-
- }
- }
-} \ 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
deleted file mode 100644
index 5a405717f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableProvider.java
+++ /dev/null
@@ -1,215 +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 java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.graphics.Image;
-
-/**
- *
- */
-public class SystemRenameTableProvider implements ITableLabelProvider, IStructuredContentProvider
-{
- static final int COLUMN_ERROR = 0;
- static final int COLUMN_OLDNAME = 1;
- static final int COLUMN_NEWNAME = 2;
- static final int COLUMN_TYPE = 3;
- private Map imageTable = new Hashtable(20);
- private Object[] children = null;
- private ISystemValidator inputValidator = null;
-
- /**
- * Constructor for SystemRenameTableProvider
- */
- public SystemRenameTableProvider()
- {
- super();
- }
-
- /**
- * Set the validator for the new name,as supplied by the adaptor for name checking.
- * Overrides the default which is to query it from the object's adapter.
- */
- public void setNameValidator(ISystemValidator nameValidator)
- {
- inputValidator = nameValidator;
- }
-
- private SystemRenameTableRow getTableRow(Object element)
- {
- return (SystemRenameTableRow)element;
- }
-
- private Image getImageFromDescriptor(ImageDescriptor descriptor)
- {
- if (descriptor == null)
- return null;
- //obtain the cached image corresponding to the descriptor
- Image image = (Image) imageTable.get(descriptor);
- if (image == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- //System.out.println("...image = " + image);
- return image;
- }
-
- /**
- * @see ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int column)
- {
- if (column == COLUMN_ERROR)
- {
- SystemRenameTableRow row = getTableRow(element);
- if (row.getError())
- {
- Image errorImage = JFaceResources.getImage(org.eclipse.jface.dialogs.Dialog.DLG_IMG_MESSAGE_ERROR);
- //RSEUIPlugin.getDefault().getImage(ISystemConstants.ICON_SYSTEM_ERROR_ID);
- return errorImage;
- }
- else
- return null;
- }
- else if (column == COLUMN_OLDNAME)
- return getImageFromDescriptor(getTableRow(element).getImageDescriptor());
- else
- return null;
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int column)
- {
- String text = ""; //$NON-NLS-1$
- if (column == COLUMN_OLDNAME)
- text = getTableRow(element).getName();
- else if (column == COLUMN_NEWNAME)
- text = getTableRow(element).getNewName();
- else if (column == COLUMN_TYPE)
- text = getTableRow(element).getType();
- //System.out.println("INSIDE GETCOLUMNTEXT: " + column + ", " + text + ", " + getTableRow(element));
- return text;
- }
-
- /**
- * @see IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener)
- {
- }
-
- /**
- * @see IBaseLabelProvider#dispose()
- */
- public void dispose()
- {
- // The following we got from WorkbenchLabelProvider
- if (imageTable != null)
- {
- Collection imageValues = imageTable.values();
- if (imageValues!=null)
- {
- Iterator images = imageValues.iterator();
- if (images!=null)
- while (images.hasNext())
- ((Image)images.next()).dispose();
- imageTable = null;
- }
- }
- }
-
- /**
- * @see IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property)
- {
- return true;
- }
-
- /**
- * @see IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener)
- {
- }
-
- /**
- * Return rows. Input must be an IStructuredSelection.
- */
- public Object[] getElements(Object inputElement)
- {
- if (children == null)
- {
- IStructuredSelection iss = (IStructuredSelection)inputElement;
- children = new SystemRenameTableRow[iss.size()];
- Iterator i = iss.iterator();
- int idx = 0;
- while (i.hasNext())
- {
- children[idx] = new SystemRenameTableRow(i.next(),idx);
- if (inputValidator != null)
- ((SystemRenameTableRow)children[idx]).setNameValidator(inputValidator);
- idx++;
- }
- }
- return children;
- }
-
- /**
- *
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
-
-
- }
-
- /**
- * Return the 0-based row number of the given element.
- */
- public int getRowNumber(SystemRenameTableRow row)
- {
- int matchRow = row.getRowNumber();
- /*
- int matchRow = -1;
- boolean match = false;
- for (int idx=0; !match && (matchRow<children.length); idx++)
- {
- //match = children[idx].equals(row);
- match = (children[idx] == row);
- if (match)
- matchRow = idx;
- }
- */
- //System.out.println("getRowNumber for "+row+": "+matchRow);
- return matchRow;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableRow.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableRow.java
deleted file mode 100644
index f3459ff36..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableRow.java
+++ /dev/null
@@ -1,213 +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.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-
-
-
-/**
- * Represents one row in the table in the SystemRenameDialog dialog.
- */
-public class SystemRenameTableRow extends SystemDeleteTableRow
-{
- private String newName;
- private SystemMessage errorMsg = null;
- private ISystemValidator inputValidator = null;
- private ValidatorUniqueString inputUniqueNameValidator = null;
- private Object parent;
- private int nameLengthLimit = -1;
-
- /**
- * Constructor
- * @param element that is being displayed in the tree, and which the
- * user selected the rename action. This represents a single item.
- */
- public SystemRenameTableRow(Object element, int rowNbr)
- {
- super(element,rowNbr);
- this.newName = getName();
- this.inputValidator = getAdapter(element).getNameValidator(element);
- if (inputValidator != null) {
- nameLengthLimit = inputValidator.getMaximumNameLength();
- }
- }
-
- /**
- * Set the new name for this element. Called by the CellModifier
- * for the rename dialog.
- */
- public void setNewName(String name)
- {
- //System.out.println("Inside setNewName: from " + newName + ", to " + name);
- if (name != null)
- {
- if (isRemote()) // defect 43173
- newName = trimTrailing(name); // defect 43041
- else
- newName = name.trim();
- }
- else
- newName = null;
- }
-
- /**
- * Trim leading blanks
- */
- public static String trimTrailing(String text)
- {
- return ("."+text).trim().substring(1); //$NON-NLS-1$
- }
-
- /**
- * Return the new name for this element, as set by setNewName
- */
- public String getNewName()
- {
- return newName;
- }
-
- /**
- * Get the parent of this remote object that is being renamed
- */
- public Object getParent()
- {
- return parent;
- }
-
- /**
- * Set the parent of this remote object that is being renamed
- */
- public void setParent(Object parent)
- {
- this.parent = parent;
- }
-
- /**
- * Get the canonical name of this row. Sometimes, the name alone is not enough to do uniqueness
- * checking on. For example, two connections or filter pools can have the same name if they are
- * in different profiles. Two iSeries QSYS objects can have the same name if their object types
- * are different.
- * <p>
- * This method returns a name that can be used for uniqueness checking because it is qualified
- * sufficiently to make it unique.
- * <p>
- * Defers to the object's adapter
- */
- public String getCanonicalNewName()
- {
- // this is all for defect 42145
- Object element = super.getElement();
- ISystemViewElementAdapter adapter = super.getAdapter();
- String cName = newName;
- if (adapter != null)
- cName = adapter.getCanonicalNewName(element, newName);
- else
- cName = newName;
- //System.out.println("Inside getCanonicalNewName: newName: " + newName + ", canonical: " + cName);
- return cName;
- }
- /**
- * Compares the given new name to this row's current name, taking into consideration case if appropriate.
- * Defers to the object's adapter
- */
- public boolean newNameEqualsOldName()
- {
- Object element = super.getElement();
- ISystemViewElementAdapter adapter = super.getAdapter();
- if (adapter != null)
- return adapter.namesAreEqual(element, newName);
- else
- return getName().equals(newName);
- }
-
- /**
- * Return the name length limit, if available via the name validator supplied by the adapter.
- * Returns -1 if not available.
- */
- public int getNameLengthLimit()
- {
- return nameLengthLimit;
- }
-
- /**
- * Set the validator for the new name,as supplied by the adaptor for name checking.
- * Overrides the default which is to query it from the object's adapter.
- */
- public void setNameValidator(ISystemValidator nameValidator)
- {
- inputValidator = nameValidator;
- }
-
- /**
- * Set the uniqueness validator for the new name,as supplied by the remote adaptor.
- */
- public void setUniqueNameValidator(ValidatorUniqueString uniqueNameValidator)
- {
- inputUniqueNameValidator = uniqueNameValidator;
- }
-
- /**
- * Return the validator for the new name,as supplied by the adaptor for
- * this element type.
- * <p>
- * By default queries it from the object's adapter, unless setNameValidator has been
- * called.
- */
- public ISystemValidator getNameValidator()
- {
- return inputValidator;
- }
-
- /**
- * Return the uniqueness validator for the new name,as supplied by the call to setUniqueNameValidator
- */
- public ValidatorUniqueString getUniqueNameValidator()
- {
- return inputUniqueNameValidator;
- }
-
- /**
- * Return true if this row is currently in error
- */
- public boolean getError()
- {
- return errorMsg != null;
- }
- /**
- * Return text of error if this row is currently in error
- */
- public SystemMessage getErrorMessage()
- {
- return errorMsg;
- }
- /**
- * Set error message for this row.
- * Pass null to clear it.
- */
- public void setErrorMessage(SystemMessage errorMsg)
- {
- this.errorMsg = errorMsg;
- }
-
- public String toString()
- {
- return getNewName();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemResolveFilterStringDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemResolveFilterStringDialog.java
deleted file mode 100644
index 2551346e6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemResolveFilterStringDialog.java
+++ /dev/null
@@ -1,111 +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.subsystems.ISubSystem;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.view.SystemResolveFilterStringAPIProviderImpl;
-import org.eclipse.rse.ui.view.SystemViewForm;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Dialog for testing a filter string. Typically called from a create/update filter string dialog.
- * <p>
- * Caller must supply the subsystem which owns this existing or potential filter string.
- * <p>
- * This dialog contains a dropdown for selecting connections to use in the test. Only connections which
- * contain subsystems with the same parent factory as the given subsystem factory are shown.
- *
- */
-public class SystemResolveFilterStringDialog extends SystemTestFilterStringDialog
-{
-
- /**
- * Constructor
- * @param shell The shell to hang the dialog off of
- * @param subsystem The contextual subsystem that owns this filter string
- * @param filterString The filter string that is to be tested.
- */
- public SystemResolveFilterStringDialog(Shell shell, ISubSystem subsystem, String filterString)
- {
- super(shell, subsystem, filterString);
- setShowOkButton(true);
- }
-
- /**
- * Constructor when unique title desired
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- * @param subsystem The contextual subsystem that owns this filter string
- * @param filterString The filter string that is to be tested.
- */
- public SystemResolveFilterStringDialog(Shell shell, String title, ISubSystem subsystem, String filterString)
- {
- super(shell, title, subsystem, filterString);
- setShowOkButton(true);
- }
-
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int gridColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, gridColumns);
-
- // connection selection combo
- connectionCombo = SystemWidgetHelpers.createConnectionCombo(composite_prompts, null, null, subsystem.getSubSystemConfiguration(),
- null, null, subsystem.getHost(), gridColumns, false);
-
- // Composite promptComposite = composite_prompts;
- Composite promptComposite = connectionCombo;
- prompt = SystemWidgetHelpers.createLabel(promptComposite, SystemResources.RESID_TESTFILTERSTRING_PROMPT_LABEL, SystemResources.RESID_TESTFILTERSTRING_PROMPT_TOOLTIP);
- promptValue = SystemWidgetHelpers.createLabel(promptComposite, SystemResources.RESID_TESTFILTERSTRING_PROMPT_LABEL, SystemResources.RESID_TESTFILTERSTRING_PROMPT_TOOLTIP);
-
- promptValue.setToolTipText(filterString); // Since the dialog is not resizable, this is the way to show the whole string
-
- String label = filterString;
-
- if ( label.length() > 30)
- label = label.substring(0,30) + " ..."; // Use ... to show that not entire string is displayed //$NON-NLS-1$
- promptValue.setText(label);
-
- GridData data = new GridData();
- data.widthHint = 200;
- promptValue.setLayoutData(data);
-
- // Tree viewer
- inputProvider = new SystemResolveFilterStringAPIProviderImpl(subsystem, filterString);
- tree = new SystemViewForm(getShell(), composite_prompts, SWT.NULL, inputProvider, true, getMessageLine(), gridColumns, 1);
-
- // add selection listeners
- //tree.addSelectionChangedListener(this);
- connectionCombo.addSelectionListener(this);
-
- return composite_prompts;
- } // end createInner()
-
-
-} // end class SystemResolveFilterStringDialog \ No newline at end of file
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
deleted file mode 100644
index cdce86d13..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java
+++ /dev/null
@@ -1,91 +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.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-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;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class SystemSelectAnythingDialog extends SystemPromptDialog
- implements ISystemPropertyConstants, ISelectionChangedListener
-{
- private SystemViewForm _view = null;
- private Object _selected = null;
- public SystemSelectAnythingDialog(Shell shell, String title)
- {
- super(shell, title);
- }
-
- public Control createInner(Composite parent)
- {
-
- _view = new SystemViewForm(getShell(), parent, SWT.NONE, getInputProvider(), true, this);
- _view.getSystemView().addSelectionChangedListener(this);
- //_view.getSystemView().ref
-
- return _view.getTreeControl();
- }
-
- public boolean close()
- {
- _view.removeSelectionChangedListener(this);
- _view.dispose();
- return super.close();
- }
-
- /**
- * Returns the initial input provider for the viewer.
- * Tries to deduce the appropriate input provider based on current input.
- */
- protected ISystemViewInputProvider getInputProvider()
- {
- ISystemViewInputProvider inputProvider = RSEUIPlugin.getTheSystemRegistry();
-
- return inputProvider;
- }
-
- public Control getInitialFocusControl()
- {
- return _view.getTreeControl();
- }
-
- public Object getSelectedObject()
- {
- //IStructuredSelection selection = (IStructuredSelection)_view.getSelection();
- //return selection.getFirstElement();
- return _selected;
- }
-
- public void selectionChanged(SelectionChangedEvent e)
- {
- IStructuredSelection selection = (IStructuredSelection)e.getSelection();
-
- _selected = selection.getFirstElement();
-
-
- }
-} \ No newline at end of file
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
deleted file mode 100644
index bd9001f68..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectConnectionDialog.java
+++ /dev/null
@@ -1,361 +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.model.IHost;
-import org.eclipse.rse.ui.ISystemPageCompleteListener;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.widgets.SystemSelectConnectionForm;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Dialog for allowing users to select an existing connection, or optionally create a new one.
- * There are a number of methods to configure the dialog so only connections of a particular system type,
- * or containing subsystems from a particular subsystem factory or class of subsystem factories, are shown.
- * <p>
- * Call these methods to configure the functionality of the dialog
- * <ul>
- * <li>{@link #setHost(IHost) or #setDefaultConnection(SystemConnection)}
- * <li>{@link #setShowNewConnectionPrompt(boolean)}
- * <li>{@link #setSystemTypes(String[])}
- * <li>{@link #setAutoExpandDepth(int)}
- * <li>{@link #setRootFolder(IHost, String)} or {@link #setRootFolder(IRemoteFile)} or {@link #setPreSelection(IRemoteFile)}
- * <li>{@link #setFileTypes(String[])} or {@link #setFileTypes(String)}
- * <li>{@link #setShowPropertySheet(boolean)}
- * <li>{@link #enableAddMode(ISystemAddFileListener)}
- * <li>{@link #setMultipleSelectionMode(boolean)}
- * <li>{@link #setSelectionValidator(IValidatorRemoteSelection)}
- * </ul>
- * <p>
- * Call these methods to configure the text on the dialog
- * <ul>
- * <li>{@link #setMessage(String)}
- * <li>{@link #setSelectionTreeToolTipText(String)}
- * </ul>
- * <p>
- * After running, call these methods to get the output:
- * <ul>
- * <li>{@link #getSelectedObject()} or {@link #getSelectedObjects()}
- * <li>{@link #getSelectedConnection()}
- * </ul>
- *
- */
-public class SystemSelectConnectionDialog
- extends SystemPromptDialog implements ISystemPageCompleteListener
-{
- public static final boolean FILE_MODE = true;
- public static final boolean FOLDER_MODE = false;
- private SystemSelectConnectionForm form;
-
-
- /**
- * Constructor
- *
- * @param shell The shell to hang the dialog off of
- *
- */
- public SystemSelectConnectionDialog(Shell shell)
- {
- this(shell, SystemResources.RESID_SELECTCONNECTION_TITLE);
- }
- /**
- * Constructor when you want to supply your own title.
- *
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- */
- public SystemSelectConnectionDialog(Shell shell, String title)
- {
- super(shell, title);
- super.setBlockOnOpen(true); // always modal
- form = getForm(shell);
- setShowPropertySheet(true, false); // default
- }
-
- // ------------------
- // PUBLIC METHODS...
- // ------------------
- /**
- * Set the connection to default the selection to
- */
- public void setDefaultConnection(IHost conn)
- {
- form.setDefaultConnection(conn);
- }
- /**
- * 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.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- form.setSystemTypes(systemTypes);
- }
- /**
- * 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.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- form.setSystemType(systemType);
- }
- /**
- * Set to true if a "New Connection..." special connection is to be shown for creating new connections
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- form.setShowNewConnectionPrompt(show);
- }
- /**
- * Set the instruction label shown at the top of the dialog
- */
- public void setInstructionLabel(String message)
- {
- form.setMessage(message);
- }
-
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload always shows the property sheet
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- form.setShowPropertySheet(show);
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * This overload shows a Details>>> button so the user can decide if they want to see the
- * property sheet.
- * <p>
- * Default is true, false
- * <p>
- * @param show True if show the property sheet within the dialog
- * @param initialState True if the property is to be initially displayed, false if it is not
- * to be displayed until the user presses the Details button.
- */
- public void setShowPropertySheet(boolean show, boolean initialState)
- {
- if (show)
- {
- form.setShowPropertySheet(initialState);
- setShowDetailsButton(true, !initialState);
- }
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedObjects()
- * method to retrieve the list of selected objects.
- * <p>
- * Further, if you turn this on, it has the side effect of allowing the user
- * to select any remote object. The assumption being if you are prompting for
- * files, you also want to allow the user to select a folder, with the meaning
- * being that all files within the folder are implicitly selected.
- *
- * @see #getSelectedObjects()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- form.setMultipleSelectionMode(multiple);
- }
-
- // ------------------
- // OUTPUT METHODS...
- // ------------------
-
- /**
- * Return selected file or folder
- */
- public Object getSelectedObject()
- {
- if (getOutputObject() instanceof Object[])
- return ((Object[])getOutputObject())[0];
- else
- return getOutputObject();
- }
- /**
- * Return all selected objects. This method will return an array of one
- * unless you have called setMultipleSelectionMode(true)!
- * @see #setMultipleSelectionMode(boolean)
- */
- public Object[] getSelectedObjects()
- {
- if (getOutputObject() instanceof Object[])
- return (Object[])getOutputObject();
- else if (getOutputObject() != null)
- return new Object[] {getOutputObject()};
- else
- return null;
- }
-
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return form.getSelectedConnection();
- }
- /**
- * Return selected connections in multiple selection mode
- */
- public IHost[] getSelectedConnections()
- {
- return form.getSelectedConnections();
- }
-
- /**
- * Return the multiple selection mode as set by setMultipleSelectionMode(boolean)
- */
- public boolean getMultipleSelectionMode()
- {
- return form.getMultipleSelectionMode();
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
- /**
- * Private method.
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return form.getInitialFocusControl();
- }
-
- /**
- * Private method.
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- return form.createContents(parent);
- }
-
- /**
- * Private method.
- * Get the contents.
- */
- protected SystemSelectConnectionForm getForm(Shell shell)
- {
- //System.out.println("INSIDE GETFORM");
- //if (form == null)
- //{
- form = new SystemSelectConnectionForm(shell,getMessageLine());
- form.addPageCompleteListener(this);
- // reset output variables just to be safe
- setOutputObject(null);
- //}
- return form;
- }
-
- /**
- * Create message line. Intercept so we can set msg line of form.
- */
- protected ISystemMessageLine createMessageLine(Composite c)
- {
- ISystemMessageLine msgLine = super.createMessageLine(c);
- if (form != null)
- form.setMessageLine(msgLine);
- return msgLine;
- }
-
-
- /**
- * Private method.
- * <p>
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- boolean closeDialog = form.verify();
- if (closeDialog)
- {
- if (getMultipleSelectionMode())
- setOutputObject(form.getSelectedConnections());
- else
- setOutputObject(form.getSelectedConnection());
- }
- else
- setOutputObject(null);
- return closeDialog;
- }
-
- /**
- * Private method.
- * <p>
- * Called when user presses DETAILS button.
- * <p>
- * Note the text is automatically toggled for us! We need only
- * do whatever the functionality is that we desire
- *
- * @param hideMode the current state of the details toggle, prior to this request. If we return true from
- * this method, this state and the button text will be toggled.
- *
- * @return true if the details state toggle was successful, false if it failed.
- */
- protected boolean processDetails(boolean hideMode)
- {
- form.toggleShowPropertySheet(getShell(), getContents());
- return true;
- }
-
-
- /**
- * We have to override close to ensure that we reset the form to null
- */
- public boolean close()
- {
- if (super.close())
- {
- if (form != null)
- {
- form.dispose();
- }
- form = null;
- return true;
- }
- return false;
- }
-
- /**
- * The callback method.
- * This is called whenever setPageComplete is called by the form code.
- * @see {@link SystemBaseForm#addPageCompleteListener(ISystemPageCompleteListener)}
- */
- public void setPageComplete(boolean complete)
- {
- super.setPageComplete(complete);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectFileTypesDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectFileTypesDialog.java
deleted file mode 100644
index 24e66b090..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectFileTypesDialog.java
+++ /dev/null
@@ -1,468 +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 java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.rse.ui.GenericMessages;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-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;
-import org.eclipse.ui.IFileEditorMapping;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FileEditorMappingContentProvider;
-import org.eclipse.ui.dialogs.FileEditorMappingLabelProvider;
-
-
-/**
- * A public implementation of the eclipse Select Types dialog.
- * <p>
- * File types are extension names without the dot.
- * For example "java" and "class".
- * <p>
- * Call getResult() to get the array of selected types.
- */
-public class SystemSelectFileTypesDialog
- extends SystemPromptDialog
- //extends TypeFilteringDialog
- implements ISystemMessageLine
-{
-
- protected Collection initialSelections;
-
- // instruction to show user
- protected String instruction;
-
- // the final collection of selected elements, or null if this dialog was canceled
- protected Object[] result;
-
- // the visual selection widget group
- protected CheckboxTableViewer listViewer;
-
- // sizing constants
- protected final static int SIZING_SELECTION_WIDGET_HEIGHT = 250;
- protected final static int SIZING_SELECTION_WIDGET_WIDTH = 300;
-
- // TODO: Cannot use WorkbenchMessages -- it's internal
- protected final static String TYPE_DELIMITER = GenericMessages.TypesFiltering_typeDelimiter;
- protected Text userDefinedText;
-
- protected IFileEditorMapping[] currentInput;
-
- /**
- * Constructor when there are no existing types
- * @param shell The window hosting this dialog
- */
- public SystemSelectFileTypesDialog(Shell shell)
- {
- this(shell, new ArrayList());
- }
-
- /**
- * Constructor when there are existing types.
- * @param shell The window hosting this dialog
- * @param currentTypes The current types as a java.util.Collection. Typically ArrayList is used
- */
- public SystemSelectFileTypesDialog(Shell shell, Collection currentTypes)
- {
- // TODO: Cannot use WorkbenchMessages -- it's internal
- super(shell, GenericMessages.TypesFiltering_title);
- this.initialSelections = currentTypes;
- // TODO: Cannot use WorkbenchMessages -- it's internal
- setInstruction(GenericMessages.TypesFiltering_message);
-
- // TODO - hack to make this work in 3.1
- String id = PlatformUI.PLUGIN_ID + ".type_filtering_dialog_context"; //$NON-NLS-1$
- setHelp(id);
- }
-
- /**
- * Constructor when there are existing types.
- * @param shell The window hosting this dialog
- * @param currentTypes The current types as an array of Strings
- */
- public SystemSelectFileTypesDialog(Shell shell, String[] currentTypes)
- {
- this(shell, Arrays.asList(currentTypes));
- }
-
- /**
- * Method declared on Dialog.
- */
- protected Control createInner(Composite parent)
- {
- // page group
- Composite composite = (Composite)createInnerComposite(parent);
- createInstructionArea(composite);
-
- listViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT;
- data.widthHint = SIZING_SELECTION_WIDGET_WIDTH;
- listViewer.getTable().setLayoutData(data);
-
- listViewer.setLabelProvider(FileEditorMappingLabelProvider.INSTANCE);
- listViewer.setContentProvider(FileEditorMappingContentProvider.INSTANCE);
-
- addSelectionButtons(composite);
- createUserEntryGroup(composite);
- initializeViewer();
-
- // initialize page
- if (this.initialSelections != null && !this.initialSelections.isEmpty())
- checkInitialSelections();
-
- return composite;
- }
- /**
- * Return the Control to be given initial focus.
- * Child classes must override this, but can return null.
- */
- protected Control getInitialFocusControl()
- {
- return listViewer.getControl();
- }
-
- private Control createInnerComposite(Composite parent)
- {
- // create a composite with standard margins and spacing
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- composite.setFont(parent.getFont());
- return composite;
- }
-
- /**
- * Sets the instruction text for this dialog.
- *
- * @param instr the instruction text
- */
- public void setInstruction(String instr)
- {
- this.instruction = instr;
- }
- /**
- * Creates the message area for this dialog.
- * <p>
- * This method is provided to allow subclasses to decide where the message
- * will appear on the screen.
- * </p>
- *
- * @param parent the parent composite
- * @return the message label
- */
- protected Label createInstructionArea(Composite composite)
- {
- Label label = new Label(composite,SWT.NONE);
- label.setText(instruction);
- return label;
- }
-
- /**
- * Add the selection and deselection buttons to the dialog.
- * @param composite org.eclipse.swt.widgets.Composite
- */
- private void addSelectionButtons(Composite composite)
- {
- Composite buttonComposite = new Composite(composite, SWT.RIGHT);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- buttonComposite.setLayout(layout);
- GridData data =
- new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);
- data.grabExcessHorizontalSpace = true;
- composite.setData(data);
-
- //Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, GenericMessages.getString("WizardTransferPage.selectAll"), false); //$NON-NLS-1$
- Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID,
- SystemResources.RESID_SELECTFILES_SELECTALL_BUTTON_ROOT_LABEL, false);
-
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- listViewer.setAllChecked(true);
- }
- };
- selectButton.addSelectionListener(listener);
-
-
- //Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, GenericMessages.getString("WizardTransferPage.deselectAll"), false); //$NON-NLS-1$
- Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID,
- SystemResources.RESID_SELECTFILES_DESELECTALL_BUTTON_ROOT_LABEL, false);
-
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- listViewer.setAllChecked(false);
- }
- };
- deselectButton.addSelectionListener(listener);
- }
- /**
- * Add the currently-specified extensions.
- */
- protected void addUserDefinedEntries(java.util.List result)
- {
- StringTokenizer tokenizer = new StringTokenizer(userDefinedText.getText(), TYPE_DELIMITER);
- //Allow the *. and . prefix and strip out the extension
- while (tokenizer.hasMoreTokens())
- {
- String currentExtension = tokenizer.nextToken().trim();
- if (!currentExtension.equals("")) //$NON-NLS-1$
- {
- if (currentExtension.startsWith("*."))//$NON-NLS-1$
- result.add(currentExtension.substring(2));
- else
- {
- if (currentExtension.startsWith("."))//$NON-NLS-1$
- result.add(currentExtension.substring(1));
- else
- result.add(currentExtension);
- }
- }
- }
- }
- /**
- * Visually checks the previously-specified elements in this dialog's list
- * viewer.
- */
- protected void checkInitialSelections()
- {
-
- IFileEditorMapping editorMappings[] =
- PlatformUI.getWorkbench().getEditorRegistry().getFileEditorMappings();
- ArrayList selectedMappings = new ArrayList();
-
- for (int i = 0; i < editorMappings.length; i++)
- {
- IFileEditorMapping mapping = editorMappings[i];
- if (this.initialSelections.contains(mapping.getExtension()))
- {
- listViewer.setChecked(mapping, true);
- selectedMappings.add(mapping.getExtension());
- }
- }
-
- //Now add in the ones not selected to the user defined list
- Iterator initialIterator = this.initialSelections.iterator();
- StringBuffer entries = new StringBuffer();
- while(initialIterator.hasNext())
- {
- String nextExtension = (String) initialIterator.next();
- if(!selectedMappings.contains(nextExtension))
- {
- entries.append(nextExtension);
- entries.append(',');
- }
- }
- this.userDefinedText.setText(entries.toString());
- }
-
- /**
- * Create the group that shows the user defined entries for the dialog.
- * @param parent the parent this is being created in.
- */
- private void createUserEntryGroup(Composite parent)
- {
- // destination specification group
- Composite userDefinedGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- userDefinedGroup.setLayout(layout);
- userDefinedGroup.setLayoutData(
- new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
-
- // TODO: Cannot use WorkbenchMessages -- it's internal
- new Label(userDefinedGroup, SWT.NONE).setText(GenericMessages.TypesFiltering_otherExtensions);
-
- // user defined entry field
- userDefinedText = new Text(userDefinedGroup, SWT.SINGLE | SWT.BORDER);
- GridData data =
- new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- userDefinedText.setLayoutData(data);
-
- userDefinedText.addModifyListener(new ModifyListener()
- {
- public void modifyText(ModifyEvent event)
- {
- if (event.widget == userDefinedText)
- {
- //okButton.setEnabled(validateFileType(userDefinedText.getText().trim()));
- setPageComplete(validateFileType(userDefinedText.getText().trim()));
- }
- }
- });
-
- }
- /**
- * Return the input to the dialog.
- */
- protected IFileEditorMapping[] getInput()
- {
- //Filter the mappings to be just those with a wildcard extension
- if (currentInput == null)
- {
- java.util.List wildcardEditors = new ArrayList();
- IFileEditorMapping [] allMappings =
- PlatformUI.getWorkbench().getEditorRegistry().getFileEditorMappings();
- for (int i = 0; i < allMappings.length; i++)
- {
- if (allMappings[i].getName().equals("*"))//$NON-NLS-1$
- wildcardEditors.add(allMappings[i]);
- }
- currentInput = new IFileEditorMapping[wildcardEditors.size()];
- wildcardEditors.toArray(currentInput);
- }
- return currentInput;
- }
- /**
- * Initializes this dialog's viewer after it has been laid out.
- */
- private void initializeViewer()
- {
- listViewer.setInput(getInput());
- }
- /**
- * User pressed OK.
- */
- protected boolean processOK()
- {
- if (!validateFileType(userDefinedText.getText().trim()))
- return false;
-
- // Get the input children.
- IFileEditorMapping[] children = getInput();
- java.util.List list = new ArrayList();
- // Build a list of selected children.
- for (int i = 0; i < children.length; ++i)
- {
- IFileEditorMapping element = children[i];
- if (listViewer.getChecked(element))
- list.add(element.getExtension());
- }
- addUserDefinedEntries(list);
- setResult(list);
- return true;
- }
- /**
- * Set the selections made by the user, or <code>null</code> if
- * the selection was canceled.
- *
- * @param the list of selected elements, or <code>null</code> if Cancel was
- * pressed
- */
- protected void setResult(java.util.List newResult)
- {
- if (newResult == null)
- {
- result = null;
- }
- else
- {
- result = new Object[newResult.size()];
- newResult.toArray(result);
- }
- }
-
- /**
- * Validate the user input for a file type
- */
- protected boolean validateFileType(String filename)
- {
- // We need kernel api to validate the extension or a filename
-
- // check for empty name and extension
- if (filename.length() == 0)
- {
- clearErrorMessage();
- return true;
- }
-
- // check for empty extension if there is no name
- int index = filename.indexOf('.');
- if (index == filename.length() - 1)
- {
- if (index == 0 || (index == 1 && filename.charAt(0) == '*'))
- {
- // TODO: Cannot use WorkbenchMessages -- it's internal
- setErrorMessage(GenericMessages.FileExtension_extensionEmptyMessage);
- return false;
- }
- }
-
- int startScan = 0;
- if (filename.startsWith("*.")) //$NON-NLS-1$
- startScan = 2;
-
- // check for characters before *
- // or no other characters
- // or next character not '.'
- index = filename.indexOf('*', startScan);
- if (index > -1)
- {
- if (filename.length() == 1)
- {
- // TODO: Cannot use WorkbenchMessages -- it's internal
- setErrorMessage(GenericMessages.FileExtension_extensionEmptyMessage);
- return false;
- }
- if (index != 0 || filename.charAt(1) != '.')
- {
- // TODO: Cannot use WorkbenchMessages -- it's internal
- setErrorMessage(GenericMessages.FileExtension_fileNameInvalidMessage);
- return false;
- }
- }
-
- clearErrorMessage();
- return true;
- }
-
- /**
- * Returns the list of selections made by the user, or <code>null</code> if
- * the selection was canceled.
- *
- * @return the array of selected elements, or <code>null</code> if Cancel was
- * pressed
- */
- public Object[] getResult()
- {
- return result;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 61d3bd210..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentElement.java
+++ /dev/null
@@ -1,331 +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 java.util.Vector;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * When we populate a TreeViewer in a dialog, we need a simple
- * representation of the objects to populate the tree.
- * <p>
- * Works in concert with {@link org.eclipse.rse.ui.dialogs.SystemSimpleContentProvider}
- * @see org.eclipse.rse.ui.dialogs.SystemSimpleContentElement
- * @see org.eclipse.rse.ui.dialogs.SystemSimpleSelectDialog
- */
-public class SystemSimpleContentElement
-{
- private String name;
- private Object data;
- private SystemSimpleContentElement parent;
- private SystemSimpleContentElement[] children;
- private ImageDescriptor imageDescriptor;
- private boolean selected = false;
- private boolean isDeletable = true;
- private boolean isRenamable = true;
- private boolean isReadonly = false;
-
- /**
- * Constructor when given children as an array.
- * @param name - the display name to show for this element
- * @param data - the real object which is to be contained by this element
- * @param parent - the parent element of this element. Pass null for the root.
- * @param children - an array of SystemSimpleContentElement objects that are to be the children of this element. Can be null.
- */
- public SystemSimpleContentElement(String name, Object data,
- SystemSimpleContentElement parent, SystemSimpleContentElement[] children)
- {
- setName(name);
- setData(data);
- setParent(parent);
- setChildren(children);
- }
- /**
- * Constructor when given children as a vector.
- * @param name - the display name to show for this element
- * @param data - the real object which is to be contained by this element
- * @param parent - the parent element of this element. Pass null for the root.
- * @param children - a vector of SystemSimpleContentElement objects that are to be the children of this element. Can be null.
- */
- public SystemSimpleContentElement(String name, Object data,
- SystemSimpleContentElement parent, Vector children)
- {
- setName(name);
- setData(data);
- setParent(parent);
- setChildren(children);
- }
-
- /**
- * Return the display name for this element
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Set the display name for this element
- */
- public void setName(String name)
- {
- this.name = name;
- }
-
- /**
- * Return the real object which this element wraps or represents
- */
- public Object getData()
- {
- return data;
- }
-
- /**
- * Set the real object which this element wraps or represents
- */
- public void setData(Object data)
- {
- this.data = data;
- }
-
- /**
- * Get the parent element
- */
- public SystemSimpleContentElement getParent()
- {
- return parent;
- }
-
- /**
- * Set the parent element
- */
- public void setParent(SystemSimpleContentElement parent)
- {
- this.parent = parent;
- }
-
- /**
- * Walk up the parent tree until we find the root
- */
- public SystemSimpleContentElement getRoot()
- {
- SystemSimpleContentElement currParent = parent;
- while (currParent.getParent() != null)
- currParent = currParent.getParent();
- return currParent;
- }
-
- /**
- * Return the child elements, or null if no children
- */
- public SystemSimpleContentElement[] getChildren()
- {
- return children;
- }
-
- /**
- * Return true if this element has children
- */
- public boolean hasChildren()
- {
- return ((children!=null) && (children.length>0));
- }
-
- /**
- * Set the child elements of this element, as an array of SystemSimpleContentElement elements
- */
- public void setChildren(SystemSimpleContentElement[] children)
- {
- this.children = children;
- }
-
- /**
- * Set the child elements of this element, as a vector of SystemSimpleContentElement elements
- */
- public void setChildren(Vector childrenVector)
- {
- if (childrenVector != null)
- {
- children = new SystemSimpleContentElement[childrenVector.size()];
- for (int idx=0; idx<childrenVector.size(); idx++)
- children[idx] = (SystemSimpleContentElement)childrenVector.elementAt(idx);
- }
- else
- children = null;
- }
-
- /**
- * Set selected state.
- * Used in SimpleSimpleSelectDialog to pre-check item in CheckboxTreeViewer
- */
- public void setSelected(boolean selected)
- {
- this.selected = selected;
- }
- /**
- * Return true if this element has been flagged as selected.
- */
- public boolean isSelected()
- {
- return selected;
- }
-
- /**
- * Set whether this item is renamable or not. Default is true.
- * Used to enable/disable rename action.
- */
- public void setRenamable(boolean renamable)
- {
- this.isRenamable = renamable;
- }
- /**
- * Return true if this item is renamable or not. Default is true.
- */
- public boolean isRenamable()
- {
- return isRenamable;
- }
-
- /**
- * Set whether this item is deletable or not. Default is true.
- * Used to enable/disable rename action.
- */
- public void setDeletable(boolean deletable)
- {
- this.isDeletable = deletable;
- }
- /**
- * Return true if this item is deletable. Will be true unless setDeletable(false) has been called.
- */
- public boolean isDeletable()
- {
- return isDeletable;
- }
-
- /**
- * Set whether this node is readonly or not. If readonly, users cannot change its selected state.
- */
- public void setReadOnly(boolean readonly)
- {
- this.isReadonly = readonly;
- }
- /**
- * Return whether this node is readonly or not. Readonly nodes cannot be selected/deselected by the user.
- */
- public boolean isReadOnly()
- {
- return isReadonly;
- }
-
- /**
- * Set the image to display for this element, in the tree viewer
- */
- public void setImageDescriptor(ImageDescriptor imageDescriptor)
- {
- this.imageDescriptor = imageDescriptor;
- }
-
- /**
- * Get the image to display for this element, in the tree viewer
- */
- public ImageDescriptor getImageDescriptor()
- {
- if (imageDescriptor != null)
- return imageDescriptor;
- else
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID);
- //return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- }
-
- /**
- * Delete the given child element.
- */
- public void deleteChild(SystemSimpleContentElement child)
- {
- if (children != null)
- {
- int nbrChildren = children.length;
- if ((nbrChildren == 1) && (child.equals(children[0])))
- children = null;
- else
- {
- SystemSimpleContentElement[] newChildren = new SystemSimpleContentElement[nbrChildren-1];
- int newIdx = 0;
- for (int idx=0; idx<children.length; idx++)
- if (!(children[idx].equals(child)))
- newChildren[newIdx++] = children[idx];
- children = newChildren;
- }
- }
- }
-
- /**
- * Add the given child element at the given zero-based position
- */
- public void addChild(SystemSimpleContentElement child, int pos)
- {
- if (children == null)
- {
- children = new SystemSimpleContentElement[1];
- children[0] = child;
- }
- else
- {
- int newNbr = children.length + 1;
- SystemSimpleContentElement[] newChildren = new SystemSimpleContentElement[newNbr];
- int oldIdx = 0;
- for (int idx=0; idx<newNbr; idx++)
- if (idx == pos)
- newChildren[idx] = child;
- else
- newChildren[idx] = children[oldIdx++];
- children = newChildren;
- }
- }
-
- /**
- * Maps to getName()
- */
- public String toString()
- {
- return getName();
- }
-
- /**
- * Find element corresponding to given data
- */
- public static SystemSimpleContentElement getDataElement(SystemSimpleContentElement root, Object data)
- {
- SystemSimpleContentElement[] children = root.getChildren();
- SystemSimpleContentElement match = null;
- if ((children!=null)&&(children.length>0))
- {
- for (int idx=0; (match==null)&&(idx<children.length); idx++)
- if (children[idx].getData() == data)
- match = children[idx];
- }
- if ((match==null)&&(children!=null)&&(children.length>0))
- {
- for (int idx=0; (match==null)&&(idx<children.length); idx++)
- match = getDataElement(children[idx], data);
- }
- return match;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentProvider.java
deleted file mode 100644
index 038d890c5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentProvider.java
+++ /dev/null
@@ -1,163 +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 java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * When we need to populate a TreeViewer in a dialog,
- * we can use the {@link org.eclipse.rse.ui.dialogs.SystemSimpleContentElement} class to
- * represent each element, and then use this provider
- * to drive the tree.
- * @see org.eclipse.rse.ui.dialogs.SystemSimpleContentElement
- * @see org.eclipse.rse.ui.dialogs.SystemSimpleSelectDialog
- */
-public class SystemSimpleContentProvider extends LabelProvider
- implements ITreeContentProvider, ILabelProvider
-{
- private Map imageTable = new Hashtable(5);
-
- /**
- * Constructor for SystemSelectFilterPoolContentProvider
- */
- public SystemSimpleContentProvider()
- {
- super();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object element)
- {
- return getElement(element).getChildren();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(Object)
- */
- public Object getParent(Object element)
- {
- return getElement(element).getParent();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element)
- {
- Object[] children = getChildren(element);
- if (children == null)
- return false;
- else
- return children.length > 0;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object element)
- {
- return getChildren(element);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose()
- {
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
-
-
- // -------------------------
- // ILabelProvider methods...
- // -------------------------
- /**
- * Returns the image for the given object.
- */
- public Image getImage(Object element)
- {
- ImageDescriptor descriptor = getElement(element).getImageDescriptor();
- if (descriptor == null)
- return null;
- Image image = (Image) imageTable.get(descriptor);
- if (image == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- return image;
- }
- /**
- * Returns the label text for the given object.
- */
- public String getText(Object element)
- {
- return getElement(element).getName();
- }
-
-
- // -------------------------
- // Local/private methods...
- // -------------------------
- /**
- * Casts the given object to SystemSimpleContentElement
- */
- protected SystemSimpleContentElement getElement(Object element)
- {
- return (SystemSimpleContentElement)element;
- }
-
- /**
- * Returns the image for the given object, given its image descriptor
- */
- protected Image getImageFromDescriptor(ImageDescriptor descriptor)
- {
- if (descriptor == null)
- return null;
- //obtain the cached image corresponding to the descriptor
- Image image = (Image) imageTable.get(descriptor);
- if (image == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- return image;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 69708f7c8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleCopyDialog.java
+++ /dev/null
@@ -1,275 +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.jface.viewers.ISelection;
-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.jface.viewers.TreeViewer;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.ISystemCopyTargetSelectionCallback;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-
-/**
- * Dialog for selecting a target location on a copy operation.
- */
-public class SystemSimpleCopyDialog
- extends SystemPromptDialog
- implements //ISystemPropertyConstants,
- ISelectionChangedListener
-{
- private String promptString;
- //private Label prompt;
- private TreeViewer tree;
- private SystemSimpleContentProvider provider = new SystemSimpleContentProvider();
- private SystemSimpleContentElement copyTreeContent, initialSelection;
- private ISystemCopyTargetSelectionCallback caller = null;
- public static final int MODE_COPY = 0;
- public static final int MODE_MOVE = 1;
- private Object targetContainer = null;
-
- /**
- * Constructor
- */
- public SystemSimpleCopyDialog(Shell shell, String prompt, int mode, ISystemCopyTargetSelectionCallback caller,
- SystemSimpleContentElement copyTreeContent, SystemSimpleContentElement selection)
- {
- //super(shell, title);
- super(shell, (mode==MODE_COPY ? SystemResources.RESID_COPY_TITLE : SystemResources.RESID_MOVE_TITLE));
- this.caller = caller;
- if (prompt == null)
- if (mode == MODE_COPY)
- prompt = SystemResources.RESID_COPY_PROMPT;
- else
- prompt = SystemResources.RESID_MOVE_PROMPT;
- promptString = prompt;
- this.copyTreeContent = copyTreeContent;
- this.initialSelection = selection;
- //setCancelButtonLabel(RSEUIPlugin.getString(BUTTON_CLOSE));
- //pack();
- }
- /**
- * Create message line. Intercept so we can set msg line of form.
- */
- protected ISystemMessageLine createMessageLine(Composite c)
- {
- /*ISystemMessageLine msgLine =*/ super.createMessageLine(c);
- return fMessageLine;
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return tree.getControl();
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int nbrColumns = 1;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // PROMPT
- /*prompt =*/ SystemWidgetHelpers.createLabel(composite_prompts, promptString);
-
- // WORK-WITH TREE
- tree = new TreeViewer(new Tree(composite_prompts, SWT.SINGLE | SWT.BORDER));
- GridData treeData = new GridData();
- treeData.horizontalAlignment = GridData.FILL;
- treeData.grabExcessHorizontalSpace = true;
- treeData.widthHint = 300;
- treeData.heightHint= 200;
- treeData.verticalAlignment = GridData.CENTER;
- treeData.grabExcessVerticalSpace = true;
- tree.getTree().setLayoutData(treeData);
-
- tree.setContentProvider(provider);
- tree.setLabelProvider(provider);
-
- // populate tree
- if (copyTreeContent != null)
- tree.setInput(copyTreeContent);
-
- // expand and pre-check
- if (initialSelection != null)
- tree.setSelection(new StructuredSelection(initialSelection),true);
-
- // preset the OK button
- setPageComplete();
-
- // add selection listener to tree
- tree.addSelectionChangedListener(this);
-
-
- //ActionContributionItem[] actionItems = createActionContributionItems();
- //Composite buttons = createButtonBar(composite_prompts, actionItems);
-
- //RSEUIPlugin.getDefault().getSystemRegistry().addSystemResourceChangeListener(this);
-
- return composite_prompts;
- }
-
- /**
- * ISelectionChangedListener method. Called when user changes selection in tree
- */
- public void selectionChanged(SelectionChangedEvent event)
- {
- IStructuredSelection sel = (IStructuredSelection)event.getSelection();
- SystemSimpleContentElement element = (SystemSimpleContentElement)sel.getFirstElement();
- element.setSelected(true);
- setPageComplete();
- }
-
- /**
- * Return current selection
- */
- public SystemSimpleContentElement getSelectedElement()
- {
- IStructuredSelection sel = (IStructuredSelection)tree.getSelection();
- if ((sel == null) || sel.isEmpty())
- return null;
- else
- return (SystemSimpleContentElement)sel.getFirstElement();
- }
- /**
- * Return true if something selected
- */
- public boolean isSelectionEmpty()
- {
- IStructuredSelection sel = (IStructuredSelection)tree.getSelection();
- return sel.isEmpty();
- }
-
- public void clearSelection()
- {
- tree.setSelection((ISelection)null);
- }
-
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- boolean closeDialog = verify();
- if (closeDialog)
- {
- SystemSimpleContentElement seldObj = getSelectedElement();
- if (seldObj != null)
- {
- targetContainer = seldObj.getData();
- setOutputObject(targetContainer);
- }
- else
- {
- closeDialog = false;
- setPageComplete(false);
- }
- }
- return closeDialog;
- }
-
- public boolean close()
- {
- //RSEUIPlugin.getDefault().getSystemRegistry().removeSystemResourceChangeListener(this);
- return super.close();
- }
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify()
- {
- String errMsg = null;
- Control controlInError = null;
- clearErrorMessage();
-
- if (errMsg != null)
- controlInError.setFocus();
- return (errMsg == null);
- }
-
- /**
- * 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 = !isSelectionEmpty();
- if (pageComplete)
- {
- pageComplete = caller.isValidTargetParent(getSelectedElement());
- }
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- setPageComplete(isPageComplete());
- }
-
- /**
- * Callback from new action to get index of initial manager to select
- *
- public int getFilterPoolManagerSelection()
- {
- int selection = 0;
- SystemSimpleContentElement element = getSelectedElement();
- Object elementData = element.getData();
- if (elementData != null)
- {
- if (elementData instanceof SystemFilterPoolManager)
- selection = getManagerIndex((SystemFilterPoolManager)elementData);
- else if (elementData instanceof SystemFilterPool)
- selection = getManagerIndex(((SystemFilterPool)elementData).getSystemFilterPoolManager());
- }
- //System.out.println("In getFilterPoolManagerSelection(). Returning "+selection);
- return selection;
- }
- */
-
- // -----------------
- // OUTPUT METHODS...
- // -----------------
- /**
- * Get the selected target container
- */
- public Object getTargetContainer()
- {
- return targetContainer;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleSelectDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleSelectDialog.java
deleted file mode 100644
index a9c165969..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleSelectDialog.java
+++ /dev/null
@@ -1,489 +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 java.util.Vector;
-
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-
-/**
- * Dialog that uses a checkbox tree viewer to prompt users to select hierarchical items.
- * Works in concert with {@link org.eclipse.rse.ui.dialogs.SystemSimpleContentElement}
- * and {@link org.eclipse.rse.ui.dialogs.SystemSimpleContentProvider}.
- * <p>
- * The {@link #setInputObject(SystemSimpleContentElement)} method is used to populate the selection tree:
- * <ul>
- * <li>The passed object must be of type SystemSimpleContentElement
- * <li>The method getChildren will be called on that object to get initial visible elements
- * <li>As user expands each item, getChildren() is progressively called
- * <li>The initial selection state of each item is determined by calling isSelected on that item
- * </ul>
- * <p>
- * The trick to using this is to first populate a hierarchy of SystemSimpleContentElement elements,
- * each one wrapping one of your own model objects, and then passing to this constructor the root
- * element.
- * <p>
- * Upon successful completion of this dialog (wasCancelled() returns false), the model is
- * updated to reflect the selections. Call getUpdatedContent() to return the root node, if need be,
- * and then walk the nodes. The selected items are those that return true
- * to {@link org.eclipse.rse.ui.dialogs.SystemSimpleContentElement#isSelected()}.
- *
- * @see org.eclipse.rse.ui.dialogs.SystemSimpleContentElement
- * @see org.eclipse.rse.ui.dialogs.SystemSimpleContentProvider
- */
-public class SystemSimpleSelectDialog extends SystemPromptDialog
- implements ISystemPropertyConstants,
- ICheckStateListener
-{
- private String promptString;
- //private Label prompt;
- private CheckboxTreeViewer tree;
- private SystemSimpleContentProvider provider = new SystemSimpleContentProvider();
- private SystemSimpleContentElement preSelectedRoot = null;
- private boolean initialized = false;
-
- /**
- * Constructor
- */
- public SystemSimpleSelectDialog(Shell shell, String title, String prompt)
- {
- super(shell, title);
- promptString = prompt;
- //pack();
- }
-
- /**
- * Set the root to preselect
- */
- public void setRootToPreselect(SystemSimpleContentElement preSelectedRoot)
- {
- this.preSelectedRoot = preSelectedRoot;
- }
-
- /**
- * 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()
- {
- //checkNewTreeElements(provider.getElements(getInputObject()));
- //select the first element in the list
- //Object[] elements = (provider.getElements(getInputObject());
- //Object primary= elements.length > 0 ? elements[0] : null;
- //if (primary != null)
- // tree.setSelection(new StructuredSelection(primary));
-
- return tree.getControl();
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int nbrColumns = 1;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // PROMPT
- /*prompt =*/ SystemWidgetHelpers.createLabel(composite_prompts, promptString);
-
- // CHECKBOX SELECT TREE
- tree = new CheckboxTreeViewer(new Tree(composite_prompts, SWT.CHECK | SWT.BORDER));
- GridData treeData = new GridData();
- treeData.horizontalAlignment = GridData.FILL;
- treeData.grabExcessHorizontalSpace = true;
- treeData.widthHint = 300;
- treeData.heightHint= 300;
- treeData.verticalAlignment = GridData.FILL;
- treeData.grabExcessVerticalSpace = true;
- tree.getTree().setLayoutData(treeData);
-
- tree.setContentProvider(provider);
- tree.setLabelProvider(provider);
-
- // populate tree
- Object inputObject = getInputObject();
- if (inputObject != null)
- initializeInput((SystemSimpleContentElement)inputObject);
-
- // expand and pre-check
- tree.expandAll();
- tree.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
-
- if (preSelectedRoot != null)
- tree.reveal(preSelectedRoot);
-
- // add selection listener to tree
- tree.addCheckStateListener(this);
-
- return composite_prompts;
- }
-
- /**
- * ICheckStateChangedListener method. Called when user changes selection in tree
- */
- public void checkStateChanged(CheckStateChangedEvent event)
- {
- SystemSimpleContentElement element = (SystemSimpleContentElement)event.getElement();
-
- if (element.isReadOnly())
- {
- tree.setChecked(element, element.isSelected());
- return;
- }
-
- boolean checked = event.getChecked();
- element.setSelected(checked);
-
- SystemSimpleContentElement parent = element.getParent();
- if (parent != null)
- {
- boolean gray = getShouldBeGrayed(parent);
- boolean check= getShouldBeChecked(parent);
- tree.setChecked(parent, check);
- tree.setGrayed(parent, gray);
- //System.out.println("...setting parent grayed, checked to " + gray + ", " + check);
- }
-
-
- // On check, check all children
- if (checked)
- {
- tree.setSubtreeChecked(element, true);
- checkSubtreeModel(element, true);
- //System.out.println("...setting setSubtreeChecked true for " + element);
- return;
- }
- // On uncheck & gray, remain check but ungray
- // and check all its children
- if (tree.getGrayed(element))
- {
- tree.setChecked(element, true);
- tree.setGrayed(element, false);
- tree.setSubtreeChecked(element, true);
- checkSubtreeModel(element, true);
- //System.out.println("...setting setChecked(true), setGrayed(false) for " + element);
- //System.out.println("...setting setSubtreeChecked true for " + element);
- return;
- }
- // On uncheck & not gray, uncheck all its children
- tree.setSubtreeChecked(element, false);
- checkSubtreeModel(element, false);
- //System.out.println("...setting setSubtreeChecked false for " + element);
- }
-
- private void checkSubtreeModel(SystemSimpleContentElement parent, boolean check)
- {
- parent.setSelected(check);
- SystemSimpleContentElement[] childElements = parent.getChildren();
- if (childElements != null)
- {
- for (int idx=0; idx<childElements.length; idx++)
- {
- //childElements[idx].setSelected(check);
- checkSubtreeModel(childElements[idx],check);
- }
- }
- }
-
-
- /**
- * Override of parent. We only support a specific type of input, so we test for it and
- * throw it out if we don't get it. This is necessary to defeat some default action.
- * Called by SystemDialogAction's default run() method after dialog instantiated.
- */
- public void setInputObject(Object inputObject)
- {
- if (inputObject instanceof SystemSimpleContentElement)
- setInputObject((SystemSimpleContentElement)inputObject);
- else
- System.out.println("UNEXPECTED INPUT IN SYSTEMSELECTINPUTDIALOG: "+inputObject); //$NON-NLS-1$
- }
-
- /**
- * Override of parent. Must pass selected object onto the form for initializing fields.
- * Called by SystemDialogAction's default run() method after dialog instantiated.
- */
- public void setInputObject(SystemSimpleContentElement inputObject)
- {
- //System.out.println("INSIDE SETINPUTOBJECT: " + inputObject + ", "+inputObject.getClass().getName());
- super.setInputObject(inputObject);
- initializeInput(inputObject);
- }
-
- /**
- * Set the tree input, initialize checked state
- */
- private void initializeInput(SystemSimpleContentElement inputObject)
- {
- if ((tree != null) && !initialized)
- {
- tree.setInput(inputObject);
- SystemSimpleContentElement[] gray = getPreGrayedElements(inputObject,null);
- SystemSimpleContentElement[] check= getPreSelectedElements(inputObject,null);
- SystemSimpleContentElement[] disable= getReadOnlyElements(inputObject,null);
- tree.setCheckedElements(check);
- tree.setGrayedElements(gray);
- if ((disable != null) && (disable.length>0))
- {
- for (int idx=0; idx<disable.length; idx++)
- {
- SystemSimpleContentElement currElement = disable[idx];
- tree.setGrayed(currElement, true); // so it appears readonly
- }
- }
-
- if (preSelectedRoot != null)
- tree.setSelection(new StructuredSelection(preSelectedRoot), true);
-
- initialized = true;
- }
- }
-
- /**
- * Determine, recursively, the tree elements pre-determined to be read-only
- */
- private SystemSimpleContentElement[] getReadOnlyElements(SystemSimpleContentElement input, Vector oldV)
- {
- Vector v = (oldV==null) ? new Vector() : oldV;
- SystemSimpleContentElement[] children = (SystemSimpleContentElement[])provider.getElements(input);
- if (children != null)
- for (int idx = 0; idx<children.length; idx++)
- {
- if (children[idx].isReadOnly())
- {
- v.addElement(children[idx]);
- //System.out.println("Adding readOnly element: " + children[idx]);
- }
- getReadOnlyElements(children[idx], v);
- }
-
- if (oldV != null)
- return null;
-
- SystemSimpleContentElement[] readonlyArray = new SystemSimpleContentElement[v.size()];
- for (int idx=0; idx<readonlyArray.length; idx++)
- readonlyArray[idx] = (SystemSimpleContentElement)v.elementAt(idx);
- return readonlyArray;
- }
-
- /**
- * Determine, recursively, the tree elements pre-determined for selection
- */
- private SystemSimpleContentElement[] getPreSelectedElements(SystemSimpleContentElement input, Vector oldV)
- {
- Vector v = (oldV==null) ? new Vector() : oldV;
- SystemSimpleContentElement[] children = (SystemSimpleContentElement[])provider.getElements(input);
- if (children != null)
- for (int idx = 0; idx<children.length; idx++)
- {
- if (children[idx].isSelected())
- {
- v.addElement(children[idx]);
- //System.out.println("Adding checked element: " + children[idx]);
- }
- getPreSelectedElements(children[idx], v);
- }
-
- if (oldV != null)
- return null;
-
- SystemSimpleContentElement[] selected = new SystemSimpleContentElement[v.size()];
- for (int idx=0; idx<selected.length; idx++)
- selected[idx] = (SystemSimpleContentElement)v.elementAt(idx);
- return selected;
- }
-
- /**
- *
- */
- private SystemSimpleContentElement[] getPreGrayedElements(SystemSimpleContentElement input, Vector oldV)
- {
- Vector v = (oldV==null) ? new Vector() : oldV;
- SystemSimpleContentElement[] children = (SystemSimpleContentElement[])provider.getElements(input);
- boolean allSame = true;
- boolean currState = false;
- boolean hasGrayChildren = false;
- if ((children != null) && (children.length>0))
- {
- currState = children[0].isSelected();
- for (int idx = 0; idx<children.length; idx++)
- {
- if (allSame && (currState != children[idx].isSelected()))
- allSame = false;
- //if (children[idx].isSelected())
- // v.addElement(children[idx]);
- int oldSize = v.size();
- getPreGrayedElements(children[idx], v); // recursively check children's children
- if (v.size() != oldSize) // add any new items?
- hasGrayChildren = true;
- }
- if (!allSame || hasGrayChildren) // some children checked, others not checked? Or any child grayed out?
- {
- v.addElement(input); // gray out this parent
- input.setSelected(true); // select this parent
- //System.out.println("Adding grayed element: " + input);
- }
- else if (allSame && currState)
- input.setSelected(true); // select this parent
- } // if no children, do not gray
-
- if (oldV != null)
- return null;
-
- SystemSimpleContentElement[] grayed = new SystemSimpleContentElement[v.size()];
- for (int idx=0; idx<grayed.length; idx++)
- grayed[idx] = (SystemSimpleContentElement)v.elementAt(idx);
- return grayed;
- }
-
- /**
- * Dynamically determine grayed state of parent element
- */
- public boolean getShouldBeGrayed(SystemSimpleContentElement parent)
- {
- SystemSimpleContentElement[] children = parent.getChildren();
- boolean gray = false;
-
- if ((children == null) || (children.length == 0))
- return gray;
-
- boolean allSame = true;
- boolean currState = children[0].isSelected();
- boolean hasGrayChildren = false;
-
- for (int idx=0; idx<children.length; idx++)
- {
- if (allSame && (children[idx].isSelected() != currState))
- allSame = false;
- if (getShouldBeGrayed(children[idx]))
- hasGrayChildren = true;
- }
-
- if (!allSame || hasGrayChildren) // some children checked, others not checked? Or any child grayed out?
- gray = true;
-
- return gray;
- }
-
- /**
- * Dynamically determine checked state of parent element
- */
- public boolean getShouldBeChecked(SystemSimpleContentElement parent)
- {
- boolean checked = false;
-
- SystemSimpleContentElement[] children = parent.getChildren();
- boolean gray = false;
-
- if ((children == null) || (children.length == 0))
- return gray;
-
- boolean anyChecked = false;
- for (int idx=0; idx<children.length; idx++)
- {
- if (children[idx].isSelected())
- anyChecked = true;
- else
- {
- }
- }
-
- if (anyChecked)
- checked = true;
-
- return checked;
- }
-
- /**
- * Return updated input model
- */
- public SystemSimpleContentElement getUpdatedContent()
- {
- return (SystemSimpleContentElement)super.getInputObject();
- }
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- //newNameString = newName.getText().trim();
- boolean closeDialog = verify();
- if (closeDialog)
- {
- }
- return closeDialog;
- }
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify()
- {
- String errMsg = null;
- Control controlInError = null;
- clearErrorMessage();
-
- if (errMsg != null)
- controlInError.setFocus();
- return (errMsg == null);
- }
-
- /**
- * 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 = true;
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- setPageComplete(isPageComplete());
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 3babc51fc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemTestFilterStringDialog.java
+++ /dev/null
@@ -1,211 +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.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.view.SystemTestFilterStringAPIProviderImpl;
-import org.eclipse.rse.ui.view.SystemViewForm;
-import org.eclipse.rse.ui.widgets.SystemHostCombo;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Dialog for testing a filter string. Typically called from a create/update filter string dialog.
- * <p>
- * Caller must supply the subsystem which owns this existing or potential filter string.
- * <p>
- * This dialog contains a dropdown for selecting connections to use in the test. Only connections which
- * contain subsystems with the same parent factory as the given subsystem factory are shown.
- *
- */
-public class SystemTestFilterStringDialog
- extends SystemPromptDialog
- implements ISelectionChangedListener, SelectionListener
-{
- protected ISubSystem subsystem = null;
- protected ISystemRegistry sr = null;
- protected String subsystemFactoryId = null;
- protected String filterString = null;
- protected SystemTestFilterStringAPIProviderImpl inputProvider = null;
- // GUI widgets
- protected Label prompt, promptValue;
- protected SystemViewForm tree;
- protected SystemHostCombo connectionCombo;
-
- /**
- * Constructor
- * @param shell The shell to hang the dialog off of
- * @param subsystem The contextual subsystem that owns this filter string
- * @param filterString The filter string that is to be tested.
- */
- public SystemTestFilterStringDialog(Shell shell, ISubSystem subsystem, String filterString)
- {
- this(shell, SystemResources.RESID_TESTFILTERSTRING_TITLE, subsystem, filterString);
- }
- /**
- * Constructor when unique title desired
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- * @param subsystem The contextual subsystem that owns this filter string
- * @param filterString The filter string that is to be tested.
- */
- public SystemTestFilterStringDialog(Shell shell, String title, ISubSystem subsystem, String filterString)
- {
- super(shell, title);
- setCancelButtonLabel(SystemResources.BUTTON_CLOSE);
- setShowOkButton(false);
- setBlockOnOpen(true); // always modal
- this.subsystem = subsystem;
- this.filterString = filterString;
- this.subsystemFactoryId = subsystem.getSubSystemConfiguration().getId();
- sr = RSEUIPlugin.getTheSystemRegistry();
- setNeedsProgressMonitor(true);
- //pack();
- }
-
- // ------------------
- // PUBLIC METHODS...
- // ------------------
- // ------------------
- // PRIVATE METHODS...
- // ------------------
- /**
- * Private method.
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- //return tree.getTreeControl();
- return connectionCombo.getCombo();
- }
-
- /**
- * Private method.
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int gridColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, gridColumns);
-
- // connection selection combo
- connectionCombo = SystemWidgetHelpers.createConnectionCombo(composite_prompts, null, null, subsystem.getSubSystemConfiguration(),
- null, null, subsystem.getHost(), gridColumns, false);
-
- // filter string prompt
- // Composite promptComposite = composite_prompts;
- Composite promptComposite = connectionCombo;
- prompt = SystemWidgetHelpers.createLabel(promptComposite, SystemResources.RESID_TESTFILTERSTRING_PROMPT_LABEL, SystemResources.RESID_TESTFILTERSTRING_PROMPT_TOOLTIP);
- promptValue = SystemWidgetHelpers.createLabel(promptComposite, SystemResources.RESID_TESTFILTERSTRING_PROMPT_LABEL, SystemResources.RESID_TESTFILTERSTRING_PROMPT_TOOLTIP);
-
- promptValue.setToolTipText(filterString); // Since the dialog is not resizable, this is the way to show the whole string
-
- // Make sure the label width is not longer than the window width
- // Otherwise the combo box dropdown arrow above it will be pushed beyond the window and invisible
- //promptValue.setText(filterString);
-
- String label = filterString;
-
- if ( label.length() > 30)
- label = label.substring(0,30) + " ..."; // Use ... to show that not entire string is displayed //$NON-NLS-1$
- promptValue.setText( label);
-
- //Point point = promptValue.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //GridData data = new GridData();
- //data.widthHint = point.x < 230 ? point.x : 230;
- GridData data = new GridData();
- data.widthHint = 200;
- promptValue.setLayoutData(data);
-
- // TREE
- inputProvider = new SystemTestFilterStringAPIProviderImpl(subsystem, filterString);
- tree = new SystemViewForm(getShell(), composite_prompts, SWT.NULL, inputProvider, false, getMessageLine(), gridColumns, 1);
-
- // add selection listeners
- //tree.addSelectionChangedListener(this);
- connectionCombo.addSelectionListener(this);
-
- 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.
- */
- public void setInputObject(Object inputObject)
- {
- super.setInputObject(inputObject);
- }
-
- /**
- * When re-using this dialog between runs, call this to reset its contents.
- * Assumption: original input subsystem factory Id doesn't change between runs
- */
- public void reset(ISubSystem subsystem, String filterString)
- {
- this.subsystem = subsystem;
- this.filterString = filterString;
- //this.subsystemFactoryId = subsystem.getParentSubSystemConfiguration().getId();
- inputProvider.setSubSystem(subsystem);
- inputProvider.setFilterString(filterString);
- tree.reset(inputProvider);
- }
-
- /**
- * ISelectionChangedListener interface method
- */
- public void selectionChanged(SelectionChangedEvent event)
- {
- }
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
- public void widgetSelected(SelectionEvent event)
- {
-
- //if (src == connectionCombo.getCombo())
- {
- //System.out.println("connection changed");
- IHost newConnection = connectionCombo.getHost();
- ISubSystem[] newSubSystems = sr.getSubSystems(subsystemFactoryId, newConnection);
- ISubSystem newSubSystem = null;
- if ((newSubSystems != null) && (newSubSystems.length>0))
- {
- newSubSystem = newSubSystems[0];
- subsystemFactoryId = subsystem.getSubSystemConfiguration().getId();
- }
- inputProvider.setSubSystem(newSubSystem);
- tree.reset(inputProvider);
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index efbee4518..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java
+++ /dev/null
@@ -1,141 +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.model.IHost;
-import org.eclipse.rse.model.ISystemRegistryUI;
-import org.eclipse.rse.ui.ISystemConnectionFormCaller;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Dialog for updating a connection.
- * THIS DIALOG AND ITS ACTION ARE NO LONGER USED. THEY ARE REPLACED WITH A PROPERTIES DIALOG.
- */
-public class SystemUpdateConnectionDialog extends SystemPromptDialog implements ISystemConnectionFormCaller
-{
- protected SystemConnectionForm form;
- protected String parentHelpId;
-
- /**
- * Constructor for SystemUpdateConnectionDialog
- */
- public SystemUpdateConnectionDialog(Shell shell)
- {
- super(shell, SystemResources.RESID_CHGCONN_TITLE);
- parentHelpId = RSEUIPlugin.HELPPREFIX + "dcon0000"; //$NON-NLS-1$
- getForm();
- //pack();
- }
-
- /**
- * Overrride this if you want to supply your own form. This may be called
- * multiple times so please only instantatiate if the form instance variable
- * is null, and then return the form instance variable.
- * @see org.eclipse.rse.ui.SystemConnectionForm
- */
- public SystemConnectionForm getForm()
- {
- //System.out.println("INSIDE GETFORM");
- if (form == null)
- {
- form = new SystemConnectionForm(getMessageLine(),this);
- }
- return form;
- }
-
- /**
- * 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()
- {
- Control control = form.getInitialFocusControl();
- return control;
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- Control c = form.createContents(parent, SystemConnectionForm.UPDATE_MODE, parentHelpId);
- return c;
- }
-
- /**
- * Override of parent. Must pass selected object onto the form for initializing fields.
- * Called by SystemDialogAction's default run() method after dialog instantiated.
- */
- public void setInputObject(Object inputObject)
- {
- super.setInputObject(inputObject);
- form.initializeInputFields((IHost)inputObject);
-
- IHost conn = (IHost)inputObject;
- ISystemValidator connectionNameValidators[] = new ISystemValidator[1];
- connectionNameValidators[0] = SystemConnectionForm.getConnectionNameValidator(conn);
- form.setConnectionNameValidators(connectionNameValidators);
- }
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- boolean closeDialog = form.verify(true);
- if (closeDialog)
- {
- IHost conn = (IHost)getInputObject();
- ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.updateHost( getShell(),conn,conn.getSystemType(),form.getConnectionName(),
- form.getHostName(), form.getConnectionDescription(),
- form.getDefaultUserId(), form.getUserIdLocation() );
- }
- return closeDialog;
- }
-
- // ----------------------------------------
- // CALLBACKS FROM SYSTEM CONNECTION FORM...
- // ----------------------------------------
- /**
- * Event: the user has selected a system type.
- */
- public void systemTypeSelected(String systemType, boolean duringInitialization)
- {
- }
-
-} \ 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
deleted file mode 100644
index c299f1ee9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWizardDialog.java
+++ /dev/null
@@ -1,193 +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.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.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.wizards.ISystemWizard;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Base wizard dialog class. Extends Eclipse WizardDialog class to add
- * support for the ISystemPromptDialog interface methods. These make it
- * easy to pass an input object to your wizard, if your wizard implements
- * ISystemWizard.
- * <p>This class is most effective when used together with {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard} and
- * with {@link org.eclipse.rse.ui.actions.SystemBaseWizardAction}. Indeed,
- * if you use SystemBaseWizardAction, this class is automatically used for the dialog. It supports
- * propogation of information from the action, to the wizard, to the wizard dialog and to the wizard pages.
- * </p>
- * <p>The advantages to using this class versus the base JFace WizardDialog class is:
- * </p>
- * <ul>
- * <li>Supports settings of an input object, which is propogated to the wizard and its pages.
- * <li>Supports querying of an output object, as set by the wizard.
- * <li>Supports a {@link #wasCancelled()} method for callers to know if the wizard was dismissed or cancelled by the user.
- * <li>Supports setting of the overall contextual help, which is propogated to each page.
- * <li>Supports an {@link #updateSize(IWizardPage)} method that can be called by a page when it dynamically grows the page size.
- * <li>When a progress monitor is not required, the real estate for the monitor is reclaimed, reducing the size of the wizard
- * <li>Whan a progress monitor is required, registers this with the RSE system registry, so it is using for long-running remote communications requests.
- * </ul>
- *
- * <p>To use this class, simply instantiate it, passing a wizard that implements {@link org.eclipse.rse.ui.wizards.ISystemWizard},
- * which {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard} does. If you use {@link org.eclipse.rse.ui.actions.SystemBaseWizardAction},
- * then this is done for you.
- *
- * @see org.eclipse.rse.ui.wizards.AbstractSystemWizard
- * @see org.eclipse.rse.ui.actions.SystemBaseWizardAction
- */
-public class SystemWizardDialog
- extends WizardDialog
- implements ISystemPromptDialog
-{
- protected ISystemWizard wizard;
- protected String helpId;
-
- /**
- * Constructor
- */
- public SystemWizardDialog(Shell shell, ISystemWizard wizard)
- {
- super(shell, wizard);
- this.wizard = wizard;
- wizard.setSystemWizardDialog(this);
- }
- /**
- * Constructor two. Use when you have an input object at instantiation time.
- */
- public SystemWizardDialog(Shell shell, ISystemWizard wizard, Object inputObject)
- {
- super(shell,wizard);
- this.wizard = wizard;
- setInputObject(inputObject);
- wizard.setSystemWizardDialog(this);
- }
-
- /**
- * For explicitly setting input object. Called by SystemDialogAction
- */
- public void setInputObject(Object inputObject)
- {
- wizard.setInputObject(inputObject);
- }
- /**
- * For explicitly getting input object.
- */
- public Object getInputObject()
- {
- return wizard.getInputObject();
- }
-
- /**
- * For explicitly getting output object after wizard is dismissed. Set by the
- * dialog's processOK method.
- */
- public Object getOutputObject()
- {
-
- return wizard.getOutputObject();
- }
-
- /**
- * Allow caller to determine if wizard was cancelled or not.
- */
- public boolean wasCancelled()
- {
- //System.out.println("Inside wasCancelled of SystemWizardDialog: " + wizard.wasCancelled());
- return wizard.wasCancelled();
- }
-
- /**
- * Set the help context id for this wizard dialog
- */
- public void setHelp(String id)
- {
- helpId = id;
- if (wizard != null) {
- wizard.setHelp(id);
- }
- }
-
- /**
- * Get the help context id for this wizard dialog, as set in setHelp
- */
- public String getHelpContextId()
- {
- return helpId;
- }
-
- /**
- * Intercept of parent method so we can automatically register the wizard's progress monitor
- * with the SystemRegistry for all framework progress monitor requests, if user has specified
- * they need a progress monitor for this wizard.
- */
- protected Control createDialogArea(Composite parent)
- {
- boolean needsMonitor = wizard.needsProgressMonitor();
- Control ctrl = super.createDialogArea(parent);
- if (!needsMonitor)
- {
- IProgressMonitor pm = getProgressMonitor();
- ((ProgressMonitorPart)pm).dispose();
- }
- if (needsMonitor && RSEUIPlugin.isTheSystemRegistryActive())
- {
- RSEUIPlugin.getTheSystemRegistry().setRunnableContext(getShell(), this);
- // add a dispose listener
- getShell().addDisposeListener(new DisposeListener()
- {
- public void widgetDisposed(DisposeEvent e)
- {
- RSEUIPlugin.getTheSystemRegistry().clearRunnableContext();
- }
- });
- }
- return ctrl;
- }
-
- /**
- * Exposes this nice new 2.0 capability to the public.
- */
- public void updateSize(IWizardPage page)
- {
- super.updateSize(page);
- }
-
- /**
- * Expose inherited protected method convertWidthInCharsToPixels as a publicly
- * excessible method
- */
- public int publicConvertWidthInCharsToPixels(int chars)
- {
- return convertWidthInCharsToPixels(chars);
- }
- /**
- * Expose inherited protected method convertHeightInCharsToPixels as a publicly
- * excessible method
- */
- public int publicConvertHeightInCharsToPixels(int chars)
- {
- return convertHeightInCharsToPixels(chars);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 5352a9d52..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWorkWithHistoryDialog.java
+++ /dev/null
@@ -1,345 +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.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;
-import org.eclipse.swt.events.ArmEvent;
-import org.eclipse.swt.events.ArmListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Widget;
-
-
-
-/**
- * A dialog that allows the user to manipulate the history associated with
- * a widget.
- * <p>
- * The history strings are shown in a simple list, and the user can delete
- * items from the list or re-order items in the list.
- */
-public class SystemWorkWithHistoryDialog extends SystemPromptDialog implements ISystemIconConstants, Listener, ArmListener
-{
- private String[] historyInput;
- private String[] historyOutput;
- private String[] defaultHistory;
- //private Label verbage;
- private List historyList;
- private Button rmvButton, clearButton, mupButton, mdnButton;
- private Group group;
- protected Menu popupMenu;
- protected MenuItem clearMI, rmvMI, mupMI, mdnMI;
-
-
- /**
- * Constructor for SystemWorkWithHistoryDialog
- */
- public SystemWorkWithHistoryDialog(Shell shell, String[] history)
- {
- super(shell, SystemResources.RESID_WORKWITHHISTORY_TITLE);
- historyInput = history;
-
- //pack();
- setHelp(RSEUIPlugin.HELPPREFIX+"dwwh0000"); //$NON-NLS-1$
- setInitialOKButtonEnabledState(false); //d41471
- }
-
- /**
- * Set the items to default the history to. These are sacred and can't be
- * deleted in this dialog.
- */
- public void setDefaultHistory(String[] items)
- {
- this.defaultHistory = items; // pc41439
- }
- /**
- * Return true if the given string is among the default history items
- */
- private boolean inDefaultHistory(String toTest) // pc41439
- {
- boolean inDefault = false;
- if (defaultHistory != null)
- for (int idx=0; !inDefault && (idx<defaultHistory.length); idx++)
- if (defaultHistory[idx].equals(toTest))
- inDefault = true;
- return inDefault;
- }
- /**
- * Return true any of the currently selected strings are among the default history items
- */
- private boolean selectedInDefaultHistory() /// pc41439
- {
- boolean inDefault = false;
- if (defaultHistory != null)
- {
- String[] currSelection = historyList.getSelection();
- if (currSelection != null)
- for (int idx=0; !inDefault && (idx<currSelection.length); idx++)
- inDefault = inDefaultHistory(currSelection[idx]);
- }
- return inDefault;
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return historyList;
- }
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int nbrColumns = 2;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // verbage
- /*verbage =*/ SystemWidgetHelpers.createLabel(composite,SystemResources.RESID_WORKWITHHISTORY_VERBAGE, nbrColumns);
-
- // History list
- init(composite, nbrColumns);
-
- return composite;
- }
- /**
- * Create and initialize labeled group
- */
- protected Group init(Composite parent, int nbrColumns)
- {
- group = SystemWidgetHelpers.createGroupComposite(parent,nbrColumns,SystemResources.RESID_WORKWITHHISTORY_PROMPT);
- //((GridData)group.getLayoutData()).horizontalSpan =horizontalSpan;
- //((GridData)group.getLayoutData()).verticalSpan =verticalSpan;
- // CREATE THE LIST BOX
- historyList = SystemWidgetHelpers.createListBox(group,null,null,false);
- ((GridData)historyList.getLayoutData()).widthHint = 200;
- //((GridData)list.getLayoutData()).horizontalSpan = listboxspan;
- //((GridData)list.getLayoutData()).heightHint = SWT.DEFAULT;
- //((GridData)list.getLayoutData()).heightHint = buttonHeight * maxButtonsHigh;
- ((GridData)group.getLayoutData()).grabExcessVerticalSpace = true;
-
- popupMenu = new Menu(historyList);
-
- Composite rightHandSide = SystemWidgetHelpers.createComposite(group,1);
- clearButton = createPushButton(rightHandSide,SystemResources.ACTION_HISTORY_CLEAR_LABEL, SystemResources.ACTION_HISTORY_CLEAR_TOOLTIP);
- rmvButton = createPushButton(rightHandSide,SystemResources.ACTION_HISTORY_DELETE_LABEL, SystemResources.ACTION_HISTORY_DELETE_TOOLTIP);
- mupButton = createPushButton(rightHandSide,SystemResources.ACTION_HISTORY_MOVEUP_LABEL, SystemResources.ACTION_HISTORY_MOVEUP_TOOLTIP);
- mdnButton = createPushButton(rightHandSide,SystemResources.ACTION_HISTORY_MOVEDOWN_LABEL, SystemResources.ACTION_HISTORY_MOVEDOWN_LABEL);
-
- clearMI = createMenuItem(SystemResources.ACTION_HISTORY_CLEAR_LABEL, SystemResources.ACTION_HISTORY_CLEAR_TOOLTIP);
- rmvMI = createMenuItem(SystemResources.ACTION_HISTORY_DELETE_LABEL, SystemResources.ACTION_HISTORY_DELETE_TOOLTIP);
- mupMI = createMenuItem(SystemResources.ACTION_HISTORY_MOVEUP_LABEL, SystemResources.ACTION_HISTORY_MOVEUP_TOOLTIP);
- mdnMI = createMenuItem(SystemResources.ACTION_HISTORY_MOVEDOWN_LABEL, SystemResources.ACTION_HISTORY_MOVEDOWN_TOOLTIP);
-
- historyList.setMenu(popupMenu);
- historyList.setItems(historyInput);
-
- clearButton.setEnabled((historyInput!=null) && (historyInput.length>0));
- rmvButton.setEnabled(false);
- mupButton.setEnabled(false);
- mdnButton.setEnabled(false);
- clearMI.setEnabled((historyInput!=null) && (historyInput.length>0));
- rmvMI.setEnabled(false);
- mupMI.setEnabled(false);
- mdnMI.setEnabled(false);
-
- // add selection listeners...
- historyList.addSelectionListener(
- new SelectionListener()
- {
- public void widgetDefaultSelected(SelectionEvent e)
- {
- //processRemoveButton(); // equate to selecting Remove...
- okButton.setEnabled(true); //d41471
- enableDisableAllActions();
- }
- public void widgetSelected(SelectionEvent e)
- {
- okButton.setEnabled(true); //d41471
- enableDisableAllActions();
- }
- }
- );
- return group;
- } // end init common
- /**
- * Helper method for a separator menu item
- */
- protected MenuItem addSeparator(Menu parent)
- {
- MenuItem mi = new MenuItem(parent,SWT.SEPARATOR);
- return mi;
- }
- /**
- * Helper method for creating cascading menu item
- */
- protected MenuItem createMenuItem(String label, String description)
- {
- MenuItem mi = new MenuItem(popupMenu,SWT.NULL);
- mi.setText(label);
- mi.setData(description);
- mi.addArmListener(this);
- mi.addListener(SWT.Selection, this);
- return mi;
- }
- /**
- * Helper method for creating a pushbutton with tooltip text.
- * This method takes resolved label and tooltip values
- */
- protected Button createPushButton(Composite c, String label, String tooltip)
- {
- Button button = SystemWidgetHelpers.createPushButton(c, this, label, tooltip);
- return button;
- }
- /**
- * Helper method to enable/disable all actions (buttons, menuitems)
- * based on current selections in list or current text contents.
- */
- private void enableDisableAllActions()
- {
- boolean itemSelected = (historyList.getSelectionCount() > 0);
- boolean defaultItemSelected = itemSelected && selectedInDefaultHistory();
- // Remove action
- rmvButton.setEnabled(itemSelected && !defaultItemSelected);
- rmvMI.setEnabled(itemSelected && !defaultItemSelected);
- // Move Up action
- mupButton.setEnabled(itemSelected && !historyList.isSelected(0));
- mupMI.setEnabled(mupButton.isEnabled());
- // Move Down action
- mdnButton.setEnabled(itemSelected && !historyList.isSelected((historyList.getItemCount())-1));
- mupMI.setEnabled(mdnButton.isEnabled());
-
- int emptyListCount = 0;
- if (defaultHistory != null)
- emptyListCount = defaultHistory.length;
- clearButton.setEnabled(historyList.getItemCount() > emptyListCount);
- }
-
- protected boolean processOK()
- {
- historyOutput = historyList.getItems();
- return true;
- }
-
- // --------------------------------- //
- // METHODS FOR INTERFACES...
- // --------------------------------- //
- /**
- * Handles events generated by controls on this page.
- */
- public void handleEvent(Event e)
- {
- //get widget that generates the event
- clearMessage();
- Widget source = e.widget;
- if ((source == clearButton) ||
- (source == clearMI))
- {
- historyList.removeAll();
- if (defaultHistory != null)
- historyList.setItems(defaultHistory); // pc41439
- okButton.setEnabled(true); //d41471
- enableDisableAllActions(); //d41421
- }
- else if ((source == rmvButton) ||
- (source == rmvMI))
- {
- int seld[] = historyList.getSelectionIndices();
- if (seld.length > 0)
- {
- historyList.remove(seld);
- enableDisableAllActions(); //d41421
- }
- }
- else if ((source == mupButton) ||
- (source == mupMI))
- {
- int oldIndex = historyList.getSelectionIndex();
- if (oldIndex > 0)
- {
- String seldObj = historyList.getSelection()[0];
- historyList.remove(oldIndex);
- historyList.add(seldObj,oldIndex-1);
- historyList.select(oldIndex-1);
- historyList.showSelection();
- enableDisableAllActions(); //d41421
- }
- }
- else if ((source == mdnButton) ||
- (source == mdnMI))
- {
- int oldIndex = historyList.getSelectionIndex();
- if ((oldIndex >= 0) && (oldIndex < (historyList.getItemCount()-1)))
- {
- String seldObj = historyList.getSelection()[0];
- historyList.remove(oldIndex);
- historyList.add(seldObj,oldIndex+1);
- //historyList.select(oldIndex+1);
- // historyList.showSelection();
- historyList.select(oldIndex+2); //d41427 To get around eclipse bug which does
- historyList.showSelection(); //d41427 not show the selected one as expected.
- historyList.select(oldIndex+1); //d41427 Need to advance one more to show it
- enableDisableAllActions(); //d41421
- }
- }
-
- }
- /**
- * Called by system when menu item is "armed" or in select state.
- * We use this to show the menu item description.
- */
- public void widgetArmed(ArmEvent e)
- {
- clearMessage();
- Widget w = e.widget;
- if (w instanceof MenuItem)
- {
- MenuItem mi = (MenuItem)w;
- String desc = (String)mi.getData();
- setMessage(desc);
- }
- }
-
- // -----------------------
- // CALLER QUERY METHODS...
- // -----------------------
-
- /**
- * Return the updated history
- */
- public String[] getHistory()
- {
- return historyOutput;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemChangeFilterPaneEditPaneSupplier.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemChangeFilterPaneEditPaneSupplier.java
deleted file mode 100644
index fe964afdd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemChangeFilterPaneEditPaneSupplier.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.filters;
-
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The SystemChangeFilterPane class is used in both SystemChangeFilterDialog and
- * in SystemChangeFilterPropertyPage. The pane relies on both of these to supply
- * the edit pane (for historical reasons, so we don't break previous contracts).
- * This interface is implemented by both classes, for supplying that edit pane.
- */
-public interface ISystemChangeFilterPaneEditPaneSupplier
-{
- /**
- * Return the filter string edit pane.
- */
- public SystemFilterStringEditPane getFilterStringEditPane(Shell shell);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemFilterStringEditPaneListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemFilterStringEditPaneListener.java
deleted file mode 100644
index d00af2225..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemFilterStringEditPaneListener.java
+++ /dev/null
@@ -1,44 +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.filters;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-/**
- * This listener interface is implemented by any code desired to be kept aware
- * of all user changes to a filter string in the SystemFilterStringEditPane.
- */
-public interface ISystemFilterStringEditPaneListener
-{
-
- /**
- * Callback method. The user has changed the filter string. It may or may not
- * be valid. If not, the given message is non-null. If it is, and you want it,
- * call getSystemFilterString() in the edit pane.
- */
- public void filterStringChanged(SystemMessage message);
-
- /**
- * Callback method. We are about to do a verify,the side effect of which is to
- * change the current state of the dialog, which we don't want. This tells the
- * dialog to back up that state so it can be restored.
- */
- public void backupChangedState();
-
- /**
- * Callback method. After backup and change events this is called to restore state
- */
- public void restoreChangedState();
-} \ No newline at end of file
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
deleted file mode 100644
index a6a8425de..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemChangeFilterPane.java
+++ /dev/null
@@ -1,1437 +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.filters;
-
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-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.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.filters.actions.SystemChangeFilterActionCopyString;
-import org.eclipse.rse.ui.filters.actions.SystemChangeFilterActionDeleteString;
-import org.eclipse.rse.ui.filters.actions.SystemChangeFilterActionMoveStringDown;
-import org.eclipse.rse.ui.filters.actions.SystemChangeFilterActionMoveStringUp;
-import org.eclipse.rse.ui.filters.actions.SystemChangeFilterActionPasteString;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ISystemValidatorUniqueString;
-import org.eclipse.rse.ui.validators.ValidatorFilterString;
-import org.eclipse.rse.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.ui.widgets.ISystemEditPaneStates;
-import org.eclipse.rse.ui.widgets.SystemEditPaneStateMachine;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-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.List;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Widget;
-
-
-/**
- * Since we have decided to allow the same editing in both the Change Filter dialog
- * and the Properties page, we have to abstract the meat of the change filter dialog
- * into a re-usable composite. That is what this is, and it is used by both the
- * dialog and the property page.
- */
-public class SystemChangeFilterPane extends SystemBaseForm
- implements SelectionListener, ISystemFilterStringEditPaneListener, IMenuListener
-{
-
- protected Button applyButton, revertButton, testButton;
- protected SystemEditPaneStateMachine sm;
- protected List listView;
- protected Label filterNameLabel, filterPoolNameLabel, fsLabel;
- // context menu actions support
- private SystemChangeFilterActionCopyString copyAction;
- private SystemChangeFilterActionPasteString pasteAction;
- private SystemChangeFilterActionDeleteString deleteAction;
- private SystemChangeFilterActionMoveStringUp moveUpAction;
- private SystemChangeFilterActionMoveStringDown moveDownAction;
- private MenuManager menuMgr;
- private Clipboard clipboard;
- private boolean menuListenerAdded;
-
- // inputs
- protected ISystemChangeFilterPaneEditPaneSupplier editPaneSupplier;
- protected ISystemFilter inputFilter;
- protected ISystemFilterPoolReferenceManagerProvider refProvider;
- protected ISystemFilterPoolManagerProvider provider;
- protected String namePromptLabel, namePromptTip;
- protected String poolPromptLabel, poolPromptTip;
- protected String listPromptLabel, listPromptTip;
- protected String newEntryLabel;
-
- protected ISystemValidator filterStringValidator = null;
- protected SystemMessage duplicateFilterStringMsg;
- protected boolean wantTestButton;
- protected boolean editable = true;
-
- // state
- protected boolean caseSensitiveStrings = false;
- protected boolean allowDuplicateStrings = false;
- protected boolean ignoreEvents = false;
- protected boolean resetting = false;
- protected boolean giveEditorFocus = true;
- protected boolean showingNew = true;
- protected boolean supportsMultipleStrings = true;
- protected String[] listItems;
-
- /**
- * Constructor.
- */
- public SystemChangeFilterPane(Shell shell, ISystemMessageLine msgLine, ISystemChangeFilterPaneEditPaneSupplier editPaneSupplier)
- {
- super(shell, msgLine);
- this.editPaneSupplier = editPaneSupplier;
-
-
- // default mri values
- namePromptLabel = SystemResources.RESID_CHGFILTER_NAME_LABEL;
- namePromptTip = SystemResources.RESID_CHGFILTER_NAME_TOOLTIP;
- poolPromptLabel = SystemResources.RESID_CHGFILTER_POOL_LABEL;
- poolPromptTip = SystemResources.RESID_CHGFILTER_POOL_TOOLTIP;
- listPromptLabel = SystemResources.RESID_CHGFILTER_LIST_LABEL;
- listPromptTip = SystemResources.RESID_CHGFILTER_LIST_TOOLTIP;
- }
-
- // INPUT/CONFIGURATION
- /**
- * <i>Configuration method</i><br>
- * Set the contextual system filter pool reference manager provider. Will be non-null if the
- * current selection is a reference to a filter pool or filter, or a reference manager
- * provider.
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
- {
- this.refProvider = provider;
- }
- /**
- * <i>Configuration method</i><br>
- * Set the contextual system filter pool manager provider. Will be non-null if the
- * current selection is a filter pool or filter, or reference to them, or a manager provider.
- * Generally this is called when the setSystemFilterPoolReferenceManagerProvider can't be called
- * for some reason.
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider provider)
- {
- this.provider = provider;
- }
-
- /**
- * <i>Configuration method</i><br>
- * Set the Parent Filter Pool prompt label and tooltip text.
- */
- public void setParentPoolPromptLabel(String label, String tip)
- {
- this.poolPromptLabel = label;
- this.poolPromptTip = tip;
- }
- /**
- * Return the parent filter pool prompt label, as set by {@link #setParentPoolPromptLabel(String, String)}
- */
- public String getParentPoolPromptLabel()
- {
- return poolPromptLabel;
- }
- /**
- * Return the parent filter pool prompt tip, as set by {@link #setParentPoolPromptLabel(String, String)}
- */
- public String getParentPoolPromptTip()
- {
- return poolPromptTip;
- }
-
- /**
- * <i>Configuration method</i><br>
- * Set the name prompt label and tooltip text.
- */
- public void setNamePromptLabel(String label, String tip)
- {
- this.namePromptLabel = label;
- this.namePromptTip = tip;
- }
- /**
- * Return the name prompt label as set by {@link #setNamePromptLabel(String, String)}
- */
- public String getNamePromptLabel()
- {
- return namePromptLabel;
- }
- /**
- * Return the name prompt tip as set by {@link #setNamePromptLabel(String, String)}
- */
- public String getNamePromptTip()
- {
- return namePromptTip;
- }
-
- /**
- * <i>Configuration method</i><br>
- * Set the label shown in group box around the filter string list, and the tooltip text for the
- * list box.
- */
- public void setListLabel(String label, String tip)
- {
- this.listPromptLabel = label;
- this.listPromptTip = tip;
- }
- /**
- * Return list label as set by {@link #setListLabel(String, String)}
- */
- public String getListLabel()
- {
- return listPromptLabel;
- }
- /**
- * Return list tip as set by {@link #setListLabel(String, String)}
- */
- public String getListTip()
- {
- return listPromptTip;
- }
-
- /**
- * Set the string to show as the first item in the list.
- * The default is "New filter string"
- */
- public void setNewListItemText(String label)
- {
- this.newEntryLabel = label;
- }
- /**
- * Return the text for the list item, as set by {@link #setNewListItemText(String)},
- * or the default if not set.
- */
- public String getNewListItemText()
- {
- return (newEntryLabel != null) ? newEntryLabel : SystemResources.RESID_CHGFILTER_LIST_NEWITEM;
- }
-
- /**
- * <i>Configuration method</i><br>
- * Call this to specify a validator for the filter string. It will be called per keystroke.
- * A default validator is supplied otherwise: ValidatorFilterString.
- * <p>
- * Your validator should extend ValidatorFilterString to inherited the uniqueness error checking.
- * <p>
- * Alternatively, if all you want is a unique error message for the case when duplicates are found,
- * call setDuplicateFilterStringErrorMessage, and it will be used in the default validator.
- */
- public void setFilterStringValidator(ISystemValidator v)
- {
- filterStringValidator = v;
- }
- /**
- * Return the result of {@link #setFilterStringValidator(ISystemValidator)}.
- */
- public ISystemValidator getFilterStringValidator()
- {
- return filterStringValidator;
- }
- /**
- * <i>Configuration method</i><br>
- * Set the error message to use when the user is editing or creating a filter string, and the
- * Apply processing detects a duplicate filter string in the list.
- */
- public void setDuplicateFilterStringErrorMessage(SystemMessage msg)
- {
- this.duplicateFilterStringMsg = msg;
- }
- /**
- * Return results of {@link #setDuplicateFilterStringErrorMessage(SystemMessage)}
- */
- public SystemMessage getDuplicateFilterStringErrorMessage()
- {
- return duplicateFilterStringMsg;
- }
- /**
- * <i>Configuration method</i><br>
- * Specify if you want to include a test button or not. Appears with "Apply" and "Reset"
- */
- public void setWantTestButton(boolean wantTestButton)
- {
- this.wantTestButton = wantTestButton;
- }
- /**
- * Return whether a test button is wanted or not, as set by {@link #setWantTestButton(boolean)}
- */
- public boolean getWantTestButton()
- {
- return wantTestButton;
- }
-
- /**
- * Set if the edit pane is not to be editable
- */
- public void setEditable(boolean editable)
- {
- this.editable = editable;
- this.showingNew = editable;
- }
- /**
- * Return whether the edit pane is editable, as set by {@link #setEditable(boolean)}
- */
- public boolean getEditable()
- {
- return editable;
- }
- /**
- * Set if the user is to be allowed to create multiple filter strings or not. Default is true
- */
- public void setSupportsMultipleStrings(boolean multi)
- {
- this.showingNew = multi;
- this.supportsMultipleStrings = multi;
- }
- /**
- * Return whether the user is to be allowed to create multiple filter strings or not. Default is true
- */
- public boolean getSupportsMultipleStrings()
- {
- return supportsMultipleStrings;
- //return (!showingNew && editable);
- }
-
- // LIFECYCLE
- /**
- * Intercept of parent so we can set the input filter, and deduce whether
- * strings are case sensitive and if duplicates are allowed.<br>
- * Not typically overridden, but if you do, be sure to call super!
- */
- public void setInputObject(Object inputObject)
- {
- //System.out.println("INSIDE SETINPUTOBJECT: " + inputObject);
- super.setInputObject(inputObject);
- inputFilter = getSystemFilter(inputObject);
- caseSensitiveStrings = inputFilter.areStringsCaseSensitive();
- allowDuplicateStrings = inputFilter.supportsDuplicateFilterStrings();
- }
-
- /**
- * Returns the control (the list view) to recieve initial focus control
- */
- public Control getInitialFocusControl()
- {
- return listView;
- }
- /**
- * Populates the content area
- */
- public Control createContents(Composite parent)
- {
- SystemWidgetHelpers.setHelp(parent, RSEUIPlugin.HELPPREFIX+"dufr0000"); //$NON-NLS-1$
-
- if (getShell()==null)
- setShell(parent.getShell());
- SystemFilterStringEditPane editpane = getFilterStringEditPane(getShell());
- editpane.setSystemFilterPoolReferenceManagerProvider(refProvider);
- editpane.setSystemFilterPoolManagerProvider(provider);
- editpane.setChangeFilterMode(true);
-
- // Inner composite
- int nbrColumns = 2;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // composite at top to hold readonly info
- //Composite topComposite = SystemWidgetHelpers.createFlushComposite(composite, 2);
- //((GridData)topComposite.getLayoutData()).horizontalSpan = nbrColumns;
- Composite topComposite = composite;
- // filter name
- SystemWidgetHelpers.createLabel(topComposite, namePromptLabel);
- filterNameLabel = SystemWidgetHelpers.createLabel(topComposite, ""); //$NON-NLS-1$
- filterNameLabel.setToolTipText(namePromptTip);
- filterNameLabel.setText(inputFilter.getName());
- // filter pool
- SystemWidgetHelpers.createLabel(topComposite, poolPromptLabel);
- filterPoolNameLabel = SystemWidgetHelpers.createLabel(topComposite, ""); //$NON-NLS-1$
- filterPoolNameLabel.setToolTipText(namePromptTip);
- ISystemFilterPool parentPool = inputFilter.getParentFilterPool();
- filterPoolNameLabel.setText(parentPool.getName());
-
- addFillerLine(composite, nbrColumns);
-
- // create list view on left
- if (supportsMultipleStrings)
- {
- listView = SystemWidgetHelpers.createListBox(composite, listPromptLabel, null, false, 1);
- //listView.setToolTipText(listPromptTip); VERY ANNOYING
- GridData data = (GridData)listView.getLayoutData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- data.verticalAlignment = GridData.FILL;
- data.widthHint = 130;
- }
- String[] strings = inputFilter.getFilterStrings();
- if (strings == null)
- strings = new String[] {};
- int delta = (showingNew ? 1 : 0);
- listItems = new String[delta+strings.length];
- if (showingNew)
- listItems[0] = getNewListItemText(); // "New filter string" or caller-supplied
- for (int idx=0; idx<strings.length; idx++)
- listItems[idx+delta] = strings[idx];
- if (listView != null)
- listView.setItems(listItems);
-
- // we want the tree view on the left to extend to the bottom of the page, so on the right
- // we create a 1-column composite that will hold the edit pane on top, and the apply/revert
- // buttons on the bottom...
- Composite rightSideComposite = SystemWidgetHelpers.createFlushComposite(composite, 1);
- if (listView == null)
- {
- GridData data = (GridData)rightSideComposite.getLayoutData();
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = nbrColumns;
- }
-
- // now add a top spacer line and visual separator line, for the right side
- if (listView != null)
- {
- addFillerLine(rightSideComposite, 1);
- fsLabel = SystemWidgetHelpers.createLabel(rightSideComposite, ""); //$NON-NLS-1$
- addSeparatorLine(rightSideComposite,1);
- }
-
- // now populate top of right-side composite with edit pane...
- Control editPaneComposite = editpane.createContents(rightSideComposite);
- if (!allowDuplicateStrings && (filterStringValidator == null))
- {
- String[] existingStrings = inputFilter.getFilterStrings();
- if (existingStrings!=null)
- {
- filterStringValidator = new ValidatorFilterString(existingStrings, caseSensitiveStrings);
- if (duplicateFilterStringMsg != null)
- ((ValidatorFilterString)filterStringValidator).setDuplicateFilterStringErrorMessage(duplicateFilterStringMsg);
- }
- }
-
- // now add a bottom visual separator line
- addSeparatorLine(rightSideComposite,1);
-
- // now populate bottom of right-side composite with apply/revert buttons within their own composite
- int nbrColumns_buttonComposite = 3;
- Composite applyResetButtonComposite = SystemWidgetHelpers.createFlushComposite(rightSideComposite, nbrColumns_buttonComposite);
- if (!wantTestButton)
- {
- ((GridData)applyResetButtonComposite.getLayoutData()).horizontalIndent = 200; // shift buttons to the right
- // now populate the buttons composite with apply and revert buttons
- Label filler = SystemWidgetHelpers.createLabel(applyResetButtonComposite, ""); //$NON-NLS-1$
- ((GridData)filler.getLayoutData()).grabExcessHorizontalSpace = true;
- ((GridData)filler.getLayoutData()).horizontalAlignment = GridData.FILL;
- }
- if (wantTestButton)
- {
- testButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this,
- SystemResources.RESID_CHGFILTER_BUTTON_TEST_LABEL,SystemResources.RESID_CHGFILTER_BUTTON_TEST_TOOLTIP);
- editpane.setTestButton(testButton);
- testButton.addSelectionListener(this);
- }
- applyButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemResources.RESID_CHGFILTER_BUTTON_APPLY_LABEL, SystemResources.RESID_CHGFILTER_BUTTON_APPLY_TOOLTIP);
- revertButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemResources.RESID_CHGFILTER_BUTTON_REVERT_LABEL,SystemResources.RESID_CHGFILTER_BUTTON_REVERT_TOOLTIP);
-
- // now add a spacer to soak up left-over height...
- addGrowableFillerLine(rightSideComposite, 1);
-
- // create state machine to manage edit pane
- sm = new SystemEditPaneStateMachine(rightSideComposite, applyButton, revertButton);
- sm.setUnsetMode();
-
- composite.layout(true);
-
- // add listeners
- if (listView!=null)
- listView.addSelectionListener(this);
- applyButton.addSelectionListener(this);
- revertButton.addSelectionListener(this);
- editpane.addChangeListener(this);
-
- // add special listeners for accessibility -- do not change focus when navigating list with keys
- if (listView != null)
- {
- listView.addMouseListener(new MouseListener() {
- public void mouseDoubleClick(MouseEvent e) {
- giveEditorFocus = true;
- }
- public void mouseDown(MouseEvent e) {
- giveEditorFocus = true;
- }
- public void mouseUp(MouseEvent e) {
- giveEditorFocus = true;
- }
- });
- listView.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- giveEditorFocus = false;
- }
- public void keyReleased(KeyEvent e) {
- giveEditorFocus = false;
- }
- });
- }
-
- // add context menu
- // -----------------------------
- // Enable right-click popup menu
- // -----------------------------
- if (listView != null)
- {
- menuMgr = new MenuManager("#ChangeFilterPopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(this);
- Menu menu = menuMgr.createContextMenu(listView);
- listView.setMenu(menu);
- }
-
- // preselect list item..
- // edit mode..
- if ((listItems.length > 1) || !showingNew)
- {
- if (listView!=null)
- {
- if (showingNew)
- listView.select(1);
- else
- listView.select(0);
- }
- sm.setEditMode();
- editpane.setFilterString(listItems[showingNew ? 1 : 0], 1);
- }
- // new...
- else
- {
- if (listView!=null)
- listView.select(0);
- sm.setNewMode();
- editpane.setFilterString(null, 0);
- }
- editpane.configureHeadingLabel(fsLabel);
- setPageComplete(editpane.isComplete());// side effect is initial enablement of test button
-
- if (!editable)
- {
- if (listView!=null)
- listView.setEnabled(false);
- if (strings.length > 0)
- editpane.setFilterString(strings[0], 0);
- editPaneComposite.setEnabled(false);
- //editpane.setEditable(false);
- setPageComplete(true);
- }
- else if (!getSupportsMultipleStrings())
- setPageComplete(true);
-
- return composite;
- }
- /*
- * Intercept of parent so we can reset the default button
- *
- protected void createButtonsForButtonBar(Composite parent)
- {
- super.createButtonsForButtonBar(parent);
- getShell().setDefaultButton(applyButton); // defect 46129
- }*/
- /**
- * Return our edit pane, by referring back to our caller. You can use this,
- * but do not override it!
- */
- protected SystemFilterStringEditPane getFilterStringEditPane(Shell shell)
- {
- return editPaneSupplier.getFilterStringEditPane(shell);
- }
-
- /**
- * Return the Apply button
- */
- public Button getApplyButton()
- {
- return applyButton;
- }
- /**
- * Return the Revert button
- */
- public Button getRevertButton()
- {
- return revertButton;
- }
-
- /**
- * Call when user presses OK button on containing dialog or pane.
- * This is when we save all the changes the user made.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- public boolean processOK()
- {
- if (!editable)
- return true;
- if (!verify(true))
- return false;
- /*
- ignoreEvents = true;
- SystemFilterStringEditPane editpane = getFilterStringEditPane(getShell());
- if (sm.isSaveRequired())
- {
- if (editpane.verify()!=null)
- {
- ignoreEvents = false;
- sm.setChangesMade(); // defect 45773
- return false; // pending errors. Cannot save, so cannot close!
- }
- saveFilterString(editpane.getFilterString(),editpane.getCurrentSelectionIndex());
- }
- else if (!sm.getNewSetByDelete()) //d47125
- {
- if (editpane.verify() != null)
- {
- ignoreEvents = false;
- return false;
- }
- }
- ignoreEvents = false;
- if (!allowDuplicateStrings && (listView != null))
- {
- String duplicate = checkForDuplicates();
- if (duplicate != null)
- {
- SystemMessage errMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_DUPLICATES).makeSubstitution(duplicate);
- getMessageLine().setErrorMessage(errMsg);
- listView.setFocus();
- return false;
- }
- }
- */
- ISystemFilterPool pool = inputFilter.getParentFilterPool(); // recurses for nested filter
- ISystemFilterPoolManager mgr = pool.getSystemFilterPoolManager();
- if (listView != null)
- listItems = listView.getItems();
- String[] filterStrings = null;
- if (showingNew)
- {
- filterStrings = new String[listItems.length - 1];
- for (int idx=0; idx<filterStrings.length; idx++)
- filterStrings[idx] = listItems[idx+1];
- }
- else
- {
- filterStrings = listItems;
- }
-
- try {
- mgr.updateSystemFilter(inputFilter, inputFilter.getName(), filterStrings);
- }
- catch (SystemMessageException exc)
- {
- getMessageLine().setErrorMessage(exc.getSystemMessage());
- return false;
- }
- catch (Exception exc)
- {
- //displayErrorMessage("Error updating filter: " + exc.getMessage());
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPDATEFILTER_FAILED);
- String excText = exc.getMessage();
- if (excText == null)
- excText = exc.getClass().getName();
- msg.makeSubstitution(excText,exc);
- getMessageLine().setErrorMessage(msg);
- return false;
- }
- //return super.processOK();
- return true;
- }
- /**
- * Perform the same validation that is done when OK is pressed.
- * @param doSave - true to actually save pending changes in filter string editor (eg, when called when actually processing OK).
- */
- public boolean verify(boolean doSave)
- {
- ignoreEvents = true;
- getMessageLine().clearErrorMessage();
- SystemFilterStringEditPane editpane = getFilterStringEditPane(getShell());
- if (editpane.canSaveImplicitly() && sm.isSaveRequired())
- {
- if (editpane.verify()!=null)
- {
- ignoreEvents = false;
- sm.setChangesMade(); // defect 45773
- return false; // pending errors. Cannot save, so cannot close!
- }
- if (doSave)
- saveFilterString(editpane.getFilterString(),editpane.getCurrentSelectionIndex());
- }
- else if (!sm.getNewSetByDelete()) //d47125
- {
- if (editpane.verify() != null)
- {
- ignoreEvents = false;
- return false;
- }
- }
- ignoreEvents = false;
- if (!allowDuplicateStrings && (listView != null))
- {
- String duplicate = checkForDuplicates();
- if (duplicate != null)
- {
- SystemMessage errMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_DUPLICATES).makeSubstitution(duplicate);
- getMessageLine().setErrorMessage(errMsg);
- listView.setFocus();
- return false;
- }
- }
- return true;
- }
-
- /**
- * Call when user presses Cancel button in containing dialog. We simply blow away all their changes!
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- public boolean processCancel()
- {
- /*
- if (sm.isSaveRequired())
- {
- if (editpane.verify()!=null)
- return false; // pending errors. Cannot save, so cannot close!
- saveFilterString();
- }
- */
- //return super.processCancel();
- return true;
- }
-
- /**
- * Handles events generated by controls on this page.
- */
- public void widgetSelected(SelectionEvent e)
- {
- if (resetting)
- return;
- Widget source = e.widget;
- if (source == applyButton)
- {
- getMessageLine().clearMessage();
- applyPressed();
- }
- else if (source == revertButton)
- {
- getMessageLine().clearMessage();
- revertPressed();
- }
- else if (source == testButton)
- {
- getMessageLine().clearMessage();
- getFilterStringEditPane(getShell()).processTest(getShell());
- }
-
- else if (source == listView)
- {
- // check for unresolved errors...
- if (getFilterStringEditPane(getShell()).areErrorsPending())
- {
- e.doit = false; // dang, this doesn't work!
- resetting = true; // d45795
- listView.select(getFilterStringEditPane(getShell()).getCurrentSelectionIndex()); // d45795
- resetting = false; // d45795
- return;
- }
- // check if we can save implicitly and if there are pending changes
- else if (getFilterStringEditPane(getShell()).canSaveImplicitly() && sm.isSaveRequired())
- {
- getMessageLine().clearMessage();
-
- // if error, do not change selection and we keep pending changes state
- if (getFilterStringEditPane(getShell()).verify() != null)
- {
- e.doit = false; // dang, this doesn't work!
- sm.setChangesMade();
- resetting = true; // d45795
- listView.select(getFilterStringEditPane(getShell()).getCurrentSelectionIndex()); // d45795
- resetting = false; // d45795
- applyButton.setEnabled(false); // d45795
- return;
- }
-
- // no errors
- saveFilterString(getFilterStringEditPane(getShell()).getFilterString(),
- getFilterStringEditPane(getShell()).getCurrentSelectionIndex());
- }
- else {
- getMessageLine().clearMessage();
- }
-
- // proceed with selection change request...
- processListSelect();
-
- // KM: defect 53009
- // need to check if Create button can be enabled if new filter string is selected
- if (isNewSelected()) {
- handleNewFilterStringItemSelection();
- }
- }
- }
- /**
- * An item selected in list. Process it
- */
- private void processListSelect()
- {
- sm.setNewSetByDelete(false); //d47125
- int newIndex = listView.getSelectionIndex();
- if (isNewSelected() || (newIndex == -1))
- {
- SystemFilterStringEditPane editpane = getFilterStringEditPane(getShell());
- editpane.setFilterString(null, 0);
-
- if (isNewSelected()) {
- sm.setNewMode();
- }
- else
- sm.setUnsetMode();
- if (testButton != null)
- testButton.setEnabled(false);
- }
- else
- {
- getFilterStringEditPane(getShell()).setFilterString(getCurrentSelection(), newIndex);
- sm.setEditMode();
- if (testButton != null)
- testButton.setEnabled(true);
- }
- getFilterStringEditPane(getShell()).configureHeadingLabel(fsLabel);
- if (giveEditorFocus)
- {
- Control c = getFilterStringEditPane(getShell()).getInitialFocusControl();
- if ((c!=null) && !c.isDisposed() && c.isVisible())
- c.setFocus();
- }
- }
- /**
- * User pressed Apply to save the pending changes the current filter string
- */
- protected void applyPressed()
- {
- ignoreEvents = true;
-
- SystemFilterStringEditPane editpane = getFilterStringEditPane(getShell());
- if (editpane.verify() == null)
- {
- boolean ok = true;
- String editedFilterString = editpane.getFilterString();
- if (filterStringValidator != null)
- {
- String[] names = (listView!=null) ? listView.getItems() : listItems;
- if (!allowDuplicateStrings && (filterStringValidator instanceof ISystemValidatorUniqueString))
- ((ISystemValidatorUniqueString)filterStringValidator).setExistingNamesList(names);
- SystemMessage errorMessage = filterStringValidator.validate(editedFilterString);
- if (errorMessage != null)
- {
- ok = false;
- getMessageLine().setErrorMessage(errorMessage);
- }
- }
-
- if (ok)
- {
- sm.applyPressed();
- saveFilterString(editedFilterString, editpane.getCurrentSelectionIndex());
- }
- }
-
- ignoreEvents = false;
- }
-
- /**
- * User pressed Revert to discard the pending changes the current filter string
- */
- protected void revertPressed()
- {
- ignoreEvents = true;
- sm.resetPressed();
- boolean newMode = (isNewSelected() || listView == null || (listView.getSelectionIndex() == -1));
- if (newMode)
- getFilterStringEditPane(getShell()).setFilterString(null, 0);
- else
- getFilterStringEditPane(getShell()).setFilterString(getCurrentSelection(), listView.getSelectionIndex());
- getMessageLine().clearErrorMessage();
- setPageComplete(true);
- if (testButton != null)
- testButton.setEnabled(!newMode);
- ignoreEvents = false;
- }
-
- /**
- * Handles events generated by controls on this page.
- */
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
-
- /**
- * The completeness of the page has changed.
- * We direct it to the Apply button versus just the OK button
- */
- public void setPageComplete(boolean complete)
- {
- // d45795
- if (applyButton != null)
- {
- if (!complete)
- applyButton.setEnabled(false);
- // else: we never enable it because the state machine does that anyway on any user-input change
- }
- super.setPageComplete(complete);
- }
-
- // ------------
- // List methods
- // ------------
-
- /**
- * Return true if currently selected item is "New"
- */
- protected boolean isNewSelected()
- {
- if (showingNew && (listView!=null))
- return (listView.getSelectionIndex() == 0);
- else
- return false;
- }
-
- /**
- * Return currently selected filter string
- */
- protected String getCurrentSelection()
- {
- if (showingNew)
- {
- if (listView.getSelectionCount() >= 1)
- return listView.getSelection()[0];
- else
- return null;
- }
- else if (listView != null)
- {
- if (listView.getSelectionCount() >= 0)
- return listView.getSelection()[0];
- else
- return null;
- }
- else
- {
- return listItems[0];
- }
- }
-
- // LIFECYCLE OF STRINGS
-
- /**
- * Create a new filter string from the contents of the filter string edit pane
- */
- protected String createFilterString()
- {
- String newFilterString = getFilterStringEditPane(getShell()).getFilterString();
- listView.add(newFilterString);
- int selectionIndex = listView.getItemCount()-1;
- listView.select(selectionIndex);
- sm.setEditMode();
- getFilterStringEditPane(getShell()).setFilterString(newFilterString, selectionIndex);
- getFilterStringEditPane(getShell()).configureHeadingLabel(fsLabel);
- return newFilterString;
- }
- /**
- * Update the current selection with the values in the edit pane
- */
- protected void saveFilterString(String editedFilterString, int currSelectionIndex)
- {
- //System.out.println("inside savefilterstring. current sel index = " + currSelectionIndex);
- if (currSelectionIndex == -1)
- return;
- else if (showingNew && (currSelectionIndex == 0))
- createFilterString();
- else
- {
- //System.out.println("Updating list item " + currSelectionIndex + " to " + editedFilterString);
- if (listView != null)
- listView.setItem(currSelectionIndex, editedFilterString);
- else
- listItems[0] = editedFilterString;
- }
- }
-
-
- // private methods
-
- private ISystemFilter getSystemFilter(Object selectedObject)
- {
- if (selectedObject instanceof ISystemFilter)
- return (ISystemFilter)selectedObject;
- else
- return ((ISystemFilterReference)selectedObject).getReferencedFilter();
- }
-
- // ----------------------------------------------
- // EDIT PANE CHANGE LISTENER INTERFACE METHODS...
- // ----------------------------------------------
- /**
- * Callback method from the edit pane. The user has changed the filter string. It may or may not
- * be valid. If not, the given message is non-null. If it is, and you want it,
- * call getSystemFilterString() in the edit pane.
- */
- public void filterStringChanged(SystemMessage message)
- {
- if (message != null)
- getMessageLine().setErrorMessage(message);
- else
- getMessageLine().clearErrorMessage();
- if (testButton != null)
- testButton.setEnabled(message == null);
- if (!ignoreEvents) // this is set on while verifying, indicating these are not real change events per se
- {
- sm.setChangesMade();
- }
- setPageComplete(message == null);
- }
- /**
- * Callback method. We are about to do a verify,the side effect of which is to
- * change the current state of the dialog, which we don't want. This tells the
- * dialog to back up that state so it can be restored.
- */
- public void backupChangedState()
- {
- sm.backup();
- }
- /**
- * Callback method. After backup and change events this is called to restore state
- */
- public void restoreChangedState()
- {
- sm.restore();
- }
-
- // ------------------------------
- // CONTEXT MENU ACTION SUPPORT...
- // ------------------------------
- /**
- * Called when the context menu is about to open.
- * Calls {@link #fillContextMenu(IMenuManager)}
- */
- public void menuAboutToShow(IMenuManager menu)
- {
-
- fillContextMenu(menu);
- if (!menuListenerAdded)
- {
- if (menu instanceof MenuManager)
- {
- Menu m = ((MenuManager)menu).getMenu();
- if (m != null)
- {
- menuListenerAdded = true;
- SystemViewMenuListener ml = new SystemViewMenuListener();
- //ml.setShowToolTipText(true, wwDialog.getMessageLine()); does not work for some reason
- m.addMenuListener(ml);
- }
- }
- }
- }
-
- /**
- * This is method is called to populate the popup menu
- */
- public void fillContextMenu(IMenuManager menu)
- {
- String currentString = getCurrentSelection();
- IStructuredSelection selection= null;
- if (currentString != null)
- selection = new StructuredSelection(currentString);
- // Partition into groups...
- createStandardGroups(menu);
- ISystemAction action = null;
- boolean isNewSelected = isNewSelected();
- //System.out.println("new selected? " + isNewSelected);
- if ((selection != null) && !isNewSelected)
- {
- action = getDeleteAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
-
- action = getCopyAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
-
- action = getMoveUpAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
-
- action = getMoveDownAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
- }
- //if (!isNewSelected)
- {
- action = getPasteAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
- }
- }
- /**
- * Creates the Systems plugin standard groups in a context menu.
- */
- public void createStandardGroups(IMenuManager menu)
- {
- if (!menu.isEmpty())
- return;
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORGANIZE)); // rename,move,copy,delete,bookmark,refactoring
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORDER)); // move up, move down
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- }
-
- /**
- * Get the delete action
- */
- private SystemChangeFilterActionDeleteString getDeleteAction(ISelection selection)
- {
- if (deleteAction == null)
- deleteAction = new SystemChangeFilterActionDeleteString(this);
- deleteAction.setShell(getShell());
- deleteAction.setSelection(selection);
- return deleteAction;
- }
-
- /**
- * Get the move up action
- */
- private SystemChangeFilterActionMoveStringUp getMoveUpAction(ISelection selection)
- {
- if (moveUpAction == null)
- moveUpAction = new SystemChangeFilterActionMoveStringUp(this);
- moveUpAction.setShell(getShell());
- moveUpAction.setSelection(selection);
- return moveUpAction;
- }
- /**
- * Get the move down action
- */
- private SystemChangeFilterActionMoveStringDown getMoveDownAction(ISelection selection)
- {
- if (moveDownAction == null)
- moveDownAction = new SystemChangeFilterActionMoveStringDown(this);
- moveDownAction.setShell(getShell());
- moveDownAction.setSelection(selection);
- return moveDownAction;
- }
- /**
- * Get the copy action
- */
- private SystemChangeFilterActionCopyString getCopyAction(ISelection selection)
- {
- if (copyAction == null)
- copyAction = new SystemChangeFilterActionCopyString(this);
- copyAction.setShell(getShell());
- copyAction.setSelection(selection);
- return copyAction;
- }
- /**
- * Get the paste action
- */
- private SystemChangeFilterActionPasteString getPasteAction(ISelection selection)
- {
- if (pasteAction == null)
- pasteAction = new SystemChangeFilterActionPasteString(this);
- pasteAction.setShell(getShell());
- if (selection != null)
- pasteAction.setSelection(selection);
- return pasteAction;
- }
- // -------------------------------------------------------------
- // CALLBACK METHODS FROM THE RIGHT CLICK CONTEXT MENU ACTIONS...
- // -------------------------------------------------------------
-
- /**
- * Decide if we can do the delete or not.
- * Will decide the enabled state of the delete action.
- */
- public boolean canDelete()
- {
- return (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isNewSelected() && (listView.getSelectionIndex()!=-1) &&
- (listView.getItemCount()>2); // defect 46149
- }
- /**
- * Perform the delete action
- */
- public void doDelete()
- {
- int idx = listView.getSelectionIndex();
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_DELETE);
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
- try{
- if (msgDlg.openQuestion())
- {
- listView.remove(idx); // remove item from list
- // defect 46097...
- listView.select(0);
- processListSelect();
- sm.setNewSetByDelete(true); //d47125
-
- // KM: defect 53009
- // since we have new set by delete action, the verify method
- // will ignore actual verification, and just check for duplicates
- boolean ok = verify(false);
-
- // set page to complete
- // but this does not affect Create button
- setPageComplete(ok);
-
- // if the verify above went ok, i.e. no duplicates found, then
- // need to check if Create button can be enabled if new filter string is selected
- if (ok && isNewSelected()) {
- handleNewFilterStringItemSelection();
- }
- }
- } catch (Exception exc) {}
- }
-
- /**
- * Handles new filter string selection from the filter string list.
- * Enables/disables Create button depending on whether the
- * default filter string is valid.
- */
- protected void handleNewFilterStringItemSelection() {
-
- ignoreEvents = true;
-
- SystemFilterStringEditPane editpane = getFilterStringEditPane(getShell());
-
- // we check if there are any existing errors
- // shouldn't be unless setting the default filter string for new filter string item
- // in processListSelect() above caused a problem
- boolean anyErrors = editpane.areErrorsPending();
-
- // if no errors currently, then do a verify
- if (!anyErrors) {
-
- // verify the default filter string
- boolean result = (editpane.verify() == null);
-
- // enable Create button if there are no errors
- if (result) {
- applyButton.setEnabled(true);
- }
- // otherwise clear pending errors, since verify() call could have
- // resulted in errors showing through
- else {
- editpane.clearErrorsPending();
- getMessageLine().clearErrorMessage();
- }
- }
-
- // yantzi: RSE 6.2, added call to setPageComplete to enable the OK button, otherwise
- // it is disabled when the user deletes a filter or selects the newfilterstring dialog
- setPageComplete(true);
-
- ignoreEvents = false;
- }
-
- /**
- * Decide if we can do the move up or not.
- * Will decide the enabled state of the move up action.
- */
- public boolean canMoveUp()
- {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isNewSelected() && (listView.getSelectionIndex()!=-1);
- if (can)
- {
- int idx = listView.getSelectionIndex();
- can = (idx > 1); // skip new at index 0, skip first actual string
- }
- return can;
- }
- /**
- * Perform the move up action
- */
- public void doMoveUp()
- {
- int idx = listView.getSelectionIndex();
- String currentString = getCurrentSelection();
- listView.remove(idx); // remove item from list
- listView.add(currentString,idx-1);
- }
- /**
- * Decide if we can do the move down or not.
- * Will decide the enabled state of the move down action.
- */
- public boolean canMoveDown()
- {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isNewSelected() && (listView.getSelectionIndex()!=-1);
- if (can)
- {
- int idx = listView.getSelectionIndex();
- can = (idx <= (listView.getItemCount()-2)); // -1 is to be zero-based. Another -1 is to discount "New".
- }
- return can;
- }
- /**
- * Perform the move down action
- */
- public void doMoveDown()
- {
- int idx = listView.getSelectionIndex();
- String currentString = getCurrentSelection();
- listView.remove(idx); // remove item from list
- listView.add(currentString,idx+1);
- }
-
- /**
- * Decide if we can do the copy or not.
- * Will decide the enabled state of the copy action.
- */
- public boolean canCopy()
- {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isNewSelected() && (listView.getSelectionIndex()!=-1);
- return can;
- }
- /**
- * Actually do the copy of the current filter string to the clipboard.
- */
- public void doCopy()
- {
- if (clipboard == null)
- clipboard = new Clipboard(getShell().getDisplay());
-
- String selection = getCurrentSelection();
- TextTransfer transfer = TextTransfer.getInstance();
- clipboard.setContents(new Object[] {selection}, new Transfer[] {transfer});
- }
- /**
- * Decide if we can do the paste or not.
- * Will decide the enabled state of the copy action.
- */
- public boolean canPaste()
- {
- if (clipboard == null)
- return false;
- TextTransfer textTransfer = TextTransfer.getInstance();
- String textData = (String)clipboard.getContents(textTransfer);
- return ((textData != null) && (textData.length() > 0));
- }
- /**
- * Actually do the copy of the current filter string to the clipboard.
- * If an existing string is selected, it is pasted before it. Else. it is appended to the end of the list.
- */
- public void doPaste()
- {
- if (clipboard == null)
- return;
- TextTransfer textTransfer = TextTransfer.getInstance();
- String textData = (String)clipboard.getContents(textTransfer);
-
- String newCopy = new String(textData);
- int newLocation = listView.getSelectionIndex();
- if (newLocation <= 0)
- {
- listView.add(newCopy);
- newLocation = listView.getItemCount()-1;
- listView.select(newLocation);
- }
- else
- {
- listView.add(newCopy, newLocation);
- listView.select(newLocation);
- }
- processListSelect(); // defect 45790...
- setPageComplete(verify(false));
- }
-
- // --------------
- // ERROR CHECKING
- // --------------
-
- /**
- * This hook method is called when ok is pressed. It checks for blatantly duplicate filter strings.
- * @return filterstring duplicate if there ARE duplicates. NULL if there are no duplicates
- */
- protected String checkForDuplicates()
- {
- if (listView == null)
- return null;
- String strings[] = (listView != null) ? listView.getItems() : listItems;
- String duplicate = null;
- boolean noDupes = true;
- for (int idx=1; noDupes && (idx < strings.length); idx++)
- {
- for (int ydx=1; noDupes && (ydx < strings.length); ydx++)
- {
- if (idx != ydx)
- {
- if (compareFilterStrings(caseSensitiveStrings, strings[idx], strings[ydx]))
- {
- noDupes = false;
- duplicate = strings[idx];
- }
- }
- }
- }
- return duplicate;
- }
- /**
- * Compares one filter string to another, while searching for duplicates.
- * Override if you want to do more intelligent compares. This one checks
- * for equality. The case-sensitivity is specified by the caller.
- */
- public boolean compareFilterStrings(boolean caseSensitive, String filterString1, String filterString2)
- {
- boolean cs = caseSensitive;
- if (cs)
- return filterString1.equals(filterString2);
- else
- return filterString1.equalsIgnoreCase(filterString2);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogInputs.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogInputs.java
deleted file mode 100644
index 00671d496..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogInputs.java
+++ /dev/null
@@ -1,31 +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.filters;
-/**
- * A class capturing the attributes commonly needed by dialogs that
- * work with filters.
- */
-public class SystemFilterDialogInputs
-{
-
-
- public String title;
- public String prompt;
- public String filterNamePrompt;
- public String filterNameTip;
- public Object preSelectObject;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogInterface.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogInterface.java
deleted file mode 100644
index 8e10490df..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogInterface.java
+++ /dev/null
@@ -1,35 +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.filters;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterAction;
-
-
-/**
- * Common interface for dialogs or wizards that work with filters.
- */
-public interface SystemFilterDialogInterface
-{
- /**
- * Allow base action to pass instance of itself for callback to get info
- */
- public void setFilterDialogActionCaller(SystemFilterAbstractFilterAction caller);
- /**
- * Return an object containing user-specified information pertinent to filter pool actions
- */
- public SystemFilterDialogOutputs getFilterDialogOutputs();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogOutputs.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogOutputs.java
deleted file mode 100644
index 4e92703cb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogOutputs.java
+++ /dev/null
@@ -1,33 +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.filters;
-//import org.eclipse.rse.core.ui.actions.*;
-import org.eclipse.rse.core.filters.ISystemFilter;
-
-
-/**
- * A class capturing the attributes commonly returned by dialogs that
- * work with filters.
- */
-public class SystemFilterDialogOutputs
-{
-
-
- public String filterName;
- public String filterPoolName;
- public ISystemFilter newFilter;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java
deleted file mode 100644
index 603587dec..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java
+++ /dev/null
@@ -1,44 +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.filters;
-//import org.eclipse.rse.core.*;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-
-
-
-/**
- * A class capturing the attributes commonly needed by dialogs that
- * work with filter pools.
- */
-public class SystemFilterPoolDialogInputs extends SystemFilterDialogInputs
-{
-
-
- public ISystemFilterPoolManagerProvider poolManagerProvider = null;
- public ISystemFilterPoolManager[] poolManagers = null;
- public ISystemFilterPoolReferenceManager refManager = null;
- public int mgrSelection = 0;
- public String poolNamePrompt;
- public String poolNameTip;
- public String poolMgrNamePrompt;
- public String poolMgrNameTip;
-
- public SystemSimpleContentElement filterPoolTreeRoot;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java
deleted file mode 100644
index bbc737908..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java
+++ /dev/null
@@ -1,40 +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.filters;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-
-
-/**
- * Common interface for dialogs or wizards that work with filter pools.
- */
-public interface SystemFilterPoolDialogInterface
-{
-
-
- /**
- * Allow base action to pass instance of itself for callback to get info
- */
- public void setFilterPoolDialogActionCaller(SystemFilterAbstractFilterPoolAction caller);
- /**
- * Return an object containing user-specified information pertinent to filter pool actions
- */
- public SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs();
- /**
- * Set the help context id for this wizard
- */
- public void setHelpContextId(String id);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java
deleted file mode 100644
index 634dffda3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java
+++ /dev/null
@@ -1,36 +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.filters;
-//import org.eclipse.rse.core.*;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-
-
-
-/**
- * A class capturing the attributes commonly returned by dialogs that
- * work with filter pools.
- */
-public class SystemFilterPoolDialogOutputs
-{
-
-
- public String filterPoolName;
- public String filterPoolManagerName;
- public SystemSimpleContentElement filterPoolTreeRoot;
- public ISystemFilterPool newPool;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolManagerUIProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolManagerUIProvider.java
deleted file mode 100644
index c1d7f0a4d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolManagerUIProvider.java
+++ /dev/null
@@ -1,26 +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.filters;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-
-public interface SystemFilterPoolManagerUIProvider
-{
- public ISystemFilterPoolManager[] getFilterPoolManagers();
- public SystemSimpleContentElement getTreeModel();
- public SystemSimpleContentElement getTreeModelPreSelection(SystemSimpleContentElement root);
-} \ No newline at end of file
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
deleted file mode 100644
index ad0e486cc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.java
+++ /dev/null
@@ -1,704 +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.filters;
-import java.util.Vector;
-
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-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;
-
-
-
-/**
- * This class prompts the user to create or edit the contents of a single
- * filter string. This edit pane is used in many places, so creating a decent
- * looking subclass is important:
- * <ul>
- * <li>The first page of the New Filter wizard
- * <li>The only page of the New Filter String wizard
- * <li>The right side of the Change Filter dialog, when "new" or an existing filter string is selected
- * </ul>
- * So what is the "contract" the edit pane has to fulfill?
- * <ul>
- * <li>work in "new" or "edit" mode. In the latter case it is given a String as input. This needs to be
- * switchable on the fly. This is typically automated by use of a "state machine".
- * <li>give as output a new or updated String
- * <li>allow interested parties to know when the contents have been changed, as they change,
- * and whether there are errors in those changes
- * </ul>
- * Contractually, here are the methods called by the main page of the new filter wizard:
- * <ul>
- * <li>addChangeListener ... no need to ever override
- * <li>setSystemFilterPoolReferenceManagerProvider ... no need to ever override
- * <li>setType ... no need to ever override
- * <li>setFilterStringValidator ... no need to ever override
- * <li>isComplete ... no need to ever override
- * <li>createContents ... you will typically override
- * <li>verify ... you will typically override
- * <li>getInitialFocusControl ... you will typically override
- * <li>getFilterString ... you will typically override
- * <li>areFieldsComplete ... you will typically override
- * </ul>
- */
-public class SystemFilterStringEditPane implements SelectionListener
-{
- // inputs
- protected Shell shell;
- protected String inputFilterString;
- protected Vector listeners = new Vector();
- protected ISystemFilterPoolReferenceManagerProvider refProvider = null;
- protected ISystemFilterPoolManagerProvider provider = null;
- protected String type;
- protected boolean newMode = true;
- protected boolean changeFilterMode = false;
- protected boolean ignoreChanges;
- //protected boolean editable = true;
-
- // default GUI
- protected Label labelString;
- protected Text textString;
- protected Button dlgTestButton;
- // state
- protected SystemMessage errorMessage;
- protected boolean skipEventFiring;
- protected int currentSelectionIndex;
-
- /**
- * Constructor for SystemFilterStringEditPane.
- * @param shell - the shell of the wizard or dialog host this
- */
- public SystemFilterStringEditPane(Shell shell)
- {
- super();
- this.shell = shell;
-
- }
-
- // ------------------------------
- // HELPER METHODS...
- // ------------------------------
-
- /**
- * <i>Helper method. Do not override.</i><br>
- * Return the shell given us in the ctor
- */
- protected Shell getShell()
- {
- return shell;
- }
- /**
- * <i>Helper method. Do not override.</i><br>
- * Return the input filter string as given us in setFilterString
- */
- protected String getInputFilterString()
- {
- return inputFilterString;
- }
-
- /**
- * <i>Helper method. Do not override.</i><br>
- * Add a separator line. This is a physically visible line.
- */
- protected void addSeparatorLine(Composite parent, int nbrColumns)
- {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- separator.setLayoutData(data);
- }
- /**
- * <i>Helper method. Do not override.</i><br>
- * Add a spacer line
- */
- protected void addFillerLine(Composite parent, int nbrColumns)
- {
- Label filler = new Label(parent, SWT.LEFT);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- filler.setLayoutData(data);
- }
- /**
- * <i>Helper method. Do not override.</i><br>
- * Add a spacer line that grows in height to absorb extra space
- */
- protected void addGrowableFillerLine(Composite parent, int nbrColumns)
- {
- Label filler = new Label(parent, SWT.LEFT);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- data.verticalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- filler.setLayoutData(data);
- }
- // ------------------------------
- // CONFIGURATION/INPUT METHODS...
- // ------------------------------
- /**
- * <i>Configuration method, called from Change Filter dialog and New Filter wizard. Do not override.</i><br>
- * Set the input filter string, in edit mode.
- * Or pass null if reseting to new mode.
- * @param filterString - the filter string to edit or null if new mode
- * @param selectionIndex - the index of the currently selected filter string. Only used for getCurrentSelectionIndex().
- */
- public void setFilterString(String filterString, int selectionIndex)
- {
- this.inputFilterString = filterString;
- this.currentSelectionIndex = selectionIndex;
- newMode = (filterString == null);
- setIgnoreChanges(true);
- resetFields();
- clearErrorsPending();
- if (inputFilterString != null)
- doInitializeFields();
- setIgnoreChanges(false);
- }
-
- /**
- * <i>Configuration method, called from Change Filter dialog and New Filter wizard. Do not override.</i><br>
- * Set the input filter string only without any initialzing.
- */
- public void setInputFilterString(String filterString)
- {
- this.inputFilterString = filterString;
- }
-
-
- /**
- * <i>Lifecyle method. Call, but do not override.</i><br>
- * Turn on ignore changes mode. Subclasses typically can just query the inherited
- * field ignoreChanges, unless they need to set the ignoreChanges mode in their
- * own composite widgets, in which case they can override and intercept this.
- */
- protected void setIgnoreChanges(boolean ignoreChanges)
- {
- this.ignoreChanges = ignoreChanges;
- }
-
- /**
- * <i>Configuration method, called from Change Filter dialog and New Filter wizard. Do not override.</i><br>
- * Identify a listener interested in any changes made to the filter string,
- * as they happen
- */
- public void addChangeListener(ISystemFilterStringEditPaneListener l)
- {
- listeners.add(l);
- }
- /**
- * <i>Configuration method, called from Change Filter dialog and New Filter wizard. Do not override.</i><br>
- * Remove a listener interested in any changes made to the filter string,
- * as they happen
- */
- public void removeChangeListener(ISystemFilterStringEditPaneListener l)
- {
- listeners.remove(l);
- }
- /**
- * <i>Configuration method, called from Change Filter dialog and New Filter wizard. Do not override.</i><br>
- * Sets the contextual system filter pool reference manager provider. That is, it will
- * be the currently selected subsystem if New Filter is launched from a subsystem.
- * <p>
- * Will be non-null if the current selection is a reference to a
- * filter pool or filter, or a reference manager provider.
- * <p>
- * This is not used by default but made available for subclasses.
- * @see #setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider)
- */
- public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
- {
- this.refProvider = provider;
- }
- /**
- * <i>Configuration method, called from Change Filter dialog and New Filter wizard. Do not override.</i><br>
- * Sets the contextual system filter pool manager provider. That is, it will
- * be the subsystem factory of the given subsystem, filter pool or filter. Used
- * when there is no way to set setSystemFilterPoolReferenceManagerProvider, because
- * there isn't one derivable from the selection.
- * <p>
- * Will be non-null if the current selection is a reference to a
- * filter pool or filter, or a filter pool or filter, or a manager provider itself.
- * <p>
- * This is not used by default but made available for subclasses.
- * @see #setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider)
- */
- public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider provider)
- {
- this.provider = provider;
- }
-
- /**
- * <i>Getter method, for the use of subclasses. Do not override.</i><br>
- * Return the contextual system filter pool reference manager provider (ie subsystem) that
- * this was launched from. Will be null if not launched from a subsystem, or reference to a
- * filter pool or filter.
- * <p>
- * This is not used by default but made available for subclasses.
- */
- public ISystemFilterPoolReferenceManagerProvider getSystemFilterPoolReferenceManagerProvider()
- {
- return refProvider;
- }
- /**
- * <i>Getter method, for the use of subclasses. Do not override.</i><br>
- * Return the contextual system filter pool manager provider (ie subsystemFactory) that
- * this was launched from. Will be null if not launched from a subsystem factory, or
- * a filter pool or filter (or reference).
- * <p>
- * This is not used by default but made available for subclasses.
- */
- public ISystemFilterPoolManagerProvider getSystemFilterPoolManagerProvider()
- {
- return provider;
- }
-
- /**
- * <i>Helper method you do not need to ever override.</i><br>
- * Set the type of filter we are creating. Types are not used by the base filter
- * framework but are a way for tools to create typed filters and have unique
- * actions per filter type.
- * <p>
- * This simply sets the <samp>type</samp> instance variable, so that subclassing code may
- * access it if it needs to know what type of filter is being created. This method is
- * called by the setType method in the SystemNewFilterWizard wizard.
- */
- public void setType(String type)
- {
- this.type = type;
- }
-
- /**
- * <i>Configuration method, called from Change Filter dialog. Do not override.</i><br>
- * Called by Change Filter dialog to set on our changeFilterMode flag in case we wish to
- * distinguish between new filter and change filter modes
- */
- public void setChangeFilterMode(boolean changeMode)
- {
- this.changeFilterMode = changeMode;
- }
- /**
- * <i>Configuration method, called from Change Filter dialog and New Filter wizard. Do not override.</i><br>
- * Called by Change Filter dialog or New Filter wizard when caller has indicated
- * they want a test button. This is used to set the testButton instance variable.
- * Subclasses show enable/disable it as changes are made, according to valid state.
- */
- public void setTestButton(Button button)
- {
- this.dlgTestButton = button;
- }
- /**
- * <i><b>Overridable</b> method, if subclass supports a Test button.</i><br>
- * Called by owning dialog when common Test button is pressed.
- * Does nothing by default.
- */
- public void processTest(Shell shell)
- {
- System.out.println("Someone forgot to override processTest in SystemFilterStringEditPane!"); //$NON-NLS-1$
- }
-
- /*
- * Set if the edit pane is not to be editable
- *
- public void setEditable(boolean editable)
- {
- this.editable = editable;
- }*/
- /*
- * Return whether the edit pane is editable, as set by {@link #setEditable(boolean)}
- *
- public boolean getEditable()
- {
- return editable;
- }*/
-
- // ------------------------------
- // DATA EXTRACTION METHODS
- // ------------------------------
-
- /**
- * <i><b>Overridable</b> getter method.</i><br>
- * Get the filter string in its current form.
- * This should be overridden if createContents is overridden.
- * <p>This is the functional opposite of doInitializeFields, which tears apart the input string in update mode,
- * to populate the GUIs. This method creates the filter string from the information in the GUI.
- */
- public String getFilterString()
- {
- if (textString != null)
- return textString.getText().trim();
- else
- return inputFilterString;
- }
- /**
- * <i>Getter method. Do not override.</i><br>
- * Get the selection index of the filter string we are currently editing.
- * Used in Change Filter dialog.
- */
- public int getCurrentSelectionIndex()
- {
- return currentSelectionIndex;
- }
-
- /**
- * <i><b>Overridable</b> getter method.</i><br>
- * For page 2 of the New Filter wizard, if it is possible to
- * deduce a reasonable default name from the user input here,
- * then return it here. Else, just return null (the default).
- */
- public String getDefaultFilterName()
- {
- return null;
- }
-
- /**
- * <i><b>Overridable</b> configuration method, called from Change Filter dialog and New Filter wizard.</i><br>
- * <b>YOU MUST TEST IF THE GIVEN LABEL IS NULL!</b><br>
- * In the Change Filter dialog, this edit pane is shown on the right side, beside
- * the filter string selection list. Above it is a label, that shows something
- * like "Selected Filter String" in edit mode, or "New Filter String" in new mode.
- * <p>
- * This method gives subclasses the opportunity to specify unique values for this label.
- * In addition to setting the text, the tooltip text should also be set.
- * <p>
- * Defaults are supplied.
- */
- public void configureHeadingLabel(Label label)
- {
- if (label == null)
- return;
- if (!newMode)
- {
- label.setText(SystemResources.RESID_CHGFILTER_FILTERSTRING_LABEL);
- label.setToolTipText(SystemResources.RESID_CHGFILTER_FILTERSTRING_TOOLTIP);
- }
- else
- {
- label.setText(SystemResources.RESID_CHGFILTER_NEWFILTERSTRING_LABEL);
- label.setToolTipText(SystemResources.RESID_CHGFILTER_NEWFILTERSTRING_TOOLTIP);
- }
- }
-
- // ------------------------------
- // LIFECYCLE METHODS...
- // ------------------------------
-
- /**
- * <i><b>Overridable</b> lifecycle method.</i><br>
- * Populate the pane with the GUI widgets. This is where we populate the client area.
- * @param parent - the composite that will be the parent of the returned client area composite
- * @return Control - a client-area composite populated with widgets.
- *
- * @see org.eclipse.rse.ui.SystemWidgetHelpers
- */
- public Control createContents(Composite parent)
- {
-
- // Inner composite
- int nbrColumns = 1;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- ((GridLayout)composite_prompts.getLayout()).marginWidth = 0;
-
- // FILTER STRING PROMPT
- textString = SystemWidgetHelpers.createLabeledTextField(composite_prompts,null,getFilterStringPromptLabel(), getFilterStringPromptTooltip());
- labelString = SystemWidgetHelpers.getLastLabel();
- ((GridData)textString.getLayoutData()).widthHint=300;
-
- resetFields();
- doInitializeFields();
-
- textString.setFocus();
-
- // add keystroke listeners...
- textString.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateStringInput();
- }
- }
- );
- return composite_prompts;
- }
- /**
- * <i><b>Overridable</b> lifecycle method.</i><br>
- * Return the control to recieve initial focus. Should be overridden if you override createContents
- */
- public Control getInitialFocusControl()
- {
- return textString;
- }
-
-
-
-
- protected String getFilterStringPromptLabel()
- {
- return SystemResources.RESID_FILTERSTRING_STRING_LABEL;
- }
-
- protected String getFilterStringPromptTooltip()
- {
- return SystemResources.RESID_FILTERSTRING_STRING_TIP;
- }
-
- /**
- * <i><b>Overridable</b> lifecycle method.</i><br>
- * Initialize the input fields based on the inputFilterString, and perhaps refProvider.
- * This can be called before createContents, so test for null widgets first!
- * Prior to this being called, resetFields is called to set the initial default state prior to input
- */
- protected void doInitializeFields()
- {
- if (textString == null)
- return; // do nothing
- if (inputFilterString != null)
- textString.setText(inputFilterString);
- }
- /**
- * <i><b>Overridable</b> lifecycle method.</i><br>
- * This is called in the change filter dialog when the user selects "new", or selects another string.
- * You must override this if you override createContents. Be sure to test if the contents have even been created yet!
- */
- protected void resetFields()
- {
- if (textString != null)
- {
- textString.setText(""); //$NON-NLS-1$
- }
- }
- /**
- * <i>Lifecycle method. Do not override.</i><br>
- * Instead, override {@link #areFieldsComplete()}.
- * <p>
- * This is called by the wizard page when first shown, to decide if the default information
- * is complete enough to enable finish. It doesn't do validation, that will be done when
- * finish is pressed.
- */
- public boolean isComplete()
- {
- boolean complete = true;
- if (errorMessage != null) // pending errors?
- complete = false; // clearly not complete.
- else
- complete = areFieldsComplete();
- if (dlgTestButton != null)
- dlgTestButton.setEnabled(complete);
- return complete;
- }
- /**
- * <i><b>Overridable</b> lifecycle method.</i><br>
- * Must be overridden if createContents is overridden.
- * <p>
- * This is called by the isComplete, to decide if the default information
- * is complete enough to enable finish. It doesn't do validation, that will be done when
- * finish is pressed.
- */
- protected boolean areFieldsComplete()
- {
- if (textString == null)
- return false;
- else
- return (textString.getText().trim().length()>0);
- }
-
- /**
- * <i>Lifecycle method. Do not override.</i><br>
- * Are errors pending? Used in Change Filter dialog to prevent changing the filter string selection
- */
- public boolean areErrorsPending()
- { // d45795
- return (errorMessage != null);
- }
- /**
- * <i>Lifecycle method. Do not override.</i><br>
- * Clear any errors pending. Called when Reset is pressed.
- */
- public void clearErrorsPending()
- {
- errorMessage = null;
- }
-
- // ------------------------------
- // PRIVATE METHODS
- // ------------------------------
- /**
- * <i><b>Private</b> method. Do not call or override.</i><br>
- * Fire an event to all registered listeners, that the user has changed the
- * filter string. Include the error message, if in error, so it can be displayed to the user.
- * <p>
- * Because this is used to enable/disable the Next and Finish buttons it is important
- * to call it when asked to do verification, even if nothing has changed.
- * <p>
- * It is more efficient, however, to defer the event firing during a full verification
- * until after the last widget has been verified. To enable this, set the protected
- * variable "skipEventFiring" to true at the top of your verify event, then to "false"
- * at the end. Then do fireChangeEvent(errorMessage);
- */
- protected void fireChangeEvent(SystemMessage error)
- {
- if (skipEventFiring)
- return;
- for (int idx=0; idx<listeners.size(); idx++)
- {
- ISystemFilterStringEditPaneListener l = (ISystemFilterStringEditPaneListener)listeners.elementAt(idx);
- l.filterStringChanged(error);
- }
- }
-
- /**
- * Tell interested callers to backup changes-pending state, as we are about
- * to fire a change event, after which we will want to restore state.
- */
- protected void fireBackupChangeEvent()
- {
- for (int idx=0; idx<listeners.size(); idx++)
- {
- ISystemFilterStringEditPaneListener l = (ISystemFilterStringEditPaneListener)listeners.elementAt(idx);
- l.backupChangedState();
- }
- }
- /**
- * <i><b>Private</b> method. Do not call or override.</i><br>
- * Tell interested callers to restore changes-pending state, as we are done
- * firing a change event and in this case we don't want that state change side effect.
- */
- protected void fireRestoreChangeEvent()
- {
- for (int idx=0; idx<listeners.size(); idx++)
- {
- ISystemFilterStringEditPaneListener l = (ISystemFilterStringEditPaneListener)listeners.elementAt(idx);
- l.restoreChangedState();
- }
- }
- // ---------------------------------------------
- // METHODS FOR VERIFYING INPUT PER KEYSTROKE ...
- // ---------------------------------------------
- /**
- * <i><b>Overridable</b> lifecycle method.</i><br>
- * Validates filter string as entered so far in the text field.
- * Not called if you override createContents() and verify()
- */
- protected SystemMessage validateStringInput()
- {
- if (ignoreChanges)
- return errorMessage;
- errorMessage= null;
- //if (validator != null)
- // errorMessage = validateFilterString(textString.getText());
- if ((textString!=null) && (textString.getText().trim().length() == 0))
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_EMPTY);
- fireChangeEvent(errorMessage);
- //setPageComplete();
- //setErrorMessage(errorMessage);
- return errorMessage;
- }
-
- /*
- * Validates filter string using the supplied generic validator.
- * Child classes who do their own syntax validation can call this method
- * to also do uniqueness validation. They are responsible for calling fireChangeEvent though.
- * @see #setFilterStringValidator(ISystemValidator)
- *
- protected SystemMessage validateFilterString(String filterString)
- {
- if (validator != null)
- return validator.validate(filterString);
- else
- return null;
- }*/
-
- // ---------------------------------
- // METHODS FOR VERIFICATION...
- // ---------------------------------
-
- /**
- * <i><b>Overridable</b> lifecycle method.</i><br>
- * Does complete verification of input fields. If this
- * method returns null, there are no errors and the dialog or wizard can close.
- * <p>Default implementation calls {@link #validateStringInput()}.
- *
- * @return error message if there is one, else null if ok
- */
- public SystemMessage verify()
- {
- errorMessage = null;
- Control controlInError = null;
- errorMessage = validateStringInput();
- if (errorMessage != null)
- controlInError = textString;
- if (errorMessage != null)
- {
- if (controlInError != null)
- controlInError.setFocus();
- }
- //setPageComplete();
- return errorMessage;
- }
-
- // ------------------
- // EVENT LISTENERS...
- // ------------------
-
- /**
- * <i><b>Overridable</b> lifecycle method.</i><br>
- * User has selected something
- */
- public void widgetSelected(SelectionEvent event)
- {
- }
- /**
- * <i><b>Overridable</b> lifecycle method.</i><br>
- * User has selected something via enter/dbl-click
- */
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
-
-
- // -----------------------
- // Saving related method
- // -----------------------
- /**
- * Returns whether filter string can be saved implicitly. This is called in the Change dialog
- * and property page to check whether filter string can be saved if the user does not
- * explicitly click on Create/Apply button. So, for example, if this method returns <code>false</code>,
- * and the user has pending changes when he clicks on another entry in the filter string list, we will
- * not ask user to save pending changes.
- * By default, returns <code>true</code>
- * @return <code>true</code> to query user to save pending changes, <code>false</code> otherwise.
- */
- public boolean canSaveImplicitly() {
- return true;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 13b4690fa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterUIHelpers.java
+++ /dev/null
@@ -1,170 +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.filters;
-import java.util.Vector;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-
-
-/**
- *
- */
-public class SystemFilterUIHelpers
-{
-
- /**
- * Find element corresponding to given data
- */
- public static SystemSimpleContentElement getDataElement(SystemSimpleContentElement root, Object data)
- {
- SystemSimpleContentElement[] children = root.getChildren();
- SystemSimpleContentElement match = null;
- if ((children!=null)&&(children.length>0))
- {
- for (int idx=0; (match==null)&&(idx<children.length); idx++)
- if (children[idx].getData() == data)
- match = children[idx];
- }
- if ((match==null)&&(children!=null)&&(children.length>0))
- {
- for (int idx=0; (match==null)&&(idx<children.length); idx++)
- match = getDataElement(children[idx], data);
- }
- return match;
- }
-
- /**
- * Create and return data model to populate selection tree with
- */
- public static SystemSimpleContentElement getFilterPoolModel(ISystemFilterPoolManagerProvider mgrProvider,
- ISystemFilterPoolManager mgrs[])
- {
- SystemSimpleContentElement veryRootElement =
- new SystemSimpleContentElement("Filter pools", //$NON-NLS-1$
- null, null, (Vector)null);
- veryRootElement.setRenamable(false);
- veryRootElement.setDeletable(false);
-
- if (mgrs == null)
- return veryRootElement;
-
- Vector veryRootChildren = new Vector();
- for (int idx=0; idx<mgrs.length; idx++)
- {
- SystemSimpleContentElement rootElement =
- new SystemSimpleContentElement(mgrs[idx].getName(),
- mgrs[idx], veryRootElement, (Vector)null);
- rootElement.setRenamable(false);
- rootElement.setDeletable(false);
- rootElement.setImageDescriptor(getFilterPoolManagerImage(mgrProvider, mgrs[idx]));
- Vector elements = new Vector();
- ISystemFilterPool[] pools = mgrs[idx].getSystemFilterPools();
- populateFilterPoolContentElementVector(pools, elements, rootElement);
- rootElement.setChildren(elements);
- veryRootChildren.addElement(rootElement);
- }
- veryRootElement.setChildren(veryRootChildren);
- return veryRootElement;
- }
-
- /**
- * Internal use only
- */
- protected static void populateFilterPoolContentElementVector(ISystemFilterPool[] pools,
- Vector elements,
- SystemSimpleContentElement parentElement)
- {
- for (int idx=0; idx<pools.length; idx++)
- {
- ISystemFilterPool pool = pools[idx];
- SystemSimpleContentElement cElement =
- new SystemSimpleContentElement(pool.getName(), pool, parentElement, (Vector)null);
- cElement.setImageDescriptor(getFilterPoolImage(pool.getProvider(),pool));
- cElement.setDeletable(pool.isDeletable());
- cElement.setRenamable(!pool.isNonRenamable());
- cElement.setReadOnly(pool.getOwningParentName()!=null);
- //cElement.setSelected(setFilterPoolSelection(pool));
- elements.addElement(cElement);
- }
- }
-
-
- /**
- * Get the filter pool manager image
- */
- public static ImageDescriptor getFilterPoolManagerImage(ISystemFilterPoolManagerProvider poolMgrProvider, ISystemFilterPoolManager poolMgr)
- {
- ImageDescriptor poolMgrImage = null;
- if (poolMgrProvider == null)
- poolMgrProvider = poolMgr.getProvider();
- if (poolMgrProvider != null)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)poolMgrProvider.getAdapter(ISubSystemConfigurationAdapter.class);
- poolMgrImage = adapter.getSystemFilterPoolManagerImage();
- }
- if (poolMgrImage == null)
- poolMgrImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID);
- return poolMgrImage;
- }
-
-
- /**
- * Get the filter pool image
- */
- public static ImageDescriptor getFilterPoolImage(ISystemFilterPoolManagerProvider poolMgrProvider, ISystemFilterPool pool)
- {
- ImageDescriptor poolImage = null;
- if (poolMgrProvider == null)
- poolMgrProvider = pool.getProvider();
- if (poolMgrProvider != null)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)poolMgrProvider.getAdapter(ISubSystemConfigurationAdapter.class);
- poolImage = adapter.getSystemFilterPoolImage(pool);
- }
- if (poolImage == null)
- poolImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID);
- return poolImage;
- }
-
- /**
- * Get the filter image
- */
- public static ImageDescriptor getFilterImage(ISystemFilterPoolManagerProvider poolMgrProvider, ISystemFilter filter)
- {
- ImageDescriptor filterImage = null;
- if (poolMgrProvider == null)
- poolMgrProvider = filter.getProvider();
- if (poolMgrProvider != null)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)poolMgrProvider.getAdapter(ISubSystemConfigurationAdapter.class);
- filterImage = adapter.getSystemFilterImage(filter);
- }
- if (filterImage == null)
- filterImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID);
- return filterImage;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterWorkWithFilterPoolsTreeViewer.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterWorkWithFilterPoolsTreeViewer.java
deleted file mode 100644
index d31a7f0f4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterWorkWithFilterPoolsTreeViewer.java
+++ /dev/null
@@ -1,190 +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.filters;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterWorkWithFilterPoolsDialog;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-
-
-/**
- * This subclass of the standard JFace tree viewer is used to
- * show a tree view of filter pools within filterpool managers,
- * for a work-with experience.
- */
-public class SystemFilterWorkWithFilterPoolsTreeViewer
- extends TreeViewer
- implements IMenuListener
-{
-
- private SystemFilterWorkWithFilterPoolsDialog caller;
- private Shell shell;
- private IAction[] contextMenuActions;
- private MenuManager menuMgr;
-
- /**
- * Constructor for SystemFilterWorkWithFilterPoolsTreeViewer
- */
- public SystemFilterWorkWithFilterPoolsTreeViewer(Shell shell, SystemFilterWorkWithFilterPoolsDialog caller, Composite arg0)
- {
- super(arg0);
- init(shell, caller);
- }
-
- /**
- * Constructor for SystemFilterWorkWithFilterPoolsTreeViewer
- */
- public SystemFilterWorkWithFilterPoolsTreeViewer(Shell shell, SystemFilterWorkWithFilterPoolsDialog caller, Composite arg0, int arg1)
- {
- super(arg0, arg1);
- init(shell, caller);
- }
-
- /**
- * Constructor for SystemFilterWorkWithFilterPoolsTreeViewer
- */
- public SystemFilterWorkWithFilterPoolsTreeViewer(Shell shell,
- SystemFilterWorkWithFilterPoolsDialog caller,
- Tree tree)
- {
- super(tree);
- init(shell, caller);
- }
-
- /**
- * Initialize
- */
- public void init(Shell shell, SystemFilterWorkWithFilterPoolsDialog caller)
- {
- this.caller = caller;
- this.shell = shell;
- // -----------------------------
- // Enable right-click popup menu
- // -----------------------------
- menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(this);
- Menu menu = menuMgr.createContextMenu(getTree());
- getTree().setMenu(menu);
- }
-
- /**
- * Set the context menu actions to show in the popup
- */
- public void setContextMenuActions(IAction[] actions)
- {
- this.contextMenuActions = actions;
- }
-
- /**
- * Override of refresh from parent
- */
- public void refresh()
- {
- if (!caller.refreshTree())
- super.refresh();
- //super.refresh();
- }
-
- /**
- * Called when the context menu is about to open.
- */
- public void menuAboutToShow(IMenuManager menu)
- {
- ISystemAction ourAction = null;
- if (contextMenuActions != null)
- {
- //SystemMenuManager ourMenu = createStandardGroups(menu);
- SystemView.createStandardGroups(menu);
- SystemMenuManager ourMenu = new SystemMenuManager(menu);
- for (int idx=0; idx<contextMenuActions.length; idx++)
- {
- if (contextMenuActions[idx] instanceof ISystemAction)
- {
- ourAction = (ISystemAction)contextMenuActions[idx];
- ourMenu.add(ISystemContextMenuConstants.GROUP_REORGANIZE, ourAction);
-
- if (ourAction instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager)ourAction;
- item.setShell(shell);
- item.setSelection(getSelection());
- }
- }
- else
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, ourAction);
- }
- }
- }
-
- /*
- * Creates the Systems plugin standard groups in a context menu.
- *
- public SystemMenuManager createStandardGroups(IMenuManager menu)
- {
- if (menu.isEmpty())
- {
- // simply sets partitions in the menu, into which actions can be directed.
- // Each partition can be delimited by a separator (new Separator) or not (new GroupMarker).
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_NEW)); // new->
- //menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GOTO)); // goto into, go->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_EXPANDTO)); // expand TO->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPENWITH)); // open with->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPEN)); // open xxx
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_SHOW)); // show->type hierarchy, in-navigator
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_BUILD)); // build, rebuild, refresh
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CHANGE)); // update, change
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORGANIZE)); // rename,move,copy,delete,bookmark,refactoring
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORDER)); // move up, move down
- //menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GENERATE)); // getters/setters, etc. Typically in editor
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_SEARCH)); // search
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CONNECTION)); // user or BP/ISV additions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_STARTSERVER)); // start/stop remote server actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_IMPORTEXPORT)); // get or put actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADAPTERS)); // actions queried from adapters
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_VIEWER_SETUP)); // ? Probably View->by xxx, yyy
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_PROPERTIES)); // Properties
- }
- return new SystemMenuManager(menu);
- }*/
-
- /**
- * Private helper method to add an Action to a given menu.
- * To give the action the opportunity to grey out, we call selectionChanged, but
- * only if the action implements ISelectionChangedListener
- */
- protected void menuAdd(MenuManager menu, IAction action)
- {
- if (action instanceof ISelectionChangedListener)
- ((ISelectionChangedListener)action).selectionChanged(new SelectionChangedEvent(this,getSelection()));
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/ISystemNewFilterActionConfigurator.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/ISystemNewFilterActionConfigurator.java
deleted file mode 100644
index b91a306da..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/ISystemNewFilterActionConfigurator.java
+++ /dev/null
@@ -1,40 +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.filters.actions;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * Sometimes configuring a filter action can take a reasonably substantial amount of
- * processing. For this reason, we would desire to defer that configuration, when simply
- * filling a popup menu, until such time as the user has select to run the action. This
- * reduces time and memory in the vast majority of cases.
- * <p>
- * To achieve this, code which populates a context menu can implement this interface, and
- * pass it to the new filter wizard action. That action will then call back to the caller
- * via this interface, when the action is run.
- */
-public interface ISystemNewFilterActionConfigurator
-{
-
- /**
- * The user has selected to run this action. Please configure it!
- * @param newFilterAction - the action to be configured
- * @param callerData - context data that you supplied when registering this callback
- */
- public void configureNewFilterAction(ISubSystemConfiguration factory, SystemNewFilterAction newFilterAction, Object callerData);
-} \ No newline at end of file
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
deleted file mode 100644
index a28d5c113..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.filters.actions;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.filters.SystemFilterStringEditPane;
-import org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action that displays the Change Filter dialog
- */
-public class SystemChangeFilterAction extends SystemBaseDialogAction
-
-{
-
- private SystemChangeFilterDialog dlg = null;
- private String dlgTitle = null;
- private SystemFilterStringEditPane editPane;
-
- /**
- * Constructor for default action label and image
- */
- public SystemChangeFilterAction(Shell parent)
- {
- this( parent, SystemResources.ACTION_UPDATEFILTER_LABEL, SystemResources.ACTION_UPDATEFILTER_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CHANGEFILTER_ID));
- }
-
- public SystemChangeFilterAction(Shell parent, String label, String tooltip)
- {
- this(parent, label, tooltip, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CHANGEFILTER_ID));
- }
-
- public SystemChangeFilterAction(Shell parent, String label, String tooltip, ImageDescriptor image)
- {
- super(label, tooltip, image, parent);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
- setHelp(RSEUIPlugin.HELPPREFIX+"acfr0000"); //$NON-NLS-1$
- }
-
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseDialogAction #setDialogHelp(String)
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
- /**
- * Set the title for the dialog that displays
- */
- public void setDialogTitle(String title)
- {
- this.dlgTitle = title;
- }
- /**
- * Set the help id for the dialog that displays
- */
- public void setDialogHelpContextId(String id)
- {
- setDialogHelp(id);
- }
- /**
- * Specify an edit pane that prompts the user for the contents of a filter string.
- */
- public void setFilterStringEditPane(SystemFilterStringEditPane editPane)
- {
- this.editPane = editPane;
- }
- /**
- * Return the edit pane specified via {@link #setFilterStringEditPane(SystemFilterStringEditPane)}
- */
- public SystemFilterStringEditPane getFilterStringEditPane()
- {
- return editPane;
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- //System.out.println("checkObjectType: " + (selectedObject instanceof SystemFilterReference));
- if (selectedObject instanceof ISystemFilter)
- {
- return !((ISystemFilter)selectedObject).isNonChangable();
- }
- else if (selectedObject instanceof ISystemFilterReference)
- {
- return !((ISystemFilterReference)selectedObject).getReferencedFilter().isNonChangable();
- }
- else
- return false;
- }
-
- /**
- * This method creates and configures the filter dialog. It defers to
- * {@link #getFilterDialog(Shell)} to create it, and then configures it here.
- * So, do not override this, but do feel free to override getFilterDialog.
- */
- public Dialog createDialog(Shell shell)
- {
- dlg = getFilterDialog(shell);
- dlg.setSystemFilterPoolReferenceManagerProvider(getSystemFilterPoolReferenceManagerProvider());
- dlg.setSystemFilterPoolManagerProvider(getSystemFilterPoolManagerProvider());
- if (editPane != null)
- dlg.setFilterStringEditPane(editPane);
- configureFilterDialog(dlg);
- ISystemFilter filter = getSelectedFilter();
- if (filter != null)
- if (filter.isSingleFilterStringOnly())
- dlg.setSupportsMultipleStrings(false);
- return dlg;
- }
-
- /**
- * Overridable extension point to get our filter dialog. Only override this if you
- * subclass SystemChangeFilterDialog. Else, override configureFilterDialog.
- */
- protected SystemChangeFilterDialog getFilterDialog(Shell shell)
- {
- if (dlgTitle == null)
- return new SystemChangeFilterDialog(shell);
- else
- return new SystemChangeFilterDialog(shell, dlgTitle);
- }
-
- /**
- * This method is called internally, but had to be made public. You can ignore it.
- */
- public void callConfigureFilterDialog(SystemChangeFilterDialog dlg)
- {
- configureFilterDialog(dlg);
- }
-
- /**
- * Overridable extension point to configure the filter dialog. Typically you don't need
- * to subclass our default dialog.
- * <p>
- * Note since the dialog has not been opened yet, you cannot assume its shell is ready,
- * so call getParentShell() versus getShell().
- */
- protected void configureFilterDialog(SystemChangeFilterDialog dlg)
- {
- Shell shell = dlg.getShell();
- if (shell == null)
- shell = dlg.getParentShell();
- // code goes here...
- }
-
- /**
- * Required by parent but we do not use it so return null;
- */
- protected Object getDialogValue(Dialog dlg)
- {
- return null;
- }
-
- /**
- * Get the contextual system filter pool reference manager provider. Will return non-null if the
- * current selection is not a reference to a filter pool or filter, or a reference manager
- * provider.
- */
- public ISystemFilterPoolReferenceManagerProvider getSystemFilterPoolReferenceManagerProvider()
- {
- Object firstSelection = getFirstSelection();
- if (firstSelection != null)
- {
- if (firstSelection instanceof ISystemFilterReference)
- return ((ISystemFilterReference)firstSelection).getProvider();
- else if (firstSelection instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference)firstSelection).getProvider();
- else if (firstSelection instanceof ISystemFilterPoolReferenceManagerProvider)
- return (ISystemFilterPoolReferenceManagerProvider)firstSelection;
- }
- return null;
- }
- /**
- * Get the contextual system filter pool manager provider. Will return non-null if the
- * current selection is not a reference to a filter pool or filter, or a reference manager
- * provider, or a manager provider.
- */
- public ISystemFilterPoolManagerProvider getSystemFilterPoolManagerProvider()
- {
- Object firstSelection = getFirstSelection();
- if (firstSelection != null)
- {
- if (firstSelection instanceof ISystemFilterReference)
- return ((ISystemFilterReference)firstSelection).getReferencedFilter().getProvider();
- else if (firstSelection instanceof ISystemFilter)
- return ((ISystemFilter)firstSelection).getProvider();
- else if (firstSelection instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference)firstSelection).getReferencedFilterPool().getProvider();
- else if (firstSelection instanceof ISystemFilterPool)
- return ((ISystemFilterPool)firstSelection).getProvider();
- else if (firstSelection instanceof ISystemFilterPoolManagerProvider)
- return (ISystemFilterPoolManagerProvider)firstSelection;
- }
- return null;
- }
-
- /**
- * Get the selected filter
- */
- public ISystemFilter getSelectedFilter()
- {
- Object firstSelection = getFirstSelection();
- if (firstSelection != null)
- {
- if (firstSelection instanceof ISystemFilterReference)
- return ((ISystemFilterReference)firstSelection).getReferencedFilter();
- else if (firstSelection instanceof ISystemFilter)
- return ((ISystemFilter)firstSelection);
- }
- return null;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 9473c7686..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionCopyString.java
+++ /dev/null
@@ -1,68 +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.filters.actions;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * The action is used within the Change Filter dialog, in the context menu of the selected filter string.
- * It is used to copy the selected filter string to the clipboard for subsequent paste.
- */
-public class SystemChangeFilterActionCopyString extends SystemBaseAction
-
-{
- private SystemChangeFilterPane parentDialog;
-
- /**
- * Constructor
- */
- public SystemChangeFilterActionCopyString(SystemChangeFilterPane parentDialog)
- {
- super(SystemResources.ACTION_COPY_FILTERSTRING_LABEL,SystemResources.ACTION_COPY_FILTERSTRING_TOOLTIP,
- PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY),
- null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX+"dufr2000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is isn't the "new" filter string
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- return parentDialog.canCopy();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run()
- {
- parentDialog.doCopy();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 9cb0fbf87..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionDeleteString.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.filters.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-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;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * The action is used within the Change Filter dialog, in the context menu of the selected filter string.
- * It is used to delete the selected filter string
- */
-public class SystemChangeFilterActionDeleteString extends SystemBaseAction
-
-{
-
- private SystemChangeFilterPane parentDialog;
-
- /**
- * Constructor
- */
- public SystemChangeFilterActionDeleteString(SystemChangeFilterPane parentDialog)
- {
- super(SystemResources.ACTION_DELETE_LABEL,SystemResources.ACTION_DELETE_TOOLTIP,
- PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)
- ,null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX+"dufr1000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is isn't the "new" filter string
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- return parentDialog.canDelete();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run()
- {
- parentDialog.doDelete();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 94703ee8a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringDown.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.filters.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-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;
-
-
-/**
- * The action is used within the Change Filter dialog, in the context menu of the selected filter string.
- * It is used to move the selected filter string up by one in the list
- */
-public class SystemChangeFilterActionMoveStringDown extends SystemBaseAction
-{
-
- private SystemChangeFilterPane parentDialog;
-
- /**
- * Constructor
- */
- public SystemChangeFilterActionMoveStringDown(SystemChangeFilterPane parentDialog)
- {
- super(SystemResources.ACTION_MOVEDOWN_LABEL,SystemResources.ACTION_MOVEDOWN_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID),
- null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- setHelp(RSEUIPlugin.HELPPREFIX+"dufr5000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is isn't the last filter string in the list
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- return parentDialog.canMoveDown();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run()
- {
- parentDialog.doMoveDown();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 7ed44c481..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringUp.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.filters.actions;
-
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-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;
-
-
-/**
- * The action is used within the Change Filter dialog, in the context menu of the selected filter string.
- * It is used to move the selected filter string down by one in the list
- */
-public class SystemChangeFilterActionMoveStringUp extends SystemBaseAction
-{
-
- private SystemChangeFilterPane parentDialog;
-
- /**
- * Constructor
- */
- public SystemChangeFilterActionMoveStringUp(SystemChangeFilterPane parentDialog)
- {
- super(SystemResources.ACTION_MOVEUP_LABEL,SystemResources.ACTION_MOVEUP_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID),
- null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- setHelp(RSEUIPlugin.HELPPREFIX+"dufr4000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is isn't the fist filter string
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- return parentDialog.canMoveUp();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run()
- {
- parentDialog.doMoveUp();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index c20eede47..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionPasteString.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.filters.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-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;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * The action is used within the Change Filter dialog, in the context menu of the selected filter string.
- * It is used to paste the copied filter string from the clipboard to the list.
- */
-public class SystemChangeFilterActionPasteString extends SystemBaseAction
-{
- private SystemChangeFilterPane parentDialog;
-
- /**
- * Constructor
- */
- public SystemChangeFilterActionPasteString(SystemChangeFilterPane parentDialog)
- {
- super(SystemResources.ACTION_PASTE_LABEL,SystemResources.ACTION_PASTE_TOOLTIP,
- PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE),
- null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX+"dufr3000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure there is something in the clipboard to copy
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- return parentDialog.canPaste();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run()
- {
- parentDialog.doPaste();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterAction.java
deleted file mode 100644
index c6fe91374..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterAction.java
+++ /dev/null
@@ -1,232 +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.filters.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.filters.SystemFilterDialogInputs;
-import org.eclipse.rse.ui.filters.SystemFilterDialogInterface;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Base class capturing the attributes and operations common to dialog actions
- * that work on system filters.
- */
-public abstract class SystemFilterAbstractFilterAction
- extends SystemBaseDialogAction
-
-{
-
-
- protected SystemFilterDialogInputs dlgInputs;
-
- /**
- * Constructor when given the translated action label
- */
- public SystemFilterAbstractFilterAction(Shell parent, String title)
- {
- super(title, null, parent);
- allowOnMultipleSelection(false);
- init();
- }
-
- /**
- * Constructor when given the translated action label and tooltip
- */
- public SystemFilterAbstractFilterAction(Shell parent, String title, String tooltip)
- {
- super(title, tooltip, null, parent);
- allowOnMultipleSelection(false);
- init();
- }
-
- /**
- * Common initialization code
- */
- protected void init()
- {
- dlgInputs = new SystemFilterDialogInputs();
- }
-
- // ----------------------------
- // HELP ID SETTINGS...
- // ----------------------------
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- // ----------------------------
- // ATTRIBUTE GETTERS/SETTERS...
- // ----------------------------
-
- /**
- * Set the dialog title.
- * Either call this or override getDialogTitle()
- */
- public void setDialogTitle(String title)
- {
- dlgInputs.title = title;
- }
- /**
- * Get the dialog title.
- * By default, uses what was given in setDialogTitle, or an english default if nothing set.
- */
- public String getDialogTitle()
- {
- return dlgInputs.title;
- }
-
- /**
- * Set the dialog prompt text.
- * Either call this or override getDialogPrompt()
- */
- public void setDialogPrompt(String prompt)
- {
- dlgInputs.prompt = prompt;
- }
- /**
- * Get the dialog prompt.
- * By default, uses what was given in setDialogPrompt
- */
- public String getDialogPrompt()
- {
- return dlgInputs.prompt;
- }
-
- /**
- * Set the dialog's filter name prompt text and tooltip
- * Either call this or override getDialogFilterNamePrompt/Tip()
- */
- public void setDialogFilterNamePrompt(String prompt, String tip)
- {
- dlgInputs.filterNamePrompt = prompt;
- dlgInputs.filterNameTip = tip;
- }
- /**
- * Get the dialog's filter name prompt text.
- * By default, uses what was given in setDialogFilterNamePrompt.
- */
- public String getDialogFilterFilterNamePrompt()
- {
- return dlgInputs.filterNamePrompt;
- }
- /**
- * Get the dialog's filter name tooltip text.
- * By default, uses what was given in setDialogFilterNamePrompt.
- */
- public String getDialogFilterNameTip()
- {
- return dlgInputs.filterNameTip;
- }
-
- /**
- * Set the dialog's pre-select information.
- * Either call this or override getDialogPreSelectInput()
- */
- public void setDialogPreSelectInput(Object selectData)
- {
- dlgInputs.preSelectObject = selectData;
- }
- /**
- * Get the dialog's pre-select information.
- * By default, uses what was given in setDialogPreSelectInput.
- */
- public Object getDialogPreSelectInput()
- {
- return dlgInputs.preSelectObject;
- }
-
-
- // -------------------------
- // PARENT CLASS OVERRIDES...
- // -------------------------
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- return true;
- //return (selectedObject instanceof SystemFilterPoolReferenceManagerProvider); // override as appropriate
- }
-
- /**
- * Extends run in parent class to call doOKprocessing if the result of calling
- * getDialogValue() resulted in a non-null value.
- */
- public void run()
- {
- super.run();
- if (getValue() != null)
- doOKprocessing(getValue());
- }
-
-
- /**
- * Overrides parent method to allow creating of a dialog meeting our interface,
- * so we can pass instance of ourselves to it for callbacks to get our data.
- * <p>
- * If your dialog does not implement our interface, override this method!
- */
- protected Dialog createDialog(Shell parent)
- {
- SystemFilterDialogInterface fDlg = createFilterDialog(parent);
- fDlg.setFilterDialogActionCaller(this);
- return (Dialog)fDlg;
- }
-
- /**
- * Where you create the dialog meeting our interface. If you override
- * createDialog, then override this to return null
- */
- public abstract SystemFilterDialogInterface createFilterDialog(Shell parent);
-
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to retrieve the data
- * from the dialog. For InputDialog dialogs, this is simply
- * a matter of return dlg.getValue();
- * <p>
- * This is called by the run method after the dialog returns. Callers
- * of this object can subsequently retrieve it by calling getValue.
- *
- * @param dlg The dialog object, after it has returned from open.
- */
- protected abstract Object getDialogValue(Dialog dlg);
-
- /**
- * Method called when ok pressed on dialog and after getDialogValue has set the
- * value attribute appropriately.
- * <p>
- * Only called if user pressed OK on dialog.
- * <p>
- * @param dlgValue The output of getDialogValue().
- */
- public abstract void doOKprocessing(Object dlgValue);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java
deleted file mode 100644
index 3c978d0cf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java
+++ /dev/null
@@ -1,494 +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.filters.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInputs;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Base class capturing the attributes and operations common to dialog actions
- * that work on system filter pools.
- */
-public abstract class SystemFilterAbstractFilterPoolAction
- extends SystemBaseDialogAction
-
-{
-
-
- protected SystemFilterPoolDialogInputs dlgInputs;
- protected String mgrNamePreselect;
-
- /**
- * Constructor when given the translated action label
- */
- public SystemFilterAbstractFilterPoolAction(Shell parent, String title)
- {
- super(title, null, parent);
- allowOnMultipleSelection(false);
- init();
- }
-
- /**
- * Constructor when given the translated action label
- */
- public SystemFilterAbstractFilterPoolAction(Shell parent, String title, String tooltip)
- {
- super(title, tooltip, null, parent);
- allowOnMultipleSelection(false);
- init();
- }
-
-
-
- /**
- * Constructor when given the resource bundle and key for the action label
- */
- public SystemFilterAbstractFilterPoolAction(Shell parent, ImageDescriptor image, String label, String tooltip)
- {
- super(label, tooltip, image, parent);
- allowOnMultipleSelection(false);
- init();
- }
-
- /**
- * Common initialization code
- */
- protected void init()
- {
- dlgInputs = new SystemFilterPoolDialogInputs();
- }
-
- // ----------------------------
- // HELP ID SETTINGS...
- // ----------------------------
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- // --------------------------------------
- // SELECTION CHANGED INTERCEPT METHODS...
- // --------------------------------------
-
- /**
- * This is called by the UI calling the action, if that UI is not a selection provider.
- * That is, this is an alternative to calling selectionChanged when there is no SelectionChangedEvent.
- * @see #selectionChanged(SelectionChangedEvent event)
- */
- public void setSelection(ISelection selection)
- {
- super.setSelection(selection);
- Object firstSelection = getFirstSelection();
- if (isEnabled() && (firstSelection != null))
- {
- if (firstSelection instanceof SystemSimpleContentElement)
- firstSelection = ((SystemSimpleContentElement)firstSelection).getData();
-
- if (firstSelection instanceof ISystemFilterPoolManagerProvider)
- setFilterPoolManagerProvider((ISystemFilterPoolManagerProvider)firstSelection);
- else if (firstSelection instanceof ISystemFilterPoolManager)
- setFilterPoolManagerProvider(((ISystemFilterPoolManager)firstSelection).getProvider());
- else if (firstSelection instanceof ISystemFilterPool)
- setFilterPoolManagerProvider(((ISystemFilterPool)firstSelection).getProvider());
- else if (firstSelection instanceof ISystemFilter)
- setFilterPoolManagerProvider(((ISystemFilter)firstSelection).getProvider());
- else if (firstSelection instanceof ISystemFilterString)
- setFilterPoolManagerProvider(((ISystemFilterString)firstSelection).getProvider());
-
- else if (firstSelection instanceof ISystemFilterPoolReferenceManagerProvider)
- setFilterPoolReferenceManager(((ISystemFilterPoolReferenceManagerProvider)firstSelection).getSystemFilterPoolReferenceManager());
- else if (firstSelection instanceof ISystemFilterPoolReferenceManager)
- setFilterPoolReferenceManager((ISystemFilterPoolReferenceManager)firstSelection);
- else if (firstSelection instanceof ISystemFilterPoolReference)
- setFilterPoolReferenceManager(((ISystemFilterPoolReference)firstSelection).getFilterPoolReferenceManager());
- else if (firstSelection instanceof ISystemFilterReference)
- setFilterPoolReferenceManager(((ISystemFilterReference)firstSelection).getFilterPoolReferenceManager());
- else if (firstSelection instanceof ISystemFilterStringReference)
- setFilterPoolReferenceManager(((ISystemFilterStringReference)firstSelection).getFilterPoolReferenceManager());
- }
- }
-
- // ----------------------------
- // ATTRIBUTE GETTERS/SETTERS...
- // ----------------------------
-
- /**
- * Set the input filter pool manager provider from which to get the list of filter pool managers.
- * Either call this or call setFilterPoolManagers or override getFilterPoolManagerProvider().
- */
- public void setFilterPoolManagerProvider(ISystemFilterPoolManagerProvider provider)
- {
- dlgInputs.poolManagerProvider = provider;
- //setFilterPoolManagers(provider.getSystemFilterPoolManagers());
- }
-
- /**
- * Get the input filter pool manager provider from which to get the list of filter pool managers.
- */
- public ISystemFilterPoolManagerProvider getFilterPoolManagerProvider()
- {
- //if (dlgInputs.poolManagerProvider != null)
- return dlgInputs.poolManagerProvider;
- //else if ((dlgInputs.poolManagers != null) && (dlgInputs.poolManagers.length > 0))
- //return dlgInputs.poolManagers[0].getProvider();
- //else
- //return null;
- }
-
- /**
- * Set the input filter pool managers from which to allow selections of filter pools.
- * Either call this or call setFilterPoolManagerProvider or override getFilterPoolManagers().
- */
- public void setFilterPoolManagers(ISystemFilterPoolManager[] managers)
- {
- dlgInputs.poolManagers = managers;
- }
-
- /**
- * Returns the filter pool managers from which to show filter pools for selection.
- * <p>
- * By default, tries the following in this order:
- * <ol>
- * <li>calls getFilterPoolManagerProvider if setFilterPoolManagerProvider was called
- * <li>uses what was given in setFilterPoolManagers
- * <li>uses what was given in setFilterPoolReferenceManager, calling its getSystemFilterPoolManagers
- * <li>checks if the current selection is a filterPoolReferenceManager, and if so uses the managers it references from.
- * </ol>
- */
- public ISystemFilterPoolManager[] getFilterPoolManagers()
- {
- ISystemFilterPoolManager[] mgrs = null;
- ISystemFilterPoolManagerProvider provider = getFilterPoolManagerProvider();
- if (mgrs == null)
- mgrs = dlgInputs.poolManagers;
- if ((mgrs==null) && (provider != null))
- mgrs = provider.getSystemFilterPoolManagers(); // get it in real time.
- if (mgrs == null)
- {
- ISystemFilterPoolReferenceManager refmgr = getFilterPoolReferenceManager();
- if (refmgr != null)
- mgrs = refmgr.getSystemFilterPoolManagers();
- }
- if (mgrs == null)
- {
- ISystemFilterPoolReferenceManagerProvider sfprmp = getReferenceManagerProviderSelection();
- if (sfprmp != null)
- mgrs = sfprmp.getSystemFilterPoolReferenceManager().getSystemFilterPoolManagers();
- }
- return mgrs;
- }
- /**
- * Return the current selection if it implements SystemFilterPoolReferenceManagerProvider
- */
- protected ISystemFilterPoolReferenceManagerProvider getReferenceManagerProviderSelection()
- {
- Object obj = getFirstSelection();
- if ((obj instanceof ISystemFilterPoolReferenceManagerProvider))
- return (ISystemFilterPoolReferenceManagerProvider)obj;
- else
- return null;
- }
- /**
- * Set the zero-based index of the manager name to preselect.
- * The default is zero.
- * Either call this or override getFilterPoolManagerNameSelectionIndex or call setFilterPoolManagerNamePreSelection(String)
- */
- public void setFilterPoolManagerNameSelectionIndex(int index)
- {
- dlgInputs.mgrSelection = index;
- }
- /**
- * Returns the zero-based index of the manager name to preselect.
- * Returns what was set in setFilterPoolManagerNamePreSelection or setFilterPoolManagerNameSelectionIndex by default.
- */
- public int getFilterPoolManagerNameSelectionIndex()
- {
- int pos = -1;
- if (mgrNamePreselect != null)
- {
- ISystemFilterPoolManager[] mgrs = getFilterPoolManagers();
- if (mgrs != null)
- {
- for (int idx=0; (pos<0) && (idx<mgrs.length); idx++)
- if (mgrs[idx].getName().equals(mgrNamePreselect))
- pos = idx;
- }
- }
- if (pos < 0)
- return dlgInputs.mgrSelection;
- else
- {
- //System.out.println("Found a match for mgr name '"+mgrNamePreselect+"' so preselect index is "+pos);
- return pos;
- }
- }
- /**
- * Set the name of the filter pool manager to pre-select
- */
- public void setFilterPoolManagerNamePreSelection(String name)
- {
- this.mgrNamePreselect = name;
- }
-
- /**
- * Set the input filter pool reference manager which is holding the references this
- * dialog is allowing the user to select.
- * <p>
- * If you call this, then this action has everything it needs to know to be fully self-contained.
- * It will totally handle updating the reference manager with the user's selections and
- * deselections.
- */
- public void setFilterPoolReferenceManager(ISystemFilterPoolReferenceManager refManager)
- {
- dlgInputs.refManager = refManager;
- }
- /**
- * Returns the filter pool reference manager which contains the list of selected filter pools
- * that this dialog is showing and allowing the user to change.
- * <p>
- * If not set, then the subclass needs to override doOKprocessing.
- */
- public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager()
- {
- return dlgInputs.refManager;
- }
-
- /**
- * Set the dialog title.
- * Either call this or override getDialogTitle()
- */
- public void setDialogTitle(String title)
- {
- dlgInputs.title = title;
- }
- /**
- * Get the dialog title.
- * By default, uses what was given in setDialogTitle, or an english default if nothing set.
- */
- public String getDialogTitle()
- {
- return dlgInputs.title;
- }
-
- /**
- * Set the dialog prompt text.
- * Either call this or override getDialogPrompt()
- */
- public void setDialogPrompt(String prompt)
- {
- dlgInputs.prompt = prompt;
- }
- /**
- * Get the dialog prompt.
- * By default, uses what was given in setDialogPrompt
- */
- public String getDialogPrompt()
- {
- return dlgInputs.prompt;
- }
-
- /**
- * Set the dialog's filter pool name prompt text and tooltip
- * Either call this or override getDialogFilterPoolNamePrompt/Tip()
- */
- public void setDialogFilterPoolNamePrompt(String prompt, String tip)
- {
- dlgInputs.poolNamePrompt = prompt;
- dlgInputs.poolNameTip = tip;
- }
- /**
- * Get the dialog's filter pool name prompt text.
- * By default, uses what was given in setDialogFilterPoolNamePrompt.
- */
- public String getDialogFilterPoolNamePrompt()
- {
- return dlgInputs.poolNamePrompt;
- }
- /**
- * Get the dialog's filter pool name tooltip text.
- * By default, uses what was given in setDialogFilterPoolNamePrompt.
- */
- public String getDialogFilterPoolNameTip()
- {
- return dlgInputs.poolNameTip;
- }
-
- /**
- * Set the dialog's filter pool manager name prompt text and tooltip
- * Either call this or override getDialogFilterPoolManagerNamePrompt/Tip()
- */
- public void setDialogFilterPoolManagerNamePrompt(String prompt, String tip)
- {
- dlgInputs.poolMgrNamePrompt = prompt;
- dlgInputs.poolMgrNameTip = tip;
- }
- /**
- * Get the dialog's filter pool manager name prompt text.
- * By default, uses what was given in setDialogFilterPoolManagerNamePrompt.
- */
- public String getDialogFilterPoolManagerNamePrompt()
- {
- return dlgInputs.poolMgrNamePrompt;
- }
- /**
- * Get the dialog's filter pool manager name tooltip text.
- * By default, uses what was given in setDialogFilterPoolManagerNamePrompt.
- */
- public String getDialogFilterPoolManagerNameTip()
- {
- return dlgInputs.poolMgrNameTip;
- }
-
- /**
- * Set the dialog's pre-select information.
- * Either call this or override getDialogPreSelectInput()
- */
- public void setDialogPreSelectInput(Object selectData)
- {
- dlgInputs.preSelectObject = selectData;
- }
- /**
- * Get the dialog's pre-select information.
- * By default, uses what was given in setDialogPreSelectInput.
- */
- public Object getDialogPreSelectInput()
- {
- return dlgInputs.preSelectObject;
- }
-
-
- // -------------------------
- // PARENT CLASS OVERRIDES...
- // -------------------------
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- return (selectedObject instanceof ISystemFilterPoolReferenceManagerProvider); // override as appropriate
- }
-
-
- /**
- * Walk elements deciding pre-selection
- */
- protected void preSelect(SystemSimpleContentElement inputElement)
- {
- SystemSimpleContentElement[] mgrElements = inputElement.getChildren();
- for (int idx=0; idx<mgrElements.length; idx++)
- {
- //SystemFilterPoolManager mgr = (SystemFilterPoolManager)mgrElements[idx].getData();
- SystemSimpleContentElement[] poolElements = mgrElements[idx].getChildren();
- for (int jdx=0; jdx<poolElements.length; jdx++)
- {
- //if (poolElements[jdx].isSelected())
- poolElements[jdx].setSelected(
- getFilterPoolPreSelection((ISystemFilterPool)poolElements[jdx].getData()));
- }
- }
- }
- /**
- * Decide per pool if it should be selected or not.
- * Default behaviour is to select it if it is currently referenced.
- */
- protected boolean getFilterPoolPreSelection(ISystemFilterPool pool)
- {
- return pool.getReferenceCount() > 0;
- }
-
- /**
- * Extends run in parent class to call doOKprocessing if the result of calling
- * getDialogValue() resulted in a non-null value.
- */
- public void run()
- {
- super.run();
- if (getValue() != null)
- doOKprocessing(getValue());
- }
-
-
- /**
- * Overrides parent method to allow creating of a dialog meeting our interface,
- * so we can pass instance of ourselves to it for callbacks to get our data.
- * <p>
- * If your dialog does not implement our interface, override this method!
- */
- protected Dialog createDialog(Shell parent)
- {
- SystemFilterPoolDialogInterface fpDlg = createFilterPoolDialog(parent);
- fpDlg.setFilterPoolDialogActionCaller(this);
- return (Dialog)fpDlg;
- }
-
- /**
- * Where you create the dialog meeting our interface. If you override
- * createDialog, then override this to return null
- */
- public abstract SystemFilterPoolDialogInterface createFilterPoolDialog(Shell parent);
-
- /**
- * If you decide to use the supplied run method as is,
- * then you must override this method to retrieve the data
- * from the dialog. For InputDialog dialogs, this is simply
- * a matter of returning dlg.getValue();
- * <p>
- * This is called by the run method after the dialog returns. Callers
- * of this object can subsequently retrieve it by calling getValue.
- *
- * @param dlg The dialog object, after it has returned from open.
- */
- protected abstract Object getDialogValue(Dialog dlg);
-
- /**
- * Method called when ok pressed on dialog and after getDialogValue has set the
- * value attribute appropriately.
- * <p>
- * Only called if user pressed OK on dialog.
- * <p>
- * @param dlgValue The output of getDialogValue().
- */
- public abstract void doOKprocessing(Object dlgValue);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolWizardAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolWizardAction.java
deleted file mode 100644
index 8c25200ed..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolWizardAction.java
+++ /dev/null
@@ -1,87 +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.filters.actions;
-
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterPoolWizardDialog;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterPoolWizardInterface;
-import org.eclipse.swt.widgets.Shell;
-
-
-public abstract class SystemFilterAbstractFilterPoolWizardAction
- extends SystemFilterAbstractFilterPoolAction
-{
-
-
-
- /**
- * Constructor for SystemFilterAbstactFilterPoolWizardAction
- */
- public SystemFilterAbstractFilterPoolWizardAction(Shell parent, String title)
- {
- super(parent, title);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- }
-
-
-
- /**
- * Constructor for SystemFilterAbstactFilterPoolWizardAction
- */
- public SystemFilterAbstractFilterPoolWizardAction(Shell parent, ImageDescriptor image,
- String label, String tooltip)
- {
- super(parent, image, label, tooltip);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- }
-
- /**
- * @see SystemFilterAbstractFilterPoolAction#doOKprocessing(Object)
- */
- public void doOKprocessing(Object dlgValue)
- {
- }
-
- /**
- * @see SystemFilterAbstractFilterPoolAction#getDialogValue(Dialog)
- */
- protected Object getDialogValue(Dialog dlg)
- {
- return null;
- }
-
- /**
- * @see SystemFilterAbstractFilterPoolAction#createFilterPoolDialog(Shell)
- */
- public SystemFilterPoolDialogInterface createFilterPoolDialog(Shell parent)
- {
- SystemFilterPoolWizardInterface newWizard = getFilterPoolWizard();
- SystemFilterPoolDialogInterface dialog =
- new SystemFilterPoolWizardDialog(parent, newWizard);
- return dialog;
- }
-
- /**
- * Return the wizard so we can customize it prior to showing it.
- */
- public abstract SystemFilterPoolWizardInterface getFilterPoolWizard();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterWizardAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterWizardAction.java
deleted file mode 100644
index 7a6909fd3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterWizardAction.java
+++ /dev/null
@@ -1,85 +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.filters.actions;
-
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.filters.SystemFilterDialogInterface;
-import org.eclipse.rse.ui.filters.dialogs.ISystemFilterWizard;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterWizardDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-public abstract class SystemFilterAbstractFilterWizardAction
- extends SystemFilterAbstractFilterAction
-{
-
-
-
- /**
- * Constructor for SystemFilterAbstactFilterWizardAction
- */
- public SystemFilterAbstractFilterWizardAction(Shell parent, String title)
- {
- super(parent, title);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- }
-
- /**
- * Constructor for SystemFilterAbstactFilterWizardAction
- */
- public SystemFilterAbstractFilterWizardAction(Shell parent, String label, String tooltip)
- {
- super(parent, label, tooltip);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- }
-
- /**
- * @see SystemFilterAbstractFilterAction#doOKprocessing(Object)
- */
- public void doOKprocessing(Object dlgValue)
- {
- }
-
- /**
- * @see SystemFilterAbstractFilterAction#getDialogValue(Dialog)
- */
- protected Object getDialogValue(Dialog dlg)
- {
- return null;
- }
-
- /**
- * @see SystemFilterAbstractFilterAction#createFilterDialog(Shell)
- */
- public SystemFilterDialogInterface createFilterDialog(Shell parent)
- {
- ISystemFilterWizard newWizard = getFilterWizard();
-
- SystemFilterDialogInterface dialog =
- new SystemFilterWizardDialog(parent, newWizard);
-
- return dialog;
- }
-
- /**
- * Return the wizard so we can customize it prior to showing it.
- */
- public abstract ISystemFilterWizard getFilterWizard();
-
-} \ No newline at end of file
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
deleted file mode 100644
index 3b78fee0d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java
+++ /dev/null
@@ -1,135 +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.filters.actions;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-import org.eclipse.rse.ui.view.SystemViewMenuListener;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * A cascading menu action for "New Filter Pool Reference->"
- */
-public class SystemFilterCascadingNewFilterPoolReferenceAction
- extends SystemBaseSubMenuAction
- implements IMenuListener
-{
- private ISystemFilterPoolReferenceManager refMgr;
-
- /**
- * Constructor when reference mgr not available. Must call setSystemFilterPoolReferenceManager.
- */
- public SystemFilterCascadingNewFilterPoolReferenceAction(Shell shell)
- {
- this(shell, null);
- }
-
- /**
- * Constructor when reference mgr is available. No need to call setSystemFilterPoolReferenceManager.
- */
- public SystemFilterCascadingNewFilterPoolReferenceAction(Shell shell, ISystemFilterPoolReferenceManager refMgr)
- {
- super(SystemResources.ACTION_CASCADING_FILTERPOOL_NEWREFERENCE_LABEL, SystemResources.ACTION_CASCADING_FILTERPOOL_NEWREFERENCE_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLREF_ID),shell);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- this.refMgr = refMgr;
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- menu.addMenuListener(this);
- menu.setRemoveAllWhenShown(true);
- //menu.setEnabled(true);
- menu.add(new SystemBaseAction("dummy",null)); //$NON-NLS-1$
- return menu;
- }
-
- /**
- * Set the master filter pool reference manager from which the filter pools are to be selectable,
- * and into which we will add the filter pool reference
- */
- public void setSystemFilterPoolReferenceManager(ISystemFilterPoolReferenceManager refMgr)
- {
- this.refMgr = refMgr;
- }
-
- /**
- * Called when submenu is about to show
- */
- public void menuAboutToShow(IMenuManager ourSubMenu)
- {
- Shell shell = getShell();
- ISystemFilterPoolManager[] mgrs = refMgr.getSystemFilterPoolManagers();
- SystemFilterCascadingNewFilterPoolReferenceFPMgrAction action = null;
- ISystemFilterPoolManager mgr = null;
- ISystemFilterPoolManager defaultMgr = refMgr.getDefaultSystemFilterPoolManager();
- String helpId = getHelpContextId();
- if (defaultMgr != null)
- {
- action = new SystemFilterCascadingNewFilterPoolReferenceFPMgrAction(shell, defaultMgr, refMgr);
- if (helpId != null)
- action.setHelp(helpId);
- ourSubMenu.add(action.getSubMenu());
- }
- for (int idx=0; idx<mgrs.length; idx++)
- {
- mgr = mgrs[idx];
- if (mgr != defaultMgr)
- {
- action = new SystemFilterCascadingNewFilterPoolReferenceFPMgrAction(shell, mgr, refMgr);
- if (helpId != null)
- action.setHelp(helpId);
- ourSubMenu.add(action.getSubMenu());
- }
- }
- }
-
- /**
- * Overridable method from parent that instantiates the menu listener who job is to add mnemonics.
- * @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics need only be set once. False if it is dynamic
- */
- protected SystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
- {
- return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java
deleted file mode 100644
index f414febf3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java
+++ /dev/null
@@ -1,127 +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.filters.actions;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-import org.eclipse.rse.ui.view.SystemViewMenuListener;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * A cascading submenu action for "New Filter Pool Reference->".
- * This is after the first cascade, where we list filter pool managers.
- */
-public class SystemFilterCascadingNewFilterPoolReferenceFPMgrAction
- extends SystemBaseSubMenuAction
- implements IMenuListener
-{
- private ISystemFilterPoolManager mgr;
- private ISystemFilterPoolReferenceManager refMgr;
-
- /**
- * Constructor.
- */
- public SystemFilterCascadingNewFilterPoolReferenceFPMgrAction(Shell shell,
- ISystemFilterPoolManager mgr,
- ISystemFilterPoolReferenceManager refMgr)
- {
- super(mgr.getName(),shell);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(false);
- this.mgr = mgr;
- this.refMgr = refMgr;
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu)
- {
- menu.addMenuListener(this);
- menu.setRemoveAllWhenShown(true);
- //menu.setEnabled(true);
- menu.add(new SystemBaseAction("dummy",null)); //$NON-NLS-1$
- return menu;
- }
-
- /**
- * Called when submenu is about to show
- */
- public void menuAboutToShow(IMenuManager ourSubMenu)
- {
- //System.out.println("inside menu about to show");
- ISystemFilterPool[] pools = mgr.getSystemFilterPools();
- SystemFilterPoolReferenceSelectAction action = null;
- ISystemFilterPool pool = null;
- Shell shell = getShell();
- String helpId = getHelpContextId();
- for (int idx=0; idx<pools.length; idx++)
- {
- pool = pools[idx];
- if (!isPoolAlreadyReferenced(pool) && !isPoolConnectionUnique(pool))
- {
- action = new SystemFilterPoolReferenceSelectAction(shell,pool,refMgr);
- if (helpId != null)
- action.setHelp(helpId);
- ourSubMenu.add(action);
- }
- }
- }
-
- /**
- * Determine if the given filter pool is already referenced by this reference manager
- */
- private boolean isPoolAlreadyReferenced(ISystemFilterPool pool)
- {
- return refMgr.isSystemFilterPoolReferenced(pool);
- }
- /**
- * Determine if the given filter pool is the special unique pool for a connection.
- * If so, we don't want to let anyone else reference it.
- */
- private boolean isPoolConnectionUnique(ISystemFilterPool pool)
- {
- return (pool.getOwningParentName() != null);
- }
-
- /**
- * Overridable method from parent that instantiates the menu listener who job is to add mnemonics.
- * @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics need only be set once. False if it is dynamic
- */
- protected SystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
- {
- return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 1735dbb68..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterAction.java
+++ /dev/null
@@ -1,362 +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.filters.actions;
-import java.util.Iterator;
-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.jface.viewers.TreeViewer;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.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.SystemBaseCopyAction;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Copy a filter action.
- */
-public class SystemFilterCopyFilterAction extends SystemBaseCopyAction
-{
- private String promptString = null;
- private SystemSimpleContentElement initialSelectionElement = null;
- private SystemSimpleContentElement root = null;
-
- /**
- * Constructor
- */
- public SystemFilterCopyFilterAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_COPY_FILTER_LABEL, MODE_COPY);
- promptString = SystemResources.RESID_COPY_PROMPT;
- }
-
- /**
- * Reset. This is a re-run of this action
- */
- protected void reset()
- {
- super.reset();
- initialSelectionElement = null;
- root = null;
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- /* */
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof SystemSimpleContentElement)
- selectedObject = ((SystemSimpleContentElement)selectedObject).getData();
- if (!checkObjectType(selectedObject))
- enable = false;
- }
- /* */
- return enable;
- }
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (selectedObject instanceof ISystemFilter)
- {
- ISystemFilter fs = (ISystemFilter)selectedObject;
- return !fs.isNonChangable();
- }
- else if (selectedObject instanceof ISystemFilterReference)
- {
- ISystemFilter fs = ((ISystemFilterReference)selectedObject).getReferencedFilter();
- return !fs.isNonChangable();
- }
- else
- return false;
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
- /**
- * This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected
- * object is a valid parent object. This affects the enabling of the OK button on that dialog.
- */
- public boolean isValidTargetParent(SystemSimpleContentElement selectedElement)
- {
- if (selectedElement == null)
- return false;
- Object data = selectedElement.getData();
- return (data instanceof ISystemFilterPool);
- }
-
- /**
- * @see SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)
- */
- protected String checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, Object oldObject, String oldName)
- {
- ISystemFilterPool newPool = (ISystemFilterPool)targetContainer;
- //ISystemFilterPoolManager newMgr = newPool.getSystemFilterPoolManager();
- String newName = oldName;
- ISystemFilter match = newPool.getSystemFilter(oldName);
- if (match != null)
- {
- //monitor.setVisible(false); wish we could!
- //ValidatorFilterName validator = new ValidatorFilterName(newPool.getSystemFilterNames());
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(shell, true, match, null); // true => copy-collision-mode
- dlg.open();
- if (!dlg.wasCancelled())
- newName = dlg.getNewName();
- else
- newName = null;
- }
- return newName;
- }
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- ISystemFilter oldFilter = (ISystemFilter)oldObject;
- ISystemFilterPool oldFilterPool = oldFilter.getParentFilterPool();
- ISystemFilterPoolManager oldMgr = oldFilterPool.getSystemFilterPoolManager();
- ISystemFilterPool newPool = (ISystemFilterPool)targetContainer;
- //ISystemFilterPoolManager newMgr = newPool.getSystemFilterPoolManager();
-
- ISystemFilter newFilter = oldMgr.copySystemFilter(newPool, oldFilter, newName);
-
- if ((root != null) && (newFilter!=null))
- {
- Object data = root.getData();
- if ((data!=null) && (data instanceof TreeViewer))
- ((TreeViewer)data).refresh();
- }
- return (newFilter != null);
- }
-
- /**
- * @see SystemBaseCopyAction#getTreeModel()
- */
- protected SystemSimpleContentElement getTreeModel()
- {
- ISystemFilter firstFilter = getFirstSelectedFilter();
- ISystemFilterPoolManagerProvider provider = firstFilter.getProvider();
- return getPoolMgrTreeModel(provider, firstFilter.getSystemFilterPoolManager());
- }
- /**
- * @see SystemBaseCopyAction#getTreeInitialSelection()
- */
- protected SystemSimpleContentElement getTreeInitialSelection()
- {
- return initialSelectionElement;
- }
-
- /**
- * Set the prompt string that shows up at the top of the copy-destination dialog.
- */
- public void setPromptString(String promptString)
- {
- this.promptString = promptString;
- }
- /**
- * @see SystemBaseCopyAction#getPromptString()
- */
- protected String getPromptString()
- {
- return promptString;
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage()
- */
- protected SystemMessage getCopyingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTERS_PROGRESS);
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage(String)
- */
- protected SystemMessage getCopyingMessage(String oldName)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTER_PROGRESS).makeSubstitution(oldName);
- }
-
- /**
- * @see SystemBaseCopyAction#getOldObjects()
- */
- protected Object[] getOldObjects()
- {
- return getSelectedFilters();
- }
-
- /**
- * @see SystemBaseCopyAction#getOldNames()
- */
- protected String[] getOldNames()
- {
- ISystemFilter[] filters = getSelectedFilters();
- String[] names = new String[filters.length];
- for (int idx=0; idx<filters.length; idx++)
- names[idx] = filters[idx].getName();
- return names;
- }
-
- /**
- * Get the currently selected filters
- */
- protected ISystemFilter[] getSelectedFilters()
- {
- IStructuredSelection selection = getSelection();
- ISystemFilter[] filters = new ISystemFilter[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- {
- Object next = i.next();
- if (next instanceof SystemSimpleContentElement)
- next = ((SystemSimpleContentElement)next).getData();
- if (next instanceof ISystemFilterReference)
- filters[idx++] = ((ISystemFilterReference)next).getReferencedFilter();
- else
- filters[idx++] = (ISystemFilter)next;
- }
- return filters;
- }
- /**
- * Get the first selected filter
- */
- protected ISystemFilter getFirstSelectedFilter()
- {
- Object first = getFirstSelection();
- if (first instanceof SystemSimpleContentElement)
- {
- root = ((SystemSimpleContentElement)first).getRoot();
- first = ((SystemSimpleContentElement)first).getData();
- }
- if (first == null)
- return null;
- else if (first instanceof ISystemFilterReference)
- return ((ISystemFilterReference)first).getReferencedFilter();
- else if (first instanceof ISystemFilter)
- return (ISystemFilter)first;
- else
- return null;
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-
- /**
- * Create and return data model to populate selection tree with.
- * @param poolMgrProvider The provider who will give us the list of filter pool managers to populate the list with
- * @param poolMgr The SystemFilterPoolManager whose tree model element is to be pre-selected
- */
- protected SystemSimpleContentElement getPoolMgrTreeModel(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPoolManager poolMgr)
- {
- SystemSimpleContentElement veryRootElement =
- new SystemSimpleContentElement("Root", //$NON-NLS-1$
- null, null, (Vector)null);
- veryRootElement.setRenamable(false);
- veryRootElement.setDeletable(false);
-
- ISystemFilterPoolManager[] mgrs = poolMgrProvider.getSystemFilterPoolManagers();
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)poolMgrProvider.getAdapter(ISubSystemConfigurationAdapter.class);
- ImageDescriptor image = adapter.getSystemFilterPoolManagerImage();
-
- if ((mgrs == null) || (mgrs.length == 0))
- return veryRootElement;
-
- Vector veryRootChildren = new Vector();
- for (int idx=0; idx<mgrs.length; idx++)
- {
- SystemSimpleContentElement mgrElement =
- new SystemSimpleContentElement(mgrs[idx].getName(),
- mgrs[idx], veryRootElement, (Vector)null);
- mgrElement.setRenamable(false);
- mgrElement.setDeletable(false);
- mgrElement.setImageDescriptor(image);
-
- Vector elements = new Vector();
- populateFilterPoolContentElementVector(poolMgrProvider, mgrs[idx], elements, mgrElement);
- mgrElement.setChildren(elements);
-
- veryRootChildren.addElement(mgrElement);
- if (mgrs[idx] == poolMgr)
- initialSelectionElement = mgrElement;
- }
- veryRootElement.setChildren(veryRootChildren);
- return veryRootElement;
- }
-
- /**
- * Populate filter pool manager subtree with filter pools
- */
- protected static void populateFilterPoolContentElementVector(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPoolManager mgr,
- Vector elements,
- SystemSimpleContentElement parentElement)
- {
- //String mgrName = mgr.getName();
- ISystemFilterPool[] pools = mgr.getSystemFilterPools();
- for (int idx=0; idx<pools.length; idx++)
- {
- ISystemFilterPool pool = pools[idx];
- SystemSimpleContentElement cElement =
- new SystemSimpleContentElement(pool.getName(), pool, parentElement, (Vector)null);
- cElement.setImageDescriptor(SystemFilterUIHelpers.getFilterPoolImage(poolMgrProvider, pool));
- //cElement.setSelected(setFilterPoolSelection(pool));
- elements.addElement(cElement);
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index f8aefe247..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterPoolAction.java
+++ /dev/null
@@ -1,323 +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.filters.actions;
-import java.util.Iterator;
-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.jface.viewers.TreeViewer;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.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.SystemBaseCopyAction;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Copy a filter pool action.
- */
-public class SystemFilterCopyFilterPoolAction extends SystemBaseCopyAction
-{
- private String promptString = null;
- private SystemSimpleContentElement initialSelectionElement = null;
- private SystemSimpleContentElement root = null;
-
- /**
- * Constructor
- */
- public SystemFilterCopyFilterPoolAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_COPY_FILTERPOOL_LABEL, MODE_COPY);
- promptString = SystemResources.RESID_COPY_PROMPT;
- }
- /**
- * Reset. This is a re-run of this action
- */
- protected void reset()
- {
- super.reset();
- initialSelectionElement = null;
- root = null;
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- /* */
- Iterator e= selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof SystemSimpleContentElement)
- selectedObject = ((SystemSimpleContentElement)selectedObject).getData();
- if (!(selectedObject instanceof ISystemFilterPool) &&
- !(selectedObject instanceof ISystemFilterPoolReference))
- enable = false;
- // disable if this is a connection-unique filter pool
- else if (selectedObject instanceof ISystemFilterPool)
- enable = ((ISystemFilterPool)selectedObject).getOwningParentName() == null;
- // disable if this is a connection-unique filter pool
- else if (selectedObject instanceof ISystemFilterPoolReference)
- enable = ((ISystemFilterPoolReference)selectedObject).getReferencedFilterPool().getOwningParentName() == null;
- }
- /* */
- return enable;
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
- /**
- * This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected
- * object is a valid parent object. This affects the enabling of the OK button on that dialog.
- */
- public boolean isValidTargetParent(SystemSimpleContentElement selectedElement)
- {
- if (selectedElement == null)
- return false;
- Object data = selectedElement.getData();
- return (data instanceof ISystemFilterPoolManager);
- }
-
- /**
- * @see SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)
- */
- protected String checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, Object oldObject, String oldName)
- {
- ISystemFilterPoolManager newMgr = (ISystemFilterPoolManager)targetContainer;
- String newName = oldName;
- //SystemFilterPool oldFilterPool = (SystemFilterPool)oldObject;
- ISystemFilterPool match = newMgr.getSystemFilterPool(oldName);
- if (match != null)
- {
- //monitor.setVisible(false); wish we could!
- //ValidatorFilterPoolName validator = new ValidatorFilterPoolName(newMgr.getSystemFilterPoolNames());
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(shell, true, match, null); // true => copy-collision-mode
- dlg.open();
- if (!dlg.wasCancelled())
- newName = dlg.getNewName();
- else
- newName = null;
- }
- return newName;
- }
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- ISystemFilterPool oldFilterPool = (ISystemFilterPool)oldObject;
- ISystemFilterPoolManager oldMgr = oldFilterPool.getSystemFilterPoolManager();
- ISystemFilterPoolManager newMgr = (ISystemFilterPoolManager)targetContainer;
- ISystemFilterPool newFilterPool = oldMgr.copySystemFilterPool(newMgr, oldFilterPool, newName);
- if ((root != null) && (newFilterPool!=null))
- {
- Object data = root.getData();
- if ((data!=null) && (data instanceof TreeViewer))
- ((TreeViewer)data).refresh();
- }
- return (newFilterPool != null);
- }
-
- /**
- * @see SystemBaseCopyAction#getTreeModel()
- */
- protected SystemSimpleContentElement getTreeModel()
- {
- ISystemFilterPool firstPool = getFirstSelectedFilterPool();
- ISystemFilterPoolManagerProvider provider = firstPool.getProvider();
- return getPoolMgrTreeModel(provider, firstPool.getSystemFilterPoolManager());
- }
- /**
- * @see SystemBaseCopyAction#getTreeInitialSelection()
- */
- protected SystemSimpleContentElement getTreeInitialSelection()
- {
- return initialSelectionElement;
- }
-
- /**
- * Set the prompt string that shows up at the top of the copy-destination dialog.
- */
- public void setPromptString(String promptString)
- {
- this.promptString = promptString;
- }
- /**
- * @see SystemBaseCopyAction#getPromptString()
- */
- protected String getPromptString()
- {
- //return SystemResources.RESID_COPY_TARGET_PROFILE_PROMPT);
- return promptString;
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage()
- */
- protected SystemMessage getCopyingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTERPOOLS_PROGRESS);
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage(String)
- */
- protected SystemMessage getCopyingMessage(String oldName)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTERPOOL_PROGRESS).makeSubstitution(oldName);
- }
- /**
- * Return complete message
- */
- public SystemMessage getCompletionMessage(Object targetContainer, String[] oldNames, String[] newNames)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTERPOOL_COMPLETE).makeSubstitution(((ISystemFilterPoolManager)targetContainer).getName());
- }
-
- /**
- * @see SystemBaseCopyAction#getOldObjects()
- */
- protected Object[] getOldObjects()
- {
- return getSelectedFilterPools();
- }
-
- /**
- * @see SystemBaseCopyAction#getOldNames()
- */
- protected String[] getOldNames()
- {
- ISystemFilterPool[] filterPools = getSelectedFilterPools();
- String[] names = new String[filterPools.length];
- for (int idx=0; idx<filterPools.length; idx++)
- names[idx] = filterPools[idx].getName();
- return names;
- }
-
- /**
- * Get the currently selected filter pools
- */
- protected ISystemFilterPool[] getSelectedFilterPools()
- {
- IStructuredSelection selection = getSelection();
- ISystemFilterPool[] filterPools = new ISystemFilterPool[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- {
- Object next = i.next();
- if (next instanceof SystemSimpleContentElement)
- next = ((SystemSimpleContentElement)next).getData();
- if (next instanceof ISystemFilterPoolReference)
- filterPools[idx++] = ((ISystemFilterPoolReference)next).getReferencedFilterPool();
- else
- filterPools[idx++] = (ISystemFilterPool)next;
- }
- return filterPools;
- }
- /**
- * Get the first selected filter pool
- */
- protected ISystemFilterPool getFirstSelectedFilterPool()
- {
- Object first = getFirstSelection();
- if (first instanceof SystemSimpleContentElement)
- {
- root = ((SystemSimpleContentElement)first).getRoot();
- first = ((SystemSimpleContentElement)first).getData();
- }
- if (first == null)
- return null;
- else if (first instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference)first).getReferencedFilterPool();
- else if (first instanceof ISystemFilterPool)
- return (ISystemFilterPool)first;
- else
- return null;
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-
- /**
- * Create and return data model to populate selection tree with.
- * @param poolMgrProvider The provider who will give us the list of filter pool managers to populate the list with
- * @param poolMgr The SystemFilterPoolManager whose tree model element is to be pre-selected
- */
- protected SystemSimpleContentElement getPoolMgrTreeModel(ISystemFilterPoolManagerProvider poolMgrProvider, ISystemFilterPoolManager poolMgr)
- {
- SystemSimpleContentElement veryRootElement =
- new SystemSimpleContentElement("Root", //$NON-NLS-1$
- null, null, (Vector)null);
- veryRootElement.setRenamable(false);
- veryRootElement.setDeletable(false);
-
- ISystemFilterPoolManager[] mgrs = poolMgrProvider.getSystemFilterPoolManagers();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)poolMgrProvider.getAdapter(ISubSystemConfigurationAdapter.class);
- ImageDescriptor image = adapter.getSystemFilterPoolManagerImage();
-
- if ((mgrs == null) || (mgrs.length == 0))
- return veryRootElement;
-
- Vector veryRootChildren = new Vector();
- for (int idx=0; idx<mgrs.length; idx++)
- {
- SystemSimpleContentElement mgrElement =
- new SystemSimpleContentElement(mgrs[idx].getName(),
- mgrs[idx], veryRootElement, (Vector)null);
- mgrElement.setRenamable(false);
- mgrElement.setDeletable(false);
- mgrElement.setImageDescriptor(image);
- veryRootChildren.addElement(mgrElement);
- if (mgrs[idx] == poolMgr)
- initialSelectionElement = mgrElement;
- }
- veryRootElement.setChildren(veryRootChildren);
- return veryRootElement;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index de75b4156..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterStringAction.java
+++ /dev/null
@@ -1,494 +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.filters.actions;
-import java.util.Iterator;
-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.jface.viewers.TreeViewer;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.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.SystemBaseCopyAction;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Copy a filter string action.
- */
-public class SystemFilterCopyFilterStringAction extends SystemBaseCopyAction
-{
- private String promptString = null;
- private SystemSimpleContentElement initialSelectionElement = null;
- private SystemSimpleContentElement root = null;
- private ISystemFilterString[] strings = null;
-
- /**
- * Constructor
- */
- public SystemFilterCopyFilterStringAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_COPY_FILTERSTRING_LABEL, MODE_COPY);
- promptString = SystemResources.RESID_COPY_PROMPT;
- }
-
- /**
- * Reset. This is a re-run of this action
- */
- protected void reset()
- {
- super.reset();
- initialSelectionElement = null;
- root = null;
- strings = null;
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * Overridable method if you support duplicate filter strings in the same filter.
- * By default, queries the "supportsDuplicateFilterStrings" attribute in the filter.
- */
- protected boolean supportsDuplicateFilterStrings(ISystemFilter filter)
- {
- return filter.isSupportsDuplicateFilterStrings();
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- /* */
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof SystemSimpleContentElement)
- selectedObject = ((SystemSimpleContentElement)selectedObject).getData();
- if (!checkObjectType(selectedObject))
- enable = false;
- }
- /* */
- return enable;
- }
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (selectedObject instanceof ISystemFilterString)
- {
- ISystemFilterString fs = (ISystemFilterString)selectedObject;
- return fs.isChangable();
- }
- else if (selectedObject instanceof ISystemFilterStringReference)
- {
- ISystemFilterStringReference frs = (ISystemFilterStringReference)selectedObject;
- return frs.getReferencedFilterString().isChangable();
- }
- else
- return false;
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
- /**
- * This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected
- * object is a valid parent object. This affects the enabling of the OK button on that dialog.
- * <p>
- * The default is to return true if the selected element has no children. This is sufficient for most cases. However,
- * in some cases it is not, such as for filter strings where we want to only enable OK if a filter is selected. It is
- * possible that filter pools have no filters, so the default algorithm is not sufficient. In these cases the child class
- * can override this method.
- */
- public boolean isValidTargetParent(SystemSimpleContentElement selectedElement)
- {
- Object data = selectedElement.getData();
- if (data instanceof ISystemFilter)
- return !((ISystemFilter)data).isPromptable();
- else
- return false;
- }
-
- /**
- * Overridable entry point when you want to prevent any copies/moves if any of the
- * selected objects have a name collision.
- * <p>
- * If you decide to override this, it is your responsibility to issue the error
- * message to the user and return false here.
- * <p>
- * @return true if there is no problem, false if there is a fatal collision
- */
- protected boolean preCheckForCollision(Shell shell, Object targetContainer,
- Object oldObject, String oldName)
- {
- ISystemFilter newFilter = (ISystemFilter)targetContainer;
- if (supportsDuplicateFilterStrings(newFilter))
- return true;
- ISystemFilterString match = newFilter.getSystemFilterString(oldName);
- if (match != null)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_ALREADYEXISTS);
- msg.makeSubstitution(oldName, newFilter.getName());
- SystemMessageDialog.displayErrorMessage(shell, msg);
- }
- return (match == null); // all is well iff such a filter string doesn't already exist.
- }
-
- /**
- * SHOULD NEVER BE CALLED IF preCheckForCollision WORKS PROPERLY
- * @see SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)
- */
- protected String checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, Object oldObject, String oldName)
- {
- ISystemFilter newFilter = (ISystemFilter)targetContainer;
- if (supportsDuplicateFilterStrings(newFilter))
- return oldName;
- //ISystemFilterPool newPool = newFilter.getParentFilterPool();
- //ISystemFilterPoolManager newMgr = newPool.getSystemFilterPoolManager();
- String newName = oldName;
- ISystemFilterString match = newFilter.getSystemFilterString(oldName);
- if (match != null)
- {
- //monitor.setVisible(false); wish we could!
- boolean caseSensitive = false;
- ValidatorUniqueString validator = new ValidatorUniqueString(newFilter.getFilterStrings(),caseSensitive);
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(shell, true, match, validator); // true => copy-collision-mode
- dlg.open();
- if (!dlg.wasCancelled())
- newName = dlg.getNewName();
- else
- newName = null;
- }
- return newName;
- }
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- ISystemFilterString oldFilterString = (ISystemFilterString)oldObject;
- ISystemFilterPoolManager oldMgr = oldFilterString.getSystemFilterPoolManager();
- ISystemFilter targetFilter = (ISystemFilter)targetContainer;
- //SystemFilterPoolManager newMgr = targetFilter.getSystemFilterPoolManager();
-
- ISystemFilterString newFilterString = oldMgr.copySystemFilterString(targetFilter, oldFilterString);
-
- if ((root != null) && (newFilterString!=null))
- {
- Object data = root.getData();
- if ((data!=null) && (data instanceof TreeViewer))
- ((TreeViewer)data).refresh();
- }
- return (newFilterString != null);
- }
-
- /**
- * @see SystemBaseCopyAction#getTreeModel()
- */
- protected SystemSimpleContentElement getTreeModel()
- {
- ISystemFilterString firstFilterString = getFirstSelectedFilterString();
- ISystemFilterPoolManagerProvider provider = firstFilterString.getProvider();
- return getPoolMgrTreeModel(provider, firstFilterString.getSystemFilterPoolManager(), getSelectedFilters());
- }
- /**
- * @see SystemBaseCopyAction#getTreeInitialSelection()
- */
- protected SystemSimpleContentElement getTreeInitialSelection()
- {
- return initialSelectionElement;
- }
-
- /**
- * Set the prompt string that shows up at the top of the copy-destination dialog.
- */
- public void setPromptString(String promptString)
- {
- this.promptString = promptString;
- }
- /**
- * @see SystemBaseCopyAction#getPromptString()
- */
- protected String getPromptString()
- {
- return promptString;
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage()
- */
- protected SystemMessage getCopyingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTERSTRINGS_PROGRESS);
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage( String)
- */
- protected SystemMessage getCopyingMessage(String oldName)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTERSTRING_PROGRESS).makeSubstitution(oldName);
- }
-
- /**
- * @see SystemBaseCopyAction#getOldObjects()
- */
- protected Object[] getOldObjects()
- {
- return getSelectedFilterStrings();
- }
-
- /**
- * @see SystemBaseCopyAction#getOldNames()
- */
- protected String[] getOldNames()
- {
- strings = null; // clear previous history
- ISystemFilterString[] strings = getSelectedFilterStrings();
- String[] names = new String[strings.length];
- for (int idx=0; idx<strings.length; idx++)
- names[idx] = strings[idx].getString();
- return names;
- }
-
- /**
- * Get the currently selected filter strings
- */
- protected ISystemFilterString[] getSelectedFilterStrings()
- {
- if (strings == null)
- {
- IStructuredSelection selection = getSelection();
- strings = new ISystemFilterString[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- {
- Object next = i.next();
- if (next instanceof SystemSimpleContentElement)
- next = ((SystemSimpleContentElement)next).getData();
- if (next instanceof ISystemFilterStringReference)
- strings[idx++] = ((ISystemFilterStringReference)next).getReferencedFilterString();
- else
- strings[idx++] = (ISystemFilterString)next;
- }
- }
- return strings;
- }
- /**
- * Get the intersection list of filters of currently selected filter strings
- */
- protected ISystemFilter[] getSelectedFilters()
- {
- Vector v = new Vector();
- ISystemFilterString[] strings = getSelectedFilterStrings();
- for (int idx=0; idx<strings.length; idx++)
- {
- ISystemFilter filter = strings[idx].getParentSystemFilter();
- if (!supportsDuplicateFilterStrings(filter))
- {
- if (!containsFilter(v,filter))
- v.addElement(filter);
- }
- }
- ISystemFilter[] filters = new ISystemFilter[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- filters[idx] = (ISystemFilter)v.elementAt(idx);
- return filters;
- }
- /**
- * Get the first selected filter string
- */
- protected ISystemFilterString getFirstSelectedFilterString()
- {
- Object first = getFirstSelection();
- if (first instanceof SystemSimpleContentElement)
- {
- root = ((SystemSimpleContentElement)first).getRoot();
- first = ((SystemSimpleContentElement)first).getData();
- }
- if (first == null)
- return null;
- else if (first instanceof ISystemFilterStringReference)
- return ((ISystemFilterStringReference)first).getReferencedFilterString();
- else if (first instanceof ISystemFilterString)
- return (ISystemFilterString)first;
- else
- return null;
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-
- /**
- * Create and return data model to populate selection tree with.
- * @param poolMgrProvider The provider who will give us the list of filter pool managers to populate the list with
- * @param poolMgr The SystemFilterPoolManager whose tree model element is to be pre-selected
- * @param filtersToExclude All the currently selected filters, which are excluded from the target list
- */
- protected SystemSimpleContentElement getPoolMgrTreeModel(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPoolManager poolMgr,
- ISystemFilter[] filtersToExclude)
- {
- SystemSimpleContentElement veryRootElement =
- new SystemSimpleContentElement("Root", //$NON-NLS-1$
- null, null, (Vector)null);
- veryRootElement.setRenamable(false);
- veryRootElement.setDeletable(false);
-
- ISystemFilterPoolManager[] mgrs = poolMgrProvider.getSystemFilterPoolManagers();
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)poolMgrProvider.getAdapter(ISubSystemConfigurationAdapter.class);
- ImageDescriptor image = adapter.getSystemFilterPoolManagerImage();
-
- if ((mgrs == null) || (mgrs.length == 0))
- return veryRootElement;
-
- ISystemFilter parentFilter = getFirstSelectedFilterString().getParentSystemFilter();
- ISystemFilterPool parentFilterPool = parentFilter.getParentFilterPool();
-
- Vector veryRootChildren = new Vector();
- for (int idx=0; idx<mgrs.length; idx++)
- {
- SystemSimpleContentElement mgrElement =
- new SystemSimpleContentElement(mgrs[idx].getName(),
- mgrs[idx], veryRootElement, (Vector)null);
- mgrElement.setRenamable(false);
- mgrElement.setDeletable(false);
- mgrElement.setImageDescriptor(image);
-
- Vector elements = new Vector();
- populateFilterPoolContentElementVector(poolMgrProvider, mgrs[idx], elements,
- mgrElement, filtersToExclude, parentFilterPool, parentFilter);
- mgrElement.setChildren(elements);
-
- veryRootChildren.addElement(mgrElement);
- //if (mgrs[idx] == poolMgr)
- // initialSelectionElement = mgrElement;
- }
- veryRootElement.setChildren(veryRootChildren);
- return veryRootElement;
- }
-
- /**
- * Populate filter pool manager subtree with filter pools
- */
- protected void populateFilterPoolContentElementVector(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPoolManager mgr,
- Vector elements,
- SystemSimpleContentElement parentElement,
- ISystemFilter[] filtersToExclude,
- ISystemFilterPool filterPoolToSelect,
- ISystemFilter filterToSelect)
- {
- ISystemFilterPool[] pools = mgr.getSystemFilterPools();
- for (int idx=0; idx<pools.length; idx++)
- {
- ISystemFilterPool pool = pools[idx];
- SystemSimpleContentElement cElement =
- new SystemSimpleContentElement(pool.getName(), pool, parentElement, (Vector)null);
- cElement.setImageDescriptor(SystemFilterUIHelpers.getFilterPoolImage(poolMgrProvider,pool));
-
- Vector childElements = new Vector();
- populateFilterContentElementVector(poolMgrProvider, pool, childElements, cElement, filtersToExclude, filterToSelect);
- cElement.setChildren(childElements);
-
- elements.addElement(cElement);
- if ((pool == filterPoolToSelect) && (initialSelectionElement==null))
- initialSelectionElement = cElement;
- }
- }
-
- /**
- * Populate filter pool subtree with filters
- */
- protected void populateFilterContentElementVector(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPool pool,
- Vector elements,
- SystemSimpleContentElement parentElement,
- ISystemFilter[] filtersToExclude,
- ISystemFilter filterToSelect)
- {
- ISystemFilter[] filters = pool.getSystemFilters();
- for (int idx=0; idx<filters.length; idx++)
- {
- ISystemFilter filter = filters[idx];
- if (!filter.isNonChangable() && !filter.isPromptable() && // defect 43242
- !containsFilter(filtersToExclude,filter))
- {
- SystemSimpleContentElement cElement =
- new SystemSimpleContentElement(filter.getName(), filter, parentElement, (Vector)null);
- cElement.setImageDescriptor(SystemFilterUIHelpers.getFilterImage(poolMgrProvider, filter));
- elements.addElement(cElement);
- if (filterToSelect == filter)
- initialSelectionElement = cElement;
- }
- }
- }
-
- private static boolean containsFilter(ISystemFilter[] filters, ISystemFilter filter)
- {
- ISystemFilter match = null;
- for (int idx=0; (match==null) && (idx<filters.length); idx++)
- if (filters[idx] == filter)
- match = filters[idx];
- return (match != null);
- }
- public static boolean containsFilter(Vector filters, ISystemFilter filter)
- {
- ISystemFilter match = null;
- for (int idx=0; (match==null) && (idx<filters.size()); idx++)
- if (filters.elementAt(idx) == filter)
- match = (ISystemFilter)filters.elementAt(idx);
- return (match != null);
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 79d356051..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterAction.java
+++ /dev/null
@@ -1,153 +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.filters.actions;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action allows users to move the current filter down in the list
- */
-public class SystemFilterMoveDownFilterAction extends SystemBaseAction
-
-{
-
-
- /**
- * Constructor
- */
- public SystemFilterMoveDownFilterAction(Shell parent)
- {
- super(SystemResources.ACTION_MOVEDOWN_LABEL,SystemResources.ACTION_MOVEDOWN_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID),
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * Intercept of parent method. We need to test that the filters
- * come from the same parent
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- ISystemFilterContainer prevContainer = null;
- boolean enable = true;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- ISystemFilter filter = getSystemFilter(selectedObject);
- if (prevContainer != null)
- {
- if (prevContainer != filter.getParentFilterContainer())
- enable = false;
- else
- prevContainer = filter.getParentFilterContainer();
- }
- else
- prevContainer = filter.getParentFilterContainer();
- if (enable)
- enable = checkObjectType(filter);
- }
- return enable;
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (!((selectedObject instanceof ISystemFilter) ||
- (selectedObject instanceof ISystemFilterReference)))
- return false;
-
- ISystemFilter filter = getSystemFilter(selectedObject);
- //SystemFilterPoolManager fpMgr = filter.getSystemFilterPoolManager();
- ISystemFilterContainer fpContainer = filter.getParentFilterContainer();
- int pos = fpContainer.getSystemFilterPosition(filter);
- return (pos < (fpContainer.getSystemFilterCount()-1));
- }
-
- private ISystemFilter getSystemFilter(Object selectedObject)
- {
- if (selectedObject instanceof ISystemFilter)
- return (ISystemFilter)selectedObject;
- else
- return ((ISystemFilterReference)selectedObject).getReferencedFilter();
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- IStructuredSelection selections = getSelection();
-
- SystemSortableSelection[] sortableArray = new SystemSortableSelection[selections.size()];
- Iterator i = selections.iterator();
- int idx = 0;
- ISystemFilter filter = null;
- ISystemFilterContainer fpContainer = null;
- while (i.hasNext())
- {
- sortableArray[idx] = new SystemSortableSelection(getSystemFilter(i.next()));
- filter = (ISystemFilter)sortableArray[idx].getSelectedObject();
- fpContainer = filter.getParentFilterContainer();
- sortableArray[idx].setPosition(fpContainer.getSystemFilterPosition(filter));
- idx++;
- }
- SystemSortableSelection.sortArray(sortableArray);
- ISystemFilter[] filters = (ISystemFilter[])SystemSortableSelection.getSortedObjects(sortableArray, new ISystemFilter[sortableArray.length]);
-
- if (idx>0)
- {
- ISystemFilterPoolManager fpMgr = filters[0].getSystemFilterPoolManager();
- try {
- fpMgr.moveSystemFilters(filters,1);
- } catch (Exception exc)
- {
- }
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ce5918e64..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterPoolReferenceAction.java
+++ /dev/null
@@ -1,141 +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.filters.actions;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action allows users to move the current filter down in the list
- */
-public class SystemFilterMoveDownFilterPoolReferenceAction extends SystemBaseAction
-
-{
-
-
- /**
- * Constructor
- */
- public SystemFilterMoveDownFilterPoolReferenceAction(Shell parent)
- {
- super(SystemResources.ACTION_MOVEDOWN_LABEL,SystemResources.ACTION_MOVEDOWN_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID),
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * Intercept of parent method. We need to test that the filter pools
- * come from the same parent
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- ISystemFilterPoolReferenceManager prevMgr = null;
- boolean enable = true;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- ISystemFilterPoolReference filterPoolRef = (ISystemFilterPoolReference)selectedObject;
- if (prevMgr != null)
- {
- if (prevMgr != filterPoolRef.getFilterPoolReferenceManager())
- enable = false;
- else
- prevMgr = filterPoolRef.getFilterPoolReferenceManager();
- }
- else
- prevMgr = filterPoolRef.getFilterPoolReferenceManager();
- if (enable)
- enable = checkObjectType(filterPoolRef);
- }
- return enable;
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (!(selectedObject instanceof ISystemFilterPoolReference))
- return false;
- ISystemFilterPoolReference filterPoolRef = (ISystemFilterPoolReference)selectedObject;
- ISystemFilterPoolReferenceManager fprMgr = filterPoolRef.getFilterPoolReferenceManager();
- int pos = fprMgr.getSystemFilterPoolReferencePosition(filterPoolRef);
- return (pos < (fprMgr.getSystemFilterPoolReferenceCount()-1));
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- IStructuredSelection selections = getSelection();
- //SystemFilterPoolReference filterPoolRefs[] = new SystemFilterPoolReference[selections.size()];
- //Iterator i = selections.iterator();
- //int idx = 0;
- //while (i.hasNext())
- //filterPoolRefs[idx++] = (SystemFilterPoolReference)i.next();
-
- SystemSortableSelection[] sortableArray = new SystemSortableSelection[selections.size()];
- Iterator i = selections.iterator();
- int idx = 0;
- ISystemFilterPoolReference filterPoolRef = null;
- ISystemFilterPoolReferenceManager fprMgr = null;
- while (i.hasNext())
- {
- sortableArray[idx] = new SystemSortableSelection(i.next());
- filterPoolRef = (ISystemFilterPoolReference)sortableArray[idx].getSelectedObject();
- fprMgr = filterPoolRef.getFilterPoolReferenceManager();
- sortableArray[idx].setPosition(fprMgr.getSystemFilterPoolReferencePosition(filterPoolRef));
- idx++;
- }
- SystemSortableSelection.sortArray(sortableArray);
- ISystemFilterPoolReference[] filterPoolRefs = (ISystemFilterPoolReference[])SystemSortableSelection.getSortedObjects(sortableArray, new ISystemFilterPoolReference[sortableArray.length]);
-
- if (idx>0)
- {
- fprMgr = filterPoolRefs[0].getFilterPoolReferenceManager();
- fprMgr.moveSystemFilterPoolReferences(filterPoolRefs,1);
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 91a83acea..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterAction.java
+++ /dev/null
@@ -1,370 +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.filters.actions;
-import java.util.Iterator;
-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.jface.viewers.TreeViewer;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.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.SystemBaseCopyAction;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Copy a filter action.
- */
-public class SystemFilterMoveFilterAction extends SystemBaseCopyAction
-{
- private String promptString = null;
- private SystemSimpleContentElement initialSelectionElement = null;
- private SystemSimpleContentElement root = null;
-
- /**
- * Constructor
- */
- public SystemFilterMoveFilterAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_MOVE_FILTER_LABEL, MODE_MOVE);
- promptString = SystemResources.RESID_MOVE_PROMPT;
- }
-
- /**
- * Reset. This is a re-run of this action
- */
- protected void reset()
- {
- super.reset();
- initialSelectionElement = null;
- root = null;
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- /* */
- Iterator e= selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof SystemSimpleContentElement)
- selectedObject = ((SystemSimpleContentElement)selectedObject).getData();
- if (!checkObjectType(selectedObject))
- enable = false;
- }
- /* */
- return enable;
- }
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (selectedObject instanceof ISystemFilter)
- {
- ISystemFilter fs = (ISystemFilter)selectedObject;
- return !fs.isNonChangable();
- }
- else if (selectedObject instanceof ISystemFilterReference)
- {
- ISystemFilter fs = ((ISystemFilterReference)selectedObject).getReferencedFilter();
- return !fs.isNonChangable();
- }
- else
- return false;
- }
-
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
- /**
- * This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected
- * object is a valid parent object. This affects the enabling of the OK button on that dialog.
- */
- public boolean isValidTargetParent(SystemSimpleContentElement selectedElement)
- {
- if (selectedElement == null)
- return false;
- Object data = selectedElement.getData();
- return (data instanceof ISystemFilterPool);
- }
-
- /**
- * @see SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)
- */
- protected String checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, Object oldObject, String oldName)
- {
- ISystemFilterPool newPool = (ISystemFilterPool)targetContainer;
- //ISystemFilterPoolManager newMgr = newPool.getSystemFilterPoolManager();
- String newName = oldName;
- ISystemFilter match = newPool.getSystemFilter(oldName);
- if (match != null)
- {
- //monitor.setVisible(false); wish we could!
- //ValidatorFilterName validator = new ValidatorFilterName(newPool.getSystemFilterNames());
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(shell, true, match, null); // true => copy-collision-mode
- dlg.open();
- if (!dlg.wasCancelled())
- newName = dlg.getNewName();
- else
- newName = null;
- }
- return newName;
- }
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- ISystemFilter oldFilter = (ISystemFilter)oldObject;
- ISystemFilterPool oldFilterPool = oldFilter.getParentFilterPool();
- ISystemFilterPoolManager oldMgr = oldFilterPool.getSystemFilterPoolManager();
- ISystemFilterPool newPool = (ISystemFilterPool)targetContainer;
- //ISystemFilterPoolManager newMgr = newPool.getSystemFilterPoolManager();
-
- ISystemFilter newFilter = oldMgr.moveSystemFilter(newPool, oldFilter, newName);
-
- if ((root != null) && (newFilter!=null))
- {
- Object data = root.getData();
- if ((data!=null) && (data instanceof TreeViewer))
- ((TreeViewer)data).refresh();
- }
- return (newFilter != null);
- }
-
- /**
- * @see SystemBaseCopyAction#getTreeModel()
- */
- protected SystemSimpleContentElement getTreeModel()
- {
- ISystemFilter firstFilter = getFirstSelectedFilter();
- ISystemFilterPoolManagerProvider provider = firstFilter.getProvider();
- return getPoolMgrTreeModel(provider, firstFilter.getSystemFilterPoolManager(), firstFilter.getParentFilterPool());
- }
- /**
- * @see SystemBaseCopyAction#getTreeInitialSelection()
- */
- protected SystemSimpleContentElement getTreeInitialSelection()
- {
- return initialSelectionElement;
- }
-
- /**
- * Set the prompt string that shows up at the top of the copy-destination dialog.
- */
- public void setPromptString(String promptString)
- {
- this.promptString = promptString;
- }
- /**
- * @see SystemBaseCopyAction#getPromptString()
- */
- protected String getPromptString()
- {
- return promptString;
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage()
- */
- protected SystemMessage getCopyingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVEFILTERS_PROGRESS);
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage( String)
- */
- protected SystemMessage getCopyingMessage(String oldName)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVEFILTER_PROGRESS).makeSubstitution(oldName);
- }
-
- /**
- * @see SystemBaseCopyAction#getOldObjects()
- */
- protected Object[] getOldObjects()
- {
- return getSelectedFilters();
- }
-
- /**
- * @see SystemBaseCopyAction#getOldNames()
- */
- protected String[] getOldNames()
- {
- ISystemFilter[] filters = getSelectedFilters();
- String[] names = new String[filters.length];
- for (int idx=0; idx<filters.length; idx++)
- names[idx] = filters[idx].getName();
- return names;
- }
-
- /**
- * Get the currently selected filters
- */
- protected ISystemFilter[] getSelectedFilters()
- {
- IStructuredSelection selection = getSelection();
- ISystemFilter[] filters = new ISystemFilter[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- {
- Object next = i.next();
- if (next instanceof SystemSimpleContentElement)
- next = ((SystemSimpleContentElement)next).getData();
- if (next instanceof ISystemFilterReference)
- filters[idx++] = ((ISystemFilterReference)next).getReferencedFilter();
- else
- filters[idx++] = (ISystemFilter)next;
- }
- return filters;
- }
- /**
- * Get the first selected filter
- */
- protected ISystemFilter getFirstSelectedFilter()
- {
- Object first = getFirstSelection();
- if (first instanceof SystemSimpleContentElement)
- {
- root = ((SystemSimpleContentElement)first).getRoot();
- first = ((SystemSimpleContentElement)first).getData();
- }
- if (first == null)
- return null;
- else if (first instanceof ISystemFilterReference)
- return ((ISystemFilterReference)first).getReferencedFilter();
- else if (first instanceof ISystemFilter)
- return (ISystemFilter)first;
- else
- return null;
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-
- /**
- * Create and return data model to populate selection tree with.
- * @param poolMgrProvider The provider who will give us the list of filter pool managers to populate the list with
- * @param poolMgr The SystemFilterPoolManager whose tree model element is to be pre-selected
- * @param pool The SystemFilterPool whose tree model element is to be excluded
- */
- protected SystemSimpleContentElement getPoolMgrTreeModel(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPoolManager poolMgr,
- ISystemFilterPool pool)
- {
- SystemSimpleContentElement veryRootElement =
- new SystemSimpleContentElement("Root", //$NON-NLS-1$
- null, null, (Vector)null);
- veryRootElement.setRenamable(false);
- veryRootElement.setDeletable(false);
-
- ISystemFilterPoolManager[] mgrs = poolMgrProvider.getSystemFilterPoolManagers();
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)poolMgrProvider.getAdapter(ISubSystemConfigurationAdapter.class);
- ImageDescriptor image = adapter.getSystemFilterPoolManagerImage();
-
- if ((mgrs == null) || (mgrs.length == 0))
- return veryRootElement;
-
- Vector veryRootChildren = new Vector();
- for (int idx=0; idx<mgrs.length; idx++)
- {
- SystemSimpleContentElement mgrElement =
- new SystemSimpleContentElement(mgrs[idx].getName(),
- mgrs[idx], veryRootElement, (Vector)null);
- mgrElement.setRenamable(false);
- mgrElement.setDeletable(false);
- mgrElement.setImageDescriptor(image);
-
- Vector elements = new Vector();
- populateFilterPoolContentElementVector(poolMgrProvider, mgrs[idx], elements, mgrElement, pool);
- mgrElement.setChildren(elements);
-
- if (mgrs[idx] == poolMgr)
- initialSelectionElement = mgrElement;
-
- veryRootChildren.addElement(mgrElement);
- }
- veryRootElement.setChildren(veryRootChildren);
- return veryRootElement;
- }
-
- /**
- * Populate filter pool manager subtree with filter pools
- */
- protected static void populateFilterPoolContentElementVector(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPoolManager mgr,
- Vector elements,
- SystemSimpleContentElement parentElement,
- ISystemFilterPool poolToExclude)
- {
- ISystemFilterPool[] pools = mgr.getSystemFilterPools();
- for (int idx=0; idx<pools.length; idx++)
- {
- ISystemFilterPool pool = pools[idx];
- if (pool != poolToExclude)
- {
- SystemSimpleContentElement cElement =
- new SystemSimpleContentElement(pool.getName(), pool, parentElement, (Vector)null);
- cElement.setImageDescriptor(SystemFilterUIHelpers.getFilterPoolImage(poolMgrProvider, pool));
- //cElement.setSelected(setFilterPoolSelection(pool));
- elements.addElement(cElement);
- }
- }
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 48ee535b3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterPoolAction.java
+++ /dev/null
@@ -1,369 +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.filters.actions;
-import java.util.Iterator;
-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.jface.viewers.TreeViewer;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.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.SystemBaseCopyAction;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Move a filter pool action.
- */
-public class SystemFilterMoveFilterPoolAction extends SystemBaseCopyAction
-{
- private String promptString = null;
- private SystemSimpleContentElement initialSelectionElement = null;
- private SystemSimpleContentElement root = null;
-
- /**
- * Constructor
- */
- public SystemFilterMoveFilterPoolAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_MOVE_FILTERPOOL_LABEL, MODE_MOVE);
- promptString = SystemResources.RESID_MOVE_PROMPT;
- }
-
- /**
- * Reset. This is a re-run of this action
- */
- protected void reset()
- {
- super.reset();
- initialSelectionElement = null;
- root = null;
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * We intercept to ensure only filterpools from the same filterpool manager are selected.
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- /* */
- Iterator e = selection.iterator();
- ISystemFilterPoolManager prevMgr = null;
- ISystemFilterPoolManager currMgr = null;
- ISystemFilterPool pool;
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof SystemSimpleContentElement)
- selectedObject = ((SystemSimpleContentElement)selectedObject).getData();
- if (!(selectedObject instanceof ISystemFilterPool) &&
- !(selectedObject instanceof ISystemFilterPoolReference))
- enable = false;
- // disable if this is a connection-unique filter pool
- else if (selectedObject instanceof ISystemFilterPool)
- enable = ((ISystemFilterPool)selectedObject).getOwningParentName() == null;
- // disable if this is a connection-unique filter pool
- else if (selectedObject instanceof ISystemFilterPoolReference)
- enable = ((ISystemFilterPoolReference)selectedObject).getReferencedFilterPool().getOwningParentName() == null;
-
- if (enable)
- {
- if (selectedObject instanceof ISystemFilterPool)
- pool = (ISystemFilterPool)selectedObject;
- else
- pool = ((ISystemFilterPoolReference)selectedObject).getReferencedFilterPool();
- currMgr = pool.getSystemFilterPoolManager();
- if (prevMgr == null)
- prevMgr = currMgr;
- else
- enable = (prevMgr == currMgr);
- if (enable)
- prevMgr = currMgr;
- }
- }
- /* */
- return enable;
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
- /**
- * This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected
- * object is a valid parent object. This affects the enabling of the OK button on that dialog.
- */
- public boolean isValidTargetParent(SystemSimpleContentElement selectedElement)
- {
- if (selectedElement == null)
- return false;
- Object data = selectedElement.getData();
- return (data instanceof ISystemFilterPoolManager);
- }
-
- /**
- * @see SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)
- */
- protected String checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, Object oldObject, String oldName)
- {
- ISystemFilterPoolManager newMgr = (ISystemFilterPoolManager)targetContainer;
- String newName = oldName;
- ISystemFilterPool match = newMgr.getSystemFilterPool(oldName);
- if (match != null)
- {
- //monitor.setVisible(false); wish we could!
- //ValidatorFilterPoolName validator = new ValidatorFilterPoolName(newMgr.getSystemFilterPoolNames());
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(shell, true, match, null); // true => copy-collision-mode
- dlg.open();
- if (!dlg.wasCancelled())
- newName = dlg.getNewName();
- else
- newName = null;
- }
- return newName;
- }
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- ISystemFilterPool oldFilterPool = (ISystemFilterPool)oldObject;
- ISystemFilterPoolManager oldMgr = oldFilterPool.getSystemFilterPoolManager();
- ISystemFilterPoolManager newMgr = (ISystemFilterPoolManager)targetContainer;
- ISystemFilterPool newFilterPool = oldMgr.moveSystemFilterPool(newMgr, oldFilterPool, newName);
- if ((root != null) && (newFilterPool!=null))
- {
- Object data = root.getData();
- if ((data!=null) && (data instanceof TreeViewer))
- ((TreeViewer)data).refresh();
- }
- return (newFilterPool != null);
- }
-
- /**
- * @see SystemBaseCopyAction#getTreeModel()
- */
- protected SystemSimpleContentElement getTreeModel()
- {
- ISystemFilterPool firstPool = getFirstSelectedFilterPool();
- ISystemFilterPoolManagerProvider provider = firstPool.getProvider();
-
- return getPoolMgrTreeModel(provider, firstPool.getSystemFilterPoolManager());
- }
- /**
- * @see SystemBaseCopyAction#getTreeInitialSelection()
- */
- protected SystemSimpleContentElement getTreeInitialSelection()
- {
- return initialSelectionElement;
- }
-
- /**
- * Set the prompt string that shows up at the top of the copy-destination dialog.
- */
- public void setPromptString(String promptString)
- {
- this.promptString = promptString;
- }
- /**
- * @see SystemBaseCopyAction#getPromptString()
- */
- protected String getPromptString()
- {
- return promptString;
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage()
- */
- protected SystemMessage getCopyingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVEFILTERPOOLS_PROGRESS);
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage( String)
- */
- protected SystemMessage getCopyingMessage(String oldName)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVEFILTERPOOL_PROGRESS).makeSubstitution(oldName);
- }
- /**
- * Return complete message
- */
- public SystemMessage getCompletionMessage(Object targetContainer, String[] oldNames, String[] newNames)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVEFILTERPOOL_COMPLETE).makeSubstitution(((ISystemFilterPoolManager)targetContainer).getName());
- }
-
- /**
- * @see SystemBaseCopyAction#getOldObjects()
- */
- protected Object[] getOldObjects()
- {
- return getSelectedFilterPools();
- }
-
- /**
- * @see SystemBaseCopyAction#getOldNames()
- */
- protected String[] getOldNames()
- {
- ISystemFilterPool[] filterPools = getSelectedFilterPools();
- String[] names = new String[filterPools.length];
- for (int idx=0; idx<filterPools.length; idx++)
- names[idx] = filterPools[idx].getName();
- return names;
- }
-
- /**
- * Get the currently selected filter pools
- */
- protected ISystemFilterPool[] getSelectedFilterPools()
- {
- IStructuredSelection selection = getSelection();
- ISystemFilterPool[] filterPools = new ISystemFilterPool[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- {
- Object next = i.next();
- if (next instanceof SystemSimpleContentElement)
- next = ((SystemSimpleContentElement)next).getData();
- if (next instanceof ISystemFilterPoolReference)
- filterPools[idx++] = ((ISystemFilterPoolReference)next).getReferencedFilterPool();
- else
- filterPools[idx++] = (ISystemFilterPool)next;
- }
- return filterPools;
- }
- /**
- * Get the managers of the currently selected filter pools
- */
- protected ISystemFilterPoolManager[] getSelectedFilterPoolManagers()
- {
- ISystemFilterPoolManager[] mgrs = null;
- Vector v = new Vector();
- ISystemFilterPool[] pools = getSelectedFilterPools();
- for (int idx=0; idx<pools.length; idx++)
- {
- ISystemFilterPoolManager mgr = pools[idx].getSystemFilterPoolManager();
- if (!v.contains(mgr))
- v.addElement(mgr);
- }
-
- mgrs = new ISystemFilterPoolManager[v.size()];
- for (int idx=0; idx<mgrs.length; idx++)
- mgrs[idx] = (ISystemFilterPoolManager)v.elementAt(idx);
-
- return mgrs;
- }
-
- /**
- * Get the first selected filter pool
- */
- protected ISystemFilterPool getFirstSelectedFilterPool()
- {
- Object first = getFirstSelection();
- if (first instanceof SystemSimpleContentElement)
- {
- root = ((SystemSimpleContentElement)first).getRoot();
- first = ((SystemSimpleContentElement)first).getData();
- }
- if (first == null)
- return null;
- else if (first instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference)first).getReferencedFilterPool();
- else if (first instanceof ISystemFilterPool)
- return (ISystemFilterPool)first;
- else
- return null;
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-
- /**
- * Create and return data model to populate selection tree with.
- * @param poolMgrProvider The provider who will give us the list of filter pool managers to populate the list with
- * @param poolMgr The current SystemFilterPoolManager which is to be excluded from the list.
- */
- protected SystemSimpleContentElement getPoolMgrTreeModel(ISystemFilterPoolManagerProvider poolMgrProvider, ISystemFilterPoolManager poolMgr)
- {
- SystemSimpleContentElement veryRootElement =
- new SystemSimpleContentElement("Root", //$NON-NLS-1$
- null, null, (Vector)null);
- veryRootElement.setRenamable(false);
- veryRootElement.setDeletable(false);
-
- ISystemFilterPoolManager[] mgrs = poolMgrProvider.getSystemFilterPoolManagers();
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)poolMgrProvider.getAdapter(ISubSystemConfigurationAdapter.class);
- ImageDescriptor image = adapter.getSystemFilterPoolManagerImage();
-
- if ((mgrs == null) || (mgrs.length == 0))
- return veryRootElement;
-
- Vector veryRootChildren = new Vector();
- for (int idx=0; idx<mgrs.length; idx++)
- {
- if (mgrs[idx] != poolMgr)
- {
- SystemSimpleContentElement mgrElement =
- new SystemSimpleContentElement(mgrs[idx].getName(),
- mgrs[idx], veryRootElement, (Vector)null);
- mgrElement.setRenamable(false);
- mgrElement.setDeletable(false);
- mgrElement.setImageDescriptor(image);
- veryRootChildren.addElement(mgrElement);
- if (initialSelectionElement == null)
- initialSelectionElement = mgrElement;
- }
- }
- veryRootElement.setChildren(veryRootChildren);
- return veryRootElement;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index cdfab0187..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterStringAction.java
+++ /dev/null
@@ -1,485 +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.filters.actions;
-import java.util.Iterator;
-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.jface.viewers.TreeViewer;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.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.SystemBaseCopyAction;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Move a filter string action.
- */
-public class SystemFilterMoveFilterStringAction extends SystemBaseCopyAction
-{
- private String promptString = null;
- private SystemSimpleContentElement initialSelectionElement = null;
- private SystemSimpleContentElement root = null;
- private ISystemFilterString[] strings = null;
-
- /**
- * Constructor
- */
- public SystemFilterMoveFilterStringAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_MOVE_FILTERSTRING_LABEL, MODE_MOVE);
- promptString = SystemResources.RESID_MOVE_PROMPT;
- }
-
- /**
- * Reset. This is a re-run of this action
- */
- protected void reset()
- {
- super.reset();
- initialSelectionElement = null;
- root = null;
- strings = null;
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * Overridable method if you support duplicate filter strings in the same filter.
- * By default, queries the "supportsDuplicateFilterStrings" attribute in the filter.
- */
- protected boolean supportsDuplicateFilterStrings(ISystemFilter filter)
- {
- return filter.isSupportsDuplicateFilterStrings();
- }
-
- /**
- * We override from parent to do unique checking...
- * <p>
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- /* */
- Iterator e= selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- if (selectedObject instanceof SystemSimpleContentElement)
- selectedObject = ((SystemSimpleContentElement)selectedObject).getData();
- if (!checkObjectType(selectedObject))
- enable = false;
- }
- /* */
- return enable;
- }
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (selectedObject instanceof ISystemFilterString)
- {
- ISystemFilterString fs = (ISystemFilterString)selectedObject;
- return fs.isChangable();
- }
- else if (selectedObject instanceof ISystemFilterStringReference)
- {
- ISystemFilterStringReference frs = (ISystemFilterStringReference)selectedObject;
- return frs.getReferencedFilterString().isChangable();
- }
- else
- return false;
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
- /**
- * This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected
- * object is a valid parent object. This affects the enabling of the OK button on that dialog.
- * <p>
- * The default is to return true if the selected element has no children. This is sufficient for most cases. However,
- * in some cases it is not, such as for filter strings where we want to only enable OK if a filter is selected. It is
- * possible that filter pools have no filters, so the default algorithm is not sufficient. In these cases the child class
- * can override this method.
- */
- public boolean isValidTargetParent(SystemSimpleContentElement selectedElement)
- {
- Object data = selectedElement.getData();
- if (data instanceof ISystemFilter)
- return !((ISystemFilter)data).isPromptable();
- else
- return false;
- }
-
- /**
- * Overridable entry point when you want to prevent any copies/moves if any of the
- * selected objects have a name collision.
- * <p>
- * If you decide to override this, it is your responsibility to issue the error
- * message to the user and return false here.
- * <p>
- * @return true if there is no problem, false if there is a fatal collision
- */
- protected boolean preCheckForCollision(Shell shell, Object targetContainer,
- Object oldObject, String oldName)
- {
- ISystemFilter newFilter = (ISystemFilter)targetContainer;
- if (supportsDuplicateFilterStrings(newFilter))
- return true;
- ISystemFilterString match = newFilter.getSystemFilterString(oldName);
- if (match != null)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_ALREADYEXISTS);
- msg.makeSubstitution(oldName, newFilter.getName());
- SystemMessageDialog.displayErrorMessage(shell, msg);
-
- }
- return (match == null); // all is well iff such a filter string doesn't already exist.
- }
-
- /**
- * SHOULD NEVER BE CALLED IF preCheckForCollision WORKS PROPERLY
- * @see SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)
- */
- protected String checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, Object oldObject, String oldName)
- {
- ISystemFilter newFilter = (ISystemFilter)targetContainer;
- if (supportsDuplicateFilterStrings(newFilter))
- return oldName;
- //ISystemFilterPool newPool = newFilter.getParentFilterPool();
- //ISystemFilterPoolManager newMgr = newPool.getSystemFilterPoolManager();
- String newName = oldName;
- ISystemFilterString match = newFilter.getSystemFilterString(oldName);
- if (match != null)
- {
- //monitor.setVisible(false); wish we could!
- boolean caseSensitive = false;
- ValidatorUniqueString validator = new ValidatorUniqueString(newFilter.getFilterStrings(),caseSensitive);
- //SystemCollisionRenameDialog dlg = new SystemCollisionRenameDialog(shell, validator, oldName);
- SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(shell, true, match, validator); // true => copy-collision-mode
- dlg.open();
- if (!dlg.wasCancelled())
- newName = dlg.getNewName();
- else
- newName = null;
- }
- return newName;
- }
- /**
- * @see SystemBaseCopyAction#doCopy(IProgressMonitor, Object, Object, String)
- */
- protected boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
- throws Exception
- {
- ISystemFilterString oldFilterString = (ISystemFilterString)oldObject;
- ISystemFilterPoolManager oldMgr = oldFilterString.getSystemFilterPoolManager();
- ISystemFilter targetFilter = (ISystemFilter)targetContainer;
- //SystemFilterPoolManager newMgr = targetFilter.getSystemFilterPoolManager();
-
- ISystemFilterString newFilterString = oldMgr.moveSystemFilterString(targetFilter, oldFilterString);
-
- if ((root != null) && (newFilterString!=null))
- {
- Object data = root.getData();
- if ((data!=null) && (data instanceof TreeViewer))
- ((TreeViewer)data).refresh();
- }
- return (newFilterString != null);
- }
-
- /**
- * @see SystemBaseCopyAction#getTreeModel()
- */
- protected SystemSimpleContentElement getTreeModel()
- {
- ISystemFilterString firstFilterString = getFirstSelectedFilterString();
- ISystemFilterPoolManagerProvider provider = firstFilterString.getProvider();
- return getPoolMgrTreeModel(provider, firstFilterString.getSystemFilterPoolManager(), getSelectedFilters());
- }
- /**
- * @see SystemBaseCopyAction#getTreeInitialSelection()
- */
- protected SystemSimpleContentElement getTreeInitialSelection()
- {
- return initialSelectionElement;
- }
-
- /**
- * Set the prompt string that shows up at the top of the copy-destination dialog.
- */
- public void setPromptString(String promptString)
- {
- this.promptString = promptString;
- }
- /**
- * @see SystemBaseCopyAction#getPromptString()
- */
- protected String getPromptString()
- {
- return promptString;
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage()
- */
- protected SystemMessage getCopyingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVEFILTERSTRINGS_PROGRESS);
- }
- /**
- * @see SystemBaseCopyAction#getCopyingMessage( String)
- */
- protected SystemMessage getCopyingMessage(String oldName)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_MOVEFILTERSTRING_PROGRESS).makeSubstitution(oldName);
- }
-
- /**
- * @see SystemBaseCopyAction#getOldObjects()
- */
- protected Object[] getOldObjects()
- {
- return getSelectedFilterStrings();
- }
-
- /**
- * @see SystemBaseCopyAction#getOldNames()
- */
- protected String[] getOldNames()
- {
- ISystemFilterString[] strings = getSelectedFilterStrings();
- String[] names = new String[strings.length];
- for (int idx=0; idx<strings.length; idx++)
- names[idx] = strings[idx].getString();
- return names;
- }
-
- /**
- * Get the currently selected filter strings
- */
- protected ISystemFilterString[] getSelectedFilterStrings()
- {
- if (strings == null)
- {
- IStructuredSelection selection = getSelection();
- strings = new ISystemFilterString[selection.size()];
- Iterator i = selection.iterator();
- int idx=0;
- while (i.hasNext())
- {
- Object next = i.next();
- if (next instanceof SystemSimpleContentElement)
- next = ((SystemSimpleContentElement)next).getData();
- if (next instanceof ISystemFilterStringReference)
- strings[idx++] = ((ISystemFilterStringReference)next).getReferencedFilterString();
- else
- strings[idx++] = (ISystemFilterString)next;
- }
- }
- return strings;
- }
- /**
- * Get the intersection list of filters of currently selected filter strings
- */
- protected ISystemFilter[] getSelectedFilters()
- {
- Vector v = new Vector();
- ISystemFilterString[] strings = getSelectedFilterStrings();
- for (int idx=0; idx<strings.length; idx++)
- {
- ISystemFilter filter = strings[idx].getParentSystemFilter();
- if (!supportsDuplicateFilterStrings(filter) &&
- !SystemFilterCopyFilterStringAction.containsFilter(v,filter))
- v.addElement(filter);
- }
- ISystemFilter[] filters = new ISystemFilter[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- filters[idx] = (ISystemFilter)v.elementAt(idx);
- return filters;
- }
- /**
- * Get the first selected filter string
- */
- protected ISystemFilterString getFirstSelectedFilterString()
- {
- Object first = getFirstSelection();
- if (first instanceof SystemSimpleContentElement)
- {
- root = ((SystemSimpleContentElement)first).getRoot();
- first = ((SystemSimpleContentElement)first).getData();
- }
- if (first == null)
- return null;
- else if (first instanceof ISystemFilterStringReference)
- return ((ISystemFilterStringReference)first).getReferencedFilterString();
- else if (first instanceof ISystemFilterString)
- return (ISystemFilterString)first;
- else
- return null;
- }
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
-
- /**
- * Create and return data model to populate selection tree with.
- * @param poolMgrProvider The provider who will give us the list of filter pool managers to populate the list with
- * @param poolMgr The SystemFilterPoolManager whose tree model element is to be pre-selected
- * @param filtersToExclude All the currently selected filters, which are excluded from the target list
- */
- protected SystemSimpleContentElement getPoolMgrTreeModel(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPoolManager poolMgr,
- ISystemFilter[] filtersToExclude)
- {
- SystemSimpleContentElement veryRootElement =
- new SystemSimpleContentElement("Root", //$NON-NLS-1$
- null, null, (Vector)null);
- veryRootElement.setRenamable(false);
- veryRootElement.setDeletable(false);
-
- ISystemFilterPoolManager[] mgrs = poolMgrProvider.getSystemFilterPoolManagers();
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)poolMgrProvider.getAdapter(ISubSystemConfigurationAdapter.class);
- ImageDescriptor image = adapter.getSystemFilterPoolManagerImage();
-
- if ((mgrs == null) || (mgrs.length == 0))
- return veryRootElement;
-
- ISystemFilter parentFilter = getFirstSelectedFilterString().getParentSystemFilter();
- ISystemFilterPool parentFilterPool = parentFilter.getParentFilterPool();
-
- Vector veryRootChildren = new Vector();
- for (int idx=0; idx<mgrs.length; idx++)
- {
- SystemSimpleContentElement mgrElement =
- new SystemSimpleContentElement(mgrs[idx].getName(),
- mgrs[idx], veryRootElement, (Vector)null);
- mgrElement.setRenamable(false);
- mgrElement.setDeletable(false);
- mgrElement.setImageDescriptor(image);
-
- Vector elements = new Vector();
- populateFilterPoolContentElementVector(poolMgrProvider, mgrs[idx], elements,
- mgrElement, filtersToExclude,
- parentFilterPool, parentFilter);
- mgrElement.setChildren(elements);
-
- veryRootChildren.addElement(mgrElement);
- //if (mgrs[idx] == poolMgr)
- //initialSelectionElement = mgrElement;
- }
- veryRootElement.setChildren(veryRootChildren);
- return veryRootElement;
- }
-
- /**
- * Populate filter pool manager subtree with filter pools
- */
- protected void populateFilterPoolContentElementVector(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPoolManager mgr,
- Vector elements,
- SystemSimpleContentElement parentElement,
- ISystemFilter[] filtersToExclude,
- ISystemFilterPool filterPoolToSelect,
- ISystemFilter filterToSelect)
- {
- ISystemFilterPool[] pools = mgr.getSystemFilterPools();
- for (int idx=0; idx<pools.length; idx++)
- {
- ISystemFilterPool pool = pools[idx];
- SystemSimpleContentElement cElement =
- new SystemSimpleContentElement(pool.getName(), pool, parentElement, (Vector)null);
- cElement.setImageDescriptor(SystemFilterUIHelpers.getFilterPoolImage(poolMgrProvider,pool));
-
- Vector childElements = new Vector();
- populateFilterContentElementVector(poolMgrProvider, pool, childElements, cElement, filtersToExclude, filterToSelect);
- cElement.setChildren(childElements);
-
- elements.addElement(cElement);
- if ((pool == filterPoolToSelect) && (initialSelectionElement==null))
- initialSelectionElement = cElement;
- }
- }
-
- /**
- * Populate filter pool subtree with filters
- */
- protected void populateFilterContentElementVector(ISystemFilterPoolManagerProvider poolMgrProvider,
- ISystemFilterPool pool,
- Vector elements,
- SystemSimpleContentElement parentElement,
- ISystemFilter[] filtersToExclude,
- ISystemFilter filterToSelect)
- {
- ISystemFilter[] filters = pool.getSystemFilters();
- for (int idx=0; idx<filters.length; idx++)
- {
- ISystemFilter filter = filters[idx];
- if (!filter.isNonChangable() && !filter.isPromptable() && // defect 43242
- !containsFilter(filtersToExclude,filter))
- {
- SystemSimpleContentElement cElement =
- new SystemSimpleContentElement(filter.getName(), filter, parentElement, (Vector)null);
- cElement.setImageDescriptor(SystemFilterUIHelpers.getFilterImage(poolMgrProvider,filter));
- elements.addElement(cElement);
- if (filter == filterToSelect)
- initialSelectionElement = cElement;
- }
- }
- }
-
- private boolean containsFilter(ISystemFilter[] filters, ISystemFilter filter)
- {
- ISystemFilter match = null;
- for (int idx=0; (match==null) && (idx<filters.length); idx++)
- if (filters[idx] == filter)
- match = filters[idx];
- return (match != null);
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index c261ff9be..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterAction.java
+++ /dev/null
@@ -1,156 +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.filters.actions;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action allows users to move the current filter up in the list
- */
-public class SystemFilterMoveUpFilterAction extends SystemBaseAction
-
-{
-
- /**
- * Constructor
- */
- public SystemFilterMoveUpFilterAction(Shell parent)
- {
- super(SystemResources.ACTION_MOVEUP_LABEL,SystemResources.ACTION_MOVEUP_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID),
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * Intercept of parent method. We need to test that the filters
- * come from the same parent
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- ISystemFilterContainer prevContainer = null;
- boolean enable = true;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- ISystemFilter filter = getSystemFilter(selectedObject);
- if (prevContainer != null)
- {
- if (prevContainer != filter.getParentFilterContainer())
- enable = false;
- else
- prevContainer = filter.getParentFilterContainer();
- }
- else
- prevContainer = filter.getParentFilterContainer();
- if (enable)
- enable = checkObjectType(filter);
- }
- return enable;
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (!((selectedObject instanceof ISystemFilter) ||
- (selectedObject instanceof ISystemFilterReference)))
- return false;
- ISystemFilter filter = getSystemFilter(selectedObject);
- ISystemFilterContainer fpContainer = filter.getParentFilterContainer();
- int pos = fpContainer.getSystemFilterPosition(filter);
- return (pos>0);
- }
-
- private ISystemFilter getSystemFilter(Object selectedObject)
- {
- if (selectedObject instanceof ISystemFilter)
- return (ISystemFilter)selectedObject;
- else
- return ((ISystemFilterReference)selectedObject).getReferencedFilter();
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- IStructuredSelection selections = getSelection();
- //SystemFilter filters[] = new SystemFilter[selections.size()];
- //Iterator i = selections.iterator();
- //int idx = 0;
- //while (i.hasNext())
- //filters[idx++] = getSystemFilter(i.next());
-
- SystemSortableSelection[] sortableArray = new SystemSortableSelection[selections.size()];
- Iterator i = selections.iterator();
- int idx = 0;
- ISystemFilter filter = null;
- ISystemFilterContainer fpContainer = null;
- while (i.hasNext())
- {
- sortableArray[idx] = new SystemSortableSelection(getSystemFilter(i.next()));
- filter = (ISystemFilter)sortableArray[idx].getSelectedObject();
- fpContainer = filter.getParentFilterContainer();
- sortableArray[idx].setPosition(fpContainer.getSystemFilterPosition(filter));
- idx++;
- }
- SystemSortableSelection.sortArray(sortableArray);
- ISystemFilter[] filters = (ISystemFilter[])SystemSortableSelection.getSortedObjects(sortableArray, new ISystemFilter[sortableArray.length]);
-
- if (idx>0)
- {
- ISystemFilterPoolManager fpMgr = filters[0].getSystemFilterPoolManager();
- try {
- //System.out.println("In SystemFilterMoveUpFilterAction#run(). Calling mgr.moveSystemFilters");
- fpMgr.moveSystemFilters(filters,-1);
- } catch (Exception exc)
- {
- }
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 530b4a8b3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterPoolReferenceAction.java
+++ /dev/null
@@ -1,141 +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.filters.actions;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action allows users to move the current filter pool reference up in the list
- */
-public class SystemFilterMoveUpFilterPoolReferenceAction extends SystemBaseAction
-
-{
-
-
- /**
- * Constructor
- */
- public SystemFilterMoveUpFilterPoolReferenceAction(Shell parent)
- {
- super(SystemResources.ACTION_MOVEUP_LABEL,SystemResources.ACTION_MOVEUP_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID),
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction#setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction#getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * Intercept of parent method. We need to test that the filter pools
- * come from the same parent
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- ISystemFilterPoolReferenceManager prevMgr = null;
- boolean enable = true;
- Iterator e = selection.iterator();
- while (enable && e.hasNext())
- {
- Object selectedObject = e.next();
- ISystemFilterPoolReference filterPoolRef = (ISystemFilterPoolReference)selectedObject;
- if (prevMgr != null)
- {
- if (prevMgr != filterPoolRef.getFilterPoolReferenceManager())
- enable = false;
- else
- prevMgr = filterPoolRef.getFilterPoolReferenceManager();
- }
- else
- prevMgr = filterPoolRef.getFilterPoolReferenceManager();
- if (enable)
- enable = checkObjectType(filterPoolRef);
- }
- return enable;
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (!(selectedObject instanceof ISystemFilterPoolReference))
- return false;
- ISystemFilterPoolReference filterPoolRef = (ISystemFilterPoolReference)selectedObject;
- ISystemFilterPoolReferenceManager fprMgr = filterPoolRef.getFilterPoolReferenceManager();
- int pos = fprMgr.getSystemFilterPoolReferencePosition(filterPoolRef);
- return (pos>0);
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- IStructuredSelection selections = getSelection();
- //SystemFilterPoolReference filterPoolRefs[] = new SystemFilterPoolReference[selections.size()];
- //Iterator i = selections.iterator();
- //int idx = 0;
- //while (i.hasNext())
- //filterPoolRefs[idx++] = (SystemFilterPoolReference)i.next();
-
- SystemSortableSelection[] sortableArray = new SystemSortableSelection[selections.size()];
- Iterator i = selections.iterator();
- int idx = 0;
- ISystemFilterPoolReference filterPoolRef = null;
- ISystemFilterPoolReferenceManager fprMgr = null;
- while (i.hasNext())
- {
- sortableArray[idx] = new SystemSortableSelection(i.next());
- filterPoolRef = (ISystemFilterPoolReference)sortableArray[idx].getSelectedObject();
- fprMgr = filterPoolRef.getFilterPoolReferenceManager();
- sortableArray[idx].setPosition(fprMgr.getSystemFilterPoolReferencePosition(filterPoolRef));
- idx++;
- }
- SystemSortableSelection.sortArray(sortableArray);
- ISystemFilterPoolReference[] filterPoolRefs = (ISystemFilterPoolReference[])SystemSortableSelection.getSortedObjects(sortableArray, new ISystemFilterPoolReference[sortableArray.length]);
-
- if (idx > 0)
- {
- fprMgr = filterPoolRefs[0].getFilterPoolReferenceManager();
- fprMgr.moveSystemFilterPoolReferences(filterPoolRefs,-1);
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 0f62994ba..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterNewFilterPoolAction.java
+++ /dev/null
@@ -1,174 +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.filters.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.ISystemWizardAction;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterNewFilterPoolWizard;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterPoolWizardDialog;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterPoolWizardInterface;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterWorkWithFilterPoolsDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action that displays the New Filter Pool wizard
- * @see #setHelpContextId(String)
- */
-public class SystemFilterNewFilterPoolAction
- extends SystemFilterAbstractFilterPoolWizardAction
- implements ISystemWizardAction
-{
-
- private SystemFilterWorkWithFilterPoolsDialog wwdialog = null;
- //private SystemFilterNewFilterPoolWizard wizard = null;
-
- /**
- * Constructor for SystemNewFilterPoolAction when not called from work-with dialog.
- */
- public SystemFilterNewFilterPoolAction(Shell parent)
- {
- this(parent, null);
- }
-
- /**
- * Constructor for SystemNewFilterPoolAction when called from work-with dialog.
- */
- public SystemFilterNewFilterPoolAction(Shell parent,
- SystemFilterWorkWithFilterPoolsDialog wwdialog)
- {
- super(parent,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOL_ID),
- SystemResources.ACTION_NEWFILTERPOOL_LABEL, SystemResources.ACTION_NEWFILTERPOOL_TOOLTIP);
- this.wwdialog = wwdialog;
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- }
-
- /**
- * Override of init in parent
- */
- protected void init()
- {
- super.init();
- dlgInputs.prompt = SystemResources.RESID_NEWFILTERPOOL_PAGE1_DESCRIPTION;
- dlgInputs.title = SystemResources.RESID_NEWFILTERPOOL_PAGE1_TITLE;
- dlgInputs.poolNamePrompt = SystemResources.RESID_FILTERPOOLNAME_LABEL;
- dlgInputs.poolNameTip = SystemResources.RESID_FILTERPOOLNAME_TIP;
- dlgInputs.poolMgrNamePrompt = SystemResources.RESID_FILTERPOOLMANAGERNAME_LABEL;
- dlgInputs.poolMgrNameTip = SystemResources.RESID_FILTERPOOLMANAGERNAME_TIP;
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (selectedObject instanceof SystemSimpleContentElement)
- selectedObject = ((SystemSimpleContentElement)selectedObject).getData();
- boolean enable =
- (selectedObject instanceof ISystemFilterPoolReferenceManagerProvider) ||
- (selectedObject instanceof ISystemFilterPoolManager) ||
- (selectedObject instanceof ISystemFilterPool);
- return enable;
- }
-
-
- /**
- * Return the wizard so we can customize it prior to showing it.
- * Returns new SystemFilterNewFilterPoolWizard(). Override to replace with your own.
- */
- public SystemFilterPoolWizardInterface getFilterPoolWizard()
- {
- //if (wizard == null)
- // wizard = new SystemFilterNewFilterPoolWizard();
- //return wizard;
- return new SystemFilterNewFilterPoolWizard();
- }
-
- /**
- * Overrides parent. Called after dialog dismissed.
- */
- protected Object getDialogValue(Dialog dlg)
- {
- SystemFilterPoolWizardDialog wizardDlg = (SystemFilterPoolWizardDialog)dlg;
- SystemFilterPoolDialogOutputs dlgOutput = wizardDlg.getFilterPoolDialogOutputs();
- return dlgOutput;
- }
-
- /**
- * Overrides parent. Called after dialog dismissed and getDialogValue called.
- * The output of getDialogValue passed as input here.
- */
- public void doOKprocessing(Object dlgValue)
- {
- //System.out.println("In SystemFilterNewFIlterPoolAction.doOKProcessing");
- SystemFilterPoolDialogOutputs dlgOutput = (SystemFilterPoolDialogOutputs)dlgValue;
- // called from WorkWith dialog... we do not offer to create a reference...
- if ((dlgOutput.newPool != null) && (wwdialog != null))
- wwdialog.addNewFilterPool(getShell(), dlgOutput.newPool);
- else if (dlgOutput.newPool != null)
- {
- ISystemFilterPoolReferenceManagerProvider sfprmp = getReferenceManagerProviderSelection();
- // Action selected by user when a reference manager provider was selected.
- // Seems obvious then that the user wishes to see the newly created pool, so
- // we take the liberty of creating a reference object...
- if (sfprmp != null)
- {
- ISystemFilterPoolReferenceManager sfprm = sfprmp.getSystemFilterPoolReferenceManager();
- //System.out.println("...calling addREferenceToSystemFilterPool...");
- sfprm.addReferenceToSystemFilterPool(dlgOutput.newPool);
- //System.out.println("...back from addREferenceToSystemFilterPool");
- }
- }
- }
-
- /**
- * Returns array of managers to show in combo box.
- * Overrides parent to call back to wwdialog if not null.
- */
- public ISystemFilterPoolManager[] getFilterPoolManagers()
- {
- if (wwdialog != null)
- return wwdialog.getFilterPoolManagers();
- else
- return super.getFilterPoolManagers();
- }
-
- /**
- * Returns the zero-based index of the manager name to preselect.
- * Overrides parent to call back to wwdialog if not null.
- */
- public int getFilterPoolManagerNameSelectionIndex()
- {
- if (wwdialog != null)
- return wwdialog.getFilterPoolManagerSelection();
- else
- return super.getFilterPoolManagerNameSelectionIndex();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 3abff83f2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterPoolReferenceSelectAction.java
+++ /dev/null
@@ -1,85 +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.filters.actions;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * A selectable filter pool name action.
- * This is typically used to allow users to select a filter pool for referencing
- */
-public class SystemFilterPoolReferenceSelectAction extends SystemBaseAction
-
-{
- private ISystemFilterPool pool;
- private ISystemFilterPoolReferenceManager refMgr;
-
- /**
- * Constructor
- */
- public SystemFilterPoolReferenceSelectAction(Shell parent, ISystemFilterPool pool, ISystemFilterPoolReferenceManager refMgr)
- {
- super(pool.getName(), RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLREF_ID), parent);
- this.pool = pool;
- this.refMgr = refMgr;
- //setChecked(false);
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- //System.out.println("Pretend to select");
- try
- {
- refMgr.addReferenceToSystemFilterPool(pool);
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Unexpected error adding filter pool reference",exc); //$NON-NLS-1$
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 59256745e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterRemoveFilterPoolReferenceAction.java
+++ /dev/null
@@ -1,93 +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.filters.actions;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action allows users to remove a filter pool reference
- */
-public class SystemFilterRemoveFilterPoolReferenceAction
- extends SystemBaseAction
-
-{
-
-
- /**
- * Constructor
- */
- public SystemFilterRemoveFilterPoolReferenceAction(Shell parent)
- {
- super(SystemResources.ACTION_RMVFILTERPOOLREF_LABEL,SystemResources.ACTION_RMVFILTERPOOLREF_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_DELETEREF_ID),
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- if (!(selectedObject instanceof ISystemFilterPoolReference))
- return false;
- // disable if this is a connection-unique filter pool
- else
- return ((ISystemFilterPoolReference)selectedObject).getReferencedFilterPool().getOwningParentName() == null;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- IStructuredSelection selections = getSelection();
- Iterator i = selections.iterator();
- ISystemFilterPoolReferenceManager fprMgr = null;
- while (i.hasNext())
- {
- ISystemFilterPoolReference poolReference = (ISystemFilterPoolReference)i.next();
- fprMgr = poolReference.getFilterPoolReferenceManager();
- fprMgr.removeSystemFilterPoolReference(poolReference,true); // true means do dereference
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index c4450b067..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterSelectFilterPoolsAction.java
+++ /dev/null
@@ -1,268 +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.filters.actions;
-import java.util.Vector;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.dialogs.SystemSimpleSelectDialog;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action that displays the Select Filter Pools dialog, and which returns
- * an array of selected filter pools.
- * <p>
- * Dialog will display a root node for each manager, and then the filter pools
- * within each manager as children. User can select any pool from any of the
- * given managers.
- * <p>
- * Uses getName() on manager for display name of root nodes.
- * <p>
- * Typically, such a dialog is used to allow the user to select a subset of pools
- * that they will access in some context. There is framework support for such
- * selections, via SystemFilterPoolReferences. Each of these are a reference to a
- * filter pool, and the SystemFilterPoolReferenceManager class offers full support
- * for manager a list of such references, optionally even saving and restoring such
- * a list.
- *
- * <p>
- * You call the setFilterPoolManagers method to set the array of filter pool managers
- * this dialog allows the user to select from.
- * <p>
- * If you also call the optional method setFilterPoolReferenceManager, you need not
- * subclass this action. It will handle everything for you!!
- * <ul
- * <li>Preselects the filter pools currently referenced by one or more reference objects
- * in the filter pool reference manager.
- * <li>What OK is pressed, removes the previous references from the reference manager,
- * and adds references for the pools selected by the user.
- * </ul>
- *
- * You can either supply the label, dialog title, dialog prompt, filter pool image,
- * input filter pool managers and filter pool reference manager by calling the
- * appropriate setXXX methods, or by overriding the related getXXX methods.
- */
-public class SystemFilterSelectFilterPoolsAction
- extends SystemFilterAbstractFilterPoolAction
-
-{
-
-
- /**
- * Constructor when default label desired.
- */
- public SystemFilterSelectFilterPoolsAction(Shell parent)
- {
- super(parent,
- 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(RSEUIPlugin.HELPPREFIX + "actn0043"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX + "dsfp0000"); //$NON-NLS-1$
- }
- /**
- * Constructor when given the translated action label
- */
- public SystemFilterSelectFilterPoolsAction(Shell parent, String title)
- {
- super(parent, title);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
- // set default help for action and dialog
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0043"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX + "dsfp0000"); //$NON-NLS-1$
- }
-
-
- /**
- * Constructor when given the translated action label
- */
- public SystemFilterSelectFilterPoolsAction(Shell parent, String title, String tooltip)
- {
- super(parent, title, tooltip);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
- // set default help for action and dialog
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0043"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX + "dsfp0000"); //$NON-NLS-1$
- }
-
-
- /**
- * Override of init in parent
- */
- protected void init()
- {
- super.init();
- dlgInputs.prompt = SystemResources.RESID_SELECTFILTERPOOLS_PROMPT;
- dlgInputs.title = SystemResources.RESID_SELECTFILTERPOOLS_TITLE;
- }
-
- /**
- * Creates our select-filter-pools dialog, and populates it with the list of
- * filter pools to select from.
- * <p>
- * <i>Assumes setFilterPoolManagers has been called.</i>
- * <p>
- * Dialog will display a root node for each manager, and then the filter pools
- * within each manager as children. User can select any pool from any of the
- * given managers.
- * <p>
- * Uses getName() on manager for display name of root nodes.
- *
- * @see org.eclipse.rse.ui.actions.SystemBaseDialogAction#run()
- */
- protected Dialog createDialog(Shell parent)
- {
- SystemSimpleSelectDialog dialog =
- new SystemSimpleSelectDialog(parent, getDialogTitle(), getDialogPrompt());
-
- ISystemFilterPoolManager[] mgrs = getFilterPoolManagers();
- ISystemFilterPoolReferenceManagerProvider sprmp = getReferenceManagerProviderSelection();
- ISystemFilterPoolManager[] additionalMgrs = null;
- if (sprmp != null)
- additionalMgrs = sprmp.getSystemFilterPoolReferenceManager().getAdditionalSystemFilterPoolManagers();
- if (additionalMgrs != null)
- {
- ISystemFilterPoolManager[] allmgrs = new ISystemFilterPoolManager[mgrs.length+additionalMgrs.length];
- int allidx = 0;
- for (int idx=0; idx<mgrs.length; idx++)
- allmgrs[allidx++] = mgrs[idx];
- for (int idx=0; idx<additionalMgrs.length; idx++)
- allmgrs[allidx++] = additionalMgrs[idx];
- mgrs = allmgrs;
- }
-
- SystemSimpleContentElement input =
- SystemFilterUIHelpers.getFilterPoolModel(getFilterPoolManagerProvider(), mgrs);
- preSelect(input);
- setValue(input);
-
- if (sprmp != null)
- {
- ISystemFilterPoolManager initialSelection = sprmp.getSystemFilterPoolReferenceManager().getDefaultSystemFilterPoolManager();
- if (initialSelection != null)
- {
- SystemSimpleContentElement initialElementSelection = SystemFilterUIHelpers.getDataElement(input, initialSelection);
- if (initialElementSelection != null)
- dialog.setRootToPreselect(initialElementSelection);
- }
- }
- return dialog;
- }
- /**
- * We override createDialog from parent, so this is a no-op.
- */
- public SystemFilterPoolDialogInterface createFilterPoolDialog(Shell parent)
- {
- return null;
- }
-
- /**
- * Walk elements deciding pre-selection
- */
- protected void preSelect(SystemSimpleContentElement inputElement)
- {
- super.preSelect(inputElement);
- }
- /**
- * Decide per pool if it should be selected or not.
- * Default behaviour is to select it if it is currently referenced.
- */
- protected boolean getFilterPoolPreSelection(ISystemFilterPool pool)
- {
- ISystemFilterPoolReferenceManagerProvider refMgrProvider = getReferenceManagerProviderSelection();
- if (refMgrProvider != null)
- {
- ISystemFilterPoolReferenceManager refMgr = refMgrProvider.getSystemFilterPoolReferenceManager();
- if (refMgr != null)
- {
- return refMgr.isSystemFilterPoolReferenced(pool);
- }
- else
- return false;
- }
- else
- return false;
- }
-
- /**
- * Called by parent class after dialog returns. We set the internal value attribute
- * to be the array of user selected filter pools.
- * <p>
- * After this action executes, simply call getValue() to get an
- * array of SystemFilterPool objects representing what pools the user selected.
- * A result of null means the dialog was cancelled.
- */
- protected Object getDialogValue(Dialog dlg)
- {
- SystemSimpleSelectDialog dialog = (SystemSimpleSelectDialog)dlg;
- if (!dialog.wasCancelled())
- {
- Vector selectedFilterPools = new Vector();
- SystemSimpleContentElement inputElement = dialog.getUpdatedContent();
- SystemSimpleContentElement[] mgrElements = inputElement.getChildren();
- for (int idx=0; idx<mgrElements.length; idx++)
- {
- SystemSimpleContentElement[] poolElements = mgrElements[idx].getChildren();
- for (int jdx=0; jdx<poolElements.length; jdx++)
- {
- if (poolElements[jdx].isSelected())
- selectedFilterPools.addElement(poolElements[jdx].getData());
- }
- }
-
- ISystemFilterPool[] selectedPoolArray = new ISystemFilterPool[selectedFilterPools.size()];
- for (int idx=0; idx<selectedFilterPools.size(); idx++)
- selectedPoolArray[idx] = (ISystemFilterPool)selectedFilterPools.elementAt(idx);
- return selectedPoolArray;
- }
- else
- return null;
- }
-
-
- /**
- * Method called when ok pressed on dialog and after getDialogValue has set the
- * value attribute to an array of SystemFilterPool objects for the selected pools.
- * <p>
- * By default, if the current selected object implements SystemFilterPoolReferenceManagerProvider,
- * then this will call setFilterPoolReferences on that selected object.
- * <p>
- * @param dlgOutput The array of SystemFilterPools selected by the user, as set in getDialogValue()
- */
- public void doOKprocessing(Object dlgOutput)
- {
- ISystemFilterPool[] selectedPools = (ISystemFilterPool[])dlgOutput;
- ISystemFilterPoolReferenceManagerProvider sfprmp = getReferenceManagerProviderSelection();
- if (sfprmp != null)
- {
- sfprmp.getSystemFilterPoolReferenceManager().setSystemFilterPoolReferences(selectedPools,true);
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 463297112..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsAction.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.ui.filters.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.rse.ui.filters.SystemFilterPoolManagerUIProvider;
-import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterWorkWithFilterPoolsDialog;
-import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * The action that displays the Work With Filter Pools dialog
- */
-public class SystemFilterWorkWithFilterPoolsAction
- extends SystemFilterAbstractFilterPoolAction
- implements SystemFilterPoolManagerUIProvider
-{
-
- private ValidatorFilterPoolName poolNameValidator = null;
-
- /**
- * Constructor when default label desired.
- */
- public SystemFilterWorkWithFilterPoolsAction(Shell parent)
- {
- super(parent,
- 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(RSEUIPlugin.HELPPREFIX + "actn0044"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX + "dwfp0000"); //$NON-NLS-1$
- }
- /**
- * Constructor when default label desired, and you want to choose between
- * Work With -> Filter Pools and Work With Filter Pools.
- */
- public SystemFilterWorkWithFilterPoolsAction(Shell parent, boolean cascadingAction)
- {
- super(parent,
- 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
- );
- if (cascadingAction)
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH);
- else
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- allowOnMultipleSelection(false);
- // set default action and dialog help
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0044"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX + "dwfp0000"); //$NON-NLS-1$
- }
- /**
- * Constructor when given the translated action label
- */
- public SystemFilterWorkWithFilterPoolsAction(Shell parent, String title)
- {
- super(parent, title);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- allowOnMultipleSelection(false);
- // set default action and dialog help
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0044"); //$NON-NLS-1$
- setDialogHelp(RSEUIPlugin.HELPPREFIX + "dwfp0000"); //$NON-NLS-1$
- }
-
-
- /**
- * Override of init in parent
- */
- protected void init()
- {
- super.init();
- dlgInputs.prompt = SystemResources.RESID_WORKWITHFILTERPOOLS_PROMPT;
- dlgInputs.title = SystemResources.RESID_WORKWITHFILTERPOOLS_TITLE;
- }
-
- /**
- * Reset between runs
- */
- public void reset()
- {
- }
-
- /**
- * Set the pool name validator for the rename action.
- * The work-with dialog automatically calls setExistingNamesList on it for each selection.
- */
- public void setFilterPoolNameValidator(ValidatorFilterPoolName pnv)
- {
- this.poolNameValidator = pnv;
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- //return (selectedObject instanceof SystemFilterPoolReferenceManagerProvider); // override as appropriate
- return true; // override as appropriate
- }
-
-
- /**
- * Override of parent to create and return our specific filter pool dialog.
- */
- public SystemFilterPoolDialogInterface createFilterPoolDialog(Shell parent)
- {
- //SystemFilterPoolManager[] mgrs = getFilterPoolManagers();
- //SystemSimpleContentElement input = getTreeModel();
- //SystemFilterUIHelpers.getFilterPoolModel(getFilterPoolImageDescriptor(),mgrs);
-
- SystemFilterWorkWithFilterPoolsDialog dialog =
- new SystemFilterWorkWithFilterPoolsDialog(parent, getDialogTitle(), getDialogPrompt(), this);
-
- if (poolNameValidator != null)
- dialog.setFilterPoolNameValidator(poolNameValidator);
-
- //SystemSimpleContentElement initialElementSelection = getTreeModelPreSelection(input);
- //if (initialElementSelection != null)
- //dialog.setRootToPreselect(initialElementSelection);
-
- return dialog;
- }
-
- /**
- * Callback for dialog to refresh its contents
- */
- public SystemSimpleContentElement getTreeModel()
- {
- ISystemFilterPoolManager[] mgrs = getFilterPoolManagers();
- SystemSimpleContentElement input =
- SystemFilterUIHelpers.getFilterPoolModel(getFilterPoolManagerProvider(), mgrs);
- return input;
- }
- /**
- * Callback for dialog to refresh its contents
- */
- public SystemSimpleContentElement getTreeModelPreSelection(SystemSimpleContentElement input)
- {
- ISystemFilterPoolReferenceManagerProvider sprmp = getReferenceManagerProviderSelection();
- SystemSimpleContentElement initialElementSelection = null;
- if (sprmp != null)
- {
- ISystemFilterPoolManager initialSelection = sprmp.getSystemFilterPoolReferenceManager().getDefaultSystemFilterPoolManager();
- if (initialSelection != null)
- {
- initialElementSelection = SystemFilterUIHelpers.getDataElement(input, initialSelection);
- //if (initialElementSelection != null)
- //dialog.setRootToPreselect(initialElementSelection);
- }
- }
- return initialElementSelection;
- }
-
- /**
- * We are a special case of dialog, where we do not need to do anything
- * upon return from the dialog, as the dialog itself does it all.
- */
- protected Object getDialogValue(Dialog dlg)
- {
- return null;
- }
-
- /**
- * Because we return null from getDialogValue(Dialog dlg), this
- * method will never be called.
- */
- public void doOKprocessing(Object dlgValue)
- {
-
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 3c4f660db..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java
+++ /dev/null
@@ -1,81 +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:
- * Michael Berger (IBM) - 146339 Added refresh action graphic.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.filters.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-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;
-
-
-/**
- * The action allows users to refresh the entire Remote System Explorer tree view
- */
-public class SystemFilterWorkWithFilterPoolsRefreshAllAction extends SystemBaseAction
-
-{
-
-
- private TreeViewer viewer = null;
-
- /**
- * Constructor
- */
- public SystemFilterWorkWithFilterPoolsRefreshAllAction(TreeViewer viewer, Shell parent)
- {
- super(SystemResources.ACTION_REFRESH_ALL_LABEL,SystemResources.ACTION_REFRESH_ALL_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_REFRESH_ID),
- parent);
- this.viewer = viewer;
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_BUILD);
- }
-
- /**
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
-
- /**
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- viewer.refresh();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index c6ad81c1b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.java
+++ /dev/null
@@ -1,492 +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.filters.actions;
-import java.util.Vector;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterContainerReference;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolSelectionValidator;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.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;
-import org.eclipse.rse.ui.filters.dialogs.SystemNewFilterWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action acts as a base class for all "New Filter" wizards so we can
- * get some common functionality.
- * <p>
- * An interesting capability of this action is to defer configuration, which might be
- * time consuming, until the user selects to run it. That can be done by registering
- * a callback object that implements ISystemNewFilterActionConfigurator.
- */
-public class SystemNewFilterAction
- extends SystemBaseWizardAction
-
-{
- protected ISystemFilterPool parentPool;
- protected ISystemFilterPool[] poolsToSelectFrom;
- protected ISystemFilterPoolWrapperInformation poolWrapperInformation;
- protected boolean nested = false;
- protected boolean showFilterStrings = true;
- protected boolean showNamePrompt = true;
- protected boolean showInfoPage = true;
- protected boolean fromRSE = false;
- protected String[] defaultFilterStrings;
- protected String type = null;
- protected String verbage = null;
- protected String page1Description;
- protected String namePageHelp;
- protected ISystemFilterPoolSelectionValidator filterPoolSelectionValidator;
- protected ISystemNewFilterActionConfigurator callbackConfigurator;
- protected boolean callbackConfiguratorCalled = true;
- protected Object callbackData = null;
- protected SystemFilterStringEditPane editPane;
-
- /**
- * Constructor for non-nested actions.
- */
- public SystemNewFilterAction(Shell shell, ISystemFilterPool parentPool,
- String label, String tooltip, ImageDescriptor image)
- {
- this(shell, parentPool, label, tooltip, image, false);
- }
- /**
- * Constructor allowing nested actions. Changes the title.
- */
- public SystemNewFilterAction(Shell shell, ISystemFilterPool parentPool,
- String label, String tooltip, ImageDescriptor image,
- boolean nested)
- {
- super(label, tooltip, image, shell);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
- this.parentPool = parentPool;
- this.nested = nested;
- setAvailableOffline(true);
- }
- /**
- * Constructor to use when you want to just use the default action name and image.
- * Also defaults to nested filters not allowed.
- */
- public SystemNewFilterAction(Shell shell, ISystemFilterPool parentPool)
- {
- this(shell, parentPool, SystemResources.ACTION_NEWFILTER_LABEL, SystemResources.ACTION_NEWFILE_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTER_ID), false);
- }
-
- // ------------------------
- // CONFIGURATION METHODS...
- // ------------------------
-
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Call this to defer expensive configuration until the user runs the action
- * @param caller - an implementor of the callback interface
- * @param data - any data the callback needs. It will be passed back on the callback.
- */
- public void setCallBackConfigurator(ISystemNewFilterActionConfigurator caller, Object data)
- {
- this.callbackConfigurator = caller;
- this.callbackData = data;
- this.callbackConfiguratorCalled = false;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Set the help context Id (infoPop) for this action. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelpContextId(String id)
- {
- setHelp(id);
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Set the parent filter pool that the new-filter actions need.
- * Typically this is set at constructor time but it can be set later if re-using the action.
- */
- public void setParentFilterPool(ISystemFilterPool parentPool)
- {
- this.parentPool = parentPool;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * If you want to prompt the user for the parent filter pool to create this filter in,
- * call this with the list of filter pools. In this case, the filter pool passed into
- * the constructor will be used as the initial selection.
- */
- public void setAllowFilterPoolSelection(ISystemFilterPool[] poolsToSelectFrom)
- {
- this.poolsToSelectFrom = poolsToSelectFrom;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * This is an alternative to {@link #setAllowFilterPoolSelection(ISystemFilterPool[])}
- * <p>
- * If you want to prompt the user for the parent filter pool to create this filter in,
- * but want to not use the term "pool" say, you can use an array of euphamisms. That is,
- * you can pass an array of objects that map to filter pools, but have a different
- * display name that is shown in the dropdown.
- * <p>
- * Of course, if you want to do this, then you will likely want to offer a different
- * label and tooltip for the prompt, and different verbage above the prompt. The
- * object this method accepts as a parameter encapsulates all that information, and
- * there is a default class you can use for this.
- */
- public void setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolsToSelectFrom)
- {
- this.poolWrapperInformation = poolsToSelectFrom;
- }
-
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Set the type of filter we are creating. Results in a call to setType(String) on the new filter.
- * Types are not used by the base filter framework but are a way for tools to create typed
- * filters and have unique actions per filter type.
- * <p>This will also result in a call to setType(String) on the filter string edit pane, which
- * sets the <samp>type</samp> instance variable in case your edit pane subclass needs to know.
- */
- public void setType(String type)
- {
- this.type = type;
- }
- /**
- * <i>Getter method. Do not override.</i><br>
- * Get the type of filter as set by {@link #setType(String)}
- */
- public String getType()
- {
- return type;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Set whether to show, or hide, the first page that prompts for a filter string. Default is true.
- * @see #setDefaultFilterStrings(String[])
- */
- public void setShowFilterStrings(boolean show)
- {
- showFilterStrings = show;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Call this if you want the new filter to have some default filter strings.
- */
- public void setDefaultFilterStrings(String[] defaultFilterStrings)
- {
- this.defaultFilterStrings = defaultFilterStrings;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Call in order to not prompt the user for a filter name. This also implies we will not
- * be prompting for a parent filter pool! Default is true.
- * <p>
- * This is used when creating temporary filters that won't be saved. In this case, on
- * Finish a filter is not created! Instead, call getFilterStrings() to get the filter
- * strings created by the user ... typically there is just one unless you also called
- * setDefaultFilterStrings, in which case they will also be returned.
- * <p>
- * For convenience, when this is called, setShowInfoPage(false) is called for you
- */
- public void setShowNamePrompt(boolean show)
- {
- showNamePrompt = show;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Call in order to not show the final info-only page of the wizard. Default is true.
- * @see #setVerbage(String)
- */
- public void setShowInfoPage(boolean show)
- {
- showInfoPage = show;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Set the verbage to show on the final page. By default, it shows a tip about creating multiple
- * filter strings via the Change action. Use this method to change that default.
- */
- public void setVerbage(String verbage)
- {
- this.verbage = verbage;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Set the description to display on the first page of the wizard
- */
- public void setPage1Description(String description)
- {
- this.page1Description = description;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Set if we are creating a filter for use in the RSE or not. This affects the
- * tips and help.
- * <p>
- * This is set to true automatically by the subsystem factory base class in the RSE,
- * else it defaults to false.
- */
- public void setFromRSE(boolean rse)
- {
- this.fromRSE = true;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Set the validator to call when the user selects a filter pool. Optional.
- * Only valid in create mode.
- */
- public void setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator)
- {
- this.filterPoolSelectionValidator = validator;
- }
-
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Specify an edit pane that prompts the user for the contents of a filter string.
- */
- public void setFilterStringEditPane(SystemFilterStringEditPane editPane)
- {
- this.editPane = editPane;
- }
-
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Specify the help to show for the name page (page 2)
- */
- public void setNamePageHelp(String helpId)
- {
- this.namePageHelp = helpId;
- }
-
- // ----------------------
- // OVERRIDABLE METHODS...
- // ----------------------
- /**
- * <i><b>Overridable</b> configuration method.</i><br>
- * Overridable extension. For those cases when you don't want to create your
- * own wizard subclass, but prefer to simply configure the default wizard.
- * <p>
- * Note, at the point this is called, all the base configuration, based on the
- * setters for this action, have been called. There really is nothing much that
- * can't be done via setters. The reason you may want to subclass versus use the
- * setters is defer expensive operations until the user actually selects the New Filter
- * action. Using the setters means this is done at time the popup menu is being
- * construction. Overriding this method allows you to defer the wizard configuration
- * until the user selects the action and the wizard is actually created.
- * <p>By default, this does nothing.
- */
- protected void configureNewFilterWizard(SystemNewFilterWizard wizard)
- {
- }
-
- /**
- * <i><b>Overridable</b> configuration method.</i><br>
- * Configure the new filter created by the wizard. This is only called after
- * successful completion of the wizard
- * <p>By default, this does nothing.
- */
- protected void configureNewFilter(ISystemFilter newFilter)
- {
- }
-
- // --------------------
- // LIFECYCLE METHODS...
- // --------------------
-
- /**
- * <i>Lifecyle method. Do not override. Instead override {@link #createNewFilterWizard(ISystemFilterPool)}.</i><br>
- * The default processing for the run method calls createDialog, which
- * in turn calls this method to return an instance of our wizard.<br>
- * Our default implementation is to call createNewFilterWizard.
- * <p>
- * Note your own wizard must subclass {@link org.eclipse.rse.ui.filters.dialogs.SystemNewFilterWizard SystemNewFilterWizard}
- */
- protected IWizard createWizard()
- {
- if ((callbackConfigurator != null) && !callbackConfiguratorCalled)
- {
- callbackConfigurator.configureNewFilterAction(((ISubSystem)callbackData).getSubSystemConfiguration(), this, callbackData);
- callbackConfiguratorCalled = true;
- }
- SystemNewFilterWizard wizard = createNewFilterWizard(parentPool);
- if (poolsToSelectFrom != null)
- wizard.setAllowFilterPoolSelection(poolsToSelectFrom);
- else if (poolWrapperInformation != null)
- wizard.setAllowFilterPoolSelection(poolWrapperInformation);
- if (type != null)
- wizard.setType(type);
- if (defaultFilterStrings != null)
- wizard.setDefaultFilterStrings(defaultFilterStrings);
- if (namePageHelp != null)
- wizard.setNamePageHelp(namePageHelp);
- wizard.setShowFilterStrings(showFilterStrings);
- wizard.setShowNamePrompt(showNamePrompt);
- wizard.setShowInfoPage(showInfoPage);
- wizard.setFromRSE(fromRSE);
- if (verbage != null)
- wizard.setVerbage(verbage);
- if (page1Description != null)
- wizard.setPage1Description(page1Description);
- if (filterPoolSelectionValidator != null)
- wizard.setFilterPoolSelectionValidator(filterPoolSelectionValidator);
- if (editPane != null)
- wizard.setFilterStringEditPane(editPane);
- ISystemFilterPoolReferenceManagerProvider provider = getSystemFilterPoolReferenceManagerProvider();
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Inside createWizard. null? " + (provider==null));
- wizard.setSystemFilterPoolReferenceManagerProvider(provider);
- configureNewFilterWizard(wizard);
- return wizard;
- }
-
- /**
- * <i><b>Overridable</b> lifecyle method. </i><br>
- * Create and return the actual wizard.
- * By default this returns an instance of {@link org.eclipse.rse.filters.ui.wizards.SystemNewFilterWizard}.
- * <p>
- * You can avoid creating your own wizard subclass by instead overriding
- * {@link #configureNewFilterWizard(SystemNewFilterWizard)}
- */
- protected SystemNewFilterWizard createNewFilterWizard(ISystemFilterPool parentPool)
- {
- return new SystemNewFilterWizard(parentPool);
- }
- /**
- * <i>Lifecyle method. Do not override. Instead override {@link #configureNewFilter(ISystemFilter)}.</i><br>
- * Intercept of parent method so we can allow overrides opportunity to
- * configure the new filter.
- * This simply calls configureNewFilter.
- */
- protected void postProcessWizard(IWizard wizard)
- {
- SystemNewFilterWizard newFilterWizard = (SystemNewFilterWizard)wizard;
- ISystemFilter newFilter = newFilterWizard.getSystemFilter();
- if (newFilter != null)
- configureNewFilter(newFilter);
- }
-
- /**
- * <i>Lifecyle method. No need to override.</i><br>
- * Decide whether to enable this action based on selected object's type.
- * Returns false unless selected object is a filter pool or subsystem.
- */
- public boolean checkObjectType(Object selectedObject)
- {
- return ((selectedObject instanceof ISystemFilterContainer) ||
- (selectedObject instanceof ISystemFilterContainerReference) ||
- (selectedObject instanceof ISystemFilterPoolReferenceManagerProvider));
- }
-
- // -----------------
- // OUTPUT METHODS...
- // -----------------
-
- /**
- * <i>Output method. Do not override.</i><br>
- * Get the contextual system filter pool reference manager provider. Will return non-null if the
- * current selection is a reference to a filter pool or filter, or a reference manager
- * provider.
- */
- public ISystemFilterPoolReferenceManagerProvider getSystemFilterPoolReferenceManagerProvider()
- {
- Object firstSelection = getFirstSelection();
- if (firstSelection != null)
- {
- if (firstSelection instanceof ISystemFilterReference)
- return ((ISystemFilterReference)firstSelection).getProvider();
- else if (firstSelection instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference)firstSelection).getProvider();
- else if (firstSelection instanceof ISystemFilterPoolReferenceManagerProvider)
- return (ISystemFilterPoolReferenceManagerProvider)firstSelection;
- else
- return null;
- }
- return null;
- }
-
- /**
- * <i>Output method. Do not override.</i><br>
- * Convenience method to return the newly created filter after running the action.
- * Will be null if the user cancelled. Will also be null if you called setShowNamePrompt(false),
- * in which case you should call getNewFilterStrings().
- * <p>
- * Be sure to call wasCancelled() first before calling this.
- */
- public ISystemFilter getNewFilter()
- {
- Object output = getValue();
- if (output instanceof ISystemFilter)
- return (ISystemFilter)getValue();
- else
- return null;
- }
-
- /**
- * <i>Output method. Do not override.</i><br>
- * When prompting for an unnamed filter, no filter is created. Instead, the user is prompted
- * for a single filter string. This method returns that string. However, if you happened to
- * call setDefaultFilterStrings(...) then those are also returned, hence the need for an
- * array. If not, this will be an array of one, or null if the user cancelled the wizard.
- * <p>
- * Be sure to call wasCancelled() first before calling this.
- */
- public String[] getFilterStrings()
- {
- Object output = getValue();
- if (output == null)
- return null;
- else if (output instanceof Vector)
- {
- Vector v = (Vector)output;
- String[] strings = new String[v.size()];
- for (int idx=0; idx<strings.length; idx++)
- strings[idx] = (String)v.elementAt(idx);
- return strings;
- }
- else if (output instanceof ISystemFilter)
- {
- return ((ISystemFilter)output).getFilterStrings();
- }
- else
- return null;
- }
- /**
- * <i>Output method. Do not override.</i><br>
- * Shortcut to getFilterStrings()[0].
- */
- public String getFilterString()
- {
- String[] strings = getFilterStrings();
- if ((strings!=null) && (strings.length>0))
- return strings[0];
- else
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemFilterWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemFilterWizard.java
deleted file mode 100644
index 16cfab45a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemFilterWizard.java
+++ /dev/null
@@ -1,26 +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.filters.dialogs;
-
-import org.eclipse.rse.ui.filters.SystemFilterDialogInterface;
-import org.eclipse.rse.ui.wizards.ISystemWizard;
-
-
-public interface ISystemFilterWizard
- extends ISystemWizard, SystemFilterDialogInterface
-{
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemNewFilterWizardConfigurator.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemNewFilterWizardConfigurator.java
deleted file mode 100644
index 5b7ff29e8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemNewFilterWizardConfigurator.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.filters.dialogs;
-
-/**
- * Much of the new filter wizard is configurable, especially with respect to translated strings.
- * While there exists setters and overridable methods for most of it, sometimes that gets overwhelming.
- * This interface is designed to capture all the configurable attributes that are not likely to change
- * from usage to usage of the wizard (eg, not context sensitive) such that for convenience you can
- * implement it in a class and instantiate a singleton instance of that class to re-use for your
- * wizard.
- * <p>
- * Your best option is to subclass {@link SystemNewFilterWizardConfigurator} and override just those
- * things you want to change.
- */
-public interface ISystemNewFilterWizardConfigurator
-{
-
- /**
- * Return the default page title to use for each page, unless overridden individually
- */
- public String getPageTitle();
- /**
- * Return the page title for page 1 (which prompts for the filter string)
- */
- public String getPage1Title();
- /**
- * Return the description for page 1 (which prompts for the filter string)
- */
- public String getPage1Description();
-
- /**
- * Return the page title for page 2 (which prompts for the name and filter pool)
- */
- public String getPage2Title();
- /**
- * Return the description for page 2 (which prompts for the name and filter pool)
- */
- public String getPage2Description();
- /**
- * Return the help ID for page 2
- */
- public String getPage2HelpID();
- /**
- * Return the verbage for the name prompt on page 2
- */
- public String getPage2NameVerbage();
- /**
- * Return the verbage for the pool prompt on page 3
- */
- public String getPage2PoolVerbage();
- /**
- * Return the verbage tooltip for the name prompt on page 2
- */
- public String getPage2PoolVerbageTip();
- /**
- * Return the label for the filter name
- * prompt on page 2.
- */
- public String getPage2NamePromptLabel();
-
- /**
- * Return the tooltip for the filter name
- * prompt on page 2.
- */
- public String getPage2NamePromptTooltip();
-
- /**
- * Return the label for the filter pool
- * prompt on page 2.
- */
- public String getPage2PoolPromptLabel();
-
- /**
- * Return the label for the filter pool
- * prompt on page 2.
- */
- public String getPage2PoolPromptTooltip();
-
- /**
- * Get the "Unique to this connection" checkbox label
- */
- public String getPage2UniqueToConnectionLabel();
- /**
- * Set the "Unique to this connection" checkbox tooltip
- */
- public String getPage2UniqueToConnectionToolTip();
-
- /**
- * Return the page title for page 3 (which shows 2 tips)
- */
- public String getPage3Title();
- /**
- * Return the description for page 3 (which shows 2 tips)
- */
- public String getPage3Description();
- /**
- * Return the first tip on page 3
- */
- public String getPage3Tip1();
- /**
- * Return the second tip on page 3
- */
- public String getPage3Tip2();
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 33f00e2c8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.java
+++ /dev/null
@@ -1,365 +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.filters.dialogs;
-
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemPageCompleteListener;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.filters.ISystemChangeFilterPaneEditPaneSupplier;
-import org.eclipse.rse.ui.filters.SystemChangeFilterPane;
-import org.eclipse.rse.ui.filters.SystemFilterStringEditPane;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * A dialog that allows the user to change a filter. It allows update of the filter strings. <br>
- * We do not typically override this to produce our own change filter dialog ... rather we usually
- * call the configuration methods to affect it. At a minimum, we usually want to set the {@link #setFilterStringEditPane(SystemFilterStringEditPane) editpane},
- * which is used to prompt for a new filter string or change an existing one. We usually share the
- * same edit pane with the {@link SystemNewFilterWizard} wizard.
- */
-public class SystemChangeFilterDialog extends SystemPromptDialog
- implements ISystemPageCompleteListener, ISystemChangeFilterPaneEditPaneSupplier
-{
-
- protected SystemChangeFilterPane changeFilterPane;
- protected SystemFilterStringEditPane editPane;
-
- /**
- * Constructor
- */
- public SystemChangeFilterDialog(Shell shell)
- {
- this(shell, SystemResources.RESID_CHGFILTER_TITLE);
- }
- /**
- * Constructor, when unique title desired
- */
- public SystemChangeFilterDialog(Shell shell, String title)
- {
- super(shell, title);
- changeFilterPane = new SystemChangeFilterPane(shell, this, this);
- changeFilterPane.addPageCompleteListener(this);
- setHelp();
- }
-
- /**
- * Overridable extension point for setting dialog help
- */
- protected void setHelp()
- {
- setHelp(RSEUIPlugin.HELPPREFIX+"dufr0000"); //$NON-NLS-1$
- }
-
- // INPUT/CONFIGURATION
- /**
- * <i>Configuration method</i><br>
- * Specify an edit pane that prompts the user for the contents of a filter string.
- */
- public void setFilterStringEditPane(SystemFilterStringEditPane editPane)
- {
- this.editPane = editPane;
- }
- /**
- * <i>Configuration method</i><br>
- * Set the contextual system filter pool reference manager provider. Will be non-null if the
- * current selection is a reference to a filter pool or filter, or a reference manager
- * provider.
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
- {
- changeFilterPane.setSystemFilterPoolReferenceManagerProvider(provider);
- }
- /**
- * <i>Configuration method</i><br>
- * Set the contextual system filter pool manager provider. Will be non-null if the
- * current selection is a filter pool or filter, or reference to them, or a manager provider.
- * Generally this is called when the setSystemFilterPoolReferenceManagerProvider can't be called
- * for some reason.
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider provider)
- {
- changeFilterPane.setSystemFilterPoolManagerProvider(provider);
- }
-
- /**
- * <i>Configuration method</i><br>
- * Set the Parent Filter Pool prompt label and tooltip text.
- */
- public void setParentPoolPromptLabel(String label, String tip)
- {
- changeFilterPane.setParentPoolPromptLabel(label, tip);
- }
- /**
- * Return the parent filter pool prompt label, as set by {@link #setParentPoolPromptLabel(String, String)}
- */
- public String getParentPoolPromptLabel()
- {
- return changeFilterPane.getParentPoolPromptLabel();
- }
- /**
- * Return the parent filter pool prompt tip, as set by {@link #setParentPoolPromptLabel(String, String)}
- */
- public String getParentPoolPromptTip()
- {
- return changeFilterPane.getParentPoolPromptTip();
- }
-
- /**
- * <i>Configuration method</i><br>
- * Set the name prompt label and tooltip text.
- */
- public void setNamePromptLabel(String label, String tip)
- {
- changeFilterPane.setNamePromptLabel(label, tip);
- }
- /**
- * Return the name prompt label as set by {@link #setNamePromptLabel(String, String)}
- */
- public String getNamePromptLabel()
- {
- return changeFilterPane.getNamePromptLabel();
- }
- /**
- * Return the name prompt tip as set by {@link #setNamePromptLabel(String, String)}
- */
- public String getNamePromptTip()
- {
- return changeFilterPane.getNamePromptTip();
- }
-
- /**
- * <i>Configuration method</i><br>
- * Set the label shown in group box around the filter string list, and the tooltip text for the
- * list box.
- */
- public void setListLabel(String label, String tip)
- {
- changeFilterPane.setListLabel(label, tip);
- }
- /**
- * Return list label as set by {@link #setListLabel(String, String)}
- */
- public String getListLabel()
- {
- return changeFilterPane.getListLabel();
- }
- /**
- * Return list tip as set by {@link #setListLabel(String, String)}
- */
- public String getListTip()
- {
- return changeFilterPane.getListTip();
- }
-
- /**
- * Set the string to show as the first item in the list.
- * The default is "New filter string"
- */
- public void setNewListItemText(String label)
- {
- changeFilterPane.setNewListItemText(label);
- }
- /**
- * Return the text for the list item, as set by {@link #setNewListItemText(String)},
- * or the default if not set.
- */
- public String getNewListItemText()
- {
- return changeFilterPane.getNewListItemText();
- }
-
- /**
- * <i>Configuration method</i><br>
- * Call this to specify a validator for the filter string. It will be called per keystroke.
- * A default validator is supplied otherwise: ValidatorFilterString.
- * <p>
- * Your validator should extend ValidatorFilterString to inherited the uniqueness error checking.
- * <p>
- * Alternatively, if all you want is a unique error message for the case when duplicates are found,
- * call setDuplicateFilterStringErrorMessage, and it will be used in the default validator.
- */
- public void setFilterStringValidator(ISystemValidator v)
- {
- changeFilterPane.setFilterStringValidator(v);
- }
- /**
- * Return the result of {@link #setFilterStringValidator(ISystemValidator)}.
- */
- public ISystemValidator getFilterStringValidator()
- {
- return changeFilterPane.getFilterStringValidator();
- }
- /**
- * <i>Configuration method</i><br>
- * Set the error message to use when the user is editing or creating a filter string, and the
- * Apply processing detects a duplicate filter string in the list.
- */
- public void setDuplicateFilterStringErrorMessage(SystemMessage msg)
- {
- changeFilterPane.setDuplicateFilterStringErrorMessage(msg);
- }
- /**
- * Return results of {@link #setDuplicateFilterStringErrorMessage(SystemMessage)}
- */
- public SystemMessage getDuplicateFilterStringErrorMessage()
- {
- return changeFilterPane.getDuplicateFilterStringErrorMessage();
- }
-
- /**
- * <i>Configuration method</i><br>
- * Specify if you want to include a test button or not. Appears with "Apply" and "Reset"
- */
- public void setWantTestButton(boolean wantTestButton)
- {
- changeFilterPane.setWantTestButton(wantTestButton);
- }
- /**
- * Return whether a test button is wanted or not, as set by {@link #setWantTestButton(boolean)}
- */
- public boolean getWantTestButton()
- {
- return changeFilterPane.getWantTestButton();
- }
-
- /**
- * Set if the edit pane is not to be editable
- */
- public void setEditable(boolean editable)
- {
- changeFilterPane.setEditable(editable);
- }
- /**
- * Return whether the edit pane is editable, as set by {@link #setEditable(boolean)}
- */
- public boolean getEditable()
- {
- return changeFilterPane.getEditable();
- }
-
- /**
- * Set if the user is to be allowed to create multiple filter strings or not. Default is true
- */
- public void setSupportsMultipleStrings(boolean multi)
- {
- changeFilterPane.setSupportsMultipleStrings(multi);
- }
- /**
- * Return whether the user is to be allowed to create multiple filter strings or not. Default is true
- */
- public boolean getSupportsMultipleStrings()
- {
- return changeFilterPane.getSupportsMultipleStrings();
- }
-
- // LIFECYCLE
- /**
- * Intercept of parent so we can set the input filter, and deduce whether
- * strings are case sensitive and if duplicates are allowed.<br>
- * Not typically overridden, but if you do, be sure to call super!
- */
- public void setInputObject(Object inputObject)
- {
- changeFilterPane.setInputObject(inputObject);
- }
-
- /**
- * Returns the control (the list view) to recieve initial focus control
- */
- protected Control getInitialFocusControl()
- {
- return changeFilterPane.getInitialFocusControl();
- }
- /**
- * Populates the content area
- */
- protected Control createInner(Composite parent)
- {
- return changeFilterPane.createContents(parent);
- }
- /**
- * Intercept of parent so we can reset the default button
- */
- protected void createButtonsForButtonBar(Composite parent)
- {
- super.createButtonsForButtonBar(parent);
- getShell().setDefaultButton(changeFilterPane.getApplyButton()); // defect 46129
- }
- /**
- * Return our edit pane. Overriding this is an alternative to calling setEditPane.
- * Method is declared in {@link ISystemChangeFilterPaneEditPaneSupplier}.
- */
- public SystemFilterStringEditPane getFilterStringEditPane(Shell shell)
- {
- if (editPane == null)
- editPane = new SystemFilterStringEditPane(shell);
- return editPane;
- }
-
- /**
- * Parent override.
- * Called when user presses OK button.
- * This is when we save all the changes the user made.
- */
- protected boolean processOK()
- {
- return changeFilterPane.processOK();
- }
-
- /**
- * Parent override.
- * Called when user presses CLOSE button. We simply blow away all their changes!
- */
- protected boolean processCancel()
- {
- return changeFilterPane.processCancel();
- }
-
-
- /**
- * The comleteness of the page has changed.
- * This is a callback from SystemChangeFilterPane.
- */
- public void setPageComplete(boolean complete)
- {
- super.setPageComplete(complete);
- }
-
- /**
- * Returns parent shell, under which this window's shell is created.
- *
- * @return the parent shell, or <code>null</code> if there is no parent shell
- */
- public Shell getParentShell()
- {
- return super.getParentShell();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 8fc78ef20..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.filters.dialogs;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-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;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.validators.ValidatorFolderName;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizard;
-
-
-/**
- * Wizard for creating a new system filter pool.
- */
-public class SystemFilterNewFilterPoolWizard
- extends AbstractSystemWizard
- implements SystemFilterPoolWizardInterface
-{
- protected SystemFilterNewFilterPoolWizardMainPageInterface mainPage;
- protected ValidatorFolderName usv;
- protected SystemFilterPoolDialogOutputs output;
- protected SystemFilterAbstractFilterPoolAction caller;
- protected ISystemFilterPoolManager[] mgrs;
-
- /**
- * Constructor that uses a default title and image
- */
- public SystemFilterNewFilterPoolWizard()
- {
- this(SystemResources.RESID_NEWFILTERPOOL_TITLE,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLWIZARD_ID));
- }
- /**
- * Constructor
- * @param label The title for this wizard
- * @param image The image for this wizard
- */
- public SystemFilterNewFilterPoolWizard(String title, ImageDescriptor image)
- {
- super(title, image);
- }
-
- /**
- * Set the help context Id (infoPop) for this wizard. This must be fully qualified by
- * plugin ID.
- */
- public void setHelpContextId(String id)
- {
- super.setHelp(id);
- }
-
- /**
- * Creates the wizard pages.
- * This method is an override from the parent Wizard class.
- */
- public void addPages()
- {
- try {
- mainPage = createMainPage();
- addPage((WizardPage)mainPage);
- //super.addPages();
- } catch (Exception exc)
- {
- System.out.println("Unexpected error in addPages of NewFilterPoolWizard: "+exc.getMessage() + ", " + exc.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
-
- /**
- * Creates the wizard's main page.
- */
- protected SystemFilterNewFilterPoolWizardMainPageInterface createMainPage()
- {
- mainPage = new SystemFilterNewFilterPoolWizardDefaultMainPage(this,
- caller.getDialogTitle(), caller.getDialogPrompt());
- mgrs = caller.getFilterPoolManagers();
- if (mgrs != null)
- {
- mainPage.setFilterPoolManagers(mgrs);
- mainPage.setFilterPoolManagerNameSelectionIndex(caller.getFilterPoolManagerNameSelectionIndex());
- }
- return mainPage;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- if (mainPage.performFinish())
- {
- output = mainPage.getFilterPoolDialogOutputs();
- String mgrName = output.filterPoolManagerName;
- ISystemFilterPoolManager mgr = null;
- try
- {
- if (mgrName != null)
- {
- for (int idx=0; (mgr==null)&&(idx<mgrs.length); idx++)
- if (mgrs[idx].getName().equalsIgnoreCase(mgrName))
- mgr = mgrs[idx];
- }
- if (mgr == null)
- {
- System.out.println("Unexpected problem in performFinish of filter pool wizard: no match for selected profile name " + mgrName); //$NON-NLS-1$
- return false;
- }
- String poolName = mainPage.getPoolName();
- output.newPool = createFilterPool(mgr, poolName);
- }
- catch (Exception 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 = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED);
- msg.makeSubstitution(exc);
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
- msgDlg.openWithDetails();
- return false;
- }
- return (output.newPool != null);
- }
- return false;
- }
-
-
- /**
- * Process the create new filter pool request, after user presses OK on the dialog.
- * By default, asks the selected manager to create the new pool of the given name.
- */
- protected ISystemFilterPool createFilterPool(ISystemFilterPoolManager selectedManager, String poolName)
- throws Exception
- {
- ISystemFilterPool newFilterPool = null;
- if (selectedManager != null)
- //try {
- newFilterPool = selectedManager.createSystemFilterPool(poolName, true);
- //} catch (Exception exc)
- //{
- //System.out.println("Unexpected error in createFilterPool of NewFilterPoolWizard: "+exc.getMessage() + ", " + exc.getClass().getName());
- //}
- return newFilterPool;
- }
-
- /**
- * Return an object containing user-specified information pertinent to filter pool actions
- */
- public SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs()
- {
- return output;
- }
-
- /**
- * Allow base action to pass instance of itself for callback to get info
- */
- public void setFilterPoolDialogActionCaller(SystemFilterAbstractFilterPoolAction caller)
- {
- this.caller = caller;
- }
-
- /**
- * Allow wizard pages to get this.
- */
- public SystemFilterAbstractFilterPoolAction getFilterPoolDialogActionCaller()
- {
- return caller;
- }
-
-} // end class \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java
deleted file mode 100644
index c612b0488..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java
+++ /dev/null
@@ -1,373 +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.filters.dialogs;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * Default main page of the "New Filter Pool" wizard.
- * This page asks for the name of the connection pool.
- * Also allows user to select from a list of filter pool managers
- * to put the filter pool into.
- */
-
-public class SystemFilterNewFilterPoolWizardDefaultMainPage
- extends AbstractSystemWizardPage
- implements SystemFilterNewFilterPoolWizardMainPageInterface, Listener, SelectionListener
-{
- protected Label labelName, labelMgr;
- protected Text textName;
- protected Combo mgrCombo;
- protected int mgrSelection = 0;
- protected String[] mgrNames = null;
- protected ISystemValidator[] validatorsByManager = null;
- protected SystemFilterAbstractFilterPoolAction parentWizardAction = null;
-
- /**
- * Constructor.
- */
- public SystemFilterNewFilterPoolWizardDefaultMainPage(Wizard wizard,
- String title,
- String description)
- {
- super(wizard, "NewFilterPool", title, description); //$NON-NLS-1$
- this.parentWizardAction = ((SystemFilterNewFilterPoolWizard)wizard).getFilterPoolDialogActionCaller();
- }
-
- /**
- * Call this to specify a validator for the pool name. It will be called per keystroke.
- * Only call this if you do not call setFilterPoolManagers!
- */
- public void setNameValidator(ISystemValidator v)
- {
- validatorsByManager = new ISystemValidator[1];
- validatorsByManager[0] = v;
- }
- /**
- * Even if you call setFilterPoolManagers and you really want your own validators,
- * then call this. Otherwise, FolderNameValidator will be called for you.
- * The input must be an array of validators that is the same length as the array
- * of filter pool managers. Call this AFTER setFilterPoolManagers!
- */
- public void setNameValidators(ISystemValidator[] v)
- {
- validatorsByManager = v;
- }
-
- /**
- * Call this to specify the list of filter pool managers to allow the user to select from.
- * Either call this or override getFilterPoolManagerNames, or leave null and this prompt will
- * not show.
- */
- public void setFilterPoolManagers(ISystemFilterPoolManager[] mgrs)
- {
- mgrNames = new String[mgrs.length];
- validatorsByManager = new ISystemValidator[mgrNames.length];
- for (int idx=0; idx<mgrs.length; idx++)
- {
- mgrNames[idx] = mgrs[idx].getName();
- ISystemValidator iiv = new ValidatorFilterPoolName(mgrs[idx].getSystemFilterPoolNamesVector());
- validatorsByManager[idx] = iiv;
- }
- }
- /**
- * Returns array of manager names to show in combo box.
- */
- protected String[] getFilterPoolManagerNames()
- {
- return mgrNames;
- }
- /**
- * Set the zero-based index of the manager name to preselect.
- * The default is zero.
- * Either call this or override getFilterPoolManagerNameSelectionIndex.
- */
- public void setFilterPoolManagerNameSelectionIndex(int index)
- {
- this.mgrSelection = index;
- //System.out.println("inside setFilterPoolManagerNameSelectionIndex in main page: " + index);
- }
- /**
- * Returns the zero-based index of the manager name to preselect.
- * Returns what was set in setFilterPoolManagerNameSelectionIndex by default.
- */
- protected int getFilterPoolManagerNameSelectionIndex()
- {
- return mgrSelection;
- }
-
- /**
- * Retrieve the pool name entry field prompt text.
- * By default, uses what we set in setPoolNamePromptText,
- * or uses a supplied default if that is null.
- */
- protected String getPoolNamePromptText()
- {
- String namePromptText = parentWizardAction.getDialogFilterPoolNamePrompt();
- return (namePromptText==null) ? SystemResources.RESID_FILTERPOOLNAME_LABEL : namePromptText;
- }
- /**
- * Retrieve the pool name entry field tooltip text.
- * By default, uses what we set in setPoolNameToolTip,
- * or uses a supplied default if that is null.
- */
- protected String getPoolNameToolTip()
- {
- String nameTip = parentWizardAction.getDialogFilterPoolNameTip();
- return (nameTip==null) ? SystemResources.RESID_FILTERPOOLNAME_TIP : nameTip;
- }
- /**
- * Retrieve the pool manager combo prompt text.
- * By default, uses what we set in setPoolManagerPromptText,
- * or uses a supplied default if that is null.
- */
- protected String getPoolManagerPromptText()
- {
- String mgrPromptText = parentWizardAction.getDialogFilterPoolManagerNamePrompt();
- return (mgrPromptText == null) ? SystemResources.RESID_FILTERPOOLMANAGERNAME_LABEL : mgrPromptText;
- }
- /**
- * Retrieve the pool manager combo field tooltip text.
- * By default, uses what we set in setPoolManagerToolTip,
- * or uses a supplied default if that is null.
- */
- protected String getPoolManagerToolTip()
- {
- String mgrTip = parentWizardAction.getDialogFilterPoolManagerNameTip();
- return (mgrTip == null) ? SystemResources.RESID_FILTERPOOLMANAGERNAME_TIP : mgrTip;
- }
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- * @param parent The parent composite
- */
- public Control createContents(Composite parent)
- {
- // top level composite
- Composite composite = new Composite(parent,SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(
- GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
- // Inner composite
- Composite composite_prompts = SystemWidgetHelpers.createComposite(
- composite, 2);
-
- // POOLNAME PROMPT
- labelName = SystemWidgetHelpers.createLabel(composite_prompts, getPoolNamePromptText());
- textName = SystemWidgetHelpers.createTextField(
- composite_prompts,this);
- String tip = getPoolNameToolTip();
- if (tip != null)
- textName.setToolTipText(tip);
-
- // POOL MANAGER PROMPT
- String[] mgrs = getFilterPoolManagerNames();
- if (mgrs != null)
- {
- labelMgr = SystemWidgetHelpers.createLabel(composite_prompts, getPoolManagerPromptText());
- mgrCombo = SystemWidgetHelpers.createReadonlyCombo(composite_prompts,this);
- tip = getPoolManagerToolTip();
- if (tip != null)
- mgrCombo.setToolTipText(tip);
- mgrCombo.setItems(mgrs);
- //System.out.println("inside createContents in main page. Selecting " + mgrSelection);
- mgrCombo.select(mgrSelection);
- setPoolNameTextLimit(mgrSelection);
- }
-
- textName.setFocus();
-
- // add keystroke listeners...
- textName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateNameInput();
- }
- }
- );
- if (mgrCombo != null)
- mgrCombo.addSelectionListener(this);
-
- setPageComplete(false);
- return composite;
- }
-
- /**
- * Return control to recieve initial focus
- */
- public Control getInitialFocusControl()
- {
- return textName;
- }
-
- // --------------------------------- //
- // METHODS FOR LISTENER INTERFACE...
- // --------------------------------- //
- /**
- * Combo selection listener method
- */
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
- /**
- * Combo selection listener method
- */
- public void widgetSelected(SelectionEvent event)
- {
- Object src = event.getSource();
- if (src == mgrCombo)
- {
- setPoolNameTextLimit(mgrCombo.getSelectionIndex());
- }
- }
- /**
- * Handles events generated by controls on this page.
- */
- public void handleEvent(Event e)
- {
- }
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- SystemMessage errMsg = null;
- Control controlInError = null;
- clearErrorMessage();
- errMsg = validateNameInput();
- if (errMsg != null)
- controlInError = textName;
- if (errMsg != null)
- controlInError.setFocus();
- return (errMsg == null);
- }
-
- // ---------------------------------------------
- // METHODS FOR VERIFYING INPUT PER KEYSTROKE ...
- // ---------------------------------------------
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- * @see #setNameValidator(ISystemValidator)
- */
- protected SystemMessage validateNameInput()
- {
- int mgrIndex = 0;
- if (mgrCombo != null)
- mgrIndex = mgrCombo.getSelectionIndex();
- if (mgrIndex < 0)
- mgrIndex = 0;
- ISystemValidator iiv = validatorsByManager[mgrIndex];
- SystemMessage errorMessage= null;
- if (iiv != null)
- errorMessage= iiv.validate(textName.getText());
- if (errorMessage != null)
- setErrorMessage(errorMessage);
- else
- clearErrorMessage();
- setPageComplete(errorMessage == null);
- return errorMessage;
- }
-
- /**
- * Set the name length for the filter pool based on the
- * currently selected manager
- */
- protected void setPoolNameTextLimit(int mgrIndex)
- {
- if (mgrIndex < 0)
- return;
- ISystemValidator iiv = validatorsByManager[mgrIndex];
- if (iiv != null)
- {
- int limit = -1;
- if (iiv != null)
- limit = iiv.getMaximumNameLength();
- if (limit == -1)
- limit = ValidatorFilterPoolName.MAX_FILTERPOOLNAME_LENGTH; // default is 50
- textName.setTextLimit(limit);
- }
- }
-
- // --------------------------------- //
- // METHODS FOR EXTRACTING USER DATA ...
- // --------------------------------- //
- /**
- * Return user-entered pool name.
- * Call this after finish ends successfully.
- */
- public String getPoolName()
- {
- return textName.getText().trim();
- }
- /**
- * Return user-selected pool manager name.
- * Call this after finish ends successfully.
- */
- public String getPoolManagerName()
- {
- if (mgrCombo!=null)
- return mgrCombo.getText();
- else
- return null;
- }
-
- /**
- * Return an object containing user-specified information pertinent to filter pool actions
- */
- public SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs()
- {
- SystemFilterPoolDialogOutputs output = new SystemFilterPoolDialogOutputs();
- output.filterPoolName = getPoolName();
- output.filterPoolManagerName = getPoolManagerName();
- return output;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java
deleted file mode 100644
index bee623fce..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java
+++ /dev/null
@@ -1,71 +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.filters.dialogs;
-
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.wizards.ISystemWizardPage;
-
-
-
-/**
- * Interface for new Filter wizard main page classes
- */
-public interface SystemFilterNewFilterPoolWizardMainPageInterface extends ISystemWizardPage
-{
- /**
- * Call this to specify a validator for the pool name. It will be called per keystroke.
- * Only call this if you do not call setFilterPoolManagers!
- */
- public void setNameValidator(ISystemValidator v);
- /**
- * Even if you call setFilterPoolManagers and you really want your own validators,
- * then call this. Otherwise, FolderNameValidator will be called for you.
- * The input must be an array of validators that is the same length as the array
- * of filter pool managers. Call this AFTER setFilterPoolManagers!
- */
- public void setNameValidators(ISystemValidator[] v);
- /**
- * Call this to specify the list of filter pool managers to allow the user to select from.
- * Either call this or override getFilterPoolManagerNames, or leave null and this prompt will
- * not show.
- */
- public void setFilterPoolManagers(ISystemFilterPoolManager[] mgrs);
- /**
- * Set the zero-based index of the manager name to preselect.
- * The default is zero.
- * Either call this or override getFilterPoolManagerNameSelectionIndex.
- */
- public void setFilterPoolManagerNameSelectionIndex(int index);
-
- /**
- * Return user-entered pool name.
- * Call this after finish ends successfully.
- */
- public String getPoolName();
- /**
- * Return user-selected pool manager name.
- * Call this after finish ends successfully.
- */
- public String getPoolManagerName();
- /**
- * Return an object containing user-specified information pertinent to filter pool actions
- */
- public SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardDialog.java
deleted file mode 100644
index 78dc6791a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardDialog.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.filters.dialogs;
-import org.eclipse.rse.ui.dialogs.SystemWizardDialog;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Extends WizardDialog to support ability to pass data in from the
- * common wizard action class, and get data out.
- * This is deferred to the actual wizard, which in turn defers to the wizard's first page.
- */
-public class SystemFilterPoolWizardDialog
- extends SystemWizardDialog
- implements SystemFilterPoolDialogInterface
-{
- // all ctors are from parent...
- /**
- * Constructor
- */
- public SystemFilterPoolWizardDialog(Shell shell, SystemFilterPoolWizardInterface wizard)
- {
- super(shell, wizard);
- }
- /**
- * Constructor two. Use when you have an input object at instantiation time.
- */
- public SystemFilterPoolWizardDialog(Shell shell, SystemFilterPoolWizardInterface wizard, Object inputObject)
- {
- super(shell,wizard,inputObject);
- }
-
- /**
- * Return wrapped filter pool wizard
- */
- public SystemFilterPoolWizardInterface getFilterPoolWizard()
- {
- return (SystemFilterPoolWizardInterface)getWizard();
- }
-
- /**
- * Return an object containing user-specified information pertinent to filter pool actions
- */
- public SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs()
- {
- return getFilterPoolWizard().getFilterPoolDialogOutputs();
- }
-
- /**
- * Allow base action to pass instance of itself for callback to get info
- */
- public void setFilterPoolDialogActionCaller(SystemFilterAbstractFilterPoolAction caller)
- {
- getFilterPoolWizard().setFilterPoolDialogActionCaller(caller);
- }
-
- /**
- * Set the help context id for this wizard
- */
- public void setHelpContextId(String id)
- {
- super.setHelp(id);
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java
deleted file mode 100644
index 155cd6a45..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java
+++ /dev/null
@@ -1,27 +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.filters.dialogs;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.rse.ui.wizards.ISystemWizard;
-
-/**
- * An interface for filter pool wizards to implement
- */
-public interface SystemFilterPoolWizardInterface
- extends ISystemWizard, SystemFilterPoolDialogInterface
-{
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWizardDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWizardDialog.java
deleted file mode 100644
index 69f4db338..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWizardDialog.java
+++ /dev/null
@@ -1,75 +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.filters.dialogs;
-import org.eclipse.rse.ui.dialogs.SystemWizardDialog;
-import org.eclipse.rse.ui.filters.SystemFilterDialogInterface;
-import org.eclipse.rse.ui.filters.SystemFilterDialogOutputs;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Extends WizardDialog to support ability to pass data in from the
- * common wizard action class, and get data out.
- * This is deferred to the actual wizard, which in turn defers to the wizard's first page.
- */
-public class SystemFilterWizardDialog
- extends SystemWizardDialog
- implements SystemFilterDialogInterface
-{
-
- // all ctors are from parent...
- /**
- * Constructor
- */
- public SystemFilterWizardDialog(Shell shell, ISystemFilterWizard wizard)
- {
- super(shell, wizard);
- }
- /**
- * Constructor two. Use when you have an input object at instantiation time.
- */
- public SystemFilterWizardDialog(Shell shell, ISystemFilterWizard wizard, Object inputObject)
- {
- super(shell,wizard,inputObject);
- }
-
- /**
- * Return wrapped filter wizard
- */
- public ISystemFilterWizard getFilterWizard()
- {
- return (ISystemFilterWizard)getWizard();
- }
-
- /**
- * Return an object containing user-specified information pertinent to filter actions
- */
- public SystemFilterDialogOutputs getFilterDialogOutputs()
- {
- return getFilterWizard().getFilterDialogOutputs();
- }
-
- /**
- * Allow base action to pass instance of itself for callback to get info
- */
- public void setFilterDialogActionCaller(SystemFilterAbstractFilterAction caller)
- {
- getFilterWizard().setFilterDialogActionCaller(caller);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 27c5bc7ee..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java
+++ /dev/null
@@ -1,651 +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.filters.dialogs;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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;
-import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentProvider;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
-import org.eclipse.rse.ui.filters.SystemFilterPoolManagerUIProvider;
-import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.filters.SystemFilterWorkWithFilterPoolsTreeViewer;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterCopyFilterPoolAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterMoveFilterPoolAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterNewFilterPoolAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterWorkWithFilterPoolsRefreshAllAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.Tree;
-
-/**
- * Dialog for working with filter pools.
- */
-public class SystemFilterWorkWithFilterPoolsDialog
- extends SystemPromptDialog
- implements ISystemPropertyConstants,
- ISelectionChangedListener,
- ISystemDeleteTarget, ISystemRenameTarget,
- SystemFilterPoolDialogInterface
- //,ISystemResourceChangeListener
-{
-
- private String promptString;
- //private Label prompt;
- private SystemFilterWorkWithFilterPoolsTreeViewer tree;
- private ToolBar toolbar = null;
- private ToolBarManager toolbarMgr = null;
- private SystemSimpleContentProvider provider = new SystemSimpleContentProvider();
- private SystemSimpleContentElement filterPoolContent;
- private SystemSimpleContentElement preSelectedRoot = null;
- private ISystemFilterPoolManager[] filterPoolManagers;
- private SystemFilterPoolManagerUIProvider caller = null;
- private boolean initializing = false;
-
- //private ActionContributionItem newActionItem, deleteActionItem, renameActionItem;
- private SystemFilterWorkWithFilterPoolsRefreshAllAction refreshAction = null;
- private SystemFilterNewFilterPoolAction newAction = null;
- //private SystemSimpleDeleteAction dltAction = null;
- private SystemCommonDeleteAction dltAction = null;
- //private SystemSimpleRenameAction rnmAction = null;
- private SystemCommonRenameAction rnmAction = null;
- private SystemFilterCopyFilterPoolAction cpyAction = null;
- private SystemFilterMoveFilterPoolAction movAction = null;
- private IAction[] contextMenuActions = null;
-
-
- /**
- * Constructor
- */
- public SystemFilterWorkWithFilterPoolsDialog(Shell shell, String title, String prompt,
- SystemFilterPoolManagerUIProvider caller)
- //SystemFilterPoolManager[] filterPoolManagers,
- //SystemSimpleContentElement filterPoolContent)
- {
- super(shell, title);
- this.caller = caller;
- promptString = prompt;
- this.filterPoolContent = caller.getTreeModel();
- this.filterPoolManagers = caller.getFilterPoolManagers();
- this.preSelectedRoot = caller.getTreeModelPreSelection(filterPoolContent);
- setCancelButtonLabel(SystemResources.BUTTON_CLOSE);
- setShowOkButton(false);
- //pack();
- }
-
- /**
- * Set the root to preselect
- */
- public void setRootToPreselect(SystemSimpleContentElement preSelectedRoot)
- {
- this.preSelectedRoot = preSelectedRoot;
- }
-
- /**
- * Create message line. Intercept so we can set msg line of form.
- */
- protected ISystemMessageLine createMessageLine(Composite c)
- {
- /*ISystemMessageLine msgLine =*/ super.createMessageLine(c);
- return fMessageLine;
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return tree.getControl();
- }
-
- /**
- * Set the pool name validator for the rename action.
- * The work-with dialog automatically calls setExistingNamesList on it for each selection.
- */
- public void setFilterPoolNameValidator(ValidatorFilterPoolName pnv)
- {
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- //System.out.println("INSIDE CREATEINNER");
- /*
- // top level composite
- Composite composite = new Composite(parent,SWT.NONE);
- composite.setLayout(new GridLayout());
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- composite.setLayoutData(data);
- */
-
- // Inner composite
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 1);
-
- // PROMPT
- /*prompt =*/ SystemWidgetHelpers.createLabel(composite_prompts, promptString);
-
- // TOOLBAR
- createToolBar(composite_prompts);
-
- // WORK-WITH TREE
- initializing = true;
- tree = new SystemFilterWorkWithFilterPoolsTreeViewer(getShell(), this, new Tree(composite_prompts, SWT.SINGLE | SWT.BORDER));
- GridData treeData = new GridData();
- treeData.horizontalAlignment = GridData.FILL;
- treeData.grabExcessHorizontalSpace = true;
- treeData.widthHint = 300;
- treeData.heightHint= 300;
- treeData.verticalAlignment = GridData.CENTER;
- treeData.grabExcessVerticalSpace = true;
- tree.getTree().setLayoutData(treeData);
-
- tree.setContentProvider(provider);
- tree.setLabelProvider(provider);
-
- // populate tree
- if (filterPoolContent != null)
- {
- filterPoolContent.setData(tree); // so actions can refresh our tree
- tree.setInput(filterPoolContent);
- }
-
- if (preSelectedRoot != null)
- tree.setSelection(new StructuredSelection(preSelectedRoot), true);
-
- // expand and pre-check
- tree.expandAll();
- tree.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
-
- // add selection listener to tree
- tree.addSelectionChangedListener(this);
-
- // populate toolbar
- populateToolBar(getShell(), tree);
-
- initializing = false;
-
- return composite_prompts;
- }
-
- /**
- * Callback from tree when refresh is done
- */
- public boolean refreshTree()
- {
- if (initializing)
- return false;
- this.filterPoolContent = caller.getTreeModel();
- this.filterPoolManagers = caller.getFilterPoolManagers();
- this.preSelectedRoot = caller.getTreeModelPreSelection(filterPoolContent);
- filterPoolContent.setData(tree); // so actions can refresh our tree
- tree.setInput(filterPoolContent); // hmm, hope we don't go into a loop!
- //System.out.println("in refreshTree");
- return true;
- }
-
- /**
- * Create the toolbar displayed at the top of the dialog
- */
- protected void createToolBar(Composite parent)
- {
- toolbar = new ToolBar(parent, SWT.FLAT | SWT.WRAP);
- toolbarMgr = new ToolBarManager(toolbar);
- }
- /**
- * Populate the toolbar displayed at the top of the dialog
- */
- protected void populateToolBar(Shell shell, SystemFilterWorkWithFilterPoolsTreeViewer tree)
- {
- newAction = new SystemFilterNewFilterPoolAction(shell,this);
- //dltAction = new SystemSimpleDeleteAction(shell,this);
- dltAction = new SystemCommonDeleteAction(shell,this);
- rnmAction = new SystemCommonRenameAction(shell,this);
- // undo typical settings...
- rnmAction.allowOnMultipleSelection(false);
- rnmAction.setProcessAllSelections(false);
- //rnmAction = new SystemSimpleRenameAction(shell,this);
- //poolNameValidator = new ValidatorFilterPoolName((Vector)null);
- //rnmAction.setNameValidator(poolNameValidator);
- cpyAction = new SystemFilterCopyFilterPoolAction(shell);
- cpyAction.setSelectionProvider(this);
- movAction = new SystemFilterMoveFilterPoolAction(shell);
- movAction.setSelectionProvider(this);
- refreshAction = new SystemFilterWorkWithFilterPoolsRefreshAllAction(tree, shell);
-
- contextMenuActions = new IAction[6];
- contextMenuActions[0] = newAction;
- contextMenuActions[1] = rnmAction;
- contextMenuActions[2] = cpyAction;
- contextMenuActions[3] = movAction;
- contextMenuActions[4] = dltAction;
- contextMenuActions[5] = refreshAction;
-
- for (int idx=0; idx<contextMenuActions.length; idx++)
- {
- ((ISystemAction)contextMenuActions[idx]).setSelection(tree.getSelection());
- ((ISystemAction)contextMenuActions[idx]).setViewer(tree);
- }
-
- // populate toolbar...
- toolbarMgr.add(refreshAction);
- toolbarMgr.add(newAction);
- toolbarMgr.add(dltAction);
- toolbarMgr.add(rnmAction);
- toolbarMgr.add(cpyAction);
- toolbarMgr.add(movAction);
- toolbarMgr.update(false);
-
- // populate tree..
- tree.setContextMenuActions(contextMenuActions);
-
- }
-
- /**
- * ISelectionChangedListener method. Called when user changes selection in tree
- */
- public void selectionChanged(SelectionChangedEvent event)
- {
- //IStructuredSelection sel = (IStructuredSelection)event.getSelection();
- //SystemSimpleContentElement element = (SystemSimpleContentElement)sel.getFirstElement();
- if (rnmAction != null)
- rnmAction.selectionChanged(event);
- }
-
- /**
- * Return current selection
- */
- public SystemSimpleContentElement getSelectedElement()
- {
- IStructuredSelection sel = (IStructuredSelection)tree.getSelection();
- return (SystemSimpleContentElement)sel.getFirstElement();
- }
- /**
- * Return true if something selected
- */
- public boolean isSelectionEmpty()
- {
- IStructuredSelection sel = (IStructuredSelection)tree.getSelection();
- return sel.isEmpty();
- }
- public void clearSelection()
- {
- tree.setSelection((ISelection)null);
- }
-
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK()
- {
- boolean closeDialog = verify();
- if (closeDialog)
- {
- setOutputObject(getInputObject());
- }
- return closeDialog;
- }
-
- public boolean close()
- {
- //RSEUIPlugin.getDefault().getSystemRegistry().removeSystemResourceChangeListener(this);
- return super.close();
- }
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify()
- {
- String errMsg = null;
- Control controlInError = null;
- clearErrorMessage();
-
- if (errMsg != null)
- controlInError.setFocus();
- return (errMsg == null);
- }
-
- /**
- * 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 = true;
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- setPageComplete(isPageComplete());
- }
-
- // ------------------------------
- // ISYSTEMDELETETARGET METHODS...
- // ------------------------------
-
- /**
- * Return true if delete should even be shown in the popup menu
- */
- public boolean showDelete()
- {
- return true;
- }
- /**
- * Return true if delete should be enabled based on your current selection.
- */
- public boolean canDelete()
- {
- SystemSimpleContentElement element = getSelectedElement();
- if (element != null) {
- Object elementData = element.getData();
- //System.out.println("In SFWWFPsDlg.canDelete: element data class = " + elementData.getClass().getName());
- if (elementData instanceof ISystemFilterPool) {
- ISystemFilterPool pool = (ISystemFilterPool)elementData;
- return (pool.isDeletable() && element.isDeletable());
- }
- }
- return false;
- }
-
- /**
- * Actually do the delete of currently selected items.
- */
- public boolean doDelete(IProgressMonitor monitor)
- {
- boolean ok = false;
- SystemSimpleContentElement element = getSelectedElement();
- Object elementData = element.getData();
- if ((elementData == null) || !(elementData instanceof ISystemFilterPool))
- return ok;
- ISystemFilterPool pool = (ISystemFilterPool)elementData;
- ISystemFilterPoolManager mgr = pool.getSystemFilterPoolManager();
- try
- {
- mgr.deleteSystemFilterPool(pool);
- ok = true;
- SystemSimpleContentElement parent = element.getParent();
- clearSelection();
- tree.setSelection(new StructuredSelection(parent),true);
- parent.deleteChild(element);
- tree.refresh(parent);
- } catch (Exception exc)
- {
- //SystemMessage.displayExceptionMessage(getShell(),RSEUIPlugin.getResourceBundle(),
- // ISystemMessages.MSG_EXCEPTION_DELETING,exc,
- // pool.getName());
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(pool.getName(),exc));
- msgDlg.open();
- //RSEUIPlugin.logError("Error deleting filter pool in workwith dialog",exc);
- }
- return ok;
- }
-
- // ------------------------------
- // ISYSTEMRENAMETARGET METHODS...
- // ------------------------------
-
- /**
- * Return true if rename should even be shown in the popup menu
- */
- public boolean showRename()
- {
- return true;
- }
- /**
- * Return true if rename should be enabled based on your current selection.
- */
- public boolean canRename()
- {
- boolean canRename = false;
- SystemSimpleContentElement element = getSelectedElement();
- if (element != null) {
- Object elementData = element.getData();
- //System.out.println("In SFWWFPsDlg.canRename: element data class = " + elementData.getClass().getName());
- if (elementData instanceof ISystemFilterPool) {
- ISystemFilterPool pool = (ISystemFilterPool)elementData;
- canRename = (!pool.isNonRenamable() && element.isRenamable());
- //if (canRename) {
- // poolNameValidator.setExistingNamesList(pool.getSystemFilterPoolManager().getSystemFilterPoolNamesVector());
- //}
- }
- }
- return canRename;
- }
-
- /**
- * Actually do the rename of currently selected items.
- * The array of new names matches the currently selected items.
- */
- public boolean doRename(String[] newNames)
- {
- boolean ok = false;
- SystemSimpleContentElement element = getSelectedElement();
- Object elementData = element.getData();
- if ((elementData == null) || !(elementData instanceof ISystemFilterPool))
- return ok;
- ISystemFilterPool pool = (ISystemFilterPool)elementData;
- ISystemFilterPoolManager mgr = pool.getSystemFilterPoolManager();
- try
- {
- mgr.renameSystemFilterPool(pool, newNames[0]);
- ok = true;
- element.setName(newNames[0]);
- String properties[] = {IBasicPropertyConstants.P_TEXT};
- tree.update(element, properties); // for refreshing non-structural properties in viewer when model changes
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayMessage(getShell(), exc);
- }
- catch (Exception exc)
- {
- //SystemMessage.displayExceptionMessage(getShell(),RSEUIPlugin.getResourceBundle(),
- // ISystemMessages.MSG_EXCEPTION_RENAMING,exc,
- // pool.getName());
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(pool.getName(),exc));
- msgDlg.open();
- //RSEUIPlugin.logError("Error renaming filter pool in workwith dialog",exc);
- }
- return ok;
- }
-
- // -----------------------------
- // ISELECTIONPROVIDER METHODS...
- // -----------------------------
- /**
- *
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener)
- {
- tree.addSelectionChangedListener(listener);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener)
- {
- tree.removeSelectionChangedListener(listener);
- }
-
- public void setSelection(ISelection selection)
- {
- tree.setSelection(selection);
- }
-
- public ISelection getSelection()
- {
- return tree.getSelection();
- }
-
-
- /**
- * Callback from new action when new pool created
- */
- public void addNewFilterPool(Shell shell, ISystemFilterPool pool)
- {
- String newPoolMgrName = pool.getSystemFilterPoolManager().getName();
- SystemSimpleContentElement rootElement = filterPoolContent;
- SystemSimpleContentElement[] mgrElements = rootElement.getChildren();
- SystemSimpleContentElement mgrElement = null;
- for (int idx=0; (mgrElement==null) && (idx<mgrElements.length); idx++)
- {
- String mgrName = mgrElements[idx].getName();
- if (mgrName.equals(newPoolMgrName))
- mgrElement = mgrElements[idx];
- }
- SystemSimpleContentElement cElement =
- new SystemSimpleContentElement(pool.getName(), pool, mgrElement, (Vector)null);
- cElement.setImageDescriptor(SystemFilterUIHelpers.getFilterPoolImage(pool.getProvider(),pool));
- mgrElement.addChild(cElement, 0);
- tree.refresh(mgrElement); // rebuild whole thing
- tree.setSelection(new StructuredSelection(cElement),true);
- // defect 42503
- Object inputObj = getInputObject();
- if (inputObj instanceof ISubSystem)
- {
- ISubSystem ss = (ISubSystem)inputObj;
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FILTERPOOL_CREATED);
- msg.makeSubstitution("'"+pool.getName()+"'", "'"+ss.getName()+"'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- if (shell.isDisposed() || !shell.isVisible())
- shell = getShell();
- SystemMessageDialog msgdlg = new SystemMessageDialog(shell, msg);
- boolean yes = msgdlg.openQuestionNoException();
- if (yes)
- {
- ISystemFilterPoolReferenceManager sfprm = ss.getSystemFilterPoolReferenceManager();
- sfprm.addReferenceToSystemFilterPool(pool);
- }
- }
- }
-
-
- /**
- * Callback from new action to get array of managers
- */
- public ISystemFilterPoolManager[] getFilterPoolManagers()
- {
- ISystemFilterPoolManager[] mgrs = filterPoolManagers;
- return mgrs;
- }
- /**
- * Callback from new action to get index of initial manager to select
- */
- public int getFilterPoolManagerSelection()
- {
- int selection = 0;
- SystemSimpleContentElement element = getSelectedElement();
- Object elementData = element.getData();
- if (elementData != null)
- {
- if (elementData instanceof ISystemFilterPoolManager)
- selection = getManagerIndex((ISystemFilterPoolManager)elementData);
- else if (elementData instanceof ISystemFilterPool)
- selection = getManagerIndex(((ISystemFilterPool)elementData).getSystemFilterPoolManager());
- }
- //System.out.println("In getFilterPoolManagerSelection(). Returning "+selection);
- return selection;
- }
-
- private int getManagerIndex(ISystemFilterPoolManager mgr)
- {
- int pos = -1;
- ISystemFilterPoolManager[] mgrs = filterPoolManagers;
- for (int idx=0; (pos==-1)&&(idx<mgrs.length); idx++)
- {
- if (mgr == mgrs[idx])
- pos = idx;
- }
- if (pos == -1)
- pos = 0;
- return pos;
- }
-
- // SystemFilterPoolDialogInterface methods...
- /**
- * Allow base action to pass instance of itself for callback to get info
- */
- public void setFilterPoolDialogActionCaller(SystemFilterAbstractFilterPoolAction caller)
- {
- }
- /**
- * Return an object containing user-specified information pertinent to filter pool actions
- */
- public SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs()
- {
- SystemFilterPoolDialogOutputs output = new SystemFilterPoolDialogOutputs();
- output.filterPoolTreeRoot = filterPoolContent;
- return output;
- }
-
- /**
- * Set the help context id for this wizard
- */
- public void setHelpContextId(String id)
- {
- super.setHelp(id);
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 516610a64..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java
+++ /dev/null
@@ -1,664 +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.filters.dialogs;
-
-import java.util.Vector;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterContainerReference;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolSelectionValidator;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapper;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-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;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterName;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Base Wizard for users to define a new system filter.
- * While subsystem providers are free to offer their own wizards, this
- * abstracts out much of it and makes it easy to simply override and
- * supply a couple classes to offer a totally unique presentation to the
- * user.
- * <p>
- * Some guiding design rules for this wizard:
- * <ul>
- * <li>Users are confused about filter strings versus filters. So, we don't
- * support the creation of multiple filter strings at the time the filter
- * is created, only after via the change action. The wizard basically
- * prompts for the creation of a single new filter string.
- * <li>Users are confused about "naming" a filter, so the name is not asked
- * for until the second page, and it is possible for subclasses to
- * default that name to something intelligent based on the contents of
- * the first page, such that users can press Finish and not think about
- * the name.
- * </ul>
- * <p>
- * While this class can be subclassed, you should find all attributes can be
- * configured via setters.
- */
-public class SystemNewFilterWizard
- extends AbstractSystemWizard
-{
- protected SystemNewFilterWizardMainPage mainPage;
- protected SystemNewFilterWizardNamePage namePage;
- protected SystemNewFilterWizardInfoPage infoPage;
- protected ISystemFilterContainer filterContainer;
- protected ISystemFilterPool parentPool;
- protected ISystemFilterPool[] poolsToSelectFrom;
- protected String type;
- protected String[] defaultFilterStrings;
- //protected String verbage;
- //protected String page1Description;
- protected boolean showFilterStrings = true;
- protected boolean showNamePrompt = true;
- protected boolean showInfoPage = true;
- protected boolean fromRSE = false;
- protected boolean page1DescriptionSet = false;
- protected ISystemFilter newFilter = null;
- protected SystemFilterStringEditPane editPane;
- protected ISystemFilterPoolReferenceManagerProvider provider;
- protected ISystemFilterPoolWrapperInformation poolWrapperInformation;
- protected ISystemFilterPoolSelectionValidator filterPoolSelectionValidator;
- protected ISystemNewFilterWizardConfigurator configurator;
-
-
- /**
- * Constructor when you want to supply your own title and image
- * @param title - title to show for this wizard. This is used as the page title! The title is always "New"!
- * @param wizardImage - title bar image for this wizard
- * @param parentPool - the filter pool we are to create this filter in.
- */
- public SystemNewFilterWizard(String title, ImageDescriptor wizardImage, ISystemFilterPool parentPool)
- {
- this(new SystemNewFilterWizardConfigurator(title), wizardImage, parentPool);
- }
- /**
- * Constructor when you want to use the default page title and image, or want to
- * supply it via setWizardTitle and setWizardImage.
- * @param parentPool - the filter pool we are to create this filter in.
- */
- public SystemNewFilterWizard(ISystemFilterPool parentPool)
- {
- this(new SystemNewFilterWizardConfigurator(),
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD_ID),
- parentPool);
- }
- /**
- * Constructor when you want to supply all your own configuration data
- * @param data - configuration data
- * @param wizardImage - title bar image for this wizard
- * @param parentPool - the filter pool we are to create this filter in.
- */
- public SystemNewFilterWizard(ISystemNewFilterWizardConfigurator data, ImageDescriptor wizardImage, ISystemFilterPool parentPool)
- {
- super(SystemResources.RESID_NEWFILTER_TITLE, wizardImage);
- super.setWizardPageTitle(data.getPageTitle());
- super.setForcePreviousAndNextButtons(true);
- this.configurator = data;
- this.parentPool = parentPool;
- setOutputObject(null);
- }
-
- // -----------------------------------
- // INPUT/CONFIGURATION METHODS...
- // -----------------------------------
-
- /**
- * If you want to prompt the user for the parent filter pool to create this filter in,
- * call this with the list of filter pools. In this case, the filter pool passed into
- * the constructor will be used as the initial selection.
- */
- public void setAllowFilterPoolSelection(ISystemFilterPool[] poolsToSelectFrom)
- {
- this.poolsToSelectFrom = poolsToSelectFrom;
- }
- /**
- * This is an alternative to {@link #setAllowFilterPoolSelection(ISystemFilterPool[])}
- * <p>
- * If you want to prompt the user for the parent filter pool to create this filter in,
- * but want to not use the term "pool" say, you can use an array of euphamisms. That is,
- * you can pass an array of objects that map to filter pools, but have a different
- * display name that is shown in the dropdown.
- * <p>
- * Of course, if you want to do this, then you will likely want to offer a different
- * label and tooltip for the prompt, and different verbage above the prompt. The
- * object this method accepts as a parameter encapsulates all that information, and
- * there is a default class you can use for this.
- */
- public void setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolsToSelectFrom)
- {
- this.poolWrapperInformation = poolsToSelectFrom;
- }
- /**
- * Set the type of filter we are creating. Results in a call to setType on the new filter.
- * Types are not used by the base filter framework but are a way for tools to create typed
- * filters and have unique actions per filter type.
- */
- public void setType(String type)
- {
- this.type = type;
- }
- /**
- * Get the type of filter as set by {@link #setType(String)}
- */
- public String getType()
- {
- return type;
- }
- /**
- * Call in order to not have the first page, but instead the name-prompt page. Default is true.
- * @see #setDefaultFilterStrings(String[])
- */
- public void setShowFilterStrings(boolean show)
- {
- showFilterStrings = show;
- }
- /**
- * Call in order to not prompt the user for a filter name. This also implies we will not
- * be prompting for a parent filter pool! Default is true.
- * <p>
- * This is used when creating temporary filters that won't be saved. In this case, on
- * Finish a filter is not created! Instead, call getFilterStrings() to get the filter
- * strings created by the user ... typically there is just one unless you also called
- * setDefaultFilterStrings, in which case they will also be returned.
- * <p>
- * For convenience, when this is called, setShowInfoPage(false) is called for you
- */
- public void setShowNamePrompt(boolean show)
- {
- showNamePrompt = show;
- if (!show)
- setShowInfoPage(false);
- }
- /**
- * Specify the help to show for the name page (page 2)
- */
- public void setNamePageHelp(String helpId)
- {
- if (configurator instanceof SystemNewFilterWizardConfigurator)
- ((SystemNewFilterWizardConfigurator)configurator).setPage2HelpID(helpId);
- }
- /**
- * Call in order to not show the final info-only page of the wizard. Default is true.
- */
- public void setShowInfoPage(boolean show)
- {
- showInfoPage = show;
- }
- /**
- * Call this if you want the filter to auto-include some default filter strings.
- */
- public void setDefaultFilterStrings(String[] defaultFilterStrings)
- {
- this.defaultFilterStrings = defaultFilterStrings;
- }
- /**
- * Set if we are creating a filter for use in the RSE or not. This affects the
- * tips and help.
- * <p>
- * This is set to true automatically by the subsystem factory base class in the RSE,
- * else it defaults to false.
- */
- public void setFromRSE(boolean rse)
- {
- this.fromRSE = true;
- }
- /**
- * Set the validator to call when the user selects a filter pool. Optional.
- * Only valid in create mode.
- */
- public void setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator)
- {
- this.filterPoolSelectionValidator = validator;
- }
-
- /**
- * Set the contextual system filter pool reference manager provider. Eg, in the RSE, this
- * will be the selected subsystem if the New Filter action is launched from there, or if
- * launched from a filter pool reference under there.
- * <p>
- * Will be non-null if the current selection is a reference to a filter pool or filter,
- * or a reference manager provider.
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
- {
- this.provider = provider;
- //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
- * filter strings via the Change action. Use this method to change that default.
- */
- public void setVerbage(String verbage)
- {
- if (configurator instanceof SystemNewFilterWizardConfigurator)
- ((SystemNewFilterWizardConfigurator)configurator).setPage3Tip1(verbage);
- }
- /**
- * Set the wizard page title. Using this makes it possible to avoid subclassing.
- * The page title goes below the wizard title, and can be unique per page. However,
- * typically the wizard page title is the same for all pages... eg "Filter".
- * <p>
- * This is not used by default, but can be queried via getPageTitle() when constructing
- * pages.
- */
- public void setWizardPageTitle(String pageTitle)
- {
- super.setWizardPageTitle(pageTitle);
- if (configurator instanceof SystemNewFilterWizardConfigurator)
- ((SystemNewFilterWizardConfigurator)configurator).setPageTitle(pageTitle);
- }
- /**
- * Set the description to display on the first page of the wizard
- */
- public void setPage1Description(String description)
- {
- if (configurator instanceof SystemNewFilterWizardConfigurator)
- ((SystemNewFilterWizardConfigurator)configurator).setPage1Description(description);
- page1DescriptionSet = true;
- }
-
- /**
- * Specify an edit pane that prompts the user for the contents of a filter string.
- */
- public void setFilterStringEditPane(SystemFilterStringEditPane editPane)
- {
- this.editPane = editPane;
- }
-
- // -----------------------------------
- // INTERNAL BUT OVERRIDABLE METHODS...
- // -----------------------------------
- /**
- * Extendable point for child classes. You don't need to override typically though... rather
- * you can simply supply your own filter string edit pane.
- * <p>
- * By default, this page uses the wizard page title as set in setWizardPageTitle(...) or the constructor.
- * @return the primary page prompting for a single filter string.
- */
- protected SystemNewFilterWizardMainPage createMainPage()
- {
- mainPage = null;
- if (editPane == null)
- mainPage = new SystemNewFilterWizardMainPage(this, configurator);
- else
- mainPage = new SystemNewFilterWizardMainPage(this, editPane, configurator);
- return mainPage;
- }
- /**
- * Extendable point for child classes. You don't need to override typically though.
- * <p>
- * By default, this page uses the wizard page title as set in setWizardPageTitle(...) or the constructor.
- * @return the wizard page prompting for the filter name and parent filter pool
- */
- protected SystemNewFilterWizardNamePage createNamePage()
- {
- namePage = new SystemNewFilterWizardNamePage(this, parentPool, configurator);
- return namePage;
- }
- /**
- * Extendable point for child classes. You don't need to override typically though.
- * <p>
- * By default, this page uses the wizard page title as set in setWizardPageTitle(...) or the constructor.
- * @return the final wizard page with additional readonly information
- */
- protected SystemNewFilterWizardInfoPage createInfoPage()
- {
- boolean showFilterPoolsTip = ((poolsToSelectFrom != null) || (poolWrapperInformation != null));
- infoPage = new SystemNewFilterWizardInfoPage(this, showFilterPoolsTip, configurator);
- return infoPage;
- }
- /**
- * Override of parent to do nothing
- */
- public void addPages() {}
-
- /**
- * Creates the wizard pages.
- * This method is an override from the parent Wizard class.
- */
- public void createPageControls(Composite c)
- {
- try {
- // MAIN PAGE...
- mainPage = createMainPage();
- mainPage.setSystemFilterPoolReferenceManagerProvider(provider);
- mainPage.setType(type);
- if (defaultFilterStrings != null)
- mainPage.setDefaultFilterStrings(defaultFilterStrings);
- if (showFilterStrings)
- {
- addPage(mainPage);
- }
-
- // NAME PAGE...
- namePage = createNamePage();
- if (showNamePrompt && (namePage!=null))
- {
- if (filterPoolSelectionValidator!=null)
- namePage.setFilterPoolSelectionValidator(filterPoolSelectionValidator);
- if (poolsToSelectFrom != null)
- {
- ISystemValidator[] validators = new ISystemValidator[poolsToSelectFrom.length];
- for (int idx=0; idx<validators.length; idx++)
- validators[idx] = getFilterNameValidator(poolsToSelectFrom[idx]);
- namePage.setAllowFilterPoolSelection(poolsToSelectFrom, validators);
- }
- else if (poolWrapperInformation != null)
- {
- ISystemFilterPoolWrapper[] wrappers = poolWrapperInformation.getWrappers();
- ISystemValidator[] validators = new ISystemValidator[wrappers.length];
- for (int idx=0; idx<validators.length; idx++)
- validators[idx] = getFilterNameValidator(wrappers[idx].getSystemFilterPool());
- namePage.setAllowFilterPoolSelection(poolWrapperInformation, validators);
- }
- else
- {
- ISystemValidator validator = getFilterNameValidator(getFilterContainer());
- namePage.setFilterNameValidator(validator);
- }
- if (!showFilterStrings && page1DescriptionSet)
- namePage.setDescription(configurator.getPage1Description());
- addPage(namePage);
- }
-
- // INFO PAGE...
- if (showInfoPage)
- {
- infoPage = createInfoPage();
- if (infoPage!=null)
- {
- addPage(infoPage);
- }
- }
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Error in createPageControls of SystemNewFilterWizard", exc); //$NON-NLS-1$
- //System.out.println("Error in createPageControls of SystemNewFilterWizard"); // temp
- //exc.printStackTrace(); // temp
- }
- }
- /**
- * Extendable point for child classes.
- * Override to change the validator used for the filter name given the master object.
- * By default, uses FilterNameValidator.
- */
- protected ISystemValidator getFilterNameValidator(ISystemFilterContainer container)
- {
- return getFilterNameValidator(container, null);
- }
- /**
- * Reusable method to return a name validator for renaming a filter.
- * @param the current filter object on updates. Can be null for new names. Used
- * to remove from the existing name list the current filter's name.
- */
- public static ISystemValidator getFilterNameValidator(ISystemFilterContainer container,ISystemFilter filter)
- {
- Vector v = container.getSystemFilterNames();
- if (filter != null)
- v.removeElement(filter.getName());
- ValidatorFilterName filterNameValidator = new ValidatorFilterName(v);
- return filterNameValidator;
- }
-
- /**
- * Override if necessary.
- * Returns true if filter strings are case-sensitive in this filter.
- * <p>
- * By default, returns the value in the selected filter container. If this is null, returns false.
- */
- public boolean areStringsCaseSensitive()
- {
- ISystemFilterContainer fc = getFilterContainer();
- if (fc != null)
- return fc.areStringsCaseSensitive();
- return false;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish() {
- boolean ok = false;
- newFilter = null;
- setOutputObject(null);
- if (!mainPage.performFinish()) {
- setPageError(mainPage);
- } else if (!namePage.performFinish()) {
- setPageError(namePage);
- } else {
- Vector filterStrings = mainPage.getFilterStrings();
- String filterName = null;
- if (showNamePrompt) {
- filterName = namePage.getFilterName();
- // Get the filter parent, i.e. the filter pool for this new filter
- ISystemFilterContainer filterParent = null;
- if ((poolsToSelectFrom != null) || (poolWrapperInformation != null)) {
- filterParent = namePage.getParentSystemFilterPool();
- if (namePage.getUniqueToThisConnection()) {
- /*
- * this means the user selected to create this filter in the filter pool that is unique to this connection. So now we
- * must find, or create, that filter pool.
- */
- filterParent = provider.getUniqueOwningSystemFilterPool(true); // true -> create if not found
- } else
- filterParent = namePage.getParentSystemFilterPool();
- } else
- filterParent = getFilterContainer();
- // Create the filter and possibly a filter pool reference.
- String type = mainPage.getType();
- try {
- newFilter = createNewFilter(getShell(), filterParent, filterName, filterStrings, type);
- if (newFilter == null) return false;
- /*
- * We allow users to select a profile to create their filter in. From this we
- * select the default filter pool for the particular subsystem in that profile.
- * It is possible for the user to pick a profile that this subsystem does not yet reference.
- * To solve this we need to add a reference for them. This is only a possibility when called
- * from a subsystem's New Filter action, versus that action on a directly on a filter pool.
- */
- if ((provider != null) && (filterParent instanceof ISystemFilterPool)) {
- ISystemFilterPool parentPool = (ISystemFilterPool) filterParent;
- if (provider.getSystemFilterPoolReferenceManager().getReferenceToSystemFilterPool(parentPool) == null) {
- provider.getSystemFilterPoolReferenceManager().addReferenceToSystemFilterPool(parentPool);
- }
- }
- } catch (Exception exc) {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED);
- msg.makeSubstitution(exc);
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
- msgDlg.openWithDetails();
- return false;
- }
- setOutputObject(newFilter);
- // special handling to expand the currently selected parent node and reveal the new filter
- if ((newFilter != null) && (getInputObject() != null)) {
- Object selectedObject = getInputObject();
- if ((selectedObject instanceof ISystemFilterPoolReference) || (selectedObject instanceof ISystemFilterPoolReferenceManagerProvider)) {
- ISystemFilterPoolReferenceManagerProvider provider = null;
- if (selectedObject instanceof ISystemFilterPoolReference) {
- ISystemFilterPoolReferenceManager sfprm = ((ISystemFilterPoolReference) selectedObject).getFilterPoolReferenceManager();
- if (sfprm != null) provider = sfprm.getProvider();
- } else
- provider = (ISystemFilterPoolReferenceManagerProvider) selectedObject;
- if (provider != null) provider.filterEventFilterCreated(selectedObject, newFilter);
- } else if (selectedObject instanceof ISystemFilterReference) {
- ISystemFilterReference ref = (ISystemFilterReference) selectedObject;
- ISystemFilterPoolReferenceManagerProvider provider = ref.getProvider();
- provider.filterEventFilterCreated(selectedObject, newFilter);
- }
- }
- ok = (newFilter != null);
- } // end if showNamePrompt
- else {
- ok = true;
- setOutputObject(filterStrings);
- }
- return ok;
- }
- return false;
- }
-
- /**
- * Return the parent into which we are creating a filter. If filterContainer has been set,
- * returns that, else returns getInputObject() which is set by the calling action.
- */
- protected Object getParent()
- {
- if (filterContainer != null)
- return filterContainer;
- else
- return getInputObject();
- }
- /**
- * Return parent filter container to contain this filter
- */
- protected ISystemFilterContainer getFilterContainer()
- {
- //System.out.println("Old. inside getFilterContainer. " + filterContainer + ", " + getInputObject());
-
- if (filterContainer == null)
- {
- Object input = getInputObject();
- //if (input != null)
- // System.out.println("... input instanceof SystemFilterContainer? " + (input instanceof SystemFilterContainer));
- //else
- // System.out.println("... input is null");
-
- if (input != null)
- {
- if (input instanceof ISystemFilter)
- return ((ISystemFilter)input).getParentFilterContainer();
- else if (input instanceof ISystemFilterReference)
- return ((ISystemFilterReference)input).getReferencedFilter().getParentFilterContainer();
- else if (input instanceof ISystemFilterContainer)
- return (ISystemFilterContainer)input;
- else if (input instanceof ISystemFilterContainerReference)
- return ((ISystemFilterContainerReference)input).getReferencedSystemFilterContainer();
- else if (input instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference)input).getReferencedFilterPool();
- else if (parentPool != null)
- return parentPool;
- else if ((poolsToSelectFrom != null) && (poolsToSelectFrom.length>0))
- return poolsToSelectFrom[0];
- else if (poolWrapperInformation != null)
- return poolWrapperInformation.getPreSelectWrapper().getSystemFilterPool();
- else
- return null;
- }
- else
- return null;
- }
- else
- return filterContainer;
- }
- /**
- * Set parent filter container to contain this filter
- */
- public void setFilterContainer(ISystemFilterContainer container)
- {
- this.filterContainer = container;
- }
- /**
- * Set parent filter container to contain this filter
- */
- public void setFilterContainer(ISystemFilterContainerReference containerRef)
- {
- this.filterContainer = containerRef.getReferencedSystemFilterContainer();
- }
-
- /**
- * Extendable point for child classes.
- * Override to create unique SystemFilter object.
- * By default calls createSystemFilter in subsystem factory.
- * @param shell the shell that hosts this wizard.
- * @param filterParent the parent of this filter - usually a filter pool
- * @param aliasName the name of the filter itself
- * @param filterStrings a Vector of string that contain the specification of this filter
- * @param type the type of the filter used when interpreting the filter, usually supplied by a subsystem
- * @return the ISystemFilter that was created
- * @throws Exception if an error occurs
- */
- public ISystemFilter createNewFilter(Shell shell, ISystemFilterContainer filterParent, String aliasName, Vector filterStrings, String type) throws Exception {
- ISystemFilter newFilter = null;
- ISystemFilterPoolManager fpMgr = filterParent.getSystemFilterPoolManager();
- if (type == null)
- newFilter = fpMgr.createSystemFilter(filterParent, aliasName, filterStrings);
- else
- newFilter = fpMgr.createSystemFilter(filterParent, aliasName, filterStrings, type);
- return newFilter;
- }
-
- // -----------------------
- // CALLBACKS FROM PAGES...
- // -----------------------
- /**
- * Return true if this filter is an RSE filter or not
- */
- protected boolean isFromRSE()
- {
- return fromRSE;
- }
- /**
- * For page 2 of the New Filter wizard, if it is possible to
- * deduce a reasonable default name from the user input here,
- * then return it here. Else, just return null.
- * <b>
- * By default this calls getDefaultFilterName on the edit pane.
- */
- public String getDefaultFilterName()
- {
- return mainPage.getEditPane(null).getDefaultFilterName();
- }
- // ------
- // OUTPUT
- // ------
- /**
- * Return the filter created upon successful finish
- */
- public ISystemFilter getSystemFilter()
- {
- return newFilter;
- }
-} // end class \ No newline at end of file
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
deleted file mode 100644
index a3f9a7a62..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardConfigurator.java
+++ /dev/null
@@ -1,240 +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.filters.dialogs;
-
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-/**
- * Much of the new filter wizard is configurable, especially with respect to translated strings.
- * While there exists setters and overridable methods for most of it, sometimes that gets overwhelming.
- * This class is designed to capture all the configurable attributes that are not likely to change
- * from usage to usage of the wizard (eg, not context sensitive) such that for convenience you can
- * subclass it in a class and instantiate a singleton instance of that class to re-use in your
- * wizard.
- * <p>
- * Your best option is to subclass this and override just those things you want to change.
- */
-public class SystemNewFilterWizardConfigurator
- implements ISystemNewFilterWizardConfigurator, ISystemIconConstants
-{
- // cached attrs
- private String pageTitle;
- private String page1Description, page2Help, page3Tip1, page3Tip2;
-
- /**
- * Constructor for SystemNewFilterWizardConfigurator.
- */
- protected SystemNewFilterWizardConfigurator()
- {
- this(SystemResources.RESID_NEWFILTER_PAGE_TITLE);
- }
- /**
- * Constructor for SystemNewFilterWizardConfigurator when you want to change the page title
- */
- protected SystemNewFilterWizardConfigurator(String pageTitle)
- {
- super();
- this.pageTitle = pageTitle;
- 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 = RSEUIPlugin.HELPPREFIX + "nfp20000"; //$NON-NLS-1$
- }
-
- /**
- * Return the default page title to use for each page, unless overridden individually
- */
- public String getPageTitle()
- {
- return pageTitle;
- }
-
- /**
- * Return the page title for page 1 (which prompts for the filter string)
- */
- public String getPage1Title()
- {
- return pageTitle;
- }
-
- /**
- * Return the description for page 1 (which prompts for the filter string)
- */
- public String getPage1Description()
- {
- return page1Description;
- }
- /*page1 help of a wizard comes from the setDialogHelp of the wizard... so this is meaningless
- * Return the help ID for page 1
- *
- public String getPage1HelpID()
- {
- return RSEUIPlugin.HELPPREFIX + "nfp10000";
- }*/
-
- /**
- * Return the page title for page 2 (which prompts for the name and filter pool)
- */
- public String getPage2Title()
- {
- return pageTitle;
- }
- /**
- * Return the description for page 2 (which prompts for the name and filter pool)
- */
- public String getPage2Description()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_DESCRIPTION;
- }
- /**
- * Return the help ID for page 2
- */
- public String getPage2HelpID()
- {
- return page2Help;
- }
- /**
- * Return the verbage for the name prompt on page 2
- */
- public String getPage2NameVerbage()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_NAME_VERBAGE;
- }
- /**
- * Return the verbage for the name prompt on page 2
- */
- public String getPage2PoolVerbage()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_POOL_VERBAGE;
- }
- /**
- * Return the verbage tooltip for the name prompt on page 2
- */
- public String getPage2PoolVerbageTip()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_POOL_VERBAGE_TIP;
- }
-
- public String getPage2NamePromptLabel()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_NAME_LABEL;
- }
-
- public String getPage2NamePromptTooltip()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_NAME_TOOLTIP;
- }
-
- public String getPage2PoolPromptLabel()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_POOL_LABEL;
- }
-
- public String getPage2PoolPromptTooltip()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_POOL_TOOLTIP;
- }
-
- /**
- * Get the "Unique to this connection" checkbox label
- */
- public String getPage2UniqueToConnectionLabel()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_UNIQUE_LABEL;
- }
- /**
- * Set the "Unique to this connection" checkbox tooltip
- */
- public String getPage2UniqueToConnectionToolTip()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_UNIQUE_TOOLTIP;
- }
-
- /**
- * Return the page title for page 3 (which shows 2 tips)
- */
- public String getPage3Title()
- {
- return pageTitle;
- }
- /**
- * Return the description for page 3 (which shows 2 tips)
- */
- public String getPage3Description()
- {
- return SystemResources.RESID_NEWFILTER_PAGE3_DESCRIPTION;
- }
- /**
- * Return the description for page 3 (which shows 2 tips)
- */
- public String getPage3Tip1()
- {
- return page3Tip1;
- }
-
- /**
- * Return the second tip on page 3
- */
- public String getPage3Tip2()
- {
- return page3Tip2;
- }
-
-
-
- // -------
- // SETTERS
- // -------
- /**
- * Set the default page title. Sometimes this is all you want to change and don't want to subclass.
- */
- public void setPageTitle(String pageTitle)
- {
- this.pageTitle = pageTitle;
- }
- /**
- * Set the description for page 1
- */
- public void setPage1Description(String description)
- {
- this.page1Description = description;
- }
- /**
- * Set the help ID for page 2
- */
- public void setPage2HelpID(String helpId)
- {
- this.page2Help = helpId;
- }
- /**
- * Set the first tip to show for page 3
- */
- public void setPage3Tip1(String tip)
- {
- this.page3Tip1 = tip;
- }
- /**
- * Set the second tip to show for page 3
- */
- public void setPage3Tip2(String tip)
- {
- this.page3Tip2 = tip;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardInfoPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardInfoPage.java
deleted file mode 100644
index 10a0abbe7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardInfoPage.java
+++ /dev/null
@@ -1,114 +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.filters.dialogs;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-
-/**
- * Third page of the New Filter wizard that simply shows information
- */
-public class SystemNewFilterWizardInfoPage
- extends AbstractSystemWizardPage
-{
- private ISystemNewFilterWizardConfigurator configurator;
-
- /**
- * Constructor.
- */
- public SystemNewFilterWizardInfoPage(SystemNewFilterWizard wizard, boolean filterPoolsShowing, ISystemNewFilterWizardConfigurator data)
- {
- super(wizard, "NewFilterPage3", data.getPage3Title(), data.getPage3Description()); //$NON-NLS-1$
- this.configurator = data;
- //setHelp(data.getPage3HelpID());
- }
- // ---------------------------------
- // LIFECYCLE METHODS...
- // ---------------------------------
-
- // ---------------------------------
- // LIFECYCLE METHODS...
- // ---------------------------------
-
- /**
- * Populate the dialog area with our widgets. Return the composite they are in.
- */
- public Control createContents(Composite parent)
- {
- int nbrColumns = 1;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- if (configurator.getPage3Tip1() != null)
- {
- SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage3Tip1(), nbrColumns, false, 200);
- addSeparatorLine(composite_prompts, nbrColumns);
- addFillerLine(composite_prompts, nbrColumns);
- }
-
- if (((SystemNewFilterWizard)getWizard()).isFromRSE())
- {
- if (configurator.getPage3Tip2() != null)
- SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage3Tip2(), nbrColumns, false, 200);
- }
-
- return composite_prompts;
- }
-
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return null;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return true
- */
- public boolean performFinish()
- {
- return true;
- }
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- * @return true
- */
- public boolean isPageComplete()
- {
- return true;
- }
-
- /**
- * Inform wizard of page-complete status of this page
- */
- public void setPageComplete()
- {
- setPageComplete(isPageComplete());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardMainPage.java
deleted file mode 100644
index dfabd8947..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardMainPage.java
+++ /dev/null
@@ -1,258 +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.filters.dialogs;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.filters.ISystemFilterStringEditPaneListener;
-import org.eclipse.rse.ui.filters.SystemFilterStringEditPane;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Main page of the abstract "New Filter" wizard.
- * This page's content is supplyable in the form of an "edit pane" which
- * essentially is reponsible for the content area of the wizard, and
- * which implements necessary minimal methods for this wizard to
- * interact with it.
- * <p>
- * As per the design goals of the filter wizard, this page effectively
- * only prompts to create a single new filter string. Thus, the
- * edit pane needed is in fact the "new filter string" edit pane.
- */
-
-public class SystemNewFilterWizardMainPage
- extends AbstractSystemWizardPage
- implements ISystemFilterStringEditPaneListener
- //,SystemFilterNewFilterWizardMainPageInterface, ISystemMessageLine
-{
- protected SystemFilterStringEditPane editPane;
- protected String type;
- protected String[] defaultFilterStrings;
- protected boolean firstVisit = true;
- private Control clientArea;
- /**
- * Constructor.
- * Uses the wizard page title as set in the overall wizard.
- * Uses a default wizard page description. Change later via setDescription if desired.
- * @param wizard - the parent new filter wizard
- * @param data - configurable mri data
- */
- public SystemNewFilterWizardMainPage(SystemNewFilterWizard wizard, ISystemNewFilterWizardConfigurator data)
-
- {
- super(wizard,"NewFilterPage1", data.getPage1Title(), data.getPage1Description()); //$NON-NLS-1$
- editPane = getEditPane(wizard.getShell());
- //setHelp(data.getPage1HelpID()); not used as it comes from wizard help
- }
- /**
- * Constructor when unique edit pane supplied
- * Uses the wizard page title as set in the overall wizard.
- * Uses a default wizard page description. Change later via setDescription if desired.
- * @param wizard - the parent new filter wizard
- * @param editPane - the edit pane that prompts the user for a single filter string
- * @param data - configurable mri data
- */
- public SystemNewFilterWizardMainPage(SystemNewFilterWizard wizard, SystemFilterStringEditPane editPane, ISystemNewFilterWizardConfigurator data)
-
- {
- super(wizard,"NewFilterPage1", data.getPage1Title(), data.getPage1Description()); //$NON-NLS-1$
- this.editPane = editPane;
- editPane.addChangeListener(this);
- //setHelp(data.getPage1HelpID()); not used as it comes from wizard help
- }
- /**
- * Set the contextual system filter pool reference manager provider. Ie, in the RSE this
- * is the currently selected subsystem if this wizard was launched from a subsystem.
- * <p>
- * Will be non-null if the current selection is a reference to a filter pool or filter,
- * or a reference manager provider.
- * <p>
- * This is not used by default but made available for subclasses.
- */
- public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
- {
- editPane.setSystemFilterPoolReferenceManagerProvider(provider);
- }
- /**
- * Overrride this if you want to supply your own edit pane for the filter string.
- */
- protected SystemFilterStringEditPane getEditPane(Shell shell)
- {
- if (editPane == null)
- editPane = new SystemFilterStringEditPane(shell);
- return editPane;
- }
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- */
- public Control createContents(Composite parent)
- {
- clientArea = editPane.createContents(parent);
- editPane.addChangeListener(this);
- return clientArea;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- SystemMessage errorMessage = editPane.verify();
- if (errorMessage != null)
- setErrorMessage(errorMessage);
- return (errorMessage == null);
- }
-
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return editPane.getInitialFocusControl();
- }
- // ------------------------------------
- // METHODS FOR EXTRACTING USER DATA ...
- // ------------------------------------
- /**
- * Return the user-specified filter strings
- */
- public Vector getFilterStrings()
- {
- Vector v = new Vector();
-
- String userAddedString = editPane.getFilterString();
- if ((userAddedString !=null) && (userAddedString.length()>0))
- {
- if (!v.contains(userAddedString))
- v.add(userAddedString);
- }
- else if (defaultFilterStrings != null)
- {
- for (int idx=0; idx<defaultFilterStrings.length; idx++)
- {
- v.add(defaultFilterStrings[idx]);
- }
- }
- return v;
- //return editPane.getFilterStrings();
- }
- /**
- * Get the type of filter as set by {@link #setType(String)}
- */
- public String getType()
- {
- return type;
- }
- // -----------------------------------------
- // METHODS FOR SETTING/CONFIGURING INPUT ...
- // -----------------------------------------
- /**
- * Set the type of filter we are creating. Results in a call to setType on the new filter.
- * Types are not used by the base filter framework but are a way for tools to create typed
- * filters and have unique actions per filter type.
- */
- public void setType(String type)
- {
- this.type = type;
- editPane.setType(type);
- }
-
- /**
- * Supply the default set of filter strings this filter is to have.
- */
- public void setDefaultFilterStrings(String[] defaultFilterStrings)
- {
- this.defaultFilterStrings = defaultFilterStrings;
- if (editPane != null)
- {
- for (int i = 0; i < defaultFilterStrings.length; i++)
- {
- editPane.setFilterString(defaultFilterStrings[i], i);
- }
- }
- }
-
- // ----------------------------------------------
- // EDIT PANE CHANGE LISTENER INTERFACE METHODS...
- // ----------------------------------------------
- /**
- * Callback method. The user has changed the filter string. It may or may not
- * be valid. If not, the given message is non-null. If it is, and you want it,
- * call getSystemFilterString() in the edit pane.
- */
- public void filterStringChanged(SystemMessage message)
- {
- if (message != null)
- setErrorMessage(message);
- else
- clearErrorMessage();
- setPageComplete(message == null);
- }
- /**
- * Callback method. We are about to do a verify,the side effect of which is to
- * change the current state of the dialog, which we don't want. This tells the
- * dialog to back up that state so it can be restored.
- */
- public void backupChangedState()
- {
- }
- /**
- * Callback method. After backup and change events this is called to restore state
- */
- public void restoreChangedState()
- {
- }
-
- // -------------------------------
- // INTERCEPT OF WIZARDPAGE METHODS
- // -------------------------------
- /**
- * This is called when a page is given focus or loses focus
- */
- public void setVisible(boolean visible)
- {
- super.setVisible(visible);
- if (visible)
- {
- // ok, we don't want to issue a msg in the user's face the first time they see this page, but
- // after that when we get focus we verify the contents.
- // It is the job of that verify method in the edit pane to fire an event back to us as the result
- // of that verify. This results in a call to our filterStringChanged method above.
- if (!firstVisit)
- editPane.verify();
- else
- setPageComplete(editPane.isComplete());
- firstVisit = false;
- //System.out.println("Edit pane size = " + clientArea.getSize());
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java
deleted file mode 100644
index 4a551373f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java
+++ /dev/null
@@ -1,481 +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.filters.dialogs;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolSelectionValidator;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapper;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-
-
-
-/**
- * Second page of the New Filter wizard that prompts for the name of the filter.
- */
-public class SystemNewFilterWizardNamePage
- extends AbstractSystemWizardPage
- implements SelectionListener
-{
-
- protected Text nameText;
- protected Button uniqueCB;
- protected Label poolVerbage;
- protected Label poolComboLabel;
- protected Combo poolWrapperCombo;
- protected Combo poolCombo;
- protected SystemMessage errorMessage;
- protected String inputFilterName;
- protected boolean contentsCreated;
- protected boolean userEditedName;
- protected boolean ignoreChanges;
- protected ISystemValidator nameValidator;
- protected ISystemValidator[] nameValidators;
- protected ISystemFilterPoolSelectionValidator filterPoolSelectionValidator;
- protected ISystemFilterPool[] poolsToSelectFrom = null;
- protected ISystemFilterPoolWrapper[] poolWrappers = null;
- protected ISystemFilterPoolWrapperInformation poolWrapperInformation;
- protected ISystemFilterPool parentPool = null;
- private ISystemNewFilterWizardConfigurator configurator;
-
- /**
- * Constructor.
- */
- public SystemNewFilterWizardNamePage(SystemNewFilterWizard wizard, ISystemFilterPool parentPool, ISystemNewFilterWizardConfigurator data)
- {
- super(wizard, "SetNewFilterName", data.getPage2Title(), data.getPage2Description()); //$NON-NLS-1$
- this.parentPool = parentPool;
- this.configurator = data;
- setHelp(data.getPage2HelpID());
- }
-
- // ---------------------------------
- // INPUT METHODS...
- // ---------------------------------
- /**
- * Set the filter name to default the entry field to
- */
- public void setFilterName(String filterName)
- {
- this.inputFilterName = filterName;
- if (nameText != null)
- nameText.setText(inputFilterName);
- }
- /**
- * Set the validator to use to verify the filter name is correct
- */
- public void setFilterNameValidator(ISystemValidator nameValidator)
- {
- this.nameValidator = nameValidator;
- }
- /**
- * Call if you want to allow the user to select the filter pool to create this filter in.
- */
- public void setAllowFilterPoolSelection(ISystemFilterPool[] poolsToSelectFrom,
- ISystemValidator[] nameValidators)
- {
- this.poolsToSelectFrom = poolsToSelectFrom;
- this.nameValidators = nameValidators;
- if ((poolsToSelectFrom != null) && (poolsToSelectFrom.length>0))
- {
- if (parentPool == null)
- parentPool = poolsToSelectFrom[0];
- }
- }
- /**
- * This is an alternative to {@link #setAllowFilterPoolSelection(ISystemFilterPool[], ISystemValidator[])}
- * <p>
- * If you want to prompt the user for the parent filter pool to create this filter in,
- * but want to not use the term "pool" say, you can use an array of euphamisms. That is,
- * you can pass an array of objects that map to filter pools, but have a different
- * display name that is shown in the dropdown.
- * <p>
- * Of course, if you want to do this, then you will likely want to offer a different
- * label and tooltip for the prompt, and different verbage above the prompt. The
- * object this method accepts as a parameter encapsulates all that information, and
- * there is a default class you can use for this.
- */
- public void setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolWrappersToSelectFrom,
- ISystemValidator[] nameValidators)
- {
- this.poolWrapperInformation = poolWrappersToSelectFrom;
- this.nameValidators = nameValidators;
- if (parentPool == null)
- parentPool = poolWrappersToSelectFrom.getPreSelectWrapper().getSystemFilterPool();
- }
- /**
- * Set the validator to call when the user selects a filter pool. Optional.
- */
- public void setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator)
- {
- filterPoolSelectionValidator = validator;
- //System.out.println("Inside setFilterPoolSelectionValidator. Non null? " + (validator != null));
- }
-
- // ---------------------------------
- // LIFECYCLE METHODS...
- // ---------------------------------
-
- /**
- * Populate the dialog area with our widgets. Return the composite they are in.
- */
- public Control createContents(Composite parent)
- {
-
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage2NameVerbage(), nbrColumns, false, 200);
- nameText = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, configurator.getPage2NamePromptLabel(), configurator.getPage2NamePromptTooltip());
-
- addSeparatorLine(composite_prompts, nbrColumns);
- addFillerLine(composite_prompts, nbrColumns);
-
- // allow the user to create this filter uniquely for this connection, which means putting it in a
- // special filter pool we will create, just for this connection. This option is not shown if we are
- // already told which filter pool to create the filter in, such as in Show Filter Pools mode, when
- // the user selects New Filter to create a filter in the selected pool. We assume in this case the
- // will go in whatever filter is selected.
- if ((poolsToSelectFrom!=null) || (poolWrapperInformation!=null))
- {
- uniqueCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, configurator.getPage2UniqueToConnectionLabel(), null);
- uniqueCB.setToolTipText(configurator.getPage2UniqueToConnectionToolTip());
- uniqueCB.addSelectionListener(this);
- }
-
- addFillerLine(composite_prompts, nbrColumns);
-
- if (poolsToSelectFrom != null)
- {
- poolVerbage = SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage2PoolVerbage(), nbrColumns, false, 200);
- poolVerbage.setToolTipText(configurator.getPage2PoolVerbageTip());
- poolCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(composite_prompts, null, configurator.getPage2PoolPromptLabel(), configurator.getPage2PoolPromptTooltip());
- poolComboLabel = SystemWidgetHelpers.getLastLabel();
- String[] poolNames = new String[poolsToSelectFrom.length];
- int filterPoolSelectionIndex = 0;
- for (int idx=0; idx<poolNames.length; idx++)
- {
- ISystemFilterPool pool = poolsToSelectFrom[idx];
- if (pool == parentPool)
- filterPoolSelectionIndex = idx;
- poolNames[idx] = pool.getSystemFilterPoolManager().getName()+"."+pool.getName(); //$NON-NLS-1$
- }
- if ((nameValidator == null) && (nameValidators!=null))
- nameValidator = nameValidators[filterPoolSelectionIndex];
- poolCombo.setItems(poolNames);
- poolCombo.select(filterPoolSelectionIndex);
- poolCombo.addSelectionListener(this);
- if ((uniqueCB!=null) && uniqueCB.getSelection())
- {
- poolVerbage.setEnabled(false);
- poolComboLabel.setEnabled(false);
- poolCombo.setEnabled(false);
- }
- }
- else if (poolWrapperInformation != null)
- {
- poolVerbage = SystemWidgetHelpers.createVerbiage(composite_prompts, poolWrapperInformation.getVerbageLabel(), nbrColumns, false, 200);
- //poolWrapperCombo = SystemWidgetHelpers.createLabeledCombo(composite_prompts, null, poolWrapperInformation.getResourceBundle(), poolWrapperInformation.getPromptRBKey()); // d47323
- poolWrapperCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(composite_prompts, null, poolWrapperInformation.getPromptLabel(), poolWrapperInformation.getPromptTooltip());
- poolComboLabel = SystemWidgetHelpers.getLastLabel();
- poolWrappers = poolWrapperInformation.getWrappers();
- String[] poolNames = new String[poolWrappers.length];
- int filterPoolSelectionIndex = 0;
- for (int idx=0; idx<poolNames.length; idx++)
- {
- if (poolWrapperInformation.getPreSelectWrapper() == poolWrappers[idx])
- filterPoolSelectionIndex = idx;
- poolNames[idx] = poolWrappers[idx].getDisplayName();
- }
- if ((nameValidator == null) && (nameValidators!=null))
- nameValidator = nameValidators[filterPoolSelectionIndex];
- poolWrapperCombo.setItems(poolNames);
- poolWrapperCombo.select(filterPoolSelectionIndex);
- poolWrapperCombo.addSelectionListener(this);
- if ((uniqueCB!=null) && uniqueCB.getSelection())
- {
- poolVerbage.setEnabled(false);
- poolComboLabel.setEnabled(false);
- poolWrapperCombo.setEnabled(false);
- }
- }
-
- // initialize inputs
- if (nameValidator != null)
- {
- int maxNameLength = nameValidator.getMaximumNameLength();
- if (maxNameLength >= 0)
- nameText.setTextLimit(maxNameLength);
- }
- if (inputFilterName != null)
- nameText.setText(inputFilterName);
-
- // add keystroke listeners...
- nameText.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (ignoreChanges)
- return;
- userEditedName = true;
- validateNameInput();
- }
- }
- );
-
- setPageComplete();
- contentsCreated = true;
- return composite_prompts;
- }
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return nameText;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- if (!contentsCreated)
- return true;
- return (verify() == null);
- }
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- boolean pageComplete = (errorMessage == null) && (nameText!=null);
- if (pageComplete)
- pageComplete = (nameText.getText().trim().length() > 0);
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this page
- */
- public void setPageComplete()
- {
- setPageComplete(isPageComplete());
- }
- /**
- * User has selected something
- */
- public void widgetSelected(SelectionEvent e)
- {
- Object src = e.getSource();
- if (src == poolCombo)
- {
- int selection = poolCombo.getSelectionIndex();
- if ((selection >= 0) && (nameValidators!=null))
- nameValidator = nameValidators[selection];
- }
- else if (src == poolWrapperCombo)
- {
- int selection = poolWrapperCombo.getSelectionIndex();
- if ((selection >= 0) && (nameValidators!=null))
- nameValidator = nameValidators[selection];
- }
- else if (src == uniqueCB)
- {
- boolean selected = uniqueCB.getSelection();
- if (poolVerbage != null)
- poolVerbage.setEnabled(!selected);
- if (poolCombo != null)
- poolCombo.setEnabled(!selected);
- if (poolWrapperCombo != null)
- poolWrapperCombo.setEnabled(!selected);
- if (poolComboLabel != null)
- poolComboLabel.setEnabled(!selected);
- }
- verify();
- setPageComplete();
- }
- /**
- * User has selected something and pressed Enter
- */
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
- // ---------------------------------
- // VERIFICATION METHODS...
- // ---------------------------------
- /**
- * Verify all contents
- */
- public SystemMessage verify()
- {
- errorMessage = null;
- Control controlInError = null;
-
- if ((errorMessage == null) && (filterPoolSelectionValidator != null))
- {
- errorMessage = filterPoolSelectionValidator.validate(getParentSystemFilterPool());
- if (poolCombo != null)
- controlInError = poolCombo;
- else if (poolWrapperCombo != null)
- controlInError = poolCombo;
- }
- if ((errorMessage == null) && (nameValidator != null))
- {
- errorMessage = nameValidator.validate(nameText.getText().trim());
- controlInError = nameText;
- }
-
- if (errorMessage != null)
- {
- if (controlInError != null)
- controlInError.setFocus();
- setErrorMessage(errorMessage);
- }
- else
- clearErrorMessage();
- return errorMessage;
- }
- /**
- * This hook method is called whenever the text changes in the filter name input field.
- */
- protected SystemMessage validateNameInput()
- {
- errorMessage= null;
- if (nameValidator != null)
- errorMessage = nameValidator.validate(nameText.getText().trim());
- if ((errorMessage == null) && (filterPoolSelectionValidator != null))
- errorMessage = filterPoolSelectionValidator.validate(getParentSystemFilterPool());
- setPageComplete();
- if (errorMessage != null)
- setErrorMessage(errorMessage);
- else
- clearErrorMessage();
- return errorMessage;
- }
-
-
- // ---------------------------------
- // METHODS FOR EXTRACTING USER DATA
- // ---------------------------------
- /**
- * Return name of filter
- * Call this after finish ends successfully.
- */
- public String getFilterName()
- {
- if (nameText != null)
- return nameText.getText().trim();
- else
- return inputFilterName;
- }
- /**
- * Return the filter pool that was explicitly chosen by the user,
- * or implicitly set by the caller.
- */
- public ISystemFilterPool getParentSystemFilterPool()
- {
- ISystemFilterPool pool = null;
- // do we prompt with a list of filter pools? Yes, just return selected...
- if (poolCombo != null)
- {
- int selection = poolCombo.getSelectionIndex();
- if (selection < 0)
- selection = 0;
- pool = poolsToSelectFrom[selection];
- }
- // do we prompt using a wrapper of some kind, such a profile or a command set,
- // from which we deduce the pool? If so, deduce pool from selected wrapper....
- else if (poolWrapperCombo != null)
- {
- int selection = poolWrapperCombo.getSelectionIndex();
- if (selection < 0)
- selection = 0;
- pool = poolWrappers[selection].getSystemFilterPool();
- }
- // else no prompt so we must have been given the explicit filter pool in which
- // to create this filter. Eg, in Show Filter Pools mode and the user selects a
- // filter pool and choose New Filter from it.
- else
- pool = parentPool;
- //System.out.println("Inside getParentSystemFilterPool. returning " + pool.getName());
- return pool;
- }
-
- /**
- * Return the user's decision whether to create this filter uniquely
- * for this connection, or for all applicable connections.
- */
- public boolean getUniqueToThisConnection()
- {
- if (uniqueCB != null)
- return uniqueCB.getSelection();
- else
- return false;
- }
-
- // -------------------------------
- // INTERCEPT OF WIZARDPAGE METHODS
- // -------------------------------
- /**
- * This is called when a page is given focus or loses focus
- */
- public void setVisible(boolean visible)
- {
- super.setVisible(visible);
- if (visible)
- {
- if (!userEditedName && (nameText!=null))
- {
- String defaultName = ((SystemNewFilterWizard)getWizard()).getDefaultFilterName();
- if (defaultName != null)
- {
- ignoreChanges = true;
- nameText.setText(defaultName);
- ignoreChanges = false;
- }
- }
- verify();
- //System.out.println("Wizard size = " + ((SystemNewFilterWizard)getWizard()).getShell().getSize());
- }
- }
-
- // --------------------------------------------------------------
- // ALL THE MRI ON THIS PAGE IS CONFIGURABLE. CALL HERE TO SET IT.
- // --------------------------------------------------------------
-
-} \ No newline at end of file
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
deleted file mode 100644
index 05e7ff187..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemUnNamedFilterDialog.java
+++ /dev/null
@@ -1,214 +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.filters.dialogs;
-
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.filters.ISystemFilterStringEditPaneListener;
-import org.eclipse.rse.ui.filters.SystemFilterStringEditPane;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * A dialog that prompts the user for a single filter string, but not for the
- * purpose of creating a named filter. The output is that single filter string,
- * and the caller can do what they want with it.
- */
-
-public class SystemUnNamedFilterDialog extends SystemPromptDialog
- implements
- ISystemFilterStringEditPaneListener
-{
-
- protected SystemFilterStringEditPane editpane;
- protected String outputFilterString;
- // inputs
- protected ISystemFilterPoolReferenceManagerProvider provider;
- /**
- * Constructor
- */
- public SystemUnNamedFilterDialog(Shell shell)
- {
- this(shell, SystemResources.RESID_CRTFILTER_TITLE);
- }
- /**
- * Constructor, when unique title desired
- */
- public SystemUnNamedFilterDialog(Shell shell, String title)
- {
- super(shell, title);
- //this.parentPool = parentPool;
- //setMinimumSize(450, 350); // x, y
- //pack();
- setOutputObject(null);
- setHelp();
- }
-
- /**
- * Overridable extension point for setting dialog help. By default, there is no help
- */
- protected void setHelp()
- {
- }
- // -------------------
- // INPUT/CONFIGURATION
- // -------------------
- /**
- * Set the contextual system filter pool reference manager provider. Eg, in the RSE, this
- * will be the selected subsystem if the New Filter action is launched from there, or if
- * launched from a filter pool reference under there.
- * <p>
- * Will be non-null if the current selection is a reference to a filter pool or filter,
- * or a reference manager provider.
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
- {
- this.provider = provider;
- //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.
- */
- public void setFilterStringEditPane(SystemFilterStringEditPane editPane)
- {
- this.editpane = editPane;
- }
-
- // -------------------
- // OUTPUT
- // -------------------
- /**
- * Return the string the user configured in this dialog.
- * Will return null if the user cancelled the dialog, so test with wasCancelled().
- */
- public String getFilterString()
- {
- return outputFilterString;
- }
-
-
- // LIFECYCLE
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return editpane.getInitialFocusControl();
- }
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- editpane = getFilterStringEditPane(getShell());
- editpane.setSystemFilterPoolReferenceManagerProvider(provider);
-
- // Edit pane is our whole content area
- Control composite = editpane.createContents(parent);
-
- // add listeners
- editpane.addChangeListener(this);
-
- return composite;
- }
- /**
- * Return our edit pane. Overriding this is an alternative to calling setEditPane.
- * This is called in createContents
- */
- protected SystemFilterStringEditPane getFilterStringEditPane(Shell shell)
- {
- if (editpane == null)
- editpane = new SystemFilterStringEditPane(shell);
- return editpane;
- }
-
- /**
- * Parent override.
- * Called when user presses OK button.
- * This is when we save all the changes the user made.
- */
- protected boolean processOK()
- {
- SystemMessage errorMessage = editpane.verify(); // should fire events back to us if there is an error
- if (errorMessage != null)
- return false;
- outputFilterString = editpane.getFilterString();
- return super.processOK();
- }
-
- /**
- * Parent override.
- * Called when user presses CLOSE button. We simply blow away all their changes!
- */
- protected boolean processCancel()
- {
- return super.processCancel();
- }
-
- /**
- * Override of parent method so we can direct it to the Apply button versus the OK button
- */
- public void setPageComplete(boolean complete)
- {
- }
-
- // ---------------
- // HELPER METHODS
- // ---------------
-
-
-
- // ----------------------------------------------
- // EDIT PANE CHANGE LISTENER INTERFACE METHODS...
- // ----------------------------------------------
- /**
- * Callback method. The user has changed the filter string. It may or may not
- * be valid. If not, the given message is non-null. If it is, and you want it,
- * call getSystemFilterString() in the edit pane.
- */
- public void filterStringChanged(SystemMessage message)
- {
- if (message != null)
- setErrorMessage(message);
- else
- clearErrorMessage();
- setPageComplete(message == null);
- }
- /**
- * Callback method. We are about to do a verify,the side effect of which is to
- * change the current state of the dialog, which we don't want. This tells the
- * dialog to back up that state so it can be restored.
- */
- public void backupChangedState()
- {
- }
- /**
- * Callback method. After backup and change events this is called to restore state
- */
- public void restoreChangedState()
- {
- }
-} \ No newline at end of file
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
deleted file mode 100644
index e137d8e77..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSESystemTypeAdapterFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.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
deleted file mode 100644
index 841203673..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSEUIRegistry.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.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/ISystemMessageLine.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/ISystemMessageLine.java
deleted file mode 100644
index 67906a929..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/ISystemMessageLine.java
+++ /dev/null
@@ -1,94 +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.messages;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * A message line interface. It distinguishs between "normal" messages and errors, as does the
- * DialogPage classes in eclipse.
- * <p>
- * For each of those, however, we also support both simple string msgs and more robust SystemMessage
- * messages. A dialog, wizard page or property page class that implements this interface will support
- * these by using getLevelOneText() to get the string for the first level text, and support mouse
- * clicking on the message to display the SystemMessageDialog class to show the 2nd level text.
- * <p>
- * Setting an error message hides a currently displayed message until
- * <code>clearErrorMessage</code> is called.
- */
-public interface ISystemMessageLine {
-
- /**
- * Clears the currently displayed error message and redisplayes
- * the non-error message which was active before the error message was set (if any).
- */
- public void clearErrorMessage();
-
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage();
-
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage();
-
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage();
-
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage();
-
- /**
- * Display the given error message. A currently displayed (non-error) message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message);
-
- /**
- * Display the given error message. A currently displayed (non-error) message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message);
-
- /**
- * Display the given exception as an error message. This is a convenience
- * method... a generic SystemMessage is used for exceptions.
- */
- public void setErrorMessage(Throwable exc);
-
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage.
- */
- public void setMessage(String message);
-
- /**
- * If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/ISystemMessageLineTarget.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/ISystemMessageLineTarget.java
deleted file mode 100644
index 5dfa23966..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/ISystemMessageLineTarget.java
+++ /dev/null
@@ -1,33 +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.messages;
-/**
- * Implemented by any class that supports being passed an ISystemMessageLine to
- * target messages to. This is useful in re-usable forms so that the parent dialog
- * or wizard can pass in "this" in order to allow the form to issue messages.
- */
-public interface ISystemMessageLineTarget
-{
- /**
- * Set the message line to use for issuing messages
- */
- public void setMessageLine(ISystemMessageLine msgLine);
- /**
- * Get the message line to use for issuing messages
- */
- public ISystemMessageLine getMessageLine();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/StatusLineManagerAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/StatusLineManagerAdapter.java
deleted file mode 100644
index 4fadeb73b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/StatusLineManagerAdapter.java
+++ /dev/null
@@ -1,123 +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.messages;
-
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-
-/**
- * This class adapts the eclipse IStatusLineManager to an ISystemMessageLine.
- *
- * @author yantzi
- */
-public class StatusLineManagerAdapter implements ISystemMessageLine {
-
- private IStatusLineManager statusLine;
- private String message, errorMessage;
- private SystemMessage sysErrorMessage;
-
- /**
- * Constructor
- *
- * @param statusLineManager the status line manager to adapt to an ISystemMessageLine
- */
- public StatusLineManagerAdapter(IStatusLineManager statusLineManager)
- {
- this.statusLine = statusLineManager;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#clearErrorMessage()
- */
- public void clearErrorMessage() {
- errorMessage = null;
- sysErrorMessage = null;
- if (statusLine != null)
- statusLine.setErrorMessage(errorMessage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#clearMessage()
- */
- public void clearMessage() {
- message = null;
- if (statusLine != null)
- statusLine.setMessage(message);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#getErrorMessage()
- */
- public String getErrorMessage() {
- return errorMessage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#getSystemErrorMessage()
- */
- public SystemMessage getSystemErrorMessage() {
- return sysErrorMessage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#getMessage()
- */
- public String getMessage() {
- return message;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#setErrorMessage(java.lang.String)
- */
- public void setErrorMessage(String message) {
- this.errorMessage = message;
- if (statusLine != null)
- statusLine.setErrorMessage(message);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#setErrorMessage(org.eclipse.rse.core.ui.messages.SystemMessage)
- */
- public void setErrorMessage(SystemMessage message) {
- sysErrorMessage = message;
- setErrorMessage(message.getLevelOneText());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#setErrorMessage(java.lang.Throwable)
- */
- public void setErrorMessage(Throwable exc) {
- setErrorMessage(exc.getMessage());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#setMessage(java.lang.String)
- */
- public void setMessage(String message) {
- this.message = message;
- if (statusLine != null)
- statusLine.setMessage(message);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.messages.ISystemMessageLine#setMessage(org.eclipse.rse.core.ui.messages.SystemMessage)
- */
- public void setMessage(SystemMessage message) {
- setMessage(message.getLevelOneText());
- }
-} \ 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
deleted file mode 100644
index a1a3e0e3e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemDialogPageMessageLine.java
+++ /dev/null
@@ -1,391 +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.messages;
-
-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.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;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-
-/**
- * @deprecated
- * <p>DO NOT USE THIS CLASS!
- * <p>This class attempts to wrap the message constructs of eclipse provided property
- * and wizard pages with an ISystemMessageLine interface.
- * It fails to do this properly and is extremely fragile since it depends on knowledge
- * of the internal structure of eclipse provided windows.
- * <p>Use SystemMessageLine instead.
- * @link org.eclipse.rse.core.ui.messages.SystemMessageLine
- *
- */
-public class SystemDialogPageMessageLine implements ISystemMessageLine, MouseListener {
- // cached inputs
- private Label msgTextLabel;
- private Label msgIconLabel;
- private CLabel msgIconCLabel;
- private DialogPage dlgPage;
- // state
- private SystemMessage sysErrorMessage;
- private SystemMessage sysMessage;
- private boolean stringErrorMessageShowing = false;
-
- /**
- * Factory method for wizard pages.
- * We only need to configure a single message line for all pages in a given wizard,
- * so this method looks after ensuring there is only one such message line created.
- * @param wizardPage - the wizard page we are configuring
- */
- public static SystemDialogPageMessageLine createWizardMsgLine(WizardPage wizardPage) {
- SystemDialogPageMessageLine msgLine = null;
- Composite pageContainer = wizardPage.getControl().getParent();
- Object pageContainerData = null;
- //Object pageContainerData = pageContainer.getData();
- //System.out.println("pageContainerData = " + pageContainerData);
- if (pageContainerData == null) {
- // wizardPage.getControl() => returns the composite we created in createControl
- // .getParent() => returns the page container composite created in createPageContainer in WizardDialog, that holds all pages
- // .getParent() => returns the composite created in createDialogArea in TitleAreaDialog. The "dialog area" of the dialog below the top stuff, and above the button bar.
- // .getParent() => returns the workarea composite created in createContents in TitleAreaDialog
- // .getParent() => returns the parent composite passed to createContents in TitleAreaDialog
- // .getChildren() => returns the children of this composite, which includes the stuff at the top, which is placed
- // there by createTitleArea() in TitleAreaDialog, the parent of WizardDialog
- // [0]=> dialog image Label
- // [1]=> title Label
- // [2]=> message image Label
- // [3]=> message Label
- // [4]=> filler Label
- Composite dialogAreaComposite = pageContainer.getParent(); // see createDialogArea in WizardDialog
- Composite workAreaComposite = dialogAreaComposite.getParent(); // see createContents in TitleAreaDialog
- Composite mainComposite = workAreaComposite.getParent(); // whatever is passed into createContents in TitleAreaDialog
- Control[] list = mainComposite.getChildren();
- Label msgImageLabel = null;
- Label msgLabel = null;
- if (list[2] instanceof Label) {
- msgImageLabel = (Label) list[2];
- }
- if (list[3] instanceof Label) {
- msgLabel = (Label) list[3];
- } else if (list[4] instanceof Label) {
- msgLabel = (Label) list[4];
- }
- msgLine = new SystemDialogPageMessageLine(wizardPage, msgImageLabel, msgLabel);
- pageContainer.setData(msgLine);
- } else
- msgLine = (SystemDialogPageMessageLine) pageContainerData;
- return msgLine;
- }
-
- /**
- * Factory method for property pages.
- * We only need to configure a single message line for all pages in a properties dialog,
- * so this method looks after ensuring there is only one such message line created.
- * @param propertyPage - the property page we are configuring
- */
- public static SystemDialogPageMessageLine createPropertyPageMsgLine(PropertyPage propertyPage) {
- SystemDialogPageMessageLine msgLine = null;
- Composite pageContainer = propertyPage.getControl().getParent();
- // propertyPage.getControl() => returns the composite we created in createControl
- // .getParent() => returns the page container composite created in createPageContainer in PreferencesDialog, that holds all pages
- // .getParent() => returns the composite created in createDialogArea in PreferencesDialog. This holds the tree, title area composite, page container composite and separator
- // .getChildren()[1] => returns the title area parent composite, created in createDialogArea in PreferencesDialog
- // .getChildren()[0] => returns the title area composite, created in createTitleArea in PreferencesDialog
- // .getChildren() => returns the children of the title area composite
- // [0]=> message CLabel
- // [1]=> title image
- Composite dialogAreaComposite = pageContainer.getParent(); // see createDialogArea in PreferencesDialog
- Composite titleAreaParentComposite = (Composite) dialogAreaComposite.getChildren()[1];
- Composite titleAreaComposite = (Composite) titleAreaParentComposite.getChildren()[0];
- //Control[] list=titleAreaComposite.getChildren();
- // DKM - trying to figure out this mess for 3.0
- Composite listContainer = (Composite) titleAreaComposite.getChildren()[0];
- Control[] list = listContainer.getChildren();
- Label label1 = null;
- Label label2 = null;
- if (list.length > 0) {
- label1 = (Label) list[0];
- label2 = (Label) list[1];
- }
- msgLine = new SystemDialogPageMessageLine(propertyPage, /*(CLabel)list[0]*/label1, label2);
- pageContainer.setData(msgLine);
- return msgLine;
- }
-
- /**
- * Private constructor.
- */
- private SystemDialogPageMessageLine(DialogPage dialogPage, Label msgIconLabel, Label msgTextLabel) {
- this.msgIconLabel = msgIconLabel;
- this.msgTextLabel = msgTextLabel;
- this.dlgPage = dialogPage;
- msgIconLabel.addMouseListener(this);
- msgTextLabel.addMouseListener(this);
- }
-
- protected SystemMessage getSysErrorMessage() {
- return sysErrorMessage;
- }
-
- protected SystemMessage getSysMessage() {
- return sysMessage;
- }
-
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage() {
- return sysErrorMessage;
- }
-
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage() {
- sysErrorMessage = null;
- stringErrorMessageShowing = false;
- dlgPage.setErrorMessage(null);
- setIconToolTipText();
- }
-
- /**
- * Clears the currently displayed non-error message.
- */
- public void clearMessage() {
- dlgPage.setMessage(null);
- sysMessage = null;
- setIconToolTipText();
- }
-
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage() {
- return dlgPage.getErrorMessage();
- }
-
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage() {
- return dlgPage.getMessage();
- }
-
- /**
- * DO NOT CALL THIS METHOD! IT IS ONLY HERE BECAUSE THE INTERFACE NEEDS IT.
- * RATHER, CALL THE SAME MSG THAT DIALOGPAGE NOW SUPPORTS, AND THEN CALL
- * setInternalErrorMessage HERE. WE HAVE TO AVOID INFINITE LOOPS.
- */
- public void setErrorMessage(String emessage) {
- internalSetErrorMessage(emessage);
- //dlgPage.setErrorMessage(emessage);
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage emessage) {
- // I removed @deprecated... I think it was a mistake! What would be the replacement? Phil
- if (emessage == null)
- clearErrorMessage();
- else {
- dlgPage.setErrorMessage(getMessageText(emessage));
- stringErrorMessageShowing = false;
- sysErrorMessage = emessage;
- logMessage(emessage);
- }
- setIconToolTipText();
- }
-
- /**
- * Convenience method to set an error message from an exception
- */
- public void setErrorMessage(Throwable exc) {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
- msg.makeSubstitution(exc);
- setErrorMessage(msg);
- }
-
- /**
- * DO NOT CALL THIS METHOD! IT IS ONLY HERE BECAUSE THE INTERFACE NEEDS IT.
- * RATHER, CALL THE SAME MSG THAT DIALOGPAGE NOW SUPPORTS, AND THEN CALL
- * setInternalMessage HERE. WE HAVE TO AVOID INFINITE LOOPS.
- */
- public void setMessage(String msg) {
- internalSetMessage(msg);
- dlgPage.setMessage(msg);
- }
-
- /**
- * Set a non-error message to display.
- * If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage smessage) {
- if (smessage == null) {
- clearMessage(); // phil
- return;
- }
- sysMessage = smessage;
- int msgType = IMessageProvider.NONE;
- if ((smessage.getIndicator() == SystemMessage.ERROR) || (smessage.getIndicator() == SystemMessage.UNEXPECTED))
- msgType = IMessageProvider.ERROR;
- else if (smessage.getIndicator() == SystemMessage.WARNING)
- msgType = IMessageProvider.WARNING;
- else if (smessage.getIndicator() == SystemMessage.INFORMATION || (smessage.getIndicator() == SystemMessage.COMPLETION)) msgType = IMessageProvider.INFORMATION;
- dlgPage.setMessage(getMessageText(smessage), msgType);
- logMessage(smessage);
- setIconToolTipText();
- }
-
- /**
- * logs the message in the appropriate log
- */
- private void logMessage(SystemMessage message) {
- Object[] subList = message.getSubVariables();
- for (int i = 0; subList != null && i < subList.length; i++) {
- String msg = message.getFullMessageID() + ": SUB#" + new Integer(i).toString() + ":" + message.getSubValue(subList[i]); //$NON-NLS-1$ //$NON-NLS-2$
- if (message.getIndicator() == SystemMessage.INFORMATION || message.getIndicator() == SystemMessage.INQUIRY || message.getIndicator() == SystemMessage.COMPLETION)
- SystemBasePlugin.logInfo(msg);
- else if (message.getIndicator() == SystemMessage.WARNING)
- SystemBasePlugin.logWarning(msg);
- else if (message.getIndicator() == SystemMessage.ERROR)
- SystemBasePlugin.logError(msg, null);
- else if (message.getIndicator() == SystemMessage.UNEXPECTED) {
- if (i == subList.length - 1)
- SystemBasePlugin.logError(msg, new Exception());
- else
- SystemBasePlugin.logError(msg, null);
- }
- }
- if (subList == null) {
- String msg = message.getFullMessageID();
- if (message.getIndicator() == SystemMessage.INFORMATION || message.getIndicator() == SystemMessage.INQUIRY || message.getIndicator() == SystemMessage.COMPLETION)
- SystemBasePlugin.logInfo(msg);
- else if (message.getIndicator() == SystemMessage.WARNING)
- SystemBasePlugin.logWarning(msg);
- else if (message.getIndicator() == SystemMessage.ERROR)
- SystemBasePlugin.logError(msg, null);
- else if (message.getIndicator() == SystemMessage.UNEXPECTED) SystemBasePlugin.logError(msg, new Exception());
- }
- }
-
- // METHODS THAT NEED TO BE CALLED BY DIALOGPAGE IN THEIR OVERRIDE OF SETMESSAGE OR SETERRORMESSAGE
- /**
- * Someone has called setMessage(String) on the dialog page. It needs to then call this method
- * after calling super.setMessage(String) so we can keep track of what is happening.
- */
- public void internalSetMessage(String msg) {
- sysMessage = null; // overrides it if it was set
- setIconToolTipText();
- }
-
- /**
- * Someone has called setErrorMessage(String) on the dialog page. It needs to then call this method
- * after calling super.setErrorMessage(String) so we can keep track of what is happening.
- */
- public void internalSetErrorMessage(String msg) {
- sysErrorMessage = null; // overrides if it was set
- stringErrorMessageShowing = (msg != null);
- setIconToolTipText();
- }
-
- // MOUSeListener INTERFACE METHODS...
- /**
- * User double clicked with the mouse
- */
- public void mouseDoubleClick(MouseEvent event) {
- }
-
- /**
- * User pressed the mouse button
- */
- public void mouseDown(MouseEvent event) {
- }
-
- /**
- * User released the mouse button after pressing it
- */
- public void mouseUp(MouseEvent event) {
- displayMessageDialog();
- }
-
- /**
- * Method to return the current system message to display. If error message is set, return it,
- * else return message.
- */
- public SystemMessage getCurrentMessage() {
- if (sysErrorMessage != null)
- return sysErrorMessage;
- else if (!stringErrorMessageShowing)
- return sysMessage;
- else
- return null;
- }
-
- /**
- * Method to display an error message when the msg button is clicked
- */
- private void displayMessageDialog() {
- SystemMessage currentMessage = getCurrentMessage();
- if (currentMessage != null) {
- SystemMessageDialog msgDlg = new SystemMessageDialog(dlgPage.getShell(), currentMessage);
- msgDlg.openWithDetails();
- }
- }
-
- /**
- * Method to set the tooltip text on the msg icon to tell the user they can press it for more details
- */
- private void setIconToolTipText() {
- SystemMessage msg = getCurrentMessage();
- String tip = ""; //$NON-NLS-1$
- if (msg != null) {
- //String levelTwo = msg.getLevelTwoText();
- //if ((levelTwo!=null) && (levelTwo.length()>0))
- tip = msg.getFullMessageID() + " " + SystemResources.RESID_MSGLINE_TIP; //$NON-NLS-1$
- }
- if (msgIconLabel != null) msgIconLabel.setToolTipText(tip);
- if (msgTextLabel != null)
- msgTextLabel.setToolTipText(tip);
- else
- msgIconCLabel.setToolTipText(tip);
- }
-
- /**
- * Return the message text to display in the title area, given a system message
- */
- private String getMessageText(SystemMessage msg) {
- //return msg.getFullMessageID()+" " + msg.getLevelOneText();
- return msg.getLevelOneText();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index e093f63fc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java
+++ /dev/null
@@ -1,797 +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.messages;
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IStatus;
-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.rse.core.SystemBasePlugin;
-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;
-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.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;
-
-
-
-/**
- */
-public class SystemMessageDialog extends ErrorDialog implements Listener {
-
- /**
- * Reserve room for this many list items.
- */
- private static final int LIST_ITEM_COUNT = 5;
-
- /**
- * The Details button.
- */
- private Button detailsButton=null;
-
- /**
- * The message to display.
- */
- private SystemMessage message;
-
- /**
- * Exception being reported and logged
- */
- private Throwable exc;
-
-
- /**
- * The SWT list control that displays the error details.
- */
- private Text list;
-
-
- /**
- * Indicates whether the error details viewer is currently created.
- */
- private boolean listCreated = false;
-
-
- /**
- * Filter mask for determining which status items to display.
- */
- private int displayMask = 0xFFFF;
-
-
- /**
- * The main status object.
- */
- private IStatus status;
-
-
- /**
- * List of the main error object's detailed errors
- * (element type: <code>IStatus</code>).
- */
- private java.util.List statusList;
-
- /**
- * the image to use when displaying the message
- */
- // private String imageName;
- private int imageId;
-
- /**
- * show the details panel
- */
- private boolean showDetails=false;
-
- /**
- * buttons for button area
- */
- private String []buttons=null;
-
- /**
- * default button
- */
- private int defaultIndex=0;
-
- /**
- * button id number for the first button in the button bar.<p>
- * The second button, would have an id of buttonId+1 etc.
- */
- public static final int BUTTON_ID=1000;
-
- /**
- * button pressed to dismiss the dialog
- */
- private int buttonIdPressed;
-
- /**
- * whether or not to open the dialog with the yes/no buttons
- */
- private boolean yesNoButtons=false;
-
- /**
- * whether or not to open the dialog with the yes/no/cancel buttons
- */
- 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.
- * Note that the dialog will have no visual representation (no widgets)
- * until it is told to open.
- * @param parentShell the shell under which to create this dialog
- * @param message the message to display in the dialog
- */
- public SystemMessageDialog(Shell parentShell, SystemMessage message)
- {
- this(parentShell,
- message.getFullMessageID(),
- message.getLevelOneText(),
- (new MultiStatus(SystemBasePlugin.getBaseDefault().getSymbolicName(), IStatus.OK, "", new Exception(""))), //$NON-NLS-1$ //$NON-NLS-2$
- 0xFFFFF);
- ((MultiStatus)this.status).add(new Status(IStatus.INFO, SystemBasePlugin.getBaseDefault().getSymbolicName(), IStatus.OK, message.getLevelTwoText(), new Exception(""))); //$NON-NLS-1$
- statusList = Arrays.asList(status.getChildren());
- this.message=message;
- initImage(message);
- }
-
- private SystemMessageDialog(Shell parentShell, String dialogTitle, String message,
- IStatus status, int displayMask)
- {
- super(parentShell, dialogTitle, message, status, displayMask);
- this.status = status;
- statusList = Arrays.asList(status.getChildren());
- this.displayMask = displayMask;
- setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
- }
-
- private void initImage(SystemMessage message)
- {
- // setup image
- if (message.getIndicator()==SystemMessage.INFORMATION ||
- message.getIndicator()==SystemMessage.COMPLETION)
- //imageName=DLG_IMG_INFO;
- imageId = SWT.ICON_INFORMATION;
- else if (message.getIndicator()==SystemMessage.INQUIRY)
- //imageName=DLG_IMG_QUESTION;
- imageId = SWT.ICON_QUESTION;
- else if (message.getIndicator()==SystemMessage.ERROR ||
- message.getIndicator()==SystemMessage.UNEXPECTED)
- //imageName=DLG_IMG_ERROR;
- imageId = SWT.ICON_ERROR;
- else if (message.getIndicator()==SystemMessage.WARNING)
- //imageName=DLG_IMG_WARNING;
- imageId = SWT.ICON_WARNING;
- }
-
-
- /* Handles the pressing of the Ok, Details or any button in this dialog.
- * If the Ok button was pressed then close this dialog. If the Details
- * button was pressed then toggle the displaying of the error details area.
- */
- protected void buttonPressed(int id)
- {
- if (id == IDialogConstants.DETAILS_ID) // was the details button pressed?
- toggleDetailsArea();
- else
- {
- super.buttonPressed(id);
- close();
- }
- buttonIdPressed=id;
- }
-
- /*
- * Creates the buttons for the button bar.
- * If the message is an inquiry
- * message or yes/no buttons are explicitly requested then Yes, No, and
- * perhaps Cancel are the preferred buttons.
- * Otherwise, if there are buttons supplied by the client use those.
- * Otherwise if no buttons are supplied, just supply an OK button.
- * A Details button is suppled if the message indicates that it has any
- * significant details. In particular, test to see that the details length is
- * greater than 2. This disqualifies using %2 and getting details for some
- * reason.
- * d58252 - re-ordered tests to make logic easier to read. Set initial focus
- * on the default button since it would normally be on the message which is
- * now read-only text.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- if ( yesNoButtons || yesNoCancelButtons || (message.getIndicator()==SystemMessage.INQUIRY) ) {
- boolean yesDefault=(defaultIndex==0);
- boolean noDefault=(defaultIndex==1);
- boolean cancelDefault=(defaultIndex==2);
- createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, yesDefault);
- createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, noDefault);
- if (yesNoCancelButtons) {
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, cancelDefault);
- }
- if (yesDefault) {
- getButton(IDialogConstants.YES_ID).setFocus();
- } else if (noDefault) {
- getButton(IDialogConstants.NO_ID).setFocus();
- } else if (cancelDefault) {
- getButton(IDialogConstants.CANCEL_ID).setFocus();
- }
- } else if (buttons!=null) {
- for (int i=0; i<buttons.length; i++) {
- boolean defaultButton=(i==defaultIndex);
- createButton(parent, BUTTON_ID+i, buttons[i], defaultButton);
- if (defaultButton) {
- getButton(BUTTON_ID+i).setFocus();
- }
- }
- } else {
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- getButton(IDialogConstants.OK_ID).setFocus();
- }
- if (status.isMultiStatus() && message != null && message.getLevelTwoText() != null && message.getLevelTwoText().length() > 2) {
- detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);
- if (showDetails) {
- toggleDetailsArea2(parent);
- }
- }
- }
-
- /*
- * Creates and returns the contents of the upper part
- * of the dialog (above the button bar).
- * d58252 - fixed dialog layout to allow resize of message area for long message,
- * made message area a read-only text for accessibility reasons.
- */
- protected Control createDialogArea(Composite parent) {
- // create composite
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
- ((GridLayout)composite.getLayout()).numColumns = 2;
-
- // create image
- Image image = getShell().getDisplay().getSystemImage(imageId);
- if (image != null) {
- Label label = new Label(composite, 0);
- image.setBackground(label.getBackground());
- label.setImage(image);
- label.setLayoutData(new GridData(
- GridData.HORIZONTAL_ALIGN_CENTER |
- GridData.VERTICAL_ALIGN_BEGINNING));
- }
-
- // create message, this is a read-only text field so it is tab enabled by
- // default for accessibility reasons
- if (message != null) {
- Text messageArea = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- messageArea.setText(message.getLevelOneText());
- GridData data = new GridData(SWT.FILL, SWT.CENTER, true, true);
- 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;
- }
- /**
- * Create this dialog's drop-down list component.
- *
- * @param parent the parent composite
- * @return the drop-down list component
- */
- protected Text createDropDownList2(Composite parent)
- {
- // create the list
- list = new Text(parent, SWT.READ_ONLY | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL );
-
- GridData data = new GridData(
- GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL |
- GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL);
- data.heightHint = list.getLineHeight() * LIST_ITEM_COUNT;
- data.widthHint= getDialogArea().getSize().x;
- list.setLayoutData(data);
- listCreated = true;
- // fill the list
- populateList(list);
-
- return list;
- }
-
- /**
- * When the message involves an exception for which we want to log the stack,
- * set that exception here.
- */
- public void setException(Throwable exc)
- {
- this.exc = exc;
- }
-
- /**
- * logs the message in the appropriate log
- */
- private void LogMessage()
- {
- Object[] subList=message.getSubVariables();
- for (int i=0; subList!=null && i<subList.length; i++)
- {
- String msg=message.getFullMessageID()+": SUB#"+new Integer(i).toString()+":"+message.getSubValue(subList[i]); //$NON-NLS-1$ //$NON-NLS-2$
- if (message.getIndicator()==SystemMessage.INFORMATION ||
- message.getIndicator()==SystemMessage.COMPLETION ||
- message.getIndicator()==SystemMessage.INQUIRY)
- {
- SystemBasePlugin.logInfo(msg);
- if (i==subList.length-1 && message.getIndicator()==SystemMessage.INQUIRY)
- SystemBasePlugin.logInfo(message.getFullMessageID()+" :Button ID Pressed:"+buttonIdPressed); //$NON-NLS-1$
- }
- else if (message.getIndicator()==SystemMessage.WARNING)
- SystemBasePlugin.logWarning(msg);
- else if (message.getIndicator()==SystemMessage.ERROR)
- SystemBasePlugin.logError(msg, null);
- else if (message.getIndicator()==SystemMessage.UNEXPECTED)
- {
- if (i==subList.length-1)
- SystemBasePlugin.logError(msg, (exc!=null) ? exc : new Exception());
- else
- SystemBasePlugin.logError(msg, null);
- }
- }
- if (subList==null)
- {
- String msg=message.getFullMessageID();
- if (message.getIndicator()==SystemMessage.INFORMATION ||
- message.getIndicator()==SystemMessage.COMPLETION ||
- message.getIndicator()==SystemMessage.INQUIRY)
- SystemBasePlugin.logInfo(msg);
- else if (message.getIndicator()==SystemMessage.WARNING)
- SystemBasePlugin.logWarning(msg);
- else if (message.getIndicator()==SystemMessage.ERROR)
- SystemBasePlugin.logError(msg, null);
- else if (message.getIndicator()==SystemMessage.UNEXPECTED)
- SystemBasePlugin.logError(msg, (exc!=null) ? exc : new Exception());
- }
- }
-
- /**
- * Opens the message dialog to display the message.
- */
- public int open()
- {
- if (!showDetails)
- LogMessage();
- return super.open();
- }
-
- /**
- * Opens the message dialog with the details showing to display the message.
- */
- public int openWithDetails()
- {
- showDetails=true;
- return open();
- }
-
- /**
- * Opens the message dialog with the details showing to display an exception, if that is
- * the root cause of the message.
- * <p>
- * Also logs the first level text plus exception.
- */
- public int openWithDetails(Exception exc)
- {
- showDetails=true;
- SystemBasePlugin.logError(message.getLevelOneText(), exc);
- return open();
- }
-
- /**
- * opens the dialog with Yes, No, Details button for an Inquiry/Question message
- * Throws an IndicatorException if the message is not an Inquiry message
- * returns true if Yes was pressed, False if No was pressed.
- */
- public boolean openQuestion() throws IndicatorException
- {
- if (message.getIndicator()!=SystemMessage.INQUIRY)
- throw new IndicatorException("Message "+message.getFullMessageID()+" is not an inquiry message."); //$NON-NLS-1$ //$NON-NLS-2$
- yesNoButtons=true;
- open();
- return (buttonIdPressed==IDialogConstants.YES_ID);
- }
- /**
- * opens the dialog with Yes, No, Details button for an Inquiry/Question message.
- * Eats up the IndicatorException, so only call this when you know what you are doing!
- */
- public boolean openQuestionNoException()
- {
- yesNoButtons=true;
- open();
- return (buttonIdPressed==IDialogConstants.YES_ID);
- }
-
- /**
- * opens the dialog with Yes, No, Cancel Details for an Inquiry/Question message
- * throws an IndicatorException if the indicator is not Inquiry
- * @return IDialogConstants.YES_ID or NO_ID
- */
- public int openYesNoCancel()
- {
- yesNoCancelButtons=true;
- return open();
- }
-
- /**
- * returns the id of the button pressed
- */
- public int getButtonPressedId()
- {
- return buttonIdPressed;
- }
-
- /**
- * overrides the default button selection.
- * @param buttonList an array of buttons for the button bar
- */
- public void setButtons(String [] buttonList)
- {
- buttons=buttonList;
- }
- /**
- * sets the default button for the message.
- * Use this method if you wan to override the default button (the first one)
- * @param buttonIndex the 0-based index of the button
- */
- public void setButtonIndex(int buttonIndex)
- {
- defaultIndex=buttonIndex;
- }
-
-
-
-
- /**
- * Populates the list using this error dialog's status object.
- * This walks the child stati of the status object and
- * displays them in a list. The format for each entry is
- * status_path : status_message
- * If the status's path was null then it (and the colon)
- * are omitted.
- */
- private void populateList(Text list)
- {
- Iterator z = statusList.iterator();
- while (z.hasNext())
- {
- IStatus childStatus = (IStatus) z.next();
- populateList(list, childStatus, 0);
- }
- }
-
-
-
- private void populateList(Text list, IStatus status, int nesting)
- {
- if (!status.matches(displayMask))
- {
- return;
- }
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < nesting; i++)
- {
- sb.append(" "); //$NON-NLS-1$
- }
- sb.append(status.getMessage());
- list.append(sb.toString());
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++)
- {
- list.append("\n"); //$NON-NLS-1$
- populateList(list, children[i], nesting + 1);
- }
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by
- * the user pressing the details button.
- */
- private void toggleDetailsArea()
- {
- Point windowSize = getShell().getSize();
- getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (listCreated)
- {
- list.dispose();
- listCreated = false;
- detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- }
- else
- {
- list = createDropDownList2((Composite)getContents());
- detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- }
- Point newSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- // yantzi:5.1.2 this leaves a gap at the bottom of the dialog when opened with details,
- // why not just set it to the newSize.y?
- //getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- getShell().setSize(new Point(windowSize.x, newSize.y));
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by
- * open using openWithDetails.
- */
- private void toggleDetailsArea2(Composite composite)
- {
- Point windowSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- getDialogArea().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- list = createDropDownList2(composite.getParent());
- detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- Point newSize = composite.getParent().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- // yantzi:5.1.2 this leaves a gap at the bottom of the dialog when opened with details,
- // why not just set it to the newSize.y?
- //getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y-buttonSize.y)));
- getShell().setSize(new Point(windowSize.x, newSize.y));
- }
-
- /**
- * Keeping for posterity. Phil.
- */
- public static Shell getDefaultShell()
- {
- return Display.getCurrent().getActiveShell();
- }
-
- /**
- * For ease of use for simple messages with no response from user.
- */
- public static void displayErrorMessage(Shell shell, SystemMessage msg)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
-
- /**
- * For ease of use for simple messages which are the result of an exception
- */
- public static void displayErrorMessage(Shell shell, SystemMessage msg, Exception exc)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.setException(exc);
- msgDlg.open();
- }
-
- /**
- * For ease of use for simple error message text with no response from user.
- */
- public static void displayErrorMessage(Shell shell, String msgText)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E);
- msg.makeSubstitution(msgText);
- displayErrorMessage(shell,msg);
- }
-
- /**
- * For ease of use for simple message text with no response from user.
- */
- public static void displayMessage(Shell shell, String msgText)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_I);
- msg.makeSubstitution(msgText);
- displayErrorMessage(shell,msg);
- }
-
-
-
- /**
- * Display this wrapped system message to the user
- */
- public static void displayMessage(org.eclipse.swt.widgets.Shell shell, SystemMessageException msgEx)
- {
- if (msgEx != null)
- SystemMessageDialog.displayErrorMessage(shell, msgEx.getSystemMessage());
- }
-
- /**
- * For ease of use for simple host error messages that are xlated already.
- */
- public static void displayHostErrorMessage(Shell shell, String hostMsg)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E);
- msg.makeSubstitution(hostMsg);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
-
- /**
- * For ease of use for simple host error messages that are xlated already,
- * and which have 2nd level text.
- */
- public static void displayHostErrorMessage(Shell shell, String hostMsg, String levelTwo)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E_HELP);
- msg.makeSubstitution(hostMsg,levelTwo);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
-
- /**
- * For ease of use for simple host warning messages that are xlated already.
- */
- public static void displayHostWarningMessage(Shell shell, String hostMsg)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W);
- msg.makeSubstitution(hostMsg);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
-
- /**
- * For ease of use for simple host warning messages that are xlated already,
- * and which have 2nd level text.
- */
- public static void displayHostWarningMessage(Shell shell, String hostMsg, String levelTwo)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W_HELP);
- msg.makeSubstitution(hostMsg,levelTwo);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
-
- /**
- * For displaying a generic error message when an unexpected exception happens.
- */
- public static void displayExceptionMessage(Shell shell, Exception exc)
- {
- SystemMessage msg = getExceptionMessage(shell, exc);
- if ((shell == null) && (Display.getCurrent()!=null))
- shell = Display.getCurrent().getActiveShell();
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.setException(exc);
- msgDlg.open();
- }
-
-
- /**
- * When an exception occurs and you want to turn it into a SystemMessage,
- * call this...
- */
- public static SystemMessage getExceptionMessage(Shell shell, Exception exc)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED);
- msg.makeSubstitution(exc);
- return msg;
- }
-
- /**
- * Put up an error message when the error msg framework itself doesn't work.
- */
- public static void showExceptionMessage(Shell shell, String msg, Exception exc)
- {
- org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(null);
- //mb.setTitle("Remote Systems Programming Error");
- mb.setMessage(msg);
- mb.open();
- SystemBasePlugin.logError(msg,exc);
- }
-
- /**
- * Show this message in the message dialog. We polymorphically show the right message dialog,
- * by querying the message type.
- * @return true if this is a question message, and user presses Yes.
- */
- public static boolean show(Shell shell, SystemMessage msg)
- {
- boolean yes = false;
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
-
- if (msg.getIndicator() != SystemMessage.INQUIRY)
- msgDlg.open();
- else
- yes = msgDlg.openQuestionNoException();
- 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 <code>true</code> to show the option in the dialog, <code>false</code> 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
- * <code>true</code>, then the value stored in the preference is <code>true</code> if the user selects the option,
- * and <code>false</code> if the user does not select the option. If this is set to <code>false</code>, then the
- * value stored in the preference will be <code>false</code> if the user selects the option, and <code>true</code>
- * 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
deleted file mode 100644
index 2a9ec22a3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageLine.java
+++ /dev/null
@@ -1,624 +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.messages;
-
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.rse.core.SystemBasePlugin;
-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;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-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.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A message line. It distinguishs between "normal" messages and errors.
- * Setting an error message hides a currently displayed message until
- * <code>clearErrorMessage</code> is called.
- */
-public class SystemMessageLine extends Composite implements ISystemMessageLine {
-
- private Button moreButton;
- private Label image;
- private Text widget;
- private MyMessage infoMessage = null;
- private MyMessage errorMessage = null;
- private static final int ERROR = 3;
- private static final int WARNING = 2;
- private static final int INFO = 1;
- private static final int NONE = 0;
-
- private abstract class MyMessage {
- /**
- * @return The Image of the message based on its type.
- */
- Image getImage() {
- int type = getType();
- switch (type) {
- case ERROR:
- return JFaceResources.getImage(org.eclipse.jface.dialogs.Dialog.DLG_IMG_MESSAGE_ERROR);
- case WARNING:
- return JFaceResources.getImage(org.eclipse.jface.dialogs.Dialog.DLG_IMG_MESSAGE_WARNING);
- case INFO:
- return JFaceResources.getImage(org.eclipse.jface.dialogs.Dialog.DLG_IMG_MESSAGE_INFO);
- default:
- return JFaceResources.getImage(org.eclipse.jface.dialogs.Dialog.DLG_IMG_MESSAGE_INFO);
- }
- }
-
- Color getColor() {
- int type = getType();
- switch (type) {
- case ERROR:
- return getColor(ISystemThemeConstants.MESSAGE_ERROR_COLOR);
- case WARNING:
- return getColor(ISystemThemeConstants.MESSAGE_WARNING_COLOR);
- case INFO:
- return getColor(ISystemThemeConstants.MESSAGE_INFORMATION_COLOR);
- default:
- return getColor(ISystemThemeConstants.MESSAGE_INFORMATION_COLOR);
- }
- }
-
- /**
- * @param symbolicName the name of the color in the current theme's color registry.
- * @return an SWT Color or null.
- */
- private Color getColor(String symbolicName) {
- ColorRegistry registry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
- Color result = registry.get(symbolicName);
- return result;
- }
-
- boolean isError() {
- return getType() == ERROR;
- }
-
- /**
- * @return The id of the message or null if there is none.
- */
- abstract String getID();
-
- /**
- * @return The full text of the message to be shown in the message line.
- */
- abstract String getText();
-
- /**
- * @return The tooltip for the message, to be shown when hovering over the message line.
- */
- abstract String getTooltip();
-
- /**
- * @return true if there is more text that can be shown in a message details pane.
- */
- abstract boolean hasMore();
-
- /**
- * @return The SystemMessage version of the message.
- */
- abstract SystemMessage toSystemMessage();
-
- /**
- * @return The type of the message. One of NONE, INFO, WARNING, or ERROR.
- */
- abstract int getType();
-
- /**
- * @return The data values associated with this message.
- */
- abstract Object[] getData();
-
- /**
- * @return true if the message resulted form a strange occurence.
- */
- abstract boolean isStrange();
- }
-
- private class MySystemMessage extends MyMessage {
-
- private SystemMessage message = null;
-
- /**
- * @param message
- */
- MySystemMessage(SystemMessage message) {
- this.message = message;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#toSystemMessage()
- */
- SystemMessage toSystemMessage() {
- return message;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getID()
- */
- String getID() {
- return message.getFullMessageID();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getText()
- */
- String getText() {
- return message.getLevelOneText();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getTooltip()
- */
- String getTooltip() {
- return message.getFullMessageID() + ": " + getText(); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#hasMore()
- */
- boolean hasMore() {
- String text2 = message.getLevelTwoText();
- return (text2 != null) && (text2.length() > 0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#wasStrange()
- */
- boolean isStrange() {
- return message.getIndicator() == SystemMessage.UNEXPECTED;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getData()
- */
- Object[] getData() {
- Object[] result = message.getSubVariables();
- if (result == null) result = new Object[0];
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getType()
- */
- int getType() {
- int result = NONE;
- if (message != null) {
- switch (message.getIndicator()) {
- case SystemMessage.COMPLETION:
- case SystemMessage.INFORMATION:
- case SystemMessage.INQUIRY:
- result = INFO;
- break;
- case SystemMessage.ERROR:
- case SystemMessage.UNEXPECTED:
- result = ERROR;
- break;
- case SystemMessage.WARNING:
- result = WARNING;
- break;
- default:
- result = NONE;
- }
- }
- return result;
- }
- }
-
- private class MyImpromptuMessage extends MyMessage {
-
- private int type = NONE;
- private String text1 = ""; //$NON-NLS-1$
- private String text2 = null;
-
- /**
- * @param type The type of the message.
- * @param text1 The first-level text of the message.
- */
- MyImpromptuMessage(int type, String text1) {
- this.type = type;
- this.text1 = text1;
- }
-
- /**
- * @param type The type of the message.
- * @param text1 The first-level text of the message.
- * @param text2 the second-level text of the message.
- */
- MyImpromptuMessage(int type, String text1, String text2) {
- this.type = type;
- this.text1 = text1;
- this.text2 = text2;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#toSystemMessage()
- */
- public SystemMessage toSystemMessage() {
- String id = null;
- Object[] data = null;
- if (text2 == null) {
- id = isError() ? ISystemMessages.MSG_GENERIC_E : ISystemMessages.MSG_GENERIC_I;
- data = new Object[] { text1 };
- } else {
- id = isError() ? ISystemMessages.MSG_GENERIC_E_HELP : ISystemMessages.MSG_GENERIC_I_HELP;
- data = new Object[] { text1, text2 };
- }
- SystemMessage result = RSEUIPlugin.getPluginMessage(id, data);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getID()
- */
- String getID() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getText()
- */
- String getText() {
- return text1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getTooltip()
- */
- String getTooltip() {
- return text1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#hasMore()
- */
- boolean hasMore() {
- return text2 != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#wasStrange()
- */
- boolean isStrange() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getData()
- */
- Object[] getData() {
- return new Object[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.SystemMessageLine.MyMessage#getType()
- */
- int getType() {
- return type;
- }
- }
-
- /**
- * Creates a new message line as a child of the given parent. If the parent
- * uses a grid layout then the layout data is set. If not then the layout data
- * must be set by the creator to match the layout of the parent composite.
- */
- public SystemMessageLine(Composite parent) {
- super(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 5;
- layout.marginHeight = 2;
- layout.marginWidth = 3;
- setLayout(layout);
-
- image = new Label(this, SWT.NONE);
- image.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
-
- // this is a read-only text field so it is tab enabled and readable by a screen reader.
- widget = new Text(this, SWT.READ_ONLY | SWT.SINGLE);
- widget.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false));
- widget.setBackground(parent.getBackground());
-
- moreButton = new Button(this, SWT.NONE);
- 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) {
- }
-
- public void widgetSelected(SelectionEvent e) {
- if (e.getSource().equals(moreButton)) {
- MyMessage message = getCurrentMessage();
- if (message != null) {
- SystemMessage m = message.toSystemMessage();
- Shell shell = getShell();
- SystemMessageDialog dialog = new SystemMessageDialog(shell, m);
- dialog.openWithDetails();
- }
- }
- }
- });
- // add accessibility information to the "more" button
- moreButton.setToolTipText(SystemResources.RESID_MSGLINE_TIP);
- moreButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
- public void getName(AccessibleEvent e) {
- getHelp(e);
- }
-
- public void getHelp(AccessibleEvent e) {
- e.result = moreButton.getToolTipText();
- }
- });
-
- addControlListener(new ControlListener() {
- public void controlMoved(ControlEvent e) {
- }
-
- public void controlResized(ControlEvent e) {
- adjustText();
- layout();
- }
- });
- addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- widget.dispose();
- moreButton.dispose();
- image.dispose();
- }
- });
- showCurrentMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#clearMessage()
- */
- public void clearMessage() {
- infoMessage = null;
- showCurrentMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#clearErrorMessage()
- */
- public void clearErrorMessage() {
- errorMessage = null;
- showCurrentMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)
- */
- public void setMessage(SystemMessage message) {
- infoMessage = new MySystemMessage(message);
- if (infoMessage.isError()) {
- infoMessage = new MyImpromptuMessage(NONE, message.getLevelOneText(), message.getLevelTwoText());
- }
- showCurrentMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setMessage(java.lang.String)
- */
- public void setMessage(String message) {
- infoMessage = new MyImpromptuMessage(INFO, message);
- showCurrentMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(java.lang.String)
- */
- public void setErrorMessage(String message) {
- errorMessage = new MyImpromptuMessage(ERROR, message);
- showCurrentMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)
- */
- public void setErrorMessage(SystemMessage message) {
- logMessage(message);
- errorMessage = new MySystemMessage(message);
- showCurrentMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(java.lang.Throwable)
- */
- public void setErrorMessage(Throwable throwable) {
- SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
- message.makeSubstitution(throwable);
- setErrorMessage(message);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#getMessage()
- */
- public String getMessage() {
- String result = infoMessage != null ? infoMessage.getText() : null;
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#getErrorMessage()
- */
- public String getErrorMessage() {
- String result = errorMessage != null ? errorMessage.getText() : null;
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#getSystemErrorMessage()
- */
- public SystemMessage getSystemErrorMessage() {
- SystemMessage result = errorMessage != null ? errorMessage.toSystemMessage() : null;
- return result;
- }
-
- private MyMessage getCurrentMessage() {
- return errorMessage != null ? errorMessage : infoMessage;
- }
-
- /**
- * Shows the top message on the stack. If the stack is empty it will "show" nothing.
- */
- private void showCurrentMessage() {
- MyMessage message = getCurrentMessage();
- setIcon(message);
- setText(message);
- setMoreButton(message);
- layout();
- }
-
- /**
- * Sets the icon field of the widget to the appropriate symbol depending on the
- * type of message.
- * @param message the message used to determine the icon type.
- */
- private void setIcon(MyMessage message) {
- Image t = (message == null) ? null : message.getImage();
- image.setImage(t);
- }
-
- /**
- * Write the text from a MyMessage to the widget.
- * @param message the message from which to get the text.
- */
- private void setText(MyMessage message) {
- String text = ""; //$NON-NLS-1$
- String toolTip = null;
- Color color = null;
- if (message != null) {
- text = message.getText();
- toolTip = message.getTooltip();
- color = message.getColor();
- }
- widget.setToolTipText(toolTip);
- widget.setForeground(color);
- widget.setText(text);
- widget.setData(text);
- widget.setVisible(text.length() > 0);
- adjustText();
- }
-
- /**
- * Hide or show the "more" button. If the message has second level text then
- * the more button is shown.
- */
- private void setMoreButton(MyMessage message) {
- boolean visible = message != null && message.hasMore();
- moreButton.setVisible(visible);
- }
-
- /**
- * Adjusts the text in the widget. The full text is stored in the data field of the
- * Text widget. The partial text is shown if the width of the containing control
- * is too small to hold it.
- */
- private void adjustText() {
- GC gc = new GC(widget);
- int maxWidth = getSize().x;
- maxWidth -= moreButton.getSize().x;
- maxWidth -= image.getSize().x;
- maxWidth -= 17; // a guess at the padding between controls
- maxWidth = (maxWidth >= 0) ? maxWidth : 0;
- String text = (String) widget.getData();
- if (text != null) {
- if (gc.stringExtent(text).x > maxWidth) {
- StringBuffer head = new StringBuffer(text);
- int n = head.length();
- head.append("..."); //$NON-NLS-1$
- while (n > 0) {
- text = head.toString();
- if (gc.stringExtent(text).x <= maxWidth) break;
- head.deleteCharAt(--n);
- }
- if (n == 0) text = ""; //$NON-NLS-1$
- }
- widget.setText(text);
- }
- gc.dispose();
- }
-
- /**
- * Logs a message in the appropriate log according to the current preferences.
- * @param message The SystemMessage to be logged.
- */
- private void logMessage(SystemMessage message) {
- MyMessage m = new MySystemMessage(message);
- Object[] data = m.getData();
- for (int i = 0; i < data.length; i++) {
- Object object = data[i];
- StringBuffer buffer = new StringBuffer(200);
- buffer.append(m.getID());
- buffer.append(": SUB#"); //$NON-NLS-1$
- buffer.append(Integer.toString(i));
- buffer.append(":"); //$NON-NLS-1$
- buffer.append(object.toString());
- logMessage(m.getType(), buffer.toString(), false);
- }
- logMessage(m.getType(), m.getID(), m.isStrange());
- }
-
- /**
- * Sends a text message to the log. Will log messages only if the RSEUIPlugin has been
- * set to log these.
- * @param type The type of the message - NONE, INFO, WARNING or ERROR.
- * @param text The text to log.
- * @param stackTrace If true then generate a stack trace in the log. Ignored if the
- * type is not ERROR.
- */
- private void logMessage(int type, String text, boolean stackTrace) {
- boolean logging = RSEUIPlugin.getDefault().getLoggingSystemMessageLine();
- if (logging) {
- switch (type) {
- case ERROR:
- Exception e = stackTrace ? new Exception("Stack Trace") : null; //$NON-NLS-1$
- SystemBasePlugin.logError(text, e);
- break;
- case WARNING:
- SystemBasePlugin.logWarning(text);
- break;
- default:
- SystemBasePlugin.logInfo(text);
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageStatus.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageStatus.java
deleted file mode 100644
index c8d176eb9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageStatus.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.messages;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-
-/**
- * A SystemMessageStatus object encapsulates a SystemMessage or a
- * SystemMessageException as a Status object. Could be used when creating a
- * CoreException from a SystemMessageException.
- */
-public class SystemMessageStatus implements IStatus {
- private SystemMessage message;
- private SystemMessageException exception;
- public SystemMessageStatus(SystemMessage message) {
- this.message = message;
- }
-
- public SystemMessageStatus(SystemMessageException exception) {
- this.message = exception.getSystemMessage();
- this.exception = exception;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IStatus#isOK()
- */
- public boolean isOK() {
- int severity = getSeverity();
- return severity <= IStatus.OK;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IStatus#getPlugin()
- */
- public String getPlugin() {
- String id = SystemBasePlugin.getBaseDefault().getBundle().getSymbolicName();
- return id;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IStatus#getChildren()
- */
- public IStatus[] getChildren() {
- return new IStatus[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IStatus#getCode()
- */
- public int getCode() {
- String codeString = message.getMessageNumber();
- int code = 0;
- try {
- code = Integer.parseInt(codeString);
- } catch (NumberFormatException e) {
- }
- return code;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IStatus#getException()
- */
- public Throwable getException() {
- return exception;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IStatus#getMessage()
- */
- public String getMessage() {
- return message.getLevelOneText();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IStatus#getSeverity()
- */
- public int getSeverity() {
- char ind = message.getIndicator();
- switch (ind) {
- case SystemMessage.COMPLETION:
- return IStatus.OK;
- case SystemMessage.INFORMATION:
- return IStatus.INFO;
- case SystemMessage.INQUIRY:
- return IStatus.INFO;
- case SystemMessage.WARNING:
- return IStatus.WARNING;
- case SystemMessage.UNEXPECTED:
- return IStatus.WARNING;
- case SystemMessage.ERROR:
- return IStatus.ERROR;
- default:
- return IStatus.OK;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IStatus#isMultiStatus()
- */
- public boolean isMultiStatus() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IStatus#matches(int)
- */
- public boolean matches(int severityMask) {
- int severity = getSeverity();
- int matching = severity & severityMask;
- return matching > 0;
- }
-
- /**
- * @return the SystemMessage encapsulated by this status.
- */
- public SystemMessage getSystemMessage() {
- return message;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessage.java
deleted file mode 100644
index 249b49484..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessage.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.messages;
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.services.clientserver.messages.IndicatorException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-
-
-public class SystemUIMessage extends SystemMessage
-{
- protected static final int displayMask = IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR; // for IStatus substitution variables
-
- public SystemUIMessage(String comp, String sub, String number, char ind, String l1, String l2) throws IndicatorException
- {
- super(comp,sub,number,ind,l1,l2);
- }
-
-/**
- * used to determine the string value of the object
- * it calls toString for all object types except for Exceptions
- * where the stack is also rendered
- * @param sub the substitution object
- * @return the string value for the object
- */
- public String getSubValue(Object sub)
- {
- if (sub == null)
- return ""; //$NON-NLS-1$
-
- if (sub instanceof IStatus)
- {
- return populateList("", (IStatus)sub); //$NON-NLS-1$
- }
- else
- {
- return super.getSubValue(sub);
- }
- }
-
-/**
- * Populates the list using this error dialog's status object.
- * This walks the child stati of the status object and
- * displays them in a list. The format for each entry is
- * status_path : status_message
- * If the status's path was null then it (and the colon)
- * are omitted.
- */
- private static String populateList(String list, IStatus status) {
- java.util.List statusList = Arrays.asList(status.getChildren());
- Iterator enumer = statusList.iterator();
- while (enumer.hasNext()) {
- IStatus childStatus = (IStatus) enumer.next();
- list = populateList(list, childStatus, 0);
- }
- return list;
- }
- private static String populateList(String list, IStatus status, int nesting) {
- if (!status.matches(displayMask)) {
- return list;
- }
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < nesting; i++) {
- sb.append(NESTING_INDENT);
- }
- sb.append(status.getMessage());
- //list.add(sb.toString());
- list = list + sb.toString() + "\n"; //$NON-NLS-1$
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- list = populateList(list, children[i], nesting + 1);
- }
- return list;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java
deleted file mode 100644
index 60c5675af..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.messages;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.services.clientserver.messages.IndicatorException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * A SystemUIMessageFile extends SystemMessageFile and makes it more compatible
- * with Eclipse
- */
-public class SystemUIMessageFile extends SystemMessageFile {
-
- /**
- * Factory method for constructing a SystemUIMessageFile. If an error occurs when
- * reading the message file DTD then that is logged.
- * @param messageFileName The "registered" name of the message file. Used to determine
- * if the message file has been loaded.
- * @param messageFileStream The stream containing the message file. It is the
- * caller's responsibility to close this stream.
- * @return The message file that was constructed.
- */
- public static SystemUIMessageFile getMessageFile(String messageFileName,
- InputStream messageFileStream) {
- SystemUIMessageFile result = null;
- URL dtdURL = RSEUIPlugin.getDefault().getMessageFileDTD();
- if (dtdURL != null) {
- try {
- InputStream dtdStream = dtdURL.openStream();
- result = new SystemUIMessageFile(messageFileName,
- messageFileStream, dtdStream);
- dtdStream.close();
- } catch (IOException e) {
- SystemBasePlugin.logError("Could not open message file DTD.", e); //$NON-NLS-1$
- }
- } else {
- SystemBasePlugin.logError("Could not find mesage file DTD."); //$NON-NLS-1$
- }
- return result;
- }
-
- private SystemUIMessageFile(String messageFileName,
- InputStream messageFileStream, InputStream dtdStream) {
- super(messageFileName, messageFileStream, dtdStream);
- }
-
- /**
- * Override this to provide different extended SystemMessage implementation
- *
- * @param componentAbbr
- * @param subComponentAbbr
- * @param msgNumber
- * @param msgIndicator
- * @param msgL1
- * @param msgL2
- * @return The SystemMessage for the given message information
- * @throws IndicatorException
- */
- protected SystemMessage loadSystemMessage(String componentAbbr,
- String subComponentAbbr, String msgNumber, char msgIndicator,
- String msgL1, String msgL2) throws IndicatorException {
- return new SystemUIMessage(componentAbbr, subComponentAbbr, msgNumber,
- msgIndicator, msgL1, msgL2);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPage.java
deleted file mode 100644
index 5071debd1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPage.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.open;
-
-import org.eclipse.jface.dialogs.IDialogPage;
-
-/**
- * Defines a page inside the quick open dialog.
- * Clients can contribute their own quick open page to the
- * dialog by implementing this interface, typically as a subclass
- * of <code>DialogPage</code>.
- * <p>
- * The quick open dialog calls the <code>performAction</code> method when the Ok
- * button is pressed.
- * <p>
- *
- * @see org.eclipse.jface.dialogs.IDialogPage
- * @see org.eclipse.jface.dialogs.DialogPage
- */
-public interface ISystemQuickOpenPage extends IDialogPage {
-
- /**
- * Performs the action for this page.
- * The quick open dialog calls this method when the Ok button is pressed.
- * @return <code>true</code> if the dialog can be closed after execution.
- */
- public boolean performAction();
-
- /**
- * Sets the container of this page.
- * The quick open dialog calls this method to initialize this page.
- * Implementations may store the reference to the container.
- * @param container the container for this page.
- */
- public void setContainer(ISystemQuickOpenPageContainer container);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPageContainer.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPageContainer.java
deleted file mode 100644
index fb0fb2d1d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/ISystemQuickOpenPageContainer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.open;
-
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.viewers.ISelection;
-
-public interface ISystemQuickOpenPageContainer {
-
- /**
- * Returns the selection with which this container was opened.
- *
- * @return the selection passed to this container when it was opened
- */
- public ISelection getSelection();
-
- /**
- * Returns the context for the search operation.
- * This context allows progress to be shown inside the search dialog.
- *
- * @return the <code>IRunnableContext</code> for the search operation
- */
- public IRunnableContext getRunnableContext();
-
- /**
- * Sets the enable state of the perform action button
- * of this container.
- *
- * @param state <code>true</code> to enable the button which performs the action
- */
- public void setPerformActionEnabled(boolean state);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemOpenQuickOpenDialogAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemOpenQuickOpenDialogAction.java
deleted file mode 100644
index 0d49a592a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemOpenQuickOpenDialogAction.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.open;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-
-public class SystemOpenQuickOpenDialogAction extends Action implements IWorkbenchWindowActionDelegate {
-
- private IWorkbenchWindow window;
- private String pageId;
-
- /**
- * Constructor for the action.
- * @param text the text.
- * @param tooltip the tooltip.
- * @param image the image.
- * @param parent the parent shell.
- */
- public SystemOpenQuickOpenDialogAction(String text, String tooltip, ImageDescriptor image) {
- super(text, image);
- setToolTipText(tooltip);
- }
-
- /**
- * Constructor for the action.
- * @param text the text.
- * @param tooltip the tooltip.
- * @param parent the parent shell.
- */
- public SystemOpenQuickOpenDialogAction(String text, String tooltip) {
- this(text, tooltip, null);
- }
-
- /**
- * @param window the workbench window
- */
- public SystemOpenQuickOpenDialogAction(IWorkbenchWindow window, String pageId) {
- this((String)null, (String)null);
- this.window = window;
- this.pageId = pageId;
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- run();
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
-
- // if there is no active page, then beep
- if (getWindow().getActivePage() == null) {
- SystemBasePlugin.getActiveWorkbenchWindow().getShell().getDisplay().beep();
- return;
- }
-
- SystemQuickOpenDialog dialog = new SystemQuickOpenDialog(getWindow().getShell(), getSelection(), pageId);
- dialog.open();
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /**
- * Gets the current selection.
- * @return the current selection.
- */
- private ISelection getSelection() {
- return getWindow().getSelectionService().getSelection();
- }
-
- /**
- * Gets the window. If the current window is <code>null</code>, the current window is set to the active
- * workbench window, and then returned.
- * @return the current workench window, or the active workbench window if the current window is <code>null</code>.
- */
- private IWorkbenchWindow getWindow() {
-
- if (window == null) {
- window = SystemBasePlugin.getActiveWorkbenchWindow();
- }
-
- return window;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenDialog.java
deleted file mode 100644
index dac9295ee..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenDialog.java
+++ /dev/null
@@ -1,801 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.open;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ControlEnableState;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-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.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.ProgressMonitorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-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.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Layout;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-
-public class SystemQuickOpenDialog extends Dialog implements ISystemQuickOpenPageContainer, IRunnableContext {
-
- // the tab folder layout
- private class TabFolderLayout extends Layout {
-
- /**
- * @see org.eclipse.swt.widgets.Layout#computeSize(org.eclipse.swt.widgets.Composite, int, int, boolean)
- */
- protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
-
- if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) {
- return new Point(wHint, hHint);
- }
-
- int x = 0;
- int y = 0;
-
- Control[] children = composite.getChildren();
-
- for (int i= 0; i < children.length; i++) {
- Point size = children[i].computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache);
- x = Math.max(x, size.x);
- y = Math.max(y, size.y);
- }
-
- Point minSize = getMinSize();
- x = Math.max(x, minSize.x);
- y = Math.max(y, minSize.y);
-
- if (wHint != SWT.DEFAULT) {
- x = wHint;
- }
-
- if (hHint != SWT.DEFAULT) {
- y = hHint;
- }
-
- return new Point(x, y);
- }
-
-
- /**
- * @see org.eclipse.swt.widgets.Layout#layout(org.eclipse.swt.widgets.Composite, boolean)
- */
- protected void layout(Composite composite, boolean flushCache) {
- Rectangle rect = composite.getClientArea();
-
- Control[] children = composite.getChildren();
-
- for (int i = 0; i < children.length; i++) {
- children[i].setBounds(rect);
- }
- }
- }
-
- // contents and buttons
- private Control contents;
- private Button cancelButton;
- private Button openButton;
-
- //private String performActionLabel = JFaceResources.getString("finish");
-
- // the number of long running operations being executed from the dialog
- private long activeRunningOperations;
-
- // cursors during operation
- private Cursor waitCursor;
- private Cursor arrowCursor;
-
- // progress monitor
- private ProgressMonitorPart progressMonitorPart;
-
- // window closing dialog
- private MessageDialog windowClosingDialog;
-
- // minimum size for tab folder
- private Point minSize;
-
- private ISelection selection;
- private String initialPageId;
- private ISystemQuickOpenPage currentPage;
- private int currentIndex;
- private List descriptors;
-
- /**
- * The constructor for the quick open dialog.
- * @param shell the shell.
- * @param selection the current selection.
- * @param pageId the initial page id.
- */
- public SystemQuickOpenDialog(Shell shell, ISelection selection, String pageId) {
- super(shell);
- this.selection = selection;
- this.initialPageId = pageId;
- this.descriptors = SystemQuickOpenUtil.getInstance().getQuickOpenPageDescriptors(initialPageId);
- }
-
-
- // ------------------------------- UI creation and handling ---------------------------------------
-
- /**
- * @see org.eclipse.jface.window.Window#create()
- */
- public void create() {
- super.create();
-
- if (currentPage != null) {
- currentPage.setVisible(true);
- }
- }
-
- /**
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText("Open"); //$NON-NLS-1$
- // TODO: add image and F1 help
- }
-
- /**
- * Creates a page area, a progress monitor and a separator.
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
-
- // call super to get a standard composite
- Composite composite = (Composite)(super.createDialogArea(parent));
-
- // create a grid layout
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
-
- // set layout for composite
- composite.setLayout(layout);
-
- // set layout data for composite
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // create the page area
- contents = createPageArea(composite);
-
- // create a progress monitor and make it invisible initially
- GridLayout pmlayout = new GridLayout();
- pmlayout.numColumns = 1;
- progressMonitorPart = new ProgressMonitorPart(composite, pmlayout, SWT.DEFAULT);
- progressMonitorPart.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- progressMonitorPart.setVisible(false);
-
- // add a separator
- Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
- separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // apply dialog font
- applyDialogFont(composite);
-
- return composite;
- }
-
- /**
- * Creates the page area.
- * @param parent the parent composite.
- * @return the page area control.
- */
- protected Control createPageArea(Composite parent) {
-
- int numPages = descriptors.size();
-
- // if number of pages is 0, then just show a label
- if (numPages == 0) {
- Label label = new Label(parent, SWT.CENTER | SWT.WRAP);
- // TODO: set text
- //label.setText(SearchMessages.getString("SearchDialog.noSearchExtension")); //$NON-NLS-1$
- return label;
- }
-
- // get the preferred index, which is the index of the page with the initial page id, or depends on
- // the current selection
- currentIndex = getPreferredPageIndex();
-
- // get the current page from the index
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- currentPage = getDescriptorAt(currentIndex).createObject();
- }
- });
-
- // set the current page container
- currentPage.setContainer(this);
-
- // if number of pages is 1, simple get the control representing the page and return it
- if (numPages == 1) {
- return getControl(currentPage, parent);
- }
- // if number of pages is more than 1, then we create a tab folder
- else {
-
- // create a border composite
- Composite border = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth= 7;
- layout.marginHeight= 7;
- border.setLayout(layout);
-
- // create a tab folder
- TabFolder folder = new TabFolder(border, SWT.NONE);
- folder.setLayoutData(new GridData(GridData.FILL_BOTH));
- folder.setLayout(new TabFolderLayout());
-
- // go through all descriptors
- for (int i = 0; i < numPages; i++) {
- SystemQuickOpenPageDescriptor descriptor = (SystemQuickOpenPageDescriptor)(descriptors.get(i));
-
- // create a tab item for each descriptor
- final TabItem item = new TabItem(folder, SWT.NONE);
-
- // set the text of the tab item to the label of the descriptor
- item.setText(descriptor.getLabel());
-
- // add a dispose listener which destroys the image
- item.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- item.setData(null);
-
- if (item.getImage() != null) {
- item.getImage().dispose();
- }
- }
- });
-
- // get the image descriptor from the page descriptor
- ImageDescriptor imageDesc = descriptor.getImage();
-
- // if image descriptor exists, create image and set it for the tab item
- if (imageDesc != null) {
- item.setImage(imageDesc.createImage());
- }
-
- // set item data to the descriptor
- item.setData(descriptor);
-
- // now if index is the current index (i.e. the preferred index)
- if (i == currentIndex) {
-
- // get control corresponding to current page with folder as the parent
- item.setControl(getControl(currentPage, folder));
-
- // set the data to the actual page
- item.setData(currentPage);
- }
- }
-
- // add a selection listener to the folder
- folder.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- turnToPage(event);
- }
- });
-
- // set the selection to the current index
- folder.setSelection(currentIndex);
-
- // finally, return the border
- return border;
- }
- }
-
- /**
- * Returns the index of the page to be displayed. If a particular page id was requested, then the index
- * of the page that has that id is returned. Otherwise the index depends on the page most appropriate for
- * the current selection.
- * @return the index of the page to be displayed.
- */
- private int getPreferredPageIndex() {
-
- // TODO: calculate the most appropriate page depending on the selection
- int result = 0;
-
- int size = descriptors.size();
-
- for (int i = 0; i < size; i++) {
-
- SystemQuickOpenPageDescriptor descriptor = (SystemQuickOpenPageDescriptor)(descriptors.get(i));
-
- // if we have an initial page id then we must return the index
- if (initialPageId != null && initialPageId.equals(descriptor.getId())) {
- return i;
- }
-
- // TODO: find out the most appropriate page and return its index
- }
-
- return result;
- }
-
- /**
- * Gets the page descriptor at the specified index.
- * @param index the index.
- * @return the page descriptor at the specified index.
- */
- private SystemQuickOpenPageDescriptor getDescriptorAt(int index) {
- return (SystemQuickOpenPageDescriptor)(descriptors.get(index));
- }
-
- /**
- * Returns the control representing the given page.
- * If the control for the page hasn't been created yet, it is created.
- * The parent of the page control is returned, i.e. we have a wrapper for a page and that is what is returned.
- * @param page the quick open page.
- * @param parent the parent in which to create the page wrapper where the page control will be created.
- * @return the parent of the page control, i.e. a wrapper for the page. The wrapper's parent is the given parent.
- */
- private Control getControl(ISystemQuickOpenPage page, Composite parent) {
-
- // if the page control is null, create it
- if (page.getControl() == null) {
-
- // create a wrapper for the page
- Composite pageWrapper = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- pageWrapper.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- pageWrapper.setLayout(layout);
-
- // create the page in the wrapper
- page.createControl(pageWrapper);
- }
-
- // returns the wrapper
- return page.getControl().getParent();
- }
-
- /**
- * Turns to the page which has been selected.
- * @param event the selection event.
- */
- private void turnToPage(SelectionEvent event) {
- final TabItem item = (TabItem)(event.item);
-
- // if control for tab item hasn't been created yet
- if (item.getControl() == null) {
-
- // get the data which is the descriptor
- final SystemQuickOpenPageDescriptor descriptor = (SystemQuickOpenPageDescriptor)(item.getData());
-
- // set the data to be the actual quick open page
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- item.setData(descriptor.createObject());
- }
- });
-
- // now get the data, which is the quick open page
- ISystemQuickOpenPage page = (ISystemQuickOpenPage)(item.getData());
-
- // set the container of the page
- page.setContainer(this);
-
- // get the control represeting the page
- // note that the widget for the event is the tab folder
- Control newControl = getControl(page, (Composite)(event.widget));
-
- // set the item control
- item.setControl(newControl);
- }
-
- // get the item data and check whether it is an instance of quick open page
- if (item.getData() instanceof ISystemQuickOpenPage) {
-
- // the item data is the new current page
- currentPage = (ISystemQuickOpenPage)(item.getData());
-
- // the current index is the selection index of the item parent (i.e. the tab folder)
- currentIndex = item.getParent().getSelectionIndex();
-
- // resize dialog if needed and pass in the page wrapper
- // that method will test if the control in the page is smaller than the wrapper (i.e. its parent)
- resizeDialogIfNeeded(item.getControl());
-
- // make the current page visible
- currentPage.setVisible(true);
- }
- }
-
- /**
- * Resizes dialog if needed. Tests the given control size with the size of the current page control.
- * If the current page control is smaller, then resize.
- * @param newControl the control whose size we want to test against the size of the page control.
- */
- private void resizeDialogIfNeeded(Control newControl) {
- Point currentSize = currentPage.getControl().getSize();
- Point newSize = newControl.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
-
- // if we must resize, then compute size of shell again, and set it
- if (mustResize(currentSize, newSize)) {
- Shell shell = getShell();
- shell.setSize(shell.computeSize(SWT.DEFAULT, SWT.DEFAULT, true));
- }
- }
-
- /**
- * Returns whether we must resize.
- * @param currentSize the current size.
- * @param newSize the new size.
- * @return <code>true</code> if current size is smaller than new size, <code>false</code> otherwise.
- */
- private boolean mustResize(Point currentSize, Point newSize) {
- return currentSize.x < newSize.x || currentSize.y < newSize.y;
- }
-
- /**
- * Gets the minimum size for the tab folder.
- */
- private Point getMinSize() {
-
- if (minSize != null) {
- return minSize;
- }
-
- int x = 0;
- int y = 0;
- int length = descriptors.size();
-
- for (int i = 0; i < length; i++) {
- Point size = getDescriptorAt(i).getPreferredSize();
-
- if (size.x != SWT.DEFAULT) {
- x = Math.max(x, size.x);
- }
- if (size.y != SWT.DEFAULT) {
- y = Math.max(y, size.y);
- }
- }
-
- minSize = new Point(x, y);
- return minSize;
- }
-
- /**
- * Calls the super class method if there are no running operations.
- * @see org.eclipse.jface.dialogs.Dialog#cancelPressed()
- */
- protected void cancelPressed() {
-
- if (activeRunningOperations == 0) {
- super.cancelPressed();
- }
- }
-
- /**
- * Calls <code>performAction</code>. If the result of calling this method is <code>true</code>
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- boolean result = performAction();
-
- if (result) {
- super.okPressed();
- }
- }
-
- /**
- * Returns whether ok to close. Asks the current page, if any, whether it is ok to close.
- * @return <code>true</code> if the dialog can be closed, <code>false</code> otherwise.
- */
- protected boolean performAction() {
-
- if (currentPage == null) {
- return true;
- }
-
- return currentPage.performAction();
- }
-
-
- // ----------------------------------------- Interface methods ----------------------------------
-
- /**
- * @see org.eclipse.rse.ui.open.ISystemQuickOpenPageContainer#getRunnableContext()
- */
- public IRunnableContext getRunnableContext() {
- return this;
- }
-
- /**
- * @see org.eclipse.rse.ui.open.ISystemQuickOpenPageContainer#getSelection()
- */
- public ISelection getSelection() {
- return selection;
- }
-
- /**
- * @see org.eclipse.rse.ui.open.ISystemQuickOpenPageContainer#setPerformActionEnabled(boolean)
- */
- public void setPerformActionEnabled(boolean state) {
-
- if (openButton != null) {
- openButton.setEnabled(state);
- }
- }
-
-
- // ----------------------------- Operation related methods --------------------------
-
- /**
- * @see org.eclipse.jface.operation.IRunnableContext#run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
- */
- public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
-
- // The operation can only be canceled if it is executed in a separate thread.
- // Otherwise the UI is blocked anyway.
- HashMap state = null;
-
- try {
- activeRunningOperations++;
- state = aboutToStart(fork && cancelable);
- ModalContext.run(runnable, fork, getProgressMonitor(), getShell().getDisplay());
- }
- finally {
-
- if (state != null) {
- stopped(state);
- }
-
- activeRunningOperations--;
- }
- }
-
- /**
- * Returns the progress monitor. If the dialog doesn't
- * have a progress monitor, <code>null</code> is returned.
- */
- protected IProgressMonitor getProgressMonitor() {
- return progressMonitorPart;
- }
-
- /**
- * About to start a long running operation tiggered through the dialog.
- * Shows the progress monitor and disables the dialog.
- * @param enableCancelButton <code>true</code> if cancel button should be enabled, <code>false</code> otherwise.
- * @return the saved UI state.
- * @see #stopped(HashMap)
- */
- protected synchronized HashMap aboutToStart(boolean enableCancelButton) {
- HashMap savedState = null;
-
- Shell shell = getShell();
-
- if (shell != null) {
- Display d = shell.getDisplay();
-
- // get focus control
- Control focusControl = d.getFocusControl();
-
- if (focusControl != null && focusControl.getShell() != shell) {
- focusControl = null;
- }
-
- // set the busy cursor to all shells
- waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
- setDisplayCursor(d, waitCursor);
-
- // set the arrow cursor to the cancel component
- arrowCursor = new Cursor(d, SWT.CURSOR_ARROW);
- cancelButton.setCursor(arrowCursor);
-
- // deactivate shell
- savedState = saveUIState(enableCancelButton);
-
- // save focus control
- if (focusControl != null) {
- savedState.put("focusControl", focusControl); //$NON-NLS-1$
- }
-
- // attach the progress monitor part to the cancel button and make it visible
- progressMonitorPart.attachToCancelComponent(cancelButton);
- progressMonitorPart.setVisible(true);
- }
-
- return savedState;
- }
-
- /**
- * A long running operation triggered through the wizard
- * was stopped either by user input or by normal end.
- * @param savedState The saveState returned by <code>aboutToStart</code>.
- * @see #aboutToStart(boolean)
- */
- protected synchronized void stopped(HashMap state) {
-
- Shell shell = getShell();
-
- if (shell != null) {
-
- progressMonitorPart.setVisible(false);
- progressMonitorPart.removeFromCancelComponent(cancelButton);
-
- restoreUIState(state);
-
- setDisplayCursor(shell.getDisplay(), null);
- cancelButton.setCursor(null);
- waitCursor.dispose();
- waitCursor = null;
- arrowCursor.dispose();
- arrowCursor = null;
- Control focusControl = (Control)(state.get("focusControl")); //$NON-NLS-1$
-
- if (focusControl != null && ! focusControl.isDisposed()) {
- focusControl.setFocus();
- }
- }
- }
-
- /**
- * Sets a cursor for all shells in a display.
- * @param d the display.
- * @param c the cursor.
- */
- private void setDisplayCursor(Display d, Cursor c) {
-
- Shell[] shells = d.getShells();
-
- for (int i= 0; i < shells.length; i++) {
- shells[i].setCursor(c);
- }
- }
-
-
- //------------------------ UI state save and restoring -------------------------------------
-
- /**
- * Restores the enable state of the UI, i.e. all dialog contents.
- * @param state the hashmap that contains the enable state of the UI.
- */
- private void restoreUIState(HashMap state) {
- restoreEnableState(cancelButton, state, "cancel"); //$NON-NLS-1$
- restoreEnableState(openButton, state, "open"); //$NON-NLS-1$
- ControlEnableState pageState = (ControlEnableState)state.get("tabForm"); //$NON-NLS-1$
- pageState.restore();
- }
-
- /**
- * Restores the enable state of a control.
- * @param w the control whose state needs to be restored.
- * @param h the hashmap containing the enable state of the control.
- * @param key the key to use to retrieve the enable state.
- */
- protected void restoreEnableState(Control w, HashMap h, String key) {
-
- if (!w.isDisposed()) {
- Boolean b = (Boolean)h.get(key);
-
- if (b != null) {
- w.setEnabled(b.booleanValue());
- }
- }
- }
-
- /**
- * Disables all dialog contents, except maybe the cancel button, depending on the given boolean.
- * @param keepCancelEnabled <code>true</code> if cancel button is enabled, <code>false</code> otherwise.
- * @return the saved state.
- */
- private HashMap saveUIState(boolean keepCancelEnabled) {
- HashMap savedState = new HashMap();
-
- saveEnableStateAndSet(cancelButton, savedState, "cancel", keepCancelEnabled); //$NON-NLS-1$
- saveEnableStateAndSet(openButton, savedState, "open", false); //$NON-NLS-1$
- savedState.put("tabForm", ControlEnableState.disable(contents)); //$NON-NLS-1$
-
- return savedState;
- }
-
- /**
- * Saves the enable state of a control and sets it as well.
- * @param w the control whose enable state we want to set and save.
- * @param h the hashmap where the enable state of the control will be saved.
- * @param key the key with which to save the enable state.
- * @param enabled <code>true</code> if control is to be enabled, <code>false</code> otherwise.
- */
- private void saveEnableStateAndSet(Control w, HashMap h, String key, boolean enabled) {
-
- if (!w.isDisposed()) {
- h.put(key, new Boolean(w.isEnabled()));
- w.setEnabled(enabled);
- }
- }
-
-
- // ------------------------------- Handle shell closing ------------------------------
-
- /**
- * Checks to see if there are any long running operations. If there are, a dialog is shown
- * @see org.eclipse.jface.window.Window#handleShellCloseEvent()
- */
- protected void handleShellCloseEvent() {
-
- if (okToClose()) {
- super.handleShellCloseEvent();
- }
- }
-
- /**
- * Checks if any operations are running. If so, shows a message dialog alerting the user, and returns <code>false</code>
- * indicating the dialog should not be closed.
- * @return <code>true</code> if it is ok to close the dialog, <code>false</code> otherwise.
- */
- public boolean okToClose() {
-
- if (activeRunningOperations > 0) {
-
- // get closing dialog
- synchronized (this) {
- windowClosingDialog = createClosingDialog();
- }
-
- // open it
- windowClosingDialog.open();
-
- // make it null
- synchronized (this) {
- windowClosingDialog = null;
- }
-
- // indicate that operations are running, so not ok to close
- return false;
- }
-
- return true;
- }
-
- /**
- * Creates a dialog with the message that the quick open dialog is closing.
- * @return the message dialog.
- */
- private MessageDialog createClosingDialog() {
- MessageDialog result = new MessageDialog(getShell(), JFaceResources.getString("WizardClosingDialog.title"), //$NON-NLS-1$
- null, JFaceResources.getString("WizardClosingDialog.message"), //$NON-NLS-1$
- MessageDialog.QUESTION, new String[] {IDialogConstants.OK_LABEL}, 0);
- return result;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenPageDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenPageDescriptor.java
deleted file mode 100644
index 42c2d859f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenPageDescriptor.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.open;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.StringConverter;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.osgi.framework.Bundle;
-
-
-public class SystemQuickOpenPageDescriptor implements Comparable {
-
- public final static String PAGE_TAG = "page"; //$NON-NLS-1$
- private final static String ID_ATTRIBUTE = "id"; //$NON-NLS-1$
- private final static String ICON_ATTRIBUTE = "icon"; //$NON-NLS-1$
- private final static String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
- private final static String LABEL_ATTRIBUTE = "label"; //$NON-NLS-1$
- private final static String SIZE_ATTRIBUTE = "sizeHint"; //$NON-NLS-1$
- private final static String TAB_POSITION_ATTRIBUTE = "tabPosition"; //$NON-NLS-1$
- // private final static String SSF_ID = "ssfid";
-
- public final static Point UNKNOWN_SIZE = new Point(SWT.DEFAULT, SWT.DEFAULT);
-
- private IConfigurationElement element;
-
- /**
- * Constructor for quick open page descriptor.
- * @param a configuration element.
- */
- public SystemQuickOpenPageDescriptor(IConfigurationElement element) {
- this.element = element;
- }
-
- /**
- * Creates a new quick open page from the descriptor.
- */
- public ISystemQuickOpenPage createObject() {
- ISystemQuickOpenPage result = null;
-
- try {
- result = (ISystemQuickOpenPage)(element.createExecutableExtension(CLASS_ATTRIBUTE));
- }
- catch (CoreException e) {
- SystemBasePlugin.logError("Error trying to create a quick open page from configuration element", e); //$NON-NLS-1$
- return null;
- }
- catch (ClassCastException e) {
- SystemBasePlugin.logError("Error trying to create a quick open page from configuration element", e); //$NON-NLS-1$
- return null;
- }
-
- if (result != null) {
- result.setTitle(getLabel());
- }
-
- return result;
- }
-
-
- // --------------------------------------------------------------
- // XML attributes
- // --------------------------------------------------------------
-
- /**
- * Returns the id of the page.
- * @return the id of the page.
- */
- public String getId() {
- return element.getAttribute(ID_ATTRIBUTE);
- }
-
- /**
- * Returns the label of the page.
- */
- public String getLabel() {
- return element.getAttribute(LABEL_ATTRIBUTE);
- }
-
- /**
- * Returns the image for the page.
- */
- public ImageDescriptor getImage() {
-
- String imageName = element.getAttribute(ICON_ATTRIBUTE);
-
- if (imageName == null) {
- return null;
- }
-
- URL url = null;
-
- try {
- String nameSpace = element.getDeclaringExtension().getNamespace();
- Bundle bundle = Platform.getBundle(nameSpace);
- url = new URL(bundle.getEntry("/"), imageName); //$NON-NLS-1$
- }
- catch (java.net.MalformedURLException e) {
- SystemBasePlugin.logError("Error trying to get image", e); //$NON-NLS-1$
- return null;
- }
-
- return ImageDescriptor.createFromURL(url);
- }
-
- /**
- * Returns the page's preferred size
- */
- public Point getPreferredSize() {
- return StringConverter.asPoint(element.getAttribute(SIZE_ATTRIBUTE), UNKNOWN_SIZE);
- }
-
- /**
- * Returns the page's tab position relative to the other tabs.
- * @return the tab position or <code>Integer.MAX_VALUE</code> if not defined in
- the plugins.xml file
- *
- */
- public int getTabPosition() {
-
- int position = Integer.MAX_VALUE / 2;
-
- String str = element.getAttribute(TAB_POSITION_ATTRIBUTE);
-
- if (str != null) {
-
- try {
- position = Integer.parseInt(str);
- }
- catch (NumberFormatException e) {
- SystemBasePlugin.logError("Error trying to get tab position", e); //$NON-NLS-1$
- }
- }
-
- return position;
- }
-
- /**
- * Returns whether the page is enabled.
- * @return <code>true</code> if the page is enabled, <code>false</code> otherwise.
- */
- public boolean isEnabled() {
- return true;
- }
-
-
- // -----------------------------------------------------------
- // compare
- // -----------------------------------------------------------
-
- /**
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(Object o) {
-
- int myPos = getTabPosition();
- int objsPos = ((SystemQuickOpenPageDescriptor)o).getTabPosition();
-
- if (myPos == Integer.MAX_VALUE && objsPos == Integer.MAX_VALUE || myPos == objsPos) {
- return getLabel().compareTo(((SystemQuickOpenPageDescriptor)o).getLabel());
- }
- else {
- return myPos - objsPos;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUI.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUI.java
deleted file mode 100644
index aa225a649..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUI.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.open;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class SystemQuickOpenUI {
-
- /**
- * Constructor.
- */
- public SystemQuickOpenUI() {
- super();
- }
-
- /**
- * Opens the quick open dialog in the active workbench window.
- * If <code>pageId</code> is specified and a corresponding page is found then it is brought to top.
- * @param pageId the page to select or <code>null</code> if the best fitting page should be selected.
- */
- public static void openSearchDialog(String pageId) {
- openSearchDialog(SystemBasePlugin.getActiveWorkbenchWindow(), pageId);
- }
-
- /**
- * Opens the quick open dialog.
- * If <code>pageId</code> is specified and a corresponding page is found then it is brought to top.
- * @param window the workbench window to open the dialog in.
- * @param pageId the page to select or <code>null</code> if the best fitting page should be selected.
- */
- public static void openSearchDialog(IWorkbenchWindow window, String pageId) {
- new SystemOpenQuickOpenDialogAction(window, pageId).run();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index e258860e6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUtil.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.open;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-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.ui.RSEUIPlugin;
-
-
-/**
- * A utility class for quick open. It is a singleton.
- */
-public class SystemQuickOpenUtil {
-
- public static final String QUICK_OPEN_PAGE_EXTENSION_POINT= "quickOpenPages"; //$NON-NLS-1$
-
- // singleton instance
- private static SystemQuickOpenUtil instance;
-
- // a list of page descriptors
- private List pageDescriptors;
-
- /**
- * Constructor for the utility.
- */
- private SystemQuickOpenUtil() {
- super();
- }
-
- /**
- * Returns the singleton instance.
- * @return the singleton instance.
- */
- public static SystemQuickOpenUtil getInstance() {
-
- if (instance == null) {
- instance = new SystemQuickOpenUtil();
- }
-
- return instance;
- }
-
- /**
- * Returns all quick open pages contributed to the workbench.
- * @param pageId a page id for which a descriptor must be returned.
- * @return a list of quick open page descriptors.
- */
- public List getQuickOpenPageDescriptors(String pageId) {
- Iterator iter = getQuickOpenPageDescriptors().iterator();
- List enabledDescriptors = new ArrayList();
-
- while (iter.hasNext()) {
- SystemQuickOpenPageDescriptor desc = (SystemQuickOpenPageDescriptor)(iter.next());
-
- if (desc.isEnabled() || desc.getId().equals(pageId)) {
- enabledDescriptors.add(desc);
- }
- }
-
- return enabledDescriptors;
- }
-
- /**
- * Returns all quick open pages contributed to the workbench.
- * @return a list of quick open pages.
- */
- public List getQuickOpenPageDescriptors() {
-
- if (pageDescriptors == null) {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] elements = registry.getConfigurationElementsFor(RSEUIPlugin.PLUGIN_ID, QUICK_OPEN_PAGE_EXTENSION_POINT);
- pageDescriptors = createQuickOpenPageDescriptors(elements);
- }
-
- return pageDescriptors;
- }
-
- /**
- * Creates quick open page descriptors.
- * @param an array of elements.
- * @return a list of descriptors that correspond to the given elements.
- */
- private List createQuickOpenPageDescriptors(IConfigurationElement[] elements) {
- List result = new ArrayList();
-
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
-
- if (SystemQuickOpenPageDescriptor.PAGE_TAG.equals(element.getName())) {
- SystemQuickOpenPageDescriptor desc = new SystemQuickOpenPageDescriptor(element);
- result.add(desc);
- }
- }
-
- // sort the list of descriptors
- Collections.sort(result);
-
- return result;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/ISystemRunnableContext.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/ISystemRunnableContext.java
deleted file mode 100644
index f363cf595..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/ISystemRunnableContext.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.operations;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Interface for a system runnable context.
- */
-public interface ISystemRunnableContext {
-
- /**
- * Runs the given runnable in the context of the receiver. By default, the
- * progress is provided by the active workbench window but subclasses may
- * override this to provide progress in some other way (through Progress view using Eclipse Job support).
- */
- public abstract void run(IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException;
-
- /**
- * Returns a shell that can be used to prompt the user.
- * @return a shell.
- */
- public abstract Shell getShell();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/Policy.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/Policy.java
deleted file mode 100644
index f4761cae7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/Policy.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.operations;
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-public class Policy {
-
-
- protected static ResourceBundle bundle = null;
-
- /**
- * Creates a NLS catalog for the given locale.
- */
- public static void localize(String bundleName) {
- bundle = ResourceBundle.getBundle(bundleName);
- }
-
- /**
- * Lookup the message with the given ID in this catalog and bind its
- * substitution locations with the given string.
- */
- public static String bind(String id, String binding) {
- return bind(id, new String[] { binding });
- }
-
- /**
- * Lookup the message with the given ID in this catalog and bind its
- * substitution locations with the given strings.
- */
- public static String bind(String id, String binding1, String binding2) {
- return bind(id, new String[] { binding1, binding2 });
- }
-
- /**
- * Gets a string from the resource bundle. We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- public static String bind(String key) {
- try {
- return bundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Gets a string from the resource bundle and binds it with the given arguments. If the key is
- * not found, return the key.
- */
- public static String bind(String key, Object[] args) {
- try {
- return MessageFormat.format(bind(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Progress monitor helpers
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- cancelOperation();
- }
- public static void cancelOperation() {
- throw new OperationCanceledException();
- }
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- if (monitor == null)
- return new NullProgressMonitor();
- return monitor;
- }
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks, int style) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks, style);
- }
-
-
-
- public static ResourceBundle getBundle() {
- return bundle;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java
deleted file mode 100644
index 4cee48855..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.operations;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.core.subsystems.SubSystem.DisplayErrorMessageJob;
-import org.eclipse.rse.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.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.progress.IElementCollector;
-
-
-/**
- * @author dmcknigh
- */
-public class SystemFetchOperation extends JobChangeAdapter implements IRunnableWithProgress
-{
- protected IWorkbenchPart _part;
- protected IAdaptable _remoteObject;
- protected IElementCollector _collector;
- private IRunnableContext context;
- protected ISystemViewElementAdapter _adapter;
- protected boolean _canRunAsJob;
- protected InvocationTargetException _exc;
-
- public SystemFetchOperation(IWorkbenchPart part, IAdaptable remoteObject, ISystemViewElementAdapter adapter, IElementCollector collector)
- {
- _part = part;
- _remoteObject = remoteObject;
- _collector = collector;
- _adapter = adapter;
- _canRunAsJob = false;
- }
-
- public SystemFetchOperation(IWorkbenchPart part, IAdaptable remoteObject, ISystemViewElementAdapter adapter, IElementCollector collector, boolean canRunAsJob)
- {
- _part = part;
- _remoteObject = remoteObject;
- _collector = collector;
- _adapter = adapter;
- _canRunAsJob = canRunAsJob;
- }
-
- public void setException(InvocationTargetException exc)
- {
- _exc = exc;
- }
-
- /**
- * Return the part that is associated with this operation.
- *
- * @return Returns the part or <code>null</code>
- */
- public IWorkbenchPart getPart() {
- return _part;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public final void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- startOperation();
- try {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- monitor.setTaskName(getTaskName());
- execute(Policy.subMonitorFor(monitor, 100));
- endOperation();
- } catch (Exception e) {
- // TODO: errors may not be empty (i.e. endOperation has not been executed)
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-
- protected void startOperation() {
- //statusCount = 0;
- //resetErrors();
- //confirmOverwrite = true;
- }
-
- protected void endOperation() {
- //handleErrors((IStatus[]) errors.toArray(new IStatus[errors.size()]));
- }
-
-
- public class PromptForPassword implements Runnable
- {
- public SubSystem _ss;
- public PromptForPassword(SubSystem ss)
- {
- _ss = ss;
- }
-
- public void run()
- {
- try
- {
- _ss.promptForPassword();
- }
- catch (Exception e)
- {
-
- }
- }
- }
-
- public class UpdateRegistry implements Runnable
- {
- private SubSystem _ss;
- public UpdateRegistry(SubSystem ss)
- {
- _ss = ss;
- }
-
- public void run()
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.connectedStatusChange(_ss, true, false);
- }
- }
-
- /**
- * Subclasses must override this method to perform the operation.
- * Clients should never call this method directly.
- *
- * @param monitor
- * @throws Exception
- * @throws InterruptedException
- */
- protected void execute(IProgressMonitor monitor) throws Exception, InterruptedException
- {
- SubSystem ss = (SubSystem)_adapter.getSubSystem(_remoteObject);
- synchronized (ss.getConnectorService())
- {
- if (!ss.isConnected())
- {
-
- Display dis = Display.getDefault();
- dis.syncExec(new PromptForPassword(ss));
- try
- {
- ss.getConnectorService().connect(monitor);
- if (_exc != null)
- {
- showOperationErrorMessage(null, _exc, ss);
- }
- }
- catch (InvocationTargetException exc)
- {
- showOperationErrorMessage(null, exc, ss);
- }
- catch (Exception e)
- {
- showOperationErrorMessage(null, e, ss);
- }
-
- dis.asyncExec(new UpdateRegistry(ss));
-
- }
- }
- Object[] children = _adapter.getChildren(monitor, _remoteObject);
- _collector.add(children, monitor);
- monitor.done();
- }
-
- protected void showOperationErrorMessage(Shell shell, Throwable exc, SubSystem ss)
- {
- SystemMessage sysMsg = null;
- if (exc instanceof SystemMessageException)
- {
- displayAsyncMsg(ss, (SystemMessageException)exc);
- //sysMsg = ((SystemMessageException)exc).getSystemMessage();
- }
- else
- {
- String excMsg = exc.getMessage();
- if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + exc.getClass().getName(); //$NON-NLS-1$
- sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED);
- sysMsg.makeSubstitution(excMsg);
-
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, sysMsg);
- msgDlg.setException(exc);
- msgDlg.open();
- //RSEUIPlugin.logError("Operation failed",exc); now done successfully in msgDlg.open()
- }
-
- }
-
- /**
- * Display message on message thread
- */
- protected void displayAsyncMsg(SubSystem ss, org.eclipse.rse.services.clientserver.messages.SystemMessageException msg)
- {
- DisplayErrorMessageJob job = new DisplayErrorMessageJob(null, msg);
- job.setPriority(Job.INTERACTIVE);
- job.setSystem(true);
- job.schedule();
- }
-
- protected String getTaskName()
- {
- return GenericMessages.RSEQuery_task;
- }
-
- /**
- * Run the operation in a context that is determined by the {@link #canRunAsJob()}
- * hint. If this operation can run as a job then it will be run in a background thread.
- * Otherwise it will run in the foreground and block the caller.
- */
- public final void run() throws InvocationTargetException, InterruptedException {
- if (shouldRun()) {
- getRunnableContext().run(this);
- }
- }
-
- /**
- * This method is invoked from the <code>run()</code> method before
- * the operation is run in the operation's context. Subclasses may
- * override in order to perform prechecks to determine if the operation
- * should run. This may include prompting the user for information, etc.
- *
- * @return whether the operation should be run.
- */
- protected boolean shouldRun() {
- return true;
- }
-
- /**
- * Returns the scheduling rule that is to be obtained before this
- * operation is executed by it's context or <code>null</code> if
- * no scheduling rule is to be obtained. If the operation is run
- * as a job, the schdulin rule is used as the schduling rule of the
- * job. Otherwise, it is obtained before execution of the operation
- * occurs.
- * <p>
- * By default, no scheduling
- * rule is obtained. Sublcasses can override to in order ot obtain a
- * scheduling rule or can obtain schduling rules withing their operation
- * if finer grained schduling is desired.
- *
- * @return the schduling rule to be obtained by this operation
- * or <code>null</code>.
- */
- protected ISchedulingRule getSchedulingRule() {
- return null;
- }
-
- /**
- * Return whether the auto-build should be postponed until after
- * the operation is complete. The default is to postpone the auto-build.
- * subclas can override.
- *
- * @return whether to postpone the auto-build while the operation is executing.
- */
- protected boolean isPostponeAutobuild() {
- return true;
- }
-
-
- /**
- * If this operation can safely be run in the background, then subclasses can
- * override this method and return <code>true</code>. This will make their
- * action run in a {@link org.eclipse.core.runtime.Job}.
- * Subsclass that override this method should
- * also override the <code>getJobName()</code> method.
- *
- * @return <code>true</code> if this action can be run in the background and
- * <code>false</code> otherwise.
- */
- protected boolean canRunAsJob() {
- return _canRunAsJob;
- }
-
- /**
- * Return the job name to be used if the action can run as a job. (i.e.
- * if <code>canRunAsJob()</code> returns <code>true</code>).
- *
- * @return the string to be used as the job name
- */
- protected String getJobName() {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * This method is called to allow subclasses to configure an action that could be run to show
- * the results of the action to the user. Default is to return null.
- *
- * @return an action that could be run to see the results of this operation
- */
- protected IAction getGotoAction() {
- return null;
- }
-
- /**
- * This method is called to allow subclasses to configure an icon to show when running this
- * operation.
- *
- * @return an URL to an icon
- */
- protected URL getOperationIcon() {
- return null;
- }
-
- /**
- * This method is called to allow subclasses to have the operation remain in the progress
- * indicator even after the job is done.
- *
- * @return <code>true</code> to keep the operation and <code>false</code> otherwise.
- */
- protected boolean getKeepOperation() {
- return false;
- }
-
- /**
- * Return a shell that can be used by the operation to display dialogs, etc.
- *
- * @return a shell
- */
- protected Shell getShell()
- {
- return SystemBasePlugin.getActiveWorkbenchShell();
- }
-
- private ISystemRunnableContext getRunnableContext() {
- if (context == null && canRunAsJob()) {
- SystemJobRunnableContext context = new SystemJobRunnableContext(getJobName(), getOperationIcon(), getGotoAction(), getKeepOperation(), this, getSite());
- context.setPostponeBuild(isPostponeAutobuild());
- context.setSchedulingRule(getSchedulingRule());
- return context;
- } else {
- SystemProgressDialogRunnableContext context = new SystemProgressDialogRunnableContext(getShell());
- context.setPostponeBuild(isPostponeAutobuild());
- context.setSchedulingRule(getSchedulingRule());
- if (this.context != null) {
- context.setRunnableContext(this.context);
- }
- return context;
- }
- }
-
-
-
-
- private IWorkbenchSite getSite() {
- IWorkbenchSite site = null;
- if(_part != null) {
- site = _part.getSite();
- }
- return site;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 99c19561f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemJobRunnableContext.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.operations;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-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.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-
-/**
- * This runnable context executes its operation in the context of a background job.
- */
-public final class SystemJobRunnableContext implements ISystemRunnableContext {
-
- private IJobChangeListener listener;
- private IWorkbenchSite site;
- private String jobName;
- private ISchedulingRule schedulingRule;
- private boolean postponeBuild;
- private boolean isUser;
- private URL icon;
- private boolean keep;
- private IAction action;
-
- /**
- * Constructor.
- * @param jobName the name of the job.
- */
- public SystemJobRunnableContext(String jobName) {
- this(jobName, null, null, false, null, null);
- }
-
- /**
- * Constructor.
- * @param jobName the name of the job.
- * @param icon the icon for the job.
- * @param action the action for the job.
- * @param keep keep the job in the UI even after it is finished.
- * @param listener listener for job changes.
- * @param site the workbench site.
- */
- public SystemJobRunnableContext(String jobName, URL icon, IAction action, boolean keep, IJobChangeListener listener, IWorkbenchSite site) {
- this.jobName = jobName;
- this.listener = listener;
- this.site = site;
- this.isUser = true;
- this.action = action;
- this.icon = icon;
- this.keep = keep;
- }
-
- /**
- * @see org.eclipse.rse.ui.operations.ISystemRunnableContext#run(org.eclipse.jface.operation.IRunnableWithProgress)
- */
- public void run(IRunnableWithProgress runnable) {
-
- // the job
- Job job;
-
- // if there is no scheduling rule, and auto-builds do not have to be postponed
- // then use a basic job
- if (schedulingRule == null && !postponeBuild) {
- job = getBasicJob(runnable);
- }
- // otherwise we need a workspace job for which a scheduling rule needs to be set
- else {
- job = getWorkspaceJob(runnable);
-
- // set scheduling rule if it exists
- if (schedulingRule != null) {
- job.setRule(schedulingRule);
- }
- }
-
- // add a job change listener if there is one
- if (listener != null) {
- job.addJobChangeListener(listener);
- }
-
- // sets whether the job is user initiated
- job.setUser(isUser());
-
- // configure the job
- configureJob(job);
-
- // schedult the job
- schedule(job, site);
- }
-
- /**
- * Configures the properties of the given job.
- * @param job the job to configure.
- */
- private void configureJob(Job job) {
-
- // whether to keep the job in the UI after the job has finished to report results
- // back to the user
- if(keep) {
- job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
- }
-
- // an action associated with the job if any
- if(action != null) {
- job.setProperty(IProgressConstants.ACTION_PROPERTY, action);
- }
-
- // an icon associated with the job if any
- if(icon != null) {
- job.setProperty(IProgressConstants.ICON_PROPERTY, icon);
- }
- }
-
- /**
- * Returns the shell.
- * @see org.eclipse.rse.ui.operations.ISystemRunnableContext#getShell()
- */
- public Shell getShell() {
- return SystemBasePlugin.getActiveWorkbenchShell();
- }
-
- /**
- * Returns whether auto-builds will be postponed while this
- * context is executing a runnable.
- * @return <code>true</code> if auto-builds will be postponed while this
- * context is executing a runnable, <code>false</code> otherwise.
- */
- public boolean isPostponeBuild() {
- return postponeBuild;
- }
-
- /**
- * Sets whether auto-builds will be postponed while this
- * context is executing a runnable.
- * @param postponeBuild <code>true</code> to postpone auto-builds, <code>false</code> otherwise.
- */
- public void setPostponeBuild(boolean postponeBuild) {
- this.postponeBuild = postponeBuild;
- }
-
- /**
- * Returns the scheduling rule that will be obtained before the context
- * executes a runnable, or <code>null</code> if no scheduling rule is to be obtained.
- * @return the schedulingRule to be used or <code>null</code>.
- */
- public ISchedulingRule getSchedulingRule() {
- return schedulingRule;
- }
-
- /**
- * Returns whether the job created by this runnable context is user initiated.
- * @return <code>true</code> if the job is a result of user initiated actions, <code>false</code> otherwise.
- */
- public boolean isUser() {
- return isUser;
- }
-
- /**
- * Sets wheter the job created by this runnable context is user initiated.
- * By default, the job is a user initiated job.
- * @param isUser <code>true</code> if the job is a result of user initiated actions, <code>false</code> otherwise.
- */
- public void setUser(boolean isUser) {
- this.isUser = isUser;
- }
-
- /**
- * Sets the scheduling rule that will be obtained before the context
- * executes a runnable, or <code>null</code> if no scheduling rule is to be obtained.
- * @param schedulingRule the scheduling rule to be used or <code>null</code>.
- */
- public void setSchedulingRule(ISchedulingRule schedulingRule) {
- this.schedulingRule = schedulingRule;
- }
-
- /**
- * Runs the runnable with the given monitor.
- * @param runnable the runnable.
- * @param monitor the progress monitor.
- * @return the status of running the runnable.
- */
- IStatus run(IRunnableWithProgress runnable, IProgressMonitor monitor) {
-
- // run the runnable
- try {
- runnable.run(monitor);
- }
- catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
- String msg = ""; //$NON-NLS-1$
-
- if (target != null) {
- msg = target.getMessage();
- }
-
- // return an error status
- return new Status(IStatus.ERROR, RSEUIPlugin.getDefault().getSymbolicName(), 0, msg, target);
- }
- catch (InterruptedException e) {
- return Status.OK_STATUS;
- }
-
- return Status.OK_STATUS;
- }
-
- /**
- * Returns a basic job which simply runs the runnable.
- * @param runnable the runnable.
- * @return the basic job.
- */
- private Job getBasicJob(final IRunnableWithProgress runnable) {
- return new Job(jobName) {
- public IStatus run(IProgressMonitor monitor) {
- return SystemJobRunnableContext.this.run(runnable, monitor);
- }
- };
- }
-
- /**
- * Returns a workspace job which simply runs the runnable.
- * @param runnable the runnable.
- * @return the workspace job.
- */
- private Job getWorkspaceJob(final IRunnableWithProgress runnable) {
- return new WorkspaceJob(jobName) {
- public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
- return SystemJobRunnableContext.this.run(runnable, monitor);
- }
- };
- }
-
- /**
- * Schedules the job.
- * @param job the job to schedule.
- * @param site the workbench site.
- */
- public static void schedule(Job job, IWorkbenchSite site) {
-
- if (site != null) {
-
- // get the site progress service
- IWorkbenchSiteProgressService siteProgress = (IWorkbenchSiteProgressService)(site.getAdapter(IWorkbenchSiteProgressService.class));
-
- // if there is one, schedule the job with a half-busy cursor
- if (siteProgress != null) {
- siteProgress.schedule(job, 0, true);
- return;
- }
- }
-
- // if no site progress service, just schedule the job in the job queue
- job.schedule();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemProgressDialogRunnableContext.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemProgressDialogRunnableContext.java
deleted file mode 100644
index 02c827f98..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemProgressDialogRunnableContext.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.operations;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * This runnable context blocks the UI and can therefore have a shell assigned to
- * it (since the shell won't be closed by the user before the runnable completes).
- */
-public class SystemProgressDialogRunnableContext implements ISystemRunnableContext {
-
- private Shell shell;
- private IRunnableContext runnableContext;
- private ISchedulingRule schedulingRule;
- private boolean postponeBuild;
-
- /**
- * Constructor.
- * @param shell the shell for the runnable context.
- */
- public SystemProgressDialogRunnableContext(Shell shell) {
- this.shell = shell;
- }
-
- /**
- * Returns whether the auto-build will be postponed while this
- * context is executing a runnable.
- * @return <code>true</code> if the auto-build will be postponed while this
- * context is executing a runnable, <code>false</code> otherwise.
- */
- public boolean isPostponeBuild() {
- return postponeBuild;
- }
-
- /**
- * Sets whether the auto-build will be postponed while this
- * context is executing a runnable.
- * @param postponeBuild <code>true</code> to postpone the auto-build, <code>false</code< otherwise.
- */
- public void setPostponeBuild(boolean postponeBuild) {
- this.postponeBuild = postponeBuild;
- }
-
- /**
- * Returns the scheduling rule that will be obtained before the context
- * executes a runnable or <code>null</code> if no scheduling rule is to be obtained.
- * @return the scheduling rule to be obtained or <code>null</code>.
- */
- public ISchedulingRule getSchedulingRule() {
- return schedulingRule;
- }
-
- /**
- * Sets the scheduling rule that will be obtained before the context
- * executes a runnable or <code>null</code> if no scheduling rule is to be obtained.
- * @param schedulingRule the scheduling rule to be obtained or <code>null</code>.
- */
- public void setSchedulingRule(ISchedulingRule schedulingRule) {
- this.schedulingRule = schedulingRule;
- }
-
- /**
- * Returns the shell.
- * @see org.eclipse.rse.ui.operations.ISystemRunnableContext#getShell()
- */
- public Shell getShell() {
- return shell;
- }
-
- /**
- * Sets the runnable context that is used to execute the runnable. By default,
- * the workbench's progress service is used, but clients can provide their own.
- * @param runnableContext the runnable contenxt used to execute runnables.
- */
- public void setRunnableContext(IRunnableContext runnableContext) {
- this.runnableContext = runnableContext;
- }
-
- /**
- * Runs the runnable.
- * @see org.eclipse.rse.ui.operations.ISystemRunnableContext#run(org.eclipse.jface.operation.IRunnableWithProgress)
- */
- public void run(IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- // fork and cancellable
- getRunnableContext().run(true, true, wrapRunnable(runnable));
- }
-
- /**
- * Returns the runnable context. If a runnable context was not set, the default is to use the workbench
- * progress service.
- * @return the runnable context.
- */
- private IRunnableContext getRunnableContext() {
-
- // no runnable context set, so we create our default
- if (runnableContext == null) {
-
- return new IRunnableContext() {
-
- public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
-
- // get the workbench progress service
- IProgressService manager = PlatformUI.getWorkbench().getProgressService();
-
- // run the runnable in a non-UI thread and set the cursor to busy
- manager.busyCursorWhile(runnable);
- }
- };
- }
-
- return runnableContext;
- }
-
- /**
- * Wraps the runnable as required and returns the wrapper runnable. If there is no scheduling rule, and
- * auto-builds do not have to be postponed, then the wrapper simply defers to the runnable. Otherwise,
- * we execute the runnable as an atomic workspace operation.
- * @param runnable the runnable to wrap.
- * @return the wrapper runnable.
- */
- private IRunnableWithProgress wrapRunnable(final IRunnableWithProgress runnable) {
-
- // wrap the runnable in another runnable
- return new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-
- try {
-
- // if there is no scheduling rule, and if auto-build does not have to be postponed
- // then simply use the given runnable
- if (schedulingRule == null && !postponeBuild) {
- runnable.run(monitor);
- }
- // otherwise, we need to run taking into account the scheduling rule
- else {
-
- // array for holding exceptions
- final Exception[] exception = new Exception[] { null };
-
- // we run as an atomic workspace operation with a scheduling rule and allow updates
- // create a workspace runnable
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor pm) throws CoreException {
- try {
- // just use the given runnable
- runnable.run(pm);
- }
- catch (InvocationTargetException e) {
- exception[0] = e;
- }
- catch (InterruptedException e) {
- exception[0] = e;
- }
- }
- }, schedulingRule, 0, monitor);
-
- if (exception[0] != null) {
- if (exception[0] instanceof InvocationTargetException) {
- throw (InvocationTargetException)exception[0];
- }
- else if (exception[0] instanceof InterruptedException) {
- throw (InterruptedException)exception[0];
- }
- }
- }
- }
- catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemSchedulingRule.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemSchedulingRule.java
deleted file mode 100644
index 6b2bbb675..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemSchedulingRule.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.operations;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
-/**
- * A simple job scheduling rule for serializing jobs for an ICVSRepositoryLocation
- */
-public class SystemSchedulingRule implements ISchedulingRule {
- IAdaptable _location;
-
- public SystemSchedulingRule(IAdaptable location)
- {
- _location = location;
- }
-
- public boolean isConflicting(ISchedulingRule rule)
- {
- if(rule instanceof SystemSchedulingRule)
- {
- return ((SystemSchedulingRule)rule)._location.equals(_location);
- }
- return false;
- }
-
- public boolean contains(ISchedulingRule rule)
- {
- return isConflicting(rule);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index e294292cb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/AbstractSystemSubSystemPropertyPageCoreForm.java
+++ /dev/null
@@ -1,218 +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.propertypages;
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.wizard.WizardPage;
-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.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-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.ui.dialogs.PropertyPage;
-
-/**
- * The form for the property page for core subsystem properties.
- */
-public abstract class AbstractSystemSubSystemPropertyPageCoreForm
- implements ISystemSubSystemPropertyPageCoreForm
-{
-
- protected Label labelTypePrompt, labelVendorPrompt, labelNamePrompt, labelConnectionPrompt, labelProfilePrompt;
-
- protected Label labelType, labelVendor, labelName, labelConnection, labelProfile;
-
- protected SystemMessage errorMessage;
- protected ResourceBundle rb;
- protected boolean initDone = false;
- protected String xlatedNotApplicable = null;
- // Inputs from caller
- protected ISystemMessageLine msgLine;
- protected Object inputElement;
- protected Shell shell;
- protected Object caller;
- protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog, callerInstanceOfPropertyPage;
-
- /**
- * Constructor
- */
- public AbstractSystemSubSystemPropertyPageCoreForm(ISystemMessageLine msgLine, Object caller)
- {
- super();
- this.msgLine = msgLine;
- this.caller = caller;
- callerInstanceOfWizardPage = (caller instanceof WizardPage);
- callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
- callerInstanceOfPropertyPage = (caller instanceof PropertyPage);
- }
- /**
- * Get the input element
- */
- private Object getElement()
- {
- return inputElement;
- }
- /**
- * Get the shell
- */
- protected Shell getShell()
- {
- return shell;
- }
-
-
-
- /**
- * Create the GUI contents.
- */
- public Control createContents(Composite parent, Object inputElement, Shell shell)
- {
- this.shell = shell;
- this.inputElement = inputElement;
- String labelText = null;
- // Inner composite
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 2);
-
- // Type display
- labelText = SystemWidgetHelpers.appendColon(SystemResources.RESID_SUBSYSTEM_TYPE_LABEL);
- labelTypePrompt = SystemWidgetHelpers.createLabel(composite_prompts, labelText);
- labelType = SystemWidgetHelpers.createLabel(composite_prompts, SystemResources.RESID_SUBSYSTEM_TYPE_VALUE);
-
- // Vendor display
- labelText = SystemWidgetHelpers.appendColon(SystemResources.RESID_SUBSYSTEM_VENDOR_LABEL);
- labelVendorPrompt = SystemWidgetHelpers.createLabel(composite_prompts, labelText);
- labelVendor = SystemWidgetHelpers.createLabel(composite_prompts, " "); //$NON-NLS-1$
-
- // Name display
- labelText = SystemWidgetHelpers.appendColon(SystemResources.RESID_SUBSYSTEM_NAME_LABEL);
- labelNamePrompt = SystemWidgetHelpers.createLabel(composite_prompts, labelText);
- labelName = SystemWidgetHelpers.createLabel(composite_prompts, " "); //$NON-NLS-1$
-
- // Connection display
- labelText = SystemWidgetHelpers.appendColon(SystemResources.RESID_SUBSYSTEM_CONNECTION_LABEL);
- labelConnectionPrompt = SystemWidgetHelpers.createLabel(composite_prompts, labelText);
- labelConnection = SystemWidgetHelpers.createLabel(composite_prompts, " "); //$NON-NLS-1$
-
- // Profile display
- labelText = SystemWidgetHelpers.appendColon(SystemResources.RESID_SUBSYSTEM_PROFILE_LABEL);
- labelProfilePrompt = SystemWidgetHelpers.createLabel(composite_prompts, labelText);
- labelProfile = SystemWidgetHelpers.createLabel(composite_prompts, " "); //$NON-NLS-1$
-
- createInner(composite_prompts, inputElement, shell);
-
- return composite_prompts;
- }
-
- /**
- * Return control to recieve initial focus
- */
- public Control getInitialFocusControl()
- {
- return null;
- }
- /**
- * Get the input subsystem object
- */
- protected ISubSystem getSubSystem()
- {
- Object element = getElement();
- if (element instanceof ISubSystem)
- return (ISubSystem)element;
- else
- return null;
- }
-
-
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- ISubSystem ss = getSubSystem();
- ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration();
-
- //getPortValidator();
- // vendor
- labelVendor.setText(ssFactory.getVendor());
- // name
- labelName.setText(ss.getName());
- // connection
- labelConnection.setText(ss.getHostAliasName());
- // profile
- labelProfile.setText(ss.getSystemProfileName());
-
- doInitializeInnerFields();
- }
-
-
-
-
-
-
- /**
- * 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;
- return pageComplete;
- }
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- boolean complete = isPageComplete();
- if (callerInstanceOfWizardPage)
- {
- ((WizardPage)caller).setPageComplete(complete);
- }
- else if (callerInstanceOfSystemPromptDialog)
- {
- ((SystemPromptDialog)caller).setPageComplete(complete);
- }
- else if (callerInstanceOfPropertyPage)
- {
- ((PropertyPage)caller).setValid(complete);
- }
- }
-
-
-
-
-
-
- /*
- * Create the inner portion of the contents. These include any additional fields for the subsystem
- */
- protected abstract Control createInner(Composite parent, Object inputElement, Shell shell);
-
- /*
- * Initialize the inner portion of the contents. These include any additional fields for the subsystem
- */
- protected abstract void doInitializeInnerFields();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemConnectionWizardErrorUpdater.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemConnectionWizardErrorUpdater.java
deleted file mode 100644
index 9391d4d61..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemConnectionWizardErrorUpdater.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 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.propertypages;
-import org.eclipse.rse.ui.ISystemVerifyListener;
-
-/**
- * @author mjberger
- */
-public interface ISystemConnectionWizardErrorUpdater
-{
- public boolean isPageComplete();
- public void addVerifyListener(ISystemVerifyListener listener);
- public String getTheErrorMessage();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemConnectionWizardPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemConnectionWizardPropertyPage.java
deleted file mode 100644
index 8c4ca3085..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemConnectionWizardPropertyPage.java
+++ /dev/null
@@ -1,32 +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.propertypages;
-
-
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * interface for a property page that can be shown in the new connection wizard
- */
-public interface ISystemConnectionWizardPropertyPage
-{
- public boolean applyValues(IConnectorService subsystem);
- public void setSubSystemConfiguration(ISubSystemConfiguration factory);
- public void setHostname(String hostname);
- public void setSystemType(String systemType);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemSubSystemPropertyPageCoreForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemSubSystemPropertyPageCoreForm.java
deleted file mode 100644
index d72999205..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ISystemSubSystemPropertyPageCoreForm.java
+++ /dev/null
@@ -1,48 +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.propertypages;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * interface for a property page that can be shown in the new connection wizard
- */
-public interface ISystemSubSystemPropertyPageCoreForm
-{
- /**
- * Create the GUI contents.
- */
- public Control createContents(Composite parent, Object inputElement, Shell shell);
-
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk();
-
- /**
- * Validate the form
- * <p>
- * Subclasses should override to do full error checking on all
- * the widgets on the form.
- */
- public boolean verifyFormContents();
-} \ No newline at end of file
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
deleted file mode 100644
index 4470e8368..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java
+++ /dev/null
@@ -1,702 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-
-import java.util.Hashtable;
-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.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-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;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * Root preference page for Remote Systems Plugin
- */
-public class RemoteSystemsPreferencePage
- extends FieldEditorPreferencePage implements IWorkbenchPreferencePage,
- ISystemPreferencesConstants
-{
- private SystemBooleanFieldEditor showFilterPoolsEditor;
- private SystemBooleanFieldEditor qualifyConnectionNamesEditor;
- private SystemBooleanFieldEditor rememberStateEditor;
- private SystemBooleanFieldEditor useDeferredQueryEditor;
-
- // yantzi: artemis 60, restore from cache when available
- private SystemBooleanFieldEditor restoreFromCache;
- private Composite innerComposite;
-
- private SystemTypeFieldEditor systemTypesEditor;
- private SystemBooleanFieldEditor showNewConnectionPromptEditor;
- private boolean lastShowFilterPoolsValue = false;
- private boolean lastQualifyConnectionNamesValue = false;
- private boolean lastRememberStateValue = true; // changed in R2 by Phil. Not sure about migration!
-// private boolean lastRestoreFromCacheValue = true; // yantzi: new in artemis 6.0
- private boolean lastShowNewConnectionPromptValue = true;
- private boolean lastUseDeferredQueryValue = false;
-
- /**
- * Constructor
- */
- public RemoteSystemsPreferencePage()
- {
- super(GRID);
- setTitle(SystemResources.RESID_PREF_ROOT_PAGE);
- setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore());
-// setDescription(SystemResources.RESID_PREF_ROOT_TITLE); // removed since this is not read by screen reader
- }
- /**
- * We intercept to set the help
- */
- public void createControl(Composite parent)
- {
- super.createControl(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), RSEUIPlugin.HELPPREFIX+"rsep0000"); //$NON-NLS-1$
- }
-
- /**
- * GUI widgets for preferences page
- */
- protected void createFieldEditors()
- {
- // DEFAULT SYSTEM TYPE
- SystemComboBoxFieldEditor systemTypeEditor = new SystemComboBoxFieldEditor(
- ISystemPreferencesConstants.SYSTEMTYPE,
- SystemResources.RESID_PREF_SYSTEMTYPE_PREFIX_LABEL,
- RSECorePlugin.getDefault().getRegistry().getSystemTypeNames(),
- true, // readonly
- getFieldEditorParent()
- );
- systemTypeEditor.setToolTipText(SystemResources.RESID_PREF_SYSTEMTYPE_PREFIX_TOOLTIP);
- addField(systemTypeEditor);
-
- // ENABLED STATE AND DEFAULT USERID PER SYSTEM TYPE
- systemTypesEditor = new SystemTypeFieldEditor(
- ISystemPreferencesConstants.SYSTEMTYPE_VALUES,
- SystemResources.RESID_PREF_USERID_PERTYPE_PREFIX_LABEL,
- getFieldEditorParent()
- );
- addField(systemTypesEditor);
- systemTypesEditor.setToolTipText(SystemResources.RESID_PREF_USERID_PERTYPE_PREFIX_TOOLTIP);
-
- // QUALIFY CONNECTION NAMES
- qualifyConnectionNamesEditor = new SystemBooleanFieldEditor(
- ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES,
- SystemResources.RESID_PREF_QUALIFYCONNECTIONNAMES_PREFIX_LABEL,
- getFieldEditorParent()
- );
- addField(qualifyConnectionNamesEditor);
- qualifyConnectionNamesEditor.setToolTipText(SystemResources.RESID_PREF_QUALIFYCONNECTIONNAMES_PREFIX_TOOLTIP);
- lastQualifyConnectionNamesValue = getPreferenceStore().getBoolean(qualifyConnectionNamesEditor.getPreferenceName());
-
- // SHOW FILTER POOLS
- showFilterPoolsEditor = new SystemBooleanFieldEditor(
- ISystemPreferencesConstants.SHOWFILTERPOOLS,
- SystemResources.RESID_PREF_SHOWFILTERPOOLS_PREFIX_LABEL,
- getFieldEditorParent()
- );
- addField(showFilterPoolsEditor);
- showFilterPoolsEditor.setToolTipText(SystemResources.RESID_PREF_SHOWFILTERPOOLS_PREFIX_TOOLTIP);
- lastShowFilterPoolsValue = getPreferenceStore().getBoolean(showFilterPoolsEditor.getPreferenceName());
-
- // SHOW "NEW CONNECTION..." PROMPT INSIDE REMOTE SYSTEMS VIEW
- showNewConnectionPromptEditor = new SystemBooleanFieldEditor(
- ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT,
- SystemResources.RESID_PREF_SHOWNEWCONNECTIONPROMPT_PREFIX_LABEL,
- getFieldEditorParent()
- );
- addField(showNewConnectionPromptEditor);
- showNewConnectionPromptEditor.setToolTipText(SystemResources.RESID_PREF_SHOWNEWCONNECTIONPROMPT_PREFIX_TOOLTIP);
- lastShowNewConnectionPromptValue = getPreferenceStore().getBoolean(showNewConnectionPromptEditor.getPreferenceName());
-
- // REMEMBER STATE
- rememberStateEditor = new SystemBooleanFieldEditor(
- ISystemPreferencesConstants.REMEMBER_STATE,
- SystemResources.RESID_PREF_REMEMBERSTATE_PREFIX_LABEL,
- getFieldEditorParent()
- );
- addField(rememberStateEditor);
- rememberStateEditor.setToolTipText(SystemResources.RESID_PREF_REMEMBERSTATE_PREFIX_TOOLTIP);
- lastRememberStateValue = getPreferenceStore().getBoolean(rememberStateEditor.getPreferenceName());
-
- // Restore from cache
- innerComposite = SystemWidgetHelpers.createComposite(getFieldEditorParent(), SWT.NULL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalIndent = 20;
- innerComposite.setLayoutData(gd);
- restoreFromCache = new SystemBooleanFieldEditor(
- ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE,
- SystemResources.RESID_PREF_RESTOREFROMCACHE_PREFIX_LABEL,
- innerComposite
- );
- restoreFromCache.setEnabled(lastRememberStateValue, innerComposite);
- addField(restoreFromCache);
- restoreFromCache.setToolTipText(SystemResources.RESID_PREF_RESTOREFROMCACHE_PREFIX_TOOLTIP);
-// lastRestoreFromCacheValue = getPreferenceStore().getBoolean(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE);
-
-
- // USE DEFERRED QUERY
- useDeferredQueryEditor = new SystemBooleanFieldEditor(
- ISystemPreferencesConstants.USE_DEFERRED_QUERIES,
- SystemResources.RESID_PREF_USEDEFERREDQUERIES_PREFIX_LABEL,
- getFieldEditorParent())
- ;
- useDeferredQueryEditor.setEnabled(false); // disable this because we want it always to be true
- addField(useDeferredQueryEditor);
- useDeferredQueryEditor.setToolTipText(SystemResources.RESID_PREF_USEDEFERREDQUERIES_PREFIX_TOOLTIP);
- lastUseDeferredQueryValue = true; // enforcing this to true now
- //getPreferenceStore().getBoolean(useDeferredQueryEditor.getPreferenceName());
-
-
- /** FIXME - UDA should not be so coupled to core
- * might need a new preference page for this
- // CASCADE USER-DEFINED ACTIONS BY PROFILE
- SystemBooleanFieldEditor cascadeUDAsEditor = new SystemBooleanFieldEditor(
- ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE,
- SystemUDAResources.RESID_PREF_UDAS_CASCADEBYPROFILE_LABEL,
- getFieldEditorParent()
- );
- addField(cascadeUDAsEditor);
- cascadeUDAsEditor.setToolTipText(SystemUDAResources.RESID_PREF_UDAS_CASCADEBYPROFILE_TOOLTIP);
- lastCascadeUDAsValue = getPreferenceStore().getBoolean(cascadeUDAsEditor.getPreferenceName());
- **/
- // set mnemonics
- (new Mnemonics()).setOnPreferencePage(true).setMnemonics(getFieldEditorParent());
-
- }
-
- // ---------------------------------------------------------
- // GETTERS/SETTERS FOR EACH OF THE USER PREFERENCE VALUES...
- // ---------------------------------------------------------
- // DWD these preferences methods should be moved to SystemPreferencesManager since they are not a proper function of a preference page.
- /**
- * Return the names of the profiles the user has elected to make "active".
- */
- public static String[] getActiveProfiles()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- return parseStrings(store.getString(ISystemPreferencesConstants.ACTIVEUSERPROFILES));
- }
-
- /**
- * Set the names of the profiles the user has elected to make "active".
- */
- public static void setActiveProfiles(String[] newProfileNames)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.ACTIVEUSERPROFILES, makeString(newProfileNames));
- savePreferenceStore();
- }
-
- /**
- * Return the ordered list of connection names. This is how user arranged his connections in the system view.
- */
- public static String[] getConnectionNamesOrder()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return parseStrings(store.getString(ISystemPreferencesConstants.ORDER_CONNECTIONS));
- }
- /**
- * Set the ordered list of connection names. This is how user arranged his connections in the system view.
- */
- public static void setConnectionNamesOrder(String[] newConnectionNamesOrder)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.ORDER_CONNECTIONS, makeString(newConnectionNamesOrder));
- savePreferenceStore();
- }
- /**
- * Return true if the user has elected to show filter pools in the Remote System Explorer view
- */
- public static boolean getShowFilterPoolsPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.SHOWFILTERPOOLS);
- }
- /**
- * Toggle whether to show filter pools in the Remote System Explorer view
- */
- public static void setShowFilterPoolsPreference(boolean show)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.SHOWFILTERPOOLS,show);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to show the "New Connection..." prompt in the Remote Systems view
- */
- public static boolean getShowNewConnectionPromptPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- boolean value = store.getBoolean(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT);
- return value;
- }
- /**
- * Toggle whether to show filter pools in the Remote System Explorer view
- */
- public static void setShowNewConnectionPromptPreference(boolean show)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT,show);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to show connection names qualified by profile
- */
- public static boolean getQualifyConnectionNamesPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES);
- }
- /**
- * Set if the user has elected to show connection names qualified by profile
- */
- public static void setQualifyConnectionNamesPreference(boolean set)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES,set);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to remember the state of the Remote Systems view
- */
- public static boolean getRememberStatePreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.REMEMBER_STATE);
- }
- /**
- * Set if the user has elected to show connection names qualified by profile
- */
- public static void setRememberStatePreference(boolean set)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.REMEMBER_STATE,set);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to restore the state of the Remote Systems view from cached information
- */
- public static boolean getRestoreStateFromCachePreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE);
- }
-
- /**
- * Set if the user has elected to restore the state of the Remote Systems view from cached information
- */
- public static void setRestoreStateFromCachePreference(boolean set)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE, set);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to show user defined actions cascaded by profile
- */
- public static boolean getCascadeUserActionsPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE);
- }
- /**
- * Set if the user has elected to show user defined actions cascaded by profile
- */
- public static void setCascadeUserActionsPreference(boolean set)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE,set);
- savePreferenceStore();
- }
- /**
- * Return the userId to default to on the Create Connection wizard, per the given system type.
- *
- * @see SystemConnectionForm
- */
- public static String getUserIdPreference(String systemType)
- {
- if (systemType == null)
- return null;
-
- IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemType);
- Object adapter = sysType.getAdapter(IRSESystemType.class);
- if (adapter instanceof RSESystemTypeAdapter)
- {
- RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)adapter;
- return sysTypeAdapter.getDefaultUserId(sysType);
- }
- else
- return null;
- }
-
- /**
- * Set the default userId per the given system type.
- */
- public static void setUserIdPreference(String systemType, String 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 = 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 systemTypes extension points already
- }
- else
- {
- keyValues = parseString(value);
- }
-
- String defaultUserId = sysTypeAdapter.getDefaultUserId(sysType);
-
- if (defaultUserId == null) {
- defaultUserId = "null"; //$NON-NLS-1$
- }
-
- keyValues.put(sysType.getName(), "" + sysTypeAdapter.isEnabled(sysType) + SystemTypeFieldEditor.EACHVALUE_DELIMITER + defaultUserId); //$NON-NLS-1$
- String s = SystemTypeFieldEditor.createString(keyValues);
-
- if (s != null)
- RSEUIPlugin.getDefault().getPreferenceStore().setValue(ISystemPreferencesConstants.SYSTEMTYPE_VALUES, s);
-
- savePreferenceStore();
- }
-
-
-// /**
-// * Return the hashtable where the key is a string identifying a particular object, and
-// * the value is the user Id for that object.
-// */
-// public static Hashtable getUserIdsPerKey() // DWD remove this later
-// {
-// IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
-// Hashtable keyValues = null;
-// String value = store.getString(ISystemPreferencesConstants.USERIDPERKEY);
-// if (value != null)
-// keyValues = parseString(value);
-// else
-// {
-// keyValues = new Hashtable();
-// }
-// return keyValues;
-// }
-// /**
-// * Set/store the user ids that are saved keyed by some key.
-// */
-// public static void setUserIdsPerKey(Hashtable uidsPerKey) // DWD remove this later
-// {
-// IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
-// store.setValue(ISystemPreferencesConstants.USERIDPERKEY, makeString(uidsPerKey));
-// savePreferenceStore();
-// }
-
- /**
- * Return the System type to default to on the Create Connection wizard.
- *
- * @see SystemConnectionForm
- */
- public static String getSystemTypePreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getString(ISystemPreferencesConstants.SYSTEMTYPE);
- }
-
- /**
- * Return the history for the folder combo box widget
- */
- public static String[] getFolderHistory()
- {
- return getWidgetHistory(ISystemPreferencesConstants.HISTORY_FOLDER);
- }
- /**
- * Set the history for the folder combo box widget.
- */
- public static void setFolderHistory(String[] newHistory)
- {
- setWidgetHistory(ISystemPreferencesConstants.HISTORY_FOLDER, newHistory);
- }
- /**
- * Return the history for a widget given an arbitrary key uniquely identifying it
- */
- public static String[] getWidgetHistory(String key)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return parseStrings(store.getString(key));
- }
- /**
- * Set the history for a widget given an arbitrary key uniquely identifying it.
- */
- public static void setWidgetHistory(String key, String[] newHistory)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(key, makeString(newHistory));
- savePreferenceStore();
- }
-
-
- // -------------------------------------------------
- // MISCELLANEOUS METHODS...
- // -------------------------------------------------
-
- /**
- * Parse out list of key-value pairs into a hashtable
- */
- protected static Hashtable parseString(String allvalues)
- {
- StringTokenizer tokens = new StringTokenizer(allvalues, "=;"); //$NON-NLS-1$
- Hashtable keyValues = new Hashtable(10);
- int count = 0;
- String token1=null;
- String token2=null;
- while (tokens.hasMoreTokens())
- {
- count++;
- if ((count % 2) == 0) // even number
- {
- token2 = tokens.nextToken();
- keyValues.put(token1, token2);
- }
- else
- token1 = tokens.nextToken();
- }
- return keyValues;
- }
- /**
- * Convert hashtable of key-value pairs into a single string
- */
-// protected static String makeString(Hashtable keyValues) DWD remove this later
-// {
-// Enumeration keys = keyValues.keys();
-// StringBuffer sb = new StringBuffer();
-// while (keys.hasMoreElements())
-// {
-// String key = (String)keys.nextElement();
-// String value = (String)keyValues.get(key);
-// if ((value != null) && (value.length()>0))
-// {
-// sb.append(key);
-// sb.append('=');
-// sb.append(value);
-// sb.append(';');
-// }
-// }
-// return sb.toString();
-// }
-
- /**
- * Parse out list of multiple values into a string array per value
- */
- protected static String[] parseStrings(String allvalues)
- {
- if (allvalues == null)
- return new String[0];
- //StringTokenizer tokens = new StringTokenizer(allvalues, ";");
- String[] tokens = allvalues.split(";"); //$NON-NLS-1$
- return tokens;
- /*
- Vector v = new Vector();
- int idx=0;
- while (tokens.hasMoreTokens())
- v.addElement(tokens.nextToken());
- String keyValues[] = new String[v.size()];
- for (idx=0;idx<v.size();idx++)
- keyValues[idx] = (String)v.elementAt(idx);
- return keyValues;
- */
- }
- /**
- * Make a single string out of an array of strings
- */
- protected static String makeString(String[] values)
- {
- StringBuffer allValues = new StringBuffer();
- boolean first = true;
- for (int idx=0; idx<values.length; idx++)
- {
- if (values[idx] != null)
- {
- if (!first)
- {
- allValues = allValues.append(';');
- }
- allValues.append(values[idx]);
- first = false;
- }
- }
- return allValues.toString();
- }
-
- /**
- * Save the preference store.
- */
- private static void savePreferenceStore()
- {
- /* plugin preferences and preference stores are actually the same store and are flushed to disk using this call */
- RSEUIPlugin.getDefault().savePluginPreferences();
- }
-
- public void init(IWorkbench workbench)
- {
- }
-
- /**
- * Initialize our preference store with our defaults.
- * This is called in RSEUIPlugin.initializeDefaultPreferences
- */
- public static void initDefaults(IPreferenceStore store, boolean showNewConnectionPromptDefault)
- {
- store.setDefault(ISystemPreferencesConstants.SYSTEMTYPE, ISystemPreferencesConstants.DEFAULT_SYSTEMTYPE);
- store.setDefault(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES, ISystemPreferencesConstants.DEFAULT_QUALIFY_CONNECTION_NAMES);
- store.setDefault(ISystemPreferencesConstants.SHOWFILTERPOOLS, ISystemPreferencesConstants.DEFAULT_SHOWFILTERPOOLS);
-
- String defaultProfileNames = ISystemPreferencesConstants.DEFAULT_ACTIVEUSERPROFILES;
- String userProfileName = SystemProfileManager.getDefaultPrivateSystemProfileName();
- defaultProfileNames += ";" + userProfileName; //$NON-NLS-1$
-
-
- store.setDefault(ISystemPreferencesConstants.ACTIVEUSERPROFILES, defaultProfileNames);
- store.setDefault(ISystemPreferencesConstants.ORDER_CONNECTIONS, ISystemPreferencesConstants.DEFAULT_ORDER_CONNECTIONS);
- store.setDefault(ISystemPreferencesConstants.HISTORY_FOLDER, ISystemPreferencesConstants.DEFAULT_HISTORY_FOLDER);
- store.setDefault(ISystemPreferencesConstants.REMEMBER_STATE, ISystemPreferencesConstants.DEFAULT_REMEMBER_STATE);
- store.setDefault(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE, ISystemPreferencesConstants.DEFAULT_RESTORE_STATE_FROM_CACHE);
- store.setDefault(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT, showNewConnectionPromptDefault);
- store.setDefault(ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE, ISystemPreferencesConstants.DEFAULT_CASCADE_UDAS_BYPROFILE);
-
- store.setDefault(ISystemPreferencesConstants.USE_DEFERRED_QUERIES, ISystemPreferencesConstants.DEFAULT_USE_DEFERRED_QUERIES);
- }
-
- /**
- * we don't use this after all because it causes an event to be fired as the
- * user makes each change. We prefer to wait until Apply or Defaults are pressed.
- */
- public void propertyChange(PropertyChangeEvent event)
- {
-
- // yantzi: artemis 6.0
- if (event.getSource() == rememberStateEditor)
- {
- Object newValue = event.getNewValue();
- if (newValue instanceof Boolean)
- {
- restoreFromCache.setEnabled(((Boolean) newValue).booleanValue(), innerComposite);
- }
- }
-
- super.propertyChange(event);
- }
-
- /**
- * Override of parent so we can fire changes to our views
- */
- public boolean performOk()
- {
- boolean ok = super.performOk();
- savePreferenceStore(); // better save to disk, just in case.
- if (!RSEUIPlugin.getDefault().isSystemRegistryActive())
- return ok;
- if (showFilterPoolsEditor != null)
- {
- boolean newValue = showFilterPoolsEditor.getBooleanValue();
- if (newValue != lastShowFilterPoolsValue)
- {
- RSEUIPlugin.getDefault().getSystemRegistry().setShowFilterPools(newValue);
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_SHOWFILTERPOOLS,lastShowFilterPoolsValue,newValue);
- }
- lastShowFilterPoolsValue = newValue;
- }
- if (showNewConnectionPromptEditor != null)
- {
- boolean newValue = showNewConnectionPromptEditor.getBooleanValue();
- if (newValue != lastShowNewConnectionPromptValue)
- {
- RSEUIPlugin.getDefault().getSystemRegistry().setShowNewHostPrompt(newValue);
- }
- lastShowNewConnectionPromptValue = newValue;
- }
- if (qualifyConnectionNamesEditor != null)
- {
- boolean newValue = qualifyConnectionNamesEditor.getBooleanValue();
- if (newValue != lastQualifyConnectionNamesValue)
- {
- RSEUIPlugin.getDefault().getSystemRegistry().setQualifiedHostNames(newValue);
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_QUALIFYCONNECTIONNAMES,lastQualifyConnectionNamesValue,newValue);
- }
- lastQualifyConnectionNamesValue = newValue;
- }
- if (rememberStateEditor != null)
- {
- boolean newValue = rememberStateEditor.getBooleanValue();
- if (newValue != lastRememberStateValue)
- {
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_RESTORESTATE,lastRememberStateValue,newValue);
- }
- lastRememberStateValue = newValue;
- }
- if (useDeferredQueryEditor != null)
- {
- boolean newValue = useDeferredQueryEditor.getBooleanValue();
- if (newValue != lastUseDeferredQueryValue)
- {
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_RESTORESTATE,lastUseDeferredQueryValue,newValue);
- }
- lastUseDeferredQueryValue = newValue;
- }
-
- return ok;
- }
-
- /**
- * Fire a preference change event
- */
- private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue)
- {
- RSEUIPlugin.getDefault().getSystemRegistry().fireEvent(
- new SystemPreferenceChangeEvent(type,
- oldValue ? Boolean.TRUE : Boolean.FALSE,
- newValue ? Boolean.TRUE : Boolean.FALSE));
- }
-} \ No newline at end of file
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
deleted file mode 100644
index bac0336fb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerConnectionSecurityPropertyPage.java
+++ /dev/null
@@ -1,125 +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.propertypages;
-
-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.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;
-import org.eclipse.swt.widgets.Control;
-
-
-public class ServerConnectionSecurityPropertyPage extends SystemBasePropertyPage implements ISystemConnectionWizardPropertyPage
-{
-
-
- private ServerConnectionSecurityForm _form;
-
- public ServerConnectionSecurityPropertyPage()
- {
- super();
- }
-
- /**
- * @see org.eclipse.rse.ui.propertypages.SystemBasePropertyPage#createContentArea(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- // Create property page UI
- _form = new ServerConnectionSecurityForm(getShell(), getMessageLine());
- _form.createContents(parent);
-
- initialize();
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "ssls0001"); //$NON-NLS-1$
-
- return parent;
- }
-
- /**
- * @see org.eclipse.rse.ui.propertypages.SystemBasePropertyPage#verifyPageContents()
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- private void initialize()
- {
- IPreferenceStore prefStore = RSEUIPlugin.getDefault().getPreferenceStore();
-
- boolean alertSSL = prefStore.getBoolean(ISystemPreferencesConstants.ALERT_SSL);
- boolean alertNonSSL = prefStore.getBoolean(ISystemPreferencesConstants.ALERT_NONSSL);
-
- // 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();
- if (!hasProvider)
- {
- _form.disable();
- }
- else
- {
- _form.enable();
- }
- }
-
- /**
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk()
- {
- Object subsystem = getElement();
-
- if (subsystem instanceof ISubSystem)
- {
- return applyValues(((ISubSystem)subsystem).getConnectorService());
- }
- return true;
- }
-
- public void setSubSystemConfiguration(ISubSystemConfiguration factory)
- {
- }
-
- public boolean applyValues(IConnectorService connectorService)
- {
- 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;
- }
-
- public void setHostname(String name)
- {
- }
-
- public void setSystemType(String systemType)
- {
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerLauncherPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerLauncherPropertyPage.java
deleted file mode 100644
index 43acd85d7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerLauncherPropertyPage.java
+++ /dev/null
@@ -1,184 +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.propertypages;
-
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.ISystemVerifyListener;
-import org.eclipse.rse.ui.widgets.IServerLauncherForm;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-/**
- * Property page for editing persistant environment variables for an
- * RSE connection.
- */
-public class ServerLauncherPropertyPage extends SystemBasePropertyPage implements ISystemConnectionWizardPropertyPage, ISystemConnectionWizardErrorUpdater
-{
-
- private IServerLauncherForm _form;
- protected String _systemType;
- private IServerLauncherProperties sl;
- private ISubSystemConfiguration _factory;
-
- /**
- * Constructor for ServerLauncherPropertyPage.
- */
- public ServerLauncherPropertyPage()
- {
- super();
- }
-
- /**
- * @see org.eclipse.rse.ui.propertypages.SystemBasePropertyPage#createContentArea(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
-
- ISubSystemConfiguration factory = null;
- Object input = getElement();
- IConnectorService connectorService = null;
- if (input instanceof ISubSystem)
- {
- ISubSystem ss = (ISubSystem)input;
- connectorService = ss.getConnectorService();
- sl = connectorService.getRemoteServerLauncherProperties();
- factory = ss.getSubSystemConfiguration();
- }
- else if (input instanceof ISubSystemConfiguration)
- {
- factory = (ISubSystemConfiguration)input;
- }
- else
- {
- factory =_factory;
- }
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)factory.getAdapter(ISubSystemConfigurationAdapter.class);
- _form = adapter.getServerLauncherForm(factory, getShell(), getMessageLine());
-
- // Create property page UI
- _form.createContents(parent);
- if (sl != null)
- {
- _form.setHostname(connectorService.getHost().getHostName());
- _form.initValues(sl);
- }
-
- return parent;
- }
-
- /**
- * @see org.eclipse.rse.ui.propertypages.SystemBasePropertyPage#verifyPageContents()
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- public void setSubSystemConfiguration(ISubSystemConfiguration factory)
- {
- _factory = factory;
- }
-
- public void setHostname(String hostName)
- {
- _form.setHostname(hostName);
- }
-
- public boolean applyValues(IConnectorService connectorService)
- {
- if (_form == null)
- return true;
-
- if (getElement() instanceof SubSystem)
- {
- SubSystem ss = (SubSystem)getElement();
- if (!ss.getConnectorService().supportsServerLaunchProperties())
- {
- return true;
- }
- }
-
- if (_form.verify())
- {
- if (sl == null)
- {
- sl = connectorService.getRemoteServerLauncherProperties();
- }
-
- if (_form.updateValues(sl))
- {
- try
- {
- connectorService.commit();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return true;
- }
- }
- return false;
- }
-
- /**
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk()
- {
- if (_form.isDirty())
- {
- return applyValues(sl.getConnectorService());
- }
- return true;
- }
-
- public boolean isPageComplete()
- {
- if (_form.isDirty())
- {
- return _form.verify();
- }
- else
- {
- return true;
- }
- }
-
- public void addVerifyListener(ISystemVerifyListener listener)
- {
- if (_form instanceof ISystemConnectionWizardErrorUpdater)
- ((ISystemConnectionWizardErrorUpdater)_form).addVerifyListener(listener);
- }
-
- public String getTheErrorMessage()
- {
- return getErrorMessage();
- }
-
- public void setSystemType(String systemType)
- {
- _systemType = systemType;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java
deleted file mode 100644
index 5674bf1a5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.ui.widgets.services.FactoryServiceElement;
-import org.eclipse.rse.ui.widgets.services.RootServiceElement;
-import org.eclipse.rse.ui.widgets.services.ServiceElement;
-import org.eclipse.rse.ui.widgets.services.ServicesForm;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-public abstract class ServicesPropertyPage extends SystemBasePropertyPage
-{
- protected ServicesForm _form;
- protected String _hostname;
- protected String _hosttype;
- protected ServiceElement _rootElement;
-
- protected Control createContentArea(Composite parent)
- {
- _form = new ServicesForm(getMessageLine());
- _form.createContents(parent);
-
- // init services
- initServices();
-
- return parent;
- }
-
-
- protected boolean verifyPageContents()
- {
- return _form.verify();
- }
-
- protected void initServices()
- {
- ServiceElement[] elements = getServiceElements();
- _rootElement = new RootServiceElement(elements);
- _form.init(_rootElement);
- }
-
- protected IServiceSubSystem getServiceSubSystem()
- {
- return (IServiceSubSystem)getElement();
- }
-
- protected abstract ServiceElement[] getServiceElements();
- protected abstract IServiceSubSystemConfiguration getCurrentServiceSubSystemConfiguration();
-
- public boolean performOk()
- {
- boolean result = super.performOk();
- if (result)
- {
- commitChanges();
- return applyValues(getServiceSubSystem().getConnectorService());
- }
- else
- {
- return result;
- }
- }
-
- protected void commitChanges()
- {
- _rootElement.commit();
- }
-
- protected void revertChanges()
- {
- _rootElement.revert();
- }
-
- public boolean applyValues(IConnectorService connectorService)
- {
-
-
- FactoryServiceElement selectedService = (FactoryServiceElement)_form.getSelectedService();
-
- IServiceSubSystemConfiguration factory = selectedService.getFactory();
- IServiceSubSystemConfiguration currentFactory = getCurrentServiceSubSystemConfiguration();
- if (factory != currentFactory)
- {
- getServiceSubSystem().switchServiceFactory(factory);
- }
-
- return true;
- }
-
-
-
- public void setHostname(String hostname)
- {
- _hostname = hostname;
- }
-
- public void setSystemType(String systemType)
- {
- _hosttype = systemType;
- }
-
- public String getHostname()
- {
- return _hostname;
- }
-
- public String getSystemType()
- {
- return _hosttype;
- }
-
-
- public boolean performCancel()
- {
- _rootElement.revert();
- return super.performCancel();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 4e4f91c41..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java
+++ /dev/null
@@ -1,399 +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.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.core.PasswordPersistenceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPasswordPersistencePrompt;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-/**
- * Remote systems preference page which allows users to manage (add / change /
- * remove) their saved passwords.
- */
-public final class SignonPreferencePage extends PreferencePage implements IWorkbenchPreferencePage,
- Listener{
-
-
- // SWT Widgets and content providers
- private Table pwdTable;
- private TableViewer pwdTableViewer;
- private PasswordContentProvider provider;
- private Button addButton, changeButton, removeButton;
-
- // List of information for table
- private List passwords;
-
- // List to keep track of additions / deletions / changes. We need to
- // keep track of these until the user decides whether to cancel the preference
- // page (and we forget about the changes) or press ok (and we commit the changes)
- private List modifications;
-
- /**
- * Inner class to keep track of password modifications (without committing them
- * to the keyring) while the user modifies the preferences.
- */
- protected class PasswordModification
- {
- protected static final int ADD = 1;
- protected static final int DELETE = 2;
-
- protected int changeFlag;
- protected SystemSignonInformation info;
-
- protected PasswordModification(int changeFlag, SystemSignonInformation info)
- {
- this.changeFlag = changeFlag;
- this.info = info;
- }
- }
-
- private final class PasswordContentProvider implements IStructuredContentProvider, ITableLabelProvider {
-
- /**
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- return passwords.toArray();
- }
-
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- switch (columnIndex) {
- case 0:
- return ((SystemSignonInformation) element).getHostname();
-
- case 1:
- return ((SystemSignonInformation) element).getSystemType();
-
- case 2:
- return ((SystemSignonInformation) element).getUserid();
- }
-
- // Should never get here
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(Object, String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- }
-
- }
-
-
- /**
- *
- */
- public SignonPreferencePage() {
- noDefaultAndApplyButton();
- provider = new PasswordContentProvider();
- modifications = new ArrayList();
- }
-
-
- /**
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent)
- {
-
- Composite page = SystemWidgetHelpers.createComposite(parent, 2);
- GridData gd = (GridData) page.getLayoutData();
- gd.grabExcessHorizontalSpace = true;
- gd.grabExcessVerticalSpace = true;
-
-// SystemWidgetHelpers.createLabel(page, SystemResources.RESID_PREF_SIGNON_DESCRIPTION, 2);
-
- // Password table
- pwdTable = new Table(page, SWT.FULL_SELECTION |SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- pwdTable.setLinesVisible(true);
- pwdTable.setHeaderVisible(true);
- pwdTable.addListener(SWT.Selection, this);
- SystemWidgetHelpers.setHelp(pwdTable, RSEUIPlugin.HELPPREFIX + "pwdi0000"); //$NON-NLS-1$
-
- TableLayout tableLayout = new TableLayout();
- tableLayout.addColumnData(new ColumnWeightData(100, true));
- tableLayout.addColumnData(new ColumnWeightData(100, true));
- tableLayout.addColumnData(new ColumnWeightData(100, true));
- pwdTable.setLayout(tableLayout);
-
- gd = new GridData(GridData.FILL_BOTH);
- gd.grabExcessHorizontalSpace = true;
- gd.grabExcessVerticalSpace = true;
-
- pwdTable.setLayoutData(gd);
-
- // Hostname column
- TableColumn hostnameColumn = new TableColumn(pwdTable, SWT.NONE);
- hostnameColumn.setText(SystemResources.RESID_PREF_SIGNON_HOSTNAME_TITLE);
-
- // System type column
- TableColumn sysTypeColumn = new TableColumn(pwdTable, SWT.NONE);
- sysTypeColumn.setText(SystemResources.RESID_PREF_SIGNON_SYSTYPE_TITLE);
-
- // User ID column
- TableColumn useridColumn = new TableColumn(pwdTable, SWT.NONE);
- useridColumn.setText(SystemResources.RESID_PREF_SIGNON_USERID_TITLE);
-
- pwdTableViewer = new TableViewer(pwdTable);
- pwdTableViewer.setContentProvider(provider);
- pwdTableViewer.setLabelProvider(provider);
- pwdTableViewer.setInput(passwords);
-
- // Create the Button bar for add, change and remove
- Composite buttonBar = SystemWidgetHelpers.createComposite(page, 1);
- gd = (GridData) buttonBar.getLayoutData();
- gd.grabExcessHorizontalSpace = false;
- gd.grabExcessVerticalSpace = true;
-
- addButton = SystemWidgetHelpers.createPushButton(buttonBar, this, SystemResources.RESID_PREF_SIGNON_ADD_LABEL, SystemResources.RESID_PREF_SIGNON_ADD_TOOLTIP);
- changeButton = SystemWidgetHelpers.createPushButton(buttonBar, this, SystemResources.RESID_PREF_SIGNON_CHANGE_LABEL, SystemResources.RESID_PREF_SIGNON_CHANGE_TOOLTIP);
- removeButton = SystemWidgetHelpers.createPushButton(buttonBar, this, SystemResources.RESID_PREF_SIGNON_REMOVE_LABEL, SystemResources.RESID_PREF_SIGNON_REMOVE_TOOLTIP);
-
- changeButton.setEnabled(false);
- removeButton.setEnabled(false);
-
- SystemWidgetHelpers.setHelp(addButton, RSEUIPlugin.HELPPREFIX + "pwdi0000"); //$NON-NLS-1$
- SystemWidgetHelpers.setHelp(changeButton, RSEUIPlugin.HELPPREFIX + "pwdi0000"); //$NON-NLS-1$
- SystemWidgetHelpers.setHelp(removeButton, RSEUIPlugin.HELPPREFIX + "pwdi0000"); //$NON-NLS-1$
-
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "pwdi0000"); //$NON-NLS-1$
- SystemWidgetHelpers.setMnemonics(parent);
-
- return parent;
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench) {
- // reinit passwords list
- passwords = PasswordPersistenceManager.getInstance().getSavedUserIDs();
-
- // refresh password table
- if (pwdTableViewer != null)
- {
- pwdTableViewer.refresh();
- }
- }
-
-
- /**
- * @see org.eclipse.swt.widgets.Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.type == SWT.Selection) {
- if (event.widget == addButton) {
- SystemPasswordPersistencePrompt dialog = new SystemPasswordPersistencePrompt(getShell(), SystemResources.RESID_PREF_SIGNON_ADD_DIALOG_TITLE, passwords, false);
- if (dialog.open() == Window.OK)
- {
- SystemSignonInformation info = dialog.getSignonInformation();
- passwords.add(info);
- modifications.add(new PasswordModification(PasswordModification.ADD, info));
-
- pwdTableViewer.refresh();
- pwdTable.select(passwords.size() - 1); // select the new entry
- }
-
- } else if (event.widget == changeButton) {
- 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());
- if (dialog.open() == Window.OK)
- {
- // Remove old and add new
- info = dialog.getSignonInformation();
- SystemSignonInformation oldInfo = (SystemSignonInformation) passwords.remove(index);
- passwords.add(index, info);
-
- modifications.add(new PasswordModification(PasswordModification.DELETE, oldInfo));
- modifications.add(new PasswordModification(PasswordModification.ADD, info));
-
- pwdTableViewer.refresh();
- pwdTable.select(index);
- }
-
- } else if (event.widget == removeButton) {
- int[] indicies = pwdTable.getSelectionIndices();
- for (int idx = indicies.length - 1; idx >= 0; idx--)
- {
- PasswordPersistenceManager.getInstance().remove((SystemSignonInformation)passwords.get(indicies[idx]));
- modifications.add(new PasswordModification(PasswordModification.DELETE,
- (SystemSignonInformation) passwords.remove(indicies[idx])));
- }
-
- pwdTableViewer.refresh();
- }
-
- // Update table buttons based on changes
- switch (pwdTable.getSelectionCount())
- {
- case 0:
- changeButton.setEnabled(false);
- removeButton.setEnabled(false);
- break;
-
- case 1:
- changeButton.setEnabled(true);
- removeButton.setEnabled(true);
- break;
-
- default:
- changeButton.setEnabled(false);
- removeButton.setEnabled(true);
- break;
- }
- }
- }
-
-
- /**
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
-
- if (modifications.size() > 0)
- {
- PasswordModification mod;
- PasswordPersistenceManager manager = PasswordPersistenceManager.getInstance();
- IHost[] connections = RSEUIPlugin.getTheSystemRegistry().getHosts();
- ISubSystem[] subsystems;
- IConnectorService system;
-
- for (int i = 0; i < modifications.size(); i++)
- {
- mod = (PasswordModification) modifications.get(i);
-
- if (mod.changeFlag == PasswordModification.ADD)
- {
- manager.add(mod.info, true);
-
- // yantzi: artemis 6.0, clear any cached passwords that are affected additions
- // (this is either a real add or a change (which is really a remove followed
- // by an add)
- if (connections != null)
- {
- for (int j = 0; j < connections.length; j++)
- {
- if (connections[j].getHostName().equalsIgnoreCase(mod.info.getHostname()))
- {
- subsystems = connections[j].getSubSystems();
- if (subsystems != null)
- {
- for (int k = 0; k < subsystems.length; k++)
- {
- system = subsystems[k].getConnectorService();
- if (system != null)
- {
- system.clearPasswordCache();
- }
- }
- }
- }
- }
- }
- }
- else if (mod.changeFlag == PasswordModification.DELETE)
- {
- manager.remove(mod.info);
- }
- }
-
- modifications.clear();
- }
-
- return super.performOk();
- }
-
- /**
- * @see org.eclipse.jface.preference.IPreferencePage#performCancel()
- */
- public boolean performCancel() {
- modifications.clear();
- return super.performCancel();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemAbstractPropertyPageExtensionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemAbstractPropertyPageExtensionAction.java
deleted file mode 100644
index 5e2b3571e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemAbstractPropertyPageExtensionAction.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.propertypages;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-
-
-
-/**
- * This is a base class to simplify the creation of remote object property pages supplied via the
- * org.eclipse.rse.core.propertyPages extension point.
- * <p>
- * This class extends {@link SystemBasePropertyPage} and so inherits the benefits of that class.<br>
- * <b>To get these benefits though, you must override {@link #createContentArea(Composite)} versus the
- * usual createContents(Composite) method.</b>.
- * <p>
- * The benefits of this class are:</p>
- * <ul>
- * <li>From {@link SystemBasePropertyPage}: Adds a message line and {@link org.eclipse.rse.ui.messages.ISystemMessageLine} message methods.
- * <li>From {@link SystemBasePropertyPage}: Automatically assigns mnemonics to controls on this page, simplifying this common task. See {#wantMnemonics()}.
- * <li>From {@link SystemBasePropertyPage}: For pages with input controls, simplifies the page validation burden: only one method need be overridden: {@link #verifyPageContents()}
- * <li>From {@link SystemBasePropertyPage}: If no Default and Apply buttons wanted, the area reserved for this is removed, removing extra white space.
- * <li>Supplies helper method {@link #getRemoteObject()} for querying the selected remote object.
- * <li>Supplies helper methods getRemoteObjectXXX() for querying the attributes of the selected remote object.
- * <li>Supplies helper methods to query the {@link #getSubSystem() subsystem} and {@link #getSystemConnection() connection} containing the selected remote object.
- * </ul>
- * If your property page is for a file-system file or folder, use {@link SystemAbstractRemoteFilePropertyPageExtensionAction}.
- */
-public abstract class SystemAbstractPropertyPageExtensionAction
- //extends PropertyPage implements IWorkbenchPropertyPage
- extends SystemBasePropertyPage implements IWorkbenchPropertyPage
-{
- protected static final Object[] EMPTY_ARRAY = new Object[0];
-
- /**
- * Constructor
- */
- public SystemAbstractPropertyPageExtensionAction()
- {
- super();
- // ensure the page has no special buttons
- noDefaultAndApplyButton();
- }
-
- // ------------------------
- // OVERRIDABLE METHODS...
- // ------------------------
- /**
- * <i><b>Abstract</b>. You must override.</i><br>
- * This is where child classes create their content area versus createContent,
- * in order to have the message line configured for them and mnemonics assigned.
- */
- protected abstract Control createContentArea(Composite parent);
-
- /**
- * <i>You may override if your page has input fields. By default returns true.</i><br>
- * Validate all the widgets on the page. Based on this, the Eclipse framework will know whether
- * to veto any user attempt to select another property page from the list on the left in the
- * Properties dialog.
- * <p>
- * Subclasses should override to do full error checking on all the widgets on the page. Recommendation:<br>
- * <ul>
- * <li>If an error is detected, issue a {@link org.eclipse.rse.ui.messages.SystemMessage} via {@link #setErrorMessage(SystemMessage)} or text message via {@link #setErrorMessage(String)}.
- * <li>If no errors detected, clear the message line via {@link #clearErrorMessage()}
- * </ul>
- *
- * @return true if there are no errors, false if any errors were found.
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- // ---------------------------------------------
- // CONVENIENCE METHODS FOR SUBCLASSES TO USE...
- // ---------------------------------------------
- /**
- * Retrieve the input remote object
- * @see #getRemoteAdapter(Object)
- */
- public Object getRemoteObject()
- {
- return getElement();
- }
- /**
- * Retrieve the adapter of the input remote object as an ISystemRemoteElementAdapter object, for convenience.
- * Will be null if there is nothing selected
- */
- public ISystemRemoteElementAdapter getRemoteAdapter()
- {
- return getRemoteAdapter(getElement());
- }
- /**
- * Returns the implementation of ISystemRemoteElementAdapter for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- if (!(o instanceof IAdaptable))
- return (ISystemRemoteElementAdapter)Platform.getAdapterManager().getAdapter(o,ISystemRemoteElementAdapter.class);
- return (ISystemRemoteElementAdapter)((IAdaptable)o).getAdapter(ISystemRemoteElementAdapter.class);
- }
-
- /**
- * Returns the name of the input remote object
- */
- public String getRemoteObjectName()
- {
- return getRemoteAdapter().getName(getRemoteObject());
- }
- /**
- * Returns the id of the subsystem factory of the input remote object.
- */
- public String getRemoteObjectSubSystemConfigurationId()
- {
- return getRemoteAdapter().getSubSystemConfigurationId(getRemoteObject());
- }
- /**
- * Returns the type category of the input remote object
- */
- public String getRemoteObjectTypeCategory()
- {
- return getRemoteAdapter().getRemoteTypeCategory(getRemoteObject());
- }
- /**
- * Returns the type of the input remote object
- */
- public String getRemoteObjectType()
- {
- return getRemoteAdapter().getRemoteType(getRemoteObject());
- }
- /**
- * Returns the subtype of the input remote object
- */
- public String getRemoteObjectSubType()
- {
- return getRemoteAdapter().getRemoteSubType(getRemoteObject());
- }
- /**
- * Returns the sub-subtype of the input remote object
- */
- public String getRemoteObjectSubSubType()
- {
- return getRemoteAdapter().getRemoteSubSubType(getRemoteObject());
- }
- /**
- * Returns the subsystem from which the input remote object was resolved
- */
- public ISubSystem getSubSystem()
- {
- return getRemoteAdapter().getSubSystem(getRemoteObject());
- }
- /**
- * Returns the subsystem factory which owns the subsystem from which the input remote object was resolved
- */
- public ISubSystemConfiguration getSubSystemConfiguration()
- {
- ISubSystem ss = getSubSystem();
- if (ss != null)
- return ss.getSubSystemConfiguration();
- else
- return null;
- }
-
- /**
- * Return the SystemConnection from which the selected remote objects were resolved
- */
- public IHost getSystemConnection()
- {
- IHost conn = null;
- ISubSystem ss = getRemoteAdapter().getSubSystem(getRemoteObject());
- if (ss != null)
- conn = ss.getHost();
- return conn;
- }
-
-
-
- /**
- * Debug method to print out details of given selected object, in a composite GUI widget...
- */
- protected Composite createTestComposite(Composite parent)
- {
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- //System.out.println("Remote object name................: " + getRemoteObjectName());
- //System.out.println("Remote object subsystem factory id: " + getRemoteObjectSubSystemConfigurationId());
- //System.out.println("Remote object type category.......: " + getRemoteObjectTypeCategory());
- //System.out.println("Remote object type ...............: " + getRemoteObjectType());
- //System.out.println("Remote object subtype ............: " + getRemoteObjectSubType());
- //System.out.println("Remote object subsubtype .........: " + getRemoteObjectSubSubType());
-
- SystemWidgetHelpers.createLabel(composite_prompts, "Remote object name: "); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(composite_prompts, checkForNull(getRemoteObjectName()));
-
- SystemWidgetHelpers.createLabel(composite_prompts, "Remote object subsystem factory id: "); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(composite_prompts, checkForNull(getRemoteObjectSubSystemConfigurationId()));
-
- SystemWidgetHelpers.createLabel(composite_prompts, "Remote object type category: "); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(composite_prompts, checkForNull(getRemoteObjectTypeCategory()));
-
- SystemWidgetHelpers.createLabel(composite_prompts, "Remote object type: "); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(composite_prompts, checkForNull(getRemoteObjectType()));
-
- SystemWidgetHelpers.createLabel(composite_prompts, "Remote object subtype: "); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(composite_prompts, checkForNull(getRemoteObjectSubType()));
-
- SystemWidgetHelpers.createLabel(composite_prompts, "Remote object subsubtype: "); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(composite_prompts, checkForNull(getRemoteObjectSubSubType()));
-
- return composite_prompts;
- }
-
- /**
- * Check for null, and if so, return ""
- */
- private String checkForNull(String input)
- {
- if (input == null)
- return ""; //$NON-NLS-1$
- else
- return input;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.java
deleted file mode 100644
index c7bc3ca0c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.java
+++ /dev/null
@@ -1,533 +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.propertypages;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.Mnemonics;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.ISystemMessageLineTarget;
-import org.eclipse.rse.ui.messages.SystemDialogPageMessageLine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * A base class for property pages that offers value over the base Eclipse PropertyPage
- * class:
- * <ul>
- * <li>Adds a message line and {@link org.eclipse.rse.ui.messages.ISystemMessageLine} message methods.
- * <li>Automatically assigns mnemonics to controls on this page, simplifying this common task. See {#wantMnemonics()}.
- * <li>If no Default and Apply buttons wanted (default), the area reserved for this is removed, removing extra white space.
- * <li>For pages with input controls, simplifies the page validation burden: only one method need be overridden: {@link #verifyPageContents()}
- * <br>To do on-the-fly validation, in your handler calling setErrorMessage/clearErrorMessage automatically calls setValid, although
- * you can call it directly too if you desire.
- * <br>verifyPageContents is called by default by performOk (be sure to call super.performOk if you override), and
- * for multiple property pages, is called when another one is selected.
- * </ul>
- * <p>To get these benefits you must override {@link #createContentArea(Composite)} instead of createContents.
- * Our base implementation of createContents configures the message line and then calls
- * createContentArea and then assigns mnemonics to the content area.
- * </p>
- *
- */
-public abstract class SystemBasePropertyPage extends PropertyPage
- implements ISystemMessageLine, ISystemMessageLineTarget
-{
-
-
- protected ISystemMessageLine msgLine;
- protected boolean msgLineSet = false;
- protected Composite contentArea, buttonsComposite;
- private Cursor waitCursor;
- private String helpId;
-
- /**
- * Constructor for SystemBasePropertyPage
- */
- public SystemBasePropertyPage()
- {
- super();
- }
-
- /**
- * <i>Parent intercept. No need to call or override.</i><br>
- * Our base implementation of createContents configures them message line and then calls
- * {@link #createContentArea(Composite)} and then assigns mnemonics to the content area.
- * Also calls {@link #noDefaultAndApplyButton()} if {@link #wantDefaultAndApplyButton()} returns false.
- *
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- * @see #createContentArea(Composite)
- */
- protected Control createContents(Composite parent)
- {
- // TODO - redesign message line so it works in Eclipse 3.0
- // DKM commenting this out for now to avoid exceptions
- //configureMessageLine();
- if (!wantDefaultAndApplyButton())
- noDefaultAndApplyButton();
- Control c = createContentArea(parent);
- if ((c != null) && (c instanceof Composite))
- {
- contentArea = (Composite)c;
- if (helpId != null)
- SystemWidgetHelpers.setHelp(contentArea, helpId);
- if (wantMnemonics())
- (new Mnemonics()).setOnPreferencePage(true).setMnemonics(contentArea);
- }
- configureMessageLine();
- return c;
- }
-
- /**
- * <i>Configuration method. Override only to change the default. </i><br>
- * Return true if you want to see Apply and Restore Defaults buttons. This is queried by
- * the default implementation of createContents and the default is false, we don't want
- * to see them. Default is <b>false</b>.
- */
- protected boolean wantDefaultAndApplyButton()
- {
- return false;
- }
-
- /**
- * <i>Configuration method. Override only to change the default. </i><br>
- * Return false if you don't want to have mnemonics automatically applied to your page
- * by this parent class. Default is <b>true</b>.
- */
- protected boolean wantMnemonics()
- {
- return true;
- }
- /**
- * <i>Configuration method. Override only to change the default. </i><br>
- * Return false if you don't want to automatically set whether the page is valid based
- * on error message status. Default is <b>true</b>
- */
- protected boolean wantAutomaticValidManagement()
- {
- return true;
- }
-
- /**
- * For setting the default overall help for the dialog.
- * This can be overridden per control by calling {@link SystemWidgetHelpers#setHelp(Control, String)}
- */
- public void setHelp(String helpId)
- {
- if (contentArea != null)
- {
- SystemWidgetHelpers.setHelp(contentArea, helpId);
- SystemWidgetHelpers.setHelp(contentArea, helpId);
- //SystemWidgetHelpers.setCompositeHelp(parentComposite, helpId, helpIdPerControl);
- //SystemWidgetHelpers.setCompositeHelp(buttonsComposite, helpId, helpIdPerControl);
- }
- this.helpId = helpId;
- }
-
- /**
- * <i><b>Abstract</b>. You must override.</i><br>
- * This is where child classes create their content area versus createContent,
- * in order to have the message line configured for them and mnemonics assigned.
- */
- protected abstract Control createContentArea(Composite parent);
-
-
- /**
- * <i><b>Private</b>. No need to call or override.</i><br>
- * Configure the message line if not already. Called for you if you override createContentArea
- * versus createContents, else you might choose to call it yourself.
- */
- protected void configureMessageLine()
- {
-// if (msgLine == null)
- //msgLine = SystemPropertiesMessageLine.configureMessageLine(this);
- // msgLine = SystemDialogPageMessageLine.createPropertyPageMsgLine(this);
- }
-
- /**
- * <i><b>Private</b>. No need to call or override.</i><br>
- * Override of parent to delete the button bar since we don't use it, and to make this
- * page fit on a 800x600 display
- */
- protected void contributeButtons(Composite buttonBar)
- {
- this.buttonsComposite = buttonBar;
- if (helpId != null)
- SystemWidgetHelpers.setHelp(buttonsComposite, helpId);
-
- if (wantDefaultAndApplyButton())
- super.contributeButtons(buttonBar);
- else
- {
- // see createControl method in org.eclipse.jface.preference.PreferencePage
- Composite content = buttonBar.getParent();
- //Composite pageContainer = content.getParent();
- //DY The parent PreferencePage class handles this now for us
- //DY buttonBar.setVisible(false);
- //DY buttonBar.dispose();
-
- if ((contentArea != null) && (contentArea.getLayout() != null) &&
- (contentArea.getLayout() instanceof GridLayout))
- {
- ((GridLayout)contentArea.getLayout()).marginHeight = 0;
- if (contentArea.getLayoutData() instanceof GridData)
- ((GridData)contentArea.getLayoutData()).grabExcessVerticalSpace = false;
- contentArea.pack();
- }
- if (content != null)
- {
-// if (content.getLayout() instanceof GridLayout)
-// {
-// GridLayout layout = (GridLayout)content.getLayout();
-// layout.marginHeight= 0; layout.marginWidth= 0;
-// }
- content.pack();
- }
- }
- }
-
- /**
- * <i>Parent intercept. No need to call or override.</i><br>
- * The <code>PreferencePage</code> implementation of this
- * <code>IPreferencePage</code> method returns <code>true</code>
- * if the page is valid.
- * <p>
- * We first test isValid() just like our parent implementation does,
- * but since that only represents the valid state of the
- * last control the user interacted with, we also call verifyPageContents.
- * <p>
- * Subclasses must override {@link #verifyPageContents()} to do full error checking on all
- * the widgets on the page.
- */
- public boolean okToLeave()
- {
- super.okToLeave();
- boolean ok = isValid();
- if (ok)
- {
- ok = verifyPageContents();
- }
- //System.out.println("Inside okToLeave. returning "+ok);
- return ok;
- }
-
- /**
- * <i><b>Abstract</b>. You must override. Return true if no input fields to check.</i><br>
- * Validate all the widgets on the page. Based on this, the Eclipse framework will know whether
- * to veto any user attempt to select another property page from the list on the left in the
- * Properties dialog.
- * <p>
- * Subclasses should override to do full error checking on all the widgets on the page. Recommendation:<br>
- * <ul>
- * <li>If an error is detected, issue a {@link SystemMessage} via {@link #setErrorMessage(SystemMessage)} or text message via {@link #setErrorMessage(String)}.
- * <li>If no errors detected, clear the message line via {@link #clearErrorMessage()}
- * </ul>
- *
- * @return true if there are no errors, false if any errors were found.
- */
- protected abstract boolean verifyPageContents();
- /*
- {
- return true;
- }*/
-
- /**
- * Method declared on IPreferencePage.
- * Our implementation is to call okToLeave(), which in turn calls verifyPageContents,
- * returning true iff they do.
- * If you override, call super.performOk() to get default processing, and return false if that returns false.
- * @return true if all is well, false if there is an error.
- */
- public boolean performOk()
- {
- boolean oldValid = isValid();
- boolean newValid = okToLeave();
- setValid(oldValid);
- return newValid;
- }
- // -----------------------------------
- // ISystemMessageLineTarget methods...
- // -----------------------------------
- /**
- * <i>ISystemMessageLineTarget method.</i><br>
- * Set the message line to use for issuing messages
- */
- public void setMessageLine(ISystemMessageLine msgLine)
- {
- //System.out.println("Inside setMessageLine");
- this.msgLine = msgLine;
- msgLineSet = (msgLine != null);
- }
- /**
- * <i>ISystemMessageLineTarget method.</i><br>
- * Get the message line to use for issuing messages
- */
- public ISystemMessageLine getMessageLine()
- {
- //if (msgLineSet)
- // return msgLine;
- //else
- return this;
- }
-
- // -----------------------------
- // Helper methods...
- // -----------------------------
- /**
- * <i>Helper method.</i><br>
- * Set the cursor to the wait cursor (true) or restores it to the normal cursor (false).
- */
- public void setBusyCursor(boolean setBusy)
- {
- if (setBusy)
- {
- // Set the busy cursor to all shells.
- Display d = getShell().getDisplay();
- waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(getShell(), waitCursor);
- }
- else
- {
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(getShell(), null);
- if (waitCursor != null)
- waitCursor.dispose();
- waitCursor = null;
- }
- }
-
- /**
- * <i>Helper method.</i><br>
- * Add a separator line. This is a physically visible line.
- */
- protected Label addSeparatorLine(Composite parent, int nbrColumns)
- {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- separator.setLayoutData(data);
- return separator;
- }
- /**
- * <i>Helper method.</i><br>
- * Add a spacer line
- */
- protected Label addFillerLine(Composite parent, int nbrColumns)
- {
- Label filler = new Label(parent, SWT.LEFT);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- filler.setLayoutData(data);
- return filler;
- }
-
- /**
- * Sets this control to grab any excess horizontal space
- * left in the window. This is useful to do in a property page
- * to force all the labels on the right to not be squished up on the left.
- *
- * @param control the control for which to grab excess space
- */
- protected Control grabExcessSpace(Control control)
- {
- GridData gd = (GridData) control.getLayoutData();
- if (gd != null)
- gd.grabExcessHorizontalSpace = true;
- return control;
- }
-
- /**
- * Create a labeled label, where the label on the right grabs excess space and has an indent so it
- * isn't smashed up against the prompt on the left.
- * @see SystemWidgetHelpers#createLabeledLabel(Composite, String, String, boolean)
- * @see #grabExcessSpace(Control)
- */
- protected Label createLabeledLabel(Composite c, String label, String tooltip)
- {
- Label l = SystemWidgetHelpers.createLabeledLabel(c, label, tooltip, false);
- GridData gd = (GridData)l.getLayoutData();
- if (gd != null)
- {
- gd.grabExcessHorizontalSpace = true;
- gd.horizontalIndent = 10;
- }
- return l;
- }
- /**
- * Create a labeled combo, where the combo on the right grabs excess space and has an indent so it
- * isn't smashed up against the prompt on the left.
- * @see SystemWidgetHelpers#createLabeledCombo(Composite, Listener, String, String)
- * @see #grabExcessSpace(Control)
- */
- protected Combo createLabeledCombo(Composite c, String label, String tooltip)
- {
- Combo combo = SystemWidgetHelpers.createLabeledCombo(c, null, label, tooltip);
- GridData gd = (GridData)combo.getLayoutData();
- if (gd != null)
- {
- gd.grabExcessHorizontalSpace = true;
- gd.horizontalIndent = 10;
- }
- return combo;
- }
- /**
- * Create a labeled entry field, where the field on the right grabs excess space and has an indent so it
- * isn't smashed up against the prompt on the left.
- * @see SystemWidgetHelpers#createLabeledTextField(Composite, Listener, String, String)
- * @see #grabExcessSpace(Control)
- */
- protected Text createLabeledText(Composite c, String label, String tooltip)
- {
- Text field = SystemWidgetHelpers.createLabeledTextField(c, null, label, tooltip);
- GridData gd = (GridData)field.getLayoutData();
- if (gd != null)
- {
- gd.grabExcessHorizontalSpace = true;
- gd.horizontalIndent = 10;
- }
- return field;
- }
- /**
- * Create a labeled verbage field, where the field on the right grabs excess space and has an indent so it
- * isn't smashed up against the prompt on the left.
- * @see SystemWidgetHelpers#createLabeledTextField(Composite, Listener, String, String)
- * @see #grabExcessSpace(Control)
- */
- protected Label createLabeledVerbage(Composite c, String label, String tooltip)
- {
- Label verbage = SystemWidgetHelpers.createLabeledVerbage(c, label, tooltip, 1, false, 200);
- GridData gd = (GridData)verbage.getLayoutData();
- if (gd != null)
- {
- gd.grabExcessHorizontalSpace = true;
- gd.horizontalIndent = 10;
- }
- return verbage;
- }
- // -----------------------------
- // ISystemMessageLine methods...
- // -----------------------------
- /**
- * <i>ISystemMessageLine method.</i><br>
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- if (msgLine!=null)
- msgLine.clearErrorMessage();
- else
- super.setErrorMessage(null);
- if (wantAutomaticValidManagement())
- setValid(true);
- }
- /**
- * <i>ISystemMessageLine method.</i><br>
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- if (msgLine!=null)
- msgLine.clearMessage();
- else
- super.setMessage(null);
- }
- /**
- * <i>ISystemMessageLine method.</i><br>
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- if (msgLine!=null)
- return msgLine.getSystemErrorMessage();
- else
- return null;
- }
- /**
- * <i>ISystemMessageLine method.</i><br>
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- super.setErrorMessage(message);
- if (wantAutomaticValidManagement())
- setValid(message == null);
- if (msgLine != null)
- ((SystemDialogPageMessageLine)msgLine).internalSetErrorMessage(message);
- }
-
- /**
- * <i>ISystemMessageLine method.</i><br>
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- if (msgLine!=null)
- msgLine.setErrorMessage(message);
- else
- super.setErrorMessage(message.getLevelOneText());
- if (wantAutomaticValidManagement())
- setValid(message == null);
- }
- /**
- * <i>ISystemMessageLine method.</i><br>
- * Convenience method to set an error message from an exception
- */
- public void setErrorMessage(Throwable exc)
- {
- if (msgLine != null)
- msgLine.setErrorMessage(exc);
- }
-
- /**
- * <i>ISystemMessageLine method.</i><br>
- * Set the error message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- if (msgLine!=null)
- msgLine.setMessage(message);
- else
- super.setMessage(message.getLevelOneText());
- }
- /**
- * <i>ISystemMessageLine method.</i><br>
- * Set the non-error message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- super.setMessage(message);
- if (msgLine!=null)
- ((SystemDialogPageMessageLine)msgLine).internalSetMessage(message);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBooleanFieldEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBooleanFieldEditor.java
deleted file mode 100644
index 023dcc2df..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBooleanFieldEditor.java
+++ /dev/null
@@ -1,133 +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.propertypages;
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Thin subclass so we can support setToolTipText!!
- */
-public class SystemBooleanFieldEditor extends BooleanFieldEditor
-{
- private Button button;
- private String tip;
- private Composite parent;
-
- /**
- * Constructor for SystemBooleanFieldEditor
- */
- protected SystemBooleanFieldEditor()
- {
- super();
- }
-
- /**
- * Constructor for SystemBooleanFieldEditor
- * @param name the preference-store-key of the preference this field editor works on
- * @param labelText the label text of the field editor
- * @param style the style, either <code>DEFAULT</code> or
- * <code>SEPARATE_LABEL</code>
- * @param parent the parent of the field editor's control
- * @see #DEFAULT
- * @see #SEPARATE_LABEL
- */
- public SystemBooleanFieldEditor(String name, String labelText, int style, Composite parent)
- {
- super(name, labelText, style, parent);
- this.parent = parent;
- }
-
- /**
- * Constructor for SystemBooleanFieldEditor, using DEFAULT for the style
- * @param name the preference-store-key of the preference this field editor works on
- * @param labelText the label text of the field editor
- * @param parent the parent of the field editor's control
- */
- public SystemBooleanFieldEditor(String name, String labelText, Composite parent)
- {
- super(name, labelText, parent);
- this.parent = parent;
- }
- /**
- * Constructor for SystemBooleanFieldEditor, using DEFAULT for the style, and
- * specifying a resource bundle and key from which the label (_LABEL and
- * tooltip text (_TOOLTIP are retrieved.
- * @param name the preference-store-key of the preference this field editor works on
- * @param rb the ResourceBundle we will query the label and tooltip from
- * @param labelKey the resource bundle key from which we get the label (_LABEL and tooltip (_TOOLTIP
- * @param parent the parent of the field editor's control
- */
- public SystemBooleanFieldEditor(String name, ResourceBundle rb, String labelKey, Composite parent)
- {
- super(name, rb.getString(labelKey+"label"), parent); //$NON-NLS-1$
- setToolTipText(rb.getString(labelKey+"tooltip")); //$NON-NLS-1$
- this.parent = parent;
- }
-
- /**
- * Returns the change button for this field editor.
- * This is an override of our parent's method because this is the
- * only way for us to gain access to the checkbox so that we can
- * apply our tooltip text.
- */
- protected Button getChangeControl(Composite parent)
- {
- button = super.getChangeControl(parent);
- if (tip != null)
- button.setToolTipText(tip);
- return button;
- }
- /**
- * Set the tooltip text
- */
- public void setToolTipText(String tip)
- {
- if (button != null)
- button.setToolTipText(tip);
- this.tip = tip;
- }
- /**
- * Get the tooltip text
- */
- public String getToolTipText()
- {
- return tip;
- }
-
- /**
- * Set the help for the control
- */
- public void setHelp(String helpID)
- {
- if (button != null) {
- SystemWidgetHelpers.setHelp(button, helpID);
- }
- }
-
- /**
- * Method setEnabled
- * @param enablement state
- */
- public void setEnabled( boolean enablement )
- {
- getChangeControl(parent).setEnabled(enablement);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index d058524d6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemChangeFilterPropertyPage.java
+++ /dev/null
@@ -1,312 +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.propertypages;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystemHelpers;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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;
-import org.eclipse.rse.ui.filters.SystemChangeFilterPane;
-import org.eclipse.rse.ui.filters.SystemFilterStringEditPane;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This is the property page for changing filters. This page used to be the Change dialog.
- * The plugin.xml file registers this for objects of class org.eclipse.rse.internal.filters.SystemFilter or
- * org.eclipse.rse.filters.SystemFilterReference.
- * <p>
- * If you have your own change filter dialog (versus configuring ours) you must configure this
- * pane yourself by overriding {@link SubSystemConfiguration#customizeChangeFilterPropertyPage(SystemChangeFilterPropertyPage, ISystemFilter, Shell)}
- * and configuring the pane as described in that method's javadoc.
- */
-public class SystemChangeFilterPropertyPage extends SystemBasePropertyPage
- implements ISystemPageCompleteListener, ISystemChangeFilterPaneEditPaneSupplier
-{
-
- protected String errorMessage;
- protected boolean initDone = false;
-
- protected SystemChangeFilterPane changeFilterPane;
- protected SystemFilterStringEditPane editPane;
-
- /**
- * Constructor for SystemFilterPropertyPage
- */
- public SystemChangeFilterPropertyPage()
- {
- super();
- changeFilterPane = new SystemChangeFilterPane(null, this, this);
- changeFilterPane.addPageCompleteListener(this);
- setHelp(RSEUIPlugin.HELPPREFIX+"dufr0000"); //$NON-NLS-1$
- }
-
- // INPUT/CONFIGURATION
- /**
- * <i>Configuration method</i><br>
- * Specify an edit pane that prompts the user for the contents of a filter string.
- */
- public void setFilterStringEditPane(SystemFilterStringEditPane editPane)
- {
- this.editPane = editPane;
- }
- /**
- * <i>Configuration method</i><br>
- * Set the contextual system filter pool reference manager provider. Will be non-null if the
- * current selection is a reference to a filter pool or filter, or a reference manager
- * provider itself (eg subsystem)
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
- {
- changeFilterPane.setSystemFilterPoolReferenceManagerProvider(provider);
- }
- /**
- * <i>Configuration method</i><br>
- * Set the contextual system filter pool manager provider. Will be non-null if the
- * current selection is a filter pool or filter or reference to either, or a manager
- * provider itself (eg subsystemconfiguration)
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider provider)
- {
- changeFilterPane.setSystemFilterPoolManagerProvider(provider);
- }
-
- /**
- * <i>Configuration method</i><br>
- * Set the Parent Filter Pool prompt label and tooltip text.
- */
- public void setParentPoolPromptLabel(String label, String tip)
- {
- changeFilterPane.setParentPoolPromptLabel(label, tip);
- }
- /**
- * <i>Configuration method</i><br>
- * Set the name prompt label and tooltip text.
- */
- public void setNamePromptLabel(String label, String tip)
- {
- changeFilterPane.setNamePromptLabel(label, tip);
- }
- /**
- * <i>Configuration method</i><br>
- * Set the label shown in group box around the filter string list, and the tooltip text for the
- * list box.
- */
- public void setListLabel(String label, String tip)
- {
- changeFilterPane.setListLabel(label, tip);
- }
- /**
- * Set the string to show as the first item in the list.
- * The default is "New filter string"
- */
- public void setNewListItemText(String label)
- {
- changeFilterPane.setNewListItemText(label);
- }
- /**
- * <i>Configuration method</i><br>
- * Call this to specify a validator for the filter string. It will be called per keystroke.
- * A default validator is supplied otherwise: ValidatorFilterString.
- * <p>
- * Your validator should extend ValidatorFilterString to inherited the uniqueness error checking.
- * <p>
- * Alternatively, if all you want is a unique error message for the case when duplicates are found,
- * call setDuplicateFilterStringErrorMessage, and it will be used in the default validator.
- */
- public void setFilterStringValidator(ISystemValidator v)
- {
- changeFilterPane.setFilterStringValidator(v);
- }
- /**
- * <i>Configuration method</i><br>
- * Set the error message to use when the user is editing or creating a filter string, and the
- * Apply processing detects a duplicate filter string in the list.
- */
- public void setDuplicateFilterStringErrorMessage(SystemMessage msg)
- {
- changeFilterPane.setDuplicateFilterStringErrorMessage(msg);
- }
- /**
- * <i>Configuration method</i><br>
- * Specify if you want to include a test button or not. Appears with "Apply" and "Reset"
- */
- public void setWantTestButton(boolean wantTestButton)
- {
- changeFilterPane.setWantTestButton(wantTestButton);
- }
-
- /**
- * Set if the edit pane is not to be editable
- */
- public void setEditable(boolean editable)
- {
- changeFilterPane.setEditable(editable);
- }
-
- /**
- * Set if the user is to be allowed to create multiple filter strings or not. Default is true
- */
- public void setSupportsMultipleStrings(boolean multi)
- {
- changeFilterPane.setSupportsMultipleStrings(multi);
- }
-
- // OVERRIDABLE METHODS...
-
- /**
- * Create the page's GUI contents.
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- Shell shell = getShell();
- if (shell == null)
- {
- System.out.println("Damn, shell is still null!"); //$NON-NLS-1$
-
- }
- changeFilterPane.setShell(shell);
-
- ISystemFilter selectedFilter = getFilter();
- if (selectedFilter.isPromptable())
- {
- int nbrColumns = 1;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- /*Label test =*/ SystemWidgetHelpers.createLabel(composite_prompts, SystemPropertyResources.RESID_TERM_NOTAPPLICABLE, nbrColumns, false);
- return composite_prompts;
- }
-
- if (getElement() instanceof ISystemFilterReference)
- {
- ISystemFilterReference filterRef = (ISystemFilterReference)getElement();
- changeFilterPane.setSystemFilterPoolReferenceManagerProvider(filterRef.getProvider());
- }
- changeFilterPane.setSystemFilterPoolManagerProvider(selectedFilter.getProvider());
-
- ISubSystemConfiguration ssf = SubSystemHelpers.getParentSubSystemConfiguration(selectedFilter);
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssf.getAdapter(ISubSystemConfigurationAdapter.class);
- adapter.customizeChangeFilterPropertyPage(ssf, this, selectedFilter, shell);
-
- changeFilterPane.setInputObject(getElement());
-
- /*
- // ensure the page has no special buttons
- noDefaultAndApplyButton();
-
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- Label test = SystemWidgetHelpers.createLabel(composite_prompts, "Testing", nbrColumns);
-
-
- if (!initDone)
- doInitializeFields();
-
- return composite_prompts;
- */
- return changeFilterPane.createContents(parent);
- }
- /**
- * Intercept of parent so we can reset the default button
- */
- protected void contributeButtons(Composite parent)
- {
- super.contributeButtons(parent);
- getShell().setDefaultButton(changeFilterPane.getApplyButton()); // defect 46129
- }
-
- /**
- * Parent-required method.
- * Do full page validation.
- * Return true if ok, false if there is an error.
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * Get the input filter object
- */
- protected ISystemFilter getFilter()
- {
- Object element = getElement();
- if (element instanceof ISystemFilter)
- return (ISystemFilter)element;
- else
- return ((ISystemFilterReference)element).getReferencedFilter();
- }
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk()
- {
- if (!super.performOk())
- return false;
- else
- return changeFilterPane.processOK();
- }
- /**
- * Called by parent when user presses Cancel
- */
- public boolean performCancel()
- {
- return changeFilterPane.processCancel();
- }
-
- /**
- * The comleteness of the page has changed.
- * This is a callback from SystemChangeFilterPane.
- */
- public void setPageComplete(boolean complete)
- {
- //super.setPageComplete(complete);
- super.setValid(complete); // we'll see if this is the right thing to do
- }
-
- /**
- * Return our edit pane. Overriding this is an alternative to calling setEditPane.
- * Method is declared in {@link ISystemChangeFilterPaneEditPaneSupplier}.
- */
- public SystemFilterStringEditPane getFilterStringEditPane(Shell shell)
- {
- // this method is called from SystemChangeFilterPane via callback
- if (editPane == null)
- editPane = new SystemFilterStringEditPane(shell);
- return editPane;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemComboBoxFieldEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemComboBoxFieldEditor.java
deleted file mode 100644
index 4915fb4c8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemComboBoxFieldEditor.java
+++ /dev/null
@@ -1,497 +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.propertypages;
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.rse.ui.ISystemMassager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Widget;
-
-
-/**
- * For string properties that have a discrete list of possibilities.
- */
-public class SystemComboBoxFieldEditor extends FieldEditor
-{
-
- private Combo textField;
- private String[] contentArray;
- private boolean contentInited = false;
- private boolean readOnly = true;
- private boolean isValid = true;
- private String tip;
- private SelectionListener selectionListener = null;
- private ModifyListener modifyListener = null;
- private boolean ignoreSelection = false;
- private ISystemValidator validator = null;
- private ISystemMassager massager = null;
- private Composite parentComposite;
- private String oldValue;
- private int numColumnsInParentComposite;
-
-
- /**
- * Constructor for SystemComboBoxFieldEditor
- */
- private SystemComboBoxFieldEditor()
- {
- super();
- }
-
- /**
- * Constructor for SystemComboBoxFieldEditor, using a Vector for the contents
- * @param name - the unique ID for this editor. Used as index in preference store
- * @param labelText - the label to show as the prompt preceding the dropdown
- * @param contents - the list of strings to show in the dropdown, as a vector
- * @param readOnly - true if the user is to be prevented from entering text into the combo
- * @param parent - the parent composite to host this editor
- */
- public SystemComboBoxFieldEditor(String name, String labelText, Vector contents, boolean readOnly, Composite parent)
- {
- super(name, labelText, parent);
- this.readOnly = readOnly;
- this.oldValue = ""; //$NON-NLS-1$
- contentArray = new String[contents.size()];
- for (int idx=0; idx<contentArray.length; idx++)
- contentArray[idx] = contents.elementAt(idx).toString();
- doOurFillIntoGrid();
- initContents();
- }
- /**
- * Constructor for SystemComboBoxFieldEditor, using an array for the contents
- * @param name - the unique ID for this editor. Used as index in preference store
- * @param labelText - the label to show as the prompt preceding the dropdown
- * @param contents - the list of strings to show in the dropdown, as an array
- * @param readOnly - true if the user is to be prevented from entering text into the combo
- * @param parent - the parent composite to host this editor
- */
- public SystemComboBoxFieldEditor(String name, String labelText, String[] contents, boolean readOnly, Composite parent)
- {
- super(name, labelText, parent);
- this.readOnly = readOnly;
- this.oldValue = ""; //$NON-NLS-1$
- contentArray = contents;
- doOurFillIntoGrid();
- initContents();
- }
- /**
- * Constructor for SystemComboBoxFieldEditor, using an array for the contents,
- * and specifying a resource bundle and key, from which we will retrieve the label
- * and the tooltip text
- * @param name - the unique ID for this editor. Used as index in preference store
- * @param rb - the resource bundle from which to retrieve the mri
- * @param rbKey - the key into the resource bundle, to get the label (+"label") and tooltip text (+"tooltip")
- * @param contents - the list of strings to show in the dropdown, as an array
- * @param readOnly - true if the user is to be prevented from entering text into the combo
- * @param parent - the parent composite to host this editor
- */
- public SystemComboBoxFieldEditor(String name, ResourceBundle rb, String rbKey, String[] contents, boolean readOnly, Composite parent)
- {
- super(name, rb.getString(rbKey+"label"), parent); //$NON-NLS-1$
- this.readOnly = readOnly;
- this.oldValue = ""; //$NON-NLS-1$
- contentArray = contents;
- doOurFillIntoGrid();
- setToolTipText(rb.getString(rbKey+"tooltip")); //$NON-NLS-1$
- initContents();
- }
-
- /**
- * If this combobox is editable, set the validator to use here per keystroke
- */
- public void setValidator(ISystemValidator validator)
- {
- this.validator = validator;
- if (textField != null)
- textField.setTextLimit(validator.getMaximumNameLength());
- }
-
- /**
- * Set the massager that is used to affect the user-entered text before
- * saving it to the preference store
- */
- public void setMassager(ISystemMassager massager)
- {
- this.massager = massager;
- }
-
- /**
- * @see org.eclipse.jface.preference.FieldEditor#getNumberOfControls()
- */
- public int getNumberOfControls()
- {
- return 2;
- }
-
- /**
- * @see org.eclipse.jface.preference.FieldEditor#doStore()
- */
- protected void doStore()
- {
- String text = textField.getText();
- if (massager != null)
- {
- text = massager.massage(text);
- ignoreSelection = true;
- textField.setText(text);
- ignoreSelection = false;
- }
-
- getPreferenceStore().setValue(getPreferenceName(), text);
- }
-
- /**
- * @see org.eclipse.jface.preference.FieldEditor#doLoadDefault()
- */
- protected void doLoadDefault()
- {
- if (textField != null)
- {
- String value = getPreferenceStore().getDefaultString(getPreferenceName());
- initSelection(value);
- }
- }
-
- /**
- * @see org.eclipse.jface.preference.FieldEditor#doLoad()
- */
- protected void doLoad()
- {
- if (textField != null)
- {
- String value = getPreferenceStore().getString(getPreferenceName());
- initSelection(value);
- }
- }
-
- private void initSelection(String value)
- {
- if (value != null)
- {
- ignoreSelection = true;
- textField.setText(value);
- oldValue = value;
- ignoreSelection = false;
- }
- else
- oldValue = ""; //$NON-NLS-1$
- }
-
- private void initContents()
- {
- if ((contentArray!=null) && (textField!=null) && !contentInited)
- {
- textField.setItems(contentArray);
- contentInited = true;
- }
- }
-
- /**
- * This is called by our parent's constructor, which is too soon for us!
- * So, we do nothing here and then call doOurFillIntoGrid later within our own
- * constructor.
- * @see org.eclipse.jface.preference.FieldEditor#doFillIntoGrid(Composite, int)
- */
- protected void doFillIntoGrid(Composite parent, int numColumns)
- {
- parentComposite = parent;
- numColumnsInParentComposite = numColumns;
- }
- /**
- * Create controls
- */
- protected void doOurFillIntoGrid()
- {
- getLabelControl(parentComposite);
-
- textField = getTextControl(parentComposite);
- GridData gd = (GridData)textField.getLayoutData();
- gd.horizontalSpan = numColumnsInParentComposite - 1;
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
- textField.setLayoutData(gd);
- }
-
- /**
- * @see org.eclipse.jface.preference.FieldEditor#adjustForNumColumns(int)
- */
- protected void adjustForNumColumns(int numColumns)
- {
- GridData gd = (GridData)textField.getLayoutData();
- gd.horizontalSpan = numColumns - 1;
- // We only grab excess space if we have to
- // If another field editor has more columns then
- // we assume it is setting the width.
- gd.grabExcessHorizontalSpace = gd.horizontalSpan == 1;
- }
-
- /**
- * Returns this field editor's Combo control.
- */
- public Combo getTextControl()
- {
- return textField;
- }
-
- /**
- * Returns this field editor's text control.
- * <p>
- * The control is created if it does not yet exist
- * </p>
- *
- * @param parent the parent
- * @return the text control
- */
- public Combo getTextControl(Composite parent)
- {
- if (textField == null)
- {
- if (isReadOnly())
- textField = SystemWidgetHelpers.createReadonlyCombo(parent, null);
- else
- textField = SystemWidgetHelpers.createCombo(parent, null);
- if (tip != null)
- textField.setToolTipText(tip);
- initContents();
-
- textField.addSelectionListener(getSelectionListener());
- if (!isReadOnly())
- {
- textField.addModifyListener(getModifyListener());
- if (validator != null)
- textField.setTextLimit(validator.getMaximumNameLength());
-
- textField.addFocusListener(new FocusAdapter()
- {
- public void focusGained(FocusEvent e) {
- refreshValidState();
- }
- public void focusLost(FocusEvent e) {
- clearErrorMessage();
- }
- });
- }
-
- textField.addDisposeListener(new DisposeListener()
- {
- public void widgetDisposed(DisposeEvent event)
- {
- textField = null; // not sure why we have to do this
- }
- });
- } else {
- checkParent(textField, parent); // not sure what this is, came from some earlier eclipse example
- }
- return textField;
- }
-
- /**
- * Allows setting of tooltip text
- */
- public void setToolTipText(String tip)
- {
- if (textField != null)
- textField.setToolTipText(tip);
- this.tip = tip;
- }
-
- /**
- * Is this a readonly combo?
- */
- protected boolean isReadOnly()
- {
- return readOnly;
- }
-
- /**
- * Returns this field editor's selection listener.
- * The listener is created if nessessary.
- *
- * @return the selection listener
- */
- private SelectionListener getSelectionListener()
- {
- if (selectionListener == null)
- createSelectionListener();
- return selectionListener;
- }
-
- /**
- * Creates a selection listener.
- */
- protected void createSelectionListener()
- {
- selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- Widget widget = event.widget;
- if (widget == textField)
- selectionChanged();
- }
- };
- }
-
- /**
- * Combobox selection changed
- */
- protected void selectionChanged()
- {
- if (!ignoreSelection)
- setPresentsDefaultValue(false);
- ignoreSelection = false;
- }
-
- /**
- * Returns this field editor's selection listener.
- * The listener is created if nessessary.
- *
- * @return the selection listener
- */
- private ModifyListener getModifyListener()
- {
- if (modifyListener == null)
- createModifyListener();
- return modifyListener;
- }
-
- /**
- * Creates a modify text listener.
- * Ony used for non-readonly flavours
- */
- protected void createModifyListener()
- {
- modifyListener = new ModifyListener()
- {
- public void modifyText(ModifyEvent event)
- {
- Widget widget = event.widget;
- if ((widget == textField) && !ignoreSelection)
- valueChanged();
- }
- };
- }
-
- /**
- * Validate contents of combo field
- */
- protected void validate()
- {
- if (!ignoreSelection)
- {
- setPresentsDefaultValue(false);
- if (validator != null)
- {
- String errmsg = null;
- String value = textField.getText();
- if (!isSpecialValue(value))
- errmsg = validator.isValid(value);
- if (errmsg != null)
- showErrorMessage(errmsg);
- else
- clearErrorMessage();
- isValid = (errmsg == null);
- }
- }
- ignoreSelection = false;
- }
- /**
- * Test if current value is one of the special values
- */
- private boolean isSpecialValue(String input)
- {
- if (contentArray == null)
- return false;
- else
- {
- boolean match = false;
- for (int idx=0; !match && (idx<contentArray.length); idx++)
- if (input.equalsIgnoreCase(contentArray[idx]))
- match = true;
- return match;
- }
- }
-
- /**
- * Informs this field editor's listener, if it has one, about a change
- * to the value (<code>VALUE</code> property) provided that the old and
- * new values are different.
- * <p>
- * This hook is <em>not</em> called when the text is initialized
- * (or reset to the default value) from the preference store.
- * </p>
- */
- protected void valueChanged()
- {
- setPresentsDefaultValue(false);
- boolean oldState = isValid;
- refreshValidState();
-
- if (isValid != oldState)
- fireStateChanged(IS_VALID, oldState, isValid);
-
- String newValue = textField.getText();
- fireValueChanged(VALUE, oldValue, newValue);
- oldValue = newValue;
- }
-
- /**
- * Override of parent to return validity state.
- * If this readonly, we always return true, else we return result of last validation
- */
- public boolean isValid()
- {
- return isValid;
- }
-
- /**
- * Override of parent to refresh validity state by checking if the
- * input is valid. Does nothing unless this is not a readonly combo.
- */
- protected void refreshValidState()
- {
- isValid = true;
- if (!isReadOnly())
- {
- validate();
- }
- }
-
- /**
- * Set focus
- */
- public void setFocus()
- {
- if (textField!= null)
- textField.setFocus();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ec28d08a5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java
+++ /dev/null
@@ -1,134 +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.propertypages;
-
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-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;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * Preference page for generic Remote System communication preferences
- */
-public class SystemCommunicationsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage
-{
-
-
- private IntegerFieldEditor portEditor;
-
- /**
- * Constructor
- */
- public SystemCommunicationsPreferencePage()
- {
- super(GRID);
- setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore());
-// setDescription(SystemResources.RESID_PREF_COMMUNICATIONS_TITLE); dwd description is not readable by screen reader
- }
-
- /**
- * Configure the composite. We intercept to set the help.
- */
- public void createControl(Composite parent)
- {
- super.createControl(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), RSEUIPlugin.HELPPREFIX + "cmmp0000"); //$NON-NLS-1$
- }
-
-
- /**
- *
- */
- protected void createFieldEditors()
- {
- Composite parent= getFieldEditorParent();
-
- // Auto-start the daemon preference
- SystemBooleanFieldEditor autoStartEditor = new SystemBooleanFieldEditor(
- ISystemPreferencesConstants.DAEMON_AUTOSTART,
- SystemResources.RESID_PREF_DAEMON_AUTOSTART_LABEL,
- parent
- );
- autoStartEditor.setToolTipText(SystemResources.RESID_PREF_DAEMON_AUTOSTART_TOOLTIP);
- addField(autoStartEditor);
-
-
- // Daemon port preference
- portEditor = new IntegerFieldEditor(
- ISystemPreferencesConstants.DAEMON_PORT,
- SystemResources.RESID_PREF_DAEMON_PORT_LABEL,
- parent
- );
- portEditor.setValidRange(1, 65536);
- 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), RSEUIPlugin.HELPPREFIX + "cmmp0000"); //$NON-NLS-1$
-
-
- (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent);
- }
-
- /**
- * Inherited method.
- */
- public void init(IWorkbench workbench)
- {
- }
-
- /**
- * Set default preferences for the communications preference page.
- *
- * @param store PreferenceStore used for this preference page.
- */
- public static void initDefaults(IPreferenceStore store)
- {
- store.setDefault(ISystemPreferencesConstants.DAEMON_AUTOSTART, ISystemPreferencesConstants.DEFAULT_DAEMON_AUTOSTART);
- store.setDefault(ISystemPreferencesConstants.DAEMON_PORT, ISystemPreferencesConstants.DEFAULT_DAEMON_PORT);
- }
-
- /**
- * @see FieldEditorPreferencePage#performOk()
- */
- public boolean performOk() {
- // Restart the communications daemon if required
- int port = portEditor.getIntValue();
- SystemCommunicationsDaemon daemon = SystemCommunicationsDaemon.getInstance();
-
- // Restart communications daemon if it is already running and the
- // port number has changed
- if (daemon.isRunning() && port != daemon.getPort()) {
- SystemCommunicationsDaemon.getInstance().stopDaemon();
- SystemCommunicationsDaemon.getInstance().startDaemon();
- }
-
- return super.performOk();
-
- }
-} \ No newline at end of file
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
deleted file mode 100644
index a98eecaaf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java
+++ /dev/null
@@ -1,166 +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.propertypages;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemRegistryUI;
-import org.eclipse.rse.ui.ISystemConnectionFormCaller;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-/**
- * The property page for connection properties
- * The plugin.xml file registers this for objects of class org.eclipse.rse.rse.model.IHost
- */
-public class SystemConnectionPropertyPage extends SystemBasePropertyPage
- implements ISystemMessageLine, ISystemConnectionFormCaller
-{
-
- protected SystemConnectionForm form;
- protected String parentHelpId;
-
- /**
- * Constructor for SystemConnectionPropertyPage
- */
- public SystemConnectionPropertyPage()
- {
- super();
- parentHelpId = RSEUIPlugin.HELPPREFIX + "pcon0000"; //$NON-NLS-1$
- form = new SystemConnectionForm(this, this);
- }
- /**
- * Create the page's GUI contents.
- */
- protected Control createContentArea(Composite parent)
- {
- // prepare input data
- IHost conn = (IHost)getElement();
- form.initializeInputFields(conn);
- // create validators
- ISystemValidator connectionNameValidators[] = new ISystemValidator[1];
- connectionNameValidators[0] = SystemConnectionForm.getConnectionNameValidator(conn);
- form.setConnectionNameValidators(connectionNameValidators);
- // create content area
- Control c = form.createContents(parent,true, parentHelpId);
- // set focus
- form.getInitialFocusControl().setFocus();
- SystemWidgetHelpers.setCompositeHelp(parent, parentHelpId);
- return c;
- }
-
- /**
- * Get the input connection object
- */
- protected IHost getConnection()
- {
- return (IHost)getElement();
- }
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk()
- {
- boolean okToClose = verifyPageContents();
- if (okToClose)
- {
- IHost conn = (IHost)getElement();
- ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.updateHost( getShell(),conn,conn.getSystemType(),form.getConnectionName(),
- form.getHostName(), form.getConnectionDescription(),
- form.getDefaultUserId(), form.getUserIdLocation() );
-
-
- boolean offlineSelection = form.isWorkOffline();
- if (offlineSelection != conn.isOffline())
- {
- // offline status has changed
- if (!offlineSelection)
- {
- // offline going online
- sr.setHostOffline(conn, false);
- }
- else
- {
- // these need to be set before calling disconnect so the iSeires subsystems know not
- // to collapse
- sr.setHostOffline(conn, true);
-
- // online going offline, disconnect all subsystems
- ISubSystem[] subsystems = sr.getSubSystems(conn);
- if (subsystems != null)
- {
- boolean cancelled = false;
- for (int i = 0; i < subsystems.length && !cancelled; i++)
- {
- try
- {
- subsystems[i].disconnect(false);
- } catch (InterruptedException e) {
- // user cancelled disconnect
- cancelled = true;
- } catch (Exception e) {
- SystemBasePlugin.logError("SystemConnectionPropertyPage.performOk", e); //$NON-NLS-1$
- }
- }
- }
-
- // check that everything was disconnedted okay and this is not the local connection
- if(sr.isAnySubSystemConnected(conn) && !IRSESystemType.SYSTEMTYPE_LOCAL.equals(conn.getSystemType()))
- {
- // backout changes, likely because user cancelled the disconnect
- sr.setHostOffline(conn, false);
- okToClose = false;
- }
- }
- }
- }
- return okToClose;
- }
-
- /**
- * Validate all the widgets on the page
- * <p>
- * Subclasses should override to do full error checking on all
- * the widgets on the page.
- */
- protected boolean verifyPageContents()
- {
- return form.verify(true);
- }
-
-
-
- // ----------------------------------------
- // CALLBACKS FROM SYSTEM CONNECTION FORM...
- // ----------------------------------------
- /**
- * Event: the user has selected a system type.
- */
- public void systemTypeSelected(String systemType, boolean duringInitialization)
- {
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index e89fd98f7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java
+++ /dev/null
@@ -1,396 +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.propertypages;
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-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;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.ISystemMessageLineTarget;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-
-/**
- * The property page for subsystem properties when accessed from the connection property page.
- * The plugin.xml file registers this for objects of class org.eclipse.rse.model.IHost
- <page
- objectClass="org.eclipse.rse.model.IHost"
- name="SubSystems"
- class="org.eclipse.rse.core.ui.propertypages.SystemConnectionSubSystemsPropertyPage"
- id="org.eclipse.rse.SystemConnectionSubSystemsPropertyPage">
- </page>
- */
-public class SystemConnectionSubSystemsPropertyPage extends SystemBasePropertyPage
- implements ISystemMessageLine, ISystemConnectionFormCaller, SelectionListener
-{
-
- protected CTabFolder tabFolder;
- protected ResourceBundle rb;
- protected String parentHelpId;
- protected PropertyPage[] pages;
- protected CTabItem[] tabs;
-
- /**
- * Constructor.
- */
- public SystemConnectionSubSystemsPropertyPage()
- {
- super();
- //RSEUIPlugin sp = RSEUIPlugin.getDefault();
- parentHelpId = RSEUIPlugin.HELPPREFIX + "pcon0000"; //$NON-NLS-1$
- }
-
- /**
- * Return false if you don't want to have mnemonics automatically applied to your page
- * by this parent class. We return false as we assume each subpage does their own.
- */
- protected boolean wantMnemonics()
- {
- return false;
- }
-
- /**
- * Create the page's GUI contents.
- */
- protected Control createContentArea(Composite parent)
- {
- // prepare input data
- //IHost conn = (IHost)getElement();
-
- // create notebook
- Composite composite_prompts = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 1;
- composite_prompts.setLayout(layout);
-
- // create notebook pages
- ISubSystem[] subsystems = getSubSystems();
- pages = getSubSystemPropertyPages(subsystems);
-
- if (pages != null)
- {
- tabFolder = createTabFolder(composite_prompts);
- createTabbedItems(pages);
- tabFolder.setFocus();
- }
- else
- {
- SystemWidgetHelpers.createLabel(composite_prompts, SystemPropertyResources.RESID_TERM_NOTAVAILABLE);
- }
-
- SystemWidgetHelpers.setCompositeHelp(parent, parentHelpId);
- return composite_prompts;
- }
-
- /**
- * Create the notebook.
- */
- protected CTabFolder createTabFolder(Composite parent)
- {
- tabFolder = new CTabFolder(parent, SWT.NONE);
- tabFolder.setLayout(new SystemTabFolderLayout());
- tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
- return tabFolder;
- }
-
- /**
- * Query the property page for each subsystem and then add each to the
- * tabbed notebook as a tab...
- */
- private PropertyPage[] getSubSystemPropertyPages(ISubSystem[] subsystems)
- {
- PropertyPage[] pages = null;
- Vector v = new Vector();
-
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- ISubSystem ss = subsystems[idx];
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ss.getSubSystemConfiguration().getAdapter(ISubSystemConfigurationAdapter.class);
- PropertyPage page = adapter.getPropertyPage(ss, tabFolder);
-
- if (page != null)
- {
- page.setContainer(getContainer());
- }
-
- if (page != null)
- {
- page.setElement((IAdaptable)ss);
-
- if (page instanceof ISystemMessageLineTarget)
- ((ISystemMessageLineTarget)page).setMessageLine(msgLine);
-
- v.addElement(page);
- }
- }
-
- if (v.size() > 0)
- {
- pages = new PropertyPage[v.size()];
-
- for (int idx=0; idx<pages.length; idx++)
- {
- pages[idx] = (PropertyPage)v.elementAt(idx);
- }
- }
-
- return pages;
- }
-
- /**
- * For each property page create a tabbed item.
- */
- private void createTabbedItems(PropertyPage[] pages)
- {
- if (pages != null)
- {
- tabs = new CTabItem[pages.length];
-
- for (int idx = 0; idx < pages.length; idx++)
- {
- PropertyPage page = pages[idx];
- ISubSystem ss = (ISubSystem)((IWorkbenchPropertyPage)page).getElement();
- CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE);
- tabItem.setText(ss.getName());
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ss.getSubSystemConfiguration().getAdapter(ISubSystemConfigurationAdapter.class);
- Image image = adapter.getGraphicsImage(ss.getSubSystemConfiguration());
-
- if (image != null)
- {
- tabItem.setImage(image);
- }
-
- tabItem.setData(page);
-
- if (page.getControl() == null)
- {
- page.createControl(tabFolder);
- }
-
- // dy: Need to force the control to repack incase the buttonbar was added
- // and subsequently removed. Otherwise an ArrayIndexOutOfBounds exception
- // occurs when SWT tries to lay out the page
- page.getControl().pack(true);
- tabItem.setControl(page.getControl());
- tabs[idx] = tabItem;
- }
- }
- }
-
- /**
- * Get the input connection object
- */
- protected IHost getConnection()
- {
- return (IHost)getElement();
- }
-
- /**
- * Get the input subsystems
- */
- protected ISubSystem[] getSubSystems()
- {
- ISubSystem[] subsystems =
- RSEUIPlugin.getTheSystemRegistry().getSubSystems(getConnection());
- return subsystems;
- }
-
- /**
- * The <code>PreferencePage</code> implementation of this
- * <code>IPreferencePage</code> method returns <code>true</code>
- * if the page is valid.
- * <p>
- * We cycle through all pages calling okToLeave().
- */
- public boolean okToLeave()
- {
- boolean ok = isValid();
-
- if (ok && (pages!= null) && (pages.length > 0))
- {
- int currIdx = tabFolder.getSelectionIndex();
-
- // if a page is selected
- if (currIdx != -1)
- {
- PropertyPage currentPage = pages[currIdx];
- ok = currentPage.okToLeave();
- }
-
- for (int idx = 0; ok && (idx < pages.length); idx++)
- {
- if (idx != currIdx)
- {
- PropertyPage page = pages[idx];
- ok = page.okToLeave();
-
- if (!ok)
- {
- tabFolder.setSelection(idx);
- }
- }
- }
- }
-
- return ok;
- }
-
- /**
- * Return true if this page is valid. Override of parent.
- * Cycles through all tab pages calling isValid.
- */
- public boolean isValid()
- {
- boolean ok = super.isValid();
- if (ok && (pages!=null) && (pages.length>0))
- {
- for (int idx=0; ok && (idx<pages.length); idx++)
- {
- PropertyPage page = pages[idx];
- ok = page.isValid();
- }
- }
- return ok;
- }
-
- /**
- * Called by parent when user presses OK.
- * We cycle through all subpages calling performOk
- */
- public boolean performOk()
- {
- boolean okToClose = super.performOk();
-
- if (okToClose && (pages != null) && (pages.length > 0))
- {
- int currIdx = tabFolder.getSelectionIndex();
-
- if (currIdx != -1)
- {
- PropertyPage currentPage = pages[currIdx];
- okToClose = currentPage.performOk();
- }
-
- for (int idx = 0; okToClose && (idx < pages.length); idx++)
- {
- if (idx != currIdx)
- {
- PropertyPage page = pages[idx];
- okToClose = page.performOk();
-
- if (!okToClose)
- {
- tabFolder.setSelection(idx);
- }
- }
- }
- }
-
- return okToClose;
- }
-
- /**
- * Validate all the widgets on the page
- * <p>
- * Subclasses should override to do full error checking on all
- * the widgets on the page.
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- // ----------------------------------------
- // The following were for any aborted attempt to query registered subsystem property pages
- // and use them. The problem with this is that for iSeries, all property pages for subsystems
- // are shared and we ended up with redundancies.
- // ----------------------------------------
-
- // ----------------------------------------
- // SelectionListener methods...
- // ----------------------------------------
- /**
- * A tab item selected
- */
- public void widgetSelected(SelectionEvent event)
- {
- if (event.getSource() == tabFolder)
- {
- }
- }
- /**
- * Not used
- */
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
-
- // ----------------------------------------
- // CALLBACKS FROM SYSTEM CONNECTION FORM...
- // ----------------------------------------
- /**
- * Event: the user has selected a system type.
- */
- public void systemTypeSelected(String systemType, boolean duringInitialization)
- {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectorServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectorServicesPropertyPage.java
deleted file mode 100644
index 8db94f0cb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectorServicesPropertyPage.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.ui.widgets.services.ConnectorServiceElement;
-import org.eclipse.rse.ui.widgets.services.ConnectorServicesForm;
-import org.eclipse.rse.ui.widgets.services.RootServiceElement;
-import org.eclipse.rse.ui.widgets.services.ServiceElement;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-public class SystemConnectorServicesPropertyPage extends SystemBasePropertyPage
-{
- private ConnectorServicesForm _form;
- private ServiceElement _root;
- public IHost getHost()
- {
- return (IHost)getElement();
- }
-
-
- protected Control createContentArea(Composite parent)
- {
- _form = new ConnectorServicesForm(getMessageLine());
-
- Control control = _form.createContents(parent);
- initForm();
- return control;
- }
-
-
- protected void initForm()
- {
- _root = getRoot();
- _form.init(_root);
- }
-
- protected ServiceElement getRoot()
- {
- RootServiceElement root = new RootServiceElement();
- IHost host = getHost();
- IConnectorService[] connectorServices = host.getConnectorServices();
- ServiceElement[] elements = new ServiceElement[connectorServices.length];
- for (int i = 0; i < connectorServices.length; i++)
- {
- elements[i] = new ConnectorServiceElement(host, root, connectorServices[i]);
- }
- root.setChildren(elements);
- return root;
- }
-
- protected boolean verifyPageContents()
- {
- return true;
- }
-
-
- public boolean performCancel()
- {
- _root.revert();
- return super.performCancel();
- }
-
-
- public boolean performOk()
- {
- _root.commit();
- return super.performOk();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index e2c9aa690..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolPropertyPage.java
+++ /dev/null
@@ -1,125 +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.propertypages;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- * The property page for filter pool properties.
- * This is an output-only page.
- * The plugin.xml file registers this for objects of class org.eclipse.rse.internal.filters.SystemFilterPool
- */
-public class SystemFilterPoolPropertyPage extends SystemBasePropertyPage
-{
-
- protected Label labelType, labelName, labelProfile, labelReferenceCount, labelRelatedConnection;
- protected String errorMessage;
- protected boolean initDone = false;
-
- /**
- * Constructor
- */
- public SystemFilterPoolPropertyPage()
- {
- super();
- }
- /**
- * Create the page's GUI contents.
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- // ensure the page has no special buttons
- noDefaultAndApplyButton();
-
- // Inner composite
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 2);
-
- // Type display
- labelType = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_PROPERTIES_TYPE_LABEL, SystemResources.RESID_PP_PROPERTIES_TYPE_TOOLTIP);
- labelType.setText(SystemResources.RESID_FILTERPOOL_TYPE_VALUE);
-
- // Name display
- labelName = createLabeledLabel(composite_prompts, SystemResources.RESID_FILTERPOOL_NAME_LABEL, SystemResources.RESID_FILTERPOOL_NAME_TOOLTIP);
-
- // Profile display
- labelProfile = createLabeledLabel(composite_prompts, SystemResources.RESID_FILTERPOOL_PROFILE_LABEL, SystemResources.RESID_FILTERPOOL_PROFILE_TOOLTIP);
-
- // Reference count display
- labelReferenceCount = createLabeledLabel(composite_prompts, SystemResources.RESID_FILTERPOOL_REFERENCECOUNT_LABEL, SystemResources.RESID_FILTERPOOL_REFERENCECOUNT_TOOLTIP);
-
- // Related connection display
- labelRelatedConnection = createLabeledLabel(composite_prompts, SystemResources.RESID_FILTERPOOL_RELATEDCONNECTION_LABEL, SystemResources.RESID_FILTERPOOL_RELATEDCONNECTION_TOOLTIP);
-
- if (!initDone)
- doInitializeFields();
-
- return composite_prompts;
- }
- /**
- * From parent: do full page validation
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * Get the input filterpool object
- */
- protected ISystemFilterPool getFilterPool()
- {
- Object element = getElement();
- if (element instanceof ISystemFilterPool)
- return (ISystemFilterPool)element;
- else
- return ((ISystemFilterPoolReference)element).getReferencedFilterPool();
- }
-
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- ISystemFilterPool pool = getFilterPool();
- // name
- labelName.setText(pool.getName());
- // profile
- ISubSystemConfiguration ssFactory = (ISubSystemConfiguration)(pool.getProvider());
- String profileName = ssFactory.getSystemProfile(pool).getName();
- labelProfile.setText( profileName );
- // reference count
- labelReferenceCount.setText(Integer.toString(pool.getReferenceCount()));
- // related connection
- if (pool.getOwningParentName() == null)
- labelRelatedConnection.setText(SystemPropertyResources.RESID_TERM_NOTAPPLICABLE);
- else
- labelRelatedConnection.setText(pool.getOwningParentName());
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 494e19215..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolReferencePropertyPage.java
+++ /dev/null
@@ -1,115 +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.propertypages;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- * The property page for filter pool properties.
- * This is an output-only page.
- * The plugin.xml file registers this for objects of class org.eclipse.rse.internal.filters.SystemFilterPool
- */
-public class SystemFilterPoolReferencePropertyPage extends SystemBasePropertyPage
-{
-
- protected Label labelType, labelName, labelSubSystem, labelProfile, labelConnection; //, labelRelatedConnection;
- protected String errorMessage;
- protected boolean initDone = false;
-
- /**
- * Constructor
- */
- public SystemFilterPoolReferencePropertyPage()
- {
- super();
- }
- /**
- * Create the page's GUI contents.
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- // Inner composite
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 2);
-
- // Type display
- labelType = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_PROPERTIES_TYPE_LABEL, SystemResources.RESID_PP_PROPERTIES_TYPE_TOOLTIP);
- labelType.setText(SystemResources.RESID_FILTERPOOLREF_TYPE_VALUE);
-
- // Name display
- labelName = createLabeledLabel(composite_prompts, SystemResources.RESID_FILTERPOOLREF_NAME_LABEL, SystemResources.RESID_FILTERPOOLREF_NAME_TOOLTIP);
-
- // SubSystem display
- labelSubSystem = createLabeledLabel(composite_prompts, SystemResources.RESID_FILTERPOOLREF_SUBSYSTEM_LABEL, SystemResources.RESID_FILTERPOOLREF_SUBSYSTEM_TOOLTIP);
-
- // Connection display
- labelConnection = createLabeledLabel(composite_prompts, SystemResources.RESID_FILTERPOOLREF_CONNECTION_LABEL, SystemResources.RESID_FILTERPOOLREF_CONNECTION_TOOLTIP);
-
- // Profile display
- labelProfile = createLabeledLabel(composite_prompts, SystemResources.RESID_FILTERPOOLREF_PROFILE_LABEL, SystemResources.RESID_FILTERPOOLREF_PROFILE_TOOLTIP);
-
- if (!initDone)
- doInitializeFields();
-
- return composite_prompts;
- }
- /**
- * From parent: do full page validation
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * Get the input filterpoolreference object
- */
- protected ISystemFilterPoolReference getFilterPoolReference()
- {
- return ((ISystemFilterPoolReference)getElement());
- }
-
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- ISystemFilterPoolReference poolRef = getFilterPoolReference();
- ISystemFilterPool pool = poolRef.getReferencedFilterPool();
- ISubSystem ss = (ISubSystem)poolRef.getProvider();
-
- // name
- labelName.setText(pool.getName());
- // subsystem
- labelSubSystem.setText(ss.getName());
- // connection
- labelConnection.setText(ss.getHostAliasName());
- // profile
- labelProfile.setText(ss.getSystemProfileName());
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 19b9ebe99..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPropertyPage.java
+++ /dev/null
@@ -1,134 +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.propertypages;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- * The property page for filter properties.
- * This is an output-only page.
- * The plugin.xml file registers this for objects of class org.eclipse.rse.internal.filters.SystemFilter
- */
-public class SystemFilterPropertyPage extends SystemBasePropertyPage
-{
-
- protected Label labelType, labelName, labelFilterPool, labelStringCount, labelIsConnectionPrivate, labelProfile;
- protected String errorMessage;
- protected boolean initDone = false;
-
- /**
- * Constructor
- */
- public SystemFilterPropertyPage()
- {
- super();
- }
- /**
- * Create the page's GUI contents.
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- // Inner composite
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 2);
-
- // Type display
- labelType = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_PROPERTIES_TYPE_LABEL, SystemResources.RESID_PP_PROPERTIES_TYPE_TOOLTIP);
- labelType.setText(SystemResources.RESID_PP_FILTER_TYPE_VALUE);
-
- // Name display
- labelName = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_FILTER_NAME_LABEL, SystemResources.RESID_PP_FILTER_NAME_TOOLTIP);
-
- // String count display
- labelStringCount = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_FILTER_STRINGCOUNT_LABEL, SystemResources.RESID_PP_FILTER_STRINGCOUNT_TOOLTIP);
-
- // Is connection-private display
- labelIsConnectionPrivate = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_FILTER_ISCONNECTIONPRIVATE_LABEL, SystemResources.RESID_PP_FILTER_ISCONNECTIONPRIVATE_TOOLTIP);
-
- // Parent Filter Pool display
- labelFilterPool = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_FILTER_FILTERPOOL_LABEL, SystemResources.RESID_PP_FILTER_FILTERPOOL_TOOLTIP);
-
- // Parent Profile display
- labelProfile = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_FILTER_PROFILE_LABEL, SystemResources.RESID_PP_FILTER_PROFILE_TOOLTIP);
-
- if (!initDone)
- doInitializeFields();
-
- return composite_prompts;
- }
- /**
- * From parent: do full page validation
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * Get the input filter object
- */
- protected ISystemFilter getFilter()
- {
- Object element = getElement();
- if (element instanceof ISystemFilter)
- return (ISystemFilter)element;
- else
- return ((ISystemFilterReference)element).getReferencedFilter();
- }
-
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- ISystemFilter filter = getFilter();
- boolean isTransient = filter.isTransient();
- // name
- labelName.setText(filter.getName());
- // type
- if (filter.isPromptable())
- labelType.setText(SystemResources.RESID_PP_FILTER_TYPE_PROMPTABLE_VALUE);
- if (!isTransient)
- {
- // pool
- ISystemFilterPool pool = filter.getParentFilterPool();
- labelFilterPool.setText(pool.getName());
- // profile
- ISubSystemConfiguration ssFactory = (ISubSystemConfiguration)(pool.getProvider());
- String profileName = ssFactory.getSystemProfile(pool).getName();
- labelProfile.setText( profileName );
- // string count
- labelStringCount.setText(Integer.toString(filter.getFilterStringCount()));
- // is connection-private
- if (pool.getOwningParentName() == null)
- labelIsConnectionPrivate.setText(SystemResources.TERM_NO);
- else
- labelIsConnectionPrivate.setText(SystemResources.TERM_YES);
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index f3a4dc054..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterStringPropertyPage.java
+++ /dev/null
@@ -1,339 +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.propertypages;
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.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;
-import org.eclipse.rse.ui.filters.SystemFilterStringEditPane;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterString;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The property page for filter string properties.
- * This is an output-only page.
- * The plugin.xml file registers this for objects of class org.eclipse.rse.internal.filters.SystemFilterString
- */
-public class SystemFilterStringPropertyPage extends SystemBasePropertyPage implements ISystemFilterStringEditPaneListener
-{
- //gui
- protected Label labelType, labelFilter, labelFilterPool, labelProfile;
- //protected Label labelString;
- //input
- protected SystemFilterStringEditPane editPane;
- protected ISystemValidator filterStringValidator;
- protected SystemMessage dupeFilterStringMessage;
- protected boolean editable = true;
- //state
- protected Composite composite_prompts;
- protected SystemMessage errorMessage;
- protected ResourceBundle rb;
- protected boolean initDone = false;
-
- /**
- * Constructor
- */
- public SystemFilterStringPropertyPage()
- {
- super();
- }
-
- // configuration methods, called by customizeFilterStringPropertyPage in SubSystemConfigurationImpl...
-
- /**
- * <i>Configuration method</i><br>
- * Specify an edit pane that prompts the user for the contents of a filter string.
- */
- public void setFilterStringEditPane(SystemFilterStringEditPane editPane)
- {
- this.editPane = editPane;
- }
- /**
- * <i>Configuration method</i><br>
- * Set the contextual system filter pool reference manager provider. Will be non-null if the
- * current selection is a reference to a filter pool or filter, or a reference manager
- * provider itself (eg subsystem)
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
- {
- editPane.setSystemFilterPoolReferenceManagerProvider(provider);
- }
- /**
- * <i>Configuration method</i><br>
- * Set the contextual system filter pool manager provider. Will be non-null if the
- * current selection is a filter pool or filter or reference to either, or a manager
- * provider itself (eg subsystemconfiguration)
- * <p>
- * This is passed into the filter and filter string wizards and dialogs in case it is needed
- * for context.
- */
- public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider provider)
- {
- editPane.setSystemFilterPoolManagerProvider(provider);
- }
- /**
- * <i>Configuration method</i><br>
- * Call this to specify a validator for the filter string. It will be called per keystroke.
- * A default validator is supplied otherwise: ValidatorFilterString.
- * <p>
- * Your validator should extend ValidatorFilterString to inherited the uniqueness error checking.
- * <p>
- * Alternatively, if all you want is a unique error message for the case when duplicates are found,
- * call setDuplicateFilterStringErrorMessage, and it will be used in the default validator.
- */
- public void setFilterStringValidator(ISystemValidator v)
- {
- filterStringValidator = v;
- }
- /**
- * <i>Configuration method</i><br>
- * Set the error message to use when the user is editing or creating a filter string, and the
- * Apply processing detects a duplicate filter string in the list.
- */
- public void setDuplicateFilterStringErrorMessage(SystemMessage msg)
- {
- dupeFilterStringMessage = msg;
- }
- /**
- * Set if the edit pane is not to be editable
- */
- public void setEditable(boolean editable)
- {
- editable = false;
- }
-
- // lifecyle methods...
-
- /**
- * Create the page's GUI contents.
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- // Inner composite
- composite_prompts = SystemWidgetHelpers.createComposite(parent, 2);
-
- // Type display
- labelType = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_PROPERTIES_TYPE_LABEL, SystemResources.RESID_PP_PROPERTIES_TYPE_TOOLTIP);
- labelType.setText(SystemResources.RESID_PP_FILTERSTRING_TYPE_VALUE);
-
- // String display
- //labelString = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_FILTERSTRING_STRING_ROOT);
-
- // Parent Filter display
- labelFilter = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_FILTERSTRING_FILTER_LABEL, SystemResources.RESID_PP_FILTERSTRING_FILTER_TOOLTIP);
-
- // Parent Filter Pool display
- labelFilterPool = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_FILTERSTRING_FILTERPOOL_LABEL, SystemResources.RESID_PP_FILTERSTRING_FILTERPOOL_TOOLTIP);
-
- // Parent Profile display
- labelProfile = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_FILTERSTRING_PROFILE_LABEL, SystemResources.RESID_PP_FILTERSTRING_PROFILE_TOOLTIP);
-
- if (!initDone)
- doInitializeFields();
-
- return composite_prompts;
- }
- /**
- * From parent: do full page validation
- */
- protected boolean verifyPageContents()
- {
- boolean ok = false;
- clearErrorMessage();
- errorMessage = editPane.verify();
- if (errorMessage == null)
- {
- ok = true;
- String editedFilterString = editPane.getFilterString();
- if (filterStringValidator != null)
- {
- errorMessage = filterStringValidator.validate(editedFilterString);
- }
- }
- if (errorMessage != null)
- {
- ok = false;
- setErrorMessage(errorMessage);
- }
- //System.out.println("Inside verifyPageContents. errorMessage = "+errorMessage);
- return ok;
- }
-
- /**
- * Get the input filter string object
- */
- protected ISystemFilterString getFilterString()
- {
- Object element = getElement();
- return ((ISystemFilterString)element);
- }
-
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- ISystemFilterString filterstring = getFilterString();
- ISystemFilter filter = filterstring.getParentSystemFilter();
- // string
- //labelString.setText(filterstring.getString());
- // filter
- labelFilter.setText(filter.getName());
- // pool
- ISystemFilterPool pool = filter.getParentFilterPool();
- labelFilterPool.setText(pool.getName());
- // profile
- ISubSystemConfiguration ssFactory = (ISubSystemConfiguration)(pool.getProvider());
- String profileName = ssFactory.getSystemProfile(pool).getName();
- labelProfile.setText( profileName );
-
- // edit pane
- ISubSystemConfiguration factory = (ISubSystemConfiguration)filter.getProvider();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)factory.getAdapter(ISubSystemConfigurationAdapter.class);
- adapter.customizeFilterStringPropertyPage(factory, this, filterstring, getShell());
- if (editPane == null)
- {
- Shell shell = getShell();
- //System.out.println("Shell is: "+shell);
- editPane = new SystemFilterStringEditPane(shell);
- }
- editPane.setSystemFilterPoolManagerProvider(filter.getProvider());
- editPane.setChangeFilterMode(true);
- editPane.addChangeListener(this);
- Control editPaneComposite = editPane.createContents(composite_prompts);
- ((GridData)editPaneComposite.getLayoutData()).horizontalSpan = 2;
-
- editPane.setFilterString(filterstring.getString(), 0);
- if (!editable || filter.isNonChangable())
- editPaneComposite.setEnabled(false);
- else if (filterStringValidator == null)
- {
- Vector existingStrings = filter.getFilterStringsVector();
- existingStrings.remove(filterstring);
- filterStringValidator = new ValidatorFilterString(existingStrings, filter.isStringsCaseSensitive());
- if (dupeFilterStringMessage != null)
- ((ValidatorFilterString)filterStringValidator).setDuplicateFilterStringErrorMessage(dupeFilterStringMessage);
- }
- }
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk()
- {
- boolean ok = super.performOk();
- if (!ok)
- return false;
- ISystemFilterString filterstring = getFilterString();
- ISystemFilter filter = filterstring.getParentSystemFilter();
- ISystemFilterPool pool = filter.getParentFilterPool(); // recurses for nested filter
- ISystemFilterPoolManager mgr = pool.getSystemFilterPoolManager();
- try
- {
- mgr.updateSystemFilterString(filterstring, editPane.getFilterString());
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("Error updating filter string from property page", e); //$NON-NLS-1$
- e.printStackTrace();
- SystemMessageDialog.displayMessage(getShell(), e);
- ok = false;
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("Error updating filter string from property page", e); //$NON-NLS-1$
- e.printStackTrace();
- SystemMessageDialog.displayExceptionMessage(getShell(), e);
- ok = false;
- }
-
- /*
- String[] listItems = listView.getItems();
- String[] filterStrings = new String[listItems.length - 1];
- for (int idx=0; idx<filterStrings.length; idx++)
- filterStrings[idx] = listItems[idx+1];
- try {
- mgr.updateSystemFilter(inputFilter, inputFilter.getName(), filterStrings);
- }
- catch (SystemMessageException exc)
- {
- getMessageLine().setErrorMessage(exc.getSystemMessage());
- return false;
- }
- catch (Exception exc)
- {
- //displayErrorMessage("Error updating filter: " + exc.getMessage());
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPDATEFILTER_FAILED);
- String excText = exc.getMessage();
- if (excText == null)
- excText = exc.getClass().getName();
- msg.makeSubstitution(excText,exc);
- getMessageLine().setErrorMessage(msg);
- return false;
- }*/
- return ok;
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.filters.ISystemFilterStringEditPaneListener#filterStringChanged(org.eclipse.rse.core.ui.messages.SystemMessage)
- */
- public void filterStringChanged(SystemMessage message)
- {
- if (message == null)
- clearErrorMessage();
- else
- setErrorMessage(message);
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.filters.ISystemFilterStringEditPaneListener#backupChangedState()
- */
- public void backupChangedState()
- {
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.filters.ISystemFilterStringEditPaneListener#restoreChangedState()
- */
- public void restoreChangedState()
- {
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemIntegerFieldEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemIntegerFieldEditor.java
deleted file mode 100644
index 04fda078f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemIntegerFieldEditor.java
+++ /dev/null
@@ -1,100 +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.propertypages;
-
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * A version of an IntegerFieldEditor which allows setting tooltip and help
- * If value is outside of valid range, message will tell user what the valid range is
- */
-public class SystemIntegerFieldEditor extends IntegerFieldEditor {
-
- public static final String Copyright = "(C) Copyright IBM Corp. 2003 All Rights Reserved."; //$NON-NLS-1$
-
-
- /**
- * the message for an empty field
- */
- private static final String RANGE_MESSAGE = "RSEG0402"; //$NON-NLS-1$
-
- protected Composite composite_parent = null;
-
- /**
- * @see java.lang.Object#Object()
- */
- public SystemIntegerFieldEditor() {
- super();
- }
-
- /**
- * @see org.eclipse.jface.preference.FieldEditor#FieldEditor(String, String, Composite)
- */
- public SystemIntegerFieldEditor(
- String name,
- String labelText,
- Composite parent) {
- super(name, labelText, parent);
- composite_parent = parent;
- }
-
- /**
- * @see org.eclipse.jface.preference.IntegerFieldEditor#setValidRange(int, int)
- */
- public void setValidRange(int min,int max) {
- super.setValidRange(min, max);
- SystemMessage msg = RSEUIPlugin.getPluginMessage(RANGE_MESSAGE);
- setErrorMessage(msg.makeSubstitution(getLabelControl().getText(), new Integer(min), new Integer(max)).getLevelOneText());
- }
-
- /**
- * Method setHelp.
- * Sets the info pop help for this field editor
- * @param contextId the context ID for the help
- */
- public void setHelp(String contextId) {
- SystemWidgetHelpers.setHelp(getTextControl(), contextId);
- }
-
- /**
- * Method setToolTipText.
- * The tooltip text
- * @param tip the tip to set for the entry field
- */
- public void setToolTipText(String tip) {
- getTextControl().setToolTipText(tip);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#setEnabled(boolean, org.eclipse.swt.widgets.Composite)
- */
- public void setEnabled(boolean enabled)
- {
- super.setEnabled(enabled, composite_parent);
- }
-
- /* (non-Javadoc)
- * Method declared on FieldEditor.
- */
- public void refreshValidState() {
- super.refreshValidState();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemKeyValueFieldEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemKeyValueFieldEditor.java
deleted file mode 100644
index f9acebcf2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemKeyValueFieldEditor.java
+++ /dev/null
@@ -1,640 +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.propertypages;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorSpecialChar;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-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.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-
-
-/**
- * For string key,value pair properties that have a discrete list of key values.
- * Used in preference pages.
- */
-public class SystemKeyValueFieldEditor extends FieldEditor
-{
- private List keysField;
- private Text valueField;
- private Label keysLabel, valueLabel;
- private Composite keysComposite, valueComposite;
- private Group boxComposite;
- private Button setButton, clearButton;
- private String keysLabelString, valueLabelString;
- private char keyValueDelimiter='=';
- private char keyValuePairDelimiter=';';
- private SystemMessage errorMessage;
- private boolean contentInited;
- protected ISystemValidator valueValidator, defaultValueValidator;
- private String[] contentArray;
- private Hashtable keyValues;
- private SelectionListener selectionListener;
-
- private static boolean boxFlavor = true;
-
- /**
- * Constructor
- */
- private SystemKeyValueFieldEditor()
- {
- super();
- }
-
- /**
- * Constructor
- */
- public SystemKeyValueFieldEditor(String name, String labelText, String[] keys,
- String keysLabelString, String valueLabelString, Composite parent)
- {
- super(name, labelText, parent);
- keyValues = new Hashtable();
- contentArray = keys;
- this.keysLabelString = keysLabelString;
- this.valueLabelString = valueLabelString;
- // the ctor's call to super causes the controls to be created before this
- // instance data is accessible, so we do it now...
- keysLabel.setText(keysLabelString);
- valueLabel.setText(valueLabelString);
- //if (boxFlavor)
- // boxComposite.setText(labelText);
- initContents();
-
- String specialChars = makeString(keyValueDelimiter,keyValuePairDelimiter);
- defaultValueValidator = new ValidatorSpecialChar(specialChars, ValidatorSpecialChar.EMPTY_ALLOWED_YES);
- }
-
- /**
- * Call this to specify a validator for the value entry field. It will be called per keystroke.
- * By default we just check against the special characters used to delimit the key and value (=)
- * and to delimiter each key/value pair (;)
- */
- public void setValueValidator(ISystemValidator v)
- {
- valueValidator = v;
- }
- /**
- * Call this to set the characters used to delimit the strings in the preferences store
- * @param keyValueDelimiter The char to distinguish between key and value. Default is =
- * @param keyValuePairDelimiter The char to distinguish between each key/value pair. Default is ;
- */
- public void setDelimiterCharacters(char keyValueDelimiter, char keyValuePairDelimiter)
- {
- this.keyValueDelimiter = keyValueDelimiter;
- this.keyValuePairDelimiter = keyValuePairDelimiter;
- String specialChars = makeString(keyValueDelimiter,keyValuePairDelimiter);
- defaultValueValidator = new ValidatorSpecialChar(specialChars, ValidatorSpecialChar.EMPTY_ALLOWED_YES);
- }
-
- /**
- * @see FieldEditor#getNumberOfControls()
- */
- public int getNumberOfControls()
- {
- return boxFlavor ? 1 : 2;
- }
-
- /**
- * @see FieldEditor#doStore()
- */
- protected void doStore()
- {
- String s = createString(keyValues);
- if (s != null)
- getPreferenceStore().setValue(getPreferenceName(), s);
- }
-
- /**
- * @see FieldEditor#doLoadDefault()
- */
- protected void doLoadDefault()
- {
- if (keysField != null)
- {
- String value = getPreferenceStore().getDefaultString(getPreferenceName());
- if (value != null)
- keyValues = parseString(value);
- else
- keyValues = new Hashtable();
- valueField.setText(""); //$NON-NLS-1$
- keysField.select(0);
- clearButton.setEnabled(false);
- setButton.setEnabled(false);
- //selectionChanged();
- }
- }
-
- /**
- * @see FieldEditor#doLoad()
- */
- protected void doLoad()
- {
- //if (keysField != null)
- //{
- String value = getPreferenceStore().getString(getPreferenceName());
- if ((value == null) || (value.length()==0))
- value = getPreferenceStore().getDefaultString(getPreferenceName());
- if (value != null)
- keyValues = parseString(value);
- if (keysField != null)
- {
- keysField.select(0);
- selectionChanged();
- }
- //}
- }
-
- /**
- * Parse out list of key-value pairs into a hashtable
- */
- public Hashtable parseString(String allvalues)
- {
- StringTokenizer tokens = new StringTokenizer(allvalues, makeString(keyValueDelimiter, keyValuePairDelimiter));
- Hashtable keyValues = new Hashtable(10);
- int count = 0;
- String token1=null;
- String token2=null;
- while (tokens.hasMoreTokens())
- {
- count++;
- if ((count % 2) == 0) // even number
- {
- token2 = tokens.nextToken();
- keyValues.put(token1, token2);
- }
- else
- token1 = tokens.nextToken();
- }
- return keyValues;
- }
- /**
- * Convert hashtable of key-value pairs into a single string
- */
- protected String createString(Hashtable keyValues)
- {
- Enumeration keys = keyValues.keys();
- StringBuffer sb = new StringBuffer();
- while (keys.hasMoreElements())
- {
- String key = (String)keys.nextElement();
- String value = (String)keyValues.get(key);
- if ((value != null) && (value.length()>0))
- {
- sb.append(key);
- sb.append(keyValueDelimiter);
- sb.append(value);
- sb.append(keyValuePairDelimiter);
- }
- }
- //System.out.println("Pref String: " + sb);
- return sb.toString();
- }
-
-
- private String makeString(char charOne, char charTwo)
- {
- StringBuffer s = new StringBuffer(2);
- s.append(charOne);
- s.append(charTwo);
- return s.toString();
- }
-
- private void initContents()
- {
- if ((contentArray!=null) && (keysField!=null) && !contentInited)
- {
- keysField.setItems(contentArray);
- contentInited = true;
- }
- }
-
- /**
- * @see FieldEditor#doFillIntoGrid(Composite, int)
- */
- protected void doFillIntoGrid(Composite parent, int numColumns)
- {
- GridData gd = null;
- // label goes all the way across top
- if (!boxFlavor)
- {
- Control control = getLabelControl(parent);
- if (control!=null)
- {
- gd = new GridData();
- gd.horizontalSpan = numColumns;
- control.setLayoutData(gd);
- }
- }
-
-boxComposite = SystemWidgetHelpers.createGroupComposite(parent, 2, getLabelText());
- ((GridData)boxComposite.getLayoutData()).horizontalSpan = numColumns;
-// parentComposite = boxComposite;
-// numparentcols = 2;
-
- // under the label we place a labeled combo box, and so on
- keysComposite = getKeysControl(boxComposite);
-// gd = new GridData();
-// gd.horizontalAlignment = GridData.FILL;
-// gd.grabExcessHorizontalSpace = true;
-// gd = new GridData(GridData.FILL_BOTH); //dwd
-// keysComposite.setLayoutData(gd);
-
- valueComposite = getValueControl(boxComposite);
-// gd = new GridData();
-// gd.horizontalSpan = numparentcols - 1;
-// gd.horizontalAlignment = GridData.FILL;
-// gd.grabExcessHorizontalSpace = true;
-// gd = new GridData(GridData.FILL_BOTH); //dwd
-// keysComposite.setLayoutData(gd);
-
- }
-
-
- /**
- * @see FieldEditor#adjustForNumColumns(int)
- */
- protected void adjustForNumColumns(int numColumns)
- {
- Control control = getLabelControl();
- if (control != null)
- ((GridData)control.getLayoutData()).horizontalSpan = numColumns;
- if (boxComposite != null)
- ((GridData)boxComposite.getLayoutData()).horizontalSpan = numColumns;
- }
-
-
-
- /**
- * Returns this field editor's List control for the keys.
- */
- protected List getKeysControl()
- {
- return keysField;
- }
- /**
- * Returns this field editor's Text control for the key value.
- */
- protected Text getValueControl()
- {
- return valueField;
- }
-
-
- /**
- * Returns this field editor's text control.
- * <p>
- * The control is created if it does not yet exist
- * </p>
- *
- * @param parent the parent
- * @return the text control
- */
- public Composite getKeysControl(Composite parent)
- {
- if (keysComposite == null)
- {
- // create composite
- keysComposite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- keysComposite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH); // dwd was FILL_HORIZONTAL
- data.heightHint = 150; // dwd was 100
- keysComposite.setLayoutData(data);
- // populate with label
- keysLabel = new Label(keysComposite, SWT.NULL);
- if (keysLabelString != null)
- keysLabel.setText(keysLabelString);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 150;
- keysLabel.setLayoutData(data);
- // populate with list
- int options = SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL;
- keysField = new List(keysComposite, options);
- data = new GridData(GridData.FILL_BOTH); // dwd was FILL_HORIZONTAL
- data.widthHint = 150;
- keysField.setLayoutData(data);
- keysField.addSelectionListener(getSelectionListener());
-
- keysComposite.addDisposeListener(new DisposeListener()
- {
- public void widgetDisposed(DisposeEvent event)
- {
- keysComposite = null;
- keysField = null;
- keysLabel = null;
- }
- });
- }
- // else
- // {
- // checkParent(keysComposite, parent);
- // }
- return keysComposite;
- }
-
- /**
- * Returns this field editor's value entry field control.
- *
- * @param parent the parent control
- * @return the list control
- */
- public Composite getValueControl(Composite parent)
- {
- if (valueComposite == null)
- {
- // create composite
- valueComposite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- valueComposite.setLayout(layout);
- //GridData data = new GridData(GridData.FILL_HORIZONTAL);
- // DKM: not filling vertical causes trucations on linux
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 150; // dwd was 100
- valueComposite.setLayoutData(data);
- // populate with label
- valueLabel = new Label(valueComposite, SWT.NULL);
- if (valueLabelString != null)
- valueLabel.setText(valueLabelString);
- data = new GridData(GridData.FILL_HORIZONTAL);
- valueLabel.setLayoutData(data);
- // populate with entry field
- valueField = new Text(valueComposite, SWT.BORDER | SWT.SINGLE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 150;
- valueField.setLayoutData(data);
- // populate with button
- setButton = createPushButton(valueComposite, SystemResources.ACTION_SET_LABEL, SystemResources.ACTION_SET_TOOLTIP);
- clearButton = createPushButton(valueComposite, SystemResources.ACTION_CLEAR_LABEL, SystemResources.ACTION_CLEAR_TOOLTIP);
-
- // add keystroke listener...
- valueField.addModifyListener(
- new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateValueInput();
- }
- }
- );
- // add dispose listener
- valueComposite.addDisposeListener(new DisposeListener()
- {
- public void widgetDisposed(DisposeEvent event)
- {
- valueComposite = null;
- valueField = null;
- valueLabel = null;
- setButton = null;
- }
- });
- }
- // else
- // {
- // checkParent(valueComposite, parent);
- // }
- return valueComposite;
- }
-
- /**
- * Helper method to create a push button.
- *
- * @param parent the parent control
- * @param label
- * @param tooltip
- */
- private Button createPushButton(Composite parent, String label, String tooltip)
- {
- Button button = new Button(parent, SWT.PUSH);
- button.setText(label);
- button.setToolTipText(tooltip);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- int widthHint = convertHorizontalDLUsToPixels(button, IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- button.setLayoutData(data);
- button.addSelectionListener(getSelectionListener());
- return button;
- }
-
- /**
- * Returns this field editor's selection listener.
- * The listener is created if nessessary.
- *
- * @return the selection listener
- */
- private SelectionListener getSelectionListener()
- {
- if (selectionListener == null)
- createSelectionListener();
- return selectionListener;
- }
-
- /**
- * Creates a selection listener.
- */
- public void createSelectionListener()
- {
- selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- Widget widget = event.widget;
- if (widget == setButton)
- setPressed();
- else if (widget == clearButton)
- clearPressed();
- else if (widget == keysField)
- selectionChanged();
- }
- };
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the PreferencePage's message line.
- * @see #setValueValidator(ISystemValidator)
- */
- protected SystemMessage validateValueInput()
- {
- errorMessage= null;
- String valueInput = valueField.getText().trim();
- if (valueValidator != null)
- errorMessage = valueValidator.validate(valueInput);
- else if (defaultValueValidator != null)
- errorMessage = defaultValueValidator.validate(valueInput);
- if (errorMessage != null)
- showErrorMessage(errorMessage.getLevelOneText());
- else
- clearErrorMessage();
- setButton.setEnabled((errorMessage == null) && (valueInput.length()>0));
- //clearButton.setEnabled(true);
- return errorMessage;
- }
-
- /**
- * Notifies that the Set button has been pressed.
- */
- private void setPressed()
- {
- setPresentsDefaultValue(false);
- int index = keysField.getSelectionIndex();
- if (index >= 0)
- {
- String value = valueField.getText().trim();
- valueField.setText(value);
- if (value.length() == 0)
- keyValues.remove(contentArray[index]);
- else
- keyValues.put(contentArray[index],value);
- selectionChanged();
- }
- else
- setButton.setEnabled(false);
- }
-
- /**
- * Notifies that the Clear button has been pressed.
- */
- private void clearPressed()
- {
- setPresentsDefaultValue(false);
- int index = keysField.getSelectionIndex();
- if (index >= 0)
- {
- //valueField.setText("");
- keyValues.remove(contentArray[index]);
- selectionChanged();
- }
- else
- clearButton.setEnabled(false);
- }
- /**
- * Notifies that the list selection has changed.
- */
- private void selectionChanged()
- {
- int index = keysField.getSelectionIndex();
- if (index >= 0)
- {
- String key = contentArray[index];
- String value = (String)keyValues.get(key);
- if (value == null)
- {
- valueField.setText(""); //$NON-NLS-1$
- clearButton.setEnabled(false);
- }
- else
- {
- valueField.setText(value);
- clearButton.setEnabled(true);
- }
- }
- else
- {
- clearButton.setEnabled(false);
- }
- setButton.setEnabled(false);
- }
-
- /**
- * Change the height hint for this composite.
- * Default is 100 pixels.
- */
- public void setHeightHint(int hint)
- {
- if (keysComposite != null)
- ((GridData)keysComposite.getLayoutData()).heightHint = hint;
- if (valueComposite != null)
- ((GridData)valueComposite.getLayoutData()).heightHint = hint;
-
- }
- /**
- * Change the width hint for the keys list
- * Default is 150 pixels.
- */
- public void setKeysWidthHint(int hint)
- {
- if (keysComposite != null)
- ((GridData)keysComposite.getLayoutData()).widthHint = hint;
- }
- /**
- * Change the width hint for the values fields on the right
- * Default is not set
- */
- public void setValuesWidthHint(int hint)
- {
- if (valueComposite != null)
- ((GridData)valueComposite.getLayoutData()).widthHint = hint;
- }
-
- /**
- * Set the tooltip text
- */
- public void setToolTipText(String tip)
- {
- if (boxFlavor)
- boxComposite.setToolTipText(tip);
- else
- {
- keysComposite.setToolTipText(tip);
- valueComposite.setToolTipText(tip);
- }
- }
- /**
- * Get the tooltip text
- */
- public String getToolTipText()
- {
- if (boxFlavor)
- return boxComposite.getToolTipText();
- else
- return keysComposite.getToolTipText();
- }
-
- /*
- * Override to return null!
- *
- public Label getLabelControl(Composite parent)
- {
- System.out.println("Inside getLabelControl");
- return super.getLabelControl(parent);
- }*/
-} \ No newline at end of file
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
deleted file mode 100644
index f94bb3cf2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemLoggingPreferencePage.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-
-import org.eclipse.rse.logging.ui.LoggingPreferencePage;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-
-/**
- * The logging preference page for Remote Systems.
- */
-public class SystemLoggingPreferencePage extends LoggingPreferencePage {
-
- /**
- * @see org.eclipse.rse.logging.LoggingPreferencePage#getPlugin()
- */
- protected AbstractUIPlugin getPlugin() {
- 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
deleted file mode 100644
index f1494aaa0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemPreferenceInitializer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class initializes the preferences for this plugin.
- */
-public class SystemPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /**
- * Constructor.
- */
- public SystemPreferenceInitializer() {
- super();
- }
-
- /**
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void 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
deleted file mode 100644
index 8858897d2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemRemotePropertyPageNode.java
+++ /dev/null
@@ -1,89 +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.propertypages;
-import org.eclipse.jface.preference.PreferenceNode;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.SystemPropertyPageExtension;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-
-
-/**
- * Our version of PropertyPageNode that does not require a RegistryPageContributor input.
- */
-public class SystemRemotePropertyPageNode extends PreferenceNode
-{
-
- private SystemPropertyPageExtension contributor;
- private IWorkbenchPropertyPage page;
- private Image icon;
- private Object element;
- /**
- * Constructor.
- */
- public SystemRemotePropertyPageNode(SystemPropertyPageExtension contributor, Object element)
- {
- super(contributor.getId());
- this.contributor = contributor;
- this.element = element;
- }
- /**
- * Creates the preference page this node stands for. If the page is null,
- * it will be created by loading the class. If loading fails,
- * empty filler page will be created instead.
- */
- public void createPage()
- {
- page = contributor.createPage(element);
- setPage(page);
- }
- /** (non-Javadoc)
- * Method declared on IPreferenceNode.
- */
- public void disposeResources()
- {
- page = null;
- if (icon != null)
- {
- icon.dispose();
- icon = null;
- }
- }
- /**
- * Returns page icon, if defined.
- */
- public Image getLabelImage()
- {
- if (icon==null)
- {
- ImageDescriptor desc = contributor.getImage();
- if (desc != null)
- {
- icon = desc.createImage();
- }
- }
- return icon;
- }
- /**
- * Returns page label as defined in the registry.
- */
- public String getLabelText()
- {
- return contributor.getName();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemStringFieldEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemStringFieldEditor.java
deleted file mode 100644
index 121eae632..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemStringFieldEditor.java
+++ /dev/null
@@ -1,371 +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.propertypages;
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.rse.ui.ISystemMassager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-
-
-/**
- * A preference page field editor that prompts for a string.
- * Unlike the eclipse-supplied StringFieldEditor, this one allows
- * use of RSE validators and massagers for error checking and
- * massaging of the user-entered input prior to persisting.
- */
-public class SystemStringFieldEditor extends FieldEditor
-{
-
- private Text textField;
- private String tip;
- private boolean isValid = true;
- private ModifyListener modifyListener = null;
- private boolean ignoreSelection = false;
- private ISystemValidator validator = null;
- private ISystemMassager massager = null;
- private Composite parentComposite;
- private String oldValue;
- private int numColumnsInParentComposite;
-
-
- /**
- * Default constructor for SystemStringFieldEditor.
- * Not permitted to be used.
- */
- private SystemStringFieldEditor()
- {
- super();
- }
-
- /**
- * Constructor for SystemStringFieldEditor
- * @param name - the unique ID for this editor. Used as index in preference store
- * @param rb - the resource bundle from which to retrieve the mri
- * @param rbKey - the key into the resource bundle, to get the label (_LABEL and tooltip text (_TOOLTIP
- * @param parent - the parent composite to host this editor
- */
- public SystemStringFieldEditor(String name, ResourceBundle rb, String rbKey, Composite parent)
- {
- super(name, rb.getString(rbKey+"label"), parent); //$NON-NLS-1$
- this.oldValue = ""; //$NON-NLS-1$
- //createControl(parent);
- doOurFillIntoGrid();
- setToolTipText(rb.getString(rbKey+"tooltip")); //$NON-NLS-1$
- }
-
- /**
- * Set the validator to use per keystroke. If not set, no validation is done
- */
- public void setValidator(ISystemValidator validator)
- {
- this.validator = validator;
- if (textField != null)
- textField.setTextLimit(validator.getMaximumNameLength());
- }
-
- /**
- * Set the massager that is used to affect the user-entered text before
- * saving it to the preference store.
- */
- public void setMassager(ISystemMassager massager)
- {
- this.massager = massager;
- }
-
- /**
- * Return number of columns we need. We return 2.
- * @see org.eclipse.jface.preference.FieldEditor#getNumberOfControls()
- */
- public int getNumberOfControls()
- {
- return 2;
- }
-
- /**
- * Save the user-entered value to the preference store.
- * @see org.eclipse.jface.preference.FieldEditor#doStore()
- */
- protected void doStore()
- {
- String text = textField.getText();
- if (massager != null)
- {
- text = massager.massage(text);
- ignoreSelection = true;
- textField.setText(text);
- ignoreSelection = false;
- }
- getPreferenceStore().setValue(getPreferenceName(), text);
- }
-
- /**
- * Load the entry field contents from the preference store default value
- * @see org.eclipse.jface.preference.FieldEditor#doLoadDefault()
- */
- protected void doLoadDefault()
- {
- if (textField != null)
- {
- String value = getPreferenceStore().getDefaultString(getPreferenceName());
- initSelection(value);
- }
- }
-
- /**
- * Load the entry field contents from the preference store current value
- * @see org.eclipse.jface.preference.FieldEditor#doLoad()
- */
- protected void doLoad()
- {
- if (textField != null)
- {
- String value = getPreferenceStore().getString(getPreferenceName());
- initSelection(value);
- }
- }
-
- private void initSelection(String value)
- {
- if (value != null)
- {
- ignoreSelection = true;
- textField.setText(value);
- oldValue = value;
- ignoreSelection = false;
- }
- else
- oldValue = ""; //$NON-NLS-1$
- }
-
- /**
- * This is called by our parent's constructor, which is too soon for us!
- * So, we do nothing here and then call doOurFillIntoGrid later within our own
- * constructor.
- * @see org.eclipse.jface.preference.FieldEditor#doFillIntoGrid(Composite, int)
- */
- protected void doFillIntoGrid(Composite parent, int numColumns)
- {
- parentComposite = parent;
- numColumnsInParentComposite = numColumns;
- }
-
- /**
- * Create controls
- */
- protected void doOurFillIntoGrid()
- {
- getLabelControl(parentComposite);
-
- textField = getTextControl(parentComposite);
- GridData gd = (GridData)textField.getLayoutData();
- gd.horizontalSpan = numColumnsInParentComposite - 1;
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
- textField.setLayoutData(gd);
- }
-
- /**
- * Adjust grid data to support the number of columns, after all field editors
- * have been added to the page.
- *
- * @see org.eclipse.jface.preference.FieldEditor#adjustForNumColumns(int)
- */
- protected void adjustForNumColumns(int numColumns)
- {
- GridData gd = (GridData)textField.getLayoutData();
- gd.horizontalSpan = numColumns - 1;
- // We only grab excess space if we have to
- // If another field editor has more columns then
- // we assume it is setting the width.
- gd.grabExcessHorizontalSpace = gd.horizontalSpan == 1;
- }
-
- /**
- * Returns this field editor's Text control.
- */
- protected Text getTextControl()
- {
- return textField;
- }
-
- /**
- * Returns this field editor's text control.
- * <p>
- * The control is created if it does not yet exist
- * </p>
- *
- * @param parent the parent
- * @return the text control
- */
- public Text getTextControl(Composite parent)
- {
- if (textField == null)
- {
- textField = SystemWidgetHelpers.createTextField(parent, null);
- if (tip != null)
- textField.setToolTipText(tip);
-
- textField.addModifyListener(getModifyListener());
- if (validator != null)
- textField.setTextLimit(validator.getMaximumNameLength());
-
- textField.addFocusListener(new FocusAdapter()
- {
- public void focusGained(FocusEvent e) {
- refreshValidState();
- }
- public void focusLost(FocusEvent e) {
- clearErrorMessage();
- }
- });
-
- textField.addDisposeListener(new DisposeListener()
- {
- public void widgetDisposed(DisposeEvent event)
- {
- textField = null; // not sure why we have to do this
- }
- });
- } else {
- checkParent(textField, parent); // not sure what this is, came from some earlier eclipse example
- }
- return textField;
- }
-
- /**
- * Allows setting of tooltip text
- */
- public void setToolTipText(String tip)
- {
- if (textField != null)
- textField.setToolTipText(tip);
- this.tip = tip;
- }
-
- /**
- * Returns this field editor's selection listener.
- * The listener is created if nessessary.
- *
- * @return the selection listener
- */
- private ModifyListener getModifyListener()
- {
- if (modifyListener == null)
- createModifyListener();
- return modifyListener;
- }
-
- /**
- * Creates a modify text listener used in per-keystroke validation
- */
- protected void createModifyListener()
- {
- modifyListener = new ModifyListener()
- {
- public void modifyText(ModifyEvent event)
- {
- Widget widget = event.widget;
- if (widget == textField)
- valueChanged();
- }
- };
- }
-
- /**
- * Validate contents of text field
- */
- protected void validate()
- {
- if (!ignoreSelection)
- {
- setPresentsDefaultValue(false);
- if (validator != null)
- {
- String value = textField.getText();
- String errmsg = validator.isValid(value);
- if (errmsg != null)
- showErrorMessage(errmsg);
- else
- clearErrorMessage();
- isValid = (errmsg == null);
- }
- }
- ignoreSelection = false;
- }
-
- /**
- * Informs this field editor's listener, if it has one, about a change
- * to the value (<code>VALUE</code> property) provided that the old and
- * new values are different.
- * <p>
- * This hook is <em>not</em> called when the text is initialized
- * (or reset to the default value) from the preference store.
- * </p>
- */
- protected void valueChanged()
- {
- setPresentsDefaultValue(false);
- boolean oldState = isValid;
- refreshValidState();
-
- if (isValid != oldState)
- fireStateChanged(IS_VALID, oldState, isValid);
-
- String newValue = textField.getText();
- fireValueChanged(VALUE, oldValue, newValue);
- oldValue = newValue;
- }
-
- /**
- * Override of parent to return validity state.
- * If this readonly, we always return true, else we return result of last validation
- */
- public boolean isValid()
- {
- return isValid;
- }
-
- /**
- * Override of parent to refresh validity state by checking if the
- * input is valid. Does nothing unless this is not a readonly combo.
- */
- protected void refreshValidState()
- {
- validate();
- }
-
- /**
- * Set focus
- */
- public void setFocus()
- {
- if (textField!= null)
- textField.setFocus();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 167a475f5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCore.java
+++ /dev/null
@@ -1,88 +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.propertypages;
-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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-/**
- * The property page for core subsystem properties.
- * The plugin.xml file registers this for objects of class org.eclipse.rse.internal.subsystems.SubSystem
- */
-public class SystemSubSystemPropertyPageCore extends SystemBasePropertyPage
- implements ISystemMessageLine//, ISystemMessageLineTarget
-{
-
- private ISystemSubSystemPropertyPageCoreForm form = null;
-
- /**
- * Constructor
- */
- public SystemSubSystemPropertyPageCore()
- {
- super();
-
- }
- /**
- * Create the page's GUI contents.
- */
- protected Control createContentArea(Composite parent)
- {
- Object element = getElement();
- if (element instanceof ISubSystem)
- {
- ISubSystemConfiguration factory = ((ISubSystem)element).getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)factory.getAdapter(ISubSystemConfigurationAdapter.class);
- form = adapter.getSubSystemPropertyPageCoreFrom(factory, this, this);
- }
- else
- {
- form = new SystemSubSystemPropertyPageCoreForm(this, this);
- }
- Control c = form.createContents(parent, getElement(), getShell());
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "psubs0000"); //$NON-NLS-1$
- return c;
- }
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk()
- {
- if (super.performOk())
- return form.performOk();
- else
- return false;
- }
- /**
- * Validate all the widgets on the page
- * <p>
- * Subclasses should override to do full error checking on all
- * the widgets on the page.
- */
- public boolean verifyPageContents()
- {
- return form.verifyFormContents();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index c3b51d01d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java
+++ /dev/null
@@ -1,412 +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.propertypages;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.widgets.InheritableEntryField;
-import org.eclipse.rse.ui.widgets.SystemPortPrompt;
-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.ui.dialogs.PropertyPage;
-
-/**
- * The form for the property page for core subsystem properties.
- */
-public class SystemSubSystemPropertyPageCoreForm extends AbstractSystemSubSystemPropertyPageCoreForm
-{
-
- protected SystemPortPrompt portPrompt;
- protected Label labelUserId, labelUserIdPrompt;
- protected InheritableEntryField textUserId;
- protected boolean portEditable=true, portApplicable=true, userIdApplicable=true;
- // validators
- protected ISystemValidator portValidator;
- protected ISystemValidator userIdValidator;
-
- /**
- * Constructor
- */
- public SystemSubSystemPropertyPageCoreForm(ISystemMessageLine msgLine, Object caller)
- {
- super(msgLine, caller);
- }
-
- /**
- * Create the GUI contents.
- */
- public Control createInner(Composite composite_prompts, Object inputElement, Shell shell)
- {
- this.shell = shell;
- this.inputElement = inputElement;
-
-
- // Port prompt
- // Composite portComposite = SystemWidgetHelpers.createComposite(composite_prompts, 2, 1, false, null, 0, 0);
- // labelPortPrompt = SystemWidgetHelpers.createLabel(composite_prompts, rb.getString(RESID_SUBSYSTEM_PORT_LABEL)+": ");
- portPrompt = new SystemPortPrompt(composite_prompts, msgLine, true, isPortEditable(), getSubSystem().getConnectorService().getPort(), getPortValidator());
-
-
- // UserId Prompt
- String temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_SUBSYSTEM_USERID_LABEL);
- labelUserIdPrompt = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- userIdApplicable = isUserIdApplicable();
- if (userIdApplicable)
- {
- textUserId = SystemWidgetHelpers.createInheritableTextField(
- composite_prompts,SystemResources.RESID_SUBSYSTEM_USERID_INHERITBUTTON_TIP,SystemResources.RESID_SUBSYSTEM_USERID_TIP);
- textUserId.setFocus();
- }
- else
- labelUserId = SystemWidgetHelpers.createLabel(composite_prompts, getTranslatedNotApplicable());
-
- if (!initDone)
- doInitializeFields();
-
- if (textUserId != null)
- textUserId.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateUserIdInput();
- }
- }
- );
-
- return composite_prompts;
- }
-
- /**
- * Return control to recieve initial focus
- */
- public Control getInitialFocusControl()
- {
- if (portPrompt.isEditable())
- return portPrompt.getPortField();
- else if (userIdApplicable)
- return textUserId;
- else
- return null;
- }
-
- /**
- * Return true if the port is editable for this subsystem
- */
- protected boolean isPortEditable()
- {
- return getSubSystem().getSubSystemConfiguration().isPortEditable();
- }
- /**
- * Return true if the userId is applicable for this subsystem
- */
- protected boolean isUserIdApplicable()
- {
- return getSubSystem().getConnectorService().supportsUserId();
- }
-
- private ISystemValidator getPortValidator()
- {
- if (portValidator == null)
- {
- ISubSystemConfiguration ssFactory = getSubSystem().getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
- portValidator = adapter.getPortValidator(ssFactory);
- }
- return portValidator;
- }
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- ISubSystem ss = getSubSystem();
- ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
-
- userIdValidator = adapter.getUserIdValidator(ssFactory);
- //getPortValidator();
- // vendor
- labelVendor.setText(ssFactory.getVendor());
- // name
- labelName.setText(ss.getName());
- // connection
- labelConnection.setText(ss.getHostAliasName());
- // profile
- labelProfile.setText(ss.getSystemProfileName());
- /*
- // port
- if (portEditable || portApplicable)
- {
- Integer port = ss.getPort();
- String localPort = null;
- if (port==null)
- port = new Integer(0);
- localPort = port.toString();
- int iPort = port.intValue();
- if (!portEditable)
- labelPort.setText(localPort);
- else
- {
- textPort.setLocalText(localPort);
- textPort.setInheritedText("0 "+SystemResources.RESID_PORT_DYNAMICSELECT));
- textPort.setLocal(iPort != 0);
- }
- }
- */
-
- // userId
- if (userIdApplicable)
- {
- String localUserId = ss.getLocalUserId();
- textUserId.setLocalText(localUserId);
- String parentUserId = ss.getHost().getDefaultUserId();
- textUserId.setInheritedText(parentUserId+" "+SystemPropertyResources.RESID_PROPERTY_INHERITED); //$NON-NLS-1$
- textUserId.setLocal((localUserId!=null)&&(localUserId.length()>0));
- }
- }
-
- public void doInitializeInnerFields()
- {
- initDone = true;
- ISubSystem ss = getSubSystem();
- ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
-
- userIdValidator = adapter.getUserIdValidator(ssFactory);
-
- // userId
- if (userIdApplicable)
- {
- String localUserId = ss.getLocalUserId();
- textUserId.setLocalText(localUserId);
- String parentUserId = ss.getHost().getDefaultUserId();
- textUserId.setInheritedText(parentUserId+" "+SystemPropertyResources.RESID_PROPERTY_INHERITED); //$NON-NLS-1$
- textUserId.setLocal((localUserId!=null)&&(localUserId.length()>0));
- }
- }
-
- /**
- * Validate user id value per keystroke
- */
- protected SystemMessage validateUserIdInput()
- {
- errorMessage= null;
- if (textUserId != null)
- {
- if (!textUserId.isLocal())
- return null;
- if (userIdValidator != null)
- errorMessage= userIdValidator.validate(textUserId.getText());
- else if (getUserId().equals("")) //$NON-NLS-1$
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY);
- }
- setErrorMessage(errorMessage);
- //setPageComplete();
- return errorMessage;
- }
-
- /*
- * Validate port value per keystroke
- *
- protected SystemMessage validatePortInput()
- {
- errorMessage= null;
- if (textPort!=null)
- {
- if (!textPort.isLocal())
- return null;
- if (portValidator != null)
- errorMessage= portValidator.validate(textPort.getText());
- else if (getPort().equals(""))
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY);
- }
- setErrorMessage(errorMessage);
- //setPageComplete();
- return errorMessage;
- }*/
-
-
- /**
- * Return user-entered User Id.
- */
- protected String getUserId()
- {
- return textUserId.getText().trim();
- }
- /*
- * Return user-entered Port number.
- *
- protected String getPort()
- {
- return textPort.getText().trim();
- }*/
-
- /**
- * 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)
- pageComplete = (getUserId().length() > 0) && portPrompt.isComplete();
- return pageComplete;
- }
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- boolean complete = isPageComplete();
- if (callerInstanceOfWizardPage)
- {
- ((WizardPage)caller).setPageComplete(complete);
- }
- else if (callerInstanceOfSystemPromptDialog)
- {
- ((SystemPromptDialog)caller).setPageComplete(complete);
- }
- else if (callerInstanceOfPropertyPage)
- {
- ((PropertyPage)caller).setValid(complete);
- }
- }
-
- /**
- * Validate all the widgets on the form
- */
- public boolean verifyFormContents()
- {
- boolean ok = true;
- SystemMessage errMsg = null;
- Control controlInError = null;
- clearErrorMessage();
- errMsg = portPrompt.validatePortInput();
- if (errMsg != null)
- controlInError = portPrompt.getPortField(); //textPort.getTextField();
- else
- {
- errMsg = validateUserIdInput();
- if (errMsg != null)
- controlInError = textUserId.getTextField();
- }
- if (errMsg != null)
- {
- ok = false;
- controlInError.setFocus();
- setErrorMessage(errMsg);
- }
- return ok;
- }
-
-
- /**
- * Called by caller when user presses OK
- */
- public boolean performOk()
- {
- boolean ok = verifyFormContents();
- if (ok)
- {
- ISubSystem ss = getSubSystem();
- // PROCESS PORT...
- if (portPrompt.isEditable())
- updatePort(ss);
-
- // PROCESS USER ID...
- if (textUserId != null)
- {
- String userId = getUserId();
- updateUserId(ss);
- }
- ss.commit();
- }
- return ok;
- }
-
- /**
- * Change the subsystem user Id value
- */
- private void updateUserId(ISubSystem subsys)
- {
- //int whereToUpdate = USERID_LOCATION_SUBSYSTEM;
- String userId = textUserId.getLocalText(); // will be "" if !textuserid.getIsLocal(), which results in wiping out local override
- ISubSystemConfiguration ssFactory = subsys.getSubSystemConfiguration();
- // unlike with connection objects, we don't ever allow the user to change the parent's
- // userId value, even if it is empty, when working with subsystems. There is too much
- // ambiquity as the parent could be the connnection or the user preferences setting for this
- // system type. Because of this decision, we don't need to tell updateSubSystem(...) where
- // to update, as it always the local subsystem.
- ssFactory.updateSubSystem(subsys, true, userId, false, subsys.getConnectorService().getPort());
- }
- /**
- * Change the subsystem port value
- */
- private void updatePort(ISubSystem subsys)
- {
- /*
- String port = textPort.getLocalText(); // will be "" if !textPort.getIsLocal(), which results in wiping out local override
- Integer portInteger = null;
- if (textPort.isLocal() && (port.length()>0))
- portInteger = new Integer(port);
- else
- portInteger = new Integer(0);
- */
- int portInteger = portPrompt.getPort();
- ISubSystemConfiguration ssFactory = subsys.getSubSystemConfiguration();
- ssFactory.updateSubSystem(subsys, false, subsys.getLocalUserId(), true, portInteger);
- }
-
- /**
- * Return "Not applicable" translated
- */
- private String getTranslatedNotApplicable()
- {
- if (xlatedNotApplicable == null)
- xlatedNotApplicable = SystemPropertyResources.RESID_TERM_NOTAPPLICABLE;
- return xlatedNotApplicable;
- }
-
- private void setErrorMessage(SystemMessage msg)
- {
- if (msgLine != null)
- if (msg != null)
- msgLine.setErrorMessage(msg);
- else
- msgLine.clearErrorMessage();
- }
- private void clearErrorMessage()
- {
- if (msgLine != null)
- msgLine.clearErrorMessage();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewCategoryPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewCategoryPropertyPage.java
deleted file mode 100644
index 14cd692c1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewCategoryPropertyPage.java
+++ /dev/null
@@ -1,110 +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.propertypages;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.rse.ui.view.team.SystemTeamViewCategoryNode;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- * The property page for category nodes in the Team view.
- * This is an output-only page.
- */
-public class SystemTeamViewCategoryPropertyPage extends SystemBasePropertyPage
-{
-
- protected Label labelType, labelName, labelDescription;
- protected String errorMessage;
- protected boolean initDone = false;
-
- /**
- * Constructor for SystemFilterPropertyPage
- */
- public SystemTeamViewCategoryPropertyPage()
- {
- super();
- }
- /**
- * Create the page's GUI contents.
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // Type prompt
- String typeLabel = SystemPropertyResources.RESID_PROPERTY_TYPE_LABEL;
- String typeTooltip = SystemPropertyResources.RESID_PROPERTY_TYPE_TOOLTIP;
-
- labelType = createLabeledLabel(composite_prompts, typeLabel, typeTooltip);
- labelType.setText(SystemViewResources.RESID_PROPERTY_TEAM_CATEGORY_TYPE_VALUE);
-
- // Name prompt
- String nameLabel = SystemPropertyResources.RESID_PROPERTY_NAME_LABEL;
- String nameTooltip = SystemPropertyResources.RESID_PROPERTY_NAME_TOOLTIP;
-
- labelName = createLabeledLabel(composite_prompts, nameLabel, nameTooltip);
-
- // Description prompt
- addFillerLine(composite_prompts, nbrColumns);
- addSeparatorLine(composite_prompts, nbrColumns);
- //key = ISystemConstants.RESID_PROPERTY_DESCRIPTION_ROOT;
- //Label l = SystemWidgetHelpers.createLabel(composite_prompts, rb, key, nbrColumns, false);
- //l.setText(l.getText() + ":");
- labelDescription = SystemWidgetHelpers.createVerbiage(composite_prompts, "", nbrColumns, false, 200); //$NON-NLS-1$
-
- if (!initDone)
- doInitializeFields();
-
- return composite_prompts;
- }
- /**
- * From parent: do full page validation
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * Get the input team view category node
- */
- protected SystemTeamViewCategoryNode getCategoryNode()
- {
- Object element = getElement();
- return ((SystemTeamViewCategoryNode)element);
- }
-
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- SystemTeamViewCategoryNode node = getCategoryNode();
- // populate GUI...
- labelName.setText(node.getLabel());
- labelDescription.setText(node.getDescription());
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 48f0ca8fd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewProfilePropertyPage.java
+++ /dev/null
@@ -1,114 +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.propertypages;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- * The property page for profile nodes in the Team view.
- * This is an output-only page.
- */
-public class SystemTeamViewProfilePropertyPage extends SystemBasePropertyPage
-{
-
- protected Label labelType, labelName, labelStatus;
- protected String errorMessage;
- protected boolean initDone = false;
-
- /**
- * Constructor for SystemFilterPropertyPage
- */
- public SystemTeamViewProfilePropertyPage()
- {
- super();
- }
- /**
- * Create the page's GUI contents.
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- // Inner composite
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 2);
-
- // Type prompt
- labelType = createLabeledLabel(composite_prompts, SystemPropertyResources.RESID_PROPERTY_TYPE_LABEL, SystemPropertyResources.RESID_PROPERTY_TYPE_TOOLTIP);
- labelType.setText(SystemViewResources.RESID_PROPERTY_PROFILE_TYPE_VALUE);
-
- // Name prompt
- labelName = createLabeledLabel(composite_prompts, SystemPropertyResources.RESID_PROPERTY_NAME_LABEL, SystemPropertyResources.RESID_PROPERTY_NAME_TOOLTIP);
-
- // Status prompt
- labelStatus = createLabeledLabel(composite_prompts, SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL, SystemViewResources.RESID_PROPERTY_PROFILESTATUS_TOOLTIP);
-
-
- if (!initDone)
- doInitializeFields();
-
- return composite_prompts;
- }
- /**
- * From parent: do full page validation
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * Get the input team view category node
- */
- protected ISystemProfile getProfile()
- {
- Object element = getElement();
- return ((ISystemProfile)element);
- }
-
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- ISystemProfile profile = getProfile();
- // populate GUI...
- labelName.setText(profile.getName());
- boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName());
- if (active)
- labelStatus.setText(SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL);
- else
- labelStatus.setText(SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL);
-
- }
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk()
- {
- boolean ok = true;
- return ok;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewSubSystemConfigurationPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewSubSystemConfigurationPropertyPage.java
deleted file mode 100644
index 3ab5e3e46..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewSubSystemConfigurationPropertyPage.java
+++ /dev/null
@@ -1,143 +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.propertypages;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.rse.ui.view.team.SystemTeamViewSubSystemConfigurationNode;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- * The property page for subsystem factory nodes in the Team view.
- * This is an output-only page.
- */
-public class SystemTeamViewSubSystemConfigurationPropertyPage extends SystemBasePropertyPage
-{
-
- protected Label labelType, labelName, labelId, labelVendor, labelTypes;
- protected String errorMessage;
- protected boolean initDone = false;
-
- /**
- * Constructor for SystemFilterPropertyPage
- */
- public SystemTeamViewSubSystemConfigurationPropertyPage()
- {
- super();
- }
- /**
- * Create the page's GUI contents.
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContentArea(Composite parent)
- {
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // Type prompt
- labelType = createLabeledLabel(composite_prompts, SystemPropertyResources.RESID_PROPERTY_TYPE_LABEL, SystemPropertyResources.RESID_PROPERTY_TYPE_TOOLTIP);
- labelType.setText(SystemViewResources.RESID_PROPERTY_TEAM_SSFACTORY_TYPE_VALUE);
-
- // Name prompt
- labelName = createLabeledLabel(composite_prompts, SystemPropertyResources.RESID_PROPERTY_NAME_LABEL, SystemPropertyResources.RESID_PROPERTY_NAME_TOOLTIP);
-
- // Id prompt
- labelId = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_SUBSYSFACTORY_ID_LABEL, SystemResources.RESID_PP_SUBSYSFACTORY_ID_TOOLTIP);
-
- // Vendor prompt
- labelVendor = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_SUBSYSFACTORY_VENDOR_LABEL, SystemResources.RESID_PP_SUBSYSFACTORY_VENDOR_TOOLTIP);
-
- // System Types prompt
- labelTypes = createLabeledLabel(composite_prompts, SystemResources.RESID_PP_SUBSYSFACTORY_TYPES_LABEL, SystemResources.RESID_PP_SUBSYSFACTORY_TYPES_TOOLTIP);
-
- // description
- addFillerLine(composite_prompts, nbrColumns);
- addSeparatorLine(composite_prompts, nbrColumns);
- SystemWidgetHelpers.createVerbiage(composite_prompts, SystemResources.RESID_PP_SUBSYSFACTORY_VERBAGE, nbrColumns, false, 200);
-
- if (!initDone)
- doInitializeFields();
-
- return composite_prompts;
- }
-
- /**
- * From parent: do full page validation
- */
- protected boolean verifyPageContents()
- {
- return true;
- }
-
- /**
- * Get the input team view subsystem factory node
- */
- protected ISubSystemConfiguration getSubSystemConfiguration()
- {
- Object element = getElement();
- SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode)element;
- return ssfNode.getSubSystemConfiguration();
- }
-
- /**
- * Initialize values of input fields based on input
- */
- protected void doInitializeFields()
- {
- initDone = true;
- ISubSystemConfiguration ssf = getSubSystemConfiguration();
- ISubSystemConfigurationProxy proxy = ssf.getSubSystemConfigurationProxy();
- // populate GUI...
- labelName.setText(ssf.getName());
- labelId.setText(proxy.getId());
- labelVendor.setText(proxy.getVendor());
- String systypes = ""; //$NON-NLS-1$
- String[] types = ssf.getSystemTypes();
- if (ssf.getSubSystemConfigurationProxy().supportsAllSystemTypes())
- {
- systypes = SystemResources.TERM_ALL;
- }
- else
- {
- for (int idx=0; idx<types.length; idx++)
- {
- if (idx==0)
- systypes += types[idx];
- else
- systypes += ", " + types[idx]; //$NON-NLS-1$
- }
- }
- labelTypes.setText(systypes);
- }
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk()
- {
- boolean ok = true;
- return ok;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 4a9f15847..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnLayoutData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ComboBoxCellEditor;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-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.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-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;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-
-
-/**
- * This is a field type editor for the Remote Systems preference page,
- * used for setting system type preferences.
- */
-public class SystemTypeFieldEditor extends FieldEditor
- implements ICellModifier, ITableLabelProvider, IStructuredContentProvider
-{
- private Table table;
- private GridData tableData;
- private TableViewer tableViewer;
- private CellEditor enabledCellEditor, userIdCellEditor;
- private static final char KEYVALUE_DELIMITER='=';
- private static final char KEYVALUEPAIR_DELIMITER=';';
- public static final char EACHVALUE_DELIMITER='+';
- private Hashtable keyValues;
- private IRSESystemType[] systemTypes;
-
- private boolean enabledStateChanged = false;
-
- private static final int COLUMN_NAME = 0;
- private static final int COLUMN_ENABLED = 1;
- private static final int COLUMN_USERID = 2;
- private static final String P_NAME = "name"; //$NON-NLS-1$
- private static final String P_ENABLED = "enabled"; //$NON-NLS-1$
- private static final String P_DESC = "desc"; //$NON-NLS-1$
- private static final String P_USERID = "userid"; //$NON-NLS-1$
- private static final String columnHeaders[] =
- {
- SystemResources.RESID_PREF_SYSTYPE_COLHDG_NAME,
- SystemResources.RESID_PREF_SYSTYPE_COLHDG_ENABLED,
- SystemResources.RESID_PREF_SYSTYPE_COLHDG_USERID,
- SystemResources.RESID_PREF_SYSTYPE_COLHDG_DESC
- };
- private static ColumnLayoutData columnLayouts[] =
- {
- new ColumnWeightData(20,80,true),
- new ColumnWeightData(20,15,true),
- new ColumnWeightData(20,100,true),
- new ColumnWeightData(55,280,true)
- };
- // give each column a property value to identify it
- private static final String[] tableColumnProperties =
- {
- P_NAME, P_ENABLED, P_USERID, P_DESC
- };
-
- private static final boolean[] enabledStates = {Boolean.TRUE.booleanValue(), Boolean.FALSE.booleanValue()};
- private static final String[] enabledStateStrings = {Boolean.TRUE.toString(), Boolean.FALSE.toString()};
-
- /**
- * Constructor
- * @param name
- * @param labelText
- * @param parent
- */
- public SystemTypeFieldEditor(String name, String labelText, Composite parent)
- {
- super(name, labelText, parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#adjustForNumColumns(int)
- */
- protected void adjustForNumColumns(int numColumns)
- {
- ((GridData)table.getLayoutData()).horizontalSpan = numColumns;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#doFillIntoGrid(org.eclipse.swt.widgets.Composite, int)
- */
- protected void doFillIntoGrid(Composite parent, int numColumns)
- {
- table = createTable(parent);
- ((GridData)table.getLayoutData()).horizontalSpan = numColumns;
- tableViewer = new TableViewer(table);
- createColumns();
- tableViewer.setColumnProperties(tableColumnProperties);
- tableViewer.setCellModifier(this);
- CellEditor editors[] = new CellEditor[columnHeaders.length];
- userIdCellEditor = new TextCellEditor(table);
- enabledCellEditor = new ComboBoxCellEditor(table, enabledStateStrings, SWT.READ_ONLY); // DWD should consider a checkbox for this.
- editors[COLUMN_USERID] = userIdCellEditor;
- editors[COLUMN_ENABLED] = enabledCellEditor;
- tableViewer.setCellEditors(editors);
-
- tableViewer.setLabelProvider(this);
- tableViewer.setContentProvider(this);
- tableViewer.setInput(new Object());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#doLoad()
- */
- protected void doLoad()
- {
- if (systemTypes == null)
- systemTypes = getSystemTypes(false);
-
- String value = getPreferenceStore().getString(ISystemPreferencesConstants.SYSTEMTYPE_VALUES);
- keyValues = null;
-
- if ((value == null) || (value.length() == 0))
- {
- keyValues = new Hashtable();
- }
- else
- {
- keyValues = parseString(value);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#doLoadDefault()
- */
- protected void doLoadDefault()
- {
- // when Defaults button pressed, we re-read the system types from disk
- systemTypes = getSystemTypes(true);
- keyValues.clear();
- tableViewer.refresh();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#doStore()
- */
- protected void doStore()
- {
- if (systemTypes != null)
- {
- String s = createString(keyValues);
-
- if (s != null)
- getPreferenceStore().setValue(getPreferenceName(), s);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#getNumberOfControls()
- */
- public int getNumberOfControls()
- {
- return 1;
- }
-
- /*
- * @see FieldEditor.setEnabled(boolean,Composite).
- */
- public void setEnabled(boolean enabled, Composite parent)
- {
- if (table != null)
- table.setEnabled(enabled);
- }
-
- /*
- * @see FieldEditor.isValid().
- */
- public boolean isValid()
- {
- return true;
- }
-
-
- // ----------------
- // local methods...
- // ----------------
-
- private Table createTable(Composite parent)
- {
- table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
- table.setLinesVisible(true);
- tableData = new GridData();
- tableData.horizontalAlignment = GridData.FILL;
- tableData.grabExcessHorizontalSpace = true;
- tableData.widthHint = 410;
- tableData.heightHint= 30;
- tableData.verticalAlignment = GridData.FILL;
- tableData.grabExcessVerticalSpace = true;
- table.setLayoutData(tableData);
-
- SystemWidgetHelpers.setHelp(table, RSEUIPlugin.HELPPREFIX+"systype_preferences"); //$NON-NLS-1$
- return table;
- }
-
- private void createColumns()
- {
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
- table.setHeaderVisible(true);
- for (int i = 0; i < columnHeaders.length; i++)
- {
- layout.addColumnData(columnLayouts[i]);
- TableColumn tc = new TableColumn(table, SWT.NONE,i);
- tc.setResizable(columnLayouts[i].resizable);
- tc.setText(columnHeaders[i]);
- }
- }
-
- /**
- * Parse out list of key-value pairs into a hashtable
- */
- private static Hashtable parseString(String allvalues)
- {
- StringTokenizer tokens = new StringTokenizer(allvalues, makeString(KEYVALUE_DELIMITER, KEYVALUEPAIR_DELIMITER));
- Hashtable keyValues = new Hashtable(10);
- int count = 0;
- String token1=null;
- String token2=null;
- while (tokens.hasMoreTokens())
- {
- count++;
- if ((count % 2) == 0) // even number
- {
- token2 = tokens.nextToken();
- keyValues.put(token1, token2);
- }
- else
- token1 = tokens.nextToken();
- }
- return keyValues;
- }
-
- private static String makeString(char charOne, char charTwo)
- {
- StringBuffer s = new StringBuffer(2);
- s.append(charOne);
- s.append(charTwo);
- return s.toString();
- }
-
- /**
- * Convert hashtable of key-value pairs into a single string
- */
- public static String createString(Hashtable keyValues)
- {
- if (keyValues == null)
- return null;
- Enumeration keys = keyValues.keys();
- StringBuffer sb = new StringBuffer();
- while (keys.hasMoreElements())
- {
- String key = (String)keys.nextElement();
- String value = (String)keyValues.get(key);
- if ((value != null) && (value.length()>0))
- {
- sb.append(key);
- sb.append(KEYVALUE_DELIMITER);
- sb.append(value);
- sb.append(KEYVALUEPAIR_DELIMITER);
- }
- }
-
- return sb.toString();
- }
-
- /**
- * Retrieve an array of currently known system types.
- * @param restoreDefaults restore the default values for the system types
- * @return The list of system types known to be in existence
- */
- private IRSESystemType[] getSystemTypes(boolean restoreDefaults) {
- IRSESystemType[] types = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
- ArrayList list = new ArrayList();
- if (systemTypes == null || restoreDefaults) {
- for (int i = 0; i < types.length; i++) {
- ISubSystemConfiguration[] configurations = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfigurationsBySystemType(types[i].getName());
- if (configurations != null && configurations.length > 0) {
- list.add(types[i]);
- }
- }
- }
- types = new IRSESystemType[list.size()];
- for (int i = 0; i < list.size(); i++) {
- types[i] = (IRSESystemType) (list.get(i));
- }
- return types;
- }
-
- // ------------------------
- // ICellModifier methods...
- // ------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object, java.lang.String)
- */
- public boolean canModify(Object element, String property)
- {
- if (property.equals(P_ENABLED))
- {
- return true;
- }
- else if (property.equals(P_USERID))
- {
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object, java.lang.String)
- */
- public Object getValue(Object element, String property)
- {
- IRSESystemType row = (IRSESystemType)element;
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(row.getAdapter(IRSESystemType.class));
- Object value = ""; //$NON-NLS-1$
-
- if (property.equals(P_NAME))
- value = row.getName();
- else if (property.equals(P_ENABLED))
- value = (adapter.isEnabled(row) ? new Integer(0) : new Integer(1));
- else if (property.equals(P_USERID))
- value = (adapter.getDefaultUserId(row) == null) ? "" : adapter.getDefaultUserId(row); //$NON-NLS-1$
- else
- value = (row.getDescription() == null) ? "" : row.getDescription(); //$NON-NLS-1$
-
- return value;
- }
-
- public boolean enabledStateChanged()
- {
- return enabledStateChanged;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object, java.lang.String, java.lang.Object)
- */
- public void modify(Object element, String property, Object value)
- {
- IRSESystemType row = (IRSESystemType)(((TableItem)element).getData());
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(row.getAdapter(IRSESystemType.class));
-
- if (property.equals(P_ENABLED))
- {
- Integer val = (Integer)value;
- adapter.setIsEnabled(row, enabledStates[val.intValue()]);
- enabledStateChanged = true;
- }
- else if (property.equals(P_USERID))
- {
- adapter.setDefaultUserId(row, (String)value);
- }
- else
- return;
-
- keyValues.put(row.getName(), ""); //$NON-NLS-1$
- tableViewer.update(row, null);
- }
-
- // ------------------------------
- // ITableLabelProvider methods...
- // ------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex)
- {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int columnIndex)
- {
- 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(adapter.isEnabled(currType));
- else if (columnIndex == COLUMN_USERID)
- return (adapter.getDefaultUserId(currType)==null ? "" : adapter.getDefaultUserId(currType)); //$NON-NLS-1$
- else
- return (currType.getDescription()==null ? "" : currType.getDescription()); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener)
- {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property)
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener)
- {
- }
-
- // -------------------------------------
- // IStructuredContentProvider methods...
- // -------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement)
- {
- if (systemTypes == null)
- systemTypes = getSystemTypes(false);
- return systemTypes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
-
- // ----------------
- // Other methods...
- // ----------------
- /**
- * Set the tooltip text
- */
- public void setToolTipText(String tip)
- {
- table.setToolTipText(tip);
- }
-
- 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 systemTypes extension points already
- }
- else
- {
- keyValues = parseString(value);
- // we have now a hashtable, where the keys are the system type names,
- // and the values are the column-value attributes for that type, separated
- // by a '+' character: enabled+userid. eg: "true+bob"
- Enumeration keys = keyValues.keys();
- while (keys.hasMoreElements())
- {
- String key = (String)keys.nextElement();
- String attributes = (String)keyValues.get(key);
- String attr1="true", attr2=""; //$NON-NLS-1$ //$NON-NLS-2$
- if ((attributes != null) && (attributes.length()>0))
- {
- StringTokenizer tokens = new StringTokenizer(attributes, Character.toString(EACHVALUE_DELIMITER));
- if (tokens.hasMoreTokens())
- {
- attr1 = tokens.nextToken();
- if (tokens.hasMoreTokens())
- {
- attr2 = tokens.nextToken();
- }
- else
- {
- attr2 = "null"; //$NON-NLS-1$
- }
- }
- }
- // find this system type in the array...
- 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)
- {
- adapter.setIsEnabled(matchingType, attr1.equals("true")); //$NON-NLS-1$
- if (!attr2.equals("null")) //$NON-NLS-1$
- adapter.setDefaultUserId(matchingType, attr2);
- }
- }
- }
- return keyValues;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidator.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidator.java
deleted file mode 100644
index e9d865f57..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidator.java
+++ /dev/null
@@ -1,52 +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.validators;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-
-/**
- * Our validators need to support querying max length, for generic rename dialogs.
- * They also need to support getting the message not only as a string, which isValid returns,
- * but also as a SystemMessage, which getSystemMessage() does if isValid returns non-null.
- */
-public interface ISystemValidator extends IInputValidator, ICellEditorValidator
-{
-
-
- /**
- * Return the max length for this name, or -1 if no max
- */
- public int getMaximumNameLength();
- /**
- * If isValid returns non-null and you desire a full bodied SystemMessage versus a string,
- * call this method after isValid to get the full bodied SystemMessage.
- * <p>
- * Will be null if isValid returned null.
- */
- public SystemMessage getSystemMessage();
-
- /**
- * For convenience, this is a shortcut to calling:
- * <pre><code>
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- * </code></pre>
- */
- public SystemMessage validate(String text);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java
deleted file mode 100644
index d6cbc438a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java
+++ /dev/null
@@ -1,45 +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.validators;
-
-import java.util.Vector;
-
-/**
- * This interface is implemented by any validator that
- * does uniqueness checking. Allows common code that will set the
- * list of string to check against.
- */
-public interface ISystemValidatorUniqueString
-{
-
- /**
- * Reset whether this is a case-sensitive list or not
- */
- public void setCaseSensitive(boolean caseSensitive);
- /**
- * Reset the existing names list.
- */
- public void setExistingNamesList(String[] existingList);
- /**
- * Reset the existing names list.
- */
- public void setExistingNamesList(Vector existingList);
- /**
- * Return the existing names list. This will be a case-normalized and sorted list.
- */
- public String[] getExistingNamesList();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.java
deleted file mode 100644
index a0bd91b47..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.validators;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-
-
-/**
- * On remote selection dialogs, you can pass an implementation of this interface to validate that
- * it is ok to enable the OK button when the user selects a remote object. If you return
- * a SystemMessage, ok will be disabled and the message will be shown on the message line.
- * Return a SystemMessage with blank in the first level text to disable OK without showing
- * an error message.
- * <p>
- * Alternatively you can just subclass {@link org.eclipse.rse.ui.validators.ValidatorRemoteSelection}
- */
-public interface IValidatorRemoteSelection
-{
-
- /**
- * The user has selected one or more remote objects. Return null if OK is to be enabled, or a SystemMessage
- * if it is not to be enabled. The message will be displayed on the message line.
- */
- public SystemMessage isValid(IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObject);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/SystemNumericVerifyListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/SystemNumericVerifyListener.java
deleted file mode 100644
index 8c2006867..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/SystemNumericVerifyListener.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.validators;
-
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-
-/**
- * A class that only allows keys representing numeric values to be entered. It can be turned off if necessary.
- */
-public class SystemNumericVerifyListener implements VerifyListener {
-
- private boolean isOff;
-
- /**
- * Constructor. The verifier is on by default.
- */
- public SystemNumericVerifyListener() {
- isOff = false;
- }
-
- /**
- * Verifies the event text if it is not turned off.
- * @see org.eclipse.swt.events.VerifyListener#verifyText(org.eclipse.swt.events.VerifyEvent)
- */
- public void verifyText(VerifyEvent e) {
-
- if (!isOff) {
- String text = e.text;
- boolean doit = true;
-
- for (int i = 0; i < text.length(); i++) {
- char c = text.charAt(i);
-
- if (!Character.isDigit(c)) {
- doit = false;
- break;
- }
- }
-
- e.doit = doit;
- }
- }
-
- /**
- * Turns the verifier on or off.
- * @param isOff <code>true</code> to turn the verifier off, <code>false</code> to turn it on.
- */
- public void setOff(boolean isOff) {
- this.isOff = isOff;
- }
-
- /**
- * Returns whether the verifier is on or off.
- * @return <code>true</code> if the verifier is off, <code>false</code> if it is on.
- */
- public boolean isOff() {
- return isOff;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index a4ec37b0d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.validators;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class ValidatorArchiveName extends ValidatorFileName {
-
- protected SystemMessage msg_NotRegisteredArchive;
-
- public ValidatorArchiveName(Vector existingNameList) {
- super(existingNameList);
- }
-
- public ValidatorArchiveName(String[] existingNameList) {
- super(existingNameList);
- }
-
- public ValidatorArchiveName() {
- super();
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- * Also checks to see if its a valid archive name.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- msg_NotRegisteredArchive = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ARCHIVE_NAME);
- msg_NotRegisteredArchive.makeSubstitution(newText);
- IStatus rc = workspace.validateName(newText, IResource.FILE);
- if (rc.getCode() != IStatus.OK)
- return msg_Invalid;
- else if ((getMaximumNameLength() > 0) && // defect 42507
- (newText.length() > getMaximumNameLength()))
- return msg_Invalid; // TODO: PHIL. MRI. better message.
- else if (!ArchiveHandlerManager.getInstance().isRegisteredArchive(newText))
- return msg_NotRegisteredArchive;
- return checkForBadCharacters(newText) ? null: msg_Invalid;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 9c5cb2dd2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java
+++ /dev/null
@@ -1,131 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user defined compile command's label
- */
-public class ValidatorCompileCommandLabel extends ValidatorUniqueString
- implements ISystemValidator
-{
- public static final int MAX_CMDLABEL_LENGTH = 50; // max name for a compile command name
-
- protected boolean fUnique;
- protected SystemMessage msg_Invalid;
- protected IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
- /**
- * Use this constructor when you have a vector of existing labels.
- */
- public ValidatorCompileCommandLabel(Vector existingLabelList)
- {
- super(existingLabelList, CASE_INSENSITIVE); // case insensitive uniqueness
- init();
- }
- /**
- * Use this constructor when you have an array of existing labels.
- */
- public ValidatorCompileCommandLabel(String existingLabelList[])
- {
- super(existingLabelList, CASE_INSENSITIVE); // case insensitive uniqueness
- init();
- }
-
- /**
- * Use this constructor when the name need not be unique, and you just want
- * the syntax checking. Or if you will call setExistingNamesList later.
- */
- public ValidatorCompileCommandLabel()
- {
- super(new String[0], CASE_INSENSITIVE);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_COMPILELABEL_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_COMPILELABEL_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_COMPILELABEL_NOTVALID);
- }
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- /**
- * Overridable method for invalidate character check, beyond what this class offers
- * @return true if valid, false if not
- */
- protected boolean checkForBadCharacters(String newText)
- {
- return ((newText.indexOf('&') == -1) && // causes problems in menu popup as its a mnemonic character.
- (newText.indexOf('@') == -1)); // defect 43950
- }
-
- public String toString()
- {
- return getClass().getName();
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- if (newText.length() > getMaximumNameLength())
- currentMessage = msg_Invalid;
- else
- currentMessage = checkForBadCharacters(newText) ? null: msg_Invalid;
- return currentMessage;
- }
-
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for compile commands: 50
- */
- public int getMaximumNameLength()
- {
- return MAX_CMDLABEL_LENGTH;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index fc916cdb4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java
+++ /dev/null
@@ -1,97 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This class is used in dialogs that prompt for a connection alias name.
- * Relies on Eclipse supplied method to test for folder name validity.
- * <p>
- * The IInputValidator interface is used by jface's
- * InputDialog class and numerous other platform and system classes.
- */
-public class ValidatorConnectionName extends ValidatorFolderName implements ISystemValidator
-{
- public static final int MAX_CONNECTIONNAME_LENGTH = 100; // arbitrary restriction due to defects
-
- /**
- * Constructor.
- * @param existingNameList Vector of existing names (strings) in owning profile. Can be null if not a rename operation.
- */
- public ValidatorConnectionName(Vector existingNameList)
- {
- super(existingNameList);
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_CONNECTIONNAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_CONNECTIONNAME_NOTVALID));
- }
-
- /**
- * Validate the given connection name is not already used in any profile. This is too expensive
- * to do per keystroke, so you should call this after as a final test. Note, this is a warning
- * situation, not an error, as we assume we have already tested for the containing profile, and
- * thus is a test for a match on a connection in a non-containing profile. This results in msg
- * rseg1241 being presented to the user, and if he chooses No to not continue, we return false
- * here. You should stop processing on false. Else, we return true meaning everything is ok.
- */
- public static boolean validateNameNotInUse(String proposedName, Shell shell)
- {
- SystemMessage msg = null;
- Vector profileNames = RSEUIPlugin.getTheSystemProfileManager().getSystemProfileNamesVector();
- String profileName = null;
- for (int idx=0; (msg==null)&& (idx<profileNames.size()); idx++)
- {
- profileName = (String)profileNames.elementAt(idx);
- IHost[] conns = RSEUIPlugin.getTheSystemProfileManager().getSystemProfile(profileName).getHosts();
- for (int jdx=0; (msg==null) && (jdx<conns.length); jdx++)
- {
- if (conns[jdx].getAliasName().equalsIgnoreCase(proposedName))
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE_OTHERPROFILE);
- }
- }
- if (msg != null)
- {
- msg.makeSubstitution(proposedName, profileName);
- SystemMessageDialog dlg = new SystemMessageDialog(shell, msg);
- boolean yesToContinue = dlg.openQuestionNoException();
- if (yesToContinue)
- msg = null;
- }
- return (msg==null);
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for connections: 100
- */
- public int getMaximumNameLength()
- {
- return MAX_CONNECTIONNAME_LENGTH;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFileName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFileName.java
deleted file mode 100644
index 41fdfae99..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFileName.java
+++ /dev/null
@@ -1,141 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for a name that eventually needs to become a file on disk.
- * Relies on Eclipse supplied method to test for folder name validity.
- *
- * The IInputValidator interface is used by jface's
- * InputDialog class and numerous other platform and system classes.
- */
-public class ValidatorFileName
- extends ValidatorUniqueString implements ISystemValidator
-{
- public static final int MAX_FILENAME_LENGTH = 256;
-
- protected boolean fUnique;
- protected SystemMessage msg_Invalid;
- protected IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a vector containing a list of existing names to compare against.
- */
- public ValidatorFileName(Vector existingNameList)
- {
- super(existingNameList, false); // case insensitive uniqueness
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILENAME_NOTVALID);
- }
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a string array of existing names to compare against.
- */
- public ValidatorFileName(String existingNameList[])
- {
- super(existingNameList, false); // case insensitive uniqueness
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILENAME_NOTVALID);
- }
-
- /**
- * Use this constructor when the name need not be unique, and you just want
- * the syntax checking.
- */
- public ValidatorFileName()
- {
- super(new String[0], false);
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILENAME_NOTVALID);
- }
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- /**
- * Overridable extension point to check for invalidate characters beyond what Eclipse checks for
- * @return true if valid, false if not
- */
- protected boolean checkForBadCharacters(String newText)
- {
- return true;
- }
-
-
- public String toString()
- {
- return "FileNameValidator class"; //$NON-NLS-1$
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- IStatus rc = workspace.validateName(newText, IResource.FILE);
- if (rc.getCode() != IStatus.OK)
- return msg_Invalid;
- else if ((getMaximumNameLength() > 0) && // defect 42507
- (newText.length() > getMaximumNameLength()))
- return msg_Invalid; // TODO: PHIL. MRI. better message.
- return checkForBadCharacters(newText) ? null: msg_Invalid;
- }
-
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for file names: 256
- */
- public int getMaximumNameLength()
- {
- return MAX_FILENAME_LENGTH;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterName.java
deleted file mode 100644
index 515852938..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterName.java
+++ /dev/null
@@ -1,101 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for filter name. Filter names
- * have to be unique, and to enable saving per file, must be a valid file name.
- * <p>
- * The IInputValidator interface is implemented by our parent and it
- * is used by jface's InputDialog class and property sheet window.
- */
-public class ValidatorFilterName
- extends ValidatorFileName implements ISystemValidator
-{
- public static final int MAX_FILTERNAME_LENGTH = 100;
-
- //public static final boolean CASE_SENSITIVE = true;
- //public static final boolean CASE_INSENSITIVE = false;
-
- /**
- * Constructor accepting a Vector.
- * @param A vector containing list of existing filter names to compare against.
- * Note that toString() is used to get the string from each item.
- * @param true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorFilterName(Vector existingList)
- {
- super(existingList);
- init();
- }
- /**
- * Constructor accepting an Array.
- * @param An array containing list of existing strings to compare against.
- * @param true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorFilterName(String[] existingList)
- {
- super(existingList);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERNAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERNAME_NOTUNIQUE),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERNAME_NOTVALID));
- }
-
- public String toString()
- {
- return "FilterNameValidator class"; //$NON-NLS-1$
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
-
- /**
- * Overridable extension point to check for invalidate characters beyond what Eclipse checks for
- * @return true if valid, false if not
- */
- protected boolean checkForBadCharacters(String newText)
- {
- if (newText.indexOf('#') >= 0)
- return false;
- else
- return true;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for filters: 100
- */
- public int getMaximumNameLength()
- {
- return MAX_FILTERNAME_LENGTH;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterPoolName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterPoolName.java
deleted file mode 100644
index 05460d643..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterPoolName.java
+++ /dev/null
@@ -1,98 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for filter name. Filter names
- * have to be unique, and to enable saving per folder, must be a valid folder name.
- * <p>
- * The IInputValidator interface is implemented by our parent and it
- * is used by jface's InputDialog class and property sheet window.
- */
-public class ValidatorFilterPoolName
- extends ValidatorFolderName implements ISystemValidator
-{
- public static final int MAX_FILTERPOOLNAME_LENGTH = 50;
-
- /**
- * Constructor accepting a Vector.
- * @param A vector containing list of existing filter names to compare against.
- * Note that toString() is used to get the string from each item.
- * @param true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorFilterPoolName(Vector existingList)
- {
- super(existingList);
- init();
- }
- /**
- * Constructor accepting an Array.
- * @param An array containing list of existing strings to compare against.
- * @param true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorFilterPoolName(String[] existingList)
- {
- super(existingList);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERPOOLNAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERPOOLNAME_NOTUNIQUE),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERPOOLNAME_NOTVALID));
- }
-
-
- public String toString()
- {
- return "FilterNameValidator class"; //$NON-NLS-1$
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
-
- /**
- * Overridable extension point to check for invalidate characters beyond what Eclipse checks for
- * @return true if valid, false if not
- */
- protected boolean checkForBadCharacters(String newText)
- {
- if (newText.indexOf('#') >= 0)
- return false;
- else
- return true;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for filter pools: 50
- */
- public int getMaximumNameLength()
- {
- return MAX_FILTERPOOLNAME_LENGTH;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java
deleted file mode 100644
index 7c02ac7c8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java
+++ /dev/null
@@ -1,155 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-/**
- * This class is used in dialogs that prompt for filter strings.
- * This class typically needs to be overridden for a particular subsystem factory provider.
- * By default, it simply checks for uniqueness.
- */
-public class ValidatorFilterString
- extends ValidatorUniqueString implements ISystemValidator
-{
- public static final int MAX_FILTERSTRINGNAME_LENGTH = 1000;
-
- //public static final boolean CASE_SENSITIVE = true;
- //public static final boolean CASE_INSENSITIVE = false;
- protected SystemMessage msg_Invalid;
-
- /**
- * Constructor accepting a Vector for the list of existing strings, as simple strings.
- * @param existingList A vector of strings to compare against.
- * @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorFilterString(Vector existingList, boolean caseSensitive)
- {
- super(existingList, caseSensitive); // case sensitive uniqueness
- init();
- }
- /**
- * Constructor accepting an Array for the list of existing strings, as simple strings.
- * @param existingList An array containing list of existing strings to compare against.
- * @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorFilterString(String[] existingList, boolean caseSensitive)
- {
- super(existingList, caseSensitive); // case sensitive uniqueness
- init();
- }
- /**
- * Constructor accepting an Array for the list of existing strings, as actual filter strings.
- * @param existingList An array containing list of existing filter strings to compare against.
- * @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorFilterString(ISystemFilterString[] existingList, boolean caseSensitive)
- {
- super(convertFilterStringsToStrings(existingList), caseSensitive); // case sensitive uniqueness
- init();
- }
-
- /**
- * Use this constructor when the name need not be unique, and you just want
- * the syntax checking.
- */
- public ValidatorFilterString(boolean caseSensitive)
- {
- super(new String[0], caseSensitive);
- init();
- }
-
- /**
- * Set the error message to issue when a duplicate filter string is found.
- */
- public void setDuplicateFilterStringErrorMessage(SystemMessage msg)
- {
- super.setErrorMessages(null, msg_NonUnique);
- }
-
- /**
- * Converts an array of filter strings into an array of strings
- */
- protected static String[] convertFilterStringsToStrings(ISystemFilterString[] filterStrings)
- {
- if (filterStrings == null)
- return new String[0];
- String[] strings = new String[filterStrings.length];
- for (int idx=0; idx<filterStrings.length; idx++)
- strings[idx] = filterStrings[idx].getString();
- return strings;
- }
-
-
- private void init()
- {
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_NOTUNIQUE),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_NOTVALID));
- }
-
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- public String toString()
- {
- return "ValidatorFilterString class"; //$NON-NLS-1$
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
-
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking. We don't do anything by default.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- // nothing more to check so far. But if there ever is, return msg_Invalid
- return null;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for filter strings: 1000
- */
- public int getMaximumNameLength()
- {
- return MAX_FILTERSTRINGNAME_LENGTH;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFolderName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFolderName.java
deleted file mode 100644
index d1991f42b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFolderName.java
+++ /dev/null
@@ -1,143 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for a name that eventually needs to become a folder.
- * Relies on Eclipse supplied method to test for folder name validity.
- *
- * The IInputValidator interface is used by jface's
- * InputDialog class and numerous other platform and system classes.
- */
-public class ValidatorFolderName
- extends ValidatorUniqueString implements ISystemValidator
-{
- public static final int MAX_FOLDERNAME_LENGTH = 256;
-
- protected boolean fUnique;
- protected SystemMessage msg_Invalid;
- protected IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a vector containing a list of existing names to compare against.
- */
- public ValidatorFolderName(Vector existingNameList)
- {
- super(existingNameList, CASE_INSENSITIVE); // case insensitive uniqueness
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FOLDERNAME_NOTVALID);
- }
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a string array of existing names to compare against.
- */
- public ValidatorFolderName(String existingNameList[])
- {
- super(existingNameList, CASE_INSENSITIVE); // case sensitive uniqueness
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FOLDERNAME_NOTVALID);
- }
-
- /**
- * Use this constructor when the name need not be unique, and you just want
- * the syntax checking.
- */
- public ValidatorFolderName()
- {
- super(new String[0], CASE_INSENSITIVE);
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FOLDERNAME_NOTVALID);
- }
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- /**
- * Overridable extension point to check for invalidate characters beyond what Eclipse checks for
- * @return true if valid, false if not
- */
- protected boolean checkForBadCharacters(String newText)
- {
- return true;
- }
-
- public String toString()
- {
- return "FolderNameValidator class"; //$NON-NLS-1$
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- IStatus rc = workspace.validateName(newText, IResource.FOLDER);
- if (rc.getCode() != IStatus.OK)
- currentMessage = msg_Invalid;
- else if ((getMaximumNameLength() > 0) && // defect 42507
- (newText.length() > getMaximumNameLength()))
- currentMessage = msg_Invalid; // TODO: better message
- else
- currentMessage = checkForBadCharacters(newText) ? null: msg_Invalid;
- return currentMessage;
- }
-
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for folder names: 256
- */
- public int getMaximumNameLength()
- {
- return MAX_FOLDERNAME_LENGTH;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerInput.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerInput.java
deleted file mode 100644
index fa45544d0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerInput.java
+++ /dev/null
@@ -1,163 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-/**
- * For editable numeric properties.
- * Ensures only digits are entered.
- */
-public class ValidatorIntegerInput implements ISystemValidator
-{
- protected boolean allowBlank = false;
- protected int number;
- protected SystemMessage emptyMsg, invalidMsg, currentMessage;
-
- /**
- * Constructor to use when the default error messages are ok
- * @see #setBlankAllowed(boolean)
- */
- public ValidatorIntegerInput()
- {
- this(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_EMPTY));
- }
- /**
- * Constructor to use when wanting to specify the "value required" error message,
- * but use the default for the "Value not valid" error message
- * @see #setBlankAllowed(boolean)
- */
- public ValidatorIntegerInput(SystemMessage emptyMsg)
- {
- this(emptyMsg, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NOT_NUMERIC));
- }
- /**
- * Constructor to use when wanting to specify both error messages
- * @see #setBlankAllowed(boolean)
- */
- public ValidatorIntegerInput(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- setErrorMessages(emptyMsg, invalidMsg);
- }
-
- /**
- * Specify if an empty field is ok or not. The default is not, and will result in an error message.
- */
- public void setBlankAllowed(boolean allowBlank)
- {
- this.allowBlank = allowBlank;
- }
-
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- this.emptyMsg = emptyMsg;
- this.invalidMsg = invalidMsg;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
- currentMessage = null;
- if (!(input instanceof String))
- {
- //return "Unknown input";
- number = 1;
- return null;
- }
- else
- return isValid((String)input);
- }
- /**
- * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
- * @see #getSystemMessage()
- */
- public String isValid(String input)
- {
- currentMessage = null;
- if ((input==null)||(input.length()==0))
- {
- if (!allowBlank)
- currentMessage = emptyMsg;
- }
- else
- {
- try
- {
- number = Integer.parseInt(input);
- }
- catch (NumberFormatException exc)
- {
- currentMessage = invalidMsg;
- currentMessage.makeSubstitution(input);
- }
- }
- return (currentMessage==null) ? null : currentMessage.getLevelOneText();
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * Return the max length for this name, or -1 if no max.
- * For integers, the maximum is +- 2 to the 16th, so we set the max at 11 (to include the sign).
- */
- public int getMaximumNameLength()
- {
- return 11;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- * <pre><code>
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- * </code></pre>
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-
- /**
- * If validation is true, you can call this to get the input as a number
- */
- public int getNumber()
- {
- return number;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerRangeInput.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerRangeInput.java
deleted file mode 100644
index af0a9cd9a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorIntegerRangeInput.java
+++ /dev/null
@@ -1,115 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * For editable integer numbers that must be within a certain range to be valid
- */
-public class ValidatorIntegerRangeInput extends ValidatorIntegerInput
-{
- private int minRange, maxRange;
- private int orgMinRange, orgMaxRange;
- private Integer minRangeInt, maxRangeInt;
- private SystemMessage msg_InvalidRange;
-
- /**
- * Constructor when an empty field is not allowed (will result in an error message)
- * @param minRange - the lowest valid number
- * @param maxRange - the highest valid number
- */
- public ValidatorIntegerRangeInput(int minRange, int maxRange)
- {
- this(minRange, maxRange, false);
- }
- /**
- * Constructor when an empty field is allowed.
- * @param minRange - the lowest valid number
- * @param maxRange - the highest valid number
- * @param allowBlank - true if blanks allowed, false if not
- */
- public ValidatorIntegerRangeInput(int minRange, int maxRange, boolean allowBlank)
- {
- super(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NUMBER_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NUMBER_NOTVALID));
- msg_InvalidRange = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NUMBER_OUTOFRANGE);
- this.orgMinRange = minRange;
- this.orgMaxRange = maxRange;
- super.setBlankAllowed(allowBlank);
- setRange(minRange, maxRange);
- }
-
- /**
- * Reset the range
- */
- public void setRange(int minRange, int maxRange)
- {
- this.minRange = minRange;
- this.maxRange = maxRange;
- minRangeInt = new Integer(minRange);
- maxRangeInt = new Integer(maxRange);
- }
- /**
- * Restore the range originally specified in the constructor
- */
- public void restoreRange()
- {
- setRange(orgMinRange, orgMaxRange);
- }
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg, SystemMessage outOfRangeMsg)
- {
- super.setErrorMessages(emptyMsg, invalidMsg);
- msg_InvalidRange = outOfRangeMsg;
- }
-
- /**
- * Return the max length for this name, or -1 if no max.
- * We return a max length that just allows the largest number in the range to be set, plus the sign if negative
- */
- public int getMaximumNameLength()
- {
- int maxlen = Integer.toString(Math.abs(maxRange)).length();
- if (maxRange < 0)
- ++maxlen;
- return maxlen;
- }
-
- /**
- * Intercept of parent to also add range checking
- */
- public String isValid(String input)
- {
- String msg = super.isValid(input);
- if ((msg == null) && (input != null) && (input.length()>0))
- {
- if ((number < minRange) || (number > maxRange))
- {
- currentMessage = msg_InvalidRange;
- currentMessage.makeSubstitution(input, minRangeInt, maxRangeInt);
- msg = currentMessage.getLevelOneText();
- }
- }
- return msg;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLocalPath.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLocalPath.java
deleted file mode 100644
index c247706f2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLocalPath.java
+++ /dev/null
@@ -1,95 +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.validators;
-import java.io.File;
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-
-/**
- * This class is used in dialogs that prompt for a local directory path.
- *
- * The IInputValidator interface is used by jface's
- * InputDialog class and numerous other platform and system classes.
- */
-public class ValidatorLocalPath extends ValidatorPathName
-{
-
-
- public static final boolean WINDOWS = System.getProperty("os.name").toLowerCase().indexOf("windows") >= 0; //$NON-NLS-1$ //$NON-NLS-2$
- public static final char SEPCHAR = File.separatorChar;
-
- /**
- * Constructor for ValidatorLocalPath
- */
- public ValidatorLocalPath(Vector existingNameList)
- {
- super(existingNameList);
- }
-
- /**
- * Constructor for ValidatorLocalPath
- */
- public ValidatorLocalPath(String[] existingNameList)
- {
- super(existingNameList);
- }
-
- /**
- * Constructor for ValidatorLocalPath
- */
- public ValidatorLocalPath()
- {
- super();
- }
-
- /**
- * Validate each character.
- * Override of parent method.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- SystemMessage msg = super.isSyntaxOk(newText);
- if (msg == null)
- {
- boolean ok = true;
- if (WINDOWS)
- {
- if (newText.length()<3)
- ok = false;
- else if (newText.charAt(1) != ':')
- ok = false;
- else if (newText.charAt(2) != SEPCHAR)
- ok = false;
- else if (!Character.isLetter(newText.charAt(0)))
- ok = false;
- }
- else
- {
- if (newText.length()<1)
- ok = false;
- else if (newText.charAt(0) != SEPCHAR)
- ok = false;
- }
- if (!ok)
- msg = msg_Invalid;
- }
- return msg;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongInput.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongInput.java
deleted file mode 100644
index 610a94144..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongInput.java
+++ /dev/null
@@ -1,162 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-/**
- * For editable large numeric properties.
- * Ensures only digits are entered.
- */
-public class ValidatorLongInput implements ISystemValidator
-{
- protected boolean allowBlank = false;
- protected long number;
- protected SystemMessage emptyMsg, invalidMsg, currentMessage;
-
- /**
- * Constructor to use when the default error messages are ok
- * @see #setBlankAllowed(boolean)
- */
- public ValidatorLongInput()
- {
- this(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_EMPTY));
- }
- /**
- * Constructor to use when wanting to specify the "value required" error message,
- * but use the default for the "Value not valid" error message
- * @see #setBlankAllowed(boolean)
- */
- public ValidatorLongInput(SystemMessage emptyMsg)
- {
- this(emptyMsg, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NOT_NUMERIC));
- }
- /**
- * Constructor to use when wanting to specify both error messages
- * @see #setBlankAllowed(boolean)
- */
- public ValidatorLongInput(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- setErrorMessages(emptyMsg, invalidMsg);
- }
-
- /**
- * Specify if an empty field is ok or not. The default is not, and will result in an error message.
- */
- public void setBlankAllowed(boolean allowBlank)
- {
- this.allowBlank = allowBlank;
- }
-
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- this.emptyMsg = emptyMsg;
- this.invalidMsg = invalidMsg;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
- currentMessage = null;
- if (!(input instanceof String))
- {
- //return "Unknown input";
- number = 1;
- return null;
- }
- else
- return isValid((String)input);
- }
- /**
- * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
- * @see #getSystemMessage()
- */
- public String isValid(String input)
- {
- currentMessage = null;
- if ((input==null)||(input.length()==0))
- {
- if (!allowBlank)
- currentMessage = emptyMsg;
- }
- else
- {
- try
- {
- number = Long.parseLong(input);
- }
- catch (NumberFormatException exc)
- {
- currentMessage = invalidMsg;
- currentMessage.makeSubstitution(input);
- }
- }
- return (currentMessage==null) ? null : currentMessage.getLevelOneText();
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * Return the max length for this name. For us, we return 20.
- */
- public int getMaximumNameLength()
- {
- return 20;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- * <pre><code>
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- * </code></pre>
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-
- /**
- * If validation is true, you can call this to get the input as a number
- */
- public long getNumber()
- {
- return number;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongRangeInput.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongRangeInput.java
deleted file mode 100644
index 243d76430..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLongRangeInput.java
+++ /dev/null
@@ -1,113 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * For editable long numbers that must be within a certain range to be valid
- */
-public class ValidatorLongRangeInput extends ValidatorLongInput
-{
- private long minRange, maxRange;
- private long orgMinRange, orgMaxRange;
- private Long minRangeLong, maxRangeLong;
- private SystemMessage msg_InvalidRange;
-
- /**
- * Constructor when an empty field is not allowed (will result in an error message)
- * @param minRange - the lowest valid number
- * @param maxRange - the highest valid number
- */
- public ValidatorLongRangeInput(long minRange, long maxRange)
- {
- this(minRange, maxRange, false);
- }
- /**
- * Constructor when an empty field is allowed.
- * @param minRange - the lowest valid number
- * @param maxRange - the highest valid number
- * @param allowBlank - true if blanks allowed, false if not
- */
- public ValidatorLongRangeInput(long minRange, long maxRange, boolean allowBlank)
- {
- super(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NUMBER_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NUMBER_NOTVALID));
- msg_InvalidRange = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NUMBER_OUTOFRANGE);
- this.orgMinRange = minRange;
- this.orgMaxRange = maxRange;
- super.setBlankAllowed(allowBlank);
- setRange(minRange, maxRange);
- }
-
- /**
- * Reset the range
- */
- public void setRange(long minRange, long maxRange)
- {
- this.minRange = minRange;
- this.maxRange = maxRange;
- minRangeLong = new Long(minRange);
- maxRangeLong = new Long(maxRange);
- }
- /**
- * Restore the range originally specified in the constructor
- */
- public void restoreRange()
- {
- setRange(orgMinRange, orgMaxRange);
- }
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg, SystemMessage outOfRangeMsg)
- {
- super.setErrorMessages(emptyMsg, invalidMsg);
- msg_InvalidRange = outOfRangeMsg;
- }
- /**
- * Return the max length for this name, or -1 if no max.
- * We return a max length that just allows the largest number in the range to be set, plus the sign if negative
- */
- public int getMaximumNameLength()
- {
- int maxlen = Long.toString(Math.abs(maxRange)).length();
- if (maxRange < 0)
- ++maxlen;
- return maxlen;
- }
- /**
- * Intercept of parent to also add range checking
- */
- public String isValid(String input)
- {
- String msg = super.isValid(input);
- if ((msg == null) && (input != null) && (input.length()>0))
- {
- if ((number < minRange) || (number > maxRange))
- {
- currentMessage = msg_InvalidRange;
- currentMessage.makeSubstitution(input, minRangeLong, maxRangeLong);
- msg = currentMessage.getLevelOneText();
- }
- }
- return msg;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPathName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPathName.java
deleted file mode 100644
index a83db2929..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPathName.java
+++ /dev/null
@@ -1,125 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for a name that eventually needs to become a folder path.
- * Simply checks for a few obviously bad characters.
- *
- * The IInputValidator interface is used by jface's
- * InputDialog class and numerous other platform and system classes.
- */
-public class ValidatorPathName
- extends ValidatorUniqueString
-{
-
- protected boolean fUnique;
- protected SystemMessage msg_Invalid;
- protected StringBuffer specialChars;
- private int nbrSpecialChars;
-
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a vector containing a list of existing names to compare against.
- */
- public ValidatorPathName(Vector existingNameList)
- {
- super(existingNameList, CASE_INSENSITIVE); // case insensitive uniqueness
- init();
- }
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a string array of existing names to compare against.
- */
- public ValidatorPathName(String existingNameList[])
- {
- super(existingNameList, CASE_INSENSITIVE); // case sensitive uniqueness
- init();
- }
-
- /**
- * Use this constructor when the name need not be unique, and you just want
- * the syntax checking.
- */
- public ValidatorPathName()
- {
- super(new String[0], CASE_INSENSITIVE);
- init();
- fUnique = false;
- }
-
- protected void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_NOTVALID);
- specialChars = new StringBuffer("*?;'<>|"); //$NON-NLS-1$
- nbrSpecialChars = specialChars.length();
- }
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- //IStatus rc = workspace.validatePath(newText, IResource.FOLDER);
- //if (rc.getCode() != IStatus.OK)
- //return msg_Invalid;
- boolean ok = !containsSpecialCharacters(newText);
- if (!ok)
- return msg_Invalid;
- return null;
- }
-
- protected boolean containsSpecialCharacters(String newText)
- {
- boolean contains = false;
- int newLen = newText.length();
- for (int idx=0; !contains && (idx<newLen); idx++)
- {
- for (int jdx=0; !contains && (jdx<nbrSpecialChars); jdx++)
- if (newText.charAt(idx) == specialChars.charAt(jdx))
- contains = true;
- }
- return contains;
- }
-
- public String toString()
- {
- return "PathValidator class"; //$NON-NLS-1$
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 646aa45c3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPortInput.java
+++ /dev/null
@@ -1,79 +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.validators;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * For editable port number properties.
- * Ensures only digits are entered, and they appear to be a valid port.
- * TODO: what appears to be a valid port??
- */
-public class ValidatorPortInput extends ValidatorIntegerInput
-{
-
- public static final int MAXIMUM_PORT_NUMBER = 65535; // according to IP specification
-
- public ValidatorPortInput()
- {
- super(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID));
- }
-
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
- String msg = super.isValid(input);
- if (msg == null)
- {
- // yantzi: 2.1.2 added check for port > 65536 and changed msg to invalid port number
- if (number < 0 || number > MAXIMUM_PORT_NUMBER)
- {
- //if (number <= 0) // we don't let user enter 0 explicitly, only via button selection.
- //currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_EMPTY);
- currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID);
- msg = currentMessage.getLevelOneText();
- }
- }
- return msg;
- }
-
- /**
- * @see org.eclipse.rse.ui.validators.ValidatorIntegerInput#isValid(java.lang.String)
- */
- public String isValid(String input) {
- // yantzi:2.1.2 need to override this method in addition to the same
- // one that takes Object parametere otherwise we get the wrong error messages!
- String msg = super.isValid(input);
- if (msg == null)
- {
- // yantzi: 2.1.2 added check for port > 65536 and changed msg to invalid port number
- if (number < 0 || number > MAXIMUM_PORT_NUMBER)
- {
- //if (number <= 0) // we don't let user enter 0 explicitly, only via button selection.
- //currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_EMPTY);
- currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID);
- msg = currentMessage.getLevelOneText();
- }
- }
- return msg;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 215967451..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorProfileName.java
+++ /dev/null
@@ -1,89 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for a profile name.
- * Relies on Eclipse supplied method to test for folder name validity.
- * <p>
- * The IInputValidator interface is used by jface's
- * InputDialog class and numerous other platform and system classes.
- */
-public class ValidatorProfileName
- extends ValidatorFolderName implements ISystemValidator
-{
- public static final int MAX_PROFILENAME_LENGTH = 100; // arbitrary restriction! Defect 41816
- private SystemMessage reservedNameMsg;
-
- /**
- * Constructor. The list of existing names can be null if this is not a rename operation.
- */
- public ValidatorProfileName(Vector existingNameList)
- {
- super(existingNameList);
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PROFILENAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PROFILENAME_NOTUNIQUE),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PROFILENAME_NOTVALID));
- }
-
- /**
- * Return the max length for profiles: 100
- */
- public int getMaximumNameLength()
- {
- return MAX_PROFILENAME_LENGTH;
- }
-
- /**
- * Return the msg for reserved names
- */
- private SystemMessage getReservedNameMessage()
- {
- if (reservedNameMsg == null)
- reservedNameMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PROFILENAME_RESERVED);
- return reservedNameMsg;
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
- /**
- * Parent intercept to ensure no reserved names are used.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- super.isSyntaxOk(newText);
- if (currentMessage == null)
- {
- if (newText.equalsIgnoreCase("private")) { //$NON-NLS-1$
- currentMessage = getReservedNameMessage();
- }
- else if (newText.indexOf('.') != -1) {
- currentMessage = msg_Invalid;
- }
-
- }
- return currentMessage;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.java
deleted file mode 100644
index 322aa7399..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.validators;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-
-/**
- * On remote selection dialogs, you can pass an instance of this class to validate that
- * it is ok to enable the OK button when the user selects a remote object. If you return
- * a SystemMessage, ok will be disabled and the message will be shown on the message line.
- * Return a SystemMessage with blank in the first level text to disable OK without showing
- * an error message.
- * <p>
- * This class must be subclassed.Alternatively you can just implement {@link IValidatorRemoteSelection}
- */
-public abstract class ValidatorRemoteSelection implements IValidatorRemoteSelection
-{
-
- /**
- * The user has selected a remote object. Return null if OK is to be enabled, or a SystemMessage
- * if it is not to be enabled. The message will be displayed on the message line.
- */
- public abstract SystemMessage isValid(IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects);
-} \ No newline at end of file
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
deleted file mode 100644
index 2bcc0a172..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorServerPortInput.java
+++ /dev/null
@@ -1,65 +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.validators;
-
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-public class ValidatorServerPortInput extends ValidatorPortInput
-{
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
-
- String msg = super.isValid(input);
- if (msg == null)
- {
- // check that it's not a used port
- if (number == 4035)
- {
- currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PORT_WARNING);
- currentMessage.makeSubstitution("4035", "RSE daemon"); //$NON-NLS-1$ //$NON-NLS-2$
- msg = currentMessage.getLevelOneText();
- }
- }
- return msg;
- }
-
- public String isValid(String input)
- {
- // yantzi:2.1.2 need to override this method in addition to the same
- // one that takes Object parametere otherwise we get the wrong error messages!
- String msg = super.isValid(input);
- if (msg == null)
- {
- // check that it's not a used port
- if (number == 4035)
- {
- currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PORT_WARNING);
- currentMessage.makeSubstitution("4035", "RSE daemon"); //$NON-NLS-1$ //$NON-NLS-2$
- msg = currentMessage.getLevelOneText();
- }
- }
- return msg;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 6fc871b66..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSourceType.java
+++ /dev/null
@@ -1,110 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user-entered source type. This is typically
- * subsystem-dependent, such as "*.cpp" for a universal file subsystem.
- * However, this class is defined to be easily subclassed.
- */
-public class ValidatorSourceType extends ValidatorUniqueString
- implements ISystemValidator
-{
- public static final int MAX_SRCTYPE_LENGTH = 50; // max name for a src type
-
- protected SystemMessage msg_Invalid;
-
- /**
- * Constructor. You must specify if src types are case-sensitive or not.
- * Typically, you will also call setExistingNames to set the list of existing src types
- * for uniqueness-validation.
- */
- public ValidatorSourceType(boolean caseSensitive)
- {
- super(new String[0], caseSensitive);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_SRCTYPE_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_SRCTYPE_NOTUNIQUE));
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_SRCTYPE_NOTVALID);
- }
-
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- /**
- * Overridable method for invalidate character check, beyond what this class offers
- * @return true if valid, false if not
- */
- protected boolean checkForBadCharacters(String newText)
- {
- return true;
- }
-
- public String toString()
- {
- return "ValidatorSourceType class"; //$NON-NLS-1$
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- if (newText.length() > getMaximumNameLength())
- currentMessage = msg_Invalid;
- else
- currentMessage = checkForBadCharacters(newText) ? null: msg_Invalid;
- return currentMessage;
- }
-
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for folder names: 50
- */
- public int getMaximumNameLength()
- {
- return MAX_SRCTYPE_LENGTH;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 97ec10073..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSpecialChar.java
+++ /dev/null
@@ -1,206 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for string, where the
- * string is not allowed to content special characters, as supplied to this class.
- *
- * The IInputValidator interface is used by jface's
- * InputDialog class and numerous other platform and system classes.
- */
-public class ValidatorSpecialChar
- implements ISystemValidator // IInputValidator, ICellEditorValidator
-{
-
- public static final boolean EMPTY_ALLOWED_NO = false;
- public static final boolean EMPTY_ALLOWED_YES= true;
- private boolean isEmptyAllowed = true;
- protected StringBuffer specialChars;
- protected SystemMessage msg_Invalid;
- protected SystemMessage msg_Empty;
- protected SystemMessage currentMessage;
- private int nbrSpecialChars;
-
- /**
- * Constructor
- * @param specialChars String containing special characters to test for.
- * @param isEmptyAllowed true if an empty string is valid
- */
- public ValidatorSpecialChar(String specialChars, boolean isEmptyAllowed)
- {
- this(specialChars, isEmptyAllowed, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_NOTVALID), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_EMPTY));
- }
- /**
- * Constructor
- * @param specialChars String containing special characters to test for.
- * @param isEmptyAllowed true if an empty string is valid
- * @param msg_Invalid error message when invalid characters entered
- */
- public ValidatorSpecialChar(String specialChars, boolean isEmptyAllowed, SystemMessage msg_Invalid)
- {
- this(specialChars, isEmptyAllowed, msg_Invalid, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_EMPTY));
- }
- /**
- * Constructor
- * @param specialChars String containing special characters to test for.
- * @param isEmptyAllowed true if an empty string is valid
- * @param msg_Invalid error message when invalid characters entered
- * @param msg_Empty error message when empty string
- */
- public ValidatorSpecialChar(String specialChars, boolean isEmptyAllowed, SystemMessage msg_Invalid, SystemMessage msg_Empty)
- {
- this.isEmptyAllowed = isEmptyAllowed;
- this.specialChars = new StringBuffer(specialChars);
- this.nbrSpecialChars = specialChars.length();
- setErrorMessages(msg_Empty, msg_Invalid);
- }
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty or null if to keep the default
- * @param msg_Invalid error message when value entered is not valid, or null if to keep the default
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_Invalid)
- {
- if (msg_Empty != null)
- this.msg_Empty = msg_Empty;
- if (msg_Invalid != null)
- this.msg_Invalid = msg_Invalid;
- }
-
- // --------------------------
- // Internal helper methods...
- // --------------------------
-
- /**
- * Helper method to substitute data into a message
- */
- protected String doMessageSubstitution(SystemMessage msg, String substitution)
- {
- currentMessage = msg;
- if (msg.getNumSubstitutionVariables() > 0)
- return msg.makeSubstitution(substitution).getLevelOneText();
- else
- return msg.getLevelOneText();
- }
-
- /**
- * Helper method to set the current system message and return its level one text
- */
- protected String getSystemMessageText(SystemMessage msg)
- {
- currentMessage = msg;
- if (msg != null)
- return msg.getLevelOneText();
- else
- return null;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Validate each character.
- */
- public String isValid(String newText)
- {
- currentMessage = null;
- if ((newText==null) || (newText.length() == 0))
- {
- if (isEmptyAllowed)
- return null;
- else
- currentMessage = msg_Empty;
- }
- else if (containsSpecialCharacters(newText))
- currentMessage = msg_Invalid;
- else
- currentMessage = isSyntaxOk(newText);
- return (currentMessage == null) ? null : doMessageSubstitution(currentMessage, newText);
- }
-
- /**
- * As required by ICellEditor
- */
- public String isValid(Object newValue)
- {
- if (newValue instanceof String)
- return isValid((String)newValue);
- else
- return null;
- }
-
-
- protected boolean containsSpecialCharacters(String newText)
- {
- boolean contains = false;
- int newLen = newText.length();
- for (int idx=0; !contains && (idx<newLen); idx++)
- {
- for (int jdx=0; !contains && (jdx<nbrSpecialChars); jdx++)
- if (newText.charAt(idx) == specialChars.charAt(jdx))
- contains = true;
- }
- return contains;
- }
-
- /**
- * Override in child to do your own syntax checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- return null;
- }
-
- /**
- * Return the max length for this name, or -1 if no max
- */
- public int getMaximumNameLength()
- {
- return -1;
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- * <pre><code>
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- * </code></pre>
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index abf7ccac5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSystemName.java
+++ /dev/null
@@ -1,120 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for an alias name.
- * The rules used are the same as for Java names, for simplicity.
- * Depending on the constructor used, this will also check for duplicates.
- *
- * The IInputValidator interface is used by jface's
- * InputDialog class and numerous other platform and system classes.
- */
-public class ValidatorSystemName
- extends ValidatorUniqueString
-{
-
- //protected String[] existingNames;
- protected boolean fUnique;
- //protected String msg_Empty;
- //protected String msg_NonUnique;
- protected SystemMessage msg_Invalid;
-
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a vector containing a list of existing names to compare against.
- */
- public ValidatorSystemName(Vector existingNameList)
- {
- super(existingNameList, true); // case sensitive uniqueness
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTVALID);
- }
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a string array of existing names to compare against.
- */
- public ValidatorSystemName(String existingNameList[])
- {
- super(existingNameList, true); // case sensitive uniqueness
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTVALID);
- }
-
- /**
- * Use this constructor when the name need not be unique, and you just want
- * the syntax checking.
- */
- public ValidatorSystemName()
- {
- super(new String[0], true);
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE));
- fUnique = false;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTVALID);
- }
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- public String toString()
- {
- return "SystemNameValidator class"; //$NON-NLS-1$
- }
-
- // -------------------
- // Parent overrides...
- // -------------------
-
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- char currChar = newText.charAt(0);
- if (!Character.isJavaIdentifierStart(currChar))
- return msg_Invalid;
- for (int idx=1; idx<newText.length(); idx++)
- {
- currChar = newText.charAt(idx);
- if (!Character.isJavaIdentifierPart(currChar))
- return msg_Invalid;
- }
- return null;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index b9e910b1a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUniqueString.java
+++ /dev/null
@@ -1,365 +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.validators;
-import java.util.Arrays;
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for a string
- * that has to be unique. Unless you use the constructor that takes another
- * IInputValidator as input, no syntax checking is done other than checking
- * the input is non-empty and unique.
- *
- * The IInputValidator interface is implelemented by our parent and it
- * is used by jface's InputDialog class and property sheet window.
- */
-public class ValidatorUniqueString
- implements ISystemValidator, ISystemValidatorUniqueString
- //,IInputValidator, ICellEditorValidator ... ISystemValidator extends these
-{
-
- public static final boolean CASE_SENSITIVE = true;
- public static final boolean CASE_INSENSITIVE = false;
- public static final char QUOTE = '\"';
- protected ISystemValidator syntaxValidator;
- protected boolean caseSensitive;
- protected boolean useUpperCase;
- protected String existingList[];
- protected SystemMessage msg_Empty;
- protected SystemMessage msg_NonUnique;
- protected SystemMessage currentMessage;
-
- /**
- * Constructor accepting a Vector.
- * @param existingList A vector containing list of existing strings to compare against.
- * Note that toString() is used to get the string from each item.
- * @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorUniqueString(Vector existingList, boolean caseSensitive)
- {
- this.caseSensitive = caseSensitive;
- setExistingNamesList(existingList);
- // initialize error messages
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_NOTUNIQUE));
- }
- /**
- * Constructor accepting an Array.
- * @param existingList An array containing list of existing strings to compare against.
- * @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorUniqueString(String existingList[], boolean caseSensitive)
- {
- this.caseSensitive = caseSensitive;
- init(existingList, caseSensitive);
- // initialize error messages
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_NOTUNIQUE));
- }
- /**
- * Constructor accepting a Vector and another validator to use for the syntax checking.
- * @param existingList A vector containing list of existing strings to compare against.
- * Note that toString() is used to get the string from each item.
- * @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
- * @param syntaxValidator Another IInputValidator who does the job of checking the syntax. After
- * checking for non-nullness and uniqueness, this validator is used to
- * check for syntax.
- */
- public ValidatorUniqueString(Vector existingList, boolean caseSensitive,
- ISystemValidator syntaxValidator)
- {
- this(existingList, caseSensitive);
- this.syntaxValidator = syntaxValidator;
- }
- /**
- * Constructor accepting an Array and another validator to use for the syntax checking.
- * @param existingList An array containing list of existing strings to compare against.
- * @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
- * @param syntaxValidator Another IInputValidator who does the job of checking the syntax. After
- * checking for non-nullness and uniqueness, this validator is used to
- * check for syntax.
- */
- public ValidatorUniqueString(String existingList[], boolean caseSensitive,
- ISystemValidator syntaxValidator)
- {
- this(existingList, caseSensitive);
- this.syntaxValidator = syntaxValidator;
- }
- /**
- * Reset whether this is a case-sensitive list or not
- */
- public void setCaseSensitive(boolean caseSensitive)
- {
- this.caseSensitive = caseSensitive;
- }
- /**
- * For case-insensitive, we typically fold to lowercase, affecting what
- * this user sees in the substitution value of error messages.
- * Call this so the value substituted is uppercase vs lowercase.
- */
- public void setUseUpperCase()
- {
- this.useUpperCase = true;
- }
-
- /**
- * Reset the existing names list.
- */
- public void setExistingNamesList(Vector existingList)
- {
- if (existingList == null)
- this.existingList = null;
- else
- {
- String newList[] = new String[existingList.size()];
- for (int idx=0; idx<existingList.size(); idx++)
- {
- if (!caseSensitive)
- newList[idx] = existingList.elementAt(idx).toString().toLowerCase();
- else
- newList[idx] = existingList.elementAt(idx).toString();
- }
- init(newList, true); // don't redo the toLowerCase calls
- }
- }
- /**
- * Reset the existing names list.
- */
- public void setExistingNamesList(String[] existingList)
- {
- if (existingList == null)
- this.existingList = null;
- else
- init(existingList, caseSensitive);
- }
-
- /**
- * Return the existing names list. This will be a case-normalized and sorted list.
- */
- public String[] getExistingNamesList()
- {
- return existingList;
- }
-
- /**
- * Initialize sorted array.
- */
- private void init(String existingList[], boolean caseSensitive)
- {
- this.existingList = existingList;
- if (existingList == null)
- return;
- if (!caseSensitive) // speed up comparison by converting to all lowercase
- {
- String newList[] = new String[existingList.length];
- for (int idx=0; idx<existingList.length; idx++)
- {
- String string = existingList[idx];
- boolean quoted = (string.indexOf(QUOTE) != -1);
- if (!quoted)
- newList[idx] = string.toLowerCase();
- else
- newList[idx] = quotedToLowerCase(string);
- }
- existingList = newList;
- }
- Arrays.sort(existingList); // Arrays is a utility class in java.util. New in JDK 1.2
- this.existingList = existingList;
- }
-
- /**
- * Special-case way to fold non-quoted parts of a string to lowercase
- */
- public static String quotedToLowerCase(String input)
- {
- StringBuffer buffer = new StringBuffer(input.length());
- //System.out.println("INPUT : " + input);
- boolean inQuotes = false;
- for (int idx=0; idx<input.length(); idx++)
- {
- char c = input.charAt(idx);
- if (c == QUOTE)
- inQuotes = !inQuotes;
- else if (!inQuotes)
- c = Character.toLowerCase(c);
- buffer.append(c);
- }
- //System.out.println("OUTPUT: " + buffer.toString());
- return buffer.toString();
- }
-
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty or null if to keep the default
- * @param msg_NonUnique error message when value entered is not unique or null if to keep the default
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique)
- {
- if (msg_Empty != null)
- this.msg_Empty = msg_Empty;
- if (msg_NonUnique != null)
- this.msg_NonUnique = msg_NonUnique;
- }
-
- /**
- * Override in child to do your own syntax checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- return null;
- }
-
- public String toString()
- {
- return "UniqueNameValidator class"; //$NON-NLS-1$
- }
-
- // --------------------------
- // Internal helper methods...
- // --------------------------
-
- /**
- * Helper method to substitute data into a message
- */
- protected String doMessageSubstitution(SystemMessage msg, String substitution)
- {
- currentMessage = msg;
- if (msg.getNumSubstitutionVariables() > 0)
- {
- if (!useUpperCase)
- return msg.makeSubstitution(substitution).getLevelOneText();
- else
- return msg.makeSubstitution(substitution.toUpperCase()).getLevelOneText();
- }
- else
- return msg.getLevelOneText();
- }
-
- /**
- * Helper method to set the current system message and return its level one text
- */
- protected String getSystemMessageText(SystemMessage msg)
- {
- currentMessage = msg;
- if (msg != null)
- return msg.getLevelOneText();
- else
- return null;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Validates the given string. Returns the error message
- * used if the given string isn't valid. A return value
- * <code>null</code> or a string of length zero indicates
- * that the value is valid.
- * Note this is called per keystroke, by the platform.
- * @deprecated You should be using {@link #validate(String)} and SystemMessage objects
- */
- public String isValid(String newText)
- {
- currentMessage = null;
- newText = newText.trim();
- if (newText.length() == 0)
- currentMessage = msg_Empty;
- else
- {
- if (!caseSensitive && (existingList!=null))
- {
- if (newText.indexOf(QUOTE)!=-1)
- newText = quotedToLowerCase(newText);
- else
- newText = newText.toLowerCase();
- }
- /*
- if (!caseSensitive && (existingList!=null) && (Arrays.binarySearch(existingList,newText) >= 0))
- return msg_NonUnique.getLevelOneText();
- else if (caseSensitive && (existingList!=null) && (Arrays.binarySearch(existingList,newText) >= 0))
- return msg_NonUnique.getLevelOneText();
- */
- if ((existingList!=null) && (Arrays.binarySearch(existingList,newText) >= 0))
- currentMessage = msg_NonUnique;
- else if (syntaxValidator!=null)
- {
- String msg = syntaxValidator.isValid(newText);
- if (msg != null)
- {
- currentMessage = syntaxValidator.getSystemMessage();
- if (currentMessage == null) // tsk, tsk
- return msg;
- }
- }
- else
- currentMessage = isSyntaxOk(newText);
- }
- return (currentMessage == null) ? null : doMessageSubstitution(currentMessage, newText);
- }
-
- /**
- * As required by ICellEditor
- */
- public String isValid(Object newValue)
- {
- if (newValue instanceof String)
- return isValid((String)newValue);
- else
- {
- currentMessage = null;
- return null;
- }
- }
-
- /**
- * Return the max length for this name, or -1 if no max
- */
- public int getMaximumNameLength()
- {
- return -1;
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- * <pre><code>
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- * </code></pre>
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 787e88ed4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java
+++ /dev/null
@@ -1,120 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user defined action's command
- */
-public class ValidatorUserActionCommand
- implements ISystemValidator
-{
- public static final int MAX_UDACMD_LENGTH = 512; // max command for an action
-
- protected SystemMessage emptyMsg, invalidMsg, currentMessage;
-
- /**
- * Constructor to use when wanting to specify the "value required" error message,
- * but use the default for the "Value not valid" error message
- */
- public ValidatorUserActionCommand()
- {
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMD_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMD_NOTVALID));
- }
-
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- this.emptyMsg = emptyMsg;
- this.invalidMsg = invalidMsg;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
- currentMessage = null;
- if (!(input instanceof String))
- {
- return null;
- }
- else
- return isValid((String)input);
- }
- /**
- * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
- * @see #getSystemMessage()
- */
- public String isValid(String input)
- {
- currentMessage = null;
- if ((input==null)||(input.length()==0))
- {
- currentMessage = emptyMsg;
- }
- else
- {
- if (input.length() > MAX_UDACMD_LENGTH)
- currentMessage = invalidMsg;
- }
- return (currentMessage==null) ? null : currentMessage.getLevelOneText();
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * Return the max length for comments
- */
- public int getMaximumNameLength()
- {
- return MAX_UDACMD_LENGTH;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- * <pre><code>
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- * </code></pre>
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index aaf335aeb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java
+++ /dev/null
@@ -1,120 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user defined action's comment
- */
-public class ValidatorUserActionComment
- implements ISystemValidator
-{
- public static final int MAX_UDACMT_LENGTH = 256; // max comment for an action
-
- protected SystemMessage emptyMsg, invalidMsg, currentMessage;
-
- /**
- * Constructor to use when wanting to specify the "value required" error message,
- * but use the default for the "Value not valid" error message
- */
- public ValidatorUserActionComment()
- {
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMT_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMT_NOTVALID));
- }
-
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- this.emptyMsg = emptyMsg;
- this.invalidMsg = invalidMsg;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
- currentMessage = null;
- if (!(input instanceof String))
- {
- return null;
- }
- else
- return isValid((String)input);
- }
- /**
- * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
- * @see #getSystemMessage()
- */
- public String isValid(String input)
- {
- currentMessage = null;
- if ((input==null)||(input.length()==0))
- {
- //currentMessage = emptyMsg;
- }
- else
- {
- if (input.length() > MAX_UDACMT_LENGTH)
- currentMessage = invalidMsg;
- }
- return (currentMessage==null) ? null : currentMessage.getLevelOneText();
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * Return the max length for comments
- */
- public int getMaximumNameLength()
- {
- return MAX_UDACMT_LENGTH;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- * <pre><code>
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- * </code></pre>
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index dd09963dc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java
+++ /dev/null
@@ -1,133 +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.validators;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user defined action's name.
- */
-public class ValidatorUserActionName extends ValidatorUniqueString
- implements ISystemValidator
-{
- public static final int MAX_UDANAME_LENGTH = 256; // max name for an action
-
- protected boolean fUnique;
- protected SystemMessage msg_Invalid;
- protected IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a vector containing a list of existing names to compare against.
- */
- public ValidatorUserActionName(Vector existingNameList)
- {
- super(existingNameList, CASE_SENSITIVE); // case sensitive uniqueness
- init();
- }
- /**
- * Use this constructor when the name must be unique. Give the
- * ctor a string array of existing names to compare against.
- */
- public ValidatorUserActionName(String existingNameList[])
- {
- super(existingNameList, CASE_SENSITIVE); // case sensitive uniqueness
- init();
- }
-
- /**
- * Use this constructor when the name need not be unique, and you just want
- * the syntax checking.
- */
- public ValidatorUserActionName()
- {
- super(new String[0], CASE_SENSITIVE);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDANAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDANAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDANAME_NOTVALID);
- }
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- /**
- * Overridable method for invalidate character check, beyond what this class offers
- * @return true if valid, false if not
- */
- protected boolean checkForBadCharacters(String newText)
- {
- return ((newText.indexOf('&') == -1) && // causes problems in menu popup as its a mnemonic character
- (newText.indexOf('@') == -1)); // defect 43950
- }
-
- public String toString()
- {
- return "UserActionNameValidator class"; //$NON-NLS-1$
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- if (newText.length() > getMaximumNameLength())
- currentMessage = msg_Invalid;
- else
- currentMessage = checkForBadCharacters(newText) ? null: msg_Invalid;
- return currentMessage;
- }
-
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for folder names: 256
- */
- public int getMaximumNameLength()
- {
- return MAX_UDANAME_LENGTH;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index a67e79011..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserId.java
+++ /dev/null
@@ -1,51 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used in dialogs that prompt for a userId.
- * This does very basic userId validation, just to ensure there are no problems when the
- * user Id is saved in the preferences. This means restricting use of a couple special characters
- * that would mess up the key/value processing of the preference data.
- *
- * The IInputValidator interface is used by jface's
- * InputDialog class and numerous other platform and system classes.
- */
-public class ValidatorUserId
- extends ValidatorSpecialChar
-{
- /**
- * Constructor
- */
- public ValidatorUserId(boolean isEmptyAllowed)
- {
- super("=;", isEmptyAllowed, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_NOTVALID), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY)); //$NON-NLS-1$
- }
-
- /**
- * We could do additional syntax checking here if we decide to.
- * This method is called by parent class if all other error checking passes.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- return null;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index bfdd1b833..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java
+++ /dev/null
@@ -1,106 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user defined type's name.
- */
-public class ValidatorUserTypeName extends ValidatorUniqueString
- implements ISystemValidator
-{
- public static final int MAX_UDTNAME_LENGTH = 50; // max name for a file type
-
- protected SystemMessage msg_Invalid;
-
- /**
- * Use this constructor when the name need not be unique, and you just want the syntax checking.
- */
- public ValidatorUserTypeName()
- {
- super(new String[0], CASE_INSENSITIVE);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTNAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTNAME_NOTUNIQUE));
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTNAME_NOTVALID);
- }
-
- /**
- * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
- * @param msg_Empty error message when entry field is empty
- * @param msg_NonUnique error message when value entered is not unique
- * @param msg_Invalid error message when syntax is not valid
- */
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
- super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
- }
-
- /**
- * Overridable method for invalidate character check, beyond what this class offers
- * @return true if valid, false if not
- */
- protected boolean checkForBadCharacters(String newText)
- {
- return true;
- }
-
- public String toString()
- {
- return "UserTypeNameValidator class"; //$NON-NLS-1$
- }
-
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
- /**
- * Validate each character.
- * Override of parent method.
- * Override yourself to refine the error checking.
- */
- public SystemMessage isSyntaxOk(String newText)
- {
- if (newText.length() > getMaximumNameLength())
- currentMessage = msg_Invalid;
- else
- currentMessage = checkForBadCharacters(newText) ? null: msg_Invalid;
- return currentMessage;
- }
-
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for folder names: 50
- */
- public int getMaximumNameLength()
- {
- return MAX_UDTNAME_LENGTH;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 89873b932..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java
+++ /dev/null
@@ -1,120 +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.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user defined action's comment
- */
-public class ValidatorUserTypeTypes
- implements ISystemValidator
-{
- public static final int MAX_UDTTYPES_LENGTH = 512;
-
- protected SystemMessage emptyMsg, invalidMsg, currentMessage;
-
- /**
- * Constructor to use when wanting to specify the "value required" error message,
- * but use the default for the "Value not valid" error message
- */
- public ValidatorUserTypeTypes()
- {
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_NOTVALID));
- }
-
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- this.emptyMsg = emptyMsg;
- this.invalidMsg = invalidMsg;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
- currentMessage = null;
- if (!(input instanceof String))
- {
- return null;
- }
- else
- return isValid((String)input);
- }
- /**
- * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
- * @see #getSystemMessage()
- */
- public String isValid(String input)
- {
- currentMessage = null;
- if ((input==null)||(input.length()==0))
- {
- currentMessage = emptyMsg;
- }
- else
- {
- if (input.length() > MAX_UDTTYPES_LENGTH)
- currentMessage = invalidMsg;
- }
- return (currentMessage==null) ? null : currentMessage.getLevelOneText();
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * Return the max length for comments
- */
- public int getMaximumNameLength()
- {
- return MAX_UDTTYPES_LENGTH;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- * <pre><code>
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- * </code></pre>
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.java
deleted file mode 100644
index e86fd21fb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.ui.IActionFilter;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * Abstraction of the work needed to create an adapter factory for an adapter
- * that extends {@link AbstractSystemViewAdapter}.
- */
-public abstract class AbstractSystemRemoteAdapterFactory implements IAdapterFactory
-{
-
-
-
- /**
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(Object, Class)
- */
- public abstract Object getAdapter(Object adaptableObject, Class adapterType);
-
- /**
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISystemViewElementAdapter.class, ISystemDragDropAdapter.class, ISystemRemoteElementAdapter.class,
- IPropertySource.class, IWorkbenchAdapter.class, IActionFilter.class, IDeferredWorkbenchAdapter.class};
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 7d81418f2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java
+++ /dev/null
@@ -1,1806 +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.view;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.model.IHost;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
-import org.eclipse.rse.core.subsystems.AbstractResource;
-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.ISystemPromptableObject;
-import org.eclipse.rse.model.SystemRemoteResourceSet;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemDynamicPopupMenuExtensionManager;
-import org.eclipse.rse.ui.operations.Policy;
-import org.eclipse.rse.ui.operations.SystemFetchOperation;
-import org.eclipse.rse.ui.operations.SystemSchedulingRule;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.IElementCollector;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Base class for adapters needed for the SystemView viewer.
- * It implements the ISystemViewElementAdapter interface.
- * @see AbstractSystemRemoteAdapterFactory
- */
-public abstract class AbstractSystemViewAdapter
- implements ISystemViewElementAdapter, IPropertySource, ISystemPropertyConstants, IWorkbenchAdapter,
- ISystemViewActionFilter, IDeferredWorkbenchAdapter
-{
- //protected boolean isEditable = false;
-
- protected String filterString = null;
-
- /**
- * Current viewer. Set by content provider
- */
- protected Viewer viewer = null;
- /**
- * Current input provider. Set by content provider
- */
- protected Object propertySourceInput = null;
- /**
- * Current shell, set by the content provider
- */
- protected Shell shell;
- private ISystemViewInputProvider input;
- private String xlatedYes = null;
- private String xlatedNo = null;
- private String xlatedTrue = null;
- private String xlatedFalse = null;
- private String xlatedNotApplicable = null;
- private String xlatedNotAvailable = null;
- /**
- * For returning an empty list from getChildren: new Object[0]
- */
- protected Object[] emptyList = new Object[0];
- /**
- * For returning a msg object from getChildren. Will be an array with one item,
- * one of nullObject, canceledObject or errorObject
- */
- protected Object[] msgList = new Object[1];
- /**
- * Frequently returned msg object from getChildren: "empty list"
- */
- protected SystemMessageObject nullObject = null;
- /**
- * Frequently returned msg object from getChildren: "operation canceled"
- */
- protected SystemMessageObject canceledObject = null;
- /**
- * Frequently returned msg object from getChildren: "operation ended in error"
- */
- protected SystemMessageObject errorObject = null;
-
- /**
- * Message substitution prefix: "&"
- */
- protected static final String MSG_SUB_PREFIX = "&"; //$NON-NLS-1$
- /**
- * Message substitution variable 1: "&1"
- */
- protected static final String MSG_SUB1 = MSG_SUB_PREFIX+"1"; //$NON-NLS-1$
- /**
- * Message substitution variable 2: "&2"
- */
- protected static final String MSG_SUB2 = MSG_SUB_PREFIX+"2"; //$NON-NLS-1$
-
- /**
- * Delimiter for each object's key in a memento, used to persist tree view expansion state: "///"
- */
- public static final String MEMENTO_DELIM = SystemViewPart.MEMENTO_DELIM;
-
- /**
- * A handy constant of "new String[0]"
- */
- protected static final String[] EMPTY_STRING_LIST = new String[0];
-
- // -------------------
- // default descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
-
- // DKM: temporary memory caching stuff - we should replace this with something
- // more comprehensive later
- /**
- * A variable that can be used in getChildren to cache last returned results, if desired
- */
- protected Object[] _lastResults = null;
- /**
- * A variable that can be used to cache last selection, if desired
- */
- protected Object _lastSelected = null;
-
- // ------------------------------------------------------------------
- // Configuration methods, called by the label and content provider...
- // ------------------------------------------------------------------
-
- /**
- * <i>Configuration method. Typically called by content provider, viewer or action. Do not override.</i><br>
- * Set the viewer that is driving this adapter
- * Called by label and content provider.
- */
- public void setViewer(Viewer viewer)
- {
- this.viewer = viewer;
- }
- /**
- * <i>Configuration method. Typically called by content provider, viewer or action. Do not override.</i><br>
- * Set the shell to be used by any method that requires it.
- */
- public void setShell(Shell shell)
- {
- this.shell = shell;
- }
- /**
- * <i>Configuration method. Typically called by content provider, viewer or action. Do not override.</i><br>
- * Set the input object used to populate the viewer with the roots.
- * May be used by an adapter to retrieve context-sensitive information.
- * This is set by the Label and Content providers that retrieve this adapter.
- */
- public void setInput(ISystemViewInputProvider input)
- {
- this.input = input;
- }
-
- // ------------------------------------------------------------------
- // Getter methods, for use by subclasses and actions...
- // ------------------------------------------------------------------
-
- /**
- * <i>Getter method. Callable by subclasses. Do not override.</i><br>
- * Get the shell currently hosting the objects in this adapter
- */
- public Shell getShell()
- {
- if (shell == null || shell.isDisposed() || !shell.isVisible() || !shell.isEnabled())
- {
- // get a new shell
- Shell[] shells = Display.getCurrent().getShells();
- Shell lshell = null;
- for (int i = 0; i < shells.length && lshell == null; i++)
- {
- if (!shells[i].isDisposed() && shells[i].isEnabled() && shells[i].isVisible())
- {
- lshell = shells[i];
- }
- }
- if (lshell == null)
- lshell = SystemBasePlugin.getActiveWorkbenchShell();
- shell = lshell;
- }
- return shell;
- }
- /**
- * <i>Getter method. Callable by subclasses. Do not override.</i><br>
- * Return the current viewer, as set via setViewer or its deduced from the
- * setInput input object if set. May be null so test it.
- */
- public Viewer getViewer()
- {
- if (viewer == null)
- {
- ISystemViewInputProvider ip = getInput();
- if (ip != null)
- {
- return ip.getViewer();
- }
- else
- {
- IWorkbenchPart currentPart = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage().getActivePart();
- if (currentPart instanceof IRSEViewPart)
- {
- return ((IRSEViewPart)currentPart).getRSEViewer();
- }
- }
-
- }
- return viewer;
- }
- /**
- * <i>Getter method. Callable by subclasses. Do not override.</i><br>
- * Return the current viewer as an ISystemTree if it is one, or null otherwise
- */
- protected ISystemTree getCurrentTreeView()
- {
- Viewer v = getViewer();
- if (v instanceof ISystemTree)
- return (ISystemTree)v;
- else
- return null;
- }
-
- /**
- * <i>Getter method. Callable by subclasses. Do not override.</i><br>
- * Get the input object used to populate the viewer with the roots.
- * May be used by an adapter to retrieve context-sensitive information.
- */
- public ISystemViewInputProvider getInput()
- {
- return input;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses. You should override if not using AbstractResource.</i><br>
- * Returns the subsystem that contains this object. By default, if the
- * given element is instanceof {@link org.eclipse.rse.core.subsystems.AbstractResource AbstractResource},
- * it calls getSubSystem on it, else returns null.
- */
- public ISubSystem getSubSystem(Object element)
- {
- if (element instanceof AbstractResource)
- return ((AbstractResource)element).getSubSystem();
- else
- return null;
- }
-
- /**
- * <i>Called by SystemView viewer. No need to override or call.</i><br>
- * Returns any framework-supplied remote object actions that should be contributed to the popup menu
- * for the given selection list. This does nothing if this adapter does not implement ISystemViewRemoteElementAdapter,
- * else it potentially adds menu items for "User Actions" and Compile", for example. It queries the subsystem
- * factory of the selected objects to determine if these actions are appropriate to add.
- *
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell of viewer calling this. Most dialogs require a shell.
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addCommonRemoteActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- if (this instanceof ISystemRemoteElementAdapter)
- {
- ISystemRemoteElementAdapter rmtAdapter = (ISystemRemoteElementAdapter)this;
- Object firstSelection = getFirstSelection(selection);
- ISubSystem ss = rmtAdapter.getSubSystem(firstSelection);
- if (ss != null)
- {
- ISubSystemConfiguration ssf = ss.getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssf.getAdapter(ISubSystemConfigurationAdapter.class);
- adapter.addCommonRemoteActions(ssf, menu, selection, shell, menuGroup, ss);
- }
- }
-
- }
-
-
- /**
- * <i>Called by system viewers. No need to override or call.</i><br>
- * Contributes actions provided via the <code>dynamicPopupMenuExtensions</code> extension point. Unlike
- * addCommonRemoteActions(), these contributions are for any artifact in the RSE views and are contributed
- * independently of subsystem factories.
- *
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell of viewer calling this. Most dialogs require a shell.
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addDynamicPopupMenuActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- // system view adapter menu extensions
- // these extensions are independent of subsystem factories and are contributed via extension point
- SystemDynamicPopupMenuExtensionManager.getInstance().populateMenu(shell, menu, selection, menuGroup);
- }
-
- /**
- * This is your opportunity to add actions to the popup menu for the given selection.
- * <p>
- * To put your action into the given menu, use the menu's {@link org.eclipse.rse.ui.SystemMenuManager#add(String,org.eclipse.jface.action.IAction) add} method.
- * If you don't care where it goes within the popup, just pass the given <samp>menuGroup</samp> location id,
- * otherwise pass one of the GROUP_XXX values from {@link org.eclipse.rse.ui.ISystemContextMenuConstants}. If you pass one that
- * identifies a pre-defined cascading menu, such as GROUP_OPENWITH, your action will magically appear in that
- * cascading menu, even if it was otherwise empty.
- * <p>
- * For the actions themselves, you will probably use one of the base action classes:
- * <ul>
- * <li>{@link org.eclipse.rse.ui.actions.SystemBaseAction SystemBaseAction}. For a simple action doesn't present any UI.
- * <li>{@link org.eclipse.rse.ui.actions.SystemBaseDialogAction SystemBaseDialogAction}. For an action that presents a {@link org.eclipse.rse.ui.dialogs.SystemPromptDialog dialog}.
- * <li>{@link org.eclipse.rse.ui.actions.SystemBaseDialogAction SystemBaseWizardAction}. For an action that presents a {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard wizard}.
- * <li>{@link org.eclipse.rse.ui.actions.SystemBaseSubMenuAction SystemBaseSubMenuAction}. For an action that cascades into a submenu with other actions.
- * </ul>
- *
- * @param menu the popup menu you can contribute to
- * @param selection the current selection in the calling tree or table view
- * @param parent the shell of the calling tree or table view
- * @param menuGroup the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager {@link org.eclipse.rse.ui.SystemMenuManager#add(String,org.eclipse.jface.action.IAction) add} method.
- *
- * @see org.eclipse.rse.ui.view.ISystemViewElementAdapter#addActions(SystemMenuManager, IStructuredSelection, Shell, String)
- */
- public abstract void addActions(SystemMenuManager menu,IStructuredSelection selection,Shell parent,String menuGroup);
-
- /**
- * <i><b>Abstract</b>. Must be overridden by subclasses.</i><br>
- * IWorkbenchAdapter method. Returns an image descriptor for the image.
- * More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public abstract ImageDescriptor getImageDescriptor(Object element);
-
-
- /**
- * <i><b>Abstract</b>. Must be overridden by subclasses.</i><br>
- * Return the label for this object.
- * @see #getName(Object)
- * @see #getAbsoluteName(Object)
- */
- public abstract String getText(Object element);
-
- /**
- * Return the alternate label for this object. By default this
- * just returns the regular label. If a custom label is required,
- * this provides the means to it.
- * @see #getName(Object)
- * @see #getAbsoluteName(Object)
- */
- public String getAlternateText(Object element)
- {
- return getText(element);
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, but rarely needs to be.</i><br>
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * By default, returns <samp>getText(element);</samp>, but child classes can override if display name doesn't equal real name.
- * <p>
- * Called by common rename and delete actions, and used to populate property sheet.
- * @see #getText(Object)
- * @see #getAbsoluteName(Object)
- */
- public String getName(Object element)
- {
- return getText(element);
- }
- /**
- * <i><b>Abstract</b>. Must be overridden.</i><br>.
- * Return the fully-qualified name, versus just the displayable name, for this object.
- * For remote objects, this should be sufficient to uniquely identify this object within its
- * subsystem.
- * @see #getText(Object)
- * @see #getName(Object)
- */
- public abstract String getAbsoluteName(Object object);
-
- /**
- * <i>Internal use. Can be safely ignored.</i><br>
- * Return the name for this object. Unique requirement for IWorkbenchAdapter.
- * We map to <samp>getText(element)</samp>.
- */
- public String getLabel(Object element)
- {
- return getText(element);
- }
-
- /**
- * <i><b>Abstract</b>. Must be overridden by subclasses.</i><br>
- * Return the type label for this object.
- */
- public abstract String getType(Object element);
-
- /**
- * <i><b>Overridable</b> by subclasses, but rarely needs to be.</i><br>
- * Return the string to display in the status line when the given object is selected.
- * The default is:
- * <pre><samp>
- * getType(): getName()
- * </pre></samp>
- */
- public String getStatusLineText(Object element)
- {
- return getType(element) + ": " + getName(element); //$NON-NLS-1$
- }
-
- /**
- * <i><b>Abstract</b>. Must be overridden by subclasses.</i><br>
- * Return the parent of this object. This is required by eclipse UI adapters, but
- * we try desperately not to use in the RSE. So, you are probably safe returning null,
- * but if can return a parent, why not, go for it.
- */
- public abstract Object getParent(Object element);
-
- /**
- * <i><b>Abstract</b>. Must be overridden by subclasses.</i><br>
- * Return true if this object has children.
- */
- public abstract boolean hasChildren(Object element);
-
- /**
- * <i><b>Abstract</b>. Must be overridden by subclasses.</i><br>
- * Return the children of this object. Return null if children not supported.
- */
- public abstract Object[] getChildren(Object element);
-
- /**
- * This should be overridden by subclasses in order to provide
- * deferred query support via the Eclipse Jobs mechanism
- * Return the children of this object. Return null if children not supported.
- */
- public Object[] getChildren(IProgressMonitor monitor, Object element)
- {
- return getChildren(element);
- }
-
-
- /**
- * <i><b>Overridable</b> by subclasses, but rarely needs to be.</i><br>
- * Return the children of this object, using the given Expand-To filter.
- * By default, this calls getChildren(element). Override only if you support Expand-To menu actions.
- */
- public Object[] getChildrenUsingExpandToFilter(Object element, String expandToFilter)
- {
- return getChildren(element);
- }
-
- /**
- * <i>Callable by subclasses.</i><br>
- * Return the default descriptors for all system elements.
- */
- protected static IPropertyDescriptor[] getDefaultDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- propertyDescriptorArray = new PropertyDescriptor[3];
- // The following determine what properties will be displayed in the PropertySheet
- // resource type
- int idx = 0;
- propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(P_TYPE, SystemPropertyResources.RESID_PROPERTY_TYPE_LABEL, SystemPropertyResources.RESID_PROPERTY_TYPE_TOOLTIP);
- // resource name
- propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(P_TEXT, SystemPropertyResources.RESID_PROPERTY_NAME_LABEL, SystemPropertyResources.RESID_PROPERTY_NAME_TOOLTIP);
- // number of children in tree currently
- propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(P_NBRCHILDREN, SystemViewResources.RESID_PROPERTY_NBRCHILDREN_LABEL, SystemViewResources.RESID_PROPERTY_NBRCHILDREN_TOOLTIP);
-
- }
- //System.out.println("In getDefaultDescriptors() in AbstractSystemViewAdapter");
- return propertyDescriptorArray;
- }
-
- /**
- * <i>Callable by subclasses.</i><br>
- * Create and return a simple string readonly property descriptor.
- * @param propertyKey Key for this property, sent back in getPropertyValue.
- * @param label
- * @param description
- */
- protected static PropertyDescriptor createSimplePropertyDescriptor(String propertyKey, String label, String description)
- {
- PropertyDescriptor pd = new PropertyDescriptor(propertyKey, label);
- pd.setDescription(description);
- return pd;
- }
-
-
- /**
- * <i>Needed by framework for property sheet. No need to call or override.</i><br>
- * Returns a value for this object that can be edited in a property sheet.
- *
- * @return a value that can be editted
- */
- public Object getEditableValue()
- {
- return this;
- }
- /**
- * <i>Implemented. Do not override typically. See {@link #internalGetPropertyDescriptors()}.</i><br>
- * Returns the property descriptors defining what properties are seen in the property sheet.
- * By default returns descriptors for name, type and number-of-children only plus whatever
- * is returned from internalGetPropertyDescriptors().
- *
- * @return an array containing all descriptors.
- *
- * @see #internalGetPropertyDescriptors()
- */
- public IPropertyDescriptor[] getPropertyDescriptors()
- {
- IPropertyDescriptor[] addl = internalGetPropertyDescriptors();
- if ((addl == null) || (addl.length==0))
- return getDefaultDescriptors();
- else
- {
- IPropertyDescriptor[] defaults = getDefaultDescriptors();
- IPropertyDescriptor[] all = new IPropertyDescriptor[defaults.length+addl.length];
- int allIdx=0;
- for (int idx=0; idx<defaults.length; idx++)
- all[allIdx++] = defaults[idx];
- for (int idx=0; idx<addl.length; idx++)
- all[allIdx++] = addl[idx];
- return all;
- }
- }
-
- /**
- * <i><b>Abstract</b>.<i><br>
- * Implement this to return the property descriptors for the
- * properties in the property sheet. This is beyond the Name, Type and NbrOfChildren
- * properties which already implemented and done for you.
- * <p>
- * Override if want to include more properties in the property sheet,</p>
- * <p>If you override this for readonly properties, you must also override:</p>
- * <ul>
- * <li>{@link #getPropertyValue(Object)}
- * </ul>
- * <p>If you override this for editable properties, you must also override:</p>
- * <ul>
- * <li>{@link #isPropertySet(Object)}
- * <li>{@link #resetPropertyValue(Object)}
- * <li>{@link #setPropertyValue(Object,Object)}
- * </ul>
- *
- * @return an array containing all descriptors to be added to the default set of descriptors, or null
- * if no additional properties desired.
- * @see #createSimplePropertyDescriptor(String, String, String)
- */
- protected abstract IPropertyDescriptor[] internalGetPropertyDescriptors();
-
-
- /**
- * <i>Callable by subclasses. Do not override.</i><br>
- * Returns the list of property descriptors that are unique for this
- * particular adapter - that is the difference between the default
- * property descriptors and the total list of property descriptors.
- * <p>
- * If internalGetPropertyDescriptors() returns non-null, then returns that,
- * else computes the difference.
- * <p>
- * This is called by the table views like {@link org.eclipse.rse.ui.view.SystemTableView}.
- */
- public IPropertyDescriptor[] getUniquePropertyDescriptors()
- {
- //optimization by phil in 5.1.2:
- IPropertyDescriptor[] internalDescriptors = internalGetPropertyDescriptors();
- if (internalDescriptors != null)
- return internalDescriptors;
-
- IPropertyDescriptor[] allDescriptors = getPropertyDescriptors();
- IPropertyDescriptor[] commonDescriptors = getDefaultDescriptors();
-
- int totalSize = allDescriptors.length;
- int commonSize = commonDescriptors.length;
- int uniqueSize = totalSize - commonSize;
-
- int uniqueIndex = 0;
-
- IPropertyDescriptor[] uniqueDescriptors = new IPropertyDescriptor[uniqueSize];
- for (int i = 0; i < totalSize; i++)
- {
- IPropertyDescriptor descriptor = allDescriptors[i];
-
- boolean isUnique = true;
- for (int j = 0; j < commonSize; j++)
- {
- IPropertyDescriptor commonDescriptor = commonDescriptors[j];
- if (descriptor == commonDescriptor)
- {
- isUnique = false;
- }
- }
-
- if (isUnique && uniqueSize > uniqueIndex)
- {
- uniqueDescriptors[uniqueIndex] = descriptor;
- uniqueIndex++;
- }
- }
-
- return uniqueDescriptors;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Similar to getPropertyValue(Object key) but takes an argument
- * for determining whether to return a raw value or formatted value.
- * <b>
- * By default, simply calls getPropertyValue(key).
- * <p>
- * This is called by the table views in order to get values that can be sorted when the
- * user clicks on the column heading. To support this for a numeric property say, return
- * a Long/Integer object if false, versus returning string.
- *
- * @param key the name or key of the property as named by its property descriptor
- * @param formatted indication of whether to return the value in formatted or raw form
- * @return the current value of the given property
- */
- public Object getPropertyValue(Object key, boolean formatted)
- {
- return getPropertyValue(key);
- }
-
- /**
- * <i>Implemented. Do not override typically. See {@link #internalGetPropertyValue(Object)}.</i><br>
- * Returns the current value for the named property.<br>
- * By default handles ISystemPropertyConstants.P_TEXT, P_TYPE and P_NBRCHILDREN only, then defers to {@link #internalGetPropertyValue(Object)} for
- * subclasses.
- * <br><b>Note</b>: you will need to reference <code>propertySourceInput</code>, which is the currently selected object. Just case it to what you expect the selected object's type to be.
- *
- * @param key the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- public Object getPropertyValue(Object key)
- {
- String name = (String)key;
- if (name.equals(P_TEXT))
- //return getText(propertySourceInput);
- return getName(propertySourceInput);
- else if (name.equals(P_TYPE))
- return getType(propertySourceInput);
- else if (name.equals(P_NBRCHILDREN))
- {
- ISystemTree tree = getSystemTree();
- if (tree != null)
- return Integer.toString(tree.getChildCount(propertySourceInput));
- else
- {
- if ((viewer != null) && (viewer instanceof TreeViewer))
- return Integer.toString(getChildCount((TreeViewer)viewer, propertySourceInput));
- else
- return "0"; //$NON-NLS-1$
- }
- }
- else
- return internalGetPropertyValue(key);
- }
- /**
- * <i><b>Abstract</b>.<i><br>
- * Implement this to return the property descriptors for the
- * properties in the property sheet. This is beyond the Name, Type and NbrOfChildren
- * properties which already implemented and done for you.
- *
- * @param key the name of the property as named by its property descriptor
- * @return the current value of the property or null if not a known property.
- */
- protected abstract Object internalGetPropertyValue(Object key);
-
-
- /**
- * Return the number of immediate children in the tree, for the given tree node
- */
- private int getChildCount(TreeViewer viewer, Object element)
- {
- if (viewer.getControl().isDisposed())
- return 0;
- if (viewer.getExpandedState(element) == false)
- return 0;
-
- Widget w = findItemInTree(viewer, element);
- if (w != null)
- {
- if (w instanceof TreeItem)
- return ((TreeItem)w).getItemCount();
- else if (w instanceof Tree)
- return ((Tree)w).getItemCount();
- }
- return 0;
- }
-
- private Widget findItemInTree(TreeViewer tree, Object element)
- {
- Item[] items = getChildren(tree.getControl());
- if (items != null)
- {
- for (int i= 0; i < items.length; i++)
- {
- Widget o = internalFindItem(tree.getTree(), items[i], element);
- if (o != null)
- return o;
- }
- }
- return null;
- }
-
- private Widget internalFindItem(Tree tree, Item parent, Object element)
- {
- // compare with node
- Object data= parent.getData();
- if (data != null)
- {
- if (data.equals(element))
- return parent;
- }
- // recurse over children
- Item[] items= getChildren(parent);
- for (int i= 0; i < items.length; i++)
- {
- Item item= items[i];
- Widget o = internalFindItem(tree, item, element);
- if (o != null)
- return o;
- }
- return null;
- }
- private Item[] getChildren(Widget o)
- {
- if (o instanceof TreeItem)
- return ((TreeItem) o).getItems();
- if (o instanceof Tree)
- return ((Tree) o).getItems();
- return null;
- }
-
-
- /**
- * <i><b>Overridable</b> by subclasses. Must be iff editable properties are supported.</i><br>
- * Returns whether the property value has changed from the default.
- * Only applicable for editable properties.
- * <br>RETURNS FALSE BY DEFAULT.
- * @return <code>true</code> if the value of the specified property has changed
- * from its original default value; <code>false</code> otherwise.
- */
- public boolean isPropertySet(Object key)
- {
- return false;
- }
- /**
- * <i><b>Overridable</b> by subclasses. Must be iff editable properties are supported.</i><br>
- * Resets the specified property's value to its default value.
- * Called on editable property when user presses reset button in property sheet viewer.
- * DOES NOTHING BY DEFAULT.
- *
- * @param key the key identifying property to reset
- */
- public void resetPropertyValue(Object key)
- {
- }
- /**
- * <i><b>Overridable</b> by subclasses. Must be iff editable properties are supported.</i><br>
- * Sets the named property to the given value.
- * Called after an editable property is changed by the user.
- *
- * DOES NOTHING BY DEFAULT.
- *
- * @param key the key identifying property to reset
- * @param value the new value for the property
- */
- public void setPropertyValue(Object key, Object value)
- {
- }
-
- /**
- * <i>Called from adapter factories. Do not override.</i><br>
- * Set input object for property source queries. This <b>must</b> be called by your
- * XXXAdaptorFactory before returning this adapter object.
- */
- public void setPropertySourceInput(Object propertySourceInput)
- {
- this.propertySourceInput = propertySourceInput;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * User has double clicked on an object. If you want to do something special,
- * do it and return true. Otherwise return false to have the viewer do the default behaviour.
- */
- public boolean handleDoubleClick(Object element)
- {
- return false;
- }
-
- // ------------------------------------------
- // METHODS TO SUPPORT GLOBAL DELETE ACTION...
- // ------------------------------------------
-
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Return true if we should show the delete action in the popup for the given element.
- * If true, then canDelete will be called to decide whether to enable delete or not.
- * <p>By default, returns true.
- * @see #canDelete(Object)
- * @see #doDelete(Shell,Object)
- */
- public boolean showDelete(Object element)
- {
- return true;
- }
- /**
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- * <p>
- * By default, returns false. Override if your object is deletable.
- * @see #showDelete(Object)
- * @see #doDelete(Shell,Object)
- */
- public boolean canDelete(Object element)
- {
- return false;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Perform the delete action. By default does nothing. Override if your object is deletable.
- * Return true if this was successful. Return false if it failed and you issued a msg.
- * Throw an exception if it failed and you want to use the generic msg.
- * @see #showDelete(Object)
- * @see #canDelete(Object)
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception
- {
- return doDelete(shell, element);
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Perform the delete action. By default just calls the doDelete method for each item in the resourceSet.
- * Override if you wish to perform some sort of optimization for the batch delete.
- * Return true if this was successful. Return false if ANY delete op failed and a msg was issued.
- * Throw an exception if ANY failed and you want to use the generic msg.
- */
- public boolean doDeleteBatch(Shell shell, List resourceSet, IProgressMonitor monitor) throws Exception
- {
- boolean ok = true;
- for (int i = 0; i < resourceSet.size(); i++)
- {
- ok = ok && doDelete(shell, resourceSet.get(i), monitor);
- }
- return ok;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Perform the delete action. By default does nothing. Override if your object is deletable.
- * Return true if this was successful. Return false if it failed and you issued a msg.
- * Throw an exception if it failed and you want to use the generic msg.
- * @see #showDelete(Object)
- * @see #canDelete(Object)
- * @deprecated use the one with the monitor
- */
- public boolean doDelete(Shell shell, Object element) throws Exception
- {
- return false;
- }
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON RENAME ACTION...
- // ------------------------------------------
-
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Return true if we should show the rename action in the popup for the given element.
- * If true, then canRename will be called to decide whether to enable rename or not.
- * <p>By default, returns true.
- * @return true if we should show the rename action in the popup for the given element.
- * @see #canRename(Object)
- * @see #doRename(Shell,Object,String)
- */
- public boolean showRename(Object element)
- {
- return true;
- }
- /**
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename popup menu item will be enabled.
- * By default, returns false. Override if your object is renamable.
- * @return true if this object is renamable by the user
- * @see #showRename(Object)
- * @see #doRename(Shell,Object,String)
- * @see #getNameValidator(Object)
- * @see #getCanonicalNewName(Object,String)
- * @see #namesAreEqual(Object,String)
- */
- public boolean canRename(Object element)
- {
- return false;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Perform the rename action. By default does nothing. Override if your object is renamable.
- * Return true if this was successful. Return false if it failed and you issued a msg.
- * Throw an exception if it failed and you want to use the generic msg.
- * @return true if the rename was successful
- * @see #showRename(Object)
- * @see #canRename(Object)
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception
- {
- //org.eclipse.rse.core.ui.SystemMessage.displayErrorMessage("INSIDE DORENAME");
- return false;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and usually is iff canRename is.</i><br>
- * Return a validator for verifying the new name is correct.
- * If you return null, no error checking is done on the new name in the common rename dialog!!
- * <p>
- * Used in the common rename dialogs, and only if you return true to {@link #canRename(Object)}.
- * <p>
- * Suggest you use at least UniqueStringValidator or a subclass to ensure
- * new name is at least unique.
- * @see #canRename(Object)
- */
- public ISystemValidator getNameValidator(Object element)
- {
- return null;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and usually is iff canRename is.</i><br>
- * Form and return a new canonical (unique) name for this object, given a candidate for the new
- * name. This is called by the generic multi-rename dialog to test that all new names are unique.
- * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
- * <p>
- * For example, two connections or filter pools can have the same name if they are
- * in different profiles. Two iSeries QSYS objects can have the same name if their object types
- * are different.
- * <p>
- * Used in the common rename dialogs, and only if you return true to {@link #canRename(Object)}.
- * <p>
- * This method returns a name that can be used for uniqueness checking because it is qualified
- * sufficiently to make it unique.
- * <p>
- * By default, this simply returns the given name. It is overridden by child classes when appropriate.
- * @see #canRename(Object)
- */
- public String getCanonicalNewName(Object element, String newName)
- {
- // this is all for defect 42145. Phil
- return newName;
- }
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Compare the name of the given element to the given new name to decide if they are equal.
- * Allows adapters to consider case and quotes as appropriate.
- * <p>
- * Used in the common rename dialogs, and only if you return true to {@link #canRename(Object)}.
- * <p>
- * By default does an equalsIgnoreCase comparison
- * @see #canRename(Object)
- */
- public boolean namesAreEqual(Object element, String newName)
- {
- return getName(element).equalsIgnoreCase(newName);
- }
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON REFRESH ACTION...
- // ------------------------------------------
- /**
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Return true if we should show the refresh action in the popup for the given element.
- * Note the actual work to do the refresh is handled for you.
- * <p>
- * Default is true.
- */
- public boolean showRefresh(Object element)
- {
- return true;
- }
-
- // ------------------------------------------------------------
- // METHODS TO SUPPORT COMMON OPEN-IN-NEW-PERSPECTIVE ACTIONS...
- // ------------------------------------------------------------
- /**
- * <i><b>Overridable</b> by subclasses, and usually is NOT.</i><br>
- * Return true if we should show the <b>Go Into;</b> and <b>Open In New Window</b>
- * and <b>Go To</b> actions in the popup for the given element.
- * <p>
- * Only applicable for non-remote resources. Remote always show <b>Go To</b> only.
- */
- public boolean showOpenViewActions(Object element)
- {
- return true;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and usually is NOT.</i><br>
- * Return true if we should show the generic show in table action in the popup for the given element.
- */
- public boolean showGenericShowInTableAction(Object element)
- {
- return true;
- }
-
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON DRAG AND DROP FUNCTION...
- // ------------------------------------------
- /**
- * <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
- * Return true if this object can be copied to another location. By default,
- * we return false. Extenders may decide whether or not
- * certain objects can be dragged with this method.
- * @see #doDrag(Object,boolean,IProgressMonitor)
- * @see #canDrop(Object)
- * @see #doDrop(Object,Object,boolean,boolean,IProgressMonitor)
- * @see #validateDrop(Object,Object,boolean)
- */
- public boolean canDrag(Object element)
- {
- return false;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
- * Return true if this object can be copied to another location. By default,
- * we return false. Extenders may decide whether or not
- * certain objects can be dragged with this method.
- * Return true if these objects can be copied to another location via drag and drop, or clipboard copy.
- */
- public boolean canDrag(SystemRemoteResourceSet elements)
- {
- return false;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
- * Perform the drag on the given object. By default this does nothing
- * and returns nothing. Extenders supporting DnD are expected to implement
- * this method to perform a copy to a temporary object, the return value.
- * @see #canDrag(Object)
- * @see #canDrop(Object)
- * @see #doDrop(Object,Object,boolean,boolean,IProgressMonitor)
- * @see #validateDrop(Object,Object,boolean)
- */
- public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
- {
- return null;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
- * Return true if another object can be copied into this object. By default
- * we return false. Extenders may decide whether or not certain objects can
- * accept other objects with this method.
- * @see #canDrag(Object)
- * @see #doDrag(Object,boolean,IProgressMonitor)
- * @see #doDrop(Object,Object,boolean,boolean,IProgressMonitor)
- * @see #validateDrop(Object,Object,boolean)
- */
- public boolean canDrop(Object element)
- {
- return false;
-
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
- * Perform the drag on the given objects. This default implementation simply iterates through the
- * set. For optimal performance, this should be overridden.
- *
- * @param set the set of objects to copy
- * @param monitor the progress monitor
- * @return the set of objects as a result of the drag
- *
- */
- public ISystemResourceSet doDrag(SystemRemoteResourceSet set, IProgressMonitor monitor)
- {
- SystemWorkspaceResourceSet results = new SystemWorkspaceResourceSet();
- List resources = set.getResourceSet();
- for (int i = 0; i < resources.size(); i++)
- {
- results.addResource(doDrag(resources.get(i), true, monitor));
- }
- return results;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
- * Perform drop from the "fromSet" of objects to the "to" object
- * @param fromSet the source objects for the drop
- * @param to the target object for the drop
- * @param sameSystemType indication of whether the source and target reside of the same type of system
- * @param sameSystem indication of whether the source and target are on the same system
- * @param srcType the type of objects to be dropped
- * @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)
- {
- SystemRemoteResourceSet results = new SystemRemoteResourceSet(getSubSystem(to), this);
-
- List resources = fromSet.getResourceSet();
- for (int i = 0; i < resources.size(); i++)
- {
- results.addResource(doDrop(resources.get(i), to, sameSystemType, sameSystem, srcType, monitor));
- }
-
- return results;
- }
-
- /**
- * Sets filter context for querying. Override to provide specialized
- * behaviour.
- */
- public void setFilterString(String filterString)
- {
- this.filterString = filterString;
- }
-
- /**
- * Gets filter context for querying. Override to provide specialized
- * behaviour.
- */
- public String getFilterString()
- {
- return filterString;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
- * Perform drop from the "from" object to the "to" object. By default this does
- * nothing and we return false. Extenders supporting DnD are expected to implement
- * this method to perform a "paste" into an object.
- *
- * @return the new object that was copied
- *
- * @see #canDrag(Object)
- * @see #doDrag(Object,boolean,IProgressMonitor)
- * @see #canDrop(Object)
- * @see #validateDrop(Object,Object,boolean)
- */
- public Object doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
- {
- // for backward compatability
- return doDrop(from, to, sameSystemType, sameSystem, monitor);
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
- * Perform drop from the "from" object to the "to" object. By default this does
- * nothing and we return false. Extenders supporting DnD are expected to implement
- * this method to perform a "paste" into an object.
- *
- * @return the new object that was copied
- *
- * @see #canDrag(Object)
- * @see #doDrag(Object,boolean,IProgressMonitor)
- * @see #canDrop(Object)
- * @see #validateDrop(Object,Object,boolean)
- *
- * @deprecated use doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor) instead
- */
- public Object doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, IProgressMonitor monitor)
- {
- return null;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and usually is iff drag and drop supported..</i><br>
- * Return true if it is valid for the src object to be dropped in the target. We return false by default.
- * @param src the object to drop
- * @param target the object which src is dropped in
- * @param sameSystem whether this is the same system or not
- * @return whether this is a valid operation
- *
- * @see #canDrag(Object)
- * @see #doDrag(Object,boolean,IProgressMonitor)
- * @see #canDrop(Object)
- * @see #doDrop(Object,Object,boolean,boolean,IProgressMonitor)
- */
- public boolean validateDrop(Object src, Object target, boolean sameSystem)
- {
- return false;
- }
-
- public boolean validateDrop(ISystemResourceSet set, Object target, boolean sameSystem)
- {
- boolean valid = true;
- List resources = set.getResourceSet();
- for (int i = 0; i < resources.size() && valid; i++)
- {
- valid = validateDrop(resources.get(i), target, sameSystem);
- }
- return valid;
- }
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- * This just defaults to getName, but if that is not sufficient override it here.
- */
- public String getMementoHandle(Object element)
- {
- if (this instanceof ISystemRemoteElementAdapter)
- return ((ISystemRemoteElementAdapter)this).getAbsoluteName(element);
- else
- return getName(element);
- }
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Return what to save to disk to identify this element when it is the input object to a secondary
- * Remote System Explorer perspective. Defaults to getMementoHandle(element).
- */
- public String getInputMementoHandle(Object element)
- {
- return getMementoHandle(element);
- }
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element)
- {
- if (this instanceof ISystemRemoteElementAdapter)
- return ISystemMementoConstants.MEMENTO_KEY_REMOTE;
- else
- return getType(element);
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Somtimes we don't want to remember an element's expansion state, such as for temporarily inserted
- * messages. In these cases return false from this method. The default is true
- */
- public boolean saveExpansionState(Object element)
- {
- return true;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Return true if this object is a "prompting" object that prompts the user when expanded.
- * For such objects, we do not try to save and restore their expansion state on F5 or between
- * sessions.
- * <p>
- * Default is false unless element implements ISystemPromptable object. Override as appropriate.
- */
- public boolean isPromptable(Object element)
- {
- return (element instanceof ISystemPromptableObject);
- }
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Selection has changed in the Remote Systems view. Empty by default, but override if you need
- * to track selection changed. For example, this is used to drive table views that respond to
- * selection.
- * @param element - first selected object
- */
- public void selectionChanged(Object element) // d40615
- {
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, typically if additional properties are supported.</i><br>
- * From <samp>IActionFilter</samp> so the popupMenus extension point can use &lt;filter&gt;, &lt;enablement&gt;
- * or &lt;visibility&gt;. The support is for the following:
- * <ol>
- * <li>name="value". The given value must match getName(target) exactly, or if ends with asterisk must match the beginning.
- * <li>name="type". The given value must match getType(target) exactly. Be careful, as this is usually translated.
- * <li>name="hasChildren". If the given value is "true", returns true if hasChildren(target) returns true. If given "false",
- * returns true if the hasChildren returns false.
- * <li>name="connection". If the given value is "true", returns true if the subsystem is connected. If given "false",
- * returns true if the subsystem is not connected.
- * <li>name="offline". If the given value is "true", returns true if the subsystem is offline. If given "false",
- * returns true if the subsystem is offline.
- * <li>name="systemType". The given value is a system type, and this returns true if this object's connection is of that
- * type. You can specify multiple values by comma-separating them, and this returns if there is a match on any them.
- * <li>name="subsystemFactoryId". The given value is a subsystem factory Id, and this returns true if this object's
- * subsystem is from that subsystem factory. For connections, returns false.
- * You can specify multiple values by comma-separating them, and this returns if there is a match on any them.
- * <li>name="subsystemFactoryCategory". The given value is a subsystem category, and this returns true if this object's
- * subsystem is from a subsystem factory of that category. For connections, returns false.
- * You can specify multiple values by comma-separating them, and this returns if there is a match on any them.
- * </ol>
- * <p>
- * If desired, override, and call super(), to support additional filter criteria for &lt;filter&gt;, &lt;enablement&gt; and &lt;visibility&gt;.
- *
- * @see org.eclipse.ui.IActionFilter#testAttribute(Object, String, String)
- */
- public boolean testAttribute(Object target, String name, String value)
- {
- //System.out.println("Inside testAttribute: name = " + name + ", value = " + value);
- if (name.equalsIgnoreCase("name")) //$NON-NLS-1$
- {
- if (value.endsWith("*")) //$NON-NLS-1$
- {
- // we have a wild card test, and * is the last character in the value
- if (getName(target).startsWith(value.substring(0, value.length() - 1)))
- return true;
- }
- else
- return value.equals(getName(target));
- }
- else if (name.equalsIgnoreCase("type")) //$NON-NLS-1$
- return value.equals(getType(target));
- else if (name.equalsIgnoreCase("hasChildren")) //$NON-NLS-1$
- {
- return hasChildren(target) ? value.equals("true") : value.equals("false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (name.equalsIgnoreCase("connected")) //$NON-NLS-1$
- {
- ISubSystem ss = getSubSystem(target);
- if (ss != null)
- return ss.isConnected() ? value.equals("true") : value.equals("false"); //$NON-NLS-1$ //$NON-NLS-2$
- else
- return false;
- }
- else if (name.equalsIgnoreCase("offline")) //$NON-NLS-1$
- {
- ISubSystem ss = getSubSystem(target);
- if (ss != null)
- return ss.isOffline() ? value.equals("true") : value.equals("false"); //$NON-NLS-1$ //$NON-NLS-2$
- else
- return false;
- }
- else if (name.equalsIgnoreCase("systemType")) //$NON-NLS-1$
- {
- ISubSystem ss = getSubSystem(target);
- String[] values = tokenize(value);
- if (ss == null)
- {
- if (!(target instanceof IHost))
- return false;
- String connSysType = ((IHost)target).getSystemType();
- for (int idx=0; idx<values.length; idx++)
- {
- if (connSysType.equals(values[idx]))
- return true;
- }
- return false;
- }
- for (int idx=0; idx<values.length; idx++)
- {
- if (ss.getHost().getSystemType().equals(values[idx]))
- return true;
- }
- return false;
- }
- else if (name.equalsIgnoreCase("subsystemFactoryId")) //$NON-NLS-1$
- {
- ISubSystem ss = getSubSystem(target);
- //System.out.println("ss null? " + (ss == null));
- if (ss == null)
- return false;
- String[] values = tokenize(value);
- //System.out.println("Nbr of values: " + (values.length));
- //System.out.println("Comparing against: " + (ss.getParentSubSystemConfiguration().getId()));
- boolean ok = false;
- for (int idx=0; !ok && (idx<values.length); idx++)
- {
- if (ss.getSubSystemConfiguration().getId().equals(values[idx]))
- ok = true;
- }
- //System.out.println("Returning: " + ok);
- return ok;
- }
- else if (name.equalsIgnoreCase("subsystemFactoryCategory")) //$NON-NLS-1$
- {
- ISubSystem ss = getSubSystem(target);
- if (ss == null)
- return false;
- String[] values = tokenize(value);
- for (int idx=0; idx<values.length; idx++)
- {
- if (ss.getSubSystemConfiguration().getCategory().equals(values[idx]))
- return true;
- }
- return false;
- }
- return false;
- }
-
- /**
- * Break given comma-delimited string into tokens
- */
- private String[] tokenize(String input)
- {
- StringTokenizer tokens = new StringTokenizer(input,";"); //$NON-NLS-1$
- Vector v = new Vector();
- while (tokens.hasMoreTokens())
- v.addElement(tokens.nextToken());
- String[] stringArray = new String[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- stringArray[idx] = (String)v.elementAt(idx);
- return stringArray;
- }
-
- // --------------------------------------
- // ISystemRemoteElementAdapter methods...
- // We include these here so that if a BP
- // creates a class that extends this one
- // and implements the remote resource
- // adapter interface, these methods will
- // be already created, reducing work.
- // These are low-usage methods.
- // --------------------------------------
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * From {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubSubType(Object)}.
- * Pre-supplied for convenience for subclasses that want to implement this interface for
- * remote object adapters.
- * <p>
- * Returns null. Override if you want to supply a sub-sub-type for filtering in the popupMenus extension point.
- */
- public String getRemoteSubSubType(Object element)
- {
- return null; // Extremely fine grained. We don't use it.
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * From {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubSubType(Object)}.
- * Pre-supplied for convenience for subclasses that want to implement this interface for
- * remote object adapters.
- * <p>
- * Returns null. Override if the remote resource is compilable.
- */
- public String getRemoteSourceType(Object element)
- {
- return null;
- }
- /**
- * <i><b>Overridable</b> by subclasses, and must be for editable objects.</i><br>
- * Return the remote edit wrapper for this object.
- * @param object the object to edit
- * @return the editor wrapper for this object
- */
- public ISystemEditableRemoteObject getEditableRemoteObject(Object object)
- {
- return null;
- }
-
- /**
- * <i><b>Overridable</b> by subclasses, and must be for editable objects.</i><br>
- * Indicates whether the specified object can be edited or not.
- * @param object the object to edit
- * @return true if the object can be edited. Returns false by default.
- */
- public boolean canEdit(Object object)
- {
- return false;
- }
-
- // ------------------
- // HELPER METHODS...
- // ------------------
- /**
- * <i>Callable by subclasses.</i><br>
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- * <p>Just a convenient shortcut to {@link org.eclipse.rse.core.SystemAdapterHelpers#getAdapter(Object, Viewer)}
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o, getViewer());
- /*
- ISystemViewElementAdapter adapter = null;
- if (!(o instanceof IAdaptable))
- adapter = (ISystemViewElementAdapter)Platform.getAdapterManager().getAdapter(o,ISystemViewElementAdapter.class);
- else
- adapter = (ISystemViewElementAdapter)((IAdaptable)o).getAdapter(ISystemViewElementAdapter.class);
- if (adapter == null)
- RSEUIPlugin.logDebugMessage(this.getClass().getName(), "ADAPTER IS NULL FOR ELEMENT : " + o);
- else
- {
- adapter.setViewer(getViewer()); // added this in V5.0, just in case. Phil
- }
- return adapter;
- */
- }
- /**
- * <i>Callable by subclasses.</i><br>
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- * <p>Just a convenient shortcut to {@link org.eclipse.rse.core.SystemAdapterHelpers#getRemoteAdapter(Object, Viewer)}
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- // hmmm, any reason why we shouldn't do the following 2 lines of code for performance reasons?
- //if (this instanceof ISystemRemoteElementAdapter)
- // return (ISystemRemoteElementAdapter)this;
- return SystemAdapterHelpers.getRemoteAdapter(o, getViewer());
- /*
- if (!(o instanceof IAdaptable))
- adapter = (ISystemRemoteElementAdapter)Platform.getAdapterManager().getAdapter(o,ISystemRemoteElementAdapter.class);
- adapter = (ISystemRemoteElementAdapter)((IAdaptable)o).getAdapter(ISystemRemoteElementAdapter.class);
- if ((adapter != null) && (adapter instanceof ISystemViewElementAdapter))
- {
- ((ISystemViewElementAdapter)adapter).setViewer(getViewer()); // added this in V5.0, just in case. Phil
- }
- return adapter;
- */
- }
-
- /**
- * <i>Callable by subclasses.</i><br>
- * Do message variable substitution. Using you are replacing &1 (say) with
- * a string.
- * @param msg message containing substitution variable. Eg "Connect failed with return code &1"
- * @param subOld substitution variable. Eg "%1"
- * @param subNew substitution data. Eg "001"
- * @return message with all occurrences of variable substituted with data.
- */
- public static String sub(String msg, String subOld, String subNew)
- {
- StringBuffer temp = new StringBuffer();
- int lastHit = 0;
- int newHit = 0;
- for (newHit = msg.indexOf(subOld,lastHit); newHit != -1;
- lastHit = newHit, newHit = msg.indexOf(subOld,lastHit))
- {
- if (newHit >= 0)
- temp.append(msg.substring(lastHit,newHit));
- temp.append(subNew);
- newHit += subOld.length();
- }
- if (lastHit >= 0)
- temp.append(msg.substring(lastHit));
- return temp.toString();
- }
-
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return the current viewer as an ISystemTree if the viewer is set and
- * it implements this interface (SystemView does). May be null so test it.
- */
- protected ISystemTree getSystemTree()
- {
- Viewer v = getViewer();
- if ((v != null) && (v instanceof ISystemTree))
- return (ISystemTree)v;
- else
- return null;
- }
-
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return "Yes" translated
- */
- public String getTranslatedYes()
- {
- if (xlatedYes == null)
- xlatedYes = SystemResources.TERM_YES;
- return xlatedYes;
- }
-
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return "No" translated
- */
- protected String getTranslatedNo()
- {
- if (xlatedNo == null)
- xlatedNo = SystemResources.TERM_NO;
- return xlatedNo;
- }
-
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return "True" translated
- */
- protected String getTranslatedTrue()
- {
- if (xlatedTrue == null)
- xlatedTrue = SystemResources.TERM_TRUE;
- return xlatedTrue;
- }
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return "False" translated
- */
- protected String getTranslatedFalse()
- {
- if (xlatedFalse == null)
- xlatedFalse = SystemResources.TERM_FALSE;
- return xlatedFalse;
- }
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return "Not application" translated
- */
- protected String getTranslatedNotApplicable()
- {
- if (xlatedNotApplicable == null)
- xlatedNotApplicable = SystemPropertyResources.RESID_TERM_NOTAPPLICABLE;
- return xlatedNotApplicable;
- }
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return "Not available" translated
- */
- protected String getTranslatedNotAvailable()
- {
- if (xlatedNotAvailable == null)
- xlatedNotAvailable = SystemPropertyResources.RESID_TERM_NOTAVAILABLE;
- return xlatedNotAvailable;
- }
-
- /**
- * <i>Internal use. Do not override</i><br>
- */
- protected void initMsgObjects()
- {
- 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);
- }
-
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * In getChildren, return <samp>checkForNull(children, true/false)<.samp> versus your array directly.
- * This method checks for a null array which is not allowed and replaces it with an empty array.
- * If true is passed then it returns the "Empty list" message object if the array is null or empty
- */
- protected Object[] checkForNull(Object[] children, boolean returnNullMsg)
- {
- if ((children == null) || (children.length==0))
- {
- if (!returnNullMsg)
- return emptyList;
- else
- {
- if (nullObject == null)
- initMsgObjects();
- msgList[0] = nullObject;
- return msgList;
- }
- }
- else
- return children;
- }
-
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return the "Operation cancelled by user" msg as an object array so can be used to answer getChildren()
- */
- protected Object[] getCancelledMessageObject()
- {
- if (canceledObject == null)
- initMsgObjects();
- msgList[0] = canceledObject;
- return msgList;
- }
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return the "Operation failed" msg as an object array so can be used to answer getChildren()
- */
- protected Object[] getFailedMessageObject()
- {
- if (errorObject == null)
- initMsgObjects();
- msgList[0] = errorObject;
- return msgList;
- }
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Return the "Empty list" msg as an object array so can be used to answer getChildren()
- */
- protected Object[] getEmptyMessageObject()
- {
- if (nullObject == null)
- initMsgObjects();
- msgList[0] = nullObject;
- return msgList;
- }
-
- /**
- * <i>Callable by subclasses. Do not override</i><br>
- * Get the first selected object of the given selection
- */
- protected Object getFirstSelection(IStructuredSelection selection)
- {
- return selection.getFirstElement();
- }
-
- /**
- * Return a filter string that corresponds to this object.
- * @param object the object to obtain a filter string for
- * @return the corresponding filter string if applicable
- */
- public String getFilterStringFor(Object object)
- {
- return null;
- }
-
-
- /**
- * these methods are for deferred fetch operations
- */
-
- /*
- * Return whether deferred queries are supported. By default
- * they are not supported. Subclasses must override this to
- * return true if they are to support this.
- */
- public boolean supportsDeferredQueries()
- {
- return false;
- }
-
-
- public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor)
- {
- SystemFetchOperation operation = null;
- monitor = Policy.monitorFor(monitor);
- String taskName = SystemViewResources.RESID_FETCHING;
- monitor.beginTask(taskName, 100);
- operation = getSystemFetchOperation(o, collector);
- try
- {
- operation.run(Policy.subMonitorFor(monitor, 100));
- }
- catch (InvocationTargetException e)
- {
- operation.setException(e);
- }
- catch (InterruptedException e)
- {
- // Cancelled by the user;
- }
- finally
- {
- monitor.done();
- }
- }
-
-
- /**
- * Returns the SystemFetchOperation to be used in performing a query. Adapters should override
- * this to provide customizations where appropriate.
- * @param o
- * @param collector
- * @return the fetch operation. By default it returns the base implementation
- */
- protected SystemFetchOperation getSystemFetchOperation(Object o, IElementCollector collector)
- {
- return new SystemFetchOperation(null, (IAdaptable)o, this, collector);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#isContainer()
- */
- public boolean isContainer()
- {
- return true;
- }
-
- public ISchedulingRule getRule(Object element) {
- IAdaptable location = (IAdaptable)element;
- return new SystemSchedulingRule(location);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IRSEViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IRSEViewPart.java
deleted file mode 100644
index e854d327b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IRSEViewPart.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.jface.viewers.Viewer;
-
-public interface IRSEViewPart
-{
- Viewer getRSEViewer();
-} \ No newline at end of file
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
deleted file mode 100644
index 2cee8a87b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemDragDropAdapter.java
+++ /dev/null
@@ -1,114 +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.view;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.SystemRemoteResourceSet;
-
-public interface ISystemDragDropAdapter extends IRemoteObjectIdentifier
-{
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON DRAG AND DROP FUNCTION...
- // ------------------------------------------
- /**
- * Return true if this object can be copied to another location via drag and drop, or clipboard copy.
- */
- public boolean canDrag(Object element);
-
- /**
- * Return true if these objects can be copied to another location via drag and drop, or clipboard copy.
- */
- public boolean canDrag(SystemRemoteResourceSet elements);
-
- /**
- * Perform the drag on the given object.
- * @param element the object to copy
- * @param sameSystemType indication of whether the source and target reside on the same type of system
- * @param monitor the progress monitor
- * @return a temporary local copy of the object that was copied
- */
- public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor);
-
-
- /**
- * Perform the drag on the given objects.
- * @param set the set of objects to copy
- * @param monitor the progress monitor
- * @return a set of temporary files of the object that was copied
- */
- public ISystemResourceSet doDrag(SystemRemoteResourceSet set, IProgressMonitor monitor);
-
- /**
- * Return true if another object can be copied into this object
- * @param element the target of a drop operation
- * @return whether this object may be dropped on
- */
- public boolean canDrop(Object element);
-
- /**
- * 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
- * @param sameSystem indication of whether the source and target are on the same system
- * @param srcType the type of object to be dropped.
- * @param monitor the progress monitor
- * @return the new copy of the object that was dropped
- */
- 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
- * @param fromSet the source objects for the drop
- * @param to the target object for the drop
- * @param sameSystemType indication of whether the source and target reside of the same type of system
- * @param sameSystem indication of whether the source and target are on the same system
- * @param srcType the type of objects to be dropped
- * @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);
-
-
- /**
- * Return true if it is valid for the src object to be dropped in the target
- * @param src the object to drop
- * @param target the object which src is dropped in
- * @param sameSystem whether this is the same system
- * @return whether this is a valid operation
- */
- public boolean validateDrop(Object src, Object target, boolean sameSystem);
-
- /**
- * Return true if it is valid for the src objects to be dropped in the target
- * @param srcSet set of resources to drop on the target
- * @param target the object which src is dropped in
- * @param sameSystem whether this is the same system
- * @return whether this is a valid operation
- */
- public boolean validateDrop(ISystemResourceSet srcSet, Object target, boolean sameSystem);
-
- /**
- * 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/ISystemEditableRemoteObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemEditableRemoteObject.java
deleted file mode 100644
index 5365b57f6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemEditableRemoteObject.java
+++ /dev/null
@@ -1,165 +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.view;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
-
-/**
- * This interface defines some common functionality required from all remote
- * resources for edit, irrespective of whether the remote system is an
- * OS/400, Windows, Linux or Unix operating system.
- */
-public interface ISystemEditableRemoteObject
-{
-
- public static final int NOT_OPEN = -1;
- public static final int OPEN_IN_SAME_PERSPECTIVE = 0;
- public static final int OPEN_IN_DIFFERENT_PERSPECTIVE = 1;
-
- /**
- * Check if user has write authority to the file.
- * @return true if user has write authority to the file, false otherwise
- */
- public boolean isReadOnly();
-
- /**
- * Indicate whether the file can be edited
- */
- public void setReadOnly(boolean isReadOnly);
-
- /**
- * Set the editor variable given an exiting editor part
- * @param editorPart the editor
- */
- public void setEditor(IEditorPart editorPart);
-
- /**
- * Download the file.
- * @param shell if the shell is null, no progress monitor will be shown
- * @return true if successful, false if cancelled
- */
- public boolean download(Shell shell) throws Exception;
-
- /**
- * Download the file.
- * @param monitor the progress monitor
- * @return true if the operation was successful. false if the user cancels.
- */
- public boolean download(IProgressMonitor monitor) throws Exception;
-
- /**
- * Saves the local file and uploads it to the host immediately, rather than, in response to a resource change
- * event.
- * @return true if the operation was successful. false if the upload fails.
- */
- public boolean doImmediateSaveAndUpload();
-
- /**
- * Get the local resource
- */
- public IFile getLocalResource();
-
- /**
- * Is the local file open in an editor
- */
- public int checkOpenInEditor() throws CoreException;
-
- /**
- * Returns the open IEditorPart for this remote object if there is one.
- */
- public IEditorPart getEditorPart();
-
- /**
- * Returns the remote object that is editable
- */
- public IAdaptable getRemoteObject();
-
-
-
- /**
- * Open in editor
- */
- public void open(Shell shell);
-
- /**
- * Open in editor
- */
- public void open(Shell shell, boolean readOnly);
-
- /**
- * Open in editor
- */
- public void open(IProgressMonitor monitor);
-
- /**
- * Open in editor
- */
- public void open(IProgressMonitor monitor, boolean readOnly);
-
- /**
- * Set local resource properties
- */
- public void setLocalResourceProperties() throws Exception;
-
- /**
- * Register as listener for various events
- */
- public void addAsListener();
-
- /**
- * Open the editor
- */
- public void openEditor() throws PartInitException;
-
- /**
- * Update the editor dirty indicator
- */
- public void updateDirtyIndicator();
-
- /**
- * Check if the file is dirty
- */
- public boolean isDirty();
-
-
- /**
- * Return the absolute path on the remote system.
- */
- public String getAbsolutePath();
-
- /**
- * Return the subsystem for the edited object.
- */
- public ISubSystem getSubSystem();
-
- /**
- * Returns whether the edited object exists.
- */
- public boolean exists();
-
- /**
- * Returns whether the underlying resource needs to be updated from the host
- */
- public boolean isStale();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemLongRunningRequestListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemLongRunningRequestListener.java
deleted file mode 100644
index 0a082e930..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemLongRunningRequestListener.java
+++ /dev/null
@@ -1,33 +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.view;
-/**
- * This interface allows listeners to be kept informed when a long
- * running request starts and stops.
- */
-public interface ISystemLongRunningRequestListener
-{
-
- /**
- * A long running request is starting
- */
- public void startingLongRunningRequest(SystemLongRunningRequestEvent event);
- /**
- * A long running request is finishing
- */
- public void endingLongRunningRequest(SystemLongRunningRequestEvent event);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemMementoConstants.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemMementoConstants.java
deleted file mode 100644
index 494e32c8f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemMementoConstants.java
+++ /dev/null
@@ -1,50 +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.view;
-public interface ISystemMementoConstants
-{
-
- /**
- * Memento ID for profiles
- */
- public static final String MEMENTO_KEY_PROFILE = "Profile"; //$NON-NLS-1$
- /**
- * Memento ID for connections
- */
- public static final String MEMENTO_KEY_CONNECTION = "Conn"; //$NON-NLS-1$
- /**
- * Memento ID for subsystems
- */
- public static final String MEMENTO_KEY_SUBSYSTEM = "Subs"; //$NON-NLS-1$
- /**
- * Memento ID for filter pool references
- */
- public static final String MEMENTO_KEY_FILTERPOOLREFERENCE = "FPoolRef"; //$NON-NLS-1$
- /**
- * Memento ID for filter references
- */
- public static final String MEMENTO_KEY_FILTERREFERENCE = "FRef"; //$NON-NLS-1$
- /**
- * Memento ID for filter string references
- */
- public static final String MEMENTO_KEY_FILTERSTRINGREFERENCE = "FSRef"; //$NON-NLS-1$
- /**
- * Memento ID for remote objects
- */
- public static final String MEMENTO_KEY_REMOTE = "Remote"; //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemPropertyConstants.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemPropertyConstants.java
deleted file mode 100644
index 5f86ab2ff..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemPropertyConstants.java
+++ /dev/null
@@ -1,107 +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.view;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-/**
- * Constants that are the key values used to identify properties that populate the
- * Property Sheet viewer.
- */
-public interface ISystemPropertyConstants extends IBasicPropertyConstants
-{
- public static final String P_PREFIX = org.eclipse.rse.ui.ISystemIconConstants.PREFIX;
- // GENERIC / COMMON
- public static final String P_TYPE = P_PREFIX+"type"; //$NON-NLS-1$
- public static final String P_NEWNAME = P_PREFIX+"newName"; //$NON-NLS-1$
- public static final String P_ERROR = P_PREFIX+"error"; //$NON-NLS-1$
- public static final String P_OK = P_PREFIX+"ok"; //$NON-NLS-1$
- public static final String P_FILTERSTRING = P_PREFIX+"filterString"; //$NON-NLS-1$
- public static final String P_NBRCHILDREN = P_PREFIX+"nbrChildren"; //$NON-NLS-1$
-
- // CONNECTION PROPERTIES
- public static final String P_PROFILE = P_PREFIX+"profile"; //$NON-NLS-1$
- public static final String P_SYSTEMTYPE = P_PREFIX+"systemType"; //$NON-NLS-1$
- public static final String P_HOSTNAME = P_PREFIX+"hostname"; //$NON-NLS-1$
- public static final String P_DEFAULTUSERID = P_PREFIX+"defaultuserid"; //$NON-NLS-1$
- public static final String P_DESCRIPTION = P_PREFIX+"description"; //$NON-NLS-1$
-
- // FILTER POOL PROPERTIES
- //public static final String P_IS_SHARABLE = P_PREFIX+"sharable"; // transient
-
- // FILTER PROPERTIES
- public static final String P_FILTERSTRINGS = P_PREFIX+"filterstrings"; //$NON-NLS-1$
- public static final String P_FILTERSTRINGS_COUNT = P_PREFIX+"filterstringsCount"; //$NON-NLS-1$
- public static final String P_PARENT_FILTER = P_PREFIX+"filterParent"; //$NON-NLS-1$
- public static final String P_PARENT_FILTERPOOL = P_PREFIX+"filterParentPool"; //$NON-NLS-1$
- public static final String P_RELATED_CONNECTION = P_PREFIX+"filterRelatedConnection"; //$NON-NLS-1$
- public static final String P_IS_CONNECTION_PRIVATE = P_PREFIX+"filterConnectionPrivate"; //$NON-NLS-1$
-
- // FILE PROPERTIES
- public static final String P_FILE_LASTMODIFIED = P_PREFIX+"file.lastmodified"; //$NON-NLS-1$
- public static final String P_FILE_SIZE = P_PREFIX+"file.size"; //$NON-NLS-1$
- public static final String P_FILE_PATH = P_PREFIX+"file.path"; //$NON-NLS-1$
- public static final String P_FILE_CANONICAL_PATH = P_PREFIX+"file.canonicalpath"; //$NON-NLS-1$
- public static final String P_FILE_CLASSIFICATION= P_PREFIX+"file.classification"; //$NON-NLS-1$
- public static final String P_FILE_READONLY = P_PREFIX+"file.readonly"; //$NON-NLS-1$
- public static final String P_FILE_READABLE = P_PREFIX+"file.readable"; //$NON-NLS-1$
- public static final String P_FILE_WRITABLE = P_PREFIX+"file.writable"; //$NON-NLS-1$
- public static final String P_FILE_HIDDEN = P_PREFIX+"file.hidden"; //$NON-NLS-1$
-
- // SEARCH LOCATION PROPERTIES
- public static final String P_SEARCH_LINE = P_PREFIX+"search.line"; //$NON-NLS-1$
- //public static final String P_SEARCH_CHAR_END = P_PREFIX+"search.char.end";
-
- // ARCHIVE FILE PROPERTIES
- public static final String P_ARCHIVE_EXPANDEDSIZE = P_PREFIX+"archive.expandedsize"; //$NON-NLS-1$
- public static final String P_ARCHIVE_COMMENT = P_PREFIX+"archive.comment"; //$NON-NLS-1$
-
- // VIRTUAL FILE PROPERTIES
- public static final String P_VIRTUAL_COMPRESSEDSIZE = P_PREFIX+"virtual.compressedsize"; //$NON-NLS-1$
- public static final String P_VIRTUAL_COMMENT = P_PREFIX+"virtual.comment"; //$NON-NLS-1$
- public static final String P_VIRTUAL_COMPRESSIONRATIO = P_PREFIX+"virtual.compressionratio"; //$NON-NLS-1$
- public static final String P_VIRTUAL_COMPRESSIONMETHOD = P_PREFIX+"virtual.compressionmethod"; //$NON-NLS-1$
-
- // SHELL PROPERTIES
- public static final String P_SHELL_STATUS = P_PREFIX+"shell.status"; //$NON-NLS-1$
- public static final String P_SHELL_CONTEXT = P_PREFIX+"shell.context"; //$NON-NLS-1$
-
- // ERROR PROPERTIES
- public static final String P_ERROR_FILENAME = P_PREFIX+"error.filename"; //$NON-NLS-1$
- public static final String P_ERROR_LINENO = P_PREFIX+"error.lineno"; //$NON-NLS-1$
-
- // USER ACTION PROPERTIES
- public static final String P_USERACTION_DOMAIN = P_PREFIX+"action.domain"; //$NON-NLS-1$
-
- // COMPILE TYPE PROPERTIES
- public static final String P_COMPILETYPE_TYPES = P_PREFIX+"compiletypes.types"; //$NON-NLS-1$
-
- // MISCELLANEOUS PROPERTIES
- public static final String P_USERID = P_PREFIX+"userid"; //$NON-NLS-1$
- public static final String P_PASSWORD = P_PREFIX+"password"; //$NON-NLS-1$
- public static final String P_CCSID = P_PREFIX+"ccsid"; //$NON-NLS-1$
- public static final String P_VRM = P_PREFIX+"vrm"; //$NON-NLS-1$
- public static final String P_ENVLIST = P_PREFIX+"envlist"; // indexed //$NON-NLS-1$
- public static final String P_FILTERS = P_PREFIX+"filters"; // indexed //$NON-NLS-1$
- public static final String P_FILTER = P_PREFIX+"filter"; // scalar //$NON-NLS-1$
- public static final String P_IS_CONNECTED = P_PREFIX+"connected"; // transient //$NON-NLS-1$
- public static final String P_IS_ACTIVE = P_PREFIX+"active"; // for profiles //$NON-NLS-1$
- public static final String P_HAS_CHILDREN = P_PREFIX+"hasChildren"; // see SystemElementViewerAdapter //$NON-NLS-1$
- public static final String P_PORT = P_PREFIX+"port"; //$NON-NLS-1$
- public static final String P_ORIGIN = P_PREFIX+"origin"; //$NON-NLS-1$
- public static final String P_VENDOR = P_PREFIX+"vendor"; //$NON-NLS-1$
- public static final String P_COMMAND = P_PREFIX+"command"; //$NON-NLS-1$
- public static final String P_COMMENT = P_PREFIX+"comment"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.java
deleted file mode 100644
index 1b817dda0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.java
+++ /dev/null
@@ -1,160 +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.view;
-
-import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-
-/**
- * This is an interface that only remote system objects supply adapters for.
- * <p>
- * This interface is designed to allow remote property pages to be registered
- * against specific remote system objects of specific name, type or subtype.
- */
-public interface ISystemRemoteElementAdapter extends IRemoteObjectIdentifier
-{
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- */
- public String getName(Object element);
- /**
- * Return the fully qualified name of this remote object.
- * Unlike getName, this should include the full path to the name.
- * This should be enough information to uniquely identify this object within its subsystem.
- */
- public String getAbsoluteName(Object element);
- /**
- * Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem.
- * This is used when deleting a remote resource for example, all occurrences of its parent are found and refreshed in the RSE views.
- */
- public String getAbsoluteParentName(Object element);
- /**
- * Return the subsystem that is responsible for getting this remote object.
- * When used together with getAbsoluteName, allows for unique identification of this object.
- */
- public ISubSystem getSubSystem(Object element);
- /**
- * Return the subsystem factory id that owns this remote object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getSubSystemConfigurationId(Object element);
- /**
- * Return a value for the type category property for this object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteTypeCategory(Object element);
- /**
- * Return a value for the type property for this object
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteType(Object element);
- /**
- * Return a value for the subtype property for this object.
- * Not all object types support a subtype, so returning null is ok.
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteSubType(Object element);
- /**
- * Return a value for the sub-subtype property for this object.
- * Not all object types support a sub-subtype, so returning null is ok.
- * The value must not be translated, so that property pages registered via xml can subset by it.
- */
- public String getRemoteSubSubType(Object element);
- /**
- * Return the source type of the selected object. Typically, this only makes sense for compilable
- * source members. For non-compilable remote objects, this typically just returns null.
- */
- public String getRemoteSourceType(Object element);
- /**
- * <p>Short answer: treat this like clone(), and just copy any important instance variables</p>
- * <p>
- * Imagine the same remote resource is shown multiple times in the same tree view.... say
- * because multiple filters resolve to it, or there are two connections to the same host.
- * Typically it is a different object in memory within the tree, but it refers to the same
- * remote resource. <br>
- * Now imagine one of the references is selected by the user and renamed via the rename action. This
- * might only update the selected reference. What about the other objects which refer to the same
- * remote resource... they need to update their in-memory "name" variable too. <br>
- * That is what this method. Every reference to the same remote resource is found (they have the
- * same absolute name and come from a system with the same hostname) and this method is called
- * on those other references. This is your opportunity to copy the attributes from the new element
- * to the old element.
- * <p>
- * Some view has updated the name or properties of this remote object. As a result, the
- * remote object's contents need to be refreshed. You are given the old remote object that has
- * old data, and you are given the new remote object that has the new data. For example, on a
- * rename the old object still has the old name attribute while the new object has the new
- * new attribute. You can copy the new name into the old object. Similar for any properties
- * you allow the user to edit via the property sheet.
- * <p>
- * This is called by viewers like SystemView in response to rename and property change events.
- * <p>
- * @param oldElement the element that was found in the tree
- * @param newElement the updated element that was passed in the REFRESH_REMOTE event
- * @return true if you want the viewer that called this to refresh the children of this object,
- * such as is needed on a rename of a folder, say, if the child object cache the parent folder name
- * or an absolute file name.
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement);
-
-
- /**
- * Return the remote edit wrapper for this object.
- * @param object the object to edit
- * @return the editor wrapper for this object
- */
- public ISystemEditableRemoteObject getEditableRemoteObject(Object object);
-
- /**
- * Indicates whether the specified object can be edited or not.
- * @param object the object to edit
- * @return true if the object can be edited.
- */
- public boolean canEdit(Object object);
-
- /**
- * Return a filter string that corresponds to this object.
- * @param object the object to obtain a filter string for
- * @return the corresponding filter string if applicable
- */
- public String getFilterStringFor(Object object);
-
- /**
- * Given a remote object, returns it remote parent object. Eg, given a file, return the folder
- * it is contained in.
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception;
- /**
- * Given a remote object, return the unqualified names of the objects <i>contained</i> in that parent. This is
- * used for testing for uniqueness on a rename operation, for example. Sometimes, it is not
- * enough to just enumerate all the objects in the parent for this purpose, because duplicate
- * names are allowed if the types are different, such as on iSeries. In this case return only
- * the names which should be used to do name-uniqueness validation on a rename operation.
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception;
-
- /**
- * Returns whether user defined actions should be shown for the object.
- * @param object the object.
- * @return <code>true</code> if the object supports user defined actions, <code>false</code> otherwise.
- */
- public boolean supportsUserDefinedActions(Object object);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoveElementAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoveElementAdapter.java
deleted file mode 100644
index 3d0b7d217..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoveElementAdapter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-/**
- * This interface must be implemented by adapters who must remove elements from
- * their list of children (not necessarily immediate children).
- */
-public interface ISystemRemoveElementAdapter {
-
- /**
- * Remove all children from the element.
- * @param element the element.
- * @return <code>true</code> if the children have been removed, <code>false</code>
- * otherwise.
- */
- public boolean removeAllChildren(Object element);
-
- /**
- * Remove a child from the element.
- * @param element the element.
- * @param child the child to remove. Does not have to be an immediate child
- * of the element.
- * @return <code>true</code> if the child has been removed, <code>false</code>
- * otherwise.
- */
- public boolean remove(Object element, Object child);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectAllTarget.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectAllTarget.java
deleted file mode 100644
index 5071c1da1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectAllTarget.java
+++ /dev/null
@@ -1,43 +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.view;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-/**
- * This interface is implemented by all viewers that wish to support
- * the global select all action. To do so, they implement this interface,
- * then instantiate SystemCommonSelectAllAction, and call setGlobalActionHandler.
- * See SystemViewPart for an example.
- */
-public interface ISystemSelectAllTarget
-{
-
-
- /**
- * Return true if select all should be enabled for the given object.
- * For a tree view, you should return true if and only if the selected object has children.
- * You can use the passed in selection or ignore it and query your own selection.
- */
- public boolean enableSelectAll(IStructuredSelection selection);
- /**
- * When this action is run via Edit->Select All or via Ctrl+A, perform the
- * select all action. For a tree view, this should select all the children
- * of the given selected object. You can use the passed in selected object
- * or ignore it and query the selected object yourself.
- */
- public void doSelectAll(IStructuredSelection selection);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProviderCaller.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProviderCaller.java
deleted file mode 100644
index 95f972132..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProviderCaller.java
+++ /dev/null
@@ -1,39 +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.view;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This is the interface that callers of the SystemSelectRemoteObjectAPIProviderCaller
- * can optionally implement to be called back for events such as the expansion of a
- * promptable, transient filter.
- */
-public interface ISystemSelectRemoteObjectAPIProviderCaller
-{
-
- /**
- * Prompt the user to create a new filter as a result of the user expanding a promptable
- * transient filter.
- *
- * @return the filter created by the user or null if they cancelled the prompting
- */
- public ISystemFilter createFilterByPrompting(ISystemFilter filterPrompt, Shell shell)
- throws Exception;
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemShellProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemShellProvider.java
deleted file mode 100644
index 2f3fdef58..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemShellProvider.java
+++ /dev/null
@@ -1,27 +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.view;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionBars;
-/**
- * Abstraction of any parent window that can supply sub-windows with a Shell object
- */
-public interface ISystemShellProvider
-{
- public Shell getShell();
- public IActionBars getActionBars();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTree.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTree.java
deleted file mode 100644
index 8d954942a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTree.java
+++ /dev/null
@@ -1,119 +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.view;
-
-import org.eclipse.swt.widgets.Item;
-
-/**
- * To drive our GUI we find ourselves adding additional useful methods on top of the
- * JFace tree viewer in our subclasses. We capture those here in an interface so they
- * can be implemented by other viewers that wish to fully drive our UI. Typically this
- * is for interesting properties in the property sheet.
- */
-public interface ISystemTree {
-
- /**
- * This is called to ensure all elements in a multiple-selection have the same parent in the
- * tree viewer. Typically used to disable actions that must take place on a coordinated
- * selection.
- * @return true if the elements of the selection in the viewer all have the same parent
- */
- public boolean sameParent();
-
- /**
- * Called to select an object within the tree, and optionally expand it.
- * @param element the element in the tree to select
- * @param expand true if the element is to be expanded
- */
- public void select(Object element, boolean expand);
-
- /**
- * @param element the element in the tree to query
- * @return the number of immediate children in the tree, for the given tree node
- */
- public int getChildCount(Object element);
-
- /**
- * This is called to accurately get the parent object for the current selection
- * for this viewer.
- * The getParent() method in the adapter is unreliable since adapted objects are
- * unaware of the context which can change via filtering and view options.
- * @return the parent of the selection
- */
- public Object getSelectedParent();
-
- /**
- * This returns the element immediately before the first selected element in this tree level.
- * Often needed for enablement decisions for move up actions.
- * @return the object prior to the selection, null if there is none
- */
- public Object getPreviousElement();
-
- /**
- * This returns the element immediately after the last selected element in this tree level
- * Often needed for enablement decisions for move down actions.
- * @return the object after the selection, null if there is none
- */
- public Object getNextElement();
-
- /**
- * This is called to walk the tree back up to the roots and return the visible root
- * node for the first selected object.
- * @return the root object
- */
- public Object getRootParent();
-
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- * @param element the element from which to begin
- * @return the array of objects in the path from leaf to root. Excluding the leaf and root.
- */
- public Object[] getElementNodes(Object element);
-
- /**
- * Helper method to determine if a given object is currently selected.
- * Considers an element to be "selected" if a child node of the given object is currently selected.
- * @param parentElement the element to query
- * @return true if the element covers any portion of the selection
- */
- public boolean isSelectedOrChildSelected(Object parentElement);
-
- /**
- * Called when a property is updated and we need to inform the Property Sheet viewer.
- * There is no formal mechanism for this so we simulate a selection changed event as
- * this is the only event the property sheet listens for.
- */
- public void updatePropertySheet();
-
- /**
- * Returns the tree item of the first selected object. Used for setViewerItem in a resource
- * change event.
- * @return the item
- */
- public Item getViewerItem();
-
- /**
- * @return true if any of the selected items are currently expanded
- */
- public boolean areAnySelectedItemsExpanded();
-
- /**
- * @return true if any of the selected items are expandable but not yet expanded
- */
- public boolean areAnySelectedItemsExpandable();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewActionFilter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewActionFilter.java
deleted file mode 100644
index aa5570fff..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewActionFilter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.ui.IActionFilter;
-
-/**
- * This interface is implemented by the adapters for every object shown in the
- * Remote System Explorer. It enables complex filtering of action and popup menu
- * extensions via the <samp>&lt;filter&gt;</samp> element, and action extensions
- * via the <samp>&lt;visibility&gt;</samp> and <samp>&lt;enablement&gt;</samp>
- * elements.
- * <p>
- * The base adapter class used for all RSE objects supports the following properties
- * by default:
- * <ol>
- * <li>name="value". The given value must match getName(target) exactly, or if ends with asterisk must match the beginning.
- * <li>name="type". The given value must match getType(target) exactly. Be careful, as this is usually translated.
- * <li>name="hasChildren". If the given value is "true", returns true if hasChildren(target) returns true. If given "false",
- * returns true if the hasChildren returns false.
- * <li>name="connection". If the given value is "true", returns true if the subsystem is connected. If given "false",
- * returns true if the subsystem is not connected.
- * <li>name="offline". If the given value is "true", returns true if the subsystem is offline. If given "false",
- * returns true if the subsystem is offline.
- * <li>name="systemType". The given value is a system type, and this returns true if this object's connection is of that
- * type. You can specify multiple values by comma-separating them, and this returns if there is a match on any them.
- * <li>name="subsystemFactoryId". The given value is a subsystem factory Id, and this returns true if this object's
- * subsystem is from that subsystem factory. For connections, returns false.
- * You can specify multiple values by comma-separating them, and this returns if there is a match on any them.
- * <li>name="subsystemFactoryCategory". The given value is a subsystem category, and this returns true if this object's
- * subsystem is from a subsystem factory of that category. For connections, returns false.
- * You can specify multiple values by comma-separating them, and this returns if there is a match on any them.
- * </ol>
- */
-public interface ISystemViewActionFilter extends IActionFilter
-{
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewDropDestination.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewDropDestination.java
deleted file mode 100644
index 8296273d4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewDropDestination.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-/**
- * An adapter can elect to suppot this interface and answer
- * whether it support copy/move/drop from the source (given adapter
- * type) to the specified destination.
- * @author A.Kent Hawley
- */
-public interface ISystemViewDropDestination
-{
-
- /**
- * Asks source adapter whether it supports dropping it on the given target.
- * @param target the target to drop to.
- * @return <code>true</code> if the drop destination is supported, <code>false</code> otherwise.
- */
- public boolean supportDropDestination(Object target);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java
deleted file mode 100644
index c95dd4bf0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java
+++ /dev/null
@@ -1,349 +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.view;
-
-import java.util.List;
-
-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.jface.viewers.Viewer;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-
-/**
- * This is the interface for an adapter on objects in the system viewer.
- * Any input into the system viewer must register an adapter that implements this interface.
- * <p>
- * This interface supports a union of all the methods needed to support a TreeViewer
- * content provider and label provider. The {@link org.eclipse.rse.ui.view.SystemViewLabelAndContentProvider}
- * delegates to objects of this interface almost completely. It gets such an
- * object by calling:</p>
- * <pre><code>
- * isve = object.getAdapter(ISystemViewElementAdapter.class);
- * interestingInfo = isve.getXXXX(object);
- * </code></pre>
- * <p>
- * This interface also supports IPropertySource via inheritance, so we can feed the
- * PropertySheet.
- * </p>
- * <p>For remote resource objects, their adapter should also implement
- * {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter}
- * </p>
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter
- */
-public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragDropAdapter, ISystemViewActionFilter
-{
- public static final IAction[] noActions = new IAction[0];
-
- /**
- * Set the shell to be used by any method that requires it.
- * This is set by the Label and Content providers that retrieve this adapter.
- */
- public void setShell(Shell shell);
-
- /**
- * Set the viewer that is driving this adapter. Used adapters that implements to access current viewer.
- * This is set by the Label and Content providers that retrieve this adapter.
- */
- public void setViewer(Viewer viewer);
-
- /**
- * Set the input object used to populate the viewer with the roots.
- * May be used by an adapter to retrieve context-sensitive information.
- * This is set by the Label and Content providers that retrieve this adapter.
- */
- public void setInput(ISystemViewInputProvider input);
-
- /**
- * Get the shell currently hosting the objects in this adapter, as last set
- * by the label or content provider that retrieved this adapter.
- */
- public Shell getShell();
- /**
- * Return the current viewer, as set via setViewer or its deduced from the
- * setInput input object if set. May be null so test it.
- */
- public Viewer getViewer();
- /**
- * Get the input object used to populate the viewer with the roots.
- * May be used by an adapter to retrieve context-sensitive information.
- */
- public ISystemViewInputProvider getInput();
-
-
- /**
- * Get the subsystem that corresponds to this object if one exists.
- *
- */
- public ISubSystem getSubSystem(Object element);
-
- /**
- * Wrapper to getPropertyValue(Object key) that takes an argument
- * for determining whether to return a raw value or formatted value.
- *
- */
- public Object getPropertyValue(Object key, boolean formatted);
-
-
- /**
- * Returns the list of property descriptors that are unique for this
- * particular adapter - that is the difference between the default
- * property descriptors and the total list of property descriptors.
- */
- public IPropertyDescriptor[] getUniquePropertyDescriptors();
-
-
- /**
- * This is your opportunity to add actions to the popup menu for the given selection.
- * <p>
- * To put your action into the given menu, use the menu's {@link org.eclipse.rse.ui.SystemMenuManager#add(String,IAction) add} method.
- * If you don't care where it goes within the popup, just pass the given <samp>menuGroup</samp> location id,
- * otherwise pass one of the GROUP_XXX values from {@link ISystemContextMenuConstants}. If you pass one that
- * identifies a pre-defined cascading menu, such as GROUP_OPENWITH, your action will magically appear in that
- * cascading menu, even if it was otherwise empty.
- * <p>
- * For the actions themselves, you will probably use one of the base action classes:
- * <ul>
- * <li>{@link org.eclipse.rse.ui.actions.SystemBaseAction SystemBaseAction}. For a simple action doesn't present any UI.
- * <li>{@link org.eclipse.rse.ui.actions.SystemBaseDialogAction SystemBaseDialogAction}. For an action that presents a {@link org.eclipse.rse.ui.dialogs.SystemPromptDialog dialog}.
- * <li>{@link org.eclipse.rse.ui.actions.SystemBaseDialogAction SystemBaseWizardAction}. For an action that presents a {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard wizard}.
- * <li>{@link org.eclipse.rse.ui.actions.SystemBaseSubMenuAction SystemBaseSubMenuAction}. For an action that cascades into a submenu with other actions.
- * </ul>
- *
- * @param menu the popup menu you can contribute to
- * @param selection the current selection in the calling tree or table view
- * @param parent the shell of the calling tree or table view
- * @param menuGroup the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager {@link org.eclipse.rse.ui.SystemMenuManager#add(String,IAction) add} method.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell parent, String menuGroup);
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element);
- /**
- * Return the label for this object
- */
- public String getText(Object element);
- /**
- * Return the alternate label for this object
- */
- public String getAlternateText(Object element);
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- */
- public String getName(Object element);
- /**
- * Return a value for the type property for this object
- */
- public String getType(Object element);
- /**
- * Return the string to display in the status line when the given object is selected
- */
- public String getStatusLineText(Object element);
- /**
- * Return the parent of this object
- */
- public Object getParent(Object element);
- /**
- * Return the children of this object
- */
- public Object[] getChildren(Object element);
-
- /**
- * Return the children of this object. This version (with monitor) is used when the
- * request happens on a modal thread. The implementation needs to take this into
- * account so that SWT thread exceptions are avoided.
- */
- public Object[] getChildren(IProgressMonitor monitor, Object element);
-
- /**
- * Return the children of this object, using the given Expand-To filter
- */
- public Object[] getChildrenUsingExpandToFilter(Object element, String expandToFilter);
- /**
- * Return true if this object has children
- */
- public boolean hasChildren(Object element);
- /**
- * Return true if this object is a "prompting" object that prompts the user when expanded.
- * For such objects, we do not try to save and restore their expansion state on F5 or between
- * sessions
- */
- public boolean isPromptable(Object element);
-
- /**
- * Set input object for property source queries. This is called by the
- * SystemViewAdaptorFactory before returning this adapter object.
- * Handled automatically if you start with AbstractSystemViewAdaptor.
- */
- public void setPropertySourceInput(Object propertySourceInput);
-
- /**
- * User has double clicked on an object. If you want to do something special,
- * do it and return true. Otherwise return false to have the viewer do the default behaviour.
- */
- public boolean handleDoubleClick(Object element);
-
- // ------------------------------------------
- // METHODS TO SUPPORT GLOBAL DELETE ACTION...
- // ------------------------------------------
- /**
- * Return true if we should show the delete action in the popup for the given element.
- * If true, then canDelete will be called to decide whether to enable delete or not.
- */
- public boolean showDelete(Object element);
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- */
- public boolean canDelete(Object element);
- /**
- * Perform the delete on the given item. This is after the user has been asked to confirm deletion.
- * @deprecated use the one with the monitor
- */
- public boolean doDelete(Shell shell, Object element)
- throws Exception;
-
- /**
- * Perform the delete on the given item. This is after the user has been asked to confirm deletion.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor)
- throws Exception;
-
- /**
- * Perform the delete on the given set of items. This is after the user has been asked to confirm deletion. Should throw an exception
- * if some elements were deleted and others were not due to an exception during the operation. Without an exception
- * thrown in such cases, views may not be refreshed correctly to account for deleted resources.
- * @return <code>true</code> if the delete was successful, <code>false</code> if it was not.
- */
- public boolean doDeleteBatch(Shell shell, List resourceSet, IProgressMonitor monitor)
- throws Exception;
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON RENAME ACTION...
- // ------------------------------------------
- /**
- * Return true if we should show the rename action in the popup for the given element.
- * If true, then canRename will be called to decide whether to enable rename or not.
- */
- public boolean showRename(Object element);
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename popup menu item will be enabled.
- */
- public boolean canRename(Object element);
- /**
- * Perform the rename on the given item.
- */
- public boolean doRename(Shell shell, Object element, String name)
- throws Exception;
-
-
-
- /**
- * Return a validator for verifying the new name is correct.
- * If you return null, no error checking is done on the new name!!
- * Suggest you use at least UniqueStringValidator or a subclass to ensure
- * new name is at least unique.
- */
- public ISystemValidator getNameValidator(Object element);
- /**
- * Form and return a new canonical (unique) name for this object, given a candidate for the new
- * name. This is called by the generic multi-rename dialog to test that all new names are unique.
- * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
- * <p>
- * For example, two connections or filter pools can have the same name if they are
- * in different profiles. Two iSeries QSYS objects can have the same name if their object types
- * are different.
- * <p>
- * This method returns a name that can be used for uniqueness checking because it is qualified
- * sufficiently to make it unique.
- */
- public String getCanonicalNewName(Object element, String newName);
- /**
- * Compare the name of the given element to the given new name to decide if they are equal.
- * Allows adapters to consider case and quotes as appropriate.
- */
- public boolean namesAreEqual(Object element, String newName);
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON REFRESH ACTION...
- // ------------------------------------------
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showRefresh(Object element);
-
- // ------------------------------------------------------------
- // METHODS TO SUPPORT COMMON OPEN-IN-NEW-PERSPECTIVE ACTIONS...
- // ------------------------------------------------------------
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showOpenViewActions(Object element);
-
- /**
- * Return true if we should show the generic show in table action in the popup for the given element.
- */
- public boolean showGenericShowInTableAction(Object element);
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- * This just defaults to getName, but if that is not sufficient override it here.
- */
- public String getMementoHandle(Object element);
- /**
- * Return what to save to disk to identify this element when it is the input object to a secondary
- * Remote System Explorer perspective.
- */
- public String getInputMementoHandle(Object element);
- /**
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element);
- /**
- * Somtimes we don't want to remember an element's expansion state, such as for temporarily inserted
- * messages. In these cases return false from this method. The default is true
- */
- public boolean saveExpansionState(Object element);
- public void selectionChanged(Object element); // d40615
-
- public void setFilterString(String filterString);
- public String getFilterString();
-
- /**
- * Return whether deferred queries are supported. By default
- * they are not supported. Subclasses must override this to
- * return true if they are to support this.
- * @return <code>true</code> if it supports deferred queries, <code>false</code> otherwise.
- */
- public boolean supportsDeferredQueries();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewInputProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewInputProvider.java
deleted file mode 100644
index e2ba9446a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewInputProvider.java
+++ /dev/null
@@ -1,113 +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.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Abstraction for any object that wishes to be a roots-provider for the SystemView tree viewer.
- */
-public interface ISystemViewInputProvider extends IAdaptable {
-
- /**
- * @return the children objects to consistute the root elements in the system view tree
- */
- public Object[] getSystemViewRoots();
-
- /**
- * @return true if {@link #getSystemViewRoots()} will return a non-empty list
- */
- public boolean hasSystemViewRoots();
-
- /**
- * @return true if we are listing connections or not, so we know whether we are interested in
- * connection-add events
- */
- public boolean showingConnections();
-
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- * @param selectedConnection the connection undergoing expansion
- * @return the list of objects under the connection
- */
- public Object[] getConnectionChildren(IHost selectedConnection);
-
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection.
- * @param selectedConnection the connection being shown in the viewer
- * @return true if this connection has children to be shown.
- */
- public boolean hasConnectionChildren(IHost selectedConnection);
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapterType);
-
- /**
- * Set the shell in case it is needed for anything.
- * The label and content provider will call this.
- * @param shell the shell being used by the viewer using this provider
- */
- // TODO should possibly be deprecated or removed
- public void setShell(Shell shell);
-
- /**
- * @return the shell of the viewer we are currently associated with
- */
- // TODO should possibly be deprecated or removed
- public Shell getShell();
-
- /**
- * Set the viewer in case it is needed for anything.
- * The label and content provider will call this.
- * @param viewer the viewer that uses this provider
- */
- // TODO should possibly be deprecated or removed
- public void setViewer(Viewer viewer);
-
- /**
- * @return the viewer we are currently associated with
- */
- // TODO should possibly be deprecated or removed
- public Viewer getViewer();
-
- /**
- * @return true to show the action bar (ie, toolbar) above the viewer.
- * The action bar contains connection actions, predominantly.
- */
- public boolean showActionBar();
-
- /**
- * @return true to show the button bar above the viewer.
- * The tool bar contains "Get List" and "Refresh" buttons and is typicall
- * shown in dialogs that list only remote system objects.
- */
- public boolean showButtonBar();
-
- /**
- * @return true to show right-click popup actions on objects in the tree.
- */
- public boolean showActions();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewRunnableObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewRunnableObject.java
deleted file mode 100644
index fdae9ddf0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewRunnableObject.java
+++ /dev/null
@@ -1,29 +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.view;
-import org.eclipse.swt.widgets.Shell;
-/**
- * This interface is for any object in the system views that want to
- * support the SystemRunAction action in their popup. It will
- * call that object's run(Shell) method when invoked
- */
-public interface ISystemViewRunnableObject
-{
-
-
- public Object[] run(Shell shell);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java
deleted file mode 100644
index 642b3c5f7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,1475 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-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.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.filters.SystemFilterPoolWrapperInformation;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemClearPasswordAction;
-import org.eclipse.rse.ui.actions.SystemConnectAction;
-import org.eclipse.rse.ui.actions.SystemDisconnectAction;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.filters.actions.ISystemNewFilterActionConfigurator;
-import org.eclipse.rse.ui.filters.actions.SystemChangeFilterAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterCascadingNewFilterPoolReferenceAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterCopyFilterAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterCopyFilterPoolAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterMoveDownFilterAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterMoveDownFilterPoolReferenceAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterMoveFilterAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterMoveFilterPoolAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterMoveUpFilterAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterMoveUpFilterPoolReferenceAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterNewFilterPoolAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterRemoveFilterPoolReferenceAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterSelectFilterPoolsAction;
-import org.eclipse.rse.ui.filters.actions.SystemFilterWorkWithFilterPoolsAction;
-import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction;
-import org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.propertypages.ISystemSubSystemPropertyPageCoreForm;
-import org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage;
-import org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage;
-import org.eclipse.rse.ui.propertypages.SystemSubSystemPropertyPageCoreForm;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorPortInput;
-import org.eclipse.rse.ui.widgets.IServerLauncherForm;
-import org.eclipse.rse.ui.widgets.RemoteServerLauncherForm;
-import org.eclipse.rse.ui.wizards.SubSystemServiceWizardPage;
-import org.eclipse.rse.ui.wizards.SystemSubSystemsPropertiesWizardPage;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-
-public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAdapter, ISystemNewFilterActionConfigurator
-{
- protected Hashtable imageTable = null;
-
- // actions stuff...
- private IAction[] subSystemActions = null;
- private IAction[] filterPoolActions = null;
- private IAction[] filterPoolReferenceActions = null;
- private IAction[] filterActions = null;
- public SubSystemConfigurationAdapter()
- {
- }
-
-
- /**
- * Returns any framework-supplied actions remote objects that should be contributed to the popup menu
- * for the given selection list. This does nothing if this adapter does not implement ISystemRemoteElementAdapter,
- * else it potentially adds menu items for "User Actions" and Compile", for example. It queries the subsystem
- * factory of the selected objects to determine if these actions are appropriate to add.
- *
- * <p>
- * No need to override.
- *
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell of viewer calling this. Most dialogs require a shell.
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- * @param subsystem the subsystem of the selection
- */
- public void addCommonRemoteActions(ISubSystemConfiguration factory, SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystem subsystem)
- {
- /** FIXME - UDAs should not be coupled to factory adapter
- SystemCompileManager mgr = factory.getCompileManager();
-
- if (factory.supportsCompileActions() && (mgr != null))
- {
- int size = selection.size();
-
- // for single selections, we try to avoid iterator, to hopefully make it a bit faster
- if (size == 1)
- {
- if (mgr.isCompilable(selection.getFirstElement()))
- { // check that selection is compilable
- mgr.addCompileActions(shell, selection, menu, menuGroup);
- }
- }
- else if (size > 1)
- {
- Iterator iter = selection.iterator();
-
- boolean allCompilable = true;
-
- // check that all selections are compilable
- while (iter.hasNext())
- {
- Object element = iter.next();
- allCompilable = mgr.isCompilable(element);
-
- if (!allCompilable)
- {
- break;
- }
- }
-
- if (allCompilable)
- {
- mgr.addCompileActions(shell, selection, menu, menuGroup);
- }
- }
- }
-
- if (factory.supportsUserDefinedActions() && factory.supportsUserDefinedActions(selection))
- {
- addUserDefinedActions(factory, shell, selection, menu, menuGroup, getActionSubSystem(factory, subsystem));
- }
- **/
- }
-
- // -----------------------------------
- // WIZARD PAGE CONTRIBUTION METHODS... (UCD defect 43194)
- // -----------------------------------
- /**
- * Optionally return one or more wizard pages to append to the New Wizard connection if
- * the user selects a system type that this subsystem factory supports.
- * <p>
- * Some details:
- * <ul>
- * <li>The wizard pages must implement ISystemNewConnectionWizardPage, so as to fit into the wizard's framework
- * <li>When the user successfully presses Finish, the createConnection method in the SystemRegistry will call
- * your {@link #createSubSystem(org.eclipse.rse.model.IHost,boolean, ISystemNewConnectionWizardPage[])} method to create the
- * your subsystem for the connection. The same pages you return here are passed back to you so you can
- * interrogate them for the user-entered data and use it when creating the default subsystem instance.
- * </ul>
- * Tip: consider extending {@link org.eclipse.rse.ui.wizards.AbstractSystemNewConnectionWizardPage} for your wizard page class.
- */
- public ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(ISubSystemConfiguration factory, IWizard wizard)
- {
- if (factory instanceof IServiceSubSystemConfiguration)
- {
- SubSystemServiceWizardPage page = new SubSystemServiceWizardPage(wizard, factory);
- return new ISystemNewConnectionWizardPage[] {page};
- }
- else
- {
- List pages = getSubSystemPropertyPages(factory);
- if (pages != null && pages.size() > 0)
- {
- SystemSubSystemsPropertiesWizardPage page = new SystemSubSystemsPropertiesWizardPage(wizard, factory, pages);
- return new ISystemNewConnectionWizardPage[] {page};
- }
- }
- return new ISystemNewConnectionWizardPage[0];
- }
-
-
-
-
- /*
- * Return the form used in the subsyste property page. This default implementation returns Syste
- */
- public ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISubSystemConfiguration factory, ISystemMessageLine msgLine, Object caller)
- {
- return new SystemSubSystemPropertyPageCoreForm(msgLine, caller);
- }
-
- /**
- * Gets the list of property pages applicable for a subsystem associated with this factory
- * @return the list of subsystem property pages
- */
- protected List getSubSystemPropertyPages(ISubSystemConfiguration factory)
- {
- List propertyPages= new ArrayList();
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // Get configured property page extenders
- IConfigurationElement[] propertyPageExtensions =
- registry.getConfigurationElementsFor("org.eclipse.ui", "propertyPages"); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < propertyPageExtensions.length; i++)
- {
- IConfigurationElement configurationElement = propertyPageExtensions[i];
- String objectClass = configurationElement.getAttribute("objectClass"); //$NON-NLS-1$
- String name = configurationElement.getAttribute("name"); //$NON-NLS-1$
- Class objCls = null;
- try
- {
- ClassLoader loader = getClass().getClassLoader();
- objCls = Class.forName(objectClass, false, loader);
- }
- catch (Exception e)
- {
- }
-
-
- if (objCls != null && ISubSystem.class.isAssignableFrom(objCls) && factory.isFactoryFor(objCls))
- {
- try
- {
- PropertyPage page = (PropertyPage) configurationElement.createExecutableExtension("class"); //$NON-NLS-1$
- page.setTitle(name);
- propertyPages.add(page);
- }
- catch (Exception e)
- {
- }
- }
- }
- return propertyPages;
- }
-
- // FIXME - UDAs no longer coupled with factory in core
-// // ---------------------------------
-// // USER-DEFINED ACTIONS METHODS...
-// // ---------------------------------
-//
-// /**
-// * Get the action subsystem object for this subsystemconfiguration,
-// * and set its current subsystem to the given subsystem instance.
-// * Will ensure the user action subsystem is only ever instantiated once.
-// * <p>
-// * Called in the Work With User Actions and the User Actions cascading action.
-// * <p>
-// * Do not override this, as the implementation is complete. However,
-// * you must override createActionSubSystem.
-// *
-// * @see #supportsUserDefinedActions()
-// * @see #createActionSubSystem()
-// */
-// public SystemUDActionSubsystem getActionSubSystem(ISubSystemConfiguration factory, ISubSystem subsystem)
-// {
-// if (udas == null)
-// udas = createActionSubSystem(factory);
-// if (udas != null)
-// {
-// udas.setSubsystem(subsystem);
-// udas.setSubSystemConfiguration(factory);
-// }
-// return udas;
-// }
-//
-// /**
-// * Overridable method to instantiate the SystemUDActionSubsystem.
-// * You must override this if you return true to supportsUserActions.
-// *
-// * @see #supportsUserDefinedActions()
-// * @see #getActionSubSystem(ISubSystem)
-// */
-// protected SystemUDActionSubsystem createActionSubSystem(ISubSystemConfiguration factory)
-// {
-// return null;
-// }
-//
-// /**
-// * Populate main context menu with a "User Actions->" submenu cascade,
-// * which will only be populated when the submenu is selected.
-// * <p>
-// * This is called by the addCommonRemoteObjectsActions method, if this subsystem
-// * supports user defined actions.
-// */
-// public static void addUserDefinedActions(ISubSystemConfiguration factory, Shell shell, IStructuredSelection selection, SystemMenuManager menu, String menuGroup, SystemUDActionSubsystem userActionSubSystem)
-// {
-// SystemUDACascadeAction act = new SystemUDACascadeAction(userActionSubSystem, selection);
-// menu.add(menuGroup, act);
-// }
-
-
- // ---------------------------------
- // COMPILE ACTIONS METHODS...
- // ---------------------------------
-
- // ---------------------------------
- // USER-PREFERENCE METHODS...
- // ---------------------------------
-
-
- // ---------------------------------
- // PROXY METHODS. USED INTERNALLY...
- // ---------------------------------
-
-
- // ---------------------------------
- // FACTORY ATTRIBUTE METHODS...
- // ---------------------------------
-
-
- /**
- * Return image descriptor of this factory.
- * This comes from the xml "icon" attribute of the extension point.
- */
- public ImageDescriptor getImage(ISubSystemConfiguration factory)
- {
- // casting for now to allow for 2-phase refactoring - SubSystemConfiguration really shouldn't implement this
- return ((SubSystemConfiguration)factory).getImage();
- }
-
- /**
- * Return actual graphics Image of this factory.
- * This is the same as calling getImage().createImage() but the resulting
- * image is cached.
- */
- public Image getGraphicsImage(ISubSystemConfiguration factory)
- {
- ImageDescriptor id = getImage(factory);
- if (id != null)
- {
- Image image = null;
- if (imageTable == null)
- imageTable = new Hashtable();
- else
- image = (Image) imageTable.get(id);
- if (image == null)
- {
- image = id.createImage();
- imageTable.put(id, image);
- }
- return image;
- }
- return null;
- }
-
-
-
- /**
- * Return image to use when this susystem is connection.
- * This comes from the xml "iconlive" attribute of the extension point.
- */
- public ImageDescriptor getLiveImage(ISubSystemConfiguration factory)
- {
- // casting for now to allow for 2-phase refactoring - SubSystemConfiguration really shouldn't implement this
- return ((SubSystemConfiguration)factory).getLiveImage();
- }
-
- /**
- * Return actual graphics LiveImage of this factory.
- * This is the same as calling getLiveImage().createImage() but the resulting
- * image is cached.
- */
- public Image getGraphicsLiveImage(ISubSystemConfiguration factory)
- {
- ImageDescriptor id = getLiveImage(factory);
- if (id != null)
- {
- Image image = null;
- if (imageTable == null)
- imageTable = new Hashtable();
- else
- image = (Image) imageTable.get(id);
- if (image == null)
- {
- image = id.createImage();
- imageTable.put(id, image);
- }
- return image;
- }
- return null;
- }
-
-
- // ---------------------------------
- // PROFILE METHODS...
- // ---------------------------------
-
- // private methods...
-
-
- // ---------------------------------
- // SUBSYSTEM METHODS...
- // ---------------------------------
-
-
- /**
- * Returns a list of actions for the popup menu when user right clicks on a subsystem object from this factory.
- * By default returns a single item array with a SystemNewFilterPoolAction object and
- * calls overridable method getAdditionalSubSystemActions.
- * <p>
- * If you wish to support more actions, override getAdditionalSubSystemActions to return a Vector
- * of IAction objects.
- * @see #getSubSystemNewFilterPoolActions(ISubSystem, Shell)
- * @see #getAdditionalSubSystemActions(ISubSystem, Shell)
- * @param selectedSubSystem the currently selected subsystem
- * @param shell The Shell of the view where this action was launched from
- * @return array of IAction objects to contribute to the popup menu
- */
- public IAction[] getSubSystemActions(ISubSystemConfiguration factory, ISubSystem selectedSubSystem, Shell shell)
- {
- Vector ourChildActions = getAdditionalSubSystemActions(factory, selectedSubSystem, shell);
- // we need to start with a fresh vector each time not build up on what our child
- // class gives us, since that may be cached and hence will grow if we keep adding to i.
- Vector childActions = new Vector();
- if (ourChildActions != null)
- for (int idx = 0; idx < ourChildActions.size(); idx++)
- childActions.addElement(ourChildActions.elementAt(idx));
- if (factory.supportsFilters())
- {
- boolean showFilterPools = factory.showFilterPools();
- // if showing filter pools, we have to add a "new filter pool" action here...
- if (showFilterPools)
- {
- IAction[] newFPActions = getSubSystemNewFilterPoolActions(factory, selectedSubSystem, shell);
- if (newFPActions != null)
- {
- for (int idx = 0; idx < newFPActions.length; idx++)
- {
- // special case handling...
- // set input subsystem for new filter pool actions...
- if (newFPActions[idx] instanceof SystemFilterAbstractFilterPoolAction)
- {
- SystemFilterAbstractFilterPoolAction fpAction = (SystemFilterAbstractFilterPoolAction) newFPActions[idx];
- fpAction.setFilterPoolManagerNamePreSelection(selectedSubSystem.getSystemProfile().getName());
- fpAction.setFilterPoolManagerProvider(factory);
- }
- childActions.addElement(newFPActions[idx]);
- } // end for loop
- } // end if newFPActions != null
- } // and if showFilterPools
- // if showing filter pools, we have to add a "select filter pool and work-with filter pools" actions here...
- if (showFilterPools)
- {
- childActions.addElement(new SystemFilterSelectFilterPoolsAction(shell));
- childActions.addElement(new SystemFilterWorkWithFilterPoolsAction(shell));
- } // end if showFilterPools
- // if not showing filter pools, we have to add a "new filter" action here...
- if (!showFilterPools)
- {
- IAction[] newFilterActions = getNewFilterPoolFilterActions(factory, null, shell);
- if ((newFilterActions != null) && (newFilterActions.length > 0))
- {
- // pre-scan for legacy
- for (int idx = 0; idx < newFilterActions.length; idx++)
- {
- if (newFilterActions[idx] instanceof SystemNewFilterAction)
- ((SystemNewFilterAction) newFilterActions[idx]).setCallBackConfigurator(this, selectedSubSystem);
- else
- {
- }
- }
- /*
- if (anyLegacy)
- {
- SystemFilterPoolReferenceManager refMgr = selectedSubSystem.getSystemFilterPoolReferenceManager();
- SystemFilterPool[] refdPools = refMgr.getReferencedSystemFilterPools();
- if ( refdPools.length == 0 )
- RSEUIPlugin.logInfo("SubSystemConfigurationImpl::getSubSystemActions - getReferencedSystemFilterPools returned array of lenght zero.");
- for (int idx=0; idx<newFilterActions.length; idx++)
- {
- if (newFilterActions[idx] instanceof SystemFilterBaseNewFilterAction && refdPools.length > 0 )
- ((SystemFilterBaseNewFilterAction)newFilterActions[idx]).setAllowFilterPoolSelection(refdPools);
- } // end for loop
- }
- */
- // now add the actions
- for (int idx = 0; idx < newFilterActions.length; idx++)
- childActions.addElement(newFilterActions[idx]);
- } // end if newFilterActions != null
- } // end if !showFilterPools
- } // end if supportsFilters()
-
-// FIXME - UDAs moved out of here
-// // if user defined actions are supported, add an action to work with them...
-// if (factory.supportsUserDefinedActions())
-// childActions.addElement(new SystemWorkWithUDAsAction(shell, (ISubSystem)null));
-// // if named file types are supported, add an action to work with them...
-// if (factory.supportsFileTypes())
-// childActions.addElement(new SystemWorkWithFileTypesAction(shell, null));
-// // if compile actions are supported, add an action to work with them...
-// if (factory.supportsCompileActions())
-// childActions.addElement(new SystemWorkWithCompileCommandsAction(shell, false));
-
-
-
- if (factory.supportsSubSystemConnect())
- {
- // MJB: RE defect 40854
- addConnectOrDisconnectAction(childActions, shell, selectedSubSystem);
- }
-
- if (subSystemActions == null)
- {
- // premise: none of these actions' constructor need the current selection as input
- int nbrBaseActions = 0;
- if (factory.supportsSubSystemConnect())
- {
- //nbrBaseActions += 2; // 4; MJB: RE defect 50854
- if (selectedSubSystem.getConnectorService().supportsUserId())
- nbrBaseActions += 1;
- }
- //if (supportsFilters())
- // nbrBaseActions += 2;
- subSystemActions = new IAction[nbrBaseActions];
- int ssIdx = 0;
- if (factory.supportsSubSystemConnect())
- {
- // MJB: RE defect 40854
- //subSystemActions[ssIdx++] = new SystemConnectAction(shell);
- //subSystemActions[ssIdx++] = new SystemDisconnectAction(shell);
-
- if (selectedSubSystem.getConnectorService().supportsUserId())
- subSystemActions[ssIdx++] = new SystemClearPasswordAction(shell);
- }
- } // end if subsystemActons == null
-
- IAction[] allActions = new IAction[childActions.size() + subSystemActions.length];
- int allIndex = 0;
- for (int idx = 0; idx < childActions.size(); idx++)
- allActions[allIndex++] = (IAction) childActions.elementAt(idx);
- for (int idx = 0; idx < subSystemActions.length; idx++)
- allActions[allIndex++] = subSystemActions[idx];
-
- return allActions;
- }
-
- private void addConnectOrDisconnectAction(Vector actions, Shell shell, ISubSystem selectedSS)
- {
- boolean connected = selectedSS.isConnected();
- if (connected)
- {
- actions.addElement(new SystemDisconnectAction(shell));
- }
- else
- {
- actions.addElement(new SystemConnectAction(shell));
- }
- }
-
- /**
- * There is a reasonable amount of processing needed to configure filter wizards. To aid
- * in performance and memory usage, we extract that processing into this method, and then
- * use a callback contract with the filter wizard to call us back to do this processing
- * only at the time the action is actually selected to be run.
- * <p>
- * The processing we do here is to specify the filter pools to prompt the user for, in the
- * second page of the New Filter wizards.
- * <p>
- * This method is from the ISystemNewFilterActionConfigurator interface
- */
- public void configureNewFilterAction(ISubSystemConfiguration factory, SystemNewFilterAction newFilterAction, Object callerData)
- {
- //System.out.println("Inside configureNewFilterAction! It worked!");
- newFilterAction.setFromRSE(true);
- boolean showFilterPools = factory.showFilterPools();
-
- // It does not make sense, when invoked from a filterPool, to ask the user
- // for the parent filter pool, or to ask the user whether the filter is connection
- // specific, as they user has explicitly chosen their pool...
- //if (!showFilterPools || (callerData instanceof SubSystem))
- if (!showFilterPools)
- {
- ISubSystem selectedSubSystem = (ISubSystem) callerData;
- // When not showing filter pools, we need to distinquish between an advanced user and a new user.
- // For a new user we simply want to ask them whether this filter is to be team sharable or private,
- // and based on that, we will place the filter in the default filter pool for the appropriate profile.
- // For an advanced user who has simply turned show filter pools back off, we want to let them choose
- // explicitly which filter pool they want to place the filter in.
- // To approximate the decision, we will define an advanced user as someone who already has a reference
- // to a filter pool other than the default pools in the active profiles.
- boolean advancedUser = false;
- ISystemFilterPoolReferenceManager refMgr = selectedSubSystem.getSystemFilterPoolReferenceManager();
- ISystemFilterPool[] refdPools = refMgr.getReferencedSystemFilterPools();
- if (refdPools.length == 0)
- SystemBasePlugin.logInfo("SubSystemConfigurationImpl::getSubSystemActions - getReferencedSystemFilterPools returned array of length zero."); //$NON-NLS-1$
- // so there already exists references to more than one filter pool, but it might simply be a reference
- // to the default filter pool in the user's profile and another to reference to the default filter pool in
- // the team profile... let's see...
- else if (refdPools.length > 1)
- {
- for (int idx = 0; !advancedUser && (idx < refdPools.length); idx++)
- {
- if (!refdPools[idx].isDefault() && (refdPools[idx].getOwningParentName()==null))
- advancedUser = true;
- }
- }
- if (advancedUser)
- {
- newFilterAction.setAllowFilterPoolSelection(refdPools); // show all pools referenced in this subsystem, and let them choose one
- }
- else
- {
- boolean anyAdded = false;
- SystemFilterPoolWrapperInformation poolWrapperInfo = getNewFilterWizardPoolWrapperInformation();
- ISystemProfile[] activeProfiles = RSEUIPlugin.getTheSystemRegistry().getActiveSystemProfiles();
- ISystemProfile activeProfile = selectedSubSystem.getHost().getSystemProfile();
- for (int idx = 0; idx < activeProfiles.length; idx++)
- {
- ISystemFilterPool defaultPool = getDefaultSystemFilterPool(factory, activeProfiles[idx]);
-
- if (defaultPool != null)
- {
- poolWrapperInfo.addWrapper(activeProfiles[idx].getName(), defaultPool, (activeProfiles[idx] == activeProfile)); // display name, pool to wrap, whether to preselect
- anyAdded = true;
- }
- }
- if (anyAdded)
- newFilterAction.setAllowFilterPoolSelection(poolWrapperInfo);
- }
- }
- }
-
- /**
- * Given a profile, return the first (hopefully only) default pool for this
- * profile.
- */
- public ISystemFilterPool getDefaultSystemFilterPool(ISubSystemConfiguration factory, ISystemProfile profile)
- {
- ISystemFilterPool pool = null;
- ISystemFilterPoolManager mgr = factory.getFilterPoolManager(profile);
- pool = mgr.getFirstDefaultSystemFilterPool(); // RETURN FIRST
- return pool;
- }
-
- /**
- * Overridable entry for child classes to supply their own flavour of ISystemFilterPoolWrapperInformation for
- * the new filter wizards.
- */
- protected SystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
- {
- return new SystemFilterPoolWrapperInformation(SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_LABEL, SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_TOOLTIP,
- SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_VERBAGE);
- }
- /**
- * Overridable entry for child classes to supply their own "new" action(s) for creating a
- * filter pool.
- * By default, this creates an action for creating a new filter pool and a new filter pool reference.
- * @param selectedSubSystem the currently selected subsystem
- * @param shell The Shell of the view where this action was launched from
- * @return array of IAction objects to contribute to the popup menu
- */
- protected IAction[] getSubSystemNewFilterPoolActions(ISubSystemConfiguration factory, ISubSystem selectedSubSystem, Shell shell)
- {
- IAction[] actions = new IAction[2];
- actions[0] = new SystemFilterNewFilterPoolAction(shell);
- ((ISystemAction) actions[0]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0040"); //$NON-NLS-1$
- ((SystemFilterNewFilterPoolAction) actions[0]).setDialogHelp(RSEUIPlugin.HELPPREFIX + "wnfp0000"); //$NON-NLS-1$
- actions[1] = new SystemFilterCascadingNewFilterPoolReferenceAction(shell, selectedSubSystem.getSystemFilterPoolReferenceManager());
- ((ISystemAction) actions[1]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0041"); //$NON-NLS-1$
- return actions;
- }
- /**
- * Overridable entry for child classes to contribute subsystem actions
- * beyond the default supplied actions.
- * <p>
- * By default, returns null.
- * @return Vector of IAction objects.
- * @see #getSubSystemActions(ISubSystem,Shell)
- */
- protected Vector getAdditionalSubSystemActions(ISubSystemConfiguration factory, ISubSystem selectedSubSystem, Shell shell)
- {
- return null;
- }
-
-
-
-
-
-
- /**
- * Supply the image to be used for filter pool managers, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterPoolManagerImage()
- {
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID);
- }
- /**
- * Supply the image to be used for filter pools, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterPoolImage(ISystemFilterPool filterPool)
- {
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID);
- }
- /**
- * Supply the image to be used for filters, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterImage(ISystemFilter filter)
- {
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID);
- }
- /*
- * Supply the image to be used for the given filter string, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterStringImage(ISystemFilterString filterString)
- {
- return getSystemFilterStringImage(filterString.getString());
- }
-
- /*
- * Supply the image to be used for the given filter string string, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterStringImage(String filterStringString)
- {
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERSTRING_ID);
- }
-
-
- // ------------------------------------------------
- // HELPER METHODS TO SIMPLY EVENT FIRING...
- // ------------------------------------------------
-
-
-
- // ------------------------------------------------
- // FILTER POOL MANAGER PROVIDER CALLBACK METHODS...
- // ------------------------------------------------
-
- // ---------------------
- // FILTER POOL EVENTS...
- // ---------------------
-
- /**
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter pool object within a subsystem of this factory.
- * Only supported and used by subsystems that support filters.
- * <p>
- * YOU DO NOT NEED TO OVERRIDE THIS METHOD.
- * <p>
- * Most actions are handled in this base, except if you have your own action for
- * creating a new filter. In this case, <b>override getNewFilterAction()</b>
- * To add additional actions, override {@link #getAdditionalFilterPoolActions(ISystemFilterPool selectedPool, Shell shell)}.
- *
- * @param selectedPool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- public IAction[] getFilterPoolActions(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
- {
- Vector childActions = new Vector();
- Vector ourChildActions = getAdditionalFilterPoolActions(factory, selectedPool, shell);
- if (ourChildActions != null)
- for (int idx = 0; idx < ourChildActions.size(); idx++)
- childActions.addElement(ourChildActions.elementAt(idx));
- IAction[] newActions = getNewFilterPoolFilterActions(factory, selectedPool, shell);
- if (newActions != null)
- {
- for (int idx = 0; idx < newActions.length; idx++)
- {
- childActions.addElement(newActions[idx]);
- //if (newActions[idx] instanceof SystemNewFilterAction)
- // ((SystemNewFilterAction) newActions[idx]).setCallBackConfigurator(this, null);
- }
- }
- if (filterPoolActions == null)
- {
- int nbr = 2;
- filterPoolActions = new IAction[nbr];
- SystemFilterCopyFilterPoolAction copyAction = new SystemFilterCopyFilterPoolAction(shell);
- copyAction.setPromptString(SystemResources.RESID_COPY_TARGET_PROFILE_PROMPT);
- copyAction.setHelp(RSEUIPlugin.HELPPREFIX + "actn0060"); //$NON-NLS-1$
- copyAction.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dcfp0000"); //$NON-NLS-1$
- SystemFilterMoveFilterPoolAction moveAction = new SystemFilterMoveFilterPoolAction(shell);
- moveAction.setPromptString(SystemResources.RESID_MOVE_TARGET_PROFILE_PROMPT);
- moveAction.setHelp(RSEUIPlugin.HELPPREFIX + "actn0061"); //$NON-NLS-1$
- moveAction.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dmfp0000"); //$NON-NLS-1$
- filterPoolActions[0] = copyAction;
- filterPoolActions[1] = moveAction;
- }
- for (int idx = 0; idx < filterPoolActions.length; idx++)
- {
- childActions.addElement(filterPoolActions[idx]);
- }
-
- IAction[] allFilterPoolActions = new IAction[childActions.size()];
- for (int idx = 0; idx < childActions.size(); idx++)
- allFilterPoolActions[idx] = (IAction) childActions.elementAt(idx);
-
- return allFilterPoolActions;
- }
- /**
- * Overridable entry for child classes to contribute filter pool actions beyond the
- * default supplied actions.
- * <p>
- * By default, this returns null.
- * @param pool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- * @return Vector of IAction objects.
- * @see #getFilterPoolActions(ISystemFilterPool,Shell)
- */
- protected Vector getAdditionalFilterPoolActions(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
- {
- return null;
- }
- /**
- * Overridable method to return the actions for creating a new filter in a filter pool.
- * By default returns one action created by calling {@link #getNewFilterPoolFilterAction(ISystemFilterPool, Shell)}.
- * <p>
- * If you have multiple actions for creating new filters, override this.
- * <p>
- * If you have only a single action for creating new filters, override getNewFilterPoolFilterAction (without the 's').
- * <p>
- * @param pool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- protected IAction[] getNewFilterPoolFilterActions(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
- {
- IAction[] actions = new IAction[1];
- actions[0] = getNewFilterPoolFilterAction(factory, selectedPool, shell);
- return actions;
- }
- /**
- * Overridable method to return the single action for creating a new filter in a filter pool.
- * By default returns a default supplied action for this.
- * <p>
- * If you have multiple actions for creating new filters, override getNewFilterPoolFilterActions (note the 's').
- * <p>
- * If you have only a single action for creating new filters, override this.
- * <p>
- * @param pool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- protected IAction getNewFilterPoolFilterAction(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
- {
- SystemNewFilterAction action = new SystemNewFilterAction(shell, selectedPool);
- action.setHelp(RSEUIPlugin.HELPPREFIX + "actn0042"); //$NON-NLS-1$
- action.setDialogHelp(RSEUIPlugin.HELPPREFIX + "wnfr0000"); //$NON-NLS-1$
- return action;
- }
- /**
- * Overridable method to return the action for creating a new nested filter inside another filter.
- * By default returns getNewFilterPoolFilterAction(selectedFilter.getParentFilterPool(),shell).
- * @param pool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- protected IAction getNewNestedFilterAction(ISubSystemConfiguration factory, ISystemFilter selectedFilter, Shell shell)
- {
- return getNewFilterPoolFilterAction(factory, selectedFilter.getParentFilterPool(), shell);
- }
- /**
- * Overridable method to return the action for changing an existing filter.
- * By default returns new SystemChangeFilterAction, unless the filter's isSingleFilterStringOnly()
- * returns true, in which case null is returned.
- *
- * @param selectedFilter the currently selected filter
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- protected IAction getChangeFilterAction(ISubSystemConfiguration factory, ISystemFilter selectedFilter, Shell shell)
- {
- /* We don't do this here now as this is overridable. Now done in SystemChangeFilterAction.
- * Also, single filter string doesn't mean non-editable.
- *
- if (selectedFilter.isSingleFilterStringOnly())
- {
- //System.out.println("filter " + selectedFilter + " is single filter string only");
- return null;
- }*/
- SystemChangeFilterAction action = new SystemChangeFilterAction(shell);
- action.setHelp(RSEUIPlugin.HELPPREFIX + "actn0081"); //$NON-NLS-1$
- action.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dufr0000"); //$NON-NLS-1$
- return action;
- }
- /**
- * In addition to a change filter action, we now also support the same functionality
- * via a Properties page for filters. When this page is activated, this method is called
- * to enable customization of the page, given the selected filter.
- * <p>
- * By default, this method will call {@link #getChangeFilterAction(ISystemFilter, Shell)} to get
- * your change filter action, and will configure the given page from the dialog created by your
- * change filter action.
- * <p>
- * If your filter uses its own Change Filter dialog, versus subclassing or configuring
- * {@link org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog} you will have to override this method
- * and specify the following information for the supplied page (via its setters):
- * <ul>
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setDuplicateFilterStringErrorMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setFilterStringEditPane(org.eclipse.rse.ui.filters.SystemFilterStringEditPane)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setFilterStringValidator(org.eclipse.rse.ui.validators.ISystemValidator)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setListLabel(String, String)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setParentPoolPromptLabel(String, String)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setNamePromptLabel(String, String)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setNewListItemText(String)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setDuplicateFilterStringErrorMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setEditable(boolean)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setSupportsMultipleStrings(boolean)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage#setDescription(String)}
- * </ul>
- */
- public void customizeChangeFilterPropertyPage(ISubSystemConfiguration factory, SystemChangeFilterPropertyPage page, ISystemFilter selectedFilter, Shell shell)
- {
- // default behaviour is a total hack! We want to preserve all the configuration done on the
- // Change dialog, so we instantiate it merely so that we can copy the configuration information...
- IAction changeAction = getChangeFilterAction(factory, selectedFilter, shell);
- if (changeAction instanceof SystemChangeFilterAction)
- {
- SystemChangeFilterAction changeFilterAction = (SystemChangeFilterAction)changeAction;
- changeFilterAction.setSelection(new StructuredSelection(selectedFilter));
- org.eclipse.jface.dialogs.Dialog dlg = changeFilterAction.createDialog(shell);
- if (dlg instanceof SystemChangeFilterDialog)
- {
- SystemChangeFilterDialog changeFilterDlg = (SystemChangeFilterDialog)dlg;
- //changeFilterAction.callConfigureFilterDialog(changeFilterDlg); createDialog calls this already!
- page.setDuplicateFilterStringErrorMessage(changeFilterDlg.getDuplicateFilterStringErrorMessage());
- page.setFilterStringEditPane(changeFilterDlg.getFilterStringEditPane(shell));
- page.setFilterStringValidator(changeFilterDlg.getFilterStringValidator());
- page.setListLabel(changeFilterDlg.getListLabel(), changeFilterDlg.getListTip());
- page.setParentPoolPromptLabel(changeFilterDlg.getParentPoolPromptLabel(), changeFilterDlg.getParentPoolPromptTip());
- page.setNamePromptLabel(changeFilterDlg.getNamePromptLabel(), changeFilterDlg.getNamePromptTip());
- page.setNewListItemText(changeFilterDlg.getNewListItemText());
-
- page.setDescription(changeFilterDlg.getTitle());
- }
- }
- if (selectedFilter.isNonChangable())
- page.setEditable(false);
- //System.out.println("Selected filter: "+selectedFilter.getName()+", isSingleFilterStringOnly: "+selectedFilter.isSetSingleFilterStringOnly());
- boolean singleFilterString = selectedFilter.isSingleFilterStringOnly() || (selectedFilter.isNonChangable() && (selectedFilter.getFilterStringCount() == 1));
- if (singleFilterString)
- page.setSupportsMultipleStrings(false);
- }
-
- /**
- * In addition to a change filter action, we now also support the same functionality
- * via a Properties page for filter strings, in the Team View. When this page is activated,
- * this method is called to enable customization of the page, given the selected filter string.
- *
- * <p>
- * By default, this method will call {@link #getChangeFilterAction(ISystemFilter, Shell)} to get
- * your change filter action, and will configure the given page from the dialog created by your
- * change filter action.
- * <p>
- * If your filter uses its own Change Filter dialog, versus subclassing or configuring
- * {@link org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog} you will have to
- * override this method and specify the following information for the supplied page (via its setters):
- * <ul>
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage#setDuplicateFilterStringErrorMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage#setFilterStringEditPane(org.eclipse.rse.ui.filters.SystemFilterStringEditPane)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage#setFilterStringValidator(org.eclipse.rse.ui.validators.ISystemValidator)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage#setDuplicateFilterStringErrorMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage#setEditable(boolean)}
- * <li>{@link org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage#setDescription(String)}
- * </ul>
- */
- public void customizeFilterStringPropertyPage(ISubSystemConfiguration factory, SystemFilterStringPropertyPage page, ISystemFilterString selectedFilterString, Shell shell)
- {
- // default behaviour is a total hack! We want to preserve all the configuration done on the
- // Change dialog, so we instantiate it merely so that we can copy the configuration information...
- ISystemFilter selectedFilter = selectedFilterString.getParentSystemFilter();
- IAction changeAction = getChangeFilterAction(factory, selectedFilter, shell);
- if (changeAction instanceof SystemChangeFilterAction)
- {
- SystemChangeFilterAction changeFilterAction = (SystemChangeFilterAction)changeAction;
- changeFilterAction.setSelection(new StructuredSelection(selectedFilter));
- org.eclipse.jface.dialogs.Dialog dlg = changeFilterAction.createDialog(shell);
- if (dlg instanceof SystemChangeFilterDialog)
- {
- SystemChangeFilterDialog changeFilterDlg = (SystemChangeFilterDialog)dlg;
- //changeFilterAction.callConfigureFilterDialog(changeFilterDlg); createDialog calls this!
- page.setDuplicateFilterStringErrorMessage(changeFilterDlg.getDuplicateFilterStringErrorMessage());
- page.setFilterStringEditPane(changeFilterDlg.getFilterStringEditPane(shell));
- page.setFilterStringValidator(changeFilterDlg.getFilterStringValidator());
- page.setDescription(changeFilterDlg.getTitle());
- }
- }
- if (selectedFilter.isNonChangable())
- page.setEditable(false);
- }
-
- // ---------------------------------
- // FILTER POOL REFERENCE METHODS...
- // ---------------------------------
-
-
- /**
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter pool reference object within a subsystem of this factory. Note,
- * these are added to the list returned by getFilterPoolActions().
- * Only supported by subsystems that support filters.
- * @param selectedPoolRef the currently selected pool reference
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- public IAction[] getFilterPoolReferenceActions(ISubSystemConfiguration factory, ISystemFilterPoolReference selectedPoolRef, Shell shell)
- {
- ISystemFilterPool selectedPool = selectedPoolRef.getReferencedFilterPool();
- Vector childActions = getAdditionalFilterPoolReferenceActions(factory, selectedPool, shell);
- int nbrChildActions = 0;
- if (childActions != null)
- nbrChildActions = childActions.size();
- int fpIdx = 0;
- if (filterPoolReferenceActions == null)
- {
- int nbr = 3;
- filterPoolReferenceActions = new IAction[nbr + nbrChildActions];
- filterPoolReferenceActions[fpIdx++] = getRemoveFilterPoolReferenceAction(factory, selectedPool, shell);
- filterPoolReferenceActions[fpIdx] = new SystemFilterMoveUpFilterPoolReferenceAction(shell);
- ((ISystemAction) filterPoolReferenceActions[fpIdx++]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0063"); //$NON-NLS-1$
- filterPoolReferenceActions[fpIdx] = new SystemFilterMoveDownFilterPoolReferenceAction(shell);
- ((ISystemAction) filterPoolReferenceActions[fpIdx++]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0064"); //$NON-NLS-1$
- }
-
- if (childActions != null)
- for (int idx = 0; idx < nbrChildActions; idx++)
- filterPoolReferenceActions[fpIdx++] = (IAction) childActions.elementAt(idx);
-
- return filterPoolReferenceActions;
- }
- /**
- * Overridable entry for child classes to contribute filter pool reference actions beyond the
- * default supplied actions.
- * <p>
- * By default, this returns null.
- * @param pool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- * @return Vector of IAction objects.
- * @see #getFilterPoolReferenceActions(ISystemFilterPoolReference,Shell)
- */
- protected Vector getAdditionalFilterPoolReferenceActions(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
- {
- return null;
- }
- /**
- * Overridable method to return the action for removing a filter pool reference.
- * By default returns new SystemRemoveFilterPoolReferenceAction.
- * @param pool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- protected IAction getRemoveFilterPoolReferenceAction(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell)
- {
- ISystemAction action = new SystemFilterRemoveFilterPoolReferenceAction(shell);
- action.setHelp(RSEUIPlugin.HELPPREFIX + "actn0062"); //$NON-NLS-1$
- return action;
- }
-
- // ---------------------------------
- // FILTER METHODS
- // ---------------------------------
-
-
-
- /**
- * Prompt the user to create a new filter as a result of the user expanding a promptable
- * filter.
- * <p>
- * This base implementation prompts using the generic filter prompt. You should override this but
- * copy this code to use as a base/example how to do this.
- *
- * @return the filter created by the user or null if they cancelled the prompting
- */
- public ISystemFilter createFilterByPrompting(ISubSystemConfiguration factory, ISystemFilterReference referenceToPromptableFilter, Shell shell) throws Exception
- {
- ISystemFilter filterPrompt = referenceToPromptableFilter.getReferencedFilter();
- ISystemFilterPool selectedPool = filterPrompt.getParentFilterPool();
-
- SystemNewFilterAction action = new SystemNewFilterAction(shell, selectedPool);
- Object simulatedSelectedParent = null;
- if (!factory.showFilterPools()) // if we are not showing filter pools, the parent will be the subsystem itself
- {
- simulatedSelectedParent = referenceToPromptableFilter.getProvider(); // this is the subsystem
- action.setCallBackConfigurator(this, simulatedSelectedParent);
- }
- else // if we are showing filter pools, the parent will be the selected filter pool reference
- {
- simulatedSelectedParent = referenceToPromptableFilter.getParentSystemFilterReferencePool();
- action.setCallBackConfigurator(this, referenceToPromptableFilter.getProvider());
- }
- action.setSelection(new StructuredSelection(simulatedSelectedParent)); // pretend parent node was selected
-
- action.run();
- ISystemFilter newFilter = action.getNewFilter();
- return newFilter;
- }
-
- /**
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter object.
- * <p>
- * Only supported and used by subsystems that support filters.
- * <p>
- * YOU DO NOT NEED TO OVERRIDE THIS METHOD.
- * <p>
- * Most actions are handled in this base, except if you have your own action for
- * creating a new nested filter. In this case, <b>override getNewFilterAction()</b>
- */
- public IAction[] getFilterActions(ISubSystemConfiguration factory, ISystemFilter selectedFilter, Shell shell)
- {
- Vector childActions = new Vector();
- Vector ourChildActions = getAdditionalFilterActions(factory, selectedFilter, shell);
- int pasteIndex = -1;
- if (ourChildActions != null)
- for (int idx = 0; idx < ourChildActions.size(); idx++)
- {
- // we want to make sure the order is kept consistent at
- // Copy, Paste, Move, Delete Rename
- if (ourChildActions.elementAt(idx) instanceof SystemPasteFromClipboardAction) pasteIndex = idx;
- else childActions.addElement(ourChildActions.elementAt(idx));
- }
-
- // Add our static default-supplied actions
- if (filterActions == null)
- {
- int additionalActions = 4;
- if (pasteIndex > -1) additionalActions++;
- int fsIdx = 0;
- filterActions = new IAction[additionalActions];
- SystemFilterCopyFilterAction copyAction = new SystemFilterCopyFilterAction(shell);
- copyAction.setPromptString(SystemResources.RESID_COPY_TARGET_FILTERPOOL_PROMPT);
- copyAction.setHelp(RSEUIPlugin.HELPPREFIX + "actn0082"); //$NON-NLS-1$
- copyAction.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dcfr0000"); //$NON-NLS-1$
- filterActions[fsIdx++] = copyAction;
-
- // we want to make sure the order is kept consistent at
- // Copy, Paste, Move, Delete Rename
- if (pasteIndex > -1)
- {
- filterActions[fsIdx++] = (IAction) ourChildActions.elementAt(pasteIndex);
- }
-
- SystemFilterMoveFilterAction moveAction = new SystemFilterMoveFilterAction(shell);
- moveAction.setPromptString(SystemResources.RESID_MOVE_TARGET_FILTERPOOL_PROMPT);
- moveAction.setHelp(RSEUIPlugin.HELPPREFIX + "actn0083"); //$NON-NLS-1$
- moveAction.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dmfr0000"); //$NON-NLS-1$
- filterActions[fsIdx++] = moveAction;
-
- filterActions[fsIdx] = new SystemFilterMoveUpFilterAction(shell);
- ((SystemFilterMoveUpFilterAction) filterActions[fsIdx++]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0084"); //$NON-NLS-1$
- filterActions[fsIdx] = new SystemFilterMoveDownFilterAction(shell);
- ((SystemFilterMoveDownFilterAction) filterActions[fsIdx++]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0085"); //$NON-NLS-1$
- }
- // add overridable dynamic actions
- if (factory.supportsNestedFilters())
- {
- IAction newNestedFilterAction = getNewNestedFilterAction(factory, selectedFilter, shell);
- if (newNestedFilterAction != null)
- childActions.addElement(newNestedFilterAction);
- }
- IAction chgFilterAction = getChangeFilterAction(factory, selectedFilter, shell);
- if (chgFilterAction != null)
- childActions.addElement(chgFilterAction);
- /*
- if (showFilterStrings())
- {
- IAction[] newStringActions = getNewFilterStringActions(selectedFilter, shell);
- if (newStringActions != null)
- for (int idx=0; idx<newStringActions.length; idx++)
- childActions.addElement(newStringActions[idx]);
- }
- */
- IAction[] allFilterActions = new IAction[childActions.size() + filterActions.length];
- int allIdx = 0;
- if (childActions != null)
- for (int idx = 0; idx < childActions.size(); idx++)
- allFilterActions[allIdx++] = (IAction) childActions.elementAt(idx);
- for (int idx = 0; idx < filterActions.length; idx++)
- allFilterActions[allIdx++] = filterActions[idx];
-
- return allFilterActions;
- }
-
-
- /**
- * Overridable entry for child classes to contribute filter actions beyond the
- * default supplied actions.
- * <p>
- * By default, this returns null.
- * @return Vector of IAction objects.
- * @see #getFilterActions(ISystemFilter,Shell)
- */
- protected Vector getAdditionalFilterActions(ISubSystemConfiguration factory, ISystemFilter selectedFilter, Shell shell)
- {
- return null;
- }
-
- // ---------------------------------
- // FILTER REFERENCE METHODS
- // ---------------------------------
-
- /**
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter reference object within a subsystem of this factory.
- * Only supported and used by subsystems that support filters.
- * <p>
- * YOU DO NOT NEED TO OVERRIDE THIS METHOD.
- * <p>
- * Most actions are handled in this base, except if you have your own action for
- * creating a new filter. In this case, <b>override getNewFilterAction()</b>
- * To add additional actions, override {@link #getAdditionalFilterReferenceActions(ISystemFilterReference, Shell)}.
- *
- * @param selectedFilterRef the currently selected filter reference
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- public IAction[] getFilterReferenceActions(ISubSystemConfiguration factory, ISystemFilterReference selectedFilterRef, Shell shell)
- {
- Vector childActions = getAdditionalFilterReferenceActions(factory, selectedFilterRef, shell);
- int nbrChildActions = 0;
- if (childActions != null)
- nbrChildActions = childActions.size();
- else
- childActions = new Vector();
- /*
- if (filterReferenceActions == null)
- {
- int nbr = 2;
- filterReferenceActions = new IAction[nbr];
- }
- for (int idx=0; idx<filterReferenceActions.length; idx++)
- {
- childActions.addElement(filterReferenceActions[idx]);
- ++nbrChildActions;
- }
- */
- IAction[] allFilterRefActions = new IAction[nbrChildActions];
- for (int idx = 0; idx < nbrChildActions; idx++)
- allFilterRefActions[idx] = (IAction) childActions.elementAt(idx);
-
- return allFilterRefActions;
- }
- /**
- * Overridable entry for child classes to contribute filter reference actions beyond the
- * default supplied actions.
- * <p>
- * By default, this returns null.
- * @param selectedFilterRef the currently selected filter reference
- * @param shell parent shell of viewer where the popup menu is being constructed
- * @return Vector of IAction objects.
- */
- protected Vector getAdditionalFilterReferenceActions(ISubSystemConfiguration factory, ISystemFilterReference selectedFilterRef, Shell shell)
- {
- return null;
- }
-
- // ---------------------------------
- // FILTER STRING METHODS
- // ---------------------------------
-
- /*
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter string object (and has set the preferences to see them).
- * Only supported and used by subsystems that support filters.
- * <p>
- * YOU DO NOT NEED TO OVERRIDE THIS METHOD.
- * <p>
- * Most actions are handled in this base, only override if you have something unique.
- *
- public IAction[] getFilterStringActions(SystemFilterString selectedFilterString, Shell shell)
- {
- Vector childActions = new Vector();
- Vector ourChildActions = getAdditionalFilterStringActions(selectedFilterString, shell);
- if (ourChildActions != null)
- for (int idx=0; idx<ourChildActions.size(); idx++)
- childActions.addElement(ourChildActions.elementAt(idx));
-
- if (filterStringActions == null)
- {
- filterStringActions = new IAction[4];
- filterStringActions[0] = new SystemFilterMoveUpFilterStringAction(shell);
- ((ISystemAction)filterStringActions[0]).setHelp(RSEUIPlugin.HELPPREFIX+"actn0093");
- filterStringActions[1] = new SystemFilterMoveDownFilterStringAction(shell);
- ((ISystemAction)filterStringActions[1]).setHelp(RSEUIPlugin.HELPPREFIX+"actn0094");
-
- SystemFilterCopyFilterStringAction copyAction = new SystemFilterCopyFilterStringAction(shell);
- copyAction.setPromptString(SystemResources.RESID_COPY_TARGET_FILTER_PROMPT));
- 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(RSEUIPlugin.HELPPREFIX+"actn0093");
- moveAction.setDialogHelp(RSEUIPlugin.HELPPREFIX+"dmfs0000");
- filterStringActions[3] = moveAction;
- }
- IAction chgAction = getChangeFilterStringAction(selectedFilterString, shell);
- if (chgAction != null)
- childActions.addElement(chgAction);
- for (int idx=0; idx<filterStringActions.length; idx++)
- {
- childActions.addElement(filterStringActions[idx]);
- }
-
- IAction[] allFilterStringActions = new IAction[childActions.size()];
- for (int idx=0; idx<childActions.size(); idx++)
- allFilterStringActions[idx] = (IAction)childActions.elementAt(idx);
-
- return allFilterStringActions;
- }*/
- /*
- * Overridable entry for child classes to contribute filter string actions beyond the
- * default supplied actions.
- * <p>
- * By default, this returns null.
- * @param selectedFilterString the currently selected filter string
- * @param shell parent shell of viewer where the popup menu is being constructed
- * @return Vector of IAction objects.
- *
- protected Vector getAdditionalFilterStringActions(SystemFilterString selectedFilterString, Shell shell)
- {
- return null;
- }*/
- /*
- * Overridable entry for child classes to contribute their own change filter string action.
- * <p>
- * By default, this returns the default change filter string action.
- * @param selectedFilterString the currently selected filter string
- * @param shell parent shell of viewer where the popup menu is being constructed
- * @return change action.
- *
- protected IAction getChangeFilterStringAction(SystemFilterString selectedFilterString, Shell shell)
- {
- //IAction chgAction = new SystemFilterDefaultUpdateFilterStringAction(shell);
- //return chgAction;
- return null;
- }*/
-
- /*
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter string reference object (and has set the preferences to see them).
- * <p>
- * Only supported and used by subsystems that support filters.
- * <p>
- * Most actions are handled in this base, only override if you have something unique.
- *
- public IAction[] getFilterStringReferenceActions(SystemFilterStringReference selectedFilterStringRef, Shell shell)
- {
- Vector childActions = new Vector();
- Vector ourChildActions = getAdditionalFilterStringReferenceActions(selectedFilterStringRef, shell);
- if (ourChildActions != null)
- for (int idx=0; idx<ourChildActions.size(); idx++)
- childActions.addElement(ourChildActions.elementAt(idx));
-
- if (filterStringReferenceActions == null)
- {
- }
- if (filterStringReferenceActions != null)
- {
- for (int idx=0; idx<filterStringReferenceActions.length; idx++)
- {
- childActions.addElement(filterStringReferenceActions[idx]);
- }
- }
- IAction[] allFilterStringRefActions = new IAction[childActions.size()];
- for (int idx=0; idx<childActions.size(); idx++)
- allFilterStringRefActions[idx] = (IAction)childActions.elementAt(idx);
-
- return allFilterStringRefActions;
- }*/
-
- /*
- * Overridable entry for child classes to contribute filter string refernce actions beyond the
- * default supplied actions.
- * <p>
- * By default, this returns null.
- * @param selectedFilterStringRef the currently selected filter string reference
- * @param shell parent shell of viewer where the popup menu is being constructed
- * @return Vector of IAction objects.
- *
- protected Vector getAdditionalFilterStringReferenceActions(SystemFilterStringReference selectedFilterStringRef, Shell shell)
- {
- return null;
- }*/
-
- // -------------------------
- // SERVER LAUNCH SUPPORT ...
- // -------------------------
-
- /**
- * Return the form used in the property page, etc for this server launcher.
- * Only called if {@link #supportsServerLaunchProperties()} returns true.
- * <p>
- * We return {@link org.eclipse.rse.ui.widgets.ServerLauncherForm}.
- * Override if appropriate.
- */
- public IServerLauncherForm getServerLauncherForm(ISubSystemConfiguration factory, Shell shell, ISystemMessageLine msgLine)
- {
- return new RemoteServerLauncherForm(shell, msgLine);
- }
-
- /**
- * Called by SystemRegistry's renameSystemProfile method to ensure we update our
- * filter pool manager names (and their folders)
- * <p>
- * Must be called AFTER changing the profile's name!!
- */
- public void renameSubSystemProfile(ISubSystemConfiguration factory, String oldProfileName, String 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.
- {
- // Rename the default filter pool for this profile, as it's name is derived from the profile.
- ISystemFilterPool defaultPoolForThisProfile = factory.getDefaultFilterPool(profile, oldProfileName);
- if (defaultPoolForThisProfile != null)
- try
- {
- factory.getFilterPoolManager(profile).renameSystemFilterPool(defaultPoolForThisProfile, SubSystemConfiguration.getDefaultFilterPoolName(newProfileName, factory.getId()));
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Unexpected error renaming default filter pool " + SubSystemConfiguration.getDefaultFilterPoolName(newProfileName, factory.getId()), exc); //$NON-NLS-1$
- System.out.println("Unexpected error renaming default filter pool " + SubSystemConfiguration.getDefaultFilterPoolName(newProfileName, factory.getId()) + ": " + exc); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- /**
- * Return the validator for the password which is prompted for at runtime.
- * Returns null by default.
- */
- public ISystemValidator getPasswordValidator(ISubSystemConfiguration configuration)
- {
- return null;
- }
- /**
- * Return the validator for the port.
- * A default is supplied.
- * This must be castable to ICellEditorValidator for the property sheet support.
- */
- public ISystemValidator getPortValidator(ISubSystemConfiguration configuration)
- {
- ISystemValidator portValidator = new ValidatorPortInput();
- return portValidator;
- }
-
-
-
- public PropertyPage getPropertyPage(ISubSystem subsystem, Composite parent) {
- return ((SubSystem)subsystem).getPropertyPage(parent);
- }
-
-
- public ISystemValidator getUserIdValidator(ISubSystemConfiguration config) {
- return ((SubSystemConfiguration)config).getUserIdValidator();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 37651c43b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,59 +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.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-
-
-public class SubSystemConfigurationAdapterFactory implements IAdapterFactory
-{
-
- private ISubSystemConfigurationAdapter ssFactoryAdapter = new SubSystemConfigurationAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISubSystemConfigurationAdapter.class};
- }
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, ISubSystemConfiguration.class);
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof ISubSystemConfiguration)
- adapter = ssFactoryAdapter;
-
- return adapter;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 11df1ea55..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAbstractAPIProvider.java
+++ /dev/null
@@ -1,215 +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.view;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * This is a base class that a provider of root nodes to the remote systems tree viewer part can
- * use as a parent class.
- */
-public abstract class SystemAbstractAPIProvider
- implements ISystemViewInputProvider
-{
-
-
- protected Shell shell;
- protected Viewer viewer;
- protected ISystemRegistry sr;
-
- protected Object[] emptyList = new Object[0];
- protected Object[] msgList = new Object[1];
- protected SystemMessageObject nullObject = null;
- protected SystemMessageObject canceledObject = null;
- protected SystemMessageObject errorObject = null;
-
-
- /**
- * Constructor
- */
- public SystemAbstractAPIProvider()
- {
- super();
- sr = RSEUIPlugin.getTheSystemRegistry();
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Set the shell in case it is needed for anything.
- * The label and content provider will call this.
- */
- public void setShell(Shell shell)
- {
- this.shell = shell;
- }
-
- /**
- * Return the shell of the current viewer
- */
- public Shell getShell()
- {
- return shell;
- }
-
- /**
- * Set the viewer in case it is needed for anything.
- * The label and content provider will call this.
- */
- public void setViewer(Viewer viewer)
- {
- this.viewer = viewer;
- }
-
- /**
- * Return the viewer we are currently associated with
- */
- public Viewer getViewer()
- {
- return viewer;
- }
-
- /**
- * Return true to show the action bar (ie, toolbar) above the viewer.
- * The action bar contains connection actions, predominantly.
- * We return false
- */
- public boolean showActionBar()
- {
- return false;
- }
-
- /**
- * Return true to show the button bar above the viewer.
- * The tool bar contains "Get List" and "Refresh" buttons and is typically
- * shown in dialogs that list only remote system objects.
- * We return false.
- */
- public boolean showButtonBar()
- {
- return false;
- }
-
- /**
- * Return true to show right-click popup actions on objects in the tree.
- * We return false.
- */
- public boolean showActions()
- {
- return false;
- }
-
- private void initMsgObjects()
- {
- 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);
- }
-
- /**
- * In getChildren, return checkForNull(children, true/false) vs your array directly.
- * This method checks for a null array which not allow and replaces it with an empty array.
- * If true is passed then it returns the "Empty list" message object if the array is null or empty
- */
- protected Object[] checkForNull(Object[] children, boolean returnNullMsg)
- {
- if ((children == null) || (children.length==0))
- {
- if (!returnNullMsg)
- return emptyList;
- else
- {
- if (nullObject == null)
- initMsgObjects();
- msgList[0] = nullObject;
- return msgList;
- }
- }
- else
- return children;
- }
-
- /**
- * Return the "Operation cancelled by user" msg as an object array so can be used to answer getChildren()
- */
- protected Object[] getCancelledMessageObject()
- {
- if (canceledObject == null)
- initMsgObjects();
- msgList[0] = canceledObject;
- return msgList;
- }
-
- /**
- * Return the "Operation failed" msg as an object array so can be used to answer getChildren()
- */
- protected Object[] getFailedMessageObject()
- {
- if (errorObject == null)
- initMsgObjects();
- msgList[0] = errorObject;
- return msgList;
- }
-
- /**
- * Return true if we are listing connections or not, so we know whether we are interested in
- * connection-add events
- */
- public boolean showingConnections()
- {
- return false;
- }
-
- // ------------------
- // HELPER METHODS...
- // ------------------
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemActionViewerFilter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemActionViewerFilter.java
deleted file mode 100644
index 8935025cf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemActionViewerFilter.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-
-/**
- * This class is a viewer filter that tests attributes of thise
- */
-public class SystemActionViewerFilter extends ViewerFilter {
-
- /**
- * Inner class representing a filter criterion.
- */
- private class FilterCriterion {
-
- private String name;
- private String value;
-
- /**
- * Constructor.
- * @param name the name.
- * @param value the value.
- */
- private FilterCriterion(String name, String value) {
- this.name = name;
- this.value = value;
- }
-
- /**
- * Returns the name.
- * @return the name.
- */
- private String getName() {
- return name;
- }
-
- /**
- * Returns the value.
- * @return the value.
- */
- private String getValue() {
- return value;
- }
- }
-
- // list to hold filter criteria for each object type
- private HashMap map;
-
- /**
- * Constructor.
- */
- public SystemActionViewerFilter() {
- super();
- map = new HashMap();
- }
-
- /**
- * Adds a filter criterion.
- * @param objectTypes object types that the filter criterion applies to.
- * @param name the name.
- * @param value the value.
- */
- public void addFilterCriterion(Class[] objectTypes, String name, String value) {
- FilterCriterion criterion = new FilterCriterion(name, value);
-
- // go through each object type
- for (int i = 0; i < objectTypes.length; i++) {
- Class type = objectTypes[i];
-
- List criteria = null;
-
- // we do not have object type, so add it
- if (!map.containsKey(type)) {
- criteria = new ArrayList();
- }
- // we already have object type, so get its list of criteria
- else {
- criteria = (List)(map.get(type));
- }
-
- // add criterion to list
- criteria.add(criterion);
-
- // put type and list of criteria in map
- map.put(type, criteria);
- }
- }
-
- /**
- * Removes all criteria.
- */
- public void removeAllCriterion() {
- map.clear();
- }
-
- /**
- * Checks if the object is an instance of any of the types in our list, and returns the
- * type for which the object is an instance.
- * @param obj the object.
- * @return the type for which the object is an instance, or <code>null</code> if no type was
- * found.
- */
- private Class isInstance(Object obj) {
-
- // get set of types
- Set keySet = map.keySet();
-
- // get the iterator
- Iterator iter = keySet.iterator();
-
- // go through iterator
- while (iter.hasNext()) {
- Class objType = (Class)(iter.next());
-
- // check if object is an instance of the object type
- if (objType.isInstance(obj)) {
- return objType;
- }
- }
-
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
-
- // check if the object is an instance of one of the object types we want to filter
- Class objType = isInstance(element);
-
- // no object type found, so let it through
- if (objType == null) {
- return true;
- }
-
- ISystemViewElementAdapter adapter = null;
-
- // get adapter
- if (element instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable)element;
-
- adapter = (ISystemViewElementAdapter)(adaptable.getAdapter(ISystemViewElementAdapter.class));
-
- // get list of criteria
- List criteria = (List)(map.get(objType));
-
- // get iterator
- Iterator iter = criteria.iterator();
-
- // go through list of criterion, make sure one of them matches
- while (iter.hasNext()) {
- FilterCriterion criterion = (FilterCriterion)(iter.next());
-
- boolean testResult = adapter.testAttribute(element, criterion.getName(), criterion.getValue());
-
- if (testResult) {
- return true;
- }
- }
-
- return false;
- }
-
- return true;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemComboBoxCellEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemComboBoxCellEditor.java
deleted file mode 100644
index add173b21..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemComboBoxCellEditor.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.view;
-import java.text.MessageFormat;
-
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * A slight variation of the Eclipse-supplied ComboBoxCellEditor class,
- * which allows the input array to be changed dynamically.
- * <p>
- * A cell editor that presents a list of items in a combo box.
- * The cell editor's value is the zero-based index of the selected
- * item.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- * </p>
- */
-public class SystemComboBoxCellEditor extends CellEditor
-{
- private boolean readOnly = false;
- /**
- * The list of items to present in the combo box.
- */
- private String[] items;
-
- /**
- * The zero-based index of the selected item.
- */
- private int selection;
-
- /**
- * The custom combo box control.
- */
- private CCombo comboBox;
- /**
- * Creates a new cell editor with a combo containing the given
- * list of choices and parented under the given control. The cell
- * editor value is the zero-based index of the selected item.
- * Initially, the cell editor has no cell validator and
- * the first item in the list is selected.
- *
- * @param parent the parent control
- * @param items the list of strings for the combo box
- */
- public SystemComboBoxCellEditor(Composite parent, String[] items)
- {
- super(parent);
- selection = 0;
- if (items != null)
- setItems(items);
- else
- setValueValid(true);
- }
- /**
- * Creates a new cell editor with a combo containing the given
- * list of choices and parented under the given control. The cell
- * editor value is the zero-based index of the selected item.
- * Initially, the cell editor has no cell validator and
- * the first item in the list is selected.
- *
- * @param parent the parent control
- * //@param whether or not this is readonly
- */
- //public SystemComboBoxCellEditor(Composite parent, boolean readOnly)
- public SystemComboBoxCellEditor(Composite parent)
- {
- super(parent);
- selection = 0;
- //this.readOnly = readOnly;
- setValueValid(true);
- }
- /**
- * Change the input items
- */
- public void setItems(String[] items)
- {
- this.items = items;
- populateComboBoxItems();
- setValueValid(true);
- }
- /* (non-Javadoc)
- * Method declared on CellEditor.
- */
- protected Control createControl(Composite parent)
- {
- if (!readOnly)
- comboBox = new CCombo(parent, SWT.NONE);
- else
- comboBox = new CCombo(parent, SWT.READ_ONLY);
- comboBox.setFont(parent.getFont());
-
- comboBox.addKeyListener(new KeyAdapter() {
- public void keyReleased(KeyEvent e) {
- keyReleaseOccured(e);
- }
- });
-
- comboBox.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
-
- // DKM - only process this when there is a selection change
- // fix for defect 138324
- if (selection == comboBox.getSelectionIndex() && comboBox.getText().equals(comboBox.getItem(comboBox.getSelectionIndex())))
- return; // no change
-
- // must set the selection before getting value
- selection = comboBox.getSelectionIndex();
- Object newValue = doGetValue();
-
-
- boolean newValidState = isCorrect(newValue);
- if (newValidState) {
- doSetValue(newValue);
- } else {
- // try to insert the current value into the error message.
- setErrorMessage(
- MessageFormat.format(getErrorMessage(), new Object[] {items[selection]}));
- }
- fireApplyEditorValue();
- }
- });
-
- comboBox.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) {
- e.doit = false;
- }
- }
- });
-
- return comboBox;
- }
- /**
- * The <code>ComboBoxCellEditor</code> implementation of
- * this <code>CellEditor</code> framework method returns
- * the zero-based index of the current selection.
- *
- * @return the zero-based index of the current selection wrapped
- * as an <code>Integer</code>
- */
- protected Object doGetValue()
- {
- return new Integer(selection);
- }
- /* (non-Javadoc)
- * Method declared on CellEditor.
- */
- protected void doSetFocus()
- {
- comboBox.setFocus();
- }
- /**
- * The <code>ComboBoxCellEditor</code> implementation of
- * this <code>CellEditor</code> framework method
- * accepts a zero-based index of a selection.
- *
- * @param value the zero-based index of the selection wrapped
- * as an <code>Integer</code>
- */
- protected void doSetValue(Object value)
- {
- if (!(value instanceof Integer))
- {
- String[] items = comboBox.getItems();
- for (int i = 0; i < items.length; i++)
- {
- String item = items[i];
- if (item.equals(value))
- {
- selection = i;
- }
- }
- return;
- }
-
- //Assert.isTrue(comboBox != null && (value instanceof Integer));
- int newselection = ((Integer) value).intValue();
- if (newselection != selection)
- {
- selection = newselection;
- }
- String curText = comboBox.getText();
- if (!comboBox.getItem(selection).equals(curText))
- {
- comboBox.select(selection);
- }
- }
- /**
- * Add the items to the combo box.
- */
- private void populateComboBoxItems()
- {
- if (comboBox != null && items != null)
- {
- comboBox.removeAll();
- for (int i = 0; i < items.length; i++)
- comboBox.add(items[i], i);
- setValueValid(true);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemComboBoxPropertyDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemComboBoxPropertyDescriptor.java
deleted file mode 100644
index eb06f625e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemComboBoxPropertyDescriptor.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.view;
-
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-/**
- * A variation of the Eclipse-supplied ComboBoxPropertyDescriptor for
- * displaying properties are a list. This list will be different for each
- * selected object, hence we need the ability to change that list as each
- * object is selected.
- */
-public class SystemComboBoxPropertyDescriptor
- extends PropertyDescriptor
-{
- private SystemComboBoxCellEditor editor;
-
- /**
- * The list of possible values to display in the combo box
- */
- protected String[] values;
- /**
- * Creates an property descriptor with the given id, display name, and list
- * of value labels to display in the combo box cell editor.
- *
- * @param id the id of the property
- * @param displayName the name to display for the property
- * @param valuesArray the list of possible values to display in the combo box
- */
- public SystemComboBoxPropertyDescriptor(Object id, String displayName, String[] valuesArray)
- {
- super(id, displayName);
- values = valuesArray;
- }
- /**
- * Creates an property descriptor with the given id, display name, but no list.
- * You must call setValues.
- *
- * @param id the id of the property
- * @param displayName the name to display for the property
- */
- public SystemComboBoxPropertyDescriptor(Object id, String displayName)
- {
- super(id, displayName);
- }
- /**
- * The <code>ComboBoxPropertyDescriptor</code> implementation of this
- * <code>IPropertyDescriptor</code> method creates and returns a new
- * <code>ComboBoxCellEditor</code>.
- * <p>
- * The editor is configured with the current validator if there is one.
- * </p>
- */
- public CellEditor createPropertyEditor(Composite parent)
- {
- //editor = new SystemComboBoxCellEditor(parent, false); // last parm = readonly
- editor = new SystemComboBoxCellEditor(parent);
- editor.setItems(values);
- if (getValidator() != null)
- editor.setValidator(getValidator());
- return editor;
- }
- /**
- * Set the values to display in the list.
- */
- public void setValues(String[] values)
- {
- this.values = values;
- if (editor != null)
- editor.setItems(values);
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 08fc7f0b1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDNDTransferRunnable.java
+++ /dev/null
@@ -1,704 +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.view;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemRemoteResourceSet;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.progress.UIJob;
-
-
-/**
- * Runnable to perform actual transfer operation.
- *
- */
-public class SystemDNDTransferRunnable extends Job
-{
-
- public static final int SRC_TYPE_RSE_RESOURCE = 0;
- public static final int SRC_TYPE_ECLIPSE_RESOURCE = 1;
- public static final int SRC_TYPE_OS_RESOURCE = 2;
- public static final int SRC_TYPE_TEXT = 3;
- public static final int SRC_TYPE_UNKNOWN = 4;
-
- private List _srcObjects;
- private List _resultSrcObjects;
- private List _resultTgtObjects;
- private List _setList;
-
-
- private Object _currentTarget;
- private int _sourceType;
- private Viewer _originatingViewer;
- private boolean _ok;
-
- public SystemDNDTransferRunnable(Object target, ArrayList srcObjects, Viewer originatingViewer, int sourceType)
- {
- super(GenericMessages.TransferOperation_message);
- _srcObjects = srcObjects;
- _currentTarget = target;
- _sourceType = sourceType;
- _originatingViewer = originatingViewer;
- _resultSrcObjects = new ArrayList(_srcObjects.size());
- _resultTgtObjects = new ArrayList();
- _setList = new ArrayList();
- this.setUser(true);
- }
-
- protected SystemRemoteResourceSet getSetFor(ISubSystem subSystem, ISystemDragDropAdapter adapter)
- {
- for (int i = 0; i < _setList.size(); i++)
- {
- SystemRemoteResourceSet set = (SystemRemoteResourceSet)_setList.get(i);
- if (set.getAdapter() == adapter && set.getSubSystem() == subSystem)
- {
- return set;
- }
- }
-
- // no existing set - create one
- SystemRemoteResourceSet newSet = new SystemRemoteResourceSet(subSystem, adapter);
- _setList.add(newSet);
- return newSet;
- }
-
- protected boolean transferRSEResources(IProgressMonitor monitor, Object target, ISubSystem targetSubSystem, ISystemDragDropAdapter targetAdapter)
- {
-
-
- // transfer local artificts and categorize remote objects
- for (int i = 0; i < _srcObjects.size() && _ok; i++)
- {
- Object srcObject = _srcObjects.get(i);
- _resultSrcObjects.add(srcObject);
-
- if (srcObject instanceof SystemMessage)
- {
- operationFailed(monitor);
- showErrorMessage((SystemMessage) srcObject);
- return _ok;
- }
- else if (srcObject != null)
- {
- ISystemDragDropAdapter srcAdapter = (ISystemDragDropAdapter) ((IAdaptable) srcObject).getAdapter(ISystemDragDropAdapter.class);
-
- if (srcAdapter != null)
- {
- if (srcObject instanceof IHost)
- {
- Object tempObject = srcAdapter.doDrag(srcObject, false, monitor);
- if (targetAdapter.validateDrop(tempObject, target, false))
- {
- targetAdapter.doDrop(tempObject, target, false, false, _sourceType, monitor);
- _resultTgtObjects.add(tempObject);
- }
- }
- else
- {
- ISubSystem srcSubSystem = srcAdapter.getSubSystem(srcObject);
- if (srcSubSystem.isConnected() ||
- srcObject instanceof ISystemFilterReference ||
- srcObject instanceof ISubSystem)
- {
- SystemRemoteResourceSet set = getSetFor(srcSubSystem, srcAdapter);
- set.addResource(srcObject);
- }
- }
- }
- }
- }
-
- String targetPath = targetAdapter.getAbsoluteName(target);
- boolean sameSubSystemType = true;
- String targetType = ""; //$NON-NLS-1$
- if (targetSubSystem != null)
- {
- targetType = targetSubSystem.getName();
- }
-
- // now we have things divided into sets
- // transfer 1 set at a time
- for (int s = 0; s < _setList.size(); s++)
- {
- SystemRemoteResourceSet set = (SystemRemoteResourceSet)_setList.get(s);
-
-
-
-
- ISubSystem srcSubSystem = set.getSubSystem();
- ISystemDragDropAdapter srcAdapter = set.getAdapter();
-
- String srcType = srcSubSystem.getName();
- sameSubSystemType = targetType.equals(srcType);
-
- if (!sameSubSystemType && targetSubSystem != null)
- {
- ISystemResourceSet tempObjects = srcAdapter.doDrag(set, monitor);
-
- if (tempObjects == null)
- {
- // drag failed
- operationFailed(monitor);
- showInvalidTransferMessage(set, targetPath);
- }
- else if (tempObjects.hasMessage())
- {
- operationFailed(monitor);
- showErrorMessage(tempObjects.getMessage());
- }
- else
- {
- if (targetAdapter.validateDrop(tempObjects, target, (targetSubSystem == srcSubSystem)))
- {
- // special case for filters
- if (target instanceof ISystemFilterReference)
- {
- ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
- if (factory.supportsDropInFilters())
- {
- target = targetSubSystem.getTargetForFilter((ISystemFilterReference)target);
- targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
- }
- }
-
-
- ISystemResourceSet droppedObjects = targetAdapter.doDrop(tempObjects, target, sameSubSystemType, (targetSubSystem == srcSubSystem), _sourceType, monitor);
- if (droppedObjects == null)
- {
- operationFailed(monitor);
- }
- else if (droppedObjects.hasMessage())
- {
- operationFailed(monitor);
- showErrorMessage(droppedObjects.getMessage());
- }
- else
- {
- List results = droppedObjects.getResourceSet();
- for (int d = 0; d < results.size(); d++)
- {
- _resultTgtObjects.add(results.get(d));
- }
- }
- }
- else
- {
- // invalid drop
- operationFailed(monitor);
- showInvalidTransferMessage(set, targetPath);
- }
- }
- }
- else
- {
- // special case for filters
- if (target instanceof ISystemFilterReference)
- {
- ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
- if (factory.supportsDropInFilters())
- {
- target = targetSubSystem.getTargetForFilter((ISystemFilterReference)target);
- targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
-
- }
- }
- if (targetAdapter.validateDrop(set, target, (targetSubSystem == srcSubSystem)))
- {
-
- ISystemResourceSet droppedObjects = targetAdapter.doDrop(set, target, sameSubSystemType, (targetSubSystem == srcSubSystem), _sourceType, monitor);
- if (droppedObjects == null)
- {
- operationFailed(monitor);
- }
- else if (droppedObjects.hasMessage())
- {
- operationFailed(monitor);
- showErrorMessage(droppedObjects.getMessage());
- }
- else
- {
- List results = droppedObjects.getResourceSet();
- for (int d = 0; d < results.size(); d++)
- {
- _resultTgtObjects.add(results.get(d));
- }
- }
- }
- else
- {
- // invalid drop
- operationFailed(monitor);
- showInvalidTransferMessage(set, targetPath);
- }
- }
- }
-
- return _ok;
- }
-
- protected boolean transferRSEResourcesToEclipseResource(IProgressMonitor monitor, IResource target, ISubSystem targetSubSystem)
- {
- for (int i = 0; i < _srcObjects.size() && _ok; i++)
- {
- Object srcObject = _srcObjects.get(i);
-
- _resultSrcObjects.add(srcObject);
-
- if (srcObject instanceof SystemMessage)
- {
- operationFailed(monitor);
- showErrorMessage((SystemMessage) srcObject);
- }
- else if (srcObject != null)
- {
- ISystemDragDropAdapter srcAdapter = (ISystemDragDropAdapter) ((IAdaptable) srcObject).getAdapter(ISystemDragDropAdapter.class);
- Object tempFile = srcAdapter.doDrag(srcObject, true, monitor);
- if (tempFile instanceof IResource)
- {
- IResource res = (IResource)tempFile;
- try
- {
- IPath destPath = target.getFullPath();
- destPath = destPath.append(res.getName());
- res.copy(destPath, false, monitor);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
-
- return true;
- }
-
- protected boolean transferNonRSEResources(IProgressMonitor monitor, Object target, ISubSystem targetSubSystem, ISystemDragDropAdapter targetAdapter)
- {
-
- for (int i = 0; i < _srcObjects.size() && _ok; i++)
- {
- Object srcObject = _srcObjects.get(i);
-
- _resultSrcObjects.add(srcObject);
-
- if (srcObject instanceof SystemMessage)
- {
- operationFailed(monitor);
- showErrorMessage((SystemMessage) srcObject);
- }
- else if (srcObject != null)
- {
-
-
- // special case for filters
- if (target instanceof ISystemFilterReference)
- {
-
- ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
- if (factory.supportsDropInFilters() && factory.providesCustomDropInFilters())
- {
- ((ISystemFilterReference)target).markStale(true);
-
- target = targetSubSystem.getTargetForFilter((ISystemFilterReference)target);
- targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
-
- }
- }
-
- if (_sourceType == SRC_TYPE_ECLIPSE_RESOURCE)
- {
-
- if (srcObject instanceof IResource)
- {
- // Eclipse resource transfer
- IResource resource = (IResource) srcObject;
- Object droppedObject = targetAdapter.doDrop(resource, target, false, false, _sourceType, monitor);
- if (droppedObject == null)
- operationFailed(monitor);
- else
- _resultTgtObjects.add(droppedObject);
- }
- }
- else if (_sourceType == SRC_TYPE_OS_RESOURCE)
- {
- if (srcObject instanceof String)
- {
- // non-Eclipse file transfer
- String file = (String) srcObject;
-
- Object droppedObject = targetAdapter.doDrop(file, target, false, false, _sourceType, monitor);
- if (droppedObject == null)
- operationFailed(monitor);
- else
- _resultTgtObjects.add(droppedObject);
- }
- }
- else if (_sourceType == SRC_TYPE_TEXT)
- {
- if (srcObject instanceof String)
- {
- String text = (String) srcObject;
- Object droppedObject = targetAdapter.doDrop(text, target, false, false, _sourceType, monitor);
- if (droppedObject == null)
- operationFailed(monitor);
- else
- _resultTgtObjects.add(droppedObject);
- }
- }
- else if (_sourceType == SRC_TYPE_RSE_RESOURCE)
- {
- ISystemDragDropAdapter srcAdapter = (ISystemDragDropAdapter) ((IAdaptable) srcObject).getAdapter(ISystemDragDropAdapter.class);
-
- if (srcAdapter != null)
- {
- if (srcObject instanceof IHost)
- {
- Object tempObject = srcAdapter.doDrag(srcObject, false, monitor);
- if (targetAdapter.validateDrop(tempObject, target, false))
- {
- targetAdapter.doDrop(tempObject, target, false, false, _sourceType, monitor);
- _resultTgtObjects.add(tempObject);
- }
- }
- else
- {
- ISubSystem srcSubSystem = srcAdapter.getSubSystem(srcObject);
-
- if (srcSubSystem.isConnected() ||
- srcObject instanceof ISystemFilterReference ||
- srcObject instanceof ISubSystem)
- {
- String srcType = srcSubSystem.getName();
- String srcPath = srcAdapter.getAbsoluteName(srcObject);
- String targetPath = targetAdapter.getAbsoluteName(target);
- boolean sameSubSystemType = true;
- if (targetSubSystem != null)
- {
- String targetType = targetSubSystem.getName();
- sameSubSystemType = targetType.equals(srcType);
- }
-
- if (!sameSubSystemType)
- {
- Object tempObject = srcAdapter.doDrag(srcObject, sameSubSystemType, monitor);
- if (tempObject == null)
- {
- // drag failed
- operationFailed(monitor);
- showInvalidTransferMessage(srcPath, targetPath);
- }
- else if (tempObject instanceof SystemMessage)
- {
- operationFailed(monitor);
- showErrorMessage((SystemMessage) tempObject);
- }
- else
- {
-
- if (targetAdapter.validateDrop(tempObject, target, (targetSubSystem == srcSubSystem)))
- {
- // special case for filters
- if (target instanceof ISystemFilterReference)
- {
- ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
- if (factory.supportsDropInFilters() && factory.providesCustomDropInFilters())
- {
- target = targetSubSystem.getTargetForFilter((ISystemFilterReference)target);
- targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
-
- }
- }
-
- Object droppedObject = targetAdapter.doDrop(tempObject, target, sameSubSystemType, (targetSubSystem == srcSubSystem), _sourceType, monitor);
- if (droppedObject == null)
- {
- operationFailed(monitor);
- }
- else if (droppedObject instanceof SystemMessage)
- {
- operationFailed(monitor);
- showErrorMessage((SystemMessage) droppedObject);
- }
- else
- _resultTgtObjects.add(droppedObject);
- }
- else
- {
- // invalid drop
- operationFailed(monitor);
- showInvalidTransferMessage(srcPath, targetPath);
- }
- }
- }
- else if (srcObject != target && !srcPath.equals(targetPath))
- {
- // special case for filters
-
- if (target instanceof ISystemFilterReference)
- {
- ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
- if (factory.supportsDropInFilters() && factory.providesCustomDropInFilters())
- {
- target = targetSubSystem.getTargetForFilter((ISystemFilterReference)target);
- targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
-
- }
- }
- if (targetAdapter.validateDrop(srcObject, target, (targetSubSystem == srcSubSystem)))
- {
-
- Object droppedObject = targetAdapter.doDrop(srcObject, target, sameSubSystemType, (targetSubSystem == srcSubSystem), _sourceType, monitor);
- if (droppedObject == null)
- {
- operationFailed(monitor);
- }
- else if (droppedObject instanceof SystemMessage)
- {
- operationFailed(monitor);
- showErrorMessage((SystemMessage) droppedObject);
- }
- else
- _resultTgtObjects.add(droppedObject);
- }
- else
- {
- // invalid drop
- operationFailed(monitor);
- showInvalidTransferMessage(srcPath, targetPath);
- }
- }
- else
- {
- // can't drop src onto itself
- // invalid drop
- operationFailed(monitor);
- showInvalidTransferMessage(srcPath, targetPath);
- }
- }
- }
- }
- }
- }
- if (monitor != null && monitor.isCanceled())
- {
- _ok = false;
- return _ok;
- }
- }
-
-
- return true;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
-
- _ok = true;
-
- Object target = _currentTarget;
- ISubSystem targetSubSystem = null;
- //boolean expandFolder = false;
-
-
- if (target instanceof IAdaptable)
- {
- ISystemDragDropAdapter targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
-
- if (targetAdapter != null)
- {
- targetSubSystem = targetAdapter.getSubSystem(target);
-
- if (targetSubSystem != null && !targetSubSystem.isConnected())
- {
- try
- {
- targetSubSystem.connect();
- }
- catch (Exception e)
- {
- }
- }
-
- SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYGENERIC_PROGRESS);
- if (monitor != null)
- monitor.beginTask(copyMessage.getLevelOneText(), IProgressMonitor.UNKNOWN);
-
- if (_sourceType == SRC_TYPE_RSE_RESOURCE)
- {
- transferRSEResources(monitor, target, targetSubSystem, targetAdapter);
- }
- else
- {
- transferNonRSEResources(monitor, target, targetSubSystem, targetAdapter);
- }
- }
- else if (target instanceof IResource)
- {
- transferRSEResourcesToEclipseResource(monitor, (IResource)target, targetSubSystem);
- }
- }
-
- // fire refresh for target
- if (_ok && monitor != null) // I added this test: phil
- {
- monitor.done();
- }
-
-
- if (target != null && target instanceof ISystemContainer)
- {
- ((ISystemContainer)target).markStale(true);
- }
-
- RefreshJob refresh = new RefreshJob(target, targetSubSystem);
- refresh.schedule();
- return Status.OK_STATUS;
- }
-
- public class RefreshJob extends UIJob
- {
- private Object _target;
- private ISubSystem _targetSubSystem;
- public RefreshJob(Object target, ISubSystem targetSubSystem)
- {
- super("Refresh"); //$NON-NLS-1$
- _target = target;
- _targetSubSystem = targetSubSystem;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- if (_resultTgtObjects.size() > 0)
- {
- boolean doRefresh = _ok;
- for (int t = 0; t < _resultTgtObjects.size() && t < _resultSrcObjects.size(); t++)
- {
- Object tgt = _resultTgtObjects.get(t);
- Object src = _resultSrcObjects.get(t);
- if (tgt == src || tgt == null)
- {
- doRefresh = false;
- }
- else
- {
- doRefresh = true;
- }
- }
-
- if (_originatingViewer instanceof TreeViewer)
- {
- try
- {
- TreeViewer viewer = (TreeViewer) _originatingViewer;
- viewer.setExpandedState(_target, true);
- }
- catch (Exception e)
- {
-
- }
- }
-
- if (doRefresh)
- {
- registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, _resultTgtObjects, _target, _targetSubSystem, null, _originatingViewer);
- }
- }
- registry.fireEvent(new SystemResourceChangeEvent(_target, ISystemResourceChangeEvents.EVENT_REFRESH, _target));
- return Status.OK_STATUS;
- }
- }
-
- private void operationFailed(IProgressMonitor monitor)
- {
-
- _ok = false;
- if (monitor != null)
- monitor.done();
- }
-
- private void showInvalidTransferMessage(String srcPath, String targetPath)
- {
- SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_TRANSFER_INVALID);
- errorMessage.makeSubstitution(srcPath, targetPath);
- showErrorMessage(errorMessage);
- }
-
- private void showInvalidTransferMessage(ISystemResourceSet resourceSet, String targetPath)
- {
- SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_TRANSFER_INVALID);
- errorMessage.makeSubstitution(resourceSet.toString(), targetPath);
- showErrorMessage(errorMessage);
- }
-
- private void showErrorMessage(SystemMessage errorMessage)
- {
- Display.getDefault().asyncExec(new ShowErrorRunnable(errorMessage));
- }
-
- public class ShowErrorRunnable implements Runnable
- {
- SystemMessage _errorMessage;
- public ShowErrorRunnable(SystemMessage errorMessage)
- {
- _errorMessage = errorMessage;
- }
-
- public void run()
- {
- Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
- SystemMessageDialog dlg = new SystemMessageDialog(shell, _errorMessage);
- dlg.open();
- }
-
- }
-
- public boolean dropOkay()
- {
- return _ok;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDecoratingLabelProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDecoratingLabelProvider.java
deleted file mode 100644
index d8aed0a7f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDecoratingLabelProvider.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author mjberger
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class SystemDecoratingLabelProvider extends DecoratingLabelProvider implements ITableLabelProvider
-{
- private ITableLabelProvider _tableLabelProvider;
-
- public SystemDecoratingLabelProvider(ITableLabelProvider provider, ILabelDecorator decorator) {
- super((ILabelProvider)provider, decorator);
- // TODO Auto-generated constructor stub
- _tableLabelProvider = provider;
- }
-
-
- public Image getColumnImage(Object element, int columnIndex)
- {
- if (columnIndex == 0) //TODO: Make this more generic
- {
- return getImage(element);
- }
- return _tableLabelProvider.getColumnImage(element, columnIndex);
- }
-
- public String getColumnText(Object element, int columnIndex)
- {
- if (columnIndex == 0) //TODO: Make this more generic
- {
- return getText(element);
- }
- return _tableLabelProvider.getColumnText(element, columnIndex);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDeferredTableTreeContentManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDeferredTableTreeContentManager.java
deleted file mode 100644
index b09b72d74..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDeferredTableTreeContentManager.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed the initial implementation:
- * David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.progress.DeferredTreeContentManager;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-public class SystemDeferredTableTreeContentManager extends
- DeferredTreeContentManager {
-
- private SystemTableTreeViewProvider _provider;
- private SystemTableTreeView _view;
- public SystemDeferredTableTreeContentManager(SystemTableTreeViewProvider provider, SystemTableTreeView viewer) {
- super(provider, viewer);
- _provider = provider;
- _view = viewer;
- }
-
-
- protected void addChildren(Object parent, Object[] children, IProgressMonitor monitor) {
- super.addChildren(parent, children, monitor);
-
- _provider.setCachedObjects(parent, children);
- IPropertyDescriptor[] descriptors = _view.getUniqueDescriptors();
- if (descriptors == null)
- {
- Display.getDefault().asyncExec(new RelayoutView(parent));
- }
- }
-
-
- public class RelayoutView implements Runnable
- {
- public RelayoutView(Object parent)
- {
- }
-
- public void run()
- {
- _view.computeLayout();
- _view.refresh(true);
- //SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- //registry.fireEvent(new SystemResourceChangeEvent(_parent, ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE, _parent));
- }
- }
-
-
-}
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
deleted file mode 100644
index 4593f3871..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDropActionDelegate.java
+++ /dev/null
@@ -1,276 +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.view;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.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.widgets.Shell;
-import org.eclipse.ui.part.IDropActionDelegate;
-
-
-
-/**
- * This class is used for dropping RSE src objects on known non-RSE targets
- *
- */
-public class SystemDropActionDelegate implements IDropActionDelegate
-{
-
- public static final String ID = "org.eclipse.rse.ui.view.DropActions"; //ID fixed, by Phil //$NON-NLS-1$
-
-
- /** (non-Javadoc)
- * Method declared on IDropActionDelegate
- */
- public boolean run(Object data, Object target)
- {
- String localPath = null;
- IResource resource = null;
-
-
-
-
- if (target instanceof IResource)
- {
- resource = (IResource) target;
- localPath = resource.getLocation().toOSString();
- }
- else if (target instanceof String)
- {
- localPath = (String)target;
- }
- else if (target instanceof IAdaptable)
- {
- Object resourceObj = ((IAdaptable)target).getAdapter(IResource.class);
- if (resourceObj != null && resourceObj instanceof IResource)
- {
- resource = (IResource)resourceObj;
- localPath = resource.getLocation().toOSString();
- }
- }
-
-
- if (localPath != null)
- {
-
- if (data instanceof byte[])
- {
- byte[] result = (byte[]) data;
-
- // get the sources
- //StringTokenizer tokenizer = new StringTokenizer(new String(result), SystemViewDataDropAdapter.RESOURCE_SEPARATOR);
- String[] tokens = (new String(result)).split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR); //$NON-NLS-1$
- ArrayList srcObjects = new ArrayList();
-
- //while (tokenizer.hasMoreTokens())
- for (int i = 0; i <tokens.length; i++)
- {
- String srcStr = tokens[i];
-
- Object srcObject = getObjectFor(srcStr);
- srcObjects.add(srcObject);
- }
-
- SystemDNDTransferRunnable runnable = new SystemDNDTransferRunnable(target, srcObjects, null, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE);
-
- runnable.schedule();
-
- if (resource != null)
- {
- try
- {
- resource.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
- catch (CoreException e)
- {
- }
- }
- RSEUIPlugin.getTheSystemRegistry().clearRunnableContext();
- }
-
- /** FIXME - IREmoteFile is systems.core independent now
- IRemoteFileSubSystem localFS = getLocalFileSubSystem();
- try
- {
- IRemoteFile rsfTarget = localFS.getRemoteFileObject(localPath);
-
- if (data instanceof byte[])
- {
- byte[] result = (byte[]) data;
-
- // get the sources
- //StringTokenizer tokenizer = new StringTokenizer(new String(result), SystemViewDataDropAdapter.RESOURCE_SEPARATOR);
- String[] tokens = (new String(result)).split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR);
- ArrayList srcObjects = new ArrayList();
- ArrayList rulesList = new ArrayList();
- int j = 0;
- //while (tokenizer.hasMoreTokens())
- for (int i = 0; i <tokens.length; i++)
- {
- String srcStr = tokens[i];
-
- Object srcObject = getObjectFor(srcStr);
- srcObjects.add(srcObject);
- if (srcObject instanceof ISchedulingRule)
- {
- rulesList.add(srcObject);
- j++;
- }
- else if (srcObject instanceof IRemoteFile)
- {
- rulesList.add(new RemoteFileSchedulingRule((IRemoteFile)srcObject));
- j++;
- }
- }
- if (resource != null)
- {
- rulesList.add(resource);
- j++;
- }
-
- ISchedulingRule[] rules = (ISchedulingRule[])rulesList.toArray(new ISchedulingRule[rulesList.size()]);
- MultiRule rule = null;
- if (j > 0)
- {
- rule = new MultiRule(rules);
- }
-
- Viewer currentViewer = null; // todo: figure out how to determine the current viewer! Phil
- SystemDNDTransferRunnable runnable = new SystemDNDTransferRunnable(rsfTarget, srcObjects, currentViewer, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE);
-
- runnable.setRule(rule);
-
- runnable.schedule();
-
- if (resource != null)
- {
- try
- {
- resource.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
- catch (CoreException e)
- {
- }
- }
- RSEUIPlugin.getTheSystemRegistry().clearRunnableContext();
- }
- }
- catch (SystemMessageException e)
- {
- }
- **/
- return true;
- }
-
- return false;
- }
- /**
- * Method for decoding an source object ID to the actual source object.
- * We determine the profile, connection and subsystem, and then
- * we use the SubSystem.getObjectWithKey() method to get at the
- * object.
- *
- */
- private Object getObjectFor(String str)
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- // first extract subsystem id
- int connectionDelim = str.indexOf(":"); //$NON-NLS-1$
- if (connectionDelim == -1) // not subsystem, therefore likely to be a connection
- {
- int profileDelim = str.indexOf("."); //$NON-NLS-1$
- if (profileDelim != -1)
- {
- String profileId = str.substring(0, profileDelim);
- String connectionId = str.substring(profileDelim + 1, str.length());
- ISystemProfile profile = registry.getSystemProfile(profileId);
- return registry.getHost(profile, connectionId);
- }
- }
-
-
- int subsystemDelim = str.indexOf(":", connectionDelim + 1); //$NON-NLS-1$
- if (subsystemDelim == -1) // not remote object, therefore likely to be a subsystem
- {
- return registry.getSubSystem(str);
- }
- else
- {
- String subSystemId = str.substring(0, subsystemDelim);
- String srcKey = str.substring(subsystemDelim + 1, str.length());
-
-
- ISubSystem subSystem = registry.getSubSystem(subSystemId);
- if (subSystem != null)
- {
- Object result = null;
- try
- {
- result = subSystem.getObjectWithAbsoluteName(srcKey);
- }
- catch (SystemMessageException e)
- {
- return e.getSystemMessage();
- }
- catch (Exception e)
- {
- }
- if (result != null)
- {
- return result;
- }
- else
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- msg.makeSubstitution(srcKey, subSystem.getHostAliasName());
- return msg;
- }
- }
- else
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND);
- msg.makeSubstitution(subSystemId);
- return msg;
- }
- }
- }
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
-
- irc = new ProgressMonitorDialog(shell);
- 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/SystemEmptyListAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemEmptyListAPIProviderImpl.java
deleted file mode 100644
index 5141a872d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemEmptyListAPIProviderImpl.java
+++ /dev/null
@@ -1,111 +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.view;
-import org.eclipse.rse.core.model.IHost;
-
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is a special-case provider when we want the list to be empty.
- */
-public class SystemEmptyListAPIProviderImpl
- extends SystemAbstractAPIProvider
- implements ISystemViewInputProvider
-{
-
-
- protected Object[] emptyList = new Object[0];
-
- /**
- * Constructor
- */
- public SystemEmptyListAPIProviderImpl()
- {
- super();
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * <p>We return an empty list.
- */
- public Object[] getSystemViewRoots()
- {
- return emptyList;
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return false.
- */
- public boolean hasSystemViewRoots()
- {
- return false;
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- * <p>We return an empty list
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return emptyList; //
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- * <p>we return false
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return false;
- }
-
- /**
- * Return true to show the action bar (ie, toolbar) above the viewer.
- * The action bar contains connection actions, predominantly.
- */
- public boolean showActionBar()
- {
- return false;
- }
- /**
- * Return true to show the button bar above the viewer.
- * The tool bar contains "Get List" and "Refresh" buttons and is typicall
- * shown in dialogs that list only remote system objects.
- */
- public boolean showButtonBar()
- {
- return true;
- }
- /**
- * Return true to show right-click popup actions on objects in the tree.
- */
- public boolean showActions()
- {
- return false;
- }
-
-
-
- // ----------------------------------
- // OUR OWN METHODS...
- // ----------------------------------
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritablePropertyData.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritablePropertyData.java
deleted file mode 100644
index 97c6e3fba..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritablePropertyData.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.view;
-import org.eclipse.rse.ui.SystemPropertyResources;
-/**
- * This class captures the data needed to populate a
- * InheritableTextCellEditor.
- */
-public class SystemInheritablePropertyData
-{
- private String localValue=""; //$NON-NLS-1$
- private String inheritedValue=""; //$NON-NLS-1$
- private boolean isLocal;
- private boolean notApplicable = false;
-
- private String inheritedXlatedString;
-
- public SystemInheritablePropertyData()
- {
- super();
- setInheritedDisplayString(SystemPropertyResources.RESID_PROPERTY_INHERITED);
- }
-
- /**
- * Identify this value as "not applicable". This causes
- * this string to be displayed, and prevents users from editing this property.
- */
- public void setNotApplicable(boolean set)
- {
- notApplicable = set;
- }
- /**
- * Get the notApplicable flag. Default is false.
- */
- public boolean getNotApplicable()
- {
- return notApplicable;
- }
-
- /**
- * Gets the localValue
- * @return Returns a String
- */
- public String getLocalValue()
- {
- return localValue;
- }
- /**
- * Sets the localValue
- * @param localValue The localValue to set
- */
- public void setLocalValue(String localValue)
- {
- if (localValue == null)
- localValue = ""; // to prevent equals() from crashing //$NON-NLS-1$
- this.localValue = localValue;
- }
-
- /**
- * Gets the inheritedValue
- * @return Returns a String
- */
- public String getInheritedValue()
- {
- return inheritedValue;
- }
- /**
- * Sets the inheritedValue
- * @param inheritedValue The inheritedValue to set
- */
- public void setInheritedValue(String inheritedValue)
- {
- if (inheritedValue == null)
- inheritedValue = ""; // to prevent equals() from crashing //$NON-NLS-1$
- this.inheritedValue = inheritedValue;
- }
-
-
- /**
- * Gets the isLocal
- * @return Returns a boolean
- */
- public boolean getIsLocal()
- {
- return isLocal;
- }
- /**
- * Sets the isLocal
- * @param isLocal The isLocal to set
- */
- public void setIsLocal(boolean isLocal)
- {
- this.isLocal = isLocal;
- }
-
- /**
- * Set the string to append to the inherited value in display-only mode
- */
- public void setInheritedDisplayString(String s)
- {
- inheritedXlatedString = s;
- }
-
- /**
- * Convert to string for readonly-property sheet value
- */
- public String toString()
- {
- if (notApplicable)
- return SystemPropertyResources.RESID_TERM_NOTAPPLICABLE;
- String value = null;
- if (isLocal)
- value = localValue;
- else
- //value = " (*INHERITED)";
- value = inheritedValue + " " + inheritedXlatedString; //$NON-NLS-1$
- return value;
- }
-
- /**
- * The property sheet viewer will decide to call the adapter back when Enter is pressed,
- * only if the result of calling equals() on the previous and current versions of this
- * object returns false. If we did not have this method, they'd always return true.
- */
- public boolean equals(Object other)
- {
- if (other instanceof SystemInheritablePropertyData)
- {
- SystemInheritablePropertyData otherData = (SystemInheritablePropertyData)other;
- boolean equal =
- ((isLocal == otherData.getIsLocal()) &&
- (localValue.equals(otherData.getLocalValue())) &&
- (inheritedValue.equals(otherData.getInheritedValue())) );
- /*
- System.out.println("inside equals. Result? " + equal + " Local value: " + localValue);
- if (!equal)
- {
- System.out.println("... isLocal.......: " + isLocal + " vs " + otherData.getIsLocal());
- System.out.println("... localValue....: '" + localValue + "' vs '" + otherData.getLocalValue() + "'");
- System.out.println("... inheritedValue: '" + inheritedValue + "' vs " + otherData.getInheritedValue() + "'");
- }
- */
- return equal;
- }
- else
- return super.equals(other);
- }
-
- /**
- * For debugging
- */
- public void printDetails()
- {
- System.out.println("SystemInheritablePropertyData: "); //$NON-NLS-1$
- System.out.println("...localValue = "+localValue); //$NON-NLS-1$
- System.out.println("...inheritedValue = "+inheritedValue); //$NON-NLS-1$
- System.out.println("...isLocal = "+isLocal); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritableTextCellEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritableTextCellEditor.java
deleted file mode 100644
index 757148a7a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritableTextCellEditor.java
+++ /dev/null
@@ -1,517 +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.view;
-import java.text.MessageFormat;
-
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.rse.ui.widgets.InheritableEntryField;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * A cell editor that manages an inheritable text entry field.
- * The cell editor's value is the text string itself.
- */
-public class SystemInheritableTextCellEditor
- //extends DialogCellEditor
- extends CellEditor
- implements SelectionListener
-{
- protected InheritableEntryField textField;
- protected Text text;
- protected SystemInheritablePropertyData data;
- private String toggleButtonToolTipText, entryFieldToolTipText;
-
- private ModifyListener modifyListener;
-
- /**
- * State information for updating action enablement
- */
- private boolean isSelection = false;
- private boolean isDeleteable = false;
- private boolean isSelectable = false;
-
- /**
- * Creates a new text string cell editor parented under the given control.
- * The cell editor value is the string itself, which is initially the empty string.
- * Initially, the cell editor has no cell validator.
- *
- * @param parent the parent control
- */
- public SystemInheritableTextCellEditor(Composite parent)
- {
- super(parent);
- }
- /**
- * Checks to see if the "deleteable" state (can delete/
- * nothing to delete) has changed and if so fire an
- * enablement changed notification.
- */
- private void checkDeleteable()
- {
- boolean oldIsDeleteable = isDeleteable;
- isDeleteable = isDeleteEnabled();
- if (oldIsDeleteable != isDeleteable)
- {
- fireEnablementChanged(DELETE);
- }
- }
-
-
- /**
- * Checks to see if the "selectable" state (can select)
- * has changed and if so fire an enablement changed notification.
- */
- private void checkSelectable()
- {
- boolean oldIsSelectable = isSelectable;
- isSelectable = isSelectAllEnabled();
- if (oldIsSelectable != isSelectable)
- {
- fireEnablementChanged(SELECT_ALL);
- }
- }
- /**
- * Checks to see if the selection state (selection /
- * no selection) has changed and if so fire an
- * enablement changed notification.
- */
- private void checkSelection()
- {
- boolean oldIsSelection = isSelection;
- isSelection = getTextField().getSelectionCount() > 0;
- if (oldIsSelection != isSelection)
- {
- fireEnablementChanged(COPY);
- fireEnablementChanged(CUT);
- }
- }
- /**
- * Return the entry field of the composite control
- */
- private Text getTextField()
- {
- return textField.getTextField();
- }
-
- public InheritableEntryField getInheritableEntryField()
- {
- return textField;
- }
-
- /**
- * Gets the toggleButtonToolTipText
- * @return Returns a String
- */
- public String getToggleButtonToolTipText()
- {
- return toggleButtonToolTipText;
- }
- /**
- * Sets the toggleButtonToolTipText
- * @param toggleButtonToolTipText The toggleButtonToolTipText to set
- */
- public void setToggleButtonToolTipText(String toggleButtonToolTipText)
- {
- this.toggleButtonToolTipText = toggleButtonToolTipText;
- if (textField != null)
- textField.setToggleToolTipText(toggleButtonToolTipText);
- }
-
- /**
- * Gets the entryFieldToolTipText
- * @return Returns a String
- */
- public String getEntryFieldToolTipText()
- {
- return entryFieldToolTipText;
- }
- /**
- * Sets the entryFieldToolTipText
- * @param entryFieldToolTipText The entryFieldToolTipText to set
- */
- public void setEntryFieldToolTipText(String entryFieldToolTipText)
- {
- this.entryFieldToolTipText = entryFieldToolTipText;
- if (textField != null)
- textField.setTextFieldToolTipText(entryFieldToolTipText);
- }
-
- /* (non-Javadoc)
- * Method declared on CellEditor.
- */
- protected Control createControl(Composite parent)
- {
- // specify no borders on text widget as cell outline in
- // table already provides the look of a border.
- textField = new InheritableEntryField(parent, SWT.NULL, SWT.BORDER, SWT.SINGLE);
- textField.setToggleButtonHeight(14);
- textField.setBackground(parent.getBackground());
- textField.addSelectionListener(this);
- if (toggleButtonToolTipText != null)
- textField.setToggleToolTipText(toggleButtonToolTipText);
- if (entryFieldToolTipText != null)
- textField.setTextFieldToolTipText(entryFieldToolTipText);
- text = getTextField();
- text.addKeyListener(new KeyAdapter()
- {
- public void keyPressed(KeyEvent e)
- {
- // The call to inherited keyReleaseOccurred is what causes the apply
- // event if the key pressed is Enter.
- keyReleaseOccured(e);
- // as a result of processing the above call, clients may have
- // disposed this cell editor
- if ((getControl() == null) || getControl().isDisposed())
- return;
- checkSelection(); // see explaination below
- checkDeleteable();
- checkSelectable();
- }
- });
- text.addTraverseListener(new TraverseListener()
- {
- public void keyTraversed(TraverseEvent e)
- {
- if (e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN)
- {
- e.doit = false;
- }
- }
- });
- // We really want a selection listener but it is not supported so we
- // use a key listener and a mouse listener to know when selection changes
- // may have occured
- text.addMouseListener(new MouseAdapter()
- {
- public void mouseUp(MouseEvent e) {
- checkSelection();
- checkDeleteable();
- checkSelectable();
- }
- });
- text.addFocusListener(new FocusAdapter() {
- public void focusGained(FocusEvent e) {
- }
-
- public void focusLost(FocusEvent e) {
- SystemInheritableTextCellEditor.this.focusLost();
- }
- });
- textField.getToggleButton().addFocusListener(new FocusAdapter() {
- public void focusLost(FocusEvent e) {
- SystemInheritableTextCellEditor.this.focusLost();
- }
-
- public void focusGained(FocusEvent e) {
- }
- });
-
- text.setFont(parent.getFont());
- //text.setBackground(parent.getBackground());
- text.setText("");//$NON-NLS-1$
- text.addModifyListener(getModifyListener());
- setValueValid(true);
- return textField;
- }
-
- protected void focusLost()
- {
- super.focusLost();
- }
-
- /**
- * Return current data.
- *
- * @return the SystemInheritablePropertyData data object
- */
- protected Object doGetValue()
- {
- SystemInheritablePropertyData outputData = new SystemInheritablePropertyData();
- outputData.setIsLocal(textField.isLocal());
- outputData.setLocalValue(textField.getLocalText());
- outputData.setInheritedValue(textField.getInheritedText());
- return outputData;
- }
-
-
- /* (non-Javadoc)
- * Method declared on CellEditor.
- */
- protected void doSetFocus()
- {
- if (text != null)
- {
- if (text.isEnabled())
- {
- text.selectAll();
- text.setFocus();
- }
- else
- {
- textField.setToggleButtonFocus();
- }
-
- checkSelection();
- checkDeleteable();
- checkSelectable();
- }
- }
- /**
- * The <code>TextCellEditor</code> implementation of
- * this <code>CellEditor</code> framework method accepts
- * a SystemInheritablePropertyData data object.
- *
- * @param value a SystemInheritablePropertyData object
- */
- protected void doSetValue(Object value)
- {
- Assert.isTrue(text != null && (value instanceof SystemInheritablePropertyData));
- textField.removeModifyListener(getModifyListener());
- data = (SystemInheritablePropertyData)value;
- textField.setLocalText(data.getLocalValue());
- textField.setInheritedText(data.getInheritedValue());
- textField.setLocal(data.getIsLocal());
- textField.addModifyListener(getModifyListener());
- }
- /**
- * Processes a modify event that occurred in this text cell editor.
- * This framework method performs validation and sets the error message
- * accordingly, and then reports a change via <code>fireEditorValueChanged</code>.
- * Subclasses should call this method at appropriate times. Subclasses
- * may extend or reimplement.
- *
- * @param e the SWT modify event
- */
- protected void editOccured(ModifyEvent e)
- {
- String value = text.getText();
- if (value == null)
- value = ""; //$NON-NLS-1$
- Object typedValue = value;
- boolean oldValidState = isValueValid();
- boolean newValidState = isCorrect(typedValue);
- if (!newValidState)
- {
- // try to insert the current value into the error message.
- setErrorMessage(MessageFormat.format(getErrorMessage(), new Object[] {value}));
- }
- valueChanged(oldValidState, newValidState);
- }
- /**
- * Since a text editor field is scrollable we don't
- * set a minimumSize.
- */
- public LayoutData getLayoutData()
- {
- return new LayoutData();
- }
- /**
- * Return the modify listener.
- */
- private ModifyListener getModifyListener()
- {
- if (modifyListener == null)
- {
- modifyListener = new ModifyListener() {
- public void modifyText(ModifyEvent e)
- {
- editOccured(e);
- }
- };
- }
- return modifyListener;
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method returns <code>true</code> if
- * the current selection is not empty.
- */
- public boolean isCopyEnabled()
- {
- if (text == null || text.isDisposed() || !text.isEnabled())
- return false;
- return text.getSelectionCount() > 0;
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method returns <code>true</code> if
- * the current selection is not empty.
- */
- public boolean isCutEnabled()
- {
- if (text == null || text.isDisposed() || !text.isEnabled())
- return false;
- return text.getSelectionCount() > 0;
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method returns <code>true</code>
- * if there is a selection or if the caret is not positioned
- * at the end of the text.
- */
- public boolean isDeleteEnabled()
- {
- if (text == null || text.isDisposed() || !text.isEnabled())
- return false;
- return text.getSelectionCount() > 0 || text.getCaretPosition() < text.getCharCount();
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method always returns <code>true</code>.
- */
- public boolean isPasteEnabled()
- {
- if (text == null || text.isDisposed() || !text.isEnabled())
- return false;
- return true;
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method always returns <code>true</code>.
- */
- public boolean isSaveAllEnabled()
- {
- if (text == null || text.isDisposed() || !text.isEnabled())
- return false;
- return true;
- }
- /**
- * Returns <code>true</code> if this cell editor is
- * able to perform the select all action.
- * <p>
- * This default implementation always returns
- * <code>false</code>.
- * </p>
- * <p>
- * Subclasses may override
- * </p>
- * @return <code>true</code> if select all is possible,
- * <code>false</code> otherwise
- */
- public boolean isSelectAllEnabled()
- {
- if (text == null || text.isDisposed() || !text.isEnabled())
- return false;
- return text.getText().length() > 0;
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method copies the
- * current selection to the clipboard.
- */
- public void performCopy()
- {
- text.copy();
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method cuts the
- * current selection to the clipboard.
- */
- public void performCut()
- {
- text.cut();
- checkSelection();
- checkDeleteable();
- checkSelectable();
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method deletes the
- * current selection or, if there is no selection,
- * the character next character from the current position.
- */
- public void performDelete()
- {
- if (text.getSelectionCount() > 0)
- // remove the contents of the current selection
- text.insert(""); //$NON-NLS-1$
- else
- {
- // remove the next character
- int pos = text.getCaretPosition();
- if (pos < text.getCharCount())
- {
- text.setSelection(pos, pos + 1);
- text.insert(""); //$NON-NLS-1$
- }
- }
- checkSelection();
- checkDeleteable();
- checkSelectable();
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method pastes the
- * the clipboard contents over the current selection.
- */
- public void performPaste()
- {
- text.paste();
- checkSelection();
- checkDeleteable();
- checkSelectable();
- }
- /**
- * The <code>TextCellEditor</code> implementation of this
- * <code>CellEditor</code> method selects all of the
- * current text.
- */
- public void performSelectAll()
- {
- text.selectAll();
- checkSelection();
- checkDeleteable();
- }
-
- // Selection Listener methods for InheritableTextCellEditor toggle switches
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
- public void widgetSelected(SelectionEvent e)
- {
- //System.out.println("Got widget selected event. isLocal() = " + textField.isLocal()+", text='"+textField.getText()+"'");
- boolean isLocal = textField.isLocal();
- String value = text.getText();
- data.setIsLocal(isLocal);
- boolean oldValidState = isValueValid();
- boolean newValidState = isLocal?isCorrect(value):true; //isCorrect(typedValue);
- if (!newValidState)
- {
- // try to insert the current value into the error message.
- setErrorMessage(MessageFormat.format(getErrorMessage(), new Object[] {value}));
- }
- valueChanged(oldValidState, newValidState);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritableTextPropertyDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritableTextPropertyDescriptor.java
deleted file mode 100644
index d3893b9d0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemInheritableTextPropertyDescriptor.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.view;
-
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-/**
- * A variation of the Eclipse-supplied TextPropertyDescriptor for
- * displaying text string properties that are inheritable.
- */
-public class SystemInheritableTextPropertyDescriptor
- extends PropertyDescriptor
-{
- private SystemInheritableTextCellEditor editor;
- private String toggleButtonToolTipText, entryFieldToolTipText;
- private boolean editable = true;
-
- /**
- * Creates a property descriptor with the given id, display name
- *
- * @param id the id of the property
- * @param displayName the name to display for the property
- */
- public SystemInheritableTextPropertyDescriptor(Object id, String displayName)
- {
- super(id, displayName);
- }
- /**
- * Call this with false in special circumstances to user's disable ability to edit this value.
- * Default is true
- * @see #getEditable()
- */
- public void setEditable(boolean allow)
- {
- editable = allow;
- }
- /**
- * Query the allow-editing value. Default is true.
- */
- public boolean getEditable()
- {
- return editable;
- }
-
- /**
- * Return an instance of SystemInheritableTextCellEditor, unless
- * our editable property is false, in which case we return null;
- */
- public CellEditor createPropertyEditor(Composite parent)
- {
- if (!editable)
- return null;
- editor = new SystemInheritableTextCellEditor(parent);
- if (getValidator() != null)
- editor.setValidator(getValidator());
- if (toggleButtonToolTipText != null)
- editor.setToggleButtonToolTipText(toggleButtonToolTipText);
- if (entryFieldToolTipText != null)
- editor.setEntryFieldToolTipText(entryFieldToolTipText);
- return editor;
- }
-
-
- /**
- * Gets the toggleButtonToolTipText
- * @return Returns a String
- */
- public String getToggleButtonToolTipText()
- {
- return toggleButtonToolTipText;
- }
- /**
- * Sets the toggleButtonToolTipText
- * @param toggleButtonToolTipText The toggleButtonToolTipText to set
- */
- public void setToggleButtonToolTipText(String toggleButtonToolTipText)
- {
- this.toggleButtonToolTipText = toggleButtonToolTipText;
- }
-
- /**
- * Gets the entryFieldToolTipText
- * @return Returns a String
- */
- public String getEntryFieldToolTipText()
- {
- return entryFieldToolTipText;
- }
- /**
- * Sets the entryFieldToolTipText
- * @param entryFieldToolTipText The entryFieldToolTipText to set
- */
- public void setEntryFieldToolTipText(String entryFieldToolTipText)
- {
- this.entryFieldToolTipText = entryFieldToolTipText;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemLongRunningRequestEvent.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemLongRunningRequestEvent.java
deleted file mode 100644
index 4c620cd8b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemLongRunningRequestEvent.java
+++ /dev/null
@@ -1,34 +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.view;
-import org.eclipse.swt.widgets.Event;
-
-/**
- * An event object as passed for ISystemLongRunningRequestListener methods.
- */
-public class SystemLongRunningRequestEvent extends Event
-{
-
- /**
- * Constructor for SystemLongRunningRequestEvent
- */
- public SystemLongRunningRequestEvent()
- {
- super();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemPerspectiveLayout.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemPerspectiveLayout.java
deleted file mode 100644
index ec3818ba6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemPerspectiveLayout.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Martin Oberhuber (Wind River) - Fix 164628: get rid of dependency to debug.ui
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-
-
-import org.eclipse.rse.ui.view.scratchpad.SystemScratchpadViewPart;
-import org.eclipse.rse.ui.view.team.SystemTeamViewPart;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-
-/**
- * This class is responsible for laying out the views in the RSE perspective
- */
-public class SystemPerspectiveLayout implements IPerspectiveFactory
-{
-
- public static final String ID = "org.eclipse.rse.ui.view.SystemPerspective"; // matches id in plugin.xml, layout tag //$NON-NLS-1$
- /**
- * Defines the initial layout for a perspective.
- * This method is only called when a new perspective is created. If
- * an old perspective is restored from a persistence file then
- * this method is not called.
- *
- * @param layout the page layout
- */
- public void createInitialLayout(IPageLayout layout)
- {
- String editorArea = layout.getEditorArea();
-
- IFolderLayout folder= layout.createFolder("org.eclipse.rse.ui.view.NavFolder", IPageLayout.LEFT, //$NON-NLS-1$
- (float)0.25, editorArea);
- //folder.addView(IPageLayout.ID_RES_NAV);
- folder.addView(SystemViewPart.ID);
- folder.addView(SystemTeamViewPart.ID);
-
- folder= layout.createFolder("org.eclipse.rse.ui.view.MiscFolder", IPageLayout.BOTTOM, //$NON-NLS-1$
- (float).60, editorArea);
-
- folder.addView(SystemTableViewPart.ID);
- //folder.addView(SystemMonitorViewPart.ID);
- folder.addView(IPageLayout.ID_TASK_LIST); // put in the desktop-supplied task list view
-
-
- folder= layout.createFolder("org.eclipse.rse.ui.view.OutlineFolder", IPageLayout.RIGHT, //$NON-NLS-1$
- (float).80, editorArea);
-
- folder.addView(IPageLayout.ID_OUTLINE); // put in desktop-supplied outline view
- // unfortunately we can't do the following as snippets aren't in wswb, according to DKM
-
- folder= layout.createFolder("org.eclipse.rse.ui.view.PropertiesFolder", IPageLayout.BOTTOM, //$NON-NLS-1$
- (float).75, "org.eclipse.rse.ui.view.NavFolder"); //$NON-NLS-1$
- //layout.addView(IPageLayout.ID_PROP_SHEET, IPageLayout.BOTTOM,
- // (float)0.75, "org.eclipse.rse.ui.view.NavFolder"); // put in desktop-supplied property sheet view
- folder.addView(IPageLayout.ID_PROP_SHEET);
- folder.addView(SystemScratchpadViewPart.ID);
-
- // update Show View menu with our views
- layout.addShowViewShortcut(SystemViewPart.ID);
- layout.addShowViewShortcut(SystemTableViewPart.ID);
-
- layout.addShowViewShortcut(SystemTableViewPart.ID);
- layout.addShowViewShortcut(SystemViewPart.ID);
- layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
- // update Perspective Open menu with our perspective
- layout.addPerspectiveShortcut(ID);
-
- // Add action sets to the tool bar.
- // Fix 164628: get rid of dependency to debug.ui
- //layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
- //layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);
- layout.addActionSet("org.eclipse.debug.ui.launchActionSet"); //$NON-NLS-1$
- layout.addActionSet("org.eclipse.debug.ui.debugActionSet"); //$NON-NLS-1$
-
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemPropertySheetForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemPropertySheetForm.java
deleted file mode 100644
index 65a07cef3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemPropertySheetForm.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.view;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.PropertySheetPage;
-
-
-
-/**
- * This re-usable widget is for a property-sheet widget that is imbeddable in dialogs.
- * It is similar to the workbench property sheet but there are some important differences.
- */
-public class SystemPropertySheetForm extends Composite
-{
-
- private PropertySheetPage tree = null;
- private boolean enabledMode = true;
- //private ISystemViewInputProvider inputProvider = null;
- //private ISystemViewInputProvider emptyProvider = new SystemEmptyListAPIProviderImpl();
- public static final int DEFAULT_WIDTH = 300;
- public static final int DEFAULT_HEIGHT = 250;
-
- /**
- * Constructor
- * @param shell The owning window
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically SWT.NULL
- * @param msgLine where to show messages and tooltip text
- */
- public SystemPropertySheetForm(Shell shell, Composite parent, int style, ISystemMessageLine msgLine)
- {
- this(shell, parent, style, msgLine, 1, 1);
- }
- /**
- * Constructor when you want to span more than one column or row
- * @param shell The owning window
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically SWT.NULL
- * @param horizontalSpan how many columns in parent composite to span
- * @param verticalSpan how many rows in parent composite to span
- * @param msgLine where to show messages and tooltip text
- */
- public SystemPropertySheetForm(Shell shell, Composite parent, int style, ISystemMessageLine msgLine, int horizontalSpan, int verticalSpan)
- {
- super(parent, style);
- prepareComposite(1, horizontalSpan, verticalSpan);
- createPropertySheetView(shell);
- addOurSelectionListener();
- addOurMouseListener();
- addOurKeyListener();
- }
-
- /**
- * Return the system view tree viewer
- */
- public PropertySheetPage getPropertySheetView()
- {
- return tree;
- }
- /**
- * Return the underlying control
- */
- public Control getControl()
- {
- return tree.getControl();
- }
-
- /**
- * Set the tree's tooltip text
- */
- public void setToolTipText(String tip)
- {
- tree.getControl().setToolTipText(tip);
- }
- /**
- * Refresh contents
- */
- public void refresh()
- {
- tree.refresh();
- }
-
- /**
- * Method declared on ISelectionListener.
- */
- public void selectionChanged(ISelection selection)
- {
- tree.selectionChanged(null, selection);
- }
-
- /**
- * Disable/Enable all the child controls.
- */
- public void setEnabled(boolean enabled)
- {
- enabledMode = enabled;
- }
-
- // -----------------------
- // INTERNAL-USE METHODS...
- // -----------------------
- /**
- * Prepares this composite control and sets the default layout data.
- * @param Number of columns the new group will contain.
- */
- protected Composite prepareComposite(int numColumns,
- int horizontalSpan, int verticalSpan)
- {
- Composite composite = this;
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- data.widthHint = DEFAULT_WIDTH;
- data.heightHint = DEFAULT_HEIGHT;
- data.horizontalSpan = horizontalSpan;
- data.verticalSpan = verticalSpan;
- composite.setLayoutData(data);
- return composite;
- }
-
- protected void createPropertySheetView(Shell shell)
- {
- tree = new PropertySheetPage();
- tree.createControl(this);
- Control c = tree.getControl();
- GridData treeData = new GridData();
- treeData.horizontalAlignment = GridData.FILL;
- treeData.verticalAlignment = GridData.FILL;
- treeData.grabExcessHorizontalSpace = true;
- treeData.grabExcessVerticalSpace = true;
- treeData.widthHint = 220;
- treeData.heightHint= 200;
- c.setLayoutData(treeData);
- //tree.setShowActions(showActions);
-
- }
-
-
- protected void addOurSelectionListener()
- {
- // Add the button listener
-/* SelectionListener selectionListener = new SelectionListener()
- {
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
- public void widgetSelected(SelectionEvent event)
- {
- if (!enabledMode)
- return;
- }
- };*/
- //tree.getControl().addSelectionListener(selectionListener);
- }
-
- protected void addOurMouseListener()
- {
- MouseListener mouseListener = new MouseAdapter()
- {
- public void mouseDown(MouseEvent e)
- {
- if (!enabledMode)
- return;
- //requestActivation();
- }
- };
- tree.getControl().addMouseListener(mouseListener);
- }
-
- protected void addOurKeyListener()
- {
- KeyListener keyListener = new KeyAdapter()
- {
- public void keyPressed(KeyEvent e)
- {
- if (!enabledMode)
- {
- //e.doit = false;
- return;
- }
- //handleKeyPressed(e);
- }
- };
- tree.getControl().addKeyListener(keyListener);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResolveFilterStringAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResolveFilterStringAPIProviderImpl.java
deleted file mode 100644
index eb3bdc091..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResolveFilterStringAPIProviderImpl.java
+++ /dev/null
@@ -1,50 +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.view;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is used when the contents are used to show the resolution of a single filter string.
- */
-public class SystemResolveFilterStringAPIProviderImpl extends SystemTestFilterStringAPIProviderImpl
-{
-
-
-
- /**
- * Constructor
- * @param subsystem The subsystem that will resolve the filter string
- * @param filterString The filter string to test
- */
- public SystemResolveFilterStringAPIProviderImpl(ISubSystem subsystem, String filterString)
- {
- super(subsystem, filterString);
- } // end constructor
-
-
- /**
- * Return true to show the button bar above the viewer.
- * The tool bar contains "Get List" and "Refresh" buttons and is typicall
- * shown in dialogs that list only remote system objects.
- */
- public boolean showButtonBar()
- {
- return false;
- } // end showButtonBar()
-
-} // end class SystemResolveFilterStringAPIProviderImpl \ 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
deleted file mode 100644
index 065715bf8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java
+++ /dev/null
@@ -1,616 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.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;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.rse.ui.widgets.SystemHostCombo;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-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 SystemResourceSelectionForm implements ISelectionChangedListener
-{
- private Shell _shell;
- private boolean _multipleSelection = true;
- protected static final int PROMPT_WIDTH = 400; // The maximum width of the dialog's prompt, in pixels.
-
- private SystemResourceSelectionInputProvider _inputProvider;
- private SystemHostCombo _connectionCombo;
- private SystemViewForm _systemViewForm;
- private Composite _propertySheetContainer;
- protected SystemPropertySheetForm _ps;
-
- private Text _pathText;
- private boolean _isValid;
- private ISystemMessageLine _msgLine;
- protected Object previousSelection = null;
- private IValidatorRemoteSelection _selectionValidator = null;
- private boolean showPropertySheet = false;
-
-
- protected Object caller;
- protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
-
- protected String _verbage = null;
- protected Label verbageLabel;
- private Composite _container;
-
- // history
- private HashMap _history;
-
- // outputs
- protected IHost outputConnection = null;
- protected Object[] outputObjects = null;
-
-
- public SystemResourceSelectionForm(Shell shell, Composite parent, Object caller,
- SystemResourceSelectionInputProvider inputProvider, String verbage,
- boolean multipleSelection,
- ISystemMessageLine msgLine)
- {
- _msgLine= msgLine;
- _history = new HashMap();
- _inputProvider = inputProvider;
- _multipleSelection = multipleSelection;
- _shell = shell;
- _verbage = verbage;
- this.caller = caller;
- callerInstanceOfWizardPage = (caller instanceof WizardPage);
- callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
-
- createControls(parent);
- }
-
- public void setMessageLine(ISystemMessageLine msgLine)
- {
- _msgLine = msgLine;
- }
-
- /**
- * Return first selected object
- */
- public Object getSelectedObject()
- {
- if ((outputObjects != null) && (outputObjects.length>=1))
- return outputObjects[0];
- else
- return null;
- }
- /**
- * Return all selected objects.
- * @see #setMultipleSelectionMode(boolean)
- */
- public Object[] getSelectedObjects()
- {
- return outputObjects;
- }
-
- public void createControls(Composite parent)
- {
- _container = SystemWidgetHelpers.createComposite(parent, showPropertySheet ? 2 : 1);
- //Composite container = new Composite(parent, SWT.NULL);
-
-
- // INNER COMPOSITE
- int gridColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createFlushComposite(_container, gridColumns);
-
- // PROPERTY SHEET COMPOSITE
- if (showPropertySheet)
- {
- createPropertySheet(_container, _shell);
- }
-
-
- // MESSAGE/VERBAGE TEXT AT TOP
- verbageLabel = SystemWidgetHelpers.createVerbiage(composite_prompts, _verbage, gridColumns, false, PROMPT_WIDTH);
-
-
- boolean allowMultipleConnnections = _inputProvider.allowMultipleConnections();
- if (!allowMultipleConnnections)
- {
- //Label connectionLabel = SystemWidgetHelpers.createLabel(composite_prompts, _inputProvider.getSystemConnection().getHostName());
- }
- else
- {
- String[] systemTypes = _inputProvider.getSystemTypes();
- String category = _inputProvider.getCategory();
-
- if (systemTypes != null)
- {
- _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, _inputProvider.getSystemTypes(), _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection());
- }
- else if (category != null)
- {
- _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection(), category);
- }
- else
- {
- _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, "*", _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection()); //$NON-NLS-1$
-
- }
- _connectionCombo.addSelectionListener(new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent evt)
- {
- IHost connection = _connectionCombo.getHost();
- connectionChanged(connection);
- }}
- );
- }
-
- _pathText = SystemWidgetHelpers.createReadonlyTextField(composite_prompts);
- _systemViewForm = new SystemViewForm(_shell, composite_prompts, SWT.NULL, _inputProvider, !_multipleSelection, _msgLine);
- _systemViewForm.addSelectionChangedListener(this);
-
-
- GridLayout layout = new GridLayout();
- GridData gdata = new GridData(GridData.FILL_BOTH);
- composite_prompts.setLayout(layout);
- composite_prompts.setLayoutData(gdata);
-
- doInitializeFields();
- }
-
- private void doInitializeFields()
- {
- setPageComplete();
- return;
- }
-
- /**
- * Create the property sheet viewer
- */
- private void createPropertySheet(Composite outerParent, Shell shell)
- {
- _propertySheetContainer = SystemWidgetHelpers.createFlushComposite(outerParent, 1);
- ((GridData)_propertySheetContainer.getLayoutData()).grabExcessVerticalSpace = true;
- ((GridData)_propertySheetContainer.getLayoutData()).verticalAlignment = GridData.FILL;
-
- // PROPERTY SHEET VIEWER
- _ps = new SystemPropertySheetForm(shell,_propertySheetContainer, SWT.BORDER, _msgLine);
- }
-
- public Control getInitialFocusControl()
- {
- return _systemViewForm.getTreeControl();
- }
-
- public void applyViewerFilter(SystemActionViewerFilter filter)
- {
- if (filter != null)
- {
- _systemViewForm.getSystemView().addFilter(filter);
- }
- }
-
- /**
- * Completes processing of the wizard page or dialog. If this
- * method returns true, the wizard/dialog will close;
- * otherwise, it will stay active.
- *
- * @return true if no errors
- */
- public boolean verify()
- {
- if (_isValid)
- {
- if (_msgLine != null)
- {
- _msgLine.clearErrorMessage();
- }
- return true;
- }
- else
- {
- return false;
- }
- }
-
- protected ISystemViewElementAdapter getAdapter(Object selection)
- {
- if (selection != null && selection instanceof IAdaptable)
- {
- return (ISystemViewElementAdapter)((IAdaptable)selection).getAdapter(ISystemViewElementAdapter.class);
- }
- return null;
- }
-
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object selection)
- {
- if (selection != null && selection instanceof IAdaptable)
- {
- return SystemAdapterHelpers.getRemoteAdapter(selection);
- }
- return null;
- }
-
- protected ISystemRemoteElementAdapter[] getRemoteAdapters(ISelection selection)
- {
- Object[] selectedObjects = getSelections(selection);
- ISystemRemoteElementAdapter[] adapters = new ISystemRemoteElementAdapter[selectedObjects.length];
- for (int idx=0; idx<adapters.length; idx++)
- {
- adapters[idx] = getRemoteAdapter(selectedObjects[idx]);
- }
- return adapters;
- }
-
-
- public void connectionChanged(IHost connection)
- {
- IHost previousConnection = _inputProvider.getSystemConnection();
- if (previousConnection != connection)
- {
-
- _inputProvider.setSystemConnection(connection, false);
-
- _systemViewForm.refresh();
- Object oldSelection = _history.get(connection);
- if (oldSelection != null)
- {
- setPreSelection(oldSelection);
- }
- }
- }
-
- public void setVerbage(String verbage)
- {
- _verbage = verbage;
- }
-
- public boolean setPreSelection(Object selection)
- {
- ISystemViewElementAdapter adapter = getAdapter(selection);
- if (adapter != null)
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem ss = adapter.getSubSystem(selection);
- IHost connection = ss.getHost();
- if (_inputProvider.allowMultipleConnections())
- {
- if (_connectionCombo.getHost()!= connection)
- {
- _connectionCombo.select(connection);
- }
- }
- List filterRefs = registry.findFilterReferencesFor(selection, ss);
-
- SystemView systemView = _systemViewForm.getSystemView();
- if (filterRefs.size() > 0)
- {
- ISystemFilterReference ref = (ISystemFilterReference)filterRefs.get(0);
- systemView.setExpandedElements(new Object[] {ref});
- systemView.refreshRemoteObject(selection, selection, true);
- return true;
- }
- else
- {
- Object parent = adapter.getParent(selection);
- if (setPreSelection(parent))
- {
- systemView.refreshRemoteObject(selection, selection, true);
- return true;
- }
- }
- }
- return false;
- }
-
-
- protected void setPathText(String text)
- {
- _pathText.setText(text);
- }
-
-
- public Object[] getOutputObjects()
- {
- return outputObjects;
- }
-
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- /**
- * Return first item currently selected.
- */
- protected Object getFirstSelection(ISelection selection)
- {
- IStructuredSelection sSelection = (IStructuredSelection)selection;
- if (sSelection != null)
- {
- Iterator selectionIterator = sSelection.iterator();
- if (selectionIterator.hasNext())
- return selectionIterator.next();
- else
- return null;
- }
- return null;
- }
- /**
- * Return all items currently selected.
- */
- protected Object[] getSelections(ISelection selection)
- {
- IStructuredSelection sSelection = (IStructuredSelection)selection;
- if (sSelection != null)
- {
- Object[] selectedObjects = new Object[sSelection.size()];
- Iterator selectionIterator = sSelection.iterator();
- int idx = 0;
- while (selectionIterator.hasNext())
- selectedObjects[idx++] = selectionIterator.next();
- return selectedObjects;
- }
- return null;
- }
-
-
- private void setPathTextFromSelection(Object selection)
- {
- ISystemViewElementAdapter adapter = getAdapter(selection);
- String text = adapter.getAbsoluteName(selection);
-
- setPathText(text);
- }
-
- /**
- * Show or hide the property sheet. This is called after the contents are created when the user
- * toggles the Details button.
- * @param shell Use getShell() in your dialog or wizard page
- * @param contents Use getContents() in your dialog or wizard page
- * @return new state -> true if showing, false if hiding
- */
- public boolean toggleShowPropertySheet(Shell shell, Control contents)
- {
- Point windowSize = shell.getSize();
- Point oldSize = contents.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (showPropertySheet) // hiding?
- {
- _ps.dispose();
-
- _propertySheetContainer.dispose();
- _ps = null;
- _propertySheetContainer = null;
- ((GridLayout)_container.getLayout()).numColumns = 1;
- }
- else // showing?
- {
- //createPropertySheet((Composite)contents, shell);
- ((GridLayout)_container.getLayout()).numColumns = 2;
- createPropertySheet(_container, shell);
- }
-
- Point newSize = contents.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- shell.setSize(new Point(windowSize.x + (newSize.x - oldSize.x), windowSize.y));
-
- if (_ps != null)
- {
- ISelection s = _systemViewForm.getSelection();
- if (s != null)
- _ps.selectionChanged(s);
- }
-
- showPropertySheet = !showPropertySheet;
- return showPropertySheet;
- }
-
-
-// ---------------------------------------------------
- // METHODS FOR SELECTION CHANGED LISTENER INTERFACE...
- // ---------------------------------------------------
- /**
- * User selected something in the _systemViewForm.
- */
- public void selectionChanged(SelectionChangedEvent e)
- {
- _isValid = true;
- ISelection selection = e.getSelection();
- outputObjects = null;
- int selectionSize = ((IStructuredSelection)selection).size();
- if ((selectionSize > 1) && !_systemViewForm.sameParent())
- {
- clearErrorMessage();
-
- setPathText(""); //$NON-NLS-1$
- setPageComplete();
- return; // don't enable OK/Add if selections from different parents
- }
-
- if (_ps != null)
- _ps.selectionChanged(selection);
-
- Object selectedObject = getFirstSelection(selection);
- if (selectedObject == previousSelection && selectionSize == 1)
- {
- // DKM we null set this before, so we need to reset it
- outputObjects = getSelections(selection);
- return;
- }
- clearErrorMessage();
- setPathText(""); //$NON-NLS-1$
- setPageComplete();
-
- previousSelection = selectedObject;
- if (selectedObject != null)
- {
-
- ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(selectedObject);
- if (remoteAdapter != null)
- {
- setPathTextFromSelection(selectedObject);
-
- outputObjects = getSelections(selection);
- outputConnection = remoteAdapter.getSubSystem(selectedObject).getHost();
-
- _history.put(outputConnection, previousSelection);
- }
- else
- {
- ISystemViewElementAdapter elementAdapter = (ISystemViewElementAdapter)((IAdaptable)selectedObject).getAdapter(ISystemViewElementAdapter.class);
- if (elementAdapter != null)
- {
- setPathTextFromSelection(selectedObject);
-
- outputObjects = getSelections(selection);
- outputConnection = elementAdapter.getSubSystem(selectedObject).getHost();
-
- _history.put(outputConnection, previousSelection);
- }
- }
-
-
- if (_selectionValidator != null)
- {
- SystemMessage selectionMsg = _selectionValidator.isValid(outputConnection, getSelections(selection), getRemoteAdapters(selection));
-
- if (selectionMsg != null)
- {
- _isValid = false;
- setErrorMessage(selectionMsg);
- }
- }
- setPageComplete();
- }
-
- }
-
- /**
- * 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()
- {
- return ( (_pathText.getText().length() > 0) ) && _isValid;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete()
- {
- if (callerInstanceOfWizardPage)
- {
- ((WizardPage)caller).setPageComplete(isPageComplete());
- }
- else if (callerInstanceOfSystemPromptDialog)
- {
- ((SystemPromptDialog)caller).setPageComplete(isPageComplete());
- }
- }
-
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected object.
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- this.showPropertySheet = show;
- }
-
-
-
- /**
- * Specify a validator to use when the user selects a remote file or folder.
- * This allows you to decide if OK should be enabled or not for that remote file or folder.
- */
- public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
- {
- _selectionValidator = selectionValidator;
- }
-
- protected void clearErrorMessage()
- {
- if (_msgLine != null)
- _msgLine.clearErrorMessage();
- }
- protected void setErrorMessage(String msg)
- {
- if (_msgLine != null)
- if (msg != null)
- _msgLine.setErrorMessage(msg);
- else
- _msgLine.clearErrorMessage();
- }
- protected void setErrorMessage(SystemMessage msg)
- {
- if (_msgLine != null)
- if (msg != null)
- _msgLine.setErrorMessage(msg);
- else
- _msgLine.clearErrorMessage();
- }
-
-
- /**
- * Set the message shown as the text at the top of the form. Eg, "Select a file"
- */
- public void setMessage(String message)
- {
- this._verbage = message;
- if (verbageLabel != null)
- verbageLabel.setText(message);
- }
- /**
- * Set the tooltip text for the remote systems tree from which an item is selected.
- */
- public void setSelectionTreeToolTipText(String tip)
- {
- _systemViewForm.setToolTipText(tip);
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index c0181d935..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-public abstract class SystemResourceSelectionInputProvider extends SystemAbstractAPIProvider
-{
- private IHost _connection;
- private boolean _onlyConnection = false;
- private boolean _allowNew = true;
- private String[] _systemTypes;
- private String _category = null;
-
- public SystemResourceSelectionInputProvider(IHost connection)
- {
- _connection = connection;
- }
-
- public SystemResourceSelectionInputProvider()
- {
- _connection = null;
- }
-
- public IHost getSystemConnection()
- {
- return _connection;
- }
-
- public boolean allowMultipleConnections()
- {
- return !_onlyConnection;
- }
-
- public void setAllowNewConnection(boolean flag)
- {
- _allowNew = flag;
- }
-
- public boolean allowNewConnection()
- {
- return _allowNew;
- }
-
- public void setSystemConnection(IHost connection, boolean onlyConnection)
- {
- _connection = connection;
- _onlyConnection = onlyConnection;
- }
-
- public String[] getSystemTypes()
- {
- return _systemTypes;
- }
-
- public void setSystemTypes(String[] types)
- {
- _systemTypes = types;
- }
-
- public Object[] getSystemViewRoots()
- {
- if (_connection == null)
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- _connection = registry.getHosts()[0];
-
- }
- return getConnectionChildren(_connection);
- }
-
- public boolean hasSystemViewRoots()
- {
- return false;
- }
-
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- if (selectedConnection != null)
- {
- return getSubSystem(selectedConnection).getChildren();
- }
- return null;
- }
-
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- if (selectedConnection != null)
- {
- return getSubSystem(selectedConnection).hasChildren();
- }
- return false;
- }
-
- protected abstract ISubSystem getSubSystem(IHost selectedConnection);
-
-
- public void setCategory(String category)
- {
- _category = category;
- }
-
- public String getCategory()
- {
- return _category;
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 63cd00833..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
+++ /dev/null
@@ -1,633 +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.view;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.filters.SystemFilterSimple;
-import org.eclipse.rse.internal.model.SystemNewConnectionPromptObject;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * <p>
- * It is used when the contents are used to allow the user to select a remote system object.
- * The tree will begin with the filter pool references or filter references (depending on
- * the user's preferences setting) of the given subsystem.
- * <p>
- * Alternatively, a filter string can be given and the contents will be the result of resolving
- * that filter string.
- */
-public class SystemSelectRemoteObjectAPIProviderImpl
- extends SystemAbstractAPIProvider
- implements ISystemViewInputProvider
-{
-
-
- protected ISubSystem subsystem = null;
- protected String filterString = null;
- protected ISystemViewElementAdapter subsystemAdapter = null;
-
- // For mode when we want to list the connections ...
- protected boolean listConnectionsMode = false;
- protected boolean showNewConnectionPrompt = false;
- protected boolean singleConnectionMode = false;
- protected String subsystemFactoryId;
- protected String subsystemFactoryCategory;
- protected String filterSuffix;
- protected String[] systemTypes;
- protected String preSelectFilterChild;
- protected Object preSelectFilterChildObject;
- protected ISystemFilter[] quickFilters;
- protected IHost[] inputConnections;
- protected SystemNewConnectionPromptObject connPrompt = null;
- protected Object[] connPromptAsArray;
- protected ISystemSelectRemoteObjectAPIProviderCaller caller;
- protected boolean multiConnections = false;
-
- /**
- * Constructor that takes the input needed to drive the list. Specifically,
- * we need to know what connections to list, and when a connection is expanded,
- * what subsystems to query for the remote objects.
- * <p>
- * This can be done by giving one of two possible pieces of information:
- * <ul>
- * <li>a subsystem factory Id, which scopes the connections to those containing subsystems
- * owned by this factory, and scopes subsystems to only those from this factory.
- * <li>The subsystem factory Id is usually the right choice, unless you want to include
- * connections and subsystems from multiple subsystem factories, such as is the case
- * for universal files ... there is one base factory but it is subclassed a number of
- * times. For this and any other case we also allow scoping by subsystem factory
- * category. All connections from any factory of this category are included, and
- * subsystems of factories from this category are used to populate the list.
- * </ul>
- * <p>
- * You must supply one of these. There is no need to supply both.
- * <p>
- * Also, it is often desired to restrict what system types the user can create new connections for.
- * While this could be deduced from the first two pieces of information, it is safer to ask the
- * caller to explicitly identify these. If null is passed, then there is no restrictions.
- *
- * @param factoryId The subsystemFactoryId to restrict connections and subsystems to
- * An alternative to factoryCategory. Specify only one, pass null for the other.
- * @param factoryCategory The subsystemFactory category to restrict connections and subsystems to.
- * An alternative to factoryId. Specify only one, pass null for the other.
- * @param showNewConnectionPrompt true if to show "New Connection" prompt, false if not to
- * @param systemTypes Optional list of system types to restrict the "New Connection" wizard to. Pass null for no restrictions
- */
- public SystemSelectRemoteObjectAPIProviderImpl(String factoryId, String factoryCategory,
- boolean showNewConnectionPrompt, String[] systemTypes)
- {
- super();
- this.subsystemFactoryId = factoryId;
- this.subsystemFactoryCategory = factoryCategory;
- this.systemTypes = systemTypes;
- this.showNewConnectionPrompt = showNewConnectionPrompt;
- this.listConnectionsMode = true;
- }
-
- /**
- * Set the caller to callback to for some events, such as the expansion of a prompting
- * transient filter.
- */
- public void setCaller(ISystemSelectRemoteObjectAPIProviderCaller caller)
- {
- this.caller = caller;
- }
-
- /**
- * Specify whether the user should see the "New Connection..." special connection prompt
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- this.showNewConnectionPrompt = show;
- }
-
- /**
- * 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.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
-
- /**
- * Constructor when there is a subsystem
- * @param subsystem The subsystem that will resolve the filter string
- */
- public SystemSelectRemoteObjectAPIProviderImpl(ISubSystem subsystem)
- {
- super();
- setSubSystem(subsystem);
- }
-
- /**
- * Constructor when there is no subsystem yet
- * @see #setSubSystem(ISubSystem)
- */
- public SystemSelectRemoteObjectAPIProviderImpl()
- {
- super();
- }
-
- /**
- * Default or Restrict to a specific connection.
- * If default mode, it is preselected.
- * If only mode, it is the only connection listed.
- * @param connection The connection to default or restrict to
- * @param onlyMode true if this is to be the only connection shown in the list
- */
- public void setSystemConnection(IHost connection, boolean onlyMode)
- {
- this.inputConnections = new IHost[] {connection};
- this.singleConnectionMode = onlyMode;
- if (onlyMode)
- multiConnections = false;
- }
-
- /**
- * Change the input subsystem
- */
- public void setSubSystem(ISubSystem subsystem)
- {
- this.subsystem = subsystem;
- if (subsystem != null)
- this.subsystemAdapter = getAdapter(subsystem);
- else
- this.subsystemAdapter = null;
- }
-
- /**
- * Set the filter string to use to resolve the inputs.
- * If this is an absolute filter string, it gets turned into a quick filter string,
- * so that the user sees it and can expand it. If it is a relative filter string
- * to apply to all expansions, it is used to decorate all filtering as the user drills down.
- */
- public void setFilterString(String string)
- {
- // WARNING: ENTERING BIG HUGE HACK AREA!
- this.filterString = string;
- filterSuffix = null;
- if (string == null)
- return;
-
- if (string.endsWith(",")) //$NON-NLS-1$
- {
- int idx = string.indexOf('/');
- if (idx == -1)
- idx = string.indexOf('\\');
- if (idx == -1)
- {
- filterSuffix = string;
- }
- }
-
- if (filterSuffix != null)
- filterString = null;
-
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "*** FILTER SUFFIX = '" + filterSuffix + "' ***"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Set the quick filters to be exposed to the user. These will be shown to the
- * user when they expand a connection.
- * @see org.eclipse.rse.filters.SystemFilterSimple
- */
- public void setQuickFilters(ISystemFilter[] filters)
- {
- this.quickFilters = filters;
- }
-
- /**
- * Set child of the first filter to preselect
- */
- public void setPreSelectFilterChild(String name)
- {
- this.preSelectFilterChild = name;
- }
-
- /**
- * Get the name of the item to select when the first filter is expanded.
- * Called by the filter adapter.
- */
- public String getPreSelectFilterChild()
- {
- return preSelectFilterChild;
- }
-
- /**
- * Set actual child object of the first filter to preselect. Called
- * by the filter adapter once the children are resolved and a match on
- * the name is found.
- */
- public void setPreSelectFilterChildObject(Object obj)
- {
- this.preSelectFilterChildObject = obj;
- }
-
- /**
- * Get the actual object of the item to select when the first filter is expanded.
- * Called by the GUI form after expansion, so it can select this object
- */
- public Object getPreSelectFilterChildObject()
- {
- return preSelectFilterChildObject;
- }
-
- /**
- * Adorn filter string with any relative attributes requested. Eg "/nf" for folders only
- */
- public String decorateFilterString(Object selectedObject, String inputFilterString)
- {
- // this is a hack explicitly for the universal file system. We want to propogate "type filters"
- // like "/nf" and "class," on down the chain, even though we start by showing the user's filters.
- // When those filters are finally expanded, the filter adapter calls us to do this adornment.
-
- if (inputFilterString == null)
- return inputFilterString;
- else if ((filterSuffix != null) && (inputFilterString.indexOf(filterSuffix)==-1))
- {
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "*** INPUT FILTER = '" + inputFilterString + "' ***"); //$NON-NLS-1$ //$NON-NLS-2$
- String result = inputFilterString;
- if (filterSuffix.equals(" /nf")) //$NON-NLS-1$
- result = inputFilterString + filterSuffix;
- else
- {
- /** FIXME - can't be coupled with IRemoteFile
- RemoteFileFilterString rffs =
- new RemoteFileFilterString((IRemoteFileSubSystemConfiguration)getSubSystemConfiguration(selectedObject), inputFilterString);
- rffs.setFile(filterSuffix);
- result = rffs.toString();
- */
- result = inputFilterString;
- }
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "*** ADORNED FILTER = '" + result + "' ***"); //$NON-NLS-1$ //$NON-NLS-2$
- return result;
- }
- else
- return inputFilterString;
- }
-
- /**
- * For performance reasons, pre-check to see if filter decoration is even necessary...
- */
- public boolean filtersNeedDecoration(Object selectedObject)
- {
- ISubSystemConfiguration ssf = getSubSystemConfiguration(selectedObject);
- if (ssf == null)
- return false;
- /** FIXME - can't be coupled with IRemoteFile
- return ((ssf instanceof IRemoteFileSubSystemConfiguration) && (filterSuffix != null));
- */
- return false;
-
- }
-
- /**
- * get subsystem factory from filter or filter string
- */
- private ISubSystemConfiguration getSubSystemConfiguration(Object selectedObject)
- {
- if (selectedObject instanceof ISystemFilterReference)
- {
- ISubSystem ss = (ISubSystem)((ISystemFilterReference)selectedObject).getProvider();
- return ss.getSubSystemConfiguration();
- }
- else if (selectedObject instanceof ISystemFilterStringReference)
- {
- ISubSystem ss = (ISubSystem)((ISystemFilterStringReference)selectedObject).getProvider();
- return ss.getSubSystemConfiguration();
- }
- else
- return null;
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- */
- public Object[] getSystemViewRoots()
- {
- if (listConnectionsMode)
- return getConnections();
-
- if (subsystemAdapter == null)
- {
- return emptyList;
- }
-
- Object[] children = null;
-
- if (filterString == null)
- children = subsystemAdapter.getChildren(subsystem);
- else
- {
- children = resolveFilterString(subsystem, filterString);
- }
-
- return checkForNull(children, true);
- }
-
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- */
- public boolean hasSystemViewRoots()
- {
- if (listConnectionsMode)
- return true;
- else
- {
- boolean hasroots = false;
- if (subsystemAdapter == null)
- hasroots = false;
- else if (filterString != null)
- hasroots = true;
- else
- hasroots = subsystemAdapter.hasChildren(subsystem);
-
- return hasroots;
- }
- }
-
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- if (!listConnectionsMode)
- return null; // not applicable, never get called
- else
- {
- Object[] children = null;
- ISubSystem[] subsystems = getSubSystems(selectedConnection);
-
- if ((subsystems != null) && (subsystems.length > 0))
- {
- ISubSystem subsystem = subsystems[0]; // always just use first. Hopefully never a problem!
-
- if (subsystems.length > 1)
- SystemBasePlugin.logWarning(this.getClass().getName() + ": More than one subsystem meeting criteria. SSFID = "+subsystemFactoryId+", SSFCat = "+subsystemFactoryCategory); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (quickFilters != null)
- {
- // DKM - quick filters are only work properly for first subsystem, so for now, I'm only
- // only going to use them for the initial subsystem
- //boolean useFilters = false;
-
- // Phil
- // 50167: re-using the same filter object for every connection causes
- // grief, so we have to clone the filter for each connection.
- if (multiConnections)
- {
- // walk through quick filters, and create a clone for each one
- children = new ISystemFilter[quickFilters.length];
-
- for (int idx=0; idx<quickFilters.length; idx++)
- {
- SystemFilterSimple quickFilter = (SystemFilterSimple)quickFilters[idx];
- children[idx] = new SystemFilterSimple(quickFilter.getName());
- quickFilter.clone((ISystemFilter)children[idx]);
- ((SystemFilterSimple)children[idx]).setParent(subsystem);
- }
- }
-
- else
- {
- // walk through quickFilters and if they are transient, assign current subsystem as parent
- for (int idx=0; idx<quickFilters.length; idx++)
- {
- if ((quickFilters[idx] instanceof SystemFilterSimple))
- {
- ((SystemFilterSimple)quickFilters[idx]).setParent(subsystem);
- }
- }
-
- children = quickFilters;
- }
- }
-
- else if ((filterString == null) || (filterSuffix != null))
- {
- children = subsystem.getChildren();
- }
- else
- {
- children = resolveFilterString(subsystem, filterString);
- }
- }
-
- return checkForNull(children, true);
- }
- }
-
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return true;
- }
-
- /**
- * Return true to show the action bar (ie, toolbar) above the viewer.
- * The action bar contains connection actions, predominantly.
- * We return false.
- */
- public boolean showActionBar()
- {
- return false;
- }
-
- /**
- * Return true to show the button bar above the viewer.
- * The tool bar contains "Get List" and "Refresh" buttons and is typically
- * shown in dialogs that list only remote system objects.
- * We return false.
- */
- public boolean showButtonBar()
- {
- return false;
- }
-
- /**
- * Return true to show right-click popup actions on objects in the tree.
- * We return true.
- */
- public boolean showActions()
- {
- return true;
- }
-
- /**
- * Return true if we are listing connections or not, so we know whether we are interested in
- * connection-add events
- */
- public boolean showingConnections()
- {
- return listConnectionsMode;
- }
-
-
- // ----------------------------------
- // OUR OWN METHODS...
- // ----------------------------------
-
- /**
- * Return the connections appropriate for our subsystem factory ID or category
- * requirements.
- */
- protected Object[] getConnections()
- {
- if (singleConnectionMode && !showNewConnectionPrompt)
- return inputConnections;
- if ((connPrompt == null) && showNewConnectionPrompt)
- {
- connPrompt = new SystemNewConnectionPromptObject();
- connPromptAsArray = new Object[1];
- connPromptAsArray[0] = connPrompt;
- }
- if ((connPrompt!=null) && (systemTypes != null))
- {
- connPrompt.setSystemTypes(systemTypes);
- }
-
- IHost[] conns = null;
-
- if (singleConnectionMode)
- conns = inputConnections;
- else if (systemTypes != null)
- conns = sr.getHostsBySystemTypes(systemTypes);
- else if (subsystemFactoryId != null)
- conns = sr.getHostsBySubSystemConfigurationId(subsystemFactoryId);
- else if (subsystemFactoryCategory != null)
- conns = sr.getHostsBySubSystemConfigurationCategory(subsystemFactoryCategory);
- else
- conns = sr.getHosts();
-
- Object[] children = null;
-
- if (showNewConnectionPrompt)
- {
- if ((conns == null) || (conns.length == 0))
- children = connPromptAsArray;
- else
- {
- multiConnections = (conns.length>1); // 50167pc
- children = new Object[1+conns.length];
- children[0] = connPrompt;
- for (int idx=0; idx<conns.length; idx++)
- children[idx+1] = conns[idx];
- }
- }
- else
- {
- children = conns;
- multiConnections = ((conns!=null) && (conns.length>1)); // 50167pc
- }
-
- return checkForNull(children, false);
- }
-
- /**
- * Given a connection, return the subsystem(s) appropriate for the given
- * ssfactoryid or category
- */
- protected ISubSystem[] getSubSystems(IHost selectedConnection)
- {
- ISubSystem[] subsystems = null;
- if (subsystemFactoryId != null)
- subsystems = sr.getSubSystems(subsystemFactoryId, selectedConnection);
- else if (subsystemFactoryCategory != null)
- subsystems = sr.getSubSystemsBySubSystemConfigurationCategory(subsystemFactoryCategory, selectedConnection);
- else
- subsystems = sr.getSubSystems(selectedConnection);
- return subsystems;
- }
-
- /**
- * Return the result of asking a given subsystem to resolve a filter string
- */
- protected Object[] resolveFilterString(ISubSystem subsystem, String filterString)
- {
- Object[] children = null;
- try
- {
- children = subsystem.resolveFilterString(filterString);
- } catch (InterruptedException exc)
- {
- if (canceledObject == null)
- children = getCancelledMessageObject();
- } catch (Exception exc)
- {
- children = getFailedMessageObject();
- SystemBasePlugin.logError("Error in SystemTestFilterStringAPIProviderImpl#getSystemViewRoots()",exc); //$NON-NLS-1$
- }
- return children;
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- return SystemAdapterHelpers.getAdapter(o);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
-
- /**
- * Prompt the user to create a new filter as a result of the user expanding a promptable
- * transient filter
- * <p>
- * Simply passes the request on to the caller.
- * <p>
- * NOT SUPPORTED YET!
- *
- * @return the filter created by the user or null if they cancelled the prompting
- */
- public ISystemFilter createFilterByPrompting(ISystemFilter filterPrompt, Shell shell)
- throws Exception
- {
- if (caller!=null)
- return caller.createFilterByPrompting(filterPrompt, shell);
- else
- return null;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 222edd1ac..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeView.java
+++ /dev/null
@@ -1,1896 +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.view;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-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.SystemPopupMenuActionContributorManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemRemoteChangeEvent;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemRemoteChangeListener;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.services.clientserver.StringCompare;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemDeleteTarget;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.ISystemRenameTarget;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.ui.actions.SystemOpenExplorerPerspectiveAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.actions.SystemRemotePropertiesAction;
-import org.eclipse.rse.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Layout;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.part.EditorInputTransfer;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.progress.PendingUpdateAdapter;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-/**
- * This subclass of the standard JFace tabletree viewer is used to
- * show a generic tabletree view of the selected object
- * <p>
- *
- */
-public class SystemTableTreeView
-// TODO change TreeViewer to TableTreeViewer when Eclipse fixes SWT viewer
-//extends TableTreeViewer
-extends TreeViewer
-implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelectAllTarget, ISystemResourceChangeListener, ISystemRemoteChangeListener, ISelectionChangedListener, ISelectionProvider
-{
-
-
- protected Composite getTableTree()
- {
- // TODO - turn back to table tree
- return getTree();
- }
-
- // TODO - turn back into tabletree
- // inner class to support cell editing - only use with table
- private ICellModifier cellModifier = new ICellModifier()
- {
- public Object getValue(Object element, String property)
- {
- ISystemViewElementAdapter adapter = getAdapter(element);
- adapter.setPropertySourceInput(element);
- Object value = adapter.getPropertyValue(property);
- if (value == null)
- {
- value = ""; //$NON-NLS-1$
- }
- return value;
- }
-
- public boolean canModify(Object element, String property)
- {
- boolean modifiable = true;
- return modifiable;
- }
-
- public void modify(Object element, String property, Object value)
- {
- if (element instanceof TableItem && value != null)
- {
- Object obj = ((TableItem) element).getData();
- ISystemViewElementAdapter adapter = getAdapter(obj);
- if (adapter != null)
- {
- adapter.setPropertyValue(property, value);
-
- SelectionChangedEvent event = new SelectionChangedEvent(SystemTableTreeView.this, getSelection());
-
- // fire the event
- fireSelectionChanged(event);
- }
- }
- }
- };
-
- private class HeaderSelectionListener extends SelectionAdapter
- {
-
- public HeaderSelectionListener()
- {
- _upI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID);
- _downI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID);
- }
-
-
- /**
- * Handles the case of user selecting the
- * header area.
- * <p>If the column has not been selected previously,
- * it will set the sorter of that column to be
- * the current table view sorter. Repeated
- * presses on the same column header will
- * toggle sorting order (ascending/descending).
- */
- public void widgetSelected(SelectionEvent e)
- {
- Tree table = getTree();
- if (!table.isDisposed())
- {
- // column selected - need to sort
- TreeColumn tcolumn = (TreeColumn)e.widget;
- int column = table.indexOf(tcolumn);
- SystemTableViewSorter oldSorter = (SystemTableViewSorter) getSorter();
- if (oldSorter != null && column == oldSorter.getColumnNumber())
- {
- oldSorter.setReversed(!oldSorter.isReversed());
- if (tcolumn.getImage() == _upI)
- {
- tcolumn.setImage(_downI);
- }
- else
- {
- tcolumn.setImage(_upI);
- }
- }
- else
- {
- setSorter(new SystemTableViewSorter(column, SystemTableTreeView.this, _columnManager));
- tcolumn.setImage(_downI);
- }
-
- // unset image of other columns
- TreeColumn[] allColumns = table.getColumns();
- for (int i = 0; i < allColumns.length; i++)
- {
- if (i != column)
- {
- if (allColumns[i].getImage() != null)
- {
- allColumns[i].setImage(null);
- }
- }
- }
- refresh();
- }
- }
- }
- private Object _objectInput;
- //private ArrayList _attributeColumns;
- private TableLayout _layout;
- protected SystemTableTreeViewProvider _provider;
- private HeaderSelectionListener _columnSelectionListener;
- private SystemTableViewColumnManager _columnManager;
- private MenuManager _menuManager;
- private int _charWidth = 3;
- private SystemTableViewFilter _filter;
- private IPropertyDescriptor[] _uniqueDescriptors;
-
- // these variables were copied from SystemView to allow for limited support
- // of actions. I say limited because somethings don't yet work properly.
- protected SystemRefreshAction _refreshAction;
- protected PropertyDialogAction _propertyDialogAction;
- protected SystemRemotePropertiesAction _remotePropertyDialogAction;
- protected SystemOpenExplorerPerspectiveAction _openToPerspectiveAction;
- protected SystemShowInTableAction _showInTableAction;
-
- // global actions
- // Note the Edit menu actions are set in SystemViewPart. Here we use these
- // actions from our own popup menu actions.
- protected SystemCommonDeleteAction _deleteAction;
- // for global delete menu item
- protected SystemCommonRenameAction _renameAction;
- // for common rename menu item
- protected SystemCommonSelectAllAction _selectAllAction;
- // for common Ctrl+A select-all
-
- protected boolean _selectionShowRefreshAction;
- protected boolean _selectionShowOpenViewActions;
- protected boolean _selectionShowDeleteAction;
- protected boolean _selectionShowRenameAction;
- protected boolean _selectionEnableDeleteAction;
- protected boolean _selectionEnableRenameAction;
-
- protected boolean _selectionIsRemoteObject = true;
- protected boolean _selectionFlagsUpdated = false;
-
- private IWorkbenchPart _workbenchPart = null;
-
- private int[] _lastWidths = null;
- private ISystemMessageLine _messageLine;
- protected boolean menuListenerAdded = false;
-
-
- private static final int LEFT_BUTTON = 1;
- private int mouseButtonPressed = LEFT_BUTTON;
-
- private Image _upI;
- private Image _downI;
-
-
- /**
- * Constructor for the table view
- *
- */
- public SystemTableTreeView(Tree tableTree, ISystemMessageLine msgLine)
- {
- super(tableTree);
- _messageLine = msgLine;
- //_attributeColumns = new ArrayList();
- _layout = new TableLayout();
-
- _columnManager = new SystemTableViewColumnManager(this);
- _provider = new SystemTableTreeViewProvider(_columnManager);
- _columnSelectionListener = new HeaderSelectionListener();
-
-
- setContentProvider(_provider);
- setLabelProvider(_provider);
-
- _filter = new SystemTableViewFilter();
- addFilter(_filter);
-
- _charWidth = tableTree.getFont().getFontData()[0].getHeight() / 2;
- computeLayout();
-
- _menuManager = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- _menuManager.setRemoveAllWhenShown(true);
- _menuManager.addMenuListener(this);
- Menu menu = _menuManager.createContextMenu(tableTree);
- tableTree.setMenu(menu);
-
- addSelectionChangedListener(this);
-
- RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this);
-
- initDragAndDrop();
-
- tableTree.setVisible(false);
- // key listening for delete press
- getControl().addKeyListener(new KeyAdapter()
- {
- public void keyPressed(KeyEvent e)
- {
- handleKeyPressed(e);
- }
- });
- getControl().addMouseListener(new MouseAdapter()
- {
- public void mouseDown(MouseEvent e)
- {
- mouseButtonPressed = e.button; //d40615
- }
- });
- }
-
- public Layout getLayout()
- {
- return _layout;
- }
-
- public void setWorkbenchPart(IWorkbenchPart part)
- {
- _workbenchPart = part;
- }
-
- public void setViewFilters(String[] filter)
- {
- if (_filter.getFilters() != filter)
- {
- _filter.setFilters(filter);
- refresh();
- }
- }
-
- public String[] getViewFilters()
- {
- return _filter.getFilters();
- }
-
- /**
- * Return the popup menu for the table
- */
- public Menu getContextMenu()
- {
- return getTableTree().getMenu();
- }
- /**
- * Return the popup menu for the table
- */
- public MenuManager getContextMenuManager()
- {
- return _menuManager;
- }
-
- /**
- * Called whenever the input for the view changes
- */
- public void inputChanged(Object newObject, Object oldObject)
- {
- if (newObject instanceof IAdaptable)
- {
- getTableTree().setVisible(true);
- _objectInput = newObject;
-
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
- provider.getChildren(_objectInput);
-
- computeLayout();
-
- // reset the filter
- setViewFilters(null);
-
- super.inputChanged(newObject, oldObject);
-
- }
- else if (newObject == null)
- {
- getTableTree().setVisible(false);
- _objectInput = null;
- computeLayout();
-
- setViewFilters(null);
- }
- }
-
- public Object getInput()
- {
- return _objectInput;
- }
-
- /**
- * Convenience method for retrieving the view adapter for an object
- */
- protected ISystemViewElementAdapter getAdapter(Object obj)
- {
- return SystemAdapterHelpers.getAdapter(obj, this);
- }
-
- public SystemTableViewColumnManager getColumnManager()
- {
- return _columnManager;
- }
-
- private IPropertyDescriptor[] getCustomDescriptors(ISystemViewElementAdapter adapter)
- {
- return _columnManager.getVisibleDescriptors(adapter);
- }
-
- public IPropertyDescriptor[] getUniqueDescriptors()
- {
- return _uniqueDescriptors;
- }
-
- /**
- * Used to determine what the columns should be on the table.
- */
- public IPropertyDescriptor[] getVisibleDescriptors(Object object)
- {
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
- Object[] children = provider.getChildren(object);
- return getVisibleDescriptors(children);
- }
-
- private IPropertyDescriptor[] getVisibleDescriptors(Object[] children)
- {
- if (children != null && children.length > 0)
- {
- IAdaptable child = (IAdaptable) children[0];
- ISystemViewElementAdapter adapter = getAdapter(child);
- adapter.setPropertySourceInput(child);
- return getCustomDescriptors(adapter);
- }
-
- return new IPropertyDescriptor[0];
- }
-
-
-
- public IPropertyDescriptor getNameDescriptor(Object object)
- {
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
- Object[] children = provider.getChildren(object);
- return getNameDescriptor(children);
- }
-
- private IPropertyDescriptor getNameDescriptor(Object[] children)
- {
- if (children != null && children.length > 0)
- {
- IAdaptable child = (IAdaptable) children[0];
- return getAdapter(child).getPropertyDescriptors()[0];
- }
-
- return null;
- }
-
- /**
- * Used to determine the formats of each descriptor.
- */
- private ArrayList getFormatsIn()
- {
- ArrayList results = new ArrayList();
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
- Object[] children = provider.getChildren(_objectInput);
-
- if (children != null && children.length > 0)
- {
- IAdaptable child = (IAdaptable) children[0];
-
- Object adapter = child.getAdapter(ISystemViewElementAdapter.class);
- if (adapter instanceof ISystemViewElementAdapter)
- {
- ISystemViewElementAdapter ad = (ISystemViewElementAdapter) adapter;
- ad.setPropertySourceInput(child);
- IPropertyDescriptor[] descriptors = ad.getUniquePropertyDescriptors();
- for (int i = 0; i < descriptors.length; i++)
- {
- IPropertyDescriptor descriptor = descriptors[i];
-
- try
- {
- Object key = descriptor.getId();
-
- Object propertyValue = ad.getPropertyValue(key, false);
- results.add(propertyValue.getClass());
- }
- catch (Exception e)
- {
- results.add(String.class);
- }
-
- }
- }
- }
-
- return results;
- }
- protected void computeLayout()
- {
- computeLayout(false);
- }
-
- private boolean sameDescriptors(IPropertyDescriptor[] descriptors1, IPropertyDescriptor[] descriptors2)
- {
- if (descriptors1 == null || descriptors2 == null)
- {
- return false;
- }
- if (descriptors1.length == descriptors2.length)
- {
- boolean same = true;
- for (int i = 0; i < descriptors1.length && same; i++)
- {
- same = descriptors1[i] == descriptors2[i];
- }
- return same;
- }
- else
- {
- return false;
- }
- }
-
- private CellEditor getCellEditor(Tree parent, IPropertyDescriptor descriptor)
- {
- CellEditor editor = descriptor.createPropertyEditor(parent);
- if (editor instanceof SystemInheritableTextCellEditor)
- {
- ((SystemInheritableTextCellEditor) editor).getInheritableEntryField().setAllowEditingOfInheritedText(true);
- }
-
- return editor;
- }
-
- /**
- * Determines what columns should be shown in this view. The columns may change
- * anytime the view input changes. The columns in the control are modified and
- * columns may be added or deleted as necessary to make it conform to the
- * new data.
- */
- public void computeLayout(boolean force)
- {
- if (_objectInput == null)
- return;
-
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
- if (provider == null)
- return;
- Object[] children = provider.getChildren(_objectInput);
-
- // if no children, don't update
- if (children == null || children.length == 0 || (children.length == 1 && children[0] instanceof PendingUpdateAdapter))
- {
- return;
- }
-
- IPropertyDescriptor[] descriptors = getVisibleDescriptors(children);
- IPropertyDescriptor nameDescriptor = getNameDescriptor(children);
-
- int n = descriptors.length; // number of columns we need (name column + other columns)
- if (nameDescriptor != null)
- n += 1;
- if (n == 0)
- return; // there is nothing to lay out!
-
-
- if (sameDescriptors(descriptors,_uniqueDescriptors) && !force)
- {
- setLastColumnWidths(getCurrentColumnWidths());
- return;
- }
- _uniqueDescriptors = descriptors;
- Tree tree = getTree();
- if (tree == null || tree.isDisposed())
- return;
-
- // set column attributes, create new columns if necessary
- TreeColumn[] columns = tree.getColumns();
- int numColumns = columns.length; // number of columns in the control
- CellEditor editors[] = new CellEditor[n];
- String headings[] = new String[n];
- String propertyIds[] = new String[n];
- ArrayList formats = getFormatsIn();
-
-
- _layout = new TableLayout();
- for (int i = 0; i < n; i++)
- { // for each column
- String name = null;
- String propertyId = null;
- CellEditor editor = null;
- int alignment = SWT.LEFT;
- int weight = 100;
- if (i == 0)
- {
- // this is the first column -- treat it special
- name = SystemPropertyResources.RESID_PROPERTY_NAME_LABEL;
- propertyId = (String) nameDescriptor.getId();
- editor = getCellEditor(tree, nameDescriptor);
- weight = 200;
- }
- else
- { // these columns come from the regular descriptors
- IPropertyDescriptor descriptor = descriptors[i - 1];
-
- Class format = (Class) formats.get(i - 1);
- name = descriptor.getDisplayName();
- propertyId = (String) descriptor.getId();
- editor = getCellEditor(tree, descriptor);
- if (format != String.class)
- alignment = SWT.RIGHT;
- }
- TreeColumn tc = null;
- if (i >= numColumns)
- {
- tc = new TreeColumn(tree, alignment, i);
- tc.addSelectionListener(_columnSelectionListener);
-
- }
- else
- {
- tc = columns[i];
- tc.setAlignment(alignment);
- }
- _layout.addColumnData(new ColumnWeightData(weight));
- tc.setText(name);
- if (i == 0)
- {
- // tc.setImage(_downI);
- }
- headings[i] = name;
- editors[i] = editor;
- propertyIds[i] = propertyId;
- }
- setColumnProperties(propertyIds);
- setCellEditors(editors);
- setCellModifier(cellModifier);
-
- // dispose of any extra columns the tree control may have
- for (int i = n; i < numColumns; i++)
- {
- columns[i].dispose();
- columns[i] = null;
- }
-
- // compute column widths
- columns = tree.getColumns();
- numColumns = columns.length;
- Rectangle clientA = tree.getClientArea();
- int totalWidth = clientA.width - 5;
- if (totalWidth <= 0)
- {
- // find a default
- totalWidth = 500;
- }
-
-
- int[] lastWidths = getLastColumnWidths();
- if (numColumns > 1)
- {
- // check if previous widths can be used
- if (lastWidths != null && lastWidths.length == numColumns)
- {
-
- // use previously established widths
- setCurrentColumnWidths(lastWidths);
- }
- else
- {
- if (totalWidth > 0)
- {
- // no previous widths or number of columns has changed - need to calculate
- int averageWidth = totalWidth / numColumns;
- int firstWidth = Math.max(averageWidth, 150);
- averageWidth = (totalWidth - firstWidth) / (numColumns - 1);
- averageWidth = Math.max(averageWidth, 80);
- columns[0].setWidth(firstWidth);
- for (int i = 1; i < numColumns; i++)
- {
-
- columns[i].setWidth(averageWidth);
- }
- setLastColumnWidths(getCurrentColumnWidths());
- }
- }
- tree.setHeaderVisible(true);
- }
- else
- {
-
- if (numColumns == 1)
- {
- int width = totalWidth;
- if (lastWidths != null && lastWidths.length == 1)
- {
- width = (totalWidth > lastWidths[0]) ? totalWidth : lastWidths[0];
- }
-
-
- int maxWidth = provider.getMaxCharsInColumnZero() * _charWidth;
- if (maxWidth > width)
- {
- width = maxWidth;
- }
-
- if (width > 0)
- {
- columns[0].setWidth(width);
- }
- tree.setHeaderVisible(false);
- }
- }
- }
-
- public int[] getCurrentColumnWidths()
- {
- return new int[0];
- }
-
- public void setCurrentColumnWidths(int[] widths)
- {
- }
-
- public int[] getLastColumnWidths()
- {
- return _lastWidths;
- }
-
- public void setLastColumnWidths(int[] widths)
- {
- _lastWidths = widths;
- }
-
- protected void initDragAndDrop()
- {
- int ops = DND.DROP_COPY | DND.DROP_MOVE;
- Transfer[] transfers = new Transfer[] { PluginTransfer.getInstance(), TextTransfer.getInstance(), EditorInputTransfer.getInstance(), FileTransfer.getInstance()};
-
- addDragSupport(ops, transfers, new SystemViewDataDragAdapter(this));
- addDropSupport(ops | DND.DROP_DEFAULT, transfers, new SystemViewDataDropAdapter(this));
- }
-
- /**
- * Used to asynchronously update the view whenever properties change.
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- try
- {
- Tree tree = getTree();
- boolean isDisposed = tree.isDisposed();
- if (isDisposed)
- {
- dispose();
- return;
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- boolean madeChange = false;
- Object parent = event.getParent();
- Object child = event.getSource();
- int eventType = event.getType();
- switch (eventType)
- {
- case ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE :
- case ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE :
- {
- Widget w = findItem(child);
-
- if (w != null)
- {
- updateItem(w, child);
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_ADD :
- case ISystemResourceChangeEvents.EVENT_ADD_RELATIVE :
- {
- boolean addingConnection = (child instanceof IHost);
- if (_objectInput instanceof ISystemRegistry && addingConnection)
- {
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
-
- if (provider != null)
- {
- if (!madeChange)
- {
- provider.flushCache();
- madeChange = true;
- }
-
- computeLayout();
- internalRefresh(_objectInput);
- }
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_REFRESH:
- {
- Widget w = findItem(parent);
- if (w != null)
- {
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
- if (!madeChange)
- {
- provider.flushCache();
- madeChange = true;
- }
- internalRefresh(parent);
- }
- }
- break;
- default :
- break;
-
- }
-
- if (child == _objectInput || parent == _objectInput)
- {
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
-
- if (provider != null)
- {
- if (!madeChange)
- {
- //provider.flushCache();
- madeChange = true;
- }
-
- computeLayout();
- try
- {
- internalRefresh(_objectInput);
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(e.getMessage());
- }
- }
- }
- }
-
- /**
- * This is the method in your class that will be called when a remote resource
- * changes. You will be called after the resource is changed.
- * @see org.eclipse.rse.model.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- boolean madeChange = false;
- int eventType = event.getEventType();
- Object remoteResourceParent = event.getResourceParent();
- Object remoteResource = event.getResource();
- //boolean originatedHere = (event.getOriginatingViewer() == this);
- Vector remoteResourceNames = null;
- if (remoteResource instanceof Vector)
- {
- remoteResourceNames = (Vector) remoteResource;
- remoteResource = remoteResourceNames.elementAt(0);
- }
- String remoteResourceParentName = getRemoteResourceAbsoluteName(remoteResourceParent);
- String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource);
- if (remoteResourceName == null)
- return;
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
-
- switch (eventType)
- {
- // --------------------------
- // REMOTE RESOURCE CHANGED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CHANGED :
- {
- if (remoteResourceParent == getInput())
- {
- Widget w = findItem(remoteResource);
- if (w != null)
- {
- updateItem(w, remoteResource);
- }
-
- }
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE CREATED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED :
- {
- String inputResourceName = getRemoteResourceAbsoluteName(getInput());
- if (remoteResourceParentName != null && remoteResourceParentName.equals(inputResourceName))
- {
- if (provider == null)
- {
- return;
- }
- if (!madeChange)
- {
- provider.flushCache();
- madeChange = true;
- }
-
- refresh();
- }
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED :
- {
- {
- Object dchild = remoteResource;
-
- ISystemViewElementAdapter dadapt = getAdapter(dchild);
- if (dadapt != null)
- {
- ISubSystem dSubSystem = dadapt.getSubSystem(dchild);
- String dkey = dadapt.getAbsoluteName(dchild);
-
- if (provider != null)
- {
- Object[] children = provider.getChildren(_objectInput);
- for (int i = 0; i < children.length; i++)
- {
- Object existingChild = children[i];
- if (existingChild != null)
- {
- ISystemViewElementAdapter eadapt = getAdapter(existingChild);
- ISubSystem eSubSystem = eadapt.getSubSystem(existingChild);
-
- if (dSubSystem == eSubSystem)
- {
- String ekey = eadapt.getAbsoluteName(existingChild);
- if (ekey.equals(dkey))
- {
- if (!madeChange)
- {
- provider.flushCache();
- madeChange = true;
-
- // do a full refresh
- refresh();
- }
- }
- }
-
- }
- }
- }
- }
- }
-
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE RENAMED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
- {
- String oldName = event.getOldName();
- Object child = event.getResource();
-
- if (provider != null)
- {
- Object[] previousResults = provider.getCache();
- if (previousResults != null)
- {
- for (int i = 0; i < previousResults.length; i++)
- {
- Object previousResult = previousResults[i];
-
- if (previousResult == child)
- {
- Widget widget = findItem(previousResult);
- if (widget != null)
- {
- widget.setData(child);
- updateItem(widget, child);
- return;
- }
- }
- else
- {
- String previousName = getAdapter(previousResult).getAbsoluteName(previousResult);
-
- if (previousName != null && previousName.equals(oldName))
- {
- provider.flushCache();
- internalRefresh(_objectInput);
- return;
- }
- }
- }
-
- }
- }
- }
-
- break;
- }
- }
-
- /**
- * Turn a given remote object reference into a fully qualified absolute name
- */
- private String getRemoteResourceAbsoluteName(Object remoteResource)
- {
- if (remoteResource == null)
- return null;
- String remoteResourceName = null;
- if (remoteResource instanceof String)
- remoteResourceName = (String) remoteResource;
- else
- {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
- if (ra == null)
- return null;
- remoteResourceName = ra.getAbsoluteName(remoteResource);
- }
- return remoteResourceName;
- }
-
- public void selectionChanged(SelectionChangedEvent event)
- {
- _selectionFlagsUpdated = false;
- IStructuredSelection sel = (IStructuredSelection)event.getSelection();
- Object firstSelection = sel.getFirstElement();
- if (firstSelection == null)
- return;
-
- _selectionFlagsUpdated = false;
- ISystemViewElementAdapter adapter = getAdapter(firstSelection);
- if (adapter != null)
- {
- displayMessage(adapter.getStatusLineText(firstSelection));
- if ((mouseButtonPressed == LEFT_BUTTON))
- adapter.selectionChanged(firstSelection);
- }
- else
- clearMessage();
- }
-
- public void dispose()
- {
- removeAsListener();
-
- Composite tree = getTableTree();
-
- boolean isDisposed = tree.isDisposed();
-
- // dispose control if not disposed
- if (!isDisposed) {
- tree.dispose();
- }
- }
-
- /**
- * Display a message/status on the message/status line
- */
- public void displayMessage(String msg)
- {
- if (_messageLine != null)
- _messageLine.setMessage(msg);
- }
-
- /**
- * Convenience method for retrieving the view adapter for an object's children
- */
- public ISystemViewElementAdapter getAdapterForContents()
- {
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
- if (provider != null)
- {
- Object[] children = provider.getChildren(getInput());
- if (children != null && children.length > 0)
- {
- IAdaptable child = (IAdaptable) children[0];
- return getAdapter(child);
- }
- }
- return null;
- }
-
- /**
- * Clear message/status shown on the message/status line
- */
- public void clearMessage()
- {
- if (_messageLine != null)
- _messageLine.clearMessage();
- }
-
- /**
- * Remove as listener.
- */
- public void removeAsListener() {
-
- // remove listeners
- removeSelectionChangedListener(this);
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this);
-
- // for debugging
- //Composite tree = getTableTree();
- //boolean isDisposed = tree.isDisposed();
- }
-
-
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected PropertyDialogAction getPropertyDialogAction()
- {
- if (_propertyDialogAction == null)
- {
- _propertyDialogAction = new PropertyDialogAction(new SameShellProvider(getShell()), this);
- //propertyDialogAction.setToolTipText(" ");
- }
- _propertyDialogAction.selectionChanged(getSelection());
- return _propertyDialogAction;
- }
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected SystemRemotePropertiesAction getRemotePropertyDialogAction()
- {
- if (_remotePropertyDialogAction == null)
- {
- _remotePropertyDialogAction = new SystemRemotePropertiesAction(getShell());
- }
- _remotePropertyDialogAction.setSelection(getSelection());
- return _remotePropertyDialogAction;
- }
- /**
- * Return the select All action
- */
- protected IAction getSelectAllAction()
- {
- if (_selectAllAction == null)
- _selectAllAction = new SystemCommonSelectAllAction(getShell(), this, this);
- return _selectAllAction;
- }
-
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected IAction getRenameAction()
- {
- if (_renameAction == null)
- _renameAction = new SystemCommonRenameAction(getShell(), this);
- return _renameAction;
- }
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected IAction getDeleteAction()
- {
- if (_deleteAction == null)
- _deleteAction = new SystemCommonDeleteAction(getShell(), this);
- return _deleteAction;
- }
-
- /**
- * Return the refresh action
- */
- protected IAction getRefreshAction()
- {
- if (_refreshAction == null)
- _refreshAction = new SystemRefreshAction(getShell());
- return _refreshAction;
- }
- /*
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- *
- protected SystemCascadingOpenToAction getOpenToAction()
- {
- if (openToAction == null)
- openToAction = new SystemCascadingOpenToAction(getShell(),getWorkbenchWindow());
- return openToAction;
- } NOT USED YET */
- /**
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- */
- protected SystemOpenExplorerPerspectiveAction getOpenToPerspectiveAction()
- {
- if (_openToPerspectiveAction == null)
- {
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchWindow win = desktop.getActiveWorkbenchWindow();
-
- _openToPerspectiveAction = new SystemOpenExplorerPerspectiveAction(getShell(), win);
- }
- //getWorkbenchWindow());
- return _openToPerspectiveAction;
- }
-
- protected SystemShowInTableAction getShowInTableAction()
- {
- if (_showInTableAction == null)
- {
- _showInTableAction = new SystemShowInTableAction(getShell());
- }
- //getWorkbenchWindow());
- return _showInTableAction;
- }
-
- public Shell getShell()
- {
- return getTableTree().getShell();
- }
-
- /**
- * Required method from ISystemDeleteTarget.
- * Decides whether to even show the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showDelete()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionShowDeleteAction;
- }
- /**
- * Required method from ISystemDeleteTarget
- * Decides whether to enable the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canDelete()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionEnableDeleteAction;
- }
-
- /*
- * Required method from ISystemDeleteTarget
- */
- public boolean doDelete(IProgressMonitor monitor)
- {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- //int selectedCount = selection.size();
- //Object multiSource[] = new Object[selectedCount];
- //int idx = 0;
- Object element = null;
- //Object parentElement = getSelectedParent();
- ISystemViewElementAdapter adapter = null;
- boolean ok = true;
- boolean anyOk = false;
- Vector deletedVector = new Vector();
- try
- {
- while (ok && elements.hasNext())
- {
- element = elements.next();
- //multiSource[idx++] = element;
- adapter = getAdapter(element);
- ok = adapter.doDelete(getShell(), element, monitor);
- if (ok)
- {
- anyOk = true;
- deletedVector.addElement(element);
- }
- }
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- }
- catch (Exception exc)
- {
- String msg = exc.getMessage();
- if ((msg == null) || (exc instanceof ClassCastException))
- msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg));
- ok = false;
- }
- if (anyOk)
- {
- Object[] deleted = new Object[deletedVector.size()];
- for (int idx = 0; idx < deleted.length; idx++)
- deleted[idx] = deletedVector.elementAt(idx);
- if (_selectionIsRemoteObject)
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, deletedVector, null, null, null, this);
- else
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(deleted, ISystemResourceChangeEvents.EVENT_DELETE_MANY, getInput()));
- }
- return ok;
- }
-
- // ---------------------------
- // ISYSTEMRENAMETARGET METHODS
- // ---------------------------
-
- /**
- * Required method from ISystemRenameTarget.
- * Decides whether to even show the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showRename()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionShowRenameAction;
- }
- /**
- * Required method from ISystemRenameTarget
- * Decides whether to enable the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canRename()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionEnableRenameAction;
- }
-
- // default implementation
- // in default table, parent is input
- protected Object getParentForContent(Object element)
- {
- return _objectInput;
- }
-
- /**
- * Required method from ISystemRenameTarget
- */
- public boolean doRename(String[] newNames)
- {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- //int selectedCount = selection.size();
- Object element = null;
-
- ISystemViewElementAdapter adapter = null;
- ISystemRemoteElementAdapter remoteAdapter = null;
- String oldFullName = null;
- boolean ok = true;
- try
- {
- int nameIdx = 0;
- while (ok && elements.hasNext())
- {
- element = elements.next();
- adapter = getAdapter(element);
- Object parentElement = getParentForContent(element);
-
- remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter != null)
- oldFullName = remoteAdapter.getAbsoluteName(element);
- // pre-rename
- ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
- if (ok)
- {
- if (remoteAdapter != null) {
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), oldFullName, this);
- }
- else {
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
- }
- }
- }
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- }
- catch (Exception exc)
- {
- //String msg = exc.getMessage();
- //if ((msg == null) || (exc instanceof ClassCastException))
- // msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc),
- //msg),
- exc);
- ok = false;
- }
- return ok;
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- ISystemRemoteElementAdapter adapter = null;
- if (!(o instanceof IAdaptable))
- adapter = (ISystemRemoteElementAdapter) Platform.getAdapterManager().getAdapter(o, ISystemRemoteElementAdapter.class);
- else
- adapter = (ISystemRemoteElementAdapter) ((IAdaptable) o).getAdapter(ISystemRemoteElementAdapter.class);
- if ((adapter != null) && (adapter instanceof ISystemViewElementAdapter))
- ((ISystemViewElementAdapter) adapter).setViewer(this);
- return adapter;
- }
-
- /**
- * Return true if select all should be enabled for the given object.
- * For a tree view, you should return true if and only if the selected object has children.
- * You can use the passed in selection or ignore it and query your own selection.
- */
- public boolean enableSelectAll(IStructuredSelection selection)
- {
- return true;
- }
- /**
- * When this action is run via Edit->Select All or via Ctrl+A, perform the
- * select all action. For a tree view, this should select all the children
- * of the given selected object. You can use the passed in selected object
- * or ignore it and query the selected object yourself.
- */
- public void doSelectAll(IStructuredSelection selection)
- {
-
- Composite tree = getTableTree();
-
- Tree theTree = (Tree) tree;
- theTree.setSelection(theTree.getItems());
- TreeItem[] items = theTree.getItems();
- Object[] objects = new Object[items.length];
- for (int idx = 0; idx < items.length; idx++)
- objects[idx] = items[idx].getData();
- fireSelectionChanged(new SelectionChangedEvent(this, new StructuredSelection(objects)));
-
- }
-
- public void menuAboutToShow(IMenuManager manager)
- {
- SystemView.createStandardGroups(manager);
-
- if (!menuListenerAdded)
- {
- if (manager instanceof MenuManager)
- {
- Menu m = ((MenuManager)manager).getMenu();
- if (m != null)
- {
- menuListenerAdded = true;
- SystemViewMenuListener ml = new SystemViewMenuListener();
- if (_messageLine != null)
- ml.setShowToolTipText(true, _messageLine);
- m.addMenuListener(ml);
- }
- }
- }
- fillContextMenu(manager);
- }
-
- public ISelection getSelection()
- {
- ISelection selection = super.getSelection();
- if (selection == null || selection.isEmpty())
- {
- // make the selection the parent
- ArrayList list = new ArrayList();
- if (_objectInput != null)
- {
- list.add(_objectInput);
- selection = new StructuredSelection(list);
- }
- }
-
- return selection;
- }
-
- public void fillContextMenu(IMenuManager menu) {
-
- IStructuredSelection selection = (IStructuredSelection) getSelection();
-
- boolean allSelectionsFromSameParent = true;
- int selectionCount = selection.size();
-
-
-
- if (selectionCount == 0) // nothing selected
- {
- return;
- }
- else
- {
-
- if (selectionCount == 1) {
-
- if (selection.getFirstElement() == getInput()) {
- //return;
- }
- }
-
- if (selectionCount > 1)
- {
- allSelectionsFromSameParent = sameParent();
-
- if (!allSelectionsFromSameParent)
- {
- if (selectionHasAncestryRelationship())
- {
- // don't show the menu because actions with
- // multiple select on objects that are ancestors
- // of each other is problematic
- // still create the standard groups
- SystemView.createStandardGroups(menu);
- return;
- }
- }
- }
-
- // Partition into groups...
- SystemView.createStandardGroups(menu);
-
- // ADD COMMON ACTIONS...
-
- // COMMON RENAME ACTION...
- if (canRename())
- {
- if (showRename())
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getRenameAction());
- }
-
- // ADAPTER SPECIFIC ACTIONS
- SystemMenuManager ourMenu = new SystemMenuManager(menu);
-
- Iterator elements = selection.iterator();
- Hashtable adapters = new Hashtable();
- while (elements.hasNext())
- {
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- adapters.put(adapter, element); // want only unique adapters
- }
- Enumeration uniqueAdapters = adapters.keys();
- Shell shell = getShell();
- while (uniqueAdapters.hasMoreElements())
- {
- ISystemViewElementAdapter nextAdapter = (ISystemViewElementAdapter) uniqueAdapters.nextElement();
- nextAdapter.addActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
-
- if (nextAdapter instanceof AbstractSystemViewAdapter)
- {
-
- AbstractSystemViewAdapter aVA = (AbstractSystemViewAdapter)nextAdapter;
- // add remote actions
- aVA.addCommonRemoteActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
-
- // add dynamic menu popups
- aVA.addDynamicPopupMenuActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADDITIONS);
- }
- }
-
- // wail through all actions, updating shell and selection
- IContributionItem[] items = menu.getItems();
- for (int idx = 0; idx < items.length; idx++)
- {
- if ((items[idx] instanceof ActionContributionItem) && (((ActionContributionItem) items[idx]).getAction() instanceof ISystemAction))
- {
- ISystemAction item = (ISystemAction) (((ActionContributionItem) items[idx]).getAction());
- item.setInputs(getShell(), this, selection);
- }
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager) items[idx];
- item.setInputs(getShell(), this, selection);
- }
- }
-
- // COMMON DELETE ACTION...
- if (canDelete() && showDelete())
- {
- //menu.add(getDeleteAction());
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getDeleteAction());
- ((ISystemAction) getDeleteAction()).setInputs(getShell(), this, selection);
- menu.add(new Separator());
- }
-
- // PROPERTIES ACTION...
- // This is supplied by the system, so we pretty much get it for free. It finds the
- // registered propertyPages extension points registered for the selected object's class type.
- //propertyDialogAction.selectionChanged(selection);
-
- if (!_selectionIsRemoteObject) // is not a remote object
- {
- PropertyDialogAction pdAction = getPropertyDialogAction();
- if (pdAction.isApplicableForSelection())
- {
-
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- }
- // OPEN IN NEW PERSPECTIVE ACTION... if (fromSystemViewPart && showOpenViewActions())
- {
- //SystemCascadingOpenToAction openToAction = getOpenToAction();
- SystemOpenExplorerPerspectiveAction openToPerspectiveAction = getOpenToPerspectiveAction();
- SystemShowInTableAction showInTableAction = getShowInTableAction();
- openToPerspectiveAction.setSelection(selection);
- showInTableAction.setSelection(selection);
- //menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, openToAction.getSubMenu());
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, openToPerspectiveAction);
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, showInTableAction);
-
- }
- }
- else // is a remote object
- {
- //Object firstSelection = selection.getFirstElement();
- //ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(firstSelection);
- //logMyDebugMessage(this.getClass().getName(), ": there is a remote adapter");
- SystemRemotePropertiesAction pdAction = getRemotePropertyDialogAction();
- if (pdAction.isApplicableForSelection())
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- //else
- //logMyDebugMessage(this.getClass().getName(), ": but it is not applicable for selection");
- // --------------------------------------------------------------------------------------------------------------------
- // look for and add any popup menu actions registered via our org.eclipse.rse.core.popupMenus extension point...
- // --------------------------------------------------------------------------------------------------------------------
- if (_workbenchPart != null)
- {
- SystemPopupMenuActionContributorManager.getManager().contributeObjectActions(_workbenchPart, ourMenu, this, null);
- }
- }
-
- }
- }
-
- /**
- * This is called to ensure all elements in a multiple-selection have the same parent in the
- * tree viewer. If they don't we automatically disable all actions.
- * <p>
- * Designed to be as fast as possible by going directly to the SWT widgets
- */
- public boolean sameParent()
- {
- boolean same = true;
-
- Tree tree = getTree();
-
- TreeItem[] items = tree.getSelection();
-
- if ((items == null) || (items.length ==0)) {
- return true;
- }
-
- TreeItem prevParent = null;
- TreeItem currParent = null;
-
- for (int idx = 0; idx < items.length; idx++)
- {
- currParent = items[idx].getParentItem();
-
- if ((idx>0) && (currParent != prevParent)) {
- same = false;
- break;
- }
- else
- {
- prevParent = currParent;
- }
- }
- return same;
- }
-
- private boolean selectionHasAncestryRelationship() {
- Tree tree = getTree();
-
- TreeItem[] items = tree.getSelection();
-
- for (int idx=0; idx<items.length; idx++)
- {
- TreeItem item = items[idx];
-
- for (int c=0; c < items.length; c++)
- {
- if (item != items[c])
- {
- if (isAncestorOf(item, items[c], false))
- {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- /**
- * Returns whether an item is an ancestor of another item. The ancestor can be direct or indirect.
- * @param container the item which might be an ancestor.
- * @param item the child.
- * @param direct <code>true</code> if the container must be a direct ancestor of the child item,
- * <code>false</code> otherwise.
- * @return <code>true</code> if there is an ancestry relationship, <code>false</code> otherwise.
- */
- private boolean isAncestorOf(TreeItem container, TreeItem item, boolean direct)
- {
- TreeItem[] children = null;
-
- // does not have to be a direct ancestor
- if (!direct) {
- // get the children of the container's parent, i.e. the container's siblings
- // as well as itself
- TreeItem parent = container.getParentItem();
-
- // check if parent is null
- // parent is null if the container is a root item
- if (parent != null) {
- children = parent.getItems();
- }
- else {
- children = getTree().getItems();
- }
- }
- // must be a direct ancestor
- else {
- // get the children of the container
- children = container.getItems();
- }
-
- // go through all the children
- for (int i = 0; i < children.length; i++) {
-
- TreeItem child = children[i];
-
- // if one of the children matches the child item, return true
- if (child == item && direct) {
- return true;
- }
- // otherwise, go through children, and see if any of those are ancestors of
- // the child item
- else if (child.getItemCount() > 0) {
-
- // we check for direct ancestry
- if (isAncestorOf(child, item, true)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * --------------------------------------------------------------------------------
- * For many actions we have to walk the selection list and examine each selected
- * object to decide if a given common action is supported or not.
- * <p>
- * Walking this list multiple times while building the popup menu is a performance
- * hit, so we have this common method that does it only once, setting instance
- * variables for all of the decisions we are in interested in.
- * --------------------------------------------------------------------------------
- */
- protected void scanSelections()
- {
- // initial these variables to true. Then if set to false even once, leave as false always...
- _selectionShowRefreshAction = true;
- _selectionShowOpenViewActions = true;
- _selectionShowDeleteAction = true;
- _selectionShowRenameAction = true;
- _selectionEnableDeleteAction = true;
- _selectionEnableRenameAction = true;
- _selectionIsRemoteObject = true;
- _selectionFlagsUpdated = true;
-
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- while (elements.hasNext())
- {
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
-
- if (_selectionShowRefreshAction)
- _selectionShowRefreshAction = adapter.showRefresh(element);
-
- if (_selectionShowOpenViewActions)
- _selectionShowOpenViewActions = adapter.showOpenViewActions(element);
-
- if (_selectionShowDeleteAction)
- _selectionShowDeleteAction = adapter.showDelete(element);
-
- if (_selectionShowRenameAction)
- _selectionShowRenameAction = adapter.showRename(element);
-
- if (_selectionEnableDeleteAction)
- _selectionEnableDeleteAction = _selectionShowDeleteAction && adapter.canDelete(element);
- //System.out.println("ENABLE DELETE SET TO " + selectionEnableDeleteAction);
-
- if (_selectionEnableRenameAction)
- _selectionEnableRenameAction = _selectionShowRenameAction && adapter.canRename(element);
-
- if (_selectionIsRemoteObject)
- _selectionIsRemoteObject = (getRemoteAdapter(element) != null);
- }
-
- }
-
-
- public void positionTo(String name)
- {
- ArrayList selectedItems = new ArrayList();
- Tree tree = getTree();
- TreeItem topItem = null;
- for (int i = 0; i < tree.getItemCount(); i++)
- {
- TreeItem item = tree.getItem(i);
- Object data = item.getData();
- if (data instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = getAdapter(data);
- String itemName = adapter.getName(data);
-
- if (StringCompare.compare(name, itemName, false))
- {
- if (topItem == null)
- {
- topItem = item;
- }
- selectedItems.add(item);
- }
- }
- }
-
- if (selectedItems.size() > 0)
- {
- TreeItem[] tItems = new TreeItem[selectedItems.size()];
- for (int i = 0; i < selectedItems.size(); i++)
- {
- tItems[i] = (TreeItem) selectedItems.get(i);
- }
-
- tree.setSelection(tItems);
- tree.setTopItem(topItem);
- setSelection(getSelection(), true);
- }
- }
-
-
- protected void handleKeyPressed(KeyEvent event)
- {
- if ((event.character == SWT.DEL) && (event.stateMask == 0) && (((IStructuredSelection) getSelection()).size() > 0))
- {
- scanSelections();
- if (showDelete() && canDelete())
- {
- SystemCommonDeleteAction dltAction = (SystemCommonDeleteAction) getDeleteAction();
- dltAction.setShell(getShell());
- dltAction.setSelection(getSelection());
- dltAction.setViewer(this);
- dltAction.run();
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeViewProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeViewProvider.java
deleted file mode 100644
index 0b0ca264b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeViewProvider.java
+++ /dev/null
@@ -1,456 +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.view;
-
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-/**
- * This is the content and label provider for the SystemTableTreeView.
- * This class is used both to populate the SystemTableTreeView but also
- * to resolve the icon and labels for the cells in the table/tree.
- *
- */
-public class SystemTableTreeViewProvider implements ILabelProvider, ITableLabelProvider, ITreeContentProvider
-{
-
-
- private ListenerList listeners = new ListenerList(1);
-
- protected Object[] _lastResults = null;
- protected Object _lastObject = null;
- protected SimpleDateFormat _dateFormat = new SimpleDateFormat();
- protected Viewer _viewer = null;
- protected int _maxCharsInColumnZero = 0;
- private SystemDeferredTableTreeContentManager manager;
- private boolean _disableDeferredQueries = false;
-
- /**
- * The cache of images that have been dispensed by this provider.
- * Maps ImageDescriptor->Image.
- */
- private Map imageTable = new Hashtable(40);
- private SystemTableViewColumnManager _columnManager;
- private HashMap cache;
- /**
- * Constructor for table view provider where a column manager is present.
- * In this case, the columns are customizable by the user.
- * @param columnManager
- */
- public SystemTableTreeViewProvider(SystemTableViewColumnManager columnManager)
- {
- super();
- _columnManager= columnManager;
- cache = new HashMap();
- }
-
- public void inputChanged(Viewer visualPart, Object oldInput, Object newInput)
- {
- _viewer = visualPart;
- if (_viewer instanceof AbstractTreeViewer)
- {
- manager = new SystemDeferredTableTreeContentManager(this, (SystemTableTreeView)_viewer);
- }
- }
-
- public void setCache(Object[] newCache)
- {
- _lastResults = newCache;
- }
-
- public Object[] getCache()
- {
- return _lastResults;
- }
-
- public boolean flushCache()
- {
- if (_lastResults == null)
- {
- return false;
- }
- if (_lastObject instanceof ISystemContainer)
- {
- ((ISystemContainer)_lastObject).markStale(true);
- }
-
- _lastResults = null;
- return true;
- }
-
- public boolean isDeleted(Object element)
- {
- return false;
- }
-
- public Object[] getChildren(Object object)
- {
-
- return getElements(object);
- }
-
- public Object getParent(Object object)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- return adapter.getParent(object);
- }
- else
- {
- return null;
- }
- }
-
- public boolean hasChildren(Object object)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- return adapter.hasChildren(object);
- }
- if (manager != null) {
- if (manager.isDeferredAdapter(object))
- return manager.mayHaveChildren(object);
- }
- return false;
- }
-
- public Object getElementAt(Object object, int i)
- {
-
- return null;
- }
-
-
-
- protected ISystemViewElementAdapter getAdapterFor(Object object)
- {
- ISystemViewElementAdapter result = null;
- if (_viewer != null)
- {
- result = SystemAdapterHelpers.getAdapter(object, _viewer);
- }
- else
- {
- result = SystemAdapterHelpers.getAdapter(object);
- }
- if (result == null)
- {
- return null;
- }
- result.setPropertySourceInput(object);
- return result;
- }
-
- public Object[] getElements(Object object)
- {
- Object[] results = null;
- if (object == _lastObject && _lastResults != null)
- {
- return _lastResults;
- }
- else
- if (object instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- adapter.setViewer(_viewer);
-
-
-
- if (adapter.hasChildren(object))
- {
- if (supportsDeferredQueries())
- {
- if (manager != null && adapter.supportsDeferredQueries())
- {
- ISubSystem ss = adapter.getSubSystem(object);
- if (ss != null)
- {
- // if (ss.isConnected())
- {
-
- results = manager.getChildren(object);
- }
- }
- }
- }
- else
- {
- results = adapter.getChildren(object);
- }
- if (adapter instanceof SystemViewRootInputAdapter && results != null)
- {
- ArrayList filterredResults = new ArrayList();
- for (int i = 0; i < results.length; i++)
- {
- Object result = results[i];
- ISystemViewElementAdapter cadapter = getAdapterFor(result);
- if (!(cadapter instanceof SystemViewPromptableAdapter))
- {
- filterredResults.add(result);
- }
- }
- results = filterredResults.toArray();
- }
-
- _lastResults = results;
- _lastObject = object;
- }
- }
- if (results == null)
- {
- return new Object[0];
- }
-
- return results;
- }
-
-
- public String getText(Object object)
- {
- String result = null;
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- result = adapter.getText(object);
- }
- else
- {
- IWorkbenchAdapter wadapter = (IWorkbenchAdapter)((IAdaptable) object).getAdapter(IWorkbenchAdapter.class);
-
- if (wadapter == null)
- {
- return object.toString();
- }
- return wadapter.getLabel(object);
- }
- if (result != null)
- {
- int len = result.length();
- if (len > _maxCharsInColumnZero)
- {
- _maxCharsInColumnZero = len;
- }
- }
- else
- {
- result = ""; //$NON-NLS-1$
- }
- return result;
- }
-
- public int getMaxCharsInColumnZero()
- {
- return _maxCharsInColumnZero;
- }
-
- public Image getImage(Object object)
- {
- ImageDescriptor descriptor = null;
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- descriptor = adapter.getImageDescriptor(object);
- }
- else
- {
- IWorkbenchAdapter wadapter = (IWorkbenchAdapter)((IAdaptable) object).getAdapter(IWorkbenchAdapter.class);
- if (wadapter == null)
- {
- return null;
- }
- else
- {
- descriptor = wadapter.getImageDescriptor(object);
- }
- }
-
- Image image = null;
- if (descriptor != null)
- {
- Object iobj = imageTable.get(descriptor);
- if (iobj == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- else
- {
- image = (Image) iobj;
- }
- }
-
- return image;
- }
-
-
- public String getColumnText(Object obj, int index)
- {
- if (index == 0)
- {
- // get the first descriptor
- return getText(obj);
- }
- else
- {
-
- index = index - 1;
- ISystemViewElementAdapter adapter = getAdapterFor(obj);
- if (adapter == null)
- {
- return null;
- }
-
-
- IPropertyDescriptor[] descriptors = null;
- if (_columnManager != null)
- {
- descriptors = _columnManager.getVisibleDescriptors(adapter);
- }
- else
- {
- descriptors = adapter.getUniquePropertyDescriptors();
- }
-
- if (descriptors.length > index)
- {
- IPropertyDescriptor descriptor = descriptors[index];
-
- try
- {
- Object key = descriptor.getId();
-
- Object propertyValue = adapter.getPropertyValue(key);
-
- if (propertyValue instanceof String)
- {
- return (String) propertyValue;
- }
- else if (propertyValue instanceof Date)
- {
- return _dateFormat.format((Date)propertyValue);
- }
- else
- if (propertyValue != null)
- {
- return propertyValue.toString();
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- return ""; //$NON-NLS-1$
- }
-
- }
-
- public Image getColumnImage(Object obj, int i)
- {
- if (i == 0)
- {
- return getImage(obj);
- }
- else
- {
- return null;
- }
- }
-
- public void addListener(ILabelProviderListener listener)
- {
- listeners.add(listener);
- }
-
- public boolean isLabelProperty(Object element, String property)
- {
- return true;
- }
-
- public void removeListener(ILabelProviderListener listener)
- {
- listeners.remove(listener);
- }
-
- /**
- * Cache the objects for the given parent.
- * @param parent the parent object.
- * @param children the children to cache.
- */
- public void setCachedObjects(Object parent, Object[] children) {
- cache.put(parent, children);
- _lastObject = parent;
- _lastResults = children;
- }
-
- /**
- * Returns the cached objects for the given parent.
- * @param parent the parent object.
- * @return the cached children.
- */
- public Object[] getCachedObjects(Object parent) {
- return (Object[])(cache.get(parent));
- }
-
- /**
- * The visual part that is using this content provider is about
- * to be disposed. Deallocate all allocated SWT resources.
- */
- public void dispose() {
- }
-
- public void disableDeferredQueries(boolean disable)
- {
- _disableDeferredQueries = disable;
- }
-
- protected boolean supportsDeferredQueries()
- {
- if (_disableDeferredQueries)
- return false;
- //IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- //return store.getBoolean(ISystemPreferencesConstants.USE_DEFERRED_QUERIES);
- return true; // DKM now enforcing deferred queries
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 91f07633e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java
+++ /dev/null
@@ -1,1906 +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.view;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-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.SystemPopupMenuActionContributorManager;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemRemoteChangeEvent;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemRemoteChangeListener;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.services.clientserver.StringCompare;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemDeleteTarget;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.ISystemRenameTarget;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.ui.actions.SystemOpenExplorerPerspectiveAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.actions.SystemRemotePropertiesAction;
-import org.eclipse.rse.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Layout;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.part.EditorInputTransfer;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-/**
- * This subclass of the standard JFace table viewer is used to
- * show a generic table view of the selected object in the Systems view
- * <p>
- */
-public class SystemTableView
- extends TableViewer
- implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelectAllTarget, ISystemResourceChangeListener, ISystemRemoteChangeListener, ISelectionChangedListener, ISelectionProvider
-{
-
-
- // inner class to support cell editing
- private ICellModifier cellModifier = new ICellModifier()
- {
- public Object getValue(Object element, String property)
- {
- ISystemViewElementAdapter adapter = getAdapter(element);
- adapter.setPropertySourceInput(element);
- Object value = adapter.getPropertyValue(property);
- if (value == null)
- {
- value = ""; //$NON-NLS-1$
- }
- return value;
- }
-
- public boolean canModify(Object element, String property)
- {
- boolean modifiable = true;
- return modifiable;
- }
-
- public void modify(Object element, String property, Object value)
- {
- if (element instanceof TableItem && value != null)
- {
- Object obj = ((TableItem) element).getData();
- ISystemViewElementAdapter adapter = getAdapter(obj);
- if (adapter != null)
- {
- adapter.setPropertyValue(property, value);
-
- SelectionChangedEvent event = new SelectionChangedEvent(SystemTableView.this, getSelection());
-
- // fire the event
- fireSelectionChanged(event);
- }
- }
- }
- };
-
- private class HeaderSelectionListener extends SelectionAdapter
- {
-
- public HeaderSelectionListener()
- {
- _upI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID);
- _downI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID);
- }
-
-
- /**
- * Handles the case of user selecting the
- * header area.
- * <p>If the column has not been selected previously,
- * it will set the sorter of that column to be
- * the current table view sorter. Repeated
- * presses on the same column header will
- * toggle sorting order (ascending/descending).
- */
- public void widgetSelected(SelectionEvent e)
- {
- Table table = getTable();
- if (!table.isDisposed())
- {
- // column selected - need to sort
- TableColumn tcolumn = (TableColumn)e.widget;
- int column = table.indexOf(tcolumn);
- SystemTableViewSorter oldSorter = (SystemTableViewSorter) getSorter();
- if (oldSorter != null && column == oldSorter.getColumnNumber())
- {
- oldSorter.setReversed(!oldSorter.isReversed());
- if (tcolumn.getImage() == _upI)
- {
- tcolumn.setImage(_downI);
- }
- else
- {
- tcolumn.setImage(_upI);
- }
- }
- else
- {
- setSorter(new SystemTableViewSorter(column, SystemTableView.this, _columnManager));
- tcolumn.setImage(_downI);
- }
-
- // unset image of other columns
- TableColumn[] allColumns = table.getColumns();
- for (int i = 0; i < allColumns.length; i++)
- {
- if (i != column)
- {
- if (allColumns[i].getImage() != null)
- {
- allColumns[i].setImage(null);
- }
- }
- }
- refresh();
- }
- }
- }
-
- private Object _objectInput;
- private TableLayout _layout;
- protected SystemTableViewProvider _provider;
- private HeaderSelectionListener _columnSelectionListener;
- private MenuManager _menuManager;
- private SystemTableViewFilter _filter;
- private IPropertyDescriptor[] _uniqueDescriptors;
- private SystemTableViewColumnManager _columnManager;
-
- // these variables were copied from SystemView to allow for limited support
- // of actions. I say limited because somethings don't yet work properly.
- protected SystemRefreshAction _refreshAction;
- protected PropertyDialogAction _propertyDialogAction;
- protected SystemRemotePropertiesAction _remotePropertyDialogAction;
- protected SystemOpenExplorerPerspectiveAction _openToPerspectiveAction;
- protected SystemShowInTableAction _showInTableAction;
-
- // global actions
- // Note the Edit menu actions are set in SystemViewPart. Here we use these
- // actions from our own popup menu actions.
- protected SystemCommonDeleteAction _deleteAction;
- // for global delete menu item
- protected SystemCommonRenameAction _renameAction;
- // for common rename menu item
- protected SystemCommonSelectAllAction _selectAllAction;
- // for common Ctrl+A select-all
-
- protected boolean _selectionShowRefreshAction;
- protected boolean _selectionShowOpenViewActions;
- protected boolean _selectionShowDeleteAction;
- protected boolean _selectionShowRenameAction;
- protected boolean _selectionEnableDeleteAction;
- protected boolean _selectionEnableRenameAction;
-
- protected boolean _selectionIsRemoteObject = true;
- protected boolean _selectionFlagsUpdated = false;
-
- private IWorkbenchPart _workbenchPart = null;
- private ISystemMessageLine _messageLine;
-
- private int[] _lastWidths = null;
- private int _charWidth = 3;
-
- private boolean _showColumns = true;
-
- private Image _upI;
- private Image _downI;
-
- protected boolean menuListenerAdded = false;
-
- private static final int LEFT_BUTTON = 1;
- private int mouseButtonPressed = LEFT_BUTTON;
- /**
- * Constructor for the table view
- *
- */
- public SystemTableView(Table table, ISystemMessageLine msgLine)
- {
- super(table);
- _layout = new TableLayout();
- _messageLine = msgLine;
-
- _columnManager = new SystemTableViewColumnManager(this);
- _provider = getProvider();
- _columnSelectionListener = new HeaderSelectionListener();
-
- setContentProvider(_provider);
-
- setLabelProvider(new SystemDecoratingLabelProvider(_provider, PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
- //setLabelProvider(_provider);
-
- _filter = new SystemTableViewFilter();
- addFilter(_filter);
-
- _charWidth = table.getFont().getFontData()[0].getHeight() / 2;
- computeLayout();
-
- _menuManager = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- _menuManager.setRemoveAllWhenShown(true);
- _menuManager.addMenuListener(this);
- Menu menu = _menuManager.createContextMenu(table);
- table.setMenu(menu);
-
- addSelectionChangedListener(this);
-
- RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this);
-
- initDragAndDrop();
-
- table.setVisible(false);
-
- // key listening for delete press
- getControl().addKeyListener(new KeyAdapter()
- {
- public void keyPressed(KeyEvent e)
- {
- handleKeyPressed(e);
- }
- });
- getControl().addMouseListener(new MouseAdapter()
- {
- public void mouseDown(MouseEvent e)
- {
- mouseButtonPressed = e.button; //d40615
- }
- });
-
-
- _upI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_ARROW_UP_ID);
- _downI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_ARROW_DOWN_ID);
- }
-
- protected SystemTableViewProvider getProvider()
- {
- if (_provider == null)
- {
- _provider = new SystemTableViewProvider(_columnManager);
- }
- return _provider;
- }
-
- public void showColumns(boolean flag)
- {
- _showColumns = flag;
- }
-
-
- public Layout getLayout()
- {
- return _layout;
- }
-
- public void setWorkbenchPart(IWorkbenchPart part)
- {
- _workbenchPart = part;
- }
-
- public void setViewFilters(String[] filter)
- {
- if (_filter.getFilters() != filter)
- {
- _filter.setFilters(filter);
- refresh();
- }
- }
-
- public String[] getViewFilters()
- {
- return _filter.getFilters();
- }
-
- /**
- * Return the popup menu for the table
- */
- public Menu getContextMenu()
- {
- return getTable().getMenu();
- }
- /**
- * Return the popup menu for the table
- */
- public MenuManager getContextMenuManager()
- {
- return _menuManager;
- }
-
- /**
- * Called whenever the input for the view changes
- */
- public void inputChanged(Object newObject, Object oldObject)
- {
- if (newObject instanceof IAdaptable)
- {
- getTable().setVisible(true);
- _objectInput = newObject;
- computeLayout();
-
- // reset the filter
- //setViewFilters(null);
-
- super.inputChanged(newObject, oldObject);
-
- }
- else if (newObject == null)
- {
- getTable().setVisible(false);
- _objectInput = null;
- computeLayout();
-
- setViewFilters(null);
- }
- }
-
- public Object getInput()
- {
- return _objectInput;
- }
-
- /**
- * Convenience method for retrieving the view adapter for an object
- */
- protected ISystemViewElementAdapter getAdapter(Object obj)
- {
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getAdapter(obj, this);
- if (adapter != null)
- adapter.setPropertySourceInput(obj);
- return adapter;
- }
-
- /**
- * Convenience method for retrieving the view adapter for an object's children
- */
- public ISystemViewElementAdapter getAdapterForContents()
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- Object[] children = provider.getChildren(getInput());
- if (children != null && children.length > 0)
- {
- IAdaptable child = (IAdaptable) children[0];
- return getAdapter(child);
- }
- return null;
- }
-
- /**
- * Used to determine what the columns should be on the table.
- */
- public IPropertyDescriptor[] getVisibleDescriptors(Object object)
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- Object[] children = provider.getChildren(object);
- return getVisibleDescriptors(children);
- }
-
- private IPropertyDescriptor[] getVisibleDescriptors(Object[] children)
- {
- if (children != null && children.length > 0)
- {
- IAdaptable child = (IAdaptable) children[0];
- return getCustomDescriptors(getAdapter(child));
- }
-
- return new IPropertyDescriptor[0];
- }
-
- public SystemTableViewColumnManager getColumnManager()
- {
- return _columnManager;
- }
-
- public IPropertyDescriptor getNameDescriptor(Object object)
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- Object[] children = provider.getChildren(object);
- return getNameDescriptor(children);
- }
-
- private IPropertyDescriptor getNameDescriptor(Object[] children)
- {
- if (children != null && children.length > 0)
- {
- IAdaptable child = (IAdaptable) children[0];
- return getAdapter(child).getPropertyDescriptors()[0];
- }
-
- return null;
- }
-
- /**
- * Used to determine the formats of each descriptor.
- */
- private ArrayList getFormatsIn()
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- Object[] children = provider.getChildren(_objectInput);
- return getFormatsIn(children);
- }
-
- private IPropertyDescriptor[] getCustomDescriptors(ISystemViewElementAdapter adapter)
- {
- return _columnManager.getVisibleDescriptors(adapter);
- }
-
- private ArrayList getFormatsIn(Object[] children)
- {
- ArrayList results = new ArrayList();
-
- if (children != null && children.length > 0)
- {
- IAdaptable child = (IAdaptable) children[0];
-
- Object adapter = child.getAdapter(ISystemViewElementAdapter.class);
- if (adapter instanceof ISystemViewElementAdapter)
- {
- ISystemViewElementAdapter ad = (ISystemViewElementAdapter) adapter;
- ad.setPropertySourceInput(child);
-
- IPropertyDescriptor[] descriptors = getCustomDescriptors(ad);
- for (int i = 0; i < descriptors.length; i++)
- {
- IPropertyDescriptor descriptor = descriptors[i];
-
- try
- {
- Object key = descriptor.getId();
-
- Object propertyValue = ad.getPropertyValue(key, false);
- results.add(propertyValue.getClass());
- }
- catch (Exception e)
- {
- results.add(String.class);
- }
-
- }
- }
- }
-
- return results;
- }
-
- public void computeLayout()
- {
- computeLayout(false);
- }
-
- private CellEditor getCellEditor(Table parent, IPropertyDescriptor descriptor)
- {
- CellEditor editor = descriptor.createPropertyEditor(parent);
- if (editor instanceof SystemInheritableTextCellEditor)
- {
- ((SystemInheritableTextCellEditor) editor).getInheritableEntryField().setAllowEditingOfInheritedText(true);
- }
-
- return editor;
- }
-
- private boolean sameDescriptors(IPropertyDescriptor[] descriptors1, IPropertyDescriptor[] descriptors2)
- {
- if (descriptors1 == null || descriptors2 == null)
- {
- return false;
- }
- if (descriptors1.length == descriptors2.length)
- {
- boolean same = true;
- for (int i = 0; i < descriptors1.length && same; i++)
- {
- same = descriptors1[i] == descriptors2[i];
- }
- return same;
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Determines what columns should be shown in this view. The columns may change
- * anytime the view input changes. The columns in the control are modified and
- * columns may be added or deleted as necessary to make it conform to the
- * new data.
- */
- public void computeLayout(boolean force)
- {
- if (_showColumns == false)
- return;
- if (_objectInput == null)
- return;
-
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
- Object[] children = provider.getChildren(_objectInput);
-
- // if no children, don't update
- if (children == null || children.length == 0)
- {
- return;
- }
-
- IPropertyDescriptor[] descriptors = getVisibleDescriptors(children);
- IPropertyDescriptor nameDescriptor = getNameDescriptor(children);
-
- int n = descriptors.length; // number of columns we need (name column + other columns)
- if (nameDescriptor != null)
- n += 1;
- if (n == 0)
- return; // there is nothing to lay out!
-
-
- if (sameDescriptors(descriptors,_uniqueDescriptors) && !force)
- {
- setLastColumnWidths(getCurrentColumnWidths());
- return;
- }
- _uniqueDescriptors = descriptors;
- Table table = getTable();
- if (table == null || table.isDisposed())
- return;
-
- // set column attributes, create new columns if necessary
- TableColumn[] columns = table.getColumns();
- int numColumns = columns.length; // number of columns in the control
- CellEditor editors[] = new CellEditor[n];
- String headings[] = new String[n];
- String propertyIds[] = new String[n];
- ArrayList formats = getFormatsIn();
-
-
- _layout = new TableLayout();
- for (int i = 0; i < n; i++)
- { // for each column
- String name = null;
- String propertyId = null;
- CellEditor editor = null;
- int alignment = SWT.LEFT;
- int weight = 100;
- if (i == 0)
- {
- // this is the first column -- treat it special
- name = SystemPropertyResources.RESID_PROPERTY_NAME_LABEL;
- propertyId = (String) nameDescriptor.getId();
- editor = getCellEditor(table, nameDescriptor);
- weight = 200;
- }
- else
- { // these columns come from the regular descriptors
- IPropertyDescriptor descriptor = descriptors[i - 1];
-
- Class format = (Class) formats.get(i - 1);
- name = descriptor.getDisplayName();
- propertyId = (String) descriptor.getId();
- editor = getCellEditor(table, descriptor);
- if (format != String.class)
- alignment = SWT.RIGHT;
- }
- TableColumn tc = null;
- if (i >= numColumns)
- {
- tc = new TableColumn(table, alignment, i);
- tc.setMoveable(true);
- tc.addSelectionListener(_columnSelectionListener);
- }
- else
- {
- tc = columns[i];
- tc.setAlignment(alignment);
- }
- _layout.addColumnData(new ColumnWeightData(weight));
- tc.setText(name);
- if (i == 0)
- {
- // tc.setImage(_downI);
- }
- headings[i] = name;
- editors[i] = editor;
- propertyIds[i] = propertyId;
- }
- setColumnProperties(propertyIds);
- setCellEditors(editors);
- setCellModifier(cellModifier);
-
- // dispose of any extra columns the table control may have
- for (int i = n; i < numColumns; i++)
- {
- columns[i].dispose();
- columns[i] = null;
- }
-
- // compute column widths
- columns = table.getColumns();
- numColumns = columns.length;
- Rectangle clientA = table.getClientArea();
- int totalWidth = clientA.width - 5;
- if (totalWidth <= 0)
- {
- // find a default
- totalWidth = 500;
- }
-
-
- int[] lastWidths = getLastColumnWidths();
- if (numColumns > 1)
- {
- // check if previous widths can be used
- if (lastWidths != null && lastWidths.length == numColumns)
- {
-
- // use previously established widths
- setCurrentColumnWidths(lastWidths);
- }
- else
- {
- if (totalWidth > 0)
- {
- // no previous widths or number of columns has changed - need to calculate
- int averageWidth = totalWidth / numColumns;
- int firstWidth = Math.max(averageWidth, 150);
- averageWidth = (totalWidth - firstWidth) / (numColumns - 1);
- averageWidth = Math.max(averageWidth, 80);
- columns[0].setWidth(firstWidth);
- for (int i = 1; i < numColumns; i++)
- {
-
- columns[i].setWidth(averageWidth);
- }
- setLastColumnWidths(getCurrentColumnWidths());
- }
- }
- table.setHeaderVisible(true);
- }
- else
- {
-
- if (numColumns == 1)
- {
- int width = totalWidth;
- if (lastWidths != null && lastWidths.length == 1)
- {
- width = (totalWidth > lastWidths[0]) ? totalWidth : lastWidths[0];
- }
-
-
- int maxWidth = provider.getMaxCharsInColumnZero() * _charWidth;
- if (maxWidth > width)
- {
- width = maxWidth;
- }
-
- if (width > 0)
- {
- columns[0].setWidth(width);
- }
- table.setHeaderVisible(false);
- }
- }
- }
-
- public int[] getCurrentColumnWidths()
- {
- Table table = getTable();
- if (table != null && !table.isDisposed())
- {
- int[] widths = new int[table.getColumnCount()];
- TableColumn[] columns = table.getColumns();
- for (int i = 0; i < columns.length; i++)
- {
- widths[i] = columns[i].getWidth();
- }
- return widths;
- }
-
- return new int[0];
- }
-
- public void setCurrentColumnWidths(int[] widths)
- {
- Table table = getTable();
- if (table != null && !table.isDisposed())
- {
- TableColumn[] columns = table.getColumns();
- for (int i = 0; i < columns.length && i < widths.length; i++)
- {
- columns[i].setWidth(widths[i]);
- }
- }
- }
-
- public int[] getLastColumnWidths()
- {
- return _lastWidths;
- }
-
- public void setLastColumnWidths(int[] widths)
- {
- _lastWidths = widths;
- }
-
- protected void initDragAndDrop()
- {
- int ops = DND.DROP_COPY | DND.DROP_MOVE;
- Transfer[] transfers = new Transfer[] { PluginTransfer.getInstance(), TextTransfer.getInstance(), EditorInputTransfer.getInstance(), FileTransfer.getInstance()};
-
- addDragSupport(ops, transfers, new SystemViewDataDragAdapter(this));
- addDropSupport(ops | DND.DROP_DEFAULT, transfers, new SystemViewDataDropAdapter(this));
- }
-
- /**
- * Used to asynchronously update the view whenever properties change.
- * @see org.eclipse.rse.model.ISystemResourceChangeListener#systemResourceChanged(org.eclipse.rse.model.ISystemResourceChangeEvent)
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
-
- boolean madeChange = false;
- Object parent = event.getParent();
- Object child = event.getSource();
- int eventType = event.getType();
- switch (eventType)
- {
- case ISystemResourceChangeEvents.EVENT_RENAME_FILTER_REFERENCE:
- case ISystemResourceChangeEvents.EVENT_CHANGE_FILTER_REFERENCE:
- case ISystemResourceChangeEvents.EVENT_CHANGE_FILTERSTRING_REFERENCE:
- {
- if (_objectInput instanceof ISystemFilterReference)
- {
- if (child == ((ISystemFilterReference)_objectInput).getReferencedFilter())
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
-
- if (provider != null)
- {
- if (!madeChange)
- {
- provider.flushCache();
- madeChange = true;
- }
-
- computeLayout();
- try
- {
- internalRefresh(_objectInput);
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(e.getMessage());
- }
- }
-
- }
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE :
- case ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE :
- case ISystemResourceChangeEvents.EVENT_ICON_CHANGE:
- {
- try
- {
- Widget w = findItem(child);
- if (w != null)
- {
- updateItem(w, child);
- }
- }
- catch (Exception e)
- {
-
- }
- }
- return;
- //break;
-
- case ISystemResourceChangeEvents.EVENT_DELETE:
- case ISystemResourceChangeEvents.EVENT_DELETE_MANY:
- {
- if (child instanceof ISystemFilterReference)
- {
- Widget w = findItem(child);
- if (w != null)
- {
- remove(child);
- }
- }
- }
- break;
-
- case ISystemResourceChangeEvents.EVENT_ADD :
- case ISystemResourceChangeEvents.EVENT_ADD_RELATIVE :
- {
- boolean addingConnection = (child instanceof IHost);
- if (_objectInput instanceof ISystemRegistry && addingConnection)
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
-
- if (provider != null)
- {
- if (!madeChange)
- {
- provider.flushCache();
- madeChange = true;
- }
-
- computeLayout();
- internalRefresh(_objectInput);
- }
- }
- }
- break;
-
- case ISystemResourceChangeEvents.EVENT_REFRESH:
- {
- if (child == RSEUIPlugin.getTheSystemRegistry())
- {
- // treat this as refresh all
- child = _objectInput;
- }
- }
- break;
- default :
- break;
-
- }
-
- if (child == _objectInput || parent == _objectInput)
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
-
- if (provider != null)
- {
- if (!madeChange)
- {
- provider.flushCache();
- madeChange = true;
- }
-
- computeLayout();
- try
- {
- internalRefresh(_objectInput);
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(e.getMessage());
- }
- }
- }
- }
-
- /**
- * This is the method in your class that will be called when a remote resource
- * changes. You will be called after the resource is changed.
- * @see org.eclipse.rse.model.ISystemRemoteChangeListener#systemRemoteResourceChanged(org.eclipse.rse.model.ISystemRemoteChangeEvent)
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- boolean madeChange = false;
- int eventType = event.getEventType();
- Object remoteResourceParent = event.getResourceParent();
- Object remoteResource = event.getResource();
- Vector remoteResourceNames = null;
- if (remoteResource instanceof Vector)
- {
- remoteResourceNames = (Vector) remoteResource;
- remoteResource = remoteResourceNames.elementAt(0);
- }
- String remoteResourceParentName = getRemoteResourceAbsoluteName(remoteResourceParent);
- String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource);
- if (remoteResourceName == null)
- return;
- SystemTableViewProvider provider = (SystemTableViewProvider) getContentProvider();
-
- if (_objectInput instanceof ISystemContainer && ((ISystemContainer)_objectInput).isStale())
- {
- provider.flushCache();
- refresh();
- return;
- }
-
- switch (eventType)
- {
- // --------------------------
- // REMOTE RESOURCE CHANGED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CHANGED :
- {
- if (remoteResourceParent == getInput())
- {
- Widget w = findItem(remoteResource);
- if (w != null)
- {
- updateItem(w, remoteResource);
- }
-
- }
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE CREATED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED :
- {
- String inputResourceName = getRemoteResourceAbsoluteName(getInput());
- if (remoteResourceParentName != null && remoteResourceParentName.equals(inputResourceName))
- {
- if (provider == null)
- {
- return;
- }
- if (!madeChange)
- {
- provider.flushCache();
- madeChange = true;
- }
-
- refresh();
- }
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED :
- {
- {
- Object dchild = remoteResource;
-
- ISystemViewElementAdapter dadapt = getAdapter(dchild);
- if (dadapt != null)
- {
- ISubSystem dSubSystem = dadapt.getSubSystem(dchild);
- String dkey = dadapt.getAbsoluteName(dchild);
-
- if (provider != null)
- {
- Object[] children = provider.getChildren(_objectInput);
- for (int i = 0; i < children.length; i++)
- {
- Object existingChild = children[i];
- if (existingChild != null)
- {
- ISystemViewElementAdapter eadapt = getAdapter(existingChild);
- ISubSystem eSubSystem = eadapt.getSubSystem(existingChild);
-
- if (dSubSystem == eSubSystem)
- {
- String ekey = eadapt.getAbsoluteName(existingChild);
- if (ekey.equals(dkey))
- {
- if (!madeChange)
- {
- if (_objectInput instanceof ISystemContainer)
- {
- ((ISystemContainer)_objectInput).markStale(true);
- }
-
- provider.flushCache();
- madeChange = true;
-
- // do a full refresh
- refresh();
- }
- }
- }
-
- }
- }
- }
- }
- }
-
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE RENAMED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
- {
- String oldName = event.getOldName();
- Object child = event.getResource();
-
- if (provider != null)
- {
- Object[] previousResults = provider.getCache();
- if (previousResults != null)
- {
- for (int i = 0; i < previousResults.length; i++)
- {
- Object previousResult = previousResults[i];
-
- if (previousResult == child)
- {
- Widget widget = findItem(previousResult);
- if (widget != null)
- {
- widget.setData(child);
- updateItem(widget, child);
- return;
- }
- }
- else
- {
- String previousName = getAdapter(previousResult).getAbsoluteName(previousResult);
-
- if (previousName != null && previousName.equals(oldName))
- {
- provider.flushCache();
- internalRefresh(_objectInput);
- return;
- }
- }
- }
-
- }
- }
- }
-
- break;
-
- /*
- // --------------------------
- // REMOTE RESOURCE RENAMED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
- {
- if (remoteResourceParent == getInput())
- {
- if (provider != null)
- {
- provider.flushCache();
- }
-
- refresh();
- }
-
- }
- break;
- */
- }
- }
-
- /**
- * Turn a given remote object reference into a fully qualified absolute name
- */
- private String getRemoteResourceAbsoluteName(Object remoteResource)
- {
- if (remoteResource == null)
- return null;
- String remoteResourceName = null;
- if (remoteResource instanceof String)
- remoteResourceName = (String) remoteResource;
- else
- {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
- if (ra == null)
- return null;
- remoteResourceName = ra.getAbsoluteName(remoteResource);
- }
- return remoteResourceName;
- }
-
- public void selectionChanged(SelectionChangedEvent event)
- {
- IStructuredSelection sel = (IStructuredSelection)event.getSelection();
- Object firstSelection = sel.getFirstElement();
- if (firstSelection == null)
- return;
-
- _selectionFlagsUpdated = false;
- ISystemViewElementAdapter adapter = getAdapter(firstSelection);
- if (adapter != null)
- {
- displayMessage(adapter.getStatusLineText(firstSelection));
- if ((mouseButtonPressed == LEFT_BUTTON))
- adapter.selectionChanged(firstSelection);
- }
- else
- clearMessage();
- }
-
- public void dispose()
- {
- removeSelectionChangedListener(this);
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this);
- _menuManager.removeAll();
-
- Table table = getTable();
-
- if (!table.isDisposed())
- {
- table.removeAll();
- TableColumn[] columns = table.getColumns();
- for (int i = 0; i < columns.length; i++)
- {
- TableColumn column = columns[i];
- if (column != null && !column.isDisposed())
- {
- column.removeSelectionListener(_columnSelectionListener);
- column.dispose();
- column = null;
- }
- }
-
- table.dispose();
- }
- }
-
- /*
- * Everything below is basically stuff copied and pasted from SystemsView
- * -There needs to be cleaning up of the below code as some of this stuff
- * is broken for the table view
- *
- *
- public void createStandardGroups(IMenuManager menu)
- {
- if (!menu.isEmpty())
- return;
- // simply sets partitions in the menu, into which actions can be directed.
- // Each partition can be delimited by a separator (new Separator) or not (new GroupMarker).
- // Deleted groups are not used yet.
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_NEW));
- // new->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GOTO));
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_EXPANDTO));
- // expand to->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_EXPAND));
- // expand, collapse
- // goto into, go->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPENWITH));
- // open with->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_BROWSEWITH));
- // browse with ->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPEN));
- // open xxx
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_WORKWITH));
- // work with->
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_SHOW)); // show->type hierarchy, in-navigator
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_BUILD));
- // build, rebuild, refresh
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CHANGE));
- // update, change
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORGANIZE));
- // rename,move,copy,delete,bookmark,refactoring
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORDER));
- // move up, move down
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GENERATE));
- // getters/setters, etc. Typically in editor
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_SEARCH));
- // search
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CONNECTION));
- // connection-related actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_IMPORTEXPORT));
- // get or put actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADAPTERS));
- // actions queried from adapters
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS));
- // user or BP/ISV additions
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_VIEWER_SETUP)); // ? Probably View->by xxx, yyy
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_TEAM));
- // Team
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_COMPAREWITH));
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_REPLACEWITH));
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_PROPERTIES));
- // Properties
- }
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected PropertyDialogAction getPropertyDialogAction()
- {
- if (_propertyDialogAction == null)
- {
- _propertyDialogAction = new PropertyDialogAction(new SameShellProvider(getShell()), this);
- //propertyDialogAction.setToolTipText(" ");
- }
- _propertyDialogAction.selectionChanged(getSelection());
- return _propertyDialogAction;
- }
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected SystemRemotePropertiesAction getRemotePropertyDialogAction()
- {
- if (_remotePropertyDialogAction == null)
- {
- _remotePropertyDialogAction = new SystemRemotePropertiesAction(getShell());
- }
- _remotePropertyDialogAction.setSelection(getSelection());
- return _remotePropertyDialogAction;
- }
- /**
- * Return the select All action
- */
- protected IAction getSelectAllAction()
- {
- if (_selectAllAction == null)
- _selectAllAction = new SystemCommonSelectAllAction(getShell(), this, this);
- return _selectAllAction;
- }
-
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected IAction getRenameAction()
- {
- if (_renameAction == null)
- _renameAction = new SystemCommonRenameAction(getShell(), this);
- return _renameAction;
- }
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected IAction getDeleteAction()
- {
- if (_deleteAction == null)
- _deleteAction = new SystemCommonDeleteAction(getShell(), this);
- return _deleteAction;
- }
-
- /**
- * Return the refresh action
- */
- protected IAction getRefreshAction()
- {
- if (_refreshAction == null)
- _refreshAction = new SystemRefreshAction(getShell());
- return _refreshAction;
- }
- /*
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- *
- protected SystemCascadingOpenToAction getOpenToAction()
- {
- if (openToAction == null)
- openToAction = new SystemCascadingOpenToAction(getShell(),getWorkbenchWindow());
- return openToAction;
- } NOT USED YET */
- /**
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- */
- protected SystemOpenExplorerPerspectiveAction getOpenToPerspectiveAction()
- {
- if (_openToPerspectiveAction == null)
- {
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchWindow win = desktop.getActiveWorkbenchWindow();
-
- _openToPerspectiveAction = new SystemOpenExplorerPerspectiveAction(getShell(), win);
- }
- //getWorkbenchWindow());
- return _openToPerspectiveAction;
- }
-
- protected SystemShowInTableAction getShowInTableAction()
- {
- if (_showInTableAction == null)
- {
- _showInTableAction = new SystemShowInTableAction(getShell());
- }
- //getWorkbenchWindow());
- return _showInTableAction;
- }
-
- public Shell getShell()
- {
- return getTable().getShell();
- }
-
- /**
- * Required method from ISystemDeleteTarget.
- * Decides whether to even show the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showDelete()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionShowDeleteAction;
- }
- /**
- * Required method from ISystemDeleteTarget
- * Decides whether to enable the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canDelete()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionEnableDeleteAction;
- }
-
- /*
- * Required method from ISystemDeleteTarget
- */
- public boolean doDelete(IProgressMonitor monitor)
- {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- //int selectedCount = selection.size();
- //Object multiSource[] = new Object[selectedCount];
- //int idx = 0;
- Object element = null;
- //Object parentElement = getSelectedParent();
- ISystemViewElementAdapter adapter = null;
- boolean ok = true;
- boolean anyOk = false;
- Vector deletedVector = new Vector();
- try
- {
- while (ok && elements.hasNext())
- {
- element = elements.next();
- //multiSource[idx++] = element;
- adapter = getAdapter(element);
- ok = adapter.doDelete(getShell(), element, monitor);
- if (ok)
- {
- anyOk = true;
- deletedVector.addElement(element);
- }
- }
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- }
- catch (Exception exc)
- {
- String msg = exc.getMessage();
- if ((msg == null) || (exc instanceof ClassCastException))
- msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg));
- ok = false;
- }
- if (anyOk)
- {
- Object[] deleted = new Object[deletedVector.size()];
- for (int idx = 0; idx < deleted.length; idx++)
- deleted[idx] = deletedVector.elementAt(idx);
- if (_selectionIsRemoteObject)
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, deletedVector, null, null, null, this);
- else
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(deleted, ISystemResourceChangeEvents.EVENT_DELETE_MANY, getInput()));
- }
- return ok;
- }
-
- // ---------------------------
- // ISYSTEMRENAMETARGET METHODS
- // ---------------------------
-
- /**
- * Required method from ISystemRenameTarget.
- * Decides whether to even show the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showRename()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionShowRenameAction;
- }
- /**
- * Required method from ISystemRenameTarget
- * Decides whether to enable the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canRename()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionEnableRenameAction;
- }
-
- // default implementation
- // in default table, parent is input
- protected Object getParentForContent(Object element)
- {
- return _objectInput;
- }
-
- /**
- * Required method from ISystemRenameTarget
- */
- public boolean doRename(String[] newNames)
- {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- Object element = null;
-
- ISystemViewElementAdapter adapter = null;
- ISystemRemoteElementAdapter remoteAdapter = null;
- String oldFullName = null;
- boolean ok = true;
- try
- {
- int nameIdx = 0;
- while (ok && elements.hasNext())
- {
- element = elements.next();
- adapter = getAdapter(element);
- Object parentElement = getParentForContent(element);
-
- remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter != null)
- oldFullName = remoteAdapter.getAbsoluteName(element);
- // pre-rename
- ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
- if (ok)
- {
- if (remoteAdapter != null)
- {
- // do rename here
- Widget widget = findItem(element);
- if (widget != null)
- {
- updateItem(widget, element);
- }
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), oldFullName, this);
-
- }
- else
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
- }
- }
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- }
- catch (Exception exc)
- {
- //String msg = exc.getMessage();
- //if ((msg == null) || (exc instanceof ClassCastException))
- // msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc),
- //msg),
- exc);
- ok = false;
- }
- return ok;
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- ISystemRemoteElementAdapter adapter = null;
- if (!(o instanceof IAdaptable))
- adapter = (ISystemRemoteElementAdapter) Platform.getAdapterManager().getAdapter(o, ISystemRemoteElementAdapter.class);
- else
- adapter = (ISystemRemoteElementAdapter) ((IAdaptable) o).getAdapter(ISystemRemoteElementAdapter.class);
- if ((adapter != null) && (adapter instanceof ISystemViewElementAdapter))
- ((ISystemViewElementAdapter) adapter).setViewer(this);
- return adapter;
- }
-
- /**
- * Return true if select all should be enabled for the given object.
- * For a tree view, you should return true if and only if the selected object has children.
- * You can use the passed in selection or ignore it and query your own selection.
- */
- public boolean enableSelectAll(IStructuredSelection selection)
- {
- return true;
- }
- /**
- * When this action is run via Edit->Select All or via Ctrl+A, perform the
- * select all action. For a tree view, this should select all the children
- * of the given selected object. You can use the passed in selected object
- * or ignore it and query the selected object yourself.
- */
- public void doSelectAll(IStructuredSelection selection)
- {
- Table table = getTable();
- TableItem[] items = table.getItems();
-
- table.setSelection(items);
- Object[] objects = new Object[items.length];
- for (int idx = 0; idx < items.length; idx++)
- objects[idx] = items[idx].getData();
- fireSelectionChanged(new SelectionChangedEvent(this, new StructuredSelection(objects)));
- }
-
- public void menuAboutToShow(IMenuManager manager)
- {
- SystemView.createStandardGroups(manager);
-
- fillContextMenu(manager);
-
- if (!menuListenerAdded)
- {
- if (manager instanceof MenuManager)
- {
- Menu m = ((MenuManager)manager).getMenu();
- if (m != null)
- {
- menuListenerAdded = true;
- SystemViewMenuListener ml = new SystemViewMenuListener();
- if (_messageLine != null)
- ml.setShowToolTipText(true, _messageLine);
- m.addMenuListener(ml);
- }
- }
- }
-
- }
-
- public ISelection getSelection()
- {
- ISelection selection = super.getSelection();
- if (selection == null || selection.isEmpty())
- {
- // make the selection the parent
- ArrayList list = new ArrayList();
- if (_objectInput != null)
- {
- list.add(_objectInput);
- selection = new StructuredSelection(list);
- }
- }
-
- return selection;
- }
-
- public void fillContextMenu(IMenuManager menu)
- {
- IStructuredSelection selection = (IStructuredSelection) getSelection();
-
- {
-
- // ADD COMMON ACTIONS...
- // no need for refresh of object in table
- //menu.appendToGroup(ISystemContextMenuConstants.GROUP_BUILD, getRefreshAction());
-
- // COMMON RENAME ACTION...
- if (canRename())
- {
- if (showRename())
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getRenameAction());
- }
-
- // ADAPTER SPECIFIC ACTIONS
- SystemMenuManager ourMenu = new SystemMenuManager(menu);
-
- Iterator elements = selection.iterator();
- Hashtable adapters = new Hashtable();
- while (elements.hasNext())
- {
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- adapters.put(adapter, element); // want only unique adapters
- }
- Enumeration uniqueAdapters = adapters.keys();
- Shell shell = getShell();
- while (uniqueAdapters.hasMoreElements())
- {
- ISystemViewElementAdapter nextAdapter = (ISystemViewElementAdapter) uniqueAdapters.nextElement();
- nextAdapter.addActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
-
- if (nextAdapter instanceof AbstractSystemViewAdapter)
- {
- AbstractSystemViewAdapter aVA = (AbstractSystemViewAdapter)nextAdapter;
- // add remote actions
- aVA.addCommonRemoteActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
-
- // add dynamic menu popups
- aVA.addDynamicPopupMenuActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADDITIONS);
- }
- }
-
- // wail through all actions, updating shell and selection
- IContributionItem[] items = menu.getItems();
- for (int idx = 0; idx < items.length; idx++)
- {
- if ((items[idx] instanceof ActionContributionItem) && (((ActionContributionItem) items[idx]).getAction() instanceof ISystemAction))
- {
- ISystemAction item = (ISystemAction) (((ActionContributionItem) items[idx]).getAction());
- //item.setShell(getShell());
- //item.setSelection(selection);
- //item.setViewer(this);
- item.setInputs(getShell(), this, selection);
- }
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager) items[idx];
- //item.setShell(getShell());
- //item.setSelection(selection);
- //item.setViewer(this);
- item.setInputs(getShell(), this, selection);
- }
- }
-
- // COMMON DELETE ACTION...
- if (canDelete() && showDelete())
- {
- //menu.add(getDeleteAction());
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getDeleteAction());
- ((ISystemAction) getDeleteAction()).setInputs(getShell(), this, selection);
- menu.add(new Separator());
- }
-
- // PROPERTIES ACTION...
- // This is supplied by the system, so we pretty much get it for free. It finds the
- // registered propertyPages extension points registered for the selected object's class type.
- //propertyDialogAction.selectionChanged(selection);
-
- if (!_selectionIsRemoteObject) // is not a remote object
- {
- PropertyDialogAction pdAction = getPropertyDialogAction();
- if (pdAction.isApplicableForSelection())
- {
-
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- }
- // OPEN IN NEW PERSPECTIVE ACTION... if (fromSystemViewPart && showOpenViewActions())
- {
- //SystemCascadingOpenToAction openToAction = getOpenToAction();
- SystemOpenExplorerPerspectiveAction openToPerspectiveAction = getOpenToPerspectiveAction();
- SystemShowInTableAction showInTableAction = getShowInTableAction();
- openToPerspectiveAction.setSelection(selection);
- showInTableAction.setSelection(selection);
- //menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, openToAction.getSubMenu());
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, openToPerspectiveAction);
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, showInTableAction);
-
- }
- }
- else // is a remote object
- {
- //Object firstSelection = selection.getFirstElement();
- //ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(firstSelection);
- //logMyDebugMessage(this.getClass().getName(), ": there is a remote adapter");
- SystemRemotePropertiesAction pdAction = getRemotePropertyDialogAction();
- if (pdAction.isApplicableForSelection())
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- //else
- //logMyDebugMessage(this.getClass().getName(), ": but it is not applicable for selection");
- // --------------------------------------------------------------------------------------------------------------------
- // look for and add any popup menu actions registered via our org.eclipse.rse.core.popupMenus extension point...
- // --------------------------------------------------------------------------------------------------------------------
- if (_workbenchPart != null)
- {
- SystemPopupMenuActionContributorManager.getManager().contributeObjectActions(_workbenchPart, ourMenu, this, null);
- }
- }
-
- }
- }
-
- /**
- * --------------------------------------------------------------------------------
- * For many actions we have to walk the selection list and examine each selected
- * object to decide if a given common action is supported or not.
- * <p>
- * Walking this list multiple times while building the popup menu is a performance
- * hit, so we have this common method that does it only once, setting instance
- * variables for all of the decisions we are in interested in.
- * --------------------------------------------------------------------------------
- */
- protected void scanSelections()
- {
- // initial these variables to true. Then if set to false even once, leave as false always...
- _selectionShowRefreshAction = true;
- _selectionShowOpenViewActions = true;
- _selectionShowDeleteAction = true;
- _selectionShowRenameAction = true;
- _selectionEnableDeleteAction = true;
- _selectionEnableRenameAction = true;
- _selectionIsRemoteObject = true;
- _selectionFlagsUpdated = true;
-
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- while (elements.hasNext())
- {
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
-
- if (_selectionShowRefreshAction)
- _selectionShowRefreshAction = adapter.showRefresh(element);
-
- if (_selectionShowOpenViewActions)
- _selectionShowOpenViewActions = adapter.showOpenViewActions(element);
-
- if (_selectionShowDeleteAction)
- _selectionShowDeleteAction = adapter.showDelete(element);
-
- if (_selectionShowRenameAction)
- _selectionShowRenameAction = adapter.showRename(element);
-
- if (_selectionEnableDeleteAction)
- _selectionEnableDeleteAction = _selectionShowDeleteAction && adapter.canDelete(element);
- //System.out.println("ENABLE DELETE SET TO " + selectionEnableDeleteAction);
-
- if (_selectionEnableRenameAction)
- _selectionEnableRenameAction = _selectionShowRenameAction && adapter.canRename(element);
-
- if (_selectionIsRemoteObject)
- _selectionIsRemoteObject = (getRemoteAdapter(element) != null);
- }
-
- }
-
- public void positionTo(String name)
- {
- ArrayList selectedItems = new ArrayList();
- Table table = getTable();
- int topIndex = 0;
- for (int i = 0; i < table.getItemCount(); i++)
- {
- TableItem item = table.getItem(i);
- Object data = item.getData();
- if (data instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = getAdapter(data);
- String itemName = adapter.getName(data);
-
- if (StringCompare.compare(name, itemName, false))
- {
- if (topIndex == 0)
- {
- topIndex = i;
- }
- selectedItems.add(item);
- }
- }
- }
-
- if (selectedItems.size() > 0)
- {
- TableItem[] tItems = new TableItem[selectedItems.size()];
- for (int i = 0; i < selectedItems.size(); i++)
- {
- tItems[i] = (TableItem) selectedItems.get(i);
- }
-
- table.setSelection(tItems);
- table.setTopIndex(topIndex);
- setSelection(getSelection(), true);
- }
- }
-
- void handleKeyPressed(KeyEvent event)
- {
- //System.out.println("Key Pressed");
- //System.out.println("...event character : " + event.character + ", "+(int)event.character);
- //System.out.println("...event state mask: " + event.stateMask);
- //System.out.println("...CTRL : " + SWT.CTRL);
- if ((event.character == SWT.DEL) && (event.stateMask == 0) && (((IStructuredSelection) getSelection()).size() > 0))
- {
- scanSelections();
- /* DKM - 53694
- if (showDelete() && canDelete())
- {
- SystemCommonDeleteAction dltAction = (SystemCommonDeleteAction) getDeleteAction();
- dltAction.setShell(getShell());
- dltAction.setSelection(getSelection());
- dltAction.setViewer(this);
- dltAction.run();
- }
- */
- }
- }
-
- /**
- * Display a message/status on the message/status line
- */
- public void displayMessage(String msg)
- {
- if (_messageLine != null)
- _messageLine.setMessage(msg);
- }
- /**
- * Clear message/status shown on the message/status line
- */
- public void clearMessage()
- {
- if (_messageLine != null)
- _messageLine.clearMessage();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewColumnManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewColumnManager.java
deleted file mode 100644
index f7851fa0c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewColumnManager.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-import java.util.HashMap;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-/**
- * @author dmcknigh
- */
-public class SystemTableViewColumnManager
-{
- private Viewer _viewer;
- protected HashMap _descriptorCache;
- public SystemTableViewColumnManager(Viewer viewer)
- {
- _viewer = viewer;
- _descriptorCache = new HashMap();
- }
-
- protected IPropertyDescriptor[] getCachedDescriptors(ISystemViewElementAdapter adapter)
- {
- Object descriptors = _descriptorCache.get(adapter);
- if (descriptors != null && descriptors instanceof IPropertyDescriptor[])
- {
- return (IPropertyDescriptor[])descriptors;
- }
- return null;
- }
-
- protected void putCachedDescriptors(ISystemViewElementAdapter adapter, IPropertyDescriptor[] descriptors)
- {
- _descriptorCache.put(adapter, descriptors);
- }
-
- public void setCustomDescriptors(ISystemViewElementAdapter adapter, IPropertyDescriptor[] descriptors)
- {
- putCachedDescriptors(adapter, descriptors);
- SystemPreferencesManager mgr = SystemPreferencesManager.getPreferencesManager();
- String historyKey = getHistoryKey(adapter);
- String[] history = new String[descriptors.length];
- for (int i = 0; i < descriptors.length; i++)
- {
- history[i] = descriptors[i].getId().toString();
- }
-
- mgr.setWidgetHistory(historyKey, history);
- }
-
- /**
- * Gets the property descriptors to display as columns in the table
- * The set of descriptors and their order may change depending on user customizations
- * @param adapter
- * @return
- */
- public IPropertyDescriptor[] getVisibleDescriptors(ISystemViewElementAdapter adapter)
- {
- if (adapter != null)
- {
- IPropertyDescriptor[] descriptors = getCachedDescriptors(adapter);
- if (descriptors == null)
- {
- return getCustomDescriptors(adapter);
- }
- else
- {
- return descriptors;
- }
- }
-
- return new IPropertyDescriptor[0];
- }
-
- private String getHistoryKey(ISystemViewElementAdapter adapter)
- {
- String adapterName = adapter.getClass().getName();
- String viewName = _viewer.getClass().getName();
- return adapterName + ":" + viewName; //$NON-NLS-1$
- }
-
- protected IPropertyDescriptor[] getCustomDescriptors(ISystemViewElementAdapter adapter)
- {
- IPropertyDescriptor[] uniqueDescriptors = adapter.getUniquePropertyDescriptors();
-
- SystemPreferencesManager mgr = SystemPreferencesManager.getPreferencesManager();
- String historyKey = getHistoryKey(adapter);
- String[] history = mgr.getWidgetHistory(historyKey);
-
- // determine the order and which of the uniqueDescriptors to use based on the history
- if (history != null && history.length > 0)
- {
- int len = history.length;
- if (uniqueDescriptors != null && uniqueDescriptors.length < len)
- {
- len = uniqueDescriptors.length;
- }
- IPropertyDescriptor[] customDescriptors = new IPropertyDescriptor[len];
- for (int i = 0; i < len; i++)
- {
- String propertyName = history[i];
- // find the associated descriptor
- boolean found = false;
- for (int d = 0; d < uniqueDescriptors.length && !found; d++)
- {
- IPropertyDescriptor descriptor = uniqueDescriptors[d];
- if (propertyName.equals(descriptor.getId().toString()))
- {
- customDescriptors[i] = descriptor;
- found = true;
- }
- }
- // DKM - problem here - no such descriptor exists anymore
- if (found == false)
- {
- // invalidate the current history
- setCustomDescriptors(adapter, uniqueDescriptors);
- return uniqueDescriptors;
- }
- }
- return customDescriptors;
- }
- else
- {
- setCustomDescriptors(adapter, uniqueDescriptors);
- }
-
- return uniqueDescriptors;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewFilter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewFilter.java
deleted file mode 100644
index 78cce057e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewFilter.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.rse.services.clientserver.StringCompare;
-
-
-/**
- * This class is used for filtering in the SystemTableView. The filter
- * determines what objects to show in the view.
- *
- */
-public class SystemTableViewFilter extends ViewerFilter
-{
-
- private String[] _filters;
-
- public SystemTableViewFilter()
- {
- super();
-
- }
-
- public void setFilters(String[] filters)
- {
- _filters = filters;
- }
-
- public String[] getFilters()
- {
- return _filters;
- }
-
- public boolean select(Viewer viewer, Object parent, Object element)
- {
- boolean result = true;
- if (viewer instanceof TableViewer)
- {
- if (_filters != null)
- {
- TableViewer tviewer = (TableViewer) viewer;
- ITableLabelProvider labelProvider = (ITableLabelProvider) tviewer.getLabelProvider();
-
- for (int i = 0; i < _filters.length && result; i++)
- {
- String filter = _filters[i];
-
- if (filter != null && filter.length() > 0)
- {
- String text = labelProvider.getColumnText(element, i);
- if (!StringCompare.compare(filter, text, true))
- {
- result = false;
- }
- }
- }
- }
- }
- else if (viewer instanceof TreeViewer)
- {
- if (_filters != null)
- {
- TreeViewer tviewer = (TreeViewer) viewer;
- ITableLabelProvider labelProvider = (ITableLabelProvider) tviewer.getLabelProvider();
-
- for (int i = 0; i < _filters.length && result; i++)
- {
- String filter = _filters[i];
-
- if (filter != null && filter.length() > 0)
- {
- String text = labelProvider.getColumnText(element, i);
- if (!StringCompare.compare(filter, text, true))
- {
- result = false;
- }
- }
- }
- }
- }
-
- return result;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index d0e699b79..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewPart.java
+++ /dev/null
@@ -1,1860 +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:
- * Michael Berger (IBM) - 146339 Added refresh action graphic.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-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.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemRemoteChangeEvent;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemRemoteChangeListener;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.actions.SystemTablePrintAction;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.dialogs.SystemSelectAnythingDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.part.CellEditorActionHandler;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.osgi.framework.Bundle;
-
-
-
-/**
- * Comment goes here
- */
-public class SystemTableViewPart extends ViewPart implements ISelectionListener, ISelectionChangedListener,
- ISystemMessageLine, ISystemResourceChangeListener, ISystemRemoteChangeListener, IRSEViewPart
-{
-
-
- class BrowseAction extends Action
- {
-
- public BrowseAction()
- {
- }
-
- public BrowseAction(String label, ImageDescriptor des)
- {
- super(label, des);
-
- setToolTipText(label);
- }
-
- public void checkEnabledState()
- {
- if (_viewer != null && _viewer.getInput() != null)
- {
- setEnabled(true);
- }
- else
- {
- setEnabled(false);
- }
- }
-
- public void run()
- {
- }
- }
-
- class ForwardAction extends BrowseAction
- {
- public ForwardAction()
- {
- super(SystemResources.ACTION_HISTORY_MOVEFORWARD_LABEL, getEclipseImageDescriptor("elcl16/forward_nav.gif")); //$NON-NLS-1$
-
- setTitleToolTip(SystemResources.ACTION_HISTORY_MOVEFORWARD_TOOLTIP);
- setDisabledImageDescriptor(getEclipseImageDescriptor("dlcl16/forward_nav.gif")); //$NON-NLS-1$
- }
-
- public void checkEnabledState()
- {
- if (_isLocked && _browseHistory != null && _browseHistory.size() > 0)
- {
- if (_browsePosition < _browseHistory.size() - 1)
- {
- setEnabled(true);
- return;
- }
- }
-
- setEnabled(false);
- }
-
- public void run()
- {
- _browsePosition++;
-
- HistoryItem historyItem = (HistoryItem) _browseHistory.get(_browsePosition);
- setInput(historyItem);
- }
- }
-
- class BackwardAction extends BrowseAction
- {
- public BackwardAction()
- {
- super(SystemResources.ACTION_HISTORY_MOVEBACKWARD_LABEL, getEclipseImageDescriptor("elcl16/backward_nav.gif")); //$NON-NLS-1$
- setTitleToolTip(SystemResources.ACTION_HISTORY_MOVEBACKWARD_TOOLTIP);
- setDisabledImageDescriptor(getEclipseImageDescriptor("dlcl16/backward_nav.gif")); //$NON-NLS-1$
- }
-
- public void checkEnabledState()
- {
- if (_isLocked && _browseHistory != null && _browseHistory.size() > 0)
- {
- if (_browsePosition > 0)
- {
- setEnabled(true);
- return;
- }
- }
-
- setEnabled(false);
- }
-
- public void run()
- {
- _browsePosition--;
-
- HistoryItem historyItem = (HistoryItem) _browseHistory.get(_browsePosition);
- setInput(historyItem);
- }
- }
-
- class UpAction extends BrowseAction
- {
- private IAdaptable _parent;
- public UpAction()
- {
- super(SystemResources.ACTION_MOVEUP_LABEL, getEclipseImageDescriptor("elcl16/up_nav.gif")); //$NON-NLS-1$
-
- setDisabledImageDescriptor(getEclipseImageDescriptor("dlcl16/up_nav.gif")); //$NON-NLS-1$
- }
-
- public void checkEnabledState()
- {
- if (_viewer.getInput() != null)
- {
- SystemTableViewProvider provider = (SystemTableViewProvider) _viewer.getContentProvider();
-
- // assume there is a parent
- if (provider != null)
- {
- Object parent = provider.getParent(_viewer.getInput());
- if (parent instanceof IAdaptable)
- {
- _parent = (IAdaptable) parent;
- boolean enabled = _parent != null;
- setEnabled(enabled);
- }
- }
- else
- {
- _parent = null;
- setEnabled(false);
- }
- }
- else
- {
- _parent = null;
- setEnabled(false);
- }
- }
-
- public void run()
- {
- if (_parent != null)
- {
- setInput(_parent);
- }
- }
- }
-
- class LockAction extends BrowseAction
- {
- public LockAction()
- {
- super();
- setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_LOCK_ID));
- String label = determineLabel();
- setText(label);
- setToolTipText(label);
- }
-
- /**
- * Sets as checked or unchecked, depending on the lock state. Also changes the text and tooltip.
- */
- public void checkEnabledState()
- {
- setChecked(_isLocked);
- String label = determineLabel();
- setText(label);
- setToolTipText(label);
- }
-
- public void run()
- {
- _isLocked = !_isLocked;
- showLock();
- }
-
- /**
- * Returns the label depending on lock state.
- * @return the label.
- */
- public String determineLabel() {
-
- if (!_isLocked) {
- return SystemResources.ACTION_LOCK_LABEL;
- }
- else {
- return SystemResources.ACTION_UNLOCK_LABEL;
- }
- }
-
- /**
- * Returns the tooltip depending on lock state.
- * @return the tooltip.
- */
- public String determineTooltip() {
-
- if (!_isLocked) {
- return SystemResources.ACTION_LOCK_TOOLTIP;
- }
- else {
- return SystemResources.ACTION_UNLOCK_TOOLTIP;
- }
- }
- }
-
- class RefreshAction extends BrowseAction
- {
- public RefreshAction()
- {
- super(SystemResources.ACTION_REFRESH_LABEL,
- //RSEUIPlugin.getDefault().getImageDescriptor(ICON_SYSTEM_REFRESH_ID));
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_REFRESH_ID));
- }
-
- public void run()
- {
- Object inputObject = _viewer.getInput();
- if (inputObject instanceof ISystemContainer)
- {
- ((ISystemContainer)inputObject).markStale(true);
- }
- ((SystemTableViewProvider) _viewer.getContentProvider()).flushCache();
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(inputObject, ISystemResourceChangeEvents.EVENT_REFRESH, inputObject));
-
- //_viewer.refresh();
-
- // refresh layout too
- //_viewer.computeLayout(true);
-
- }
- }
-
- class SelectAllAction extends BrowseAction
- {
- public SelectAllAction()
- {
- super(SystemResources.ACTION_SELECT_ALL_LABEL, null);
- setToolTipText(SystemResources.ACTION_SELECT_ALL_TOOLTIP);
- }
-
- public void checkEnabledState()
- {
- if (_viewer != null && _viewer.getInput() != null)
- {
- setEnabled(true);
- }
- else
- {
- setEnabled(false);
- }
- }
- public void run()
- {
- _viewer.getTable().selectAll();
- // force viewer selection change
- _viewer.setSelection(_viewer.getSelection());
- }
- }
-
- class SelectInputAction extends BrowseAction
- {
- public SelectInputAction()
- {
- super(SystemResources.ACTION_SELECT_INPUT_LABEL, null);
- setToolTipText(SystemResources.ACTION_SELECT_INPUT_TOOLTIP);
- }
-
- public void checkEnabledState()
- {
- setEnabled(true);
- }
-
- public void run()
- {
-
- SystemSelectAnythingDialog dlg = new SystemSelectAnythingDialog(_viewer.getShell(), SystemResources.ACTION_SELECT_INPUT_DLG);
- Object inputObject = _viewer.getInput();
- if (inputObject == null)
- {
- inputObject = RSEUIPlugin.getTheSystemRegistry();
- }
- dlg.setInputObject(inputObject);
- if (dlg.open() == Window.OK)
- {
- Object selected = dlg.getSelectedObject();
- if (selected != null && selected instanceof IAdaptable)
- {
- IAdaptable adaptable = (IAdaptable)selected;
- ((ISystemViewElementAdapter)adaptable.getAdapter(ISystemViewElementAdapter.class)).setViewer(_viewer);
- setInput(adaptable);
- }
- }
- }
- }
-
- class PositionToAction extends BrowseAction
- {
- class PositionToDialog extends SystemPromptDialog
- {
- private String _name;
- private Combo _cbName;
- public PositionToDialog(Shell shell, String title, HistoryItem historyItem)
- {
- super(shell, title);
- }
-
- public String getPositionName()
- {
- return _name;
- }
-
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
- _name = _cbName.getText();
- close();
- }
-
- protected Control getInitialFocusControl()
- {
- return _cbName;
- }
-
- public Control createInner(Composite parent)
- {
- Composite c = SystemWidgetHelpers.createComposite(parent, 2);
-
- Label aLabel = new Label(c, SWT.NONE);
- aLabel.setText(SystemPropertyResources.RESID_PROPERTY_NAME_LABEL);
-
- _cbName = SystemWidgetHelpers.createCombo(c, null);
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- _cbName.setLayoutData(textData);
- _cbName.setText("*"); //$NON-NLS-1$
- _cbName.setToolTipText(SystemResources.RESID_TABLE_POSITIONTO_ENTRY_TOOLTIP);
-
- this.getShell().setText(SystemResources.RESID_TABLE_POSITIONTO_LABEL);
- setHelp();
- return c;
- }
-
- private void setHelp()
- {
- setHelp(RSEUIPlugin.HELPPREFIX + "gnpt0000"); //$NON-NLS-1$
- }
- }
-
- public PositionToAction()
- {
- super(SystemResources.ACTION_POSITIONTO_LABEL, null);
- setToolTipText(SystemResources.ACTION_POSITIONTO_TOOLTIP);
- }
-
- public void run()
- {
-
- PositionToDialog posDialog = new PositionToDialog(getViewer().getShell(), getTitle(), _currentItem);
- if (posDialog.open() == Window.OK)
- {
- String name = posDialog.getPositionName();
-
- _viewer.positionTo(name);
- }
- }
- }
-
- class SubSetAction extends BrowseAction
- {
- class SubSetDialog extends SystemPromptDialog
- {
- private String[] _filters;
- private Text[] _controls;
- private IPropertyDescriptor[] _uniqueDescriptors;
- private HistoryItem _historyItem;
-
- public SubSetDialog(Shell shell, IPropertyDescriptor[] uniqueDescriptors, HistoryItem historyItem)
- {
- super(shell, SystemResources.RESID_TABLE_SUBSET_LABEL);
- _uniqueDescriptors = uniqueDescriptors;
- _historyItem = historyItem;
- }
-
- public String[] getFilters()
- {
- return _filters;
- }
-
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
-
- for (int i = 0; i < _controls.length; i++)
- {
- _filters[i] = _controls[i].getText();
- }
-
- close();
- }
-
- protected Control getInitialFocusControl()
- {
- return _controls[0];
- }
-
- public Control createInner(Composite parent)
- {
- Composite c = SystemWidgetHelpers.createComposite(parent, 2);
-
- int numberOfFields = _uniqueDescriptors.length;
- _controls = new Text[numberOfFields + 1];
- _filters = new String[numberOfFields + 1];
-
- Label nLabel = new Label(c, SWT.NONE);
- nLabel.setText(SystemPropertyResources.RESID_PROPERTY_NAME_LABEL);
-
- String[] histFilters = null;
- if (_historyItem != null)
- {
- histFilters = _historyItem.getFilters();
- }
-
- _controls[0] = SystemWidgetHelpers.createTextField(c, null);
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- _controls[0].setLayoutData(textData);
- _controls[0].setText("*"); //$NON-NLS-1$
- _controls[0].setToolTipText(SystemResources.RESID_TABLE_SUBSET_ENTRY_TOOLTIP);
-
- if (histFilters != null)
- {
- _controls[0].setText(histFilters[0]);
- }
-
- for (int i = 0; i < numberOfFields; i++)
- {
- IPropertyDescriptor des = _uniqueDescriptors[i];
-
- Label aLabel = new Label(c, SWT.NONE);
- aLabel.setText(des.getDisplayName());
-
- _controls[i + 1] = SystemWidgetHelpers.createTextField(c, null);
- GridData textData3 = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- _controls[i + 1].setLayoutData(textData3);
- _controls[i + 1].setText("*"); //$NON-NLS-1$
- if (histFilters != null)
- {
- _controls[i + 1].setText(histFilters[i + 1]);
- _controls[i + 1].setToolTipText(SystemResources.RESID_TABLE_SUBSET_ENTRY_TOOLTIP);
- }
- }
-
- setHelp();
- return c;
- }
-
- private void setHelp()
- {
- setHelp(RSEUIPlugin.HELPPREFIX + "gnss0000"); //$NON-NLS-1$
- }
- }
-
- public SubSetAction()
- {
- super(SystemResources.ACTION_SUBSET_LABEL, null);
- setToolTipText(SystemResources.ACTION_SUBSET_TOOLTIP);
- }
-
- public void run()
- {
- SubSetDialog subsetDialog = new SubSetDialog(getViewer().getShell(), _viewer.getVisibleDescriptors(_viewer.getInput()), _currentItem);
- if (subsetDialog.open() == Window.OK)
- {
- String[] filters = subsetDialog.getFilters();
- _currentItem.setFilters(filters);
- _viewer.setViewFilters(filters);
- }
- }
- }
-
- class HistoryItem
- {
- private String[] _filters;
- private IAdaptable _object;
-
- public HistoryItem(IAdaptable object, String[] filters)
- {
- _object = object;
- _filters = filters;
- }
-
- public IAdaptable getObject()
- {
- return _object;
- }
-
- public String[] getFilters()
- {
- return _filters;
- }
-
- public void setFilters(String[] filters)
- {
- _filters = filters;
- }
- }
-
- class RestoreStateRunnable extends UIJob
- {
- private IMemento _rmemento;
- public RestoreStateRunnable(IMemento memento)
- {
- super("Restore RSE Table"); //$NON-NLS-1$
- _rmemento = memento;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- IMemento memento = _rmemento;
- String profileId = memento.getString(TAG_TABLE_VIEW_PROFILE_ID);
- String connectionId = memento.getString(TAG_TABLE_VIEW_CONNECTION_ID);
- String subsystemId = memento.getString(TAG_TABLE_VIEW_SUBSYSTEM_ID);
- String filterID = memento.getString(TAG_TABLE_VIEW_FILTER_ID);
- String objectID = memento.getString(TAG_TABLE_VIEW_OBJECT_ID);
-
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- Object input = null;
- if (subsystemId == null)
- {
- if (connectionId != null)
- {
-
- ISystemProfile profile = registry.getSystemProfile(profileId);
- input = registry.getHost(profile, connectionId);
- }
- else
- {
- // TODO why did we use null for a while?
- //input = null;
- input = registry;
- }
- }
- else
- {
- // from the subsystem ID determine the profile, system and subsystem
- ISubSystem subsystem = registry.getSubSystem(subsystemId);
-
- if (subsystem != null)
- {
- if (filterID == null && objectID == null)
- {
- input = subsystem;
- }
- else
- {
-
- if (!subsystem.isConnected())
- {
- try
- {
- subsystem.connect();
- }
- catch (Exception e)
- {
- return Status.CANCEL_STATUS;
- }
- }
- if (subsystem.isConnected())
- {
-
- if (filterID != null)
- {
- try
- {
- input = subsystem.getObjectWithAbsoluteName(filterID);
- }
- catch (Exception e)
- {
- }
- }
- else
- {
-
- if (objectID != null)
- {
-
- try
- {
- input = subsystem.getObjectWithAbsoluteName(objectID);
- }
- catch (Exception e)
- {
- return Status.CANCEL_STATUS;
- }
- }
- } // end else
- } // end if (subsystem.isConnected)
- } // end else
- } // end if (subsystem != null)
- } // end else
-
- if (input != null && input instanceof IAdaptable)
- {
- _mementoInput = (IAdaptable) input;
- if (_mementoInput != null && _viewer != null)
- {
- String columnWidths = memento.getString(TAG_TABLE_VIEW_COLUMN_WIDTHS_ID);
- if (columnWidths != null)
- {
- StringTokenizer tok = new StringTokenizer(columnWidths, ","); //$NON-NLS-1$
- int[] colWidths = new int[tok.countTokens()];
- int t = 0;
- while (tok.hasMoreTokens())
- {
- String columnStr = tok.nextToken();
- colWidths[t] = Integer.parseInt(columnStr);
- t++;
- }
-
- _viewer.setLastColumnWidths(colWidths);
- }
-
- setInput(_mementoInput);
- }
- }
- return Status.OK_STATUS;
- }
-
- }
-
-
-
- private class SelectColumnsAction extends BrowseAction
- {
-
- class SelectColumnsDialog extends SystemPromptDialog
- {
- private ISystemViewElementAdapter _adapter;
- private SystemTableViewColumnManager _columnManager;
- private IPropertyDescriptor[] _uniqueDescriptors;
- private ArrayList _currentDisplayedDescriptors;
- private ArrayList _availableDescriptors;
-
- private List _availableList;
- private List _displayedList;
-
- private Button _addButton;
- private Button _removeButton;
- private Button _upButton;
- private Button _downButton;
-
-
- public SelectColumnsDialog(Shell shell, ISystemViewElementAdapter viewAdapter, SystemTableViewColumnManager columnManager)
- {
- super(shell, SystemResources.RESID_TABLE_SELECT_COLUMNS_LABEL);
- _adapter = viewAdapter;
- _columnManager = columnManager;
- _uniqueDescriptors = viewAdapter.getUniquePropertyDescriptors();
- IPropertyDescriptor[] initialDisplayedDescriptors = _columnManager.getVisibleDescriptors(_adapter);
- _currentDisplayedDescriptors = new ArrayList(initialDisplayedDescriptors.length);
- for (int i = 0; i < initialDisplayedDescriptors.length;i++)
- {
- if (!_currentDisplayedDescriptors.contains(initialDisplayedDescriptors[i]))
- _currentDisplayedDescriptors.add(initialDisplayedDescriptors[i]);
- }
- _availableDescriptors = new ArrayList(_uniqueDescriptors.length);
- for (int i = 0; i < _uniqueDescriptors.length;i++)
- {
- if (!_currentDisplayedDescriptors.contains(_uniqueDescriptors[i]))
- {
- _availableDescriptors.add(_uniqueDescriptors[i]);
- }
- }
- }
-
-
- public void handleEvent(Event e)
- {
- Widget source = e.widget;
- if (source == _addButton)
- {
- int[] toAdd = _availableList.getSelectionIndices();
- addToDisplay(toAdd);
- }
- else if (source == _removeButton)
- {
- int[] toAdd = _displayedList.getSelectionIndices();
- removeFromDisplay(toAdd);
- }
- else if (source == _upButton)
- {
- int index = _displayedList.getSelectionIndex();
- moveUp(index);
- _displayedList.select(index - 1);
- }
- else if (source == _downButton)
- {
- int index = _displayedList.getSelectionIndex();
- moveDown(index);
- _displayedList.select(index + 1);
- }
-
- // update button enable states
- updateEnableStates();
- }
-
- public IPropertyDescriptor[] getDisplayedColumns()
- {
- IPropertyDescriptor[] displayedColumns = new IPropertyDescriptor[_currentDisplayedDescriptors.size()];
- for (int i = 0; i< _currentDisplayedDescriptors.size();i++)
- {
- displayedColumns[i]= (IPropertyDescriptor)_currentDisplayedDescriptors.get(i);
- }
- return displayedColumns;
- }
-
- private void updateEnableStates()
- {
- boolean enableAdd = false;
- boolean enableRemove = false;
- boolean enableUp = false;
- boolean enableDown = false;
-
- int[] availableSelected = _availableList.getSelectionIndices();
- for (int i = 0; i < availableSelected.length; i++)
- {
- int index = availableSelected[i];
- IPropertyDescriptor descriptor = (IPropertyDescriptor)_availableDescriptors.get(index);
- if (!_currentDisplayedDescriptors.contains(descriptor))
- {
- enableAdd = true;
- }
- }
-
- if (_displayedList.getSelectionCount()>0)
- {
- enableRemove = true;
-
- int index = _displayedList.getSelectionIndex();
- if (index > 0)
- {
- enableUp = true;
- }
- if (index < _displayedList.getItemCount()-1)
- {
- enableDown = true;
- }
- }
-
- _addButton.setEnabled(enableAdd);
- _removeButton.setEnabled(enableRemove);
- _upButton.setEnabled(enableUp);
- _downButton.setEnabled(enableDown);
-
- }
-
- private void moveUp(int index)
- {
- Object obj = _currentDisplayedDescriptors.remove(index);
- _currentDisplayedDescriptors.add(index - 1, obj);
- refreshDisplayedList();
- }
-
- private void moveDown(int index)
- {
- Object obj = _currentDisplayedDescriptors.remove(index);
- _currentDisplayedDescriptors.add(index + 1, obj);
-
- refreshDisplayedList();
- }
-
- private void addToDisplay(int[] toAdd)
- {
- ArrayList added = new ArrayList();
- for (int i = 0; i < toAdd.length; i++)
- {
- int index = toAdd[i];
-
- IPropertyDescriptor descriptor = (IPropertyDescriptor)_availableDescriptors.get(index);
-
- if (!_currentDisplayedDescriptors.contains(descriptor))
- {
- _currentDisplayedDescriptors.add(descriptor);
- added.add(descriptor);
- }
- }
-
- for (int i = 0; i < added.size(); i++)
- {
- _availableDescriptors.remove(added.get(i));
- }
-
-
- refreshAvailableList();
- refreshDisplayedList();
-
- }
-
- private void removeFromDisplay(int[] toRemove)
- {
- for (int i = 0; i < toRemove.length; i++)
- {
- int index = toRemove[i];
- IPropertyDescriptor descriptor = (IPropertyDescriptor)_currentDisplayedDescriptors.get(index);
- _currentDisplayedDescriptors.remove(index);
- _availableDescriptors.add(descriptor);
- }
- refreshDisplayedList();
- refreshAvailableList();
- }
-
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
-
- close();
- }
-
- protected Control getInitialFocusControl()
- {
- return _availableList;
- }
-
- public Control createInner(Composite parent)
- {
- Composite main = SystemWidgetHelpers.createComposite(parent, 1);
-
-
- Composite c = SystemWidgetHelpers.createComposite(main, 4);
- c.setLayoutData(new GridData(GridData.FILL_BOTH));
- _availableList = SystemWidgetHelpers.createListBox(c, SystemResources.RESID_TABLE_SELECT_COLUMNS_AVAILABLE_LABEL, this, true);
-
- Composite addRemoveComposite = SystemWidgetHelpers.createComposite(c, 1);
- addRemoveComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER));
- _addButton = SystemWidgetHelpers.createPushButton(addRemoveComposite,
- SystemResources.RESID_TABLE_SELECT_COLUMNS_ADD_LABEL,
- this);
- _addButton.setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_ADD_TOOLTIP);
-
- _removeButton = SystemWidgetHelpers.createPushButton(addRemoveComposite,
- SystemResources.RESID_TABLE_SELECT_COLUMNS_REMOVE_LABEL,
- this);
- _removeButton.setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_REMOVE_TOOLTIP);
-
- _displayedList = SystemWidgetHelpers.createListBox(c, SystemResources.RESID_TABLE_SELECT_COLUMNS_DISPLAYED_LABEL, this, false);
-
- Composite upDownComposite = SystemWidgetHelpers.createComposite(c, 1);
- upDownComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER));
- _upButton = SystemWidgetHelpers.createPushButton(upDownComposite,
- SystemResources.RESID_TABLE_SELECT_COLUMNS_UP_LABEL,
- this);
- _upButton.setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_UP_TOOLTIP);
-
- _downButton = SystemWidgetHelpers.createPushButton(upDownComposite,
- SystemResources.RESID_TABLE_SELECT_COLUMNS_DOWN_LABEL,
- this);
- _downButton.setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_DOWN_TOOLTIP);
-
- initLists();
-
- setHelp();
- return c;
- }
-
- private void initLists()
- {
- refreshAvailableList();
- refreshDisplayedList();
- updateEnableStates();
- }
-
- private void refreshAvailableList()
- {
- _availableList.removeAll();
- // initialize available list
- for (int i = 0; i < _availableDescriptors.size(); i++)
- {
- IPropertyDescriptor descriptor = (IPropertyDescriptor)_availableDescriptors.get(i);
- _availableList.add(descriptor.getDisplayName());
- }
- }
-
- private void refreshDisplayedList()
- {
- _displayedList.removeAll();
- // initialize display list
- for (int i = 0; i < _currentDisplayedDescriptors.size(); i++)
- {
-
- Object obj = _currentDisplayedDescriptors.get(i);
- if (obj != null && obj instanceof IPropertyDescriptor)
- {
- _displayedList.add(((IPropertyDescriptor)obj).getDisplayName());
- }
- }
- }
-
- private void setHelp()
- {
- setHelp(RSEUIPlugin.HELPPREFIX + "gntc0000"); //$NON-NLS-1$
- }
- }
-
- public SelectColumnsAction()
- {
- super(SystemResources.ACTION_SELECTCOLUMNS_LABEL, null);
- setToolTipText(SystemResources.ACTION_SELECTCOLUMNS_TOOLTIP);
- setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID));
- }
-
- public void checkEnabledState()
- {
- if (_viewer != null && _viewer.getInput() != null)
- {
- setEnabled(true);
- }
- else
- {
- setEnabled(false);
- }
- }
- public void run()
- {
- SystemTableViewColumnManager mgr = _viewer.getColumnManager();
- ISystemViewElementAdapter adapter = _viewer.getAdapterForContents();
- SelectColumnsDialog dlg = new SelectColumnsDialog(getShell(), adapter, mgr);
- if (dlg.open() == Window.OK)
- {
- mgr.setCustomDescriptors(adapter, dlg.getDisplayedColumns());
- _viewer.computeLayout(true);
- _viewer.refresh();
- }
- }
- }
-
- private HistoryItem _currentItem;
-
- private SystemTableView _viewer;
-
- protected ArrayList _browseHistory;
- protected int _browsePosition;
-
- private ForwardAction _forwardAction = null;
- private BackwardAction _backwardAction = null;
- private UpAction _upAction = null;
-
- private LockAction _lockAction = null;
- private RefreshAction _refreshAction = null;
- private SystemRefreshAction _refreshSelectionAction = null;
-
- private SelectInputAction _selectInputAction = null;
- private PositionToAction _positionToAction = null;
- private SubSetAction _subsetAction = null;
- private SystemTablePrintAction _printTableAction = null;
- private SelectColumnsAction _selectColumnsAction = null;
-
- // common actions
- private SystemCopyToClipboardAction _copyAction;
- private SystemPasteFromClipboardAction _pasteAction;
- private SystemCommonDeleteAction _deleteAction;
- private SystemCommonRenameAction _renameAction;
-
- private IMemento _memento = null;
- private IAdaptable _mementoInput = null;
- private Object _lastSelection = null;
-
- private boolean _isLocked = false;
-
- // for ISystemMessageLine
- private String _message, _errorMessage;
- private SystemMessage sysErrorMessage;
- private IStatusLineManager _statusLine = null;
-
- // constants
- public static final String ID = "org.eclipse.rse.ui.view.systemTableView"; // matches id in plugin.xml, view tag //$NON-NLS-1$
-
- // Restore memento tags
- public static final String TAG_TABLE_VIEW_PROFILE_ID = "tableViewProfileID"; //$NON-NLS-1$
- public static final String TAG_TABLE_VIEW_CONNECTION_ID = "tableViewConnectionID"; //$NON-NLS-1$
- public static final String TAG_TABLE_VIEW_SUBSYSTEM_ID = "tableViewSubsystemID"; //$NON-NLS-1$
- public static final String TAG_TABLE_VIEW_OBJECT_ID = "tableViewObjectID"; //$NON-NLS-1$
- public static final String TAG_TABLE_VIEW_FILTER_ID = "tableViewFilterID"; //$NON-NLS-1$
-
- // Subset memento tags
- public static final String TAG_TABLE_VIEW_SUBSET = "subset"; //$NON-NLS-1$
-
- // layout memento tags
- public static final String TAG_TABLE_VIEW_COLUMN_WIDTHS_ID = "columnWidths"; //$NON-NLS-1$
-
- public void setFocus()
- {
- if (_viewer.getInput() == null)
- {
- if (_memento != null)
- {
- restoreState(_memento);
- }
- else
- {
- setInput(RSEUIPlugin.getTheSystemRegistry());
- }
- }
-
- _viewer.getControl().setFocus();
- }
-
- public SystemTableView getViewer()
- {
- return _viewer;
- }
-
- public Viewer getRSEViewer()
- {
- return _viewer;
- }
-
- public void createPartControl(Composite parent)
- {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- _viewer = new SystemTableView(table, this);
- _viewer.setWorkbenchPart(this);
-
- table.setLinesVisible(true);
-
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.addSelectionListener(this);
- _viewer.addSelectionChangedListener(this);
- getSite().setSelectionProvider(_viewer);
-
- _viewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
- {
- handleDoubleClick(event);
- }
- });
-
- _isLocked = true;
- fillLocalToolBar();
-
- _browseHistory = new ArrayList();
- _browsePosition = 0;
-
- // register global edit actions
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- Clipboard clipboard = registry.getSystemClipboard();
-
- CellEditorActionHandler editorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars());
-
- _copyAction = new SystemCopyToClipboardAction(_viewer.getShell(), clipboard);
- _pasteAction = new SystemPasteFromClipboardAction(_viewer.getShell(), clipboard);
- _deleteAction = new SystemCommonDeleteAction(_viewer.getShell(), _viewer);
- _renameAction = new SystemCommonRenameAction(_viewer.getShell(), _viewer);
-
- editorActionHandler.setCopyAction(_copyAction);
- editorActionHandler.setPasteAction(_pasteAction);
- editorActionHandler.setDeleteAction(_deleteAction);
- editorActionHandler.setSelectAllAction(new SelectAllAction());
-
- // register rename action as a global handler
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.RENAME.getId(), _renameAction);
-
- registry.addSystemResourceChangeListener(this);
- registry.addSystemRemoteChangeListener(this);
-
- SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "sysd0000"); //$NON-NLS-1$
-
- getSite().registerContextMenu(_viewer.getContextMenuManager(), _viewer);
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection sel)
- {
- if (part != this && (part instanceof SystemViewPart))
- {
- if (!_isLocked)
- {
- if (sel instanceof IStructuredSelection)
- {
- Object first = ((IStructuredSelection) sel).getFirstElement();
- if (_lastSelection != first)
- {
- _lastSelection = first;
- if (first instanceof IAdaptable)
- {
- {
- IAdaptable adapt = (IAdaptable) first;
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) adapt.getAdapter(ISystemViewElementAdapter.class);
- if (va != null && !(va instanceof SystemViewPromptableAdapter))
- {
- if (va.hasChildren(adapt) && adapt != _viewer.getInput())
- {
- setInput(adapt);
- }
- }
- }
- }
- }
- }
- }
- }
- else
- if (part == this)
- {
- updateActionStates();
- }
- }
-
- public void dispose()
- {
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.removeSelectionListener(this);
- _viewer.removeSelectionChangedListener(this);
-
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- if (_viewer != null)
- {
- _viewer.dispose();
- }
-
- super.dispose();
- }
-
- private void handleDoubleClick(DoubleClickEvent event)
- {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null)
- return;
-
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);
- boolean alreadyHandled = false;
- if (adapter != null)
- {
- alreadyHandled = adapter.handleDoubleClick(element);
-
- if (!alreadyHandled && adapter.hasChildren(element))
- {
- setInput((IAdaptable) element);
- }
- }
- }
-
- public void updateActionStates()
- {
- if (_refreshAction == null)
- fillLocalToolBar();
-
- _backwardAction.checkEnabledState();
- _forwardAction.checkEnabledState();
- _upAction.checkEnabledState();
- _lockAction.checkEnabledState();
- _refreshAction.checkEnabledState();
-
- _selectInputAction.checkEnabledState();
- _positionToAction.checkEnabledState();
- _subsetAction.checkEnabledState();
-
- _printTableAction.checkEnabledState();
- _selectColumnsAction.checkEnabledState();
- }
-
- private ImageDescriptor getEclipseImageDescriptor(String relativePath)
- {
- String iconPath = "icons/full/"; //$NON-NLS-1$
- try
- {
- Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
- URL installURL = bundle.getEntry("/"); //$NON-NLS-1$
- URL url = new URL(installURL, iconPath + relativePath);
- return ImageDescriptor.createFromURL(url);
- }
- catch (MalformedURLException e)
- {
- return null;
- }
- }
-
- public void fillLocalToolBar()
- {
-
- if (_refreshAction == null)
- {
- // refresh action
- _refreshAction = new RefreshAction();
-
- // history actions
- _backwardAction = new BackwardAction();
- _forwardAction = new ForwardAction();
-
- // parent/child actions
- _upAction = new UpAction();
-
- // lock action
- _lockAction = new LockAction();
-
- _selectInputAction = new SelectInputAction();
- _positionToAction = new PositionToAction();
- _subsetAction = new SubSetAction();
-
- _printTableAction = new SystemTablePrintAction(getTitle(), _viewer);
- _selectColumnsAction = new SelectColumnsAction();
- }
-
- updateActionStates();
-
- IActionBars actionBars = getViewSite().getActionBars();
- IToolBarManager toolBarManager = actionBars.getToolBarManager();
- IMenuManager menuMgr = actionBars.getMenuManager();
-
-
- _refreshSelectionAction = new SystemRefreshAction(getShell());
- actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), _refreshSelectionAction);
- _refreshSelectionAction.setSelectionProvider(_viewer);
-
- _statusLine = actionBars.getStatusLineManager();
-
- addToolBarItems(toolBarManager);
- addToolBarMenuItems(menuMgr);
- }
-
- private void addToolBarMenuItems(IMenuManager menuManager)
- {
- menuManager.removeAll();
- menuManager.add(_selectColumnsAction);
- menuManager.add(new Separator("View")); //$NON-NLS-1$
- menuManager.add(_selectInputAction);
- menuManager.add(new Separator("Filter")); //$NON-NLS-1$
- menuManager.add(_positionToAction);
- menuManager.add(_subsetAction);
-
- //DKM - this action is useless - remove it
- // menuManager.add(new Separator("Print"));
- // menuManager.add(_printTableAction);
-
- }
-
- private void addToolBarItems(IToolBarManager toolBarManager)
- {
- toolBarManager.removeAll();
-
- _lockAction.setChecked(_isLocked);
-
- toolBarManager.add(_lockAction);
- toolBarManager.add(_refreshAction);
-
-
- toolBarManager.add(new Separator("Navigate")); //$NON-NLS-1$
- // only support history when we're locked
- if (_isLocked)
- {
- toolBarManager.add(_backwardAction);
- toolBarManager.add(_forwardAction);
- }
-
- toolBarManager.add(_upAction);
-
- toolBarManager.add(new Separator("View")); //$NON-NLS-1$
- toolBarManager.add(_selectColumnsAction);
- }
-
- public void showLock()
- {
- if (_upAction != null)
- {
- IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
- toolBarManager.removeAll();
-
- updateActionStates();
-
- addToolBarItems(toolBarManager);
- }
- }
-
- public void selectionChanged(SelectionChangedEvent e)
- {
- // listener for this view
- updateActionStates();
-
- IStructuredSelection sel = (IStructuredSelection) e.getSelection();
- _copyAction.setEnabled(_copyAction.updateSelection(sel));
- _pasteAction.setEnabled(_pasteAction.updateSelection(sel));
- _deleteAction.setEnabled(_deleteAction.updateSelection(sel));
- }
-
- public void setInput(IAdaptable object)
- {
- String[] filters = null;
- if (_currentItem != null)
- {
- IAdaptable item = _currentItem.getObject();
-
- ISystemViewElementAdapter adapter1 = (ISystemViewElementAdapter)object.getAdapter(ISystemViewElementAdapter.class);
- ISystemViewElementAdapter adapter2 = (ISystemViewElementAdapter)item.getAdapter(ISystemViewElementAdapter.class);
- if (adapter1 == adapter2)
- {
- filters = _currentItem.getFilters();
- }
- else
- {
- _viewer.setViewFilters(null);
- }
- }
- setInput(object, filters, _isLocked);
-
- if (!_isLocked)
- {
- _currentItem = new HistoryItem(object, null);
- }
- }
-
- public void setInput(HistoryItem historyItem)
- {
- setInput(historyItem.getObject(), historyItem.getFilters(), false);
-
- _currentItem = historyItem;
-
- }
-
- public void setInput(IAdaptable object, String[] filters, boolean updateHistory)
- {
- if (_viewer != null /*&& object != null*/)
- {
- setTitle(object);
- _viewer.setInput(object);
-
- if (_refreshSelectionAction != null)
- {
- _refreshSelectionAction.updateSelection(new StructuredSelection(object));
- }
- if (filters != null)
- {
- _viewer.setViewFilters(filters);
- }
-
- if (updateHistory)
- {
- while (_browsePosition < _browseHistory.size() - 1)
- {
- _browseHistory.remove(_browseHistory.get(_browseHistory.size() - 1));
- }
-
- _currentItem = new HistoryItem(object, filters);
-
-
- _browseHistory.add(_currentItem);
- _browsePosition = _browseHistory.lastIndexOf(_currentItem);
- }
-
- updateActionStates();
-
- }
- }
-
- public void setTitle(IAdaptable object)
- {
- if (object == null)
- {
- setContentDescription(""); //$NON-NLS-1$
- }
- else
- {
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) object.getAdapter(ISystemViewElementAdapter.class);
- if (va != null)
- {
- String type = va.getType(object);
- String name = va.getName(object);
- //setPartName(type + " " + name);
-
- setContentDescription(type + " "+ name); //$NON-NLS-1$
-
- //SystemTableViewProvider provider = (SystemTableViewProvider) _viewer.getContentProvider();
- //setTitleImage(provider.getImage(object));
- }
- }
- }
-
- /**
- * Used to asynchronously update the view whenever properties change.
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- Object child = event.getSource();
- Object input = _viewer.getInput();
- switch (event.getType())
- {
- case ISystemResourceChangeEvents.EVENT_RENAME:
- {
- if (child == input)
- {
- setTitle((IAdaptable) child);
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_DELETE:
- case ISystemResourceChangeEvents.EVENT_DELETE_MANY:
- {
- if (child instanceof ISystemFilterReference)
- {
-
- if (child == input)
- {
- removeFromHistory(input);
- }
- }
- }
- break;
- default:
- break;
- }
- }
-
- protected void removeFromHistory(Object c)
- {
- // if the object is in history, remove it since it's been deleted
- for (int i = 0; i < _browseHistory.size(); i++)
- {
- HistoryItem hist = (HistoryItem)_browseHistory.get(i);
- if (hist.getObject() == c)
- {
-
- _browseHistory.remove(hist);
- if (_browsePosition >= i)
- {
- _browsePosition--;
- if (_browsePosition < 0)
- {
- _browsePosition = 0;
- }
- }
- if (hist == _currentItem)
- {
- if (_browseHistory.size() > 0)
- {
- _currentItem = (HistoryItem)_browseHistory.get(_browsePosition);
- setInput(_currentItem.getObject(), null, false);
- }
- else
- {
- _currentItem = null;
- setInput((IAdaptable)null, null, false);
- }
-
-
- }
- }
- }
- }
-
- /**
- * This is the method in your class that will be called when a remote resource
- * changes. You will be called after the resource is changed.
- * @see org.eclipse.rse.model.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- int eventType = event.getEventType();
- Object remoteResource = event.getResource();
-
- Vector remoteResourceNames = null;
- if (remoteResource instanceof Vector)
- {
- remoteResourceNames = (Vector) remoteResource;
- remoteResource = remoteResourceNames.elementAt(0);
- }
-
- Object child = event.getResource();
-
-
- Object input = _viewer.getInput();
- if (input == child || child instanceof Vector)
- {
- switch (eventType)
- {
- // --------------------------
- // REMOTE RESOURCE CHANGED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CHANGED :
- break;
-
- // --------------------------
- // REMOTE RESOURCE CREATED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED :
- break;
-
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED :
- {
- if (child instanceof Vector)
- {
- Vector vec = (Vector)child;
- for (int v = 0; v < vec.size(); v++)
- {
- Object c = vec.get(v);
-
- removeFromHistory(c);
- /*
- if (c == input)
- {
- setInput((IAdaptable)null, null, false);
-
- return;
- }
- */
- }
- }
- else
- {
- removeFromHistory(child);
- //setInput((IAdaptable)null);
-
- return;
- }
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE RENAMED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
- {
- setInput((IAdaptable)child);
- }
-
- break;
- }
- }
- }
-
- public Shell getShell()
- {
- return _viewer.getShell();
- }
-
- private void restoreState(IMemento memento)
- {
- RestoreStateRunnable rsr = new RestoreStateRunnable(memento);
- rsr.setRule(RSEUIPlugin.getTheSystemRegistry());
- rsr.schedule();
- _memento = null;
- }
-
- /**
- * Initializes this view with the given view site. A memento is passed to
- * the view which contains a snapshot of the views state from a previous
- * session. Where possible, the view should try to recreate that state
- * within the part controls.
- * <p>
- * The parent's default implementation will ignore the memento and initialize
- * the view in a fresh state. Subclasses may override the implementation to
- * perform any state restoration as needed.
- */
- public void init(IViewSite site, IMemento memento) throws PartInitException
- {
- super.init(site, memento);
-
- if (memento != null && SystemPreferencesManager.getPreferencesManager().getRememberState())
- {
- _memento = memento;
-
- }
- }
-
- /**
- * Method declared on IViewPart.
- */
- public void saveState(IMemento memento)
- {
- super.saveState(memento);
-
- if (!SystemPreferencesManager.getPreferencesManager().getRememberState())
- return;
-
- if (_viewer != null)
- {
- Object input = _viewer.getInput();
-
- if (input != null)
- {
- if (input instanceof ISystemRegistry)
- {
-
- }
- else if (input instanceof IHost)
- {
- IHost connection = (IHost) input;
- String connectionID = connection.getAliasName();
- String profileID = connection.getSystemProfileName();
- memento.putString(TAG_TABLE_VIEW_CONNECTION_ID, connectionID);
- memento.putString(TAG_TABLE_VIEW_PROFILE_ID, profileID);
- }
- else
- {
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) ((IAdaptable) input).getAdapter(ISystemViewElementAdapter.class);
-
- ISubSystem subsystem = va.getSubSystem(input);
- if (subsystem != null)
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- String subsystemID = registry.getAbsoluteNameForSubSystem(subsystem);
- String profileID = subsystem.getHost().getSystemProfileName();
- String connectionID = subsystem.getHost().getAliasName();
- String objectID = va.getAbsoluteName(input);
-
- memento.putString(TAG_TABLE_VIEW_PROFILE_ID, profileID);
- memento.putString(TAG_TABLE_VIEW_CONNECTION_ID, connectionID);
- memento.putString(TAG_TABLE_VIEW_SUBSYSTEM_ID, subsystemID);
-
- if (input instanceof ISystemFilterReference)
- {
- memento.putString(TAG_TABLE_VIEW_FILTER_ID, objectID);
- memento.putString(TAG_TABLE_VIEW_OBJECT_ID, null);
- }
- else
- if (input instanceof ISubSystem)
- {
- memento.putString(TAG_TABLE_VIEW_OBJECT_ID, null);
- memento.putString(TAG_TABLE_VIEW_FILTER_ID, null);
- }
- else
- {
- memento.putString(TAG_TABLE_VIEW_OBJECT_ID, objectID);
- memento.putString(TAG_TABLE_VIEW_FILTER_ID, null);
- }
- }
- }
-
- Table table = _viewer.getTable();
- if (table != null && !table.isDisposed())
- {
- String columnWidths = new String();
- TableColumn[] columns = table.getColumns();
- for (int i = 0; i < columns.length; i++)
- {
- TableColumn column = columns[i];
- int width = column.getWidth();
- if (i == columns.length - 1)
- {
- columnWidths += width;
- }
- else
- {
- columnWidths += width + ","; //$NON-NLS-1$
- }
- }
- memento.putString(TAG_TABLE_VIEW_COLUMN_WIDTHS_ID, columnWidths);
- }
- }
- }
- }
-
-
-// -------------------------------
- // ISystemMessageLine interface...
- // -------------------------------
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- _errorMessage = null;
- sysErrorMessage = null;
- if (_statusLine != null)
- _statusLine.setErrorMessage(_errorMessage);
- }
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- _message = null;
- if (_statusLine != null)
- _statusLine.setMessage(_message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage()
- {
- return _errorMessage;
- }
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage()
- {
- return _message;
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- this._errorMessage = message;
- if (_statusLine != null)
- _statusLine.setErrorMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- return sysErrorMessage;
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- sysErrorMessage = message;
- setErrorMessage(message.getLevelOneText());
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(Throwable exc)
- {
- setErrorMessage(exc.getMessage());
- }
-
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- this._message = message;
- if (_statusLine != null)
- _statusLine.setMessage(message);
- }
- /**
- *If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- setMessage(message.getLevelOneText());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java
deleted file mode 100644
index 0ddcee105..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java
+++ /dev/null
@@ -1,354 +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.view;
-
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-
-/**
- * This is the content and label provider for the SystemTableView.
- * This class is used both to populate the SystemTableView but also
- * to resolve the icon and labels for the cells in the table.
- *
- */
-public class SystemTableViewProvider implements ILabelProvider, ITableLabelProvider, ITreeContentProvider
-{
-
-
- private ListenerList listeners = new ListenerList(1);
-
- protected Object[] _lastResults = null;
- protected Object _lastObject = null;
- protected SimpleDateFormat _dateFormat = new SimpleDateFormat();
- protected Viewer _viewer = null;
- protected int _maxCharsInColumnZero = 0;
-
- /**
- * The cache of images that have been dispensed by this provider.
- * Maps ImageDescriptor->Image.
- */
- private Map imageTable = new Hashtable(40);
- private SystemTableViewColumnManager _columnManager;
- private HashMap cache;
- /**
- * Constructor for table view provider where a column manager is present.
- * In this case, the columns are customizable by the user.
- * @param columnManager
- */
- public SystemTableViewProvider(SystemTableViewColumnManager columnManager)
- {
- super();
- _columnManager= columnManager;
- cache = new HashMap();
- }
-
- /**
- * Constructor for table view provider where a column manager is not present.
- * In this case, the column can not be customized
- * @param columnManager
- */
- public SystemTableViewProvider()
- {
- super();
- _columnManager= null;
- }
-
-
- public void inputChanged(Viewer visualPart, Object oldInput, Object newInput)
- {
- _viewer = visualPart;
- }
-
-
-
-
-
-
- public boolean isDeleted(Object element)
- {
- return false;
- }
-
- public Object[] getChildren(Object object)
- {
- return getElements(object);
- }
-
- public Object getParent(Object object)
- {
- return getAdapterFor(object).getParent(object);
- }
-
- public boolean hasChildren(Object object)
- {
- return false;
- }
-
- public Object getElementAt(Object object, int i)
- {
-
- return null;
- }
-
- protected ISystemViewElementAdapter getAdapterFor(Object object)
- {
- ISystemViewElementAdapter result = null;
- if (_viewer != null)
- {
- result = SystemAdapterHelpers.getAdapter(object, _viewer);
- }
- else
- {
- result = SystemAdapterHelpers.getAdapter(object);
- }
- result.setPropertySourceInput(object);
- return result;
- }
-
- public Object[] getElements(Object object)
- {
- Object[] results = null;
- if (object == _lastObject && _lastResults != null)
- {
- return _lastResults;
- }
- else
- if (object instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- adapter.setViewer(_viewer);
- results = adapter.getChildren(object);
- if (adapter instanceof SystemViewRootInputAdapter)
- {
- ArrayList filterredResults = new ArrayList();
- for (int i = 0; i < results.length; i++)
- {
- Object result = results[i];
- ISystemViewElementAdapter cadapter = getAdapterFor(result);
- if (!(cadapter instanceof SystemViewPromptableAdapter))
- {
- filterredResults.add(result);
- }
- }
- results = filterredResults.toArray();
- }
-
- _lastResults = results;
- _lastObject = object;
- }
- }
- if (results == null)
- {
- return new Object[0];
- }
-
- return results;
- }
-
- public String getText(Object object)
- {
- String result = getAdapterFor(object).getText(object);
- int len = result.length();
- if (len > _maxCharsInColumnZero)
- {
- _maxCharsInColumnZero = len;
- }
- return result;
- }
-
- public int getMaxCharsInColumnZero()
- {
- return _maxCharsInColumnZero;
- }
-
- public Image getImage(Object object)
- {
- ImageDescriptor descriptor = getAdapterFor(object).getImageDescriptor(object);
-
- Image image = null;
- if (descriptor != null)
- {
- Object iobj = imageTable.get(descriptor);
- if (iobj == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- else
- {
- image = (Image) iobj;
- }
- }
- return image;
- }
-
- public String getColumnText(Object obj, int index)
- {
- if (index == 0)
- {
- // get the first descriptor
- return getText(obj);
- }
- else
- {
-
- index = index - 1;
- ISystemViewElementAdapter adapter = getAdapterFor(obj);
-
- IPropertyDescriptor[] descriptors = null;
- if (_columnManager != null)
- {
- descriptors = _columnManager.getVisibleDescriptors(adapter);
- }
- else
- {
- descriptors = adapter.getUniquePropertyDescriptors();
- }
-
- if (descriptors.length > index)
- {
- IPropertyDescriptor descriptor = descriptors[index];
-
- try
- {
- Object key = descriptor.getId();
-
- Object propertyValue = adapter.getPropertyValue(key);
-
- if (propertyValue instanceof String)
- {
- return (String) propertyValue;
- }
- else if (propertyValue instanceof Date)
- {
- return _dateFormat.format((Date)propertyValue);
- }
- else
- if (propertyValue != null)
- {
- return propertyValue.toString();
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- return ""; //$NON-NLS-1$
- }
-
- }
-
- public Image getColumnImage(Object obj, int i)
- {
- if (i == 0)
- {
- return getImage(obj);
- }
- else
- {
- return null;
- }
- }
-
- public void addListener(ILabelProviderListener listener)
- {
- listeners.add(listener);
- }
-
- public boolean isLabelProperty(Object element, String property)
- {
- return true;
- }
-
- public void removeListener(ILabelProviderListener listener)
- {
- listeners.remove(listener);
- }
-
- /**
- * Cache the objects for the given parent.
- * @param parent the parent object.
- * @param children the children to cache.
- */
- public void setCachedObjects(Object parent, Object[] children) {
- cache.put(parent, children);
- }
-
- /**
- * Returns the cached objects for the given parent.
- * @param parent the parent object.
- * @return the cached children.
- */
- public Object[] getCachedObjects(Object parent) {
- return (Object[])(cache.get(parent));
- }
-
-
- public void setCache(Object[] newCache)
- {
- _lastResults = newCache;
- }
-
- public Object[] getCache()
- {
- return _lastResults;
- }
-
- public boolean flushCache()
- {
- if (_lastResults == null)
- {
- return false;
- }
- if (_lastObject instanceof ISystemContainer)
- {
- // ((ISystemContainer)_lastObject).markStale(true);
- }
-
- _lastResults = null;
- return true;
- }
-
- public void dispose()
- {
- // TODO Auto-generated method stub
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewSorter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewSorter.java
deleted file mode 100644
index 3d892348c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewSorter.java
+++ /dev/null
@@ -1,184 +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.view;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * This class is used for sorting in the SystemTableView. The sorter
- * determines what and how to sort based on property descriptors.
- *
- */
-public class SystemTableViewSorter extends ViewerSorter
-{
-
-
- private boolean _reverseSort;
-
- private int _columnNumber;
-
- private StructuredViewer _view;
- private SystemTableViewColumnManager _columnManager;
-
- public SystemTableViewSorter(int columnNumber, StructuredViewer view, SystemTableViewColumnManager columnManager)
- {
- super();
- _reverseSort = false;
- _columnNumber = columnNumber;
- _view = view;
- _columnManager = columnManager;
- }
-
- public boolean isSorterProperty(java.lang.Object element, java.lang.Object property)
- {
- return true;
- }
-
- public int category(Object element)
- {
- return 0;
- }
-
- public int getColumnNumber()
- {
- return _columnNumber;
- }
-
- public boolean isReversed()
- {
- return _reverseSort;
- }
-
- public void setReversed(boolean newReversed)
- {
- _reverseSort = newReversed;
- }
-
- public int compare(Viewer v, Object e1, Object e2)
- {
- Object name1 = getValueFor(e1, _columnNumber);
- Object name2 = getValueFor(e2, _columnNumber);
-
- try
- {
- Object n1 = name1;
- Object n2 = name2;
-
- if (n1.toString().length() == 0)
- return 1;
-
- if (isReversed())
- {
- n1 = name2;
- n2 = name1;
- }
-
- if (n1 instanceof String)
- {
- return ((String) n1).compareTo((String) n2);
- }
- else if (n1 instanceof Date)
- {
- return ((Date) n1).compareTo((Date) n2);
- }
- else if (n1 instanceof Long)
- {
- return ((Long) n1).compareTo((Long) n2);
- }
- else if (n1 instanceof Integer)
- {
- return ((Integer) n1).compareTo((Integer) n2);
- }
- else
- {
- return collator.compare(n1, n2);
- }
- }
- catch (Exception e)
- {
- return 0;
- }
-
- }
-
- private Object getValueFor(Object obj, int index)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(obj);
- if (index == 0)
- {
- return adapter.getText(obj);
- }
-
- Widget widget = _view.testFindItem(obj);
- if (widget != null)
- {
-
- }
-
- index = index - 1;
- IPropertyDescriptor[] descriptors = null;
- if (_columnManager != null)
- {
- descriptors = _columnManager.getVisibleDescriptors(adapter);
- }
- else
- {
- descriptors = adapter.getUniquePropertyDescriptors();
- }
- if (descriptors.length > index)
- {
- IPropertyDescriptor descriptor = descriptors[index];
-
- try
- {
- Object key = descriptor.getId();
-
- Object propertyValue = adapter.getPropertyValue(key, false);
- return propertyValue;
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- return ""; //$NON-NLS-1$
- }
-
- private ISystemViewElementAdapter getAdapterFor(Object object)
- {
- IAdaptable adapt = (IAdaptable) object;
- if (adapt != null)
- {
- ISystemViewElementAdapter result = (ISystemViewElementAdapter) adapt.getAdapter(ISystemViewElementAdapter.class);
- result.setPropertySourceInput(object);
-
- return result;
- }
-
- return null;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 6e3840dbf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTestFilterStringAPIProviderImpl.java
+++ /dev/null
@@ -1,175 +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.view;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is used when the contents are used to show the resolution of a single filter string.
- */
-public class SystemTestFilterStringAPIProviderImpl
- extends SystemAbstractAPIProvider
- implements ISystemViewInputProvider
-{
-
-
- protected String filterString = null;
- protected ISubSystem subsystem = null;
- protected Object[] emptyList = new Object[0];
- protected Object[] msgList = new Object[1];
- protected SystemMessageObject nullObject = null;
- protected SystemMessageObject canceledObject = null;
- protected SystemMessageObject errorObject = null;
- /**
- * Constructor
- * @param subsystem The subsystem that will resolve the filter string
- * @param filterString The filter string to test
- */
- public SystemTestFilterStringAPIProviderImpl(ISubSystem subsystem, String filterString)
- {
- super();
- this.subsystem = subsystem;
- this.filterString = filterString;
- }
-
- private void initMsgObjects()
- {
- 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);
- }
-
- /**
- * Change the input subsystem
- */
- public void setSubSystem(ISubSystem subsystem)
- {
- this.subsystem = subsystem;
- }
- /**
- * Change the input filter string
- */
- public void setFilterString(String filterString)
- {
- this.filterString = filterString;
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * We return the result of asking the subsystem to resolve the filter string.
- */
- public Object[] getSystemViewRoots()
- {
- Object[] children = emptyList;
- if (subsystem == null)
- return children;
- try
- {
- children = subsystem.resolveFilterString(filterString);
- if ((children == null) || (children.length==0))
- {
- if (nullObject == null)
- initMsgObjects();
- msgList[0] = nullObject;
- children = msgList;
- }
- } catch (InterruptedException exc)
- {
- if (canceledObject == null)
- initMsgObjects();
- msgList[0] = canceledObject;
- children = msgList;
- } catch (Exception exc)
- {
- if (errorObject == null)
- initMsgObjects();
- msgList[0] = errorObject;
- children = msgList;
- SystemBasePlugin.logError("Error in SystemTestFilterStringAPIProviderImpl#getSystemViewRoots()",exc); //$NON-NLS-1$
- }
- return children;
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return true on the assumption the filter string will resolve to something.
- */
- public boolean hasSystemViewRoots()
- {
- return true;
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- * <p>NOT APPLICABLE TO US
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return null; //
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- * <p>NOT APPLICABLE TO US
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return true;
- }
-
- /**
- * Return true to show the action bar (ie, toolbar) above the viewer.
- * The action bar contains connection actions, predominantly.
- */
- public boolean showActionBar()
- {
- return false;
- }
- /**
- * Return true to show the button bar above the viewer.
- * The tool bar contains "Get List" and "Refresh" buttons and is typicall
- * shown in dialogs that list only remote system objects.
- */
- public boolean showButtonBar()
- {
- return true;
- }
- /**
- * Return true to show right-click popup actions on objects in the tree.
- */
- public boolean showActions()
- {
- return false;
- }
-
-
-
- // ----------------------------------
- // OUR OWN METHODS...
- // ----------------------------------
-
-} \ No newline at end of file
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
deleted file mode 100644
index e2717a368..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemView.java
+++ /dev/null
@@ -1,5341 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. 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:
- * Michael Berger (IBM) - Patch to remove non-standard expand/collapse from menu.
- * Tobias Schwarz (Wind River) - Fix 166343 getChildCount() counts invalid items
- * Martin Oberhuber (Wind River) - Improve fix for 166343 getChildCount()
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.ITreeViewerListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeExpansionEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.window.SameShellProvider;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemElapsedTimer;
-import org.eclipse.rse.core.SystemPopupMenuActionContributorManager;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterContainerReference;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemPromptableObject;
-import org.eclipse.rse.model.ISystemRemoteChangeEvent;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemRemoteChangeListener;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemRemoteElementResourceSet;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemCascadingGoToAction;
-import org.eclipse.rse.ui.actions.SystemCollapseAction;
-import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.ui.actions.SystemExpandAction;
-import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
-import org.eclipse.rse.ui.actions.SystemOpenExplorerPerspectiveAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.actions.SystemRemotePropertiesAction;
-import org.eclipse.rse.ui.actions.SystemShowInMonitorAction;
-import org.eclipse.rse.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.TreeEvent;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.part.EditorInputTransfer;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.progress.PendingUpdateAdapter;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.ui.views.framelist.GoIntoAction;
-
-/**
- * This subclass of the standard JFace tree viewer is used to show a tree
- * view of connections to remote systems, which can be manipulated and expanded
- * to access remote objects in the remote system.
- */
-/*
- * At one time implemented the following as well: MenuListener, IDoubleClickListener, ArmListener, IWireEventTarget
- */
-public class SystemView extends TreeViewer implements ISystemTree, ISystemResourceChangeListener, ISystemRemoteChangeListener, IMenuListener,
- ISelectionChangedListener, ISelectionProvider, ITreeViewerListener, ISystemResourceChangeEvents, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelectAllTarget
-{
-
- protected Shell shell; // shell hosting this viewer
- protected ISystemViewInputProvider inputProvider; // who is supplying our tree root elements?
- protected ISystemViewInputProvider previousInputProvider; // who is supplying our tree root elements?
- protected Object previousInput;
- protected IHost previousInputConnection;
- // protected actions
- protected SystemNewConnectionAction newConnectionAction;
- protected SystemRefreshAction refreshAction;
- protected PropertyDialogAction propertyDialogAction;
- protected SystemRemotePropertiesAction remotePropertyDialogAction;
- protected SystemCollapseAction collapseAction; // defect 41203
- protected SystemExpandAction expandAction; // defect 41203
- protected SystemOpenExplorerPerspectiveAction openToPerspectiveAction;
-
- protected SystemShowInTableAction showInTableAction;
- protected SystemShowInMonitorAction showInMonitorAction;
- protected GoIntoAction goIntoAction;
- protected SystemCascadingGoToAction gotoActions;
- // global actions
- // Note the Edit menu actions are set in SystemViewPart. Here we use these
- // actions from our own popup menu actions.
- protected SystemCommonDeleteAction deleteAction; // for global delete menu item
- protected SystemCommonRenameAction renameAction; // for common rename menu item
- protected SystemCommonSelectAllAction selectAllAction; // for common Ctrl+A select-all
- // special flags needed when building popup menu, set after examining selections
- protected boolean selectionShowRefreshAction;
- protected boolean selectionShowOpenViewActions;
- protected boolean selectionShowGenericShowInTableAction;
- protected boolean selectionShowDeleteAction;
- protected boolean selectionShowRenameAction;
- protected boolean selectionEnableDeleteAction;
- protected boolean selectionEnableRenameAction;
- protected boolean selectionIsRemoteObject;
- protected boolean selectionHasAncestorRelation;
- protected boolean selectionFlagsUpdated = false;
- // misc
- protected MenuManager menuMgr;
- protected boolean showActions = true;
- protected boolean hardCodedConnectionSelected = false;
- protected boolean mixedSelection = false;
- protected boolean specialMode = false;
- protected boolean menuListenerAdded = false;
- protected boolean fromSystemViewPart = false;
- protected boolean areAnyRemote = false;
- protected boolean enabledMode = true;
- protected Widget previousItem = null;
- protected int searchDepth = 0;
- //protected Vector remoteItemsToSkip = null;
- protected Cursor busyCursor;
- protected TreeItem inputTreeItem = null;
- protected static final int SEARCH_INFINITE = 10; // that's far enough down to search!
- public boolean debug = false;
- public boolean debugRemote = false;
- public boolean debugProperties = debug && false;
- public boolean doTimings = false;
- public SystemElapsedTimer elapsedTime = new SystemElapsedTimer();
- // for support of Expand To actions ... transient filters really.
- // we need to record these per tree node they are applied to.
- protected Hashtable expandToFiltersByObject; // most efficient way to find these is by binary object
- protected Hashtable expandToFiltersByTreePath; // however, we lose that after a refresh so we also record by tree path
-
- // message line
- protected ISystemMessageLine messageLine = null;
- // button pressed
- protected static final int LEFT_BUTTON = 1;
- protected int mouseButtonPressed = LEFT_BUTTON; //d40615
- protected boolean expandingTreeOnly = false; //d40615
- protected ViewerFilter[] initViewerFilters = null;
-
- protected List _setList;
-
- /**
- * Constructor
- * @param shell The shell hosting this tree viewer widget
- * @param parent The composite widget into which to place this widget
- * @param inputProvider The input object which will supply the initial root objects in the tree.
- * Can be null initially, but be sure to call #setInputProvider(ISystemViewInputProvider) later.
- * @param msgLine Where to display messages and tooltip text
- */
- public SystemView(Shell shell, Composite parent, ISystemViewInputProvider inputProvider, ISystemMessageLine msgLine) {
- super(parent);
- this.shell = shell;
- this.inputProvider = inputProvider;
- this.inputProvider.setShell(shell); // DY: defect 44544
- this.messageLine = msgLine;
- init();
- }
-
- /**
- * Constructor to use when you want to specify styles for the tree widget
- * @param shell The shell hosting this tree viewer widget
- * @param parent The composite widget into which to place this widget
- * @param style The style to give the tree widget
- * @param inputProvider The input object which will supply the initial root objects in the tree.
- * Can be null initially, but be sure to call #setInputProvider(ISystemViewInputProvider) later.
- * @param msgLine Where to display messages and tooltip text
- */
- public SystemView(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider, ISystemMessageLine msgLine) {
- super(parent, style);
- this.shell = shell;
- this.inputProvider = inputProvider;
- this.inputProvider.setShell(shell); // DY: defect 44544
- this.messageLine = msgLine;
- init();
- }
-
- /**
- * Constructor to use when you want to specify styles for the tree widget
- * @param shell The shell hosting this tree viewer widget
- * @param parent The composite widget into which to place this widget
- * @param style The style to give the tree widget
- * @param inputProvider The input object which will supply the initial root objects in the tree.
- * Can be null initially, but be sure to call #setInputProvider(ISystemViewInputProvider) later.
- * @param msgLine Where to display messages and tooltip text
- * @param initViewerFilters the initial viewer filters to apply.
- */
- public SystemView(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider, ISystemMessageLine msgLine, ViewerFilter[] initViewerFilters) {
- super(parent, style);
- this.shell = shell;
- this.inputProvider = inputProvider;
- this.inputProvider.setShell(shell); // DY: defect 44544
- this.messageLine = msgLine;
- this.initViewerFilters = initViewerFilters;
- init();
- }
-
- /**
- * Constructor to use when you create your own tree widget.
- * @param shell The shell hosting this tree viewer widget
- * @param tree The Tree widget you created.
- * @param inputProvider The input object which will supply the initial root objects in the tree.
- * Can be null initially, but be sure to call #setInputProvider(ISystemViewInputProvider) later.
- * @param msgLine Where to display messages and tooltip text
- */
- public SystemView(Shell shell, Tree tree, ISystemViewInputProvider inputProvider, ISystemMessageLine msgLine) {
- super(tree);
- this.shell = shell;
- this.inputProvider = inputProvider;
- this.inputProvider.setShell(shell); // DY: defect 44544
- this.messageLine = msgLine;
- init();
- }
-
- /**
- * Set the input provider. Sometimes this is delayed, or can change.
- * @param inputProvider the input provider for this view.
- */
- public void setInputProvider(ISystemViewInputProvider inputProvider) {
- this.inputProvider = inputProvider;
- inputProvider.setViewer(this);
- inputProvider.setShell(getShell()); // DY: Defect 44544, shell was not being set for Test dialogs, when they
- // tried to connect there was not shell for the password prompt
- // and an error message (expand failed) occured.
- setInput(inputProvider);
- }
-
- /**
- * Get the SystemViewPart that encapsulates us.
- * Will be null unless fromSystemViewPart is true.
- */
- public SystemViewPart getSystemViewPart() {
- if (fromSystemViewPart)
- return ((SystemViewPart) messageLine);
- else
- return null;
- }
-
- /**
- * Get the workbench window containing this view part. Will only be non-null for the explorer view part,
- * not when used within, say, a dialog
- */
- protected IWorkbenchWindow getWorkbenchWindow() {
- if (fromSystemViewPart)
- return getSystemViewPart().getSite().getWorkbenchWindow();
- else
- return null;
- }
-
- /**
- * Get the workbench part containing this view. Will only be non-null for the explorer view part,
- * not when used within, say, a dialog
- */
- protected IWorkbenchPart getWorkbenchPart() {
- return getSystemViewPart();
- }
-
- /**
- * Disable/Enable the viewer. We do this by blocking keystrokes without visually greying out
- */
- public void setEnabled(boolean enabled) {
- enabledMode = enabled;
- }
-
- /**
- * Sets the label and content provider for the system view.
- * This can be called externally if a custom RSE label and content provider is desired
- * @param lcProvider the provider
- */
- public void setLabelAndContentProvider(SystemViewLabelAndContentProvider lcProvider) {
- ILabelDecorator decorator = null;
- if (PlatformUI.isWorkbenchRunning()) {
- IWorkbench wb = PlatformUI.getWorkbench();
- decorator = wb.getDecoratorManager().getLabelDecorator();
- }
- setLabelProvider(new DecoratingLabelProvider(lcProvider, decorator));
- setContentProvider(lcProvider);
- }
-
- protected void init() {
- _setList = new ArrayList();
- busyCursor = new Cursor(shell.getDisplay(), SWT.CURSOR_WAIT);
- setUseHashlookup(true); // new for our 2nd release. Attempt to fix 38 minutes to refresh for 15K elements
-
- // set content provider
- SystemViewLabelAndContentProvider lcProvider = new SystemViewLabelAndContentProvider();
- setLabelAndContentProvider(lcProvider);
-
- // set initial viewer filters
- if (initViewerFilters != null) {
-
- for (int i = 0; i < initViewerFilters.length; i++) {
- addFilter(initViewerFilters[i]);
- }
- }
-
- fromSystemViewPart = ((messageLine != null) && (messageLine instanceof SystemViewPart));
-
- // set the tree's input. Provides initial roots.
- if (inputProvider != null) {
- inputProvider.setViewer(this);
- setInput(inputProvider);
- if (fromSystemViewPart) {
- previousInputConnection = getInputConnection(getWorkbenchPart().getSite().getPage().getInput());
- }
- }
- //addDoubleClickListener(this);
- addSelectionChangedListener(this);
- addTreeListener(this);
- // ----------------------------------------
- // register with system registry for events
- // ----------------------------------------
- RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this);
- // -----------------------------
- // Enable right-click popup menu
- // -----------------------------
- menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(this);
- Menu menu = menuMgr.createContextMenu(getTree());
- getTree().setMenu(menu);
- // -------------------------------------------
- // Enable specific keys: dbl-click, Delete, F5
- // -------------------------------------------
- addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleDoubleClick(event);
- }
- });
- getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleKeyPressed(e);
- }
- });
- getControl().addMouseListener(new MouseAdapter() {
- public void mouseDown(MouseEvent e) {
- mouseButtonPressed = e.button; //d40615
- if (!enabledMode) {
- //e.doit = false;
- return;
- }
- }
- });
-
- initRefreshKey();
-
- // initialize drag and drop
- initDragAndDrop();
- }
-
- /**
- * Create the KeyListener for doing the refresh on the viewer.
- */
- protected void initRefreshKey() {
- /* DKM - no need for explicit key listener since we
- * have global action
- getControl().addKeyListener(new KeyAdapter()
- {
- public void keyReleased(KeyEvent event)
- {
- if (!enabledMode)
- return;
- if (event.keyCode == SWT.F5)
- {
- //if (debug)
- // System.out.println("F5 pressed");
- refreshAll();
- }
- }
- });
- */
- }
-
- /**
- * Handles double clicks in viewer.
- * Opens editor if file double-clicked.
- */
- protected void handleDoubleClick(DoubleClickEvent event) {
- if (!enabledMode) {
- //event.doit = false;
- return;
- }
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null) return;
- ISystemViewElementAdapter adapter = getAdapter(element);
- boolean alreadyHandled = false;
- if (adapter != null) alreadyHandled = adapter.handleDoubleClick(element);
- if (!alreadyHandled && isExpandable(element)) {
- boolean expandedState = getExpandedState(element);
- setExpandedState(element, !expandedState);
- // DY: fire collapse / expand event
- if (expandedState) {
- fireTreeCollapsed(new TreeExpansionEvent(this, element));
- } else {
- fireTreeExpanded(new TreeExpansionEvent(this, element));
- }
- return;
- }
- }
-
- /**
- * Handles key events in viewer.
- */
- void handleKeyPressed(KeyEvent event) {
- if ((event.character == SWT.DEL) && (event.stateMask == 0) && (((IStructuredSelection) getSelection()).size() > 0)) {
- scanSelections("handleKeyPressed"); //$NON-NLS-1$
- /* DKM - 53694
- if (showDelete() && canDelete())
- {
-
- SystemCommonDeleteAction dltAction = (SystemCommonDeleteAction)getDeleteAction();
- dltAction.setShell(getShell());
- dltAction.setSelection(getSelection());
- dltAction.setViewer(this);
- dltAction.run();
-
- }
- */
- } else if ((event.character == '-') && (event.stateMask == SWT.CTRL)) {
- collapseAll();
- } else if ((event.character == 1) && // for some reason Ctrl+A comes in as Ctrl plus the number 1!
- (event.stateMask == SWT.CTRL) && !fromSystemViewPart) {
- //System.out.println("Inside Ctrl+A processing");
- if (enableSelectAll(null)) doSelectAll(null);
- } else if ((event.character == '-') && (((IStructuredSelection) getSelection()).size() > 0)) {
- //System.out.println("Inside Ctrl+- processing");
- collapseSelected();
- } else if ((event.character == '+') && (((IStructuredSelection) getSelection()).size() > 0)) {
- //System.out.println("Inside Ctrl++ processing");
- expandSelected();
- }
-
- }
-
- /**
- * Handles a collapse-selected request
- */
- public void collapseSelected() {
- TreeItem[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- for (int idx = 0; idx < selectedItems.length; idx++)
- selectedItems[idx].setExpanded(false);
- }
- }
-
- /**
- * Handles an expand-selected request
- */
- public void expandSelected() {
- TreeItem[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- for (int idx = 0; idx < selectedItems.length; idx++) {
- if (!selectedItems[idx].getExpanded()) {
- createChildren(selectedItems[idx]);
- }
- selectedItems[idx].setExpanded(true);
- }
- }
- }
-
- /**
- * Display a message/status on the message/status line
- */
- public void displayMessage(String msg) {
- if (messageLine != null) messageLine.setMessage(msg);
- }
-
- /**
- * Clear message/status shown on the message/status line
- */
- public void clearMessage() {
- if (messageLine != null) messageLine.clearMessage();
- }
-
- /**
- * Turn off right-click actions
- */
- public void setShowActions(boolean show) {
- this.showActions = show;
- }
-
- /**
- * Return the input provider
- */
- public ISystemViewInputProvider getInputProvider() {
- inputProvider.setViewer(this); // just in case. Added by Phil in V5.0
- inputProvider.setShell(getShell()); // just in case. Added by Phil
- return inputProvider;
- }
-
- /**
- * Return the popup menu for the tree
- */
- public Menu getContextMenu() {
- return getTree().getMenu();
- }
-
- /**
- * Return the popup menu for the tree
- */
- public MenuManager getContextMenuManager() {
- return menuMgr;
- }
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- public IAction getNewConnectionAction() {
- if (newConnectionAction == null) newConnectionAction = new SystemNewConnectionAction(getShell(), true, this); // true=>from popup menu
- return newConnectionAction;
- }
-
- /**
- * Return the refresh action
- */
- public IAction getRefreshAction() {
- if (refreshAction == null) refreshAction = new SystemRefreshAction(getShell());
- return refreshAction;
- }
-
- /**
- * @return the collapse action. Lazily creates it.
- */
- public IAction getCollapseAction() {
- if (collapseAction == null) collapseAction = new SystemCollapseAction(getShell());
- return collapseAction;
- }
-
- /**
- * @return the expand action. Lazily creates it.
- */
- public IAction getExpandAction() {
- if (expandAction == null) expandAction = new SystemExpandAction(getShell());
- return expandAction;
- }
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- public PropertyDialogAction getPropertyDialogAction() {
- if (propertyDialogAction == null) {
- propertyDialogAction = new PropertyDialogAction(new SameShellProvider(getShell()), this);
- //propertyDialogAction.setToolTipText(" ");
- }
-
-
- propertyDialogAction.selectionChanged(getSelection());
-
- return propertyDialogAction;
- }
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- public SystemRemotePropertiesAction getRemotePropertyDialogAction() {
- if (remotePropertyDialogAction == null) {
- remotePropertyDialogAction = new SystemRemotePropertiesAction(getShell());
- }
- remotePropertyDialogAction.setSelection(getSelection());
- return remotePropertyDialogAction;
- }
-
- /**
- * Return the select All action
- */
- public IAction getSelectAllAction() {
- if (selectAllAction == null) selectAllAction = new SystemCommonSelectAllAction(getShell(), this, this);
- return selectAllAction;
- }
-
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- public IAction getRenameAction() {
- if (renameAction == null) renameAction = new SystemCommonRenameAction(getShell(), this);
- return renameAction;
- }
-
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- public IAction getDeleteAction() {
- if (deleteAction == null) deleteAction = new SystemCommonDeleteAction(getShell(), this);
- return deleteAction;
- }
-
- /*
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- *
- protected SystemCascadingOpenToAction getOpenToAction()
- {
- if (openToAction == null)
- openToAction = new SystemCascadingOpenToAction(getShell(),getWorkbenchWindow());
- return openToAction;
- } NOT USED YET */
-
- /**
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- */
- public SystemOpenExplorerPerspectiveAction getOpenToPerspectiveAction() {
- if (openToPerspectiveAction == null) openToPerspectiveAction = new SystemOpenExplorerPerspectiveAction(getShell(), getWorkbenchWindow());
- return openToPerspectiveAction;
- }
-
- public SystemShowInTableAction getShowInTableAction() {
- if (showInTableAction == null) showInTableAction = new SystemShowInTableAction(getShell());
- return showInTableAction;
- }
-
- public SystemShowInMonitorAction getShowInMonitorAction() {
- if (showInMonitorAction == null) showInMonitorAction = new SystemShowInMonitorAction(getShell());
- return showInMonitorAction;
- }
-
- /**
- * Get the common "Go Into" action for drilling down in the Remote System Explorer view,
- * scoped to the currently selected object.
- */
- public GoIntoAction getGoIntoAction() {
- if (goIntoAction == null) {
- goIntoAction = new GoIntoAction(getSystemViewPart().getFrameList());
- goIntoAction.setText(SystemResources.ACTION_CASCADING_GOINTO_LABEL);
- goIntoAction.setToolTipText(SystemResources.ACTION_CASCADING_GOINTO_TOOLTIP);
- }
- return goIntoAction;
- }
-
- /**
- * Get the common "Go To->" cascading menu action for navigating the frame list.
- */
- public SystemCascadingGoToAction getGoToActions() {
- if (gotoActions == null) gotoActions = new SystemCascadingGoToAction(getShell(), getSystemViewPart());
- return gotoActions;
- }
-
- /**
- * Helper method to collapse a node in the tree.
- * Called when a currently expanded subsystem is disconnected.
- * @param forceRefresh true if children should be deleted from memory so re-expand forces refresh.
- */
- public void collapseNode(Object element, boolean forceRefresh) {
- // First, collapse this element and all its children.
- collapseToLevel(element, ALL_LEVELS);
-
- // Collapsed just changes expanded state but leaves existing child
- // widgets in memory so they are re-shown on next expansion.
- // To force the next expand to re-get the children, we have to delete the
- // children.
- if (forceRefresh) {
- refresh(element); // look at AbstractTreeViewer.updateChildren which this
- // will call. If the element is collapsed (which we just
- // did) then its children are simply disposed of, and
- // not re-queried. Just what we want!
- }
- }
-
- /**
- * This is method is called to populate the popup menu
- */
- public void fillContextMenu(IMenuManager menu) {
-
- if (!showActions) return;
- //SystemViewPlugin.getDefault().logMessage("inside fillContextMenu");
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- boolean allSelectionsFromSameParent = true;
- int selectionCount = selection.size();
-
- if (selectionCount == 0) // nothing selected
- {
- menu.add(getNewConnectionAction());
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- } else {
- if (selectionCount > 1) {
- allSelectionsFromSameParent = sameParent();
- if (!allSelectionsFromSameParent) {
- if (selectionHasAncestryRelationship()) {
- // don't show the menu because actions with
- // multiple select on objects that are ancestors
- // of each other is problematic
- // still create the standard groups
- createStandardGroups(menu);
- return;
- }
- }
- }
- // Partition into groups...
- createStandardGroups(menu);
-
- // PRESET INSTANCE VARIABLES ABOUT WHAT COMMON ACTIONS ARE TO BE SHOWN...
- // PERFORMANCE TWEAK: OUR GLOBAL DELETE ACTION LISTENS FOR SELECTION CHANGES, AND
- // WHEN THAT CHANGES, WILL CALL CANDELETE() HERE. THAT IN TURN WILL CALL SCANSELECTIONS.
- // THIS MEANS SCAN SELECTIONS GETS CALL TWICE ON MOST RIGHT CLICK ACTIONS.
- if (!selectionFlagsUpdated) // might already be called by the global delete action wh
- scanSelections("fillContextMenu"); //$NON-NLS-1$
-
- // ADD COMMON ACTIONS...
-
- // COMMON REFRESH ACTION...
- if (showRefresh()) {
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_BUILD, getRefreshAction());
-
- // MJB: Removed as per bugzilla entry # 145843
- //menu.appendToGroup(ISystemContextMenuConstants.GROUP_BUILD, getExpandAction()); // defect 41203
- //menu.appendToGroup(ISystemContextMenuConstants.GROUP_BUILD, getCollapseAction()); // defect 41203
- }
-
- // COMMON RENAME ACTION...
- if (showRename()) {
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getRenameAction());
- ((ISystemAction) getRenameAction()).setInputs(getShell(), this, selection);
- }
-
- // ADAPTER SPECIFIC ACTIONS
- SystemMenuManager ourMenu = new SystemMenuManager(menu);
-
- // yantzi:artemis 6.0 (defect 53970), do not show adapter specific actions when
- // there is not a common adapter for all selected elements (i.e. there are 2 or
- // more selected elements that have different adapters
- Iterator elements = selection.iterator();
- //Hashtable adapters = new Hashtable();
- ISystemViewElementAdapter adapter = null;
- boolean skipAdapterActions = false;
-
- while (elements.hasNext() && !skipAdapterActions) {
- Object element = elements.next();
- if (adapter == null) {
- adapter = getAdapter(element);
- } else if (adapter != getAdapter(element)) {
- // selected elements have different adapters
- skipAdapterActions = true;
- }
- //if (adapter != null)
- // adapters.put(adapter,element); // want only unique adapters
- }
-
-
- //Enumeration uniqueAdapters = adapters.keys();
- if (!skipAdapterActions && adapter != null) {
- Shell shell = getShell();
-
- //while (uniqueAdapters.hasMoreElements())
- //{
- // ISystemViewElementAdapter nextAdapter = (ISystemViewElementAdapter)uniqueAdapters.nextElement();
- adapter.addActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
- if (adapter instanceof AbstractSystemViewAdapter) {
-
- AbstractSystemViewAdapter aVA = (AbstractSystemViewAdapter) adapter;
- // add remote actions
- aVA.addCommonRemoteActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
-
- // add dynamic menu popups
- aVA.addDynamicPopupMenuActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADDITIONS);
- }
- //}
- }
-
-
- // whale through all actions, updating shell and selection
- IContributionItem[] items = menu.getItems();
- for (int idx = 0; idx < items.length; idx++) {
- if ((items[idx] instanceof ActionContributionItem) && (((ActionContributionItem) items[idx]).getAction() instanceof ISystemAction)) {
- ISystemAction item = (ISystemAction) (((ActionContributionItem) items[idx]).getAction());
- try {
- item.setInputs(getShell(), this, selection);
- } catch (Exception e) {
- SystemBasePlugin.logError("Error configuring action " + item.getClass().getName(), e); //$NON-NLS-1$
- }
- } else if (items[idx] instanceof SystemSubMenuManager) {
- SystemSubMenuManager item = (SystemSubMenuManager) items[idx];
- item.setInputs(getShell(), this, selection);
- }
- }
-
- // COMMON DELETE ACTION...
- if (showDelete()) {
- //menu.add(getDeleteAction());
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getDeleteAction());
- ((ISystemAction) getDeleteAction()).setInputs(getShell(), this, selection);
- menu.add(new Separator());
- }
-
-
-
-
-
- // PROPERTIES ACTION...
- // This is supplied by the system, so we pretty much get it for free. It finds the
- // registered propertyPages extension points registered for the selected object's class type.
- //propertyDialogAction.selectionChanged(selection);
-
- if (!selectionIsRemoteObject) // is not a remote object
- {
- PropertyDialogAction pdAction = getPropertyDialogAction();
-
- if (pdAction.isApplicableForSelection()) menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
-
-
- // GO INTO ACTION...
- // OPEN IN NEW WINDOW ACTION...
- if (fromSystemViewPart && showOpenViewActions()) {
-
-
- GoIntoAction goIntoAction = getGoIntoAction();
- goIntoAction.setEnabled(selection.size() == 1);
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_GOTO, goIntoAction);
-
- SystemOpenExplorerPerspectiveAction openToPerspectiveAction = getOpenToPerspectiveAction();
- openToPerspectiveAction.setSelection(selection);
- menu.appendToGroup(openToPerspectiveAction.getContextMenuGroup(), openToPerspectiveAction);
-
- if (showGenericShowInTableAction()) {
-
-
- SystemShowInTableAction showInTableAction = getShowInTableAction();
- showInTableAction.setSelection(selection);
- menu.appendToGroup(openToPerspectiveAction.getContextMenuGroup(), showInTableAction);
-
- SystemShowInMonitorAction showInMonitorAction = getShowInMonitorAction();
- showInMonitorAction.setSelection(selection);
- menu.appendToGroup(openToPerspectiveAction.getContextMenuGroup(), showInMonitorAction);
-
- }
-
-
- }
-
- } else // is a remote object
- {
- //Object firstSelection = selection.getFirstElement();
- //ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(firstSelection);
- //logMyDebugMessage(this.getClass().getName(), ": there is a remote adapter");
- SystemRemotePropertiesAction pdAction = getRemotePropertyDialogAction();
- if (pdAction.isApplicableForSelection()) menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- //else
- //logMyDebugMessage(this.getClass().getName(), ": but it is not applicable for selection");
- // --------------------------------------------------------------------------------------------------------------------
- // look for and add any popup menu actions registered via our org.eclipse.rse.core.popupMenus extension point...
- // --------------------------------------------------------------------------------------------------------------------
- if (fromSystemViewPart) // these require an IWorkbenchPart as a parameter, so we can't support them from within dialogs
- addObjectActions(ourMenu);
- }
-
-
- // GO TO CASCADING ACTIONS...
- if (fromSystemViewPart && (selectionIsRemoteObject || showOpenViewActions())) {
- SystemCascadingGoToAction gotoActions = getGoToActions();
- gotoActions.setSelection(selection);
- menu.appendToGroup(gotoActions.getContextMenuGroup(), gotoActions.getSubMenu());
- }
-
-
- }
-
- }
-
- /**
- * Contributes popup menu actions and submenus registered for the object type(s) in the current selection.
- * Patterned after addObjectActions in PopupMenuExtender class supplied by Eclipse.
- */
- protected void addObjectActions(SystemMenuManager menu) {
- if (SystemPopupMenuActionContributorManager.getManager().contributeObjectActions(getWorkbenchPart(), menu, this, null)) {
- //menu.add(new Separator());
- }
- }
-
- /**
- * Called when the context menu is about to open.
- * Calls {@link #fillContextMenu(IMenuManager)}
- */
- public void menuAboutToShow(IMenuManager menu) {
- if (!enabledMode) return;
- fillContextMenu(menu);
- if (!menuListenerAdded) {
- if (menu instanceof MenuManager) {
- Menu m = ((MenuManager) menu).getMenu();
- if (m != null) {
- menuListenerAdded = true;
- SystemViewMenuListener ml = new SystemViewMenuListener();
- if (messageLine != null) ml.setShowToolTipText(true, messageLine);
- m.addMenuListener(ml);
- }
- }
- }
- //System.out.println("Inside menuAboutToShow: menu null? "+( ((MenuManager)menu).getMenu()==null));
- }
-
- /**
- * Creates the Systems plugin standard groups in a context menu.
- */
- public static IMenuManager createStandardGroups(IMenuManager menu) {
- if (!menu.isEmpty()) return menu;
- // simply sets partitions in the menu, into which actions can be directed.
- // Each partition can be delimited by a separator (new Separator) or not (new GroupMarker).
- // Deleted groups are not used yet.
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_NEW)); // new->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GOTO)); // goto into, go->
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_EXPANDTO)); // expand to->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_EXPAND)); // expand, collapse
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPEN)); // open xxx
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPENWITH)); // open with->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_BROWSEWITH)); // open with->
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_WORKWITH)); // work with->
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_SHOW)); // show->type hierarchy, in-navigator
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_BUILD)); // build, rebuild, refresh
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CHANGE)); // update, change
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORGANIZE)); // rename,move,copy,delete,bookmark,refactoring
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORDER)); // move up, move down
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GENERATE)); // getters/setters, etc. Typically in editor
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_SEARCH)); // search
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CONNECTION)); // connection-related actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_STARTSERVER)); // start/stop remote server actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_IMPORTEXPORT)); // get or put actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADAPTERS)); // actions queried from adapters
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_VIEWER_SETUP)); // ? Probably View->by xxx, yyy
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_TEAM)); // Team
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_COMPAREWITH));
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_REPLACEWITH));
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_PROPERTIES)); // Properties
-
- return menu;
- }
-
- /**
- * protected helper method to add an Action to a given menu.
- * To give the action the opportunity to grey out, we call selectionChanged, but
- * only if the action implements ISelectionChangedListener
- */
- protected void menuAdd(MenuManager menu, IAction action) {
- if (action instanceof ISelectionChangedListener) ((ISelectionChangedListener) action).selectionChanged(new SelectionChangedEvent(this, getSelection()));
- }
-
- /**
- * Determines whether the view has an ancestor relation selection so
- * that actions can be enable/disabled appropriately.
- * For example, delete needs to be disabled when a parent and it's child
- * are both selected.
- * @return true if the selection has one or more ancestor relations
- */
- protected boolean hasAncestorRelationSelection() {
- return selectionHasAncestryRelationship();
- /*
- TreeItem[] elements = getTree().getSelection();
-
-
- //Item[] elements = getSelection(getControl());
- for (int i = 0; i < elements.length; i++) {
- TreeItem parentItem = elements[i];
- //for (int j = 0; j < elements.length; j++) {
- //if (j != i) {
- if (isAncestorOf(parentItem, elements))
- {
- return true;
- }
- //}
- // }
- }
- return false;
- */
- }
-
- /**
- * Handles selection changed in viewer.
- * Updates global actions.
- * Links to editor (if option enabled)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- selectionFlagsUpdated = false;
- _setList = new ArrayList();
- IStructuredSelection sel = (IStructuredSelection) event.getSelection();
- Object firstSelection = sel.getFirstElement();
- if (firstSelection == null) return;
-
- // added by Phil. Noticed Edit->Delete not enabled when it should be
- boolean enableDelete = true;
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
-
- while (enableDelete && elements.hasNext()) {
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (adapter == null) continue;
- if (enableDelete) enableDelete = adapter.showDelete(element) && adapter.canDelete(element);
- }
- //System.out.println("Enabling delete action: "+enableDelete);
- //System.out.println("Enabling selectAll action: "+enableSelectAll(sel));
- ((SystemCommonDeleteAction) getDeleteAction()).setEnabled(enableDelete);
- ((SystemCommonSelectAllAction) getSelectAllAction()).setEnabled(enableSelectAll(sel)); // added by Phil. Noticed Edit->Select All not enabled when it should be
-
- ISystemViewElementAdapter adapter = getAdapter(firstSelection);
- if (adapter != null) {
- displayMessage(adapter.getStatusLineText(firstSelection));
- if ((mouseButtonPressed == LEFT_BUTTON) && (!expandingTreeOnly)) //d40615
- adapter.selectionChanged(firstSelection); //d40615
- } else
- clearMessage();
- //System.out.println("Inside selectionChanged in SystemView");
- expandingTreeOnly = false; //d40615
- if (debugProperties) {
- ISystemRemoteElementAdapter element = getRemoteAdapter(firstSelection);
- if (element == null)
- return;
- else {
- logMyDebugMessage(this.getClass().getName(), ": -----------------------------------------------------------"); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE SSFID.......: " + element.getSubSystemConfigurationId(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE NAME........: " + element.getName(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE TYPECATEGORY: " + element.getRemoteTypeCategory(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE TYPE........: " + element.getRemoteType(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE SUBTYPE.....: " + element.getRemoteSubType(firstSelection)); //$NON-NLS-1$
- logMyDebugMessage(this.getClass().getName(), ": REMOTE SUBSUBTYPE..: " + element.getRemoteSubSubType(firstSelection)); //$NON-NLS-1$
- }
- }
- }
-
- protected void logMyDebugMessage(String prefix, String msg) {
- if (!debugProperties) return;
- //RSEUIPlugin.logDebugMessage(prefix, msg);
- System.out.println(prefix + " " + msg); //$NON-NLS-1$
- }
-
- /**
- * Convenience method for returning the shell of this viewer.
- */
- public Shell getShell() {
- //return shell;
- return getTree().getShell();
- }
-
- /**
- * Helper method to determine if a given object is currently selected.
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isSelected(Object element) {
- return isSelected(element, (IStructuredSelection) getSelection());
- }
-
- /**
- * Helper method to determine if a given tree item is currently selected.
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isTreeItemSelected(Widget w) {
- boolean match = false;
- TreeItem[] items = getTree().getSelection();
- if ((items != null) && (items.length > 0)) {
- for (int idx = 0; !match && (idx < items.length); idx++)
- if (items[idx] == w) match = true;
- }
- return match;
- }
-
- /**
- * Helper method to determine if any of a given array of objects is currently selected
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isSelected(Object[] elementArray) {
- return isSelected(elementArray, (IStructuredSelection) getSelection());
- }
-
- /**
- * Helper method to determine if a given object is in given selection
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isSelected(Object element, IStructuredSelection selection) {
- boolean isSelected = false;
- Iterator elements = selection.iterator();
- while (!isSelected && elements.hasNext()) {
- if (element.equals(elements.next())) isSelected = true;
- }
- return isSelected;
- }
-
- /**
- * Helper method to determine if any of a given array of objects is in given selection
- * Does not consider if a child node of the given object is currently selected.
- */
- protected boolean isSelected(Object[] elementArray, IStructuredSelection selection) {
- boolean isSelected = false;
- Iterator elements = selection.iterator();
- while (!isSelected && elements.hasNext()) {
- Object nextSelection = elements.next();
- for (int idx = 0; !isSelected && (idx < elementArray.length); idx++) {
- if (elementArray[idx].equals(nextSelection)) isSelected = true;
- }
- }
- return isSelected;
- }
-
- /**
- * Helper method to determine if a given object is currently selected.
- * Does consider if a child node of the given object is currently selected.
- */
- protected boolean isSelectedOrChildSelected(Object[] parentElements) {
- boolean isSelected = false;
- if ((parentElements == null) || (parentElements.length == 0)) return false;
- for (int idx = 0; !isSelected && (idx < parentElements.length); idx++)
- isSelected = isSelectedOrChildSelected(parentElements[idx]);
- return isSelected;
- }
-
- protected boolean searchToRoot(TreeItem selectedItem, TreeItem searchItem) {
- boolean found = false;
- boolean done = false;
- while (!found && !done) {
- if (selectedItem == searchItem)
- found = true;
- else {
- if (selectedItem != null)
- {
- selectedItem = selectedItem.getParentItem();
- if (selectedItem == null) done = true;
- }
- }
- }
- return found;
- }
-
- /**
- * Called after tree item collapsed. Updates the children of the tree item being
- * collapsed by removing the widgets associated with any transient message objects
- * that were in the tree.
- * @param event the event that caused the collapse. The event data will include the
- * tree element being collapsed.
- */
- public void treeCollapsed(TreeExpansionEvent event) {
- final Object element = event.getElement(); // get parent node being collapsed
- // we always allow adapters opportunity to show a different icon depending on collapsed state
- getShell().getDisplay().asyncExec(new Runnable() {
- public void run() {
- String[] allProps = {IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE};
- update(element, allProps); // for refreshing non-structural properties in viewer when model changes
- }
- });
- }
-
- /**
- * Called after tree item expanded.
- * We need this hook to potentially undo user expand request.
- * @param event the SWT TreeExpansionEvent that caused the expansion.
- */
- public void treeExpanded(TreeExpansionEvent event) {
- expandingTreeOnly = true;
- final Object element = event.getElement();
- // we always allow adapters opportunity to show a different icon depending on expanded state
- getShell().getDisplay().asyncExec(new Runnable() {
- public void run() {
- updatePropertySheet();
- String[] allProps = { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
- update(element, allProps); // for refreshing non-structural properties in viewer when model changes
- }
- });
- }
-
- /* (non-Javadoc)
- * Here only for observability.
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#handleTreeCollapse(org.eclipse.swt.events.TreeEvent)
- */
- protected void handleTreeCollapse(TreeEvent event) {
- super.handleTreeCollapse(event);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#handleTreeExpand(org.eclipse.swt.events.TreeEvent)
- */
- protected void handleTreeExpand(TreeEvent event) {
- TreeItem item = (TreeItem) event.item;
- // Remove any transient messages prior to finding children. They will be regenerated if they are needed.
- Item[] children = getItems(item);
- if (children != null) {
- for (int i = 0; i < children.length; i++) {
- Item child = children[i];
- Object data = child.getData();
- if (data instanceof ISystemMessageObject) {
- ISystemMessageObject message = (ISystemMessageObject) data;
- if (message.isTransient()) {
- remove(message);
- }
- }
- }
- }
- Shell shell = getShell();
- Object data = item.getData();
- boolean isTiming = (data != null) && doTimings;
- boolean showBusy = (data instanceof IHost) && ((IHost)data).isOffline();
- if (isTiming) elapsedTime.setStartTime();
- if (showBusy) SystemPromptDialog.setDisplayCursor(shell, busyCursor);
- super.handleTreeExpand(event);
- if (showBusy) SystemPromptDialog.setDisplayCursor(shell, null);
- if (isTiming) {
- elapsedTime.setEndTime();
- System.out.println("Time to expand for " + item.getItemCount() + " items: " + elapsedTime); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Clear current selection. Ignore widget disposed message.
- */
- protected void clearSelection() {
- try {
- setSelection((ISelection) null);
- } catch (Exception exc) {
- }
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o) {
-
- ISystemViewInputProvider provider = getInputProvider();
-
- // should never be null, but we check just to be safe
- // the input provider should be set because for things like connections, the select
- // dialogs may set a different input provider for the connection adapter which is subsequently
- // not updated when selecting a connection in the Remote Systems view.
- // This ensures that the input provider for the Remote Systems view is set for the adapter.
- if (provider != null) {
- return SystemAdapterHelpers.getAdapter(o, this, provider);
- } else {
- return SystemAdapterHelpers.getAdapter(o, this);
- }
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o) {
- return SystemAdapterHelpers.getRemoteAdapter(o, this);
- }
-
- /**
- *
- */
- public void handleDispose(DisposeEvent event) {
- //if (debug)
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Inside handleDispose for SystemView");
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this);
- busyCursor.dispose();
- super.handleDispose(event);
- }
-
- /**
- * Return the connection of the selected object, whatever it is.
- */
- public IHost getSelectedConnection() {
- Object firstSelection = ((StructuredSelection) getSelection()).getFirstElement();
- if (firstSelection == null)
- return null;
- else if (firstSelection instanceof IHost)
- return (IHost) firstSelection;
- else if (firstSelection instanceof ISubSystem)
- return ((ISubSystem) firstSelection).getHost();
- else if (firstSelection instanceof ISystemFilterPoolReference)
- return ((ISubSystem) (((ISystemFilterPoolReference) firstSelection).getProvider())).getHost();
- else if (firstSelection instanceof ISystemFilterReference)
- return ((ISubSystem) (((ISystemFilterReference) firstSelection).getProvider())).getHost();
- else if (getRemoteAdapter(firstSelection) != null) {
- ISubSystem ss = getRemoteAdapter(firstSelection).getSubSystem(firstSelection);
- if (ss != null)
- return ss.getHost();
- else
- return null;
- } else
- return null;
- }
-
- /**
- * We override getSelection(Control) so that a list of items
- * under the same parent always gets returned in the order in which
- * they appear in the tree view. Otherwise, after a "move up" or
- * "move down", the order of selection can come back wrong.
- */
- protected Item[] getSelection(Control widget) {
- Tree tree = (Tree) widget;
- Item[] oldResult = tree.getSelection();
- if (oldResult != null && oldResult.length > 0) {
- if (oldResult[0] instanceof TreeItem) {
- Widget parentItem = ((TreeItem) oldResult[0]).getParentItem();
- if (parentItem == null) {
- parentItem = tree;
- }
- if (itemsShareParent(parentItem, oldResult)) {
- Item[] newResult = sortSelection(parentItem, oldResult);
- return newResult;
- }
- }
- }
- return oldResult;
- }
-
- protected boolean itemsShareParent(Widget parentItem, Item[] items) {
- for (int i = 0; i < items.length; i++) {
- Widget itemParent = ((TreeItem) items[i]).getParentItem();
- if (parentItem instanceof TreeItem) {
- if (itemParent != parentItem) {
- return false;
- }
- } else if (itemParent != null) {
- return false;
- }
- }
-
- return true;
- }
-
- protected Item[] sortSelection(Widget parentItem, Item[] oldResult) {
- Item[] newResult = new Item[oldResult.length];
- Item[] children = null;
- if (parentItem instanceof Item) {
- if (oldResult == null)
- children = getItems((Item) parentItem);
- else
- children = oldResult;
- } else
- children = getChildren(parentItem);
- /*
- for (int i = 0; i < oldResult.length; i++)
- {
- Item first = removeFirstItem(oldResult, children);
- newResult[i] = first;
- }
-
- return newResult;
- */
- return oldResult;
- }
-
- protected Item removeFirstItem(Item[] items, Item[] children) {
- int firstIndex = 0;
- Item firstItem = null;
- int firstItemPosition = 0;
-
-
- if (items != null)
- {
- for (int i = 0; i < items.length; i++) {
- if (items[i] != null)
- {
- Item current = items[i];
- int position = getTreeItemPosition(current, children);
-
- if (firstItem == null || position < firstItemPosition) {
- firstItem = current;
- firstItemPosition = position;
- firstIndex = i;
- }
- }
- }
-
- items[firstIndex] = null;
- }
- return firstItem;
- }
-
-
- /**
- * Move one tree item to a new location
- */
- protected void moveTreeItem(Widget parentItem, Item item, Object src, int newPosition) {
- if (getExpanded(item)) {
- setExpanded(item, false);
- refresh(src); // flush items from memory
- }
-
- createTreeItem(parentItem, src, newPosition);
-
- //createTreeItem(parentItem, (new String("New")), newPosition);
- //remove(src);
-
- disassociate(item);
- item.dispose();
- // TODO: make this work so the selection order doesn't get screwed up!
- }
-
- /**
- * Move existing items a given number of positions within the same node.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- */
- protected void moveTreeItems(Widget parentItem, Object[] src, int delta) {
- int[] oldPositions = new int[src.length];
- Item[] oldItems = new Item[src.length];
-
- for (int idx = 0; idx < src.length; idx++)
- oldItems[idx] = (Item) internalFindRelativeItem(parentItem, src[idx], 1);
-
- Item[] children = null;
- if (parentItem instanceof Item) {
- children = getItems((Item) parentItem);
- } else
- children = getChildren(parentItem);
-
- for (int idx = 0; idx < src.length; idx++)
- {
- oldPositions[idx] = getTreeItemPosition(oldItems[idx], children) + 1;
- }
-
- if (delta > 0) // moving down, process backwards
- {
- for (int idx = src.length - 1; idx >= 0; idx--) {
- moveTreeItem(parentItem, oldItems[idx], src[idx], oldPositions[idx] + delta);
- }
- } else // moving up, process forewards
- {
- for (int idx = 0; idx < src.length; idx++) {
- moveTreeItem(parentItem, oldItems[idx], src[idx], oldPositions[idx] + delta - 1);
- }
- }
- }
-
-
-
- /**
- * Get the position of a tree item within its parent
- */
- /*
- protected int getTreeItemPosition(Widget parentItem, Item childItem, Item[] items) {
- int pos = -1;
- Item[] children = null;
- if (parentItem instanceof Item) {
- if (items == null)
- children = getItems((Item) parentItem);
- else
- children = items;
- } else
- children = getChildren(parentItem);
- for (int idx = 0; (pos == -1) && (idx < children.length); idx++) {
- if (children[idx] == childItem) pos = idx;
- }
- return pos;
- }
- */
-
-
- /**
- * Get the position of a tree item within its parent
- */
- protected int getTreeItemPosition(Item childItem, Item[] children) {
- int pos = -1;
- for (int idx = 0; (pos == -1) && (idx < children.length); idx++) {
- if (children[idx] == childItem) pos = idx;
- }
- return pos;
- }
-
- /**
- * Expand a given filter, given a subsystem that contains a reference to the filter's pool.
- * This will expand down to the filter if needed
- * @param parentSubSystem - the subsystem containing a reference to the filter's parent pool
- * @param filter - the filter to find, reveal, and expand within the subsystem context
- * @return the filter reference to the filter if found and expanded. This is a unique binary address
- * within the object's in this tree, so can be used in the viewer methods to affect this particular
- * node.
- */
- public ISystemFilterReference revealAndExpand(ISubSystem parentSubSystem, ISystemFilter filter) {
- setExpandedState(parentSubSystem.getHost(), true); // expand the connection
- setExpandedState(parentSubSystem, true); // expand the subsystem
- Object filterParentInTree = parentSubSystem; // will be case unless in show filter pool mode
- // if showing filter pools, expand parent filter pool reference...
- if (SystemPreferencesManager.getPreferencesManager().getShowFilterPools()) {
- ISystemFilterPoolReference poolRef = parentSubSystem.getFilterPoolReferenceManager().getReferenceToSystemFilterPool(filter.getParentFilterPool());
- setExpandedState(poolRef, true);
- filterParentInTree = poolRef;
- }
- // now, find the filter reference, and expand it...
- Widget parentItem = findItem(filterParentInTree); // find tree widget of parent
- if ((parentItem == null) || !(parentItem instanceof Item)) return null;
- TreeItem child = (TreeItem) internalFindReferencedItem(parentItem, filter, 1);
- if (child == null) return null;
- // found it! Now expand it...
- setExpandedState(child.getData(), true);
- return (ISystemFilterReference) child.getData();
- }
-
- // ------------------------------------
- // ISYSTEMRESOURCEChangeListener METHOD
- // ------------------------------------
-
- /**
- * Called when something changes in the model
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event) {
- ResourceChangedJob job = new ResourceChangedJob(event, this);
- job.setPriority(Job.INTERACTIVE);
- //job.setUser(true);
- job.schedule();
- /*
- Display display = Display.getCurrent();
- try {
- while (job.getResult() == null) {
- while (display != null && display.readAndDispatch()) {
- //Process everything on event queue
- }
- if (job.getResult() == null) Thread.sleep(200);
- }
- } catch (InterruptedException e) {
- }
- */
- }
-
- /**
- * Inner class which extends UIJob to connect this connection
- * on the UI Thread when no Shell is available from
- * the caller
- */
- public class ResourceChangedJob extends UIJob {
-
- protected ISystemResourceChangeEvent _event;
- protected SystemView _originatingViewer;
-
- public ResourceChangedJob(ISystemResourceChangeEvent event, SystemView originatingViewer) {
- super("Resource Changed..."); //$NON-NLS-1$
- _originatingViewer = originatingViewer;
- _event = event;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- int type = _event.getType();
- Object src = _event.getSource();
- Object parent = _event.getParent();
-
- String[] properties = new String[1];
- if (parent == RSEUIPlugin.getTheSystemRegistry()) parent = inputProvider;
- ISubSystem ss = null;
- Widget item = null;
- Widget parentItem = null;
- Object[] multiSource = null;
- Object previous = null;
- if (_event.getViewerItem() instanceof TreeItem)
- inputTreeItem = (TreeItem) _event.getViewerItem();
- else
- inputTreeItem = null;
- boolean wasSelected = false;
- boolean originatedHere = (_event.getOriginatingViewer() == null) || (_event.getOriginatingViewer() == _originatingViewer);
-
- //logDebugMsg("INSIDE SYSRESCHGD: " + type + ", " + src + ", " + parent);
- switch (type) {
- // SPECIAL CASES: ANYTHING TO DO WITH FILTERS!!
- case EVENT_RENAME_FILTER_REFERENCE:
- case EVENT_CHANGE_FILTER_REFERENCE:
- findAndUpdateFilter(_event, type);
- break;
- case EVENT_CHANGE_FILTERSTRING_REFERENCE:
- findAndUpdateFilterString(_event, type);
- break;
-
- case EVENT_ADD_FILTERSTRING_REFERENCE:
- case EVENT_DELETE_FILTERSTRING_REFERENCE:
- case EVENT_MOVE_FILTERSTRING_REFERENCES:
- //findAndUpdateFilterStringParent(event, type);
- //break;
- case EVENT_ADD_FILTER_REFERENCE:
- case EVENT_DELETE_FILTER_REFERENCE:
- case EVENT_MOVE_FILTER_REFERENCES:
- // are we a secondary perspective, and our input or parent of our input was deleted?
- if (((type == EVENT_DELETE_FILTERSTRING_REFERENCE) || (type == EVENT_DELETE_FILTER_REFERENCE)) && affectsInput(src)) {
- close();
- return Status.OK_STATUS;
- }
-
- findAndUpdateFilterParent(_event, type);
- break;
-
- case EVENT_ADD:
- case EVENT_ADD_RELATIVE:
- if (debug) {
- logDebugMsg("SV event: EVENT_ADD "); //$NON-NLS-1$
- }
- clearSelection();
- //refresh(parent);
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem)) {
- refresh(parent); // flush cached stuff so next call will show new item
- } else if ((parentItem instanceof Item) || // regular node
- (parent == inputProvider)) // root node. Hmm, hope this is going to work in all cases
- {
- boolean addingConnection = (src instanceof IHost);
- //System.out.println("ADDING CONNECTIONS.........................: " + addingConnection);
- //System.out.println("event.getParent() instanceof SystemRegistry: " + (event.getParent() instanceof SystemRegistry));
- //System.out.println("inputProvider.showingConnections().........: " + (inputProvider.showingConnections()));
- if ((parent == inputProvider) && addingConnection && (_event.getParent() instanceof ISystemRegistry) && !inputProvider.showingConnections()) return Status.OK_STATUS; // only reflect new connections in main perspective. pc42742
- int pos = -1;
- if (type == EVENT_ADD_RELATIVE) {
- previous = _event.getRelativePrevious();
- if (previous != null) pos = getItemIndex(parentItem, previous);
- if (pos >= 0) pos++; // want to add after previous
- } else
- pos = _event.getPosition();
- //logDebugMsg("ADDING CONN? "+ addingConnection + ", position="+pos);
- createTreeItem(parentItem, src, pos);
- setSelection(new StructuredSelection(src), true);
- }
- break;
- case EVENT_ADD_MANY:
- if (debug) {
- logDebugMsg("SV event: EVENT_ADD_MANY"); //$NON-NLS-1$
- }
- multiSource = _event.getMultiSource();
- clearSelection();
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem)) {
- refresh(parent); // flush cached stuff so next call will show new items
- } else if (multiSource.length > 0) {
- boolean addingConnections = (multiSource[0] instanceof IHost);
- // are we restoring connections previously removed due to making a profile inactive,
- // and is one of these connections the one we were opened with?
- if (addingConnections && (_event.getParent() instanceof ISystemRegistry) && (inputProvider instanceof SystemEmptyListAPIProviderImpl)) {
- boolean done = false;
- for (int idx = 0; !done && (idx < multiSource.length); idx++) {
- if (multiSource[idx] == previousInputConnection) {
- done = true;
- setInputProvider(previousInputProvider);
- previousInput = null;
- previousInputProvider = null;
- }
- }
- if (done) return Status.OK_STATUS;
- }
- // are we adding connections and yet we are not a secondary perspective?
- // If so, this event does not apply to us.
- else if (addingConnections && (_event.getParent() instanceof ISystemRegistry) && !inputProvider.showingConnections()) return Status.OK_STATUS;
-
- for (int idx = 0; idx < multiSource.length; idx++) {
- if (debug && addingConnections) logDebugMsg("... new connection " + ((IHost) multiSource[idx]).getAliasName()); //$NON-NLS-1$
- createTreeItem(parentItem, multiSource[idx], -1);
- }
- setSelection(new StructuredSelection(multiSource), true);
- }
- break;
- case EVENT_REPLACE_CHILDREN:
- if (debug) {
- logDebugMsg("SV event: EVENT_REPLACE_CHILDREN"); //$NON-NLS-1$
- }
- multiSource = _event.getMultiSource();
- //logDebugMsg("MULTI-SRC LENGTH : " + multiSource.length);
- clearSelection();
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if (multiSource.length > 0 && parentItem instanceof Item) {
- getControl().setRedraw(false);
- collapseNode(parent, true); // collapse and flush gui widgets from memory
- //setExpandedState(parent, true); // expand the parent
- setExpanded((Item) parentItem, true); // expand the parent without calling resolveFilterString
- TreeItem[] kids = ((TreeItem) parentItem).getItems(); // any kids? Like a dummy node?
- if (kids != null) for (int idx = 0; idx < kids.length; idx++)
- kids[idx].dispose();
- //boolean addingConnections = (multiSource[0] instanceof SystemConnection);
- for (int idx = 0; idx < multiSource.length; idx++) {
- //if (debug && addingConnections)
- // logDebugMsg("... new connection " + ((SystemConnection)multiSource[idx]).getAliasName());
- createTreeItem(parentItem, multiSource[idx], -1);
- }
- getControl().setRedraw(true);
- //setSelection(new StructuredSelection(multiSource),true);
- }
- break;
- case EVENT_CHANGE_CHILDREN:
- if (debug) {
- logDebugMsg("SV event: EVENT_CHANGE_CHILDREN. src=" + src + ", parent=" + parent); //$NON-NLS-1$ //$NON-NLS-2$
- //Exception e = new Exception();
- //e.fillInStackTrace();
- //e.printStackTrace();
- }
- // I HAVE DECIDED TO CHANGE THE SELECTION ALGO TO ONLY RESELECT IF THE CURRENT
- // SELECTION IS A CHILD OF THE PARENT... PHIL
- boolean wasSrcSelected = false;
- if (src != null) {
- wasSrcSelected = isSelectedOrChildSelected(src);
- //System.out.println("WAS SELECTED? " + wasSrcSelected);
- }
- item = findItem(parent);
- //logDebugMsg(" parent = " + parent);
- //logDebugMsg(" item = " + item);
- // INTERESTING BUG HERE. GETEXPANDED WILL RETURN TRUE IF THE TREE ITEM HAS EVER BEEN
- // EXPANDED BUT IS NOW COLLAPSED! I CANNOT FIND ANY API IN TreeItem or TreeViewer THAT
- // WILL TELL ME IF A TREE ITEM IS SHOWING OR NOT!
- if ((item != null) && (item instanceof TreeItem) && ((TreeItem) item).getExpanded()) {
- if (wasSrcSelected) {
- //System.out.println("...Clearing selection");
- clearSelection();
- }
- //refresh(parent);
- if (debug) System.out.println("Found item and it was expanded for " + parent); //$NON-NLS-1$
- getControl().setRedraw(false);
- collapseNode(parent, true); // collapse and flush gui widgets from memory
- setExpandedState(parent, true); // expand the parent
- getControl().setRedraw(true);
- if (wasSrcSelected) {
- //System.out.println("Setting selection to " + src);
- setSelection(new StructuredSelection(src), true);
- }
- } else
- collapseNode(parent, true);
- break;
- case EVENT_DELETE:
- if (debug) logDebugMsg("SV event: EVENT_DELETE "); //$NON-NLS-1$
- // are we a secondary perspective, and our input or parent of our input was deleted?
- if (affectsInput(src)) {
- close();
- return Status.OK_STATUS;
- }
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem))
- refresh(parent); // flush memory
- else {
- wasSelected = isSelectedOrChildSelected(src);
- if (wasSelected) clearSelection();
- _originatingViewer.remove(src);
- if (wasSelected) setSelection(new StructuredSelection(parent), true);
- }
- break;
-
- case EVENT_DELETE_MANY:
- if (debug) logDebugMsg("SV event: EVENT_DELETE_MANY "); //$NON-NLS-1$
- multiSource = _event.getMultiSource();
- // are we a secondary perspective, and our input or parent of our input was deleted?
- if (affectsInput(multiSource)) {
- close();
- return Status.OK_STATUS;
- }
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem))
- refresh(parent); // flush memory
- else if (parentItem instanceof Tree) {
- refresh();
- } else {
- wasSelected = isSelectedOrChildSelected(multiSource);
- if (wasSelected) clearSelection();
- if (_originatingViewer != null) _originatingViewer.remove(multiSource);
- if (wasSelected) setSelection(new StructuredSelection(parent), true);
- }
- break;
- /* Now done below in systemRemoteResourceChanged
- case EVENT_DELETE_REMOTE:
- if (debug)
- logDebugMsg("SV event: EVENT_DELETE_REMOTE ");
- deleteRemoteObject(src);
- break;
-
- case EVENT_DELETE_REMOTE_MANY:
- // multi-source: array of objects to delete
- if (debug)
- logDebugMsg("SV event: EVENT_DELETE_REMOTE_MANY ");
- multiSource = event.getMultiSource();
- //remoteItemsToSkip = null; // reset
- if ((multiSource == null) || (multiSource.length==0))
- return;
- for (int idx=0; idx<multiSource.length; idx++)
- deleteRemoteObject(multiSource[idx]);
- break;
- */
- case EVENT_RENAME:
- if (debug) logDebugMsg("SV event: EVENT_RENAME "); //$NON-NLS-1$
- properties[0] = IBasicPropertyConstants.P_TEXT;
- update(src, properties); // for refreshing non-structural properties in viewer when model changes
- updatePropertySheet();
- break;
- /* Now done below in systemRemoteResourceChanged
- case EVENT_RENAME_REMOTE:
- // SRC: the updated remote object, after the rename
- // PARENT: the String from calling getAbsoluteName() on the remote adapter BEFORE updating the remote object's name
- if (debug)
- logDebugMsg("SV event: EVENT_RENAME_REMOTE ");
-
- renameRemoteObject(src, (String)parent);
- break;
- */
- case EVENT_ICON_CHANGE:
- if (debug) logDebugMsg("SV event: EVENT_ICON_CHANGE "); //$NON-NLS-1$
-
- if (initViewerFilters != null && initViewerFilters.length > 0) {
- Widget w = findItem(src);
- if (w == null) {
- refresh(parent);
- } else {
- properties[0] = IBasicPropertyConstants.P_IMAGE;
- update(src, properties); // for refreshing non-structural properties in viewer when model changes
-
- }
- } else {
- properties[0] = IBasicPropertyConstants.P_IMAGE;
- update(src, properties); // for refreshing non-structural properties in viewer when model changes
- }
-
- //updatePropertySheet();
- break;
- //case EVENT_CHANGE:
- //if (debug)
- //logDebugMsg("SV event: EVENT_CHANGE ");
- //refresh(src); THIS IS AN EVIL OPERATION: CAUSES ALL EXPANDED NODES TO RE-REQUEST THEIR CHILDREN. OUCH!
- //updatePropertySheet();
- //break;
- case EVENT_REFRESH:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH "); //$NON-NLS-1$
- //if (src != null)
- // refresh(src); // ONLY VALID WHEN USER TRULY WANTS TO REQUERY CHILDREN FROM HOST
- //else
- // refresh(); // refresh entire tree
- if ((src == null) || (src == RSEUIPlugin.getTheSystemRegistry()))
- refreshAll();
- else {
- //smartRefresh(src, false);
- smartRefresh(src, true);
- }
- updatePropertySheet();
- break;
- // refresh the parent of the currently selected items.
- // todo: intelligently re-select previous selections
- case EVENT_REFRESH_SELECTED_PARENT:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH_SELECTED_PARENT "); //$NON-NLS-1$
- TreeItem[] items = getTree().getSelection();
- if ((items != null) && (items.length > 0) && (items[0] != null)) {
- //System.out.println("Selection not empty");
- parentItem = getParentItem(items[0]); // get parent of first selection. Only allowed to select items of same parent.
- if ((parentItem != null) && (parentItem instanceof Item)) {
- //System.out.println("parent of selection not empty: "+parentItem.getData());
- smartRefresh(new TreeItem[] { (TreeItem) parentItem });
- }
- //else
- //System.out.println("parent of selection is empty");
- }
- //else
- //System.out.println("Selection is empty");
- break;
- case EVENT_REFRESH_SELECTED:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH_SELECTED "); //$NON-NLS-1$
- IStructuredSelection selected = (IStructuredSelection) getSelection();
- Iterator i = selected.iterator();
- // the following is a tweak. Refresh only re-queries the children. If the selected item has no
- // childen, then refresh does nothing. Instead of that outcome, we re-define it to mean refresh
- // the parent. The tricky part is to prevent multiple refreshes on multiple selections so we have
- // to pre-scan for this scenario.
- // We also want to re-select any remote objects currently selected. They lose their selection as their
- // memory address changes.
- Item parentElementItem = null;
- Vector selectedRemoteObjects = new Vector();
- items = getTree().getSelection();
- int itemIdx = 0;
- SystemElapsedTimer timer = null;
- if (doTimings) timer = new SystemElapsedTimer();
- //System.out.println("Inside EVENT_REFRESH_SELECTED. FIRST SELECTED OBJECT = " + items[0].handle);
- while (i.hasNext()) {
-
- Object element = i.next();
- ISystemViewElementAdapter adapter = _originatingViewer.getAdapter(element);
- if ((parentElementItem == null) && (adapter != null) && (!adapter.hasChildren(element))) {
- //parentItem = getParentItem((Item)findItem(element));
- parentItem = getParentItem(items[itemIdx]);
- if ((parentItem != null) && (parentItem instanceof Item)) parentElementItem = (Item) parentItem; //.getData();
- }
- if (getRemoteAdapter(element) != null) {
- selectedRemoteObjects.addElement(element);
- if (ss == null) ss = getRemoteAdapter(element).getSubSystem(element);
- }
- itemIdx++;
- }
- if (parentElementItem != null) {
- //refresh(parentElement);
- smartRefresh(new TreeItem[] { (TreeItem) parentElementItem });
- if (selectedRemoteObjects.size() > 0) {
- selectRemoteObjects(selectedRemoteObjects, ss, parentElementItem);
- }
- }
- // the following is another tweak. If an expanded object is selected for refresh, which has remote children,
- // and any of those children are expanded, then on refresh the resulting list may be in a different
- // order and the silly algorithm inside tree viewer will simply re-expand the children at the previous
- // relative position. If that position has changed, the wrong children are re-expanded!
- // How to fix this? Ugly code to get the query the list of expanded child elements prior to refresh,
- // collapse them, do the refresh, then re-expand them based on absolute name versus tree position.
- // Actually, to do this right we need to test if the children of the selected item are remote objects
- // versus just the selected items because they may have selected a filter!
- // We go straight the TreeItem level for performance and ease of programming.
- else {
- smartRefresh(getTree().getSelection());
- }
- if (doTimings && timer != null) {
- timer.setEndTime();
- System.out.println("Time to refresh selected: " + timer); //$NON-NLS-1$
- }
- //else
- //{
- //i = selected.iterator();
- //while (i.hasNext())
- //refresh(i.next());
- //}
-
- updatePropertySheet();
- break;
- case EVENT_REFRESH_SELECTED_FILTER:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH_SELECTED_FILTER "); //$NON-NLS-1$
- IStructuredSelection selectedItems = (IStructuredSelection) getSelection();
- Iterator j = selectedItems.iterator();
- // We climb up the tree here until we find a SystemFilterReference data member in the tree.
- // If we do find a reference of SystemFilterReference we refresh on it.
- // If we do not find a reference of SystemFilterReference we.....TODO: WHAT DO WE DO???
- // We also want to re-select any remote objects currently selected. They lose their selection as their
- // memory address changes.
- Item parentElemItem = null;
- Vector selRemoteObjects = new Vector();
- if (j.hasNext()) {
- Object element = j.next();
- ISystemViewElementAdapter adapter = _originatingViewer.getAdapter(element);
- if (adapter != null) {
- Item parItem = getParentItem((Item) findItem(element));
-
- if (parItem != null) parentElemItem = parItem; //.getData();
-
- while (parItem != null && !(parItem.getData() instanceof ISystemFilterReference)) {
- parItem = getParentItem(parItem);
-
- if (parItem != null) parentElemItem = parItem; //.getData();
- }
- }
- if (getRemoteAdapter(element) != null) {
- selRemoteObjects.addElement(element);
- ss = getRemoteAdapter(element).getSubSystem(element);
- }
- }
-
- if (parentElemItem != null && (parentElemItem.getData() instanceof ISystemFilterReference)) {
- smartRefresh(new TreeItem[] { (TreeItem) parentElemItem });
- if (selRemoteObjects.size() > 0) {
- selectRemoteObjects(selRemoteObjects, ss, parentElemItem);
- }
-
- updatePropertySheet();
- } else {
- // if we cannot find a parent element that has a system filter reference then we refresh
- // everything since the explorer must be within a filter
- _event.setType(ISystemResourceChangeEvents.EVENT_REFRESH);
- systemResourceChanged(_event);
- }
- break;
- case EVENT_REFRESH_REMOTE:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH_REMOTE: src = " + src); //$NON-NLS-1$
- refreshRemoteObject(src, parent, originatedHere);
- break;
- case EVENT_SELECT_REMOTE:
- if (debug) logDebugMsg("SV event: EVENT_SELECT_REMOTE: src = " + src); //$NON-NLS-1$
- //remoteItemsToSkip = null; // reset
- selectRemoteObjects(src, (ISubSystem) null, parent);
- break;
-
- case EVENT_MOVE_MANY:
- if (debug) logDebugMsg("SV event: EVENT_MOVE_MANY "); //$NON-NLS-1$
- multiSource = _event.getMultiSource();
- if ((multiSource == null) || (multiSource.length == 0)) return Status.OK_STATUS;
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem))
- refresh(parent); // flush memory
- else {
- clearSelection();
- moveTreeItems(parentItem, multiSource, _event.getPosition());
- setSelection(new StructuredSelection(multiSource), true);
- }
- break;
- case EVENT_PROPERTY_CHANGE:
- if (debug) logDebugMsg("SV event: EVENT_PROPERTY_CHANGE "); //$NON-NLS-1$
- String[] allProps = { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
- ISystemRemoteElementAdapter ra = getRemoteAdapter(src);
- if (ra != null) {
- updateRemoteObjectProperties(src);
- } else
- update(src, allProps); // for refreshing non-structural properties in viewer when model changes
- updatePropertySheet();
- break;
- case EVENT_PROPERTYSHEET_UPDATE:
- if (debug) logDebugMsg("SV event: EVENT_PROPERTYSHEET_UPDATE "); //$NON-NLS-1$
- updatePropertySheet();
- break;
- case EVENT_MUST_COLLAPSE:
- if (debug) logDebugMsg("SV event: EVENT_MUST_COLLAPSE "); //$NON-NLS-1$
- collapseNode(src, true); // collapse and flush gui widgets from memory
- break;
- case EVENT_COLLAPSE_ALL:
- if (debug) logDebugMsg("SV event: EVENT_COLLAPSE_ALL "); //$NON-NLS-1$
- collapseAll(); // collapse all
- if ((src != null) && (src instanceof String) && ((String) src).equals("false")) // defect 41203 //$NON-NLS-1$
- {
- } else
- refresh(); // flush gui widgets from memory
- break;
- case EVENT_COLLAPSE_SELECTED: // defect 41203
- if (debug) logDebugMsg("SV event: EVENT_COLLAPSE_SELECTED "); //$NON-NLS-1$
- collapseSelected();
- break;
- case EVENT_EXPAND_SELECTED: // defect 41203
- if (debug) logDebugMsg("SV event: EVENT_EXPAND_SELECTED "); //$NON-NLS-1$
- expandSelected();
- break;
-
- case EVENT_REVEAL_AND_SELECT:
- if (debug) logDebugMsg("SV event: EVENT_REVEAL_AND_SELECT "); //$NON-NLS-1$
- parentItem = findItem(parent);
- if (parentItem == null) return Status.OK_STATUS;
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem)) {
- setExpandedState(parent, true);
- Object toSelect = src;
- //if (event.getMultiSource() != null)
- //toSelect = event.getMultiSource();
- //clearSelection();
- if (toSelect != null) {
- if (parent instanceof IRSEBaseReferencingObject) {
- TreeItem child = (TreeItem) internalFindReferencedItem(parentItem, toSelect, 1);
- if (child != null) toSelect = child.getData();
- } else if ((parent instanceof ISystemFilterPoolReferenceManagerProvider) && !(src instanceof IRSEBaseReferencingObject)) {
- // we are in "don't show filter pools" mode and a new filter was created
- // (we get the actual filter, vs on pool ref creation when we get the pool ref)
- TreeItem child = (TreeItem) internalFindReferencedItem(parentItem, toSelect, 1);
- if (child != null) toSelect = child.getData();
- }
- setSelection(new StructuredSelection(toSelect), true);
- }
- }
- break;
- case EVENT_SELECT:
- if (debug) logDebugMsg("SV event: EVENT_SELECT "); //$NON-NLS-1$
- item = findItem(src);
- if (item == null) // if not showing item, this is a no-op
- return Status.OK_STATUS;
- setSelection(new StructuredSelection(src), true);
- break;
- case EVENT_SELECT_EXPAND:
- if (debug) logDebugMsg("SV event: EVENT_SELECT_EXPAND "); //$NON-NLS-1$
- item = findItem(src);
- if (item == null) // if not showing item, this is a no-op
- return Status.OK_STATUS;
- if (!getExpanded((Item) item)) setExpandedState(src, true);
- setSelection(new StructuredSelection(src), true);
- break;
-
- }
- return Status.OK_STATUS;
- }
- }
-
- // ------------------------------------
- // ISYSTEMREMOTEChangeListener METHOD
- // ------------------------------------
-
- /**
- * This is the method in your class that will be called when a remote resource
- * changes. You will be called after the resource is changed.
- * @see org.eclipse.rse.model.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event) {
- int eventType = event.getEventType();
- Object remoteResourceParent = event.getResourceParent();
- Object remoteResource = event.getResource();
- boolean originatedHere = (event.getOriginatingViewer() == this);
- Vector remoteResourceNames = null;
- if (remoteResource instanceof Vector) {
- remoteResourceNames = (Vector) remoteResource;
- remoteResource = remoteResourceNames.elementAt(0);
- }
- getRemoteResourceAbsoluteName(remoteResourceParent); // DWD may not be necessary
- String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource);
- if (remoteResourceName == null) return;
-
- ISubSystem ss = getSubSystem(event, remoteResource, remoteResourceParent);
-
- Vector filterMatches = null;
-
- switch (eventType) {
- // --------------------------
- // REMOTE RESOURCE CHANGED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CHANGED:
- updatePropertySheet(); // just in case
- break;
- // --------------------------
- // REMOTE RESOURCE CREATED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED:
- // we can easily lose our original selection so we need save and restore it if needed
- Vector prevSelection = null;
- TreeItem parentSelectionItem = null;
- if (originatedHere) {
- prevSelection = getRemoteSelection();
- parentSelectionItem = getSelectedParentItem();
- }
-
- // when a new remote resource is created, we need to interrogate all filters
- // within connections to the same hostname, to see if the filter results are
- // affected by this change. If so, we refresh the filter.
- filterMatches = findAllRemoteItemFilterReferences(remoteResourceName, ss, null);
- ArrayList selectedFilters = null;
- if (filterMatches != null) {
- for (int idx = 0; idx < filterMatches.size(); idx++) {
- FilterMatch match = (FilterMatch) filterMatches.elementAt(idx);
- TreeItem filterItem = match.getTreeItem();
- if (isTreeItemSelected(filterItem)) // if this filter is currently selected, we will lose that selection!
- {
- if (selectedFilters == null) selectedFilters = new ArrayList();
- selectedFilters.add(filterItem);
- }
- smartRefresh(new TreeItem[] { filterItem }, null, true);
- }
- }
- // now, refresh all occurrences of the remote parent object.
- refreshRemoteObject(remoteResourceParent, null, false);
- // restore selected filters...
- if (selectedFilters != null) setSelection(selectedFilters);
- // if the create event originated here, then expand the selected node and
- // select the new resource under it.
- if (originatedHere) {
- // first, restore previous selection...
- if (prevSelection != null) selectRemoteObjects(prevSelection, ss, parentSelectionItem);
- TreeItem selectedItem = getFirstSelectedTreeItem();
- if (selectedItem != null) {
- if (!selectedItem.getExpanded()) // if the filter is expanded, then we already refreshed it...
- {
- createChildren(selectedItem);
- selectedItem.setExpanded(true);
- }
- if (remoteResourceNames != null)
- selectRemoteObjects(remoteResourceNames, ss, selectedItem);
- else
- selectRemoteObjects(remoteResourceName, ss, selectedItem);
- }
- //else
- //System.out.println("Hmm, nothing selected");
- }
- break;
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED:
- // delete all existing references to the remote object(s)...
- if (remoteResourceNames != null) {
- for (int idx = 0; idx < remoteResourceNames.size(); idx++)
- deleteRemoteObject(remoteResourceNames.elementAt(idx), ss);
- } else
- deleteRemoteObject(remoteResourceName, ss);
-
- // now, find all filters that either list this remote resource or list the contents of it,
- // if it is a container... for expediency we only test for the first resource, even if given
- // a list of them...
- filterMatches = findAllRemoteItemFilterReferences(remoteResourceName, ss, null);
- if (filterMatches != null) {
- for (int idx = 0; idx < filterMatches.size(); idx++) {
- FilterMatch match = (FilterMatch) filterMatches.elementAt(idx);
- TreeItem filterItem = match.getTreeItem();
- if (match.listsElement()) {
- // if the filter is expanded, we are ok. If not, we need to flush its memory...
- if (!getExpanded(filterItem)) refresh(filterItem.getData());
- } else // else this filter lists the contents of the deleted container element, so refresh it:
- {
- // if the filter is not expanded, we need to flush its memory...
- if (!getExpanded(filterItem))
- refresh(filterItem.getData());
- else
- // if the filter is expanded, we need to refresh it
- smartRefresh(new TreeItem[] { filterItem }, null, true);
- }
- }
- }
-
- break;
-
- // --------------------------
- // REMOTE RESOURCE RENAMED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED:
- // we can easily lose our original selection so we need save and restore it if needed
- prevSelection = null;
- parentSelectionItem = null;
- if (originatedHere) {
- prevSelection = getRemoteSelection();
- parentSelectionItem = getSelectedParentItem();
- }
-
- // rename all existing references to the remote object...
- renameRemoteObject(remoteResource, event.getOldName(), ss);
-
- // now, find all filters that list the contents of the OLD name container.
- filterMatches = findAllRemoteItemFilterReferences(event.getOldName(), ss, null);
- if (filterMatches != null) {
- for (int idx = 0; idx < filterMatches.size(); idx++) {
- FilterMatch match = (FilterMatch) filterMatches.elementAt(idx);
- TreeItem filterItem = match.getTreeItem();
- if (match.listsElementContents()) // this filter lists the contents of the renamed container element, so refresh it:
- {
- // if the filter is not expanded, we need only flush its memory...
- if (!getExpanded(filterItem))
- refresh(filterItem.getData());
- else
- // the filter is expanded, so refresh its contents. This will likely result in an empty list
- smartRefresh(new TreeItem[] { filterItem }, null, true);
- }
- }
- }
- // now, find all filters that list the contents of the NEW name container.
- filterMatches = findAllRemoteItemFilterReferences(remoteResourceName, ss, null);
- if (filterMatches != null) {
- for (int idx = 0; idx < filterMatches.size(); idx++) {
- FilterMatch match = (FilterMatch) filterMatches.elementAt(idx);
- TreeItem filterItem = match.getTreeItem();
- if (match.listsElementContents()) // this filter lists the contents of the renamed container element, so refresh it:
- {
- // if the filter is not expanded, we need only flush its memory...
- if (!getExpanded(filterItem))
- refresh(filterItem.getData());
- else
- // the filter is expanded, so refresh its contents. This will likely result in an empty list
- smartRefresh(new TreeItem[] { filterItem }, null, true);
- }
- }
- }
-
- // restore selection
- if (originatedHere && (prevSelection != null)) {
- selectRemoteObjects(prevSelection, ss, parentSelectionItem);
- updatePropertySheet(); // just in case
- }
- break;
- }
- }
-
- /**
- * Turn selection into an array of remote object names
- */
- protected Vector getRemoteSelection() {
- Vector prevSelection = null;
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator i = selection.iterator();
- while (i.hasNext()) {
- Object element = i.next();
- ISystemRemoteElementAdapter ra = getRemoteAdapter(element);
- if (ra != null) {
- if (prevSelection == null) prevSelection = new Vector();
- prevSelection.addElement(ra.getAbsoluteName(element));
- }
- }
- return prevSelection;
- }
-
- /**
- * Turn a given remote object reference into a fully qualified absolute name
- */
- protected String getRemoteResourceAbsoluteName(Object remoteResource) {
- if (remoteResource == null) return null;
- String remoteResourceName = null;
- if (remoteResource instanceof String)
- remoteResourceName = (String) remoteResource;
- else {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
- if (ra == null) return null;
- remoteResourceName = ra.getAbsoluteName(remoteResource);
- }
- return remoteResourceName;
- }
-
- /**
- * Deduce the subsystem from the event or remote object
- */
- protected ISubSystem getSubSystem(ISystemRemoteChangeEvent event, Object remoteResource, Object remoteParent) {
- if (event.getSubSystem() != null) return event.getSubSystem();
- ISubSystem ss = null;
- if ((remoteResource != null) && !(remoteResource instanceof String)) {
- if (remoteResource instanceof Vector) {
- Vector v = (Vector) remoteResource;
- if (v.size() > 0) ss = getSubSystem(event, v.elementAt(0), null);
- } else {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
- if (ra != null) ss = ra.getSubSystem(remoteResource);
- }
- }
- if ((ss == null) && (remoteParent != null) && !(remoteParent instanceof String)) {
- if (remoteParent instanceof Vector) {
- Vector v = (Vector) remoteParent;
- if (v.size() > 0) ss = getSubSystem(event, null, v.elementAt(0));
- } else {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteParent);
- if (ra != null) ss = ra.getSubSystem(remoteParent);
- }
- }
- return ss;
- }
-
- // ------------------------------------
- // MISCELLANEOUS METHODS...
- // ------------------------------------
-
- /**
- * Close us!
- */
- protected void close() {
- previousInputProvider = inputProvider;
- previousInput = getWorkbenchPart().getSite().getPage().getInput();
- ISystemViewInputProvider ip = new SystemEmptyListAPIProviderImpl();
- setInputProvider(ip);
- }
-
- /**
- * Test if the given input is our view's input object. This is designed to only
- * consider instances of ourself in non-primary perspectives.
- */
- protected boolean affectsInput(Object[] elements) {
- boolean affected = false;
- IWorkbenchPart viewPart = getWorkbenchPart();
- if ((viewPart != null) && (getInput() != RSEUIPlugin.getTheSystemRegistry()) && !(getInput() instanceof SystemEmptyListAPIProviderImpl)) {
- for (int idx = 0; !affected && (idx < elements.length); idx++)
- affected = affectsInput(elements[idx]);
- }
- return affected;
- }
-
- /**
- * Test if the given input is our view's input object. This is designed to only
- * consider instances of ourself in non-primary perspectives.
- */
- protected boolean affectsInput(Object element) {
- boolean affected = false;
- IWorkbenchPart viewPart = getWorkbenchPart();
- if ((viewPart != null) && (getInput() != RSEUIPlugin.getTheSystemRegistry()) && !(getInput() instanceof SystemEmptyListAPIProviderImpl)) {
-
- Object input = viewPart.getSite().getPage().getInput();
- if (input != null) {
- Object referencedElement = getReferencedObject(element);
- Object referencedInput = getReferencedObject(input);
- //System.out.println("TESTING1 " + input + " vs " + element);
- //System.out.println("TESTING2 " + referencedInput + " vs " + referencedElement);
- if ((input == element) || (referencedInput == referencedElement))
- affected = true;
- else {
- while (!affected && (input != null)) {
- input = getElementParent(input);
- if (input != null) {
- referencedInput = getReferencedObject(input);
- //System.out.println("...TESTING1 " + input + " vs " + element);
- //System.out.println("...TESTING2 " + referencedInput + " vs " + referencedElement);
- affected = ((input == element) || (referencedInput == referencedElement));
- }
- }
- }
- }
- }
- return affected;
- }
-
- protected Object getReferencedObject(Object inputObj) {
- if (inputObj instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference) inputObj).getReferencedFilterPool();
- else if (inputObj instanceof ISystemFilterReference)
- return ((ISystemFilterReference) inputObj).getReferencedFilter();
- else if (inputObj instanceof ISystemFilterStringReference)
- return ((ISystemFilterStringReference) inputObj).getReferencedFilterString();
- else
- return inputObj;
- }
-
- protected Object getElementParent(Object inputObj) {
- if (inputObj instanceof IHost)
- return ((IHost) inputObj).getSystemProfile();
- else if (inputObj instanceof ISubSystem)
- return ((ISubSystem) inputObj).getHost();
- else if (inputObj instanceof ISystemFilterPoolReference)
- return ((ISystemFilterPoolReference) inputObj).getProvider(); // will be a subsystem
- else if (inputObj instanceof ISystemFilterPool)
- return ((ISystemFilterPool) inputObj).getProvider(); // will be a subsystem factory. Hmm!
- else if (inputObj instanceof ISystemFilterReference)
- return ((ISystemFilterReference) inputObj).getParent(); // will be filter reference or filter pool reference
- else if (inputObj instanceof ISystemFilter) {
- ISystemFilter filter = (ISystemFilter) inputObj;
- if (filter.getParentFilter() != null)
- return filter.getParentFilter();
- else
- return filter.getParentFilterPool();
- } else if (inputObj instanceof ISystemFilterStringReference)
- return ((ISystemFilterStringReference) inputObj).getParent(); // will be a SystemFilterReference
- else if (inputObj instanceof ISystemFilterString)
- return ((ISystemFilterString) inputObj).getParentSystemFilter();
- else
- return null;
- }
-
- protected IHost getInputConnection(Object inputObj) {
- if (inputObj instanceof IHost)
- return (IHost) inputObj;
- else if (inputObj instanceof ISubSystem)
- return ((ISubSystem) inputObj).getHost();
- else if (inputObj instanceof ISystemFilterPoolReference) {
- ISubSystem ss = (ISubSystem) ((ISystemFilterPoolReference) inputObj).getProvider(); // will be a subsystem
- if (ss == null) return null;
- return ss.getHost();
- } else if (inputObj instanceof ISystemFilterReference) {
- ISubSystem ss = (ISubSystem) ((ISystemFilterReference) inputObj).getProvider(); // will be a subsystem
- if (ss == null) return null;
- return ss.getHost();
- } else if (inputObj instanceof ISystemFilterStringReference) {
- ISubSystem ss = (ISubSystem) ((ISystemFilterStringReference) inputObj).getProvider(); // will be a subsystem
- if (ss == null) return null;
- return ss.getHost();
- } else
- return null;
- }
-
- /**
- * Handy debug method to print a tree item
- */
- protected String printTreeItem(Item item) {
- if (item == null)
- return ""; //$NON-NLS-1$
- else if (item instanceof TreeItem) {
- TreeItem ti = (TreeItem) item;
- return printTreeItem(ti.getParentItem()) + "/" + ti.getText(); //$NON-NLS-1$
- } else
- return item.toString();
- }
-
- /**
- * Delete all occurrences of a given remote object
- */
- protected void deleteRemoteObject(Object deleteObject, ISubSystem subsystem) {
- Vector matches = null;
- String oldElementName = null;
-
- // STEP 1: get the object's remote adapter and subsystem
- if (deleteObject instanceof String)
- oldElementName = (String) deleteObject;
- else {
- ISystemRemoteElementAdapter rmtAdapter = getRemoteAdapter(deleteObject);
- if (rmtAdapter == null) return;
- oldElementName = rmtAdapter.getAbsoluteName(deleteObject);
- subsystem = rmtAdapter.getSubSystem(deleteObject);
- }
- // STEP 2: find all references to the object
- matches = findAllRemoteItemReferences(oldElementName, deleteObject, subsystem, matches);
- if (matches == null) {
- //System.out.println("matches is null");
- return;
- }
-
- boolean wasSelected = false;
- Item parentItem = null;
-
- boolean dupes = false;
- Object prevData = null;
- for (int idx = 0; !dupes && (idx < matches.size()); idx++) {
- Item match = (Item) matches.elementAt(idx);
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- if (match.getData() == prevData)
- dupes = true;
- else
- prevData = match.getData();
- }
- }
- //System.out.println("matches size = " + matches.size() + ", any binary duplicates? " + dupes);
-
- // STEP 3: process all references to the object
- for (int idx = 0; idx < matches.size(); idx++) {
- Item match = (Item) matches.elementAt(idx);
- //System.out.println("...match " + idx + ": TreeItem? " + (match instanceof TreeItem) + ", disposed? " + ((TreeItem)match).isDisposed());
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- ((TreeItem) match).getParentItem(); // DWD may not be necessary
- Object data = match.getData();
- if (!wasSelected) {
- //wasSelected = isSelectedOrChildSelected(data);
- wasSelected = isTreeItemSelectedOrChildSelected(match);
- if (wasSelected) {
- clearSelection();
- parentItem = ((TreeItem) match).getParentItem();
- //System.out.println("...current item was selected");
- }
- }
- if (dupes) // defect 46818
- { // if there are multiple references to the same binary object, ...
- //System.out.println(".....calling refresh(data) on this match");
- /*
- if (pItem!=null)
- smartRefresh(new TreeItem[] {pItem}); // just refresh the parent node
- else
- refreshAll();
- */
- disassociate(match);
- match.dispose();
- } else {
- //System.out.println(".....calling remove(data) on this match");
- remove(data); // remove this item from the tree
- }
- }
- }
-
- // STEP 4: if we removed a selected item, select its parent
- if (wasSelected && (parentItem != null) && (parentItem instanceof TreeItem) && (parentItem.getData() != null)) {
- //System.out.println("Resetting selection to parent");
- setSelection(new StructuredSelection(parentItem.getData()), true);
- }
- return;
- }
-
- /**
- * Rename a remote object. Renames all references to it currently displayed in this tree.
- */
- protected void renameRemoteObject(Object renameObject, String oldElementName, ISubSystem subsystem) {
- String[] properties = new String[1];
- properties[0] = IBasicPropertyConstants.P_TEXT;
-
- // STEP 0: do we have the physical remote object that has been renamed? If so, update it directly
- /*
- Item item = (Item)findItem(renameObject);
- if (item != null)
- {
- update(renameObject, properties); // for refreshing non-structural properties in viewer when model changes
- if (item instanceof TreeItem)
- smartRefresh(new TreeItem[] {(TreeItem)item}); // we update the kids because they typically store references to their parent
- }
- */
-
- Vector matches = null;
-
- // STEP 1: get the object's remote adapter and subsystem
- //String newElementName = null;
- ISystemRemoteElementAdapter rmtAdapter = null;
- if (renameObject instanceof String) {
- //FIXME How to get the adapter based on the String name?
- //newElementName = (String)renameObject;
- } else {
- rmtAdapter = getRemoteAdapter(renameObject);
- subsystem = rmtAdapter.getSubSystem(renameObject);
- }
-
- // STEP 2: find all references to the old name object
- matches = findAllRemoteItemReferences(oldElementName, renameObject, subsystem, matches);
- if (matches == null) return;
-
- TreeItem[] selected = getTree().getSelection();
- getTree().deselectAll();
-
- boolean refresh = false;
- // STEP 3: process all references to the old name object
- for (int idx = 0; idx < matches.size(); idx++) {
- Item match = (Item) matches.elementAt(idx);
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- Object data = match.getData();
-
- if (data != renameObject) // not a binary match
- {
- if (rmtAdapter == null) rmtAdapter = getRemoteAdapter(data);
- refresh = rmtAdapter.refreshRemoteObject(data, renameObject); // old, new
- } else {
- refresh = true;
- }
-
-
- internalUpdate(match, data, properties);
-
- //update(data, properties); // for refreshing non-structural properties in viewer when model changes
- //System.out.println("Match found. refresh required? " + refresh);
-// if (refresh)
- //refreshRemoteObject(data,null,false);
- // smartRefresh(new TreeItem[] { (TreeItem) match });
- }
- }
-
- if (refresh)
- {
- smartRefresh((TreeItem[])matches.toArray(new TreeItem[matches.size()]));
- getTree().setSelection(selected);
- }
-
- // STEP 4: update property sheet, just in case.
- updatePropertySheet();
-
- return;
- }
-
- /**
- * Update properties of remote object. Update all references to this object
- */
- protected void updateRemoteObjectProperties(Object remoteObject) {
- Vector matches = new Vector();
-
- // STEP 1: get the object's remote adapter and subsystem
- ISystemRemoteElementAdapter rmtAdapter = getRemoteAdapter(remoteObject);
- ISubSystem subsystem = rmtAdapter.getSubSystem(remoteObject);
-
- // STEP 2: find all references to the object
- String oldElementName = rmtAdapter.getAbsoluteName(remoteObject);
- findAllRemoteItemReferences(oldElementName, remoteObject, subsystem, matches);
-
- // STEP 3: process all references to the object
- String[] allProps = { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
- for (int idx = 0; idx < matches.size(); idx++) {
- Item match = (Item) matches.elementAt(idx);
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- Object data = match.getData();
- if (data == remoteObject) // same binary object as given?
- update(data, allProps); // for refreshing non-structural properties in viewer when model changes
- else // match by name
- {
- rmtAdapter.refreshRemoteObject(data, remoteObject); // old, new
- update(data, allProps);
- }
- }
- }
-
- // STEP 4: update the property sheet in case we changed properties of first selected item
- updatePropertySheet();
- return;
- }
-
- /**
- * Refresh contents of remote container. Refreshes all references to this container including filters that
- * display the contents of this container.
- * @param remoteObject - either an actual remote object, or the absolute name of a remote object
- * @param toSelect - the child object to select after refreshing the given object. This will force the
- * object to be expanded, and then select this object which can be a remote object or absolute name of a
- * remote object. To simply force an expand of the remote object, without bothering to select a child,
- * pass an instance of SystemViewDummyObject.
- * @return true if a refresh done, false if given a non-remote object.
- */
- protected boolean refreshRemoteObject(Object remoteObject, Object toSelect, boolean originatedHere) {
- if (remoteObject == null) return false;
-
- // STEP 1: get the object's remote adapter and subsystem, or use its name if only given that
- ISystemRemoteElementAdapter rmtAdapter = null;
- ISubSystem subsystem = null;
- String oldElementName = null;
- if (!(remoteObject instanceof String)) {
- rmtAdapter = getRemoteAdapter(remoteObject);
- if (rmtAdapter == null) return false;
- subsystem = rmtAdapter.getSubSystem(remoteObject);
- oldElementName = rmtAdapter.getAbsoluteName(remoteObject);
- } else
- oldElementName = (String) remoteObject;
-
- Vector matches = new Vector();
- // STEP 2: find all references to the object
- findAllRemoteItemReferences(oldElementName, remoteObject, subsystem, matches);
- if (remoteObject instanceof String) remoteObject = getFirstRemoteObject(matches);
-
- if (remoteObject instanceof ISystemContainer) {
- ((ISystemContainer) remoteObject).markStale(true);
- }
-
- // STEP 3: process all references to the object
- boolean firstSelection = true;
- for (int idx = 0; idx < matches.size(); idx++) {
- Item match = (Item) matches.elementAt(idx);
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- Object data = match.getData();
- smartRefresh(new TreeItem[] { (TreeItem) match }); // refresh the remote object
- if (firstSelection && // for now, we just select the first binary occurrence we find
- (data == remoteObject)) // same binary object as given?
- {
- firstSelection = false;
- if ((toSelect != null) && originatedHere) {
- if (!getExpanded(match)) // assume if callers wants to select kids that they want to expand parent
- {
- createChildren(match);
- setExpanded(match, true);
- }
- // todo: handle cumulative selections.
- // STEP 4: If requested, select the kids in the newly refreshed object.
- // If the same binary object appears multiple times, select the kids in the first occurrence.
- // ... what else to do?
- if (!(toSelect instanceof SystemViewDummyObject)) selectRemoteObjects(toSelect, null, match); // select the given kids in this parent
- }
- }
- }
- }
- return true;
- }
-
- /**
- * Given the result of findAllRemoteItemReferences, scan for first non-filter object
- */
- protected Object getFirstRemoteObject(Vector matches) {
- if ((matches == null) || (matches.size() == 0)) return null;
- Object firstRemote = matches.elementAt(0);
- if (firstRemote != null) firstRemote = ((Item) firstRemote).getData();
- return firstRemote;
- }
-
- /**
- * Refreshes the tree starting at the given widget.
- *
- * @param widget the widget
- * @param element the element
- * @param doStruct <code>true</code> if structural changes are to be picked up,
- * and <code>false</code> if only label provider changes are of interest
- */
- protected void ourInternalRefresh(Widget widget, Object element, boolean doStruct, boolean forceRemote, boolean doTimings) {
- final Widget fWidget = widget;
- final Object fElement = element;
- final boolean fDoStruct = doStruct;
-
- // we have to take special care if one of our kids are selected and it is a remote object...
- if (forceRemote || (isSelectionRemote() && isTreeItemSelectedOrChildSelected(widget))) {
- if (!isTreeItemSelected(widget)) // it is one of our kids that is selected
- {
- clearSelection(); // there is nothing much else we can do. Calling code will restore it anyway hopefully
- doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings, true);
- } else // it is us that is selected. This might be a refresh selected operation. TreeItem address won't change
- {
- doOurInternalRefresh(fWidget, fElement, fDoStruct, doTimings, true);
- }
- } else {
- final boolean finalDoTimings = doTimings;
- preservingSelection(new Runnable() {
- public void run() {
- doOurInternalRefresh(fWidget, fElement, fDoStruct, finalDoTimings, true);
- }
- });
- }
- }
-
- protected boolean isSelectionRemote() {
- ISelection s = getSelection();
- if ((s != null) && (s instanceof IStructuredSelection)) {
- IStructuredSelection ss = (IStructuredSelection) s;
- Object firstSel = ss.getFirstElement();
- if ((firstSel != null) && (getRemoteAdapter(firstSel) != null)) return true;
- }
- return false;
- }
-
- protected void doOurInternalRefresh(Widget widget, Object element, boolean doStruct, boolean doTimings, boolean firstCall) {
- if (debug) {
- logDebugMsg("in doOurInternalRefresh on " + getAdapter(element).getName(element)); //$NON-NLS-1$
- logDebugMsg("...current selection is " + getFirstSelectionName(getSelection())); //$NON-NLS-1$
- }
- SystemElapsedTimer timer = null;
- if (doTimings) timer = new SystemElapsedTimer();
- if (widget instanceof Item) {
- //System.out.println("Inside doOurInternalRefresh. widget = " + ((TreeItem)widget).handle);
- if (doStruct) {
- updatePlus((Item) widget, element);
- }
- updateItem(widget, element);
- if (doTimings && timer != null) {
- System.out.println("doOurInternalRefresh timer 1: time to updatePlus and updateItem:" + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
-
- if (doStruct) {
- // pass null for children, to allow updateChildren to get them only if needed
- // Object[] newChildren = null;
- if ((widget instanceof Item) && getExpanded((Item) widget)) {
- // DKM - get raw children does a query but so does internalRefresh()
- // newChildren = getRawChildren(widget);
- if (doTimings && timer != null) {
- System.out.println("doOurInternalRefresh timer 2: time to getRawChildren:" + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
- // DKM - without the else we get duplicate queries on expanded folder
- // uncommented - seems new results after query aren't showing up
- //else
-// {
-// internalRefresh(element);
-// }
-
- if (doTimings && timer != null) {
- System.out.println("doOurInternalRefresh timer 3: time to updateChildren:" + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
- // recurse
- Item[] children = getChildren(widget);
- if (children != null) {
- //SystemElapsedTimer timer2 = null;
- //int intervalCount = 0;
- //if (doTimings)
- //timer2 = new SystemElapsedTimer();
- for (int i = 0; i < children.length; i++) {
- Widget item = children[i];
- Object data = item.getData();
- if (data != null) doOurInternalRefresh(item, data, doStruct, false, false);
- /*
- if (doTimings)
- {
- ++intervalCount;
- if (intervalCount == 1000)
- {
- System.out.println("...time to recurse next 1000 children: " + timer2.setEndTime());
- intervalCount = 0;
- timer2.setStartTime();
- }
- }*/
- }
- }
- if (firstCall)
- {
- internalRefresh(element);
- }
- if (doTimings && timer != null) {
- System.out.println("doOurInternalRefresh timer 4: time to recurse children:" + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
-
- protected Object[] getRawChildren(Widget w) {
- Object parent = w.getData();
-
- if (parent.equals(getRoot())) return super.getRawChildren(parent);
- Object[] result = ((ITreeContentProvider) getContentProvider()).getChildren(parent);
- if (result != null) return result;
-
- return new Object[0];
- }
-
- /*
- protected void preservingSelection(Runnable updateCode)
- {
- super.preservingSelection(updateCode);
- System.out.println("After preservingSelection: new selection = "+getFirstSelectionName(getSelection()));
- }
- protected void handleInvalidSelection(ISelection invalidSelection, ISelection newSelection)
- {
- System.out.println("Inside handleInvalidSelection: old = "+getFirstSelectionName(invalidSelection)+", new = "+getFirstSelectionName(newSelection));
- updateSelection(newSelection);
- }
- */
- protected String getFirstSelectionName(ISelection s) {
- if ((s != null) && (s instanceof IStructuredSelection)) {
- IStructuredSelection ss = (IStructuredSelection) s;
- Object firstSel = ss.getFirstElement();
- String name = null;
- if (firstSel != null) {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(firstSel);
- if (ra != null)
- name = ra.getAbsoluteName(firstSel);
- else
- name = getAdapter(firstSel).getName(firstSel);
- }
- return name;
- } else
- return null;
- }
-
- /**
- * Expand a remote object within the tree. Must be given its parent element within the tree,
- * in order to uniquely find it. If not given this, we expand the first occurrence we find!
- * @param remoteObject - either a remote object or a remote object absolute name
- * @param subsystem - the subsystem that owns the remote objects, to optimize searches.
- * @param parentObject - the parent that owns the remote objects, to optimize searches. Can
- * be an object or the absolute name of a remote object.
- * @return the tree item of the remote object if found and expanded, else null
- */
- public Item expandRemoteObject(Object remoteObject, ISubSystem subsystem, Object parentObject) {
- // given the parent? Should be easy
- Item remoteItem = null;
- if (parentObject != null) {
- Item parentItem = null;
- if (parentObject instanceof Item)
- parentItem = (Item) parentObject;
- else if (parentObject instanceof String) // given absolute name of remote object
- parentItem = findFirstRemoteItemReference((String) parentObject, subsystem, (Item) null); // search all roots for the parent
- else // given actual remote object
- {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(parentObject);
- if (ra != null) {
- if (subsystem == null) subsystem = ra.getSubSystem(parentObject);
- parentItem = findFirstRemoteItemReference(ra.getAbsoluteName(parentObject), subsystem, (Item) null); // search all roots for the parent
- } else // else parent is not a remote object. Probably its a filter
- {
- Widget parentWidget = findItem(parentObject);
- if (parentWidget instanceof Item) parentItem = (Item) parentWidget;
- }
- }
- // ok, we have the parent item! Hopefully!
- if (remoteObject instanceof String)
- remoteItem = findFirstRemoteItemReference((String) remoteObject, subsystem, parentItem);
- else
- remoteItem = findFirstRemoteItemReference(remoteObject, parentItem);
- if (remoteItem == null) return null;
- setExpandedState(remoteItem.getData(), true);
- } else // not given a parent to refine search with. Better have a subsystem!!
- {
- if (remoteObject instanceof String)
- remoteItem = findFirstRemoteItemReference((String) remoteObject, subsystem, (Item) null);
- else {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteObject);
- if (ra != null) {
- if (subsystem == null) subsystem = ra.getSubSystem(remoteObject);
- remoteItem = findFirstRemoteItemReference(ra.getAbsoluteName(remoteObject), subsystem, (Item) null);
- }
- }
- if (remoteItem == null) return null;
- setExpandedState(remoteItem.getData(), true);
- }
- return remoteItem;
- }
-
- /**
- * Select a remote object or objects given the parent remote object (can be null) and subsystem (can be null)
- * @param src - either a remote object, a remote object absolute name, or a vector of remote objects or remote object absolute names
- * @param subsystem - the subsystem that owns the remote objects, to optimize searches.
- * @param parentObject - the parent that owns the remote objects, to optimize searches.
- * @return true if found and selected
- */
- public boolean selectRemoteObjects(Object src, ISubSystem subsystem, Object parentObject) {
- //String parentName = null;
- // given a parent object? That makes it easy...
- if (parentObject != null) {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(parentObject);
- if (ra != null) {
- //parentName = ra.getAbsoluteName(parentObject);
- if (subsystem == null) subsystem = ra.getSubSystem(parentObject);
- Item parentItem = findFirstRemoteItemReference(parentObject, (Item) null); // search all roots for the parent
- return selectRemoteObjects(src, subsystem, parentItem);
- } else // else parent is not a remote object. Probably its a filter
- {
- Item parentItem = null;
- if (parentObject instanceof Item)
- parentItem = (Item) parentObject;
- else {
- Widget parentWidget = findItem(parentObject);
- if (parentWidget instanceof Item) parentItem = (Item) parentWidget;
- }
- if (parentItem != null)
- return selectRemoteObjects(src, (ISubSystem) null, parentItem);
- else
- return false;
- }
- } else
- //return selectRemoteObjects(src, (SubSystem)null, (Item)null); // Phil test
- return selectRemoteObjects(src, subsystem, (Item) null);
- }
-
- /**
- * Select a remote object or objects given the parent remote object (can be null) and subsystem (can be null) and parent TreeItem to
- * start the search at (can be null)
- * @param src - either a remote object, a remote object absolute name, or a vector of remote objects or remote object absolute names
- * @param subsystem - the subsystem that owns the remote objects, to optimize searches.
- * @param parentItem - the parent at which to start the search to find the remote objects. Else, starts at the roots.
- * @return true if found and selected
- */
- protected boolean selectRemoteObjects(Object src, ISubSystem subsystem, Item parentItem) {
- clearSelection();
- Item selItem = null;
-
- if (parentItem != null && parentItem.isDisposed()) {
- return false;
- }
-
- if ((parentItem != null) && !getExpanded(parentItem))
- //setExpanded(parentItem, true);
- setExpandedState(parentItem.getData(), true);
-
- //System.out.println("SELECT_REMOTE: PARENT = " + parent + ", PARENTITEM = " + parentItem);
- if (src instanceof Vector) {
- //String elementName = null;
- Vector selVector = (Vector) src;
- ArrayList selItems = new ArrayList();
- // our goal here is to turn the vector of names or remote objects into a collection of
- // actual TreeItems we matched them on...
- for (int idx = 0; idx < selVector.size(); idx++) {
- Object o = selVector.elementAt(idx);
- //elementName = null;
- if (o instanceof String)
- selItem = findFirstRemoteItemReference((String) o, subsystem, parentItem);
- else
- selItem = findFirstRemoteItemReference(o, parentItem);
-
- if (selItem != null) {
- selItems.add(selItem);
- // when selecting multiple items, we optimize by assuming they have the same parent...
- if ((parentItem == null) && (selItem instanceof TreeItem)) parentItem = ((TreeItem) selItem).getParentItem();
- }
- }
- if (selItems.size() > 0) {
- setSelection(selItems);
- updatePropertySheet();
- return true;
- }
- } else {
- if (src instanceof String)
- //selItem = (Item)findFirstRemoteItemReference((String)src, (SubSystem)null, parentItem); Phil test
- selItem = findFirstRemoteItemReference((String) src, subsystem, parentItem);
- else
- selItem = findFirstRemoteItemReference(src, parentItem);
-
- if (selItem != null) {
- ArrayList selItems = new ArrayList();
- selItems.add(selItem);
- setSelection(selItems);
- updatePropertySheet();
- return true;
- }
- }
- return false;
- }
-
- /**
- * Refresh the whole tree. We have special code to reselect remote objects after the refresh
- */
- public void refreshAll() {
- IStructuredSelection selected = (IStructuredSelection) getSelection();
- Iterator i = selected.iterator();
- Object parentElement = null;
- Vector selectedRemoteObjects = new Vector();
- Widget parentItem = null;
- ISubSystem ss = null;
- while (i.hasNext()) {
- Object element = i.next();
- if (parentElement == null) {
- parentItem = getParentItem((Item) findItem(element));
- if ((parentItem != null) && (parentItem instanceof Item)) parentElement = ((Item) parentItem).getData();
- }
- if (getRemoteAdapter(element) != null) {
- selectedRemoteObjects.addElement(element);
- if (ss == null) ss = getRemoteAdapter(element).getSubSystem(element);
- }
- }
-
- //super.refresh();
- smartRefresh((Object) null, (selectedRemoteObjects.size() > 0));
-
- if (selectedRemoteObjects.size() > 0) {
- selectRemoteObjects(selectedRemoteObjects, ss, parentElement);
- }
- }
-
- /**
- * Do an intelligent refresh of an expanded item. The inherited algorithm for refresh is stupid,
- * in that it reexpands children based on their original ordinal position which can change after a
- * refresh, resulting in the wrong children being expanded. Currently this only truly comes to light
- * for remote objects, where refresh really can change the resulting list and hence each child's
- * ordinal position. So, to be safe we only override the inherited algorithm if any nested child
- * is a remote object
- */
- protected void smartRefresh(TreeItem[] itemsToRefresh) {
- smartRefresh(itemsToRefresh, null, false);
- }
-
- protected void smartRefresh(TreeItem[] itemsToRefresh, ArrayList expandedChildren, boolean forceRemote) {
- SystemElapsedTimer timer = null;
- if (doTimings) timer = new SystemElapsedTimer();
- areAnyRemote = false; // set in ExpandedItem constructor
- boolean fullRefresh = false;
- // for each selected tree item gather a list of expanded child nodes...
- if (expandedChildren == null)
- expandedChildren = new ArrayList();
- else
- fullRefresh = true;
- boolean[] wasExpanded = new boolean[itemsToRefresh.length];
- //boolean anyGivenItemsRemote = false;
- for (int idx = 0; idx < itemsToRefresh.length; idx++) {
- TreeItem currItem = itemsToRefresh[idx];
- // ...if this selected item is expanded, recursively gather up all its expanded descendents
- Object data = currItem.getData();
- ISystemViewElementAdapter adapter = null;
- if (data != null) adapter = getAdapter(data);
- //if (adapter instanceof ISystemRemoteElementAdapter) {
- // anyGivenItemsRemote = true;
- //}
- if (currItem.getExpanded() && (adapter != null) && adapter.isPromptable(data))
- setExpandedState(data, false); // collapse temp expansion of prompts
- else if (currItem.getExpanded()) {
- //expandedChildren.add(new ExpandedItem(currItem)); we don't need special processing for given items themselves as they will not be refreshed, only their kids
- if (doTimings && timer != null) timer.setStartTime();
- gatherExpandedChildren((fullRefresh ? null : currItem), currItem, expandedChildren);
- wasExpanded[idx] = true;
- if (doTimings && timer != null) System.out.println("Refresh Timer 1: time to gatherExpandedChildren: " + timer.setEndTime()); //$NON-NLS-1$
- } else
- wasExpanded[idx] = false;
- }
- // ok, we have found all expanded descendents of all selected items.
-
- // If none of the expanded sub-nodes are remote simply use the inherited algorithm for refresh
- if (!areAnyRemote) {
- for (int idx = 0; idx < itemsToRefresh.length; idx++)
- //ourInternalRefresh(itemsToRefresh[idx], itemsToRefresh[idx].getData(), wasExpanded[idx]);
- ourInternalRefresh(itemsToRefresh[idx], itemsToRefresh[idx].getData(), true, forceRemote, doTimings); // defect 42321
- return;
- }
- getControl().setRedraw(false);
- // If any selected nodes are remote use our own algorithm:
- // 1. collapse each given node and refresh it to remove the children from memory, then
- // expand it again. It doesn't matter if it is remote or not since its own memory
- // address won't change, only that of its children.
- for (int idx = 0; idx < itemsToRefresh.length; idx++) {
- TreeItem currItem = itemsToRefresh[idx];
- if (doTimings && timer != null) timer.setStartTime();
- setExpanded(currItem, false); // collapse node
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 2: time to setExpanded(false): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- ourInternalRefresh(currItem, currItem.getData(), true, true, doTimings); // dispose of children, update plus
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 3: time to do ourInternalRefresh(...): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- if (wasExpanded[idx]) {
- createChildren(currItem); // re-expand
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 4: time to createChildren(...): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- currItem.setExpanded(true);
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 5: time to setExpanded(true): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- } else // hmm, item was not expanded so just flush its memory
- {
-
- }
- }
- // 2. expand each previously expanded sub-node, recursively
- for (int idx = 0; idx < expandedChildren.size(); idx++) {
- ExpandedItem itemToExpand = (ExpandedItem) expandedChildren.get(idx);
- if (itemToExpand.isRemote()) {
- // find remote item based on its original name and unchanged root parent
- Item item = null;
- //if (itemToExpand.parentItem != null)
- //item = (Item)recursiveFindRemoteItem(itemToExpand.parentItem, itemToExpand.remoteName, itemToExpand.subsystem);
- //else
- //item = (Item)findRemoteItem(itemToExpand.remoteName, itemToExpand.subsystem);
- item = findFirstRemoteItemReference(itemToExpand.remoteName, itemToExpand.subsystem, itemToExpand.parentItem);
- // if found, re-expand it
- if (item != null) {
- //setExpanded(item, true);
- createChildren(item);
- ((TreeItem) item).setExpanded(true);
- if (debug) System.out.println("Re-Expanded RemoteItem: " + itemToExpand.remoteName); //$NON-NLS-1$
- } else if (debug) System.out.println("Re-Expand of RemoteItem '" + itemToExpand.remoteName + "' failed. Not found"); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- setExpandedState(itemToExpand.data, true);
- if (debug) System.out.println("Re-Expanded non-remote Item: " + itemToExpand.data); //$NON-NLS-1$
- }
- }
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 6: time to reExpanded expanded subnodes: " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- getControl().setRedraw(true);
- if (doTimings && timer != null) {
- System.out.println("Refresh Timer 7: time to setRedraw(true): " + timer.setEndTime()); //$NON-NLS-1$
- timer.setStartTime();
- }
- }
-
- /**
- * Do an intelligent refresh of the given element. Can be null for full refresh
- */
- protected void smartRefresh(Object element, boolean forceRemote) {
- if ((element == null) || (element == getInput())) {
- // fullRefresh
- Tree tree = getTree();
- TreeItem[] roots = tree.getItems();
- boolean anyExpanded = false;
- areAnyRemote = false; // set in ExpandedItem constructor
- ArrayList expandedChildren = new ArrayList();
- if (roots != null) {
- for (int idx = 0; idx < roots.length; idx++) {
- TreeItem currItem = roots[idx];
- Object data = currItem.getData();
- ISystemViewElementAdapter adapter = null;
- if (data != null) adapter = getAdapter(data);
- if (currItem.getExpanded() && (adapter != null) && adapter.isPromptable(data))
- setExpandedState(data, false);
- else if (currItem.getExpanded()) {
- //setExpanded(roots[idx], false);
- expandedChildren.add(new ExpandedItem(null, currItem));
- anyExpanded = true;
- //gatherExpandedChildren(currItem, currItem, expandedChildren);
- }
- }
- }
- if (!anyExpanded)
- super.refresh();
- else {
- internalRefresh(getInput());
- roots = tree.getItems(); // re-query roots
- smartRefresh(roots, expandedChildren, forceRemote);
- }
- } else if (getRemoteAdapter(element) != null) {
-
- Item item = null;
- if (element instanceof String) {
- item = findFirstRemoteItemReference((String) element, (ISubSystem) null, (Item) null);
- if (item != null) {
- smartRefresh(new TreeItem[] { (TreeItem) item });
- }
- } else {
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(element);
- String elementName = adapter.getName(element);
- ISubSystem subSystem = adapter.getSubSystem(element);
-
- Vector matches = new Vector();
- findAllRemoteItemReferences(elementName, element, subSystem, matches);
- if (matches.size() > 0) {
- for (int i = 0; i < matches.size(); i++) {
- Item match = (Item) matches.get(i);
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- smartRefresh(new TreeItem[] { (TreeItem) match });
- }
- }
- }
- }
-
- /*
- Item item = null;
- if (element instanceof String)
- item = findFirstRemoteItemReference((String)element, (SubSystem)null, (Item)null);
- else
- item = findFirstRemoteItemReference(element, (Item)null);
- if (item != null)
- smartRefresh(new TreeItem[] {(TreeItem)item});
-
- */
- } else {
- Item item = (Item) findItem(element);
- //System.out.println("Inside SV smartRefresh for "+element+". Item found? " + (item!=null));
- if (item != null) smartRefresh(new TreeItem[] { (TreeItem) item });
- }
- }
-
- class ExpandedItem {
- TreeItem item, parentItem;
- Object data;
- String remoteName;
- ISystemRemoteElementAdapter remoteAdapter;
- ISubSystem subsystem;
-
- ExpandedItem(TreeItem parentItem, TreeItem item) {
- this.parentItem = parentItem;
- this.item = item;
- this.data = item.getData();
- if (data != null) {
- remoteAdapter = getRemoteAdapter(data);
- if (remoteAdapter != null) {
- remoteName = remoteAdapter.getAbsoluteName(data);
- subsystem = remoteAdapter.getSubSystem(data);
- areAnyRemote = true;
- if (debug) System.out.println("ExpandedRemoteItem added. remoteName = " + remoteName); //$NON-NLS-1$
- } else if (debug) System.out.println("ExpandedItem added. Data = " + data); //$NON-NLS-1$
- } else if (debug) System.out.println("ExpandedItem added. Data = null"); //$NON-NLS-1$
- }
-
- boolean isRemote() {
- return (remoteAdapter != null);
- }
- }
-
- /**
- * Gather up all expanded children of the given tree item into a list that can be used later to
- * reexpand.
- * @param parentItem The root parent which will not be refreshed itself (only its kids) and hence will remain valid after refresh.
- * In a full refresh this will be null.
- * @param startingItem The starting item for this search. Usually same as parentItem, but changes via recursion
- * @param listToPopulate An array list that will be populated with instances of our inner class ExpandedItem
- */
- protected void gatherExpandedChildren(TreeItem parentItem, TreeItem startingItem, ArrayList listToPopulate) {
- TreeItem[] itemChildren = startingItem.getItems();
- if (itemChildren != null) {
- for (int idx = 0; idx < itemChildren.length; idx++) {
- TreeItem currChild = itemChildren[idx];
- Object data = currChild.getData();
- ISystemViewElementAdapter adapter = null;
- if (data != null) adapter = getAdapter(data);
- if (currChild.getExpanded() && (adapter != null) && adapter.isPromptable(data))
- setExpandedState(data, false);
- else if (currChild.getExpanded()) {
- listToPopulate.add(new ExpandedItem(parentItem, currChild));
- gatherExpandedChildren(parentItem, currChild, listToPopulate);
- }
- }
- }
- }
-
- /**
- * Get index of item given its data element
- */
- protected int getItemIndex(Widget parent, Object element) {
- int index = -1;
- Item[] kids = getChildren(parent);
- if (kids != null) for (int idx = 0; idx < kids.length; idx++)
- if (kids[idx].getData() == element) index = idx;
- return index;
- }
-
- /**
- * We don't show actual filters, only filter references that are unique generated
- * for each subtree of each subsystem. Yet, each event is relative to the filter,
- * not our special filter references. Hence, all this code!!
- * <p>
- * Special case handling for updates to filters which affect the filter
- * but not the filter parent:
- * 1. Existing filter renamed (RENAME)
- * 2. Existing filter's filter strings changed (CHANGE)
- * <p>
- * Assumption:
- * 1. event.getGrandParent() == subsystem (one event fired per affected subsystem)
- * 2. event.getSource() == filter or filter string (not the reference, the real filter or string)
- * 3. event.getParent() == parent of filter or filter string. One of:
- * a. filterPool reference or filter reference (nested)
- * b. filterPool for non-nested filters when showing filter pools
- * c. subsystem for non-nested filters when not showing filter pools
- * d. filter for nested filters
- * <p>
- * Our job here:
- * 1. Determine if we are even showing the given subsystem
- * 2. Find the reference to the updated filter in that subsystem's subtree
- * 3. Ask that parent to either update its name or collapse and refresh its children
- * 4. Forget selecting something ... the original item remains selected!
- */
- protected void findAndUpdateFilter(ISystemResourceChangeEvent event, int type) {
- ISystemFilter filter = (ISystemFilter) event.getSource();
- //Object parent = event.getParent();
- if (debug) {
- String eventType = null;
- switch (type) {
- case EVENT_RENAME_FILTER_REFERENCE:
- eventType = "EVENT_RENAME_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_CHANGE_FILTER_REFERENCE:
- eventType = "EVENT_CHANGE_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- }
- logDebugMsg("SV event: " + eventType); //$NON-NLS-1$
- }
-
- // STEP 1. ARE WE EVEN SHOWING THE GIVEN SUBSYSTEM?
- ISubSystem ss = (ISubSystem) event.getGrandParent();
- Widget widget = findItem(ss);
-
- if (widget != null) {
-
- // STEP 2: ARE WE SHOWING A REFERENCE TO RENAMED OR UPDATED FILTER?
- Widget item = null;
-
- Control c = getControl();
-
- // KM: defect 53008.
- // Yes we are showing the subsystem, so widget is the subsystem item
- if (widget != c && widget instanceof Item) {
-
- if (debug) logDebugMsg("...Found ss " + ss); //$NON-NLS-1$
-
- item = internalFindReferencedItem(widget, filter, SEARCH_INFINITE);
- }
- // No, we are not showing the subsystem, so widget is the control
- else if (widget == c) {
-
- if (debug) logDebugMsg("...Din not find ss " + ss); //$NON-NLS-1$
-
- item = internalFindReferencedItem(widget, filter, SEARCH_INFINITE);
- }
-
- if (item == null)
- logDebugMsg("......didn't find renamed/updated filter's reference!"); //$NON-NLS-1$
- else {
- // STEP 3: UPDATE THAT FILTER...
- if (type == EVENT_RENAME_FILTER_REFERENCE) {
- String[] rproperties = { IBasicPropertyConstants.P_TEXT };
- update(item.getData(), rproperties); // for refreshing non-structural properties in viewer when model changes
- } else if (type == EVENT_CHANGE_FILTER_REFERENCE) {
- //if (((TreeItem)item).getExpanded())
- //refresh(item.getData());
- smartRefresh(new TreeItem[] { (TreeItem) item });
- /*
- Object data = item.getData();
- boolean wasExpanded = getExpanded((Item)item);
- setExpandedState(data, false); // collapse node
- refresh(data); // clear all cached widgets
- if (wasExpanded)
- setExpandedState(data, true); // by doing this all subnodes that were expanded are now collapsed
- */
- }
- updatePropertySheet();
- }
- }
- }
-
- protected void findAndUpdateFilterString(ISystemResourceChangeEvent event, int type) {
- ISystemFilterString filterString = (ISystemFilterString) event.getSource();
- // STEP 1. ARE WE EVEN SHOWING THE GIVEN SUBSYSTEM?
- ISubSystem ss = (ISubSystem) event.getGrandParent();
- Widget item = findItem(ss);
- if (item != null && item != getControl()) {
- Item ssItem = (Item) item;
- if (debug) logDebugMsg("...Found ss " + ss); //$NON-NLS-1$
- // STEP 2: ARE WE SHOWING A REFERENCE TO THE UPDATED FILTER STRING?
- item = internalFindReferencedItem(ssItem, filterString, SEARCH_INFINITE);
- if (item == null)
- logDebugMsg("......didn't find updated filter string's reference!"); //$NON-NLS-1$
- else {
- // STEP 3: UPDATE THAT FILTER STRING...
- if (type == EVENT_CHANGE_FILTERSTRING_REFERENCE) // HAD BETTER!
- {
- //if (((TreeItem)item).getExpanded())
- //refresh(item.getData());
- // boolean wasExpanded = getExpanded((Item)item);
- Object data = item.getData();
- setExpandedState(data, false); // collapse node
- refresh(data); // clear all cached widgets
- //if (wasExpanded)
- //setExpandedState(data, true); // hmm, should we?
- String properties[] = { IBasicPropertyConstants.P_TEXT };
- update(item.getData(), properties); // for refreshing non-structural properties in viewer when model changes
- updatePropertySheet();
- }
- }
- }
- }
-
- /**
- * We don't show actual filters, only filter references that are unique generated
- * for each subtree of each subsystem. Yet, each event is relative to the filter,
- * not our special filter references. Hence, all this code!!
- * <p>
- * Special case handling for updates to filters which affect the parent of the
- * filter, such that the parent's children must be re-generated:
- * 1. New filter created (ADD)
- * 2. Existing filter deleted (DELETE)
- * 3. Existing filters reordered (MOVE)
- * <p>
- * Assumption:
- * 1. event.getGrandParent() == subsystem (one event fired per affected subsystem)
- * 2. event.getSource() == filter (not the reference, the real filter)
- * 3. event.getParent() == parent of filter. One of:
- * a. filterPool reference or filter reference (nested)
- * b. filterPool for non-nested filters when showing filter pools
- * c. subsystem for non-nested filters when not showing filter pools
- * d. filter for nested filters
- * <p>
- * Our job here:
- * 1. Determine if we are even showing the given subsystem
- * 2. Find the parent to the given filter: filterPool or subsystem
- * 3. Ask that parent to refresh its children (causes re-gen of filter references)
- * 4. Select something: QUESTION: is this subsystem the origin of this action??
- * a. For ADD, select the newly created filter reference for the new filter
- * ANSWER: IF PARENT OF NEW FILTER IS WITHIN THIS SUBSYSTEM, AND WAS SELECTED PREVIOUSLY
- * b. For DELETE, select the parent of the filter?
- * ANSWER: IF DELETED FILTER IS WITHING THIS SUBSYSTEM AND WAS SELECTED PREVIOUSLY
- * c. For MOVE, select the moved filters
- * ANSWER: IF MOVED FILTERS ARE WITHIN THIS SUBSYSTEM, AND WERE SELECTED PREVIOUSLY
- */
- protected void findAndUpdateFilterParent(ISystemResourceChangeEvent event, int type) {
- ISubSystem ss = (ISubSystem) event.getGrandParent();
-
-
- boolean add = false, move = false, delete = false;
- boolean afilterstring = false;
- //if (debug)
- //{
- String eventType = null;
- switch (type) {
- case EVENT_ADD_FILTER_REFERENCE:
- add = true;
- if (debug) eventType = "EVENT_ADD_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_DELETE_FILTER_REFERENCE:
- delete = true;
- if (debug) eventType = "EVENT_DELETE_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_MOVE_FILTER_REFERENCES:
- move = true;
- if (debug) eventType = "EVENT_MOVE_FILTER_REFERENCES"; //$NON-NLS-1$
- break;
- case EVENT_ADD_FILTERSTRING_REFERENCE:
- add = true;
- afilterstring = true;
- if (debug) eventType = "EVENT_ADD_FILTERSTRING_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_DELETE_FILTERSTRING_REFERENCE:
- delete = true;
- afilterstring = true;
- if (debug) eventType = "EVENT_DELETE_FILTERSTRING_REFERENCE"; //$NON-NLS-1$
- break;
- case EVENT_MOVE_FILTERSTRING_REFERENCES:
- move = true;
- afilterstring = true;
- if (debug) eventType = "EVENT_MOVE_FILTERSTRING_REFERENCES"; //$NON-NLS-1$
- break;
-
- }
- if (debug) logDebugMsg("SV event: " + eventType); //$NON-NLS-1$
- //}
- //clearSelection();
-
- ISystemFilter filter = null;
- ISystemFilterString filterstring = null;
- if (!afilterstring)
- filter = (ISystemFilter) event.getSource(); // for multi-source move, gets first filter
- else
- filterstring = (ISystemFilterString) event.getSource();
-
- boolean multiSource = move;
- // STEP 1: ARE WE SHOWING THE SUBSYSTEM GRANDPARENT OF CURRENT REFRESH?
- Widget item = findItem(ss);
-
- if (item == null) {
- refresh();
-
- if (debug) logDebugMsg("...Did not find ss " + ss.getName()); //$NON-NLS-1$
- return;
- }
- Item ssItem = (Item) item;
- boolean wasSelected = false;
- IStructuredSelection oldSelections = (IStructuredSelection) getSelection();
-
- Object parent = event.getParent();
- if (debug) logDebugMsg("...Found ss " + ss); //$NON-NLS-1$
-
- // STEP 2: ARE WE SHOWING A REFERENCE TO THE FILTER's PARENT POOL?
- Item parentRefItem = null;
- ISystemFilterContainer refdParent = null;
- // 3a (reference to filter pool or filter)
- if (parent instanceof ISystemFilterContainerReference) // given a reference to parent?
- {
- refdParent = ((ISystemFilterContainerReference) parent).getReferencedSystemFilterContainer();
- parentRefItem = (Item) internalFindReferencedItem(ssItem, refdParent, SEARCH_INFINITE);
- }
- // 3b and 3d. (filter pool or filter)
- else if (parent instanceof ISystemFilterContainer) {
- refdParent = (ISystemFilterContainer) parent;
- parentRefItem = (Item) internalFindReferencedItem(ssItem, refdParent, SEARCH_INFINITE);
- }
- // 3c (subsystem)
- else {
- parentRefItem = ssItem;
- }
- if (parentRefItem != null) {
- if (debug) logDebugMsg("......We are showing reference to parent"); //$NON-NLS-1$
- // STEP 3... YES, SO REFRESH PARENT... IT WILL RE-GEN THE FILTER REFERENCES FOR EACH CHILD FILTER
- // ... actually, call off the whole show if that parent is currently not expanded!!
- // HMMM... WE NEED TO REFRESH EVEN IF NOT EXPANDED IF ADDING FIRST CHILD
- if (!add) // move or delete
- {
- if (!(((TreeItem) parentRefItem).getExpanded())) {
- refresh(parentRefItem.getData()); // flush cached widgets so next expand is fresh
- return;
- }
- // move or delete and parent is expanded...
- Item oldItem = (Item) internalFindReferencedItem(parentRefItem, afilterstring ? (Object) filterstring : (Object) filter, 1);
- //if (debug)
- //logDebugMsg("oldItem null? " + (oldItem==null));
- if (oldItem != null) // found moved or deleted filter in our subtree
- {
- wasSelected = isSelected(oldItem.getData(), oldSelections); // was it selected before?
- //if (debug)
- //logDebugMsg("was selected? " + wasSelected);
- } else {
- // else interesting case ... we are showing the parent, but can't find the child!
- }
- if (move) {
- Object[] srcObjects = null;
- if (multiSource)
- srcObjects = event.getMultiSource();
- else {
- srcObjects = new Object[1];
- srcObjects[0] = event.getSource();
- }
- moveReferencedTreeItems(parentRefItem, srcObjects, event.getPosition());
- //refresh(parentRefItem.getData());
- } else // remove
- {
- if (oldItem != null)
- remove(oldItem.getData());
- }
- } else // add operation
- {
- if (!(((TreeItem) parentRefItem).getExpanded())) {
- refresh(parentRefItem.getData()); // delete cached GUIs
- //setExpandedState(parentRefItem,true); // not our job to expand here.
- } else if (afilterstring) {
- ISystemFilterReference fr = (ISystemFilterReference) parentRefItem.getData();
- ISystemFilterStringReference fsr = fr.getSystemFilterStringReference(filterstring);
- createTreeItem(parentRefItem, fsr, event.getPosition());
- //setSelection(new StructuredSelection(fsr),true);
- } else {
- Object data = parentRefItem.getData();
- if (data instanceof ISystemFilterContainerReference) {
- ISystemFilterContainerReference sfcr = (ISystemFilterContainerReference) data;
- ISystemFilterReference sfr = sfcr.getSystemFilterReference(ss, filter);
- createTreeItem(parentRefItem, sfr, event.getPosition());
- } else // hmm, could be parent is a subsystem, child is a filter in no-show-filter-pools mode
- {
- if (data instanceof ISystemFilterPoolReferenceManagerProvider) // that's a subsystem!
- {
- ISystemFilterPoolReferenceManagerProvider sfprmp = (ISystemFilterPoolReferenceManagerProvider) data;
- ISystemFilterPoolReferenceManager sfprm = sfprmp.getSystemFilterPoolReferenceManager();
- ISystemFilterReference sfr = sfprm.getSystemFilterReference(ss, filter);
- createTreeItem(parentRefItem, sfr, sfprm.getSystemFilterReferencePosition(sfr));
- }
- }
- }
- //refresh(parentRefItem.getData());
- }
-
- // STEP 4: DECIDE WHAT TO SELECT:
-
- // 4a. ADD ... only select if parent of new filter was previously selected...
- if (add && isSelected(parentRefItem.getData(), oldSelections)) {
- if (debug) logDebugMsg(".........that parent was previously selected"); //$NON-NLS-1$
- // .... YES, SO SELECT NEW FILTER'S REFERENCE
- Item filterItem = (Item) internalFindReferencedItem(parentRefItem, afilterstring ? (Object) filterstring : (Object) filter, 1); // start at filter's parent, search for filter
- if (filterItem == null) {
- if (debug) logDebugMsg("Hmm, didn't find new filter's reference!"); //$NON-NLS-1$
- } else {
- if (debug) logDebugMsg(".........Trying to set selection to " + filterItem.getData()); //$NON-NLS-1$
- setSelection(new StructuredSelection(filterItem.getData()), true);
- }
- }
- // 4b. DELETE ... select parent if deleted filter was previously selected
- else if (delete && wasSelected) {
- setSelection(new StructuredSelection(parentRefItem.getData())); // select parent
- }
- // 4c. MOVE ... only select if any of moved references were previously selected...
- else if (move && wasSelected && !afilterstring) {
- ISystemFilter[] filters = (ISystemFilter[]) event.getMultiSource();
- if (filters != null) {
- ISystemFilterReference[] newRefs = new ISystemFilterReference[filters.length];
- for (int idx = 0; idx < newRefs.length; idx++) {
- Widget w = internalFindReferencedItem(parentRefItem, filters[idx], 1);
- newRefs[idx] = (ISystemFilterReference) ((Item) w).getData();
- }
- setSelection(new StructuredSelection(newRefs), true);
- }
- } else if (move && wasSelected && afilterstring) {
- ISystemFilterString[] filterStrings = (ISystemFilterString[]) event.getMultiSource();
- if (filterStrings != null) {
- ISystemFilterStringReference[] newRefs = new ISystemFilterStringReference[filterStrings.length];
- for (int idx = 0; idx < newRefs.length; idx++) {
- Widget w = internalFindReferencedItem(parentRefItem, filterStrings[idx], 1);
- newRefs[idx] = (ISystemFilterStringReference) ((Item) w).getData();
- }
- setSelection(new StructuredSelection(newRefs), true);
- }
- }
-
- } else if (debug) logDebugMsg("Did not find parent ref " + parent); //$NON-NLS-1$
- }
-
- /**
- * Move existing items a given number of positions within the same node.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- */
- protected void moveReferencedTreeItems(Widget parentItem, Object[] masterSrc, int delta) {
- int[] oldPositions = new int[masterSrc.length];
- Item[] oldItems = new Item[masterSrc.length];
- Object[] src = new Object[masterSrc.length];
-
- for (int idx = 0; idx < src.length; idx++) {
- oldItems[idx] = (Item) internalFindReferencedItem(parentItem, masterSrc[idx], 1);
- src[idx] = oldItems[idx].getData();
- }
- Item[] children = null;
- if (parentItem instanceof Item) {
- children = getItems((Item) parentItem);
- } else
- children = getChildren(parentItem);
-
- for (int idx = 0; idx < src.length; idx++) {
- oldPositions[idx] = getTreeItemPosition(oldItems[idx], children) + 1;
- //logDebugMsg("::: Old position : " + oldPositions[idx]);
- }
-
- if (delta > 0) // moving down, process backwards
- {
- for (int idx = src.length - 1; idx >= 0; idx--) {
- //logDebugMsg("DN: Old position : " + oldPositions[idx] + ", new position : " + (oldPositions[idx]+delta));
- moveTreeItem(parentItem, oldItems[idx], src[idx], oldPositions[idx] + delta);
- }
- } else // moving up, process forewards
- {
- for (int idx = 0; idx < src.length; idx++) {
- //logDebugMsg("UP: Old position : " + oldPositions[idx] + ", new position : " + (oldPositions[idx]+delta-1));
- moveTreeItem(parentItem, oldItems[idx], src[idx], oldPositions[idx] + delta - 1);
- }
- }
- }
-
- /**
- * Recursively tries to find a reference to the given referenced item
- *
- * @param parent the parent item at which to start the search.
- * @param element the master element to which we want to find a tree item which references it
- * @param searchLimit how deep to search
- */
- protected Widget internalFindReferencedItem(Widget parent, Object element, int searchLimit) {
- previousItem = null;
- searchDepth = 0;
- return recursiveInternalFindReferencedItem(parent, element, searchLimit);
- }
-
- /**
- * Recursively tries to find a reference the given filtercontainer
- * Limits search depth to when we find an item that is not a connection,
- * subsystem, filter pool, filter or filter string.
- * @param parent the parent item at which to start the search.
- * @param element the master element to which we want to find a tree item which references it
- * @param searchLimit how deep to search
- */
- protected Widget recursiveInternalFindReferencedItem(Widget parent, Object element, int searchLimit) {
- // compare with node
- Object data = parent.getData();
- if ((data != null) && (data instanceof IRSEBaseReferencingObject)) {
- IRSEBaseReferencingObject refingData = (IRSEBaseReferencingObject) data;
- Object refedData = refingData.getReferencedObject();
- //logDebugMsg("data is a refing obj to " + refingData);
- if (refedData == element)
- //if (refedData.equals(element))
- return parent;
- else
- previousItem = parent;
- }
- // recurse over children if we are listing a subsystem or connection or
- // filter framework reference object, and nesting limit not reached.
- if (((data instanceof ISubSystem) || (data instanceof IHost) || (data instanceof ISystemFilterContainer) || (data instanceof ISystemFilterContainerReference) || (data instanceof ISystemFilterStringReference))
- && (searchDepth < searchLimit)) {
- ++searchDepth;
- int oldDepth = searchDepth;
- Item[] items = getChildren(parent);
- for (int i = 0; (i < items.length); i++) {
- Widget o = recursiveInternalFindReferencedItem(items[i], element, searchLimit);
- if (o != null) return o;
- searchDepth = oldDepth;
- }
- }
- return null;
- }
-
- /**
- * Recursively tries to find an item starting at the given item.
- * (base viewer classes do not offer a relative search!)
- *
- * @param parent the parent item at which to start the search.
- * @param element the element to match on. Matches on "==" versus equals()
- */
- protected Widget internalFindRelativeItem(Widget parent, Object element, int searchLimit) {
- searchDepth = 0;
- return recursiveInternalFindRelativeItem(parent, element, searchLimit);
- }
-
- /**
- * Recursively tries to find an item starting at the given item.
- * (base viewer classes do not offer a relative search!)
- *
- * @param parent the parent item at which to start the search.
- * @param element the element to match on. Matches on "==" versus equals()
- */
- protected Widget recursiveInternalFindRelativeItem(Widget parent, Object element, int searchLimit) {
- // compare with node
- Object data = parent.getData();
- if ((data != null) && (data == element)) return parent;
- // recurse over children
- if (searchDepth < searchLimit) {
- ++searchDepth;
- int oldDepth = searchDepth;
- Item[] items = getChildren(parent);
- for (int i = 0; i < items.length; i++) {
- Widget o = recursiveInternalFindRelativeItem(items[i], element, searchLimit);
- if (o != null) return o;
- searchDepth = oldDepth;
- }
- }
- return null;
- }
-
- protected ISystemRemoteElementAdapter getRemoteData(Item item, Object rawData) {
- if (rawData != null)
- return getRemoteAdapter(rawData);
- else
- return null;
- }
-
- /**
- * Find the first binary-match or name-match of remote object, given its absolute name.
- * @param remoteObjectName The absolute name of the remote object to find.
- * @param subsystem The subsystem of the remote object to find. Optional.
- * @param parentItem The parent item at which to start the search. Optional.
- * @return TreeItem hit if found
- */
- public Item findFirstRemoteItemReference(String remoteObjectName, ISubSystem subsystem, Item parentItem) {
- //Vector matches = new Vector();
- Item match = null;
- if (parentItem == null)
- //findAllRemoteItemReferences(remoteObjectName, null, subsystem, matches);
- match = internalFindFirstRemoteItemReference(remoteObjectName, null, subsystem);
- else {
- //recursiveFindAllRemoteItemReferences(parentItem, remoteObjectName, null, subsystem, matches);
- match = recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, null, subsystem);
- if (debugRemote) System.out.println("Returning " + match + " from findFirstRemoteItemReference(1,2,3)"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- //if (matches.size() > 0)
- // return (Item)matches.elementAt(0);
- //else
- // return null;
- return match;
- }
-
- /**
- * Find the first binary-match or name-match of a remote object, given its binary object.
- * @param remoteObject - The remote object to find.
- * @param parentItem - Optionally, the parent item to start the search at
- * @return TreeItem hit if found
- */
- public Item findFirstRemoteItemReference(Object remoteObject, Item parentItem) {
- //Vector matches = new Vector();
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(remoteObject);
- if (adapter == null) return null;
- Item match = null;
- ISubSystem subsystem = adapter.getSubSystem(remoteObject);
- String remoteObjectName = adapter.getAbsoluteName(remoteObject);
- if (parentItem == null)
- //findAllRemoteItemReferences(remoteObjectName, remoteObject, subsystem, matches);
- match = internalFindFirstRemoteItemReference(remoteObjectName, remoteObject, subsystem);
- else {
- //recursiveFindAllRemoteItemReferences(parentItem, remoteObjectName, remoteObject, subsystem, matches);
- match = recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, remoteObject, subsystem);
- if (debugRemote) System.out.println("Returning " + match + " from findFirstRemoteItemReference(1,2)"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- //if (matches.size() > 0)
- // return (Item)matches.elementAt(0);
- //else
- // return null;
- return match;
- }
-
- /**
- * Recursively tries to find a given remote object. Since the object memory object
- * for a remote object is not dependable we call getAbsoluteName() on the adapter to
- * do the comparisons. Note this does not take into account the parent connection or
- * subsystem or filter, hence you must know where to start the search, else you risk
- * finding the wrong one.
- *
- * @param element the remote object to which we want to find a tree item which references it. Can be a string or an object
- * @param elementObject the actual remote element to find, for binary matching, optionally for cases when element is a string
- * @param matches the vector to populate with hits
- */
- protected Vector findAllRemoteItemReferences(Object element, Object elementObject, Vector matches) {
- String searchString = null;
- ISubSystem subsystem = null;
- if (element instanceof String)
- searchString = (String) element;
- else {
- if (elementObject == null) elementObject = element;
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(element);
- if (adapter == null) return matches;
- subsystem = adapter.getSubSystem(element);
- searchString = adapter.getAbsoluteName(element);
- }
- Tree tree = getTree();
- Item[] roots = tree.getItems();
- if (roots == null) return matches;
- if (matches == null) matches = new Vector();
- for (int idx = 0; idx < roots.length; idx++) {
- matches = recursiveFindAllRemoteItemReferences(roots[idx], searchString, elementObject, subsystem, matches);
- }
- return matches;
- }
-
- /**
- * Recursively tries to find all occurrences of a given remote object, starting at the tree root.
- * Since the object memory object for a remote object is not dependable we call getAbsoluteName()
- * on the adapter to do the comparisons.
- * <p>
- * This overload takes a string and a subsystem.
- *
- * @param searchString the absolute name of the remote object to which we want to find a tree item which references it.
- * @param elementObject the actual remote element to find, for binary matching
- * @param subsystem optional subsystem to search within
- * @param matches the vector to populate with hits
- */
- protected Vector findAllRemoteItemReferences(String searchString, Object elementObject, ISubSystem subsystem, Vector matches) {
- Tree tree = getTree();
- Item[] roots = tree.getItems();
- if (roots == null) return matches;
- if (matches == null) matches = new Vector();
- for (int idx = 0; idx < roots.length; idx++)
- matches = recursiveFindAllRemoteItemReferences(roots[idx], searchString, elementObject, subsystem, matches);
- return matches;
- }
-
- /**
- * Recursively tries to find the first occurrence of a given remote object, starting at the tree root.
- * Optionally scoped to a specific subsystem.
- * Since the object memory object for a remote object is not dependable we call getAbsoluteName()
- * on the adapter to do the comparisons.
- * <p>
- * This overload takes a string and a subsystem.
- *
- * @param searchString the absolute name of the remote object to which we want to find a tree item which references it.
- * @param elementObject the actual remote element to find, for binary matching
- * @param subsystem optional subsystem to search within
- * @return TreeItem hit if found
- */
- protected Item internalFindFirstRemoteItemReference(String searchString, Object elementObject, ISubSystem subsystem) {
- Item[] roots = getTree().getItems();
- if ((roots == null) || (roots.length == 0)) return null;
- Item match = null;
- if (debugRemote) {
- System.out.println("Inside internalFindFirstRemoteItemReference for searchString: " + searchString + ", subsystem null? " + (subsystem == null) + ", nbr roots = " + roots.length); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- for (int idx = 0; (match == null) && (idx < roots.length); idx++) {
- match = recursiveFindFirstRemoteItemReference(roots[idx], searchString, elementObject, subsystem);
- if (debugRemote) System.out.println("...Inside internalFindFirstRemoteItemReference. Result of searching root " + idx + ": " + roots[idx].getText() + ": " + match); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- if (debugRemote) {
- System.out.println("...Inside internalFindFirstRemoteItemReference. Returning " + match); //$NON-NLS-1$
- if (match != null) System.out.println("......set bp here"); //$NON-NLS-1$
- }
- return match;
- }
-
- /**
- * Recursively tries to find all references to a remote object.
- * @param parent the parent item at which to start the search.
- * @param elementName the absolute name of the remote element to find
- * @param elementObject the actual remote element to find, for binary matching
- * @param subsystem optional subsystem to search within
- * @param occurrences the vector to populate with hits
- */
- protected Vector recursiveFindAllRemoteItemReferences(Item parent, String elementName, Object elementObject, ISubSystem subsystem, Vector occurrences) {
- Object rawData = parent.getData();
- ISystemRemoteElementAdapter remoteAdapter = null;
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
- if (rawData != null) remoteAdapter = getRemoteAdapter(rawData);
- // -----------------------------------------------------------------------
- // if this is a remote object, test if it is the one we are looking for...
- // -----------------------------------------------------------------------
- if (remoteAdapter != null) {
- // first test for binary match
- if (elementObject == rawData) {
- occurrences.addElement(parent); // found a match!
- if (debugRemote) System.out.println("Find All: Remote item binary match found"); //$NON-NLS-1$
- return occurrences; // no point in checking the kids
- }
- // now test for absolute name match
- String fqn = remoteAdapter.getAbsoluteName(rawData);
- if (debugRemote) System.out.println("TESTING FINDALL: '" + fqn + "' vs '" + elementName + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if ((fqn != null) && fqn.equals(elementName)) {
- occurrences.addElement(parent); // found a match!
- if (debugRemote) System.out.println("...and remote item name match found"); //$NON-NLS-1$
- return occurrences; // no point in checking the kids
- }
- }
- // -------------------------------------------------------------------------
- // if we have been given a subsystem to restrict to, that is a hint to us...
- // -------------------------------------------------------------------------
- else if ((rawData != null) && (subsystem != null)) // test for hints we are in the wrong place
- {
- // if we are currently visiting a subsystem, and that subsystem is not from the same
- // factory, then we can assume the remote object occurrences we are looking for are
- // not to be found within this branch...
- if ((rawData instanceof ISubSystem) && (((ISubSystem) rawData).getSubSystemConfiguration() != subsystem.getSubSystemConfiguration())) {
- return occurrences; // they don't match, so don't bother checking the kids
- }
- // if we are currently visiting a connection, and that connection's hostname is not the same
- // as that of our given subsystem, then we can assume the remote object occurrences we are
- // looking for are not to be found within this branch...
- else if ((rawData instanceof IHost) && (!((IHost) rawData).getHostName().equals(subsystem.getHost().getHostName()))) {
- return occurrences; // they don't match, so don't bother checking the kids
- }
- }
- // recurse over children
- Item[] items = getChildren(parent);
- for (int i = 0; (i < items.length); i++) {
- if (!items[i].isDisposed()) occurrences = recursiveFindAllRemoteItemReferences(items[i], elementName, elementObject, subsystem, occurrences);
- }
- return occurrences;
- }
-
- /**
- * Recursively tries to find the first references to a remote object.
- * This search is restricted to the given subsystem, if given.
- * @param parent the parent item at which to start the search.
- * @param elementName the absolute name of the remote element to find
- * @param elementObject the actual remote element to find, for binary matching
- * @param subsystem optional subsystem to search within
- * @return TreeItem match if found, null if not found.
- */
- protected Item recursiveFindFirstRemoteItemReference(Item parent, String elementName, Object elementObject, ISubSystem subsystem) {
- Object rawData = parent.getData();
- ISystemRemoteElementAdapter remoteAdapter = null;
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
- if (rawData != null) remoteAdapter = getRemoteAdapter(rawData);
- // -----------------------------------------------------------------------
- // if this is a remote object, test if it is the one we are looking for...
- // -----------------------------------------------------------------------
- if (remoteAdapter != null) {
- // first test for binary match
- if (elementObject == rawData) {
- if (debugRemote) System.out.println("Remote item binary match found"); //$NON-NLS-1$
- return parent; // return the match
- }
- // now test for absolute name match
- String fqn = remoteAdapter.getAbsoluteName(rawData);
- if (debugRemote) System.out.println("TESTING FINDFIRST: '" + fqn + "' vs '" + elementName + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if ((fqn != null) && fqn.equals(elementName)) {
- if ((subsystem != null) && (subsystem == remoteAdapter.getSubSystem(rawData))) {
- if (debugRemote) System.out.println("Remote item name match found and subsystems matched"); //$NON-NLS-1$
- return parent; // return the match
- } else if (subsystem == null) {
- if (debugRemote) System.out.println("Remote item name match found and subsystem null"); //$NON-NLS-1$
- return parent;
- } else if (debugRemote) System.out.println("Remote item name match found but subsystem mismatch"); //$NON-NLS-1$
- }
- }
- // -------------------------------------------------------------------------
- // if we have been given a subsystem to restrict to, that is a hint to us...
- // -------------------------------------------------------------------------
- else if ((rawData != null) && (subsystem != null)) // test for hints we are in the wrong place
- {
- // if we are currently visiting a subsystem, and that subsystem is not from the same
- // factory, then we can assume the remote object occurrences we are looking for are
- // not to be found within this branch...
- if ((rawData instanceof ISubSystem) && (rawData != subsystem)) {
- return null; // they don't match, so don't bother checking the kids
- }
- // if we are currently visiting a connection, and that connection's hostname is not the same
- // as that of our given subsystem, then we can assume the remote object occurrences we are
- // looking for are not to be found within this branch...
- else if ((rawData instanceof IHost) && !((IHost) rawData).getHostName().equals(subsystem.getHost().getHostName())) {
- return null; // they don't match, so don't bother checking the kids
- }
- }
- // recurse over children
- Item[] items = getChildren(parent);
- Item match = null;
- for (int i = 0; (match == null) && (i < items.length); i++) {
- if (!items[i].isDisposed()) match = recursiveFindFirstRemoteItemReference(items[i], elementName, elementObject, subsystem);
- }
- return match;
- }
-
- /**
- * Recursively tries to find all filters affected by a given remote object.
- *
- * @param elementName the absolute name of the remote object to which we want to find a filters which result in it.
- * @param subsystem The subsystem which owns the remote resource. Necessary to scope the search for impacted filters.
- * @param matches the vector to populate with hits. Can be null, in which case a new vector is created.
- *
- * @return Vector of FilterMatch objects for each affected filter
- */
- protected Vector findAllRemoteItemFilterReferences(String elementName, ISubSystem subsystem, Vector matches) {
- Tree tree = getTree();
- Item[] roots = tree.getItems();
- if (roots == null) return matches;
- if (matches == null) matches = new Vector();
- for (int idx = 0; idx < roots.length; idx++)
- matches = recursiveFindAllRemoteItemFilterReferences(roots[idx], elementName, subsystem, matches);
- return matches;
-
- }
-
- /**
- * Recursively tries to find all filters which are affected by a given remote object, such that we can subsequently refresh that filter
- * after a remote resource change.
- * @param parent the parent item at which to start the search.
- * @param elementName the absolute name of the remote element that has been created, changed, deleted or renamed.
- * @param subsystem The subsystem which owns the remote resource. Necessary to scope the search for impacted filters.
- * @param occurrences the vector to populate with hits
- *
- * @return Vector of FilterMatch objects for each affected filter
- */
- protected Vector recursiveFindAllRemoteItemFilterReferences(Item parent, String elementName, ISubSystem subsystem, Vector occurrences) {
- Object rawData = parent.getData();
-
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
-
- // ---------------------------------------------------------------------
- // if this is a filter object, test for two things:
- // #1. does this filter list this remote object if expanded/refreshed?
- // #2. does this filter list the contents of this remote object?
- // ---------------------------------------------------------------------
- if (rawData instanceof ISystemFilterReference) {
- ISystemFilterReference filterRef = (ISystemFilterReference) rawData;
- if (filterRef.getReferencedFilter().isPromptable()) return occurrences;
- if (debugRemote) System.out.println("Testing filter: " + filterRef.getReferencedFilter().getName()); //$NON-NLS-1$
- ISubSystem fss = (ISubSystem) filterRef.getProvider();
- if (fss != null) // should never happen!!
- {
- // #1
- if (fss.doesFilterMatch(filterRef.getReferencedFilter(), elementName)) {
- occurrences.addElement(new FilterMatch((TreeItem) parent, true)); // found a match!
- if (debugRemote) System.out.println("...Filter match found for " + elementName + ": " + filterRef.getReferencedFilter().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- return occurrences; // no point in checking the kids
- }
- // #2
- else if (fss.doesFilterListContentsOf(filterRef.getReferencedFilter(), elementName)) {
- occurrences.addElement(new FilterMatch((TreeItem) parent, false)); // found a match!
- if (debugRemote) System.out.println("...Filter content match found for " + elementName + ": " + filterRef.getReferencedFilter().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- return occurrences; // no point in checking the kids
- } else if (debugRemote) System.out.println("... no match on the filter for element name " + elementName); //$NON-NLS-1$
- }
- }
- // ----------------------------------------------------------------------
- // if this is not a filter, then before recursing on its kids, check for
- // hints that such recursion is a waste of time, for performance reasons
- // ----------------------------------------------------------------------
- else if (rawData != null) {
- // ---------------------------------------------------------------------------------
- // if we are currently visiting a subsystem, and that subsystem is not from the same
- // factory, then we can assume the remote object occurrences we are looking for are
- // not to be found within this branch...
- // ---------------------------------------------------------------------------------
- if ((rawData instanceof ISubSystem) && (subsystem != null)) {
- ISubSystem currSS = (ISubSystem) rawData;
- if (currSS.getSubSystemConfiguration() != subsystem.getSubSystemConfiguration()) return occurrences; // they don't match, so don't bother checking the kids
- }
- // -----------------------------------------------------------------------------------------
- // if we are currently visiting a connection, and that connection's hostname is not the same
- // as that of our given subsystem, then we can assume the remote object occurrences we are
- // looking for are not to be found within this branch...
- // -----------------------------------------------------------------------------------------
- else if (rawData instanceof IHost) {
- IHost currConn = (IHost) rawData;
- if (!currConn.getHostName().equals(subsystem.getHost().getHostName())) return occurrences; // they don't match, so don't bother checking the kids
- }
- // skip the new connection prompts...
- else if (rawData instanceof ISystemPromptableObject)
- return occurrences;
- // ------------------------------------------------------------------------
- // if this is a remote object, we are too deep into this branch of the tree
- // for filters, so stop here
- // ------------------------------------------------------------------------
- else if (getRemoteAdapter(rawData) != null) return occurrences;
- }
- // recurse over children
- Item[] items = getChildren(parent);
- for (int i = 0; (i < items.length); i++) {
- occurrences = recursiveFindAllRemoteItemFilterReferences(items[i], elementName, subsystem, occurrences);
- }
- return occurrences;
- }
-
- /**
- * Inner class to ensapsulate what is put in the vector for the recursiveFindAllRemoteItemFilterReferences() method.
- */
- protected class FilterMatch {
- protected boolean filterListsElement;
- protected boolean filterListsElementContents;
- protected TreeItem match;
-
- FilterMatch(TreeItem match, boolean filterListsElement) {
- this.match = match;
- this.filterListsElement = filterListsElement;
- this.filterListsElementContents = !filterListsElement;
- }
-
- boolean listsElement() {
- return filterListsElement;
- }
-
- boolean listsElementContents() {
- return filterListsElementContents;
- }
-
- TreeItem getTreeItem() {
- return match;
- }
- }
-
- /**
- * --------------------------------------------------------------------------------
- * For many actions we have to walk the selection list and examine each selected
- * object to decide if a given common action is supported or not.
- * <p>
- * Walking this list multiple times while building the popup menu is a performance
- * hit, so we have this common method that does it only once, setting instance
- * variables for all of the decisions we are in interested in.
- * --------------------------------------------------------------------------------
- */
- protected void scanSelections(String whereFrom) {
- //System.out.println("inside scanSelections. Called from " + whereFrom);
- // here are the instance variables we set...
- // protected boolean selectionShowRefreshAction;
- // protected boolean selectionShowOpenViewActions;
- // protected boolean selectionShowDeleteAction;
- // protected boolean selectionShowRenameAction;
- // protected boolean selectionIsRemoteObject;
- // protected boolean selectionEnableDeleteAction;
- // protected boolean selectionEnableRenameAction;
-
-
- // initial these variables to true. Then if set to false even once, leave as false always...
- selectionShowRefreshAction = true;
- selectionShowOpenViewActions = true;
- selectionShowGenericShowInTableAction = true;
- selectionShowDeleteAction = true;
- selectionShowRenameAction = true;
- selectionEnableDeleteAction = true;
- selectionEnableRenameAction = true;
- selectionIsRemoteObject = true;
-
- selectionHasAncestorRelation = hasAncestorRelationSelection();
-
-
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- SystemRemoteElementResourceSet lastSet = null;
- while (elements.hasNext()) {
-
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (adapter == null) continue;
-
- if (selectionShowRefreshAction) selectionShowRefreshAction = adapter.showRefresh(element);
-
- if (selectionShowOpenViewActions) selectionShowOpenViewActions = adapter.showOpenViewActions(element);
-
- if (selectionShowGenericShowInTableAction) selectionShowGenericShowInTableAction = adapter.showGenericShowInTableAction(element);
-
- if (selectionShowDeleteAction) selectionShowDeleteAction = adapter.showDelete(element);
-
- if (selectionShowRenameAction) selectionShowRenameAction = adapter.showRename(element);
-
- if (selectionEnableDeleteAction) selectionEnableDeleteAction = selectionShowDeleteAction && adapter.canDelete(element) && !selectionHasAncestorRelation;
- //System.out.println("ENABLE DELETE SET TO " + selectionEnableDeleteAction);
-
- if (selectionEnableRenameAction) selectionEnableRenameAction = selectionShowRenameAction && adapter.canRename(element);
-
- if (selectionIsRemoteObject) selectionIsRemoteObject = (getRemoteAdapter(element) != null);
-
- if (selectionIsRemoteObject && !selectionFlagsUpdated) {
- ISubSystem srcSubSystem = adapter.getSubSystem(element);
- if (srcSubSystem.isConnected() || element instanceof ISystemFilterReference || element instanceof ISubSystem)
- {
- SystemRemoteElementResourceSet set = null;
- if (lastSet != null)
- {
- if (lastSet.getAdapter() == adapter && lastSet.getSubSystem() == srcSubSystem)
- {
- set = lastSet;
- }
- }
- if (set == null)
- {
- set = getSetFor(srcSubSystem, adapter);
- lastSet = set;
- }
- set.addResource(element);
- }
- }
-
- }
-
-
- selectionFlagsUpdated = true;
- //System.out.println("Inside scan selections: selectionShowOpenViewActions = " + selectionShowOpenViewActions);
-
- }
-
- /**
- * Decides whether to even show the refresh menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showRefresh() {
- return selectionShowRefreshAction;
- /*
- boolean ok = true;
- IStructuredSelection selection= (IStructuredSelection)getSelection();
- Iterator elements= selection.iterator();
- int count = 0;
- while (ok && elements.hasNext())
- {
- Object element= elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (!adapter.showRefresh(element))
- ok = false;
- }
- return ok;
- */
- }
-
- /**
- * Decides whether to even show the "open in new perspective" menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showOpenViewActions() {
- return selectionShowOpenViewActions;
- }
-
- /**
- * Decides whether to even show the generic "show in table" menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showGenericShowInTableAction() {
- return selectionShowGenericShowInTableAction;
- }
-
- /**
- * Decides whether all the selected objects are remote objects or not
- * Assumes scanSelections() has already been called
- */
- protected boolean areSelectionsRemote() {
- return selectionIsRemoteObject;
- }
-
- // ---------------------------
- // ISYSTEMDELETETARGET METHODS
- // ---------------------------
-
- /**
- * Required method from ISystemDeleteTarget.
- * Decides whether to even show the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showDelete() {
- if (!selectionFlagsUpdated) {
- //System.out.println("Inside showDelete. selectFlagsUpdated = false");
- scanSelections("showDelete"); //$NON-NLS-1$
- }
- return selectionShowDeleteAction;
- }
-
- /**
- * Required method from ISystemDeleteTarget
- * Decides whether to enable the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canDelete() {
- if (!selectionFlagsUpdated) {
- //System.out.println("Inside canDelete. selectFlagsUpdated = false");
- scanSelections("canDelete"); //$NON-NLS-1$
- }
- return selectionEnableDeleteAction;
- }
-
- /**
- * Required method from ISystemDeleteTarget
- */
- public boolean doDelete(IProgressMonitor monitor) {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- //int selectedCount = selection.size();
- //Object multiSource[] = new Object[selectedCount];
- //int idx = 0;
- Object element = null;
- //Object parentElement = getSelectedParent();
- ISystemViewElementAdapter adapter = null;
- boolean ok = true;
- boolean anyOk = false;
- Vector deletedVector = new Vector();
-
- // keep track of the current set
- SystemRemoteElementResourceSet set = null;
-
- try {
- while (ok && elements.hasNext()) {
- element = elements.next();
- //multiSource[idx++] = element;
- adapter = getAdapter(element);
- if (getRemoteAdapter(element) != null) continue;
- ok = adapter.doDelete(getShell(), element, monitor);
- if (ok) {
- anyOk = true;
- deletedVector.addElement(element);
- }
- }
- // now we have things divided into sets
- // delete 1 set at a time
- for (int s = 0; s < _setList.size() && ok; s++) {
- set = (SystemRemoteElementResourceSet) _setList.get(s);
- ISubSystem srcSubSystem = set.getSubSystem();
- ISystemViewElementAdapter srcAdapter = set.getAdapter();
-
- if (srcSubSystem != null) {
-
- // this call can throw an exception
- ok = srcAdapter.doDeleteBatch(getShell(), set.getResourceSet(), monitor);
-
- if (ok) {
- anyOk = true;
- deletedVector.addAll(set.getResourceSet());
- }
- }
- }
- } catch (SystemMessageException exc) {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- } catch (Exception exc) {
- String msg = exc.getMessage();
- if ((msg == null) || (exc instanceof ClassCastException)) msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg));
-
- // refresh all parents if selection is remote objects
- if (selectionIsRemoteObject) {
-
- // we only need to iterate over the last set in the list of sets since presumably the sets before did not cause any exceptions
- // if elements in the list before were deleted successfully, then the code after this catch block will handle them (by firing delete events)
- // for the current set that caused the exception, we refresh the parents of the elements in the set (since we don't know which
- // elements in the set may have been deleted successfully before the exception occurred).
- if (set != null) {
- List list = set.getResourceSet();
-
- if (list != null && list.size() > 0) {
-
- Iterator iter = list.iterator();
-
- Vector refreshedList = new Vector();
-
- while (iter.hasNext()) {
- Object obj = iter.next();
- ISystemViewElementAdapter adp = getAdapter(obj);
- Object parent = adp.getParent(obj);
-
- if ((parent != null) && !(refreshedList.contains(parent))) {
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(parent, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null);
- sr.fireEvent(event);
- refreshedList.add(parent);
- }
- }
- }
- }
- }
-
- ok = false;
- }
- //System.out.println("in doDelete. Any ok? " + anyOk + ", selectionIsRemoteObject? " + selectionIsRemoteObject);
- if (anyOk) {
- if (selectionIsRemoteObject)
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, deletedVector, null, null, null, this);
- else {
- Object[] deleted = new Object[deletedVector.size()];
- for (int idx = 0; idx < deleted.length; idx++)
- deleted[idx] = deletedVector.elementAt(idx);
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(deleted, ISystemResourceChangeEvents.EVENT_DELETE_MANY, getSelectedParent()));
- }
- }
- return ok;
- }
-
- // ---------------------------
- // ISYSTEMRENAMETARGET METHODS
- // ---------------------------
-
- /**
- * Required method from ISystemRenameTarget.
- * Decides whether to even show the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showRename() {
- return selectionShowRenameAction;
- }
-
- /**
- * Required method from ISystemRenameTarget
- * Decides whether to enable the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canRename() {
- if (!selectionFlagsUpdated) scanSelections("canRename"); //$NON-NLS-1$
- return selectionEnableRenameAction;
- }
-
- /**
- * Required method from ISystemRenameTarget
- */
- public boolean doRename(String[] newNames) {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- Object element = null;
- Object parentElement = getSelectedParent();
- ISystemViewElementAdapter adapter = null;
- ISystemRemoteElementAdapter remoteAdapter = null;
- String oldFullName = null;
- boolean ok = true;
- try {
- int nameIdx = 0;
- while (ok && elements.hasNext()) {
- element = elements.next();
- adapter = getAdapter(element);
- remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter != null) oldFullName = remoteAdapter.getAbsoluteName(element); // pre-rename
- ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
- if (ok) {
- if (remoteAdapter != null)
- {
- ISubSystem ss = adapter.getSubSystem(element);
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, ss, oldFullName, this);
- }
-
- else
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
- }
- }
- } catch (SystemMessageException exc) {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- } catch (Exception exc) {
- //String msg = exc.getMessage();
- //if ((msg == null) || (exc instanceof ClassCastException))
- // msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), //msg),
- exc);
- ok = false;
- }
- return ok;
- }
-
- protected void logDebugMsg(String msg) {
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),msg);
- msg = this.getClass().getName() + ": " + msg; //$NON-NLS-1$
- SystemBasePlugin.logInfo(msg);
- System.out.println(msg);
- }
-
- // -----------------------------------------------------------------
- // ISystemSelectAllTarget methods to facilitate the global action...
- // -----------------------------------------------------------------
- /**
- * Return true if select all should be enabled for the given object.
- * For a tree view, you should return true if and only if the selected object has children.
- * You can use the passed in selection or ignore it and query your own selection.
- */
- public boolean enableSelectAll(IStructuredSelection selection) {
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items == null) || (items.length != 1)) // only allow for single selections
- return false;
-
- TreeItem ti = items[0];
- int count = getItemCount(ti);
- if (count == 1) // is it a dummy?
- {
- if ((getItems(ti)[0]).getData() == null) count = 0; // assume a dummy
- }
- return (count > 0);
- }
-
- /**
- * When this action is run via Edit->Select All or via Ctrl+A, perform the
- * select all action. For a tree view, this should select all the children
- * of the given selected object. You can use the passed in selected object
- * or ignore it and query the selected object yourself.
- */
- public void doSelectAll(IStructuredSelection selection) {
- Tree tree = getTree();
- TreeItem[] currSel = tree.getSelection();
- TreeItem[] childItems = currSel[0].getItems();
- if (childItems.length == 0) return;
- tree.setSelection(childItems);
- Object[] childObjects = new Object[childItems.length];
- for (int idx = 0; idx < childObjects.length; idx++)
- childObjects[idx] = childItems[idx].getData();
- fireSelectionChanged(new SelectionChangedEvent(this, new StructuredSelection(childObjects)));
- }
-
- // --------------------------------------------
- // ISystemTree methods to facilitate our GUI...
- // --------------------------------------------
- /**
- * This is called to ensure all elements in a multiple-selection have the same parent in the
- * tree viewer. If they don't we automatically disable all actions.
- * <p>
- * Designed to be as fast as possible by going directly to the SWT widgets
- */
- public boolean sameParent() {
- boolean same = true;
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items == null) || (items.length == 0)) return true;
- TreeItem prevParent = null;
- TreeItem currParent = null;
- for (int idx = 0; same && (idx < items.length); idx++) {
- currParent = items[idx].getParentItem();
- if ((idx > 0) && (currParent != prevParent))
- same = false;
- else {
- prevParent = currParent;
- }
- }
- return same;
- }
-
- protected boolean selectionHasAncestryRelationship() {
- if (selectionFlagsUpdated) return selectionHasAncestorRelation;
-
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- return hasSelectedAncestor(items);
- /*
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
-
- for (int idx = 0; idx < items.length; idx++) {
- TreeItem item = items[idx];
- // for (int c = 0; c < items.length; c++) {
- // if (item != items[c]) {
- if (isAncestorOf(item, items)) {
- return true;
- }
-// }
- // }
- }
- return false;
- */
- }
-
- protected boolean isAncestorOf(TreeItem container, TreeItem[] items) {
- TreeItem[] children = container.getItems();
- for (int i = 0; i < children.length; i++) {
- TreeItem child = children[i];
- for (int j = 0; j < items.length; j++)
- {
- TreeItem item = items[j];
- if (child == item) {
- return true;
- }
- else if (child.getItemCount() > 0)
- {
- if (isAncestorOf(child, items))
- {
- return true;
- }
- }
- }
- }
- return false;
- }
-
-
- protected boolean hasSelectedAncestor(TreeItem[] items) {
-
- List cleanParents = new ArrayList();
-
- for (int j = 0; j < items.length; j++)
- {
- TreeItem item = items[j];
- TreeItem parent = item.getParentItem();
- while (parent != null && !cleanParents.contains(parent))
- {
- if (isTreeItemSelected(parent))
- {
- return true;
- }
- else
- {
- cleanParents.add(parent);
- parent = parent.getParentItem();
- }
- }
- }
- return false;
- }
-
-
-
-
-
-
-/*
- protected boolean isAncestorOf(TreeItem container, TreeItem item) {
- TreeItem[] children = container.getItems();
- for (int i = 0; i < children.length; i++) {
- TreeItem child = children[i];
- if (child == item) {
- return true;
- } else if (child.getItemCount() > 0) {
- if (isAncestorOf(child, item)) {
- return true;
- }
- }
- }
- return false;
- }
-*/
-
- /**
- * This is called to accurately get the parent object for the current selection
- * for this viewer.
- * <p>
- * The getParent() method in the adapter is very unreliable... adapters can't be sure
- * of the context which can change via filtering and view options.
- */
- public Object getSelectedParent() {
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items == null) || (items.length == 0)) {
- return tree.getData();
- } else {
- TreeItem parentItem = items[0].getParentItem();
- if (parentItem != null)
- return parentItem.getData();
- else
- return tree.getData();
- }
- }
-
- /**
- * Return the TreeItem of the parent of the selected node. Or null if a root is selected.
- */
- public TreeItem getSelectedParentItem() {
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items == null) || (items.length == 0)) {
- return null;
- } else {
- return items[0].getParentItem();
- }
- }
-
- /**
- * This returns the element immediately before the first selected element in this tree level.
- * Often needed for enablement decisions for move up actions.
- */
- public Object getPreviousElement() {
- Object prevElement = null;
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items != null) && (items.length > 0)) {
- TreeItem item1 = items[0];
- TreeItem[] parentItems = null;
- TreeItem parentItem = item1.getParentItem();
- if (parentItem != null)
- parentItems = parentItem.getItems();
- else
- parentItems = item1.getParent().getItems();
- if (parentItems != null) {
- TreeItem prevItem = null;
- for (int idx = 0; (prevItem == null) && (idx < parentItems.length); idx++)
- if ((parentItems[idx] == item1) && (idx > 0)) prevItem = parentItems[idx - 1];
- if (prevItem != null) prevElement = prevItem.getData();
- }
- }
- return prevElement;
- }
-
- /**
- * This returns the element immediately after the last selected element in this tree level
- * Often needed for enablement decisions for move down actions.
- */
- public Object getNextElement() {
- Object nextElement = null;
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items != null) && (items.length > 0)) {
- TreeItem itemN = items[items.length - 1];
- TreeItem[] parentItems = null;
- TreeItem parentItem = itemN.getParentItem();
- if (parentItem != null)
- parentItems = parentItem.getItems();
- else
- parentItems = itemN.getParent().getItems();
- if (parentItems != null) {
- TreeItem nextItem = null;
- for (int idx = 0; (nextItem == null) && (idx < parentItems.length); idx++)
- if ((parentItems[idx] == itemN) && (idx < (parentItems.length - 1))) nextItem = parentItems[idx + 1];
- if (nextItem != null) nextElement = nextItem.getData();
- }
- }
- return nextElement;
- }
-
- /**
- * This is called to walk the tree back up to the roots and return the visible root
- * node for the first selected object.
- */
- public Object getRootParent() {
- Tree tree = getTree();
- TreeItem[] selectedItems = tree.getSelection();
- Object rootElement = null;
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- TreeItem item = selectedItems[0];
- TreeItem parentItem = item.getParentItem();
- if (parentItem == null) // item is a root element
- rootElement = item.getData();
- else
- while (rootElement == null) {
- item = parentItem;
- parentItem = item.getParentItem();
- if (parentItem == null) // item is a root element
- rootElement = item.getData();
- }
- }
- //logDebugMsg("getRootParent returned: "+rootElement);
- return rootElement;
- }
-
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- */
- public Object[] getElementNodes(Object element) {
- Widget w = findItem(element);
- if ((w != null) && (w instanceof TreeItem)) return getElementNodes((TreeItem) w);
- return null;
- }
-
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- * This flavour is optimized for the case when you have the tree item directly.
- */
- public Object[] getElementNodes(TreeItem item) {
- Vector v = new Vector();
- v.addElement(item.getData());
- while (item != null) {
- item = item.getParentItem();
- if (item != null) v.addElement(item.getData());
- }
- Object[] nodes = new Object[v.size()];
- for (int idx = 0; idx < nodes.length; idx++)
- nodes[idx] = v.elementAt(idx);
- return nodes;
- }
-
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- * This flavour returns a vector of TreeItem objects versus element objects.
- */
- public TreeItem[] getItemNodes(TreeItem item) {
- Vector v = new Vector();
- v.addElement(item);
- while (item != null) {
- item = item.getParentItem();
- if (item != null) v.addElement(item);
- }
- TreeItem[] nodes = new TreeItem[v.size()];
- for (int idx = 0; idx < nodes.length; idx++)
- nodes[idx] = (TreeItem) v.elementAt(idx);
- return nodes;
- }
-
- /**
- * Helper method to determine if a given object is currently selected.
- * Does consider if a child node of the given object is currently selected.
- */
- public boolean isSelectedOrChildSelected(Object parentElement) {
- boolean isSelected = false;
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- Widget w = findItem(parentElement);
- if (!(w instanceof TreeItem)) return true; // assume we have been given the root, which means any selection is a child
- TreeItem item = (TreeItem) w;
- // for every selected tree item, scan upwards to the root to see if
- // it or any of its parents are the given element.
- for (int idx = 0; !isSelected && (idx < selectedItems.length); idx++) {
- if (selectedItems[idx] instanceof TreeItem) {
- if (selectedItems[idx] == item)
- isSelected = true;
- else
- isSelected = searchToRoot((TreeItem) selectedItems[idx], item);
- }
- }
- }
- return isSelected;
- //return isSelected(element, (IStructuredSelection)getSelection());
- }
-
- /**
- * Override that takes a widget.
- */
- public boolean isTreeItemSelectedOrChildSelected(Widget w) {
- boolean isSelected = false;
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- if (!(w instanceof TreeItem)) return true; // assume we have been given the root, which means any selection is a child
- TreeItem item = (TreeItem) w;
- // for every selected tree item, scan upwards to the root to see if
- // it or any of its parents are the given element.
- for (int idx = 0; !isSelected && (idx < selectedItems.length); idx++) {
- if (selectedItems[idx] instanceof TreeItem) {
- if (selectedItems[idx] == item)
- isSelected = true;
- else
- isSelected = searchToRoot((TreeItem) selectedItems[idx], item);
- }
- }
- }
- return isSelected;
- //return isSelected(element, (IStructuredSelection)getSelection());
- }
-
- /**
- * Return the number of immediate children in the tree, for the given tree node
- */
- public int getChildCount(Object element) {
- if (getTree().isDisposed()) return 0;
- Widget w = findItem(element);
- if (w == null)
- return 0;
-
- // modified patch initially provided by Tobias Schwarz
- if (w instanceof TreeItem) {
- TreeItem ti = (TreeItem) w;
- int count = getItemCount((Item) w);
- int ignoreItems = 0;
- if (count > 0) {
- Item[] items = getItems(ti);
- for (int i=0; i<count; i++) {
- Object itemData = items[i].getData();
- if (itemData==null
- || itemData instanceof SystemMessageObject
- || itemData instanceof PendingUpdateAdapter
- ) {
- ignoreItems++;
- } else {
- break;
- }
- }
- }
- return count - ignoreItems;
- }
- return getItemCount((Control) w);
- }
-
- protected Widget doFindItem(Object element) {
- // compare with root
- Object root = getRoot();
- if (root == null) {
- return null;
- }
-
- Item[] items = getChildren(getControl());
- if (items != null) {
- for (int i = 0; i < items.length; i++) {
- Widget o = findExactItem(items[i], element);
- if (o != null) {
- return o;
- }
- }
- }
- return null;
- }
- private Widget findExactItem(Item parent, Object element) {
-
- // compare with node
- Object data = parent.getData();
- if (data != null) {
- if (data == element) {
- return parent;
- }
- }
- // recurse over children
- Item[] items = getChildren(parent);
- for (int i = 0; i < items.length; i++) {
- Item item = items[i];
- Widget o = findExactItem(item, element);
- if (o != null) {
- return o;
- }
- }
- return null;
- }
-
- /**
- * Return the tree item of the first selected object
- */
- protected TreeItem getFirstSelectedTreeItem() {
- // find the selected tree item...
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems == null) || (selectedItems.length == 0) || !(selectedItems[0] instanceof TreeItem)) return null;
- return (TreeItem) selectedItems[0];
- }
-
- /**
- * Refresh the given tree item node
- */
- protected void refreshTreeItem(TreeItem item) {
- // if we are already expanded, collapse and refresh to clear memory
- if (getExpanded(item)) {
- collapseNode(item.getData(), true);
- //setExpanded(selectedItem, false);
- //refreshItem(selectedItem, selectedItem.getData());
- }
- // ok, now time to force an expand...
- createChildren(item); // re-expand. this calls the content provider, which calls the getChildren() method in the adapter. That will call us back.
- item.setExpanded(true);
- }
-
- /**
- * Called when a property is updated and we need to inform the Property Sheet viewer.
- * There is no formal mechanism for this so we simulate a selection changed event as
- * this is the only event the property sheet listens for.
- */
- public void updatePropertySheet() {
- ISelection selection = getSelection();
- if (selection == null) return;
- // create an event
- SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());
- // fire the event
- fireSelectionChanged(event);
- }
-
- /**
- * Called to select an object within the tree, and optionally expand it
- */
- public void select(Object element, boolean expand) {
- setSelection(new StructuredSelection(element), true); // true => reveal
- if (expand) setExpandedState(element, true);
- }
-
- /**
- * Returns the tree item of the first selected object. Used for setViewerItem in a resource
- * change event.
- */
- public Item getViewerItem() {
- TreeItem[] selectedItems = getTree().getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0))
- return selectedItems[0];
- else
- return null;
- }
-
- /**
- * Returns true if any of the selected items are currently expanded
- */
- public boolean areAnySelectedItemsExpanded() {
- boolean expanded = false;
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- // for every selected tree item, see if it is currently expanded...
- for (int idx = 0; !expanded && (idx < selectedItems.length); idx++) {
- if (selectedItems[idx] instanceof TreeItem) {
- if (((TreeItem) selectedItems[idx]).getExpanded()) expanded = true;
- }
- }
- }
- return expanded;
- }
-
- /**
- * Returns true if any of the selected items are expandable but not yet expanded
- */
- public boolean areAnySelectedItemsExpandable() {
- boolean expandable = false;
- Item[] selectedItems = ((Tree) getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0)) {
- // for every selected tree item, see if needs expanding...
- for (int idx = 0; !expandable && (idx < selectedItems.length); idx++) {
- if (selectedItems[idx] instanceof TreeItem) {
- if ((((TreeItem) selectedItems[idx]).getItemCount() > 0) && !((TreeItem) selectedItems[idx]).getExpanded()) expandable = true;
- }
- }
- }
- return expandable;
- }
-
- /**
- * Initialize drag and drop support for this view.
- *
- */
- protected void initDragAndDrop() {
- int ops = DND.DROP_COPY | DND.DROP_MOVE;
- Transfer[] transfers = new Transfer[] { PluginTransfer.getInstance(),
- /*ResourceTransfer.getInstance(),*/
- FileTransfer.getInstance(), EditorInputTransfer.getInstance() };
- addDragSupport(ops | DND.DROP_DEFAULT, transfers, new SystemViewDataDragAdapter(this));
- addDropSupport(ops | DND.DROP_DEFAULT, transfers, new SystemViewDataDropAdapter(this));
- }
-
- // ----------------------------------
- // Support for EXPAND TO-> ACTIONS...
- // ----------------------------------
- /**
- * Called when user selects an Expand To action to expand the selected remote object with a quick filter
- */
- public void expandTo(String filterString) {
- SystemViewPart svp = getSystemViewPart();
- if (svp == null) return;
- // find the selected tree item...
- TreeItem selectedItem = getFirstSelectedTreeItem();
- if (selectedItem == null) return;
- Object element = selectedItem.getData();
- ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter == null) return;
- // update our hashtables, keyed by object address and tree path...
- if (expandToFiltersByObject == null) expandToFiltersByObject = new Hashtable();
- if (expandToFiltersByTreePath == null) expandToFiltersByTreePath = new Hashtable();
- if (filterString != null)
- expandToFiltersByObject.put(selectedItem.getData(), filterString);
- else
- expandToFiltersByObject.remove(selectedItem.getData());
- if (filterString != null)
- expandToFiltersByTreePath.put(getItemPath(selectedItem), filterString);
- else
- expandToFiltersByTreePath.remove(getItemPath(selectedItem));
-
- // now refresh this tree item node...
- refreshTreeItem(selectedItem);
- }
-
- /**
- * Return the fully-qualified path up to the given item, expressible as a string
- */
- protected String getItemPath(TreeItem item) {
- StringBuffer idBuffer = new StringBuffer(getItemNodeID(item));
- TreeItem[] elementNodes = getItemNodes(item);
- if (elementNodes != null) {
- for (int idx = elementNodes.length - 1; idx >= 0; idx--) {
- item = elementNodes[idx];
- idBuffer.append(SystemViewPart.MEMENTO_DELIM + getItemNodeID(item));
- }
- }
- //System.out.println("MEMENTO HANDLE: " + idBuffer.toString());
- return idBuffer.toString();
- }
-
- /**
- * Return the string identifying this node in the tree
- */
- protected String getItemNodeID(TreeItem item) {
- //ISystemViewElementAdapter adapter = getAdapter(item.getData());
- //return adapter.getMementoHandle(item.getData());
- return item.getText();
- }
-
- /**
- * Callback from the input provider to test if the given node has expand-to filtering criteria
- */
- public String getExpandToFilter(Object element) {
- String filter = null;
- // for performance reasons, we first test for a binary match...
- if (expandToFiltersByObject != null) {
- filter = (String) expandToFiltersByObject.get(element);
- }
- // if binary match fails, look for tree path match...
- if ((filter == null) && (expandToFiltersByTreePath != null)) {
- Widget item = findItem(element);
- if ((item != null) && (item instanceof TreeItem)) {
- filter = (String) expandToFiltersByTreePath.get(getItemPath((TreeItem) item));
- if (filter != null) {
- if (expandToFiltersByObject == null) expandToFiltersByObject = new Hashtable();
- expandToFiltersByObject.put(element, filter); // so next time it will be faster
- }
- }
- }
- return filter;
- }
-
- /**
- * To support restoring state we need to write out to disk out current table that maps
- * tree items to their current expand-to filter. That means we need access to the table.
- */
- public Hashtable getExpandToFilterTable() {
- return expandToFiltersByTreePath;
- }
-
- /**
- * To support restoring state we need to write out to disk out current table that maps
- * tree items to their current expand-to filter. That means we need to be able to set the table.
- */
- public void setExpandToFilterTable(Hashtable ht) {
- expandToFiltersByTreePath = ht;
- }
-
- protected SystemRemoteElementResourceSet getSetFor(ISubSystem subSystem, ISystemViewElementAdapter adapter) {
- for (int i = 0; i < _setList.size(); i++) {
- SystemRemoteElementResourceSet set = (SystemRemoteElementResourceSet) _setList.get(i);
- if (set.getAdapter() == adapter && set.getSubSystem() == subSystem) {
- return set;
- }
- }
-
- // no existing set - create one
- SystemRemoteElementResourceSet newSet = new SystemRemoteElementResourceSet(subSystem, adapter);
- _setList.add(newSet);
- return newSet;
- }
-
- protected boolean usingElementMap() {
- return false;
- }
-
- public void add(Object parentElementOrTreePath, Object[] childElements) {
- assertElementsNotNull(childElements);
-
- Vector matches = new Vector();
- matches = findAllRemoteItemReferences(parentElementOrTreePath, parentElementOrTreePath, matches);
-
- // get rid of references to items for different connection
- if (parentElementOrTreePath instanceof IAdaptable)
- {
- List invalidMatches = new ArrayList();
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null)
- {
- IHost parentHost = adapter.getSubSystem(parentElementOrTreePath).getHost();
- for (int i = 0; i < matches.size(); i++)
- {
- Widget match = (Widget) matches.get(i);
- Object data = match.getData();
- if (data instanceof IAdaptable)
- {
- ISystemViewElementAdapter madapter = (ISystemViewElementAdapter)((IAdaptable)data).getAdapter(ISystemViewElementAdapter.class);
- if (madapter != null)
- {
- IHost mHost = madapter.getSubSystem(data).getHost();
- if (mHost != parentHost)
- {
- invalidMatches.add(match);
- }
- }
- }
- }
- }
-
- if (invalidMatches.size() > 0)
- {
- for (int m = invalidMatches.size() - 1; m >= 0 ; m--)
- {
- Object match = invalidMatches.get(m);
- matches.remove(match);
- }
- }
- }
-
- //Widget[] widgets = internalFindItems(parentElementOrTreePath);
- // If parent hasn't been realized yet, just ignore the add.
- if (matches.size() == 0) {
- super.add(parentElementOrTreePath, childElements);
- }
- else
- {
- for (int i = 0; i < matches.size(); i++) {
- Widget match = (Widget) matches.get(i);
- internalAdd(match, parentElementOrTreePath, childElements);
- }
- }
-
- TreeItem item = getFirstSelectedTreeItem();
- if (item != null)
- {
- if (item.getData() == parentElementOrTreePath)
- {
- updatePropertySheet();
- }
- }
-
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForConnections.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForConnections.java
deleted file mode 100644
index ed1055ee2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForConnections.java
+++ /dev/null
@@ -1,106 +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.view;
-import org.eclipse.rse.core.model.IHost;
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is used when the contents are the children of a particular connection.
- * Used when user right clicks on a connection and selects Open In New Perspective.
- */
-public class SystemViewAPIProviderForConnections
- extends SystemAbstractAPIProvider
-{
-
-
- protected IHost connection = null;
-
- /**
- * Constructor
- * @param connection The connection object we are drilling down on.
- */
- public SystemViewAPIProviderForConnections(IHost connection)
- {
- super();
- this.connection = connection;
- }
-
- /**
- * Get the input connection object.
- */
- public IHost getConnection()
- {
- return connection;
- }
- /**
- * Reset the input connection object.
- */
- public void setConnection(IHost connection)
- {
- this.connection = connection;
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * We return all subsystems for this connection
- */
- public Object[] getSystemViewRoots()
- {
- //return sr.getSubSystems(connection);
- return getAdapter(connection).getChildren(connection); // pc42690
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return true, assuming there is at least one subsystem object
- */
- public boolean hasSystemViewRoots()
- {
- return true;
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- * <p>Not applicable for us.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- //return sr.getSubSystems(selectedConnection);
- return getAdapter(selectedConnection).getChildren(selectedConnection); // pc42690
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- * <p>Not applicable for us.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return true;
- }
- /**
- * Return true to show right-click popup actions on objects in the tree.
- * We return true.
- */
- public boolean showActions()
- {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilterPools.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilterPools.java
deleted file mode 100644
index fa3c38cfe..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilterPools.java
+++ /dev/null
@@ -1,128 +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.view;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is used when the contents are the children of a particular subsystem.
- * Used when user right clicks on a filter pool and selects Open In New Perspective.
- */
-public class SystemViewAPIProviderForFilterPools
- extends SystemAbstractAPIProvider
-{
-
-
- protected ISubSystem subsystem = null;
- protected ISystemFilterPool filterPool = null;
- protected ISystemFilterPoolReference filterPoolReference = null;
-
- /**
- * Constructor
- * @param filterPoolReference The filterpool reference object we are drilling down on.
- */
- public SystemViewAPIProviderForFilterPools(ISystemFilterPoolReference filterPoolReference)
- {
- super();
- setFilterPoolReference(filterPoolReference);
- }
-
- /**
- * Get the parent subsystem object.
- */
- public ISubSystem getSubSystem()
- {
- return subsystem;
- }
- /**
- * Get the input filter pool reference object.
- */
- public ISystemFilterPoolReference getSystemFilterPoolReference()
- {
- return filterPoolReference;
- }
- /**
- * Get the filter pool referenced by the input filter pool reference object.
- */
- public ISystemFilterPool getSystemFilterPool()
- {
- return filterPool;
- }
-
- /**
- * Reset the input filter pool reference object.
- */
- public void setFilterPoolReference(ISystemFilterPoolReference filterPoolReference)
- {
- this.filterPoolReference = filterPoolReference;
- this.filterPool = filterPoolReference.getReferencedFilterPool();
- this.subsystem = (ISubSystem)filterPoolReference.getProvider();
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * We return all filters for this filter pool
- */
- public Object[] getSystemViewRoots()
- {
- return filterPoolReference.getSystemFilterReferences(getSubSystem());
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return true if the referenced filter pool has any filters
- */
- public boolean hasSystemViewRoots()
- {
- return (filterPool.getSystemFilterCount() > 0);
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- * <p>Not applicable for us.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return null;
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- * <p>Not applicable for us.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return false;
- }
-
- /**
- * Return true to show right-click popup actions on objects in the tree.
- * We return true.
- */
- public boolean showActions()
- {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilterStrings.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilterStrings.java
deleted file mode 100644
index 91aa95c87..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilterStrings.java
+++ /dev/null
@@ -1,201 +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.view;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is used when the contents are the children of a particular subsystem.
- * Used when user right clicks on a filter string and selects Open In New Perspective.
- */
-public class SystemViewAPIProviderForFilterStrings
- extends SystemAbstractAPIProvider
-{
-
-
- protected ISubSystem subsystem = null;
- protected ISystemFilterPool filterPool = null;
- protected ISystemFilterPoolReference filterPoolReference = null;
- protected ISystemFilterReference filterReference = null;
- protected ISystemFilter filter = null;
- protected ISystemFilterString filterString = null;
- protected ISystemFilterStringReference filterStringReference = null;
-
- /**
- * Constructor
- * @param filterStringReference The filter string reference object we are drilling down on.
- */
- public SystemViewAPIProviderForFilterStrings(ISystemFilterStringReference filterStringReference)
- {
- super();
- setFilterStringReference(filterStringReference);
- }
-
- /**
- * Get the parent subsystem object.
- */
- public ISubSystem getSubSystem()
- {
- return subsystem;
- }
- /**
- * Get the parent filter pool reference object.
- */
- public ISystemFilterPoolReference getSystemFilterPoolReference()
- {
- return filterPoolReference;
- }
- /**
- * Get the parent filter pool.
- */
- public ISystemFilterPool getSystemFilterPool()
- {
- return filterPool;
- }
- /**
- * Get the parent filter reference object.
- */
- public ISystemFilterReference getSystemFilterReference()
- {
- return filterReference;
- }
- /**
- * Get the parent filter
- */
- public ISystemFilter getSystemFilter()
- {
- return filter;
- }
- /**
- * Get the input filter string reference object.
- */
- public ISystemFilterStringReference getSystemFilterStringReference()
- {
- return filterStringReference;
- }
- /**
- * Get the filter referenced by the input filter string reference object.
- */
- public ISystemFilterString getSystemFilterString()
- {
- return filterString;
- }
-
-
- /**
- * Reset the input filter string reference object.
- */
- public void setFilterStringReference(ISystemFilterStringReference filterStringReference)
- {
- this.filterStringReference = filterStringReference;
- this.filterString = filterStringReference.getReferencedFilterString();
- this.filterReference = filterStringReference.getParent();
- this.filter = filterReference.getReferencedFilter();
- this.filterPoolReference = filterReference.getParentSystemFilterReferencePool();
- this.filterPool = filterPoolReference.getReferencedFilterPool();
- this.subsystem = (ISubSystem)filterPoolReference.getProvider();
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * What we return depends on setting of Show Filter Strings.
- */
- public Object[] getSystemViewRoots()
- {
- ISubSystem ss = subsystem;
- Object element = filterStringReference;
- Object[] children = null;
- try
- {
- children = ss.resolveFilterString(filterStringReference.getString());
- if ((children == null) || (children.length==0))
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),
- ISystemMessageObject.MSGTYPE_EMPTY, element);
- }
- }
- catch (InterruptedException exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED),
- ISystemMessageObject.MSGTYPE_CANCEL, element);
- System.out.println("Canceled."); //$NON-NLS-1$
- }
- catch (Exception exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED),
- ISystemMessageObject.MSGTYPE_ERROR, element);
- System.out.println("Exception resolving filter strings: " + exc.getClass().getName() + ", " + exc.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
- exc.printStackTrace();
- } // message already issued
- return children;
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return true
- */
- public boolean hasSystemViewRoots()
- {
- return true;
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- * <p>Not applicable for us.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return null;
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- * <p>Not applicable for us.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return false;
- }
-
- /**
- * Return true to show right-click popup actions on objects in the tree.
- * We return true.
- */
- public boolean showActions()
- {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilters.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilters.java
deleted file mode 100644
index 8c7e1bfc4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForFilters.java
+++ /dev/null
@@ -1,258 +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.view;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystemHelpers;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is used when the contents are the children of a particular subsystem.
- * Used when user right clicks on a filter and selects Open In New Perspective.
- */
-public class SystemViewAPIProviderForFilters
- extends SystemAbstractAPIProvider
-{
-
-
- protected ISubSystem subsystem = null;
- protected ISystemFilterPool filterPool = null;
- protected ISystemFilterPoolReference filterPoolReference = null;
- protected ISystemFilterReference filterReference = null;
- protected ISystemFilter filter = null;
-
- /**
- * Constructor
- * @param filterReference The filter reference object we are drilling down on.
- */
- public SystemViewAPIProviderForFilters(ISystemFilterReference filterReference)
- {
- super();
- setFilterReference(filterReference);
- }
-
- /**
- * Get the parent subsystem object.
- */
- public ISubSystem getSubSystem()
- {
- return subsystem;
- }
- /**
- * Get the parent filter pool reference object.
- */
- public ISystemFilterPoolReference getSystemFilterPoolReference()
- {
- return filterPoolReference;
- }
- /**
- * Get the parent filter pool.
- */
- public ISystemFilterPool getSystemFilterPool()
- {
- return filterPool;
- }
- /**
- * Get the input filter reference object.
- */
- public ISystemFilterReference getSystemFilterReference()
- {
- return filterReference;
- }
- /**
- * Get the filter referenced by the input filter reference object.
- */
- public ISystemFilter getSystemFilter()
- {
- return filter;
- }
-
- /**
- * Reset the input filter reference object.
- */
- public void setFilterReference(ISystemFilterReference filterReference)
- {
- this.filterReference = filterReference;
- this.filter = filterReference.getReferencedFilter();
- this.filterPoolReference = filterReference.getParentSystemFilterReferencePool();
- this.filterPool = filterPoolReference.getReferencedFilterPool();
- this.subsystem = (ISubSystem)filterPoolReference.getProvider();
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * What we return depends on setting of Show Filter Strings.
- */
- public Object[] getSystemViewRoots()
- {
- // see getChildren() OF SystemViewFilterReferenceAdapter. TODO: RE-USE VS COPY!
- Object[] children = null;
- ISystemFilterReference fRef = filterReference;
- Object element = fRef;
- //Object[] children = fRef.getChildren(getShell());
- ISystemFilter referencedFilter = fRef.getReferencedFilter();
-
- ISubSystemConfiguration ssf = SubSystemHelpers.getParentSubSystemConfiguration(referencedFilter);
- boolean promptable = referencedFilter.isPromptable();
- //System.out.println("Promptable? " + promptable);
- if (promptable)
- {
- children = new SystemMessageObject[1];
- try {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssf.getAdapter(ISubSystemConfigurationAdapter.class);
- ISystemFilter newFilter = adapter.createFilterByPrompting(ssf, fRef, getShell());
- if (newFilter == null)
- {
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED),
- ISystemMessageObject.MSGTYPE_CANCEL,element);
- }
- else // filter successfully created!
- {
- // return "filter created successfully" message object for this node
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FILTERCREATED),
- ISystemMessageObject.MSGTYPE_OBJECTCREATED,element);
- // select the new filter reference...
- ISubSystem ss = fRef.getSubSystem();
- ISystemFilterReference sfr = fRef.getParentSystemFilterReferencePool().getExistingSystemFilterReference(ss, newFilter);
- ISystemViewInputProvider inputProvider = this;
- if ((sfr != null) && (inputProvider != null) && (inputProvider.getViewer()!=null))
- {
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(sfr, ISystemResourceChangeEvents.EVENT_SELECT_EXPAND, null);
- Viewer v = inputProvider.getViewer();
- if (v instanceof ISystemResourceChangeListener)
- {
- //sr.fireEvent((ISystemResourceChangeListener)v, event); // only expand in the current viewer, not all viewers!
- sr.postEvent((ISystemResourceChangeListener)v, event); // only expand in the current viewer, not all viewers!
- }
- }
- }
- } catch (Exception exc) {
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED),
- ISystemMessageObject.MSGTYPE_ERROR, element);
- SystemBasePlugin.logError("Exception prompting for filter ",exc); //$NON-NLS-1$
- }
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"returning children");
- return children;
- }
- ISubSystem ss = fRef.getSubSystem();
- Object[] nestedFilterReferences = fRef.getSystemFilterReferences(ss);
- int nbrFilterStrings = referencedFilter.getFilterStringCount();
- if (nbrFilterStrings == 0)
- return nestedFilterReferences;
- else
- {
-
- {
- String[] filterStrings = referencedFilter.getFilterStrings();
- try
- {
- Object[] allChildren = ss.resolveFilterStrings(filterStrings);
- int nbrNestedFilters = (nestedFilterReferences==null) ? 0: nestedFilterReferences.length;
- children = new Object[nbrNestedFilters + allChildren.length];
- int idx = 0;
- for (idx=0; idx<nbrNestedFilters; idx++)
- children[idx] = nestedFilterReferences[idx];
- for (int jdx=0; jdx<allChildren.length; jdx++)
- children[idx++] = allChildren[jdx];
- }
- catch (InterruptedException exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED),
- ISystemMessageObject.MSGTYPE_CANCEL,element);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(),"Filter resolving canceled by user."); //$NON-NLS-1$
- }
- catch (Exception exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED),
- ISystemMessageObject.MSGTYPE_ERROR, element);
- SystemBasePlugin.logError("Exception resolving filters' strings ",exc); //$NON-NLS-1$
- } // message already issued
-
- if ((children == null) || (children.length==0))
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),
- ISystemMessageObject.MSGTYPE_EMPTY, element);
- }
- return children;
- }
- }
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return true if the referenced filter has nested filters or has filter strings.
- */
- public boolean hasSystemViewRoots()
- {
- int nbrNestedFilters = filter.getSystemFilterCount();
- int nbrFilterStrings = filter.getFilterStringCount();
- return (nbrNestedFilters > 0) || (nbrFilterStrings > 0);
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- * <p>Not applicable for us.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return null;
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- * <p>Not applicable for us.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return false;
- }
-
- /**
- * Return true to show right-click popup actions on objects in the tree.
- * We return true.
- */
- public boolean showActions()
- {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForSubSystems.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForSubSystems.java
deleted file mode 100644
index a3c7dcb41..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAPIProviderForSubSystems.java
+++ /dev/null
@@ -1,107 +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.view;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-/**
- * This class is a provider of root nodes to the remote systems tree viewer part.
- * It is used when the contents are the children of a particular subsystem.
- * Used when user right clicks on a subsystem and selects Open In New Perspective.
- */
-public class SystemViewAPIProviderForSubSystems
- extends SystemAbstractAPIProvider
-{
-
-
- protected ISubSystem subsystem = null;
-
- /**
- * Constructor
- * @param subsystem The subsystem object we are drilling down on.
- */
- public SystemViewAPIProviderForSubSystems(ISubSystem subsystem)
- {
- super();
- setSubSystem(subsystem);
- }
-
- /**
- * Get the input subsystem object.
- */
- public ISubSystem getSubSystem()
- {
- return subsystem;
- }
- /**
- * Reset the input subsystem object.
- */
- public void setSubSystem(ISubSystem subsystem)
- {
- this.subsystem = subsystem;
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * We return all filter pools for this subsystem
- */
- public Object[] getSystemViewRoots()
- {
- return subsystem.getChildren();
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return subsystem.hasChildren()
- */
- public boolean hasSystemViewRoots()
- {
- return subsystem.hasChildren();
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- * <p>Not applicable for us.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return null;
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- * <p>Not applicable for us.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return false;
- }
-
- /**
- * Return true to show right-click popup actions on objects in the tree.
- * We return true.
- */
- public boolean showActions()
- {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAdapterFactory.java
deleted file mode 100644
index fee1c6c7e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewAdapterFactory.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.model.SystemNewConnectionPromptObject;
-import org.eclipse.rse.model.ISystemPromptableObject;
-import org.eclipse.rse.ui.view.team.SystemTeamViewCategoryAdapter;
-import org.eclipse.rse.ui.view.team.SystemTeamViewCategoryNode;
-import org.eclipse.rse.ui.view.team.SystemTeamViewProfileAdapter;
-import org.eclipse.rse.ui.view.team.SystemTeamViewSubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.view.team.SystemTeamViewSubSystemConfigurationNode;
-import org.eclipse.ui.IActionFilter;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * This factory maps requests for an adapter object from a given
- * element object.
- */
-public class SystemViewAdapterFactory implements IAdapterFactory {
-
- private SystemViewRootInputAdapter rootAdapter = new SystemViewRootInputAdapter();
- private SystemViewConnectionAdapter connectionAdapter = new SystemViewConnectionAdapter();
- private SystemViewSubSystemAdapter subsystemAdapter = new SystemViewSubSystemAdapter();
- private SystemViewFilterPoolAdapter filterPoolAdapter = new SystemViewFilterPoolAdapter();
- private SystemViewFilterAdapter filterAdapter = new SystemViewFilterAdapter();
- private SystemViewFilterPoolReferenceAdapter filterPoolReferenceAdapter = new SystemViewFilterPoolReferenceAdapter();
- private SystemViewFilterReferenceAdapter filterReferenceAdapter = new SystemViewFilterReferenceAdapter();
- private SystemViewMessageAdapter msgAdapter = new SystemViewMessageAdapter();
- private SystemViewPromptableAdapter promptAdapter = new SystemViewPromptableAdapter();
- private SystemViewNewConnectionPromptAdapter newConnPromptAdapter = new SystemViewNewConnectionPromptAdapter();
- private SystemTeamViewProfileAdapter profileAdapter = new SystemTeamViewProfileAdapter();
- private SystemTeamViewCategoryAdapter categoryAdapter;
- private SystemTeamViewSubSystemConfigurationAdapter subsysFactoryAdapter;
-
- private SystemViewFilterStringAdapter filterStringAdapter = new SystemViewFilterStringAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[] { ISystemViewElementAdapter.class, ISystemDragDropAdapter.class, IPropertySource.class, IWorkbenchAdapter.class, IActionFilter.class, IDeferredWorkbenchAdapter.class };
- }
-
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- * @param manager the adapter manager controlling this factory
- */
- public void registerWithManager(IAdapterManager manager) {
- manager.registerAdapters(this, ISystemViewInputProvider.class);
- manager.registerAdapters(this, ISystemProfile.class);
- manager.registerAdapters(this, IHost.class);
- manager.registerAdapters(this, ISubSystem.class);
- manager.registerAdapters(this, ISystemFilter.class);
- manager.registerAdapters(this, ISystemFilterPool.class);
- manager.registerAdapters(this, ISystemFilterPoolReference.class);
- manager.registerAdapters(this, ISystemFilterReference.class);
- manager.registerAdapters(this, ISystemFilterString.class);
- manager.registerAdapters(this, ISystemMessageObject.class);
- manager.registerAdapters(this, ISystemPromptableObject.class);
- manager.registerAdapters(this, SystemTeamViewCategoryNode.class);
- manager.registerAdapters(this, SystemTeamViewSubSystemConfigurationNode.class);
-
- // FIXME - UDAs no longer in core
- //manager.registerAdapters(this, SystemTeamViewCompileTypeNode.class);
- //manager.registerAdapters(this, SystemTeamViewCompileCommandNode.class);
- //manager.registerAdapters(this, SystemUDActionElement.class);
- }
-
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- Object adapter = null;
- if (adaptableObject instanceof ISystemViewElementAdapter)
- adapter = adaptableObject;
- else if (adaptableObject instanceof ISystemDragDropAdapter)
- adapter = adaptableObject;
- else if (adaptableObject instanceof ISystemViewInputProvider)
- adapter = rootAdapter;
- else if (adaptableObject instanceof ISystemProfile)
- adapter = profileAdapter;
- else if (adaptableObject instanceof IHost)
- adapter = connectionAdapter;
- else if (adaptableObject instanceof ISubSystem)
- adapter = subsystemAdapter;
- else if (adaptableObject instanceof ISystemFilterPoolReference)
- adapter = filterPoolReferenceAdapter;
- else if (adaptableObject instanceof ISystemFilterPool)
- adapter = filterPoolAdapter;
- else if (adaptableObject instanceof ISystemFilterReference)
- adapter = filterReferenceAdapter;
- else if (adaptableObject instanceof ISystemFilterString)
- adapter = filterStringAdapter;
- else if (adaptableObject instanceof ISystemFilter)
- adapter = filterAdapter;
- else if (adaptableObject instanceof ISystemMessageObject)
- adapter = msgAdapter;
- else if (adaptableObject instanceof ISystemPromptableObject) {
-
- if (adaptableObject instanceof SystemNewConnectionPromptObject) {
- adapter = newConnPromptAdapter;
- } else {
- adapter = promptAdapter;
- }
- } else if (adaptableObject instanceof SystemTeamViewCategoryNode)
- adapter = getCategoryAdapter();
- else if (adaptableObject instanceof SystemTeamViewSubSystemConfigurationNode) adapter = getSubSystemConfigurationAdapter();
-
- /** FIXME - UDAs no longer in core
- else if (adaptableObject instanceof SystemTeamViewCompileTypeNode)
- adapter = getCompileTypeAdapter();
- else if (adaptableObject instanceof SystemTeamViewCompileCommandNode)
- adapter = getCompileCommandAdapter();
- else if (adaptableObject instanceof SystemUDActionElement)
- adapter = getUserActionAdapter();
- */
-
- if ((adapter != null) && (adapterType == IPropertySource.class)) {
- ((ISystemViewElementAdapter) adapter).setPropertySourceInput(adaptableObject);
- } else if (adapter == null) {
- SystemBasePlugin.logWarning("No adapter found for object of type: " + adaptableObject.getClass().getName()); //$NON-NLS-1$
- }
- return adapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for root inputs to the RSE
- * @return SystemViewRootInputAdapter
- */
- public SystemViewRootInputAdapter getRootInputAdapter() {
- return rootAdapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for connection objects
- * @return SystemViewConnectionAdapter
- */
- public SystemViewConnectionAdapter getConnectionAdapter() {
- return connectionAdapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for profile objects
- * @return SystemViewProfileAdapter
- */
- public SystemTeamViewProfileAdapter getProfileAdapter() {
- return profileAdapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for filters
- * @return SystemViewFilterAdapter
- */
- public SystemViewFilterAdapter getFilterAdapter() {
- return filterAdapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for filter pools
- * @return SystemViewFilterPoolAdapter
- */
- public SystemViewFilterPoolAdapter getFilterPoolAdapter() {
- return filterPoolAdapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for filter pool references, which
- * are what we actually see in the RSE.
- * @return SystemViewFilterPoolReferenceAdapter
- */
- public SystemViewFilterPoolReferenceAdapter getFilterPoolReferenceAdapter() {
- return filterPoolReferenceAdapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for filter references, which are
- * what we actually see in the RSE
- * @return SystemViewFilterReferenceAdapter
- */
- public SystemViewFilterReferenceAdapter getFilterReferenceAdapter() {
- return filterReferenceAdapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for messages shown in the RSE as child objects
- * @return SystemViewMessageAdapter
- */
- public SystemViewMessageAdapter getMsgAdapter() {
- return msgAdapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for promptable objects the run an action when expanded
- * @return SystemViewPromptableAdapter
- */
- public SystemViewPromptableAdapter getPromptAdapter() {
- return promptAdapter;
- }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for subsystems
- * @return SystemViewSubSystemAdapter
- */
- public SystemViewSubSystemAdapter getSubSystemAdapter() {
- return subsystemAdapter;
- }
-
- /**
- * @return adapter for category nodes in team view
- */
- public SystemTeamViewCategoryAdapter getCategoryAdapter() {
- if (categoryAdapter == null) categoryAdapter = new SystemTeamViewCategoryAdapter();
- return categoryAdapter;
- }
-
- /**
- * @return adapter for subsystem factory nodes in team view
- */
- public SystemTeamViewSubSystemConfigurationAdapter getSubSystemConfigurationAdapter() {
- if (subsysFactoryAdapter == null) subsysFactoryAdapter = new SystemTeamViewSubSystemConfigurationAdapter();
- return subsysFactoryAdapter;
- }
-
- // FIXME user actions and compile commands no longer coupled with core
- // /**
- // * Return adapter for user actions nodes in team view
- // */
- // public SystemTeamViewUserActionAdapter getUserActionAdapter()
- // {
- // if (userActionAdapter == null)
- // userActionAdapter = new SystemTeamViewUserActionAdapter();
- // return userActionAdapter;
- // }
- //
- // /**
- // * Return adapter for compile type nodes in team view
- // */
- // public SystemTeamViewCompileTypeAdapter getCompileTypeAdapter()
- // {
- // if (compileTypeAdapter == null)
- // compileTypeAdapter = new SystemTeamViewCompileTypeAdapter();
- // return compileTypeAdapter;
- // }
- // /**
- // * Return adapter for compile command nodes in team view
- // */
- // public SystemTeamViewCompileCommandAdapter getCompileCommandAdapter()
- // {
- // if (compileCmdAdapter == null)
- // compileCmdAdapter = new SystemTeamViewCompileCommandAdapter();
- // return compileCmdAdapter;
- // }
-
- /**
- * Because we use singletons for our adapters, it is possible to speed up
- * access to them by simply returning them from here.
- * <p>
- * This method returns the RSE adapter for filter strings
- * @return SystemViewFilterStringAdapter
- */
- public SystemViewFilterStringAdapter getFilterStringAdapter() {
- return filterStringAdapter;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewCompositeActionGroup.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewCompositeActionGroup.java
deleted file mode 100644
index 2ae276ac0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewCompositeActionGroup.java
+++ /dev/null
@@ -1,104 +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.view;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionContext;
-import org.eclipse.ui.actions.ActionGroup;
-
-public class SystemViewCompositeActionGroup extends ActionGroup {
-
-
-
- private ActionGroup[] fGroups;
-
- public SystemViewCompositeActionGroup() {
- }
-
- public SystemViewCompositeActionGroup(ActionGroup[] groups) {
- setGroups(groups);
- }
-
- protected void setGroups(ActionGroup[] groups) {
- Assert.isTrue(fGroups == null);
- Assert.isNotNull(groups);
- fGroups= groups;
- }
-
- public ActionGroup get(int index) {
- if (fGroups == null)
- return null;
- return fGroups[index];
- }
-
- public void addGroup(ActionGroup group) {
- if (fGroups == null) {
- fGroups= new ActionGroup[] { group };
- } else {
- ActionGroup[] newGroups= new ActionGroup[fGroups.length + 1];
- System.arraycopy(fGroups, 0, newGroups, 0, fGroups.length);
- newGroups[fGroups.length]= group;
- fGroups= newGroups;
- }
- }
-
- public void dispose() {
- super.dispose();
- if (fGroups == null)
- return;
- for (int i= 0; i < fGroups.length; i++) {
- fGroups[i].dispose();
- }
- }
-
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- if (fGroups == null)
- return;
- for (int i= 0; i < fGroups.length; i++) {
- fGroups[i].fillActionBars(actionBars);
- }
- }
-
- public void fillContextMenu(IMenuManager menu) {
- super.fillContextMenu(menu);
- if (fGroups == null)
- return;
- for (int i= 0; i < fGroups.length; i++) {
- fGroups[i].fillContextMenu(menu);
- }
- }
-
- public void setContext(ActionContext context) {
- super.setContext(context);
- if (fGroups == null)
- return;
- for (int i= 0; i < fGroups.length; i++) {
- fGroups[i].setContext(context);
- }
- }
-
- public void updateActionBars() {
- super.updateActionBars();
- if (fGroups == null)
- return;
- for (int i= 0; i < fGroups.length; i++) {
- fGroups[i].updateActionBars();
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionAdapter.java
deleted file mode 100644
index 131445d4e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionAdapter.java
+++ /dev/null
@@ -1,657 +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.view;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSEUserIdConstants;
-import org.eclipse.rse.core.ISystemUserIdConstants;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemRegistryUI;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemClearAllPasswordsAction;
-import org.eclipse.rse.ui.actions.SystemConnectAllSubSystemsAction;
-import org.eclipse.rse.ui.actions.SystemCopyConnectionAction;
-import org.eclipse.rse.ui.actions.SystemDisconnectAllSubSystemsAction;
-import org.eclipse.rse.ui.actions.SystemMoveConnectionAction;
-import org.eclipse.rse.ui.actions.SystemMoveDownConnectionAction;
-import org.eclipse.rse.ui.actions.SystemMoveUpConnectionAction;
-import org.eclipse.rse.ui.actions.SystemNewConnectionFromExistingConnectionAction;
-import org.eclipse.rse.ui.actions.SystemWorkOfflineAction;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorSpecialChar;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-
-
-/**
- * Adapter for displaying SystemConnection objects in tree views.
- */
-public class SystemViewConnectionAdapter
- extends AbstractSystemViewAdapter
- implements ISystemViewElementAdapter, ISystemUserIdConstants
-{
- private SystemNewConnectionFromExistingConnectionAction anotherConnectionAction = null;
- //private SystemUpdateConnectionAction updateAction = null;
- private SystemMoveUpConnectionAction upAction = null;
- private SystemMoveDownConnectionAction downAction = null;
- private SystemDisconnectAllSubSystemsAction disconnectAction = null;
- private SystemConnectAllSubSystemsAction connectAction = null;
- private SystemClearAllPasswordsAction clearPasswordAction = null;
- private SystemCopyConnectionAction copyAction = null;
- private SystemMoveConnectionAction moveAction = null;
-
- // yantzi: artemis 6.0, add work offline support
- private SystemWorkOfflineAction offlineAction = null;
-
- private SystemInheritablePropertyData userIdData = new SystemInheritablePropertyData();
- private String translatedType = null;
- private String translatedHostname = null;
- private String translatedDescription = null;
- // for reset property support
- private String original_hostName, original_description;
- private SystemInheritablePropertyData original_userIdData = new SystemInheritablePropertyData();
- private boolean changed_hostName, changed_description, changed_userId;
- private boolean actionsCreated = false;
-
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
-
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given element.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- if (!actionsCreated)
- createActions();
- //updateAction.setValue(null); // reset
- menu.add(menuGroup, anotherConnectionAction);
- menu.add(menuGroup, copyAction);
- menu.add(menuGroup, moveAction);
- menu.add(menuGroup, upAction);
- menu.add(menuGroup, downAction);
-
- // MJB: RE defect 40854
- addConnectOrDisconnectAction(menu, menuGroup, selection);
-
- menu.add(menuGroup, clearPasswordAction);
-
- IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType((((IHost)selection.getFirstElement()).getSystemType()));
- RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class));
-
- // yantzi: artemis 6.0, offline support, only add work offline action for system types that support offline mode
- if (sysTypeAdapter.isEnableOffline(sysType))
- {
- menu.add(menuGroup, offlineAction);
- }
- }
-
- private void addConnectOrDisconnectAction(SystemMenuManager menu, String menuGroup, IStructuredSelection selection)
- {
- IHost sysCon = (IHost) selection.getFirstElement();
- ISystemRegistry sysReg = RSEUIPlugin.getTheSystemRegistry();
- boolean anySupportsConnect = sysReg.isAnySubSystemSupportsConnect(sysCon);
-
- if (anySupportsConnect) {
- boolean anyConnected = sysReg.isAnySubSystemConnected(sysCon);
- boolean allConnected = sysReg.areAllSubSystemsConnected(sysCon);
- if (!allConnected) menu.add(menuGroup, connectAction);
- if (anyConnected) menu.add(menuGroup, disconnectAction);
- }
- }
-
- private void createActions()
- {
- anotherConnectionAction = new SystemNewConnectionFromExistingConnectionAction(null);
- //updateAction = new SystemUpdateConnectionAction(null);
- upAction = new SystemMoveUpConnectionAction(null);
- downAction = new SystemMoveDownConnectionAction(null);
- disconnectAction = new SystemDisconnectAllSubSystemsAction(null);
- copyAction = new SystemCopyConnectionAction(null);
- moveAction = new SystemMoveConnectionAction(null);
- offlineAction = new SystemWorkOfflineAction(null);
- connectAction = new SystemConnectAllSubSystemsAction(null);
- clearPasswordAction = new SystemClearAllPasswordsAction(null);
-
- actionsCreated = true;
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element) {
- IHost connection = (IHost)element;
- String systemTypeName = connection.getSystemType();
- boolean anyConnected = RSEUIPlugin.getTheSystemRegistry().isAnySubSystemConnected(connection);
- ImageDescriptor descriptor = null;
- IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemTypeName);
- if (systemType != null) {
- RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)(systemType.getAdapter(IRSESystemType.class));
- if (anyConnected) {
- descriptor = sysTypeAdapter.getLiveImageDescriptor(systemType);
- } else {
- descriptor = sysTypeAdapter.getImageDescriptor(systemType);
- }
- } else {
- descriptor = ImageDescriptor.getMissingImageDescriptor();
- }
- return descriptor;
- }
-
- /**
- * Return the label for this object
- */
- public String getText(Object element)
- {
- IHost conn = (IHost)element;
- boolean qualifyNames = RSEUIPlugin.getTheSystemRegistry().getQualifiedHostNames();
- if (!qualifyNames)
- return conn.getAliasName();
- else
- return conn.getSystemProfileName() + "." + conn.getAliasName(); //$NON-NLS-1$
- }
-
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- IHost conn = (IHost)element;
- return conn.getAliasName();
- }
-
- /**
- * Return the absolute name, versus just display name, of this object
- */
- public String getAbsoluteName(Object element)
- {
- IHost conn = (IHost)element;
- return conn.getSystemProfileName() + "." + conn.getAliasName(); //$NON-NLS-1$
- }
-
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- if (translatedType == null)
- translatedType = SystemViewResources.RESID_PROPERTY_CONNECTION_TYPE_VALUE;
- return translatedType;
- }
-
- /**
- * Return the string to display in the status line when the given object is selected.
- * We return:
- * Connection: name - Host name: hostName - Description: description
- */
- public String getStatusLineText(Object element)
- {
- IHost conn = (IHost)element;
- if (translatedHostname == null)
- translatedHostname = SystemViewResources.RESID_PROPERTY_HOSTNAME_LABEL;
- if (translatedDescription == null)
- translatedDescription = SystemViewResources.RESID_PROPERTY_CONNDESCRIPTION_LABEL;
- String statusText =
- getType(element) + ": " + conn.getAliasName() + " - " + //$NON-NLS-1$ //$NON-NLS-2$
- translatedHostname + ": " + conn.getHostName(); //$NON-NLS-1$
- String text = conn.getDescription();
- if ((text==null) || (text.length()==0))
- return statusText;
- else
- return statusText + " - " + translatedDescription + ": " + text; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Return the parent of this object
- */
- public Object getParent(Object element)
- {
- return RSEUIPlugin.getTheSystemRegistry();
- }
-
- /**
- * Return the children of this object
- */
- public Object[] getChildren(Object element)
- {
- IHost conn = (IHost)element;
- ISystemViewInputProvider input = getInput();
- if (input != null)
- {
- Object[] children = input.getConnectionChildren(conn);
- if (children != null)
- {
- Vector v = new Vector();
- boolean someSkipped = false;
- for (int idx=0; idx<children.length; idx++)
- {
- if ((children[idx] instanceof ISubSystem) &&
- ((ISubSystem)children[idx]).isHidden() )
- someSkipped = true;
- else
- v.addElement(children[idx]);
- }
- if (someSkipped)
- {
- children = new Object[v.size()];
- for (int idx=0; idx<children.length; idx++)
- children[idx] = v.elementAt(idx);
- }
- }
- return children;
- }
- else
- {
- System.out.println("SystemViewConnection.getChildren(): adapter has no input!"); //$NON-NLS-1$
- return null;
- }
- }
-
- /**
- * Return true if this object has children
- */
- public boolean hasChildren(Object element)
- {
- IHost conn = (IHost)element;
- return getInput().hasConnectionChildren(conn);
- }
-
- // Property sheet descriptors defining all the properties we expose in the Property Sheet
-
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- propertyDescriptorArray = new PropertyDescriptor[6];
- int idx = -1;
-
- // add our unique property descriptors...
- //idx = defaultProperties.length;
- //RSEUIPlugin plugin = RSEUIPlugin.getDefault();
-
- // profile
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_PROFILE, SystemViewResources.RESID_PROPERTY_PROFILE_LABEL, SystemViewResources.RESID_PROPERTY_PROFILE_TOOLTIP);
-
- // system type
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_SYSTEMTYPE,SystemViewResources.RESID_PROPERTY_SYSTEMTYPE_LABEL, SystemViewResources.RESID_PROPERTY_SYSTEMTYPE_TOOLTIP);
-
- // status
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_IS_CONNECTED,SystemViewResources.RESID_PROPERTY_CONNECTIONSTATUS_LABEL, SystemViewResources.RESID_PROPERTY_CONNECTIONSTATUS_TOOLTIP);
-
- // hostname
- if (translatedHostname == null)
- translatedHostname = SystemViewResources.RESID_PROPERTY_HOSTNAME_LABEL;
- propertyDescriptorArray[++idx] = new TextPropertyDescriptor(ISystemPropertyConstants.P_HOSTNAME, translatedHostname);
- propertyDescriptorArray[idx].setDescription(SystemViewResources.RESID_PROPERTY_HOSTNAME_TOOLTIP);
-
- // default user id
- //propertyDescriptorArray[++idx] = new TextPropertyDescriptor(ISystemPropertyConstants.P_DEFAULTUSERID,
- // SystemViewResources.RESID_PROPERTY_DEFAULTUSERID_LABEL));
- SystemInheritableTextPropertyDescriptor userIdDescriptor =
- new SystemInheritableTextPropertyDescriptor(ISystemPropertyConstants.P_DEFAULTUSERID,
- SystemViewResources.RESID_PROPERTY_DEFAULTUSERID_LABEL);
- //RSEUIPlugin sp = RSEUIPlugin.getDefault();
- userIdDescriptor.setToggleButtonToolTipText(SystemResources.RESID_CONNECTION_DEFAULTUSERID_INHERITBUTTON_TIP);
- userIdDescriptor.setEntryFieldToolTipText(SystemResources.RESID_CONNECTION_DEFAULTUSERID_TIP);
- ICellEditorValidator userIdValidator =
- new ValidatorSpecialChar("=;",false, //$NON-NLS-1$
- 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);
-
- // description
- if (translatedDescription == null)
- translatedDescription = SystemViewResources.RESID_PROPERTY_CONNDESCRIPTION_LABEL;
- propertyDescriptorArray[++idx] = new TextPropertyDescriptor(ISystemPropertyConstants.P_DESCRIPTION, translatedDescription);
- propertyDescriptorArray[idx].setDescription(SystemViewResources.RESID_PROPERTY_CONNDESCRIPTION_TOOLTIP);
-
- }
- return propertyDescriptorArray;
- }
-
- /**
- * Returns the current value for the named property.
- * The parent handles P_TEXT and P_TYPE only, and we augment that here.
- * @param key the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- protected Object internalGetPropertyValue(Object key)
- {
- String name = (String)key;
- IHost conn = (IHost)propertySourceInput;
-
- if (name.equals(P_SYSTEMTYPE))
- return conn.getSystemType();
- else if (name.equals(P_HOSTNAME))
- return conn.getHostName();
- else if (name.equals(P_DEFAULTUSERID))
- {
- setDefaultUserIdPropertyData(userIdData, conn);
- //System.out.println("Testing getPropertyValue: " + userIdData);
- return userIdData;
- }
- else if (name.equals(P_DESCRIPTION))
- return conn.getDescription();
- else if (name.equals(P_PROFILE))
- return conn.getSystemProfile().getName();
- else if (name.equals(P_IS_CONNECTED))
- {
- if (conn.isOffline())
- {
- return SystemResources.RESID_OFFLINE_LABEL;
- }
- else
- {
- boolean anyConnected = RSEUIPlugin.getTheSystemRegistry().isAnySubSystemConnected(conn);
- if (anyConnected)
- return SystemViewResources.RESID_PROPERTY_CONNECTIONSTATUS_CONNECTED_VALUE;
- else
- return SystemViewResources.RESID_PROPERTY_CONNECTIONSTATUS_DISCONNECTED_VALUE;
- }
- }
- else
- return null;
- }
-
- /**
- * Set the values in the userIdPropertyData object that drives the userId property sheet widget
- */
- private SystemInheritablePropertyData setDefaultUserIdPropertyData(SystemInheritablePropertyData data, IHost conn)
- {
- String localUserId = conn.getLocalDefaultUserId();
- data.setLocalValue(localUserId);
- String parentUserId = SystemPreferencesManager.getPreferencesManager().getDefaultUserId(conn.getSystemType());
- data.setInheritedValue(parentUserId);
- data.setIsLocal((localUserId!=null)&&(localUserId.length()>0));
- //data.printDetails();
- return data;
- }
-
- // because this node has some editable properties, these overrides of our
- // parent class are needed as callbacks from the PropertySheet window.
- /**
- * Set input object for property source queries. This is called by the
- * SystemViewAdaptorFactory before returning this adapter object.
- */
- public void setPropertySourceInput(Object propertySourceInput)
- {
- if (this.propertySourceInput == propertySourceInput) // no change?
- return; // don't mistakenly update history values else reset from property sheet doesn't work correctly.
- super.setPropertySourceInput(propertySourceInput);
- IHost conn = (IHost)propertySourceInput;
- original_userIdData = setDefaultUserIdPropertyData(original_userIdData,conn);
- original_hostName = conn.getHostName();
- original_description = conn.getDescription();
- changed_userId = changed_hostName = changed_description = false;
- //System.out.println("Inside setPropertySourceInput in adapter");
- }
- /**
- * Returns whether the property value has changed from the default.
- * Only applicable for editable properties.
- * Called by PropertySheet viewer when user presses reset.
- * @return <code>true</code> if the value of the specified property has changed
- * from its original default value; <code>false</code> otherwise.
- */
- public boolean isPropertySet(Object propertyObject)
- {
- String property = (String)propertyObject;
- boolean changed = false;
- if (property.equals(P_DEFAULTUSERID))
- changed = changed_userId;
- else if (property.equals(P_HOSTNAME))
- changed = changed_hostName;
- else if (property.equals(P_DESCRIPTION))
- changed = changed_description;
- return changed;
- }
-
- /**
- * Called when user selects the reset button in property sheet.
- */
- public void resetPropertyValue(Object propertyObject)
- {
- //System.out.println("Inside resetPropertyValue in adapter");
- String property = (String)propertyObject;
- IHost conn = (IHost)propertySourceInput;
- ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
-
- if (property.equals(P_DEFAULTUSERID))
- {
- //sr.updateConnection(null, conn, conn.getSystemType(), conn.getAliasName(),
- // conn.getHostName(), conn.getDescription(), original_userId, USERID_LOCATION_CONNECTION);
- updateDefaultUserId(conn, original_userIdData);
- }
- else if (property.equals(P_HOSTNAME))
- {
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- original_hostName, conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
- }
- else if (property.equals(P_DESCRIPTION))
- {
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- conn.getHostName(), original_description, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
- }
- }
- /**
- * Change the default user Id value
- */
- private void updateDefaultUserId(IHost conn, SystemInheritablePropertyData data)
- {
- int whereToUpdate = IRSEUserIdConstants.USERID_LOCATION_HOST;
- //if (!data.getIsLocal())
- //whereToUpdate = USERID_LOCATION_DEFAULT_SYSTEMTYPE;
- String userId = data.getLocalValue(); // will be "" if !data.getIsLocal(), which results in wiping out local override
- ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- conn.getHostName(), conn.getDescription(), userId, whereToUpdate);
- }
-
- /**
- * Called when user changes property via property sheet.
- */
- public void setPropertyValue(Object property, Object value)
- {
- String name = (String)property;
- IHost conn = (IHost)propertySourceInput;
- ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
-
- if (name.equals(P_DEFAULTUSERID))
- {
- //System.out.println("Testing setPropertyValue: " + value);
- //sr.updateConnection(null, conn, conn.getSystemType(), conn.getAliasName(),
- // conn.getHostName(), conn.getDescription(), (String)value, USERID_LOCATION_CONNECTION);
- updateDefaultUserId(conn, (SystemInheritablePropertyData)value);
- changed_userId = true;
- }
- else if (name.equals(P_HOSTNAME))
- {
- // DKM - don't update unless it really changed
- // defect 57739
- if (!((String)value).equalsIgnoreCase(conn.getHostName()))
- {
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- (String)value, conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
- changed_hostName = true;
- }
- }
- else if (name.equals(P_DESCRIPTION))
- {
- // DKM - don't update unless it really changed
- // defect 57739
- if (!((String)value).equalsIgnoreCase(conn.getDescription()))
- {
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- conn.getHostName(), (String)value, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
- changed_description = true;
- }
- }
- }
-
- // FOR COMMON DELETE ACTIONS
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- */
- public boolean canDelete(Object element)
- {
- if (element instanceof IHost)
- {
- IHost sysCon = (IHost) element;
- if (sysCon.getSystemType().equals(IRSESystemType.SYSTEMTYPE_LOCAL)) return existsMoreThanOneLocalConnection();
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- return !sr.isAnySubSystemConnected((IHost)element);
- }
- return true;
- }
-
- protected boolean existsMoreThanOneLocalConnection()
- {
- IHost[] localCons = RSEUIPlugin.getDefault().getSystemRegistry().getHostsBySystemType(IRSESystemType.SYSTEMTYPE_LOCAL);
- return localCons.length > 1;
- }
-
- /**
- * Perform the delete action.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor)
- {
- boolean ok = true;
- IHost conn = (IHost)element;
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.deleteHost(conn);
- return ok;
- }
-
- // FOR COMMON RENAME ACTIONS
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename popup menu item will be enabled.
- */
- public boolean canRename(Object element)
- {
- return true; // all connections are renamable
- }
- /**
- * Perform the rename action.
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception
- {
- boolean ok = true;
- IHost conn = (IHost)element;
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.renameHost(conn,name); // renames and saves to disk
- return ok;
- }
- /**
- * Return a validator for verifying the new name is correct.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- IHost conn = (IHost)element;
- //return org.eclipse.rse.core.ui.SystemConnectionForm.getConnectionNameValidator(conn); defect 42117
- return org.eclipse.rse.ui.SystemConnectionForm.getConnectionNameValidator(conn.getSystemProfile());
- }
- /**
- * Parent override.
- * <p>
- * Form and return a new canonical (unique) name for this object, given a candidate for the new
- * name. This is called by the generic multi-rename dialog to test that all new names are unique.
- * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
- * <p>
- * Returns profile.connectionName, upperCased
- */
- public String getCanonicalNewName(Object element, String newName)
- {
- IHost conn = (IHost)element;
- return (conn.getSystemProfileName() + "." + newName).toUpperCase(); //$NON-NLS-1$
- }
-
-
- // FOR COMMON DRAG AND DROP ACTIONS
- /**
- * Indicates whether the connection can be dragged.
- * Can't be used for physical copies but rather
- * for views (like the Scratchpad)
- */
- public boolean canDrag(Object element)
- {
- return true;
- }
-
- /**
- * Returns the connection (no phyiscal operation required to drag and subsystem (because it's local)
- */
- public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
- {
- return element;
- }
-
-
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- * This just defaults to getName, but if that is not sufficient override it here.
- */
- public String getMementoHandle(Object element)
- {
- IHost conn = (IHost)element;
- return conn.getSystemProfileName() + "." + conn.getAliasName(); //$NON-NLS-1$
- }
- /**
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element)
- {
- return ISystemMementoConstants.MEMENTO_KEY_CONNECTION;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index d43aa1063..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionSelectionInputProvider.java
+++ /dev/null
@@ -1,151 +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.view;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.model.SystemNewConnectionPromptObject;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This input provider for the System View is used when we want to merely present a
- * list of existing connections for the user to select from, and optionally include
- * the New Connection prompting connection. <br>
- * Used in the {@link org.eclipse.rse.ui.widgets.SystemSelectConnectionForm} class.
- */
-public class SystemViewConnectionSelectionInputProvider extends SystemAbstractAPIProvider
-{
- private boolean showNew = true;
- private SystemNewConnectionPromptObject newConnPrompt;
- private Object[] newConnPromptArray;
- private String[] systemTypes;
-
- /**
- * Constructor
- */
- public SystemViewConnectionSelectionInputProvider()
- {
- super();
- }
-
- /**
- * Specify if the New Connection prompt is to be shown.
- * Default is true.
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- this.showNew = show;
- }
- /**
- * Query whether the New Connection prompt is to be shown or not.
- */
- public boolean getShowNewConnectionPrompt()
- {
- return showNew;
- }
- /**
- * Set the system types to restrict by
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * Return the system types we are restricted by
- */
- public String[] getSystemTypes()
- {
- return systemTypes;
- }
-
- // REQUIRED METHODS...
-
- /**
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getSystemViewRoots()
- */
- public Object[] getSystemViewRoots()
- {
- //System.out.println("Inside getSystemViewRoots. showNew = "+showNew);
- IHost[] conns = null;
- if (systemTypes == null)
- conns = RSEUIPlugin.getTheSystemRegistry().getHosts();
- else
- conns = RSEUIPlugin.getTheSystemRegistry().getHostsBySystemTypes(systemTypes);
- if (showNew)
- {
- if ((conns == null) || (conns.length == 0))
- {
- return getNewConnectionPromptObjectAsArray();
- }
- else
- {
- Object[] allChildren = new Object[conns.length+1];
- allChildren[0] = getNewConnectionPromptObject();
- for (int idx=0; idx<conns.length; idx++)
- allChildren[idx+1] = conns[idx];
- return allChildren;
- }
- }
- else
- return conns;
- }
- private SystemNewConnectionPromptObject getNewConnectionPromptObject()
- {
- if (newConnPrompt == null)
- newConnPrompt = new SystemNewConnectionPromptObject();
- if (systemTypes != null)
- newConnPrompt.setSystemTypes(systemTypes);
- return newConnPrompt;
- }
-
- private Object[] getNewConnectionPromptObjectAsArray()
- {
- if (newConnPromptArray == null)
- newConnPromptArray = new Object[1];
- newConnPromptArray[0] = getNewConnectionPromptObject();
- return newConnPromptArray;
- }
-
- /**
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#hasSystemViewRoots()
- */
- public boolean hasSystemViewRoots()
- {
- return true;
- }
- /**
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#showingConnections()
- */
- public boolean showingConnections()
- {
- return true;
- }
- /**
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getConnectionChildren(org.eclipse.rse.core.model.IHost)
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return null;
- }
- /**
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#hasConnectionChildren(org.eclipse.rse.core.model.IHost)
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return false;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 66e231c2e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDragAdapter.java
+++ /dev/null
@@ -1,341 +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.view;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-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.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DragSourceAdapter;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.part.EditorInputTransfer;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.part.PluginTransferData;
-
-
-/**
- * Drag adapter for dragging objects in the Systems views
- *
- */
-public class SystemViewDataDragAdapter extends DragSourceAdapter
-{
-
-
- ISelectionProvider _selectionProvider;
- public static final char CONNECTION_DELIMITER = ':';
- public static final char RESOURCE_SEPARATOR = '|';
-
- /**
- * Constructor for drag adapter
- *
- */
- public SystemViewDataDragAdapter(ISelectionProvider provider)
- {
- _selectionProvider = provider;
- }
-
- public void dragFinished(DragSourceEvent event)
- {
- if (event.doit == false)
- {
- return;
- }
- }
-
-
- private void serializeObject(Object dragObject, ISystemDragDropAdapter adapter, StringBuffer dataStream)
- {
- // get the subsystem id
- ISubSystem subSystem = null;
- if (dragObject instanceof ISubSystem)
- {
- subSystem = (ISubSystem)dragObject;
- String subSystemId = RSEUIPlugin.getTheSystemRegistry().getAbsoluteNameForSubSystem(subSystem);
- dataStream.append(subSystemId);
- }
- else if (dragObject instanceof IHost)
- {
- IHost connection = (IHost)dragObject;
- String connectionId = RSEUIPlugin.getTheSystemRegistry().getAbsoluteNameForConnection(connection);
- dataStream.append(connectionId);
- }
- else
- {
- subSystem = adapter.getSubSystem(dragObject);
-
- if (subSystem != null)
- {
- String subSystemId = RSEUIPlugin.getTheSystemRegistry().getAbsoluteNameForSubSystem(subSystem);
- dataStream.append(subSystemId);
-
- }
-
- String objectId = adapter.getAbsoluteName(dragObject);
- dataStream.append(":"); //$NON-NLS-1$
- dataStream.append(objectId);
- }
- }
-
- public void dragStart(DragSourceEvent event)
- {
- ISelection selection = _selectionProvider.getSelection();
- if (selection instanceof IStructuredSelection)
- {
- IStructuredSelection ss = (IStructuredSelection) selection;
- Iterator iterator = ss.iterator();
- while (iterator.hasNext())
- {
- Object dragObject = iterator.next();
-
- if (dragObject instanceof IAdaptable)
- {
- ISystemDragDropAdapter adapter = (ISystemDragDropAdapter) ((IAdaptable) dragObject).getAdapter(ISystemDragDropAdapter.class);
- if (adapter == null || !adapter.canDrag(dragObject))
- {
- event.doit = false;
- event.detail = DND.DROP_NONE;
- }
- else
- {
- if (EditorInputTransfer.getInstance().isSupportedType(event.dataType))
- {
- if (adapter instanceof ISystemRemoteElementAdapter)
- {
- if (((ISystemRemoteElementAdapter)adapter).canEdit(dragObject))
- {
- event.doit = true;
- }
- else
- {
- event.doit = false;
- event.detail = DND.DROP_NONE;
- return;
- }
- }
- }
- else
- {
- event.doit = true;
- }
- }
- }
- else
- {
- event.doit = false;
- event.detail = DND.DROP_NONE;
- return;
- }
- }
- }
-
- //event.doit = true;
- }
-
-
- /**
- * Method for determining the source (drag) object(s) and
- * encoding those objects in a byte[]. We encode the profile,
- * connection and subsystem, and then we use ISystemDragDropAdapter.getAbsoluteName()
- * to determine the ID for the object within it's subsystem.
- */
- public void dragSetData(DragSourceEvent event)
- {
- ISelection selection = _selectionProvider.getSelection();
- if (selection instanceof IStructuredSelection)
- {
- IStructuredSelection ss = (IStructuredSelection) selection;
-
- if (PluginTransfer.getInstance().isSupportedType(event.dataType))
- {
- StringBuffer dataStream = new StringBuffer(""); //$NON-NLS-1$
- Iterator iterator = ss.iterator();
- while (iterator.hasNext())
- {
- Object dragObject = iterator.next();
-
- if (dragObject instanceof IAdaptable)
- {
- ISystemDragDropAdapter adapter = (ISystemDragDropAdapter) ((IAdaptable) dragObject).getAdapter(ISystemDragDropAdapter.class);
- if (adapter != null)
- {
- if (adapter.canDrag(dragObject))
- {
- serializeObject(dragObject, adapter, dataStream);
-
- if (iterator.hasNext())
- {
- dataStream.append(RESOURCE_SEPARATOR);
- }
- }
- }
- }
- }
-
- PluginTransferData data = new PluginTransferData("org.eclipse.rse.ui.view.DropActions", dataStream.toString().getBytes()); //$NON-NLS-1$
- event.data = data;
- if (dataStream.length() > 0)
- {
- event.doit = true;
- event.detail = DND.DROP_COPY;
- }
- else
- {
- event.doit = false;
- event.detail = DND.ERROR_CANNOT_INIT_DRAG;
- }
- }
- else if (FileTransfer.getInstance().isSupportedType(event.dataType))
- {
- // external drag and drop
- String[] fileNames = new String[ss.size()];
- Iterator iterator = ss.iterator();
- int i = 0;
- //while (iterator.hasNext())
- //{
- iterator.next();
- /** FIXME - IREmoteFile is systems.core independent now
- if (dragObject instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile) dragObject;
-
- String connectionType = file.getParentRemoteFileSubSystem().getHost().getSystemType();
- if (connectionType.equals("Local"))
- {
- fileNames[i] = file.getAbsolutePath();
- i++;
- }
- }
- */
- //}
- if (i > 0)
- {
- event.data = fileNames;
- }
- }
- else if (TextTransfer.getInstance().isSupportedType(event.dataType))
- {
- String[] texts = new String[ss.size()];
- Iterator iterator = ss.iterator();
- int i = 0;
- while (iterator.hasNext())
- {
- Object dragObject = iterator.next();
- if (dragObject instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) dragObject).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null)
- {
- texts[i] = adapter.getText(dragObject);
- i++;
- }
- }
- }
- if (i > 0)
- {
- event.data = texts;
- }
- }
- else if (EditorInputTransfer.getInstance().isSupportedType(event.dataType))
- {
- EditorInputTransfer.EditorInputData[] inputData = new EditorInputTransfer.EditorInputData[ss.size()];
- Iterator iterator = ss.iterator();
- int i = 0;
-
- IEditorRegistry editRegistry = RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry();
-
- while (iterator.hasNext())
- {
- Object dragObject = iterator.next();
-
- Object adapterObj = ((IAdaptable)dragObject).getAdapter(ISystemRemoteElementAdapter.class);
- if (adapterObj != null)
- {
- ISystemRemoteElementAdapter adapter = (ISystemRemoteElementAdapter)adapterObj;
- if (adapter.canEdit(dragObject))
- {
- ISystemEditableRemoteObject editable = adapter.getEditableRemoteObject(dragObject);
- if (editable != null)
- {
- try
- {
-
- Shell shell = event.display.getActiveShell();
- if (editable.download(shell))
- {
- editable.addAsListener();
- editable.setLocalResourceProperties();
-
- IFile theFile = editable.getLocalResource();
-
- IEditorDescriptor preferredEditor = editRegistry.getDefaultEditor(theFile.getName()); // may be null
- if (preferredEditor == null)
- {
- preferredEditor = getDefaultTextEditor();
-
- }
-
- FileEditorInput fileInput = new FileEditorInput(theFile);
- inputData[i] = EditorInputTransfer.createEditorInputData(preferredEditor.getId(), fileInput);
- i++;
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- }
- if (i > 0)
- {
- event.data = inputData;
- }
- else
- {
- event.data = new EditorInputTransfer.EditorInputData[0];
- event.detail = DND.DROP_NONE;
- }
- }
- }
- }
-
- protected IEditorRegistry getEditorRegistry()
- {
- return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry();
- }
-
- protected IEditorDescriptor getDefaultTextEditor()
- {
- IEditorRegistry registry = getEditorRegistry();
- return registry.findEditor("org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 659df1d5d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDropAdapter.java
+++ /dev/null
@@ -1,348 +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.view;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-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.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.model.SystemScratchpad;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.part.PluginTransferData;
-
-
-/**
- * Drop adapter for dropping objects in the Systems views.
- *
- */
-public class SystemViewDataDropAdapter extends ViewerDropAdapter
-{
- protected Shell shell;
- protected long hoverStart = 0;
-
- protected static final long hoverThreshold = 1500;
- public static final char CONNECTION_DELIMITER = ':';
- public static final String RESOURCE_SEPARATOR = "|"; //$NON-NLS-1$
-
- protected int _sourceType = SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE;
- /**
- * Constructor for the drop adapter
- *
- */
- public SystemViewDataDropAdapter(StructuredViewer viewer)
- {
- super(viewer);
- setFeedbackEnabled(true);
- }
-
- /**
- * Method for determining whether the drop target is a valid target.
- * We could do extra validation on the source (drag) object(s), although
- * that could get expensive. The SWT drag and drop framework calls this
- * method.
- *
- */
- public boolean validateDrop(Object target, int operation, TransferData transferType)
- {
- if (target == null)
- {
- target = this.getViewer().getInput();
- }
- if (target instanceof IAdaptable)
- {
- ISystemDragDropAdapter adapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
- if (adapter != null)
- {
- return adapter.canDrop(target);
- }
- }
-
- return false;
- }
-
- private ArrayList getRSESourceObjects(PluginTransferData transferData)
- {
- byte[] result = transferData.getData();
-
- // get the sources
- //StringTokenizer tokenizer = new StringTokenizer(new String(result), RESOURCE_SEPARATOR);
- String[] tokens = (new String(result)).split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR); //$NON-NLS-1$
-
-
- ArrayList srcObjects = new ArrayList();
- for (int i = 0;i < tokens.length; i++)
- {
- String srcStr = tokens[i];
-
- Object srcObject = getObjectFor(srcStr);
- srcObjects.add(srcObject);
- }
- return srcObjects;
- }
-
- private ArrayList getSourceObjects(Object data)
- {
- ArrayList srcObjects = new ArrayList();
-
- if (srcObjects.isEmpty())
- {
- if (data instanceof PluginTransferData)
- {
- PluginTransferData transferData = (PluginTransferData) data;
- srcObjects = getRSESourceObjects(transferData);
- _sourceType = SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE;
- }
- // different kind of data
- else if (data instanceof IResource[])
- {
- IResource[] resources = (IResource[]) data;
- for (int i = 0; i < resources.length; i++)
- {
- srcObjects.add(resources[i]);
- }
- _sourceType = SystemDNDTransferRunnable.SRC_TYPE_ECLIPSE_RESOURCE;
- }
- else if (data instanceof String[])
- {
- String[] resources = (String[]) data;
- for (int i = 0; i < resources.length; i++)
- {
- String resource = resources[i];
- srcObjects.add(resource);
- }
- _sourceType = SystemDNDTransferRunnable.SRC_TYPE_OS_RESOURCE;
- }
- }
-
- return srcObjects;
- }
-
- /**
- * Called by SWT after the drop have been validated to perform the
- * drop transfer.
- *
- */
- public boolean performDrop(Object data)
- {
- boolean ok = true;
-
- ArrayList srcObjects = getSourceObjects(data);
-
- if (srcObjects.size() > 0)
- {
- Object target = getCurrentTarget();
- if (target == null)
- {
- target = getViewer().getInput();
- }
-
- List rulesList = new ArrayList();
- int j = 0;
- for (int i = 0; i < srcObjects.size(); i++)
- {
- if (srcObjects.get(i) instanceof ISchedulingRule)
- {
- rulesList.add(srcObjects.get(i));
- j++;
- }
- /** FIXME - can't be coupled with IRemoteFile
- else if (srcObjects.get(i) instanceof IRemoteFile)
- {
- rulesList.add(new RemoteFileSchedulingRule((IRemoteFile)srcObjects.get(i)));
- j++;
- }
- */
- }
- /*
- if (target instanceof ISchedulingRule)
- {
- rulesList.add(target);
- j++;
- }
- */
- /** FIXME - can't be coupled with IRemoteFile
- else if (target instanceof IRemoteFile)
- {
- rulesList.add(new RemoteFileSchedulingRule((IRemoteFile)target));
- }
-
- else if (target instanceof IAdaptable)
- {
- ISystemDragDropAdapter targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
-
- if (targetAdapter != null)
- {
- ISubSystem targetSubSystem = targetAdapter.getSubSystem(target);
- rulesList.add(targetSubSystem);
- j++;
- }
- }
- */
- MultiRule rule = null;
- ISchedulingRule[] rules = (ISchedulingRule[])rulesList.toArray(new ISchedulingRule[rulesList.size()]);
-
- if (j > 0) rule = new MultiRule(rules);
-
- SystemDNDTransferRunnable runnable = new SystemDNDTransferRunnable(target, srcObjects, getViewer(), _sourceType);
- // DKM - rules are causing problems at the moment
- runnable.setRule(rule);
-
- if (target instanceof SystemScratchpad)
- {
- runnable.run(new NullProgressMonitor());
- }
- else
- {
- runnable.schedule();
- }
- //ok = runnable.dropOkay();
- ok = true;
- }
- return ok;
- }
-
-
- /**
- * Method for decoding an source object ID to the actual source object.
- * We determine the profile, connection and subsystem, and then
- * we use the SubSystem.getObjectWithKey() method to get at the
- * object.
- *
- */
- private Object getObjectFor(String str)
- {
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- // first extract subsystem id
- int connectionDelim = str.indexOf(":"); //$NON-NLS-1$
- if (connectionDelim == -1) // not subsystem, therefore likely to be a connection
- {
- int profileDelim = str.indexOf("."); //$NON-NLS-1$
- if (profileDelim != -1)
- {
- String profileId = str.substring(0, profileDelim);
- String connectionId = str.substring(profileDelim + 1, str.length());
- ISystemProfile profile = registry.getSystemProfile(profileId);
- return registry.getHost(profile, connectionId);
- }
- }
-
-
- int subsystemDelim = str.indexOf(":", connectionDelim + 1); //$NON-NLS-1$
- if (subsystemDelim == -1) // not remote object, therefore likely to be a subsystem
- {
- return registry.getSubSystem(str);
- }
- else
- {
- String subSystemId = str.substring(0, subsystemDelim);
- String srcKey = str.substring(subsystemDelim + 1, str.length());
-
-
- ISubSystem subSystem = registry.getSubSystem(subSystemId);
- if (subSystem != null)
- {
- Object result = null;
- try
- {
- result = subSystem.getObjectWithAbsoluteName(srcKey);
- }
- catch (SystemMessageException e)
- {
- return e.getSystemMessage();
- }
- catch (Exception e)
- {
- }
- if (result != null)
- {
- return result;
- }
- else
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- msg.makeSubstitution(srcKey, subSystem.getHostAliasName());
- return msg;
- }
- }
- else
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND);
- msg.makeSubstitution(subSystemId);
- return msg;
- }
- }
- }
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
- else
- {
- /*
- // for other cases, use statusbar
- IWorkbenchWindow win = RSEUIPlugin.getActiveWorkbenchWindow();
- if (win != null)
- {
- Shell winShell = RSEUIPlugin.getActiveWorkbenchShell();
- if (winShell != null && !winShell.isDisposed() && winShell.isVisible())
- {
- RSEUIPlugin.logInfo("Using active workbench window as runnable context");
- shell = winShell;
- return win;
- }
- else
- {
- win = null;
- }
- }
- */
-
- irc = new ProgressMonitorDialog(shell);
- RSEUIPlugin.getTheSystemRegistry().setRunnableContext(shell, irc);
- return irc;
- }
- }
-
- public void dragOver(DropTargetEvent event)
- {
- super.dragOver(event);
- event.feedback &= ~DND.FEEDBACK_EXPAND;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDummyObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDummyObject.java
deleted file mode 100644
index 897d0f59c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDummyObject.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.view;
-
-/**
- * Sometimes we need to supply a dummy object in our events just to prevent a crash.
- * In these cases, use this.
- */
-public class SystemViewDummyObject
-{
-
-
- private static SystemViewDummyObject singleton;
-
- /**
- * Constructor for SystemViewDummyObject.
- */
- public SystemViewDummyObject()
- {
- super();
- }
-
- /**
- * Return the singleton of this
- */
- public static SystemViewDummyObject getSingleton()
- {
- if (singleton == null)
- singleton = new SystemViewDummyObject();
- return singleton;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 79d62bd8a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterAdapter.java
+++ /dev/null
@@ -1,564 +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.view;
-import java.util.Vector;
-
-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.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.SystemChildrenContentsType;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystemHelpers;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.filters.SystemFilterSimple;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterName;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionFilter;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-/**
- * Default Adapter for displaying filter objects in tree views.
- * For some subsystems, these are children of SubSystem objects.
- * This class offers default behaviour but can be subclassed to refine the
- * behaviour. If this is done, you must register your subclass with the
- * platform's adapter manager in your plugin class's startup method.
- */
-public class SystemViewFilterAdapter extends AbstractSystemViewAdapter implements ISystemViewElementAdapter
-{
- //private static String translatedFilterString = null;
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
- private SystemComboBoxPropertyDescriptor filterStringsDescriptor;
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given filter object.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- //if (selection.size() != 1)
- // return; // does not make sense adding unique actions per multi-selection
- ISystemFilter filter = (ISystemFilter)selection.getFirstElement();
- if (filter.isTransient())
- return;
- ISubSystemConfiguration ssFactory = SubSystemHelpers.getParentSubSystemConfiguration(filter);
- ssFactory.setConnection(null);
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
- IAction[] actions = adapter.getFilterActions(ssFactory, filter, shell);
- if (actions != null)
- {
- for (int idx=0; idx<actions.length; idx++)
- {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- }
- }
-
- private ISystemFilter getFilter(Object element)
- {
- return (ISystemFilter)element;
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- //return RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILTER_ID);
- ImageDescriptor filterImage = null;
- ISystemFilter filter = getFilter(element);
- if (filter.getProvider() != null)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)filter.getProvider().getAdapter(ISubSystemConfigurationAdapter.class);
- filterImage = adapter.getSystemFilterImage(filter);
- }
- if (filterImage == null)
- filterImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID);
- return filterImage;
- }
-
- /**
- * Return the label for this object. Calls getName on the filter
- */
- public String getText(Object element)
- {
- return getFilter(element).getName();
- }
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- return getFilter(element).getName();
- }
- /**
- * Return the absolute name, versus just display name, of this object
- */
- public String getAbsoluteName(Object element)
- {
- ISystemFilter filter = getFilter(element);
- return filter.getSystemFilterPoolManager().getName() + "." + filter.getParentFilterPool().getName() + "." + filter.getName(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- ISystemFilter filter = getFilter(element);
- if (filter.isTransient())
- return SystemResources.RESID_PP_FILTER_TYPE_VALUE;
- ISubSystemConfiguration ssParentFactory = SubSystemHelpers.getParentSubSystemConfiguration(filter);
- return ssParentFactory.getTranslatedFilterTypeProperty(filter);
- }
-
- /**
- * Return the parent of this object.
- * This will be either a SubSystem object, or a filter object.
- */
- public Object getParent(Object element)
- {
- ISystemFilter filter = getFilter(element);
- if (filter.isTransient())
- return ((SystemFilterSimple)filter).getParent();
- return filter.getParentFilterContainer();
- }
-
- /**
- * Return the children of this filter.
- * This is a combination of nested filters and resolved filter objects.
- */
- public Object[] getChildren(Object element)
- {
- ISystemFilter filter = getFilter(element);
- // transient filters...
- if (filter.isTransient())
- {
- if (filter.isPromptable())
- return checkForNull(processPromptingFilter(filter), true);
-
- Object[] children = null;
- SystemFilterSimple simpleFilter = (SystemFilterSimple)filter;
- String[] filterStrings = simpleFilter.getFilterStrings();
- // 50167pc: The following was a problem, as the parent in a SystemFilterSimpleImpl is not
- // to be trusted, since we tend to use the same instance for each connection in the list.
- ISubSystem ss = (ISubSystem)simpleFilter.getParent();
- String preSelectName = null;
- try
- {
-// Shell shell = getShell();
- // hack to propogate type filters down from connection in select dialogs...
- ISystemViewInputProvider inputProvider = getInput();
- if ((inputProvider instanceof SystemSelectRemoteObjectAPIProviderImpl) &&
- (filterStrings != null) && (filterStrings.length > 0) )
- {
- SystemSelectRemoteObjectAPIProviderImpl ip = (SystemSelectRemoteObjectAPIProviderImpl)inputProvider;
- if (ip.filtersNeedDecoration(element))
- {
- String[] adorned = new String[filterStrings.length];
- for (int idx = 0; idx < filterStrings.length; idx++)
- adorned[idx] = ip.decorateFilterString(element, filterStrings[idx]);
- filterStrings = adorned;
- }
- preSelectName = ip.getPreSelectFilterChild();
- }
-
- // get children from cache if the children have been cached
- if (ss.getSubSystemConfiguration().supportsFilterCaching() && !simpleFilter.isStale() &&
- simpleFilter.hasContents(SystemChildrenContentsType.getInstance())) {
- children = simpleFilter.getContents(SystemChildrenContentsType.getInstance());
- }
- // otherwise, get children and then cache
- else {
- children = checkForNull(ss.resolveFilterStrings(filterStrings), true);
-
- if (ss.getSubSystemConfiguration().supportsFilterCaching()) {
- simpleFilter.setContents(SystemChildrenContentsType.getInstance(), children);
- }
- }
-
- if ((children !=null) && (preSelectName != null))
- {
- Object match = null;
- for (int idx=0; (match==null) && (idx<children.length); idx++)
- {
- Object child = children[idx];
- String objName = getAdapter(child).getName(child);
- if ((objName != null) && (objName.equals(preSelectName)))
- match = child;
- }
- //if (match != null) always reset even if it is null
- if (inputProvider instanceof SystemSelectRemoteObjectAPIProviderImpl)
- {
- ((SystemSelectRemoteObjectAPIProviderImpl) inputProvider).setPreSelectFilterChildObject(match);
- }
- }
- }
- catch (InterruptedException exc)
- {
- children = getCancelledMessageObject();
- }
- catch (Exception exc)
- {
- children = getFailedMessageObject();
- SystemBasePlugin.logError("Exception resolving filters' strings ",exc); //$NON-NLS-1$
- } // message already issued
-
- return children;
- }
-
- if (filter.isPromptable())
- return checkForNull(null, false);
-
- // normal filters...
- //Vector strings = filter.getFilterStringsVector();
- Vector strings = filter.getFilterStringObjectsVector();
- Vector filters = filter.getSystemFiltersVector();
- Vector vChildren = new Vector();
-
- // start with nested filters...
- for (int idx=0; idx < filters.size(); idx++)
- vChildren.addElement(filters.elementAt(idx));
- // continue with resolved filter string objects...
- for (int idx=0; idx < strings.size(); idx++)
- {
- //String filterString = (String)strings.elementAt(idx);
- ISystemFilterString filterString = (ISystemFilterString)strings.elementAt(idx);
- vChildren.addElement(filterString);
- }
-
- // convert whole thing to an array...
- Object[] children = new Object[vChildren.size()];
- for (int idx=0; idx<vChildren.size(); idx++)
- children[idx] = vChildren.elementAt(idx);
-
- return children;
- }
-
- /**
- * Processing a prompting filter...
- */
- private Object[] processPromptingFilter(ISystemFilter filter)
- {
- Object[] children = new SystemMessageObject[1];
- ISystemViewInputProvider inputProvider = getInput();
- if ( (inputProvider != null) && (inputProvider instanceof SystemSelectRemoteObjectAPIProviderImpl) )
- {
- try
- {
- SystemSelectRemoteObjectAPIProviderImpl ip = (SystemSelectRemoteObjectAPIProviderImpl)inputProvider;
- ISystemFilter newFilter = ip.createFilterByPrompting(filter, getShell());
- if (newFilter == null)
- {
- children = getCancelledMessageObject();
- }
- else // filter string successfully created!
- {
- //SystemFilterSimpleImpl simpleFilter = (SystemFilterSimpleImpl)filter;
- //SubSystem ss = (SubSystem)simpleFilter.getParent();
-
- // return "filter created successfully" message object for this node
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FILTERCREATED),
- ISystemMessageObject.MSGTYPE_OBJECTCREATED,filter);
-
- // select the new filter and expand it
- Viewer v = inputProvider.getViewer();
- if ((v!=null) && (v instanceof ISystemResourceChangeListener))
- {
- SystemRegistry 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!
- }
- }
- } catch (Exception exc)
- {
- children = getFailedMessageObject();
- SystemBasePlugin.logError("Exception prompting for filter ",exc); //$NON-NLS-1$
- }
- }
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"returning children");
- return children;
- }
-
- /**
- * Return true if this object has children
- */
- public boolean hasChildren(Object element)
- {
- ISystemFilter filter = getFilter(element);
- if (filter.getFilterStringCount() > 0)
- return true;
- else if (filter.getSystemFilterCount() > 0)
- return true;
- else
- return false;
- }
-
- // Property sheet descriptors defining all the properties we expose in the Property Sheet
-
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- propertyDescriptorArray = new PropertyDescriptor[3];
- int idx = 0;
-
- // parent filter pool
- propertyDescriptorArray[idx] = createSimplePropertyDescriptor(P_PARENT_FILTERPOOL,SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_TOOLTIP);
- // parent filter
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PARENT_FILTER,SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_TOOLTIP);
- // number filter strings
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILTERSTRINGS_COUNT,SystemViewResources.RESID_PROPERTY_FILTERSTRINGS_COUNT_LABEL, SystemViewResources.RESID_PROPERTY_FILTERSTRINGS_COUNT_TOOLTIP);
- }
- return propertyDescriptorArray;
- }
- /**
- * Return our unique property values
- * The parent handles P_TEXT and P_TYPE only, and we augment that here.
- * @param key the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- protected Object internalGetPropertyValue(Object key)
- {
- String name = (String)key;
- ISystemFilter filter = getFilter(propertySourceInput);
- // following not working yet...
- if (name.equals(ISystemPropertyConstants.P_FILTERSTRINGS))
- {
- String[] filterStrings = filter.getFilterStrings();
- filterStringsDescriptor.setValues(filterStrings);
- if ((filterStrings != null) && (filterStrings.length>0))
- return filterStrings[0];
- else
- return "null"; //$NON-NLS-1$
- }
- else if (name.equals(ISystemPropertyConstants.P_FILTERSTRINGS_COUNT))
- {
- int nbrFilterStrings = filter.getFilterStringCount();
- return Integer.toString(nbrFilterStrings);
- }
- else if (name.equals(ISystemPropertyConstants.P_PARENT_FILTER))
- {
- if (filter.isTransient())
- return getTranslatedNotApplicable();
- ISystemFilter parent = filter.getParentFilter();
- if (parent != null)
- return parent.getName();
- else
- return getTranslatedNotApplicable();
- }
- else if (name.equals(ISystemPropertyConstants.P_PARENT_FILTERPOOL))
- {
- if (filter.isTransient())
- return getTranslatedNotApplicable();
- ISystemFilterPool parent = filter.getParentFilterPool();
- if (parent != null)
- return parent.getName();
- else
- return null;
- }
- else
- return null;
- }
-
- // FOR COMMON DELETE ACTIONS
- public boolean showDelete(Object element)
- {
- return !getFilter(element).isTransient();
- }
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- */
- public boolean canDelete(Object element)
- {
- return true;
- }
-
- /**
- * Perform the delete action.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception
- {
- ISystemFilter filter = getFilter(element);
- ISystemFilterPoolManager fpMgr = filter.getSystemFilterPoolManager();
- fpMgr.deleteSystemFilter(filter);
- return true;
- }
-
- // FOR COMMON RENAME ACTIONS
- public boolean showRename(Object element)
- {
- return !getFilter(element).isTransient();
- }
-
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename popup menu item will be enabled.
- */
- public boolean canRename(Object element)
- {
- return true;
- }
- /**
- * Perform the rename action.
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception
- {
- ISystemFilter filter = getFilter(element);
- ISystemFilterPoolManager fpMgr = filter.getSystemFilterPoolManager();
- fpMgr.renameSystemFilter(filter,name);
- return true;
- }
- /**
- * @param element either a filter for a rename action, or a filter pool for a "new" action.
- * @return a validator for verifying the new name is correct.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- ISystemFilter filter = null;
- ISystemFilterPool pool = null;
- Vector filterNames = null;
- if (element instanceof ISystemFilter)
- {
- filter = (ISystemFilter)element;
- pool = filter.getParentFilterPool();
- if (pool != null)
- filterNames = pool.getSystemFilterNames();
- else
- {
- ISystemFilter parentFilter = filter.getParentFilter();
- filterNames = parentFilter.getSystemFilterNames();
- }
- }
- else
- {
- pool = (ISystemFilterPool)element;
- filterNames = pool.getSystemFilterNames();
- }
- /*
- if (filter != null)
- filterNames.removeElement(filter.getName()); // remove current filter's name
- */
- ISystemValidator nameValidator = new ValidatorFilterName(filterNames);
- return nameValidator;
- }
-
- /**
- * Parent override.
- * <p>
- * Form and return a new canonical (unique) name for this object, given a candidate for the new
- * name. This is called by the generic multi-rename dialog to test that all new names are unique.
- * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
- * <p>
- * Returns mgrName.poolName.filterName, upperCased
- */
- public String getCanonicalNewName(Object element, String newName)
- {
- ISystemFilter filter = (ISystemFilter)element;
- if (!filter.isTransient())
- {
- String mgrName = filter.getSystemFilterPoolManager().getName();
- return (mgrName + "." + filter.getParentFilterPool().getName() + "." + newName).toUpperCase(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else
- return newName.toUpperCase();
- }
-
- // FOR COMMON REFRESH ACTIONS
- public boolean showRefresh(Object element)
- {
- return !getFilter(element).isTransient();
- }
-
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showOpenViewActions(Object element)
- {
- return !getFilter(element).isTransient();
- }
-
- /**
- * Test an object to see if it has an attribute with a particular value.
- * From <code>IActionFilter</code> so the popupMenus extension point can use
- * &lt;filter&gt;, &lt;enablement&gt; or &lt;visibility&gt;.
- * We add support for the following attributes:
- * <ol>
- * <li>"filterType"
- * The value is tested against the non-translated filter type.
- * Not all subsystems support different types of filters.
- * <li>name="showChangeFilterStringsPropertyPage".
- * The value is tested against the call to the
- * subsystem configuration method showChangeFilterStringsPropertyPage(SystemFilter).
- * values should be <code>true</code> or <code>false</code>.
- * </ol>
- * @param target the object whose attribute we are testing
- * @param name the attribute to test.
- * @param value the value to test.
- * @return true if the attribute of the given name can be said to have the given value
- * @see IActionFilter#testAttribute(Object, String, String)
- */
- public boolean testAttribute(Object target, String name, String value) {
- boolean result = false;
- if (name.equalsIgnoreCase("filterType")) { //$NON-NLS-1$
- ISystemFilter filter = getFilter(target);
- String type = filter.getType();
- result = (type != null) && (type.length() > 0) && value.equals(type);
- } else if (name.equalsIgnoreCase("showChangeFilterStringPropertyPage")) { //$NON-NLS-1$
- ISystemFilter filter = getFilter(target);
- ISubSystemConfiguration ssf = SubSystemHelpers.getParentSubSystemConfiguration(filter);
- result = (ssf != null) && ssf.showChangeFilterStringsPropertyPage(filter) && value.equals("true"); //$NON-NLS-1$
- } else {
- result = super.testAttribute(target, name, value);
- }
- return result;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 338704e9d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolAdapter.java
+++ /dev/null
@@ -1,286 +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.view;
-import java.util.Vector;
-
-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.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystemHelpers;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Adapter for displaying SystemFilterPool objects in tree views.
- * These are the masters, and only shown in work-with for the master.
- * These are children of SubSystemConfiguration objects
- */
-public class SystemViewFilterPoolAdapter extends AbstractSystemViewAdapter implements ISystemViewElementAdapter
-{
- protected String translatedType;
- //protected Object parent;
-
- // for reset property support
- //private String original_userId, original_port;
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given subsystem object.
- * Calls the method getActions on the subsystem's factory, and places
- * all action objects returned from the call, into the menu.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- //if (selection.size() != 1)
- // return; // does not make sense adding unique actions per multi-selection
- ISystemFilterPool pool = ((ISystemFilterPool)selection.getFirstElement());
- ISubSystemConfiguration ssFactory = SubSystemHelpers.getParentSubSystemConfiguration(pool);
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
- IAction[] actions = adapter.getFilterPoolActions(ssFactory, pool, shell);
- if (actions != null)
- {
- for (int idx=0; idx<actions.length; idx++)
- {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- }
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- //return RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILTERPOOL_ID);
- ImageDescriptor poolImage = null;
- ISystemFilterPool pool = (ISystemFilterPool)element;
- if (pool.getProvider() != null)
- {
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)pool.getProvider().getAdapter(ISubSystemConfigurationAdapter.class);
- poolImage = adapter.getSystemFilterPoolImage(pool);
- }
- if (poolImage == null)
- poolImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID);
- return poolImage;
- }
-
- /**
- * Return the label for this object. Uses getName() on the filter pool object.
- */
- public String getText(Object element)
- {
- return ((ISystemFilterPool)element).getName();
- }
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- return ((ISystemFilterPool)element).getName();
- }
- /**
- * Return the absolute name, versus just display name, of this object
- */
- public String getAbsoluteName(Object element)
- {
- ISystemFilterPool filterPool = (ISystemFilterPool)element;
- return filterPool.getSystemFilterPoolManager().getName() + "." + filterPool.getName(); //$NON-NLS-1$
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- if (translatedType == null)
- translatedType = SystemViewResources.RESID_PROPERTY_FILTERPOOL_TYPE_VALUE;
- return translatedType;
- }
-
- /**
- * Return the parent of this object. The parent of a filter pool is a subsystem factory,
- * in real life. But to a user, it is a subsystem.
- */
- public Object getParent(Object element)
- {
- ISystemFilterPool fp = (ISystemFilterPool)element;
- // hmm, this will only work if a given factory only has one subsystem object...
- ISubSystemConfiguration ssParentFactory = SubSystemHelpers.getParentSubSystemConfiguration(fp);
- return ssParentFactory.getSubSystems(false)[0];
- }
-
- /**
- * Return the children of this object.
- * For filter pools, this is a list of filters.
- */
- public Object[] getChildren(Object element)
- {
- ISystemFilterPool fp = (ISystemFilterPool)element;
- return fp.getSystemFilters();
- }
-
- /**
- * Return true if this object has children. That is, has filters.
- */
- public boolean hasChildren(Object element)
- {
- ISystemFilterPool fp = (ISystemFilterPool)element;
- return fp.getSystemFilterCount() > 0;
- }
-
- // Property sheet descriptors defining all the properties we expose in the Property Sheet
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- propertyDescriptorArray = new PropertyDescriptor[3];
- int idx = 0;
-
- // parent filter pool
- propertyDescriptorArray[idx] = createSimplePropertyDescriptor(P_PARENT_FILTERPOOL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_TOOLTIP);
-
- // parent filter pool's profile
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROFILE, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_TOOLTIP);
-
- // Related connection
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_RELATED_CONNECTION, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_RELATEDCONNECTION_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_RELATEDCONNECTION_TOOLTIP);
-
- }
- return propertyDescriptorArray;
- }
- /**
- * Return our unique property values
- */
- protected Object internalGetPropertyValue(Object key)
- {
- String name = (String)key;
- ISystemFilterPool pool = (ISystemFilterPool)propertySourceInput;
- if (name.equals(ISystemPropertyConstants.P_PARENT_FILTERPOOL))
- return pool.getName();
- else if (name.equals(ISystemPropertyConstants.P_PROFILE))
- return pool.getSystemFilterPoolManager().getName();
- else if (name.equals(ISystemPropertyConstants.P_RELATED_CONNECTION))
- return (pool.getOwningParentName()==null) ? getTranslatedNotApplicable() : pool.getOwningParentName();
- else
- return null;
- }
-
- // FOR COMMON DELETE ACTIONS
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- */
- public boolean canDelete(Object element)
- {
- ISystemFilterPool fp = (ISystemFilterPool)element;
- return fp.isDeletable();
- }
-
- /**
- * Perform the delete action.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception
- {
- ISystemFilterPool fp = (ISystemFilterPool)element;
- ISystemFilterPoolManager fpMgr = fp.getSystemFilterPoolManager();
- fpMgr.deleteSystemFilterPool(fp);
- return true;
- }
-
- // FOR COMMON RENAME ACTIONS
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename menu item will be enabled.
- */
- public boolean canRename(Object element)
- {
- if (!canDelete(element))
- return false;
- ISystemFilterPool fp = (ISystemFilterPool)element;
- return !fp.isNonRenamable();
- }
-
- /**
- * Perform the rename action. Assumes uniqueness checking was done already.
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception
- {
- ISystemFilterPool fp = (ISystemFilterPool)element;
- ISystemFilterPoolManager fpMgr = fp.getSystemFilterPoolManager();
- fpMgr.renameSystemFilterPool(fp,name);
- return true;
- }
- /**
- * Return a validator for verifying the new name is correct.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- ISystemFilterPool fp = (ISystemFilterPool)element;
- ISystemFilterPoolManager mgr = fp.getSystemFilterPoolManager();
- Vector v = mgr.getSystemFilterPoolNamesVector();
- /*
- if (fp != null) // might be called by the New wizard vs rename action
- v.removeElement(fp.getName());
- */
- ISystemValidator nameValidator = new ValidatorFilterPoolName(v);
- //System.out.println("Inside getNameValidator for SystemViewFilterPoolAdapter");
- return nameValidator;
- }
-
- /**
- * Parent override.
- * <p>
- * Form and return a new canonical (unique) name for this object, given a candidate for the new
- * name. This is called by the generic multi-rename dialog to test that all new names are unique.
- * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
- * <p>
- * Returns mgrName.poolName, upperCased
- */
- public String getCanonicalNewName(Object element, String newName)
- {
- String mgrName = ((ISystemFilterPool)element).getSystemFilterPoolManager().getName();
- return (mgrName + "." + newName).toUpperCase(); //$NON-NLS-1$
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 3d566ba3d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolReferenceAdapter.java
+++ /dev/null
@@ -1,379 +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.view;
-import java.util.Vector;
-
-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.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystemHelpers;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Adapter for displaying SystemFilterPool reference objects in tree views.
- * These are children of SubSystem objects
- */
-public class SystemViewFilterPoolReferenceAdapter
- extends AbstractSystemViewAdapter implements ISystemViewElementAdapter
-{
- protected String translatedType;
- //protected Object parent;
-
- // for reset property support
- //private String original_userId, original_port;
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given subsystem object.
- * Calls the method getActions on the subsystem's factory, and places
- * all action objects returned from the call, into the menu.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- //if (selection.size() != 1)
- // return; // does not make sense adding unique actions per multi-selection
- Object element = selection.getFirstElement();
- ISystemFilterPool pool = getFilterPool(element);
- ISubSystemConfiguration ssFactory = getSubSystemConfiguration(pool);
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
-
- IAction[] actions = adapter.getFilterPoolActions(ssFactory, pool, shell);
- if (actions != null)
- {
- for (int idx=0; idx<actions.length; idx++)
- {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- }
- actions = adapter.getFilterPoolReferenceActions(ssFactory, getFilterPoolReference(element), shell);
- if (actions != null)
- {
- //menu.addSeparator();
- for (int idx=0; idx<actions.length; idx++)
- {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- }
- }
-
- private ISubSystemConfiguration getSubSystemConfiguration(ISystemFilterPool pool)
- {
- return SubSystemHelpers.getParentSubSystemConfiguration(pool);
- }
-
- /**
- * <i>Overridden from parent.</i><br>
- * Returns the subsystem that contains this object.
- */
- public ISubSystem getSubSystem(Object element)
- {
- return ((ISubSystem)getFilterPoolReference(element).getProvider());
- }
-
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- ImageDescriptor poolImage = null;
- ISystemFilterPool pool = getFilterPool(element);
- if (pool.getProvider() != null)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)pool.getProvider().getAdapter(ISubSystemConfigurationAdapter.class);
- poolImage = adapter.getSystemFilterPoolImage(pool);
- }
- if (poolImage == null)
- poolImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID);
- return poolImage;
- }
-
- private ISystemFilterPoolReference getFilterPoolReference(Object element)
- {
- return (ISystemFilterPoolReference)element; // get referenced object
- }
-
- private ISystemFilterPool getFilterPool(Object element)
- {
- return getFilterPoolReference(element).getReferencedFilterPool(); // get master object
- }
-
-
- /**
- * @param element the filter pool reference masquerading as an object
- * @return the label for this filter pool reference.
- */
- public String getText(Object element) {
- String result = "unknown"; // $NON-NLS-1$ //$NON-NLS-1$
- ISystemFilterPool pool = getFilterPool(element);
- if (pool != null) {
- result = pool.getName();
-// the following looks like it was copied from the host adapter and not really needed here.
-// boolean qualifyNames = RSEUIPlugin.getTheSystemRegistry().getQualifiedHostNames();
-// if (qualifyNames) {
-// String prefix = SubSystemHelpers.getParentSystemProfile(pool).getName();
-// result = prefix + "." + result;
-// }
- }
- return result;
- }
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- return getFilterPool(element).getName();
- }
- /**
- * Return the absolute name, versus just display name, of this object
- */
- public String getAbsoluteName(Object element)
- {
- ISystemFilterPoolReference filterPoolRef = (ISystemFilterPoolReference)element;
- return filterPoolRef.getReferencedFilterPool().getSystemFilterPoolManager().getName() + "." + filterPoolRef.getName(); //$NON-NLS-1$
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- if (translatedType == null)
- translatedType = SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_TYPE_VALUE;
- return translatedType;
- }
-
- /**
- * Return the parent of this object
- */
- public Object getParent(Object element)
- {
- ISystemFilterPoolReference fpr = getFilterPoolReference(element);
- return SubSystemHelpers.getParentSubSystem(fpr);
- }
-
- /**
- * Return the children of this object.
- * For filter pools, this is a list of filters.
- */
- public Object[] getChildren(Object element)
- {
- ISystemFilterPoolReference fpRef = getFilterPoolReference(element);
- ISubSystem ss = getSubSystem(element);
- return fpRef.getSystemFilterReferences(ss);
- }
-
- /**
- * Return true if this object has children
- */
- public boolean hasChildren(Object element) {
- int count = 0;
- ISystemFilterPoolReference fpRef = getFilterPoolReference(element);
- if (fpRef != null) {
- ISystemFilterPool filterPool = fpRef.getReferencedFilterPool();
- if (filterPool != null) {
- count = filterPool.getSystemFilterCount();
- }
- }
- return count > 0;
- }
-
- // Property sheet descriptors defining all the properties we expose in the Property Sheet
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- propertyDescriptorArray = new PropertyDescriptor[3];
- int idx = 0;
-
- // parent filter pool
- propertyDescriptorArray[idx] = createSimplePropertyDescriptor(P_PARENT_FILTERPOOL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_TOOLTIP);
-
- // parent filter pool's profile
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PROFILE, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_TOOLTIP);
-
- // Related connection
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_RELATED_CONNECTION, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_RELATEDCONNECTION_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_RELATEDCONNECTION_TOOLTIP);
- }
- return propertyDescriptorArray;
- }
- /**
- * Return our unique property values
- */
- protected Object internalGetPropertyValue(Object key)
- {
- String name = (String)key;
- //SystemFilterPoolReference ref = getFilterPoolReference(propertySourceInput);
- ISystemFilterPool pool = getFilterPool(propertySourceInput);
- if (name.equals(ISystemPropertyConstants.P_PARENT_FILTERPOOL))
- return pool.getName();
- else if (name.equals(ISystemPropertyConstants.P_PROFILE))
- return pool.getSystemFilterPoolManager().getName();
- else if (name.equals(ISystemPropertyConstants.P_RELATED_CONNECTION))
- return (pool.getOwningParentName()==null) ? getTranslatedNotApplicable() : pool.getOwningParentName();
- else
- return null;
- }
-
- // FOR COMMON DELETE ACTIONS
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- */
- public boolean canDelete(Object element)
- {
- ISystemFilterPool fp = getFilterPool(element);
- return fp.isDeletable();
- }
-
- /**
- * Perform the delete action.
- * This physically deletes the filter pool and all references.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception
- {
- ISystemFilterPoolReference fpr = getFilterPoolReference(element);
- ISystemFilterPool fp = getFilterPool(element);
- ISystemFilterPoolManager fpMgr = fp.getSystemFilterPoolManager();
- fpMgr.deleteSystemFilterPool(fp);
- //SubSystemConfiguration ssParentFactory = getSubSystemConfiguration(fp);
- //ssParentFactory.deleteFilterPool(fp);
- return true;
- }
-
- // FOR COMMON RENAME ACTIONS
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename menu item will be enabled.
- */
- public boolean canRename(Object element)
- {
- if (!canDelete(element))
- return false;
- ISystemFilterPool fp = getFilterPool(element);
- return !fp.isNonRenamable();
- }
-
- /**
- * Perform the rename action. Assumes uniqueness checking was done already.
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception
- {
- ISystemFilterPool fp = getFilterPool(element);
- ISystemFilterPoolManager fpMgr = fp.getSystemFilterPoolManager();
- fpMgr.renameSystemFilterPool(fp,name);
- //SubSystemConfiguration ssParentFactory = getSubSystemConfiguration(fp);
- //ssParentFactory.renameFilterPool(fp,name);
- return true;
- }
- /**
- * Return a validator for verifying the new name is correct.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- ISystemFilterPool fp = null;
- if (element instanceof ISystemFilterPoolReference)
- fp = getFilterPool(element);
- else
- fp = (ISystemFilterPool)element;
- ISystemFilterPoolManager mgr = fp.getSystemFilterPoolManager();
- Vector v = mgr.getSystemFilterPoolNamesVector();
- /*
- if (fp != null) // might be called by the New wizard vs rename action
- v.removeElement(fp.getName());
- */
- ISystemValidator nameValidator = new ValidatorFilterPoolName(v);
- return nameValidator;
- }
- /**
- * Parent override.
- * <p>
- * Form and return a new canonical (unique) name for this object, given a candidate for the new
- * name. This is called by the generic multi-rename dialog to test that all new names are unique.
- * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
- * <p>
- * Returns mgrName.poolName, upperCased
- */
- public String getCanonicalNewName(Object element, String newName)
- {
- String mgrName = ((ISystemFilterPoolReference)element).getReferencedFilterPoolManagerName();
- return (mgrName + "." + newName).toUpperCase(); //$NON-NLS-1$
- }
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
-
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- * This just defaults to getName, but if that is not sufficient override it here.
- */
- public String getMementoHandle(Object element)
- {
- ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference)element;
- return fpRef.getFullName();
- }
- /**
- * Return what to save to disk to identify this element when it is the input object to a secondary
- * Remote System Explorer perspective.
- */
- public String getInputMementoHandle(Object element)
- {
- Object parent = getParent(element);
- return getAdapter(parent).getInputMementoHandle(parent) + MEMENTO_DELIM + getMementoHandle(element);
- }
- /**
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element)
- {
- return ISystemMementoConstants.MEMENTO_KEY_FILTERPOOLREFERENCE;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 584a234df..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterReferenceAdapter.java
+++ /dev/null
@@ -1,971 +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.view;
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-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.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainerReference;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.SystemChildrenContentsType;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystemHelpers;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemRemoteResourceSet;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterName;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Adapter for displaying SystemFilterReference objects in tree views.
- * These are children of SystemFilterPoolReference and SystemFilterReference objects
- */
-public class SystemViewFilterReferenceAdapter
- extends AbstractSystemViewAdapter
- implements ISystemViewElementAdapter
-{
- //private static String translatedFilterString = null;
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
- //private SystemComboBoxPropertyDescriptor filterStringsDescriptor, filtersDescriptor;
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given filter object.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- //if (selection.size() != 1)
- // return; // does not make sense adding unique actions per multi-selection
- ISystemFilter filter = getFilter(selection.getFirstElement());
- ISubSystemConfiguration ssFactory = getSubSystemConfiguration(filter);
- ISubSystem currentSubSystem = getFilterReference(selection.getFirstElement()).getSubSystem();
- IHost currentConnection = currentSubSystem.getHost();
- ssFactory.setConnection(currentConnection);
- ssFactory.setCurrentSelection(selection.toArray());
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
-
- IAction[] actions = adapter.getFilterActions(ssFactory, filter, shell);
- if (actions != null)
- {
- for (int idx = 0; idx < actions.length; idx++)
- {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- }
- actions = adapter.getFilterReferenceActions(ssFactory, getFilterReference(selection.getFirstElement()), shell);
- if (actions != null)
- {
- for (int idx = 0; idx < actions.length; idx++)
- {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- }
- }
-
- private ISubSystemConfiguration getSubSystemConfiguration(ISystemFilter filter)
- {
- return SubSystemHelpers.getParentSubSystemConfiguration(filter);
- }
- /**
- * <i>Overridden from parent.</i><br>
- * Returns the subsystem that contains this object.
- */
- public ISubSystem getSubSystem(Object element)
- {
- if (element instanceof ISystemFilterReference)
- return (ISubSystem) (((ISystemFilterReference) element).getProvider());
- else
- return null;
- }
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- //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
- {
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)filter.getProvider().getAdapter(ISubSystemConfigurationAdapter.class);
- filterImage = adapter.getSystemFilterImage(filter);
- }
- if (filterImage == null)
- filterImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID);
- return filterImage;
- }
-
- private ISystemFilterReference getFilterReference(Object element)
- {
- return (ISystemFilterReference) element; // get referenced object
- }
- private ISystemFilter getFilter(Object element)
- {
- return getFilterReference(element).getReferencedFilter(); // get master object
- }
-
- /**
- * Return the label for this object. Uses getName() on the filter pool object.
- */
- public String getText(Object element)
- {
- return getFilter(element).getName();
- }
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- return getFilter(element).getName();
- }
- /**
- * Return the absolute name, versus just display name, of this object
- */
- public String getAbsoluteName(Object element)
- {
- ISystemFilter filter = getFilter(element);
- return filter.getSystemFilterPoolManager().getName() + "." + filter.getParentFilterPool().getName() + "." + filter.getName(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- ISystemFilter filter = getFilter(element);
- ISubSystemConfiguration ssParentFactory = getSubSystemConfiguration(filter);
- return ssParentFactory.getTranslatedFilterTypeProperty(filter);
- }
-
- /**
- * Return the parent of this object
- */
- public Object getParent(Object element)
- {
- ISystemFilterReference fr = getFilterReference(element);
- ISystemFilterContainerReference parentContainer = fr.getParent();
- // if parent is a filter (eg, we are nested) that is always the parent...
- if (parentContainer instanceof ISystemFilterReference)
- return parentContainer;
- // else parent is a filter pool. The parent will be the pool only if
- // we are in "Show Filter Pools" mode, else it is the subsystem.
- boolean showFPs = SystemPreferencesManager.getPreferencesManager().getShowFilterPools();
- if (showFPs)
- return parentContainer;
- else
- return fr.getProvider();
- //return fr.getParent();
- }
-
- /**
- * Return the children of this object.
- * For filters, this is one or more of:
- * <ul>
- * <li>filters if nested filters supported
- * <li>filter strings if user has elected to show filter strings in his preferences
- * <li>resolved objects for each filter string if user has elected NOT to show filter strings in his preferences
- * </ul>
- */
- public Object[] getChildren(IProgressMonitor monitor, Object element)
- {
- return internalGetChildren(monitor, element);
- }
-
- /**
- * Return the children of this object.
- * For filters, this is one or more of:
- * <ul>
- * <li>filters if nested filters supported
- * <li>filter strings if user has elected to show filter strings in his preferences
- * <li>resolved objects for each filter string if user has elected NOT to show filter strings in his preferences
- * </ul>
- */
- public Object[] getChildren(Object element)
- {
- return internalGetChildren(null, element);
- }
-
- /*
- * Returns the children of the specified element. If a monitor is passed in then
- * the context is assumed to be modal and, as such, the modal version of ss.resolveFilterStrings
- * is called rather than the main thread version.
- */
- protected synchronized Object[] internalGetChildren(IProgressMonitor monitor, Object element)
- {
- Object[] children = null;
- ISystemFilterReference fRef = getFilterReference(element);
- ISystemFilter referencedFilter = fRef.getReferencedFilter();
- boolean promptable = referencedFilter.isPromptable();
-
- ISubSystem ss = fRef.getSubSystem();
- ISubSystemConfiguration ssf = SubSystemHelpers.getParentSubSystemConfiguration(referencedFilter);
-
- // PROMPTING FILTER?...
- if (promptable)
- {
- children = new SystemMessageObject[1];
- try
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssf.getAdapter(ISubSystemConfigurationAdapter.class);
-
- ISystemFilter newFilter = adapter.createFilterByPrompting(ssf, fRef, getShell());
- if (newFilter == null)
- {
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element);
- }
- else // filter successfully created!
- {
- // return "filter created successfully" message object for this node
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.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))
- {
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(sfr, ISystemResourceChangeEvents.EVENT_SELECT_EXPAND, null);
- Viewer v = inputProvider.getViewer();
- if (v instanceof ISystemResourceChangeListener)
- {
- //sr.fireEvent((ISystemResourceChangeListener)v, event); // only expand in the current viewer, not all viewers!
- sr.postEvent((ISystemResourceChangeListener) v, event); // only expand in the current viewer, not all viewers!
- }
- }
- }
- }
- catch (Exception exc)
- {
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element);
- SystemBasePlugin.logError("Exception prompting for filter ", exc); //$NON-NLS-1$
- }
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"returning children");
- return children;
- }
-
- // NON-PROMPTING FILTER?...
- Object[] nestedFilterReferences = fRef.getSystemFilterReferences(ss);
- int nbrFilterStrings = referencedFilter.getFilterStringCount();
- if (nbrFilterStrings == 0)
- return nestedFilterReferences;
- else
- {
- /*
- // show filter strings
- if (ssf.showFilterStrings())
- {
- SystemFilterStringReference[] refFilterStrings = fRef.getSystemFilterStringReferences();
- if ((nestedFilterReferences == null) || (nestedFilterReferences.length == 0))
- return refFilterStrings;
- if ((refFilterStrings == null) || (refFilterStrings.length == 0))
- return nestedFilterReferences;
- int nbrChildren = nestedFilterReferences.length + refFilterStrings.length;
- children = new Object[nbrChildren];
- int idx=0;
- for (idx=0; idx<nestedFilterReferences.length; idx++)
- children[idx] = nestedFilterReferences[idx];
- for (int jdx=0; jdx<refFilterStrings.length; jdx++)
- children[idx++] = refFilterStrings[jdx];
- return children;
- }
- // resolve filter strings
- else
- */ {
- String[] filterStrings = referencedFilter.getFilterStrings();
-
- try
- {
-
- // hack to propogate type filters down from connection in select dialogs...
- ISystemViewInputProvider inputProvider = getInput();
- if ((inputProvider != null) && (inputProvider instanceof SystemSelectRemoteObjectAPIProviderImpl) &&
- (filterStrings != null) && (filterStrings.length > 0))
- {
- SystemSelectRemoteObjectAPIProviderImpl ip = (SystemSelectRemoteObjectAPIProviderImpl) inputProvider;
- if (ip.filtersNeedDecoration(element))
- {
- String[] adorned = new String[filterStrings.length];
- for (int idx = 0; idx < filterStrings.length; idx++)
- adorned[idx] = ip.decorateFilterString(element, filterStrings[idx]);
- filterStrings = adorned;
- }
- }
-
- boolean doQuery = true;
- if (!referencedFilter.isTransient() &&
- ssf.supportsFilterCaching() &&
- !fRef.isStale() &&
- fRef.hasContents(SystemChildrenContentsType.getInstance()))
- {
- doQuery = false;
- children = fRef.getContents(SystemChildrenContentsType.getInstance());
- if (children != null)
- {
- // check for stale children
- for (int i = 0; i < children.length && !doQuery; i++)
- {
- Object child = children[i];
- if (child instanceof ISystemContainer)
- {
- if (((ISystemContainer)child).isStale())
- {
- doQuery = true;
- fRef.markStale(true);
- }
- }
- }
- }
- }
- if (doQuery)
- {
- Object[] allChildren = null;
-
- if (monitor == null)
- {
- Shell shell = getShell();
- allChildren = ss.resolveFilterStrings(filterStrings);
- }
- else
- {
- allChildren = ss.resolveFilterStrings(monitor, filterStrings);
- }
-
- if (allChildren == null)
- {
- System.out.println("filter children == null!"); //$NON-NLS-1$
- }
- else
- {
- int nbrNestedFilters = (nestedFilterReferences == null) ? 0 : nestedFilterReferences.length;
- children = new Object[nbrNestedFilters + allChildren.length];
- int idx = 0;
- for (idx = 0; idx < nbrNestedFilters; idx++)
- children[idx] = nestedFilterReferences[idx];
- for (int jdx = 0; jdx < allChildren.length; jdx++)
- children[idx++] = allChildren[jdx];
-
-
- if (!referencedFilter.isTransient() && ssf.supportsFilterCaching())
- {
- fRef.setContents(SystemChildrenContentsType.getInstance(), children);
- }
- }
- }
-
- }
- catch (InterruptedException exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "Filter resolving canceled by user."); //$NON-NLS-1$
- }
- catch (Exception exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element);
- SystemBasePlugin.logError("Exception resolving filters' strings ", exc); //$NON-NLS-1$
- } // message already issued
-
- if ((children == null) || (children.length == 0))
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY), ISystemMessageObject.MSGTYPE_EMPTY, element);
- }
- return children;
- }
- }
- }
-
- /**
- * Return true if this object has children.
- * That is, if the referenced filter has nested filters or filter strings.
- */
- public boolean hasChildren(Object element)
- {
- ISystemFilterReference fRef = getFilterReference(element);
- ISystemFilter referencedFilter = fRef.getReferencedFilter();
-
- ISubSystemConfiguration factory = getSubSystemConfiguration(referencedFilter);
- if (factory.supportsFilterChildren())
- {
- int nbrNestedFilters = referencedFilter.getSystemFilterCount();
- int nbrFilterStrings = referencedFilter.getFilterStringCount();
- return (nbrNestedFilters > 0) || (nbrFilterStrings > 0);
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Return true if this object is a "prompting" object that prompts the user when expanded.
- * For such objects, we do not try to save and restore their expansion state on F5 or between
- * sessions.
- * <p>
- * Default is false unless this is a prompting filter
- */
- public boolean isPromptable(Object element)
- {
- boolean promptable = false;
- ISystemFilter filter = getFilter(element);
- promptable = filter.isPromptable();
- //if (!promptable && !SystemPreferencesManager.getPreferencesManager().getShowFilterStrings())
- if (!promptable)
- {
- //if (isCommandFilter(filter) || isJobFilter(filter))
- if (isCommandFilter(filter))
- promptable = true;
- }
- return promptable;
- }
-
- /**
- * <i>Overide of parent method.</i><br>
- * From <samp>IActionFilter</samp> so the popupMenus extension point can use &lt;filter&gt;, &lt;enablement&gt;
- * or &lt;visibility&gt;. We add support is for the following:
- * <ol>
- * <li>name="filterType". The value is tested against the non-translated filter type. Note all subsystems
- * support different types of filters.
- * <li>name="showChangeFilterStringsPropertyPage". The value is tested against the call to the subsystem factory method showChangeFilterStringsPropertyPage(SystemFilter).
- * Compares against "true" (default) or "false".
- * </ol>
- */
- public boolean testAttribute(Object target, String name, String value)
- {
- if (name.equalsIgnoreCase("filterType")) //$NON-NLS-1$
- {
- ISystemFilterReference ref = getFilterReference(target);
- String type = ref.getReferencedFilter().getType();
- if ((type == null) || (type.length() == 0))
- return false;
- else
- return value.equals(type);
- }
- else if (name.equalsIgnoreCase("showChangeFilterStringPropertyPage")) //$NON-NLS-1$
- {
- ISystemFilterReference ref = getFilterReference(target);
- ISubSystemConfiguration ssf = SubSystemHelpers.getParentSubSystemConfiguration(ref.getReferencedFilter());
- if (value.equals("true")) //$NON-NLS-1$
- return ssf.showChangeFilterStringsPropertyPage(ref.getReferencedFilter());
- else
- return !ssf.showChangeFilterStringsPropertyPage(ref.getReferencedFilter());
- }
- else
- return super.testAttribute(target, name, value);
- }
-
- // Property sheet descriptors defining all the properties we expose in the Property Sheet
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- int nbrOfProperties = 4;
- propertyDescriptorArray = new PropertyDescriptor[nbrOfProperties];
- int idx = 0;
- // parent filter pool
- propertyDescriptorArray[idx] = createSimplePropertyDescriptor(P_PARENT_FILTERPOOL, SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_TOOLTIP);
- // parent filter
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_PARENT_FILTER, SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_TOOLTIP);
- // number filter strings
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_FILTERSTRINGS_COUNT, SystemViewResources.RESID_PROPERTY_FILTERSTRINGS_COUNT_LABEL, SystemViewResources.RESID_PROPERTY_FILTERSTRINGS_COUNT_TOOLTIP);
- // Related connection
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_IS_CONNECTION_PRIVATE, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_IS_CONNECTIONPRIVATE_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_IS_CONNECTIONPRIVATE_TOOLTIP);
- }
- return propertyDescriptorArray;
- }
- /**
- * Return our unique property values
- */
- protected Object internalGetPropertyValue(Object key)
- {
- String name = (String) key;
- ISystemFilter filter = getFilter(propertySourceInput);
- if (name.equals(ISystemPropertyConstants.P_FILTERSTRINGS_COUNT))
- {
- int nbrFilterStrings = filter.getFilterStringCount();
- return Integer.toString(nbrFilterStrings);
- }
- else if (name.equals(ISystemPropertyConstants.P_PARENT_FILTER))
- {
- ISystemFilter parent = filter.getParentFilter();
- if (parent != null)
- return parent.getName();
- else
- return getTranslatedNotApplicable();
- }
- else if (name.equals(ISystemPropertyConstants.P_PARENT_FILTERPOOL))
- {
- ISystemFilterPool parent = filter.getParentFilterPool();
- if (parent != null)
- return parent.getName();
- else
- return getTranslatedNotApplicable();
- }
- else if (name.equals(ISystemPropertyConstants.P_IS_CONNECTION_PRIVATE))
- {
- ISystemFilterPool parent = filter.getParentFilterPool();
- return (parent.getOwningParentName()==null) ? getTranslatedNo() : getTranslatedYes();
- }
- else
- return null;
- }
-
- // FOR COMMON DELETE ACTIONS
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- */
- public boolean canDelete(Object element)
- {
- ISystemFilter filter = getFilter(element);
- return !filter.isNonDeletable(); // defect 43190
- //return true;
- }
-
- /**
- * Perform the delete action.
- * This physically deletes the filter pool and all references.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception
- {
- ISystemFilter filter = getFilter(element);
- ISystemFilterPoolManager fpMgr = filter.getSystemFilterPoolManager();
- fpMgr.deleteSystemFilter(filter);
- return true;
- }
-
- // FOR COMMON RENAME ACTIONS
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename menu item will be enabled.
- */
- public boolean canRename(Object element)
- {
- ISystemFilter filter = getFilter(element);
- return !filter.isNonRenamable(); // defect 43190
- //return true;
- }
-
- /**
- * Perform the rename action. Assumes uniqueness checking was done already.
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception
- {
- ISystemFilter filter = getFilter(element);
- ISystemFilterPoolManager fpMgr = filter.getSystemFilterPoolManager();
- fpMgr.renameSystemFilter(filter, name);
- return true;
- }
-
- /**
- * Return a validator for verifying the new name is correct.
- * @param either a filter for a rename action, or a filter pool for a "new" action.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- ISystemFilter filter = null;
- ISystemFilterPool pool = null;
- Vector filterNames = null;
- if (element instanceof ISystemFilterReference)
- {
- filter = getFilter(element);
- pool = filter.getParentFilterPool();
- if (pool != null)
- filterNames = pool.getSystemFilterNames();
- else
- {
- ISystemFilter parentFilter = filter.getParentFilter();
- filterNames = parentFilter.getSystemFilterNames();
- }
- }
- else if (element instanceof ISystemFilter)
- {
- filter = (ISystemFilter) element;
- pool = filter.getParentFilterPool();
- if (pool != null)
- filterNames = pool.getSystemFilterNames();
- else
- {
- ISystemFilter parentFilter = filter.getParentFilter();
- filterNames = parentFilter.getSystemFilterNames();
- }
- }
- else
- {
- pool = (ISystemFilterPool) element;
- filterNames = pool.getSystemFilterNames();
- }
- /*
- if (filter != null)
- {
- filterNames.removeElement(filter.getName()); // remove current filter's name
- System.out.println("Existing names for " + filter.getName());
- for (int idx=0; idx<filterNames.size(); idx++)
- System.out.println("...: " + filterNames.elementAt(idx));
- }
- */
- ISystemValidator nameValidator = new ValidatorFilterName(filterNames);
- return nameValidator;
- }
-
- /**
- * Parent override.
- * <p>
- * Form and return a new canonical (unique) name for this object, given a candidate for the new
- * name. This is called by the generic multi-rename dialog to test that all new names are unique.
- * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
- * <p>
- * Returns mgrName.poolName.filterName, upperCased
- */
- public String getCanonicalNewName(Object element, String newName)
- {
- ISystemFilterReference fRef = (ISystemFilterReference) element;
- ISystemFilter filter = fRef.getReferencedFilter();
- String mgrName = filter.getSystemFilterPoolManager().getName();
- return (mgrName + "." + filter.getParentFilterPool().getName() + "." + newName).toUpperCase(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Don't show "Open in new perspective" if this is promptable
- */
- public boolean showOpenViewActions(Object element)
- {
- ISystemFilter filter = getFilter(element);
- return !filter.isPromptable();
- }
-
-
- /**
- * Don't show generic "Show in Table" if the factory asks not to
- */
- public boolean showGenericShowInTableAction(Object element)
- {
- ISystemFilter filter = getFilter(element);
- ISubSystemConfiguration ssParentFactory = getSubSystemConfiguration(filter);
- return ssParentFactory.showGenericShowInTableOnFilter();
- }
-
- /**
- * Return true if we should show the refresh action in the popup for the element.
- */
- public boolean showRefresh(Object element)
- {
- ISystemFilter filter = getFilter(element);
- ISubSystemConfiguration ssParentFactory = getSubSystemConfiguration(filter);
- return ssParentFactory.showRefreshOnFilter();
- }
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
-
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- * This just defaults to getName, but if that is not sufficient override it here.
- */
- public String getMementoHandle(Object element)
- {
- ISystemFilterReference fRef = getFilterReference(element);
- ISystemFilter referencedFilter = fRef.getReferencedFilter();
- ISystemFilterPool pool = referencedFilter.getParentFilterPool();
- String handle = pool.getReferenceName() + "="; //$NON-NLS-1$
- ISystemFilter parentFilter = referencedFilter.getParentFilter();
- while (parentFilter != null)
- {
- handle += parentFilter.getName() + ";"; //$NON-NLS-1$
- parentFilter = parentFilter.getParentFilter();
- }
- handle += referencedFilter.getName();
- return handle;
- }
- /**
- * Return what to save to disk to identify this element when it is the input object to a secondary
- * Remote System Explorer perspective.
- */
- public String getInputMementoHandle(Object element)
- {
- Object parent = ((ISystemFilterReference) element).getParent(); //getParent(element); // will be filter (nested) or filter pool
- ISystemViewElementAdapter parentAdapter = getAdapter(parent);
- boolean showFPs = SystemPreferencesManager.getPreferencesManager().getShowFilterPools();
- if (parent instanceof ISystemFilterPoolReference) // not a nested filter
- {
- if (!showFPs) // not showing the real parent in GUI?
- {
- parent = parentAdapter.getParent(parent); // get the subsystem parent of the filter pool reference
- parentAdapter = getAdapter(parent); // get the adapter for the subsystem parent
- }
- }
- return parentAdapter.getInputMementoHandle(parent) + MEMENTO_DELIM + getMementoHandle(element);
- }
-
- /**
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element)
- {
- return ISystemMementoConstants.MEMENTO_KEY_FILTERREFERENCE;
- }
-
- /**
- * Somtimes we don't want to remember an element's expansion state, such as for temporarily inserted
- * messages. In these cases return false from this method. The default is true.
- * <p>
- * WE RETURN FALSE IF THIS IS A PROMPTABLE FILTER, COMMAND FILTER OR JOB FILTER.
- */
- public boolean saveExpansionState(Object element)
- {
- boolean savable = true;
- ISystemFilterReference fRef = getFilterReference(element);
- ISystemFilter referencedFilter = fRef.getReferencedFilter();
- boolean promptable = referencedFilter.isPromptable();
- if (promptable)
- savable = false;
- else
- {
- // I thought the types would be set for these filters, but it isn't! Phil.
- /*
- String type = referencedFilter.getType();
- if ((type!=null) && (type.equals("Command") || type.equals("Job")))
- savable = false;
- */
- if (isCommandFilter(referencedFilter))
- savable = false;
- }
- return savable;
- }
-
- /**
- * Return true if the given filter is from a command subsystem
- */
- public static boolean isCommandFilter(ISystemFilter filter)
- {
- ISubSystemConfiguration ssf = (ISubSystemConfiguration) filter.getProvider();
- return ssf.supportsCommands();
- }
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON DRAG AND DROP FUNCTION...
- // ------------------------------------------
- /**
- * drag support is handled directly for filter references, rather than delegated here.
- */
- public boolean canDrag(Object element)
- {
- ISystemFilterReference fRef = getFilterReference(element);
- if (fRef != null)
- {
- if (getSubSystemConfiguration(fRef.getReferencedFilter()).supportsFilterStringExport())
- {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Can this object be added as part of the filter?
- */
- public boolean canDrop(Object element)
- {
- ISystemFilterReference fRef = getFilterReference(element);
- if (fRef != null)
- {
- ISubSystemConfiguration factory = getSubSystemConfiguration(fRef.getReferencedFilter());
- if (factory.supportsDropInFilters())
- {
- // if the drop is handled by the subsystem rather than this adapter, this will be true.
- if (factory.providesCustomDropInFilters())
- {
- return true;
- }
-
- if (!fRef.getReferencedFilter().isNonChangable())
- {
- if (factory.supportsMultiStringFilters())
- {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- public ISystemResourceSet doDrag(SystemRemoteResourceSet set, IProgressMonitor monitor)
- {
- return set;
- }
-
- /**
- * drag support is handled directory for filter references, rather than delegated here.
- */
- public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
- {
- return element;
- }
-
- /**
- * Add the absolute name of the from object to the list of filter strings for this filter
- */
- public Object doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
- {
- if (sameSystemType)
- {
- ISystemFilterReference fRef = getFilterReference(to);
- ISystemFilter filter = fRef.getReferencedFilter();
-
- if (from instanceof ISystemFilterReference)
- {
- ISystemFilter srcFilter = ((ISystemFilterReference) from).getReferencedFilter();
- String[] filterStrings = srcFilter.getFilterStrings();
- for (int i = 0; i < filterStrings.length; i++)
- {
- filter.addFilterString(filterStrings[i]);
- }
- return fRef;
- }
- else if (from instanceof IAdaptable)
- {
- ISystemRemoteElementAdapter radapter = (ISystemRemoteElementAdapter) ((IAdaptable) from).getAdapter(ISystemRemoteElementAdapter.class);
-
- {
-
- String newFilterStr = radapter.getFilterStringFor(from);
- if (newFilterStr != null)
- {
- filter.addFilterString(newFilterStr);
- return fRef;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Validate that the source and target for the drag and drop operation are
- * compatable.
- */
- public boolean validateDrop(Object src, Object target, boolean sameSystem)
- {
- if (!sameSystem)
- {
- if (src instanceof IResource)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- if (target instanceof ISystemFilterReference)
- {
- ISystemFilterReference filterRef = (ISystemFilterReference) target;
- if (getSubSystemConfiguration(filterRef.getReferencedFilter()).supportsMultiStringFilters())
- {
- if (src instanceof ISystemFilterReference)
- {
- // yantzi: wswb2.1.2 (defect 50994) add check for filter types
- String srcType = ((ISystemFilterReference)src).getReferencedFilter().getType();
- String targetType = filterRef.getReferencedFilter().getType();
- if (targetType != null && srcType != null)
- {
- if (targetType.equals(srcType))
- {
- return true;
- }
- }
- else
- {
- return true;
- }
- }
- // check if src has a filter string
- else if (src instanceof IAdaptable)
- {
- ISystemRemoteElementAdapter adapter = (ISystemRemoteElementAdapter) ((IAdaptable) src).getAdapter(ISystemRemoteElementAdapter.class);
- if (adapter != null)
- {
- if (adapter.getFilterStringFor(src) != null)
- {
- return true;
- }
- }
- }
- }
- }
- return false;
- }
-
-
- /*
- * Return whether deferred queries are supported.
- */
- public boolean supportsDeferredQueries()
- {
- return true;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index b3ef5a284..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterStringAdapter.java
+++ /dev/null
@@ -1,282 +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.view;
-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.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Default Adapter for displaying filter string objects in tree views.
- */
-public class SystemViewFilterStringAdapter extends AbstractSystemViewAdapter implements ISystemViewElementAdapter
-{
- //private static String translatedFilterString = null;
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given filter object.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- //if (selection.size() != 1)
- // return; // does not make sense adding unique actions per multi-selection
- ISystemFilterString filterString = getFilterString(selection.getFirstElement());
- if (filterString.getParentSystemFilter().isTransient())
- return;
- /*
- SubSystemConfiguration ssFactory = SubSystemHelpers.getParentSubSystemConfiguration(filterString);
- ssFactory.setConnection(null);
- IAction[] actions = ssFactory.getFilterActions(filter, shell);
- if (actions != null)
- {
- for (int idx=0; idx<actions.length; idx++)
- {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- } */
- }
-
- private ISystemFilterString getFilterString(Object element)
- {
- return (ISystemFilterString)element;
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- ImageDescriptor filterImage = null;
- ISystemFilterString filterString = getFilterString(element);
- if (filterString.getProvider() != null)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)filterString.getProvider().getAdapter(ISubSystemConfigurationAdapter.class);
- filterImage = adapter.getSystemFilterStringImage(filterString);
- }
- if (filterImage == null)
- filterImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERSTRING_ID);
- return filterImage;
- }
-
- /**
- * Return the label for this object. Calls getName on the filter
- */
- public String getText(Object element)
- {
- return getFilterString(element).getString();
- }
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- return getFilterString(element).getString();
- }
- /**
- * Return the absolute name, versus just display name, of this object
- */
- public String getAbsoluteName(Object element)
- {
- ISystemFilterString filterString = getFilterString(element);
- ISystemFilter filter = filterString.getParentSystemFilter();
- return filter.getSystemFilterPoolManager().getName() + "." + filter.getParentFilterPool().getName() + "." + filter.getName() + "." + filterString.getString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- //SystemFilterString filterString = getFilterString(element);
- //if (filterString.getParentSystemFilter().isTransient())
- return SystemResources.RESID_PP_FILTERSTRING_TYPE_VALUE;
- //SubSystemConfiguration ssParentFactory = SubSystemHelpers.getParentSubSystemConfiguration(filterString.getParentSystemFilter());
- //return ssParentFactory.getTranslatedFilterStringTypeProperty(filterString);
- }
-
- /**
- * Return the parent of this object.
- * This will be either a SubSystem object, or a filter object.
- */
- public Object getParent(Object element)
- {
- ISystemFilterString filterString = getFilterString(element);
- return filterString.getParentSystemFilter();
- }
-
- /**
- * Return the children of this filter.
- * This returns an empty list.
- */
- public Object[] getChildren(Object element)
- {
- return null;
- }
-
-
- /**
- * Return true if this object has children. We return false;
- */
- public boolean hasChildren(Object element)
- {
- return false;
- }
-
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- propertyDescriptorArray = new PropertyDescriptor[3];
- // parent filter pool
- propertyDescriptorArray[0] = createSimplePropertyDescriptor(P_PARENT_FILTERPOOL,SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_TOOLTIP);
- // parent filter
- propertyDescriptorArray[1] = createSimplePropertyDescriptor(P_PARENT_FILTER,SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_TOOLTIP);
- // filter string
- propertyDescriptorArray[2] = createSimplePropertyDescriptor(P_FILTERSTRING,SystemViewResources.RESID_PROPERTY_FILTERSTRING_LABEL, SystemViewResources.RESID_PROPERTY_FILTERSTRING_TOOLTIP);
- }
- return propertyDescriptorArray;
- }
- /**
- * Returns the current value for the named property.
- * The parent handles P_TEXT and P_TYPE only, and we augment that here.
- * @param key the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- protected Object internalGetPropertyValue(Object key)
- {
- String name = (String)key;
- ISystemFilterString filterString = getFilterString(propertySourceInput);
-
- if (name.equals(ISystemPropertyConstants.P_FILTERSTRING))
- {
- return filterString.getString();
- }
- else if (name.equals(ISystemPropertyConstants.P_PARENT_FILTER))
- {
- return filterString.getParentSystemFilter().getName();
- }
- else if (name.equals(ISystemPropertyConstants.P_PARENT_FILTERPOOL))
- {
- if (filterString.getParentSystemFilter().isTransient())
- return getTranslatedNotApplicable();
- ISystemFilterPool parent = filterString.getParentSystemFilter().getParentFilterPool();
- if (parent != null)
- return parent.getName();
- else
- return null;
- }
- else
- return null;
- }
-
- // FOR COMMON DELETE ACTIONS
- public boolean showDelete(Object element)
- {
- return !getFilterString(element).getParentSystemFilter().isTransient();
- }
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- */
- public boolean canDelete(Object element)
- {
- return true;
- }
-
- /**
- * Perform the delete action.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception
- {
- ISystemFilterString filterString = getFilterString(element);
- ISystemFilter filter = filterString.getParentSystemFilter();
- ISystemFilterPoolManager fpMgr = filterString.getSystemFilterPoolManager();
- Vector strings = filter.getSystemFiltersVector();
- String[] filterStrings = new String[strings.size()-1];
- for (int idx=0; idx<filterStrings.length; idx++)
- filterStrings[idx] = ((ISystemFilterString)strings.elementAt(idx)).toString();
- strings.remove(filterString);
- fpMgr.updateSystemFilter(filter, filter.getName(), filterStrings);
- return true;
- }
-
- // FOR COMMON RENAME ACTIONS
- public boolean showRename(Object element)
- {
- //return !getFilterString(element).getParentSystemFilter().isTransient();
- return false;
- }
-
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename popup menu item will be enabled.
- */
- public boolean canRename(Object element)
- {
- return false; //true;
- }
- /**
- * Perform the rename action.
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception
- {
- return true;
- }
-
- // FOR COMMON REFRESH ACTIONS
- public boolean showRefresh(Object element)
- {
- return false;
- }
-
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showOpenViewActions(Object element)
- {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewForm.java
deleted file mode 100644
index ba8d6ec38..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewForm.java
+++ /dev/null
@@ -1,579 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.view;
-import java.util.Vector;
-
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.SystemCascadingPulldownMenuAction;
-import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-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.Item;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.Tree;
-
-
-/**
- * This re-usable widget is for a single widget that displays a
- * toolbar underneath which is a systems view tree.
- */
-public class SystemViewForm extends Composite implements ISystemTree
-{
- private ToolBar toolbar = null;
- private ToolBarManager toolbarMgr = null;
- private Button refreshButton, getListButton;
- private SystemView tree = null;
- private ISystemMessageLine msgLine = null;
- private boolean showActions = true;
- private boolean deferLoading = false;
- private boolean requestInProgress = false;
- private ISystemViewInputProvider inputProvider = null;
- private ISystemViewInputProvider emptyProvider = new SystemEmptyListAPIProviderImpl();
- private Vector requestListeners = null;
- public static final int DEFAULT_WIDTH = 300;
- public static final int DEFAULT_HEIGHT = 300;
-
- // the following allows us to identify dialog/wizard hosting this widget so we can
- // disable it's close capability while a remote request is in place.
- protected Object caller;
- protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
-
- // viewer filters
- protected ViewerFilter[] initViewerFilters = null;
-
- /**
- * Constructor
- * @param shell The owning window
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically SWT.NULL
- * @param inputProvider Who is supplying the roots for the system viewer?
- * @param singleSelectionMode Are users allowed to select multiple things at once?
- * @param msgLine where to show messages and tooltip text
- */
- public SystemViewForm(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider,
- boolean singleSelectionMode, ISystemMessageLine msgLine)
- {
- this(shell, parent, style, inputProvider, singleSelectionMode, msgLine, 1, 1);
- }
- /**
- * Constructor when you want to span more than one column or row
- * @param shell The owning window
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically SWT.NULL
- * @param inputProvider Who is supplying the roots for the system viewer?
- * @param singleSelectionMode Are users allowed to select multiple things at once?
- * @param msgLine where to show messages and tooltip text
- * @param horizontalSpan how many columns in parent composite to span
- * @param verticalSpan how many rows in parent composite to span
- */
- public SystemViewForm(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider,
- boolean singleSelectionMode, ISystemMessageLine msgLine,
- int horizontalSpan, int verticalSpan)
- {
- this(shell, parent, style, inputProvider, singleSelectionMode, msgLine, horizontalSpan, verticalSpan, null);
- }
-
- /**
- * Constructor when you want to span more than one column or row
- * @param shell The owning window
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically SWT.NULL
- * @param inputProvider Who is supplying the roots for the system viewer?
- * @param singleSelectionMode Are users allowed to select multiple things at once?
- * @param msgLine where to show messages and tooltip text
- * @param horizontalSpan how many columns in parent composite to span
- * @param verticalSpan how many rows in parent composite to span
- * @param initViewerFilters the initial viewer filters to apply.
- */
- public SystemViewForm(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider,
- boolean singleSelectionMode, ISystemMessageLine msgLine,
- int horizontalSpan, int verticalSpan, ViewerFilter[] initViewerFilters)
- {
- super(parent, style);
- this.inputProvider = inputProvider;
- this.msgLine = msgLine;
- callerInstanceOfWizardPage = (caller instanceof WizardPage);
- callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
- prepareComposite(1, horizontalSpan, verticalSpan);
- if (inputProvider.showActionBar())
- createToolBar(shell);
- if (inputProvider.showButtonBar())
- {
- createButtonBar(this, 2);
- enableButtonBarButtons(false);
- deferLoading = true;
- }
-
- // set viewer filters
- this.initViewerFilters = initViewerFilters;
-
- createSystemView(shell, inputProvider, singleSelectionMode);
-
- if (inputProvider.showActionBar())
- populateToolBar(shell);
-
- addOurSelectionListener();
- }
-
- /**
- * Return the toolbar widget manager
- */
- public ToolBarManager getToolBarManager()
- {
- return toolbarMgr;
- }
- /**
- * Return the system view tree viewer
- */
- public SystemView getSystemView()
- {
- return tree;
- }
- /**
- * Return the system view tree viewer tree widget
- */
- public Tree getTreeControl()
- {
- return tree.getTree();
- }
-
- /**
- * Set the tree's tooltip text
- */
- public void setToolTipText(String tip)
- {
- tree.getTree().setToolTipText(tip);
- }
-
- /**
- * Refresh contents
- */
- public void refresh()
- {
- tree.refreshAll();
- }
-
- /**
- * Reset contents
- */
- public void reset(ISystemViewInputProvider inputProvider)
- {
- this.inputProvider = inputProvider;
- if (deferLoading)
- {
- tree.setSelection(null);
- tree.setInputProvider(emptyProvider);
- enableButtonBarButtons(false);
- }
- else
- {
- tree.setSelection(null);
- tree.setInputProvider(inputProvider);
- }
- }
-
- /*
- * Turn off right-click actions
- *
- NOW SET VIA INPUT PROVIDER METHODS
- public void setShowActions(boolean show)
- {
- this.showActions = show;
- if (tree != null)
- tree.setShowActions(show);
- }*/
-
- /**
- * Disable/Enable all the child controls.
- */
- public void setEnabled(boolean enabled)
- {
- if (toolbar != null)
- toolbar.setEnabled(enabled);
- tree.setEnabled(enabled);
- //if ((tree != null) && (tree.getTree() != null))
- // tree.getTree().setEnabled(enabled);
- //super.setEnabled(enabled);
- }
- /**
- * Register a listener interested in an item is selected in the system view
- * @see #removeSelectionChangedListener(ISelectionChangedListener)
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener)
- {
- tree.addSelectionChangedListener(listener);
- }
- /**
- * Remove a previously set system view selection listener.
- * @see #addSelectionChangedListener(ISelectionChangedListener)
- */
- public void removeSelectionChangedListener(ISelectionChangedListener listener)
- {
- tree.removeSelectionChangedListener(listener);
- }
- /**
- * Add a listener that is informed when a remote list request starts and stops.
- * This allows for the listener to do things like disable the Close button
- */
- public void addListRequestListener(ISystemLongRunningRequestListener listener)
- {
- if (requestListeners == null)
- requestListeners = new Vector();
- requestListeners.addElement(listener);
- }
- /**
- * Add a listener that is informed when a remote list request starts and stops.
- * This allows for the listener to do things like disable the Close button
- */
- public void removeListRequestListener(ISystemLongRunningRequestListener listener)
- {
- if (requestListeners != null)
- requestListeners.removeElement(listener);
- }
-
- /**
- * Return the selection of the tree viewer
- */
- public ISelection getSelection()
- {
- return tree.getSelection();
- }
-
-
- // --------------------------------------------
- // ISystemTree methods to facilitate our GUI...
- // ... all these are delegated to the SystemView tree
- // --------------------------------------------
- /**
- * Returns true if any of the selected items are currently expanded
- */
- public boolean areAnySelectedItemsExpanded()
- {
- return tree.areAnySelectedItemsExpanded();
- }
- /**
- * Returns true if any of the selected items are expandable but not yet expanded
- */
- public boolean areAnySelectedItemsExpandable()
- {
- return tree.areAnySelectedItemsExpandable();
- }
- /**
- * This is called to ensure all elements in a multiple-selection have the same parent in the
- * tree viewer. If they don't we automatically disable all actions.
- * <p>
- * Designed to be as fast as possible by going directly to the SWT widgets
- */
- public boolean sameParent()
- {
- return tree.sameParent();
- }
- /**
- * This is called to accurately get the parent object for the current selection
- * for this viewer.
- * <p>
- * The getParent() method in the adapter is very unreliable... adapters can't be sure
- * of the context which can change via filtering and view options.
- */
- public Object getSelectedParent()
- {
- return tree.getSelectedParent();
- }
- /**
- * This returns the element immediately before the first selected element in this tree level.
- * Often needed for enablement decisions for move up actions.
- */
- public Object getPreviousElement()
- {
- return tree.getPreviousElement();
- }
- /**
- * This returns the element immediately after the last selected element in this tree level
- * Often needed for enablement decisions for move down actions.
- */
- public Object getNextElement()
- {
- return tree.getNextElement();
- }
-
- /**
- * This is called to walk the tree back up to the roots and return the visible root
- * node for the first selected object.
- */
- public Object getRootParent()
- {
- return tree.getRootParent();
- }
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- */
- public Object[] getElementNodes(Object element)
- {
- return tree.getElementNodes(element);
- }
- /**
- * Helper method to determine if a given object is currently selected.
- * Does consider if a child node of the given object is currently selected.
- */
- public boolean isSelectedOrChildSelected(Object parentElement)
- {
- return tree.isSelectedOrChildSelected(parentElement);
- }
-
- /**
- * Return the number of immediate children in the tree, for the given tree node
- */
- public int getChildCount(Object element)
- {
- return tree.getChildCount(element);
- }
-
- /**
- * Called when a property is updated and we need to inform the Property Sheet viewer.
- * There is no formal mechanism for this so we simulate a selection changed event as
- * this is the only event the property sheet listens for.
- */
- public void updatePropertySheet()
- {
- tree.updatePropertySheet();
- }
-
- /**
- * Called to select an object within the tree, and optionally expand it
- */
- public void select(Object element, boolean expand)
- {
- tree.select(element, expand);
- }
-
- /**
- * Returns the tree item of the first selected object. Used for setViewerItem in a resource
- * change event.
- */
- public Item getViewerItem()
- {
- return tree.getViewerItem();
- }
-
- /**
- * Returns true if it is ok to close the dialog or wizard page. Returns false if there
- * is a remote request currently in progress.
- */
- public boolean okToClose()
- {
- return !requestInProgress; //d43433
- }
-
- // -----------------------
- // INTERNAL-USE METHODS...
- // -----------------------
- /**
- * Prepares this composite control and sets the default layout data.
- * @param Number of columns the new group will contain.
- */
- protected Composite prepareComposite(int numColumns,
- int horizontalSpan, int verticalSpan)
- {
- Composite composite = this;
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- data.widthHint = DEFAULT_WIDTH;
- data.heightHint = DEFAULT_HEIGHT;
- data.horizontalSpan = horizontalSpan;
- data.verticalSpan = verticalSpan;
- composite.setLayoutData(data);
- return composite;
- }
-
- protected void createSystemView(Shell shell, ISystemViewInputProvider inputProvider, boolean singleSelectionMode)
- {
- // TREE
- int style = (singleSelectionMode ? SWT.SINGLE : SWT.MULTI) | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
- tree = new SystemView(shell, this, style, deferLoading ? emptyProvider : inputProvider, msgLine, initViewerFilters);
- GridData treeData = new GridData();
- treeData.horizontalAlignment = GridData.FILL;
- treeData.verticalAlignment = GridData.FILL;
- treeData.grabExcessHorizontalSpace = true;
- treeData.grabExcessVerticalSpace = true;
- treeData.widthHint = 300;
- treeData.heightHint= 200;
- tree.getTree().setLayoutData(treeData);
- tree.setShowActions(showActions);
- }
-
- protected void createToolBar(Shell shell)
- {
- toolbar = new ToolBar(this, SWT.FLAT | SWT.WRAP);
- toolbarMgr = new ToolBarManager(toolbar);
- }
-
- protected void populateToolBar(Shell shell)
- {
- SystemNewConnectionAction newConnAction = new SystemNewConnectionAction(shell, false, tree); // false implies not from popup menu
- toolbarMgr.add(newConnAction);
- SystemCascadingPulldownMenuAction submenuAction = new SystemCascadingPulldownMenuAction(shell, tree);
- toolbarMgr.add(submenuAction);
- toolbarMgr.update(false);
- }
-
- protected void createButtonBar(Composite parentComposite, int nbrButtons)
- {
- // Button composite
- Composite composite_buttons = SystemWidgetHelpers.createTightComposite(parentComposite, nbrButtons);
- getListButton = SystemWidgetHelpers.createPushButton(composite_buttons, null, SystemResources.ACTION_VIEWFORM_GETLIST_LABEL, SystemResources.ACTION_VIEWFORM_GETLIST_TOOLTIP);
- refreshButton = SystemWidgetHelpers.createPushButton(composite_buttons, null, SystemResources.ACTION_VIEWFORM_REFRESH_LABEL, SystemResources.ACTION_VIEWFORM_REFRESH_TOOLTIP);
- }
-
-
- protected void addOurSelectionListener()
- {
- // Add the button listener
- SelectionListener selectionListener = new SelectionListener()
- {
- public void widgetDefaultSelected(SelectionEvent event)
- {
- };
- public void widgetSelected(SelectionEvent event)
- {
- Object src = event.getSource();
- if (src==getListButton)
- processGetListButton();
- else if (src==refreshButton)
- processRefreshButton();
- };
- };
- if (getListButton != null)
- getListButton.addSelectionListener(selectionListener);
- if (refreshButton != null)
- refreshButton.addSelectionListener(selectionListener);
-
- }
- protected void addOurMouseListener()
- {
- MouseListener mouseListener = new MouseAdapter()
- {
- public void mouseDown(MouseEvent e)
- {
- //requestActivation();
- }
- };
- toolbar.addMouseListener(mouseListener);
- }
-
- /**
- * Process the refresh button.
- */
- protected void processRefreshButton()
- {
- refreshButton.setEnabled(false);
- getListButton.setEnabled(false);
- requestInProgress = true;
- fireRequestStartEvent();
-
- refresh();
-
- fireRequestStopEvent();
- requestInProgress = false;
- enableButtonBarButtons(true);
- }
-
- /**
- * Process the getList button.
- */
- protected void processGetListButton()
- {
- refreshButton.setEnabled(false);
- getListButton.setEnabled(false);
- requestInProgress = true;
- fireRequestStartEvent();
-
- tree.setInputProvider(inputProvider);
-
- fireRequestStopEvent();
- requestInProgress = false;
- enableButtonBarButtons(true);
- }
-
- /**
- * Enable/Disable refresh and getList buttons.
- * Note that these are mutually exclusive
- */
- protected void enableButtonBarButtons(boolean enableRefresh)
- {
- if (refreshButton != null)
- refreshButton.setEnabled(enableRefresh);
- if (getListButton != null)
- getListButton.setEnabled(!enableRefresh);
- }
-
- /**
- * Fire long running request listener event
- */
- protected void fireRequestStartEvent()
- {
- if (requestListeners != null)
- {
- SystemLongRunningRequestEvent event = new SystemLongRunningRequestEvent();
- for (int idx=0; idx<requestListeners.size(); idx++)
- ((ISystemLongRunningRequestListener)requestListeners.elementAt(idx)).startingLongRunningRequest(event);
- }
- }
-
- /**
- * Fire long running request listener event
- */
- protected void fireRequestStopEvent()
- {
- if (requestListeners != null)
- {
- SystemLongRunningRequestEvent event = new SystemLongRunningRequestEvent();
- for (int idx=0; idx<requestListeners.size(); idx++)
- ((ISystemLongRunningRequestListener)requestListeners.elementAt(idx)).endingLongRunningRequest(event);
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index b677ffcc6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewLabelAndContentProvider.java
+++ /dev/null
@@ -1,475 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-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.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-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;
-import org.eclipse.ui.progress.DeferredTreeContentManager;
-import org.eclipse.ui.progress.PendingUpdateAdapter;
-
-
-/**
- * Provides tree contents for objects that have the ISystemViewElement
- * adapter registered. Also provides label contents, so can be used for
- * both a content and label provider for TreeViewers.
- * <p>
- * This has a general flavour, which is used in most cases, and also has
- * a specialized flavour for universal file systems, which allows restricting
- * the list to files only or folders only. It also allows further subsetting by
- * setting an input filter or filterstring.
- */
-public class SystemViewLabelAndContentProvider extends LabelProvider
- implements ITreeContentProvider, ILabelProvider, ITableLabelProvider
- // ,IResourceChangeListener
-{
- private static final Object[] NO_OBJECTS = new Object[0];
-
- protected Viewer viewer;
- private boolean filesOnly, foldersOnly;
- private String filterString = null;
- private Hashtable resolvedChildrenPerFolder = null; // local cache to improve performance
-
- private DeferredTreeContentManager manager;
- /**
- * The cache of images that have been dispensed by this provider.
- * Maps ImageDescriptor->Image.
- */
- private Map imageTable = new Hashtable(40);
-
- /**
- * Constructor
- */
- public SystemViewLabelAndContentProvider()
- {
- // System.out.println("inside ctor for LCProvider " + this);
- }
- /**
- * Constructor to restrict to remote folders or files
- */
- public SystemViewLabelAndContentProvider(boolean foldersOnly, boolean filesOnly)
- {
- this();
- this.foldersOnly = foldersOnly;
- this.filesOnly = filesOnly;
- }
- /**
- * Set a filter string to subset the list by. For example, "A*.java" or "java,class,"
- * Only valid if filesOnly or foldersOnly mode. If the latter, its recorded and used
- * the next time files are requested from any folder.
- */
- public void setFilterString(String filterString)
- {
- this.filterString = filterString;
-
- flushCache();
- }
- /**
- * Get the current filter string being used to subset the list by.
- * Will be null unless setFilterString has previously been called.
- */
- public String getFilterString()
- {
- return filterString;
- }
-
-
-
- /**
- * Flush the in-memory cache which remembers the result of the last
- * getChildren request when we are in files-only or folders-only
- * mode. Only applies when the two-boolean constructor is used.
- */
- public void flushCache()
- {
- resolvedChildrenPerFolder = null;
- }
-
- /**
- * Return the current viewer we are associated with
- */
- public Viewer getViewer()
- {
- return viewer;
- }
-
- /**
- * The visual part that is using this content provider is about
- * to be disposed. Deallocate all allocated SWT resources.
- */
- public void dispose()
- {
- // AS LONG AS WE DON'T SUPPORT IWORKSPACE OBJECT THIS IS NOT NEEDED.
- // WE LEAVE IT IN BECAUSE IT IS HARMLESS AND MIGHT BE OF VALUE SOMEDAY.
- if (viewer != null)
- {
- Object obj = viewer.getInput();
- if (obj != null)
- {
- if (obj instanceof IWorkspace)
- {
- //IWorkspace workspace = (IWorkspace) obj;
- //workspace.removeResourceChangeListener(this);
- }
- else if (obj instanceof IContainer)
- {
- //IWorkspace workspace = ((IContainer) obj).getWorkspace();
- //workspace.removeResourceChangeListener(this);
- }
- }
- }
- // The following we got from WorkbenchLabelProvider
- if (imageTable != null)
- {
- Collection imageValues = imageTable.values();
- if (imageValues!=null)
- {
- Iterator images = imageValues.iterator();
- if (images!=null)
- while (images.hasNext())
- ((Image)images.next()).dispose();
- imageTable = null;
- }
- }
- }
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getAdapter(Object o)
- {
- ISystemViewElementAdapter adapter = null;
- if (o == null)
- {
- SystemBasePlugin.logWarning("ERROR: null passed to getAdapter in SystemViewLabelAndContentProvider"); //$NON-NLS-1$
- }
- else
- {
- if (o instanceof IAdaptable)
- {
- adapter = (ISystemViewElementAdapter)((IAdaptable)o).getAdapter(ISystemViewElementAdapter.class);
- }
- else
- {
- adapter = (ISystemViewElementAdapter)Platform.getAdapterManager().getAdapter(o,ISystemViewElementAdapter.class);
- }
- if (adapter == null)
- {
- if (!(o instanceof PendingUpdateAdapter))
- {
- SystemBasePlugin.logWarning("ADAPTER IS NULL FOR ELEMENT OF TYPE: " + o.getClass().getName()); //$NON-NLS-1$
- }
- }
- }
- if ((adapter!=null) && (viewer != null))
- {
- Shell shell = null;
- if (viewer instanceof ISystemResourceChangeListener)
- shell = ((ISystemResourceChangeListener)viewer).getShell();
- else
- shell = viewer.getControl().getShell();
- adapter.setShell(shell);
- //System.out.println("Inside getAdapter for LCProvider "+this+", setting viewer of adapter to "+viewer);
- adapter.setViewer(viewer);
- if (viewer.getInput() instanceof ISystemViewInputProvider)
- {
- ISystemViewInputProvider inputProvider = (ISystemViewInputProvider)viewer.getInput();
- //inputProvider.setShell(shell); this is now done in the getInput() method of viewer.
- adapter.setInput(inputProvider);
- }
- }
- else if (viewer == null)
- SystemBasePlugin.logWarning("VIEWER IS NULL FOR SYSTEMVIEWLABELANDCONTENTPROVIDER"); //$NON-NLS-1$
- return adapter;
- }
-
- /**
- * Cancel any jobs that are fetching content from the given location.
- * @param location
- */
- public void cancelJobs(Object location)
- {
- if (manager != null) {
- manager.cancel(location);
- }
- }
-
- protected boolean supportsDeferredQueries()
- {
- //IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- //return store.getBoolean(ISystemPreferencesConstants.USE_DEFERRED_QUERIES);
- return true; // DKM now enforcing deferred queries
- }
-
-
- /**
- * @see ITreeContentProvider
- */
- public Object[] getChildren(Object element)
- {
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (supportsDeferredQueries())
- {
- if (manager != null && adapter.supportsDeferredQueries())
- {
- ISubSystem ss = adapter.getSubSystem(element);
- if (ss != null)
- {
- // if (ss.isConnected())
- {
-
- Object[] children = manager.getChildren(element);
- if (children != null)
- {
- // This will be a placeholder to indicate
- // that the real children are being fetched
- return children;
- }
- }
- }
- }
- }
-
-
- //System.out.println("inside getChildren for landcProvider");
- //System.out.println("...element = " + element);
- //System.out.println("...adapter = " + adapter);
- if (adapter != null)
- {
- // we first test to see if this is an expand-to filter in effect for this
- // object, and if so use it...
- if ((viewer instanceof SystemView) && (((SystemView)viewer).getSystemViewPart() != null) &&
- (adapter instanceof ISystemRemoteElementAdapter))
- {
- String expandToFilter = ((SystemView)viewer).getExpandToFilter(element);
- if (expandToFilter != null)
- return adapter.getChildrenUsingExpandToFilter(element, expandToFilter);
- }
- Object[] children = null;
- // The re-usable Eclipse GUI widgets are not very efficient.
- // The are always re-asking for children, which for remote requests
- // causes a lot of flashing and unnecessary trips to the host.
- // To overcome this, once we successfully resolve a request,
- // we remember the result so on the subsequent request for the
- // same files or folders, we can return that remembered cache.
- // The tricky part is what to key each request by. We use the element
- // as the key ... this is the parent folder which children are being
- // asked for. However, for the same folder we will be asked for
- // folders and files in separate requests. It turns out this is not
- // not a problem though, because a separate instance of us is used
- // for files versus folders so each maintains its own cache.
-
- if ((filesOnly || foldersOnly) && (resolvedChildrenPerFolder != null))
- {
- children = (Object[])resolvedChildrenPerFolder.get(element);
- if (children != null) // found cached list?
- return children; // return it to caller
- }
-
- children = adapter.getChildren(element);
-
- if ((filesOnly || foldersOnly) &&
- // an array of one SystemMessageObject item implies some kind of error, so don't cache...
- ((children.length != 1) || !(children[0] instanceof SystemMessageObject)) )
- {
- if (resolvedChildrenPerFolder == null)
- resolvedChildrenPerFolder = new Hashtable();
- resolvedChildrenPerFolder.put(element, children);
- }
-
- return children;
- }
- return NO_OBJECTS;
- }
- /**
- * @see ITreeContentProvider
- */
- public Object[] getElements(Object element)
- {
- return getChildren(element);
- }
- /**
- * @see ITreeContentProvider
- */
- public Object getParent(Object element)
- {
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (adapter != null)
- return adapter.getParent(element);
- return null;
- }
- /**
- * hasChildren method comment.
- * This method has been optimized over its original code so
- * that we don't actually retrieve all the children (horrors!)
- * just to decide if it has children. For performance reasons we
- * just assume if it can have children it does. That means we always
- * get a plus but that is way better than a very slow remote
- * system query just to decide if we want a plus or not!
- */
- public boolean hasChildren(Object element)
- {
- //return getChildren(element).hasNext();
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (adapter != null)
- {
- return adapter.hasChildren(element);
- }
- if (manager != null) {
- if (manager.isDeferredAdapter(element))
- return manager.mayHaveChildren(element);
- }
- return false;
- }
- /**
- * inputChanged method comment.
- * AS LONG AS WE DON'T SUPPORT IWORKSPACE OBJECT THIS IS NOT NEEDED.
- * WE LEAVE IT IN BECAUSE IT IS HARMLESS AND MIGHT BE OF VALUE SOMEDAY.
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- //System.out.println("Inside LCProvider "+this+". viewer = " + viewer);
- this.viewer = viewer;
- if (newInput instanceof IWorkspace)
- {
- //IWorkspace workspace = (IWorkspace)newInput;
- //workspace.addResourceChangeListener(this);
- }
- else if (newInput instanceof IContainer)
- {
- //IWorkspace workspace = ((IContainer)newInput).getWorkspace();
- //workspace.addResourceChangeListener(this);
- }
- if (viewer instanceof AbstractTreeViewer)
- {
- manager = new DeferredTreeContentManager(this, (AbstractTreeViewer) viewer);
- }
- }
-
- public Image getColumnImage(Object element, int columnIndex)
- {
- return getImage(element);
- }
- public String getColumnText(Object element, int columnIndex)
- {
- return getText(element);
- }
- public Image getImage(Object element)
- {
- ISystemViewElementAdapter adapter = getAdapter(element);
- //System.out.println("Inside getImage. element = " + element + ", adapter = " + adapter);
- if (adapter == null)
- return null;
- /*
- boolean isOpen = false;
- if (viewer instanceof AbstractTreeViewer)
- {
- AbstractTreeViewer atv = (AbstractTreeViewer)viewer;
- isOpen = true; //atv.getExpandedState(element);
- //System.out.println("In getImage for " + adapter.getName(element) + ": isOpen = " + isOpen);
- }
- ImageDescriptor descriptor = adapter.getImageDescriptor(element, isOpen);
- */
- ImageDescriptor descriptor = adapter.getImageDescriptor(element);
- //System.out.println("...descriptor = " + descriptor);
-
- if (descriptor == null)
- return null;
- //add any annotations to the image descriptor
- descriptor = decorateImage(descriptor, element);
- //obtain the cached image corresponding to the descriptor
- Image image = (Image) imageTable.get(descriptor);
- if (image == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- //System.out.println("...image = " + image);
- return image;
- }
- /**
- * Returns the label text for the given object.
- */
- public String getText(Object element)
- {
- ISystemViewElementAdapter adapter = getAdapter(element);
- //System.out.println("INSIDE GETTEXT FOR SVLandCprovider: " + element + ", adapter = " + adapter);
- if (adapter == null)
- {
- IWorkbenchAdapter wadapter = (IWorkbenchAdapter)((IAdaptable) element).getAdapter(IWorkbenchAdapter.class);
-
- if (wadapter == null)
- {
- return super.getText(element);
- }
- return wadapter.getLabel(element);
- }
- //return the decorated label (FROM WorkbenchLabelProvider)
- return decorateText(adapter.getText(element), element);
- }
-
- /**
- * Returns an image descriptor that is based on the given descriptor,
- * but decorated with additional information relating to the state
- * of the provided object.
- *
- * Subclasses may reimplement this method to decorate an object's
- * image.
- * @see org.eclipse.jface.resource.ImageDescriptor
- */
- protected ImageDescriptor decorateImage(ImageDescriptor input, Object element)
- {
- return input;
- }
- /**
- * Returns a label that is based on the given label,
- * but decorated with additional information relating to the state
- * of the provided object.
- *
- * Subclasses may implement this method to decorate an object's
- * label.
- */
- protected String decorateText(String input, Object element)
- {
- return input;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMenuListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMenuListener.java
deleted file mode 100644
index 371466cd5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMenuListener.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.view;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.rse.ui.Mnemonics;
-import org.eclipse.rse.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.events.ArmEvent;
-import org.eclipse.swt.events.ArmListener;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Widget;
-
-
-/**
- * A class that listens for menu show events for the purpose of applying mnemonics
- * to the menu items.
- */
-public class SystemViewMenuListener implements IMenuListener, MenuListener, ArmListener
-{
-
-
- protected boolean menuListenerAdded = false;
- protected boolean menuMnemonicsAdded = false;
- protected boolean doOnce = false;
- protected boolean armListeners = false;
- protected Mnemonics m = new Mnemonics();
- protected ISystemMessageLine msgLine;
-
- /**
- * Default constructor
- */
- public SystemViewMenuListener()
- {
- }
- /**
- * Constructor for a persistent menu (vs a popup that's fresh each time)
- */
- public SystemViewMenuListener(boolean doOnce)
- {
- this.doOnce = doOnce;
- }
- /**
- * Enable tooltip text for the menu items too?
- * Requires a message line to display the text on.
- */
- public void setShowToolTipText(boolean set, ISystemMessageLine msgLine)
- {
- this.armListeners = set;
- this.msgLine = msgLine;
- }
-
- // ---------------------
- // IMenuListener methods
- // ---------------------
- /**
- * Called when the context menu is about to open.
- */
- public void menuAboutToShow(IMenuManager menu)
- {
- if (!menuListenerAdded)
- {
- if (menu instanceof MenuManager)
- {
- Menu m = ((MenuManager)menu).getMenu();
- if (m != null)
- {
- menuListenerAdded = true;
- m.addMenuListener(this);
- }
- }
- }
- }
-
- // --------------------
- // MenuListener methods
- // --------------------
- /**
- * Menu hidden
- */
- public void menuHidden(MenuEvent event)
- {
-
- }
- /**
- * Menu shown
- */
- public void menuShown(MenuEvent event)
- {
- if (!menuMnemonicsAdded || !doOnce)
- {
- m.clear();
- if (!armListeners)
- m.setMnemonics((Menu)event.getSource());
- else
- m.setMnemonicsAndArmListener((Menu)event.getSource(), this);
- menuMnemonicsAdded = true;
- if (doOnce)
- ((Menu)event.getSource()).removeMenuListener(this);
- }
- }
- // --------------------
- // ArmListener methods
- // --------------------
- /**
- * Menu item is currently selected by user. Try to show tooltip text.
- */
- public void widgetArmed(ArmEvent event)
- {
- if (msgLine == null)
- return;
- msgLine.clearMessage();
- Widget w = event.widget;
- //System.out.println("inside widgetArmed. w = "+w.getClass().getName());
- if (w instanceof MenuItem)
- {
- MenuItem mi = (MenuItem)w;
- Object data = mi.getData();
- //System.out.println("... data = "+data+", msgLine null? "+(msgLine==null));
- if (data != null)
- {
- String tip = null; //data.getClass().getName();
- if (data instanceof ActionContributionItem)
- tip = ((ActionContributionItem)data).getAction().getToolTipText();
- else if (data instanceof SystemSubMenuManager)
- tip = ((SystemSubMenuManager)data).getToolTipText();
- if (tip != null)
- msgLine.setMessage(tip);
- }
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 1aa0340a5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMessageAdapter.java
+++ /dev/null
@@ -1,195 +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.view;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-
-/**
- * Adapter for displaying temporary message objects when an expand fails or is cancelled.
- * <p>
- */
-public class SystemViewMessageAdapter
- extends AbstractSystemViewAdapter implements ISystemViewElementAdapter
-{
-
- /**
- * Add actions to context menu.
- * We don't add any for message objects, at this point.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- ISystemMessageObject msg = (ISystemMessageObject)element;
- int type = msg.getType();
- if (type==ISystemMessageObject.MSGTYPE_ERROR)
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_ERROR_ID);
- else if (type==ISystemMessageObject.MSGTYPE_CANCEL)
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_INFO_TREE_ID);
- // DY: icon vetoed by UCD
- // return RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_CANCEL_ID);
- else if (type==ISystemMessageObject.MSGTYPE_EMPTY)
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EMPTY_ID);
- else if (type==ISystemMessageObject.MSGTYPE_OBJECTCREATED)
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_OK_ID);
- else
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_INFO_TREE_ID);
- }
-
- /**
- * Return the label for this object. Uses getMessage() on the given ISystemMessageObject object.
- */
- public String getText(Object element)
- {
- ISystemMessageObject msg = (ISystemMessageObject)element;
- return msg.getMessage();
- }
- /**
- * Return the absolute name, versus just display name, of this object.
- * Just uses getText(element);
- */
- public String getAbsoluteName(Object element)
- {
- return getText(element);
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- return SystemViewResources.RESID_PROPERTY_MESSAGE_TYPE_VALUE;
- }
-
- /**
- * Return the parent of this object.
- */
- public Object getParent(Object element)
- {
- ISystemMessageObject msg = (ISystemMessageObject)element;
- return msg.getParent();
- }
-
- /**
- * Return the children of this object. Not applicable for us.
- */
- public Object[] getChildren(Object element)
- {
- return null;
- }
-
- /**
- * Return true if this object has children. Always false for us.
- */
- public boolean hasChildren(Object element)
- {
- return false;
- }
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
-
- return null;
- }
- /**
- * Return our unique property values
- */
- public Object internalGetPropertyValue(Object key)
- {
- return null;
- }
- /**
- * Don't show delete
- */
- public boolean showDelete(Object element)
- {
- return false;
- }
-
- /**
- * Don't show rename
- */
- public boolean showRename(Object element)
- {
- return false;
- }
-
- /**
- * Don't show refresh
- */
- public boolean showRefresh(Object element)
- {
- return false;
- }
-
- /**
- * Don't show "Open in new perspective"
- */
- public boolean showOpenViewActions(Object element)
- {
- return false;
- }
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
-
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- * This just defaults to getName, but if that is not sufficient override it here.
- */
- public String getMementoHandle(Object element)
- {
- return getName(element);
- }
- /**
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element)
- {
- return "Msg"; //$NON-NLS-1$
- }
-
- /**
- * Somtimes we don't want to remember an element's expansion state, such as for temporarily inserted
- * messages. In these cases return false from this method. The default is true.
- * <p>
- * WE RETURN FALSE.
- */
- public boolean saveExpansionState(Object element)
- {
- return false;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index e4fa0b699..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewNewConnectionPromptAdapter.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-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;
-
-
-/**
- * Adapter class for new connection prompt objects.
- */
-public class SystemViewNewConnectionPromptAdapter extends SystemViewPromptableAdapter {
-
- /**
- * @see org.eclipse.rse.ui.view.SystemViewPromptableAdapter#getRunAction(org.eclipse.swt.widgets.Shell)
- */
- protected SystemRunAction getRunAction(Shell shell) {
- return (new SystemRunAction(SystemResources.ACTION_NEWCONN_LABEL, SystemResources.ACTION_NEWCONN_TOOLTIP,
- 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
deleted file mode 100644
index 4202d8e91..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java
+++ /dev/null
@@ -1,1906 +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.view;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-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.SystemPreferencesManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemPreferenceChangeEvent;
-import org.eclipse.rse.core.model.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.core.model.ISystemPreferenceChangeListener;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.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;
-import org.eclipse.rse.ui.actions.SystemCollapseAllAction;
-import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
-import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.actions.SystemPreferenceQualifyConnectionNamesAction;
-import org.eclipse.rse.ui.actions.SystemPreferenceRestoreStateAction;
-import org.eclipse.rse.ui.actions.SystemPreferenceShowFilterPoolsAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAllAction;
-import org.eclipse.rse.ui.actions.SystemStartCommunicationsDaemonAction;
-import org.eclipse.rse.ui.actions.SystemWorkWithProfilesAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IElementFactory;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.part.CellEditorActionHandler;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.ISetSelectionTarget;
-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.
- */
-public class SystemViewPart
- extends ViewPart
- implements ISetSelectionTarget, ISystemShellProvider, ISystemMessageLine, IElementFactory, IPersistableElement, IAdapterFactory, ISystemPreferenceChangeListener, ISelectionChangedListener, IRSEViewPart
-{
-
- public class ToggleLinkingAction extends Action
- {
- public ToggleLinkingAction(SystemViewPart viewPart, String label)
- {
- super(label);
- setChecked(isLinkingEnabled);
- }
-
- public void run()
- {
- toggleLinkingEnabled();
- setChecked(isLinkingEnabled);
- }
- }
-
- protected SystemView systemView;
- protected ISystemViewInputProvider input = null;
- protected String message, errorMessage;
- protected SystemMessage sysErrorMessage;
- protected IStatusLineManager statusLine = null;
- protected boolean inputIsRoot = true;
- protected boolean doTimings = false;
- protected boolean isLinkingEnabled = false;
-
- protected SystemElapsedTimer timer;
- protected FrameList frameList;
- protected SystemViewPartGotoActionGroup gotoActionGroup;
- protected ToggleLinkingAction toggleLinkingAction;
-
- // remember-state variables...
-
- protected IMemento fMemento;
- protected IAdapterManager platformManager;
- // preference toggle actions that need to be updated when preferences change
- protected SystemPreferenceQualifyConnectionNamesAction qualifyConnectionNamesAction;
- protected SystemPreferenceShowFilterPoolsAction showFilterPoolsAction;
- protected SystemPreferenceRestoreStateAction restoreStateAction;
- //protected SystemPreferenceShowFilterStringsAction showFilterStringsAction;
- protected static SystemWorkWithProfilesAction wwProfilesAction;
- // copy and paste actions
- protected SystemCopyToClipboardAction _copyAction;
- protected SystemPasteFromClipboardAction _pasteAction;
-
- // Persistence tags.
- static final String TAG_RELEASE = "release"; //$NON-NLS-1$
- static final String TAG_SELECTION = "selection"; //$NON-NLS-1$
- static final String TAG_EXPANDED_TO = "expandedTo"; //$NON-NLS-1$
- static final String TAG_EXPANDED = "expanded"; //$NON-NLS-1$
- static final String TAG_ELEMENT = "element"; //$NON-NLS-1$
- static final String TAG_PATH = "path"; //$NON-NLS-1$
- static final String TAG_FILTER = "filter"; //$NON-NLS-1$
- static final String TAG_INPUT = "svInput"; //$NON-NLS-1$
- static final String TAG_VERTICAL_POSITION = "verticalPosition"; //$NON-NLS-1$
- static final String TAG_HORIZONTAL_POSITION = "horizontalPosition"; //$NON-NLS-1$
- static final String TAG_SHOWFILTERPOOLS = "showFilterPools"; //$NON-NLS-1$
- static final String TAG_SHOWFILTERSTRINGS = "showFilterStrings"; //$NON-NLS-1$
- static final String TAG_LINKWITHEDITOR = "linkWithEditor"; //$NON-NLS-1$
-
- public static final String MEMENTO_DELIM = "///"; //$NON-NLS-1$
-
- // constants
- public static final String ID = "org.eclipse.rse.ui.view.systemView"; // matches id in plugin.xml, view tag //$NON-NLS-1$
-
- /**
- * SystemViewPart constructor.
- */
- public SystemViewPart()
- {
- super();
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"INSIDE CTOR FOR SYSTEMVIEWPART.");
- }
- /**
- * Easy access to the TreeViewer object
- */
- public SystemView getSystemView()
- {
- return systemView;
- }
-
- public Viewer getRSEViewer()
- {
- return systemView;
- }
-
- /**
- * When an element is added/deleted/changed/etc and we have focus, this
- * method is called. See SystemStaticHelpers.selectReveal method.
- */
- public void selectReveal(ISelection selection)
- {
- systemView.setSelection(selection, true);
- }
-
- /**
- * Returns the name for the given element.
- * Used as the name for the current frame.
- */
- protected String getFrameName(Object element)
- {
- return ((ILabelProvider) getSystemView().getLabelProvider()).getText(element);
- }
-
- /**
- * Returns the tool tip text for the given element.
- * Used as the tool tip text for the current frame, and for the view title tooltip.
- */
- protected String getFrameToolTipText(Object element)
- {
- return ((ILabelProvider) getSystemView().getLabelProvider()).getText(element);
- }
-
- public void toggleLinkingEnabled()
- {
- isLinkingEnabled = !isLinkingEnabled;
- if (isLinkingEnabled)
- {
- IWorkbenchWindow activeWindow = SystemBasePlugin.getActiveWorkbenchWindow();
- IWorkbenchPage activePage = activeWindow.getActivePage();
- IEditorPart editor = activePage.getActiveEditor();
- if (editor != null)
- {
- editorActivated(editor);
- }
- }
- }
-
- /**
- * An editor has been activated. Sets the selection in this navigator
- * to be the editor's input, if linking is enabled.
- *
- * @param editor the active editor
- */
- protected void editorActivated(IEditorPart editor)
- {
- if (!isLinkingEnabled)
- return;
-
- IEditorInput input = editor.getEditorInput();
- if (input instanceof IFileEditorInput)
- {
- IFileEditorInput fileInput = (IFileEditorInput) input;
- fileInput.getFile();
- /* FIXME - can't couple this view to files ui
- IFile file = fileInput.getFile();
- SystemIFileProperties properties = new SystemIFileProperties(file);
- Object rmtEditable = properties.getRemoteFileObject();
- Object remoteObj = null;
- if (rmtEditable != null && rmtEditable instanceof ISystemEditableRemoteObject)
- {
- ISystemEditableRemoteObject editable = (ISystemEditableRemoteObject) rmtEditable;
- remoteObj = editable.getRemoteObject();
-
- }
- else
- {
- String subsystemId = properties.getRemoteFileSubSystem();
- String path = properties.getRemoteFilePath();
- if (subsystemId != null && path != null)
- {
- ISubSystem subSystem = RSEUIPlugin.getTheSystemRegistry().getSubSystem(subsystemId);
- if (subSystem != null)
- {
- if (subSystem.isConnected())
- {
- try
- {
- remoteObj = subSystem.getObjectWithAbsoluteName(path);
- }
- catch (Exception e)
- {
- return;
- }
- }
- }
- }
- }
-
-
- if (remoteObj != null)
- {
- // DKM - causes editor to loose focus
- //systemView.refreshRemoteObject(path, remoteObj, true);
-
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(remoteObj, ISystemResourceChangeEvents.EVENT_SELECT_REMOTE, null);
- systemView.systemResourceChanged(event);
- }
- */
- }
- }
- /**
- * Updates the title text and title tool tip.
- * Called whenever the input of the viewer changes.
- */
- protected void updateTitle()
- {
- //IAdaptable inputObj = getSite().getPage().getInput();
- Object inputObj = getSystemView().getInput();
- SystemBasePlugin.logInfo("Inside updateTitle. inputObject class type: " + inputObj.getClass().getName()); //$NON-NLS-1$
- if (inputObj != null)
- {
- setTitleToolTip(getFrameToolTipText(input));
- String viewName = getConfigurationElement().getAttribute("name"); //$NON-NLS-1$
- if (inputObj instanceof IHost)
- {
- IHost conn = (IHost) inputObj;
- setPartName(viewName + " : " + conn.getAliasName()); //$NON-NLS-1$
- }
- else if (inputObj instanceof ISubSystem)
- {
- ISubSystem ss = (ISubSystem) inputObj;
- setPartName(viewName + " : " + ss.getName()); //$NON-NLS-1$
- }
- else if (inputObj instanceof ISystemFilterPoolReference)
- {
- ISystemFilterPoolReference sfpr = (ISystemFilterPoolReference) inputObj;
- setPartName(viewName + " : " + sfpr.getName()); //$NON-NLS-1$
- }
- else if (inputObj instanceof ISystemFilterReference)
- {
- ISystemFilterReference sfr = (ISystemFilterReference) inputObj;
- setPartName(viewName + " : " + sfr.getName()); //$NON-NLS-1$
- }
- else if (inputObj instanceof ISystemFilterStringReference)
- {
- ISystemFilterStringReference sfsr = (ISystemFilterStringReference) inputObj;
- setPartName(viewName + " : " + sfsr.getString()); //$NON-NLS-1$
- }
- else
- {
- setPartName(viewName);
- setTitleToolTip(""); //$NON-NLS-1$
- }
- }
- }
-
- /*
- * Set our input provider that will be used to populate the tree view
- *
- public void setInputProvider(ISystemViewInputProvider input)
- {
- RSEUIPlugin.logDebugMessage(this.getClass().getName(),"INSIDE SETINPUTPROVIDER FOR SYSTEMVIEWPART.");
- this.input = input;
- }*/
- /**
- * Creates the SWT controls for a part.
- * Called by Eclipse framework.
- */
- public void createPartControl(Composite parent)
- {
- //RSEUIPlugin.logInfo("INSIDE CREATEPARTCONTROL FOR SYSTEMVIEWPART.");
- if (input == null)
- //input = RSEUIPlugin.getTheSystemRegistry();
- input = getInputProvider();
- systemView = new SystemView(getShell(), parent, input, this);
- frameList = createFrameList();
-
- gotoActionGroup = new SystemViewPartGotoActionGroup(this);
- IActionBars actionBars = getActionBars();
- if (actionBars != null)
- {
- actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), systemView.getDeleteAction());
- //SystemCommonSelectAllAction selAllAction = new SystemCommonSelectAllAction(getShell(), systemView, systemView);
- actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), systemView.getSelectAllAction());
- // added by Phil in 3.0 ...
- //actionBars.setGlobalActionHandler(IWorkbenchActionConstants.PROPERTIES, systemView.getPropertyDialogAction(); hmm, different one for local vs remote objects
- actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), systemView.getRefreshAction());
- actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(), systemView.getRenameAction());
-
- statusLine = actionBars.getStatusLineManager();
- }
-
- // register global edit actions
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
-
- Clipboard clipboard = registry.getSystemClipboard();
-
- CellEditorActionHandler editorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars());
-
- _copyAction = new SystemCopyToClipboardAction(systemView.getShell(), clipboard);
- _pasteAction = new SystemPasteFromClipboardAction(systemView.getShell(), clipboard);
-
- editorActionHandler.setCopyAction(_copyAction);
- editorActionHandler.setPasteAction(_pasteAction);
- editorActionHandler.setDeleteAction(systemView.getDeleteAction());
- editorActionHandler.setSelectAllAction(systemView.getSelectAllAction());
-
- systemView.addSelectionChangedListener(this);
- //hook the part focus to the viewer's control focus.
- //hookFocus(systemView.getControl());
-
- //prime the selection
- //selectionChanged(null, getSite().getDesktopWindow().getSelectionService().getSelection());
-
- boolean showConnectionActions = true;
- fillLocalToolBar(showConnectionActions);
-
- // -----------------------------
- // Enable right-click popup menu
- // -----------------------------
- getSite().registerContextMenu(systemView.getContextMenuManager(), systemView);
-
- // ----------------------------------------------------------------------
- // Enable property sheet updates when tree items are selected.
- // Note for this to work each item in the tree must either implement
- // IPropertySource, or support IPropertySource.class as an adapter type
- // in its AdapterFactory.
- // ----------------------------------------------------------------------
- getSite().setSelectionProvider(systemView);
- // listen to editor events for linking
- getSite().getPage().addPartListener(partListener);
-
- SystemWidgetHelpers.setHelp(parent, RSEUIPlugin.HELPPREFIX + "sysv0000"); //$NON-NLS-1$
-
- // ----------------------
- // Restore previous state
- // ----------------------
- if ((fMemento != null) && (input instanceof ISystemRegistry))
- restoreState(fMemento);
- //fMemento = null;
-
- // Register for preference change events
- registry.addSystemPreferenceChangeListener(this);
-
- // if this is the primary RSE view, and there are no user-defined
- // connections, auto-expand the New Connection prompt...
- if ((input == RSEUIPlugin.getTheSystemRegistry()) && (RSEUIPlugin.getTheSystemRegistry().getHosts().length == 1))
- {
- // assume this is the primary RSE view
-
- // WE GET ALL THE WAY HERE, BUT THESE LINES OF CODE ARE INEFFECTIVE FOR SOME REASON!!
-
- if (systemView.getTree().getItemCount() > 0) {
- TreeItem firstItem = systemView.getTree().getItems()[0];
- systemView.setSelection(new StructuredSelection(firstItem.getData()));
- systemView.setExpandedState(firstItem.getData(), true);
- }
- }
- }
-
- /**
- * Creates the frame source and frame list, and connects them.
- */
- protected FrameList createFrameList()
- {
- SystemViewPartFrameSource frameSource = new SystemViewPartFrameSource(this);
- FrameList frameList = new FrameList(frameSource);
- frameSource.connectTo(frameList);
- return frameList;
- }
- /**
- * Return the FrameList object for this view part
- */
- public FrameList getFrameList()
- {
- return frameList;
- }
-
- /**
- * Return the Goto action group
- */
- public SystemViewPartGotoActionGroup getGotoActionGroup()
- {
- return gotoActionGroup;
- }
-
- /**
- * Return the shell for this view part
- */
- public Shell getShell()
- {
- if (systemView != null)
- return systemView.getTree().getShell();
- else
- return getSite().getShell();
- }
- /**
- * Return the action bars for this view part
- */
- public IActionBars getActionBars()
- {
- return getViewSite().getActionBars();
- }
-
- /**
- * @see IWorkbenchPart#setFocus()
- */
- public void setFocus()
- {
- //System.out.println("INSIDE SETFOCUS FOR SYSTEMVIEWPART. SYSTEMVIEW NULL? " + (systemView==null));
- IWorkbench wb = PlatformUI.getWorkbench();
- wb.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())
- {
- TreeItem[] roots = systemView.getTree().getItems();
- if ((roots != null) && (roots.length>0))
- systemView.setSelection(new StructuredSelection(roots[0].getData()));
- }
- */
-
- }
-
- public void selectionChanged(SelectionChangedEvent e)
- {
- IStructuredSelection sel = (IStructuredSelection) e.getSelection();
- _copyAction.setEnabled(_copyAction.updateSelection(sel));
- _pasteAction.setEnabled(_pasteAction.updateSelection(sel));
- //systemView.getPropertyDialogAction();
- if (isLinkingEnabled)
- {
- linkToEditor(sel);
- }
- }
-
-
- // link back to editor
- protected void linkToEditor(IStructuredSelection selection)
- {
- Object obj = selection.getFirstElement();
- if (obj instanceof IAdaptable)
- {
- try
- {
- ISystemRemoteElementAdapter adapter = (ISystemRemoteElementAdapter)((IAdaptable)obj).getAdapter(ISystemRemoteElementAdapter.class);
- if (adapter != null)
- {
-
- if (adapter.canEdit(obj))
- {
- IWorkbenchPage page = getSite().getPage();
- IEditorReference[] editorRefs = page.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++)
- {
- IEditorReference editorRef = editorRefs[i];
-
- IEditorPart editor = editorRef.getEditor(false);
- if (editor != null)
- {
- IEditorInput input = editor.getEditorInput();
- if (input instanceof FileEditorInput)
- {
- ((FileEditorInput)input).getFile();
- /** FIXME - can't couple this view to files ui
- IFile file = ((FileEditorInput)input).getFile();
- if (file.getProject().getName().equals(SystemRemoteEditManager.REMOTE_EDIT_PROJECT_NAME))
- {
- SystemIFileProperties properties = new SystemIFileProperties(file);
- String path = properties.getRemoteFilePath();
- if (path != null && path.equals(adapter.getAbsoluteName(obj)))
- {
- page.bringToTop(editor);
- return;
- }
- }
- */
- }
- }
- }
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
-
- /**
- * Fills the local tool bar with actions.
- */
- protected void fillLocalToolBar(boolean showConnectionActions)
- {
- IActionBars actionBars = getViewSite().getActionBars();
- SystemRefreshAction refreshAction = new SystemRefreshAction(getShell());
- refreshAction.setSelectionProvider(systemView);
- actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
-
- IToolBarManager toolBarMgr = actionBars.getToolBarManager();
- if (showConnectionActions)
- {
- SystemNewConnectionAction newConnAction = new SystemNewConnectionAction(getShell(), false, systemView); // false implies not from popup menu
- toolBarMgr.add(newConnAction);
- }
-
- refreshAction.setSelectionProvider(systemView);
- toolBarMgr.add(refreshAction);
-
- toolBarMgr.add(new Separator("Navigate")); //$NON-NLS-1$
- SystemViewPartGotoActionGroup gotoActions = new SystemViewPartGotoActionGroup(this);
- gotoActions.fillActionBars(actionBars);
-
- // defect 41203
- toolBarMgr.add(new Separator());
-
- // DKM - changing hover image to the elcl16 one since the navigator no long has clcl16 icons
- SystemCollapseAllAction collapseAllAction = new SystemCollapseAllAction(getShell());
- collapseAllAction.setSelectionProvider(systemView);
- // PSC ... better to encapsulate this in the SystemCollapseAllAction class
- //collapseAllAction.setImageDescriptor(getNavigatorImageDescriptor("elcl16/collapseall.gif")); //$NON-NLS-1$
- //collapseAllAction.setHoverImageDescriptor(getNavigatorImageDescriptor("elcl16/collapseall.gif")); //$NON-NLS-1$
-
- toolBarMgr.add(collapseAllAction);
-
- toggleLinkingAction = new ToggleLinkingAction(this, SystemViewResources.RESID_PROPERTY_LINKINGACTION_TEXT);
- toggleLinkingAction.setToolTipText(SystemViewResources.RESID_PROPERTY_LINKINGACTION_TOOLTIP);
- toggleLinkingAction.setImageDescriptor(getNavigatorImageDescriptor(ISystemIconConstants.ICON_IDE_LINKTOEDITOR_ID));
- toggleLinkingAction.setHoverImageDescriptor(getNavigatorImageDescriptor(ISystemIconConstants.ICON_IDE_LINKTOEDITOR_ID));
- toolBarMgr.add(toggleLinkingAction);
-
-
-
- IMenuManager menuMgr = actionBars.getMenuManager();
- populateSystemViewPulldownMenu(menuMgr, getShell(), showConnectionActions, this, systemView);
- }
- /**
- * Pulldown the local toolbar menu with actions
- */
- public static void populateSystemViewPulldownMenu(IMenuManager menuMgr, Shell shell, boolean showConnectionActions, IWorkbenchPart viewPart, ISelectionProvider sp)
- {
- SystemRefreshAllAction refreshAllAction = new SystemRefreshAllAction(shell);
- //SystemCascadingUserIdPerSystemTypeAction userIdPerSystemTypeAction = new SystemCascadingUserIdPerSystemTypeAction(shell); d51541
- SystemPreferenceShowFilterPoolsAction showFilterPoolsAction = new SystemPreferenceShowFilterPoolsAction(shell);
- SystemPreferenceQualifyConnectionNamesAction qualifyConnectionNamesAction = null;
- SystemPreferenceRestoreStateAction restoreStateAction = new SystemPreferenceRestoreStateAction(shell);
-
- if (viewPart instanceof SystemViewPart)
- {
- ((SystemViewPart) viewPart).showFilterPoolsAction = showFilterPoolsAction; // set non-static field
- ((SystemViewPart) viewPart).restoreStateAction = restoreStateAction; // set non-static field
- }
-
- if (showConnectionActions)
- {
- boolean fromPopup = false;
- boolean wantIcon = false;
- SystemNewConnectionAction newConnectionAction = new SystemNewConnectionAction(shell, fromPopup, wantIcon, sp);
- SystemWorkWithProfilesAction wwProfilesAction = new SystemWorkWithProfilesAction(shell);
- menuMgr.add(newConnectionAction);
- menuMgr.add(new Separator());
- menuMgr.add(wwProfilesAction);
- menuMgr.add(new Separator());
- // moved Qualify Connection Names from here for d51541
- //menuMgr.add(new Separator()); d51541
- }
- menuMgr.add(refreshAllAction);
- menuMgr.add(new Separator());
- if (showConnectionActions)
- {
- qualifyConnectionNamesAction = new SystemPreferenceQualifyConnectionNamesAction(shell);
- if (viewPart instanceof SystemViewPart)
- ((SystemViewPart) viewPart).qualifyConnectionNamesAction = qualifyConnectionNamesAction;
- menuMgr.add(qualifyConnectionNamesAction); // moved here for d51541
- }
- //menuMgr.add(userIdPerSystemTypeAction.getSubMenu()); d51541
- menuMgr.add(showFilterPoolsAction);
- menuMgr.add(restoreStateAction); // d51541
-
- // Now query our remoteSystemsViewPreferencesActions for extenders who wish to appear in the
- // preferences cascading menu...
- SystemCascadingPreferencesAction preferencesAction = new SystemCascadingPreferencesAction(shell);
- menuMgr.add(preferencesAction.getSubMenu());
-
- menuMgr.add(new Separator());
- menuMgr.add(new SystemStartCommunicationsDaemonAction(shell));
-
- if (viewPart != null)
- {
- /*
- SystemCascadingTeamAction teamAction = new SystemCascadingTeamAction(shell, viewPart);
- menuMgr.add(new Separator());
- menuMgr.add(teamAction.getSubMenu());
- */
- }
- SystemViewMenuListener menuListener = new SystemViewMenuListener(true); // true says this is a persistent menu
- if (viewPart instanceof ISystemMessageLine)
- menuListener.setShowToolTipText(true, (ISystemMessageLine) viewPart);
- menuMgr.addMenuListener(menuListener);
-
- }
-
- /**
- *
- */
- public void dispose()
- {
- super.dispose();
- if (platformManager != null)
- unregisterWithManager(platformManager);
- RSEUIPlugin.getTheSystemRegistry().removeSystemPreferenceChangeListener(this);
- getSite().getPage().removePartListener(partListener);
- //System.out.println("INSIDE DISPOSE FOR SYSTEMVIEWPART.");
- }
-
- /**
- * Returns the initial input provider for the viewer.
- * Tries to deduce the appropriate input provider based on current input.
- */
- protected ISystemViewInputProvider getInputProvider()
- {
- IAdaptable inputObj = getSite().getPage().getInput();
- inputIsRoot = false;
- ISystemViewInputProvider inputProvider = RSEUIPlugin.getTheSystemRegistry();
- if (inputObj != null)
- {
- platformManager = Platform.getAdapterManager();
- if (inputObj instanceof IHost)
- {
- IHost conn = (IHost) inputObj;
- inputProvider = new SystemViewAPIProviderForConnections(conn);
- setPartName(getTitle() + " : " + conn.getAliasName()); //$NON-NLS-1$
- }
- else if (inputObj instanceof ISubSystem)
- {
- ISubSystem ss = (ISubSystem) inputObj;
- inputProvider = new SystemViewAPIProviderForSubSystems(ss);
- setPartName(getTitle() + " : " + ss.getName()); //$NON-NLS-1$
- }
- else if (inputObj instanceof ISystemFilterPoolReference)
- {
- ISystemFilterPoolReference sfpr = (ISystemFilterPoolReference) inputObj;
- inputProvider = new SystemViewAPIProviderForFilterPools(sfpr);
- setPartName(getTitle() + " : " + sfpr.getName()); //$NON-NLS-1$
- }
- else if (inputObj instanceof ISystemFilterReference)
- {
- ISystemFilterReference sfr = (ISystemFilterReference) inputObj;
- inputProvider = new SystemViewAPIProviderForFilters(sfr);
- setPartName(getTitle() + " : " + sfr.getName()); //$NON-NLS-1$
- }
- else if (inputObj instanceof ISystemFilterStringReference)
- {
- ISystemFilterStringReference sfsr = (ISystemFilterStringReference) inputObj;
- inputProvider = new SystemViewAPIProviderForFilterStrings(sfsr);
- setPartName(getTitle() + " : " + sfsr.getString()); //$NON-NLS-1$
- }
- else
- {
- platformManager = null;
- inputIsRoot = true;
- }
-
- if (platformManager != null)
- registerWithManager(platformManager, inputObj);
- //msg = "INSIDE GETINPUTPROVIDER FOR SYSTEMVIEWPART: inputObj="+inputObj+", input class="+inputObj.getClass().getName()+", inputProvider="+inputProvider;
- }
- else
- {
- //msg = "INSIDE GETINPUTPROVIDER FOR SYSTEMVIEWPART: inputObj is null, inputProvider="+inputProvider;
- }
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),msg);
- //System.out.println("INSIDE getInputProvider. inputProvider = "+inputProvider);
- return inputProvider;
- }
-
- // --------------------------------------------
- // ISystemPreferenceChangeListener interface...
- // --------------------------------------------
- public void systemPreferenceChanged(ISystemPreferenceChangeEvent event)
- {
- if ((event.getType() == ISystemPreferenceChangeEvents.EVENT_QUALIFYCONNECTIONNAMES) && (qualifyConnectionNamesAction != null))
- qualifyConnectionNamesAction.setChecked(SystemPreferencesManager.getPreferencesManager().getQualifyConnectionNames());
- else if ((event.getType() == ISystemPreferenceChangeEvents.EVENT_SHOWFILTERPOOLS) && (showFilterPoolsAction != null))
- showFilterPoolsAction.setChecked(SystemPreferencesManager.getPreferencesManager().getShowFilterPools());
- else if ((event.getType() == ISystemPreferenceChangeEvents.EVENT_RESTORESTATE) && (restoreStateAction != null))
- restoreStateAction.setChecked(SystemPreferencesManager.getPreferencesManager().getRememberState());
-
- //else if ((event.getType() == ISystemPreferenceChangeEvents.EVENT_SHOWFILTERSTRINGS) &&
- // (showFilterStringsAction != null))
- // showFilterStringsAction.setChecked(SystemPreferencesManager.getPreferencesManager().getShowFilterStrings());
-
- }
-
- // -------------------------------
- // ISystemMessageLine interface...
- // -------------------------------
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- errorMessage = null;
- sysErrorMessage = null;
- if (statusLine != null)
- statusLine.setErrorMessage(errorMessage);
- }
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- message = null;
- if (statusLine != null)
- statusLine.setMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage()
- {
- return errorMessage;
- }
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage()
- {
- return message;
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- this.errorMessage = message;
- if (statusLine != null)
- statusLine.setErrorMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- return sysErrorMessage;
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- sysErrorMessage = message;
- setErrorMessage(message.getLevelOneText());
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(Throwable exc)
- {
- setErrorMessage(exc.getMessage());
- }
-
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- this.message = message;
- if (statusLine != null)
- statusLine.setMessage(message);
- }
- /**
- *If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- setMessage(message.getLevelOneText());
- }
-
- // -------------------------------------------
- // MEMENTO SUPPORT (SAVING/RESTORING STATE)...
- // -------------------------------------------
- /**
- * Initializes this view with the given view site. A memento is passed to
- * the view which contains a snapshot of the views state from a previous
- * session. Where possible, the view should try to recreate that state
- * within the part controls.
- * <p>
- * The parent's default implementation will ignore the memento and initialize
- * the view in a fresh state. Subclasses may override the implementation to
- * perform any state restoration as needed.
- */
- public void init(IViewSite site, IMemento memento) throws PartInitException
- {
- init(site);
- fMemento = memento;
- //System.out.println("INSIDE INIT");
- }
-
- /**
- * Returns the image descriptor with the given relative path.
- */
- protected ImageDescriptor getNavigatorImageDescriptor(String relativePath)
- {
- return RSEUIPlugin.getDefault().getImageDescriptorFromIDE(relativePath); // more reusable
- /*
- String iconPath = "icons/full/"; //$NON-NLS-1$
- try
- {
- AbstractUIPlugin plugin = (AbstractUIPlugin) Platform.getPlugin(PlatformUI.PLUGIN_ID);
- URL installURL = plugin.getDescriptor().getInstallURL();
-
- URL url = new URL(installURL, iconPath + relativePath);
- ImageDescriptor descriptor = ImageDescriptor.createFromURL(url);
- return descriptor;
- }
- catch (MalformedURLException e)
- {
- // should not happen
- return ImageDescriptor.getMissingImageDescriptor();
- }*/
- }
-
- /**
- * Method declared on IViewPart.
- */
- public void saveState(IMemento memento)
- {
- //System.out.println("INSIDE SAVESTATE");
- if (!SystemPreferencesManager.getPreferencesManager().getRememberState())
- return;
- if (systemView == null)
- {
- // part has not been created
- if (fMemento != null) //Keep the old state;
- memento.putMemento(fMemento);
- return;
- }
-
- if (isLinkingEnabled)
- {
- memento.putString(TAG_LINKWITHEDITOR, "t"); //$NON-NLS-1$
- }
- else
- {
- memento.putString(TAG_LINKWITHEDITOR, "f"); //$NON-NLS-1$
- }
-
- // We record the current release for future in case anything significant changes from release to release
- memento.putString(TAG_RELEASE, SystemResources.CURRENT_RELEASE_NAME);
-
- // We record the current preferences for show filter string and show filter pools.
- // We do this to ensure the states match on restore. If they don't we will be in trouble
- // restoring expansion state and hence will abandon it.
-
- memento.putString(TAG_SHOWFILTERPOOLS, SystemPreferencesManager.getPreferencesManager().getShowFilterPools() ? "t" : "f"); //$NON-NLS-1$ //$NON-NLS-2$
- //memento.putString(TAG_SHOWFILTERSTRINGS, SystemPreferencesManager.getPreferencesManager().getShowFilterStrings() ? "t" : "f");
-
- String inputMemento = memento.getString("factoryID"); // see IWorkbenchWindow ... this is only clue I can figure out! //$NON-NLS-1$
- if (inputMemento != null)
- {
- saveInputState(memento);
- return;
- }
-
- Tree tree = systemView.getTree();
-
- // SAVE EXPAND-TO HASHTABLE
- Hashtable expandToFilters = systemView.getExpandToFilterTable();
- if ((expandToFilters != null) && (expandToFilters.size() > 0))
- {
- IMemento expandedMem = memento.createChild(TAG_EXPANDED_TO);
- Enumeration keys = expandToFilters.keys();
- while (keys.hasMoreElements())
- {
- Object key = keys.nextElement();
- Object value = expandToFilters.get(key);
- if (value != null)
- {
- IMemento elementMem = expandedMem.createChild(TAG_ELEMENT);
- elementMem.putString(TAG_PATH, (String) key);
- elementMem.putString(TAG_FILTER, (String) value);
- }
- }
- }
-
- // SAVE EXPANSION STATE
- //Object expandedElements[]= systemView.getExpandedElements();
- Object expandedElements[] = systemView.getVisibleExpandedElements();
- if ((expandedElements != null) && (expandedElements.length > 0))
- {
- IMemento expandedMem = memento.createChild(TAG_EXPANDED);
- for (int i = 0; i < expandedElements.length; i++)
- {
- Object o = expandedElements[i];
- ISystemViewElementAdapter adapter = systemView.getAdapter(o);
- //ISystemRemoteElementAdapter radapter = systemView.getRemoteAdapter(o);
- //if (adapter.saveExpansionState(o) && (radapter==null))
- if (adapter.saveExpansionState(o))
- {
- IMemento elementMem = expandedMem.createChild(TAG_ELEMENT);
- elementMem.putString(TAG_PATH, getMementoHandle(o, adapter));
- //System.out.println("Added to saved expansion list: " + getMementoHandle(o, adapter));
- }
- }
- }
-
- // SAVE SELECTION STATE
- Object elements[] = ((IStructuredSelection) systemView.getSelection()).toArray();
- if ((elements != null) && (elements.length > 0))
- {
- IMemento selectionMem = memento.createChild(TAG_SELECTION);
- for (int i = 0; i < elements.length; i++)
- {
- Object o = elements[i];
- ISystemViewElementAdapter adapter = systemView.getAdapter(o);
- //ISystemRemoteElementAdapter radapter = systemView.getRemoteAdapter(o);
- //if (adapter.saveExpansionState(o) && (radapter==null))
- if (adapter.saveExpansionState(o))
- {
- IMemento elementMem = selectionMem.createChild(TAG_ELEMENT);
- elementMem.putString(TAG_PATH, getMementoHandle(o, adapter));
- }
- }
- }
-
- //save vertical position
- ScrollBar bar = tree.getVerticalBar();
- int position = bar != null ? bar.getSelection() : 0;
- memento.putString(TAG_VERTICAL_POSITION, String.valueOf(position));
- //save horizontal position
- bar = tree.getHorizontalBar();
- position = bar != null ? bar.getSelection() : 0;
- memento.putString(TAG_HORIZONTAL_POSITION, String.valueOf(position));
-
- }
-
- /**
- * Defer to the adapter to get the memento handle key plus the memento handle for
- * each part leading up to the current object.
- */
- protected String getMementoHandle(Object o, ISystemViewElementAdapter adapter)
- {
- StringBuffer idBuffer = new StringBuffer(adapter.getMementoHandleKey(o));
- Object[] elementNodes = systemView.getElementNodes(o);
- if (elementNodes != null)
- {
- for (int idx = elementNodes.length - 1; idx >= 0; idx--)
- {
- o = elementNodes[idx];
- adapter = systemView.getAdapter(o);
- idBuffer.append(MEMENTO_DELIM + adapter.getMementoHandle(o));
- }
- }
- //System.out.println("MEMENTO HANDLE: " + idBuffer.toString());
- return idBuffer.toString();
- }
-
- /**
- * Our own method for restoring state
- */
- protected void restoreState(IMemento memento)
- {
- RestoreStateRunnable restoreAction = new RestoreStateRunnable(memento);
- restoreAction.setRule(RSEUIPlugin.getTheSystemRegistry());
- restoreAction.schedule();
-
- /* DKM - Moved to RestoreStateRunnable
- * - resolves invalid shell problem at startup
- * *
- //System.out.println("SYSTEMVIEWPART: restoreState");
- if (!SystemPreferencesManager.getPreferencesManager().getRememberState())
- return;
-
- if (doTimings)
- timer = new SystemElapsedTimer();
-
- // restore the show filter pools and show filter strings settings as they were when this was saved
- boolean showFilterPools = false;
- boolean showFilterStrings = false;
- String savedValue = memento.getString(TAG_SHOWFILTERPOOLS);
- if (savedValue != null)
- showFilterPools = savedValue.equals("t");
- else
- showFilterPools = SystemPreferencesManager.getPreferencesManager().getShowFilterPools();
-
- savedValue = memento.getString(TAG_SHOWFILTERSTRINGS); // historical
- if (savedValue != null)
- showFilterStrings = savedValue.equals("t");
- //else
- //showFilterStrings = SystemPreferencesManager.getPreferencesManager().getShowFilterStrings();
-
- IMemento childMem = null;
-
- // restore expand-to hashtable state
- childMem= memento.getChild(TAG_EXPANDED_TO);
- if (childMem != null)
- {
- IMemento[] elementMem= childMem.getChildren(TAG_ELEMENT);
- Hashtable ht = new Hashtable();
- for (int i= 0; i < elementMem.length; i++)
- {
- String key = elementMem[i].getString(TAG_PATH);
- String value = elementMem[i].getString(TAG_FILTER);
- if ((key != null) && (value != null))
- ht.put(key, value);
- }
- if (ht.size() > 0)
- systemView.setExpandToFilterTable(ht);
- }
-
- // restore expansion state
- childMem= memento.getChild(TAG_EXPANDED);
- if (childMem != null)
- {
- ArrayList elements= new ArrayList();
- Vector remoteElements = new Vector();
- IMemento[] elementMem= childMem.getChildren(TAG_ELEMENT);
- // walk through list of expanded nodes, breaking into 2 lists: non-remote and remote
- for (int i= 0; i < elementMem.length; i++)
- {
- Object element= getObjectFromMemento(showFilterPools, showFilterStrings, elementMem[i].getString(TAG_PATH));
- if (element != null)
- if (element instanceof RemoteObject) // this is a remote object
- {
- remoteElements.add(element);
- //System.out.println("Added to remote expansion list: " + element);
- }
- else
- {
- elements.add(element);
- //System.out.println("Added to non-remote expansion list: " + element);
- }
- }
- // expand non-remote...
- systemView.setExpandedElements(elements.toArray());
- // expand remote...
- if (remoteElements.size() > 0)
- {
- SystemResourceChangeEvent event = null;
- for (int idx=0; idx<remoteElements.size(); idx++)
- {
- RemoteObject ro = (RemoteObject)remoteElements.elementAt(idx);
- if (doTimings)
- timer.setStartTime();
- //event = new SystemResourceChangeEvent(ro.name,ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE,
- // SystemViewDummyObject.getSingleton()); // This tells SystemView to expand this remote object, but don't select a child
- //systemView.systemResourceChanged(event);
- systemView.refreshRemoteObject(ro.name, SystemViewDummyObject.getSingleton(), true);
- if (doTimings)
- {
- timer.setEndTime();
- System.out.println("Time to restore "+ro.name+": " + timer);
- }
- }
- }
- }
-
- // restoreSelection
- childMem= memento.getChild(TAG_SELECTION);
- if (childMem != null)
- {
- ArrayList list= new ArrayList();
- Vector remoteElements = new Vector();
- IMemento[] elementMem= childMem.getChildren(TAG_ELEMENT);
- for (int i= 0; i < elementMem.length; i++)
- {
- Object element= getObjectFromMemento(showFilterPools, showFilterStrings, elementMem[i].getString(TAG_PATH));
- if (element != null)
- if (element instanceof RemoteObject) // this is a remote object
- remoteElements.add(element);
- else
- list.add(element);
- //System.out.println("Added to selection list: " + element);
- }
- systemView.setSelection(new StructuredSelection(list));
- if (remoteElements.size() > 0)
- {
- Vector v = new Vector();
- for (int idx=0; idx<remoteElements.size(); idx++)
- {
- RemoteObject ro = (RemoteObject)remoteElements.elementAt(idx);
- v.addElement(ro.name);
- }
- if (doTimings)
- timer.setStartTime();
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(v,ISystemResourceChangeEvents.EVENT_SELECT_REMOTE,null);
- systemView.systemResourceChanged(event);
- if (doTimings)
- {
- timer.setEndTime();
- System.out.println("Time to select "+v.size()+" elements: " + timer);
- }
- }
- }
- Tree tree= systemView.getTree();
- //restore vertical position
- ScrollBar bar= tree.getVerticalBar();
- if (bar != null)
- {
- try
- {
- String posStr= memento.getString(TAG_VERTICAL_POSITION);
- if (posStr != null)
- {
- int position;
- position= new Integer(posStr).intValue();
- bar.setSelection(position);
- }
- } catch (NumberFormatException e)
- {
- }
- }
- //restore vertical position
- bar= tree.getHorizontalBar();
- if (bar != null)
- {
- try
- {
- String posStr= memento.getString(TAG_HORIZONTAL_POSITION);
- if (posStr != null)
- {
- int position;
- position= new Integer(posStr).intValue();
- bar.setSelection(position);
- }
- } catch (NumberFormatException e)
- {
- }
- }
- */
- }
-
- /**
- * protected method to deconstruct an expanded/selected memento into an actual object
- */
- protected Object getObjectFromMemento(boolean showFilterPools, boolean showFilterStrings, String memento)
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
-
- ISystemProfile profile = null;
- IHost conn = null;
- String ssfId = null;
- ISubSystemConfiguration ssf = null;
- ISubSystem subsystem = null;
- ISystemFilterPoolReference fpRef = null;
- ISystemFilterReference fRef = null;
- ISystemFilterStringReference fsRef = null;
- RemoteObject remoteObject = null;
-
- //System.out.println("PARSING MEMENTO: " + memento);
-
- if (memento == null)
- return null;
-
- Vector v = tokenize(memento, MEMENTO_DELIM);
-
- String elementType = ""; //$NON-NLS-1$
- String ssName = null;
- //String connName = null;
- //String subsystemName = null;
- // 0. element type
- // 1. connections
- // 2. subsystems
- // 3. filter pools (optional)
- // 4. filters
- // 5. filter strings (optional)
- // 6. remote objects
- // 1. connections
- // 2. subsystems
- // 3. filters
- // 4. filter strings (optional)
- // 5. remote objects
- // 1. connections
- // 2. subsystems
- // 3. filter pools (optional)
- // 4. filters
- // 5. remote objects
- // 1. connections
- // 2. subsystems
- // 3. filters
- // 4. remote objects
-
- int index = 0;
- for (int idx = 0; idx < v.size(); idx++)
- {
- String token = (String) v.elementAt(idx);
- switch (idx)
- {
- // type of element
- case 0 :
- elementType = token;
- break;
- // connection
- case 1 :
- index = token.indexOf('.');
- if (index > 0)
- {
- profile = sr.getSystemProfile(token.substring(0, index));
- if (profile != null)
- conn = sr.getHost(profile, token.substring(index + 1));
- }
- break;
- // subsystem
- case 2 :
- index = token.indexOf('=');
- ssfId = token.substring(0, index);
- ssName = token.substring(index + 1);
- if (ssfId != null)
- ssf = sr.getSubSystemConfiguration(ssfId);
- if ((ssf != null) && (conn != null))
- {
- ISubSystem[] subsystems = ssf.getSubSystems(conn, true); // force to life
- if (subsystems != null)
- for (int ssidx = 0;(subsystem == null) && (ssidx < subsystems.length); ssidx++)
- if (subsystems[ssidx].getName().equals(ssName))
- subsystem = subsystems[ssidx];
- }
- break;
- // filter pool or filter (depends on showFilterPools)
- case 3 :
- if (showFilterPools)
- {
- if (subsystem != null)
- {
- String poolName = token;
- ISystemFilterPoolReference[] refs = subsystem.getFilterPoolReferenceManager().getSystemFilterPoolReferences();
- if (refs != null)
- for (int refidx = 0;(fpRef == null) && (refidx < refs.length); refidx++)
- {
- if (refs[refidx].getFullName().equals(poolName))
- fpRef = refs[refidx];
- }
- }
- }
- else
- {
- index = token.indexOf('=');
- if (index != -1)
- {
- String filterName = token.substring(index + 1);
- String poolName = token.substring(0, index);
- if (subsystem != null)
- {
- ISystemFilterPoolReference[] refs = subsystem.getFilterPoolReferenceManager().getSystemFilterPoolReferences();
- if (refs != null)
- for (int refidx = 0;(fpRef == null) && (refidx < refs.length); refidx++)
- if (refs[refidx].getFullName().equals(poolName))
- fpRef = refs[refidx];
- }
-
- // TODO: handle nested filters. in this case they are separated by ';'. See SystemFilterReferenceAdapter's getMementoHandle()
- if (fpRef != null)
- {
- ISystemFilterReference[] refs = fpRef.getSystemFilterReferences(subsystem);
- if (refs != null)
- for (int refidx = 0;(fRef == null) && (refidx < refs.length); refidx++)
- if (refs[refidx].getName().equals(filterName))
- fRef = refs[refidx];
- }
- }
- }
- break;
- // filter or filter string (depends on showFilterPools) or remote object (depends on showFilterStrings)
- case 4 :
- if (showFilterPools) // definitely a filter
- {
- index = token.indexOf('=');
- String filterName = token.substring(index + 1);
-// String poolName = token.substring(0, index);
- // TODO: handle nested filters. in this case they are separated by ';'. See SystemFilterReferenceAdapter's getMementoHandle()
- if (fpRef != null) // should have already been parsed in case 3
- {
- ISystemFilterReference[] refs = fpRef.getSystemFilterReferences(subsystem);
- if (refs != null)
- for (int refidx = 0;(fRef == null) && (refidx < refs.length); refidx++)
- if (refs[refidx].getName().equals(filterName))
- fRef = refs[refidx];
- }
- }
- else if (showFilterStrings) // children of filters are filter strings or resolved remote objects
- {
- // at this point we know the parent filter reference as that was parsed in case 3
- if (fRef != null)
- {
- ISystemFilterStringReference[] refs = fRef.getSystemFilterStringReferences();
- if (refs != null)
- for (int refidx = 0;(fsRef == null) && (refidx < refs.length); refidx++)
- if (refs[refidx].getString().equals(token))
- fsRef = refs[refidx];
- }
- }
- else // if both pools and strings are turned off, then at level four we are definitely dealing with remote objects
- {
- if ((subsystem != null) && (fRef != null))
- remoteObject = new RemoteObject(token, subsystem, fRef, fsRef);
- }
-
- break;
- // filter string (depends on showFilterStrings) or remote object
- case 5 :
- if (showFilterPools && showFilterStrings) // definitely a filter string
- {
- // at this point we know the parent filter reference as that was parsed in case 4
- if (fRef != null)
- {
- ISystemFilterStringReference[] refs = fRef.getSystemFilterStringReferences();
- if (refs != null)
- for (int refidx = 0;(fsRef == null) && (refidx < refs.length); refidx++)
- if (refs[refidx].getString().equals(token))
- fsRef = refs[refidx];
- }
- }
- else // definitely remote
- {
- if ((subsystem != null) && (fRef != null))
- remoteObject = new RemoteObject(token, subsystem, fRef, fsRef);
- }
-
- break;
- default : // definitely a remote object
- if ((subsystem != null) && (fRef != null))
- remoteObject = new RemoteObject(token, subsystem, fRef, fsRef);
- }
- }
-
- if (elementType.equals(ISystemMementoConstants.MEMENTO_KEY_CONNECTION))
- return conn;
- else if (elementType.equals(ISystemMementoConstants.MEMENTO_KEY_SUBSYSTEM))
- return subsystem;
- else if (elementType.equals(ISystemMementoConstants.MEMENTO_KEY_FILTERPOOLREFERENCE))
- return fpRef;
- else if (elementType.equals(ISystemMementoConstants.MEMENTO_KEY_FILTERREFERENCE))
- return fRef;
- else if (elementType.equals(ISystemMementoConstants.MEMENTO_KEY_FILTERSTRINGREFERENCE))
- return fsRef;
- else
- return remoteObject;
-
- //return null;
- }
-
- /**
- * Parse a string into tokens. Unlike StringTokenizer, this supports delimiter strings versus
- * only delimiter characters
- */
- public static Vector tokenize(String inputString, String delimiter)
- {
- Vector v = new Vector();
- StringBuffer token = new StringBuffer();
- String lastToken = null;
- int inpLen = inputString.length();
- int delimLen = delimiter.length();
- char delimChar1 = delimiter.charAt(0);
- for (int idx = 0; idx < inpLen; idx++)
- {
- int remLen = inpLen - idx;
- char currChar = inputString.charAt(idx);
- if ((currChar == delimChar1) && (remLen >= delimLen) && inputString.substring(idx, idx + delimLen).equals(delimiter))
- {
- lastToken = token.toString();
- v.addElement(lastToken);
- //System.out.println("...token: " + token);
- token.setLength(0);
- idx += delimLen - 1;
- }
- else
- token.append(currChar);
- }
- if (token.length() > 0)
- {
- lastToken = token.toString();
- v.addElement(lastToken);
- //System.out.println("...token: " + token);
- }
- return v;
- }
-
- protected class RemoteObject
- {
- public String name;
- public ISubSystem subsystem;
- public ISystemFilterReference fRef;
- public ISystemFilterStringReference fsRef;
-
- public RemoteObject(String name, ISubSystem ss, ISystemFilterReference fRef, ISystemFilterStringReference fsRef)
- {
- this.name = name;
- this.subsystem = ss;
- this.fRef = fRef;
- this.fsRef = fsRef;
- }
-
- public String toString()
- {
- return "Remote object: " + name; //$NON-NLS-1$
- }
- }
-
- protected IPartListener partListener = new IPartListener()
- {
- public void partActivated(IWorkbenchPart part)
- {
- if (part instanceof IEditorPart)
- editorActivated((IEditorPart) part);
- }
- public void partBroughtToTop(IWorkbenchPart part)
- {
- }
- public void partClosed(IWorkbenchPart part)
- {
- }
- public void partDeactivated(IWorkbenchPart part)
- {
- }
- public void partOpened(IWorkbenchPart part)
- {
- }
- };
-
- public class RestoreStateRunnable extends UIJob
- {
- protected IMemento _memento;
- public RestoreStateRunnable(IMemento memento)
- {
- super("Restore RSE Tree"); //$NON-NLS-1$
- _memento = memento;
-
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- IMemento memento = _memento;
- //System.out.println("SYSTEMVIEWPART: restoreState");
- if (!SystemPreferencesManager.getPreferencesManager().getRememberState())
- return Status.CANCEL_STATUS;
-
- if (doTimings)
- timer = new SystemElapsedTimer();
-
- // restore the show filter pools and show filter strings settings as they were when this was saved
- boolean showFilterPools = false;
- boolean showFilterStrings = false;
- String linkWithEditor = memento.getString(TAG_LINKWITHEDITOR);
- if (linkWithEditor != null)
- {
- if (linkWithEditor.equals("t")) //$NON-NLS-1$
- {
- isLinkingEnabled = true;
- toggleLinkingAction.setChecked(true);
- }
- else
- isLinkingEnabled = false;
- }
- else
- {
- isLinkingEnabled = false;
- }
-
- String savedValue = memento.getString(TAG_SHOWFILTERPOOLS);
- if (savedValue != null)
- showFilterPools = savedValue.equals("t"); //$NON-NLS-1$
- else
- showFilterPools = SystemPreferencesManager.getPreferencesManager().getShowFilterPools();
- savedValue = memento.getString(TAG_SHOWFILTERSTRINGS); // historical
- if (savedValue != null)
- showFilterStrings = savedValue.equals("t"); //$NON-NLS-1$
- //else
- //showFilterStrings = SystemPreferencesManager.getPreferencesManager().getShowFilterStrings();
-
- IMemento childMem = null;
-
- // restore expand-to hashtable state
- childMem = memento.getChild(TAG_EXPANDED_TO);
- if (childMem != null)
- {
- IMemento[] elementMem = childMem.getChildren(TAG_ELEMENT);
- Hashtable ht = new Hashtable();
- for (int i = 0; i < elementMem.length; i++)
- {
- String key = elementMem[i].getString(TAG_PATH);
- String value = elementMem[i].getString(TAG_FILTER);
- if ((key != null) && (value != null))
- ht.put(key, value);
- }
- if (ht.size() > 0)
- systemView.setExpandToFilterTable(ht);
- }
- // restore expansion state
- childMem = memento.getChild(TAG_EXPANDED);
- if (childMem != null)
- {
- ArrayList elements = new ArrayList();
- Vector remoteElements = new Vector();
- IMemento[] elementMem = childMem.getChildren(TAG_ELEMENT);
-
- // yantzi: artemis6.0, keep track subsystems which have their memento flag set in order
- // to restore system view from cache (if the subsystem supports this)
- List cacheSubSystemList = new ArrayList();
- ISubSystem cacheSubSystem;
- 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++)
- {
- Object element = getObjectFromMemento(showFilterPools, showFilterStrings, elementMem[i].getString(TAG_PATH));
- if (element != null)
- if (element instanceof RemoteObject) // this is a remote object
- {
- remoteElements.add(element);
- //System.out.println("Added to remote expansion list: " + element);
- }
- else if (element instanceof ISystemFilterReference)
- {
- elements.add(element);
-
- if (restoreFromCache)
- {
- // yantzi: artemis 6.0, see comment above
- cacheSubSystem = ((ISystemFilterReference)element).getSubSystem();
- if (cacheSubSystem.supportsCaching() && cacheSubSystem.getCacheManager() != null)
- {
- cacheSubSystem.getCacheManager().setRestoreFromMemento(true);
- cacheSubSystemList.add(cacheSubSystem);
- }
- }
- }
- else
- {
- elements.add(element);
- //System.out.println("Added to non-remote expansion list: " + element);
- }
- }
- // expand non-remote...
- systemView.setExpandedElements(elements.toArray());
- // expand remote...
- if (remoteElements.size() > 0)
- {
- for (int idx = 0; idx < remoteElements.size(); idx++)
- {
- RemoteObject ro = (RemoteObject) remoteElements.elementAt(idx);
- if (doTimings)
- timer.setStartTime();
- //event = new SystemResourceChangeEvent(ro.name,ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE,
- // SystemViewDummyObject.getSingleton()); // This tells SystemView to expand this remote object, but don't select a child
- //systemView.systemResourceChanged(event);
-
- // yantzi: artemis 6.0: notify subsystems that this is a restore from memento so they
- // can optionally use the cache if desired
- if (ro.subsystem != null && ro.subsystem.supportsCaching())
- {
- ro.subsystem.getCacheManager().setRestoreFromMemento(true);
- }
-
- systemView.refreshRemoteObject(ro.name, SystemViewDummyObject.getSingleton(), true);
-
- // yantzi: artemis 6.0: reset restore from memento flag
- if (ro.subsystem != null && ro.subsystem.supportsCaching())
- {
- ro.subsystem.getCacheManager().setRestoreFromMemento(false);
- }
-
- if (doTimings)
- {
- timer.setEndTime();
- System.out.println("Time to restore " + ro.name + ": " + timer); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- // yantzi: artemis 6.0, restore memento flag for affected subsystems
- if (restoreFromCache)
- {
- for (int i = 0; i < cacheSubSystemList.size(); i++)
- {
- ((ISubSystem) cacheSubSystemList.get(i)).getCacheManager().setRestoreFromMemento(false);
- }
- }
- }
-
- // restoreSelection
- childMem = memento.getChild(TAG_SELECTION);
- if (childMem != null)
- {
- ArrayList list = new ArrayList();
- Vector remoteElements = new Vector();
- IMemento[] elementMem = childMem.getChildren(TAG_ELEMENT);
- for (int i = 0; i < elementMem.length; i++)
- {
- Object element = getObjectFromMemento(showFilterPools, showFilterStrings, elementMem[i].getString(TAG_PATH));
- if (element != null)
- if (element instanceof RemoteObject) // this is a remote object
- remoteElements.add(element);
- else
- list.add(element);
- //System.out.println("Added to selection list: " + element);
- }
- systemView.setSelection(new StructuredSelection(list));
- if (remoteElements.size() > 0)
- {
- Vector v = new Vector();
- for (int idx = 0; idx < remoteElements.size(); idx++)
- {
- RemoteObject ro = (RemoteObject) remoteElements.elementAt(idx);
- v.addElement(ro.name);
- }
- if (doTimings)
- timer.setStartTime();
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(v, ISystemResourceChangeEvents.EVENT_SELECT_REMOTE, null);
- systemView.systemResourceChanged(event);
- if (doTimings)
- {
- timer.setEndTime();
- System.out.println("Time to select " + v.size() + " elements: " + timer); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- Tree tree = systemView.getTree();
- //restore vertical position
- ScrollBar bar = tree.getVerticalBar();
- if (bar != null)
- {
- try
- {
- String posStr = memento.getString(TAG_VERTICAL_POSITION);
- if (posStr != null)
- {
- int position;
- position = new Integer(posStr).intValue();
- bar.setSelection(position);
- }
- }
- catch (NumberFormatException e)
- {
- }
- }
- //restore vertical position
- bar = tree.getHorizontalBar();
- if (bar != null)
- {
- try
- {
- String posStr = memento.getString(TAG_HORIZONTAL_POSITION);
- if (posStr != null)
- {
- int position;
- position = new Integer(posStr).intValue();
- bar.setSelection(position);
- }
- }
- catch (NumberFormatException e)
- {
- }
- }
- return Status.OK_STATUS;
- }
-
- }
-
- // THE FOLLOWING ARE TO ENABLE PERSISTENCE OF NON-PRIMARY REMOTE SYSTEM EXPLORER VIEWS OPENED UP BY THE
- // USER RIGHT CLICKING AND SELECTING "OPEN IN NEW PERSPECTIVE".
-
- // --------------------------
- // IElementFactory methods...
- // --------------------------
- /**
- * Given the memento created by saveState, for the input to the perspective, recreate the input object
- * at startup time.
- * See the extension point for "org.eclipse.ui.elementFactories" in plugin.xml
- */
- public IAdaptable createElement(IMemento memento)
- {
- //System.out.println("INSIDE CREATEELEMENT IN SYSTEMVIEWPART. TAG_INPUT STRING = "+memento.getString(TAG_INPUT));
- IAdaptable element = null;
- Object object = null;
-
- // restore the show filter pools and show filter strings settings as they were when this was saved
- boolean showFilterPools = false;
- boolean showFilterStrings = false;
- String savedValue = memento.getString(TAG_SHOWFILTERPOOLS);
- if (savedValue != null)
- showFilterPools = savedValue.equals("t"); //$NON-NLS-1$
- else
- showFilterPools = SystemPreferencesManager.getPreferencesManager().getShowFilterPools();
-
- savedValue = memento.getString(TAG_SHOWFILTERSTRINGS);
- if (savedValue != null)
- showFilterStrings = savedValue.equals("t"); //$NON-NLS-1$
- //else
- // showFilterStrings = SystemPreferencesManager.getPreferencesManager().getShowFilterStrings();
-
- object = getObjectFromMemento(showFilterPools, showFilterStrings, memento.getString(TAG_INPUT));
-
- // For now we don't allow secondary perspectives to be opened on remote objects, so we are lucky!
- if (object instanceof RemoteObject)
- {
- }
- else if (object instanceof IAdaptable)
- element = (IAdaptable) object;
- //System.out.println("... RETURNING "+element);
- return element;
- }
-
- // ------------------------------
- // IPersistableElement methods...
- // ------------------------------
- /**
- * Return the element factory ID as declared in the extension point for "org.eclipse.ui.elementFactories" in plugin.xml
- */
- public String getFactoryId()
- {
- //System.out.println("INSIDE GETFACTORYID IN SYSTEMVIEWPART");
- return "org.eclipse.rse.systemview.elementfactory"; //$NON-NLS-1$
- }
-
- /*
- * The workbench is closing, and we are being asked to save the state of the input object in one of the secondary perspectives
- *
- public void saveState(IMemento memento)
- {
-
- }*/
-
- /**
- * The workbench is closing, and we are being asked to save the state of the input object in one of the secondary perspectives.
- * This method is called by our saveState when it detects this is a save for the input vs a page save.
- */
- protected void saveInputState(IMemento memento)
- {
- //System.out.println("INSIDE SAVEINPUTSTATE IN SYSTEMVIEWPART");
- IAdaptable inputObj = getSite().getPage().getInput();
- ISystemViewElementAdapter adapter = systemView.getAdapter(inputObj);
- if ((adapter != null) && (adapter.saveExpansionState(inputObj)))
- {
- String handle = getInputMementoHandle(inputObj, adapter);
- if (handle != null)
- {
- //System.out.println("... saving memento string: "+handle);
- memento.putString(TAG_INPUT, handle);
- }
- }
- }
- protected String getInputMementoHandle(Object o, ISystemViewElementAdapter adapter)
- {
- StringBuffer idBuffer = new StringBuffer(adapter.getMementoHandleKey(o));
- idBuffer.append(MEMENTO_DELIM + adapter.getInputMementoHandle(o));
- return idBuffer.toString();
- }
-
- // --------------------------------
- // IAdapterFactory methods...
- // --------------------------------
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] { IPersistableElement.class };
- }
-
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager, Object input)
- {
- //System.out.println("INSIDE REGISTERWITHMANAGER IN SYSTEMVIEWPART");
- // these are all the object types we allow the user to select "Open in New Perspective" on...
- manager.registerAdapters(this, input.getClass());
- }
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void unregisterWithManager(IAdapterManager manager)
- {
- //System.out.println("INSIDE UNREGISTERWITHMANAGER IN SYSTEMVIEWPART");
- // these are all the object types we allow the user to select "Open in New Perspective" on...
- manager.unregisterAdapters(this);
- }
-
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- //System.out.println("INSIDE GETADAPTER IN SYSTEMVIEWPART. adaptableObject = "+adaptableObject+", adapterType = "+adapterType.getName());
- // we don't try to restore these secondary perspectives unless user has elected to do so...
- if (!SystemPreferencesManager.getPreferencesManager().getRememberState())
- return null;
- else
- return this;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPartFrameSource.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPartFrameSource.java
deleted file mode 100644
index 1b69fea34..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPartFrameSource.java
+++ /dev/null
@@ -1,55 +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.view;
-
-import org.eclipse.ui.views.framelist.TreeFrame;
-import org.eclipse.ui.views.framelist.TreeViewerFrameSource;
-
-/**
- * Enables frameset for the Remote System Explorer view part
- */
-class SystemViewPartFrameSource extends TreeViewerFrameSource
-{
-
- // has same interface as org.eclipse.ui.views.navigator.NavigatorFrameSource
-
- private SystemViewPart fSystemViewPart;
-
- SystemViewPartFrameSource(SystemViewPart viewPart)
- {
- super(viewPart.getSystemView());
- fSystemViewPart = viewPart;
- }
-
- protected TreeFrame createFrame(Object input)
- {
- TreeFrame frame = super.createFrame(input);
- frame.setName(fSystemViewPart.getFrameName(input));
- frame.setToolTipText(fSystemViewPart.getFrameToolTipText(input));
- return frame;
- }
-
- /**
- * Also updates the title of the Remote Systems view part
- */
- protected void frameChanged(TreeFrame frame)
- {
- super.frameChanged(frame);
- fSystemViewPart.updateTitle();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPartGotoActionGroup.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPartGotoActionGroup.java
deleted file mode 100644
index e75f68832..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPartGotoActionGroup.java
+++ /dev/null
@@ -1,106 +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.view;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.rse.ui.GenericMessages;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionGroup;
-import org.eclipse.ui.views.framelist.BackAction;
-import org.eclipse.ui.views.framelist.ForwardAction;
-import org.eclipse.ui.views.framelist.FrameList;
-import org.eclipse.ui.views.framelist.UpAction;
-
-
-
-/**
- * Enables typical frameset actions for Remote System Explorer view part
- */
-public class SystemViewPartGotoActionGroup extends ActionGroup
-{
-
- protected SystemViewPart fSystemViewPart;
- protected BackAction backAction;
- protected ForwardAction forwardAction;
- //private GoIntoAction goIntoAction;
- protected UpAction upAction;
-
-
- /**
- * Constructor
- */
- public SystemViewPartGotoActionGroup(SystemViewPart viewPart)
- {
- fSystemViewPart = viewPart;
- makeActions();
- }
-
- /**
- * Returns the RSE view part associated with this action group
- */
- public SystemViewPart getSystemViewPart()
- {
- return fSystemViewPart;
- }
-
- protected void makeActions()
- {
- FrameList frameList = fSystemViewPart.getFrameList();
- //goIntoAction = new GoIntoAction(frameList);
- backAction = new BackAction(frameList);
- forwardAction = new ForwardAction(frameList);
- upAction = new UpAction(frameList);
- }
-
- public void fillContextMenu(IMenuManager menu)
- {
- // we actually don't call this! See instead SystemCascadingGoToAction
- //menu.add(goIntoAction); // done in SystemView
- MenuManager gotoMenu =
- new MenuManager(GenericMessages.ResourceNavigator_goto);
- menu.add(gotoMenu);
- gotoMenu.add(backAction);
- gotoMenu.add(forwardAction);
- gotoMenu.add(upAction);
- }
-
- public void fillActionBars(IActionBars actionBars)
- {
- //actionBars.setGlobalActionHandler(
- // ActionFactory.GO_INTO,
- // goIntoAction);
- actionBars.setGlobalActionHandler(
- ActionFactory.BACK.getId(),
- backAction);
- actionBars.setGlobalActionHandler(
- ActionFactory.FORWARD.getId(),
- forwardAction);
- actionBars.setGlobalActionHandler(ActionFactory.UP.getId(),upAction);
-
- IToolBarManager toolBar = actionBars.getToolBarManager();
- toolBar.add(backAction);
- toolBar.add(forwardAction);
- toolBar.add(upAction);
- }
-
- public void updateActionBars()
- {
- getContext().getSelection();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPromptableAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPromptableAdapter.java
deleted file mode 100644
index 259e46e84..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPromptableAdapter.java
+++ /dev/null
@@ -1,198 +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.view;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.model.ISystemPromptableObject;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.SystemRunAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Adapter for displaying special-case prompt objects in the system views.
- * These are objects that, when expanded, launch a wizard to create something.
- */
-public class SystemViewPromptableAdapter
- extends AbstractSystemViewAdapter implements ISystemViewElementAdapter
-{
- protected SystemRunAction runAction;
-
- /**
- * Return the actions to show in the popup menu for the current selection
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- ISystemPromptableObject object = (ISystemPromptableObject)selection.getFirstElement();
- if ((object != null) && !object.hasChildren())
- {
- if (runAction == null)
- runAction = getRunAction(shell);
- menu.add(menuGroup, runAction);
- }
- }
-
- /**
- * Only called if the selected object has no children.
- * @param shell the shell.
- * @return the run action.
- */
- protected SystemRunAction getRunAction(Shell shell) {
- return (new SystemRunAction(shell));
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- return ((ISystemPromptableObject)element).getImageDescriptor();
- }
-
- /**
- * Return the label for this object.
- */
- public String getText(Object element)
- {
- return ((ISystemPromptableObject)element).getText();
- }
- /**
- * Return the absolute name, versus just display name, of this object.
- * Just uses getText(element);
- */
- public String getAbsoluteName(Object element)
- {
- return getText(element);
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- return ((ISystemPromptableObject)element).getType();
- }
-
- /**
- * Return the parent of this object.
- */
- public Object getParent(Object element)
- {
- return ((ISystemPromptableObject)element).getParent();
- }
-
- /**
- * Return the children of this object. Not applicable for us.
- */
- public Object[] getChildren(Object element)
- {
- ISystemPromptableObject promptable = (ISystemPromptableObject)element;
- if (!promptable.hasChildren())
- return promptable.run(getShell());
- else
- return promptable.getChildren();
- }
-
- /**
- * Return true if this object has children.
- * We return true, as either we'll expand and prompt, or expand and show child prompts
- */
- public boolean hasChildren(Object element)
- {
- return true;
- }
- /**
- * Return our unique property descriptors
- */
- protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- return null;
- }
- /**
- * Return our unique property values
- */
- public Object internalGetPropertyValue(Object key)
- {
- return null;
- }
- /**
- * Don't show delete
- */
- public boolean showDelete(Object element)
- {
- return false;
- }
-
- /**
- * Don't show rename
- */
- public boolean showRename(Object element)
- {
- return false;
- }
-
- /**
- * Do show refresh, expand and collapse, but only if there are children
- */
- public boolean showRefresh(Object element)
- {
- ISystemPromptableObject promptable = (ISystemPromptableObject)element;
- return promptable.hasChildren();
- }
-
- /**
- * Don't show "Open in new perspective"
- */
- public boolean showOpenViewActions(Object element)
- {
- return false;
- }
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
-
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- * This just defaults to getName, but if that is not sufficient override it here.
- */
- public String getMementoHandle(Object element)
- {
- return getName(element);
- }
- /**
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element)
- {
- return "Prompt"; //$NON-NLS-1$
- }
-
- /**
- * Somtimes we don't want to remember an element's expansion state, such as for temporarily inserted
- * messages. In these cases return false from this method. The default is true.
- * <p>
- * WE RETURN FALSE.
- */
- public boolean saveExpansionState(Object element)
- {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewResources.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewResources.java
deleted file mode 100644
index 41e7b5ee6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewResources.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.view;
-
-import org.eclipse.osgi.util.NLS;
-
-
-/**
- * Constants used throughout the SystemView plugin
- */
-public class SystemViewResources extends NLS {
- private static String BUNDLE_NAME = "org.eclipse.rse.ui.view.SystemViewResources"; //$NON-NLS-1$
-
- // -------------------------
- // Property names...
- // -------------------------
- // Property sheet values: Common
- public static String RESID_PROPERTY_NBRCHILDREN_LABEL;
- public static String RESID_PROPERTY_NBRCHILDREN_TOOLTIP;
-
- public static String RESID_PROPERTY_NBRCHILDRENRETRIEVED_LABEL;
- public static String RESID_PROPERTY_NBRCHILDRENRETRIEVED_TOOLTIP;
-
- // Property sheet values: Connections
- public static String RESID_PROPERTY_PROFILE_TYPE_VALUE;
-
- public static String RESID_PROPERTY_PROFILESTATUS_LABEL;
- public static String RESID_PROPERTY_PROFILESTATUS_TOOLTIP;
-
- public static String RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL;
-
- public static String RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL;
-
- public static String RESID_PROPERTY_CONNECTION_TYPE_VALUE;
-
- public static String RESID_PROPERTY_SYSTEMTYPE_LABEL;
- public static String RESID_PROPERTY_SYSTEMTYPE_TOOLTIP;
-
- public static String RESID_PROPERTY_CONNECTIONSTATUS_LABEL;
- public static String RESID_PROPERTY_CONNECTIONSTATUS_TOOLTIP;
- public static String RESID_PROPERTY_CONNECTIONSTATUS_CONNECTED_VALUE;
-
- public static String RESID_PROPERTY_CONNECTIONSTATUS_DISCONNECTED_VALUE;
-
-
- public static String RESID_PROPERTY_ALIASNAME_LABEL;
- public static String RESID_PROPERTY_ALIASNAME_TOOLTIP;
-
- public static String RESID_PROPERTY_HOSTNAME_LABEL;
- public static String RESID_PROPERTY_HOSTNAME_TOOLTIP;
-
- public static String RESID_PROPERTY_DEFAULTUSERID_LABEL;
- public static String RESID_PROPERTY_DEFAULTUSERID_TOOLTIP;
-
- public static String RESID_PROPERTY_CONNDESCRIPTION_LABEL;
- public static String RESID_PROPERTY_CONNDESCRIPTION_TOOLTIP;
-
- public static String RESID_PROPERTY_PROFILE_LABEL;
- public static String RESID_PROPERTY_PROFILE_TOOLTIP;
-
-
- // Property sheet values: SubSystems
- public static String RESID_PROPERTY_SUBSYSTEM_TYPE_VALUE;
-
- public static String RESID_PROPERTY_USERID_LABEL;
- public static String RESID_PROPERTY_USERID_TOOLTIP;
-
- public static String RESID_PROPERTY_PORT_LABEL;
- public static String RESID_PROPERTY_PORT_TOOLTIP;
-
- public static String RESID_PROPERTY_CONNECTED_TOOLTIP;
- public static String RESID_PROPERTY_CONNECTED_LABEL;
-
- public static String RESID_PROPERTY_VRM_LABEL;
- public static String RESID_PROPERTY_VRM_TOOLTIP;
-
- // Property sheet values: Filter Pools
- public static String RESID_PROPERTY_FILTERPOOL_TYPE_VALUE;
-
- public static String RESID_PROPERTY_FILTERPOOLREFERENCE_TYPE_VALUE;
-
- public static String RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_LABEL;
- public static String RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_TOOLTIP;
- public static String RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_LABEL;
- public static String RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_TOOLTIP;
- public static String RESID_PROPERTY_FILTERPOOLREFERENCE_RELATEDCONNECTION_LABEL;
- public static String RESID_PROPERTY_FILTERPOOLREFERENCE_RELATEDCONNECTION_TOOLTIP;
- public static String RESID_PROPERTY_FILTERPOOLREFERENCE_IS_CONNECTIONPRIVATE_LABEL;
- public static String RESID_PROPERTY_FILTERPOOLREFERENCE_IS_CONNECTIONPRIVATE_TOOLTIP;
-
- // Property sheet values: Filters
- public static String RESID_PROPERTY_FILTERTYPE_LABEL;
- public static String RESID_PROPERTY_FILTERTYPE_VALUE;
- public static String RESID_PROPERTY_FILTERTYPE_TOOLTIP;
-
- public static String RESID_PROPERTY_FILTERSTRING_LABEL;
- public static String RESID_PROPERTY_FILTERSTRING_VALUE;
- public static String RESID_PROPERTY_FILTERSTRING_TOOLTIP;
-
- public static String RESID_PROPERTY_FILTERSTRINGS_LABEL;
- public static String RESID_PROPERTY_FILTERSTRINGS_TOOLTIP;
-
- public static String RESID_PROPERTY_FILTERSTRINGS_COUNT_LABEL;
- public static String RESID_PROPERTY_FILTERSTRINGS_COUNT_TOOLTIP;
-
- public static String RESID_PROPERTY_FILTERPARENTFILTER_LABEL;
- public static String RESID_PROPERTY_FILTERPARENTFILTER_TOOLTIP;
-
- public static String RESID_PROPERTY_FILTERPARENTPOOL_LABEL;
- public static String RESID_PROPERTY_FILTERPARENTPOOL_TOOLTIP;
-
- public static String RESID_PROPERTY_FILTERS_LABEL;
- public static String RESID_PROPERTY_FILTERS_DESCRIPTION;
-
- // Property sheet values: Files
- public static String RESID_PROPERTY_FILE_TYPE_FILE_VALUE;
- public static String RESID_PROPERTY_FILE_TYPE_FOLDER_VALUE;
- public static String RESID_PROPERTY_FILE_TYPE_ROOT_VALUE;
-
- public static String RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_LABEL;
-
- public static String RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_VALUE;
- public static String RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_DESCRIPTION;
-
- public static String RESID_PROPERTY_ARCHIVE_COMMENT_LABEL;
- public static String RESID_PROPERTY_ARCHIVE_COMMENT_DESCRIPTION;
-
-
- public static String RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_LABEL;
- public static String RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_VALUE;
- public static String RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_DESCRIPTION;
-
- public static String RESID_PROPERTY_VIRTUALFILE_COMMENT_LABEL;
- public static String RESID_PROPERTY_VIRTUALFILE_COMMENT_DESCRIPTION;
-
- public static String RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_LABEL;
- public static String RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_DESCRIPTION;
-
- public static String RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_LABEL;
- public static String RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_DESCRIPTION;
-
- public static String RESID_PROPERTY_FILE_SIZE_VALUE;
-
- public static String RESID_PROPERTY_FILE_PATH_LABEL;
- public static String RESID_PROPERTY_FILE_PATH_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_LASTMODIFIED_LABEL;
- public static String RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_SIZE_LABEL;
- public static String RESID_PROPERTY_FILE_SIZE_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL;
- public static String RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_CLASSIFICATION_LABEL;
- public static String RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_READONLY_LABEL;
- public static String RESID_PROPERTY_FILE_READONLY_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_READABLE_LABEL;
- public static String RESID_PROPERTY_FILE_READABLE_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_WRITABLE_LABEL;
- public static String RESID_PROPERTY_FILE_WRITABLE_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_HIDDEN_LABEL;
- public static String RESID_PROPERTY_FILE_HIDDEN_TOOLTIP;
-
- // search result properties
- public static String RESID_PROPERTY_SEARCH_LINE_LABEL;
- public static String RESID_PROPERTY_SEARCH_LINE_TOOLTIP;
- //public static String RESID_PROPERTY_SEARCH_CHAR_END_LABEL;
- //public static String RESID_PROPERTY_SEARCH_CHAR_END_TOOLTIP;
-
-
-
- // shell status properties
- public static String RESID_PROPERTY_SHELL_STATUS_LABEL;
- public static String RESID_PROPERTY_SHELL_STATUS_TOOLTIP;
- public static String RESID_PROPERTY_SHELL_CONTEXT_LABEL;
- public static String RESID_PROPERTY_SHELL_CONTEXT_TOOLTIP;
-
- public static String RESID_PROPERTY_SHELL_STATUS_ACTIVE_VALUE;
- public static String RESID_PROPERTY_SHELL_STATUS_INACTIVE_VALUE;
-
- // error properties
- public static String RESID_PROPERTY_ERROR_FILENAME_LABEL;
- public static String RESID_PROPERTY_ERROR_FILENAME_TOOLTIP;
-
- public static String RESID_PROPERTY_ERROR_LINENO_LABEL;
- public static String RESID_PROPERTY_ERROR_LINENO_TOOLTIP;
-
- // Property sheet values: Messages
- public static String RESID_PROPERTY_MESSAGE_TYPE_VALUE;
-
- // Property sheet values: Categories in Team view
- public static String RESID_PROPERTY_TEAM_CATEGORY_TYPE_VALUE;
- public static String RESID_PROPERTY_TEAM_SSFACTORY_TYPE_VALUE;
- public static String RESID_PROPERTY_TEAM_USERACTION_TYPE_VALUE;
- public static String RESID_PROPERTY_TEAM_COMPILETYPE_TYPE_VALUE;
- public static String RESID_PROPERTY_TEAM_COMPILECMD_TYPE_VALUE;
-
- // Property sheet values: Compile types
- public static String RESID_PROPERTY_COMPILETYPE_TYPES_LABEL;
- public static String RESID_PROPERTY_COMPILETYPE_TYPES_DESCRIPTION;
-
- // Miscellaneous / common
- public static String RESID_PROPERTY_ORIGIN_LABEL;
- public static String RESID_PROPERTY_ORIGIN_TOOLTIP;
- public static String RESID_PROPERTY_COMMAND_LABEL;
- public static String RESID_PROPERTY_COMMAND_TOOLTIP;
- public static String RESID_PROPERTY_COMMENT_LABEL;
- public static String RESID_PROPERTY_COMMENT_TOOLTIP;
-
- public static String RESID_PROPERTY_LINKINGACTION_TEXT;
- public static String RESID_PROPERTY_LINKINGACTION_TOOLTIP;
-
- public static String RESID_SCRATCHPAD;
- public static String RESID_REMOTE_SCRATCHPAD;
-
- public static String RESID_FETCHING;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemViewResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewResources.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewResources.properties
deleted file mode 100644
index 343ff3672..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewResources.properties
+++ /dev/null
@@ -1,207 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-#COMMON PROPERTIES
-RESID_PROPERTY_NBRCHILDREN_LABEL=Number of children
-RESID_PROPERTY_NBRCHILDREN_TOOLTIP=Number of children currently under this parent
-RESID_PROPERTY_NBRCHILDRENRETRIEVED_LABEL=Last retrieved
-RESID_PROPERTY_NBRCHILDRENRETRIEVED_TOOLTIP=Number of children last retrieved
-
-
-#CONNECTION PROPERTIES
-RESID_PROPERTY_SYSTEMTYPE_LABEL=Remote system type
-RESID_PROPERTY_SYSTEMTYPE_TOOLTIP=System type of remote host
-RESID_PROPERTY_PROFILE_TYPE_VALUE=Profile
-RESID_PROPERTY_PROFILESTATUS_LABEL=Status
-RESID_PROPERTY_PROFILESTATUS_TOOLTIP=Active status of this profile. Connections and filters are shown for active profiles only
-RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL=Active
-RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL=Not active
-RESID_PROPERTY_CONNECTION_TYPE_VALUE=Connection
-RESID_PROPERTY_CONNECTIONSTATUS_LABEL=Connection status
-RESID_PROPERTY_CONNECTIONSTATUS_TOOLTIP=Connection status of subsystems
-RESID_PROPERTY_CONNECTIONSTATUS_CONNECTED_VALUE=Some subsystems connected
-RESID_PROPERTY_CONNECTIONSTATUS_DISCONNECTED_VALUE=No subsystems connected
-
-RESID_PROPERTY_ALIASNAME_LABEL=Connection name
-RESID_PROPERTY_ALIASNAME_TOOLTIP=Unique name for this connection
-
-RESID_PROPERTY_HOSTNAME_LABEL=Host name
-RESID_PROPERTY_HOSTNAME_TOOLTIP=Host name or IP address of remote system
-
-RESID_PROPERTY_DEFAULTUSERID_LABEL=Default User ID
-RESID_PROPERTY_DEFAULTUSERID_TOOLTIP=Default user ID when no user ID in subsystem
-
-RESID_PROPERTY_CONNDESCRIPTION_LABEL=Description
-RESID_PROPERTY_CONNDESCRIPTION_TOOLTIP=Description of this connection
-
-RESID_PROPERTY_PROFILE_LABEL=Parent profile
-RESID_PROPERTY_PROFILE_TOOLTIP=Profile that owns this connection
-
-
-#SUBSYSTEM PROPERTIES
-RESID_PROPERTY_SUBSYSTEM_TYPE_VALUE=Subsystem
-
-RESID_PROPERTY_USERID_LABEL=User ID
-RESID_PROPERTY_USERID_TOOLTIP=User ID for connecting to this service
-
-RESID_PROPERTY_PORT_LABEL=Port
-RESID_PROPERTY_PORT_TOOLTIP=Port to use when connecting to this remote subsystem
-
-RESID_PROPERTY_CONNECTED_TOOLTIP=Currently connected to this service?
-RESID_PROPERTY_CONNECTED_LABEL=Connected
-
-RESID_PROPERTY_VRM_LABEL=Version
-RESID_PROPERTY_VRM_TOOLTIP=Version, release and modification of remote system, if available
-
-
-#FILTER POOL PROPERTIES
-RESID_PROPERTY_FILTERPOOL_TYPE_VALUE=Filter pool
-RESID_PROPERTY_FILTERPOOLREFERENCE_TYPE_VALUE=Filter pool reference
-
-RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_LABEL=Referenced filter pool
-RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_TOOLTIP=Filter pool this references
-RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_LABEL=Parent profile
-RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_TOOLTIP=Profile containing referenced filter pool
-RESID_PROPERTY_FILTERPOOLREFERENCE_RELATEDCONNECTION_LABEL=Related connection
-RESID_PROPERTY_FILTERPOOLREFERENCE_RELATEDCONNECTION_TOOLTIP=If this is a connection-private filter pool, this is the name of that connection
-RESID_PROPERTY_FILTERPOOLREFERENCE_IS_CONNECTIONPRIVATE_LABEL=Connection-private
-RESID_PROPERTY_FILTERPOOLREFERENCE_IS_CONNECTIONPRIVATE_TOOLTIP=Is this is a connection-private filter pool, which only exists for this connection?
-
-
-#FILTER PROPERTIES
-RESID_PROPERTY_FILTERTYPE_LABEL=Filter
-RESID_PROPERTY_FILTERTYPE_VALUE=Remote system filter
-RESID_PROPERTY_FILTERTYPE_TOOLTIP=Remote system filter
-
-RESID_PROPERTY_FILTERSTRING_LABEL=Filter string
-RESID_PROPERTY_FILTERSTRING_VALUE=Remote system filter string
-RESID_PROPERTY_FILTERSTRING_TOOLTIP=Filter string used to get this resource
-
-RESID_PROPERTY_FILTERSTRINGS_LABEL=Filter strings
-RESID_PROPERTY_FILTERSTRINGS_TOOLTIP=Filter strings used to retrieve list of remote system objects
-
-RESID_PROPERTY_FILTERSTRINGS_COUNT_LABEL=Number of filter strings
-RESID_PROPERTY_FILTERSTRINGS_COUNT_TOOLTIP=How many filter strings contained in this filter
-
-RESID_PROPERTY_FILTERPARENTFILTER_LABEL=Parent filter
-RESID_PROPERTY_FILTERPARENTFILTER_TOOLTIP=Filter containing this nested filter
-
-RESID_PROPERTY_FILTERPARENTPOOL_LABEL=Parent filter pool
-RESID_PROPERTY_FILTERPARENTPOOL_TOOLTIP=Filter pool that directly or indirectly contains this filter
-
-RESID_PROPERTY_FILTERS_LABEL=Filter Strings
-RESID_PROPERTY_FILTERS_DESCRIPTION=List of file system filters for this named filter
-
-
-
-#FILE PROPERTIES
-RESID_PROPERTY_FILE_TYPE_FILE_VALUE=File
-RESID_PROPERTY_FILE_TYPE_FOLDER_VALUE=Folder
-RESID_PROPERTY_FILE_TYPE_ROOT_VALUE=Root
-RESID_PROPERTY_FILE_LASTMODIFIED_LABEL=Last modified
-RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP=When last changed
-RESID_PROPERTY_FILE_SIZE_LABEL=Size
-RESID_PROPERTY_FILE_SIZE_VALUE=&1 bytes
-RESID_PROPERTY_FILE_SIZE_TOOLTIP=Number of bytes in this file
-RESID_PROPERTY_FILE_PATH_LABEL=Location
-RESID_PROPERTY_FILE_PATH_TOOLTIP=Path containing this file or folder
-RESID_PROPERTY_FILE_READABLE_LABEL=Readable
-RESID_PROPERTY_FILE_READABLE_TOOLTIP=Is this file readable
-RESID_PROPERTY_FILE_WRITABLE_LABEL=Writable
-RESID_PROPERTY_FILE_WRITABLE_TOOLTIP=Is this file writable
-RESID_PROPERTY_FILE_READONLY_LABEL=Read-only
-RESID_PROPERTY_FILE_READONLY_TOOLTIP=Is this file read-only
-RESID_PROPERTY_FILE_HIDDEN_LABEL=Hidden
-RESID_PROPERTY_FILE_HIDDEN_TOOLTIP=Is this file hidden
-RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL=Canonical Path
-RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP=Canonical path of this file or folder
-RESID_PROPERTY_FILE_CLASSIFICATION_LABEL=Classification
-RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP=Classification path of this file
-
-
-
-#SEARCH RESULT PROPERTIES
-RESID_PROPERTY_SEARCH_LINE_LABEL=Line
-RESID_PROPERTY_SEARCH_LINE_TOOLTIP=Line in file of match
-
-#ARCHIVE PROPERTIES
-RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_LABEL=Expanded Size
-RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_VALUE=&1 bytes
-RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_DESCRIPTION=Number of bytes in this archive when it is decompressed/expanded
-RESID_PROPERTY_ARCHIVE_COMMENT_LABEL=Comment
-RESID_PROPERTY_ARCHIVE_COMMENT_DESCRIPTION=The user-defined comment for this archive
-
-
-
-#VIRTUAL FILE PROPERTIES
-RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_LABEL=Compressed Size
-RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_VALUE=&1 bytes
-RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_DESCRIPTION=Number of bytes in the file after compression
-RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_LABEL=Compression ratio
-RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_DESCRIPTION=Compressed size divided by expanded size expressed as a percentage
-RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_LABEL=Compression method
-RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_DESCRIPTION=The algorithm used to compress the file
-RESID_PROPERTY_VIRTUALFILE_COMMENT_LABEL=Comment
-RESID_PROPERTY_VIRTUALFILE_COMMENT_DESCRIPTION=The user-defined comment for this virtual file
-
-#SHELL PROPERTIES
-RESID_PROPERTY_SHELL_STATUS_LABEL=Status
-RESID_PROPERTY_SHELL_STATUS_TOOLTIP=Status of the shell
-RESID_PROPERTY_SHELL_CONTEXT_LABEL=Context
-RESID_PROPERTY_SHELL_CONTEXT_TOOLTIP=Current context within the shell
-RESID_PROPERTY_SHELL_STATUS_ACTIVE_VALUE=Running
-RESID_PROPERTY_SHELL_STATUS_INACTIVE_VALUE=Finished
-
-#MESSAGE PROPERTIES
-RESID_PROPERTY_MESSAGE_TYPE_VALUE=Message
-
-#ERROR PROPERTIES
-RESID_PROPERTY_ERROR_FILENAME_LABEL=File
-RESID_PROPERTY_ERROR_FILENAME_TOOLTIP=File Containing Error
-RESID_PROPERTY_ERROR_LINENO_LABEL=Line
-RESID_PROPERTY_ERROR_LINENO_TOOLTIP=Line number
-
-#TEAM VIEW PROPERTIES
-RESID_PROPERTY_TEAM_CATEGORY_TYPE_VALUE=Category
-RESID_PROPERTY_TEAM_SSFACTORY_TYPE_VALUE=SubSystem factory
-RESID_PROPERTY_TEAM_USERACTION_TYPE_VALUE=User action
-RESID_PROPERTY_TEAM_COMPILETYPE_TYPE_VALUE=Compilable source type
-RESID_PROPERTY_TEAM_COMPILECMD_TYPE_VALUE=Compile command
-
-
-#COMPILE TYPE PROPERTIES
-RESID_PROPERTY_COMPILETYPE_TYPES_LABEL=File type
-RESID_PROPERTY_COMPILETYPE_TYPES_DESCRIPTION=File type this refers to
-
-#MISCELLANEOUS PROPERTIES
-RESID_PROPERTY_ORIGIN_LABEL=Origin
-RESID_PROPERTY_ORIGIN_TOOLTIP=Where this originated from
-RESID_PROPERTY_COMMAND_LABEL=Command
-RESID_PROPERTY_COMMAND_TOOLTIP=The command that will be executed
-RESID_PROPERTY_COMMENT_LABEL=Comment
-RESID_PROPERTY_COMMENT_TOOLTIP=A description
-
-RESID_PROPERTY_LINKINGACTION_TEXT = &Link with Editor
-RESID_PROPERTY_LINKINGACTION_TOOLTIP = Link with Editor
-
-
-RESID_SCRATCHPAD=Scratchpad
-RESID_REMOTE_SCRATCHPAD=Remote Scratchpad
-
-RESID_FETCHING = Fetching Remote Resources \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewRootInputAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewRootInputAdapter.java
deleted file mode 100644
index db718426e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewRootInputAdapter.java
+++ /dev/null
@@ -1,226 +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.view;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.model.SystemNewConnectionPromptObject;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Adapter for the root-providing object of the SystemView tree viewer.
- */
-public class SystemViewRootInputAdapter extends AbstractSystemViewAdapter implements ISystemViewElementAdapter
-{
- private SystemPreferencesManager spg;
- private SystemNewConnectionPromptObject newConnPrompt;
- private Object[] newConnPromptArray;
-
- /**
- * Ctor
- */
- public SystemViewRootInputAdapter()
- {
-
- }
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given element.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
-
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- return null;
- }
-
- /**
- * Return the label for this object
- */
- public String getText(Object element)
- {
- return SystemResources.RESID_SYSTEMREGISTRY_CONNECTIONS;
- }
- /**
- * Return the absolute name, versus just display name, of this object.
- * Just uses getText(element);
- */
- public String getAbsoluteName(Object element)
- {
- return getText(element);
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- //return "System Root Provider"; // should never be called
- // DKM - MRI hack to get "root"
- return SystemViewResources.RESID_PROPERTY_FILE_TYPE_ROOT_VALUE;
- }
-
- /**
- * Return the parent of this object
- */
- public Object getParent(Object element)
- {
- return null;
- }
-
- /**
- * Return the children of this object
- */
- public Object[] getChildren(Object element)
- {
- ISystemViewInputProvider provider = (ISystemViewInputProvider)element;
-
- if ((provider instanceof ISystemRegistry) && showNewConnectionPrompt())
- {
- Object[] children = provider.getSystemViewRoots();
- if ((children == null) || (children.length == 0))
- {
- return getNewConnectionPromptObjectAsArray();
- }
- else
- {
- Object[] allChildren = new Object[children.length+1];
- allChildren[0] = getNewConnectionPromptObject();
- for (int idx=0; idx<children.length; idx++)
- allChildren[idx+1] = children[idx];
- return allChildren;
- }
- }
- return provider.getSystemViewRoots();
- }
-
- /**
- * Return true if this object has children
- */
- public boolean hasChildren(Object element)
- {
- ISystemViewInputProvider provider = (ISystemViewInputProvider)element;
- if ((provider instanceof ISystemRegistry) && showNewConnectionPrompt())
- {
- return true;
- }
- return provider.hasSystemViewRoots();
- }
-
- // FOR COMMON DELETE ACTIONS
- /**
- * We don't support delete at all.
- */
- public boolean showDelete(Object element)
- {
- return false;
- }
-
- // FOR COMMON RENAME ACTIONS
- /**
- * We don't support rename at all.
- */
- public boolean showRename(Object element)
- {
- return false;
- }
- /**
- * Return a validator for verifying the new name is correct.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- return null;
- }
-
- // PRIVATE METHODS...
-
- private boolean showNewConnectionPrompt()
- {
- if (spg == null)
- spg = SystemPreferencesManager.getPreferencesManager();
- return spg.getShowNewConnectionPrompt();
- }
-
- private SystemNewConnectionPromptObject getNewConnectionPromptObject()
- {
- if (newConnPrompt == null)
- newConnPrompt = new SystemNewConnectionPromptObject();
- return newConnPrompt;
- }
-
- private Object[] getNewConnectionPromptObjectAsArray()
- {
- if (newConnPromptArray == null)
- newConnPromptArray = new Object[1];
- newConnPromptArray[0] = getNewConnectionPromptObject();
- return newConnPromptArray;
- }
- /**
- * Return our unique property descriptors
- */
- protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- return null;
- }
- /**
- * Return our unique property values
- */
- public Object internalGetPropertyValue(Object key)
- {
- return null;
- }
-
-
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- * We return "Connections"
- */
- public String getMementoHandle(Object element)
- {
- return "Connections"; // this is what getName() returns, but if we xlate the name we want this to remain in english. //$NON-NLS-1$
- }
- /**
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element)
- {
- // this really should not be translated... but changing it now might cause a problem restoring
- // from a previous release. Phil.
- return getType(element);
- //return "root";
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 5cf5e9fcd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewScratchpadAdapter.java
+++ /dev/null
@@ -1,274 +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.view;
-
-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.internal.model.SystemScratchpad;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Adapter for the root-providing object of the SystemView tree viewer.
- */
-public class SystemViewScratchpadAdapter extends AbstractSystemViewAdapter implements ISystemViewElementAdapter,ISystemRemoteElementAdapter,ISystemDragDropAdapter
-{
-
- private SystemPasteFromClipboardAction _pasteToScratchpadAction = null;
-
- public SystemViewScratchpadAdapter()
- {
- }
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given element.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- if (_pasteToScratchpadAction == null)
- {
- _pasteToScratchpadAction = new SystemPasteFromClipboardAction(shell, RSEUIPlugin.getTheSystemRegistry().getSystemClipboard());
- }
- menu.add(menuGroup, _pasteToScratchpadAction);
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- return null;
- }
-
- /**
- * Return the label for this object
- */
- public String getText(Object element)
- {
- //return SystemResources.RESID_SYSTEMREGISTRY_CONNECTIONS);
- return "Remote Scratchpad"; //$NON-NLS-1$
- }
- /**
- * Return the absolute name, versus just display name, of this object.
- * Just uses getText(element);
- */
- public String getAbsoluteName(Object element)
- {
- return getText(element);
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- return SystemViewResources.RESID_SCRATCHPAD;
- }
-
- /**
- * Return the parent of this object
- */
- public Object getParent(Object element)
- {
- return null;
- }
-
- /**
- * Return the children of this object
- */
- public Object[] getChildren(Object element)
- {
- SystemScratchpad pad = (SystemScratchpad)element;
- return pad.getChildren();
- }
-
- /**
- * Return true if this object has children
- */
- public boolean hasChildren(Object element)
- {
- SystemScratchpad pad = (SystemScratchpad)element;
- return pad.hasChildren();
- }
-
- // FOR COMMON DELETE ACTIONS
- /**
- * We don't support delete at all.
- */
- public boolean showDelete(Object element)
- {
- return false;
- }
-
- // FOR COMMON RENAME ACTIONS
- /**
- * We don't support rename at all.
- */
- public boolean showRename(Object element)
- {
- return false;
- }
- /**
- * Return a validator for verifying the new name is correct.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- return null;
- }
-
-
- /**
- * Return our unique property descriptors
- */
- protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- return null;
- }
- /**
- * Return our unique property values
- */
- public Object internalGetPropertyValue(Object key)
- {
- return null;
- }
-
-
- public boolean canDrop(Object element)
- {
- return true;
- }
-
- public Object doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
- {
- if (to instanceof SystemScratchpad)
- {
- if (from instanceof List)
- {
- List set = (List)from;
- for (int i = 0;i < set.size(); i++)
- {
- ((SystemScratchpad)to).addChild(set.get(i));
- }
- }
- else
- {
- ((SystemScratchpad)to).addChild(from);
- }
- return from;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object)
- */
- public String getAbsoluteParentName(Object element)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getSubSystemConfigurationId(java.lang.Object)
- */
- public String getSubSystemConfigurationId(Object element)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteTypeCategory(java.lang.Object)
- */
- public String getRemoteTypeCategory(Object element)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteType(java.lang.Object)
- */
- public String getRemoteType(Object element)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubType(java.lang.Object)
- */
- public String getRemoteSubType(Object element)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#refreshRemoteObject(java.lang.Object, java.lang.Object)
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParent(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParentNamesInUse(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean validateDrop(Object src, Object target, boolean sameSystem)
- {
- return true;
- }
-
- /**
- * Returns <code>false</code>.
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- return false;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index c34a7282a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewSubSystemAdapter.java
+++ /dev/null
@@ -1,734 +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.view;
-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.ISystemUserIdConstants;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.ISystemRegistry;
-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.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorPortInput;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-
-
-
-/**
- * Adapter for displaying SubSystem objects in tree views.
- * These are children of SystemConnection objects
- */
-public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter
- implements ISystemViewElementAdapter, ISystemPropertyConstants, ISystemUserIdConstants
-{
- protected String translatedType;
- // for reset property support
- private String original_portData;
- private SystemInheritablePropertyData original_userIdData = new SystemInheritablePropertyData();
- //private SystemInheritablePropertyData original_portData = new SystemInheritablePropertyData();
- private TextPropertyDescriptor propertyPortDescriptor;
- private boolean changed_userId, changed_port;
- private boolean port_editable = true;
- // -------------------
- // property descriptors
- // -------------------
- private PropertyDescriptor[] propertyDescriptorArray = null;
- //private SystemInheritablePropertyData portData = new SystemInheritablePropertyData();
- //private SystemInheritableTextPropertyDescriptor portDescriptor;
- private SystemInheritablePropertyData userIdData = new SystemInheritablePropertyData();
- private SystemInheritableTextPropertyDescriptor userIdDescriptor = null;
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given subsystem object.
- * Calls the method getActions on the subsystem's factory, and places
- * all action objects returned from the call, into the menu.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- if (selection.size() != 1)
- return; // does not make sense adding unique actions per multi-selection
- Object element = selection.getFirstElement();
- ISubSystem ss = (ISubSystem)element;
- ISubSystemConfiguration ssFactory = RSEUIPlugin.getDefault().getSystemRegistry().getSubSystemConfiguration(ss);
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
-
- IAction[] actions = adapter.getSubSystemActions(ssFactory, ss,shell);
- if (actions != null)
- {
- for (int idx=0; idx<actions.length; idx++)
- {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- }
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- //System.out.println("INSIDE GETIMAGEDESCRIPTOR FOR SUBSYSTEM VIEW ADAPTER: "+element);
- ISubSystem ss = (ISubSystem)element;
- ISubSystemConfiguration ssFactory = RSEUIPlugin.getDefault().getSystemRegistry().getSubSystemConfiguration(ss);
- if (ssFactory != null)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
- if (ss.isConnected())
- return adapter.getLiveImage(ssFactory);
- else
- return adapter.getImage(ssFactory);
- }
- else
- {
- SystemBasePlugin.logWarning("Unexpected error: ssFactory is null for ss " + ss.getName()); //$NON-NLS-1$
- return null;
- }
- }
-
- /**
- * Return the label for this object. Uses getName() on the subsystem object.
- */
- public String getText(Object element)
- {
- return ((ISubSystem)element).getName();
- }
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- return ((ISubSystem)element).getName();
- }
- /**
- * Return the absolute name, versus just display name, of this object.
- * Returns profileName.connectionName.subsystemName;
- */
- public String getAbsoluteName(Object element)
- {
- ISubSystem ss = (ISubSystem)element;
- return ss.getSystemProfileName() + "." + ss.getHostAliasName() + "." + ss.getName(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- if (translatedType == null)
- translatedType = SystemViewResources.RESID_PROPERTY_SUBSYSTEM_TYPE_VALUE;
- return translatedType;
- }
-
-
- /**
- * Return the parent of this object. This is a connection object.
- */
- public Object getParent(Object element)
- {
- //System.out.println("INSIDE GETPARENT FOR SUBSYSTEM VIEW ADAPTER: "+element);
- ISubSystem ss = (ISubSystem)element;
- return RSEUIPlugin.getDefault().getSystemRegistry().getHost(ss.getSystemProfile(),ss.getHostAliasName());
- }
-
- /**
- * Return the children of this object
- */
- public Object[] getChildren(Object element)
- {
- //System.out.println("INSIDE GETCHILDREN FOR SUBSYSTEM VIEW ADAPTER: "+element);
- ISubSystem ss = (ISubSystem)element;
- Object[] children = ss.getChildren();
- return children;
- }
-
- /**
- * Return true if this object has children
- */
- public boolean hasChildren(Object element)
- {
- //System.out.println("INSIDE HASCHILDREN FOR SUBSYSTEM VIEW ADAPTER: "+element);
- ISubSystem ss = (ISubSystem)element;
- return ss.hasChildren();
- }
-
- // ----------------------------------
- // Property sheet supplier methods...
- // ----------------------------------
-
- /**
- * Returns the current collection of property descriptors for connection objects.
- * @return an array containing all descriptors.
- */
- public IPropertyDescriptor[] getPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- PropertyDescriptor[] defaultProperties = (PropertyDescriptor[])getDefaultDescriptors();
- propertyDescriptorArray = new PropertyDescriptor[defaultProperties.length + 4];
- int idx = 0;
- for (idx = 0; idx < defaultProperties.length; idx++)
- propertyDescriptorArray[idx] = defaultProperties[idx];
-
- // add our unique property descriptors...
- //idx = defaultProperties.length; assertion
-
- // user id
- //propertyDescriptorArray[idx] = new TextPropertyDescriptor(ISystemPropertyConstants.P_USERID,
- // SystemViewResources.RESID_PROPERTY_USERID_LABEL));
- userIdDescriptor =
- new SystemInheritableTextPropertyDescriptor(ISystemPropertyConstants.P_USERID,
- SystemViewResources.RESID_PROPERTY_USERID_LABEL);
-
- userIdDescriptor.setToggleButtonToolTipText(SystemResources.RESID_SUBSYSTEM_USERID_INHERITBUTTON_TIP);
- userIdDescriptor.setEntryFieldToolTipText(SystemResources.RESID_SUBSYSTEM_USERID_TIP);
- propertyDescriptorArray[idx] = userIdDescriptor;
- propertyDescriptorArray[idx].setDescription(SystemViewResources.RESID_PROPERTY_USERID_TOOLTIP);
-
- // port
- propertyPortDescriptor = new TextPropertyDescriptor(ISystemPropertyConstants.P_PORT,
- SystemViewResources.RESID_PROPERTY_PORT_LABEL);
- propertyPortDescriptor.setValidator(new ValidatorPortInput());
- propertyDescriptorArray[++idx] = propertyPortDescriptor;
- //propertyDescriptorArray[++idx] = getPortDescriptor();
-
- // connected
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_IS_CONNECTED, SystemViewResources.RESID_PROPERTY_CONNECTED_LABEL, SystemViewResources.RESID_PROPERTY_CONNECTED_TOOLTIP);
-
- // vrm
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(P_VRM, SystemViewResources.RESID_PROPERTY_VRM_LABEL, SystemViewResources.RESID_PROPERTY_VRM_TOOLTIP);
- }
- return propertyDescriptorArray;
- }
- /**
- * Return our unique property descriptors
- */
- protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- return null;
- }
-
- /**
- * Create (first time), configure and return the property descriptor for the port number
- *
- private SystemInheritableTextPropertyDescriptor getPortDescriptor()
- {
- if (portDescriptor == null)
- {
- SystemViewPlugin plugin = SystemViewPlugin.getDefault();
- RSEUIPlugin sp = RSEUIPlugin.getDefault();
- portDescriptor =
- new SystemInheritableTextPropertyDescriptor(ISystemPropertyConstants.P_PORT,
- SystemViewResources.RESID_PROPERTY_PORT_LABEL));
- portDescriptor.setToggleButtonToolTipText(SystemResources.RESID_SUBSYSTEM_PORT_INHERITBUTTON_TIP));
- portDescriptor.setEntryFieldToolTipText(SystemResources.RESID_SUBSYSTEM_PORT_TIP));
- portDescriptor.setDescription(SystemViewResources.RESID_PROPERTY_PORT_DESCRIPTION));
- }
- return portDescriptor;
- }*/
-
- /**
- * Set the values in the userIdPropertyData object that drives the userId property sheet widget
- */
- private SystemInheritablePropertyData setUserIdPropertyData(SystemInheritablePropertyData data, ISubSystem subsys)
- {
- String localUserId = subsys.getLocalUserId();
- data.setLocalValue(localUserId);
- String parentUserId = subsys.getHost().getDefaultUserId();
- data.setInheritedValue(parentUserId);
- data.setIsLocal((localUserId!=null)&&(localUserId.length()>0));
-
- // DY: Defect 42735, check if user has temporarilly overrode the userid
- // for this connection via the signon dialog
- if (subsys.isConnected())
- {
- String connectedId = subsys.getConnectorService().getUserId();
- //On Local subsystems, connectedId==null. Phil.
- if (data.getIsLocal() && connectedId!=null && !connectedId.equals(localUserId))
- {
- data.setLocalValue(connectedId);
- data.setIsLocal(true);
- }
- else if (connectedId!=null && !connectedId.equals(parentUserId))
- {
- data.setLocalValue(connectedId);
- data.setIsLocal(true);
- }
- }
-
- return data;
- }
-
- /**
- * Set the values in the portPropertyData object that drives the port property sheet widget
- *
- private SystemInheritablePropertyData setPortPropertyData(SystemInheritablePropertyData data, SubSystem subsys)
- {
- Integer localPort = subsys.getPort();
- int iPort = 0;
- if (localPort != null)
- iPort = localPort.intValue();
- if (iPort > 0)
- data.setLocalValue(localPort.toString());
- else
- data.setLocalValue(null); // clear history
- SubSystemConfiguration ssFactory = subsys.getParentSubSystemConfiguration();
- boolean notApplicable = (!ssFactory.isPortEditable() && (iPort <= 0));
- if (!notApplicable)
- {
- data.setInheritedValue("0");
- data.setInheritedDisplayString(SystemResources.RESID_PORT_DYNAMICSELECT));
- data.setIsLocal(iPort != 0);
- }
- data.setNotApplicable(notApplicable);
- getPortDescriptor().setEditable(!notApplicable);
- //data.printDetails();
- return data;
- }
- */
-
- private String getPortString(ISubSystem ss)
- {
- //return getPortPropertyData(portData, ss);
- int iPort = ss.getConnectorService().getPort();
- ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration();
- boolean notApplicable = (!ssFactory.isPortEditable() && (iPort <= 0));
- if (notApplicable)
- return getTranslatedNotApplicable();
- else
- {
- return Integer.toString(iPort);
- }
- }
-
- /**
- * Returns the current value for the named property.
- * The parent handles P_TEXT and P_TYPE only, and we augment that here.
- * @param property the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- public Object getPropertyValue(Object property)
- {
- String name = (String)property;
- ISubSystem ss = (ISubSystem)propertySourceInput;
- if (name.equals(P_USERID))
- return setUserIdPropertyData(userIdData, ss);
- else if (name.equals(P_PORT))
- return getPortString(ss);
- else if (name.equals(P_VRM))
- {
- IConnectorService system = ss.getConnectorService();
- if (system != null)
- {
- String vrm = system.getVersionReleaseModification();
- if (vrm != null)
- return vrm;
- else
- return getTranslatedNotAvailable();
- }
- else
- return getTranslatedNotAvailable();
- }
- else if (name.equals(P_IS_CONNECTED))
- {
- // yantzi: artemis 6.0, offline support
- if (ss.getHost().isOffline())
- {
- // connection is offline
- return SystemResources.RESID_OFFLINE_LABEL;
- }
-
- IConnectorService system = ss.getConnectorService();
- boolean connected = false;
- if (system == null)
- {
- System.out.println("SystemViewSubSystemAdapter: Error! system is null for subsystem "+ss.getClass().getName()); //$NON-NLS-1$
- SystemBasePlugin.logError("SystemViewSubSystemAdapter: Error! system is null for subsystem "+ss.getClass().getName(), null); //$NON-NLS-1$
- }
- else
- connected = system.isConnected();
- return connected ? getTranslatedYes() : getTranslatedNo();
- }
- else
- return super.getPropertyValue(name);
- }
-
- /**
- * Returns itself
- */
- public ISubSystem getSubSystem(Object element)
- {
- if (element instanceof ISubSystem)
- return (ISubSystem)element;
- else
- return null;
- }
-
- /**
- * Return our unique property values
- */
- public Object internalGetPropertyValue(Object key)
- {
- return null;
- }
-
- // because this node has some editable properties, these overrides of our
- // parent class are needed as callbacks from the PropertySheet window.
- /**
- * Set input object for property source queries. This is called by the
- * SystemViewAdaptorFactory before returning this adapter object.
- */
- public void setPropertySourceInput(Object propertySourceInput)
- {
- if (this.propertySourceInput == propertySourceInput)
- return;
- super.setPropertySourceInput(propertySourceInput);
- ISubSystem ss = (ISubSystem)propertySourceInput;
- ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration();
- original_userIdData = setUserIdPropertyData(original_userIdData,ss);
- //original_portData = setPortPropertyData(original_portData,ss);
- original_portData = getPortString(ss);
- changed_userId = changed_port = false;
-
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
- if (userIdDescriptor != null)
- {
-
- userIdDescriptor.setValidator(adapter.getUserIdValidator(ssFactory));
- }
-
- //getPortDescriptor().setValidator((ICellEditorValidator)ssFactory.getPortValidator());
- if (propertyPortDescriptor != null)
- {
- propertyPortDescriptor.setValidator(adapter.getPortValidator(ssFactory));
- }
- ss.getConnectorService().getPort();
- port_editable = ssFactory.isPortEditable();
- }
-
- /**
- * Returns whether the property value has changed from the default.
- * Only applicable for editable properties.
- * Called by PropertySheet viewer when user presses reset.
- * @return <code>true</code> if the value of the specified property has changed
- * from its original default value; <code>false</code> otherwise.
- */
- public boolean isPropertySet(Object propertyObject)
- {
- String property = (String)propertyObject;
- boolean changed = false;
- if (property.equals(P_USERID))
- changed = changed_userId;
- else if (property.equals(P_PORT))
- changed = changed_port && port_editable;
- return changed;
- }
-
- /**
- * Change the subsystem user Id value
- */
- private void updateUserId(ISubSystem subsys, SystemInheritablePropertyData data)
- {
- //int whereToUpdate = USERID_LOCATION_SUBSYSTEM;
- String userId = data.getLocalValue(); // will be "" if !data.getIsLocal(), which results in wiping out local override
- ISubSystemConfiguration ssFactory = subsys.getSubSystemConfiguration();
- // unlike with connection objects, we don't ever allow the user to change the parent's
- // userId value, even if it is empty, when working with subsystems. There is too much
- // ambiquity as the parent could be the connnection or the user preferences setting for this
- // system type. Because of this decision, we don't need to tell updateSubSystem(...) where
- // to update, as it always the local subsystem.
- ssFactory.updateSubSystem(subsys, true, userId, false, subsys.getConnectorService().getPort());
- }
- /**
- * Change the subsystem port value
- *
- private void updatePort(SubSystem subsys, SystemInheritablePropertyData data)
- {
- String port = data.getLocalValue(); // will be "" if !data.getIsLocal(), which results in wiping out local override
- Integer portInteger = null;
- if (data.getIsLocal() && (port.length()>0))
- portInteger = new Integer(port);
- else
- portInteger = new Integer(0);
- SubSystemConfiguration ssFactory = subsys.getParentSubSystemConfiguration();
- ssFactory.updateSubSystem((Shell)null, subsys, false, subsys.getLocalUserId(), true, portInteger);
- }
- */
- /**
- * Change the subsystem port value
- */
- private void updatePort(ISubSystem subsys, String data)
- {
- if (!port_editable)
- return;
- String port = data;
- Integer portInteger = null;
- if (port.length()>0)
- {
- try
- {
- portInteger = new Integer(port);
- }
- catch (Exception exc)
- {
- return;
- }
- }
- else
- {
- portInteger = new Integer(0);
- }
- int portInt = portInteger.intValue();
- ISubSystemConfiguration ssFactory = subsys.getSubSystemConfiguration();
- ssFactory.updateSubSystem(subsys, false, subsys.getLocalUserId(), true, portInt);
- subsys.commit();
- }
-
-
- /**
- * Called when user selects the reset button in property sheet.
- */
- public void resetPropertyValue(Object propertyObject)
- {
- String property = (String)propertyObject;
- ISubSystem ss = (ISubSystem)propertySourceInput;
- ss.getSubSystemConfiguration();
- if (property.equals(P_USERID))
- {
- updateUserId(ss, original_userIdData);
- changed_userId = false;
- }
- else if (property.equals(P_PORT))
- {
- //updatePort(ss, original_portData);
- updatePort(ss, original_portData);
- changed_port = false;
- }
- }
- /**
- * Called when user changes property via property sheet.
- */
- public void setPropertyValue(Object property, Object value)
- {
- String name = (String)property;
- ISubSystem ss = (ISubSystem)propertySourceInput;
- ss.getSubSystemConfiguration();
- //System.out.println("inside setPropVal: " + property + ", value: " + value);
- if (name.equals(P_USERID))
- {
- updateUserId(ss, (SystemInheritablePropertyData)value);
- changed_userId = true;
- }
- else if (name.equals(P_PORT))
- {
- //System.out.println("inside setPropVal: " + property + ", value: " + value);
- //updatePort(ss, (SystemInheritablePropertyData)value);
- updatePort(ss, (String)value);
- changed_port = true;
- }
- }
-
- /**
- * Override of {@link AbstractSystemViewAdapter#testAttribute(Object, String, String)}. We add
- * one more attribute for subsystems:
- * <ol>
- * <li>name="serverLaunchPP". Returns "true" if the given subsystem supports the Server Launch Settings
- * property page, which is determined by calling it's factory's {@link ISubSystemConfiguration#supportsServerLaunchProperties()} method.
- * </ol>
- *
- * This property is used to filter the existence of the Server Launch Settings property page.
- *
- * @see org.eclipse.ui.IActionFilter#testAttribute(Object, String, String)
- */
- public boolean testAttribute(Object target, String name, String value)
- {
- if (target instanceof ISubSystem)
- {
- if (name.equalsIgnoreCase("serverLaunchPP")) //$NON-NLS-1$
- {
- ISubSystem ss = (ISubSystem)target;
- boolean supports = ss.getSubSystemConfiguration().supportsServerLaunchProperties(ss.getHost());
- return supports ? value.equals("true") : value.equals("false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (name.equalsIgnoreCase("envVarPP")) //$NON-NLS-1$
- {
- /** FIXME can't access specific subsystems from core anymore
- boolean supports = false;
- if (ss instanceof IRemoteFileSubSystem)
- supports = ((IRemoteFileSubSystemConfiguration)ss.getParentSubSystemConfiguration()).supportsEnvironmentVariablesPropertyPage();
- else
- supports = ((IRemoteCmdSubSystemConfiguration)ss.getParentSubSystemConfiguration()).supportsEnvironmentVariablesPropertyPage();
- */
- boolean supports = false;
- return supports ? value.equals("true") : value.equals("false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (name.equalsIgnoreCase("isConnectionError")) //$NON-NLS-1$
- {
- ISubSystem ss = (ISubSystem) target;
- boolean error = ss.isConnectionError();
- return error ? value.equals("true") : value.equals("false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return super.testAttribute(target, name, value);
- }
-
- // FOR COMMON DELETE ACTIONS
- /**
- * Return true if we should show the delete action in the popup for the given element.
- * If true, then canDelete will be called to decide whether to enable delete or not.
- */
- public boolean showDelete(Object element)
- {
- return canDelete(element);
- }
-
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- */
- public boolean canDelete(Object element)
- {
- //System.out.println("INSIDE ISDELETABLE FOR SUBSYSTEM VIEW ADAPTER: "+element);
- ISubSystem ss = (ISubSystem)element;
- ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration();
- return ssFactory.isSubSystemsDeletable();
- }
-
- /**
- * Perform the delete action.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor)
- {
- //System.out.println("INSIDE DODELETE FOR SUBSYSTEM VIEW ADAPTER: "+element);
- ISubSystem ss = (ISubSystem)element;
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.deleteSubSystem(ss);
- return true;
- }
-
- // FOR COMMON RENAME ACTIONS
- /**
- * Return true if we should show the rename action in the popup for the given element.
- * If true, then canRename will be called to decide whether to enable delete or not.
- */
- public boolean showRename(Object element)
- {
- return canRename(element);
- }
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename menu item will be enabled.
- */
- public boolean canRename(Object element)
- {
- return canDelete(element); // same rules for both delete and rename
- }
-
- /**
- * Perform the rename action. Assumes uniqueness checking was done already.
- */
- public boolean doRename(Shell shell, Object element, String name)
- {
- ISubSystem ss = (ISubSystem)element;
- ISubSystemConfiguration parentSSFactory = ss.getSubSystemConfiguration();
- parentSSFactory.renameSubSystem(ss,name); // renames, and saves to disk
- return true;
- }
-
- /**
- * Return a validator for verifying the new name is correct on a rename action.
- * The default implementation is not to support rename hence this method returns
- * null. Override if appropriate.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- return null;
- }
-
- // FOR COMMON DRAG AND DROP ACTIONS
- /**
- * Indicates whether the subsystem can be dragged.
- * Can't be used for physical copies but rather
- * for views (like the Scratchpad)
- */
- public boolean canDrag(Object element)
- {
- return true;
- }
-
- /**
- * Returns the subsystem (no phyiscal operation required to drag and subsystem (because it's local)
- */
- public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
- {
- return element;
- }
-
-
-
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
-
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- * This just defaults to getName, but if that is not sufficient override it here.
- */
- public String getMementoHandle(Object element)
- {
- ISubSystem ss = (ISubSystem)element;
- ISubSystemConfiguration ssf = ss.getSubSystemConfiguration();
- return ssf.getId()+"="+ss.getName(); //$NON-NLS-1$
- }
- /**
- * Return what to save to disk to identify this element when it is the input object to a secondary
- * Remote System Explorer perspective.
- */
- public String getInputMementoHandle(Object element)
- {
- Object parent = getParent(element);
- return getAdapter(parent).getInputMementoHandle(parent) + MEMENTO_DELIM + getMementoHandle(element);
- }
- /**
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection.
- * This just defaults to getType, but if that is not sufficient override it here, since that is
- * a translated string.
- */
- public String getMementoHandleKey(Object element)
- {
- return ISystemMementoConstants.MEMENTO_KEY_SUBSYSTEM;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/BrowseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/BrowseAction.java
deleted file mode 100644
index c773e65d3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/BrowseAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.monitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-class BrowseAction extends Action
-{
- protected final SystemMonitorViewPart part;
-
- public BrowseAction(SystemMonitorViewPart part)
- {
- super();
- this.part = part;
- }
-
- public BrowseAction(SystemMonitorViewPart part, String label, ImageDescriptor des)
- {
- super(label, des);
- this.part = part;
-
- setToolTipText(label);
- }
-
- public void checkEnabledState()
- {
- if (this.part._folder != null && this.part._folder.getInput() != null)
- {
- setEnabled(true);
- }
- else
- {
- setEnabled(false);
- }
- }
-
- public void run()
- {
- }
-} \ No newline at end of file
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
deleted file mode 100644
index c8c9f535d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.monitor;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-
-
-public class ClearAction extends BrowseAction
-{
-
- public ClearAction(SystemMonitorViewPart view)
- {
- super(view, SystemResources.ACTION_CLEAR_ALL_LABEL,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL_ID));
-
-
- // TODO DKM - get help for this!
- //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CLEAR_CONSOLE_ACTION);
- }
-
- public void checkEnabledState()
- {
- setEnabled(part.getViewer() != null);
- }
-
- public void run()
- {
- clear();
- }
-
- // clear contents of the current command viewer
- private void clear()
- {
- part.removeAllItemsToMonitor();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index a63128ae5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearSelectedAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.monitor;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-
-
-
-
-public class ClearSelectedAction extends BrowseAction
-{
- public ClearSelectedAction(SystemMonitorViewPart view)
- {
- super(view, SystemResources.ACTION_CLEAR_SELECTED_LABEL,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED_ID));
-
- // TODO DKM - get help for this!
- //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CLEAR_CONSOLE_ACTION);
- }
-
- public void checkEnabledState()
- {
- if (part.getViewer() != null)
- {
- setEnabled(true);
- return;
- }
-
- setEnabled(false);
- }
-
- public void run()
- {
- clear();
- }
-
- private void clear()
- {
- part.removeItemToMonitor((IAdaptable)part.getViewer().getInput());
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 03f2a27a7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewPage.java
+++ /dev/null
@@ -1,590 +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.view.monitor;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-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.model.ISystemContainer;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemRegistryUI;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.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;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableTreeView;
-import org.eclipse.rse.ui.view.SystemTableTreeViewProvider;
-import org.eclipse.rse.ui.widgets.ISystemCollapsableSectionListener;
-import org.eclipse.rse.ui.widgets.SystemCollapsableSection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-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.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Scale;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.part.CellEditorActionHandler;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-
-
-
-/**
- * Class for a remote shell session on a connection
- */
-public class MonitorViewPage implements SelectionListener, ISystemThemeConstants, IPropertyChangeListener, ISelectionChangedListener, Listener,
-FocusListener
-{
- private static SystemMessage _queryMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_QUERY_PROGRESS);
-
- class PollingThread extends Thread
- {
- private boolean _querying = false;
- private ISystemViewElementAdapter _adapter;
- private Object _inputObject;
- private SystemTableTreeView _viewer;
-
- public PollingThread()
- {
- _viewer = getViewer();
- _inputObject = _viewer.getInput();
- _adapter = (ISystemViewElementAdapter)((IAdaptable)_inputObject).getAdapter(ISystemViewElementAdapter.class);
- }
-
- public void run()
- {
- while (isPollingEnabled())
- {
- int interval = getPollingInterval() * 1000;
- try
- {
- Thread.sleep(interval);
- doQuery();
- // while (_querying)
- // {
- // Thread.sleep(100);
- // }
- doRedraw();
- }
- catch (InterruptedException e)
- {
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- protected void doQuery()
- {
-
- Display display = Display.getDefault();
- if (display != null && !_querying)
- {
- _querying= true;
- if (_inputObject instanceof ISystemContainer)
- {
- ((ISystemContainer)_inputObject).markStale(true);
- }
- ISubSystem ss = _adapter.getSubSystem(_inputObject);
- if (!ss.isConnected())
- return;
-
- String name = _adapter.getName(_inputObject);
- _queryMessage.makeSubstitution(name);
- String txt = _queryMessage.getLevelOneText();
- Job job = new Job(txt)
- {
- public IStatus run(IProgressMonitor monitor)
- {
- Object[] children = _adapter.getChildren(monitor, _inputObject);
- if (children != null)
- {
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider)_viewer.getContentProvider();
- if (provider!=null) {
- //bug 150924: provider can be lost when disconnecting while this job runs
- provider.setCache(children);
- }
-
- }
-
- _querying = false;
- return Status.OK_STATUS;
- }
- };
-
- job.schedule();
-
- try
- {
- job.wait();
- }
- catch (Exception e)
- {
-
- }
- }
-
- }
-
- protected void doRedraw()
- {
- Display display = Display.getDefault();
- if (display != null)
- {
- display.asyncExec(
- new Runnable()
- {
- public void run()
- {
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(_inputObject, ISystemResourceChangeEvents.EVENT_CHANGE_CHILDREN, _inputObject));
- //getViewer().refresh();
- }
- });
- }
- }
- }
-
- class SelectAllAction extends Action
- {
- public SelectAllAction()
- {
- super(SystemResources.ACTION_SELECT_ALL_LABEL, null);
- setToolTipText(SystemResources.ACTION_SELECT_ALL_TOOLTIP);
- }
-
- public void checkEnabledState()
- {
- setEnabled(true);
- }
-
- public void run()
- {
- SystemTableTreeView view = _viewer;
- view.getTree().selectAll();
- view.setSelection(view.getSelection());
- }
- }
-
-
- private SystemTableTreeView _viewer;
-
- private boolean _isPolling = false;
- private int _pollingInterval;
-
- private Group _tabFolderPage;
- private Button _pollCheckbox;
- private Scale _scale;
- private Text _scaleValue;
-
- private PollingThread _pollingThread;
-
- private SystemMonitorViewPart _viewPart;
-
- private String _title;
-
- private SystemCopyToClipboardAction _copyAction;
- private SystemPasteFromClipboardAction _pasteAction;
- private SelectAllAction _selectAllAction;
- private IActionBars _actionBars;
-
- public MonitorViewPage(SystemMonitorViewPart viewPart)
- {
- _viewPart = viewPart;
- _actionBars = _viewPart.getViewSite().getActionBars();
- }
-
-
-
- public Composite createTabFolderPage(CTabFolder tabFolder, CellEditorActionHandler editorActionHandler)
- {
- _tabFolderPage = new Group(tabFolder, SWT.NULL);
- GridLayout gridLayout = new GridLayout();
- _tabFolderPage.setLayout(gridLayout);
-
- createControl(_tabFolderPage);
-
-
-
- ISystemRegistryUI registry = RSEUIPlugin.getTheSystemRegistry();
-
- // global actions
- Clipboard clipboard = registry.getSystemClipboard();
- _copyAction = new SystemCopyToClipboardAction(_viewer.getShell(), clipboard);
- _copyAction.setEnabled(false);
-
- _pasteAction = new SystemPasteFromClipboardAction(_viewer.getShell(), clipboard);
- _pasteAction.setEnabled(false);
-
- editorActionHandler.setCopyAction(_copyAction);
- editorActionHandler.setPasteAction(_pasteAction);
-
- _selectAllAction = new SelectAllAction();
- _selectAllAction.setEnabled(false);
- editorActionHandler.setSelectAllAction(_selectAllAction);
-
-
- _viewer.addSelectionChangedListener(this);
- _viewer.getControl().addFocusListener(this);
-
- return _tabFolderPage;
- }
-
- public void setFocus()
- {
- _viewPart.getSite().setSelectionProvider(_viewer);
- }
-
- public IActionBars getActionBars()
- {
- return _actionBars;
- }
-
- public void selectionChanged(SelectionChangedEvent e)
- {
- IStructuredSelection sel = (IStructuredSelection) e.getSelection();
- _copyAction.setEnabled(_copyAction.updateSelection(sel));
- _pasteAction.setEnabled(_pasteAction.updateSelection(sel));
- _selectAllAction.setEnabled(true);
-
- //setActionHandlers();
- }
-
- public int getPollingInterval()
- {
- return _pollingInterval;
- }
-
- public boolean isPollingEnabled()
- {
- if (_isPolling && !getViewer().getControl().isDisposed())
- {
- return true;
- }
- return false;
- }
-
- public void setPollingEnabled(boolean flag)
- {
- _isPolling = flag;
- }
-
- public void setEnabled(boolean flag)
- {
- if (!flag)
- {
- Tree tree = _viewer.getTree();
-
- Color bgcolour = _tabFolderPage.getBackground();
-
- tree.setBackground(bgcolour);
- }
- }
-
- protected void createPollControls(Composite parent)
- {
-
- SystemCollapsableSection collapsable = new SystemCollapsableSection(parent);
- collapsable.setText(SystemResources.RESID_MONITOR_POLL_CONFIGURE_POLLING_LABEL);
- collapsable.setToolTips(SystemResources.RESID_MONITOR_POLL_CONFIGURE_POLLING_COLLAPSE_TOOLTIP,
- SystemResources.RESID_MONITOR_POLL_CONFIGURE_POLLING_EXPAND_TOOLTIP
- );
-
- Composite inputContainer = collapsable.getPageComposite();
-
-
- _pollCheckbox = SystemWidgetHelpers.createCheckBox(inputContainer, this, SystemResources.RESID_MONITOR_POLL_LABEL, SystemResources.RESID_MONITOR_POLL_TOOLTIP);
- GridData pg = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- _pollCheckbox.setLayoutData(pg);
-
- _pollingInterval = 100;
- SystemWidgetHelpers.createLabel(inputContainer, SystemResources.RESID_MONITOR_POLL_INTERVAL_LABEL);
-
- _scale = new Scale(inputContainer, SWT.NULL);
- _scale.setMaximum(200);
- _scale.setMinimum(5);
- _scale.setSelection(_pollingInterval);
-
- _scale.addSelectionListener(
- new SelectionListener()
- {
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- _pollingInterval = _scale.getSelection();
- _scaleValue.setText(_pollingInterval + "s"); //$NON-NLS-1$
-
- if (_pollingThread != null)
- _pollingThread.interrupt();
- }
-
- });
-
- _scale.setToolTipText(SystemResources.RESID_MONITOR_POLL_INTERVAL_TOOLTIP);
- GridData sd = new GridData(GridData.FILL_HORIZONTAL);
- _scale.setLayoutData(sd);
-
- _scaleValue = SystemWidgetHelpers.createReadonlyTextField(inputContainer);
- _scaleValue.setTextLimit(5);
- GridData scgd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- _scaleValue.setLayoutData(scgd);
- _scaleValue.setText(_pollingInterval + "s"); //$NON-NLS-1$
-
-
-
- GridLayout ilayout = new GridLayout();
- ilayout.numColumns = 4;GridData gridData1 = new GridData(GridData.FILL_HORIZONTAL);
- inputContainer.setLayout(ilayout);
- inputContainer.setLayoutData(gridData1);
-
-
- // defaults
- _scale.setEnabled(_isPolling);
- _scaleValue.setEnabled(_isPolling);
-
- collapsable.addCollapseListener(new CollapsableListener(inputContainer));
- collapsable.setCollapsed(true);
- }
-
- class CollapsableListener implements ISystemCollapsableSectionListener
- {
- Composite _child;
- public CollapsableListener(Composite child)
- {
- _child = child;
- }
-
- public void sectionCollapsed(boolean collapsed)
- {
- //System.out.println("collapsed");
- }
- }
-
- public void createControl(Composite parent)
- {
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- parent.setLayout(gridLayout);
-
- // create table portion
- //Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- //_viewer = new SystemTableView(table, _viewPart);
-
- Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- _viewer = new SystemTableTreeView(tree, _viewPart);
- _viewer.setWorkbenchPart(_viewPart);
-
- _viewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
- {
- handleDoubleClick(event);
- }
- });
-
-
- SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "ucmd0000"); //$NON-NLS-1$
-
- //TableLayout layout = new TableLayout();
- //tree.setLayout(layout);
- //tree.setLayout(new GridLayout())
- tree.setHeaderVisible(false);
- tree.setLinesVisible(false);
-
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- tree.setLayoutData(gridData);
-
- createPollControls(_tabFolderPage);
- }
-
- public void propertyChange(PropertyChangeEvent e)
- {
- }
-
-
- private void handleDoubleClick(DoubleClickEvent event)
- {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null)
- return;
-
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);
-
- if (adapter != null)
- {
- adapter.handleDoubleClick(element);
- }
- }
-
- public void dispose()
- {
- _viewer.dispose();
- _tabFolderPage.dispose();
- _isPolling = false;
- }
-
-
-
-
- public Object getInput()
- {
- return _viewer.getInput();
- }
-
- public void setInput(IAdaptable object)
- {
- setInput(object, true);
- updateTitle(object);
- }
-
- public void updateTitle(IAdaptable object)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)object.getAdapter(ISystemViewElementAdapter.class);
-
- String title = adapter.getText(object);
- _tabFolderPage.setText(title);
- }
-
- public String getTitle()
- {
- return _title;
- }
-
- public void setInput(IAdaptable object, boolean updateHistory)
- {
- if (_viewer != null && object != null)
- {
- _viewer.setInput(object);
- }
- }
-
- public void clearInput()
- {
- if (_viewer != null)
- {
- _viewer.setInput(null);
- }
- }
-
- public SystemTableTreeView getViewer()
- {
- return _viewer;
- }
-
-
-
- public void updateActionStates()
- {
- }
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- }
-
-
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
- */
- public void focusGained(FocusEvent arg0)
- {
- IActionBars actionBars = getActionBars();
- if (actionBars != null)
- {
- if (arg0.widget == _viewer.getControl())
- {
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, _copyAction);
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.PASTE, _pasteAction);
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, _selectAllAction);
- actionBars.updateActionBars();
-
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
- */
- public void focusLost(FocusEvent arg0)
- {
-
- }
-
- public void handleEvent(Event event)
- {
- Widget w = event.widget;
- if (w == _pollCheckbox)
- {
- boolean wasPolling = _isPolling;
- _isPolling = _pollCheckbox.getSelection();
- _scale.setEnabled(_isPolling);
- _scaleValue.setEnabled(_isPolling);
- if (wasPolling != _isPolling && _isPolling)
- {
- _pollingThread = new PollingThread();
- _pollingThread.start();
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewWorkbook.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewWorkbook.java
deleted file mode 100644
index 504d04d02..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewWorkbook.java
+++ /dev/null
@@ -1,277 +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.view.monitor;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableTreeView;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-
-
-
-/**
- * This is the desktop view wrapper of the System View viewer.
- */
-public class MonitorViewWorkbook extends Composite
-{
-
-
- private CTabFolder _folder;
- private SystemMonitorViewPart _viewPart;
-
- public MonitorViewWorkbook(Composite parent, SystemMonitorViewPart viewPart)
- {
- super(parent, SWT.NONE);
-
- _folder = new CTabFolder(this, SWT.NONE);
- _folder.setLayout(new TabFolderLayout());
- _folder.setLayoutData(new GridData(GridData.FILL_BOTH));
- setLayout(new FillLayout());
- _viewPart = viewPart;
- }
-
- public void dispose()
- {
-
- //if (!_folder.isDisposed())
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- if (!item.isDisposed())
- {
- MonitorViewPage page = (MonitorViewPage) item.getData();
- page.dispose();
- }
- }
- _folder.dispose();
- }
- super.dispose();
- }
-
- public CTabFolder getFolder()
- {
- return _folder;
- }
-
- public void remove(Object root)
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- if (!item.isDisposed())
- {
- MonitorViewPage page = (MonitorViewPage) item.getData();
-
- if (page != null && root == page.getInput())
- {
- item.dispose();
- page.dispose();
-
- page = null;
- item = null;
-
- _folder.redraw();
-
- return;
- }
- }
- }
- }
-
- public void removeDisconnected()
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- if (!item.isDisposed())
- {
- MonitorViewPage page = (MonitorViewPage) item.getData();
- if (page != null)
- {
- IAdaptable input = (IAdaptable)page.getInput();
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)input.getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null)
- {
- ISubSystem subSystem = adapter.getSubSystem(input);
- if (subSystem != null)
- {
- if (!subSystem.isConnected())
- {
- item.dispose();
- page.dispose();
-
- page = null;
- item = null;
-
- _folder.redraw();
- }
- }
- }
- }
- }
- }
- }
-
-
-
- public CTabItem getSelectedTab()
- {
- if (_folder.getItemCount() > 0)
- {
- int index = _folder.getSelectionIndex();
- CTabItem item = _folder.getItem(index);
- return item;
- }
-
- return null;
- }
-
- public MonitorViewPage getCurrentTabItem()
- {
- if (_folder.getItemCount() > 0)
- {
- int index = _folder.getSelectionIndex();
- CTabItem item = _folder.getItem(index);
- return (MonitorViewPage) item.getData();
- }
- return null;
- }
-
- public void showCurrentPage()
- {
- _folder.setFocus();
- }
-
- public Object getInput()
- {
- MonitorViewPage page = getCurrentTabItem();
- if (page != null)
- {
- page.setFocus();
- return page.getInput();
- }
-
- return null;
- }
-
- public SystemTableTreeView getViewer()
- {
- if (getCurrentTabItem() != null)
- {
- return getCurrentTabItem().getViewer();
- }
- return null;
- }
-
- public void addItemToMonitor(IAdaptable root, boolean createTab)
- {
- if (!_folder.isDisposed())
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- MonitorViewPage page = (MonitorViewPage) item.getData();
- if (page != null && root == page.getInput())
- {
- page.getViewer().refresh();
-
- if (_folder.getSelectionIndex() != i)
- {
- _folder.setSelection(item);
- }
- updateActionStates();
- //page.setFocus();
- return;
- }
- }
-
- if (createTab)
- {
- // never shown this, so add it
- createTabItem(root);
- }
- }
- }
-
- private void createTabItem(IAdaptable root)
- {
- MonitorViewPage monitorViewPage = new MonitorViewPage(_viewPart);
-
- CTabItem titem = new CTabItem(_folder, SWT.NULL);
- setTabTitle(root, titem);
-
- titem.setData(monitorViewPage);
- titem.setControl(monitorViewPage.createTabFolderPage(_folder, _viewPart.getEditorActionHandler()));
- _folder.setSelection(titem );
-
- monitorViewPage.setInput(root);
-
- SystemTableTreeView viewer = monitorViewPage.getViewer();
- _viewPart.getSite().setSelectionProvider(viewer);
- _viewPart.getSite().registerContextMenu(viewer.getContextMenuManager(), viewer);
-
- monitorViewPage.setFocus();
- }
-
- private void setTabTitle(IAdaptable root, CTabItem titem)
- {
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) root.getAdapter(ISystemViewElementAdapter.class);
- if (va != null)
- {
- titem.setText(va.getName(root));
- titem.setImage(va.getImageDescriptor(root).createImage());
- }
- }
-
- public void setInput(IAdaptable root)
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- MonitorViewPage page = (MonitorViewPage) item.getData();
- if (root == page.getInput())
- {
- _folder.setSelection(i);
- page.getViewer().refresh();
- return;
- }
- }
- }
-
- public void updateActionStates()
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- if (!item.isDisposed())
- {
- MonitorViewPage page = (MonitorViewPage) item.getData();
- if (page != null)
- {
- page.updateActionStates();
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorUI.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorUI.java
deleted file mode 100644
index d1fcb46f0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorUI.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.view.monitor;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-
-
-/**
- * A singleton class for dealing with remote commands
- */
-public class SystemMonitorUI
-{
-
-
- // singleton instance
- private static SystemMonitorUI instance;
- private static SystemMonitorViewPart _viewPart;
-
- public static final String MONITOR_VIEW_ID = "org.eclipse.rse.ui.view.monitorView"; //$NON-NLS-1$
-
- private SystemMonitorUI()
- {
- super();
- }
-
- /**
- * Get the singleton instance.
- * @return the singleton object of this type
- */
- public static SystemMonitorUI getInstance()
- {
- if (instance == null)
- {
- instance = new SystemMonitorUI();
- }
-
- return instance;
- }
-
-
- public SystemMonitorViewPart activateCommandsView()
- {
- try
- {
- IWorkbenchPage page = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
- _viewPart = (SystemMonitorViewPart) page.showView(SystemMonitorUI.MONITOR_VIEW_ID);
- page.bringToTop(_viewPart);
- }
- catch (PartInitException e)
- {
- SystemBasePlugin.logError("Can not open remote shell view", e); //$NON-NLS-1$
- }
-
- return _viewPart;
- }
-
-
- public static SystemMonitorViewPart getMonitorView()
- {
- return _viewPart;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 86da05c92..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorViewPart.java
+++ /dev/null
@@ -1,1036 +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:
- * Michael Berger (IBM) - 146339 Added refresh action graphic.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.monitor;
-
-import java.util.ArrayList;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-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.model.ISystemContainer;
-import org.eclipse.rse.model.ISystemRemoteChangeEvent;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemRemoteChangeListener;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.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;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.IRSEViewPart;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableTreeView;
-import org.eclipse.rse.ui.view.SystemTableTreeViewProvider;
-import org.eclipse.rse.ui.view.SystemTableViewColumnManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-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.List;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.CellEditorActionHandler;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-
-
-
-/**
- * This is the desktop view wrapper of the System View viewer.
- */
-public class SystemMonitorViewPart
- extends ViewPart
- implements
- ISelectionListener,
- SelectionListener,
- ISelectionChangedListener,
- ISystemResourceChangeListener,
- ISystemRemoteChangeListener,
- ISystemMessageLine,
- IRSEViewPart
-{
-
-
- class RestoreStateRunnable implements Runnable
- {
- public void run()
- {
- }
- }
- class PositionToAction extends BrowseAction
- {
- class PositionToDialog extends SystemPromptDialog
- {
- private String _name;
- private Combo _cbName;
-
-
- public PositionToDialog(Shell shell, String title)
- {
- super(shell, title);
- }
-
- public String getPositionName()
- {
- return _name;
- }
-
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
- _name = _cbName.getText();
- close();
- }
-
- protected Control getInitialFocusControl()
- {
- return _cbName;
- }
-
- public Control createInner(Composite parent)
- {
- Composite c = SystemWidgetHelpers.createComposite(parent, 2);
-
- Label aLabel = new Label(c, SWT.NONE);
- aLabel.setText(SystemPropertyResources.RESID_PROPERTY_NAME_LABEL);
-
- _cbName = SystemWidgetHelpers.createCombo(c, null);
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- _cbName.setLayoutData(textData);
- _cbName.setText("*"); //$NON-NLS-1$
- _cbName.setToolTipText(SystemResources.RESID_TABLE_POSITIONTO_ENTRY_TOOLTIP);
-
- this.getShell().setText(SystemResources.RESID_TABLE_POSITIONTO_LABEL);
- setHelp();
- return c;
- }
-
- private void setHelp()
- {
- setHelp(RSEUIPlugin.HELPPREFIX + "gnpt0000"); //$NON-NLS-1$
- }
- }
-
- public PositionToAction()
- {
- super(SystemMonitorViewPart.this, SystemResources.ACTION_POSITIONTO_LABEL, null);
- setToolTipText(SystemResources.ACTION_POSITIONTO_TOOLTIP);
- }
-
- public void run()
- {
-
- PositionToDialog posDialog = new PositionToDialog(getViewer().getShell(), getTitle());
- if (posDialog.open() == Window.OK)
- {
- String name = posDialog.getPositionName();
-
- getViewer().positionTo(name);
- }
- }
- }
-
-class SubSetAction extends BrowseAction
- {
- class SubSetDialog extends SystemPromptDialog
- {
- private String[] _filters;
- private Text[] _controls;
- private IPropertyDescriptor[] _uniqueDescriptors;
-
-
- public SubSetDialog(Shell shell, IPropertyDescriptor[] uniqueDescriptors)
- {
- super(shell, SystemResources.RESID_TABLE_SUBSET_LABEL);
- _uniqueDescriptors = uniqueDescriptors;
- }
-
- public String[] getFilters()
- {
- return _filters;
- }
-
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
-
- for (int i = 0; i < _controls.length; i++)
- {
- _filters[i] = _controls[i].getText();
- }
-
- close();
- }
-
- protected Control getInitialFocusControl()
- {
- return _controls[0];
- }
-
- public Control createInner(Composite parent)
- {
- Composite c = SystemWidgetHelpers.createComposite(parent, 2);
-
- int numberOfFields = _uniqueDescriptors.length;
- _controls = new Text[numberOfFields + 1];
- _filters = new String[numberOfFields + 1];
-
- Label nLabel = new Label(c, SWT.NONE);
- nLabel.setText(SystemPropertyResources.RESID_PROPERTY_NAME_LABEL);
-
-
- _controls[0] = SystemWidgetHelpers.createTextField(c, null);
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- _controls[0].setLayoutData(textData);
- _controls[0].setText("*"); //$NON-NLS-1$
- _controls[0].setToolTipText(SystemResources.RESID_TABLE_SUBSET_ENTRY_TOOLTIP);
-
-
-
- for (int i = 0; i < numberOfFields; i++)
- {
- IPropertyDescriptor des = _uniqueDescriptors[i];
-
- Label aLabel = new Label(c, SWT.NONE);
- aLabel.setText(des.getDisplayName());
-
- _controls[i + 1] = SystemWidgetHelpers.createTextField(c, null);
- GridData textData3 = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- _controls[i + 1].setLayoutData(textData3);
- _controls[i + 1].setText("*"); //$NON-NLS-1$
- }
-
- setHelp();
- return c;
- }
-
- private void setHelp()
- {
- setHelp(RSEUIPlugin.HELPPREFIX + "gnss0000"); //$NON-NLS-1$
- }
- }
-
- public SubSetAction()
- {
- super(SystemMonitorViewPart.this, SystemResources.ACTION_SUBSET_LABEL, null);
- setToolTipText(SystemResources.ACTION_SUBSET_TOOLTIP);
- }
-
- public void run()
- {
- SubSetDialog subsetDialog = new SubSetDialog(getViewer().getShell(), getViewer().getVisibleDescriptors(getViewer().getInput()));
- if (subsetDialog.open() == Window.OK)
- {
- String[] filters = subsetDialog.getFilters();
- getViewer().setViewFilters(filters);
-
- }
- }
- }
-
-
-
- class RefreshAction extends BrowseAction
- {
- public RefreshAction()
- {
- super(SystemMonitorViewPart.this, SystemResources.ACTION_REFRESH_LABEL,
- //RSEUIPlugin.getDefault().getImageDescriptor(ICON_SYSTEM_REFRESH_ID));
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_REFRESH_ID));
- setTitleToolTip(SystemResources.ACTION_REFRESH_TOOLTIP);
- }
-
- public void run()
- {
- Object inputObject = getViewer().getInput();
- if (inputObject instanceof ISystemContainer)
- {
- ((ISystemContainer)inputObject).markStale(true);
- }
- ((SystemTableTreeViewProvider) getViewer().getContentProvider()).flushCache();
- getViewer().refresh();
-
- // refresh layout too
- //_viewer.computeLayout(true);
-
- }
- }
- private class SelectColumnsAction extends BrowseAction
- {
-
- class SelectColumnsDialog extends SystemPromptDialog
- {
- private ISystemViewElementAdapter _adapter;
- private SystemTableViewColumnManager _columnManager;
- private IPropertyDescriptor[] _uniqueDescriptors;
- private ArrayList _currentDisplayedDescriptors;
- private ArrayList _availableDescriptors;
-
- private List _availableList;
- private List _displayedList;
-
- private Button _addButton;
- private Button _removeButton;
- private Button _upButton;
- private Button _downButton;
-
-
- public SelectColumnsDialog(Shell shell, ISystemViewElementAdapter viewAdapter, SystemTableViewColumnManager columnManager)
- {
- super(shell, SystemResources.RESID_TABLE_SELECT_COLUMNS_LABEL);
- _adapter = viewAdapter;
- _columnManager = columnManager;
- _uniqueDescriptors = viewAdapter.getUniquePropertyDescriptors();
- IPropertyDescriptor[] initialDisplayedDescriptors = _columnManager.getVisibleDescriptors(_adapter);
- _currentDisplayedDescriptors = new ArrayList(initialDisplayedDescriptors.length);
- for (int i = 0; i < initialDisplayedDescriptors.length;i++)
- {
- if (!_currentDisplayedDescriptors.contains(initialDisplayedDescriptors[i]))
- _currentDisplayedDescriptors.add(initialDisplayedDescriptors[i]);
- }
- _availableDescriptors = new ArrayList(_uniqueDescriptors.length);
- for (int i = 0; i < _uniqueDescriptors.length;i++)
- {
- if (!_currentDisplayedDescriptors.contains(_uniqueDescriptors[i]))
- {
- _availableDescriptors.add(_uniqueDescriptors[i]);
- }
- }
- }
-
-
- public void handleEvent(Event e)
- {
- Widget source = e.widget;
- if (source == _addButton)
- {
- int[] toAdd = _availableList.getSelectionIndices();
- addToDisplay(toAdd);
- }
- else if (source == _removeButton)
- {
- int[] toAdd = _displayedList.getSelectionIndices();
- removeFromDisplay(toAdd);
- }
- else if (source == _upButton)
- {
- int index = _displayedList.getSelectionIndex();
- moveUp(index);
- _displayedList.select(index - 1);
- }
- else if (source == _downButton)
- {
- int index = _displayedList.getSelectionIndex();
- moveDown(index);
- _displayedList.select(index + 1);
- }
-
- // update button enable states
- updateEnableStates();
- }
-
- public IPropertyDescriptor[] getDisplayedColumns()
- {
- IPropertyDescriptor[] displayedColumns = new IPropertyDescriptor[_currentDisplayedDescriptors.size()];
- for (int i = 0; i< _currentDisplayedDescriptors.size();i++)
- {
- displayedColumns[i]= (IPropertyDescriptor)_currentDisplayedDescriptors.get(i);
- }
- return displayedColumns;
- }
-
- private void updateEnableStates()
- {
- boolean enableAdd = false;
- boolean enableRemove = false;
- boolean enableUp = false;
- boolean enableDown = false;
-
- int[] availableSelected = _availableList.getSelectionIndices();
- for (int i = 0; i < availableSelected.length; i++)
- {
- int index = availableSelected[i];
- IPropertyDescriptor descriptor = (IPropertyDescriptor)_availableDescriptors.get(index);
- if (!_currentDisplayedDescriptors.contains(descriptor))
- {
- enableAdd = true;
- }
- }
-
- if (_displayedList.getSelectionCount()>0)
- {
- enableRemove = true;
-
- int index = _displayedList.getSelectionIndex();
- if (index > 0)
- {
- enableUp = true;
- }
- if (index < _displayedList.getItemCount()-1)
- {
- enableDown = true;
- }
- }
-
- _addButton.setEnabled(enableAdd);
- _removeButton.setEnabled(enableRemove);
- _upButton.setEnabled(enableUp);
- _downButton.setEnabled(enableDown);
-
- }
-
- private void moveUp(int index)
- {
- Object obj = _currentDisplayedDescriptors.remove(index);
- _currentDisplayedDescriptors.add(index - 1, obj);
- refreshDisplayedList();
- }
-
- private void moveDown(int index)
- {
- Object obj = _currentDisplayedDescriptors.remove(index);
- _currentDisplayedDescriptors.add(index + 1, obj);
-
- refreshDisplayedList();
- }
-
- private void addToDisplay(int[] toAdd)
- {
- ArrayList added = new ArrayList();
- for (int i = 0; i < toAdd.length; i++)
- {
- int index = toAdd[i];
-
- IPropertyDescriptor descriptor = (IPropertyDescriptor)_availableDescriptors.get(index);
-
- if (!_currentDisplayedDescriptors.contains(descriptor))
- {
- _currentDisplayedDescriptors.add(descriptor);
- added.add(descriptor);
- }
- }
-
- for (int i = 0; i < added.size(); i++)
- {
- _availableDescriptors.remove(added.get(i));
- }
-
-
- refreshAvailableList();
- refreshDisplayedList();
-
- }
-
- private void removeFromDisplay(int[] toRemove)
- {
- for (int i = 0; i < toRemove.length; i++)
- {
- int index = toRemove[i];
- IPropertyDescriptor descriptor = (IPropertyDescriptor)_currentDisplayedDescriptors.get(index);
- _currentDisplayedDescriptors.remove(index);
- _availableDescriptors.add(descriptor);
- }
- refreshDisplayedList();
- refreshAvailableList();
- }
-
- protected void buttonPressed(int buttonId)
- {
- setReturnCode(buttonId);
-
- close();
- }
-
- protected Control getInitialFocusControl()
- {
- return _availableList;
- }
-
- public Control createInner(Composite parent)
- {
- Composite main = SystemWidgetHelpers.createComposite(parent, 1);
-
- SystemWidgetHelpers.createLabel(main, SystemResources.RESID_TABLE_SELECT_COLUMNS_DESCRIPTION_LABEL);
-
- Composite c = SystemWidgetHelpers.createComposite(main, 4);
- c.setLayoutData(new GridData(GridData.FILL_BOTH));
- _availableList = SystemWidgetHelpers.createListBox(c, SystemResources.RESID_TABLE_SELECT_COLUMNS_AVAILABLE_LABEL, this, true);
-
- Composite addRemoveComposite = SystemWidgetHelpers.createComposite(c, 1);
- addRemoveComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER));
- _addButton = SystemWidgetHelpers.createPushButton(addRemoveComposite,
- SystemResources.RESID_TABLE_SELECT_COLUMNS_ADD_LABEL,
- this);
- _addButton.setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_ADD_TOOLTIP);
-
- _removeButton = SystemWidgetHelpers.createPushButton(addRemoveComposite,
- SystemResources.RESID_TABLE_SELECT_COLUMNS_REMOVE_LABEL,
- this);
- _removeButton.setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_REMOVE_TOOLTIP);
-
- _displayedList = SystemWidgetHelpers.createListBox(c, SystemResources.RESID_TABLE_SELECT_COLUMNS_DISPLAYED_LABEL, this, false);
-
- Composite upDownComposite = SystemWidgetHelpers.createComposite(c, 1);
- upDownComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER));
- _upButton = SystemWidgetHelpers.createPushButton(upDownComposite,
- SystemResources.RESID_TABLE_SELECT_COLUMNS_UP_LABEL,
- this);
- _upButton.setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_UP_TOOLTIP);
-
- _downButton = SystemWidgetHelpers.createPushButton(upDownComposite,
- SystemResources.RESID_TABLE_SELECT_COLUMNS_DOWN_LABEL,
- this);
- _downButton.setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_DOWN_TOOLTIP);
-
- initLists();
-
- setHelp();
- return c;
- }
-
- private void initLists()
- {
- refreshAvailableList();
- refreshDisplayedList();
- updateEnableStates();
- }
-
- private void refreshAvailableList()
- {
- _availableList.removeAll();
- // initialize available list
- for (int i = 0; i < _availableDescriptors.size(); i++)
- {
- IPropertyDescriptor descriptor = (IPropertyDescriptor)_availableDescriptors.get(i);
- _availableList.add(descriptor.getDisplayName());
- }
- }
-
- private void refreshDisplayedList()
- {
- _displayedList.removeAll();
- // initialize display list
- for (int i = 0; i < _currentDisplayedDescriptors.size(); i++)
- {
-
- Object obj = _currentDisplayedDescriptors.get(i);
- if (obj != null && obj instanceof IPropertyDescriptor)
- {
- _displayedList.add(((IPropertyDescriptor)obj).getDisplayName());
- }
- }
- }
-
- private void setHelp()
- {
- setHelp(RSEUIPlugin.HELPPREFIX + "gntc0000"); //$NON-NLS-1$
- }
- }
-
- public SelectColumnsAction()
- {
- super(SystemMonitorViewPart.this, SystemResources.ACTION_SELECTCOLUMNS_LABEL, null);
- setToolTipText(SystemResources.ACTION_SELECTCOLUMNS_TOOLTIP);
- setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID));
- }
-
- public void checkEnabledState()
- {
-
- if (getViewer() != null && getViewer().getInput() != null)
- {
- setEnabled(true);
- }
- else
- {
- setEnabled(false);
- }
- }
- public void run()
- {
- SystemTableTreeView viewer = getViewer();
- SystemTableViewColumnManager mgr = viewer.getColumnManager();
- ISystemViewElementAdapter adapter = viewer.getAdapterForContents();
- SelectColumnsDialog dlg = new SelectColumnsDialog(getShell(), adapter, mgr);
- if (dlg.open() == Window.OK)
- {
- mgr.setCustomDescriptors(adapter, dlg.getDisplayedColumns());
- viewer.computeLayout(true);
- viewer.refresh();
- }
- }
- }
-
- MonitorViewWorkbook _folder = null;
- private CellEditorActionHandler _editorActionHandler = null;
-
- // for ISystemMessageLine
- private String _message, _errorMessage;
- private SystemMessage sysErrorMessage;
- private IStatusLineManager _statusLine = null;
-
- private SelectColumnsAction _selectColumnsAction = null;
- private RefreshAction _refreshAction = null;
-
- private ClearAction _clearAllAction = null;
- private ClearSelectedAction _clearSelectedAction = null;
-
- private SubSetAction _subsetAction = null;
- private PositionToAction _positionToAction = null;
-
- // constants
- public static final String ID = "org.eclipse.rse.ui.view.monitorView"; //$NON-NLS-1$
- // matches id in plugin.xml, view tag
-
- public void setFocus()
- {
- _folder.showCurrentPage();
- }
-
- public Shell getShell()
- {
- return _folder.getShell();
- }
-
- public SystemTableTreeView getViewer()
- {
- return _folder.getViewer();
- }
-
- public Viewer getRSEViewer()
- {
- return _folder.getViewer();
- }
-
- public CellEditorActionHandler getEditorActionHandler()
- {
- if (_editorActionHandler == null)
- {
- _editorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars());
- }
- return _editorActionHandler;
- }
-
- public void createPartControl(Composite parent)
- {
- _folder = new MonitorViewWorkbook(parent, this);
- _folder.getFolder().addSelectionListener(this);
-
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.addSelectionListener(this);
-
-
- SystemWidgetHelpers.setHelp(_folder, RSEUIPlugin.HELPPREFIX + "ucmd0000"); //$NON-NLS-1$
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.addSystemResourceChangeListener(this);
- registry.addSystemRemoteChangeListener(this);
-
-
- RestoreStateRunnable restore = new RestoreStateRunnable();
- Display.getCurrent().asyncExec(restore);
-
- fillLocalToolBar();
-
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection sel)
- {
- }
-
- public void dispose()
- {
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.removeSelectionListener(this);
- _folder.dispose();
-
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- registry.removeSystemResourceChangeListener(this);
- registry.removeSystemRemoteChangeListener(this);
-
-
- super.dispose();
- }
-
- public void updateActionStates()
- {
-
- if (_folder != null && _folder.getInput() != null)
- {
- }
- if (_clearAllAction != null)
- {
- _clearAllAction.checkEnabledState();
- _clearSelectedAction.checkEnabledState();
- _selectColumnsAction.checkEnabledState();
- _refreshAction.checkEnabledState();
- _positionToAction.checkEnabledState();
- }
- }
-
- public void fillLocalToolBar()
- {
- if (_folder != null )
- {
-
-
- //updateActionStates();
-
- IActionBars actionBars = getViewSite().getActionBars();
-
- _refreshAction= new RefreshAction();
-
- _clearSelectedAction = new ClearSelectedAction(this);
- _clearAllAction = new ClearAction(this);
-
- _selectColumnsAction = new SelectColumnsAction();
-
- _subsetAction = new SubSetAction();
- _positionToAction = new PositionToAction();
-
- IToolBarManager toolBarManager = actionBars.getToolBarManager();
- addToolBarItems(toolBarManager);
- addToolBarMenuItems(actionBars.getMenuManager());
- }
- updateActionStates();
- }
-
- private void addToolBarItems(IToolBarManager toolBarManager)
- {
- toolBarManager.removeAll();
-
- toolBarManager.add(_refreshAction);
-
- toolBarManager.add(new Separator());
- toolBarManager.add(_clearSelectedAction);
- toolBarManager.add(_clearAllAction);
-
- toolBarManager.add(new Separator());
- toolBarManager.add(_selectColumnsAction);
-
- toolBarManager.update(true);
- }
-
-
-
- public void selectionChanged(SelectionChangedEvent e)
- {
- }
-
-
-
- public void addItemToMonitor(IAdaptable root)
- {
- if (root != null)
- {
- _folder.addItemToMonitor(root, true);
- if (true)
- updateActionStates();
- }
- }
-
- public void removeItemToMonitor(IAdaptable root)
- {
- if (root != null)
- {
- _folder.remove(root);
- if (true)
- updateActionStates();
- }
- }
-
- public void removeAllItemsToMonitor()
- {
- while (_folder.getInput() != null)
- {
- removeItemToMonitor((IAdaptable)_folder.getInput());
- }
- }
-
- public void setInput(IAdaptable object)
- {
- _folder.setInput(object);
- }
-
-
- /**
- * Used to asynchronously update the view whenever properties change.
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
-
- Object child = event.getSource();
- SystemTableTreeView viewer = getViewer();
- if (viewer != null)
- {
- Object input = viewer.getInput();
- switch (event.getType())
- {
- case ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE:
- {
- _folder.removeDisconnected();
- updateActionStates();
- }
- break;
- case ISystemResourceChangeEvents.EVENT_RENAME:
- {
- if (child == input)
- {
- _folder.getCurrentTabItem().updateTitle((IAdaptable)child);
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_DELETE:
- case ISystemResourceChangeEvents.EVENT_DELETE_MANY:
- {
- if (child == input)
- {
- removeItemToMonitor((IAdaptable)child);
- }
- }
- break;
- default:
- break;
- }
- }
- }
-
- /**
- * This is the method in your class that will be called when a remote resource
- * changes. You will be called after the resource is changed.
- * @see org.eclipse.rse.model.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- int eventType = event.getEventType();
- Object remoteResource = event.getResource();
-
- Vector remoteResourceNames = null;
- if (remoteResource instanceof Vector)
- {
- remoteResourceNames = (Vector) remoteResource;
- remoteResource = remoteResourceNames.elementAt(0);
- }
-
- Object child = event.getResource();
-
- SystemTableTreeView viewer = getViewer();
- if (viewer != null)
- {
- Object input = viewer.getInput();
- if (input == child || child instanceof Vector)
- {
- switch (eventType)
- {
- // --------------------------
- // REMOTE RESOURCE CHANGED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CHANGED :
- break;
-
- // --------------------------
- // REMOTE RESOURCE CREATED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED :
- break;
-
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED :
- {
- if (child instanceof Vector)
- {
- /*Vector vec = (Vector)child;
- for (int v = 0; v < vec.size(); v++)
- {
- Object c = vec.get(v);
-
- }*/
- }
- else
- {
-
- return;
- }
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE RENAMED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
- {
- addItemToMonitor((IAdaptable)child);
- }
-
- break;
- }
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- Widget source = e.widget;
-
- if (source == _folder.getFolder())
- {
- updateActionStates();
- }
- }
-
-
-// -------------------------------
- // ISystemMessageLine interface...
- // -------------------------------
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- _errorMessage = null;
- sysErrorMessage = null;
- if (_statusLine != null)
- _statusLine.setErrorMessage(_errorMessage);
- }
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- _message = null;
- if (_statusLine != null)
- _statusLine.setMessage(_message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage()
- {
- return _errorMessage;
- }
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage()
- {
- return _message;
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- this._errorMessage = message;
- if (_statusLine != null)
- _statusLine.setErrorMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- return sysErrorMessage;
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- sysErrorMessage = message;
- setErrorMessage(message.getLevelOneText());
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(Throwable exc)
- {
- setErrorMessage(exc.getMessage());
- }
-
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- this._message = message;
- if (_statusLine != null)
- _statusLine.setMessage(message);
- }
- /**
- *If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- setMessage(message.getLevelOneText());
- }
-
- private void addToolBarMenuItems(IMenuManager menuManager)
- {
- menuManager.removeAll();
- menuManager.add(_selectColumnsAction);
- menuManager.add(new Separator("Filter")); //$NON-NLS-1$
- menuManager.add(_positionToAction);
- menuManager.add(_subsetAction);
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/TabFolderLayout.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/TabFolderLayout.java
deleted file mode 100644
index 7b3493d15..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/TabFolderLayout.java
+++ /dev/null
@@ -1,61 +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.view.monitor;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Layout;
-
-public class TabFolderLayout extends Layout {
-
-
-
- protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {
- if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
- return new Point(wHint, hHint);
-
- Control [] children = composite.getChildren ();
- int count = children.length;
- int maxWidth = 0, maxHeight = 0;
- for (int i=0; i<count; i++) {
- Control child = children [i];
- Point pt = child.computeSize (SWT.DEFAULT, SWT.DEFAULT, flushCache);
- maxWidth = Math.max (maxWidth, pt.x);
- maxHeight = Math.max (maxHeight, pt.y);
- }
-
- if (wHint != SWT.DEFAULT)
- maxWidth= wHint;
- if (hHint != SWT.DEFAULT)
- maxHeight= hHint;
-
- return new Point(maxWidth, maxHeight);
-
- }
-
- protected void layout (Composite composite, boolean flushCache) {
- Rectangle rect= composite.getClientArea();
-
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- children[i].setBounds(rect);
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 6dab5756b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/BrowseAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.scratchpad;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.internal.model.SystemScratchpad;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-class BrowseAction extends Action
-{
- protected SystemScratchpadView _view;
- protected SystemScratchpad _scratchPad;
- public BrowseAction(SystemScratchpadView view, String label, ImageDescriptor des)
- {
- super(label, des);
- _view = view;
- setImageDescriptor(des);
- setToolTipText(label);
- _scratchPad = RSEUIPlugin.getTheSystemRegistry().getSystemScratchPad();
- }
-
- public void checkEnabledState()
- {
- if (_view.getInput() != null)
- {
- setEnabled(true);
- }
- else
- {
- setEnabled(false);
- }
- }
-
- public void run()
- {
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 35f9e4420..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.ui.view.scratchpad;
-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;
-
-
-
-public class ClearAction extends BrowseAction
-{
-
- public ClearAction(SystemScratchpadView view)
- {
- super(view, SystemResources.ACTION_CLEAR_ALL_LABEL,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL_ID));
-
-
- // TODO DKM - get help for this!
- //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CLEAR_CONSOLE_ACTION);
- }
-
- public void checkEnabledState()
- {
- setEnabled(_scratchPad.hasChildren());
- }
-
- public void run()
- {
- clear();
- }
-
- // clear contents of the current command viewer
- private void clear()
- {
- _scratchPad.clearChildren();
- 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
deleted file mode 100644
index 311cfc53b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearSelectedAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-
-package org.eclipse.rse.ui.view.scratchpad;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-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;
-
-
-
-
-public class ClearSelectedAction extends BrowseAction
-{
- public ClearSelectedAction(SystemScratchpadView view)
- {
- super(view, SystemResources.ACTION_CLEAR_SELECTED_LABEL,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED_ID));
-
- // TODO DKM - get help for this!
- //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CLEAR_CONSOLE_ACTION);
- }
-
- public void checkEnabledState()
- {
- if (_scratchPad.hasChildren())
- {
- StructuredSelection selection = (StructuredSelection)_view.getSelection();
- if (selection != null)
- {
- Iterator iterator = selection.iterator();
- while (iterator.hasNext())
- {
- Object obj = iterator.next();
- if (!_scratchPad.contains(obj))
- {
- setEnabled(false);
- return;
- }
- }
- setEnabled(true);
- return;
- }
- }
-
- setEnabled(false);
- }
-
- public void run()
- {
- clear();
- }
-
- private void clear()
- {
- StructuredSelection selection = (StructuredSelection)_view.getSelection();
- if (selection != null)
- {
- Iterator iterator = selection.iterator();
- while (iterator.hasNext())
- {
- _scratchPad.removeChild(iterator.next());
- }
- 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/SystemScratchpadView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadView.java
deleted file mode 100644
index 7e6103fa7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadView.java
+++ /dev/null
@@ -1,1448 +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.view.scratchpad;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-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.SystemPopupMenuActionContributorManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.model.ISystemRemoteChangeEvent;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-import org.eclipse.rse.model.ISystemRemoteChangeListener;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemDeleteTarget;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.ISystemRenameTarget;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.ui.actions.SystemOpenExplorerPerspectiveAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.actions.SystemRemotePropertiesAction;
-import org.eclipse.rse.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemSelectAllTarget;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.rse.ui.view.SystemViewDataDragAdapter;
-import org.eclipse.rse.ui.view.SystemViewDataDropAdapter;
-import org.eclipse.rse.ui.view.SystemViewMenuListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Layout;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.part.EditorInputTransfer;
-import org.eclipse.ui.part.PluginTransfer;
-
-
-/**
- * This subclass of the standard JFace tabletree viewer is used to
- * show a generic tabletree view of the selected object
- * <p>
- */
-public class SystemScratchpadView
- // TODO change TreeViewer to ScratchpadViewer when Eclipse fixes SWT viewer
-// extends ScratchpadViewer
- extends TreeViewer
- implements IMenuListener, ISystemDeleteTarget,
- ISystemRenameTarget, ISystemSelectAllTarget,
- ISystemResourceChangeListener, ISystemRemoteChangeListener,
- ISelectionChangedListener, ISelectionProvider
-{
- private Object _objectInput;
- //private ArrayList _attributeColumns;
- private TableLayout _layout;
- private SystemScratchpadViewProvider _provider;
- private MenuManager _menuManager;
-
- // these variables were copied from SystemView to allow for limited support
- // of actions. I say limited because somethings don't yet work properly.
- protected SystemRefreshAction _refreshAction;
- protected PropertyDialogAction _propertyDialogAction;
- protected SystemRemotePropertiesAction _remotePropertyDialogAction;
- protected SystemOpenExplorerPerspectiveAction _openToPerspectiveAction;
- protected SystemShowInTableAction _showInTableAction;
-
- // global actions
- // Note the Edit menu actions are set in SystemViewPart. Here we use these
- // actions from our own popup menu actions.
- protected SystemCommonDeleteAction _deleteAction;
- // for global delete menu item
- protected SystemCommonRenameAction _renameAction;
- // for common rename menu item
- protected SystemCommonSelectAllAction _selectAllAction;
- // for common Ctrl+A select-all
- protected ClearSelectedAction _clearSelectedAction;
- protected ClearAction _clearAllAction;
-
- protected boolean _selectionShowRefreshAction;
- protected boolean _selectionShowOpenViewActions;
- protected boolean _selectionShowDeleteAction;
- protected boolean _selectionShowRenameAction;
- protected boolean _selectionEnableDeleteAction;
- protected boolean _selectionEnableRenameAction;
-
- protected boolean _selectionIsRemoteObject = true;
- protected boolean _selectionFlagsUpdated = false;
-
- private IWorkbenchPart _workbenchPart = null;
-
- private ISystemMessageLine _messageLine;
- protected boolean menuListenerAdded = false;
-
- private static final int LEFT_BUTTON = 1;
- private int mouseButtonPressed = LEFT_BUTTON;
-
- /**
- * Constructor for the table view
- *
- */
- public SystemScratchpadView(Tree tableTree, ISystemMessageLine msgLine)
- {
- super(tableTree);
- _messageLine = msgLine;
- //_attributeColumns = new ArrayList();
- _layout = new TableLayout();
-
- _provider = new SystemScratchpadViewProvider(this);
-
-
- setContentProvider(_provider);
-
- IWorkbench wb = PlatformUI.getWorkbench();
- setLabelProvider(new DecoratingLabelProvider(_provider, wb.getDecoratorManager().getLabelDecorator()));
-
- //setLabelProvider(_provider);
-
- _menuManager = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- _menuManager.setRemoveAllWhenShown(true);
- _menuManager.addMenuListener(this);
- Menu menu = _menuManager.createContextMenu(tableTree);
- tableTree.setMenu(menu);
-
- addSelectionChangedListener(this);
-
- RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this);
-
- initDragAndDrop();
-
- tableTree.setVisible(false);
- // key listening for delete press
- getControl().addKeyListener(new KeyAdapter()
- {
- public void keyPressed(KeyEvent e)
- {
- handleKeyPressed(e);
- }
- });
- getControl().addMouseListener(new MouseAdapter()
- {
- public void mouseDown(MouseEvent e)
- {
- mouseButtonPressed = e.button; //d40615
- }
- });
- }
-
- public Layout getLayout()
- {
- return _layout;
- }
-
- public void setWorkbenchPart(IWorkbenchPart part)
- {
- _workbenchPart = part;
- }
-
-
- /**
- * Return the popup menu for the table
- */
- public Menu getContextMenu()
- {
- return getTree().getMenu();
- }
- /**
- * Return the popup menu for the table
- */
- public MenuManager getContextMenuManager()
- {
- return _menuManager;
- }
-
- /**
- * Called whenever the input for the view changes
- */
- public void inputChanged(Object newObject, Object oldObject)
- {
- if (newObject instanceof IAdaptable)
- {
- getTree().setVisible(true);
- _objectInput = newObject;
-
- SystemScratchpadViewProvider provider = (SystemScratchpadViewProvider) getContentProvider();
- Object[] children = provider.getChildren(_objectInput);
-
- super.inputChanged(newObject, oldObject);
- }
- else if (newObject == null)
- {
- getTree().setVisible(false);
- _objectInput = null;
- }
- }
-
- public Object getInput()
- {
- return _objectInput;
- }
-
- /**
- * Convenience method for retrieving the view adapter for an object
- */
- protected ISystemViewElementAdapter getAdapter(Object obj)
- {
- return SystemAdapterHelpers.getAdapter(obj, this);
- }
-
-
-
-
- protected void initDragAndDrop()
- {
- int ops = DND.DROP_COPY | DND.DROP_MOVE;
- Transfer[] transfers = new Transfer[] { PluginTransfer.getInstance(), TextTransfer.getInstance(), EditorInputTransfer.getInstance(), FileTransfer.getInstance()};
-
- addDragSupport(ops, transfers, new SystemViewDataDragAdapter(this));
- addDropSupport(ops | DND.DROP_DEFAULT, transfers, new SystemViewDataDropAdapter(this));
- }
-
- /**
- * Used to asynchronously update the view whenever properties change.
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- Object parent = event.getParent();
- Object child = event.getSource();
- int eventType = event.getType();
- switch (eventType)
- {
- case ISystemResourceChangeEvents.EVENT_RENAME_FILTER_REFERENCE:
- case ISystemResourceChangeEvents.EVENT_CHANGE_FILTER_REFERENCE:
- case ISystemResourceChangeEvents.EVENT_CHANGE_FILTERSTRING_REFERENCE:
- {
- if (child instanceof ISystemFilter)
- {
- IRSEBaseReferencingObject[] references = ((ISystemFilter)child).getReferencingObjects();
- for (int i = 0; i < references.length; i++)
- {
- IRSEBaseReferencingObject ref = references[i];
- Widget w = findItem(ref);
- if (w != null)
- {
- internalRefresh(ref);
- }
- }
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE :
- case ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE :
- case ISystemResourceChangeEvents.EVENT_ICON_CHANGE:
- {
- Widget w = findItem(child);
-
- if (w != null)
- {
- updateItem(w, child);
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_ADD :
- case ISystemResourceChangeEvents.EVENT_ADD_RELATIVE :
- {
- boolean addingConnection = (child instanceof IHost);
- if (_objectInput instanceof ISystemRegistry && addingConnection)
- {
- SystemScratchpadViewProvider provider = (SystemScratchpadViewProvider) getContentProvider();
-
- if (provider != null)
- {
-
- internalRefresh(_objectInput);
- }
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_REFRESH:
- {
- internalRefresh(parent);
- }
- break;
- case ISystemResourceChangeEvents.EVENT_REFRESH_SELECTED:
- {
- IStructuredSelection sel = (IStructuredSelection)getSelection();
- Iterator iter = sel.iterator();
- while (iter.hasNext())
- {
- Object obj = iter.next();
- internalRefresh(obj);
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_RENAME:
- {
- Widget w = findItem(child);
- if (w != null)
- {
- updateItem(w, child);
- }
- }
- break;
- case ISystemResourceChangeEvents.EVENT_DELETE:
- case ISystemResourceChangeEvents.EVENT_DELETE_MANY:
- {
- if (child instanceof ISystemFilterReference)
- {
- Widget w = findItem(child);
- if (w != null)
- {
- remove(child);
- RSEUIPlugin.getTheSystemRegistry().getSystemScratchPad().removeChild(child);
- }
- }
- }
- break;
-
- default :
- break;
-
- }
-
- if (child == _objectInput || parent == _objectInput)
- {
- SystemScratchpadViewProvider provider = (SystemScratchpadViewProvider) getContentProvider();
-
- if (provider != null)
- {
-
-
- try
- {
- internalRefresh(_objectInput);
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(e.getMessage());
- }
- }
- }
- }
-
- /**
- * This is the method in your class that will be called when a remote resource
- * changes. You will be called after the resource is changed.
- * @see org.eclipse.rse.model.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- int eventType = event.getEventType();
- Object remoteResourceParent = event.getResourceParent();
- Object remoteResource = event.getResource();
- //boolean originatedHere = (event.getOriginatingViewer() == this);
- Vector remoteResourceNames = null;
- if (remoteResource instanceof Vector)
- {
- remoteResourceNames = (Vector) remoteResource;
- remoteResource = remoteResourceNames.elementAt(0);
- }
- String remoteResourceParentName = getRemoteResourceAbsoluteName(remoteResourceParent);
- String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource);
- if (remoteResourceName == null)
- return;
- SystemScratchpadViewProvider provider = (SystemScratchpadViewProvider) getContentProvider();
-
- switch (eventType)
- {
- // --------------------------
- // REMOTE RESOURCE CHANGED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CHANGED :
- {
- if (remoteResourceParent == getInput())
- {
- Widget w = findItem(remoteResource);
- if (w != null)
- {
- updateItem(w, remoteResource);
- }
-
- }
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE CREATED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED :
- {
- internalRefresh(remoteResourceParent);
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED :
- {
- if (remoteResourceParent != null)
- {
- internalRefresh(remoteResourceParent);
- }
- else
- {
- remove(remoteResource);
-
- }
- /*
- {
- Object dchild = remoteResource;
-
-
- ISystemViewElementAdapter dadapt = getAdapter(dchild);
- if (dadapt != null)
- {
- SubSystem dSubSystem = dadapt.getSubSystem(dchild);
- String dkey = dadapt.getAbsoluteName(dchild);
-
- if (provider != null)
- {
- Object[] children = provider.getChildren(_objectInput);
- for (int i = 0; i < children.length; i++)
- {
- Object existingChild = children[i];
- if (existingChild != null)
- {
- ISystemViewElementAdapter eadapt = getAdapter(existingChild);
- SubSystem eSubSystem = eadapt.getSubSystem(existingChild);
-
- if (dSubSystem == eSubSystem)
- {
- String ekey = eadapt.getAbsoluteName(existingChild);
- if (ekey.equals(dkey))
- {
- // do a full refresh
- refresh();
- }
- }
-
- }
- }
- }
- }
- }
- */
-
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE RENAMED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
- {
- String oldName = event.getOldName();
- Object child = event.getResource();
-
- if (provider != null)
- {
- Widget widget = findItem(child);
- if (widget != null)
- {
- widget.setData(child);
- updateItem(widget, child);
- return;
- }
- }
- }
-
- break;
- }
- }
-
- /**
- * Turn a given remote object reference into a fully qualified absolute name
- */
- private String getRemoteResourceAbsoluteName(Object remoteResource)
- {
- if (remoteResource == null)
- return null;
- String remoteResourceName = null;
- if (remoteResource instanceof String)
- remoteResourceName = (String) remoteResource;
- else
- {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
- if (ra == null)
- return null;
- remoteResourceName = ra.getAbsoluteName(remoteResource);
- }
- return remoteResourceName;
- }
-
- /**
- * Display a message/status on the message/status line
- */
- public void displayMessage(String msg)
- {
- if (_messageLine != null)
- _messageLine.setMessage(msg);
- }
- /**
- * Clear message/status shown on the message/status line
- */
- public void clearMessage()
- {
- if (_messageLine != null)
- _messageLine.clearMessage();
- }
-
- public void selectionChanged(SelectionChangedEvent event)
- {
-
- IStructuredSelection sel = (IStructuredSelection)event.getSelection();
- Object firstSelection = sel.getFirstElement();
- if (firstSelection == null)
- return;
-
- _selectionFlagsUpdated = false;
- ISystemViewElementAdapter adapter = getAdapter(firstSelection);
- if (adapter != null)
- {
- displayMessage(adapter.getStatusLineText(firstSelection));
- if ((mouseButtonPressed == LEFT_BUTTON))
- adapter.selectionChanged(firstSelection);
- }
- else
- clearMessage();
- }
-
- public void dispose()
- {
- removeAsListener();
-
- Composite tree = getTree();
-
- boolean isDisposed = tree.isDisposed();
-
- // dispose control if not disposed
- if (!isDisposed) {
- tree.dispose();
- }
- }
-
- /**
- * Remove as listener.
- */
- public void removeAsListener() {
-
- // remove listeners
- removeSelectionChangedListener(this);
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this);
-
- //Composite tree = getTree();
- //boolean isDisposed = tree.isDisposed();
- }
-
- /*
- * Everything below is basically stuff copied and pasted from SystemsView
- * -There needs to be cleaning up of the below code as some of this stuff
- * is broken for the table view
- *
- *
- public void createStandardGroups(IMenuManager menu)
- {
- if (!menu.isEmpty())
- return;
- // simply sets partitions in the menu, into which actions can be directed.
- // Each partition can be delimited by a separator (new Separator) or not (new GroupMarker).
- // Deleted groups are not used yet.
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_NEW));
- // new->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GOTO));
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_EXPANDTO));
- // expand to->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_EXPAND));
- // expand, collapse
- // goto into, go->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPENWITH));
- // open with->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_BROWSEWITH));
- // browse with ->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPEN));
- // open xxx
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_WORKWITH));
- // work with->
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_SHOW)); // show->type hierarchy, in-navigator
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_BUILD));
- // build, rebuild, refresh
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CHANGE));
- // update, change
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORGANIZE));
- // rename,move,copy,delete,bookmark,refactoring
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORDER));
- // move up, move down
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GENERATE));
- // getters/setters, etc. Typically in editor
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_SEARCH));
- // search
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CONNECTION));
- // connection-related actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_IMPORTEXPORT));
- // get or put actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADAPTERS));
- // actions queried from adapters
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS));
- // user or BP/ISV additions
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_VIEWER_SETUP)); // ? Probably View->by xxx, yyy
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_TEAM));
- // Team
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_COMPAREWITH));
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_REPLACEWITH));
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_PROPERTIES));
- // Properties
- }*/
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected PropertyDialogAction getPropertyDialogAction()
- {
- if (_propertyDialogAction == null)
- {
- _propertyDialogAction = new PropertyDialogAction(new SameShellProvider(getShell()), this);
- //propertyDialogAction.setToolTipText(" ");
- }
- _propertyDialogAction.selectionChanged(getSelection());
- return _propertyDialogAction;
- }
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected SystemRemotePropertiesAction getRemotePropertyDialogAction()
- {
- if (_remotePropertyDialogAction == null)
- {
- _remotePropertyDialogAction = new SystemRemotePropertiesAction(getShell());
- }
- _remotePropertyDialogAction.setSelection(getSelection());
- return _remotePropertyDialogAction;
- }
- /**
- * Return the select All action
- */
- protected IAction getSelectAllAction()
- {
- if (_selectAllAction == null)
- _selectAllAction = new SystemCommonSelectAllAction(getShell(), this, this);
- return _selectAllAction;
- }
-
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected IAction getRenameAction()
- {
- if (_renameAction == null)
- _renameAction = new SystemCommonRenameAction(getShell(), this);
- return _renameAction;
- }
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected IAction getDeleteAction()
- {
- if (_deleteAction == null)
- _deleteAction = new SystemCommonDeleteAction(getShell(), this);
- return _deleteAction;
- }
-
- protected IAction getClearSelectedAction()
- {
- if (_clearSelectedAction == null)
- _clearSelectedAction = new ClearSelectedAction(this);
- _clearSelectedAction.checkEnabledState();
- return _clearSelectedAction;
- }
-
- protected IAction getClearAllAction()
- {
- if (_clearAllAction == null)
- _clearAllAction = new ClearAction(this);
- _clearAllAction.checkEnabledState();
- return _clearAllAction;
- }
-
- /**
- * Return the refresh action
- */
- protected IAction getRefreshAction()
- {
- if (_refreshAction == null)
- _refreshAction = new SystemRefreshAction(getShell());
- return _refreshAction;
- }
- /*
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- *
- protected SystemCascadingOpenToAction getOpenToAction()
- {
- if (openToAction == null)
- openToAction = new SystemCascadingOpenToAction(getShell(),getWorkbenchWindow());
- return openToAction;
- } NOT USED YET */
- /**
- * Get the common "Open to->" action for opening a new Remote System Explorer view,
- * scoped to the currently selected object.
- */
- protected SystemOpenExplorerPerspectiveAction getOpenToPerspectiveAction()
- {
- if (_openToPerspectiveAction == null)
- {
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchWindow win = desktop.getActiveWorkbenchWindow();
-
- _openToPerspectiveAction = new SystemOpenExplorerPerspectiveAction(getShell(), win);
- }
- //getWorkbenchWindow());
- return _openToPerspectiveAction;
- }
-
- protected SystemShowInTableAction getShowInTableAction()
- {
- if (_showInTableAction == null)
- {
- _showInTableAction = new SystemShowInTableAction(getShell());
- }
- //getWorkbenchWindow());
- return _showInTableAction;
- }
-
- public Shell getShell()
- {
- return getTree().getShell();
- }
-
- /**
- * Required method from ISystemDeleteTarget.
- * Decides whether to even show the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showDelete()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionShowDeleteAction;
- }
- /**
- * Required method from ISystemDeleteTarget
- * Decides whether to enable the delete menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canDelete()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionEnableDeleteAction;
- }
-
- /*
- * Required method from ISystemDeleteTarget
- */
- public boolean doDelete(IProgressMonitor monitor)
- {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- //int selectedCount = selection.size();
- //Object multiSource[] = new Object[selectedCount];
- //int idx = 0;
- Object element = null;
- //Object parentElement = getSelectedParent();
- ISystemViewElementAdapter adapter = null;
- boolean ok = true;
- boolean anyOk = false;
- Vector deletedVector = new Vector();
- try
- {
- while (ok && elements.hasNext())
- {
- element = elements.next();
- //multiSource[idx++] = element;
- adapter = getAdapter(element);
- ok = adapter.doDelete(getShell(), element, monitor);
- if (ok)
- {
- anyOk = true;
- deletedVector.addElement(element);
- }
- }
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- }
- catch (Exception exc)
- {
- String msg = exc.getMessage();
- if ((msg == null) || (exc instanceof ClassCastException))
- msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg));
- ok = false;
- }
- if (anyOk)
- {
- Object[] deleted = new Object[deletedVector.size()];
- for (int idx = 0; idx < deleted.length; idx++)
- deleted[idx] = deletedVector.elementAt(idx);
- if (_selectionIsRemoteObject)
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, deletedVector, null, null, null, this);
- else
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(deleted, ISystemResourceChangeEvents.EVENT_DELETE_MANY, getInput()));
- }
- return ok;
- }
-
- // ---------------------------
- // ISYSTEMRENAMETARGET METHODS
- // ---------------------------
-
- /**
- * Required method from ISystemRenameTarget.
- * Decides whether to even show the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean showRename()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionShowRenameAction;
- }
- /**
- * Required method from ISystemRenameTarget
- * Decides whether to enable the rename menu item.
- * Assumes scanSelections() has already been called
- */
- public boolean canRename()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- return _selectionEnableRenameAction;
- }
-
- // default implementation
- // in default table, parent is input
- protected Object getParentForContent(Object element)
- {
- return _objectInput;
- }
-
- /**
- * Required method from ISystemRenameTarget
- */
- public boolean doRename(String[] newNames)
- {
- SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- //int selectedCount = selection.size();
- Object element = null;
-
- ISystemViewElementAdapter adapter = null;
- ISystemRemoteElementAdapter remoteAdapter = null;
- String oldFullName = null;
- boolean ok = true;
- try
- {
- int nameIdx = 0;
- while (ok && elements.hasNext())
- {
- element = elements.next();
- adapter = getAdapter(element);
- Object parentElement = getParentForContent(element);
-
- remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter != null)
- oldFullName = remoteAdapter.getAbsoluteName(element);
- // pre-rename
- ok = adapter.doRename(getShell(), element, newNames[nameIdx++]);
- if (ok)
- {
- if (remoteAdapter != null) {
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), oldFullName, this);
- }
- else {
- sr.fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
- }
- }
- }
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayErrorMessage(getShell(), exc.getSystemMessage());
- ok = false;
- }
- catch (Exception exc)
- {
- //String msg = exc.getMessage();
- //if ((msg == null) || (exc instanceof ClassCastException))
- // msg = exc.getClass().getName();
- SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc),
- //msg),
- exc);
- ok = false;
- }
- return ok;
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- ISystemRemoteElementAdapter adapter = null;
- if (!(o instanceof IAdaptable))
- adapter = (ISystemRemoteElementAdapter) Platform.getAdapterManager().getAdapter(o, ISystemRemoteElementAdapter.class);
- else
- adapter = (ISystemRemoteElementAdapter) ((IAdaptable) o).getAdapter(ISystemRemoteElementAdapter.class);
- if ((adapter != null) && (adapter instanceof ISystemViewElementAdapter))
- ((ISystemViewElementAdapter) adapter).setViewer(this);
- return adapter;
- }
-
- /**
- * Return true if select all should be enabled for the given object.
- * For a tree view, you should return true if and only if the selected object has children.
- * You can use the passed in selection or ignore it and query your own selection.
- */
- public boolean enableSelectAll(IStructuredSelection selection)
- {
- return true;
- }
- /**
- * When this action is run via Edit->Select All or via Ctrl+A, perform the
- * select all action. For a tree view, this should select all the children
- * of the given selected object. You can use the passed in selected object
- * or ignore it and query the selected object yourself.
- */
- public void doSelectAll(IStructuredSelection selection)
- {
-
- Tree tree = getTree();
-
- Tree theTree = tree;
- theTree.setSelection(theTree.getItems());
- TreeItem[] items = theTree.getItems();
- Object[] objects = new Object[items.length];
- for (int idx = 0; idx < items.length; idx++)
- objects[idx] = items[idx].getData();
- fireSelectionChanged(new SelectionChangedEvent(this, new StructuredSelection(objects)));
-
-
- }
-
- public void menuAboutToShow(IMenuManager manager)
- {
- SystemView.createStandardGroups(manager);
- if (!menuListenerAdded)
- {
- if (manager instanceof MenuManager)
- {
- Menu m = ((MenuManager)manager).getMenu();
- if (m != null)
- {
- menuListenerAdded = true;
- SystemViewMenuListener ml = new SystemViewMenuListener();
- if (_messageLine != null)
- ml.setShowToolTipText(true, _messageLine);
- m.addMenuListener(ml);
- }
- }
- }
- fillContextMenu(manager);
- }
-
- public ISelection getSelection()
- {
- ISelection selection = super.getSelection();
- if (selection == null || selection.isEmpty())
- {
- // make the selection the parent
- ArrayList list = new ArrayList();
- if (_objectInput != null)
- {
- list.add(_objectInput);
- selection = new StructuredSelection(list);
- }
- }
-
- return selection;
- }
-
- public void fillContextMenu(IMenuManager menu) {
-
- IStructuredSelection selection = (IStructuredSelection) getSelection();
-
- boolean allSelectionsFromSameParent = true;
- int selectionCount = selection.size();
-
-
-
- if (selectionCount == 0) // nothing selected
- {
- return;
- }
- else
- {
-
- if (selectionCount == 1) {
-
- if (selection.getFirstElement() == getInput()) {
- //return;
- }
- }
-
- if (selectionCount > 1)
- {
- allSelectionsFromSameParent = sameParent();
-
- if (!allSelectionsFromSameParent)
- {
- if (selectionHasAncestryRelationship())
- {
- // don't show the menu because actions with
- // multiple select on objects that are ancestors
- // of each other is problematic
- // still create the standard groups
- SystemView.createStandardGroups(menu);
- return;
- }
- }
- }
-
- // Partition into groups...
- SystemView.createStandardGroups(menu);
-
- // ADD COMMON ACTIONS...
- // COMMON REFRESH ACTION...
- if (showRefresh())
- {
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_BUILD, getRefreshAction());
- }
-
- // COMMON RENAME ACTION...
- if (canRename())
- {
- if (showRename())
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getRenameAction());
- }
-
- // ADAPTER SPECIFIC ACTIONS
- SystemMenuManager ourMenu = new SystemMenuManager(menu);
-
- Iterator elements = selection.iterator();
- Hashtable adapters = new Hashtable();
- while (elements.hasNext())
- {
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (adapter != null)
- {
- adapters.put(adapter, element); // want only unique adapters
- }
- }
- Enumeration uniqueAdapters = adapters.keys();
- Shell shell = getShell();
- while (uniqueAdapters.hasMoreElements())
- {
- ISystemViewElementAdapter nextAdapter = (ISystemViewElementAdapter) uniqueAdapters.nextElement();
- nextAdapter.addActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
-
- if (nextAdapter instanceof AbstractSystemViewAdapter)
- {
- AbstractSystemViewAdapter aVA = (AbstractSystemViewAdapter)nextAdapter;
- // add remote actions
- aVA.addCommonRemoteActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
-
- // add dynamic menu popups
- aVA.addDynamicPopupMenuActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADDITIONS);
- }
- }
-
-
-
-
- // wail through all actions, updating shell and selection
- IContributionItem[] items = menu.getItems();
- for (int idx = 0; idx < items.length; idx++)
- {
- if ((items[idx] instanceof ActionContributionItem) && (((ActionContributionItem) items[idx]).getAction() instanceof ISystemAction))
- {
- ISystemAction item = (ISystemAction) (((ActionContributionItem) items[idx]).getAction());
- item.setInputs(getShell(), this, selection);
- }
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager) items[idx];
- item.setInputs(getShell(), this, selection);
- }
- }
-
- // COMMON DELETE ACTION...
- if (canDelete() && showDelete())
- {
- //menu.add(getDeleteAction());
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_REORGANIZE, getDeleteAction());
- ((ISystemAction) getDeleteAction()).setInputs(getShell(), this, selection);
- menu.add(new Separator());
- }
-
- // REMOVE FROM VIEW ACTION...
-
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_ADDITIONS, getClearSelectedAction());
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_ADDITIONS, getClearAllAction());
-
- // PROPERTIES ACTION...
- // This is supplied by the system, so we pretty much get it for free. It finds the
- // registered propertyPages extension points registered for the selected object's class type.
- //propertyDialogAction.selectionChanged(selection);
-
- if (!_selectionIsRemoteObject) // is not a remote object
- {
- PropertyDialogAction pdAction = getPropertyDialogAction();
- if (pdAction.isApplicableForSelection())
- {
-
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- }
- // OPEN IN NEW PERSPECTIVE ACTION... if (fromSystemViewPart && showOpenViewActions())
- {
- //SystemCascadingOpenToAction openToAction = getOpenToAction();
- SystemOpenExplorerPerspectiveAction openToPerspectiveAction = getOpenToPerspectiveAction();
- SystemShowInTableAction showInTableAction = getShowInTableAction();
- openToPerspectiveAction.setSelection(selection);
- showInTableAction.setSelection(selection);
- //menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, openToAction.getSubMenu());
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, openToPerspectiveAction);
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, showInTableAction);
-
- }
- }
- else // is a remote object
- {
- //Object firstSelection = selection.getFirstElement();
- //ISystemRemoteElementAdapter remoteAdapter = getRemoteAdapter(firstSelection);
- //logMyDebugMessage(this.getClass().getName(), ": there is a remote adapter");
- SystemRemotePropertiesAction pdAction = getRemotePropertyDialogAction();
- if (pdAction.isApplicableForSelection())
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- //else
- //logMyDebugMessage(this.getClass().getName(), ": but it is not applicable for selection");
- // --------------------------------------------------------------------------------------------------------------------
- // look for and add any popup menu actions registered via our org.eclipse.rse.core.popupMenus extension point...
- // --------------------------------------------------------------------------------------------------------------------
- if (_workbenchPart != null)
- {
- SystemPopupMenuActionContributorManager.getManager().contributeObjectActions(_workbenchPart, ourMenu, this, null);
- }
- }
-
- }
- }
-
-
- /**
- * Decides whether to even show the refresh menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showRefresh()
- {
- return _selectionShowRefreshAction;
- }
-
- /**
- * This is called to ensure all elements in a multiple-selection have the same parent in the
- * tree viewer. If they don't we automatically disable all actions.
- * <p>
- * Designed to be as fast as possible by going directly to the SWT widgets
- */
- public boolean sameParent()
- {
- boolean same = true;
-
- Tree tree = getTree();
-
- TreeItem[] items = tree.getSelection();
-
- if ((items == null) || (items.length ==0)) {
- return true;
- }
-
- TreeItem prevParent = null;
- TreeItem currParent = null;
-
- for (int idx = 0; idx < items.length; idx++)
- {
- currParent = items[idx].getParentItem();
-
- if ((idx>0) && (currParent != prevParent)) {
- same = false;
- break;
- }
- else
- {
- prevParent = currParent;
- }
- }
- return same;
- }
-
- private boolean selectionHasAncestryRelationship() {
- Tree tree = getTree();
-
- TreeItem[] items = tree.getSelection();
-
- for (int idx=0; idx<items.length; idx++)
- {
- TreeItem item = items[idx];
-
- for (int c=0; c < items.length; c++)
- {
- if (item != items[c])
- {
- if (isAncestorOf(item, items[c], false))
- {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- /**
- * Returns whether an item is an ancestor of another item. The ancestor can be direct or indirect.
- * @param container the item which might be an ancestor.
- * @param item the child.
- * @param direct <code>true</code> if the container must be a direct ancestor of the child item,
- * <code>false</code> otherwise.
- * @return <code>true</code> if there is an ancestry relationship, <code>false</code> otherwise.
- */
- private boolean isAncestorOf(TreeItem container, TreeItem item, boolean direct)
- {
- TreeItem[] children = null;
-
- // does not have to be a direct ancestor
- if (!direct) {
- // get the children of the container's parent, i.e. the container's siblings
- // as well as itself
- TreeItem parent = container.getParentItem();
-
- // check if parent is null
- // parent is null if the container is a root item
- if (parent != null) {
- children = parent.getItems();
- }
- else {
- children = getTree().getItems();
- }
- }
- // must be a direct ancestor
- else {
- // get the children of the container
- children = container.getItems();
- }
-
- // go through all the children
- for (int i = 0; i < children.length; i++) {
-
- TreeItem child = children[i];
-
- // if one of the children matches the child item, return true
- if (child == item && direct) {
- return true;
- }
- // otherwise, go through children, and see if any of those are ancestors of
- // the child item
- else if (child.getItemCount() > 0) {
-
- // we check for direct ancestry
- if (isAncestorOf(child, item, true)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * --------------------------------------------------------------------------------
- * For many actions we have to walk the selection list and examine each selected
- * object to decide if a given common action is supported or not.
- * <p>
- * Walking this list multiple times while building the popup menu is a performance
- * hit, so we have this common method that does it only once, setting instance
- * variables for all of the decisions we are in interested in.
- * --------------------------------------------------------------------------------
- */
- protected void scanSelections()
- {
- // initial these variables to true. Then if set to false even once, leave as false always...
- _selectionShowRefreshAction = true;
- _selectionShowOpenViewActions = true;
- _selectionShowDeleteAction = true;
- _selectionShowRenameAction = true;
- _selectionEnableDeleteAction = true;
- _selectionEnableRenameAction = true;
- _selectionIsRemoteObject = true;
- _selectionFlagsUpdated = true;
-
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- while (elements.hasNext())
- {
- Object element = elements.next();
- ISystemViewElementAdapter adapter = getAdapter(element);
- if (adapter != null)
- {
- if (_selectionShowRefreshAction)
- _selectionShowRefreshAction = adapter.showRefresh(element);
-
- if (_selectionShowOpenViewActions)
- _selectionShowOpenViewActions = adapter.showOpenViewActions(element);
-
- if (_selectionShowDeleteAction)
- _selectionShowDeleteAction = adapter.showDelete(element);
-
- if (_selectionShowRenameAction)
- _selectionShowRenameAction = adapter.showRename(element);
-
- if (_selectionEnableDeleteAction)
- _selectionEnableDeleteAction = _selectionShowDeleteAction && adapter.canDelete(element);
- //System.out.println("ENABLE DELETE SET TO " + selectionEnableDeleteAction);
-
- if (_selectionEnableRenameAction)
- _selectionEnableRenameAction = _selectionShowRenameAction && adapter.canRename(element);
-
- if (_selectionIsRemoteObject)
- _selectionIsRemoteObject = (getRemoteAdapter(element) != null);
- }
- }
-
- }
-
-
- void handleKeyPressed(KeyEvent event)
- {
- //System.out.println("Key Pressed");
- //System.out.println("...event character : " + event.character + ", "+(int)event.character);
- //System.out.println("...event state mask: " + event.stateMask);
- //System.out.println("...CTRL : " + SWT.CTRL);
- if ((event.character == SWT.DEL) && (event.stateMask == 0) && (((IStructuredSelection) getSelection()).size() > 0))
- {
- scanSelections();
- if (showDelete() && canDelete())
- {
- SystemCommonDeleteAction dltAction = (SystemCommonDeleteAction) getDeleteAction();
- dltAction.setShell(getShell());
- dltAction.setSelection(getSelection());
- dltAction.setViewer(this);
- dltAction.run();
- }
- }
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 9b3863d8b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewPart.java
+++ /dev/null
@@ -1,391 +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.view.scratchpad;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-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.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.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.SystemCommonRenameAction;
-import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.IRSEViewPart;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.part.CellEditorActionHandler;
-import org.eclipse.ui.part.ViewPart;
-
-
-/**
- * This class is the Remote Scratchpad view.
- */
-public class SystemScratchpadViewPart extends ViewPart implements ISelectionListener, ISelectionChangedListener,
- ISystemResourceChangeListener, ISystemMessageLine, IRSEViewPart
-{
-
-
- private SystemScratchpadView _viewer;
-
- // common actions
- private SystemCopyToClipboardAction _copyAction;
- private SystemPasteFromClipboardAction _pasteAction;
- private SystemCommonDeleteAction _deleteAction;
- private SystemCommonRenameAction _renameAction;
- private ClearAction _clearAction;
- private ClearSelectedAction _clearSelectionAction;
-
- // for ISystemMessageLine
- private String _message, _errorMessage;
- private SystemMessage sysErrorMessage;
- private IStatusLineManager _statusLine = null;
-
- // constants
- public static final String ID = "org.eclipse.rse.ui.view.scratchpad.SystemScratchpadViewPart"; // matches id in plugin.xml, view tag //$NON-NLS-1$
-
- public void setFocus()
- {
- _viewer.getControl().setFocus();
- }
-
- public SystemScratchpadView getViewer()
- {
- return _viewer;
- }
-
- public Viewer getRSEViewer()
- {
- return _viewer;
- }
-
- public void createPartControl(Composite parent)
- {
- Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
-
- _viewer = new SystemScratchpadView(tree, this);
- _viewer.setWorkbenchPart(this);
-
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.addSelectionListener(this);
- _viewer.addSelectionChangedListener(this);
- getSite().setSelectionProvider(_viewer);
-
- _viewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
- {
- handleDoubleClick(event);
- }
- });
-
- fillLocalToolBar();
-
- // register global edit actions
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- Clipboard clipboard = registry.getSystemClipboard();
-
- CellEditorActionHandler editorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars());
-
- _copyAction = new SystemCopyToClipboardAction(_viewer.getShell(), clipboard);
- _pasteAction = new SystemPasteFromClipboardAction(_viewer.getShell(), clipboard);
- _deleteAction = new SystemCommonDeleteAction(_viewer.getShell(), _viewer);
- _renameAction = new SystemCommonRenameAction(_viewer.getShell(), _viewer);
-
- // register rename action as a global handler
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.RENAME.getId(), _renameAction);
-
- editorActionHandler.setCopyAction(_copyAction);
- editorActionHandler.setPasteAction(_pasteAction);
- editorActionHandler.setDeleteAction(_deleteAction);
- //editorActionHandler.setSelectAllAction(new SelectAllAction());
-
- registry.addSystemResourceChangeListener(this);
-
- SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "scrp0000"); //$NON-NLS-1$
-
- setInput(registry.getSystemScratchPad());
-
- getSite().registerContextMenu(_viewer.getContextMenuManager(), _viewer);
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection sel)
- {
- }
-
- public void dispose()
- {
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.removeSelectionListener(this);
- _viewer.removeSelectionChangedListener(this);
-
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
-
- if (_viewer != null)
- {
- _viewer.dispose();
- }
-
- super.dispose();
- }
-
- private void handleDoubleClick(DoubleClickEvent event)
- {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
-
- if (element == null)
- return;
-
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);
-
- if (adapter != null)
- {
- if (adapter.hasChildren(element))
- {
- setInput((IAdaptable) element);
- }
- else
- {
- adapter.handleDoubleClick(element);
- }
- }
- }
-
- public void updateActionStates()
- {
- if (_clearAction == null)
- fillLocalToolBar();
-
- _clearAction.checkEnabledState();
- _clearSelectionAction.checkEnabledState();
- }
-
- public void fillLocalToolBar()
- {
- //if (_refreshAction == null)
- if (_clearAction == null)
- {
- // refresh action
- //_refreshAction = new RefreshAction();
- _clearAction = new ClearAction(_viewer);
- _clearSelectionAction = new ClearSelectedAction(_viewer);
-
- }
-
- updateActionStates();
-
- IActionBars actionBars = getViewSite().getActionBars();
- IToolBarManager toolBarManager = actionBars.getToolBarManager();
- IMenuManager menuMgr = actionBars.getMenuManager();
-
- SystemRefreshAction refreshAction = new SystemRefreshAction(getShell());
- actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
- _statusLine = actionBars.getStatusLineManager();
-
- addToolBarItems(toolBarManager);
- addToolBarMenuItems(menuMgr);
- }
-
- private void addToolBarMenuItems(IMenuManager menuManager)
- {
- menuManager.removeAll();
- menuManager.add(_clearSelectionAction);
- menuManager.add(new Separator());
- menuManager.add(_clearAction);
- }
-
- private void addToolBarItems(IToolBarManager toolBarManager)
- {
- toolBarManager.removeAll();
- toolBarManager.add(_clearSelectionAction);
- toolBarManager.add(new Separator());
- toolBarManager.add(_clearAction);
- }
-
- public void selectionChanged(SelectionChangedEvent e)
- {
- // listener for this view
- updateActionStates();
-
- IStructuredSelection sel = (IStructuredSelection) e.getSelection();
- _copyAction.setEnabled(_copyAction.updateSelection(sel));
- _pasteAction.setEnabled(_pasteAction.updateSelection(sel));
- _deleteAction.setEnabled(_deleteAction.updateSelection(sel));
- }
-
- public void setInput(IAdaptable object)
- {
- setInput(object, null);
-
- }
-
- public void setInput(IAdaptable object, String[] filters)
- {
- if (_viewer != null && object != null)
- {
- _viewer.setInput(object);
-
- updateActionStates();
-
- }
- }
-
- /**
- * Used to asynchronously update the view whenever properties change.
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- Object parent = event.getParent();
-
- if (event.getType() == ISystemResourceChangeEvents.EVENT_RENAME)
- {
- }
-
- if (parent == _viewer.getInput())
- {
- updateActionStates();
- }
- }
-
- public Shell getShell()
- {
- return _viewer.getShell();
- }
-
-
-// -------------------------------
- // ISystemMessageLine interface...
- // -------------------------------
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- _errorMessage = null;
- sysErrorMessage = null;
- if (_statusLine != null)
- _statusLine.setErrorMessage(_errorMessage);
- }
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- _message = null;
- if (_statusLine != null)
- _statusLine.setMessage(_message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage()
- {
- return _errorMessage;
- }
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage()
- {
- return _message;
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- this._errorMessage = message;
- if (_statusLine != null)
- _statusLine.setErrorMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- return sysErrorMessage;
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- sysErrorMessage = message;
- setErrorMessage(message.getLevelOneText());
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(Throwable exc)
- {
- setErrorMessage(exc.getMessage());
- }
-
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- this._message = message;
- if (_statusLine != null)
- _statusLine.setMessage(message);
- }
- /**
- *If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- setMessage(message.getLevelOneText());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewProvider.java
deleted file mode 100644
index 3c29cc9d3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewProvider.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.view.scratchpad;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-
-/**
- * This is the content and label provider for the SystemScratchpadView.
- * This class is used both to populate the SystemScratchpadView but also
- * to resolve the icon and labels for the cells in the table/tree.
- *
- */
-public class SystemScratchpadViewProvider implements ILabelProvider, ITreeContentProvider
-{
-
-
- private ListenerList listeners = new ListenerList(1);
-
-
- /**
- * The cache of images that have been dispensed by this provider.
- * Maps ImageDescriptor->Image.
- */
- private Map imageTable = new Hashtable(40);
- private SystemScratchpadView _view;
-
- public SystemScratchpadViewProvider(SystemScratchpadView view)
- {
- super();
- _view = view;
- }
-
- public void inputChanged(Viewer visualPart, Object oldInput, Object newInput)
- {
- }
-
-
-
- public boolean isDeleted(Object element)
- {
- return false;
- }
-
- public Object[] getChildren(Object object)
- {
- return getElements(object);
- }
-
- public Object getParent(Object object)
- {
- return getAdapterFor(object).getParent(object);
- }
-
- public boolean hasChildren(Object object)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- return adapter.hasChildren(object);
- }
- else if (object instanceof IAdaptable)
- {
- IWorkbenchAdapter wa = (IWorkbenchAdapter)((IAdaptable)object).getAdapter(IWorkbenchAdapter.class);
- if (wa != null)
- return wa.getChildren(object).length > 0;
- }
- return false;
- }
-
- public Object getElementAt(Object object, int i)
- {
-
- return null;
- }
-
- protected ISystemViewElementAdapter getAdapterFor(Object object)
- {
- if (object instanceof IAdaptable)
- {
- IAdaptable adapt = (IAdaptable) object;
- ISystemViewElementAdapter result = (ISystemViewElementAdapter) adapt.getAdapter(ISystemViewElementAdapter.class);
- if (result != null)
- {
- result.setPropertySourceInput(object);
- result.setViewer(_view);
- return result;
- }
- }
- return null;
- }
-
- public Object[] getElements(Object object)
- {
- Object[] results = null;
-
- if (object instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null && adapter.hasChildren(object))
- {
- results = adapter.getChildren(object);
- }
- else
- {
- IWorkbenchAdapter wa = (IWorkbenchAdapter)((IAdaptable)object).getAdapter(IWorkbenchAdapter.class);
- if (wa != null)
- return wa.getChildren(object);
- }
- }
- if (results == null)
- {
- return new Object[0];
- }
-
- return results;
- }
-
- public String getText(Object object)
- {
- if (object instanceof String)
- {
- return (String)object;
- }
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- return adapter.getText(object);
- }
- else if (object instanceof IAdaptable)
- {
- IWorkbenchAdapter wa = (IWorkbenchAdapter)((IAdaptable)object).getAdapter(IWorkbenchAdapter.class);
- if (wa != null)
- {
- return wa.getLabel(object);
- }
- }
- return object.toString();
- }
-
- public Image getImage(Object object)
- {
- Image image = null;
- if (object instanceof String)
- {
- return null;
- }
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- ImageDescriptor descriptor = adapter.getImageDescriptor(object);
-
-
- if (descriptor != null)
- {
- Object iobj = imageTable.get(descriptor);
- if (iobj == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- else
- {
- image = (Image) iobj;
- }
- }
- return image;
- }
- else if (object instanceof IAdaptable)
- {
- IWorkbenchAdapter wa = (IWorkbenchAdapter)((IAdaptable)object).getAdapter(IWorkbenchAdapter.class);
- if (wa != null)
- {
- ImageDescriptor descriptor = wa.getImageDescriptor(object);
- if (descriptor != null)
- {
- Object iobj = imageTable.get(descriptor);
- if (iobj == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- else
- {
- image = (Image) iobj;
- }
- }
- return image;
- }
- }
- return null;
- }
-
-
- public void addListener(ILabelProviderListener listener)
- {
- listeners.add(listener);
- }
-
- public boolean isLabelProperty(Object element, String property)
- {
- return true;
- }
-
- public void removeListener(ILabelProviderListener listener)
- {
- listeners.remove(listener);
- }
-
- public void dispose()
- {
- // TODO Auto-generated method stub
-
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 8e57c9415..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchClearHistoryAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.search;
-
-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;
-
-
-/**
- * This action clears the history in the Remote Search view.
- */
-public class SystemSearchClearHistoryAction extends SystemBaseAction {
-
- private SystemSearchViewPart searchView;
-
- /**
- * Constructor for action.
- * @param searchView the remote search view.
- * @param shell the shell.
- */
- public SystemSearchClearHistoryAction(SystemSearchViewPart searchView, Shell shell) {
- super(SystemResources.RESID_SEARCH_CLEAR_HISTORY_LABEL,SystemResources.RESID_SEARCH_CLEAR_HISTORY_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SEARCH_CLEAR_HISTORY_ID), shell);
-
- this.searchView = searchView;
- RSEUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, RSEUIPlugin.HELPPREFIX + "search_clear_history"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- searchView.deleteAllPages();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchCopyToClipboardAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchCopyToClipboardAction.java
deleted file mode 100644
index 3c1c99cb3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchCopyToClipboardAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.search;
-
-import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Action that copies objects selected in Remote Search view to clipboard.
- */
-public class SystemSearchCopyToClipboardAction extends SystemCopyToClipboardAction {
-
- /**
- * Constructor.
- * @param shell the shell.
- * @param clipboard the system clipboard.
- */
- public SystemSearchCopyToClipboardAction(Shell shell, Clipboard clipboard) {
- super(shell, clipboard);
- }
-
- /**
- * Returns the string "\t" if the object is a remote search result, otherwise returns the super class
- * implementation.
- * @see org.eclipse.rse.ui.actions.SystemCopyToClipboardAction#getTextTransferPrepend(java.lang.Object, org.eclipse.rse.ui.view.ISystemViewElementAdapter)
- */
- protected String getTextTransferPrepend(Object obj, ISystemViewElementAdapter adapter) {
- /** shouldn't be coupled with search (files ui)
- if (adapter instanceof SystemViewRemoteSearchResultAdapter)
- {
- return "\t";
- }
- else
- **/
- {
- return super.getTextTransferPrepend(obj, adapter);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchHistoryAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchHistoryAction.java
deleted file mode 100644
index d5cb56c4c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchHistoryAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.view.search;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * This is the history action for the remote system search view.
- */
-public class SystemSearchHistoryAction extends Action {
-
-
-
- private SystemSearchViewPart searchView;
- private int index;
-
- /**
- * Constructor for SystemSearchHistoryAction.
- * @param text the text for the action.
- * @param image the image.
- * @param searchView the search view.
- * @param index the index in the history.
- */
- public SystemSearchHistoryAction(String text, ImageDescriptor image, SystemSearchViewPart searchView, int index) {
- super(text, image);
- setToolTipText(text);
- this.searchView = searchView;
- this.index = index;
- RSEUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, RSEUIPlugin.HELPPREFIX + "search_history"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- searchView.showSearchResult(index);
- }
-
- /**
- * Sets the text and the tooltip.
- * @see org.eclipse.jface.action.IAction#setText(java.lang.String)
- */
- public void setText(String text) {
- super.setText(text);
- setToolTipText(text);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 6ff05e1ff..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveAllMatchesAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.search;
-
-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;
-
-
-/**
- * This action removes all matches from the Remote Search view.
- */
-public class SystemSearchRemoveAllMatchesAction extends SystemBaseAction {
-
- private SystemSearchViewPart searchView;
-
- /**
- * Constructor for action.
- * @param searchView the remote search view.
- * @param shell the shell.
- */
- public SystemSearchRemoveAllMatchesAction(SystemSearchViewPart searchView, Shell shell) {
- super(SystemResources.RESID_SEARCH_REMOVE_ALL_MATCHES_LABEL,SystemResources.RESID_SEARCH_REMOVE_ALL_MATCHES_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SEARCH_REMOVE_ALL_MATCHES_ID),
- shell);
-
- this.searchView = searchView;
- RSEUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, RSEUIPlugin.HELPPREFIX + "search_remove_all"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- searchView.deleteCurrentPage();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index bf612a096..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.search;
-
-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;
-
-
-/**
- * This action removes selected matches from the Remote Search view.
- */
-public class SystemSearchRemoveSelectedMatchesAction extends SystemBaseAction {
-
- private SystemSearchViewPart searchView;
-
- /**
- * Constructor for action.
- * @param searchView the remote search view.
- * @param shell the shell.
- */
- public SystemSearchRemoveSelectedMatchesAction(SystemSearchViewPart searchView, Shell shell) {
- super(SystemResources.RESID_SEARCH_REMOVE_SELECTED_MATCHES_LABEL,SystemResources.RESID_SEARCH_REMOVE_SELECTED_MATCHES_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SEARCH_REMOVE_SELECTED_MATCHES_ID),
- shell);
-
- this.searchView = searchView;
- RSEUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, RSEUIPlugin.HELPPREFIX + "search_remove_selected"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- searchView.deleteSelected();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 8f545b043..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableView.java
+++ /dev/null
@@ -1,376 +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.view.search;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.ISystemRemoteChangeEvent;
-import org.eclipse.rse.model.ISystemRemoteChangeEvents;
-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;
-import org.eclipse.rse.ui.view.SystemTableTreeView;
-import org.eclipse.rse.ui.view.SystemTableTreeViewProvider;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.Widget;
-
-
-public class SystemSearchTableView extends SystemTableTreeView
-{
-
-
- private boolean _firstRefresh = true;
- private IHostSearchResultSet resultSet;
-
- public SystemSearchTableView(Tree tabletree, IHostSearchResultSet resultSet, ISystemMessageLine msgLine)
- {
- super(tabletree, msgLine);
- this.resultSet = resultSet;
-
- _provider.disableDeferredQueries(true);
- setLabelProvider(new SystemDecoratingLabelProvider(_provider, RSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator()));
- }
-
- public IHostSearchResultSet getResultSet() {
- return resultSet;
- }
-
-
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- int eventType = event.getEventType();
-
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider)getContentProvider();
-
- IHostSearchResultSet resultSet = null;
-
- if (getInput() instanceof IHostSearchResultSet) {
- resultSet = (IHostSearchResultSet)getInput();
- }
-
- if (resultSet == null) {
- return;
- }
-
- switch (eventType)
- {
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED :
- {
- {
- Object remoteResource = event.getResource();
- Vector remoteResourceNames = null;
-
- if (remoteResource instanceof Vector)
- {
- remoteResourceNames = (Vector) remoteResource;
- remoteResource = remoteResourceNames.elementAt(0);
- }
- else
- {
- remoteResourceNames = new Vector();
- remoteResourceNames.add(remoteResource);
- }
-
- for (int d = 0; d < remoteResourceNames.size(); d++)
- {
- Object dchild = remoteResourceNames.get(d);
-
- ISystemViewElementAdapter dadapt = getAdapter(dchild);
- ISubSystem dSubSystem = dadapt.getSubSystem(dchild);
- String dkey = dadapt.getAbsoluteName(dchild);
-
- // this will use cache if there is one already
- // note: do not call provider.getCache() since the
- // cache is changed if getChildren() is called with
- // an object other than the input (so if we expand
- // a tree node then the cache will be the children
- // of that node, and not the root nodes of the tree)
- Object[] children = provider.getChildren(resultSet);
-
- for (int i = 0; i < children.length; i++)
- {
- Object existingChild = children[i];
-
- if (existingChild != null)
- {
- ISystemViewElementAdapter eadapt = getAdapter(existingChild);
- ISubSystem eSubSystem = eadapt.getSubSystem(existingChild);
-
- if (dSubSystem == eSubSystem)
- {
- String ekey = eadapt.getAbsoluteName(existingChild);
-
- boolean matches = false;
-
- // to compare absolute paths, check whether the system
- // is case sensitive or not
- if (dSubSystem.getSubSystemConfiguration().isCaseSensitive()) {
- matches = ekey.equals(dkey);
- }
- else {
- matches = ekey.equalsIgnoreCase(dkey);
- }
-
- if (matches)
- {
- resultSet.removeResult(existingChild);
- provider.setCache(resultSet.getAllResults());
- remove(existingChild);
- }
- }
- }
- }
- }
- }
-
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE RENAMED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
- {
- Object resource = event.getResource();
- // String resourceOldPath = event.getOldName();
-
- /** FIXME - IREmoteFile is systems.core independent now
- // we only care about remote file renames
- if (resource instanceof IRemoteFile) {
-
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(resource);
- resourceSubSystem = adapter.getSubSystem(resource);
-
- if (resourceSubSystem == null) {
- return;
- }
- }
- else
- {
- return;
- }
- */
- if (true) // DKM - hack to avoid this
- return;
- if (provider != null)
- {
- // this will use cache if there is one already
- // note: do not call provider.getCache() since the
- // cache is changed if getChildren() is called with
- // an object other than the input (so if we expand
- // a tree node then the cache will be the children
- // of that node, and not the root nodes of the tree)
- Object[] children = provider.getChildren(resultSet);
-
- for (int i = 0; i < children.length; i++)
- {
- Object child = children[i];
-
- // found same object. This means:
- // a) rename happened in this view, or
- // b) we are using the same object to populate this view
- // and another view, and the rename happened in the
- // other view
- if (child == resource)
- {
- Widget widget = findItem(child);
-
- if (widget != null)
- {
- update(child, null);
- return;
- }
- }
-
- /** FIXME - IREmoteFile is systems.core independent now
- // did not find object
- // rename happened in another view and we are not populating
- // this view and the other view with the same object
- else if (child instanceof IRemoteFile)
- {
- ISystemRemoteElementAdapter adapt = getRemoteAdapter(child);
- ISubSystem childSubSystem = adapt.getSubSystem(child);
-
- // check if both are from the same subsystem
- if (childSubSystem == resourceSubSystem) {
-
- String childPath = adapt.getAbsoluteName(child);
-
- // find out if system is case sensitive
- boolean isCaseSensitive = resourceSubSystem.getParentSubSystemConfiguration().isCaseSensitive();
-
- boolean matches = false;
-
- // look for the child whose path matches the old path of the resource
- if (isCaseSensitive) {
- matches = childPath.equals(resourceOldPath);
- }
- else {
- matches = childPath.equalsIgnoreCase(resourceOldPath);
- }
-
- // if paths match, update the object and then update the view
- if (matches) {
-
-
-
- // now update label for child
- Widget widget = findItem(child);
-
- if (widget != null) {
- update(child, null);
- return;
- }
- }
- }
- }*/
-
- }
- }
- break;
- }
- default :
- super.systemRemoteResourceChanged(event);
- break;
- }
- }
-
- protected void doUpdateItem(Widget widget, Object element, boolean flag)
- {
- if (_firstRefresh)
- {
- computeLayout(true);
- _firstRefresh = false;
- }
-
- super.doUpdateItem(widget, element, flag);
- }
-
- public void systemResourceChanged(ISystemResourceChangeEvent event) {
- Object actualSource = event.getSource();
-
- switch (event.getType()) {
-
- case ISystemResourceChangeEvents.EVENT_REFRESH :
-
- if (actualSource == null) {
- return;
- }
-
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider)getContentProvider();
-
- if (provider == null) {
- return;
- }
-
- if (actualSource instanceof IHostSearchResultConfiguration) {
-
- IHostSearchResultConfiguration config = (IHostSearchResultConfiguration)actualSource;
- IHostSearchResultSet resultSet = config.getParentResultSet();
-
- if (resultSet == getInput()) {
- // this will use cache if there is one already
- // note: do not call provider.getCache() since the
- // cache is changed if getChildren() is called with
- // an object other than the input (so if we expand
- // a tree node then the cache will be the children
- // of that node, and not the root nodes of the tree)
- Object[] previousResults = provider.getCachedObjects(resultSet);
- Object[] newResults = resultSet.getAllResults();
-
- int newSize = newResults.length;
-
- // merge items so only one creation
- if ((previousResults == null || previousResults.length == 0) && newResults.length != 0) {
- provider.flushCache();
- refresh(getInput());
-
- }
- else if (previousResults != null) {
-
- int deltaSize = newSize - previousResults.length;
-
- if (deltaSize > 0) {
-
- Object[] delta = new Object[deltaSize];
- int d = 0;
-
- for (int i = 0; i < newSize; i++) {
- Object nobj = newResults[i];
-
- if (previousResults.length > i) {
- Object pobj = previousResults[i];
-
- if (pobj == null) {
- delta[d] = nobj;
- d++;
- }
- }
- else {
- delta[d] = nobj;
- d++;
- }
- }
-
- // must set the cache before calling add()
- provider.setCache(newResults);
-
- // set the cached objects
- provider.setCachedObjects(resultSet, newResults);
-
- if (delta.length > 2000) {
- internalRefresh(getInput());
- }
- else {
- add(getInput(), delta);
- }
- }
- }
- }
- }
-
- break;
-
- default :
- super.systemResourceChanged(event);
- break;
- }
- }
-
- protected Object getParentForContent(Object element)
- {
- return getAdapter(element).getParent(element);
- }
-
-
- /**
- * Does nothing.
- * @see org.eclipse.rse.ui.view.SystemTableTreeView#handleKeyPressed(org.eclipse.swt.events.KeyEvent)
- */
- protected void handleKeyPressed(KeyEvent event) {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableViewProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableViewProvider.java
deleted file mode 100644
index 992e7f459..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableViewProvider.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.search;
-
-import org.eclipse.rse.ui.view.SystemTableTreeViewProvider;
-import org.eclipse.rse.ui.view.SystemTableViewColumnManager;
-
-public class SystemSearchTableViewProvider extends SystemTableTreeViewProvider
-{
-
- public SystemSearchTableViewProvider(SystemTableViewColumnManager columnManager)
- {
- super(columnManager);
- }
-
- public String getText(Object object)
- {
- String text = getAdapterFor(object).getName(object);
- /** FIXME - IREmoteFile is systems.core independent now
- if (object instanceof IRemoteFile) {
- IRemoteFile parent = ((IRemoteFile)object).getParentRemoteFile();
- String absolutePath = getAdapterFor(parent).getAbsoluteName(parent);
- return text + " - " + absolutePath;
- }
- else {
- return text;
- }
- */
- return text;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchUI.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchUI.java
deleted file mode 100644
index 663da94ff..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchUI.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.view.search;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.ui.PartInitException;
-
-
-/**
- * A singleton class for dealing with Remote Search view
- */
-public class SystemSearchUI {
-
-
-
- // singleton instance
- private static SystemSearchUI instance;
-
- // search view id
- public static final String SEARCH_RESULT_VIEW_ID = "org.eclipse.rse.ui.view.SystemSearchView"; //$NON-NLS-1$
-
- /**
- * Constructor for SystemSearchUI.
- */
- private SystemSearchUI() {
- super();
- }
-
- /**
- * Get the singleton instance.
- * @return the singleton object of this type
- */
- public static SystemSearchUI getInstance() {
-
- if (instance == null) {
- instance = new SystemSearchUI();
- }
-
- return instance;
- }
-
- /**
- * Activate search result view.
- * @return <code>true</code> if successful, <code>false</false> otherwise
- */
- public SystemSearchViewPart activateSearchResultView() {
-
- SystemSearchViewPart searchView = null;
-
- try {
- searchView = (SystemSearchViewPart)(SystemBasePlugin.getActiveWorkbenchWindow().getActivePage().showView(SystemSearchUI.SEARCH_RESULT_VIEW_ID));
- }
- catch (PartInitException e) {
- SystemBasePlugin.logError("Can not open search result view", e); //$NON-NLS-1$
- }
-
- return searchView;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewContentProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewContentProvider.java
deleted file mode 100644
index a7d63c3fd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewContentProvider.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.view.search;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.part.ViewPart;
-
-
-/**
- * This class is the content provider for the remote systems search viewer.
- */
-public class SystemSearchViewContentProvider implements ITreeContentProvider {
-
-
- private ViewPart viewPart;
-
- /**
- * Constructor for SystemSearchViewContentProvider.
- */
- public SystemSearchViewContentProvider() {
- super();
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
-
- if (parentElement == null) {
- return null;
- }
-
- if (parentElement instanceof IAdaptable) {
- ISystemViewElementAdapter adapter = getAdapter(parentElement);
-
- if (adapter == null) {
- return null;
- }
- else {
- return adapter.getChildren(parentElement);
- }
- }
-
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(Object)
- */
- public Object getParent(Object element) {
-
- if (element == null) {
- return null;
- }
-
- if (element instanceof IAdaptable) {
- ISystemViewElementAdapter adapter = getAdapter(element);
-
- if (adapter == null) {
- return null;
- }
- else {
- return adapter.getParent(element);
- }
- }
-
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
-
- if (element == null) {
- return false;
- }
-
- if (element instanceof IAdaptable) {
- ISystemViewElementAdapter adapter = getAdapter(element);
-
- if (adapter == null) {
- return false;
- }
- else {
- return adapter.hasChildren(element);
- }
- }
-
- return false;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
-
- if (inputElement == null) {
- return null;
- }
-
- if (inputElement instanceof IAdaptable) {
- ISystemViewElementAdapter adapter = getAdapter(inputElement);
-
- if (adapter == null) {
- return null;
- }
- else {
- return adapter.getChildren(inputElement);
- }
- }
-
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
- if (newInput == null) {
- return;
- }
-
- if (newInput instanceof IAdaptable) {
- ISystemViewElementAdapter adapter = getAdapter(newInput);
-
- if (adapter != null) {
- viewer.refresh();
- }
- }
- }
-
- /**
- * Get the adapter for the given object.
- * @param the object
- * @return the adapter
- */
- public ISystemViewElementAdapter getAdapter(Object element)
- {
- return SystemAdapterHelpers.getAdapter(element);
- }
- /**
- * Set the ViewPart of this provider
- * @param ViewPart of this provider
- */
- public void setViewPart(ViewPart viewPart)
- {
- this.viewPart = viewPart;
- }
- /**
- * Get the ViewPart of this provider
- * @return ViewPart of this provider
- */
- public ViewPart getViewPart()
- {
- return viewPart;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewLabelProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewLabelProvider.java
deleted file mode 100644
index a8eee8db1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewLabelProvider.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.view.search;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * This is the label provider for the remote systems search view.
- */
-public class SystemSearchViewLabelProvider extends LabelProvider {
-
-
-
- /**
- * Constructor for SystemSearchViewLabelProvider.
- */
- public SystemSearchViewLabelProvider() {
- super();
- }
-
- /**
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(Object)
- */
- public Image getImage(Object element) {
-
- if (element == null) {
- return null;
- }
-
- if (element instanceof IAdaptable) {
- ISystemViewElementAdapter adapter = getAdapter(element);
-
- if (adapter != null) {
- ImageDescriptor descriptor = adapter.getImageDescriptor(element);
-
- if (descriptor != null) {
- return descriptor.createImage();
- }
- }
- }
-
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(Object)
- */
- public String getText(Object element) {
-
- if (element == null) {
- return null;
- }
-
- if (element instanceof IAdaptable) {
- ISystemViewElementAdapter adapter = getAdapter(element);
-
- if (adapter != null) {
- return adapter.getText(element);
- }
- }
-
- return null;
- }
-
- /**
- * Get the adapter for the given object.
- * @param the object
- * @return the adapter
- */
- public ISystemViewElementAdapter getAdapter(Object element)
- {
- return SystemAdapterHelpers.getAdapter(element);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index e9a2460bf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewPart.java
+++ /dev/null
@@ -1,1281 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.view.search;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredViewer;
-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.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.IRSEViewPart;
-import org.eclipse.rse.ui.view.ISystemRemoveElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemTableTreeViewProvider;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.CellEditorActionHandler;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.ui.part.ViewPart;
-
-
-
-/**
- * This class defines the Remote Search view.
- */
-public class SystemSearchViewPart extends ViewPart
- implements ISystemResourceChangeListener,
- IMenuListener, ISelectionChangedListener,
- ISystemMessageLine, IRSEViewPart
-{
- private PageBook pageBook;
- private StructuredViewer currentViewer;
-
- private IActionBars actionBars;
- private IMenuManager mMgr;
- private IToolBarManager tbMgr;
- //private IStatusLineManager slMgr;
-
- private static final String MENU_HISTORY_GROUP_NAME = "historyGroup"; //$NON-NLS-1$
- private static final String MENU_CLEAR_HISTORY_GROUP_NAME = "clearHistoryGroup"; //$NON-NLS-1$
-
- private ArrayList viewers = new ArrayList();
- private ArrayList historyActions = new ArrayList();
-
- private CancelAction cancelAction;
- private SystemSearchClearHistoryAction clearHistoryAction;
- private SystemSearchRemoveSelectedMatchesAction removeSelectedAction;
- private SystemSearchRemoveAllMatchesAction removeAllAction;
-
- private SystemSearchCopyToClipboardAction copyAction;
- private SystemPasteFromClipboardAction pasteAction;
-
- // for ISystemMessageLine
- private String _message, _errorMessage;
- private SystemMessage sysErrorMessage;
- private IStatusLineManager _statusLine = null;
-
-
- /**
- * Double click listener.
- */
- public class SystemSearchDoubleClickListener implements IDoubleClickListener {
-
- /**
- * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(DoubleClickEvent)
- */
- public void doubleClick(DoubleClickEvent event) {
- IStructuredSelection selection = (IStructuredSelection) (event.getSelection());
-
- if (!selection.isEmpty()) {
- Object element = selection.getFirstElement();
- ISystemViewElementAdapter adapter = getAdapter(element);
- adapter.setViewer(currentViewer);
- adapter.handleDoubleClick(element);
- }
- }
- }
-
- class SelectAllAction extends Action {
-
- public SelectAllAction() {
- super(SystemResources.ACTION_SELECT_ALL_LABEL, null);
- }
-
- public void run() {
-
- if ((currentViewer != null) && (currentViewer instanceof TableViewer)) {
- TableViewer viewer = (TableViewer) currentViewer;
- viewer.getTable().selectAll();
- // force viewer selection change
- viewer.setSelection(viewer.getSelection());
- }
- }
- }
-
- public class CancelAction extends Action {
-
- public CancelAction() {
- super(SystemResources.ACTION_CANCEL_SEARCH_LABEL, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_STOP_ID));
- setToolTipText(SystemResources.ACTION_CANCEL_SEARCH_TOOLTIP);
- RSEUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, RSEUIPlugin.HELPPREFIX + "search_cancel"); //$NON-NLS-1$
- }
-
- public void run() {
-
- if (currentViewer == null) {
- return;
- }
-
- Object input = currentViewer.getInput();
-
- if (input != null) {
-
- if (input instanceof IHostSearchResultSet) {
- IHostSearchResultSet resultSet = (IHostSearchResultSet)input;
- setEnabled(false);
- resultSet.cancel();
- }
- }
- }
-
- public void updateEnableState(IAdaptable input) {
-
- // no input yet, so disable it
- if (input == null) {
- setEnabled(false);
- }
-
- if (input instanceof IHostSearchResultSet) {
- IHostSearchResultSet set = (IHostSearchResultSet)input;
-
- // running, so enable it
- if (set.isRunning()) {
- setEnabled(true);
- }
- // otherwise, disable
- else {
- setEnabled(false);
- }
- }
- // some other input, disable it
- else {
- setEnabled(false);
- }
- }
- }
-
- /**
- * Constructor for SystemSearchViewPart.
- */
- public SystemSearchViewPart() {
- super();
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(Composite)
- */
- public void createPartControl(Composite parent) {
-
- // create the page book
- pageBook = new PageBook(parent, SWT.NONE);
-
- // pageBook.showPage(createDummyControl());
-
- // get view site
- IViewSite site = getViewSite();
-
- // set a dummy selection provider
- // getSite().setSelectionProvider(createDummySelectionProvider());
-
- // get action bars
- actionBars = site.getActionBars();
-
- // get the menu manager
- mMgr = actionBars.getMenuManager();
-
- // get the tool bar manager
- tbMgr = actionBars.getToolBarManager();
-
- _statusLine = actionBars.getStatusLineManager();
-
-
- // initialize toolbar actions
- initToolBarActions(tbMgr);
-
- // get the status line manager
- //slMgr = actionBars.getStatusLineManager();
-
- // update action bars
- actionBars.updateActionBars();
-
- // add view as a system listener
- RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
-
- // set help
- SystemWidgetHelpers.setHelp(pageBook, RSEUIPlugin.HELPPREFIX + "srch0000"); //$NON-NLS-1$
- }
-
- private void initToolBarActions(IToolBarManager tbMgr) {
-
- // create cancel action
- if (cancelAction == null) {
- cancelAction = new CancelAction();
-
- if (currentViewer == null) {
- cancelAction.setEnabled(false);
- }
- else if (currentViewer.getInput() == null){
- cancelAction.setEnabled(false);
- }
- else {
- cancelAction.setEnabled(true);
- }
- }
-
- // create remove selected matches action
- if (removeSelectedAction == null) {
- removeSelectedAction = new SystemSearchRemoveSelectedMatchesAction(this, getShell());
-
- if (currentViewer == null) {
- removeSelectedAction.setEnabled(false);
- }
- else {
- removeSelectedAction.setEnabled(isRemoveSelectedEnabled());
- }
- }
-
- // create remove all matches action
- if (removeAllAction == null) {
- removeAllAction = new SystemSearchRemoveAllMatchesAction(this, getShell());
-
- if (currentViewer == null) {
- removeAllAction.setEnabled(false);
- }
- else {
- Object input = currentViewer.getInput();
- removeAllAction.setEnabled(isRemoveAllEnabled((IAdaptable)input));
- }
- }
-
- // add cancel action
- tbMgr.add(cancelAction);
-
- // add remove selected action
- tbMgr.add(removeSelectedAction);
-
- // add remove all action
- tbMgr.add(removeAllAction);
-
- // register global edit actions
- SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
-
- // clipboard
- Clipboard clipboard = registry.getSystemClipboard();
-
- Shell shell = registry.getShell();
-
- copyAction = new SystemSearchCopyToClipboardAction(shell, clipboard);
- pasteAction = new SystemPasteFromClipboardAction(shell, clipboard);
-
- CellEditorActionHandler editorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars());
-
- editorActionHandler.setCopyAction(copyAction);
- editorActionHandler.setPasteAction(pasteAction);
- editorActionHandler.setDeleteAction(removeSelectedAction);
- // editorActionHandler.setSelectAllAction(new SelectAllAction());
- }
-
- /**
- * Updates the remove selected action.
- * @return <code>true</code> if remove selected action should be enabled, <code>false</code> otherwise.
- */
- private boolean isRemoveSelectedEnabled() {
-
- ISelection selection = getSelection();
-
- if (selection == null) {
- return false;
- }
- else if (selection.isEmpty()) {
- return false;
- }
- else {
-
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection strSel = (IStructuredSelection)selection;
-
- // note that SystemSearchTableView returns the current input
- // if the actual selection is null
- // so we check for it and return null
- if (strSel.getFirstElement() == currentViewer.getInput()) {
- return false;
- }
- else {
- return true;
- }
- }
- else {
- return false;
- }
- }
- }
-
- /**
- * Updates the remove all matches action.
- * @param input the input to the current viewer, or <code>null</code> if there is currently no input.
- * @return <code>true</code> if remove all action should be enabled, <code>false</code> otherwise.
- */
- private boolean isRemoveAllEnabled(IAdaptable input) {
-
- if (input == null) {
- return false;
- }
-
- ISystemViewElementAdapter adapter = getAdapter(input);
-
- if (adapter == null) {
- return false;
- }
- else {
- return adapter.hasChildren(input);
- }
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- pageBook.setFocus();
- }
-
- /**
- * @see org.eclipse.ui.IViewPart#init(IViewSite, IMemento)
- */
- public void init(IViewSite site, IMemento memento) throws PartInitException {
- super.init(site, memento);
- }
-
- /**
- * @see org.eclipse.ui.IViewPart#saveState(IMemento)
- */
- public void saveState(IMemento memento) {
- super.saveState(memento);
- }
-
- /**
- * Add a search result set.
- * @param resultSet the search result set
- */
- public void addSearchResult(IAdaptable resultSet) {
-
- // if the correct adapter is not registered, then return
- ISystemViewElementAdapter adapter = getAdapter(resultSet);
-
- if (adapter == null) {
- return;
- }
-
- if (resultSet instanceof IHostSearchResultSet) {
- currentViewer = createSearchResultsTable((IHostSearchResultSet)resultSet, adapter);
- }
- else {
- currentViewer = createSearchResultsTree(resultSet, adapter);
-
- TreeViewer treeViewer = (TreeViewer)currentViewer;
- MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(this);
- Tree tree = (Tree)treeViewer.getControl();
- Menu menu = menuMgr.createContextMenu(tree);
- tree.setMenu(menu);
- }
-
- // set input
- currentViewer.setInput(resultSet);
-
- // add as selection changed listener to current viewer
- currentViewer.addSelectionChangedListener(this);
-
- // set as selection provider
- getSite().setSelectionProvider(currentViewer);
-
- // add double click listener
- currentViewer.addDoubleClickListener(new SystemSearchDoubleClickListener());
-
- // set help for control
- SystemWidgetHelpers.setHelp(currentViewer.getControl(), RSEUIPlugin.HELPPREFIX + "srch0000"); //$NON-NLS-1$
-
- // add current viewer to viewer list
- viewers.add(currentViewer);
-
- // get title to use from adapter
- String title = adapter.getText(resultSet);
-
- // set the title of the view
- setContentDescription(title);
-
- int num = viewers.size()-1;
-
- // create history action
- 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);
-
- // if this is the first result set, add the clear history action
- if (viewers.size() == 1) {
-
- // create a group for history actions
- mMgr.add(new GroupMarker(MENU_HISTORY_GROUP_NAME));
-
- // create a separator with a group for clear history action
- mMgr.add(new Separator(MENU_CLEAR_HISTORY_GROUP_NAME));
-
- // add the clear history action to the group
- clearHistoryAction = new SystemSearchClearHistoryAction(this, getShell());
- mMgr.appendToGroup(MENU_CLEAR_HISTORY_GROUP_NAME, clearHistoryAction);
- }
-
- // add history action to the menu manager
- mMgr.appendToGroup(MENU_HISTORY_GROUP_NAME, historyAction);
-
- // add global actions
- // actionBars.setGlobalActionHandler(ActionFactory.DELETE, new SystemSearchDeleteAction(this));
-
- // update action bars
- actionBars.updateActionBars();
-
- // show the control
- pageBook.showPage(currentViewer.getControl());
-
- // enable/disable state for this input
- if (cancelAction != null) {
- cancelAction.updateEnableState(resultSet);
- }
-
- // enable/disable state
- if (removeSelectedAction != null) {
- removeSelectedAction.setEnabled(isRemoveSelectedEnabled());
- }
-
- // enable/disable state for this input
- if (removeAllAction != null) {
- removeAllAction.setEnabled(isRemoveAllEnabled(resultSet));
- }
- }
-
- private StructuredViewer createSearchResultsTree(IAdaptable resultSet, ISystemViewElementAdapter adapter)
- {
-
- // create the current tree
- Tree currentControl = new Tree(pageBook, SWT.MULTI);
-
- // create the current viewer
- TreeViewer currentViewer = new TreeViewer(currentControl);
- currentViewer.setUseHashlookup(true);
- currentViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
-
- // create a new content provider
- SystemSearchViewContentProvider contentProvider = new SystemSearchViewContentProvider();
- // save the viewpart to the provider
- contentProvider.setViewPart(this);
- // add the content provider to the viewer
- currentViewer.setContentProvider(contentProvider);
-
- // create a new label provider
- SystemSearchViewLabelProvider labelProvider = new SystemSearchViewLabelProvider();
-
- // add the label provider to the viewer
- currentViewer.setLabelProvider(labelProvider);
-
- return currentViewer;
- }
-
- private StructuredViewer createSearchResultsTable(IHostSearchResultSet resultSet, ISystemViewElementAdapter adapter) {
-
- // create table portion
- // TODO change to tabletree when eclipse fixes the swt widget
- //TableTree table = new TableTree(pageBook, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- Tree tabletree = new Tree(pageBook, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- SystemSearchTableView viewer = new SystemSearchTableView(tabletree, resultSet, this);
- viewer.setWorkbenchPart(this);
-
- getSite().registerContextMenu(viewer.getContextMenuManager(), viewer);
- return viewer;
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
-
- // remove as resource change listener
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
-
- // clear viewers
- clearViewers();
-
- // clear arrays
- viewers.clear();
- historyActions.clear();
-
- // call super as required
- super.dispose();
- }
-
- /**
- * Remove current viewer as selection provider, removes children of all the inputs and disposes
- * the controls if they haven't already been disposed.
- */
- private void clearViewers() {
-
- // remove current viewer as selection provider if it exists
- if (currentViewer != null) {
-
- // remove as selection changed listener to current viewer
- currentViewer.removeSelectionChangedListener(this);
-
- if (getSite().getSelectionProvider() == currentViewer) {
- getSite().setSelectionProvider(null);
- }
- }
-
- for (int i = 0; i < viewers.size(); i++) {
-
- Object viewer = viewers.get(i);
-
- // if we're dealing with universal search
- if (viewer instanceof SystemSearchTableView) {
-
- SystemSearchTableView tableView = (SystemSearchTableView)viewer;
-
- Object input = tableView.getInput();
-
- // dispose the remote search result set
- // which cancels the search and removes contents from the input
- // (i.e. removes from model)
- if (input instanceof IHostSearchResultSet) {
- IHostSearchResultSet set = (IHostSearchResultSet)input;
- set.dispose();
- }
-
- // dispose viewer
- tableView.dispose();
- }
- // other search
- else if (viewer instanceof TreeViewer){
-
- TreeViewer treeView = (TreeViewer)viewer;
-
- Object input = treeView.getInput();
-
- ISystemViewElementAdapter adapter = getAdapter(input);
-
- if (adapter != null && adapter instanceof ISystemRemoveElementAdapter) {
- ISystemRemoveElementAdapter rmAdapter = (ISystemRemoveElementAdapter)adapter;
- rmAdapter.removeAllChildren(input);
-
- Control control = treeView.getControl();
-
- if (!control.isDisposed()) {
- control.dispose();
- }
- }
- }
- }
- }
-
- /**
- * Show search result with the given index.
- * @param index the index in the result history list
- */
- public void showSearchResult(int index) {
-
- // remove as selection listener from current viewer
- if (currentViewer != null) {
- currentViewer.removeSelectionChangedListener(this);
- }
-
- // get viewer with this index and make it current
- currentViewer = (StructuredViewer)(viewers.get(index));
-
- // set as selection provider
- getSite().setSelectionProvider(currentViewer);
-
- // add as selection changed listener to current viewer
- currentViewer.addSelectionChangedListener(this);
-
- // get the input
- IAdaptable resultSet = (IAdaptable)(currentViewer.getInput());
-
- if (resultSet == null) {
- return;
- }
-
- ISystemViewElementAdapter adapter = getAdapter(resultSet);
-
- // if the correct adapter is not registered, then return
- if (adapter == null) {
- return;
- }
-
- // get title to use from adapter
- String title = adapter.getText(resultSet);
-
- // set the title of the view
- setContentDescription(title);
-
- // get the associated control
- Control currentControl = currentViewer.getControl();
-
- // show the control
- pageBook.showPage(currentControl);
-
- // enable/disable state for this input
- if (cancelAction != null) {
- cancelAction.updateEnableState(resultSet);
- }
-
- // enable/disable state
- if (removeSelectedAction != null) {
- removeSelectedAction.setEnabled(isRemoveSelectedEnabled());
- }
-
- // enable/disable state for this input
- if (removeAllAction != null) {
- removeAllAction.setEnabled(isRemoveAllEnabled(resultSet));
- }
- }
-
- /**
- * Delete the selected object in the view.
- * @return <code>true</code> if the selection has been deleted, <code>false</code> otherwise.
- */
- public boolean deleteSelected() {
-
- if (currentViewer == null) {
- return false;
- }
-
- IStructuredSelection selection = (IStructuredSelection)(currentViewer.getSelection());
-
- if (selection == null || selection.isEmpty()) {
- return false;
- }
-
- Object input = currentViewer.getInput();
-
- ISystemViewElementAdapter adapter = getAdapter(input);
-
- // adapter should be an instance of ISystemRemoveElementAdapter
- if (adapter == null || !(adapter instanceof ISystemRemoveElementAdapter)) {
- return false;
- }
-
- Iterator elements = selection.iterator();
-
- ArrayList removeElements = new ArrayList();
-
- while (elements.hasNext()) {
- Object element = elements.next();
- ((ISystemRemoveElementAdapter)adapter).remove(input, element);
- removeElements.add(element);
- }
-
- // current viewer should be an instance of tree viewer
- // remove the elements from it to update the view
- if (currentViewer instanceof TreeViewer) {
- ((TreeViewer)currentViewer).remove(removeElements.toArray());
- }
-
- // get title to use from adapter
- String title = adapter.getText(input);
-
- // set the title of the view
- setContentDescription(title);
-
- // enable/disable state for this input
- if (cancelAction != null) {
- cancelAction.updateEnableState((IAdaptable)input);
- }
-
- // enable/disable state for this input
- if (removeSelectedAction != null) {
- removeSelectedAction.setEnabled(isRemoveSelectedEnabled());
- }
-
- // enable/disable state for this input
- if (removeAllAction != null) {
- removeAllAction.setEnabled(isRemoveAllEnabled((IAdaptable)input));
- }
-
- return true;
- }
-
- /**
- * Deletes all the pages in the view.
- * @return <code>true</code> if all pages have been deleted, <code>false</code> otherwise.
- */
- public boolean deleteAllPages() {
-
- // first show a dummy control in page book
- // this must be done before viewers are cleared
- // reason is that current showing control in page book can not be disposed
- // SWT doesn't seem to like it
- // This is fixed in 3.0
- pageBook.showPage(createDummyControl());
-
- // clear viewers
- clearViewers();
-
- // current viewer is null again
- currentViewer = null;
-
- // clear the viewer list
- viewers.clear();
-
- // disable cancel action
- cancelAction.setEnabled(false);
-
- // disable remove all action
- removeSelectedAction.setEnabled(false);
-
- // disable remove all action
- removeAllAction.setEnabled(false);
-
- // clear the history action list
- historyActions.clear();
-
- // get rid of all menu manager actions
- mMgr.removeAll();
-
- // update action bars
- actionBars.updateActionBars();
-
- // clear the content description
- setContentDescription(""); //$NON-NLS-1$
-
- return true;
- }
-
- /**
- * Creates a dummy control to show in the page book.
- * @return a dummy control.
- */
- private Control createDummyControl() {
- Control control = new Composite(pageBook, SWT.NONE);
- return control;
- }
-
- /**
- * Deletes the current page.
- * @return <code>true</code> if the current page has been deleted, <code>false</code> otherwise.
- */
- public boolean deleteCurrentPage() {
-
- // remove current viewer as selection provider if it exists
- if (currentViewer != null) {
-
- // remove as selection changed listener to current viewer
- currentViewer.removeSelectionChangedListener(this);
-
- if (getSite().getSelectionProvider() == currentViewer) {
- getSite().setSelectionProvider(null);
- }
- }
- else {
- return false;
- }
-
- Object input = currentViewer.getInput();
-
- ISystemViewElementAdapter adapter = getAdapter(input);
-
- // universal search
- if (currentViewer instanceof SystemSearchTableView)
- {
-
- SystemSearchTableView tableView = (SystemSearchTableView)currentViewer;
-
- // remove viewer as listener
- tableView.removeAsListener();
-
- // clear model
- if (input instanceof IHostSearchResultSet) {
- IHostSearchResultSet set = (IHostSearchResultSet)input;
- set.dispose();
- }
-
- // now refresh viewer
- // but flush cache of the provider first for an accurate refresh
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider)(tableView.getContentProvider());
- provider.flushCache();
- tableView.refresh();
- }
- // other search
- else if (currentViewer instanceof TreeViewer){
-
- TreeViewer treeView = (TreeViewer)currentViewer;
-
- if (adapter != null && adapter instanceof ISystemRemoveElementAdapter) {
- ISystemRemoveElementAdapter rmAdapter = (ISystemRemoveElementAdapter)adapter;
- rmAdapter.removeAllChildren(input);
- treeView.refresh();
- }
- }
-
- // get title to use from adapter
- String title = adapter.getText(input);
-
- // set the title of the view
- setContentDescription(title);
-
- // disable cancel action
- cancelAction.setEnabled(false);
-
- // disable remove selected action
- removeSelectedAction.setEnabled(false);
-
- // disable remove all action
- removeAllAction.setEnabled(false);
-
- return true;
- }
-
- /**
- * Get the adapter for the given object.
- * @param element the object the object for which I want the adapter.
- * @return the adapter for the object.
- */
- public ISystemViewElementAdapter getAdapter(Object element) {
- return SystemAdapterHelpers.getAdapter(element);
- }
-
- /**
- * Get the shell.
- * @return the shell
- */
- public Shell getShell() {
- return getSite().getShell();
- }
-
- public void systemResourceChanged(ISystemResourceChangeEvent event) {
-
- // need to introduce another event type for this....
- if (event.getType() == ISystemResourceChangeEvents.EVENT_SEARCH_FINISHED) {
-
- // the view is added as a system listener when the part is created
- // so the current viewer may not exist if the search results has not been added yet
- if (currentViewer == null) {
- return;
- }
-
- Object actualSource = event.getSource();
-
- if (actualSource instanceof IHostSearchResultConfiguration) {
-
- IHostSearchResultSet source = ((IHostSearchResultConfiguration)actualSource).getParentResultSet();
-
- // get title to use from adapter
- ISystemViewElementAdapter adapter = getAdapter(source);
-
- if (adapter == null) {
- return;
- }
-
- int index = -1;
-
- // if the source is the input to the current viewer
- // update view title and cancel action
- // also update the history action corresponding to the current view
- if (currentViewer.getInput() == source) {
-
- // end of a search
- String title = adapter.getText(source);
-
- // set the title of the view
- setContentDescription(title);
-
- // enable/disable state for this input
- if (cancelAction != null) {
- cancelAction.updateEnableState((IAdaptable)source);
- }
-
- // enable/disable state for this input
- if (removeSelectedAction != null) {
- removeSelectedAction.setEnabled(isRemoveSelectedEnabled());
- }
-
- // enable/disable state for this input
- if (removeAllAction != null) {
- removeAllAction.setEnabled(isRemoveAllEnabled((IAdaptable)source));
- }
-
- // find out where the current viewer is in the viewer list
- index = viewers.indexOf(currentViewer);
- }
- // if the source is not the input to the current view
- // we simply update the history action
- else {
-
- for (int i = 0; i < viewers.size(); i++) {
-
- SystemSearchTableView view = (SystemSearchTableView)viewers.get(i);
-
- if (view.getInput() == source) {
- index = i;
- break;
- }
- }
- }
-
- // since the history actions list paralles the viewer list, use the index to
- // get the history action
- if (index >= 0) {
- SystemSearchHistoryAction historyAction = (SystemSearchHistoryAction)historyActions.get(index);
- historyAction.setText(adapter.getText(source));
- }
- }
- }
- }
-
- //------------------------------------------------------
- // Methods used by the tree view pop-up menu
- //------------------------------------------------------
- /**
- * Fill context for the tree view pop-up menu.
- * @param menu the menu manager.
- */
- public void fillContextMenu(IMenuManager menu)
- {
- IStructuredSelection selection = (IStructuredSelection)currentViewer.getSelection();
-
- if (selection == null) {
- return;
- }
-
- int selectionCount = selection.size();
-
- if (selectionCount == 0) { // nothing selected
- return;
- }
- else {
-
- // if only one selection, check if selection is the input
- // if so add no actions
- if (selectionCount == 1) {
-
- if (selection.getFirstElement() == currentViewer.getInput()) {
- return;
- }
- }
-
- // if selection count is more than 1
- // check if all have same parent
- // if not, check if they have ancestor relationship
- // if so, add no actions
-// if (selectionCount > 1) {
-// boolean allSelectionsFromSameParent = sameParent();
-//
-// // if all selections do not have the same parent, do not show anything in the menu
-// if (!allSelectionsFromSameParent) {
-//
-// if (selectionHasAncestryRelationship()) {
-// // don't show the menu because actions with
-// // multiple select on objects that are ancestors
-// // of each other is problematic
-// // still create the standard groups
-// SystemView.createStandardGroups(menu);
-// return;
-// }
-// }
-// }
-
- // partition into groups...
- SystemView.createStandardGroups(menu);
-
- // adapter actions
- SystemMenuManager ourMenu = new SystemMenuManager(menu);
- Object element = selection.getFirstElement();
- ISystemViewElementAdapter adapter = getAdapter(element);
- adapter.setViewer(currentViewer);
- adapter.addActions(ourMenu, selection,
- getShell(),
- ISystemContextMenuConstants.GROUP_ADAPTERS);
- }
- }
-
- /**
- * This is called to ensure all elements in a multiple-selection have the same parent in the
- * tree viewer. If they don't we automatically disable all actions.
- * <p>
- * Designed to be as fast as possible by going directly to the SWT widgets
- */
- public boolean sameParent()
- {
- boolean same = true;
-
- Tree tree = null;
-
- if (currentViewer instanceof AbstractTreeViewer) {
- tree = (Tree)(currentViewer.getControl());
- }
- else {
- return false;
- }
-
- TreeItem[] items = tree.getSelection();
-
- if ((items == null) || (items.length == 0))
- return true;
-
- TreeItem prevParent = null;
- TreeItem currParent = null;
-
- for (int idx=0; same && (idx<items.length); idx++)
- {
- currParent = items[idx].getParentItem();
-
- if ((idx>0) && (currParent != prevParent))
- {
- same = false;
- }
- else
- {
- prevParent = currParent;
- }
- }
-
- return same;
- }
-
- /**
- * Called when the context menu is about to open.
- * Calls {@link #fillContextMenu(IMenuManager)}
- */
- public void menuAboutToShow(IMenuManager menu)
- {
- fillContextMenu(menu);
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener)
- {
- currentViewer.addSelectionChangedListener(listener);
- }
-
- /**
- * Returns the current selection for this provider.
- *
- * @return the current selection
- */
- public ISelection getSelection()
- {
- if (currentViewer == null) {
- return null;
- }
- else {
- return currentViewer.getSelection();
- }
- }
- /**
- * Removes the given selection change listener from this selection provider.
- * Has no affect if an identical listener is not registered.
- *
- * @param listener a selection changed listener
- */
- public void removeSelectionChangedListener(ISelectionChangedListener listener)
- {
- currentViewer.removeSelectionChangedListener(listener);
- }
- /**
- * Sets the current selection for this selection provider.
- *
- * @param selection the new selection
- */
- public void setSelection(ISelection selection)
- {
- currentViewer.setSelection(selection);
- }
- /**
- * Set the title of this view part
- * @param title
- */
- public void setViewPartTitle(String title)
- {
- setContentDescription(title);
- }
-
- /**
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
-
- if (event.getSelectionProvider() == currentViewer) {
- removeSelectedAction.setEnabled(isRemoveSelectedEnabled());
- }
- else {
- removeSelectedAction.setEnabled(false);
- }
-
- IStructuredSelection sel = (IStructuredSelection)(event.getSelection());
-
- Iterator iter = sel.iterator();
-
- // set viewer for adapters of the selected elements
- while (iter.hasNext()) {
- ISystemViewElementAdapter adapter = getAdapter(iter.next());
- adapter.setViewer(currentViewer);
- }
-
- copyAction.setEnabled(copyAction.updateSelection(sel));
- pasteAction.setEnabled(pasteAction.updateSelection(sel));
- }
-
- /**
- * Gets the current viewer, i.e. the viewer whose control is being currently displayed in the view.
- * @return the current viewer, or <code>null</code> if there is no current viewer.
- */
- public StructuredViewer getCurrentViewer() {
- return currentViewer;
- }
-
- public Viewer getRSEViewer()
- {
- return currentViewer;
- }
-
-// -------------------------------
- // ISystemMessageLine interface...
- // -------------------------------
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- _errorMessage = null;
- sysErrorMessage = null;
- if (_statusLine != null)
- _statusLine.setErrorMessage(_errorMessage);
- }
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- _message = null;
- if (_statusLine != null)
- _statusLine.setMessage(_message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage()
- {
- return _errorMessage;
- }
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage()
- {
- return _message;
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- this._errorMessage = message;
- if (_statusLine != null)
- _statusLine.setErrorMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- return sysErrorMessage;
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- sysErrorMessage = message;
- setErrorMessage(message.getLevelOneText());
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(Throwable exc)
- {
- setErrorMessage(exc.getMessage());
- }
-
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- this._message = message;
- if (_statusLine != null)
- _statusLine.setMessage(message);
- }
- /**
- *If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- setMessage(message.getLevelOneText());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemResourceAdaptableProfile.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemResourceAdaptableProfile.java
deleted file mode 100644
index 7bcd0b77d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemResourceAdaptableProfile.java
+++ /dev/null
@@ -1,35 +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.view.team;
-
-import org.eclipse.rse.core.model.ISystemProfile;
-
-/**
- * This class wrappers a SystemProfile and adapts it to an IResource
- * by mapping to its underlying folder.
- */
-public class SystemResourceAdaptableProfile
-{
- /**
- * Constructor
- */
- public SystemResourceAdaptableProfile(ISystemProfile profile)
- {
- super();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 75b87b0b3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamView.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.view.team;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ISelection;
-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.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;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-
-
-//import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-
-/**
- * We specialize tree viewer for the Team view, so we know
- * when we are dealing with the team view in common code.
- */
-public class SystemTeamView extends TreeViewer implements ISystemSelectAllTarget, ISystemResourceChangeListener
-{
- private SystemTeamViewPart teamViewPart;
-
- /**
- * @param parent
- */
- public SystemTeamView(Composite parent, SystemTeamViewPart teamViewPart)
- {
- super(parent);
- this.teamViewPart = teamViewPart;
- SystemWidgetHelpers.setHelp(getTree(), RSEUIPlugin.HELPPREFIX+"teamview"); //$NON-NLS-1$
- }
-
- /**
- * @param parent
- * @param style
- */
- public SystemTeamView(Composite parent, int style, SystemTeamViewPart teamViewPart)
- {
- super(parent, style);
- this.teamViewPart = teamViewPart;
- SystemWidgetHelpers.setHelp(getTree(), RSEUIPlugin.HELPPREFIX+"teamview"); //$NON-NLS-1$
- }
-
- /**
- * @param tree
- */
- public SystemTeamView(Tree tree, SystemTeamViewPart teamViewPart)
- {
- super(tree);
- this.teamViewPart = teamViewPart;
- SystemWidgetHelpers.setHelp(getTree(), RSEUIPlugin.HELPPREFIX+"teamview"); //$NON-NLS-1$
- }
-
- /**
- * Return the part view part of this tree view
- */
- public SystemTeamViewPart getTeamViewPart()
- {
- return teamViewPart;
- }
-
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- */
- public Object[] getElementNodes(Object element)
- {
- Widget w = findItem(element);
- if ((w != null) && (w instanceof TreeItem))
- return getElementNodes((TreeItem)w);
- return null;
- }
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- * This flavour is optimized for the case when you have the tree item directly.
- */
- public Object[] getElementNodes(TreeItem item)
- {
- Vector v = new Vector();
- v.addElement(item.getData());
- while (item != null)
- {
- item = item.getParentItem();
- if (item != null)
- v.addElement(item.getData());
- }
- Object[] nodes = new Object[v.size()];
- for (int idx=0; idx<nodes.length; idx++)
- nodes[idx] = v.elementAt(idx);
- return nodes;
- }
-
- /**
- * Use findItem to find a tree item given its data object, or null if given object not in tree.
- */
- public TreeItem findTreeItem(Object dataObject)
- {
- Widget widget = findItem(dataObject);
- if (widget instanceof TreeItem)
- return (TreeItem)widget;
- else
- return null;
- }
- /**
- * Given a tree item, search the immediate children for an item representing the given object.
- */
- public TreeItem findChildTreeItem(TreeItem parentItem, Object dataObject)
- {
- TreeItem[] childItems = parentItem.getItems();
- TreeItem childItem = null;
- for (int idx=0; (childItem==null) && (idx<childItems.length); idx++)
- {
- if ((childItems[idx].getData() != null) && childItems[idx].getData().equals(dataObject))
- childItem = childItems[idx];
- }
- return childItem;
- }
-
- /**
- * Called when a property is updated and we need to inform the Property Sheet viewer.
- * There is no formal mechanism for this so we simulate a selection changed event as
- * this is the only event the property sheet listens for.
- */
- public void updatePropertySheet()
- {
- ISelection selection = getSelection();
- if (selection == null)
- return;
- // create an event
- SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());
- // fire the event
- fireSelectionChanged(event);
- }
-
- // ----------------------------------------
- // ISystemResourceChangeListener methods...
- // ----------------------------------------
-
- /**
- * Called when something changes in the model
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- int type = event.getType();
- switch(type)
- {
- case ISystemResourceChangeEvents.EVENT_COLLAPSE_ALL:
- collapseToLevel(getInput(), AbstractTreeViewer.ALL_LEVELS);
- break;
- }
- }
-
- /**
- * Return the shell
- */
- public Shell getShell()
- {
- return super.getControl().getShell();
- }
-
- // -----------------------------------------------------------------
- // ISystemSelectAllTarget methods to facilitate the global action...
- // -----------------------------------------------------------------
- /**
- * Return true if select all should be enabled for the given object.
- * For a tree view, you should return true if and only if the selected object has children.
- * You can use the passed in selection or ignore it and query your own selection.
- */
- public boolean enableSelectAll(IStructuredSelection selection)
- {
- Tree tree = getTree();
- TreeItem[] items = tree.getSelection();
- if ((items==null) || (items.length!=1)) // only allow for single selections
- return false;
-
- TreeItem ti = items[0];
- int count = getItemCount(ti);
- if (count == 1) // is it a dummy?
- {
- if ((getItems(ti)[0]).getData() == null)
- count = 0; // assume a dummy
- }
- return (count > 0);
- }
- /**
- * When this action is run via Edit->Select All or via Ctrl+A, perform the
- * select all action. For a tree view, this should select all the children
- * of the given selected object. You can use the passed in selected object
- * or ignore it and query the selected object yourself.
- */
- public void doSelectAll(IStructuredSelection selection)
- {
- Tree tree = getTree();
- TreeItem[] currSel = tree.getSelection();
- TreeItem[] childItems = currSel[0].getItems();
- if (childItems.length == 0)
- return;
- tree.setSelection(childItems);
- Object[] childObjects = new Object[childItems.length];
- for (int idx=0; idx<childObjects.length; idx++)
- childObjects[idx] = childItems[idx].getData();
- fireSelectionChanged(
- new SelectionChangedEvent(this,
- new StructuredSelection(childObjects)));
- }
-
- /**
- * Handles a collapse-selected request
- */
- public void collapseSelected()
- {
- TreeItem[] selectedItems = ((Tree)getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length>0))
- {
- for (int idx=0; idx<selectedItems.length; idx++)
- selectedItems[idx].setExpanded(false);
- }
- }
- /**
- * Handles an expand-selected request
- */
- public void expandSelected()
- {
- TreeItem[] selectedItems = ((Tree)getControl()).getSelection();
- if ((selectedItems != null) && (selectedItems.length>0))
- {
- for (int idx=0; idx<selectedItems.length; idx++)
- {
- if (!selectedItems[idx].getExpanded())
- {
- createChildren(selectedItems[idx]);
- }
- selectedItems[idx].setExpanded(true);
- }
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 0a6928308..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewActiveProfileAction.java
+++ /dev/null
@@ -1,88 +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.view.team;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-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;
-
-
-/**
- * The action allows users to activate/de-activate a selected profile.
- * @deprecated
- * TODO: delete this action after next MRI rev, as it will be replaced by
- * {@link org.eclipse.rse.ui.view.team.SystemTeamViewActiveProfileAction} and
- * {@link org.eclipse.rse.ui.view.team.SystemTeamViewMakeInActiveProfileAction}.
- */
-public class SystemTeamViewActiveProfileAction extends SystemBaseAction
-
-{
-
- /**
- * Constructor
- */
- public SystemTeamViewActiveProfileAction(Shell parent)
- {
- super(SystemResources.ACTION_PROFILE_ACTIVATE_LABEL,SystemResources.ACTION_PROFILE_ACTIVATE_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID),
- parent);
- allowOnMultipleSelection(true); // as requested by WSDD team
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
- setHelp(RSEUIPlugin.HELPPREFIX+"actnactp"); //$NON-NLS-1$
- setChecked(false);
- }
-
- /**
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- ISystemProfile profile = (ISystemProfile)getFirstSelection();
- if (profile == null)
- return false;
- ISystemProfileManager mgr = SystemProfileManager.getSystemProfileManager();
- // todo... we need to have two actions, one to make active, and one to make inactive.
- while (profile != null)
- {
- setChecked(mgr.isSystemProfileActive(profile.getName()));
- profile = (ISystemProfile)getNextSelection();
- }
- return true;
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run()
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISystemProfile profile = (ISystemProfile)getFirstSelection();
- boolean check = isChecked();
- while (profile != null)
- {
- sr.setSystemProfileActive(profile, check);
- profile = (ISystemProfile)getNextSelection();
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 790cf81e2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryAdapter.java
+++ /dev/null
@@ -1,272 +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.view.team;
-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.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Adapter for displaying and processing SystemTeamViewCategoryNode objects in tree views, such as
- * the Team view.
- */
-public class SystemTeamViewCategoryAdapter
- extends AbstractSystemViewAdapter
- implements ISystemViewElementAdapter, ISystemUserIdConstants
-{
-
- private boolean actionsCreated = false;
- //private Hashtable categoriesByProfile = new Hashtable();
-
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
-
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given element.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- if (!actionsCreated)
- createActions();
- //menu.add(menuGroup, copyAction);
- }
- private void createActions()
- {
- actionsCreated = true;
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- return category.getImageDescriptor();
- }
-
- /**
- * Return the label for this object
- */
- public String getText(Object element)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- return category.getLabel();
- }
-
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- return category.getLabel();
- }
-
- /**
- * Return the absolute name, versus just display name, of this object
- */
- public String getAbsoluteName(Object element)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- return category.getProfile() + "." + category.getLabel(); //$NON-NLS-1$
- }
-
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- return SystemViewResources.RESID_PROPERTY_TEAM_CATEGORY_TYPE_VALUE;
- }
-
- /**
- * Return the string to display in the status line when the given object is selected.
- * We return:
- */
- public String getStatusLineText(Object element)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- return SystemResources.RESID_TEAMVIEW_CATEGORY_VALUE + ": " + category.getLabel() + " - " + category.getDescription(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Return the parent of this object. We return the RemoteSystemsConnections project
- */
- public Object getParent(Object element)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- return category.getProfile();
- }
-
- /**
- * Return the children of this profile.
- */
- public Object[] getChildren(Object element)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- ISystemProfile profile = category.getProfile();
- String categoryType = category.getMementoHandle();
- if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_CONNECTIONS))
- {
- return profile.getHosts();
- }
- else
- return createSubSystemConfigurationNodes(profile, category);
- }
- /**
- * Create subsystem factory child nodes for expanded category node
- */
- private SystemTeamViewSubSystemConfigurationNode[] createSubSystemConfigurationNodes(ISystemProfile profile, SystemTeamViewCategoryNode category)
- {
- SystemTeamViewSubSystemConfigurationNode[] nodes = null;
-
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurations();
- if (factories != null)
- {
- Vector v = new Vector();
- String categoryType = category.getMementoHandle();
- for (int idx=0; idx<factories.length; idx++)
- {
- boolean createNode = false;
- ISubSystemConfiguration ssf = factories[idx];
- if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS))
- {
- createNode = ssf.supportsFilters() && (profile.getFilterPools(ssf).length > 0);
- }
- else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_USERACTIONS))
- {
- createNode = ssf.supportsUserDefinedActions(); // && profile.getUserActions(ssf).length > 0;
- }
- else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS))
- {
- createNode = ssf.supportsCompileActions(); // && profile.getCompileCommandTypes(ssf).length > 0;
- }
- else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_TARGETS))
- {
- createNode = ssf.supportsTargets(); // && profile.getTargets(ssf).length > 0;
- }
- if (createNode)
- v.addElement(new SystemTeamViewSubSystemConfigurationNode(profile, category, factories[idx]));
- }
- nodes = new SystemTeamViewSubSystemConfigurationNode[v.size()];
- for (int idx=0; idx<nodes.length; idx++)
- {
- nodes[idx] = (SystemTeamViewSubSystemConfigurationNode)v.elementAt(idx);
- }
- }
- return nodes;
- }
-
- /**
- * Return true if this profile has children. We return true.
- */
- public boolean hasChildren(Object element)
- {
- return true;
- }
-
- // Property sheet descriptors defining all the properties we expose in the Property Sheet
- /**
- * Return our unique property descriptors, which getPropertyDescriptors adds to the common properties.
- */
- protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- /*
- propertyDescriptorArray = new PropertyDescriptor[1];
- RSEUIPlugin plugin = RSEUIPlugin.getDefault();
- int idx = 0;
- // status
- propertyDescriptorArray[idx] = new PropertyDescriptor(ISystemPropertyConstants.P_IS_ACTIVE,
- SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL);
- propertyDescriptorArray[idx].setDescription(SystemViewResources.RESID_PROPERTY_PROFILESTATUS_DESCRIPTION));
- ++idx;
- */
- }
- return propertyDescriptorArray;
- }
-
- /**
- * Returns the current value for the named property.
- * The parent handles P_TEXT and P_TYPE only, and we augment that here.
- * @param key - the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- public Object internalGetPropertyValue(Object key)
- {
- /*
- if (name.equals(P_IS_ACTIVE))
- {
- boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName());
- if (active)
- return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL);
- else
- return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL);
- }
- else
- */
- return null;
- }
-
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- */
- public String getMementoHandle(Object element)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- return category.getMementoHandle();
- }
- /**
- * Return a short string to uniquely identify the type of resource.
- */
- public String getMementoHandleKey(Object element)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- return category.getProfile().getName() + "." + category.getLabel(); //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryNode.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryNode.java
deleted file mode 100644
index 403a80a21..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryNode.java
+++ /dev/null
@@ -1,152 +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.view.team;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.model.ISystemProfile;
-
-
-/**
- * This class represents a child node under a profile, in the Team view.
- * It represents expandable categories such as "Connections", "Filter Pools",
- * "User Actions" and "Compile Commands".
- */
-public class SystemTeamViewCategoryNode implements IAdaptable
-{
- private String label, mementoHandle, description;
- private ImageDescriptor imageDescriptor;
- private ISystemProfile profile;
- public static final String MEMENTO_CONNECTIONS = "conns"; //$NON-NLS-1$
- public static final String MEMENTO_FILTERPOOLS = "pools"; //$NON-NLS-1$
- public static final String MEMENTO_USERACTIONS = "actions"; //$NON-NLS-1$
- public static final String MEMENTO_COMPILECMDS = "cmds"; //$NON-NLS-1$
- public static final String MEMENTO_TARGETS = "targets"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public SystemTeamViewCategoryNode(ISystemProfile profile)
- {
- super();
- this.profile = profile;
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Return this node's image
- * @return the image to show in the tree, for this node
- */
- public ImageDescriptor getImageDescriptor()
- {
- return imageDescriptor;
- }
-
- /**
- * Return this node's label
- * @return the translated label to show in the tree, for this node
- */
- public String getLabel()
- {
- return label;
- }
-
- /**
- * Set the image for this node
- * @param descriptor ... the image to show in the tree, for this node
- */
- public void setImageDescriptor(ImageDescriptor descriptor)
- {
- imageDescriptor = descriptor;
- }
-
- /**
- * Set the label for this node
- * @param string ... the label to show in the tree, for this node
- */
- public void setLabel(String string)
- {
- label = string;
- }
- /**
- * Convert to string. We call getLabel()
- */
- public String toString()
- {
- return getLabel();
- }
-
- /**
- * @return profile this category is associated with
- */
- public ISystemProfile getProfile()
- {
- return profile;
- }
-
- /**
- * @param profile ... the profile this category is associated with
- */
- public void setProfile(ISystemProfile profile)
- {
- this.profile = profile;
- }
-
- /**
- * @return the untranslated value to store in the memento, to uniquely identify this node
- */
- public String getMementoHandle()
- {
- return mementoHandle;
- }
-
- /**
- * Set the untranslated value to store in the memento, to uniquely identify this node
- * @param string - untranslated value
- */
- public void setMementoHandle(String string)
- {
- mementoHandle = string;
- }
-
- /**
- * Return the description of this node. Shown on status line.
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * Set the description of this node. Shown on status line.
- */
- public void setDescription(String string)
- {
- description = string;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 5c72a51cf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewContentProvider.java
+++ /dev/null
@@ -1,233 +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.view.team;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.core.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;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-
-
-/**
- * Content provider for the RSE's Team view part.
- */
-public class SystemTeamViewContentProvider extends WorkbenchContentProvider
-{
- private SystemTeamViewInputProvider inputProvider = null;
- private Viewer viewer;
- /**
- * Constructor
- */
- public SystemTeamViewContentProvider()
- {
- }
-
- /**
- * Return the children of the given node, when it is expanded
- */
- public Object[] getChildren(Object element)
- {
- Object[] children;
- // for the project root node, return the SystemProfile objects
- if (element instanceof IProject)
- {
- //IProject rseProject = (IProject)element;
- ISystemProfile[] profiles = RSEUIPlugin.getTheSystemRegistry().getAllSystemProfiles();
- children = profiles;
- //return profiles;
- }
- else
- {
- ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
- if (adapter != null)
- children = adapter.getChildren(element);
- else
- children = super.getChildren(element);
- }
- /*
- String name = element.getClass().getName();
- if (element instanceof SystemTeamViewSubSystemConfigurationNode)
- {
- SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode)element;
- name = ssfNode.getParentCategory().getLabel() + "." + ssfNode.getSubSystemConfiguration().getName();
- }
- else if (element instanceof SystemTeamViewCategoryNode)
- {
- SystemTeamViewCategoryNode catNode = (SystemTeamViewCategoryNode)element;
- name = catNode.getLabel();
- }
- System.out.println(" "+Integer.toString(counter-1)+". In getChildren for object '"+name +"', returned "+((children==null)?"null":Integer.toString(children.length)));
- */
- return children;
- }
-
- /**
- * Return the parent of the given node
- */
- public Object getParent(Object element)
- {
- if (element instanceof ISystemProfile)
- return SystemResourceManager.getRemoteSystemsProject();
- ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
- if (adapter != null)
- return adapter.getParent(element);
- return super.getParent(element);
- }
-
- /**
- * Return true if given element has children.
- */
- public boolean hasChildren(Object element)
- {
- boolean children = false;
- if (element instanceof IProject)
- children = (getChildren(element).length > 0);
- else
- {
- ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
- if (adapter != null)
- children = adapter.hasChildren(element);
- else
- children = super.hasChildren(element);
- }
- /* debug info
- String name = element.getClass().getName();
- if (element instanceof SystemTeamViewSubSystemConfigurationNode)
- {
- SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode)element;
- name = ssfNode.getParentCategory().getLabel() + "." + ssfNode.getSubSystemConfiguration().getName();
- }
- else if (element instanceof SystemTeamViewCategoryNode)
- {
- SystemTeamViewCategoryNode catNode = (SystemTeamViewCategoryNode)element;
- name = catNode.getLabel();
- }
- System.out.println(Integer.toString(counter++)+". In hasChildren for object: '"+name+"', returned "+children);
- */
- return children;
- }
-
- /**
- * Return the roots elements to display in the tree initially.
- * For us, this is the RSE singleton project.
- */
- public Object[] getElements(Object element)
- {
- if (inputProvider == null)
- return new Object[0];
- else
- return inputProvider.getRoots(); // returns our single RSE project
- }
-
- /**
- * View is going away: dispose of any local resources
- */
- public void dispose()
- {
- super.dispose();
- // we need to remove this provider from the Workspace
- // ResourceChange listeners list. The parent dispose will
- // not do this for us.
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- }
-
- /**
- * This hooks this content provider as an IResourceChangeListener.<br>
- * We will not use parent code.
- * @see IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- this.viewer = viewer;
-
- // TODO DKM - replace this with appropriate thing
- // super.viewer = viewer;
-
- // TODO DKM - get rid of inputChanged. I put it here temporarily so that there's a way to set super.viewer in 3.0
- super.inputChanged(viewer, oldInput, newInput);
-
- //System.out.println("inside inputChanged. oldInput = " + oldInput + ", newInput = " + newInput);
- if (newInput != null)
- {
- if (newInput instanceof SystemTeamViewInputProvider)
- {
- inputProvider = (SystemTeamViewInputProvider)newInput;
- /*
- getResourceDeltaHandler().registerTreeViewer((TreeViewer)viewer);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this,
- //IResourceChangeEvent.POST_AUTO_BUILD
- //IResourceChangeEvent.PRE_AUTO_BUILD
- IResourceChangeEvent.POST_CHANGE
- // IResourceChangeEvent.PRE_CLOSE
- //| IResourceChangeEvent.PRE_DELETE
- //| IResourceChangeEvent.POST_AUTO_BUILD
- );
- */
- }
- }
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getSystemViewAdapter(Object o)
- {
- ISystemViewElementAdapter adapter = null;
- if (o == null)
- {
- SystemBasePlugin.logWarning("ERROR: null passed to getAdapter in SystemTeamViewContentProvider"); //$NON-NLS-1$
- return null;
- }
- if (!(o instanceof IAdaptable))
- adapter = (ISystemViewElementAdapter)Platform.getAdapterManager().getAdapter(o,ISystemViewElementAdapter.class);
- else
- adapter = (ISystemViewElementAdapter)((IAdaptable)o).getAdapter(ISystemViewElementAdapter.class);
- //if (adapter == null)
- // RSEUIPlugin.logWarning("ADAPTER IS NULL FOR ELEMENT OF TYPE: " + o.getClass().getName());
- if ((adapter!=null) && (viewer != null))
- {
- Shell shell = null;
- if (viewer instanceof ISystemResourceChangeListener)
- shell = ((ISystemResourceChangeListener)viewer).getShell();
- else if (viewer != null)
- shell = viewer.getControl().getShell();
- if (shell != null)
- adapter.setShell(shell);
- adapter.setViewer(viewer);
- if (viewer.getInput() instanceof ISystemViewInputProvider)
- {
- ISystemViewInputProvider inputProvider = (ISystemViewInputProvider)viewer.getInput();
- adapter.setInput(inputProvider);
- }
- }
- else if (viewer == null)
- SystemBasePlugin.logWarning("VIEWER IS NULL FOR SystemTeamViewContentProvider"); //$NON-NLS-1$
- return adapter;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewInputProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewInputProvider.java
deleted file mode 100644
index 7a4390f73..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewInputProvider.java
+++ /dev/null
@@ -1,169 +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.view.team;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.view.ISystemViewInputProvider;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Represents the input to the team viewer.
- * For now, this really doesn't do much since we always list the same thing.
- */
-public class SystemTeamViewInputProvider implements IAdaptable, ISystemViewInputProvider
-{
- private Object[] roots = new Object[1];
- private Shell shell;
- private Viewer viewer;
-
- /**
- * Constructor for SystemTeamViewInputProvider.
- */
- public SystemTeamViewInputProvider()
- {
- super();
- }
-
- /**
- * Return the roots to display in the team viewer.
- * This is simply the RSE singleton project
- */
- public Object[] getRoots()
- {
- if (roots[0] == null)
- roots[0] = SystemResourceManager.getRemoteSystemsProject();
- return roots;
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- // ----------------------------------------
- // Methods from ISystemViewInputProvider...
- // ----------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getSystemViewRoots()
- */
- public Object[] getSystemViewRoots()
- {
- return getRoots();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#hasSystemViewRoots()
- */
- public boolean hasSystemViewRoots()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#showingConnections()
- */
- public boolean showingConnections()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getConnectionChildren(org.eclipse.rse.model.IHost)
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#hasConnectionChildren(org.eclipse.rse.model.IHost)
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setShell(org.eclipse.swt.widgets.Shell)
- */
- public void setShell(Shell shell)
- {
- this.shell = shell;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getShell()
- */
- public Shell getShell()
- {
- return shell;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setViewer(org.eclipse.jface.viewers.Viewer)
- */
- public void setViewer(Viewer viewer)
- {
- this.viewer = viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getViewer()
- */
- public Viewer getViewer()
- {
- return viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#showActionBar()
- */
- public boolean showActionBar()
- {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#showButtonBar()
- */
- public boolean showButtonBar()
- {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#showActions()
- */
- public boolean showActions()
- {
- return false;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index d2d4b1623..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewLabelProvider.java
+++ /dev/null
@@ -1,212 +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.view.team;
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-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.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;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-
-/**
- * Base label provider for System Team View part
- */
-public class SystemTeamViewLabelProvider extends LabelProvider
-{
-
- public static final String Copyright =
- "(C) Copyright IBM Corp. 2002, 2003. All Rights Reserved."; //$NON-NLS-1$
-
- // Used to grab Workbench standard icons.
- private WorkbenchLabelProvider aWorkbenchLabelProvider = new WorkbenchLabelProvider();
- private Viewer viewer;
- /**
- * The cache of images that have been dispensed by this provider.
- * Maps ImageDescriptor->Image.
- */
- private Map imageTable = new Hashtable(40);
-
- /**
- * Constructor
- */
- public SystemTeamViewLabelProvider(Viewer viewer)
- {
- super();
- this.viewer = viewer;
- }
- /**
- * Get the image to display
- */
- public Image getImage(Object element)
- {
- Image image = null;
-
- if (element instanceof ISystemProfile)
- {
- ISystemProfile profile = (ISystemProfile)element;
- if (RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()))
- return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID);
- else
- return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID);
- }
-
- // If we have a project, return the resource project images.
- else if (element instanceof IProject)
- {
- Image projectImage = aWorkbenchLabelProvider.getImage(element);
- return projectImage;
- }
-
- // User system view element adapter
- ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
- if (adapter != null)
- {
- //return adapter.getImage(element);
- ImageDescriptor descriptor = adapter.getImageDescriptor(element);
- if (descriptor != null)
- {
- return getImageFromImageDescriptor(descriptor);
- }
- }
-
- // use Workbench stuff.
- image = aWorkbenchLabelProvider.getImage(element);
- if (image != null)
- {
- return image;
- }
-
- // all failed, use parent code.
- return super.getImage(element);
- }
- /**
- * Turn image descriptor into image
- */
- private Image getImageFromImageDescriptor(ImageDescriptor descriptor)
- {
- if (descriptor == null)
- return null;
- Image image = (Image) imageTable.get(descriptor);
- if (image == null)
- {
- image = descriptor.createImage();
- imageTable.put(descriptor, image);
- }
- return image;
-
- }
-
- /**
- * Get the label to display
- */
- public String getText(Object element)
- {
- ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
- if (adapter != null)
- return adapter.getText(element);
-
- // If we have a project, return the resource project images.
- if (element instanceof IProject)
- {
- return ((IProject)element).getName();
- }
- // use Workbench stuff.
- String text = aWorkbenchLabelProvider.getText(element);
- if (text.length() > 0)
- return text;
-
- // all failed, use parent code.
- return super.getText(element);
- }
-
- /**
- * Dispose of images created here.<br>
- */
- public void dispose()
- {
- // The following we got from WorkbenchLabelProvider
- if (imageTable != null)
- {
- Collection imageValues = imageTable.values();
- if (imageValues!=null)
- {
- Iterator images = imageValues.iterator();
- if (images!=null)
- while (images.hasNext())
- ((Image)images.next()).dispose();
- imageTable = null;
- }
- }
- }
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getSystemViewAdapter(Object o)
- {
- ISystemViewElementAdapter adapter = null;
- if (o == null)
- {
- SystemBasePlugin.logWarning("ERROR: null passed to getAdapter in SystemTeamViewLabelProvider"); //$NON-NLS-1$
- return null;
- }
- if (!(o instanceof IAdaptable))
- adapter = (ISystemViewElementAdapter)Platform.getAdapterManager().getAdapter(o,ISystemViewElementAdapter.class);
- else
- adapter = (ISystemViewElementAdapter)((IAdaptable)o).getAdapter(ISystemViewElementAdapter.class);
- //if (adapter == null)
- // RSEUIPlugin.logWarning("ADAPTER IS NULL FOR ELEMENT OF TYPE: " + o.getClass().getName());
- if ((adapter!=null) && (viewer != null))
- {
- Shell shell = null;
- if (viewer instanceof ISystemResourceChangeListener)
- shell = ((ISystemResourceChangeListener)viewer).getShell();
- else if (viewer != null)
- shell = viewer.getControl().getShell();
- if (shell != null)
- adapter.setShell(shell);
- adapter.setViewer(viewer);
- if (viewer.getInput() instanceof ISystemViewInputProvider)
- {
- ISystemViewInputProvider inputProvider = (ISystemViewInputProvider)viewer.getInput();
- adapter.setInput(inputProvider);
- }
- }
- else if (viewer == null)
- SystemBasePlugin.logWarning("VIEWER IS NULL FOR SystemTeamViewLabelProvider"); //$NON-NLS-1$
- return adapter;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index ed91464a6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeActiveProfileAction.java
+++ /dev/null
@@ -1,91 +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.view.team;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-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;
-
-
-/**
- * The action allows users to activate all selected profiles
- */
-public class SystemTeamViewMakeActiveProfileAction extends SystemBaseAction
-
-{
-
- /**
- * Constructor
- */
- public SystemTeamViewMakeActiveProfileAction(Shell parent)
- {
- super(SystemResources.ACTION_PROFILE_MAKEACTIVE_LABEL,SystemResources.ACTION_PROFILE_MAKEACTIVE_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID),
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
- setHelp(RSEUIPlugin.HELPPREFIX+"ActionMakeActive"); //$NON-NLS-1$
- }
-
- /**
- * Here we decide whether to enable ths action or not. We enable it
- * if every selected object is a profile, and if its not the case
- * that every selected profile is already active.
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- Object currsel = getFirstSelection();
- if (!(currsel instanceof ISystemProfile))
- return false;
- ISystemProfile profile = (ISystemProfile)currsel;
- ISystemProfileManager mgr = SystemProfileManager.getSystemProfileManager();
- boolean allActive = true;
- while (profile != null)
- {
- if (!mgr.isSystemProfileActive(profile.getName()))
- allActive = false;
- currsel = getNextSelection();
- if ((currsel!=null) && !(currsel instanceof ISystemProfile))
- return false;
- profile = (ISystemProfile)currsel;
- }
- return !allActive;
- }
-
- /**
- * This is the method called when the user selects this action.
- * It walks through all the selected profiles and make them all active
- */
- public void run()
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISystemProfile profile = (ISystemProfile)getFirstSelection();
- while (profile != null)
- {
- sr.setSystemProfileActive(profile, true);
- profile = (ISystemProfile)getNextSelection();
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 458d707b7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java
+++ /dev/null
@@ -1,93 +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.view.team;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-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;
-
-
-/**
- * The action allows users to de-activate all selected profiles
- */
-public class SystemTeamViewMakeInActiveProfileAction extends SystemBaseAction
-
-{
-
- /**
- * Constructor
- */
- public SystemTeamViewMakeInActiveProfileAction(Shell parent)
- {
- super(SystemResources.ACTION_PROFILE_MAKEINACTIVE_LABEL,SystemResources.ACTION_PROFILE_MAKEINACTIVE_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEINACTIVE_ID),
- parent);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
- setHelp(RSEUIPlugin.HELPPREFIX+"ActionMakeInactive"); //$NON-NLS-1$
- }
-
- /**
- * Here we decide whether to enable ths action or not. We enable it
- * if every selected object is a profile, and if its not the case
- * that every selected profile is already inactive.
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- Object currsel = getFirstSelection();
- if (!(currsel instanceof ISystemProfile))
- return false;
- ISystemProfile profile = (ISystemProfile)currsel;
- ISystemProfileManager mgr = SystemProfileManager.getSystemProfileManager();
- boolean allInActive = true;
- while (profile != null)
- {
- if (mgr.isSystemProfileActive(profile.getName()))
- allInActive = false;
- currsel = getNextSelection();
- if ((currsel!=null) && !(currsel instanceof ISystemProfile))
- return false;
- profile = (ISystemProfile)currsel;
- }
- return !allInActive;
- }
-
- /**
- * This is the method called when the user selects this action.
- * It walks through all the selected profiles and make them all inactive
- */
- public void run()
- {
- // 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 = RSEUIPlugin.getTheSystemRegistry();
- ISystemProfile profile = (ISystemProfile)getFirstSelection();
- while (profile != null)
- {
- sr.setSystemProfileActive(profile, false);
- profile = (ISystemProfile)getNextSelection();
- }
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 7a60ec65c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewPart.java
+++ /dev/null
@@ -1,1548 +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.view.team;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-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.SystemResourceManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemModelChangeEvent;
-import org.eclipse.rse.core.model.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.ISystemModelChangeListener;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.model.SystemStartHere;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemDeleteTarget;
-import org.eclipse.rse.ui.ISystemRenameTarget;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemCollapseAllAction;
-import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.ui.actions.SystemNewProfileAction;
-import org.eclipse.rse.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.ui.actions.SystemTeamReloadAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.IRSEViewPart;
-import org.eclipse.rse.ui.view.ISystemMementoConstants;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.ui.view.SystemViewPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.part.ISetSelectionTarget;
-import org.eclipse.ui.part.ViewPart;
-import org.osgi.framework.Bundle;
-
-
-/**
- * The viewer and view part for the Team view
- */
-public class SystemTeamViewPart
- extends ViewPart
- implements ISetSelectionTarget, ISelectionProvider, ISystemModelChangeListener,
- ISystemMessageLine, ISelectionChangedListener,
- ISystemDeleteTarget, ISystemRenameTarget, IRSEViewPart
-{
-
- private boolean menuListenerAdded;
- public static final String ID = "org.eclipse.rse.ui.view.teamView"; //$NON-NLS-1$
-
- private SystemTeamViewInputProvider input = null;
- private SystemTeamView treeViewer = null;
- //private FrameList frameList = null;
- private IStatusLineManager statusLine = null;
- private String message, errorMessage;
- private SystemMessage sysErrorMessage;
-
- // selectionChangedListeners
- private ListenerList selectionChangedListeners = new ListenerList(ListenerList.IDENTITY);
-
- // context menu actions for project...
- protected SystemTeamReloadAction reloadRSEAction;
- protected SystemNewProfileAction newProfileAction;
- // common context menu actions...
- protected SystemCommonDeleteAction deleteAction;
- protected PropertyDialogAction propertyDialogAction;
- protected SystemTeamViewRefreshAllAction toolBarRefreshAllAction, menuRefreshAllAction;
- protected SystemCollapseAllAction collapseAllAction;
-
- protected ISystemViewElementAdapter profileAdapter = RSEUIPlugin.getDefault().getSystemViewAdapterFactory().getProfileAdapter();
-
- // remember-state variables...
- private IMemento fMemento;
- // state...
- static final String TAG_RELEASE= "release"; //$NON-NLS-1$
- static final String TAG_SELECTION= "selection"; //$NON-NLS-1$
- static final String TAG_EXPANDED_TO= "expandedTo"; //$NON-NLS-1$
- static final String TAG_EXPANDED= "expanded"; //$NON-NLS-1$
- static final String TAG_ELEMENT= "element"; //$NON-NLS-1$
- static final String TAG_PATH= "path"; //$NON-NLS-1$
- static final String TAG_INPUT= "svInput"; //$NON-NLS-1$
- static final String TAG_VERTICAL_POSITION= "verticalPosition"; //$NON-NLS-1$
- static final String TAG_HORIZONTAL_POSITION= "horizontalPosition"; //$NON-NLS-1$
- static final String MEMENTO_DELIM = "///"; //$NON-NLS-1$
-
- /**
- * Remove a selection change listener
- */
- public void removeSelectionChangedListener(ISelectionChangedListener listener)
- {
- selectionChangedListeners.remove(listener);
- }
- /**
- * Add a selection change listener
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener)
- {
- selectionChangedListeners.add(listener);
- }
-
- /**
- * Returns selection for the tree view
- */
- public ISelection getSelection()
- {
- return treeViewer.getSelection();
- }
-
- public void setSelection(ISelection selection)
- {
- treeViewer.setSelection(selection);
- }
-
- /**
- * Returns the tree viewer selection as a structured selection
- */
- public IStructuredSelection getStructuredSelection()
- {
- // we know we have a ss.
- return (IStructuredSelection) (treeViewer.getSelection());
- }
-
- public TreeViewer getTreeViewer() {
- return treeViewer;
- }
-
- public Viewer getRSEViewer()
- {
- return treeViewer;
- }
-
- /**
- * We are getting focus
- */
- public void setFocus()
- {
- if (treeViewer == null)
- return;
- Tree tree = treeViewer.getTree();
- if (tree != null)
- treeViewer.getTree().setFocus();
- }
-
- /**
- * Create the viewer to go in this view part.
- */
- public void createPartControl(Composite parent)
- {
- treeViewer =
- //new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- new SystemTeamView(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL, this);
- treeViewer.setUseHashlookup(true);
- treeViewer.setContentProvider(new SystemTeamViewContentProvider());
- treeViewer.setLabelProvider(new SystemTeamViewLabelProvider(treeViewer));
-
- treeViewer.setInput(getInput());
-
- addTreeViewerListeners();
-
- // create the frame list.
- //frameList = createFrameList();
-
- // now update title of the view part.
- updateTitle();
-
- // Handle menus:
- // think about menu manager id later.
- MenuManager menuMgr = new MenuManager();
- menuMgr.setRemoveAllWhenShown(true);
- Menu menu = menuMgr.createContextMenu(treeViewer.getTree());
- treeViewer.getTree().setMenu(menu);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- fillContextMenu(manager);
- addMenuListener(manager);
- }
- });
- getSite().registerContextMenu(menuMgr, treeViewer);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- scrubOtherContributions(manager);
- }
- });
- // important to add our listener after registering, so we are called second!
- // This gives us the opportunity to scrub the contributions added by others, to screen out
- // non-team additions.
- /*
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- SystemTeamViewPart.this.fillContextMenu(manager);
- }
- });*/
-
- // Fill the action bars and update the global action handlers'
- // enabled state to match the current selection. We pass the selection
- // based on the iSeries object model. The action group will handle
- // delegating the correct object model to the actions.
- fillActionBars(getViewSite().getActionBars());
- //updateActionBars(getStructuredSelection());
-
- // this is a must here to get Properties Pages to work.
- getSite().setSelectionProvider(treeViewer);
- //getSite().setSelectionProvider(this);
-
- // Update status line.
- statusLine = getViewSite().getActionBars().getStatusLineManager();
- //updateStatusLine(getStructuredSelection());
-
- // we need to refresh viewer when page gets activated for Marker updates
- //pageListener = new CurrentPageListener(getSite().getPage());
- //getSite().getWorkbenchWindow().addPageListener(pageListener);
-
- // update F1 help
- //PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IF1HelpContextID.NAV01);
-
- RSEUIPlugin.getTheSystemRegistry().addSystemModelChangeListener(this);
-
- treeViewer.setAutoExpandLevel(2); // dang, it doesn't work!
-
- // ----------------------
- // Restore previous state
- // ----------------------
- if (fMemento != null)
- restoreState(fMemento);
- fMemento= null;
- }
-
- private void addMenuListener(IMenuManager menu) {
- if (!menuListenerAdded)
- {
- if (menu instanceof MenuManager)
- {
- Menu m = ((MenuManager)menu).getMenu();
- if (m != null)
- {
- menuListenerAdded = true;
- SystemViewMenuListener ml = new SystemViewMenuListener();
- ml.setShowToolTipText(true, this);
- m.addMenuListener(ml);
- }
- }
- }
- }
-
- // -------------------------------------------
- // MEMENTO SUPPORT (SAVING/RESTORING STATE)...
- // -------------------------------------------
- /**
- * Initializes this view with the given view site. A memento is passed to
- * the view which contains a snapshot of the views state from a previous
- * session. Where possible, the view should try to recreate that state
- * within the part controls.
- * <p>
- * The parent's default implementation will ignore the memento and initialize
- * the view in a fresh state. Subclasses may override the implementation to
- * perform any state restoration as needed.
- */
- public void init(IViewSite site,IMemento memento) throws PartInitException
- {
- super.init(site,memento);
- fMemento = memento;
- //System.out.println("INSIDE INIT");
- }
-
- /**
- * Adds the listeners to the tree viewer.
- */
- protected void addTreeViewerListeners()
- {
- treeViewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event) {
- handleDoubleClick(event);
- }
- });
-
- //System.out.println("Add key listener");
-
- treeViewer.getControl().addKeyListener(new KeyAdapter() {
- public void keyReleased(KeyEvent e) {
- handleKeyReleased(e);
- } });
- treeViewer.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleKeyPressed(e);
- } });
-
- treeViewer.addSelectionChangedListener(this);
-
- treeViewer.addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- handleOpen(event);
- }
- });
- }
-
-
- /**
- * Returns the shell to use for opening dialogs.
- * Used in this class, and in the actions.
- */
- public Shell getShell()
- {
- return getViewSite().getShell();
- }
-
- /**
- * Handles double clicks in viewer. It is responsible for expanding
- * and collapsing of folders.
- */
- private void handleDoubleClick(DoubleClickEvent event)
- {
- /*
- IStructuredSelection rseSSel =
- (IStructuredSelection) event.getSelection();
- Object rseObject = rseSSel.getFirstElement();
- if (treeViewer.isExpandable(rseObject))
- {
- treeViewer.setExpandedState(
- rseObject,
- !treeViewer.getExpandedState(rseObject));
- }
- */
- }
-
- /**
- * Handles an open event from the viewer.
- * Opens an editor on the selected file.
- */
- protected void handleOpen(OpenEvent event)
- {
- }
-
- /**
- * Handles key events in viewer.<br>
- * This is needed for various keys (eg: delete key) and for model dump.
- */
- private void handleKeyReleased(KeyEvent event)
- {
- //System.out.println("in handleKeyPressed. keyCode == SWT.F5? " + (event.keyCode==SWT.F5) + ", keyCode: "+event.keyCode);
- if (event.keyCode == SWT.F5)
- {
- getRefreshAllToolbarAction(getStructuredSelection()).run();
- }
- }
- /**
- * Handles key events in viewer.<br>
- * This is needed for various keys (eg: delete key) and for model dump.
- */
- private void handleKeyPressed(KeyEvent event)
- {
- //System.out.println("in handleKeyPressed. keyCode == SWT.F5? " + (event.keyCode==SWT.F5) + ", keyCode: "+event.keyCode);
- IStructuredSelection selection = (IStructuredSelection)getSelection();
- if ((event.character == SWT.DEL) && (event.stateMask == 0) && (selection.size()>0) )
- {
- if (showDelete() && canDelete())
- {
- SystemCommonDeleteAction dltAction = (SystemCommonDeleteAction)getDeleteAction(selection);
- dltAction.setShell(getShell());
- dltAction.setSelection(getSelection());
- dltAction.setViewer(getViewer());
- dltAction.run();
- }
- }
- else if ((event.character == '-') && (event.stateMask == SWT.CTRL) )
- {
- SystemCollapseAllAction collapseAllAction = getCollapseAllAction();
- collapseAllAction.setShell(getShell());
- collapseAllAction.run();
- }
- else if ((event.character == '-') && (selection.size()>0) )
- {
- //System.out.println("Inside Ctrl+- processing");
- treeViewer.collapseSelected();
- }
- else if ((event.character == '+') && (selection.size()>0) )
- {
- //System.out.println("Inside Ctrl++ processing");
- treeViewer.expandSelected();
- }
-
- }
-
- /**
- * Reveal and selects the passed selection in viewer.<br>
- */
- public void selectReveal(ISelection selection)
- {
- if (!(selection instanceof StructuredSelection))
- return;
- StructuredSelection ssel = (StructuredSelection)selection;
- if (!ssel.isEmpty()) {
- // select and reveal the item
- treeViewer.setSelection(ssel, true);
- }
- }
-
- /**
- * Called when the context menu is about to open.
- */
- private void fillContextMenu(IMenuManager menu)
- {
- SystemMenuManager ourMenu = new SystemMenuManager(menu);
-
- // Populate with our stuff...
- IStructuredSelection selection = getStructuredSelection();
- Object firstSelection = selection.getFirstElement();
- createStandardGroups(menu);
- if (firstSelection instanceof IProject)
- {
- // Scrub unrelated menu items
- if (selection.size() == 1)
- fillProjectContextMenu(ourMenu, selection);
- }
- else
- {
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getAdapter(firstSelection, treeViewer);
- if (adapter != null)
- {
- if ((firstSelection instanceof SystemTeamViewSubSystemConfigurationNode) ||
- // FIXME - compile actions separate now (firstSelection instanceof SystemTeamViewCompileTypeNode) ||
- (firstSelection instanceof ISystemProfile))
- {
- addActions(ourMenu, selection);
- }
- else if (firstSelection instanceof ISystemFilterPool)
- {
- //SystemTestingAction testAction = new SystemTestingAction(getShell(), this);
- //testAction.setSelection(getSelection());
- //ourMenu.add(ISystemContextMenuConstants.GROUP_CHANGE, testAction);
- }
- }
- }
- // whale through all actions, updating shell and selection
- IContributionItem[] items = menu.getItems();
- for (int idx=0; idx < items.length; idx++)
- {
- if ((items[idx] instanceof ActionContributionItem) &&
- (((ActionContributionItem)items[idx]).getAction() instanceof ISystemAction))
- {
- ISystemAction item = (ISystemAction) ( ((ActionContributionItem)items[idx]).getAction() );
- try{
- item.setInputs(getShell(), getViewer(), selection);
- } catch (Exception e)
- {
- SystemBasePlugin.logError("Error configuring action " + item.getClass().getName(),e); //$NON-NLS-1$
- System.err.println("Error configuring action " + item.getClass().getName()); //$NON-NLS-1$
- }
- }
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager)items[idx];
- item.setInputs(getShell(), getViewer(), selection);
- }
- }
- PropertyDialogAction pdAction = getPropertyDialogAction(selection);
- if (pdAction.isApplicableForSelection())
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- }
-
- /**
- * Let each object add their own actions...
- * @param menu
- */
- protected void addActions(SystemMenuManager ourMenu, IStructuredSelection selection)
- {
- // ADAPTER SPECIFIC ACTIONS
- Iterator elements= selection.iterator();
- Hashtable adapters = new Hashtable();
- while (elements.hasNext())
- {
- Object element= elements.next();
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getAdapter(element, treeViewer);
- if (adapter != null)
- adapters.put(adapter,element); // want only unique adapters
- }
- Enumeration uniqueAdapters = adapters.keys();
- Shell shell = getShell();
- while (uniqueAdapters.hasMoreElements())
- {
- ISystemViewElementAdapter nextAdapter = (ISystemViewElementAdapter)uniqueAdapters.nextElement();
- nextAdapter.addActions(ourMenu,selection,shell,ISystemContextMenuConstants.GROUP_ADAPTERS);
- //if (nextAdapter instanceof AbstractSystemViewAdapter)
- // ((AbstractSystemViewAdapter)nextAdapter).addCommonRemoteActions(ourMenu,selection,shell,ISystemContextMenuConstants.GROUP_ADAPTERS);
- }
-
- // wail through all actions, updating shell and selection
- IContributionItem[] items = ourMenu.getMenuManager().getItems();
- for (int idx=0; idx < items.length; idx++)
- {
- if ((items[idx] instanceof ActionContributionItem) &&
- (((ActionContributionItem)items[idx]).getAction() instanceof ISystemAction))
- {
- ISystemAction item = (ISystemAction) ( ((ActionContributionItem)items[idx]).getAction() );
- try{
- item.setInputs(getShell(), treeViewer, selection);
- } catch (Exception e)
- {
- SystemBasePlugin.logError("Error configuring action " + item.getClass().getName(),e); //$NON-NLS-1$
- System.out.println("Error configuring action " + item.getClass().getName()); //$NON-NLS-1$
- }
- }
- else if (items[idx] instanceof SystemSubMenuManager)
- {
- SystemSubMenuManager item = (SystemSubMenuManager)items[idx];
- item.setInputs(getShell(), treeViewer, selection);
- }
- }
- }
-
- /**
- * Creates the Systems plugin standard groups in a context menu.
- */
- public void createStandardGroups(IMenuManager menu)
- {
- //if (!menu.isEmpty())
- // return;
- // simply sets partitions in the menu, into which actions can be directed.
- // Each partition can be delimited by a separator (new Separator) or not (new GroupMarker).
- // Deleted groups are not used yet.
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_NEW)); // new->
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_NEW_NONCASCADING)); // new stuff
- /*
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GOTO)); // goto into, go->
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_EXPANDTO)); // expand to->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_EXPAND)); // expand, collapse
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPEN)); // open xxx
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_OPENWITH)); // open with->
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_BROWSEWITH)); // open with->
- */
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_WORKWITH)); // work with->
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_BUILD)); // build, rebuild, refresh
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CHANGE)); // update, change
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORGANIZE)); // rename,move,copy,delete,bookmark,refactoring
- /*
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_REORDER)); // move up, move down
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GENERATE)); // getters/setters, etc. Typically in editor
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_SEARCH)); // search
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_CONNECTION)); // connection-related actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_STARTSERVER)); // Start Remote Server cascading menu
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_IMPORTEXPORT)); // get or put actions
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADAPTERS)); // actions queried from adapters
- */
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_VIEWER_SETUP)); // ? Probably View->by xxx, yyy
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_TEAM)); // Team
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_PROPERTIES)); // Properties
- }
-
-
- /**
- * Fill context menu for IProjects
- */
- private void fillProjectContextMenu(SystemMenuManager menu, IStructuredSelection selection)
- {
- menu.add(ISystemContextMenuConstants.GROUP_BUILD,getRefreshAllMenuAction(selection));
- menu.add(ISystemContextMenuConstants.GROUP_BUILD,getReloadRSEAction(selection));
- menu.add(ISystemContextMenuConstants.GROUP_NEW,getNewProfileAction(selection));
- //menu.add(new Separator(ISystemContextMenuConstants.GROUP_PROPERTIES));
- //menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, getPropertyDialogAction(selection));
- }
-
- /**
- * Get the properties dialog action
- */
- private PropertyDialogAction getPropertyDialogAction(IStructuredSelection selection)
- {
- if (propertyDialogAction == null)
- propertyDialogAction = new PropertyDialogAction(new SameShellProvider(getShell()), treeViewer);
- propertyDialogAction.selectionChanged(selection);
- return propertyDialogAction;
- }
- /**
- * Get the reload RSE action for the context menu
- */
- private SystemTeamReloadAction getReloadRSEAction(IStructuredSelection selection)
- {
- boolean privateProfileStillExists = (SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile() != null);
- if (reloadRSEAction == null)
- reloadRSEAction = new SystemTeamReloadAction(getShell());
- reloadRSEAction.setSelection(selection);
- if (privateProfileStillExists)
- reloadRSEAction.setEnabled(false);
- return reloadRSEAction;
- }
- /**
- * Get the refresh All action for the context menu
- */
- private SystemTeamViewRefreshAllAction getRefreshAllMenuAction(IStructuredSelection selection)
- {
- if (menuRefreshAllAction == null)
- menuRefreshAllAction = new SystemTeamViewRefreshAllAction(getShell(), this);
- menuRefreshAllAction.setSelection(selection);
- return menuRefreshAllAction;
- }
- /**
- * Get the refresh All action for the toolbar
- */
- private SystemTeamViewRefreshAllAction getRefreshAllToolbarAction(IStructuredSelection selection)
- {
- if (toolBarRefreshAllAction == null)
- toolBarRefreshAllAction = new SystemTeamViewRefreshAllAction(getShell(), this);
- toolBarRefreshAllAction.setSelection(selection);
- return toolBarRefreshAllAction;
- }
- /**
- * Get the New Profile actoin
- */
- private SystemNewProfileAction getNewProfileAction(IStructuredSelection selection)
- {
- if (newProfileAction == null)
- {
- newProfileAction = new SystemNewProfileAction(getShell(), false);
- newProfileAction.setViewer(getViewer());
- }
- newProfileAction.setSelection(selection);
- return newProfileAction;
- }
- /**
- * Rather than pre-defined this common action we wait until it is first needed,
- * for performance reasons.
- */
- protected IAction getDeleteAction(IStructuredSelection selection)
- {
- if (deleteAction == null)
- {
- deleteAction = new SystemCommonDeleteAction(getShell(),this);
- deleteAction.setViewer(getViewer());
- deleteAction.setHelp(RSEUIPlugin.HELPPREFIX+"actndlpr"); //$NON-NLS-1$
- deleteAction.setDialogHelp(RSEUIPlugin.HELPPREFIX+"ddltprfl"); //$NON-NLS-1$
- deleteAction.setPromptLabel(SystemResources.RESID_DELETE_PROFILES_PROMPT);
- }
- deleteAction.setSelection(selection);
- return deleteAction;
- }
-
- /**
- * Scrub the popup menu to remove everything but team-related stuff...
- */
- private void scrubOtherContributions(IMenuManager menuMgr) {
- IStructuredSelection selection = getStructuredSelection();
- Object firstSelection = selection.getFirstElement();
- if (firstSelection instanceof IProject) {
- boolean privateProfileStillExists = (SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile() != null);
- IContributionItem items[] = menuMgr.getItems();
- if (items != null) {
- for (int idx = 0; idx < items.length; idx++) {
- IContributionItem item = items[idx];
- if (item.getId() != null) {
- if (!item.getId().equals("team.main") || privateProfileStillExists) menuMgr.remove(item); //$NON-NLS-1$
- }
- }
- }
- }
- }
-
- public void dispose()
- {
- RSEUIPlugin.getTheSystemRegistry().removeSystemModelChangeListener(this);
- super.dispose();
- }
-
- /**
- * Return our viewer.
- */
- public TreeViewer getViewer()
- {
- return treeViewer;
- }
-
- /**
- * Updates the title text and title tool tip.
- * Called whenever the input of the viewer changes.
- */
- public void updateTitle()
- {
-// Object input = getTreeViewer().getInput();
-// String viewName = getConfigurationElement().getAttribute("name");
- setPartName(getTitle());
- setTitleToolTip(""); //$NON-NLS-1$
- }
-
- /**
- * Determines the input for the viewer. This is needed for the "Open
- * in New Window" action that sets the input to the workbench page,
- * and expects the viewers to use it.
- */
- protected IAdaptable getInput()
- {
- if (input == null)
- input = new SystemTeamViewInputProvider();
- return input;
- }
-
- /**
- * Adds the actions in this group and its subgroups to the action bars.
- */
- public void fillActionBars(IActionBars actionBars)
- {
- IStructuredSelection selection = getStructuredSelection();
- actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), getPropertyDialogAction(selection));
- SystemTeamViewRefreshAllAction refreshAllAction = getRefreshAllToolbarAction(selection);
- actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAllAction);
-
- actionBars.getToolBarManager().add(getNewProfileAction(selection));
- // now add the global Refresh action in the view tool bar.
- actionBars.getToolBarManager().add(refreshAllAction);
-
- actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getDeleteAction(selection));
-
- // add rename action
- SystemCommonRenameAction renameAction = new SystemCommonRenameAction(getShell(), this);
- renameAction.setViewer(getViewer());
- // renameAction.setSelection(selection);
- actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(), renameAction);
-
- SystemCommonSelectAllAction selAllAction = new SystemCommonSelectAllAction(getShell(), treeViewer, treeViewer);
- actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), selAllAction);
-
- actionBars.getToolBarManager().add(new Separator());
- actionBars.getToolBarManager().add(getCollapseAllAction());
-
- statusLine = actionBars.getStatusLineManager();
- }
-
- /**
- * Return the collapseAll action
- */
- protected SystemCollapseAllAction getCollapseAllAction()
- {
- if (collapseAllAction == null)
- {
- collapseAllAction = new SystemCollapseAllAction(getShell());
- collapseAllAction.setSelectionProvider(treeViewer);
- collapseAllAction.setViewer(treeViewer);
- collapseAllAction.setImageDescriptor(getNavigatorImageDescriptor("elcl16/collapseall.gif")); //$NON-NLS-1$
- // DKM - changed this icon from clcl16 since navigator no longer has it
- collapseAllAction.setHoverImageDescriptor(getNavigatorImageDescriptor("elcl16/collapseall.gif")); //$NON-NLS-1$
- }
- return collapseAllAction;
- }
-
- /**
- * Updates the actions which were added to the action bars.
- */
- public void updateActionBars(IStructuredSelection selection)
- {
- getPropertyDialogAction(selection);
- getRefreshAllToolbarAction(selection);
- getDeleteAction(selection);
- }
-
- /**
- * This is the method in your class that will be called when a resource in the
- * RSE model changes. You will be called after the resource is changed.
- * @see ISystemModelChangeEvent
- */
- public void systemModelResourceChanged(ISystemModelChangeEvent event)
- {
- int resourceType = event.getResourceType();
- boolean testMode = false;
- if ((event.getEventType() == ISystemModelChangeEvents.SYSTEM_RESOURCE_ALL_RELOADED) ||
- (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE))
- {
- getTreeViewer().refresh();
- treeViewer.updatePropertySheet();
- if (testMode && (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE))
- System.out.println("Profile change event of type: " + event.getEventType()); //$NON-NLS-1$
- }
- else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER)
- {
- if (testMode)
- System.out.println("Filter change event of type: " + event.getEventType()); //$NON-NLS-1$
- ISystemFilter filter = (ISystemFilter)event.getResource();
- ISystemFilterPool pool = filter.getParentFilterPool();
- if (pool == null) // maybe for transient filters?
- return;
- if (isModelObjectExpanded(pool)) // if parent is expanded...
- treeViewer.refresh(pool); // refresh the parent.
- }
- else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL)
- {
- if (testMode)
- System.out.println("Filter Pool change event of type: " + event.getEventType()); //$NON-NLS-1$
- ISystemFilterPool pool = (ISystemFilterPool)event.getResource();
- ISystemProfile profile = ((ISubSystemConfiguration)pool.getProvider()).getSystemProfile(pool);
- TreeItem filterCategoryItem = getCategoryNodeTreeItem(profile, SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS);
- if ((filterCategoryItem!=null) && filterCategoryItem.getExpanded())
- treeViewer.refresh(filterCategoryItem.getData());
- }
- else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_CONNECTION)
- {
- if (testMode)
- System.out.println("Connection change event of type: " + event.getEventType()); //$NON-NLS-1$
- IHost conn = (IHost)event.getResource();
- ISystemProfile profile = conn.getSystemProfile();
-
- TreeItem connCategoryItem = getCategoryNodeTreeItem(profile, SystemTeamViewCategoryNode.MEMENTO_CONNECTIONS);
- if ((connCategoryItem != null) && connCategoryItem.getExpanded())
- {
- treeViewer.refresh(connCategoryItem.getData());
- }
- }
- else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM)
- {
- if (testMode)
- System.out.println("SubSystem change event of type: " + event.getEventType()); //$NON-NLS-1$
- }
-
-// FIXME - user actions separate now
-// else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION)
-// {
-// if (testMode)
-// System.out.println("User Action change event of type: " + event.getEventType());
-// SystemUDActionElement action = (SystemUDActionElement)event.getResource();
-// ISystemProfile profile = action.getProfile();
-// TreeItem actionCategoryItem = getCategoryNodeTreeItem(profile, SystemTeamViewCategoryNode.MEMENTO_USERACTIONS);
-// if ((actionCategoryItem!=null) && actionCategoryItem.getExpanded())
-// {
-// // note if the updated action is currently selected, we lose that selection because
-// // when we save actions, their wrapper objects are recreated (yes, its bad but who
-// // has time to fix it?) and so the binary address of the old no longer exists.
-// // To circumvent we need to detect the situation and reselect the new one. But how to tell
-// // if one action is equal to another? Compare their xml element nodes.
-// ISelection s = getSelection();
-// boolean reselect = false;
-// if (s instanceof StructuredSelection)
-// {
-// Object firstSel = ((StructuredSelection)s).getFirstElement();
-// if (firstSel instanceof SystemUDActionElement)
-// if ( ((SystemUDActionElement)firstSel).getElement() ==
-// action.getElement() )
-// reselect = true;
-// }
-// // the problem we have here is refresh will cause yet another fresh set of SystemUDActionElement objects
-// // to be created! We really should fix that.
-//
-// //if (event.getEventType() != ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED)
-// treeViewer.refresh(actionCategoryItem.getData());
-// // I tried this and update didn't update the label, damn.
-// //else
-// //{
-// //String[] allProps = {IBasicPropertyConstants.P_TEXT,IBasicPropertyConstants.P_IMAGE};
-// //treeViewer.update(actionCategoryItem.getData(), allProps);
-// //}
-// if (reselect)
-// treeViewer.setSelection(new StructuredSelection(action));
-// }
-// }
- else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE)
- {
- if (testMode)
- System.out.println("Named Type change event of type: " + event.getEventType()); //$NON-NLS-1$
- }
-
-// compile actions separate now
-// else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD)
-// {
-// if (testMode)
-// System.out.println("Compile Command change event of type: " + event.getEventType());
-// SystemCompileCommand cmd = (SystemCompileCommand)event.getResource();
-// ISystemProfile profile = cmd.getParentType().getParentProfile().getProfile();
-// TreeItem actionCategoryItem = getCategoryNodeTreeItem(profile, SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS);
-// if ((actionCategoryItem!=null) && actionCategoryItem.getExpanded())
-// treeViewer.refresh(actionCategoryItem.getData());
-// }
- }
- /**
- * Return true if the given profile is expanded
- */
- private boolean isModelObjectExpanded(Object object)
- {
- TreeItem item = treeViewer.findTreeItem(object);
- return ((item != null) && item.getExpanded());
- }
- /**
- * Find a category node of a particular type, under the node of a given profile
- */
- private TreeItem getCategoryNodeTreeItem(ISystemProfile profile, String mementoKey)
- {
- TreeItem item = treeViewer.findTreeItem(profile);
- if ((item==null) || !item.getExpanded() )
- return null;
-
- TreeItem[] childItems = item.getItems();
- item = null;
- if (childItems != null)
- {
- boolean found = false;
- for (int idx=0; !found && (idx<childItems.length); idx++)
- {
- if (childItems[idx].getData() instanceof SystemTeamViewCategoryNode)
- {
- SystemTeamViewCategoryNode node = (SystemTeamViewCategoryNode)childItems[idx].getData();
- if ((node!=null) && node.getMementoHandle().equals(mementoKey))
- {
- found = true;
- item = childItems[idx];
- }
- }
- }
- }
- return item;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.ISystemDeleteTarget#showDelete()
- */
- public boolean showDelete()
- {
- return true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.ISystemDeleteTarget#canDelete()
- */
- public boolean canDelete()
- {
- boolean ok = true;
- IStructuredSelection selection= getStructuredSelection();
- Iterator elements= selection.iterator();
- ISystemProfileManager mgr = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager();
- int nbrActiveProfiles = mgr.getActiveSystemProfiles().length;
- int activeCount = 0;
- while (ok && elements.hasNext())
- {
- Object currObj = elements.next();
- if (!(currObj instanceof ISystemProfile))
- {
- ok = false;
- //System.out.println("selection: "+currObj.getClass().getName());
- }
- else if (!mgr.isSystemProfileActive(((ISystemProfile)currObj).getName()))
- activeCount++;
- }
- if (ok && (activeCount == nbrActiveProfiles)) // attempting to delete all active profiles?
- ok = false; // don't allow that!
- //System.out.println("Inside canDelete: "+ok);
- return ok;
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.ISystemDeleteTarget#doDelete()
- */
- public boolean doDelete(IProgressMonitor monitor)
- {
- boolean ok = true;
- IStructuredSelection selection= getStructuredSelection();
- Iterator elements= selection.iterator();
- Object currObj = null;
- while (ok && elements.hasNext())
- {
- currObj = elements.next();
- try {
- ok = profileAdapter.doDelete(getShell(), currObj, monitor);
- } catch (Exception exc)
- {
- String msg = "Exception deleting profile "+((ISystemProfile)currObj).getName(); //$NON-NLS-1$
- SystemBasePlugin.logError(msg, exc);
- SystemMessageDialog.displayExceptionMessage(getShell(),exc);
- ok = false;
- }
- }
- return ok;
- }
-
- // ------------------------------
- // ISystemRenameTarget methods...
- // ------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.ISystemRenameTarget#showRename()
- */
- public boolean showRename()
- {
- return true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.ISystemRenameTarget#canRename()
- */
- public boolean canRename()
- {
- boolean ok = true;
- IStructuredSelection selection= getStructuredSelection();
- Iterator elements= selection.iterator();
- while (ok && elements.hasNext())
- {
- Object currObj = elements.next();
- if (!(currObj instanceof ISystemProfile))
- ok = false;
- }
- //System.out.println("Inside canRename: "+ok);
- return ok;
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.ui.ISystemRenameTarget#doRename(java.lang.String[])
- */
- public boolean doRename(String[] newNames)
- {
- boolean ok = true;
- IStructuredSelection selection= getStructuredSelection();
- Iterator elements= selection.iterator();
- Object currObj = null;
- int idx = 0;
- while (ok && elements.hasNext())
- {
- currObj = elements.next();
- try {
- profileAdapter.doRename(getShell(), currObj, newNames[idx++]);
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayMessage(getShell(), exc);
- ok = false;
- }
- catch (Exception exc)
- {
- String msg = "Exception renaming profile "; //$NON-NLS-1$
- SystemBasePlugin.logError(msg, exc);
- //System.out.println(msg + exc.getMessage() + ": " + exc.getClass().getName());
- SystemMessageDialog.displayExceptionMessage(getShell(),exc);
- ok = false;
- }
- }
- return ok;
- }
-
- /**
- * Returns the image descriptor with the given relative path.
- */
- protected ImageDescriptor getNavigatorImageDescriptor(String relativePath) {
- String iconPath = "icons/full/"; //$NON-NLS-1$
- try {
- Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
- URL installURL = bundle.getEntry(""); //$NON-NLS-1$
- URL url = new URL(installURL, iconPath + relativePath);
- return ImageDescriptor.createFromURL(url);
- } catch (MalformedURLException e) {
- // should not happen
- return ImageDescriptor.getMissingImageDescriptor();
- }
- }
-
- // ----------------
- // MEMENTO STUFF...
- // ----------------
-
- /**
- * Method declared on IViewPart.
- */
- public void saveState(IMemento memento)
- {
- if (treeViewer == null)
- {
- // part has not been created
- if (fMemento != null) //Keep the old state;
- memento.putMemento(fMemento);
- return;
- }
-
- // We record the current release for future in case anything significant changes from release to release
- memento.putString(TAG_RELEASE, SystemResources.CURRENT_RELEASE_NAME);
-
- /*
- String inputMemento = memento.getString("factoryID"); // see IWorkbenchWindow ... this is only clue I can figure out!
- if (inputMemento != null)
- {
- saveInputState(memento);
- return;
- }*/
-
- Tree tree = treeViewer.getTree();
-
- // SAVE EXPANSION STATE
- Object expandedElements[]= treeViewer.getVisibleExpandedElements();
- if ( (expandedElements!=null) && (expandedElements.length > 0) )
- {
- IMemento expandedMem= memento.createChild(TAG_EXPANDED);
- for (int i= 0; i < expandedElements.length; i++)
- {
- Object o = expandedElements[i];
- String mementoHandle = getMementoHandle(o);
- if (mementoHandle != null)
- {
- IMemento elementMem= expandedMem.createChild(TAG_ELEMENT);
- elementMem.putString(TAG_PATH, getMementoHandle(o));
- //System.out.println("Added to saved expansion list: " + getMementoHandle(o));
- }
- }
- }
-
- // SAVE SELECTION STATE
- Object elements[]= ((IStructuredSelection) treeViewer.getSelection()).toArray();
- if ( (elements!=null) && (elements.length > 0) )
- {
- IMemento selectionMem= memento.createChild(TAG_SELECTION);
- for (int i= 0; i < elements.length; i++)
- {
- Object o= elements[i];
- String mementoHandle = getMementoHandle(o);
- if (mementoHandle != null)
- {
- IMemento elementMem= selectionMem.createChild(TAG_ELEMENT);
- elementMem.putString(TAG_PATH, getMementoHandle(o));
- }
- }
- }
-
- //save vertical position
- ScrollBar bar= tree.getVerticalBar();
- int position= bar != null ? bar.getSelection() : 0;
- memento.putString(TAG_VERTICAL_POSITION, String.valueOf(position));
- //save horizontal position
- bar= tree.getHorizontalBar();
- position= bar != null ? bar.getSelection() : 0;
- memento.putString(TAG_HORIZONTAL_POSITION, String.valueOf(position));
-
- }
- /**
- * Return the memento handle key plus the memento handle for
- * each part leading up to the current object.
- */
- protected String getMementoHandle(Object o)
- {
- String mementoKey = internalGetMementoHandleKey(o);
- if (mementoKey == null)
- return null;
- StringBuffer idBuffer = new StringBuffer(mementoKey);
- Object[] elementNodes = treeViewer.getElementNodes(o);
- if (elementNodes != null)
- {
- for (int idx=elementNodes.length-1; idx>=0; idx--)
- {
- o = elementNodes[idx];
- idBuffer.append(MEMENTO_DELIM+internalGetMementoHandle(o));
- }
- }
- //System.out.println("MEMENTO HANDLE: " + idBuffer.toString());
- return idBuffer.toString();
- }
- /**
- * Encapsulate code to look at object class type and determine what to return for
- * a memento handle key
- */
- protected String internalGetMementoHandleKey(Object o)
- {
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getAdapter(o, treeViewer);
- String handle = null;
- if (adapter != null)
- handle = adapter.getMementoHandleKey(o);
- else if (o instanceof IResource)
- {
- if (o instanceof IProject)
- handle = "Project"; //$NON-NLS-1$
- else if (o instanceof IFolder)
- handle = "Folder"; //$NON-NLS-1$
- else
- handle = "File"; //$NON-NLS-1$
- }
- else if (o instanceof ISystemProfile)
- handle = "Profile"; //$NON-NLS-1$
- else if (o instanceof SystemTeamViewCategoryNode)
- //handle = "Category";
- handle = null; // decided not to re-expand past profiles
-
- return handle;
- }
- /**
- * Encapsulate code to look at object class type and determine what to return for
- * a memento handle
- */
- protected String internalGetMementoHandle(Object o)
- {
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getAdapter(o, treeViewer);
- String handle = null;
- if (adapter != null)
- handle = adapter.getMementoHandle(o);
- else if (o instanceof IResource)
- handle = ((IResource)o).getName();
- else if (o instanceof ISystemProfile)
- handle = ((ISystemProfile)o).getName();
- else if (o instanceof SystemTeamViewCategoryNode)
- handle = ((SystemTeamViewCategoryNode)o).getMementoHandle();
- return handle;
- }
-
- /**
- * Our own method for restoring state
- */
- void restoreState(IMemento memento)
- {
- RestoreStateRunnable restoreAction = new RestoreStateRunnable(memento);
- Display.getDefault().syncExec(restoreAction);
- }
-
- /**
- * Inner class for running restore-state in a thread
- */
- public class RestoreStateRunnable implements Runnable
- {
- private IMemento _memento;
- public RestoreStateRunnable(IMemento memento)
- {
- _memento = memento;
- }
-
- public void run()
- {
- IMemento memento = _memento;
- IMemento childMem = null;
-
- // restore expansion state
- childMem = memento.getChild(TAG_EXPANDED);
- if (childMem != null)
- {
- ArrayList elements = new ArrayList();
- IMemento[] elementMem = childMem.getChildren(TAG_ELEMENT);
- for (int i = 0; i < elementMem.length; i++)
- {
- Object element = getObjectFromMemento(elementMem[i].getString(TAG_PATH));
- if (element != null)
- elements.add(element);
- }
- // expand objects...
- treeViewer.setExpandedElements(elements.toArray());
- }
-
- // restoreSelection
- childMem = memento.getChild(TAG_SELECTION);
- if (childMem != null)
- {
- ArrayList list = new ArrayList();
- IMemento[] elementMem = childMem.getChildren(TAG_ELEMENT);
- for (int i = 0; i < elementMem.length; i++)
- {
- Object element = getObjectFromMemento(elementMem[i].getString(TAG_PATH));
- if (element != null)
- list.add(element);
- }
- treeViewer.setSelection(new StructuredSelection(list));
- }
-
- Tree tree = treeViewer.getTree();
- //restore vertical position
- ScrollBar bar = tree.getVerticalBar();
- if (bar != null)
- {
- try
- {
- String posStr = memento.getString(TAG_VERTICAL_POSITION);
- if (posStr != null)
- {
- int position;
- position = new Integer(posStr).intValue();
- bar.setSelection(position);
- }
- }
- catch (NumberFormatException e)
- {
- }
- }
- //restore vertical position
- bar = tree.getHorizontalBar();
- if (bar != null)
- {
- try
- {
- String posStr = memento.getString(TAG_HORIZONTAL_POSITION);
- if (posStr != null)
- {
- int position;
- position = new Integer(posStr).intValue();
- bar.setSelection(position);
- }
- }
- catch (NumberFormatException e)
- {
- }
- }
- }
- }
- /**
- * Private method to deconstruct an expanded/selected memento into an actual object
- */
- protected Object getObjectFromMemento(String memento)
- {
- if (memento == null)
- return null;
-
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISystemProfile profile = null;
- IProject project = null;
- SystemTeamViewCategoryNode category = null;
- String elementType = ""; //$NON-NLS-1$
-
- //System.out.println("PARSING MEMENTO: " + memento);
-
- Vector v = SystemViewPart.tokenize(memento, MEMENTO_DELIM);
-
- // 0. element type
- // 1. RSE Project
- // 2. Profiles
- // 3. Categories
-
- for (int idx=0; idx<v.size(); idx++)
- {
- String token = (String)v.elementAt(idx);
- switch (idx)
- {
- // type of element
- case 0: elementType = token; break;
- // profile
- case 1:
- project = SystemResourceManager.getRemoteSystemsProject();
- break;
- case 2:
- profile = sr.getSystemProfile(token);
- break;
- case 3:
- SystemTeamViewProfileAdapter profileAdapter = RSEUIPlugin.getDefault().getSystemViewAdapterFactory().getProfileAdapter();
- category = profileAdapter.restoreCategory(profile, token);
- //System.out.println("Restored category: "+(category==null?"null":category.getLabel()));
- break;
- }
- }
-
- if (elementType.equals("Project")) //$NON-NLS-1$
- {
- //System.out.println("...PARSED INTO A PROJECT: " + project.getName());
- return project;
- }
- else if (elementType.equals(ISystemMementoConstants.MEMENTO_KEY_PROFILE))
- {
- //System.out.println("...PARSED INTO A PROFILE: " + profile.getName());
- return profile;
- }
- if (elementType.equals("Category")) //$NON-NLS-1$
- {
- //System.out.println("...PARSED INTO A CATEGORY: " + category.getLabel());
- return category;
- }
- else
- {
- //System.out.println("...UNKNOWN MEMENTO ");
- }
- return null;
- }
-
- // -----------------------------
- // ISelectionListener methods...
- // -----------------------------
-
- /**
- * Handles selection changed in viewer.
- * Updates global actions.
- * Links to editor (if option enabled)
- */
- public void selectionChanged(SelectionChangedEvent event)
- {
- IStructuredSelection sel = (IStructuredSelection)event.getSelection();
- updateActionBars(sel);
- Object firstSelection = sel.getFirstElement();
- if (firstSelection == null)
- return;
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getAdapter(firstSelection);
- if (adapter != null)
- {
- setMessage(adapter.getStatusLineText(firstSelection));
- //if ((mouseButtonPressed == LEFT_BUTTON) && (!expandingTreeOnly)) //d40615
- //adapter.selectionChanged(firstSelection); //d40615
- }
- else
- setMessage(internalGetMementoHandle(firstSelection));
-
- if (newProfileAction != null)
- newProfileAction.refreshEnablement(); // not selection related, but we have no other trigger
- }
-
- // -------------------------------
- // ISystemMessageLine interface...
- // -------------------------------
- /**
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- errorMessage = null;
- sysErrorMessage = null;
- if (statusLine != null)
- statusLine.setErrorMessage(errorMessage);
- }
- /**
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- message = null;
- if (statusLine != null)
- statusLine.setMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public String getErrorMessage()
- {
- return errorMessage;
- }
- /**
- * Get the currently displayed message.
- * @return The message. If no message is displayed <code>null<code> is returned.
- */
- public String getMessage()
- {
- return message;
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- this.errorMessage = message;
- if (statusLine != null)
- statusLine.setErrorMessage(message);
- }
- /**
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- return sysErrorMessage;
- }
-
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- sysErrorMessage = message;
- setErrorMessage(message.getLevelOneText());
- }
- /**
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(Throwable exc)
- {
- setErrorMessage(exc.getMessage());
- }
-
- /**
- * Set the message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- this.message = message;
- if (statusLine != null)
- statusLine.setMessage(message);
- }
- /**
- *If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- setMessage(message.getLevelOneText());
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 17314185e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewProfileAdapter.java
+++ /dev/null
@@ -1,411 +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.view.team;
-import java.util.Hashtable;
-
-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.SystemResourceManager;
-import org.eclipse.rse.core.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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.ui.actions.SystemProfileNameCopyAction;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorProfileName;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemMementoConstants;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Adapter for displaying and processing SystemProfile objects in tree views, such as
- * the Team view.
- */
-public class SystemTeamViewProfileAdapter
- extends AbstractSystemViewAdapter
- implements ISystemViewElementAdapter, ISystemUserIdConstants
-{
-
- private boolean actionsCreated = false;
- private Hashtable categoriesByProfile = new Hashtable();
- // context menu actions for profiles...
- protected SystemTeamViewActiveProfileAction activeProfileAction;
- protected SystemTeamViewMakeActiveProfileAction makeProfileActiveAction;
- protected SystemTeamViewMakeInActiveProfileAction makeProfileInactiveAction;
- protected SystemCommonRenameAction renameAction;
- protected SystemCommonDeleteAction deleteAction;
- protected SystemProfileNameCopyAction copyProfileAction;
-
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
-
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given element.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- if (!actionsCreated)
- createActions();
-
- boolean privateProfileStillExists = (SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile() != null);
- copyProfileAction.setProfile((ISystemProfile)selection.getFirstElement());
-
- if (activeProfileAction != null)
- {
- activeProfileAction.setEnabled(!privateProfileStillExists);
- menu.add(ISystemContextMenuConstants.GROUP_CHANGE,activeProfileAction);
- }
- else
- {
- menu.add(ISystemContextMenuConstants.GROUP_CHANGE,makeProfileActiveAction);
- menu.add(ISystemContextMenuConstants.GROUP_CHANGE,makeProfileInactiveAction);
- }
- menu.add(ISystemContextMenuConstants.GROUP_REORGANIZE,copyProfileAction);
- menu.add(ISystemContextMenuConstants.GROUP_REORGANIZE,deleteAction);
- menu.add(ISystemContextMenuConstants.GROUP_REORGANIZE,renameAction);
- }
- private void createActions()
- {
- // activate profile action...
- // TODO: Delete the activeProfileAction logic when we have another mri rev, and can use the new actions.
- if (SystemResources.ACTION_PROFILE_MAKEACTIVE_LABEL.equals("test")) //$NON-NLS-1$
- activeProfileAction = new SystemTeamViewActiveProfileAction(getShell());
- else
- {
- makeProfileActiveAction = new SystemTeamViewMakeActiveProfileAction(getShell());
- makeProfileInactiveAction = new SystemTeamViewMakeInActiveProfileAction(getShell());
- }
-
- copyProfileAction = new SystemProfileNameCopyAction(getShell());
-
- deleteAction = new SystemCommonDeleteAction(getShell(),getTeamViewPart());
- deleteAction.setHelp(RSEUIPlugin.HELPPREFIX+"actndlpr"); //$NON-NLS-1$
- deleteAction.setDialogHelp(RSEUIPlugin.HELPPREFIX+"ddltprfl"); //$NON-NLS-1$
- deleteAction.setPromptLabel(SystemResources.RESID_DELETE_PROFILES_PROMPT);
-
- renameAction = new SystemCommonRenameAction(getShell(),getTeamViewPart());
- renameAction.setHelp(RSEUIPlugin.HELPPREFIX+"actnrnpr"); //$NON-NLS-1$
- renameAction.setDialogSingleSelectionHelp(RSEUIPlugin.HELPPREFIX+"drnsprfl"); //$NON-NLS-1$
- renameAction.setDialogMultiSelectionHelp(RSEUIPlugin.HELPPREFIX+"drnmprfl"); //$NON-NLS-1$
- renameAction.setSingleSelectPromptLabel(SystemResources.RESID_SIMPLE_RENAME_PROFILE_PROMPT_LABEL,
- SystemResources.RESID_SIMPLE_RENAME_PROFILE_PROMPT_TIP);
- renameAction.setMultiSelectVerbage(SystemResources.RESID_MULTI_RENAME_PROFILE_VERBAGE);
-
- actionsCreated = true;
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- ISystemProfile profile = (ISystemProfile)element;
- if (RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()))
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID);
- else
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID);
- }
- /**
- * Return the team view part
- */
- private SystemTeamViewPart getTeamViewPart()
- {
- SystemTeamView viewer = (SystemTeamView)getViewer();
- //System.out.println("Team view part set? " + (viewer != null));
- return viewer.getTeamViewPart();
- }
-
- /**
- * Return the label for this object
- */
- public String getText(Object element)
- {
- return ((ISystemProfile)element).getName();
- }
-
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- return ((ISystemProfile)element).getName();
- }
-
- /**
- * Return the absolute name, versus just display name, of this object
- */
- public String getAbsoluteName(Object element)
- {
- return ((ISystemProfile)element).getName();
- }
-
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- return SystemViewResources.RESID_PROPERTY_PROFILE_TYPE_VALUE;
- }
-
- /**
- * Return the string to display in the status line when the given object is selected.
- * We return:
- * Connection: name - Host name: hostName - Description: description
- */
- public String getStatusLineText(Object element)
- {
- ISystemProfile profile = (ISystemProfile)element;
- boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName());
- return getType(element) + ": " + profile.getName() + ", " + //$NON-NLS-1$ //$NON-NLS-2$
- SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL + ": " + //$NON-NLS-1$
- (active ? SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL : SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL);
- }
-
- /**
- * Return the parent of this object. We return the RemoteSystemsConnections project
- */
- public Object getParent(Object element)
- {
- return SystemResourceManager.getRemoteSystemsProject();
- }
-
- /**
- * Return the children of this profile.
- */
- public Object[] getChildren(Object element)
- {
- ISystemProfile profile = (ISystemProfile)element;
- return getCategoryChildren(profile);
- }
-
- /**
- * Given a profile, return all the category children for it. If this child objects have yet to be created,
- * create them now.
- */
- public SystemTeamViewCategoryNode[] getCategoryChildren(ISystemProfile profile)
- {
- SystemTeamViewCategoryNode[] children = (SystemTeamViewCategoryNode[])categoriesByProfile.get(profile);
- if (children == null)
- {
- children = new SystemTeamViewCategoryNode[2]; //5];
- for (int idx=0; idx<children.length; idx++)
- 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(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(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(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(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(RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_TARGET_ID));
- children[4].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_TARGETS);
- */
-
- categoriesByProfile.put(profile, children);
- }
- return children;
- }
- /**
- * Given a profile and memento handle, return the appropriate category node. This is used when
- * restoring the expansion and selection state of the team view.
- */
- public SystemTeamViewCategoryNode restoreCategory(ISystemProfile profile, String mementoHandle)
- {
- SystemTeamViewCategoryNode[] children = getCategoryChildren(profile);
- SystemTeamViewCategoryNode category = null;
- for (int idx=0; (category==null) && (idx<2); idx++)
- {
- if (children[idx].getMementoHandle().equals(mementoHandle))
- category = children[idx];
- }
- return category;
- }
-
- /**
- * Return true if this profile has children. We return true.
- */
- public boolean hasChildren(Object element)
- {
- return true;
- }
-
- // Property sheet descriptors defining all the properties we expose in the Property Sheet
- /**
- * Return our unique property descriptors, which getPropertyDescriptors adds to the common properties.
- */
- protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- propertyDescriptorArray = new PropertyDescriptor[1];
- int idx = 0;
- // status
- propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_IS_ACTIVE,SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL, SystemViewResources.RESID_PROPERTY_PROFILESTATUS_TOOLTIP);
- }
- return propertyDescriptorArray;
- }
-
- /**
- * Returns the current value for the named property.
- * The parent handles P_TEXT and P_TYPE only, and we augment that here.
- * @param key - the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- public Object internalGetPropertyValue(Object key)
- {
- String name = (String)key;
- ISystemProfile profile = (ISystemProfile)propertySourceInput;
-
- if (name.equals(P_IS_ACTIVE))
- {
- boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName());
- if (active)
- return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL;
- else
- return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL;
- }
- else
- return null;
- }
-
-
- // FOR COMMON DELETE ACTIONS
- /**
- * Return true if this object is deletable by the user. If so, when selected,
- * the Edit->Delete menu item will be enabled.
- */
- public boolean canDelete(Object element)
- {
- boolean ok = true;
- if (!(element instanceof ISystemProfile))
- {
- ok = false;
- //System.out.println("selection: "+currObj.getClass().getName());
- }
- return ok;
- }
- /**
- * Perform the delete action.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception
- {
- boolean ok = true;
- RSEUIPlugin.getTheSystemRegistry().deleteSystemProfile((ISystemProfile)element);
- return ok;
- }
-
- // FOR COMMON RENAME ACTIONS
- /**
- * Return true if this object is renamable by the user. If so, when selected,
- * the Rename popup menu item will be enabled.
- */
- public boolean canRename(Object element)
- {
- boolean ok = true;
- if (!(element instanceof ISystemProfile))
- ok = false;
- return ok;
- }
- /**
- * Perform the rename action.
- */
- public boolean doRename(Shell shell, Object element, String newName) throws Exception
- {
- boolean ok = true;
- RSEUIPlugin.getTheSystemRegistry().renameSystemProfile((ISystemProfile)element, newName);
- return ok;
- }
- /**
- * Return a validator for verifying the new name is correct.
- */
- public ISystemValidator getNameValidator(Object element)
- {
- return new ValidatorProfileName(RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNamesVector());
- }
- /**
- * Parent override.
- * <p>
- * Form and return a new canonical (unique) name for this object, given a candidate for the new
- * name. This is called by the generic multi-rename dialog to test that all new names are unique.
- * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
- * <p>
- * Returns profile.connectionName, upperCased
- */
- public String getCanonicalNewName(Object element, String newName)
- {
- return newName.toUpperCase();
- }
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- */
- public String getMementoHandle(Object element)
- {
- ISystemProfile profile = (ISystemProfile)element;
- return profile.getName();
- }
- /**
- * Return a short string to uniquely identify the type of resource.
- */
- public String getMementoHandleKey(Object element)
- {
- return ISystemMementoConstants.MEMENTO_KEY_PROFILE;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index b2ba2831b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewRefreshAllAction.java
+++ /dev/null
@@ -1,76 +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:
- * Michael Berger (IBM) - 146339 Added refresh action graphic.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.team;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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;
-
-
-/**
- * The action allows users to refresh the entire System Team tree view
- */
-public class SystemTeamViewRefreshAllAction extends SystemBaseAction
- //
-{
- private SystemTeamViewPart teamView;
-
- /**
- * Constructor for SystemRefreshAllAction
- */
- public SystemTeamViewRefreshAllAction(Shell parent, SystemTeamViewPart teamView)
- {
- super(SystemResources.ACTION_REFRESH_ALL_LABEL,SystemResources.ACTION_REFRESH_ALL_TOOLTIP,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_REFRESH_ID),
- parent);
- this.teamView = teamView;
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_BUILD);
- setSelectionSensitive(false);
-
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0009"); //$NON-NLS-1$
- }
-
- /**
- * @see SystemBaseAction#updateSelection(IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection)
- {
- boolean enable = true;
- return enable;
- }
-
- /**
- * This is the method called when the user selects this action.
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run()
- {
- try {
- SystemResourceManager.getRemoteSystemsProject().refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception exc) {}
-
- SystemTeamView teamViewer = (SystemTeamView)teamView.getTreeViewer();
- teamViewer.refresh();
- //System.out.println("Running refresh all");
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewResourceAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewResourceAdapterFactory.java
deleted file mode 100644
index bdfa5c26d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewResourceAdapterFactory.java
+++ /dev/null
@@ -1,68 +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.view.team;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-
-
-/**
- * Special adapter factory that maps Remote Systems Framework objects to underlying workbench resources
- */
-public class SystemTeamViewResourceAdapterFactory implements IAdapterFactory
-{
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {IResource.class};
- }
- /**
- * Called by our plugin's startup method to register our adaptable object types
- * with the platform. We prefer to do it here to isolate/encapsulate all factory
- * logic in this one place.
- */
- public void registerWithManager(IAdapterManager manager)
- {
- manager.registerAdapters(this, ISystemRegistry.class);
- //manager.registerAdapters(this, SystemProfile.class); DEFERRED UNTIL NEXT RELEASE
- }
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof ISystemRegistry)
- {
- //SystemRegistry sr = (SystemRegistry)adaptableObject;
- adapter = SystemResourceManager.getRemoteSystemsProject();
- }
- /* deferred
- else if (adaptableObject instanceof SystemProfile)
- {
- SystemProfile profile = (SystemProfile)adaptableObject;
- adapter = SystemResourceManager.getProfileFolder(profile);
- }*/
- return adapter;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemConfigurationAdapter.java
deleted file mode 100644
index e06ba26d3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view.team;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.filters.actions.SystemFilterWorkWithFilterPoolsAction;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemViewResources;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Adapter for displaying and processing SystemTeamViewSubSystemConfigurationNode objects in tree views, such as
- * the Team view.
- */
-public class SystemTeamViewSubSystemConfigurationAdapter
- extends AbstractSystemViewAdapter
- implements ISystemViewElementAdapter
-{
- private boolean actionsCreated = false;
- //private Hashtable categoriesByProfile = new Hashtable();
- private SystemFilterWorkWithFilterPoolsAction wwPoolsAction;
-
- // -------------------
- // property descriptors
- // -------------------
- private static PropertyDescriptor[] propertyDescriptorArray = null;
-
-
- /**
- * Returns any actions that should be contributed to the popup menu
- * for the given element.
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell Shell of viewer
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
- {
- if (!actionsCreated)
- createActions();
-
- SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode)selection.getFirstElement();
- SystemTeamViewCategoryNode category = ssfNode.getParentCategory();
- String categoryType = category.getMementoHandle();
-
-// FIXME - user actions and compilecmds no longer coupled to core
-// if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_USERACTIONS) && ssfNode.getSubSystemConfiguration().supportsUserDefinedActions())
-// {
-// wwActionsAction.reset();
-// wwActionsAction.setShell(shell);
-// menu.add(menuGroup, wwActionsAction);
-// }
-// else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS) && ssfNode.getSubSystemConfiguration().supportsCompileActions())
-// {
-// wwCmdsAction.reset();
-// wwCmdsAction.setShell(shell);
-// menu.add(menuGroup, wwCmdsAction);
-// }
- if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS) && ssfNode.getSubSystemConfiguration().supportsFilters())
- {
- wwPoolsAction.reset();
- wwPoolsAction.setShell(shell);
- wwPoolsAction.setFilterPoolManagerProvider(ssfNode.getSubSystemConfiguration());
- ISystemFilterPoolManager[] poolMgrs = new ISystemFilterPoolManager[1];
- poolMgrs[0] = ssfNode.getSubSystemConfiguration().getFilterPoolManager(ssfNode.getProfile());
- wwPoolsAction.setFilterPoolManagers(poolMgrs);
- menu.add(menuGroup, wwPoolsAction);
- }
- }
- private void createActions()
- {
- actionsCreated = true;
-
-// FIXME - user actions and compile actions no longer coupled to core
-// wwActionsAction = new SystemWorkWithUDAsAction(null, true);
-// wwCmdsAction = new SystemWorkWithCompileCommandsAction(null, true);
- wwPoolsAction = new SystemFilterWorkWithFilterPoolsAction(null, false);
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * @param element The element for which an image is desired
- */
- public ImageDescriptor getImageDescriptor(Object element)
- {
- return ((SystemTeamViewSubSystemConfigurationNode)element).getImageDescriptor();
- }
-
- /**
- * Return the label for this object
- */
- public String getText(Object element)
- {
- return ((SystemTeamViewSubSystemConfigurationNode)element).getLabel();
- }
-
- /**
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
- * <p>
- * Called by common rename and delete actions.
- */
- public String getName(Object element)
- {
- return ((SystemTeamViewSubSystemConfigurationNode)element).getLabel();
- }
-
- /**
- * Return the absolute name, versus just display name, of this object
- */
- public String getAbsoluteName(Object element)
- {
- SystemTeamViewSubSystemConfigurationNode factory = (SystemTeamViewSubSystemConfigurationNode)element;
- return factory.getProfile().getName() + "." + factory.getParentCategory().getLabel() + factory.getLabel(); //$NON-NLS-1$
- }
-
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- return SystemViewResources.RESID_PROPERTY_TEAM_SSFACTORY_TYPE_VALUE;
- }
-
- /**
- * Return the string to display in the status line when the given object is selected.
- */
- public String getStatusLineText(Object element)
- {
- SystemTeamViewSubSystemConfigurationNode factory = (SystemTeamViewSubSystemConfigurationNode)element;
- return SystemResources.RESID_TEAMVIEW_SUBSYSFACTORY_VALUE + ": " + factory.getLabel(); //$NON-NLS-1$
- }
-
- /**
- * Return the parent of this object. We return the RemoteSystemsConnections project
- */
- public Object getParent(Object element)
- {
- SystemTeamViewSubSystemConfigurationNode factory = (SystemTeamViewSubSystemConfigurationNode)element;
- return factory.getParentCategory();
- }
-
- /**
- * Return the children of this profile.
- */
- public Object[] getChildren(Object element)
- {
- SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode)element;
- SystemTeamViewCategoryNode category = ssfNode.getParentCategory();
- ISystemProfile profile = ssfNode.getProfile();
- String categoryType = category.getMementoHandle();
- ISubSystemConfiguration ssf = ssfNode.getSubSystemConfiguration();
- if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS))
- {
- return profile.getFilterPools(ssf);
- }
- else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_USERACTIONS))
- {
- /* FIXME
- SystemUDActionElement[] children = profile.getUserActions(ssf);
- for (int idx=0; idx<children.length; idx++)
- {
- children[idx].setData(ssfNode);
- }
- return children;
- */
- return null;
- }
- else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS))
- {
- /* FIXME
- SystemCompileType[] types = profile.getCompileCommandTypes(ssf);
- if (types != null)
- {
- SystemTeamViewCompileTypeNode[] typeNodes = new SystemTeamViewCompileTypeNode[types.length];
- for (int idx=0; idx<types.length; idx++)
- typeNodes[idx] = new SystemTeamViewCompileTypeNode(ssfNode, types[idx]);
- return typeNodes;
- }
- else
- */
- return null;
- }
- else
- return null;
- }
-
- /**
- * Return true if this profile has children. We return true.
- */
- public boolean hasChildren(Object element)
- {
- SystemTeamViewSubSystemConfigurationNode ssConfNode = (SystemTeamViewSubSystemConfigurationNode)element;
- SystemTeamViewCategoryNode category = ssConfNode.getParentCategory();
- //ISystemProfile profile = ssConfNode.getProfile();
- String categoryType = category.getMementoHandle();
- //ISubSystemConfiguration ssConf = ssConfNode.getSubSystemConfiguration();
- if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS))
- return true;
- else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_USERACTIONS))
- {
- /* FIXME
- return (profile.getUserActions(ssConf).length > 0);
- */
- return false;
- }
- else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS))
- {
- /* FIXME
- return (profile.getCompileCommandTypes(ssConf).length > 0);
- */
- return false;
- }
- else
- return false;
- }
-
- // Property sheet descriptors defining all the properties we expose in the Property Sheet
- /**
- * Return our unique property descriptors, which getPropertyDescriptors adds to the common properties.
- */
- protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- /*
- propertyDescriptorArray = new PropertyDescriptor[1];
- RSEUIPlugin plugin = RSEUIPlugin.getDefault();
- int idx = 0;
- // status
- propertyDescriptorArray[idx] = new PropertyDescriptor(ISystemPropertyConstants.P_IS_ACTIVE,
- SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL);
- propertyDescriptorArray[idx].setDescription(SystemViewResources.RESID_PROPERTY_PROFILESTATUS_DESCRIPTION));
- ++idx;
- */
- }
- return propertyDescriptorArray;
- }
-
- /**
- * Returns the current value for the named property.
- * The parent handles P_TEXT and P_TYPE only, and we augment that here.
- * @param key - the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- public Object internalGetPropertyValue(Object key)
- {
- /*
- if (name.equals(P_IS_ACTIVE))
- {
- boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName());
- if (active)
- return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL);
- else
- return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL);
- }
- else
- */
- return null;
- }
-
-
- // ------------------------------------------------------------
- // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
- // ------------------------------------------------------------
- /**
- * Return what to save to disk to identify this element in the persisted list of expanded elements.
- */
- public String getMementoHandle(Object element)
- {
- SystemTeamViewSubSystemConfigurationNode factory = (SystemTeamViewSubSystemConfigurationNode)element;
- return factory.getMementoHandle();
- }
- /**
- * Return a short string to uniquely identify the type of resource.
- */
- public String getMementoHandleKey(Object element)
- {
- SystemTeamViewSubSystemConfigurationNode factory = (SystemTeamViewSubSystemConfigurationNode)element;
- return factory.getProfile().getName() + "." + factory.getParentCategory().getLabel() + "." + factory.getLabel(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemConfigurationNode.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemConfigurationNode.java
deleted file mode 100644
index 87cba6cce..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemConfigurationNode.java
+++ /dev/null
@@ -1,193 +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.view.team;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * This class represents a child node under category nodes, in the Team view.
- * It represents expandable subsystem factories such as "Files" or "iSeries Objects".
- */
-public class SystemTeamViewSubSystemConfigurationNode implements IAdaptable
-{
- private String mementoHandle;
- private ISystemProfile profile;
- private ISubSystemConfiguration ssf;
- private SystemTeamViewCategoryNode parentCategory;
- private String name = null;
-
- /**
- * Constructor
- */
- public SystemTeamViewSubSystemConfigurationNode(ISystemProfile profile, SystemTeamViewCategoryNode parentCategory, ISubSystemConfiguration ssf)
- {
- super();
- this.profile = profile;
- this.ssf = ssf;
- this.parentCategory = parentCategory;
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Compare this node to another.
- */
- public boolean equals(Object o)
- {
- if (o instanceof SystemTeamViewSubSystemConfigurationNode)
- {
- SystemTeamViewSubSystemConfigurationNode other = (SystemTeamViewSubSystemConfigurationNode)o;
- if ((ssf == other.getSubSystemConfiguration()) &&
- (parentCategory == other.getParentCategory()) &&
- (profile == other.getProfile()))
- return true;
- else
- return false;
- }
- else
- return super.equals(o);
- }
-
- /**
- * Return this node's image
- * @return the image to show in the tree, for this node
- */
- public ImageDescriptor getImageDescriptor()
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssf.getAdapter(ISubSystemConfigurationAdapter.class);
- return adapter.getImage(ssf);
- }
-
- /**
- * Return this node's label
- * @return the translated label to show in the tree, for this node
- */
- public String getLabel()
- {
- if (name == null)
- {
- name = ""; //$NON-NLS-1$
- String[] types = ssf.getSystemTypes();
- if (ssf.getSubSystemConfigurationProxy().supportsAllSystemTypes())
- {
- name = SystemResources.TERM_ALL;
- }
- else
- {
- for (int idx=0; idx<types.length; idx++)
- {
- if (idx==0)
- name += types[idx];
- else
- name += ", " + types[idx]; //$NON-NLS-1$
- }
- }
- name = ssf.getName() + " ("+name+")"; //$NON-NLS-1$ //$NON-NLS-2$
- //name = ssf.getName() + ": "+name;
- }
- return name;
- }
-
- /**
- * Convert to string. We call getLabel()
- */
- public String toString()
- {
- return getLabel();
- }
-
- /**
- * @return profile this category is associated with
- */
- public ISystemProfile getProfile()
- {
- return profile;
- }
-
- /**
- * @param profile ... the profile this category is associated with
- */
- public void setProfile(ISystemProfile profile)
- {
- this.profile = profile;
- }
-
- /**
- * @return the untranslated value to store in the memento, to uniquely identify this node
- */
- public String getMementoHandle()
- {
- return mementoHandle;
- }
-
- /**
- * Set the untranslated value to store in the memento, to uniquely identify this node
- * @param string - untranslated value
- */
- public void setMementoHandle(String string)
- {
- mementoHandle = string;
- }
-
- /**
- * Return the subsystem factory this node represents
- */
- public ISubSystemConfiguration getSubSystemConfiguration()
- {
- return ssf;
- }
-
- /**
- * Set the subsystem factory this node represents
- */
- public void setSubSystemConfiguration(ISubSystemConfiguration factory)
- {
- ssf = factory;
- }
-
- /**
- * Return the parent category this is a child of.
- */
- public SystemTeamViewCategoryNode getParentCategory()
- {
- return parentCategory;
- }
-
- /**
- * Set the parent category this is a child of.
- */
- public void setParentCategory(SystemTeamViewCategoryNode node)
- {
- parentCategory = node;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index e4fb7cff4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/EnvironmentVariablesForm.java
+++ /dev/null
@@ -1,608 +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.widgets;
-
-import java.util.Collection;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-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.jface.window.Window;
-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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.EnvironmentVariablesPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-
-
-/**
- * Preference page which allows the user to manage persisted environment
- * variables for an RSE connection.
- */
-public class EnvironmentVariablesForm extends SystemBaseForm implements SelectionListener, MouseListener {
-
-
- // constants
- private static final String VAR_NAME = "NAME"; //$NON-NLS-1$
- private static final String VAR_VALUE = "VALUE"; //$NON-NLS-1$
- private static final String[] COLUMN_PROPERTIES = {VAR_NAME, VAR_VALUE};
-
- // instance variables
- private Table envVarTable;
- private Vector envVars;
- private EnvironmentVariablesTableContentProvider provider;
- private Object selectedObject;
- private TableViewer envVarTableViewer;
- private String systemType;
- private String invalidNameChars;
-
- private Button addButton, changeButton, removeButton, moveUpButton, moveDownButton;
-
- // Temporary class for storing environment variable information
- // until we pass it to the commands subsystem.
- public class EnvironmentVariable {
- protected String _name;
- protected String _value;
-
- public EnvironmentVariable(String name, String value)
- {
- _name = name;
- _value = value;
- }
-
- public String getName() { return _name;}
- public String getValue() { return _value;}
- public void setName(String name) {_name = name;}
- public void setValue(String value) { _value = value;}
- }
-
- protected class EnvironmentVariablesTableContentProvider implements IStructuredContentProvider,
- ITableLabelProvider,
- ICellModifier, ICellEditorValidator
- {
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- /**
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- return envVars.toArray();
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- if (columnIndex == 0) {
- return ((EnvironmentVariable) element).getName();
- } else {
- return ((EnvironmentVariable) element).getValue();
- }
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(Object, String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- }
-
- // yantzi:2.1.2 Added ability to directly edit in env var table
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object, java.lang.String)
- */
- public boolean canModify(Object element, String property) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object, java.lang.String)
- */
- public Object getValue(Object element, String property) {
- if (VAR_NAME.equals(property))
- {
- return ((EnvironmentVariable) element).getName();
- }
- else // VAR_VALUE
- {
- return ((EnvironmentVariable) element).getValue();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object, java.lang.String, java.lang.Object)
- */
- public void modify(Object element, String property, Object value) {
- if (VAR_NAME.equals(property))
- {
- SystemMessage msg = validateName((String)value);
- if (msg != null)
- {
- getMessageLine().setErrorMessage(msg);
- }
- else
- {
- if (invalidNameChars != null && invalidNameChars.indexOf(' ') != -1)
- {
- ((EnvironmentVariable) ((TableItem)element).getData()).setName(((String) value).trim());
- }
- else
- {
- ((EnvironmentVariable) ((TableItem)element).getData()).setName((String) value);
- }
- getMessageLine().clearErrorMessage();
- }
- }
- else
- {
- ((EnvironmentVariable) ((TableItem)element).getData()).setValue((String) value);
- }
-
- envVarTableViewer.refresh();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object value)
- {
- SystemMessage msg = validateName((String) value);
- if (msg != null)
- {
- getMessageLine().setErrorMessage(msg);
- }
- else
- {
- getMessageLine().clearErrorMessage();
- }
-
- // always return null because we handle displaying the error message
- return null;
- }
-
- }
-
- /**
- * Constructor for EnvironmentVariablesForm.
- * @param msgLine
- */
- public EnvironmentVariablesForm(Shell shell, ISystemMessageLine msgLine, Object selectedObject, String invalidNameChars) {
- super(shell, msgLine);
- this.selectedObject = selectedObject;
- this.invalidNameChars = invalidNameChars;
- envVars = new Vector();
- provider = new EnvironmentVariablesTableContentProvider();
-
- if (selectedObject instanceof ISubSystem)
- {
- systemType = ((ISubSystem) selectedObject).getHost().getSystemType();
- }
-
- }
-
- /**
- * @see org.eclipse.rse.ui.SystemBaseForm#createContents(Composite)
- */
- public Control createContents(Composite parent) {
-
- SystemWidgetHelpers.createLabel(parent, SystemResources.RESID_SUBSYSTEM_ENVVAR_DESCRIPTION);
-
- // Environment Variables List
- envVarTable = new Table(parent, SWT.FULL_SELECTION |SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- envVarTable.setLinesVisible(true);
- envVarTable.setHeaderVisible(true);
- envVarTable.setToolTipText(SystemResources.RESID_SUBSYSTEM_ENVVAR_TOOLTIP);
- envVarTable.addSelectionListener(this);
- envVarTable.addMouseListener(this);
-
- TableLayout tableLayout = new TableLayout();
- tableLayout.addColumnData(new ColumnWeightData(100, true));
- tableLayout.addColumnData(new ColumnWeightData(100, true));
- envVarTable.setLayout(tableLayout);
-
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.grabExcessHorizontalSpace = true;
- gd.grabExcessVerticalSpace = true;
- gd.heightHint = 200;
- envVarTable.setLayoutData(gd);
-
- // Name column
- TableColumn hostnameColumn = new TableColumn(envVarTable, SWT.NONE);
- hostnameColumn.setText(SystemResources.RESID_SUBSYSTEM_ENVVAR_NAME_TITLE);
-
- // Value column
- TableColumn sysTypeColumn = new TableColumn(envVarTable, SWT.NONE);
- sysTypeColumn.setText(SystemResources.RESID_SUBSYSTEM_ENVVAR_VALUE_TITLE);
-
- envVarTableViewer = new TableViewer(envVarTable);
- envVarTableViewer.setContentProvider(provider);
- envVarTableViewer.setLabelProvider(provider);
-
- // yantzi:2.1.2 Added ability to directly edit in env var table
- envVarTableViewer.setCellModifier(provider);
- envVarTableViewer.setColumnProperties(COLUMN_PROPERTIES);
-
- CellEditor[] cellEditors = new CellEditor[2];
- cellEditors[0] = new TextCellEditor(envVarTable);
- cellEditors[0].setValidator(provider);
- cellEditors[1] = new TextCellEditor(envVarTable);
- envVarTableViewer.setCellEditors(cellEditors);
-
- envVarTableViewer.setInput(selectedObject);
-
- // Create the buttons for add, change, remove, move up and move down
- Composite buttonBar = SystemWidgetHelpers.createComposite(parent, 5);
-
- addButton = SystemWidgetHelpers.createPushButton(buttonBar, SystemResources.RESID_PREF_SIGNON_ADD_LABEL, null);
- addButton.setToolTipText(SystemResources.RESID_SUBSYSTEM_ENVVAR_ADD_TOOLTIP);
- addButton.addSelectionListener(this);
-
- changeButton = SystemWidgetHelpers.createPushButton(buttonBar, SystemResources.RESID_PREF_SIGNON_CHANGE_LABEL, null);
- changeButton.setToolTipText(SystemResources.RESID_SUBSYSTEM_ENVVAR_CHANGE_TOOLTIP);
- changeButton.addSelectionListener(this);
- changeButton.setEnabled(false);
-
- removeButton = SystemWidgetHelpers.createPushButton(buttonBar, SystemResources.RESID_PREF_SIGNON_REMOVE_LABEL, null);
- removeButton.setToolTipText(SystemResources.RESID_SUBSYSTEM_ENVVAR_REMOVE_TOOLTIP);
- removeButton.addSelectionListener(this);
- removeButton.setEnabled(false);
-
- moveUpButton = SystemWidgetHelpers.createPushButton(buttonBar, SystemResources.RESID_SUBSYSTEM_ENVVAR_MOVEUP_LABEL, null);
- moveUpButton.setToolTipText(SystemResources.RESID_SUBSYSTEM_ENVVAR_MOVEUP_TOOLTIP);
- moveUpButton.addSelectionListener(this);
- moveUpButton.setEnabled(false);
-
- moveDownButton = SystemWidgetHelpers.createPushButton(buttonBar, SystemResources.RESID_SUBSYSTEM_ENVVAR_MOVEDOWN_LABEL, null);
- moveDownButton.setToolTipText(SystemResources.RESID_SUBSYSTEM_ENVVAR_MOVEDOWN_TOOLTIP);
- moveDownButton.addSelectionListener(this);
- moveDownButton.setEnabled(false);
-
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "envv0000"); //$NON-NLS-1$
-
- return parent;
- }
-
- /**
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- /**
- * Helper method for retrieving the list of existing environment variable names
- */
- private String[] getVariableNames()
- {
- String[] existingNames = new String[envVars.size()];
- for (int i = 0; i < envVars.size(); i++)
- {
- existingNames[i] = ((EnvironmentVariable) envVars.get(i))._name;
- }
-
- return existingNames;
- }
-
- /**
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
-
- if (e.getSource() == addButton)
- {
- // Prompt the user for the new environment variable
- EnvironmentVariablesPromptDialog dialog =
- new EnvironmentVariablesPromptDialog(
- getShell(),
- SystemResources.RESID_SUBSYSTEM_ENVVAR_ADD_TITLE,
- systemType,
- invalidNameChars,
- getVariableNames(),
- false);
-
- if (dialog.open() == Window.OK) {
- // Add new variable to model
- EnvironmentVariable var = new EnvironmentVariable(dialog.getName(), dialog.getValue());
- envVars.add(var);
- envVarTableViewer.refresh();
-
- //dy defect 47040 position table so new variable is shown
- envVarTableViewer.reveal(var);
- }
- }
- else if (e.getSource() == removeButton)
- {
- int[] selections = envVarTable.getSelectionIndices();
- if (selections != null && selections.length > 0) {
- for (int loop = selections.length - 1; loop >= 0; loop--) {
- envVars.remove(selections[loop]);
- }
- envVarTableViewer.refresh();
- }
- }
- else if (e.getSource() == changeButton)
- {
- changeCurrentlySelectedVariable();
- }
- else if (e.getSource() == moveUpButton)
- {
- int[] selections = envVarTable.getSelectionIndices();
- envVarTable.deselectAll();
-
- if (selections != null) {
- // Move the selected objects up one position in the table
- Object temp;
- for (int loop=0; loop < selections.length; loop++) {
- temp = envVars.remove(selections[loop]);
- envVars.add(selections[loop] - 1, temp);
- }
-
- envVarTableViewer.refresh();
-
- //dy defect 47040 position table so top variable is shown
- envVarTableViewer.reveal(envVars.get(selections[0] - 1));
-
- // Reselect the entries
- for (int loop=0; loop < selections.length; loop++) {
- if (selections[loop] > 0)
- envVarTable.select(selections[loop] - 1);
- else
- envVarTable.select(selections[loop]);
- }
- }
- }
- else if (e.getSource() == moveDownButton)
- {
- int[] selections = envVarTable.getSelectionIndices();
- envVarTable.deselectAll();
-
- // move the selected entries down one position in the table
- if (selections != null) {
- Object temp;
- for (int loop=selections.length - 1; loop >= 0; loop--) {
- if (selections[loop] < envVars.size() - 1) {
- temp = envVars.remove(selections[loop]);
- envVars.add(selections[loop] + 1, temp);
- }
- }
-
- envVarTableViewer.refresh();
-
- //dy defect 47040 position table so bottom variable is shown
- envVarTableViewer.reveal(envVars.get(selections[selections.length - 1] + 1));
-
- // reselect the entries
- for (int loop=0; loop < selections.length; loop++) {
- if (selections[loop] < envVars.size() - 1)
- envVarTable.select(selections[loop] + 1);
- else
- envVarTable.select(selections[loop]);
- }
- }
- }
-
- // Update table buttons based on changes
- if (envVarTable.getSelectionCount() == 0) {
- changeButton.setEnabled(false);
- removeButton.setEnabled(false);
- moveUpButton.setEnabled(false);
- moveDownButton.setEnabled(false);
- } else {
- int[] selectionIndices = envVarTable.getSelectionIndices();
- boolean upEnabled = true;
- boolean downEnabled = true;
- for (int loop = 0; loop < selectionIndices.length; loop++) {
- if (selectionIndices[loop] == 0)
- upEnabled = false;
-
- if (selectionIndices[loop] == (envVarTable.getItemCount() - 1))
- downEnabled = false;
- }
-
- if (selectionIndices.length == 1)
- {
- changeButton.setEnabled(true);
- }
- else
- {
- changeButton.setEnabled(false);
- }
- removeButton.setEnabled(true);
- moveUpButton.setEnabled(upEnabled);
- moveDownButton.setEnabled(downEnabled);
- }
-
- }
-
- /**
- * Get the environment variables currently in the table.
- */
- public Collection getEnvVars()
- {
- return envVars;
- }
-
- /**
- * Set the input for the environment variables table
- */
- public void setEnvVars(Vector envVars)
- {
- this.envVars = envVars;
- if (envVarTableViewer != null)
- {
- envVarTableViewer.refresh();
- }
- }
-
- /**
- * Helper method so the same code can be run when the user selets the chagne button or
- * double clicks in the table.
- */
- private void changeCurrentlySelectedVariable()
- {
- int[] selections = envVarTable.getSelectionIndices();
- if (selections != null && selections.length == 1)
- {
- EnvironmentVariablesPromptDialog dialog = new
- EnvironmentVariablesPromptDialog(
- getShell(),
- SystemResources.RESID_SUBSYSTEM_ENVVAR_CHANGE_TITLE,
- systemType,
- invalidNameChars,
- getVariableNames(),
- true);
- dialog.setName(((EnvironmentVariable)envVars.get(selections[0])).getName());
- dialog.setValue(((EnvironmentVariable)envVars.get(selections[0])).getValue());
-
- if (dialog.open() == Window.OK)
- {
- envVars.remove(selections[0]);
- envVars.add(selections[0], new EnvironmentVariable(dialog.getName(), dialog.getValue()));
- envVarTableViewer.refresh();
- }
- }
- }
-
- /**
- * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(MouseEvent)
- */
- public void mouseDoubleClick(MouseEvent e)
- {
- // Shortcut for change
- changeCurrentlySelectedVariable();
- }
-
- /**
- * @see org.eclipse.swt.events.MouseListener#mouseDown(MouseEvent)
- */
- public void mouseDown(MouseEvent e)
- {
- }
-
- /**
- * @see org.eclipse.swt.events.MouseListener#mouseUp(MouseEvent)
- */
- public void mouseUp(MouseEvent e)
- {
- }
-
- /**
- * validate the environment variable's name
- */
- private SystemMessage validateName(String value)
- {
- SystemMessage msg = null;
- String name = value;
- if (name == null || name.trim().equals("")) //$NON-NLS-1$
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_NONAME);
- }
- else
- {
- if (invalidNameChars != null)
- {
- if (invalidNameChars.indexOf(' ') != -1)
- {
- name = (value).trim();
- }
-
- // first check for invalid characters
- if (invalidNameChars != null)
- {
- for (int i = 0; i < invalidNameChars.length() && msg == null; i++)
- {
- if (name.indexOf(invalidNameChars.charAt(i)) != -1)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_INVALIDCHAR);
- }
- }
- }
-
- // next check for duplicate env var names
- String existingName;
- int currentSelection = envVarTable.getSelectionIndex();
- for (int i = 0; i < envVars.size() && msg == null; i++)
- {
- existingName = ((EnvironmentVariable) envVars.get(i)).getName();
- if (currentSelection != i && existingName.equals(name))
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_DUPLICATE);
- msg.makeSubstitution(existingName);
- }
- }
- }
- }
-
- return msg;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/GridUtil.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/GridUtil.java
deleted file mode 100644
index 2b20210a7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/GridUtil.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-
-import org.eclipse.swt.layout.GridData;
-
-/**
- * A utility class to create convenient grid data objects.
- */
-public class GridUtil
-{
- /**
- * GridUtil constructor comment.
- */
- public GridUtil()
- {
- super();
- }
-
- /**
- * Creates a grid data object that occupies vertical and horizontal space.
- */
- static public GridData createFill()
- {
- GridData gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
- gd.verticalAlignment = GridData.FILL;
- gd.grabExcessVerticalSpace = true;
- return gd;
- }
-
- /**
- * Creates a grid data object that occupies horizontal space.
- */
- static public GridData createHorizontalFill()
- {
- GridData gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
- return gd;
- }
-
- /**
- * Creates a grid data object that occupies vertical space.
- */
- static public GridData createVerticalFill()
- {
- GridData gd = new GridData();
- gd.verticalAlignment = GridData.FILL;
- gd.grabExcessVerticalSpace = true;
- return gd;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IInheritableEntryFieldStateChangeListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IInheritableEntryFieldStateChangeListener.java
deleted file mode 100644
index 21b634a5d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IInheritableEntryFieldStateChangeListener.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-
-/**
- * Any listener that wants to be notified of state changes to the inheritable
- * entry field widget must implement this interface.
- */
-public interface IInheritableEntryFieldStateChangeListener {
-
- /**
- * Called when the state of the inheritable field has changed. The new state of the field can be queried by calling
- * <code>isLocal</code> on on the entry field.
- * @param field the inheritable field which has changed state.
- */
- public void stateChanged(InheritableEntryField field);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IServerLauncherForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IServerLauncherForm.java
deleted file mode 100644
index 82d086068..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IServerLauncherForm.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-/**
- * An interface implemented by server launchers in order to prompt for the
- * properties of that server launcher.
- * @see org.eclipse.rse.core.subsystems.IServerLauncherProperties
- */
-public interface IServerLauncherForm
-{
- /**
- * Create the contents of the form
- */
- public abstract Control createContents(Composite parent);
-
- /*
- * Sets the hostname associated with this form
- */
- public void setHostname(String hostname);
-
- /**
- * Set the initial values for the widgets, based on the server launcher values
- */
- public void initValues(IServerLauncherProperties launcher);
- /**
- * Verify the contents of the widgets, when OK is pressed.
- * Return true if all is well, false if an error found.
- */
- public boolean verify();
- /**
- * Update the actual values in the server launcher, from the widgets. Called on successful press of OK.
- * @return true if all went well, false if something failed for some reason.
- */
- public boolean updateValues(IServerLauncherProperties launcher);
-
- /**
- * Returns whether anything has changed in the server launcher form.
- * @return <code>true</code> if the server launcher form has changed, <code>false</code> otherwise.
- */
- public boolean isDirty();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemAddListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemAddListener.java
deleted file mode 100644
index f1bfcfce2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemAddListener.java
+++ /dev/null
@@ -1,47 +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.widgets;
-import org.eclipse.rse.core.model.IHost;
-/**
- * This is an interface used by the AS400SelectFieldForm, AS400SelectFieldDialog and
- * AS400SelectFieldAction classes to enable the caller to be informed when the user
- * presses the Add button for the selected field.
- * <p>
- * If you call the enableAddButton method you must pass an object that implements this interface.
- * The dialog will call you back when the user presses the Add button, so you can take
- * appropriate action.
- */
-public interface ISystemAddListener
-{
-
-
- /**
- * The user has pressed the Add button.
- * Do something appropriate with the request.
- * If this action fails for some reason, or you wish to display a completion
- * message, return message text that will be displayed in the dialog's message
- * line. Else, return null.
- */
- public String addButtonPressed(IHost selectedConnection, Object selectedObject);
- /**
- * The user has selected an object. Is this field valid to be added?
- * If so, return null. If not, return a string to display on the
- * message line indicating why it is not valid, such as it already has
- * been added
- */
- public String okToEnableAddButton(IHost selectedConnection, Object selectedObject);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCollapsableSectionListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCollapsableSectionListener.java
deleted file mode 100644
index e49ad13ff..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCollapsableSectionListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-
-/**
- * Listener for collapse / expand events on the SystemCollapsableSection widget.
- */
-public interface ISystemCollapsableSectionListener {
-
-
- /**
- * Notifies listeners of a section collapsed or expanded.
- */
- public void sectionCollapsed(boolean collapsed);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCombo.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCombo.java
deleted file mode 100644
index f5b629ed9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemCombo.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.widgets;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Combo;
-
-
-/**
- * We have a number of composite widgets that include a combo-box. This
- * interface enforces some common methods on all of them to make it easier
- * to code to this in a consistent manner.
- */
-public interface ISystemCombo
-{
-
-
-
- /**
- * Return the embedded combo box widget
- */
- public Combo getCombo();
- /**
- * Set auto-uppercase. When enabled, all non-quoted values are uppercased when appropriate
- */
- public void setAutoUpperCase(boolean enable);
- /**
- * Set the width hint for the combo box widget (in pixels).
- * A rule of thumb is 10 pixels per character, but allow 15 for the litte button on the right.
- * You must call this versus setting it yourself, else you may see truncation.
- */
- public void setWidthHint(int widthHint);
- /**
- * Query the combo field's current contents
- */
- public String getText();
- /**
- * Disable/Enable all the child controls
- */
- public void setEnabled(boolean enabled);
- /**
- * Set the tooltip text for the combo field
- */
- public void setToolTipText(String tip);
- /**
- * Set the tooltip text for the history button
- */
- public void setButtonToolTipText(String tip);
- /**
- * Set the focus to the combo field
- */
- public boolean setFocus();
- /**
- * Select the combo dropdown list entry at the given index
- */
- public void select(int selIdx);
- /**
- * Same as {@link #select(int)}
- */
- public void setSelectionIndex(int selIdx);
- /**
- * Clear the entered/selected contents of the combo box. Clears the text selection and the list selection
- */
- public void clearSelection();
- /**
- * Clear the entered/selected contents of the combo box. Clears only the text selection, not the list selection
- */
- public void clearTextSelection();
- /**
- * Get the index number of the currently selected item.
- */
- public int getSelectionIndex();
- /**
- * Register a listener interested in an item is selected in the combo box
- * @see #removeSelectionListener(SelectionListener)
- */
- public void addSelectionListener(SelectionListener listener);
- /**
- * Remove a previously set combo box selection listener.
- * @see #addSelectionListener(SelectionListener)
- */
- public void removeSelectionListener(SelectionListener listener);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemEditPaneStates.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemEditPaneStates.java
deleted file mode 100644
index 4a8171caf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ISystemEditPaneStates.java
+++ /dev/null
@@ -1,53 +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.widgets;
-/**
- * @author coulthar
- *
- * This interfaces defines the constants for the modes and states
- * of the {@link org.eclipse.rse.ui.widgets.SystemEditPaneStateMachine}
- * class.
- */
-public interface ISystemEditPaneStates
-{
-
- /**
- * MODE - UNSET. Nothing is selected so overall edit pane is hidden/disabled
- */
- public static final int MODE_UNSET = 2;
- /**
- * MODE - NEW. The user is creating a "new" thing
- */
- public static final int MODE_NEW = 4;
- /**
- * MODE - EDIT. The user is editing an existing thing
- */
- public static final int MODE_EDIT = 8;
-
- /**
- * STATE - NO CHANGES. No changes have been made by the user
- */
- public static final int STATE_INITIAL = 128;
- /**
- * STATE - CHANGES PENDING. User has made changes but they haven't been applied yet
- */
- public static final int STATE_PENDING = 256;
- /**
- * STATE - CHANGES MADE. User has made changes and applied them. None pending
- */
- public static final int STATE_APPLIED = 512;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritButton.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritButton.java
deleted file mode 100644
index 30fd3cc0b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritButton.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleAdapter;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-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.Display;
-import org.eclipse.swt.widgets.Group;
-
-/**
- * An InheritButton is a specialized control that
- * wraps a push button control with two states:
- * "inherit" and "local". The initial state is "inherit". The button is
- * painted with arrowhead image that points either left or right if the
- * button is in "inherit" or "local" state respectively.
- * <p>
- * Pressing the button will trigger a SelectionEvent which the client
- * can listen for. Typically the client will use this to change the
- * button state.
- * <p>
- * An InheritButton is assumed to exist inside a composite control with a GridLayout.
- * There is no need to set its layout data unless you wish to override the
- * default characteristics.
- * <p>
- * Although this control extends Composite, it does not make sense to
- * add children to this control or to set a layout on it.
- */
-public class InheritButton extends Composite {
-
- /**
- * Value is 12 pixels.
- */
- public static final int DEFAULT_WIDTH = 12;
-
- /**
- * Value is 20 pixels.
- */
- public static final int DEFAULT_HEIGHT = 20;
-
- private Image leftArrow = null; // arrow points left, value is inherited
- private Image rightArrow = null; // arrow points right, value is the local value
- private boolean isLocal = false; // default is "inherit"
- private Button toggle = null;
- private boolean isDrawn = false; // button is to be drawn or use arrow implementation
-
- /**
- * Create a new InheritButton.
- * @param parent
- */
- public InheritButton(Composite parent) {
- super(parent, SWT.NONE);
- isDrawn = System.getProperty("os.name").toLowerCase().startsWith("win"); //$NON-NLS-1$ //$NON-NLS-2$
- GridData data = new GridData(SWT.CENTER, SWT.CENTER, false, false);
- data.widthHint = DEFAULT_WIDTH;
- data.heightHint = DEFAULT_HEIGHT;
- setLayoutData(data);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- setLayout(layout);
- initializeToggle(this);
- }
-
- private void initializeToggle(Composite parent) {
- if (isDrawn) {
- toggle = new Button(parent, SWT.PUSH );
- createToggleImages(toggle.getBackground());
- toggle.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- disposeToggleImages();
- }
- });
- } else {
- toggle = new Button(parent, SWT.ARROW );
- }
- toggle.getAccessible().addAccessibleListener(new AccessibleAdapter() {
- public void getHelp(AccessibleEvent e) { // this is the one that should supply the text heard.
- e.result = ""; //$NON-NLS-1$
- }
- public void getName(AccessibleEvent e) { // this is the one that apparently does supply the text heard.
- e.result = toggle.getToolTipText();
- String prefix = null;
- Composite parent = toggle.getParent();
- while (parent != null && prefix == null) {
- if (parent instanceof Group) {
- Group group = (Group) parent;
- prefix = group.getText();
- }
- parent = parent.getParent();
- }
- if (prefix != null) {
- e.result = prefix + " " + e.result; //$NON-NLS-1$
- }
- }
- });
- toggle.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- setToggleImage();
- }
-
- /**
- * Set the inherit/local state.
- * In the "local" state, the arrow image points to the right.
- * In the "inherit" state, the arrow image points to the left.
- * @param isLocal true if the button should be in "local" state. false if the
- * button should be in "inherit" state.
- */
- public void setLocal(boolean isLocal) {
- this.isLocal = isLocal;
- setToggleImage();
- }
-
- /**
- * Query the inherit/local state.
- * @return true if the button is in local state
- */
- public boolean isLocal() {
- return isLocal;
- }
-
- /**
- * Register a listener interested in when the button is pressed.
- * <p>
- * @see InheritButton#removeSelectionListener(SelectionListener)
- */
- public void addSelectionListener(SelectionListener listener) {
- if (toggle == null) return;
- toggle.addSelectionListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#addKeyListener(org.eclipse.swt.events.KeyListener)
- */
- public void addKeyListener(KeyListener listener) {
- if (toggle == null) return;
- toggle.addKeyListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#removeKeyListener(org.eclipse.swt.events.KeyListener)
- */
- public void removeKeyListener(KeyListener listener) {
- if (toggle == null) return;
- toggle.removeKeyListener(listener);
- }
-
- /**
- * Remove a previously set selection listener.
- * @see InheritButton#addSelectionListener(SelectionListener)
- */
- public void removeSelectionListener(SelectionListener listener) {
- if (toggle == null) return;
- toggle.removeSelectionListener(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#setFocus()
- */
- public boolean setFocus() {
- return toggle.setFocus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#isFocusControl()
- */
- public boolean isFocusControl() {
- return toggle.isFocusControl();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#setToolTipText(java.lang.String)
- */
- public void setToolTipText(String string) {
- toggle.setToolTipText(string);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#getToolTipText()
- */
- public String getToolTipText() {
- return toggle.getToolTipText();
- }
-
- /**
- * Places the correct graphic on the button depending on the current
- * button state.
- * In the "local" state, the arrow image points to the right.
- * In the "inherit" state, the arrow image points to the left.
- */
- private void setToggleImage() {
- if (isDrawn) {
- toggle.setImage(isLocal ? rightArrow : leftArrow);
- } else {
- int alignment = isLocal ? SWT.RIGHT : SWT.LEFT;
- toggle.setAlignment(alignment);
- }
- }
-
- /**
- * Creates the images used for the button graphics. This should be done
- * when the button is created.
- * @param backgroundColor The background color with which the arrow images
- * should be painted. The foreground color is black.
- */
- private void createToggleImages(Color backgroundColor) {
- Display display = Display.getCurrent();
- GC gc = null;
- if (display != null) {
- leftArrow = new Image(display, 3, 5);
- gc = new GC(leftArrow);
- gc.setBackground(backgroundColor);
- gc.fillRectangle(leftArrow.getBounds());
- gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
- gc.drawLine(0, 2, 0, 2);
- gc.drawLine(1, 1, 1, 3);
- gc.drawLine(2, 0, 2, 4);
- gc.dispose();
- rightArrow = new Image(display, 3, 5);
- gc = new GC(rightArrow);
- gc.setBackground(backgroundColor);
- gc.fillRectangle(rightArrow.getBounds());
- gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
- gc.drawLine(0, 0, 0, 4);
- gc.drawLine(1, 1, 1, 3);
- gc.drawLine(2, 2, 2, 2);
- gc.dispose();
- }
- }
-
- /**
- * Dispose of the images used for the arrow graphics. Should be invoked
- * when the button is disposed.
- */
- private void disposeToggleImages() {
- if (leftArrow != null) leftArrow.dispose();
- if (rightArrow != null) rightArrow.dispose();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 0756c631d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControl.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.widgets;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.TypedListener;
-
-/**
- * A widget like the old ET/400 inherit/override widget.
- * There are left and right arrows beside each other.
- * Typically, clicking on left means to inherit from parent,
- * clicking on right means to override locally.
- * However, the control can be used for any binary decision!
- * THIS IS NOT USED AND NOT WORKING. USE INHERITABLEENTRYFIELD INSTEAD
- *
- * @deprecated
- * @see org.eclipse.rse.ui.widgets.InheritableEntryField
- */
-public class InheritControl
- extends Composite
-{
- private Image local,interim,inherit;
- private Button button;
- private boolean isLocal=false;
- /**
- * Constructor.
- * @param parent Composite to place this widget into
- * @param style Widget style. Passed on to
- * {@link org.eclipse.swt.widgets.Composite#Composite(org.eclipse.swt.widgets.Composite, int) constructor} of parent class Composite
- */
- public InheritControl(Composite parent, int style)
- {
- super(parent, style);
- setLayout(new InheritControlLayout());
- //Class c = InheritControl.class;
- //String imagePath = "icons" + java.io.File.separatorChar;
- //RSEUIPlugin sp = RSEUIPlugin.getDefault();
- try
- {
- //ImageData source = new ImageData(c.getResourceAsStream (imagePath+"local.gif"));
- /*
- Image image = sp.getImage(ISystemConstants.ICON_INHERITWIDGET_LOCAL_ID);
- ImageData source = image.getImageData();
- ImageData mask = source.getTransparencyMask();
- //local = new Image (null, source, mask);
- local = image;
-
- image = sp.getImage(ISystemConstants.ICON_INHERITWIDGET_INHERIT_ID);
- source = image.getImageData();
- //source = new ImageData(c.getResourceAsStream (imagePath+"inherit.gif"));
- mask = source.getTransparencyMask();
- //inherit = new Image (null, source, mask);
- inherit = image;
-
- // don't know how to add third state, and don't really
- // need it for Button. Could use it if we implement as Label ....
- //source = new ImageData(c.getResourceAsStream (imagePath+"interim.gif"));
- image = sp.getImage(ISystemConstants.ICON_INHERITWIDGET_INTERIM_ID);
- source = image.getImageData();
- mask = source.getTransparencyMask();
- //interim = new Image (null, source, mask);
- interim = image;
- */
- } catch (Throwable ex)
- {
- System.out.println ("failed to load images"); //$NON-NLS-1$
- ex.printStackTrace();
- }
- button=new Button(this,style);
- setLocal(true);
- addDisposeListener(new DisposeListener()
- {
- public void widgetDisposed(DisposeEvent e)
- {
- // dispose of created resources!
- InheritControl.this.widgetDisposed(e);
- }
- });
- // Add the button listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- setLocal(!isLocal());
- notifyListeners(SWT.Selection, new Event());
- }
- };
- button.addSelectionListener(selectionListener);
- }
- /**
- * Add a listener that is called whenever the left or right side is selected.
- * <p>
- * Call {@link #isLocal()} to determine if left (false) or right (true) was pressed.
- * @see #addSelectionListener(SelectionListener)
- */
- public void addSelectionListener(SelectionListener listener)
- {
- addListener(SWT.Selection, new TypedListener(listener));
- }
- /**
- * Returns true if the right-side is selected, false if the left is selected
- */
- public boolean isLocal()
- {
- return isLocal;
- }
- /**
- * Remove a previously set selection listener.
- * @see #addSelectionListener(SelectionListener)
- */
- public void removeSelectionListener(SelectionListener listener)
- {
- removeListener(SWT.Selection, listener);
- }
- /**
- * Programmatically select left (false) or right/local (true) arrow.
- */
- public void setLocal(boolean l)
- {
- isLocal=l;
- button.setImage(isLocal?local:inherit);
- }
- /**
- * Set tooltip text (hover help)
- */
- public void setToolTipText(String tip)
- {
- button.setToolTipText(tip);
- }
- /**
- * Private hook called by system when this widget is disposed.
- */
- public void widgetDisposed(DisposeEvent e)
- {
- if (local!=null)
- local.dispose();
- if (interim!=null)
- interim.dispose();
- if (inherit!=null)
- inherit.dispose();
- }
- /*
- public static void main(String[] args)
- {
- // Example on how to use widget
- final InheritControl c1,c2,c3;
- final Text text1,text2,text3;
- Display display = new Display();
- Shell shell = new Shell();
- GridLayout g=new GridLayout();
- g.numColumns=2;
- shell.setLayout(g);
- c1=new InheritControl(shell,SWT.NULL);
- text1 = new Text (shell, SWT.BORDER);
- c2=new InheritControl(shell,SWT.NULL);
- text2 = new Text (shell, SWT.BORDER);
- c3=new InheritControl(shell,SWT.NULL);
- text3 = new Text (shell, SWT.BORDER);
- Button b1=new Button(shell,SWT.NULL);
- b1.setText("Normal button ....");
- //Add listeners:
- c1.addSelectionListener(new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- text1.setEnabled(c1.isLocal);
- };
- });
- c2.addSelectionListener(new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- text2.setEnabled(c2.isLocal);
- };
- });
- c3.addSelectionListener(new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- text3.setEnabled(c3.isLocal);
- };
- });
- shell.pack();
- shell.open();
- // Event loop
- while (! shell.isDisposed())
- {
- if (! display.readAndDispatch()) display.sleep();
- }
- display.dispose();
- System.exit(0);
- }
- */
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControlLayout.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControlLayout.java
deleted file mode 100644
index ca002ff0c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControlLayout.java
+++ /dev/null
@@ -1,44 +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.widgets;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Layout;
-
-public class InheritControlLayout extends Layout
-{
- private Point iExtent; // the cached size
-
- protected Point computeSize(Composite composite, int wHint, int hHint, boolean changed)
- {
- Control [] children = composite.getChildren();
- if (changed || (iExtent == null) )
- //iExtent = children[0].computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- iExtent = children[0].computeSize(wHint, hHint, true);
- return new Point(iExtent.x, iExtent.y);
- }
- protected void layout(Composite composite, boolean changed)
- {
- Control [] children = composite.getChildren();
- if (changed || (iExtent == null) )
- iExtent = children[0].computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- children[0].setBounds(0, 0, iExtent.x, iExtent.y);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritableEntryField.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritableEntryField.java
deleted file mode 100644
index fa4382c1d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritableEntryField.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.widgets;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * This is an entry which allows the user to decide whether to
- * inherit a parent value or type in his own local value.
- * <p>
- * To accomplish this, we create a composite containing a toggle button
- * followed by an entry field.
- * <p>
- * The toggle button has left and right arrows.
- * Typically, an arrow pointing to the left means to inherit from parent,
- * and pointing to the right means to override locally.
- * However, the control can be used for any binary decision!
- * <p>
- * Although this control inherits from Composite it does not make sense to
- * set a layout for it or to add children to it.
- */
-/*
- * dwd: modified for defect 57974 (accessibility problems)
- * Formatted source and organized imports.
- * Removed all references to InheritControl.
- * Changed button from SWT.ARROW to SWT.PUSH. SWT.ARROW buttons are not accessible.
- * Simplified internal call structure complicated by case handling for InheritControl.
- */
-public class InheritableEntryField extends Composite implements KeyListener {
- private InheritButton toggleButton = null;
- private Text entryField = null;
- private String inheritValue = ""; //$NON-NLS-1$
- private String localValue = ""; //$NON-NLS-1$
- private boolean isLocal = true;
- private boolean allowEditOfInherited = false;
- private List listeners;
-
- /**
- * Constructor
- * @param parent The parent composite to hold this widget
- * @param style the SWT style for this widget (eg, SWT.BORDER or SWT.NULL)
- */
- public InheritableEntryField(Composite parent, int style) {
- this(parent, style, SWT.NULL, SWT.SINGLE | SWT.BORDER, true);
- }
-
- /**
- * Constructor when you want to set the style of the toggle button and entry field too.
- * @param parent The parent composite to hold this widget
- * @param style the SWT style for this overall widget (eg, SWT.BORDER or SWT.NULL)
- * @param buttonStyle the SWT style for the toggle button widget
- * @param textStyle the SWT style for the entry field widget
- */
- public InheritableEntryField(Composite parent, int style, int buttonStyle, int textStyle) {
- this(parent, style, buttonStyle, textStyle, true);
- }
-
- /**
- * Constructor when you want to hide the toggle button
- * @param parent The parent composite to hold this widget
- * @param style the SWT style for this overall widget (eg, SWT.BORDER or SWT.NULL)
- * @param buttonStyle the SWT style for the toggle button widget
- * @param textStyle the SWT style for the entry field widget
- * @param showToggleButton true to show the toggle button, false not to
- */
- public InheritableEntryField(Composite parent, int style, int buttonStyle, int textStyle, boolean showToggleButton) {
- super(parent, style);
-
- // must initialize list of listeners before anything else
- listeners = new Vector();
-
- prepareComposite(2);
- if (showToggleButton) {
- createToggleButton(this, buttonStyle);
- }
- createTextField(this, textStyle);
- setLocal(true); // default state
- }
-
- /**
- * Toggle the inherit/local state.
- * It is important that you have already called setLocalText and setInheritedText
- */
- public void setLocal(boolean local) {
- boolean wasLocal = isLocal;
- isLocal = local;
-
- if (isLocal != wasLocal) {
- notifyStateChangeListeners();
- }
-
- if (isLocal) { // from inherit to local
- if (allowEditOfInherited && !wasLocal) inheritValue = entryField.getText();
- entryField.setEnabled(true);
- entryField.setText(localValue);
- } else { // from local to inherit
- if (wasLocal) // if this is actually a toggle
- localValue = entryField.getText(); // remember what old local value was
- entryField.setText(inheritValue);
- entryField.setEnabled(allowEditOfInherited);
- }
- if (toggleButton != null) {
- toggleButton.setLocal(isLocal);
- }
- }
-
- /**
- * Query the inherit/local state
- */
- public boolean isLocal() {
- return isLocal;
- }
-
- /**
- * Specify if user is allowed to edit the inherited text. Default is false.
- */
- public void setAllowEditingOfInheritedText(boolean allow) {
- allowEditOfInherited = allow;
- }
-
- /**
- * Set the entry field's inherited text value
- */
- public void setInheritedText(String text) {
- if (text == null) text = ""; //$NON-NLS-1$
- this.inheritValue = text;
- }
-
- /**
- * Query the entry field's inherited text value.
- * If widget is in inherit mode, returns entry field contents, else returns cached value
- */
- public String getInheritedText() {
- if (!isLocal)
- return entryField.getText();
- else
- return inheritValue;
- }
-
- /**
- * Set the entry field's local text value
- */
- public void setLocalText(String text) {
- if (text == null) text = ""; //$NON-NLS-1$
- this.localValue = text;
- }
-
- /**
- * Query the entry field's local text value.
- * If widget is in local mode, returns entry field contents, else returns "".
- */
- public String getLocalText() {
- if (isLocal)
- return entryField.getText();
- else
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Query the entry field's current contents, regardless of local/inherit state
- */
- public String getText() {
- return entryField.getText();
- }
-
- /**
- * Return a reference to the entry field
- */
- public Text getTextField() {
- return entryField;
- }
-
- /**
- * Return the toggle button
- */
- public InheritButton getToggleButton() {
- return toggleButton;
- }
-
- /**
- * Disable the toggle. Used when there is no inherited value
- */
- public void setToggleEnabled(boolean enabled) {
- if (toggleButton == null) return;
- toggleButton.setEnabled(enabled);
- }
-
- /**
- * Set the tooltip text for the toggle button
- */
- public void setToggleToolTipText(String tip) {
- if (toggleButton == null) return;
- toggleButton.setToolTipText(tip);
- }
-
- /**
- * Set the tooltip text for the entry field
- */
- public void setTextFieldToolTipText(String tip) {
- entryField.setToolTipText(tip);
- }
-
- /**
- * Set the entry field's text limit
- */
- public void setTextLimit(int limit) {
- entryField.setTextLimit(limit);
- }
-
- /**
- * Set the focus to the toggle button
- */
- public void setToggleButtonFocus() {
- if (toggleButton == null) return;
- toggleButton.setFocus();
- }
-
- /**
- * Set the focus to the entry field
- */
- public void setTextFieldFocus() {
- entryField.setFocus();
- }
-
- /**
- * Register a listener interested in when the button is toggled
- * <p>
- * Call {@link #isLocal()} to determine if left (false) or right (true) was pressed.
- * @see #removeSelectionListener(SelectionListener)
- */
- public void addSelectionListener(SelectionListener listener) {
- if (toggleButton == null) return;
- toggleButton.addSelectionListener(listener);
- }
-
- /**
- * Remove a previously set toggle button selection listener.
- * @see #addSelectionListener(SelectionListener)
- */
- public void removeSelectionListener(SelectionListener listener) {
- if (toggleButton == null) return;
- toggleButton.removeSelectionListener(listener);
- }
-
- /**
- * Register a listener interested in entry field modify events
- * <p>
- * @see #removeModifyListener(ModifyListener)
- */
- public void addModifyListener(ModifyListener listener) {
- entryField.addModifyListener(listener);
- }
-
- /**
- * Remove a previously set entry field listener.
- * @see #addModifyListener(ModifyListener)
- */
- public void removeModifyListener(ModifyListener listener) {
- entryField.removeModifyListener(listener);
- }
-
- // -----------------------
- // INTERNAL-USE METHODS...
- // -----------------------
- /**
- * Prepares the given composite control and sets the default layout data.
- * @param numColumns the number of columns in the composite layout.
- */
- protected Composite prepareComposite(int numColumns) {
- Composite composite = this;
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = 0;
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- composite.setLayoutData(data);
- return composite;
- }
-
- /**
- * Creates a text field with a given style.
- * @param parent the parent composite.
- * @param textStyle the style of the text field.
- */
- protected void createTextField(Composite parent, int textStyle) {
- entryField = new Text(parent, textStyle);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = 150;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- entryField.setLayoutData(data);
- entryField.addKeyListener(this);
- }
-
- protected void createToggleButton(Composite parent, int buttonStyle) {
- toggleButton = new InheritButton(parent);
- toggleButton.addKeyListener(this);
- toggleButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setLocal(!isLocal());
- }
- });
- }
-
- public void setToggleButtonHeight(int height) {
- if (toggleButton == null) return;
- ((GridData) toggleButton.getLayoutData()).heightHint = height;
- ((GridData) toggleButton.getLayoutData()).grabExcessVerticalSpace = false;
- ((GridData) toggleButton.getLayoutData()).verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
- }
-
- public void keyPressed(KeyEvent e) {
- }
-
- public void keyReleased(KeyEvent e) {
- if ((e.stateMask == SWT.CTRL) && (e.keyCode == SWT.ARROW_LEFT) && isLocal()) {
- setLocal(false);
- } else if ((e.stateMask == SWT.CTRL) && (e.keyCode == SWT.ARROW_RIGHT) && !isLocal()) {
- setLocal(true);
- }
- }
-
- /**
- * Adds a state change listener. If the listener was already added, it will not be added again.
- * @param l the listener to add.
- */
- public void addStateChangeListener(IInheritableEntryFieldStateChangeListener l) {
-
- if (!listeners.contains(l)) {
- listeners.add(l);
- }
- }
-
- /**
- * Removes a state change listener.
- * @param l the listener to remove.
- */
- public void removeStateChangeListener(IInheritableEntryFieldStateChangeListener l) {
- listeners.remove(l);
- }
-
- /**
- * Notifies all state change listeners.
- */
- private void notifyStateChangeListeners() {
- Iterator iter = listeners.iterator();
-
- while (iter.hasNext()) {
- IInheritableEntryFieldStateChangeListener listener = (IInheritableEntryFieldStateChangeListener)(iter.next());
- listener.stateChanged(this);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteBaseServerLauncherForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteBaseServerLauncherForm.java
deleted file mode 100644
index 7708d4c4b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteBaseServerLauncherForm.java
+++ /dev/null
@@ -1,114 +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.widgets;
-
-import org.eclipse.rse.core.internal.subsystems.RemoteServerLauncherConstants;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.ServerLaunchType;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.propertypages.ISystemConnectionWizardErrorUpdater;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Base Remote server launcher form. Extend this to provide a specialized server launcher form
- */
-public abstract class RemoteBaseServerLauncherForm extends SystemBaseForm implements IServerLauncherForm, RemoteServerLauncherConstants, ISystemConnectionWizardErrorUpdater
-{
-
-
-
- protected String _hostName;
-
- protected ISystemMessageLine _msgLine;
-
- /**
- * Constructor for EnvironmentVariablesForm.
- * @param msgLine
- */
- public RemoteBaseServerLauncherForm(Shell shell, ISystemMessageLine msgLine)
- {
- super(shell, msgLine);
- _msgLine = msgLine;
- }
-
- public abstract void disable();
-
-
- /**
- * @see org.eclipse.rse.ui.SystemBaseForm#createContents(Composite)
- */
- public Control createContents(Composite parent)
- {
- // server lanucher group
- Group group =createGroupControl(parent);
-
- // create launcher type controls
- createLauncherControls(group);
-
- // help
- SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "srln0000"); //$NON-NLS-1$
-
- // initialization
- initDefaults();
- return parent;
- }
-
- protected Group createGroupControl(Composite parent)
- {
- return SystemWidgetHelpers.createGroupComposite(
- parent,
- 1,
- SystemResources.RESID_PROP_SERVERLAUNCHER_MEANS);
-
- }
- protected abstract void createLauncherControls(Group group);
- protected abstract ServerLaunchType getLaunchType();
- protected abstract void setLaunchType(ServerLaunchType type);
-
-
-
-
- protected abstract void initDefaults();
-
-
-
- /**
- * Verify page contents on OK.
- * @return true if all went well, false if error found.
- */
- public abstract boolean verify();
-
- /**
- * Update the actual values in the server launcher, from the widgets. Called on successful press of OK.
- * @return true if all went well, false if something failed for some reason.
- */
- public abstract boolean updateValues(IServerLauncherProperties launcher);
-
-
- public void setHostname(String hostname)
- {
- _hostName = hostname;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteServerLauncherForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteServerLauncherForm.java
deleted file mode 100644
index 846723fd6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteServerLauncherForm.java
+++ /dev/null
@@ -1,627 +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.widgets;
-
-import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
-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;
-import org.eclipse.rse.ui.validators.SystemNumericVerifyListener;
-import org.eclipse.rse.ui.validators.ValidatorPortInput;
-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.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * Comment goes here
- */
-public class RemoteServerLauncherForm extends RemoteBaseServerLauncherForm
-{
-
- private Button _radioDaemon, _radioRexec, _radioNone, _checkBoxSSL, _checkBoxRexecSSL, _checkBoxAutoDetect;
- private Text _fieldDaemonPort;
- private Label _labelDaemonPort;
-
- private Text _fieldRexecPath, _fieldRexecInvocation, _fieldRexecPort;
- private Label _labelRexecPath, _labelRexecInvocation, _labelRexecPort;
-
- private Composite _daemonControls, _rexecControls, _noneControls;
-
- private ValidatorPortInput _daemonPortValidator;
- private ValidatorPortInput _rexecPortValidator;
-
-
- private ServerLaunchType _origlaunchType;
- private String _origPath;
- private String _origInvocation;
- private int _origRexecPort;
- private int _origDaemonPort;
- private boolean _origUseSSL;
- private boolean _origAutoDetect;
-
- /**
- * Constructor for EnvironmentVariablesForm.
- * @param msgLine
- */
- public RemoteServerLauncherForm(Shell shell, ISystemMessageLine msgLine)
- {
- super(shell, msgLine);
- _daemonPortValidator = new ValidatorPortInput();
- _rexecPortValidator = new ValidatorPortInput();
- }
-
- public boolean isDirty()
- {
- boolean isDirty = _origlaunchType != getLaunchType() ||
- !_origPath.equals(getServerInstallPath()) ||
- !_origInvocation.equals(getServerInvocation()) ||
- _origRexecPort != getREXECPortAsInt() ||
- _origDaemonPort != getDaemonPortAsInt() ||
- _origUseSSL != getUseSSL() ||
- _origAutoDetect != getAutoDetect();
- return isDirty;
- }
-
- public void disable()
- {
- _radioDaemon.setEnabled(false);
- _radioRexec.setEnabled(false);
- _radioNone.setEnabled(false);
- _fieldRexecInvocation.setEnabled(false);
- _fieldRexecPath.setEnabled(false);
- _fieldRexecPort.setEnabled(false);
- _fieldDaemonPort.setEnabled(false);
- _checkBoxSSL.setEnabled(false);
- _checkBoxRexecSSL.setEnabled(false);
- _checkBoxAutoDetect.setEnabled(false);
- }
-
-
-
- protected void createLauncherControls(Group group)
- {
- // daemon controls
- _radioDaemon =
- SystemWidgetHelpers.createRadioButton(
- group,
- SystemResources.RESID_PROP_SERVERLAUNCHER_RADIO_DAEMON,
- this);
- _radioDaemon.setToolTipText(
- SystemResources.RESID_PROP_SERVERLAUNCHER_RADIO_DAEMON_TOOLTIP);
-
- _daemonControls = SystemWidgetHelpers.createComposite(group, 1);
- GridLayout dlayout = new GridLayout();
- dlayout.numColumns = 3;
- GridData ddata = new GridData(GridData.FILL_HORIZONTAL);
- ddata.horizontalIndent = 20;
-
- GridData dd = new GridData();
- dd.widthHint = 30;
- String portRange = " (1-" + ValidatorPortInput.MAXIMUM_PORT_NUMBER + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- _labelDaemonPort =
- SystemWidgetHelpers.createLabel(
- _daemonControls,
- SystemResources.RESID_CONNECTION_DAEMON_PORT_LABEL + portRange);
- _fieldDaemonPort = SystemWidgetHelpers.createTextField(_daemonControls, this);
- _fieldDaemonPort.setToolTipText(SystemResources.RESID_CONNECTION_DAEMON_PORT_TIP);
- _fieldDaemonPort.setLayoutData(dd);
- _fieldDaemonPort.addVerifyListener(new SystemNumericVerifyListener());
- _daemonControls.setLayout(dlayout);
- _daemonControls.setLayoutData(ddata);
-
- // rexec controls
- _radioRexec =
- SystemWidgetHelpers.createRadioButton(
- group,
- SystemResources.RESID_PROP_SERVERLAUNCHER_RADIO_REXEC,
- this);
- _radioRexec.setToolTipText(
- SystemResources.RESID_PROP_SERVERLAUNCHER_RADIO_REXEC_TOOLTIP);
-
- _rexecControls = SystemWidgetHelpers.createComposite(group, 1);
- GridLayout layout = new GridLayout();
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalIndent = 20;
- _labelRexecPath =
- SystemWidgetHelpers.createLabel(
- _rexecControls,
- SystemResources.RESID_PROP_SERVERLAUNCHER_PATH);
- _fieldRexecPath = SystemWidgetHelpers.createTextField(_rexecControls, this);
- _fieldRexecPath.setToolTipText(
- SystemResources.RESID_PROP_SERVERLAUNCHER_PATH_TOOLTIP);
-
- Composite subRexecControls = SystemWidgetHelpers.createComposite(_rexecControls, 1);
- GridLayout l2 = new GridLayout();
- GridData d2 = new GridData(GridData.FILL_HORIZONTAL);
- l2.numColumns = 4;
-
- _labelRexecInvocation =
- SystemWidgetHelpers.createLabel(
- subRexecControls,
- SystemResources.RESID_PROP_SERVERLAUNCHER_INVOCATION);
- _fieldRexecInvocation = SystemWidgetHelpers.createTextField(subRexecControls, this);
- _fieldRexecInvocation.setToolTipText(
- SystemResources.RESID_PROP_SERVERLAUNCHER_INVOCATION_TOOLTIP);
-
- GridData d3 = new GridData();
- d3.widthHint = 30;
-
- _labelRexecPort =
- SystemWidgetHelpers.createLabel(
- subRexecControls,
- SystemResources.RESID_CONNECTION_PORT_LABEL + portRange);
- _fieldRexecPort = SystemWidgetHelpers.createTextField(subRexecControls, this);
- _fieldRexecPort.setToolTipText(SystemResources.RESID_CONNECTION_PORT_TIP);
- _fieldRexecPort.setLayoutData(d3);
- _fieldRexecPort.addVerifyListener(new SystemNumericVerifyListener());
-
- subRexecControls.setLayout(l2);
- subRexecControls.setLayoutData(d2);
-
- _checkBoxAutoDetect = SystemWidgetHelpers.createCheckBox(_rexecControls, SystemResources.RESID_SUBSYSTEM_AUTODETECT_LABEL, this);
- _checkBoxAutoDetect.setToolTipText(SystemResources.RESID_SUBSYSTEM_AUTODETECT_TIP);
- _checkBoxRexecSSL = SystemWidgetHelpers.createCheckBox(_rexecControls, SystemResources.RESID_SUBSYSTEM_SSL_LABEL, this);
- _checkBoxRexecSSL.setToolTipText(SystemResources.RESID_SUBSYSTEM_SSL_TIP);
-
- _rexecControls.setLayout(layout);
- _rexecControls.setLayoutData(data);
-
- // manual controls
- _radioNone =
- SystemWidgetHelpers.createRadioButton(
- group,
- SystemResources.RESID_PROP_SERVERLAUNCHER_RADIO_NONE,
- 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, RSEUIPlugin.HELPPREFIX + "srln0001"); //$NON-NLS-1$
- SystemWidgetHelpers.setHelp(_radioRexec, RSEUIPlugin.HELPPREFIX + "srln0002"); //$NON-NLS-1$
- SystemWidgetHelpers.setHelp(_radioNone, RSEUIPlugin.HELPPREFIX + "srln0003"); //$NON-NLS-1$
- SystemWidgetHelpers.setHelp(_fieldRexecPath, RSEUIPlugin.HELPPREFIX + "srln0004"); //$NON-NLS-1$
- SystemWidgetHelpers.setHelp(_fieldRexecInvocation, RSEUIPlugin.HELPPREFIX + "srln0005"); //$NON-NLS-1$
- }
-
- protected void initDefaults()
- {
- _radioDaemon.setSelection(true);
- _fieldDaemonPort.setEnabled(_radioDaemon.getSelection());
- _fieldRexecPath.setEnabled(_radioRexec.getSelection());
- _labelRexecPath.setEnabled(_radioRexec.getSelection());
- _fieldRexecInvocation.setEnabled(_radioRexec.getSelection());
- _labelRexecInvocation.setEnabled(_radioRexec.getSelection());
- _labelRexecPort.setEnabled(_radioRexec.getSelection());
- _fieldRexecPort.setEnabled(_radioRexec.getSelection());
- _checkBoxRexecSSL.setEnabled(_radioRexec.getSelection());
- _checkBoxAutoDetect.setEnabled(_radioRexec.getSelection());
- _checkBoxSSL.setEnabled(_radioNone.getSelection());
-
- _fieldDaemonPort.setText(String.valueOf(DEFAULT_DAEMON_PORT));
- _fieldRexecPath.setText(DEFAULT_REXEC_PATH);
- _fieldRexecInvocation.setText(DEFAULT_REXEC_SCRIPT);
- _fieldRexecPort.setText(String.valueOf(DEFAULT_REXEC_PORT));
- }
-
- /**
- * Set the initial values for the widgets, based on the server launcher
- */
- public void initValues(IServerLauncherProperties launcher)
- {
- IRemoteServerLauncher isl = (IRemoteServerLauncher)launcher;
-
- ServerLaunchType type = isl.getServerLaunchType();
- String path = isl.getServerPath();
- String invocation = isl.getServerScript();
- int rexecport = isl.getRexecPort(); // changed from getPortAsInt via d54335
- int daemonPort = isl.getDaemonPort(); // defect 54335
- boolean useSSL = isl.getConnectorService().isUsingSSL();
- boolean autoDetectSSL = isl.getAutoDetectSSL();
-
- // find out if daemon can be launched
- boolean allowDaemon = isl.isEnabledServerLaunchType(ServerLaunchType.DAEMON_LITERAL);
-
- // find out if rexec can be launched
- boolean allowRexec = isl.isEnabledServerLaunchType(ServerLaunchType.REXEC_LITERAL);
-
- // find out if connect to running server should be allowed
- boolean allowNo = isl.isEnabledServerLaunchType(ServerLaunchType.RUNNING_LITERAL);
-
- // enable/disable as appropriate
- setDaemonLaunchEnabled(allowDaemon);
- setRexecLaunchEnabled(allowRexec);
- setNoLaunchEnabled(allowNo);
-
- setLaunchType(type);
-
- setDaemonPort(daemonPort);
- setServerInstallPath(path);
- setServerInvocation(invocation);
- setREXECPort(rexecport);
- setUseSSL(useSSL);
- setAutoDetect(autoDetectSSL);
-
- if (!allowDaemon && !allowRexec && !allowNo) {
- disable();
- }
-
-
- _origlaunchType = getLaunchType();
- _origPath = getServerInstallPath();
- _origInvocation = getServerInvocation();
- _origRexecPort = getREXECPortAsInt();
- _origDaemonPort = getDaemonPortAsInt();
- _origUseSSL = getUseSSL();
- _origAutoDetect = getAutoDetect();
- }
-
- /**
- * Verify page contents on OK.
- * @return true if all went well, false if error found.
- */
- public boolean verify()
- {
- SystemMessage msg = null;
- ServerLaunchType launchType = getLaunchType();
- if (launchType == ServerLaunchType.REXEC_LITERAL)
- {
- String port = getREXECPort();
- msg = _rexecPortValidator.validate(port);
-
- if (msg == null)
- {
- String path = getServerInstallPath();
-
- if (path == null || path.length() == 0)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD);
- }
-
- if (msg != null)
- {
- _msgLine.setErrorMessage(msg.getLevelOneText());
- }
- else
- {
- _msgLine.clearErrorMessage();
- }
- }
- else
- {
- _msgLine.setErrorMessage(msg);
- }
- }
- else if (launchType == ServerLaunchType.DAEMON_LITERAL)
- {
- String port = getDaemonPort();
- msg = _daemonPortValidator.validate(port);
-
- if (msg == null)
- {
- _msgLine.clearErrorMessage();
- }
- else
- {
- _msgLine.setErrorMessage(msg);
- }
- }
- else
- {
- _msgLine.clearErrorMessage();
- }
- notifyVerifyListeners();
- return (msg==null);
- }
-
- /**
- * Update the actual values in the server launcher, from the widgets. Called on successful press of OK.
- * @return true if all went well, false if something failed for some reason.
- */
- public boolean updateValues(IServerLauncherProperties launcher)
- {
- ServerLaunchType launchType = getLaunchType();
- String path = getServerInstallPath();
- String invocation = getServerInvocation();
- int rexecPort = getREXECPortAsInt();
- int daemonPort = getDaemonPortAsInt();
- boolean useSSL = getUseSSL();
- boolean autoDetect = getAutoDetect();
-
- IRemoteServerLauncher isl = (IRemoteServerLauncher)launcher;
- isl.setServerLaunchType(launchType);
- isl.setServerPath(path);
- isl.setServerScript(invocation);
- isl.setRexecPort(rexecPort); // changed from setPort via d54335. Phil
- isl.setDaemonPort(daemonPort);
- isl.setAutoDetectSSL(autoDetect);
- isl.getConnectorService().setIsUsingSSL(useSSL);
- try
- {
- isl.getConnectorService().commit();
- }
- catch (Exception e)
- {
- return false;
- }
- return true;
- }
-
-
- public void handleEvent(Event evt)
- {
-
- boolean useRexec = _radioRexec.getSelection();
- _fieldDaemonPort.setEnabled(_radioDaemon.getSelection());
- _fieldRexecPath.setEnabled(useRexec);
- _labelRexecPath.setEnabled(useRexec);
- _fieldRexecInvocation.setEnabled(useRexec);
- _labelRexecInvocation.setEnabled(useRexec);
- _fieldRexecPort.setEnabled(useRexec);
- _labelRexecPort.setEnabled(useRexec);
- _checkBoxAutoDetect.setEnabled(useRexec);
- _checkBoxRexecSSL.setEnabled(useRexec && !_checkBoxAutoDetect.getSelection());
- _checkBoxSSL.setEnabled(_radioNone.getSelection());
-
- verify();
- }
-
- protected ServerLaunchType getLaunchType()
- {
- if (_radioDaemon.getSelection())
- return ServerLaunchType.DAEMON_LITERAL;
- else if (_radioRexec.getSelection())
- return ServerLaunchType.REXEC_LITERAL;
- else if (_radioNone.getSelection())
- return ServerLaunchType.RUNNING_LITERAL;
- else
- return null;
- }
-
- protected boolean getUseSSL()
- {
- if (_radioRexec.getSelection())
- return _checkBoxRexecSSL.getSelection();
- else return _checkBoxSSL.getSelection();
- }
-
- protected boolean getAutoDetect()
- {
- if (_radioNone.getSelection()) return false;
- if (_radioRexec.getSelection())
- return _checkBoxAutoDetect.getSelection();
- else return true;
- }
-
- protected void setUseSSL(boolean use)
- {
- _checkBoxSSL.setSelection(use);
- _checkBoxRexecSSL.setSelection(use);
- }
-
- protected void setAutoDetect(boolean use)
- {
- _checkBoxAutoDetect.setSelection(use);
- }
-
- protected void setLaunchType(ServerLaunchType type)
- {
- if (type == ServerLaunchType.DAEMON_LITERAL)
- {
- _radioDaemon.setSelection(true);
- _radioRexec.setSelection(false);
- _radioNone.setSelection(false);
- }
- else if (type == ServerLaunchType.REXEC_LITERAL)
- {
- _radioRexec.setSelection(true);
- _radioDaemon.setSelection(false);
- _radioNone.setSelection(false);
- }
- else if (type == ServerLaunchType.RUNNING_LITERAL)
- {
- _radioNone.setSelection(true);
- _radioRexec.setSelection(false);
- _radioDaemon.setSelection(false);
- }
- else
- {
- _radioNone.setSelection(false);
- _radioRexec.setSelection(false);
- _radioDaemon.setSelection(false);
- }
- }
-
-
- /**
- * Sets whether to enable daemon launch.
- * @param enable <code>true</code> if daemon launch should be enabled, <code>false</code> otherwise.
- */
- public void setDaemonLaunchEnabled(boolean enable)
- {
- //_radioDaemon.setVisible(enable);
- //_daemonControls.setVisible(enable);
- //_daemonControls.getLayout().
- _labelDaemonPort.setEnabled(enable);
- _fieldDaemonPort.setEnabled(enable);
-
- _radioDaemon.setEnabled(enable);
- }
-
- /**
- * Sets whether to enable rexec launch.
- * @param enable <code>true</code> if rexec launch should be enabled, <code>false</code> otherwise.
- */
- public void setRexecLaunchEnabled(boolean enable)
- {
- /*
- _radioRexec.setVisible(enable);
- _rexecControls.setVisible(enable);
- _labelRexecInvocation.setVisible(enable);
- _labelRexecPath.setVisible(enable);
- _labelRexecPort.setVisible(enable);
- */
- _fieldRexecInvocation.setEnabled(enable);
- _fieldRexecPath.setEnabled(enable);
- _fieldRexecPort.setEnabled(enable);
-
- _radioRexec.setEnabled(enable);
- }
-
- public void setHostname(String hostname)
- {
- _hostName = hostname;
- }
-
- /**
- * Set the daemon port widget value
- * @param port - the port value as a string
- */
- public void setDaemonPort(String port)
- {
- _fieldDaemonPort.setText(port);
- }
-
- /**
- * Set the daemon port widget value
- * @param port - the port value as an int
- */
- public void setDaemonPort(int port)
- {
- _fieldDaemonPort.setText(Integer.toString(port));
- }
-
- /**
- * Get the Daemon port widget value
- * @return the widget's current value as an int
- */
- public int getDaemonPortAsInt()
- {
- int port = 0;
- try {
- port = Integer.parseInt(_fieldDaemonPort.getText().trim());
- } catch (Exception exc) { }
- return port;
- }
- /**
- * Get the daemon port widget value
- * @return the widget's current value as a string
- */
- public String getDaemonPort()
- {
- return _fieldDaemonPort.getText().trim();
- }
-
- /**
- * Set the REXEC port's widget value, as a String
- * @param port - the value to apply to the widget
- */
- public void setREXECPort(String port)
- {
- _fieldRexecPort.setText(port);
- }
- /**
- * Set the REXEC port's widget value, given an int port value
- * @param port - the value to apply to the widget.
- */
- public void setREXECPort(int port)
- {
- _fieldRexecPort.setText(Integer.toString(port));
- }
- /**
- * Get the REXEC port widget value
- * @return the widget's current value as an int
- */
- public int getREXECPortAsInt()
- {
- int port = 0;
- try {
- port = Integer.parseInt(_fieldRexecPort.getText().trim());
- } catch (Exception exc) { }
- return port;
- }
- /**
- * Get the REXEC port widget value
- * @return the widget's current value as a string
- */
- public String getREXECPort()
- {
- return _fieldRexecPort.getText().trim();
- }
-
-
- /**
- * Sets whether to enable no launch.
- * @param enable <code>true</code> if no launch should be enabled, <code>false</code> otherwise.
- */
- public void setNoLaunchEnabled(boolean enable)
- {
- _radioNone.setEnabled(enable);
- _checkBoxSSL.setEnabled(enable);
- }
- /**
- * Return the current value of the REXEC server install path widget
- * @return widget value as a string
- */
- public String getServerInstallPath()
- {
- return _fieldRexecPath.getText().trim();
- }
- /**
- * Set the REXEC server install path widget's value
- * @param path - the text to set the widget's value to
- */
- public void setServerInstallPath(String path)
- {
- _fieldRexecPath.setText(path);
- }
- /**
- * Return the current value of the REXEC server invocation widget
- * @return widget value as a string
- */
- public String getServerInvocation()
- {
- return _fieldRexecInvocation.getText();
- }
- /**
- * Set the REXEC server invocation widget's value
- * @param invocation - the text to set the widget's value to
- */
- public void setServerInvocation(String invocation)
- {
- _fieldRexecInvocation.setText(invocation);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 59485a79e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SSLForm.java
+++ /dev/null
@@ -1,117 +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.widgets;
-
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-
-
-/**
- * This class provides a reusable widget for selecting whether or not
- * a communications connection should use SSL
- */
-public class SSLForm extends SystemBaseForm {
-
-
- private Button _sslCheckBox;
- private Button _nonsslCheckBox;
-
- /**
- * Constructor for SSLForm.
- * @param msgLine
- */
- public SSLForm(ISystemMessageLine msgLine) {
- super(null, msgLine); // null is the shell.
- }
-
- /**
- * Determines whether ssl is checked or not
- * @return
- */
- 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 setNonSSLALertIsChecked(boolean flag)
- {
- _nonsslCheckBox.setSelection(flag);
- }
-
- /**
- * Enable/disable the ssl checkbox
- * @param flag
- */
- public void enableCheckBoxes(boolean flag)
-
- {
- _sslCheckBox.setEnabled(flag);
- _nonsslCheckBox.setEnabled(flag);
- }
-
- /**
- * @see org.eclipse.rse.ui.SystemBaseForm#createContents(Composite)
- */
- public Control createContents(Composite parent)
- {
- super.setShell(parent.getShell());
- _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;
- }
-
-
-
- public void handleEvent(Event evt)
- {
-
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 8c12fc165..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ServerConnectionSecurityForm.java
+++ /dev/null
@@ -1,94 +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.widgets;
-
-
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class ServerConnectionSecurityForm extends SystemBaseForm
-{
-
-
-
- private SSLForm _sslForm;
-
- private ISystemMessageLine _msgLine;
-
- public ServerConnectionSecurityForm(Shell shell, ISystemMessageLine msgLine)
- {
- super(shell, msgLine);
- _msgLine = msgLine;
- }
-
- public void disable()
- {
- _sslForm.enableCheckBoxes(false);
- }
-
- public void enable()
- {
- _sslForm.enableCheckBoxes(true);
- }
-
- /**
- * @see org.eclipse.rse.ui.SystemBaseForm#createContents(Composite)
- */
- public Control createContents(Composite parent)
- {
-
- _sslForm = new SSLForm(_msgLine);
- _sslForm.createContents(parent);
-
- // help
-
- // initialization
- initDefaults();
- return parent;
- }
-
- private void initDefaults()
- {
- // pull info from preferences and/or persistence model
-
- }
-
- public void setAlertSSL(boolean flag)
- {
- _sslForm.setSSLALertIsChecked(flag);
- }
-
- public boolean getAlertSSL()
- {
- 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/SystemCollapsableSection.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemCollapsableSection.java
deleted file mode 100644
index e40946624..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemCollapsableSection.java
+++ /dev/null
@@ -1,441 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Layout;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Class to provide a collapsible composite that can be collapsed
- * to hide some controls
- */
-public class SystemCollapsableSection extends Composite implements MouseListener, PaintListener
-{
-
- public static final String Copyright =
- "(C) Copyright IBM Corp. 2002, 2003. All Rights Reserved."; //$NON-NLS-1$
-
- protected boolean _bCollapsed = false;
- protected boolean _bMouseOver = false;
- protected Composite _compositePage = null;
- protected String _strText = null;
- protected String _strExpandedText = null;
- protected String _strCollapsedText = null;
- protected String _strExpandedToolTip = null;
- protected String _strCollapsedToolTip = null;
- protected Label _labelTitle = null;
-
- protected static Color _colorCollapsable = null;
-
- // yantzi: added so we can have a collapse / expand action in the iSeries table view for
- // accessability reasons.
- private List listeners = new ArrayList(5);
-
- /**
- *
- */
- protected class RTwisteeLayout extends Layout
- {
-
- /**
- *
- */
- protected Point computeSize(
- Composite composite,
- int wHint,
- int hHint,
- boolean flushCache)
- {
- checkWidget();
-
- Point ptSize = getTitleSize(_strText);
- Point ptPageSize =
- _compositePage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
-
- ptSize.x = Math.max(ptSize.x, ptPageSize.x + 8);
-
- if (_bCollapsed == false)
- ptSize.y += ptPageSize.y;
-
- return ptSize;
- }
-
- /**
- * Layout.
- */
- protected void layout(Composite composite, boolean flushCache)
- {
- Point ptTitleSize = getTitleSize(_strText);
- getLocation();
-
- if (_bCollapsed == true)
- {
- Rectangle rectClient = getClientArea();
- Point ptPageSize =
- new Point(
- rectClient.width - 16,
- rectClient.height - ptTitleSize.y);
- _compositePage.setBounds(16, ptTitleSize.y, ptPageSize.x, 4);
- setSize(
- Math.max(ptTitleSize.x, ptPageSize.x + 16),
- ptTitleSize.y);
- }
-
- else
- {
- Rectangle rectClient = getClientArea();
- Point ptPageSize =
- new Point(
- rectClient.width - 16,
- rectClient.height - ptTitleSize.y);
- // Point ptPageSize = _compositePage.computeSize( SWT.DEFAULT, SWT.DEFAULT, true );
- _compositePage.setBounds(
- 16,
- ptTitleSize.y,
- ptPageSize.x,
- ptPageSize.y);
- setSize(
- Math.max(ptTitleSize.x, ptPageSize.x + 16),
- ptTitleSize.y + ptPageSize.y);
- }
- }
- }
-
- /**
- * Constructor
- */
- public SystemCollapsableSection(Composite compositeParent)
- {
-
- super(compositeParent, SWT.NULL);
-
- if (_colorCollapsable == null)
- {
- Display display = Display.getCurrent();
- _colorCollapsable = new Color(display, 0, 140, 140);
- }
-
- setLayout(new RTwisteeLayout());
-
- // Page content
- //-------------
- _compositePage = new Composite(this, SWT.NULL);
-
- GridData gridData = new GridData();
- setLayoutData(gridData);
-
- addPaintListener(this);
- addMouseListener(this);
- }
-
- /**
- * Get the actual composite inside the collapsible section to
- * be usde for filling it up with controls
- */
- public Composite getPageComposite()
- {
- return _compositePage;
- }
-
- /**
- * Compute the title area size.
- */
- private Point getTitleSize(String strText)
- {
-
- if (strText == null || strText.length() == 0)
- {
- strText = "MMMMMMMMMMMM"; //$NON-NLS-1$
- }
-
- GC gc = new GC(this);
-
- Point ptSize = gc.textExtent(strText);
- ptSize.y = Math.max(ptSize.y, gc.getFontMetrics().getHeight());
-
- ptSize.x += 20;
- ptSize.y = Math.max(ptSize.y, 20);
-
- gc.dispose();
-
- return ptSize;
- }
-
- /**
- * Return the collapse state
- */
- public boolean getCollapsed()
- {
- return _bCollapsed;
- }
-
- /**
- * Get the default title text
- */
- public String getText()
- {
- return _strText;
- }
-
- /**
- *
- */
- public void mouseDoubleClick(MouseEvent e)
- {
-
- }
-
- /**
- *
- */
- public void mouseDown(MouseEvent e)
- {
-
- }
-
- /**
- * Handle the collapse or expand request from the mouse up event
- */
- public void mouseUp(MouseEvent e)
- {
-
- _bCollapsed = _bCollapsed == true ? false : true;
-
- if (_bCollapsed)
- {
- setToolTipText(_strCollapsedToolTip);
- }
- else
- {
- setToolTipText(_strExpandedToolTip);
- }
-
- List list = new ArrayList();
-
- Composite compositeParent = this;
-
- do
- {
- list.add(compositeParent);
- compositeParent = compositeParent.getParent();
- }
- while (compositeParent instanceof Shell == false);
-
- for (int i = list.size() - 1; i >= 0; --i)
- {
- compositeParent = (Composite) list.get(i);
- compositeParent.layout();
- }
-
- fireCollapseEvent(_bCollapsed);
- // composite.redraw();
- }
-
- /**
- * Paint the control
- */
- public void paintControl(PaintEvent e)
- {
-
- paintCollapsable(e.gc, 0, 2, _bCollapsed);
-
- if (_bCollapsed)
- {
- setToolTipText(_strCollapsedToolTip);
- if (_strCollapsedText != null)
- _strText = _strCollapsedText;
- }
- else
- {
- setToolTipText(_strExpandedToolTip);
- if (_strExpandedText != null)
- _strText = _strExpandedText;
- }
-
- if (_strText == null)
- return;
-
- e.gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_BLACK));
- e.gc.drawString(_strText, 17, 0, true);
- }
-
- /**
- * Paints the two states of a collapsable indicator of a collapsable container.
- */
- public static void paintCollapsable(
- GC gc,
- int iX,
- int iY,
- boolean bCollapsed)
- {
-
- // Not collapsed: v
- //-----------------
-
- if (bCollapsed == false)
- {
- gc.setForeground(_colorCollapsable);
-
- int iA = iX;
- int iB = iY + 3;
- gc.drawLine(iA, iB, iA + 10, iB);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA + 8, iB);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA + 6, iB);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA + 4, iB);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA + 2, iB);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA, iB);
-
- iA = iX;
- iB = iY;
- }
-
- // Collapsed: >
- //-------------
- else
- {
- gc.setForeground(_colorCollapsable);
-
- int iA = iX + 2;
- int iB = iY;
-
- gc.drawLine(iA, iB, iA, iB + 10);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA, iB + 8);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA, iB + 6);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA, iB + 4);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA, iB + 2);
- iA++;
- iB++;
- gc.drawLine(iA, iB, iA, iB);
- }
- }
-
- /**
- * Set the section to be collapsed
- */
- public void setCollapsed(boolean bCollapsed)
- {
-
- _bCollapsed = bCollapsed;
- if (_bCollapsed)
- setToolTipText(_strCollapsedToolTip);
- else
- setToolTipText(_strExpandedToolTip);
-
- redraw();
-
- fireCollapseEvent(bCollapsed);
- }
-
- /**
- * Set the default text title
- */
- public void setText(String strText)
- {
- _strText = strText;
- redraw();
- }
- /**
- * Set the title to be displayed when the section is expanded
- */
- public void setExpandedText(String strText)
- {
- _strExpandedText = strText;
- }
- /**
- * Set the title to be displayed when the section is collapsed
- */
- public void setCollapsedText(String strText)
- {
- _strCollapsedText = strText;
- }
-
- /**
- * Sets tooltips used in expanded and collapsed states.
- * @param strExpandedToolTip tooltip for the expanded state. For example, "click line to collapse the section".
- * @param strCollapsedToolTip tooltip for the collapsed state. For example, "click line to expand the section".
- */
- public void setToolTips(String strExpandedToolTip, String strCollapsedToolTip)
- {
- _strCollapsedToolTip = strCollapsedToolTip;
- _strExpandedToolTip = strExpandedToolTip;
- }
-
- /**
- * Add a collapse / expand event listener
- */
- public void addCollapseListener(ISystemCollapsableSectionListener listener)
- {
- if (!listeners.contains(listener))
- {
- listeners.add(listener);
- }
- }
-
- /**
- * Remove a collapse / expand event listener
- */
- public void removeCollapseListener(ISystemCollapsableSectionListener listener)
- {
- listeners.remove(listener);
- }
-
- /**
- * Notify collapse / expand listeners of an event
- */
- private void fireCollapseEvent(boolean collapsed)
- {
- for (int i = 0; i < listeners.size(); i++)
- {
- ((ISystemCollapsableSectionListener) listeners.get(i)).sectionCollapsed(collapsed);
- }
- }
-
-} \ 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
deleted file mode 100644
index 839aa5c6c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java
+++ /dev/null
@@ -1,451 +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.widgets;
-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;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * @author coulthar
- *
- * This class attempts to encapsulate the states an edit page (with apply/reset buttons)
- * can go through and handle managing the state transitions. For example, it manages
- * the enabled/disabled state of the apply/reset buttons.
- * <p>
- * There are three <b>modes</b> supported:
- * <ol>
- * <li>New -> user is creating a "new thing". In this state, the apply button label is
- * "New", and the reset button is hidden
- * <li>Edit -> user is editing an existing thing. The apply and reset buttons have usual labels
- * <li>Unset -> overall composite is hidden
- * </ol>
- * In addition to the modes, there are these <b>states</b> supported
- * <ol>
- * <li>No changes -> the apply and reset buttons are disabled
- * <li>Changes pending -> the apply and reset buttons are enabled
- * <li>Changes made -> the apply and reset buttons are disabled
- * </ol>
- * There are constants for these modes and states in {@link org.eclipse.rse.ui.widgets.ISystemEditPaneStates}
- * <p>
- * To use this properly, call the following methods at the appropriate times:
- * <ul>
- * <li>{@link #setNewMode()} -> when users selects to create a new thing.
- * <li>{@link #setEditMode()} -> when user selects to edit an existing thing.
- * <li>{@link #setUnsetMode()} -> when user selects nothing or something not editable
- * <li>{@link #setChangesMade()} -> when user changes anything in the pane!
- * <li>{@link #isSaveRequired()} -> if changes are pending, this will prompt the user if they wish to save the
- * changes or discard the changes. Returns true or false.
- * <li>{@link #applyPressed()} -> when user successfully presses apply
- * <li>{@link #resetPressed()} -> when user successfully presses reset
- * </ul>
- */
-public class SystemEditPaneStateMachine implements ISystemEditPaneStates
- //, SelectionListener
-{
- // state
- private Composite composite;
- private Button applyButton, resetButton;
- private int mode, state;
- private int backupMode, backupState;
- private SystemMessage pendingMsg;
- private String applyLabel_applyMode;
- private String applyLabel_newMode;
- private String applyTip_applyMode;
- private String applyTip_newMode;
- private boolean applyLabelMode;
- private boolean newSetByDelete; //d47125
-
-
- /**
- * Constructor for SystemEditPaneStateMachine.
- * <p>
- * This constructor sets the initial mode to MODE_UNSET.
- * <p>
- * While this class will handle enabling/disabling the apply/reset buttons,
- * it is still your job to add listeners and actually do the applying and resetting!
- * @param composite - overall composite of the edit pane
- * @param applyButton - the Apply pushbutton
- * @param resetButton - the Reset pushbutton. Can be null.
- */
- public SystemEditPaneStateMachine(Composite composite, Button applyButton, Button resetButton)
- {
- super();
- this.composite = composite;
- this.applyButton = applyButton;
- this.resetButton = resetButton;
-
- this.applyLabel_applyMode = applyButton.getText();
- this.applyTip_applyMode = applyButton.getToolTipText();
- this.applyLabelMode = true;
-
- setApplyLabelForNewMode(SystemResources.BUTTON_CREATE_LABEL, SystemResources.BUTTON_CREATE_TOOLTIP);
-
- setUnsetMode();
- //setMode(MODE_UNSET);
- //setState(STATE_INITIAL);
- //enableButtons();
-
- // I have decided it is safer to force the user of this class to call this,
- // since it is possible that Apply will find errors and not actually do the apply
- /*
- applyButton.addSelectionListener(this);
- if (resetButton != null)
- resetButton.addSelectionListener(this);
- */
- }
-
- /**
- * Set the label and tooltip to use for the apply button in "new" mode.
- * By default, generic values are used
- */
- public void setApplyLabelForNewMode(String label, String tooltip)
- {
- this.applyLabel_newMode = label;
- this.applyTip_newMode = tooltip;
- }
-
- /**
- * Set the mode to "New". User has selected "new" and wants to create a new thing.
- * It is your responsibility to call {@link #isSaveRequired()} first.
- * It is assumed that after the object is created by pressing Apply, your UI will
- * select the new object and then call setEditMode
- */
- public void setNewMode()
- {
- setButtonText(mode, MODE_NEW);
- setMode(MODE_NEW);
- setState(STATE_INITIAL);
- enableButtons();
- if (!composite.isVisible())
- composite.setVisible(true);
- }
- /**
- * Set the mode to "Edit". User has selected an existing object and wants to changed/edit it
- * It is your responsibility to call {@link #isSaveRequired()} first.
- */
- public void setEditMode()
- {
- setButtonText(mode, MODE_EDIT);
- setMode(MODE_EDIT);
- setState(STATE_INITIAL);
- enableButtons();
- if (!composite.isVisible())
- composite.setVisible(true);
- }
- /**
- * Set the mode to "Unset". User has selected nothing or something not editable
- * It is your responsibility to call {@link #isSaveRequired()} first.
- */
- public void setUnsetMode()
- {
- setButtonText(mode, MODE_UNSET);
- setMode(MODE_UNSET);
- setState(STATE_INITIAL);
- enableButtons();
- if (composite.isVisible())
- composite.setVisible(false);
- }
- /**
- * User has made changes, such as typing text or selecting a checkbox or radio button.
- * It is VERY important this be called religiously for every possible change the user can make!
- */
- public void setChangesMade()
- {
- setState(STATE_PENDING);
- enableButtons();
- }
- /**
- * Query if it is ok to switch modes.
- * If no changes pending, returns false
- * If changes pending, user is asked to whether to save (true) or discard (false).
- */
- public boolean isSaveRequired()
- {
- boolean changesPending = areChangesPending();
- if (changesPending)
- {
- if (pendingMsg == null)
- {
- pendingMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_CHANGES);
- }
- SystemMessageDialog pendingMsgDlg = new SystemMessageDialog(composite.getShell(), pendingMsg);
- try {
- changesPending = pendingMsgDlg.openQuestion();
- } catch (Exception exc) {}
- }
- //if (!changesPending) // user has made decision, so clear state
- setState(STATE_INITIAL); // one way or another, decision has been made
- return changesPending;
- }
-
- /**
- * User has successfully pressed Apply (that is, no errors found)
- */
- public void applyPressed()
- {
- setState(STATE_APPLIED);
- enableButtons();
- }
- /**
- * User has successfully pressed Reset (that is, no errors found)
- */
- public void resetPressed()
- {
- setState(STATE_INITIAL);
- enableButtons();
- }
-
- /**
- * Are any changes pending?
- */
- public boolean areChangesPending()
- {
- return (state == STATE_PENDING);
- }
-
- // -----------------------------------
- // GETTERS FOR STUFF PASSED IN CTOR...
- // -----------------------------------
- /**
- * Returns the resetButton.
- * @return Button
- */
- public Button getResetButton()
- {
- return resetButton;
- }
-
- /**
- * Returns the applyButton.
- * @return Button
- */
- public Button getApplyButton()
- {
- return applyButton;
- }
-
- /**
- * Returns the composite.
- * @return Composite
- */
- public Composite getComposite()
- {
- return composite;
- }
-
- // -----------------------------------
- // GETTERS FOR MODE AND STATE
- // -----------------------------------
- /**
- * Returns the mode.
- * @return int
- * @see org.eclipse.rse.ui.widgets.ISystemEditPaneStates
- */
- public int getMode()
- {
- return mode;
- }
-
- /**
- * Returns the state.
- * @return int
- * @see org.eclipse.rse.ui.widgets.ISystemEditPaneStates
- */
- public int getState()
- {
- return state;
- }
-
-
- // -------------------
- // INTERNAL METHODS...
- // -------------------
-
- /**
- * enable/disable buttons based on state
- */
- private void enableButtons()
- {
- boolean enableApply = false;
- boolean enableReset = false;
- switch(state)
- {
- case STATE_INITIAL:
- enableApply = false;
- enableReset = false;
- break;
- case STATE_APPLIED:
- enableApply = false;
- enableReset = false; // true; only true if reset returns to pre-applied values. Not usually the case
- break;
- case STATE_PENDING:
- enableApply = true;
- enableReset = true;
- break;
- }
- applyButton.setEnabled(enableApply);
- if (resetButton != null)
- resetButton.setEnabled(enableReset);
- }
-
- /**
- * Change apply button label and tooltiptext when switching
- * to/from new/edit modes.
- */
- private void setButtonText(int oldMode, int newMode)
- {
- if (oldMode != newMode)
- {
- if ((newMode == MODE_NEW) && applyLabelMode)
- {
- applyButton.setText(applyLabel_newMode);
- applyButton.setToolTipText(applyTip_newMode);
- applyLabelMode = false;
- if (resetButton != null)
- {
- //resetButton.setVisible(false);
- //GridData gd = (GridData)applyButton.getLayoutData();
- //if (gd != null)
- //{
- // gd.horizontalSpan = 2;
- // composite.layout(true);
- //}
- }
- }
- else if ((newMode == MODE_EDIT) && !applyLabelMode)
- {
- applyButton.setText(applyLabel_applyMode);
- applyButton.setToolTipText(applyTip_applyMode);
- applyLabelMode = true;
- if (resetButton != null)
- {
- //resetButton.setVisible(true);
- //GridData gd = (GridData)applyButton.getLayoutData();
- //if (gd != null)
- //{
- // gd.horizontalSpan = 1;
- // composite.layout(true);
- //}
- }
- }
- }
- }
-
- /**
- * Sets the mode.
- * @param mode The mode to set
- * @see org.eclipse.rse.ui.widgets.ISystemEditPaneStates
- */
- private void setMode(int mode)
- {
- this.mode = mode;
- }
-
- /**
- * Sets the state.
- * @param state The state to set
- * @see org.eclipse.rse.ui.widgets.ISystemEditPaneStates
- */
- private void setState(int state)
- {
- this.state = state;
- }
-
- /*
- * Keep track of the fact that New is selected by the Delete action and not by user
- * so that user can exit later by using OK without supplying a command //d47125
- */
- public void setNewSetByDelete(boolean newSetByDelete)
- {
- this.newSetByDelete = newSetByDelete;
- }
-
- public boolean getNewSetByDelete()
- {
- return newSetByDelete;
- }
- /*
- * Internal method.
- * From SelectionListener. Called when user presses Apply or Reset buttons
- *
- public void widgetSelected(SelectionEvent event)
- {
- Object source = event.getSource();
- if (source == applyButton)
- {
- setState(STATE_APPLIED);
- enableButtons();
- }
- else if (source == resetButton)
- {
- setState(STATE_INITIAL);
- enableButtons();
- }
- }
- **
- * Internal method.
- * From SelectionListener. Called when user presses Enter?
- *
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
- */
-
- /**
- * Backup state method
- */
- public void backup()
- {
- backupMode = mode;
- backupState = state;
- }
-
- /**
- * Restore state method
- */
- public void restore()
- {
- switch(backupMode)
- {
- case MODE_UNSET:
- setUnsetMode();
- break;
- case MODE_NEW:
- setNewMode();
- break;
- case MODE_EDIT:
- setEditMode();
- break;
- }
- switch(backupState)
- {
- case STATE_PENDING:
- setChangesMade();
- break;
- case STATE_INITIAL:
- break;
- case STATE_APPLIED:
- applyPressed();
- break;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHistoryCombo.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHistoryCombo.java
deleted file mode 100644
index 928fadafc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHistoryCombo.java
+++ /dev/null
@@ -1,715 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.widgets;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.dialogs.SystemWorkWithHistoryDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleAdapter;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-
-
-/**
- * This re-usable widget is for a combox box that persists its history and
- * allows the user to manipulate that history.
- * <p>
- * The composite is layed as follows:</p>
- * <pre><code>
- * ______________v...
- * </code></pre>
- * @see #updateHistory()
- */
-public class SystemHistoryCombo extends Composite implements ISystemCombo, TraverseListener, KeyListener
-{
- private Combo historyCombo = null;
- private Button historyButton = null;
- private String historyKey = null;
- private String[] defaultHistory; // pc41439
- private boolean readonly = false;
- private boolean autoUppercase = false;
-
- private int maxComboEntries; // DY: Debugger requested we provide support to limit the number of entries
- private static final int DEFAULT_MAX_COMBO_ENTRIES = 20; // in the combo box for transient data like job name / number. Note: this does
- // not affect the edit history portion of this widget. I have guessed at a
- // default limit of 20 entries.
-
- private static final int DEFAULT_COMBO_WIDTH = 100;
- // dwd private static final int DEFAULT_BUTTON_WIDTH = 10;
- private static final int DEFAULT_BUTTON_WIDTH = 13; // dwd: changed from 10 to accomodate focus rectangle
- private static final int DEFAULT_MARGIN = 1;
-
-
- /**
- * Constructor for SystemHistoryCombo
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically it is just SWT.NULL
- * @param key The unique string used as a preferences key to persist the history for this widget
- * @param readonly Set to true for a readonly combo vs user-editable combo box
- */
- public SystemHistoryCombo(Composite parent, int style, String key, boolean readonly)
- {
- this(parent, style, key, DEFAULT_MAX_COMBO_ENTRIES, readonly);
- }
-
- /**
- * Constructor for SystemHistoryCombo
- * @param parent The owning composite
- * @param style The swt style to apply to the overall composite. Typically it is just SWT.NULL
- * @param key The unique string used as a preferences key to persist the history for this widget
- * @param maxComboEntries The number of history entries to show in the combo box. This only restricts the
- * combo box not the full history list
- * @param readonly Set to true for a readonly combo vs user-editable combo box
- */
- public SystemHistoryCombo(Composite parent, int style, String key, int maxComboEntries, boolean readonly)
- {
- super(parent, style);
- historyKey = key;
- this.readonly = readonly;
- prepareComposite(2);
- historyCombo = createCombo(this, readonly);
- //historyCombo.addTraverseListener(this);
- historyCombo.addKeyListener(this);
- //setWidthHint(DEFAULT_COMBO_WIDTH+DEFAULT_BUTTON_WIDTH+DEFAULT_MARGIN);
- this.maxComboEntries = maxComboEntries;
- createHistoryButton();
- String[] history = getHistory();
- if (history.length > 0)
- setItems(history);
- addOurButtonSelectionListener();
- }
-
- /**
- * Return the combo box widget
- */
- public Combo getCombo()
- {
- return historyCombo;
- }
- /**
- * Set the width hint for the combo box widget (in pixels).
- * Default is only 100, so you may want to set it.
- * A rule of thumb is 10 pixels per character, but allow 15 for the litte button on the right.
- * You must call this versus setting it yourself, else you may see truncation.
- */
- public void setWidthHint(int widthHint)
- {
- // after much research it was decided that it was the wrong thing to do to
- // explicitly set the widthHint of a child widget without our composite, as
- // that could end up being a bigger number than the composites widthHint itself
- // if the caller set its it directly.
- // Rather, we just set the overall composite width and specify the combo child
- // widget is to grab all the space within that which the little button does not use.
- /*((GridData)historyCombo.getLayoutData()).grabExcessHorizontalSpace = true;
- ((GridData)historyCombo.getLayoutData()).horizontalAlignment = GridData.FILL;
- ((GridData)historyCombo.getLayoutData()).widthHint = widthHint;*/
- ((GridData)getLayoutData()).widthHint = widthHint + DEFAULT_BUTTON_WIDTH + DEFAULT_MARGIN;
- }
-
- /**
- * Set auto-uppercase. When enabled, all non-quoted values are uppercases when added to the history.
- */
- public void setAutoUpperCase(boolean enable)
- {
- this.autoUppercase = enable;
- }
-
- /**
- * Return the history button widget
- */
- public Button getHistoryButton()
- {
- return historyButton;
- }
-
- /**
- * Set the combo field's current contents
- */
- public void setText(String text)
- {
- if (!readonly)
- {
- historyCombo.setText(text);
- updateHistory();
- }
- else
- {
- int selIdx = -1;
- String[] currentItems = historyCombo.getItems();
- String[] newItems = new String[currentItems.length + 1];
- newItems[0] = text;
- for (int idx=0; (selIdx==-1) && (idx<currentItems.length); idx++)
- {
- if (text.equals(currentItems[idx]))
- selIdx = idx;
- else
- newItems[idx+1] = currentItems[idx];
- }
- // did not find the given text in the history, so update history...
- if (selIdx == -1)
- {
- setItems(newItems);
- selIdx = currentItems.length;
- SystemPreferencesManager.getPreferencesManager().setWidgetHistory(historyKey, newItems);
- }
- if (selIdx >= 0)
- {
- historyCombo.select(selIdx);
- }
- }
- }
-
- /**
- * Query the history combo field's current contents
- */
- public String getText()
- {
- return historyCombo.getText();
- }
-
- /**
- * Disable/Enable all the child controls.
- */
- public void setEnabled(boolean enabled)
- {
- historyCombo.setEnabled(enabled);
- historyButton.setEnabled(enabled);
- }
- /**
- * Set the tooltip text for the combo field
- */
- public void setToolTipText(String tip)
- {
- historyCombo.setToolTipText(tip);
- }
- /**
- * Set the tooltip text for the history button
- */
- public void setHistoryButtonToolTipText(String tip)
- {
- historyButton.setToolTipText(tip);
- }
- /**
- * Same as #setHistoryButtonToolTipText(String)
- */
- public void setButtonToolTipText(String tip)
- {
- historyButton.setToolTipText(tip);
- }
-
- /**
- * Set the combo field's text limit
- */
- public void setTextLimit(int limit)
- {
- historyCombo.setTextLimit(limit);
- }
- /**
- * Set the focus to the combo field
- */
- public boolean setFocus()
- {
- return historyCombo.setFocus();
- }
-
- /**
- * Set the items in the combo field
- */
- public void setItems(String[] items)
- {
- // DY; Modified to add maxComboSize restriction
- if ((items != null) && (items.length > maxComboEntries))
- {
- String[] historySubSet = new String[maxComboEntries];
- System.arraycopy(items, 0, historySubSet, 0, maxComboEntries);
- historyCombo.setItems(historySubSet);
- }
- else
- {
- historyCombo.setItems(items);
- }
- }
-
- /**
- * Set the items to default the history to, IF the history
- * is currently empty.
- */
- public void setDefaultHistory(String[] items)
- {
- this.defaultHistory = items; // pc41439
- if (historyCombo.getItemCount() == 0)
- {
- setItems(items);
- SystemPreferencesManager.getPreferencesManager().setWidgetHistory(historyKey, items); //d41439
- //updateHistory(); d41439
- }
- }
-
- /**
- * Reset the history key. This changes the contents!
- * You should re-call setDefaultHistory() as well after this, if you had called it before
- */
- public void setHistoryKey(String key)
- {
- this.historyKey = key;
- String[] history = getHistory();
- if (history.length > 0)
- setItems(history);
- else
- historyCombo.removeAll();
- }
-
- /**
- * Get the items in the combo field
- */
- public String[] getItems()
- {
- return historyCombo.getItems();
- }
-
- /**
- * Select the combo dropdown list entry at the given index
- */
- public void select(int selIdx)
- {
- if (selIdx >= historyCombo.getItemCount())
- return;
- historyCombo.deselectAll();
- historyCombo.select(selIdx);
- historyCombo.clearSelection(); // so text is not selected
- //sendEvent(SWT.Selection);
- // for some reason no event is fired on selection.
- // This overcomes that shortcoming ... uses same solution as jface
- Event e = new Event();
- //e.time = event.time;
- //e.stateMask = event.stateMask;
- //e.doit = event.doit;
- historyCombo.notifyListeners(SWT.Selection, e);
- }
- /**
- * Select the given text. This finds the given string in the list,
- * determines its zero-based offset, and calls select for that index.
- * If the item is not found it does nothing.
- * Returns the index number of the found string, or -1 if not found.
- */
- public int select(String itemText)
- {
- String[] items = historyCombo.getItems();
- int matchIdx = -1;
- if ((items==null) || (items.length==0))
- return matchIdx;
- for (int idx=0; (matchIdx==-1) && (idx<items.length); idx++)
- if (itemText.equals(items[idx]))
- matchIdx = idx;
- if (matchIdx != -1)
- select(matchIdx);
- return matchIdx;
- }
- /**
- * Same as {@link #select(int)}
- */
- public void setSelectionIndex(int selIdx)
- {
- select(selIdx);
- }
-
- /**
- * Clear the selection of the text in the entry field part of the combo.
- * Also deselects the list part.
- */
- public void clearSelection()
- {
- //if (!readonly)
- historyCombo.clearSelection();
- //else
- historyCombo.deselectAll();
- }
- /**
- * Clear the selection of the text in the entry field part of the combo.
- * Does not deselect the list part.
- */
- public void clearTextSelection()
- {
- //historyCombo.clearSelection();
- String text = historyCombo.getText();
- historyCombo.deselectAll();
- historyCombo.setText(text);
- }
-
- /**
- * Get the index number of the currently selected item. Only really
- * reliable in readonly mode.
- */
- public int getSelectionIndex()
- {
- return historyCombo.getSelectionIndex();
- }
-
- /**
- * Register a listener interested in an item is selected in the combo box
- * @see #removeSelectionListener(SelectionListener)
- */
- public void addSelectionListener(SelectionListener listener)
- {
- historyCombo.addSelectionListener(listener);
- }
- /**
- * Remove a previously set combo box selection listener.
- * @see #addSelectionListener(SelectionListener)
- */
- public void removeSelectionListener(SelectionListener listener)
- {
- historyCombo.removeSelectionListener(listener);
- }
- /**
- * Register a listener interested in entry field modify events
- * @see #removeModifyListener(ModifyListener)
- */
- public void addModifyListener(ModifyListener listener)
- {
- historyCombo.addModifyListener(listener);
- }
- /**
- * Remove a previously set entry field listener.
- * @see #addModifyListener(ModifyListener)
- */
- public void removeModifyListener(ModifyListener listener)
- {
- historyCombo.removeModifyListener(listener);
- }
-
- /**
- * Return the current history for the directory combo box
- */
- public String[] getHistory()
- {
- return SystemPreferencesManager.getPreferencesManager().getWidgetHistory(historyKey);
- }
- /**
- * Update the history with current entry field setting, but don't refresh contents.
- * <p>
- * This is called automatically for you when setText is called. However, for non-readonly
- * versions, you should still call this yourself when OK is successfully pressed on the
- * dialog box.
- */
- public void updateHistory()
- {
- updateHistory(false);
- }
- /**
- * Update the history with current entry field setting, and optionally refresh the list from the new history
- * <p>
- * This is called automatically for you when setText is called. However, for non-readonly
- * versions, you should still call this yourself when OK is successfully pressed on the
- * dialog box.
- */
- public void updateHistory(boolean refresh)
- {
- String textValue = historyCombo.getText().trim();
- if (autoUppercase)
- if (!(textValue.startsWith("\"")&& textValue.endsWith("\""))) //$NON-NLS-1$ //$NON-NLS-2$
- textValue = textValue.toUpperCase();
- boolean alreadyThere = false;
- String[] newHistory = null;
- if (textValue.length() > 0)
- {
- // d41463 - seletced item should go to the top
- String[] currentHistory = historyCombo.getItems();
- if ( currentHistory.length > 0)
- {
- if (!textValue.equals(currentHistory[0]))
- {
- alreadyThere = false;
- // if string exists
- for (int idx=0; !alreadyThere && (idx<currentHistory.length); idx++)
- {
- if (textValue.equals(currentHistory[idx]))
- alreadyThere = true;
- }
-
- if (alreadyThere)
- newHistory = new String[currentHistory.length];
- else
- {
- newHistory = new String[currentHistory.length >= maxComboEntries ? maxComboEntries : currentHistory.length + 1];
- }
- newHistory[0] = textValue;
- int idx2 = 1;
- // copy the rest
- for (int idx=0; idx< currentHistory.length && idx2 < newHistory.length; idx++)
- {
- if (!textValue.equals(currentHistory[idx]))
- {
- newHistory[idx2] = currentHistory[idx];
- ++idx2;
- }
- }
- SystemPreferencesManager.getPreferencesManager().setWidgetHistory(historyKey, newHistory);
- }
- }
- else
- {
- newHistory =new String[1];
- newHistory[0] = textValue;
- SystemPreferencesManager.getPreferencesManager().setWidgetHistory(historyKey, newHistory);
- }
- if (refresh && (newHistory != null))
- {
- setItems(newHistory);
- setText(textValue);
- }
- /*
- String[] currentHistory = historyCombo.getItems();
- String[] newHistory = new String[currentHistory.length + 1];
- newHistory[0] = textValue;
- boolean alreadyThere = false;
- for (int idx=0; !alreadyThere && (idx<currentHistory.length); idx++)
- {
- if (textValue.equals(currentHistory[idx]))
- alreadyThere = true;
- else
- newHistory[idx+1] = currentHistory[idx];
- }
- if (!alreadyThere)
- SystemPreferencesManager.getGlobalPreferences().setWidgetHistory(historyKey, newHistory);
- */
- }
- }
- /**
- * Set the history to the given array of strings. Replaces what is there.
- */
- public void setHistory(String[] newHistory)
- {
- SystemPreferencesManager.getPreferencesManager().setWidgetHistory(historyKey, newHistory);
- }
-
- // -----------------------
- // INTERNAL-USE METHODS...
- // -----------------------
- /**
- * Prepares this composite control and sets the default layout data.
- * @param Number of columns the new group will contain.
- */
- protected Composite prepareComposite(int numColumns)
- {
- Composite composite = this;
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = 0;
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- // horizontal data...
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = DEFAULT_COMBO_WIDTH+DEFAULT_BUTTON_WIDTH+DEFAULT_MARGIN;
- // vertical data...
- data.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
- data.grabExcessVerticalSpace = false;
-
- composite.setLayoutData(data);
- return composite;
- }
- /**
- * Creates a new combobox instance and sets the default
- * layout data.
- * <p>
- * Does NOT set the widthHint as that causes problems. Instead the combo will
- * consume what space is available within this composite.
- * @param parent composite to put the button into.
- */
- public static Combo createCombo(Composite parent, boolean readonly)
- {
- Combo combo = null;
- if (!readonly)
- combo = new Combo(parent, SWT.DROP_DOWN);
- else
- combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- //System.out.println("Default widthHint = " + data.widthHint);
- combo.setLayoutData(data);
- return combo;
- }
-
- protected void addOurButtonSelectionListener()
- {
- // Add the button listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- historyButtonPressed();
- }
- public void widgetDefaultSelected(SelectionEvent event)
- {
- widgetSelected(event);
- }
-
- };
- historyButton.addSelectionListener(selectionListener);
- }
-
- protected void historyButtonPressed()
- {
- SystemWorkWithHistoryDialog dlg = new SystemWorkWithHistoryDialog(getShell(), getHistory());
- if (defaultHistory != null)
- dlg.setDefaultHistory(defaultHistory);
- dlg.setBlockOnOpen(true);
- dlg.open();
- if (!dlg.wasCancelled())
- {
- String value = historyCombo.getText(); // d41471
- String[] newHistory = dlg.getHistory();
- SystemPreferencesManager.getPreferencesManager().setWidgetHistory(historyKey, newHistory);
- setItems(newHistory);
- historyCombo.setText(value); // Restore the value d41471
- }
- }
-
- protected Button createHistoryButton()
- {
- /*
- dwd: modified for defect 57974 - tab enable, provide focus rectangle, and accessibility text for history button. Original
- scheme used an SWT.ARROW button style which was not tab enabled and could not provide a focus rectangle.
- Changes: made the control a push button, programmatically drew the arrow on the button, and provided accessibility information.
- */
- boolean isDrawn = System.getProperty("os.name").toLowerCase().startsWith("win"); //$NON-NLS-1$ //$NON-NLS-2$
- if (isDrawn) {
- historyButton = new Button(this, SWT.PUSH);
- Display display = this.getDisplay();
- final Image upArrow = new Image(display, 5, 6);
- GC gc = new GC(upArrow);
- gc.setBackground(historyButton.getBackground());
- gc.fillRectangle(upArrow.getBounds());
- gc.setForeground(historyButton.getForeground());
- gc.drawLine(0, 5, 4, 5);
- gc.drawLine(0, 4, 4, 4);
- gc.drawLine(1, 3, 3, 3);
- gc.drawLine(1, 2, 3, 2);
- gc.drawLine(2, 1, 2, 1);
- gc.drawLine(2, 0, 2, 0);
- gc.dispose();
- historyButton.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- upArrow.dispose();
- }
- });
- historyButton.setImage(upArrow);
- } else {
- historyButton = new Button(this, SWT.ARROW);
- historyButton.setAlignment(SWT.UP);
- }
- historyButton.setToolTipText(SystemResources.RESID_WORKWITHHISTORY_BUTTON_TIP);
- historyButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
- public void getHelp(AccessibleEvent e) { // this is the one that should supply the text heard.
- e.result = ""; //$NON-NLS-1$
- }
- public void getName(AccessibleEvent e) { // this is the one that apparently does supply the text heard.
- e.result = historyButton.getToolTipText();
- String prefix = null;
- Composite parent = historyButton.getParent();
- while (parent != null && prefix == null) {
- if (parent instanceof Group) {
- Group group = (Group) parent;
- prefix = group.getText();
- }
- parent = parent.getParent();
- }
- if (prefix != null) {
- e.result = prefix + " " + e.result; //$NON-NLS-1$
- }
- }
- });
-
- GridData data = new GridData();
- data.horizontalAlignment = GridData.HORIZONTAL_ALIGN_BEGINNING;
- data.grabExcessHorizontalSpace = false ;
- data.widthHint = DEFAULT_BUTTON_WIDTH;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = true;
- data.heightHint = 20;
- historyButton.setLayoutData(data);
- return historyButton;
- }
-
- public void setHistoryButtonHeight(int height)
- {
- ((GridData)historyButton.getLayoutData()).heightHint = height;
- ((GridData)historyButton.getLayoutData()).grabExcessVerticalSpace = false;
- ((GridData)historyButton.getLayoutData()).verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
- }
-
- public void keyTraversed(TraverseEvent e)
- {
- int detail = e.detail;
- String s = "unknown"; //$NON-NLS-1$
- switch (detail)
- {
- case SWT.TRAVERSE_ARROW_NEXT: s="Arrow Next"; break; //$NON-NLS-1$
- case SWT.TRAVERSE_ARROW_PREVIOUS: s="Arrow Previous"; break; //$NON-NLS-1$
- case SWT.TRAVERSE_ESCAPE: s="Escape"; break; //$NON-NLS-1$
- case SWT.TRAVERSE_RETURN: s="Return"; break; //$NON-NLS-1$
- case SWT.TRAVERSE_TAB_NEXT:
- s="Tab Next"; //$NON-NLS-1$
- //historyButton.setFocus();
- historyButton.forceFocus();
- //e.doit=false;
- break;
- case SWT.TRAVERSE_TAB_PREVIOUS: s="Tab Previous"; break; //$NON-NLS-1$
- }
- System.out.println("keyTraversed: "+s); //$NON-NLS-1$
- }
-
- public void keyPressed(KeyEvent e)
- {
-
- }
- public void keyReleased(KeyEvent e)
- {
- if ((e.stateMask == SWT.CTRL) && (e.keyCode == SWT.ARROW_UP))
- {
- historyButtonPressed();
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 371da9040..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHostCombo.java
+++ /dev/null
@@ -1,1121 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.widgets;
-import java.util.Vector;
-
-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.SystemPreferencesManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-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;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-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.Shell;
-
-
-/**
- * This re-usable widget is for selecting a connection from the master list of connections.
- * The list is subsettable by one or more system types.
- * There is also the option of including a "New" button to the right of the connection
- * dropdown, for the purpose of creating a new connection.
- * <p>
- * Without the New button, the composite is layed as follows:</p>
- * <pre><code>
- * Connection: ______________________v
- * </code></pre>
- * <p>
- * With the New button, the composite is layed as follows:</p>
- * <pre><code>
- * Connection: ______________v New...
- * </code></pre>
- * <p>
- * There are numerous ways to subset the connection list:</p>
- * <ul>
- * <li>By system type, either by a single type or an array of types. Only connections of these types are listed.
- * <li>By subsystem factory. Only connections with subsystems owned by the given subsystem factory are listed.
- * <li>By subsystem factory category. Only connections which contain subsystems owned by subsystem factories which
- * are defined in their xml extension point as being of the given category are listed.
- * For a list of pre-defined categories, see {@link org.eclipse.rse.core.model.ISubSystemConfigurationCategories}.
- * </ul>
- */
-public class SystemHostCombo extends Composite implements ISelectionProvider, ISystemCombo,
- org.eclipse.rse.model.ISystemResourceChangeListener,
- ISystemResourceChangeEvents, DisposeListener
-{
- protected Label connectionLabel = null;
- protected Combo connectionCombo = null;
- protected Button newButton = null;
- protected boolean showNewButton = true;
- protected boolean showLabel = true;
- protected boolean showQualifiedNames;
- protected boolean listeningForConnectionEvents = false;
- private IHost[] connections = null;
- private SystemNewConnectionAction newConnectionAction = null;
- private String[] restrictSystemTypesTo = null;
- private int gridColumns = 2;
- //private static final int DEFAULT_COMBO_WIDTH = 300;
- //private static final int DEFAULT_BUTTON_WIDTH = 80;
- private String label;
- private String populateSystemType = null; /* used as criteria when refresh is done */
- private String[] populateSystemTypes = null; /* used as criteria when refresh is done */
- private ISubSystemConfiguration populateSSFactory = null; /* used as criteria when refresh is done */
- private String populateSSFactoryId = null; /* used as criteria when refresh is done */
- private String populateSSFactoryCategory = null; /* used as criteria when refresh is done */
- private Cursor waitCursor;
-
- /**
- * Constructor for SystemConnectionCombo when there is only a single system type to restrict the connection list to.
- * @param parent Parent composite
- * @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
- * @param systemType the system type to restrict the connection list to. Can be null or * for all.
- * @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
- * @param showNewButton true if a New... button is to be included in this composite
- */
- public SystemHostCombo(Composite parent, int style, String systemType, IHost defaultConnection, boolean showNewButton)
- {
- super(parent, style);
- restrictSystemTypesTo = new String[1];
- restrictSystemTypesTo[0] = systemType;
- init(parent, showNewButton);
- populateSystemType = systemType;
- populateConnectionCombo(connectionCombo, systemType, defaultConnection, true);
- setConnectionToolTipText();
- addOurConnectionSelectionListener();
- }
- /**
- * Constructor for SystemConnectionCombo when there is an array of system types to restrict the connection list to.
- * @param parent Parent composite
- * @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
- * @param systemTypes the system type array to restrict the connection list to.
- * @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
- * @param showNewButton true if a New... button is to be included in this composite
- */
- public SystemHostCombo(Composite parent, int style, String[] systemTypes, IHost defaultConnection, boolean showNewButton)
- {
- super(parent, style);
- restrictSystemTypesTo = systemTypes;
- init(parent, showNewButton);
- populateSystemTypes = systemTypes;
- populateConnectionCombo(connectionCombo, systemTypes, defaultConnection);
- setConnectionToolTipText();
- addOurConnectionSelectionListener();
- }
- /**
- * Constructor for SystemConnectionCombo when there is a subsystem factory to restrict the list to.
- * @param parent Parent composite
- * @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
- * @param ssConfig Only connections with subsystems owned by this factory are returned.
- * @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
- * @param showNewButton true if a New... button is to be included in this composite
- */
- public SystemHostCombo(Composite parent, int style, ISubSystemConfiguration ssConfig, IHost defaultConnection, boolean showNewButton)
- {
- super(parent, style);
- restrictSystemTypesTo = ssConfig.getSystemTypes();
- init(parent, showNewButton);
- populateSSFactory = ssConfig;
- populateConnectionCombo(connectionCombo, ssConfig, defaultConnection);
- setConnectionToolTipText();
- addOurConnectionSelectionListener();
- }
- /**
- * Constructor for SystemConnectionCombo when there is a subsystem factory id to restrict the list to.
- * To avoid collision with the constructor that takes a string for the system type, this one places the
- * subystem factory Id string parameter after the defaultConnection constructor
- * @param parent Parent composite
- * @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
- * @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
- * @param ssConfigId Only connections with subsystems owned by this configuration are returned.
- * @param showNewButton true if a New... button is to be included in this composite
- */
- public SystemHostCombo(Composite parent, int style, IHost defaultConnection, String ssConfigId, boolean showNewButton)
- {
- super(parent, style);
- restrictSystemTypesTo = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfiguration(ssConfigId).getSystemTypes();
- init(parent, showNewButton);
- populateSSFactoryId = ssConfigId;
- populateConnectionCombo(connectionCombo, ssConfigId, defaultConnection);
- setConnectionToolTipText();
- addOurConnectionSelectionListener();
- }
-
- /**
- * Constructor for SystemConnectionCombo when there is a subsystem factory category to restrict the list to.
- * To avoid collision with the constructor that takes a string for the system type, this one places the
- * string parameter at the end.
- * @param parent Parent composite
- * @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
- * @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
- * @param showNewButton true if a New... button is to be included in this composite
- * @param ssConfigCategory Only connections with subsystems owned by configurations of this category are returned.
- */
- public SystemHostCombo(Composite parent, int style, IHost defaultConnection, boolean showNewButton, String ssConfigCategory)
- {
- this(parent, style, defaultConnection, showNewButton, ssConfigCategory, true);
- }
-
- /**
- * Constructor for SystemConnectionCombo when there is a subsystem factory category to restrict the list to.
- * To avoid collision with the constructor that takes a string for the system type, this one places the
- * string parameter at the end.
- * @param parent Parent composite
- * @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
- * @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
- * @param showNewButton true if a New... button is to be included in this composite
- * @param ssFactoryCategory Only connections with subsystems owned by factories of this category are returned.
- * @param showLabel true if a 'Connection' label is to be included in this composite
- */
- public SystemHostCombo(Composite parent, int style, IHost defaultConnection, boolean showNewButton, String ssFactoryCategory, boolean showLabel)
- {
- super(parent, style);
- if (showNewButton) // this is expensive, so only need to do this if New is enabled
- {
- ISubSystemConfigurationProxy[] ssfProxies = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfigurationProxiesByCategory(ssFactoryCategory);
- Vector vTypes = new Vector();
- for (int idx=0; idx<ssfProxies.length; idx++)
- {
- String[] types = ssfProxies[idx].getSystemTypes();
- for (int jdx=0; jdx<types.length; jdx++)
- {
- if (!vTypes.contains(types[jdx]))
- vTypes.addElement(types[jdx]);
- }
- }
- restrictSystemTypesTo = new String[vTypes.size()];
- for (int idx=0; idx<vTypes.size(); idx++)
- restrictSystemTypesTo[idx] = (String)vTypes.elementAt(idx);
- }
- init(parent, showNewButton, showLabel);
- populateSSFactoryCategory = ssFactoryCategory;
- populateConnectionCombo(connectionCombo, defaultConnection, ssFactoryCategory);
- setConnectionToolTipText();
- addOurConnectionSelectionListener();
- }
-
- /**
- * Set auto-uppercase. When enabled, all non-quoted values are uppercases when added to the history.
- * <p>
- * This method is part of ISystemCombo, so we must support it, but it does not apply this combo widget since the
- * contents are read-only. Hence, it does nothing!
- */
- public void setAutoUpperCase(boolean enable)
- {
-
- }
-
-
- protected void init(Composite parent, boolean showNewButton)
- {
- init(parent, showNewButton, true);
- }
-
-
- protected void init(Composite parent, boolean showNewButton, boolean showLabel)
- {
- this.showNewButton = showNewButton;
- this.showLabel = showLabel;
- showQualifiedNames = SystemPreferencesManager.getPreferencesManager().getQualifyConnectionNames();
- //prepareComposite(showNewButton ? 3 : 2);
- prepareComposite(3);
-
- if ( showLabel )
- //connectionLabel = SystemWidgetHelpers.createLabel(this,rb,ISystemConstants.WIDGET_CONNECTION_ROOT);
- {
- if (label == null)
- connectionLabel = SystemWidgetHelpers.createLabel(this,SystemResources.WIDGET_CONNECTION_LABEL);
- else
- connectionLabel = SystemWidgetHelpers.createLabel(this,label);
- }
- connectionCombo = createConnectionCombo(this);
- if (showNewButton)
- {
- //newConnectionAction = new SystemNewConnectionAction(parent.getShell(), false, this);
- newConnectionAction = getNewConnectionAction(parent.getShell(), this);
- newConnectionAction.restrictSystemTypes(restrictSystemTypesTo);
- newButton = createPushButton(this,SystemResources.WIDGET_BUTTON_NEWCONNECTION_LABEL,SystemResources.WIDGET_BUTTON_NEWCONNECTION_TOOLTIP);
- addOurButtonSelectionListener();
- if ( !showLabel )
- ((GridData)connectionCombo.getLayoutData()).horizontalSpan = 2;
- }
- else
- {
- if( showLabel )
- ((GridData)connectionCombo.getLayoutData()).horizontalSpan = 2;
- else
- ((GridData)connectionCombo.getLayoutData()).horizontalSpan = 3;
- }
- addDisposeListener(this);
- }
- /**
- * Overridable method.
- * Returns action to be called when New... pressed.
- */
- protected SystemNewConnectionAction getNewConnectionAction(Shell shell, ISelectionProvider selectionProvider)
- {
- return new SystemNewConnectionAction(shell, false, selectionProvider);
- }
-
- /**
- * Get the user selected SystemConnection object.
- * Might be null if the list is empty.
- */
- public IHost getHost()
- {
- IHost connection = null;
- int idx = connectionCombo.getSelectionIndex();
- if ((idx >= 0) && (connections!=null) && (idx<connections.length))
- connection = connections[idx];
- return connection;
- }
-
- /**
- * Return the combo box widget
- */
- public Combo getCombo()
- {
- return connectionCombo;
- }
- /**
- * Set the width hint for this whole composite
- * Default is 180.
- */
- public void setWidthHint(int widthHint)
- {
- // after much research it was decided that it was the wrong thing to do to
- // explicitly set the widthHint of a child widget without our composite, as
- // that could end up being a bigger number than the composites widthHint itself
- // if the caller set its it directly.
- // Rather, we just set the overall composite width and specify the combo child
- // widget is to grab all the space within that which the little button does not use.
- ((GridData)getLayoutData()).widthHint = widthHint;
- }
- /**
- * Set button width hint
- */
- public void setButtonWidthHint(int widthHint)
- {
- if (newButton != null)
- {
- ((GridData)newButton.getLayoutData()).widthHint = widthHint;
- }
- }
- /**
- * Set button width hint, based on the width of another widget
- */
- public void setButtonWidthHint(Control otherWidget)
- {
- if (newButton != null)
- {
- //System.out.println("Curr button width = " + newButton.getSize().x);
- //System.out.println("Setting button width to = " + otherWidget.getSize().x);
- ((GridData)newButton.getLayoutData()).widthHint = otherWidget.getSize().x;
- //System.out.println("New button width = " + newButton.getSize().x);
- }
- //else
- // System.out.println("New button is null");
- }
-
- /**
- * Return the number of grid data columns within this composite.
- * Will vary depending if there is a New button or not.
- */
- public int getGridColumns()
- {
- return gridColumns;
- }
- /**
- * Return the New... button widget
- */
- public Button getNewButton()
- {
- return newButton;
- }
- /**
- * Get the prompt Label widget
- */
- public Label getPromptLabel()
- {
- return connectionLabel;
- }
- /**
- * Set the items in the combo field
- */
- public void setItems(String[] items)
- {
- connectionCombo.setItems(items);
- }
- /**
- * Get the items in the combo field
- */
- public String[] getItems()
- {
- return connectionCombo.getItems();
- }
- /**
- * Return the text in the connection combo entry field.
- * This is only of limited value. You should call getSystemConnection() instead.
- */
- public String getText()
- {
- return connectionCombo.getText();
- }
- /**
- * Disable/Enable all the child controls.
- */
- public void setEnabled(boolean enabled)
- {
- connectionCombo.setEnabled(enabled);
- if (newButton != null)
- newButton.setEnabled(enabled);
- }
- /**
- * Set the tooltip text for the directory combo field
- */
- public void setToolTipText(String tip)
- {
- if ( connectionLabel != null )
- connectionLabel.setToolTipText(tip);
- //connectionCombo.setToolTipText(tip);
- }
- /**
- * Set the tooltip text for the new button
- */
- public void setNewButtonToolTipText(String tip)
- {
- if (newButton != null)
- newButton.setToolTipText(tip);
- }
- /**
- * Same as {@link #setNewButtonToolTipText(String)}
- */
- public void setButtonToolTipText(String tip)
- {
- setNewButtonToolTipText(tip);
- }
-
- /**
- * Set the label to use for the prompt.
- */
- public void setLabel(String label)
- {
- this.label = label;
- if (connectionLabel != null)
- connectionLabel.setText(label);
- }
-
- /**
- * Set the focus to the directory combo field
- */
- public boolean setFocus()
- {
- return connectionCombo.setFocus();
- }
- /**
- * Set the focus to the new button
- */
- public void setNewButtonFocus()
- {
- if (newButton != null)
- newButton.setFocus();
- }
-
- /**
- * Select the combo dropdown list entry at the given index.
- */
- public void select(int selIdx)
- {
- connectionCombo.select(selIdx);
- //if (fireEvent)
- {
- Event e = new Event();
- //e.time = event.time;
- //e.stateMask = event.stateMask;
- //e.doit = event.doit;
- connectionCombo.notifyListeners(SWT.Selection, e);
- }
- }
- /**
- * Same as {@link #select(int)}
- */
- public void setSelectionIndex(int selIdx)
- {
- select(selIdx);
- }
- /**
- * Select a connection from the dropdown
- */
- public void select(IHost connection)
- {
- if (connections != null)
- {
- int matchIdx = -1;
- for (int idx=0; (matchIdx==-1) && (idx<connections.length); idx++)
- if (connection == connections[idx])
- matchIdx = idx;
- if (matchIdx != -1)
- select(matchIdx);
- }
- }
-
-
- /**
- * Deselect
- */
- public void clearSelection()
- {
- connectionCombo.clearSelection();
- connectionCombo.deselectAll();
- Event e = new Event();
- //e.time = event.time;
- //e.stateMask = event.stateMask;
- //e.doit = event.doit;
- connectionCombo.notifyListeners(SWT.Selection, e);
- }
- /**
- * Clear the entered/selected contents of the combo box. Clears only the text selection, not the list selection
- */
- public void clearTextSelection()
- {
- connectionCombo.clearSelection();
- }
-
- /**
- * Get the index number of the currently selected item.
- */
- public int getSelectionIndex()
- {
- return connectionCombo.getSelectionIndex();
- }
-
- /**
- * Register a listener interested in an item is selected in the combo box
- * @see #removeSelectionListener(SelectionListener)
- */
- public void addSelectionListener(SelectionListener listener)
- {
- connectionCombo.addSelectionListener(listener);
- }
- /**
- * Remove a previously set combo box selection listener.
- * @see #addSelectionListener(SelectionListener)
- */
- public void removeSelectionListener(SelectionListener listener)
- {
- connectionCombo.removeSelectionListener(listener);
- }
-
- /**
- * Register a listener interested in when the new button is selected
- * @see #removeNewButtonSelectionListener(SelectionListener)
- */
- public void addNewButtonSelectionListener(SelectionListener listener)
- {
- if (newButton != null)
- newButton.addSelectionListener(listener);
- }
- /**
- * Remove a previously set new button selection listener.
- * @see #addNewButtonSelectionListener(SelectionListener)
- */
- public void removeNewButtonSelectionListener(SelectionListener listener)
- {
- if (newButton != null)
- newButton.removeSelectionListener(listener);
- }
-
- /**
- * Register a listener interested in entry field modify events
- * @see #removeModifyListener(ModifyListener)
- */
- public void addModifyListener(ModifyListener listener)
- {
- connectionCombo.addModifyListener(listener);
- }
- /**
- * Remove a previously set entry field listener.
- * @see #addModifyListener(ModifyListener)
- */
- public void removeModifyListener(ModifyListener listener)
- {
- connectionCombo.removeModifyListener(listener);
- }
-
- // -----------------------
- // INTERNAL-USE METHODS...
- // -----------------------
- /**
- * Prepares this composite control and sets the default layout data.
- * @param Number of columns the new group will contain.
- */
- protected Composite prepareComposite(int numColumns)
- {
- gridColumns = numColumns;
- Composite composite = this;
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- //layout.horizontalSpacing = 0;
- //layout.verticalSpacing = 0;
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- // horizontal clues
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = showNewButton ? 250 : 200;
- // vertical clues
- data.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING; //GridData.CENTER;
- data.grabExcessVerticalSpace = false; // true;
-
- composite.setLayoutData(data);
- return composite;
- }
- /**
- * Creates a new readonly connection combobox instance and sets the default
- * layout data, with tooltip text.
- * Assign the listener to the passed in implementer of Listener.
- * <p>
- * This fills the combination with the names of all the active connections of the given
- * system type.
- * @param parent composite to put the button into.
- */
- protected Combo createConnectionCombo(Composite parent)
- {
- Combo combo = createCombo(parent,true);
- setToolTipText(SystemResources.WIDGET_CONNECTION_TOOLTIP);
- return combo;
- }
-
- /**
- * Creates a new combobox instance and sets the default
- * layout data.
- * <p>
- * Does NOT set the widthHint as that causes problems. Instead the combo will
- * consume what space is available within this composite.
- * @param parent composite to put the button into.
- */
- public static Combo createCombo(Composite parent, boolean readonly)
- {
- Combo combo = null;
- if (!readonly)
- combo = new Combo(parent, SWT.DROP_DOWN);
- else
- combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- combo.setLayoutData(data);
- return combo;
- }
-
- /**
- * Populates a readonly connection combobox instance with system connections for the given
- * system type.
- * <p>
- * This fills the combination with the names of all the active connections of the given
- * system type.
- * @param connectionCombo composite to populate
- * @param systemType the system type to restrict the connection list to. Pass null or * for all system types
- * @param defaultConnection the default system connection to preselect.
- * @param preSelectIfNoMatch true if we should preselect the first item if the given connection is not found
- * @return true if given default connection was found and selected
- */
- protected boolean populateConnectionCombo(Combo combo, String systemType, IHost defaultConnection,
- boolean preSelectIfNoMatch)
- {
- return populateConnectionCombo(combo, systemType, defaultConnection, preSelectIfNoMatch, false);
- }
-
- /**
- * Populates a readonly connection combobox instance with system connections for the given
- * system type.
- * <p>
- * This fills the combination with the names of all the active connections of the given
- * system type.
- * @param connectionCombo composite to populate
- * @param systemType the system type to restrict the connection list to. Pass null or * for all system types
- * @param defaultConnection the default system connection to preselect.
- * @param preSelectIfNoMatch true if we should preselect the first item if the given connection is not found
- * @param appendToCombo indicates whether or not to append to combo with population or replace
- * @return true if given default connection was found and selected
- */
- protected boolean populateConnectionCombo(Combo combo, String systemType, IHost defaultConnection,
- boolean preSelectIfNoMatch, boolean appendToCombo)
- {
- boolean matchFound = false;
- IHost[] additionalConnections = null;
- if ( (systemType == null) || (systemType.equals("*")) ) //$NON-NLS-1$
- additionalConnections = RSEUIPlugin.getTheSystemRegistry().getHosts();
- else
- additionalConnections = RSEUIPlugin.getTheSystemRegistry().getHostsBySystemType(systemType);
- if (additionalConnections != null)
- {
- String[] connectionNames = new String[additionalConnections.length];
- int selectionIndex = -1;
- for (int idx=0; idx<connectionNames.length; idx++)
- {
- connectionNames[idx] = getConnectionName(additionalConnections[idx]);
- if ((defaultConnection != null) && (additionalConnections[idx] == defaultConnection))
- {
- if (connections == null)
- selectionIndex = idx;
- else
- selectionIndex = connections.length+idx;
- }
- }
- // DKM - fix for 55830
- if (appendToCombo)
- {
- for (int i = 0; i < connectionNames.length; i++)
- combo.add(connectionNames[i]);
- }
- else
- {
- combo.setItems(connectionNames);
- }
- if (selectionIndex >=0)
- {
- //combo.select(selectionIndex);
- select(selectionIndex);
- matchFound = true;
- }
- else if (preSelectIfNoMatch && (combo.getItemCount()>0))
- //combo.select(0);
- select(0);
- }
- if (connections == null)
- connections = additionalConnections;
- else if ((additionalConnections != null) && (additionalConnections.length>0))
- {
- IHost[] totalConnections = new IHost[connections.length+additionalConnections.length];
- int totalIdx = 0;
- for (int idx=0; idx<connections.length; idx++)
- totalConnections[totalIdx++] = connections[idx];
- for (int idx=0; idx<additionalConnections.length; idx++)
- totalConnections[totalIdx++] = additionalConnections[idx];
- connections = totalConnections;
- }
- return matchFound;
- }
- /**
- * Populates a readonly connection combobox instance with system connections for the given
- * array of system types.
- * @param connectionCombo composite to populate
- * @param systemTypes the system types to restrict the connection list to. Pass null or * for all system types
- * @param defaultConnection the default system connection to preselect.
- */
- protected void populateConnectionCombo(Combo combo, String[] systemTypes, IHost defaultConnection)
- {
- boolean match = false;
- boolean anyMatch = false;
- for (int idx=0; idx<systemTypes.length; idx++)
- {
- match = populateConnectionCombo(combo, systemTypes[idx], defaultConnection, false, true);
- if (match)
- anyMatch = true;
- }
- if (!anyMatch && (combo.getItemCount()>0))
- //combo.select(0);
- select(0);
- }
- /**
- * Populates a readonly connection combobox instance with system connections which have subsystems
- * owned by the given subsystem factory.
- * <p>
- * @param connectionCombo composite to populate
- * @param subsystemFactory the subsystem factory to restrict the connection list to.
- * @param defaultConnection the default system connection to preselect.
- * @return true if given default connection was found and selected
- */
- protected boolean populateConnectionCombo(Combo combo, ISubSystemConfiguration ssFactory, IHost defaultConnection)
- {
- connections = RSEUIPlugin.getTheSystemRegistry().getHostsBySubSystemConfiguration(ssFactory);
- return addConnections(combo, connections, defaultConnection);
- }
- /**
- * Populates a readonly connection combobox instance with system connections which have subsystems
- * owned by a subsystem factory of the given subsystem factory id.
- * <p>
- * @param connectionCombo composite to populate
- * @param defaultConnection the default system connection to preselect.
- * @param subsystemFactoryId the subsystem factory id to restrict the connection list by.
- * @return true if given default connection was found and selected
- */
- protected boolean populateConnectionCombo(Combo combo, String ssFactoryId, IHost defaultConnection)
- {
- connections = RSEUIPlugin.getTheSystemRegistry().getHostsBySubSystemConfigurationId(ssFactoryId);
- return addConnections(combo, connections, defaultConnection);
- }
-
- /**
- * Populates a readonly connection combobox instance with system connections which have subsystems
- * owned by a subsystem factory of the given subsystem factory category.
- * <p>
- * @param connectionCombo composite to populate
- * @param defaultConnection the default system connection to preselect.
- * @param subsystemFactoryCategory the subsystem factory category to restrict the connection list by.
- * @return true if given default connection was found and selected
- */
- protected boolean populateConnectionCombo(Combo combo, IHost defaultConnection, String ssFactoryCategory)
- {
- connections = RSEUIPlugin.getTheSystemRegistry().getHostsBySubSystemConfigurationCategory(ssFactoryCategory);
- return addConnections(combo, connections, defaultConnection);
- }
- /**
- * An attempt to get some abstraction
- */
- private boolean addConnections(Combo combo, IHost[] connections, IHost defaultConnection)
- {
- boolean matchFound = false;
- if (connections != null)
- {
- String[] connectionNames = new String[connections.length];
- int selectionIndex = -1;
- for (int idx=0; idx<connectionNames.length; idx++)
- {
- connectionNames[idx] = getConnectionName(connections[idx]);
- if ((defaultConnection!=null) && (connections[idx] == defaultConnection))
- selectionIndex = idx;
- }
- combo.setItems(connectionNames);
- if (selectionIndex >=0)
- {
- //combo.select(selectionIndex);
- select(selectionIndex);
- matchFound = true;
- }
- else if (combo.getItemCount()>0)
- //combo.select(0);
- select(0);
- }
- return matchFound;
- }
-
- /**
- * Do string variable substitution. Using you are replacing %1 (say) with a string
- * @param message containing substitution variable. Eg "Connect failed with return code &1"
- * @param substitution variable. Eg "%1"
- * @param substitution data. Eg "001"
- * @return message with all occurrences of variable substituted with data.
- */
- protected static String sub(String msg, String subOld, String subNew)
- {
- StringBuffer temp = new StringBuffer();
- int lastHit = 0;
- int newHit = 0;
- for (newHit = msg.indexOf(subOld,lastHit); newHit != -1;
- lastHit = newHit, newHit = msg.indexOf(subOld,lastHit))
- {
- if (newHit >= 0)
- temp.append(msg.substring(lastHit,newHit));
- temp.append(subNew);
- newHit += subOld.length();
- }
- if (lastHit >= 0)
- temp.append(msg.substring(lastHit));
- return temp.toString();
- }
-
- /**
- * Return the connection name to display in the combo, given the connection
- */
- private String getConnectionName(IHost conn)
- {
- //String connectionName = sub(nameString,"%1",conn.getAliasName());
- //connectionName = sub(connectionName,"%2",conn.getSystemProfileName());
- //return connectionName;
- if (showQualifiedNames)
- return conn.getSystemProfileName() + "." + conn.getAliasName(); //$NON-NLS-1$
- else
- return conn.getAliasName();
- }
-
-
- /**
- * Refresh the list of connections
- */
- public void refreshConnections()
- {
- connections = null;
- connectionCombo.removeAll();
-
- if ( populateSystemType != null )
- {
- populateConnectionCombo(connectionCombo, populateSystemType, null, false);
- }
- else if ( populateSystemTypes != null )
- {
- populateConnectionCombo(connectionCombo, populateSystemTypes, null);
- }
- else if ( populateSSFactory != null )
- {
- populateConnectionCombo(connectionCombo, populateSSFactory, null);
- }
- else if ( populateSSFactoryId != null )
- {
- populateConnectionCombo(connectionCombo, populateSSFactoryId, null);
- }
- else if ( populateSSFactoryCategory != null )
- {
- populateConnectionCombo(connectionCombo, null, populateSSFactoryCategory);
- }
- }
-
- /**
- * This is the method in your class that will be called when a
- * system resource changes. We want to listen to connection changes.
- * @see ISystemResourceChangeEvent
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event)
- {
- int type = event.getType();
- Object src = event.getSource();
- //Object parent = event.getParent();
- switch ( type )
- {
- case EVENT_ADD:
- case EVENT_ADD_RELATIVE:
- case EVENT_DELETE_MANY:
- case EVENT_RENAME:
- if ( src instanceof IHost )
- {
- // if RENAME, update showQualifiedNames in case it changed
- if ( type == EVENT_RENAME )
- showQualifiedNames = SystemPreferencesManager.getPreferencesManager().getQualifyConnectionNames();
-
- refreshConnections();
- }
- break;
- }
- }
-
- /**
- * Have the SystemConnectionCombo listen to add/delete/rename events on connections
- * and automatically update it's list of connections
- */
- public void listenToConnectionEvents(boolean start)
- {
- if ( start )
- {
- // ----------------------------------------
- // register with system registry for events
- // ----------------------------------------
- listeningForConnectionEvents = true;
- RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- }
- else
- {
- // ----------------------------------------
- // remove register with system registry for events
- // ----------------------------------------
- listeningForConnectionEvents = false;
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- }
- }
- /**
- * We are going away. De-Register ourselves as a listener for system resource change events
- */
- public void widgetDisposed(DisposeEvent e)
- {
- if (listeningForConnectionEvents)
- {
- listeningForConnectionEvents = false;
- RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- }
- }
-
- protected void addOurButtonSelectionListener()
- {
- // Add the button listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- setBusyCursor(true);
- newConnectionAction.run();
- setBusyCursor(false);
- IHost newConnection = (IHost)newConnectionAction.getValue();
- //System.out.println("newConnection == " + newConnection);
- if (newConnection != null )
- {
-
- // if listening for events, combo box will be updated automatically
- if ( listeningForConnectionEvents )
- {
- select(newConnection); // it should be added by now
- }
- // if not listening for events, add new connection
- else
- {
- if (connections == null)
- {
- connections = new IHost[1];
- connections[0] = newConnection;
- addConnections(connectionCombo,connections,newConnection);
- //connectionCombo.select(0);
- }
- else
- {
- IHost[] totalConnections = new IHost[connections.length+1];
- int totalIdx = 0;
- for (int idx=0; idx<connections.length; idx++)
- totalConnections[totalIdx++] = connections[idx];
- totalConnections[totalIdx] = newConnection;
- connections = totalConnections;
- addConnections(connectionCombo,connections,newConnection);
- //connectionCombo.select(totalIdx);
- }
- }
- }
- }
- };
- newButton.addSelectionListener(selectionListener);
- }
-
- protected void addOurConnectionSelectionListener()
- {
- // Add the combo listener
- SelectionListener selectionListener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent event)
- {
- setConnectionToolTipText();
- }
- };
- connectionCombo.addSelectionListener(selectionListener);
- }
-
- protected void setConnectionToolTipText()
- {
- String tooltipText = ""; //$NON-NLS-1$
- IHost currConn = getHost();
- if (currConn != null)
- tooltipText = currConn.getHostName();
- connectionCombo.setToolTipText(tooltipText);
- }
-
- protected static Button createPushButton(Composite group, String label)
- {
- Button button = new Button(group, SWT.PUSH);
- button.setText(label);
- GridData data = new GridData();
- //data.horizontalAlignment = GridData.HORIZONTAL_ALIGN_END;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = false;
- button.setLayoutData(data);
- return button;
- }
-
- protected static Button createPushButton(Composite group, String label, String tooltip)
- {
- Button button = createPushButton(group,label);
- button.setToolTipText(tooltip);
- return button;
- }
-
- // -----------------------------
- // ISelectionProvider methods...
- // -----------------------------
- /**
- * Register a listener interested in an item is selected in the combo box
- * @see #removeSelectionChangedListener(ISelectionChangedListener)
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener)
- {
- //connectionCombo.addSelectionChangedListener(listener);
- }
- /**
- * Remove a previously set combo box selection listener.
- * @see #addSelectionChangedListener(ISelectionChangedListener)
- */
- public void removeSelectionChangedListener(ISelectionChangedListener listener)
- {
- //connectionCombo.removeSelectionChangedListener(listener);
- }
-
- public ISelection getSelection()
- {
- ISelection selection = StructuredSelection.EMPTY;
- IHost connection = getHost();
- if (connection != null)
- selection = new StructuredSelection(connection);
- return selection;
- }
- public void setSelection(ISelection selection)
- {
- }
-
- public IHost[] getConnections()
- {
- return connections;
- }
-
- public void setConnections(IHost[] input)
- {
- connections = input;
- }
-
- /**
- * <i>Helper method.</i><br>
- * Set the cursor to the wait cursor (true) or restores it to the normal cursor (false).
- */
- protected void setBusyCursor(boolean setBusy)
- {
- if (setBusy)
- {
- // Set the busy cursor to all shells.
- Display d = getShell().getDisplay();
- waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(getShell(), waitCursor);
- }
- else
- {
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(getShell(), null);
- if (waitCursor != null)
- waitCursor.dispose();
- waitCursor = null;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java
deleted file mode 100644
index 922af0246..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java
+++ /dev/null
@@ -1,398 +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.widgets;
-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;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.SystemNumericVerifyListener;
-import org.eclipse.rse.ui.validators.ValidatorPortInput;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- * A composite encapsulating the GUI widgets for prompting for a port. Used in the core SubSystem property
- * page but also be instantiated and used anywhere.
- */
-public class SystemPortPrompt
- //extends Composite
- implements SelectionListener
-{
-
- private Composite composite_prompts;
- //private Label labelPortPrompt;
- private Label labelPort;
- private InheritableEntryField textPort;
- protected SystemMessage errorMessage;
-
- protected boolean portEditable=true;
- protected boolean portApplicable=true;
- protected int existingPortValue;
- // validators
- protected ISystemValidator portValidator;
- // Inputs from caller
- protected ISystemMessageLine msgLine;
-
- /**
- * A listener for state changes to the port entry inheritable field.
- */
- private class PortFieldStateChangeListener implements IInheritableEntryFieldStateChangeListener {
-
- private SystemNumericVerifyListener verifyListener;
-
- /**
- * Constructor.
- * @param verifyListener the verify listener for the port field.
- */
- private PortFieldStateChangeListener(SystemNumericVerifyListener verifyListener) {
- this.verifyListener = verifyListener;
- }
-
- /**
- * Turns the verifier off if the state of the inheritable entry field is not local, turns it on otherwise.
- * @see org.eclipse.rse.ui.widgets.IInheritableEntryFieldStateChangeListener#stateChanged(org.eclipse.rse.ui.widgets.InheritableEntryField)
- */
- public void stateChanged(InheritableEntryField field) {
-
- if (field.isLocal()) {
- verifyListener.setOff(false);
- }
- else {
- verifyListener.setOff(true);
- }
- }
- }
-
- /**
- * Constructor when you want a new composite to hold the child controls
- */
- public SystemPortPrompt(Composite parent, int style, ISystemMessageLine msgLine,
- boolean wantLabel, boolean isPortEditable,
- int existingPortValue, ISystemValidator portValidator)
- {
- //super(parent, style);
- //composite_prompts = this;
- composite_prompts = new Composite(parent, style);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = wantLabel ? 2 : 1;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- composite_prompts.setLayout(gridLayout);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- gridData.grabExcessVerticalSpace = false;
- composite_prompts.setLayoutData(gridData);
-
- init(composite_prompts, msgLine, wantLabel, isPortEditable, existingPortValue, portValidator);
-
- composite_prompts.pack();
- }
- /**
- * Constructor when you have an existing composite to hold the child controls
- */
- public SystemPortPrompt(Composite composite_prompts, ISystemMessageLine msgLine,
- boolean wantLabel, boolean isPortEditable,
- int existingPortValue, ISystemValidator portValidator)
- {
- this.composite_prompts = composite_prompts;
-
- init(composite_prompts, msgLine, wantLabel, isPortEditable, existingPortValue, portValidator);
- }
-
- /**
- * Get user-entered Port number.
- */
- public int getPort()
- {
- if (isEditable())
- {
- String port = textPort.getLocalText(); // will be "" if !textPort.getIsLocal(), which results in wiping out local override
- Integer portInteger = null;
- if (textPort.isLocal() && (port.length()>0))
- portInteger = new Integer(port);
- else
- portInteger = new Integer(0);
- return portInteger.intValue();
- }
- else
- return existingPortValue;
- }
- /**
- * Return user-enter Port number as a string
- */
- public String getPortString()
- {
- return internalGetPort();
- }
-
- /**
- * Return true if port is user-editable
- */
- public boolean isEditable()
- {
- return (portEditable && portApplicable);
- }
-
- /**
- * Return true if current port value is without error
- */
- public boolean isComplete()
- {
- if (!isEditable())
- return true;
- else
- return ((errorMessage==null) && (internalGetPort().length()>0));
- }
-
- /**
- * Set the initial port value
- */
- public void setPort(int port)
- {
- // port
- if (portEditable || portApplicable)
- {
- String localPort = null;
-
- localPort = "" + port; //$NON-NLS-1$
- int iPort = port;
- if (!portEditable) // applicable but not editable
- labelPort.setText(localPort);
- else // editable
- {
- textPort.setLocalText(localPort);
- textPort.setInheritedText("0 "+SystemPropertyResources.RESID_PORT_DYNAMICSELECT); //$NON-NLS-1$
- textPort.setLocal(iPort != 0);
- }
- }
- }
-
- /**
- * Set the focus
- */
- public boolean setFocus()
- {
- if (textPort != null)
- {
- textPort.getTextField().setFocus();
- return true;
- }
- else
- return composite_prompts.setFocus();
- }
-
- /**
- * Reset to original value
- */
- public void setDefault()
- {
- setPort(existingPortValue);
- }
-
- /**
- * Return the entry field or label for the port prompt
- */
- public Control getPortField()
- {
- if (textPort != null)
- return textPort.getTextField();
- else
- return labelPort;
- }
-
- /**
- * Validate port value per keystroke
- */
- public SystemMessage validatePortInput()
- {
- boolean wasInError = (errorMessage != null);
- errorMessage= null;
- if (textPort!=null)
- {
- if (!textPort.isLocal())
- {
- if (wasInError)
- clearErrorMessage();
- return null;
- }
- if (portValidator != null)
- errorMessage= portValidator.validate(textPort.getText().trim());
- else if (internalGetPort().equals("")) //$NON-NLS-1$
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY);
- }
- if (errorMessage == null)
- {
- if (wasInError)
- clearErrorMessage();
- }
- else
- setErrorMessage(errorMessage);
- //setPageComplete();
- return errorMessage;
- }
-
- // -------------------
- // INTERNAL METHODS...
- // -------------------
- /**
- * Initialize vars, create and init prompts
- */
- protected void init(Composite composite_prompts, ISystemMessageLine msgLine,
- boolean wantLabel, boolean isPortEditable,
- int existingPortValue, ISystemValidator portValidator)
- {
- this.msgLine = msgLine;
- this.portEditable = isPortEditable;
- this.existingPortValue = existingPortValue;
- if (portValidator == null)
- portValidator = new ValidatorPortInput();
- this.portValidator = portValidator;
-
- createPortPrompt(composite_prompts, wantLabel);
- setPort(existingPortValue);
-
- if (textPort != null)
- {
- textPort.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- //System.out.println("in modify text '"+internalGetPort()+"'");
- validatePortInput();
- }
- });
-
- SystemNumericVerifyListener verifyListener = new SystemNumericVerifyListener();
- textPort.getTextField().addVerifyListener(verifyListener);
- textPort.addStateChangeListener(new PortFieldStateChangeListener(verifyListener));
- }
- }
-
- /**
- * Return user-entered Port number.
- */
- protected String internalGetPort()
- {
- if (textPort != null)
- return textPort.getText().trim();
- else
- return labelPort.getText();
- }
-
- /**
- * Create GUI widgets
- */
- protected void createPortPrompt(Composite composite_prompts, boolean wantLabel)
- {
- // Port prompt
- String portRange = " (1-" + ValidatorPortInput.MAXIMUM_PORT_NUMBER + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- if (wantLabel) {
- String labelText = SystemWidgetHelpers.appendColon(SystemResources.RESID_SUBSYSTEM_PORT_LABEL + portRange);
- /*labelPortPrompt =*/ SystemWidgetHelpers.createLabel(composite_prompts, labelText);
- }
- portApplicable = isPortApplicable();
- portEditable = isPortEditable();
- if (isEditable())
- {
- textPort = SystemWidgetHelpers.createInheritableTextField(
- composite_prompts,SystemResources.RESID_SUBSYSTEM_PORT_INHERITBUTTON_TIP,SystemResources.RESID_SUBSYSTEM_PORT_TIP);
- textPort.setFocus();
- }
- else
- {
- String labelValue = " "; //$NON-NLS-1$
- if (!portApplicable)
- labelValue = getTranslatedNotApplicable();
- labelPort = SystemWidgetHelpers.createLabel(composite_prompts, labelValue);
- }
- }
-
- /**
- * Return true if the port is applicable.
- * For this to be false, the caller must state the port is not editable,
- * and the port value must be null or Integer(-1).
- */
- protected boolean isPortApplicable()
- {
- if (!isPortEditable() && (existingPortValue==-1))
- return false;
- else
- return true;
- }
- /**
- * Return true if the port is editable for this subsystem
- */
- protected boolean isPortEditable()
- {
- return portEditable;
- }
-
- /**
- * Return "Not applicable" translated
- */
- private String getTranslatedNotApplicable()
- {
- return SystemPropertyResources.RESID_TERM_NOTAPPLICABLE;
- }
-
- protected void setErrorMessage(SystemMessage msg)
- {
- if (msgLine != null)
- msgLine.setErrorMessage(msg);
- }
- protected void clearErrorMessage()
- {
- if (msgLine != null)
- msgLine.clearErrorMessage();
- }
-
-
- // SELECTIONLISTENER...
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
- public void widgetSelected(SelectionEvent event)
- {
- //System.out.println("Inside widgetSelected. textPort.isLocal(): " + textPort.isLocal());
- if (textPort.isLocal()) // from local to non-local
- {
- /* I don't know why I did this! Phil. Removed for defect 44132
- if (errorMessage != null)
- {
- errorMessage = null;
- clearErrorMessage();
- } */
- }
- else
- {
- //validatePortInput(); doesn't work because it is called before the toggle
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemSelectConnectionForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemSelectConnectionForm.java
deleted file mode 100644
index 33e2e7e6f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemSelectConnectionForm.java
+++ /dev/null
@@ -1,507 +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.widgets;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.SystemPropertySheetForm;
-import org.eclipse.rse.ui.view.SystemViewConnectionSelectionInputProvider;
-import org.eclipse.rse.ui.view.SystemViewForm;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-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;
-
-
-
-/**
- * A reusable form for prompting for a connection. Unlike {@link org.eclipse.rse.ui.widgets.SystemHostCombo},
- * this form uses a list box to show the available connections.
- * <p>
- * This form may be used to populate a dialog or a wizard page.
- * <p>
- * To configure the functionality, call these methods:
- * <ul>
- * <li>{@link #setShowNewConnectionPrompt(boolean)}
- * <li>{@link #setDefaultConnection(IHost)}
- * <li>{@link #setSystemTypes(String[])}
- * <li>{@link #setShowPropertySheet(boolean)}
- * <li>{@link #setMultipleSelectionMode(boolean)}
- * </ul>
- * <p>
- * To configure the text on the dialog, call these methods:
- * <ul>
- * <li>{@link #setMessage(String)}
- * </ul>
- * <p>
- * After running, call these methods to get the output:
- * <ul>
- * <li>{@link #getSelectedConnection()}
- * </ul>
- */
-public class SystemSelectConnectionForm extends SystemBaseForm
- implements ISelectionChangedListener
-{
- protected static final int PROMPT_WIDTH = 200; // The maximum width of the dialog's prompt, in pixels.
-
- // GUI widgets
- protected Label verbageLabel, spacer1, spacer2;
- protected Text nameEntryValue;
- protected SystemViewForm tree;
- protected SystemPropertySheetForm ps;
- //protected ISystemMessageLine msgLine;
- protected Composite outerParent, ps_composite;
- // inputs
- protected String verbage = null;
- protected String[] systemTypes = null;
- protected IHost defaultConn;
- protected boolean allowNew = true;
- protected boolean multipleSelectionMode;
- protected boolean showPropertySheet = false;
- protected Vector listeners = new Vector();
-
- // outputs
- protected IHost[] outputConnections = null;
- protected IHost outputConnection = null;
- // state
- //protected ResourceBundle rb;
- protected boolean initDone;
- protected boolean contentsCreated;
-
- //protected String errorMessage;
- //protected Object caller;
- //protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
- protected int autoExpandDepth = 0;
-
- protected Object previousSelection = null;
-
- /**
- * Constructor
- * @param shell The shell hosting this form
- * @param msgLine A GUI widget capable of writing error messages to.
- *
- * @see #setShowNewConnectionPrompt(boolean)
- * @see #setSystemTypes(String[])
- */
- public SystemSelectConnectionForm(Shell shell, ISystemMessageLine msgLine)
- {
- super(shell, msgLine);
- //this.caller = caller;
- //callerInstanceOfWizardPage = (caller instanceof WizardPage);
- //callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
-
- // set default GUI
- verbage = SystemResources.RESID_SELECTCONNECTION_VERBAGE;
- }
-
- // ---------------------------------
- // INPUT OR CONFIGURATION METHODS...
- // ---------------------------------
- /**
- * Set the connection to default the selection to
- */
- public void setDefaultConnection(IHost conn)
- {
- defaultConn = conn;
- }
-
- /**
- * Set to true if we are to allow users to create a new connection. Default is true.
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- allowNew = show;
- }
- /**
- * 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.IRSESystemType
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * Restrict to one 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.IRSESystemType
- */
- public void setSystemType(String systemType)
- {
- systemTypes = new String[1];
- systemTypes[0] = systemType;
- }
- /**
- * Set the message shown as the text at the top of the form. Default is "Select a connection"
- */
- public void setMessage(String message)
- {
- this.verbage = message;
- if (verbageLabel != null)
- verbageLabel.setText(message);
- }
- /**
- * Show the property sheet on the right hand side, to show the properties of the
- * selected connection.
- * <p>
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- this.showPropertySheet = show;
- }
-
- /**
- * Set multiple selection mode. Default is single selection mode
- * <p>
- * If you turn on multiple selection mode, you must use the getSelectedConnections()
- * method to retrieve the list of selected connections.
- *
- * @see #getSelectedConnections()
- */
- public void setMultipleSelectionMode(boolean multiple)
- {
- this.multipleSelectionMode = multiple;
- }
-
- /**
- * Add a listener to selection change events in the list
- */
- public void addSelectionChangedListener(ISelectionChangedListener l)
- {
- if (tree != null)
- tree.addSelectionChangedListener(l);
- else
- listeners.addElement(l);
- }
- /**
- * Remove a listener for selection change events in the list
- */
- public void removeSelectionChangedListener(ISelectionChangedListener l)
- {
- if (tree != null)
- tree.removeSelectionChangedListener(l);
- else
- listeners.removeElement(l);
- }
-
-
- // ---------------------------------
- // OUTPUT METHODS...
- // ---------------------------------
- /**
- * Return all selected connections.
- * @see #setMultipleSelectionMode(boolean)
- */
- public IHost[] getSelectedConnections()
- {
- return outputConnections;
- }
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- /**
- * Return the multiple selection mode current setting
- */
- public boolean getMultipleSelectionMode()
- {
- return multipleSelectionMode;
- }
-
- // -----------------------------------------------------
- // SEMI-PRIVATE METHODS USED BY CALLING DIALOG/WIZARD...
- // -----------------------------------------------------
-
- /**
- * Return control to recieve initial focus
- */
- public Control getInitialFocusControl()
- {
- return tree.getTreeControl();
- }
-
- /**
- * Show or hide the property sheet. This is called after the contents are created when the user
- * toggles the Details button.
- * @param shell Use getShell() in your dialog or wizard page
- * @param contents Use getContents() in your dialog or wizard page
- * @return new state -> true if showing, false if hiding
- */
- public boolean toggleShowPropertySheet(Shell shell, Control contents)
- {
- Point windowSize = shell.getSize();
- Point oldSize = contents.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (showPropertySheet) // hiding?
- {
- ps.dispose();
- spacer1.dispose();
- spacer2.dispose();
- ps_composite.dispose();
- ps = null; spacer1 = spacer2 = null; ps_composite = null;
- ((GridLayout)outerParent.getLayout()).numColumns = 1;
- }
- else // showing?
- {
- //createPropertySheet((Composite)contents, shell);
- ((GridLayout)outerParent.getLayout()).numColumns = 2;
- createPropertySheet(outerParent, shell);
- }
-
- Point newSize = contents.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- shell.setSize(new Point(windowSize.x + (newSize.x - oldSize.x), windowSize.y));
-
- if (ps != null)
- {
- ISelection s = tree.getSelection();
- if (s != null)
- ps.selectionChanged(s);
- }
-
- showPropertySheet = !showPropertySheet;
- return showPropertySheet;
- }
-
- /**
- * Create the property sheet viewer
- */
- private void createPropertySheet(Composite outerParent, Shell shell)
- {
- ps_composite = SystemWidgetHelpers.createFlushComposite(outerParent, 1);
- ((GridData)ps_composite.getLayoutData()).grabExcessVerticalSpace = true;
- ((GridData)ps_composite.getLayoutData()).verticalAlignment = GridData.FILL;
-
- // SPACER LINES
- spacer1 = SystemWidgetHelpers.createLabel(ps_composite, "", 1); //$NON-NLS-1$
- spacer2 = SystemWidgetHelpers.createLabel(ps_composite, "", 1); //$NON-NLS-1$
- // PROPERTY SHEET VIEWER
- ps = new SystemPropertySheetForm(shell, ps_composite, SWT.BORDER, getMessageLine());
- }
-
- public void dispose()
- {
- if (tree != null)
- {
- tree.removeSelectionChangedListener(this);
- for (int i = 0; i < listeners.size(); i++)
- {
- tree.removeSelectionChangedListener((ISelectionChangedListener)listeners.get(i));
- }
- }
- }
- /**
- * In this method, we populate the given SWT container with widgets and return the container
- * to the caller.
- * @param parent The parent composite
- */
- public Control createContents(Composite parent)
- {
- contentsCreated = true;
-
- outerParent = parent;
- // OUTER COMPOSITE
- //if (showPropertySheet)
- {
- outerParent = SystemWidgetHelpers.createComposite(parent, showPropertySheet ? 2 : 1);
- }
-
- // INNER COMPOSITE
- int gridColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createFlushComposite(outerParent, gridColumns);
-
- // PROPERTY SHEET COMPOSITE
- if (showPropertySheet)
- {
- createPropertySheet(outerParent, getShell());
- }
- else
- {
- //((GridLayout)composite_prompts.getLayout()).margin...
- }
-
- // MESSAGE/VERBAGE TEXT AT TOP
- verbageLabel = SystemWidgetHelpers.createVerbiage(composite_prompts, verbage, gridColumns, false, PROMPT_WIDTH);
- //verbageLabel = SystemWidgetHelpers.createLabel(composite_prompts, verbage, gridColumns);
-
- // SPACER LINE
- SystemWidgetHelpers.createLabel(composite_prompts, "", gridColumns); //$NON-NLS-1$
-
- // SELECT OBJECT READONLY TEXT FIELD
- Composite nameComposite = composite_prompts;
- int nameSpan = gridColumns;
- nameEntryValue = SystemWidgetHelpers.createReadonlyTextField(nameComposite);
- ((GridData)nameEntryValue.getLayoutData()).horizontalSpan = nameSpan;
-
- // TREE
- SystemViewConnectionSelectionInputProvider inputProvider = new SystemViewConnectionSelectionInputProvider();
- inputProvider.setShowNewConnectionPrompt(allowNew);
- inputProvider.setSystemTypes(systemTypes);
- tree = new SystemViewForm(getShell(), composite_prompts, SWT.NULL, inputProvider, !multipleSelectionMode, getMessageLine(), gridColumns, 1);
- ((GridData)tree.getLayoutData()).widthHint = PROMPT_WIDTH; // normally its 300
-
- // initialize fields
- if (!initDone)
- doInitializeFields();
-
- // add selection listeners
- tree.addSelectionChangedListener(this);
- if (listeners.size() > 0)
- for (int idx=0; idx<listeners.size(); idx++)
- tree.addSelectionChangedListener((ISelectionChangedListener)listeners.elementAt(idx));
-
- // pre-select default connection...
- if (defaultConn != null)
- {
- tree.select(defaultConn, true);
- }
-
- return composite_prompts;
- }
-
- /**
- * Completes processing of the wizard page or dialog. If this
- * method returns true, the wizard/dialog will close;
- * otherwise, it will stay active.
- *
- * @return true if no errors
- */
- public boolean verify()
- {
- getMessageLine().clearErrorMessage();
- outputConnection = internalGetConnection();
- return true;
- }
-
-
- // -----------------------------------------------------
- // PRIVATE METHODS USED BY US...
- // -----------------------------------------------------
-
- /**
- * Return the current connection
- */
- private IHost internalGetConnection()
- {
- Object o = tree.getSystemView().getRootParent();
- if (o instanceof IHost)
- return ((IHost)o);
- else
- return null;
- }
-
- protected void setNameText(String text)
- {
- nameEntryValue.setText(text);
- }
- private void doInitializeFields()
- {
- //setPageComplete();
- initDone = true;
- return;
- }
-
- // ---------------------------------------------------
- // METHODS FOR SELECTION CHANGED LISTENER INTERFACE...
- // ---------------------------------------------------
- /**
- * User selected something in the tree.
- */
- public void selectionChanged(SelectionChangedEvent e)
- {
- ISelection selection = e.getSelection();
- if (ps != null)
- ps.selectionChanged(selection);
-
- outputConnections = null;
-
- Object[] outputObjects = getSelections(selection);
- if ((outputObjects!=null) && (outputObjects.length>0) && (outputObjects[0] instanceof IHost))
- {
- outputConnections = new IHost[outputObjects.length];
- for (int idx=0; idx<outputConnections.length; idx++)
- outputConnections[idx] = (IHost)outputObjects[idx];
- }
-
- if ((outputConnections != null) && (outputConnections.length>0))
- {
- setNameText(outputConnections[0].getAliasName());
- setPageComplete(true);
- }
- else
- {
- setNameText(""); //$NON-NLS-1$
- setPageComplete(false);
- }
- }
-
- /**
- * Return first item currently selected.
- */
- protected Object getFirstSelection(ISelection selection)
- {
- IStructuredSelection sSelection = (IStructuredSelection)selection;
- if (sSelection != null)
- {
- Iterator selectionIterator = sSelection.iterator();
- if (selectionIterator.hasNext())
- return selectionIterator.next();
- else
- return null;
- }
- return null;
- }
- /**
- * Return all items currently selected.
- */
- protected Object[] getSelections(ISelection selection)
- {
- IStructuredSelection sSelection = (IStructuredSelection)selection;
- if (sSelection != null)
- {
- Object[] selectedObjects = new Object[sSelection.size()];
- Iterator selectionIterator = sSelection.iterator();
- int idx = 0;
- while (selectionIterator.hasNext())
- selectedObjects[idx++] = selectionIterator.next();
- return selectedObjects;
- }
- return null;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServiceElement.java
deleted file mode 100644
index d6acc6b36..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServiceElement.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.graphics.Image;
-
-
-
-
-public class ConnectorServiceElement extends RSEModelServiceElement
-{
-
- private IConnectorService _connectorService;
- private ImageDescriptor _imageDescriptor;
- private ServiceElement[] _children;
-
- public ConnectorServiceElement(IHost host, ServiceElement parent, IConnectorService connectorService)
- {
- super(host, parent, connectorService);
- _connectorService = connectorService;
-
- }
-
- public IConnectorService getConnectorService()
- {
- return _connectorService;
- }
-
- public Image getImage()
- {
- if (_imageDescriptor == null)
- {
- _imageDescriptor= RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTOR_SERVICE_ID);
- }
- return _imageDescriptor.createImage();
- }
-
- public String getName()
- {
- return _connectorService.getName();
- }
-
- public boolean internalHasChildren()
- {
- return _connectorService.hasRemoteServerLauncherProperties();
- }
-
- public ServiceElement[] internalGetChildren()
- {
- if (_children == null)
- {
- IServerLauncherProperties properties = _connectorService.getRemoteServerLauncherProperties();
- ServiceElement child = new ServerLauncherPropertiesServiceElement(getHost(), this, properties);
- return new ServiceElement[] { child};
- }
- return _children;
- }
-
- public void commit()
- {
- super.commit();
- ServiceElement[] children = getChildren();
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- ServiceElement child = children[i];
- child.commit();
- }
- }
- _connectorService.commit();
- }
-
- public void revert()
- {
- super.revert();
- ServiceElement[] children = getChildren();
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- ServiceElement child = children[i];
- child.revert();
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServicesForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServicesForm.java
deleted file mode 100644
index a830e066f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServicesForm.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.SystemPropertySheetForm;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-
-
-
-public class ConnectorServicesForm extends SystemBaseForm
-{
- private TreeViewer _serviceViewer;
- private SystemPropertySheetForm _propertiesViewer;
- private Text _descriptionVerbage;
-
- private String _serviceTooltip = SystemResources.RESID_SERVICESFORM_CONNECTORSERVICES_TOOLTIP;
- private String _propertiesTooltip = SystemResources.RESID_SERVICESFORM_PROPERTIES_TOOLTIP;
-
-
- public ConnectorServicesForm(ISystemMessageLine msgLine)
- {
- super(null, msgLine);
- }
-
- public Control createContents(Composite parent)
- {
-
- SashForm sashComposite = new SashForm(parent, SWT.VERTICAL);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- sashComposite.setLayoutData(data);
-
-
- // connector service composite
- Composite serviceViewerComposite = new Composite(sashComposite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- serviceViewerComposite.setLayout(layout);
- serviceViewerComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- //serviceViewerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- Label servicesLabel = new Label(serviceViewerComposite, SWT.NONE);
- servicesLabel.setText(SystemResources.RESID_PROPERTIES_SERVICES_LABEL);
- createServiceViewer(serviceViewerComposite);
-
- // properties composite
- Composite servicePropertiesComposite = new Composite(sashComposite, SWT.NONE);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- servicePropertiesComposite.setLayout(layout);
- servicePropertiesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- //setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- Label propertiesLabel = new Label(servicePropertiesComposite, SWT.NONE);
- propertiesLabel.setText(SystemResources.RESID_PROPERTIES_PROPERTIES_LABEL);
- createPropertiesViewer(servicePropertiesComposite);
-
- // description composite
- Composite descriptionComposite = new Composite(sashComposite, SWT.NONE);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- descriptionComposite.setLayout(layout);
- descriptionComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- Label descriptionLabel = new Label(descriptionComposite, SWT.NONE);
- descriptionLabel.setText(SystemResources.RESID_PROPERTIES_DESCRIPTION_LABEL);
- _descriptionVerbage = new Text(descriptionComposite, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP);
- _descriptionVerbage.setText(getCurrentVerbage());
- _descriptionVerbage.setEditable(false);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- gridData.widthHint = 150;
- gridData.verticalAlignment = GridData.BEGINNING;
- _descriptionVerbage.setLayoutData(data);
-
- sashComposite.setWeights(new int[] { 20, 30, 10 });
-
-
- _serviceViewer.addSelectionChangedListener(new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent event)
- {
- ISelection selection = event.getSelection();
- _propertiesViewer.selectionChanged(selection);
- _descriptionVerbage.setText(getCurrentVerbage());
- }
- });
-
- return _serviceViewer.getControl();
- }
-
-
- private void createServiceViewer(Composite parent)
- {
- // Create the table viewer.
- _serviceViewer = new TreeViewer(parent, SWT.BORDER);
- // Create the table control.
- Tree tableTree = _serviceViewer.getTree();
-
- tableTree.setLayout(new FillLayout());
- tableTree.setToolTipText(_serviceTooltip);
- _serviceViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
- _serviceViewer.setContentProvider(new ServiceTableContentProvider());
- _serviceViewer.setLabelProvider(new ServiceTableLabelProvider());
-
- }
-
- private void createPropertiesViewer(Composite parent)
- {
- _propertiesViewer = new SystemPropertySheetForm(getShell(),parent, SWT.BORDER, getMessageLine(), 1, 1);
- _propertiesViewer.setToolTipText(_propertiesTooltip);
- }
-
- public void init(ServiceElement root)
- {
- _serviceViewer.setInput(root);
- }
-
- public boolean performOk()
- {
- return true;
- }
-
- protected String getCurrentVerbage()
- {
- if (_serviceViewer == null)
- return ""; //$NON-NLS-1$
- else
- {
- IStructuredSelection serviceSelection = (IStructuredSelection)_serviceViewer.getSelection();
- if (serviceSelection == null || serviceSelection.isEmpty())
- {
- return ""; //$NON-NLS-1$
- }
- else
- {
- String description = ((ServiceElement)serviceSelection.getFirstElement()).getDescription();
- return description!=null ? description : ""; //$NON-NLS-1$
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java
deleted file mode 100644
index 4e7ba0335..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.model.DummyHost;
-import org.eclipse.rse.services.IService;
-
-
-
-
-public class FactoryServiceElement extends ServiceElement
-{
-
- private IServiceSubSystemConfiguration _factory;
- private ServiceElement[] _children;
-
-
- public FactoryServiceElement(IHost host, IServiceSubSystemConfiguration factory)
- {
- super(host, null);
- _factory = factory;
- }
-
- public String getName()
- {
- return _factory.getId();
- }
-
- public String getDescription()
- {
- return _factory.getDescription();
- }
-
- public IServiceSubSystemConfiguration getFactory()
- {
- return _factory;
- }
-
- public IConnectorService getConnectorService()
- {
- IHost host = getHost();
- IConnectorService connectorService = _factory.getConnectorService(host);
- return connectorService;
- }
-
- public IService getService()
- {
- IHost host = getHost();
- IService service = _factory.getService(host);
- return service;
- }
-
- public ServiceElement[] getChildren()
- {
- if (_children == null)
- {
- IHost host = getHost();
- _children = new ServiceElement[2];
- _children[0] = new ServiceServiceElement(host, this, getService());
-
- IConnectorService connectorService = getConnectorService();
- _children[1] = new ConnectorServiceElement(host, this, connectorService);
- if (host instanceof DummyHost)
- {
- IServerLauncherProperties sl = connectorService.getRemoteServerLauncherProperties();
- if (sl == null)
- {
- sl = _factory.createServerLauncher(connectorService);
- connectorService.setRemoteServerLauncherProperties(sl);
- }
- }
- }
- return _children;
-
- }
-
- public boolean hasChildren()
- {
- return true;
- }
-
- public boolean hasPropertySets()
- {
- return false;
- }
-
- public PropertySetServiceElement[] getPropertySets()
- {
- return null;
- }
-
- public boolean hasProperties()
- {
- return false;
- }
-
- public PropertyElement[] getProperties()
- {
- return null;
- }
-
- public void commit()
- {
- ServiceElement[] children = getChildren();
- for (int i = 0; i < children.length; i++)
- {
- children[i].commit();
- }
- }
-
- public void revert()
- {
- ServiceElement[] children = getChildren();
- for (int i = 0; i < children.length; i++)
- {
- children[i].revert();
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertyElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertyElement.java
deleted file mode 100644
index 7b5653f70..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertyElement.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertyType;
-import org.eclipse.rse.core.model.Property;
-import org.eclipse.rse.ui.view.SystemComboBoxPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-
-
-
-public class PropertyElement
-{
- private IPropertyDescriptor _propertyDescriptor;
- private IProperty _property;
- private IProperty _originalProperty;
- private String _value;
-
- public PropertyElement(ServiceElement parent, IProperty property)
- {
- _property = property;
- _originalProperty = new Property(_property);
- _value = _property.getValue();
- }
-
- public IPropertyType getType()
- {
- return _property.getType();
- }
-
- public String getKey()
- {
- return _property.getKey();
- }
-
- public String getName()
- {
- return getLabel();
- }
-
- public String getLabel()
- {
- return _property.getLabel();
- }
-
- public String getValue()
- {
- return _value;
- }
-
-
- public void setValue(String value)
- {
- _value = value;
- _property.setValue(_value);
- }
-
- public IPropertyDescriptor getPropertyDescriptor()
- {
- if (_propertyDescriptor == null)
- {
- switch (_property.getType().getType())
- {
- case IPropertyType.TYPE_INTEGER:
- _propertyDescriptor = new TextPropertyDescriptor(getKey(), getLabel());
- break;
- case IPropertyType.TYPE_ENUM:
- SystemComboBoxPropertyDescriptor comboDescriptor = new SystemComboBoxPropertyDescriptor(getKey(), getLabel(), _property.getType().getEnumValues());
- _propertyDescriptor = comboDescriptor;
- break;
- case IPropertyType.TYPE_STRING:
- default:
- _propertyDescriptor = new TextPropertyDescriptor(getKey(), getLabel());
- break;
- }
- }
- return _propertyDescriptor;
- }
-
- public void commit()
- {
- /* already committed
- if (_value != _property.getValue())
- {
- _property.setValue(_value);
- }
- */
-
- }
-
- public void revert()
- {
- if (_originalProperty.getValue() != _property.getValue())
- {
- _property.setValue(_originalProperty.getValue());
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertySetServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertySetServiceElement.java
deleted file mode 100644
index a5b885334..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertySetServiceElement.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IPropertyType;
-import org.eclipse.rse.core.model.PropertySet;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-public class PropertySetServiceElement extends ServiceElement
-implements IPropertySource
-{
- protected PropertyElement[] _properties;
- protected IPropertySet _propertySet;
- protected IPropertySet _originalPropertySet;
-
- public PropertySetServiceElement(IHost host, ServiceElement parent, IPropertySet propertySet)
- {
- super(host, parent);
- _propertySet = propertySet;
- _originalPropertySet = new PropertySet(_propertySet);
- }
-
- public IPropertySet getOriginalProperySet()
- {
- return _originalPropertySet;
- }
-
- public IPropertySet getPropertySet()
- {
- return _propertySet;
- }
-
- public Image getImage()
- {
- return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_PROPERTIES_ID);
- }
-
- public String getName()
- {
- return _propertySet.getName();
- }
-
- public String getDescription()
- {
- return _propertySet.getDescription();
- }
-
- public boolean hasChildren()
- {
- return false;
- }
-
- public ServiceElement[] getChildren()
- {
- return null;
- }
-
- public void refreshProperties()
- {
- _properties = null;
-
- }
-
- public boolean hasProperties()
- {
- return _propertySet.getPropertyKeys().length > 0;
- }
-
- public PropertyElement[] getProperties()
- {
- if (_properties == null)
- {
- String[] keys = _propertySet.getPropertyKeys();
- List enabledProperties = new ArrayList();
-
- for (int i = 0; i < keys.length; i++)
- {
- String key = keys[i];
- IProperty property = _propertySet.getProperty(key);
- if (property.isEnabled())
- {
- enabledProperties.add(new PropertyElement(this, property));
- }
- }
- _properties =(PropertyElement[])enabledProperties.toArray(new PropertyElement[enabledProperties.size()]);
- }
- return _properties;
- }
-
-
- public IPropertyDescriptor[] getPropertyDescriptors()
- {
- PropertyElement[] properties = getProperties();
- IPropertyDescriptor[] descriptors = new IPropertyDescriptor[properties.length];
- for (int i = 0; i < properties.length; i++)
- {
- descriptors[i] = properties[i].getPropertyDescriptor();
- }
- return descriptors;
- }
-
- private PropertyElement getPropertyElement(String id)
- {
- PropertyElement[] elements = getProperties();
- for (int i = 0; i < elements.length; i++)
- {
- PropertyElement element = elements[i];
- if (element.getKey().equals(id))
- {
- return element;
- }
- }
- return null;
- }
-
- public Object getPropertyValue(Object id)
- {
- return getPropertyElement((String)id).getValue();
- }
-
- public boolean isPropertySet(Object id)
- {
- return getPropertyElement((String)id) != null;
- }
-
- public void resetPropertyValue(Object id)
- {
- // update ui object
- PropertyElement element = getPropertyElement((String)id);
- if (element.getKey().equals(id))
- {
- element.setValue(_propertySet.getPropertyValue((String)id));
- }
- }
-
- public void setPropertyValue(Object id, Object value)
- {
- PropertyElement element = getPropertyElement((String)id);
- String strValue = null;
- if (value instanceof Integer)
- {
- Integer intValue = (Integer)value;
-
- IPropertyType type = element.getType();
- if (type.isEnum())
- {
- strValue = type.getEnumValues()[intValue.intValue()];
- }
- else if (type.isInteger())
- {
- strValue = intValue.toString();
- }
- }
- else
- {
- strValue = (String)value;
- }
-
-
-
- if (element.getKey().equals(id))
- {
- element.setValue(strValue);
- }
-
- refreshProperties();
- childChanged(this);
- }
-
- public Object getEditableValue()
- {
- return this;
- }
-
- public void commit()
- {
- PropertyElement[] properties = getProperties();
- for (int i = 0; i < properties.length; i++)
- {
- properties[i].commit();
- }
- }
-
- public void revert()
- {
- PropertyElement[] properties = getProperties();
- for (int i = 0; i < properties.length; i++)
- {
- properties[i].revert();
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RSEModelServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RSEModelServiceElement.java
deleted file mode 100644
index 4562ff20b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RSEModelServiceElement.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IRSEModelObject;
-
-
-public abstract class RSEModelServiceElement extends ServiceElement
-{
- protected IRSEModelObject _modelObject;
- protected IPropertySet[] _propertySets;
- protected PropertySetServiceElement[] _propertySetElements;
- protected ServiceElement[] _allChildren;
-
- public RSEModelServiceElement(IHost host, ServiceElement parent, IRSEModelObject modelObject)
- {
- super(host, parent);
- _modelObject = modelObject;
- _propertySets = _modelObject.getPropertySets();
- }
-
-
-
- public boolean hasPropertySets()
- {
- return _propertySets != null && _propertySets.length > 0;
- }
-
- public PropertySetServiceElement[] getPropertySets()
- {
- if (_propertySetElements == null)
- {
- _propertySetElements = new PropertySetServiceElement[_propertySets.length];
- for (int i = 0; i < _propertySets.length; i++)
- {
- _propertySetElements[i] = new PropertySetServiceElement(getHost(), this, _propertySets[i]);
- }
- }
- return _propertySetElements;
- }
-
- public String getName()
- {
- return _modelObject.getName();
- }
-
- public String getDescription()
- {
- return _modelObject.getDescription();
- }
-
- public final boolean hasChildren()
- {
- return internalHasChildren() || hasPropertySets();
- }
-
- public final ServiceElement[] getChildren()
- {
- if (_allChildren == null)
- {
- List all = new ArrayList();
-
- if (internalHasChildren())
- {
- ServiceElement[] children = internalGetChildren();
- for (int i = 0; i < children.length; i++)
- {
- all.add(children[i]);
- }
- }
-
- if (hasPropertySets())
- {
- PropertySetServiceElement[] properties = getPropertySets();
- for (int p = 0; p < properties.length; p++)
- {
- all.add(properties[p]);
- }
- }
- _allChildren = (ServiceElement[])all.toArray(new ServiceElement[all.size()]);
- }
- return _allChildren;
- }
-
- public boolean hasProperties()
- {
- return false;
- }
-
-
- public PropertyElement[] getProperties()
- {
- return null;
- }
-
- public void commit()
- {
- PropertySetServiceElement[] sets = getPropertySets();
- for (int i = 0; i < sets.length; i++)
- {
- sets[i].commit();
- }
- }
-
- public void revert()
- {
- PropertySetServiceElement[] sets = getPropertySets();
- for (int i = 0; i < sets.length; i++)
- {
- IPropertySet newSet = sets[i].getPropertySet();
- IPropertySet originalSet = sets[i].getOriginalProperySet();
- _modelObject.removePropertySet(newSet.getName());
- _modelObject.addPropertySet(originalSet);
- }
- }
-
- public void refreshProperties()
- {
- PropertySetServiceElement[] propertySets = getPropertySets();
- for (int i = 0; i < propertySets.length; i++)
- {
- propertySets[i].refreshProperties();
- }
- }
-
- protected abstract ServiceElement[] internalGetChildren();
- protected abstract boolean internalHasChildren();
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RootServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RootServiceElement.java
deleted file mode 100644
index 8e9db9ff3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RootServiceElement.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import org.eclipse.rse.ui.SystemResources;
-
-
-public class RootServiceElement extends ServiceElement
-{
- private ServiceElement[] _children;
-
- public RootServiceElement()
- {
- super(null, null);
- }
-
- public RootServiceElement(ServiceElement[] children)
- {
- super(null, null);
- _children = children;
- for (int i = 0; i < _children.length; i++)
- {
- _children[i].setParent(this);
- }
- }
-
- public void setChildren(ServiceElement[] children)
- {
- _children = children;
- }
-
- public String getName()
- {
- return SystemResources.RESID_PROPERTIES_SERVICES_NAME;
- }
-
- public String getDescription()
- {
- return SystemResources.RESID_PROPERTIES_SERVICES_TOOLTIP;
- }
-
- public boolean hasChildren()
- {
- return true;
- }
-
- public ServiceElement[] getChildren()
- {
- return _children;
- }
-
- public boolean hasPropertySets()
- {
- return false;
- }
-
- public PropertySetServiceElement[] getPropertySets()
- {
- return null;
- }
-
- public boolean hasProperties()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public PropertyElement[] getProperties()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void commit()
- {
- ServiceElement[] children = getChildren();
- for (int i = 0; i < children.length; i++)
- {
- children[i].commit();
- }
- }
-
- public void revert()
- {
- ServiceElement[] children = getChildren();
- for (int i = 0; i < children.length; i++)
- {
- children[i].revert();
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java
deleted file mode 100644
index cf1e8e870..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.graphics.Image;
-
-
-public class ServerLauncherPropertiesServiceElement extends RSEModelServiceElement
-{
- protected IServerLauncherProperties _launcherProperties;
-
- public ServerLauncherPropertiesServiceElement(IHost host, ServiceElement parent, IServerLauncherProperties launcherProperties)
- {
- super(host, parent, launcherProperties);
- _launcherProperties = launcherProperties;
- }
-
- public String getName()
- {
- return _launcherProperties.getName();
- }
-
- public Image getImage()
- {
- return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_LAUNCHER_CONFIGURATION_ID);
- }
-
- protected ServiceElement[] internalGetChildren()
- {
- return null;
- }
-
-
- protected boolean internalHasChildren()
- {
- return false;
- }
-
- public void childChanged(ServiceElement element)
- {
- _launcherProperties.restoreFromProperties();
- _launcherProperties.commit();
- getParent().childChanged(element);
- }
-
- public void commit()
- {
- super.commit();
-
- }
-
- public void revert()
- {
- super.revert();
- }
-
- public IServerLauncherProperties getServerLauncherProperties()
- {
- return _launcherProperties;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceElement.java
deleted file mode 100644
index b768166be..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceElement.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.swt.graphics.Image;
-
-
-
-
-public abstract class ServiceElement
-{
- protected IHost _host;
- protected ServiceElement _parent;
- protected boolean _isSelected = false;
-
- public ServiceElement(IHost host, ServiceElement parent)
- {
- _host = host;
- _parent = parent;
- }
-
- public Image getImage()
- {
- return null;
- }
-
- public IHost getHost()
- {
- if (_host == null)
- {
- ServiceElement[] elements = getChildren();
- if (elements != null)
- {
- for (int i = 0; i < elements.length; i++)
- {
- ServiceElement el = elements[i];
- if (el.isSelected())
- {
- return el.getHost();
- }
- }
- }
- }
- return _host;
- }
-
- public void childChanged(ServiceElement element)
- {
- if (_parent != null)
- {
- _parent.childChanged(element);
- }
- }
-
- public void setParent(ServiceElement parent)
- {
- _parent = parent;
- }
-
- public ServiceElement getParent()
- {
- return _parent;
- }
-
- public void setSelected(boolean flag)
- {
- _isSelected = flag;
- }
-
- public boolean isSelected()
- {
- return _isSelected;
- }
-
- public String toString()
- {
- return getName();
- }
-
- public abstract boolean hasProperties();
- public abstract PropertyElement[] getProperties();
- public abstract String getName();
- public abstract String getDescription();
- public abstract boolean hasChildren();
- public abstract ServiceElement[] getChildren();
- public abstract void commit();
- public abstract void revert();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceServiceElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceServiceElement.java
deleted file mode 100644
index 334a2b552..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceServiceElement.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.graphics.Image;
-
-
-
-
-public class ServiceServiceElement extends ServiceElement
-{
- private IService _service;
- private ImageDescriptor _imageDescriptor;
-
- public ServiceServiceElement(IHost host, ServiceElement parent, IService service)
- {
- super(host, parent);
- _service = service;
- }
-
- public Image getImage()
- {
- if (_imageDescriptor == null)
- {
- _imageDescriptor= RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SERVICE_ID);
- }
- return _imageDescriptor.createImage();
- }
-
- public IService getService()
- {
- return _service;
- }
-
- public String getName()
- {
- return _service.getName();
- }
-
- public String getDescription()
- {
- return _service.getDescription();
- }
-
- public boolean hasChildren()
- {
- return false;
- }
-
- public ServiceElement[] getChildren()
- {
- return null;
- }
-
- public boolean hasPropertySets()
- {
- return false;
- }
-
- public PropertySetServiceElement[] getPropertySets()
- {
- return null;
- }
-
- public boolean hasProperties()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public PropertyElement[] getProperties()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void commit()
- {
- }
-
- public void revert()
- {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableContentProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableContentProvider.java
deleted file mode 100644
index 9ce9d79b7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableContentProvider.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class ServiceTableContentProvider implements ITreeContentProvider
-{
- /**
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object element) {
- if (element instanceof ArrayList)
- return ((ArrayList)element).toArray();
-
- return getChildren(element);
- }
- /**
- * @see IContentProvider#dispose()
- */
- public void dispose() {
- }
- /**
- * @see IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
-
- public Object[] getChildren(Object element)
- {
- return getServiceElement(element).getChildren();
- }
-
- public Object getParent(Object element)
- {
- return getServiceElement(element).getParent();
- }
-
- public boolean hasChildren(Object element)
- {
- return getServiceElement(element).hasChildren();
- }
-
- protected ServiceElement getServiceElement(Object element)
- {
- return (ServiceElement)element;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableLabelProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableLabelProvider.java
deleted file mode 100644
index 64e0e378d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableLabelProvider.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-
-
-
-public class ServiceTableLabelProvider
- extends LabelProvider
- implements ITableLabelProvider
- {
-
- public Image getColumnImage(Object element, int columnIndex)
- {
- if (columnIndex == 0)
- {
- return getImage(element);
- }
- return null;
- }
-
-
-
- public Image getImage(Object element)
- {
- ServiceElement serviceElement = getServiceElement(element);
- return serviceElement.getImage();
- }
-
-
-
- public String getText(Object element)
- {
- return getColumnText(element, 0);
- }
-
- public ServiceElement getServiceElement(Object element)
- {
- return (ServiceElement)element;
- }
-
-
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object element, int columnIndex)
- {
- if (element instanceof ServiceElement)
- {
- ServiceElement serviceElement = (ServiceElement)element;
-
- switch (columnIndex)
- {
- case 0: // name
- {
- return serviceElement.getName();
- }
-
- default:
- {
- return ""; //$NON-NLS-1$
- }
- }
- }
- return ""; //$NON-NLS-1$
- }
-
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java
deleted file mode 100644
index 039e18810..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ISelection;
-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.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.SystemPropertySheetForm;
-import org.eclipse.rse.ui.widgets.GridUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-
-
-
-public class ServicesForm extends SystemBaseForm implements ICheckStateListener
-{
- private CheckboxTableViewer _factoryViewer;
- private TreeViewer _serviceViewer;
- private SystemPropertySheetForm _propertiesViewer;
-
- private String _configurationTooltip = SystemResources.RESID_SERVICESFORM_CONFIGURATION_TOOLTIP;
- private String _serviceTooltip = SystemResources.RESID_SERVICESFORM_SERVICES_TOOLTIP;
- private String _propertiesTooltip = SystemResources.RESID_SERVICESFORM_PROPERTIES_TOOLTIP;
-
- private Text _descriptionVerbage;
-
- public ServicesForm(ISystemMessageLine msgLine)
- {
- super(msgLine);
- //_factoryTooltip =
- }
-
- public Control createContents(Composite parent)
- {
-
- SashForm sashCompositeParent = new SashForm(parent, SWT.HORIZONTAL);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- sashCompositeParent.setLayoutData(data);
-
- SashForm sashCompositeLeft = new SashForm(sashCompositeParent, SWT.VERTICAL);
- data = new GridData(SWT.FILL, SWT.FILL, true, true);
- sashCompositeLeft.setLayoutData(data);
-
- // factory composite
- Composite factoryViewerComposite = new Composite(sashCompositeLeft, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- factoryViewerComposite.setLayout(layout);
- factoryViewerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Label factoryLabel = new Label(factoryViewerComposite, SWT.NONE);
- factoryLabel.setText(SystemResources.RESID_PROPERTIES_FACTORIES_LABEL);
- createFactoryViewer(factoryViewerComposite);
-
-
- // service composite
- Composite serviceViewerComposite = new Composite(sashCompositeLeft, SWT.NONE);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- serviceViewerComposite.setLayout(layout);
- serviceViewerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Label servicesLabel = new Label(serviceViewerComposite, SWT.NONE);
- servicesLabel.setText(SystemResources.RESID_PROPERTIES_SERVICES_LABEL);
- createServiceViewer(serviceViewerComposite);
-
- sashCompositeLeft.setWeights(new int[] { 50, 50 });
-
- // properties composite
- Composite servicePropertiesComposite = new Composite(sashCompositeParent, SWT.NONE);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- servicePropertiesComposite.setLayout(layout);
- servicePropertiesComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Label propertiesLabel = new Label(servicePropertiesComposite, SWT.NONE);
- propertiesLabel.setText(SystemResources.RESID_PROPERTIES_PROPERTIES_LABEL);
- createPropertiesViewer(servicePropertiesComposite);
-
- sashCompositeParent.setWeights(new int[] { 40, 60 });
-
- // description composite
- Composite descriptionComposite = new Composite(parent, SWT.NONE);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- descriptionComposite.setLayout(layout);
- descriptionComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- Label descriptionLabel = new Label(descriptionComposite, SWT.NONE);
- descriptionLabel.setText(SystemResources.RESID_PROPERTIES_DESCRIPTION_LABEL);
- _descriptionVerbage = new Text(parent, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP);
- _descriptionVerbage.setText(getCurrentVerbage());
- _descriptionVerbage.setEditable(false);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.widthHint = 150;
- _descriptionVerbage.setLayoutData(gridData);
-
- _factoryViewer.addSelectionChangedListener(new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent event)
- {
- ISelection selection = event.getSelection();
- if (selection instanceof StructuredSelection)
- {
- StructuredSelection ss = (StructuredSelection)selection;
- _factoryViewer.setChecked(ss.getFirstElement(), true);
- unCheckOthers((ServiceElement) ss.getFirstElement());
- _serviceViewer.setInput(ss.getFirstElement());
- _descriptionVerbage.setText(getCurrentVerbage());
- }
- }
- });
-
- _serviceViewer.addSelectionChangedListener(new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent event)
- {
- ISelection selection = event.getSelection();
- _propertiesViewer.selectionChanged(selection);
- _descriptionVerbage.setText(getCurrentVerbage());
- }
- });
-
- return _factoryViewer.getControl();
- }
-
- private void createFactoryViewer(Composite parent)
- {
- // Create the table viewer.
- _factoryViewer = CheckboxTableViewer.newCheckList(parent, SWT.BORDER | SWT.READ_ONLY);
- _factoryViewer.addCheckStateListener(this);
-
- // Create the table control.
- Table table = _factoryViewer.getTable();
- table.setHeaderVisible(false);
- table.setLinesVisible(false);
- GridData data = GridUtil.createFill();
- data.heightHint = 20;
- data.widthHint = 30;
- table.setLayoutData(data);
- table.setToolTipText(_configurationTooltip);
-
-
-
- TableLayout tableLayout = new TableLayout();
- table.setLayout(tableLayout);
-
-
- _factoryViewer.setContentProvider(new ServiceTableContentProvider());
- _factoryViewer.setLabelProvider(new ServiceTableLabelProvider());
- }
-
- private void createServiceViewer(Composite parent)
- {
- // Create the table viewer.
- _serviceViewer = new TreeViewer(parent, SWT.BORDER);
-
-
- // Create the table control.
- Tree tableTree = _serviceViewer.getTree();
- GridData data = GridUtil.createFill();
- data.heightHint = 20;
- data.widthHint = 30;
- tableTree.setLayoutData(data);
- tableTree.setLayout(new GridLayout());
- tableTree.setToolTipText(_serviceTooltip);
-
-
-/*
- TableLayout tableLayout = new TableLayout();
-
- TreeColumn factoryColumn = new TreeColumn(tableTree, SWT.LEFT);
- factoryColumn.setText("Property");
- tableLayout.addColumnData(new ColumnPixelData(100));
- tableTree.setLayout(tableLayout);
-
- TreeColumn fileServiceColumn = new TreeColumn(tableTree, SWT.LEFT);
- fileServiceColumn.setText("Value");
- tableLayout.addColumnData(new ColumnPixelData(120));
- */
- _serviceViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
-
- // Adjust the table viewer.
- //String[] properties = new String[] {"STRING", "STRING"};
- //_serviceViewer.setColumnProperties(properties);
-
- _serviceViewer.setContentProvider(new ServiceTableContentProvider());
- _serviceViewer.setLabelProvider(new ServiceTableLabelProvider());
-
- }
-
- private void createPropertiesViewer(Composite parent)
- {
-
- _propertiesViewer = new SystemPropertySheetForm(getShell(),parent, SWT.BORDER, getMessageLine());
- _propertiesViewer.setToolTipText(_propertiesTooltip);
-
-
- }
-
- public void init(ServiceElement root)
- {
- _factoryViewer.setInput(root);
- TableItem[] items = _factoryViewer.getTable().getItems();
- for (int i = 0; i < items.length; i++)
- {
- TableItem item = items[i];
- ServiceElement element = (ServiceElement)item.getData();
- if (element.isSelected())
- {
- item.setChecked(true);
- _factoryViewer.setSelection(new StructuredSelection(element));
- }
- }
- }
-
-
- public void checkStateChanged(CheckStateChangedEvent event)
- {
- ServiceElement element = (ServiceElement)event.getElement();
- element.setSelected(event.getChecked());
- _factoryViewer.setSelection(new StructuredSelection(element));
-
- unCheckOthers(element);
- _descriptionVerbage.setText(getCurrentVerbage());
- }
-
- protected void unCheckOthers(ServiceElement checkedElement)
- {
- // uncheck the others now
- Object[] checked = _factoryViewer.getCheckedElements();
- for (int i = 0; i < checked.length; i++)
- {
- ServiceElement oldChecked = (ServiceElement)checked[i];
- if (oldChecked != checkedElement)
- {
- oldChecked.setSelected(false);
- _factoryViewer.setChecked(oldChecked, false);
- }
- }
- }
-
- public ServiceElement getSelectedService()
- {
- return (ServiceElement)_factoryViewer.getCheckedElements()[0];
- }
-
- public boolean verify()
- {
- return _factoryViewer.getCheckedElements().length > 0;
- }
-
- protected String getCurrentVerbage()
- {
- String description = null;
- if (_serviceViewer != null)
- {
- IStructuredSelection serviceSelection = (IStructuredSelection)_serviceViewer.getSelection();
- if (serviceSelection != null && !serviceSelection.isEmpty())
- {
- description = ((ServiceElement)serviceSelection.getFirstElement()).getDescription();
- }
- else if (_factoryViewer != null)
- {
- IStructuredSelection factorySelection = (IStructuredSelection) _factoryViewer.getSelection();
- if (factorySelection != null && !factorySelection.isEmpty())
- {
- description = ((ServiceElement)factorySelection.getFirstElement()).getDescription();
- }
- }
- }
- return description != null ? description : ""; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java
deleted file mode 100644
index 85a04960f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java
+++ /dev/null
@@ -1,154 +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.wizards;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-/**
- * A base class for additional pages that are to be appended to the New Connection wizard.
- * @see org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter#getNewConnectionWizardPages(ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)
- */
-public abstract class AbstractSystemNewConnectionWizardPage extends AbstractSystemWizardPage
- implements ISystemNewConnectionWizardPage, IWizardPage
-{
- protected ISubSystemConfiguration parentFactory;
-
- /**
- * Constructor that takes everything
- */
- public AbstractSystemNewConnectionWizardPage(IWizard wizard, ISubSystemConfiguration parentFactory, String pageName, String pageTitle, String pageDescription)
- {
- super(wizard, pageName, pageTitle, pageDescription);
- this.parentFactory = parentFactory;
- }
- /**
- * Constructor that defaults:
- * <ul>
- * <li>the page name to the parent factory's id
- * <li>the page title to the parent factory's name
- * </ul>
- */
- public AbstractSystemNewConnectionWizardPage(IWizard wizard, ISubSystemConfiguration parentFactory, String pageDescription)
- {
- super(wizard, parentFactory.getId(), parentFactory.getName(), pageDescription);
- this.parentFactory = parentFactory;
- }
- /**
- * Constructor that defaults:
- * <ul>
- * <li>the page name to the parent factory's id
- * <li>the page title to the parent factory's name
- * <li>the page description to RESID_NEWCONN_SUBSYSTEMPAGE_DESCRIPTION
- * </ul>
- */
- public AbstractSystemNewConnectionWizardPage(IWizard wizard, ISubSystemConfiguration parentFactory)
- {
- super(wizard, parentFactory.getId(), parentFactory.getName(), SystemResources.RESID_NEWCONN_SUBSYSTEMPAGE_DESCRIPTION);
- this.parentFactory = parentFactory;
- }
-
- /**
- * Return the subsystem factory that supplied this page
- */
- public ISubSystemConfiguration getSubSystemConfiguration()
- {
- return parentFactory;
- }
-
- /**
- * @see AbstractSystemWizardPage#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return null;
- }
-
- /**
- * @see AbstractSystemWizardPage#createContents(Composite)
- */
- public abstract Control createContents(Composite parent);
-
- /**
- * @see ISystemWizardPage#performFinish()
- */
- public boolean performFinish()
- {
- return true;
- }
-
- /**
- * Get the parent wizard typed as the SystemNewConnectionWizard
- */
- public RSENewConnectionWizard getNewConnectionWizard()
- {
- return (RSENewConnectionWizard)getWizard();
- }
-
- /**
- * Get the main page of SystemNewConnectionWizard, which contains all user enter connection attributes
- */
- public ISystemNewConnectionWizardMainPage getMainPage()
- {
- RSENewConnectionWizard ourWizard = getNewConnectionWizard();
- if (ourWizard != null) {
- //String[] systemTypes = parentFactory.getSystemTypes();
- //IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemTypes[0]);
- IWizardPage wizardPage = ourWizard.getDelegate().getMainPage();
-
- if (wizardPage instanceof ISystemNewConnectionWizardMainPage) {
- return (ISystemNewConnectionWizardMainPage)wizardPage;
- }
- else {
- return null;
- }
- }
- else {
- return null;
- }
- }
-
- /**
- * Get the SystemConnectionForm of the main page of SystemNewConnectionWizard, which
- * contains all user enter connection attributes
- */
- public SystemConnectionForm getMainPageForm()
- {
- RSENewConnectionWizard ourWizard = getNewConnectionWizard();
- if (ourWizard != null) {
- //String[] systemTypes = parentFactory.getSystemTypes();
- //IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemTypes[0]);
- IWizardPage wizardPage = ourWizard.getDelegate().getMainPage();
-
- if (wizardPage instanceof RSENewConnectionWizardDefaultDelegateMainPage) {
- return ((RSENewConnectionWizardDefaultDelegateMainPage)wizardPage).getForm();
- }
- else {
- return null;
- }
- }
- else {
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizard.java
deleted file mode 100644
index 7fdfbeebf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizard.java
+++ /dev/null
@@ -1,454 +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.wizards;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardPage;
-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.SystemWizardDialog;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-
-
-/**
- * Base class for all RSE wizards. This class is more beneficial when using in conjunction with
- * {@link org.eclipse.rse.ui.wizards.AbstractSystemWizardPage}, and
- * {@link org.eclipse.rse.ui.actions.SystemBaseWizardAction}.
- * <p>A wizard is a multi-page UI, that prompts users for information and then uses that information
- * to create something (typically). The wizard has an overall title that shows for each page, and
- * a wizard page title that can be unique per page, but typically is not. Typically, the overall title
- * is a verb, such as "New", while the page title expands on the verb, as in "File". There is also a
- * description per page, which is unique and explains the purpose of that page. Further, there is a
- * wizard image that is always the same per wizard page.
- * </p>
- * <p> Using this base class for wizards offers the following advantages over just using the
- * eclipse Wizard class:
- * </p>
- * <ul>
- * <li>Designed to work in conjunction with the {@link org.eclipse.rse.ui.actions.SystemBaseWizardAction},
- * and {@link org.eclipse.rse.ui.dialogs.SystemWizardDialog} classes, propogating settings
- * from these to the wizard, and further propogating those to the individual wizard pages.
- * <li>The overall wizard title and image can be set via the constructor or setter methods.
- * <li>Supports setting an input object, and getting an output object. This is exploited by the
- * {@link org.eclipse.rse.ui.actions.SystemBaseWizardAction} class, when
- * this wizard is launched from a subclass of that action class.
- * <li>Supports setting a wizard page title via {@link #setWizardPageTitle(String)}, that all
- * {@link org.eclipse.rse.ui.wizards.AbstractSystemWizardPage} pages will use by default for
- * their title, if the non-title constructor is used for that page.
- * <li>If being hosted by a {@link org.eclipse.rse.ui.dialogs.SystemWizardDialog}, supports dynamically
- * updating the wizard size via {@link #updateSize()}, if dynamic content is added to a wizard page, causing the page to grow beyond its initial size.
- * <li>Supports a {@link #setHelp(String)} method to set the overall wizard's contextual help. This is propogated to each
- * {@link org.eclipse.rse.ui.wizards.AbstractSystemWizardPage} as it is added.
- * <li>Supports setting the viewer that launched this wizard, as wizards often need to know this so they can update the UI upon Finish.
- * <li>Supports a {@link #wasCancelled()} method so callers can easily test if the wizard was cancelled/dismissed by the user.
- * <li>Supports a {@link #setMinimumPageSize(int, int)} method to set the minimum width and height of the wizard.
- * <li>Supports a {@link #setPageError(IWizardPage)} method that can be called in performFinish when an error is detected on a
- * non-current page. This issues a message telling the user there is an error on another page.
- * <li>Supports a simple {@link #setBusyCursor(boolean)} method to toggle the cursor between busy and normal
- * </ul>
- * <p>To use this class, :</p>
- * <ol>
- * <li>Subclass it.
- * <li>In your constructor, call {@link #setHelp(String)} to set the overall help, if desired.
- * <li>In your constructor, call {@link #setWizardPageTitle(String)} to set the title to use for all pages, if desired.
- * <li>Override {@link #addPages()} to add your {@link org.eclipse.rse.ui.wizards.AbstractSystemWizardPage pages} via calls to addPage(IWizardPage).
- * <li>Override {@link #performFinish()} to do the wizard's main task when Finish is pressed. Cycle through each of your pages calling
- * performFinish() on each of them. If performFinish() returns false from any page, call {@link #setPageError(IWizardPage)} and
- * return false from your performFinish() method to cancel the Finish operation.
- * </ol>
- *
- * @see org.eclipse.rse.ui.wizards.AbstractSystemWizardPage
- * @see org.eclipse.rse.ui.dialogs.SystemWizardDialog
- * @see org.eclipse.rse.ui.actions.SystemBaseWizardAction
- */
-public abstract class AbstractSystemWizard
- extends Wizard implements ISystemWizard
-{
- protected boolean finishPressed = true; // most accurate guess
- protected boolean cancelled = false;
- protected Object input = null;
- protected Object output = null;
- protected IStructuredSelection selection = null;
- protected int minPageWidth, minPageHeight;
- protected String helpId;
- protected Viewer viewer = null;
- protected String pageTitle;
- protected SystemWizardDialog owningDialog;
- private Cursor waitCursor;
-
- /**
- * Default constructor.
- *
- * @see #setWizardTitle(String)
- * @see #setWizardImage(ImageDescriptor)
- * @see #setWizardPageTitle(String)
- */
- public AbstractSystemWizard()
- {
- super();
-
- }
-
- /**
- * Constructor when wizard title is known.
- * Alternatively, you can call {@link #setWizardTitle(String)}
- *
- * @see #setWizardImage(ImageDescriptor)
- * @see #setWizardPageTitle(String)
- */
- public AbstractSystemWizard(String title)
- {
- super();
- setWindowTitle(title);
- }
-
- /**
- * Constructor when you both a title and an image for this wizard.
- * Alternatively, you can call {@link #setWizardTitle(String)} or {@link #setWizardImage(ImageDescriptor)}
- *
- * @see #setWizardPageTitle(String)
- */
- public AbstractSystemWizard(String title, ImageDescriptor wizardImage)
- {
- super();
- setWindowTitle(title);
- setDefaultPageImageDescriptor(wizardImage);
- }
-
- /**
- * Called from {@link org.eclipse.rse.ui.dialogs.SystemWizardDialog} when it is used as the hosting dialog
- */
- public void setSystemWizardDialog(SystemWizardDialog dlg)
- {
- this.owningDialog = dlg;
- }
- /**
- * Return the result of {@link #setSystemWizardDialog(SystemWizardDialog)}
- */
- public SystemWizardDialog getSystemWizardDialog()
- {
- return owningDialog;
- }
- /**
- * Exposes this nice new 2.0 capability to the public.
- * Only does anything if being hosted by SystemWizardDialog.
- */
- public void updateSize()
- {
- if (owningDialog != null)
- owningDialog.updateSize(getContainer().getCurrentPage());
- }
- /**
- * Set the wizard title. Using this makes it possible to avoid subclassing.
- * Typically the wizard title is the same for all pages... eg "New"
- */
- public void setWizardTitle(String title)
- {
- setWindowTitle(title);
- }
- /**
- * Set the wizard page title. Using this makes it possible to avoid subclassing.
- * The page title goes below the wizard title, and can be unique per page. However,
- * typically the wizard page title is the same for all pages... eg "Filter".
- * <p>
- * This is not used by default, but can be queried via getPageTitle() when constructing
- * pages.
- */
- public void setWizardPageTitle(String pageTitle)
- {
- this.pageTitle = pageTitle;
- }
- /**
- * Return the page title as set via setWizardPageTitle
- */
- public String getWizardPageTitle()
- {
- return pageTitle;
- }
-
- /**
- * Set the wizard image. Using this makes it possible to avoid subclassing
- */
- public void setWizardImage(ImageDescriptor wizardImage)
- {
- super.setDefaultPageImageDescriptor(wizardImage);
- }
- /**
- * Set the help context Id (infoPop) for this wizard. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelp(String id)
- {
- this.helpId = id;
- }
- /**
- * Return the help Id as set in setHelp(String)
- */
- public String getHelpContextId()
- {
- return helpId;
- }
- /**
- * Intercept of parent method so we can percolate the help id
- */
- public void addPage(IWizardPage page)
- {
- super.addPage(page);
- if ((helpId!=null) && (page instanceof ISystemWizardPage))
- {
- // tweak by Phil 10/19/2002 ... this was overriding page-specific help
- // on secondary pages. To reduce regression I only test if help is already
- // specified if this is not the first page... hence one-page wizards are
- // not affected...
- ISystemWizardPage swPage = (ISystemWizardPage)page;
- if ((super.getPageCount() == 1) || (swPage.getHelpContextId() == null))
- swPage.setHelp(helpId);
- }
- }
-
- /**
- * Set the Viewer that called this wizard. It is good practice for actions to call this
- * so wizard can directly access the originating viewer if needed.
- * <p>
- * This is called for you if using a subclass of {@link org.eclipse.rse.ui.actions.SystemBaseWizardAction}.
- */
- public void setViewer(Viewer v)
- {
- this.viewer = v;
- }
- /**
- * Get the Viewer that called this wizard. This will be null unless set by the action that started this wizard.
- */
- public Viewer getViewer()
- {
- return viewer;
- }
- /**
- * Return the current viewer as an ISystemTree if it is one, or null otherwise
- */
- protected ISystemTree getCurrentTreeView()
- {
- Viewer v = getViewer();
- if (v instanceof ISystemTree)
- return (ISystemTree)v;
- else
- return null;
- }
-
- /**
- * For explicitly setting input object
- */
- public void setInputObject(Object inputObject)
- {
- this.input = inputObject;
- //System.out.println("Inside AbstractSystemWizard#setInputObject: " + inputObject + ", class = " + inputObject.getClass().getName());
- }
- /**
- * For explicitly getting input object
- */
- public Object getInputObject()
- {
- return input;
- }
-
- /**
- * For explicitly getting output object after wizard is dismissed. Set by the
- * wizard's processFinish method.
- */
- public Object getOutputObject()
- {
- return output;
- }
-
- /**
- * For explicitly setting output object after wizard is dismissed. Called in the
- * wizard's processFinish method, typically.
- */
- public void setOutputObject(Object outputObject)
- {
- output = outputObject;
- }
-
- /**
- * Allow caller to determine if wizard was cancelled or not.
- */
- public boolean wasCancelled()
- {
- if (cancelled) // most reliable
- return true;
- else
- return !finishPressed;
- }
- /**
- * You must call this in your performFinish method.
- */
- protected void setWasCancelled(boolean cancelled)
- {
- finishPressed = !cancelled;
- }
- /**
- * Override of parent so we can record the fact the wizard was cancelled.
- */
- public boolean performCancel()
- {
- //System.out.println("inside performCancel");
- cancelled = true;
- setWasCancelled(true);
- return super.performCancel();
- }
-
- /**
- * Required by INewWizard interface. It is called by the framework for wizards
- * that are launched file the File->New interface. Otherwise we don't use it.
- * If you need it, the selection is stored in protected variable "selection".
- */
- public void init(IWorkbench workbench, IStructuredSelection selection)
- {
- this.selection = selection;
- }
-
- /**
- * Set the wizard's min page width and height.
- * If you pass 0 for either one, the Eclipse default value will be used.
- */
- public void setMinimumPageSize(int width, int height)
- {
- if (width <= 0)
- width = 300; // found this number in WizardDialog code
- if (height <= 0)
- height = 225; // found this number in WizardDialog code
- this.minPageWidth = width;
- this.minPageHeight = height;
- }
-
- /**
- * Return the minimum page width. If zero, it has not been explicitly set, so the default is to be used.
- */
- public int getMinimumPageWidth()
- {
- return minPageWidth;
- }
- /**
- * Return the minimum page height. If zero, it has not been explicitly set, so the default is to be used.
- */
- public int getMinimumPageHeight()
- {
- return minPageHeight;
- }
-
- /**
- * If in the processing of performFinish an error is detected on another page of the
- * wizard, the best we can do is tell the user this via an error message on their own
- * page. It seems there is no way in JFace to successfully switch focus to another page.
- * <p>
- * To simplify processing, simply call this method in your wizard's performFinish if any
- * page's performFinish returned false. Pass the failing page. If it is not the current
- * page, this code will issue msg RSEG1240 "Error on another page" to the user.
- */
- public void setPageError(IWizardPage pageInError)
- {
- IWizardPage currentPage = getContainer().getCurrentPage();
- if (currentPage != pageInError)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_WIZARD_PAGE_ERROR);
- if (currentPage instanceof AbstractSystemWizardPage)
- ((AbstractSystemWizardPage)currentPage).setErrorMessage(msg);
- else if (pageInError instanceof WizardPage)
- ((WizardPage)currentPage).setErrorMessage(msg.getLevelOneText());
- }
- }
-
- /**
- * Expose inherited protected method convertWidthInCharsToPixels as a publicly
- * excessible method
- * <p>
- * Requires setOwningDialog to have been called, else returns -1
- */
- public int publicConvertWidthInCharsToPixels(int chars)
- {
- if (owningDialog != null)
- return owningDialog.publicConvertWidthInCharsToPixels(chars);
- else
- return -1;
- }
- /**
- * Expose inherited protected method convertHeightInCharsToPixels as a publicly
- * excessible method
- * <p>
- * Requires setOwningDialog to have been called, else returns -1
- */
- public int publicConvertHeightInCharsToPixels(int chars)
- {
- if (owningDialog != null)
- return owningDialog.publicConvertHeightInCharsToPixels(chars);
- else
- return -1;
- }
- /**
- * Set the cursor to the wait cursor (true) or restores it to the normal cursor (false).
- */
- public void setBusyCursor(boolean setBusy)
- {
- if (setBusy)
- {
- // Set the busy cursor to all shells.
- Display d = getShell().getDisplay();
- waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(getShell(), waitCursor);
- }
- else
- {
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(getShell(), null);
- if (waitCursor != null)
- waitCursor.dispose();
- waitCursor = null;
- }
- }
-
- // ----------------------------
- // METHODS YOU MUST OVERRIDE...
- // ----------------------------
-
- /**
- * Creates the wizard pages.
- * This method is an override from the parent Wizard class, but is made abstract here to ensure child classes override it.
- */
- public abstract void addPages();
-
- /**
- * Called when finish pressed.
- * <p>
- * Return true if no errors, false to cancel the finish operation.
- * <p>
- * Typically, you walk through each wizard page calling performFinish on it, and only return true if they all return true.
- * If one of the pages returns false, you should call setPageError(IWizardPage), which shows a message to the user about an
- * error pending on another page, if the given page is not the current page.
- */
- public abstract boolean performFinish();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java
deleted file mode 100644
index 7eab2c83e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java
+++ /dev/null
@@ -1,518 +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.wizards;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardPage;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageLine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Cursor;
-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.Display;
-import org.eclipse.swt.widgets.Label;
-
-
-
-/**
- * Abstract class for system wizards pages. Using this class is most effective when used in
- * conjunction with {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard}.
- * <p> Using this base class for wizards offers the following advantages over just using the
- * eclipse WizardPage class:
- * <ul>
- * <li>Designed to work in conjunction with {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard},
- * propogating settings from the wizard to the individual wizard pages.
- * <li>Supports using the overall wizard page title as set by {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard#setWizardPageTitle(String)},
- * if no title specified in the constructor.
- * <li>Supports a {@link #setHelp(String)} method to set the wizard page's overall contextual help
- * <li>Implements {@link org.eclipse.rse.ui.messages.ISystemMessageLine} so supports setting error messages as
- * either strings or, preferably, {@link SystemMessage} objects.
- * <li>Supports an {@link #setInputObject(Object) input-object}, as passed from the wizard, which in turn is passed from the action.
- * <li>Supports automatic assignment of unique mnemonics for all input-capable controls on the page, to add in accessibility.
- * <li>Supports setting a default-focus control, which gets initial focus when the page is shown.
- * <li>Supports helper methods to aid in population of the client area: {@link #addSeparatorLine(Composite, int)},
- * {@link #addFillerLine(Composite,int)} and {@link #addGrowableFillerLine(Composite,int)}.
- * <li>Supports a simple {@link #setBusyCursor(boolean)} method to toggle the cursor between busy and normal
- * </ul>
- *
- * <p>To use this class, :</p>
- * <ol>
- * <li>Subclass it.
- * <li>Decide whether to use the overall wizard default pages title or have a unique title for this page. Use the appropriate constructor.
- * <li>If desired, in your constructor call {@link #setHelp(String)} to set the contextual help for this page. Or, just use the default help
- * set via {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard#setHelp(String)} in the wizard itself.
- * <li>Override {@link #createContents(Composite)} to populate the client area. You may find it useful to use the static methods in {@link org.eclipse.rse.ui.SystemWidgetHelpers}.
- * <li>Override {@link #getInitialFocusControl()} to return the control to gain initial focus on this page, or null if there are no input controls.
- * <li>Override {@link #performFinish()} to perform input validation when Finish is pressed. Return true if validated ok, false if not.
- * <li>You may also wish to override {@link #isPageComplete()} to return false if any required inputs are not given. Typically, this also is coded to
- * return false if there is an error message showing, which you detect by maintaining a SystemMessage instance variable, set or cleared by your
- * keystroke validator methods, and performFinish validation routine.
- * <li>Typically you will also supply protected getter methods to get the user-entered data, for use by your wizard class.
- * </ol>
- *
- * <p>For error validation when there are multiple input fields on the page, there are two different approaches you can take:</p>
- * <ol>
- * <li>Just validate each field as data is entered. In the event processor for that field, you clear the message, then set it if an error is
- * detected in the input data, and also call setPageComplete(errorMessage == null), where errorMessage is your instance variable for the current error.
- * In performFinish, you then call the validation methods for each of the fields on the page, and if an error is found, position the cursor, set the
- * error message and then call setPageComplete. <br>
- * In this approach, only errors in the current field in focus are caught, and errors in other fields are not caught until Finish is pressed.
- * <li>Same as in step 1, but if the error checking for the current field finds no errors, then an overall validation method is called to check
- * the other fields, passing a parameter identifying the current field so it is skipped for efficiency. The overall validation method calls all
- * the individual validation methods, except for the one that was asked to be skipped. The performFinish method calls the overall validation method,
- * passing null so nothing is skipped, and if an error is detected positions the cursor. <br>
- * In this approach, which is more rigorous, the error checking is always complete for the whole page, so Finish theoretically will never catch an
- * error, and the page enablement is always completely accurate.
- * </ol>
- * <p>There is no consensus on the approach, although clearly the second one is preferable when it is possible.
- *
- * @see org.eclipse.rse.ui.wizards.AbstractSystemWizard
- * @see org.eclipse.rse.ui.dialogs.SystemWizardDialog
- * @see org.eclipse.rse.ui.actions.SystemBaseWizardAction
- */
-public abstract class AbstractSystemWizardPage
- extends WizardPage
- implements ISystemWizardPage, ISystemMessageLine
-{
- // state
- private Object input;
- private SystemMessageLine msgLine;
- private String helpId;
- private Composite parentComposite;
- private SystemMessage pendingMessage, pendingErrorMessage;
- //private Hashtable helpIdPerControl;
- private Cursor waitCursor;
-
- /**
- * Constructor when a unique page title is desired.
- * @param wizard - the page wizard.
- * @param pageName - the untranslated ID of this page. Not really used.
- * @param pageTitle - the translated title of this page. Appears below the overall wizard title.
- * @param pageDescription - the translated description of this page. Appears to the right of the page title.
- */
- public AbstractSystemWizardPage(IWizard wizard,
- String pageName, String pageTitle, String pageDescription)
- {
- super(pageName);
- setWizard(wizard);
- if (pageTitle != null)
- setTitle(pageTitle);
- else if (wizard instanceof AbstractSystemWizard)
- setTitle(((AbstractSystemWizard)wizard).getWizardPageTitle());
- setDescription(pageDescription);
- }
- /**
- * Constructor when the overall wizard page title is desired, as specified in
- * {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard#setWizardPageTitle(String)}.
- * <p>It is a somewhat common design pattern to use the same title for all pages in a wizard, and
- * this makes it easy to do that.
- * <p>
- * Your wizard must extend AbstractSystemWizard, and you must have called setWizardPageTitle.
- * @param wizard - the page's wizard.
- * @param pageName - the untranslated ID of this page. Not really used.
- * @param pageDescription - the translated description of this page. Appears to the right of the page title.
- */
- public AbstractSystemWizardPage(ISystemWizard wizard,
- String pageName, String pageDescription)
- {
- this(wizard, pageName, null, pageDescription);
- }
-
- // ------------------------
- // CONFIGURATION METHODS...
- // ------------------------
-
- /**
- * Configuration method. <br>
- * For setting the overall help for the wizard page.
- * <p>
- * This id is stored, and then applied to each of the input-capable
- * controls in the main composite returned from createContents.
- * <p>
- * Call this first to set the default help, then call {@link #setHelp(Control, String)} per individual
- * control if control-unique help is desired.
- */
- public void setHelp(String helpId)
- {
- if (parentComposite != null)
- SystemWidgetHelpers.setHelp(parentComposite, helpId);
- //SystemWidgetHelpers.setCompositeHelp(parentComposite, helpId, helpIdPerControl);
- //System.out.println("Setting help to " + helpId);
- this.helpId = helpId;
- }
- /**
- * Configuration method. <br>
- * For setting control-specific help for a control on the wizard page.
- * <p>
- * This overrides the default set in the call to {@link #setHelp(String)}.
- */
- public void setHelp(Control c, String helpId)
- {
- SystemWidgetHelpers.setHelp(c, helpId);
- //if (helpIdPerControl == null)
- // helpIdPerControl = new Hashtable();
- //helpIdPerControl.put(c, helpId);
- }
-
- /**
- * Configuration method. <br>
- * For explicitly setting input object. Automatically propogated by the parent wizard.
- */
- public void setInputObject(Object inputObject)
- {
- this.input = inputObject;
- }
-
- // ------------------------
- // GETTER METHODS...
- // ------------------------
- /**
- * Getter method. <br>
- * For explicitly getting input object.
- */
- public Object getInputObject()
- {
- return input;
- }
- /**
- * Getter method. <br>
- * Return the help Id as set in {@link #setHelp(String)}
- */
- public String getHelpContextId()
- {
- return helpId;
- }
- /**
- * Getter method. <br>
- * Return this page's message line so it can be passed to re-usable widgets that need it
- */
- public ISystemMessageLine getMessageLine()
- {
- //return msgLine;
- return this;
- }
-
- // ----------------
- // ABSTRACT METHODS
- // ----------------
- /**
- * Abstract method. <br>
- * Create the page contents here.
- * <p>
- * You may find it useful to use the static methods in {@link org.eclipse.rse.ui.SystemWidgetHelpers}.
- * If you do keystroke validation, you should call {@link #setErrorMessage(SystemMessage)} if you detect errors, and also
- * {@link #setPageComplete(boolean)} to affect the enablement of the next and finish buttons.
- *
- * @see org.eclipse.rse.ui.SystemWidgetHelpers
- */
- public abstract Control createContents(Composite parent);
-
- /**
- * Abstract method. <br>
- * Return the Control to be given initial focus.
- * <p>
- * Child classes must override this, but can return null.
- */
- protected abstract Control getInitialFocusControl();
-
- /**
- * Abstract method. <br>
- * Perform error checking of the page contents, returning true only if there are no errors.
- * <p>Called by the main wizard when the user presses Finish. The operation will be cancelled if
- * this method returns false for any page.
- */
- public abstract boolean performFinish();
-
- // -----------------------
- // PARENT-OVERRIDE METHODS
- // -----------------------
- /**
- * Parent override. <br>
- * Creates the wizard's UI component.
- * We set mnemonics. Child classes should NOT USE THIS.
- * Child classes should override {@link #createContents(Composite)}, which this calls.
- */
- public void createControl(Composite parent)
- {
-// dwd parentComposite = parent;
- Composite myComposite = new Composite(parent, SWT.NONE);
- myComposite.setLayout(new GridLayout(1, false));
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING, GridData.VERTICAL_ALIGN_BEGINNING, true, true);
- myComposite.setLayoutData(gd);
- parentComposite = myComposite;
- Control c = createContents(myComposite);
- if (c instanceof Composite)
- {
- applyMnemonics((Composite)c);
- parentComposite = (Composite)c;
- if (helpId != null)
- SystemWidgetHelpers.setHelp(parentComposite, helpId);
- // SystemWidgetHelpers.setCompositeHelp((Composite)c, helpId, helpIdPerControl);
- }
- else if (c instanceof Button)
- {
- Mnemonics ms = new Mnemonics();
- ms.setMnemonic((Button)c);
- }
-// dwd configureMessageLine();
- msgLine = new SystemMessageLine(myComposite);
- msgLine.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- if (pendingMessage!=null)
- setMessage(pendingMessage);
- if (pendingErrorMessage!=null)
- setErrorMessage(pendingErrorMessage);
-// dwd setControl(c);
- setControl(myComposite);
- }
-
- /**
- * Apply mnemonic to the content composite.
- * @param c the composite.
- */
- protected void applyMnemonics(Composite c) {
- SystemWidgetHelpers.setWizardPageMnemonics(c);
- }
-
- /**
- * Parent override. <br>
- * We intercept to give the initial-focus-control focus.
- */
- public void setVisible(boolean visible)
- {
- super.setVisible(visible);
- if (visible)
- {
- Control c = getInitialFocusControl();
- if (c != null)
- c.setFocus();
- }
- }
-
- // -----------------------------
- // ISystemMessageLine methods...
- // -----------------------------
-
- /**
- * ISystemMessageLine method. <br>
- * Clears the currently displayed error message and redisplayes
- * the message which was active before the error message was set.
- */
- public void clearErrorMessage()
- {
- if (msgLine!=null)
- msgLine.clearErrorMessage();
- }
-
- /**
- * ISystemMessageLine method. <br>
- * Clears the currently displayed message.
- */
- public void clearMessage()
- {
- if (msgLine!=null)
- msgLine.clearMessage();
- }
-
- /**
- * ISystemMessageLine method. <br>
- * Get the currently displayed error text.
- * @return The error message. If no error message is displayed <code>null</code> is returned.
- */
- public SystemMessage getSystemErrorMessage()
- {
- if (msgLine!=null)
- return msgLine.getSystemErrorMessage();
- else
- return null;
- }
-
- /**
- * ISystemMessageLine method. <br>
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(SystemMessage message)
- {
- if (msgLine!=null)
- {
- if (message != null)
- msgLine.setErrorMessage(message);
- else
- msgLine.clearErrorMessage();
- }
- else // not configured yet
- pendingErrorMessage = message;
- }
- /**
- * ISystemMessageLine method. <br>
- * Convenience method to set an error message from an exception
- */
- public void setErrorMessage(Throwable exc)
- {
- if (msgLine != null)
- msgLine.setErrorMessage(exc);
- else
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
- msg.makeSubstitution(exc);
- pendingErrorMessage = msg;
- }
- }
- /**
- * ISystemMessageLine method. <br>
- * Display the given error message. A currently displayed message
- * is saved and will be redisplayed when the error message is cleared.
- */
- public void setErrorMessage(String message)
- {
- if (msgLine != null)
- msgLine.setErrorMessage(message);
-// super.setErrorMessage(message);
-// if (msgLine != null)
-// ((SystemDialogPageMessageLine)msgLine).internalSetErrorMessage(message);
- }
-
- /**
- * ISystemMessageLine method. <br>
- * If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(SystemMessage message)
- {
- if (msgLine!=null)
- msgLine.setMessage(message);
- else // not configured yet
- pendingMessage = message;
- }
- /**
- * ISystemMessageLine method. <br>
- * Set the non-error message text. If the message line currently displays an error,
- * the message is stored and will be shown after a call to clearErrorMessage
- */
- public void setMessage(String message)
- {
- if (msgLine!=null)
- msgLine.setMessage(message);
-// super.setMessage(message);
-// if (msgLine!=null)
-// ((SystemDialogPageMessageLine)msgLine).internalSetMessage(message);
- }
-
- // ---------------
- // HELPER METHODS
- // ---------------
- /**
- * Set the cursor to the wait cursor (true) or restores it to the normal cursor (false).
- */
- public void setBusyCursor(boolean setBusy)
- {
- if (setBusy)
- {
- // Set the busy cursor to all shells.
- Display d = getShell().getDisplay();
- waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(getShell(), waitCursor);
- }
- else
- {
- org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(getShell(), null);
- if (waitCursor != null)
- waitCursor.dispose();
- waitCursor = null;
- }
- }
-
- /**
- * Helper method <br>
- * Add a separator line. This is a physically visible line.
- */
- protected void addSeparatorLine(Composite parent, int nbrColumns)
- {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- separator.setLayoutData(data);
- }
- /**
- * Helper method <br>
- * Add a spacer line
- */
- protected void addFillerLine(Composite parent, int nbrColumns)
- {
- Label filler = new Label(parent, SWT.LEFT);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- filler.setLayoutData(data);
- }
- /**
- * Helper method <br>
- * Add a spacer line that grows in height to absorb extra space
- */
- protected void addGrowableFillerLine(Composite parent, int nbrColumns)
- {
- Label filler = new Label(parent, SWT.LEFT);
- GridData data = new GridData();
- data.horizontalSpan = nbrColumns;
- data.horizontalAlignment = GridData.FILL;
- data.verticalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- filler.setLayoutData(data);
- }
-
- // ----------------
- // INTERNAL METHODS
- // ----------------
- /**
- * Internal method <br>
- * Configure the message line
- */
-// private void configureMessageLine()
-// {
-// msgLine = SystemDialogPageMessageLine.createWizardMsgLine(this);
-// if (msgLine!=null)
-// {
-// if (pendingMessage!=null)
-// setMessage(pendingMessage);
-// if (pendingErrorMessage!=null)
-// setErrorMessage(pendingErrorMessage);
-// }
-// }
-
- /**
- * Internal method <br>
- * On Finish, when an error is detected, position to the given
- * control. The trick though is to give this page focus if it
- * doesn't have it.
- */
- protected void setFocus(Control control)
- {
- if (this != getContainer().getCurrentPage())
- getContainer().showPage(this);
- if ((control!=null) && !control.isDisposed())
- control.setFocus();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/IRSENewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/IRSENewConnectionWizard.java
deleted file mode 100644
index 0907a973c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/IRSENewConnectionWizard.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.wizards;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.ui.INewWizard;
-
-public interface IRSENewConnectionWizard extends INewWizard {
-
- public static final String NEW_CONNECTION_WIZARD_DELEGATE_EXTENSION_POINT_ID = "org.eclipse.rse.ui.newConnectionWizardDelegates"; //$NON-NLS-1$
- public static final String NEW_CONNECTION_WIZARD_DELEGATE_EXTENSION_CONFIG_NAME = "newConnectionWizardDelegate"; //$NON-NLS-1$
- public static final String NEW_CONNECTION_WIZARD_DELEGATE_EXTENSION_CONFIG_ATTRIBUTE_SYSTEMTYPE = "systemType"; //$NON-NLS-1$
- public static final String NEW_CONNECTION_WIZARD_DELEGATE_EXTENSION_CONFIG_ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$
-
- public IRSENewConnectionWizardDelegate getDelegate();
-
- /**
- * Restrict system types. Users will only be able to choose from the given system types.
- * @param systemTypes the system types to restrict to.
- */
- public void restrictToSystemTypes(IRSESystemType[] systemTypes);
-
- /**
- * Restrict to a single system type. Users will not be shown the system type selection page in
- * the wizard.
- * @param systemType the system type to restrict to.
- */
- public void restrictToSystemType(IRSESystemType systemType);
-
- /**
- * Sets the system type that was selected in the wizard. This will only be called if the wizard
- * shows the system type selection page, i.e. if the wizard is not restricted to a single system type.
- * @param systemType the system type.
- */
- public void setSelectedSystemType(IRSESystemType systemType);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/IRSENewConnectionWizardDelegate.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/IRSENewConnectionWizardDelegate.java
deleted file mode 100644
index bfa1ac97b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/IRSENewConnectionWizardDelegate.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.wizards;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-
-/**
- * Interface for RSE new connection wizard delegate.
- */
-public interface IRSENewConnectionWizardDelegate {
-
- public void init(RSENewConnectionWizard wizard, IRSESystemType systemType);
-
- public boolean isInitialized();
-
- public void systemTypeChanged(IRSESystemType systemType);
-
- public RSENewConnectionWizard getWizard();
-
- public IRSESystemType getSystemType();
-
- public void addPages();
-
- public boolean performFinish();
-
- public boolean canFinish();
-
- public IWizardPage getMainPage();
-
- public IWizardPage getNextPage(IWizardPage page);
-
- public IWizardPage getPreviousPage(IWizardPage page);
-
- public IHost getDummyHost();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISubSystemPropertiesWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISubSystemPropertiesWizardPage.java
deleted file mode 100644
index 8baf5043f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISubSystemPropertiesWizardPage.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-public interface ISubSystemPropertiesWizardPage
-{
- public boolean applyValues(ISubSystem ss);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemNewConnectionWizardMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemNewConnectionWizardMainPage.java
deleted file mode 100644
index 7ef2c1e7e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemNewConnectionWizardMainPage.java
+++ /dev/null
@@ -1,84 +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.wizards;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-
-
-
-
-/**
- * Interface for new Connection (ie Definition) wizard main page classes
- */
-public interface ISystemNewConnectionWizardMainPage extends ISystemWizardPage
-{
-
- public String getSystemType();
- public String getConnectionName();
- public String getHostName();
- public String getConnectionDescription();
- public String getDefaultUserId();
- public int getDefaultUserIdLocation();
- public String getProfileName();
- /**
- * Call this to restrict the system type that the user is allowed to choose
- */
- public void restrictSystemType(String systemType);
- /**
- * Call this to restrict the system types that the user is allowed to choose
- */
- public void restrictSystemTypes(String[] systemTypes);
-
- /**
- * Call this to specify a validator for the connection name. It will be called per keystroke.
- */
- public void setConnectionNameValidators(ISystemValidator[] v);
- /**
- * Call this to specify a validator for the hostname. It will be called per keystroke.
- */
- public void setHostNameValidator(ISystemValidator v);
- /**
- * Call this to specify a validator for the userId. It will be called per keystroke.
- */
- public void setUserIdValidator(ISystemValidator v);
- /**
- * This method allows setting of the initial user Id. Sometimes subsystems
- * like to have their own default userId preference page option. If so, query
- * it and set it here by calling this.
- */
- public void setUserId(String userId);
- /**
- * Preset the connection name
- */
- public void setConnectionName(String name);
- /**
- * Preset the host name
- */
- public void setHostName(String name);
- /**
- * Set the profile names to show in the combo
- */
- public void setProfileNames(String[] names);
- /**
- * Set the profile name to preselect
- */
- public void setProfileNamePreSelection(String name);
- /**
- * Set the currently selected connection so as to better initialize input fields
- */
- public void setCurrentlySelectedConnection(IHost connection);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizard.java
deleted file mode 100644
index 6ad2d5273..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizard.java
+++ /dev/null
@@ -1,105 +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.wizards;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.ui.dialogs.ISystemPromptDialog;
-import org.eclipse.rse.ui.dialogs.SystemWizardDialog;
-import org.eclipse.ui.INewWizard;
-
-
-/**
- * Suggested interface for wizards launchable via remote system explorer.
- */
-public interface ISystemWizard extends INewWizard, ISystemPromptDialog
-{
- /**
- * Called when wizard to be used for update vs create.
- * This is the input object to be updated. Automatically sets input mode to update.
- */
- //public void setUpdateInput(Object input);
- /**
- * Retrieve update mode
- */
- //public boolean getUpdateMode();
- /**
- * Retrieve input object used in update mode.
- */
- //public Object getUpdateInput();
- /**
- * Set current selection of viewer, at time wizard launched
- */
- //public void setSelection(IStructuredSelection selection);
- /**
- * Get current selection of viewer, at time wizard launched, as set
- * by setSelection(IStructuredSelection selection)
- */
- //public IStructuredSelection getSelection();
-
- public void setMinimumPageSize(int width, int height);
- public int getMinimumPageWidth();
- public int getMinimumPageHeight();
-
- /**
- * Set the help context Id (infoPop) for this wizard. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelp(String id);
- /**
- * Return the help Id as set in setHelp(String)
- */
- public String getHelpContextId();
-
- /**
- * Set the Viewer that called this wizard. It is good practice for actions to call this
- * so wizard can directly access the originating viewer if needed.
- */
- public void setViewer(Viewer v);
- /**
- * Get the Viewer that called this wizard. This will be null unless set by the action that started this wizard.
- */
- public Viewer getViewer();
-
- /**
- * Set the wizard page title. Using this makes it possible to avoid subclassing.
- * The page title goes below the wizard title, and can be unique per page. However,
- * typically the wizard page title is the same for all pages... eg "Filter".
- * <p>
- * This is not used by default, but can be queried via getPageTitle() when constructing
- * pages.
- */
- public void setWizardPageTitle(String pageTitle);
- /**
- * Return the page title as set via setWizardPageTitle
- */
- public String getWizardPageTitle();
- /**
- * Called from SystemWizardDialog when it is used as the hosting dialog
- */
- public void setSystemWizardDialog(SystemWizardDialog dlg);
- /**
- * Return the result of setSystemWizardDialog
- */
- public SystemWizardDialog getSystemWizardDialog();
- /**
- * Exposes this nice new 2.0 capability to the public.
- * Only does anything if being hosted by SystemWizardDialog.
- */
- public void updateSize();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizardPage.java
deleted file mode 100644
index 8d98d1a62..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISystemWizardPage.java
+++ /dev/null
@@ -1,53 +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.wizards;
-/**
- * Interface for wizard pages
- */
-public interface ISystemWizardPage
-{
- /**
- * For explicitly setting input object for update mode wizards
- */
- public void setInputObject(Object inputObject);
-
- /**
- * For explicitly getting input object.
- */
- public Object getInputObject();
-
- /**
- * Perform error checking of the page contents, returning true only if there are no errors.
- * <p>Called by the main wizard when the user presses Finish. The operation will be cancelled if
- * this method returns false for any page.
- */
- public boolean performFinish();
-
- /**
- * Set the help context Id (infoPop) for this wizard. This must be fully qualified by
- * plugin ID.
- * <p>
- * Same as {@link org.eclipse.rse.ui.actions.SystemBaseAction #setHelp(String)}
- * @see org.eclipse.rse.ui.actions.SystemBaseAction #getHelpContextId()
- */
- public void setHelp(String id);
- /**
- * Return the help Id as set in setHelp(String)
- */
- public String getHelpContextId();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java
deleted file mode 100644
index b88137ca6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java
+++ /dev/null
@@ -1,556 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.wizards;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemPerspectiveHelpers;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.model.DummyHost;
-import org.eclipse.rse.model.SystemStartHere;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-
-
-/**
- *
- */
-public class RSEDefaultNewConnectionWizardDelegate extends RSENewConnectionWizardDelegate {
-
- private RSENewConnectionWizardDefaultDelegateMainPage mainPage;
- private SystemNewConnectionWizardRenameProfilePage rnmProfilePage;
- private ISystemNewConnectionWizardPage[] subsystemFactorySuppliedWizardPages;
- private Hashtable ssfWizardPagesPerSystemType = new Hashtable();
- private String defaultUserId;
- private String defaultConnectionName;
- private String defaultHostName;
- private String[] activeProfileNames = null;
- private int privateProfileIndex = -1;
- private ISystemProfile privateProfile = null;
- private IHost currentlySelectedConnection = null;
- private String[] restrictSystemTypesTo;
- private static String lastProfile = null;
- private IHost _dummyHost;
-
- /**
- * Constructor.
- */
- public RSEDefaultNewConnectionWizardDelegate() {
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate#init(org.eclipse.rse.ui.wizards.RSENewConnectionWizard, org.eclipse.rse.core.IRSESystemType)
- */
- public void init(RSENewConnectionWizard wizard, IRSESystemType systemType) {
- super.init(wizard, systemType);
- restrictSystemType(systemType.getName());
- activeProfileNames = SystemStartHere.getSystemProfileManager().getActiveSystemProfileNames();
- systemTypeSelected(systemType.getName(), true);
- }
-
- /**
- * Call this to restrict the system type that the user is allowed to choose
- */
- public void restrictSystemType(String systemType)
- {
- restrictSystemTypesTo = new String[1];
- restrictSystemTypesTo[0] = systemType;
- if (mainPage != null)
- mainPage.restrictSystemTypes(restrictSystemTypesTo);
- }
- /**
- * Call this to restrict the system types that the user is allowed to choose
- */
- public void restrictSystemTypes(String[] systemTypes)
- {
- this.restrictSystemTypesTo = systemTypes;
- if (mainPage != null)
- mainPage.restrictSystemTypes(systemTypes);
- }
-
- public IHost getDummyHost()
- {
- if (_dummyHost == null)
- {
- _dummyHost = new DummyHost(mainPage.getHostName(), mainPage.getSystemType());
- }
- return _dummyHost;
- }
-
-
-
- /**
- * Creates the wizard pages.
- * This method is an override from the parent Wizard class.
- */
- public void addPages()
- {
- try {
- mainPage = createMainPage(restrictSystemTypesTo);
- mainPage.setConnectionNameValidators(SystemConnectionForm.getConnectionNameValidators());
- mainPage.setCurrentlySelectedConnection(currentlySelectedConnection);
- if (defaultUserId != null)
- mainPage.setUserId(defaultUserId);
- if (defaultConnectionName != null)
- mainPage.setConnectionName(defaultConnectionName);
- if (defaultHostName != null)
- mainPage.setHostName(defaultHostName);
-
- if (restrictSystemTypesTo != null)
- mainPage.restrictSystemTypes(restrictSystemTypesTo);
-
- SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile();
-
- RSEUIPlugin.getDefault().getShowProfilePageInitially();
- /* DKM - I don't think we should force profiles into the faces of users
- * we no longer default to "private" so hopefully this would never be
- * desirable
- *
- // if there is a default private profile, we might want to show the rename profile page
- if (defaultProfile != null)
- {
- // make private profile equal to default profile
- privateProfile = defaultProfile;
-
- // get the private profile index in the list of active profiles
- for (int idx=0; (privateProfileIndex<0) && (idx<activeProfileNames.length); idx++)
- if (activeProfileNames[idx].equals(defaultProfile.getName()))
- privateProfileIndex = idx;
-
- // if profile page is to be shown initially, then add the page
- if (showProfilePageInitially) {
- rnmProfilePage = new SystemNewConnectionWizardRenameProfilePage(this) ;
- addPage(rnmProfilePage);
- }
- // otherwise, do not add profile page
- // and set the new private profile name to be the local machine name
- else {
- rnmProfilePage = null;
-
- String initProfileName = RSEUIPlugin.getLocalMachineName();
- int dotIndex = initProfileName.indexOf('.');
-
- if (dotIndex != -1) {
- initProfileName = initProfileName.substring(0, dotIndex);
- }
-
- setNewPrivateProfileName(initProfileName);
- }
- }
- else
- */
- {
- mainPage.setProfileNames(activeProfileNames);
- // if there is no connection currently selected, default the profile to
- // place the new connection into to be the first of:
- // 1. the profile the last connection was created in, in this session
- // 2. the team profile.
- if (currentlySelectedConnection == null)
- {
- if ((lastProfile == null) && (activeProfileNames!=null))
- {
- String defaultTeamName = ISystemPreferencesConstants.DEFAULT_TEAMPROFILE;
- for (int idx=0; (lastProfile==null)&&(idx<activeProfileNames.length); idx++)
- {
- if (!activeProfileNames[idx].equals(defaultTeamName))
- lastProfile = activeProfileNames[idx];
- }
- if ((lastProfile == null) && (activeProfileNames.length>0))
- lastProfile = activeProfileNames[0];
- }
- if (lastProfile != null)
- mainPage.setProfileNamePreSelection(lastProfile);
- }
- }
-
- // getWizard().addPage((WizardPage)mainPage);
-
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("New connection: Error in createPages: ",exc); //$NON-NLS-1$
- }
- }
-
- /**
- * Creates the wizard's main page.
- * This method is an override from the parent class.
- */
- protected RSENewConnectionWizardDefaultDelegateMainPage createMainPage(String[] restrictSystemTypesTo)
- {
- String pageTitle = getPageTitle();
- mainPage = new RSENewConnectionWizardDefaultDelegateMainPage(getWizard(),
- pageTitle,
- SystemResources.RESID_NEWCONN_PAGE1_DESCRIPTION);
- getWizard().setOutputObject(null);
- return mainPage;
- }
-
- public String getPageTitle() {
-
- String pageTitle = null;
-
- if ((restrictSystemTypesTo == null) || (restrictSystemTypesTo.length != 1)) {
- pageTitle = SystemResources.RESID_NEWCONN_PAGE1_TITLE;
- }
- else {
- String onlySystemType = restrictSystemTypesTo[0];
-
- if (onlySystemType.equals(IRSESystemType.SYSTEMTYPE_LOCAL)) {
- pageTitle = SystemResources.RESID_NEWCONN_PAGE1_LOCAL_TITLE;
- }
- else {
- pageTitle = SystemResources.RESID_NEWCONN_PAGE1_REMOTE_TITLE;
- pageTitle = SystemMessage.sub(pageTitle, "&1", onlySystemType); //$NON-NLS-1$
- }
- }
-
- return pageTitle;
- }
-
- /**
- * Set the currently selected connection. Used to better default entry fields.
- */
- public void setCurrentlySelectedConnection(IHost conn)
- {
- this.currentlySelectedConnection = conn;
- }
-
- /**
- * For "new" mode, allows setting of the initial user Id. Sometimes subsystems
- * like to have their own default userId preference page option. If so, query
- * it and set it here by calling this.
- */
- public void setUserId(String userId)
- {
- defaultUserId = userId;
- if (mainPage != null)
- mainPage.setUserId(userId);
- }
-
- /**
- * Preset the connection name
- */
- public void setConnectionName(String name)
- {
- defaultConnectionName = name;
- if (mainPage != null)
- mainPage.setConnectionName(name);
- }
- /**
- * Preset the host name
- */
- public void setHostName(String name)
- {
- defaultHostName = name;
- if (mainPage != null)
- mainPage.setHostName(name);
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- boolean ok = mainPage.performFinish();
- if (!ok)
- getWizard().setPageError(mainPage);
- else if (ok && hasAdditionalPages())
- {
- for (int idx=0; ok && (idx<subsystemFactorySuppliedWizardPages.length); idx++)
- {
- ok = subsystemFactorySuppliedWizardPages[idx].performFinish();
- if (!ok)
- getWizard().setPageError((IWizardPage)subsystemFactorySuppliedWizardPages[idx]);
- }
- }
- if (ok)
- {
- boolean cursorSet = true;
- getWizard().setBusyCursor(true);
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
-
- // if private profile is not null, then we have to rename the private profile
- // with the new profile name
- if (privateProfile != null)
- {
- try
- {
- String newName = activeProfileNames[privateProfileIndex];
- sr.renameSystemProfile(privateProfile, newName);
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayMessage(getWizard().getShell(), exc);
-
- ok = false;
- }
- catch (Exception exc)
- {
- getWizard().setBusyCursor(false);
- cursorSet = false;
- String msg = "Exception renaming profile "; //$NON-NLS-1$
- SystemBasePlugin.logError(msg, exc);
- SystemMessageDialog.displayExceptionMessage(getWizard().getShell(),exc);
- ok = false;
- }
- }
-
- if (ok)
- {
- try
- {
- String sysType = mainPage.getSystemType();
- IHost conn =
- sr.createHost(mainPage.getProfileName(), sysType,
- mainPage.getConnectionName(), mainPage.getHostName(),
- mainPage.getConnectionDescription(), mainPage.getDefaultUserId(),
- mainPage.getDefaultUserIdLocation(), subsystemFactorySuppliedWizardPages);
-
- getWizard().setBusyCursor(false);
- cursorSet = false;
-
- // a tweak that is the result of UCD feedback. Phil
- if ((conn!=null) && SystemPerspectiveHelpers.isRSEPerspectiveActive())
- {
- if (sysType.equals(IRSESystemType.SYSTEMTYPE_ISERIES))
- {
- ISubSystem[] objSubSystems = sr.getSubSystemsBySubSystemConfigurationCategory("nativefiles", conn); //$NON-NLS-1$
- if ((objSubSystems != null)
- && (objSubSystems.length>0))// might be in product that doesn't have iSeries plugins
- sr.expandSubSystem(objSubSystems[0]);
- else
- sr.expandHost(conn);
- }
- else
- sr.expandHost(conn);
- }
-
- lastProfile = mainPage.getProfileName();
- getWizard().setOutputObject(conn);
- } catch (Exception exc)
- {
- if (cursorSet)
- getWizard().setBusyCursor(false);
- cursorSet = false;
- String msg = "Exception creating connection "; //$NON-NLS-1$
- SystemBasePlugin.logError(msg, exc);
- SystemMessageDialog.displayExceptionMessage(getWizard().getShell(),exc);
- ok = false;
- }
- }
- //getShell().setCursor(null);
- //busyCursor.dispose();
- if (cursorSet)
- getWizard().setBusyCursor(false);
- return ok;
- }
- return ok;
- }
-
- // callbacks from rename page
-
- /**
- * Set the new profile name specified on the rename profile page...
- */
- protected void setNewPrivateProfileName(String newName)
- {
- activeProfileNames[privateProfileIndex] = newName;
- if (mainPage != null)
- {
- mainPage.setProfileNames(activeProfileNames);
- mainPage.setProfileNamePreSelection(newName);
- }
- }
-
- /**
- * Return the main page of this wizard
- */
- public IWizardPage getMainPage()
- {
- if (mainPage == null) {
- addPages();
- }
-
- return mainPage;
- }
-
- /**
- * Return the form of the main page of this wizard
- */
- public SystemConnectionForm getMainPageForm()
- {
- return (mainPage).getForm();
- }
-
- // ----------------------------------------
- // CALLBACKS FROM SYSTEM CONNECTION PAGE...
- // ----------------------------------------
- /**
- * Event: the user has selected a system type.
- */
- public void systemTypeSelected(String systemType, boolean duringInitialization)
- {
- subsystemFactorySuppliedWizardPages = getAdditionalWizardPages(systemType);
- if (!duringInitialization)
- getWizard().getContainer().updateButtons();
- }
-
- /*
- * Private method to get all the wizard pages from all the subsystem factories, given a
- * system type.
- */
- protected ISystemNewConnectionWizardPage[] getAdditionalWizardPages(String systemType)
- {
- // this query is expensive, so only do it once...
- subsystemFactorySuppliedWizardPages = (ISystemNewConnectionWizardPage[])ssfWizardPagesPerSystemType.get(systemType);
- if (subsystemFactorySuppliedWizardPages == null)
- {
- // query all affected subsystems for their list of additional wizard pages...
- Vector additionalPages = new Vector();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType, true);
- for (int idx=0; idx<factories.length; idx++)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)factories[idx].getAdapter(ISubSystemConfigurationAdapter.class);
-
- ISystemNewConnectionWizardPage[] pages = adapter.getNewConnectionWizardPages(factories[idx], getWizard());
- if (pages != null)
- {
- for (int widx=0; widx<pages.length; widx++)
- additionalPages.addElement(pages[widx]);
- }
- }
- subsystemFactorySuppliedWizardPages = new ISystemNewConnectionWizardPage[additionalPages.size()];
- for (int idx=0; idx<subsystemFactorySuppliedWizardPages.length; idx++)
- subsystemFactorySuppliedWizardPages[idx] = (ISystemNewConnectionWizardPage)additionalPages.elementAt(idx);
- ssfWizardPagesPerSystemType.put(systemType, subsystemFactorySuppliedWizardPages);
- }
- return subsystemFactorySuppliedWizardPages;
- }
-
- /**
- * Return true if there are additional pages. This decides whether to enable the Next button
- * on the main page
- */
- protected boolean hasAdditionalPages()
- {
- return (subsystemFactorySuppliedWizardPages != null) && (subsystemFactorySuppliedWizardPages.length>0);
- }
-
- /**
- * Return the first additional page to show when user presses Next on the main page
- */
- protected ISystemNewConnectionWizardPage getFirstAdditionalPage()
- {
- if ((subsystemFactorySuppliedWizardPages != null) && (subsystemFactorySuppliedWizardPages.length>0))
- {
- IWizardPage previousPage = mainPage;
- for (int idx=0; idx<subsystemFactorySuppliedWizardPages.length; idx++)
- {
- ((IWizardPage)subsystemFactorySuppliedWizardPages[idx]).setPreviousPage(previousPage);
- previousPage = (IWizardPage)subsystemFactorySuppliedWizardPages[idx];
- }
- return subsystemFactorySuppliedWizardPages[0];
- }
- else
- return null;
- }
-
- // --------------------
- // PARENT INTERCEPTS...
- // --------------------
-
- /**
- * Intercept of Wizard method so we can get the Next button behaviour to work right for the
- * dynamically managed additional wizard pages.
- */
- public IWizardPage getNextPage(IWizardPage page)
- {
- if (!hasAdditionalPages() || (page==rnmProfilePage))
- return null;
- else
- {
- int index = getAdditionalPageIndex(page);
- if ((index == (subsystemFactorySuppliedWizardPages.length - 1)))
- // last page or page not found
- return null;
- return (IWizardPage)subsystemFactorySuppliedWizardPages[index + 1];
- }
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getPreviousPage(IWizardPage page) {
- return null;
- }
-
- private int getAdditionalPageIndex(IWizardPage page)
- {
- for (int idx=0; idx<subsystemFactorySuppliedWizardPages.length; idx++)
- {
- if (page == subsystemFactorySuppliedWizardPages[idx])
- return idx;
- }
- return -1;
- }
-
- /**
- * Intercept of Wizard method so we can take into account our additional pages
- */
- public boolean canFinish()
- {
- boolean ok = mainPage.isPageComplete();
-
- if (ok && hasAdditionalPages())
- {
- for (int idx=0; ok && (idx<subsystemFactorySuppliedWizardPages.length); idx++)
- ok = subsystemFactorySuppliedWizardPages[idx].isPageComplete();
- }
- return ok;
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate#systemTypeChanged(org.eclipse.rse.core.IRSESystemType)
- */
- public void systemTypeChanged(IRSESystemType systemType) {
- setSystemType(systemType);
- restrictSystemType(systemType.getName());
- getMainPage().setTitle(getPageTitle());
- subsystemFactorySuppliedWizardPages = getAdditionalWizardPages(systemType.getName());
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizard.java
deleted file mode 100644
index 425be0a90..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizard.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and Symbian Software Ltd. 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:
- * Javier Montalvo Orús (Symbian) - Bug 158555 - newConnectionWizardDelegates can only be used once
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards;
-
-import java.util.HashMap;
-
-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.jface.wizard.IWizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-/**
- * The New Connection wizard. This wizard allows users to create new RSE connections.
- */
-public class RSENewConnectionWizard extends AbstractSystemWizard implements IRSENewConnectionWizard {
-
- private HashMap map;
- //private IRSESystemType systemType;
- private IRSENewConnectionWizardDelegate delegate;
- private RSENewConnectionWizardMainPage mainPage;
- private IRSESystemType[] restrictedSystemTypes;
- private boolean onlySystemType;
- private IRSENewConnectionWizardDelegate defaultDelegate;
- private boolean defaultDelegateCreated;
-
- /**
- * Constructor.
- */
- public RSENewConnectionWizard() {
- super(SystemResources.RESID_NEWCONN_TITLE, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTIONWIZARD_ID));
- readWizardDelegateExtensions();
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(true);
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizard#restrictToSystemType(org.eclipse.rse.core.IRSESystemType)
- */
- public void restrictToSystemType(IRSESystemType systemType) {
- IRSESystemType[] types = new IRSESystemType[1];
- types[0] = systemType;
- restrictToSystemTypes(types);
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizard#restrictToSystemTypes(org.eclipse.rse.core.IRSESystemType[])
- */
- public void restrictToSystemTypes(IRSESystemType[] systemTypes) {
- this.restrictedSystemTypes = systemTypes;
-
- if (systemTypes.length == 1) {
- this.onlySystemType = true;
- }
- else {
- this.onlySystemType = false;
- }
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizard#setSelectedSystemType(org.eclipse.rse.core.IRSESystemType)
- */
- public void setSelectedSystemType(IRSESystemType systemType) {
- //this.systemType = systemType;
- setDelegate(systemType);
- }
-
- /**
- *
- */
- private void readWizardDelegateExtensions() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] elements = registry.getConfigurationElementsFor(NEW_CONNECTION_WIZARD_DELEGATE_EXTENSION_POINT_ID);
-
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
-
- if (element.getName().equals(NEW_CONNECTION_WIZARD_DELEGATE_EXTENSION_CONFIG_NAME)) {
- String systemTypeID = element.getAttribute(NEW_CONNECTION_WIZARD_DELEGATE_EXTENSION_CONFIG_ATTRIBUTE_SYSTEMTYPE);
- Object obj = null;
-
- try {
- obj = element.createExecutableExtension(NEW_CONNECTION_WIZARD_DELEGATE_EXTENSION_CONFIG_ATTRIBUTE_CLASS);
-
- if (obj instanceof IRSENewConnectionWizardDelegate) {
-
- if (map == null) {
- map = new HashMap();
- }
-
- if (!map.containsKey(systemTypeID)) {
- map.put(systemTypeID, obj);
- }
- }
- else {
- continue;
- }
- }
- catch (CoreException e) {
- SystemBasePlugin.logError("Class " + obj + " is not executable extension", e); //$NON-NLS-1$ //$NON-NLS-2$
- continue;
- }
- }
- }
- }
-
- /**
- * Get the new connection wizard delegate for the system type.
- * @param systemType the system type for which we need the delegate.
- */
- private IRSENewConnectionWizardDelegate setDelegate(IRSESystemType systemType) {
-
- if (map != null) {
- delegate = (IRSENewConnectionWizardDelegate)(map.get(systemType.getId()));
- }
-
- if (delegate == null) {
-
- if (!defaultDelegateCreated) {
- defaultDelegate = new RSEDefaultNewConnectionWizardDelegate();
- defaultDelegateCreated = true;
- }
-
- delegate = defaultDelegate;
- }
-
- // initialize with wizard and system type if not initialized before
- if (!delegate.isInitialized()) {
- delegate.init(this, systemType);
- }
- else {
- delegate.systemTypeChanged(systemType);
- }
-
- return delegate;
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizard#getDelegate()
- */
- public IRSENewConnectionWizardDelegate getDelegate() {
- return delegate;
- }
-
- /**
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
-
- if (!onlySystemType) {
- mainPage = new RSENewConnectionWizardMainPage(this, "Select System Type", "Select a system type");
-
- if (restrictedSystemTypes != null) {
- mainPage.restrictToSystemTypes(restrictedSystemTypes);
- }
-
- addPage(mainPage);
- }
- else {
- setDelegate(restrictedSystemTypes[0]);
- addPage(delegate.getMainPage());
- }
- }
-
- /**
- * @see org.eclipse.jface.wizard.Wizard#canFinish()
- */
- public boolean canFinish() {
-
- boolean result = true;
-
- if (mainPage != null) {
- result = mainPage.isPageComplete();
- }
-
- if (result) {
-
- if (delegate != null) {
- result = delegate.canFinish();
- }
- // we do not allow wizard to complete if the delegate is not yet available
- else {
- result = false;
- }
- }
-
- return result;
- }
-
- /**
- * @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
-
- if (mainPage != null && page == mainPage) {
- return super.getNextPage(page);
- }
- else {
-
- if (delegate != null) {
-
- IWizardPage nextPage = delegate.getNextPage(page);
-
- if (nextPage == null) {
- return super.getNextPage(page);
- }
- else {
- return nextPage;
- }
- }
- else {
- return super.getNextPage(page);
- }
- }
- }
-
- /**
- * @see org.eclipse.jface.wizard.Wizard#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getPreviousPage(IWizardPage page) {
-
- if (mainPage != null && page == mainPage) {
- return super.getPreviousPage(page);
- }
- else {
-
- if (delegate != null) {
- IWizardPage prevPage = delegate.getPreviousPage(page);
-
- if (prevPage == null) {
- return super.getPreviousPage(page);
- }
- else {
- return prevPage;
- }
- }
- else {
- return super.getPreviousPage(page);
- }
- }
- }
-
- /**
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- public boolean performFinish() {
-
- boolean result = true;
-
- if (mainPage != null) {
- result = mainPage.performFinish();
- }
-
- if (result) {
-
- if (delegate != null) {
- result = delegate.performFinish();
- }
- }
-
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardDefaultDelegateMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardDefaultDelegateMainPage.java
deleted file mode 100644
index 26623ce2a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardDefaultDelegateMainPage.java
+++ /dev/null
@@ -1,381 +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.wizards;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.ISystemConnectionFormCaller;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-
-/**
- * Default main page of the "New Connection" wizard.
- * This page asks for the primary information, including:
- * <ul>
- * <li>Connection Name
- * <li>Hostname/IP-address
- * <li>UserId
- * <li>Description
- * </ul>
- */
-
-public class RSENewConnectionWizardDefaultDelegateMainPage
- //extends WizardPage
- extends AbstractSystemWizardPage
- implements ISystemNewConnectionWizardMainPage,
- ISystemMessageLine, ISystemConnectionFormCaller
-{
- protected String[] restrictSystemTypesTo;
- protected SystemConnectionForm form;
- protected String parentHelpId;
- protected RSEDefaultNewConnectionWizardDelegate delegate;
-
- /**
- * Constructor. Use this when you want to supply your own title and
- * description strings.
- */
- public RSENewConnectionWizardDefaultDelegateMainPage(Wizard wizard,
- String title,
- String description)
- {
- super(wizard, "NewConnection", title, description); //$NON-NLS-1$
- parentHelpId = RSEUIPlugin.HELPPREFIX + "wncc0000"; //$NON-NLS-1$
- setHelp(parentHelpId);
- form = getForm();
- }
-
- /**
- * Call this to restrict the system type that the user is allowed to choose
- */
- public void restrictSystemType(String systemType)
- {
- restrictSystemTypesTo = new String[1];
- restrictSystemTypesTo[0] = systemType;
- form.restrictSystemTypes(restrictSystemTypesTo);
- }
- /**
- * Call this to restrict the system types that the user is allowed to choose
- */
- public void restrictSystemTypes(String[] systemTypes)
- {
- restrictSystemTypesTo = systemTypes;
- form.restrictSystemTypes(restrictSystemTypesTo);
- }
-
- /**
- * Return the main wizard typed
- */
- private RSEDefaultNewConnectionWizardDelegate getOurWizardDelegate() {
- IWizard wizard = getWizard();
-
- if (wizard instanceof RSENewConnectionWizard) {
- IRSENewConnectionWizardDelegate delegate = ((RSENewConnectionWizard)wizard).getDelegate();
-
- if (delegate instanceof RSEDefaultNewConnectionWizardDelegate) {
- return (RSEDefaultNewConnectionWizardDelegate)delegate;
- }
- else {
- return null;
- }
- }
- else {
- return null;
- }
- }
-
-
- /**
- * Overrride this if you want to supply your own form. This may be called
- * multiple times so please only instantatiate if the form instance variable
- * is null, and then return the form instance variable.
- * @see org.eclipse.rse.ui.SystemConnectionForm
- */
- protected SystemConnectionForm getForm()
- {
- if (form == null)
- form = new SystemConnectionForm(this,this);
- return form;
- }
- /**
- * Call this to specify a validator for the connection name. It will be called per keystroke.
- */
- public void setConnectionNameValidators(ISystemValidator[] v)
- {
- form.setConnectionNameValidators(v);
- }
- /**
- * Call this to specify a validator for the hostname. It will be called per keystroke.
- */
- public void setHostNameValidator(ISystemValidator v)
- {
- form.setHostNameValidator(v);
- }
- /**
- * Call this to specify a validator for the userId. It will be called per keystroke.
- */
- public void setUserIdValidator(ISystemValidator v)
- {
- form.setUserIdValidator(v);
- }
-
- /**
- * This method allows setting of the initial user Id. Sometimes subsystems
- * like to have their own default userId preference page option. If so, query
- * it and set it here by calling this.
- */
- public void setUserId(String userId)
- {
- form.setUserId(userId);
- }
-
- /**
- * Set the profile names to show in the combo
- */
- public void setProfileNames(String[] names)
- {
- form.setProfileNames(names);
- }
- /**
- * Set the profile name to preselect
- */
- public void setProfileNamePreSelection(String name)
- {
- form.setProfileNamePreSelection(name);
- }
-
- /**
- * Set the currently selected connection so as to better initialize input fields
- */
- public void setCurrentlySelectedConnection(IHost connection)
- {
- form.setCurrentlySelectedConnection(connection);
- }
-
- /**
- * Preset the connection name
- */
- public void setConnectionName(String name)
- {
- form.setConnectionName(name);
- }
- /**
- * Preset the host name
- */
- public void setHostName(String name)
- {
- form.setHostName(name);
- }
-
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- */
- public Control createContents(Composite parent)
- {
- return form.createContents(parent, SystemConnectionForm.CREATE_MODE, parentHelpId);
- }
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return form.getInitialFocusControl();
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- return form.verify(true);
- }
-
- // --------------------------------- //
- // METHODS FOR EXTRACTING USER DATA ...
- // --------------------------------- //
- /**
- * Return user-entered System Type.
- * Call this after finish ends successfully.
- */
-/* public String getSystemType()
- {
- return form.getSystemType();
- } */
- /**
- * Return user-entered Connection Name.
- * Call this after finish ends successfully.
- */
- public String getConnectionName()
- {
- return form.getConnectionName();
- }
- /**
- * Return user-entered Host Name.
- * Call this after finish ends successfully.
- */
- public String getHostName()
- {
- return form.getHostName();
- }
- /**
- * Return user-entered Default User Id.
- * Call this after finish ends successfully.
- */
- public String getDefaultUserId()
- {
- return form.getDefaultUserId();
- }
- /**
- * Return location where default user id is to be set.
- * @see org.eclipse.rse.core.IRSEUserIdConstants
- */
- public int getDefaultUserIdLocation()
- {
- return form.getUserIdLocation();
- }
- /**
- * Return user-entered Description.
- * Call this after finish ends successfully.
- */
- public String getConnectionDescription()
- {
- return form.getConnectionDescription();
- }
- /**
- * Return name of profile to contain new connection.
- * Call this after finish ends successfully.
- */
- public String getProfileName()
- {
- return form.getProfileName();
- }
-
- // ISystemMessageLine methods
-// public void clearMessage()
-// {
-// setMessage(null);
-// }
- //public void clearErrorMessage()
- //{
- //setErrorMessage(null);
- //}
-
- public Object getLayoutData()
- {
- return null;
- }
-
- public void setLayoutData(Object gridData)
- {
- }
-
-
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- //System.out.println("Inside isPageComplete. " + form.isPageComplete());
- if (form!=null)
- return form.isPageComplete() && form.isConnectionUnique();
- else
- return false;
- }
-
- /**
- * Intercept of WizardPage so we know when Next is pressed
- */
- public IWizardPage getNextPage()
- {
- //if (wizard == null)
- //return null;
- //return wizard.getNextPage(this);
-
- // verify contents of page before going to main page
- // this is done because the main page may have input that is not valid, but can
- // only be verified when next is pressed since it requires a long running operation
- boolean verify = form.verify(true);
-
- if (!verify) {
- return null;
- }
-
- RSEDefaultNewConnectionWizardDelegate newConnWizardDelegate = getOurWizardDelegate();
- if (newConnWizardDelegate != null)
- {
- return (IWizardPage)newConnWizardDelegate.getFirstAdditionalPage();
- }
- else
- return super.getNextPage();
- }
- /**
- * Intercept of WizardPge so we know when the wizard framework is deciding whether
- * to enable next or not.
- */
- public boolean canFlipToNextPage()
- {
- //return isPageComplete() && getNextPage() != null;
-
- RSEDefaultNewConnectionWizardDelegate newConnWizardDelegate = getOurWizardDelegate();
- if (newConnWizardDelegate != null)
- {
- return (isPageComplete() && newConnWizardDelegate.hasAdditionalPages() && form.isConnectionUnique());
- }
- else
- return super.canFlipToNextPage();
- }
-
- // ----------------------------------------
- // CALLBACKS FROM SYSTEM CONNECTION FORM...
- // ----------------------------------------
- /**
- * Event: the user has selected a system type.
- */
- public void systemTypeSelected(String systemType, boolean duringInitialization)
- {
- RSEDefaultNewConnectionWizardDelegate newConnWizardDelegate = getOurWizardDelegate();
- if (newConnWizardDelegate != null)
- {
- newConnWizardDelegate.systemTypeSelected(systemType, duringInitialization);
- }
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.ISystemNewConnectionWizardMainPage#getSystemType()
- */
- public String getSystemType() {
- RSEDefaultNewConnectionWizardDelegate newConnWizardDelegate = getOurWizardDelegate();
- return newConnWizardDelegate.getSystemType().getName();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardDelegate.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardDelegate.java
deleted file mode 100644
index dcd3b4e3c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardDelegate.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.wizards;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-
-/**
- *
- */
-public abstract class RSENewConnectionWizardDelegate implements IRSENewConnectionWizardDelegate {
-
- private RSENewConnectionWizard wizard;
- private IRSESystemType systemType;
- private boolean isInitialized;
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#init(org.eclipse.rse.ui.wizards.RSENewConnectionWizard, org.eclipse.rse.core.IRSESystemType)
- */
- public void init(RSENewConnectionWizard wizard, IRSESystemType systemType) {
- setWizard(wizard);
- setSystemType(systemType);
- setInitialized(true);
- }
-
- protected void setWizard(RSENewConnectionWizard wizard) {
- this.wizard = wizard;
- }
-
- protected void setSystemType(IRSESystemType systemType) {
- this.systemType = systemType;
- }
-
- protected void setInitialized(boolean isInitialized) {
- this.isInitialized = true;
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#getWizard()
- */
- public RSENewConnectionWizard getWizard() {
- return wizard;
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#getSystemType()
- */
- public IRSESystemType getSystemType() {
- return systemType;
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#isInitialized()
- */
- public boolean isInitialized() {
- return isInitialized;
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#addPages()
- */
- public void addPages() {
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#canFinish()
- */
- public boolean canFinish() {
- return false;
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
- return null;
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getPreviousPage(IWizardPage page) {
- return wizard.getStartingPage();
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#systemTypeChanged(org.eclipse.rse.core.IRSESystemType)
- */
- public void systemTypeChanged(IRSESystemType systemType) {
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardMainPage.java
deleted file mode 100644
index cdbf27467..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSENewConnectionWizardMainPage.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others. 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:
- * Javier Montalvo Orús (Symbian) - Bug 149151: Use a Listbox for systemtype
- * Martin Oberhuber (Wind River) - Use SelectionListener instead of SWT Listener
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * The New Connection Wizard main page that allows selection of system type.
- */
-public class RSENewConnectionWizardMainPage extends AbstractSystemWizardPage implements SelectionListener {
-
- protected String parentHelpId;
- protected List textSystemType;
- protected Text descriptionSystemType;
- protected IWizardPage nextPage;
- protected IRSESystemType[] restrictedSystemTypes;
-
- /**
- * Constructor.
- * @param wizard the wizard.
- * @param title the title of the wizard page.
- * @param description the description of the wizard page.
- */
- public RSENewConnectionWizardMainPage(IRSENewConnectionWizard wizard, String title, String description) {
- super(wizard, "NewConnectionSystemType", title, description); //$NON-NLS-1$
- parentHelpId = RSEUIPlugin.HELPPREFIX + "wncc0000"; //$NON-NLS-1$
- setHelp(parentHelpId);
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.AbstractSystemWizardPage#createContents(org.eclipse.swt.widgets.Composite)
- */
- public Control createContents(Composite parent) {
-
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- SystemWidgetHelpers.setCompositeHelp(composite_prompts, parentHelpId);
-
- String temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_SYSTEMTYPE_LABEL);
-
- Label labelSystemType = SystemWidgetHelpers.createLabel(composite_prompts, temp);
- labelSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP);
-
- if (restrictedSystemTypes == null) {
- textSystemType = SystemWidgetHelpers.createSystemTypeListBox(parent, null);
- }
- else {
- String[] systemTypeNames = new String[restrictedSystemTypes.length];
-
- for (int i = 0; i < restrictedSystemTypes.length; i++) {
- systemTypeNames[i] = restrictedSystemTypes[i].getName();
- }
-
- textSystemType = SystemWidgetHelpers.createSystemTypeListBox(parent, null, systemTypeNames);
- }
-
- textSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP);
- SystemWidgetHelpers.setHelp(textSystemType, RSEUIPlugin.HELPPREFIX + "ccon0003"); //$NON-NLS-1$
-
- textSystemType.addSelectionListener(this);
-
- descriptionSystemType = SystemWidgetHelpers.createMultiLineTextField(parent,null,30);
- descriptionSystemType.setEditable(false);
-
- IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemType(textSystemType.getSelection()[0]);
-
- if(systemType!=null) {
- descriptionSystemType.setText(systemType.getDescription());
- }
-
- return composite_prompts;
- }
-
- public void restrictToSystemTypes(IRSESystemType[] systemTypes) {
- this.restrictedSystemTypes = systemTypes;
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.AbstractSystemWizardPage#getInitialFocusControl()
- */
- protected Control getInitialFocusControl() {
-
- if (textSystemType != null) {
- return textSystemType;
- }
- else {
- return null;
- }
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.AbstractSystemWizardPage#performFinish()
- */
- public boolean performFinish() {
- return true;
- }
-
- /**
- * @see org.eclipse.jface.wizard.WizardPage#getNextPage()
- */
- public IWizardPage getNextPage() {
-
- IWizard wizard = getWizard();
-
- // if the wizard is a new connection wizard, which should always be the case,
- // get the new connection wizard delegate for the selected system type and
- // ask for the main page
- if (wizard instanceof IRSENewConnectionWizard) {
- String systemTypeStr = textSystemType.getSelection()[0];
- IRSENewConnectionWizard newConnWizard = (IRSENewConnectionWizard)wizard;
- newConnWizard.setSelectedSystemType(RSECorePlugin.getDefault().getRegistry().getSystemType(systemTypeStr));
- return newConnWizard.getDelegate().getMainPage();
- }
- else {
- return super.getNextPage();
- }
- }
-
- /**
- * Handle single-click on list
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- IWizard wizard = getWizard();
- if (wizard instanceof IRSENewConnectionWizard) {
- String systemTypeStr = textSystemType.getSelection()[0];
- IRSENewConnectionWizard newConnWizard = (IRSENewConnectionWizard)wizard;
-
- IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemTypeStr);
- newConnWizard.setSelectedSystemType(systemType);
- descriptionSystemType.setText(systemType.getDescription());
- }
- }
-
- /**
- * Handle dbl-click on list: select, then go to next page
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- if (canFlipToNextPage()) {
- getWizard().getContainer().showPage(getNextPage());
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java
deleted file mode 100644
index 14e0d8c47..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.widgets.services.ConnectorServiceElement;
-import org.eclipse.rse.ui.widgets.services.FactoryServiceElement;
-import org.eclipse.rse.ui.widgets.services.RootServiceElement;
-import org.eclipse.rse.ui.widgets.services.ServerLauncherPropertiesServiceElement;
-import org.eclipse.rse.ui.widgets.services.ServiceElement;
-import org.eclipse.rse.ui.widgets.services.ServicesForm;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizardPage implements ISubSystemPropertiesWizardPage
-{
- private ServicesForm _form;
- private IServiceSubSystemConfiguration _selectedFactory;
- private ServiceElement _root;
- private ServiceElement[] _serviceElements;
-
- public SubSystemServiceWizardPage(IWizard wizard, ISubSystemConfiguration parentFactory, String pageName, String pageTitle, String pageDescription)
- {
- super(wizard, parentFactory, pageName, pageTitle, pageDescription);
- }
-
- public SubSystemServiceWizardPage(IWizard wizard, ISubSystemConfiguration parentFactory, String pageDescription)
- {
- super(wizard, parentFactory, pageDescription);
- }
-
- public SubSystemServiceWizardPage(IWizard wizard, ISubSystemConfiguration parentFactory)
- {
- super(wizard, parentFactory);
- }
-
- public Control createContents(Composite parent)
- {
- _form = new ServicesForm(getMessageLine());
- Control control = _form.createContents(parent);
-
- ServiceElement[] elements = getServiceElements();
- _root = new RootServiceElement(elements);
- _form.init(_root);
-
- return control;
- }
-
- protected ServiceElement[] getServiceElements()
- {
- if (_serviceElements == null)
- {
-
-
- IServiceSubSystemConfiguration currentFactory = (IServiceSubSystemConfiguration)getSubSystemConfiguration();
-
- String systemTypeStr = getMainPage().getSystemType();
- //IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemTypeStr);
-
- IServiceSubSystemConfiguration[] factories = getServiceSubSystemFactories(systemTypeStr, currentFactory.getServiceType());
-
- IHost dummyHost = null;
- if (getWizard() instanceof RSENewConnectionWizard)
- {
- dummyHost = ((RSENewConnectionWizard)getWizard()).getDelegate().getDummyHost();
- }
-
- // create elements for each
- _serviceElements = new ServiceElement[factories.length];
- for (int i = 0; i < factories.length; i++)
- {
- IServiceSubSystemConfiguration factory = factories[i];
- _serviceElements[i] = new FactoryServiceElement(dummyHost, factory);
-
-
- if (factory == currentFactory)
- {
- _serviceElements[i].setSelected(true);
- }
- }
- }
- return _serviceElements;
- }
-
- protected IServiceSubSystemConfiguration[] getServiceSubSystemFactories(String systemType, Class serviceType)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType);
-
- for (int i = 0; i < factories.length; i++)
- {
- ISubSystemConfiguration factory = factories[i];
- if (factory instanceof IServiceSubSystemConfiguration)
- {
- IServiceSubSystemConfiguration sfactory = (IServiceSubSystemConfiguration)factory;
- if (sfactory.getServiceType() == serviceType)
- {
-
- results.add(sfactory);
- }
- }
- }
-
- return (IServiceSubSystemConfiguration[])results.toArray(new IServiceSubSystemConfiguration[results.size()]);
- }
-
- public boolean isPageComplete()
- {
- return true;
- }
-
- public boolean performFinish()
- {
- if (_root != null)
- {
- _root.commit();
-
- _selectedFactory = ((FactoryServiceElement)_form.getSelectedService()).getFactory();
- }
- return true;
- }
-
- protected ServerLauncherPropertiesServiceElement[] getPropertiesServiceElement()
- {
- List results = new ArrayList();
- for (int i = 0; i < _serviceElements.length; i++)
- {
- {
- ServiceElement el = _serviceElements[i];
- ServiceElement[] children = el.getChildren();
- if (children != null)
- {
- for (int c = 0; c < children.length; c++)
- {
- ServiceElement child = children[c];
- if (child instanceof ConnectorServiceElement)
- {
- ServiceElement[] cch = child.getChildren();
- if (cch != null && cch.length > 0)
- {
- ServerLauncherPropertiesServiceElement result = (ServerLauncherPropertiesServiceElement)cch[0];
- results.add(result);
- }
- }
- }
- }
- }
- }
- return (ServerLauncherPropertiesServiceElement[])results.toArray(new ServerLauncherPropertiesServiceElement[results.size()]);
- }
-
- public boolean applyValues(ISubSystem ss)
- {
- if (_selectedFactory != null)
- {
- IServiceSubSystemConfiguration currentFactory = (IServiceSubSystemConfiguration)ss.getSubSystemConfiguration();
- if (currentFactory != null)
- {
- if (_selectedFactory != currentFactory)
- {
- ((IServiceSubSystem)ss).switchServiceFactory(_selectedFactory);
- }
- //IHost realHost = ss.getHost();
- if (_root != null)
- {
- {
- ServerLauncherPropertiesServiceElement[] elements = getPropertiesServiceElement();
- if (elements.length > 0)
- {
- IServerLauncherProperties properties = elements[0].getServerLauncherProperties();
-
- IConnectorService rserv = ss.getConnectorService();
- properties.saveToProperties();
- rserv.setRemoteServerLauncherProperties(properties);
- /*
- PropertyElement[] properties = elements[i].getProperties();
- for (int p = 0; p < properties.length; p++)
- {
- PropertyElement pel = properties[p];
-
- }
- */
- //rserv.addPropertySets(sets);
-
- }
- }
- }
-
- }
- }
- return true;
- }
-
- protected IConnectorService getCustomConnectorService(IServiceSubSystemConfiguration config)
- {
- ServiceElement[] children = _root.getChildren();
- for (int i = 0; i < children.length; i++)
- {
- ServiceElement child = children[i];
- if (child instanceof FactoryServiceElement)
- {
- FactoryServiceElement fchild = (FactoryServiceElement)child;
- if (fchild.getFactory() == config)
- {
- return fchild.getConnectorService();
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
- */
- public void handleVerifyComplete()
- {
- boolean complete = isPageComplete();
- clearErrorMessage();
- setPageComplete(complete);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizard.java
deleted file mode 100644
index c2afc2b98..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizard.java
+++ /dev/null
@@ -1,522 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.wizards;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemPerspectiveHelpers;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.model.DummyHost;
-import org.eclipse.rse.model.SystemStartHere;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.ui.INewWizard;
-
-/**
- * Wizard for creating a new remote systems connection.
- */
-public class SystemNewConnectionWizard
- extends AbstractSystemWizard implements INewWizard
-
-{
-
- private ISystemNewConnectionWizardMainPage mainPage;
- private SystemNewConnectionWizardRenameProfilePage rnmProfilePage;
- private ISystemNewConnectionWizardPage[] subsystemFactorySuppliedWizardPages;
- private Hashtable ssfWizardPagesPerSystemType = new Hashtable();
- private String defaultUserId;
- private String defaultConnectionName;
- private String defaultHostName;
- private String[] activeProfileNames = null;
- private int privateProfileIndex = -1;
- private ISystemProfile privateProfile = null;
- private IHost currentlySelectedConnection = null;
- private String[] restrictSystemTypesTo;
- private static String lastProfile = null;
- private boolean showProfilePageInitially = true;
- private IHost _dummyHost;
-
- /**
- * Constructor
- */
- public SystemNewConnectionWizard()
- {
- super(SystemResources.RESID_NEWCONN_TITLE,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTIONWIZARD_ID));
- activeProfileNames = SystemStartHere.getSystemProfileManager().getActiveSystemProfileNames();
- super.setForcePreviousAndNextButtons(true);
- super.setNeedsProgressMonitor(true);
- }
-
- /**
- * Call this to restrict the system type that the user is allowed to choose
- */
- public void restrictSystemType(String systemType)
- {
- restrictSystemTypesTo = new String[1];
- restrictSystemTypesTo[0] = systemType;
- if (mainPage != null)
- mainPage.restrictSystemTypes(restrictSystemTypesTo);
- }
- /**
- * Call this to restrict the system types that the user is allowed to choose
- */
- public void restrictSystemTypes(String[] systemTypes)
- {
- this.restrictSystemTypesTo = systemTypes;
- if (mainPage != null)
- mainPage.restrictSystemTypes(systemTypes);
- }
-
- public IHost getDummyHost()
- {
- if (_dummyHost == null)
- {
- _dummyHost = new DummyHost(mainPage.getHostName(), mainPage.getSystemType());
- }
- return _dummyHost;
- }
-
- /**
- * Creates the wizard pages.
- * This method is an override from the parent Wizard class.
- */
- public void addPages()
- {
- try {
- mainPage = createMainPage(restrictSystemTypesTo);
- mainPage.setConnectionNameValidators(SystemConnectionForm.getConnectionNameValidators());
- mainPage.setCurrentlySelectedConnection(currentlySelectedConnection);
- if (defaultUserId != null)
- mainPage.setUserId(defaultUserId);
- if (defaultConnectionName != null)
- mainPage.setConnectionName(defaultConnectionName);
- if (defaultHostName != null)
- mainPage.setHostName(defaultHostName);
-
- if (restrictSystemTypesTo != null)
- mainPage.restrictSystemTypes(restrictSystemTypesTo);
-
- SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile();
-
- showProfilePageInitially = RSEUIPlugin.getDefault().getShowProfilePageInitially();
- /* DKM - I don't think we should force profiles into the faces of users
- * we no longer default to "private" so hopefully this would never be
- * desirable
- *
- // if there is a default private profile, we might want to show the rename profile page
- if (defaultProfile != null)
- {
- // make private profile equal to default profile
- privateProfile = defaultProfile;
-
- // get the private profile index in the list of active profiles
- for (int idx=0; (privateProfileIndex<0) && (idx<activeProfileNames.length); idx++)
- if (activeProfileNames[idx].equals(defaultProfile.getName()))
- privateProfileIndex = idx;
-
- // if profile page is to be shown initially, then add the page
- if (showProfilePageInitially) {
- rnmProfilePage = new SystemNewConnectionWizardRenameProfilePage(this) ;
- addPage(rnmProfilePage);
- }
- // otherwise, do not add profile page
- // and set the new private profile name to be the local machine name
- else {
- rnmProfilePage = null;
-
- String initProfileName = RSEUIPlugin.getLocalMachineName();
- int dotIndex = initProfileName.indexOf('.');
-
- if (dotIndex != -1) {
- initProfileName = initProfileName.substring(0, dotIndex);
- }
-
- setNewPrivateProfileName(initProfileName);
- }
- }
- else
- */
- {
- mainPage.setProfileNames(activeProfileNames);
- // if there is no connection currently selected, default the profile to
- // place the new connection into to be the first of:
- // 1. the profile the last connection was created in, in this session
- // 2. the team profile.
- if (currentlySelectedConnection == null)
- {
- if ((lastProfile == null) && (activeProfileNames!=null))
- {
- String defaultTeamName = ISystemPreferencesConstants.DEFAULT_TEAMPROFILE;
- for (int idx=0; (lastProfile==null)&&(idx<activeProfileNames.length); idx++)
- {
- if (!activeProfileNames[idx].equals(defaultTeamName))
- lastProfile = activeProfileNames[idx];
- }
- if ((lastProfile == null) && (activeProfileNames.length>0))
- lastProfile = activeProfileNames[0];
- }
- if (lastProfile != null)
- mainPage.setProfileNamePreSelection(lastProfile);
- }
- }
-
- addPage((WizardPage)mainPage);
-
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("New connection: Error in createPages: ",exc); //$NON-NLS-1$
- }
- }
-
- /**
- * Creates the wizard's main page.
- * This method is an override from the parent class.
- */
- protected ISystemNewConnectionWizardMainPage createMainPage(String[] restrictSystemTypesTo)
- {
- String pageTitle = null;
- if ((restrictSystemTypesTo==null) || (restrictSystemTypesTo.length != 1))
- pageTitle = SystemResources.RESID_NEWCONN_PAGE1_TITLE;
- else
- {
- String onlySystemType = restrictSystemTypesTo[0];
- if (onlySystemType.equals(IRSESystemType.SYSTEMTYPE_LOCAL))
- pageTitle =SystemResources.RESID_NEWCONN_PAGE1_LOCAL_TITLE;
- else
- {
- pageTitle =SystemResources.RESID_NEWCONN_PAGE1_REMOTE_TITLE;
- pageTitle = SystemMessage.sub(pageTitle, "&1", onlySystemType); //$NON-NLS-1$
- }
- }
- mainPage = new SystemNewConnectionWizardDefaultMainPage(this,
- pageTitle,
- SystemResources.RESID_NEWCONN_PAGE1_DESCRIPTION);
- setOutputObject(null);
- return mainPage;
- }
- /**
- * Set the currently selected connection. Used to better default entry fields.
- */
- public void setCurrentlySelectedConnection(IHost conn)
- {
- this.currentlySelectedConnection = conn;
- }
-
- /**
- * For "new" mode, allows setting of the initial user Id. Sometimes subsystems
- * like to have their own default userId preference page option. If so, query
- * it and set it here by calling this.
- */
- public void setUserId(String userId)
- {
- defaultUserId = userId;
- if (mainPage != null)
- mainPage.setUserId(userId);
- }
-
- /**
- * Preset the connection name
- */
- public void setConnectionName(String name)
- {
- defaultConnectionName = name;
- if (mainPage != null)
- mainPage.setConnectionName(name);
- }
- /**
- * Preset the host name
- */
- public void setHostName(String name)
- {
- defaultHostName = name;
- if (mainPage != null)
- mainPage.setHostName(name);
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- boolean ok = mainPage.performFinish();
- if (!ok)
- setPageError((IWizardPage)mainPage);
- else if (ok && hasAdditionalPages())
- {
- for (int idx=0; ok && (idx<subsystemFactorySuppliedWizardPages.length); idx++)
- {
- ok = subsystemFactorySuppliedWizardPages[idx].performFinish();
- if (!ok)
- setPageError((IWizardPage)subsystemFactorySuppliedWizardPages[idx]);
- }
- }
- if (ok)
- {
- boolean cursorSet = true;
- setBusyCursor(true);
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
-
- // if private profile is not null, then we have to rename the private profile
- // with the new profile name
- if (privateProfile != null)
- {
- try
- {
- String newName = activeProfileNames[privateProfileIndex];
- sr.renameSystemProfile(privateProfile, newName);
- }
- catch (SystemMessageException exc)
- {
- SystemMessageDialog.displayMessage(getShell(), exc);
-
- ok = false;
- }
- catch (Exception exc)
- {
- setBusyCursor(false);
- cursorSet = false;
- String msg = "Exception renaming profile "; //$NON-NLS-1$
- SystemBasePlugin.logError(msg, exc);
- SystemMessageDialog.displayExceptionMessage(getShell(),exc);
- ok = false;
- }
- }
-
- if (ok)
- {
- try
- {
- String sysType = mainPage.getSystemType();
- IHost conn =
- sr.createHost(mainPage.getProfileName(), sysType,
- mainPage.getConnectionName(), mainPage.getHostName(),
- mainPage.getConnectionDescription(), mainPage.getDefaultUserId(),
- mainPage.getDefaultUserIdLocation(), subsystemFactorySuppliedWizardPages);
-
- setBusyCursor(false);
- cursorSet = false;
-
- // a tweak that is the result of UCD feedback. Phil
- if ((conn!=null) && SystemPerspectiveHelpers.isRSEPerspectiveActive())
- {
- if (sysType.equals(IRSESystemType.SYSTEMTYPE_ISERIES))
- {
- ISubSystem[] objSubSystems = sr.getSubSystemsBySubSystemConfigurationCategory("nativefiles", conn); //$NON-NLS-1$
- if ((objSubSystems != null)
- && (objSubSystems.length>0))// might be in product that doesn't have iSeries plugins
- sr.expandSubSystem(objSubSystems[0]);
- else
- sr.expandHost(conn);
- }
- else
- sr.expandHost(conn);
- }
-
- lastProfile = mainPage.getProfileName();
- setOutputObject(conn);
- } catch (Exception exc)
- {
- if (cursorSet)
- setBusyCursor(false);
- cursorSet = false;
- String msg = "Exception creating connection "; //$NON-NLS-1$
- SystemBasePlugin.logError(msg, exc);
- SystemMessageDialog.displayExceptionMessage(getShell(),exc);
- ok = false;
- }
- }
- //getShell().setCursor(null);
- //busyCursor.dispose();
- if (cursorSet)
- setBusyCursor(false);
- return ok;
- }
- return ok;
- }
-
- // callbacks from rename page
-
- /**
- * Set the new profile name specified on the rename profile page...
- */
- protected void setNewPrivateProfileName(String newName)
- {
- activeProfileNames[privateProfileIndex] = newName;
- if (mainPage != null)
- {
- mainPage.setProfileNames(activeProfileNames);
- mainPage.setProfileNamePreSelection(newName);
- }
- }
-
- /**
- * Return the main page of this wizard
- */
- public ISystemNewConnectionWizardMainPage getMainPage()
- {
- return mainPage;
- }
- /**
- * Return the form of the main page of this wizard
- */
- public SystemConnectionForm getMainPageForm()
- {
- return ((SystemNewConnectionWizardDefaultMainPage)mainPage).getForm();
- }
-
- // ----------------------------------------
- // CALLBACKS FROM SYSTEM CONNECTION PAGE...
- // ----------------------------------------
- /**
- * Event: the user has selected a system type.
- */
- public void systemTypeSelected(String systemType, boolean duringInitialization)
- {
- subsystemFactorySuppliedWizardPages = getAdditionalWizardPages(systemType);
- if (!duringInitialization)
- getContainer().updateButtons();
- }
-
- /*
- * Private method to get all the wizard pages from all the subsystem factories, given a
- * system type.
- */
- protected ISystemNewConnectionWizardPage[] getAdditionalWizardPages(String systemType)
- {
- // this query is expensive, so only do it once...
- subsystemFactorySuppliedWizardPages = (ISystemNewConnectionWizardPage[])ssfWizardPagesPerSystemType.get(systemType);
- if (subsystemFactorySuppliedWizardPages == null)
- {
- // query all affected subsystems for their list of additional wizard pages...
- Vector additionalPages = new Vector();
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType, true);
- for (int idx=0; idx<factories.length; idx++)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)factories[idx].getAdapter(ISubSystemConfigurationAdapter.class);
-
- ISystemNewConnectionWizardPage[] pages = adapter.getNewConnectionWizardPages(factories[idx], this);
- if (pages != null)
- {
- for (int widx=0; widx<pages.length; widx++)
- additionalPages.addElement(pages[widx]);
- }
- }
- subsystemFactorySuppliedWizardPages = new ISystemNewConnectionWizardPage[additionalPages.size()];
- for (int idx=0; idx<subsystemFactorySuppliedWizardPages.length; idx++)
- subsystemFactorySuppliedWizardPages[idx] = (ISystemNewConnectionWizardPage)additionalPages.elementAt(idx);
- ssfWizardPagesPerSystemType.put(systemType, subsystemFactorySuppliedWizardPages);
- }
- return subsystemFactorySuppliedWizardPages;
- }
-
- /**
- * Return true if there are additional pages. This decides whether to enable the Next button
- * on the main page
- */
- protected boolean hasAdditionalPages()
- {
- return (subsystemFactorySuppliedWizardPages != null) && (subsystemFactorySuppliedWizardPages.length>0);
- }
-
- /**
- * Return the first additional page to show when user presses Next on the main page
- */
- protected IWizardPage getFirstAdditionalPage()
- {
- if ((subsystemFactorySuppliedWizardPages != null) && (subsystemFactorySuppliedWizardPages.length>0))
- {
- IWizardPage previousPage = (IWizardPage)mainPage;
- for (int idx=0; idx<subsystemFactorySuppliedWizardPages.length; idx++)
- {
- ((IWizardPage)subsystemFactorySuppliedWizardPages[idx]).setPreviousPage(previousPage);
- previousPage = (IWizardPage)subsystemFactorySuppliedWizardPages[idx];
- }
- return (IWizardPage)subsystemFactorySuppliedWizardPages[0];
- }
- else
- return null;
- }
-
- // --------------------
- // PARENT INTERCEPTS...
- // --------------------
-
- /**
- * Intercept of Wizard method so we can get the Next button behaviour to work right for the
- * dynamically managed additional wizard pages.
- */
- public IWizardPage getNextPage(IWizardPage page)
- {
- if (!hasAdditionalPages() || (page==rnmProfilePage))
- return super.getNextPage(page);
- else
- {
- int index = getAdditionalPageIndex(page);
- if ((index == (subsystemFactorySuppliedWizardPages.length - 1)))
- // last page or page not found
- return null;
- return (IWizardPage)subsystemFactorySuppliedWizardPages[index + 1];
- }
- }
-
- private int getAdditionalPageIndex(IWizardPage page)
- {
- for (int idx=0; idx<subsystemFactorySuppliedWizardPages.length; idx++)
- {
- if (page == subsystemFactorySuppliedWizardPages[idx])
- return idx;
- }
- return -1;
- }
-
- /**
- * Intercept of Wizard method so we can take into account our additional pages
- */
- public boolean canFinish()
- {
- boolean ok = super.canFinish();
- if (ok && hasAdditionalPages())
- {
- for (int idx=0; ok && (idx<subsystemFactorySuppliedWizardPages.length); idx++)
- ok = subsystemFactorySuppliedWizardPages[idx].isPageComplete();
- }
- return ok;
- }
-} // end class \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardDefaultMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardDefaultMainPage.java
deleted file mode 100644
index 109f32779..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardDefaultMainPage.java
+++ /dev/null
@@ -1,355 +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.wizards;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.ISystemConnectionFormCaller;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-
-/**
- * Default main page of the "New Connection" wizard.
- * This page asks for the primary information, including:
- * <ul>
- * <li>Connection Name
- * <li>Hostname/IP-address
- * <li>UserId
- * <li>Description
- * </ul>
- */
-
-public class SystemNewConnectionWizardDefaultMainPage
- //extends WizardPage
- extends AbstractSystemWizardPage
- implements ISystemNewConnectionWizardMainPage,
- ISystemMessageLine, ISystemConnectionFormCaller
-{
- protected String[] restrictSystemTypesTo;
- protected SystemConnectionForm form;
- protected String parentHelpId;
-
- /**
- * Constructor. Use this when you want to supply your own title and
- * description strings.
- */
- public SystemNewConnectionWizardDefaultMainPage(Wizard wizard,
- String title,
- String description)
- {
- super(wizard, "NewConnection", title, description); //$NON-NLS-1$
- parentHelpId = RSEUIPlugin.HELPPREFIX + "wncc0000"; //$NON-NLS-1$
- setHelp(parentHelpId);
- form = getForm();
- }
-
- /**
- * Call this to restrict the system type that the user is allowed to choose
- */
- public void restrictSystemType(String systemType)
- {
- restrictSystemTypesTo = new String[1];
- restrictSystemTypesTo[0] = systemType;
- form.restrictSystemTypes(restrictSystemTypesTo);
- }
- /**
- * Call this to restrict the system types that the user is allowed to choose
- */
- public void restrictSystemTypes(String[] systemTypes)
- {
- restrictSystemTypesTo = systemTypes;
- form.restrictSystemTypes(restrictSystemTypesTo);
- }
-
- /**
- * Return the main wizard typed
- */
- private SystemNewConnectionWizard getOurWizard()
- {
- IWizard wizard = getWizard();
- if (wizard instanceof SystemNewConnectionWizard)
- return (SystemNewConnectionWizard)wizard;
- else
- return null;
- }
-
-
- /**
- * Overrride this if you want to supply your own form. This may be called
- * multiple times so please only instantatiate if the form instance variable
- * is null, and then return the form instance variable.
- * @see org.eclipse.rse.ui.SystemConnectionForm
- */
- protected SystemConnectionForm getForm()
- {
- if (form == null)
- form = new SystemConnectionForm(this,this);
- return form;
- }
- /**
- * Call this to specify a validator for the connection name. It will be called per keystroke.
- */
- public void setConnectionNameValidators(ISystemValidator[] v)
- {
- form.setConnectionNameValidators(v);
- }
- /**
- * Call this to specify a validator for the hostname. It will be called per keystroke.
- */
- public void setHostNameValidator(ISystemValidator v)
- {
- form.setHostNameValidator(v);
- }
- /**
- * Call this to specify a validator for the userId. It will be called per keystroke.
- */
- public void setUserIdValidator(ISystemValidator v)
- {
- form.setUserIdValidator(v);
- }
-
- /**
- * This method allows setting of the initial user Id. Sometimes subsystems
- * like to have their own default userId preference page option. If so, query
- * it and set it here by calling this.
- */
- public void setUserId(String userId)
- {
- form.setUserId(userId);
- }
-
- /**
- * Set the profile names to show in the combo
- */
- public void setProfileNames(String[] names)
- {
- form.setProfileNames(names);
- }
- /**
- * Set the profile name to preselect
- */
- public void setProfileNamePreSelection(String name)
- {
- form.setProfileNamePreSelection(name);
- }
-
- /**
- * Set the currently selected connection so as to better initialize input fields
- */
- public void setCurrentlySelectedConnection(IHost connection)
- {
- form.setCurrentlySelectedConnection(connection);
- }
-
- /**
- * Preset the connection name
- */
- public void setConnectionName(String name)
- {
- form.setConnectionName(name);
- }
- /**
- * Preset the host name
- */
- public void setHostName(String name)
- {
- form.setHostName(name);
- }
-
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- */
- public Control createContents(Composite parent)
- {
- return form.createContents(parent, SystemConnectionForm.CREATE_MODE, parentHelpId);
- }
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return form.getInitialFocusControl();
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- return form.verify(true);
- }
-
- // --------------------------------- //
- // METHODS FOR EXTRACTING USER DATA ...
- // --------------------------------- //
- /**
- * Return user-entered System Type.
- * Call this after finish ends successfully.
- */
- public String getSystemType()
- {
- return form.getSystemType();
- }
- /**
- * Return user-entered Connection Name.
- * Call this after finish ends successfully.
- */
- public String getConnectionName()
- {
- return form.getConnectionName();
- }
- /**
- * Return user-entered Host Name.
- * Call this after finish ends successfully.
- */
- public String getHostName()
- {
- return form.getHostName();
- }
- /**
- * Return user-entered Default User Id.
- * Call this after finish ends successfully.
- */
- public String getDefaultUserId()
- {
- return form.getDefaultUserId();
- }
- /**
- * Return location where default user id is to be set.
- * @see org.eclipse.rse.core.IRSEUserIdConstants
- */
- public int getDefaultUserIdLocation()
- {
- return form.getUserIdLocation();
- }
- /**
- * Return user-entered Description.
- * Call this after finish ends successfully.
- */
- public String getConnectionDescription()
- {
- return form.getConnectionDescription();
- }
- /**
- * Return name of profile to contain new connection.
- * Call this after finish ends successfully.
- */
- public String getProfileName()
- {
- return form.getProfileName();
- }
-
- // ISystemMessageLine methods
-// public void clearMessage()
-// {
-// setMessage(null);
-// }
- //public void clearErrorMessage()
- //{
- //setErrorMessage(null);
- //}
-
- public Object getLayoutData()
- {
- return null;
- }
-
- public void setLayoutData(Object gridData)
- {
- }
-
-
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- //System.out.println("Inside isPageComplete. " + form.isPageComplete());
- if (form!=null)
- return form.isPageComplete() && form.isConnectionUnique();
- else
- return false;
- }
-
- /**
- * Intercept of WizardPage so we know when Next is pressed
- */
- public IWizardPage getNextPage()
- {
- //if (wizard == null)
- //return null;
- //return wizard.getNextPage(this);
-
- SystemNewConnectionWizard newConnWizard = getOurWizard();
- if (newConnWizard != null)
- {
- return newConnWizard.getFirstAdditionalPage();
- }
- else
- return super.getNextPage();
- }
- /**
- * Intercept of WizardPge so we know when the wizard framework is deciding whether
- * to enable next or not.
- */
- public boolean canFlipToNextPage()
- {
- //return isPageComplete() && getNextPage() != null;
-
- SystemNewConnectionWizard newConnWizard = getOurWizard();
- if (newConnWizard != null)
- {
- return (isPageComplete() && newConnWizard.hasAdditionalPages() && form.isConnectionUnique());
- }
- else
- return super.canFlipToNextPage();
- }
-
- // ----------------------------------------
- // CALLBACKS FROM SYSTEM CONNECTION FORM...
- // ----------------------------------------
- /**
- * Event: the user has selected a system type.
- */
- public void systemTypeSelected(String systemType, boolean duringInitialization)
- {
- SystemNewConnectionWizard newConnWizard = getOurWizard();
- if (newConnWizard != null)
- {
- newConnWizard.systemTypeSelected(systemType, duringInitialization);
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardRenameProfilePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardRenameProfilePage.java
deleted file mode 100644
index 2e6f65ba8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardRenameProfilePage.java
+++ /dev/null
@@ -1,158 +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.wizards;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemProfileForm;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-/**
- * First page of the New Connection wizard when creating
- * the very first connection.
- * <p>
- * This page asks for a unique personal name for the private profile.
- */
-
-public class SystemNewConnectionWizardRenameProfilePage
- extends AbstractSystemWizardPage
- implements
- ISystemMessageLine
-{
-
- protected SystemProfileForm form;
-
- /**
- * Constructor.
- */
- public SystemNewConnectionWizardRenameProfilePage(Wizard wizard)
- {
- super(wizard, "RenamePrivateProfile", //$NON-NLS-1$
- SystemResources.RESID_RENAMEDEFAULTPROFILE_PAGE1_TITLE,
- SystemResources.RESID_RENAMEDEFAULTPROFILE_PAGE1_DESCRIPTION);
- form = getForm();
- setHelp(RSEUIPlugin.HELPPREFIX + "wncp0000"); //$NON-NLS-1$
- }
-
- /**
- * Return our hosting wizard
- */
- protected SystemNewConnectionWizard getOurWizard()
- {
- return (SystemNewConnectionWizard)getWizard();
- }
-
- /**
- * Overrride this if you want to supply your own form. This may be called
- * multiple times so please only instantatiate if the form instance variable
- * is null, and then return the form instance variable.
- * @see org.eclipse.rse.ui.SystemProfileForm
- */
- protected SystemProfileForm getForm()
- {
- if (form == null)
- form = new SystemProfileForm(this,this,null, true);
- //SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile());
- return form;
- }
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- */
- public Control createContents(Composite parent)
- {
- Control c = form.createContents(parent);
- form.getInitialFocusControl().setFocus();
- String initProfileName = SystemProfileManager.getDefaultPrivateSystemProfileName();
- form.setProfileName(initProfileName);
- return c;
- }
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return form.getInitialFocusControl();
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- return form.verify();
- }
-
- // --------------------------------- //
- // METHODS FOR EXTRACTING USER DATA ...
- // --------------------------------- //
- /**
- * Return name of profile to contain new connection.
- * Call this after finish ends successfully.
- */
- public String getProfileName()
- {
- return form.getProfileName();
- }
-
- // ISystemMessageLine methods
-// public void clearMessage()
-// {
-// setMessage(null);
-// }
- //public void clearErrorMessage()
- //{
- //setErrorMessage(null);
- //}
-
- public Object getLayoutData()
- {
- return null;
- }
-
- public void setLayoutData(Object gridData)
- {
- }
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- boolean ok = false;
- if (form!=null)
- {
- ok = form.isPageComplete();
- if (ok
- && isCurrentPage()) // defect 41831
- getOurWizard().setNewPrivateProfileName(form.getProfileName());
- }
- return ok;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizard.java
deleted file mode 100644
index 45d246a55..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizard.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.wizards;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-
-/**
- * Wizard for creating a new remote system profile.
- */
-public class SystemNewProfileWizard
- extends AbstractSystemWizard
-
-{
-
- private SystemNewProfileWizardMainPage mainPage;
-
- /**
- * Constructor
- */
- public SystemNewProfileWizard()
- {
- super(SystemResources.RESID_NEWPROFILE_TITLE,
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWPROFILEWIZARD_ID));
- }
-
- /**
- * Creates the wizard pages.
- * This method is an override from the parent Wizard class.
- */
- public void addPages()
- {
- try {
- mainPage = createMainPage();
- addPage(mainPage);
- //super.addPages();
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("New connection: Error in createPages: ",exc); //$NON-NLS-1$
- }
- }
-
- /**
- * Creates the wizard's main page.
- * This method is an override from the parent class.
- */
- protected SystemNewProfileWizardMainPage createMainPage()
- {
- mainPage = new SystemNewProfileWizardMainPage(this);
- return mainPage;
- }
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- boolean ok = true;
- if (mainPage.performFinish())
- {
- //SystemMessage.showInformationMessage(getShell(),"Finish pressed.");
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- String name = mainPage.getProfileName();
- boolean makeActive = mainPage.getMakeActive();
- try
- {
- sr.createSystemProfile(name,makeActive);
- } catch (Exception exc)
- {
- String msg = "Exception creating profile "; //$NON-NLS-1$
- SystemBasePlugin.logError(msg,exc);
- //System.out.println(msg + exc.getMessage() + ": " + exc.getClass().getName());
- SystemMessageDialog.displayExceptionMessage(getShell(),exc);
- }
- return ok;
- }
- else
- ok = false;
- return ok;
- }
-
-} // end class \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizardMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizardMainPage.java
deleted file mode 100644
index e3c4b349e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizardMainPage.java
+++ /dev/null
@@ -1,205 +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.wizards;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorProfileName;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-
-
-/**
- * Default main page of the "New Profile" wizard.
- * This page asks for the following information:
- * <ul>
- * <li>Profile name
- * </ul>
- */
-
-public class SystemNewProfileWizardMainPage
- extends AbstractSystemWizardPage
- implements
- ISystemMessageLine
-{
-
- private String profileName;
- private Text textName;
- private Button makeActiveCB;
- private boolean makeActive;
- private SystemMessage errorMessage;
- protected ISystemValidator nameValidator;
- private static final String HELPID_PREFIX = RSEUIPlugin.HELPPREFIX + "wnpr"; //$NON-NLS-1$
-
- /**
- * Constructor.
- */
- public SystemNewProfileWizardMainPage(Wizard wizard)
- {
- super(wizard, "NewProfile", //$NON-NLS-1$
- SystemResources.RESID_NEWPROFILE_PAGE1_TITLE,
- SystemResources.RESID_NEWPROFILE_PAGE1_DESCRIPTION);
- nameValidator = new ValidatorProfileName(RSEUIPlugin.getTheSystemRegistry().getAllSystemProfileNamesVector());
- setHelp(HELPID_PREFIX+"0000"); //$NON-NLS-1$
- }
-
- /**
- * CreateContents is the one method that must be overridden from the parent class.
- * In this method, we populate an SWT container with widgets and return the container
- * to the caller (JFace). This is used as the contents of this page.
- */
- public Control createContents(Composite parent)
- {
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- // Name
- textName = SystemWidgetHelpers.createLabeledTextField(
- composite_prompts, null, SystemResources.RESID_NEWPROFILE_NAME_LABEL, SystemResources.RESID_NEWPROFILE_NAME_TOOLTIP);
- textName.setTextLimit(ValidatorProfileName.MAX_PROFILENAME_LENGTH); // defect 41816
- //SystemWidgetHelpers.setHelp(textName, HELPID_PREFIX+"0001", HELPID_PREFIX+"0000");
- SystemWidgetHelpers.setHelp(textName, HELPID_PREFIX+"0001"); //$NON-NLS-1$
-
- // Make active
- makeActiveCB = SystemWidgetHelpers.createCheckBox(
- composite_prompts, nbrColumns, null, SystemResources.RESID_NEWPROFILE_MAKEACTIVE_LABEL, SystemResources.RESID_NEWPROFILE_MAKEACTIVE_TOOLTIP);
- makeActiveCB.setSelection(true);
- //SystemWidgetHelpers.setHelp(makeActiveCB, HELPID_PREFIX+"0002", HELPID_PREFIX+"0000");
- SystemWidgetHelpers.setHelp(makeActiveCB, HELPID_PREFIX+"0002"); //$NON-NLS-1$
-
- // Verbage
- addGrowableFillerLine(composite_prompts, nbrColumns);
- addSeparatorLine(composite_prompts, nbrColumns);
- SystemWidgetHelpers.createVerbiage(composite_prompts, SystemResources.RESID_NEWPROFILE_VERBAGE, nbrColumns, false, 200);
-
- textName.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateNameInput();
- }
- }
- );
-
- // SET CONTEXT HELP IDS...
- //SystemWidgetHelpers.setHelp(textName, HELPID_PREFIX + "0001", HELPID_PREFIX + "0000");
- //SystemWidgetHelpers.setHelp(makeActiveCB, HELPID_PREFIX + "0002", HELPID_PREFIX + "0000");
-
- return composite_prompts;
- }
- /**
- * Return the Control to be given initial focus.
- * Override from parent. Return control to be given initial focus.
- */
- protected Control getInitialFocusControl()
- {
- return textName;
- }
-
- /**
- * This hook method is called whenever the text changes in the input field.
- * The default implementation delegates the request to an <code>ISystemValidator</code> object.
- * If the <code>ISystemValidator</code> reports an error the error message is displayed
- * in the Dialog's message line.
- */
- protected SystemMessage validateNameInput()
- {
- errorMessage= nameValidator.validate(textName.getText());
- if (errorMessage != null)
- setErrorMessage(errorMessage);
- else
- clearErrorMessage();
- setPageComplete(errorMessage==null);
- return errorMessage;
- }
-
- /**
- * Completes processing of the wizard. If this
- * method returns true, the wizard will close;
- * otherwise, it will stay active.
- * This method is an override from the parent Wizard class.
- *
- * @return whether the wizard finished successfully
- */
- public boolean performFinish()
- {
- boolean ok = (validateNameInput()==null);
- if (ok)
- {
- profileName = textName.getText().trim();
- makeActive = makeActiveCB.getSelection();
- }
- return ok;
- }
-
- // --------------------------------- //
- // METHODS FOR EXTRACTING USER DATA ...
- // --------------------------------- //
- /**
- * Return user-entered profile name.
- * Call this after finish ends successfully.
- */
- public String getProfileName()
- {
- return profileName;
- }
- /**
- * Return user-entered decision to make the new profile active.
- * Call this after finish ends successfully.
- */
- public boolean getMakeActive()
- {
- return makeActive;
- }
-
-
- // ISystemMessageLine methods
-// public void clearMessage()
-// {
-// setMessage(null);
-// }
- //public void clearErrorMessage()
- //{
- //setErrorMessage(null);
- //}
-
- public Object getLayoutData()
- {
- return null;
- }
-
- public void setLayoutData(Object gridData)
- {
- }
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by wizard framework.
- */
- public boolean isPageComplete()
- {
- return (textName.getText().trim().length()>0);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemSubSystemsPropertiesWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemSubSystemsPropertiesWizardPage.java
deleted file mode 100644
index 6db8690c7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemSubSystemsPropertiesWizardPage.java
+++ /dev/null
@@ -1,293 +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.wizards;
-
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.ISystemVerifyListener;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.ISystemConnectionWizardErrorUpdater;
-import org.eclipse.rse.ui.propertypages.ISystemConnectionWizardPropertyPage;
-import org.eclipse.rse.ui.view.monitor.TabFolderLayout;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-
-/**
- * Wizard page that display the property pages for a given subsystem in the
- * connection
- *
- */
-public class SystemSubSystemsPropertiesWizardPage
- extends AbstractSystemNewConnectionWizardPage
- implements ISystemVerifyListener, ISubSystemPropertiesWizardPage
-{
- private ISystemConnectionWizardPropertyPage _thePage; // only if there's one page
- private CTabFolder _folder;
- private List _propertyPages;
- private String _lastHostName;
- /**
- * Constructor
- */
- public SystemSubSystemsPropertiesWizardPage(IWizard wizard, ISubSystemConfiguration parentFactory, List propertyPages)
- {
- //super(wizard, parentFactory); todo: use this when we enable port
- // selection
- super(
- wizard,
- parentFactory,
- parentFactory.getId(),
- // removed subsystem append since not correct for some languages
- parentFactory.getName(),
- //+ " " + SystemResources.RESID_SUBSYSTEM_TYPE_VALUE),
- //" SubSystem Properties", //TODO create
- // message for
- // this
- //"Configure properties of this subsystem"
- SystemResources.RESID_NEWCONN_SUBSYSTEMPAGE_DESCRIPTION
- );
- _propertyPages = propertyPages;
- }
-
- /**
- * @see AbstractSystemWizardPage#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- return getControl();
- }
-
- /*
- * Updates wiard property pages with new hostname
- */
- protected void hostNameUpdated(String hostName)
- {
- if (_folder != null)
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- ISystemConnectionWizardPropertyPage page =
- (ISystemConnectionWizardPropertyPage) _folder.getItem(i).getData();
- page.setHostname(hostName);
- }
- }
-
- }
-
- /**
- * @see AbstractSystemWizardPage#createContents(Composite)
- */
- public Control createContents(Composite parent)
- {
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- int numAdded = 0;
- if (_propertyPages.size() == 1)
- {
- PropertyPage page = (PropertyPage)_propertyPages.get(0);
- if (page != null && page instanceof ISystemConnectionWizardPropertyPage)
- {
- ISystemConnectionWizardPropertyPage cpage = (ISystemConnectionWizardPropertyPage)page;
- cpage.setSubSystemConfiguration(parentFactory);
- page.createControl(composite_prompts);
- _thePage = cpage;
-
- //set the hostname for the page in case it's required
- cpage.setHostname(getMainPage().getHostName());
-
- numAdded++;
- }
- }
- else
- {
- _folder = new CTabFolder(composite_prompts, SWT.NONE);
- _folder.setLayout(new TabFolderLayout());
-
-
- for (int i = 0; i < _propertyPages.size(); i++)
- {
- PropertyPage page = (PropertyPage)_propertyPages.get(i);
- if (page != null && page instanceof ISystemConnectionWizardPropertyPage)
- {
- ISystemConnectionWizardPropertyPage cpage = (ISystemConnectionWizardPropertyPage)page;
- cpage.setSubSystemConfiguration(parentFactory);
-
-
- CTabItem titem = new CTabItem(_folder, SWT.NULL, numAdded);
- titem.setData(page);
- page.createControl(_folder);
- titem.setText(page.getTitle());
- try
- {
- titem.setControl(page.getControl());
-
- }
- catch (Exception e)
- {
- // TODO why does the tabfolder hit exception the
- // first tiem setcontrol is called?
- }
-
- //set the hostname for the page in case it's required
- cpage.setHostname(getMainPage().getHostName());
-
- numAdded++;
- }
- }
- }
- if (numAdded == 0)
- {
-
- }
- addVerifyListener();
-
- return composite_prompts;
- }
-
- /**
- * @see ISystemWizardPage#performFinish()
- */
- public boolean performFinish()
- {
- return true;
- }
-
- public boolean applyValues(ISubSystem ss)
- {
- boolean result = true;
- if (_folder != null)
- {
- for (int i = 0; i < _folder.getItemCount() && result; i++)
- {
- ISystemConnectionWizardPropertyPage page =
- (ISystemConnectionWizardPropertyPage) _folder.getItem(i).getData();
- result = page.applyValues(ss.getConnectorService());
- }
- }
- else if (_thePage != null)
- {
- _thePage.applyValues(ss.getConnectorService());
- }
- return result;
- }
-
- /**
- * Return true if the page is complete, so to enable Finish. Called by
- * wizard framework.
- */
- public boolean isPageComplete()
- {
- String hostName = getMainPage().getHostName();
- if (!hostName.equals(_lastHostName))
- {
- hostNameUpdated(hostName);
- _lastHostName = hostName;
- }
- boolean result = true;
- if (_folder != null)
- {
- for (int i = 0; i < _folder.getItemCount() && result; i++)
- {
- if (_folder.getItem(i).getData() instanceof ISystemConnectionWizardErrorUpdater)
- {
- ISystemConnectionWizardErrorUpdater page =
- (ISystemConnectionWizardErrorUpdater) _folder.getItem(i).getData();
- result = page.isPageComplete();
- }
- }
- }
- else if (_thePage != null)
- {
- if (_thePage instanceof ISystemConnectionWizardErrorUpdater)
- {
- result = ((ISystemConnectionWizardErrorUpdater)_thePage).isPageComplete();
- }
- }
- return result;
-
- }
-
- protected void addVerifyListener()
- {
- if (_folder != null)
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- if (_folder.getItem(i).getData() instanceof ISystemConnectionWizardErrorUpdater)
- {
- ISystemConnectionWizardErrorUpdater page =
- (ISystemConnectionWizardErrorUpdater) _folder.getItem(i).getData();
- page.addVerifyListener(this);
- }
- }
- }
- else if (_thePage != null)
- {
- if (_thePage instanceof ISystemConnectionWizardErrorUpdater)
- {
- ((ISystemConnectionWizardErrorUpdater)_thePage).addVerifyListener(this);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
- */
- public void handleVerifyComplete()
- {
- boolean complete = isPageComplete();
- if (!complete)
- {
- if (_folder != null)
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- if (_folder.getItem(i).getData() instanceof ISystemConnectionWizardErrorUpdater)
- {
- ISystemConnectionWizardErrorUpdater page =
- (ISystemConnectionWizardErrorUpdater) _folder.getItem(i).getData();
- String error = page.getTheErrorMessage();
- if (error != null && !error.equals("")) //$NON-NLS-1$
- {
- setErrorMessage(_folder.getItem(i).getText() + ": " + page.getTheErrorMessage()); //$NON-NLS-1$
- }
- }
- }
- }
- else if (_thePage != null)
- {
- if (_thePage instanceof ISystemConnectionWizardErrorUpdater)
- {
- ((ISystemConnectionWizardErrorUpdater)_thePage).getTheErrorMessage();
- }
- }
- }
- else
- {
- clearErrorMessage();
- }
- setPageComplete(complete);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/about.html b/rse/plugins/org.eclipse.rse.ui/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/build.properties b/rse/plugins/org.eclipse.rse.ui/build.properties
deleted file mode 100644
index 21f519372..000000000
--- a/rse/plugins/org.eclipse.rse.ui/build.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = HelpContexts.xml,\
- messageFile.dtd,\
- plugin.properties,\
- plugin.xml,\
- systemmessages.xml,\
- .,\
- icons/,\
- about.html,\
- META-INF/,\
- schema/
-output.. = bin/
-source.. = filters/,\
- model/,\
- subsystems/,\
- systems/,\
- UI/
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPool.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPool.java
deleted file mode 100644
index a5398ef45..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPool.java
+++ /dev/null
@@ -1,1343 +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.filters;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.SystemResourceHelpers;
-import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterConstants;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterSavePolicies;
-import org.eclipse.rse.core.filters.SystemFilterNamingPolicy;
-import org.eclipse.rse.internal.filters.SystemFilter;
-import org.eclipse.rse.internal.filters.SystemFilterContainerCommonMethods;
-import org.eclipse.rse.internal.filters.SystemFilterPoolReference;
-import org.eclipse.rse.internal.references.SystemPersistableReferencedObject;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * This is a system filter pool, which is a means of grouping filters
- * and managing them as a list.
- * <p>
- * To enable filters themselves to be automous and sharable, it is decided
- * that no data will be persisted in the filter pool itself. Rather, all
- * attributes other than the list of filters are transient and as such it is
- * the responsibility of the programmer using a filter pool to set these
- * attributes after creating or restoring a filter pool. Typically, this is
- * what a filter pool manager (SystemFilterPoolManager) will do for you.
- */
-/**
- * @lastgen class SystemFilterPoolImpl extends SystemPersistableReferencedObjectImpl implements SystemFilterPool, SystemFilterSavePolicies, SystemFilterConstants, SystemFilterContainer, IAdaptable
- */
-public class SystemFilterPool extends SystemPersistableReferencedObject
- implements ISystemFilterPool, ISystemFilterSavePolicies, ISystemFilterConstants, ISystemFilterContainer, IAdaptable
-{
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- private String name;
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final String TYPE_EDEFAULT = null;
-
- private int savePolicy;
- private IRSEFilterNamingPolicy namingPolicy = null;
- private ISystemFilterPoolManager mgr;
- private SystemFilterContainerCommonMethods helpers = null;
- private Object filterPoolData = null;
- private boolean initialized = false;
- protected boolean specialCaseNoDataRestored = false;
- private boolean debug = false;
- protected static final String DELIMITER = SystemFilterPoolReference.DELIMITER;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String type = TYPE_EDEFAULT;
- /**
- * The default value of the '{@link #isSupportsNestedFilters() <em>Supports Nested Filters</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSupportsNestedFilters()
- * @generated
- * @ordered
- */
- protected static final boolean SUPPORTS_NESTED_FILTERS_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean supportsNestedFilters = SUPPORTS_NESTED_FILTERS_EDEFAULT;
- /**
- * The default value of the '{@link #isDeletable() <em>Deletable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isDeletable()
- * @generated
- * @ordered
- */
- protected static final boolean DELETABLE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean deletable = DELETABLE_EDEFAULT;
- /**
- * The default value of the '{@link #isDefault() <em>Default</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isDefault()
- * @generated
- * @ordered
- */
- protected static final boolean DEFAULT_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean default_ = DEFAULT_EDEFAULT;
- /**
- * The default value of the '{@link #isStringsCaseSensitive() <em>Strings Case Sensitive</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isStringsCaseSensitive()
- * @generated
- * @ordered
- */
- protected static final boolean STRINGS_CASE_SENSITIVE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT;
- /**
- * This is true if the Strings Case Sensitive attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean stringsCaseSensitiveESet = false;
-
- /**
- * The default value of the '{@link #isSupportsDuplicateFilterStrings() <em>Supports Duplicate Filter Strings</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSupportsDuplicateFilterStrings()
- * @generated
- * @ordered
- */
- protected static final boolean SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean supportsDuplicateFilterStrings = SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT;
- /**
- * The default value of the '{@link #getRelease() <em>Release</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRelease()
- * @generated
- * @ordered
- */
- protected static final int RELEASE_EDEFAULT = 0;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected int release = RELEASE_EDEFAULT;
- /**
- * The default value of the '{@link #isSingleFilterStringOnly() <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSingleFilterStringOnly()
- * @generated
- * @ordered
- */
- protected static final boolean SINGLE_FILTER_STRING_ONLY_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isSingleFilterStringOnly() <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSingleFilterStringOnly()
- * @generated
- * @ordered
- */
- protected boolean singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT;
-
- /**
- * This is true if the Single Filter String Only attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean singleFilterStringOnlyESet = false;
-
- /**
- * The default value of the '{@link #getOwningParentName() <em>Owning Parent Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOwningParentName()
- * @generated
- * @ordered
- */
- protected static final String OWNING_PARENT_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getOwningParentName() <em>Owning Parent Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOwningParentName()
- * @generated
- * @ordered
- */
- protected String owningParentName = OWNING_PARENT_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #isNonRenamable() <em>Non Renamable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isNonRenamable()
- * @generated
- * @ordered
- */
- protected static final boolean NON_RENAMABLE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isNonRenamable() <em>Non Renamable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isNonRenamable()
- * @generated
- * @ordered
- */
- protected boolean nonRenamable = NON_RENAMABLE_EDEFAULT;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected java.util.List filters = null;
- private static SystemFilterPool _instance;
-/**
- * Default constructor
- */
- protected SystemFilterPool()
- {
- super();
- helpers = new SystemFilterContainerCommonMethods();
- }
-
- public static SystemFilterPool getDefault()
- {
- if (_instance == null)
- {
- _instance = new SystemFilterPool();
- }
- return _instance;
- }
-
- /**
- * Static factory method for creating a new filter pool. Will
- * first try to restore it, and if that fails will create a new instance and
- * return it.
- * <p>
- * Use this method only if you are not using a SystemFilterPoolManager, else
- * use the createSystemFilterPool method in that class.
- *
- * @param mofHelpers SystemMOFHelpers object with helper methods for saving and restoring via mof
- * @param poolFolder the folder that will hold the filter pool.
- * This folder will be created if it does not already exist.
- * @param name the name of the filter pool. Typically this is also the name
- * of the given folder, but this is not required. For the save policy of one file
- * per pool, the name of the file is derived from this.
- * @param allowNestedFilters true if filters inside this filter pool are
- * to allow nested filters.
- * @param isDeletable true if this filter pool is allowed to be deleted by users.
- * @param tryToRestore true to attempt a restore first, false if a pure create operation.
- * @param savePolicy The save policy for the filter pool and filters. One of the
- * following constants from the SystemFilterConstants interface:
- * <ul>
- * <li>SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool
- * <li>SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder
- * <li>SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool
- * </ul>
- * @param namingPolicy The names to use for file and folders when persisting to disk. Pass
- * null to just use the defaults.
- */
- public ISystemFilterPool createSystemFilterPool(
- String name,
- boolean allowNestedFilters,
- boolean isDeletable,
- boolean tryToRestore)
- {
-
-
- SystemFilterPool pool = null;
- if (tryToRestore)
- {
- try
- {
- pool = (SystemFilterPool)RSEUIPlugin.getThePersistenceManager().restoreFilterPool(name);
- }
- catch (Exception exc) // real error trying to restore, versus simply not found.
- {
- // todo: something? Log the exception somewhere?
- }
- }
- if (pool == null) // not found or some serious error.
- {
- pool = createPool();
- }
- if (pool != null)
- {
- pool.initialize(name, allowNestedFilters, isDeletable);
- }
- return pool;
- }
-
- // temporary!
- //public boolean isSharable() {return isSharable; }
- //public void setIsSharable(boolean is) { isSharable = is; }
-
- /*
- * Private helper method.
- * Uses MOF to create an instance of this class.
- */
- protected static SystemFilterPool createPool()
- {
- ISystemFilterPool pool = new SystemFilterPool();
- // FIXME SystemFilterImpl.initMOF().createSystemFilterPool();
- pool.setRelease(SystemResources.CURRENT_RELEASE);
- return (SystemFilterPool)pool;
- }
-
- /*
- * Private helper method to initialize attributes
- */
- protected void initialize(String name,
- boolean allowNestedFilters,
- boolean isDeletable)
- {
- if (!initialized)
- initialize(name, savePolicy, namingPolicy);
- setDeletable(isDeletable); // mof attribute
- //System.out.println("In initialize() for filter pool " + getName() + ". isDeletable= " + isDeletable);
- setSupportsNestedFilters(allowNestedFilters); // cascades to each filter
- }
-
- /*
- * Private helper method to core initialization, from either createXXX or restore.
- */
- protected void initialize(String name,
- int savePolicy, IRSEFilterNamingPolicy namingPolicy)
- {
- setName(name); // mof attribute
- setSavePolicy(savePolicy);
- setNamingPolicy(namingPolicy);
-
- initialized = true;
- }
-
-
- //protected Vector internalGetFilters()
- protected java.util.List internalGetFilters()
- {
- //return filters;
- return getFilters(); // mof-supplied in parent class
- }
-
- /**
- * Return the caller which instantiated the filter pool manager overseeing this filter framework instance
- */
- public ISystemFilterPoolManagerProvider getProvider()
- {
- ISystemFilterPoolManager mgr = getSystemFilterPoolManager();
- if (mgr != null)
- return mgr.getProvider();
- else
- return null;
- }
-
- /**
- * Set the save file policy. See constants in {@link org.eclipse.rse.core.filters.ISystemFilterConstants SystemFilterConstants}.
- * One of:
- * <ul>
- * <li>SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool
- * <li>SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder
- * <li>SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool
- * </ul>
- * This method is called by the SystemFilterPoolManager.
- */
- public void setSavePolicy(int policy)
- {
- if (this.savePolicy != policy)
- {
- this.savePolicy = policy;
- setDirty(true);
- }
- }
-
- /**
- * Set the naming policy used when saving data to disk.
- * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
- */
- public void setNamingPolicy(IRSEFilterNamingPolicy namingPolicy)
- {
- if (this.namingPolicy != namingPolicy)
- {
- this.namingPolicy = namingPolicy;
- setDirty(true);
- }
- }
-
- /**
- * Get the naming policy currently used when saving data to disk.
- * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
- */
- public IRSEFilterNamingPolicy getNamingPolicy()
- {
- return namingPolicy;
- }
-
- /**
- * Set whether filters in this pool support nested filters.
- * Important to note this is stored in every filter as well as this filter pool.
- */
- public void setSupportsNestedFilters(boolean supports)
- {
- this.setSupportsNestedFiltersGen(supports);
- ISystemFilter[] filters = getSystemFilters();
- if (filters != null)
- for (int idx=0; idx<filters.length; idx++)
- filters[idx].setSupportsNestedFilters(supports);
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSupportsNestedFiltersGen(boolean newSupportsNestedFilters)
- {
- supportsNestedFilters = newSupportsNestedFilters;
- }
-
- /**
- * Set whether filters in this pool support duplicate filter strings.
- * Important to note this is stored in every filter as well as this filter pool.
- */
- public void setSupportsDuplicateFilterStrings(boolean supports)
- {
- setSupportsDuplicateFilterStringsGen(supports);
- ISystemFilter[] filters = getSystemFilters();
- if (filters != null)
- for (int idx=0; idx<filters.length; idx++)
- filters[idx].setSupportsDuplicateFilterStrings(supports);
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSupportsDuplicateFilterStringsGen(boolean newSupportsDuplicateFilterStrings)
- {
- supportsDuplicateFilterStrings = newSupportsDuplicateFilterStrings;
- setDirty(true);
- }
-
- /**
- * Set whether filters in this pool support case-sensitive filter strings.
- * Important to note this is stored in every filter as well as this filter pool.
- */
- public void setStringsCaseSensitive(boolean supports)
- {
- this.setStringsCaseSensitiveGen(supports);
- ISystemFilter[] filters = getSystemFilters();
- if (filters != null)
- for (int idx=0; idx<filters.length; idx++)
- filters[idx].setStringsCaseSensitive(supports);
- setDirty(true);
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setStringsCaseSensitiveGen(boolean newStringsCaseSensitive)
- {
- stringsCaseSensitive = newStringsCaseSensitive;
- stringsCaseSensitiveESet = true;
- setDirty(true);
- }
-
- /**
- * Set the filter pool manager. Called by SystemFilterPoolManager
- */
- public void setSystemFilterPoolManager(ISystemFilterPoolManager mgr)
- {
- this.mgr = mgr;
- }
- /**
- * Return the filter pool manager managing this collection of filter pools and their filters.
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager()
- {
- return mgr;
- }
-
- /**
- * While setData is for global data to set in all objects in the filter framework,
- * this is to set transient data that only the filter pool holds.
- */
- public void setSystemFilterPoolData(Object data)
- {
- this.filterPoolData = data;
- }
-
- /**
- * Return transient data set via setFilterPoolData.
- */
- public Object getSystemFilterPoolData()
- {
- return filterPoolData;
- }
-
- public String getId()
- {
- return getProvider().getId();
- }
-
- /**
- * @see ISystemFilterPool#getName()
- */
- public String getName()
- {
- return name;
- }
-
- public String getDescription()
- {
- return SystemResources.RESID_MODELOBJECTS_FILTERPOOL_DESCRIPTION;
- }
-
- /**
- * Set the name of this filter pool.
- */
- public void setName(String name)
- {
- if (this.name == null || !this.name.equals(name) )
- {
- this.name = name;
- setDirty(true);
- }
- }
-
- /**
- * Returns the type attribute. Intercepted to return SystemFilterConstants.DEFAULT_TYPE if it is currently null
- * Allows tools to have typed filter pools
- */
- public String getType()
- {
- String type = this.getTypeGen();
- if (type == null)
- return ISystemFilterConstants.DEFAULT_TYPE;
- else
- return type;
- }
- /**
- * @generated This field/method will be replaced during code generation
- * Allows tools to have typed filter pools
- */
- public String getTypeGen()
- {
- return type;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isDeletable()
- {
- return deletable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setDeletable(boolean newDeletable)
- {
- deletable = newDeletable;
- setDirty(true);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isDefault()
- {
- return default_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setDefault(boolean newDefault)
- {
- default_ = newDefault;
- }
-
- /**
- * Does this support nested filters? Calls mof-generated isSupportsNestedFilters.
- */
- public boolean supportsNestedFilters()
- {
- return isSupportsNestedFilters();
- }
- /**
- * Does this support duplicate filter strings? Calls mof-generated isSupportsDuplicateFilterStrings.
- */
- public boolean supportsDuplicateFilterStrings()
- {
- return isSupportsDuplicateFilterStrings();
- }
- /**
- * @return The value of the StringsCaseSensitive attribute
- * Are filter strings in this filter case sensitive?
- * If not set locally, queries the parent filter pool manager's atttribute.
- */
- public boolean isStringsCaseSensitive()
- {
- if (!isSetStringsCaseSensitive())
- return getSystemFilterPoolManager().isStringsCaseSensitive();
- else
- return stringsCaseSensitive;
- }
- /**
- * Same as isStringsCaseSensitive()
- * @return The value of the StringsCaseSensitive attribute
- */
- public boolean areStringsCaseSensitive()
- {
- return isStringsCaseSensitive();
- }
- /**
- * Clone this filter pools' attributes and filters into another filter pool.
- * Assumes the core attributes were already set when filter pool was created:
- * <ul>
- * <li>Name
- * <li>Deletable
- * <li>Supports nested filters
- * <li>Manager
- * </ul>
- * Attributes we clone:
- * <ul>
- * <li>Data
- * <li>Type
- * <li>Default
- * <li>Case sensitive
- * <li>Supports duplicate filter strings
- * <li>Release
- * </ul>
- */
- public void cloneSystemFilterPool(ISystemFilterPool targetPool)
- throws Exception
- {
- //System.out.println("In SystemFilterPoolImpl#cloneSystemFilterPool. targetPool null? " + (targetPool == null));
- if (filterPoolData != null)
- targetPool.setSystemFilterPoolData(filterPoolData);
-
- //String ourType = getTypeGen();
- //if (ourType != null)
- // targetPool.setType(ourType);
- targetPool.setType(getType());
-
- targetPool.setDeletable(isDeletable());
- targetPool.setSupportsNestedFilters(isSupportsNestedFilters());
-
- //Boolean ourDefault = getDefault();
- //if (ourDefault != null)
- // targetPool.setDefault(ourDefault);
- targetPool.setDefault(isDefault());
-
- targetPool.setSupportsDuplicateFilterStrings(supportsDuplicateFilterStrings());
- targetPool.setRelease(getRelease());
- //targetPool.setNonDeletable(isNonDeletable());
- targetPool.setNonRenamable(isNonRenamable());
- targetPool.setOwningParentName(getOwningParentName());
- if (isSetSingleFilterStringOnly())
- targetPool.setSingleFilterStringOnly(isSingleFilterStringOnly());
- if (isSetStringsCaseSensitive())
- targetPool.setStringsCaseSensitive(isStringsCaseSensitive());
-
-
- ISystemFilter[] filters = getSystemFilters();
- if ((filters!=null) && (filters.length>0))
- {
- for (int idx=0; idx<filters.length; idx++)
- {
- copySystemFilter(targetPool, filters[idx], filters[idx].getName());
- }
- }
- }
- /**
- * Copy a system filter to this or another filter pool.
- */
- public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName)
- throws Exception
- {
- ISystemFilter newFilter = targetPool.createSystemFilter(newName, null);
- oldFilter.clone(newFilter);
- return newFilter;
- }
- /**
- * Return filters in this pool, as an array.
- */
- public ISystemFilter[] getSystemFilters()
- {
- return helpers.getSystemFilters(internalGetFilters());
- }
- /**
- * From SystemFilterContainer.
- * Returns "this".
- */
- public ISystemFilterPool getSystemFilterPool()
- {
- return this;
- }
-
- /**
- * Creates a new system filter within this pool.
- * This filter will inherit/store the following attributes from this pool:
- * <ul>
- * <li>supportsNestedFilters
- * <li>supportsDuplicateFilterStrings
- * <li>stringsCaseSensitive
- * </ul>
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- */
- public ISystemFilter createSystemFilter(String aliasName, Vector filterStrings)
- {
- ISystemFilter newFilter = helpers.createSystemFilter(internalGetFilters(), this, aliasName, filterStrings);
- newFilter.setSupportsNestedFilters(supportsNestedFilters());
- newFilter.setStringsCaseSensitive(areStringsCaseSensitive());
- newFilter.setSupportsDuplicateFilterStrings(supportsDuplicateFilterStrings());
- setDirty(true);
- return newFilter;
- }
-
- /**
- * Return Vector of String objects: the names of existing filters in this container.
- * Needed by name validators for New and Rename actions to verify new name is unique.
- */
- public Vector getSystemFilterNames()
- {
- return helpers.getSystemFilterNames(internalGetFilters());
- }
-
- /**
- * Return the nested filters as a Vector
- */
- public Vector getSystemFiltersVector()
- {
- return helpers.getSystemFiltersVector(internalGetFilters());
- }
- /**
- * Return how many filters are defined in this filter container
- */
- public int getSystemFilterCount()
- {
- return helpers.getSystemFilterCount(internalGetFilters());
- }
- /**
- * Return a filter object, given its aliasname.
- * Can be used to test if an aliasname is already used (non-null return).
- * @param aliasName unique aliasName (case insensitive) to search on.
- * @return SystemFilter object with unique aliasName, or null if
- * no filter object with this name exists.
- */
- public ISystemFilter getSystemFilter(String aliasName)
- {
- return helpers.getSystemFilter(internalGetFilters(), aliasName);
- }
- /**
- * Adds given filter to the list.
- * <p>PLEASE NOTE:
- * <ul>
- * <li> createSystemFilter calls this method for you!
- * <li> this is a no-op if a filter with the same aliasname already exists
- * </ul>
- * @param filter SystemFilter object to add
- * @return true if added, false if filter with this aliasname already existed.
- */
- public boolean addSystemFilter(ISystemFilter filter)
- {
- boolean result = helpers.addSystemFilter(internalGetFilters(),filter);
- if (result) setDirty(true);
- return result;
- }
- /**
- * Removes a given filter from the list.
- * @param filter SystemFilter object to remove
- */
- public void deleteSystemFilter(ISystemFilter filter)
- {
- helpers.deleteSystemFilter(internalGetFilters(),filter);
- setDirty(true);
- }
-
- /**
- * Rename a given filter in the list.
- * @param filter SystemFilter object to remove
- */
- public void renameSystemFilter(ISystemFilter filter, String newName)
- {
- helpers.renameSystemFilter(internalGetFilters(),filter, newName);
- setDirty(true);
- }
-
- /**
- * Updates a given filter in the list.
- * @param filter SystemFilter object to update
- * @param newName New name to assign it. Assumes unique checking already done.
- * @param newStrings New strings to assign it. Replaces current strings.
- */
- public void updateSystemFilter(ISystemFilter filter, String newName, String[] newStrings)
- {
- helpers.updateSystemFilter(internalGetFilters(), filter, newName, newStrings);
- setDirty(true);
- }
-
- /**
- * Duplicates a given filter in the list.
- * @param filter SystemFilter object to clone
- * @param alias New, unique, alias name to give this filter. Clone will fail if this is not unique.
- */
- public ISystemFilter cloneSystemFilter(ISystemFilter filter, String aliasName)
- {
- ISystemFilter result = helpers.cloneSystemFilter(internalGetFilters(), filter, aliasName);
- setDirty(true);
- return result;
- }
-
- /**
- * Return a given filter's zero-based location
- */
- public int getSystemFilterPosition(ISystemFilter filter)
- {
- return helpers.getSystemFilterPosition(internalGetFilters(),filter);
- }
-
- /**
- * Move a given filter to a given zero-based location
- */
- public void moveSystemFilter(int pos, ISystemFilter filter)
- {
- helpers.moveSystemFilter(internalGetFilters(),pos,filter);
- setDirty(true);
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Private helper method to deduce filter names from disk files.
- * Will populate and return a list.
- * Only makes sense to use if the save policy is one file per filter.
- */
- protected static Vector deduceFilterNames(IFolder folder, IRSEFilterNamingPolicy namingPolicy)
- {
- Vector filterNames = SystemResourceHelpers.getResourceHelpers().convertToVectorAndStrip(
- SystemResourceHelpers.getResourceHelpers().listFiles(folder,
- namingPolicy.getFilterSaveFileNamePrefix(),
- SAVEFILE_SUFFIX),
- namingPolicy.getFilterSaveFileNamePrefix(), SAVEFILE_SUFFIX);
- return filterNames;
- }
-
-
-
- /**
- * Order filters according to user preferences.
- * <p>
- * While the framework has all the code necessary to arrange filters and save/restore
- * that arrangement, you may choose to use preferences instead of this support.
- * In this case, call this method and pass in the saved and sorted filter name list.
- * <p>
- * Called by someone after restore.
- */
- public void orderSystemFilters(String[] names)
- {
- java.util.List filterList = internalGetFilters();
- ISystemFilter[] filters = new ISystemFilter[names.length];
- for (int idx=0; idx<filters.length; idx++)
- filters[idx] = getSystemFilter(names[idx]); // convert name to filter
- filterList.clear();
- for (int idx=0; idx<filters.length; idx++)
- {
- filterList.add(filters[idx]);
- }
- helpers.invalidateCache();
- }
-
-
- // -----------------------
- // SAVE/RESTORE METHODS...
- // -----------------------
-
- /**
- * Restore specific filter pool. You should not call this directly, as it is possible
- * that certain data is not restored if the save policy is one file per filter. Rather,
- * you should call the createSystemFilterPoolMethod.
- * @param mofHelpers SystemMOFHelpers object with helper methods for saving and restoring via mof
- * @param folder The filter pool folder.
- * @param name name of pool to restore. Used to deduce file name for save policy of one file per pool.
- * @param savePolicy policy used to save the pool. One of the following from SystemFilterPoolManager:
- * <ul>
- * <li>SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool
- * <li>SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder
- * <li>SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool
- * </ul>
- * @param namingPolicy The names to use for file and folders when persisting to disk. Pass
- * null to just use the defaults.
- * @return SystemFilterPool object if restored ok, null if error encountered. If null, call getLastException().
- * @see org.eclipse.rse.core.filters.ISystemFilterConstants
- */
- protected static ISystemFilterPool restore(String name, int savePolicy,
- IRSEFilterNamingPolicy namingPolicy)
- throws Exception
- {
- if (namingPolicy == null)
- namingPolicy = SystemFilterNamingPolicy.getNamingPolicy();
-
- // FIXME SystemFilterImpl.initMOF(); // to be safe
-
- ISystemFilterPool pool = null;
- SystemFilterPool poolImpl = null;
- /* FIXME
- switch(savePolicy)
- {
- case SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL:
- pool = restoreFromOneFile(mofHelpers, folder, name, namingPolicy, true);
- poolImpl = (SystemFilterPoolImpl)pool;
- break;
-
- case SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER:
- pool = restoreFromOneFile(mofHelpers, folder, name, namingPolicy, true);
- poolImpl = (SystemFilterPoolImpl)pool;
- break;
-
- case SAVE_POLICY_ONE_FILE_PER_FILTER:
- pool = restoreFromOneFile(mofHelpers, folder, name, namingPolicy, false); // restore data part
- poolImpl = (SystemFilterPoolImpl)pool;
- //pool = createPool();
-
- poolImpl.setFolder(folder); // SystemFilter's restore will query it
- pool.setNamingPolicy(namingPolicy); // SystemFilter's restore will query it
- Vector filterNames = deduceFilterNames(folder, namingPolicy);
- if (filterNames != null)
- {
- Exception lastException = null;
- for (int idx=0; idx<filterNames.size(); idx++)
- {
- try {
- SystemFilter filter =
- SystemFilterImpl.restore(mofHelpers, folder, (String)filterNames.elementAt(idx), pool, namingPolicy);
- poolImpl.addSystemFilter(filter);
- } catch (Exception exc) {lastException = exc;}
- }
- if (lastException != null)
- {
- // todo, something! We want to signal the error, but not prevent pool from being restored.
- // Only option: log it somewhere.
- }
- else
- poolImpl.sortFilters();
- }
- break;
- }
- */
- if (poolImpl != null)
- {
- poolImpl.initialize(name,savePolicy,namingPolicy);
- }
- return pool;
- }
-
-
- /**
- * Internal use method
- */
- protected void initializeFilterStrings()
- {
- java.util.List filters = getFilters();
- Iterator i = filters.iterator();
- while (i.hasNext())
- ((SystemFilter)i.next()).initializeFilterStrings();
- }
-
- /**
- * When saving one file per filter, we store the relative order of each filter
- * within each filter. After restoring, the filters are ordered by their file
- * system existence, and so we must now re-order the internal list according to
- * the relative order given in each filter
- */
- protected void sortFilters()
- {
- java.util.List filterList = getFilters(); // get java.util.List
- if (filterList.size() <= 1) // not enough to sort?
- return; // outa here!
- if (debug)
- printFilterList("Before sorting"); //$NON-NLS-1$
- helpers.invalidateCache(); // force re-gen of array from java.util.List on next getSystemFilters() request
- ISystemFilter[] filters = getSystemFilters(); // convert java.util.List to array
- boolean[] processed = new boolean[filters.length];
- //for (int idx=0;idx<processed.length;idx++)
- //processed[idx] = false;
- filterList.clear(); // clear java.util.List
- //boolean done = false;
- int processedCount = 0;
- int totalCount = filters.length;
- int nextHighest = -1;
- int firstMatchIdx = -1;
- int round = 0;
- boolean stop = false;
- //int timeout = factorial(totalCount);
- //System.out.println("Factorial of " + totalCount + " = " + timeout);
- int timeout = totalCount + 1;
- while ((processedCount != totalCount) && (round < timeout))
- {
- nextHighest = 9999;
- firstMatchIdx = -1;
- stop = false;
- // find next highest number
- for (int idx=0; !stop && (idx<totalCount); idx++)
- {
- if (!processed[idx])
- {
- int currOrder = filters[idx].getRelativeOrder();
- if (currOrder < nextHighest)
- {
- nextHighest = currOrder;
- firstMatchIdx = idx;
- //stop = true;
- }
- else if ((currOrder == nextHighest) && (firstMatchIdx==-1))
- {
- firstMatchIdx = idx;
- //stop = true;
- }
- }
- }
- ++round;
- //System.out.println("Round " + round + ": nextHighest = " + nextHighest + ", firstMatchIdx = " + firstMatchIdx);
- if (firstMatchIdx != -1)
- {
- filterList.add(filters[firstMatchIdx]);
- processed[firstMatchIdx] = true;
- ++processedCount;
- }
- }
- helpers.invalidateCache(); // force re-gen of array from java.util.List on next getSystemFilters() request
- if (debug)
- printFilterList("After sorting"); //$NON-NLS-1$
- }
-
- private void printFilterList(String tagLine)
- {
- ISystemFilter[] filters = getSystemFilters();
- if (filters.length == 0)
- return;
- System.out.println(tagLine+" for filter pool " + getName()); //$NON-NLS-1$
- for (int idx=0; idx<filters.length; idx++)
- {
- System.out.println(" "+filters[idx].getName()+" "+filters[idx].getRelativeOrder()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- System.out.println();
- }
-
-
-
- /**
- * Return the root save file name without the extension .xmi
- */
- protected static String getRootSaveFileName(ISystemFilterPool pool)
- {
- return getRootSaveFileName(pool.getNamingPolicy(), pool.getName());
- }
- /**
- * Return the root save file name without the extension .xmi
- */
- protected static String getRootSaveFileName(ISystemFilterPool pool, String newName)
- {
- return getRootSaveFileName(pool.getNamingPolicy(), newName);
- }
- /**
- * Return the root save file name without the extension .xmi
- */
- protected static String getRootSaveFileName(IRSEFilterNamingPolicy namingPolicy, String poolName)
- {
- return namingPolicy.getFilterPoolSaveFileName(poolName);
- }
-
-
- /**
- * Return the unique reference name of this object.
- * <p>
- * As required by the {@link org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject IRSEPersistableReferencedObject}
- * interface.
- */
- public String getReferenceName()
- {
- return getSystemFilterPoolManager().getName()+DELIMITER+getName();
- }
-
- // -----------------------
- // HOUSEKEEPING METHODS...
- // -----------------------
- /* */
- public String toString()
- {
- return getName();
- }
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setType(String newType)
- {
- type = newType;
- setDirty(true);
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isSupportsNestedFilters()
- {
- return supportsNestedFilters;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void unsetStringsCaseSensitive()
- {
- stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT;
- stringsCaseSensitiveESet = false;
- setDirty(true);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean isSetStringsCaseSensitive()
- {
- return stringsCaseSensitiveESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public java.util.List getFilters()
- {
- if (filters == null)
- {
- filters = new ArrayList();
- //FIXME new EObjectContainmenteList(SystemFilter.class, this, FiltersPackage.SYSTEM_FILTER_POOL__FILTERS);
- }
- return filters;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isSupportsDuplicateFilterStrings()
- {
- return supportsDuplicateFilterStrings;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * In what release was this created? Typically, will be the version and release
- * times 10, as in 40 or 51.
- */
- public int getRelease()
- {
- return release;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRelease(int newRelease)
- {
- release = newRelease;
- setDirty(true);
- }
-
- /**
- * Returns true if this filter is limited to a single filter string. If not set here,
- * it is queried from the parent manager.
- */
- public boolean isSingleFilterStringOnly()
- {
- if (isSetSingleFilterStringOnly())
- return singleFilterStringOnly;
- else
- return getSystemFilterPoolManager().isSingleFilterStringOnly();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSingleFilterStringOnlyGen()
- {
- return singleFilterStringOnly;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly)
- {
- singleFilterStringOnly = newSingleFilterStringOnly;
- singleFilterStringOnlyESet = true;
- setDirty(true);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetSingleFilterStringOnly()
- {
- singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT;
- singleFilterStringOnlyESet = false;
- setDirty(true);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetSingleFilterStringOnly()
- {
- return singleFilterStringOnlyESet;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getOwningParentName()
- {
- return owningParentName;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setOwningParentName(String newOwningParentName)
- {
- if (newOwningParentName != owningParentName)
- {
- owningParentName = newOwningParentName;
- setDirty(true);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isNonRenamable()
- {
- return nonRenamable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setNonRenamable(boolean newNonRenamable)
- {
- boolean oldNonRenamable = nonRenamable;
- if (oldNonRenamable!= newNonRenamable)
- {
- nonRenamable = newNonRenamable;
- setDirty(true);
- }
- }
-
- public boolean commit()
- {
- return RSEUIPlugin.getThePersistenceManager().commit(this);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolReferenceManager.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolReferenceManager.java
deleted file mode 100644
index 8336fe059..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolReferenceManager.java
+++ /dev/null
@@ -1,1035 +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.filters;
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.rse.core.SystemResourceHelpers;
-import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterConstants;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterSavePolicies;
-import org.eclipse.rse.core.filters.SystemFilterNamingPolicy;
-import org.eclipse.rse.core.references.IRSEBasePersistableReferencingObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.filters.SystemFilter;
-import org.eclipse.rse.internal.filters.SystemFilterPoolReference;
-import org.eclipse.rse.internal.references.SystemPersistableReferenceManager;
-
-/**
- * This class manages a persistable list of objects each of which reference
- * a filter pool. This class builds on the parent class SystemPersistableReferenceManager,
- * offering convenience versions of the parent methods that are typed to the
- * classes in the filters framework.
- *
- * There will be one of these instantiated for a subsystem. Filter pool references can
- * be moved within a subsystem and this manager provides that function as well.
- */
-/**
- * @lastgen class SystemFilterPoolReferenceManagerImpl extends SystemPersistableReferenceManagerImpl implements SystemFilterPoolReferenceManager, SystemPersistableReferenceManager {}
- */
-public class SystemFilterPoolReferenceManager extends SystemPersistableReferenceManager implements ISystemFilterPoolReferenceManager {
- //private SystemFilterPoolManager[] poolMgrs = null;
- private ISystemFilterPoolManagerProvider poolMgrProvider = null;
- private ISystemFilterPoolManager defaultPoolMgr = null;
- private ISystemFilterPoolReferenceManagerProvider caller = null;
- private IRSEFilterNamingPolicy namingPolicy = null;
- private int savePolicy = ISystemFilterSavePolicies.SAVE_POLICY_NONE;
- private Object mgrData = null;
- private IFolder mgrFolder = null;
- private boolean initialized = false;
- private boolean noSave;
- private boolean noEvents;
- private boolean fireEvents = true;
- private ISystemFilterPoolReference[] fpRefsArray = null;
- private static final ISystemFilterPoolReference[] emptyFilterPoolRefArray = new ISystemFilterPoolReference[0];
-
- /**
- * Default constructor. Typically called by MOF factory methods.
- */
- public SystemFilterPoolReferenceManager() {
- super();
- }
-
- /**
- * A factory method to create a SystemFilterPoolReferenceManager instance.
- * @param caller Objects which instantiate this class should implement the
- * SystemFilterPoolReferenceManagerProvider interface, and pass "this" for this parameter.
- * Given any filter framework object, it is possible to retrieve the caller's
- * object via the getProvider method call.
- * @param relatedPoolManagerProvider The managers that owns the master list of filter pools that
- * this manager will contain references to.
- * @param mgrFolder the folder that will hold the persisted file. This is used when
- * the save policy is SAVE_POLICY_ONE_FILE_PER_MANAGER. For SAVE_POLICY_NONE, this
- * is not used. If it is used, it is created if it does not already exist.
- * @param name the name of the filter pool reference manager. This is used when
- * the save policy is SAVE_POLICY_ONE_FILE_PER_MANAGER, to deduce the file name.
- * @param savePolicy The save policy for the filter pool references list. One of the
- * following from the {@link org.eclipse.rse.core.filters.ISystemFilterConstants SystemFilterConstants}
- * interface:
- * <ul>
- * <li>SAVE_POLICY_NONE - no files, all save/restore handled elsewhere
- * <li>SAVE_POLICY_ONE_FILE_PER_MANAGER - one file: mgrName.xmi
- * </ul>
- * @param namingPolicy The names to use for file and folders when persisting to disk. Pass
- * null to just use the defaults, or if using SAVE_POLICY_NONE.
- * @return a filter pool reference manager
- */
- public static ISystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(ISystemFilterPoolReferenceManagerProvider caller,
- ISystemFilterPoolManagerProvider relatedPoolManagerProvider, IFolder mgrFolder, String name, int savePolicy, IRSEFilterNamingPolicy namingPolicy) {
- SystemFilterPoolReferenceManager mgr = null;
-
- if (mgrFolder != null) SystemResourceHelpers.getResourceHelpers().ensureFolderExists(mgrFolder);
- if (namingPolicy == null) namingPolicy = SystemFilterNamingPolicy.getNamingPolicy();
- try {
- if (savePolicy != ISystemFilterSavePolicies.SAVE_POLICY_NONE) mgr = (SystemFilterPoolReferenceManager) restore(caller, mgrFolder, name, namingPolicy);
- } catch (Exception exc) // real error trying to restore, versus simply not found.
- {
- // todo: something. Log the exception somewhere?
- }
- if (mgr == null) // not found or some serious error.
- {
- mgr = createManager();
- }
- if (mgr != null) {
- mgr.initialize(caller, mgrFolder, name, savePolicy, namingPolicy, relatedPoolManagerProvider);
- }
-
- return mgr;
- }
-
- /*
- * Private helper method.
- */
- protected static SystemFilterPoolReferenceManager createManager() {
- ISystemFilterPoolReferenceManager mgr = new SystemFilterPoolReferenceManager();
- return (SystemFilterPoolReferenceManager) mgr;
- }
-
- /*
- * Private helper method to initialize state
- */
- protected void initialize(ISystemFilterPoolReferenceManagerProvider caller, IFolder folder, String name, int savePolicy, IRSEFilterNamingPolicy namingPolicy,
- ISystemFilterPoolManagerProvider relatedPoolManagerProvider) {
- if (!initialized) initialize(caller, folder, name, savePolicy, namingPolicy); // core data
- //setSystemFilterPoolManagers(relatedPoolManagers);
- setSystemFilterPoolManagerProvider(relatedPoolManagerProvider);
- }
-
- /*
- * Private helper method to do core initialization.
- * Might be called from either the static factory method or the static restore method.
- */
- protected void initialize(ISystemFilterPoolReferenceManagerProvider caller, IFolder folder, String name, int savePolicy, IRSEFilterNamingPolicy namingPolicy) {
- this.mgrFolder = folder;
- setProvider(caller);
- setName(name);
- this.savePolicy = savePolicy;
- setNamingPolicy(namingPolicy);
- initialized = true;
- }
-
- private void invalidateFilterPoolReferencesCache() {
- fpRefsArray = null;
- invalidateCache();
- }
-
- // ------------------------------------------------------------
- // Methods for setting and querying attributes
- // ------------------------------------------------------------
- /**
- * Set the associated master pool manager provider. Note the provider
- * typically manages multiple pool managers and we manage references
- * across those.
- * @param poolMgrProvider the factory (provider) for the filter pool managers that this
- * reference manager provides services to
- */
- public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider poolMgrProvider) {
- this.poolMgrProvider = poolMgrProvider;
- }
-
- /**
- * @return the associated master pool manager provider. Note the provider
- * typically manages multiple pool managers and we manage references
- * across those.
- */
- public ISystemFilterPoolManagerProvider getSystemFilterPoolManagerProvider() {
- return poolMgrProvider;
- }
-
- /**
- * @return the managers of the master list of filter pools, from which
- * objects in this list reference.
- */
- public ISystemFilterPoolManager[] getSystemFilterPoolManagers() {
- return poolMgrProvider.getSystemFilterPoolManagers();
- }
-
- /**
- * @return the managers of the master list of filter pools, from which
- * objects in this list reference, but which are not in the list of
- * managers our pool manager supplier gives us. That is, these are
- * references to filter pools outside the expected list.
- */
- public ISystemFilterPoolManager[] getAdditionalSystemFilterPoolManagers() {
- ISystemFilterPoolManager[] poolMgrs = getSystemFilterPoolManagers();
- Vector v = new Vector();
- ISystemFilterPoolReference[] fpRefs = getSystemFilterPoolReferences();
- for (int idx = 0; idx < fpRefs.length; idx++) {
- ISystemFilterPool pool = fpRefs[idx].getReferencedFilterPool();
- if (pool != null) {
- ISystemFilterPoolManager mgr = pool.getSystemFilterPoolManager();
- if (!managerExists(poolMgrs, mgr) && !v.contains(mgr)) {
- System.out.println("Found unmatched manager: " + mgr.getName()); //$NON-NLS-1$
- v.addElement(mgr);
- }
- }
- }
- ISystemFilterPoolManager[] additionalMgrs = null;
- if (v.size() > 0) {
- additionalMgrs = new ISystemFilterPoolManager[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- additionalMgrs[idx] = (ISystemFilterPoolManager) v.elementAt(idx);
- }
- return additionalMgrs;
- }
-
- /**
- * Look for a pool manager in an array of pool managers.
- * @param mgrs the array in which to look
- * @param mgr the item to look for
- * @return true if the manager was found
- */
- private boolean managerExists(ISystemFilterPoolManager[] mgrs, ISystemFilterPoolManager mgr) {
- boolean match = false;
- for (int idx = 0; !match && (idx < mgrs.length); idx++)
- if (mgr == mgrs[idx]) match = true;
- return match;
- }
-
- /**
- * Set the default manager of the master list of filter pools, from which
- * objects in this list reference.
- * @param mgr the filter pool manager that is the default pool manager.
- */
- public void setDefaultSystemFilterPoolManager(ISystemFilterPoolManager mgr) {
- defaultPoolMgr = mgr;
- }
-
- /**
- * @return the default manager of the master list of filter pools, from which
- * objects in this list reference.
- */
- public ISystemFilterPoolManager getDefaultSystemFilterPoolManager() {
- return defaultPoolMgr;
- }
-
- /**
- * @return the object (the "provider" or factory) which instantiated
- * this instance of the filter pool reference manager.
- * This is also available from any filter reference framework object.
- */
- public ISystemFilterPoolReferenceManagerProvider getProvider() {
- return caller;
- }
-
- /**
- * Set the object which instantiated this instance of the filter pool reference manager.
- * This makes it available to retrieve from any filter reference framework object,
- * via the ubiquitous getProvider interface method.
- * @param caller the factory that created this instance.
- */
- public void setProvider(ISystemFilterPoolReferenceManagerProvider caller) {
- this.caller = caller;
- }
-
- /**
- * Turn callbacks to the provider either off or on.
- * @param fireEvents true if events are to be fired to the provider object, false if not.
- */
- public void setProviderEventNotification(boolean fireEvents) {
- this.fireEvents = fireEvents;
- }
-
- /**
- * Set the naming policy used when saving data to disk.
- * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
- * @param namingPolicy the naming policy - no longer used.
- */
- public void setNamingPolicy(IRSEFilterNamingPolicy namingPolicy) {
- this.namingPolicy = namingPolicy;
- }
-
- /**
- * Get the naming policy currently used when saving data to disk.
- * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
- * @return the naming policy - no longer used.
- */
- public IRSEFilterNamingPolicy getNamingPolicy() {
- return namingPolicy;
- }
-
- /**
- * This is to set transient data that is subsequently queryable.
- * @param data the data associated with this pool reference manager.
- */
- public void setSystemFilterPoolReferenceManagerData(Object data) {
- this.mgrData = data;
- }
-
- /**
- * @return transient data set via setFilterPoolData.
- */
- public Object getSystemFilterPoolReferenceManagerData() {
- return mgrData;
- }
-
- /**
- * Set the name. This is an override of mof-generated method
- * in order to potentially rename the disk file for a save
- * policy of SAVE_POLICY_ONE_FILE_PER_MANAGER.
- * No longer used.
- * @param name the name of this reference manager.
- */
- public void setName(String name) {
- if (savePolicy == ISystemFilterSavePolicies.SAVE_POLICY_ONE_FILE_PER_MANAGER) {
- IFile file = getResourceHelpers().getFile(getFolder(), getSaveFileName());
- super.setName(name);
- String newFileName = getSaveFileName();
- try {
- getResourceHelpers().renameFile(file, newFileName);
- } catch (Exception exc) {
- }
- } else
- super.setName(name);
- }
-
- // ---------------------------------------------------
- // Methods that work on FilterPool referencing objects
- // ---------------------------------------------------
- /**
- * Ask each referenced pool for its name, and update it.
- * Called after the name of the pool or its manager changes.
- */
- public void regenerateReferencedSystemFilterPoolNames() {
- ISystemFilterPoolReference[] fpRefs = getSystemFilterPoolReferences();
- for (int idx = 0; idx < fpRefs.length; idx++) {
- ISystemFilterPool pool = fpRefs[idx].getReferencedFilterPool();
- if (pool != null) fpRefs[idx].resetReferencedFilterPoolName(pool.getReferenceName());
- }
- invalidateFilterPoolReferencesCache(); // just in case!
- quietSave();
- }
-
- /**
- * @return array of SystemFilterPoolReference objects.
- * Result will never be null, although it may be an array of length zero.
- */
- public ISystemFilterPoolReference[] getSystemFilterPoolReferences() {
- IRSEBasePersistableReferencingObject[] refObjs = super.getReferencingObjects();
- if (refObjs.length == 0)
- return emptyFilterPoolRefArray;
- else if ((fpRefsArray == null) || (fpRefsArray.length != refObjs.length)) {
- fpRefsArray = new ISystemFilterPoolReference[refObjs.length];
- for (int idx = 0; idx < fpRefsArray.length; idx++)
- fpRefsArray[idx] = (ISystemFilterPoolReference) refObjs[idx];
- }
- return fpRefsArray;
- }
-
- /**
- * In one shot, set the filter pool references. Calls back to inform provider.
- * @param filterPoolReferences an array of filter pool reference objects to set the list to.
- * @param deReference true to first de-reference all objects in the existing list.
- */
- public void setSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolReferences, boolean deReference) {
- super.setReferencingObjects(filterPoolReferences, deReference);
- invalidateFilterPoolReferencesCache();
- // callback to provider so they can fire events in their GUI
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferencesReset();
- quietSave();
- }
-
- /**
- * Create a filter pool reference. This creates a raw reference that must be added to the managed
- * lists by the caller.
- */
- private ISystemFilterPoolReference createSystemFilterPoolReference(ISystemFilterPool filterPool) {
- ISystemFilterPoolReference filterPoolReference = new SystemFilterPoolReference(filterPool);
- invalidateFilterPoolReferencesCache();
- return filterPoolReference;
- }
-
- /**
- * Create a filter pool reference. This creates an unresolved raw reference that
- * must be added to the managed lists by the caller.
- * That will be attempted to be resolved on first use.
- */
- private ISystemFilterPoolReference createSystemFilterPoolReference(ISystemFilterPoolManager filterPoolManager, String filterPoolName) {
- ISystemFilterPoolReference filterPoolReference = new SystemFilterPoolReference(filterPoolManager, filterPoolName);
- invalidateFilterPoolReferencesCache();
- return filterPoolReference;
- }
-
- /**
- * Add a filter pool referencing object to the list.
- * @param filterPoolReference a reference to add to this manager
- * @return the new count of referencing objects
- */
- public int addSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference) {
- int count = addReferencingObject(filterPoolReference);
- filterPoolReference.setParentReferenceManager(this); // DWD - should be done in the addReferencingObject method?
- invalidateFilterPoolReferencesCache();
- quietSave();
- return count;
- }
-
- /**
- * Reset the filter pool a reference points to. Called on a move-filter-pool operation
- * @param filterPoolReference the reference to fix up
- * @param newPool the new pool to reference
- */
- public void resetSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference, ISystemFilterPool newPool) {
- filterPoolReference.removeReference();
- filterPoolReference.setReferencedObject(newPool);
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferenceReset(filterPoolReference);
- quietSave();
- }
-
- /**
- * Remove a filter pool referencing object from the list.
- * @param filterPoolReference the reference to remove
- * @param deReference true if we want to dereference the referenced object (call removeReference on it)
- * @return the new count of referencing objects
- */
- public int removeSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference, boolean deReference) {
- int count = 0;
- if (!deReference)
- count = super.removeReferencingObject(filterPoolReference);
- else
- count = super.removeAndDeReferenceReferencingObject(filterPoolReference);
- filterPoolReference.setParentReferenceManager(null); // DWD should be done in remove?
- invalidateFilterPoolReferencesCache();
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferenceDeleted(filterPoolReference);
- quietSave();
- return count;
- }
-
- /**
- * @return count of referenced filter pools
- */
- public int getSystemFilterPoolReferenceCount() {
- return super.getReferencingObjectCount();
- }
-
- /**
- * @param filterPoolRef the filter pool reference to search for
- * @return the zero-based position of the reference within this manager
- */
- public int getSystemFilterPoolReferencePosition(ISystemFilterPoolReference filterPoolRef) {
- return super.getReferencingObjectPosition(filterPoolRef);
- }
-
- /**
- * Move a given filter pool reference to a given zero-based location.
- * Calls back to inform provider of the event.
- * @param filterPoolRef the reference to move
- * @param pos the new position at which to move it. References at that position and beyond are
- * moved up in the list.
- */
- public void moveSystemFilterPoolReference(ISystemFilterPoolReference filterPoolRef, int pos) {
- int oldPos = super.getReferencingObjectPosition(filterPoolRef);
- super.moveReferencingObjectPosition(pos, filterPoolRef);
- invalidateFilterPoolReferencesCache();
- if (!noSave) quietSave();
- if (fireEvents && (caller != null) && !noEvents) {
- ISystemFilterPoolReference[] refs = new ISystemFilterPoolReference[1];
- refs[0] = filterPoolRef;
- caller.filterEventFilterPoolReferencesRePositioned(refs, pos - oldPos);
- }
- }
-
- /**
- * Move existing filter pool references a given number of positions.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.
- * Calls back to inform provider.
- * @param filterPoolRefs Array of SystemFilterPoolReferences to move.
- * @param delta the amount by which to move these references.
- */
- public void moveSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolRefs, int delta) {
- int[] oldPositions = new int[filterPoolRefs.length];
- noEvents = noSave = true;
- for (int idx = 0; idx < filterPoolRefs.length; idx++)
- oldPositions[idx] = getSystemFilterPoolReferencePosition(filterPoolRefs[idx]);
- if (delta > 0) // moving down, process backwards
- for (int idx = filterPoolRefs.length - 1; idx >= 0; idx--)
- moveSystemFilterPoolReference(filterPoolRefs[idx], oldPositions[idx] + delta);
- else
- for (int idx = 0; idx < filterPoolRefs.length; idx++)
- moveSystemFilterPoolReference(filterPoolRefs[idx], oldPositions[idx] + delta);
- invalidateFilterPoolReferencesCache();
- noEvents = noSave = false;
- quietSave();
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferencesRePositioned(filterPoolRefs, delta);
- }
-
- // ----------------------------------------------
- // Methods that work on FilterPool master objects
- // ----------------------------------------------
- /**
- * @return array of filter pools currently referenced by this manager.
- * Result will never be null, although it may be an array of length zero.
- */
- public ISystemFilterPool[] getReferencedSystemFilterPools() {
- ISystemFilterPoolReference[] refs = getSystemFilterPoolReferences();
- ISystemFilterPool[] pools = new ISystemFilterPool[refs.length];
- for (int idx = 0; idx < pools.length; idx++)
- pools[idx] = refs[idx].getReferencedFilterPool();
- return pools;
- }
-
- /**
- * @param filterPool the filter pool to test to see if we have a reference to it
- * @return true if the given filter pool has a referencing object in this list.
- */
- public boolean isSystemFilterPoolReferenced(ISystemFilterPool filterPool) {
- return super.isReferenced(filterPool);
- }
-
- /**
- * Given a filter pool, locate the referencing object for it and return it.
- * @param filterPool the filter pool we are testing for a reference
- * @return the referencing object if found, else null
- */
- public ISystemFilterPoolReference getReferenceToSystemFilterPool(ISystemFilterPool filterPool) {
- return (ISystemFilterPoolReference) super.getReferencedObject(filterPool);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.filters.ISystemFilterPoolReferenceManager#addReferenceToSystemFilterPool(org.eclipse.rse.filters.ISystemFilterPool)
- */
- public ISystemFilterPoolReference addReferenceToSystemFilterPool(ISystemFilterPool filterPool) {
- ISystemFilterPoolReference filterPoolReference = createSystemFilterPoolReference(filterPool);
- addReferencingObject(filterPoolReference); // DWD - should be done in addReferencingObject?
- filterPoolReference.setParentReferenceManager(this);
- invalidateFilterPoolReferencesCache();
- quietSave();
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferenceCreated(filterPoolReference);
- return filterPoolReference;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.filters.ISystemFilterPoolReferenceManager#addReferenceToSystemFilterPool(org.eclipse.rse.filters.ISystemFilterPoolManager, java.lang.String)
- */
- public ISystemFilterPoolReference addReferenceToSystemFilterPool(ISystemFilterPoolManager filterPoolManager, String filterPoolName) {
- ISystemFilterPoolReference filterPoolReference = createSystemFilterPoolReference(filterPoolManager, filterPoolName);
- addReferencingObject(filterPoolReference);
- filterPoolReference.setParentReferenceManager(this);
- invalidateFilterPoolReferencesCache();
- quietSave();
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferenceCreated(filterPoolReference);
- return filterPoolReference;
- }
-
- /**
- * Given a filter pool, locate the referencing object for it and remove it from the list.
- * Also removes that reference from the filterPool itself, and calls back to provider when done.
- * @param filterPool the filter pool whose references we are to remove
- * @return the new count of referencing objects
- */
- public int removeReferenceToSystemFilterPool(ISystemFilterPool filterPool) {
- ISystemFilterPoolReference filterPoolReference = getReferenceToSystemFilterPool(filterPool);
- int newCount = 0;
- if (filterPoolReference != null) {
- filterPoolReference.removeReference();
- newCount = removeReferencingObject(filterPoolReference);
- filterPoolReference.setParentReferenceManager(null); // DWD should be done in removeReferencingObject?
- invalidateFilterPoolReferencesCache();
- quietSave();
- // callback to provider so they can fire events in their GUI
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferenceDeleted(filterPoolReference);
- } else
- newCount = getSystemFilterPoolReferenceCount();
- return newCount;
- }
-
- /**
- * A referenced filter pool has been renamed. Update our stored name.
- * Calls back to inform provider.
- * @param pool the pool that has just been renamed
- */
- public void renameReferenceToSystemFilterPool(ISystemFilterPool pool) {
- ISystemFilterPoolReference poolRef = null;
- IRSEBasePersistableReferencingObject[] refs = getReferencingObjects();
- for (int idx = 0; (poolRef == null) && (idx < refs.length); idx++)
- if (refs[idx].getReferencedObject() == pool) poolRef = (ISystemFilterPoolReference) refs[idx];
-
- if (poolRef != null) {
- String oldName = poolRef.getReferencedObjectName();
- poolRef.resetReferencedFilterPoolName(pool.getReferenceName());
- invalidateFilterPoolReferencesCache();
- quietSave();
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferenceRenamed(poolRef, oldName);
- }
- }
-
- /**
- * In one shot, set the filter pool references to new references to supplied filter pools.
- * Calls back to provider.
- * @param filterPools of filter pool objects to create references for
- * @param deReference true to first de-reference all objects in the existing list.
- */
- public void setSystemFilterPoolReferences(ISystemFilterPool[] filterPools, boolean deReference) {
- if (deReference)
- super.removeAndDeReferenceAllReferencingObjects();
- else
- removeAllReferencingObjects();
- // add current
- if (filterPools != null) {
- for (int idx = 0; idx < filterPools.length; idx++) {
- //addReferenceToSystemFilterPool(filterPools[idx]);
- ISystemFilterPoolReference filterPoolReference = createSystemFilterPoolReference(filterPools[idx]);
- addReferencingObject(filterPoolReference);
- filterPoolReference.setParentReferenceManager(this); // DWD should be done in addReferencingObject?
- }
- invalidateFilterPoolReferencesCache();
- quietSave();
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferencesReset();
- }
- }
-
- // -------------------------
- // SPECIAL CASE METHODS
- // -------------------------
- /**
- * Create a single filter refererence to a given filter. Needed when a filter
- * is added to a pool, and the UI is not showing pools but rather all filters
- * in all pool references.
- * @param subSystem the subsystem that uses this reference manager
- * @param filter the new filter that is being added
- * @return the new reference
- */
- public ISystemFilterReference getSystemFilterReference(ISubSystem subSystem, ISystemFilter filter) {
- // step 1: find the reference to the filter pool that contains this filter
- ISystemFilterPool pool = filter.getParentFilterPool();
- ISystemFilterPoolReference poolRef = getReferenceToSystemFilterPool(pool);
- // step 2: generate a reference for it
- if (poolRef != null)
- return poolRef.getSystemFilterReference(subSystem, filter);
- else
- return null;
- }
-
- /**
- * Concatenate all filter references from all filter pools we reference, into one
- * big list. Used when the UI is not showing pools.
- * @param subSystem the subsystem for which this manager is providing filter pool reference management
- * @return an array of references for this subsystem
- */
- public ISystemFilterReference[] getSystemFilterReferences(ISubSystem subSystem) {
- ISystemFilterPoolReference[] poolRefs = getSystemFilterPoolReferences();
- Vector v = new Vector();
- for (int idx = 0; idx < poolRefs.length; idx++) {
- ISystemFilterReference[] filterRefs = poolRefs[idx].getSystemFilterReferences(subSystem);
- for (int jdx = 0; jdx < filterRefs.length; jdx++)
- v.addElement(filterRefs[jdx]);
- }
- ISystemFilterReference[] allRefs = new ISystemFilterReference[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- allRefs[idx] = (ISystemFilterReference) v.elementAt(idx);
- return allRefs;
- }
-
- /**
- * Given a filter reference, return its position within this reference manager
- * when you think of all filter references from all filter pool references as
- * being concatenated.
- * Used when the UI is not showing pools.
- * @param filterRef the reference to locate
- * @return the position fo this reference or -1 if not found.
- */
- public int getSystemFilterReferencePosition(ISystemFilterReference filterRef) {
- ISystemFilterPoolReference[] poolRefs = getSystemFilterPoolReferences();
- int match = -1;
- int totalCount = 0;
- for (int idx = 0; (match == -1) && (idx < poolRefs.length); idx++) {
- ISystemFilterReference[] filterRefs = poolRefs[idx].getSystemFilterReferences(filterRef.getSubSystem());
- for (int jdx = 0; (match == -1) && (jdx < filterRefs.length); jdx++) {
- if (filterRefs[jdx] == filterRef)
- match = totalCount;
- else
- totalCount++;
- }
- }
- return match;
- }
-
- /**
- * Given a filter, return its position within this reference manager
- * when you think of all filter references from all filter pool references as
- * being concatenated.
- * Used when the UI is not showing pools.
- * @param subSystem the subsystem in which to located the filter
- * @param filter the filter to locate
- * @return the position of the filter within this manager.
- */
- public int getSystemFilterReferencePosition(ISubSystem subSystem, ISystemFilter filter) {
- ISystemFilterPoolReference[] poolRefs = getSystemFilterPoolReferences();
- int match = -1;
- int totalCount = 0;
- for (int idx = 0; (match == -1) && (idx < poolRefs.length); idx++) {
- ISystemFilterReference[] filterRefs = poolRefs[idx].getSystemFilterReferences(subSystem);
- for (int jdx = 0; (match == -1) && (jdx < filterRefs.length); jdx++) {
- if (filterRefs[jdx].getReferencedFilter() == filter)
- match = totalCount;
- else
- totalCount++;
- }
- }
- return match;
- }
-
- // -----------------------
- // SAVE/RESTORE METHODS...
- // -----------------------
- private void quietSave() {
- try {
- save();
- } catch (Exception exc) {
- // TODO log exception
- }
- }
-
- /**
- * Save all the filter pools to disk.
- * Only called if the save policy is not "none".
- * No longer used.
- * @throws Exception
- */
- public void save() throws Exception {
- switch (savePolicy) {
- // ONE FILE PER FILTER POOL REFERENCE MANAGER
- case ISystemFilterSavePolicies.SAVE_POLICY_ONE_FILE_PER_MANAGER:
- saveToOneFile();
- break;
- }
- }
-
- /**
- * Save this reference manager to disk.
- * Used only if using the reference manager to save a single file to disk.
- * No longer used.
- * @return true if the save succeeded
- * @throws Exception
- */
- protected boolean saveToOneFile() throws Exception {
- /* FIXME
- String saveFileName = getSaveFilePathAndName();
- File saveFile = new File(saveFileName);
- boolean exists = saveFile.exists();
- saveFileName = saveFile.toURL().toString();
- Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
- Resource.Factory resFactory = reg.getFactory(URI.createURI(saveFileName));
- //System.out.println("Saving filter pool ref mgr "+getName()+" to: " + saveFile);
- //java.util.List ext = resFactory.createExtent(); mof way
- //ext.add(this);
- Resource res = resFactory.createResource(URI.createURI(saveFileName));
- res.getContents().add(this);
- try
- {
- res.save(EMPTY_MAP);
- } catch (Exception e)
- {
- if (debug)
- {
- System.out.println("Error saving filter pool ref mgr "+getName() + " to "+saveFile+": " + e.getClass().getName() + ": " + e.getMessage());
- e.printStackTrace();
- }
- throw e;
- }
- // if this is the first time we have created this file, we must update Eclipse
- // resource tree to know about it...
- if (!exists)
- {
- try {
- mgrFolder.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch(Exception exc) {}
- }
- */
- return true;
- }
-
- /**
- * Restore the filter pools from disk.
- * After restoring, you must call resolveReferencesAfterRestore.
- * No longer used.
- * @param caller The object that is calling this, which must implement SystemFilterPoolReferenceManagerProvider
- * @param mgrFolder folder containing filter pool references file.
- * @param name the name of the manager to restore. File name is derived from it when saving to one file.
- * @param namingPolicy to get file name prefix, via getFilterPoolReferenceManagerFileNamePrefix(). Pass null to use default.
- * @return the restored manager, or null if it does not exist.
- * @throws Exception if anything else went wrong
- */
- public static ISystemFilterPoolReferenceManager restore(ISystemFilterPoolReferenceManagerProvider caller, IFolder mgrFolder, String name, IRSEFilterNamingPolicy namingPolicy) throws Exception {
- if (namingPolicy == null) namingPolicy = SystemFilterNamingPolicy.getNamingPolicy();
- ISystemFilterPoolReferenceManager mgr = restoreFromOneFile(mgrFolder, name, namingPolicy);
- if (mgr != null) {
- ((SystemFilterPoolReferenceManager) mgr).initialize(caller, mgrFolder, name, ISystemFilterSavePolicies.SAVE_POLICY_ONE_FILE_PER_MANAGER, namingPolicy); // core data
- }
- return mgr;
- }
-
- /**
- * Restore the filter pools from disk, assuming default for a naming policy.
- * No longer used.
- * @param caller The object that is calling this, which must implement SystemFilterPoolReferenceManagerProvider
- * @param mgrFolder folder containing filter pool references file.
- * @param name the name of the manager to restore. File name is derived from it when saving to one file.
- * @return the restored manager, or null if it does not exist.
- * @throws Exception if anything else went wrong
- */
- public static ISystemFilterPoolReferenceManager restore(ISystemFilterPoolReferenceManagerProvider caller, IFolder mgrFolder, String name) throws Exception {
- return restore(caller, mgrFolder, name, null);
- }
-
- /**
- * Restore filter pools when all are stored in one file.
- * No longer used.
- * @param mgrFolder The folder containing the file to restore from.
- * @param name The name of the manager, from which the file name is derived.
- * @param namingPolicy Naming prefix information for persisted data file names.
- * @return the restored manager, or null if it does not exist.
- * @throws Exception if anything else went wrong
- */
- protected static ISystemFilterPoolReferenceManager restoreFromOneFile(IFolder mgrFolder, String name, IRSEFilterNamingPolicy namingPolicy) throws Exception {
- ISystemFilterPoolReferenceManager mgr = null;
- /* FIXME
- Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
- //ResourceSet resourceSet = MOF WAY
- // Resource.Factory.Registry.getResourceSetFactory().makeResourceSet();
- Resource res = null;
- String saveFile = getSaveFilePathAndName(mgrFolder, name, namingPolicy);
- try
- {
- //res = resourceSet.load(saveFile); MOF Way
- Resource.Factory resFactory = reg.getFactory(URI.createURI(saveFile));
- res = resFactory.createResource(URI.createURI(saveFile));
- res.load(EMPTY_MAP);
- }
- catch (java.io.FileNotFoundException e)
- {
- System.out.println("Restore error: Filter pool ref mgr "+name+" missing its file: "+saveFile);
- return null;
- }
- catch (Exception e)
- {
- if (debug)
- {
- System.out.println("Error restoring filter pool ref mgr "+name+" file "+saveFile+": " + e.getClass().getName() + ": " + e.getMessage());
- e.printStackTrace();
- }
- throw e;
- }
-
- java.util.List ext = res.getContents();
-
- // should be exactly one system filter pool manager...
- Iterator iList = ext.iterator();
- mgr = (SystemFilterPoolReferenceManager)iList.next();
- if (debug)
- System.out.println("Filter Pool Ref Mgr "+name+" loaded successfully.");
- */
- return mgr;
- }
-
- /**
- * After restoring this from disk, there is only the referenced object name,
- * not the referenced object pointer, for each referencing object.
- * <p>
- * This method is called after restore and for each restored object in the list must:
- * <ol>
- * <li>Do what is necessary to find the referenced object, and set the internal reference pointer.
- * <li>Call addReference(this) on that object so it can maintain it's in-memory list of all referencing objects.
- * <li>Set the important transient variables
- * </ol>
- * @param relatedPoolMgrProvider the filter pool manager provider that created the filter pools we reference
- * (usually a subsystem configuration)
- * @param provider the host of this reference manager, so you can later call getProvider
- * @return A Vector of SystemFilterPoolReferences that were not successfully resolved, or null if all
- * were resolved.
- */
- public Vector resolveReferencesAfterRestore(ISystemFilterPoolManagerProvider relatedPoolMgrProvider, ISystemFilterPoolReferenceManagerProvider provider) {
- setSystemFilterPoolManagerProvider(relatedPoolMgrProvider);
- setProvider(provider);
- ISystemFilterPoolManager[] relatedManagers = getSystemFilterPoolManagers();
- if (relatedManagers != null) {
- Vector badRefs = new Vector();
- ISystemFilterPoolReference[] poolRefs = getSystemFilterPoolReferences();
- if (poolRefs != null) {
- for (int idx = 0; idx < poolRefs.length; idx++) {
- String poolName = poolRefs[idx].getReferencedFilterPoolName();
- String mgrName = poolRefs[idx].getReferencedFilterPoolManagerName();
-
- ISystemFilterPool refdPool = getFilterPool(relatedManagers, mgrName, poolName);
- if ((refdPool == null) && (getFilterPoolManager(relatedManagers, mgrName) == null)) {
- //System.out.println("...looking for broken reference for "+mgrName+"."+poolName);
- refdPool = relatedPoolMgrProvider.getSystemFilterPoolForBrokenReference(this, mgrName, poolName);
- }
- if (refdPool != null) {
- poolRefs[idx].setReferenceToFilterPool(refdPool); // calls refdPool.addReference(poolRef)
- } else {
- badRefs.addElement(poolRefs[idx]);
- }
- }
- if (badRefs.size() == 0)
- return null;
- else {
- for (int idx = 0; idx < badRefs.size(); idx++) {
- ISystemFilterPoolReference badRef = (ISystemFilterPoolReference) badRefs.elementAt(idx);
- //badRef.setReferenceBroken(true);
- super.removeReferencingObject(badRef);
- }
- invalidateFilterPoolReferencesCache();
- quietSave();
- return badRefs;
- }
- }
- }
- return null;
- }
-
- /**
- * Utility method to scan across all filter pools in a given named filter pool manager, for a match
- * on a given filter pool name.
- * @param mgrs The list of filter pool managers to scan for the given filter pool.
- * @param mgrName The name of the manager to restrict the search to
- * @param poolName The name of the filter pool as stored on disk. It may be qualified somehow
- * to incorporate the manager name too.
- * @return the filter pool that was found.
- */
- public static ISystemFilterPool getFilterPool(ISystemFilterPoolManager[] mgrs, String mgrName, String poolName) {
- ISystemFilterPoolManager mgr = getFilterPoolManager(mgrs, mgrName);
- if (mgr == null) return null;
- return mgr.getSystemFilterPool(poolName);
- }
-
- /**
- * Utility method to scan across all filter pool managers for a match on a give name.
- * @param mgrs The list of filter pool managers to scan for the given name
- * @param mgrName The name of the manager to restrict the search to
- * @return the filter pool manager that was found or null if not found.
- */
- public static ISystemFilterPoolManager getFilterPoolManager(ISystemFilterPoolManager[] mgrs, String mgrName) {
- ISystemFilterPoolManager mgr = null;
- for (int idx = 0; (mgr == null) && (idx < mgrs.length); idx++)
- if (mgrs[idx].getName().equals(mgrName)) mgr = mgrs[idx];
- return mgr;
- }
-
- // ------------------
- // HELPER METHODS...
- // ------------------
-
- /**
- * If saving all info in one file, this returns the fully qualified name of that file,
- * given the unadorned manager name and the prefix (if any) to adorn with.
- * No longer used.
- * @param mgrFolder The folder in which to save a reference manager.
- * @param name The name of the file for a filter pool reference manager.
- * @param namingPolicy The naming policy for a filter pool reference manager
- * @return The name of the path to which to save the references in a filter pool reference manager.
- */
- protected static String getSaveFilePathAndName(IFolder mgrFolder, String name, IRSEFilterNamingPolicy namingPolicy) {
- return SystemFilter.addPathTerminator(getFolderPath(mgrFolder)) + getSaveFileName(namingPolicy.getReferenceManagerSaveFileName(name));
- }
-
- /**
- * Appends the correct extension to the file name where this manager is saved.
- * No longer used.
- * @param fileNameNoSuffix the file name <i>sans</i> suffix.
- * @return the unqualified file name used to store this to disk.
- */
- protected static String getSaveFileName(String fileNameNoSuffix) {
- return fileNameNoSuffix + ISystemFilterConstants.SAVEFILE_SUFFIX;
- }
-
- /**
- * @return the full path name of the file in which to save this manager.
- */
- protected String getSaveFilePathAndName() {
- return SystemFilter.addPathTerminator(getFolderPath(mgrFolder)) + getSaveFileName();
- }
-
- /**
- * @return the simple name of the file in which to save this manager.
- */
- protected String getSaveFileName() {
- return getSaveFileName(namingPolicy.getReferenceManagerSaveFileName(getName()));
- }
-
- /**
- * @return the folder that this manager is contained in.
- */
- public IFolder getFolder() {
- return mgrFolder;
- }
-
- /**
- * Set the folder that this manager is contained in.
- * @param newFolder the new folder
- */
- public void resetManagerFolder(IFolder newFolder) {
- mgrFolder = newFolder;
- }
-
- /**
- * @return the path of the folder that contains this manager.
- */
- public String getFolderPath() {
- return getResourceHelpers().getFolderPath(mgrFolder);
- }
-
- /**
- * @param folder the folder to find the path for
- * @return the path of the given folder
- */
- public static String getFolderPath(IFolder folder) {
- return SystemResourceHelpers.getResourceHelpers().getFolderPath(folder);
- }
-
- /*
- * To reduce typing...
- */
- private SystemResourceHelpers getResourceHelpers() {
- return SystemResourceHelpers.getResourceHelpers();
- }
-
- public String toString() {
- return getName();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolWrapper.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolWrapper.java
deleted file mode 100644
index f7333e0ad..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolWrapper.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.filters;
-
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapper;
-
-/**
- * The system filter wizard allows callers to pass a list of wrapper objects
- * for the user to select a filter pool.
- * <p>
- * This is a default implementation of the wrapper interface, that allows the
- * display name and wrappered filter pool to be set via the constructor.
- */
-public class SystemFilterPoolWrapper implements ISystemFilterPoolWrapper
-{
-
-
- private String displayName;
- private ISystemFilterPool pool;
-
- /**
- * Constructor for SystemFilterPoolWrapper.
- */
- public SystemFilterPoolWrapper(String displayName, ISystemFilterPool poolToWrapper)
- {
- super();
- this.displayName = displayName;
- this.pool = poolToWrapper;
- }
-
- /**
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolWrapper#getDisplayName()
- */
- public String getDisplayName()
- {
- return displayName;
- }
-
- /**
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolWrapper#getSystemFilterPool()
- */
- public ISystemFilterPool getSystemFilterPool()
- {
- return pool;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolWrapperInformation.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolWrapperInformation.java
deleted file mode 100644
index b45e222d1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterPoolWrapperInformation.java
+++ /dev/null
@@ -1,128 +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.filters;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapper;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
-
-/**
- * The system filter wizard allows callers to pass a list of wrapper objects
- * for the user to select a filter pool. Effectively, this prompting for
- * euphamisms to filter pools. This requires an array of wrapper objects,
- * and requires replacement mri for the pool prompt and tooltip text, and
- * the verbage above it.
- * <p>
- * This is all encapsulated in this class. The information is set via setters
- * or constructor parameters.
- */
-public class SystemFilterPoolWrapperInformation
- implements ISystemFilterPoolWrapperInformation
-{
- private String promptLabel, promptTooltip, verbageLabel;
- private Vector wrappers;
- private ISystemFilterPoolWrapper[] wrapperArray;
- private ISystemFilterPoolWrapper preSelectWrapper;
-
- /**
- * Constructor for SystemFilterPoolWrapperInformation.
- */
- public SystemFilterPoolWrapperInformation(String promptLabel, String promptTooltip, String verbageLabel)
- {
- super();
- this.promptLabel= promptLabel;
- this.verbageLabel = verbageLabel;
- this.promptLabel= promptTooltip;
- wrappers = new Vector();
- }
-
- /**
- * Add a wrapper object
- */
- public void addWrapper(ISystemFilterPoolWrapper wrapper)
- {
- wrappers.add(wrapper);
- }
- /**
- * Add a filter pool, which we will wrapper here by creating a SystemFilterPoolWrapper object for you
- */
- public void addWrapper(String displayName, ISystemFilterPool poolToWrap, boolean preSelect)
- {
- SystemFilterPoolWrapper wrapper = new SystemFilterPoolWrapper(displayName, poolToWrap);
- wrappers.add(wrapper);
- if (preSelect)
- preSelectWrapper = wrapper;
- }
- /**
- * Set the wrapper to preselect
- */
- public void setPreSelectWrapper(ISystemFilterPoolWrapper wrapper)
- {
- this.preSelectWrapper = wrapper;
- }
-
-
-
- public String getPromptLabel()
- {
- return promptLabel;
- }
-
- public String getPromptTooltip()
- {
- return promptTooltip;
- }
-
- public String getVerbageLabel()
- {
- return verbageLabel;
- }
-
-
- /**
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation#getWrappers()
- */
- public ISystemFilterPoolWrapper[] getWrappers()
- {
- if (wrapperArray == null)
- {
- wrapperArray = new ISystemFilterPoolWrapper[wrappers.size()];
- for (int idx=0; idx<wrapperArray.length; idx++)
- wrapperArray[idx] = (ISystemFilterPoolWrapper)wrappers.elementAt(idx);
- }
- return wrapperArray;
- }
-
- /**
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation#getPreSelectWrapper()
- */
- public ISystemFilterPoolWrapper getPreSelectWrapper()
- {
- if (preSelectWrapper == null)
- {
- if (wrappers.size() > 0)
- return (ISystemFilterPoolWrapper)wrappers.elementAt(0);
- else
- return null;
- }
- else
- return preSelectWrapper;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterReference.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterReference.java
deleted file mode 100644
index 611cd65df..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterReference.java
+++ /dev/null
@@ -1,499 +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.filters;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterContainerReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemContentsType;
-import org.eclipse.rse.core.references.IRSEBaseReferencedObject;
-import org.eclipse.rse.core.references.IRSEReferencingObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.filters.SystemFilterContainerReferenceCommonMethods;
-import org.eclipse.rse.internal.filters.SystemFilterStringReference;
-import org.eclipse.rse.internal.references.SystemReferencingObject;
-
-
-
-/**
- * Represents a shadow or reference to a system filter.
- * Such references are only transient, not savable to disk.
- * All major function is inherited.
- * <p>
- * SystemFilter references typically exist for only one reason:
- * <ol>
- * <li>As a simple shadow to enable a unique object in a GUI tree. For example,
- * if it is possible for the same filter to show up in different places in
- * the tree, then we must create shadows for each place it shows up.
- * </ol>
- */
-/**
- * @lastgen class SystemFilterReferenceImpl extends SystemReferencingObjectImpl implements IAdaptable, SystemFilterReference, SystemReferencingObject {}
- */
-public class SystemFilterReference extends SystemReferencingObject implements IAdaptable, ISystemFilterReference, IRSEReferencingObject
-{
- private SystemFilterContainerReferenceCommonMethods containerHelper = null;
- private ISystemFilterContainerReference parent = null;
- private ISystemFilter referencedFilter = null;
- private ISystemFilterStringReference[] referencedFilterStrings = null;
- protected boolean persistent;
- protected boolean isStale;
-// protected Object[] cachedContents;
- protected ISubSystem _subSystem;
-
- protected HashMap cachedContents;
-
- public static final boolean PERSISTENT_YES = true;
- public static final boolean PERSISTENT_NO = false;
- /**
- * Constructor. Typically called by MOF.
- */
- protected SystemFilterReference()
- {
- super();
- containerHelper = new SystemFilterContainerReferenceCommonMethods(this);
- persistent = true;
- isStale = true;
- cachedContents = new HashMap();
- }
- /**
- * Create a new instance of this class.
- * @param parent The SystemFilterReference or SystemFilterPoolReference object that we are a child of.
- * @param filter The master object to be referenced.
- * @param persistent Whether we should formally register our reference with the target filter or not.
- */
- public static ISystemFilterReference createSystemFilterReference(ISubSystem subSystem,
- ISystemFilterContainerReference parent,
- ISystemFilter filter,
- boolean persistent)
- {
- //SystemFilterReferenceImpl newRef = (SystemFilterReferenceImpl)SystemFilterImpl.initMOF().createSystemFilterReference();
- SystemFilterReference newRef = new SystemFilterReference(); // more efficient?
- newRef.persistent = persistent;
- newRef.setSubSystem(subSystem);
- newRef.setParent(parent);
- newRef.setReferencedFilter(filter);
- filter.addReference(newRef);
- return newRef;
- }
-
- /**
- * Gets the subsystem that contains this reference
- * @return the subsystem
- */
- public ISubSystem getSubSystem()
- {
- return _subSystem;
- }
-
- /**
- * Sets the subsystem that contains this reference
- * @param subSystem
- */
- public void setSubSystem(ISubSystem subSystem)
- {
- _subSystem = subSystem;
- }
-
- /**
- * Return the reference manager which is managing this filter reference
- * framework object.
- */
- public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager()
- {
- ISystemFilterPoolReference pool = getParentSystemFilterReferencePool();
- if (pool != null)
- return pool.getFilterPoolReferenceManager();
- else
- return null;
- }
-
- /**
- * Return the object which instantiated the pool reference manager object.
- * Makes it easy to get back to the point of origin, given any filter reference
- * framework object
- */
- public ISystemFilterPoolReferenceManagerProvider getProvider()
- {
- ISystemFilterPoolReferenceManager mgr = getFilterPoolReferenceManager();
- if (mgr != null)
- {
- ISystemFilterPoolReferenceManagerProvider provider = mgr.getProvider();
- if (provider == null)
- {
- provider = getSubSystem();
- }
- return provider;
- }
- else
- return null;
- }
-
-
- /**
- * If this is a reference to a nested filter, the parent is the
- * reference to the nested filter's parent. Else, it is the
- * reference to the parent filter pool
- */
- public void setParent(ISystemFilterContainerReference parent)
- {
- this.parent = parent;
- }
- /**
- * The parent will either by a SystemFilterPoolReference or
- * a SystemFilterReference.
- */
- public ISystemFilterContainerReference getParent()
- {
- return parent;
- }
-
- /**
- * Return the filter to which we reference...
- */
- public ISystemFilter getReferencedFilter()
- {
- return persistent ? (ISystemFilter)super.getReferencedObject() : referencedFilter;
- }
- /**
- * Set the filter to which we reference...
- */
- public void setReferencedFilter(ISystemFilter filter)
- {
- if (persistent)
- super.setReferencedObject(filter);
- else
- referencedFilter = filter;
- }
-
- /**
- * If this is a reference to a nested filter, the parent is the
- * reference to the nested filter's parent. Else, it is the
- * reference to the parent filter pool
- */
- public ISystemFilterPoolReference getParentSystemFilterReferencePool()
- {
- if (parent instanceof ISystemFilterPoolReference)
- return (ISystemFilterPoolReference)parent;
- else
- return ((ISystemFilterReference)parent).getParentSystemFilterReferencePool();
- }
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- // -------------------------------------------------------------
- // Methods common with SystemFilterPoolReferenceImpl, and hence
- // abstracted out into SystemFilterContainerReference...
- // -------------------------------------------------------------
- /**
- * Return the object to which we hold a reference. This is either
- * SystemFilter or SystemFilterPool. Since both implement
- * SystemFilterContainer, that is what we return.
- * <p>
- * Of course, this is a generic method, and in our case it is always
- * true that we only hold a SystemFilter. Hence, this is the same
- * as calling getReferenceFilter and casting the result.
- */
- public ISystemFilterContainer getReferencedSystemFilterContainer()
- {
- return getReferencedFilter();
- }
- /**
- * Build and return an array of SystemFilterReference objects.
- * Each object is created new. There is one for each of the filters
- * in the reference SystemFilter or SystemFilterPool.
- * For performance reasons, we will cache this array and only
- * return a fresh one if something changes in the underlying
- * filter list.
- */
- public ISystemFilterReference[] getSystemFilterReferences(ISubSystem subSystem)
- {
- return containerHelper.getSystemFilterReferences(subSystem);
- }
- /**
- * Create a single filter refererence to a given filter.
- * If there already is a reference to this filter, it is returned.
- * If not, a new reference is created and appended to the end of the existing filter reference array.
- * @see #getExistingSystemFilterReference(ISystemFilter)
- */
- public ISystemFilterReference getSystemFilterReference(ISubSystem subSystem, ISystemFilter filter)
- {
- //return containerHelper.generateFilterReference(filter);
- return containerHelper.generateAndRecordFilterReference(subSystem, filter);
- }
- /**
- * Return an existing reference to a given system filter.
- * If no reference currently exists to this filter, returns null.
- * @see #getSystemFilterReference(ISystemFilter)
- */
- public ISystemFilterReference getExistingSystemFilterReference(ISubSystem subSystem, ISystemFilter filter)
- {
- return containerHelper.getExistingSystemFilterReference(subSystem, filter);
- }
-
- /**
- * Return true if the referenced pool or filter has filters.
- */
- public boolean hasFilters()
- {
- return containerHelper.hasFilters();
- }
-
- /**
- * Return count of the number of filters in the referenced pool or filter
- */
- public int getFilterCount()
- {
- return containerHelper.getFilterCount();
- }
-
- /**
- * Return the name of the SystemFilter or SystemFilterPool that we reference.
- * For such objects this is what we show in the GUI.
- */
- public String getName()
- {
- ISystemFilter filter = getReferencedFilter();
- if (filter != null)
- return filter.getName();
- else
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Override of Object method. Turn this filter in an outputable string
- */
- public String toString()
- {
- return getName();
- }
-
- // -------------------------------------------------
- // Methods for returning filter string references...
- // -------------------------------------------------
- /**
- * Return the number of filter strings in the referenced filter
- */
- public int getSystemFilterStringCount()
- {
- int count = 0;
- ISystemFilter referencedFilter = getReferencedFilter();
- if (referencedFilter != null)
- count = referencedFilter.getFilterStringCount();
- return count;
- }
- /**
- * Get the filter strings contained by this filter. But get references to each,
- * not the masters.
- */
- public ISystemFilterStringReference[] getSystemFilterStringReferences()
- {
- // These reference objects are built on the fly, each time, rather than
- // maintaining a persisted list of such references. The reason
- // is we do no at this time allow users to subset the master list
- // of strings maintained by a filter. Hence, we always simply
- // return a complete list. However, to save memory we try to only
- // re-gen the list if something has changed.
- java.util.List mofList = getReferencedFilter().getStrings();
- boolean needToReGen = compareFilterStrings(mofList);
- if (needToReGen)
- referencedFilterStrings = generateFilterStringReferences(mofList);
- return referencedFilterStrings;
- }
-
- /**
- * Create a single filter string refererence to a given filter string
- */
- public ISystemFilterStringReference getSystemFilterStringReference(ISystemFilterString filterString)
- {
- return new SystemFilterStringReference(this, filterString);
- }
-
-
- /**
- * To save memory, we try to only regenerate the referenced filter list
- * if something has changed.
- */
- private boolean compareFilterStrings(java.util.List newFilterStrings)
- {
- boolean mustReGen = false;
- if (newFilterStrings == null)
- {
- if (referencedFilterStrings != null)
- return true;
- else
- return false;
- }
- else if (referencedFilterStrings == null)
- {
- return true; // newFilterStrings != null && referencedFilterStrings == null
- }
- // both old and new are non-null
- if (newFilterStrings.size() != referencedFilterStrings.length)
- return true;
- Iterator i = newFilterStrings.iterator();
- for (int idx=0; !mustReGen && (idx<referencedFilterStrings.length); idx++)
- {
- ISystemFilterString newFilterString = (ISystemFilterString)i.next();
- if (!(referencedFilterStrings[idx].getReferencedFilterString().equals(newFilterString)))
- mustReGen = true;
- }
- return mustReGen;
- }
-
- /**
- * To save the memory of an intermediate array, we create the filter string references
- * directly from the MOF model...
- */
- private ISystemFilterStringReference[] generateFilterStringReferences(java.util.List newFilterStrings)
- {
- if (newFilterStrings == null)
- return null;
- ISystemFilterStringReference[] refs = new ISystemFilterStringReference[newFilterStrings.size()];
- Iterator i = newFilterStrings.iterator();
- int idx = 0;
- while (i.hasNext())
- {
- refs[idx++] = getSystemFilterStringReference((ISystemFilterString)i.next());
- }
- return refs;
- }
-
-
- // -----------------------------------
- // IRSEReferencingObject methods...
- // -----------------------------------
-
- /**
- * Set the object to which we reference. Override of inherited
- */
- public void setReferencedObject(IRSEBaseReferencedObject obj)
- {
- setReferencedFilter((ISystemFilter)obj);
- }
- /**
- * Get the object which we reference. Override of inherited
- */
- public IRSEBaseReferencedObject getReferencedObject()
- {
- return getReferencedFilter();
- }
- /**
- * Fastpath to getReferencedObject().removeReference(this).
- * @return new reference count of master object
- */
- public int removeReference()
- {
- int count = 0;
- if (persistent)
- super.removeReference();
- setReferencedFilter(null);
- return count;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContainer#hasContents(org.eclipse.rse.model.ISystemContentsType)
- */
- public boolean hasContents(ISystemContentsType contentsType)
- {
- if (cachedContents.containsKey(contentsType))
- {
- return true;
- }
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContainer#getContents(org.eclipse.rse.model.ISystemContentsType)
- */
- public Object[] getContents(ISystemContentsType contentsType)
- {
- return (Object[])cachedContents.get(contentsType);
- }
-
- public void setContents(ISystemContentsType type, Object[] cachedContents)
- {
- this.cachedContents.put(type, cachedContents);
-
- isStale = false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContainer#isStale()
- */
- public boolean isStale()
- {
- return isStale;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContainer#markStale(boolean)
- */
- public void markStale(boolean isStale)
- {
- markStale(isStale, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.ISystemContainer#markStale(boolean)
- */
- public void markStale(boolean isStale, boolean clearCache)
- {
- this.isStale = isStale;
- if (clearCache && isStale)
- {
- Iterator iterator = cachedContents.values().iterator();
- while (iterator.hasNext())
- {
- Object[] arr = (Object[])iterator.next();
- for (int i = 0; i < arr.length; i++)
- {
- Object obj = arr[i];
- if (obj instanceof ISystemContainer)
- {
- ((ISystemContainer)obj).markStale(true);
- }
- }
- }
- cachedContents.clear();
- }
- }
- public boolean commit()
- {
- // FIXME
- return false;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterSimple.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterSimple.java
deleted file mode 100644
index 0c4b12034..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterSimple.java
+++ /dev/null
@@ -1,508 +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.filters;
-import java.util.HashMap;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterConstants;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemContentsType;
-import org.eclipse.rse.internal.filters.SystemFilter;
-
-
-/**
- * A lightweight override of the full-fledged persistable implementation of SystemFilter.
- * This class replaces the heavy-weight MOF implementations with simple non-MOF
- * implementations.
- * <p>
- * This flavour of SystemFilter implementation is for those cases where a simple in-memory
- * SystemFilter is needed temporarily, perhaps to populate a GUI widget say, and the filter
- * does not need to be savable/restorable. As a result there is no mof, and no need for a
- * parent SystemFilterPool or SystemFilterPoolManager. The class is small, simple and
- * directly instantiable.
- * <p>
- * This simple implementation does <i>not</i> support:
- * <ul>
- * <li>Saving or restoring from disk
- * <li>SystemFilterStrings ... only Strings are used for the filter strings
- * <li>Nested filters
- * <li>Parent filter pool
- * <li>The attributes relativeOrder, promptable and default
- * </ul>
- */
-public class SystemFilterSimple extends SystemFilter implements ISystemContainer
-{
-
- private String name = null;
- private String type = ISystemFilterConstants.DEFAULT_TYPE;
- private boolean caseSensitive = false;
- private boolean promptable = false;
- private Object parent;
- // the following are inherited...
- //private String[] filterStringArray = null;
- //private SystemFilterString[] filterStringObjectArray = null;
- //private Vector filterStringVector = null;
- protected boolean isStale;
- protected HashMap cachedContents;
-
- /**
- * Constructor for SystemFilterSimpleImpl
- */
- public SystemFilterSimple(String name)
- {
- //super();
- this.name = name;
- filterStringVector = new Vector();
- isStale = true;
- cachedContents = new HashMap();
- }
-
- protected void invalidateCache()
- {
- filterStringArray = null;
- filterStringObjectArray = null;
- //filterStringVector = null;
- }
-
- /**
- * Return true if this a transient or simple filter that is only created temporary "on the fly"
- * and not intended to be saved or part of the filter framework. Eg it has no manager or provider.
- * <p>
- * We always return true
- */
- public boolean isTransient()
- {
- return true;
- }
-
- /**
- * Clones a given filter to the given target filter.
- * All filter strings, and all nested filters, are copied.
- * @param targetFilter new filter into which we copy all our data
- */
- public void clone(ISystemFilter targetFilter)
- {
- super.clone(targetFilter);
- // hmm, due to polymorphism, we should not have to do anything here!
- // well, except for this:
- targetFilter.setFilterStrings(getFilterStringsVector());
- }
-
- // -------------------------------------------------------
- // New methods to simplify life. Often a simple filter
- // contains a single filter string so these methods
- // make it easier to set/get that filter string
- // -------------------------------------------------------
- /**
- * Set the single filter string
- */
- public void setFilterString(String filterString)
- {
- filterStringVector.clear();
- filterStringVector.addElement(filterString);
- invalidateCache();
- }
- /**
- * Get the single filter string.
- * Returns null if setFilterString has not been called.
- */
- public String getFilterString()
- {
- if (filterStringVector.size() == 0)
- return null;
- else
- return (String)filterStringVector.elementAt(0);
- }
-
- /**
- * Set the parent. Since we don't have any filter manager, we need
- * some way to store context info for the adapter. Use this.
- */
- public void setParent(Object parent)
- {
- this.parent = parent;
- }
-
- /**
- * Get the parent as set in setParent(Object)
- */
- public Object getParent()
- {
- return parent;
- }
-
- // -------------------------------------------------------
- // Functional methods overridden to do something simple...
- // -------------------------------------------------------
-
- /**
- * Set the filter's name
- */
- public void setName(String name)
- {
- this.name = name;
- }
- /**
- * Get the filter's name
- */
- public String getName()
- {
- return name;
- }
- /**
- * Set the filter's type
- */
- public void setType(String type)
- {
- this.type = type;
- }
- /**
- * Get the filter's type
- */
- public String getType()
- {
- return type;
- }
- /**
- * Specify if filter strings in this filter are case sensitive.
- * Default is false.
- * @param value The new value of the StringsCaseSensitive attribute
- */
- public void setStringsCaseSensitive(boolean value)
- {
- this.caseSensitive = value;
- }
-
- /**
- * Are filter strings in this filter case sensitive?
- */
- public boolean isStringsCaseSensitive()
- {
- return caseSensitive;
- }
- /**
- * Are filter strings in this filter case sensitive?
- */
- public boolean areStringsCaseSensitive()
- {
- return caseSensitive;
- }
-
- /**
- * Is this a special filter that prompts the user when it is expanded?
- */
- public void setPromptable(boolean promptable)
- {
- this.promptable = promptable;
- }
- /**
- * Is this a special filter that prompts the user when it is expanded?
- */
- public boolean isPromptable()
- {
- return promptable;
- }
-
- /**
- * Return filter strings as an array of String objects.
- */
- public String[] getFilterStrings()
- {
- if (filterStringArray == null)
- {
- filterStringArray = new String[filterStringVector.size()];
- for (int idx=0; idx<filterStringArray.length; idx++)
- filterStringArray[idx] = (String)filterStringVector.elementAt(idx);
- }
- return filterStringArray;
- }
- /**
- * Return filter strings as a Vector of String objects
- */
- public Vector getFilterStringsVector()
- {
- return filterStringVector;
- }
- /**
- * Return how many filter strings are defined in this filter.
- */
- public int getFilterStringCount()
- {
- return filterStringVector.size();
- }
- /**
- * Set all the filter strings for this filter.
- * @param newStrings Vector of String objects
- */
- public void setFilterStrings(Vector newStrings)
- {
- filterStringVector.clear();
- for (int idx=0; idx<newStrings.size(); idx++)
- {
- filterStringVector.addElement(newStrings.elementAt(idx));
- }
- invalidateCache();
- }
- /**
- * Set all the filter strings for this filter.
- * @param newStrings array of String objects
- */
- public void setFilterStrings(String newStrings[])
- {
- filterStringVector.clear();
- for (int idx=0; idx<newStrings.length; idx++)
- {
- filterStringVector.addElement(newStrings[idx]);
- }
- invalidateCache();
- }
- /**
- * Append a new filter string to this filter's list.
- * Returns null.
- */
- public ISystemFilterString addFilterString(String newString)
- {
- filterStringVector.addElement(newString);
- invalidateCache();
- return null;
- }
- /**
- * Insert a new filter string to this filter's list, at the given zero-based position.
- * Returns null.
- */
- public ISystemFilterString addFilterString(String newString, int position)
- {
- filterStringVector.insertElementAt(newString,position);
- invalidateCache();
- return null;
- }
-
- /**
- * Delete a filter string from this filter's list.
- * Returns null.
- */
- public ISystemFilterString removeFilterString(String oldString)
- {
- filterStringVector.removeElement(oldString);
- invalidateCache();
- return null;
- }
-
- /**
- * Remove a filter string from this filter's list, given its zero-based position
- * @return the SystemFilterString object deleted, or null if not found
- */
- public ISystemFilterString removeFilterString(int position)
- {
- filterStringVector.removeElementAt(position);
- invalidateCache();
- return null;
- }
- /**
- * Return the children of this filter.
- * This is the same as getFilterStrings()
- */
- public Object[] getChildren()
- {
- return getFilterStrings();
- }
- /**
- * Returns true if this filter has any filter strings
- */
- public boolean hasChildren()
- {
- return (filterStringVector.size() > 0);
- }
-
- // -------------------------------------------------------
- // Non-applicable methods overridden to do nothing...
- // -------------------------------------------------------
-
- /**
- * Get this filter's filter string objects as an array.
- * We return null, as we don't support SystemFilterString objects,
- * just String objects.
- */
- public ISystemFilterString[] getSystemFilterStrings()
- {
- return null;
- }
-
- /**
- * Overridden to do nothing
- */
- public void setSupportsNestedFilters(boolean value) {}
- /**
- * Does this support nested filters? No. Not for simple filtes.
- */
- public boolean supportsNestedFilters() {return false;}
- /**
- * Return true if this filter is a nested filter or not.
- * Overridden to return false;
- */
- public boolean isNested() { return false; }
- /**
- * Update a new filter string's string value.
- * Overridden to do nothing.
- */
- public void updateFilterString(ISystemFilterString filterString, String newValue) {}
- /**
- * Remove a filter string from this filter's list, given its SystemFilterString object.
- * Overridden to do nothing
- */
- public boolean removeFilterString(ISystemFilterString filterString) {return false;}
- /**
- * Move a given filter string to a given zero-based location.
- * Overridden to do nothing
- */
- public void moveSystemFilterString(int pos, ISystemFilterString filterString) {}
- /**
- * Overridden to do nothing
- */
- public void setRelativeOrder(int value) {}
-
- /**
- * Overridden to return -1
- */
- public int getRelativeOrder() { return -1; }
- /**
- * Overridden to do nothing
- */
- public void setDefault(boolean value) {}
- /**
- * Overridden to return false
- */
- public boolean isDefault() {return false; }
- /**
- * Overridden to do nothing
- */
- public void setParentFilter(ISystemFilter l) {}
- /**
- * Overridden to return null
- */
- public ISystemFilter getParentFilter() {return null;}
- /**
- * Overridden to return null
- */
- public Vector getSystemFilterNames() {return null;}
- /**
- * Overridden to return null
- */
- public java.util.List getNestedFilters() {return null;}
- /**
- * Overridden to return null
- */
- public Vector getSystemFiltersVector() {return null;}
- /**
- * Overridden to return null
- */
- public ISystemFilter[] getSystemFilters() {return null;}
- /**
- * Overridden to return 0
- */
- public int getSystemFilterCount() {return 0;}
- /**
- * Overridden to return null
- */
- public java.util.List getStrings() {return null;}
- /**
- * Overridden to return null
- */
- public ISystemFilter getSystemFilter(String aliasName) {return null;}
- /**
- * Overridden to return null
- */
- public ISystemFilterPoolManagerProvider getProvider() {return null;}
- /**
- * Overridden to return null
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager() {return null;}
- /**
- * Overridden to return null
- */
- public IFile getSaveFile() {return null;}
- /**
- * Overridden to return null
- */
- public String getSaveFileName() {return null;}
- /**
- * Overridden to do nothing
- */
- public void save() throws Exception {}
-
- /**
- * Cache contents of a certain type.
- * @param type the contents type.
- * @param cachedContents the contents to cache.
- */
- public void setContents(ISystemContentsType type, Object[] cachedContents) {
- this.cachedContents.put(type, cachedContents);
- isStale = false;
- }
-
- /**
- * @see org.eclipse.rse.core.model.ISystemContainer#getContents(org.eclipse.rse.core.model.ISystemContentsType)
- */
- public Object[] getContents(ISystemContentsType contentsType) {
- return (Object[])cachedContents.get(contentsType);
- }
-
- /**
- * @see org.eclipse.rse.core.model.ISystemContainer#hasContents(org.eclipse.rse.core.model.ISystemContentsType)
- */
- public boolean hasContents(ISystemContentsType contentsType) {
-
- if (cachedContents.containsKey(contentsType)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * @see org.eclipse.rse.core.model.ISystemContainer#isStale()
- */
- public boolean isStale() {
- return isStale;
- }
-
- /**
- * @see org.eclipse.rse.core.model.ISystemContainer#markStale(boolean)
- */
- public void markStale(boolean isStale)
- {
- markStale(isStale, true);
- }
-
- /**
- * @see org.eclipse.rse.core.model.ISystemContainer#markStale(boolean)
- */
- public void markStale(boolean isStale, boolean clearCache)
- {
- this.isStale = isStale;
- if (clearCache)
- {
- cachedContents.clear();
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterStartHere.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterStartHere.java
deleted file mode 100644
index 496a14887..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/SystemFilterStartHere.java
+++ /dev/null
@@ -1,129 +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.filters;
-import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy;
-import org.eclipse.rse.core.filters.ISystemFilterConstants;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterStartHere;
-import org.eclipse.rse.core.filters.SystemFilterNamingPolicy;
-import org.eclipse.rse.core.filters.SystemFilterPoolManager;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.logging.Logger;
-
-
-
-/**
- * Static methods for creating and restoring the "front doors" to the filter framework
- * <ul>
- * <li>SystemFilterNamingPolicy. This tells the framework what to use for file names when
- * saving and restoring to/from disk.
- * <li>SystemFilterPoolManager. This manages master lists of filter pools. Use only these
- * APIs for creating:
- * <ul>
- * <li>SystemFilterPools.
- * <li>SystemFilters
- * </ul>
- * <li>SystemFilterPoolReferenceManager. This manages a persistable list of filter pool
- * references. Use its APIs for creating:
- * <ul>
- * <li>SystemFilterPoolReferences.
- * </ul>
- * </ul>
- */
-public class SystemFilterStartHere
- implements ISystemFilterConstants, ISystemFilterStartHere
-{
- private static SystemFilterStartHere _instance;
- public SystemFilterStartHere()
- {
- }
-
- public static SystemFilterStartHere getDefault()
- {
- if (_instance == null)
- {
- _instance = new SystemFilterStartHere();
- }
- return _instance;
- }
-
- /**
- * Factory method to return an instance populated with defaults.
- * You can then simply override whatever is desired via setXXX methods.
- */
- public IRSEFilterNamingPolicy createSystemFilterNamingPolicy()
- {
- return SystemFilterNamingPolicy.getNamingPolicy();
- }
-
-
- /**
- * Factory to create a filter pool manager, when you do NOT want it to worry about
- * saving and restoring the filter data to disk. Rather, you will save and restore
- * yourself.
- * @param logger A logging object into which to log errors as they happen in the framework
- * @param caller Objects which instantiate this class should implement the
- * SystemFilterPoolManagerProvider interface, and pass "this" for this parameter.
- * Given any filter framework object, it is possible to retrieve the caller's
- * object via the getProvider method call.
- * @param name the name of the filter pool manager. Not currently used but you may
- * find a use for it.
- * @param allowNestedFilters true if filters inside filter pools in this manager are
- * to allow nested filters. This is the default, but can be overridden at the
- * individual filter pool level.
- */
- public ISystemFilterPoolManager
- createSystemFilterPoolManager(ISystemProfile profile,
- Logger logger,
- ISystemFilterPoolManagerProvider caller,
- String name,
- boolean allowNestedFilters)
- {
- return SystemFilterPoolManager.createSystemFilterPoolManager(profile, logger, caller,
- name, allowNestedFilters, SAVE_POLICY_NONE, null);
- }
-
-
-
- /**
- * Create a SystemFilterPoolReferenceManager instance, when you do NOT want it
- * to be saved and restored to its own file. Rather, you will save and restore it
- * yourself.
- * @param caller Objects which instantiate this class should implement the
- * SystemFilterPoolReferenceManagerProvider interface, and pass "this" for this parameter.
- * Given any filter framework object, it is possible to retrieve the caller's
- * object via the getProvider method call.
- * @param relatedPoolManagers The managers that own the master list of filter pools that
- * this manager will contain references to.
- * @param name the name of the filter pool reference manager. This is not currently
- * used, but you may find a use for it.
- * @param namingPolicy the naming policy object which will return the name of that one file.
- */
- public ISystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(
- ISystemFilterPoolReferenceManagerProvider caller,
- ISystemFilterPoolManagerProvider relatedPoolMgrProvider,
- String name, IRSEFilterNamingPolicy namingPolicy)
- {
- return SystemFilterPoolReferenceManager.createSystemFilterPoolReferenceManager(
- caller, relatedPoolMgrProvider, null, name, SAVE_POLICY_NONE, namingPolicy);
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 7fffe3151..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilter.java
+++ /dev/null
@@ -1,1372 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.filters;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterConstants;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.references.IRSEReferencedObject;
-import org.eclipse.rse.filters.SystemFilterSimple;
-import org.eclipse.rse.internal.references.SystemReferencedObject;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A filter is an encapsulation of a unique name, and a list
- * of filter strings.
- * Filters can be referenced.
- */
-/**
- * @lastgen class SystemFilterImpl extends SystemReferencedObjectImpl implements SystemFilter, SystemReferencedObject, SystemFilterContainer, IAdaptable {}
- */
-public class SystemFilter extends SystemReferencedObject implements ISystemFilter, IRSEReferencedObject, ISystemFilterContainer, IAdaptable
-{
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- private SystemFilterContainerCommonMethods helpers = null;
- private ISystemFilterPool parentPool = null;
- protected String[] filterStringArray = null;
- protected ISystemFilterString[] filterStringObjectArray = null;
- protected Vector filterStringVector = null;
-
- //protected static String SAVEFILE_PREFIX = DEFAULT_FILENAME_PREFIX_FILTER;
- //protected static String SAVEFILE_SUFFIX = ".xmi";
- protected static boolean debug = true;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String name = NAME_EDEFAULT;
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final String TYPE_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String type = TYPE_EDEFAULT;
- /**
- * The default value of the '{@link #isSupportsNestedFilters() <em>Supports Nested Filters</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSupportsNestedFilters()
- * @generated
- * @ordered
- */
- protected static final boolean SUPPORTS_NESTED_FILTERS_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean supportsNestedFilters = SUPPORTS_NESTED_FILTERS_EDEFAULT;
- /**
- * The default value of the '{@link #getRelativeOrder() <em>Relative Order</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRelativeOrder()
- * @generated
- * @ordered
- */
- protected static final int RELATIVE_ORDER_EDEFAULT = 0;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected int relativeOrder = RELATIVE_ORDER_EDEFAULT;
- /**
- * The default value of the '{@link #isDefault() <em>Default</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isDefault()
- * @generated
- * @ordered
- */
- protected static final boolean DEFAULT_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean default_ = DEFAULT_EDEFAULT;
- /**
- * The default value of the '{@link #isStringsCaseSensitive() <em>Strings Case Sensitive</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isStringsCaseSensitive()
- * @generated
- * @ordered
- */
- protected static final boolean STRINGS_CASE_SENSITIVE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT;
- /**
- * The default value of the '{@link #isPromptable() <em>Promptable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isPromptable()
- * @generated
- * @ordered
- */
- protected static final boolean PROMPTABLE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean promptable = PROMPTABLE_EDEFAULT;
- /**
- * The default value of the '{@link #isSupportsDuplicateFilterStrings() <em>Supports Duplicate Filter Strings</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSupportsDuplicateFilterStrings()
- * @generated
- * @ordered
- */
- protected static final boolean SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean supportsDuplicateFilterStrings = SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT;
- /**
- * The default value of the '{@link #isNonDeletable() <em>Non Deletable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isNonDeletable()
- * @generated
- * @ordered
- */
- protected static final boolean NON_DELETABLE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean nonDeletable = NON_DELETABLE_EDEFAULT;
- /**
- * The default value of the '{@link #isNonRenamable() <em>Non Renamable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isNonRenamable()
- * @generated
- * @ordered
- */
- protected static final boolean NON_RENAMABLE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean nonRenamable = NON_RENAMABLE_EDEFAULT;
- /**
- * The default value of the '{@link #isNonChangable() <em>Non Changable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isNonChangable()
- * @generated
- * @ordered
- */
- protected static final boolean NON_CHANGABLE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean nonChangable = NON_CHANGABLE_EDEFAULT;
- /**
- * The default value of the '{@link #isStringsNonChangable() <em>Strings Non Changable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isStringsNonChangable()
- * @generated
- * @ordered
- */
- protected static final boolean STRINGS_NON_CHANGABLE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean stringsNonChangable = STRINGS_NON_CHANGABLE_EDEFAULT;
- /**
- * The default value of the '{@link #getRelease() <em>Release</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRelease()
- * @generated
- * @ordered
- */
- protected static final int RELEASE_EDEFAULT = 0;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected int release = RELEASE_EDEFAULT;
- /**
- * The default value of the '{@link #isSingleFilterStringOnly() <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSingleFilterStringOnly()
- * @generated
- * @ordered
- */
- protected static final boolean SINGLE_FILTER_STRING_ONLY_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isSingleFilterStringOnly() <em>Single Filter String Only</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSingleFilterStringOnly()
- * @generated
- * @ordered
- */
- protected boolean singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected java.util.List nestedFilters = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected java.util.List strings = null;
-
-
- // FIXME
- protected ISystemFilter _parentFilter;
-
-/**
- * Constructor. Do not instantiate directly, let MOF do it!
- */
- protected SystemFilter()
- {
- super();
- helpers = new SystemFilterContainerCommonMethods();
- }
- /*
- * Private internal way to get filters. Makes it easy to change in future, if we don't use MOF.
- */
- protected java.util.List internalGetFilters()
- {
- return getNestedFilters();
- }
-
- /**
- * Returns the type attribute. Intercepted to return SystemFilterConstants.DEFAULT_TYPE if it is currently null
- */
- public String getType()
- {
- String type = getTypeGen();
- if (type == null)
- return ISystemFilterConstants.DEFAULT_TYPE;
- else
- return type;
- }
- /**
- * Returns the type attribute. Intercepted to return SystemFilterConstants.DEFAULT_TYPE if it is currently null
- */
- public String getTypeGen()
- {
- return type;
- }
- /*
- * Creates a new nested system filter within this filter
- * @param parentPool the SystemFilterPool that owns the root filter.
- * @param data Optional transient data to be stored in the new filter. Can be null.
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- *
- public SystemFilter createSystemFilter(SystemFilterPool parentPool, Object data, String aliasName, Vector filterStrings)
- {
- SystemFilter newFilter = helpers.createSystemFilter(internalGetFilters(), parentPool, data, aliasName, filterStrings);
- newFilter.setSupportsNestedFilters(true); // presumably it does since it is nested itself.
- return newFilter;
- }*/
-
- /**
- * Creates a new nested system filter within this filter.
- * This filter will inherit/store the following attributes from this filter:
- * <ul>
- * <li>supportsNestedFilters
- * <li>supportsDuplicateFilterStrings
- * <li>stringsCaseSensitive
- * <li>data
- * </ul>
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- */
- public ISystemFilter createSystemFilter(String aliasName, Vector filterStrings)
- {
- ISystemFilter newFilter = helpers.createSystemFilter(internalGetFilters(), getParentFilterPool(), aliasName, filterStrings);
- newFilter.setSupportsNestedFilters(true); // presumably it does since it is nested itself.
- newFilter.setSupportsDuplicateFilterStrings(supportsDuplicateFilterStrings());
- newFilter.setStringsCaseSensitive(areStringsCaseSensitive());
- return newFilter;
- }
-
- /**
- * Internal use method
- */
- public void initializeFilterStrings()
- {
- java.util.List filterStrings = getStrings();
- Iterator i = filterStrings.iterator();
- while (i.hasNext())
- ((ISystemFilterString)i.next()).setParentSystemFilter(this);
- }
-
- /**
- * Clones a given filter to the given target filter.
- * All filter strings, and all nested filters, are copied.
- * @param targetFilter new filter into which we copy all our data
- */
- public void clone(ISystemFilter targetFilter)
- {
- // clone attributes
- //targetFilter.setName(getName());
- targetFilter.setDefault(isDefault());
- targetFilter.setType(getType());
- targetFilter.setPromptable(isPromptable());
- targetFilter.setRelativeOrder(getRelativeOrder());
- targetFilter.setSupportsNestedFilters(isSupportsNestedFilters());
- targetFilter.setSupportsDuplicateFilterStrings(isSupportsDuplicateFilterStrings());
- targetFilter.setStringsNonChangable(isStringsNonChangable());
- targetFilter.setNonChangable(isNonChangable());
- targetFilter.setNonDeletable(isNonDeletable());
- targetFilter.setNonRenamable(isNonRenamable());
- if (isSetSingleFilterStringOnly())
- targetFilter.setSingleFilterStringOnly(isSingleFilterStringOnly());
- if (isSetStringsCaseSensitive())
- targetFilter.setStringsCaseSensitive(isStringsCaseSensitive());
- // clone filter strings
- ISystemFilterString[] strings = getSystemFilterStrings();
- if (strings != null) {
- for (int idx=0; idx<strings.length; idx++) {
- copySystemFilterString(targetFilter, strings[idx]);
- }
- }
- // clone nested filters...
- ISystemFilter[] filters = getSystemFilters();
- if (filters != null)
- for (int idx=0; idx<filters.length; idx++)
- {
- ISystemFilter newFilter = targetFilter.createSystemFilter(filters[idx].getName(), null);
- filters[idx].clone(newFilter); // recursive call
- }
- }
- /**
- * Copies a given filter string from this filter to another filter in this pool or another pool
- * in this manager or another manager.
- */
- public ISystemFilterString copySystemFilterString(ISystemFilter targetFilter, ISystemFilterString oldFilterString)
- {
- ISystemFilterString newString = targetFilter.addFilterString(null);
- oldFilterString.clone(newString);
- return newString;
- }
-
- /**
- * From SystemFilterContainer.
- * Same as calling getParentFilterPool(). It walks the parent chain until the pool is found.
- */
- public ISystemFilterPool getSystemFilterPool()
- {
- return getParentFilterPool();
- }
-
- /**
- * Return true if this a transient or simple filter that is only created temporary "on the fly"
- * and not intended to be saved or part of the filter framework. Eg it has no manager or provider.
- * <p>
- * We always return false.
- * @see SystemFilterSimple
- */
- public boolean isTransient()
- {
- return false;
- }
-
- /**
- * Does this support nested filters? Calls mof-generated isSupportsNestedFilters.
- */
- public boolean supportsNestedFilters()
- {
- return isSupportsNestedFilters();
- }
- /**
- * Does this support duplicate filter strings? Calls mof-generated isSupportsDuplicateFilterStrings.
- */
- public boolean supportsDuplicateFilterStrings()
- {
- return isSupportsDuplicateFilterStrings();
- }
-
- /**
- * Return true if this filter is a nested filter or not. If not, its parent is the filter pool.
- */
- public boolean isNested()
- {
- return (getParentFilter()!=null);
- }
- /**
- * Are filter strings in this filter case sensitive?
- * If not set locally, queries the parent filter pool's atttribute.
- * @return The value of the StringsCaseSensitive attribute
- */
- public boolean isStringsCaseSensitive()
- {
- if (!isSetStringsCaseSensitive())
- return getParentFilterPool().isStringsCaseSensitive();
- else
- return stringsCaseSensitive;
- }
- /**
- * Same as isStringsCaseSensitive()
- * @return The value of the StringsCaseSensitive attribute
- */
- public boolean areStringsCaseSensitive()
- {
- return isStringsCaseSensitive();
- }
- /**
- * Return Vector of String objects: the names of existing filters in this container.
- * Needed by name validators for New and Rename actions to verify new name is unique.
- */
- public Vector getSystemFilterNames()
- {
- return helpers.getSystemFilterNames(internalGetFilters());
- }
-
- /**
- * Return the nested filters as a Vector
- */
- public Vector getSystemFiltersVector()
- {
- return helpers.getSystemFiltersVector(internalGetFilters());
- }
- /**
- * Return the nested filters as an array
- */
- public ISystemFilter[] getSystemFilters()
- {
- return helpers.getSystemFilters(internalGetFilters());
- }
- /**
- * Return how many filters are defined in this filter container
- */
- public int getSystemFilterCount()
- {
- return internalGetFilters().size();
- }
-
- /**
- * Return a filter object, given its aliasname.
- * Can be used to test if an aliasname is already used (non-null return).
- * @param aliasName unique aliasName (case insensitive) to search on.
- * @return SystemFilter object with unique aliasName, or null if
- * no filter object with this name exists.
- */
- public ISystemFilter getSystemFilter(String aliasName)
- {
- return helpers.getSystemFilter(internalGetFilters(), aliasName);
-
- }
- /**
- * Adds given filter to the list.
- * <p>PLEASE NOTE:
- * <ul>
- * <li> createSystemFilter calls this method for you!
- * <li> this is a no-op if a filter with the same aliasname already exists
- * </ul>
- * @param filter SystemFilter object to add
- * @return true if added, false if filter with this aliasname already existed.
- */
- public boolean addSystemFilter(ISystemFilter filter)
- {
- return helpers.addSystemFilter(internalGetFilters(),filter);
- }
- /**
- * Removes a given filter from the list.
- * @param filter SystemFilter object to remove
- */
- public void deleteSystemFilter(ISystemFilter filter)
- {
- helpers.deleteSystemFilter(internalGetFilters(),filter);
- }
- /**
- * Rename a given filter in the list.
- * @param filter SystemFilter object to remove
- */
- public void renameSystemFilter(ISystemFilter filter, String newName)
- {
- helpers.renameSystemFilter(internalGetFilters(),filter, newName);
- }
- /**
- * Updates a given filter in the list.
- * @param filter SystemFilter object to update
- * @param newName New name to assign it. Assumes unique checking already done.
- * @param newStrings New strings to assign it. Replaces current strings.
- */
- public void updateSystemFilter(ISystemFilter filter, String newName, String[] newStrings)
- {
- helpers.updateSystemFilter(internalGetFilters(), filter, newName, newStrings);
- }
- /**
- * Duplicates a given filter in the list.
- * @param filter SystemFilter object to clone
- * @param alias New, unique, alias name to give this filter. Clone will fail if this is not unique.
- */
- public ISystemFilter cloneSystemFilter(ISystemFilter filter, String aliasName)
- {
- return helpers.cloneSystemFilter(internalGetFilters(), filter, aliasName);
- }
- /**
- * Return a given filter's zero-based location
- */
- public int getSystemFilterPosition(ISystemFilter filter)
- {
- return helpers.getSystemFilterPosition(internalGetFilters(),filter);
- }
-
- /**
- * Move a given filter to a given zero-based location
- */
- public void moveSystemFilter(int pos, ISystemFilter filter)
- {
- helpers.moveSystemFilter(internalGetFilters(), pos, filter);
- }
- /**
- * Return the parent pool of this filter. For nested filters, we walk up the parent chain
- * until we find the pool.
- */
- public ISystemFilterPool getParentFilterPool()
- {
- return parentPool;
- }
- /**
- * Internal use method to set the parent filter pool.
- */
- public void setParentFilterPool(ISystemFilterPool parentPool)
- {
- this.parentPool = parentPool;
- ISystemFilter[] filters = getSystemFilters();
- if (filters != null)
- for (int idx=0; idx<filters.length; idx++)
- filters[idx].setParentFilterPool(parentPool);
- // todo: decide if SystemFilterString objects need it too
- }
- /**
- * Return the ISystemFilterContainer parent of this filter. Will be either
- * a SystemFilterPool or a SystemFilter if this is a nested filter.
- */
- public ISystemFilterContainer getParentFilterContainer()
- {
- ISystemFilter parentFilter = getParentFilter();
- return (parentFilter != null) ? (ISystemFilterContainer)parentFilter : (ISystemFilterContainer)getParentFilterPool();
- }
-
- /**
- * Internal way to return emf-modelled list of filter strings.
- * We use this so we can easily change to non-mof if we decide to.
- */
- private java.util.List internalGetFilterStrings()
- {
- return getStrings();
- }
-
- /**
- * Clear internal cache so it will be rebuilt on next request.
- */
- protected void invalidateCache()
- {
- filterStringArray = null;
- filterStringObjectArray = null;
- filterStringVector = null;
- setDirty(true);
- }
-
- /**
- * Return filter strings as an array of String objects.
- */
- public String[] getFilterStrings()
- {
- if (filterStringArray == null)
- {
- java.util.List el = internalGetFilterStrings();
- filterStringArray = new String[el.size()];
- Iterator i = el.iterator();
- int idx = 0;
- while (i.hasNext())
- filterStringArray[idx++] = ((ISystemFilterString)(i.next())).getString();
- }
- return filterStringArray;
- }
- /**
- * Return filter strings as a Vector of String objects
- */
- public Vector getFilterStringsVector()
- {
- if (filterStringVector == null)
- {
- java.util.List el = internalGetFilterStrings();
- Iterator i = el.iterator();
- filterStringVector = new Vector();
- while (i.hasNext())
- filterStringVector.addElement(((ISystemFilterString)(i.next())).getString());
- }
- return filterStringVector;
- }
- /**
- * Get this filter's filter strings as a Vector of FilterString objects
- */
- public Vector getFilterStringObjectsVector()
- {
- java.util.List el = internalGetFilterStrings();
- Iterator i = el.iterator();
- Vector filterStringVector = new Vector();
- while (i.hasNext())
- filterStringVector.addElement(i.next());
- return filterStringVector;
- }
-
- /**
- * Return how many filter strings are defined in this filter.
- */
- public int getFilterStringCount()
- {
- return internalGetFilterStrings().size();
- }
- /**
- * Get a filter string given its string value
- */
- public ISystemFilterString getSystemFilterString(String string)
- {
- ISystemFilterString[] strings = getSystemFilterStrings();
- ISystemFilterString match = null;
- boolean cs = areStringsCaseSensitive();
- if (strings != null)
- {
- for (int idx=0; (match==null) && (idx<strings.length); idx++)
- {
- if (cs)
- {
- if (string.equals(strings[idx].getString())) // todo: allow case-sensitivity to be definable
- match = strings[idx];
- }
- else
- {
- if (string.equalsIgnoreCase(strings[idx].getString())) // todo: allow case-sensitivity to be definable
- match = strings[idx];
- }
- }
- }
- return match;
- }
- /**
- * Set all the filter strings for this filter.
- * @param newStrings Vector of String objects
- */
- public void setFilterStrings(Vector newStrings)
- {
- java.util.List strings = internalGetFilterStrings();
- strings.clear();
- for (int idx=0; idx<newStrings.size(); idx++)
- {
- String currString = (String)newStrings.elementAt(idx);
- ISystemFilterString string = new SystemFilterString();
- // FIXME initMOF().createSystemFilterString();
- string.setString(currString);
- string.setParentSystemFilter(this);
- strings.add(string);
- }
- invalidateCache();
- }
- /**
- * Get this filter's filter string objects as an array
- */
- public ISystemFilterString[] getSystemFilterStrings()
- {
- if (filterStringObjectArray == null)
- {
- java.util.List el = internalGetFilterStrings();
- filterStringObjectArray = new ISystemFilterString[el.size()];
- Iterator i = el.iterator();
- int idx = 0;
- while (i.hasNext())
- filterStringObjectArray[idx++] = (ISystemFilterString)(i.next());
- }
- return filterStringObjectArray;
- }
- /**
- * Set all the filter strings for this filter.
- * @param newStrings array of String objects
- */
- public void setFilterStrings(String newStrings[])
- {
- java.util.List strings = internalGetFilterStrings();
- strings.clear();
- for (int idx=0; idx<newStrings.length; idx++)
- {
- addFilterString(newStrings[idx]);
- }
- //invalidateCache(); already done
- }
- private ISystemFilterString createFilterString(String string)
- {
- ISystemFilterString filterstring = new SystemFilterString();
-
- // FIXME initMOF().createSystemFilterString();
- filterstring.setString(string);
- filterstring.setParentSystemFilter(this);
- return filterstring;
- }
- /**
- * Append a new filter string to this filter's list
- */
- public ISystemFilterString addFilterString(String newString)
- {
- java.util.List strings = internalGetFilterStrings();
- ISystemFilterString newFilterString = createFilterString(newString);
- strings.add(newFilterString);
- invalidateCache();
- return newFilterString;
- }
- /**
- * Insert a new filter string to this filter's list, at the given zero-based position
- */
- public ISystemFilterString addFilterString(String newString, int position)
- {
- java.util.List strings = internalGetFilterStrings();
- ISystemFilterString newFilterString = createFilterString(newString);
- strings.add(position, newFilterString);
- invalidateCache();
- return newFilterString;
- }
- /**
- * Update a new filter string's string value
- */
- public void updateFilterString(ISystemFilterString filterString, String newValue)
- {
- filterString.setString(newValue);
- }
-
- /**
- * Delete a filter string from this filter's list.
- * @return the SystemFilterString object deleted, or null if not found
- */
- public ISystemFilterString removeFilterString(String oldString)
- {
- java.util.List strings = internalGetFilterStrings();
- ISystemFilterString match = null;
- Iterator i = strings.iterator();
- while ((match==null) && (i.hasNext()))
- {
- ISystemFilterString currstring = (ISystemFilterString)i.next();
- if (currstring.getString().equals(oldString))
- match = currstring;
- }
- if (match!=null)
- {
- strings.remove(match);
- invalidateCache();
- }
- return match;
- }
-
- /**
- * Remove a filter string from this filter's list, given its zero-based position
- * @return the SystemFilterString object deleted, or null if not found
- */
- public ISystemFilterString removeFilterString(int position)
- {
- java.util.List strings = internalGetFilterStrings();
- if (position >= strings.size())
- return null;
- ISystemFilterString filterString = (ISystemFilterString)strings.get(position);
- strings.remove(position);
- invalidateCache();
- return filterString;
- }
-
- /**
- * Remove a filter string from this filter's list, given its SystemFilterString object.
- * @return true if the given string existed and hence was deleted.
- */
- public boolean removeFilterString(ISystemFilterString filterString)
- {
- java.util.List strings = internalGetFilterStrings();
- if (strings.contains(filterString))
- {
- strings.remove(filterString);
- invalidateCache();
- return true;
- }
- else
- return false;
- }
- /**
- * Move a given filter string to a given zero-based location
- */
- public void moveSystemFilterString(int pos, ISystemFilterString filterString)
- {
- //FIXME internalGetFilterStrings().move(pos,filterString);
- invalidateCache();
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Return the children of this filter.
- * This is all nested filters and all filter strings.
- */
- public Object[] getChildren()
- {
- Vector strings = getFilterStringsVector();
- Vector filters = getSystemFiltersVector();
- Vector vChildren = new Vector();
-
- // start with nested filters...
- for (int idx=0; idx < filters.size(); idx++)
- vChildren.addElement(filters.elementAt(idx));
- // continue with resolved filter string objects...
- for (int idx=0; idx < strings.size(); idx++)
- {
- String filterString = (String)strings.elementAt(idx);
- vChildren.addElement(filterString);
- }
-
- // convert whole thing to an array...
- Object[] children = new Object[vChildren.size()];
- for (int idx=0; idx<vChildren.size(); idx++)
- children[idx] = vChildren.elementAt(idx);
-
- return children;
- }
-
- /**
- * Returns true if this filter has any nested filters or any filter strings
- */
- public boolean hasChildren()
- {
- if (internalGetFilterStrings().size() > 0)
- return true;
- else
- return helpers.hasSystemFilters(internalGetFilters());
- }
-
- /**
- * Return the caller which instantiated the filter pool manager overseeing this filter framework instance
- */
- public ISystemFilterPoolManagerProvider getProvider()
- {
- ISystemFilterPoolManager mgr = getSystemFilterPoolManager();
- if (mgr != null)
- return mgr.getProvider();
- else
- return null;
- }
-
- /**
- * Return the filter pool manager managing this collection of filter pools and their filters.
- * To save space, we delegate this query to our parent filter pool.
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager()
- {
- ISystemFilterPool pool = getParentFilterPool();
- if (pool != null)
- return pool.getSystemFilterPoolManager();
- else
- return null;
- }
-
- // -----------------------
- // SAVE/RESTORE METHODS...
- // -----------------------
-
-
-
-
-
- /**
- * Restore specific filter. Used when save policy is SAVE_POLICY_ONE_FILE_PER_FILTER
- * @param mofHelpers helper object with routines for saving/restoring using mof.
- * @param folder the folder containing the saved file.
- * @param name The name of the saved filter. The file name is derived from this.
- * @param parentPool the SystemFilterPool that is the parent of this filter. Will be perpetuated to nested filters.
- * @param namingPolicy Tells us how to derive file name from filter name. Can be null for default prefix name.
- * @return SystemFilter object if restored ok, null if error encountered. If null, call getLastException().
- */
- public static ISystemFilter restore(IFolder folder, String name, ISystemFilterPool parentPool,
- IRSEFilterNamingPolicy namingPolicy)
- throws Exception
- {
- /* FIXME
- String fileName = getRootSaveFileName(namingPolicy, name);
-
- java.util.List ext = mofHelpers.restore(folder,fileName);
-
- // should be exactly one...
- Iterator iList = ext.iterator();
- SystemFilter filter = (SystemFilter)iList.next();
- if (parentPool != null)
- filter.setParentFilterPool(parentPool);
- ((SystemFilterImpl)filter).initializeFilterStrings();
- return filter;
- */
- return null;
- }
-
-
- /**
- * Return the root save file name without the extension .xmi
- */
- protected static String getRootSaveFileName(ISystemFilter filter)
- {
- return getRootSaveFileName(getNamingPolicy(filter), filter.getName());
- }
- /**
- * Return the root save file name without the extension .xmi
- */
- protected static String getRootSaveFileName(IRSEFilterNamingPolicy namingPolicy, String name)
- {
- return namingPolicy.getFilterSaveFileName(name);
- }
-
-
- /**
- * Return naming policy
- */
- protected static IRSEFilterNamingPolicy getNamingPolicy(ISystemFilter filter)
- {
- return filter.getParentFilterPool().getNamingPolicy();
- }
-
-
-
- /**
- * Ensure given path ends with path separator.
- */
- public static String addPathTerminator(String path)
- {
- if (!path.endsWith(File.separator))
- path = path + File.separatorChar;
- //else
- // path = path;
- return path;
- }
-
- /**
- * Return string identifying this filter
- */
- public String toString()
- {
- return getName();
- }
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getName()
- {
- return name;
- }
-
- public String getDescription()
- {
- return SystemResources.RESID_MODELOBJECTS_FILTER_DESCRIPTION;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setName(String newName)
- {
- name = newName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setType(String newType)
- {
- type = newType;
- _isDirty = true;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isSupportsNestedFilters()
- {
- return supportsNestedFilters;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setSupportsNestedFilters(boolean newSupportsNestedFilters)
- {
- boolean oldSupportsNestedFilters = supportsNestedFilters;
- if (oldSupportsNestedFilters != newSupportsNestedFilters)
- {
- supportsNestedFilters = newSupportsNestedFilters;
- setDirty(true);
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * When saving one filter per file, this captures this filter's relative order
- * within the pool, as the file system cannot capture this.
- */
- public int getRelativeOrder()
- {
- return relativeOrder;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRelativeOrder(int newRelativeOrder)
- {
- relativeOrder = newRelativeOrder;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Is this a vendor-supplied filter versus a user-defined filter
- */
- public boolean isDefault()
- {
- return default_;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDefault(boolean newDefault)
- {
- default_ = newDefault;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setStringsCaseSensitive(boolean newStringsCaseSensitive)
- {
- boolean oldStringsCaseSensitive = stringsCaseSensitive;
- if (oldStringsCaseSensitive != newStringsCaseSensitive)
- {
- stringsCaseSensitive = newStringsCaseSensitive;
- setDirty(true);
- }
-
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void unsetStringsCaseSensitive()
- {
- boolean oldStringsCaseSensitive = stringsCaseSensitive;
- if (oldStringsCaseSensitive != STRINGS_CASE_SENSITIVE_EDEFAULT)
- {
- stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT;
- setDirty(true);
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean isSetStringsCaseSensitive()
- {
- return stringsCaseSensitive;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * If true, the user is prompted when this filter is expanded
- */
- public boolean isPromptable()
- {
- return promptable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setPromptable(boolean newPromptable)
- {
- promptable = newPromptable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public ISystemFilter getParentFilter()
- {
- //FIXME
- return _parentFilter;
- //if (eContainerFeatureID != FiltersPackage.SYSTEM_FILTER__PARENT_FILTER) return null;
- //return (SystemFilter)eContainer;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setParentFilter(ISystemFilter newParentFilter)
- {
- _parentFilter = newParentFilter;
- /* FIXME
- if (newParentFilter != eContainer || (eContainerFeatureID != FiltersPackage.SYSTEM_FILTER__PARENT_FILTER && newParentFilter != null))
- {
- if (EcoreUtil.isAncestor(this, newParentFilter))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newParentFilter != null)
- msgs = ((InternalEObject)newParentFilter).eInverseAdd(this, FiltersPackage.SYSTEM_FILTER__NESTED_FILTERS, SystemFilter.class, msgs);
- msgs = eBasicSetContainer((InternalEObject)newParentFilter, FiltersPackage.SYSTEM_FILTER__PARENT_FILTER, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FiltersPackage.SYSTEM_FILTER__PARENT_FILTER, newParentFilter, newParentFilter));
- */
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public java.util.List getNestedFilters()
- {
- if (nestedFilters == null)
- {
- nestedFilters = new ArrayList();
- //FIXME new EObjectContainmentWithInversejava.util.List(SystemFilter.class, this, FiltersPackage.SYSTEM_FILTER__NESTED_FILTERS, FiltersPackage.SYSTEM_FILTER__PARENT_FILTER);
- }
- return nestedFilters;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public java.util.List getStrings()
- {
- if (strings == null)
- {
- strings = new ArrayList();
- //FIXME new EObjectContainmenteList(SystemFilterString.class, this, FiltersPackage.SYSTEM_FILTER__STRINGS);
- }
- return strings;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isSupportsDuplicateFilterStrings()
- {
- return supportsDuplicateFilterStrings;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setSupportsDuplicateFilterStrings(boolean newSupportsDuplicateFilterStrings)
- {
- boolean oldSupportsDuplicateFilterStrings = supportsDuplicateFilterStrings;
- if (oldSupportsDuplicateFilterStrings != newSupportsDuplicateFilterStrings)
- {
- supportsDuplicateFilterStrings = newSupportsDuplicateFilterStrings;
- setDirty(true);
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isNonDeletable()
- {
- return nonDeletable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setNonDeletable(boolean newNonDeletable)
- {
- nonDeletable = newNonDeletable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isNonRenamable()
- {
- return nonRenamable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setNonRenamable(boolean newNonRenamable)
- {
- nonRenamable = newNonRenamable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isNonChangable()
- {
- return nonChangable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setNonChangable(boolean newNonChangable)
- {
- nonChangable = newNonChangable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Are the filter strings within this filter non-changable by the user. If true,
- * strings can be deleted, added, edited or reordered.
- */
- public boolean isStringsNonChangable()
- {
- return stringsNonChangable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setStringsNonChangable(boolean newStringsNonChangable)
- {
- boolean oldStringsNonChangable = stringsNonChangable;
- if (oldStringsNonChangable != newStringsNonChangable)
- {
- stringsNonChangable = newStringsNonChangable;
- setDirty(true);
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * In what release was this created? Typically, will be the version and release
- * times 10, as in 40 or 51.
- */
- public int getRelease()
- {
- return release;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRelease(int newRelease)
- {
- release = newRelease;
- }
-
- /**
- * Returns true if this filter is limited to a single filter string. If not set here,
- * it is queried from the parent pool.
- */
- public boolean isSingleFilterStringOnly()
- {
- if (isSetSingleFilterStringOnly())
- return singleFilterStringOnly;
- else
- return getSystemFilterPool().isSingleFilterStringOnly();
- }
-
- public boolean isSingleFilterStringOnlyGen()
- {
- return singleFilterStringOnly;
- }
-
- public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly)
- {
- boolean oldSingleFilterStringOnly = singleFilterStringOnly;
- if (oldSingleFilterStringOnly != newSingleFilterStringOnly)
- {
- singleFilterStringOnly = newSingleFilterStringOnly;
- setDirty(true);
- }
- }
-
-
- public void unsetSingleFilterStringOnly()
- {
- boolean oldSingleFilterStringOnly = singleFilterStringOnly;
- if (oldSingleFilterStringOnly != SINGLE_FILTER_STRING_ONLY_EDEFAULT)
- {
- singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT;
- setDirty(true);
- }
-
- }
-
- public boolean isSetSingleFilterStringOnly()
- {
- return singleFilterStringOnly;
- }
-
- public boolean commit()
- {
- return RSEUIPlugin.getThePersistenceManager().commit(this);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerCommonMethods.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerCommonMethods.java
deleted file mode 100644
index c02678cf9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerCommonMethods.java
+++ /dev/null
@@ -1,570 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.filters;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * This class abstracts out some common code needed by any class that
- * implements ISystemFilterContainer.
- * <p>
- * This class supports two overloaded version of each method. One that
- * takes a MOF java.util.List for the filter list, and one that takes a Vector for
- * the filter list. This is to offer seamless flexibility in how the filters
- * are stored internally.
- */
-public class SystemFilterContainerCommonMethods
- //implements ISystemFilterContainer
-{
- private Vector filterNameVector, filterVector;
- private ISystemFilter[] filterArray;
-
- /**
- * Constructor
- */
- public SystemFilterContainerCommonMethods()
- {
- super();
- }
-
-
- /**
- * For performance reasons we have decided to store a cache of the
- * filters in vector and array form, so each request will not result
- * in a new temporary vector or array. However, this cache can get out
- * of date, so this method must be called religiously to invalidate it
- * after any change in the filters.
- */
- public void invalidateCache()
- {
- filterNameVector = filterVector = null;
- filterArray = null;
- }
-
- /**
- * Creates a new system filter within this pool or filter.
- * @param filters MOF list of filters the new filter is to be added to.
- * @param parentPool pool that contains this filter (directly or indirectly).
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- */
- public ISystemFilter createSystemFilter(java.util.List filters,
- ISystemFilterPool parentPool,
- String aliasName, Vector filterStrings)
- {
- ISystemFilter newFilter = null;
-
- // FIXME - not using error message and null return
- // because I want to restore filters while not being hit with conflicts
- newFilter = getSystemFilter(filters, aliasName);
- if (newFilter != null)
- {
- return newFilter;
- }
- /* DKM
- boolean exists = getSystemFilter(filters, aliasName) != null;
- if (exists)
- {
- String msg = "Error creating filter: aliasName " + aliasName + " is not unique"; // no need to xlate, internal only
- RSEUIPlugin.logError(msg);
- return null;
- }
- */
- newFilter = internalCreateSystemFilter(parentPool, aliasName, filterStrings);
- if (newFilter != null)
- internalAddSystemFilter(filters, newFilter);
- return newFilter;
- }
- /**
- * Creates a new system filter within this pool or filter.
- * @param filters Vector of filters the new filter is to be added to.
- * @param parentPool pool that contains this filter (directly or indirectly)
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- */
- public ISystemFilter createSystemFilter(Vector filters,
- ISystemFilterPool parentPool,
- String aliasName, Vector filterStrings)
- {
- ISystemFilter newFilter = null;
- boolean exists = getSystemFilter(filters, aliasName) != null;
- if (exists)
- {
- String msg = "Error creating filter: aliasName " + aliasName + " is not unique"; // no need to xlate, internal only //$NON-NLS-1$ //$NON-NLS-2$
- SystemBasePlugin.logError(msg);
- return null;
- }
- newFilter = internalCreateSystemFilter(parentPool, aliasName, filterStrings);
- if (newFilter != null)
- internalAddSystemFilter(filters, newFilter);
- return newFilter;
- }
-
-
- /**
- * Internal encapsulation of mof effort to create new filter, and setting of
- * the core attributes.
- */
- private ISystemFilter internalCreateSystemFilter(
- ISystemFilterPool parentPool,
- String aliasName, Vector filterStrings)
- {
- ISystemFilter newFilter = null;
- try
- {
- newFilter = new SystemFilter();
- // FIXME getMOFfactory().createSystemFilter();
- newFilter.setRelease(SystemResources.CURRENT_RELEASE);
- newFilter.setName(aliasName);
- newFilter.setParentFilterPool(parentPool);
- if (filterStrings != null)
- newFilter.setFilterStrings(filterStrings);
- //java.util.List filterStringList = newFilter.getFilterStrings();
- //for (int idx=0; idx<filterStrings.size(); idx++)
- //{
- //SystemFilterString string = getMOFfactory().createSystemFilterString();
- //string.setString((String)filterStrings.elementAt(idx));
- //filterStringList.add(string);
- //}
- } catch (Exception e)
- {
- SystemBasePlugin.logError("Error creating filter: " + e.getClass().getName() + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
- SystemBasePlugin.logError("...Alias name.: " + aliasName); //$NON-NLS-1$
-
- //e.printStackTrace();
- }
- return newFilter;
- }
-
-
- /**
- * Return Vector of String objects: the names of existing filters in this container.
- * Needed by name validators for New and Rename actions to verify new name is unique.
- */
- public Vector getSystemFilterNames(java.util.List filters)
- {
- if ((filterNameVector == null) || (filterNameVector.size() != filters.size()))
- {
- filterNameVector = new Vector();
- if (filters == null)
- return filterNameVector;
- Iterator i = filters.iterator();
- while (i.hasNext())
- {
- ISystemFilter next = (ISystemFilter)i.next();
- filterNameVector.addElement(next.getName());
- }
- }
- return filterNameVector;
- }
-
- /**
- * Return Vector of String objects: the names of existing filters in this container.
- * Needed by name validators for New and Rename actions to verify new name is unique.
- */
- public Vector getSystemFilterNames(Vector filters)
- {
- if ((filterNameVector == null) || (filterNameVector.size() != filters.size()))
- {
- Vector filterNameVector = new Vector();
- if ((filters == null) || (filters.size()==0))
- return filterNameVector;
- for (int idx=0; idx<filters.size(); idx++)
- {
- ISystemFilter next = (ISystemFilter)filters.elementAt(idx);
- filterNameVector.addElement(next.getName());
- }
- }
- return filterNameVector;
- }
-
-
- /**
- * Return the nested filters as a Vector
- */
- public Vector getSystemFiltersVector(java.util.List filters)
- {
- if ((filterVector == null) || (filterVector.size() != filters.size()))
- {
- filterVector = new Vector();
- Iterator i = filters.iterator();
- while (i.hasNext())
- filterVector.addElement(i.next());
- }
- return filterVector;
- }
- /**
- * Return the nested filters as a Vector
- */
- public Vector getSystemFiltersVector(Vector filters)
- {
- return filters;
- }
-
- /**
- * Return the nested filters as an array
- */
- public ISystemFilter[] getSystemFilters(java.util.List filters)
- {
- if ((filterArray == null) || (filterArray.length != filters.size()))
- {
- filterArray = new ISystemFilter[filters.size()];
- Iterator i = filters.iterator();
- int idx = 0;
- while (i.hasNext())
- filterArray[idx++]=(ISystemFilter)(i.next());
- }
- return filterArray;
- //return null;
- }
- /**
- * Return the filters as an array
- */
- public ISystemFilter[] getSystemFilters(Vector filters)
- {
- if (filters == null)
- return null;
- if ((filterArray == null) || (filterArray.length != filters.size()))
- {
- filterArray = new ISystemFilter[filters.size()];
- for (int idx=0; idx<filters.size(); idx++)
- filterArray[idx]=(ISystemFilter)(filters.elementAt(idx));
- }
- return filterArray;
- }
-
- /**
- * Return how many filters are defined in this filter container
- */
- public int getSystemFilterCount(java.util.List filters)
- {
- int nbrChildren = (filters == null) ? 0 : filters.size();
- return nbrChildren;
- }
-
- /**
- * Return how many filters are defined in this filter container
- */
- public int getSystemFilterCount(Vector filters)
- {
- int nbrChildren = (filters == null) ? 0 : filters.size();
- return nbrChildren;
- }
-
- /**
- * Return true if there are system filters
- */
- public boolean hasSystemFilters(java.util.List filters)
- {
- return (filters!=null) && (filters.size()>0);
- }
- /**
- * Return true if there are system filters
- */
- public boolean hasSystemFilters(Vector filters)
- {
- return (filters!=null) && (filters.size()>0);
- }
-
-
- /**
- * Return a filter object, given its aliasname.
- * Can be used to test if an aliasname is already used (non-null return).
- * @param aliasName unique aliasName (case insensitive) to search on.
- * @return SystemFilter object with unique aliasName, or null if
- * no filter object with this name exists.
- */
- public ISystemFilter getSystemFilter(java.util.List filters, String aliasName)
- {
- ISystemFilter filter = null;
- ISystemFilter currFilter = null;
- Iterator i = filters.iterator();
- while (i.hasNext() && (filter==null))
- {
- currFilter = (ISystemFilter)i.next();
- if (currFilter.getName().equalsIgnoreCase(aliasName))
- filter = currFilter;
- }
- return filter;
- }
- /**
- * Return a filter object, given its aliasname.
- * Can be used to test if an aliasname is already used (non-null return).
- * @param aliasName unique aliasName (case insensitive) to search on.
- * @return SystemFilter object with unique aliasName, or null if
- * no filter object with this name exists.
- */
- public ISystemFilter getSystemFilter(Vector filters, String aliasName)
- {
- if ((filters == null) || (filters.size()==0))
- return null;
- ISystemFilter filter = null;
- ISystemFilter currFilter = null;
- for (int idx=0; (idx<filters.size()) && (filter==null); idx++)
- {
- currFilter = (ISystemFilter)filters.elementAt(idx);
- if (currFilter.getName().equalsIgnoreCase(aliasName))
- filter = currFilter;
- }
- return filter;
- }
-
-
- /**
- * Adds given filter to the list.
- * <p>PLEASE NOTE:
- * <ul>
- * <li> createSystemFilter calls this method for you!
- * <li> this is a no-op if a filter with the same aliasname already exists
- * </ul>
- * @param filter SystemFilter object to add
- * @return true if added, false if filter with this aliasname already existed.
- */
- public boolean addSystemFilter(java.util.List filters, ISystemFilter filter)
- {
- boolean exists = getSystemFilter(filters, filter.getName()) != null;
- if (!exists)
- return internalAddSystemFilter(filters, filter);
- else
- return false;
- }
- /**
- * Internally, we can skip the uniqueness checking.
- */
- protected boolean internalAddSystemFilter(java.util.List filters, ISystemFilter filter)
- {
- filters.add(filter);
- invalidateCache();
- return true;
- }
- /**
- * Adds given filter to the list.
- * <p>PLEASE NOTE:
- * <ul>
- * <li> createSystemFilter calls this method for you!
- * <li> this is a no-op if a filter with the same aliasname already exists
- * </ul>
- * @param filter SystemFilter object to add
- * @return true if added, false if filter with this aliasname already existed.
- */
- public boolean addSystemFilter(Vector filters, ISystemFilter filter)
- {
- boolean exists = getSystemFilter(filters, filter.getName()) != null;
- if (!exists)
- return internalAddSystemFilter(filters, filter);
- else
- return false;
- }
- /**
- * Internally, we can skip the uniqueness checking.
- */
- private boolean internalAddSystemFilter(Vector filters, ISystemFilter filter)
- {
- filters.add(filter);
- invalidateCache();
- return true;
- }
-
-
-
- /**
- * Removes a given filter from the list.
- * Does NOT follow references to remove them.
- * @param filters MOF list to remove from
- * @param filter SystemFilter object to remove
- */
- public void deleteSystemFilter(java.util.List filters, ISystemFilter filter)
- {
- filters.remove(filter);
- invalidateCache();
- }
- /**
- * Renames a given filter from the list.
- * @param filters java.util.List list
- * @param filter SystemFilter object to rename
- * @param newName new name to give filter
- */
- public void renameSystemFilter(java.util.List filters, ISystemFilter filter, String newName)
- {
- filter.setName(newName);
- invalidateCache();
- }
-
- /**
- * Removes a given filter from the list.
- * Does NOT follow references to remove them.
- * @param filters Vector list to remove from
- * @param filter SystemFilter object to remove
- */
- public void deleteSystemFilter(Vector filters, ISystemFilter filter)
- {
- filters.remove(filter);
- invalidateCache();
- }
- /**
- * Renames a given filter from the list.
- * @param filters Vector list
- * @param filter SystemFilter object to rename
- * @param newName new name to give filter
- */
- public void renameSystemFilter(Vector filters, ISystemFilter filter, String newName)
- {
- filter.setName(newName);
- invalidateCache();
- }
- /**
- * Updates a given filter in the list.
- * @param filters Vector list
- * @param filter SystemFilter object to update
- * @param newName new name to give filter
- * @param newString new strings to give filter
- */
- public void updateSystemFilter(Vector filters, ISystemFilter filter, String newName, String[] newStrings)
- {
- filter.setName(newName);
- filter.setFilterStrings(newStrings);
- invalidateCache();
- }
- /**
- * Updates a given filter in the list.
- * @param filters java.util.List list
- * @param filter SystemFilter object to update
- * @param newName new name to give filter
- * @param newString new strings to give filter
- */
- public void updateSystemFilter(java.util.List filters, ISystemFilter filter, String newName, String[] newStrings)
- {
- filter.setName(newName);
- filter.setFilterStrings(newStrings);
- invalidateCache();
- }
- /**
- * Duplicates a given filter in the list.
- * @param filters MOF list of filters into which to place the clone
- * @param filter SystemFilter object to clone
- * @param aliasName New, unique, alias name to give this filter. Clone will fail if this is not unique.
- */
- public ISystemFilter cloneSystemFilter(java.util.List filters, ISystemFilter filter, String aliasName)
- {
-
- ISystemFilter copy =
- createSystemFilter(filters, filter.getParentFilterPool(),
- aliasName, filter.getFilterStringsVector());
- internalAfterCloneSystemFilter(filter, copy);
- // now clone nested filters...
- ISystemFilter[] nested = filter.getSystemFilters();
- if ((nested!=null) && (nested.length>0))
- for (int idx=0; idx<nested.length; idx++)
- {
-
- }
- return copy;
- }
- /**
- * Duplicates a given filter in the list.
- * @param filters Vector of filters into which to place the clone
- * @param filter SystemFilter object to clone
- * @param aliasName New, unique, alias name to give this filter. Clone will fail if this is not unique.
- */
- public ISystemFilter cloneSystemFilter(Vector filters, ISystemFilter filter, String aliasName)
- {
-
- ISystemFilter copy =
- createSystemFilter(filters, filter.getParentFilterPool(),
- aliasName, filter.getFilterStringsVector());
- internalAfterCloneSystemFilter(filter, copy);
- // now clone nested filters...
- ISystemFilter[] nested = filter.getSystemFilters();
- if ((nested!=null) && (nested.length>0))
- for (int idx=0; idx<nested.length; idx++)
- {
-
- }
- return copy;
- }
-
- /**
- * Does core effort to populate a filter clone with non-core attributes
- * @param oldFilter SystemFilter original filter
- * @param newFilter SystemFilter that is new
- */
- public void internalAfterCloneSystemFilter(ISystemFilter oldFilter, ISystemFilter newFilter)
- {
- newFilter.setParentFilterPool(oldFilter.getParentFilterPool());
- newFilter.setSupportsNestedFilters(oldFilter.isSupportsNestedFilters());
- newFilter.setType(oldFilter.getType());
- newFilter.setDefault(oldFilter.isDefault());
- newFilter.setRelativeOrder(oldFilter.getRelativeOrder());
- }
-
- /**
- * Return a given filter's zero-based location
- */
- public int getSystemFilterPosition(java.util.List filters, ISystemFilter filter)
- {
- int position = -1;
- Iterator i = filters.iterator();
- for (int idx=0; (position<0) && (idx < filters.size()); idx++)
- {
- ISystemFilter currFilter = (ISystemFilter)i.next();
- if (currFilter.getName().equals(filter.getName()))
- position = idx;
- }
- return position;
- }
- /**
- * Return a given filter's zero-based location
- */
- public int getSystemFilterPosition(Vector filters, ISystemFilter filter)
- {
- int position = -1;
- for (int idx=0; (position<0) && (idx < filters.size()); idx++)
- {
- ISystemFilter currFilter = (ISystemFilter)filters.elementAt(idx);
- if (currFilter.getName().equals(filter.getName()))
- position = idx;
- }
- return position;
- }
-
-
- /**
- * Move a given filter to a given zero-based location
- */
- public void moveSystemFilter(java.util.List filters, int pos, ISystemFilter filter)
- {
- //FIXME filters.move(pos,filter);
- invalidateCache();
- }
- /**
- * Move a given filter to a given zero-based location
- */
- public void moveSystemFilter(Vector filters, int pos, ISystemFilter filter)
- {
- filters.remove(filter);
- filters.insertElementAt(filter, pos);
- invalidateCache();
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerReferenceCommonMethods.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerReferenceCommonMethods.java
deleted file mode 100644
index 1df9c4a6a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerReferenceCommonMethods.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.filters;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterContainerReference;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.filters.SystemFilterReference;
-
-
-
-/**
- * Both SystemFilter and SystemFilterPool contain filters, so the
- * common methods for filters are abstracted out in SystemFilterContainer,
- * which both classes implement.
- * Both SystemFilterReference and SystemFilterPoolReference hold references
- * to SystemFilterContainer objects (either SystemFilter or SystemFilterPool).
- * There are a couple of methods that are common to both classes, related to
- * getting an array of references to the filters that are held by the referenced
- * object.
- * This class offers an implementation of those common methods, and both
- * SystemFilterReferenceImpl and SystemFilterPoolReferenceImpl use this via
- * containment.
- */
-public class SystemFilterContainerReferenceCommonMethods
-{
- private ISystemFilterContainerReference parentRef = null;
- private ISystemFilterReference[] referencedFilters = null;
-
- /**
- * Constructor
- * @param parentRef the object we are helping.
- */
- public SystemFilterContainerReferenceCommonMethods(ISystemFilterContainerReference parentRef)
- {
- super();
- this.parentRef = parentRef;
- }
-
- /**
- * Return the name of the SystemFilter or SystemFilterPool that we reference.
- */
- public String getName()
- {
- ISystemFilterContainer parent = parentRef.getReferencedSystemFilterContainer();
- String name = null;
- if (parent instanceof ISystemFilterPool)
- name = ((ISystemFilterPool)parent).getName();
- else
- name = ((ISystemFilter)parent).getName();
- return name;
- }
-
- /**
- * Return true if the referenced pool or filter has filters.
- */
- public boolean hasFilters()
- {
- return getFilterCount() > 0;
- }
-
- /**
- * Return count of the number of filters in the referenced pool or filter
- */
- public int getFilterCount()
- {
- int count = 0;
- ISystemFilterContainer parent = parentRef.getReferencedSystemFilterContainer();
- java.util.List mofList = null;
- if (parent instanceof ISystemFilterPool)
- mofList = ((ISystemFilterPool)parent).getFilters();
- else
- mofList = ((ISystemFilter)parent).getNestedFilters();
- if (mofList != null)
- count = mofList.size();
- return count;
- }
-
- /**
- * Get the list of nested filters referenced by this ISystemFilterContainerReference.
- */
- public ISystemFilterReference[] getSystemFilterReferences(ISubSystem subSystem)
- {
-
- // These reference objects are built on the fly, each time, rather than
- // maintaining a persisted list of such references. The reason
- // is we do not at this time allow users to subset the master list
- // of filters maintained by a filterpool. Hence, we always simply
- // return a complete list. However, to save memory we try to only
- // re-gen the list if something has changed.
- ISystemFilterContainer parent = parentRef.getReferencedSystemFilterContainer();
- List mofList = null;
- if (parent instanceof ISystemFilterPool)
- mofList = ((ISystemFilterPool)parent).getFilters();
- else if (parent instanceof ISystemFilter) {
- mofList = ((ISystemFilter)parent).getNestedFilters();
- }
- boolean needToReGen = compareFilters(mofList);
- //System.out.println("In getSFRefs for " + getName() + ": regen? " + needToReGen);
-
- if (needToReGen)
- {
- // first, need remove backward references...
-
- // second, build new references...
- referencedFilters = generateFilterReferences(subSystem, mofList);
- }
- if (referencedFilters == null) {
- referencedFilters = new ISystemFilterReference[0];
- }
- return referencedFilters;
- }
-
- /**
- * To save memory, we try to only regenerate the referenced filter list
- * if something has changed.
- */
- private boolean compareFilters(java.util.List newFilters)
- {
- boolean mustReGen = false;
- if (newFilters == null)
- {
- if (referencedFilters != null)
- return true;
- else
- return false;
- }
- else if (referencedFilters == null)
- {
- return true; // newFilters != null && referencedFilters == null
- }
- // both old and new are non-null
- if (newFilters.size() != referencedFilters.length)
- return true;
- Iterator i = newFilters.iterator();
- for (int idx=0; !mustReGen && (idx<referencedFilters.length); idx++)
- {
- ISystemFilter newFilter = (ISystemFilter)i.next();
- if (referencedFilters[idx].getReferencedFilter() != newFilter)
- mustReGen = true;
- }
- return mustReGen;
- }
-
-
- /**
- * To save the memory of an intermediate array, we create the filter references
- * directly from the MOF model...
- */
- private ISystemFilterReference[] generateFilterReferences(ISubSystem subSystem, java.util.List newFilters)
- {
- if (newFilters == null)
- return null;
- ISystemFilterReference[] oldRefs = referencedFilters;
- ISystemFilterReference[] refs = new ISystemFilterReference[newFilters.size()];
- Iterator i = newFilters.iterator();
- int idx = 0;
- while (i.hasNext())
- {
- ISystemFilter filter = (ISystemFilter)i.next();
-
- boolean foundOldOne = false;
-
- // DKM - first check if we already have a reference for this
- if (oldRefs != null)
- {
- for (int o = 0; o < oldRefs.length && !foundOldOne; o++)
- {
- ISystemFilterReference oRef = oldRefs[o];
- if (oRef.getReferencedFilter() == filter)
- {
- refs[idx++] = oRef;
- foundOldOne = true;
- }
- }
- }
- if (!foundOldOne)
- {
- refs[idx++] = generateFilterReference(subSystem, filter);
- }
- }
- return refs;
- }
-
-
- /**
- * Create a single filter refererence
- */
- public ISystemFilterReference generateFilterReference( ISubSystem subSystem, ISystemFilter filter)
- {
- return SystemFilterReference.createSystemFilterReference(subSystem, parentRef, filter, SystemFilterReference.PERSISTENT_NO);
- }
- /**
- * Create a single filter refererence and append it to the end of the list.
- * This will first check if there already is a reference to the given filter and if so
- * will simply return it.
- */
- public ISystemFilterReference generateAndRecordFilterReference(ISubSystem subSystem, ISystemFilter filter)
- {
- getSystemFilterReferences(subSystem); // regenerate all references if needed
- ISystemFilterReference sfr = getExistingSystemFilterReference(subSystem, filter);
- if (sfr == null) // still no reference exist?
- {
- /* */
- sfr = generateFilterReference(subSystem, filter);
- int currLength = 0;
- if (referencedFilters != null)
- currLength = referencedFilters.length;
- int newLength = currLength + 1;
- ISystemFilterReference[] newRefs = new ISystemFilterReference[newLength];
- for (int idx=0; idx<currLength; idx++)
- {
- newRefs[idx] = referencedFilters[idx];
- }
- newRefs[newLength-1] = sfr;
- referencedFilters = newRefs;
-
- }
- return sfr;
- }
- /**
- * Return an existing reference to a given system filter.
- * If no reference currently exists to this filter, returns null.
- */
- public ISystemFilterReference getExistingSystemFilterReference(ISubSystem subSystem, ISystemFilter filter)
- {
- ISystemFilterReference ref = null;
- ISystemFilterReference[] refs = referencedFilters;
- if ((refs != null) && (refs.length>0))
- {
- for (int idx=0; (ref==null) && (idx<refs.length); idx++)
- {
- ISystemFilterReference aref = refs[idx];
- if (aref.getReferencedFilter() == filter && aref.getSubSystem() == subSystem)
- ref = aref;
- }
- }
- return ref;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReference.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReference.java
deleted file mode 100644
index bacb428f5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReference.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.filters;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterContainerReference;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.references.SystemPersistableReferencingObject;
-import org.eclipse.rse.model.SystemRegistry;
-
-/**
- * A reference to a filter pool. A reference may be "resolved" or "unresolved".
- */
-public class SystemFilterPoolReference extends SystemPersistableReferencingObject implements ISystemFilterPoolReference, ISystemFilterContainerReference, IAdaptable {
-
- private SystemFilterContainerReferenceCommonMethods containerHelper = null;
- private ISystemFilterPoolManager filterPoolManager = null;
- public static final String DELIMITER = "___"; //$NON-NLS-1$
- public static final int DELIMITER_LENGTH = 3;
-
- /**
- * Default constructor.
- */
- private SystemFilterPoolReference() {
- super();
- containerHelper = new SystemFilterContainerReferenceCommonMethods(this);
- }
-
- /**
- * Constructs a new resolved filter pool reference.
- * @param filterPool The filter pool that this filter will refer to.
- */
- public SystemFilterPoolReference(ISystemFilterPool filterPool) {
- this();
- setReferenceToFilterPool(filterPool);
- }
-
- /**
- * Constructs a new filter pool reference. This is an unresolved reference.
- * It is resolved on first use by using the supplied filterPoolManager.
- * @param filterPoolManager the manager used to resolve the reference.
- * @param filterPoolName the name of the filter pool.
- */
- public SystemFilterPoolReference(ISystemFilterPoolManager filterPoolManager, String filterPoolName) {
- this();
- this.filterPoolManager = filterPoolManager;
- setReferencedObjectName(filterPoolName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolReference#getFilterPoolReferenceManager()
- */
- public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager() {
- return (ISystemFilterPoolReferenceManager) getParentReferenceManager();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolReference#getProvider()
- */
- public ISystemFilterPoolReferenceManagerProvider getProvider() {
- ISystemFilterPoolReferenceManager mgr = getFilterPoolReferenceManager();
- if (mgr != null)
- return mgr.getProvider();
- else
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapterType) {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolReference#getReferencedFilterPoolName()
- */
- public String getReferencedFilterPoolName() {
- String savedName = super.getReferencedObjectName();
- String poolName = null;
- int idx = savedName.indexOf(DELIMITER);
- if (idx >= 0)
- poolName = savedName.substring(idx + DELIMITER_LENGTH);
- else
- poolName = savedName;
- return poolName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolReference#getReferencedFilterPoolManagerName()
- */
- public String getReferencedFilterPoolManagerName() {
- String savedName = super.getReferencedObjectName();
- String mgrName = null;
- int idx = savedName.indexOf(DELIMITER);
- if (idx >= 0)
- mgrName = savedName.substring(0, idx);
- else
- mgrName = savedName;
- return mgrName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolReference#resetReferencedFilterPoolName(java.lang.String)
- */
- public void resetReferencedFilterPoolName(String newName) {
- super.setReferencedObjectName(newName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolReference#setReferenceToFilterPool(org.eclipse.rse.core.filters.ISystemFilterPool)
- */
- public void setReferenceToFilterPool(ISystemFilterPool pool) {
- super.setReferencedObject(pool);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolReference#getReferencedFilterPool()
- */
- public ISystemFilterPool getReferencedFilterPool() {
- ISystemFilterPool filterPool = (ISystemFilterPool) getReferencedObject();
- if (filterPool == null) {
- String filterPoolName = getReferencedFilterPoolName();
- filterPool = filterPoolManager.getSystemFilterPool(filterPoolName);
- if (filterPool == null) {
- Pattern p = Pattern.compile("(^.*):"); //$NON-NLS-1$
- Matcher m = p.matcher(filterPoolName);
- if (m.find()) {
- String profileName = m.group(1);
- ISystemProfile profile = SystemRegistry.getSystemRegistry().getSystemProfile(profileName);
- if (profile != null) {
- ISystemFilterPool[] pools = profile.getFilterPools();
- for (int i = 0; i < pools.length && filterPool == null; i++) {
- ISystemFilterPool pool = pools[i];
- if (filterPoolName.equals(pool.getName())) filterPool = pool;
- }
- }
- }
- }
- if (filterPool != null) {
- setReferenceToFilterPool(filterPool);
- }
- }
- setReferenceBroken(filterPool == null);
- return filterPool;
- }
-
- // -------------------------------------------------------------
- // Methods common with SystemFilterPoolReferenceImpl, and hence
- // abstracted out into SystemFilterContainerReference...
- // -------------------------------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterContainerReference#getReferencedSystemFilterContainer()
- */
- public ISystemFilterContainer getReferencedSystemFilterContainer() {
- return getReferencedFilterPool();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterContainerReference#getSystemFilterReferences(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public ISystemFilterReference[] getSystemFilterReferences(ISubSystem subSystem) {
- return containerHelper.getSystemFilterReferences(subSystem);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterContainerReference#getSystemFilterReference(org.eclipse.rse.core.subsystems.ISubSystem, org.eclipse.rse.core.filters.ISystemFilter)
- */
- public ISystemFilterReference getSystemFilterReference(ISubSystem subSystem, ISystemFilter filter) {
- //return containerHelper.generateFilterReference(filter);
- return containerHelper.generateAndRecordFilterReference(subSystem, filter);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterContainerReference#getExistingSystemFilterReference(org.eclipse.rse.core.subsystems.ISubSystem, org.eclipse.rse.core.filters.ISystemFilter)
- */
- public ISystemFilterReference getExistingSystemFilterReference(ISubSystem subSystem, ISystemFilter filter) {
- return containerHelper.getExistingSystemFilterReference(subSystem, filter);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterContainerReference#hasFilters()
- */
- public boolean hasFilters() {
- return containerHelper.hasFilters();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterContainerReference#getFilterCount()
- */
- public int getFilterCount() {
- return containerHelper.getFilterCount();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEModelObject#getName()
- */
- public String getName() {
- return getReferencedFilterPoolName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolReference#getFullName()
- */
- public String getFullName() {
- return super.getReferencedObjectName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.persistance.IRSEPersistableContainer#commit()
- */
- public boolean commit() {
- return false;
- // return RSEUIPlugin.getThePersistenceManager().commit(getProvider().);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterString.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterString.java
deleted file mode 100644
index bf23ea5e3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterString.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.filters;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterConstants;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.internal.references.SystemReferencedObjectHelper;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * This represents a filter string within a filter. Filters can hold one or more filter strings.
- */
-/**
- * @lastgen class SystemFilterStringImpl Impl implements SystemFilterString, IAdaptable {}
- */
-public class SystemFilterString extends RSEModelObject implements ISystemFilterString, IAdaptable
-{
- private ISystemFilter parentFilter;
- protected SystemReferencedObjectHelper helper = null;
-
- /**
- * The default value of the '{@link #getString() <em>String</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getString()
- * @generated
- * @ordered
- */
- protected static final String STRING_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String string = STRING_EDEFAULT;
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final String TYPE_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String type = TYPE_EDEFAULT;
- /**
- * The default value of the '{@link #isDefault() <em>Default</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isDefault()
- * @generated
- * @ordered
- */
- protected static final boolean DEFAULT_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean default_ = DEFAULT_EDEFAULT;
-/**
- * Constructor. Do not instantiate yourself! Let MOF do it!
- */
- protected SystemFilterString()
- {
- super();
- helper = new SystemReferencedObjectHelper(this);
- }
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Set the transient parent back-pointer. Called by framework at restore/create time.
- */
- public void setParentSystemFilter(ISystemFilter filter)
- {
- this.parentFilter = filter;
- }
- /**
- * Get the parent filter that contains this filter string.
- */
- public ISystemFilter getParentSystemFilter()
- {
- return parentFilter;
- }
- /**
- * Return the caller which instantiated the filter pool manager overseeing this filter framework instance
- */
- public ISystemFilterPoolManagerProvider getProvider()
- {
- if (parentFilter != null)
- return parentFilter.getProvider();
- else
- return null;
- }
- /**
- * Return the filter pool manager managing this collection of filter pools and their filters and their filter strings.
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager()
- {
- if (parentFilter != null)
- return parentFilter.getSystemFilterPoolManager();
- else
- return null;
- }
- /**
- * Returns the type attribute. Intercepted to return SystemFilterConstants.DEFAULT_TYPE if it is currently null
- */
- public String getType()
- {
- String type = this.getTypeGen();
- if (type == null)
- return ISystemFilterConstants.DEFAULT_TYPE;
- else
- return type;
- }
- /**
- * Clones this filter string's attributes into the given filter string
- */
- public void clone(ISystemFilterString targetString)
- {
- String ourString = getString();
- if (ourString != null)
- targetString.setString(new String(ourString));
- targetString.setType(getTypeGen());
- targetString.setDefault(isDefault());
- }
-
- /**
- * Is this filter string changable? Depends on mof attributes of parent filter
- */
- public boolean isChangable()
- {
- boolean enable = !getParentSystemFilter().isNonChangable() &&
- !getParentSystemFilter().isStringsNonChangable();
- return enable;
- }
-
- // ----------------------------------
- // IRSEReferencedObject methods...
- // ----------------------------------
- /**
- * Add a reference, increment reference count, return new count
- * @return new count of how many referencing objects reference this object.
- */
- public int addReference(IRSEBaseReferencingObject ref)
- {
- return helper.addReference(ref);
- }
- /**
- * Remove a reference, decrement reference count, return new count
- * @return new count of how many referencing objects reference this object.
- */
- public int removeReference(IRSEBaseReferencingObject ref)
- {
- return helper.removeReference(ref);
- }
- /**
- * Return a count of how many referencing objects reference this object.
- */
- public int getReferenceCount()
- {
- return helper.getReferenceCount();
- }
- /**
- * Clear the list of referenced objects.
- */
- public void removeAllReferences()
- {
- helper.removeAllReferences();
- }
- /**
- * Return a list of all referencing objects of this object
- */
- public IRSEBaseReferencingObject[] getReferencingObjects()
- {
- return helper.getReferencingObjects();
- }
-
-
- public String getName()
- {
- return getString();
- }
-
- public String getDescription()
- {
- return SystemResources.RESID_MODELOBJECTS_FILTERSTRING_DESCRIPTION;
- }
-
- public String getString()
- {
- return string;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setString(String newString)
- {
- string = newString;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setType(String newType)
- {
- type = newType;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Is this a vendor-supplied filter string versus a user-defined filter string
- */
- public boolean isDefault()
- {
- return default_;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDefault(boolean newDefault)
- {
- default_ = newDefault;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString()
- {
-
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (string: "); //$NON-NLS-1$
- result.append(string);
- result.append(", type: "); //$NON-NLS-1$
- result.append(type);
- result.append(", default: "); //$NON-NLS-1$
- result.append(default_);
- result.append(')');
- return result.toString();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Allows tools to have typed filter strings
- */
- public String getTypeGen()
- {
- return type;
- }
-
- public boolean commit()
- {
- return RSEUIPlugin.getThePersistenceManager().commit(getParentSystemFilter());
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterStringReference.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterStringReference.java
deleted file mode 100644
index 2fb852a24..000000000
--- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterStringReference.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.filters;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.filters.ISystemFilterStringReference;
-import org.eclipse.rse.core.references.IRSEBaseReferencedObject;
-import org.eclipse.rse.internal.references.SystemReferencingObjectHelper;
-
-/**
- * A reference to a system filter string.
- */
-public class SystemFilterStringReference
- implements ISystemFilterStringReference, IAdaptable
-{
- protected ISystemFilterReference parent;
- protected ISystemFilter parentFilter;
- protected SystemReferencingObjectHelper helper = null;
- protected boolean referenceBroken = false;
-
- /**
- * Constructor for SystemFilterStringReferenceImpl
- * @param parentRef The parent filter reference for this filter string reference.
- * @param referencedString The filter string we reference
- */
- public SystemFilterStringReference(ISystemFilterReference parentRef, ISystemFilterString referencedString)
- {
- super();
- parent = parentRef;
- helper = new SystemReferencingObjectHelper(this);
- setReferencedObject(referencedString);
- }
- /**
- * Constructor for SystemFilterStringReferenceImpl when starting with filter vs filter reference parent
- * <p>
- * we are not yet ready to make this available.
- * @param parentFilter The parent filter for this filter string reference.
- * @param referencedString The filter string we reference
- */
- protected SystemFilterStringReference(ISystemFilter parentFilter, ISystemFilterString referencedString)
- {
- super();
- this.parentFilter = parentFilter;
- helper = new SystemReferencingObjectHelper(this);
- setReferencedObject(referencedString);
- }
-
-
- /**
- * Return the reference manager which is managing this filter reference
- * framework object.
- */
- public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager()
- {
- if (parent != null)
- return parent.getFilterPoolReferenceManager();
- return null;
- }
-
- /**
- * Return the object which instantiated the pool reference manager object.
- * Makes it easy to get back to the point of origin, given any filter reference
- * framework object
- */
- public ISystemFilterPoolReferenceManagerProvider getProvider()
- {
- ISystemFilterPoolReferenceManager mgr = getFilterPoolReferenceManager();
- if (mgr != null)
- return mgr.getProvider();
- else
- return null;
- }
-
- /**
- * @see ISystemFilterStringReference#getReferencedFilterString()
- */
- public ISystemFilterString getReferencedFilterString()
- {
- return (ISystemFilterString)getReferencedObject();
- }
-
- /**
- * Same as getReferencedFilterString().getString()
- */
- public String getString()
- {
- return getReferencedFilterString().getString();
- }
-
-
- /**
- * @see ISystemFilterStringReference#getParent()
- */
- public ISystemFilterReference getParent()
- {
- return parent;
- }
- /**
- * @see ISystemFilterStringReference#getParentSystemFilter()
- */
- public ISystemFilter getParentSystemFilter()
- {
- if (parentFilter != null)
- return parentFilter;
- else if (parent != null)
- return parent.getReferencedFilter();
- else
- return null;
- }
-
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- * By default this returns Platform.getAdapterManager().getAdapter(this, adapterType);
- * This in turn results in the default subsystem adapter SystemViewSubSystemAdapter,
- * in package org.eclipse.rse.ui.view.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
- // ----------------------------------------------
- // IRSEReferencingObject methods...
- // ----------------------------------------------
-
- /**
- * @see org.eclipse.rse.core.references.IRSEBaseReferencingObject#setReferencedObject(IRSEBaseReferencedObject)
- */
- public void setReferencedObject(IRSEBaseReferencedObject obj)
- {
- helper.setReferencedObject(obj);
- }
-
- /**
- * @see org.eclipse.rse.core.references.IRSEBaseReferencingObject#getReferencedObject()
- */
- public IRSEBaseReferencedObject getReferencedObject()
- {
- return helper.getReferencedObject();
- }
-
- /**
- * @see org.eclipse.rse.core.references.IRSEBaseReferencingObject#removeReference()
- */
- public int removeReference()
- {
- return helper.removeReference();
- }
-
- /**
- * Set to true if this reference is currently broken/unresolved
- */
- public void setReferenceBroken(boolean broken)
- {
- referenceBroken = broken;
- }
-
- /**
- * Return true if this reference is currently broken/unresolved
- */
- public boolean isReferenceBroken()
- {
- return referenceBroken;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/new.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/new.gif
deleted file mode 100644
index 7aea894d0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/new.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newconnection_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newconnection_wiz.gif
deleted file mode 100644
index 9f2b4acc7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newconnection_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfile_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfile_wiz.gif
deleted file mode 100644
index 9d050885b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfile_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilter_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilter_wiz.gif
deleted file mode 100644
index 8f0d32338..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilter_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpool_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpool_wiz.gif
deleted file mode 100644
index 8ea8d0682..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpool_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpoolref_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpoolref_wiz.gif
deleted file mode 100644
index c7e1f632c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfilterpoolref_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfolder_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfolder_wiz.gif
deleted file mode 100644
index a8a5e026c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newfolder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newprofile_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newprofile_wiz.gif
deleted file mode 100644
index 23df1b6e9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/ctool16/newprofile_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/commands_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/commands_view.gif
deleted file mode 100644
index 093c6bad0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/commands_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/editor.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/editor.gif
deleted file mode 100644
index 007e98dc7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/editor.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/errorlist_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/errorlist_view.gif
deleted file mode 100644
index cc87d38aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/errorlist_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/resourceRef_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/resourceRef_obj.gif
deleted file mode 100644
index f84a67a35..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/resourceRef_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_persp.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_persp.gif
deleted file mode 100644
index 592d46f7b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_persp.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_view.gif
deleted file mode 100644
index c3fe221a1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/system_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/team_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/team_view.gif
deleted file mode 100644
index 88c056795..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/cview16/team_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/cancelshell.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/cancelshell.gif
deleted file mode 100644
index 7667d04db..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/cancelshell.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clear.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clear.gif
deleted file mode 100644
index 9ff641606..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clear.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearall.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearall.gif
deleted file mode 100644
index ecd1be568..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearall.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearselected.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearselected.gif
deleted file mode 100644
index 559e46298..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/clearselected.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/combine_tsk.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/combine_tsk.gif
deleted file mode 100644
index 19c801ccc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/combine_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/compile.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/compile.gif
deleted file mode 100644
index 264b1c492..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/compile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/convertarchive_tsk.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/convertarchive_tsk.gif
deleted file mode 100644
index 7f94599ee..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/convertarchive_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/deletereference.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/deletereference.gif
deleted file mode 100644
index 59a2eaa65..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/deletereference.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/down.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/down.gif
deleted file mode 100644
index 8aacf959d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/down.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/editfilter.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/editfilter.gif
deleted file mode 100644
index e2a2e5d76..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/editfilter.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/exportshellhistory.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/exportshellhistory.gif
deleted file mode 100644
index 9013ca140..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/exportshellhistory.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/exportshelloutput.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/exportshelloutput.gif
deleted file mode 100644
index b6df7b27c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/exportshelloutput.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/lock.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/lock.gif
deleted file mode 100644
index 877953859..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/lock.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeProfileActive.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeProfileActive.gif
deleted file mode 100644
index af79ce2c5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeProfileActive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeprofileinactive.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeprofileinactive.gif
deleted file mode 100644
index 529948039..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/makeprofileinactive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/monitor_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/monitor_view.gif
deleted file mode 100644
index ba6a24bba..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/monitor_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/move.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/move.gif
deleted file mode 100644
index d906a0579..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/move.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/removeshell.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/removeshell.gif
deleted file mode 100644
index 91d5e8af4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/removeshell.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/rename.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/rename.gif
deleted file mode 100644
index 68ca27ad4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/rename.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/run.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/run.gif
deleted file mode 100644
index a252bf0ae..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/run.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremovealll.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremovealll.gif
deleted file mode 100644
index ecd1be568..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremovealll.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremoveselected.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremoveselected.gif
deleted file mode 100644
index 559e46298..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/searchremoveselected.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectpool.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectpool.gif
deleted file mode 100644
index d67529a48..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectpool.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectprofile.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectprofile.gif
deleted file mode 100644
index 6186a6a2e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/selectprofile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/stop.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/stop.gif
deleted file mode 100644
index 0810f4984..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/stop.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/systemprofile.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/systemprofile.gif
deleted file mode 100644
index 8460315b5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/systemprofile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/up.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/up.gif
deleted file mode 100644
index 38841abe9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/up.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithcompilecmds.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithcompilecmds.gif
deleted file mode 100644
index f0e084939..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithcompilecmds.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithfilterpools.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithfilterpools.gif
deleted file mode 100644
index 5a6564319..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithfilterpools.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithnamedtypes.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithnamedtypes.gif
deleted file mode 100644
index 3541e3da3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithnamedtypes.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithuseractions.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithuseractions.gif
deleted file mode 100644
index f485bbe5b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithuseractions.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/xtrctarchv_tsk.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/xtrctarchv_tsk.gif
deleted file mode 100644
index cd1b9da3b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/xtrctarchv_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/xtrctarchvto_tsk.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/xtrctarchvto_tsk.gif
deleted file mode 100644
index 97c110aaa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/xtrctarchvto_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/export_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/export_wiz.gif
deleted file mode 100644
index bc5feb446..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/export_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/import_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/import_wiz.gif
deleted file mode 100644
index 4802d3f4b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/import_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/new.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/new.gif
deleted file mode 100644
index f656481e0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/new.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newconnection_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newconnection_wiz.gif
deleted file mode 100644
index 5d9eae9e5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newconnection_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfile_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfile_wiz.gif
deleted file mode 100644
index 8c682c0d4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfile_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilter_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilter_wiz.gif
deleted file mode 100644
index 0d6206c61..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilter_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpool_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpool_wiz.gif
deleted file mode 100644
index 75e721c2a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpool_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpoolref_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpoolref_wiz.gif
deleted file mode 100644
index 089f1c598..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfilterpoolref_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfolder_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfolder_wiz.gif
deleted file mode 100644
index da261845f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newfolder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newprofile_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newprofile_wiz.gif
deleted file mode 100644
index a896c3f0d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/newprofile_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmotejar_expt.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmotejar_expt.gif
deleted file mode 100644
index b09005c54..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmotejar_expt.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmotejar_impt.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmotejar_impt.gif
deleted file mode 100644
index 647f3d8e0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmotejar_impt.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtarchv_exp.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtarchv_exp.gif
deleted file mode 100644
index 4668049ee..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtarchv_exp.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtarchv_imp.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtarchv_imp.gif
deleted file mode 100644
index 49851c4c3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtarchv_imp.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtexp.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtexp.gif
deleted file mode 100644
index 263f72181..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtexp.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtimp.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtimp.gif
deleted file mode 100644
index c85145e78..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/rmtimp.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/systemshowintable.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/systemshowintable.gif
deleted file mode 100644
index 6550bc127..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/dtool16/systemshowintable.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/cancelshell.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/cancelshell.gif
deleted file mode 100644
index 355ab40f0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/cancelshell.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clear.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clear.gif
deleted file mode 100644
index 6bc10f9d0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clear.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearall.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearall.gif
deleted file mode 100644
index 28a3785aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearall.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearselected.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearselected.gif
deleted file mode 100644
index 2cd9c5444..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/clearselected.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/combine_tsk.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/combine_tsk.gif
deleted file mode 100644
index 66c548654..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/combine_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/compile.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/compile.gif
deleted file mode 100644
index c88993a29..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/compile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/convertarchive_tsk.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/convertarchive_tsk.gif
deleted file mode 100644
index caeae140a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/convertarchive_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/deletereference.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/deletereference.gif
deleted file mode 100644
index 0057debd4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/deletereference.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/down.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/down.gif
deleted file mode 100644
index 7731ffde2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/down.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/editfilter.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/editfilter.gif
deleted file mode 100644
index b8eaf34c8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/editfilter.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/exportshellhistory.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/exportshellhistory.gif
deleted file mode 100644
index d3255916c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/exportshellhistory.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/exportshelloutput.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/exportshelloutput.gif
deleted file mode 100644
index dae1880fc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/exportshelloutput.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/lock.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/lock.gif
deleted file mode 100644
index a3374adb7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/lock.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileactive.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileactive.gif
deleted file mode 100644
index da0f78267..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileactive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileinactive.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileinactive.gif
deleted file mode 100644
index facfebf11..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/makeprofileinactive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/monitor_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/monitor_view.gif
deleted file mode 100644
index e3ecc5535..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/monitor_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/move.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/move.gif
deleted file mode 100644
index 2edee9a0e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/move.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/refresh_nav.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/refresh_nav.gif
deleted file mode 100755
index 049cac696..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/refresh_nav.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/removeshell.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/removeshell.gif
deleted file mode 100644
index 6f6296256..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/removeshell.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/rename.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/rename.gif
deleted file mode 100644
index aeccbfd8c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/rename.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/run.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/run.gif
deleted file mode 100644
index 57f410224..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/run.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveall.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveall.gif
deleted file mode 100644
index 28a3785aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveall.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveselected.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveselected.gif
deleted file mode 100644
index 2cd9c5444..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/searchremoveselected.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectpool.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectpool.gif
deleted file mode 100644
index bd50599c7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectpool.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectprofile.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectprofile.gif
deleted file mode 100644
index 9da8bff09..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/selectprofile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/stop.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/stop.gif
deleted file mode 100644
index 8583717aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/stop.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemprofile.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemprofile.gif
deleted file mode 100644
index c09179981..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemprofile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemshowintable.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemshowintable.gif
deleted file mode 100644
index 2fef26ef5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/systemshowintable.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/up.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/up.gif
deleted file mode 100644
index 4d6db172e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/up.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithcompilecmds.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithcompilecmds.gif
deleted file mode 100644
index 9f48bb796..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithcompilecmds.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithfilterpools.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithfilterpools.gif
deleted file mode 100644
index c0df17ece..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithfilterpools.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithnamedtypes.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithnamedtypes.gif
deleted file mode 100644
index 521951457..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithnamedtypes.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithuseractions.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithuseractions.gif
deleted file mode 100644
index 6a22ca85f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithuseractions.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/xtrctarchv_tsk.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/xtrctarchv_tsk.gif
deleted file mode 100644
index cf71970ae..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/xtrctarchv_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/xtrctarchvto_tsk.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/xtrctarchvto_tsk.gif
deleted file mode 100644
index 96e52b151..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/xtrctarchvto_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/archive_export.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/archive_export.gif
deleted file mode 100644
index f08164b67..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/archive_export.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/archive_import.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/archive_import.gif
deleted file mode 100644
index db388005a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/archive_import.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/export_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/export_wiz.gif
deleted file mode 100644
index 130ec8190..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/export_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/import_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/import_wiz.gif
deleted file mode 100644
index d3886945b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/import_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/jar_export.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/jar_export.gif
deleted file mode 100644
index 46301af68..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/jar_export.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/jar_import.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/jar_import.gif
deleted file mode 100644
index 9eb8facdd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/jar_import.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/new.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/new.gif
deleted file mode 100644
index 7aea894d0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/new.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newconnection_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newconnection_wiz.gif
deleted file mode 100644
index 9f2b4acc7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newconnection_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfile_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfile_wiz.gif
deleted file mode 100644
index 9d050885b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfile_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilter_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilter_wiz.gif
deleted file mode 100644
index 8f0d32338..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilter_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpool_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpool_wiz.gif
deleted file mode 100644
index 8ea8d0682..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpool_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpoolref_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpoolref_wiz.gif
deleted file mode 100644
index c7e1f632c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfilterpoolref_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfolder_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfolder_wiz.gif
deleted file mode 100644
index a8a5e026c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newfolder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newprofile_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newprofile_wiz.gif
deleted file mode 100644
index 23df1b6e9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/newprofile_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/systemshowintable.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/systemshowintable.gif
deleted file mode 100644
index 2fef26ef5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/etool16/systemshowintable.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/commands_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/commands_view.gif
deleted file mode 100644
index 093c6bad0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/commands_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/editor.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/editor.gif
deleted file mode 100644
index 007e98dc7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/editor.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/errorlist_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/errorlist_view.gif
deleted file mode 100644
index cc87d38aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/errorlist_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_persp.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_persp.gif
deleted file mode 100644
index 592d46f7b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_persp.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_view.gif
deleted file mode 100644
index c3fe221a1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/system_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/team_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/team_view.gif
deleted file mode 100644
index 88c056795..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/eview16/team_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/misc/IBM_logo.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/misc/IBM_logo.gif
deleted file mode 100644
index 0345b794d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/misc/IBM_logo.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/IBM_logo.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/IBM_logo.gif
deleted file mode 100644
index 0345b794d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/IBM_logo.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowdown_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowdown_obj.gif
deleted file mode 100644
index a492838d2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowdown_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowup_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowup_obj.gif
deleted file mode 100644
index 38b1a85ca..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/arrowup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_ibm_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_ibm_obj.gif
deleted file mode 100644
index c7a0c3fc2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_ibm_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_ibmuser_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_ibmuser_obj.gif
deleted file mode 100644
index 1c277194b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_ibmuser_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_new_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_new_obj.gif
deleted file mode 100644
index cfcaaea00..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_new_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_user_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_user_obj.gif
deleted file mode 100644
index 25692da4b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/compcmd_user_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/connectorservice_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/connectorservice_obj.gif
deleted file mode 100644
index 41f0158c1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/connectorservice_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/error.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/error.gif
deleted file mode 100644
index 85ec26bb8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/error.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/exportshellhistory.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/exportshellhistory.gif
deleted file mode 100644
index f4ec50b5d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/exportshellhistory.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/exportshelloutput.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/exportshelloutput.gif
deleted file mode 100644
index 0270198bd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/exportshelloutput.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/info.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/info.gif
deleted file mode 100644
index 2da001e3e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/info.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/key.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/key.gif
deleted file mode 100644
index 9886b3a12..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/key.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/launcher_config_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/launcher_config_obj.gif
deleted file mode 100644
index fe296f652..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/launcher_config_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/properties_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/properties_obj.gif
deleted file mode 100644
index 6223cfcb2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/properties_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/service_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/service_obj.gif
deleted file mode 100644
index 8fb844f5b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/service_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/ssl_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/ssl_obj.gif
deleted file mode 100644
index 8e3d48a63..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/ssl_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system390Live_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system390Live_obj.gif
deleted file mode 100644
index 2cc459a37..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system390Live_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system390_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system390_obj.gif
deleted file mode 100644
index 9c11dd7e4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system390_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system400_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system400_obj.gif
deleted file mode 100644
index 76f4e22d0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system400_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system400live_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system400live_obj.gif
deleted file mode 100644
index 6186873b5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system400live_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_persp.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_persp.gif
deleted file mode 100644
index 592d46f7b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_persp.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_search.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_search.gif
deleted file mode 100644
index e8038543c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/system_search.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemaix_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemaix_obj.gif
deleted file mode 100644
index d6dcde08b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemaix_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemaixlive_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemaixlive_obj.gif
deleted file mode 100644
index 6bc478ae6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemaixlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemblank.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemblank.gif
deleted file mode 100644
index 45b759436..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemblank.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcancel.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcancel.gif
deleted file mode 100644
index 44b0c27de..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcancel.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommands_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommands_obj.gif
deleted file mode 100644
index 4b42e5702..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommandslive_obj.gif
deleted file mode 100644
index 8710ab849..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnection.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnection.gif
deleted file mode 100644
index e8efe69dc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnection.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnectionlive.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnectionlive.gif
deleted file mode 100644
index f97fa6b48..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemconnectionlive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemempty.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemempty.gif
deleted file mode 100644
index bc8e66c20..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemempty.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvar.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvar.gif
deleted file mode 100644
index bf043f959..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvar.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvarlibpath.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvarlibpath.gif
deleted file mode 100644
index 51e703b1b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvarlibpath.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvarpath.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvarpath.gif
deleted file mode 100644
index 51e703b1b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemenvvarpath.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfailed.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfailed.gif
deleted file mode 100644
index f476936c4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfailed.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfile.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfile.gif
deleted file mode 100644
index a966159d9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfiles_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfiles_obj.gif
deleted file mode 100644
index 9d35f1728..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfiles_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfileslive_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfileslive_obj.gif
deleted file mode 100644
index 5d5686979..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfileslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilter.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilter.gif
deleted file mode 100644
index bcf191a65..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilter.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterpool.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterpool.gif
deleted file mode 100644
index 5ba35b0d2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterpool.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterstring.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterstring.gif
deleted file mode 100644
index 86fe0cdfd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfilterstring.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfolder.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfolder.gif
deleted file mode 100644
index 5ae555a34..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemfolder.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemhelp.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemhelp.gif
deleted file mode 100644
index 7f6cdedcd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemhelp.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systeminfo.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systeminfo.gif
deleted file mode 100644
index 745b884ff..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systeminfo.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemjobs_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemjobs_obj.gif
deleted file mode 100644
index 49a2abf2c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemjobs_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemjobslive_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemjobslive_obj.gif
deleted file mode 100644
index f81c05aec..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemjobslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinux_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinux_obj.gif
deleted file mode 100644
index 7b5a98e0b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinux_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinuxlive_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinuxlive_obj.gif
deleted file mode 100644
index f337d8bf6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlinuxlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocal_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocal_obj.gif
deleted file mode 100644
index d60c188ca..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocal_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocallive_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocallive_obj.gif
deleted file mode 100644
index ba10dec0a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemlocallive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemok.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemok.gif
deleted file mode 100644
index 9cacb96dc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemok.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprocess.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprocess.gif
deleted file mode 100644
index 1ea6ec1f0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprocess.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile.gif
deleted file mode 100644
index 0324b75c7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile_active.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile_active.gif
deleted file mode 100644
index da0f78267..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemprofile_active.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdrive.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdrive.gif
deleted file mode 100644
index fd426343b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdrive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdriveopen.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdriveopen.gif
deleted file mode 100644
index 2171f7c38..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemrootdriveopen.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemsearchresult.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemsearchresult.gif
deleted file mode 100644
index 77bbe12aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemsearchresult.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemshell.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemshell.gif
deleted file mode 100644
index 15e833644..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemshell.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemshelllive.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemshelllive.gif
deleted file mode 100644
index a3f79194a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemshelllive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunix_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunix_obj.gif
deleted file mode 100644
index 18afe87ac..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunix_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunixlive_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunixlive_obj.gif
deleted file mode 100644
index cd8c312d4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemunixlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwin_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwin_obj.gif
deleted file mode 100644
index 0a2efbbed..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwin_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwinlive_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwinlive_obj.gif
deleted file mode 100644
index 6abee6378..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/systemwinlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_ibm_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_ibm_obj.gif
deleted file mode 100644
index 802d0ebe8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_ibm_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_ibm_user_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_ibm_user_obj.gif
deleted file mode 100644
index 15d6f4ba8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_ibm_user_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_new_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_new_obj.gif
deleted file mode 100644
index b595eb20b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_new_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_obj.gif
deleted file mode 100644
index 556c02836..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_action_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_new_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_new_obj.gif
deleted file mode 100644
index 8055a95de..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_new_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_obj.gif
deleted file mode 100644
index 8d1885ba6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_user_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_user_obj.gif
deleted file mode 100644
index 19ef4a224..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_ibm_user_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_new_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_new_obj.gif
deleted file mode 100644
index 823609da2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_new_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_obj.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_obj.gif
deleted file mode 100644
index 2ecef415f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/user_type_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/warning.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/warning.gif
deleted file mode 100644
index 2f1c5a8fa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/obj16/warning.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/ovr16/error_ovr.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/ovr16/error_ovr.gif
deleted file mode 100644
index 119dcccd5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/ovr16/error_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/commands_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/view16/commands_view.gif
deleted file mode 100644
index 093c6bad0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/commands_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/editor.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/view16/editor.gif
deleted file mode 100644
index 007e98dc7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/editor.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/errorlist_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/view16/errorlist_view.gif
deleted file mode 100644
index cc87d38aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/errorlist_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/fastopen.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/view16/fastopen.gif
deleted file mode 100644
index 7802b6dce..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/fastopen.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/scratchpad_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/view16/scratchpad_view.gif
deleted file mode 100644
index 121a5a024..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/scratchpad_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_persp.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_persp.gif
deleted file mode 100644
index 592d46f7b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_persp.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_view.gif
deleted file mode 100644
index c3fe221a1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/system_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/team_view.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/view16/team_view.gif
deleted file mode 100644
index 88c056795..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/view16/team_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/export_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/export_wiz.gif
deleted file mode 100644
index 41a782321..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/export_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/import_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/import_wiz.gif
deleted file mode 100644
index caffb689e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/import_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newconnection_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newconnection_wiz.gif
deleted file mode 100644
index 6a4a5ef6b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newconnection_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfile_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfile_wiz.gif
deleted file mode 100644
index 4bd5f404b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfile_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilter_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilter_wiz.gif
deleted file mode 100644
index 3c50d7d7d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilter_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilterpool_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilterpool_wiz.gif
deleted file mode 100644
index 217623040..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfilterpool_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfolder_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfolder_wiz.gif
deleted file mode 100644
index 68c5ca493..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newfolder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newprofile_wiz.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newprofile_wiz.gif
deleted file mode 100644
index 5f4263dda..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/newprofile_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmote_exprt.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmote_exprt.gif
deleted file mode 100644
index 2d1e70525..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmote_exprt.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmote_imprt.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmote_imprt.gif
deleted file mode 100644
index 17409c779..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmote_imprt.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotearchv_exprt.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotearchv_exprt.gif
deleted file mode 100644
index f2b39c527..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotearchv_exprt.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotearchv_imprt.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotearchv_imprt.gif
deleted file mode 100644
index 82f052791..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotearchv_imprt.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotejar_exprt.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotejar_exprt.gif
deleted file mode 100644
index d51c1dbf8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotejar_exprt.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotejar_imprt.gif b/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotejar_imprt.gif
deleted file mode 100644
index 7d43b7ed0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/icons/full/wizban/rmotejar_imprt.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.ui/messageFile.dtd b/rse/plugins/org.eclipse.rse.ui/messageFile.dtd
deleted file mode 100644
index 2f6a27b1f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/messageFile.dtd
+++ /dev/null
@@ -1,22 +0,0 @@
-<!ELEMENT Component (Subcomponent+)>
-<!ATTLIST Component
- Abbr ID #REQUIRED
- Name CDATA #REQUIRED
->
-<!ELEMENT LevelOne (#PCDATA)>
-<!ELEMENT LevelTwo (#PCDATA)>
-<!ELEMENT Message (LevelOne, LevelTwo)>
-<!ATTLIST Message
- ID CDATA #REQUIRED
- Indicator (I | E | W | U | Q | C) #REQUIRED
->
-<!ELEMENT MessageFile (Component)>
-<!ATTLIST MessageFile
- Version CDATA #FIXED "1.0"
->
-<!ELEMENT MessageList (Message+)>
-<!ELEMENT Subcomponent (MessageList)>
-<!ATTLIST Subcomponent
- Abbr ID #REQUIRED
- Name CDATA #REQUIRED
->
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/Host.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/Host.java
deleted file mode 100644
index 581535852..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/Host.java
+++ /dev/null
@@ -1,684 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-
-import java.util.Locale;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemHostPool;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-/**
- * A single connection object.
- */
-public class Host extends RSEModelObject implements IHost, IAdaptable
-{
-
- /**
- * The default value of the '{@link #getSystemType() <em>System Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSystemType()
- * @generated
- * @ordered
- */
- protected static final String SYSTEM_TYPE_EDEFAULT = null;
-
- private boolean ucId = true;
- private boolean userIdCaseSensitive = true;
- private ISystemHostPool pool;
- protected String previousUserIdKey;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String systemType = SYSTEM_TYPE_EDEFAULT;
- /**
- * The default value of the '{@link #getAliasName() <em>Alias Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAliasName()
- * @generated
- * @ordered
- */
- protected static final String ALIAS_NAME_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String aliasName = ALIAS_NAME_EDEFAULT;
- /**
- * The default value of the '{@link #getHostName() <em>Host Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHostName()
- * @generated
- * @ordered
- */
- protected static final String HOST_NAME_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String hostName = HOST_NAME_EDEFAULT;
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * The default value of the '{@link #getDefaultUserId() <em>Default User Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefaultUserId()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_USER_ID_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String defaultUserId = DEFAULT_USER_ID_EDEFAULT;
- /**
- * The default value of the '{@link #isPromptable() <em>Promptable</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isPromptable()
- * @generated
- * @ordered
- */
- protected static final boolean PROMPTABLE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean promptable = PROMPTABLE_EDEFAULT;
- /**
- * The default value of the '{@link #isOffline() <em>Offline</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isOffline()
- * @generated
- * @ordered
- */
- protected static final boolean OFFLINE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isOffline() <em>Offline</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isOffline()
- * @generated
- * @ordered
- */
- protected boolean offline = OFFLINE_EDEFAULT;
-
- protected ISystemProfile _profile;
-
- /**
- * Constructor
- */
- protected Host(ISystemProfile profile)
- {
- super();
- _profile = profile;
- }
- /**
- * Set the parent connection pool this is owned by.
- * Connection pools are internal management objects, one per profile.
- */
- public void setHostPool(ISystemHostPool pool)
- {
- this.pool = pool;
- previousUserIdKey = getPreferencesKey();
- }
- /**
- * Set the parent connection pool this is owned by.
- * Connection pools are internal management objects, one per profile.
- */
- public ISystemHostPool getHostPool()
- {
- return pool;
- }
-
- /**
- * Return all the connector services provided for this host
- */
- public IConnectorService[] getConnectorServices()
- {
- return RSEUIPlugin.getTheSystemRegistry().getConnectorServices(this);
- }
-
- /**
- * Return the subsystem instances under this connection.<br>
- * Just a shortcut to {@link org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(IHost)}
- */
- public ISubSystem[] getSubSystems()
- {
- return RSEUIPlugin.getTheSystemRegistry().getSubSystems(this);
- }
-
-
-
- /**
- * Private method called when this connection is being deleted, so
- * we can do any pre-death cleanup we need.
- * <p>
- * What we need to do is delete our entry in the preference store for our default userId.
- */
- public void deletingHost()
- {
- String oldUserId = null;
- if (previousUserIdKey != null)
- oldUserId = getLocalDefaultUserId(previousUserIdKey);
- // if the userId attribute held a preference store key of the form profileName.connectionName,
- // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
- // value (the actual user id) the old keyed entry held.
- if (oldUserId != null)
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- prefMgr.clearUserId(previousUserIdKey);
- }
- }
- /**
- * Private method called when this connection's profile is being rename, so
- * we can do any pre-death cleanup we need.
- * <p>
- * What we need to do is rename our entry in the preference store for our default userId.
- */
- public void renamingSystemProfile(String oldName, String newName)
- {
- String userIdValue = null;
- if (previousUserIdKey!=null)
- userIdValue = getLocalDefaultUserId(previousUserIdKey);
- // if the userId attribute held a preference store key of the form profileName.connectionName,
- // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
- // value (the actual user id) the old keyed entry held.
- String newKey = getPreferencesKey(newName, getAliasName());
- if ((userIdValue != null) && (userIdValue.length()>0))
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- prefMgr.clearUserId(previousUserIdKey);
- prefMgr.setUserId(newKey, userIdValue); // store old value with new preference key
- }
- previousUserIdKey = newKey;
- }
-
- /**
- * Return the system profile that owns this connection
- */
- public ISystemProfile getSystemProfile()
- {
- return _profile;
- }
- /**
- * Return the name of system profile that owns this connection
- */
- public String getSystemProfileName()
- {
- if (pool == null)
- return null;
- else
- {
- ISystemProfile profile = pool.getSystemProfile();
- if (profile!=null)
- return profile.getName();
- else
- return null;
- }
- }
-
- /**
- * Intercept of setAliasName so we can potentially rename the default-user-id key
- * for the preferences store. That key is profileName.connectionAliasName so is
- * affected when the alias name changes.
- */
- public void setAliasName(String newName)
- {
- String userIdValue = null;
- if (previousUserIdKey != null)
- userIdValue = getLocalDefaultUserId(previousUserIdKey);
- this.setAliasNameGen(newName); // update mof-modelled attribute
- // if the userId attribute held a preference store key of the form profileName.connectionAliasName,
- // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
- // value (the actual user id) the old keyed entry held.
- String newKey = getPreferencesKey(getSystemProfileName(), newName);
- if ((userIdValue != null) && (userIdValue.length()>0))
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- prefMgr.clearUserId(previousUserIdKey);
- prefMgr.setUserId(newKey, userIdValue); // store old value with new preference key
- }
- previousUserIdKey = newKey;
- }
- /**
- * Intercept of setSystemType so we can decide if the user ID is case sensitive
- */
- public void setSystemType(String systemType)
- {
- // defect 43219
- if (systemType != null)
- {
- boolean forceUC = systemType.equals(IRSESystemType.SYSTEMTYPE_ISERIES);
- boolean caseSensitiveUID = systemType.equals(IRSESystemType.SYSTEMTYPE_UNIX)
- || systemType.equals(IRSESystemType.SYSTEMTYPE_LINUX)
- || (systemType.equals(IRSESystemType.SYSTEMTYPE_LOCAL) &&
- !System.getProperty("os.name").toLowerCase().startsWith("windows")); //$NON-NLS-1$ //$NON-NLS-2$
- setForceUserIdToUpperCase(forceUC);
- setUserIdCaseSensitive(caseSensitiveUID);
- }
- this.setSystemTypeGen(systemType);
- }
-
- /**
- * Intercept of setHostName so we can force it to uppercase.
- * IPv4 host names are case insensitive. Much data is stored using the host
- * name as part of the key. Therefore, the host name is capitalized here so that
- * these comparisons work naturally.
- * However, this must be done using the US locale since IPv4 host names
- * use can be compared using this locale. See RFC1035.
- */
- public void setHostName(String name) {
- if (name != null) {
- name = name.toUpperCase(Locale.US);
- }
- this.setHostNameGen(name);
- }
- /**
- * Intercept of setDefaultUserId so we can force it to uppercase.
- * Also, we do not store the user Id per se in the attribute, but rather
- * we store it in the preference with a key name unique to this connection.
- * We store that key name in this attribute. However, this is all transparent to
- * the caller.
- */
- public void setDefaultUserId(String newId)
- {
- if ((newId != null) && ucId)
- newId = newId.toUpperCase();
-
- if ((newId == null) || (newId.length()==0)) // a "clear" request?
- {
- clearLocalDefaultUserId();
- }
- else
- {
- String key = getPreferencesKey();
- if (key != null)
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- prefMgr.setUserId(key, newId);
- }
- }
- }
- /**
- * Returns the default UserId for this Host.
- * Note that we don't store it directly in
- * the model, since we don't want the team to share it. Rather,
- * we store the actual it in the preference store keyed by
- * (profileName.connectionName).
- * <p>
- * Further, it is possible that there is no default UserId. If so, this
- * method will go to the preference store and will try to get the default
- * UserId for this connection's system type.
- * <p>
- * This is all transparent to the caller though.
- * <p>
- * @return The value of the DefaultUserId attribute
- */
- public String getDefaultUserId()
- {
- String uid = getLocalDefaultUserId();
- if ((uid == null) || (uid.length()==0))
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- uid = prefMgr.getDefaultUserId(getSystemType()); // resolve from preferences
- if ((uid != null) && ucId)
- uid = uid.toUpperCase();
- }
- return uid;
- }
- /**
- * Return the local default user Id without resolving up the food chain.
- * @see #getDefaultUserId()
- */
- protected static String getLocalDefaultUserId(String key)
- {
- String uid = null;
- if ((key!=null) && (key.length()>0))
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- uid = prefMgr.getUserId(key); // resolve from preferences
- }
- return uid;
- }
- /**
- * Return the local default user Id without resolving up the food chain.
- * @see #getDefaultUserId()
- */
- public String getLocalDefaultUserId()
- {
- return getLocalDefaultUserId(getPreferencesKey());
- }
-
- /**
- * Clear the local default user Id so next query will return the value from
- * the preference store.
- * <p>
- * Same as calling setDefaultUserId(null)
- * @see #setDefaultUserId(String)
- */
- public void clearLocalDefaultUserId()
- {
- if (previousUserIdKey!=null)
- getPreferencesManager().clearUserId(previousUserIdKey);
- }
-
- /**
- * Helper method to return preference manager
- */
- protected static SystemPreferencesManager getPreferencesManager()
- {
- return SystemPreferencesManager.getPreferencesManager();
- }
-
- /**
- * Helper method to compute a unique name for a given subsystem instance
- */
- protected String getPreferencesKey()
- {
- if ((getSystemProfileName()==null) || (getAliasName()==null))
- return null;
- return getPreferencesKey(getSystemProfileName());
- }
- /**
- * Helper method to compute a unique name for a given subsystem instance, given a profile name
- */
- protected String getPreferencesKey(String profileName)
- {
- String connectionName = getAliasName();
- if (connectionName == null)
- return null;
- return getPreferencesKey(profileName, connectionName);
- }
- /**
- * Helper method to compute a unique name for a given subsystem instance, given a profile name and connection name
- */
- protected String getPreferencesKey(String profileName, String connectionName)
- {
- return profileName + "." + connectionName; //$NON-NLS-1$
- }
-
-
- /**
- * Call this with false to turn off the default behaviour of forcing the default userId to uppercase.
- */
- public void setForceUserIdToUpperCase(boolean force)
- {
- this.ucId = force;
- }
- /**
- * Call this to turn off the default behaviour of considering case when comparing userIds
- */
- public void setUserIdCaseSensitive(boolean caseSensitive)
- {
- this.userIdCaseSensitive = caseSensitive;
- }
-
- /**
- * Call this to query whether the default userId is to be uppercased.
- */
- public boolean getForceUserIdToUpperCase()
- {
- return ucId;
- }
- /**
- * Call this to query whether the default userId is case sensitive
- */
- public boolean getUserIdCaseSensitive()
- {
- return userIdCaseSensitive;
- }
- /**
- * Call this to compare two userIds taking case sensitivity
- */
- public boolean compareUserIds(String userId1, String userId2)
- {
- if (userId1 == null)
- userId1 = ""; //$NON-NLS-1$
- if (userId2 == null)
- userId2 = ""; //$NON-NLS-1$
- if (userIdCaseSensitive)
- return userId1.equals(userId2);
- else
- return userId1.equalsIgnoreCase(userId2);
- }
-
- public String toString()
- {
- if (getAliasName() == null)
- return this.toStringGen();
- else
- return getAliasName();
- }
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getSystemType()
- {
- return systemType;
- }
-
- /**
- * Returns the alias name for this host
- */
- public String getName()
- {
- return getAliasName();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The unique key for this object. Unique per connection pool
- */
- public String getAliasName()
- {
- return aliasName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getHostName()
- {
- return hostName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription)
- {
- setDirty(!compareStrings(description, newDescription));
- description = newDescription;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isPromptable()
- {
- return promptable;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setPromptable(boolean newPromptable)
- {
- setDirty(promptable != newPromptable);
- promptable = newPromptable;
- }
-
- /**
- * <!-- begin-user-doc -->
- * Query if this connection is offline or not. It is up to each subsystem to honor this
- * flag.
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isOffline()
- {
- return offline;
- }
-
- /**
- * <!-- begin-user-doc -->
- * Specify if this connection is offline or not. It is up to each subsystem to honor this
- * flag.
- * <!-- end-user-doc -->
- * @generated
- */
- public void setOffline(boolean newOffline)
- {
- setDirty(offline != newOffline);
- offline = newOffline;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setSystemTypeGen(String newSystemType)
- {
- setDirty(!compareStrings(systemType, newSystemType));
- systemType = newSystemType;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setAliasNameGen(String newAliasName)
- {
- setDirty(!compareStrings(aliasName, newAliasName));
- aliasName = newAliasName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setHostNameGen(String newHostName)
- {
- setDirty(!compareStrings(hostName, newHostName));
- hostName = newHostName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getDefaultUserIdGen()
- {
- return defaultUserId;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDefaultUserIdGen(String newDefaultUserId)
- {
- setDirty(!compareStrings(defaultUserId, newDefaultUserId));
- defaultUserId = newDefaultUserId;
- }
-
- /**
- * @deprecated This field/method will be replaced during code generation.
- */
- public String toStringGen()
- {
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (systemType: "); //$NON-NLS-1$
- result.append(systemType);
- result.append(", aliasName: "); //$NON-NLS-1$
- result.append(aliasName);
- result.append(", hostName: "); //$NON-NLS-1$
- result.append(hostName);
- result.append(", description: "); //$NON-NLS-1$
- result.append(description);
- result.append(", defaultUserId: "); //$NON-NLS-1$
- result.append(defaultUserId);
- result.append(", promptable: "); //$NON-NLS-1$
- result.append(promptable);
- result.append(", offline: "); //$NON-NLS-1$
- result.append(offline);
- result.append(')');
- return result.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.RSEModelObject#setDirty(boolean)
- */
- public void setDirty(boolean flag) {
- super.setDirty(flag);
- ISystemHostPool myPool = getHostPool();
- if (myPool != null && flag) {
- myPool.setDirty(true);
- }
- }
-
- public boolean commit()
- {
- return RSEUIPlugin.getThePersistenceManager().commit(this);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemHostPool.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemHostPool.java
deleted file mode 100644
index ba8debe77..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemHostPool.java
+++ /dev/null
@@ -1,638 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.rse.core.IRSEUserIdConstants;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemHostPool;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * A pool of host objects.
- * There is one pool per profile.
- * It is named the same as its owning profile.
- * It is not persisted but provides a means of manipulating lists of host objects.
- * Hosts are created and destroyed by the host pool so that the the relationships between the two can be maintained.
- */
-public class SystemHostPool extends RSEModelObject implements ISystemHostPool
-{
-
- protected static final String NAME_EDEFAULT = null;
-
- private static Hashtable pools = null;
- private static String CONNECTION_FILE_NAME = "connection"; //$NON-NLS-1$
-
-
- protected String name = NAME_EDEFAULT;
- private java.util.List connections = null;
-
- /**
- * Default constructor.
- */
- protected SystemHostPool()
- {
- super();
- }
-
- /**
- * Reset for a full refresh from disk, such as after a team synch
- */
- public static void reset()
- {
- pools = null;
- }
-
- // -------------------------------------------------------------------------------------
- // CONNECTION POOL METHODS...
- // -------------------------------------------------------------------------------------
- /**
- * Return (and create if necessary) the connection pool for a given system profile.
- */
- public static ISystemHostPool getSystemHostPool(ISystemProfile profile)
- throws Exception
- {
- //System.out.println("in getSystemConnectionPool for " + profile);
- if (pools == null)
- pools = new Hashtable();
- SystemHostPool pool = (SystemHostPool)pools.get(profile);
- //System.out.println("... pool: " + pool);
- if (pool == null)
- {
- pool = new SystemHostPool();
- // FIXME (SystemConnectionPoolImpl)initMOF().createSystemConnectionPool();
- pool.setName(profile.getName());
- try {
- pool.restore(); // restore connections
- } catch (Exception exc) {
- }
- pools.put(profile, pool); // store this pool reference, keyed by profile object.
- }
- return pool;
- }
-
- /**
- * Return the system profile that owns this connection pool
- */
- public ISystemProfile getSystemProfile()
- {
- return SystemProfileManager.getSystemProfileManager().getSystemProfile(getName());
- }
-
- /**
- * Rename this connection pool.
- */
- public void renameHostPool(String newName)
- {
- IHost[] connections = getHosts();
- String oldName = getName();
- for (int idx=0; idx<connections.length; idx++)
- {
- connections[idx].renamingSystemProfile(oldName, newName);
- }
- setName(newName);
- }
-
-
- /**
- * Private debug method to print connections, to test restored ok.
- * @deprecated
- */
- public void printConnections()
- {
- java.util.List conns = getHostList();
- Iterator connsList = conns.iterator();
- if (!connsList.hasNext())
- {
- System.out.println();
- System.out.println("No connections"); //$NON-NLS-1$
- }
- while (connsList.hasNext())
- {
- System.out.println();
- IHost conn = (IHost)connsList.next();
- System.out.println(" AliasName.....: " + conn.getAliasName()); //$NON-NLS-1$
- System.out.println(" -----------------------------------------------------"); //$NON-NLS-1$
- System.out.println(" HostName......: " + conn.getHostName()); //$NON-NLS-1$
- System.out.println(" SystemType....: " + conn.getSystemType()); //$NON-NLS-1$
- System.out.println(" Description...: " + conn.getDescription()); //$NON-NLS-1$
- System.out.println(" UserId........: " + conn.getDefaultUserId()); //$NON-NLS-1$
- }
- }
-
-
- // -------------------------------------------------------------------------------------
- // CONNECTION METHODS...
- // -------------------------------------------------------------------------------------
- /**
- * Create a connection object, given only the minimal information.
- * <p>
- * 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
- * systemTypes extension point.
- * @param aliasName unique connection name.
- * @param hostName ip name of host.
- * @return SystemConnection object, or null if it failed to create
- * because the aliasName is not unique. All other errors throw an exception.
- */
- public IHost createHost(String systemType, String aliasName, String hostName)
- throws Exception
- {
- return createHost(systemType,aliasName,hostName,null,null,IRSEUserIdConstants.USERID_LOCATION_HOST);
- }
- /**
- * Create a connection object, given all the possible attributes except default userId.
- * <p>
- * 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
- * systemTypes extension point.
- * @param aliasName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @return SystemConnection object, or null if it failed to create
- * because the aliasName is not unique. All other errors throw an exception.
- */
- public IHost createHost(String systemType, String aliasName, String hostName, String description)
- throws Exception
- {
- return createHost(systemType,aliasName,hostName,description,null,IRSEUserIdConstants.USERID_LOCATION_HOST);
- }
- /**
- * Create a connection object, given all the possible attributes.
- * <p>
- * 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
- * systemTypes extension point.
- * @param aliasName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @param defaultUserId userId to use as the default for the subsystems.
- * @param defaultUserIdLocation where to set the given default user Id. See ISystemUserIdConstants
- * @return SystemConnection object, or null if it failed to create
- * because the aliasName is not unique. All other errors throw an exception.
- */
- public IHost createHost(String systemType, String aliasName, String hostName,
- String description,String defaultUserId,int defaultUserIdLocation)
- throws Exception
- {
- IHost conn = null;
- boolean exists = getHost(aliasName) != null;
- if (exists)
- {
- return null;
- }
- try
- {
- ISystemProfile profile = getSystemProfile();
- conn = new Host(profile);
- addHost(conn); // only record internally if saved successfully
- conn.setHostPool(this);
- conn.setAliasName(aliasName);
- // if default userID is null, and location is in the connection we should retrieve it and use it as the initial value.
- if (defaultUserId == null && defaultUserIdLocation == IRSEUserIdConstants.USERID_LOCATION_HOST) {
- defaultUserId = conn.getDefaultUserId();
- }
- updateHost(conn, systemType, aliasName, hostName, description, defaultUserId, defaultUserIdLocation);
-
- } catch (Exception e)
- {
- throw e;
- }
- return conn;
- }
- /**
- * Update an existing connection given the new information.
- * This method:
- * <ul>
- * <li>calls the setXXX methods on the given connection object, updating the information in it.
- * <li>saves the connection to disk (renaming its folder if needed)
- * </ul>
- * <p>
- * @param conn SystemConnection to be updated
- * @param systemType system type matching one of the system type names defined via the
- * systemTypes extension point.
- * @param aliasName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @param defaultUserId userId to use as the default for the subsystems.
- * @param defaultUserIdLocation where to set the given default user Id. See ISystemUserIdConstants
- */
- public void updateHost(IHost conn, String systemType,
- String aliasName, String hostName,
- String description,String defaultUserId, int defaultUserIdLocation)
- throws Exception
- {
- boolean aliasNameChanged = !aliasName.equalsIgnoreCase(conn.getAliasName());
- if (aliasNameChanged)
- renameHost(conn,aliasName);
- conn.setSystemType(systemType);
- conn.setHostName(hostName);
- if (defaultUserIdLocation != IRSEUserIdConstants.USERID_LOCATION_NOTSET)
- {
- if (defaultUserIdLocation != IRSEUserIdConstants.USERID_LOCATION_HOST)
- {
- conn.setDefaultUserId(null); // clear what was there, to ensure inheritance
- SystemPreferencesManager prefMgr = SystemPreferencesManager.getPreferencesManager();
- boolean forceToUpperCase = conn.getForceUserIdToUpperCase();
- if (forceToUpperCase && (defaultUserId != null))
- defaultUserId = defaultUserId.toUpperCase();
- if (defaultUserIdLocation == IRSEUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE)
- {
- prefMgr.setDefaultUserId(systemType, defaultUserId);
- }
- //else if (defaultUserIdLocation == ISystemUserIdConstants.USERID_LOCATION_DEFAULT_OVERALL)
- //{
- //prefMgr.setDefaultUserId(defaultUserId);
- //}
- }
- else
- {
- conn.setDefaultUserId(defaultUserId);
- }
- }
- conn.setDescription(description);
- commit(conn);
- }
-
-
- /**
- * Return array of connections in this pool
- */
- public IHost[] getHosts()
- {
-
- return (IHost[])getHostList().toArray(new IHost[connections.size()]);
- }
-
-
-
- /*
- * Invalidate cache so it will be regenerated
- */
- protected void invalidateCache()
- {
- setDirty(true);
- }
-
- /**
- * Return a connection object, given its alias name.
- * Can be used to test if an alias name is already used (non-null return).
- * @param aliasName unique aliasName (case insensitive) to search on.
- * @return SystemConnection object with unique aliasName, or null if
- * no connection object with this name exists.
- */
- public IHost getHost(String aliasName)
- {
- IHost conn = null;
- IHost currconn = null;
- java.util.List conns = getHostList();
- Iterator i = conns.iterator();
- while (i.hasNext() && (conn==null))
- {
- currconn = (IHost)i.next();
- if (currconn.getAliasName().equalsIgnoreCase(aliasName))
- conn = currconn;
- }
- return conn;
- }
- /**
- * Return the connection at the given zero-based offset
- */
- public IHost getHost(int pos)
- {
- java.util.List conns = getHostList();
- if (pos < conns.size())
- return (IHost)conns.get(pos);
- else
- return null;
- }
- /**
- * Return the zero-based position of a SystemConnection object within its profile.
- */
- public int getHostPosition(IHost conn)
- {
- int position = -1;
- boolean match = false;
- java.util.List conns = getHostList();
- Iterator i = conns.iterator();
- int idx = 0;
- while (!match && i.hasNext())
- {
- IHost currConn = (IHost)i.next();
- if (conn.equals(currConn))
- {
- match = true;
- position = idx;
- }
- idx++;
- }
- return position;
- }
-
- /**
- * Return the number of SystemConnection objects within this pool.
- */
- public int getHostCount()
- {
- java.util.List conns = getHostList();
- return conns.size();
- }
-
-
- public boolean addHost(IHost conn)
- {
- List hostList = getHostList();
- if (!hostList.contains(conn))
- {
- hostList.add(conn);
- }
- conn.setHostPool(this);
- invalidateCache();
- return true;
- }
-
- /**
- * Removes a given connection from the list and deletes it from disk.
- * <p>
- * This will:
- * <ul>
- * <li>Delete the connection in memory
- * <li>Delete the underlying folder
- * </ul>
- * <p>
- * @param conn SystemConnection object to remove
- */
- public void deleteHost(IHost conn)
- {
- conn.deletingHost(); // let connection do any necessary cleanup
- getHostList().remove(conn);
- setDirty(true);
- RSEUIPlugin.getThePersistenceManager().commit(conn.getSystemProfile());
- }
-
- /**
- * Renames a given connection in the list.
- * This will:
- * <ul>
- * <li>Rename the profile in memory
- * <li>Rename the underlying folder
- * <li>Update the user preferences if this profile is currently active.
- * </ul>
- * @param conn SystemConnection object to rename
- * @param newName The new name to give that connection.
- */
- public void renameHost(IHost conn, String newName)
- throws Exception
- {
- conn.setAliasName(newName);
- invalidateCache();
- commit(conn);
- }
-
-
- /**
- * Duplicates a given connection in this list within this list or another list.
- * @param targetPool The SystemConnectionPool to hold the copied connection. Can equal this connection, as long as alias name is unique
- * @param conn SystemConnection object (within our pool) to clone
- * @param aliasName New, unique, alias name to give this connection. Clone will fail if this is not unique.
- */
- public IHost cloneHost(ISystemHostPool targetPool, IHost conn, String aliasName)
- throws Exception
- {
- IHost copy =
- targetPool.createHost(conn.getSystemType(), aliasName,
- conn.getHostName(), conn.getDescription(), conn.getLocalDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_HOST);
- return copy;
- }
-
- /**
- * Move existing connections a given number of positions in the same pool.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- * <ul>
- * <li>After the move, the pool containing the moved connection is saved to disk.
- * <li>The connection's alias name must be unique in pool.
- * </ul>
- * <b>TODO PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION?</b>
- * @param conns Array of SystemConnections to move.
- * @param newPosition new zero-based position for the connection
- */
- public void moveHosts(IHost conns[], int delta)
- {
- int[] oldPositions = new int[conns.length];
- for (int idx=0; idx<conns.length; idx++)
- oldPositions[idx] = getHostPosition(conns[idx]);
- if (delta > 0) // moving down, process backwards
- for (int idx=conns.length-1; idx>=0; idx--)
- moveConnection(conns[idx], oldPositions[idx]+delta);
- else
- for (int idx=0; idx<conns.length; idx++)
- moveConnection(conns[idx], oldPositions[idx]+delta);
-
- commit();
- }
-
- /**
- * Move one connection to a new location
- * <b>TODO PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION?</b>
- */
- private void moveConnection(IHost conn, int newPos)
- {
- /*
- * DWD revisit, make sure that connections can be "moved", whatever that means.
- * It appears that connections can be moved up and down in the list which
- * probably provides for some rational for keeping this around.
- */
-// java.util.List connList = getHostList();
- //FIXME connList.move(newPos, conn);
- invalidateCache();
- }
-
- /**
- * Order connections according to user preferences.
- * Called after restore.
- */
- public void orderHosts(String[] names)
- {
- java.util.List connList = getHostList();
- IHost[] conns = new IHost[names.length];
- for (int idx=0; idx<conns.length; idx++)
- conns[idx] = getHost(names[idx]);
- connList.clear();
- //System.out.println("Ordering connections within pool " + getName() + "...");
- for (int idx=0; idx<conns.length; idx++)
- {
- connList.add(conns[idx]);
- //System.out.println(" '"+conns[idx].getAliasName()+"'");
- }
- //System.out.println();
- invalidateCache();
- }
-
- // -------------------------
- // SAVE / RESTORE METHODS...
- // -------------------------
- /**
- * Save all connections to disk.
- * Attempts to save all of them, swallowing exceptions, then at the end throws the last exception caught.
- */
- public boolean commit()
- {
- return RSEUIPlugin.getThePersistenceManager().commit(this);
- }
-
- /**
- * Attempt to save single connection to disk.
- */
- public void commit(IHost connection)
- {
- commit();
- }
-
- /**
- * Restore connections from disk
- */
- protected void restore()
- throws Exception
- {
- //System.out.println("... . in pool.restore ");
-
- //FIXME
- }
-
- /**
- * Restore a connection of a given name from disk...
- */
- protected IHost restore(String connectionName)
- throws Exception
- {
- /*FIXME
- //System.out.println("in SystemConnectionPoolImpl#restore for connection " + connectionName);
- String fileName = getRootSaveFileName(connectionName);
- //System.out.println(".......fileName = " + fileName);
- //System.out.println(".......folderName = " + getConnectionFolder(connectionName).getName());
- java.util.List ext = getMOFHelpers().restore(getConnectionFolder(connectionName),fileName);
-
- // should be exactly one profile...
- Iterator iList = ext.iterator();
- SystemConnection connection = (SystemConnection)iList.next();
- if (connection != null)
- {
- if (!connection.getAliasName().equalsIgnoreCase(connectionName))
- {
- RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Incorrect alias name found in connections.xmi file for " + connectionName+". Name was reset");
- connection.setAliasName(connectionName); // just in case!
- }
- internalAddConnection(connection);
- }
- return connection;
- */
- return null;
- }
-
-
-
- /**
- * Return the unqualified save file name with the extension .xmi
- */
- protected static String getSaveFileName(IHost connection)
- {
- return null;//FIXME return SystemMOFHelpers.getSaveFileName(getRootSaveFileName(connection));
- }
-
- /**
- * Return the root save file name without the extension .xmi
- */
- protected static String getRootSaveFileName(IHost connection)
- {
- return getRootSaveFileName(connection.getAliasName());
- }
- /**
- * Return the root save file name without the extension .xmi
- */
- protected static String getRootSaveFileName(String connectionName)
- {
- //String fileName = connectionName; // maybe a bad idea to include connection name in it!
- String fileName = CONNECTION_FILE_NAME;
- return fileName;
- }
-
-
-
-
-
-
- public String toString()
- {
- if (getName() == null)
- return this.toStringGen();
- else
- return getName();
- }
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getName()
- {
- return name;
- }
-
- public String getDescription()
- {
- return SystemResources.RESID_MODELOBJECTS_HOSTPOOL_DESCRIPTION;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setName(String newName)
- {
- name = newName;
- }
-
-
- public List getHostList()
- {
- if (connections == null)
- {
- connections = new ArrayList();
- }
- return connections;
- }
-
- /**
- * @deprecated This field/method will be replaced during code generation.
- */
- public String toStringGen()
- {
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: "); //$NON-NLS-1$
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemModelChangeEvent.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemModelChangeEvent.java
deleted file mode 100644
index e751e26ec..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemModelChangeEvent.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-
-import org.eclipse.rse.core.model.ISystemModelChangeEvent;
-import org.eclipse.rse.core.model.ISystemModelChangeEvents;
-
-/**
- * For listeners interested in model changes with resources in the rse project.
- * These events are designed to state what the change the resource was, not to
- * optimize those events for a GUI (eg, a delete event versus a refresh event)
- */
-public class SystemModelChangeEvent implements ISystemModelChangeEvent, ISystemModelChangeEvents
-{
- private int eventType, resourceType;
- private Object resource;
- private String oldName;
-
- /**
- * Constructor for SystemModelChangeEvent.
- */
- public SystemModelChangeEvent(int eventType, int resourceType, Object resource)
- {
- super();
- this.eventType = eventType;
- this.resourceType = resourceType;
- this.resource = resource;
- }
- /**
- * Constructor for SystemModelChangeEvent for a rename event
- */
- public SystemModelChangeEvent(int eventType, int resourceType, Object resource, String oldName)
- {
- this(eventType, resourceType, resource);
- this.oldName = oldName;
- }
- /**
- * Constructor you shouldn't use unless you intend to call the setters
- */
- public SystemModelChangeEvent()
- {
- }
-
- /**
- * Reset the event type
- */
- public void setEventType(int eventType)
- {
- this.eventType = eventType;
- }
- /**
- * Reset the resource type
- */
- public void setResourceType(int resourceType)
- {
- this.resourceType = resourceType;
- }
- /**
- * Reset the resource
- */
- public void setResource(Object resource)
- {
- this.resource = resource;
- }
- /**
- * Reset the old name on a rename event
- */
- public void setOldName(String oldName)
- {
- this.oldName = oldName;
- }
-
- /**
- * Get the event type, such as {@link org.eclipse.rse.core.model.ISystemModelChangeEvents#SYSTEM_RESOURCE_ADDED}.
- * @see org.eclipse.rse.core.model.ISystemModelChangeEvents
- */
- public int getEventType()
- {
- return eventType;
- }
- /**
- * Get the resource type, such as {@link org.eclipse.rse.core.model.ISystemModelChangeEvents#SYSTEM_RESOURCETYPE_CONNECTION}.
- * @see org.eclipse.rse.core.model.ISystemModelChangeEvents
- */
- public int getResourceType()
- {
- return resourceType;
- }
- /**
- * Get the resource that this event applies to
- */
- public Object getResource()
- {
- return resource;
- }
-
- /**
- * Get the old name of the resource, in the event of a resource rename. Null for other event types.
- */
- public String getOldName()
- {
- return oldName;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemModelChangeEventManager.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemModelChangeEventManager.java
deleted file mode 100644
index bdac23e40..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemModelChangeEventManager.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.ISystemModelChangeEvent;
-import org.eclipse.rse.core.model.ISystemModelChangeListener;
-
-
-/**
- * Manages the list of registered model change listeners.
- */
-public class SystemModelChangeEventManager
-{
- private Vector listeners = new Vector();
-
- /**
- * Constructor
- */
- public SystemModelChangeEventManager()
- {
- }
-
- /**
- * Add a listener to list of listeners. If this object is already in
- * the list, this does nothing.
- */
- public void addSystemModelChangeListener(ISystemModelChangeListener l)
- {
- if (!listeners.contains(l))
- listeners.addElement(l);
- }
-
- /**
- * Remove a listener to list of listeners. If this object is not in
- * the list, this does nothing.
- */
- public void removeSystemModelChangeListener(ISystemModelChangeListener l)
- {
- if (listeners.contains(l))
- listeners.removeElement(l);
- }
-
- /**
- * Notify all registered listeners of the given event
- */
- public void notify(ISystemModelChangeEvent event)
- {
- for (int idx=0; idx<listeners.size(); idx++)
- {
- ISystemModelChangeListener l = (ISystemModelChangeListener)listeners.elementAt(idx);
- l.systemModelResourceChanged(event);
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index dce8cecdc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.model.ISystemPromptableObject;
-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;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This class represents a special case object in the system view (when used in browse
- * dialogs) that allows users to create a new connection.
- * <p>
- * It shows as "New Connection..." in the tree. When expanded, they get the new connection
- * wizard.
- */
-public class SystemNewConnectionPromptObject
- implements ISystemPromptableObject, ISystemViewRunnableObject, IAdaptable
-{
- private Object parent;
- private String[] systemTypes;
- private ISystemPromptableObject[] children;
- private SystemNewConnectionAction action = null;
- private boolean systemTypesSet = false;
- private String newConnText;
- private boolean isRootPrompt = false;
-
- /**
- * Constructor
- */
- public SystemNewConnectionPromptObject()
- {
- systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypeNames();
- isRootPrompt = true;
- }
- /**
- * Constructor for child instances
- */
- public SystemNewConnectionPromptObject(SystemNewConnectionPromptObject parent, String systemType)
- {
- this.parent = parent;
- this.systemTypes = new String[] {systemType};
- }
-
- // ----------------------------------------------------
- // METHODS FOR CONFIGURING THIS OBJECT
- // ----------------------------------------------------
-
- /**
- * Set the system types to restrict the New Connection wizard to
- */
- public void setSystemTypes(String[] systemTypes)
- {
- this.systemTypes = systemTypes;
- this.systemTypesSet = true;
- }
-
- /**
- * Set the parent object so that we can respond to getParent requests
- */
- public void setParent(Object parent)
- {
- this.parent = parent;
- }
-
- // ----------------------------------------------------
- // METHODS CALLED BY THE SYSTEMVIEWPROMPTABLEADAPTER...
- // ----------------------------------------------------
-
- /**
- * Get the parent object (within tree view)
- */
- public Object getParent()
- {
- return parent;
- }
-
- /**
- * Return the child promptable objects.
- * If this returns null, then SystemViewPromptableAdapter will subsequently
- * call {@link #run(Shell)}.
- */
- public ISystemPromptableObject[] getChildren()
- {
- if (!hasChildren())
- return null;
-
-
- else if (children == null)
- {
- children = new ISystemPromptableObject[systemTypes.length];
- for (int idx=0; idx<children.length; idx++)
- {
- children[idx] = new SystemNewConnectionPromptObject(this, systemTypes[idx]);
- }
- }
- else
- {
- String[] typeNames = RSECorePlugin.getDefault().getRegistry().getSystemTypeNames();
- if (typeNames.length != systemTypes.length)
- {
- systemTypes = typeNames;
- children = new ISystemPromptableObject[systemTypes.length];
- for (int idx=0; idx<children.length; idx++)
- {
- children[idx] = new SystemNewConnectionPromptObject(this, systemTypes[idx]);
- }
- }
- }
- return children;
- }
-
- /**
- * Return true if we have children, false if run when expanded
- */
- public boolean hasChildren()
- {
-
- // DKM - I think we shouuld indicate children even if there's only one connection type
- //if (systemTypes.length == 1)
- if (systemTypes.length == 1 && !isRootPrompt)
- return false;
- else
- return true;
- }
-
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * Calls getImage on the subsystem's owning factory.
- */
- public ImageDescriptor getImageDescriptor()
- {
- if (hasChildren())
- 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);
- }
- }
-
- /**
- * Return the label for this object
- */
- public String getText()
- {
- if (newConnText == null)
- {
- if (hasChildren() || systemTypesSet)
- {
- if (hasChildren())
- newConnText = SystemResources.RESID_NEWCONN_PROMPT_LABEL;
- else
- newConnText = SystemResources.RESID_NEWCONN_PROMPT_LABEL+"..."; //$NON-NLS-1$
- }
- else
- {
- newConnText = systemTypes[0]+"..."; //$NON-NLS-1$
- }
- }
- return newConnText;
- }
- /**
- * Return the type label for this object
- */
- public String getType()
- {
- if (hasChildren())
- return SystemResources.RESID_NEWCONN_EXPANDABLEPROMPT_VALUE;
- else
- return SystemResources.RESID_NEWCONN_PROMPT_VALUE;
- }
-
- /**
- * Run this prompt. This should return an appropriate ISystemMessageObject to show
- * as the child, reflecting if it ran successfully, was cancelled or failed.
- */
- public Object[] run(Shell shell)
- {
- if (action == null)
- {
- action = new SystemNewConnectionAction(shell, false, false, null);
- }
- if (systemTypes!=null)
- action.restrictSystemTypes(systemTypes);
-
- try
- {
- action.run();
- } catch (Exception exc)
- {
- return new Object[] {
- new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED),
- ISystemMessageObject.MSGTYPE_ERROR,null)};
- }
-
-
- IHost newConnection = (IHost)action.getValue();
-
- // create appropriate object to return...
- ISystemMessageObject result = null;
- if (newConnection != null)
- {
- result = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CONNECTIONCREATED),
- ISystemMessageObject.MSGTYPE_OBJECTCREATED,null);
- }
- else
- result = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED),
- ISystemMessageObject.MSGTYPE_CANCEL,null);
- return new Object[] {result};
- }
-
- // ----------------------------------------------------
- // METHODS REQUIRED BY THE IADAPTABLE INTERFACE...
- // ----------------------------------------------------
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPostableEventNotifier.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPostableEventNotifier.java
deleted file mode 100644
index e226ae8af..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPostableEventNotifier.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * To support posted events versus synchronous events, this class encapsulates
- * the code to execute via the run() method.
- * <p>
- * The post behaviour is accomplished by calling the asyncExec method in the swt
- * widget Display class. The Display object comes from calling getDisplay() on
- * the shell which we get by calling getShell on the given listener.
- * <p>
- * By having a separate class we can support multiple simultaneous post event
- * requests by instantiating this class for each request.
- */
-public class SystemPostableEventNotifier implements Runnable
-{
- private ISystemResourceChangeEvent event = null;
- private ISystemResourceChangeListener listener = null;
-
- /**
- * Constructor when the request is to post one event to one listener
- */
- public SystemPostableEventNotifier(ISystemResourceChangeListener listener, ISystemResourceChangeEvent event)
- {
- this.event = event;
- this.listener = listener;
- // fix for 150919
- Display d = Display.getDefault();
- //Display d = listener.getShell().getDisplay();
- //d.asyncExec(this);
- d.syncExec(this);
- }
-
- // -----------------------------
- // java.lang.Runnable methods...
- // -----------------------------
- public void run()
- {
- if (listener != null)
- listener.systemResourceChanged(event);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPreferenceChangeEvent.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPreferenceChangeEvent.java
deleted file mode 100644
index cf77db246..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPreferenceChangeEvent.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-import java.util.EventObject;
-
-import org.eclipse.rse.core.model.ISystemPreferenceChangeEvent;
-
-
-/**
- * Event object sent to ISystemPreferenceChangeListeners when a
- * remote system preference is changed.
- * @see org.eclipse.rse.core.model.ISystemPreferenceChangeEvents
- */
-public class SystemPreferenceChangeEvent
- extends EventObject
- implements ISystemPreferenceChangeEvent
-{
- private static final long serialVersionUID = 1;
- private int type;
- private Object oldValue, newValue;
-
- /**
- * Constructor
- * @see org.eclipse.rse.core.model.ISystemPreferenceChangeEvents
- * @param source The object that was added,deleted,renamed,changed.
- * @param type The type of event, one of ISystemChangeEvent constants.
- * @param parent The parent of the object that was added or deleted.
- */
- public SystemPreferenceChangeEvent(int type, Object oldValue, Object newValue)
- {
- super(newValue);
- setType(type);
- this.oldValue = oldValue;
- this.newValue = newValue;
- }
-
- /**
- * Return the type of the event
- * @see org.eclipse.rse.core.model.ISystemPreferenceChangeEvents
- */
- public int getType()
- {
- return type;
- }
- /**
- * Return the old value prior to the change
- */
- public Object getOldValue()
- {
- return oldValue;
- }
- /**
- * Return the new value after the change
- */
- public Object getNewValue()
- {
- return newValue;
- }
-
- /**
- * Set the type
- * @see org.eclipse.rse.core.model.ISystemPreferenceChangeEvents
- */
- public void setType(int type)
- {
- this.type = type;
- }
- /**
- * Set the old value prior to the change
- */
- public void setOldValue(Object value)
- {
- this.oldValue = value;
- }
- /**
- * Return the new value after the change
- */
- public void setNewValue(Object value)
- {
- this.newValue = value;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPreferenceChangeManager.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPreferenceChangeManager.java
deleted file mode 100644
index a039f48f5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemPreferenceChangeManager.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.ISystemPreferenceChangeEvent;
-import org.eclipse.rse.core.model.ISystemPreferenceChangeListener;
-
-
-/**
- * Manages the list of registered preference change listeners.
- */
-public class SystemPreferenceChangeManager
-{
- private Vector listeners = new Vector();
-
- /**
- * Constructor
- */
- public SystemPreferenceChangeManager()
- {
- }
-
- /**
- * Add a listener to list of listeners. If this object is already in
- * the list, this does nothing.
- */
- public void addSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
- {
- if (!listeners.contains(l))
- listeners.addElement(l);
- }
-
- /**
- * Remove a listener to list of listeners. If this object is not in
- * the list, this does nothing.
- */
- public void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
- {
- if (listeners.contains(l))
- listeners.removeElement(l);
- }
-
- /**
- * Notify all registered listeners of the given event
- */
- public void notify(ISystemPreferenceChangeEvent event)
- {
- for (int idx=0; idx<listeners.size(); idx++)
- {
- ISystemPreferenceChangeListener l = (ISystemPreferenceChangeListener)listeners.elementAt(idx);
- l.systemPreferenceChanged(event);
- }
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 817af1791..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfile.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-/**
- * A profile contains hosts and filter pools. It is the unit of save/restore for RSE model
- * objects. All model objects are contained within a profile.
- */
-public class SystemProfile extends RSEModelObject implements ISystemProfile, IAdaptable
-{
-
- private ISystemProfileManager mgr;
- private boolean active;
- private String name = null;
- private boolean defaultPrivate = false;
-
- /**
- * Default constructor
- */
- protected SystemProfile()
- {
- super();
- }
-
- /**
- * Set the in-memory pointer back to the parent system profile manager
- */
- public void setProfileManager(ISystemProfileManager mgr)
- {
- this.mgr = mgr;
- }
-
- /**
- * Get the in-memory pointer back to the parent system profile manager
- */
- public ISystemProfileManager getProfileManager()
- {
- return mgr;
- }
-
- /**
- * Convenience method for create a new connection within this profile.
- * Shortcut for {@link org.eclipse.rse.model.ISystemRegistry#createHost(String,String,String,String)}
- */
- public IHost createHost(String systemType, String connectionName, String hostName, String description) throws Exception
- {
- return RSEUIPlugin.getTheSystemRegistry().createHost(getName(), systemType, connectionName, hostName, description);
- }
-
- /**
- * Return all connections for this profile
- */
- public IHost[] getHosts()
- {
- return RSEUIPlugin.getTheSystemRegistry().getHostsByProfile(this);
- }
-
- /**
- * Return all filter pools for this profile
- */
- public ISystemFilterPool[] getFilterPools()
- {
- ISubSystemConfiguration[] ssFactories = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfigurations();
- Vector poolsVector = new Vector();
- for (int idx = 0; idx < ssFactories.length; idx++)
- {
- ISystemFilterPoolManager poolMgr = ssFactories[idx].getFilterPoolManager(this);
- ISystemFilterPool[] pools = poolMgr.getSystemFilterPools();
- for (int ydx=0; ydx<pools.length; ydx++)
- {
- poolsVector.add(pools[ydx]);
- }
- }
- ISystemFilterPool[] allPools = new ISystemFilterPool[poolsVector.size()];
- for (int idx=0; idx<allPools.length; idx++)
- allPools[idx] = (ISystemFilterPool)poolsVector.elementAt(idx);
- return allPools;
- }
-
- /**
- * Return all filter pools for this profile, scoped by a given subsystem factory
- */
- public ISystemFilterPool[] getFilterPools(ISubSystemConfiguration ssf)
- {
- ISystemFilterPoolManager poolMgr = ssf.getFilterPoolManager(this);
- return poolMgr.getSystemFilterPools();
- }
-
- /**
- * Return true if this profile is currently active.
- */
- public boolean isActive()
- {
- return active;
- }
- /**
- * Reset whether this profile is currently active.
- */
- public void setActive(boolean active)
- {
- this.active = active;
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- //For debugging
- public String toString() {
- String result = getName();
- if (result == null) {
- StringBuffer buf = new StringBuffer(super.toString());
- buf.append("Profile(name: "); //$NON-NLS-1$
- buf.append(name);
- buf.append(", defaultPrivate: "); //$NON-NLS-1$
- buf.append(defaultPrivate);
- buf.append(')');
- result = buf.toString();
- }
- return result;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getName()
- {
- return name;
- }
-
- public String getDescription()
- {
- return SystemResources.RESID_MODELOBJECTS_PROFILE_DESCRIPTION;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setName(String newName)
- {
- name = newName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Is this profile created automatically, and is it the profile
- * that is unique for this developer?
- */
- public boolean isDefaultPrivate()
- {
- return defaultPrivate;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDefaultPrivate(boolean newDefaultPrivate)
- {
- defaultPrivate = newDefaultPrivate;
- }
-
- public boolean commit()
- {
- 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
deleted file mode 100644
index 1f8ceadf6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfileManager.java
+++ /dev/null
@@ -1,544 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.model.SystemStartHere;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorProfileName;
-
-/**
- * A class that manages a list of SystemProfile objects.
- * This should be used as a singleton.
- */
-public class SystemProfileManager implements ISystemProfileManager {
- private List _profiles = null;
- private String[] profileNames = null;
- private Vector profileNamesVector = null;
- private static ISystemProfileManager singleton = null;
- private static final String PROFILE_FILE_NAME = "profile"; //$NON-NLS-1$
-
- /**
- * Default constructor
- */
- protected SystemProfileManager() {
- super();
- }
-
- /**
- * @return (and create if necessary) the singleton instance of this class.
- */
- public static ISystemProfileManager getSystemProfileManager() {
- if (singleton == null) {
- singleton = new SystemProfileManager();
- RSEUIPlugin.getThePersistenceManager().restore(singleton); // restores all of RSE
- }
- return singleton;
- }
-
- /**
- * @return the name of the default private system profile.
- */
- public static String getDefaultPrivateSystemProfileName() {
- String name = RSECorePlugin.getLocalMachineName();
- if (name != null) {
- int i = name.indexOf('.');
- if (i > 0) {
- name = name.substring(0, i);
- }
- }
- if (name == null) {
- name = System.getProperty("user.name"); //$NON-NLS-1$
- }
- return name;
- }
-
- /**
- * Clear the default after a team sychronization say
- */
- public static void clearDefault() {
- singleton = null;
- }
-
- /**
- * Create a new profile with the given name, and add to the list.
- * The name must be unique within the existing list.
- * <p>
- * The underlying folder is created in the file system.
- * <p>
- * @param name What to name this profile
- * @param makeActive true if this profile is to be added to the active profile list.
- * @return new profile, or null if name not unique.
- * @see ISystemProfileManager#createSystemProfile(String, boolean)
- */
- public ISystemProfile createSystemProfile(String name, boolean makeActive) {
- // FIXME - used to use MOF
- ISystemProfile existingProfile = getSystemProfile(name);
- if (existingProfile != null) {
- deleteSystemProfile(existingProfile, false); // replace the existing one with a new profile
- }
-
- ISystemProfile newProfile = internalCreateSystemProfileAndFolder(name);
- if (makeActive) {
- SystemPreferencesManager.getPreferencesManager().addActiveProfile(name);
- ((SystemProfile) newProfile).setActive(makeActive);
- }
- RSEUIPlugin.getThePersistenceManager().commit(this);
- return newProfile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#makeSystemProfileActive(org.eclipse.rse.core.model.ISystemProfile, boolean)
- */
- public void makeSystemProfileActive(ISystemProfile profile, boolean makeActive) {
- boolean wasActive = isSystemProfileActive(profile.getName());
- if (wasActive && !makeActive)
- SystemPreferencesManager.getPreferencesManager().deleteActiveProfile(profile.getName());
- else if (makeActive && !wasActive) SystemPreferencesManager.getPreferencesManager().addActiveProfile(profile.getName());
- ((SystemProfile) profile).setActive(makeActive);
- }
-
- /*
- * private version that avoids name collision check
- */
- private ISystemProfile internalCreateSystemProfile(String name) {
- ISystemProfile profile = new SystemProfile();
- initialize(profile, name);
- profile.setDefaultPrivate(name.equalsIgnoreCase(getDefaultPrivateSystemProfileName()));
- return profile;
- }
-
- /*
- * private version that avoids name collision check
- */
- private ISystemProfile internalCreateSystemProfileAndFolder(String name) {
- ISystemProfile profile = internalCreateSystemProfile(name);
- // FIXME This is where the old style folders get created for profiles.
- // This is no longer needed but
- // SystemResourceManager.getProfileFolder(profile); // creates proj/profileName folder
- return profile;
- }
-
- /*
- * private method to initialize state for new profile
- */
- private void initialize(ISystemProfile profile, String name) {
- profile.setName(name);
- profile.setProfileManager(this);
- getProfiles().add(profile);
- invalidateCache();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getSystemProfiles()
- */
- public ISystemProfile[] getSystemProfiles() {
- List profiles = getProfiles();
-
- // Ensure that one Profile is the default Profile - defect 48995 NH
- boolean defaultProfileExist = false;
- for (int idx = 0; (!defaultProfileExist) && (idx < profiles.size()); idx++) {
- ISystemProfile profile = (ISystemProfile) profiles.get(idx);
- if (profile.isDefaultPrivate()) {
- defaultProfileExist = true;
- }
- }
- if (!defaultProfileExist) {
- // Check if the Profile exists with name same as the LocalMachine Name - this is the default we give
- // when creating connections.
- for (int idx = 0; (!defaultProfileExist) && (idx < profiles.size()); idx++) {
- ISystemProfile profile = (ISystemProfile) profiles.get(idx);
- String initProfileName = getDefaultPrivateSystemProfileName();
- if (profile.getName().equalsIgnoreCase(initProfileName)) {
- profile.setDefaultPrivate(true);
- defaultProfileExist = true;
- }
- }
-
- // If did not find such a profile then the first profile found besides Team is set to be the default profile
- if (!defaultProfileExist) {
- for (int idx = 0; (!defaultProfileExist) && (idx < profiles.size()); idx++) {
- ISystemProfile profile = (ISystemProfile) profiles.get(idx);
- if (!profile.getName().equalsIgnoreCase(ISystemPreferencesConstants.DEFAULT_TEAMPROFILE)) {
- profile.setDefaultPrivate(true);
-
- RSEUIPlugin.getThePersistenceManager().commit(SystemStartHere.getSystemProfileManager());
- defaultProfileExist = true;
- }
- }
- }
- if (!defaultProfileExist) {
- // If Team is the only profile - then put a message in the log - do not make Team to be default
- if (profiles.size() == 1 && ((ISystemProfile) profiles.get(0)).getName().equalsIgnoreCase("Team")) //$NON-NLS-1$
- {
- SystemBasePlugin.logWarning("Only one Profile Team exists - there is no Default Profile"); //$NON-NLS-1$
- } else {
- // sonething must have gone wrong - it should not come here
- SystemBasePlugin.logWarning("Something went wrong and the default profile is not set"); //$NON-NLS-1$
- }
- }
- }
- return (ISystemProfile[]) profiles.toArray(new ISystemProfile[profiles.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getSystemProfileNames()
- */
- public String[] getSystemProfileNames() {
- if (profileNames == null) {
- ISystemProfile[] profiles = getSystemProfiles();
- profileNames = new String[profiles.length];
- for (int idx = 0; idx < profiles.length; idx++)
- profileNames[idx] = profiles[idx].getName();
- }
- return profileNames;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getSystemProfileNamesVector()
- */
- public Vector getSystemProfileNamesVector() {
- if (profileNamesVector == null) {
- ISystemProfile[] profiles = getSystemProfiles();
- profileNamesVector = new Vector(profiles.length);
- for (int idx = 0; idx < profiles.length; idx++)
- profileNamesVector.addElement(profiles[idx].getName());
- }
- return profileNamesVector;
- }
-
- /**
- * Something changed so invalide cache of profiles so it will be regenerated
- */
- protected void invalidateCache() {
- //DY profiles = null;
- profileNames = null;
- profileNamesVector = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getSystemProfile(java.lang.String)
- */
- public ISystemProfile getSystemProfile(String name) {
- ISystemProfile[] profiles = getSystemProfiles();
- if ((profiles == null) || (profiles.length == 0)) return null;
- ISystemProfile match = null;
- for (int idx = 0; (match == null) && (idx < profiles.length); idx++)
- if (profiles[idx].getName().equals(name)) match = profiles[idx];
- return match;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#renameSystemProfile(org.eclipse.rse.core.model.ISystemProfile, java.lang.String)
- */
- public void renameSystemProfile(ISystemProfile profile, String newName) {
- boolean isActive = isSystemProfileActive(profile.getName());
- String oldName = profile.getName();
- profile.setName(newName);
- if (isActive) SystemPreferencesManager.getPreferencesManager().renameActiveProfile(oldName, newName);
- invalidateCache();
- // FIXME RSEUIPlugin.getThePersistenceManager().save(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#deleteSystemProfile(org.eclipse.rse.core.model.ISystemProfile, boolean)
- */
- public void deleteSystemProfile(ISystemProfile profile, boolean persist) {
- String oldName = profile.getName();
- boolean isActive = isSystemProfileActive(oldName);
- getProfiles().remove(profile);
- /* FIXME in EMF the profiles are "owned" by the Resource, and only referenced by the profile manager,
- * so just removing it from the manager is not enough, it must also be removed from its resource.
- * No longer needed since EMF is not in use.
- * Resource res = profile.eResource();
- * if (res != null)
- * res.getContents().remove(profile);
- */
- if (isActive) SystemPreferencesManager.getPreferencesManager().deleteActiveProfile(oldName);
- invalidateCache();
- if (persist) {
- RSEUIPlugin.getThePersistenceManager().deleteProfile(oldName);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#cloneSystemProfile(org.eclipse.rse.core.model.ISystemProfile, java.lang.String)
- */
- public ISystemProfile cloneSystemProfile(ISystemProfile profile, String newName) {
- ISystemProfile newProfile = createSystemProfile(newName, false);
- return newProfile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#isSystemProfileActive(java.lang.String)
- */
- public boolean isSystemProfileActive(String profileName) {
- String[] activeProfiles = getActiveSystemProfileNames();
- boolean match = false;
- for (int idx = 0; !match && (idx < activeProfiles.length); idx++) {
- if (activeProfiles[idx].equals(profileName)) match = true;
- }
- return match;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getActiveSystemProfiles()
- */
- public ISystemProfile[] getActiveSystemProfiles() {
- String[] profileNames = getActiveSystemProfileNames();
- ISystemProfile[] profiles = new ISystemProfile[profileNames.length];
- for (int idx = 0; idx < profileNames.length; idx++) {
- profiles[idx] = getOrCreateSystemProfile(profileNames[idx]);
- ((SystemProfile) profiles[idx]).setActive(true);
- }
- return profiles;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getActiveSystemProfileNames()
- */
- public String[] getActiveSystemProfileNames() {
- String[] activeProfileNames = SystemPreferencesManager.getPreferencesManager().getActiveProfileNames();
- // dy: defect 48355, need to sync this with the actual profile list. If the user
- // imports old preference settings or does a team sync and a profile is deleted then
- // it is possible an active profile no longer exists.
- // String[] systemProfileNames = getSystemProfileNames();
- ISystemProfile[] systemProfiles = getSystemProfiles();
- boolean found;
- boolean found_team = false;
- boolean found_private = false;
- boolean changed = false;
- String defaultProfileName = getDefaultPrivateSystemProfileName();
-
- for (int activeIdx = 0; activeIdx < activeProfileNames.length; activeIdx++) {
- // skip Team and Private profiles
- String activeProfileName = activeProfileNames[activeIdx];
- if (activeProfileName.equals(defaultProfileName)) {
- found_private = true;
- } else if (activeProfileName.equals(ISystemPreferencesConstants.DEFAULT_TEAMPROFILE)) {
- found_team = true;
- } else {
- found = false;
- for (int systemIdx = 0; systemIdx < systemProfiles.length && !found; systemIdx++) {
- if (activeProfileNames[activeIdx].equals(systemProfiles[systemIdx].getName())) {
- found = true;
- }
- }
-
- if (!found) {
- // The active profile no longer exists so remove it from the active list
- SystemPreferencesManager.getPreferencesManager().deleteActiveProfile(activeProfileNames[activeIdx]);
- changed = true;
- }
- }
- }
-
- for (int systemIdx = 0; systemIdx < systemProfiles.length && !changed; systemIdx++) {
- boolean matchesBoth = false;
- String name = systemProfiles[systemIdx].getName();
-
- for (int activeIdx = 0; activeIdx < activeProfileNames.length && !matchesBoth; activeIdx++) {
- String aname = activeProfileNames[activeIdx];
- if (name.equals(aname)) {
- matchesBoth = true;
- }
-
- }
- if (!matchesBoth && found_private) {
- if (systemProfiles[systemIdx].isActive() || systemProfiles[systemIdx].isDefaultPrivate()) {
- SystemPreferencesManager.getPreferencesManager().addActiveProfile(name);
- SystemPreferencesManager.getPreferencesManager().deleteActiveProfile(RSECorePlugin.getLocalMachineName());
- activeProfileNames = SystemPreferencesManager.getPreferencesManager().getActiveProfileNames();
- }
- }
- }
-
- // the active profiles list needed to be changed because of an external update, also
- // check if Default profile needs to be added back to the list
- if (changed || !found_team || !found_private) {
- if (systemProfiles.length == 0) {
- // First time user, make sure default is in the active list, the only time it wouldn't
- // be is if the pref_store.ini was modified (because the user imported old preferences)
- if (!found_team) {
- SystemPreferencesManager.getPreferencesManager().addActiveProfile(ISystemPreferencesConstants.DEFAULT_TEAMPROFILE);
- changed = true;
- }
-
- if (!found_private) {
- SystemPreferencesManager.getPreferencesManager().addActiveProfile(RSECorePlugin.getLocalMachineName());
- changed = true;
- }
- } else {
- ISystemProfile defaultProfile = getDefaultPrivateSystemProfile();
- if (defaultProfile != null && !found_private) {
- SystemPreferencesManager.getPreferencesManager().addActiveProfile(defaultProfile.getName());
- changed = true;
- }
- }
-
- if (changed) {
- activeProfileNames = SystemPreferencesManager.getPreferencesManager().getActiveProfileNames();
- }
- }
-
- return activeProfileNames;
- }
-
- /**
- * @return the profile names currently selected by the user as "active" profiles
- */
- public Vector getActiveSystemProfileNamesVector() {
- String[] profileNames = SystemPreferencesManager.getPreferencesManager().getActiveProfileNames();
- Vector v = new Vector(profileNames.length);
- for (int idx = 0; idx < profileNames.length; idx++)
- v.addElement(profileNames[idx]);
- return v;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getActiveSystemProfilePosition(java.lang.String)
- */
- public int getActiveSystemProfilePosition(String profileName) {
- String[] profiles = getActiveSystemProfileNames();
- int pos = -1;
- for (int idx = 0; (pos < 0) && (idx < profiles.length); idx++) {
- if (profiles[idx].equals(profileName)) pos = idx;
- }
- return pos;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getDefaultPrivateSystemProfile()
- */
- public ISystemProfile getDefaultPrivateSystemProfile() {
- return getSystemProfile(getDefaultPrivateSystemProfileName());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getDefaultTeamSystemProfile()
- */
- public ISystemProfile getDefaultTeamSystemProfile() {
- return getSystemProfile(ISystemPreferencesConstants.DEFAULT_TEAMPROFILE);
- }
-
- /**
- * Instantiate a user profile given its name.
- * @param userProfileName the name of the profile to find or create
- * @return the profile that was found or created.
- */
- protected ISystemProfile getOrCreateSystemProfile(String userProfileName) {
- ISystemProfile userProfile = getSystemProfile(userProfileName);
- if (userProfile == null) {
- userProfile = internalCreateSystemProfileAndFolder(userProfileName);
- }
- return userProfile;
- }
-
- /**
- * No longer used.
- * @param profileName the name of the profile from which to construct the name
- * @return the unqualified save file name with the extension .xmi
- */
- public static String getSaveFileName(String profileName) {
- return null;
- //FIXME SystemMOFHelpers.getSaveFileName(getRootSaveFileName(profileName)); no longer needed.
- }
-
- /**
- * No longer used.
- * @param profile the profile from which to construct the name
- * @return the unqualified save file name with the extension .xmi
- */
- public static String getSaveFileName(ISystemProfile profile) {
- return null;
- //FIXME SystemMOFHelpers.getSaveFileName(getRootSaveFileName(profile)); no longer needed.
- }
-
- /**
- * No longer used.
- * @param profile the profile from which to retrieve the root.
- * @return the root save file name without the extension .xmi
- */
- protected static String getRootSaveFileName(ISystemProfile profile) {
- return getRootSaveFileName(profile.getName());
- }
-
- /**
- * No longer used.
- * @param profileName the name of the profile
- * @return the root save file name without the extension .xmi
- */
- protected static String getRootSaveFileName(String profileName) {
- //String fileName = profileName; // may be a bad idea to include manager name in it!
- String fileName = PROFILE_FILE_NAME;
- return fileName;
- }
-
- /**
- * Reusable method to return a name validator for renaming a profile.
- * @param profileName the current profile name on updates. Can be null for new profiles. Used
- * to remove from the existing name list the current connection.
- * @return the validator
- */
- public ISystemValidator getProfileNameValidator(String profileName) {
- //Vector v = getActiveSystemProfileNamesVector();
- Vector v = getSystemProfileNamesVector();
- if (profileName != null) v.removeElement(profileName);
- ISystemValidator nameValidator = new ValidatorProfileName(v);
- return nameValidator;
- }
-
- /**
- * Reusable method to return a name validator for renaming a profile.
- * @param profile the current profile object on updates. Can be null for new profiles. Used
- * to remove from the existing name list the current connection.
- * @return the validator
- */
- public ISystemValidator getProfileNameValidator(ISystemProfile profile) {
- if (profile != null)
- return getProfileNameValidator(profile.getName());
- else
- return getProfileNameValidator((String) null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getProfiles()
- */
- public List getProfiles() {
- if (_profiles == null) {
- ISystemProfile profile = new SystemProfile();
- String initProfileName = getDefaultPrivateSystemProfileName();
- profile.setName(initProfileName);
- profile.setDefaultPrivate(true);
- _profiles = new ArrayList();
- _profiles.add(profile);
- //profiles = null;//FIXME new EObjectResolvingeList(SystemProfile.class, this, ModelPackage.SYSTEM_PROFILE_MANAGER__PROFILES);
- }
- return _profiles;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRemoteChangeEventManager.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRemoteChangeEventManager.java
deleted file mode 100644
index a9cc1a718..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRemoteChangeEventManager.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-import java.util.Vector;
-
-import org.eclipse.rse.model.ISystemRemoteChangeEvent;
-import org.eclipse.rse.model.ISystemRemoteChangeListener;
-
-
-/**
- * Manages the list of registered remote resource change listeners.
- */
-public class SystemRemoteChangeEventManager
-{
- private Vector listeners = new Vector();
-
- /**
- * Constructor
- */
- public SystemRemoteChangeEventManager()
- {
- }
-
- /**
- * Add a listener to list of listeners. If this object is already in
- * the list, this does nothing.
- */
- public void addSystemRemoteChangeListener(ISystemRemoteChangeListener l)
- {
- if (!listeners.contains(l))
- listeners.addElement(l);
- }
-
- /**
- * Remove a listener to list of listeners. If this object is not in
- * the list, this does nothing.
- */
- public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l)
- {
- if (listeners.contains(l))
- listeners.removeElement(l);
- }
-
- /**
- * Notify all registered listeners of the given event
- */
- public void notify(ISystemRemoteChangeEvent event)
- {
- for (int idx=0; idx<listeners.size(); idx++)
- {
- ISystemRemoteChangeListener l = (ISystemRemoteChangeListener)listeners.elementAt(idx);
- l.systemRemoteResourceChanged(event);
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemResourceChangeManager.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemResourceChangeManager.java
deleted file mode 100644
index 99495bba8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemResourceChangeManager.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-import java.util.Vector;
-
-import org.eclipse.rse.model.ISystemResourceChangeEvent;
-import org.eclipse.rse.model.ISystemResourceChangeListener;
-
-
-/**
- * Manages the list of registered resource change listeners.
- */
-public class SystemResourceChangeManager
-{
- private Vector listeners = new Vector();
-
- /**
- * Constructor
- */
- public SystemResourceChangeManager()
- {
- }
-
- /**
- * Add a listener to list of listeners. If this object is already in
- * the list, this does nothing.
- */
- public void addSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- if (!listeners.contains(l))
- listeners.addElement(l);
- }
-
- /**
- * Remove a listener to list of listeners. If this object is not in
- * the list, this does nothing.
- */
- public void removeSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- if (listeners.contains(l))
- listeners.removeElement(l);
- }
-
- /**
- * Query if the ISystemResourceChangeListener is already listening for SystemResourceChange events
- */
- public boolean isRegisteredSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- return listeners.contains(l);
- }
-
- /**
- * Notify all registered listeners of the given event
- */
- public void notify(ISystemResourceChangeEvent event)
- {
- for (int idx=0; idx<listeners.size(); idx++)
- {
- ISystemResourceChangeListener l = (ISystemResourceChangeListener)listeners.elementAt(idx);
- l.systemResourceChanged(event);
- }
- }
-
- /**
- * Post a notify to all registered listeners of the given event
- */
- public void postNotify(ISystemResourceChangeEvent event)
- {
- for (int idx=0; idx<listeners.size(); idx++)
- {
- ISystemResourceChangeListener listener = (ISystemResourceChangeListener)listeners.elementAt(idx);
- new SystemPostableEventNotifier(listener, event); // create and run the notifier
- //l.systemResourceChanged(event);
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRunnableContextWrapper.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRunnableContextWrapper.java
deleted file mode 100644
index f15f7706e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRunnableContextWrapper.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Runnable context to reuse an existing progress monitor. This allows us to easily
- * resuse a progress monitor when we know that a larger task may invoke other code
- * that also uses progress montiors but doesn't know that it is actually a subtask.
- * <p>
- * <b>Note:</b> Any task that reuses the monitor must be a proper subtask of the parent
- * task. i.e The subtask must start after the parent task and stop before the parent
- * task.
- */
-public class SystemRunnableContextWrapper implements IRunnableContext {
-
- // Inner class for running the first runable, used for grabbing the progress monitor during
- // execution of the first runnable context.
- private class SystemRunnableWithProgress implements IRunnableWithProgress
- {
- private IRunnableWithProgress _runnable;
- private IProgressMonitor monitor;
-
- /**
- * Constructor
- */
- private SystemRunnableWithProgress(IRunnableWithProgress runnable)
- {
- _runnable = runnable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
- {
- // invoked through an IRunnableContext so we need to grab the progress monitor and forward the request
- // store the monitor
- this.monitor = monitor;
-
- // start executing the real runnable
- _runnable.run(monitor);
- }
-
- } // end of class SystemRunnableWithProgress
-
- // Inner class for running second instance
- private class InternalRunnable implements Runnable
- {
- private Exception _e;
- private boolean _fork;
- private IRunnableWithProgress _runnable;
- private IProgressMonitor _monitor;
-
- private InternalRunnable(IRunnableWithProgress runnable, boolean fork, IProgressMonitor monitor)
- {
- _runnable = runnable;
- _fork = fork;
- _monitor = monitor;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Runnable#run()
- */
- public void run()
- {
- Display display = Display.getCurrent();
- try
- {
- ModalContext.run(_runnable, _fork, _monitor, display);
- }
- catch (InterruptedException e)
- {
- _e = e;
- }
- catch (InvocationTargetException e)
- {
- _e = e;
- }
- }
-
- private Exception getException()
- {
- return _e;
- }
- }
-
- // Instance variable
- private IRunnableContext _runnableContext;
- private SystemRunnableWithProgress _runnable;
-
- /**
- * Constructor
- */
- public SystemRunnableContextWrapper(IRunnableContext runnableContext)
- {
- _runnableContext = runnableContext;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableContext#run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
- */
- public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException
- {
- boolean first = false;
-
- synchronized(this)
- {
- if (_runnable == null)
- {
- // first code to use this runable context so we need to use the SystemRunnableWithProgress to capture the monitor
- _runnable = new SystemRunnableWithProgress(runnable);
- first = true;
- }
- }
-
- if (first)
- {
- _runnableContext.run(fork, cancelable, _runnable);
- }
- else
- {
- // wait for monitor to be initialized by the first task before proceeding
- while (_runnable.monitor == null)
- {
- Thread.sleep(100);
- }
-
- // we want to reuse the montior from the previous runnable
- SubProgressMonitor submonitor = new SubProgressMonitor(_runnable.monitor, 0);
-
- Display display = Display.getCurrent();
- if (display != null)
- {
- ModalContext.run(runnable, fork, submonitor, display);
- }
- else
- {
- InternalRunnable internalRunnable = new InternalRunnable(runnable, fork, submonitor);
- Display.getDefault().syncExec(internalRunnable);
- Exception e = internalRunnable.getException();
- if (e != null)
- {
- if (e instanceof InterruptedException)
- throw (InterruptedException) e;
- else if (e instanceof InvocationTargetException)
- throw (InvocationTargetException) e;
- }
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemScratchpad.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemScratchpad.java
deleted file mode 100644
index 678e8ba32..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemScratchpad.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.ui.view.ISystemDragDropAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemViewScratchpadAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-/**
- * This is the root object for the Remote Scratchpad view.
- */
-public class SystemScratchpad implements IAdaptable
-{
- public List _children;
- public static SystemViewScratchpadAdapter _adapter;
-
- public SystemScratchpad()
- {
- _children = new ArrayList();
- }
-
- public boolean hasChildren()
- {
- return !_children.isEmpty();
- }
-
- public boolean contains(Object obj)
- {
- return _children.contains(obj);
- }
-
- public Object[] getChildren()
- {
- Object[] children = new Object[_children.size()];
- for (int i = 0; i < _children.size(); i++)
- {
- children[i] = _children.get(i);
- }
- return children;
- }
-
- public void addChild(Object child)
- {
- _children.add(child);
- }
-
- public void removeChild(Object child)
- {
- _children.remove(child);
- }
-
- public void clearChildren()
- {
- _children.clear();
- }
-
- public Object getAdapter(Class adapterType)
- {
- if (adapterType == IPropertySource.class ||
- adapterType == ISystemViewElementAdapter.class ||
- adapterType == ISystemRemoteElementAdapter.class ||
- adapterType == ISystemDragDropAdapter.class)
- {
- if (_adapter == null)
- {
- _adapter = new SystemViewScratchpadAdapter();
- }
- return _adapter;
- }
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/DummyHost.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/DummyHost.java
deleted file mode 100644
index 9326a5b1e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/DummyHost.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemHostPool;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-public class DummyHost implements IHost
-{
- protected String _hostName;
- protected String _systemType;
-
- public DummyHost(String hostName, String systemType)
- {
- _hostName = hostName;
- _systemType = systemType;
- }
- public ISystemProfile getSystemProfile()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getSystemProfileName()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setHostPool(ISystemHostPool pool)
- {
- // TODO Auto-generated method stub
-
- }
-
- public ISystemHostPool getHostPool()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public ISubSystem[] getSubSystems()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- public String getLocalDefaultUserId()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void clearLocalDefaultUserId()
- {
- // TODO Auto-generated method stub
-
- }
-
- public void deletingHost()
- {
- // TODO Auto-generated method stub
-
- }
-
- public void renamingSystemProfile(String oldName, String newName)
- {
- // TODO Auto-generated method stub
-
- }
-
- public boolean getForceUserIdToUpperCase()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean compareUserIds(String userId1, String userId2)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public String getSystemType()
- {
- return _systemType;
- }
-
- public void setSystemType(String value)
- {
- // TODO Auto-generated method stub
-
- }
-
- public String getAliasName()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setAliasName(String value)
- {
- // TODO Auto-generated method stub
-
- }
-
- public String getHostName()
- {
- return _hostName;
- }
-
- public void setHostName(String value)
- {
- // TODO Auto-generated method stub
-
- }
-
- public String getDescription()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setDescription(String value)
- {
- // TODO Auto-generated method stub
-
- }
-
- public String getDefaultUserId()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setDefaultUserId(String value)
- {
- // TODO Auto-generated method stub
-
- }
-
- public boolean isPromptable()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void setPromptable(boolean value)
- {
- // TODO Auto-generated method stub
-
- }
-
- public boolean isOffline()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void setOffline(boolean value)
- {
- // TODO Auto-generated method stub
-
- }
-
- public IConnectorService[] getConnectorServices()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getName()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IPropertySet[] getPropertySets()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IPropertySet getPropertySet(String name)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IPropertySet createPropertySet(String name, String description)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IPropertySet createPropertySet(String name)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-
- public boolean addPropertySet(IPropertySet set)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean addPropertySets(IPropertySet[] sets)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean removePropertySet(String name)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isDirty()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void setDirty(boolean flag)
- {
- // TODO Auto-generated method stub
-
- }
-
- public boolean commit()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean wasRestored()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void setWasRestored(boolean flag)
- {
- // TODO Auto-generated method stub
-
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemPromptableObject.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemPromptableObject.java
deleted file mode 100644
index 0ea5aca90..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemPromptableObject.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This interface captures special-case objects in the SystemView that are only there to
- * prompt the user to create something new. Eg "New Connection..." which when selected
- * launches the new connection wizard.
- * <p>
- * These promptables can either run when expanded, or they can show child promptable
- * objects
- * <p>
- * Related adapter is org.eclipse.rse.ui.view.SystemViewPromptableAdapter
- */
-public interface ISystemPromptableObject extends IAdaptable
-{
-
- /**
- * Get the parent object (within tree view)
- */
- public Object getParent();
- /**
- * Set the parent object so that we can respond to getParent requests
- */
- public void setParent(Object parent);
- /**
- * Returns an image descriptor for the image. More efficient than getting the image.
- * Calls getImage on the subsystem's owning factory.
- */
- public ImageDescriptor getImageDescriptor();
- /**
- * Return the label for this object
- */
- public String getText();
- /**
- * Return the type label for this object
- */
- public String getType();
-
- /**
- * Run this prompt. This should return an appropriate ISystemMessageObject to show
- * as the child, reflecting if it ran successfully, was cancelled or failed.
- */
- public Object[] run(Shell shell);
-
- /**
- * Return the child promptable objects.
- * If this returns null, then SystemViewPromptableAdapter will subsequently
- * call {@link #run(Shell)}.
- */
- public ISystemPromptableObject[] getChildren();
- /**
- * Return true if this is an expandable prompt
- */
- public boolean hasChildren();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistryUI.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistryUI.java
deleted file mode 100644
index f0c026417..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistryUI.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.model;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Registry or front door for all remote system connections.
- */
-public interface ISystemRegistryUI extends ISystemRegistry {
-
- /**
- * Update an existing connection given the new information.
- * This method:
- * <ul>
- * <li>calls the setXXX methods on the given connection object, updating the information in it.
- * <li>save the connection's connection pool to disk
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_CHANGE to all registered listeners
- * <li>if the systemtype or hostname is changed, calls disconnect on each associated subsystem.
- * We must do this because a hostname changes fundamentally affects the connection,
- * rendering any information currently displayed under
- * that connection obsolete. That is, the user will have to reconnect.
- * </ul>
- * <p>
- * @param conn SystemConnection to be updated
- * @param systemType system type matching one of the system type names defined via the
- * systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
- * that tells us where to set the user Id
- * @param defaultUserId userId to use as the default for the subsystems.
- */
- public void updateHost(Shell shell, IHost conn, String systemType,
- String connectionName, String hostName,
- String description,String defaultUserId, int defaultUserIdLocation);
-
- /**
- * Returns the clipboard used for copy actions
- */
- public Clipboard getSystemClipboard();
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeEvent.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeEvent.java
deleted file mode 100644
index 2af19fc4c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeEvent.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-/**
- * A change event passed to you when listening for remote resource changes.
- * Note these are post-events, sent after the fact.
- */
-public interface ISystemRemoteChangeEvent
-{
- /**
- * Get the event type, such as {@link org.eclipse.rse.model.ISystemRemoteChangeEvents#SYSTEM_REMOTE_RESOURCE_CREATED}.
- * @see org.eclipse.rse.model.ISystemRemoteChangeEvents
- */
- public int getEventType();
-
- /**
- * Get the resource that this event applies to.
- * It must either be the binary object of the resource, or the absolute name of the resource.
- */
- public Object getResource();
- /**
- * Get the parent remote object for the affected remote object. This is not always known,
- * but when it is (ie, non null) then it can be used to refresh all expanded occurrences of that parent
- */
- public Object getResourceParent();
-
- /**
- * Get the old name of the resource, in the event of a resource rename. Null for other event types.
- */
- public String getOldName();
-
- /**
- * Get the subsystem in which this resource resides.
- * This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections
- * with the same hostname as the subsystem's connection.
- */
- public ISubSystem getSubSystem();
-
- /**
- * Get the originating viewer from which this remote resource change event comes from. The combination of this,
- * if non-null, plus the selected parent, allows viewers to decide whether to update the selection within the
- * parent resource, after refreshing that resource.
- */
- public Viewer getOriginatingViewer();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeEvents.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeEvents.java
deleted file mode 100644
index 3132ba51f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeEvents.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-
-/**
- * The event IDs sent when remote resources in the model change
- */
-public interface ISystemRemoteChangeEvents
-{
-
- /**
- * Event Type: a remote resource was added
- */
- public static final int SYSTEM_REMOTE_RESOURCE_CREATED = 1;
-
- /**
- * Event Type: a remote resource was removed
- */
- public static final int SYSTEM_REMOTE_RESOURCE_DELETED = 2;
-
- /**
- * Event Type: a remote resource was changed
- */
- public static final int SYSTEM_REMOTE_RESOURCE_CHANGED = 4;
-
- /**
- * Event Type: a remote resource was renamed
- */
- public static final int SYSTEM_REMOTE_RESOURCE_RENAMED = 8;
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeListener.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeListener.java
deleted file mode 100644
index bf26b41d4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRemoteChangeListener.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-/**
- * Interface that listeners interesting in changes to remote resources
- * implement, and subsequently register their interest, in via SystemRegistry.
- */
-public interface ISystemRemoteChangeListener
-{
-
- /**
- * This is the method in your class that will be called when a remote resource
- * changes. You will be called after the resource is changed.
- * @see ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvent.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvent.java
deleted file mode 100644
index a9172b145..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvent.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Item;
-
-/**
- * Interface of event sent when a remote system resource changes.
- * These events are mainly for internal use. BPs/ISVs should instead
- * fire and monitor for {@link org.eclipse.rse.core.model.ISystemModelChangeEvent}.
- * @see org.eclipse.rse.model.ISystemResourceChangeEvents
- */
-public interface ISystemResourceChangeEvent extends ISystemResourceChangeEvents
-{
- /**
- * Returns an object identifying the source of this event.
- *
- * @return an object identifying the source of this event
- * @see java.util.EventObject
- */
- public Object getSource();
-
- /**
- * For multi-target events, return the array of source targets.
- */
- public Object[] getMultiSource();
-
- /**
- * Returns the parent of the object source. Only quaranteed to
- * be set for additions and deletions.
- *
- * @return an object identifying the parent of the source of this event
- */
- public Object getParent();
- /**
- * Set the parent
- */
- public void setParent(Object parent);
-
- /**
- * Returns the grandparent of the object source. Only quaranteed to
- * be set for special case events, which have a special contract with
- * the SystemView
- *
- * @return an object identifying the grandparent of the source of this event
- */
- public Object getGrandParent();
- /**
- * Return the position value. Used in ADD events.
- * @return position to add the new item to. A negative number indicates an append operation
- */
- public int getPosition();
- /**
- * Set the position value. Used in ADD events.
- * @param position zero-based position to insert the new item. A negative number indicates an append operation
- */
- public void setPosition(int position);
-
- /**
- * For relative add events, return the previous node this is being added after
- */
- public Object getRelativePrevious();
- /**
- * For relative add events, set the previous node this is being added after
- */
- public void setRelativePrevious(Object previousObject);
-
- /**
- * Returns the type of the event.
- * @see org.eclipse.rse.model.ISystemResourceChangeEvents
- * @return a type that is one of the constants in this interface
- */
- public int getType();
- /**
- * Set the type
- * @see org.eclipse.rse.model.ISystemResourceChangeEvents
- */
- public void setType(int type);
-
- /**
- * Set the originating viewer. For some events, this allows responding viewers to decide if the event applies to them
- */
- public void setOriginatingViewer(Viewer viewer);
- /**
- * Get the originating viewer. For some events, this allows responding viewers to decide if the event applies to them
- */
- public Viewer getOriginatingViewer();
-
- /**
- * Set the viewer Item of the currently selected object. This is a clue when we want to
- * expand and select only the specific instance of this widget in this view.
- */
- public void setViewerItem(Item item);
- /**
- * Get the viewer Item of the currently selected object. This is a clue when we want to
- * expand and select only the specific instance of this widget in this view.
- */
- public Item getViewerItem();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvents.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvents.java
deleted file mode 100644
index 552563a84..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvents.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-
-
-
-/**
- * Interface of event ID constants
- */
-public interface ISystemResourceChangeEvents
-{
- /**
- * The event is specifically a filter reference add (filter added)
- */
- public static final int EVENT_ADD_FILTER_REFERENCE = 10;
- /**
- * The event is specifically a filter reference rename (filter renamed)
- */
- public static final int EVENT_RENAME_FILTER_REFERENCE = 15;
- /**
- * The event is specifically a filter reference delete (filter deleted)
- */
- public static final int EVENT_DELETE_FILTER_REFERENCE = 20;
- /**
- * The event is specifically a filter reference change (filter strings changes)
- */
- public static final int EVENT_CHANGE_FILTER_REFERENCE = 25;
- /**
- * The event is specifically a filter reference move (filters reordered)
- */
- public static final int EVENT_MOVE_FILTER_REFERENCES = 30;
-
- /**
- * The event is specifically a filter string reference add (filterstring added)
- */
- public static final int EVENT_ADD_FILTERSTRING_REFERENCE = 41;
- /**
- * The event is specifically a filter string reference delete (filterstring deleted)
- */
- public static final int EVENT_DELETE_FILTERSTRING_REFERENCE = 42;
- /**
- * The event is specifically a filter string reference change (filterstring changed)
- */
- public static final int EVENT_CHANGE_FILTERSTRING_REFERENCE = 43;
- /**
- * The event is specifically a filter string reference move (filterstrings reordered)
- */
- public static final int EVENT_MOVE_FILTERSTRING_REFERENCES = 44;
-
- /**
- * The event is a resource add.
- */
- public static final int EVENT_ADD = 50;
- /**
- * The event is a multi-resource add.
- */
- public static final int EVENT_ADD_MANY = 51;
-
- /**
- * The event is a resource add. The resource is added relative to the "previous" attribute .
- */
- public static final int EVENT_ADD_RELATIVE = 53;
- /*
- * The event is a multi-resource add. The resources are added relative to the "previous" attribute
- *
- public static final int EVENT_ADD_MANY_RELATIVE = 54;
- */
-
- /**
- * After an add, you wish to expand the parent to reveal and select the new child.
- * This is a harmless operation if the parent was already expanded when EVENT_ADD was sent.
- */
- public static final int EVENT_REVEAL_AND_SELECT = 52;
- /**
- * The event is a single resource deletion.
- */
- public static final int EVENT_DELETE = 55;
- /*
- * The event is a single remote resource deletion. You need only set the source, not the parent
- *
- public static final int EVENT_DELETE_REMOTE = 56; */
-
- /**
- * The event is a multiple resource deletion.
- */
- public static final int EVENT_DELETE_MANY = 60;
- /*
- * The event is a multiple resource deletion. You need only set the multisource, not the parent
- *
- public static final int EVENT_DELETE_REMOTE_MANY = 61; */
-
- /**
- * The event is a resource rename.
- */
- public static final int EVENT_RENAME = 65;
- /*
- * The event is a remote resource rename. You need only set the source, not the parent
- *
- public static final int EVENT_RENAME_REMOTE = 66; */
-
- /**
- * The event is a resource move within the same children set
- */
- //public static final int EVENT_MOVE = 70;
- /**
- * The event is a multiple resource move within the same children set
- */
- public static final int EVENT_MOVE_MANY = 75;
- /**
- * The event is a resource change. This results in a shallow refresh: only direct children are refreshed.
- */
- //public static final int EVENT_CHANGE = 80;
- /**
- * The event is an icon change event
- */
- public static final int EVENT_ICON_CHANGE = 81;
- /**
- * The event is a full refresh event: all expanded sub-nodes are re-queried for their children, unexpanded nodes lose their children cache.
- */
- public static final int EVENT_REFRESH = 82;
- /**
- * The event is a selection-dependent refresh event: all expanded sub-nodes are re-queried for their children, unexpanded nodes lose their children cache.
- */
- public static final int EVENT_REFRESH_SELECTED = 83;
- /**
- * The event is a selection-dependent refresh event: refreshes the parent of the current selections
- */
- public static final int EVENT_REFRESH_SELECTED_PARENT = 84;
- /**
- * The event is a selection-dependent refresh event: from the filter level, all expanded sub-nodes are re-queried for their children, unexpanded nodes lose their children cache.
- */
- public static final int EVENT_REFRESH_SELECTED_FILTER = 135;
- /**
- * The event is refreshes a remote object (has an ISystemViewRemoteElementAdapter) given either the remote object or a string that will match on getAbsoluteName.
- * The tricky part about remote objects is their actual memory object changes on each refresh, so to find one in the tree we must use something
- * more permanent: hence the use of getAbsoluteName to find it.
- * <p>
- * You can optionally pass a child remote object, or string, or vector of objects or strings, in the parent parameter, and it/they will be selected after the refresh.
- * If it a string then it must be the result of getAbsoluteName on the adapter.
- */
- public static final int EVENT_REFRESH_REMOTE = 85;
-
- /**
- * The event is a resource property change.
- */
- public static final int EVENT_PROPERTY_CHANGE = 86;
- /**
- * The event is a request to update the property sheet of whatever is currently selected.
- */
- public static final int EVENT_PROPERTYSHEET_UPDATE = 87;
-
- /**
- * The event is a resource property change that invalidates child nodes
- * in the GUI (eg, hostname change means the expanded information should
- * be collapsed)
- */
- public static final int EVENT_MUST_COLLAPSE = 90;
- /**
- * The event is a full collapse of the RSE tree
- * Pass "false" for the src value to prevent the memory flush, else
- * pass any dummy value for the src to prevent crash, but it is ignored
- */
- public static final int EVENT_COLLAPSE_ALL = 91;
- /**
- * The event is a collapse of the selected elements in the tree
- * Pass any dummy value for the src to prevent crash, but it is ignored
- */
- public static final int EVENT_COLLAPSE_SELECTED = 92;
- /**
- * The event is an expand of the selected elements in the tree
- * Pass any dummy value for the src to prevent crash, but it is ignored
- */
- public static final int EVENT_EXPAND_SELECTED = 93;
- /**
- * The event is a generic notification that the children have changed
- * and must be refreshed.
- */
- public static final int EVENT_CHANGE_CHILDREN = 95;
- /**
- * The event is simply to force selection of the given object.
- */
- public static final int EVENT_SELECT = 100;
- /**
- * The event is to select a remote object
- */
- public static final int EVENT_SELECT_REMOTE = 101;
-
- /**
- * The event is to both select and expand the given object.
- */
- public static final int EVENT_SELECT_EXPAND = 105;
- /**
- * The event is to log a command that has been run
- */
- public static final int EVENT_COMMAND_RUN = 110;
- /**
- * The event is to log a message from a command that has been run
- */
- public static final int EVENT_COMMAND_MESSAGE = 115;
- /**
- * The event is to replace the children (similar to EVENT_ADD_MANY), it will
- * expand also
- */
- public static final int EVENT_REPLACE_CHILDREN = 120;
- /**
- * The event is to log a command that has been run
- */
- public static final int EVENT_COMPILE_COMMAND_RUN = 125;
- /**
- * The event is to update the command history drop-down in the remote shell view
- */
- public static final int EVENT_COMMAND_HISTORY_UPDATE = 130;
-
- /**
- * The event is to update the remote shell view when a command is finished
- * @deprecated use EVENT_COMMAND_SHELL_FINISHED
- */
- public static final int EVENT_COMMAND_FINISHED = 140;
-
- /**
- * The event is to update the remote shell view when a command is finished
- */
- public static final int EVENT_COMMAND_SHELL_FINISHED = 140;
- public static final int EVENT_COMMAND_SHELL_REMOVED = 141;
-
- /**
- * The event is to update the search view when a search is finished
- */
- public static final int EVENT_SEARCH_FINISHED = 150;
-
- /**
- * Predefined event object for a property sheet update.
- */
- public static final ISystemResourceChangeEvent PROPERTYSHEET_UPDATE_EVENT =
- new SystemResourceChangeEvent("dummy",EVENT_PROPERTYSHEET_UPDATE,null); //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeListener.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeListener.java
deleted file mode 100644
index 2634701d2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeListener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-import java.util.EventListener;
-
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Interface that listeners interesting in changes to remote
- * system connections and subsystems can listen implement and
- * subsequently register their interest in via SystemRegistry.
- */
-public interface ISystemResourceChangeListener extends EventListener
-{
- /**
- * This is the method in your class that will be called when a
- * system resource changes.
- * @see ISystemResourceChangeEvent
- */
- public void systemResourceChanged(ISystemResourceChangeEvent event);
- /**
- * This is the method in your class that will be called to return the
- * shell for your viewer
- */
- public Shell getShell();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemEscapeCharHelper.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemEscapeCharHelper.java
deleted file mode 100644
index a75b7f45f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemEscapeCharHelper.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-
-public class SystemEscapeCharHelper {
-
-
- private static char ESCAPE_CHAR = '#';
-
- private char changedChars[];
- private int escapeStringLength;
-
-
- /**
- * Constructor.
- * @param chars array of chars to be escaped.
- */
- public SystemEscapeCharHelper (char[] chars)
- {
- changedChars = new char[chars.length+1];
-
- for (int i = 0; i < chars.length; i++)
- {
- changedChars[i]=chars[i];
- }
-
- // add the escape character itself so that it itself can be escaped
- changedChars[chars.length]=ESCAPE_CHAR;
-
- escapeStringLength = 4;
-
- }
-
- public String getStringForFileName(String name)
- {
- String fileName = name;
-
- int i = 0;
- while (i < fileName.length())
- {
- for (int j = 0; j < changedChars.length; j++)
- {
- if (fileName.charAt(i) == changedChars[j])
- {
- if ((fileName.length()-1) >= i)
- {
- fileName = fileName.substring(0, i) + escapeString(changedChars[j]) + fileName.substring(i+1);
- }
- else
- {
- fileName = fileName.substring(0, i) + escapeString(changedChars[j]);
- }
- i = i + escapeStringLength-1;
- }
- }
- i++;
- }
-
- return fileName;
-
- }
-
- public String getStringFromFileName(String fileName)
- {
- String name = fileName;
-
- int i = 0;
- while (i < name.length())
- {
- if (name.charAt(i) == ESCAPE_CHAR)
- {
- if ((name.length()-2) >= i)
- {
- name = name.substring(0, i) + originalString(name.substring(i+1, i+escapeStringLength)) + name.substring(i+escapeStringLength);
- }
- else
- {
- name = name.substring(0, i) + originalString(name.substring(i+1));
- }
- }
- i++;
- }
-
- return name;
- }
-
- private String escapeString(char c)
- {
- /* for (int i = 0; i < changedChars.length; i++)
- {
- if (changedChars[i]== c)
- {
- return ""+ESCAPE_CHAR+i;
- }
- }
- return ""+c;
- */
-
- int intValue = c;
- String returnStr=""+ESCAPE_CHAR; //$NON-NLS-1$
-
- if (intValue < 10)
- returnStr = returnStr+"00"; //$NON-NLS-1$
- else if (intValue < 100)
- returnStr = returnStr+"0"; //$NON-NLS-1$
-
- return returnStr + intValue;
-
- }
-
- private String originalString(String s)
- {
- // return ""+changedChars[Integer.parseInt(s)];
-
- char c = (char)Integer.parseInt(s);
-
- return ""+c; //$NON-NLS-1$
- }
-
-
-
-/* TEST HARNESS */
-/* public static void main(String[] args)
- {
- try {
- char [] charArray = new char[1];
-
- charArray[0]='\'';
- SystemEscapeCharHelper helper = new
-SystemEscapeCharHelper(charArray);
-
- System.out.println(">>>>>start>>>>>");
-
-
- String[] strings = {"'hello_world'", "'", "'abc'", "bca", "ca'_'b"};
- for (int i = 0; i < strings.length; i++)
- {
- String escaped = helper.getStringForFileName(strings[i]);
-
- System.out.println("escaped:"+escaped+":");
-
- String unescaped = helper.getStringFromFileName(escaped);
-
- System.out.println("unescaped:"+unescaped+":");
- System.out.println("***");
- }
- System.out.println("*****end*****");
-
-
- } catch (Exception e){
- System.out.println(""+e.toString());
-
-// try{
-// System.in.read();
-// }catch(Exception ex)
-// {
-// }
-
- }
-// try{
-// System.in.read();
-// }catch(Exception e)
-// {}
-}*/
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemFilterStringContentsType.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemFilterStringContentsType.java
deleted file mode 100644
index 8643d5580..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemFilterStringContentsType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-
-import org.eclipse.rse.core.model.ISystemContentsType;
-
-/**
- * Represents contents that are children of a container
- */
-public class SystemFilterStringContentsType implements ISystemContentsType
-{
- public static String CONTENTS_TYPE_CHILDREN_PARENTS = "contents_children_parents"; //$NON-NLS-1$
- public static SystemFilterStringContentsType _instance = new SystemFilterStringContentsType();
-
- public static SystemFilterStringContentsType getInstance()
- {
- return _instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.IRemoteContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_CHILDREN_PARENTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.model.IRemoteContentsType#isPersistent()
- */
- public boolean isPersistent()
- {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java
deleted file mode 100644
index 389b0fefa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java
+++ /dev/null
@@ -1,3262 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. 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:
- * Michael Scharf (Wind River) - patch for an NPE in getSubSystemConfigurations()
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSEUserIdConstants;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemAdapterHelpers;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemPerspectiveHelpers;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterStartHere;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISubSystemConfigurationCategories;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemHostPool;
-import org.eclipse.rse.core.model.ISystemModelChangeEvent;
-import org.eclipse.rse.core.model.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.ISystemModelChangeListener;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.model.ISystemPreferenceChangeEvent;
-import org.eclipse.rse.core.model.ISystemPreferenceChangeListener;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemChildrenContentsType;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.filters.SystemFilterPool;
-import org.eclipse.rse.filters.SystemFilterReference;
-import org.eclipse.rse.filters.SystemFilterStartHere;
-import org.eclipse.rse.internal.model.SystemHostPool;
-import org.eclipse.rse.internal.model.SystemModelChangeEvent;
-import org.eclipse.rse.internal.model.SystemModelChangeEventManager;
-import org.eclipse.rse.internal.model.SystemPostableEventNotifier;
-import org.eclipse.rse.internal.model.SystemPreferenceChangeManager;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-import org.eclipse.rse.internal.model.SystemRemoteChangeEventManager;
-import org.eclipse.rse.internal.model.SystemResourceChangeManager;
-import org.eclipse.rse.internal.model.SystemScratchpad;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewInputProvider;
-import org.eclipse.rse.ui.view.SystemDNDTransferRunnable;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.rse.ui.view.SystemViewDataDropAdapter;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.part.PluginTransferData;
-import org.eclipse.ui.part.ResourceTransfer;
-
-
-/**
- * Registry for all connections.
- */
-public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEvents, ISystemViewInputProvider
-{
-
- private static Exception lastException = null;
- private static ISystemRegistry registry = null;
- private SystemResourceChangeManager listenerManager = null;
- private SystemPreferenceChangeManager preferenceListManager = null;
- private SystemModelChangeEventManager modelListenerManager = null;
- private SystemModelChangeEvent modelEvent;
- private SystemRemoteChangeEventManager remoteListManager = null;
- private SystemRemoteChangeEvent remoteEvent;
-
- private int listenerCount = 0;
- private int modelListenerCount = 0;
- private int remoteListCount = 0;
-
- private ISubSystemConfigurationProxy[] subsystemFactoryProxies = null;
- private boolean errorLoadingFactory = false;
- private Viewer viewer = null;
- // progress monitor support
- private IRunnableContext currentRunnableContext;
- private Shell currentRunnableContextShell;
- private Vector previousRunnableContexts = new Vector();
- private Vector previousRunnableContextShells = new Vector();
-
- private Clipboard clipboard = null;
- private SystemScratchpad scratchpad = null;
-
- /**
- * Constructor.
- * This is protected as the singleton instance should be retrieved by
- * calling getSystemRegistry().
- * @param logfilePath Root folder. Where to place the log file.
- */
- protected SystemRegistry(String logfilePath)
- {
- super();
-
- listenerManager = new SystemResourceChangeManager();
- modelListenerManager = new SystemModelChangeEventManager();
- remoteListManager = new SystemRemoteChangeEventManager();
- preferenceListManager = new SystemPreferenceChangeManager();
-
- // get initial shell
- //FIXME - this can cause problems - don't think we should do this here anyway
- //getShell(); // will quietly fail in headless mode. Phil
-
- registry = this;
- restore();
- }
- /**
- * Reset for a full refresh from disk, such as after a team synch
- */
- public void reset()
- {
- SystemHostPool.reset();
- restore();
- }
-
- // ----------------------------
- // PUBLIC STATIC METHODS...
- // ----------------------------
-
- /**
- * Return singleton instance. Must be used on first instantiate.
- * @param logfilePath Root folder. Where to place the log file.
- */
- public static ISystemRegistry getSystemRegistry(String logfilePath)
- {
- if (registry == null)
- new SystemRegistry(logfilePath);
- return registry;
- }
- /**
- * Return singleton instance assuming it already exists.
- */
- public static ISystemRegistry getSystemRegistry()
- {
- return registry;
- }
-
- /**
- * Ensure given path ends with path separator.
- */
- public static String addPathTerminator(String path)
- {
- if (!path.endsWith(File.separator))
- {
- path = path + File.separatorChar;
- }
- return path;
- }
-
- // ----------------------------------
- // UI METHODS...
- // ----------------------------------
- /**
- * Show the RSE perspective if it is not already showing
- */
- public void showRSEPerspective()
- {
- SystemPerspectiveHelpers.openRSEPerspective();
- }
- /**
- * Expand the given connection in the RSE, if the RSE is the active perspective.
- */
- public void expandHost(IHost conn)
- {
- if (SystemPerspectiveHelpers.isRSEPerspectiveActive())
- {
- // find the RSE tree view
- SystemView rseView = SystemPerspectiveHelpers.findRSEView();
- if (rseView != null)
- {
- // find and expand the given connection
- rseView.setExpandedState(conn, true); // expand this connection
- rseView.setSelection(new StructuredSelection(conn));
- }
- }
- }
- /**
- * Expand the given subsystem in the RSE, if the RSE is the active perspective.
- */
- public void expandSubSystem(ISubSystem subsystem)
- {
- if (SystemPerspectiveHelpers.isRSEPerspectiveActive())
- {
- // find the RSE tree view
- SystemView rseView = SystemPerspectiveHelpers.findRSEView();
- if (rseView != null)
- {
- // find and expand the given subsystem's connection, and then subsystem
- rseView.setExpandedState(subsystem.getHost(), true); // expand this connection
- rseView.setExpandedState(subsystem, true);
- rseView.setSelection(new StructuredSelection(subsystem));
- }
- }
- }
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
- /**
- * Return the children objects to consistute the root elements in the system view tree.
- * We return all connections for all active profiles.
- */
- public Object[] getSystemViewRoots()
- {
- //DKM - only return enabled connections now
- IHost[] connections = getHosts();
- List result = new ArrayList();
- for (int i = 0; i < connections.length; i++) {
- IHost con = connections[i];
- IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(con.getSystemType());
- if (sysType != null) { // sysType can be null if workspace contains a host that is no longer defined by the workbench
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class));
- if (adapter.isEnabled(sysType)) {
-
- // Bug 154524 Local node is shown in RSE even though the Local subsystem is not installed
- // so we check for subsystems
- ISubSystem[] subsystems = con.getSubSystems();
-
- if (subsystems != null && subsystems.length != 0) {
- result.add(con);
- }
- }
- }
- }
- return result.toArray();
- }
- /**
- * Return true if {@link #getSystemViewRoots()} will return a non-empty list
- * We return true if there are any connections for any active profile.
- */
- public boolean hasSystemViewRoots()
- {
- return (getHostCount() > 0);
- }
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- return getSubSystems(selectedConnection);
- }
- /**
- * This method is called by the connection adapter when deciding to show a plus-sign
- * or not beside a connection. Return true if this connection has children to be shown.
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- return true; // much faster and safer
- /*
- boolean hasSubsystems = false;
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; (!hasSubsystems) && (idx < subsystemFactoryProxies.length); idx++)
- {
- if (subsystemFactoryProxies[idx].appliesToSystemType(selectedConnection.getSystemType()) &&
- subsystemFactoryProxies[idx].isSubSystemConfigurationActive())
- {
- SubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- {
- SubSystem[] sss = factory.getSubSystems(selectedConnection, SubSystemConfiguration.LAZILY);
- if ((sss != null) && (sss.length>0))
- hasSubsystems = true;
- }
- else
- hasSubsystems = false;
- }
- else
- hasSubsystems = true;
- }
- }
- else
- hasSubsystems = true;
- return hasSubsystems;
- */
- }
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
- /**
- * Set the shell in case it is needed for anything.
- * The label and content provider will call this.
- */
- public void setShell(Shell shell)
- {
- }
-
- /**
- * Return the shell of the current viewer
- */
-
- // thread safe shell
- public Shell getShell()
- {
- IWorkbench workbench = RSEUIPlugin.getDefault().getWorkbench();
- if (workbench != null)
- {
- // first try to get the active workbench window
- IWorkbenchWindow ww = workbench.getActiveWorkbenchWindow();
- if (ww == null) // no active window so just get the first one
- ww = workbench.getWorkbenchWindows()[0];
- if (ww != null)
- {
- Shell shell = ww.getShell();
- if (!shell.isDisposed())
- {
- return shell;
- }
- }
- }
- return null;
- }
-
- /**
- * Return true to show the action bar (ie, toolbar) above the viewer.
- * The action bar contains connection actions, predominantly.
- */
- public boolean showActionBar()
- {
- return true;
- }
- /**
- * Return true to show the button bar above the viewer.
- * The tool bar contains "Get List" and "Refresh" buttons and is typicall
- * shown in dialogs that list only remote system objects.
- */
- public boolean showButtonBar()
- {
- return false;
- }
- /**
- * Return true to show right-click popup actions on objects in the tree.
- */
- public boolean showActions()
- {
- return true;
- }
- /**
- * Set the viewer in case it is needed for anything.
- * The label and content provider will call this.
- */
- public void setViewer(Viewer viewer)
- {
- this.viewer = viewer;
- }
- /**
- * Return the viewer we are currently associated with
- */
- public Viewer getViewer()
- {
- return viewer;
- }
- /**
- * Return true if we are listing connections or not, so we know whether we are interested in
- * connection-add events
- */
- public boolean showingConnections()
- {
- return true;
- }
-
- // ----------------------------------
- // ACTIVE PROGRESS MONITOR METHODS...
- // ----------------------------------
- /**
- * Set the current active runnable context to be used for a progress monitor
- * by the subsystem methods that go to the host. Called by wizards and dialogs
- * that have a built-in progress monitor and hence removes the need to popup
- * an intrusive pm dialog.
- * <p><b>You must call clearRunnableContext when your dialog/wizard is disposed!</b>
- * @param shell The shell of the wizard/dialog. This is recorded so it can be tested if
- * it is disposed before attempting to use the context
- * @param context The dialog/wizard/view that implements IRunnableContext
- */
- public void setRunnableContext(Shell shell, IRunnableContext context)
- {
- //this.currentRunnableContext = context;
- //this.currentRunnableContextShell = shell;
- pushRunnableContext(shell, context);
- }
- /**
- * Clear the current active runnable context to be used for a progress monitor.
- * Be sure to call this from you dispose method.
- */
- public void clearRunnableContext()
- {
- //this.currentRunnableContext = null;
- //this.currentRunnableContextShell = null;
- popRunnableContext();
- }
- /**
- * Return the current registered runnable context, or null if none registered. Use this
- * for long running operations instead of an intrusive progress monitor dialog as it is
- * more user friendly. Many dialogs/wizards have these built in so it behooves us to use it.
- */
- public IRunnableContext getRunnableContext()
- {
- if ((currentRunnableContextShell != null) && currentRunnableContextShell.isDisposed())
- clearRunnableContext();
- if (currentRunnableContext != null)
- return currentRunnableContext;
- else
- return null;
- }
-
- private IRunnableContext popRunnableContext()
- {
- Shell shell = null;
- boolean found = false;
- Vector disposedShells = new Vector();
- Vector disposedContexts = new Vector();
- for (int idx = previousRunnableContextShells.size() - 1; !found && (idx >= 0); idx--)
- {
- shell = (Shell) previousRunnableContextShells.elementAt(idx);
- if ((shell == currentRunnableContextShell) || shell.isDisposed())
- {
- disposedShells.add(shell);
- disposedContexts.add(previousRunnableContexts.elementAt(idx));
- }
- else
- {
- found = true;
- currentRunnableContextShell = shell;
- currentRunnableContext = (IRunnableContext) previousRunnableContexts.elementAt(idx);
- }
- }
- if (!found)
- {
- currentRunnableContextShell = null;
- currentRunnableContext = null;
- }
- for (int idx = 0; idx < disposedShells.size(); idx++)
- {
- previousRunnableContextShells.remove(disposedShells.elementAt(idx));
- previousRunnableContexts.remove(disposedContexts.elementAt(idx));
- }
-
- return currentRunnableContext;
- }
-
- private IRunnableContext pushRunnableContext(Shell shell, IRunnableContext context)
- {
- previousRunnableContexts.addElement(context);
- previousRunnableContextShells.addElement(shell);
- currentRunnableContextShell = shell;
- currentRunnableContext = context;
- return currentRunnableContext;
- }
-
- // ----------------------------
- // SUBSYSTEM FACTORY METHODS...
- // ----------------------------
-
- /**
- * Private method used by RSEUIPlugin to tell registry all registered subsystem
- * factories. This way, all code can use this registry to access them versus the
- * RSEUIPlugin.
- */
- public void setSubSystemConfigurationProxies(ISubSystemConfigurationProxy[] proxies)
- {
- subsystemFactoryProxies = proxies;
- //for (int idx=0; idx<proxies.length; idx++)
- // proxies[idx].setLogFile(logFile);
- }
- /**
- * Public method to retrieve list of subsystem factory proxies registered by extension points.
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies()
- {
- return subsystemFactoryProxies;
- }
-
- /**
- * Return all subsystem factory proxies matching a subsystem factory category.
- * @see ISubSystemConfigurationCategories
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(String factoryCategory)
- {
- Vector v = new Vector();
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- if (subsystemFactoryProxies[idx].getCategory().equals(factoryCategory))
- v.addElement(subsystemFactoryProxies[idx]);
- }
- ISubSystemConfigurationProxy[] proxies = new ISubSystemConfigurationProxy[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- {
- proxies[idx] = (ISubSystemConfigurationProxy) v.elementAt(idx);
- }
- return proxies;
- }
-
- /**
- * Return the parent subsystem configuration given a subsystem object.
- */
- public ISubSystemConfiguration getSubSystemConfiguration(ISubSystem subsystem)
- {
- return subsystem.getSubSystemConfiguration();
- }
-
- /**
- * Return the subsystem configuration, given its plugin.xml-declared id.
- */
- public ISubSystemConfiguration getSubSystemConfiguration(String id)
- {
- ISubSystemConfigurationProxy[] proxies = getSubSystemConfigurationProxies();
- ISubSystemConfiguration match = null;
- for (int idx = 0;(match == null) && idx < proxies.length; idx++)
- {
- if (proxies[idx].getId().equals(id))
- match = proxies[idx].getSubSystemConfiguration();
- }
- return match;
- }
-
-
-
- /**
- * Return all subsystem factories which have declared themselves part of the given category.
- * <p>
- * This looks for a match on the "category" of the subsystem factory's xml declaration
- * in its plugin.xml file. Thus, it is effecient as it need not bring to life a
- * subsystem factory just to test its parent class type.
- *
- * @see ISubSystemConfigurationCategories
- */
- public ISubSystemConfiguration[] getSubSystemConfigurationsByCategory(String factoryCategory)
- {
- Vector v = new Vector();
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- if (subsystemFactoryProxies[idx].getCategory().equals(factoryCategory))
- {
- ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- v.addElement(factory);
- }
- }
- }
- ISubSystemConfiguration[] factories = new ISubSystemConfiguration[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- {
- factories[idx] = (ISubSystemConfiguration) v.elementAt(idx);
- }
- return factories;
- }
-
- public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType)
- {
- return getSubSystemConfigurationsBySystemType(systemType, false);
- }
-
- /**
- * Return all subsystem factories which support the given system type. If the type is null,
- * returns all.
- *
- */
- public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType, boolean filterDuplicateServiceSubSystemFactories)
- {
- List serviceTypesAdded = new ArrayList();
- List serviceImplsAdded = new ArrayList();
- Vector v = new Vector();
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- ISubSystemConfigurationProxy ssfProxy = subsystemFactoryProxies[idx];
- if (ssfProxy.appliesToSystemType(systemType))
- {
- ISubSystemConfiguration ssFactory = ssfProxy.getSubSystemConfiguration();
- if (ssFactory != null)
- {
- if (ssFactory instanceof IServiceSubSystemConfiguration && filterDuplicateServiceSubSystemFactories)
- {
- IServiceSubSystemConfiguration serviceFactory = (IServiceSubSystemConfiguration)ssFactory;
- Class serviceType = serviceFactory.getServiceType();
- Class serviceImplType = serviceFactory.getServiceImplType();
- boolean containsThisServiceType = serviceTypesAdded.contains(serviceType);
- boolean containsThisServiceImplType = serviceImplsAdded.contains(serviceImplType);
-
- if (!containsThisServiceType)
- {
- serviceTypesAdded.add(serviceType);
- serviceImplsAdded.add(serviceImplType);
- v.addElement(ssFactory);
- }
- else if (containsThisServiceImplType)
- {
- // remove the other one
- for (int i = 0; i < v.size(); i++)
- {
- if (v.get(i) instanceof IServiceSubSystemConfiguration)
- {
- IServiceSubSystemConfiguration addedConfig = (IServiceSubSystemConfiguration)v.get(i);
- if (addedConfig.getServiceType() == serviceType)
- {
- v.remove(addedConfig);
- }
- }
-
- }
-
- v.addElement(ssFactory);
- }
- }
- else
- {
- v.addElement(ssFactory);
- }
- }
- }
- }
- }
- ISubSystemConfiguration[] factories = new ISubSystemConfiguration[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- factories[idx] = (ISubSystemConfiguration) v.elementAt(idx);
- return factories;
- }
-
- // ----------------------------
- // USER PREFERENCE METHODS...
- // ----------------------------
- /**
- * Are connection names to be qualified by profile name?
- */
- public boolean getQualifiedHostNames()
- {
- return SystemPreferencesManager.getPreferencesManager().getQualifyConnectionNames();
- }
- /**
- * Set if connection names are to be qualified by profile name
- */
- public void setQualifiedHostNames(boolean set)
- {
- SystemPreferencesManager.getPreferencesManager().setQualifyConnectionNames(set);
- IHost[] conns = getHosts();
- if (conns != null)
- {
- for (int idx = 0; idx < conns.length; idx++)
- {
- fireEvent(new SystemResourceChangeEvent(conns[idx], ISystemResourceChangeEvents.EVENT_RENAME, this));
- }
- }
- if (SystemPreferencesManager.getPreferencesManager().getShowFilterPools())
- {
- fireEvent(new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, this));
- }
-
- }
-
- /**
- * Reflect the user changing the preference for showing filter pools.
- */
- public void setShowFilterPools(boolean show)
- {
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- if (subsystemFactoryProxies[idx].isSubSystemConfigurationActive())
- {
- ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if ((factory != null) && factory.supportsFilters())
- factory.setShowFilterPools(show);
- }
- }
- }
- }
- /*
- * Reflect the user changing the preference for showing filter strings.
- *
- public void setShowFilterStrings(boolean show)
- {
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- if (subsystemFactoryProxies[idx].isSubSystemConfigurationActive())
- {
- SubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if ((factory!=null)&&factory.supportsFilters())
- factory.setShowFilterStrings(show);
- }
- }
- }
- }*/
- /**
- * Reflect the user changing the preference for showing new connection prompt
- */
- public void setShowNewHostPrompt(boolean show)
- {
- fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, null));
- }
-
- // ----------------------------
- // PROFILE METHODS...
- // ----------------------------
- /**
- * Return singleton profile manager
- */
- public ISystemProfileManager getSystemProfileManager()
- {
- return SystemProfileManager.getSystemProfileManager();
- }
-
- /**
- * Return the profiles currently selected by the user as his "active" profiles
- */
- public ISystemProfile[] getActiveSystemProfiles()
- {
- return getSystemProfileManager().getActiveSystemProfiles();
- }
- /**
- * Return the profile names currently selected by the user as his "active" profiles
- */
- public String[] getActiveSystemProfileNames()
- {
- return getSystemProfileManager().getActiveSystemProfileNames();
- }
- /**
- * Return all defined profiles
- */
- public ISystemProfile[] getAllSystemProfiles()
- {
- return getSystemProfileManager().getSystemProfiles();
- }
- /**
- * Return all defined profile names
- */
- public String[] getAllSystemProfileNames()
- {
- return getSystemProfileManager().getSystemProfileNames();
- }
- /**
- * Return all defined profile names as a vector
- */
- public Vector getAllSystemProfileNamesVector()
- {
- return getSystemProfileManager().getSystemProfileNamesVector();
- }
-
- /**
- * Get a SystemProfile given its name
- */
- public ISystemProfile getSystemProfile(String profileName)
- {
- return getSystemProfileManager().getSystemProfile(profileName);
- }
-
- /**
- * Create a SystemProfile given its name and whether or not to make it active
- */
- public ISystemProfile createSystemProfile(String profileName, boolean makeActive) throws Exception
- {
- ISystemProfileManager mgr = getSystemProfileManager();
- ISystemProfile profile = mgr.createSystemProfile(profileName, makeActive);
- if (makeActive)
- {
- //fireEvent(new SystemResourceChangeEvent(profile,ISystemResourceChangeEvent.EVENT_ADD,this));
- }
- fireModelChangeEvent(SYSTEM_RESOURCE_ADDED, SYSTEM_RESOURCETYPE_PROFILE, profile, null);
- return profile;
- }
-
- /**
- * Rename a SystemProfile. Rename is propogated to all subsystem factories so
- * they can rename their filter pool managers and whatever else is required.
- */
- public void renameSystemProfile(ISystemProfile profile, String newName) throws Exception
- {
- /* FIXME
- // first, pre-test for folder-in-use error:
- IResource testResource = SystemResourceManager.getProfileFolder(profile);
- boolean inUse = SystemResourceManager.testIfResourceInUse(testResource);
- if (inUse)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage((testResource instanceof IFolder) ? ISystemMessages.MSG_FOLDER_INUSE : ISystemMessages.MSG_FILE_INUSE);
- msg.makeSubstitution(testResource.getFullPath());
- throw new SystemMessageException(msg);
- }
- */
-
- // step 0: force everything into memory! Very important to do this!
- loadAll();
- // step 0_a: get the proxies and the relavent connections...
- ISubSystemConfigurationProxy[] proxies = getSubSystemConfigurationProxies();
- IHost[] connections = getHostsByProfile(profile);
- String oldName = profile.getName();
-
- // step 0_b: pre-test if any of the subfolder or file renames will fail...
- if (proxies != null)
- {
- for (int idx = 0; idx < proxies.length; idx++)
- {
- // the following call will throw an exception if any of the affected folders/files are in use.
- if (proxies[idx] != null && proxies[idx].getSubSystemConfiguration() != null)
- proxies[idx].getSubSystemConfiguration().preTestRenameSubSystemProfile(oldName);
- }
- }
-
- // step 1: update connection pool. This is simply the in-memory name of the pool.
- ISystemHostPool profilePool = getHostPool(profile);
- profilePool.renameHostPool(newName);
-
- // step 2: rename profile and its folder on disk
- getSystemProfileManager().renameSystemProfile(profile, newName);
-
- // step 3: for every subsystem factory, ask it to rename its filter pool manager,
- // and more importantly the folder name that manager holds.
- if (proxies != null)
- {
- for (int idx = 0; idx < proxies.length; idx++)
- {
- // Hmm, in v4 we only did this for active factories. That can't be right, as it needs to be done
- // for EVERY factory. Hence this commented line of code, new for v5 (and to fix a bug I found in
- // profile renaming... the local connection's filter pool folder was not renamed). Phil...
- //if (proxies[idx].isSubSystemConfigurationActive())
- ISubSystemConfiguration factory = proxies[idx].getSubSystemConfiguration();
- if (factory != null)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)factory.getAdapter(ISubSystemConfigurationAdapter.class);
- adapter.renameSubSystemProfile(factory,oldName, newName);
- }
- }
- }
-
- // step 4: update every subsystem for every connection in this profile.
- // important to do this AFTER the profile is renamed.
- for (int idx = 0; idx < connections.length; idx++)
- {
- ISubSystem[] subsystems = getSubSystems(connections[idx]);
- for (int jdx = 0; jdx < subsystems.length; jdx++)
- {
- ISubSystem ss = subsystems[jdx];
- ISubSystemConfiguration ssf = ss.getSubSystemConfiguration();
- ssf.renameSubSystemProfile(ss, oldName, newName);
- }
- }
- SystemPreferencesManager.getPreferencesManager().setConnectionNamesOrder(); // update preferences order list
- boolean namesQualifed = getQualifiedHostNames();
- if (namesQualifed)
- setQualifiedHostNames(namesQualifed); // causes refresh events to be fired
-
- fireModelChangeEvent(SYSTEM_RESOURCE_RENAMED, SYSTEM_RESOURCETYPE_PROFILE, profile, oldName);
- }
- /**
- * Copy a SystemProfile. All connections connection data is copied.
- * @param monitor Progress monitor to reflect each step of the operation
- * @param profile Source profile to copy
- * @param newName Unique name to give copied profile
- * @param makeActive whether to make the copied profile active or not
- * @return new SystemProfile object
- */
- public ISystemProfile copySystemProfile(IProgressMonitor monitor, ISystemProfile profile, String newName, boolean makeActive) throws Exception
- {
- Exception lastExc = null;
- boolean failed = false;
- String msg = null;
- String oldName = profile.getName();
- IHost[] newConns = null;
-
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(), "Start of system profile copy. From: "+oldName+" to: "+newName+", makeActive: "+makeActive);
- // STEP 0: BRING ALL IMPACTED SUBSYSTEM FACTORIES TO LIFE NOW, BEFORE CREATING THE NEW PROFILE.
- // IF WE DO NOT DO THIS NOW, THEN THEY WILL CREATE A FILTER POOL MGR FOR THE NEW PROFILE AS THEY COME
- // TO LIFE... SOMETHING WE DON'T WANT!
- loadAll(); // force the world into memory!
- IHost[] conns = getHostsByProfile(profile);
- Vector factories = getSubSystemFactories(conns);
- if (errorLoadingFactory)
- return null;
-
- // STEP 1: CREATE NEW SYSTEM PROFILE
- ISystemProfile newProfile = getSystemProfileManager().cloneSystemProfile(profile, newName);
-
- try
- {
- // STEP 2: CREATE NEW SYSTEM CONNECTION POOL
- ISystemHostPool oldPool = getHostPool(profile);
- ISystemHostPool newPool = getHostPool(newProfile);
-
- // STEP 3: COPY ALL CONNECTIONS FROM OLD POOL TO NEW POOL
- //try { java.lang.Thread.sleep(2000l); } catch (InterruptedException e) {}
- if ((conns != null) && (conns.length > 0))
- {
- newConns = new IHost[conns.length];
- SystemMessage msgNoSubs = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYCONNECTION_PROGRESS);
- for (int idx = 0; idx < conns.length; idx++)
- {
- msgNoSubs.makeSubstitution(conns[idx].getAliasName());
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), msgNoSubs.getLevelOneText());
- monitor.subTask(msgNoSubs.getLevelOneText());
-
- newConns[idx] = oldPool.cloneHost(newPool, conns[idx], conns[idx].getAliasName());
-
- monitor.worked(1);
- //try { java.lang.Thread.sleep(3000l); } catch (InterruptedException e) {}
- }
- }
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTERPOOLS_PROGRESS).getLevelOneText();
- monitor.subTask(msg);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg);
-
- // STEP 4: CREATE NEW FILTER POOL MANAGER
- // STEP 5: COPY ALL FILTER POOLS FROM OLD MANAGER TO NEW MANAGER
- for (int idx = 0; idx < factories.size(); idx++)
- {
- ISubSystemConfiguration factory = (ISubSystemConfiguration) factories.elementAt(idx);
- msg = "Copying filterPools for factory " + factory.getName(); //$NON-NLS-1$
- //monitor.subTask(msg);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg);
- factory.copyFilterPoolManager(profile, newProfile);
- //try { java.lang.Thread.sleep(3000l); } catch (InterruptedException e) {}
- }
-
- monitor.worked(1);
-
- // STEP 6: COPY ALL SUBSYSTEMS FOR EACH COPIED CONNECTION
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYSUBSYSTEMS_PROGRESS).getLevelOneText();
- monitor.subTask(msg);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg);
- if ((conns != null) && (conns.length > 0))
- {
- ISubSystem[] subsystems = null;
- ISubSystemConfiguration factory = null;
- for (int idx = 0; idx < conns.length; idx++)
- {
- msg = "Copying subsystems for connection " + conns[idx].getAliasName(); //$NON-NLS-1$
- //monitor.subTask(msg);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg);
- subsystems = getSubSystems(conns[idx]); // get old subsystems for this connection
- if ((subsystems != null) && (subsystems.length > 0))
- {
- for (int jdx = 0; jdx < subsystems.length; jdx++)
- {
- msg += ": subsystem " + subsystems[jdx].getName(); //$NON-NLS-1$
- //monitor.subTask(msg);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg);
- factory = subsystems[jdx].getSubSystemConfiguration();
- factory.cloneSubSystem(subsystems[jdx], newConns[idx], true); // true=>copy profile op vs copy connection op
- //try { java.lang.Thread.sleep(3000l); } catch (InterruptedException e) {}
- }
- }
- //try { java.lang.Thread.sleep(1000l); } catch (InterruptedException e) {}
- }
- }
- monitor.worked(1);
- }
- catch (Exception exc)
- {
- failed = true;
- lastExc = exc;
- }
- // if anything failed, we have to back out what worked. Ouch!
- if (failed)
- {
- try
- {
- if (newConns != null)
- for (int idx = 0; idx < newConns.length; idx++)
- deleteHost(newConns[idx]);
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- factory.deletingSystemProfile(newProfile);
- }
- getSystemProfileManager().deleteSystemProfile(newProfile, true);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Exception (ignored) cleaning up from copy-profile exception.", exc); //$NON-NLS-1$
- }
- throw (lastExc);
- }
-
- // LAST STEP: MAKE NEW PROFILE ACTIVE IF SO REQUESTED: NO, CAN'T DO IT HERE BECAUSE OF THREAD VIOLATIONS!
- //if (makeActive)
- //setSystemProfileActive(newProfile, true);
-
- fireModelChangeEvent(SYSTEM_RESOURCE_ADDED, SYSTEM_RESOURCETYPE_PROFILE, newProfile, null);
-
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "Copy of system profile " + oldName + " to " + newName + " successful"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return newProfile;
- }
-
- /**
- * Delete a SystemProfile. Prior to physically deleting the profile, we delete all
- * the connections it has (first disconnecting if they are connected), and all the subsystems they have.
- * <p>
- * As well, all the filter pools for this profile are deleted, and subsequently any
- * cross references from subsystems in connections in other profiles are removed.
- * <p>
- * A delete event is fired for every connection deleted.
- */
- public void deleteSystemProfile(ISystemProfile profile) throws Exception
- {
- // step 0: load the world!
- loadAll(); // force the world into memory!
-
- // step 1: delete subsystems and connections
- IHost[] connections = getHostsByProfile(profile);
- //SystemConnectionPool pool = getConnectionPool(profile);
- for (int idx = 0; idx < connections.length; idx++)
- {
- deleteHost(connections[idx]);
- }
- // step 2: bring to life every factory and ask it to delete all filter pools for this profile
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- factory.deletingSystemProfile(profile);
- }
- }
- // last step... physically blow away the profile...
- getSystemProfileManager().deleteSystemProfile(profile, true);
- SystemPreferencesManager.getPreferencesManager().setConnectionNamesOrder(); // update preferences order list
- if ((connections != null) && (connections.length > 0)) // defect 42112
- fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(connections, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this));
-
- fireModelChangeEvent(SYSTEM_RESOURCE_REMOVED, SYSTEM_RESOURCETYPE_PROFILE, profile, null);
- }
-
- /**
- * Make or unmake the given profile active.
- * If switching to inactive, we force a disconnect for all subsystems of all connections in this profile.
- */
- public void setSystemProfileActive(ISystemProfile profile, boolean makeActive)
- {
- // Test if there are any filter pools in this profile that are referenced by another active profile...
- Vector activeReferenceVector = new Vector();
- if (!makeActive && (subsystemFactoryProxies != null))
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- //if (subsystemFactoryProxies[idx].isSubSystemConfigurationActive()) // don't bother if not yet alive
- {
- ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- {
- ISubSystem[] activeReferences = factory.testForActiveReferences(profile);
- if (activeReferences != null)
- for (int jdx = 0; jdx < activeReferences.length; jdx++)
- activeReferenceVector.addElement(activeReferences[jdx]);
- }
- }
- }
- }
- if (activeReferenceVector.size() > 0)
- {
- SystemBasePlugin.logWarning(
- ISystemMessages.MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED
- + ": De-Activativing profile " //$NON-NLS-1$
- + profile.getName()
- + " for which there are subsystems containing references to filter pools:"); //$NON-NLS-1$
- for (int idx = 0; idx < activeReferenceVector.size(); idx++)
- {
- ISubSystem activeReference = (ISubSystem) activeReferenceVector.elementAt(idx);
- SystemBasePlugin.logWarning(
- " " + activeReference.getName() + " in connection " + activeReference.getHost().getAliasName() + " in profile " + activeReference.getSystemProfileName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- ISubSystem firstSubSystem = (ISubSystem) activeReferenceVector.elementAt(0);
- String connectionName = firstSubSystem.getHost().getSystemProfileName() + "." + firstSubSystem.getHost().getAliasName(); //$NON-NLS-1$
- SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED);
- sysMsg.makeSubstitution(profile.getName(), connectionName);
- SystemBasePlugin.logWarning(sysMsg.getFullMessageID() + ": " + sysMsg.getLevelOneText()); //$NON-NLS-1$
- SystemMessageDialog msgDlg = new SystemMessageDialog(null, sysMsg);
- msgDlg.open();
- }
-
- getSystemProfileManager().makeSystemProfileActive(profile, makeActive);
-
- // To be safe, we tell each subsystem factory about the change in status.
- // At a minimum, each factory may have to load the subsystems for connections that
- // are suddenly active.
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- if (subsystemFactoryProxies[idx].isSubSystemConfigurationActive()) // don't bother if not yet alive
- {
- ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- factory.changingSystemProfileActiveStatus(profile, makeActive);
- }
- }
- }
-
- IHost[] affectedConnections = getHostsByProfile(profile);
- //System.out.println("Affected Connection Count: " + affectedConnections.length);
-
- // delete...
- if (!makeActive) // better disconnect all connections before we lose sight of them
- {
- if ((affectedConnections != null) && (affectedConnections.length > 0))
- {
- for (int idx = 0; idx < affectedConnections.length; idx++)
- {
- disconnectAllSubSystems(affectedConnections[idx]);
- }
- SystemResourceChangeEvent event = new org.eclipse.rse.model.SystemResourceChangeEvent(affectedConnections, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this);
- fireEvent(event);
- }
- }
- // add...
- else if ((affectedConnections != null) && (affectedConnections.length > 0))
- {
- SystemResourceChangeEvent event = new org.eclipse.rse.model.SystemResourceChangeEvent(affectedConnections, ISystemResourceChangeEvents.EVENT_ADD_MANY, this);
- fireEvent(event);
- }
- SystemPreferencesManager.getPreferencesManager().setConnectionNamesOrder(); // update preferences order list
-
- fireModelChangeEvent(SYSTEM_RESOURCE_CHANGED, SYSTEM_RESOURCETYPE_PROFILE, profile, null);
- }
-
- // private profile methods...
-
- /**
- * Get a SystemProfile given a connection pool
- */
- private ISystemProfile getSystemProfile(ISystemHostPool pool)
- {
- return pool.getSystemProfile();
- }
- /**
- * Get a SystemProfile name given a connection pool
- */
- private String getSystemProfileName(ISystemHostPool pool)
- {
- ISystemProfile profile = getSystemProfile(pool);
- if (profile == null) return null; // MJB: Defect 45678
- else return profile.getName();
- }
- public IConnectorService[] getConnectorServices(IHost conn)
- {
- List csList = new ArrayList();
- // DKM for now, I'll just use the subsystems to get at the systems
- // but later with new model, we should be getting these directly
- ISubSystem[] sses = getSubSystems(conn);
- for (int i = 0; i < sses.length; i++)
- {
- ISubSystem ss = sses[i];
- IConnectorService service = ss.getConnectorService();
- if (!csList.contains(service))
- {
- csList.add(service);
- }
- }
- return (IConnectorService[])csList.toArray(new IConnectorService[csList.size()]);
- }
-
- /**
- * Return list of subsystem objects for a given connection.
- * Demand pages the subsystem factories into memory if they aren't already.
- * <p>
- * To protect against crashes, if there are no subsystems, an array of length zero is returned.
- */
- public ISubSystem[] getSubSystems(IHost conn)
- {
- return getSubSystems(conn, ISubSystemConfiguration.FORCE_INTO_MEMORY);
- }
-
- /**
- * Return list of subsystem objects for a given connection.
- * Demand pages the subsystem factories into memory if they aren't already.
- * <p>
- * To protect against crashes, if there are no subsystems, an array of length zero is returned.
- */
- public ISubSystem[] getSubSystems(IHost conn, boolean force)
- {
- ISubSystem[] subsystems = null;
- Vector v = new Vector();
-
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType()))
- {
- ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- {
- ISubSystem[] sss = factory.getSubSystems(conn, force);
- if (sss != null)
- for (int jdx = 0; jdx < sss.length; jdx++)
- v.addElement(sss[jdx]);
- }
- }
- }
- //if (v.size() > 0)
- //{
- subsystems = new ISubSystem[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- subsystems[idx] = (ISubSystem) v.elementAt(idx);
- //}
- }
- return subsystems;
- }
-
- /**
- * Resolve a subsystem from it's absolute name. The absolute name of a subsystem
- * is denoted by <I>profileName</I>.<I>connectionName</I>:<I>subsystemFactoryId</I>
- *
- * @param absoluteSubSystemName the name of the subsystem
- *
- * @return the subsystem
- */
- public ISubSystem getSubSystem(String absoluteSubSystemName)
- {
- // first extract subsystem id
- int profileDelim = absoluteSubSystemName.indexOf("."); //$NON-NLS-1$
- int connectionDelim = absoluteSubSystemName.indexOf(":", profileDelim + 1); //$NON-NLS-1$
-
- if (profileDelim > 0 && connectionDelim > profileDelim)
- {
- String srcProfileName = absoluteSubSystemName.substring(0, profileDelim);
- String srcConnectionName = absoluteSubSystemName.substring(profileDelim + 1, connectionDelim);
- String srcSubSystemConfigurationId = absoluteSubSystemName.substring(connectionDelim + 1, absoluteSubSystemName.length());
-
- return getSubSystem(srcProfileName, srcConnectionName, srcSubSystemConfigurationId);
- }
-
- return null;
- }
-
- /**
- * Resolve a subsystem from it's profile, connection and subsystem name.
- *
- * @param srcProfileName the name of the profile
- * @param srcConnectionName the name of the connection
- * @param subsystemFactoryId the factory Id of the subsystem
- *
- * @return the subsystem
- */
- public ISubSystem getSubSystem(String srcProfileName, String srcConnectionName, String subsystemFactoryId)
- {
- // find the src connection
- IHost[] connections = registry.getHostsByProfile(srcProfileName);
- if (connections == null)
- {
- // if the profile can't be found, get all connections
- connections = registry.getHosts();
- }
-
- for (int i = 0; i < connections.length; i++)
- {
- IHost connection = connections[i];
- String connectionName = connection.getAliasName();
-
- if (connectionName.equals(srcConnectionName))
- {
- ISubSystem[] subsystems = getSubSystems(connection);
- for (int s = 0; s < subsystems.length; s++)
- {
- ISubSystem subsystem = subsystems[s];
- String compareId = subsystem.getConfigurationId();
- if (compareId.equals(subsystemFactoryId))
- {
- return subsystem;
- }
- else
- {
- // for migration purposes, test the against the name
- // we used to use the subsystem name instead of the factory Id
- if (subsystem.getName().equals(subsystemFactoryId))
- {
- return subsystem;
- }
- }
- }
- }
- }
-
- return null;
- }
-
- /**
- * Return the absolute name for the specified subsystem
- * @param the subsystem
- * @return the absolute name of the subsystem
- */
- public String getAbsoluteNameForSubSystem(ISubSystem subSystem)
- {
- StringBuffer dataStream = new StringBuffer();
-
- String profileName = subSystem.getSystemProfileName();
- String connectionName = subSystem.getHostAliasName();
- String factoryId = subSystem.getConfigurationId();
-
- dataStream.append(profileName);
- dataStream.append("."); //$NON-NLS-1$
- dataStream.append(connectionName);
- dataStream.append(":"); //$NON-NLS-1$
- dataStream.append(factoryId);
- return dataStream.toString();
- }
-
- /**
- * Return the absolute name for the specified connection
- * @param the connection
- * @return the absolute name of the connection
- */
- public String getAbsoluteNameForConnection(IHost connection)
- {
- StringBuffer dataStream = new StringBuffer();
-
- String profileName = connection.getSystemProfileName();
- String connectionName = connection.getAliasName();
-
- dataStream.append(profileName);
- dataStream.append("."); //$NON-NLS-1$
- dataStream.append(connectionName);
- return dataStream.toString();
- }
-
-
- /**
- * Return list of subsystem objects for a given connection, but does not force
- * as-yet-non-restored subsystems to come to life.
- * <p>
- * To protect against crashes, if there are no subsystems, an array of length zero is returned.
- */
- public ISubSystem[] getSubSystemsLazily(IHost conn)
- {
- ISubSystem[] subsystems = null;
- Vector v = new Vector();
-
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType()) && subsystemFactoryProxies[idx].isSubSystemConfigurationActive())
- {
- ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- {
- ISubSystem[] sss = factory.getSubSystems(conn, ISubSystemConfiguration.LAZILY);
- if (sss != null)
- for (int jdx = 0; jdx < sss.length; jdx++)
- v.addElement(sss[jdx]);
- }
- }
- }
- //if (v.size() > 0)
- //{
- subsystems = new ISubSystem[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- subsystems[idx] = (ISubSystem) v.elementAt(idx);
- //}
- }
- return subsystems;
- }
-
- /**
- * Get a list of subsystem objects owned by the subsystem factory identified by
- * its given plugin.xml-described id. Array is never null, but may be of length 0.
- * <p>
- * This is a list that of all subsystems for all connections owned by the factory.
- */
- public ISubSystem[] getSubSystems(String factoryId)
- {
- ISubSystemConfiguration factory = getSubSystemConfiguration(factoryId);
- if (factory == null)
- return (new ISubSystem[0]);
- //return factory.getSubSystems();
- return factory.getSubSystems(true); // true ==> force full restore from disk
- }
-
- public ISubSystem[] getServiceSubSystems(Class serviceType, IHost connection)
- {
- List matches = new ArrayList();
- ISubSystem[] allSS = connection.getSubSystems();
- for (int i = 0; i < allSS.length; i++)
- {
- ISubSystem ss = allSS[i];
- if (ss instanceof IServiceSubSystem)
- {
- IServiceSubSystem serviceSubSystem = (IServiceSubSystem)ss;
- if (serviceSubSystem.getServiceType() == serviceType)
- {
- matches.add(ss);
- }
- }
- }
- return (ISubSystem[])matches.toArray(new ISubSystem[matches.size()]);
- }
-
- /**
- * Get a list of subsystem objects for given connection, owned by the subsystem factory
- * identified by its given plugin.xml-described id. Array will never be null but may be length zero.
- */
- public ISubSystem[] getSubSystems(String factoryId, IHost connection)
- {
- ISubSystemConfiguration factory = getSubSystemConfiguration(factoryId);
- if (factory == null)
- return (new ISubSystem[0]);
- return factory.getSubSystems(connection, ISubSystemConfiguration.FORCE_INTO_MEMORY);
- }
- /**
- * Get a list of subsystem objects for given connection, owned by a subsystem factory
- * that is of the given category. Array will never be null but may be length zero.
- * <p>
- * This looks for a match on the "category" of the subsystem factory's xml declaration
- * in its plugin.xml file.
- *
- * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories
- */
- public ISubSystem[] getSubSystemsBySubSystemConfigurationCategory(String factoryCategory, IHost connection)
- {
- ISubSystem[] subsystems = getSubSystems(connection);
- if ((subsystems != null) && (subsystems.length > 0))
- {
- Vector v = new Vector();
- for (int idx = 0; idx < subsystems.length; idx++)
- if (subsystems[idx].getSubSystemConfiguration().getCategory().equals(factoryCategory))
- v.addElement(subsystems[idx]);
- ISubSystem[] sss = new ISubSystem[v.size()];
- for (int idx = 0; idx < sss.length; idx++)
- sss[idx] = (ISubSystem) v.elementAt(idx);
- return sss;
- }
- else
- return (new ISubSystem[0]);
- }
-
-
- /**
- * @return all subsystem configurations. Be careful when you call this, as it activates all
- * subsystem factories.
- */
- // fixed Bugzilla Bug 160115 - added non-null guard for config
- public ISubSystemConfiguration[] getSubSystemConfigurations() {
- Vector v = new Vector();
- ISubSystemConfigurationProxy[] proxies = getSubSystemConfigurationProxies();
- if (proxies != null) {
- for (int idx = 0; idx < proxies.length; idx++) {
- ISubSystemConfigurationProxy proxy = proxies[idx];
- ISubSystemConfiguration config = proxy.getSubSystemConfiguration();
- if (config != null) {
- v.add(proxies[idx].getSubSystemConfiguration());
- }
- }
- }
- ISubSystemConfiguration[] result = new ISubSystemConfiguration[v.size()];
- v.toArray(result);
- return result;
- }
-
- /**
- * Return Vector of subsystem factories that apply to a given system connection
- */
- protected Vector getSubSystemFactories(IHost conn)
- {
- Vector factories = new Vector();
- errorLoadingFactory = false;
- return getSubSystemFactories(conn, factories);
- }
-
- /**
- * Return Vector of subsystem factories that apply to a given system connection, updating given vector
- */
- protected Vector getSubSystemFactories(IHost conn, Vector factories)
- {
- ISubSystem[] subsystems = getSubSystems(conn);
- if (subsystems != null)
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- ISubSystemConfiguration ssFactory = subsystems[idx].getSubSystemConfiguration();
- if (ssFactory == null)
- errorLoadingFactory = true;
- if ((ssFactory != null) && !factories.contains(ssFactory))
- factories.add(ssFactory);
- }
- return factories;
- }
-
- /**
- * Return Vector of subsystem factories that apply to a given system connection array
- */
- protected Vector getSubSystemFactories(IHost[] conns)
- {
- Vector factories = new Vector();
- errorLoadingFactory = false;
- if (conns != null)
- for (int idx = 0; idx < conns.length; idx++)
- {
- getSubSystemFactories(conns[idx], factories);
- }
- return factories;
- }
-
- /**
- * Delete a subsystem object. This code finds the factory that owns it and
- * delegates the request to that factory.
- */
- public boolean deleteSubSystem(ISubSystem subsystem)
- {
- ISubSystemConfiguration ssFactory = getSubSystemConfiguration(subsystem);
- if (ssFactory == null)
- return false;
- boolean ok = ssFactory.deleteSubSystem(subsystem);
- return ok;
- }
-
- // ----------------------------
- // PRIVATE CONNECTION METHODS...
- // ----------------------------
- /**
- * Return a connection pool given a profile name
- */
- private ISystemHostPool getHostPool(String profileName)
- {
- ISystemProfile profile = getSystemProfileManager().getSystemProfile(profileName);
- if (profile == null)
- {
- return null;
- }
- return getHostPool(profile);
- }
- /**
- * Return a connection pool given a profile
- */
- private ISystemHostPool getHostPool(ISystemProfile profile)
- {
- lastException = null;
- try
- {
- return SystemHostPool.getSystemHostPool(profile);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Exception in getConnectionPool for " + profile.getName(), exc); //$NON-NLS-1$
- lastException = exc;
- }
- catch (Throwable t)
- {
- SystemBasePlugin.logError("Exception in getConnectionPool for " + profile.getName(), t); //$NON-NLS-1$
- }
- return null;
- }
- /**
- * Return connection pools for active profiles. One per.
- */
- private ISystemHostPool[] getHostPools()
- {
- ISystemProfile[] profiles = getSystemProfileManager().getActiveSystemProfiles();
- ISystemHostPool[] pools = new ISystemHostPool[profiles.length];
- for (int idx = 0; idx < pools.length; idx++)
- {
- try
- {
- pools[idx] = SystemHostPool.getSystemHostPool(profiles[idx]);
- }
- catch (Exception exc)
- {
- }
- }
- return pools;
- }
-
- // ----------------------------
- // PUBLIC CONNECTION METHODS...
- // ----------------------------
-
- /**
- * Return the first connection to localhost we can find. While we always create a default one in
- * the user's profile, it is possible that this profile is not active or the connection was deleted.
- * However, since any connection to localHost will usually do, we just search all active profiles
- * until we find one, and return it. <br>
- * If no localhost connection is found, this will return null. If one is needed, it can be created
- * easily by calling {@link #createLocalHost(ISystemProfile, String, String)}.
- */
- public IHost getLocalHost()
- {
- IHost localConn = null;
- IHost[] conns = getHostsBySystemType(IRSESystemType.SYSTEMTYPE_LOCAL);
- if (conns != null && conns.length > 0) return conns[0];
- else return localConn;
- }
-
- /**
- * Return all connections in all active profiles. Never returns null, but may return a zero-length array.
- */
- public IHost[] getHosts()
- {
- ISystemHostPool[] pools = getHostPools();
- Vector v = new Vector();
- for (int idx = 0; idx < pools.length; idx++)
- {
- IHost[] conns = getHostsByProfile(getSystemProfileName(pools[idx]));
- if (conns != null)
- for (int jdx = 0; jdx < conns.length; jdx++)
- v.addElement(conns[jdx]);
- }
- IHost[] allConns = new IHost[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- allConns[idx] = (IHost) v.elementAt(idx);
- return allConns;
- }
- /**
- * Return all connections in a given profile.
- */
- public IHost[] getHostsByProfile(ISystemProfile profile)
- {
- ISystemHostPool pool = getHostPool(profile);
- return pool.getHosts();
- }
- /**
- * Return all connections in a given profile name.
- */
- public IHost[] getHostsByProfile(String profileName)
- {
- ISystemHostPool pool = getHostPool(profileName);
- if (pool != null)
- {
- return pool.getHosts();
- }
- else
- {
- return null;
- }
- }
- /**
- * Return all connections for which there exists one or more subsystems owned
- * by a given subsystem factory.
- * @see #getSubSystemConfiguration(String)
- */
- public IHost[] getHostsBySubSystemConfiguration(ISubSystemConfiguration factory)
- {
- /* The following algorithm failed because factory.getSubSystems() only returns
- * subsystems that have been restored, which are only those that have been
- * expanded.
- */
- ISubSystem[] subsystems = factory.getSubSystems(true); // true ==> force full restore
- Vector v = new Vector();
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- IHost conn = subsystems[idx].getHost();
- if (!v.contains(conn))
- v.addElement(conn);
- }
- IHost[] conns = new IHost[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- {
- conns[idx] = (IHost) v.elementAt(idx);
- }
- return conns;
- }
- /**
- * Return all connections for which there exists one or more subsystems owned
- * by a given subsystem factory, identified by factory Id
- */
- public IHost[] getHostsBySubSystemConfigurationId(String factoryId)
- {
- return getHostsBySubSystemConfiguration(getSubSystemConfiguration(factoryId));
- }
- /**
- * Return all connections for which there exists one or more subsystems owned
- * by any child classes of a given subsystem factory category.
- * <p>
- * This looks for a match on the "category" of the subsystem factory's xml declaration
- * in its plugin.xml file. Thus, it is effecient as it need not bring to live a
- * subsystem factory just to test its parent class type.
- *
- * @see ISubSystemConfigurationCategories
- */
- public IHost[] getHostsBySubSystemConfigurationCategory(String factoryCategory)
- {
- Vector v = new Vector();
- if (subsystemFactoryProxies != null)
- {
- for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
- {
- if (subsystemFactoryProxies[idx].getCategory().equals(factoryCategory))
- {
- ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- {
- ISubSystem[] subsystems = factory.getSubSystems(true); // true ==> force full restore
- if (subsystems != null)
- for (int jdx = 0; jdx < subsystems.length; jdx++)
- {
- IHost conn = subsystems[jdx].getHost();
- if (!v.contains(conn))
- v.addElement(conn);
- }
- }
- }
- }
- }
- IHost[] conns = new IHost[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- {
- conns[idx] = (IHost) v.elementAt(idx);
- }
- return conns;
- }
-
- /**
- * Return all connections for all active profiles, for the given system type.
- * Never returns null!
- */
- public IHost[] getHostsBySystemType(String systemType)
- {
- IHost[] connections = getHosts();
- Vector v = new Vector();
- for (int idx = 0; idx < connections.length; idx++)
- {
- if (connections[idx].getSystemType().equals(systemType))
- v.addElement(connections[idx]);
- }
- IHost[] conns = new IHost[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- conns[idx] = (IHost) v.elementAt(idx);
- return conns;
- }
- /**
- * Return all connections for all active profiles, for the given system types.
- * Never returns null!
- */
- public IHost[] getHostsBySystemTypes(String[] systemTypes)
- {
- IHost[] connections = getHosts();
- Vector v = new Vector();
- for (int idx = 0; idx < connections.length; idx++)
- {
- String systemType = connections[idx].getSystemType();
- boolean match = false;
- for (int jdx = 0; !match && (jdx < systemTypes.length); jdx++)
- if (systemType.equals(systemTypes[jdx]))
- match = true;
- if (match)
- v.addElement(connections[idx]);
- }
- IHost[] conns = new IHost[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- conns[idx] = (IHost) v.elementAt(idx);
- return conns;
- }
-
- /**
- * Return a SystemConnection object given a system profile containing it,
- * and an connection name uniquely identifying it.
- */
- public IHost getHost(ISystemProfile profile, String connectionName)
- {
- return getHostPool(profile).getHost(connectionName);
- }
- /**
- * Return the zero-based position of a SystemConnection object within its profile.
- */
- public int getHostPosition(IHost conn)
- {
- ISystemHostPool pool = conn.getHostPool();
- return pool.getHostPosition(conn);
- }
- /**
- * Return the zero-based position of a SystemConnection object within all active profiles.
- */
- public int getHostPositionInView(IHost conn)
- {
- IHost[] conns = getHosts();
- int pos = -1;
- for (int idx = 0;(pos == -1) && (idx < conns.length); idx++)
- {
- if (conns[idx] == conn)
- pos = idx;
- }
- return pos;
- }
-
- /**
- * Return the number of SystemConnection objects within the given profile
- */
- public int getHostCount(String profileName)
- {
- return getHostPool(profileName).getHostCount();
- }
- /**
- * Return the number of SystemConnection objects within the given connection's owning profile
- */
- public int getHostCountWithinProfile(IHost conn)
- {
- return conn.getHostPool().getHostCount();
- }
-
- /**
- * Return the number of SystemConnection objects within all active profiles
- */
- public int getHostCount()
- {
- ISystemHostPool[] pools = getHostPools();
- int total = 0;
- for (int idx = 0; idx < pools.length; idx++)
- {
- total += pools[idx].getHostCount();
- }
- return total;
- }
-
- /**
- * Return a vector of previously-used connection names in the given named profile.
- * @return Vector of String objects.
- */
- public Vector getHostAliasNames(String profileName)
- {
- ISystemHostPool pool = getHostPool(profileName);
- Vector names = new Vector();
- IHost[] conns = pool.getHosts();
- for (int idx = 0; idx < conns.length; idx++)
- {
- names.addElement(conns[idx].getAliasName());
- }
- return names;
- }
- /**
- * Return a vector of previously-used connection names in the given profile.
- * @return Vector of String objects.
- */
- public Vector getHostAliasNames(ISystemProfile profile)
- {
- return getHostAliasNames(profile.getName());
- }
- /**
- * Return a vector of previously-used connection names in all active profiles.
- */
- public Vector getHostAliasNamesForAllActiveProfiles()
- {
- ISystemHostPool[] allPools = getHostPools();
- Vector allNames = new Vector();
- for (int idx = 0; idx < allPools.length; idx++)
- {
- Vector v = getHostAliasNames(getSystemProfileName(allPools[idx]));
- for (int jdx = 0; jdx < v.size(); jdx++)
- allNames.addElement(v.elementAt(jdx));
- }
- return allNames;
- }
-
- /**
- * Return array of all previously specified hostnames.
- */
- public String[] getHostNames()
- {
- return getHostNames(null);
- }
- /**
- * Return array of previously specified hostnames for a given system type.
- * After careful consideration, it is decided that if the system type is null,
- * then no hostnames should be returned. Previously all for all types were returned.
- */
- public String[] getHostNames(String systemType)
- {
- Vector v = new Vector();
-
- if (systemType != null)
- {
- IHost[] conns = getHosts();
- for (int idx = 0; idx < conns.length; idx++)
- {
- if (!v.contains(conns[idx].getHostName()))
- {
- if (conns[idx].getSystemType().equals(systemType))
- v.addElement(conns[idx].getHostName());
- }
- }
- }
- if ((systemType != null) && (systemType.equals(IRSESystemType.SYSTEMTYPE_LOCAL) && (v.size() == 0)))
- v.addElement("localhost"); //$NON-NLS-1$
- String[] names = new String[v.size()];
- for (int idx = 0; idx < names.length; idx++)
- names[idx] = (String) v.elementAt(idx);
- return names;
- }
-
- /**
- * Returns the clipboard used for copy actions
- */
- public Clipboard getSystemClipboard()
- {
- if (clipboard == null)
- {
- Display display = null;
- Shell shell = getShell();
- if (shell == null)
- {
- display = Display.getDefault();
- }
- else
- {
- display = shell.getDisplay();
- }
- clipboard = new Clipboard(display);
- }
-
- return clipboard;
- }
-
- /**
- * Method for decoding an source object ID to the actual source object.
- * We determine the profile, connection and subsystem, and then
- * we use the SubSystem.getObjectWithKey() method to get at the
- * object.
- *
- */
- private Object getObjectFor(String str)
- {
- // first extract subsystem id
- int connectionDelim = str.indexOf(":"); //$NON-NLS-1$
- int subsystemDelim = str.indexOf(":", connectionDelim + 1); //$NON-NLS-1$
-
- String subSystemId = str.substring(0, subsystemDelim);
- String srcKey = str.substring(subsystemDelim + 1, str.length());
-
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem subSystem = registry.getSubSystem(subSystemId);
- if (subSystem != null)
- {
- Object result = null;
- try
- {
- result = subSystem.getObjectWithAbsoluteName(srcKey);
- }
- catch (SystemMessageException e)
- {
- return e.getSystemMessage();
- }
- catch (Exception e)
- {
- }
- if (result != null)
- {
- return result;
- }
- else
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
- msg.makeSubstitution(srcKey, subSystem.getHostAliasName());
- return msg;
- }
- }
- else
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND);
- msg.makeSubstitution(subSystemId);
- return msg;
- }
- }
-
- public List getSystemClipboardObjects(int srcType)
- {
- Clipboard clipboard = getSystemClipboard();
- ArrayList srcObjects = new ArrayList();
- Object object = null;
-
- if (srcType == SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE)
- {
-
- // determine the source objects
- object = clipboard.getContents(PluginTransfer.getInstance());
-
- if (object instanceof PluginTransferData)
- {
- // RSE transfer
- PluginTransferData data = (PluginTransferData) object;
- byte[] result = data.getData();
-
- //StringTokenizer tokenizer = new StringTokenizer(new String(result), SystemViewDataDropAdapter.RESOURCE_SEPARATOR);
- String[] tokens = (new String(result)).split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR); //$NON-NLS-1$
-
- for (int i = 0;i < tokens.length; i++)
- {
- String srcStr = tokens[i];
-
- Object srcObject = getObjectFor(srcStr);
- srcObjects.add(srcObject);
- }
- }
- }
- else if (srcType == SystemDNDTransferRunnable.SRC_TYPE_ECLIPSE_RESOURCE)
- {
- // Resource transfer
- ResourceTransfer resTransfer = ResourceTransfer.getInstance();
- object = clipboard.getContents(resTransfer);
- if (object != null)
- {
- IResource[] resourceData = (IResource[]) object;
- for (int i = 0; i < resourceData.length; i++)
- {
- srcObjects.add(resourceData[i]);
- }
- }
- }
-
- else if (srcType == SystemDNDTransferRunnable.SRC_TYPE_OS_RESOURCE)
- {
- // Local File transfer
- FileTransfer fileTransfer = FileTransfer.getInstance();
- object = clipboard.getContents(fileTransfer);
- if (object != null)
- {
- String[] fileData = (String[]) object;
- if (fileData != null)
- {
- for (int i = 0; i < fileData.length; i++)
- {
- srcObjects.add(fileData[i]);
- }
- }
- }
- }
- else if (srcType == SystemDNDTransferRunnable.SRC_TYPE_TEXT)
- {
- TextTransfer textTransfer = TextTransfer.getInstance();
- object = clipboard.getContents(textTransfer);
- if (object != null)
- {
- String textData = (String) object;
- if (textData != null)
- {
- srcObjects.add(textData);
- }
- }
- }
- return srcObjects;
- }
-
- /*
- * Returns the remote systems scratchpad root
- */
- public SystemScratchpad getSystemScratchPad()
- {
- if (scratchpad == null)
- {
- scratchpad = new SystemScratchpad();
- }
- return scratchpad;
- }
-
-
- /**
- * Convenience method to create a local connection, as it often that one is needed
- * for access to the local file system.
- * @param profile - the profile to create this connection in. If null is passed, we first
- * try to find the default private profile and use it, else we take the first active profile.
- * @param name - the name to give this profile. Must be unique and non-null.
- * @param userId - the user ID to use as the default for the subsystems. Can be null.
- */
- public IHost createLocalHost(ISystemProfile profile, String name, String userId)
- {
- IHost localConn = null;
- if (profile == null)
- profile = getSystemProfileManager().getDefaultPrivateSystemProfile();
- if (profile == null)
- profile = getSystemProfileManager().getActiveSystemProfiles()[0];
-
- try
- {
- localConn = createHost(
- profile.getName(), IRSESystemType.SYSTEMTYPE_LOCAL,
- name, // connection name
- "localhost", // hostname //$NON-NLS-1$
- "", // description //$NON-NLS-1$
- // DY: defect 42101, description cannot be null
- // null, // description
- userId, // default user Id
- IRSEUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE, null);
-
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error creating local connection", exc); //$NON-NLS-1$
- }
- return localConn;
- }
-
- /**
- * Create a connection object, given the connection pool and given all the possible attributes.
- * <p>
- * THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN
- * THE PROFILE YOU SPECIFY. THE PROFILE IS ALSO SAVED TO DISK.
- * <p>
- * This method:
- * <ul>
- * <li>creates and saves a new connection within the given profile
- * <li>calls all subsystem factories to give them a chance to create a subsystem instance
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners
- * </ul>
- * <p>
- * @param profileName Name of the system profile the connection is to be added to.
- * @param systemType system type matching one of the system type names defined via the
- * systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @param defaultUserId userId to use as the default for the subsystems.
- * @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
- * that tells us where to set the user Id
- * @param newConnectionWizardPages when called from the New Connection wizard this is union of the list of additional
- * wizard pages supplied by the subsystem factories that pertain to the specified system type. Else null.
- * @return SystemConnection object, or null if it failed to create. This is typically
- * because the connectionName is not unique. Call getLastException() if necessary.
- */
- public IHost createHost(
- String profileName,
- String systemType,
- String connectionName,
- String hostName,
- String description,
- String defaultUserId,
- int defaultUserIdLocation,
- ISystemNewConnectionWizardPage[] newConnectionWizardPages)
- throws Exception
- {
- lastException = null;
- ISystemHostPool pool = getHostPool(profileName);
- IHost conn = null;
- boolean promptable = false; // systemType.equals(IRSESystemType.SYSTEMTYPE_PROMPT);
- try
- {
- // create, register and save new connection...
- if ((defaultUserId != null) && (defaultUserId.length() == 0))
- defaultUserId = null;
- conn = pool.createHost(systemType, connectionName, hostName, description, defaultUserId, defaultUserIdLocation);
- if (conn == null) // conn already exists
- {
- conn = pool.getHost(connectionName);
- }
- if (promptable)
- conn.setPromptable(true);
- }
- catch (Exception exc)
- {
- lastException = exc;
- SystemBasePlugin.logError("Exception in createConnection for " + connectionName, exc); //$NON-NLS-1$
- throw exc;
- }
- if ((lastException == null) && !promptable)
- {
- // only 1 factory used per service type
- ISubSystemConfiguration[] factories = getSubSystemConfigurationsBySystemType(systemType, true);
- ISubSystem subSystems[] = new ISubSystem[factories.length];
- for (int idx = 0; idx < factories.length; idx++)
- {
- subSystems[idx] = factories[idx].createSubSystem(conn, true, getApplicableWizardPages(factories[idx], newConnectionWizardPages)); // give it the opportunity to create a subsystem
- }
-
-
- //int eventType = ISystemResourceChangeEvent.EVENT_ADD;
- int eventType = ISystemResourceChangeEvents.EVENT_ADD_RELATIVE;
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(conn, eventType, this);
- //event.setPosition(pool.getConnectionPosition(conn));
- //event.setPosition(getConnectionPositionInView(conn));
- event.setRelativePrevious(getPreviousHost(conn));
- fireEvent(event);
- fireModelChangeEvent(SYSTEM_RESOURCE_ADDED, SYSTEM_RESOURCETYPE_CONNECTION, conn, null);
-
- for (int s = 0; s < subSystems.length; s++)
- {
- ISubSystem ss = subSystems[s];
- fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, ss, null);
- }
-
-
- }
- SystemPreferencesManager.getPreferencesManager().setConnectionNamesOrder(); // update preferences order list
-
- RSEUIPlugin.getThePersistenceManager().commit(conn);
- return conn;
- }
- private ISystemNewConnectionWizardPage[] getApplicableWizardPages(ISubSystemConfiguration ssf, ISystemNewConnectionWizardPage[] allPages)
- {
- if ((allPages == null) || (allPages.length == 0))
- return null;
- int count = 0;
- for (int idx = 0; idx < allPages.length; idx++)
- if (allPages[idx].getSubSystemConfiguration() == ssf)
- ++count;
- if (count == 0)
- return null;
- ISystemNewConnectionWizardPage[] subPages = new ISystemNewConnectionWizardPage[count];
- count = 0;
- for (int idx = 0; idx < allPages.length; idx++)
- if (allPages[idx].getSubSystemConfiguration() == ssf)
- subPages[count++] = allPages[idx];
- return subPages;
- }
- /**
- * Create a connection object. This is a simplified version
- * <p>
- * THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN
- * THE PROFILE YOU SPECIFY. THE PROFILE IS ALSO SAVED TO DISK.
- * <p>
- * This method:
- * <ul>
- * <li>creates and saves a new connection within the given profile
- * <li>calls all subsystem factories to give them a chance to create a subsystem instance
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners
- * </ul>
- * <p>
- * @param profileName Name of the system profile the connection is to be added to.
- * @param systemType system type matching one of the system type names defined via the
- * systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @return SystemConnection object, or null if it failed to create. This is typically
- * because the connectionName is not unique. Call getLastException() if necessary.
- */
- public IHost createHost(String profileName, String systemType, String connectionName, String hostName, String description)
- throws Exception
- {
- return createHost(profileName, systemType, connectionName, hostName, description, null, IRSEUserIdConstants.USERID_LOCATION_HOST, null);
- }
- /**
- * Create a connection object. This is a very simplified version that defaults to the user's
- * private profile, or the first active profile if there is no private profile.
- * <p>
- * THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN
- * THE DEFAULT PRIVATE PROFILE, WHICH IS SAVED TO DISK.
- * <p>
- * This method:
- * <ul>
- * <li>creates and saves a new connection within the given profile
- * <li>calls all subsystem factories to give them a chance to create a subsystem instance
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners
- * </ul>
- * <p>
- * @param systemType system type matching one of the system type names defined via the
- * systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @return SystemConnection object, or null if it failed to create. This is typically
- * because the connectionName is not unique. Call getLastException() if necessary.
- */
- public IHost createHost(String systemType, String connectionName, String hostName, String description)
- throws Exception
- {
- ISystemProfile profile = getSystemProfileManager().getDefaultPrivateSystemProfile();
- if (profile == null)
- profile = getSystemProfileManager().getActiveSystemProfiles()[0];
- return createHost(profile.getName(), systemType, connectionName, hostName, description, null, IRSEUserIdConstants.USERID_LOCATION_HOST, null);
- }
- /**
- * Return the previous connection as would be shown in the view
- */
- protected IHost getPreviousHost(IHost conn)
- {
- IHost prevConn = null;
- ISystemHostPool pool = conn.getHostPool();
- int pos = pool.getHostPosition(conn);
- if (pos > 0)
- prevConn = pool.getHost(pos - 1);
- else
- {
- IHost allConns[] = getHosts();
- if (allConns != null)
- {
- pos = getHostPositionInView(conn);
- if (pos > 0)
- prevConn = allConns[pos - 1];
- }
- }
- return prevConn;
- }
- /**
- * Update an existing connection given the new information.
- * This method:
- * <ul>
- * <li>calls the setXXX methods on the given connection object, updating the information in it.
- * <li>save the connection's connection pool to disk
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_CHANGE to all registered listeners
- * <li>if the systemtype or hostname is changed, calls disconnect on each associated subsystem.
- * We must do this because a hostname changes fundamentally affects the connection,
- * rendering any information currently displayed under
- * that connection obsolete. That is, the user will have to reconnect.
- * </ul>
- * <p>
- * @param conn SystemConnection to be updated
- * @param systemType system type matching one of the system type names defined via the
- * systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
- * @param defaultUserId userId to use as the default for the subsystems.
- * @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
- * that tells us where to set the user Id
- */
- public void updateHost(Shell shell, IHost conn, String systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
- {
- lastException = null;
- boolean connectionNameChanged = !connectionName.equalsIgnoreCase(conn.getAliasName());
- boolean hostNameChanged = !hostName.equalsIgnoreCase(conn.getHostName());
- String orgDefaultUserId = conn.getDefaultUserId();
- boolean defaultUserIdChanged = false;
- if ((defaultUserId == null) || (orgDefaultUserId == null))
- {
- if (orgDefaultUserId != defaultUserId)
- defaultUserIdChanged = true;
- }
- else
- defaultUserIdChanged = !conn.compareUserIds(defaultUserId, orgDefaultUserId); // d43219
- //!defaultUserId.equalsIgnoreCase(orgDefaultUserId);
-
- try
- {
- if (connectionNameChanged)
- renameHost(conn, connectionName);
- conn.getHostPool().updateHost(conn, systemType, connectionName, hostName, description, defaultUserId, defaultUserIdLocation);
- }
- catch (SystemMessageException exc)
- {
- SystemBasePlugin.logError("Exception in updateConnection for " + connectionName, exc); //$NON-NLS-1$
- lastException = exc;
- return;
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Exception in updateConnection for " + connectionName, exc); //$NON-NLS-1$
- lastException = exc;
- return;
- }
- boolean skipUpdate = (defaultUserIdChanged && !hostNameChanged && !connectionNameChanged);
- if (!skipUpdate) fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(
- //conn,ISystemResourceChangeEvent.EVENT_CHANGE,this));
- conn, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, this)); // only update simple property sheet values here
- if (!skipUpdate) fireModelChangeEvent(SYSTEM_RESOURCE_CHANGED, SYSTEM_RESOURCETYPE_CONNECTION, conn, null);
-
- if (hostNameChanged || defaultUserIdChanged)
- {
- ISubSystem[] subsystems = getSubSystems(conn); // get list of related subsystems
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- if (hostNameChanged || (subsystems[idx].getLocalUserId() == null))
- {
- try
- {
- if (subsystems[idx].isConnected()) subsystems[idx].disconnect(); // MJB: added conditional for defect 45754
- if (defaultUserIdChanged)
- {
- subsystems[idx].getConnectorService().clearUserIdCache();
- }
- subsystems[idx].getConnectorService().clearPasswordCache();
- }
- catch (Exception exc)
- {
- } // msg already shown
- }
- }
- }
- }
-
- /**
- * Update the workoffline attribute for a connection.
- *
- * @param conn SystemConnection to change
- * @param offline true if connection should be set offline, false if it should be set online
- */
- public void setHostOffline(IHost conn, boolean offline)
- {
- if (conn.isOffline() != offline)
- {
- conn.setOffline(offline);
- saveHost(conn);
- fireEvent(new SystemResourceChangeEvent(conn, ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE, null));
- }
- }
-
- /**
- * Delete an existing connection.
- * <p>
- * Lots to do here:
- * <ul>
- * <li>Delete all subsystem objects for this connection, including their file's on disk.
- * <li>Delete this connection's private filter pool, if exists
- * <li>Delete the connection from memory.
- * <li>Delete the connection's folder from disk.
- * </ul>
- * Assumption: firing the delete event is done elsewhere. Specifically, the doDelete method of SystemView.
- */
- public void deleteHost(IHost conn)
- {
- Vector affectedSubSystemFactories = getSubSystemFactories(conn);
- for (int idx = 0; idx < affectedSubSystemFactories.size(); idx++)
- {
- ((ISubSystemConfiguration) affectedSubSystemFactories.elementAt(idx)).deleteSubSystemsByConnection(conn);
- }
- conn.getHostPool().deleteHost(conn); // delete from memory and from disk.
- SystemPreferencesManager.getPreferencesManager().setConnectionNamesOrder(); // update preferences order list
- fireModelChangeEvent(SYSTEM_RESOURCE_REMOVED, SYSTEM_RESOURCETYPE_CONNECTION, conn, null);
- }
-
- /**
- * Renames an existing connection.
- * <p>
- * Lots to do here:
- * <ul>
- * <li>Reset the conn name for all subsystem objects for this connection
- * <li>Rename the connection in memory.
- * <li>Rename the connection's folder on disk.
- * </ul>
- * Assumption: firing the rename event is done elsewhere. Specifically, the doRename method of SystemView.
- */
- public void renameHost(IHost conn, String newName) throws Exception
- {
- // first, pre-test for folder-in-use error:
-
- // it looks good, so proceed...
- String oldName = conn.getAliasName();
- Vector affectedSubSystemFactories = getSubSystemFactories(conn);
- for (int idx = 0; idx < affectedSubSystemFactories.size(); idx++)
- ((ISubSystemConfiguration) affectedSubSystemFactories.elementAt(idx)).renameSubSystemsByConnection(conn, newName);
- conn.getHostPool().renameHost(conn, newName); // rename in memory and disk
- SystemPreferencesManager.getPreferencesManager().setConnectionNamesOrder(); // update preferences order list
- fireModelChangeEvent(SYSTEM_RESOURCE_RENAMED, SYSTEM_RESOURCETYPE_CONNECTION, conn, oldName);
- }
-
- /**
- * Move existing connections a given number of positions in the same profile.
- * If the delta is negative, they are all moved up by the given amount. If
- * positive, they are all moved down by the given amount.<p>
- * <ul>
- * <li>After the move, the pool containing the moved connection is saved to disk.
- * <li>The connection's connection name must be unique in pool.
- * <li>Fires a single ISystemResourceChangeEvent event of type EVENT_MOVE, if the pool is the private pool.
- * </ul>
- * <b>TODO PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION?</b>
- * @param conns Array of SystemConnections to move.
- * @param newPosition new zero-based position for the connection
- */
- public void moveHosts(String profileName, IHost conns[], int delta)
- {
- ISystemHostPool pool = getHostPool(profileName);
- pool.moveHosts(conns, delta);
- SystemPreferencesManager.getPreferencesManager().setConnectionNamesOrder();
- //fireEvent(new SystemResourceChangeEvent(pool.getSystemConnections(),ISystemResourceChangeEvent.EVENT_MOVE_MANY,this));
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(conns, ISystemResourceChangeEvents.EVENT_MOVE_MANY, this);
- event.setPosition(delta);
- fireEvent(event);
- // fire new model change event, which BPs might listen for...
- for (int idx=0; idx<conns.length; idx++)
- fireModelChangeEvent(SYSTEM_RESOURCE_REORDERED, SYSTEM_RESOURCETYPE_CONNECTION, conns[idx], null);
- }
-
- /**
- * Copy a SystemConnection. All subsystems are copied, and all connection data is copied.
- * @param monitor Progress monitor to reflect each step of the operation
- * @param conn The connection to copy
- * @param targetProfile What profile to copy into
- * @param newName Unique name to give copied profile
- * @return new SystemConnection object
- */
- public IHost copyHost(IProgressMonitor monitor, IHost conn, ISystemProfile targetProfile, String newName) throws Exception
- {
- Exception lastExc = null;
- boolean failed = false;
- String msg = null;
- String oldName = conn.getAliasName();
- ISystemHostPool oldPool = conn.getHostPool();
- ISystemHostPool targetPool = getHostPool(targetProfile);
- IHost newConn = null;
-
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "Start of system connection copy. From: " + oldName + " to: " + newName); //$NON-NLS-1$ //$NON-NLS-2$
-
- // STEP 0: BRING ALL IMPACTED SUBSYSTEM FACTORIES TO LIFE NOW, BEFORE DOING THE CLONE.
- getSubSystemFactories(conn);
- if (errorLoadingFactory)
- return null;
-
- try
- {
- // STEP 1: COPY CONNECTION ITSELF, MINUS ITS SUBSYSTEMS...
- newConn = oldPool.cloneHost(targetPool, conn, newName);
-
- // STEP 2: COPY ALL SUBSYSTEMS FOR THE COPIED CONNECTION
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYSUBSYSTEMS_PROGRESS).getLevelOneText();
- //monitor.subTask(msg);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg);
-
- ISubSystem[] subsystems = null;
- ISubSystemConfiguration factory = null;
- msg = "Copying subsystems for connection " + conn.getAliasName(); //$NON-NLS-1$
- //monitor.subTask(msg);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg);
- subsystems = getSubSystems(conn); // get old subsystems for this connection
- if ((subsystems != null) && (subsystems.length > 0))
- {
- for (int jdx = 0; jdx < subsystems.length; jdx++)
- {
- msg += ": subsystem " + subsystems[jdx].getName(); //$NON-NLS-1$
- //monitor.subTask(msg);
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg);
- factory = subsystems[jdx].getSubSystemConfiguration();
- factory.cloneSubSystem(subsystems[jdx], newConn, false); // false=>copy connection op vs copy profile op
- //try { java.lang.Thread.sleep(3000l); } catch (InterruptedException e) {}
- }
- }
- //monitor.worked(1);
- }
- catch (Exception exc)
- {
- failed = true;
- lastExc = exc;
- }
- // if anything failed, we have to back out what worked. Ouch!
- if (failed)
- {
- try
- {
- if (newConn != null)
- deleteHost(newConn);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Exception (ignored) cleaning up from copy-connection exception.", exc); //$NON-NLS-1$
- }
- throw (lastExc);
- }
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "Copy of system connection " + oldName + " to " + newName + " successful"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (getSystemProfileManager().isSystemProfileActive(targetProfile.getName()))
- {
- int eventType = ISystemResourceChangeEvents.EVENT_ADD_RELATIVE;
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(newConn, eventType, this);
- event.setRelativePrevious(getPreviousHost(newConn));
- //SystemResourceChangeEvent event = new SystemResourceChangeEvent(newConn,ISystemResourceChangeEvent.EVENT_ADD,this);
- //event.setPosition(getConnectionPositionInView(newConn));
- fireEvent(event);
- }
- fireModelChangeEvent(SYSTEM_RESOURCE_ADDED, SYSTEM_RESOURCETYPE_CONNECTION, newConn, null);
- return newConn;
- }
-
- /**
- * Move a SystemConnection to another profile. All subsystems are moved, and all connection data is moved.
- * This is actually accomplished by doing a copy operation first, and if successful deleting the original.
- * @param monitor Progress monitor to reflect each step of the operation
- * @param conn The connection to move
- * @param targetProfile What profile to move into
- * @param newName Unique name to give copied profile. Typically this is the same as the original name, but
- * will be different on name collisions
- * @return new SystemConnection object
- */
- public IHost moveHost(IProgressMonitor monitor, IHost conn, ISystemProfile targetProfile, String newName) throws Exception
- {
- IHost newConn = null;
- try
- {
- newConn = copyHost(monitor, conn, targetProfile, newName);
- if (newConn != null)
- {
- deleteHost(conn); // delete old connection now that new one created successfully
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "Move of system connection " + conn.getAliasName() + " to profile " + targetProfile.getName() + " successful"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- fireEvent(new SystemResourceChangeEvent(conn, ISystemResourceChangeEvents.EVENT_DELETE, this));
- }
- }
- catch (Exception exc)
- {
- //RSEUIPlugin.logError("Exception moving system connection " + conn.getAliasName() + " to profile " + targetProfile.getName(), exc);
- throw exc;
- }
- return newConn;
- }
-
- /**
- * @see org.eclipse.rse.core.model.ISystemRegistry#isAnySubSystemSupportsConnect(org.eclipse.rse.core.model.IHost)
- */
- public boolean isAnySubSystemSupportsConnect(IHost conn) {
- Vector v = getSubSystemFactories(conn);
-
- if (v != null) {
- Iterator iter = v.iterator();
-
- while (iter.hasNext()) {
- Object obj = iter.next();
-
- if (obj instanceof ISubSystemConfiguration) {
- ISubSystemConfiguration config = (ISubSystemConfiguration)obj;
-
- if (config.supportsSubSystemConnect()) {
- return true;
- }
- }
- }
- }
-
- return false;
- }
-
- /**
- * Return true if any of the subsystems for the given connection are currently connected
- */
- public boolean isAnySubSystemConnected(IHost conn)
- {
- boolean any = false;
- ISubSystem[] subsystems = getSubSystemsLazily(conn);
- if (subsystems == null)
- return false;
- for (int idx = 0; !any && (idx < subsystems.length); idx++)
- {
- ISubSystem ss = subsystems[idx];
- if (ss.isConnected())
- any = true;
- }
- return any;
- }
-
- /**
- * Return true if all of the subsystems for the given connection are currently connected
- */
- public boolean areAllSubSystemsConnected(IHost conn)
- {
- boolean all = true;
- ISubSystem[] subsystems = getSubSystemsLazily(conn);
- if (subsystems == null)
- return false;
-
- for (int idx = 0; all && (idx < subsystems.length); idx++)
- {
- ISubSystem ss = subsystems[idx];
- if (!ss.isConnected())
- {
- return false;
- }
- }
- return all;
- }
- /**
- * Disconnect all subsystems for the given connection, if they are currently connected.
- */
- public void disconnectAllSubSystems(IHost conn)
- {
- // FIXME - save profile
- save();
-
- ISubSystem[] subsystems = getSubSystemsLazily(conn);
- if (subsystems == null)
- return;
-
- // dy: defect 47281, user repeaetedly prompted to disconnect if there is an open file
- // and they keep hitting cancel.
- boolean cancelled = false;
- for (int idx = 0; idx < subsystems.length && !cancelled; idx++)
- {
- ISubSystem ss = subsystems[idx];
- if (ss.isConnected())
- {
- try
- {
- //ss.getConnectorService().disconnect(); defect 40675
- ss.disconnect();
- }
- catch (InterruptedException exc)
- {
- System.out.println("Cacnelled"); //$NON-NLS-1$
- cancelled = true;
- }
- catch (Exception exc)
- {
- }
- }
- }
- }
-
- /**
- * Inform the world when the connection status changes for a subsystem within a connection.
- * Update properties for the subsystem and its connection
- */
- public void connectedStatusChange(ISubSystem subsystem, boolean connected, boolean wasConnected)
- {
- connectedStatusChange(subsystem, connected, wasConnected, true);
- }
-
- /**
- * Inform the world when the connection status changes for a subsystem within a connection.
- * Update properties for the subsystem and its connection
- */
- public void connectedStatusChange(ISubSystem subsystem, boolean connected, boolean wasConnected, boolean collapseTree)
- {
- //System.out.println("INSIDE CONNECTEDSTATUSCHANGE: "+connected+" vs "+wasConnected);
- IHost conn = subsystem.getHost();
- //int eventId = ISystemResourceChangeEvent.EVENT_CHANGE;
- //int eventId = ISystemResourceChangeEvent.EVENT_PROPERTY_CHANGE;
- if (connected != wasConnected)
- {
- int eventId = ISystemResourceChangeEvents.EVENT_ICON_CHANGE;
- fireEvent(new SystemResourceChangeEvent(conn, eventId, this));
-
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(subsystem, eventId, conn);
- fireEvent(event);
-
- // DKM
- // fire for each subsystem
- ISubSystem[] sses = getSubSystems(conn);
- for (int i = 0; i < sses.length; i++)
- {
- ISubSystem ss = sses[i];
- if (ss != subsystem)
- {
- SystemResourceChangeEvent sevent = new SystemResourceChangeEvent(ss, eventId, conn);
- fireEvent(sevent);
-
- sevent.setType(ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE); // update vrm
- fireEvent(sevent);
- }
- }
-
-
- // DY: Conditioning of property change event type has been removed so
- // that the connected property is updated on a disconnect.
- //if (connected)
- event.setType(ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE); // update vrm
-
- fireEvent(event);
- }
- if (!connected && wasConnected && collapseTree)
- {
- invalidateFiltersFor(subsystem);
- fireEvent(new SystemResourceChangeEvent(subsystem, ISystemResourceChangeEvents.EVENT_MUST_COLLAPSE, this));
-
- ISubSystem[] sses = getSubSystems(conn);
- for (int i = 0; i < sses.length; i++)
- {
- ISubSystem ss = sses[i];
- if (ss != subsystem && !ss.isConnected())
- {
- invalidateFiltersFor(ss);
- SystemResourceChangeEvent sevent = new SystemResourceChangeEvent(ss, ISystemResourceChangeEvents.EVENT_MUST_COLLAPSE, conn);
- fireEvent(sevent);
- }
- }
- }
- }
-
- // ----------------------------
- // RESOURCE EVENT METHODS...
- // ----------------------------
-
- /**
- * Register your interest in being told when a system resource such as a connection is changed.
- */
- public void addSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- listenerManager.addSystemResourceChangeListener(l);
- listenerCount++;
- }
- /**
- * De-Register your interest in being told when a system resource such as a connection is changed.
- */
- public void removeSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- listenerManager.removeSystemResourceChangeListener(l);
- listenerCount--;
- }
- /**
- * Query if the ISystemResourceChangeListener is already listening for SystemResourceChange events
- */
- public boolean isRegisteredSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- return listenerManager.isRegisteredSystemResourceChangeListener(l);
- }
- /**
- * Notify all listeners of a change to a system resource such as a connection.
- * You would not normally call this as the methods in this class call it when appropriate.
- */
- public void fireEvent(ISystemResourceChangeEvent event)
- {
- Object src = event.getSource();
- if (src instanceof ISystemFilter)
- {
- IRSEBaseReferencingObject[] references = ((ISystemFilter)src).getReferencingObjects();
- for (int i = 0; i < references.length; i++)
- {
- IRSEBaseReferencingObject ref = references[i];
- if (ref instanceof ISystemContainer)
- {
- ((ISystemContainer)ref).markStale(true);
- }
- }
-
- }
- listenerManager.notify(event);
- }
- /**
- * Notify a specific listener of a change to a system resource such as a connection.
- */
- public void fireEvent(ISystemResourceChangeListener l, ISystemResourceChangeEvent event)
- {
- l.systemResourceChanged(event);
- }
- /**
- * Notify all listeners of a change to a system resource such as a connection.
- * You would not normally call this as the methods in this class call it when appropriate.
- * <p>
- * This version calls fireEvent at the next reasonable opportunity, leveraging SWT's
- * Display.asyncExec() method.
- */
- public void postEvent(ISystemResourceChangeEvent event)
- {
- listenerManager.postNotify(event);
- }
-
- /**
- * Notify a specific listener of a change to a system resource such as a connection.
- * <p>
- * This version calls fireEvent at the next reasonable opportunity, leveraging SWT's
- * Display.asyncExec() method.
- */
- public void postEvent(ISystemResourceChangeListener listener, ISystemResourceChangeEvent event)
- {
- new SystemPostableEventNotifier(listener, event); // create and run the notifier
- }
-
- // ----------------------------
- // MODEL RESOURCE EVENT METHODS...
- // ----------------------------
-
- /**
- * Register your interest in being told when an RSE model resource is changed.
- * These are model events, not GUI-optimized events.
- */
- public void addSystemModelChangeListener(ISystemModelChangeListener l)
- {
- modelListenerManager.addSystemModelChangeListener(l);
- modelListenerCount++;
- }
- /**
- * De-Register your interest in being told when an RSE model resource is changed.
- */
- public void removeSystemModelChangeListener(ISystemModelChangeListener l)
- {
- modelListenerManager.removeSystemModelChangeListener(l);
- modelListenerCount--;
- }
- /**
- * Notify all listeners of a change to a system model resource such as a connection.
- * You would not normally call this as the methods in this class call it when appropriate.
- */
- public void fireEvent(ISystemModelChangeEvent event)
- {
- modelListenerManager.notify(event);
- }
- /**
- * Notify all listeners of a change to a system model resource such as a connection.
- * This one takes the information needed and creates the event for you.
- */
- public void fireModelChangeEvent(int eventType, int resourceType, Object resource, String oldName)
- {
- if (modelEvent == null)
- modelEvent = new SystemModelChangeEvent();
- modelEvent.setEventType(eventType);
- modelEvent.setResourceType(resourceType);
- modelEvent.setResource(resource);
- modelEvent.setOldName(oldName);
- modelListenerManager.notify(modelEvent);
- }
- /**
- * Notify a specific listener of a change to a system model resource such as a connection.
- */
- public void fireEvent(ISystemModelChangeListener l, ISystemModelChangeEvent event)
- {
- l.systemModelResourceChanged(event);
- }
-
- // --------------------------------
- // REMOTE RESOURCE EVENT METHODS...
- // --------------------------------
-
- /**
- * Register your interest in being told when a remote resource is changed.
- * These are model events, not GUI-optimized events.
- */
- public void addSystemRemoteChangeListener(ISystemRemoteChangeListener l)
- {
- remoteListManager.addSystemRemoteChangeListener(l);
- remoteListCount++;
- }
- /**
- * De-Register your interest in being told when a remote resource is changed.
- */
- public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l)
- {
- remoteListManager.removeSystemRemoteChangeListener(l);
- remoteListCount--;
- }
- /**
- * Notify all listeners of a change to a remote resource such as a file.
- * You would not normally call this as the methods in this class call it when appropriate.
- */
- public void fireEvent(ISystemRemoteChangeEvent event)
- {
- remoteListManager.notify(event);
- }
- /**
- * Notify all listeners of a change to a remote resource such as a file.
- * This one takes the information needed and creates the event for you.
- * @param eventType - one of the constants from {@link org.eclipse.rse.model.ISystemRemoteChangeEvents}
- * @param resource - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter
- * @param resourceParent - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurences of that parent.
- * @param subsystem - the subsystem which contains this remote resource. This allows the search for impacts to be
- * limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
- * @param oldName - on a rename operation, this is the absolute name of the resource prior to the rename
- * @param originatingViewer - optional. If set, this gives the viewer a clue that it should select the affected resource after refreshing its parent.
- * This saves sending a separate event to reveal and select the new created resource on a create event, for example.
- */
- public void fireRemoteResourceChangeEvent(int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String oldName, Viewer originatingViewer)
- {
- if (resourceParent instanceof ISystemContainer)
- {
- ((ISystemContainer)resourceParent).markStale(true);
- }
- // mark stale any filters that reference this object
- invalidateFiltersFor(resourceParent, subsystem);
-
- if (remoteEvent == null)
- remoteEvent = new SystemRemoteChangeEvent();
- remoteEvent.setEventType(eventType);
- remoteEvent.setResource(resource);
- remoteEvent.setResourceParent(resourceParent);
- remoteEvent.setOldName(oldName);
- remoteEvent.setSubSystem(subsystem);
- remoteEvent.setOriginatingViewer(originatingViewer);
- remoteListManager.notify(remoteEvent);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-
- private String getRemoteResourceAbsoluteName(Object remoteResource)
- {
- if (remoteResource == null)
- return null;
- String remoteResourceName = null;
- if (remoteResource instanceof String)
- remoteResourceName = (String)remoteResource;
- else if (remoteResource instanceof SystemFilterReference)
- {
- ISystemFilterReference ref = (ISystemFilterReference)remoteResource;
- ISubSystem ss = ref.getSubSystem();
- remoteResource = ss.getTargetForFilter(ref);
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
- if (ra == null)
- return null;
- remoteResourceName = ra.getAbsoluteName(remoteResource);
- }
- else
- {
- ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
- if (ra == null)
- return null;
- remoteResourceName = ra.getAbsoluteName(remoteResource);
- }
- return remoteResourceName;
- }
-
- private List findFilterReferencesFor(ISubSystem subsystem)
- {
- List results = new ArrayList();
- if (subsystem != null)
- {
- ISystemFilterPoolReferenceManager refmgr = subsystem.getFilterPoolReferenceManager();
- if (refmgr != null)
- {
- ISystemFilterReference[] refs = refmgr.getSystemFilterReferences(subsystem);
- for (int i = 0; i < refs.length; i++)
- {
- ISystemFilterReference filterRef = refs[i];
-
- if (!filterRef.isStale() && filterRef.hasContents(SystemChildrenContentsType.getInstance()))
- {
- results.add(filterRef);
- }
- }
-
- }
- }
- return results;
-
- }
-
- public List findFilterReferencesFor(Object resource, ISubSystem subsystem)
- {
- String elementName = getRemoteResourceAbsoluteName(resource);
- List results = new ArrayList();
- if (subsystem != null && elementName != null)
- {
- ISystemFilterReference[] refs = subsystem.getFilterPoolReferenceManager().getSystemFilterReferences(subsystem);
- for (int i = 0; i < refs.length; i++)
- {
- ISystemFilterReference filterRef = refs[i];
-
- if (!filterRef.isStale() && filterRef.hasContents(SystemChildrenContentsType.getInstance()))
- {
- // #1
- if (subsystem.doesFilterMatch(filterRef.getReferencedFilter(), elementName))
- {
- results.add(filterRef); // found a match!
-
- }
- // #2
- else if (subsystem.doesFilterListContentsOf(filterRef.getReferencedFilter(),elementName))
- {
- results.add(filterRef); // found a match!
- }
- }
- }
-
-
- }
- return results;
-
- }
-
- public void invalidateFiltersFor(ISubSystem subsystem)
- {
- if (subsystem != null)
- {
-
- List results = findFilterReferencesFor(subsystem);
- for (int i = 0; i < results.size(); i++)
- {
- ((ISystemFilterReference)results.get(i)).markStale(true);
- }
- }
- }
-
- public void invalidateFiltersFor(Object resourceParent, ISubSystem subsystem)
- {
- if (subsystem != null)
- {
-
- List results = findFilterReferencesFor(resourceParent, subsystem);
- for (int i = 0; i < results.size(); i++)
- {
- ((ISystemFilterReference)results.get(i)).markStale(true);
- }
- }
- }
-
- /**
- * Notify a specific listener of a change to a remote resource such as a file.
- */
- public void fireEvent(ISystemRemoteChangeListener l, ISystemRemoteChangeEvent event)
- {
- l.systemRemoteResourceChanged(event);
- }
-
- // ----------------------------
- // PREFERENCE EVENT METHODS...
- // ----------------------------
-
- /**
- * Register your interest in being told when a system preference changes
- */
- public void addSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
- {
- preferenceListManager.addSystemPreferenceChangeListener(l);
- }
- /**
- * De-Register your interest in being told when a system preference changes
- */
- public void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
- {
- preferenceListManager.removeSystemPreferenceChangeListener(l);
- }
- /**
- * Notify all listeners of a change to a system preference
- * You would not normally call this as the methods in this class call it when appropriate.
- */
- public void fireEvent(ISystemPreferenceChangeEvent event)
- {
- preferenceListManager.notify(event);
- }
- /**
- * Notify a specific listener of a change to a system preference
- */
- public void fireEvent(ISystemPreferenceChangeListener l, ISystemPreferenceChangeEvent event)
- {
- l.systemPreferenceChanged(event);
- }
-
- // ----------------------------
- // MISCELLANEOUS METHODS...
- // ----------------------------
-
- /**
- * Load everything into memory. Needed for pervasive operations like rename and copy
- */
- public void loadAll()
- {
- // step 0_a: force every subsystem factory to be active
- ISubSystemConfigurationProxy[] proxies = getSubSystemConfigurationProxies();
- if (proxies != null)
- {
- for (int idx = 0; idx < proxies.length; idx++)
- proxies[idx].getSubSystemConfiguration();
- }
-
- // step 0_b: force every subsystem of every connection to be active!
- IHost[] connections = getHosts();
- for (int idx = 0; idx < connections.length; idx++)
- getSubSystems(connections[idx]);
- }
-
- /**
- * Return last exception object caught in any method, or null if no exception.
- * This has the side effect of clearing the last exception.
- */
- public Exception getLastException()
- {
- Exception last = lastException;
- lastException = null;
- return last;
- }
-
- // ----------------------------
- // SAVE / RESTORE METHODS...
- // ----------------------------
-
- /**
- * Save everything!
- */
- public boolean save()
- {
- ISystemProfileManager profileManager = getSystemProfileManager();
- return RSEUIPlugin.getThePersistenceManager().commit(profileManager);
- }
-
- /**
- * Save specific connection pool
- * @return true if saved ok, false if error encountered. If false, call getLastException().
- */
- public boolean saveHostPool(ISystemHostPool pool)
- {
- return RSEUIPlugin.getThePersistenceManager().commit(pool);
- }
-
- /**
- * Save specific connection
- * @return true if saved ok, false if error encountered. If false, call getLastException().
- */
- public boolean saveHost(IHost conn)
- {
- return RSEUIPlugin.getThePersistenceManager().commit(conn);
- }
-
- /**
- * Restore all connections within active profiles
- * @return true if restored ok, false if error encountered. If false, call getLastException().
- */
- public boolean restore()
- {
- boolean ok = true;
- lastException = null;
- /*
- SystemProfileManager profileManager = SystemStartHere.getSystemProfileManager();
-
- SystemHostPool pool = null;
- SystemPreferencesManager prefmgr = SystemPreferencesManager.getPreferencesManager();
- if (!RSEUIPlugin.getThePersistenceManager().restore(profileManager))
- {
- SystemProfile[] profiles = profileManager.getActiveSystemProfiles();
- for (int idx = 0; idx < profiles.length; idx++)
- {
- try
- {
- pool = SystemHostPoolImpl.getSystemConnectionPool(profiles[idx]);
- Host[] conns = pool.getHosts();
- pool.orderHosts(prefmgr.getConnectionNamesOrder(conns, pool.getName()));
- }
- catch (Exception exc)
- {
- lastException = exc;
- RSEUIPlugin.logError("Exception in restore for connection pool " + profiles[idx].getName(), exc);
- }
- }
- }
- */
- return ok;
- }
- public boolean contains(ISchedulingRule rule)
- {
- return rule == this;
- }
- public boolean isConflicting(ISchedulingRule rule)
- {
- return rule == this;
- }
- public ISystemFilterStartHere getSystemFilterStartHere() {
- return SystemFilterStartHere.getDefault();
- }
-
- public ISystemFilterPool getSystemFilterPool()
- {
- return SystemFilterPool.getDefault();
- }
-
-}//SystemRegistryImpl \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteChangeEvent.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteChangeEvent.java
deleted file mode 100644
index 74a4e49ad..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteChangeEvent.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-/**
- * For listeners interested in changes with remote resources.
- * These events are designed to state what the change to the resource was, not to
- * optimize those events for a GUI (eg, a delete event versus a refresh event)
- */
-public class SystemRemoteChangeEvent implements ISystemRemoteChangeEvent, ISystemRemoteChangeEvents
-{
- private int eventType;
- private Object resource, parent;
- private String oldName;
- private ISubSystem subsystem;
- private Viewer originatingViewer;
-
- /**
- * Constructor for non-rename event
- * @param eventType - one of the constants from {@link org.eclipse.rse.model.ISystemRemoteChangeEvents}
- * @param resource - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter
- * @param resourceParent - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurences of that parent.
- * @param subsystem - the subsystem which contains this remote resource. This allows the search for impacts to be
- * limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
- */
- public SystemRemoteChangeEvent(int eventType, Object resource, Object resourceParent, ISubSystem subsystem)
- {
- super();
- this.eventType = eventType;
- this.resource = resource;
- this.parent = resourceParent;
- this.subsystem = subsystem;
- }
- /**
- * Constructor for a rename event.
- * @param eventType - one of the constants from {@link org.eclipse.rse.model.ISystemRemoteChangeEvents}
- * @param resource - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter
- * @param resourceParent - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurences of that parent.
- * @param subsystem - the subsystem which contains this remote resource. This allows the search for impacts to be
- * limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
- * @param oldName - on a rename operation, this is the absolute name of the resource prior to the rename
- */
- public SystemRemoteChangeEvent(int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String oldName)
- {
- this(eventType, resource, resourceParent, subsystem);
- this.oldName = oldName;
- }
- /**
- * Constructor you shouldn't use unless you intend to call the setters
- */
- public SystemRemoteChangeEvent()
- {
- }
-
- /**
- * Reset the event type
- */
- public void setEventType(int eventType)
- {
- this.eventType = eventType;
- }
- /**
- * Reset the resource
- */
- public void setResource(Object resource)
- {
- this.resource = resource;
- }
- /**
- * Reset the resource's remote resource parent
- */
- public void setResourceParent(Object resourceParent)
- {
- this.parent = resourceParent;
- }
-
- /**
- * Reset the subsystem
- */
- public void setSubSystem(ISubSystem subsystem)
- {
- this.subsystem = subsystem;
- }
- /**
- * Reset the old name on a rename event
- */
- public void setOldName(String oldName)
- {
- this.oldName = oldName;
- }
-
- /**
- * Set the originating viewer. Only this viewer is candidate for updating the selection. Eg, on a
- * create event, if this and the resource parent is set, the newly created object is selected after
- * the parent's contents are refreshed, for the originating viewer.
- */
- public void setOriginatingViewer(Viewer originatingViewer)
- {
- this.originatingViewer = originatingViewer;
- }
-
- /**
- * Get the event type, such as {@link org.eclipse.rse.model.ISystemRemoteChangeEvents#SYSTEM_REMOTE_RESOURCE_CREATED}.
- * @see org.eclipse.rse.model.ISystemRemoteChangeEvents
- */
- public int getEventType()
- {
- return eventType;
- }
- /**
- * Get the resource that this event applies to
- * It must either be the binary object of the resource, or the absolute name of the resource.
- */
- public Object getResource()
- {
- return resource;
- }
- /**
- * Get the parent remote object for the affected remote object. This is not always known,
- * but when it is (ie, non null) then it can be used to refresh all expanded occurrences of that parent
- */
- public Object getResourceParent()
- {
- return parent;
- }
- /**
- * Get the subsystem in which this resource resides.
- * This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections
- * with the same hostname as the subsystem's connection.
- */
- public ISubSystem getSubSystem()
- {
- return subsystem;
- }
- /**
- * Get the old name of the resource, in the event of a resource rename. Null for other event types.
- */
- public String getOldName()
- {
- return oldName;
- }
-
- /**
- * Get the originating viewer from which this remote resource change event comes from. The combination of this,
- * if non-null, plus the resource parent, allows viewers to decide whether to update the selection within the
- * parent resource, after refreshing that resource.
- */
- public Viewer getOriginatingViewer()
- {
- return originatingViewer;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteElementResourceSet.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteElementResourceSet.java
deleted file mode 100644
index e154eee1b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteElementResourceSet.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.model.AbstractSystemResourceSet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-
-public class SystemRemoteElementResourceSet extends AbstractSystemResourceSet
-{
- private ISubSystem _subSystem;
- private ISystemViewElementAdapter _adapter;
-
- public SystemRemoteElementResourceSet(ISubSystem subSystem)
- {
- super();
- _subSystem = subSystem;
- }
-
- public SystemRemoteElementResourceSet(ISubSystem subSystem, ISystemViewElementAdapter adapter)
- {
- super();
- _subSystem = subSystem;
- _adapter = adapter;
- }
-
- public SystemRemoteElementResourceSet(ISubSystem subSystem, ISystemViewElementAdapter adapter, Object[] objects)
- {
- super(objects);
- _subSystem = subSystem;
- _adapter = adapter;
- }
-
- public SystemRemoteElementResourceSet(ISubSystem subSystem, ISystemViewElementAdapter adapter, List objects)
- {
- super(objects);
- _subSystem = subSystem;
- _adapter = adapter;
- }
-
- public SystemRemoteElementResourceSet(ISubSystem subSystem, Object[] objects)
- {
- super(objects);
- _subSystem = subSystem;
- }
-
- public SystemRemoteElementResourceSet(ISubSystem subSystem, List objects)
- {
- super(objects);
- _subSystem = subSystem;
- }
-
- public ISystemViewElementAdapter getAdapter()
- {
- return _adapter;
- }
-
- public ISubSystem getSubSystem()
- {
- return _subSystem;
- }
-
- public String pathFor(Object resource)
- {
- if (_adapter == null)
- {
- _adapter = (ISystemViewElementAdapter)((IAdaptable)resource).getAdapter(ISystemViewElementAdapter.class);
- }
-
- return _adapter.getAbsoluteName(resource);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteResourceSet.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteResourceSet.java
deleted file mode 100644
index 3cff4f66f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteResourceSet.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.model.AbstractSystemResourceSet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.view.ISystemDragDropAdapter;
-
-
-public class SystemRemoteResourceSet extends AbstractSystemResourceSet
-{
- private ISubSystem _subSystem;
- private ISystemDragDropAdapter _adapter;
-
-
-
- public SystemRemoteResourceSet(ISubSystem subSystem)
- {
- super();
- _subSystem = subSystem;
- }
-
- public SystemRemoteResourceSet(ISubSystem subSystem, ISystemDragDropAdapter adapter)
- {
- super();
- _subSystem = subSystem;
- _adapter = adapter;
- }
-
- public SystemRemoteResourceSet(ISubSystem subSystem, ISystemDragDropAdapter adapter, Object[] objects)
- {
- super(objects);
- _subSystem = subSystem;
- _adapter = adapter;
- }
-
- public SystemRemoteResourceSet(ISubSystem subSystem, ISystemDragDropAdapter adapter, List objects)
- {
- super(objects);
- _subSystem = subSystem;
- _adapter = adapter;
- }
-
- public SystemRemoteResourceSet(ISubSystem subSystem, Object[] objects)
- {
- super(objects);
- _subSystem = subSystem;
- }
-
- public SystemRemoteResourceSet(ISubSystem subSystem, List objects)
- {
- super(objects);
- _subSystem = subSystem;
- }
-
- public ISystemDragDropAdapter getAdapter()
- {
- return _adapter;
- }
-
- public ISubSystem getSubSystem()
- {
- return _subSystem;
- }
-
- public String pathFor(Object resource)
- {
- if (_adapter == null)
- {
- _adapter = (ISystemDragDropAdapter)((IAdaptable)resource).getAdapter(ISystemDragDropAdapter.class);
- }
-
- return _adapter.getAbsoluteName(resource);
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemResourceChangeEvent.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemResourceChangeEvent.java
deleted file mode 100644
index c928d98e5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemResourceChangeEvent.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-import java.util.EventObject;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Item;
-
-
-/**
- * Event object sent to SystemResourceChangeListeners when a
- * remote system object is created, changed, removed, etc.
- * @see org.eclipse.rse.model.ISystemResourceChangeEvents
- */
-public class SystemResourceChangeEvent
- extends EventObject
- implements ISystemResourceChangeEvent
-{
- private static final long serialVersionUID = 1;
- private Object parent,grandparent, prevObj;
- private Object[] multiSource;
- private Viewer originatingViewer;
- private int type;
- private int position = -1;
- private Item item;
-
- /**
- * Constructor for SystemResourceChangeEvent.
- * @see org.eclipse.rse.model.ISystemResourceChangeEvents
- * @param source The object that was added,deleted,renamed,changed.
- * @param type The type of event, one of ISystemChangeEvent constants.
- * @param parent The parent of the object that was added or deleted.
- */
- public SystemResourceChangeEvent(Object source, int type, Object parent)
- {
- super(source);
- setType(type);
- setParent(parent);
- }
- /**
- * Constructor for SystemResourceChangeEvent when the source is multipe resources.
- * @see org.eclipse.rse.model.ISystemResourceChangeEvents
- * @param source The array of objects that were added,deleted,renamed,changed.
- * @param type The type of event, one of ISystemChangeEvent constants.
- * @param parent The parent of the object that was added or deleted.
- */
- public SystemResourceChangeEvent(Object[] source, int type, Object parent)
- {
- super(((source!=null) && (source.length>0)) ? source[0] : "nada"); // defect 42112 //$NON-NLS-1$
- this.multiSource = source;
- this.type = type;
- this.parent = parent;
- }
-
- /**
- * For multi-target events, return the array of source targets.
- */
- public Object[] getMultiSource()
- {
- return multiSource;
- }
-
- /**
- * Return the parent of the object added or removed.
- * @see ISystemResourceChangeEvent#getParent()
- */
- public Object getParent()
- {
- return parent;
- }
- /**
- * Set the parent
- */
- public void setParent(Object parent)
- {
- this.parent = parent;
- }
-
- /**
- * Return the grand parent of the object added or removed.
- * @see ISystemResourceChangeEvent#getParent()
- */
- public Object getGrandParent()
- {
- return grandparent;
- }
- /**
- * Set the grand parent of the object added or removed.
- */
- public void setGrandParent(Object grandparent)
- {
- this.grandparent = grandparent;
- }
- /**
- * Return the position value. Used in ADD events.
- * @return position to add the new item to. A negative number indicates an append operation
- */
- public int getPosition()
- {
- return position;
- }
- /**
- * Set the position value. Used in ADD events.
- * @param position zero-based position to insert the new item. A negative number indicates an append operation
- */
- public void setPosition(int position)
- {
- this.position = position;
- }
- /**
- * Set the viewer Item of the currently selected object. This is a clue when we want to
- * expand and select only the specific instance of this widget in this view.
- */
- public void setViewerItem(Item item)
- {
- this.item = item;
- }
-
-
- /**
- * Return the type of the event (add, change, remove, rename, change, property change).
- * @see org.eclipse.rse.model.ISystemResourceChangeEvents
- * @see org.eclipse.rse.model.ISystemResourceChangeEvent
- * @see org.eclipse.rse.model.ISystemResourceChangeEvent#getType()
- */
- public int getType()
- {
- return type;
- }
- /**
- * Set the type
- * @see org.eclipse.rse.model.ISystemResourceChangeEvents
- */
- public void setType(int type)
- {
- this.type = type;
- }
-
- /**
- * For relative add events, return the previous node this is being added after
- */
- public Object getRelativePrevious()
- {
- return prevObj;
- }
- /**
- * For relative add events, set the previous node this is being added after
- */
- public void setRelativePrevious(Object previousObject)
- {
- this.prevObj = previousObject;
- }
-
- /**
- * Set the originating viewer. For some events, this allows responding viewers to decide if the event applies to them
- */
- public void setOriginatingViewer(Viewer viewer)
- {
- this.originatingViewer = viewer;
- }
- /**
- * Get the originating viewer. For some events, this allows responding viewers to decide if the event applies to them
- */
- public Viewer getOriginatingViewer()
- {
- return originatingViewer;
- }
- /**
- * Get the viewer Item of the currently selected object. This is a clue when we want to
- * expand and select only the specific instance of this widget in this view.
- */
- public Item getViewerItem()
- {
- return item;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemStartHere.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemStartHere.java
deleted file mode 100644
index 06440ac65..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemStartHere.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.model;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * It all begins RIGHT HERE!
- */
-public class SystemStartHere
-{
- /**
- * STEP 1. Get system registry singleton
- * <p>
- * SAME AS: <code>RSEUIPlugin.getTheSystemRegistry</code>
- */
- public static ISystemRegistry getSystemRegistry()
- {
- return RSEUIPlugin.getTheSystemRegistry();
- }
-
- /**
- * STEP 2a. Get connections for all system types
- * <p>
- * SAME AS: <code>getSystemRegistry().getConnections()</code>
- * @see #getConnectionsBySystemType(String)
- */
- public static IHost[] getConnections()
- {
- return getSystemRegistry().getHosts();
- }
-
- /**
- * STEP 2b. Get all connections for the given system type.
- * <p>
- * SAME AS: <code>getSystemRegistry().getConnectionsBySystemType(systemType)</code>
- * @param systemType One of the system types defined via system type extension point:
- * <ul>
- * <li>"iSeries"
- * <li>"Windows"
- * <li>"z/OS"
- * <li>"Unix"
- * <li>"Linux"
- * <li>"Local"
- * </ul>
- * @see org.eclipse.rse.core.IRSESystemType
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsBySystemType(String)
- */
- public static IHost[] getConnectionsBySystemType(String systemType)
- {
- return getSystemRegistry().getHostsBySystemType(systemType);
- }
-
- /**
- * STEP 2c. Get all connections for your subsystem configuration
- * <p>
- * SAME AS: <code>getSystemRegistry().getConnectionsBySubSystemConfiguration(subsystemConfiguration)</code>
- * @param subsystemConfiguration A subsystem configuration object.
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsBySubSystemConfiguration(ISubSystemConfiguration)
- * @see #getConnectionsBySubSystemConfiguration(String)
- */
- public static IHost[] getConnectionsBySubSystemConfiguration(ISubSystemConfiguration subsystemConfiguration)
- {
- return getSystemRegistry().getHostsBySubSystemConfiguration(subsystemConfiguration);
- }
- /**
- * STEP 2d. Get all connections for your subsystem configuration, identified by subsystemConfigurationId.
- * <p>
- * SAME AS: <code>getSystemRegistry().getConnectionsBySubSystemConfiguration(getSubSystemConfiguration(subsystemConfigurationId))</code>
- * @param subsystemConfigurationId The id of the subsystem configuration as given in its plugin.xml id attribute for the subsystemConfigurations extension point
- * @see #getSubSystemConfiguration(String)
- * @see #getConnectionsBySubSystemConfiguration(ISubSystemConfiguration)
- */
- public static IHost[] getConnectionsBySubSystemConfiguration(String subsystemConfigurationId)
- {
- return getSystemRegistry().getHostsBySubSystemConfiguration(getSubSystemConfiguration(subsystemConfigurationId));
- }
-
- /**
- * STEP 3a. Get all subsystems for all connections for your subsystem configuration, identified by subsystemConfigurationId.
- * <p>
- * SAME AS: <code>getSystemRegistry().getSubSystems(subsystemConfigurationId)</code>
- * @param subsystemConfigurationId The subsystem configuration id as given in its plugin.xml id attribute for the subsystemConfigurations extension point
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(String)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getId()
- */
- public static ISubSystem[] getSubSystems(String subsystemConfigurationId)
- {
- return getSystemRegistry().getSubSystems(subsystemConfigurationId);
- }
- /**
- * STEP 3b. Get all subsystems for the given connection for your subsystem configuration, identified by subsystemConfigurationId.
- * <p>
- * SAME AS: <code>getSystemRegistry().getSubSystems(subsystemConfigurationId, connection)</code>
- * @param subsystemConfigurationId The subsystem configuration id as given in its plugin.xml id attribute for the subsystemConfigurations extension point
- * @param connection The connection object you wish to get the subsystems for. Typically there is only one subsystem per object.
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(String, IHost)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getId()
- */
- public static ISubSystem[] getSubSystems(String subsystemConfigurationId, IHost connection)
- {
- return getSystemRegistry().getSubSystems(subsystemConfigurationId, connection);
- }
- /**
- * STEP 3c. Same as {@link #getSubSystems(String,IHost)} by used when you know
- * the subsystem configuration only supports a single subsystem per connection.
- * @param subsystemConfigurationId The subsystem configuration id as given in its plugin.xml id attribute for the subsystemConfigurations extension point
- * @param connection The connection object you wish to get the subsystems for. Typically there is only one subsystem per object.
- * @see #getSubSystems(String, IHost)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getId()
- */
- public static ISubSystem getSubSystem(String subsystemConfigurationId, IHost connection)
- {
- ISubSystem[] subsystems = getSystemRegistry().getSubSystems(subsystemConfigurationId, connection);
- if ((subsystems == null) || (subsystems.length==0))
- return null;
- else
- return subsystems[0];
- }
-
-
-
- // ----------------------------
- // MISCELLANEOUS:
- // ----------------------------
- /**
- * Miscallenous Helper. Return the subsystem configuration object for the given subsystemConfigurationId.
- * <p>
- * SAME AS: <code>getSystemRegistry().getSubSystemConfiguration(subsystemConfigurationId)</code>
- * @param subsystemConfigurationId The id of the subsystem configuration as given in its plugin.xml id attribute for the subsystemConfigurations extension point
- */
- public static ISubSystemConfiguration getSubSystemConfiguration(String subsystemConfigurationId)
- {
- return getSystemRegistry().getSubSystemConfiguration(subsystemConfigurationId);
- }
-
- /**
- * Miscallenous Helper. Return singleton profile manager
- * SAME AS: <code>getSystemRegistry().getSystemProfileManager()</code>
- */
- public static ISystemProfileManager getSystemProfileManager()
- {
- return SystemProfileManager.getSystemProfileManager();
- }
-
- /**
- * Return all active profiles.
- * <p>
- * A team might have many profiles, at least one per developer.
- * However, typically only one or two are activated at a time, and
- * we only return connections for those which are active.
- * <p>
- * SAME AS: <code>getSystemRegistry().getActiveSystemProfiles()</code>
- */
- public static ISystemProfile[] getActiveSystemProfiles()
- {
- return getSystemRegistry().getActiveSystemProfiles();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/plugin.properties b/rse/plugins/org.eclipse.rse.ui/plugin.properties
deleted file mode 100644
index a889d5ff3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/plugin.properties
+++ /dev/null
@@ -1,126 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 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.
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-
-pluginName = RSE UI
-providerName = Eclipse.org
-
-extPoint.subsystemConfigurations = Remote Subsystem Configurations
-extPoint.popupMenus = Remote Object Popup Menu Actions
-extPoint.propertyPages = RRemote Object Property Pages
-extPoint.remoteSystemsViewPreferencesActions = Remote Systems View Preferences Actions
-extPoint.compile = Remote Compile Commands
-extPoint.archivehandlers = Remote Archive Handlers
-extPoint.mountPathMappers = Mount Path Mappers
-
-#systemType.iseries = iSeries native operating system (OS/400 or i5/OS)
-#systemType.iseries.PASE = PASE on iSeries
-#systemType.zseries = zSeries native operating system (z/OS)
-systemType.windows = Any version of Microsoft Windows
-systemType.unix = Any distribution of Unix
-#systemType.aix = IBM AIX operating system
-systemType.linux = Any distribution of Linux
-#systemType.powerlinux = Linux running on PowerPC hardware
-#systemType.zlinux = Linux running on zSeries hardware
-systemType.local = Local file system on this computer
-
-#PropertyPage.Info = Info
-#PropertyPage.Team = Team
-PropertyPage.Connection = Host
-PropertyPage.Connection.SubSystems = Subsystems
-PropertyPage.Connection.ConnectorServices = Connector Services
-PropertyPage.SubSystem = Subsystem
-PropertyPage.ReferencedFilterPool = Referenced Filter Pool
-PropertyPage.Reference = Reference
-PropertyPage.Filter = Filter Information
-PropertyPage.ChangeFilter = Filter Strings
-PropertyPage.FilterPool = Filter Pool
-PropertyPage.FilterString = Filter String
-PropertyPage.TeamViewCategoryNode = Category Information
-PropertyPage.Profile = Profile Information
-PropertyPage.TeamViewSubSystemFactoryNode = SubSystem Factory Information
-PropertyPage.TeamViewUserActionNode = User Action Information
-PropertyPage.TeamViewCompileTypeNode = Compile Type Information
-PropertyPage.TeamViewCompileCommandNode = Compile Command Information
-
-PropertyPage.ServerLauncherSettings = Server Launcher Settings
-PropertyPage.ServerConnectionSecurity = Server Connection Security
-PropertyPage.Service = Service
-
-
-View.Category.RemoteSystems = Remote Systems
-View.RemoteSystems = Remote Systems
-View.RemoteSystemsDetails = Remote System Details
-
-View.Team = Team
-View.RemoteErrorList = Remote Error List
-
-Perspective.Explorer = Remote System Explorer
-
-Factory.LocalFiles = Local Files
-Factory.LocalCmds = Local Shells
-
-PreferencePage.Logging = Logging
-PreferencePage.RemoteSystems = Remote Systems
-PreferencePage.Signon = Passwords
-PreferencePage.Communications = Communications
-
-Nature.RemoteSystemsNature = Remote System Nature
-Nature.RemoteSystemsTempNature = Remote System Temp Nature
-
-Editor.Editor = LPEX Editor
-Editor.RSEEditor = Remote Systems LPEX Editor
-Editor.RSEBrowser = Remote Systems LPEX Browser
-
-View.Search = Remote Search
-
-View.Scratchpad = Remote Scratchpad
-
-View.Monitor = Remote Monitor
-
-PreferencePageAction.rse.label = Remote Systems...
-PreferencePageAction.rse.tooltip = Go to the Remote Systems primary preferences page
-
-# Decorators
-SubSystemErrorDecorator.label=SubSystem Error Decorator
-
-# Presentation
-RSEPresentation.label = Remote System Explorer
-RSEPresentation.description = Colors and fonts used by Remote System Explorer.
-MessagesPresentation.label = Messages
-MessagesPresentation.description = Colors used for Remote System Explorer messages.
-RemoteCommandsViewPresentation.label = Remote Shell View
-RemoteCommandsViewPresentation.description = Colors and fonts used by Remote Shell view.
-ErrorMessage.label = Error message color
-ErrorMessage.description = Color used to show error messages in dialogs.
-WarningMessage.label = Warning message color
-WarningMessage.description = Color used to show warning messages in dialogs.
-InfoMessage.label = Informational message color
-InfoMessage.description = Color used to show informational messages in dialogs.
-RemoteCommandsViewFontDefinition.label = Remote Shell Font
-RemoteCommandsViewFontDefinition.description = This font is used by the Remote Shell view.
-RemoteCommandsForeground.label = Foreground color
-RemoteCommandsForeground.description = The foreground color is used by the Remote Shell view.
-RemoteCommandsBackground.label = Background color
-RemoteCommandsBackground.description = The background color is used by the Remote Shell view.
-RemoteCommandsPrompt.label = Prompt color
-RemoteCommandsPrompt.description = The text color used for displaying prompts.
-
-# Creation wizard
-Creation.category.name = Remote System Explorer
-Creation.connection.name = Connection
-Creation.connection.description = Create a new connection to a remote system \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/plugin.xml b/rse/plugins/org.eclipse.rse.ui/plugin.xml
deleted file mode 100644
index 885bbeb3e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/plugin.xml
+++ /dev/null
@@ -1,886 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-<!-- ================================================================================== -->
-<!-- EXTENSION POINT: org.eclipse.rse.ui.subsystemConfigurations -->
-<!-- ================================================================================== -->
-<!-- Extension point for defining subsystem factories. A configuration is responsible for -->
-<!-- creating subsystem instances. -->
-<!-- -->
-<!-- Example of extension configuration: -->
-<!-- <extension -->
-<!-- point="org.eclipse.rse.ui.subsystemConfigurations"> -->
-<!-- <configuration -->
-<!-- systemTypes="Local;Unix;Linux" -->
-<!-- name="Files" -->
-<!-- description="This subsystem allows you to work with files on local or remote systems."-->
-<!-- icon="icons/filesubsys.gif" -->
-<!-- iconlive="icons/filesubsyslive.gif" -->
-<!-- id="com.acme.etools.mypkg.myconfiguration" -->
-<!-- class="com.acme.etools.mypkg.MyClass" -->
-<!-- category="files" -->
-<!-- vendor="ACME" -->
-<!-- > -->
-<!-- </configuration> -->
-<!-- </extension> -->
-<!-- Each extension can contain multiple configuration tags that identify a subsystem configuration -->
-<!-- -->
-<!-- <configuration> tag attributes: -->
-<!-- ================================================================================== -->
-<!-- systemTypes => semicolon-separated list of system types or * for all -->
-<!-- class => class implementing org.eclipse.rse.subsystems.SubSystemFactory -->
-<!-- category => optionally identifies category to allow efficient subsetting of -->
-<!-- connection lists. Pre-defined categories are "files", "cmds" and -->
-<!-- "jobs". Can also specify your own category like "database" -->
-<!-- icon => icon to display for subsystems of this configuration when not connected -->
-<!-- iconlive => icon to display for subsystems of this configuration when connected -->
-<!-- name => translatable display name for subsystems of this configuration -->
-<!-- description => translatable descriptin for subsystems of this configuration -->
-<!-- id => unique id for this extension point. Will be used for a folder name -->
-<!-- vendor => name of company supplying this configuration -->
-<!-- systemClass => OBSOLETE - Removed in OpenRSE. -->
-<!-- Was only used when naming a predefined subsystem configuration -->
-<!-- in the <samp>class</samp> attribute, when you want to subclass or replace the -->
-<!-- predefined IConnectorService object used to manage the live connection with -->
-<!-- the remote system. Name a class that implements -->
-<!-- org.eclipse.rse.core.subsystems.IConnectorService or extends the appropriate -->
-<!-- predefined class such as org.eclipse.rse.universal.UniversalSystem -->
-<!-- for unix, windows and system types. -->
-<!-- ================================================================================== -->
-<!-- -->
-<!-- For systemTypes, if you specify * for all, you still have a chance at runtime to -->
-<!-- not create a subsystem for a given system type. Simply return false from your -->
-<!-- appliesToSystemType method. -->
-<!-- -->
-<!-- -->
-<!-- ================================================================================== -->
-
- <extension-point id="subsystemConfigurations" name="%extPoint.subsystemConfigurations" schema="schema/subsystemConfigurations.exsd"/>
-
-<!-- ================================================================================== -->
-<!-- EXTENSION POINT: org.eclipse.rse.ui.propertyPages -->
-<!-- ================================================================================== -->
-<!-- Extension point for defining property pages for remote objects. -->
-<!-- This extension point is modeled after the workbench extension point -->
-<!-- org.eclipse.ui.propertyPages. However it hardcodes the objectClass to -->
-<!-- com.etools.systems.core.ui.view.ISystemRemoteElement, and it allows filtering by the -->
-<!-- remote object's subsystem configuration, and the object's name, type, subtype and even -->
-<!-- sub-subtype. All filter values can be scalar or simple generic: begins or ends -->
-<!-- with an asterisk. Not specifying a filter is the same as specifying '*' -->
-<!-- -->
-<!-- For all the filtering values, if you want to start or end it with an asterisk -->
-<!-- but you do not want that asterisk to be interpreted as a wildcard, use -->
-<!-- the special symbol "%%ast." without the quotes. For example, for iSeries -->
-<!-- object types like "*PGM" you can specify "%%ast.PGM" for an exact match. -->
-<!-- -->
-<!-- Like the workbench extension point, the class that you implement must -->
-<!-- implement IWorkbenchPropertyPage. -->
-<!-- -->
-<!-- Attributes: -->
-<!-- ================================================================================== -->
-<!-- id => unique id for this extension point extender -->
-<!-- name => translatable display name for the page -->
-<!-- icon => an optional image icon for the property page. This is a .gif file, given -->
-<!-- with a path relative to your plugin directory. -->
-<!-- class => your class that implements IWorkbenchPropertyPage -->
-<!-- subsystemconfigurationid => the subsystem configuration id to whose objects you wish to show -->
-<!-- a property page for. Can be a simple name or simple generic -->
-<!-- name to match on. -->
-<!-- This id matches the id attribute of a subsystemConfigurations -->
-<!-- extension point. -->
-<!-- subsystemconfigurationCategory => a subsystem configuration "category" to match on. Can be a -->
-<!-- simple name or simple generic like "*files". Matches on -->
-<!-- the "category" attribute of the subsystem configuration. -->
-<!-- Known values are "file", "nativefiles", "commands" or "jobs". -->
-<!-- systemTypes => semicolon-separated list of system types or * for all -->
-<!-- namefilter => scalar or simple generic name to match on. -->
-<!-- typecategoryfilter => scalar or simple generic type category to match on. -->
-<!-- This is subsystem configuration defined and usually not needed if -->
-<!-- the subsystemconfiguration id is given. -->
-<!-- typefilter => scalar or simple generic type to match on. This too is subsystem -->
-<!-- configuration defined. -->
-<!-- subtypefilter => scalar or simple generic subtype to match on. -->
-<!-- subsubtypefilter => scalar or simple generic sub-subtype to match on. -->
-<!-- ================================================================================== -->
-<!-- -->
-<!-- __________________________________________________________________________________ -->
-<!-- Example of extension configuration: -->
-<!-- <extension point="org.eclipse.rse.ui.propertyPages"> -->
-<!-- <page class="com.acme.myPropertyPage" -->
-<!-- id="com.acme.mypropertypage" -->
-<!-- name="Remote File Info" -->
-<!-- icon="icons/myProperties.gif" -->
-<!-- subsystemconfigurationid="local.files" -->
-<!-- subsystemconfigurationCategory="files" -->
-<!-- typefilter="file" -->
-<!-- subtypefilter="java" -->
-<!-- namefilter="*.java" -->
-<!-- </page> -->
-<!-- </extension> -->
-<!-- -->
-<!-- ================================================================================== -->
-
- <extension-point id="propertyPages" name="%extPoint.propertyPages" schema="schema/propertyPages.exsd"/>
-
-<!-- ================================================================================== -->
-<!-- EXTENSION POINT: org.eclipse.rse.ui.popupMenus -->
-<!-- ================================================================================== -->
-<!-- Extension point for defining actions for remote objects. -->
-<!-- This extension point is modeled after the workbench extension point -->
-<!-- org.eclipse.ui.popupMenus. -->
-<!-- However, because we know what we are targeting, it is simplified a bit. -->
-<!-- Specifically, there is no need to specify the object class, as we assume it -->
-<!-- applies to remote objects. -->
-<!-- On the other hand, we need a special mechanism to enable you to specify exactly -->
-<!-- what type of remote object the action is to apply to. We supply a rich set of -->
-<!-- attributes to enable fine-grained scoping by a number of criteria. These -->
-<!-- scoping attributes are identical to those in our own propertyPages extension -->
-<!-- point for remote objects. -->
-<!-- -->
-<!-- For all the filtering values, if you want to start or end it with an asterisk -->
-<!-- but you do not want that asterisk to be interpreted as a wildcard, use -->
-<!-- the special symbol "%%ast." without the quotes. For example, for iSeries -->
-<!-- object types like "*PGM" you can specify "%%ast.PGM" for an exact match. -->
-<!-- -->
-<!-- Like the workbench extension point, unless you specify o/w, the action will show -->
-<!-- up in the main popup menu in the "additions" group. To create cascading -->
-<!-- submenus, first define a submenu and named separator group within it, using the -->
-<!-- menu tag and its separator sub-tag. Then refer to that menu's id in your action -->
-<!-- tag's menubarPath attribute: menuid/separator-group-name. -->
-<!-- -->
-<!-- Like the workbench extension point, the action class that you implement must -->
-<!-- implement org.eclipse.ui.IObjectActionDelegate -->
-<!-- -->
-<!-- ================================================================================== -->
-<!-- <objectContribution> main tag: -->
-<!-- Within each of these tags, specify scoping criteria and then all the menus and -->
-<!-- actions that apply to that scoping criteria. Other than id, each of the other -->
-<!-- attributes are optional ... specify as many as needed to uniquely identify which -->
-<!-- remote objects your actions should apply to. That is, show up in the popup menu. -->
-<!-- ================================================================================== -->
-<!-- id => unique id for this extension point extender -->
-<!-- subsystemconfigurationid => the subsystem configuration id for whose objects you wish to show -->
-<!-- a popup action for. Can be a simple name or simple generic -->
-<!-- name to match on. -->
-<!-- This id matches the id attribute of a subsystemConfigurations -->
-<!-- extension point. -->
-<!-- subsystemconfigurationCategory => a subsystem configuration "category" to match on. Can be a -->
-<!-- simple name or simple generic like "*files". Matches on -->
-<!-- the "category" attribute of the subsystem configuration. -->
-<!-- systemTypes => semicolon-separated list of system types or * for all -->
-<!-- namefilter => scalar or simple generic name to match on -->
-<!-- typecategoryfilter => scalar or simple generic type category to match on. -->
-<!-- This is subsystem configuration defined and usually not needed if -->
-<!-- the subsystemconfiguration id is given. -->
-<!-- typefilter => scalar or simple generic type to match on. This too is subsystem -->
-<!-- configuration defined. -->
-<!-- subtypefilter => scalar or simple generic subtype to match on. -->
-<!-- subsubtypefilter => scalar or simple generic sub-subtype to match on. No -->
-<!-- predefined subsystem factories currently set this -->
-<!-- -->
-<!-- ================================================================================== -->
-<!-- <menu> sub tag (of <objectContribution> tag) attributes: -->
-<!-- Use one of these tags for each cascading submenu you wish to define in order to -->
-<!-- subsequently direction your actions into that submenu. To have nested cascading -->
-<!-- submenus, define two menu tags, and name the first in the path attribute -->
-<!-- of the second. -->
-<!-- What is a "group"? It is a named partition of a popup menu, allowing you to -->
-<!-- direct where in the menu to place an action. There are many predefined already. -->
-<!-- The typical and default group for your actions is "additions". -->
-<!-- ================================================================================== -->
-<!-- id => unique id for this submenu, used later in first part of the menubarPath -->
-<!-- attribute of the action or path attribute of a nested submenu. -->
-<!-- This is used to identify the target submenu of the action or subsubmenu -->
-<!-- label => readable text to show up in the popup menu, for this cascading menu. -->
-<!-- Do NOT specify '&' for mnemonics as these are assigned for you. -->
-<!-- However, accerator information is valid as defined by the Eclipse rules.-->
-<!-- path => the group or previously defined menu where to place this menu in the -->
-<!-- popup. If omitted, it is placed in the "additions" group with is near -->
-<!-- the bottom of the popup. Other predefined groups are "new", "goto", -->
-<!-- "openwith", "open", "show", "change" and "reorganize" in order from top -->
-<!-- to bottom of the popup -->
-<!-- -->
-<!-- ================================================================================== -->
-<!-- <separator> sub tag (of <menu> tag) attributes: -->
-<!-- Use the separator tag to define your own groups within your own submenus. Since -->
-<!-- it is your menu there are no groups predefined, and you must specify a group as -->
-<!-- the last part of the menubarPath attribute of the action tag. Therefore, menu -->
-<!-- tags must have at least one separator tag. If more than one is specified, then -->
-<!-- a separator is placed between the two groups at runtime. -->
-<!-- ================================================================================== -->
-<!-- name => the arbitrary name to assign this group. Specify it later in menubarPath -->
-<!-- attributes for actions to direct an action to an area of the menu. -->
-<!-- -->
-<!-- ================================================================================== -->
-<!-- <action> sub tag (of <objectContribution> tag) attributes: -->
-<!-- Use one of these tags for each action to place in the popup menu for remote -->
-<!-- objects. It will only show up if the object matches the criteria given in the -->
-<!-- parent <objectContribution> tag. -->
-<!-- ================================================================================== -->
-<!-- id => unique id for this action. Not really used but must be specified. -->
-<!-- label => readable text to display in the popup menu for this action. -->
-<!-- Do NOT specify '&' for mnemonics as these are assigned for you. -->
-<!-- However, accerator information is valid as defined by the Eclipse rules.-->
-<!-- icon => an optional image icon for the popup menu. This is a .gif file, given -->
-<!-- with a path relative to your plugin directory. OPTIONAL ATTRIBUTE. -->
-<!-- class => your action class that implements org.eclipse.ui.IObjectActionDelegate -->
-<!-- tooltip => optional tooltip text for this action -->
-<!-- menubarPath => a slash-delimited path ('/') that is used to specify the location -->
-<!-- of the action in the pop-up menu. Each token in the path except the last -->
-<!-- one represents an existing submenu in the hierarchy, as defined via the -->
-<!-- id attribute of a <menu> tag previously. The last token represents the -->
-<!-- named separator group into which the action will be added. If a path is -->
-<!-- given then this must match the name attribute of some <separator> subtag -->
-<!-- within one of your <menu> tags. -->
-<!-- If the path is omitted, the action will be added to the standard group -->
-<!-- named "additions". Indeed, same if the whole menubarPath attr is omitted.-->
-<!-- enablesFor => a value indicating the selection count which must be met to enable -->
-<!-- the action. If this attribute is specified and the condition is met the -->
-<!-- action is enabled. If the condition is not met the action is disabled. -->
-<!-- If no attribute is specified the action is enabled for any number of -->
-<!-- items selected. The following attribute formats are supported: -->
-<!-- ! -> 0 items selected -->
-<!-- ? -> 0 or 1 items selected -->
-<!-- + -> 1 or more items selected -->
-<!-- multiple, 2+ -> 2 or more items selected -->
-<!-- n - a precise number of items selected. Example: 4. -->
-<!-- * - any number of items selected -->
-<!-- state => an optional attribute indicating that the action should be of a toggle -->
-<!-- type. When added to a pop-up menu, it will manifest itself as a check -->
-<!-- box item.. If defined, attribute value will be used as the initial state -->
-<!-- (either true or false) -->
-<!-- helpContextId => a optional, unique identifier indicating the help context id for -->
-<!-- this action. When the action appears as a menu item, pressing F1 while -->
-<!-- the menu item is highlighted will display help for the given context id. -->
-<!-- -->
-<!-- __________________________________________________________________________________ -->
-<!-- Example of extension configuration: -->
-<!-- <extension point="org.eclipse.rse.ui.popupMenus"> -->
-<!-- <objectContribution -->
-<!-- id="com.acme.displayfile.actions" -->
-<!-- subsystemconfigurationid="acme.files" -->
-<!-- typecategoryfilter="OBJECT*" -->
-<!-- typefilter="*FILE" -->
-<!-- subtypefilter="DSPF" -->
-<!-- namefilter="*"> -->
-<!-- <menu id="com.acme.displayfile.menu" -->
-<!-- label="My Display File Actions"> -->
-<!-- <separator name="group1"/> -->
-<!-- </menu> -->
-<!-- <action id="com.acme.action1" -->
-<!-- label="My first action" -->
-<!-- class="com.acme.actions.Action1" -->
-<!-- menubarPath="com.acme.displayfile.menu/group1" -->
-<!-- enablesFor="1"> -->
-<!-- </action> -->
-<!-- <action id="com.acme.action2" -->
-<!-- label="My second action" -->
-<!-- class="com.acme.actions.Action2" -->
-<!-- menubarPath="com.acme.displayfile.menu/group1" -->
-<!-- enablesFor="+"> -->
-<!-- </action> -->
-<!-- </objectContribution> -->
-<!-- </extension> -->
-<!-- Remember, you can repeat the <objectContribution> tags as needed, as well as the -->
-<!-- <menu> and <action> tags within them. -->
-<!-- ================================================================================== -->
-
- <extension-point id="popupMenus" name="%extPoint.popupMenus" schema="schema/popupMenus.exsd"/>
-
-<!-- ================================================================================== -->
-<!-- EXTENSION POINT: org.eclipse.rse.ui.compile -->
-<!-- ================================================================================== -->
-<!-- Extension point for defining compile commands. -->
-<!-- Example of extension configuration: -->
-<!-- <extension point="org.eclipse.rse.ui.compile"> -->
-<!-- <compilecommand -->
-<!-- id="com.mycomp.compileCommand1" -->
-<!-- label="My Label 1" -->
-<!-- commandstring="mycommand ${resource_name}" -->
-<!-- subsystemconfigurationid="acme.files" -->
-<!-- namefilter="*.java"> -->
-<!-- </compilecommand> -->
-<!-- </extension> -->
-<!-- -->
-<!-- <compileCommand> tag attributes: -->
-<!-- ================================================================================== -->
-<!-- id => unique id for this compile command. -->
-<!-- label => label for compile command. This will be displayed in the -->
-<!-- compile menus. -->
-<!-- commandstring => the compile string to be executed. Can contain substitution -->
-<!-- variables. -->
-<!-- subsystemconfigurationid => the subsystem configuration id of resources to which this compile -->
-<!-- compile command will apply. -->
-<!-- namefilter => the names to match. Must be either generic or of the form -->
-<!-- *.extension, e.g. *.java. -->
-<!-- typefilter => the type of the remote resource. -->
-<!-- labeleditable => specify whether label is editable in the Work With Compile -->
-<!-- Commands dialog. -->
-<!-- -->
-<!-- See the extension point reference for more details. -->
-
-<!-- TODODeferred after RSE 1.0
- <extension-point id="compile" name="%extPoint.compile" schema="schema/compile.exsd"/>
--->
-
-<!-- ================================================================================== -->
-<!-- EXTENSION POINT: org.eclipse.rse.ui.remoteSystemsViewPreferencesActions -->
-<!-- ================================================================================== -->
-<!-- Extension point for defining actions that appear in the cascading Preferences menu -->
-<!-- in the local pulldown menu for the Remote Systems view. These actions should -->
-<!-- take the directly to a preference page root, as a shortcut to navigating the -->
-<!-- Windows->Preferences preferences dialog. The action's class should extend the -->
-<!-- class org.eclipse.rse.ui.actions.SystemBasePreferencesPageAction. -->
-<!-- -->
-<!-- Example of extension configuration: -->
-<!-- <extension point="org.eclipse.rse.ui.remoteSystemsViewPreferencesActions"> -->
-<!-- <action -->
-<!-- id="com.acme.showMyPreferencePage" -->
-<!-- label="My Preferences" -->
-<!-- preferencePageId="com.acme.myPreferencePage"> -->
-<!-- </action> -->
-<!-- </extension> -->
-<!-- -->
-<!-- <action> tag attributes: -->
-<!-- ================================================================================== -->
-<!-- id => unique id for this action. -->
-<!-- label => label for the action. This will be displayed in the -->
-<!-- preferences cascading menu. -->
-<!-- preferencePageId => the "id" value of your org.eclipse.ui.preferencePages -->
-<!-- extension, for the preference page to root the -->
-<!-- preferences dialog to when the action is selected -->
-<!-- preferencePageCategory => if this is not a root page, then specify the id of the -->
-<!-- root page this is part of. This should be the absolute -->
-<!-- root, not the immediate parent. It tells us what root tree -->
-<!-- to search in to find the child. -->
-<!-- icon => optional. Icon to display for this action. -->
-<!-- tooltip => optional. Tooltip text to show in hover help. -->
-<!-- helpContextId => optional. ID of contextual help to show when F1 is pressed -->
-<!-- -->
-<!-- See the extension point reference for more details. -->
-
- <extension-point id="remoteSystemsViewPreferencesActions" name="%extPoint.remoteSystemsViewPreferencesActions" schema="schema/remoteSystemsViewPreferencesActions.exsd"/>
-
-<!-- ============================================ -->
-<!-- Define a RemoteSystems project nature -->
-<!-- ============================================ -->
- <extension
- id="remotesystemsnature"
- name="%Nature.RemoteSystemsNature"
- point="org.eclipse.core.resources.natures">
- <runtime>
- <run
- class="org.eclipse.rse.core.RemoteSystemsProject">
- </run>
- </runtime>
- </extension>
-
-<!-- ============================================ -->
-<!-- Define a RemoteSystemsTempFiles project -->
-<!-- nature to enable debugging -->
-<!-- ============================================ -->
- <extension
- id="remoteSystemsTempNature"
- name="%Nature.RemoteSystemsTempNature"
- point="org.eclipse.core.resources.natures">
- <runtime>
- <run
- class="org.eclipse.rse.core.RemoteSystemsTempProjectNature">
- </run>
- </runtime>
- </extension>
-
-<!-- ============================================ -->
-<!-- Define a RemoteSystems preference page -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%PreferencePage.RemoteSystems"
- class="org.eclipse.rse.ui.propertypages.RemoteSystemsPreferencePage"
- id="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage">
- </page>
- <page
- name="%PreferencePage.Logging"
- category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
- class="org.eclipse.rse.ui.propertypages.SystemLoggingPreferencePage"
- id="org.eclipse.rse.ui.LoggingPreferences">
- </page>
- <page
- name="%PreferencePage.Signon"
- category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
- class="org.eclipse.rse.ui.propertypages.SignonPreferencePage"
- id="org.eclipse.rse.ui.preferences.SignonPreferencePage">
- </page>
- <page
- name="%PreferencePage.Communications"
- category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
- class="org.eclipse.rse.ui.propertypages.SystemCommunicationsPreferencePage"
- id="org.eclipse.rse.ui.preferences.SystemCommunicationsPreferencePage">
- </page>
- </extension>
-
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.rse.ui.propertypages.SystemPreferenceInitializer"/>
- </extension>
-
-<!-- predefine known system types -->
- <extension
- point="org.eclipse.rse.core.systemTypes">
- <!--
- <systemType id="org.eclipse.rse.systemtype.iseries"
- name="iSeries"
- description="%systemType.iseries"
- icon="icons/full/obj16/system400_obj.gif"
- iconLive="icons/full/obj16/system400live_obj.gif"/>
- <systemType id="org.eclipse.rse.systemtype.iseries.PASE"
- name="PASE"
- description="%systemType.iseries.PASE"
- icon="icons/full/obj16/system400_obj.gif"
- iconLive="icons/full/obj16/system400live_obj.gif"/>
- -->
- <systemType id="org.eclipse.rse.systemtype.windows"
- name="Windows"
- description="%systemType.windows"
- icon="icons/full/obj16/systemwin_obj.gif"
- iconLive="icons/full/obj16/systemwinlive_obj.gif"/>
- <!--
- <systemType id="org.eclipse.rse.systemtype.zseries"
- name="z/OS"
- description="%systemType.zseries"
- icon="icons/full/obj16/system390_obj.gif"
- iconLive="icons/full/obj16/system390live_obj.gif"/>
- -->
- <systemType id="org.eclipse.rse.systemtype.linux"
- name="Linux"
- description="%systemType.linux"
- icon="icons/full/obj16/systemlinux_obj.gif"
- iconLive="icons/full/obj16/systemlinuxlive_obj.gif"/>
- <!--
- <systemType id="org.eclipse.rse.systemtype.linux.power"
- name="Power Linux"
- description="%systemType.powerlinux"
- icon="icons/full/obj16/systemlinux_obj.gif"
- iconLive="icons/full/obj16/systemlinuxlive_obj.gif"/>
- <systemType id="org.eclipse.rse.systemtype.linux.zSeries"
- name="zSeries Linux"
- description="%systemType.zlinux"
- icon="icons/full/obj16/systemlinux_obj.gif"
- iconLive="icons/full/obj16/systemlinuxlive_obj.gif"/>
- -->
- <systemType id="org.eclipse.rse.systemtype.unix"
- name="Unix"
- description="%systemType.unix"
- icon="icons/full/obj16/systemunix_obj.gif"
- iconLive="icons/full/obj16/systemunixlive_obj.gif"/>
- <!--
- <systemType id="org.eclipse.rse.systemtype.aix"
- name="AIX"
- description="%systemType.aix"
- icon="icons/full/obj16/systemaix_obj.gif"
- iconLive="icons/full/obj16/systemaixlive_obj.gif"/>
- -->
- <systemType id="org.eclipse.rse.systemtype.local"
- name="Local"
- description="%systemType.local"
- icon="icons/full/obj16/systemlocal_obj.gif"
- iconLive="icons/full/obj16/systemlocallive_obj.gif"/>
- </extension>
-
-
-<!-- ============================================ -->
-<!-- Define Workbench Properties Pages -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- objectClass="org.eclipse.rse.core.subsystems.ISubSystem"
- name="%PropertyPage.SubSystem"
- class="org.eclipse.rse.ui.propertypages.SystemSubSystemPropertyPageCore"
- id="org.eclipse.rse.SubSystemsPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.rse.core.model.IHost"
- name="%PropertyPage.Connection"
- class="org.eclipse.rse.ui.propertypages.SystemConnectionPropertyPage"
- id="org.eclipse.rse.SystemPropertyPage">
- </page>
- <!-- with move to services this should disappear
- <page
- objectClass="org.eclipse.rse.model.IHost"
- name="%PropertyPage.Connection.SubSystems"
- class="org.eclipse.rse.ui.propertypages.SystemConnectionSubSystemsPropertyPage"
- id="org.eclipse.rse.SystemConnectionSubSystemsPropertyPage">
- </page>
- -->
- <page
- objectClass="org.eclipse.rse.core.model.IHost"
- name="%PropertyPage.Connection.ConnectorServices"
- class="org.eclipse.rse.ui.propertypages.SystemConnectorServicesPropertyPage"
- id="org.eclipse.rse.ui.propertypages.SystemConnectorServicesPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.rse.core.filters.ISystemFilterPool"
- name="%PropertyPage.FilterPool"
- class="org.eclipse.rse.ui.propertypages.SystemFilterPoolPropertyPage"
- id="org.eclipse.rse.SystemFilterPoolPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.rse.core.filters.ISystemFilterPoolReference"
- name="%PropertyPage.Reference"
- class="org.eclipse.rse.ui.propertypages.SystemFilterPoolReferencePropertyPage"
- id="org.eclipse.rse.SystemFilterPoolReferencePropertyPage">
- </page>
- <page
- objectClass="org.eclipse.rse.core.filters.ISystemFilterPoolReference"
- name="%PropertyPage.ReferencedFilterPool"
- class="org.eclipse.rse.ui.propertypages.SystemFilterPoolPropertyPage"
- id="org.eclipse.rse.SystemFilterPoolReferencePropertyPage2">
- </page>
- <page
- objectClass="org.eclipse.rse.core.filters.ISystemFilter"
- name="%PropertyPage.Filter"
- class="org.eclipse.rse.ui.propertypages.SystemFilterPropertyPage"
- id="org.eclipse.rse.SystemFilterPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.rse.core.filters.ISystemFilterReference"
- name="%PropertyPage.Filter"
- class="org.eclipse.rse.ui.propertypages.SystemFilterPropertyPage"
- id="org.eclipse.rse.SystemFilterReferencePropertyPage">
- </page>
- <page
- objectClass="org.eclipse.rse.core.filters.ISystemFilter"
- name="%PropertyPage.ChangeFilter"
- class="org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage"
- id="org.eclipse.rse.SystemChangeFilterPropertyPage">
- <filter name="showChangeFilterStringPropertyPage" value="true"/>
- </page>
- <page
- objectClass="org.eclipse.rse.core.filters.ISystemFilterReference"
- name="%PropertyPage.ChangeFilter"
- class="org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage"
- id="org.eclipse.rse.SystemChangeFilterReferencePropertyPage">
- <filter name="showChangeFilterStringPropertyPage" value="true"/>
- </page>
- <page
- objectClass="org.eclipse.rse.core.filters.ISystemFilterString"
- name="%PropertyPage.FilterString"
- class="org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage"
- id="org.eclipse.rse.SystemFilterStringPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.rse.ui.view.team.SystemTeamViewCategoryNode"
- name="%PropertyPage.TeamViewCategoryNode"
- class="org.eclipse.rse.ui.propertypages.SystemTeamViewCategoryPropertyPage"
- id="org.eclipse.rse.SystemTeamViewCategoryPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.rse.core.model.ISystemProfile"
- name="%PropertyPage.Profile"
- class="org.eclipse.rse.ui.propertypages.SystemTeamViewProfilePropertyPage"
- id="org.eclipse.rse.SystemProfilePropertyPage">
- </page>
- <page
- objectClass="org.eclipse.rse.ui.view.team.SystemTeamViewSubSystemConfigurationNode"
- name="%PropertyPage.TeamViewSubSystemFactoryNode"
- class="org.eclipse.rse.ui.propertypages.SystemTeamViewSubSystemConfigurationPropertyPage"
- id="org.eclipse.rse.SystemTeamViewSubSystemFactoryPropertyPage">
- </page>
-
- </extension>
-<!-- ============================================ -->
-<!-- Define Help Context -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.help.contexts">
- <contexts
- file="HelpContexts.xml">
- </contexts>
- </extension>
-<!-- ============================================ -->
-<!-- Define Remote System Explorer Views -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%View.Category.RemoteSystems"
- id="org.eclipse.rse.ui.view">
- </category>
- <view
- name="%View.RemoteSystems"
- icon="icons/full/cview16/system_view.gif"
- category="org.eclipse.rse.ui.view"
- class="org.eclipse.rse.ui.view.SystemViewPart"
- id="org.eclipse.rse.ui.view.systemView">
- </view>
- <view
- name="%View.Team"
- icon="icons/full/cview16/team_view.gif"
- category="org.eclipse.rse.ui.view"
- class="org.eclipse.rse.ui.view.team.SystemTeamViewPart"
- id="org.eclipse.rse.ui.view.teamView">
- </view>
- <view
- name="%View.RemoteSystemsDetails"
- icon="icons/full/cview16/system_view.gif"
- category="org.eclipse.rse.ui.view"
- class="org.eclipse.rse.ui.view.SystemTableViewPart"
- id="org.eclipse.rse.ui.view.systemTableView">
- </view>
- <!-- Remote Search View -->
- <view
- name="%View.Search"
- icon="icons/full/obj16/system_search.gif"
- category="org.eclipse.rse.ui.view"
- class="org.eclipse.rse.ui.view.search.SystemSearchViewPart"
- id="org.eclipse.rse.ui.view.SystemSearchView">
- </view>
- <!-- Remote Scratchpad View -->
- <view
- name="%View.Scratchpad"
- icon="icons/full/view16/scratchpad_view.gif"
- category="org.eclipse.rse.ui.view"
- class="org.eclipse.rse.ui.view.scratchpad.SystemScratchpadViewPart"
- id="org.eclipse.rse.ui.view.scratchpad.SystemScratchpadViewPart">
- </view>
- <!-- Remote Monitor View -->
- <view
- name="%View.Monitor"
- icon="icons/full/view16/system_view.gif"
- category="org.eclipse.rse.ui.view"
- class="org.eclipse.rse.ui.view.monitor.SystemMonitorViewPart"
- id="org.eclipse.rse.ui.view.monitorView">
- </view>
-<!-- Remote Error List being commented out
- <view
- name="%View.RemoteErrorList"
- icon="icons/full/cview16/errorlist_view.gif"
- category="org.eclipse.rse.ui.view"
- class="org.eclipse.rse.ui.view.commands.SystemBuildErrorViewPart"
- id="org.eclipse.rse.ui.view.buildErrorView">
- </view>
--->
- </extension>
-
-<!-- ================================================================================= -->
-<!-- Define Remote System Explorer view pulldown menu submenu for preferences actions -->
-<!-- ================================================================================= -->
- <extension point="org.eclipse.rse.ui.remoteSystemsViewPreferencesActions">
- <action
- id="org.eclipse.rse.ui.preferences.actions.rse"
- label="%PreferencePageAction.rse.label"
- preferencePageId="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
- tooltip="%PreferencePageAction.rse.tooltip"
- helpContextId="org.eclipse.rse.ui.aprefrse"
- />
- </extension>
-
-<!-- ============================================ -->
-<!-- Define Remote Systems Perspective -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%Perspective.Explorer"
- icon="icons/full/cview16/system_persp.gif"
- class="org.eclipse.rse.ui.view.SystemPerspectiveLayout"
- id="org.eclipse.rse.ui.view.SystemPerspective">
- </perspective>
- </extension>
-<!-- ================================================================== -->
-<!-- -->
-<!-- for the Open In New Perspective RSE perspectives -->
-<!-- Element Factory for Restoring Input Objects from mementos, -->
-<!-- -->
-<!-- ================================================================== -->
- <extension
- point="org.eclipse.ui.elementFactories">
- <factory
- class="org.eclipse.rse.ui.view.SystemViewPart"
- id="org.eclipse.rse.systemview.elementfactory">
- </factory>
- </extension>
-
-<!-- ================================================================= -->
-<!-- Define Archive Handlers extension point -->
-<!-- ================================================================= -->
- <extension-point id="archivehandlers" name="%extPoint.archivehandlers" schema="schema/archivehandlers.exsd"/>
-
-
-<!-- ================================================================= -->
-<!-- Define Mount Path Mappers extension point -->
-<!-- ================================================================= -->
- <extension-point id="mountPathMappers" name="%extPoint.mountPathMappers" schema="schema/mountPathMappers.exsd"/>
-
-<!-- ================================================================= -->
-<!-- Define Dynamic Popup Menu Extension extension point -->
-<!-- ================================================================= -->
- <extension-point id="dynamicPopupMenuExtensions" name="%extPoint.dynamicPopupMenuExtensions" schema="schema/dynamicPopupMenuExtensions.exsd"/>
-
-<!-- ================================================================= -->
-<!-- Define Keystore Provider extension point -->
-<!-- ================================================================= -->
- <extension-point id="keystoreProviders" name="%extPoint.keystoreProviders" schema="schema/keystoreProviders.exsd"/>
-
- <extension-point id="newConnectionWizardDelegates" name="RSE New Connection Wizard Delegate" schema="schema/newConnectionWizardDelegates.exsd"/>
-
-
-<!-- ================================================================= -->
-<!-- Define the Drop Actions -->
-<!-- ================================================================= -->
- <extension point="org.eclipse.ui.dropActions">
- <action
- id="org.eclipse.rse.ui.view.DropActions"
- class="org.eclipse.rse.ui.view.SystemDropActionDelegate">
- </action>
- </extension>
-
-
-<!-- ========================================================================= -->
-<!-- Themes -->
-<!-- ========================================================================= -->
- <extension
- point="org.eclipse.ui.themes">
- <themeElementCategory
- label="%RSEPresentation.label"
- id="org.eclipse.rse.ui.presentation">
- <description>%RSEPresentation.description</description>
- </themeElementCategory>
- <themeElementCategory
- label="%MessagesPresentation.label"
- parentId="org.eclipse.rse.ui.presentation"
- id="org.eclipse.rse.ui.messages.presentation">
- <description>%MessagesPresentation.description</description>
- </themeElementCategory>
- <colorDefinition
- label="%ErrorMessage.label"
- categoryId="org.eclipse.rse.ui.messages.presentation"
- value="COLOR_RED"
- id="MESSAGE_ERROR_COLOR">
- <description>
- %ErrorMessage.description
- </description>
- </colorDefinition>
- <colorDefinition
- label="%WarningMessage.label"
- categoryId="org.eclipse.rse.ui.messages.presentation"
- value="255,80,0"
- id="MESSAGE_WARNING_COLOR">
- <description>
- %WarningMessage.description
- </description>
- </colorDefinition>
- <colorDefinition
- label="%InfoMessage.label"
- categoryId="org.eclipse.rse.ui.messages.presentation"
- value="COLOR_BLUE"
- id="MESSAGE_INFORMATION_COLOR">
- <description>
- %InfoMessage.description
- </description>
- </colorDefinition>
- <themeElementCategory
- label="%RemoteCommandsViewPresentation.label"
- parentId="org.eclipse.rse.ui.presentation"
- id="org.eclipse.rse.ui.remotecommandsview.presentation">
- <description>%RemoteCommandsViewPresentation.description</description>
- </themeElementCategory>
- <fontDefinition
- label="%RemoteCommandsViewFontDefinition.label"
- defaultsTo="org.eclipse.jface.textfont"
- categoryId="org.eclipse.rse.ui.remotecommandsview.presentation"
- id="REMOTE_COMMANDS_VIEW_FONT">
- <description>
- %RemoteCommandsViewFontDefinition.description
- </description>
- </fontDefinition>
- <colorDefinition
- label="%RemoteCommandsForeground.label"
- categoryId="org.eclipse.rse.ui.remotecommandsview.presentation"
- value="COLOR_BLACK"
- id="REMOTE_COMMANDS_VIEW_FG_COLOR">
- <description>
- %RemoteCommandsForeground.description
- </description>
- </colorDefinition>
- <colorDefinition
- label="%RemoteCommandsBackground.label"
- categoryId="org.eclipse.rse.ui.remotecommandsview.presentation"
- value="COLOR_WHITE"
- id="REMOTE_COMMANDS_VIEW_BG_COLOR">
- <description>
- %RemoteCommandsBackground.description
- </description>
- </colorDefinition>
- <colorDefinition
- label="%RemoteCommandsPrompt.label"
- categoryId="org.eclipse.rse.ui.remotecommandsview.presentation"
- value="COLOR_GREEN"
- id="REMOTE_COMMANDS_VIEW_PROMPT_COLOR">
- <description>
- %RemoteCommandsPrompt.description
- </description>
- </colorDefinition>
- </extension>
-
-
-
-
- <extension point="org.eclipse.ui.decorators">
- <decorator
- id="org.eclipse.rse.subsystems.error.decorator"
- label="%SubSystemErrorDecorator.label"
- state="true"
- lightweight="true"
- icon="icons/full/ovr16/error_ovr.gif"
- location="BOTTOM_RIGHT">
- <enablement>
- <and>
- <objectClass name="org.eclipse.rse.core.subsystems.ISubSystem"/>
- <objectState name="isConnectionError" value="true"/>
- </and>
- </enablement>
- </decorator>
- </extension>
-
-
-<!-- ================================================================= -->
-<!-- RSE Creation Wizards from File -> New -->
-<!-- ================================================================= -->
- <extension point="org.eclipse.ui.newWizards">
- <category id="org.eclipse.rse.ui.newWizards.rseCategory"
- name="%Creation.category.name"/>
- <wizard
- canFinishEarly="false"
- category="org.eclipse.rse.ui.newWizards.rseCategory"
- class="org.eclipse.rse.ui.wizards.RSENewConnectionWizard"
- finalPerspective="org.eclipse.rse.ui.view.SystemPerspective"
- hasPages="true"
- icon="icons/full/etool16/newconnection_wiz.gif"
- id="org.eclipse.rse.ui.newWizards.connection"
- name="%Creation.connection.name"
- preferredPerspectives="org.eclipse.rse.ui.view.SystemPerspective">
- <description>
- %Creation.connection.description
- </description>
- </wizard>
- </extension>
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.ui/rseprofile.xsd b/rse/plugins/org.eclipse.rse.ui/rseprofile.xsd
deleted file mode 100644
index 9cdfe618b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/rseprofile.xsd
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0"?>
-<xs:schema xmlns: xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="org.eclipse.rse.core"
- xmlns="org.eclipse.rse.core"
- elementFormDefault="qualified">
-
-<!-- Common attributes -->
- <xs:attribute name="name" type="xs:string"/>
- <xs:attribute name="type" type="xs:string"/>
-
-<!-- Filter string attributes -->
- <xs:attribute name="string" type="xs:string"/>
-
-<!-- Filter attributes -->
- <xs:attribute name="supportsNestedFilters" type="xs:boolean"/>
- <xs:attribute name="relativeOrder" type="xs:integer"/>
- <xs:attribute name="default" type="xs:boolean"/>
- <xs:attribute name="stringsCaseSensitive" type="xs:boolean"/>
- <xs:attribute name="promptable" type="xs:boolean"/>
- <xs:attribute name="supportsDuplicateFilterStrings" type="xs:boolean"/>
- <xs:attribute name="nonDeletable" type="xs:boolean"/>
- <xs:attribute name="nonRenamable" type="xs:boolean"/>
- <xs:attribute name="nonChangable" type="xs:boolean"/>
- <xs:attribute name="stringsNonChangable" type="xs:boolean"/>
- <xs:attribute name="release" type="xs:integer"/>
- <xs:attribute name="singleFilterStringOnly" type="xs:boolean"/>
-
-<!-- FilterPool attributes -->
- <xs:attribute name="deletable" type="xs:boolean"/>
- <xs:attribute name="owningParentName" type="xs:string"/>
- <xs:attribute name="id" type="xs:ID"/>
-
-<!-- FilterPoolReference attributes -->
- <xs:attribute name="refID" type="xs:IDREF"/>
-
-<!-- Host attributes -->
- <xs:attribute name="offline" type="xs:boolean"/>
- <xs:attribute name="hostName" type="xs:string"/>
- <xs:attribute name="description" type="xs:string"/>
- <xs:attribute name="defaultUserId" type="xs:string"/>
-
-<!-- Profile attributes -->
- <xs:attribute name="defaultPrivate" type="xs:boolean"/>
- <xs:attribute name="isActive" type="xs:boolean"/>
-
-<!-- SubSystem attributes -->
- <xs:attribute name="hidden" type="xs:boolean"/>
-
-<!-- RemoteFileSubSystem attributes -->
- <xs:attribute name="homeFolder" type="xs:string"/>
-
-<!-- ConnectorService attributes -->
- <xs:attribute name="group" type="xs:string"/>
- <xs:attribute name="useSSL" type="xs:boolean"/>
-
-<!-- Property attributes -->
- <xs:attribute name="key" type="xs:string"/>
- <xs:attribute name="value" type="xs:string"/>
-
-
-
-<!-- Property definition -->
- <xs:complexType name="Property">
- <xs:attribute ref="key" use="required"/>
- <xs:attribute ref="value" use="required"/>
- </xs:complexType>
-
-<!-- PropertySet definition -->
- <xs:complexType name="PropertySet">
- <xs:attribute ref="name" use="required"/>
- <xs:element name="Property" type="Property" maxOccurs="unbounded" minOccurs="0"/>
- </xs:complexType>
-
-<!-- EnvironmentVariable definition -->
- <xs:complexType name="EnvironmentVariable">
- <xs:attribute ref="name" use="required"/>
- <xs:attribute ref="value" use="required"/>
- <xs:element name="PropertySet" type="PropertySet" maxOccurs="unbounded" minOccurs="1"/>
- </xs:complexType>
-
-<!-- FilterString definition -->
- <xs:complexType name="FilterString">
- <xs:attribute ref="string" use="required"/>
- <xs:attribute ref="type" use="required"/>
- <xs:attribute ref="default" use="required"/>
- <xs:element name="PropertySet" type="PropertySet" maxOccurs="unbounded" minOccurs="0"/>
- </xs:complexType>
-
-<!-- Filter definition -->
- <xs:complexType name="Filter">
- <xs:attribute ref="name" use="required"/>
- <xs:attribute ref="type" use="required"/>
- <xs:attribute ref="supportsNestedFilters" use="required"/>
- <xs:attribute ref="relativeOrder" use="required"/>
- <xs:attribute ref="default" use="required"/>
- <xs:attribute ref="stringsCaseSensitive" use="optional"/>
- <xs:attribute ref="promptable" use="required"/>
- <xs:attribute ref="supportsDuplicateFilterStrings" use="required"/>
- <xs:attribute ref="nonDeletable" use="required"/>
- <xs:attribute ref="nonRenamable" use="required"/>
- <xs:attribute ref="nonChangable" use="required"/>
- <xs:attribute ref="stringsNonChangable" use="required"/>
- <xs:attribute ref="release" use="required"/>
- <xs:attribute ref="singleFilterStringOnly" use="optional"/>
- <xs:element name="Filter" type="Filter" maxOccurs="unbounded" minOccurs="0"/>
- <xs:element name="FilterString" type="FilterString" maxOccurs="unbounded" minOccurs="0"/>
- <xs:element name="PropertySet" type="PropertySet" maxOccurs="unbounded" minOccurs="0"/>
- </xs:complexType>
-
-<!-- FilterPool definition -->
- <xs:complexType name="FilterPool">
- <xs:attribute ref="name" use="required"/>
- <xs:attribute ref="type" use="required"/>
- <xs:attribute ref="id" use="required"/>
- <xs:attribute ref="supportsNestedFilters" use="required"/>
- <xs:attribute ref="deletable" use="required"/>
- <xs:attribute ref="default" use="required"/>
- <xs:attribute ref="stringsCaseSensitive" use="optional"/>
- <xs:attribute ref="supportsDuplicateFilterStrings" use="required"/>
- <xs:attribute ref="release" use="required"/>
- <xs:attribute ref="singleFilterStringOnly" use="optional"/>
- <xs:attribute ref="owningParentName" use="required"/>
- <xs:attribute ref="nonRenamable" use="required"/>
- <xs:element name="Filter" type="Filter" maxOccurs="unbounded" minOccurs="0"/>
- <xs:element name="PropertySet" type="PropertySet" maxOccurs="unbounded" minOccurs="0"/>
- </xs:complexType>
-
-<!-- FilterPoolReference definition -->
- <xs:complexType name="FilterPoolReference">
- <xs:attribute ref="refID" use="required"/>
- </xs:complexType>
-
-<!-- ServerLauncher definition -->
- <xs:complexType name="ServerLauncher">
- <xs:element name="PropertySet" type="PropertySet" maxOccurs="unbounded" minOccurs="0"/>
- </xs:complexType>
-
-
-
-<!-- SubSystem type definition -->
- <xs:complexType name="SubSystem">
- <xs:attribute ref="hidden" use="required"/>
- <xs:attribute ref="type" use="required"/>
- <xs:element name="FilterPoolReference" type="FilterPoolReference" maxOccurs="unbounded" minOccurs="0"/>
- <xs:element name="PropertySet" type="PropertySet" maxOccurs="unbounded" minOccurs="0"/>
- </xs:complexType>
-
-
-<!-- ConnectorService definition -->
- <xs:complexType name="ConnectorService">
- <xs:attribute ref="name" use="required"/>
- <xs:attribute ref="type" use="required"/>
- <xs:attribute ref="group" use="required"/>
- <xs:attribute ref="useSSL" use="required"/>
- <xs:element name="RemoteServerLauncher" type="ServerLauncher" maxOccurs="1" minOccurs="1"/>
- <xs:element name="SubSystem" type="SubSystem" maxOccurs="unbounded" minOccurs="0"/>
- <xs:element name="PropertySet" type="PropertySet" maxOccurs="unbounded" minOccurs="0"/>
- </xs:complexType>
-
-<!-- Host definition -->
- <xs:complexType name="Host">
- <xs:attribute ref="name" use="required"/>
- <xs:attribute ref="type" use="required"/>
- <xs:attribute ref="offline" use="required"/>
- <xs:attribute ref="promptable" use="required"/>
- <xs:attribute ref="hostName" use="required"/>
- <xs:attribute ref="description" use="required"/>
- <xs:attribute ref="defaultUserId" use="required"/>
- <xs:element name="ConnectorService" type="ConnectorService" maxOccurs="unbounded" minOccurs="0"/>
- <xs:element name="PropertySet" type="PropertySet" maxOccurs="unbounded" minOccurs="0"/>
- </xs:complexType>
-
-<!-- Profile definition -->
- <xs:complexType name="Profile">
- <xs:attribute ref="name" use="required"/>
- <xs:attribute ref="defaultPrivate" use="required"/>
- <xs:attribute ref="isActive" use="required"/>
- <xs:element name="FilterPool" type="FilterPool" maxOccurs="unbounded" minOccurs="0"/>
- <xs:element name="Host" type="Host" maxOccurs="unbounded" minOccurs="0"/>
- <xs:element name="PropertySet" type="PropertySet" maxOccurs="unbounded" minOccurs="0"/>
- </xs:complexType>
-
-<!-- Define base schema -->
-<xs:element name="Profile" type="Profile" maxOccurs="1" minOccurs="1"/>
-
-</xs:schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/archivehandlers.exsd b/rse/plugins/org.eclipse.rse.ui/schema/archivehandlers.exsd
deleted file mode 100644
index cd06db115..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/archivehandlers.exsd
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.ui" id="archivehandlers" name="Archive Handlers"/>
- </appInfo>
- <documentation>
- This extension point is used to plug in additional Archive Handlers. These are used to provide seamless integration between Archive Handling and the RSE.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="archivehandler" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="archivehandler">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique name that will be used to identify the Archive Handler.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name that will be used to identify this Archive Handler in the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified name of the Java class that implements the &lt;samp&gt;org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler&lt;/samp&gt; interface.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="fileNameExtension" type="string" use="required">
- <annotation>
- <documentation>
- The filename extension to associate this Archive Handler with. For example, one would associate a Zip Handler with extension &quot;zip&quot;.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of this extension point&apos;s usage:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.rse.ui.archivehandlers&quot;&gt;
- &lt;archivehandler
- id=&quot;org.eclipse.rse.services.clientserver.archiveutils.systemziphandler&quot;
- name=&quot;Zip File Handler&quot;
- class=&quot;org.eclipse.rse.services.clientserver.archiveutils.SystemZipHandler&quot;&gt;
- &lt;/archivehandler&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Plug-ins that want to extend this extension point must implement &lt;samp&gt;org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler&lt;/samp&gt; interface.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The Remote System Explorer in org.eclipse.rse.files.ui provides three default implementations of this extension point, for ZIP, JAR, and TAR Archives.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/dynamicPopupMenuExtensions.exsd b/rse/plugins/org.eclipse.rse.ui/schema/dynamicPopupMenuExtensions.exsd
deleted file mode 100644
index 54a155476..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/dynamicPopupMenuExtensions.exsd
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.ui" id="dynamicPopupMenuExtensions" name="View Menu Extensions"/>
- </appInfo>
- <documentation>
- This extension point is used to allow programmatic menu contributions via view adapters that allow for extension.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="dynamicPopupMenuExtension" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="dynamicPopupMenuExtension">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique name that will be used to identify this extension.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name that will be used to identify this Popup Menu Extension in the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified name of the Java class that implements the &lt;samp&gt;org.eclipse.rse.ui.actions.ISystemDynamicPopupMenuExtension&lt;/samp&gt; interface.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.ui.actions.ISystemDynamicPopupMenuExtension"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of this extension point&apos;s usage:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.rse.ui.dynamicPopupMenuExtensions&quot;&gt;
- &lt;dynamicPopupMenuExtension
- id=&quot;com.abc.ui.MyPopupMenuExtension&quot;
- name=&quot;My Popup Menu Extension&quot;
- class=&quot;com.abc.MyPopupMenuExtension&quot;&gt;
- &lt;/dynamicPopupMenuExtension&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Plug-ins that want to extend this extension point must implement &lt;samp&gt;org.eclipse.rse.ui.actions.ISystemDynamicPopupMenuExtension&lt;/samp&gt; interface.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- By default there are not contributions to this.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/keystoreProviders.exsd b/rse/plugins/org.eclipse.rse.ui/schema/keystoreProviders.exsd
deleted file mode 100644
index 267a2ca80..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/keystoreProviders.exsd
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.ui" id="keystoreProviders" name="Keystore Providers"/>
- </appInfo>
- <documentation>
- This extension point is used to allow the delegation of client keystores to vendors where needed.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="keystoreProvider" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="keystoreProvider">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique name that will be used to identify the Keystore Provider.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name that will be used to identify this Keystore Provider in the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified name of the Java class that implements the &lt;samp&gt;org.eclipse.rse.core.comm.ISystemKeystoreProvider&lt;/samp&gt; interface.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.core.comm.ISystemKeystoreProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of this extension point&apos;s usage:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.rse.ui.keystoreProviders&quot;&gt;
- &lt;keystoreProvider
- id=&quot;com.xyz.universal.security.UniversalKeystoreProvider&quot;
- name=&quot;Universal Keystore Provider&quot;
- class=&quot;com.xyz.universal.security.UniversalKeystoreProvider&quot;&gt;
- &lt;/keystoreProvider&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Plug-ins that want to extend this extension point must implement &lt;samp&gt;org.eclipse.rse.core.comm.ISystemKeystoreProvider&lt;/samp&gt; interface.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The Remote System Explorer provides a default implementation of this extension point
-in &lt;samp&gt;org.eclipse.rse.dstore.security.UniversalKeystoreProvider&lt;/samp&gt;.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/mountPathMappers.exsd b/rse/plugins/org.eclipse.rse.ui/schema/mountPathMappers.exsd
deleted file mode 100644
index 8363ac9bb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/mountPathMappers.exsd
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.ui" id="mountPathMappers" name="Mount Path Mappers"/>
- </appInfo>
- <documentation>
- This extension point is used to allow the delegation of temp file mappings to vendors where needed.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="mountPathMapper" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="mountPathMapper">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique name that will be used to identify the Mount Path Mapper.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name that will be used to identify this Mount Path Mapper in the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified name of the Java class that implements the &lt;samp&gt;org.eclipse.rse.files.ui.resources.ISystemMountPathMapper&lt;/samp&gt; interface.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.files.ui.resources.ISystemMountPathMapper"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of this extension point&apos;s usage:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.rse.ui.mountPathMappers&quot;&gt;
- &lt;mountPathMapper
- id=&quot;org.eclipse.rse.files.ui.resources.defaultMountPathMapper&quot;
- name=&quot;Default Mount Path Mapper&quot;
- class=&quot;org.eclipse.rse.files.ui.resources.DefaultMountPathMapper&quot;&gt;
- &lt;/mountPathMapper&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Plug-ins that want to extend this extension point must implement &lt;samp&gt;org.eclipse.rse.files.ui.resources.ISystemMountPathMapper&lt;/samp&gt; interface.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The Remote System Explorer in org.eclipse.rse.files.ui provides a default implementation of this extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/newConnectionWizardDelegates.exsd b/rse/plugins/org.eclipse.rse.ui/schema/newConnectionWizardDelegates.exsd
deleted file mode 100644
index ae33b397c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/newConnectionWizardDelegates.exsd
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.ui" id="newConnectionWizardDelegates" name="RSE New Connection Wizard Delegate"/>
- </appInfo>
- <documentation>
- This extension point allows a New Connection wizard delegate to be provided for a certain system type. This is useful for those system types that need New Connection wizard pages which are different from the default pages supplied by RSE.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="newConnectionWizardDelegate"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="newConnectionWizardDelegate">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="systemType" type="string" use="required">
- <annotation>
- <documentation>
- The system type ID.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A class that implements &lt;samp&gt;org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate&lt;/samp&gt;
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate:org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of this extension point&apos;s usage:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.rse.ui.newConnectionWizardDelegates&quot;&gt;
- &lt;newConnectionWizardDelegate
- class=&quot;com.abc.SerialConnectionWizardDelegate&quot;
- systemType=&quot;Embedded-Linux-Serial&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The provider of a new connection delegate for a certain system type must implement &lt;samp&gt;org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate&lt;/samp&gt;. Instead of extending the interface, it is recommended that the abstract class &lt;samp&gt;org.eclipse.rse.ui.wizards.RSENewConnectionWizardDelegate&lt;/samp&gt; be extended.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- By default there are not contributions to this.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2006 IBM Corporation. All Rights Reserved.
-This program and the accompanying materials are made available under the terms
-of the Eclipse Public License v1.0 which accompanies this distribution, and is
-available at http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/popupMenus.exsd b/rse/plugins/org.eclipse.rse.ui/schema/popupMenus.exsd
deleted file mode 100644
index d3480ceac..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/popupMenus.exsd
+++ /dev/null
@@ -1,753 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.ui" id="popupMenus" name="Popup Menus"/>
- </appInfo>
- <documentation>
- This extension point is for defining actions that appear in the
-popup menu of remote resources of the
-Remote Systems view, in the Remote System Explorer perspective.
-
-&lt;p&gt;
-It is modelled after the Eclipse workbench extension point &lt;samp&gt;org.eclipse.ui.popupMenus&lt;/samp&gt;.
-However, because we know we are targeting remote resources, it
-is simplified a bit. Specifically, there is no need to specify
-the object class, as we assume these
-actions apply to remote resources, which often share a common
-object class. On the other hand, we
-need additional filtering capabilities to scope which remote
-resources these actions are to apply to.
-&lt;/p&gt;
-
-&lt;p&gt;
-To this end, there is a rich set of
-filtering attributes to enable fine-grained scoping by a number
-of criteria. These scoping attributes
-are the same as those for our &lt;samp&gt;org.eclipse.rse.ui.propertyPages&lt;/samp&gt;
-extension point.
-&lt;/p&gt;
-
-&lt;p&gt;
-Like the workbench extension point, unless you specify otherwise
-, the action will show
-up in the main popup menu in the &quot;additions&quot; group. To create
-cascading sub-menus, first
-define a submenu and named separator group within it, using the
-&lt;samp&gt;menu&lt;/samp&gt; element and its &lt;samp&gt;separator &lt;/samp&gt;
-sub-element. Then refer to that menu&apos;s &lt;samp&gt;id&lt;/samp&gt; in your
-action element&apos;s &lt;samp&gt;menubarPath&lt;/samp&gt;
-attribute:
-&lt;samp&gt;menuid/separator-group-name&lt;/samp&gt;.
-&lt;/p&gt;
-
-&lt;p&gt;
-While not fully documented here, this extension point supports the
-&lt;samp&gt;&amp;lt;filter&amp;gt;&lt;/samp&gt;
-&lt;samp&gt;&amp;lt;visibility&amp;gt;&lt;/samp&gt; and
-&lt;samp&gt;&amp;lt;enablement&amp;gt;&lt;/samp&gt; elements from the &lt;samp&gt;org.eclipse.ui.popupMenus&lt;/samp&gt;
-extension point. See its
-documentation in the help for information on these elements.
-For example:
-&lt;samp&gt;&lt;pre&gt;
- &lt;filter name=&quot;subsystemConfigurationCategory&quot; value=&quot;files&quot;/&gt;
-
- &lt;enablement&gt;
- &lt;objectState name=&quot;hasChildren&quot; value=&quot;true&quot;/&gt;
- &lt;/enablement&gt;
-&lt;/pre&gt;&lt;/samp&gt;
-These elements are for conditionally deciding whether to show,
-or enable,
-the action(s). The &lt;samp&gt;name&lt;/samp&gt;s supported for the &lt;samp&gt;&amp;lt;filter&amp;gt;&lt;/samp&gt;
-element,
-and the &lt;samp&gt;objectState&lt;/samp&gt;s supported for the &lt;samp&gt;&amp;lt;visibility&amp;gt;&lt;/samp&gt;
-and
-&lt;samp&gt;&amp;lt;enablement&amp;gt;&lt;/samp&gt; elements are:&lt;/p&gt;
-&lt;ul&gt;
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;name&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt; for
-an exact match on an object&apos;s name,
-or beginning-of-name match if ends with an asterisk.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;type&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt; for
-an exact match on an object&apos;s type.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;offline&quot;&lt;/samp&gt;&lt;/b&gt;.Will test the &lt;i&gt;value&lt;/i&gt;
-against &quot;true&quot; if the user is working
-in &quot;offline&quot; mode or &quot;false&quot; if not. Currently only supported
-for iSeries connections.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;connected&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt;
-against &quot;true&quot; if the connection
-containing the selected object is active or &quot;false&quot; if not.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;hasChildren&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt;
-against &quot;true&quot; if this object&apos;s
-adapter reports that it has children or &quot;false&quot; if it doesn&apos;t
-have children.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;systemType&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt;
-for an exact match on the system type of
-this object&apos;s parent SystemConnection object.
-You can specify multiple values if you comma-separate them.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;subsystemConfigurationId&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt;
-for an exact match on the
-&lt;samp&gt;ID&lt;/samp&gt; of the subsystem configuration that created this object&apos;s
-subsystem. Returns false for SystemConnection objects.
-You can specify multiple values if you comma-separate them.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;subsystemConfigurationCategory&quot;&lt;/samp&gt;&lt;/b&gt;. Will test
-the &lt;i&gt;value&lt;/i&gt; for an exact match
-on the &lt;samp&gt;category&lt;/samp&gt; of the subsystem configuration that created
-this object&apos;s subsystem.
-You can specify multiple values if you comma-separate them.
-&lt;/ul&gt;
-
-&lt;p&gt;
-These &lt;samp&gt;objectstate&lt;/samp&gt;s are also supported via the
-Eclipse &lt;samp&gt;org.eclipse.ui.popupMenus&lt;/samp&gt; extension point,
-for the
-non-remote objects in the RSE: connections, subsystems, filter
-pools
-and filters.
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <include schemaLocation="schema://org.eclipse.ui/schema/commonAction.exsd"/>
-
- <include schemaLocation="schema://org.eclipse.ui/schema/commonExpression.exsd"/>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="objectContribution" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="objectContribution">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="visibility" minOccurs="0" maxOccurs="1"/>
- <element ref="menu" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="action" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The id for this set of remote resource popup menu contributions. Must
-be unique over all plug-ins.
-It is suggested that the user qualify this with the plug-in id.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="subsystemconfigurationid" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the popup menu actions are to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-all the actions defined in this objectContribution element.
-&lt;p&gt;
-This filter specifies a subsystem configuration id, such that these
-actions will only appear for remote resources returned from subsystems of the given subsystem configuration.
-This ID can be scalar, or it can be generic to match on multiple subsystem configuration IDs.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="subsystemconfigurationCategory" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the popup menu actions are to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-all the actions defined in this &lt;samp&gt;objectContribution&lt;/samp&gt; element.
-
-&lt;p&gt;
-This filter specifies a subsystem configuration category, such that
-these
-actions will only appear for remote resources returned from subsystems
-owned by factories
-declared defined with the specified category.
-
-&lt;p&gt;
-This category can be scalar, or it can be generic to match on
-multiple subsystem configuration categories.
-&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="systemTypes" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the popup menu actions are to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-all the actions defined in this objectContribution element.
-&lt;br&gt;
-This filter specifies a single system type, or semicolon-separated list of system types,
-or asterisk for all system types (the default).
-Will scope these actions to only remote objects from systems of this type or types.
-&lt;br&gt;&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="namefilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the popup menu actions are to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-all the actions defined in this objectContribution element.
-&lt;p&gt;
-This filter specifies a simple or generic resource name.
-Only resources whose name matches this filter will show the actions
-defined within this object contribution element.
-&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="typecategoryfilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the property page is to appear.
-Specify as many of these optional filters like this as needed to explicitly scope this property page element.
-&lt;p&gt;
-This filter specifies a type category. Normally the subsystemconfigurationid
-is sufficient, but some subsystems display multiple types of
-resources, and these are categorized by a type name that can
-be used to scope property pages.
-&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="typefilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the popup menu actions are to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-all the actions defined in this objectContribution element.
-
-&lt;p&gt;
-This filter specifies a resource type, either simple or generic.
-The resource types depends on the subsystem.
-&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="subtypefilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the popup menu actions are to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-all the actions defined in this objectContribution element.
-
-&lt;p&gt;
-This filter specifies a simple or generic resource subtype to
-match. Not all subsystems support subtypes for their resources.
-&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="subsubtypefilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the popup menu actions are to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-all the actions defined in this objectContribution element.
-&lt;p&gt;
-This filter specifies a simple or generic resource sub-subtype
-to match.
-&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="adaptable" type="boolean">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="menu">
- <annotation>
- <documentation>
- Use this element when you wish to have your action appear in
-your own cascading menu, versus in the primary popup menu.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="separator" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- unique ID for this submenu, used later in the first part of the menubarPath attribute of
-the action element or path attribute of a nested menu element. This is used to identify
-the target sub-menu of the action or sub-submenu.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- readable text to show up in the popup menu, for this cascading menu. Do NOT specify ampersand
-for mnemonics, as these are assigned for you. However, accelerator information is valid as defined
-by the Eclipse rules.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="path" type="string">
- <annotation>
- <documentation>
- For multi-cascading menus, use this attribute to identify a previously
-specified menu that
-this menu is to be nested within. The syntax is a bit tricky.
-It is &quot;id/group&quot;, where
-&lt;samp&gt;id&lt;/samp&gt; matches the &lt;samp&gt;id&lt;/samp&gt; attribute from a
-previous &lt;samp&gt;menu&lt;/samp&gt; element,
-and &lt;samp&gt;group&lt;/samp&gt; matches the &lt;samp&gt;name&lt;/samp&gt; attribute
-of a &lt;samp&gt;separator&lt;/samp&gt;
-sub-element within that previous &lt;samp&gt;menu&lt;/samp&gt; element.
-
-&lt;p&gt;
-For the root cascading menu, you can also use this to specify
-a group within the remote resource&apos;s
-popup menu, where to place this cascading menu. In this case,
-you would not specify an id. The default group is the &lt;samp&gt;additions&lt;/samp&gt; group,
-which is near the bottom of the popup menu.
-&lt;/p&gt;
-The IBM pre-defined groups are:
-&lt;ul&gt;
-&lt;li&gt;&lt;b&gt;&quot;group.new&quot;&lt;/b&gt;. This is where the cascading &quot;New-&gt;&quot; menu
-is.
-&lt;li&gt;&lt;b&gt;&quot;group.goto&quot;&lt;/b&gt;. This is where the cascading &quot;Goto-&gt;&quot;
-menu is.
-&lt;li&gt;&lt;b&gt;&quot;group.expandto&quot;&lt;/b&gt;. This is where the cascading &quot;Expand
-To-&gt;&quot; menu is.
-&lt;li&gt;&lt;b&gt;&quot;group.openwith&quot;&lt;/b&gt;. This is where the cascading &quot;Open
-With-&gt;&quot; menu is.
-&lt;li&gt;&lt;b&gt;&quot;group.browsewith&quot;&lt;/b&gt;. This is where the cascading &quot;Browse
-With-&gt;&quot; menu is.
-&lt;li&gt;&lt;b&gt;&quot;group.workwith&quot;&lt;/b&gt;. This is where the cascading &quot;Work
-With-&gt;&quot; menu is.
-&lt;li&gt;&lt;b&gt;&quot;group.build&quot;&lt;/b&gt;. Area of the menu reserved for build or refresh
-related actions.
-&lt;li&gt;&lt;b&gt;&quot;group.change&quot;&lt;/b&gt;. Area of the menu reserved for change-related actions.
-&lt;li&gt;&lt;b&gt;&quot;group.reorganize&quot;&lt;/b&gt;. Area of the menu reserved for reorganize-related actions,
-such as rename, move, copy, delete.
-&lt;li&gt;&lt;b&gt;&quot;group.reorder&quot;&lt;/b&gt;. Area of the menu reserved for reorder-related actions,
-such as move up or move down.
-&lt;li&gt;&lt;b&gt;&quot;group.generate&quot;&lt;/b&gt;. Area of the menu reserved for code generation-related actions.
-&lt;li&gt;&lt;b&gt;&quot;group.search&quot;&lt;/b&gt;. Area of the menu reserved for search-related actions.
-&lt;li&gt;&lt;b&gt;&quot;group.connection&quot;&lt;/b&gt;. Area of the menu reserved for connection-related actions.
-&lt;li&gt;&lt;b&gt;&quot;group.remoteservers&quot;&lt;/b&gt;. Area of the menu reserved for the &quot;Remote Servers-&gt;&quot; action.
-&lt;li&gt;&lt;b&gt;&quot;group.importexport&quot;&lt;/b&gt;. Area of the menu reserved for import or export-related actions.
-&lt;li&gt;&lt;b&gt;&quot;group.adapter&quot;&lt;/b&gt;. Area of the menu reserved for actions queried from the remote resource adapters.
-&lt;li&gt;&lt;b&gt;&quot;additions&quot;&lt;/b&gt;. Area of the menu reserved for actions that don&apos;t specify a group.
-&lt;li&gt;&lt;b&gt;&quot;group.team&quot;&lt;/b&gt;. Area of the menu reserved for team-related actions.
-&lt;li&gt;&lt;b&gt;&quot;group.properties&quot;&lt;/b&gt;. Area of the menu reserved for properties-related actions.
-&lt;/ul&gt;
-
-&lt;p&gt;
-You may also desire to place your action in an supplied cascading menu.
-To do this, for the ID-part, specify one of the following supplied menu IDs:
-&lt;ul&gt;
-&lt;li&gt;&lt;b&gt;&quot;menu.new&quot;&lt;/b&gt;. This is the cascading &quot;New-&gt;&quot; menu.
-&lt;li&gt;&lt;b&gt;&quot;menu.goto&quot;&lt;/b&gt;. This is the cascading &quot;Goto-&gt;&quot; menu.
-&lt;li&gt;&lt;b&gt;&quot;menu.expandto&quot;&lt;/b&gt;. This is the cascading &quot;Expand To-&gt;&quot; menu.
-&lt;li&gt;&lt;b&gt;&quot;menu.openwith&quot;&lt;/b&gt;. This is the cascading &quot;Open With-&gt;&quot; menu.
-&lt;li&gt;&lt;b&gt;&quot;menu.browsewith&quot;&lt;/b&gt;. This is the cascading &quot;Browse With-&gt;&quot; menu.
-&lt;li&gt;&lt;b&gt;&quot;menu.workwith&quot;&lt;/b&gt;. This is the cascading &quot;Work With-&gt;&quot; menu.
-&lt;li&gt;&lt;b&gt;&quot;menu.remoteservers&quot;&lt;/b&gt;. This is the cascading &quot;Remote Servers-&gt;&quot; menu.
-&lt;/ul&gt;
-&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="action">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="label" icon="icon"/>
- </appInfo>
- <documentation>
- Use this element to define an action, and where it will appear in the popup menu. The action
-defined here will only appear in a remote resource popup menu if the resource matches all the
-given filtering criteria in the parent objectContribution element.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique ID for this action.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- Readable text to display in the popup menu for this action. Do NOT specify ampersand for mnemonics,
-as these are assigned for you. However, accelerator information is valid, as defined by the Eclipse rules.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- An optional image icon for the popup menu. This is a .gif file, given with a path relative to your plugin
-directory.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="tooltip" type="string">
- <annotation>
- <documentation>
- Optional tooltip text for this action. This appears in the status bar when the action is selected.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="menubarPath" type="string">
- <annotation>
- <documentation>
- A slash-delimited path that is used to specify the location of the the action in the popup menu. Each token
-in the path, except the last one, represents an existing submenu in the hierarchy, as defined via the &lt;samp&gt;id&lt;/samp&gt;
-attribute of a &lt;samp&gt;menu&lt;/samp&gt; element previously defined. Alternatively, the ID of a supplied cascading
-menu can be specified. The last token represents the named separator group into which the action will be added.
-If no path is given, this must be a supplied group.
-&lt;p&gt;
-See the comments for the path attribute of the menu element for a list of the supplied cascading menus,
-and supplied separator groups.
-&lt;/p&gt;
-&lt;p&gt;
-If a path is given, then this must match the name attribute of a &lt;samp&gt;separator&lt;/samp&gt; sub-element
-within one of your &lt;samp&gt;menu&lt;/samp&gt; elements.
-&lt;/p&gt;
-&lt;p&gt;
-If the path is omitted, or this menubarPath attribute, the action will be added to the standard &quot;additions&quot; group.
-&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="enablesFor" type="string">
- <annotation>
- <documentation>
- A value indicating the selection count which must be met to enable the action. If this attribute is specified and
-the condition is met, the action is enabled. If the condition is not met, the action is disabled. If no attribute
-is specified, the action is enabled for any number of resources selected. The following formats are supported:
-&lt;ul&gt;
-&lt;li&gt;&lt;b&gt;!&lt;/b&gt;. 0 items selected.
-&lt;li&gt;&lt;b&gt;?&lt;/b&gt;. 0 or 1 items selected.
-&lt;li&gt;&lt;b&gt;+&lt;/b&gt;. 1 or more items selected.
-&lt;li&gt;&lt;b&gt;n+&lt;/b&gt;. n or more items selected. Example: 2+.
-&lt;li&gt;&lt;b&gt;n&lt;/b&gt;. A precise number of items selected. Example: 4
-&lt;li&gt;&lt;b&gt;*&lt;/b&gt;. Any number of items selected.
-&lt;/ul&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="state" type="boolean">
- <annotation>
- <documentation>
- Optional attribute indicating the action is a toggle type. That
-is, is shown as a check box menu item. The attribute value will
-be used as the initial state.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="helpContextId" type="string">
- <annotation>
- <documentation>
- Optional unique identifier indicating the help context ID for this action. When the action appears as a menu item, pressing
-F1 while the menu item is highlighted will display help for the given context ID.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- Your action class that implements &lt;samp&gt;org.eclipse.ui.IObjectActionDelegate&lt;/samp&gt;.
-Typically you will extend one of the supplied classes, described in the API Information section.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.ui.IObjectActionDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="separator">
- <annotation>
- <documentation>
- Use this element to partition your cascading menu into areas, or groups. This groups are defined in the
-order in which the separator elements appear. The name attribute identifies the group such that it can
-be used as the target of an action or sub-menu.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The arbitrary, but unique with this menu, name to assign this group. You can specify this name
-later in the menubarPath attribute of an action, or the group part of the path attribute of a
-menu.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a defining a simple popup menu
-action for any files and folders in any system type, which only
-shows when a single file or folder is selected:
-&lt;h3&gt;Example One&lt;/h3&gt;
-
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.rse.ui.popupMenus&quot;&gt;
- &lt;objectContribution
- id=&quot;com.acme.actions.action1&quot;
- typecategoryfilter=&quot;files&quot;&gt;
- &lt;action id=&quot;com.acme.action1&quot;
- label=&quot;Test Action for Files and Folders&quot;
- class=&quot;com.acme.actions.Action1&quot;
- enablesFor=&quot;1&quot;&gt;
- &lt;/action&gt;
- &lt;/objectContribution&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-The following example refines the first example so the action
-only appears
-for Java source files, not folders, and only for files in a local
-connection.
-Further, we show how to define multiple actions within one objectContribution:
-&lt;h3&gt;Example Two&lt;/h3&gt;
-
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.rse.ui.popupMenus&quot;&gt;
- &lt;objectContribution
- id=&quot;com.acme.actions.action2&quot;
- typecategoryfilter=&quot;files&quot;
- typefilter=&quot;file&quot;
- namefilter=&quot;*.java&quot;
- subsystemconfigurationid=&quot;local.files&quot;&gt;
- &lt;action id=&quot;com.acme.action2a&quot;
- label=&quot;Test Action One for Local Java Files&quot;
- class=&quot;com.acme.actions.Action2a&quot;
- enablesFor=&quot;1&quot;&gt;
- &lt;/action&gt;
- &lt;action id=&quot;com.acme.action2b&quot;
- label=&quot;Test Action Two for Local Java Files&quot;
- class=&quot;com.acme.actions.Action2b&quot;
- enablesFor=&quot;1&quot;&gt;
- &lt;/action&gt;
- &lt;/objectContribution&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-The following example refines the second example, by moving the
-actions to our own single-cascading menu:
-&lt;h3&gt;Example Three&lt;/h3&gt;
-
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.rse.ui.popupMenus&quot;&gt;
- &lt;objectContribution
- id=&quot;com.acme.actions.action3&quot;
- typecategoryfilter=&quot;files&quot;
- typefilter=&quot;file&quot;
- namefilter=&quot;*.java&quot;
- subsystemconfigurationid=&quot;local.files&quot;&gt;
- &lt;menu id=&quot;com.acme.menu&quot;
- label=&quot;Test Actions&quot;&gt;
- &lt;separator name=&quot;taGroup&quot;/&gt;
- &lt;/menu&gt;
- &lt;action id=&quot;com.acme.action3a&quot;
- label=&quot;Test Action One for Local Java Files&quot;
- class=&quot;com.acme.actions.Action3a&quot;
- enablesFor=&quot;1&quot;
- menubarPath=&quot;com.acme.menu/taGroup&quot;&gt;
- &lt;/action&gt;
- &lt;action id=&quot;com.acme.action3b&quot;
- label=&quot;Test Action Two for Local Java Files&quot;
- class=&quot;com.acme.actions.Action3b&quot;
- enablesFor=&quot;1&quot;
- menubarPath=&quot;com.acme.menu/taGroup&quot;&gt;
- &lt;/action&gt;
- &lt;/objectContribution&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-The following example refines the third example, by moving the
-actions to our own &lt;i&gt;multiple&lt;/i&gt;-cascading menu. Notice how
-we
-can define the same separator group in different menus since
-they
-are unrelated to each other:
-&lt;h3&gt;Example Four&lt;/h3&gt;
-
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.rse.ui.popupMenus&quot;&gt;
- &lt;objectContribution
- id=&quot;com.acme.actions.action4&quot;
- typecategoryfilter=&quot;files&quot;
- typefilter=&quot;file&quot;
- namefilter=&quot;*.java&quot;
- subsystemconfigurationid=&quot;local.files&quot;&gt;
- &lt;menu id=&quot;com.acme.menu&quot;
- label=&quot;Test Actions&quot;&gt;
- &lt;separator name=&quot;taGroup&quot;/&gt;
- &lt;/menu&gt;
- &lt;menu id=&quot;com.acme.menu2&quot;
- label=&quot;A Sub Menu&quot;
- path=&quot;com.acme.menu/taGroup&quot;&gt;
- &lt;separator name=&quot;taGroup&quot;/&gt;
- &lt;/menu&gt;
-
- &lt;action id=&quot;com.acme.action4a&quot;
- label=&quot;Test Action One for Local Java Files&quot;
- class=&quot;com.acme.actions.Action4a&quot;
- enablesFor=&quot;1&quot;
- menubarPath=&quot;com.acme.menu/com.acme.menu2/taGroup&quot;&gt;
- &lt;/action&gt;
- &lt;action id=&quot;com.acme.action4a&quot;
- label=&quot;Test Action Two for Local Java Files&quot;
- class=&quot;com.acme.actions.Action4b&quot;
- enablesFor=&quot;1&quot;
- menubarPath=&quot;com.acme.menu/com.acme.menu2/taGroup&quot;&gt;
- &lt;/action&gt;
- &lt;/objectContribution&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-The following example shows how to place actions within a supplied cascading menu:
-&lt;h3&gt;Example Five&lt;/h3&gt;
-
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.rse.ui.popupMenus&quot;&gt;
- &lt;objectContribution
- id=&quot;com.acme.actions.action5&quot;
- typecategoryfilter=&quot;files&quot;
- typefilter=&quot;file&quot;
- namefilter=&quot;*.java&quot;
- subsystemconfigurationid=&quot;local.files&quot;&gt;
- &lt;action id=&quot;com.acme.action5a&quot;
- label=&quot;Test Action One for Local Java Files&quot;
- class=&quot;com.acme.actions.Action5a&quot;
- enablesFor=&quot;1&quot;
- menubarPath=&quot;menu.openwith/additions&quot;&gt;
- &lt;/action&gt;
- &lt;action id=&quot;com.acme.action5b&quot;
- label=&quot;Test Action Two for Local Java Files&quot;
- class=&quot;com.acme.actions.Action5b&quot;
- enablesFor=&quot;1&quot;
- menubarPath=&quot;menu.browsewith/additions&quot;&gt;
- &lt;/action&gt;
- &lt;/objectContribution&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-
-&lt;p&gt;
-Remember, you can repeat the &lt;samp&gt;objectContribution&lt;/samp&gt; elements as
-needed, as well as the &lt;samp&gt;menu&lt;/samp&gt; and &lt;samp&gt;action&lt;/samp&gt; elements within them.
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Your actions must all implement the interface &lt;samp&gt;org.eclipse.ui.IObjectActionDelegate&lt;/samp&gt;.
-Typically, you will subclass one of the supplied base classes
-for this extension point:
-&lt;ul&gt;
-&lt;li&gt;&lt;b&gt;org.eclipse.rse.ui.actions.SystemAbstractPopupMenuExtensionAction&lt;/b&gt;,
-in plugin org.eclipse.rse.ui.
-Base class offering generic support for any remote resource popup
-menu action, for any system type.
-&lt;li&gt;&lt;b&gt;org.eclipse.rse.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction&lt;/b&gt;,
-in plugin org.eclipse.rse.ui.
-Specialized base class offering specific support for any remote
-file or folder popup menu action, for any system type.
-&lt;/ul&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- There is no supplied implementation for this extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/propertyPages.exsd b/rse/plugins/org.eclipse.rse.ui/schema/propertyPages.exsd
deleted file mode 100644
index 89ecb3fb4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/propertyPages.exsd
+++ /dev/null
@@ -1,408 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.ui" id="propertyPages" name="Property Pages"/>
- </appInfo>
- <documentation>
- &lt;p&gt;
-This extension point is modelled after the eclipse workbench
-extension point &lt;samp&gt;org.eclipse.ui.propertyPages&lt;/samp&gt;.
-However, because we know we are targeting remote resources, it
-is simplified a bit. Specifically,
-there is no need to specify the object class, as we assume these
-actions apply to remote resources, which often share a common
-object class.
-On the other hand, we need additional filtering capabilities
-to scope which remote resources these pages are to apply to.
-&lt;/p&gt;
-
-&lt;p&gt;
-To this end, there is a rich set of filtering attributes to enable
-fine-grained scoping by a number
-of criteria. These scoping attributes are the same as those for
-our &lt;samp&gt;org.eclipse.rse.ui.popupMenus&lt;/samp&gt;
-extension point.
-
-&lt;p&gt;
-While not fully documented here, this extension point supports
-the
-&lt;samp&gt;&amp;lt;filter&amp;gt;&lt;/samp&gt;
-element from the &lt;samp&gt;org.eclipse.ui.popupMenus&lt;/samp&gt;
-extension point. See its
-documentation in the help for information on this element.
-For example:
-&lt;samp&gt;&lt;pre&gt;
- &lt;filter name=&quot;subsystemFactoryCategory&quot; value=&quot;files&quot;/&gt;
-&lt;/pre&gt;&lt;/samp&gt;
-This element is for conditionally deciding whether to show
-the property page, very much like the attributes of the &amp;lt;page&amp;gt; element
-do; in fact there is some overlap. &lt;br&gt;
-The &lt;samp&gt;name&lt;/samp&gt;s
-supported for the &lt;samp&gt;&amp;lt;filter&amp;gt;&lt;/samp&gt;
-element are:&lt;/p&gt;
-&lt;ul&gt;
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;name&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt; for
-an exact match on an object&apos;s name,
-or beginning-of-name match if ends with an asterisk.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;type&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt; for
-an exact match on an object&apos;s type.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;offline&quot;&lt;/samp&gt;&lt;/b&gt;.Will test the &lt;i&gt;value&lt;/i&gt;
-against &quot;true&quot; if the user is working
-in &quot;offline&quot; mode or &quot;false&quot; if not. Currently only supported
-for iSeries connections.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;connected&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt;
-against &quot;true&quot; if the connection
-containing the selected object is active or &quot;false&quot; if not.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;hasChildren&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt;
-against &quot;true&quot; if this object&apos;s
-adapter reports that it has children or &quot;false&quot; if it doesn&apos;t
-have children.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;systemType&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt;
-for an exact match on the system type of
-this object&apos;s parent SystemConnection object.
-You can specify multiple values if you comma-separate them.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;subsystemFactoryId&quot;&lt;/samp&gt;&lt;/b&gt;. Will test the &lt;i&gt;value&lt;/i&gt;
-for an exact match on the
-&lt;samp&gt;ID&lt;/samp&gt; of the subsystem factory that created this object&apos;s
-subsystem. Returns false for SystemConnection objects.
-You can specify multiple values if you comma-separate them.
-&lt;li&gt;&lt;b&gt;&lt;samp&gt;&quot;subsystemFactoryCategory&quot;&lt;/samp&gt;&lt;/b&gt;. Will test
-the &lt;i&gt;value&lt;/i&gt; for an exact match
-on the &lt;samp&gt;category&lt;/samp&gt; of the subsystem factory that created
-this object&apos;s subsystem.
-You can specify multiple values if you comma-separate them.
-&lt;/ul&gt;
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="page" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="page">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name" icon="icon"/>
- </appInfo>
- <documentation>
- Identifies an individual property page contribution.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique ID that will be used to identify this page.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name that will be used in the UI for this page.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified name of the class that implements &lt;code&gt;org.eclipse.ui.IWorkbenchPropertyPage&lt;/code&gt;.
-Or better yet, extends one of the supplied base classes, described in the API Information section.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.ui.IWorkbenchPropertyPage"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- A relative path to an icon that will be used in the UI in addition to the page name. Optional.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="subsystemconfigurationid" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the property page is to appear.
-Specify as many of these optional filters like this as needed to explicitly scope this property page element.
-&lt;p&gt;
-This filter specifies a subsystem configuration id, such that this
-property page will only appear for remote resources returned from subsystems of the given subsystem configuration.
-This ID can be scalar, or it can be generic to match on multiple subsystem configuration IDs.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="subsystemconfigurationCategory" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the property page is to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-this property page element.
-
-&lt;p&gt;
-This filter specifies a subsystem configuration category, such that
-this
-property page will only appear for remote resources returned from subsystems
-owned by subsystem configurations
-declared defined with the specified category.
-
-&lt;p&gt;
-This category can be scalar, or it can be generic to match on
-multiple subsystem configuration categories. The
-categories of the Predefined subsystem configurations that display
-remote resources in the Remote
-Systems view are:
-&lt;/p&gt;
-&lt;ul&gt;
-&lt;li&gt;&lt;b&gt;files&lt;/b&gt;. For subsystems that list hierarchical file
-system resources, such as folders and files.
-&lt;li&gt;&lt;b&gt;nativefiles&lt;/b&gt;. For subsystems that list non-hierarchical file
-system resources, such as in the iSeries QSYS file system.
-&lt;li&gt;&lt;b&gt;commands&lt;/b&gt;. For subsystems that list remote commands.
-&lt;li&gt;&lt;b&gt;jobs&lt;/b&gt;. For subsystems that list remote jobs.
-&lt;/ul&gt;
-&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="systemTypes" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the popup menu actions are to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-all the actions defined in this objectContribution element.
-&lt;br&gt;
-This filter specifies a single system type, or semicolon-separated list of system types,
-or asterisk for all system types (the default).
-Will scope these actions to only remote objects from systems of this type or types.
-&lt;br&gt;&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="namefilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the property page is to appear.
-Specify as many of these optional filters like this as needed to explicitly scope this property page element.
-&lt;p&gt;
-This filter specifies a simple or generic resource name.
-Only resources whose name matches this filter will show the property page
-defined within this page element.
-&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="typecategoryfilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the property page is to appear.
-Specify as many of these optional filters like this as needed to explicitly scope this property page element.
-&lt;p&gt;
-This filter specifies a type category. Normally the subsystemconfigurationid
-is sufficient, but some subsystems display multiple types of
-resources, and these are categorized by a type name that can
-be used to scope property pages.
-&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="typefilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the property page is to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-this property page element.
-
-&lt;p&gt;
-This filter specifies a resource type, either simple or generic.
-The resource types depends on the subsystem.
-&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="subtypefilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the property page is to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-this property page element.
-
-&lt;p&gt;
-This filter specifies a simple or generic resource subtype to
-match. Not all subsystems support subtypes for their resources.
-&lt;br&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="subsubtypefilter" type="string">
- <annotation>
- <documentation>
- One of the optional filters to scope the remote resources for
-which the property page is to appear.
-Specify as many of these optional filters like this as needed to explicitly scope
-this property page element.
-
-&lt;p&gt;
-This filter specifies a simple or generic resource sub-subtype
-to match.
-&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is a simple example of a property page for
-files or folders in any remote system type:
-&lt;h3&gt;Example One&lt;/h3&gt;
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.rse.ui.propertyPages&quot;&gt;
- &lt;page
- class=&quot;com.acme.myPropertyPage1&quot;
- id=&quot;com.acme.mypropertypage1&quot;
- name=&quot;Remote Folder and File Info&quot;
- typecategoryfilter=&quot;files&quot;&gt;
- &lt;/page&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-
-The following refines the first example so it only applies
-to files, versus folders, and only for local files:
-&lt;h3&gt;Example Two&lt;/h3&gt;
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.rse.ui.propertyPages&quot;&gt;
- &lt;page
- class=&quot;com.acme.myPropertyPage2&quot;
- id=&quot;com.acme.mypropertypage2&quot;
- name=&quot;Remote File Info&quot;
- typecategoryfilter=&quot;files&quot;
- typefilter=&quot;file&quot;
- subsystemconfigurationid=&quot;local.files&quot;&gt;
- &lt;/page&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-
-The following refines the second example so it only applies
-to local Java files:
-&lt;h3&gt;Example Three&lt;/h3&gt;
-&lt;p&gt;
-&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.rse.ui.propertyPages&quot;&gt;
- &lt;page
- class=&quot;com.acme.myPropertyPage3&quot;
- id=&quot;com.acme.mypropertypage3&quot;
- name=&quot;Remote Java File Info&quot;
- typecategoryfilter=&quot;files&quot;
- typefilter=&quot;file&quot;
- subsystemconfigurationid=&quot;local.files&quot;
- namefilter=&quot;*.java&quot;&gt;
- &lt;/page&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-
-
-&lt;p&gt;
-Remember, you can repeat the &lt;samp&gt;page&lt;/samp&gt; elements as needed, to define
-multiple property pages within the same extension configuration.
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Your actions must all implement the interface &lt;samp&gt;org.eclipse.ui.IWorkbenchPropertyPage&lt;/samp&gt;.
-Typically, you will subclass one of the supplied base classes
-for this extension point:
-&lt;ul&gt;
-&lt;li&gt;&lt;b&gt;org.eclipse.rse.ui.propertypages.SystemAbstractPropertyPageExtensionAction&lt;/b&gt;,
-in plugin org.eclipse.rse.ui.
-Base class offering generic support for any remote resource property page, for any system type.
-&lt;li&gt;&lt;b&gt;org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction&lt;/b&gt;,
-in plugin org.eclipse.rse.files.ui.
-Specialized base class offering specific support for any remote file or folder property page, for any system type.
-&lt;/ul&gt;
-&lt;br&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- There is no supplied implementation for this extension point.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/remoteSystemsViewPreferencesActions.exsd b/rse/plugins/org.eclipse.rse.ui/schema/remoteSystemsViewPreferencesActions.exsd
deleted file mode 100644
index 04384479a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/remoteSystemsViewPreferencesActions.exsd
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.ui" id="remoteSystemsViewPreferencesActions" name="Remote Systems View Preferences Page Action"/>
- </appInfo>
- <documentation>
- This extension point is for contributing an action to the Remote Systems view pulldown menu, to the Preferences cascading menu. This action will launch the Preferences dialog, scoped to the particular page you specify. This will automatically show any child pages as well. This point is easy to extend, no coding required. Just name the preference page by its id from the preferencePages extension that defined the page. Also, if it is not a root page, then you must also name the root page (such as when using Windows-&amp;gt;Preference) by its id from its preferencePages extension.
-
-This would be used by anyone who extends the Remote System Explorer, and offers preference pages for their users, and wants a shortcut to those preference pages for convenience.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="action" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="action">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="label" icon="icon"/>
- </appInfo>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique identifier for this extension.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- The display name for the action, shown in the menu. Include any mnenomnic if desired.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="preferencePageId" type="string" use="required">
- <annotation>
- <documentation>
- This matches the &quot;id&quot; attribute on the preferencePages extension, for the preference page you wish to show in the Preference Dialog for this action. If the preference page is a root (no &quot;category&quot; attribute in its preferencePages extension), this is all you need. Else, you also need to specify the preferencePageCategory attribute.
-
-Note this page will be shown as the root in the Preferences dialog, but it can be expanded to see its child nodes.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="preferencePageCategory" type="string">
- <annotation>
- <documentation>
- This is required if the preference page you wish to show is not a root page, which means if it has a &quot;category&quot; attribute in its preferencePage extension definition. If so, here you give the &quot;id&quot; value of the preference page&apos;s root page... not its immediate parent! Be careful. We need to know the id of the root page so we know which root to recursively search the children of to find the page you specified in the preferencePageId attribute.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- A relative path to an icon that will be displayed in the menu, with the label. Optional
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="tooltip" type="string">
- <annotation>
- <documentation>
- A description of the action, for display on the status line, although it doesn&apos;t seem to work just yet. Optional
- </documentation>
- </annotation>
- </attribute>
- <attribute name="helpContextId" type="string">
- <annotation>
- <documentation>
- The id of help to be shown when F1 is pressed while this action is selected. Optional
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;extension point=&quot;org.eclipse.rse.ui.remoteSystemsViewPreferencesActions&quot;&gt;
- &lt;action
- id=&quot;org.eclipse.rse.ui.preferences.actions.rse&quot;
- label=&quot;%PreferencePageAction.rse.label&quot;
- preferencePageId=&quot;org.eclipse.rse.ui.ui.preferences.RemoteSystemsPreferencePage&quot;
- tooltip=&quot;%PreferencePageAction.rse.tooltip&quot;
- helpContextId=&quot;org.eclipse.rse.ui.aprefrse&quot;
- /&gt;
-&lt;/extension&gt;
-
-&lt;extension point=&quot;org.eclipse.rse.ui.remoteSystemsViewPreferencesActions&quot;&gt;
- &lt;action
- id=&quot;com.acme.tools.core.preferences.rse&quot;
- label=&quot;%PreferencePageAction.rse.label&quot;
- preferencePageId=&quot;com.acme.tools.core.ui.preferences.PreferencePage&quot;
- preferencePageCategory=&quot;org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage&quot;
- tooltip=&quot;%PreferencePageAction.rse.tooltip&quot;
- helpContextId=&quot;com.acme.tools.core.aprefrse&quot;
- /&gt;
- &lt;action
- id=&quot;com.acme.tools.core.preferences.editor&quot;
- label=&quot;%PreferencePageAction.editor.label&quot;
- preferencePageId=&quot;com.acme.tools.editor.preferences.EditorGeneralPreferencePage&quot;
- preferencePageCategory=&quot;org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage&quot;
- tooltip=&quot;%PreferencePageAction.editor.tooltip&quot;
- helpContextId=&quot;com.acme.tools.core.helpcontext01&quot;
- /&gt;
- &lt;action
- id=&quot;com.acme.tools.core.preferences.cache&quot;
- label=&quot;%PreferencePageAction.cache.label&quot;
- preferencePageId=&quot;com.acme.tools.core.ui.preferences.CachingPreferencePage&quot;
- preferencePageCategory=&quot;org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage&quot;
- tooltip=&quot;%PreferencePageAction.caching.tooltip&quot;
- helpContextId=&quot;com.acme.tools.core.helpcontext02&quot;
- /&gt;
-&lt;/extension&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Since no coding is required, there is no API information.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- This extension point is used by the &lt;code&gt;org.eclipse.rse.ui.actions.SystemCascadingPreferencesAction&lt;/code&gt; class, which in turn creates a &lt;code&gt;org.eclipse.rse.ui.actions.SystemShowPreferencesPageAction&lt;/code&gt; object for each extension of this point. These are used to populate the Preferences cascading menu of the Remote Systems view pulldown, but could be used elsewhere too, if desired.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/schema/subsystemConfigurations.exsd b/rse/plugins/org.eclipse.rse.ui/schema/subsystemConfigurations.exsd
deleted file mode 100644
index bc61bb927..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/subsystemConfigurations.exsd
+++ /dev/null
@@ -1,272 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.ui" id="subsystemConfigurations" name="Subsystem Configurations"/>
- </appInfo>
- <documentation>
- This extension point allows tool-writers to extend the capability
-of the Remote System Explorer,
-by identifying a subsystem configuration that produces a subsystem
-whenever a new connection is created.
-This subsystem appears under the connection when it is expanded
-in the Remote Systems view of
-the Remote System Explorer perspective. The subsystem configuration
-is called by the Remote System
-framework when the user creates a new connection, when the connection&apos;s
-system type is one of the
-types identified as supported by this subsystem configuration extension.
-
-&lt;p&gt;
-There is one subsystem
-object per connection, and the role of a subsystem is to allow
-users to work with remote resources
-for the remote system identified by the containing connection.
-Defining a subsystem configuration involves more than the single subsystem
-configuration class. There must
-also be a subsystem class defined, and a system class defined.
-There may also be other classes
-defined, such as classes for the content area of wizards for
-defining filters, user actions
-and compile commands, if the subsystem configuration wishes to support
-these. See the developer documentation for the Remote System Explorer
-for documentation details on defining
-subsystems.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="configuration" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="configuration">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name" icon="icon"/>
- </appInfo>
- <documentation>
- This element defines a subsystem configuration to the Remote System Explorer framework.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique ID for this subsystem configuration. This will be used by persistency
-as a folder name for information contained by the subsystem configuration, or by any of its subsystems.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="vendor" type="string" use="required">
- <annotation>
- <documentation>
- Name of the vendor supplying this subsystem configuration.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string" use="required">
- <annotation>
- <documentation>
- The icon to dipslay for subsystems of this configuration, when not connected.
-Specify the path of the .gif file, relative to your plugin directory.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="iconlive" type="string" use="required">
- <annotation>
- <documentation>
- The icon to display for subsystems of this configuration, when there is a live connection. This
-is usually derived from the normal icon, but adorned with a bright green arrow. Specify
-a path to the icon&apos;s .gif file, relative to your plugin directory.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A class that implements &lt;samp&gt;org.eclipse.rse.core.subsystems.ISubSystemConfiguration&lt;/samp&gt;.
-It is recommended to extend &lt;samp&gt;org.eclipse.rse.core.subsystems.SubSystemConfiguration&lt;/samp&gt; or &lt;samp&gt;org.eclipse.rse.core.servicesubsystem.ServiceSubSystemConfiguration&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.core.subsystems.SubSystemConfiguration:org.eclipse.rse.core.subsystems.ISubSystemConfiguration"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- Translatable name for subsystems created by this configuration.
-These appear immediately under a connection when the connection is expanded in the Remote Systems view of the Remote System Explorer perspective.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string" use="required">
- <annotation>
- <documentation>
- Translatable description for subsystems created by this configuration.
-These appear in configuration and properties pages for subsystems.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="systemTypes" type="string">
- <annotation>
- <documentation>
- A semicolon separated list of system type names that subsystems from this configuration support.
-For example, &quot;Unix;Linux&quot;. If not specified, defaults to all system types.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="category" type="string">
- <annotation>
- <documentation>
- This optional attribute allows subsystem providers to classify
-the type of remote resources
-that are listed by this subsystem configuration. It is possible for
-multiple subsystem factories to
-support the same remote resource category. This category is used
-in the popupMenus and
-propertyPages extension points, to scope actions and property
-pages to only remote resources
-of a particular category, via their &lt;samp&gt;subsystemconfigurationCategory&lt;/samp&gt; attribute.
-For example, if listing database resources
-you might specify a
-category of &quot;database&quot;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="priority" type="string">
- <annotation>
- <documentation>
- This optional attribute determines the order in which subsystems appear in the New Connection wizard and RSE views. Integer values are allowed. Subsystems with lower number will appear first in the RSE tree. Subsystems that do not define the priority attribute will be appended last to the list of subsystems.
-
-Note that ServiceSubSystems that share the same service should always use the same priority, since their service implementation can change at runtime. The following priorities are used by the predefined subsystems: files=100, processes=200, shells=300.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Example of using this extension point:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension
- point=&quot;org.eclipse.rse.ui.subsystemConfigurations&quot;&gt;
- &lt;configuration
- systemTypes=&quot;Unix;Linux;Local&quot;
- name=&quot;Databases&quot;
- icon=&quot;icons/dbsubsys.gif&quot;
- iconlive=&quot;icons/dbsubsyslive.gif&quot;
- id=&quot;com.acme.tools.mypkg.myconfiguration&quot;
- class=&quot;com.acme.tools.db.DBSubSystemFactory&quot;
- category=&quot;databases&quot;
- vendor=&quot;ACME&quot;
- &gt;
- &lt;/configuration&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-
-&lt;p&gt;Defining the xml for the extension point is easy. There is a fair amount to know about
-creating the classes needed for a subsystem configuration, however. For this information, consult
-the Remote System Explorer developer documention, including the JavaDoc for the supplied
-classes and interfaces for this task.
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The provider of subsystem factories must implement the interface
-&lt;samp&gt;org.eclipse.rse.core.subsystems.ISubSystemConfiguration&lt;/samp&gt;,
-although it is not recommended to create a new class from scratch.
-Rather, it is highly recommended
-to use the supplied base class &lt;samp&gt;org.eclipse.rse.core.subsystems.SubSystemConfiguration&lt;/samp&gt;.
-This base class pre-supplies much functionality, including support for
-persisting properties and metadata, and support for filters.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- All supplied subsystems are implemented via use of this extension point.
-See the &lt;samp&gt;plugin.xml&lt;/samp&gt; files for plugins
-&lt;samp&gt;org.eclipse.rse.subsystems.files.dstore&lt;/samp&gt; and
-&lt;samp&gt;org.eclipse.rse.subsystems.processes.dstore&lt;/samp&gt;
-for examples.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
-
-Contributors:
-IBM Corporation - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/AbstractCacheManager.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/AbstractCacheManager.java
deleted file mode 100644
index 85534bd8b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/AbstractCacheManager.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.internal.subsystems;
-
-import org.eclipse.rse.core.subsystems.ICacheManager;
-
-/**
- * Abstract implementation of ICacheManager. Can be used by cache manager to provide some
- * basic caching helper methods.
- */
-public abstract class AbstractCacheManager implements ICacheManager {
-
-
- private boolean restoreFromMemento = false;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICacheManager#setRestoreFromMemento(boolean)
- */
- public void setRestoreFromMemento(boolean restore) {
- restoreFromMemento = restore;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICacheManager#isRestoreFromMemento()
- */
- public boolean isRestoreFromMemento() {
- return restoreFromMemento;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/RemoteServerLauncherConstants.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/RemoteServerLauncherConstants.java
deleted file mode 100644
index 963f86291..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/RemoteServerLauncherConstants.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.internal.subsystems;
-
-/**
- * This interface defines constants for the Remote Server Launcher.
- */
-public interface RemoteServerLauncherConstants
-{
-
- /**
- * Default daemon port, 4035.
- */
- public static final int DEFAULT_DAEMON_PORT = 4035;
-
- /**
- * Default REXEC port, 512.
- */
- public static final int DEFAULT_REXEC_PORT = 512;
-
- /**
- * Default REXEC path, "/opt/rseserver/".
- */
- public static final String DEFAULT_REXEC_PATH = "/opt/rseserver/"; //$NON-NLS-1$
-
- /**
- * Linux REXEC script command, "perl ./server.pl".
- */
- public static final String LINUX_REXEC_SCRIPT = "sh -c \"PATH=/opt/j2sdk1.4.2/bin:$PATH; export PATH; perl ./server.pl\""; //$NON-NLS-1$
-
- /**
- * Unix REXEC script command, "./server.sh".
- */
- public static final String UNIX_REXEC_SCRIPT = "sh -c \"PATH=/opt/j2sdk1.4.2/bin:$PATH; export PATH; sh server.sh\""; //$NON-NLS-1$
-
- /**
- * Default REXEC script command. TIt is equivalent to <code>LINUX_REXEC_SCRIPT</code>.
- */
- public static final String DEFAULT_REXEC_SCRIPT = LINUX_REXEC_SCRIPT;
-} \ No newline at end of file
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
deleted file mode 100644
index 9a18160f6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/ServerLauncher.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.internal.subsystems;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemResources;
-
-
-public abstract class ServerLauncher extends RSEModelObject implements IServerLauncherProperties
-{
-
-
- protected String _name;
- protected IConnectorService _connectorService;
-
- protected ServerLauncher(String name, IConnectorService service)
- {
- super();
- _name = name;
- _connectorService = service;
- }
-
- public String getName()
- {
- return _name;
- }
-
- public String getDescription()
- {
- return SystemResources.RESID_MODELOBJECTS_SERVERLAUNCHER_DESCRIPTION;
- }
-
- public IConnectorService getConnectorService()
- {
- return _connectorService;
- }
-
- /**
- * Clone the contents of this server launcher into the given server launcher
- * <i>Your sublcass must override this if you add additional attributes! Be sure
- * to call super.cloneServerLauncher(newOne) first.</i>
- * @return the given new server launcher, for convenience.
- */
- public IServerLauncherProperties cloneServerLauncher(IServerLauncherProperties newOne)
- {
- newOne.addPropertySets(getPropertySets());
- return newOne;
- }
-
- /**
- * @deprecated
- * @param vendorName
- * @param attributeName
- * @param attributeValue
- */
- public void setVendorAttribute(String vendorName,
- String attributeName, String attributeValue)
- {
- IPropertySet set = getPropertySet(vendorName);
- if (set == null)
- {
- set = createPropertySet(vendorName, ""); //$NON-NLS-1$
- }
- set.addProperty(attributeName, attributeValue);
- }
-
- /**
- * @deprecated use property sets directly now
- */
- public String getVendorAttribute(String vendor, String attributeName)
- {
- IPropertySet set = getPropertySet(vendor);
- if (set != null)
- {
- return set.getPropertyValue(attributeName);
- }
- else
- {
- return null;
- }
- }
-
-
-
- public boolean commit()
- {
- return RSEUIPlugin.getThePersistenceManager().commit(getConnectorService().getHost());
- }
-
-
-
-} //ServerLauncherImpl \ No newline at end of file
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
deleted file mode 100644
index e9b74c2a4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxy.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.internal.subsystems;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-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.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;
-
-
-/**
- * Represents a registered subsystem factory extension.
- */
-public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
-{
-// private String name,description,id,types,vendor, category, systemClassName;
- private String name,description,id,types,vendor, category;
- private int priority;
- private String[] systemTypes;
- private List typesArray;
- private boolean allTypes = false;
- private ImageDescriptor image, liveImage;
- private IConfigurationElement element = null;
- private ISubSystemConfiguration object = null;
- private boolean firstSubSystemQuery = true;
- //private SystemLogFile logFile = null;
-
-
- /**
- * Constructor
- * @param element The IConfigurationElement for this factory's plugin
- */
- public SubSystemConfigurationProxy(IConfigurationElement element) {
- this.element = element;
- this.id = element.getAttribute("id"); //$NON-NLS-1$
- this.name = element.getAttribute("name").trim(); //$NON-NLS-1$
- this.description = element.getAttribute("description").trim(); //$NON-NLS-1$
- this.types = element.getAttribute("systemTypes"); //$NON-NLS-1$
- this.vendor = element.getAttribute("vendor"); //$NON-NLS-1$
- this.category = element.getAttribute("category"); //$NON-NLS-1$
-// this.systemClassName = element.getAttribute("systemClass");
- this.priority = Integer.MAX_VALUE;
-
- String priorityStr = element.getAttribute("priority"); //$NON-NLS-1$
-
- try {
-
- if (priorityStr != null) {
- priority = Integer.parseInt(priorityStr);
- }
- }
- catch (NumberFormatException e) {
- priority = Integer.MAX_VALUE;
- SystemBasePlugin.logError("Exception reading priority for subsystem configuration " + name + " defined in plugin " + element.getDeclaringExtension().getNamespaceIdentifier(), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (vendor == null) vendor = "Unknown"; //$NON-NLS-1$
- if (category == null) category = "Unknown"; //$NON-NLS-1$
- if (types == null) types = "*"; //$NON-NLS-1$
- this.allTypes = types.equals("*"); //$NON-NLS-1$
- this.image = getPluginImage(element, element.getAttribute("icon")); //$NON-NLS-1$
- if (this.image == null) this.image = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID);
- this.liveImage = getPluginImage(element, element.getAttribute("iconlive")); //$NON-NLS-1$
- if (this.liveImage == null) this.liveImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTIONLIVE_ID);
- //createFolderTree();
- }
- /**
- * Return the value of the "vendor" attribute
- */
- public String getVendor()
- {
- return vendor;
- }
- /**
- * Return the value of the "name" attribute
- */
- public String getName()
- {
- return name;
- }
- /**
- * Return the value of the "description" attribute
- */
- public String getDescription()
- {
- return description;
- }
- /**
- * Return the value of the "id" attribute
- */
- public String getId()
- {
- return id;
- }
- /**
- * Return all defined system types
- */
- public String[] getSystemTypes()
- {
- if (systemTypes == null)
- {
- if (allTypes)
- systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypeNames();
- else
- {
- StringTokenizer tokens = new StringTokenizer(types,";"); //$NON-NLS-1$
- Vector v = new Vector();
- while (tokens.hasMoreTokens())
- v.addElement(tokens.nextToken());
- systemTypes = new String[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- systemTypes[idx] = (String)v.elementAt(idx);
- }
- }
- return systemTypes;
- }
- /**
- * Return true if this factory supports all system types
- */
- public boolean supportsAllSystemTypes()
- {
- return allTypes;
- }
-
- /**
- * Return the value of the "category" attribute
- */
- public String getCategory()
- {
- return category;
- }
-
- public ImageDescriptor getImage()
- {
- return image;
- }
-
- /**
- * Return image to use when this susystem is connection. Comes from icon attribute in extension point xml
- */
- public ImageDescriptor getLiveImage()
- {
- if (liveImage != null)
- return liveImage;
- else
- return image;
- }
-
- /**
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getPriority()
- */
- public int getPriority() {
- return priority;
- }
-
- /**
- * Return true if this extension's systemTypes attribute matches the given system type
- */
- public boolean appliesToSystemType(String type)
- {
- if (allTypes)
- return true;
- else
- {
- List typesArray = getTypesArray();
- return typesArray.contains(type);
- }
- }
-
- private List getTypesArray()
- {
- if (typesArray == null)
- {
- typesArray = new ArrayList();
- StringTokenizer tokenizer = new StringTokenizer(types,";"); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens())
- {
- String type = tokenizer.nextToken();
- typesArray.add(type);
- }
- }
- return typesArray;
- }
-
- /**
- * Retrieve image in given plugin's directory tree, given its file name.
- * The file name should be relatively qualified with the subdir containing it.
- */
- protected ImageDescriptor getPluginImage(IConfigurationElement element, String fileName)
- {
- URL path = getBundle().getEntry("/"); //$NON-NLS-1$
- URL fullPathString = null;
- try {
- fullPathString = new URL(path,fileName);
- return ImageDescriptor.createFromURL(fullPathString);
- } catch (MalformedURLException e) {}
- return null;
- }
-
- /**
- * 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 isSubSystemConfigurationActive()
- {
- return (object != null);
- }
-
- /**
- * Return the subsystem factory's object, which is an instance of the class
- * 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 getSubSystemConfiguration()
- {
- if ( firstSubSystemQuery == true && object == null )
- {
- try
- {
-// get the name space of the declaring extension
- String nameSpace = element.getDeclaringExtension().getNamespace();
- String extensionType = element.getAttribute("class"); //$NON-NLS-1$
-
- // use the name space to get the bundle
- Bundle bundle = Platform.getBundle(nameSpace);
-
- // if the bundle has not been uninstalled, then load the handler referred to in the
- // extension, and load it using the bundle
- // then register the handler
- if (bundle.getState() != Bundle.UNINSTALLED)
- {
- Class menuExtension = bundle.loadClass(extensionType);
-
- object = (ISubSystemConfiguration)menuExtension.getConstructors()[0].newInstance(null);
- }
-
- object.setSubSystemConfigurationProxy(this); // side effect: restores filter pools
- //System.out.println("*** STARTED SSFACTORY: " + id + " ***");
- } catch (Exception exc)
- {
- exc.printStackTrace();
- SystemBasePlugin.logError("Unable to start subsystem factory "+id,exc); //$NON-NLS-1$
- org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(SystemBasePlugin.getActiveWorkbenchShell());
- mb.setText("Unexpected Error"); //$NON-NLS-1$
- String errmsg = "Unable to start subsystem factory "+getName()+". See log file for details"; //$NON-NLS-1$ //$NON-NLS-2$
- mb.setMessage(errmsg);
- mb.open();
- }
- if (object != null)
- {
- try
- {
- if (object instanceof SubSystemConfiguration) // hoaky but works
- {
- SubSystemConfiguration ssFactory = (SubSystemConfiguration)object;
- ssFactory.restoreAllFilterPoolManagersForAllProfiles();
- }
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Error restoring subsystem for factory "+getName(),exc); //$NON-NLS-1$
- }
- }
- firstSubSystemQuery = false;
- }
- return object;
- }
-// /**
-// * Return an instance of the IConnectorService class identified by the "systemClass" attribute
-// * of this subsystemFactory extension point. Note each call to this method returns a
-// * new instance of the class, or null if no "systemClass" attribute was specified.
-// */
-// public IConnectorService getSystemObject()
-// {
-// if (systemClassName == null)
-// return null;
-// Object object = null;
-// try
-// {
-// object = (IConnectorService)element.createExecutableExtension("systemClass");
-// } catch (Exception exc)
-// {
-// SystemBasePlugin.logError("Unable to instantiate IConnectorService class "+ systemClassName + " for extension point " + id,exc);
-// org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(SystemBasePlugin.getActiveWorkbenchShell());
-// mb.setText("Unexpected Error");
-// String errmsg = "Unable to instantiate IConnectorService class " + systemClassName + " for extension point " + id +": " + exc.getClass().getName()+" - " + exc.getMessage();
-// mb.setMessage(errmsg);
-// mb.open();
-// }
-// return (IConnectorService)object;
-// }
-
- /**
- * Reset for a full refresh from disk, such as after a team synch.
- */
- public void reset()
- {
- if (object != null)
- object.reset();
- }
-
- /**
- * After a reset, restore from disk
- */
- public void restore()
- {
- if (object != null)
- try
- {
- if (object instanceof SubSystemConfiguration) // hoaky but works
- {
- SubSystemConfiguration ssFactory = (SubSystemConfiguration)object;
- ssFactory.restoreAllFilterPoolManagersForAllProfiles();
- }
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Error restoring subsystem for factory "+getName(),exc); //$NON-NLS-1$
- }
- }
-
- // PRIVATE METHODS USED BY THIS CLASS AND THE FACTORY OBJECT CLASS IT WRAPPERS.
-
- protected IConfigurationElement getConfigurationElement()
- {
- return element;
- }
-
- protected Bundle getBundle()
- {
- String nameSpace = element.getDeclaringExtension().getNamespace();
- return Platform.getBundle(nameSpace);
- }
-
- // -----------------
- // COMMON METHODS...
- // -----------------
-
- public boolean equals(Object o)
- {
- if (o instanceof String)
- return ((String)o).equals(id);
- else if (o instanceof SubSystemConfigurationProxy)
- return ((SubSystemConfigurationProxy)o).getId().equals(id);
- else
- return false;
- }
-
- public int hashCode()
- {
- return id.hashCode();
- }
-
- public String toString()
- {
- return id+"."+name; //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxyComparator.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxyComparator.java
deleted file mode 100644
index 54480e53e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxyComparator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.core.internal.subsystems;
-
-import java.util.Comparator;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-
-public class SubSystemConfigurationProxyComparator implements Comparator {
-
- /**
- * Constructor.
- */
- public SubSystemConfigurationProxyComparator() {
- }
-
- /**
- * Compares priorities of subsystem configuration proxies.
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- public int compare(Object o1, Object o2) {
-
- if (o1 instanceof ISubSystemConfigurationProxy && o2 instanceof ISubSystemConfigurationProxy) {
- ISubSystemConfigurationProxy proxy1 = (ISubSystemConfigurationProxy)o1;
- ISubSystemConfigurationProxy proxy2 = (ISubSystemConfigurationProxy)o2;
-
- if (proxy1.getPriority() < proxy2.getPriority()) {
- return -1;
- }
- else if (proxy1.getPriority() > proxy2.getPriority()) {
- return 1;
- }
- else {
- return 0;
- }
- }
- else {
- return 0;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java
deleted file mode 100644
index b2c0b6fb4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.servicesubsystem;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-
-
-
-public abstract class ServiceSubSystem extends SubSystem implements IServiceSubSystem
-{
-
- /**
- * Constructor
- * Subclasses must call this via super().
- */
- protected ServiceSubSystem(IHost host, IConnectorService connectorService)
- {
- super(host, connectorService);
- }
-
- // -------------------------------------
- // GUI methods
- // -------------------------------------
- /**
- * <i>Optionally override in order to supply a property sub-page to the tabbed
- * notebook in the owning connection's Properties page.</i>
- *
- * Return the single property page to show in the tabbed notebook for the
- * for SubSystem property of the parent Connection object, in the Remote Systems
- * view. <br>
- * Return null if no page is to be contributed for this. You are limited to a single
- * page, so you may have to compress. It is recommended you prompt for the port
- * if applicable since the common base subsystem property page is not shown
- * To help with this you can use the {@link org.eclipse.rse.ui.widgets.SystemPortPrompt} widget.
- * <br>
- * Returns null by default.
- */
- public PropertyPage getPropertyPage(Composite parent)
- {
- return null;
- }
-
-
- // ----------------------------------
- // METHODS THAT MUST BE OVERRIDDEN...
- // ----------------------------------
-
-
- /**
- * <i>Remote-accessing method, that does nothing by default. <b>Override</b> if filter strings are supported.</i><br>
- * Resolve an <i>absolute</i> filter string. This is only applicable if the subsystem
- * factory reports true for {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()},
- * which is the default. Otherwise, {@link org.eclipse.rse.core.subsystems.SubSystem#getChildren()}
- * is called when the subsystem itself is expanded.
- * <p>
- * When a user <u>expands a filter</u> this method is invoked for each filter string and the
- * results are concatenated and displayed to the user. You can affect the post-concatenated
- * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- * <p>
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.ui.view.SystemView view}.
- * There are <u>two requirements</u> on the returned objects:</p>
- * <ol>
- * <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
- * <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
- * for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#isVisible() visible}
- * in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
- * with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
- * </ol>
- * <p>A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- * <p>
- * Be sure to register your adapter factory in your plugin's startup method.
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
- *
- * @param monitor - the progress monitor in effect while this operation performs
- * @param filterString - one of the filter strings from the expanded filter
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
-
- /**
- * <i>Remote-accessing method, that does nothing by default. <b>Override</b> if filter strings are supported.</i><br>
- *
- * Resolve a <i>relative</i> filter string.
- * <p>
- * When a user <u>expands a remote resource</u> this method is invoked and the
- * results are potentially sorted and displayed to the user. You can affect the sorting
- * behaviour by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies. This is only called if the parent object's adapter indicated it can have children.
- * <p>
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.ui.view.SystemView view}.
- * There are <u>two requirements</u> on the returned objects:</p>
- * <ol>
- * <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
- * <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
- * for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#isVisible() visible}
- * in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
- * with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
- * </ol>
- * <p>A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- * <p>
- * Be sure to register your adapter factory in your plugin's startup method.
- *
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
- *
- * @param monitor - the progress monitor in effect while this operation performs
- * @param parent - the parent resource object being expanded
- * @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
-
-
- // ------------------------
- // MOF GENERATED METHODS...
- // ------------------------
-
- /**
- * <i><b>Private</b> method. Do not override or call.</i><br>
- * @see org.eclipse.emf.ecore.InternalEObject //GENERICRULES.JSED - replaces InternalEObject. Is this needed? // #refSetValueForEnumAttribute(EAttribute, EEnumLiteral, EEnumLiteral)
- *
- public void refSetValueForEnumAttribute(EAttribute arg0,EEnumLiteral arg1,EEnumLiteral arg2)
- {
- super.refSetValueForEnumAttribute(arg0, arg1, arg2);
- }*/
-
-} //DefaultSubSystemImpl \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java
deleted file mode 100644
index 2c4addea0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,244 +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.servicesubsystem;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.subsystems.AbstractConnectorService;
-import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * This class is to be used by subsystem-providers that do not desire to use MOF/EMF. It is
- * therefore recommended starting base class for subsystem providers.
- * <br>
- * To use this class, simply subclass it and override the appropriate methods in it, such as:</p>
- * <ul>
- * <li>any of the supportsXXX() configuration methods you wish to change.
- * <li>{@link #createSubSystemInternal(org.eclipse.rse.model.IHost)}, to instantiate your subsystem class.
- * </ul>
- * <p>
- * For additional customization of the subsystem, you may supply a {@link SubSystemConfigurationAdapter},
- * which allows you to
- * <li>supply your own subsystem popup menu actions via {@link SubSystemConfigurationAdapter#getAdditionalSubSystemActions(ISubSystemConfiguration, ISubSystem, Shell)},
- * <li>supply your own New->Filter popup menu action via {@link SubSystemConfigurationAdapter#getNewFilterPoolFilterAction(ISubSystemConfiguration, ISystemFilterPool, Shell)}, and
- * <li>supply your own Change Filter popup menu action via {@link SubSystemConfigurationAdapter#getChangeFilterAction(ISubSystemConfiguration, ISystemFilter,Shell)}.
- * </ul>
- * <p>
- * This class is typically used together with:</p>
- * <ul>
- * <li>{@link org.eclipse.rse.core.servicesubsystem.ServiceSubSystem} for the subsystem
- * <li>{@link AbstractConnectorService} for the connector service
- * <li>{@link AbstractConnectorServiceManager} for the connector service manager
- * <li>{@link org.eclipse.rse.core.subsystems.AbstractResource} for the individual remote resources
- * </ul>
- * <p>
- * In general, for what methods to override, only worry about the non-generated methods in
- * this class, and ignore the hundreds in {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration}
- *
- * @see org.eclipse.rse.core.servicesubsystem.ServiceSubSystem
- * @see AbstractConnectorService
- * @see AbstractConnectorServiceManager
- */
-
-public abstract class ServiceSubSystemConfiguration extends SubSystemConfiguration implements IServiceSubSystemConfiguration
-{
-
- protected ServiceSubSystemConfiguration()
- {
- super();
- }
-
- // ------------------------------------------------------
- // CONFIGURATION METHODS THAT ARE OVERRIDDEN FROM PARENT
- // WE ASSUME TYPICAL DEFAULTS, BUT CHILDREN CAN OVERRIDE
- // ------------------------------------------------------
- /**
- * <i>Overridable configuration method. Default is <b>false</b></i><br>
- * Return true if instance of this factory's subsystems support connect and disconnect actions.
- */
- public boolean supportsSubSystemConnect()
- {
- return true;
- }
-
- /**
- * <i>Overridable configuration method. Default is <b>true</b></i><br>
- * Return true (default) or false to indicate if subsystems of this factory support user-editable
- * port numbers.
- */
- public boolean isPortEditable()
- {
- return true;
- }
- /**
- * <i>Overridable configuration method. Default is <b>true</b></i><br>
- * Required method for subsystem factory child classes. Return true if you support filters, false otherwise.
- * If you support filters, then some housekeeping will be done for you automatically. Specifically, they
- * will be saved and restored for you automatically.
- */
- public boolean supportsFilters()
- {
- return true;
- }
- /**
- * <i>Overridable configuration method. Default is <b>false</b></i><br>
- * Do we allow filters within filters?
- */
- public boolean supportsNestedFilters()
- {
- return false;
- }
- /**
- * <i>COverridable configuration method. Default is <b>false</b></i><br>
- * Return true if you support user-defined actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem factory
- */
- public boolean supportsUserDefinedActions()
- {
- return false;
- }
- /**
- * <i>Overridable configuration method. Default is <b>false</b></i><br>
- * Return true if you support user-defined/managed named file types
- */
- public boolean supportsFileTypes()
- {
- return false;
- }
- /**
- * <i>Overridable configuration method. Default is <b>false</b></i><br>
- * Tell us if filter strings are case sensitive.
- */
- public boolean isCaseSensitive()
- {
- return false;
- }
- /**
- * <i>Overridable configuration method. Default is <b>false</b></i><br>
- * Tell us if duplicate filter strings are supported per filter.
- */
- public boolean supportsDuplicateFilterStrings()
- {
- return false;
- }
-
- // ------------------------------------------------
- // FRAMEWORKD METHODS TO BE OVERRIDDEN IF APPROPRIATE.
- // THESE ARE CALLED BY OUR OWN PARENT
- // ------------------------------------------------
-
- /**
- * <i>Overridable lifecycle method. Not typically overridden.</i><br>
- * After a new subsystem instance is created, the framework calls this method
- * to initialize it. This is your opportunity to set default attribute values.
- *
- * <p>The reason for the connect wizard pages parm is in case your factory contributes a page to that wizard,
- * whose values are needed to set the subsystem's initial state. For example, you might decide to add a
- * page to the connection wizard to prompt for a JDBC Driver name. If so, when this method is called at
- * the time a new connection is created apres the wizard, your page will have the user's value. You can
- * thus use it here to initialize that subsystem property. Be use to use instanceof to find your particular
- * page.
- * </p>
- *
- * <p>
- * If you override this, <i>PLEASE CALL SUPER TO DO DEFAULT INITIALIZATION!</i>
- *
- * @param subsys - The subsystem that was created via createSubSystemInternal
- * @param yourNewConnectionWizardPages - The wizard pages you supplied to the New Connection wizard, via the
- * {@link org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)}
- * method or null if you didn't override this method.
- * Note there may be more pages than you originally supplied, as you are passed all pages contributed
- * by this factory object, including subclasses. Null on a clone operation.
- *
- * @see org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)
- */
- protected void initializeSubSystem(ISubSystem subsys,ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
- {
- super.initializeSubSystem(subsys, yourNewConnectionWizardPages);
- }
-
- // --------------------------------
- // METHODS FOR SUPPLYING ACTIONS...
- // --------------------------------
- /**
- * <i>Overridable method for getting Remote System view popup menu actions.</i><br>
- * Called by {@link org.eclipse.rse.ui.view.SystemView SystemView} when constructing
- * the popup menu for a selected subsystem.
- * <p>
- * For contributing popup menu actions to <b>subsystem objects</b>, beyond the
- * default actions already supplied by our parent class. This method is only called with
- * subsystems created by this subsystem factory.
- * <p>
- * Returns null by default. Override to show your own popup menu actions for your own subsystems.
- *
- * @return Vector of IAction objects, which usually are subclasses of {@link org.eclipse.rse.ui.actions.SystemBaseAction SystemBaseAction} or
- * {@link org.eclipse.rse.ui.actions.SystemBaseDialogAction SystemBaseDialogAction} or
- * {@link org.eclipse.rse.ui.actions.SystemBaseWizardAction SystemBaseWizardAction} or
- * {@link org.eclipse.rse.ui.actions.SystemBaseSubMenuAction SystemBaseSubMenuAction}.
- */
- protected Vector getAdditionalSubSystemActions(ISubSystem selectedSubSystem, Shell shell)
- {
- return null;
- }
-
-
- /**
- * <i>Optionally overridable method affecting the visual display of objects within subsystems created by this factory.</i><br>
- * Return the translated string to show in the property sheet for the "type" property, for the selected
- * filter. This method is only called for filters within subsystems created by this subsystem factory.
- * <p>
- * Returns a default string, override if appropriate.
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
- {
- return super.getTranslatedFilterTypeProperty(selectedFilter);
- }
- /**
- * <i>Overridable method for getting Remote System view popup menu actions. Called by {@link org.eclipse.rse.ui.view.SystemView SystemView}
- * when constructing the popup menu for a selected filter.</i><br>
- * This method is only called for filters within subsystems created by this subsystem factory.<br>
- * By default, this returns null. Override if appropriate.
- *
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#getFilterActions(ISystemFilter,Shell)
- *
- * @return Vector of IAction objects, which usually are subclasses of {@link org.eclipse.rse.ui.actions.SystemBaseAction SystemBaseAction} or
- * {@link org.eclipse.rse.ui.actions.SystemBaseDialogAction SystemBaseDialogAction} or
- * {@link org.eclipse.rse.ui.actions.SystemBaseWizardAction SystemBaseWizardAction} or
- * {@link org.eclipse.rse.ui.actions.SystemBaseSubMenuAction SystemBaseSubMenuAction}.
- */
- protected Vector getAdditionalFilterActions(ISystemFilter selectedFilter, Shell shell)
- {
- return null;
- }
-
-
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 5ceac8af5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java
+++ /dev/null
@@ -1,1238 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.IRSEUserIdConstants;
-import org.eclipse.rse.core.ISystemUserIdConstants;
-import org.eclipse.rse.core.PasswordPersistenceManager;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.rse.logging.LoggerFactory;
-import org.eclipse.rse.model.ISystemRegistryUI;
-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;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * This is a base class to make it easier to create connector service classes.
- * <p>
- * An {@link org.eclipse.rse.core.subsystems.IConnectorService} object
- * is returned from a subsystem object via getConnectorService(), and
- * it is used to represent the live connection to a particular subsystem.
- * <p>
- * You must override/implement
- * <ul>
- * <li>isConnected
- * <li>internalConnect
- * <li>internalDisconnect
- * </ul>
- * You should override:
- * <ul>
- * <li>reset
- * <li>getVersionReleaseModification
- * <li>getHomeDirectory
- * <li>getTempDirectory
- * </ul>
- * You can override:
- * <ul>
- * <li>supportsUserId
- * <li>requiresUserId
- * <li>supportsPassword
- * <li>requiresPassword
- * </ul>
- *
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager
- */
-public abstract class AbstractConnectorService extends RSEModelObject implements IConnectorService, ISystemUserIdConstants
-{
-
- private ISubSystem _primarySubSystem;
- private List _registeredSubSystems;
- private String _name, _description;
- private int _port;
- private String _userId;
- private boolean _usingSSL;
- private IHost _host;
-
- /**
- * The cached value of the '{@link #getRemoteServerLauncher() <em>Remote Server Launcher</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRemoteServerLauncher()
- * @generated
- * @ordered
- */
- protected IServerLauncherProperties _remoteServerLauncherProperties = null;
-
-
- private transient SystemSignonInformation _passwordInfo;
- protected Shell shell;
- private Vector commListeners = new Vector(5);
- private IServerLauncher starter;
- /**
- * The result of calling launch in the server launcher object, in the connect method
- */
- protected Object launchResult;
- /**
- * The result of calling connect in the server launcher object, in the connect method
- */
- protected Object connectResult;
-
- // dy: March 24, 2003 Added _suppressSignonPrompt flag to suppress prompting the
- // user to signon if they already cancelled signon. Then intent is to allows tools
- // writers to prevent multiple signon prompts during a "transaction" if the user cancel
- // the first signon prompt
- private boolean _suppressSignonPrompt = false;
-
-
- public AbstractConnectorService(String name, String description, IHost host, int port)
- {
- super();
- _name = name;
- _description = description;
- _port = port;
- _host = host;
- _registeredSubSystems = new ArrayList();
- }
-
-
- /**
- * <i>Not implemented, you should override if possible.</i><br>
- * Return the version, release, modification of the remote system,
- * if connected, if applicable and if available. Else return null. It
- * is up to each subsystem to decide how to interpret what is returned.<br>
- * This is used to show the VRM in the property sheet, when the subsystem is selected.
- * <p>
- * Up to each implementer to decide if this will be cached.
- * <p>
- * Returns an empty string by default, override if possible
- */
- public String getVersionReleaseModification()
- {
- return ""; //$NON-NLS-1$
- }
- /**
- * <i>Not implemented, you should override if possible.</i><br>
- * Return the home directory of the remote system for the current user, if available.
- * <p>
- * Up to each implementer to decide how to implement, and if this will be cached.
- * <p>
- * Returns an empty string by default, override if possible
- */
- public String getHomeDirectory()
- {
- return ""; //$NON-NLS-1$
- }
- /**
- * <i>Not implemented, you should override if possible.</i><br>
- * Return the temp directory of the remote system for the current user, if available.
- * <p>
- * Up to each implementer to decide how to implement, and if this will be cached.
- * <p>
- * Returns an empty string by default, override if possible
- */
- public String getTempDirectory()
- {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Set the subsystem, when its not known at constructor time
- */
- public void registerSubSystem(ISubSystem ss)
- {
- if (!_registeredSubSystems.contains(ss))
- {
- _registeredSubSystems.add(ss);
- }
- }
-
- /**
- * Removes the subsystem from teh list
- * @param ss
- */
- public void deregisterSubSystem(ISubSystem ss)
- {
- _registeredSubSystems.remove(ss);
- }
-
- // ------------------
- // Utility methods...
- // ------------------
-
- final public ISubSystem[] getSubSystems()
- {
- return (ISubSystem[])_registeredSubSystems.toArray(new ISubSystem[_registeredSubSystems.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getPrimarySubSystem()
- */
- final public ISubSystem getPrimarySubSystem()
- {
- if (_primarySubSystem == null)
- {
- if (_registeredSubSystems.size() == 0)
- {
-
- }
- else
- {
- ISubSystem ss = (ISubSystem)_registeredSubSystems.get(0);
- _primarySubSystem = ss.getPrimarySubSystem();
- }
- }
- return _primarySubSystem;
- }
-
- final public IHost getHost()
- {
- return _host;
- }
-
- /**
- * <i>Useful utility method. Fully implemented, do not override.</i><br>
- * Returns the system type for this connection:<br> <code>getSubSystem().getSystemConnection().getSystemType()</code>
- */
- final public String getHostType()
- {
- return getHost().getSystemType();
- }
-
- /**
- *
- */
- final public String getName()
- {
- return _name;
- }
-
- final public String getDescription()
- {
- return _description;
- }
-
- /**
- * <i>Useful utility method. Fully implemented, do not override.</i><br>
- * Returns the host name for the connection this system's subsystem is associated with:</br>
- * <code>getSubSystem().getSystemConnection().getHostName()</code>
- */
- final public String getHostName()
- {
- return getHost().getHostName();
- }
-
-
- /**
- * <i>Useful utility method. Fully implemented, do not override.</i><br>
- * Returns the active userId if we are connected.
- * If not it returns the userId for the primary subsystem ignoring the
- * cached userId.
- */
- final public String getUserId() {
- String result = null;
- if (supportsUserId()) {
- result = getLocalUserId();
- if (result == null) {
- result = getSubSystemUserId();
- }
- }
- return result;
- }
-
- /**
- * <i>Useful utility method. Fully implemented, do not override.</i><br>
- * Return the userId for this connector service. If there is none
- * set for this service then it is retrieved from the primary subsystem.
- */
- final protected String getLocalUserId() {
- return _userId;
- }
-
- /**
- * @return the userId from the primary subsystem.
- */
- private String getSubSystemUserId() {
- ISubSystem ss = getPrimarySubSystem();
- String result = ss.getUserId();
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setUserId(java.lang.String)
- */
- final public void setUserId(String newId)
- {
-
- if (_userId == null || !_userId.equals(newId)) {
- _userId = newId;
- setDirty(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setHost(org.eclipse.rse.model.IHost)
- */
- final public void setHost(IHost host) {
- _host = host;
- }
-
- /**
- * <i>Useful utility method. Fully implemented, do not override.</i><br>
- * Clear internal userId cache. Called when user uses the property dialog to
- * change his userId. By default, sets internal userId value to null so that on
- * the next call to getUserId() it is requeried from subsystem.
- * Also calls {@link #clearPasswordCache()}.
- */
- final public void clearUserIdCache() {
- _userId = null;
- clearPasswordCache();
- }
-
- /**
- * <i>Useful utility method. Fully implemented, do not override.</i><br>
- * Clear internal password cache. Called when user uses the property dialog to
- * change his userId. This method does not remove the password from the disk
- * cache - only the memory cache.
- *
- * @see #clearUserIdCache()
- */
- final public void clearPasswordCache() {
- clearPasswordCache(false);
- }
-
- /**
- * <i>Useful utility method. Fully implemented, do not override.</i><br>
- * Clear internal password cache. Called when user uses the property dialog to
- * change his userId.
- *
- * @param onDisk if this is true, clear the password from the disk cache as well
- * @see #clearUserIdCache()
- */
- final public void clearPasswordCache(boolean onDisk) {
- setPasswordInformation(null);
- String userId = getUserId();
- if (onDisk) {
- // now get rid of userid/password from disk
- String systemType = getHostType();
- String hostName = getHostName();
- if (userId != null)
- PasswordPersistenceManager.getInstance().remove(systemType, hostName, userId);
- }
- if (shareUserPasswordWithConnection()) {
- // clear this uid/password with other ISystems in connection
- clearPasswordForOtherSystemsInConnection(userId, onDisk);
- }
- }
-
- /**
- * <i>Useful utility method. Fully implemented, do not override.</i><br>
- * Return true if password is currently saved either here or in its persisted
- * form.
- * @param onDisk true if the check should be made for a persisted form as well,
- * false if the check should be made for a password in memory only.
- * @return true if the password is known, false otherwise.
- */
- final public boolean isPasswordCached(boolean onDisk) {
- boolean cached = (getPasswordInformation() != null);
- if (!cached && onDisk) {
- // now check if cached on disk
- String systemType = getHostType();
- String hostName = getHostName();
- String userId = getUserId();
- if (userId != null) {
- return PasswordPersistenceManager.getInstance().passwordExists(systemType, hostName, getUserId());
- }
- }
- return cached;
- }
-
- /**
- * <i>Useful utility method. Fully implemented, do not override.</i><br>
- * Return true if password is currently cached.
- */
- final public boolean isPasswordCached()
- {
- return isPasswordCached(false);
- }
-
- /**
- * Return true if this system can inherit the uid and password of
- * other ISystems in this connection
- *
- * @return true if it can inherit the user/password
- */
- final public boolean inheritConnectionUserPassword()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresPassword()
- */
- public boolean requiresPassword() {
- return true;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsPassword()
- */
- public boolean supportsPassword() {
- return true;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresUserId()
- */
- public boolean requiresUserId() {
- return true;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsUserId()
- */
- public boolean supportsUserId()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsRemoteServerLaunching()
- */
- public boolean supportsRemoteServerLaunching() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#hasRemoteServerLauncherProperties()
- */
- public boolean hasRemoteServerLauncherProperties() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsServerLaunchProperties()
- */
- public boolean supportsServerLaunchProperties() {
- return false;
- }
-
- /**
- * Return true if this connector service can share it's uid and password
- * with other connector services in this host (connection).
- * @return true if it can share the user/password
- */
- public boolean shareUserPasswordWithConnection()
- {
- return true;
- }
-
- /**
- * <i>Do not override.</i>
- * Sets the signon information for this connector service.
- * The search order for the password is as follows:</p>
- * <ol>
- * <li>First check if the password is already known by this connector service and that it is still valid.
- * <li>If password not known then look in the password store and verify that it is still valid.
- * <li>If a valid password is not found then prompt the user.
- * </ol>
- * Must be run in the UI thread.
- * Can be null if the password is known to exist in either this class or in the password store.
- * @param forcePrompt if true then present the prompt even if the password was found and is valid.
- * @throws InterruptedException if user is prompted and user cancels that prompt or if isSuppressSignonPrompt is true.
- */
- public void promptForPassword(boolean forcePrompt) throws InterruptedException {
- // dy: March 24, 2003: check if prompting is temporarily suppressed by a tool
- // vendor, this should only be suppressed if the user cancelled a previous signon
- // dialog (or some other good reason)
- if (isSuppressSignonPrompt()) throw new InterruptedException();
-
- ISubSystem subsystem = getPrimarySubSystem();
- IHost host = subsystem.getHost();
- String hostName = host.getHostName();
- String hostType = host.getSystemType();
- boolean savePassword = false;
- if (_passwordInfo == null) {
- _passwordInfo = new SystemSignonInformation(hostName, null, null, hostType);
- }
- if (supportsUserId()) {
- String userId = getUserId();
- if (_passwordInfo.getUserid() == null) {
- _passwordInfo.setUserid(userId);
- }
- boolean sameUserId = host.compareUserIds(userId, _passwordInfo.getUserid());
- boolean sameHost = hostName.equalsIgnoreCase(_passwordInfo.getHostname());
- if (!(sameHost && sameUserId)) {
- _passwordInfo.setPassword(null);
- _passwordInfo.setUserid(userId);
- }
- }
- if (supportsPassword()) {
- if (_passwordInfo.getPassword() == null) {
- PasswordPersistenceManager ppm = PasswordPersistenceManager.getInstance();
- String userId = _passwordInfo.getUserid();
- SystemSignonInformation savedPasswordInformation = ppm.find(hostType, hostName, userId);
- if (savedPasswordInformation != null) {
- _passwordInfo = savedPasswordInformation;
- savePassword = true;
- }
- }
- }
- ISignonValidator validator = getSignonValidator();
- boolean signonValid = (validator == null) || validator.isValid(shell, _passwordInfo);
-
- // If we ran into an invalid password we need to tell the user.
- // DWD refactor - want to move this to a pluggable class so that this can be moved to core.
- // DWD not sure this is necessary, shouldn't this message show up on the password prompt itself?
- if (!signonValid) {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_INVALID);
- msg.makeSubstitution(getLocalUserId(), getHostName());
- SystemMessageDialog dialog = new SystemMessageDialog(shell, msg);
- dialog.open();
- }
- if (shell == null)
- {
- shell = SystemBasePlugin.getActiveWorkbenchShell();
- }
-
- if (supportsPassword() || supportsUserId())
- {
- if (shell == null)
- {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
- if (shell != null) {
- boolean passwordNeeded = supportsPassword() && _passwordInfo.getPassword() == null;
- boolean userIdNeeded = supportsUserId() && _passwordInfo.getUserid() == null;
- if (passwordNeeded || userIdNeeded || forcePrompt) {
- ISystemPasswordPromptDialog dialog = getPasswordPromptDialog(shell);
- if (dialog != null) {
- dialog.setSystemInput(this);
- dialog.setSignonValidator(getSignonValidator());
- if (supportsUserId()) {
- dialog.setUserIdValidator(getUserIdValidator());
- }
- if (supportsPassword()) {
- String password = _passwordInfo.getPassword();
- dialog.setSavePassword(savePassword);
- dialog.setPassword(password);
- dialog.setPasswordValidator(getPasswordValidator());
- }
- try {
- dialog.open();
- } catch (Exception e) {
- logException(e);
- }
- if (dialog.wasCancelled()) {
- _passwordInfo = null;
- throw new InterruptedException();
- }
- String userId = dialog.getUserId();
- boolean userIdChanged = dialog.getIsUserIdChanged();
- boolean saveUserId = dialog.getIsUserIdChangePermanent();
- String password = dialog.getPassword();
- savePassword = dialog.getIsSavePassword();
- if (supportsUserId() && userIdChanged) {
- if (saveUserId) {
- updateDefaultUserId(subsystem, userId);
- } else {
- setUserId(userId);
- _passwordInfo.setUserid(userId);
- }
- }
- if (supportsPassword()) {
- setPassword(userId, password, savePassword);
- if (shareUserPasswordWithConnection()) {
- updatePasswordForOtherSystemsInConnection(userId, password, savePassword);
- }
- }
- }
- }
- }
- }
- }
-
- protected void clearPasswordForOtherSystemsInConnection(String uid, boolean fromDisk)
- {
- if (uid != null)
- {
- IHost connection = getHost();
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] subsystems = registry.getSubSystems(connection);
-
- List uniqueSystems = new ArrayList();
- for (int i = 0; i < subsystems.length; i++)
- {
- IConnectorService system = subsystems[i].getConnectorService();
- if (system != this && system.inheritConnectionUserPassword())
- {
- if (!uniqueSystems.contains(system))
- {
- uniqueSystems.add(system);
- }
- }
- }
-
- for (int s = 0; s < uniqueSystems.size(); s++)
- {
- IConnectorService system = (IConnectorService)uniqueSystems.get(s);
- if (system.isPasswordCached(fromDisk))
- {
- system.clearPasswordCache(fromDisk);
- }
- }
- }
- }
-
-
- protected void updatePasswordForOtherSystemsInConnection(String uid, String password, boolean persistPassword)
- {
- IHost connection = getPrimarySubSystem().getHost();
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] subsystems = registry.getSubSystems(connection);
-
- List uniqueSystems = new ArrayList();
- for (int i = 0; i < subsystems.length; i++)
- {
- IConnectorService system = subsystems[i].getConnectorService();
- if (system != this && system.inheritConnectionUserPassword())
- {
- if (!uniqueSystems.contains(system))
- {
- uniqueSystems.add(system);
- }
- }
- }
-
- for (int s = 0; s < uniqueSystems.size(); s++)
- {
- IConnectorService system = (IConnectorService)uniqueSystems.get(s);
- if (!system.isConnected() && !system.isPasswordCached())
- {
- if (system.getPrimarySubSystem().forceUserIdToUpperCase())
- {
- system.setPassword(uid.toUpperCase(), password.toUpperCase(), persistPassword);
- }
- else
- {
- system.setPassword(uid, password, persistPassword);
- }
- }
- }
- }
-
- /**
- * Change the default user Id value in the SubSystem if it is non-null, else
- * update it in the Connection object
- */
- private void updateDefaultUserId(ISubSystem subsystem, String userId) {
- String ssLocalUserId = subsystem.getLocalUserId();
- if (ssLocalUserId != null) { // defect 42709
- ISubSystemConfiguration ssc = subsystem.getSubSystemConfiguration();
- ssc.updateSubSystem(subsystem, true, userId, false, 0);
- } else { // it seems intuitive to update the connection object. defect 42709. Phil
- int whereToUpdate = IRSEUserIdConstants.USERID_LOCATION_HOST;
- IHost conn = subsystem.getHost();
- ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(), conn.getDescription(), userId, whereToUpdate);
- }
- }
-
- /**
- * <i>A default implementation is supplied, but can be overridden if desired.</i><br>
- * Instantiates and returns the dialog to prompt for the userId and password.
- * <p>
- * By default returns an instance of SystemPasswordPromptDialog. Calls forcePasswordToUpperCase() to decide whether the user Id and password should be folded to uppercase.
- * <p>
- * Calls {@link #getUserIdValidator()} and {@link #getPasswordValidator()} to set the validators. These return null by default by you can override them.
- * <p>
- * Before calling open() on the dialog, the getPassword(Shell) method that calls this will call setSystemInput(this).
- * <p>
- * After return, it will call wasCancelled() and getUserId(), getIsUserIdChanged(), getIsUserIdChangePermanent() and getPassword().
- * <p>
- *
- * @return An instance of a dialog class that implements the ISystemPasswordPromptDialog interface
- */
- protected final ISystemPasswordPromptDialog getPasswordPromptDialog(Shell shell)
- {
- ISystemPasswordPromptDialog dlg = new SystemPasswordPromptDialog(shell);
- dlg.setForceToUpperCase(forcePasswordToUpperCase());
- dlg.setUserIdValidator(getUserIdValidator());
- dlg.setPasswordValidator(getPasswordValidator());
- dlg.setSignonValidator(getSignonValidator());
- return dlg;
- }
-
- /**
- * <i>Useful utility method. Fully implemented, no need to override.</i><br>
- * @return the password information for the primary subsystem of this
- * connector service. Assumes it has been set by the subsystem at the
- * time the subsystem acquires the connector service.
- */
- protected SystemSignonInformation getPasswordInformation() {
- return _passwordInfo;
- }
-
- /**
- * <i>Useful utility method. Fully implemented, no need to override.</i><br>
- * Sets the password information for this system's subsystem.
- * @param passwordInfo the password information object
- */
- protected void setPasswordInformation(SystemSignonInformation passwordInfo) {
- _passwordInfo = passwordInfo;
- if (passwordInfo != null) {
- _userId = passwordInfo.getUserid();
- }
- }
-
- /**
- * <i>Useful utility method. Fully implemented, no need to override.</i><br>
- * Set the password if you got it from somewhere
- * @param matchingUserId the user for which to set the password
- * @param password the password to set for this userid
- * @param persist true if the password is to be persisted as well
- */
- public void setPassword(String matchingUserId, String password, boolean persist) {
- if (getPrimarySubSystem().forceUserIdToUpperCase()) {
- matchingUserId = matchingUserId.toUpperCase();
- }
- SystemSignonInformation tempPasswordInfo = new SystemSignonInformation(getHostName(), matchingUserId, password, getHostType());
- setPasswordInformation(tempPasswordInfo);
- if (persist) { // if password should be persisted, then add to disk
- PasswordPersistenceManager.getInstance().add(tempPasswordInfo, true, true);
- } else { // otherwise, remove from both memory and disk
- String systemType = getHostType();
- String hostName = getHostName();
- PasswordPersistenceManager.getInstance().remove(systemType, hostName, _userId);
- }
- }
-
- /**
- * <i>Useful utility method. Fully implemented, no need to override.</i><br>
- * A convenience method, fully equivalent to <code>setPassword(matchingUserId, password, false)</code>
- * @param matchingUserId the user for which to set the password
- * @param password the password to set for this userid
- */
- public void setPassword(String matchingUserId, String password) {
- setPassword(matchingUserId, password, false);
- }
-
- /**
- * <i>Useful utility method. Fully implemented, no need to override.</i><br>
- * Should passwords be folded to uppercase?
- * By default, returns:
- * <pre><code>getSubSystem().forceUserIdToUpperCase()</code></pre>
- */
- protected boolean forcePasswordToUpperCase()
- {
- return getPrimarySubSystem().forceUserIdToUpperCase();
- }
-
- /**
- * <i>Useful utility method. Fully implemented, no need to override.</i><br>
- * Get the userId input validator to use in the password dialog prompt.
- * <p>
- * By default, returns </p>
- * <pre><code>getSubSystem().getParentSubSystemConfiguration().getUserIdValidator()</code></pre>
- */
- public ISystemValidator getUserIdValidator()
- {
- ISubSystemConfiguration ssFactory = getPrimarySubSystem().getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
-
- return adapter.getUserIdValidator(ssFactory);
- }
-
- /**
- * <i>Useful utility method. Fully implemented, no need to override.</i><br>
- * Get the password input validator to use in the password dialog prompt.
- * <p>
- * By default, returns:</p>
- * <pre><code>getSubSystem().getParentSubSystemConfiguration().getPasswordValidator()</code></pre>
- */
- public ISystemValidator getPasswordValidator()
- {
- ISubSystemConfiguration ssFactory = getPrimarySubSystem().getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
-
- return adapter.getPasswordValidator(ssFactory);
- }
- /**
- * <i>Optionally overridable, not implemented by default.</i><br>
- * Get the signon validator to use in the password dialog prompt.
- * By default, returns null.
- */
- public ISignonValidator getSignonValidator()
- {
- return null;
- }
-
-
- // ---------------------------------------------------
- // methods that must be overridden by child classes...
- // ---------------------------------------------------
-
-
- /**
- * This connection method wrappers the others (internal connect) so that registered subsystems
- * can be notified and initialized after a connect
- * Previous implementations that overrode this method should now change
- * their connect() method to internalConnect()
- */
- public final void connect(IProgressMonitor monitor) throws Exception
- {
- internalConnect(monitor);
- intializeSubSystems(monitor);
- }
-
- protected void intializeSubSystems(IProgressMonitor monitor)
- {
- for (int i = 0; i < _registeredSubSystems.size(); i++)
- {
- ISubSystem ss = (ISubSystem)_registeredSubSystems.get(i);
- ss.initializeSubSystem(monitor);
- }
- }
-
- protected void unintializeSubSystems(IProgressMonitor monitor)
- {
- for (int i = 0; i < _registeredSubSystems.size(); i++)
- {
- ISubSystem ss = (ISubSystem)_registeredSubSystems.get(i);
- ss.uninitializeSubSystem(monitor);
- }
- }
-
- /**
- * <i>You must override</i>
- * unless subsystem.getParentSubSystemConfiguration().supportsServerLaunchProperties
- * returns true.
- * <p>
- * Attempt to connect to the remote system.<br>
- * If the subsystem supports server launch,
- * the default behavior is to get the remote server launcher by
- * {@link #getRemoteServerLauncher()}, and if {@link IServerLauncher#isLaunched()}
- * returns false, to call {@link IServerLauncher#launch(IProgressMonitor)}.
- * <p>
- * This is called, by default, from the connect(...) methods of the subsystem.
- */
- protected void internalConnect(IProgressMonitor monitor) throws Exception
- {
- if (supportsServerLaunchProperties())
- {
- starter = getRemoteServerLauncher();
- starter.setSignonInformation(getPasswordInformation());
- starter.setServerLauncherProperties(getRemoteServerLauncherProperties());
- launchResult = null;
- if (!starter.isLaunched())
- {
- try {
- launchResult = starter.launch(monitor);
- } catch (Exception exc) {
- throw new java.lang.reflect.InvocationTargetException(exc);
- }
- }
- connectResult = null;
- try {
- connectResult = starter.connect(monitor, getConnectPort());
- } catch (Exception exc) {
- throw new java.lang.reflect.InvocationTargetException(exc);
- }
- }
- }
- /**
- * Return the port to use for connecting to the remote server, once it is running.
- * By default, this is the subsystem's port property, via {@link #getPort()}.
- * Override if appropriate.
- * <br> This is called by the default implementation of {@link #connect(IProgressMonitor)}, if
- * subsystem.getParentSubSystemConfiguration().supportsServerLaunchProperties() is true.
- */
- protected int getConnectPort()
- {
- return getPort();
- }
-
- /**
- * Disconnects from the remote system.
- * <p>
- * You must override
- * if <code>subsystem.getParentSubSystemConfiguration().supportsServerLaunchProperties</code>
- * returns false.
- * <p>
- * If the subsystem supports server launch
- * the default behavior is to use the same remote server
- * launcher created in <code>connect()</code> and call <code>disconnect()</code>.
- * <p>
- * This is called, by default, from the <code>disconnect()</code>
- * method of the subsystem.
- * @see IServerLauncher#disconnect()
- */
- public final void disconnect(IProgressMonitor monitor) throws Exception
- {
- internalDisconnect(monitor);
- unintializeSubSystems(monitor);
- clearPasswordCache();
- }
-
- public void internalDisconnect(IProgressMonitor monitor) throws Exception
- {
- if (supportsServerLaunchProperties() &&(starter != null))
- {
- try {
- starter.disconnect();
- starter = null; // for now, to be safe. Maybe we could optimize.
- } catch (Exception exc) {
- throw new java.lang.reflect.InvocationTargetException(exc);
- }
- }
- }
-
-
- // -----------------------------------------------------
- // Methods that should be overridden by child classes...
- // -----------------------------------------------------
- /**
- * Return the remote server launcher, which implements IServerLauncher.
- * This is called by the default implementation of connect() and disconnect(), if
- * subsystem.getParentSubSystemConfiguration().supportsServerLaunchProperties returns true.
- * <p>This returns null be default!
- */
- public IServerLauncher getRemoteServerLauncher()
- {
- return null;
- }
-
- /**
- * <i>Optionally override if you add any instance variables.</i><br>
- * The following is called whenever a system is redefined or disconnected.
- * Each subsystem needs to be informed so it can clear out any expansions, etc.
- * By default it does nothing. Override if you have an internal object that must be nulled out.
- */
- public void reset()
- {
- }
-
-
- /**
- * <i>Fully implemented, no need to override.</i><br>
- * @see IConnectorService#addCommunicationsListener(ICommunicationsListener)
- */
- public void addCommunicationsListener(ICommunicationsListener listener)
- {
- if (!commListeners.contains(listener)) {
- commListeners.add(listener);
- }
- }
-
- /**
- * <i>Fully implemented, no need to override.</i><br>
- * @see IConnectorService#removeCommunicationsListener(ICommunicationsListener)
- */
- public void removeCommunicationsListener(ICommunicationsListener listener)
- {
- commListeners.remove(listener);
- }
-
-
- /**
- * <i><b>Private</b> - used internally.</i><br>
- * Helper method for firing communication events
- */
- protected void fireCommunicationsEvent(int eventType)
- {
- CommunicationsEvent e = new CommunicationsEvent(this, eventType);
-
- Object[] items = commListeners.toArray();
-
- for (int loop=0; loop < items.length; loop++) {
- ((ICommunicationsListener) items[loop]).communicationsStateChange(e);
- }
-
- }
-
- /**
- * <i><b>Private</b> - used internally.</i><br>
- * Returns the count of active communication listeners (i.e. excludes
- * passive listeners.)
- */
- protected int getCommunicationListenerCount()
- {
- int count = 0;
- for (int i = 0; i < commListeners.size(); i++)
- {
- if (!((ICommunicationsListener) commListeners.get(i)).isPassiveCommunicationsListener())
- {
- count++;
- }
- }
-
- return count;
- }
- /**
- * <i><b>Private</b> - used internally.</i><br>
- */
- protected void clearCommunicationListeners()
- {
- commListeners.clear();
- }
-
- /**
- * Returns the suppressSignonPrompt flag. If this is set to true then the user
- * will not be prompted to signon, instead an InterruptedException will be thrown
- * by the promptForPassword method.
- *
- * @return boolean
- */
- public boolean isSuppressSignonPrompt()
- {
- return _suppressSignonPrompt;
- }
-
- /**
- * Sets the suppressSignonPrompt flag. Tool writers can use this to temporarily
- * disable the user from being prompted to signon. This would cause the promptForPassword
- * method to throw an InterruptedException instead of prompting. The intent of this
- * method is to allow tool writeres to prevent multiple signon prompts during a
- * set period of time (such as a series of related communication calls) if the user
- * cancels the first prompt. <b>It is the callers responsability to set this value
- * back to false when the tool no longer needs to suppress the signon prompt or all
- * other tools sharing this connection will be affected.</b>
- *
- * @param suppressSignonPrompt
- */
- public void setSuppressSignonPrompt(boolean suppressSignonPrompt)
- {
- _suppressSignonPrompt = suppressSignonPrompt;
- }
-
- // -------------------------
- // PRIVATE HELPER METHODS...
- // -------------------------
-// /**
-// * Call this method to identify specific server launch types that are not to be permitted.
-// * <p>
-// * You normally do not call this! Rather, your subsystem factory class will override
-// * {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}.
-// * However, this method is needed by ISVs that re-use predefined subsystem factories,
-// * and merely supply their own IConnectorService object via the "systemClass" attribute of the
-// * subsystemConfigurations extension point.
-// *
-// * @see org.eclipse.rse.core.subsystems.ServerLaunchType
-// */
-// protected void enableServerLaunchType(ISubSystem subsystem, ServerLaunchType serverLaunchType, boolean enable)
-// {
-// IServerLauncherProperties sl =getRemoteServerLauncherProperties();
-// if (sl instanceof RemoteServerLauncher)
-// {
-// RemoteServerLauncher isl = (RemoteServerLauncher)sl;
-// isl.enableServerLaunchType(serverLaunchType, enable);
-// }
-// }
- /**
- * This methods returns the enablement state per server launch type.
- * If {@link RemoteServerLauncher#enableServerLaunchType(ServerLaunchType, boolean)} has not been
- * called for this server launch type, then it is enabled by default.
- * @see org.eclipse.rse.core.subsystems.ServerLaunchType
- */
- protected boolean isEnabledServerLaunchType(ISubSystem subsystem, ServerLaunchType serverLaunchType)
- {
- IServerLauncherProperties sl = getRemoteServerLauncherProperties();
- if (sl instanceof RemoteServerLauncher)
- {
- RemoteServerLauncher isl = (RemoteServerLauncher)sl;
- return isl.isEnabledServerLaunchType(serverLaunchType);
- }
- else
- return subsystem.getSubSystemConfiguration().supportsServerLaunchType(serverLaunchType);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#notifyDisconnection()
- */
- public void notifyDisconnection()
- {
-
- // Fire comm event to signal state changed
- if (!isConnected()) fireCommunicationsEvent(CommunicationsEvent.AFTER_DISCONNECT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#notifyConnection()
- */
- public void notifyConnection()
- {
- if (isConnected()) fireCommunicationsEvent(CommunicationsEvent.AFTER_CONNECT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#notifyError()
- */
- public void notifyError()
- {
- fireCommunicationsEvent(CommunicationsEvent.CONNECTION_ERROR);
-
- }
-
-
- public void setPort(int port)
- {
- if (port != _port)
- {
- _port = port;
- setDirty(true);
- }
- }
-
- public int getPort()
- {
- return _port;
- }
-
- public boolean isUsingSSL()
- {
- return _usingSSL;
- }
-
- public void setIsUsingSSL(boolean flag)
- {
- if (_usingSSL != flag)
- {
- _usingSSL = flag;
- setDirty(true);
- }
- }
-
-
- public IServerLauncherProperties getRemoteServerLauncherProperties()
- {
- return _remoteServerLauncherProperties;
- }
-
-
- public void setRemoteServerLauncherProperties(IServerLauncherProperties newRemoteServerLauncher)
- {
- if (_remoteServerLauncherProperties != newRemoteServerLauncher)
- {
- _remoteServerLauncherProperties = newRemoteServerLauncher;
- setDirty(true);
- }
- }
-
- public boolean hasRemoteSearchLauncherProperties()
- {
- return _remoteServerLauncherProperties != null;
- }
-
- public boolean commit()
- {
- return RSEUIPlugin.getThePersistenceManager().commit(getHost());
- }
-
- private void logException(Throwable t) {
- Logger log = LoggerFactory.getLogger(RSEUIPlugin.getDefault());
- log.logError("Unexpected exception", t); //$NON-NLS-1$
- }
-
- 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(SystemBasePlugin.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
deleted file mode 100644
index abf334222..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import java.util.Hashtable;
-import java.util.Set;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.model.DummyHost;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This class is only needed if you need/want to support multiple
- * subsystems and want them to share a single {@link org.eclipse.rse.core.subsystems.IConnectorService IConnectorService} object per
- * system connection. This is the base system manager implementation
- * that returns the same IConnectorService object for all subsystems in the
- * same system connection, which implement a given interface.
- * <p>
- * For this to work all your subsystem classes that wish to share the
- * same IConnectorService object must implement a common interface of your choosing.
- * <p>
- * Another benefit of using this class or a subclass of it, is that whenever
- * the user changes the core properties for a single subsystem (port, userId)
- * then this manager is used to cascade that to all other subsystems in this
- * connection which share that same common interface. This means the user can change
- * these properties in any one subsystem, and they are changed in all related
- * subsystems magically. This is necessary because while these properties are
- * persisted in the subsystem object, they really belong to the IConnectorService object,
- * so when multiple subsystems share an IConnectorService object, changes to these properties
- * in one subsystem need to be cascaded to the other subsystems.
- * <p>
- * Because you only need a singleton of these class, the constructor is protected.
- * <p>
- * Your subclass <b>must supply</b> a method like the following:</p>
- * <pre><code>
- * public static MyConnectorServiceManager <b>getTheMyConnectorServiceManager</b>()
- * {
- * if (inst == null)
- * inst = new MyConnectorServiceManager();
- * return inst;
- * }
- * </code></pre>
- */
-public abstract class AbstractConnectorServiceManager implements IConnectorServiceManager
-{
-
-
- // we maintain a hashtable of hashtables. The first is keyed by SystemConnection.
- // The hashtable for each connection, maintains a list of IConnectorService objects keyed by
- // a unique interface class object supplied by the subclasses.
- private Hashtable systemConnectionRegistry = new Hashtable();
-
- /**
- * Protected constructor to ensure not instantiated this way.
- * Use subclass-supplied static method getTheSystemConfiguration() instead.
- */
- protected AbstractConnectorServiceManager()
- {
- }
-
- public void setConnectorService(IHost host, Class commonSSinterface, IConnectorService connectorService)
- {
- Hashtable connHT = (Hashtable)systemConnectionRegistry.get(host);
- if (connHT == null)
- {
- connHT = new Hashtable();
- systemConnectionRegistry.put(host, connHT);
- }
- // replaces any previous service here
- connHT.put(commonSSinterface, connectorService);
- }
-
- public IConnectorService getConnectorService(IHost host, Class commonSSinterface)
- {
- Hashtable connHT = (Hashtable)systemConnectionRegistry.get(host);
- if (connHT == null)
- {
- if (!(host instanceof DummyHost))
- {
- connHT = findConnHTForDummyHost(host);
- }
- if (connHT == null)
- {
- connHT = new Hashtable();
- systemConnectionRegistry.put(host, connHT);
- }
- }
- IConnectorService systemObject = (IConnectorService)connHT.get(commonSSinterface);
- if (systemObject == null)
- {
- systemObject = createConnectorService(host);
- connHT.put(commonSSinterface, systemObject);
- }
- else
- {
- IHost currentHost = systemObject.getHost();
- if (currentHost instanceof DummyHost && host != currentHost)
- {
- systemObject.setHost(host);
- }
- }
-
- return systemObject;
- }
-
- protected Hashtable findConnHTForDummyHost(IHost newHost)
- {
- Set keyset = systemConnectionRegistry.keySet();
- Object[] keys = keyset.toArray();
- for (int i = 0; i < keys.length; i++)
- {
- Object key = keys[i];
- if (key instanceof DummyHost)
- {
- IHost host = (IHost)key;
- if (host.getHostName().equals(newHost.getHostName()))
- {
- Hashtable table = (Hashtable)systemConnectionRegistry.remove(host);
- systemConnectionRegistry.put(newHost, table);
- return table;
- }
- }
- }
- return null;
- }
-
- /**
- * Return the actual IConnectorService object. Must be overridden by subclass.
- */
- public abstract IConnectorService createConnectorService(IHost host);
-
- /**
- * Given another subsystem, return true if that subsystem shares a single IConnectorService object
- * with this one. You must override this to return true if you recognize that subsystem
- * as one of your own. You are guaranteed the other subsystem will be from the same
- * SystemConnection as this one.
- * <p>
- * You can't assume a SystemConnection will only have subsystems that you created,
- * so you should only return true if it implements your interface or you know it is an
- * instance of your subsystem class.
- * <p>
- * This should simply return (otherSubSystem instanceof interface) where interface is
- * the same one returned from getSubSystemCommonInterface.
- */
- public abstract boolean sharesSystem(ISubSystem otherSubSystem);
-
- /**
- * For all subsystems in a particular SystemConnection, we need to know which
- * ones are to share a single IConnectorService object. To do this, we need a key which
- * is canonical for all subsystems in a given connection. This can be anything,
- * but is typically a unique interface that all subsystems supported a shared
- * IConnectorService object implement.
- * <p>
- * Whatever is returned from here is used as the key into a hashtable to find the
- * singleton IConnectorService object in getSystemObject.
- * <p>
- * @param subsystem - rarely used, but if you support multiple common interfaces then this will help you
- * decide which one to return.
- * @return a common, yet unique to you, interface that all your subsystems implement.
- */
- public abstract Class getSubSystemCommonInterface(ISubSystem subsystem);
-
- /**
- * <i>Internal use. Fully implemented, no need to override.</i><br>
- * Updates user-editable attributes of an existing subsystem instance.
- * The goal of this method is to intercept the request and forward it on to all our
- * subsystems in this SystemConnection, that share a single IConnectorService,
- * so we keep them all in synch in terms of these two properties used
- * by all ISystems.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#updateSubSystem(ISubSystem, boolean, String, boolean, int)
- */
- public void updateSubSystems(Shell shell, ISubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, int port)
- {
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- IHost conn = subsystem.getHost();
- ISubSystem[] subsystems = sr.getSubSystems(conn);
- if (subsystems != null)
- {
- for (int idx=0; idx<subsystems.length; idx++)
- {
- ISubSystem ss = subsystems[idx];
- if ( (ss != subsystem) && sharesSystem(ss) )
- {
- ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration();
- ssFactory.updateSubSystem(ss, updateUserId, userId, updatePort, port);
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractResource.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractResource.java
deleted file mode 100644
index 03c96c2d1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractResource.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-
-
-/**
- * This class can be used as the base class for model objects that represent
- * remote resources returned from the subsystem via resolveFilterStrings. Its
- * advantages are:
- * <ul>
- * <li>It already implements IAdaptable.
- * <li>It already maintains the reference to the owning subsystem, which simplifies action processing.
- * </ul>
- */
-public abstract class AbstractResource implements IAdaptable
-{
- private ISubSystem parentSubSystem;
-
- /**
- * Default constructor
- */
- public AbstractResource(ISubSystem parentSubSystem)
- {
- super();
- this.parentSubSystem = parentSubSystem;
- }
- /**
- * Constructor.
- * @see #setSubSystem(ISubSystem)
- */
- public AbstractResource()
- {
- super();
- }
-
- /**
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
- */
- public Object getAdapter(Class adapter)
- {
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- /**
- * Returns the parent SubSystem which produced this remote resource.
- * @return SubSystem
- */
- public ISubSystem getSubSystem()
- {
- return parentSubSystem;
- }
-
- /**
- * Resets the parent SubSystem.
- * @param parentSubSystem The parentSubSystem to set
- */
- public void setSubSystem(ISubSystem parentSubSystem)
- {
- this.parentSubSystem = parentSubSystem;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java
deleted file mode 100644
index 657c06208..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java
+++ /dev/null
@@ -1,478 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.rse.core.internal.subsystems.RemoteServerLauncherConstants;
-import org.eclipse.rse.core.internal.subsystems.ServerLauncher;
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IPropertyType;
-import org.eclipse.rse.core.model.PropertyType;
-import org.eclipse.rse.ui.SystemResources;
-
-
-/**
- * <!-- begin-user-doc -->
- * This subclass of {@link IServerLauncherProperties} is for use by some dstore-based subsystems, although
- * is possibly of value to vendors as well. The dstore-based subsystems use server code
- * written in Java, on top of the datastore technology. You can read about this in the
- * developer guide for Remote System Explorer. The bottom line, however, is we offer the
- * user a number of ways to start that remote server from the client, as well to connect
- * to it if it is already running. This class encapsulates the properties to support that.
- * <p>
- * Create instances via {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#createServerLauncher(IConnectorService)}
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.rse.core.subsystems.RemoteServerLauncher#getServerLaunchType <em>Server Launch Type</em>}</li>
- * <li>{@link org.eclipse.rse.core.subsystems.RemoteServerLauncher#getRexecPort <em>Rexec Port</em>}</li>
- * <li>{@link org.eclipse.rse.core.subsystems.RemoteServerLauncher#getDaemonPort <em>Daemon Port</em>}</li>
- * <li>{@link org.eclipse.rse.core.subsystems.RemoteServerLauncher#getServerPath <em>Server Path</em>}</li>
- * <li>{@link org.eclipse.rse.core.subsystems.RemoteServerLauncher#getServerScript <em>Server Script</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class RemoteServerLauncher extends ServerLauncher implements IRemoteServerLauncher
-{
-
- protected static final ServerLaunchType SERVER_LAUNCH_TYPE_EDEFAULT = ServerLaunchType.DAEMON_LITERAL;
-
- // proeprty set keys
- protected final String PROPERTY_SET_NAME = "Launcher Properties"; //$NON-NLS-1$
-
- protected final String KEY_DAEMON_PORT = "daemon.port"; //$NON-NLS-1$
- protected final String KEY_REXEC_PORT = "rexec.port"; //$NON-NLS-1$
- protected final String KEY_SERVER_LAUNCH_TYPE_NAME = "server.launch.type.name"; //$NON-NLS-1$
- protected final String KEY_SERVER_PATH = "server.path"; //$NON-NLS-1$
- protected final String KEY_SERVER_SCRIPT = "server.script"; //$NON-NLS-1$
- protected final String KEY_AUTODETECT_SSL = "autodetect.ssl"; //$NON-NLS-1$
-
-
- protected ServerLaunchType _serverLaunchType = SERVER_LAUNCH_TYPE_EDEFAULT;
-
- protected boolean _hasSetServerLaunchType = false;
-
- protected static final int REXEC_PORT_EDEFAULT = 512;
-
- protected int _rexecPort = REXEC_PORT_EDEFAULT;
-
- protected static final int DAEMON_PORT_EDEFAULT = 4035;
-
- protected int _daemonPort = DAEMON_PORT_EDEFAULT;
-
- protected static final String SERVER_PATH_EDEFAULT = null;
-
- protected String _serverPath = SERVER_PATH_EDEFAULT;
-
- protected static final String SERVER_SCRIPT_EDEFAULT = null;
-
- protected String _serverScript = SERVER_SCRIPT_EDEFAULT;
-
- protected static final String REMOTE_ATTRIBUTES_EDEFAULT = null;
-
- protected static final String RESTRICTED_TYPES_EDEFAULT = null;
-
- protected static final boolean AUTODETECT_SSL_EDEFAULT = true;
-
- protected boolean _autoDetectSSL = AUTODETECT_SSL_EDEFAULT;
-
- protected IPropertyType _serverLauncherEnumType;
-
- protected RemoteServerLauncher(String name, IConnectorService connectorService)
- {
- super(name, connectorService);
- }
-
- public IPropertyType getServerLauncherPropertyType()
- {
- if (_serverLauncherEnumType == null)
- {
- // for persistence
- List values = Arrays.asList(getSupportedLauncherEnumTypes());
- // DKM - only need supported types
- /// ServerLaunchType.VALUES;
-
- String[] enumValues = new String[values.size()];
- for (int i = 0; i < values.size(); i++)
- {
- ServerLaunchType type = (ServerLaunchType)values.get(i);
- enumValues[i] = type.getName();
- }
- _serverLauncherEnumType = PropertyType.getEnumPropertyType(enumValues);
- }
- return _serverLauncherEnumType;
- }
-
- protected ServerLaunchType[] getSupportedLauncherEnumTypes()
- {
- return new ServerLaunchType[]
- {
- ServerLaunchType.DAEMON_LITERAL,
- ServerLaunchType.REXEC_LITERAL,
- ServerLaunchType.RUNNING_LITERAL
- };
- }
-
- public void restoreFromProperties()
- {
- IPropertySet set = getPropertySet(PROPERTY_SET_NAME);
- if (set != null)
- {
- try
- {
- IProperty launchTypeProperty = set.getProperty(KEY_SERVER_LAUNCH_TYPE_NAME);
- launchTypeProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_MEANS_LABEL);
- String launchTypeName = launchTypeProperty.getValue();
- _serverLaunchType = ServerLaunchType.get(launchTypeName);
-
- IProperty daemonPortProperty = set.getProperty(KEY_DAEMON_PORT);
- boolean daemon = _serverLaunchType == null || _serverLaunchType.getType() == ServerLaunchType.DAEMON;
- daemonPortProperty.setEnabled(daemon);
- daemonPortProperty.setLabel(SystemResources.RESID_CONNECTION_DAEMON_PORT_LABEL);
-
- _daemonPort = Integer.parseInt(daemonPortProperty.getValue());
-
- IProperty autoDetectProperty = set.getProperty(KEY_AUTODETECT_SSL);
- if (autoDetectProperty != null)
- {
- boolean autoDetect = _serverLaunchType == null || _serverLaunchType.getType() == ServerLaunchType.REXEC;
- autoDetectProperty.setEnabled(autoDetect);
- autoDetectProperty.setLabel(SystemResources.RESID_SUBSYSTEM_AUTODETECT_LABEL);
-
- _autoDetectSSL = Boolean.getBoolean(autoDetectProperty.getValue());
- }
-
- boolean usingRexec = _serverLaunchType != null && _serverLaunchType.getType() == ServerLaunchType.REXEC;
- IProperty rexecPortProperty = set.getProperty(KEY_REXEC_PORT);
- rexecPortProperty.setEnabled(usingRexec);
- rexecPortProperty.setLabel(SystemResources.RESID_CONNECTION_PORT_LABEL);
-
- _rexecPort = Integer.parseInt(rexecPortProperty.getValue());
-
- IProperty serverPathProperty = set.getProperty(KEY_SERVER_PATH);
- serverPathProperty.setEnabled(usingRexec);
- serverPathProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_PATH);
- _serverPath = serverPathProperty.getValue();
-
- IProperty serverScriptProperty = set.getProperty(KEY_SERVER_SCRIPT);
- serverScriptProperty.setEnabled(usingRexec);
- serverScriptProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_INVOCATION);
- _serverScript = serverScriptProperty.getValue();
-
- _hasSetServerLaunchType = true;
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- public void saveToProperties()
- {
- IPropertySet set = getPropertySet(PROPERTY_SET_NAME);
- if (set == null)
- {
- set = createPropertySet(PROPERTY_SET_NAME, getDescription());
- }
-
- if (_serverLaunchType == null)
- _serverLaunchType = ServerLaunchType.get(ServerLaunchType.DAEMON);
- IProperty launchTypeProperty = set.addProperty(KEY_SERVER_LAUNCH_TYPE_NAME, _serverLaunchType.getName(), getServerLauncherPropertyType());
- launchTypeProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_MEANS_LABEL);
-
- IProperty daemonPortProperty = set.addProperty(KEY_DAEMON_PORT, ""+_daemonPort, PropertyType.getIntegerPropertyType()); //$NON-NLS-1$
- daemonPortProperty.setEnabled(_serverLaunchType.getType() == ServerLaunchType.DAEMON);
- daemonPortProperty.setLabel(SystemResources.RESID_CONNECTION_DAEMON_PORT_LABEL);
-
- IProperty rexecPortProperty = set.addProperty(KEY_REXEC_PORT, ""+_rexecPort, PropertyType.getIntegerPropertyType()); //$NON-NLS-1$
- boolean usingRexec = _serverLaunchType.getType() == ServerLaunchType.REXEC;
- rexecPortProperty.setEnabled(usingRexec);
- rexecPortProperty.setLabel(SystemResources.RESID_CONNECTION_PORT_LABEL);
-
- IProperty autoDetectSSLProperty = set.addProperty(KEY_AUTODETECT_SSL, ""+_autoDetectSSL, PropertyType.getBooleanPropertyType()); //$NON-NLS-1$
- autoDetectSSLProperty.setEnabled(usingRexec);
- autoDetectSSLProperty.setLabel(SystemResources.RESID_SUBSYSTEM_AUTODETECT_LABEL);
-
- IProperty serverPathProperty = set.addProperty(KEY_SERVER_PATH, ""+_serverPath); //$NON-NLS-1$
- serverPathProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_PATH);
- serverPathProperty.setEnabled(usingRexec);
-
- IProperty serverScriptProperty = set.addProperty(KEY_SERVER_SCRIPT, ""+_serverScript); //$NON-NLS-1$
- serverScriptProperty.setEnabled(usingRexec);
- serverScriptProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_INVOCATION);
- }
-
-
- /**
- * Clone the contents of this server launcher into the given server launcher
- * <i>Your sublcass must override this if you add additional attributes! Be sure
- * to call super.cloneServerLauncher(newOne) first.</i>
- * @return the given new server launcher, for convenience.
- */
- public IServerLauncherProperties cloneServerLauncher(IServerLauncherProperties newOne)
- {
- super.cloneServerLauncher(newOne);
- IRemoteServerLauncher remoteNewOne = (IRemoteServerLauncher)newOne;
- remoteNewOne.addPropertySets(getPropertySets());
- remoteNewOne.setDaemonPort(getDaemonPort());
- remoteNewOne.setRexecPort(getRexecPort());
- remoteNewOne.setServerLaunchType(getServerLaunchTypeGen());
- remoteNewOne.setServerPath(getServerPath());
- remoteNewOne.setServerScript(getServerScript());
- remoteNewOne.setAutoDetectSSL(getAutoDetectSSL());
- return remoteNewOne;
- }
-
- /**
- * <!-- begin-user-doc -->
- * This is the means by which to start the server-side code, as specified by the user, typically.
- * <!-- end-user-doc -->
- */
- public ServerLaunchType getServerLaunchType()
- {
- if (!isSetServerLaunchType())
- {
- if (isEnabledServerLaunchType(ServerLaunchType.DAEMON_LITERAL))
- return ServerLaunchType.DAEMON_LITERAL;
- else if (isEnabledServerLaunchType(ServerLaunchType.REXEC_LITERAL))
- return ServerLaunchType.REXEC_LITERAL;
- else if (isEnabledServerLaunchType(ServerLaunchType.RUNNING_LITERAL))
- return ServerLaunchType.RUNNING_LITERAL;
- else if (isEnabledServerLaunchType(ServerLaunchType.TELNET_LITERAL))
- return ServerLaunchType.TELNET_LITERAL;
- else if (isEnabledServerLaunchType(ServerLaunchType.SSH_LITERAL))
- return ServerLaunchType.SSH_LITERAL;
- else if (isEnabledServerLaunchType(ServerLaunchType.FTP_LITERAL))
- return ServerLaunchType.FTP_LITERAL;
- else
- return ServerLaunchType.HTTP_LITERAL;
- }
- return _serverLaunchType;
- }
- /**
- * <!-- begin-user-doc -->
- * Generated. Do not call or use.
- * <!-- end-user-doc -->
- * @generated
- */
- public ServerLaunchType getServerLaunchTypeGen()
- {
- return _serverLaunchType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * This is the means by which to start the server-side code, as specified by the user, typically.
- * It is one of the constants in the enumeration class {@link org.eclipse.rse.core.subsystems.ServerLaunchType}
- * <!-- end-user-doc -->
- * @generated
- */
- public void setServerLaunchType(ServerLaunchType newServerLaunchType)
- {
- ServerLaunchType oldServerLaunchType = _serverLaunchType;
- if (oldServerLaunchType != newServerLaunchType)
- {
- _serverLaunchType = newServerLaunchType == null ? SERVER_LAUNCH_TYPE_EDEFAULT : newServerLaunchType;
- _hasSetServerLaunchType = true;
- setDirty(true);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetServerLaunchType()
- {
- return _hasSetServerLaunchType;
- }
-
- /**
- * Return the port used for the REXEC option, as an Integer
- */
- public int getRexecPort()
- {
- return _rexecPort;
- }
- /**
- * Set the REXEC port value, as an int
- */
- public void setRexecPort(int newRexecPort)
- {
- if (newRexecPort != _rexecPort)
- {
- _rexecPort = newRexecPort;
- setDirty(true);
- }
- }
-
- /**
- * Return the whether or not to auto-detect SSL
- */
- public boolean getAutoDetectSSL()
- {
- return _autoDetectSSL;
- }
- /**
- * Sets whether or not to auto-detect SSL
- */
- public void setAutoDetectSSL(boolean auto)
- {
- if (auto != _autoDetectSSL)
- {
- _autoDetectSSL = auto;
- setDirty(true);
- }
- }
-
- /**
- * Return the port used for the DAEMON option, as an Integer
- */
- public int getDaemonPort()
- {
- return _daemonPort;
- }
- /**
- * Set the DAEMON port value, as an int
- */
- public void setDaemonPort(int newDaemonPort)
- {
- if (_daemonPort != newDaemonPort)
- {
- _daemonPort = newDaemonPort;
- setDirty(true);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * The path where the server lives on the remote system. Used by at least the REXEC server launch type.
- * Will be null if not set.
- * <!-- end-user-doc -->
- */
- public String getServerPath()
- {
- String serverPath = _serverPath;
- if ((serverPath == null) || (serverPath.length() == 0))
- {
- serverPath = RemoteServerLauncherConstants.DEFAULT_REXEC_PATH;
- }
- return serverPath;
- }
- /**
- * <!-- begin-user-doc -->
- * The path where the server lives on the remote system. Used by at least the REXEC server launch type.
- * <!-- end-user-doc -->
- * @generated
- */
- public void setServerPath(String newServerPath)
- {
- String oldServerPath = _serverPath;
- if (oldServerPath == null || !oldServerPath.equals(newServerPath))
- {
- _serverPath = newServerPath;
- setDirty(true);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * The script to run on the remote system, to start the server code.
- * <!-- end-user-doc -->
- */
- public String getServerScript()
- {
- String serverScript = _serverScript;
-
- if ((serverScript == null) || (serverScript.length() == 0))
- {
- serverScript = "server." + getConnectorService().getHost().getSystemType().toLowerCase(); //$NON-NLS-1$
- }
-
- return serverScript;
- }
-
-
- public void setServerScript(String newServerScript)
- {
- String oldServerScript = _serverScript;
- if (oldServerScript != newServerScript)
- {
- _serverScript = newServerScript;
- setDirty(true);
- }
- }
-
- /**
- * This methods returns the enablement state per server launch type.
- * If {@link #enableServerLaunchType(ServerLaunchType,boolean)} has not been
- * called for this server launch type, then we defer to the subsystem factory's
- * method:
- * {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}.
- * @see org.eclipse.rse.core.subsystems.ServerLaunchType
- */
- public boolean isEnabledServerLaunchType(ServerLaunchType serverLaunchType)
- {
- IPropertySet set = getPropertySet("restrictedTypes"); //$NON-NLS-1$
- if (set != null)
- {
- String value = set.getPropertyValue(serverLaunchType.getName());
- if (value != null)
- {
- return value.equals("true"); //$NON-NLS-1$
- }
- }
-
- ISubSystem primarySS = getConnectorService().getPrimarySubSystem();
- if (primarySS != null)
- {
- return primarySS.getSubSystemConfiguration().supportsServerLaunchType(serverLaunchType);
-
- }
- return true;
- }
-
-
-
-
- /**
- * @deprecated
- */
- public void setRestrictedType(String attributeName, String attributeValue)
- {
- IPropertySet set = getPropertySet("restrictedTypes"); //$NON-NLS-1$
- if (set == null)
- {
- set = createPropertySet("restrictedTypes", getDescription()); //$NON-NLS-1$
- }
- set.addProperty(attributeName, attributeValue);
- }
-
- public void enableServerLaunchType(ServerLaunchType serverLaunchType, boolean enable) {
- // TODO Auto-generated method stubS
-
- }
-
-} //RemoteServerLauncherImpl \ No newline at end of file
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
deleted file mode 100644
index bbde81562..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java
+++ /dev/null
@@ -1,3329 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and Wind River Systems, Inc. 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:
- * Martin Oberhuber (Wind River) - 141803: Fix cpu usage 100% while connecting
- *
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-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.SystemPreferencesManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-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.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-/**
- * This class is designed to be subclassed. Its role is three-fold:
- * <ol>
- * <li>Storing of tool-specific persistent properties per connection.
- * <li>Accessing of an IConnectorService object to enable the subsystem's connect and disconnect actions.
- * <li>Doing actual remote accessing. This usually just involves overriding the <code>internalResolveFilterString</code> methods to
- * populate the remote resources shown when the subsystem's filters are expanded.
- * </ol>
- * <p>
- * This is the base class that subsystem suppliers subclass.
- * Each instance of this class represents a subsystem instance for a particular connection.
- * <p>
- * When a {@link IHost} is created, this subsystem's factory will be asked to create an
- * instance of its subsystem. If desired, your GUI may also allow users to create additional
- * instances.
- * <p>
- * There are only a handleful of methods to implement in child classes (and indeed most of these
- * are supplied as empty, so you only override those you want to support).
- * These are required:
- * <ul>
- * <li>{@link #getConnectorService()}.
- * </ul>
- * These are optional:
- * <ul>
- * <li>{@link #getObjectWithAbsoluteName(String)}
- * <li>{@link #internalResolveFilterString(IProgressMonitor monitor, String filterString)}
- * <li>{@link #internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)}
- * <li>{@link #internalGetProperty(IProgressMonitor monitor, Object subject, String key)}
- * <li>{@link #internalSetProperty(IProgressMonitor monitor, Object subject, String key, String value)}
- * <li>{@link #internalGetProperties(IProgressMonitor monitor, Object subject, String[] keys)}
- * <li>{@link #internalSetProperties(IProgressMonitor monitor, Object subject, String[] keys, String[] values)}
- * </ul>
- *
- */
-
-public abstract class SubSystem extends RSEModelObject implements IAdaptable, ISystemFilterPoolReferenceManagerProvider, ISystemResourceChangeEvents, ISubSystem
-{
-
-
- protected static final String SUBSYSTEM_FILE_NAME = "subsystem"; //$NON-NLS-1$
-
- //protected transient SubSystemConfiguration parentFactory = null;
- protected static final int OPERATION_RESOLVE_ABSOLUTE = 0;
- protected static final int OPERATION_RESOLVE_ABSOLUTES= 1;
- protected static final int OPERATION_RESOLVE_RELATIVE = 2;
- protected static final int OPERATION_RUN_COMMAND = 3;
- protected static final int OPERATION_GET_PROPERTY = 4;
- protected static final int OPERATION_SET_PROPERTY = 5;
- protected static final int OPERATION_GET_PROPERTIES = 6;
- protected static final int OPERATION_SET_PROPERTIES = 7;
- protected static final int OPERATION_CONNECT = 8;
- protected static final int OPERATION_DISCONNECT = 9;
- protected static final int OPERATION_RUN_SHELL = 10;
- protected static final int OPERATION_SEND_COMMAND_TO_SHELL = 11;
- protected static final int OPERATION_CANCEL_SHELL = 12;
- protected static final int OPERATION_REMOVE_SHELL = 13;
-
- protected ISubSystemConfiguration parentSubSystemConfiguration;
- protected String previousUserIdKey;
-
- protected Shell shell = null;
- protected boolean supportsConnecting = true;
- protected boolean sortResults = true;
- protected boolean runInThread = true;
-
- protected boolean cancelable = true;
- protected boolean doConnection = false;
- protected ProgressMonitorDialog pmDialog;
- protected String saveFileName;
- protected IConnectorService _connectorService = null;
-
- protected boolean _connectionError = false;
- protected boolean _disconnecting = false;
-
- protected IHost _host;
-
-
- protected String _name = null;
- protected String _subsystemConfigurationId = null;
- protected boolean _hidden = false;
-
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected ISystemFilterPoolReferenceManager filterPoolReferenceManager = null;
-
- private class NullRunnableContext implements IRunnableContext {
- public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- IProgressMonitor monitor = new NullProgressMonitor();
- runnable.run(monitor);
- }
- }
-
-
- public class SystemMessageDialogRunnable implements Runnable
- {
- private SystemMessageDialog _dlg;
- public SystemMessageDialogRunnable(SystemMessageDialog dlg)
- {
- _dlg = dlg;
- }
-
- public void run()
- {
- _dlg.open();
- }
- }
-
- protected SubSystem(IHost host, IConnectorService connectorService)
- {
- super();
- _host = host;
- _connectorService = connectorService;
- _connectorService.registerSubSystem(this);
- }
-
- /**
- * Internal method to select the appropriate command subsystem when there are multiple defined for this connection.
- * The default implementation is to return the first, but child classes can refine this. Input is always an array of
- * length greater than one.
- */
- protected ISubSystem selectCommandSubSystem(ISubSystem[] allCmdSubSystems)
- {
- if (allCmdSubSystems != null && allCmdSubSystems.length > 0)
- return allCmdSubSystems[0];
- return null;
- }
-
- /**
- * Return the parent subsystem factory that owns this subsystem.
- */
- public ISubSystemConfiguration getSubSystemConfiguration()
- {
- return parentSubSystemConfiguration;
- }
- /**
- * Return the parent subsystem factory that owns this subsystem.
- */
- public void setSubSystemConfiguration(ISubSystemConfiguration ssf)
- {
- parentSubSystemConfiguration = ssf;
- supportsConnecting = ssf.supportsSubSystemConnect();
- //System.out.println("subsystem supports connecting? " + supportsConnecting);
- }
- /**
- * Set the parent connection that owns this subsystem.
- */
- public void setHost(IHost conn)
- {
- _host = conn;
- previousUserIdKey = getPreferencesKey();
- }
-
- /**
- * Return true if userId and password should be forced to uppercase.
- * INTERACTIVEcut to calling same method in parent connection.
- */
- public boolean forceUserIdToUpperCase()
- {
- /* defect 43219
- if (parentSubSystemConfiguration != null)
- return parentSubSystemConfiguration.forceUserIdToUpperCase();
- else
- return true;
- */
- IHost currConn = getHost();
- if (currConn != null)
- return currConn.getForceUserIdToUpperCase();
- else
- return false;
- }
-
- /**
- * The profile is being renamed, so we are called to do our thing with
- * any information stored that is keyed by the profile name.
- * <p>
- * This is called AFTER the profile is renamed!
- */
- public void renamingProfile(String oldName, String newName)
- {
- String userIdValue = null;
- if (previousUserIdKey!=null)
- userIdValue = getLocalUserId(previousUserIdKey);
- // if the userId attribute held a preference store key of the form profileName.connectionName.subsystemName,
- // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
- // value (the actual user id) the old keyed entry held.
- String newKey = getPreferencesKey(newName, getHostAliasName());
- if ((userIdValue != null) && (userIdValue.length()>0))
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- prefMgr.clearUserId(previousUserIdKey);
- prefMgr.setUserId(newKey, userIdValue); // store old value with new preference key
- }
- previousUserIdKey = newKey;
-
- // now we need to potentially rename any filter pool associated with this connection...
- ISystemProfile profile = getSystemProfile();
- ISystemFilterPoolManager mgr = getSubSystemConfiguration().getFilterPoolManager(profile);
- ISystemFilterPool[] pools = mgr.getSystemFilterPools();
- boolean done = false;
- if (pools != null)
- {
- for (int idx = 0; !done && (idx < pools.length); idx++)
- {
- if ( (pools[idx].getOwningParentName()!=null) && // a connection-related pool
- (pools[idx].getOwningParentName().equals(getHostAliasName())) ) // this connection!
- {
- done = true;
- try
- {
- // re-gen name: %1 Filter Pool for connection %2, where %1 is profile name...
- mgr.renameSystemFilterPool(pools[idx], getConnectionOwnedFilterPoolName(newName, getHostAliasName()));
- }
- catch (Exception exc)
- {
- String msg = "Unexpected error renaming connection-specific filter pool " + getConnectionOwnedFilterPoolName(newName, getHostAliasName()); //$NON-NLS-1$
- SystemBasePlugin.logError(msg, exc);
- System.err.println(msg + ": " + exc); //$NON-NLS-1$
- }
- }
- }
- }
- }
- /**
- * The connection is being renamed, so we are called to do our thing with
- * any information stored that is keyed by the connection name.
- */
- public void renamingConnection(String newName)
- {
- String userIdValue = null;
- if (previousUserIdKey != null)
- userIdValue = getLocalUserId(previousUserIdKey); // see if we previous stored a value for this connection
- // if the userId attribute held a preference store key of the form profileName.connectionName.subsystemName,
- // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
- // value (the actual user id) the old keyed entry held.
- String newKey = getPreferencesKey(getSystemProfileName(), newName);
- if ((userIdValue != null) && (userIdValue.length()>0))
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- prefMgr.clearUserId(previousUserIdKey);
- prefMgr.setUserId(newKey, userIdValue); // store old value with new preference key
- }
- previousUserIdKey = newKey;
-
- // rename the connection-private filter pool, if it exists:
- ISystemFilterPool privatePool = getConnectionPrivateFilterPool(false); // false => don't create if not found
- if (privatePool != null)
- {
- ISystemFilterPoolManager mgr = getSubSystemConfiguration().getFilterPoolManager(getSystemProfile());
- privatePool.setOwningParentName(newName);
- try {
- mgr.renameSystemFilterPool(privatePool, getConnectionOwnedFilterPoolName(getSystemProfileName(), newName));
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error renaming conection-private pool to: "+newName, exc); //$NON-NLS-1$
- }
- }
- }
- /**
- * Private method called when the parent connection is being deleted, so
- * the subsystem can do any pre-death cleanup it needs to.
- * <p>
- * What we need to do is delete our entry in the preference store for our userId.
- */
- public void deletingConnection()
- {
- String oldUserId = null;
- if (previousUserIdKey != null)
- oldUserId = getLocalUserId(previousUserIdKey);
- // if the userId attribute held a preference store key of the form profileName.connectionName.subsystemName,
- // we have to delete that key entry from the preference store and re-gen a new keyed entry with the same
- // value (the actual user id) the old keyed entry held.
- if (oldUserId != null)
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- prefMgr.clearUserId(previousUserIdKey);
- }
- // delete the connection-private filter pool, if it exists:
- ISystemFilterPool privatePool = getConnectionPrivateFilterPool(false); // false => don't create if not found
- if (privatePool != null)
- {
- ISystemFilterPoolManager mgr = getSubSystemConfiguration().getFilterPoolManager(getSystemProfile());
- try {
- mgr.deleteSystemFilterPool(privatePool);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error deleting conection-private pool for: "+getHostAliasName(), exc); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Returns the value of this subsystem's local user id if it is not null. If it
- * is null, it returns the parent connection object's default user Id. It in turn
- * queries the preferences if its local value is null.
- * <p>
- * In fact, we now don't store the user Id in the subsystem object itself, but rather store it in the
- * user preferences, so that such things are not shared among the team on a synchronize operation.
- * This is transparent to callers of this method however, as this method resolves from the preferences.
- *
- * @see org.eclipse.rse.core.model.IHost#getDefaultUserId()
- * @see #getLocalUserId()
- * @see #clearLocalUserId()
- * @return The value of the UserId attribute
- */
- public String getUserId()
- {
- String uid = getLocalUserId();
- if ((uid == null) || (uid.length()==0))
- {
- IHost conn = getHost();
- uid = conn.getDefaultUserId();
- }
- return uid;
- }
-
- /**
- * Helper method to return preference manager
- */
- protected SystemPreferencesManager getPreferencesManager()
- {
- return SystemPreferencesManager.getPreferencesManager();
- }
-
- /**
- * Helper method to compute a unique name for a given subsystem instance
- */
- protected String getPreferencesKey()
- {
- if ((_host==null) || (getName()==null))
- return null;
- return getPreferencesKey(getSystemProfileName(), getHostAliasName());
- }
- /**
- * Helper method to compute a unique name for a given subsystem instance, given a profile and connection name
- */
- protected String getPreferencesKey(String profileName, String connectionName)
- {
- String key = profileName + "." + connectionName + "." + getName(); //$NON-NLS-1$ //$NON-NLS-2$
- //System.out.println("in SubSystemImpl.getPreferencesKey(): Subsystem key name: " + key);
- return key;
- }
-
- /**
- * Internal-use method for getting the local user ID, without resolution.
- */
- protected String getLocalUserId(String key)
- {
- String uid = null;
- if ((key!=null) && (key.length()>0))
- {
- SystemPreferencesManager prefMgr = getPreferencesManager();
- uid = prefMgr.getUserId(key); // resolve from preferences
- }
- return uid;
- }
-
- /**
- * Alternative to getUserId when we don't want to resolve it from parent connection.
- * This is used when showing the properties.
- * <p>
- * Unlike getUserId() this one does not defer to the connection's default user Id if
- * the subsystem's userId attribute is null.
- * <p>
- * To set the local user Id, simply call setUserId(String id). To clear it, call
- * {@link #clearLocalUserId()}.
- * <p>
- * @see org.eclipse.rse.core.model.IHost#getDefaultUserId()
- * @see #clearLocalUserId()
- * @see #getUserId()
- */
- public String getLocalUserId()
- {
- return getLocalUserId(getPreferencesKey());
- }
-
- /**
- * Called to clear the local user Id such that subsequent requests to getUserId() will
- * return the parent connection's default user Id. Sets the user Id attribute for this
- * subsystem to null.
- * <p>
- * @see org.eclipse.rse.core.model.IHost#getDefaultUserId()
- * @see #getUserId()
- * @see #getLocalUserId()
- */
- public void clearLocalUserId()
- {
- if (previousUserIdKey != null)
- getPreferencesManager().clearUserId(previousUserIdKey);
- IConnectorService system = getConnectorService();
- if (system != null)
- system.clearUserIdCache();
- }
-
- /**
- * This is a helper method you can call when performing actions that must be certain there
- * is a connection. If there is no connection it will attempt to connect, and if that fails
- * will throw a SystemMessageException you can easily display to the user by using a method
- * in it.
- */
- public void checkIsConnected() throws SystemMessageException
- {
- if (!isConnected())
- {
- try
- {
- Display display = Display.getCurrent();
- if (display != null)
- {
- // deduce active shell from display
- Shell shell = display.getActiveShell();
- if (shell != null && !shell.isDisposed())
- {
- connect();
- }
- else
- {
- connect();
- }
- }
- else
- {
- // Not on UI-thread
- connect();
- }
- }
- catch (Exception e)
- {
- if (e instanceof SystemMessageException)
- {
- throw (SystemMessageException) e;
- }
- else
- if (e instanceof InterruptedException)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED);
- msg.makeSubstitution(getHost().getAliasName());
- throw new SystemMessageException(msg);
- }
- else
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED);
- throw new SystemMessageException(msg);
- }
- }
- }
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- * <p>
- * By default this returns Platform.getAdapterManager().getAdapter(this, adapterType);
- * This in turn results in the default subsystem adapter SystemViewSubSystemAdapter,
- * in package org.eclipse.rse.ui.view.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Return the system profile object this subsystem is associated with.
- */
- public ISystemProfile getSystemProfile()
- {
- if (_host != null)
- return _host.getSystemProfile();
- else
- return null;
- }
-
- /**
- * Return the name of system profile object this subsystem is associated with.
- */
- public String getSystemProfileName()
- {
- ISystemProfile profile = getSystemProfile();
- if (profile != null)
- return profile.getName();
- else
- return null;
- }
-
- /**
- * Return the connection object this subsystem is associated with.
- */
- public IHost getHost()
- {
- return _host;
- }
-
- /**
- * Return the name of system connection object this subsystem is associated with.
- */
- public String getHostAliasName()
- {
- IHost connection = getHost();
- if (connection != null)
- return connection.getAliasName();
- else
- return null;
- }
-
- /**
- * Return the owning filter pool that is unique to this provider.
- * From SystemFilterPoolReferenceManagerProvider interface. We map to
- * a call to {@link #getConnectionPrivateFilterPool(boolean)}.
- */
- public ISystemFilterPool getUniqueOwningSystemFilterPool(boolean createIfNotFound)
- {
- return getConnectionPrivateFilterPool(createIfNotFound);
- }
-
- /**
- * Find or create a new filter pool, unique to this subsystem's connection. This will be
- * in the same profile as the connection and it will follow a naming convention that ties
- * it to the connection.
- * @param createIfNotFound - true to create the pool if it doesn't exist
- * @return the filter pool that was found or created
- */
- public ISystemFilterPool getConnectionPrivateFilterPool(boolean createIfNotFound) {
- ISystemFilterPool pool = null;
- ISubSystemConfiguration config = getSubSystemConfiguration();
- ISystemProfile profile = getSystemProfile();
- ISystemFilterPoolManager fpm = config.getFilterPoolManager(profile);
- ISystemFilterPool[] allPoolsInProfile = fpm.getSystemFilterPools();
- IHost host = getHost();
- String hostName = host.getAliasName();
- if (allPoolsInProfile != null) {
- for (int idx = 0; idx < allPoolsInProfile.length; idx++) {
- String poolOwnerName = allPoolsInProfile[idx].getOwningParentName();
- if ((poolOwnerName != null) && (poolOwnerName.equals(hostName))) {
- pool = allPoolsInProfile[idx];
- }
- }
- }
- if ((pool == null) && createIfNotFound) {
- try {
- String profileName = profile.getName();
- pool = fpm.createSystemFilterPool(getConnectionOwnedFilterPoolName(profileName, hostName), true); // true=>is deletable by user
- if (pool != null) {
- pool.setNonRenamable(true);
- pool.setOwningParentName(hostName);
- pool.commit();
- ISystemFilterPoolReferenceManager fprm = getSystemFilterPoolReferenceManager();
- if (fprm.getReferenceToSystemFilterPool(pool) == null) {
- fprm.addReferenceToSystemFilterPool(pool);
- }
- }
- } catch (Exception exc) {
- SystemBasePlugin.logError("Error creating connection-private filter pool for connection: " + hostName, exc); //$NON-NLS-1$
- }
- }
- return pool;
- }
-
- /**
- * Constructs the name of a connection specific filter pool from its parts.
- * @param profileName the name of the profile that contains this filter pool.
- * @param connectionName the name of the connection the "owns" this filter pool.
- * @return the name for the connection-owned filter pool.
- */
- public String getConnectionOwnedFilterPoolName(String profileName, String connectionName) {
- /*
- * Need to keep this name short and not translatable
- * since it names a team sharable resource. Not qualified by the profile
- * name since that is implicit by being in a profile.
- */
- String name = "CN-" + connectionName; //$NON-NLS-1$
- return name;
- }
-
- // -------------------------
- // Filter Testing Methods...
- // -------------------------
- /**
- * Override this method if you support typed filters. Given an absolute remote object name,
- * you can test if this filter's type matches that of the remote object. This is called as
- * a pre-test in the following methods.
- */
- protected boolean doesFilterTypeMatch(ISystemFilter filter, String remoteObjectAbsoluteName)
- {
- return true;
- }
-
- /**
- * Return true if the given filter lists the contents of the given remote object.
- * For example, if given a folder, return true if any of the filter strings in this filter
- * lists the contents of that folder. Used in impact analysis when a remote object is
- * created, deleted, renamed, copied or moved, so as to establish which filters need to be
- * refreshed or collapsed (if the folder is deleted, say).
- * <p>
- * Subclasses do not need to override this method. Rather, this method walks each
- * filter string and calls doesFilterStringListContentsOf(...), and that is the method
- * that child classes must override.
- */
- public boolean doesFilterListContentsOf(ISystemFilter filter, String remoteObjectAbsoluteName)
- {
- if (filter.isPromptable()) // || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName))
- return false;
- boolean would = false;
- ISystemFilterString[] strings = filter.getSystemFilterStrings();
- if (strings != null)
- for (int idx=0; !would && (idx<strings.length); idx++)
- would = doesFilterStringListContentsOf(strings[idx], remoteObjectAbsoluteName);
- return would;
- }
- /**
- * Return true if the given filter string lists the contents of the given remote object.
- * For example, if given a folder, return true if the given filter string
- * lists the contents of that folder. Used in impact analysis when a remote object is
- * created, deleted, renamed, copied or moved, so as to establish which filters need to be
- * refreshed or collapsed (if the folder is deleted, say).
- * <p>
- * This should only return true if the filter string directly lists the contents of the given
- * object, versus indirectly.
- * <p>
- * Subclasses should override this.
- */
- public boolean doesFilterStringListContentsOf(ISystemFilterString filterString, String remoteObjectAbsoluteName)
- {
- return false;
- }
-
- /**
- * Return true if the given remote object name will pass the filtering criteria for any of
- * the filter strings in this filter.
- * <p>
- * Subclasses do not need to override this method. Rather, this method walks each
- * filter string and calls doesFilterStringMatch(...), and that is the method
- * that child classes must override.
- */
- public boolean doesFilterMatch(ISystemFilter filter, String remoteObjectAbsoluteName)
- {
- if (filter.isPromptable() || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName))
- return false;
- boolean would = false;
-
- String[] strings = filter.getFilterStrings();
- if (strings != null)
- {
- for (int idx=0; !would && (idx<strings.length); idx++)
- {
- if (strings[idx].equals("*")) //$NON-NLS-1$
- would = true;
- else if (strings[idx].equals("./*")) //$NON-NLS-1$
- would = true;
- else
- would = doesFilterStringMatch(strings[idx], remoteObjectAbsoluteName, filter.areStringsCaseSensitive());
- }
- }
- return would;
- }
- /**
- * Return true if the given remote object name will pass the filtering criteria for
- * the given filter string.
- * <p>
- * Subclasses need to override this.
- * If in doubt, return true.
- */
- public boolean doesFilterStringMatch(String filterString, String remoteObjectAbsoluteName, boolean caseSensitive)
- {
- return true;
- }
-
- // -------------------------------------
- // GUI methods
- // -------------------------------------
- /**
- * Return the single property page to show in the tabbed notebook for the
- * for SubSystem property of the parent Connection. Return null if no
- * page is to be contributed for this. You are limited to a single page,
- * so you may have to compress. It is recommended you prompt for the port
- * if applicable since the common base subsystem property page is not shown
- * To help with this you can use the SystemPortPrompt widget.
- */
- public PropertyPage getPropertyPage(Composite parent)
- {
- return null;
- }
-
- // --------------------------------------------------------------------------------------
- // Methods for encoding and decoding remote objects for drag and drop, and clipboard copy
- // --------------------------------------------------------------------------------------
-
-
- /**
- * For drag and drop, and clipboard, support of remote objects.
- * <p>
- * Return the object within the subsystem that corresponds to
- * the specified unique ID. Because each subsystem maintains it's own
- * objects, it's the responsability of the subsystem to determine
- * how an ID (or key) for a given object maps to the real object.
- * By default this returns null.
- * <p>
- * This is the functional opposite of {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteName(Object)}.
- */
- public Object getObjectWithAbsoluteName(String key) throws Exception
- {
- // by default, the subsystem will attempt to find a filter reference for the key
- Object filterRef = getFilterReferenceWithAbsoluteName(key);
- if (filterRef != null)
- {
- return filterRef;
- }
- return null;
- }
-
- /**
- * Return the filter reference that corresponds to the specified key. If there
- * is no such filter reference, return null;
- * @param key the absolute name for an object.
- * @return a filter reference if there is one matching the key
- */
- protected Object getFilterReferenceWithAbsoluteName(String key)
- {
- // figure out if there is a filter
- String filterID = key;
- try
- {
- ISystemFilterPoolReferenceManager filterMgr = getFilterPoolReferenceManager();
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystemConfiguration factory = registry.getSubSystemConfiguration(this);
-
- int indexOfDot = filterID.indexOf('.');
- if (indexOfDot > 0)
- {
- String mgrName = filterID.substring(0, indexOfDot);
-
- ISystemFilterPoolManager mgr = factory.getSystemFilterPoolManager(mgrName);
-
- int indexOfDot2 = filterID.indexOf('.', indexOfDot + 1);
- if (mgr != null && indexOfDot2 > 0)
- {
- String filterPoolName = filterID.substring(indexOfDot + 1, indexOfDot2);
-
- ISystemFilterPool filterPool = mgr.getSystemFilterPool(filterPoolName);
-
- String filterName = filterID.substring(indexOfDot2 + 1, filterID.length());
- if (filterPool != null)
- {
- ISystemFilter filter = filterPool.getSystemFilter(filterName);
- ISystemFilterReference ref = filterMgr.getSystemFilterReference(this, filter);
- if (ref != null)
- {
- // if we get here, it's a filter
- return ref;
- }
- }
- }
- }
- }
- catch (Exception e)
- {
- }
- return null;
- }
-
-
- // ---------------------------------------------------
- // Methods for business partners to add their own
- // persisted attributes to the subsystem object...
- // ---------------------------------------------------
-
- /**
- * @deprecated use property sets directly now
- */
- public void setVendorAttribute(String vendor, String attributeName, String attributeValue)
- {
- IPropertySet set = getPropertySet(vendor);
- if (set == null)
- {
- set = createPropertySet(vendor, ""); //$NON-NLS-1$
- }
- set.addProperty(attributeName, attributeValue);
- }
- /**
- * @deprecated use property sets directly now
- */
- public String getVendorAttribute(String vendor, String attributeName)
- {
- IPropertySet set = getPropertySet(vendor);
- if (set != null)
- {
- return set.getPropertyValue(attributeName);
- }
- else
- {
- return null;
- }
- }
-
-
- // ---------------------------------------------------
- // Methods for ISVs to add their own
- // persisted attributes to the subsystem object...
- // ---------------------------------------------------
-
- /**
- * @deprecated
- */
- public void setRemoteAttribute(String attributeName, String attributeValue)
- {
- IPropertySet set = getPropertySet("Remote"); //$NON-NLS-1$
- if (set == null)
- {
- set = createPropertySet("Remote", getDescription()); //$NON-NLS-1$
- }
- set.addProperty(attributeName, attributeValue);
- }
- /**
- * @deprecated
- */
- public String getRemoteAttribute(String attributeName)
- {
- IPropertySet set = getPropertySet("Remote"); //$NON-NLS-1$
- if (set != null)
- {
- return set.getPropertyValue(attributeName);
- }
- else
- {
- return null;
- }
- }
-
-
-
-
-
- // ------------------
- // Utility methods...
- // ------------------
-
- /**
- * Return the system type for this connection.
- */
- public String getSystemType()
- {
- IHost conn = getHost();
- if (conn == null)
- return null;
- else
- return conn.getSystemType();
- }
- /**
- * Return the host name for the connection this system's subsystem is associated with
- */
- public String getHostName()
- {
- IHost conn = getHost();
- if (conn == null)
- return null;
- else
- return conn.getHostName();
- }
-
- /**
- * Display message on message thread
- */
- protected void displayAsyncMsg(SystemMessageException msg)
- {
- DisplayErrorMessageJob job = new DisplayErrorMessageJob(getShell(), msg);
- job.setPriority(Job.INTERACTIVE);
- job.setSystem(true);
- job.schedule();
- }
- /**
- * Nested class which extends WorkbenchJob to allow us to show an error message, which is a GUI operation,
- * from a non-GUI thread. This is done by creating an instance of this class and then scheduling it.
- */
- public static class DisplayErrorMessageJob extends WorkbenchJob
- {
- private Shell shell;
- private SystemMessageException msgExc;
-
- /**
- * Constructor
- */
- public DisplayErrorMessageJob(Shell shell, SystemMessageException msgExc)
- {
- super(""); //$NON-NLS-1$
- this.shell = shell; //FIXME remove this
- this.msgExc = msgExc;
- }
-
- /**
- * @see UIJob#run(IProgressMonitor monitor)
- */
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- if ((shell != null) && (shell.isDisposed() || !shell.isEnabled() || !shell.isVisible()))
- shell = null;
- if (shell == null)
- {
- Shell[] shells = Display.getCurrent().getShells();
- for (int i = 0; i < shells.length && shell == null; i++)
- if (!shells[i].isDisposed() && shells[i].isVisible() && shells[i].isEnabled())
- shell = shells[i];
- }
- if (shell != null)
- SystemMessageDialog.displayMessage(shell, msgExc);
- return Status.OK_STATUS;
- }
- }
-
- // ---------------------------------------------------
- // SystemFilterPoolReferenceManagerProvider methods...
- // ---------------------------------------------------
- /**
- * Return the system filter pool reference manager, as per the
- * interface SystemFilterPoolReferenceManagerProvider
- */
- public ISystemFilterPoolReferenceManager getSystemFilterPoolReferenceManager()
- {
- return getFilterPoolReferenceManager();
- }
- /*
- * Helper method to fire an event...
- */
- protected void fireEvent(SystemResourceChangeEvent event)
- {
- RSEUIPlugin.getTheSystemRegistry().fireEvent(event);
- }
- /*
- * Helper method to fire a reference event...
- */
- protected void fireEvent(SystemResourceChangeEvent event, Object grandParent)
- {
- event.setGrandParent(grandParent);
- RSEUIPlugin.getTheSystemRegistry().fireEvent(event);
- }
- /*
- * Helper method to create and then fire an event...
- */
- protected void fireEvent(Object src, int eventId, Object parent)
- {
- fireEvent(new SystemResourceChangeEvent(src, eventId, parent));
- }
- /*
- * Helper method to create and then fire an event...
- */
- protected void fireEvent(Object[] multiSrc, int eventId, Object parent)
- {
- fireEvent(new SystemResourceChangeEvent(multiSrc, eventId, parent));
- }
- /*
- * Helper method to create and then fire an event...
- */
- protected void fireEvent(Object[] src, int eventId, Object parent, int position)
- {
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(src, eventId, parent);
- event.setPosition(position);
- fireEvent(event);
- }
-
- /*
- * Helper method to create and then fire a reference event...
- */
- protected void fireEvent(Object src, int eventId, Object parent, Object grandParent)
- {
- fireEvent(new SystemResourceChangeEvent(src, eventId, parent), grandParent);
- }
- // -------------------------------
- // FILTER POOL REFERENCE EVENTS...
- // -------------------------------
-
- /**
- * A new filter pool reference has been created. Fire the appropriate events for this.
- */
- public void filterEventFilterPoolReferenceCreated(ISystemFilterPoolReference newPoolRef) {
- if (getSubSystemConfiguration().showFilterPools()) {
- fireEvent(newPoolRef, EVENT_ADD, this);
- fireEvent(newPoolRef, EVENT_REVEAL_AND_SELECT, this);
- } else {
- ISystemFilterPool pool = newPoolRef.getReferencedFilterPool();
- if (pool != null && pool.getSystemFilterCount() > 0) {
- ISystemFilterReference[] filterRefs = newPoolRef.getSystemFilterReferences(this);
- fireEvent(filterRefs, EVENT_ADD_MANY, this, -1); // -1 means append to end
- }
- }
- try {
- getSubSystemConfiguration().saveSubSystem(this);
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, newPoolRef, null);
- } catch (Exception exc) {
- SystemBasePlugin.logError("Error saving subsystem " + getName(), exc); //$NON-NLS-1$
- }
- }
-
- /**
- * A filter pool reference has been deleted
- */
- public void filterEventFilterPoolReferenceDeleted(ISystemFilterPoolReference filterPoolRef)
- {
- if (getSubSystemConfiguration().showFilterPools())
- {
- fireEvent(filterPoolRef, EVENT_DELETE, this);
- }
- else if (filterPoolRef.getReferencedFilterPool().getSystemFilterCount()>0)
- {
- ISystemFilterReference[] filterRefs = filterPoolRef.getSystemFilterReferences(this);
- fireEvent(filterRefs, EVENT_DELETE_MANY, this);
- }
-
- try {
- getSubSystemConfiguration().saveSubSystem(this);
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving subsystem "+getName(),exc); //$NON-NLS-1$
- }
- }
- /**
- * A single filter pool reference has been reset to reference a new pool
- */
- public void filterEventFilterPoolReferenceReset(ISystemFilterPoolReference filterPoolRef)
- {
- fireEvent(filterPoolRef, EVENT_PROPERTYSHEET_UPDATE, this); // we assume its a move operation so little impact
- try {
- getSubSystemConfiguration().saveSubSystem(this);
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving subsystem "+getName(),exc); //$NON-NLS-1$
- }
- }
- /**
- * All filter pool references has been reset. Happens after SelectFilterPools dialog
- */
- public void filterEventFilterPoolReferencesReset()
- {
- fireEvent(this, EVENT_CHANGE_CHILDREN, this);
- try
- {
- getSubSystemConfiguration().saveSubSystem(this);
- ISystemFilterPoolReference[] poolRefs = getFilterPoolReferenceManager().getSystemFilterPoolReferences();
- for (int idx=0; idx<poolRefs.length; idx++)
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, poolRefs[idx], null);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving subsystem "+getName(),exc); //$NON-NLS-1$
- }
- }
- /**
- * A filter pool reference has been renamed (ie, its reference filter pool renamed)
- */
- public void filterEventFilterPoolReferenceRenamed(ISystemFilterPoolReference poolRef, String oldName)
- {
- if (getSubSystemConfiguration().showFilterPools())
- {
- fireEvent(poolRef, EVENT_RENAME, this);
- }
- else
- {
- //fireEvent(filterPoolRef, EVENT_PROPERTYSHEET_UPDATE, this);
- }
- try {
- getSubSystemConfiguration().saveSubSystem(this);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving subsystem "+getName(),exc); //$NON-NLS-1$
- }
- }
- /**
- * One or more filter pool references have been re-ordered within their manager
- */
- public void filterEventFilterPoolReferencesRePositioned(ISystemFilterPoolReference[] poolRefs, int delta)
- {
- fireEvent(poolRefs, EVENT_MOVE_MANY, this, delta);
- try {
- getSubSystemConfiguration().saveSubSystem(this);
- // fire model change event in case any BP code is listening...
- for (int idx=0; idx<poolRefs.length; idx++)
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, poolRefs[idx], null);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving subsystem "+getName(),exc); //$NON-NLS-1$
- }
- }
- // -------------------------------
- // FILTER REFERENCE EVENTS...
- // -------------------------------
- /**
- * A new filter has been created. This is called when a filter pool reference is selected and a new filter
- * is created, so that the provider can expand the selected filter pool reference and reveal the new filter
- * within the selected pool reference.
- * <p>
- * Only the selected node should be expanded if not already. All other references to this pool will already
- * have been informed of the new addition, and will have refreshed their children but not expanded them.
- */
- public void filterEventFilterCreated(Object selectedObject, ISystemFilter newFilter)
- {
- fireEvent(newFilter,EVENT_REVEAL_AND_SELECT,selectedObject);
- }
- // ---------------------------------
- // FILTER STRING REFERENCE EVENTS...
- // ---------------------------------
- /**
- * A new filter string has been created. This is called when a filter reference is selected and a new filter
- * string is created, so that the provider can expand the selected filter reference and reveal the new filter
- * string within the selected filter reference.
- * <p>
- * Only the selected node should be expanded if not already. All other references to this filter will already
- * have been informed of the new addition, and will have refreshed their children but not expanded them.
- */
- public void filterEventFilterStringCreated(Object selectedObject, ISystemFilterString newFilterString)
- {
- fireEvent(newFilterString,EVENT_REVEAL_AND_SELECT,selectedObject);
- }
-
- /**
- * Represents an operation that can be performed by the subsystem. Since this class
- * extends Job, it is run on a separate thread, but reports progress to the Main thread.
- * Takes care of some common error handling and Status creation for SubSystem Operations.
- * @author mjberger
- */
- protected abstract class SubSystemOperationJob extends Job
- {
- protected Object[] runOutputs;
- protected String[] runOutputStrings;
- protected boolean _hasStarted = false;
-
- public class ContextRunnable implements IRunnableWithProgress
- {
- private SubSystemOperationJob _job;
- private IStatus _status;
-
- public ContextRunnable(SubSystemOperationJob job)
- {
- _job = job;
- }
-
- public void run(IProgressMonitor monitor)
- {
- _status = _job.run(monitor);
- }
-
- public IStatus getStatus()
- {
- return _status;
- }
- }
-
- public SubSystemOperationJob(String operationName)
- {
- super(operationName + " (" + GenericMessages.RSESubSystemOperation_message + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Override this method with the actual operation performed by your subsystem operation. Make sure to
- * report progress to the Progress monitor.
- * @throws InterruptedException if the user presses cancel
- * @throws InvocationTargetException if there is some error performing the operation
- * @throws Exception if there is some other error
- */
- public abstract void performOperation(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException, Exception;
-
- /**
- * SubSystemOperationJobs are designed to be run synchronously - if you require output from them. Clients can query any output
- * using getOutputs() or getOutputStrings().
- */
- public Object[] getOutputs()
- {
- return runOutputs;
- }
-
- /**
- * SubSystemOperationJobs are designed to be run synchronously - if you require output from them. Clients can query any output
- * using getOutputs() or getOutputStrings().
- */
- public String[] getOutputStrings()
- {
- return runOutputStrings;
- }
-
- public IStatus runInContext(IRunnableContext context)
- {
- _hasStarted = true;
- ContextRunnable conRun = new ContextRunnable(this);
- try
- {
- context.run(false, true, conRun);
- return conRun.getStatus();
- }
- catch (Exception e)
- {
- String excMsg = e.getMessage();
- if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + e.getClass().getName(); //$NON-NLS-1$
- SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED);
- sysMsg.makeSubstitution(excMsg);
- return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, sysMsg.getLevelOneText(), e);
- }
- }
-
- public boolean hasStarted()
- {
- return _hasStarted;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- _hasStarted = true;
- try
- {
- performOperation(monitor);
-
- if (monitor.isCanceled()) // sometimes our kids don't do this like they should!
- {
- return Status.CANCEL_STATUS;
- }
- monitor.done();
- return Status.OK_STATUS;
- }
- catch(java.lang.InterruptedException exc)
- {
- monitor.done();
- return Status.CANCEL_STATUS;
- }
- catch(InvocationTargetException exc)
- {
- //exc.printStackTrace();
- monitor.done();
- String excMsg = exc.getTargetException().getMessage();
- if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + exc.getTargetException().getClass().getName(); //$NON-NLS-1$
- return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, excMsg, exc.getTargetException());
- }
- catch(Exception exc)
- {
- monitor.done();
- String excMsg = exc.getMessage();
- if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + exc.getClass().getName(); //$NON-NLS-1$
- SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED);
- sysMsg.makeSubstitution(excMsg);
- return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, sysMsg.getLevelOneText(), exc);
- }
- }
- }
-
- /**
- * Represents the subsystem operation of resolving absolute filter strings.
- */
- protected class ResolveAbsoluteJob extends SubSystemOperationJob
- {
- protected String _filterString;
-
- /**
- * Create a new ResolveAbsoluteJob
- * @param filterString the absolute filter string to resolve
- */
- public ResolveAbsoluteJob(String filterString)
- {
- super(GenericMessages.RSESubSystemOperation_Resolve_filter_strings_message);
- _filterString = filterString;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getResolvingMessage(_filterString);
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
- runOutputs = internalResolveFilterString(mon, _filterString);
- }
- }
-
- /**
- * Represents the subsystem operation of resolving a set of absolute filter strings.
- */
- protected class ResolveAbsolutesJob extends SubSystemOperationJob
- {
- protected String _filterString;
- protected String[] _filterStrings;
-
- /**
- * Create a new ResolveAbsolutesJob
- * @param filterStrings the set of absolute filter strings to resolve
- */
- public ResolveAbsolutesJob(String filterString, String[] filterStrings)
- {
- super(GenericMessages.RSESubSystemOperation_Resolve_filter_strings_message);
- _filterString = filterString;
- _filterStrings = filterStrings;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getResolvingMessage(_filterString);
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
- runOutputs = internalResolveFilterStrings(mon, _filterStrings);
- }
- }
-
- /**
- * Represents the subsystem operation of resolving relative filter strings.
- */
- protected class ResolveRelativeJob extends SubSystemOperationJob
- {
- protected String _filterString;
- protected Object _parent;
-
- /**
- * Create a new ResolveRelativeJob
- * @param filterString the relative filter string to resolve
- * @param parent the object within which the relative filter string will be resolved
- */
- public ResolveRelativeJob(String filterString, Object parent)
- {
- super(GenericMessages.RSESubSystemOperation_Resolve_filter_strings_message);
- _filterString = filterString;
- _parent = parent;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- if (_filterString == null)
- {
- // DKM - we shouldn't be using parent context for filter strings because
- // now we have multiple contexts for the same resources
- _filterString = "*"; //$NON-NLS-1$
- }
- msg = getResolvingMessage(_filterString);
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
- runOutputs = internalResolveFilterString(mon, _parent, _filterString);
- }
- }
-
- /**
- * Represents the subsystem operation of getting a property value from a remote object.
- */
- protected class GetPropertyJob extends SubSystemOperationJob
- {
- protected Object _subject;
- protected String _key;
-
- /**
- * Constructs a new GetPropertyJob
- * @param subject The object whose property will be queried
- * @param key The property to query
- */
- public GetPropertyJob(Object subject, String key)
- {
- super(GenericMessages.RSESubSystemOperation_Get_property_message);
- _subject = subject;
- _key = key;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getQueryingMessage(_key);
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
- runOutputStrings = new String[] {internalGetProperty(mon, _subject, _key)};
- }
- }
-
- /**
- * Represents the subsystem operation of setting a property of a remote object.
- */
- protected class SetPropertyJob extends SubSystemOperationJob
- {
- protected Object _subject;
- protected String _key;
- protected String _value;
-
- /**
- * Constructs a new SetPropertyJob
- * @param subject the object whose property is to be set
- * @param key the property to set
- * @param value the new value for the property
- */
- public SetPropertyJob(Object subject, String key, String value)
- {
- super(GenericMessages.RSESubSystemOperation_Set_property_message);
- _subject = subject;
- _key = key;
- _value = value;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
- msg = getSettingMessage(_key);
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
- runOutputs = new Object[] {internalSetProperty(mon, _subject, _key, _value)};
- }
- }
-
- /**
- * Represents the subsystem operation of getting a set of property values from a remote object.
- */
- protected class GetPropertiesJob extends SubSystemOperationJob
- {
- protected Object _subject;
- protected String[] _keys;
-
- /**
- * Constructs a new GetPropertiesJob
- * @param subject the object on which to perform the property query
- * @param keys the properties to query
- */
- public GetPropertiesJob(Object subject, String[] keys)
- {
- super(GenericMessages.RSESubSystemOperation_Get_properties_message);
- _subject = subject;
- _keys = keys;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
- msg = getQueryingMessage();
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
- runOutputStrings = internalGetProperties(mon, _subject, _keys);
- }
- }
-
- /**
- * Represents the subsystem operation of setting a set of properties of a remote object.
- */
- protected class SetPropertiesJob extends SubSystemOperationJob
- {
- protected Object _subject;
- protected String[] _keys;
- protected String[] _values;
-
- /**
- * Constructs a new SetPropertiesJob
- * @param subject the object whose properties are to be set
- * @param keys the set of properties to set
- * @param values the set of new values for the properties, corresponding with <code>keys</code>
- */
- public SetPropertiesJob(Object subject, String[] keys, String[] values)
- {
- super(GenericMessages.RSESubSystemOperation_Set_properties_message);
- _subject = subject;
- _keys = keys;
- _values = values;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, InvocationTargetException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = getSettingMessage();
-
- if (!implicitConnect(false, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
- runOutputs = new Object[] {internalSetProperties(mon, _subject, _keys, _values)};
- }
- }
-
- /**
- * Use this job to connect from a non-UI thread. Since this extends UIJob it will
- * run on the UI thread when scheduled.
- */
- private class ConnectFromBackgroundJob extends UIJob {
- public ConnectFromBackgroundJob() {
- super(GenericMessages.RSESubSystemOperation_Connect_message);
- }
- public IStatus runInUIThread(IProgressMonitor monitor) {
- IStatus result = Status.OK_STATUS;
- try {
- connect(false);
- } catch (InterruptedException e) {
- result = Status.CANCEL_STATUS;
- } catch (Exception e) {
- e.printStackTrace();
- String excMsg = e.getMessage();
- if ((excMsg == null) || (excMsg.length() == 0)) excMsg = "Exception " + e.getClass().getName(); //$NON-NLS-1$
- SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED);
- sysMsg.makeSubstitution(getHostName(), excMsg);
- result = new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, sysMsg.getLevelOneText(), e);
- }
- return result;
- }
- }
-
- /**
- * Represents the subsystem operation of connecting the subsystem to the remote machine.
- */
- public class ConnectJob extends SubSystemOperationJob
- {
- public ConnectJob()
- {
- super(GenericMessages.RSESubSystemOperation_Connect_message);
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, Exception
- {
- String msg = null;
- int totalWorkUnits = IProgressMonitor.UNKNOWN;
-
- msg = SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort());
- SystemBasePlugin.logInfo(msg);
-
- if (!implicitConnect(true, mon, msg, totalWorkUnits)) throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(getHostName()).getLevelOneText());
- internalConnect(mon);
- }
- }
-
- /**
- * Represents the subsystem operation of disconnecting the subsystem to the remote machine.
- */
- protected class DisconnectJob extends SubSystemOperationJob
- {
- public class PostDisconnect implements Runnable
- {
-
- public void run()
- {
- getConnectorService().reset();
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.connectedStatusChange(_subsystem, false, true, _collapseTree);
- }
-
- }
-
- private boolean _collapseTree;
- private SubSystem _subsystem;
- public DisconnectJob(boolean collapseTree, SubSystem subsystem)
- {
- super(GenericMessages.RSESubSystemOperation_Disconnect_message);
- _collapseTree = collapseTree;
- _subsystem = subsystem;
- }
-
- public void performOperation(IProgressMonitor mon) throws InterruptedException, Exception
- {
- internalDisconnect(mon);
- _disconnecting = false;
- _connectionError = false;
- Display.getDefault().asyncExec(new PostDisconnect());
- }
-
- }
-
- /**
- * Represents the operation of changing the connection status of this subsystem.
- */
- protected class ChangeStatusJob extends UIJob
- {
- private final ISubSystem _subsystem;
-
- public ChangeStatusJob(ISubSystem ss)
- {
- super(GenericMessages.RSESubSystemOperation_Notifying_registry_message);
- _subsystem = ss;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- final ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.connectedStatusChange(_subsystem, true, false);
- return Status.OK_STATUS;
- }
- }
-
- protected boolean implicitConnect(boolean isConnectOperation, IProgressMonitor mon, String msg, int totalWorkUnits) throws SystemMessageException, InvocationTargetException, InterruptedException
- {
- boolean didConnection = false;
- if ( doConnection && !isConnected())// caller wants to do connection first as part operation
- {
- if (isOffline() || (supportsCaching() && getCacheManager().isRestoreFromMemento()))
- {
- if (!supportsCaching())
- {
- // offline and no caching support so throw exception
- SystemMessage sMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OFFLINE_CANT_CONNECT);
- sMsg.makeSubstitution(getHost().getAliasName());
- throw new SystemMessageException(sMsg);
- }
-
- // we are not either offline or we support caching and are restoring from memento so
- // postpone connecting until we determine the information cannot be retrieved from the cache,
- // it is left to individual api calls to determine this
- doConnection = false;
- }
- else
- {
- doConnection = false; // reset
- didConnection = true;
- mon.beginTask(SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort()), totalWorkUnits);
- internalConnect(mon);
- mon.worked(1);
-
- ChangeStatusJob job = new ChangeStatusJob(this);
- job.setSystem(true);
- job.setPriority(Job.INTERACTIVE);
- job.schedule();
- }
- }
- else
- {
- doConnection = false;
- }
-
- if (isConnected() || isConnectOperation || isOffline() || (supportsCaching() && getCacheManager().isRestoreFromMemento()))
- {
- if (!didConnection)
- mon.beginTask(msg, (totalWorkUnits==1) ? IProgressMonitor.UNKNOWN : totalWorkUnits);
- else
- mon.setTaskName(msg);
- return true;
- }
- else // the implicit connect must have failed
- {
- mon.done();
- return false;
- }
- }
-
- protected void showOperationMessage(Exception exc, Shell shell)
- {
- if (exc instanceof java.lang.InterruptedException)
- showOperationCancelledMessage(shell);
- else if (exc instanceof java.lang.reflect.InvocationTargetException)
- showOperationErrorMessage(shell, ((java.lang.reflect.InvocationTargetException)exc).getTargetException());
- else
- showOperationErrorMessage(shell, exc);
- }
-
- /**
- * Show an error message when the connection fails.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showConnectErrorMessage(Shell shell, String hostName, int port, Throwable exc)
- {
- SystemMessage msg = null;
- if (exc instanceof SystemMessageException)
- {
- SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
- msg = ((SystemMessageException) exc).getSystemMessage();
- }
- else if (exc instanceof java.net.UnknownHostException)
- {
- SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST);
- msg.makeSubstitution(hostName);
- }
- else
- {
- SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED);
- msg.makeSubstitution(hostName, exc);
- }
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.setException(exc);
- msgDlg.open();
- }
- /**
- * Show an error message when the user cancels the connection.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showConnectCancelledMessage(Shell shell, String hostName, int port)
- {
- //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, RSEUIPlugin.getResourceBundle(),
- // ISystemMessages.MSG_CONNECT_CANCELLED, hostName);
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED);
- msg.makeSubstitution(hostName);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
- /**
- * Show an error message when the disconnection fails.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc)
- {
- //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR,shell,RSEUIPlugin.getResourceBundle(),
- // ISystemMessages.MSG_DISCONNECT_FAILED,
- // hostName, exc.getMessage());
- //RSEUIPlugin.logError("Disconnect failed",exc); // temporary
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_FAILED).makeSubstitution(hostName,exc));
- msgDlg.setException(exc);
- msgDlg.open();
- }
- /**
- * Show an error message when the user cancels the disconnection.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port)
- {
- //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, RSEUIPlugin.getResourceBundle(),
- // ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_CANCELLED).makeSubstitution(hostName));
- msgDlg.open();
- }
-
-
- /**
- * Helper method to return the message "Resolving to &1..."
- */
- protected static String getResolvingMessage(String filterString)
- {
- String msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_RESOLVE_PROGRESS).makeSubstitution(filterString).getLevelOneText();
- return msg;
- }
- /**
- * Helper method to return the message "Running command &1..."
- */
- protected static String getRunningMessage(String cmd)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_RUN_PROGRESS).makeSubstitution(cmd).getLevelOneText();
- }
- /**
- * Helper method to return the message "Querying &1..."
- */
- protected static String getQueryingMessage(String key)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_QUERY_PROGRESS).makeSubstitution(key).getLevelOneText();
- }
- /**
- * Helper method to return the message "Setting &1..."
- */
- protected static String getSettingMessage(String key)
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_SET_PROGRESS).makeSubstitution(key).getLevelOneText();
- }
- /**
- * Helper method to return the message "Querying properties..."
- */
- protected static String getQueryingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_QUERY_PROPERTIES_PROGRESS).getLevelOneText();
- }
- /**
- * Helper method to return the message "Setting properties..."
- */
- protected static String getSettingMessage()
- {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_SET_PROPERTIES_PROGRESS).getLevelOneText();
- }
-
- /**
- * Show an error message when the operation fails.
- * Shows a common message by default, unless the exception is of type SystemMessageException,
- * in which case the message is retrieved via getSystemMessage() and it is shown.
- * Overridable.
- */
- protected void showOperationErrorMessage(Shell shell, Throwable exc)
- {
- SystemMessage sysMsg = null;
- if (exc instanceof SystemMessageException)
- {
- displayAsyncMsg((SystemMessageException)exc);
- //sysMsg = ((SystemMessageException)exc).getSystemMessage();
- }
- else
- {
- String excMsg = exc.getMessage();
- if ((excMsg == null) || (excMsg.length()==0))
- excMsg = "Exception " + exc.getClass().getName(); //$NON-NLS-1$
- sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED);
- sysMsg.makeSubstitution(excMsg);
-
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, sysMsg);
- msgDlg.setException(exc);
- msgDlg.open();
- //RSEUIPlugin.logError("Operation failed",exc); now done successfully in msgDlg.open()
- }
-
- }
- /**
- * Show an error message when the user cancels the operation.
- * Shows a common message by default.
- * Overridable.
- */
- protected void showOperationCancelledMessage(Shell shell)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED));
- msgDlg.open();
- }
-
-
- // ----------------------------------
- // PUBLIC METHODS HANDLED FOR YOU....
- // ----------------------------------
- /**
- * Return true if this subsystem is currently connected to its remote system.
- * If the subsystem configuration indicates its subsystems support connecting, then
- * this method will call getSystem().isConnect().
- */
- public boolean isConnected()
- {
- IConnectorService system = getConnectorService();
- if (system != null)
- return system.isConnected();
- else if (!supportsConnecting)
- return true;
- else
- return false;
- }
-
- /**
- * Returns the offline property for this subsystem's System Connection.
- */
- public boolean isOffline()
- {
- return getHost().isOffline();
- }
- /**
- * CHILD CLASSES MAY OVERRIDE THIS.
- * By default it returns true iff we support filters and there are filter pool references.
- */
- public boolean hasChildren()
- {
- if (getSubSystemConfiguration().supportsFilters())
- {
- ISystemFilterPoolReferenceManager mgr = getSystemFilterPoolReferenceManager();
- if (mgr == null)
- return false;
- else
- return mgr.getSystemFilterPoolReferenceCount() > 0;
- }
- else
- return false;
- }
- /**
- * Return the children of this subsystem, to populate the GUI subtree of this subsystem.
- * By default, this method:
- * <ul>
- * <li>Returns the filter pool references of this subsystem, if supportsFilters() is true for our factory.
- * <li>If supportsFilters() is false from our factory, returns null
- * </ul>
- * So, be sure to override this method IF you do not support filters.
- */
- public Object[] getChildren()
- {
- if (getSubSystemConfiguration().supportsFilters())
- {
- ISystemFilterPoolReferenceManager mgr = getSystemFilterPoolReferenceManager();
- if (mgr == null)
- return null;
- else
- {
- boolean showFilterPools = getSubSystemConfiguration().showFilterPools();
- if (showFilterPools)
- return mgr.getSystemFilterPoolReferences();
- else
- {
- ISystemFilterReference[] allRefs = mgr.getSystemFilterReferences(this);
- return allRefs;
- }
- }
- }
- else
- return null;
- }
-
- /**
- * Resolve an <i>absolute</i> filter string. This is only applicable if the subsystem
- * factory reports true for {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()},
- * which is the default. Otherwise, {@link org.eclipse.rse.core.subsystems.SubSystem#getChildren()}
- * is called when the subsystem itself is expanded.
- * <p>
- * When a user <u>expands a filter</u> this method is invoked for each filter string and the
- * results are concatenated and displayed to the user. You can affect the post-concatenated
- * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- * <p>
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.ui.view.SystemView view}.
- * There are <u>two requirements</u> on the returned objects:</p>
- * <ol>
- * <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
- * <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
- * for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystem#isHidden() visible}
- * in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
- * with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
- * </ol>
- * <p>A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- * <p>
- * Be sure to register your adapter factory in your plugin's startup method.
- * <p>
- * <b>You do not need to override this, as it does the progress monitor and error message
- * displaying for you. Just override internalResolveFilterString.</b>
- * <p>
- * @param filterString filter pattern for objects to return.
- * @return the results of resolving the filter string.
- */
- public Object[] resolveFilterString(String filterString)
- throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- Display display = Display.getCurrent();
- if (display != null)
- {
- return internalResolveFilterString(new NullProgressMonitor(), filterString);
- }
- else
- {
- try
- {
- ResolveAbsoluteJob job = new ResolveAbsoluteJob(filterString);
-
- IStatus status = scheduleJob(job, null, shell != null);
- if (status.isOK())
- {
- if (sortResults && (job.getOutputs()!=null))
- return sortResolvedFilterStringObjects(job.getOutputs());
- else
- return job.getOutputs();
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null) throw exc;
- else showOperationCancelledMessage(shell);
- }
- }
- }
- else
- System.out.println("in SubSystemImpl.resolveFilterString: isConnected() returning false!"); //$NON-NLS-1$
- return null;
- }
- /**
- * Resolve multiple absolute filter strings. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * This is the same as {@link #resolveFilterString(String)} but takes an array of
- * filter strings versus a single filter string.
- * <p>
- * The default implementation of this simply calls {@link #internalResolveFilterStrings(IProgressMonitor, String[])}.
- * <p>
- * After successful resolve, the sort method is called to sort the concatenated results before
- * returning them.
- *
- * @param filterStrings array of filter patterns for objects to return.
- * @return Array of objects that are the result of resolving all the filter strings
- */
- public Object[] resolveFilterStrings(String[] filterStrings)
- throws Exception
- {
-
- boolean ok = true;
-
- if ((filterStrings == null) || (filterStrings.length == 0)) {
- SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
- return null;
- }
-
- if (!isConnected()) {
- ok = promptForPassword();
- }
-
- if (ok)
- {
- Display display = Display.getCurrent();
- if (display != null)
- {
- return internalResolveFilterStrings(new NullProgressMonitor(), filterStrings);
- }
- else
- {
- try
- {
- ResolveAbsolutesJob job = new ResolveAbsolutesJob(filterStrings[0], filterStrings);
-
- IStatus status = scheduleJob(job, null, true);
- if (status.isOK())
- {
- if (sortResults && (job.getOutputs()!=null))
- return sortResolvedFilterStringObjects(job.getOutputs());
- else
- return job.getOutputs();
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null) throw exc;
- else showOperationCancelledMessage(shell);
- }
- }
- }
- else
- System.out.println("in SubSystemImpl.resolveFilterString: isConnected() returning false!"); //$NON-NLS-1$
- return null;
- }
-
- protected IStatus scheduleJob(SubSystemOperationJob job, ISchedulingRule rule, boolean synch) throws InterruptedException
- {
- IRunnableContext context = getRunnableContext(/*shell*/); // dwd needed for side effect or for prompt?
- if (context instanceof SystemPromptDialog)
- {
- IStatus status = job.runInContext(context);
- if (!status.isOK())
- {
- showOperationErrorMessage(shell, status.getException());
- }
- return status;
- }
- job.setPriority(Job.INTERACTIVE);
- //job.setUser(true);
- if (rule != null)
- {
- job.setRule(rule);
- }
- job.schedule();
-
- if (synch)
- {
- Display display = Display.getCurrent();
- while (!job.hasStarted())
- {
- while (display!=null && display.readAndDispatch()) {
- //Process everything on event queue
- }
- if (!job.hasStarted()) Thread.sleep(200);
- }
- while (job.getResult() == null)
- {
- while (display!=null && display.readAndDispatch()) {
- //Process everything on event queue
- }
- if (job.getResult() == null) Thread.sleep(200);
- }
- return job.getResult();
- }
- else
- {
- return Status.OK_STATUS;
- }
-
- }
-
- /**
- * Sort the concatenated list of all objects returned by resolving one or more
- * filter strings.
- * The default implementation does nothing. Child classes can override if they wish
- * to show their resulting objects sorted.
- */
- protected Object[] sortResolvedFilterStringObjects(Object[] input)
- {
- return input;
- }
-
-
- /**
- * Modal thread version of resolve filter strings
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
- * <p>
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
- * <p>
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param monitor the process monitor associated with this operation
- * @param filterString filter pattern for objects to return.
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(IProgressMonitor monitor, String filterString) throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- Object[] results = internalResolveFilterString(monitor, filterString);
- if (sortResults && (results!=null))
- results = sortResolvedFilterStringObjects(results);
- return results;
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Modal thread version of resolve filter strings
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
- * <p>
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
- * <p>
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param monitor the process monitor associated with this operation
- * @param filterStrings filter patterns for objects to return.
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterStrings(IProgressMonitor monitor, String[] filterStrings)
- throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- Object[] results = internalResolveFilterStrings(monitor, filterStrings);
- if (sortResults && (results!=null))
- results = sortResolvedFilterStringObjects(results);
- return results;
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Modal thread version of resolve filter strings
- * Resolve an absolute filter string. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * When a user expands a filter containing filter strings, this method is
- * invoked for each filter string.
- * <p>
- * The resulting objects are displayed in the remote system view tree. They
- * can be anything, but at a minimum must support IAdaptable in order to
- * drive the property sheet. You can just defer the getAdapter request to
- * the platform's Adapter manager if desired.
- * <p>
- * You should supply an adapter class for the returned object's class,
- * to render objects in the Remote System Explorer view. It will uses a
- * label and content provider that defers all requests to the adapter,
- * which it gets by querying the platform's adapter manager for the object
- * type. Be sure to register your adapter factory.
- *
- * @param monitor the process monitor associated with this operation
- * @param parent the object to query
- * @param filterString filter pattern for objects to return.
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
- throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
-
- if (ok)
- {
- Object[] results= internalResolveFilterString(monitor, parent, filterString);
- if (sortResults && (results!=null))
- results = sortResolvedFilterStringObjects(results);
- return results;
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Resolve a <i>relative</i> filter string.
- * <p>
- * When a user <u>expands a remote resource</u> this method is invoked and the
- * results are potentially sorted and displayed to the user. You can affect the sorting
- * behaviour by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- * <p>
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.ui.view.SystemView view}.
- * There are <u>two requirements</u> on the returned objects:</p>
- * <ol>
- * <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
- * <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
- * for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystem#isHidden() visible}
- * in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
- * with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
- * </ol>
- * <p>A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- * <p>
- * Be sure to register your adapter factory in your plugin's startup method.
- * <p>
- * <b>You do not need to override this, as it does the progress monitor and error message
- * displaying for you. Override internalResolveFilterString instead. </b>
- * <p>
- * @param parent Object that is being expanded.
- * @param filterString filter pattern for children of parent. Typically just "*".
- */
- public Object[] resolveFilterString(Object parent, String filterString)
- throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- Display display = Display.getCurrent();
- if (display != null)
- {
- return internalResolveFilterString(new NullProgressMonitor(), parent, filterString);
- }
- else
- {
- try
- {
-
- ResolveRelativeJob job = new ResolveRelativeJob(filterString, parent);
-
- IStatus status = scheduleJob(job, null, true);
- if (status.isOK())
- {
- if ((job.getOutputs()!=null) && (job.getOutputs().length>1))
- return sortResolvedFilterStringObjects(job.getOutputs());
- else return job.getOutputs();
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null) throw exc;
- else showOperationCancelledMessage(shell);
- }
- }
- }
- else
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "in SubSystemImpl.resolveFilterString: isConnected() returning false!"); //$NON-NLS-1$
- return null;
- }
-
-
-
-
-
- /**
- * Provide list of executed commands on subsystem.This is only applicable if the subsystem factory reports
- * true for supportsCommands().
- */
- public String[] getExecutedCommands()
- {
- return null;
- }
-
-
- /**
- * Set a remote property. Subsystems interpret as they wish. Eg, this might be to set
- * a remote environment variable. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param key Identifies property to set
- * @param value Value to set property to
- * @return Object interpretable by subsystem. Might be a Boolean, or the might be new value for confirmation.
- */
- public Object setProperty(Object subject, String key, String value)
- throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- try
- {
- SetPropertyJob job = new SetPropertyJob(subject, key, value);
-
- IStatus status = scheduleJob(job, null, true);
- if (status.isOK())
- {
- return job.getOutputs()[0];
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null) throw exc;
- else showOperationCancelledMessage(shell);
- }
- }
- else
- System.out.println("in SubSystemImpl.setProperty: isConnected() returning false!"); //$NON-NLS-1$
- return null;
- }
-
- /**
- * Get a remote property. Subsystems interpret as they wish. Eg, this might be to get
- * a remote environment variable. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param key Identifies property to get value of
- * @return String The value of the requested key.
- */
- public String getProperty(Object subject, String key)
- throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- try
- {
- GetPropertyJob job = new GetPropertyJob(subject, key);
- scheduleJob(job, null, true);
-
- IStatus status = job.getResult();
- if (status.isOK())
- {
- return job.getOutputStrings()[0];
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null) throw exc;
- else showOperationCancelledMessage(shell);
- }
- }
- else
- System.out.println("in SubSystemImpl.getProperty: isConnected() returning false!"); //$NON-NLS-1$
- return null;
- }
-
- /**
- * Set multiple remote properties. Subsystems interpret as they wish. Eg, this might be to set
- * a number of remote environment variables. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject identifies which object to get the properties of.
- * @param keys the array of propertie keys to set.
- * @param values the array of values to set. The value at a certain index corresponds to the property key at the same index.
- * @return Object interpretable by subsystem. Might be a Boolean, or the might be new values for confirmation.
- */
- public Object setProperties(Object subject, String[] keys, String[] values)
- throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- try
- {
- SetPropertiesJob job = new SetPropertiesJob(subject, keys, values);
-
- IStatus status = scheduleJob(job, null, true);
- if (status.isOK())
- {
- return job.getOutputs()[0];
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null) throw exc;
- else showOperationCancelledMessage(shell);
- }
- }
- else
- System.out.println("in SubSystemImpl.setProperties: isConnected() returning false!"); //$NON-NLS-1$
- return null;
- }
-
- /**
- * Initialize this subsystem instance after the corresponding {@link IConnectorService} connect method finishes.
- * This method should be overridden if any initialization for the subsystem needs
- * to occur at this time
- * <p> The default implementation currently does nothing, but overriding methods should call super.
- * @param monitor a monitor that can be used to show progress or provide cancellation.
- */
- public void initializeSubSystem(IProgressMonitor monitor) {
- }
-
- /**
- * Uninitialize this subsystem just after disconnect.
- * The default implementation currently does nothing.
- * Overriding methods should call super.
- * @param monitor a progress monitor that can be used to show uninitialization progress can provide cancellation.
- */
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- }
-
- /**
- * Attempt to connect to the remote system when a Shell is not available.
- * You do not need to override this, as it does the progress monitor and error message
- * displaying for you.
- * <p>
- * Override internalConnect if you want, but by default it calls getSystem().connect(IProgressMonitor).
- */
- public void connect() throws Exception {
- if (!isConnected()) {
- if (Display.getCurrent() == null) {
- ConnectFromBackgroundJob job = new ConnectFromBackgroundJob();
- job.setPriority(Job.INTERACTIVE);
- job.schedule();
- job.join();
- } else {
- connect(false);
- }
-// Display display = Display.getCurrent();
-// while (job.getResult() == null) {
-// while (display != null && display.readAndDispatch()) {
-// //Process everything on event queue
-// }
-// if (job.getResult() == null) Thread.sleep(200);
-// }
- }
- }
-
- /**
- * Connect to the remote system, optionally forcing a signon prompt even if the password
- * is cached in memory or on disk.
- * You do not need to override this, as it does the progress monitor and error message
- * displaying for you.
- * <p>
- * Override internalConnect if you want, but by default it calls getSystem().connect(IProgressMonitor).
- *
- * @param forcePrompt Forces the signon prompt to be displayed even if a valid password in cached in memory
- * or saved on disk.
- */
- public void connect(boolean forcePrompt) throws Exception {
- // yantzi: artemis60, (defect 53082) check that the connection has not been deleted before continuing,
- // this is a defenisve measure to protect against code that stores a handle to subsystems but does
- // not do this check
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- IHost host = getHost();
- String hostName = host.getAliasName();
- ISystemProfile profile = getSystemProfile();
- if (registry.getHost(profile, hostName) == null) { // connection no longer exists
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTION_DELETED);
- msg.makeSubstitution(hostName);
- throw new SystemMessageException(msg);
- }
- // yantzi: artemis 6.0, offline support
- if (isOffline()) {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OFFLINE_CANT_CONNECT);
- msg.makeSubstitution(hostName);
- throw new SystemMessageException(msg);
- }
- //DY operation = OPERATION_CONNECT;
- if (!isConnected() && supportsConnecting) {
- getRunnableContext(/*shell*/); // needed only for side effect of setting shell to the shell for the active workbench window
-//dwd IRunnableContext runnableContext = getRunnableContext(shell);
-//dwd if (runnableContext instanceof ProgressMonitorDialog) {
-//dwd ((ProgressMonitorDialog) runnableContext).setCancelable(true);
-//dwd }
- getConnectorService().promptForPassword(forcePrompt); // prompt for userid and password
- ConnectJob job = new ConnectJob();
- scheduleJob(job, null, shell != null);
- IStatus status = job.getResult();
- if (status != null && status.isOK()) {
- registry.connectedStatusChange(this, true, false);
- }
- }
- }
-
-
-
- /**
- * A convenience method, fully equivalent to promptForPassword(false).
- */
- public boolean promptForPassword() throws Exception
- {
- return promptForPassword(false);
- }
-
- /**
- * Prompt the user for a password to the remote system. The primary request was something else,
- * but we have detected the user is not connected so we prompt for password outside
- * of the progress monitor, then set a flag to do the connection within the progress
- * monitor.
- * @param force true if the prompting should be forced, false if prompting can be skipped if credentials have been stored.
- * @return true if the credentials are obtained
- */
- public boolean promptForPassword(boolean force) throws Exception
- {
- boolean ok = false;
- if (!supportsConnecting)
- return true;
-
- if (isOffline())
- {
- // offline so don't bother prompting
- doConnection = true; // this gets handled later when it comes time to connect
- return true;
- }
- else if (supportsCaching() && getCacheManager().isRestoreFromMemento())
- {
- doConnection = true; // this gets handled later when it comes time to connect
- return true;
- }
-
- try
- {
- getConnectorService().promptForPassword(force); // prompt for password
- doConnection = true;
- ok = true;
- }
- catch (InterruptedException exc) // user cancelled
- {
- throw exc;
- }
- catch (Exception exc)
- {
- showConnectErrorMessage(shell, getHostName(), getConnectorService().getPort(), exc);
- }
- return ok;
- }
-
- /**
- * Disconnect from the remote system
- * You do not need to override this, as it does the progress monitor and error message
- * displaying for you.
- * <p>
- * Override internalDisconnect if you want, but by default it calls getSystem().disconnect(IProgressMonitor).
- *
- */
- public void disconnect() throws Exception
- {
- disconnect(true);
- }
-
- /**
- * Disconnect from the remote system
- * You do not need to override this, as it does the progress monitor and error message
- * displaying for you.
- * <p>
- * Override internalDisconnect if you want, but by default it calls getSystem().disconnect(IProgressMonitor).
- *
- * @param collapseTree collapse the tree in the system view
- */
- public void disconnect(boolean collapseTree) throws Exception
- {
- _disconnecting = true;
- if (!isConnected() || !supportsConnecting)
- {
- // disconnected but may not have notified viewers (i.e. network problem)
- ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.connectedStatusChange(this, false, true, collapseTree);
- return;
- }
- /*
- try
- {
- */
-
- DisconnectJob job = new DisconnectJob(collapseTree, this);
- job.schedule();
- /*
- }
- catch (InterruptedException exc)
- {
- if (shell != null)
- showDisconnectCancelledMessage(shell, getHostName(), getConnectorService().getPort());
- throw exc;
- }
- finally
- {
- _disconnecting = false;
- _connectionError = false;
- }
- */
- }
-
- /**
- * Get a remote property. Subsystems interpret as they wish. Eg, this might be to get
- * a remote environment variable. This is only applicable if the subsystem factory reports
- * true for supportsProperties().
- * @param subject Identifies which object to get the properties of
- * @param keys the array of property keys.
- * @return the values for the given property keys.
- */
- public String[] getProperties(Object subject, String[] keys)
- throws Exception
- {
- boolean ok = true;
-
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- try
- {
- GetPropertiesJob job = new GetPropertiesJob(subject, keys);
-
- IStatus status = scheduleJob(job, null, true);
- if (status.isOK())
- {
- return job.getOutputStrings();
- }
- }
- catch (InterruptedException exc)
- {
- if (shell == null) throw exc;
- else showOperationCancelledMessage(shell);
- }
-
- }
- return null;
- }
-
- // ----------------------------------
- // METHODS THAT MUST BE OVERRIDDEN...
- // ----------------------------------
-
- /**
- * Return the {@link org.eclipse.rse.core.subsystems.IConnectorService IConnectorService} object that represents the live connection for this system.
- * This must return an object that implements {@link IConnectorService}. A good starting point for that
- * is the base class {@link AbstractConnectorService}.
- * <p>If you only have a single subsystem class, you may override this method to return the
- * IConnectorService object that manages the connect/disconnect actions. If, on the other hand,
- * you have multiple subsystem classes that desire to share a single IConnectorService connection,
- * (ie, share the same communications pipe) then do not override this. By default, this
- * calls getSystemManager() which returns an {@link AbstractConnectorServiceManager} object that manages maintaining a singleton
- * IConnectorService object per system connection. You should subclass AbstractSystemManager,
- * and override getSystemManager() to return a singleton instance of that subclass.
- * <p>Default implementation:</p>
- * <pre><code>
- * return getSystemManager().getSystemObject(this);
- * </code></pre>
- *
- * <p>We recommending using a subclass of {@link AbstractConnectorServiceManager} even for single
- * subsystems, because it doesn't hurt and allows easy growth if new subsystems
- * are added in the future.
- */
- public IConnectorService getConnectorService()
- {
- return _connectorService;
- }
-
- public void setConnectorService(IConnectorService connectorService)
- {
- if (_connectorService != connectorService)
- {
- _connectorService = connectorService;
- _connectorService.registerSubSystem(this);
- setDirty(true);
- }
- }
-
-
-
-
- /**
- * Check if the SubSystem supports caching. This is the default implementation
- * which returns false. Subclasses must override to support caching.
- */
- public boolean supportsCaching()
- {
- return false;
- }
-
- /**
- * Return the CacheManager for this subsystem. This is the default implementation
- * which just returns null.
- *
- * @see #supportsCaching()
- */
- public ICacheManager getCacheManager()
- {
- return null;
- }
-
- /**
- * Connect to the remote host. This is called by the run(IProgressMonitor monitor) method.
- * <p>
- * DO NOT OVERRIDE THIS. Rather, this calls connect(IProgressMonitor) in the
- * IConnectorService class that is returned from getConnectorService().
- * <p>
- * Your connect method in your IConnectorService class must follow these IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc)
- * - well, actually you can throw anything and we'll wrap it here in an InvocationTargetException
- * <li>do not worry about calling monitor.done() ... caller will do that.
- * </ul>
- *
- */
- protected void internalConnect(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException
- {
- try
- {
- getConnectorService().connect(monitor);
- }
- catch(InvocationTargetException exc) {
- throw exc;
- }
- catch (InterruptedException exc) {
- throw exc;
- }
- catch (Exception exc) {
- throw new InvocationTargetException(exc);
- }
- }
-
- /**
- * Actually disconnect from the remote host. This is called by the run(IProgressMonitor monitor) method.
- * <p>
- * You DO NOT OVERRIDE THIS. Rather, this calls connect(IProgressMonitor) in your
- * IConnectorService class that is returned from getConnectorService(). That is where your code to disconnect should go!
- * <p>
- * Your disconnect method in your IConnectorService class must follow these IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if the host is unknown, throw new java.lang.reflect.InvocationTargetException(new java.net.UnknownHostException));
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * - well, actually you can throw anything and we'll wrap it here in an InvocationTargetException
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- */
- protected void internalDisconnect(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException
- {
- try
- {
- getConnectorService().disconnect(monitor);
- }
- catch (InterruptedException exc) {
- throw exc;
- }
- catch (InvocationTargetException exc) {
- throw exc;
- }
- catch(Exception exc) {
- throw new InvocationTargetException(exc);
- }
- }
-
- /**
- * Resolve an <i>absolute</i> filter string. This is only applicable if the subsystem
- * factory reports true for {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()},
- * which is the default. Otherwise, {@link org.eclipse.rse.core.subsystems.SubSystem#getChildren()}
- * is called when the subsystem itself is expanded.
- * <p>
- * When a user <u>expands a filter</u> this method is invoked for each filter string and the
- * results are concatenated and displayed to the user. You can affect the post-concatenated
- * result by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- * <p>
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.ui.view.SystemView view}.
- * There are <u>two requirements</u> on the returned objects:</p>
- * <ol>
- * <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
- * <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
- * for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystem#isHidden() visible}
- * in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
- * with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
- * </ol>
- * <p>A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- * <p>
- * Be sure to register your adapter factory in your plugin's startup method.
- * <p>
- * Actually resolve an absolute filter string. This is called by the
- * run(IProgressMonitor monitor) method, which in turn is called by resolveFilterString.
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
- /**
- * Resolve multiple absolute filter strings. This is only applicable if the subsystem
- * factory reports true for supportsFilters().
- * <p>
- * This is the same as {@link #internalResolveFilterString(IProgressMonitor, Object, String)} but takes an array of
- * filter strings versus a single filter string.
- * <p>
- * The default implementation of this simply calls {@link #internalResolveFilterString(IProgressMonitor, String)}
- * once for each filter string, and concatenates the result. The method sortResolvedFilterStringObject
- * is called on the concatenated result, given subclasses an opportunity to sort the result.
- * <p>
- * After successful resolve, the sort method is called to sort the concatenated results before
- * returning them.
- * @param monitor the progress monitor we are running under
- * @param filterStrings array of filter patterns for objects to return.
- * @return Array of objects that are the result of resolving all the filter strings
- */
- public Object[] internalResolveFilterStrings(IProgressMonitor monitor, String[] filterStrings)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- Object[] children = null;
- Vector vChildren = new Vector();
- for (int idx=0; idx<filterStrings.length; idx++)
- {
- if (monitor != null)
- {
- monitor.setTaskName(getResolvingMessage(filterStrings[idx]));
- }
- children = internalResolveFilterString(monitor, filterStrings[idx]);
- //monitor.worked(1);
- if (children != null)
- addResolvedFilterStringObjects(vChildren, children, filterStrings, idx);
- }
- int nbrChildren = vChildren.size();
- children = new Object[nbrChildren];
- for (int idx=0; idx<nbrChildren; idx++)
- children[idx] = vChildren.elementAt(idx);
- return children;
- }
-
- /**
- * Overridable extension point for adding the results of a filter string
- * to the overall list of results.
- * <p>
- * Can be used to filter out redundant entries in the concatenated list, if this
- * is desired.
- */
- protected void addResolvedFilterStringObjects(Vector allChildrenSoFar, Object[] childrenForThisFilterString,
- String[] allFilterStrings, int currFilterStringIndex)
- {
- for (int jdx = 0; jdx<childrenForThisFilterString.length; jdx++)
- allChildrenSoFar.addElement(childrenForThisFilterString[jdx]);
- }
-
- /**
- * Resolve a <i>relative</i> filter string.
- * <p>
- * When a user <u>expands a remote resource</u> this method is invoked and the
- * results are potentially sorted and displayed to the user. You can affect the sorting
- * behaviour by overriding {@link #sortResolvedFilterStringObjects(Object[])} if you desire to
- * sort the result, say, or pick our redundancies.
- * <p>
- * The resulting objects are displayed in the tree in the Remote System {@link org.eclipse.rse.ui.view.SystemView view}.
- * There are <u>two requirements</u> on the returned objects:</p>
- * <ol>
- * <li>They must implement {@link org.eclipse.core.runtime.IAdaptable}.
- * <li>Their must be an RSE {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter} registered
- * for the object's class or interface type. Further, if this subsystem is {@link org.eclipse.rse.core.subsystems.SubSystem#isHidden visible}
- * in the RSE, which is the default, then there must also be an RSE {@link org.eclipse.rse.ui.view.ISystemViewElementAdapter GUI-adapter} registered
- * with the platform. The base class implementation of this interface is {@link org.eclipse.rse.ui.view.AbstractSystemViewAdapter}.
- * </ol>
- * <p>A good place to start with your remote-resource classes to subclasss {@link org.eclipse.rse.core.subsystems.AbstractResource}, as it
- * already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
- * implementing the {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter remote-adapter}.
- * <p>
- * Be sure to register your adapter factory in your plugin's startup method.
- * <p>
- * This is called by the run(IProgressMonitor monitor) method, which in turn is called by resolveFilterString.
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT FILTERS!
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
- /**
- * Called by resolveFilterString when given null for the filter string, meaning we defer
- * getting a filter string until later, where we query it from the parent. In this case
- * we need the first filter string for the progress monitor msg.<br>
- * Override if needed. By default we return "*";
- */
- protected String getFirstParentFilterString(Object parent)
- {
- return "*"; //$NON-NLS-1$
- }
-
-
- /**
- * Actually get a remote property. This is called by the
- * run(IProgressMonitor monitor) method, which in turn is called by getProperty(...).
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
- */
- protected String internalGetProperty(IProgressMonitor monitor, Object subject, String key)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
-
- /**
- * Actually set a remote property. This is called by the
- * run(IProgressMonitor monitor) method, which in turn is called by setProperty(...).
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
- */
- protected Object internalSetProperty(IProgressMonitor monitor, Object subject, String key, String value)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
-
- /**
- * Actually get multiple remote properties. This is called by the
- * run(IProgressMonitor monitor) method, which in turn is called by getProperties(...).
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
- */
- protected String[] internalGetProperties(IProgressMonitor monitor, Object subject, String[] keys)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
-
- /**
- * Actually set multiple remote properties. This is called by the
- * run(IProgressMonitor monitor) method, which in turn is called by setProperties(...).
- * <p>
- * As per IRunnableWithProgress rules:
- * <ul>
- * <li>if the user cancels (monitor.isCanceled()), throw new InterruptedException()
- * <li>if something else bad happens, throw new java.lang.reflect.InvocationTargetException(exc);
- * <li>do not worry about calling monitor.done() ... caller will do that!
- * </ul>
- * YOU MUST OVERRIDE THIS IF YOU SUPPORT PROPERTIES!
- */
- protected Object internalSetProperties(IProgressMonitor monitor, Object subject, String[] keys, String[] values)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- return null;
- }
-
-
-
-
- /**
- * Get the progress monitor dialog for this operation. We try to
- * use one for all phases of a single operation, such as connecting
- * and resolving.
- */
- protected IRunnableContext getRunnableContext(/*Shell rshell*/) {
- if (Display.getCurrent() == null) {
- return new NullRunnableContext();
- }
- // for wizards and dialogs use the specified context that was placed in the registry
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext();
- if (irc != null) {
- SystemBasePlugin.logInfo("Got runnable context from system registry"); //$NON-NLS-1$
- return irc;
- } else {
- // for other cases, use statusbar
- IWorkbenchWindow win = SystemBasePlugin.getActiveWorkbenchWindow();
- if (win != null) {
- Shell winShell = getActiveWorkbenchShell();
- if (winShell != null && !winShell.isDisposed() && winShell.isVisible()) {
- SystemBasePlugin.logInfo("Using active workbench window as runnable context"); //$NON-NLS-1$
- shell = winShell;
- return win;
-//dwd } else {
-//dwd win = null;
- }
- }
-//dwd if (shell == null || shell.isDisposed() || !shell.isVisible()) {
-//dwd SystemBasePlugin.logInfo("Using progress monitor dialog with given shell as parent");
-//dwd shell = rshell;
-//dwd }
-//dwd IRunnableContext dlg = new ProgressMonitorDialog(rshell);
- IRunnableContext dlg = new ProgressMonitorDialog(shell);
- return dlg;
- }
- }
-
- /**
- * Return the shell for the current operation
- */
- protected Shell getShell()
- {
- return shell;
- }
-
- /**
- * Helper/convenience method. Return shell of active window.
- */
- public static Shell getActiveWorkbenchShell()
- {
- Shell result = null;
- if (PlatformUI.isWorkbenchRunning())
- {
- try
- {
- IWorkbenchWindow window = getActiveWorkbenchWindow();
- if (window != null)
- {
- result = window.getShell();
- }
- }
- catch (Exception e)
- {
- return null;
- }
- }
- else // workbench has not been loaded yet!
- {
- return null;
- }
- return result;
- }
- /**
- * Helper/convenience method. Return active window
- */
- public static IWorkbenchWindow getActiveWorkbenchWindow()
- {
- return RSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
- }
-
- /**
- * <i><b>Private</b>. Do not override.</i>
- * @generated This field/method will be replaced during code generation
- */
- public String getName()
- {
- return _name;
- }
-
- /**
- * <i><b>Private</b>. Do not override.</i>
- * @generated This field/method will be replaced during code generation.
- */
- public void setName(String newName)
- {
- String oldName = _name;
- if (oldName == null || !oldName.equals(newName))
- {
- _name = newName;
- setDirty(true);
- }
- }
-
-
-
-
- /**
- * <i><b>Private</b>. Do not override.</i>
- * @generated This field/method will be replaced during code generation
- * Ties this subsystem to its owning subsystemconfiguration, via the
- * id key string of the configuration.
- */
- public String getConfigurationId()
- {
- return _subsystemConfigurationId;
- }
-
- /**
- * <i><b>Private</b>. Do not override.</i>
- * @generated This field/method will be replaced during code generation.
- */
- public void setConfigurationId(String newConfigurationId)
- {
- String oldFactoryId = _subsystemConfigurationId;
- if (oldFactoryId == null || !oldFactoryId.equals(newConfigurationId))
- {
- _subsystemConfigurationId = newConfigurationId;
- setDirty(true);
- }
- }
-
- /**
- * <i><b>Private</b>. Do not override.</i>
- * @generated This field/method will be replaced during code generation
- */
- public boolean isHidden()
- {
- return _hidden;
- }
-
- /**
- * <i><b>Private</b>. Do not override.</i>
- * @generated This field/method will be replaced during code generation.
- */
- public void setHidden(boolean newHidden)
- {
- boolean oldHidden = _hidden;
- if (oldHidden != newHidden)
- {
- _hidden = newHidden;
- setDirty(true);
- }
- }
-
- /**
- * <i><b>Private</b>. Do not override.</i>
- * @generated This field/method will be replaced during code generation
- */
- public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager()
- {
- return filterPoolReferenceManager;
- }
-
- public void setFilterPoolReferenceManager(ISystemFilterPoolReferenceManager newFilterPoolReferenceManager)
- {
- filterPoolReferenceManager = newFilterPoolReferenceManager;
- return;
- }
-
-
-
-
- /**
- * @return true if this subsystem's properties should take precedence
- * over other subsystems that share the same IConnectorService
- */
- public boolean isPrimarySubSystem()
- {
- return false;
- }
-
- /*
- * Returns the first subsystem associated with the connection
- */
- public ISubSystem getPrimarySubSystem()
- {
- ISubSystem firstSS = null;
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] sses = registry.getSubSystems(getHost(), false);
- for (int i = 0; i < sses.length; i++)
- {
- ISubSystem ss = sses[i];
- if (ss.getConnectorService() == getConnectorService())
- {
- if (firstSS == null)
- {
- firstSS = ss;
- }
- if (ss.isPrimarySubSystem())
- {
- return ss;
- }
- }
- }
- if (firstSS == null)
- {
- firstSS = this;
- }
- return firstSS;
- }
-
-
-
- public Object getTargetForFilter(ISystemFilterReference filterRef)
- {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#isConnectionError()
- */
- public boolean isConnectionError()
- {
- return _connectionError;
- }
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#setConnectionError(boolean)
- */
- public void setConnectionError(boolean error)
- {
- _connectionError = error;
- }
-
- public Object[] getTargetsForFilter(ISystemFilterReference filterRef)
- {
- return null;
- }
-
- /**
- * @see org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- */
- public boolean contains(ISchedulingRule rule)
- {
- if (this.equals(rule)) return true;
- if (rule instanceof IResource) return true;
- else return false;
- }
-
- /**
- * @see org.eclipse.core.runtime.jobs.ISchedulingRule#isConflicting(org.eclipse.core.runtime.jobs.ISchedulingRule)
- */
- public boolean isConflicting(ISchedulingRule rule)
- {
- if (this == rule) return true;
- else return false;
- }
-
- public boolean commit()
- {
- return RSEUIPlugin.getThePersistenceManager().commit(this);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java
deleted file mode 100644
index 298b18d27..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java
+++ /dev/null
@@ -1,3050 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.SystemPreferencesManager;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterContainerReference;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterSavePolicies;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.filters.SystemFilterPoolManager;
-import org.eclipse.rse.core.internal.subsystems.RemoteServerLauncherConstants;
-import org.eclipse.rse.core.internal.subsystems.SubSystemConfigurationProxy;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.filters.SystemFilterPoolWrapperInformation;
-import org.eclipse.rse.filters.SystemFilterStartHere;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.model.SystemStartHere;
-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.SystemMenuManager;
-import org.eclipse.rse.ui.SystemPropertyResources;
-import org.eclipse.rse.ui.SystemResources;
-import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.propertypages.ISystemSubSystemPropertyPageCoreForm;
-import org.eclipse.rse.ui.propertypages.SystemSubSystemPropertyPageCoreForm;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorSpecialChar;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.widgets.IServerLauncherForm;
-import org.eclipse.rse.ui.widgets.RemoteServerLauncherForm;
-import org.eclipse.rse.ui.wizards.ISubSystemPropertiesWizardPage;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-
-/**
- * Abstract base class for subsystem factory extension points.
- * Child classes must implement the methods:
- * <ul>
- * <li>#createSubSystemInternal(SystemConnection conn)
- * </ul>
- * Child classes can optionally override:
- * <ul>
- * <li>SubSystemConfiguration#supportsFilters() to indicate if filters are to be enabled for this factory
- * <li>SubSystemConfiguration#supportsNestedFilters() to indicate if filters can exist inside filters.
- * <li>SubSystemConfiguration#supportsDuplicateFilterStrings() to indicate if filter strings can be duplicated within a filter
- * <li>SubSystemConfiguration#isCaseSensitive() to indicate if filter strings are case sensitive or not
- * <li>SubSystemConfiguration#supportsQuickFilters() to indicate if filters can be specified at contain expansion time.
- * <li>SubSystemConfiguration#supportsUserActions() to indicate if users can define their own actions for your subsystems' child objects.
- * <li>SubSystemConfiguration#supportsCompileActions() to indicate if users can compile remote objects using menu actions
- * <li>SubSystemConfiguration#supportsFileTypes() to indicate if users can define their own named file types.
- * <li>SubSystemConfiguration#isSubSystemsDeletable() if they support user-deleting of subsystems. Default is false.
- * <li>SubSystemConfiguration#supportsSubSystemConnect() to return false if the connect() action is not supported
- * <li>SubSystemConfiguration#supportsTargets() to return true if this factory supports the notions of targets. Normally, this is only for file system factories.
- * <li>SubSystemConfiguration#getSubSystemActions() if they wish to supply actions for the right-click menu when
- * the user right clicks on a subsystem object created by this factory.
- * <li>CreateDefaultFilterPool() to create any default filter pool when a new profile is created.
- * <li>#initializeSubSystem(SubSystem ss, ISystemNewConnectionWizardPage[])
- * </ul>
- * <p>
- * A factory will maintain in memory a list of all subsystem objects it has. This
- * list should be initialize from disk at restore time, and maintained as the subsystems are
- * created and deleted throughout the session. At save time, each subsystem in the list
- * is asked to save itself. The getSubSystems method should return this list.
- * <p>
- * To help with maintaining this list, this base class contains a Vector instance variable
- * named subsystems. It is returned by the getSubSystems method in this base class. For this
- * to be accurate you though, you should:
- * <ul>
- * <li>Not implement createSubSystem directly, but rather let this class handle it. Instead
- * implement the method createSubSystemInternal. This is called by createSubSystem in this
- * class.
- * </ul>
- * Should you prefer to maintain your own list, simply override getSubSystems.
- */
-
-public abstract class SubSystemConfiguration implements ISubSystemConfiguration
-{
-
-
- // subsystem stuff...
- private Hashtable subSystemsRestoredFlags = new Hashtable();
- private ISubSystemConfigurationProxy proxy = null;
- private ISubSystem[] subsystems = null;
- private Hashtable subsystemsByConnection = new Hashtable();
-
- private boolean allSubSystemsRestored = false;
- private static final ISubSystem[] EMPTY_SUBSYSTEM_ARRAY = new ISubSystem[0];
-
- // filters stuff...
- protected SubSystemFilterNamingPolicy filterNamingPolicy = new SubSystemFilterNamingPolicy();
- protected ISystemFilterPoolManager[] filterPoolManagers = null;
- protected Hashtable filterPoolManagersPerProfile = new Hashtable();
-
-
- // other stuff...
- private String translatedFilterType = null;
- private static Hashtable brokenReferenceWarningsIssued = new Hashtable();
- protected Hashtable imageTable = null;
- protected IHost currentlySelectedConnection;
- protected Object[] currentlySelected;
-
- // support for default subclasses for non-mof users
- protected static IHost currentlyProcessingConnection;
- protected static SubSystemConfiguration currentlyProcessingSubSystemConfiguration;
-
-
- protected java.util.List subSystemList = null;
- protected java.util.List filterPoolManagerList = null;
-
- protected boolean _isDirty;
-
-
- /**
- * Constructor
- */
- public SubSystemConfiguration()
- {
- super();
- //initSubSystems();
- SystemBasePlugin.logDebugMessage(this.getClass().getName(), "STARTED SSFACTORY"); //$NON-NLS-1$
- }
-
-
-
- /**
- * Reset for a full refresh from disk, such as after a team synch.
- * Override this as required, but please call super.reset()!!
- */
- public void reset()
- {
- subSystemsRestoredFlags = new Hashtable();
- subsystems = null;
- subsystemsByConnection = new Hashtable();
- allSubSystemsRestored = false;
- filterPoolManagersPerProfile = new Hashtable();
- filterPoolManagers = null;
- brokenReferenceWarningsIssued = new Hashtable();
- }
-
- // ---------------------------------
- // CRITICAL METHODS...
- // ---------------------------------
-
- /**
- * Return true if instance of this factory's subsystems support connect and disconnect actions.
- * <b>By default, returns true</b>.
- * Override if this is not the case.
- */
- public boolean supportsSubSystemConnect()
- {
- return true;
- }
- /**
- * Return true (default) or false to indicate if subsystems of this factory support user-editable
- * port numbers.
- */
- public boolean isPortEditable()
- {
- return true;
- }
- /**
- * Return true if subsystem instances from this factory support remote command execution
- * <p>RETURNS FALSE BY DEFAULT.
- */
- public boolean supportsCommands()
- {
- return false;
- }
- /**
- * Return true if subsystem instances from this factory support getting and setting properties
- * <p>RETURNS FALSE BY DEFAULT.
- */
- public boolean supportsProperties()
- {
- return false;
- }
- /**
- * Return true if you support filters, false otherwise.
- * If you support filters, then some housekeeping will be
- * done for you automatically. Specifically, they
- * will be saved and restored for you automatically.
- * The default is to support filters.
- */
- public boolean supportsFilters() {
- return true;
- }
-
- /**
- * Indicates whether the subsystem supports displaying children under
- * its filters. By default, this will return true, but if filters that can't
- * be expanded are desired, this can be overridden to return false.
- */
- public boolean supportsFilterChildren()
- {
- return true;
- }
-
- /**
- * Required method for subsystem factory child classes. Return true if you filter caching.
- * If you support filter caching, then the views will always check the in-memory cache for
- * filter results before attempting a query.
- * <p>Returns true in default implementation.
- */
- public boolean supportsFilterCaching()
- {
- return true;
- }
-
- /**
- * Required method for subsystem factory child classes. Return true if you support filters, and you support
- * multiple filter strings per filter. Return false to restrict the user to one string per filter.
- * <p>Returns TRUE by default.
- */
- public boolean supportsMultipleFilterStrings()
- {
- return true;
- }
-
- /**
- * Required method for subsystem factory child classes if returning true from supportsFilters.
- * Return true if you support filters within filters, false otherwise.
- * <p>RETURNS supportsFilters() BY DEFAULT.
- */
- public boolean supportsNestedFilters()
- {
- return supportsFilters();
- }
- /**
- * Return true if you support quick filters. These allow the user to subset a remote system object at
- * the time they expand it in the remote system explorer tree view.
- * <p>RETURNS supportsFilters() BY DEFAULT.
- * <p>THIS IS NOT SUPPORTED BY THE FRAMEWORK YET
- */
- public boolean supportsQuickFilters()
- {
- return supportsFilters();
- }
-
- /**
- * Return true if filters of this subsystem factory support dropping into.
- * Override this method to provide drop support for filters.
- */
- public boolean supportsDropInFilters()
- {
- return false;
- }
-
- /**
- * Return true if filters of this subsystem factory provide a custom implementation of drop support.
- * By default, the filter reference adapter treats a drop on a filter as an update to the list of filter
- * strings for a filter. For things like files, it is more desirable to treat the drop as a physical
- * resource copy, so in that case, custom drop makes sense.
- *
- * By default this returns false.
- */
- public boolean providesCustomDropInFilters()
- {
- return false;
- }
-
- /**
- * Return true if you support user-defined actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem factory
- * <p>RETURNS false BY DEFAULT
- *
- * @see #supportsUserDefinedActions(ISelection)
- * @see #getActionSubSystem(ISubSystem)
- * @see #createActionSubSystem()
- */
- public boolean supportsUserDefinedActions()
- {
- return false;
- }
-
-
- /**
- * Return true if you support user-defined actions for the remote system objects explicitly given. This
- * calls supportsUserDefinedActions() by default. It is called when decided whether or not to show
- * the User Actions menu for the current selection, if supportsUserDefinedActions() returns true.
- *
- * @see #getActionSubSystem(ISubSystem)
- * @see #createActionSubSystem()
- * @see #addCommonRemoteActions(SystemMenuManager, IStructuredSelection, Shell, String, ISubSystem)
- */
- public boolean supportsUserDefinedActions(ISelection selection)
- {
- // no selection or empty selection, so default to subsystem factory
- if (selection == null || selection.isEmpty()) {
- return supportsUserDefinedActions();
- }
- else {
-
- // selection is a structured selection
- if (selection instanceof IStructuredSelection) {
-
- IStructuredSelection sel = (IStructuredSelection)selection;
-
- Iterator iter = sel.iterator();
-
- boolean supportsUserDefinedActions = true;
-
- // check if adapter of each object supports user defined actions
- while (iter.hasNext()) {
- Object obj = iter.next();
-
- // we query adapter as to whether it supports user defined actions only
- // if the adapter is a remote element adapter
- ISystemRemoteElementAdapter adapter = (ISystemRemoteElementAdapter)(Platform.getAdapterManager().getAdapter(obj, ISystemRemoteElementAdapter.class));
-
- if (adapter != null) {
- supportsUserDefinedActions = adapter.supportsUserDefinedActions(obj);
- }
- else {
- supportsUserDefinedActions = supportsUserDefinedActions();
- }
-
- // if one of the selections doesn't support user defined actions, we return false
- if (!supportsUserDefinedActions) {
- return false;
- }
- }
-
- // all adapters support user defined actions, so return whether the subsystem factory
- // supports user defined actions
- return supportsUserDefinedActions();
- }
- // not a structured selection, so default to asking subsystem factory
- else {
- return supportsUserDefinedActions();
- }
- }
- }
- /**
- * Return true if you support compile actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem factory.
- * <p>
- * By returning true, user sees a "Work with->Compile Commands..." action item in the popup menu for this
- * subsystem. The action is supplied by the framework, but is populated using overridable methods in this subsystem.
- * <p>RETURNS false BY DEFAULT
- * @see #getCompileManager()
- * @see #createCompileManager()
- */
- public boolean supportsCompileActions()
- {
- return false;
- }
-
- /**
- * Return true if you support user-defined/managed named file types
- * <p>RETURNS false BY DEFAULT
- */
- public boolean supportsFileTypes()
- {
- return false;
- }
-
- /**
- * Return true if the subsystem supports more than one filter string
- * <p>RETURNS true BY DEFAULT
- */
- public boolean supportsMultiStringFilters()
- {
- return true;
- }
-
- /**
- * Return true if the subsystem supports the exporting of filter strings from it's filters
- * <p>RETURNS true BY DEFAULT
- */
- public boolean supportsFilterStringExport()
- {
- return true;
- }
-
- /**
- * Tell us if filter strings are case sensitive. The default is false.
- */
- public boolean isCaseSensitive()
- {
- return false;
- }
- /**
- * Tell us if duplicate filter strings are supported. The default is false.
- */
- public boolean supportsDuplicateFilterStrings()
- {
- return false;
- }
- /**
- * Tell us if this subsystem factory supports targets, which are destinations for
- * pushes and builds. Normally only true for file system factories.
- */
- public boolean supportsTargets()
- {
- return false;
- }
- /**
- * Tell us if this subsystem factory supports server launch properties, which allow the user
- * to configure how the server-side code for these subsystems are started. There is a Server
- * Launch Setting property page, with a pluggable composite, where users can configure these
- * properties.
- * <p>
- * If you return true here, you may also want to override {@link #supportsServerLaunchType(ServerLaunchType)}.
- * <br> By default we return false here. This is overridden in UniversalFileSubSystemConfiguration though.
- */
- public boolean supportsServerLaunchProperties(IHost host) {
- return false;
- }
-
- /**
- * If {@link #supportsServerLaunchProperties(IHost)} returns true, this method may be called by
- * the server launcher to decide if a given remote server launch type is supported or not.
- * <br> We return true by default.
- * @see org.eclipse.rse.core.subsystems.ServerLaunchType
- * @see #getServerLauncherForm(Shell, ISystemMessageLine)
- */
- public boolean supportsServerLaunchType(ServerLaunchType serverLaunchType)
- {
- return true;
- }
-
- /**
- * Determines whether this factory is responsible for the creation of subsytems of the specified type
- * Subsystem factories should override this to indicate which subsystems they support.
- *
- * @param subSystemType type of subsystem
- * @return whether this factory is for the specified subsystemtype
- */
- public boolean isFactoryFor(Class subSystemType)
- {
- //return SubSystem.class.isAssignableFrom(subSystemType);
- return false;
- }
-
- /*
- * Return the form used in the subsyste property page. This default implementation returns Syste
- */
- public ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISystemMessageLine msgLine, Object caller)
- {
- return new SystemSubSystemPropertyPageCoreForm(msgLine, caller);
- }
-
- /**
- * Gets the list of property pages applicable for a subsystem associated with this factory
- * @return the list of subsystem property pages
- */
- protected List getSubSystemPropertyPages()
- {
- List propertyPages= new ArrayList();
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // Get configured property page extenders
- IConfigurationElement[] propertyPageExtensions =
- registry.getConfigurationElementsFor("org.eclipse.ui", "propertyPages"); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < propertyPageExtensions.length; i++)
- {
- IConfigurationElement configurationElement = propertyPageExtensions[i];
- String objectClass = configurationElement.getAttribute("objectClass"); //$NON-NLS-1$
- String name = configurationElement.getAttribute("name"); //$NON-NLS-1$
- Class objCls = null;
- try
- {
- ClassLoader loader = getClass().getClassLoader();
- objCls = Class.forName(objectClass, false, loader);
- }
- catch (Exception e)
- {
- }
-
-
- if (objCls != null && ISubSystem.class.isAssignableFrom(objCls) && isFactoryFor(objCls))
- {
- try
- {
- PropertyPage page = (PropertyPage) configurationElement.createExecutableExtension("class"); //$NON-NLS-1$
- page.setTitle(name);
- propertyPages.add(page);
- }
- catch (Exception e)
- {
- }
- }
- }
- return propertyPages;
- }
-
-
-
-
-
-// FIXME - compile actions no longer part of core
-// // ---------------------------------
-// // COMPILE ACTIONS METHODS...
-// // ---------------------------------
-// /**
-// * Get the singleton compile manager responsible for enabling the compile support
-// * for remote source objects.
-// * <p>
-// * Do not override this, as the implementation is complete. However,
-// * you must override createCompileManager()
-// *
-// * @see #supportsCompileActions()
-// * @see #createCompileManager()
-// */
-// public SystemCompileManager getCompileManager()
-// {
-// if (compileManager == null)
-// {
-// compileManager = createCompileManager();
-// if (compileManager != null)
-// compileManager.setSubSystemConfiguration(this);
-// }
-// return compileManager;
-// }
-//
-// /**
-// * Overridable method to instantiate the SystemCompileManager for this factory.
-// * This is typically your unique subclass of SystemCompileManager.
-// * Called once only by getCompileManager (it is only instantiated once).
-// *
-// * @see #supportsCompileActions()
-// * @see #getCompileManager()
-// */
-// protected SystemCompileManager createCompileManager()
-// {
-// return null;
-// }
-
- // ---------------------------------
- // USER-PREFERENCE METHODS...
- // ---------------------------------
-
- /**
- * If we support filters, should we show filter pools in the remote system explorer?
- * By default, this retrieves the setting from user preferences.
- */
- public boolean showFilterPools()
- {
- return SystemPreferencesManager.getPreferencesManager().getShowFilterPools();
- }
- /*
- * If we support filters, should we show filter strings in the remote system explorer?
- * By default, this retrieves the setting from user preferences.
- *
- public boolean showFilterStrings()
- {
- return SystemPreferencesManager.getPreferencesManager().getShowFilterStrings();
- }*/
- /**
- * If we support filters, should we show filter pools in the remote system explorer?
- * This is to set it after the user changes it in the user preferences. It may require
- * refreshing the current view.
- */
- public void setShowFilterPools(boolean show)
- {
- ISubSystem[] subsystems = getSubSystems(false); // false=> lazy get; don't restore from disk if not already
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- ISubSystem ss = subsystems[idx];
- RSEUIPlugin.getTheSystemRegistry().fireEvent(new org.eclipse.rse.model.SystemResourceChangeEvent(ss, ISystemResourceChangeEvents.EVENT_CHANGE_CHILDREN, ss));
- }
- }
-
- // ---------------------------------
- // PROXY METHODS. USED INTERNALLY...
- // ---------------------------------
-
- /**
- * The following is called for you by the SubSystemConfigurationProxy, after
- * starting this object via the extension point mechanism
- */
- public void setSubSystemConfigurationProxy(ISubSystemConfigurationProxy proxy)
- {
- this.proxy = proxy;
- //FIXME initMOF();
- }
- /**
- * The following is here for completeness but should never be needed.
- */
- public ISubSystemConfigurationProxy getSubSystemConfigurationProxy()
- {
- return proxy;
- }
-
- // ---------------------------------
- // FACTORY ATTRIBUTE METHODS...
- // ---------------------------------
-
- /**
- * Return vendor of this factory.
- * This comes from the xml "vendor" attribute of the extension point.
- */
- public String getVendor()
- {
- return proxy.getVendor();
- }
-
- /**
- * Return name of this factory.
- * This comes from the xml "name" attribute of the extension point.
- */
- public String getName()
- {
- return proxy.getName();
- }
-
- /**
- * Return name of this factory.
- * This comes from the xml "description" attribute of the extension point.
- */
- public String getDescription()
- {
- return proxy.getDescription();
- }
-
- /**
- * Return unique id of this factory.
- * This comes from the xml "id" attribute of the extension point.
- */
- public String getId()
- {
- return proxy.getId();
- }
- /**
- * Return image descriptor of this factory.
- * This comes from the xml "icon" attribute of the extension point.
- */
- public ImageDescriptor getImage()
- {
- return ((SubSystemConfigurationProxy)proxy).getImage();
- }
- /**
- * Return actual graphics Image of this factory.
- * This is the same as calling getImage().createImage() but the resulting
- * image is cached.
- */
- public Image getGraphicsImage()
- {
- ImageDescriptor id = getImage();
- if (id != null)
- {
- Image image = null;
- if (imageTable == null)
- imageTable = new Hashtable();
- else
- image = (Image) imageTable.get(id);
- if (image == null)
- {
- image = id.createImage();
- imageTable.put(id, image);
- }
- return image;
- }
- return null;
- }
-
- /**
- * Return image to use when this susystem is connection.
- * This comes from the xml "iconlive" attribute of the extension point.
- */
- public ImageDescriptor getLiveImage()
- {
- return ((SubSystemConfigurationProxy)proxy).getLiveImage();
- }
-
- /**
- * Return actual graphics LiveImage of this factory.
- * This is the same as calling getLiveImage().createImage() but the resulting
- * image is cached.
- */
- public Image getGraphicsLiveImage()
- {
- ImageDescriptor id = getLiveImage();
- if (id != null)
- {
- Image image = null;
- if (imageTable == null)
- imageTable = new Hashtable();
- else
- image = (Image) imageTable.get(id);
- if (image == null)
- {
- image = id.createImage();
- imageTable.put(id, image);
- }
- return image;
- }
- return null;
- }
-
- /**
- * Return the category this subsystem factory subscribes to.
- * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories
- */
- public String getCategory()
- {
- return proxy.getCategory();
- }
- /**
- * Return the system types this subsystem factory supports.
- */
- public String[] getSystemTypes()
- {
- return proxy.getSystemTypes();
- }
-
- // ---------------------------------
- // PROFILE METHODS...
- // ---------------------------------
-
- // private methods...
-
- /**
- * Get a profile object given its name
- */
- public ISystemProfile getSystemProfile(String name)
- {
- return SystemProfileManager.getSystemProfileManager().getSystemProfile(name);
- }
-
- /**
- * Get a profile object given a filter pool manager object
- */
- protected ISystemProfile getSystemProfile(ISystemFilterPoolManager poolMgr)
- {
- return getSystemProfile(getSystemProfileName(poolMgr));
- }
-
- /**
- * Get owning profile object given a filter pool object
- */
- public ISystemProfile getSystemProfile(ISystemFilterPool pool)
- {
- return getSystemProfile(pool.getSystemFilterPoolManager());
- }
-
- /**
- * Get a profile object given a filter object
- */
- protected ISystemProfile getSystemProfile(ISystemFilter filter)
- {
- return getSystemProfile(filter.getParentFilterPool());
- }
-
- /**
- * Called by SystemRegistry when we are about to delete a profile.
- * <p>
- * Our only mission is to delete the filter pool associated with it,
- * because the registry has already called deleteSubSystemsByConnection
- * for every subsystem of every connection owned by this profile.
- */
- public void deletingSystemProfile(ISystemProfile profile)
- {
- deleteFilterPoolManager(profile);
- }
- /**
- * Called by SystemRegistry when we have toggled the active-status of a profile
- */
- public void changingSystemProfileActiveStatus(ISystemProfile profile, boolean newStatus)
- {
- if (newStatus) // making a profile active/
- {
- allSubSystemsRestored = false; // next call to getSubSystems will restore the subsystems for the newly activated connections
- }
- }
-
- // ---------------------------------
- // SUBSYSTEM METHODS...
- // ---------------------------------
- /**
- * Return the validator for the userId.
- * A default is supplied.
- * Note this is only used for the subsystem's properties, so will not
- * be used by the connection's default. Thus, is only of limited value.
- * <p>
- * This must be castable to ICellEditorValidator for the property sheet support.
- */
- public ISystemValidator getUserIdValidator()
- {
- ISystemValidator userIdValidator =
- new ValidatorSpecialChar(
- "=;", //$NON-NLS-1$
- false,
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_NOTVALID),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY));
- // false => allow empty? No.
- return userIdValidator;
- }
-
-
- /**
- * Called by SystemRegistry's renameSystemProfile method to ensure we update our
- * subsystem names within each subsystem.
- * <p>
- * This is called AFTER changing the profile's name!!
- */
- public void renameSubSystemProfile(ISubSystem ss, String oldProfileName, String newProfileName)
- {
- //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();
- if (sfprm != null)
- {
- sfprm.regenerateReferencedSystemFilterPoolNames(); // ask it to re-ask each pool for its reference name
- }
- try
- {
- saveSubSystem(ss);
- }
- catch (Exception exc)
- {
- // already dealt with in save?
- }
-
- }
-
- /**
- * Called by SystemRegistry's renameSystemProfile method to pre-test if we are going to run into errors on a
- * profile rename, due to file or folder in use.
- */
- public void preTestRenameSubSystemProfile(String oldProfileName) throws Exception
- {
- ISystemProfile profile = getSystemProfile(oldProfileName);
- if (profile.isDefaultPrivate())
- {
- ISystemFilterPool defaultPoolForThisProfile = getDefaultFilterPool(profile, oldProfileName);
- if (defaultPoolForThisProfile != null)
- getFilterPoolManager(profile).preTestRenameFilterPool(defaultPoolForThisProfile);
- }
- }
-
- /**
- * Return the default filter pool for the given profile...
- */
- public ISystemFilterPool getDefaultFilterPool(ISystemProfile profile, String oldProfileName)
- {
- ISystemFilterPool pool = null;
- ISystemFilterPoolManager mgr = getFilterPoolManager(profile);
- ISystemFilterPool[] pools = mgr.getSystemFilterPools();
- if (pools != null)
- {
- for (int idx = 0; (pool==null) && (idx < pools.length); idx++)
- {
- // first and best test
- if (pools[idx].isDefault() && pools[idx].getName().equals(getDefaultFilterPoolName(oldProfileName, getId())))
- pool = pools[idx];
- }
- if (pool == null) // no perfect match?
- pool = mgr.getFirstDefaultSystemFilterPool(); // settle for 2nd best. It may be that the filter was created in a different language.
- }
-
- return pool;
- }
-
- /**
- * Called by SystemRegistry's renameConnection method to ensure we update our
- * connection names within each subsystem.
- * <p>
- * Must be called prior to changing the connection's name!!
- */
- public void renameSubSystemsByConnection(IHost conn, String newConnectionName)
- {
- ISubSystem[] subsystems = getSubSystems(conn, ISubSystemConfiguration.FORCE_INTO_MEMORY);
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- subsystems[idx].renamingConnection(newConnectionName);
- }
- try
- {
- saveSubSystems(conn);
- }
- catch (Exception exc)
- {
- // already dealt with in save?
- }
- }
- /**
- * Called by SystemRegistry's deleteConnection method to ensure we delete all our
- * subsystems for a given connection.
- */
- public void deleteSubSystemsByConnection(IHost conn)
- {
- ISubSystem[] subsystems = conn.getSubSystems();
-
- //System.out.println("in deleteSubSystemsByConnection. Nbr subsystems = " + subsystems.length);
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- if (subsystems[idx].isConnected())
- {
- try
- {
- subsystems[idx].disconnect(); // be nice if we had a shell to pass!
- }
- catch (Exception exc)
- {
- }
- }
- subsystems[idx].deletingConnection(); // let subsystem do any clean up needed prior to death
- deleteSubSystem(subsystems[idx]);
- }
- invalidateSubSystemCache(conn);
- try
- {
- saveSubSystems(conn);
- }
- catch (Exception exc)
- {
- // already dealt with?
- }
- }
-
- /**
- * Invalidate internal cached array of subsystems. Call whenever
- * a new subsystem is created, repositioned or deleted.
- */
- protected void invalidateSubSystemCache(IHost conn)
- {
- subsystems = null;
- if (conn != null)
- subsystemsByConnection.remove(conn); // remove key and value
- }
-
- /**
- * Return list of all subsystems.
- * @param force true if we should force all the subsystems to be restored from disk if not already
- */
- public ISubSystem[] getSubSystems(boolean force)
- {
- if (force && !allSubSystemsRestored)
- {
- // 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 = RSEUIPlugin.getTheSystemRegistry().getHosts();
- if (allActiveConnections != null)
- {
- for (int idx = 0; idx < allActiveConnections.length; idx++)
- if (proxy.appliesToSystemType(allActiveConnections[idx].getSystemType()))
- getSubSystems(allActiveConnections[idx], force); // will load from disk if not already loaded
- }
- allSubSystemsRestored = true;
- subsystems = null; // force re-gen
- }
- if ((subsystems == null) || (subsystems.length != getSubSystemList().size()))
- {
- java.util.List alist = null;
- if (SystemProfileManager.getSystemProfileManager().getSystemProfileNamesVector().size() > 0) // 42913
- alist = getSubSystemList();
- if (alist == null)
- return new ISubSystem[0];
- Iterator i = alist.iterator();
- subsystems = new ISubSystem[alist.size()];
- int idx = 0;
- while (i.hasNext())
- {
- ISubSystem subsys = (ISubSystem) i.next();
- subsystems[idx++] = subsys;
- }
- }
- return subsystems;
- }
-
- /**
- * Returns a list of subsystem objects existing for the given connection.
- * For performance, the calculated array is cached until something changes.
- * @param conn System connection to retrieve subsystems for
- * @param force true if we should force all the subsystems to be restored from disk if not already
- */
- public ISubSystem[] getSubSystems(IHost conn, boolean force)
- {
- ISubSystem[] subsystemArray = (ISubSystem[]) subsystemsByConnection.get(conn);
- if (subsystemArray == null || subsystemArray.length ==0)
- {
- //System.out.println("SubSystemConfigurationImpl.getSubSystems(conn): subSystemsHaveBeenRestored(conn): "+subSystemsHaveBeenRestored(conn));
- boolean subsystemsRestored = subSystemsHaveBeenRestored(conn);
- if (!subsystemsRestored && force)
- {
- /*FIXME - this should now be triggered by new persistence model
- try
- {
- //System.out.println("SubSystemConfigurationImpl.getSubSystems(conn): before restoreSubSystems");
- subsystemArray = RSEUIPlugin.getThePersistenceManager().restoreSubSystems(this, conn);
- //System.out.println("After restoreSubSystems: "+subsystemArray.length);
- if (subsystemArray != null)
- {
- for (int idx = 0; idx < subsystemArray.length; idx++)
- addSubSystem(subsystemArray[idx]);
- subsystemsByConnection.put(conn, subsystemArray);
- }
- }
- catch (Exception exc)
- {
- RSEUIPlugin.logError("Exception restoring subsystems for connection " + conn, exc);
- }
- */
- }
- else if (!subsystemsRestored && !force)
- {
- return EMPTY_SUBSYSTEM_ARRAY;
- }
- else
- {
- //System.out.println("...calling internalGet...");
- subsystemArray = internalGetSubSystems(conn);
- //System.out.println("...back from calling internalGet...");
- subsystemsByConnection.put(conn, subsystemArray);
- }
- }
- return subsystemArray;
- }
- /**
- * Private method to subset master list of all subsystems by a given connection
- */
- protected ISubSystem[] internalGetSubSystems(IHost conn)
- {
- java.util.List mofList = getSubSystemList();
- Iterator i = mofList.iterator();
- Vector v = new Vector();
- while (i.hasNext())
- {
- ISubSystem subsys = (ISubSystem) i.next();
- if (subsys.getHost() == conn)
- v.addElement(subsys);
- }
- ISubSystem[] array = new ISubSystem[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- array[idx] = (ISubSystem) v.elementAt(idx);
- return array;
- }
- /**
- * Returns a list of subsystem objects existing for all the connections in the
- * given profile. Will force restoring all subsystems from disk.
- */
- public ISubSystem[] getSubSystems(ISystemProfile profile)
- {
- ISubSystem[] allSubSystems = getSubSystems(true);
- Vector v = new Vector();
- for (int idx = 0; idx < allSubSystems.length; idx++)
- {
- ISubSystem ss = allSubSystems[idx];
- if (ss.getSystemProfile() == profile)
- v.addElement(ss);
- }
- ISubSystem[] subsystems = new ISubSystem[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- subsystems[idx] = (ISubSystem) v.elementAt(idx);
- return subsystems;
- }
- /**
- * Returns a list of subsystem objects existing in memory,
- * which contain a reference to the given filter pool.
- */
- public ISubSystem[] getSubSystems(ISystemFilterPool pool)
- {
- ISubSystem[] allSubSystems = getSubSystems(false); // // false=> lazy get; don't restore from disk if not already
- Vector v = new Vector();
- for (int idx = 0; idx < allSubSystems.length; idx++)
- {
- ISystemFilterPoolReferenceManager mgr = subsystems[idx].getSystemFilterPoolReferenceManager();
- if ((mgr != null) && (mgr.isSystemFilterPoolReferenced(pool)))
- {
- v.addElement(allSubSystems[idx]);
- }
- }
- ISubSystem[] subsystems = new ISubSystem[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- subsystems[idx] = (ISubSystem) v.elementAt(idx);
- return subsystems;
- }
-
- /**
- * Helper method to allow child classes to add a subsystem object to the in-memory
- * list maintained and returned by this base class.
- */
- protected void addSubSystem(ISubSystem subsys)
- {
- getSubSystemList().add(subsys);
- }
-
- /**
- * Helper method to allow child classes to remove a subsystem object from the in-memory
- * list maintained and returned by this base class.
- */
- protected void removeSubSystem(ISubSystem subsys)
- {
- getSubSystemList().remove(subsys);
- /* FIXME
- // now in EMF, the profiles are "owned" by the Resource, and only referenced by the profile manager,
- // so I don't think just removing it from the manager is enough... it must also be removed from its
- // resource. Phil.
- Resource res = subsys.eResource();
- if (res != null)
- res.getContents().remove(subsys);
- */
- }
-
- /**
- * Creates a new subsystem instance that is associated with the given connection object.
- * SystemRegistryImpl calls this when a new connection is created, and appliesToSystemType returns true.
- * <p>
- * This method doe sthe following:
- * <ul>
- * <li>calls {@link #createSubSystemInternal(IHost)} to create the subsystem
- * <li>does initialization of common attributes
- * <li>if {@link #supportsFilters()}, creates a {@link org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager} for the
- * subsystem to manage references to filter pools
- * <li>if (@link #supportsServerLaunchProperties()}, calls {@link #createServerLauncher(IConnectorService)}, to create
- * the server launcher instance to associate with this subsystem. This can be subsequently
- * retrieved via calling subsystem's {@link ISubSystem#getRemoteServerLauncher()}.
- * <li>calls {@link #initializeSubSystem(ISubSystem, ISystemNewConnectionWizardPage[])} so subclasses can
- * do their thing to initialize the subsystem.
- * <li>finally, saves the subsystem to disk.
- * </ul>
- * @param conn The connection to create a subsystem for
- * @param creatingConnection true if we are creating a connection, false if just creating
- * another subsystem for an existing connection.
- * @param yourNewConnectionWizardPages The wizard pages you supplied to the New Connection wizard, via the
- * {@link org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter#getNewConnectionWizardPages(ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)}
- * method or null if you didn't override this method.
- * Note there may be more pages than you originally supplied as it is all pages contributed by
- * this factory object, including subclasses.
- */
- public ISubSystem createSubSystem(IHost conn, boolean creatingConnection, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
- {
- invalidateSubSystemCache(conn); // re-gen list of subsystems-by-connection on next call
- if (creatingConnection)
- {
- if (subSystemsRestoredFlags == null)
- reset();
- subSystemsRestoredFlags.put(conn, Boolean.TRUE); // do not try to restore subsequently. Nothing to restore!
- }
- ISubSystem subsys = createSubSystemInternal(conn);
- if (subsys != null)
- {
- internalInitializeNewSubSystem(subsys, conn);
- if (supportsFilters())
- {
- // We create a filter pool reference manager object to manage the filter pool references
- // that are stored with a subsystem.
- //SystemFilterPoolManager[] relatedFilterPoolManagers =
- // getReferencableFilterPoolManagers(conn.getSystemProfile());
- ISystemFilterPoolReferenceManager fprMgr = SystemFilterStartHere.getDefault().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName(), filterNamingPolicy);
- subsys.setFilterPoolReferenceManager(fprMgr);
- ISystemFilterPoolManager defaultFilterPoolManager = getFilterPoolManager(conn.getSystemProfile());
- fprMgr.setDefaultSystemFilterPoolManager(defaultFilterPoolManager);
- }
-
- IConnectorService connectorService = subsys.getConnectorService();
- if (supportsServerLaunchProperties(conn))
- {
- IServerLauncherProperties sl = connectorService.getRemoteServerLauncherProperties();
- if (sl == null)
- {
- sl = createServerLauncher(connectorService);
- if (sl != null)
- {
- connectorService.setRemoteServerLauncherProperties(sl);
- }
- }
- }
- initializeSubSystem(subsys, yourNewConnectionWizardPages);
- try
- {
- saveSubSystem(subsys);
- //DKM - save this event til all the processing is done!
- // fire model change event in case any BP code is listening...
- //RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsys, null);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving new subsystem " + subsys.getName(), exc); //$NON-NLS-1$
- }
-
- addSubSystem(subsys); // only add to list even if save was not successful.
- //if (lastExc != null)
- //throw lastExc;
- }
- return subsys;
- }
- /**
- * Clone a given subsystem into the given connection.
- * Called when user does a copy-connection action.
- * @param oldSubsystem The subsystem to be cloned
- * @param newConnection The connection into which to create and clone the old subsystem
- * @param copyProfileOperation Pass true if this is an profile-copy operation versus a connection-copy operation
- * @return New subsystem within the new connection
- */
- public ISubSystem cloneSubSystem(ISubSystem oldSubsystem, IHost newConnection, boolean copyProfileOperation) throws Exception
- {
- Exception lastExc = null;
- invalidateSubSystemCache(newConnection); // re-gen list of subsystems-by-connection on next call
- subSystemsRestoredFlags.put(newConnection, Boolean.TRUE); // do not try to restore subsequently. Nothing to restore!
- ISubSystem subsys = createSubSystemInternal(newConnection);
- if (subsys != null)
- {
- internalInitializeNewSubSystem(subsys, newConnection);
- // copy common data
- subsys.setName(oldSubsystem.getName()); // just in case it was changed
- subsys.addPropertySets(oldSubsystem.getPropertySets());
- subsys.setHidden(oldSubsystem.isHidden());
-
-
- // connector service
- IConnectorService oldConnectorService = oldSubsystem.getConnectorService();
- IConnectorService newConnectorService = subsys.getConnectorService();
- if (oldConnectorService != null)
- {
- if (newConnectorService != null)
- {
- newConnectorService.setPort(oldConnectorService.getPort());
- newConnectorService.setUserId(oldConnectorService.getUserId());
- newConnectorService.setIsUsingSSL(oldConnectorService.isUsingSSL());
- }
- }
-
- // server launcher
- IServerLauncherProperties sl = oldConnectorService.getRemoteServerLauncherProperties();
- if ((sl != null) && supportsServerLaunchProperties(newConnection))
- {
- IServerLauncherProperties newSL = createServerLauncher(newConnectorService);
- if (newSL != null)
- {
- newConnectorService.setRemoteServerLauncherProperties(sl.cloneServerLauncher(newSL));
- }
- }
- copySubSystemData(oldSubsystem, subsys); // let child classes copy their own data
- if (supportsFilters())
- {
- // We create a filter pool reference manager object to manage the filter pool references
- // that are stored with a subsystem.
- //SystemFilterPoolManager[] relatedFilterPoolManagers =
- // getReferencableFilterPoolManagers(newConnection.getSystemProfile());
- ISystemFilterPoolReferenceManager newRefMgr = SystemFilterStartHere.getDefault().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName(), filterNamingPolicy);
- ISystemFilterPoolManager defaultFilterPoolManager = null;
- if (copyProfileOperation)
- defaultFilterPoolManager = getFilterPoolManager(newConnection.getSystemProfile());
- else
- defaultFilterPoolManager = oldSubsystem.getFilterPoolReferenceManager().getDefaultSystemFilterPoolManager();
- newRefMgr.setDefaultSystemFilterPoolManager(defaultFilterPoolManager);
- subsys.setFilterPoolReferenceManager(newRefMgr);
- // copy filter pool references...
- ISystemFilterPoolReferenceManager oldRefMgr = oldSubsystem.getSystemFilterPoolReferenceManager();
- newRefMgr.setProviderEventNotification(false);
- ISystemFilterPoolReference[] oldReferences = oldRefMgr.getSystemFilterPoolReferences();
- String oldSubSystemProfileName = oldSubsystem.getSystemProfileName();
- if ((oldReferences != null) && (oldReferences.length > 0))
- {
- for (int idx = 0; idx < oldReferences.length; idx++)
- {
- ISystemFilterPoolReference poolRef = oldReferences[idx];
- ISystemFilterPool pool = poolRef.getReferencedFilterPool();
- if (pool != null) {
- // if just copying a connnection, then copy references to pools as-is
- if (!copyProfileOperation)
- {
- newRefMgr.addReferenceToSystemFilterPool(pool);
- }
- // if copying a profile, update references to pools in old profile to become references to pools in new profile...
- else
- {
- ISystemFilterPoolManager poolMgr = pool.getSystemFilterPoolManager();
- String poolProfileName = getSystemProfileName(poolMgr);
- if (poolProfileName.equals(oldSubSystemProfileName))
- {
- //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());
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"...new pool = " + newPoolMgr.getName()+"."+newPool.getName());
- newRefMgr.addReferenceToSystemFilterPool(newPool);
- }
- else
- {
- //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);
- }
- }
- }
- }
- }
- newRefMgr.setProviderEventNotification(true);
- }
- try
- {
- saveSubSystem(subsys);
-
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsys, null);
- }
- catch (Exception exc)
- {
- lastExc = exc;
- SystemBasePlugin.logError("Error saving cloned subsystem " + subsys.getName(), exc); //$NON-NLS-1$
- }
- addSubSystem(subsys); // only add to list even if save was not successful.
- if (lastExc != null)
- throw lastExc;
- }
- return subsys;
- }
-
- /**
- * Called after successfully creating a new subsystem via createSubSystemInternal when creating a new connection, or
- * when cloning a subsystem
- * @param ss The new subsystem
- * @param conn The new connection containing this new subsystem
- */
- private void internalInitializeNewSubSystem(ISubSystem subsys, IHost conn)
- {
- subsys.setSubSystemConfiguration(this);
- subsys.setHost(conn);
- subsys.setName(internalGetSubSystemName(subsys));
- subsys.setConfigurationId(getId());
- }
-
- /**
- * Overridable.
- * <p>
- * Return the name to give a new subsystem. By default, it is given the name of this
- * factory object. This is fine, unless you support multiple subsystem instances per
- * connection, in which case it is your responsibility to supply a unique name for
- * each.
- * <p>
- * By default returns getName()
- */
- protected String internalGetSubSystemName(ISubSystem subsys)
- {
- return getName();
- }
-
- /**
- * Method called by default implementation of createSubSystem method in AbstractSubSystemConfiguration.
- */
- public abstract ISubSystem createSubSystemInternal(IHost conn);
-
- /**
- * <i>Overridable</i> method to initialize subsystems after creation. The default behaviour here is to
- * set the subsystem's port property to 0, and to add to it a reference to the default filter pool for this
- * factory, if there is one. Typically subclasses call <samp>super().initializeSubSystem(...)</samp>
- * to get this default behaviour, then extend it.
- *
- * <p>The reason for the connect wizard pages parm is in case your factory contributes a page to that wizard,
- * whose values are needed to set the subsystem's initial state. For example, you might decide to add a
- * page to the connection wizard to prompt for a JDBC Driver name. If so, when this method is called at
- * the time a new connection is created apres the wizard, your page will have the user's value. You can
- * thus use it here to initialize that subsystem property. Be use to use instanceof to find your particular
- * page.
- * </p>
- *
- * @param ss - The subsystem that was created via createSubSystemInternal
- * @param yourNewConnectionWizardPages - The wizard pages you supplied to the New Connection wizard, via the
- * {@link org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)}
- * method or null if you didn't override this method.
- * Note there may be more pages than you originally supplied, as you are passed all pages contributed
- * by this factory object, including subclasses. This is null when this method is called other than
- * for a New Connection operation.
- */
- protected void initializeSubSystem(ISubSystem ss, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
- {
- IConnectorService connectorService = ss.getConnectorService();
- if (connectorService != null)
- {
- connectorService.setPort(0);
- }
- if (supportsFilters())
- {
- // --------------------------------------------
- // add a reference to the default filter pool
- // --------------------------------------------
- ISystemFilterPool pool = getDefaultSystemFilterPool(ss);
- if (pool != null)
- {
- ISystemFilterPoolReferenceManager refMgr = ss.getSystemFilterPoolReferenceManager();
- refMgr.setProviderEventNotification(false);
- refMgr.addReferenceToSystemFilterPool(pool);
- refMgr.setProviderEventNotification(true);
- }
- }
-
- // apply properties set in the wizard to the subsystem
- if (yourNewConnectionWizardPages != null)
- {
- ISubSystemPropertiesWizardPage ourPage = null;
- for (int idx=0; (ourPage==null) && (idx<yourNewConnectionWizardPages.length); idx++)
- {
- if (yourNewConnectionWizardPages[idx] instanceof ISubSystemPropertiesWizardPage)
- {
- ourPage = (ISubSystemPropertiesWizardPage)yourNewConnectionWizardPages[idx];
- ourPage.applyValues(ss);
- }
- }
- }
- }
-
- /**
- * Copy unique subsystem data after a copy operation. Subclasses should override and call super.
- */
- protected void copySubSystemData(ISubSystem oldSubSystem, ISubSystem newSubSystem)
- {
- return;
- }
-
- /**
- * Updates userid and/or port of an existing subsystem instance.
- * These attributes typically affect the live connection, so the subsystem will be forced to
- * disconnect.
- * <p>
- * If you have your own attributes and own GUI to prompt for these, then call your own
- * method to set your attributes, and call this method via super().
- * <p>
- * The changes to the subsystem configuration will be saved to disk.
- * Further, it will be asked to disconnect as this data affects the connection.
- * <p>
- * @param subsystem target of the update action
- * @param updateUserId true if we are updating the userId, else false to ignore userId
- * @param userId new local user Id. Ignored if updateUserId is false
- * @param updatePort true if we are updating the port, else false to ignore port
- * @param port new local port value. Ignored if updatePort is false
- */
- public void updateSubSystem(ISubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, int port)
- {
- // we pushed down the code that checks if this change is real, such that
- // in a multi-subsystem environment it will not enter an infinite loop
- // when the event is fired.
- if (!needsUpdate(subsystem, updateUserId, userId, updatePort, port)) // port was changed or userId was changed
- return;
-
- IConnectorService connectorService = subsystem.getConnectorService();
- if (connectorService != null)
- {
- // do the actual update
- if (updateUserId)
- {
- if ((userId != null) && (userId.trim().length() > 0))
- {
- connectorService.setUserId(userId);
- }
- else
- {
- connectorService.setUserId(null);
- }
- }
- if (updatePort)
- {
- connectorService.setPort(port);
- }
- if (connectorService.isDirty()) {
- setDirty(true);
- subsystem.setDirty(true);
- }
- }
- else
- {
-
- }
-
- // inform interested listeners...
- fireEvent(subsystem, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, subsystem.getHost());
-
- // fire model change event in case any BP code is listening...
- 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 IConnectorService, then
- // update all of them too...
- // DKM - now that ConnectorService is independent of subsystme, this should be unnecessary
- /* AbstractConnectorServiceManager systemManager = subsystem.getConnectorService();
- if (systemManager != null)
- systemManager.updateSubSystems(shell, subsystem, updateUserId, userId, updatePort, port);*/
- }
- /**
- * Update the port for the given subsystem instance.
- * Shortcut to {@link #updateSubSystem(Shell, ISubSystem, boolean, String, boolean, int)}
- */
- public void setSubSystemPort(ISubSystem subsystem, int port)
- {
- updateSubSystem( subsystem, false, null, true, port);
- }
- /**
- * Update the user ID for the given subsystem instance.
- * Shortcut to {@link #updateSubSystem(Shell, ISubSystem, boolean, String, boolean, int)}
- */
- public void setSubSystemUserId(ISubSystem subsystem, String userId)
- {
- updateSubSystem(subsystem, true, userId, false, 0);
- }
-
- /**
- * Used by child classes that override updateSubSystem to establish if anything really
- * needs to be changed.
- */
- protected boolean needsUpdate(ISubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, int port)
- {
- IConnectorService connectorService = subsystem.getConnectorService();
- if (connectorService != null)
- {
- if (updatePort) // we pass this parameter for a reason!
- {
-
- int oldPort = connectorService.getPort();
- updatePort = oldPort != port;
- }
- if (!updatePort && updateUserId)
- {
- if ((userId == null) || (userId.trim().length() == 0)) // given empty
- {
-
- updateUserId = (connectorService.getUserId() != null);
- }
- else
- {
-
- String oldUserId = connectorService.getUserId();
- if (oldUserId != null)
- { // if it is null, then we need to update it!
- // DY defect 43374
- if (subsystem.forceUserIdToUpperCase())
- updateUserId = !userId.equalsIgnoreCase(oldUserId);
- else
- updateUserId = !userId.equals(oldUserId);
- }
- }
- }
- }
- return updatePort || updateUserId;
- }
-
- /**
- * Returns true if this factory allows users to delete instances of subsystem objects.
- * Would only be true if users are allowed to create multiple instances of subsystem objects
- * per connection.
- * Returns false by default. Override this and deleteSubSystem(SubSystem subsystem) to
- * support user deletes
- */
- public boolean isSubSystemsDeletable()
- {
- return false;
- }
-
- /**
- * Deletes a given subsystem instance from the list maintained by this factory.
- * SystemRegistryImpl calls this when the user selects to delete a subsystem object,
- * or deletes the parent connection this subsystem is associated with.
- * <p>
- * In former case, this is only called if the factory supports user-deletable subsystems.
- * <p>
- * Handled for you!
- */
- public boolean deleteSubSystem(ISubSystem subsystem)
- {
- if (subsystem.isConnected())
- {
- try
- {
- subsystem.disconnect(); // just in case.
- }
- catch (Exception exc)
- {
- }
- }
- removeSubSystem(subsystem); // remove from our in-memory cache
- ISystemFilterPoolReferenceManager fpRefMgr = subsystem.getSystemFilterPoolReferenceManager();
- if (fpRefMgr != null)
- {
- ISystemFilterPoolReference[] fpRefs = fpRefMgr.getSystemFilterPoolReferences();
- if (fpRefs != null)
- {
- for (int idx = 0; idx < fpRefs.length; idx++)
- fpRefs[idx].removeReference();
- }
- }
-
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsystem, null);
- return true;
- }
-
- /**
- * Renames a subsystem. This is better than ss.setName(String newName) as it saves the subsystem to disk.
- */
- public void renameSubSystem(ISubSystem subsystem, String newName)
- {
- subsystem.setName(newName);
- try
- {
- subsystem.commit();
- }
- catch (Exception exc)
- {
- }
- }
-
- /**
- * There is a reasonable amount of processing needed to configure filter wizards. To aid
- * in performance and memory usage, we extract that processing into this method, and then
- * use a callback contract with the filter wizard to call us back to do this processing
- * only at the time the action is actually selected to be run.
- * <p>
- * The processing we do here is to specify the filter pools to prompt the user for, in the
- * second page of the New Filter wizards.
- * <p>
- * This method is from the ISystemNewFilterActionConfigurator interface
- */
- public void configureNewFilterAction(SystemNewFilterAction newFilterAction, Object callerData)
- {
- //System.out.println("Inside configureNewFilterAction! It worked!");
- newFilterAction.setFromRSE(true);
- boolean showFilterPools = showFilterPools();
-
- // It does not make sense, when invoked from a filterPool, to ask the user
- // for the parent filter pool, or to ask the user whether the filter is connection
- // specific, as they user has explicitly chosen their pool...
- //if (!showFilterPools || (callerData instanceof SubSystem))
- if (!showFilterPools)
- {
- ISubSystem selectedSubSystem = (ISubSystem) callerData;
- // When not showing filter pools, we need to distinquish between an advanced user and a new user.
- // For a new user we simply want to ask them whether this filter is to be team sharable or private,
- // and based on that, we will place the filter in the default filter pool for the appropriate profile.
- // For an advanced user who has simply turned show filter pools back off, we want to let them choose
- // explicitly which filter pool they want to place the filter in.
- // To approximate the decision, we will define an advanced user as someone who already has a reference
- // to a filter pool other than the default pools in the active profiles.
- boolean advancedUser = false;
- ISystemFilterPoolReferenceManager refMgr = selectedSubSystem.getSystemFilterPoolReferenceManager();
- ISystemFilterPool[] refdPools = refMgr.getReferencedSystemFilterPools();
- if (refdPools.length == 0)
- SystemBasePlugin.logInfo("SubSystemConfigurationImpl::getSubSystemActions - getReferencedSystemFilterPools returned array of length zero."); //$NON-NLS-1$
- // so there already exists references to more than one filter pool, but it might simply be a reference
- // to the default filter pool in the user's profile and another to reference to the default filter pool in
- // the team profile... let's see...
- else if (refdPools.length > 1)
- {
- for (int idx = 0; !advancedUser && (idx < refdPools.length); idx++)
- {
- if (!refdPools[idx].isDefault() && (refdPools[idx].getOwningParentName()==null))
- advancedUser = true;
- }
- }
- if (advancedUser)
- {
- newFilterAction.setAllowFilterPoolSelection(refdPools); // show all pools referenced in this subsystem, and let them choose one
- }
- else
- {
- boolean anyAdded = false;
- SystemFilterPoolWrapperInformation poolWrapperInfo = getNewFilterWizardPoolWrapperInformation();
- ISystemProfile[] activeProfiles = RSEUIPlugin.getTheSystemRegistry().getActiveSystemProfiles();
- ISystemProfile activeProfile = selectedSubSystem.getHost().getSystemProfile();
- for (int idx = 0; idx < activeProfiles.length; idx++)
- {
- ISystemFilterPool defaultPool = getDefaultSystemFilterPool(activeProfiles[idx]);
- if (defaultPool != null)
- {
- poolWrapperInfo.addWrapper(activeProfiles[idx].getName(), defaultPool, (activeProfiles[idx] == activeProfile)); // display name, pool to wrap, whether to preselect
- anyAdded = true;
- }
- }
- if (anyAdded)
- newFilterAction.setAllowFilterPoolSelection(poolWrapperInfo);
- }
- }
- }
- /**
- * Overridable entry for child classes to supply their own flavour of ISystemFilterPoolWrapperInformation for
- * the new filter wizards.
- */
- protected SystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
- {
- return new SystemFilterPoolWrapperInformation(SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_LABEL, SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_TOOLTIP,
- SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_VERBAGE);
- }
-
- /**
- * Disconnect all subsystems currently connected.
- * Called by shutdown() of RSEUIPlugin.
- */
- public void disconnectAllSubSystems() throws Exception
- {
- ISubSystem[] subsystems = getSubSystems(false); //// false=> lazy get; don't restore from disk if not already
- if (subsystems != null)
- {
- //System.out.println("DISCONNECT ALL FOR "+getClass().getName()+", #subsystems = " + subsystems.length);
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- ISubSystem ss = subsystems[idx];
- if (ss.isConnected())
- {
- try
- {
- ss.getConnectorService().disconnect(new NullProgressMonitor());
- }
- catch (Exception exc)
- {
- }
- }
- }
- }
- else
- {
- //System.out.println("DISCONNECT ALL FOR "+getClass().getName()+", #subsystems = 0");
- }
- }
-
-
-
- // ---------------------------------
- // FILTER FRAMEWORK METHODS...
- // ---------------------------------
-
- /**
- * <i>Overridable lifecycle method. Typically overridden to supply a default filter.</i><br>
- * When the user creates a new profile in the RSE (which is mapped to a SystemFilterPoolManager
- * by our parent class), each subsystem factory that supports filters is asked if it wants to
- * create a default system filter pool in that profile. <br>
- * This is the method that is called to do that default filter pool creation in the new profile.
- * <p>
- * By default we create an <i>empty</i> filter pool with a generated name, and no pre-defined filters.
- * If you don't want that behaviour, override this method and do one of the following:</p>
- * <ul>
- * <li>nothing if you don't want your subsystem factory to have a default filter pool in the new profile</li>.
- * <li>call super.createDefaultFilterPool(mgr) to get the default pool, and then than call <samp>mgr.createSystemFilter(pool,...)</samp> to create
- * each filter and add it to the filter pool, if you want to pre-populate the default pool with
- * default filters.
- * </ul>
- */
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- ISystemFilterPool pool = null;
- try {
- // -----------------------------------------------------
- // create a pool named filters
- // -----------------------------------------------------
- pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Error creating default filter pool in default subsystem factory",exc); //$NON-NLS-1$
- }
- return pool;
- }
-
-
-
- /**
- * Return true if the given filter pool manager maps to the private profile for this user.
- */
- protected boolean isUserPrivateProfile(ISystemFilterPoolManager mgr)
- {
- //System.out.println("mgr name = " + mgr.getName());
- //String name = mgr.getName();
- //return name.equalsIgnoreCase("private");
- ISystemProfile profile = getSystemProfile(mgr);
- //System.out.println("Testing for user private profile for mgr " + mgr.getName() + ": " + profile.isDefaultPrivate());;
- return profile.isDefaultPrivate() || mgr.getName().equalsIgnoreCase("private"); //$NON-NLS-1$
- }
-
- /**
- * Given a subsystem, return the first (hopefully only) default pool for this
- * subsystem's profile.
- */
- public ISystemFilterPool getDefaultSystemFilterPool(ISubSystem subsys)
- {
- ISystemFilterPool pool = getDefaultSystemFilterPool(subsys.getSystemProfile());
- /* hopefully this is no longer needed, now that we are into our 2nd release!
- if (pool == null)
- {
- // temporary for pre-default users
- String defaultPoolName = "Filters";
- if (subsys.getName().equals("Local Files"))
- defaultPoolName = "DefaultFilterPool";
- pool = mgr.getSystemFilterPool(defaultPoolName);
- }
- */
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(), "...inside getDefaultFilterPool for "+subsys.getName()+", default pool="+pool);
- return pool;
- }
- /**
- * Given a profile, return the first (hopefully only) default pool for this
- * profile.
- */
- public ISystemFilterPool getDefaultSystemFilterPool(ISystemProfile profile)
- {
- ISystemFilterPool pool = null;
- ISystemFilterPoolManager mgr = getFilterPoolManager(profile);
- pool = mgr.getFirstDefaultSystemFilterPool(); // RETURN FIRST
- return pool;
- }
- /**
- * Invalidate any internal caches related to filters
- */
- public void invalidateFilterCache()
- {
- filterPoolManagers = null;
- }
- /**
- * Return an array of all filter pool managers owned by this subsystem factory.
- * This is a runtime array that only captures those filter pools that have been restored
- * as a result of someone calling getFilterPoolManager(SystemProfile).
- */
- public ISystemFilterPoolManager[] getFilterPoolManagers()
- {
- if ((filterPoolManagers == null) || (filterPoolManagers.length != getFilterPoolManagerList().size()))
- {
- filterPoolManagers = new ISystemFilterPoolManager[getFilterPoolManagerList().size()];
- Iterator i = getFilterPoolManagerList().iterator();
- int idx = 0;
- while (i.hasNext())
- filterPoolManagers[idx++] = (ISystemFilterPoolManager) i.next();
- }
- return filterPoolManagers;
- }
-
- /**
- * Get the filter pool managers for the active profiles.
- */
- public ISystemFilterPoolManager[] getActiveFilterPoolManagers()
- {
- ISystemProfile[] activeProfiles = RSEUIPlugin.getTheSystemRegistry().getActiveSystemProfiles();
- ISystemFilterPoolManager[] activeManagers = new ISystemFilterPoolManager[activeProfiles.length];
- for (int idx = 0; idx < activeProfiles.length; idx++)
- {
- activeManagers[idx] = getFilterPoolManager(activeProfiles[idx]);
- }
- return activeManagers;
- }
-
- /**
- * Get the filter pool manager for the given profile
- */
- public ISystemFilterPoolManager getFilterPoolManager(ISystemProfile profile)
- {
- // it is important to key by profile object not profile name, since that
- // name can change but the object never should for any one session.
- ISystemFilterPoolManager mgr = (ISystemFilterPoolManager) filterPoolManagersPerProfile.get(profile);
- //System.out.println("in getFilterPoolManager for ssfactory "+getId()+" for profile " + profile.getName() + ", mgr found? " + (mgr!=null));
- if (mgr == null)
- {
- try
- {
- 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);
- mgr.setSingleFilterStringOnly(!supportsMultipleFilterStrings()); // DWD was restored flag?
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Restore/Creation of SystemFilterPoolManager " + getFilterPoolManagerName(profile) + " failed!", exc); //$NON-NLS-1$ //$NON-NLS-2$
- SystemMessageDialog.displayExceptionMessage(null, exc);
- return null; // something very bad happend!
- }
-
- addFilterPoolManager(profile, mgr);
-
- boolean restored = mgr.wasRestored();
- //System.out.println("...after createSystemFilterPoolManager for " + mgr.getName() + ", restored = " + restored);
-
- // allow subclasses to create default filter pool...
- if (!restored)
- {
- ISystemFilterPool defaultPool = createDefaultFilterPool(mgr);
- if (defaultPool != null)
- {
- defaultPool.setDefault(true);
- try
- {
- RSEUIPlugin.getThePersistenceManager().commit(defaultPool);
- }
- catch (Exception exc)
- {
- }
- }
- }
- // else filter pools restored for this profile. Allow subclasses chance to do post-processing,
- // such as any migration needed
- else
- {
- if (doPostRestoreProcessing(mgr))
- {
- try
- {
- mgr.commit();
- }
- catch (Exception exc)
- {
- }
- }
- }
- // these should be inside the above logic but we need them outside for now because they were
- // added late and there are existing filter pool managers that need this to be set for.
- // In a future release we should move them inside the if (!restored) logic. Phil.
- if (supportsDuplicateFilterStrings())
- mgr.setSupportsDuplicateFilterStrings(true);
- if (isCaseSensitive())
- mgr.setStringsCaseSensitive(isCaseSensitive());
- }
- return mgr;
- }
- /**
- * Do post-restore-processing of an existing filter pool manager.
- * This is where child classes do any required migration work. By default, we do nothing.
- * <p>
- * You can query the release of the filter pool managers, filter pools and filters, by querying the
- * release attribute via getRelease().getValue(). You can compare to the current release number using
- * the CURRENT_RELEASE constant in ISystemConstants.
- * @return false if no changes made. True if changes made, and hence save required.
- */
- protected boolean doPostRestoreProcessing(ISystemFilterPoolManager restoredFilterPoolMgr)
- {
- return false;
- }
-
- /**
- * Copy the filter pool manager and return a new one. Called during profile-copy operations.
- * Will also copy all of the filter pools and their respective data.
- */
- public ISystemFilterPoolManager copyFilterPoolManager(ISystemProfile oldProfile, ISystemProfile newProfile) throws Exception
- {
-
- ISystemFilterPoolManager oldMgr = getFilterPoolManager(oldProfile); // will restore it if necessary
-
- 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);
- mgr.setStringsCaseSensitive(oldMgr.areStringsCaseSensitive());
- mgr.setSupportsDuplicateFilterStrings(oldMgr.supportsDuplicateFilterStrings());
- addFilterPoolManager(newProfile, mgr);
- oldMgr.copySystemFilterPools(mgr);
- return mgr;
- }
-
- /**
- * Get the filter pool manager for the given profile.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager(String mgrName)
- {
- ISystemProfile profile = getSystemProfile(mgrName);
- if (profile != null)
- {
- return getFilterPoolManager(profile);
- }
- return null;
- }
-
- /**
- * Get the filter pool manager for the given profile.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ISystemFilterPoolManager[] getSystemFilterPoolManagers()
- {
- return getActiveFilterPoolManagers();
- }
- /**
- * Return all the manager objects this provider owns, to which it wants
- * to support referencing from the given filter reference manager.
- * <p>
- * Called by SystemFilterPoolReferenceManager.
- * <p>
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ISystemFilterPoolManager[] getReferencableSystemFilterPoolManagers(ISystemFilterPoolReferenceManager refMgr)
- {
- return getActiveFilterPoolManagers();
- }
-
- /**
- * Last chance call, by a filter pool reference manager, when a reference to a filter
- * pool is found but the referenced master filter pool is not found in those the reference
- * manager by getSystemFilterPoolManagers().
- * <p>
- * If this returns null, then this broken reference will be deleted
- * <p>
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ISystemFilterPool getSystemFilterPoolForBrokenReference(ISystemFilterPoolReferenceManager callingRefMgr, String missingPoolMgrName, String missingPoolName)
- {
- ISystemFilterPool match = null;
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- ISystemProfile profile = sr.getSystemProfile(missingPoolMgrName);
- if (profile != null)
- {
- match = getFilterPoolManager(profile).getSystemFilterPool(missingPoolName);
- }
- if (match != null) // log and issue warning
- {
- ISubSystem ss = ((ISubSystem) callingRefMgr.getProvider());
- // only issue the warning if it is NOT for a reference to a filter pool in the same profile as the
- // the one we are restoring. That is, we should not issue warnings about our own references when
- // restoring the subsystems for an inactive profile, as happens when an inactive profile is deleted,
- // for example. Defect 42675. Phil.
- if (ss.getSystemProfile() != profile) // if restoring subsystem's profile != found pool's profile
- {
- IHost conn = ss.getHost();
- String connectionName = conn.getSystemProfileName() + "." + conn.getAliasName(); //$NON-NLS-1$
- SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED);
- sysMsg.makeSubstitution(missingPoolMgrName, connectionName);
- SystemBasePlugin.logWarning(sysMsg.getFullMessageID() + ": " + sysMsg.getLevelOneText()); //$NON-NLS-1$
- if (brokenReferenceWarningsIssued.get(missingPoolMgrName) == null)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(null, sysMsg);
- msgDlg.open();
- brokenReferenceWarningsIssued.put(missingPoolMgrName, Boolean.TRUE); // only issue once per inactive profile
- }
- }
- }
- return match;
- }
-
-
- /**
- * Add the given filter pool manager object to internal lists
- */
- protected void addFilterPoolManager(ISystemProfile profile, ISystemFilterPoolManager mgr)
- {
- filterPoolManagersPerProfile.put(profile, mgr);
- getFilterPoolManagerList().add(mgr); // MOF generated list
- invalidateFilterCache(); // force regen of any cached lists
- }
- /**
- * Get the filter pool manager for the given filter pool
- */
- protected ISystemFilterPoolManager getFilterPoolManager(ISystemFilterPool pool)
- {
- return pool.getSystemFilterPoolManager();
- }
- /**
- * Get the filter pool manager for the given filter pool or filter
- */
- protected ISystemFilterPoolManager getFilterPoolManager(ISystemFilterContainer poolOrFilter)
- {
- return poolOrFilter.getSystemFilterPoolManager();
- }
- /**
- * Get the filter pool manager for the given reference to a filter pool or filter
- */
- protected ISystemFilterPoolManager getFilterPoolManager(ISystemFilterContainerReference poolOrFilterReference)
- {
- return getFilterPoolManager(poolOrFilterReference.getReferencedSystemFilterContainer());
- }
- /**
- * Get the filter pool manager for the given connection
- */
- protected ISystemFilterPoolManager getFilterPoolManager(IHost conn)
- {
- return getFilterPoolManager(conn.getSystemProfile());
- }
-
- /**
- * Return the name of the filter pool manager, given the profile.
- */
- protected String getFilterPoolManagerName(ISystemProfile profile)
- {
- return profile.getName();
- }
- /**
- * Return the name of the profile, given the filter pool manager
- */
- protected String getSystemProfileName(ISystemFilterPoolManager manager)
- {
- return manager.getName();
- }
- /**
- * Delete the filter pool manager associated with the given profile
- */
- protected void deleteFilterPoolManager(ISystemProfile profile)
- {
- ISystemFilterPoolManager mgr = (ISystemFilterPoolManager) filterPoolManagersPerProfile.get(profile);
- if (mgr != null)
- {
- mgr.deleteAllSystemFilterPools(); // blow 'em all away, and de-reference anybody referencing any of them
- filterPoolManagersPerProfile.remove(profile);
- }
- getFilterPoolManagerList().remove(mgr);
- invalidateFilterCache();
- }
- /**
- * Rename the filter pool manager associated with the given profile
- */
- public void renameFilterPoolManager(ISystemProfile profile)
- {
- ISystemFilterPoolManager mgr = (ISystemFilterPoolManager) filterPoolManagersPerProfile.get(profile);
- if (mgr != null)
- {
- mgr.setName(getFilterPoolManagerName(profile));
- }
- }
-
- // ------------------------------------------------
- // HELPER METHODS TO SIMPLY EVENT FIRING...
- // ------------------------------------------------
-
- /**
- * Helper method to fire an event...
- */
- protected void fireEvent(SystemResourceChangeEvent event)
- {
- RSEUIPlugin.getTheSystemRegistry().fireEvent(event);
- }
- /**
- * Helper method to create and then fire an event...
- */
- protected void fireEvent(Object src, int eventId, Object parent)
- {
- fireEvent(createEvent(src, eventId, parent));
- }
- /**
- * Helper method to create and then fire an event with a position or delta...
- */
- protected void fireEvent(Object[] multiSrc, int eventId, Object parent, int delta)
- {
- fireEvent(createEvent(multiSrc, eventId, parent, delta));
- }
-
- /**
- * Helper method to create a single-source event
- */
- protected SystemResourceChangeEvent createEvent(Object src, int eventId, Object parent)
- {
- return new SystemResourceChangeEvent(src, eventId, parent);
- }
- /**
- * Helper method to create a multi-source event
- */
- protected SystemResourceChangeEvent createEvent(Object[] src, int eventId, Object parent)
- {
- return new SystemResourceChangeEvent(src, eventId, parent);
- }
- /**
- * Helper method to create a multi-source event
- */
- protected SystemResourceChangeEvent createEvent(Object[] src, int eventId, Object parent, int delta)
- {
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(src, eventId, parent);
- event.setPosition(delta);
- return event;
- }
-
- /**
- * Fire given event to the given subsystem
- */
- protected void fireSubSystemEvent(SystemResourceChangeEvent event, ISubSystem subsystem)
- {
- event.setGrandParent(subsystem);
- fireEvent(event);
- }
-
- /**
- * Fire given event to all currently known subsystems
- */
- protected void fireSubSystemEvent(SystemResourceChangeEvent event)
- {
- ISubSystem[] subsystems = getSubSystems(false); // false=> lazy get; don't restore from disk if not already
- for (int idx = 0; idx < subsystems.length; idx++)
- fireSubSystemEvent(event, subsystems[idx]);
- }
-
- /**
- * Fire given event to all subsystems in the given profile
- */
- protected void fireSubSystemEvent(SystemResourceChangeEvent event, ISystemProfile profile)
- {
- String profileName = profile.getName();
- ISubSystem[] allSubSystems = getSubSystems(false); // false=> lazy get; don't restore from disk if not already
- for (int idx = 0; idx < allSubSystems.length; idx++)
- {
- if (allSubSystems[idx].getSystemProfile().getName().equals(profileName))
- fireSubSystemEvent(event, allSubSystems[idx]);
- }
- }
- /**
- * Fire an event of a given id to subsystems that hold a reference to the given filter
- */
- protected void fireSubSystemFilterEvent(int eventId, ISystemFilter filter)
- {
- SystemResourceChangeEvent event = createEvent(filter, eventId, null);
- fireSubSystemFilterEvent(event, filter);
- }
-
- /**
- * Fire an event of a given id to subsystems that hold a reference to the given filter
- */
- protected void fireSubSystemFilterEvent(int eventId, ISystemFilter[] filters)
- {
- if (filters.length > 0)
- {
- SystemResourceChangeEvent event = createEvent(filters, eventId, null);
- fireSubSystemFilterEvent(event, filters[0]);
- }
- }
- /**
- * Fire an event of a given id to subsystems that hold a reference to the given filter
- */
- protected void fireSubSystemFilterEvent(SystemResourceChangeEvent event, ISystemFilter filter)
- {
- // STEP 1: FIND ALL SUBSYSTEMS THAT CONTAIN A REFERENCE TO THIS FILTER'S POOL
- ISystemFilterPool pool = filter.getParentFilterPool();
- ISubSystem[] subsystems = getSubSystems(pool);
- if ((subsystems != null) && (subsystems.length > 0))
- {
- // STEP 2: FOR EACH AFFECTED SUBSYSTEM FIRE AN EVENT...
- // ... TRICKY PART ==> WHO IS THE PARENT? MIGHT BE A FILTER (IF NESTED), A FILTER POOL OR A SUBSYSTEM (IF NOT SHOWING FILTER POOLS)
- ISystemFilterContainer parent = filter.getParentFilterContainer();
- boolean nested = !(parent instanceof ISystemFilterPool);
- ISystemFilter nestedParentFilter = nested ? (ISystemFilter) parent : null;
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- Object parentObj = null;
- // CASE 1: FILTER IS NOT NESTED, SO SIMPLY GET ITS FILTER POOL REFERENCE AND USE AS A PARENT...
- if (!nested)
- {
- // SPECIAL CASE 1A: it makes a difference if we are showing filter pools or not...
- if (showFilterPools())
- {
- parentObj = subsystems[idx].getSystemFilterPoolReferenceManager().getReferenceToSystemFilterPool(pool);
- }
- else
- {
- parentObj = subsystems[idx];
- }
- }
- // CASE 2: FILTER IS NESTED, THIS IS MORE DIFFICULT, AS EVERY FILTER CONTAINS A RANDOMLY
- // GENERATED REFERENCE THAT ONLY THE GUI KNOWS ABOUT.
- // ONLY OPTION IS TO LET THE GUI FIGURE IT OUT.
- else
- {
- parentObj = nestedParentFilter;
- }
- event = cloneEvent(event, parentObj);
- event.setParent(parentObj);
- fireSubSystemEvent(event, subsystems[idx]);
- }
- }
- }
-
- protected SystemResourceChangeEvent cloneEvent(SystemResourceChangeEvent event, Object parent)
- {
- SystemResourceChangeEvent result = new SystemResourceChangeEvent(event.getSource(), event.getType(), parent);
- return result;
- }
-
- /*
- * Fire an event of a given id to subsystems that hold a reference to the given filter string
- */
- protected void fireSubSystemFilterEvent(int eventId, ISystemFilterString filterString)
- {
- SystemResourceChangeEvent event = createEvent(filterString, eventId, null);
- fireSubSystemFilterEvent(event, filterString);
- }
-
- /*
- * Fire an event of a given id to subsystems that hold a reference to the given filter string
- */
- protected void fireSubSystemFilterEvent(int eventId, ISystemFilterString[] filterStrings, int delta)
- {
- if (filterStrings.length > 0)
- {
- SystemResourceChangeEvent event = createEvent(filterStrings, eventId, null, delta);
- //event.setPosition(delta);
- fireSubSystemFilterEvent(event, filterStrings[0]);
- }
- }
- /*
- * Fire an event of a given id to subsystems that hold a reference to the given filter string
- */
- protected void fireSubSystemFilterEvent(SystemResourceChangeEvent event, ISystemFilterString filterString)
- {
- // STEP 1: FIND ALL SUBSYSTEMS THAT CONTAIN A REFERENCE TO THIS FILTER STRING FILTER'S POOL
- ISystemFilter filter = filterString.getParentSystemFilter();
- ISystemFilterPool pool = filter.getParentFilterPool();
- ISubSystem[] subsystems = getSubSystems(pool);
- if ((subsystems != null) && (subsystems.length > 0))
- {
- // STEP 2: FOR EACH AFFECTED SUBSYSTEM FIRE AN EVENT...
- // ... TRICKY PART ==> WHO IS THE PARENT? WELL, EASY REALLY, IT IS ALWAYS THE PARENT FILTER!
- event.setParent(filter);
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- fireSubSystemEvent(event, subsystems[idx]);
- }
- }
- }
-
- // ------------------------------------------------
- // FILTER POOL MANAGER PROVIDER CALLBACK METHODS...
- // ------------------------------------------------
-
- // ---------------------
- // FILTER POOL EVENTS...
- // ---------------------
- /**
- * A new filter pool has been created
- */
- public void filterEventFilterPoolCreated(ISystemFilterPool newPool)
- {
- //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...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL, newPool, null);
- }
- /**
- * A filter pool has been deleted
- */
- public void filterEventFilterPoolDeleted(ISystemFilterPool oldPool)
- {
- //fireEvent(oldPool, EVENT_DELETE, this); currently called by SystemView's delete support
-
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL, oldPool, null);
- }
- /**
- * A filter pool has been renamed
- */
- public void filterEventFilterPoolRenamed(ISystemFilterPool pool, String oldName)
- {
- //fireEvent(pool, EVENT_RENAME, this); subsystem handles in firing of reference rename
-
- // fire model change event in case any BP code is listening...
- 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
- */
- public void filterEventFilterPoolsRePositioned(ISystemFilterPool[] pools, int delta)
- {
- fireEvent(pools, ISystemResourceChangeEvents.EVENT_MOVE_MANY, this, delta);
-
- // fire model change event in case any BP code is listening...
- if (pools!=null)
- for (int idx=0; idx<pools.length; idx++)
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL, pools[idx], null);
- }
-
- // ---------------------
- // FILTER EVENTS...
- // ---------------------
- /**
- * A new filter has been created
- */
- public void filterEventFilterCreated(ISystemFilter newFilter)
- {
- fireSubSystemFilterEvent(ISystemResourceChangeEvents.EVENT_ADD_FILTER_REFERENCE, newFilter);
-
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, newFilter, null);
- }
-
- /**
- * A filter has been deleted
- */
- public void filterEventFilterDeleted(ISystemFilter oldFilter)
- {
- fireSubSystemFilterEvent(ISystemResourceChangeEvents.EVENT_DELETE_FILTER_REFERENCE, oldFilter);
-
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, oldFilter, null);
- }
-
- /**
- * A filter has been renamed
- */
- public void filterEventFilterRenamed(ISystemFilter filter, String oldName)
- {
- fireSubSystemFilterEvent(ISystemResourceChangeEvents.EVENT_RENAME_FILTER_REFERENCE, filter);
-
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_RENAMED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, filter, oldName);
- }
-
- /**
- * A filter's strings have been updated
- */
- public void filterEventFilterUpdated(ISystemFilter filter)
- {
- fireSubSystemFilterEvent(ISystemResourceChangeEvents.EVENT_CHANGE_FILTER_REFERENCE, filter);
-
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, filter, null);
- }
-
- /**
- * One or more filters have been re-ordered within their pool or filter (if nested)
- */
- public void filterEventFiltersRePositioned(ISystemFilter[] filters, int delta)
- {
- if ((filters!=null) && (filters.length > 0))
- {
- SystemResourceChangeEvent event = createEvent(filters, ISystemResourceChangeEvents.EVENT_MOVE_FILTER_REFERENCES, null);
- event.setPosition(delta);
- fireSubSystemFilterEvent(event, filters[0]);
- // fire model change event in case any BP code is listening...
- for (int idx=0; idx<filters.length; idx++)
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, filters[idx], null);
-
- }
- //System.out.println("In SubSystemConfigurationImpl#filterEventFiltersRepositioned(). Firing EVENT_MOVE_FILTER_REFERENCES");
- //fireSubSystemFilterEvent(event);
- }
- // -----------------------
- // FILTER STRING EVENTS...
- // -----------------------
- /**
- * A new filter string has been created
- */
- public void filterEventFilterStringCreated(ISystemFilterString newFilterString)
- {
- fireSubSystemFilterEvent(ISystemResourceChangeEvents.EVENT_ADD_FILTERSTRING_REFERENCE, newFilterString);
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, newFilterString.getParentSystemFilter(), null);
- }
- /**
- * A filter string has been deleted
- */
- public void filterEventFilterStringDeleted(ISystemFilterString oldFilterString)
- {
- fireSubSystemFilterEvent(ISystemResourceChangeEvents.EVENT_DELETE_FILTERSTRING_REFERENCE, oldFilterString);
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, oldFilterString.getParentSystemFilter(), null);
- }
- /**
- * A filter string has been updated
- */
- public void filterEventFilterStringUpdated(ISystemFilterString filterString)
- {
- fireSubSystemFilterEvent(ISystemResourceChangeEvents.EVENT_CHANGE_FILTERSTRING_REFERENCE, filterString);
- // fire model change event in case any BP code is listening...
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, filterString.getParentSystemFilter(), null);
- }
- /**
- * One or more filters have been re-ordered within their filter
- */
- public void filterEventFilterStringsRePositioned(ISystemFilterString[] filterStrings, int delta)
- {
- fireSubSystemFilterEvent(ISystemResourceChangeEvents.EVENT_MOVE_FILTERSTRING_REFERENCES, filterStrings, delta);
- // fire model change event in case any BP code is listening...
- if ((filterStrings!=null) && (filterStrings.length>0))
- RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, filterStrings[0].getParentSystemFilter(), null);
- }
-
- // ---------------------------------
- // FILTER POOL METHODS...
- // ---------------------------------
-
- /**
- * Returns a filter pool, given its profile and pool name
- */
- public ISystemFilterPool getFilterPool(ISystemProfile profile, String name)
- {
- return getFilterPoolManager(profile).getSystemFilterPool(name);
- }
- /**
- * Returns an array of filter pool objects within a profile.
- */
- public ISystemFilterPool[] getFilterPools(ISystemProfile profile)
- {
- return getFilterPoolManager(profile).getSystemFilterPools();
- }
-
- /**
- * Given a filter, decide whether to show the Filter Strings property page
- * for this filter. Default is true.
- */
- public boolean showChangeFilterStringsPropertyPage(ISystemFilter filter)
- {
- return true;
- }
- // ---------------------------------
- // FILTER POOL REFERENCE METHODS...
- // ---------------------------------
- /**
- * Test if any filter pools in the given profile are referenced by other profiles,
- * which are active.
- * <p>
- * Called when user tries to make a profile inactive. We prevent this if there exists
- * active references.
- * @param profile The profile being tested
- * @return An array of the active subsystems which reference filter pools in this profile,
- * or null if none are found.
- */
- public ISubSystem[] testForActiveReferences(ISystemProfile profile)
- {
- Vector v = new Vector();
- ISystemProfileManager profileMgr = SystemProfileManager.getSystemProfileManager();
- ISystemFilterPoolManager sfpm = getFilterPoolManager(profile);
- String profileName = profile.getName();
- if (sfpm != null)
- {
- ISystemFilterPool[] pools = sfpm.getSystemFilterPools();
- if ((pools != null) && (pools.length > 0))
- {
- for (int idx = 0; idx < pools.length; idx++)
- {
- IRSEBaseReferencingObject[] refs = pools[idx].getReferencingObjects();
- if ((refs != null) && (refs.length > 0))
- {
- for (int jdx = 0; jdx < refs.length; jdx++)
- {
- if (refs[jdx] instanceof ISystemFilterPoolReference)
- {
- ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference) refs[jdx];
- //SystemFilterPoolReferenceManager fpRefMgr = fpRef.getFilterPoolReferenceManager();
- ISubSystem subsystem = (ISubSystem) fpRef.getProvider();
- String ssProfileName = subsystem.getSystemProfileName();
- if ((!ssProfileName.equals(profileName)) && (profileMgr.isSystemProfileActive(ssProfileName)))
- {
- v.addElement(subsystem);
- }
- }
- }
- }
- }
- }
- }
-
- ISubSystem[] referencingSubSystems = null;
- if (v.size() > 0)
- {
- referencingSubSystems = new ISubSystem[v.size()];
- for (int idx = 0; idx < referencingSubSystems.length; idx++)
- referencingSubSystems[idx] = (ISubSystem) v.elementAt(idx);
- }
-
- return referencingSubSystems;
- }
-
-
-
- // ---------------------------------
- // FILTER METHODS
- // ---------------------------------
-
- /**
- * Return the translated string to show in the property sheet for the type property.
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
- {
- if (translatedFilterType == null)
- //translatedFilterType = "Remote system filter";
- translatedFilterType = SystemPropertyResources.RESID_PROPERTY_FILTERTYPE_VALUE;
- return translatedFilterType;
- }
- /*
- * Return the translated string to show in the property sheet for the type property when a filter string is selected.
- *
- public String getTranslatedFilterStringTypeProperty(SystemFilterString selectedFilterString)
- {
- if (translatedFilterStringType == null)
- //translatedFilterType = "Remote system filter string";
- translatedFilterStringType = SystemResources.RESID_PROPERTY_FILTERSTRINGTYPE_VALUE);
- return translatedFilterStringType;
- }*/
-
- /**
- * Return true if we should show the refresh action in the popup for the given element.
- */
- public boolean showRefreshOnFilter()
- {
- return true;
- }
-
- /**
- * Return true if we should show the show in table action in the popup for the given element.
- */
- public boolean showGenericShowInTableOnFilter()
- {
- return true;
- }
-
- /*
- * Overridable method to return the actions for creating a new filter string in a filter.
- * By default returns one action created by calling {@link #getNewFilterStringAction(SystemFilter, Shell)}.
- * <p>
- * If you have multiple actions for creating new filter strings, override this.
- * <p>
- * If you have only a single action for creating new filter strings, override getNewFilterStringAction (without the 's').
- * <p>
- * @param selectedFilter the currently selected filter
- * @param shell parent shell of viewer where the popup menu is being constructed
- *
- protected IAction[] getNewFilterStringActions(SystemFilter selectedFilter, Shell shell)
- {
- IAction[] actions = null;
- IAction newAction = getNewFilterStringAction(selectedFilter, shell);
- if (newAction != null)
- {
- actions = new IAction[1];
- actions[0] = newAction;
- }
- return actions;
- }*/
-
- /*
- * Overridable method to return the single action for creating a new filter string in a filter.
- * By default returns a new SystemDefaultNewFilterAction.
- * <p>
- * If you have multiple actions for creating new filters, override getNewFilterStringActions (note the 's').
- * <p>
- * If you have only a single action for creating new filters, override this.
- * <p>
- * @param filter the currently selected filter
- * @param shell parent shell of viewer where the popup menu is being constructed
- *
- protected IAction getNewFilterStringAction(SystemFilter selectedFilter, Shell shell)
- {
- //SystemFilterDefaultNewFilterStringAction action =
- // new SystemFilterDefaultNewFilterStringAction(shell, selectedFilter);
- //return action;
- return null;
- }*/
-
- /**
- * Overridable entry for child classes to contribute a server launcher instance
- * for a given subsystem.
- * <p>
- * Create an instance of ServerLauncher, and add it to the given subsystem.
- * When a subsystem is created, and {@link #supportsServerLaunchProperties(IHost)}
- * returns true, this method is called to create the server launcher instance
- * associated with the subsystem. The default implementation is to create an
- * instance of {@link IRemoteServerLauncher}, but override to create your own
- * ServerLauncher instance if you have your own class.
- */
- public IServerLauncherProperties createServerLauncher(IConnectorService connectorService)
- {
- IRemoteServerLauncher sl = new RemoteServerLauncher("Remote Server Launcher", connectorService); //$NON-NLS-1$
- String systemType = connectorService.getHostType();
-
- if (systemType.equals(IRSESystemType.SYSTEMTYPE_LINUX) ||
- systemType.equals(IRSESystemType.SYSTEMTYPE_POWER_LINUX) ||
- systemType.equals(IRSESystemType.SYSTEMTYPE_ZSERIES_LINUX)) {
- sl.setServerScript(RemoteServerLauncherConstants.LINUX_REXEC_SCRIPT);
- }
- else if (systemType.equals(IRSESystemType.SYSTEMTYPE_UNIX) ||
- systemType.equals(IRSESystemType.SYSTEMTYPE_AIX)) {
- sl.setServerScript(RemoteServerLauncherConstants.UNIX_REXEC_SCRIPT);
- }
-
- sl.saveToProperties();
- return sl;
- }
- /**
- * Return the form used in the property page, etc for this server launcher.
- * Only called if {@link #supportsServerLaunchProperties(IHost)} returns true.
- * <p>
- * We return {@link RemoteServerLauncherForm}.
- * Override if appropriate.
- */
- public IServerLauncherForm getServerLauncherForm(Shell shell, ISystemMessageLine msgLine)
- {
- return new RemoteServerLauncherForm(shell, msgLine);
- }
-
- // ------------------------------------------
- // SAVE METHODS...
- // ------------------------------------------
- /**
- * Saves absolutely everything to disk. This is called as a safety
- * measure when the workbench shuts down.
- * <p>
- * Totally handled for you!
- * <p>
- * Calls saveSubSystems() and saveFilterPools()
- * <p>
- * Exceptions are swallowed since we can deal with them on shutdown anyway!
- */
- public boolean commit()
- {
- boolean ok = false;
- try
- {
- saveSubSystems();
- saveFilterPools();
- ok = true;
- }
- catch (Exception exc)
- {
- }
- return ok;
- }
-
- /**
- * Save all subsystems for all connections to disk.
- * The default implementation for this iterates all subsystem instances,
- * and calls saveSubSystem for each.
- * <p>
- * If you handle your own save action versus using MOF, then override saveSubSystem(SubSystem)
- * versus this method.
- * <p>
- * Attempts to save all of them, swallowing exceptions, then at the end throws the last exception caught.
- */
- public void saveSubSystems() throws Exception
- {
- saveSubSystems(null);
- }
-
- /**
- * Save all subsystems for a given connection to disk.
- * The default implementation for this iterates all subsystem instances for that connection,
- * and calls saveSubSystem for each.
- * <p>
- * If you handle your own save action versus using MOF, then override saveSubSystem(SubSystem)
- * versus this method.
- * <p>
- * Attempts to save all of them, swallowing exceptions, then at the end throws the last exception caught.
- */
- public void saveSubSystems(IHost conn) throws Exception
- {
- Exception lastException = null;
- ISubSystem[] subsystems = null;
- if (conn != null)
- subsystems = getSubSystems(conn, ISubSystemConfiguration.LAZILY);
- else
- subsystems = getSubSystems(false); // false=> lazy get; don't restore from disk if not already
- if (subsystems == null)
- return;
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- try
- {
- saveSubSystem(subsystems[idx]);
- }
- catch (Exception exc)
- {
- lastException = exc;
- }
- }
- if (lastException != null)
- throw lastException;
- }
-
- /**
- * Attempt to save single subsystem to disk.
- * Uses MOF to save the given subsystem object.
- * <p>
- * Calls get saveFileName on the subsystem object to determine what file name to save to.
- * <p>
- * You need only override if you do not use MOF!
- */
- public void saveSubSystem(ISubSystem subsys) throws Exception
- {
- subsys.commit();
- }
-
- /**
- * Saves all filter information to disk for all profiles.
- * <p>
- * This method is handled for you. If you do override, please call super.saveFilterPools.
- */
- public boolean saveFilterPools() throws Exception
- {
- boolean ok = true;
- ISystemFilterPoolManager[] poolManagers = getFilterPoolManagers();
- Exception lastException = null;
- if (poolManagers != null)
- for (int idx = 0; idx < poolManagers.length; idx++)
- {
- try
- {
- saveFilterPools(poolManagers[idx]);
- }
- catch (Exception exc)
- {
- ok = false;
- lastException = exc;
- }
- }
- if (lastException != null)
- throw lastException;
- return ok;
- }
- /**
- * Saves all filter information to disk for the given profile.
- * <p>
- * This method is handled for you. If you do override, please call super.saveFilterPools.
- */
- public void saveFilterPools(ISystemFilterPoolManager mgr) throws Exception
- {
- try
- {
- mgr.commit();
- }
- catch (Exception exc)
- {
- handleException("Exception saving filter pools for manager " + mgr.getName(), exc); //$NON-NLS-1$
- throw exc;
- }
- }
-
- // used in the case where newsubsystems are added after a connection exists
- public ISubSystem createSubSystemAfterTheFact(IHost conn)
- {
- ISubSystem subsys = createSubSystemInternal(conn);
- if (subsys != null)
- {
- internalInitializeNewSubSystem(subsys, conn);
- if (supportsFilters())
- {
- // We create a filter pool reference manager object to manage the filter pool references
- // that are stored with a subsystem.
- //SystemFilterPoolManager[] relatedFilterPoolManagers =
- // getReferencableFilterPoolManagers(conn.getSystemProfile());
- ISystemFilterPoolReferenceManager fprMgr = SystemFilterStartHere.getDefault().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName(), filterNamingPolicy);
- subsys.setFilterPoolReferenceManager(fprMgr);
- ISystemFilterPoolManager defaultFilterPoolManager = getFilterPoolManager(conn.getSystemProfile());
- fprMgr.setDefaultSystemFilterPoolManager(defaultFilterPoolManager);
- }
- initializeSubSystem(subsys, null);
- try
- {
- saveSubSystem(subsys);
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error saving new subsystem " + subsys.getName(), exc); //$NON-NLS-1$
- }
- addSubSystem(subsys); // only add to list even if save was not successful.
- //if (lastExc != null)
- //throw lastExc;
-
- }
- return subsys;
- }
-
- /**
- * Return true if the subsystems for a given connection have been restored yet or not
- */
- protected boolean subSystemsHaveBeenRestored(IHost connection)
- {
- return (subSystemsRestoredFlags.get(connection) != null);
- }
-
- /**
- * Get all the filter pool managers for all the profiles, active or not.
- * Why do this? Because we need to in order to allow cross references from
- * one subsystem in one profile to filter pools in any other profile.
- */
- public ISystemFilterPoolManager[] restoreAllFilterPoolManagersForAllProfiles()
- {
- ISystemProfile[] profiles = SystemStartHere.getSystemProfileManager().getSystemProfiles();
- ISystemFilterPoolManager[] allMgrs = new ISystemFilterPoolManager[profiles.length];
- for (int idx = 0; idx < profiles.length; idx++)
- {
- allMgrs[idx] = getFilterPoolManager(profiles[idx]);
- }
- return allMgrs;
- }
-
-
-
-
- /**
- * Called by adapters prior to asking for actions, in case the connection of the currently selected
- * object is required by the action.
- */
- public void setConnection(IHost connection)
- {
- this.currentlySelectedConnection = connection;
- }
- /**
- * Called by adapters prior to asking for actions. For cases when current selection is needed.
- */
- public void setCurrentSelection(Object[] selection)
- {
- this.currentlySelected = selection;
- }
-
- // ---------------------------------
- // PRIVATE METHODS...
- // ---------------------------------
- protected void handleException(String msg, Exception exc)
- {
- SystemBasePlugin.logError(msg, exc);
- }
-
-
- // ------------------
- // UTILITY METHODS...
- // ------------------
- /**
- * Helper method to return the message "Connecting to &1..."
- */
- public static String getConnectingMessage(String hostName, int port)
- {
- SystemMessage msg = null;
- if (port > 0)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTWITHPORT_PROGRESS);
- msg.makeSubstitution(hostName, Integer.toString(port));
- }
- else
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_PROGRESS);
- msg.makeSubstitution(hostName);
- }
- return msg.getLevelOneText();
- }
- /**
- * Helper method to return the message "Disconnecting from &1..."
- */
- public static String getDisconnectingMessage(String hostName, int port)
- {
- SystemMessage msg = null;
- if (port > 0)
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECTWITHPORT_PROGRESS);
- msg.makeSubstitution(hostName, Integer.toString(port));
- }
- else
- {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_PROGRESS);
- msg.makeSubstitution(hostName);
- }
- return msg.getLevelOneText();
- }
-
- /**
- * Return the translated name of a default filter pool for a given profile
- */
- public static String getDefaultFilterPoolName(String profileName, String factoryId)
- {
- StringBuffer nameBuf = new StringBuffer();
- nameBuf.append(profileName);
- nameBuf.append(":"); //$NON-NLS-1$
- nameBuf.append(factoryId);
- /*
- String name = SystemResources.RESID_DEFAULT_FILTERPOOL;
- StringBuffer profileNameBuffer = new StringBuffer(profileName.toLowerCase());
- profileNameBuffer.setCharAt(0, Character.toUpperCase(profileNameBuffer.charAt(0)));
- name = SystemMessage.sub(name, "%1", profileNameBuffer.toString());
- */
- return nameBuf.toString();
- }
-
- // -----------------
- // COMMON METHODS...
- // -----------------
-
- /**
- * Return object as printable string.
- * This is the id plus dot plus the name.
- */
- public String toString()
- {
- return proxy.toString();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public java.util.List getSubSystemList()
- {
- if (subSystemList == null)
- {
- subSystemList = new ArrayList();
- //FIXME new EObjectResolvingeList(SubSystem.class, this, SubsystemsPackage.SUB_SYSTEM_FACTORY__SUB_SYSTEM_LIST);
- }
- return subSystemList;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public java.util.List getFilterPoolManagerList()
- {
- if (filterPoolManagerList == null)
- {
- filterPoolManagerList = new ArrayList();
- //FIXMEnew EObjectContainmenteList(SystemFilterPoolManager.class, this, SubsystemsPackage.SUB_SYSTEM_FACTORY__FILTER_POOL_MANAGER_LIST);
- }
- return filterPoolManagerList;
- }
-
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- public boolean isDirty()
- {
- return _isDirty;
- }
-
- public void setDirty(boolean flag)
- {
- _isDirty = flag;
- }
-
-
-
- public boolean wasRestored()
- {
- // factories are never restored from disk
- return false;
- }
-
-
-
- public void setWasRestored(boolean flag)
- {
- // dummy impl - not required for factories
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemHelpers.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemHelpers.java
deleted file mode 100644
index b0d7bfed3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemHelpers.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterContainer;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.ISystemProfile;
-
-/**
- * Static helper methods
- */
-public class SubSystemHelpers
-{
-
- /**
- * Give a filter pool reference, return parent subsystem
- * Returns this: <pre><code>(SubSystem)poolReference.getProvider()</pre></code>.
- */
- public static ISubSystem getParentSubSystem(ISystemFilterPoolReference poolReference)
- {
- return (ISubSystem)poolReference.getProvider();
- }
-
-
-
-
-
- /**
- * Give a filter pool, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterPool pool)
- {
- return (ISubSystemConfiguration)pool.getProvider();
- }
-
- /**
- * Give a filter, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilter filter)
- {
- return (ISubSystemConfiguration)filter.getProvider();
- }
-
- /**
- * Give a filter pool or filter, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterContainer container)
- {
- if (container instanceof ISystemFilterPool)
- return getParentSubSystemConfiguration((ISystemFilterPool)container);
- else
- return getParentSubSystemConfiguration((ISystemFilter)container);
- }
-
-
- /**
- * Give a filter pool reference, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterPoolReference poolRef)
- {
- ISystemFilterPool pool = poolRef.getReferencedFilterPool();
- if (pool != null)
- return getParentSubSystemConfiguration(pool);
- else
- return null;
- }
-
- /**
- * Give a filter reference, return parent subsystem factory
- */
- public static ISubSystemConfiguration getParentSubSystemConfiguration(ISystemFilterReference filterRef)
- {
- ISystemFilter filter = filterRef.getReferencedFilter();
- if (filter != null)
- return getParentSubSystemConfiguration(filter);
- else
- return null;
- }
-
- /**
- * Give a filter pool, return its parent filter pool manager
- */
- public static ISystemFilterPoolManager getParentSystemFilterPoolManager(ISystemFilterPool pool)
- {
- return pool.getSystemFilterPoolManager();
- }
- /**
- * Give a filter pool, return its parent profile
- */
- public static ISystemProfile getParentSystemProfile(ISystemFilterPool pool)
- {
- return getParentSubSystemConfiguration(pool).getSystemProfile(pool);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/util/ISubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/util/ISubSystemConfigurationAdapter.java
deleted file mode 100644
index d6f1b4602..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/util/ISubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems.util;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.propertypages.ISystemSubSystemPropertyPageCoreForm;
-import org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage;
-import org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.widgets.IServerLauncherForm;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * Defines the interface that must be implemented for adapters of for subsystem configurations.
- * This adapter is used when creating wizard pages for new connections.
- */
-public interface ISubSystemConfigurationAdapter
-{
-
- /**
- * There is a reasonable amount of processing needed to configure filter wizards. To aid
- * in performance and memory usage, we extract that processing into this method, and then
- * use a callback contract with the filter wizard to call us back to do this processing
- * only at the time the action is actually selected to be run.
- * <p>
- * The processing we do here is to specify the filter pools to prompt the user for, in the
- * second page of the New Filter wizards.
- * <p>
- * This method is from the ISystemNewFilterActionConfigurator interface
- */
- public void configureNewFilterAction(ISubSystemConfiguration factory, SystemNewFilterAction newFilterAction, Object callerData);
-
-
- // -----------------------------------
- // WIZARD PAGE CONTRIBUTION METHODS...
- // -----------------------------------
- /**
- * Optionally return one or more wizard pages to append to the New Connection Wizard if
- * the user selects a system type that this subsystem factory supports.
- * <p>
- * Some details:
- * <ul>
- * <li>The wizard pages must implement ISystemNewConnectionWizardPage, so as to fit into the wizard's framework
- * <li>When the user successfully presses Finish, the createConnection method in the SystemRegistry will call
- * your {@link #createSubSystem(IHost,boolean, ISystemNewConnectionWizardPage[])} method to create the
- * your subsystem for the connection. The same pages you return here are passed back to you so you can
- * interrogate them for the user-entered data and use it when creating the default subsystem instance.
- * </ul>
- * Tip: consider extending {@link org.eclipse.rse.ui.wizards.AbstractSystemNewConnectionWizardPage} for your wizard page class.
- */
- public ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(ISubSystemConfiguration factory, IWizard wizard);
-
- /**
- * Returns any framework-supplied actions remote objects that should be contributed to the popup menu
- * for the given selection list. This does nothing if this adapter does not implement ISystemViewRemoteElementAdapter,
- * else it potentially adds menu items for "User Actions" and Compile", for example. It queries the subsystem
- * factory of the selected objects to determine if these actions are appropriate to add.
- *
- * @param menu The menu to contribute actions to
- * @param selection The window's current selection.
- * @param shell of viewer calling this. Most dialogs require a shell.
- * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
- * @param subsystem the subsystem of the selection
- */
- public void addCommonRemoteActions(ISubSystemConfiguration factory, SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystem subsystem);
-
-
- // ---------------------------------
- // FILTER POOL METHODS...
- // ---------------------------------
-
- /**
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter pool object within a subsystem of this factory.
- * Only supported by subsystems that support filters.
- */
- public IAction[] getFilterPoolActions(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell);
-
- // ---------------------------------
- // FILTER POOL REFERENCE METHODS...
- // ---------------------------------
- /**
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter pool reference object within a subsystem of this factory. Note,
- * these are added to the list returned by getFilterPoolActions().
- * <p>
- * Only supported by subsystems that support filters.
- */
- public IAction[] getFilterPoolReferenceActions(ISubSystemConfiguration factory, ISystemFilterPoolReference selectedPoolReference, Shell shell);
-
-
- // ---------------------------------
- // FILTER METHODS
- // ---------------------------------
- /**
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter object.
- * <p>
- * Only supported and used by subsystems that support filters.
- * <p>
- * Most actions are handled in this base, except if you have your own action for
- * creating a new nested filter. In this case, <b>override getNewFilterAction()</b>
- */
- public IAction[] getFilterActions(ISubSystemConfiguration factory, ISystemFilter selectedFilter, Shell shell);
-
- /**
- * In addition to a change filter action, we now also support the same functionality
- * via a Properties page for filters. When this page is activated, this method is called
- * to enable customization of the page, given the selected filter.
- */
- public void customizeChangeFilterPropertyPage(ISubSystemConfiguration factory, SystemChangeFilterPropertyPage page, ISystemFilter selectedFilter, Shell shell);
- /**
- * In addition to a change filter action, we now also support the same functionality
- * via a Properties page for filter strings, in the Team View. When this page is activated,
- * this method is called to enable customization of the page, given the selected filter string.
- */
- public void customizeFilterStringPropertyPage(ISubSystemConfiguration factory, SystemFilterStringPropertyPage page, ISystemFilterString selectedFilterString, Shell shell);
-
-
- /**
- * Prompt the user to create a new filter as a result of the user expanding a promptable
- * filter.
- * @return the filter created by the user or null if they cancelled the prompting
- */
- public ISystemFilter createFilterByPrompting(ISubSystemConfiguration factory, ISystemFilterReference referenceToPromptableFilter, Shell shell)
- throws Exception;
-
-
- // ---------------------------------
- // FILTER REFERENCE METHODS
- // ---------------------------------
-
- /**
- * Returns a list of actions for the popup menu when user right clicks on a
- * filter reference object within a subsystem of this factory.
- * Only supported and used by subsystems that support filters.
- * <p>
- * Most actions are handled in this base, except if you have your own action for
- * creating a new filter. In this case, <b>override getNewFilterAction()</b>
- * To add additional actions, override {@link #getFilterReferenceActions(ISystemFilterReference, Shell)}.
- *
- * @param selectedFilterRef the currently selected filter reference
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- public IAction[] getFilterReferenceActions(ISubSystemConfiguration factory, ISystemFilterReference selectedFilterRef, Shell shell);
-
- /**
- * Returns a list of actions for the popup menu when user right clicks on a subsystem object from this factory.
- */
- public IAction[] getSubSystemActions(ISubSystemConfiguration factory, ISubSystem selectedSubSystem, Shell shell);
-
-
-
- // --------------------------
- // SERVER LAUNCHER METHODS...
- // --------------------------
- /**
- * Return the form used in the property page, etc for this server launcher.
- * Only called if {@link #supportsServerLaunchProperties()} returns true.
- */
- public IServerLauncherForm getServerLauncherForm(ISubSystemConfiguration factory, Shell shell, ISystemMessageLine msgLine);
-
- // --------------------------
- // SUBSYSTEM PROPERTY PAGE METHOD...
- // --------------------------
- /*
- * Return the form used in the subsyste property page
- */
- public ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISubSystemConfiguration factory, ISystemMessageLine msgLine, Object caller);
-
- /**
- * Return image descriptor for subsystems created by this factory. Comes from icon attribute in extension point xml
- */
- public ImageDescriptor getImage(ISubSystemConfiguration factory);
- /**
- * Return actual graphics Image of this factory.
- * This is the same as calling getImage().createImage() but the resulting image is cached
- */
- public Image getGraphicsImage(ISubSystemConfiguration factory);
- /**
- * Return image to use when this susystem is connection. Comes from icon attribute in extension point xml
- */
- public ImageDescriptor getLiveImage(ISubSystemConfiguration factory);
- /**
- * Return actual graphics LiveImage of this factory.
- * This is the same as calling getLiveImage().createImage() but the resulting image is cached
- */
- public Image getGraphicsLiveImage(ISubSystemConfiguration factory);
-
- /**
- * Supply the image to be used for filter pool managers, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterPoolManagerImage();
- /**
- * Supply the image to be used for filter pools, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterPoolImage(ISystemFilterPool filterPool);
- /**
- * Supply the image to be used for filters, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterImage(ISystemFilter filter);
- /*
- * Supply the image to be used for the given filter string, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterStringImage(ISystemFilterString filterString);
-
- /*
- * Supply the image to be used for the given filter string string, within actions.
- * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
- */
- public ImageDescriptor getSystemFilterStringImage(String filterStringString);
-
- public void renameSubSystemProfile(ISubSystemConfiguration factory, String oldProfileName, String newProfileName);
-
- /**
- * Return the single property page to show in the tabbed notebook for the
- * for SubSystem property of the parent Connection. Return null if no
- * page is to be contributed for this. You are limited to a single page,
- * so you may have to compress. It is recommended you prompt for the port
- * if applicable since the common base subsystem property page is not shown
- * To help with this you can use the SystemPortPrompt widget.
- */
- public PropertyPage getPropertyPage(ISubSystem subsystem, Composite parent);
-
-
-
-
- /**
- * Return the validator for the userId.
- * A default is supplied.
- * Note this is only used for the subsystem's properties, so will not
- * be used by the connection's default. Thus, is only of limited value.
- * <p>
- * This must be castable to ICellEditorValidator for the property sheet support.
- */
- public ISystemValidator getUserIdValidator(ISubSystemConfiguration config);
- /**
- * Return the validator for the password which is prompted for at runtime.
- * No default is supplied.
- */
- public ISystemValidator getPasswordValidator(ISubSystemConfiguration confi);
- /**
- * Return the validator for the port.
- * A default is supplied.
- * This must be castable to ICellEditorValidator for the property sheet support.
- */
- public ISystemValidator getPortValidator(ISubSystemConfiguration confi);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systemmessages.xml b/rse/plugins/org.eclipse.rse.ui/systemmessages.xml
deleted file mode 100644
index c77b9757e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systemmessages.xml
+++ /dev/null
@@ -1,1385 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!--
-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.
--->
-<!DOCTYPE MessageFile SYSTEM "messageFile.dtd">
-
-<MessageFile Version="1.0">
- <Component Name="Remote_System_Explorer" Abbr="RSE">
- <Subcomponent Name="General" Abbr="G">
- <MessageList>
- <Message ID="0402" Indicator="E">
- <LevelOne>%1 must be between %2 and %3.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1001" Indicator="U">
- <LevelOne>Under construction</LevelOne>
- <LevelTwo>This function is not yet available.</LevelTwo>
- </Message>
- <Message ID="1002" Indicator="Q">
- <LevelOne>This will reload the Remote System Explorer. Are you sure?</LevelOne>
- <LevelTwo>This action should only be used after receiving files from a team repository. It reloads the RSE from the workspace, incorporating the new files.</LevelTwo>
- </Message>
- <Message ID="1003" Indicator="U">
- <LevelOne>An unexpected exception has occurred</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="1006" Indicator="E">
- <LevelOne>Enter name</LevelOne>
- <LevelTwo>You must enter a name in the field where the cursor is positioned.</LevelTwo>
- </Message>
- <Message ID="1007" Indicator="E">
- <LevelOne>Name in use</LevelOne>
- <LevelTwo>This name is already used by another resource. Enter a unique name.</LevelTwo>
- </Message>
- <Message ID="1008" Indicator="E">
- <LevelOne>Name not valid</LevelOne>
- <LevelTwo>The name entered does not have valid syntax</LevelTwo>
- </Message>
- <Message ID="1009" Indicator="E">
- <LevelOne>You must rename %1</LevelOne>
- <LevelTwo>You have left the new name the same as the old name. Enter a new name that is different from the old name.</LevelTwo>
- </Message>
- <Message ID="1010" Indicator="E">
- <LevelOne>Name %1 is specified more than once</LevelOne>
- <LevelTwo>Two or more resources have been renamed to the same new name. Each resource must have a unique name.</LevelTwo>
- </Message>
- <Message ID="1011" Indicator="E">
- <LevelOne>Name %1 not valid</LevelOne>
- <LevelTwo>The name %1 does not have valid syntax</LevelTwo>
- </Message>
- <Message ID="1012" Indicator="E">
- <LevelOne>Enter new name</LevelOne>
- <LevelTwo>You have the new name entry field empty. You must enter a unique new name.</LevelTwo>
- </Message>
- <Message ID="1013" Indicator="E">
- <LevelOne>Expand failed or canceled. Try again.</LevelOne>
- <LevelTwo>When expanding a node in the tree, and retrieving the resources, either an error occurred or you cancelled the operation. The expand is cancelled.</LevelTwo>
- </Message>
- <Message ID="1014" Indicator="E">
- <LevelOne>Enter profile name</LevelOne>
- <LevelTwo>You must enter a name for the profile. Profiles contain all connections, filters and user defined actions. They are shared by the team, but each team member sees only those profiles which are active. Each profile can be private to you, or used by the whole team if all team members make the profile active. The name should reflect this. That is, if the profile is to be private to you, pick a name that is least likely to collide with a name chosen by other team members.</LevelTwo>
- </Message>
- <Message ID="1015" Indicator="E">
- <LevelOne>Profile of that name already exists</LevelOne>
- <LevelTwo>There is already a profile of that name. Choose a unique name for the profile.</LevelTwo>
- </Message>
- <Message ID="1016" Indicator="E">
- <LevelOne>Not a valid profile name</LevelOne>
- <LevelTwo>Profiles are stored as folders in the file system, so profile names must be valid folder names for the workbench. Furthermore, they must not contain pound signs (#) or exceed 100 characters in length. Profile names are not case sensitive, but are case tolerant.</LevelTwo>
- </Message>
- <Message ID="1017" Indicator="E">
- <LevelOne>Enter number</LevelOne>
- <LevelTwo>The value %1 you entered is not numeric. Enter only numeric input.</LevelTwo>
- </Message>
- <Message ID="1018" Indicator="E">
- <LevelOne>Name not valid as folder name</LevelOne>
- <LevelTwo>The name must be a valid folder name within the workbench and the underlying file system.</LevelTwo>
- </Message>
- <Message ID="1019" Indicator="E">
- <LevelOne>Name not valid as file name</LevelOne>
- <LevelTwo>The name must be a valid file name within the workbench and the underlying file system.</LevelTwo>
- </Message>
- <Message ID="1020" Indicator="E">
- <LevelOne>Enter system type</LevelOne>
- <LevelTwo>You must select a system type. The system type is the type of the operating system of the remote sytem.</LevelTwo>
- </Message>
- <Message ID="1021" Indicator="E">
- <LevelOne>Enter connection name</LevelOne>
- <LevelTwo>You must enter a connection name. This name is arbitrary, but must be unique to the selected profile.</LevelTwo>
- </Message>
- <Message ID="1022" Indicator="E">
- <LevelOne>Connection name is not unique for its profile</LevelOne>
- <LevelTwo>Connection names must be unique to the profile that contains the connection. Specify a name not already in use.</LevelTwo>
- </Message>
- <Message ID="1023" Indicator="E">
- <LevelOne>Not a valid connection name</LevelOne>
- <LevelTwo>The connection name is not syntactically valid. The name must be a valid folder name within the workbench and the underlying file system.</LevelTwo>
- </Message>
- <Message ID="1024" Indicator="E">
- <LevelOne>Enter host name or IP address</LevelOne>
- <LevelTwo>You must specify a host name or TCP/IP address for the remote system.</LevelTwo>
- </Message>
- <Message ID="1025" Indicator="E">
- <LevelOne>Enter user ID</LevelOne>
- <LevelTwo>You must specify a user ID to be used to connect to the system.</LevelTwo>
- </Message>
- <Message ID="1026" Indicator="E">
- <LevelOne>Not a valid user ID</LevelOne>
- <LevelTwo>The user ID entered is not syntactically valid. The only restriction for a user ID is that it not use the characters '=' or ';'.</LevelTwo>
- </Message>
- <Message ID="1027" Indicator="E">
- <LevelOne>Enter port number</LevelOne>
- <LevelTwo>You must specify a port number that is used to connect with the server-side communication layer.</LevelTwo>
- </Message>
- <Message ID="1028" Indicator="E">
- <LevelOne>Not a valid port number</LevelOne>
- <LevelTwo>The value you entered is not a valid port number. It must be a positive integer between 1 and 65536.</LevelTwo>
- </Message>
- <Message ID="1029" Indicator="E">
- <LevelOne>Enter value</LevelOne>
- <LevelTwo>You must enter a value in the field where the cursor is.</LevelTwo>
- </Message>
- <Message ID="1030" Indicator="E">
- <LevelOne>Entry is not unique</LevelOne>
- <LevelTwo>The value you entered is already in use. Specify a value that is not already in use.</LevelTwo>
- </Message>
- <Message ID="1031" Indicator="E">
- <LevelOne>Syntax is not valid</LevelOne>
- <LevelTwo>The syntax of the value at the cursor position is not valid.</LevelTwo>
- </Message>
- <Message ID="1032" Indicator="E">
- <LevelOne>Enter path</LevelOne>
- <LevelTwo>You must specify a file system path.</LevelTwo>
- </Message>
- <Message ID="1033" Indicator="E">
- <LevelOne>Path is not unique</LevelOne>
- <LevelTwo>The path you specified is already in use.</LevelTwo>
- </Message>
- <Message ID="1034" Indicator="E">
- <LevelOne>Path syntax is not valid</LevelOne>
- <LevelTwo>The syntax of the path you specified is not valid. Enter a file system path that is valid for the remote operating system. </LevelTwo>
- </Message>
- <Message ID="1035" Indicator="E">
- <LevelOne>Enter password</LevelOne>
- <LevelTwo>You must specify your password.</LevelTwo>
- </Message>
- <Message ID="1036" Indicator="E">
- <LevelOne>Password has expired</LevelOne>
- <LevelTwo>Your password has expired, and must be reset before continuing.</LevelTwo>
- </Message>
- <Message ID="1037" Indicator="E">
- <LevelOne>Enter filter pool name</LevelOne>
- <LevelTwo>You must specify a name for your filter pool. Filter pool names are arbitrary, but typically reflect the contents of the filters, such as "Release 1" or "Accounts Payable".</LevelTwo>
- </Message>
- <Message ID="1038" Indicator="E">
- <LevelOne>Filter pool name already exists in this profile</LevelOne>
- <LevelTwo>A filter pool with this name already exists in the profile.</LevelTwo>
- </Message>
- <Message ID="1039" Indicator="E">
- <LevelOne>Filter pool name not valid</LevelOne>
- <LevelTwo>The filter pool name you specified is not a valid name. The name must be a valid folder name in the workbench, and must not contain the pound sign '#'. It must also not exceed 50 characters in length.</LevelTwo>
- </Message>
- <Message ID="1040" Indicator="E">
- <LevelOne>Profile name %1 is reserved</LevelOne>
- <LevelTwo>The given profile name is reserved. Specify another name for the profile.</LevelTwo>
- </Message>
- <Message ID="1041" Indicator="Q">
- <LevelOne>Connection of name %1 already exists in profile %2. Continue?</LevelOne>
- <LevelTwo>A connection of this name exists in another profile. While this allowed, it is discouraged as it may lead to confusion. Press Yes to create the connection, or No to cancel the creation.</LevelTwo>
- </Message>
- <Message ID="1042" Indicator="E">
- <LevelOne>Enter filter name</LevelOne>
- <LevelTwo>You must specify a name for your filter. You can specify any name you like. Choose a name that tells others the contents of this filter. For example, "Source Files for Release 1".</LevelTwo>
- </Message>
- <Message ID="1043" Indicator="E">
- <LevelOne>Filter name already exists in this filter pool</LevelOne>
- <LevelTwo>The filter name you specified is in use. You must specify a name unique for the parent filter pool.</LevelTwo>
- </Message>
- <Message ID="1044" Indicator="E">
- <LevelOne>Filter name not valid</LevelOne>
- <LevelTwo>The filter name you specified is not a valid name. The name must be a valid file name in the workbench, and must not contain the pound sign '#'. It must also not exceed 100 characters in length.</LevelTwo>
- </Message>
- <Message ID="1045" Indicator="E">
- <LevelOne>Enter filtering information</LevelOne>
- <LevelTwo>You must specify filtering information</LevelTwo>
- </Message>
- <Message ID="1046" Indicator="E">
- <LevelOne>Filter string already exists</LevelOne>
- <LevelTwo>You specified a filter string which already exists in this filter. Having duplicate filter strings will result in duplicate resources in the expanded filter. Specify unique filter strings, preferably which result in unique resources. For example, don't specify both ABC* and A*. </LevelTwo>
- </Message>
- <Message ID="1047" Indicator="E">
- <LevelOne>Filter string not valid</LevelOne>
- <LevelTwo>The filter string you specified is not syntactically correct.</LevelTwo>
- </Message>
- <Message ID="1048" Indicator="E">
- <LevelOne>Duplicate filter string '%1'.</LevelOne>
- <LevelTwo>You have defined the same filter string twice or more. This will result in multiple copies of the same resource, when this filter is expanded. Delete the redundant filter strings.</LevelTwo>
- </Message>
- <Message ID="1049" Indicator="E">
- <LevelOne>Filter string '%1' already exists in filter %2</LevelOne>
- <LevelTwo>This filter string cannot be copied or moved to the target filter. The same filter string already exists there</LevelTwo>
- </Message>
- <Message ID="1050" Indicator="U">
- <LevelOne>Save to disk failed with an unexpected exception</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="1051" Indicator="U">
- <LevelOne>Restore of data failed with unexpected exception</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="1052" Indicator="Q">
- <LevelOne>Delete selected resources?</LevelOne>
- <LevelTwo>This is a permanent deletion of the selected resources and cannot be undone</LevelTwo>
- </Message>
- <Message ID="1053" Indicator="Q">
- <LevelOne>Delete profile '%1'?</LevelOne>
- <LevelTwo>Do you want to delete this profile, including all of its connections, filters and user actions? Select Yes to delete, or No to cancel the delete request</LevelTwo>
- </Message>
- <Message ID="1054" Indicator="I">
- <LevelOne>Connecting to %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1055" Indicator="I">
- <LevelOne>Connecting to %1 at port %2</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1056" Indicator="U">
- <LevelOne>Connect to %1 failed with an unexpected exception</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1057" Indicator="E">
- <LevelOne>Connect failed. Host %1 not found or not responding</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1058" Indicator="I">
- <LevelOne>Connect to %1 was cancelled</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1059" Indicator="I">
- <LevelOne>Disconnecting from %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1060" Indicator="I">
- <LevelOne>Disconnecting from %1 at port %2</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1061" Indicator="U">
- <LevelOne>Disconnect from %1 failed with exception</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1062" Indicator="E">
- <LevelOne>Disconnect from %1 was cancelled</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1063" Indicator="U">
- <LevelOne>Unexpected error deleting %1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1064" Indicator="U">
- <LevelOne>Unexpected error renaming %1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1065" Indicator="E">
- <LevelOne>Unexpected error moving %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1066" Indicator="U">
- <LevelOne>Operation failed with exception '%1'</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1067" Indicator="E">
- <LevelOne>Operation cancelled.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1068" Indicator="W">
- <LevelOne>Warning. Profile '%1' should be made active. Active connection '%2' contains a reference to it.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1069" Indicator="W">
- <LevelOne>Warning. Profile '%1' should be active. Active connection '%2' contains a reference to it.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1070" Indicator="I">
- <LevelOne>Resolving %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1071" Indicator="I">
- <LevelOne>Running %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1072" Indicator="I">
- <LevelOne>Copying '%1' to '%2'</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1073" Indicator="I">
- <LevelOne>Copying connection %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1074" Indicator="I">
- <LevelOne>Copying connections</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1075" Indicator="I">
- <LevelOne>Copying filter pools</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1076" Indicator="I">
- <LevelOne>Copying filter pool %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1077" Indicator="I">
- <LevelOne>Copying filters</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1078" Indicator="I">
- <LevelOne>Copying filter %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1079" Indicator="I">
- <LevelOne>Copying filter strings</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1080" Indicator="I">
- <LevelOne>Copying filter string %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1081" Indicator="I">
- <LevelOne>Copying subsystems</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1082" Indicator="I">
- <LevelOne>Filter pool(s) successfully copied to '%1'. You must create a new filter pool reference to see it (them).</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1083" Indicator="I">
- <LevelOne>Moving '%1' to '%2'</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1084" Indicator="I">
- <LevelOne>Moving connection %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1085" Indicator="I">
- <LevelOne>Moving connections</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1086" Indicator="I">
- <LevelOne>Moving filter pools</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1087" Indicator="I">
- <LevelOne>Moving filter pool %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1088" Indicator="I">
- <LevelOne>Moving filters</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1089" Indicator="I">
- <LevelOne>Moving filter %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1090" Indicator="I">
- <LevelOne>Moving filter strings</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1091" Indicator="E">
- <LevelOne>Moving filter string %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1092" Indicator="I">
- <LevelOne>Filter pool(s) successfully moved to '%1'. You must create a new filter pool reference to see it (them).</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1093" Indicator="I">
- <LevelOne>Setting %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1094" Indicator="I">
- <LevelOne>Setting properties</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1095" Indicator="I">
- <LevelOne>Querying %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1096" Indicator="I">
- <LevelOne>Querying properties</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1097" Indicator="I">
- <LevelOne>Running %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1098" Indicator="E">
- <LevelOne>Expand failed. Try again</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1099" Indicator="I">
- <LevelOne>Expand cancelled. Try again</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1100" Indicator="I">
- <LevelOne>Empty list</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1101" Indicator="I">
- <LevelOne>List cancelled</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1102" Indicator="I">
- <LevelOne>Filter created successfully. Expand this again to create another</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1103" Indicator="E">
- <LevelOne>Connection %1 not found</LevelOne>
- <LevelTwo>No connection named %1 currently exists</LevelTwo>
- </Message>
- <Message ID="1104" Indicator="E">
- <LevelOne>Profile %1 not found</LevelOne>
- <LevelTwo>No profile named %1 currently exists</LevelTwo>
- </Message>
- <Message ID="1105" Indicator="E">
- <LevelOne>Folder %1 not found on host %2</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1106" Indicator="E">
- <LevelOne>File %1 not found on host %2</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1107" Indicator="E">
- <LevelOne>File or folder %1 not found on host %2</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1108" Indicator="I">
- <LevelOne>Connection created successfully. Expand this again to create another</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1109" Indicator="W">
- <LevelOne>Connection busy</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1110" Indicator="E">
- <LevelOne>Command interrupted</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1111" Indicator="E">
- <LevelOne>Unable to run command</LevelOne>
- <LevelTwo>Possible causes: connection has been deleted, connection has been renamed, or connection has been disconnected</LevelTwo>
- </Message>
- <Message ID="1112" Indicator="W">
- <LevelOne>Command cancelled</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1115" Indicator="I">
- <LevelOne>Copying...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1116" Indicator="I">
- <LevelOne>Moving...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1117" Indicator="I">
- <LevelOne>Copying %1...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1118" Indicator="I">
- <LevelOne>Moving %1...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1119" Indicator="I">
- <LevelOne>Saving %1...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1120" Indicator="E">
- <LevelOne>%1 is not a valid archive name.</LevelOne>
- <LevelTwo>You must give a filename with an extension that is recognized as a valid archive type extension.</LevelTwo>
- </Message>
- <Message ID="1121" Indicator="E">
- <LevelOne>Combining to a virtual destination is not supported at this time. Please choose a non-virtual destination.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1122" Indicator="E">
- <LevelOne>The archive is corrupted or unreadable.</LevelOne>
- <LevelTwo>The archive cannot be opened because its format is unrecognized, or its contents are damaged in some way.</LevelTwo>
- </Message>
- <Message ID="1123" Indicator="E">
- <LevelOne>Cannot create archive.</LevelOne>
- <LevelTwo>There was an error creating the empty archive. The archive was not created.</LevelTwo>
- </Message>
- <Message ID="1124" Indicator="E">
- <LevelOne>Creation of the virtual file or folder %1 failed.</LevelOne>
- <LevelTwo>There was an error creating the virtual file or folder. The virtual file or folder was not created.</LevelTwo>
- </Message>
- <Message ID="1125" Indicator="E">
- <LevelOne>Deletion of the virtual file or folder %1 failed.</LevelOne>
- <LevelTwo>There was an error deleting the virtual file or folder. The virtual file or folder was not deleted.</LevelTwo>
- </Message>
- <Message ID="1126" Indicator="E">
- <LevelOne>Could not move the virtual file or folder %1.</LevelOne>
- <LevelTwo>There was an error moving the virtual file or folder. The virtual file or folder was not moved.</LevelTwo>
- </Message>
- <Message ID="1127" Indicator="E">
- <LevelOne>Converting to a virtual destination is not supported at this time. Please choose a non-virtual destination.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1128" Indicator="E">
- <LevelOne>Adding to a virtual destination is not supported. Please choose a non-virtual destination.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1129" Indicator="E">
- <LevelOne>Destination archive cannot be the same as, or contained in, any of the source files or folders.</LevelOne>
- <LevelTwo>You have selected a destination for the archive that is either one of the sources, or contained in one of the sources. This is not permitted.</LevelTwo>
- </Message>
- <Message ID="1130" Indicator="Q">
- <LevelOne>Permanently delete selected remote resource(s)?</LevelOne>
- <LevelTwo>This is a permanent deletion of the selected remote resources from disk. This action cannot be undone</LevelTwo>
- </Message>
- <Message ID="1140" Indicator="U">
- <LevelOne>Error occurred while loading the user-defined action information from file: %1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1141" Indicator="U">
- <LevelOne>The xml file '%1' appears to be corrupted. It has been replaced</LevelOne>
- <LevelTwo>Expected root tag to be named '%2'. The corrupted file has been renamed to '%3' and a new file created for you</LevelTwo>
- </Message>
- <Message ID="1150" Indicator="E">
- <LevelOne>Unable to perform action as the underlying file system folder is in use</LevelOne>
- <LevelTwo>The file system folder %1 is in use by another task and cannot be removed or modified</LevelTwo>
- </Message>
- <Message ID="1151" Indicator="E">
- <LevelOne>Unable to perform action as the underlying file system file is in use</LevelOne>
- <LevelTwo>The file system file %1 is in use by another task and cannot be removed or modified</LevelTwo>
- </Message>
- <Message ID="1160" Indicator="Q">
- <LevelOne>Filter pool %1 created. Create a reference to it in the selected subsystem?</LevelOne>
- <LevelTwo>New filter pools are not accessible until a reference is added to them in a subsystem. Select Yes to add a reference to the new filter pool in selected subsystem %2</LevelTwo>
- </Message>
- <Message ID="1161" Indicator="E">
- <LevelOne>Filter update failed: %1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1162" Indicator="E">
- <LevelOne>Filter rename failed: %1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1170" Indicator="E">
- <LevelOne>Enter numeric value</LevelOne>
- <LevelTwo>You must enter a numeric value</LevelTwo>
- </Message>
- <Message ID="1171" Indicator="E">
- <LevelOne>Value %1 not numeric</LevelOne>
- <LevelTwo>The value specified is not a valid number</LevelTwo>
- </Message>
- <Message ID="1172" Indicator="E">
- <LevelOne>Value %1 not in range</LevelOne>
- <LevelTwo>The value specified is not within the valid range of %2 to %3</LevelTwo>
- </Message>
- <Message ID="1180" Indicator="E">
- <LevelOne>Enter action name</LevelOne>
- <LevelTwo>You must enter a name for this action</LevelTwo>
- </Message>
- <Message ID="1181" Indicator="E">
- <LevelOne>Action name is not unique</LevelOne>
- <LevelTwo>There is already an action with the given name in the selected profile. Specify a name that is not already in use</LevelTwo>
- </Message>
- <Message ID="1182" Indicator="E">
- <LevelOne>Action name is not valid</LevelOne>
- <LevelTwo>The given name is not a valid action name</LevelTwo>
- </Message>
- <Message ID="1183" Indicator="E">
- <LevelOne>Enter comment</LevelOne>
- <LevelTwo>You must enter a comment for this action</LevelTwo>
- </Message>
- <Message ID="1184" Indicator="E">
- <LevelOne>Action comment is not valid</LevelOne>
- <LevelTwo>The given comment has syntactical errors</LevelTwo>
- </Message>
- <Message ID="1185" Indicator="E">
- <LevelOne>Enter command</LevelOne>
- <LevelTwo>You must enter a command for this action</LevelTwo>
- </Message>
- <Message ID="1186" Indicator="E">
- <LevelOne>Action command is not valid</LevelOne>
- <LevelTwo>The given command has syntactical errors</LevelTwo>
- </Message>
- <Message ID="1187" Indicator="E">
- <LevelOne>Enter type name</LevelOne>
- <LevelTwo>You must enter a name for this collection of resource types</LevelTwo>
- </Message>
- <Message ID="1188" Indicator="E">
- <LevelOne>Type name %1 in use</LevelOne>
- <LevelTwo>There is already a named type with the given name. Specify a name that is not already in use</LevelTwo>
- </Message>
- <Message ID="1189" Indicator="E">
- <LevelOne>Type name %1 is not valid</LevelOne>
- <LevelTwo>The given name is not valid for a named type. It must not contain blanks</LevelTwo>
- </Message>
- <Message ID="1190" Indicator="E">
- <LevelOne>Specify one or more resource types</LevelOne>
- <LevelTwo>You must specify one or more simple or generic resource types to constitute this named type</LevelTwo>
- </Message>
- <Message ID="1191" Indicator="E">
- <LevelOne>Types not valid</LevelOne>
- <LevelTwo>Syntactical errors were found in the list of resource types</LevelTwo>
- </Message>
- <Message ID="1192" Indicator="E">
- <LevelOne>Enter source type</LevelOne>
- <LevelTwo>You must enter a source type</LevelTwo>
- </Message>
- <Message ID="1193" Indicator="E">
- <LevelOne>Source type "%1" not valid</LevelOne>
- <LevelTwo>The source type you entered is not valid.</LevelTwo>
- </Message>
- <Message ID="1194" Indicator="E">
- <LevelOne>Source type "%1" already exists</LevelOne>
- <LevelTwo>The source type you entered has already been specified. Specify a unique source type.</LevelTwo>
- </Message>
- <Message ID="1195" Indicator="E">
- <LevelOne>Enter a label for this compile command</LevelOne>
- <LevelTwo>You must enter a label for this compile command, that will be shown in menus and lists</LevelTwo>
- </Message>
- <Message ID="1196" Indicator="E">
- <LevelOne>Compile command label "%1" is in use</LevelOne>
- <LevelTwo>There is already a compile command with the given label. Specify a label that is not already in use</LevelTwo>
- </Message>
- <Message ID="1197" Indicator="E">
- <LevelOne>Compile command label "%1" is not valid</LevelOne>
- <LevelTwo>The given label is not a valid compile label</LevelTwo>
- </Message>
- <Message ID="1198" Indicator="E">
- <LevelOne>Enter command string for this compile command</LevelOne>
- <LevelTwo>You must enter a command string for this compile command. This is what is run when this compile command is selected.</LevelTwo>
- </Message>
- <Message ID="1199" Indicator="E">
- <LevelOne>Compile command string "%1" is not valid</LevelOne>
- <LevelTwo>The given string is not a valid command.</LevelTwo>
- </Message>
- <Message ID="1201" Indicator="Q">
- <LevelOne>Changes pending. Save changes?</LevelOne>
- <LevelTwo>You have changes pending. Select Yes to save those changes. Select No to discard those changes</LevelTwo>
- </Message>
- <Message ID="1202" Indicator="Q">
- <LevelOne>Changes pending. Continue?</LevelOne>
- <LevelTwo>You have changes pending. Select Yes to discard those changes. Select No to cancel the operation so you can first save your changes</LevelTwo>
- </Message>
- <Message ID="1220" Indicator="E">
- <LevelOne>Host name '%1' not found or valid</LevelOne>
- <LevelTwo>A remote system of host name '%1' was found. If you are working disconnected, de-select the checkbox to verify the host name</LevelTwo>
- </Message>
- <Message ID="1221" Indicator="I">
- <LevelOne>Verifying host name...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1230" Indicator="Q">
- <LevelOne>Delete selected user actions?</LevelOne>
- <LevelTwo>This is a permanent deletion of the selected actions and cannot be undone.Select Yes to delete and No to cancel the delete action</LevelTwo>
- </Message>
- <Message ID="1231" Indicator="Q">
- <LevelOne>Delete selected types?</LevelOne>
- <LevelTwo>This is a permanent deletion of the selected types and cannot be undone.Select Yes to delete and No to cancel the delete action</LevelTwo>
- </Message>
- <Message ID="1240" Indicator="E">
- <LevelOne>There is an error on another page</LevelOne>
- <LevelTwo>Another page of the wizard has an error that must be corrected before the wizard can be finished</LevelTwo>
- </Message>
- <Message ID="1242" Indicator="U">
- <LevelOne>Daemon failed to launch server on %1 using port %2</LevelOne>
- <LevelTwo>%3</LevelTwo>
- </Message>
- <Message ID="1243" Indicator="U">
- <LevelOne>Failed to connect to the daemon on %1 using port %2 with an unexpected exception</LevelOne>
- <LevelTwo>%3</LevelTwo>
- </Message>
-
- <!-- universal find files pattern verification -->
- <Message ID="1250" Indicator="E">
- <LevelOne>The pattern may not be blank</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1251" Indicator="E">
- <LevelOne>Invalid regular expression</LevelOne>
- <LevelTwo>The value %1 you entered is not a valid regular expression</LevelTwo>
- </Message>
-
- <!-- operation status -->
- <Message ID="1255" Indicator="I">
- <LevelOne>%1 - Running</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1256" Indicator="I">
- <LevelOne>%1 - Finished</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1257" Indicator="I">
- <LevelOne>%1 - Cancelled</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1258" Indicator="I">
- <LevelOne>%1 - Disconnected</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
-
- <!-- universal command invocation verification -->
- <Message ID="1260" Indicator="E">
- <LevelOne>The invocation may not be blank</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
- <!-- drag and drop -->
- <Message ID="1270" Indicator="E">
- <LevelOne>Invalid transfer operation</LevelOne>
- <LevelTwo>The source %1 cannot be transferred into the target %2</LevelTwo>
- </Message>
- <Message ID="1280" Indicator="I">
- <LevelOne>Downloading %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1281" Indicator="I">
- <LevelOne>Uploading %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1282" Indicator="I">
- <LevelOne>Synchronizing Resources...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1285" Indicator="I">
- <LevelOne>Extracting %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1290" Indicator="I">
- <LevelOne>%1 of %2 complete (%3)</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1295" Indicator="I">
- <LevelOne>Downloading resources...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1296" Indicator="I">
- <LevelOne>Uploading resources...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1297" Indicator="E">
- <LevelOne>The new password is invalid.</LevelOne>
- <LevelTwo>The remote system indicated that the new password is unacceptable. Please ensure the new password follows all password rules for the remote system.</LevelTwo>
- </Message>
-
- <!-- remote install issues -->
- <Message ID="1300" Indicator="E">
- <LevelOne>The FTP service is unavailable on the remote system.</LevelOne>
- <LevelTwo>The RSE server needs to be installed manually.</LevelTwo>
- </Message>
- <Message ID="1301" Indicator="E">
- <LevelOne>The Telnet service is unavailable on the remote system.</LevelOne>
- <LevelTwo>The RSE server needs to be started manually or a system administrator needs to install the RSE daemon.</LevelTwo>
- </Message>
- <Message ID="1302" Indicator="E">
- <LevelOne>Unable to start the RSE server.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1303" Indicator="E">
- <LevelOne>Unable to install the RSE server.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1304" Indicator="E">
- <LevelOne>Archive Management is not supported by the current File subsystem's configuration.</LevelOne>
- <LevelTwo>In the properties for the File subsystem, choose a configuration that supports Archive Management.</LevelTwo>
- </Message>
-
- <!-- classic tools -->
- <Message ID="1400" Indicator="Q">
- <LevelOne>This action will take a few minutes. Proceed?</LevelOne>
- <LevelTwo>This action uncompresses a large number of HTML files from a zip file. It will take awhile, and require sufficient disk space. Press Yes to continue, No to cancel.</LevelTwo>
- </Message>
- <Message ID="1401" Indicator="E">
- <LevelOne>Classic help already enabled.</LevelOne>
- <LevelTwo>The HTML files for the CODE and VisualAge RPG help have already been uncompressed.</LevelTwo>
- </Message>
-
- <!-- Dynamic Error List - dynamic message title -->
- <Message ID="1500" Indicator="E">
- <LevelOne>Remote Error List: %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
- <!-- universal remote search dialog -->
- <Message ID="1600" Indicator="E">
- <LevelOne>Folder path must not be empty.</LevelOne>
- <LevelTwo>Select a folder from the dropdown list or click the Browse... button and select a folder from the dialog.</LevelTwo>
- </Message>
- <Message ID="1601" Indicator="E">
- <LevelOne>Regular expression is not valid.</LevelOne>
- <LevelTwo>The value %1 you entered is not a valid regular expression.</LevelTwo>
- </Message>
-
- </MessageList>
- </Subcomponent>
- <Subcomponent Name="Other" Abbr="O">
- <MessageList>
- <!-- These are generic message which could be used when you would like to display a server message -->
- <Message ID="1000" Indicator="I">
- <LevelOne>%1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1001" Indicator="W">
- <LevelOne>%1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1002" Indicator="E">
- <LevelOne>%1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1003" Indicator="U">
- <LevelOne>%1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1004" Indicator="Q">
- <LevelOne>%1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1005" Indicator="I">
- <LevelOne>%1: %2</LevelOne>
- <LevelTwo>%3</LevelTwo>
- </Message>
- <Message ID="1006" Indicator="W">
- <LevelOne>%1: %2</LevelOne>
- <LevelTwo>%3</LevelTwo>
- </Message>
- <Message ID="1007" Indicator="E">
- <LevelOne>%1: %2</LevelOne>
- <LevelTwo>%3</LevelTwo>
- </Message>
- <Message ID="1008" Indicator="U">
- <LevelOne>%1: %2</LevelOne>
- <LevelTwo>%3</LevelTwo>
- </Message>
- <Message ID="1009" Indicator="Q">
- <LevelOne>%1: %2</LevelOne>
- <LevelTwo>%3</LevelTwo>
- </Message>
- <Message ID="1010" Indicator="I">
- <LevelOne>%1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1011" Indicator="W">
- <LevelOne>%1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1012" Indicator="E">
- <LevelOne>%1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1013" Indicator="U">
- <LevelOne>%1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1014" Indicator="Q">
- <LevelOne>%1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- </MessageList>
- </Subcomponent>
- <Subcomponent Name="Files" Abbr="F">
- <MessageList>
- <!-- REMOTE FILE SYSTEM EXCEPTION ERROR MESSAGES -->
- <Message ID="1001" Indicator="E">
- <LevelOne>Operation failed. Security violation</LevelOne>
- <LevelTwo>Message reported from file system: %1</LevelTwo>
- </Message>
- <Message ID="1002" Indicator="E">
- <LevelOne>Operation failed. File system input or output error</LevelOne>
- <LevelTwo>Message reported from file system: %1</LevelTwo>
- </Message>
- <Message ID="1003" Indicator="E">
- <LevelOne>Folder is not empty. Cannot delete</LevelOne>
- <LevelTwo>The operation failed. One possible reason is that the folder is not empty</LevelTwo>
- </Message>
- <Message ID="1004" Indicator="E">
- <LevelOne>Folder '%1' not found</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1005" Indicator="Q">
- <LevelOne>Folder '%1' not found. Would you like to create it?</LevelOne>
- <LevelTwo>The folder you specified does not exist. Select Yes to create it, No to cancel the operation</LevelTwo>
- </Message>
- <Message ID="1006" Indicator="E">
- <LevelOne>File '%1' not found</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <!-- REMOTE FILE SYSTEM ERROR MESSAGES -->
- <Message ID="1011" Indicator="E">
- <LevelOne>Enter file name pattern</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1007" Indicator="E">
- <LevelOne>Filter string '%1' already exists in this filter</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1008" Indicator="E">
- <LevelOne>Filter string name pattern not valid</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1009" Indicator="I">
- <LevelOne>You must include files or folders or both</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1010" Indicator="E">
- <LevelOne>No file types specified</LevelOne>
- <LevelTwo>Either specify one or more file types, or select to subset by file name</LevelTwo>
- </Message>
-
- <Message ID="1200" Indicator="I">
- <LevelOne>Create a new File</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1201" Indicator="I">
- <LevelOne>Create a new Folder</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1202" Indicator="I">
- <LevelOne>Enter folder name</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1203" Indicator="E">
- <LevelOne>Names cannot begin or end with whitespace.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1204" Indicator="E">
- <LevelOne>%1 is an invalid character in a name.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1205" Indicator="I">
- <LevelOne>Enter file name</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="1300" Indicator="E">
- <LevelOne>Deletion of the object %1 failed</LevelOne>
- <LevelTwo>Either the object does not exist or you do not have enough authority to delete the object. If this is a folder, the folder may not be empty</LevelTwo>
- </Message>
- <Message ID="1301" Indicator="E">
- <LevelOne>Renaming of the object %1 failed</LevelOne>
- <LevelTwo>Rename operation failed because, the object to rename does not exist, or the object with new object name already exists, or the user does not have enough authority to rename the object</LevelTwo>
- </Message>
- <Message ID="1302" Indicator="E">
- <LevelOne>No authority or file name not valid</LevelOne>
- <LevelTwo>The file could not be created because of one of the following reasons:
- - the user does not have enough authority to create the file
- - the file name is not valid </LevelTwo>
- </Message>
- <Message ID="1303" Indicator="E">
- <LevelOne>File already exists</LevelOne>
- <LevelTwo>The new file %1 already exists</LevelTwo>
- </Message>
- <Message ID="1304" Indicator="E">
- <LevelOne>Creation of the folder failed</LevelOne>
- <LevelTwo>The folder %1 could not be created because of one of the following reasons:
- - the user does not have enough authority to create the folder
- - the folder name is not valid </LevelTwo>
- </Message>
- <Message ID="1305" Indicator="E">
- <LevelOne>The operation did not complete successfully. See additional messages in the Remote Shell view</LevelOne>
- <LevelTwo>The operation requested failed. Look in the Remote Shell view to see additional messages indicating the cause of the failure</LevelTwo>
- </Message>
- <Message ID="1306" Indicator="E">
- <LevelOne>Copy of the file or folder %1 failed</LevelOne>
- <LevelTwo>The file system reported the copy operation failed. You may not have authority to the target folder, or it may be in use</LevelTwo>
- </Message>
- <Message ID="1307" Indicator="E">
- <LevelOne>Move of the file or folder %1 failed</LevelOne>
- <LevelTwo>The file system reported the move operation failed. You may not have authority to the source folder or file, or you may not have authority to the target folder, or it may be in use</LevelTwo>
- </Message>
- <Message ID="1308" Indicator="E">
- <LevelOne>Target folder cannot equal source folder</LevelOne>
- <LevelTwo>Attempting to move a file or folder to the same folder as it exists in is equivalent to a rename operation. Use the rename action for this</LevelTwo>
- </Message>
- <Message ID="1309" Indicator="E">
- <LevelOne>Folder already exists</LevelOne>
- <LevelTwo>The new folder %1 already exists</LevelTwo>
- </Message>
- <Message ID="1310" Indicator="Q">
- <LevelOne>New resource will not be visible due to subsetting. Create it anyway?</LevelOne>
- <LevelTwo>The name of the resource you are creating does not match the current filter criteria. If you select Yes to create the resource, it will not be visible within the current filter.</LevelTwo>
- </Message>
- <Message ID="1311" Indicator="Q">
- <LevelOne>Resource will not be visible due to subsetting. Rename it anyway?</LevelOne>
- <LevelTwo>The new name of the resource does not match the current filter criteria. If you select Yes to rename the resource, it will not be visible within the current filter.</LevelTwo>
- </Message>
- <Message ID="1312" Indicator="E">
- <LevelOne>Target folder cannot descend from source folder</LevelOne>
- <LevelTwo>It is impossible to move a folder to one of its subfolders.</LevelTwo>
- </Message>
- <Message ID="1313" Indicator="E">
- <LevelOne>Target folder cannot be written to. Please select another destination folder.</LevelOne>
- <LevelTwo>The target folder is an unsuitable destination because it is read-only or you do not have write permission on it.</LevelTwo>
- </Message>
- <Message ID="1315" Indicator="I">
- <LevelOne>Deleting %1...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <!-- Universal Remote Editing -->
- <Message ID="5001" Indicator="E">
- <LevelOne>File %1 on %2 can not be opened. You do not have read access to the file.</LevelOne>
- <LevelTwo>Change file permissions to ensure you have read access to the file.</LevelTwo>
- </Message>
- <Message ID="5002" Indicator="Q">
- <LevelOne>You do not have write access to file %1 on %2. Do you want to open the file in browse mode?</LevelOne>
- <LevelTwo>You do not have write permission to the file %1 on %2. You can open the file in browse (read-only) mode. If you want to edit the file, change file permissions to allow write access to the file.</LevelTwo>
- </Message>
- <Message ID="5003" Indicator="E">
- <LevelOne>File %1 can not be saved on %2. You do not have write access to the file.</LevelOne>
- <LevelTwo>Change file permissions to ensure you have write access to the file.</LevelTwo>
- </Message>
- <Message ID="5004" Indicator="E">
- <LevelOne>File %1 can not be saved on %2. You do not have write access to the file.</LevelOne>
- <LevelTwo>Change file permissions to ensure you have write access to the file.</LevelTwo>
- </Message>
- <Message ID="5005" Indicator="Q">
- <LevelOne>File %1 on %2 was modified since you opened this file or saved the file on the server. Do you want to replace the current contents of the file on the server?</LevelOne>
- <LevelTwo>The file %1 was changed on the server after it was retrieved from %2 or since the last time the file was saved on the server. Choose Yes to replace the contents of the file. Choose No to leave the file on the server with its current contents.</LevelTwo>
- </Message>
- <Message ID="5006" Indicator="E">
- <LevelOne>File %1 was not completely saved on %2. The file was saved in the local file system.</LevelOne>
- <LevelTwo>An error occurred while saving the file on the server. A possible cause is the connection to the server was terminated. The file may only have been saved partially on the server. However, it was saved locally to help you recover. You will be asked to save the local copy to the server the next time you connect.</LevelTwo>
- </Message>
- <Message ID="5007" Indicator="Q">
- <LevelOne>File %1 on %2 may not have been saved completely during an earlier edit session. The file was saved on the local file system. Do you want to replace the file with the local copy now?</LevelOne>
- <LevelTwo>An error occurred during an earlier attempt to save the file. But a local copy of the file was saved for recovery. Choose Yes to save the local copy on the server. Choose No if recovery is not required.</LevelTwo>
- </Message>
- <Message ID="5008" Indicator="Q">
- <LevelOne>File %1 does not exist on %2. Do you want to create the file?</LevelOne>
- <LevelTwo>Choose Yes to create the file on the server and save the contents to the file. Choose No if you do not want the file to be created.</LevelTwo>
- </Message>
- <Message ID="5009" Indicator="Q">
- <LevelOne>You are currently editing file %1 on %2. Do you want to open the file in browse mode?</LevelOne>
- <LevelTwo>You are allowed to edit a file in one editor only. You can, however, open the file in another editor for browsing. Browsing lets you view the file but does not allow you to edit its contents.</LevelTwo>
- </Message>
- <Message ID="5010" Indicator="E">
- <LevelOne>Profile named %1 does not exist.</LevelOne>
- <LevelTwo>Profile may have been renamed or deleted.</LevelTwo>
- </Message>
- <Message ID="5011" Indicator="E">
- <LevelOne>Connection named %1 does not exist.</LevelOne>
- <LevelTwo>Connection may have been renamed or deleted.</LevelTwo>
- </Message>
-
-
- <!-- Enter or select dialog messages -->
- <Message ID="5012" Indicator="Q">
- <LevelOne>File %1 already exists. Do you want to replace it?</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="5013" Indicator="Q">
- <LevelOne>Parent folder %1 does not exist. Do you want to create it?</LevelOne>
- <LevelTwo>The parent folder must be created for the file to be created.</LevelTwo>
- </Message>
- <Message ID="5014" Indicator="E">
- <LevelOne>Parent folder %1 does not exist. Verify that the correct path was entered.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
-
- <Message ID="5020" Indicator="I">
- <LevelOne>Folder %1 is not readable. Cannot expand</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
- <!-- Import/Export messages -->
- <Message ID="5101" Indicator="E">
- <LevelOne>Unable to use connection.</LevelOne>
- <LevelTwo>Please correct, or select alternate connection.</LevelTwo>
- </Message>
- <Message ID="5102" Indicator="E">
- <LevelOne>Unexpected exception received: %1.</LevelOne>
- <LevelTwo>Please see error log for details.</LevelTwo>
- </Message>
- <Message ID="5103" Indicator="Q">
- <LevelOne>The file '%1' already exists on %2. Do you want to overwrite it?</LevelOne>
- <LevelTwo>Click Yes to overwrite the existing file, or click No to cancel the export.</LevelTwo>
- </Message>
-
- <!-- Universal File Preference Page -->
- <Message ID="6001" Indicator="E">
- <LevelOne>File type extension can not be empty.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="6002" Indicator="E">
- <LevelOne>File type extension must not contain '*' or '.'</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="6003" Indicator="E">
- <LevelOne>The encoding is not supported.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
-
- <!-- Cache Preference Page -->
- <Message ID="6101" Indicator="W">
- <LevelOne>One or more cached files have changes that have not been saved on the host.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="6102" Indicator="W">
- <LevelOne>Unable to synchronize cache changes to host. Operation cancelled.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
- <!-- Communications Preference Page -->
- <Message ID="6201" Indicator="E">
- <LevelOne>The IP address or host name can not be empty.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="6202" Indicator="E">
- <LevelOne>The IP address is not valid.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="6203" Indicator="E">
- <LevelOne>The host name is not valid.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
-
- <!-- CCSID entry messages (in preference page) -->
- <Message ID="7001" Indicator="E">
- <LevelOne>Enter CCSID</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="7002" Indicator="E">
- <LevelOne>CCSID must be a number between 0 and 65535</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
- <!-- Unexpected and miscellaneous error messages -->
- <Message ID="8001" Indicator="U">
- <LevelOne>An unknown error occurred.</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="8002" Indicator="U">
- <LevelOne>An unexpected error occurred.</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="8003" Indicator="E">
- <LevelOne>Value is not valid</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="8004" Indicator="E">
- <LevelOne>Input %1 is not valid</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
-
- <!-- REMOTE FILE IMPORT/EXPORT MESSAGES -->
- <Message ID="8050" Indicator="E">
- <LevelOne>Can not copy root file system</LevelOne>
- <LevelTwo>The root is not something that can be copied</LevelTwo>
- </Message>
- <Message ID="8051" Indicator="E">
- <LevelOne>Could not close import stream for %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="8052" Indicator="E">
- <LevelOne>Unable to import %1: %2</LevelOne>
- <LevelTwo>%3</LevelTwo>
- </Message>
- <Message ID="8053" Indicator="I">
- <LevelOne>Creating folder %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="8054" Indicator="E">
- <LevelOne>Problems were encountered during import</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="8055" Indicator="E">
- <LevelOne>Error opening input stream for %1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="8056" Indicator="E">
- <LevelOne>Unable to import %1</LevelOne>
- <LevelTwo>The file cannot be copied onto itself</LevelTwo>
- </Message>
- <Message ID="8057" Indicator="E">
- <LevelOne>Error occurred while exporting %1: %2</LevelOne>
- <LevelTwo>%3</LevelTwo>
- </Message>
- <Message ID="8058" Indicator="E">
- <LevelOne>Problems were encountered during export</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="8059" Indicator="E">
- <LevelOne>Cannot overwrite file %1</LevelOne>
- <LevelTwo>The file does not have its write attribute set, so it cannot be written to</LevelTwo>
- </Message>
- <Message ID="8060" Indicator="Q">
- <LevelOne>Target folder does not exist. Would you like to create it?</LevelOne>
- <LevelTwo>Press Yes to create the folder %1, No to cancel</LevelTwo>
- </Message>
- <Message ID="8061" Indicator="E">
- <LevelOne>Target folder already exists, as a file</LevelOne>
- <LevelTwo>The remote resource %1 already exists, but as a file, not a folder</LevelTwo>
- </Message>
- <Message ID="8062" Indicator="E">
- <LevelOne>Destination folder conflicts with location of %1</LevelOne>
- <LevelTwo>You are attempting to export to the local file system, to a location that overlaps the resources being exported.</LevelTwo>
- </Message>
- <Message ID="8063" Indicator="E">
- <LevelOne>Source is a file, not a folder</LevelOne>
- <LevelTwo>The remote resource %1 is a file, but a folder is required</LevelTwo>
- </Message>
- <Message ID="8064" Indicator="E">
- <LevelOne>There are no resources currently selected for import</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="8065" Indicator="E">
- <LevelOne>Select the source directory</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="8066" Indicator="I">
- <LevelOne>Enter or select a source folder</LevelOne>
- <LevelTwo>You have left the source folder empty, but it must be set to continue.</LevelTwo>
- </Message>
- <Message ID="8067" Indicator="E">
- <LevelOne>Export problems</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="8068" Indicator="E">
- <LevelOne>There are no resources currently selected for export</LevelOne>
- <LevelTwo>Select resources to be exported and try again</LevelTwo>
- </Message>
- <Message ID="8069" Indicator="I">
- <LevelOne>Please enter a destination folder</LevelOne>
- <LevelTwo>The destination folder is empty. You must select a destination folder.</LevelTwo>
- </Message>
- <Message ID="8070" Indicator="E">
- <LevelOne>Import problems</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
- <Message ID="8071" Indicator="E">
- <LevelOne>There are no resources currently selected for import</LevelOne>
- <LevelTwo>Select resources to be imported and try again</LevelTwo>
- </Message>
- <Message ID="8072" Indicator="I">
- <LevelOne>Filtering selection...</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- </MessageList>
- </Subcomponent>
- <Subcomponent Name="Communications" Abbr="C">
- <MessageList>
- <Message ID="1001" Indicator="E">
- <LevelOne>Connection to %1 could not be established.</LevelOne>
- <LevelTwo>A socket connection to %1 could not be established. If you are connecting via the communications daemon make sure the daemon is running on the remote system. If you are connecting directly to the communications server make sure the server is started on the remote system. If you are connecting using REXEC, make sure that the server is installed on the remote system and that the REXEC service is running on that system.</LevelTwo>
- </Message>
- <Message ID="1002" Indicator="E">
- <LevelOne>Invalid password or user ID</LevelOne>
- <LevelTwo>Authentication with %1 failed because the password or user ID is not correct.</LevelTwo>
- </Message>
- <Message ID="1003" Indicator="E">
- <LevelOne>The user ID %1 is not valid</LevelOne>
- <LevelTwo>The user ID %1 on host %2 is not valid. Change the user ID and try again.</LevelTwo>
- </Message>
- <Message ID="1004" Indicator="E">
- <LevelOne>The saved password is not correct.</LevelOne>
- <LevelTwo>The saved password for user ID %1 on host %2 is not correct. Please enter the password and try again.</LevelTwo>
- </Message>
-
- <Message ID="2001" Indicator="E">
- <LevelOne>Environment variable %1 is already defined</LevelOne>
- <LevelTwo>An environment variable %1 has already been defined. Change the new environment variable's name and press the Add button.</LevelTwo>
- </Message>
- <Message ID="2002" Indicator="W">
- <LevelOne>Environment variable must have a name.</LevelOne>
- <LevelTwo>An attempt was made to define an environment variable with a blank name. Type a value for the environment variable name.</LevelTwo>
- </Message>
- <Message ID="2003" Indicator="W">
- <LevelOne>Environment variable must have a name.</LevelOne>
- <LevelTwo>An attempt was made to clear the name of an environment variable. To remove an environment variable, select the variable in the list add press the Remove button.</LevelTwo>
- </Message>
- <Message ID="2004" Indicator="E">
- <LevelOne>Environment variable name contains an invalid character.</LevelOne>
- <LevelTwo>The environment variable name cannot contain a space or the '=' character.</LevelTwo>
- </Message>
- <Message ID="2101" Indicator="E">
- <LevelOne>Saved password for %1 on %2 already exists.</LevelOne>
- <LevelTwo>The password for user ID %1 on host %2 is already saved. Enter a different user ID or host name or change the existing saved password.</LevelTwo>
- </Message>
- <Message ID="2102" Indicator="E">
- <LevelOne>New and verify passwords do not match.</LevelOne>
- <LevelTwo>The new and verify passwords must match (case sensitive) in order to save the new password. Retype the new and verify passwords and try again.</LevelTwo>
- </Message>
- <Message ID="2103" Indicator="E">
- <LevelOne>Entry field cannot be blank.</LevelOne>
- <LevelTwo>The hostname, user ID, system type and password entry fields cannot be blank. Type a value and press the Enter key to save the changes.</LevelTwo>
- </Message>
- <Message ID="2104" Indicator="E">
- <LevelOne>There are no tools installed which support saving password information.</LevelOne>
- <LevelTwo>The password information preference page is a centralized place for Workbench tools to save password information. Each tool registers and provides its own encryption algorithm. There are no tools installed that have registered with the password information preference page.</LevelTwo>
- </Message>
- <Message ID="2201" Indicator="E">
- <LevelOne>The RSE communications daemon could not be started.</LevelOne>
- <LevelTwo>The RSE communications daemon could not be started on port %1. Check that the port is free and restart the daemon or change the port used by the daemon using the Remote Systems -> Communications Workbench preference page.</LevelTwo>
- </Message>
-
- <Message ID="2301" Indicator="E">
- <LevelOne>Unable to launch server on host %1.</LevelOne>
- <LevelTwo>Message from host: %2</LevelTwo>
- </Message>
- <Message ID="2302" Indicator="E">
- <LevelOne>Invalid password or user ID for %1.</LevelOne>
- <LevelTwo>Message from host: %2</LevelTwo>
- </Message>
- <Message ID="2303" Indicator="E">
- <LevelOne>Incompatible host server running on remote system %1.</LevelOne>
- <LevelTwo>The host server is not a Remote System Explorer server.</LevelTwo>
- </Message>
- <Message ID="2304" Indicator="E">
- <LevelOne>Incompatible Remote System Explorer host server running on remote system %1.</LevelOne>
- <LevelTwo>The host server needs to be updated to work with the current client.</LevelTwo>
- </Message>
- <Message ID="2305" Indicator="E">
- <LevelOne>Unable to connect to REXEC host service on port %1 of host %2</LevelOne>
- <LevelTwo>Message from host: %3</LevelTwo>
- </Message>
- <Message ID="2306" Indicator="W">
- <LevelOne>Port %1 is normally used for the %2 service.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="2307" Indicator="E">
- <LevelOne>Unable to establish a secure connection with the Remote System Explorer host server.</LevelOne>
- <LevelTwo>Make sure both the client and server are configured to use SSL. The SSL handshake between client and server failed with the following exception: %1</LevelTwo>
- </Message>
- <Message ID="2308" Indicator="W">
- <LevelOne>The host server running on remote system %1 is an older version than the RSE client.</LevelOne>
- <LevelTwo>It is recommended that the client and server versions match.</LevelTwo>
- </Message>
- <Message ID="2309" Indicator="W">
- <LevelOne>The host server running on remote system %1 is a newer version than the RSE client.</LevelOne>
- <LevelTwo>It is recommended that the client and server versions match.</LevelTwo>
- </Message>
- <Message ID="2310" Indicator="I">
- <LevelOne>Starting Remote System Explorer host server using REXEC</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="2311" Indicator="I">
- <LevelOne>Starting Remote System Explorer host server using daemon</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="2312" Indicator="I">
- <LevelOne>Connecting to Remote System Explorer host server on port %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="2313" Indicator="I">
- <LevelOne>Initializing Remote System Explorer host server</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
- <Message ID="2314" Indicator="I">
- <LevelOne>Communication with the remote system %1 has been secured using SSL. Continue?</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="2315" Indicator="I">
- <LevelOne>Connection %1 has not been secured using SSL. Proceed anyways?</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="2316" Indicator="E">
- <LevelOne>The specified server port is out of the allowed range: %1</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
- <Message ID="3001" Indicator="E">
- <LevelOne>The connection %1 is currently offline and cannot be connected.</LevelOne>
- <LevelTwo>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.</LevelTwo>
- </Message>
- </MessageList>
- </Subcomponent>
- </Component>
-</MessageFile> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/IRemoteSystemsProject.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/IRemoteSystemsProject.java
deleted file mode 100644
index c9ae33f12..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/IRemoteSystemsProject.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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.resources.IProject;
-
-/**
- * Therei is exactly one remote systems project. It is created by the plugin if it does
- * not exist already. It is never created by the user.
- * <p>
- */
-public interface IRemoteSystemsProject
-{
- /**
- * Returns the <code>IProject</code> on which this <code>IJavaProject</code>
- * was created. This is handle-only method.
- */
- IProject getProject();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemUserIdConstants.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemUserIdConstants.java
deleted file mode 100644
index 00b284e9a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemUserIdConstants.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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;
-/**
- * Constants for user Id management
- * @deprecated use {@link IRSEUserIdConstants} instead.
- */
-public interface ISystemUserIdConstants
-{
-
- public static final int USERID_LOCATION_NOTSET = 0;
- public static final int USERID_LOCATION_SUBSYSTEM = 1;
- public static final int USERID_LOCATION_CONNECTION = 2;
- public static final int USERID_LOCATION_DEFAULT_SYSTEMTYPE = 3;
- public static final int USERID_LOCATION_DEFAULT_OVERALL= 4;
-} \ No newline at end of file
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
deleted file mode 100644
index f65c725c6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemViewSupplier.java
+++ /dev/null
@@ -1,38 +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;
-
-/**
- * You own views launchable from the Remote System Explorer. You must register yourself
- * with RSEUIPlugin via the registerViewSupplier method.
- */
-public interface ISystemViewSupplier
-{
-
-
-
- /**
- * Close or reset views prior to full refresh after team synch
- */
- public void closeViews();
-
- /**
- * Restore views prior to full refresh after team synch
- */
- public void openViews();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/PasswordPersistenceManager.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/PasswordPersistenceManager.java
deleted file mode 100644
index 2ff899876..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/PasswordPersistenceManager.java
+++ /dev/null
@@ -1,632 +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 java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * PasswordPersistenceManager manages the saving and retreiving of user ID / passwords
- * to the Eclipse keyring for registered system types.
- *
- * @author yantzi
- */
-public class PasswordPersistenceManager {
-
-
- // Keys used for using the Platform authorization methods
- // The server url is generic so we can lookup all registered user IDs / passwords
- // to display to the user in the password information preference page
- private static final String SERVER_URL = "file://rse"; //$NON-NLS-1$
-
- private static final String AUTH_SCHEME = ""; // no authorization scheme specified for apis //$NON-NLS-1$
-
- // Add return codes
- public static final int RC_OK = 0;
- public static final int RC_ALREADY_EXISTS = 1;
- public static final int RC_ERROR = -1;
-
- // Default System Type, on a lookup if the specified system type and hostname is not found
- // then the call will automatically lookup the default system type and hostname
- public static final String DEFAULT_SYSTEM_TYPE = "DEFAULT"; //$NON-NLS-1$
-
- // Default user name
- public static final String DEFAULT_USER_NAME = "DEFAULT_USER"; //$NON-NLS-1$
-
- // New URL to store password map
- private String newURL = null;
-
- /*
- * Singleton instance
- */
- private static PasswordPersistenceManager _instance;
-
- /*
- * Instance variables
- */
- private RegisteredSystemType[] systemTypes;
-
- /**
- * Inner class used for storing registered system types
- */
- private class RegisteredSystemType
- {
- private String _systemType;
- private boolean _userIDCaseSensitive;
-
- protected RegisteredSystemType(String systemType, boolean caseSensitive)
- {
- _systemType = systemType;
- _userIDCaseSensitive = caseSensitive;
- }
-
- /**
- * Returns the system type.
- * @return the system type.
- */
- public String getSystemType() {
- return _systemType;
- }
-
- /**
- * Returns whether the user ID is case sensitive.
- * @return <code>true</code> if the user ID is case sensitive, <code>false</code> otherwise.
- */
- public boolean isUserIDCaseSensitive() {
- return _userIDCaseSensitive;
- }
- }
-
- /**
- * Singleton so private constructor
- */
- private PasswordPersistenceManager(){
- String userName = System.getProperty("user.name"); //$NON-NLS-1$
-
- if (userName == null) {
- userName = DEFAULT_USER_NAME;
- }
-
- newURL = SERVER_URL + userName;
- }
-
- /**
- * Retrieve the singleton isntance of the PasswordPersistenceManger
- */
- public static final synchronized PasswordPersistenceManager getInstance()
- {
- if (_instance == null)
- {
- _instance = new PasswordPersistenceManager();
- _instance.initExtensions();
- }
- return _instance;
- }
-
- /*
- * initialization
- * - read password file
- * - load IPasswordEncryptionProvider instances
- */
- private void initExtensions()
- {
- IRSESystemType[] sysTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
- systemTypes = new RegisteredSystemType[sysTypes.length];
-
- for (int i = 0; i < sysTypes.length; i++) {
- systemTypes[i] = new RegisteredSystemType(sysTypes[i].getName(), true);
- }
- }
-
- /**
- * Remove the entry from the keyring that matches the systemtype, hostname and
- * user ID from the SystemSignonInfo parameter.
- */
- public void remove(SystemSignonInformation info)
- {
- remove(info.getSystemType(), info.getHostname(), info.getUserid());
- }
-
- /**
- * Remove the entry from the keyring that matches the hostname, userid and
- * system type parameters.
- */
- public void remove(String systemtype, String hname, String userid)
- {
- String hostname = hname;//RSEUIPlugin.getQualifiedHostName(hname);
- // Convert userid to upper case if required
- if (!isUserIDCaseSensitive(systemtype))
- {
- userid = userid.toUpperCase();
- }
-
- Map passwords = getPasswordMap(systemtype);
-
- if (passwords != null)
- {
- if (removePassword(passwords, hostname, userid))
- {
- savePasswordMap(systemtype, passwords);
- }
- }
- else
- {
- // yantzi: RSE6.2 check for default system type entry with this hostname and user ID
- if (!DEFAULT_SYSTEM_TYPE.equals(systemtype))
- {
- remove(DEFAULT_SYSTEM_TYPE, hostname, userid);
- }
- }
- }
-
- /**
- * Check if a password entry exists for the specified system type, hostname
- * and userid.
- */
- public boolean passwordExists(String systemtype, String hostname, String userid)
- {
-
- return passwordExists(systemtype, hostname, userid, true);
- }
-
- /**
- * Check if a password entry exists for the specified system type, hostname
- * and userid.
- *
- * @param systemtype The system type to check for.
- * @param hname The hostname to check for.
- * @param userid The user ID to check for.
- * @param checkDefault Whether or not to check for a default system type if the specified system type is not found.
- */
- public boolean passwordExists(String systemtype, String hname, String userid, boolean checkDefault)
- {
- String hostname = hname;//RSEUIPlugin.getQualifiedHostName(hname);
- return (find(systemtype, hostname, userid) != null);
- }
-
- /**
- * Add a new persisted password to the password database. This method assumes
- * the encrypted password is already stored in the SystemSignonInformation
- * parameter.
- *
- * @param info The signon information to store
- * @param overwrite Whether to overwrite any existing entry
- *
- * @return
- * RC_OK if the password was successfully stored
- * RC_ALREADY_EXISTS if the password already exists and overwrite was false
- */
- public int add(SystemSignonInformation info, boolean overwrite)
- {
- return add(info, overwrite, false);
- }
-
- /**
- * Add a new persisted password to the password database. This method assumes
- * the encrypted password is already stored in the SystemSignonInformation
- * parameter.
- *
- * @param info The signon information to store
- * @param overwrite Whether to overwrite any existing entry
- * @param updateDefault Whether or not to update the default entry for the specified hostname / user ID if one exists.
- *
- * @return
- * RC_OK if the password was successfully stored
- * RC_ALREADY_EXISTS if the password already exists and overwrite was false
- */
- public int add(SystemSignonInformation info, boolean overwrite, boolean updateDefault)
- {
- String systemtype = info.getSystemType();
-
- // Convert userid to upper case if required
- if (!isUserIDCaseSensitive(systemtype))
- {
- info.setUserid(info.getUserid().toUpperCase());
- }
-
- String hostname = info.getHostname();
- String userid = info.getUserid();
- Map passwords = getPasswordMap(systemtype);
- String passwordKey = getPasswordKey(hostname, userid);
-
- if (passwords != null)
- {
- String password = getPassword(passwords, hostname, userid);
-
- if (password != null)
- {
- if (!overwrite)
- {
- return RC_ALREADY_EXISTS;
- }
- else
- {
- removePassword(passwords, hostname, userid);
- }
- }
- else if (updateDefault)
- {
- // yantzi: 6.2, check if default exists for the specified hostname / user ID
- Map defaultPasswords = getPasswordMap(DEFAULT_SYSTEM_TYPE);
- if (defaultPasswords != null)
- {
- String defaultPassword = (String) defaultPasswords.get(passwordKey);
- if (defaultPassword != null)
- {
- if (!overwrite)
- {
- return RC_ALREADY_EXISTS;
- }
- else
- {
- defaultPasswords.remove(passwordKey);
- passwords = defaultPasswords;
- systemtype = DEFAULT_SYSTEM_TYPE;
- }
- }
- }
- }
- }
- else
- {
- // password map did not exists yet so create a new one
- passwords = new HashMap(5);
- }
-
- passwords.put(passwordKey, info.getPassword());
-
- savePasswordMap(systemtype, passwords);
-
- return RC_OK;
- }
-
-
- /*
- * Retrieve the password map from the keyring for the specified system type
- */
- private Map getPasswordMap(String systemType)
- {
- Map passwords = null;
-
- try
- {
- URL serverURL = new URL(newURL);
- passwords = Platform.getAuthorizationInfo(serverURL, systemType, AUTH_SCHEME);
-
- // if no passwords found with new URL, check old URL
- if (passwords == null) {
-
- URL oldServerURL1 = new URL(SERVER_URL + SystemBasePlugin.getWorkspace().getRoot().getLocation().toOSString());
- passwords = Platform.getAuthorizationInfo(oldServerURL1, systemType, AUTH_SCHEME);
-
- // passwords found, so migrate to using new URL
- if (passwords != null) {
- savePasswordMap(systemType, passwords);
- }
- // if still no passwords found, check with even older URL
- else {
- URL oldServerURL2 = new URL(SERVER_URL);
- passwords = Platform.getAuthorizationInfo(oldServerURL2, systemType, AUTH_SCHEME);
-
- // passwords found, so migrate to using new URL
- if (passwords != null) {
- savePasswordMap(systemType, passwords);
- }
- }
- }
- }
- catch (MalformedURLException e) {
- SystemBasePlugin.logError("PasswordPersistenceManager.getPasswordMap", e); //$NON-NLS-1$
- }
-
- return passwords;
- }
-
- /*
- * Retrieve the password map from the keyring for the specified system type
- */
- private void savePasswordMap(String systemType, Map passwords)
- {
- try
- {
- URL serverURL = new URL(newURL);
- Platform.flushAuthorizationInfo(serverURL, systemType, AUTH_SCHEME);
- Platform.addAuthorizationInfo(serverURL, systemType, AUTH_SCHEME, passwords);
- }
- catch (MalformedURLException e) {
- SystemBasePlugin.logError("PasswordPersistenceManager.savePasswordMap", e); //$NON-NLS-1$
- }
- catch (CoreException e) {
- SystemBasePlugin.logError("PasswordPersistenceManager.savePasswordMap", e); //$NON-NLS-1$
- }
- }
-
- /**
- * Find the persisted password for the specified systemtype, hostname and userid.
- */
- public SystemSignonInformation find(String systemtype, String hostname, String userid)
- {
- return find(systemtype, hostname, userid, true);
- }
-
-
- private boolean removePassword(Map passwords, String hostname, String userid)
- {
- boolean removed = false;
- String password = null;
-
- String passwordKey = getPasswordKey(hostname, userid);
- password =(String) passwords.get(passwordKey);
- if (password != null)
- {
- passwords.remove(passwordKey);
- removed = true;
- }
- else
- {
- String phostname = hostname.toUpperCase();
-
- // DKM - fallback for different case uids, hostnames or qualified/unqualified hostnames
- Iterator keys = passwords.keySet().iterator();
- while (keys.hasNext() && password == null)
- {
- String key = (String)keys.next();
- if (key.equalsIgnoreCase(passwordKey))
- {
- password = (String) passwords.get(key);
- }
- else
- {
- String khostname = getHostnameFromPasswordKey(key).toUpperCase();
- String kuid = getUserIdFromPasswordKey(key);
- if (kuid.equalsIgnoreCase(userid))
- {
- // uid matches, check if hosts are the same
- if (khostname.startsWith(phostname) || phostname.startsWith(khostname))
- {
- String qkhost = RSEUIPlugin.getQualifiedHostName(khostname);
- String qphost = RSEUIPlugin.getQualifiedHostName(phostname);
- if (qkhost.equals(qphost))
- {
- password = (String)passwords.get(key);
- }
- }
- }
- }
- if (password != null)
- {
- passwords.remove(key);
- removed = true;
-
- }
- }
- }
- return removed;
-
- }
-
- private String getPassword(Map passwords, String hostname, String userid)
- {
- String password = null;
-
- String passwordKey = getPasswordKey(hostname, userid);
- password =(String) passwords.get(passwordKey);
- if (password != null)
- return password;
-
- String phostname = hostname.toUpperCase();
-
- // DKM - fallback for different case uids, hostnames or qualified/unqualified hostnames
- Iterator keys = passwords.keySet().iterator();
- while (keys.hasNext() && password == null)
- {
- String key = (String)keys.next();
- if (key.equalsIgnoreCase(passwordKey))
- {
- password = (String) passwords.get(key);
- }
- else
- {
- String khostname = getHostnameFromPasswordKey(key).toUpperCase();
- String kuid = getUserIdFromPasswordKey(key);
- if (kuid.equalsIgnoreCase(userid))
- {
- // uid matches, check if hosts are the same
- if (khostname.startsWith(phostname) || phostname.startsWith(khostname))
- {
- String qkhost = RSEUIPlugin.getQualifiedHostName(khostname);
- String qphost = RSEUIPlugin.getQualifiedHostName(phostname);
- if (qkhost.equals(qphost))
- {
- password = (String)passwords.get(key);
- }
- }
- }
- }
- }
-
- return password;
-
- }
-
- /**
- * Find the persisted password for the specified systemtype, hostname and userid.
- *
- * @param systemtype The system type to check for.
- * @param hname The hostname to check for.
- * @param userid The user ID to check for.
- * @param checkDefault Whether or not to check for a default system type if the specified system type is not found.
- */
- public SystemSignonInformation find(String systemtype, String hname, String userid, boolean checkDefault)
- {
- String hostname = hname;//RSEUIPlugin.getQualifiedHostName(hname);
- // Convert userid to upper case if required
- if (!isUserIDCaseSensitive(systemtype) && userid != null)
- {
- userid = userid.toUpperCase();
- }
-
- Map passwords = getPasswordMap(systemtype);
-
- if (passwords != null)
- {
- String password = getPassword(passwords, hostname, userid);
-
- if (password != null)
- {
- return new SystemSignonInformation(hostname, userid, password, systemtype);
- }
- }
-
- // yantzi: RSE6.2 check for default system type entry with this hostname and user ID
- if (checkDefault && !DEFAULT_SYSTEM_TYPE.equals(systemtype))
- {
- return find(DEFAULT_SYSTEM_TYPE, hostname, userid, false);
- }
-
- return null;
- }
-
- /**
- * Helper class for building the key to lookup the password for a specific
- * userid and hostname in the Map
- */
- private String getPasswordKey(String hname, String userid)
- {
- String hostname = hname;//RSEUIPlugin.getQualifiedHostName(hname);
- StringBuffer buffer = new StringBuffer(hostname);
- buffer.append("//"); //$NON-NLS-1$
- buffer.append(userid);
- return buffer.toString();
- }
-
- private static String getHostnameFromPasswordKey(String passwordKey)
- {
- int sepIndex = passwordKey.indexOf("//"); //$NON-NLS-1$
- return passwordKey.substring(0,sepIndex);
- }
-
- private static String getUserIdFromPasswordKey(String passwordKey)
- {
- int sepIndex = passwordKey.indexOf("//"); //$NON-NLS-1$
- return passwordKey.substring(sepIndex + 2, passwordKey.length());
- }
-
- /**
- * Helper method for determining if system type uses case sensitive user IDs
- */
- public boolean isUserIDCaseSensitive(String systemType)
- {
- if (DEFAULT_SYSTEM_TYPE.equals(systemType))
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- systemType = store.getString(ISystemPreferencesConstants.SYSTEMTYPE);
- }
-
- // First find the correct provider
- for (int i = 0; i < systemTypes.length; i++)
- {
-
- if (systemTypes[i].getSystemType().equals(systemType))
- {
- return systemTypes[i].isUserIDCaseSensitive();
- }
- }
-
- return true;
- }
-
- /**
- * Retrieve the list of registered system types
- */
- public String[] getRegisteredSystemTypes()
- {
- // yantzi: artemis 6.2, added default system type to list
- String[] types = new String[systemTypes.length + 1];
-
- types[0] = DEFAULT_SYSTEM_TYPE;
-
- for (int i = 0; i < systemTypes.length; i++)
- {
- types[i + 1] = systemTypes[i].getSystemType();
- }
-
- return types;
- }
-
- /**
- * Retrieve a list of the stored user IDs.
- *
- * @return List A list of the stored user IDs as SystemSignonInformation instances
- * without the saved passwords.
- */
- public List getSavedUserIDs()
- {
- List savedUserIDs = new ArrayList();
- Map passwords;
- String key;
- int separator;
-
- for (int i = 0; i < systemTypes.length; i++)
- {
- passwords = getPasswordMap(systemTypes[i].getSystemType());
- if (passwords != null)
- {
- Iterator keys = passwords.keySet().iterator();
- while (keys.hasNext())
- {
- key = (String) keys.next();
- separator = key.indexOf("//"); //$NON-NLS-1$
- savedUserIDs.add(new SystemSignonInformation(key.substring(0, separator), // hostname
- key.substring(separator + 2), // userid
- systemTypes[i].getSystemType())); // system type
- }
- }
- }
-
- // yantzi: RSE 6.2 Get DEFAULT system types too
- passwords = getPasswordMap(DEFAULT_SYSTEM_TYPE);
- if (passwords != null)
- {
- Iterator keys = passwords.keySet().iterator();
- while (keys.hasNext())
- {
- key = (String) keys.next();
- separator = key.indexOf("//"); //$NON-NLS-1$
- savedUserIDs.add(new SystemSignonInformation(key.substring(0, separator), // hostname
- key.substring(separator + 2), // userid
- DEFAULT_SYSTEM_TYPE)); // system type
- }
- }
-
- return savedUserIDs;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/RemoteSystemsProject.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/RemoteSystemsProject.java
deleted file mode 100644
index f123172f6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/RemoteSystemsProject.java
+++ /dev/null
@@ -1,97 +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.core.resources.IProject;
-import org.eclipse.core.resources.IProjectNature;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.PlatformObject;
-
-
-/**
- * Handle for a Remote Systems Project
- *
- * <p>A Remote Systems Project is a singleton created initially by the
- * remote systems plugin. It is a container for all the connections and
- * subsystems defined for working with remote systems.
- *
- * @see IRemoteSystemsProject
- */
-public class RemoteSystemsProject extends PlatformObject
- implements IRemoteSystemsProject, IProjectNature
-{
-
- /**
- * ID of the nature for the remote system explorer project: "org.eclipse.rse.ui.remotesystemsnature"
- */
- public static final String ID = "org.eclipse.rse.ui.remotesystemsnature"; //$NON-NLS-1$
- /**
- * Name of the nature for the remote system explorer project: "Remote Systems Nature"
- */
- public static final String NAME = "Remote Systems Nature"; //$NON-NLS-1$
- /**
- * An empty array of strings indicating that a project doesn't have any prerequesite projects.
- */
- protected static final String[] NO_PREREQUISITES= new String[0];
-
- /**
- * The platform project this <code>IRemoteProject</code> is based on
- */
- protected IProject fProject;
-
- /**
- * Constructor needed for <code>IProject.getNature()</code> and <code>IProject.addNature()</code>.
- *
- * @see #setProject
- */
- public RemoteSystemsProject()
- {
- super();
- }
- public RemoteSystemsProject(IProject project)
- {
- super();
- fProject= project;
- }
-
- public void setProject(IProject project)
- {
- SystemBasePlugin.logInfo("Inside setProject"); //$NON-NLS-1$
- fProject= project;
- }
- /**
- * Configure the project with Java nature.
- */
- public void configure() throws CoreException
- {
- SystemBasePlugin.logInfo("Inside configure"); //$NON-NLS-1$
- }
- /**
- * Removes the Java nature from the project.
- */
- public void deconfigure() throws CoreException
- {
- }
- public IProject getProject()
- {
- return fProject;
- }
- public int hashCode()
- {
- return fProject.hashCode();
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/RemoteSystemsTempProjectNature.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/RemoteSystemsTempProjectNature.java
deleted file mode 100644
index 3a8f6e3c8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/RemoteSystemsTempProjectNature.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 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.resources.IProject;
-import org.eclipse.core.resources.IProjectNature;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * A nature for the temporary project where we store files.
- */
-public class RemoteSystemsTempProjectNature implements IProjectNature {
-
-
-
- /**
- * @see org.eclipse.core.resources.IProjectNature#configure()
- */
- public void configure() throws CoreException {
- }
-
- /**
- * @see org.eclipse.core.resources.IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- }
-
- /**
- * @see org.eclipse.core.resources.IProjectNature#getProject()
- */
- public IProject getProject() {
- return null;
- }
-
- /**
- * @see org.eclipse.core.resources.IProjectNature#setProject(IProject)
- */
- public void setProject(IProject project) {
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 04566d010..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemAdapterHelpers.java
+++ /dev/null
@@ -1,115 +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.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;
-import org.eclipse.rse.ui.view.SystemViewAdapterFactory;
-
-
-/**
- * This class has static helper methods that will get an adapter given an object.
- */
-public class SystemAdapterHelpers
-{
-
-
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- public static ISystemViewElementAdapter getAdapter(Object o) {
- ISystemViewElementAdapter adapter = null;
- if (o instanceof IAdaptable) {
- adapter = (ISystemViewElementAdapter) ((IAdaptable) o).getAdapter(ISystemViewElementAdapter.class);
- } if (o != null) {
- adapter = (ISystemViewElementAdapter) Platform.getAdapterManager().getAdapter(o, ISystemViewElementAdapter.class);
- }
- return adapter;
- }
-
- /**
- * Overload to use when calling from a viewer. This not only finds and returns
- * the adapter, but also sets its viewer to the given viewer. Many actions rely
- * on this being set.
- */
- public static ISystemViewElementAdapter getAdapter(Object o, Viewer viewer)
- {
- ISystemViewElementAdapter adapter = getAdapter(o);
- if (adapter != null)
- adapter.setViewer(viewer);
- return adapter;
- }
-
- /**
- * Overload to use when calling from a viewer. This not only finds and returns
- * the adapter, but also sets its viewer and input provider to the given viewer.
- * Many actions rely on this being set.
- */
- public static ISystemViewElementAdapter getAdapter(Object o, Viewer viewer, ISystemViewInputProvider inputProvider)
- {
- ISystemViewElementAdapter adapter = getAdapter(o, viewer);
-
- if (adapter != null) {
- adapter.setInput(inputProvider);
- }
-
- return adapter;
- }
-
- /**
- * Returns the implementation of ISystemRemoteElementAdapter for the given
- * remote object. Returns null if this object does not adaptable to this.
- */
- public static ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- ISystemRemoteElementAdapter adapter = null;
- if (!(o instanceof IAdaptable))
- adapter = (ISystemRemoteElementAdapter)Platform.getAdapterManager().getAdapter(o,ISystemRemoteElementAdapter.class);
- else
- adapter = (ISystemRemoteElementAdapter)((IAdaptable)o).getAdapter(ISystemRemoteElementAdapter.class);
- return adapter;
- }
-
- /**
- * Overload to use when calling from a viewer. This not only finds and returns
- * the adapter, but also sets its viewer to the given viewer. Many actions rely
- * on this being set.
- */
- public static ISystemRemoteElementAdapter getRemoteAdapter(Object o, Viewer viewer)
- {
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(o);
- if ((adapter != null) && (adapter instanceof ISystemViewElementAdapter))
- ((ISystemViewElementAdapter)adapter).setViewer(viewer);
- return adapter;
- }
-
- /**
- * For pathpath access to our adapters for non-local objects in our model. Exploits the knowledge we use singleton adapters.
- */
- public SystemViewAdapterFactory 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
deleted file mode 100644
index da3bcdb9e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java
+++ /dev/null
@@ -1,910 +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 java.io.InputStream;
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.Stack;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-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.messages.SystemUIMessageFile;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * A base plugin class offering common operations.
- */
-public abstract class SystemBasePlugin extends AbstractUIPlugin
-{
-
- // static variables
- private static SystemBasePlugin baseInst = null;
-
- /**
- * Logger object for logging messages for servicing purposes.
- */
- protected static Logger log = null;
-
- // instance variables
- private Hashtable imageDescriptorRegistry = null;
- private boolean headless;
- private boolean headlessSet;
-
- /**
- * Returns the singleton object representing the base plugin.
- * @return the singleton object.
- */
- public static SystemBasePlugin getBaseDefault() {
- return baseInst;
- }
-
- /**
- * Returns the active workbench shell.
- * @return the active workbench shell.
- */
- public static Shell getActiveWorkbenchShell() {
-
- IWorkbenchWindow window = getActiveWorkbenchWindow();
-
- if (window != null) {
- return window.getShell();
- }
-
- return null;
- }
-
- /**
- * Returns the active workbench window.
- * @return the active workbench window.
- */
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
-
- IWorkbench wb = null;
-
- try {
- wb = getBaseDefault().getWorkbench();
- }
- catch (Exception exc) {
- // in headless mode
- wb = null;
- }
-
- // if we are not in headless mode
- if (wb != null) {
-
- // if in user interface thread, return the workbench active window
- if (Display.getCurrent() != null) {
- return wb.getActiveWorkbenchWindow();
- }
- // otherwise, get a list of all the windows, and simply return the first one
- // KM: why do we need this??
- else {
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
-
- if (windows != null && windows.length > 0) {
- return windows[0];
- }
- }
-
- return null;
- }
- else {
- return null;
- }
- }
-
- /**
- * Returns the workspace root.
- * @return the workspace root.
- */
- public static IWorkspaceRoot getWorkspaceRoot() {
- return getWorkspace().getRoot();
- }
-
- /**
- * Returns the workspace.
- * @return the workspace.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * @return the prefix of the path for icons, i.e. "icons/".
- */
- public static String getIconPath() {
- return "icons/"; //$NON-NLS-1$
- }
-
- /**
- * Retrieve image in any plugin's directory tree, given its file name.
- * The file name should be qualified relative to this plugin's bundle. Eg "icons/myicon.gif"
- */
- public static ImageDescriptor getPluginImage(Bundle bundle, String fileName)
- {
- URL path = bundle.getEntry("/" + fileName); //$NON-NLS-1$
- ImageDescriptor descriptor = ImageDescriptor.createFromURL(path);
- return descriptor;
- }
-
- // ----------------------------------------
- // TRANSLATABLE RESOURCE-RELATED METHODS...
- // ----------------------------------------
-
- /**
- * Sets the resource bundle. Called by child class in their
- * constructor, say, to load in their resource bundle. Handles
- * rare case when not found by telling user, then dying.
- * Note: This is NOT to be used for plugin.properties since Eclipse handles that file differently.
- * @param descriptor for the plugin where the file is
- * @param name of .properties file, without the '.properties' specified
- * @return ResourceBundle if loaded successfully, null if not.
- */
-// public static final ResourceBundle loadResourceBundle(Bundle bundle, String fileName)
-// {
-// ResourceBundle rb = null;
-// boolean ok = false;
-// try
-// {
-// URL url = resolveBundleNameNL(bundle, fileName+".properties");
-// logDebugMessage("SystemBasePlugin", "Trying this now: " + url.toString());
-// InputStream in = url.openStream();
-// rb = new PropertyResourceBundle(in);
-// in.close();
-// ok = true;
-//
-// }
-// catch (Exception exc)
-// {
-// logError("SystemBasePlugin - try for resource bundle " + fileName + " not successful!",exc);
-// }
-//
-// if (!ok)
-// {
-// Shell s = getActiveWorkbenchShell();
-//
-// if (s == null) {
-// Display d = Display.getCurrent();
-//
-// if (d != null) {
-// s = d.getActiveShell();
-// }
-// else {
-// d = Display.getDefault();
-//
-// if (d != null) {
-// s = d.getActiveShell();
-// }
-// }
-// }
-//
-// if (s != null) {
-// org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(s);
-// mb.setText("Unexcepted Error");
-// mb.setMessage("Unable to load resource file " + fileName + ".properties");
-// mb.open();
-// }
-// }
-//
-// return rb;
-// }
-
- /**
- * Returns the plugin.properties resource bundle associated with the specified plugin descriptor
- *
- * @param descriptor for the plugin where the file is
- * @return ResourceBundle if loaded successfully, null if not.
- */
-// public static final ResourceBundle loadPluginResourceBundle(Bundle bundle)
-// {
-// ResourceBundle rb = null;
-// try
-// {
-// rb = Platform.getResourceBundle(bundle);
-// }
-// catch (Exception exc)
-// {
-// logInfo("try for resource bundle plugin.properties not successful!");
-// }
-//
-// return rb;
-// }
-
- /**
- * Sets the default resource bundle for handling cases where strings aren't translated. Called by child class in their
- * constructor, say, to load in their resource bundle. Handles
- * rare case when not found by telling user, then dying.
- * Note: This is NOT to be used for plugin.properties since Eclipse handles that file differently.
- * @param descriptor for the plugin where the file is
- * @param name of .properties file, without the '.properties' specified
- * @return ResourceBundle if loaded successfully, null if not.
- */
-// public static final ResourceBundle loadDefaultResourceBundle(Bundle bundle,
-// String fileName)
-// {
-// ResourceBundle rb = null;
-// boolean ok = false;
-// try
-// {
-// String name = fileName+".properties";
-// URL url = bundle.getEntry("/"+name);
-// logDebugMessage("SystemBasePlugin", "Trying this now: " + url.toString());
-// InputStream in = url.openStream();
-// rb = new PropertyResourceBundle(in);
-// in.close();
-// ok = true;
-// }
-// catch (Exception exc)
-// {
-// logError("SystemBasePlugin - try for resource bundle " + fileName + " not successful!",exc);
-// }
-//
-// if (!ok)
-// {
-//
-// Shell s = getActiveWorkbenchShell();
-//
-// if (s == null) {
-// Display d = Display.getCurrent();
-//
-// if (d != null) {
-// s = d.getActiveShell();
-// }
-// else {
-// d = Display.getDefault();
-//
-// if (d != null) {
-// s = d.getActiveShell();
-// }
-// }
-// }
-//
-// if (s != null) {
-// org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(s);
-// mb.setText("Unexcepted Error");
-// mb.setMessage("Unable to load resource file " + fileName + ".properties");
-// mb.open();
-// }
-// }
-//
-// return rb;
-// }
-
- /**
- * Get a string from a given resource bundle.
- * If not found, stack trace info is placed in the
- * plugin's log file to help pinpoint the offending code.
- */
-// public static String getString(ResourceBundle resourceBundle, String key)
-// {
-// try
-// {
-// return resourceBundle.getString(key);
-// }
-// catch (MissingResourceException exc)
-// {
-// SystemBasePlugin.logError("Missing resource: " + key, exc);
-// }
-// return null;
-// }
-
- /**
- * Get a string from a given resource bundle, with an english string to
- * use a default if the given key is not found.
- * <p>
- * If not found, stack trace info is placed in the
- * plugin's log file to help pinpoint the offending code.
- */
-// public static String getString(ResourceBundle resourceBundle, String key, String defaultString)
-// {
-// String s = defaultString;
-// try
-// {
-// s = resourceBundle.getString(key);
-// }
-// catch (MissingResourceException exc)
-// {
-// SystemBasePlugin.logError("Missing resource: " + key, exc);
-// }
-// return s;
-// }
-
- // ------------------
- // MESSAGE METHODS...
- // ------------------
-
- /**
- * Resolves the bundle relative name to its URL inside a bundle if the resource
- * named by that name exists. Returns null if the resources does not exist.
- * Looks for the resource in NL directories as well.
- * @param bundle The bundle in which to look for the resource
- * @param name The name of the resource
- * @return The resource URL or null.
- */
- public static final URL resolveBundleNameNL(Bundle bundle, String name) {
- URL result = null;
- Stack candidates = new Stack();
- Locale locale = Locale.getDefault();
- String language = locale.getLanguage();
- String country = locale.getCountry();
- candidates.push("/" + name); //$NON-NLS-1$
- if (language.length() > 0) {
- candidates.push("/" + language + "/" + name); //$NON-NLS-1$ //$NON-NLS-2$
- if (country.length() > 0) {
- candidates.push("/" + language + "/" + country + "/" + name); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- while (!candidates.isEmpty() && result == null) {
- String candidate = (String) candidates.pop();
- result = bundle.getEntry(candidate);
- }
- return result;
- }
-
- /**
- * Parse the given message file into memory, into a SystemMessageFile
- * object.
- *
- * @param descriptor -
- * the descriptor for this plugin
- * @param fileName -
- * unqualified name of the .xml message file, inluding the .xml
- * extension.
- * @return SystemMessageFile (null if unable to load the file)
- */
- public static final SystemMessageFile loadMessageFile(Bundle bundle,
- String fileName) {
- SystemMessageFile mf = null;
- boolean ok = false;
- try {
- URL url = resolveBundleNameNL(bundle, fileName);
- if (url != null) {
- InputStream messageFileStream = url.openStream();
- mf = SystemUIMessageFile.getMessageFile(fileName, messageFileStream);
- messageFileStream.close();
- ok = true;
- }
- } catch (Throwable t) {
- logError("Error loading message file " //$NON-NLS-1$
- + fileName
- + " in " //$NON-NLS-1$
- + bundle.getHeaders().get(
- org.osgi.framework.Constants.BUNDLE_NAME), t);
- ok = false; // DY
- }
- if (!ok) {
- MessageBox mb = new MessageBox(getActiveWorkbenchShell());
- mb.setText("Unexpected Error"); //$NON-NLS-1$
- mb.setMessage("Unable to load message file " //$NON-NLS-1$
- + fileName
- + " in " //$NON-NLS-1$
- + bundle.getHeaders().get(
- org.osgi.framework.Constants.BUNDLE_NAME));
- mb.open();
- }
- return mf;
- }
-
- /**
- * Parse the given message file into memory, into a SystemMessageFile
- * object.
- *
- * @param descriptor -
- * the descriptor for this plugin
- * @param fileName -
- * unqualified name of the .xml message file, inluding the .xml
- * extension.
- * @return SystemMessageFile (null if unable to load the file)
- */
- public static final SystemMessageFile loadDefaultMessageFile(Bundle bundle,
- String fileName) {
- SystemMessageFile mf = null;
- boolean ok = false;
- try {
- URL url = bundle.getEntry("/"+fileName); //$NON-NLS-1$
- if (url != null) {
- InputStream messageFileStream = url.openStream();
- mf = SystemUIMessageFile.getMessageFile(fileName, messageFileStream);
- messageFileStream.close();
- ok = true;
- }
- } catch (Throwable t) {
- logError("Error loading message file " //$NON-NLS-1$
- + fileName
- + " in " //$NON-NLS-1$
- + bundle.getHeaders().get(
- org.osgi.framework.Constants.BUNDLE_NAME), t);
- ok = false; // DY
- }
-
- if (!ok) {
- Shell s = getActiveWorkbenchShell();
- if (s == null) {
- Display d = Display.getCurrent();
- if (d != null) {
- s = d.getActiveShell();
- } else {
- d = Display.getDefault();
- if (d != null) {
- s = d.getActiveShell();
- }
- }
- }
- if (s != null) {
- MessageBox mb = new MessageBox(s);
- mb.setText("Unexpected Error"); //$NON-NLS-1$
- mb.setMessage("Unable to load message file " //$NON-NLS-1$
- + fileName
- + " in " //$NON-NLS-1$
- + bundle.getHeaders().get(
- org.osgi.framework.Constants.BUNDLE_NAME));
- mb.open();
- }
- }
-
- return mf;
- }
-
- /**
- * Retrieve a message from a message file.
- *
- * @param msgFile -
- * the system message file containing the message.
- * @param msgId -
- * the ID of the message to retrieve. This is the concatenation
- * of the message's component abbreviation, subcomponent
- * abbreviation, and message ID as declared in the message xml
- * file.
- */
- public static SystemMessage getMessage(SystemMessageFile msgFile, String msgId)
- {
- SystemMessage msg = null;
- if ( msgFile != null )
- msg = msgFile.getMessage(msgId);
- else
- logWarning("No message file set."); //$NON-NLS-1$
-
- if ( msg == null )
- logWarning("Unable to find message ID: " + msgId); //$NON-NLS-1$
- return msg;
- }
-
- /**
- * Scan this plugin's message file for duplicates. This just calls the {@link org.eclipse.rse.ui.messages.SystemMessageFile#scanForDuplicates()}
- * method on the SystemMessageFile object.
- * @param msgFile - the message file to scan
- * @return true if duplicates found. The duplicates are written to standard out and the system core log file.
- */
- public static boolean scanForDuplicateMessages(SystemMessageFile msgFile)
- {
- return msgFile.scanForDuplicates();
- }
-
- /**
- * Generate HTML from this plugin's message file. This is handy for documentation purposes.
- * This just calls the {@link org.eclipse.rse.ui.messages.SystemMessageFile#printHTML(String)}
- * method on the SystemMessageFile object.
- * @param msgFile - the message file to print
- * @return true if all went well, false if it failed for some reason.
- */
- public static boolean printMessages(SystemMessageFile msgFile, String fullyQualifiedTargetFile)
- {
- return msgFile.printHTML(fullyQualifiedTargetFile);
- }
-
- // -----------------
- // LOGGER METHODS...
- // -----------------
-
- /**
- * Helper method for logging information to the RSE-style logging file.
- * This file is located in the .metadata subfolder for this plugin.
- *
- * @param message - System message to be written to the log file
- */
- public static void logMessage(SystemMessage message)
- {
- logMessage(message, null);
- }
-
- /**
- * Helper method for logging information to the RSE-style logging file.
- * This file is located in the .metadata subfolder for this plugin.
- *
- * @param message - System message to be written to the log file
- * @param ex - Exception to log. If not applicable, this can be null.
- */
- public static void logMessage(SystemMessage message, Throwable ex)
- {
- char type = message.getIndicator();
- switch (type)
- {
- case SystemMessage.ERROR:
- log.logError(message.toString(), ex);
- break;
- case SystemMessage.WARNING:
- log.logWarning(message.toString(), ex);
- break;
- case SystemMessage.INFORMATION:
- case SystemMessage.COMPLETION:
- log.logInfo(message.toString(), ex);
- break;
- case SystemMessage.INQUIRY:
- case SystemMessage.UNEXPECTED:
- default:
- log.logInfo(message.toString(), ex);
- break;
- }
- }
-
- /**
- * Helper method for logging information to the RSE-style logging file.
- * This file is located in the .metadata subfolder for this plugin.
- * <p>
- * Because this is an information message, it will only actually be logged if the
- * user has enabled logging of information messages via the Logging preferences page
- * within the Remote Systems preference pages tree.
- *
- * @param message - Message to be written to the log file
- */
- public static void logInfo(String message)
- {
- log.logInfo(message);
- }
-
- // -----------------
- // LOGGER METHODS...
- // -----------------
-
- /**
- * Helper method for logging warnings to the RSE-style logging file.
- * This file is located in the .metadata subfolder for this plugin.
- * <p>
- * Because this is a warning message, it will only actually be logged if the
- * user has enabled logging of warning messages via the Logging preferences page
- * within the Remote Systems preference pages tree.
- *
- * @param message - Message to be written to the log file
- * Because these messages are only used for servicing purposes, the message typically is not translated.
- */
- public static void logWarning(String message)
- {
- log.logWarning(message);
- }
-
- /**
- * Helper method for logging errors (but not exceptions) to the RSE-style logging file.
- * This file is located in the .metadata subfolder for this plugin.
- * <p>
- * Because this is an error message, it is always logged, no matter what the preferences settings for
- * the logger.
- *
- * @param message - Message to be written to the log file
- * Because these messages are only used for servicing purposes, the message typically is not translated.
- */
- public static void logError(String message)
- {
- log.logError(message, null);
- }
-
- /**
- * Helper method for logging errors (exceptions) to the RSE-style logging file.
- * This file is located in the .metadata subfolder for this plugin.
- * <p>
- * Because this is an error message, it is always logged, no matter what the preferences settings for
- * the logger.
- *
- * @param message - Message to be written to the log file.
- * Because these messages are only used for servicing purposes, the message typically is not translated.
- *
- * @param exception - Any exception that generated the error condition. Used to print a stack trace in the log file.
- * If you pass null, it is the same as calling {@link #logError(String)}
- */
- public static void logError(String message, Throwable exception)
- {
- log.logError(message, exception);
- }
-
- /**
- * Helper method for logging debug messages to the RSE-style logging file.
- * This file is located in the .metadata subfolder for this plugin.
- * <p>
- * Debug messages are only logged when running this plugin in the workbench,
- * and when Logger.DEBUG has been set to true.
- *
- * @param classname - Class issuing the debug message. Typically you pass getClass().getName()
- * @param message - Message to be written to the log file
- */
- public static void logDebugMessage(String prefix, String message)
- {
- log.logDebugMessage(prefix, message);
- }
-
- /**
- * Constructor.
- */
- public SystemBasePlugin() {
- super();
-
- if (baseInst == null) {
- baseInst = this;
- }
-
- headless = false;
- headlessSet = false;
- }
-
- // ------------------------
- // STATIC HELPER METHODS...
- // ------------------------
-
- /**
- * Returns the symbolic name of the bundle.
- * @return the symbolic name of the bundle.
- */
- public String getSymbolicName() {
- return getBundle().getSymbolicName();
- }
-
- /**
- * Return the fully qualified install directory for this plugin.
- */
-// protected IPath getInstallLocation() {
-// IPath prefix = null;
-// try
-// {
-// String filePath = Platform.resolve(getBundle().getEntry("/")).getPath();
-// prefix = new Path(filePath);
-// }
-// catch (Exception e)
-// {
-// prefix = new Path(getBundle().getEntry("/").getFile());
-// }
-// return prefix;
-// }
-
- // -------------------------------------
- // ABSTRACTUIPLUGIN LIFECYCLE METHODS...
- // -------------------------------------
- /**
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
-
- super.start(context);
-
- // logger
- if (log == null) {
- log = LoggerFactory.getLogger(this);
- log.logInfo("Loading " + this.getClass()); //$NON-NLS-1$
- }
- }
-
- /**
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- logDebugMessage(this.getClass().getName(), "SHUTDOWN"); //$NON-NLS-1$
- LoggerFactory.freeLogger(this);
- super.stop(context);
- }
-
- /**
- * Returns the Platform UI workbench.
- * <p>
- * This method exists as a convenience for plugin implementors. The
- * workbench can also be accessed by invoking <code>PlatformUI.getWorkbench()</code>.
- * </p>
- * <p>
- * This is an intercept of the AbstractUIPlugin method, so we can do a try/catch around
- * it, as it will throw an exception if we are running headless, in which case the
- * workbench has not even been started.
- * </p>
- */
- public IWorkbench getWorkbench()
- {
- IWorkbench wb = null;
- if (headlessSet && headless) // already been here?
- return wb;
- try {
- wb = PlatformUI.getWorkbench();
-
- //wb = super.getWorkbench();
- headless = false;
- }
- catch (Exception exc)
- {
- /*
- IDEWorkbenchAdvisor advisor = new IDEWorkbenchAdvisor();
- PlatformUI.createAndRunWorkbench(Display.getDefault(), advisor);
- try
- {
- wb = super.getWorkbench();
- }
- catch (Exception e)
- {
- headless = true;
- }
- */
- headless = true;
- }
- headlessSet = true;
- return wb;
- }
-
- /**
- * Initialize the image registry by declaring all of the required graphics.
- * Typically this is a series of calls to putImageInRegistry. Use
- * getIconPath() to qualify the file name of the icons with their relative
- * path.
- */
- protected abstract void initializeImageRegistry();
-
- /**
- * Construct an image descriptor from a file name and place it in the
- * image descriptor registry. Actual image construction is delayed until first use.
- * @param id - an arbitrary ID to assign to this image. Used later when retrieving it.
- * @param fileName - the name of the icon file, with extension, relative to this plugin's folder.
- * @return the image descriptor for this particular id.
- * @see SystemBasePlugin#getImage(String);
- */
- protected ImageDescriptor putImageInRegistry(String id, String fileName)
- {
- ImageDescriptor fid = getPluginImage(fileName);
- Hashtable t = getImageDescriptorRegistry();
- t.put(id, fid);
- return fid;
- }
-
- /**
- * Retrieve an image descriptor in this plugin's directory tree given its file name. The
- * file name should be qualified relative to this plugin's bundle.
- * For example "icons/myicon.gif"
- * @param imagePath the path name to the image relative to this bundle
- * @return the image descriptor
- */
- public ImageDescriptor getPluginImage(String imagePath) {
- return getPluginImage(getBundle(), imagePath);
- }
-
- /**
- * Retrieves or creates an image based on its id. The image is then stored
- * in the image registry if it is created so that it may be retrieved again.
- * Thus, image resources retrieved in this way need not be disposed by the
- * caller.
- *
- * @param key the id of the image to retrieve.
- * @return the Image resource for this id.
- */
- public Image getImage(String key)
- {
- // First check the image registry
- ImageRegistry imageRegistry = getImageRegistry();
- Image image = imageRegistry.get(key);
- if (image == null) { // check the image descriptor registry
- ImageDescriptor descriptor = getImageDescriptor(key);
- if (descriptor != null) {
- imageRegistry.put(key, descriptor);
- image = imageRegistry.get(key);
- } else {
- logError("...error retrieving image for key: " + key); //$NON-NLS-1$
- }
- }
- return image;
- }
-
- /**
- * Returns the image descriptor that has been registered to this id.
- * @param key the id of the image descriptor to retrieve
- * @return an ImageDescriptor
- */
- public ImageDescriptor getImageDescriptor(String key) {
- Hashtable t = getImageDescriptorRegistry();
- ImageDescriptor descriptor = (ImageDescriptor) t.get(key);
- return descriptor;
- }
-
- /**
- * Gets the hashtable that is the image descriptor registry. Creates and populates
- * it if necessary.
- * @return The image descriptor registry hashtable.
- */
- private Hashtable getImageDescriptorRegistry() {
- if (imageDescriptorRegistry == null) {
- imageDescriptorRegistry = new Hashtable();
- initializeImageRegistry();
- }
- return imageDescriptorRegistry;
- }
-
- /**
- * Returns an image descriptor from the base IDE. Looks only in the "icons/full/" directories.
- *
- * @see org.eclipse.ui.views.navigator.ResourceNavigatorActionGroup#getImageDescriptor(java.lang.String)
- */
- public ImageDescriptor getImageDescriptorFromIDE(String relativePath)
- {
- Hashtable registry = getImageDescriptorRegistry();
- ImageDescriptor descriptor = (ImageDescriptor)registry.get(relativePath);
- if (descriptor == null) {
- String iconPath = "icons/full/"; //$NON-NLS-1$
- String key = iconPath + relativePath;
- String[] bundleNames = new String[] {"org.eclipse.ui", "org.eclipse.ui.ide"}; //$NON-NLS-1$ //$NON-NLS-2$
- 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();
- }
- registry.put(relativePath, descriptor);
- }
- return descriptor;
- }
-
- // -----------------
- // LOGGER METHODS...
- // -----------------
-
- /**
- * Get the logger for this plugin. You should not have to directly access
- * the logger, since helper methods are already provided in this class.
- * Use with care.
- */
- public Logger getLogger()
- {
- return log;
- }
-
- // -------------------------
- // MISCELLANEOUS METHODS...
- // -------------------------
-
- /**
- * Return true if we are running in a headless environment. We equate this
- * to mean that the workbench is not running.
- */
- public boolean isHeadless()
- {
- if (!headlessSet)
- getWorkbench();
- return headless;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemElapsedTimer.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemElapsedTimer.java
deleted file mode 100644
index 91d98ace1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemElapsedTimer.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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 java.io.PrintWriter;
-
-/**
- * A utility helper class to help when making timings of potentially
- * long operations, such as remote system calls.
- */
-public class SystemElapsedTimer
-{
-
-
-
- private long startTime;
- private long endTime;
-
- public SystemElapsedTimer()
- {
- setStartTime();
- }
- public void setStartTime()
- {
- startTime = System.currentTimeMillis();
- }
- public SystemElapsedTimer setEndTime()
- {
- endTime = System.currentTimeMillis();
- return this;
- }
- public long getElapsedTime()
- {
- return (endTime - startTime);
- }
- public String toString()
- {
- long deltaMillis = getElapsedTime();
- // deltaMillis = n + s*1000 + m*60*1000 + h*60*60*1000;
- long millis = (deltaMillis) %1000;
- long deltaSeconds = (deltaMillis) /1000;
- long deltaMinutes = deltaSeconds / 60;
- long hours = (int)(deltaMillis / (60 * 60 * 1000));
- long minutes= (int)(deltaMinutes - (hours*60) );
- long seconds= (int)(deltaSeconds - (hours*60*60) - (minutes*60));
- String result = "Elapsed time: " + hours + " hours, " + //$NON-NLS-1$ //$NON-NLS-2$
- minutes + " minutes, " + //$NON-NLS-1$
- seconds + " seconds, " + //$NON-NLS-1$
- millis + " milliseconds"; //$NON-NLS-1$
- return result;
- }
- public void writeElapsedTime(PrintWriter writer, String header)
- {
- writer.println(header);
- writer.println(toString());
- writer.flush();
- }
- // the following methods are for testing purposes only
- public static void main(String args[])
- {
- SystemElapsedTimer me = new SystemElapsedTimer();
- me.setET(5, 4, 3, 100);
- System.out.println(me);
- me.setET(25, 14, 53, 999);
- System.out.println(me);
- me.setET(25, 0, 53, 0);
- System.out.println(me);
- me.setET(0, 0, 13, 0);
- System.out.println(me);
- }
- public void setET(long h, long m, long s, long n)
- {
- long et = n + s*1000 + m*60*1000 + h*60*60*1000;
- setET(et);
- }
- public void setET(long givenET)
- {
- startTime = 0L;
- endTime = givenET;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPerspectiveHelpers.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPerspectiveHelpers.java
deleted file mode 100644
index 25222f1b5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPerspectiveHelpers.java
+++ /dev/null
@@ -1,190 +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.rse.ui.view.SystemPerspectiveLayout;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.rse.ui.view.SystemViewPart;
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-
-
-/**
- * @author coulthar
- *
- * Helper methods related to finding and switching perspectives, views and
- * so on.
- */
-public class SystemPerspectiveHelpers
-{
-
- // constants
- /**
- * The ID of the RSE perspective
- */
- public static String RSE_PERSP_ID = SystemPerspectiveLayout.ID;
-
-
- /**
- * Opens the RSE perspective, if not already, in the current window
- */
- public static boolean openRSEPerspective()
- {
- return openInNewPage(RSE_PERSP_ID);
- }
- /**
- * Tests if the RSE perspective is the active perspective
- */
- public static boolean isRSEPerspectiveActive()
- {
- IPerspectiveDescriptor activePersp = getActivePerspective();
- if ((activePersp!=null) && activePersp.getId().equals(RSE_PERSP_ID))
- return true;
- else
- return false;
- }
- /**
- * Opens a new page with a particular perspective, given the perspective's ID
- * @return true if was open or successfully opened/focused. False if anything went wrong
- */
- public static boolean openInNewPage(String perspID)
- {
- boolean ok = false;
- IPerspectiveDescriptor persp = getActivePerspective();
- if (persp == null)
- return ok;
- if (persp.getId().equals(perspID))
- return true;
- // If the perspective is already open, then reuse it.
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage[] pages = window.getPages();
- for (int i = 0; i < pages.length; i++)
- {
- persp = pages[i].getPerspective();
- if (persp != null && persp.getId().equals(perspID))
- {
- window.setActivePage(pages[i]);
- return true;
- }
- }
- // Open the page.
- try {
- //window.openPage(perspID, ResourcesPlugin.getWorkspace().getRoot()); OPENS A NEW WINDOW!!
- window.getWorkbench().showPerspective(perspID, window);
- ok = true;
- } catch (WorkbenchException e) {
- SystemBasePlugin.logError("Error opening perspective "+perspID, e); //$NON-NLS-1$
- }
- return ok;
- }
- /**
- * Return the currently active perpsective in the currently active page in the
- * currently active window.
- * May return null!
- */
- public static IPerspectiveDescriptor getActivePerspective()
- {
- // get the active window
- IWorkbenchWindow window = getActiveWindow();
- if (window != null)
- {
- // get the active page
- IWorkbenchPage page = window.getActivePage();
- if (page != null)
- // get the active perspective
- return page.getPerspective();
- }
- return null;
- }
- /**
- * Return the currently active window.
- * May return null!
- */
- public static IWorkbenchWindow getActiveWindow()
- {
- // get the active window
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- }
-
- /**
- * Search for, and return, a view with the given ID, in the active perspective
- */
- public static IViewPart findView(String viewID)
- {
- IViewPart viewPart = null;
- IWorkbenchWindow window = getActiveWindow();
- if (window != null)
- {
- IWorkbenchPage page = window.getActivePage();
- if (page != null)
- viewPart= page.findView(viewID);
- } // end if window != null
- return viewPart;
- }
-
- /**
- * Return the RSE tree view in the active perspective, or null if the active
- * perspective is NOT the RSE perspective.
- */
- public static SystemView findRSEView()
- {
- IViewPart viewPart = findView(SystemViewPart.ID);
- if ((viewPart != null) && (viewPart instanceof SystemViewPart))
- return ((SystemViewPart)viewPart).getSystemView();
- else
- return null;
- }
-
- /**
- * Show the view with given ID, if not already showing in current perspective,
- * in current page, in current window.
- * @return the view part instance if found or opened successfully. Null if something went wrong
- */
- public static IViewPart showView(String viewID)
- {
- IViewPart viewPart = null;
- IWorkbenchWindow window = getActiveWindow();
- if (window != null)
- {
- IWorkbenchPage page = window.getActivePage();
- if (page != null)
- {
- try
- {
- viewPart= page.findView(viewID);
- if ( viewPart != null )
- page.bringToTop(viewPart);
- else
- {
- //IWorkbenchPart activePart= page.getActivePart(); not used? Phil
- viewPart = page.showView(viewID);
- }
- }
- catch (PartInitException pie)
- {
- SystemBasePlugin.logError("Error opening view " + viewID, pie); //$NON-NLS-1$
- }
- } //end if page != null
- } // end if window != null
- return viewPart;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index 4b06e913a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributor.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.AbstractGroupMarker;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IContributionManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.internal.ActionDescriptor;
-import org.eclipse.ui.internal.ActionExpression;
-import org.eclipse.ui.internal.IObjectActionContributor;
-import org.eclipse.ui.internal.ObjectFilterTest;
-import org.eclipse.ui.internal.ObjectPluginAction;
-import org.eclipse.ui.internal.PluginAction;
-import org.eclipse.ui.internal.PluginActionBuilder;
-import org.eclipse.ui.internal.PluginActionContributionItem;
-
-/**
- * This class parses the <objectContributor> tag from our
- * org.eclipse.rse.core.PopupMenus extension point.
- * <p>
- * We modelled our org.eclipse.rse.core.popupMenus extension point
- * after the org.eclipse.ui.popupMenus extension point, so it makes sense to model
- * the code to support it after the Eclipse code to support theirs.
- * To that end, we have to replace the class that parses the <objectContribution> tag,
- * because that class does not support subclassing, and change it to:
- * <ul>
- * <li>Ignore all processing of the objectClass attribute, because we don't have one.
- * <li>Add processing for the filter attributes we added: subsystemconfigurationid,
- * namefilter, typecategoryfilter,
- * typefilter, subtypefilter, subsubtypefilter
- * </ul>
- *
- * TODO use overrides list
- *
- * @see SystemPopupMenuActionContributorManager
- */
-public class SystemPopupMenuActionContributor extends PluginActionBuilder implements IObjectActionContributor {
-
- private static final String ATT_TYPE_CATEGORY_FILTER = "typecategoryfilter"; //$NON-NLS-1$
- private static final String ATT_NAME_FILTER = "namefilter"; //$NON-NLS-1$
- private static final String ATT_TYPE_FILTER = "typefilter"; //$NON-NLS-1$
- private static final String ATT_SUBTYPE_FILTER = "subtypefilter"; //$NON-NLS-1$
- 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_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$
- private static final String ATT_PATH = "path"; //$NON-NLS-1$
- private static final String TAG_OBJECT_CONTRIBUTION = "objectContribution";//$NON-NLS-1$
- private static final String TAG_MENU = "menu"; //$NON-NLS-1$
- private static final String TAG_ACTION = "action"; //$NON-NLS-1$
- private static final String TAG_SEPARATOR = "separator"; //$NON-NLS-1$
- private static final String TAG_FILTER = "filter"; //$NON-NLS-1$
- private static final String TAG_VISIBILITY = "visibility"; //$NON-NLS-1$
- private static final String TAG_GROUP_MARKER = "groupMarker"; //$NON-NLS-1$
- private IConfigurationElement config;
- private List cachedMenus;
- private List cachedActions;
- private boolean configRead = false;
- private ObjectFilterTest filterTest;
- private ActionExpression visibilityTest;
- private SystemRemoteObjectMatcher matcher = null;
-
- /**
- * Constructor for SystemPopupMenuActionContributor
- */
- public SystemPopupMenuActionContributor(IConfigurationElement element) {
- super();
- config = element;
- cachedMenus = new ArrayList();
- cachedActions = new ArrayList();
- String categoryfilter = element.getAttribute(ATT_TYPE_CATEGORY_FILTER);
- String namefilter = element.getAttribute(ATT_NAME_FILTER);
- String typefilter = element.getAttribute(ATT_TYPE_FILTER);
- String subtypefilter = element.getAttribute(ATT_SUBTYPE_FILTER);
- String subsubtypefilter = element.getAttribute(ATT_SUBSUBTYPE_FILTER);
- String subsystemfilter = element.getAttribute(ATT_SUBSYSTEM_FACTORY_ID);
- String subsystemCategoryFilter = element.getAttribute(ATT_SUBSYSTEM_FACTORY_CATEGORY);
- String systypes = element.getAttribute(ATT_SYSTEM_TYPES);
- matcher = new SystemRemoteObjectMatcher(subsystemfilter, subsystemCategoryFilter, categoryfilter, systypes, namefilter, typefilter, subtypefilter, subsubtypefilter);
- }
-
- /**
- * Return what was specified for the <samp>typecategoryfilter</samp> xml attribute.
- */
- public String getCategoryFilter() {
- return matcher.getCategoryFilter();
- }
-
- /**
- * Return what was specified for the <samp>namefilter</samp> xml attribute.
- */
- public String getNameFilter() {
- return matcher.getNameFilter();
- }
-
- /**
- * Return what was specified for the <samp>typefilter</samp> xml attribute.
- */
- public String getTypeFilter() {
- return matcher.getTypeFilter();
- }
-
- /**
- * Return what was specified for the <samp>subtypefilter</samp> xml attribute.
- */
- public String getSubTypeFilter() {
- return matcher.getSubTypeFilter();
- }
-
- /**
- * Return what was specified for the <samp>subsubtypefilter</samp> xml attribute.
- */
- public String getSubSubTypeFilter() {
- return matcher.getSubSubTypeFilter();
- }
-
- /**
- * Return what was specified for the <samp>subsystemconfigurationid</samp> xml attribute.
- */
- public String getSubSystemConfigurationId() {
- return matcher.getSubSystemConfigurationId();
- }
-
- /**
- * Return what was specified for the <samp>subsystemconfigurationCategory</samp> xml attribute.
- */
- public String getSubSystemConfigurationCategoryFilter() {
- return matcher.getSubSystemConfigurationCategoryFilter();
- }
-
- /**
- * Return what was specified for the <samp>systemTypes</samp> xml attribute.
- */
- public String getSystemTypesFilter() {
- return matcher.getSystemTypesFilter();
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object is not adaptable to this.
- */
- private ISystemRemoteElementAdapter getRemoteAdapter(Object object) {
- Object adapter = null;
- if (object instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) object;
- adapter = adaptable.getAdapter(ISystemRemoteElementAdapter.class);
- } else {
- IAdapterManager adapterManager = Platform.getAdapterManager();
- adapter = adapterManager.getAdapter(object, ISystemRemoteElementAdapter.class);
- }
- return (ISystemRemoteElementAdapter) adapter;
- }
-
- /**
- * Contributes actions applicable for the current selection.
- */
- public boolean contributeObjectActions(IWorkbenchPart part, SystemMenuManager menu, ISelectionProvider selProv, List actionIdOverrides) {
- return contributeObjectActions(part, menu.getMenuManager(), selProv, actionIdOverrides);
- }
-
- /**
- * Contributes actions applicable for the current selection.
- */
- public boolean contributeObjectActions(IWorkbenchPart part, IMenuManager menu, ISelectionProvider selProv, List actionIdOverrides) {
- // Parse configuration
- readConfigElement();
- if (cache == null) {
- return false;
- }
- if (cachedActions.size() == 0) {
- return false;
- }
- // Get a structured selection.
- ISelection sel = selProv.getSelection();
- if ((sel == null) || !(sel instanceof IStructuredSelection)) {
- return false;
- }
- IStructuredSelection selection = (IStructuredSelection) sel;
- // Generate actions.
- boolean actualContributions = false;
- for (int i = 0; i < cachedActions.size(); i++) {
- Object obj = cachedActions.get(i);
- if (obj instanceof ActionDescriptor) {
- ActionDescriptor ad = (ActionDescriptor) obj;
- contributeMenuAction(ad, menu, true);
- // Update action for the current selection and part.
- if (ad.getAction() instanceof ObjectPluginAction) {
- ObjectPluginAction action = (ObjectPluginAction) ad.getAction();
- //String actionText = action.getText(); // for debugging
- action.selectionChanged(selection);
- //System.out.println("action " + actionText + " enabled? " + action.isEnabled());
- action.setActivePart(part);
- }
- actualContributions = true;
- }
- }
- return actualContributions;
- }
-
- /**
- * Contribute to the list the action identifiers from other contributions that
- * this contribution wants to override. Actions of these identifiers will
- * not be contributed.
- * @see IObjectActionContributor
- */
- public void contributeObjectActionIdOverrides(List actionIdOverrides) {
- readConfigElement();
- // TODO: need to implement at some point
- }
-
- /**
- * Contributes menus applicable for the current selection.
- */
- public boolean contributeObjectMenus(SystemMenuManager menu, ISelectionProvider selProv) {
- return contributeObjectMenus(menu.getMenuManager(), selProv);
- }
-
- /**
- * Contributes menus applicable for the current selection.
- * @see IObjectActionContributor
- */
- public boolean contributeObjectMenus(IMenuManager menu, ISelectionProvider selProv) {
- // Parse config element.
- readConfigElement();
- if (cache == null) {
- return false;
- }
- if (cachedMenus.size() == 0) {
- return false;
- }
- // Get a structured selection.
- ISelection sel = selProv.getSelection();
- if ((sel == null) || !(sel instanceof IStructuredSelection)) {
- return false;
- }
- // Generate menus.
- boolean actualContributions = false;
- for (int i = 0; i < cachedMenus.size(); i++) {
- Object obj = cachedMenus.get(i);
- if (obj instanceof IConfigurationElement) {
- IConfigurationElement menuElement = (IConfigurationElement) obj;
- contributeMenu(menuElement, menu, true);
- actualContributions = true;
- }
- }
- return actualContributions;
- }
-
- /**
- * This factory method returns a new ActionDescriptor for the
- * configuration element.
- */
- protected ActionDescriptor createActionDescriptor(IConfigurationElement element) {
- return new ActionDescriptor(element, ActionDescriptor.T_POPUP);
- }
-
- /**
- * Returns true if the current selection matches all the given filtering criteria.
- */
- public boolean isApplicableTo(Object object) {
- readConfigElement();
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(object);
- boolean matches = (adapter != null);
- matches = matches && (visibilityTest == null || visibilityTest.isEnabledFor(object));
- matches = matches && (filterTest == null || filterTest.matches(object, true));
- matches = matches && matcher.appliesTo(adapter, object);
- return matches;
- }
-
- /**
- * Reads the configuration element and all the children.
- * This creates an action descriptor for every action in the extension.
- */
- private void readConfigElement() {
- if (!configRead) {
- currentContribution = createContribution();
- readElementChildren(config);
- if (cache == null) cache = new ArrayList(4);
- cache.add(currentContribution);
- currentContribution = null;
- configRead = true;
- }
- }
-
- protected void readContributions(String id, String tag, String extensionPoint) {
- cachedMenus.clear();
- cachedActions.clear();
- super.readContributions(id, tag, extensionPoint);
- }
-
- /**
- * Implements abstract method to handle the provided XML element
- * in the registry.
- */
- protected boolean readElement(IConfigurationElement element) {
- String tag = element.getName();
- if (tag.equals(TAG_VISIBILITY)) {
- visibilityTest = new ActionExpression(element);
- return true;
- }
- if (tag.equals(TAG_FILTER)) {
- if (filterTest == null) filterTest = new ObjectFilterTest();
- filterTest.addFilterElement(element);
- return true;
- }
- // Ignore all object contributions element as these
- // are handled by the ObjectActionContributorReader.
- if (tag.equals(TAG_OBJECT_CONTRIBUTION)) {
- return true;
- }
- // Found top level contribution element
- if (tag.equals(targetContributionTag)) {
- if (targetID != null) {
- // Ignore contributions not matching target id
- String id = getTargetID(element);
- if (id == null || !id.equals(targetID)) return true;
- }
- // Read it's sub-elements
- currentContribution = createContribution();
- readElementChildren(element);
- if (cache == null) cache = new ArrayList(4);
- cache.add(currentContribution);
- currentContribution = null;
- return true;
- }
- // Found menu contribution sub-element
- if (tag.equals(TAG_MENU)) {
- currentContribution.addMenu(element);
- cachedMenus.add(element);
- return true;
- }
- // Found action contribution sub-element
- if (tag.equals(TAG_ACTION)) {
- ActionDescriptor ades = createActionDescriptor(element);
- currentContribution.addAction(ades);
- cachedActions.add(ades);
- return true;
- }
- return false;
- }
-
-// /**
-// * get the root part of the path
-// */
-// protected String getPathRoot(String path) {
-// int loc = path.indexOf('/');
-// if (loc != -1) {
-// if (loc > 0)
-// return path.substring(0, loc);
-// else
-// return ""; // should never happen!
-// } else {
-// return path;
-// }
-// }
-
- /*
- * @see IObjectContributor#canAdapt()
- */
- public boolean canAdapt() {
- return false;
- }
-
- /**** EVERYTHING BELOW IS HACK ***/
- /**
- * Creates a menu from the information in the menu configuration element and
- * adds it into the provided menu manager. If 'appendIfMissing' is true, and
- * menu path slot is not found, it will be created and menu will be added
- * into it. Otherwise, add operation will fail.
- */
- protected void contributeMenu(IConfigurationElement menuElement, IMenuManager mng, boolean appendIfMissing) {
- // Get config data.
- String id = menuElement.getAttribute(ATT_ID);
- String label = menuElement.getAttribute(ATT_LABEL);
- String path = menuElement.getAttribute(ATT_PATH);
- if (label == null) {
- SystemBasePlugin.logInfo("Invalid Menu Extension (label == null): " + id); //$NON-NLS-1$
- return;
- }
- // Calculate menu path and group.
- String group = null;
- if (path != null) {
- int loc = path.lastIndexOf('/');
- if (loc != -1) {
- group = path.substring(loc + 1);
- path = path.substring(0, loc);
- } else {
- // assume that path represents a slot
- // so actual path portion should be null
- group = path;
- path = null;
- }
- }
- // Find parent menu.
- IMenuManager parent = mng;
- if (path != null) {
- parent = mng.findMenuUsingPath(path);
- if (parent == null) {
- SystemBasePlugin.logInfo("Invalid Menu Extension (Path is invalid): " + id); //$NON-NLS-1$
- return;
- }
- }
- // Find reference group.
- if (group == null) group = IWorkbenchActionConstants.MB_ADDITIONS;
- IContributionItem sep = parent.find(group);
- if (sep == null) {
- if (appendIfMissing)
- addGroup(parent, group);
- else {
- SystemBasePlugin.logInfo("Invalid Menu Extension (Group is invalid): " + id); //$NON-NLS-1$
- return;
- }
- }
- // If the menu does not exist create it.
- IMenuManager newMenu = parent.findMenuUsingPath(id);
- if (newMenu == null) newMenu = new MenuManager(label, id);
- // Add the menu
- try {
- insertAfter(parent, group, newMenu);
- } catch (IllegalArgumentException e) {
- SystemBasePlugin.logInfo("Invalid Menu Extension (Group is missing): " + id); //$NON-NLS-1$
- }
- // Get the menu again as it may be wrapped, otherwise adding
- // the separators and group markers below will not be wrapped
- // properly if the menu was just created.
- newMenu = parent.findMenuUsingPath(id);
- if (newMenu == null) SystemBasePlugin.logInfo("Could not find new menu: " + id); //$NON-NLS-1$
- // Create separators.
- IConfigurationElement[] children = menuElement.getChildren();
- for (int i = 0; i < children.length; i++) {
- String childName = children[i].getName();
- if (childName.equals(TAG_SEPARATOR)) {
- contributeSeparator(newMenu, children[i]);
- } else if (childName.equals(TAG_GROUP_MARKER)) {
- contributeGroupMarker(newMenu, children[i]);
- }
- }
- }
-
- /**
- * Contributes action from action descriptor into the provided menu manager.
- */
- protected void contributeMenuAction(ActionDescriptor ad, IMenuManager menu, boolean appendIfMissing) {
- // Get config data.
- String mpath = ad.getMenuPath();
- String mgroup = ad.getMenuGroup();
- if (mpath == null && mgroup == null) return;
- // Find parent menu.
- IMenuManager parent = menu;
- if (mpath != null) {
- parent = parent.findMenuUsingPath(mpath);
- if (parent == null) {
- SystemBasePlugin.logInfo("Invalid Menu Extension (Path is invalid): " + ad.getId()); //$NON-NLS-1$
- return;
- }
- }
- // Find reference group.
- if (mgroup == null) mgroup = IWorkbenchActionConstants.MB_ADDITIONS;
- IContributionItem sep = parent.find(mgroup);
- if (sep == null) {
- if (appendIfMissing)
- addGroup(parent, mgroup);
- else {
- SystemBasePlugin.logInfo("Invalid Menu Extension (Group is invalid): " + ad.getId()); //$NON-NLS-1$
- return;
- }
- }
- // Add action.
- try {
- insertAfter(parent, mgroup, ad.getAction());
- } catch (IllegalArgumentException e) {
- SystemBasePlugin.logInfo("Invalid Menu Extension (Group is missing): " + ad.getId()); //$NON-NLS-1$
- }
- }
-
- /**
- * Creates a named menu separator from the information in the configuration element.
- * If the separator already exists do not create a second.
- */
- protected void contributeSeparator(IMenuManager menu, IConfigurationElement element) {
- String id = element.getAttribute(ATT_NAME);
- if (id == null || id.length() <= 0) return;
- IContributionItem sep = menu.find(id);
- if (sep != null) return;
- insertMenuGroup(menu, new Separator(id));
- }
-
- /**
- * Creates a named menu group marker from the information in the configuration element.
- * If the marker already exists do not create a second.
- */
- protected void contributeGroupMarker(IMenuManager menu, IConfigurationElement element) {
- String id = element.getAttribute(ATT_NAME);
- if (id == null || id.length() <= 0) return;
- IContributionItem marker = menu.find(id);
- if (marker != null) return;
- insertMenuGroup(menu, new GroupMarker(id));
- }
-
- /**
- * Contributes action from the action descriptor into the provided tool bar manager.
- */
- protected void contributeToolbarAction(ActionDescriptor ad, IToolBarManager toolbar, boolean appendIfMissing) {
- // Get config data.
- String tId = ad.getToolbarId();
- String tgroup = ad.getToolbarGroupId();
- if (tId == null && tgroup == null) return;
- // Find reference group.
- if (tgroup == null) tgroup = IWorkbenchActionConstants.MB_ADDITIONS;
- IContributionItem sep = null;
- sep = toolbar.find(tgroup);
- if (sep == null) {
- if (appendIfMissing) {
- addGroup(toolbar, tgroup);
- } else {
- SystemBasePlugin.logInfo("Invalid Toolbar Extension (Group is invalid): " + ad.getId()); //$NON-NLS-1$
- return;
- }
- }
- // Add action to tool bar.
- try {
- insertAfter(toolbar, tgroup, ad.getAction());
- } catch (IllegalArgumentException e) {
- SystemBasePlugin.logInfo("Invalid Toolbar Extension (Group is missing): " + ad.getId()); //$NON-NLS-1$
- }
- }
-
- /**
- * Inserts the separator or group marker into the menu. Subclasses may override.
- */
- protected void insertMenuGroup(IMenuManager menu, AbstractGroupMarker marker) {
- menu.add(marker);
- }
-
- /**
- * Inserts an action after another named contribution item.
- * Subclasses may override.
- */
- protected void insertAfter(IContributionManager mgr, String refId, PluginAction action) {
- insertAfter(mgr, refId, new PluginActionContributionItem(action));
- }
-
- /**
- * Inserts a contribution item after another named contribution item.
- * Subclasses may override.
- */
- protected void insertAfter(IContributionManager mgr, String refId, IContributionItem item) {
- mgr.insertAfter(refId, item);
- }
-
- /**
- * Adds a group to a contribution manager.
- * Subclasses may override.
- */
- protected void addGroup(IContributionManager mgr, String name) {
- mgr.add(new Separator(name));
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributorManager.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributorManager.java
deleted file mode 100644
index 5b87b1300..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributorManager.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-/**
- * This class provides for the management of all popup menus provided by the
- * org.eclipse.rse.core.popupMenus extension point.
- * To that end, we must
- * <ul>
- * <li>Process the additional filtering attributes we added to the <objectContribution> tag
- * <li>Forgot all the code to do matching by object class type.
- * We can't do that because all remote objects
- * might be of the same type. Instead we replace that code with code
- * to do matching via those additional
- * filter attributes we described.
- * </ul>
- * @see SystemPopupMenuActionContributor
- */
-public class SystemPopupMenuActionContributorManager {
-
- private static final String T_OBJECT_CONTRIBUTION = "objectContribution"; //$NON-NLS-1$
- private static final String POPUP_MENU_EXTENSION_POINT_ID = "org.eclipse.rse.ui.popupMenus"; //$NON-NLS-1$
- private static SystemPopupMenuActionContributorManager singleton;
- private Vector contributors = new Vector();
-
- /**
- * Returns the singleton instance of this manager.
- */
- public static SystemPopupMenuActionContributorManager getManager() {
- if (singleton == null) {
- singleton = new SystemPopupMenuActionContributorManager();
- }
- return singleton;
- }
-
- /**
- * Constructor for SystemPopupMenuActionContributorManager
- */
- public SystemPopupMenuActionContributorManager() {
- super();
- loadContributors();
- }
-
- /**
- * Reads the registry, constructs contributors from the "objectContribution"
- * elements found, and registers them in the RSE popup menu registry.
- */
- private void loadContributors() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] popupMenus = registry.getConfigurationElementsFor(POPUP_MENU_EXTENSION_POINT_ID);
- for (int i = 0; i < popupMenus.length; i++) {
- IConfigurationElement popupMenu = popupMenus[i];
- if (popupMenu.getName().equals(T_OBJECT_CONTRIBUTION))
- {
- SystemPopupMenuActionContributor contributor = new SystemPopupMenuActionContributor(popupMenu);
- contributors.add(contributor);
- }
- else
- {
- IConfigurationElement[] popupMenuChildren = popupMenu.getChildren();
- for (int j = 0; j < popupMenuChildren.length; j++) {
- IConfigurationElement popupMenuChild = popupMenuChildren[j];
- if (popupMenuChild.getName().equals(T_OBJECT_CONTRIBUTION))
- {
- SystemPopupMenuActionContributor contributor = new SystemPopupMenuActionContributor(popupMenuChild);
- contributors.add(contributor);
- }
- else
- {
- //TODO: add a warning message for this
- SystemBasePlugin.logWarning("Invalid Tag found: " + popupMenuChild.getName()); //$NON-NLS-1$
- }
- }
- }
- }
- }
-
- /**
- * Contributes submenus and/or actions applicable to the selection in the
- * provided viewer into the provided popup menu.
- * It is called from the SystemView class when filling the context menu.
- * TODO: use actionIdOverrides list
- * @param part the IWorkbenchPart in which the selection lives and the menu will appear
- * @param popupMenu the SystemMenuManager (menu) in which the menu items are to be placed
- * @param selectionProvider the ISelectionProvider that will give us access to the selected items in the view
- * @param actionIdOverrides the List of overrides for the actions (currently ignored)
- * @return true if anything was added to the menu
- */
- public boolean contributeObjectActions(IWorkbenchPart part, SystemMenuManager popupMenu, ISelectionProvider selectionProvider, List actionIdOverrides) {
- /* get the selection */
- ISelection selection = selectionProvider.getSelection();
- if ((selection == null) || !(selection instanceof IStructuredSelection)) return false;
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-
- /* Convert the selection to an array. This is an optimization since they must each be scanned several times. */
- Object[] selections = structuredSelection.toArray();
-
- /* Finds those contributors that match every selection. Those that match only some are discarded. */
- Vector matchingContributors = new Vector(10); // 10 is arbitrary but reasonable bound
- for (Iterator z = contributors.iterator(); z.hasNext();) {
- boolean matches = true;
- SystemPopupMenuActionContributor contributor = (SystemPopupMenuActionContributor) z.next();
- for (int i = 0; i < selections.length && matches; i++) {
- Object object = selections[i];
- if (!contributor.isApplicableTo(object)) {
- matches = false;
- }
- }
- if (matches) {
- matchingContributors.add(contributor);
- }
- }
-
- /* Process the menu contributions. */
- int actualContributions = 0;
- for (Iterator z = matchingContributors.iterator(); z.hasNext();) {
- SystemPopupMenuActionContributor contributor = (SystemPopupMenuActionContributor) z.next();
- boolean contributed = contributor.contributeObjectMenus(popupMenu, selectionProvider);
- if (contributed) actualContributions++;
- }
-
- /* Process the object action contributions. */
- for (Iterator z = matchingContributors.iterator(); z.hasNext();) {
- SystemPopupMenuActionContributor contributor = (SystemPopupMenuActionContributor) z.next();
- boolean contributed = contributor.contributeObjectActions(part, popupMenu, selectionProvider, actionIdOverrides);
- if (contributed) actualContributions++;
- }
-
- /* return true if there were any contributions made */
- return (actualContributions > 0);
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index f6123f0f3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPreferencesManager.java
+++ /dev/null
@@ -1,516 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 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 java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.SortedSet;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.propertypages.RemoteSystemsPreferencePage;
-
-
-/**
- * A class that encapsulates all global preferences for the remote system framework
- * <p>
- * These include:
- * <ul>
- * <li>The list of profile names that are active
- * <li>The default user Id per system type
- * <li>The global setting about whether to show filter pools
- * <li>The global setting about whether to show filter strings
- * <li>
- * </ul>
- */
-public class SystemPreferencesManager
- implements ISystemPreferencesConstants
-{
-
- private static SystemPreferencesManager inst;
-// private Hashtable userIdsPerKey = null;
- /**
- *
- */
- protected SystemPreferencesManager()
- {
- }
-
- /**
- * Get singleton of this class
- */
- public static SystemPreferencesManager getPreferencesManager()
- {
- if (inst == null)
- inst = new SystemPreferencesManager();
- return inst;
- }
-
- // -------------------------
- // ACTIVE PROFILE METHODS...
- // -------------------------
-
- /**
- * Return active profile names
- */
- public String[] getActiveProfileNames()
- {
- return RemoteSystemsPreferencePage.getActiveProfiles();
- }
-
- /**
- * Rename one of the active profile names in the list of names stored in the registry.
- */
- public void renameActiveProfile(String oldName, String newName)
- {
- // update active profile name list
- String[] names = getActiveProfileNames();
- int matchPos = -1;
- for (int idx=0; (matchPos==-1) && (idx<names.length); idx++)
- {
- if (names[idx].equalsIgnoreCase(oldName))
- {
- matchPos = idx;
- names[idx] = newName;
- }
- }
- if (matchPos >= 0)
- RemoteSystemsPreferencePage.setActiveProfiles(names);
- }
- /**
- * Delete one of the active profile names in the list of names stored in the registry.
- */
- public void deleteActiveProfile(String oldName)
- {
- String[] names = getActiveProfileNames();
- int matchPos = -1;
- for (int idx=0; (matchPos==-1) && (idx<names.length); idx++)
- {
- if (names[idx].equalsIgnoreCase(oldName))
- {
- matchPos = idx;
- names[idx] = null;
- }
- }
- if (matchPos >= 0)
- RemoteSystemsPreferencePage.setActiveProfiles(names);
- }
- /**
- * Add a name to the active profile list. A name already in the list is not added again.
- * The list remains sorted in the natural order.
- */
- public void addActiveProfile(String newName)
- {
- SortedSet names = new TreeSet(Arrays.asList(getActiveProfileNames()));
- names.add(newName);
- String[] newNames = new String[names.size()];
- names.toArray(newNames);
- RemoteSystemsPreferencePage.setActiveProfiles(newNames);
- }
-
- /**
- * Return the position of a give profile name in the active list
- */
- public int getActiveProfilePosition(String profileName)
- {
- String[] names = getActiveProfileNames();
- int matchPos = -1;
- for (int idx=0; (matchPos==-1) && (idx<names.length); idx++)
- {
- if (names[idx].equalsIgnoreCase(profileName))
- matchPos = idx;
- }
- return matchPos;
- }
-
- // ------------------
- // ORDER METHODS...
- // ------------------
- /**
- * Returns user's preference for the order of the connection names
- */
- public String[] getConnectionNamesOrder(String profileName)
- {
- String[] allConnectionNamesOrder = RemoteSystemsPreferencePage.getConnectionNamesOrder();
- profileName = profileName + "."; //$NON-NLS-1$
- int profileNameLength = profileName.length();
- Vector v = new Vector();
- for (int idx=0; idx<allConnectionNamesOrder.length; idx++)
- if (allConnectionNamesOrder[idx].startsWith(profileName))
- v.addElement(allConnectionNamesOrder[idx].substring(profileNameLength));
- String[] names = new String[v.size()];
- //System.out.println("Connection names preference order for profile " + profileName + "...");
- for (int idx=0; idx<names.length; idx++)
- {
- names[idx] = (String)v.elementAt(idx);
- //System.out.println(" '" + names[idx]+"'");
- }
- //System.out.println();
- return names;
- }
- /**
- * Returns user's preference for the order of the connection names,
- * after resolving it with the reality list of connection names.
- */
- public String[] getConnectionNamesOrder(IHost[] realityConnectionList, String profileName)
- {
- if (realityConnectionList == null)
- return new String[0];
- String[] realityNames = new String[realityConnectionList.length];
- for (int idx=0; idx<realityConnectionList.length; idx++)
- realityNames[idx] = realityConnectionList[idx].getAliasName();
- String[] names = resolveOrderPreferenceVersusReality(realityNames, getConnectionNamesOrder(profileName));
- //System.out.println("Connection names resolved preference order for profile " + profileName + "...");
- //for (int idx=0; idx<names.length; idx++)
- // System.out.println(" '" + names[idx]+"'");
- //System.out.println();
- return names;
- }
- /**
- * Set user's preference for the order of the connection names
- */
- public void setConnectionNamesOrder(String[] names)
- {
- boolean debug = false;
- if (debug)
- {
- //System.out.println("Saving connection names preference order for all profiles:");
- for (int idx=0; idx<names.length; idx++)
- System.out.println(" '" + names[idx]+"'"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println();
- }
- RemoteSystemsPreferencePage.setConnectionNamesOrder(names);
- }
- /**
- * Set user's preference for the order of the connection names
- */
- public void setConnectionNamesOrder()
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IHost[] conns = sr.getHosts();
- String[] names = new String[conns.length];
- for (int idx=0; idx<names.length; idx++)
- names[idx] = conns[idx].getSystemProfileName()+"."+conns[idx].getAliasName(); //$NON-NLS-1$
- setConnectionNamesOrder(names);
- }
-
- /**
- * Helper method to resolve differences between two ordered name lists.
- * Used when there are differences between the actual list of names and
- * a restored ordered list of names.
- */
- public String[] resolveOrderPreferenceVersusReality(String[] reality, String[] ordered)
- {
- Vector finalList = new Vector();
- // step 1: include all names from preferences list which do exist in reality...
- for (int idx=0; idx<ordered.length; idx++)
- {
- if (find(reality, ordered[idx]))
- finalList.addElement(ordered[idx]);
- }
- // step 2: add all names in reality which do not exist in preferences list...
- for (int idx=0; idx<reality.length; idx++)
- {
- if (!find(ordered, reality[idx]))
- finalList.addElement(reality[idx]);
- }
- String[] resolved = new String[finalList.size()];
- for (int idx=0; idx<finalList.size(); idx++)
- resolved[idx] = (String)finalList.elementAt(idx);
- return resolved;
- }
-
- private boolean find(String[] haystack, String needle)
- {
- for (int idx=0; idx<haystack.length; idx++)
- {
- if (haystack[idx].equals(needle))
- return true;
- }
- return false;
- }
-
-
- // ------------------
- // USER ID METHODS...
- // ------------------
-
- /**
- * Return user Id per system type
- */
- public String getDefaultUserId(String systemType)
- {
- return RemoteSystemsPreferencePage.getUserIdPreference(systemType);
- }
- /**
- * Set user Id per system type
- */
- public void setDefaultUserId(String systemType, String userId)
- {
- RemoteSystemsPreferencePage.setUserIdPreference(systemType,userId);
- }
-
-
- /**
- * Return user Id per key
- */
- public String getUserId(String key)
- {
- String uid = null;
- Hashtable userIds = getUserIds();
- uid = (String) userIds.get(key);
- return uid;
- }
-
- /**
- * Set the user Id for this key. The key typically designates a scope for this userid so that a hierarchy
- * of user ids can be maintained for inheritance. For example, hosts have greater scope than subsystems.
- * A key would typically be <profile-name>.<host-name>, or <profile-name>.<host-type>, or
- * <profile-name>.<host-name>.<subsystem-name>.
- */
- public void setUserId(String key, String userId) {
- if ((key != null) && (userId != null)) {
- Hashtable userIds = getUserIds();
- String storedUserId = (String) userIds.get(key);
- if (storedUserId == null || !storedUserId.equals(userId)) { // don't bother updating if its already there
- userIds.put(key, userId);
- setUserIds(userIds);
- }
- }
- }
-
- /**
- * Clear the user Id for the given key
- */
- public void clearUserId(String key)
- {
- Hashtable userIds = getUserIds();
- if (userIds.containsKey(key))
- {
- userIds.remove(key);
- setUserIds(userIds);
- }
- }
-
- /**
- * Return the hashtable where the key is a string identifying a particular object, and
- * the value is the user Id for that object.
- */
- public static Hashtable getUserIds() {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- Hashtable userIds = null;
- String value = store.getString(ISystemPreferencesConstants.USERIDPERKEY);
- if (value != null) {
- userIds = parseString(value);
- } else {
- userIds = new Hashtable();
- }
- return userIds;
- }
-
- /**
- * Set/store the user ids that are saved keyed by some key.
- */
- public static void setUserIds(Hashtable userIds) {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- String userIdsString = makeString(userIds);
- store.setValue(ISystemPreferencesConstants.USERIDPERKEY, userIdsString);
- RSECorePlugin.getDefault().savePluginPreferences();
- }
-
- /**
- * Convert hashtable of key-value pairs into a single string
- */
- protected static String makeString(Hashtable table) {
- Enumeration keys = table.keys();
- StringBuffer sb = new StringBuffer(20 * table.size());
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- String value = (String) table.get(key);
- if ((value != null) && (value.length() > 0)) {
- sb.append(key);
- sb.append('=');
- sb.append(value);
- sb.append(';');
- }
- }
- return sb.toString();
- }
-
- /**
- * Parse out list of key-value pairs into a hashtable
- */
- protected static Hashtable parseString(String allvalues) {
- StringTokenizer tokens = new StringTokenizer(allvalues, "=;"); //$NON-NLS-1$
- Hashtable keyValues = new Hashtable(10);
- int count = 0;
- String token1 = null;
- String token2 = null;
- while (tokens.hasMoreTokens()) {
- count++;
- if ((count % 2) == 0) // even number
- {
- token2 = tokens.nextToken();
- keyValues.put(token1, token2);
- } else
- token1 = tokens.nextToken();
- }
- return keyValues;
- }
-
- // ----------------------
- // GETTER METHODS...
- // ----------------------
- /**
- * Return whether to show connection names qualified by profile name
- */
- public boolean getQualifyConnectionNames()
- {
- return RemoteSystemsPreferencePage.getQualifyConnectionNamesPreference();
- }
-
- /**
- * Return whether to show filter pools or not
- */
- public boolean getShowFilterPools()
- {
- return RemoteSystemsPreferencePage.getShowFilterPoolsPreference();
- }
-
- /**
- * Return whether to remember state or not in Remote Systems view
- */
- public boolean getRememberState()
- {
- return RemoteSystemsPreferencePage.getRememberStatePreference();
- }
- /**
- * Return whether to show "New Connection..." prompt
- */
- public boolean getShowNewConnectionPrompt()
- {
- return RemoteSystemsPreferencePage.getShowNewConnectionPromptPreference();
- }
- /**
- * Return whether to cascade user actions menu by profile
- */
- public boolean getCascadeUserActions()
- {
- return RemoteSystemsPreferencePage.getCascadeUserActionsPreference();
- }
- /**
- * Return whether to turn on "Verify connection" checkbox on the New Connection wizard
- */
- public boolean getVerifyConnection()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- store.setDefault(ISystemPreferencesConstants.VERIFY_CONNECTION, ISystemPreferencesConstants.DEFAULT_VERIFY_CONNECTION);
- return store.getBoolean(ISystemPreferencesConstants.VERIFY_CONNECTION);
- }
-
- // ----------------------
- // SETTER METHODS...
- // ----------------------
- /**
- * Set whether to show connection names qualified by profile name
- */
- public void setQualifyConnectionNames(boolean set)
- {
- RemoteSystemsPreferencePage.setQualifyConnectionNamesPreference(set);
- }
-
- /**
- * Set whether to show filter pools or not
- */
- public void setShowFilterPools(boolean show)
- {
- boolean prevValue = getShowFilterPools();
- RemoteSystemsPreferencePage.setShowFilterPoolsPreference(show);
- if (show != prevValue)
- RSEUIPlugin.getTheSystemRegistry().setShowFilterPools(show);
- }
-
- /**
- * Set whether to remember state or not in Remote Systems view
- */
- public void setRememberState(boolean remember)
- {
- RemoteSystemsPreferencePage.setRememberStatePreference(remember);
- }
- /**
- * Set whether to show "New Connection..." prompt
- */
- public void setShowNewConnectionPrompt(boolean show)
- {
- RemoteSystemsPreferencePage.setShowNewConnectionPromptPreference(show);
- }
- /**
- * Set whether to cascade user actions menu by profile
- */
- public void setCascadeUserActions(boolean cascade)
- {
- RemoteSystemsPreferencePage.setCascadeUserActionsPreference(cascade);
- }
- /**
- * Set whether to turn on "Verify connection" checkbox on the New Connection wizard
- */
- public void setVerifyConnection(boolean verify)
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.VERIFY_CONNECTION, verify);
- RSEUIPlugin.getDefault().savePluginPreferences(); // also saves the preference store
- }
-
- // ------------------
- // HISTORY METHODS...
- // ------------------
- /**
- * Return history for the folder combobox
- */
- public String[] getFolderHistory()
- {
- return RemoteSystemsPreferencePage.getFolderHistory();
- }
- /**
- * Set history for the folder combobox
- */
- public void setFolderHistory(String[] history)
- {
- RemoteSystemsPreferencePage.setFolderHistory(history);
- }
- /**
- * Return history for a widget given a key that uniquely identifies it
- */
- public String[] getWidgetHistory(String key)
- {
- return RemoteSystemsPreferencePage.getWidgetHistory(key);
- }
- /**
- * Set history for a widget given a key that uniquely identifies it
- */
- public void setWidgetHistory(String key, String[] history)
- {
- RemoteSystemsPreferencePage.setWidgetHistory(key, history);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtension.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtension.java
deleted file mode 100644
index d75f17315..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtension.java
+++ /dev/null
@@ -1,371 +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 java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.ui.propertypages.SystemRemotePropertyPageNode;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.ui.IActionFilter;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.ui.internal.dialogs.IPropertyPageContributor;
-import org.eclipse.ui.internal.dialogs.PropertyPageManager;
-import org.osgi.framework.Bundle;
-
-
-/**
- * Represents a registered remote system property page. These are registered
- * via our propertyPages extension point.
- * <p>
- * This class encapsulates all the information supplied by the extension xml.
- * <ol>
- * <li>id. Unique identifier
- * <li>name. Displayable property page name
- * <li>class. The class which implements IWorkbenchPropertyPage
- * <li>subsystemconfigurationid. For scoping to remote objects for a given subsystem configuration
- * <li>subsystemconfigurationCategory. For scoping to remote objects for a given subsystem configuration category
- * <li>systemTypes. For scoping to remote objects from systems of a given type, or semicolon-separated types.
- * <li>namefilter. For scoping to remote objects of a given name
- * <li>typecategoryfilter. For scoping to remote objects for a given remote object type category
- * <li>typefilter. For scoping to remote objects of a given type
- * <li>subtypefilter. For scoping to remote objects of a given subtype
- * <li>subsubtypefilter. For scoping to remote objects of a given sub-subtype
- * </ol>
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter
- */
-public class SystemPropertyPageExtension implements IPropertyPageContributor
-{
-
- private String name,id;
- private ImageDescriptor image = null;
- private SystemRemoteObjectMatcher matcher = null;
- private IConfigurationElement element = null;
- private IWorkbenchPropertyPage object = null;
- private boolean atTop = false;
- private HashMap filterProperties;
- private static final String TAG_FILTER="filter";//$NON-NLS-1$
-
- /**
- * Constructor
- */
- public SystemPropertyPageExtension(IConfigurationElement element)
- {
- this.element = element;
- this.id = element.getAttribute("id"); //$NON-NLS-1$
- this.name = element.getAttribute("name"); //$NON-NLS-1$
- this.image = getPluginImage(element, element.getAttribute("icon")); //$NON-NLS-1$
- String sAtTop = element.getAttribute("first"); //$NON-NLS-1$
- if ((sAtTop != null) && sAtTop.equals("1")) //$NON-NLS-1$
- atTop = true;
-
- String subsystemfilter,subsystemCategoryFilter,systypes,categoryfilter,namefilter,typefilter,subtypefilter,subsubtypefilter;
-
- categoryfilter = element.getAttribute("typecategoryfilter"); //$NON-NLS-1$
- namefilter = element.getAttribute("namefilter"); //$NON-NLS-1$
- typefilter = element.getAttribute("typefilter"); //$NON-NLS-1$
- subtypefilter = element.getAttribute("subtypefilter"); //$NON-NLS-1$
- subsubtypefilter = element.getAttribute("subsubtypefilter"); //$NON-NLS-1$
- subsystemfilter = element.getAttribute("subsystemconfigurationid"); //$NON-NLS-1$
- subsystemCategoryFilter = element.getAttribute("subsystemconfigurationCategory"); //$NON-NLS-1$
- systypes = element.getAttribute("systemTypes"); //$NON-NLS-1$
-
- filterProperties = null;
- IConfigurationElement[] children = element.getChildren();
- for (int i=0; i<children.length; i++)
- {
- processChildElement(children[i]);
- }
-
-
- matcher = new SystemRemoteObjectMatcher(subsystemfilter, subsystemCategoryFilter, categoryfilter, systypes,
- namefilter, typefilter, subtypefilter, subsubtypefilter);
- }
- /**
- * Parses child element and processes it
- */
- private void processChildElement(IConfigurationElement element)
- {
- String tag = element.getName();
- if (tag.equals(TAG_FILTER))
- {
- String key = element.getAttribute("name"); //$NON-NLS-1$
- String value = element.getAttribute("value"); //$NON-NLS-1$
- if ((key == null) || (value == null))
- return;
- if (filterProperties==null)
- filterProperties = new HashMap();
- filterProperties.put(key, value);
- }
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>name</samp> xml attribute.
- */
- public String getName()
- {
- return name;
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>id</samp> xml attribute.
- */
- public String getId()
- {
- return id;
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>icon</samp> xml attribute.
- */
- public ImageDescriptor getImage()
- {
- return image;
- }
- /**
- * Getter method.
- * Return what was last set via call to setAtTop(boolean)
- */
- public boolean isAtTop()
- {
- return atTop;
- }
- /**
- * Set the at top attribute
- */
- public void setAtTop(boolean atTop)
- {
- this.atTop = atTop;
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>typecategoryfilter</samp> xml attribute.
- */
- public String getCategoryFilter()
- {
- return matcher.getCategoryFilter();
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>namefilter</samp> xml attribute.
- */
- public String getNameFilter()
- {
- return matcher.getNameFilter();
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>typefilter</samp> xml attribute.
- */
- public String getTypeFilter()
- {
- return matcher.getTypeFilter();
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>subtypefilter</samp> xml attribute.
- */
- public String getSubTypeFilter()
- {
- return matcher.getSubTypeFilter();
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>subsubtypefilter</samp> xml attribute.
- */
- public String getSubSubTypeFilter()
- {
- return matcher.getSubSubTypeFilter();
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>subsystemconfigurationid</samp> xml attribute.
- */
- public String getSubSystemConfigurationId()
- {
- return matcher.getSubSystemConfigurationId();
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>subsystemconfigurationCategory</samp> xml attribute.
- */
- public String getSubSystemConfigurationCategoryFilter()
- {
- return matcher.getSubSystemConfigurationCategoryFilter();
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>systemTypes</samp> xml attribute.
- */
- public String getSystemTypesFilter()
- {
- return matcher.getSystemTypesFilter();
- }
-
- /**
- * Retrieve image in given plugin's directory tree, given its file name.
- * The file name should be relatively qualified with the subdir containing it.
- */
- protected ImageDescriptor getPluginImage(IConfigurationElement element, String fileName)
- {
- URL path = getBundle(element).getEntry("/"); //$NON-NLS-1$
- URL fullPathString = null;
- try {
- fullPathString = new URL(path,fileName);
- return ImageDescriptor.createFromURL(fullPathString);
- } catch (MalformedURLException e) {}
- return null;
- }
-
- protected Bundle getBundle(IConfigurationElement element)
- {
- String nameSpace = element.getDeclaringExtension().getNamespace();
- return Platform.getBundle(nameSpace);
- }
-
- /**
- * Given an ISystemRemoteElement, return true if that element
- * should show this property page. Looks at the filter criteria.
- */
- public boolean appliesTo(ISystemRemoteElementAdapter adapter, Object element)
- {
- boolean matches = matcher.appliesTo(adapter, element);
- if (!matches)
- return false;
- // Test custom filter
- if (filterProperties == null)
- return true;
- IActionFilter filter = null;
- // If this is a resource contributor and the object is not a resource but
- // is an adaptable then get the object's resource via the adaptable mechanism.
- Object testObject = element;
- /*
- if (isResourceContributor
- && !(object instanceof IResource)
- && (object instanceof IAdaptable))
- {
- Object result = ((IAdaptable)object).getAdapter(IResource.class);
- if (result != null)
- testObject = result;
- }*/
- if (testObject instanceof IActionFilter)
- filter = (IActionFilter)testObject;
- else if (testObject instanceof IAdaptable)
- filter = (IActionFilter)((IAdaptable)testObject).getAdapter(IActionFilter.class);
- if (filter != null)
- return testCustom(testObject, filter);
- else
- return true;
- }
- /**
- * Returns whether the object passes a custom key value filter
- * implemented by a matcher.
- */
- private boolean testCustom(Object object, IActionFilter filter)
- {
- if (filterProperties == null)
- return false;
- Iterator iter = filterProperties.keySet().iterator();
- while (iter.hasNext())
- {
- String key = (String)iter.next();
- String value = (String)filterProperties.get(key);
- if (!filter.testAttribute(object, key, value))
- return false;
- }
- return true;
- }
-
-
- /**
- * Instantiate and return the class that implements IWorkbenchPropertyPage
- */
- public IWorkbenchPropertyPage getPropertyPage()
- {
- //if (object == null)
- //{
- try
- {
- object = (IWorkbenchPropertyPage)element.createExecutableExtension("class"); //$NON-NLS-1$
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Unable to start remote property page extension "+id,exc); //$NON-NLS-1$
- }
- //}
- return object;
- }
-
- public String toString()
- {
- return id;
- }
-
-
- // -----------------------------------
- // IPropertyPageContributor methods...
- // -----------------------------------
-
- /**
- * Implement this method to add instances of PropertyPage class to the
- * property page manager.
- * @return true if pages were added, false if not.
- */
- public boolean contributePropertyPages(PropertyPageManager manager, Object object)
- {
- boolean added = false;
- SystemRemotePropertyPageNode node = new SystemRemotePropertyPageNode(this, object);
- manager.addToRoot(node);
- return added;
- }
- /**
- * Returns true if this contributor should be considered
- * for the given object.
- */
- public boolean isApplicableTo(Object object)
- {
- return true;
- }
- /**
- * Creates the page based on the information in the configuration element.
- */
- public IWorkbenchPropertyPage createPage(Object element) // throws CoreException
- {
- IWorkbenchPropertyPage ppage = getPropertyPage();
- if (ppage != null)
- {
- if (element instanceof IAdaptable) {
- ppage.setElement((IAdaptable)element);
- }
-
- ppage.setTitle(name);
- }
- return ppage;
- }
- /**
- * see IObjectContributor#canAdapt()
- */
- public boolean canAdapt()
- {
- return false;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index c7cd2def1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtensionManager.java
+++ /dev/null
@@ -1,106 +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.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.ui.internal.dialogs.PropertyPageManager;
-
-
-/**
- * Manages remote system property page extenders.
- * @see org.eclipse.rse.core.SystemPropertyPageExtension
- */
-public class SystemPropertyPageExtensionManager
-{
- private SystemPropertyPageExtension[] propertyPageSuppliers = null;
- private static SystemPropertyPageExtensionManager inst = null;
- //private PropertyPageContributorManager test = null;
- /**
- * Constructor. Don't call directly.
- */
- protected SystemPropertyPageExtensionManager()
- {
- }
- /**
- * Get the singleton of this manager
- */
- public static SystemPropertyPageExtensionManager getManager()
- {
- if (inst == null)
- inst = new SystemPropertyPageExtensionManager();
- return inst;
- }
-
- /**
- * Get all the extenders of the remote properties page extension point
- */
- public SystemPropertyPageExtension[] getPropertyPageSuppliers()
- {
- if (propertyPageSuppliers == null)
- {
- propertyPageSuppliers = RSEUIPlugin.getDefault().getPropertyPageExtensions();
- }
- return propertyPageSuppliers;
- }
-
- /**
- * Return true if there are any remote property page contributions for the
- * given selected object
- */
- public boolean hasContributorsFor(ISystemRemoteElementAdapter adapter, Object element)
- {
- boolean hasContributors = false;
- if (adapter != null)
- {
- getPropertyPageSuppliers();
-
- if (propertyPageSuppliers != null)
- {
- for (int idx=0; !hasContributors && (idx<propertyPageSuppliers.length); idx++)
- hasContributors = propertyPageSuppliers[idx].appliesTo(adapter, element);
- }
- }
- else
- {
- hasContributors = false;
- }
- return hasContributors;
- }
-
- /**
- * Populate a given property page manager with all the applicable remote property pages
- */
- public boolean contribute(PropertyPageManager manager, ISystemRemoteElementAdapter adapter, Object object)
- {
- boolean added = false;
- getPropertyPageSuppliers();
- if (propertyPageSuppliers != null)
- {
- for (int idx=0; idx<propertyPageSuppliers.length; idx++)
- {
- boolean applies = propertyPageSuppliers[idx].appliesTo(adapter, object);
- if (applies)
- {
- added = true;
- propertyPageSuppliers[idx].contributePropertyPages(manager, object);
- }
- }
- }
- return added;
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index e0e13ec2b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemRemoteObjectMatcher.java
+++ /dev/null
@@ -1,588 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 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 java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-
-
-/**
- * This class encapsulates all the criteria required to identify a match on a remote
- * system object, and the methods to determine if a given input meets that criteria.
- * <ol>
- * <li>subsystemconfigurationid. For scoping to remote objects for a given subsystem configuration
- * <li>subsystemconfigurationCategory. For scoping to remote objects for a given subsystem configuration category.
- * <li>systemTypes. For scoping to remote objects from systems of a given type, or semicolon-separated types.
- * <li>category. For scoping to remote objects of a given type category
- * <li>namefilter. For scoping to remote objects of a given name
- * <li>typefilter. For scoping to remote objects of a given type
- * <li>subtypefilter. For scoping to remote objects of a given subtype
- * <li>subsubtypefilter. For scoping to remote objects of a given sub-subtype
- * </ol>
- * <p>
- * The names given can be scalar or very simple generic (begin or end with an asterisk).
- * Occasionally, as with iSeries objects types, an asterisk is a valid part of the
- * name, as in *PGM. If "*PGM" is specified for the type filter, then it would match
- * on other types too, like *SRVPGM. To solve this special case, users can specify
- * the following to tell us that the asterisk is to be taken literally, versus as a
- * leading or trailing wild card:
- * <pre><code>
- * "%%ast.PGM" or "%%ast;PGM"
- * </code></pre>
- * <p>
- * The special symbol "%%ast." is resolved into an asterisk as part of the literal name.
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter
- */
-public class SystemRemoteObjectMatcher
-{
- public static final String STAR_SYMBOL = "%ast."; //$NON-NLS-1$
- public static final String STAR_SYMBOL2 = "%ast;"; // really should have been this I think. //$NON-NLS-1$
- public static final int STAR_SYMBOL_LEN = 5;
- private String categoryfilter, subsystemfilter,subsystemCategoryFilter, systypesfilter, namefilter,typefilter,subtypefilter,subsubtypefilter;
- private String categoryfilterpart, subsystemfilterpart,subsystemCategoryFilterpart,namefilterpart,typefilterpart,subtypefilterpart,subsubtypefilterpart;
- private boolean allSSFCategories = false;
- private boolean allCategories = false;
- private boolean allNames = false;
- private boolean allTypes = false;
- private boolean allSubTypes = false;
- private boolean allSubSubTypes = false;
- private boolean allSubSystems = false;
- private boolean allSystemTypes = false;
-
- private boolean genericSSFCategoriesStart = false;
- private boolean genericCategoriesStart = false;
- private boolean genericNamesStart = false;
- private boolean genericTypesStart = false;
- private boolean genericSubTypesStart = false;
- private boolean genericSubSubTypesStart = false;
- private boolean genericSubSystemStart = false;
-
- private boolean genericSSFCategoriesEnd = false;
- private boolean genericCategoriesEnd = false;
- private boolean genericNamesEnd = false;
- private boolean genericTypesEnd = false;
- private boolean genericSubTypesEnd = false;
- private boolean genericSubSubTypesEnd = false;
- private boolean genericSubSystemEnd = false;
-
- /**
- * Historical constructor that doesn't support "subsystemFactoryCategory" or "systemTypes".
- */
- public SystemRemoteObjectMatcher(String subsystemFactoryId, String categoryFilter,
- String nameFilter, String typeFilter,
- String subtypeFilter, String subsubtypeFilter)
- {
- this(subsystemFactoryId, null, categoryFilter, null, nameFilter, typeFilter, subtypeFilter, subsubtypeFilter);
- }
- /**
- * Constructor that supports "subsystemFactoryCategory" and "systemTypes".
- */
- public SystemRemoteObjectMatcher(String subsystemFactoryId, String subsystemFactoryCategoryFilter, String categoryFilter,
- String systemTypes, String nameFilter, String typeFilter,
- String subtypeFilter, String subsubtypeFilter)
- {
- this.subsystemCategoryFilter = subsystemFactoryCategoryFilter;
- this.subsystemfilter = subsystemFactoryId;
- this.systypesfilter = systemTypes;
- this.categoryfilter = categoryFilter;
- this.namefilter = nameFilter;
- this.typefilter = typeFilter;
- this.subtypefilter = subtypeFilter;
- this.subsubtypefilter = subsubtypeFilter;
-
- if ((systypesfilter == null) || (systypesfilter.length()==0))
- systypesfilter = "*"; //$NON-NLS-1$
- if ((subsystemCategoryFilter == null) || (subsystemCategoryFilter.length()==0))
- subsystemCategoryFilter = "*"; //$NON-NLS-1$
- if (categoryfilter == null)
- categoryfilter = "*"; //$NON-NLS-1$
- if (namefilter == null)
- namefilter = "*"; //$NON-NLS-1$
- if (typefilter == null)
- typefilter = "*"; //$NON-NLS-1$
- if (subtypefilter == null)
- subtypefilter = "*"; //$NON-NLS-1$
- if (subsubtypefilter == null)
- subsubtypefilter = "*"; //$NON-NLS-1$
- if (subsystemfilter == null)
- subsystemfilter = "*"; //$NON-NLS-1$
-
- this.allSSFCategories = subsystemCategoryFilter.equals("*"); //$NON-NLS-1$
- this.allCategories = categoryfilter.equals("*"); //$NON-NLS-1$
- this.allSystemTypes = systypesfilter.equals("*"); //$NON-NLS-1$
- this.allNames = namefilter.equals("*"); //$NON-NLS-1$
- this.allTypes = typefilter.equals("*"); //$NON-NLS-1$
- this.allSubTypes = subtypefilter.equals("*"); //$NON-NLS-1$
- this.allSubSubTypes = subsubtypefilter.equals("*"); //$NON-NLS-1$
- this.allSubSystems = subsystemfilter.equals("*"); //$NON-NLS-1$
-
- // --------------------------------------------------
- // determine if the name starts or ends with asterisk
- // --------------------------------------------------
- this.genericSSFCategoriesStart = !allSSFCategories && startsWithAsterisk(subsystemCategoryFilter);
- this.genericCategoriesStart = !allCategories && startsWithAsterisk(categoryfilter);
- this.genericNamesStart = !allNames && startsWithAsterisk(namefilter);
- this.genericTypesStart = !allTypes && startsWithAsterisk(typefilter);
- this.genericSubTypesStart = !allSubTypes && startsWithAsterisk(subtypefilter);
- this.genericSubSubTypesStart = !allSubSubTypes && startsWithAsterisk(subsubtypefilter);
- this.genericSubSystemStart = !allSubSystems && startsWithAsterisk(subsystemfilter);
-
- this.genericSSFCategoriesEnd = !allSSFCategories && endsWithAsterisk(subsystemCategoryFilter);
- this.genericCategoriesEnd = !allCategories && endsWithAsterisk(categoryfilter);
- this.genericNamesEnd = !allNames && endsWithAsterisk(namefilter);
- this.genericTypesEnd = !allTypes && endsWithAsterisk(typefilter);
- this.genericSubTypesEnd = !allSubTypes && endsWithAsterisk(subtypefilter);
- this.genericSubSubTypesEnd = !allSubSubTypes && endsWithAsterisk(subsubtypefilter);
- this.genericSubSystemEnd = !allSubSystems && endsWithAsterisk(subsystemfilter);
-
- if (genericSSFCategoriesStart)
- subsystemCategoryFilterpart = stripLeadingAsterisk(subsystemCategoryFilter); // strip off asterisk
- if (genericCategoriesStart)
- categoryfilterpart = stripLeadingAsterisk(categoryfilter); // strip off asterisk
- if (genericNamesStart)
- namefilterpart = stripLeadingAsterisk(namefilter); // strip off asterisk
- if (genericTypesStart)
- typefilterpart = stripLeadingAsterisk(typefilter); // strip off asterisk
- if (genericSubTypesStart)
- subtypefilterpart = stripLeadingAsterisk(subtypefilter); // strip off asterisk
- if (genericSubSubTypesStart)
- subsubtypefilterpart = stripLeadingAsterisk(subsubtypefilter); // strip off asterisk
- if (genericSubSystemStart)
- subsystemfilterpart = stripLeadingAsterisk(subsystemfilter); // strip off asterisk
-
- if (genericSSFCategoriesEnd)
- subsystemCategoryFilterpart = stripTrailingAsterisk(subsystemCategoryFilter); // strip off asterisk
- if (genericCategoriesEnd)
- categoryfilterpart = stripTrailingAsterisk(categoryfilter); // strip off asterisk
- if (genericNamesEnd)
- namefilterpart = stripTrailingAsterisk(namefilter); // strip off asterisk
- if (genericTypesEnd)
- typefilterpart = stripTrailingAsterisk(typefilter); // strip off asterisk
- if (genericSubTypesEnd)
- subtypefilterpart = stripTrailingAsterisk(subtypefilter); // strip off asterisk
- if (genericSubSubTypesEnd)
- subsubtypefilterpart = stripTrailingAsterisk(subsubtypefilter);// strip off asterisk
- if (genericSubSystemEnd)
- subsystemfilterpart = stripTrailingAsterisk(subsystemfilter); // strip off asterisk
-
- // --------------------------------------------------
- // resolve '\*' escape characters
- // --------------------------------------------------
- subsystemCategoryFilter = resolveSymbols(subsystemCategoryFilter);
- categoryfilter = resolveSymbols(categoryfilter);
- namefilter = resolveSymbols(namefilter);
- typefilter = resolveSymbols(typefilter);
- subtypefilter = resolveSymbols(subtypefilter);
- subsubtypefilter = resolveSymbols(subsubtypefilter);
- subsystemfilter = resolveSymbols(subsystemfilter);
- }
-
- /**
- * Helper method.
- * Returns true if given name starts with an asterisk.
- */
- protected boolean startsWithAsterisk(String name)
- {
- return name.startsWith("*"); //$NON-NLS-1$
- }
- /**
- * Helper method.
- * Returns true if given name ends with an asterisk.
- */
- protected boolean endsWithAsterisk(String name)
- {
- return name.endsWith("*"); //$NON-NLS-1$
- }
- /**
- * Helper method.
- * Strips off the leading asterisk.
- */
- protected String stripLeadingAsterisk(String name)
- {
- return resolveSymbols(name.substring(1));
- }
- /**
- * Helper method.
- * Strips off the trailing asterisk.
- */
- protected String stripTrailingAsterisk(String name)
- {
- return resolveSymbols(name.substring(0, name.length()-1));
- }
- /**
- * Occasionally, as with iSeries objects types, an asterisk is a valid part of the
- * name, as in *PGM. If "*PGM" is specified for the type filter, then it would match
- * on other types too, like *SRVPGM. To solve this special case, users can specify
- * the following to tell us that the asterisk is to be taken literally, versus as a
- * leading or trailing wild card:<br>
- * <pre><code>
- * "%%ast.PGM" or "%%ast;PGM"
- * </code></pre>
- * <p>
- * The special symbol "%%ast." is resolved into an asterisk as part of the literal name.
- */
- protected String resolveSymbols(String name)
- {
- // yantzi:5.1.2 workaround for eclipse bug 49312
- if (name.startsWith("%%ast.") || name.startsWith("%%ast;")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- // eclipse should have stripped the leading % off but doesn't because of this bug
- name = name.substring(1);
- }
-
- int symbolLength = STAR_SYMBOL_LEN;
- int symbolIndex = name.indexOf(STAR_SYMBOL);
- if (symbolIndex == -1)
- symbolIndex = name.indexOf(STAR_SYMBOL2);
- boolean hasSymbols = (symbolIndex != -1);
- boolean hadSymbols = hasSymbols;
- boolean debug = false;
- if (hasSymbols && debug)
- System.out.println("Before: " + name); //$NON-NLS-1$
- while (hasSymbols)
- {
- if (symbolIndex == 0)
- {
- // "&amp.abc"
- if (name.length() > symbolLength)
- name = "*" + name.substring(symbolLength); //$NON-NLS-1$
- // "&amp."
- else
- name = "*"; //$NON-NLS-1$
- }
- else if ((symbolIndex+symbolLength) < name.length())
- {
- // "abc&amp.def"
- // "01234567890"
- String part1 = name.substring(0,symbolIndex); // up to symbol
- String part2 = name.substring(symbolIndex+symbolLength); // after symbol
- name = part1 + "*" + part2; //$NON-NLS-1$
- }
- else
- {
- // "abc&amp."
- // "01234567"
- String part1 = name.substring(0,symbolIndex); // up to symbol
- name = part1 + "*"; //$NON-NLS-1$
- }
- symbolIndex = name.indexOf(STAR_SYMBOL);
- if (symbolIndex == -1)
- symbolIndex = name.indexOf(STAR_SYMBOL2);
- hasSymbols = (symbolIndex != -1);
- }
- if (hadSymbols && debug)
- System.out.println("After: " + name); //$NON-NLS-1$
- return name;
- }
-
- /**
- * Getter method.
- * Return what was specified for the <samp>subsystemconfigurationCategory</samp> xml attribute.
- */
- public String getSubSystemConfigurationCategoryFilter()
- {
- return subsystemCategoryFilter;
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>systemTypes</samp> xml attribute.
- */
- public String getSystemTypesFilter()
- {
- return systypesfilter;
- }
-
- /**
- * Getter method.
- * Return what was specified for the <samp>typecategoryfilter</samp> xml attribute.
- */
- public String getCategoryFilter()
- {
- return categoryfilter;
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>namefilter</samp> xml attribute.
- */
- public String getNameFilter()
- {
- return namefilter;
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>typefilter</samp> xml attribute.
- */
- public String getTypeFilter()
- {
- return typefilter;
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>subtypefilter</samp> xml attribute.
- */
- public String getSubTypeFilter()
- {
- return subtypefilter;
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>subsubtypefilter</samp> xml attribute.
- */
- public String getSubSubTypeFilter()
- {
- return subsubtypefilter;
- }
- /**
- * Getter method.
- * Return what was specified for the <samp>subsystemconfigurationid</samp> xml attribute.
- */
- public String getSubSystemConfigurationId()
- {
- return subsystemfilter;
- }
-
- /**
- * Given an ISystemRemoteElement, return true if that element
- * meets this criteria.
- */
- public boolean appliesTo(ISystemRemoteElementAdapter adapter, Object element)
- {
- boolean applies = true;
- // must match on all attributes to apply
-
- // -----------------------------------
- // check for match on subsystem filter
- // -----------------------------------
- boolean subsystemMatch = true;
- if (!allSubSystems)
- {
- String subsystem = adapter.getSubSystemConfigurationId(element);
- if (subsystem == null)
- subsystemMatch = false;
- else if (!genericSubSystemStart && !genericSubSystemEnd)
- subsystemMatch = subsystem.equals(subsystemfilter);
- else if (genericSubSystemStart)
- subsystemMatch = subsystem.endsWith(subsystemfilterpart);
- else if (genericSubSystemEnd)
- subsystemMatch = subsystem.startsWith(subsystemfilterpart);
- }
- if (!subsystemMatch)
- return false;
-
- // ----------------------------------------------------
- // check for match on subsystem factory category filter
- // ----------------------------------------------------
- boolean ssfCategoryMatch = true;
- if (!allSSFCategories)
- {
- ISubSystem subsystem = adapter.getSubSystem(element);
- if (subsystem == null)
- ssfCategoryMatch = true; // should be false, but this was added late and I don't to regress anyting.
- else
- {
- String ssfCategory = subsystem.getSubSystemConfiguration().getCategory();
- if (ssfCategory == null)
- ssfCategory = ""; //$NON-NLS-1$
- if (!genericSSFCategoriesStart && !genericSSFCategoriesEnd)
- ssfCategoryMatch = ssfCategory.equals(subsystemCategoryFilter);
- else if (genericSSFCategoriesStart)
- ssfCategoryMatch = ssfCategory.endsWith(subsystemCategoryFilterpart);
- else if (genericSSFCategoriesEnd)
- ssfCategoryMatch = ssfCategory.startsWith(subsystemCategoryFilterpart);
- }
- }
- if (!ssfCategoryMatch)
- return false;
-
- // ----------------------------------------------------
- // check for match on system types filter
- // ----------------------------------------------------
- boolean systemTypesMatch = true;
- if (!allSystemTypes)
- {
- ISubSystem subsystem = adapter.getSubSystem(element);
- String[] values = tokenize(systypesfilter);
- if (subsystem == null)
- {
- if (!(element instanceof IHost)) // should never happen for remote objects!
- systemTypesMatch = false;
- else
- {
- String connSysType = ((IHost)element).getSystemType();
- systemTypesMatch = false;
- for (int idx=0; !systemTypesMatch && (idx<values.length); idx++)
- {
- if (connSysType.equals(values[idx]))
- systemTypesMatch = true;
- }
- }
- }
- else
- {
- systemTypesMatch = false;
- for (int idx=0; !systemTypesMatch && (idx<values.length); idx++)
- {
- if (subsystem.getHost().getSystemType().equals(values[idx]))
- systemTypesMatch = true;
- }
- }
- }
- if (!systemTypesMatch)
- return false;
-
- // ------------------------------
- // check for match on name filter
- // ------------------------------
- boolean nameMatch = true;
-
- // default is case insensitive
- boolean caseSensitive = false;
-
- // get subsystem
- ISubSystem subsystem = adapter.getSubSystem(element);
-
- // find out whether system is case sensitive or not
- if (subsystem != null) {
- caseSensitive = subsystem.getSubSystemConfiguration().isCaseSensitive();
- }
-
- if (!allNames)
- {
- String name = adapter.getName(element);
- String theNameFilter = namefilter;
- String theNameFilterPart = namefilterpart;
-
- if (name == null) {
- nameMatch = false;
- }
-
- else {
-
- if (!caseSensitive) {
- name = name.toLowerCase();
- theNameFilter = theNameFilter.toLowerCase();
- theNameFilterPart = theNameFilterPart.toLowerCase();
- }
-
- if (!genericNamesStart && !genericNamesEnd)
- nameMatch = name.equals(theNameFilter);
- else if (genericNamesStart)
- nameMatch = name.endsWith(theNameFilterPart);
- else if (genericNamesEnd)
- nameMatch = name.startsWith(theNameFilterPart);
- }
- }
- if (!nameMatch)
- return false;
-
- // ---------------------------------------
- // check for match on type category filter
- // ---------------------------------------
- boolean catMatch = true;
- if (!allCategories)
- {
- String cat = adapter.getRemoteTypeCategory(element);
- if (cat == null)
- catMatch = false;
- else if (!genericCategoriesStart && !genericCategoriesEnd)
- catMatch = cat.equals(categoryfilter);
- else if (genericCategoriesStart)
- catMatch = cat.endsWith(categoryfilterpart);
- else if (genericCategoriesEnd)
- catMatch = cat.startsWith(categoryfilterpart);
- }
- if (!catMatch)
- return false;
-
- // ------------------------------
- // check for match on type filter
- // ------------------------------
- boolean typeMatch = true;
- if (!allTypes)
- {
- String type = adapter.getRemoteType(element);
- if (type == null)
- typeMatch = false;
- else if (!genericTypesStart && !genericTypesEnd)
- typeMatch = type.equals(typefilter);
- else if (genericTypesStart)
- typeMatch = type.endsWith(typefilterpart);
- else if (genericTypesEnd)
- typeMatch = type.startsWith(typefilterpart);
- }
- if (!typeMatch)
- return false;
-
- // ---------------------------------
- // check for match on subtype filter
- // ---------------------------------
- boolean subtypeMatch = true;
- if (!allSubTypes)
- {
- String subtype = adapter.getRemoteSubType(element);
- if (subtype == null)
- subtypeMatch = false;
- else if (!genericSubTypesStart && !genericSubTypesEnd)
- subtypeMatch = subtype.equals(subtypefilter);
- else if (genericSubTypesStart)
- subtypeMatch = subtype.endsWith(subtypefilterpart);
- else if (genericSubTypesEnd)
- subtypeMatch = subtype.startsWith(subtypefilterpart);
- }
- if (!subtypeMatch)
- return false;
-
- // -------------------------------------
- // check for match on sub-subtype filter
- // -------------------------------------
- boolean subsubtypeMatch = true;
- if (!allSubSubTypes)
- {
- String subsubtype = adapter.getRemoteSubSubType(element);
- if (subsubtype == null)
- subsubtypeMatch = false;
- else if (!genericSubSubTypesStart && !genericSubSubTypesEnd)
- subsubtypeMatch = subsubtype.equals(subsubtypefilter);
- else if (genericSubSubTypesStart)
- subsubtypeMatch = subsubtype.endsWith(subsubtypefilterpart);
- else if (genericSubSubTypesEnd)
- subsubtypeMatch = subsubtype.startsWith(subsubtypefilterpart);
- }
- if (!subsubtypeMatch)
- return false;
-
- return applies;
- }
-
- /**
- * Break given comma-delimited string into tokens
- */
- private String[] tokenize(String input)
- {
- StringTokenizer tokens = new StringTokenizer(input,";"); //$NON-NLS-1$
- Vector v = new Vector();
- while (tokens.hasMoreTokens())
- v.addElement(tokens.nextToken());
- String[] stringArray = new String[v.size()];
- for (int idx=0; idx<v.size(); idx++)
- stringArray[idx] = (String)v.elementAt(idx);
- return stringArray;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceConstants.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceConstants.java
deleted file mode 100644
index e7b18682e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceConstants.java
+++ /dev/null
@@ -1,36 +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.rse.ui.ISystemPreferencesConstants;
-
-/**
- * Constants related to project and folder names.
- */
-public interface SystemResourceConstants
-{
-
- public static final String RESOURCE_PROJECT_NAME = "RemoteSystemsConnections"; //$NON-NLS-1$
- public static final String RESOURCE_TEMPFILES_PROJECT_NAME= "RemoteSystemsTempFiles"; //$NON-NLS-1$
- public static final String RESOURCE_CONNECTIONS_FOLDER_NAME = "Connections"; //$NON-NLS-1$
- public static final String RESOURCE_FILTERS_FOLDER_NAME = "Filters"; //$NON-NLS-1$
- public static final String RESOURCE_TYPE_FILTERS_FOLDER_NAME = "TypeFilters"; //$NON-NLS-1$
- public static final String RESOURCE_USERACTIONS_FOLDER_NAME = "UserActions"; //$NON-NLS-1$
- public static final String RESOURCE_COMPILECOMMANDS_FOLDER_NAME = "CompileCommands"; //$NON-NLS-1$
-
- public static final String RESOURCE_TEAMPROFILE_NAME = ISystemPreferencesConstants.DEFAULT_TEAMPROFILE;
-} \ No newline at end of file
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
deleted file mode 100644
index 10ed5998c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceHelpers.java
+++ /dev/null
@@ -1,774 +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 java.io.File;
-import java.io.FileFilter;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A class with helper methods for working with the underlying Eclipse resources
- * needed for filters, filter pools and filter pool managers.
- */
-public class SystemResourceHelpers implements FileFilter
-{
-
- private static SystemResourceHelpers defaultInstance = null;
-
- //private SystemLogFile logFile = null;
-
- // variables to affect the list method for subsetting folder contents
- private boolean filesOnly = false;
- private boolean foldersOnly = false;
- private String namePrefix = null;
- private String nameSuffix = null;
-
-
- /**
- * Constructor
- */
- public SystemResourceHelpers()
- {
- }
-
- /**
- * Return common instance if unique instance not required.
- */
- public static SystemResourceHelpers getResourceHelpers()
- {
- if (defaultInstance == null)
- defaultInstance = new SystemResourceHelpers();
- return defaultInstance;
- }
-
- // ---------------------------
- // GENERIC RESOURCE METHODS...
- // ---------------------------
-
- /**
- * Method to delete a folder or file and absorb the exception
- */
- public void deleteResource(IResource fileOrFolder)
- {
- try {
- if (fileOrFolder instanceof IFile)
- deleteFile((IFile)fileOrFolder);
- else
- deleteFolder((IFolder)fileOrFolder);
- } catch (Exception exc)
- {
- logException("Exception deleting resource " + fileOrFolder.getName(), exc); //$NON-NLS-1$
- }
- }
- /**
- * Method to rename a folder or file and absorb the exception
- */
- public void renameResource(IResource fileOrFolder, String newName)
- {
- //System.out.println("inside renameResource for "+fileOrFolder.getFullPath() + ". newName = " + newName);
- if (fileOrFolder.getName().equals(newName))
- {
- //System.out.println("same name! ");
- Exception exc = new Exception("Rename to same name: " + newName); //$NON-NLS-1$
- exc.fillInStackTrace();
- exc.printStackTrace();
- return;
- }
- try {
- if (fileOrFolder instanceof IFile)
- renameFile((IFile)fileOrFolder, newName);
- else
- renameFolder((IFolder)fileOrFolder, newName);
- } catch (Exception exc)
- {
- logException("Exception rename resource " + fileOrFolder.getName() + " to " + newName, exc); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Refresh a resource from disk. Turns off resource event listening to avoid recursion.
- * Does a DEPTH_INFINITE refresh.
- */
- public void refreshResource(IResource fileOrFolder)
- {
- SystemResourceManager.turnOffResourceEventListening();
- try
- {
- if (!fileOrFolder.getWorkspace().isTreeLocked())
- fileOrFolder.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception exc) {}
- SystemResourceManager.turnOnResourceEventListening();
- }
- /**
- * Refresh a resource from disk. Turns off resource event listening to avoid recursion.
- * Does a DEPTH_ZERO refresh, so children are not refreshed. Should be more efficient than
- * deep refresh.
- */
- public void refreshResourceShallow(IResource fileOrFolder)
- {
- SystemResourceManager.turnOffResourceEventListening();
- try
- {
- if (!fileOrFolder.getWorkspace().isTreeLocked())
- fileOrFolder.refreshLocal(IResource.DEPTH_ZERO, null);
- } catch (Exception exc) {}
- SystemResourceManager.turnOnResourceEventListening();
- }
-
- /**
- * Test if a resource is in use, prior to attempting to rename or delete it.
- * @return true if it is in use or read only, false if it is not.
- */
- public static boolean testIfResourceInUse(IResource resource)
- {
- boolean inUse = resource.getResourceAttributes().isReadOnly() || !resource.isAccessible();
- if (!inUse) // keep testing..
- {
- IPath localOSLocation = resource.getLocation();
- if (localOSLocation != null)
- {
- File osFile = new File(localOSLocation.toOSString());
- inUse = !osFile.canWrite();
- if (!inUse && (resource instanceof IFile))
- {
- try {
- //System.out.println("testing " + osFile.getAbsolutePath());
- FileWriter outFileStream = new FileWriter(osFile.getAbsolutePath(),true);
- outFileStream.close();
- }
- catch (IOException exc)
- {
- inUse = true;
- //System.out.println("...file is locked!");
- }
- }
- }
- }
- //System.out.println("Testing in-use of resource " + resource.getName() + ": " + inUse);
- return inUse;
- }
-
- // --------------------------
- // FOLDER SPECIFIC METHODS...
- // --------------------------
-
- /**
- * Create a folder, if it does not already exist.
- */
- public IFolder getOrCreateFolder(IContainer parentFolder, String folderName)
- {
- /*
- if (folderName.equals("Private"))
- {
- String msg = "Someone asked to create Private folder!";
- Exception e = new Exception(msg);
- e.fillInStackTrace();
- RSEUIPlugin.logError(msg, e);
- }
- */
- IFolder folder = getFolder(parentFolder, folderName);
- if (!exists(folder))
- createFolder(folder);
- return folder;
- }
- /**
- * Create a folder, if it does not already exist.
- */
- public boolean ensureFolderExists(IFolder folder)
- {
- boolean ok = true;
- if (!exists(folder))
- {
- ok = createFolder(folder);
- }
- return ok;
- }
-
- /**
- * Get a folder whose parent is either a project or a folder
- */
- public IFolder getFolder(IContainer parent, String folderName)
- {
- SystemResourceManager.turnOffResourceEventListening();
- IFolder folder = null;
- if (parent instanceof IProject)
- {
- folder = ((IProject)parent).getFolder(folderName);
- }
- else
- folder = ((IFolder)parent).getFolder(folderName);
- SystemResourceManager.turnOnResourceEventListening();
- return folder;
- }
- /**
- * Re-get a folder which has been renamed.
- */
- public IFolder getRenamedFolder(IFolder oldFolder, String newFolderName)
- {
- SystemResourceManager.turnOffResourceEventListening();
- IFolder folder = null;
- IContainer parent = oldFolder.getParent();
- if (parent instanceof IProject)
- folder = ((IProject)parent).getFolder(newFolderName);
- else
- folder = ((IFolder)parent).getFolder(newFolderName);
- SystemResourceManager.turnOnResourceEventListening();
- return folder;
- }
-
-
- /**
- * Create new folder
- */
- public boolean createFolder(IFolder folder)
- {
- boolean ok = true;
- try
- {
- SystemResourceManager.turnOffResourceEventListening();
- folder.create(true,true,null);
- SystemResourceManager.turnOnResourceEventListening();
- /*
- if (folder.getName().equals("Private"))
- {
- String msg = "Someone asked to create Private folder!";
- Exception e = new Exception(msg);
- e.fillInStackTrace();
- RSEUIPlugin.logError(msg, e);
- }
- */
- } catch (CoreException e)
- {
- SystemResourceManager.turnOnResourceEventListening();
- IStatus status = e.getStatus();
- if (status!=null)
- {
- int code = status.getCode();
- if (code != IResourceStatus.RESOURCE_EXISTS)
- {
- logException("error creating folder "+folder.getName(),e); //$NON-NLS-1$
- ok = false;
- }
- }
- }
- return ok;
- }
-
- /**
- * Delete a folder
- */
- public boolean deleteFolder(IFolder folder)
- throws Exception
- {
- // to ensure success, we force a refresh local action...
- refreshResource(folder);
- boolean existsInFileSystem = exists(folder);
- if (!existsInFileSystem)
- return true;
- boolean existsInWorkSpace = folder.exists();
- if (existsInFileSystem && !existsInWorkSpace)
- {
- logMessage("...deleteFolder error: folder "+folder.getLocation().toOSString()+" exists in file system but not in workspace! Cannot delete it."); //$NON-NLS-1$ //$NON-NLS-2$
- existsInWorkSpace = folder.exists(); // for debugging. set breakpoint here
- }
- boolean ok = true;
- //String name = folder.getName();
- SystemResourceManager.turnOffResourceEventListening();
- folder.delete(true,false,null); // force-yes, keep-history-no, no progress monitor
- SystemResourceManager.turnOnResourceEventListening();
- return ok;
- }
- /**
- * Rename a folder
- */
- public boolean renameFolder(IFolder folder, String newName)
- throws Exception
- {
- //System.out.println("inside renameFolder for "+folder.getFullPath() + ". exists? = " + folder.exists());
- if (!exists(folder))
- return true;
- boolean ok = true;
- IPath newPath = folder.getFullPath().removeLastSegments(1).append(newName);
- //System.out.println("new path = " + newPath.toOSString());
- try {
- SystemResourceManager.turnOffResourceEventListening();
- if (!newPath.toFile().exists())
- folder.move(newPath, true, false, null);
- SystemResourceManager.turnOnResourceEventListening();
- //System.out.println("...path after move = " + folder.getFullPath().toOSString());
- } catch (Exception exc)
- {
- SystemResourceManager.turnOnResourceEventListening();
- //exc.printStackTrace();
- throw exc;
- }
- return ok;
- }
- /**
- * Move a folder
- */
- public boolean moveFolder(IFolder newParent, IFolder folder)
- throws Exception
- {
- boolean ok = true;
- if (!exists(folder))
- return true;
- SystemResourceManager.turnOffResourceEventListening();
- folder.move(newParent.getFullPath().append(folder.getName()),true,false,null);
- SystemResourceManager.turnOnResourceEventListening();
- return ok;
- }
-
- /**
- * Return the path of the given folder
- */
- public String getFolderPath(IFolder folder)
- {
- return folder.getLocation().toOSString();
- }
-
- /**
- * Return a list of child folders in the given container
- * @param projectOrFolder The parent container to search.
- * @return an array of IFolder objects
- */
- public IFolder[] listFolders(IContainer projectOrFolder)
- {
- if (!projectOrFolder.exists())
- return (new IFolder[0]);
-
- SystemResourceManager.turnOffResourceEventListening();
-
- Vector folders = new Vector();
- try
- {
- IResource[] members = projectOrFolder.members();
- if (members != null)
- for (int idx=0; idx<members.length; idx++)
- if (members[idx].getType() == IResource.FOLDER)
- folders.addElement(members[idx]);
- } catch (Exception exc)
- {
- logException("Error retrieving folder list",exc); //$NON-NLS-1$
- }
-
- SystemResourceManager.turnOnResourceEventListening();
-
- return convertToFolderArray(folders);
- }
-
- /**
- * Return a list of child folders in the given container,
- * which contain a file of the given name.
- * @param projectOrFolder The parent container to search.
- * @param fileName The name of the file which must exist
- * in the folder in order to be included in the returned list
- * @return an array of IFolder objects
- */
- public IFolder[] listFolders(IContainer projectOrFolder, String fileName)
- {
- if (!exists(projectOrFolder))
- return (new IFolder[0]);
-
- SystemResourceManager.turnOffResourceEventListening();
-
- Vector folders = new Vector();
- // to ensure we get everything, we force a refresh local action...
- try {
- refreshResource(projectOrFolder);
- } catch (Exception exc) {}
- try
- {
- // ok, now we can query the children...
- IResource[] members = projectOrFolder.members();
- if (members != null)
- {
- for (int idx=0; idx<members.length; idx++)
- {
- if (members[idx].getType() == IResource.FOLDER)
- {
- if (exists(getFile((IFolder)members[idx], fileName)))
- folders.addElement(members[idx]);
- }
- }
- }
- } catch (Exception exc)
- {
- logException("Error retrieving folder list",exc); //$NON-NLS-1$
- }
-
- SystemResourceManager.turnOnResourceEventListening();
-
- return convertToFolderArray(folders);
- }
-
- /**
- * Return a list of names of folders in the given container
- * @param folder The folder to query
- * @param namePrefix Optional prefix all names should match. Can be null.
- * @param nameSuffix Optional suffix all names should match. Can be null.
- */
- public String[] listFolders(IFolder folder, String namePrefix, String nameSuffix)
- {
- setListValues(false, true, namePrefix, nameSuffix);
- if (!folder.exists())
- {
- return new String[0];
- }
-
- File dirFile = new File(folder.getLocation().toOSString());
- //String[] folders = dirFile.listFiles(this);
- File[] fileObjs = dirFile.listFiles(this);
- String[] folders = null;
- if (fileObjs != null)
- {
- folders = new String[fileObjs.length];
- for (int idx=0; idx<folders.length; idx++)
- folders[idx] = fileObjs[idx].getName();
- }
- else
- folders = new String[0];
- return folders;
- }
-
- // ------------------------
- // FILE SPECIFIC METHODS...
- // ------------------------
-
- /**
- * Get a file whose parent is either a project or a folder
- */
- public IFile getFile(IContainer parent, String fileName)
- {
- IFile file = null;
-
- SystemResourceManager.turnOffResourceEventListening();
-
- if (parent instanceof IProject)
- file = ((IProject)parent).getFile(fileName);
- else
- file = ((IFolder)parent).getFile(fileName);
-
- SystemResourceManager.turnOnResourceEventListening();
-
- return file;
- }
- /**
- * Check if a file exists in the file system.
- * For some reason, the exists() method of IFile cannot be trusted to
- * report actual file system existence.
- */
- public boolean fileExists(IFile file)
- {
- String fileLocation = file.getLocation().toOSString();
- //System.out.println("File name = "+file.getName()+" File location = " + fileLocation);
- return (new File(fileLocation)).exists();
- }
-
- /**
- * Delete a file
- */
- public boolean deleteFile(IFile file)
- throws Exception
- {
- SystemResourceManager.turnOffResourceEventListening();
- // to ensure success, we force a refresh local action...
- try {
- file.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception exc) {}
-
- boolean ok = true;
- file.delete(true,false,null); // force-yes, keep-history-no, no progress monitor
- SystemResourceManager.turnOnResourceEventListening();
- return ok;
- }
- /**
- * Rename a file
- * @param newName - the name name for the file, unqualified!
- */
- public boolean renameFile(IFile file, String newName)
- throws Exception
- {
- boolean ok = true;
- IPath newPath = file.getFullPath().removeLastSegments(1).append(newName);
- SystemResourceManager.turnOffResourceEventListening();
- // to ensure success, we force a refresh local action...
- try {
- file.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception exc) {}
- try {
- file.move(newPath, true, false, null); // path, force, keep-history, progress monitor
- } catch (Exception exc)
- {
- SystemResourceManager.turnOnResourceEventListening();
- throw exc;
- }
- SystemResourceManager.turnOnResourceEventListening();
- return ok;
- }
- /**
- * Move a file
- */
- public boolean moveFile(IFolder newParent, IFile file)
- throws Exception
- {
- boolean ok = true;
- SystemResourceManager.turnOffResourceEventListening();
- // to ensure success, we force a refresh local action...
- try {
- file.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception exc) {}
- try
- {
- file.move(newParent.getFullPath().append(file.getName()),true,false,null);
- } catch (Exception exc)
- {
- SystemResourceManager.turnOnResourceEventListening();
- throw exc;
- }
- SystemResourceManager.turnOnResourceEventListening();
- return ok;
- }
-
- /**
- * Return the path of the given file
- */
- public static String getFilePath(IFile file)
- {
- return file.getLocation().toOSString();
- }
-
-
-
- /**
- * Return a list of child files in the given container
- * @param projectOrFolder The parent container to search.
- * @return an array of IFile objects
- */
- public IFile[] listFiles(IContainer projectOrFolder)
- {
- if (!exists(projectOrFolder))
- return (new IFile[0]);
-
- SystemResourceManager.turnOffResourceEventListening();
-
- Vector files = new Vector();
- // to ensure we get everything, we force a refresh local action...
- try {
- refreshResource(projectOrFolder);
- } catch (Exception exc) {}
- try
- {
- IResource[] members = projectOrFolder.members();
- if (members != null)
- for (int idx=0; idx<members.length; idx++)
- if (members[idx].getType() == IResource.FILE)
- files.addElement(members[idx]);
- } catch (Exception exc)
- {
- logException("Error retrieving file list",exc); //$NON-NLS-1$
- }
-
- SystemResourceManager.turnOnResourceEventListening();
- return convertToFileArray(files);
- }
-
- /**
- * Return a list of names of files in the given container
- * @param folder The folder to query
- * @param namePrefix Optional prefix all names should match. Can be null.
- * @param nameSuffix Optional suffix all names should match. Can be null.
- */
- public String[] listFiles(IFolder folder, String namePrefix, String nameSuffix)
- {
- setListValues(true, false, namePrefix, nameSuffix);
- File dirFile = new File(folder.getLocation().toOSString());
- //String[] files = dirFile.list(this);
- File[] fileObjs = dirFile.listFiles(this);
- String[] files = null;
- if (fileObjs != null)
- {
- files = new String[fileObjs.length];
- for (int idx=0; idx<files.length; idx++)
- files[idx] = fileObjs[idx].getName();
- }
- else
- files = new String[0];
- return files;
- }
-
- // ------------------------
- // UTILITY METHODS...
- // ------------------------
-
- /**
- * Convert a vector of IFolder objects to an array of IFolder.
- * Result is only null if input is null.
- */
- public IFolder[] convertToFolderArray(Vector vector)
- {
- if (vector == null)
- return null;
- IFolder[] folders = new IFolder[vector.size()];
- for (int idx=0; idx<vector.size(); idx++)
- folders[idx] = (IFolder)vector.elementAt(idx);
- return folders;
- }
- /**
- * Convert a vector of IFile objects to an array of IFile.
- * Result is only null if input is null.
- */
- public IFile[] convertToFileArray(Vector vector)
- {
- if (vector == null)
- return null;
- IFile[] files = new IFile[vector.size()];
- for (int idx=0; idx<vector.size(); idx++)
- files[idx] = (IFile)vector.elementAt(idx);
- return files;
- }
-
- /**
- * Convert a name array to a vector. If array is null or empty, an empty vector is returned.
- */
- public Vector convertToVector(String[] array)
- {
- Vector v = new Vector();
- if (array != null)
- for (int idx=0; idx<array.length; idx++)
- v.addElement(array[idx]);
- return v;
- }
- /**
- * Convert a name array to a vector. As each name is copied
- * to the vector, its prefix and suffix are stripped off.
- * If array is null or empty, an empty vector is returned.
- */
- public Vector convertToVectorAndStrip(String[] array, String namePrefix, String nameSuffix)
- {
- Vector v = new Vector();
- if (array != null)
- for (int idx=0; idx<array.length; idx++)
- {
- String name = array[idx];
- if (namePrefix != null)
- name = name.substring(namePrefix.length());
- if (nameSuffix != null)
- name = name.substring(0,name.lastIndexOf(nameSuffix));
- v.addElement(name);
- }
- return v;
- }
-
- // ------------------------
- // INTERNAL METHODS...
- // ------------------------
-
- /**
- * Method to set variables to affect the folder content subsetting
- */
- public void setListValues(boolean filesOnly, boolean foldersOnly, String namePrefix, String nameSuffix)
- {
- this.filesOnly = filesOnly;
- this.foldersOnly = foldersOnly;
- this.namePrefix = namePrefix;
- this.nameSuffix = nameSuffix;
- }
-
- /**
- * Method required by FilenameFilter interface, used by java.io.File.list()
- */
- //public boolean accept(File file, String name)
- public boolean accept(File file)
- {
- boolean match = true;
- if (filesOnly)
- {
- if (!file.isFile())
- return false;
- }
- else if (foldersOnly)
- {
- if (!file.isDirectory())
- return false;
- }
- String name = file.getName();
- if (nameSuffix != null)
- {
- if (!name.endsWith(nameSuffix))
- return false;
- }
- if (namePrefix != null)
- {
- if (!name.startsWith(namePrefix))
- return false;
- }
- return match;
- }
-
- public void logMessage(String msg)
- {
- SystemBasePlugin.logWarning(msg);
- }
- public void logException(String msg, Exception exc)
- {
- SystemBasePlugin.logError(msg, exc);
- }
-
-
- /**
- * For some reason the exists() method on IResource is fundamentally not reliable.
- * Because of this, we resort to the looking ourselves at the file system.
- */
- public boolean exists(IResource resource)
- {
- // DKM - doing a refresh while in a wizard causes stack overflow
- // defect #57739
- // I think this is an unnecessary step since in most cases the resource will
- // already exist.
- if (resource.exists())
- {
- return true;
- }
-
- // it appears the serious reliability problems are due to out of synch problems.
- // so, I have decided to do a refresh and see if that is cheaper than creating
- // hundreds of these java.io.File objects for every touch of every resource... phil. 10/21/2002.
- refreshResourceShallow(resource);
- return resource.exists();
- /*
- IPath localOSLocation = resource.getLocation();
- if (localOSLocation == null)
- return true; // what else?
- File osFile = new File(localOSLocation.toOSString());
- return osFile.exists();
- */
- }
-
-
-} \ No newline at end of file
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
deleted file mode 100644
index 4621646db..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceListener.java
+++ /dev/null
@@ -1,808 +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 java.util.Vector;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.rse.core.model.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.model.SystemModelChangeEvent;
-import org.eclipse.rse.model.SystemRegistry;
-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;
-import org.eclipse.rse.ui.view.team.SystemTeamViewPart;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * This class manages listening for resource changes within our project.
- * Normally, we do not care about such changes. However, after a team synchronize,
- * we do.
- */
-public class SystemResourceListener implements IResourceChangeListener, Runnable
-{
- private boolean debug = true;
- private boolean fullDebug = debug && true;
- private static SystemResourceListener inst = null;
- private IProject remoteSystemsProject = null;
- private boolean ignoreEvents = true;
- ;
- private boolean ensureEventsOnMode = false;
- private boolean sawSyncEvent = false;
- private boolean changesPending = false;
- private int addRmvListenerCount;
- private Vector listeners;
- private IWorkbenchPage primaryRSEPerspective = null;
- private IViewPart[] primaryRSEViews = null;
-
- private int runAction = 0;
- private static final int CLOSE_PERSPECTIVES = 1;
- private static final int CLOSE_EDITORS = 2;
- private static final int CLOSE_VIEWS = 3;
- private static final int RSE_RESTART = 4;
- private static final int OPEN_VIEWS = 5;
- private static final int FIRE_EVENT = 99;
-
- SystemResourceListener(IProject remoteSystemsProject)
- {
- this.remoteSystemsProject = remoteSystemsProject;
- }
-
- /**
- * Return singleton
- */
- public static SystemResourceListener getListener(IProject remoteSystemsProject)
- {
- if (inst == null)
- inst = new SystemResourceListener(remoteSystemsProject);
- return inst;
- }
-
- /**
- * Register a listener for resource change events on objects in our remote system project.
- * No attempt is made to filter the events, they are simply passed on and the listener can
- * decide if the event applies to them or not.
- * <p>
- * However, the event will only be fired if a change is made to that resource outside of the
- * normal activities of the Remote Systems Framework, and only for resources within the
- * Remote Systems Connection project.
- */
- public void addResourceChangeListener(IResourceChangeListener l)
- {
- if (listeners == null)
- {
- listeners = new Vector();
- listeners.add(l);
- }
- else if (!listeners.contains(l))
- listeners.add(l);
- }
- /**
- * Remove a listener for resource change events on object in our remote system project.
- */
- public void removeResourceChangeListener(IResourceChangeListener l)
- {
- if ((listeners!=null) && listeners.contains(l))
- listeners.remove(l);
- }
-
- /**
- * Turn off event listening. Please call this before do anything that modifies resources and
- * turn it on again after.
- */
- public void turnOffResourceEventListening()
- {
- // Always turn off, even though may already be off, if nested block
-
- ignoreEvents = true;
-
- //remoteSystemsProject.getWorkspace().removeResourceChangeListener(listener);
-
- --addRmvListenerCount;
-
- // May have nested blocks of turnOff/ turnOn calls,
- // so don't want to issue this warning.
-
- //if (addRmvListenerCount != 0)
-
- // Safeguard: Dont expect many levels of nesting. Diagnose.
-
- // 1 nested level for now??
-
- if (addRmvListenerCount < -1)
- SystemBasePlugin.logWarning("LISTENER TURNED OFF OUT-OF-SEQUENCE ERROR: " + addRmvListenerCount); //$NON-NLS-1$
- }
-
- /**
- * Turn off event listening. Please call this after modifying resources.
- */
- public void turnOnResourceEventListening()
- {
-
- // May have nested blocks of turnOff/ turnOn calls.
- // Normally, expect (addRmvListenerCount) to equal 1 before it is turned Off,
- // then equal 0 when off. But may go below zero if nested off/on's occur.
-
- ++addRmvListenerCount;
-
- if (addRmvListenerCount > 0)
- {
-
- ignoreEvents = false;
- sawSyncEvent = false;
- //remoteSystemsProject.getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.POST_AUTO_BUILD);
-
- if (addRmvListenerCount != 1)
- SystemBasePlugin.logWarning("LISTENER TURNED ON OUT-OF-SEQUENCE ERROR: " + addRmvListenerCount); //$NON-NLS-1$
- }
-
- }
-
- /**
- * Ensure event listening is on. Called at start of team synch action to be safe.
- */
- public void ensureOnResourceEventListening()
- {
- SystemBasePlugin.logInfo("INSIDE ENSUREONRESOURCEEVENTLISTENING"); //$NON-NLS-1$
- if (ignoreEvents)
- {
- SystemBasePlugin.logWarning("RESOURCE LISTENER WAS TURNED OFF. IT WAS FORCED ON"); //$NON-NLS-1$
- turnOnResourceEventListening();
- }
- ensureEventsOnMode = true; // we can add debug statements conditioned by this so we don't stop until team synch action is run
- }
-
- /**
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event)
- {
- Object source = event.getSource();
- if (ignoreEvents || !(event.getSource() instanceof IWorkspace))
- {
- return;
- }
-
- if (fullDebug)
- {
- int type = event.getType();
- String sType = getTypeString(type);
- SystemBasePlugin.logInfo("RESOURCE CHANGED EVENT: eventType=" + sType + ", eventSource=" + event.getSource()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (ensureEventsOnMode)
- {
- ensureEventsOnMode = true; // set breakpoint here
- }
-
- IResource resource = event.getResource();
- IResourceDelta delta = event.getDelta();
- if ((resource == null) && (delta != null))
- resource = delta.getResource();
-
- // ATTEMPT TO FILTER OUT UNWANTED EVENTS...
- if (resource != null)
- {
- if (resource.getProject() != null)
- {
- if (!resource.getProject().getName().equals(remoteSystemsProject.getName()))
- {
- if (fullDebug)
- SystemBasePlugin.logInfo("EVENT FILTERED OUT BY PROJECT NAME"); //$NON-NLS-1$
- return;
- }
- }
- else if (resource.getType() == IResource.PROJECT)
- {
- if (!resource.getName().equals(remoteSystemsProject.getName()))
- {
- if (fullDebug)
- SystemBasePlugin.logInfo("EVENT FILTERED OUT BY PROJECT NAME"); //$NON-NLS-1$
- return;
- }
- try
- {
- if (!(((IProject) resource).hasNature(RemoteSystemsProject.ID)))
- {
- if (fullDebug)
- SystemBasePlugin.logInfo("EVENT FILTERED OUT BY PROJECT NATURE"); //$NON-NLS-1$
- return;
- }
- }
- catch (Exception exc)
- {
- }
- }
- //else
- // RSEUIPlugin.logWarning("IN RESOURCeListener, RESOURCE AND PROJECT ARE NULL, UNABLE TO FILTER THE EVENT");
- }
- else
- {
- //if (resource == null)
- // RSEUIPlugin.logWarning("IN RESOURCeListener, RESOURCE IS NULL, UNABLE TO FILTER THE EVENT");
- }
-
- if (delta != null)
- {
- if (preScanForIgnore(delta))
- {
- if (fullDebug)
- SystemBasePlugin.logInfo("EVENT FILTERED OUT IN PRESCAN"); //$NON-NLS-1$
- return;
- }
- }
-
- if (fullDebug)
- {
- SystemBasePlugin.logInfo("*** RESOURCE CHANGE EVENT ALLOWED IN ***"); //$NON-NLS-1$
- //(new Exception("Stack Trace")).fillInStackTrace().printStackTrace();
- }
-
- /*
- Exception exc = new Exception("Stack Trace");
- exc.fillInStackTrace();
- exc.printStackTrace();
- */
-
- if (debug)
- {
- int type = event.getType();
- String sType = getTypeString(type);
- if (!fullDebug)
- SystemBasePlugin.logInfo("RESOURCE CHANGED EVENT: eventType=" + sType + ", eventSource=" + source); //$NON-NLS-1$ //$NON-NLS-2$
- //RSEUIPlugin.logInfo("RESOURCE DELTA:"); //$NON-NLS-1$
- }
- boolean ignored = false;
- if (delta != null)
- {
- //previousResource = null;
- //ignored = !processDelta("", delta); //$NON-NLS-1$
-
- // OK, LET'S DO IT!
- if (sawSyncEvent)
- {
- sawSyncEvent = false;
- // code to reload moved to reloadRSE() method. Must be called explicitly now!
- }
- changesPending = true;
- }
- if (!ignored)
- {
- fireResourceChangeEvent(event);
- }
- }
-
- /**
- * Fire resource change events to interested listeners.
- * This is simply a propogation of the eclipse resource event, once we know it applies to us.
- */
- protected void fireResourceChangeEvent(IResourceChangeEvent event)
- {
- if (listeners == null)
- return;
- // inform all listeners...
- for (int idx = 0; idx < listeners.size(); idx++)
- {
- IResourceChangeListener l = (IResourceChangeListener) listeners.elementAt(idx);
- l.resourceChanged(event);
- }
- }
-
- /**
- * Prescan for unrelated events.
- * @return true if event filtered out
- */
- protected boolean preScanForIgnore(IResourceDelta delta)
- {
- if (delta == null)
- return true; // not sure when we'd get this
- IResourceDelta[] subdeltas = delta.getAffectedChildren();
- if (subdeltas.length > 0)
- {
- IResource resource = subdeltas[0].getResource();
- int resType = 0;
- if (resource != null)
- resType = resource.getType();
- int flags = subdeltas[0].getFlags();
- if (debug)
- {
- if (debug)
- SystemBasePlugin.logInfo("...In preScanForIgnore. Kind = "+getKindString(delta.getKind())); //$NON-NLS-1$
- if (resource == null)
- SystemBasePlugin.logInfo("......resource is null"); //$NON-NLS-1$
- else
- SystemBasePlugin.logInfo("......resource is: "+resource.getName() + ", type is: " + getResourceTypeString(resType)); //$NON-NLS-1$ //$NON-NLS-2$
- if (flags == IResourceDelta.SYNC)
- SystemBasePlugin.logInfo("......flags == SYNC"); //$NON-NLS-1$
- else
- SystemBasePlugin.logInfo("......flags == "+flags); //$NON-NLS-1$
- }
-
- if (flags == IResourceDelta.SYNC) // apparently we no longer get this in 2.0!
- {
- sawSyncEvent = true;
- return true;
- }
- if ((resource !=null) && (resType == IResource.ROOT))
- return true; // someone created a new project?
- if ((resource != null) && (resType == IResource.PROJECT))
- {
- if (!resource.getName().equals(remoteSystemsProject.getName()))
- return true;
- try
- {
- if (!(((IProject) resource).hasNature(RemoteSystemsProject.ID)))
- return true;
- }
- catch (Exception exc)
- {
- System.out.println("Exception trying to test the natures of the project that fired a resource change event"); //$NON-NLS-1$
- }
- }
- }
- return false;
- }
-
- private String getResourceTypeString(int type)
- {
- switch (type)
- {
- case IResource.ROOT : return "root"; //$NON-NLS-1$
- case IResource.PROJECT : return "project"; //$NON-NLS-1$
- case IResource.FOLDER : return "folder"; //$NON-NLS-1$
- case IResource.FILE : return "file"; //$NON-NLS-1$
- }
- return "unknown: "+Integer.toString(type); //$NON-NLS-1$
- }
-
- /**
- * Process all deltas
- * CURRENTLY NOT USED. WILL FLESH OUT IN A FUTURE RELEASE AND TRY TO AVOID THE ATOM BOMB APPROACH WE TAKE NOW
- */
- protected boolean processDelta(String indent, IResourceDelta delta)
- {
- int kind = delta.getKind();
- int flags = delta.getFlags();
- if ((kind == IResourceDelta.CHANGED) && (flags == IResourceDelta.SYNC))
- return false;
- boolean processKids = true;
- IResource resource = delta.getResource();
- String kindString = null;
- String pre = null;
- if (debug)
- {
- kindString = getKindString(kind);
- pre = kindString + ": " + indent; //$NON-NLS-1$
- SystemBasePlugin.logInfo(pre + delta + ": flags: " + getKindString(flags)); //$NON-NLS-1$
- }
- if (resource == null)
- return true;
- int resourceType = resource.getType();
- switch (kind)
- {
- case IResourceDelta.ADDED :
- break;
- case IResourceDelta.CHANGED :
- if (debug)
- SystemBasePlugin.logInfo(pre + "resource type: " + resourceType); //$NON-NLS-1$
- if (resourceType == IResource.PROJECT)
- {
- try
- {
- if (!(((IProject) resource).hasNature(RemoteSystemsProject.ID)))
- {
- if (debug)
- SystemBasePlugin.logInfo("EVENT DELTA FILTERED OUT BY PROJECT NATURE"); //$NON-NLS-1$
- return false;
- }
- }
- catch (Exception exc)
- {
- }
- }
- break;
- case IResourceDelta.CONTENT :
- case IResourceDelta.REPLACED :
- break;
- case IResourceDelta.REMOVED :
- break;
- default :
- if (debug)
- SystemBasePlugin.logInfo(kindString + " DELTA IGNORED"); //$NON-NLS-1$
- }
- boolean stop = false;
- if (processKids)
- {
- IResourceDelta[] subdeltas = delta.getAffectedChildren();
- for (int i = 0; !stop && (i < subdeltas.length); i++)
- stop = !processDelta(indent + " ", subdeltas[i]); //$NON-NLS-1$
- }
- return !stop;
- }
-
- public static String getKindString(int kind)
- {
- String kindString = "Unknown: " + Integer.toString(kind); //$NON-NLS-1$
- switch (kind)
- {
- case IResourceDelta.ADDED :
- kindString = "ADDED"; //$NON-NLS-1$
- break;
- case IResourceDelta.ADDED_PHANTOM :
- kindString = "ADDED_PHANTOM"; //$NON-NLS-1$
- break;
- case IResourceDelta.ALL_WITH_PHANTOMS :
- kindString = "ALL_WITH_PHANTOMS"; //$NON-NLS-1$
- break;
- case IResourceDelta.CHANGED :
- kindString = "CHANGED"; //$NON-NLS-1$
- break;
- case IResourceDelta.CONTENT :
- kindString = "CONTENT"; //$NON-NLS-1$
- break;
- case IResourceDelta.DESCRIPTION :
- kindString = "DESCRIPTION"; //$NON-NLS-1$
- break;
- case IResourceDelta.MARKERS :
- kindString = "ADDED"; //$NON-NLS-1$
- break;
- case IResourceDelta.MOVED_FROM :
- kindString = "MOVED_FROM"; //$NON-NLS-1$
- break;
- case IResourceDelta.MOVED_TO :
- kindString = "MOVED_TO"; //$NON-NLS-1$
- break;
- case IResourceDelta.NO_CHANGE :
- kindString = "NO_CHANGE"; //$NON-NLS-1$
- break;
- case IResourceDelta.OPEN :
- kindString = "OPEN"; //$NON-NLS-1$
- break;
- case IResourceDelta.REMOVED :
- kindString = "REMOVED"; //$NON-NLS-1$
- break;
- case IResourceDelta.REMOVED_PHANTOM :
- kindString = "REMOVED_PHANTOM"; //$NON-NLS-1$
- break;
- case IResourceDelta.REPLACED :
- kindString = "REPLACED"; //$NON-NLS-1$
- break;
- case IResourceDelta.SYNC :
- kindString = "SYNC"; //$NON-NLS-1$
- break;
- case IResourceDelta.TYPE :
- kindString = "TYPE"; //$NON-NLS-1$
- break;
- }
- return kindString;
- }
-
- public static String getTypeString(int type)
- {
- String typeString = "Unknown: " + Integer.toString(type); //$NON-NLS-1$
- switch (type)
- {
- case IResourceChangeEvent.POST_CHANGE :
- typeString = "POST_CHANGE"; //$NON-NLS-1$
- break;
- case IResourceChangeEvent.POST_BUILD:
- typeString = "POST_BUILD"; //$NON-NLS-1$
- break;
- case IResourceChangeEvent.PRE_DELETE :
- typeString = "PRE_DELETE"; //$NON-NLS-1$
- break;
- case IResourceChangeEvent.PRE_CLOSE :
- typeString = "PRE_CLOSE"; //$NON-NLS-1$
- break;
- case IResourceChangeEvent.PRE_BUILD :
- typeString = "PRE_BUILD"; //$NON-NLS-1$
- break;
- }
- return typeString;
- }
-
- /**
- * Close all non-primary system view perspectives
- */
- private void closeRSEPerspectives()
- {
- primaryRSEPerspective = null;
- primaryRSEViews = null;
- IWorkbenchPage[] rsePages = getRSEPerspectives();
- IWorkbench wb = PlatformUI.getWorkbench();
- if (wb == null)
- SystemBasePlugin.logInfo("PlatformUI.getWorkbench() returned null!!"); //$NON-NLS-1$
- else
- {
- IWorkbenchWindow wbw = wb.getActiveWorkbenchWindow();
- if (wbw == null)
- SystemBasePlugin.logInfo("Active workbench window is null"); //$NON-NLS-1$
- if ((primaryRSEPerspective != null) && (wbw != null) && (wbw.getActivePage() != primaryRSEPerspective))
- wbw.setActivePage(primaryRSEPerspective);
- }
- // close non-primary rse perspectives...
- if ((rsePages != null) && (rsePages.length > 0))
- {
- for (int idx = 0; idx < rsePages.length; idx++)
- {
- IWorkbenchPage rsePage = rsePages[idx];
- rsePage.close();
- }
- }
- // for primary rse perspective...
- if (primaryRSEPerspective != null)
- {
- Vector v = new Vector();
- IViewReference[] views = primaryRSEPerspective.getViewReferences();
- // scan for, and record, all non SystemView views
- if (views != null)
- {
- for (int idx = 0; idx < views.length; idx++)
- if (!(views[idx].getView(false) instanceof SystemViewPart) &&
- !(views[idx].getView(false) instanceof SystemTeamViewPart))
- v.addElement(views[idx].getView(false));
- }
- primaryRSEViews = new IViewPart[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- primaryRSEViews[idx] = (IViewPart) v.elementAt(idx);
- // ok, now we have those secondary views... what to do with them??
- }
- }
-
- /**
- * Return primary RSE View
- */
- private SystemView getRSEView()
- {
- return SystemPerspectiveHelpers.findRSEView();
- /*
- SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow[] wbWindows = wb.getWorkbenchWindows();
- for (int idx = 0; idx < wbWindows.length; idx++)
- {
- IWorkbenchPage[] pages = wbWindows[idx].getPages();
- if (pages != null)
- for (int jdx = 0; jdx < pages.length; jdx++)
- if ((pages[jdx].getPerspective().getId().equals(SystemPerspectiveLayout.ID)))
- {
- SystemView sv = getSystemView(pages[jdx]);
- if ((sv != null) && (sv.getInput() == sr))
- return sv;
- }
- }
- return null;
- */
- }
-
- /**
- * Find all Remote System Explorer perspectives
- * @return an array of all non-primary RSE perspectives, plus primaryRSEPerpsective set for the primary one.
- */
- private IWorkbenchPage[] getRSEPerspectives()
- {
- ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow[] wbWindows = wb.getWorkbenchWindows();
- Vector v = new Vector();
- for (int idx = 0; idx < wbWindows.length; idx++)
- {
- IWorkbenchPage[] pages = wbWindows[idx].getPages();
- if (pages != null)
- for (int jdx = 0; jdx < pages.length; jdx++)
- if ((pages[jdx].getPerspective().getId().equals(SystemPerspectiveLayout.ID)))
- {
- SystemView sv = getSystemView(pages[jdx]);
- if ((sv != null) && !(sv.getInput() == sr)) // not the primary perspective
- v.addElement(pages[jdx]);
- else if (sv != null)
- primaryRSEPerspective = pages[jdx];
- }
- }
- IWorkbenchPage[] ourPages = new IWorkbenchPage[v.size()];
- for (int idx = 0; idx < ourPages.length; idx++)
- ourPages[idx] = (IWorkbenchPage) v.elementAt(idx);
- return ourPages;
- }
-
- /**
- * Get RSE view for a given perspective page
- */
- private SystemView getSystemView(IWorkbenchPage page)
- {
- IViewReference[] views = page.getViewReferences();
- if (views != null)
- for (int idx = 0; idx < views.length; idx++)
- if (views[idx].getView(false) instanceof SystemViewPart)
- return ((SystemViewPart) views[idx].getView(false)).getSystemView();
- return null;
- }
-
- /**
- * IRunnable run method
- */
- public void run()
- {
- if (runAction == CLOSE_PERSPECTIVES)
- {
- closeRSEPerspectives();
- }
- else if (runAction == CLOSE_EDITORS)
- {
- closeEditors();
- }
- else if (runAction == CLOSE_VIEWS)
- {
- closeViews();
- }
- else if (runAction == RSE_RESTART)
- {
- RSEUIPlugin.getDefault().restart();
- }
- else if (runAction == OPEN_VIEWS)
- {
- openViews();
- }
- else if (runAction == FIRE_EVENT)
- {
- ((SystemRegistry)RSEUIPlugin.getTheSystemRegistry()).fireEvent(
- new SystemModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ALL_RELOADED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_ALL, "dummy")); //$NON-NLS-1$
- }
-
- }
-
- /**
- * Close active editors in RSE views. You may prompt the user to save or discard pending changes, but
- * you cannot cancel the operation... the editor must be closed one way or the other.
- */
- protected void closeEditors()
- {
- // todo
- }
-
- /**
- * Close active view in RSE perspective. You may either close the view or set its input to null, whichever is
- * appropriate. This is called prior to refreshing from disk. If you close the view, sets its array entry to null.
- */
- protected void closeViews()
- {
- // close views in primary RSE perspective
- if (primaryRSEViews != null)
- {
- for (int idx = 0; idx < primaryRSEViews.length; idx++)
- {
- }
- }
- }
- /**
- * Open views in RSE perspective. You may either close the view or set its input to null, whichever is
- * appropriate. This is called prior to refreshing from disk.
- */
- protected void openViews()
- {
- // re-open views in primary RSE perspective
- if (primaryRSEViews != null)
- {
- for (int idx = 0; idx < primaryRSEViews.length; idx++)
- {
- if (primaryRSEViews[idx] != null)
- {
- }
- }
- }
-
- }
-
- /**
- * Return true if changes are pending and hence a reloadRSE is in order
- */
- public static boolean changesPending()
- {
- SystemResourceListener us = null;
- if (inst == null)
- us = getListener(SystemResourceManager.getRemoteSystemsProject());
- else
- us = inst;
-
- return us.changesPending;
- }
-
- /**
- * Re-load the whole RSE from the workspace. This is to be called after a team-sync, say
- */
- public static void reloadRSE()
- {
- SystemResourceListener us = null;
- if (inst == null)
- us = getListener(SystemResourceManager.getRemoteSystemsProject());
- else
- us = inst;
-
- Display d = Display.getCurrent();
- if (d == null)
- d = Display.getDefault();
- if (d == null)
- {
- SystemBasePlugin.logInfo("Hmm, can't get the display"); //$NON-NLS-1$
- SystemView sv = us.getRSEView();
- if (sv != null)
- d = sv.getShell().getDisplay();
- else
- SystemBasePlugin.logInfo("Hmm, really can't get the display"); //$NON-NLS-1$
- }
-
- // here is the idea:
- // 0. Close all open editors. Currently a no-op
- // 1. Close all non-primary RSE perspectives
- // -- For the primary (last one found with SystemRegistry as the input) RSE perspective, leave it open
- // 2. Close all non-primary views from the primary RSE perspective. Currently, a no-op
- // 3. Reload the world!
- // 4. Re-open non-primary views in primary RSE perspective. Currently a no-op
- // 5. Give model change listeners (eg, views) an opportunity to re-load themselves if they need to
-
- us.runAction = CLOSE_EDITORS;
- if (d != null)
- d.syncExec(us);
- else
- us.run();
-
- us.runAction = CLOSE_PERSPECTIVES;
- if (d != null)
- d.syncExec(us);
- else
- us.run();
-
- us.runAction = CLOSE_VIEWS;
- if (d != null)
- d.syncExec(us);
- else
- us.run();
-
- us.runAction = RSE_RESTART;
- if (d != null)
- d.syncExec(us);
- else
- us.run();
-
- us.runAction = OPEN_VIEWS;
- if (d != null)
- d.syncExec(us);
- else
- us.run();
-
- us.changesPending = false;
-
- us.runAction = FIRE_EVENT;
- if (d != null)
- d.syncExec(us);
- else
- us.run();
- }
-
-} \ No newline at end of file
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
deleted file mode 100644
index d7fe9f83d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceManager.java
+++ /dev/null
@@ -1,581 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core;
-
-import java.io.File;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemHostPool;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.model.SystemProfileManager;
-
-
-/**
- * Static methods that manage the workbench resource tree for the remote systems project.
- * All code in the framework uses this to access the file system for save/restore purposes.
- * By limiting all access to one place, we simply changes should we decide to change the
- * underlying file system map.
- * <p>
- * <b>Assumptions</b>
- * <ul>
- * <li>Each SystemConnectionPool object manages the connections for a given system profile
- * <li>Each SystemFilterPoolManager object manages the filter pools for a given subsystem factory,
- * for a given system profile!
- * <li>Each SystemFilterPool object is an arbitrary named collection of filters all stored
- * in one folder on disk with the same name as the pool.
- * </ul>
- * <p>
- */
-public class SystemResourceManager implements SystemResourceConstants
-{
-
- private static IProject remoteSystemsProject = null;
- private static IProject remoteSystemsTempFilesProject = null;
- private static boolean initDone = false;
- private static boolean firstTime = false;
- private static SystemResourceHelpers helpers = null;
-
- private static SystemResourceListener listener = null;
-
- /**
- * Turn off event listening. Please call this before do anything that modifies resources and
- * turn it on again after.
- */
- public static void turnOffResourceEventListening()
- {
- if (listener != null)
- listener.turnOffResourceEventListening();
- }
-
- /**
- * Turn off event listening. Please call this after modifying resources.
- */
- public static void turnOnResourceEventListening()
- {
- if (listener != null)
- listener.turnOnResourceEventListening();
- }
- /**
- * Ensure event listening is on. Called at start of team synch action to be safe.
- */
- public static void ensureOnResourceEventListening()
- {
- if (listener != null)
- listener.ensureOnResourceEventListening();
- }
-
- /**
- * Start event listening. Requests to turn on and off are ignored until this is called,
- * which is at the appropriate point in the startup sequence.
- */
- public static void startResourceEventListening()
- {
- listener = SystemResourceListener.getListener(remoteSystemsProject);
- listener.turnOnResourceEventListening();
-
-
- IWorkspace ws = remoteSystemsProject.getWorkspace();
- int eventMask = IResourceChangeEvent.POST_CHANGE;
-
- // add listener for global events ;
- ws.addResourceChangeListener(listener, eventMask);
- }
- /**
- * End event listening. Requests to turn on and off are ignored after this is called,
- * which is at the appropriate point in the shutdown sequence.
- */
- public static void endResourceEventListening()
- {
- if (listener != null)
- {
- IWorkspace ws = remoteSystemsProject.getWorkspace();
- ws.removeResourceChangeListener(listener);
- listener = null;
- }
- }
-
- /**
- * Register a listener for resource change events on objects in our remote system project.
- * No attempt is made to filter the events, they are simply passed on and the listener can
- * decide if the event applies to them or not.
- * <p>
- * However, the event will only be fired if a change is made to that resource outside of the
- * normal activities of the Remote Systems Framework, and only for resources within the
- * Remote Systems Connection project.
- */
- public static void addResourceChangeListener(IResourceChangeListener l)
- {
- if (listener != null)
- listener.addResourceChangeListener(l);
- }
- /**
- * Remove a listener for resource change events on an object in our remote system project.
- */
- public static void removeResourceChangeListener(IResourceChangeListener l)
- {
- if (listener != null)
- listener.removeResourceChangeListener(l);
- }
-
- /**
- * Get the default remote systems project.
- * @return IProject handle of the project. Use exists() to test existence.
- */
- public static IProject getRemoteSystemsProject()
- {
- if (remoteSystemsProject == null)
- {
- remoteSystemsProject = SystemBasePlugin.getWorkspaceRoot().getProject(RESOURCE_PROJECT_NAME);
- if (!initDone)
- remoteSystemsProject = createRemoteSystemsProjectInternal(remoteSystemsProject);
- }
- return remoteSystemsProject;
- }
-
- /**
- * Get the default remote systems temp files project.
- * @return IProject handle of the project. Use exists() to test existence.
- */
- public static IProject getRemoteSystemsTempFilesProject()
- {
- if (remoteSystemsTempFilesProject == null)
- {
- remoteSystemsTempFilesProject = SystemBasePlugin.getWorkspaceRoot().getProject(RESOURCE_TEMPFILES_PROJECT_NAME);
- }
- return remoteSystemsTempFilesProject;
- }
- /**
- * Create a remote systems project, plus the core subfolders required.
- * @return IProject handle of the project.
- */
- protected static IProject createRemoteSystemsProjectInternal(IProject proj)
- //throws Exception
- {
- if (!proj.exists())
- {
- try {
- proj.create(null);
- proj.open(null);
- IProjectDescription description = proj.getDescription();
- String newNatures[] = {RemoteSystemsProject.ID};
- description.setNatureIds(newNatures);
- proj.setDescription(description, null);
- firstTime = true;
- } catch (Exception e)
- {
- SystemBasePlugin.logError("error creating remote systems project",e); //$NON-NLS-1$
- //throw e;
- }
- }
- else if (!proj.isOpen())
- {
- try {
- proj.open(null);
- } catch (Exception e)
- {
- SystemBasePlugin.logError("error opening remote systems project",e); //$NON-NLS-1$
- //throw e;
- }
- }
- try{
- // create types folder...
- IFolder folder = getResourceHelpers().getOrCreateFolder(proj,RESOURCE_TYPE_FILTERS_FOLDER_NAME);
- } catch (Exception e)
- {
- SystemBasePlugin.logError("error opening/creating types folder",e); //$NON-NLS-1$
- }
- initDone = true;
- return proj;
- }
- /**
- * Return true if we just created the remote systems project for the first time.
- * This call has the side effect of resetting the flag to false so it doesn't return
- * true more than once, ever.
- */
- public static boolean isFirstTime()
- {
- boolean firsttime = firstTime;
- firstTime = false;
- return firsttime;
- }
- // --------------------------------------------
- // GET ALL EXISTING PROFILE NAMES OR FOLDERS...
- // --------------------------------------------
- /**
- * Each root folder of the project is assumed to be a profile, if it has a file named profile.xmi
- */
- public static IFolder[] getProfileFolders()
- {
- IProject proj = getRemoteSystemsProject();
- IFolder[] allFolders = getResourceHelpers().listFolders(proj);
- //System.out.println("Inside getProfileFolders. allFolders.length = " + allFolders.length);
- Vector v = new Vector();
- for (int idx=0; idx<allFolders.length; idx++)
- {
- String saveFileName = SystemProfileManager.getSaveFileName(allFolders[idx].getName());
- IFile saveFile = getResourceHelpers().getFile(allFolders[idx], saveFileName);
- boolean saveFileExists = getResourceHelpers().fileExists(saveFile);
- //System.out.println("...folderName = " + allFolders[idx].getName());
- //System.out.println("...saveFileName = " + saveFileName);
- //System.out.println("...saveFile.exists() = " + saveFileExists);
- if (saveFileExists)
- v.addElement(allFolders[idx]);
- }
- return getResourceHelpers().convertToFolderArray(v);
- }
-
- /**
- * Guess the profile names by itemizing all the root folders, and
- * assuming any such folder that has a file in it named "profile.xmi" is
- * indeed a profile whose name equals the folder name.
- */
- public static String[] deduceProfileNames()
- {
- IFolder[] folders = getProfileFolders();
- String[] names = new String[folders.length];
- for (int idx=0; idx<names.length; idx++)
- names[idx] = folders[idx].getName();
- return names;
- }
-
- // -----------------------------------
- // GET A SPECIFIC PROFILE FOLDER...
- // -----------------------------------
- /**
- * Get profiles folder for a given profile
- */
- public static IFolder getProfileFolder(ISystemProfile profile)
- {
- return getProfileFolder(profile.getName());
- }
-
- /**
- * Get profiles folder for a given profile name
- */
- public static IFolder getProfileFolder(String profileName)
- {
- return getResourceHelpers().getOrCreateFolder(getRemoteSystemsProject(),profileName);
- }
-
-
-
-
- /*
- * --------------------------------------------------------------------------------------------------------------------------------
- * USER ACTIONS SUBTREE FOLDER METHODS...
- * ======================================
- * .--- Team (folder) - getProfileFolder(SystemProfile/"team")
- * | |
- * | |
- * | .--- UserActions (folder) - getUserActionsFolder(SystemProfile/"team")
- * | |
- * | .--- SubSystemConfigurationID1 (folder) - getUserActionsFolder(SystemProfile/"team", SubSystemConfiguration)
- * | | .--- actions.xml (file)
- * | .--- SubSystemConfigurationID2 (folder)
- * | .--- actions.xml (file)
- * --------------------------------------------------------------------------------------------------------------------------------
- */
- // ---------------------------------------------------
- // GET USER DEFINED ACTIONS ROOT FOLDER PER PROFILE...
- // ---------------------------------------------------
- /**
- * Get user defined actions root folder given a system profile name
- */
- protected static IFolder getUserActionsFolder(String profileName)
- {
- return getResourceHelpers().getOrCreateFolder(getProfileFolder(profileName),RESOURCE_USERACTIONS_FOLDER_NAME);
- }
- /**
- * Get user defined actions root folder given a system profile object and subsystem factory
- */
- public static IFolder getUserActionsFolder(ISystemProfile profile, ISubSystemConfiguration ssFactory)
- {
- return getUserActionsFolder(profile.getName(),ssFactory);
- }
- /**
- * Get user defined actions root folder given a system profile name and subsystem factory
- */
- public static IFolder getUserActionsFolder(String profileName, ISubSystemConfiguration ssFactory)
- {
- IFolder parentFolder = getUserActionsFolder(profileName);
- String folderName = getFolderName(ssFactory);
- return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // Do create it.
- }
- /**
- * Test for existence of user defined actions root folder given a system profile name and subsystem factory
- */
- public static boolean testUserActionsFolder(String profileName, ISubSystemConfiguration ssFactory)
- {
- IFolder parentFolder = getUserActionsFolder(profileName);
- String folderName = getFolderName(ssFactory);
- return (getResourceHelpers().getFolder(parentFolder, folderName).exists()); // Do NOT create it.
- }
-
- /**
- * Get user defined actions root folder given a system profile name and subsystem factory Id.
- * This is a special-needs method provided for the Import action processing,
- * when a subsystem instance is not available.
- */
- public static IFolder getUserActionsFolder( String profileName, String factoryId)
- {
- IFolder parentFolder = getUserActionsFolder(profileName);
- return getResourceHelpers().getOrCreateFolder(parentFolder, factoryId); // Do create it.
- }
-
- /*
- * --------------------------------------------------------------------------------------------------------------------------------
- * COMPILE COMMAND SUBTREE FOLDER METHODS...
- * ======================================
- * .--- Team (folder) - getProfileFolder(SystemProfile/"team")
- * | |
- * | |
- * | .--- CompileCommands (folder) - getCompileCommandsFolder(SystemProfile/"team")
- * | |
- * | .--- SubSystemConfigurationID1 (folder) - getCompileCommandsFolder(SystemProfile/"team", SubSystemConfiguration)
- * | | .--- compileCommands.xml (file)
- * | .--- SubSystemConfigurationID2 (folder)
- * | .--- compileCommands.xml (file)
- * --------------------------------------------------------------------------------------------------------------------------------
- */
- // ---------------------------------------------------
- // GET COMPILE COMMANDS ROOT FOLDER PER PROFILE...
- // ---------------------------------------------------
- /**
- * Get compile commands root folder given a system profile name
- */
- protected static IFolder getCompileCommandsFolder(String profileName)
- {
- return getResourceHelpers().getOrCreateFolder(getProfileFolder(profileName),RESOURCE_COMPILECOMMANDS_FOLDER_NAME);
- }
- /**
- * Get compile commands root folder given a system profile object and subsystem factory
- */
- public static IFolder getCompileCommandsFolder(ISystemProfile profile, ISubSystemConfiguration ssFactory)
- {
- return getCompileCommandsFolder(profile.getName(),ssFactory);
- }
- /**
- * Get compile commands root folder given a system profile name and subsystem factory
- */
- public static IFolder getCompileCommandsFolder(String profileName, ISubSystemConfiguration ssFactory)
- {
- IFolder parentFolder = getCompileCommandsFolder(profileName);
- String folderName = getFolderName(ssFactory);
- return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // Do create it.
- }
-
- /**
- * Get compile commands root folder given a system profile name and subsystem factory Id.
- * This is a special-needs method provided for the Import action processing,
- * when a subsystem instance is not available.
- */
- public static IFolder getCompileCommandsFolder( String profileName, String factoryId)
- {
- IFolder parentFolder = getCompileCommandsFolder(profileName);
- return getResourceHelpers().getOrCreateFolder(parentFolder, factoryId); // Do create it.
- }
-
-
- // -------------------
- // FOLDER ACTIONS...
- // -------------------
-
- /**
- * Rename a folder
- */
- public static void renameFolder(IFolder folder, String newName)
- {
- getResourceHelpers().renameResource(folder, newName);
- }
- /**
- * Delete a folder
- */
- public static void deleteFolder(IFolder folder)
- {
- getResourceHelpers().deleteResource(folder);
- }
-
- // -------------------
- // FILE ACTIONS...
- // -------------------
-
- /**
- * Rename a file
- */
- public static void renameFile(IFolder folder, String oldName, String newName)
- {
- getResourceHelpers().renameResource(
- getResourceHelpers().getFile(folder,oldName), newName);
- }
- /**
- * Delete a file
- */
- public static void deleteFile(IFolder folder, String fileName)
- {
- getResourceHelpers().deleteResource(
- getResourceHelpers().getFile(folder, fileName));
- }
-
-
- // -------------------
- // GENERIC HELPERS...
- // -------------------
-
- /**
- * Map a connection pool name to a profile name.
- * Current algorith is that pool name equals profile name, but we use
- * this method to allow flexibility in the future.
- */
- public static String getProfileName(ISystemHostPool pool)
- {
- return pool.getName();
- }
-
- /**
- * Map a filter pool manager name to a profile name
- * Current algorith is that manager name equals profile name, but we use
- * this method to allow flexibility in the future.
- */
- public static String getProfileName(ISystemFilterPoolManager mgr)
- {
- return mgr.getName();
- }
-
- /**
- * Map a filter pool name to a folder name
- * Current algorith is that pool name equals folder name, but we use
- * this method to allow flexibility in the future.
- */
- public static String getFolderName(ISystemFilterPool pool)
- {
- return pool.getName();
- }
-
- /**
- * Map a system connection object to a folder name
- */
- public static String getFolderName(IHost conn)
- {
- return conn.getAliasName();
- }
-
- /**
- * Map a subsystem factory object to a folder name
- */
- public static String getFolderName(ISubSystemConfiguration ssFactory)
- {
- return ssFactory.getId(); // Should we use name instead?? Can we assume the name is unique?
- }
-
- /**
- * Given any folder, return its path as a string.
- */
- public static String getFolderPath(IFolder folder)
- {
- return getResourceHelpers().getFolderPath(folder);
- }
-
- /**
- * Given any folder, return its path as a string, and an ending '\'
- */
- public static String getFolderPathWithTerminator(IFolder folder)
- {
- return addPathTerminator(getResourceHelpers().getFolderPath(folder));
- }
-
-
- /**
- * Return singleton of resource helpers object
- */
- protected static SystemResourceHelpers getResourceHelpers()
- {
- if (helpers == null)
- {
- helpers = SystemResourceHelpers.getResourceHelpers();
- //helpers.setLogFile(RSEUIPlugin.getDefault().getLogFile());
- }
- return helpers;
- }
-
- /**
- * Ensure given path ends with path separator.
- */
- public static String addPathTerminator(String path)
- {
- if (!path.endsWith(File.separator))
- path = path + File.separatorChar;
- //else
- // path = path;
- return path;
- }
-
- /**
- * Test if a resource is in use, prior to attempting to rename or delete it.
- * @return true if it is in use or read only, false if it is not.
- */
- public static boolean testIfResourceInUse(IResource resource)
- {
- return SystemResourceHelpers.testIfResourceInUse(resource);
- }
-
- /*
- * --------------------------------------------------------------------------------------------------------------------------------
- * TYPE FILTERS SUBTREE FOLDER METHODS...
- * ======================================
- * .--- TypeFilters (folder) - getTypeFiltersFolder()
- * .--- SubSystemConfigurationID1 (folder) - getTypeFiltersFolder(SubSystemConfiguration)
- * | .--- typefilters.xmi (file)
- * --------------------------------------------------------------------------------------------------------------------------------
- */
-
- /**
- * Get the typeFilters root folder
- */
- public static IFolder getTypeFiltersFolder()
- {
- return getResourceHelpers().getFolder(getRemoteSystemsProject(),RESOURCE_TYPE_FILTERS_FOLDER_NAME);
- }
- /**
- * Get the typeFilters sub-folder per subsystem factory object
- */
- public static IFolder getTypeFiltersFolder(ISubSystemConfiguration ssFactory)
- {
- IFolder parentFolder = getTypeFiltersFolder();
- String folderName = getFolderName(ssFactory);
- return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // DO create it.
- }
- /**
- * Get the typeFilters sub-folder per subsystem factory id
- */
- public static IFolder getTypeFiltersFolder(String ssFactoryId)
- {
- IFolder parentFolder = getTypeFiltersFolder();
- return getResourceHelpers().getOrCreateFolder(parentFolder, ssFactoryId); // DO create it.
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemSorter.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemSorter.java
deleted file mode 100644
index 7ef4f4be7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemSorter.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core;
-
-/**
- * The SortOperation takes a collection of objects and returns
- * a sorted collection of these objects. Concrete instances of this
- * class provide the criteria for the sorting of the objects based on
- * the type of the objects.
- */
-public abstract class SystemSorter {
- /**
- * Returns true is elementTwo is 'greater than' elementOne
- * This is the 'ordering' method of the sort operation.
- * Each subclass overides this method with the particular
- * implementation of the 'greater than' concept for the
- * objects being sorted.
- */
- public abstract boolean compare(Object elementOne, Object elementTwo);
- /**
- * Sort the objects in sorted collection and return that collection.
- */
- private Object[] quickSort(Object[] sortedCollection, int left, int right) {
- int originalLeft = left;
- int originalRight = right;
- Object mid = sortedCollection[ (left + right) / 2];
- do {
- while (compare(sortedCollection[left], mid))
- left++;
- while (compare(mid, sortedCollection[right]))
- right--;
- if (left <= right) {
- Object tmp = sortedCollection[left];
- sortedCollection[left] = sortedCollection[right];
- sortedCollection[right] = tmp;
- left++;
- right--;
- }
- } while (left <= right);
- if (originalLeft < right)
- sortedCollection = quickSort(sortedCollection, originalLeft, right);
- if (left < originalRight)
- sortedCollection = quickSort(sortedCollection, left, originalRight);
- return sortedCollection;
- }
- /**
- * Return a new sorted collection from this unsorted collection.
- * Sort using quick sort.
- */
- public Object[] sort(Object[] unSortedCollection) {
- int size = unSortedCollection.length;
- Object[] sortedCollection = new Object[size];
- //copy the array so can return a new sorted collection
- System.arraycopy(unSortedCollection, 0, sortedCollection, 0, size);
- if (size > 1)
- quickSort(sortedCollection, 0, size - 1);
- return sortedCollection;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemStringTokenizer.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemStringTokenizer.java
deleted file mode 100644
index 8eb2a6fcb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemStringTokenizer.java
+++ /dev/null
@@ -1,112 +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 java.util.Vector;
-
-/**
- * Similar to java's StringTokenizer, but supports multi-character delimiter
- * versus just single character delimiters. Eg usage is:
- * <code>
- * SystemStringTokenizer tokens = new SystemStringTokenizer(stringToParse, "___");
- * while (tokens.hasMoreTokens())
- * String nextToken = tokens.nextToken();
- * </code>
- */
-public class SystemStringTokenizer
-{
- private Vector tokens;
- private int nextToken;
-
- /**
- * Constructor
- * @param inputString The string to be tokenized
- * @param delimiter The multi-char string that delimits the tokens. Eg "___"
- */
- public SystemStringTokenizer(String inputString, String delimiter)
- {
- tokens = tokenize(inputString, delimiter);
- nextToken = 0;
- }
-
- /**
- * Return a count of the number of tokens in the input string
- * @return int number of tokens
- */
- public int countTokens()
- {
- return tokens.size();
- }
-
- /**
- * @return true if there are more tokens
- */
- public boolean hasMoreTokens()
- {
- return (nextToken < tokens.size());
- }
-
- /**
- * @return String the next token
- */
- public String nextToken()
- {
- if (nextToken < tokens.size())
- return (String)tokens.elementAt(nextToken++);
- else
- return null;
- }
-
- /**
- * Parse a string into tokens.
- * @param inputString String to parse
- * @param delimiter Delimiter String, may be multi-character.
- * @return Vector of tokens found
- */
- public static Vector tokenize(String inputString, String delimiter)
- {
- Vector v = new Vector();
- StringBuffer token = new StringBuffer();
- String lastToken = null;
- int inpLen = inputString.length();
- int delimLen = delimiter.length();
- char delimChar1 = delimiter.charAt(0);
- for (int idx=0; idx<inpLen; idx++)
- {
- int remLen = inpLen - idx;
- char currChar = inputString.charAt(idx);
- if ((currChar == delimChar1) && (remLen >= delimLen) &&
- inputString.substring(idx,idx+delimLen).equals(delimiter))
- {
- lastToken = token.toString();
- v.addElement(lastToken);
- //System.out.println("...token: " + token);
- token.setLength(0);
- idx += delimLen-1;
- }
- else
- token.append(currChar);
- }
- if (token.length() > 0)
- {
- lastToken = token.toString();
- v.addElement(lastToken);
- //System.out.println("...token: " + token);
- }
- return v;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemCommunicationsDaemonHandler.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemCommunicationsDaemonHandler.java
deleted file mode 100644
index 37fc00a57..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemCommunicationsDaemonHandler.java
+++ /dev/null
@@ -1,44 +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.comm;
-
-import java.net.Socket;
-
-/**
- * This interface allows any class to use the RSE communications daemon to
- * accept socket requests from a remote function. When a the RSE communications
- * daemon accepts a socket request it reads the first 4 bytes, converts this to
- * an integer and compares the integer against all registered
- * ISystemCommunicationDaemonListeners, handing the socket off to the first match.
- */
-public interface ISystemCommunicationsDaemonHandler {
-
-
- /**
- * The handleRequest method is invoked by the RSE communications daemon when
- * a new socket connection is established and the requestKey matches for this
- * handler. The handleRequest method will be invoked on a new thread.
- * <br><br>
- * It is the implementors responsability to close the socket and clean
- * up all associated resources (like the InputStream) when finished.
- *
- * @param socket The communications socket connected to the remote peer. The only
- * thing read of the socket will have been the request key.
- */
- public void handleRequest(Socket socket, int requestKey);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemCommunicationsDaemonListener.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemCommunicationsDaemonListener.java
deleted file mode 100644
index 140ffe4b8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemCommunicationsDaemonListener.java
+++ /dev/null
@@ -1,32 +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.comm;
-
-/**
- * Listener interface for thoes that are interested in events from the SystemCommunicationsDaemon.
- *
- * @author yantzi
- */
-public interface ISystemCommunicationsDaemonListener
-{
-
- /**
- * This method is invoked whenever the state of the SystemCommunicationsDaemon changes. For example
- * if the daemon is started, stopped or ends in error.
- */
- public void daemonStateChanged(SystemCommunicationsDaemonEvent event);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java
deleted file mode 100644
index 1b48f5a48..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.comm;
-
-import java.util.List;
-
-
-
-
-/*
- * Interface for the keystoreProviders extension point.
- * Implementors must provide a keystore and it's password.
- */
-public interface ISystemKeystoreProvider
-{
- public String getKeyStorePassword();
- public String getKeyStorePath();
- public boolean importCertificates(List certificates, String systemName);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemCommunicationsDaemon.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemCommunicationsDaemon.java
deleted file mode 100644
index c3ab0ce52..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemCommunicationsDaemon.java
+++ /dev/null
@@ -1,446 +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.comm;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.DisplaySystemMessageAction;
-import org.eclipse.rse.ui.actions.SystemStartCommunicationsDaemonAction;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * Communications daemon that can be used by other functions for receiving incoming socket
- * requests. Functions need to implement the ICommunicationsDaemonHandler interface and register
- * a unique 4 byte id (as an integer) which the server sends across the socket to let the
- * daemon know which local function to pass the socket off to.
- */
-public class SystemCommunicationsDaemon extends Thread {
-
-
- private static final String THREAD_NAME = "RSE daemon"; //$NON-NLS-1$
-
- // Communication Daemon Request Handlers
- private static Map handlers = new Hashtable(50);
- private static List _listeners = new Vector(10);
-
- // Starting point for dynamically generated keys
- private static int _nextKey = 0xD0000000;
-
- // Instance fields
- private static SystemCommunicationsDaemon inst = null;
- private boolean halt = false;
- private ServerSocket serverSocket;
- private boolean displayErrors = true;
-
- // We need to hold a reference to the _startAction in order to change the "Stop Daemon" label
- // to "Start Daemon" if the daemon fails.
- private static SystemStartCommunicationsDaemonAction _startAction;
-
- /**
- * Inner class for running ICommunicationHandlers on a new thread. This is done
- * for two main reasons:
- * 1. Allow the communication daemon to continue handling requests while
- * processing other requests (this is important because some requests
- * like the program verifiers run long.
- * 2. Keep the communications daemon safe from crashes (unhandled exceptions)
- * in the communication handlers.
- */
- protected class CommunicationHandlerThread extends Thread
- {
- private ISystemCommunicationsDaemonHandler _handler;
- private Socket _socket;
- private int _requestKey;
-
- protected CommunicationHandlerThread(ISystemCommunicationsDaemonHandler handler, Socket socket, int requestKey)
- {
- _handler = handler;
- _socket = socket;
- _requestKey = requestKey;
- }
-
- public void run()
- {
- _handler.handleRequest(_socket, _requestKey);
- }
- }
-
- /**
- * Singleton, so constructor is private. Use the getInstance method
- * to retrieve and instance of this class.
- */
- private SystemCommunicationsDaemon() {
- }
-
- /**
- * Returns the singleton instance of this class. If the an instance
- * has already been created then it is returned, otherwise a new
- * instance is created and returned.
- */
- public static synchronized SystemCommunicationsDaemon getInstance()
- {
- if (inst == null)
- {
- inst = new SystemCommunicationsDaemon();
- }
- return inst;
- }
-
- /*
- * Stop the communications daemon
- */
- private void halt() {
- halt = true;
- if (serverSocket != null) {
- try {
- serverSocket.close();
-
- // yantzi:2.1.2 (defect 49812) wait for RSE daemon thread to finish (wait at most 5 seconds)
- if (inst != null)
- {
- inst.join(5000);
- }
-
- }
- catch (IOException e)
- {
- SystemBasePlugin.logError("RSE Communications daemon: Unable to close socket", e); //$NON-NLS-1$
- }
- catch (InterruptedException e)
- {
- // some other thread interrupted this one (which should not happen
- SystemBasePlugin.logError("SystemCommunicationsDaemon.halt", e); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * @see Thread#run()
- */
- public void run() {
- byte[] buffer;
- Socket socket = null;
- InputStream in = null;
-
- setName(THREAD_NAME);
-
- // Create server socket and start listening
- int port = RSEUIPlugin.getDefault().getPreferenceStore().getInt(ISystemPreferencesConstants.DAEMON_PORT);
-
- try {
- serverSocket = new ServerSocket(port);
-
- fireStateChangeEvent(SystemCommunicationsDaemonEvent.STARTED);
-
- // Process incoming socket connections
- while (!halt) {
- socket = serverSocket.accept();
-
- // Pass incoming socket off to the appropriate handler,
- // the first four bytes (integer) determines the handler.
- in = socket.getInputStream();
- buffer = new byte[4];
- in.read(buffer);
-
- // RequestKey (integer) must be sent as Big Endian (high order bits first)
- // convert first four bytes to Java integer
- int requestKey = 0 | (buffer[0] << 24);
-
- requestKey = requestKey | ((buffer[1] << 24) >>> 8);
- requestKey = requestKey | ((buffer[2] << 24) >>> 16);
- requestKey = requestKey | ((buffer[3] << 24) >>> 24);
-
-
- // yantzi: 5.0.1: changed from asking hanlder for request key to requiring
- // handler to provide key when they are registered.
- ISystemCommunicationsDaemonHandler handler = (ISystemCommunicationsDaemonHandler) handlers.get(new Integer(requestKey));
-
- if (handler != null)
- {
- new CommunicationHandlerThread(handler, socket, requestKey).start();
- }
- else
- {
- // handler not found
- SystemBasePlugin.logWarning("SystemCommunicationsDaemon: Handler not found for key " + requestKey); //$NON-NLS-1$
- socket.close();
- }
- }
- } catch (IOException e) {
- if (!halt)
- {
- SystemBasePlugin.logError("CommunicationsDaemon, IOException occured during communications daemon request",e); //$NON-NLS-1$
-
- fireStateChangeEvent(SystemCommunicationsDaemonEvent.STOPPED_IN_ERROR);
-
- // yantzi:2.1.2 (defect 51016) Suppress error messages when workbench is first starting up
- if (displayErrors)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_DAEMON_NOTSTARTED);
- msg.makeSubstitution(new Integer(port));
- Display.getDefault().asyncExec(new DisplaySystemMessageAction(msg));
- }
-
- // Reset label of action
- if (_startAction != null)
- {
- _startAction.setActionLabelToStart();
- }
- }
- else
- {
- fireStateChangeEvent(SystemCommunicationsDaemonEvent.STOPPED);
- }
- } finally {
- serverSocket = null;
- //dy need to get a new thread next time in order to re-run
- inst = null;
- }
- }
-
- /**
- * Start the communications daemon if it is not already running
- */
- public synchronized void startDaemon()
- {
- startDaemon(true);
- }
-
- /**
- * Start the communications daemon if it is not already running
- *
- * @param displayErrors true if error messages should be displayed, false
- * if they should be not be displayed.
- */
- public synchronized void startDaemon(boolean displayErrors) {
- if (!isRunning())
- {
- SystemBasePlugin.logDebugMessage("CommunicationsDaemon.startDaemon()", "Starting iSeries Communications Daemon"); //$NON-NLS-1$ //$NON-NLS-2$
-
- //yantzi:2.1.2 added boolean to suppress error messages when workbench is first being started
-
- if (_startAction != null)
- {
- _startAction.setActionLabelToStop();
- }
-
- // Just in case someone cached an old copy of the daemon ...
- SystemCommunicationsDaemon daemon = getInstance();
- daemon.displayErrors = displayErrors;
- daemon.start();
- }
- else
- {
- SystemBasePlugin.logDebugMessage("CommunicationsDaemon.startDaemon()", "Daemon already started"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Stops the communications daemon if it is running
- */
- public synchronized void stopDaemon() {
- if (isRunning())
- {
-
- if (_startAction != null)
- {
- _startAction.setActionLabelToStart();
- }
-
- SystemBasePlugin.logDebugMessage("RSE CommunicationsDaemon.stopDaemon()", "Stopping iSeries Communications Daemon"); //$NON-NLS-1$ //$NON-NLS-2$
- getInstance().halt();
-
- // Need to get rid of the old Thread object and create a new
- // one next time (calling start on the same thread object twice
- // does not seem to work. DY
- inst = null;
-
- }
- else
- {
- SystemBasePlugin.logDebugMessage("RSE CommunicationsDaemon.stopDaemon()", "Daemon already stopped"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Returns the port the daemon is currently running on, or zero if the
- * daemon is not running.
- */
- public synchronized int getPort() {
- if (isRunning())
- {
- return serverSocket.getLocalPort();
- }
-
- return 0;
- }
-
- /**
- * Check to see if the iSeries communications daemon is running
- *
- * @return true if the communications daemon is running, false if it
- * is not running
- */
- public synchronized boolean isRunning() {
- return serverSocket != null;
- }
-
- //
- // Helper methods
- //
-
- /**
- * Returns the user preference for auto-starting the communications daemon
- * when the Workbench starts.
- */
- public static boolean isAutoStart() {
- return RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DAEMON_AUTOSTART);
- }
-
- /**
- * Add a new CommunicationsDaemonHandler
- *
- * @see ISystemCommunicationsDaemonHandler
- *
- * @param requestKey
- *
- * The request key must be four byte integer key used by this handler. This
- * is the first thing that much be sent over the socket from the corresponding
- * client / server when connecting to the RSE communications daemon. The daemon
- * when then compare this integer against all registered handlers and pass off the
- * socket connection (via the handleRequest method) to the first match.
- *
- * Use the SystemCommunicationsDaemon.getInstance().addCommunicationsDaemonHandler(...)
- * method to register with the daemon. There is also a corresponding remove method.
- *
- * Known handlers:
- * RSEInteractiveJobHandler 0x67DF7A14
- * CODECommIntegrationHandler 0xA387E2CD
- * iSeries DebugEngine
- *
- * <b>The range of integers from 0xD0000000 to 0xFFFFFFFF is reserved for dyanmically
- * generated kes.
- *
- * @return true if the handler was registered, false it the handler was not registered because
- * the requestKey is already being used
- */
- public boolean addCommunicationsDaemonHandler(ISystemCommunicationsDaemonHandler handler, int requestKey)
- {
- Integer key = new Integer(requestKey);
-
- if (!handlers.containsKey(key))
- {
- handlers.put(key, handler);
- return true;
- }
-
- return false;
- }
-
- /**
- * Remove a CommunicationsDaemonHandler
- *
- * @see ISystemCommunicationsDaemonHandler
- */
- public void removeCommunicationsDaemonHandler(int requestKey)
- {
- handlers.remove(new Integer(requestKey));
- }
-
- /**
- * Sets the SystemStartCommunicationsDaemon action. This is used to change the
- * label of the action if the daemon fails to start or fails during regular
- * operation.
- */
- public static void setAction(SystemStartCommunicationsDaemonAction action)
- {
- _startAction = action;
- }
-
- /**
- * getNextKey() can be called to generated a dynamic key used by any communications
- * handler. They generated key is guaranteed to be unique. Callers still need to
- * call the addCommunicationsDaemonHandler() method to register their handler.
- */
- public static int getNextKey()
- {
- int key;
-
- synchronized (handlers)
- {
- key = _nextKey;
-
- if (_nextKey == 0xFFFFFFFF)
- {
- _nextKey = 0xD0000000;
- }
- else
- {
- _nextKey++;
- }
- }
-
- return key;
- }
-
- /**
- * Add an ISystemCommunicationsDaemonListener listener to receive state change events from the SystemCommunicationsDaemon.
- */
- public static void addDaemonListener(ISystemCommunicationsDaemonListener listener)
- {
- if (!_listeners.contains(listener))
- {
- _listeners.add(listener);
- }
- }
-
- /**
- * Remove the ISystemCommunicationsDaemonListener listener.
- */
- public static void removeDaemonListener(ISystemCommunicationsDaemonListener listener)
- {
- _listeners.remove(listener);
- }
-
- /**
- * Fire a state change event for the daemon
- */
- private static void fireStateChangeEvent(int newstate)
- {
- if (_listeners.size() > 0)
- {
- SystemCommunicationsDaemonEvent event = new SystemCommunicationsDaemonEvent(newstate);
- for (int i = 0; i < _listeners.size(); i++)
- {
- ((ISystemCommunicationsDaemonListener) _listeners.get(i)).daemonStateChanged(event);
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemCommunicationsDaemonEvent.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemCommunicationsDaemonEvent.java
deleted file mode 100644
index 1bbfc099e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemCommunicationsDaemonEvent.java
+++ /dev/null
@@ -1,50 +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.comm;
-
-/**
- * Event data for the SystemCommunicationsDaemon.
- *
- * @author yantzi
- */
-public class SystemCommunicationsDaemonEvent
-{
- // Communications daemon event types
- public static final int STARTED = 1;
- public static final int STOPPED = 2;
- public static final int STOPPED_IN_ERROR = 3;
-
- private int state;
-
- /**
- * Constructor for SystemCommunicationsDaemonEvent
- *
- * @state The new state for the daemon.
- */
- public SystemCommunicationsDaemonEvent(int state)
- {
- this.state = state;
- }
-
- /**
- * Get the new state for the communications daemon.
- */
- public int getState()
- {
- return state;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java
deleted file mode 100644
index ceaa4d0a2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.core.comm;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class SystemKeystoreProviderManager
-{
- private static SystemKeystoreProviderManager _instance = new SystemKeystoreProviderManager();
-
- private List _extensions;
-
- private SystemKeystoreProviderManager()
- {
- _extensions= new ArrayList();
- }
-
- public static SystemKeystoreProviderManager getInstance()
- {
- return _instance;
- }
-
- public void registerKeystoreProvider(ISystemKeystoreProvider ext)
- {
- _extensions.add(ext);
- }
-
- public boolean hasProvider()
- {
- return !_extensions.isEmpty();
- }
-
- public ISystemKeystoreProvider getDefaultProvider()
- {
- if (_extensions.size() > 0)
- {
- return (ISystemKeystoreProvider)_extensions.get(_extensions.size() - 1);
- }
- return null;
- }
-
- public ISystemKeystoreProvider[] getProviders()
- {
- ISystemKeystoreProvider[] providers = new ISystemKeystoreProvider[_extensions.size()];
- for (int i = 0; i < _extensions.size(); i++)
- {
- providers[i] = (ISystemKeystoreProvider)_extensions.get(i);
- }
- return providers;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse/.classpath b/rse/plugins/org.eclipse.rse/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse/.project b/rse/plugins/org.eclipse.rse/.project
deleted file mode 100644
index 28bd4de73..000000000
--- a/rse/plugins/org.eclipse.rse/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse/META-INF/MANIFEST.MF
deleted file mode 100644
index 84179a3af..000000000
--- a/rse/plugins/org.eclipse.rse/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,8 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse
-Bundle-Version: 1.0.2.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse/about.html b/rse/plugins/org.eclipse.rse/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse/about.ini b/rse/plugins/org.eclipse.rse/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/plugins/org.eclipse.rse/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse/about.mappings b/rse/plugins/org.eclipse.rse/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse/about.properties b/rse/plugins/org.eclipse.rse/about.properties
deleted file mode 100644
index 733775c3a..000000000
--- a/rse/plugins/org.eclipse.rse/about.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer Runtime\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm\n\
-\n\
-This product includes software developed by the\n\
-Apache Software Foundation http://www.apache.org/
diff --git a/rse/plugins/org.eclipse.rse/build.properties b/rse/plugins/org.eclipse.rse/build.properties
deleted file mode 100644
index 23516db62..000000000
--- a/rse/plugins/org.eclipse.rse/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (WindRiver) - Use eclipse32.png feature image
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- eclipse32.png,\
- plugin.properties
diff --git a/rse/plugins/org.eclipse.rse/eclipse32.png b/rse/plugins/org.eclipse.rse/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/plugins/org.eclipse.rse/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse/plugin.properties b/rse/plugins/org.eclipse.rse/plugin.properties
deleted file mode 100644
index 6cb2d7ce9..000000000
--- a/rse/plugins/org.eclipse.rse/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE Runtime
-providerName = Eclipse.org \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse/src/readme.txt b/rse/plugins/org.eclipse.rse/src/readme.txt
deleted file mode 100644
index 170b5f81d..000000000
--- a/rse/plugins/org.eclipse.rse/src/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-This file is present only for build purposes. \ No newline at end of file
diff --git a/rse/plugins/readme.txt b/rse/plugins/readme.txt
deleted file mode 100644
index 66326e0eb..000000000
--- a/rse/plugins/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Use the "plugins" folder for shippable plugin projects that
-are part of the standard code base.
-All projects should be named "org.eclipse.rse.*" or "org.eclipse.dstore.*". \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests-feature/.project b/rse/tests/org.eclipse.rse.tests-feature/.project
deleted file mode 100644
index 84fc708fd..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.tests-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/tests/org.eclipse.rse.tests-feature/build.properties b/rse/tests/org.eclipse.rse.tests-feature/build.properties
deleted file mode 100644
index 3caee2301..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (Wind River) - Adding source plugin for tests
-###############################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- epl-v10.html,\
- license.html
-generate.plugin@org.eclipse.rse.tests.source=org.eclipse.rse.tests
diff --git a/rse/tests/org.eclipse.rse.tests-feature/epl-v10.html b/rse/tests/org.eclipse.rse.tests-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests-feature/feature.properties b/rse/tests/org.eclipse.rse.tests-feature/feature.properties
deleted file mode 100644
index bd746d2d7..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=RSE Unit Tests
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=RSE Unit Tests. Includes Source.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/rse/tests/org.eclipse.rse.tests-feature/feature.xml b/rse/tests/org.eclipse.rse.tests-feature/feature.xml
deleted file mode 100644
index 3edfff32b..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/feature.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.tests"
- label="%featureName"
- version="1.0.2.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.rse.core" version="1.0.2.qualifier" match="equivalent"/>
- <import feature="org.eclipse.rse.local" version="1.0.2.qualifier" match="equivalent"/>
- <import plugin="org.junit"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.rse.tests.framework"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.tests.source"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>
diff --git a/rse/tests/org.eclipse.rse.tests-feature/license.html b/rse/tests/org.eclipse.rse.tests-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/about.html b/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/build.properties b/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index a070fd9c6..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/plugin.properties b/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 960e5c91c..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=RSE Unit Tests Source
-providerName=Eclipse.org
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/.classpath b/rse/tests/org.eclipse.rse.tests.framework.examples/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/.project b/rse/tests/org.eclipse.rse.tests.framework.examples/.project
deleted file mode 100644
index 7728e1f93..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.tests.framework.examples</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/.settings/org.eclipse.jdt.core.prefs b/rse/tests/org.eclipse.rse.tests.framework.examples/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/META-INF/MANIFEST.MF b/rse/tests/org.eclipse.rse.tests.framework.examples/META-INF/MANIFEST.MF
deleted file mode 100755
index 6facc79fc..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.tests.framework.examples;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.junit,
- org.eclipse.rse.tests.framework
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/about.html b/rse/tests/org.eclipse.rse.tests.framework.examples/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/build.properties b/rse/tests/org.eclipse.rse.tests.framework.examples/build.properties
deleted file mode 100755
index 67a4ef973..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- plugin.properties,\
- plugin.xml,\
- scripts/,\
- .
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/plugin.properties b/rse/tests/org.eclipse.rse.tests.framework.examples/plugin.properties
deleted file mode 100644
index b40665e5e..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = RSE Test Framework Examples
-providerName = Eclipse.org
- \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/plugin.xml b/rse/tests/org.eclipse.rse.tests.framework.examples/plugin.xml
deleted file mode 100755
index 9dc4684dc..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/plugin.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.eclipse.rse.tests.framework.suites">
- <suite type="standard" name="Failure Suite">
- <arg name="class" value="org.eclipse.rse.tests.framework.examples.FailureSuite"/>
- </suite>
- <suite type="standard" name="Success Suite">
- <arg name="class" value="org.eclipse.rse.tests.framework.examples.SuccessSuite"/>
- </suite>
- <suite type="standard" name="Error Suite">
- <arg name="class" value="org.eclipse.rse.tests.framework.examples.ErrorSuite"/>
- </suite>
- <suite type="standard" name="Mixed Suite">
- <arg name="class" value="org.eclipse.rse.tests.framework.examples.MixedSuite"/>
- </suite>
- <suite type="generated" name="Mixed Suite (all)">
- <arg name="class" value="org.eclipse.rse.tests.framework.examples.MixedSuiteProvider"/>
- </suite>
- <suite type="generated" name="Mixed Suite (success)">
- <arg name="class" value="org.eclipse.rse.tests.framework.examples.MixedSuiteProvider"/>
- <arg name="argument" value="success"/>
- </suite>
- <suite type="generated" name="Mixed Suite (failure)">
- <arg name="class" value="org.eclipse.rse.tests.framework.examples.MixedSuiteProvider"/>
- <arg name="argument" value="failure"/>
- </suite>
- <suite type="generated" name="Mixed Suite (error)">
- <arg name="class" value="org.eclipse.rse.tests.framework.examples.MixedSuiteProvider"/>
- <arg name="argument" value="error"/>
- </suite>
- <suite type="standard" name="Annotating Suite">
- <arg name="class" value="org.eclipse.rse.tests.framework.examples.AnnotatingSuite"/>
- </suite>
- <!--
- <suite type="scripted" name="Test Script">
- <arg name="folder" value="scripts/test01"/>
- <arg name="script" value = "script7.txt"/>
- </suite>
- -->
- </extension>
-
-</plugin>
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/001.jpg b/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/001.jpg
deleted file mode 100755
index 948ebf5c6..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/001.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/002.jpg b/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/002.jpg
deleted file mode 100755
index f7137c079..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/002.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/003.jpg b/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/003.jpg
deleted file mode 100755
index f6f16ab4f..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/003.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/script7.txt b/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/script7.txt
deleted file mode 100755
index 9f92e8d46..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/scripts/test01/script7.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-# test script
-show 001.jpg #show the first screen
-tell look at the highlighted areas and see if they are translated correctly
-pause press continue if they are OK, otherwise fail the test
-show 002.jpg # show the next screen
-pause how does this look? # a comment
-show 003.jpg #another one again
-pause +
- testing the ability to cope with continuations +
- are we OK with this?
-
-
-
-
- # some blank lines are above -- they should be ignored
- pause how +
- about +
- this?
-tell Comment check ... # this is a comment, not a continuation +
-pause ... this line should not be combined with the last
-
-tell Comment check 2 + # this is a comment
- ... you should see this right after the 2
- \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AbstractTest.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AbstractTest.java
deleted file mode 100755
index e24ae2b77..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AbstractTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-import org.eclipse.rse.tests.framework.AnnotatingTestCase;
-
-public class AbstractTest extends AnnotatingTestCase {
-
- protected void sleep(int n) {
- try {
- Thread.sleep(n);
- } catch (InterruptedException e) {
- }
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AnnotatingSuite.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AnnotatingSuite.java
deleted file mode 100755
index 50a842120..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AnnotatingSuite.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-import junit.framework.TestSuite;
-
-public class AnnotatingSuite extends TestSuite {
-
- public AnnotatingSuite() {
- super(AnnotatingTests.class);
- setName("annotation"); //$NON-NLS-1$
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AnnotatingTests.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AnnotatingTests.java
deleted file mode 100755
index 8b28e1d3e..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/AnnotatingTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-public class AnnotatingTests extends AbstractTest {
-
- public void testSuccess01() {
- remark("Remark 1 for 01"); //$NON-NLS-1$
- remark("Remark 2 for 01"); //$NON-NLS-1$
- sleep(500);
- }
-
- public void testSuccess02() {
- remark("Remark 1 for 02"); //$NON-NLS-1$
- remark("Remark 2 for 02"); //$NON-NLS-1$
- sleep(500);
- }
-
- public void testSuccess03() {
- remark("Remark 1 for 03"); //$NON-NLS-1$
- remark("Remark 2 for 03"); //$NON-NLS-1$
- sleep(500);
- }
-
- public void testSuccess04() {
- remark("Remark 1 for 04"); //$NON-NLS-1$
- remark("Remark 2 for 04"); //$NON-NLS-1$
- sleep(500);
- }
-
- public void testSuccess05() {
- remark("Remark 1 for 05"); //$NON-NLS-1$
- remark("Remark 2 for 05"); //$NON-NLS-1$
- sleep(500);
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/ErrorSuite.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/ErrorSuite.java
deleted file mode 100755
index 022e3449b..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/ErrorSuite.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-import junit.framework.TestSuite;
-
-public class ErrorSuite extends TestSuite {
-
- public ErrorSuite() {
- super(ErrorTests.class);
- setName("errors"); //$NON-NLS-1$
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/ErrorTests.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/ErrorTests.java
deleted file mode 100755
index 08d18d2a7..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/ErrorTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-public class ErrorTests extends AbstractTest {
-
- public void testError01() {
- sleep(1000);
- throw new RuntimeException("generic runtime exception 01"); //$NON-NLS-1$
- }
-
- public void testError02() {
- sleep(1000);
- throw new RuntimeException("generic runtime exception 02"); //$NON-NLS-1$
- }
-
- public void testError03() {
- sleep(1000);
- throw new RuntimeException("generic runtime exception 03"); //$NON-NLS-1$
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/FailureSuite.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/FailureSuite.java
deleted file mode 100755
index d665d3090..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/FailureSuite.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-import junit.framework.TestSuite;
-
-public class FailureSuite extends TestSuite {
-
- public FailureSuite() {
- super(FailureTests.class);
- setName("failures"); //$NON-NLS-1$
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/FailureTests.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/FailureTests.java
deleted file mode 100755
index 73eb84fa1..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/FailureTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-public class FailureTests extends AbstractTest {
-
- public void testFailure01() {
- sleep(50);
- fail("generic failure 01"); //$NON-NLS-1$
- }
-
- public void testFailure02() {
- sleep(50);
- fail("generic failure 02"); //$NON-NLS-1$
- }
-
- public void testFailure03() {
- sleep(50);
- fail("generic failure 03"); //$NON-NLS-1$
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/MixedSuite.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/MixedSuite.java
deleted file mode 100755
index f75d955fa..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/MixedSuite.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-import junit.framework.TestSuite;
-
-public class MixedSuite extends TestSuite {
-
- public MixedSuite() {
- super();
- setName("mixed results"); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess01")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess02")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess03")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(FailureTests.class, "testFailure01")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(FailureTests.class, "testFailure02")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(FailureTests.class, "testFailure03")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(ErrorTests.class, "testError01")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(ErrorTests.class, "testError02")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(ErrorTests.class, "testError03")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess01")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(FailureTests.class, "testFailure01")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(ErrorTests.class, "testError01")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess02")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(FailureTests.class, "testFailure02")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(ErrorTests.class, "testError02")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess03")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(FailureTests.class, "testFailure03")); //$NON-NLS-1$
- this.addTest(TestSuite.createTest(ErrorTests.class, "testError03")); //$NON-NLS-1$
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/MixedSuiteProvider.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/MixedSuiteProvider.java
deleted file mode 100755
index c63d196cd..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/MixedSuiteProvider.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.ITestSuiteProvider;
-
-public class MixedSuiteProvider implements ITestSuiteProvider {
-
- public TestSuite getSuite(String arg) {
- TestSuite suite = new TestSuite("Mixed Suite, arg = " + arg); //$NON-NLS-1$
- if (arg == null || arg.equals("success")) { //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess01")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess02")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess03")); //$NON-NLS-1$
- }
- if (arg == null || arg.equals("failure")) { //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FailureTests.class, "testFailure01")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FailureTests.class, "testFailure02")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FailureTests.class, "testFailure03")); //$NON-NLS-1$
- }
- if (arg == null || arg.equals("error")) { //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(ErrorTests.class, "testError01")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(ErrorTests.class, "testError02")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(ErrorTests.class, "testError03")); //$NON-NLS-1$
- }
- if (arg == null) {
- suite.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess01")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FailureTests.class, "testFailure01")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(ErrorTests.class, "testError01")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess02")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FailureTests.class, "testFailure02")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(ErrorTests.class, "testError02")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(SuccessTests.class, "testSuccess03")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FailureTests.class, "testFailure03")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(ErrorTests.class, "testError03")); //$NON-NLS-1$
- }
- return suite;
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/SuccessSuite.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/SuccessSuite.java
deleted file mode 100755
index 2404dea1d..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/SuccessSuite.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-import junit.framework.TestSuite;
-
-public class SuccessSuite extends TestSuite {
-
- public SuccessSuite() {
- super(SuccessTests.class);
- setName("successes"); //$NON-NLS-1$
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/SuccessTests.java b/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/SuccessTests.java
deleted file mode 100755
index 55d9f3458..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/src/org/eclipse/rse/tests/framework/examples/SuccessTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.examples;
-
-public class SuccessTests extends AbstractTest {
-
- public void testSuccess01() {
- sleep(500);
- }
-
- public void testSuccess02() {
- sleep(500);
- }
-
- public void testSuccess03() {
- sleep(500);
- }
-
- public void testSuccess04() {
- sleep(500);
- }
-
- public void testSuccess05() {
- sleep(500);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/.classpath b/rse/tests/org.eclipse.rse.tests.framework/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/tests/org.eclipse.rse.tests.framework/.project b/rse/tests/org.eclipse.rse.tests.framework/.project
deleted file mode 100644
index 12cad5589..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.tests.framework</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/tests/org.eclipse.rse.tests.framework/.settings/org.eclipse.jdt.core.prefs b/rse/tests/org.eclipse.rse.tests.framework/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/tests/org.eclipse.rse.tests.framework/META-INF/MANIFEST.MF b/rse/tests/org.eclipse.rse.tests.framework/META-INF/MANIFEST.MF
deleted file mode 100644
index 76c1651bd..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.tests.framework;singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.rse.tests.framework.TestFrameworkPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.rse.tests.framework,
- org.eclipse.rse.tests.framework.scripting
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.jface.text,
- org.eclipse.help,
- org.eclipse.core.resources,
- org.junit
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/tests/org.eclipse.rse.tests.framework/about.html b/rse/tests/org.eclipse.rse.tests.framework/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/build.properties b/rse/tests/org.eclipse.rse.tests.framework/build.properties
deleted file mode 100644
index 9a099180e..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- plugin.properties,\
- toc.xml,\
- html/,\
- icons/,\
- schema/,\
- .
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/rse/tests/org.eclipse.rse.tests.framework/html/ResultsPane.jpg b/rse/tests/org.eclipse.rse.tests.framework/html/ResultsPane.jpg
deleted file mode 100644
index 99fb9c99e..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/ResultsPane.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/html/SampleWindow.jpg b/rse/tests/org.eclipse.rse.tests.framework/html/SampleWindow.jpg
deleted file mode 100644
index b42573954..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/SampleWindow.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/html/book.css b/rse/tests/org.eclipse.rse.tests.framework/html/book.css
deleted file mode 100644
index 953fcfcba..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/book.css
+++ /dev/null
@@ -1,125 +0,0 @@
-P.Code {
- display: block;
- text-align: left;
- text-indent: 0.00pt;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 15pt;
- font-size: 10.000000pt;
- font-weight: medium;
- font-style: Regular;
- color: #4444CC;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family: "Courier New";
-}
-pre.code {
- display: block;
- text-align: left;
- text-indent: 0.00pt;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 15pt;
- font-size: 10.000000pt;
- font-weight: medium;
- font-style: Regular;
- color: #4444CC;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family: "Courier New";
-}
-H6.CaptionFigColumn {
- display: block;
- text-align: left;
- text-indent: 0.000000pt;
- margin-top: 3.000000pt;
- margin-bottom: 11.000000pt;
- margin-right: 0.000000pt;
- margin-left: 0.000000pt;
- font-size: 9.000000pt;
- font-weight: medium;
- font-style: Italic;
- color: #000000;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family: "Arial";
-}
-P.Note {
- display: block;
- text-align: left;
- text-indent: 0pt;
- margin-top: 19.500000pt;
- margin-bottom: 19.500000pt;
- margin-right: 0.000000pt;
- margin-left: 30pt;
- font-size: 11.000000pt;
- font-weight: medium;
- font-style: Italic;
- color: #000000;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family: "Arial";
-}
-EM.UILabel {
- font-weight: Bold;
- font-style: Regular;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
-}
-EM.CodeName {
- font-weight: Bold;
- font-style: Regular;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family:"Courier New";
-}
-
-TH {
- background-color: #e5e5e5;
- font-weight: bold;
-}
-
-
-/* following font face declarations need to be removed for DBCS */
-
-body, h1, h2, h3, h4, ,h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-family: Arial, Helvetica, sans-serif; color: #000000}
-pre { font-family: Courier, monospace}
-
-/* end font face declarations */
-
-/* following font size declarations should be OK for DBCS */
-body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-size: 10pt; }
-pre { font-size: 10pt}
-
-/* end font size declarations */
-
-body { background: #FFFFFF}
-h1 { font-size: 18pt; margin-top: 5; margin-bottom: 1 }
-h2 { font-size: 14pt; margin-top: 25; margin-bottom: 3 }
-h3 { font-size: 11pt; margin-top: 20; margin-bottom: 3 }
-h4 { font-size: 10pt; margin-top: 20; margin-bottom: 3; font-style: italic }
-p { margin-top: 10px; margin-bottom: 10px }
-pre { margin-left: 6; font-size: 9pt }
-a:link { color: #0000FF }
-a:hover { color: #000080 }
-a:visited { text-decoration: underline }
-ul { margin-top: 0; margin-bottom: 10 }
-li { margin-top: 0; margin-bottom: 0 }
-li p { margin-top: 0; margin-bottom: 0 }
-ol { margin-top: 0; margin-bottom: 10 }
-dl { margin-top: 0; margin-bottom: 10 }
-dt { margin-top: 0; margin-bottom: 0; font-weight: bold }
-dd { margin-top: 0; margin-bottom: 0 }
-strong { font-weight: bold}
-em { font-style: italic}
-var { font-style: italic}
-div.revision { border-left-style: solid; border-left-width: thin;
- border-left-color: #7B68EE; padding-left:5 }
diff --git a/rse/tests/org.eclipse.rse.tests.framework/html/futures.html b/rse/tests/org.eclipse.rse.tests.framework/html/futures.html
deleted file mode 100644
index 1a9d32954..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/futures.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>Artemis Test Framework</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="Content-Style-Type" content="text/css"/>
- <link rel="stylesheet" type="text/css" href="../book.css"/>
-</head>
-<body>
- <h2>Future Items</h2>
- <h3>Semi-Automatic Tests</h3>
- <p>Scriptable tests would run in the background, but would interact with the user
- on a step by step basis. The steps would be externally defined and contain an image
- (perhaps a screen shot) and some instructions. The user would follow the instructions
- and provide feedback along the way as the test was run. The user could pass or
- fail the test at any point. This would allow for script driven user-interface
- testing suitable for TVT, CRT, and GVT kinds of tests.</p>
-</body>
-</html>
diff --git a/rse/tests/org.eclipse.rse.tests.framework/html/plugging.html b/rse/tests/org.eclipse.rse.tests.framework/html/plugging.html
deleted file mode 100644
index 1f3fdb905..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/plugging.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>Artemis Test Framework</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="Content-Style-Type" content="text/css"/>
- <link rel="stylesheet" type="text/css" href="../book.css"/>
-</head>
-<body>
- <h2>Plugging into the Test Suite View</h2>
- <p>The Test Suite View shows test cases that have registered with the plugin.
- This section describes how this is done. The tags provide for both static declaration and
- dynamic generation of test suites. You can define several suites and suite providers
- in a single extension as follows:</p>
-<pre class="code">
-&lt;extension point="org.eclipse.rse.tests.framework.suites"&gt;
- &lt;suite ... /&gt;
- &lt;suite ... /&gt;
- &lt;type ... /&gt;
- &lt;suite ... /&gt;
- &lt;type ... /&gt;
-&lt;/extension&gt;
-</pre>
- </p>
- <h3>Defining A Test Suite</h3>
- <p>An existing JUnit test suite can be registered as follows:</p>
-<pre class="code">
-&lt;extension point="org.eclipse.rse.tests.framework.suites"&gt;
- &lt;suite type="standard" name="My Test Suite"&gt;
- &lt;arg name="class" value="com.xyz.MyTestSuite"&gt;
- &lt;/suite&gt;
-&lt;/extension&gt;
-</pre>
- <p>This defines a test suite that shows up in the view as "My Test Suite".
- The <code>class</code> argument references a class that ultimately extends
- <code>junit.framework.TestSuite</code>.
- The <code>name</code> attribute is optional, but if it isn't specified the framework
- will ask the suite for its name.</p>
- <h3>Defining A Test Suite Provider</h3>
- <p>If you prefer to dynamically generate test suites based on external criteria,
- you can implement the <code>org.eclipse.rse.tests.framework.ITestSuiteProvider</code>
- interface.
- This allows you to programatically assemble a test suite from individual
- testcases based on whatever criteria present in the workbench that you wish to use,
- including an argument provided on the registration. To register your
- <code>ITestSuiteProvider</code> use the <code>suite</code> tag with the <code>generator</code> type.</p>
-<pre class="code">
-&lt;extension point="org.eclipse.rse.tests.framework.suites"&gt;
- ...
- &lt;suite type="generated" name="BVT Test Suite"&gt;
- &lt;arg name="class" value="com.xyz.MySuiteProvider"/&gt;
- &lt;arg name="argument" value="bvt"/&gt;
- &lt;/suite&gt;
- ...
-&lt;/extension&gt;
-</pre>
- <p>See the examples and either the javadoc or the source code for ITestSuiteProvider.</p>
- <h3>Using The AnnotatingTestCase Class</h3>
- <p>The class <code>AnnotatingTestCase</code> can be used as a superclass for your tests instead of
- <code>junit.framework.TestCase</code>. This allows you to use the <code>remark(String)</code>
- method in your testcases to cause a line to be printed in the results pane before the final status of
- the tests. It's a reasonable replacement for <code>System.out.println()</code>
- if you want to have extra stuff print for your tests.
- <h3>How Your Test Is Run</h3>
- <p>You test suite will run inside of a eclipse user job.
- This means you don't have direct access to the UI thread or
- any of its resources at this time unless you use the SWT <code>Display#execInUI</code>
- or <code>Display#syncExecInUI</code> methods. In the future, semi-automatic
- testing support will provide the ability for testing UI constructs from the test job.</p>
- <h3>Configuration And Prerequisites</h3>
- <p>The Test Suite View is contributed by the plugin
- <code>org.eclipse.rse.tests.framework</code>.
- <p>Your test suites need only require those plugins that you directly
- reference -- which would be at least the <code>org.junit</code> plugin. If
- you implement TestSuiteProvider or use any of the utility classes for annotating
- the result log you must also require <code>org.eclipse.rse.tests.framework</code>.</p>
- <p>The plugin <code>org.eclipse.rse.tests.framework</code> does not
- depend on anything other than <code>org.junit</code> and
- <code>org.eclipse.*</code> plugins.
-</body>
-</html>
diff --git a/rse/tests/org.eclipse.rse.tests.framework/html/purpose.html b/rse/tests/org.eclipse.rse.tests.framework/html/purpose.html
deleted file mode 100644
index 1270e2eaa..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/purpose.html
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>RSE Test Framework</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css"/> <link rel="stylesheet" type="text/css" href="../book.css"/> </head> <body> <h2>What's The Point?</h2> <p>You're an eclipse developer and you've become <em>test-infected</em>. You've made the leap and bought into the JUnit and XP philosophy of writing your testcases first and running them after every significant change you make. You just wish you had three things: (1) an easy way to repeatedly run them while debugging (2) a way to run several times without starting up and taking down a workbench each time and (3) an easy way for others to use them to verify that their work didn't impact yours.</p> <p>The <strong>RSE Test Framework</strong> is for you.</p> <p>The framework provides a means for presenting and running your JUnit tests inside a runtime workbench without using the PDE JUnit driver. This lets you to ship test suites that other teams can run for either verification, testing, or diagnostic purposes. The framework exploits the JUnit unit test framework and provides much of the function that a test runner from that framework provides inside a <em>bona fide</em> eclipse view.</p> <p>It provides a framework in which your tests are easily repeatable and allows function to be tested off the main UI thread.</p> <h3>What Does This Do That JUnit Doesn't?</h3> <p>The answer is "not much" -- yet.</p> <p>The ATF performs essentially the same function as a JUnit test runner, but does it in an eclipse and SWT compatible way. It provides a means for registering tests with a workbench so that they can easily be run repetitively during debug sessions and during driver build verification tests (aka <em>sniff tests</em>).</p> <p>Results are captured and presented in a text pane and can be copied from there to a document of your choice, such as a bug report.</p> <p>"But," you say, "I can do all this with JUnit and PDE!" Of course, but PDE doesn't provide you with a way of delivering your test suites in a build. PDE's JUnit support allows you to run tests from a development workbench in a runtime workbench. The framework, on the other hand, allows you to run them directly in a standard build or in a standard build that is being run as a runtime workbench under control of your development workbench.</p> <p>With the addition of some support for "test scripts" (see <a href="futures.html">Future Items</a>) semi-automated UI testing should become much easier.</p> <h3>How This Might Be Used</h3> <p>There are two different places the framework can help you. One is in running and tracking the tests on your own. The other is automating test suites that others can run.</p> <h4>Unit Test</h4> <p>Since the framework has its origins in JUnit, it should be no suprise that it can be used for unit testing -- either of the tests themselves or of the function being tested. You can easily construct a new plugin to point at or contain your JUnit Test Suites, start up a runtime workbench under debug, run the tests, and if things go wrong set breakpoints and replace code in either the test suite or in the tested function. You can use the framework as your test driver.</p> <h4>Various post development tests</h4> <p>All of these test phases use tests developed by you or your testing team. Some of these can be fully automated under the framework, particularly for sniff tests and regression tests. When the scripting facility becomes available, you should be able to semi-automate tests that require UI verification.</p> </body> </html> \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/html/view.html b/rse/tests/org.eclipse.rse.tests.framework/html/view.html
deleted file mode 100644
index 36bc5b01d..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/view.html
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Artemis Test Framework</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css"/> <link rel="stylesheet" type="text/css" href="../book.css"/> </head> <body> <h2>Using The Test Suite View</h2> <p><img src="SampleWindow.jpg" alt="Sample Test Suite View"/></p> <p>The <strong>Test Suite View</strong> shows the registered test suites in the workbench. The view allows them to be sorted by clicking on the column headings, run individually, run in batches, run in the background or in the UI thread. You can reset the tests and re-run them. This is useful when debugging the function driven by a test, when debugging the test itself, or when testing varitions between intial and subsequent runs. You can also see the test results of any test suite that has been run.</p> <p>To open the Test Suite View use the Window -> Show View -> Other... menu item and select the Test Suites View from the Testing category. <h3>Columns</h3> <p>The <strong>Graphic</strong> column shows the status of the test. It show a question mark if the test has not been run or has been reset, a red X if the test suite has a test case that has failed or produced an exception, and a green check if the test has run to completion. In keeping with the philosophy of JUnit it is updated as the test suite is run so you know immediately if there are any failures.</p> <p>The <strong>Test Suite</strong> columns show the name of the test suite.</p> <p>The <strong>Summary</strong> column is blank if the test has not yet been run. It shows the number of test cases run, the number failed, and the number of unexpected errors. It is updated as the test suite is run.</p> <p>The <strong>Time Run</strong> column is blank if the test has not yet been run. It shows the time the test suite began running, not the time it finished.</p> <h3>Actions</h3> <p>You bring up a context menu containing the test suite actions by selecting a test suite (or several) and right-clicking. The actions may be grayed out if they are not available for that particular selection of tests. You select tests by clicking on them. You can add test suites to (and remove test suites from) the selection by using control-click. You can select a range of tests by using shift-click.</p> <dl> <dt>Select All</dt> <dd>The "Select All" action selects all the test suites in the view. It is available no matter how many test suites are currently selected.</dd> <dt>Run</dt> <dd>This action will run the selected test suites, in the order in which they are presented in the list. The suites are run in an eclipse "job" that can be relegated to the background. The Test Suite View is busy while the tests are being run. This action is available if there is at least one test suite selected.</dd> <dt>Reset</dt> <dd>The "Reset" action will erase the results of the selected test suites and show them as "not yet run". It is available if there is at least one test suite selected.</dd> </dl> <h3>The Results Pane</h3> <img src="ResultsPane.jpg" alt="Results Pane"/> <p>The <strong>Results Pane</strong> shows the results of a test suite that has been run. Each test case in the suite has an entry that shows its success or failure with any remarks generated by a testcase during its run. If the test case fails, the entry shows the reason for the failure along with the stack trace for the exception. The results pane may be copied so you can place it in a defect or an e-mail.</p> <p>You can move the divider between the Test Suite Pane and the Results Pane up and down as necessary. </body> </html> \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/icons/ConsoleView.gif b/rse/tests/org.eclipse.rse.tests.framework/icons/ConsoleView.gif
deleted file mode 100644
index 0dcd76c4b..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/icons/ConsoleView.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/icons/GreenCheck.gif b/rse/tests/org.eclipse.rse.tests.framework/icons/GreenCheck.gif
deleted file mode 100644
index 0dcd76c4b..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/icons/GreenCheck.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/icons/GreenDot.gif b/rse/tests/org.eclipse.rse.tests.framework/icons/GreenDot.gif
deleted file mode 100644
index 397c38b9c..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/icons/GreenDot.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/icons/HolderView.gif b/rse/tests/org.eclipse.rse.tests.framework/icons/HolderView.gif
deleted file mode 100644
index 0dcd76c4b..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/icons/HolderView.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/icons/ImageView.gif b/rse/tests/org.eclipse.rse.tests.framework/icons/ImageView.gif
deleted file mode 100644
index 0dcd76c4b..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/icons/ImageView.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/icons/RedDot.gif b/rse/tests/org.eclipse.rse.tests.framework/icons/RedDot.gif
deleted file mode 100644
index b32f548f6..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/icons/RedDot.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/icons/RedX.gif b/rse/tests/org.eclipse.rse.tests.framework/icons/RedX.gif
deleted file mode 100644
index 8ad4f9ef3..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/icons/RedX.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/icons/WhiteBlock.gif b/rse/tests/org.eclipse.rse.tests.framework/icons/WhiteBlock.gif
deleted file mode 100644
index bd1153ab4..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/icons/WhiteBlock.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/icons/YellowQuestion.gif b/rse/tests/org.eclipse.rse.tests.framework/icons/YellowQuestion.gif
deleted file mode 100644
index dc7e18b12..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/icons/YellowQuestion.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/plugin.properties b/rse/tests/org.eclipse.rse.tests.framework/plugin.properties
deleted file mode 100644
index 96caf4a2a..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/plugin.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-
-pluginName = RSE Test Framework
-providerName = Eclipse.org
-
-SelectAllHoldersDelegate.label=Select All
-ResetHolderDelegate.label=Reset
-RunHolderDelegate.label=Run
-ToggleRunInBackgroundDelegate.label=Run In Background
-ToggleRunInBackgroundDelegate.tooltip=Run In Background
-
-ExtensionPoint.suites.name=Test Suites
-
-TestSuiteHolderView.category.name=RSE Testing
-TestSuiteHolderView.view.name=Test Suites
diff --git a/rse/tests/org.eclipse.rse.tests.framework/plugin.xml b/rse/tests/org.eclipse.rse.tests.framework/plugin.xml
deleted file mode 100644
index 85ce88d84..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/plugin.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="suites" name="%ExtensionPoint.suites.name" schema="schema/suites.exsd"/>
-
- <extension point="org.eclipse.ui.views">
- <category
- id="org.eclipse.rse.projects.testing"
- name="%TestSuiteHolderView.category.name">
- </category>
- <view
- icon="icons/HolderView.gif"
- class="org.eclipse.rse.tests.framework.ui.TestSuiteHolderView"
- category="org.eclipse.rse.projects.testing"
- name="%TestSuiteHolderView.view.name"
- id="org.eclipse.rse.tests.framework.HolderView">
- </view>
- <!--
- <view
- icon="icons/ConsoleView.gif"
- class="org.eclipse.rse.tests.framework.ui.TestSuiteConsoleView"
- category="org.eclipse.rse.projects.testing"
- name="Test Console"
- id="org.eclipse.rse.tests.framework.ConsoleView">
- </view>
- <view
- icon="icons/ImageView.gif"
- class="org.eclipse.rse.tests.framework.ui.TestSuiteImageView"
- category="org.eclipse.rse.projects.testing"
- name="Test Image"
- id="org.eclipse.rse.tests.framework.ImageView">
- </view>
- -->
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <viewerContribution
- targetID="org.eclipse.rse.tests.framework.HolderView"
- id="org.eclipse.rse.tests.framework.HolderViewerContributions">
- <action
- enablesFor="*"
- label="%SelectAllHoldersDelegate.label"
- class="org.eclipse.rse.tests.framework.actions.SelectAllHoldersDelegate"
- menubarPath="additions"
- id="org.eclipse.rse.tests.framework.SelectAllHolders"/>
- </viewerContribution>
- <objectContribution
- objectClass="org.eclipse.rse.tests.framework.ITestSuiteHolder"
- id="org.eclipse.rse.tests.framework.HolderObjectContributions">
- <action
- enablesFor="+"
- label="%ResetHolderDelegate.label"
- class="org.eclipse.rse.tests.framework.actions.ResetHolderDelegate"
- menubarPath="additions"
- id="org.eclipse.rse.tests.framework.ResetHolder"/>
- <action
- enablesFor="+"
- label="%RunHolderDelegate.label"
- class="org.eclipse.rse.tests.framework.actions.RunHolderDelegate"
- menubarPath="additions"
- id="org.eclipse.rse.tests.framework.RunHolder"/>
- </objectContribution>
- </extension>
-
- <extension point="org.eclipse.ui.viewActions">
- <viewContribution
- id="org.eclipse.rse.tests.framework.HolderViewActions"
- targetID="org.eclipse.rse.tests.framework.HolderView">
- <action
- class="org.eclipse.rse.tests.framework.actions.ToggleRunInBackgroundDelegate"
- icon="icons/GreenDot.gif"
- id="org.eclipse.rse.tests.framework.runInBackgroundToggle"
- label="%ToggleRunInBackgroundDelegate.label"
- state="true"
- style="toggle"
- toolbarPath="RunGroup"
- tooltip="%ToggleRunInBackgroundDelegate.tooltip"/>
- </viewContribution>
-
- </extension>
-
- <extension point="org.eclipse.help.toc">
- <toc primary="true" file="toc.xml" category="DSDP.TM"/>
- </extension>
- <!--
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- icon="icons/HolderView.gif"
- class="org.eclipse.rse.tests.framework.ui.TestPerspectiveFactory"
- name="RSE Test Perspective"
- id="org.eclipse.rse.tests.framework.TestPerspective">
-
- <description>
- This perspective provides a place from which to run automatic and semi-automatic testcases. Semi-automatic testcases use the Test Image View and the Test Transcript.
- </description>
- </perspective>
- </extension>
- -->
- <extension
- point="org.eclipse.rse.tests.framework.suites">
- <type
- class="org.eclipse.rse.tests.framework.impl.StandardTestSuiteHolder"
- name="standard"/>
- <type
- class="org.eclipse.rse.tests.framework.impl.TestSuiteGeneratorHolder"
- name="generated"/>
- <!--
- <type
- class="org.eclipse.rse.tests.framework.scripting.ScriptTestSuiteHolder"
- name="scripted"/>
- -->
- </extension>
-
-</plugin>
diff --git a/rse/tests/org.eclipse.rse.tests.framework/schema/suites.exsd b/rse/tests/org.eclipse.rse.tests.framework/schema/suites.exsd
deleted file mode 100644
index d355ae139..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/schema/suites.exsd
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.tests.framework">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.tests.framework" id="suites" name="Test Suites"/>
- </appInfo>
- <documentation>
- Use this extension point to tell the test framework about the existence of your test suite classes. Only test suites that use this extension point show up in the Test Suites view.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- Use this element to register a list of test suites with the framework. There are two ways to register, using extensions of &lt;code&gt;junit.framework.TestSuite&lt;/code&gt; or using an implementer of &lt;code&gt;org.eclipse.rse.tests.framework.ITestSuiteProvider&lt;/code&gt;.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <choice minOccurs="1" maxOccurs="unbounded">
- <element ref="suite"/>
- <element ref="type"/>
- </choice>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- The id of the extension point you are extending. This should be &lt;code&gt;org.eclipse.rse.tests.framework.suites&lt;/code&gt;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- The id of this particular extension.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- The external translatable name of this particular extension.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="suite">
- <annotation>
- <documentation>
- Use this element to describe the existence of a test suite to the framework.
- </documentation>
- </annotation>
- <complexType>
- <sequence minOccurs="0" maxOccurs="unbounded">
- <element ref="arg"/>
- </sequence>
- <attribute name="type" type="string" use="required">
- <annotation>
- <documentation>
- The class of the test suite. This must be an extension of &lt;code&gt;junit.framework.TestSuite&lt;/code&gt;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- This is the name of the test suite that will appear in the test suite view. If it is not present then the suite provider will be asked for the suite&apos;s name, but that may cause activation of the plugin that contains the suite. To delay this activation use this attribute.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="arg">
- <annotation>
- <documentation>
- Use this element to describe an argument to the creator of the test suite.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="value" type="string" use="required">
- <annotation>
- <documentation>
- Provide an argument to the &lt;code&gt;getSuite(String)&lt;/code&gt; method of the provider. This argument can be used to control the generation of the test suite by the provider. If no argument is provided here then &lt;code&gt;null&lt;/code&gt; is passed.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="type">
- <annotation>
- <documentation>
- Use this element to describe a test suite type and the class that will process it.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The framework comes supplied with an example in the plugin &lt;code&gt;org.eclipse.rse.tests.framework.examples&lt;/code&gt;. This example enables several JUnit test suites using both &lt;code&gt;suite&lt;/code&gt; and &lt;code&gt;suiteProvider&lt;/code&gt; declarations. Some suites exhibit failures and some exhibit errors. The rest succeed completely.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- There is no API other than the JUnit API associated with this framework. One only needs to register a test suite with this extension point to have it appear and be runnable from within the Test Suites view.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- Not applicable.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- (c) Copyright IBM Corporation 2004, 2006.
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/AbstractTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/AbstractTestSuiteHolder.java
deleted file mode 100644
index ee05ac22d..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/AbstractTestSuiteHolder.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework;
-
-import java.io.StringWriter;
-import java.util.Calendar;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-import junit.framework.AssertionFailedError;
-import junit.framework.Test;
-import junit.framework.TestFailure;
-import junit.framework.TestListener;
-import junit.framework.TestResult;
-import junit.framework.TestSuite;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.ui.IActionFilter;
-
-/**
- * Instances of AbstractHolder hold either predefined or generated test suites. Subclass this only if you are providing
- * another means of delivering a test suite to the framework that is not already defined in the framework.
- */
-public abstract class AbstractTestSuiteHolder implements ITestSuiteHolder, TestListener, IActionFilter {
- private Calendar myCalendar = null;
- private TestResult testResult = null;
- private StringWriter stringWriter = null;
- private IProgressMonitor monitor = null;
- private List listeners = new Vector();
- private TestFailure failure;
-
- /**
- * Construct a new AbstractTestSuiteHolder. Subclasses should invoke super() (usually implicit)
- * and implement their own constructors.
- */
- protected AbstractTestSuiteHolder() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.IHolder#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public final void run(IProgressMonitor monitor) {
- stringWriter = new StringWriter(1000);
- myCalendar = Calendar.getInstance();
- TestSuite suite = getTestSuite();
- monitor.beginTask("Running " + suite.getName(), suite.countTestCases()); //$NON-NLS-1$
- setTestResult(new TestResult());
- this.monitor = monitor;
- testResult.addListener(this);
- suite.run(testResult);
- testResult.removeListener(this);
- this.monitor = null;
- monitor.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolder#reset()
- */
- public final void reset() {
- stringWriter = null;
- monitor = null;
- testResult = null;
- myCalendar = null;
- for (Iterator z = listeners.iterator(); z.hasNext();) {
- ITestSuiteHolderListener listener = (ITestSuiteHolderListener) z.next();
- listener.testHolderReset(this);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolder#getResultString()
- */
- public final String getResultString() {
- if (stringWriter == null) {
- return "Results not available.\n"; //$NON-NLS-1$
- }
- return stringWriter.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolder#addListener(org.eclipse.rse.tests.framework.ITestSuiteHolderListener)
- */
- public final void addListener(ITestSuiteHolderListener listener) {
- listeners.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolder#removeListener(org.eclipse.rse.tests.framework.ITestSuiteHolderListener)
- */
- public final void removeListener(ITestSuiteHolderListener listener) {
- listeners.remove(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolder#getTestResult()
- */
- public synchronized final TestResult getTestResult() {
- return testResult;
- }
-
- /**
- * Used to predefine a test result for this holder.
- * @param testResult
- */
- private synchronized final void setTestResult(TestResult testResult) {
- this.testResult = testResult;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolder#getLastRunTime()
- */
- public final Calendar getLastRunTime() {
- return myCalendar;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestListener#addError(junit.framework.Test,
- * java.lang.Throwable)
- */
- public final void addError(Test test, Throwable t) {
- failure = new TestFailure(test, t);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestListener#addFailure(junit.framework.Test,
- * junit.framework.AssertionFailedError)
- */
- public final void addFailure(Test test, AssertionFailedError t) {
- failure = new TestFailure(test, t);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestListener#startTest(junit.framework.Test)
- */
- public final void startTest(Test test) {
- failure = null;
- if (test instanceof AnnotatingTestCase) {
- AnnotatingTestCase a = (AnnotatingTestCase) test;
- a.reset();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestListener#endTest(junit.framework.Test)
- */
- public final void endTest(Test test) {
- monitor.worked(1);
- writeRemarks(test);
- if (failure != null) {
- stringWriter.write(failure.trace());
- stringWriter.write("*** " + failure.toString() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- stringWriter.write("*** " + test.toString() + " passed\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- for (Iterator z = listeners.iterator(); z.hasNext();) {
- ITestSuiteHolderListener listener = (ITestSuiteHolderListener) z.next();
- listener.testEnded(this);
- }
- if (monitor.isCanceled()) {
- testResult.stop();
- }
- }
-
- /**
- * Writes the remarks for a test onto the log maintained by this holder.
- * @param test The test whose remarks are being obtained. This will be an instance of Test, but
- * it will do nothing unless the test is an AnnotatingTestCase.
- * @see AnnotatingTestCase
- */
- private void writeRemarks(Test test) {
- if (test instanceof AnnotatingTestCase) {
- stringWriter.write("\n"); //$NON-NLS-1$
- AnnotatingTestCase a = (AnnotatingTestCase) test;
- stringWriter.write(a.getAnnotations());
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionFilter#testAttribute(java.lang.Object,
- * java.lang.String, java.lang.String)
- */
- public boolean testAttribute(Object target, String name, String value) {
- return (target == this && name.equals("hasResult") && value.equals("true") && testResult != null); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolder#getTestSuite()
- */
- public abstract TestSuite getTestSuite();
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolder#getName()
- */
- public abstract String getName();
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/AnnotatingTestCase.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/AnnotatingTestCase.java
deleted file mode 100644
index ed53f854c..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/AnnotatingTestCase.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import junit.framework.TestCase;
-
-/**
- * AnnotatingTestCase extends TestCase by adding the capability to store remarks on the
- * test during its execution. These remarks can be gathered by the environment that
- * runs the test and presented to a user by whatever means is interesting in that environment.
- * For example, a view may choose to chose these in a pane immediately after running the
- * testcase.
- */
-public class AnnotatingTestCase extends TestCase {
-
- private PrintWriter out;
- private StringWriter base;
-
- public AnnotatingTestCase() {
- reset();
- }
-
- /**
- * @param methodName The name of the method to run for this test.
- * Usually "testSomething".
- */
- public AnnotatingTestCase(String methodName) {
- super(methodName);
- reset();
- }
-
- protected void remark(String remark) {
- out.println(remark);
- }
-
- public String getAnnotations() {
- return base.toString();
- }
-
- public void reset() {
- base = new StringWriter(1000);
- out = new PrintWriter(base);
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/DelegatingTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/DelegatingTestSuiteHolder.java
deleted file mode 100644
index 7abb71a9c..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/DelegatingTestSuiteHolder.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IContributor;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.osgi.framework.Bundle;
-
-/**
- * A delegating holder is the abstract superclass of all suite holders that are
- * defined in extension points.
- */
-public abstract class DelegatingTestSuiteHolder extends AbstractTestSuiteHolder {
-
- private static final String SUITE_EXTENSION_POINT_NAME = "org.eclipse.rse.tests.framework.suites"; //$NON-NLS-1$
-
- // elements
- private static final String TYPE_ELEMENT = "type"; //$NON-NLS-1$
- private static final String SUITE_ELEMENT = "suite"; //$NON-NLS-1$
- private static final String ARGUMENT_ELEMENT = "arg"; //$NON-NLS-1$
-
- // attributes
- private static final String TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
- private static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
- private static final String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
- private static final String VALUE_ATTRIBUTE = "value"; //$NON-NLS-1$
-
- /**
- * Returns a newly minted suite holder of the given type.
- * @param wantedTypeName the type name of the suite holder
- * @return a new suite holder of that type or null if that type is not defined
- */
- private static DelegatingTestSuiteHolder getSuiteHolder(String wantedTypeName) {
- DelegatingTestSuiteHolder holder = null;
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] configs = registry.getConfigurationElementsFor(SUITE_EXTENSION_POINT_NAME);
- for (int i = 0; i < configs.length; i++) {
- IConfigurationElement config = configs[i];
- String elementName = config.getName();
- if (elementName.equals(TYPE_ELEMENT)) {
- String candidateTypeName = config.getAttribute(NAME_ATTRIBUTE);
- if (candidateTypeName.equals(wantedTypeName)) {
- try {
- holder = (DelegatingTestSuiteHolder) config.createExecutableExtension(CLASS_ATTRIBUTE);
- } catch (CoreException e) {
- }
- }
- }
- }
- return holder;
- }
-
- /**
- * Retrieve all suite holders defined by extension points.
- * @return an array of suite holders.
- * @throws IllegalArgumentException if any suite holder is ill-defined
- */
- public static DelegatingTestSuiteHolder[] getHolders() {
- List holders = new Vector();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] configs = registry.getConfigurationElementsFor(SUITE_EXTENSION_POINT_NAME);
- for (int i = 0; i < configs.length; i++) {
- IConfigurationElement config = configs[i];
- String elementName = config.getName();
- if (elementName.equals(SUITE_ELEMENT)) {
- String suiteType = config.getAttribute(TYPE_ATTRIBUTE);
- String suiteName = config.getAttribute(NAME_ATTRIBUTE);
- DelegatingTestSuiteHolder holder = getSuiteHolder(suiteType);
- if (holder != null) {
- holder.setConfiguration(config);
- holder.setName(suiteName);
- holders.add(holder);
- }
- }
- }
- DelegatingTestSuiteHolder[] result = new DelegatingTestSuiteHolder[holders.size()];
- holders.toArray(result);
- return result;
- }
-
- private String name;
- private IConfigurationElement config;
-
- /**
- * Retrieves the argument configuration element for an argument of a given name
- * @param name the name of the argument
- * @return the configuration element of that name, or null if not found.
- */
- protected IConfigurationElement getArgumentElement(String name) {
- IConfigurationElement result = null;
- IConfigurationElement[] argumentElements = config.getChildren(ARGUMENT_ELEMENT);
- for (int i = 0; i < argumentElements.length && result == null; i++) {
- IConfigurationElement argumentElement = argumentElements[i];
- String argumentName = argumentElement.getAttribute(NAME_ATTRIBUTE);
- if (argumentName.equals(name)) {
- result = argumentElement;
- }
- }
- return result;
- }
-
- protected String getStringValue(String name) {
- String result = null;
- IConfigurationElement element = getArgumentElement(name);
- if (element != null) {
- result = element.getAttribute(VALUE_ATTRIBUTE);
- }
- return result;
- }
-
- protected Object getObjectValue(String name) {
- Object result = null;
- IConfigurationElement element = getArgumentElement(name);
- if (element != null) {
- try {
- result = element.createExecutableExtension("value"); //$NON-NLS-1$
- } catch (CoreException e) {
- }
- }
- return result;
- }
-
- protected Bundle getBundle() {
- IContributor contributor = config.getContributor();
- String bundleName = contributor.getName();
- Bundle bundle = Platform.getBundle(bundleName);
- return bundle;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getName()
- */
- public String getName() {
- return name;
- }
-
- private void setName(String name) {
- this.name = name;
- }
-
- private void setConfiguration(IConfigurationElement config) {
- this.config = config;
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteHolder.java
deleted file mode 100644
index 21cb41b51..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteHolder.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework;
-
-import java.util.Calendar;
-import junit.framework.TestResult;
-import junit.framework.TestSuite;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Instances of this type deliver JUnit test suites on demand.
- */
-public interface ITestSuiteHolder {
-
- /**
- * Runs the test suite held by this holder. Saves the result which is
- * available through getResult().
- *
- * @param monitor a fresh progress monitor for this run. It is advanced by one
- * for each testcase executed in this suite.
- */
- public void run(IProgressMonitor monitor);
-
- /**
- * Resets this result used by this job monitor and notifies any listeners.
- */
- public void reset();
-
- /**
- * @return the string that is the result of the last time this was run.
- */
- public String getResultString();
-
- /**
- * @return the test result from the last time this was run.
- * This will be null if the test has not been run since it was created
- * or reset.
- */
- public TestResult getTestResult();
-
- /**
- * @return the Calendar representing the time this test was last run.
- * This will be null if the test has not been run since it was created or
- * reset.
- */
- public Calendar getLastRunTime();
-
- /**
- * @return the test suite held by this holder.
- */
- public abstract TestSuite getTestSuite();
-
- /**
- * @return the name of the test suite held by this holder.
- */
- public abstract String getName();
-
- /**
- * Adds a new listener to this holder. This listener can process events that happen in the
- * lifecycle of the test suite held by this holder.
- * @param listener the listener to add
- */
- public void addListener(ITestSuiteHolderListener listener);
-
- /**
- * Removes a listener from this holder. Does nothing if the holder has no knowledge of
- * this listener
- * @param listener the listener to remove.
- */
- public void removeListener(ITestSuiteHolderListener listener);
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteHolderListener.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteHolderListener.java
deleted file mode 100644
index 4364810fe..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteHolderListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework;
-
-/**
- * Implementers of this interface can register with a test suite holder to listen for the
- * events regarding the test suite in the holder.
- * @see ITestSuiteHolder
- */
-public interface ITestSuiteHolderListener {
-
- /**
- * A test in the suite held by a test holder has ended. The holder may be queried for
- * the result.
- * @param holder
- */
- public void testEnded(ITestSuiteHolder holder);
-
- /**
- * A test holder has been reset.
- * @param holder
- */
- public void testHolderReset(ITestSuiteHolder holder);
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteProvider.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteProvider.java
deleted file mode 100644
index ebfab462c..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ITestSuiteProvider.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework;
-
-import junit.framework.TestSuite;
-
-/**
- * A test suite provider will generate and deliver a test suite when asked to do so.
- */
-public interface ITestSuiteProvider {
-
- /**
- * Generates a test suite.
- * @param argument a String that can be used to discriminate among test suites generated
- * by this provider.
- * @return the TestSuite provided by this provider.
- * @see TestSuite
- */
- public TestSuite getSuite(String argument);
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/TestFrameworkPlugin.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/TestFrameworkPlugin.java
deleted file mode 100644
index 7290313b8..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/TestFrameworkPlugin.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class TestFrameworkPlugin extends AbstractUIPlugin {
-
- public static final String PREF_RUN_IN_BACKGROUND = "org.eclipse.rse.tests.runInBackground"; //$NON-NLS-1$
-
- private static TestFrameworkPlugin plugin;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- IPreferenceStore store = getPreferenceStore();
- store.setDefault(PREF_RUN_IN_BACKGROUND, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * @return the shared instance of this plugin.
- */
- public static TestFrameworkPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Logs an unexpected exception.
- * @param e the exception to log
- */
- public void logUnexpectedException(Exception e) {
- e.printStackTrace();
- String id = getBundle().getSymbolicName();
- Status status = new Status(IStatus.ERROR, id, 0, "Unexpected Exception", e); //$NON-NLS-1$
- getLog().log(status);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/ResetHolderDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/ResetHolderDelegate.java
deleted file mode 100644
index fee57b084..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/ResetHolderDelegate.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.actions;
-
-import java.util.Iterator;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This implements the delegate for the "Reset Test Suite" action presented in the UI.
- * The UI Proxy invokes this delegate.
- * @see IObjectActionDelegate
- */
-public class ResetHolderDelegate implements IObjectActionDelegate {
-
- private ISelection selection;
-
- /**
- * The constructor.
- */
- public ResetHolderDelegate() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- for (Iterator z = ss.iterator(); z.hasNext();) {
- AbstractTestSuiteHolder holder = (AbstractTestSuiteHolder) z.next();
- holder.reset();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- this.selection = selection;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/RunHolderDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/RunHolderDelegate.java
deleted file mode 100644
index 59b1d35f1..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/RunHolderDelegate.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
-import org.eclipse.rse.tests.framework.TestFrameworkPlugin;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-/**
- * This implements the delegate for the "Run Test Suite" action presented in the
- * UI. The UI Proxy invokes this delegate.
- *
- * @see IObjectActionDelegate
- */
-public class RunHolderDelegate implements IObjectActionDelegate {
- private IWorkbenchPart part;
- private ISelection selection;
-
- /**
- * The constructor.
- */
- public RunHolderDelegate() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- this.selection = selection;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
- * org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- this.part = targetPart;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IPreferenceStore store = TestFrameworkPlugin.getDefault().getPreferenceStore();
- boolean runInBackground = store.getBoolean(TestFrameworkPlugin.PREF_RUN_IN_BACKGROUND);
- if (runInBackground) {
- runInBackground();
- } else {
- runInUI();
- }
- }
-
- private void runInBackground() {
- Job job = new Job("Running JUnit Tests Suites") { //$NON-NLS-1$
- protected IStatus run(IProgressMonitor monitor) {
- IStatus result = runTests(monitor);
- return result;
- }
- };
- job.setPriority(Job.LONG);
- job.setUser(true);
- IWorkbenchPartSite site = part.getSite();
- IWorkbenchSiteProgressService siteService = (IWorkbenchSiteProgressService) site.getAdapter(IWorkbenchSiteProgressService.class);
- siteService.schedule(job, 0, true);
- }
-
- private void runInUI() {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- runTests(monitor);
- }
- };
- IWorkbenchPartSite site = part.getSite();
- IWorkbenchSiteProgressService siteService = (IWorkbenchSiteProgressService) site.getAdapter(IWorkbenchSiteProgressService.class);
- try {
- siteService.runInUI(siteService, runnable, null);
- } catch (InvocationTargetException e) {
- } catch (InterruptedException e) {
- }
- }
-
- private IStatus runTests(IProgressMonitor monitor) {
- IStatus result = Status.OK_STATUS;
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- monitor.beginTask("", ss.size()); //$NON-NLS-1$
- for (Iterator z = ss.iterator(); z.hasNext();) {
- AbstractTestSuiteHolder holder = (AbstractTestSuiteHolder) z.next();
- monitor.subTask(holder.getName());
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1);
- holder.run(subMonitor);
- if (monitor.isCanceled()) {
- result = Status.CANCEL_STATUS;
- break;
- }
- }
- monitor.done();
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/SelectAllHoldersDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/SelectAllHoldersDelegate.java
deleted file mode 100644
index 12317cb89..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/SelectAllHoldersDelegate.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.rse.tests.framework.ui.TestSuiteHolderView;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * This implements the delegate for the "Select All" action presented in the UI.
- * The UI Proxy invokes this delegate.
- * @see IViewActionDelegate
- */
-public class SelectAllHoldersDelegate implements IViewActionDelegate {
-
- private IViewPart view;
-
- /**
- * The constructor.
- */
- public SelectAllHoldersDelegate() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- ((TestSuiteHolderView)view).selectAll();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- this.view = view;
- }
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/ToggleRunInBackgroundDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/ToggleRunInBackgroundDelegate.java
deleted file mode 100644
index 8e06c6420..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/actions/ToggleRunInBackgroundDelegate.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.rse.tests.framework.TestFrameworkPlugin;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-public class ToggleRunInBackgroundDelegate extends Object implements IViewActionDelegate {
-
- public void init(IViewPart view) {
- }
-
- public void run(IAction action) {
- boolean runInBackground = action.isChecked();
- setPreference(runInBackground);
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- private void setPreference(boolean runInBackground) {
- IPreferenceStore store = TestFrameworkPlugin.getDefault().getPreferenceStore();
- store.setValue(TestFrameworkPlugin.PREF_RUN_IN_BACKGROUND, runInBackground);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/BasicTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/BasicTestSuiteHolder.java
deleted file mode 100644
index 523d985b4..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/BasicTestSuiteHolder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.impl;
-
-import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
-
-import junit.framework.TestSuite;
-
-/**
- * A BasicHolder provides a simple wrapper for a test suite. Use this if you just want to contribute a JUnit
- * test suite that you already have without defining it in an extension point.
- */
-public class BasicTestSuiteHolder extends AbstractTestSuiteHolder {
-
- private TestSuite testSuite;
-
- public BasicTestSuiteHolder(TestSuite testSuite) {
- this.testSuite = testSuite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getName()
- */
- public String getName() {
- return testSuite.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return testSuite;
- }
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/StandardTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/StandardTestSuiteHolder.java
deleted file mode 100644
index 1453a2460..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/StandardTestSuiteHolder.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.impl;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-/**
- * A SuiteHolder can deliver a test suite when asked. It references
- * a JUnit TestSuite named by a "suite" tag to do this.
- */
-public class StandardTestSuiteHolder extends DelegatingTestSuiteHolder {
-
- private TestSuite suite;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- if (suite == null) {
- suite = (TestSuite) getObjectValue("class"); //$NON-NLS-1$
- }
- return suite;
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/TestSuiteGeneratorHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/TestSuiteGeneratorHolder.java
deleted file mode 100644
index 0a0ca2cc6..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/impl/TestSuiteGeneratorHolder.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.impl;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-import org.eclipse.rse.tests.framework.ITestSuiteProvider;
-
-/**
- * A suite generator holder can deliver a test suite when asked. It uses a suite
- * generator supplied by an extension point to build that test suite.
- */
-public class TestSuiteGeneratorHolder extends DelegatingTestSuiteHolder {
-
- private TestSuite suite;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- if (suite == null) {
- ITestSuiteProvider p = (ITestSuiteProvider)getObjectValue("class"); //$NON-NLS-1$
- String arg = getStringValue("argument"); //$NON-NLS-1$
- suite = p.getSuite(arg);
- }
- return suite;
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ConsoleContext.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ConsoleContext.java
deleted file mode 100644
index 45bd70af0..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ConsoleContext.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.net.URL;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.ImageData;
-
-/**
- * This kind of ScriptContext only prints information on the PrintStream it is
- * given. Useful for making sure that instructions read properly.
- */
-public class ConsoleContext extends ScriptContext {
-
- private PrintWriter transcript;
-
- /**
- * @param home
- * @param out The print stream on which to write messages.
- */
- public ConsoleContext(PrintStream out, URL home) {
- super(home);
- this.transcript = new PrintWriter(out);
- }
-
- /**
- * A show operation will resolve a name to an image and show that image
- * in the current environment.
- * @param imageName the name of the image to resolve and show.
- */
- public void show(String imageName) {
- log("showing " + imageName); //$NON-NLS-1$
- String message = "image not found"; //$NON-NLS-1$
- URL imageURL = getResourceURL(imageName);
- if (imageURL != null) {
- ImageDescriptor descriptor = ImageDescriptor.createFromURL(imageURL);
- ImageData data = descriptor.getImageData();
- if (data != null) {
- String type = "Unknown"; //$NON-NLS-1$
- switch (data.type) {
- case SWT.IMAGE_GIF:
- type = "GIF"; //$NON-NLS-1$
- break;
- case SWT.IMAGE_JPEG:
- type = "JPEG"; //$NON-NLS-1$
- break;
- case SWT.IMAGE_PNG:
- type = "PNG"; //$NON-NLS-1$
- break;
- default:
- type = "Other"; //$NON-NLS-1$
- }
- message = type + "(" + Integer.toString(data.width) + " x " + Integer.toString(data.height) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- log(message);
- }
-
- /**
- * A tell operation will show a string in the environment.
- * @param text the String to show.
- */
- public void tell(String text) {
- log(text);
- }
-
- /**
- * A pause operation will stop and wait for a "continue" or "fail" indication
- * from the environment.
- * @param text the message to display during the pause
- */
- public void pause(String text) {
- if (text.length() == 0) text = "pausing"; //$NON-NLS-1$
- log(text);
- }
-
- private void log(String message) {
- transcript.println(message);
- transcript.flush();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/PerspectiveContext.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/PerspectiveContext.java
deleted file mode 100644
index 86440b96a..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/PerspectiveContext.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.tests.framework.ui.TestSuiteConsoleView;
-import org.eclipse.rse.tests.framework.ui.TestSuiteHolderView;
-import org.eclipse.rse.tests.framework.ui.TestSuiteImageView;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * A perspective context is a kind of script context that coordinates among
- * the several different views in the testing perspective.
- */
-public class PerspectiveContext extends ScriptContext {
-
- private TestSuiteHolderView holderView;
-
- /**
- * Constructs a new PerspectiveContext for running the suites with a user interface. The suites
- * are run from the holder view named here, the image and console views used for show and tell
- * are located on the same workbench page as the holder view.
- * @param holderView the test suite holder view that will drive the scripts.
- * @param home the URL that names the location that contains the script's resources
- */
- public PerspectiveContext(TestSuiteHolderView holderView, URL home) {
- super(home);
- this.holderView = holderView;
- }
-
- /**
- * A show operation will resolve a name to an image and show that image
- * in the current environment.
- * @param imageName the name of the image to resolve and show.
- */
- public void show(String imageName) {
- TestSuiteImageView view = findImageView();
- URL imageURL = getResourceURL(imageName);
- if (imageURL != null) {
- ImageDescriptor descriptor = ImageDescriptor.createFromURL(imageURL);
- view.setImage(descriptor);
- }
- }
-
- /**
- * A tell operation will show a string in the environment.
- * @param text the String to show.
- */
- public void tell(String text) {
- TestSuiteConsoleView view = findConsoleView();
- view.add(text);
- }
-
- /**
- * A pause operation will stop and wait for a "continue" or "fail" indication
- * from the environment.
- * @param text the message to display during the pause
- */
- public void pause(String text) {
- tell("pausing"); //$NON-NLS-1$
- // TODO this doesn't really pause yet. still need a way to continue.
- }
-
- private TestSuiteImageView findImageView() {
- return (TestSuiteImageView) findView("org.eclipse.rse.tests.framework.ImageView"); //$NON-NLS-1$
- }
-
- private TestSuiteConsoleView findConsoleView() {
- return (TestSuiteConsoleView) findView("org.eclipse.rse.tests.framework.ConsoleView"); //$NON-NLS-1$
- }
-
- private IViewPart findView(String viewId) {
- IViewPart result = null;
- IViewSite site = holderView.getViewSite();
- IWorkbenchPage page = site.getPage();
- IViewReference[] references = page.getViewReferences();
- for (int i = 0; i < references.length; i++) {
- IViewReference reference = references[i];
- String referenceId = reference.getId();
- if (referenceId.equals(viewId)) {
- result = reference.getView(true);
- }
- }
- return result;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/Script.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/Script.java
deleted file mode 100644
index 26e7cf860..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/Script.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-/**
- * A Script is a collection of steps.
- */
-public class Script extends SyntaxNode {
-
- private boolean failed = false;
-
- /**
- * Creates a new script node. This is the base of the syntax tree for
- * scripts. These always have a line number of zero.
- */
- public Script() {
- super(0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#enter(org.eclipse.rse.tests.framework.scripting.ScriptContext)
- */
- public void enter(ScriptContext context) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#leave(org.eclipse.rse.tests.framework.scripting.ScriptContext)
- */
- public void leave(ScriptContext context) {
- failed = context.getFailed();
- }
-
- /**
- * @return the failure state of the script.
- */
- public boolean hasFailed() {
- return failed;
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptContext.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptContext.java
deleted file mode 100644
index d103316a8..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptContext.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.runtime.ILog;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.tests.framework.TestFrameworkPlugin;
-import org.osgi.framework.Bundle;
-
-/**
- * Provides a context in which a script may be run. The steps of the script will
- * ask the context to accomplish things. Think of a ScriptContext the platform
- * on which Steps express themselves to the outside world.
- */
-public abstract class ScriptContext {
-
- private boolean failed = false;
- private URL home;
-
- /**
- * Create a new ScriptContext.
- * @param home the location relative to which all resource names are resolved.
- */
- public ScriptContext(URL home) {
- this.home = home;
- }
-
- /**
- * @param resourceName the resource name relative to the location specified by
- * the home for this Context.
- * @return a new URL for this specific resource or null if no URL can be formed.
- */
- public final URL getResourceURL(String resourceName) {
- URL result = null;
- try {
- result = new URL(home, resourceName);
- } catch (MalformedURLException e) {
- setFailing(true);
- Plugin plugin = TestFrameworkPlugin.getDefault();
- Bundle bundle = plugin.getBundle();
- String pluginId = bundle.getSymbolicName();
- ILog log = plugin.getLog();
- IStatus status = new Status(IStatus.ERROR, pluginId, IStatus.OK, "bad resource name in script", e); //$NON-NLS-1$
- log.log(status);
- }
- return result;
- }
-
- /**
- * @return true if the Context has received an indication to fail from the environment.
- */
- public final boolean getFailed() {
- return failed;
- }
-
- /**
- * Indicate that the script has failed.
- * @param flag true if the test has failed
- */
- public final void setFailing(boolean flag) {
- failed = flag;
- }
-
- /**
- * A pause operation will stop and wait for a "continue" or "fail" indication
- * from the environment.
- * @param text the message to print on the environment during the pause
- */
- public abstract void pause(String text);
-
- /**
- * A show operation will resolve a name to an image and show that image
- * in the current environment.
- * @param imageName the name of the image to resolve and show.
- */
- public abstract void show(String imageName);
-
- /**
- * A tell operation will show a string in the environment.
- * @param text the String to show.
- */
- public abstract void tell(String text);
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptInterpreter.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptInterpreter.java
deleted file mode 100644
index 70764c21a..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptInterpreter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * An interpreter runs a script in a particular context.
- */
-public class ScriptInterpreter extends SyntaxTreeVisitor {
-
- private ScriptContext context;
- private ScriptParserMessageList messageList = null;
-
- public ScriptInterpreter(ScriptContext context) {
- this.context = context;
- }
-
- /**
- * @param in the InputStream to be interpreted
- * @return true if the parsing and interpretation concluded successfully.
- * @throws IOException
- */
- public boolean run(InputStream in) throws IOException {
- messageList = new ScriptParserMessageList();
- ScriptParser p = new ScriptParser(messageList);
- Script script = p.parse(in);
- boolean success = false;
- if (script != null) {
- script.accept(this);
- success = !script.hasFailed();
- }
- return success;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.scripting.SyntaxTreeVisitor#enter(org.eclipse.rse.tests.framework.scripting.SyntaxNode)
- */
- public void enter(SyntaxNode node) {
- node.enter(context);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.scripting.SyntaxTreeVisitor#leave(org.eclipse.rse.tests.framework.scripting.SyntaxNode)
- */
- public void leave(SyntaxNode node) {
- node.leave(context);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParser.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParser.java
deleted file mode 100644
index b77cf30a1..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParser.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Stack;
-
-/**
- * A Parser is an object capable of taking a reader and producing a script from it.
- */
-public class ScriptParser {
- private ScriptParserMessageList messageList;
- private int lineNumber = 0;
- private String statement = null;
- private int statementLineNumber = 0;
- private BufferedReader in = null;
- private Stack nodes = null;
-
- /**
- * Creates a new parser on an existing MessageList. Any messages found
- * during parsing are added to this list.
- * @param messageList
- */
- public ScriptParser(ScriptParserMessageList messageList) {
- this.messageList = messageList;
- }
-
- /**
- * @param inStream The InputStream holding the input to the parser. The stream is left
- * open after parsing is completed. It is up to the client to close the stream
- * if necessary.
- * @return the Script produced by the parser or null if none was produced.
- * @throws IOException if an IO error occurs while reading the stream
- */
- public Script parse(InputStream inStream) throws IOException {
- lineNumber = 0;
- nodes = new Stack();
- nodes.push(new Script());
- in = new BufferedReader(new InputStreamReader(inStream));
- for (getStatement(); statement != null; getStatement()) {
- parseStatement();
- }
- Script result = null;
- SyntaxNode top = getCurrentNode();
- if (top != null) {
- if (top instanceof Script) {
- result = (Script) top;
- } else {
- messageList.add(new ScriptParserMessage(lineNumber, ScriptParserMessage.ERROR, "Incomplete statement")); //$NON-NLS-1$
- }
- } else {
- messageList.add(new ScriptParserMessage(lineNumber, ScriptParserMessage.ERROR, "Internal error")); //$NON-NLS-1$
- }
- return result;
- }
-
- private void parseStatement() {
- if (statement.startsWith("tell")) //$NON-NLS-1$
- parseTell();
- else if (statement.startsWith("show")) //$NON-NLS-1$
- parseShow();
- else if (statement.startsWith("pause")) //$NON-NLS-1$
- parsePause();
- else
- messageList.add(new ScriptParserMessage(lineNumber, ScriptParserMessage.ERROR, "Unrecognized statement")); //$NON-NLS-1$
- }
-
- private void parseTell() {
- String remark = statement.substring(4);
- remark = remark.trim();
- SyntaxNode tell = new ScriptTell(remark, statementLineNumber);
- getCurrentNode().add(tell);
- }
-
- private void parseShow() {
- String imageName = statement.substring(4);
- imageName = imageName.trim();
- SyntaxNode show = new ScriptShow(imageName, statementLineNumber);
- getCurrentNode().add(show);
- }
-
- private void parsePause() {
- String remark = statement.substring(5);
- remark = remark.trim();
- SyntaxNode pause = new ScriptPause(remark, statementLineNumber);
- getCurrentNode().add(pause);
- }
-
- private void getStatement() throws IOException {
- statement = null;
- String line = in.readLine();
- while (line != null) {
- lineNumber++;
- line = trimComment(line);
- line = line.trim();
- if (statement == null) {
- statementLineNumber = lineNumber;
- statement = line;
- } else {
- statement += line;
- }
- if (!statement.endsWith("+")) break; //$NON-NLS-1$
- statement = statement.substring(0, statement.length() - 1);
- line = in.readLine();
- }
- }
-
- private String trimComment(String line) {
- int n = line.indexOf('#');
- if (n >= 0) {
- line = line.substring(0, n);
- }
- return line;
- }
-
- private SyntaxNode getCurrentNode() {
- if (nodes.isEmpty()) return null;
- return (SyntaxNode) nodes.peek();
- }
-
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParserMessage.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParserMessage.java
deleted file mode 100644
index 7f6b3ecf0..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParserMessage.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.text.MessageFormat;
-
-/**
- * A message may indicate an error, warning or informational bit of information.
- * It may also contain data which may be retrieved.
- */
-public class ScriptParserMessage {
-
- public static final int INFO = 0;
- public static final int WARNING = 1;
- public static final int ERROR = 2;
- public static final int SEVERE = 3;
- private int severity = 0;
- private String text = ""; //$NON-NLS-1$
- private Object[] data = new Object[0];
- private int lineNumber;
-
- /**
- * Creates a new message with the given severity and text. The message is
- * not bound to any data values.
- * @param lineNumber the line number to which this message applies.
- * @param severity the severity of the message. Must be one of INFO, WARNING,
- * ERROR, or SEVERE.
- * @param text the text of the message in the form processable by MessageFormat.
- * @see MessageFormat
- * @throws IllegalArgumentException if the severity is invalid.
- */
- public ScriptParserMessage(int lineNumber, int severity, String text) {
- if (severity < INFO || severity > SEVERE) throw new IllegalArgumentException();
- this.lineNumber = lineNumber;
- this.severity = severity;
- this.text = text;
- }
-
- /**
- * Creates a new message with the given severity and text. The message is
- * bound to the given data values.
- * @param lineNumber the line number to which this message applies.
- * @param severity the severity of the message. Must be one of INFO, WARNING,
- * ERROR, or SEVERE.
- * @param text the text of the message in the form processable by MessageFormat.
- * @see MessageFormat
- * @param data the data values to which the message will be bound.
- * @throws IllegalArgumentException if the severity is invalid.
- */
- public ScriptParserMessage(int lineNumber, int severity, String text, Object[] data) {
- this.lineNumber = lineNumber;
- this.severity = severity;
- this.text = text;
- bind(data);
- }
-
- /**
- * @return the severity of the message.
- */
- public int getSeverity() {
- return severity;
- }
-
- /**
- * @return the unbound text of the message.
- */
- public String getText() {
- return text;
- }
-
- /**
- * @return the data values that this message is bound to. If the message is
- * unbound then this will return null.
- */
- public Object[] getData() {
- Object[] result = new Object[data.length];
- System.arraycopy(result, 0, data, 0, data.length);
- return result;
- }
-
- /**
- * @return Returns the line number of this message.
- */
- public int getLineNumber() {
- return lineNumber;
- }
-
- /**
- * Binds the data values to the message. It does not perform any subtitutions
- * at this time. A shallow copy of the array is made.
- * @param data the values to be bound to the message
- * @return the message itself.
- */
- public ScriptParserMessage bind(Object[] data) {
- this.data = new Object[data.length];
- System.arraycopy(data, 0, this.data, 0, data.length);
- return this;
- }
-
- /**
- * @return the string result of formating the text of the message using
- * the message data for substitution.
- */
- public String toString() {
- String result = MessageFormat.format(text, data);
- return result;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParserMessageList.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParserMessageList.java
deleted file mode 100644
index 24f57980e..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptParserMessageList.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.util.List;
-import java.util.Vector;
-
-/**
- * A MessageList is a collection of messages. Its severity is the highest
- * severity of the messages it contains.
- */
-public class ScriptParserMessageList {
-
- private List messages = new Vector(10); // the initial size is arbitrary
- private int severity = ScriptParserMessage.INFO;
-
- /**
- * @param message the message to add to this MessageList
- */
- public void add(ScriptParserMessage message) {
- messages.add(message);
- severity = Math.max(severity, message.getSeverity());
- }
-
- /**
- * @return the severity of this MessageList
- */
- public int getSeverity() {
- return severity;
- }
-
- /**
- * @return the messages in this message list
- */
- public ScriptParserMessage[] getMessages() {
- ScriptParserMessage[] result = new ScriptParserMessage[messages.size()];
- messages.toArray(result);
- return result;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptPause.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptPause.java
deleted file mode 100644
index 1a5c35c6d..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptPause.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-/**
- * A Pause step will stop and wait during interpretation
- */
-public class ScriptPause extends ScriptStep {
-
- private String text;
-
- public ScriptPause(String text, int lineNumber) {
- super(lineNumber);
- this.text = text;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext)
- */
- public void run(ScriptContext context) {
- context.pause(text);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptShow.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptShow.java
deleted file mode 100644
index 377a78b16..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptShow.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-/**
- * The Show step shows an image on the current context when run.
- */
-public class ScriptShow extends ScriptStep {
- private String imageName;
-
- public ScriptShow(String imageName, int lineNumber) {
- super(lineNumber);
- this.imageName = imageName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext)
- */
- public void run(ScriptContext context) {
- context.show(imageName);
- }
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptStep.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptStep.java
deleted file mode 100644
index eec629d0d..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptStep.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-/**
- * A Step accomplishes a single action. If the context is in fail mode then steps
- * are not executed.
- * show anImageName
- * tell aTextString
- * pause
- */
-abstract class ScriptStep extends SyntaxNode {
-
- /**
- * @param lineNumber The line number of this step. Used for diagnostics.
- */
- public ScriptStep(int lineNumber) {
- super(lineNumber);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#enter(org.eclipse.rse.tests.framework.scripting.ScriptContext)
- */
- public void enter(ScriptContext context) {
- if (context.getFailed()) return;
- run(context);
- }
-
- /**
- * Perform the action to be done by this step.
- * @param context the Context on which to perform the action.
- */
- public abstract void run(ScriptContext context);
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#leave(org.eclipse.rse.tests.framework.scripting.ScriptContext)
- */
- public final void leave(ScriptContext context) {
- }
-
-}
-
-
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTell.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTell.java
deleted file mode 100644
index 87d94b5d8..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTell.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-/**
- * The Tell step shows an image on the current context when run.
- */
-public class ScriptTell extends ScriptStep {
-
- private String text;
-
- public ScriptTell(String text, int lineNumber) {
- super(lineNumber);
- this.text = text;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext)
- */
- public void run(ScriptContext context) {
- context.tell(text);
- }
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTestCase.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTestCase.java
deleted file mode 100644
index 2b1ac05d0..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTestCase.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import org.eclipse.rse.tests.framework.AnnotatingTestCase;
-
-/**
- * All test scripts are instances of ScriptedTestCase.
- */
-public class ScriptTestCase extends AnnotatingTestCase {
-
- private URL scriptLocation;
- private ScriptContext context;
-
- public ScriptTestCase(ScriptContext context, URL scriptLocation) {
- super("runScript"); //$NON-NLS-1$
- this.context = context;
- this.scriptLocation = scriptLocation;
- }
-
- public void runScript() {
- ScriptInterpreter interpreter = new ScriptInterpreter(context);
- try {
- InputStream in = scriptLocation.openStream();
- boolean success = interpreter.run(in);
- in.close();
- assertTrue(success);
- } catch (IOException e) {
- fail("error reading " + scriptLocation.getPath()); //$NON-NLS-1$
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTestSuiteHolder.java
deleted file mode 100644
index f628f78d4..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/ScriptTestSuiteHolder.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.net.URL;
-import java.text.MessageFormat;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-import org.osgi.framework.Bundle;
-
-/**
- * A script test suite holder is holds a scripted test case which is present in a file
- * referenced by the extension point.
- */
-public class ScriptTestSuiteHolder extends DelegatingTestSuiteHolder {
-
- private TestSuite suite;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- if (suite == null) {
- String folderName = getStringValue("folder"); //$NON-NLS-1$
- if (folderName != null) {
- if (!folderName.endsWith("/")) { //$NON-NLS-1$
- folderName += "/"; //$NON-NLS-1$
- }
- String scriptName = getStringValue("script"); //$NON-NLS-1$
- if (scriptName == null) {
- scriptName = "script.txt"; //$NON-NLS-1$
- }
- Bundle bundle = getBundle();
- URL resourceLocation = bundle.getEntry(folderName);
- ScriptContext context = new ConsoleContext(System.out, resourceLocation);
- URL scriptLocation = context.getResourceURL(scriptName);
- ScriptTestCase test = new ScriptTestCase(context, scriptLocation);
- String title = MessageFormat.format("Script from folder {0}", new String[] {folderName}); //$NON-NLS-1$
- suite = new TestSuite(title);
- suite.addTest(test);
- } else {
- suite = new TestSuite("ERROR: Missing folder argument"); //$NON-NLS-1$
- }
- }
- return suite;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/SyntaxNode.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/SyntaxNode.java
deleted file mode 100644
index e70f992f2..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/SyntaxNode.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-/**
- * A syntax tree node. These are typically created by parsing some sort of
- * source document.
- */
-public abstract class SyntaxNode {
-
- private List children = new Vector(10); // the size is arbitrary
- private int lineNumber;
-
- /**
- * Constructs a syntax node for a particular line in the script. The line number
- * is used for diagnostic purposes.
- * @param lineNumber
- */
- public SyntaxNode(int lineNumber) {
- this.lineNumber = lineNumber;
- }
-
- /**
- * Adds a child to the list of children maintained by this node.
- * @param child the child node to add.
- */
- public void add(SyntaxNode child) {
- children.add(child);
- }
-
- /**
- * Accept a visitor to this node. The visitor is told to enter, each selected
- * child told to accept the visitor and then the visitor is told to leave.
- * @param visitor
- * @see SyntaxTreeVisitor#enter(SyntaxNode)
- * @see SyntaxTreeVisitor#leave(SyntaxNode)
- * @see SyntaxNode#accept(SyntaxTreeVisitor)
- * @see SyntaxNode#getSelectedChildren()
- */
- public void accept(SyntaxTreeVisitor visitor) {
- visitor.enter(this);
- List selected = getSelectedChildren();
- for (Iterator z = selected.iterator(); z.hasNext();) {
- SyntaxNode child = (SyntaxNode) z.next();
- child.accept(visitor);
- }
- visitor.leave(this);
- }
-
- /**
- * Perform any actions required when the Node is entered. This could include
- * setting any criteria for selection of children later on. (hint, hint)
- * @param context The context on which the action may be performed.
- */
- public abstract void enter(ScriptContext context);
-
- /**
- * Perform any actions required when the Node is left.
- * @param context The context on which the action may be performed.
- */
- public abstract void leave(ScriptContext context);
-
- /**
- * Returns the list of selected children.
- * The default implementation is to select all children.
- * Subclasses can override if necessary.
- * @return the List of selected children.
- */
- protected List getSelectedChildren() {
- return children;
- }
-
- public final int getLineNumber() {
- return lineNumber;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/SyntaxTreeVisitor.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/SyntaxTreeVisitor.java
deleted file mode 100644
index 761eaab90..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/scripting/SyntaxTreeVisitor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.scripting;
-
-/**
- * A visitor visits a node in a syntax tree.
- */
-public abstract class SyntaxTreeVisitor {
-
- /**
- * Inform the visitor that a node is being entered.
- * @param node
- */
- public abstract void enter(SyntaxNode node);
-
- /**
- * Inform the visitor that a node is being left.
- * @param node
- */
- public abstract void leave(SyntaxNode node);
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestPerspectiveFactory.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestPerspectiveFactory.java
deleted file mode 100644
index c8e8ec657..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestPerspectiveFactory.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.ui;
-
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-/**
- * Creates the test perspective.
- */
-public class TestPerspectiveFactory implements IPerspectiveFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
- */
- public void createInitialLayout(IPageLayout layout) {
- layout.setEditorAreaVisible(false);
- layout.addView("org.eclipse.rse.tests.framework.ConsoleView", IPageLayout.RIGHT, 0.30f, null); //$NON-NLS-1$
- layout.addView("org.eclipse.rse.tests.framework.ImageView", IPageLayout.LEFT, 0.70f, "org.eclipse.rse.tests.framework.ConsoleView"); //$NON-NLS-1$ //$NON-NLS-2$
- layout.addView("org.eclipse.rse.tests.framework.HolderView", IPageLayout.BOTTOM, 0.70f, "org.eclipse.rse.tests.framework.ImageView"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteConsoleView.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteConsoleView.java
deleted file mode 100644
index 2f07a8c8f..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteConsoleView.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.ui;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * Provides a view of any image that needs to be displayed by a test case.
- */
-public class TestSuiteConsoleView extends ViewPart {
-
- private Text console;
- private Color backgroundColor;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public void createPartControl(Composite parent) {
- console = new Text(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.READ_ONLY);
- backgroundColor = new Color(parent.getDisplay(), new RGB(255, 255, 255));
- clear();
- }
-
- public void add(String text) {
- if (!(console == null || console.isDisposed())) {
- String consoleText = console.getText();
- consoleText += text;
- console.setText(consoleText);
- }
- }
-
- public void clear() {
- if (!(console == null || console.isDisposed())) {
- console.setBackground(backgroundColor);
- console.setText(""); //$NON-NLS-1$
- }
- }
-
- public void setFocus() {
- }
-
- public void dispose() {
- if (!(backgroundColor == null || backgroundColor.isDisposed())) {
- backgroundColor.dispose();
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteHolderView.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteHolderView.java
deleted file mode 100644
index b48c90fde..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteHolderView.java
+++ /dev/null
@@ -1,436 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.ui;
-
-import java.net.URL;
-import java.text.DateFormat;
-import java.text.MessageFormat;
-import java.util.Calendar;
-import junit.framework.TestResult;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-import org.eclipse.rse.tests.framework.ITestSuiteHolder;
-import org.eclipse.rse.tests.framework.ITestSuiteHolderListener;
-import org.eclipse.rse.tests.framework.TestFrameworkPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Sash;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.part.ViewPart;
-import org.osgi.framework.Bundle;
-
-/**
- * Provides a view of the test suites installed in this workbench.
- */
-public class TestSuiteHolderView extends ViewPart implements ITestSuiteHolderListener, ISelectionChangedListener {
-
- private class MyLabelProvider implements ITableLabelProvider {
- public Image getColumnImage(Object element, int columnIndex) {
- AbstractTestSuiteHolder holder = (AbstractTestSuiteHolder) element;
- Image columnImage = null;
- String columnId = getColumnId(columnIndex);
- if (columnId.equals("graphic")) { //$NON-NLS-1$
- TestResult result = holder.getTestResult();
- if (result != null) {
- if (result.wasSuccessful()) {
- columnImage = graphicPassed;
- } else {
- columnImage = graphicFailed;
- }
- } else {
- columnImage = graphicUnknown;
- }
- }
- return columnImage;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- AbstractTestSuiteHolder holder = (AbstractTestSuiteHolder) element;
- String columnText = null;
- String columnId = getColumnId(columnIndex);
- if (columnId.equals("name")) { //$NON-NLS-1$
- columnText = holder.getName();
- } else if (columnId.equals("graphic")) { //$NON-NLS-1$
- columnText = ""; //$NON-NLS-1$
- } else if (columnId.equals("status")) { //$NON-NLS-1$
- TestResult result = holder.getTestResult();
- if (result != null) {
- Object[] values = { new Integer(result.runCount()), new Integer(result.failureCount()), new Integer(result.errorCount()) };
- String template = "{0,number,integer} run, {1,number,integer} failed, {2,number,integer} errors"; //$NON-NLS-1$
- columnText = MessageFormat.format(template, values);
- } else {
- columnText = ""; //$NON-NLS-1$
- }
- } else if (columnId.equals("stamp")) { //$NON-NLS-1$
- Calendar stamp = holder.getLastRunTime();
- if (stamp != null) {
- DateFormat formatter = DateFormat.getDateTimeInstance();
- columnText = formatter.format(stamp.getTime());
- } else {
- columnText = ""; //$NON-NLS-1$
- }
- }
- return columnText;
- }
-
- public void addListener(ILabelProviderListener listener) {
- }
-
- public void dispose() {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- }
- }
-
- private abstract class ColumnSorter extends ViewerSorter {
- boolean ascending = false;
- public void reverse() {
- ascending = !ascending;
- }
- public int compare(Viewer viewer, Object e1, Object e2) {
- String key1 = getKey(e1);
- String key2 = getKey(e2);
- int result = key1.compareTo(key2);
- if (!ascending) result = -result;
- return result;
- }
- public abstract String getKey(Object e);
- }
-
- private class GraphicSorter extends ColumnSorter {
- public String getKey(Object e) {
- AbstractTestSuiteHolder h = (AbstractTestSuiteHolder) e;
- TestResult r = h.getTestResult();
- if (r == null) return "0" + r; //$NON-NLS-1$
- if (r.failureCount() > 0) return "1" + r; //$NON-NLS-1$
- if (r.errorCount() > 0) return "1" + r; //$NON-NLS-1$
- return "2" + r; //$NON-NLS-1$
- }
- }
-
- private class NameSorter extends ColumnSorter {
- public String getKey(Object e) {
- return ((AbstractTestSuiteHolder)e).getName();
- }
- }
-
- private class StatusSorter extends ColumnSorter {
- public String getKey(Object e) {
- return ""; //$NON-NLS-1$
- }
- }
-
- private class StampSorter extends ColumnSorter {
- public String getKey(Object e) {
- AbstractTestSuiteHolder h = (AbstractTestSuiteHolder) e;
- Calendar c = h.getLastRunTime();
- long t = 0;
- if (c != null) t = c.getTimeInMillis();
- String k = "0000000000000000000000000" + Long.toString(t); //$NON-NLS-1$
- k = k.substring(k.length() - 25);
- k += h.getName();
- return k;
- }
- }
-
- private class ColumnListener implements SelectionListener {
- ColumnSorter sorter;
- public ColumnListener(ColumnSorter sorter) {
- this.sorter = sorter;
- }
- public void widgetSelected(SelectionEvent e) {
- if (holderViewer.getSorter() == sorter) {
- sorter.reverse();
- holderViewer.refresh();
- } else {
- holderViewer.setSorter(sorter);
- }
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- }
-
- private SelectionListener graphicListener = new ColumnListener(new GraphicSorter());
- private SelectionListener nameListener = new ColumnListener(new NameSorter());
- private SelectionListener statusListener = new ColumnListener(new StatusSorter());
- private SelectionListener stampListener = new ColumnListener(new StampSorter());
-
- private TableViewer holderViewer;
- private Text resultsText;
- private ArrayContentProvider contentProvider = new ArrayContentProvider();
- private MyLabelProvider labelProvider = new MyLabelProvider();
- private ITestSuiteHolder[] holders = DelegatingTestSuiteHolder.getHolders();
- private String[] columnIds = {"graphic", "name", "status", "stamp"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- private int[] columnWidths = {20, 200, 150, 150};
- private String[] columnTitles = {"", "Test Suite", "Summary", "Time Run"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- private SelectionListener[] columnListeners = {graphicListener, nameListener, statusListener, stampListener};
- private boolean[] columnResizable = {false, true, true, true};
- private boolean[] columnMoveable = {false, true, true, true};
- private Image graphicFailed = null;
- private Image graphicPassed = null;
- private Image graphicUnknown = null;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public void createPartControl(Composite parent) {
- // create images
- graphicFailed = createImage("icons/RedX.gif"); //$NON-NLS-1$
- graphicPassed = createImage("icons/GreenCheck.gif"); //$NON-NLS-1$
- graphicUnknown = createImage("icons/YellowQuestion.gif"); //$NON-NLS-1$
-
- // holders viewer
- Table table = new Table(parent, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(false);
- int n = columnIds.length;
- for (int i = 0; i < n; i++) {
- TableColumn column = new TableColumn(table, SWT.NONE);
- column.setData("id", columnIds[i]); //$NON-NLS-1$
- column.setText(columnTitles[i]);
- column.setWidth(columnWidths[i]);
- column.setResizable(columnResizable[i]);
- column.setMoveable(columnMoveable[i]);
- column.addSelectionListener(columnListeners[i]);
- }
- holderViewer = new TableViewer(table);
-
- // menu for above viewer
- MenuManager menuManager = new MenuManager();
- getSite().registerContextMenu(menuManager, holderViewer);
- Control control = holderViewer.getControl();
- control.setMenu(menuManager.createContextMenu(control));
- IContributionItem item = new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS);
- menuManager.add(item);
-
- // sash
- Sash sash = new Sash(parent, SWT.HORIZONTAL);
- sash.addSelectionListener(
- new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- Sash s = (Sash) e.widget;
- FormData fd = (FormData) s.getLayoutData();
- fd.top = new FormAttachment(0, e.y);
- s.getParent().layout();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- }
- );
-
- // results viewer
- resultsText = new Text(parent, SWT.READ_ONLY | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
-
- // control layout
- parent.setLayout(new FormLayout());
- FormData fd = null;
-
- // holder viewer layout
- fd = new FormData();
- fd.top = new FormAttachment(0, 0);
- fd.bottom = new FormAttachment(sash, 0);
- fd.left = new FormAttachment(0, 0);
- fd.right = new FormAttachment(100, 0);
- holderViewer.getControl().setLayoutData(fd);
-
- // sash layout
- fd = new FormData();
- fd.top = new FormAttachment(50, 0);
- fd.height = 3;
- fd.left = new FormAttachment(0, 0);
- fd.right = new FormAttachment(100, 0);
- sash.setLayoutData(fd);
-
- // results viewer layout
- fd = new FormData();
- fd.top = new FormAttachment(sash, 0);
- fd.bottom = new FormAttachment(100, 0);
- fd.left = new FormAttachment(0, 0);
- fd.right = new FormAttachment(100, 0);
- resultsText.setLayoutData(fd);
-
- // set up the contents of the holder viewer
- holderViewer.setContentProvider(contentProvider);
- holderViewer.setLabelProvider(labelProvider);
- holderViewer.setInput(holders);
- for (int i = 0; i < holders.length; i++) {
- ITestSuiteHolder holder = holders[i];
- holder.addListener(this);
- }
- holderViewer.setSelection(new StructuredSelection());
- holderViewer.addSelectionChangedListener(this);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- StructuredSelection sel = (StructuredSelection)event.getSelection();
- if (sel.size() == 1) {
- AbstractTestSuiteHolder holder = (AbstractTestSuiteHolder)sel.getFirstElement();
- resultsText.setText(holder.getResultString());
- } else {
- resultsText.setText(""); //$NON-NLS-1$
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolderListener#testEnded(org.eclipse.rse.tests.framework.ITestSuiteHolder)
- */
- public void testEnded(ITestSuiteHolder holder) {
- updateHolderInView(holder);
- updateResultString(holder);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.ITestSuiteHolderListener#testHolderReset(org.eclipse.rse.tests.framework.ITestSuiteHolder)
- */
- public void testHolderReset(ITestSuiteHolder holder) {
- updateHolderInView(holder);
- updateResultString(holder);
- }
-
- /**
- * Columns in this table may be reordered. Given a column index retrieve its id.
- * @param columnIndex the index of the column
- * @return The string id of the column. Will be null if no id has been assigned or columnIndex is out
- * of range.
- */
- private String getColumnId(int columnIndex) {
- String columnId = null;
- if (holderViewer != null) {
- Table table = holderViewer.getTable();
- int n = table.getColumnCount();
- if (0 <= columnIndex && columnIndex < n) {
- TableColumn column = table.getColumn(columnIndex);
- if (column != null) {
- columnId = (String) column.getData("id"); //$NON-NLS-1$
- }
- }
- }
- return columnId;
- }
-
- /**
- * Updates the view of the particular holder. Can be run from a non-UI thread.
- * @param holder
- */
- private void updateHolderInView(final ITestSuiteHolder holder) {
- Runnable runnable = new Runnable() {
- public void run() {
- holderViewer.update(holder, null);
- }
- };
- Control control = holderViewer.getControl();
- if (!control.isDisposed()) {
- control.getDisplay().syncExec(runnable);
- }
- }
-
- /**
- * Updates the result string for the holder if the holder is the only one in the
- * current selection. Can be run from a non-UI thread.
- * @param holder
- */
- private void updateResultString(final ITestSuiteHolder holder) {
- Runnable runnable = new Runnable() {
- public void run() {
- StructuredSelection sel = (StructuredSelection)holderViewer.getSelection();
- if (sel.size() == 1) {
- AbstractTestSuiteHolder holder = (AbstractTestSuiteHolder)sel.getFirstElement();
- resultsText.setText(holder.getResultString());
- } else {
- resultsText.setText(""); //$NON-NLS-1$
- }
- }
- };
- if (!resultsText.isDisposed()) {
- resultsText.getDisplay().syncExec(runnable);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- for (int i = 0; i < holders.length; i++) {
- ITestSuiteHolder holder = holders[i];
- holder.removeListener(this);
- }
- graphicFailed.dispose();
- graphicPassed.dispose();
- graphicUnknown.dispose();
- }
-
- public Image createImage(String imageName) {
- Plugin plugin = TestFrameworkPlugin.getDefault();
- IPath path = new Path(imageName);
- Bundle bundle = plugin.getBundle();
- URL url = FileLocator.find(bundle, path, null);
- ImageDescriptor descriptor = ImageDescriptor.createFromURL(url);
- Image image = descriptor.createImage();
- return image;
- }
-
- /**
- * Selects all the holders in the view.
- */
- public void selectAll() {
- if (!holderViewer.getControl().isDisposed()) {
- StructuredSelection selection = new StructuredSelection(holders);
- holderViewer.setSelection(selection);
- }
- }
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteImageView.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteImageView.java
deleted file mode 100644
index 4293509fc..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/tests/framework/ui/TestSuiteImageView.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.framework.ui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * Provides a view of any image that needs to be displayed by a test case.
- */
-public class TestSuiteImageView extends ViewPart {
-
- private Canvas imageCanvas;
- private Image image;
- private Color backgroundColor;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public void createPartControl(Composite parent) {
- imageCanvas = new Canvas(parent, SWT.H_SCROLL | SWT.V_SCROLL);
- backgroundColor = new Color(parent.getDisplay(), new RGB(255, 255, 255));
- clearImage();
- }
-
- public void setImage(ImageDescriptor descriptor) {
- clearImage();
- image = descriptor.createImage();
- imageCanvas.setBackgroundImage(image);
- }
-
- public void clearImage() {
- if (imageCanvas != null) {
- imageCanvas.setBackground(backgroundColor);
- }
- if (image != null) {
- image.dispose();
- }
- image = null;
- }
-
- public void setFocus() {
- }
-
- public void dispose() {
- clearImage();
- backgroundColor.dispose();
- }
-
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.framework/toc.xml b/rse/tests/org.eclipse.rse.tests.framework/toc.xml
deleted file mode 100644
index e03920b92..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/toc.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="The Artemis Test Framework">
- <topic label="Purpose" href="html/purpose.html"/>
- <topic label="Using The Test Suite View" href="html/view.html"/>
- <topic label="Plugging in" href="html/plugging.html"/>
- <topic label="Future Items" href="html/futures.html"/>
-</toc>
diff --git a/rse/tests/org.eclipse.rse.tests.manual/.project b/rse/tests/org.eclipse.rse.tests.manual/.project
deleted file mode 100644
index 29b9455a1..000000000
--- a/rse/tests/org.eclipse.rse.tests.manual/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.tests.manual</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/rse/tests/org.eclipse.rse.tests.manual/about.html b/rse/tests/org.eclipse.rse.tests.manual/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/tests/org.eclipse.rse.tests.manual/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests.manual/manual_tests.html b/rse/tests/org.eclipse.rse.tests.manual/manual_tests.html
deleted file mode 100644
index 8ed4d5b3b..000000000
--- a/rse/tests/org.eclipse.rse.tests.manual/manual_tests.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>RSE Manual Test Plan</title>
- <meta content="Martin Oberhuber" name="author">
-</head>
-<body>
-<h1>RSE Manual Test Plan</h1>
-<br>
-<h2>Basic sanity test</h2>
-Goal: Detect obvious problems that users would notice immediately.<br>
-Configurations: Windows, Linux.<br>
-When to run: Every I-build, M-build and R-build.<br>
-<ul>
- <li>Start a dstore daemon on the local host</li>
- <li>Download RSE-SDK into Eclipse-Platform. Start RSE client on a
-fresh workspace, open RSE Perspective<br>
- </li>
- <li>Create a new dstore connection (type: Windows, Linux or UNIX) to
-the local host</li>
- <ul>
- <li>In the Wizard, press Finish on the first page already<br>
- </li>
- </ul>
- <li>asdf</li>
-</ul>
-<h2>Erroneous Input</h2>
-Goal: Make sure that the system does not crash or get unusable due to
-erroneous input. Make sure that error messages are clear and helpful.<br>
-Configurations: Windows, Linux.<br>
-When to run: M-build<br>
-<h2>GUI Elements</h2>
-Goal: Make sure that all GUI elements actually work<br>
-<h2>Preferences</h2>
-Goal: Make sure that all Preference settings actually work.<br>
-<h2>Parallel operations / Synchronization</h2>
-Goal: Make sure that multiple parallel operations do not bring the
-system into inconsistent state.<br>
-<h2>Team Profiles</h2>
-Goal: Make sure that Team Profiles work.<br>
-<h2>Examples</h2>
-Goal: Make sure that Examples and Tutorials work as documented.<br>
-Configuration: Windows only<br>
-When to run: R-build<br>
-<br>
-</body>
-</html>
diff --git a/rse/tests/org.eclipse.rse.tests.manual/readme.txt b/rse/tests/org.eclipse.rse.tests.manual/readme.txt
deleted file mode 100644
index b45f5ff2e..000000000
--- a/rse/tests/org.eclipse.rse.tests.manual/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-This project contains instructions for manual testing RSE.
diff --git a/rse/tests/org.eclipse.rse.tests/.classpath b/rse/tests/org.eclipse.rse.tests/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/tests/org.eclipse.rse.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/tests/org.eclipse.rse.tests/.project b/rse/tests/org.eclipse.rse.tests/.project
deleted file mode 100644
index 0b0e2b5a0..000000000
--- a/rse/tests/org.eclipse.rse.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.core.prefs b/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 785e6083b..000000000
--- a/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,78 +0,0 @@
-#Thu Dec 21 14:30:54 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.4
diff --git a/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.ui.prefs b/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index a8af14299..000000000
--- a/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,59 +0,0 @@
-#Thu Dec 21 14:47:13 CET 2006
-cleanup.add_default_serial_version_id=false
-cleanup.add_generated_serial_version_id=true
-cleanup.add_missing_annotations=true
-cleanup.add_missing_deprecated_annotations=true
-cleanup.add_missing_nls_tags=false
-cleanup.add_missing_override_annotations=true
-cleanup.add_serial_version_id=true
-cleanup.always_use_blocks=true
-cleanup.always_use_parentheses_in_expressions=false
-cleanup.always_use_this_for_non_static_field_access=false
-cleanup.always_use_this_for_non_static_method_access=false
-cleanup.convert_to_enhanced_for_loop=false
-cleanup.format_comment=true
-cleanup.format_javadoc=true
-cleanup.format_multi_line_comment=true
-cleanup.format_single_line_comment=true
-cleanup.format_source_code=true
-cleanup.make_local_variable_final=true
-cleanup.make_parameters_final=false
-cleanup.make_private_fields_final=true
-cleanup.make_variable_declarations_final=false
-cleanup.never_use_blocks=false
-cleanup.never_use_parentheses_in_expressions=true
-cleanup.organize_imports=true
-cleanup.qualify_static_field_accesses_with_declaring_class=false
-cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-cleanup.qualify_static_member_accesses_with_declaring_class=true
-cleanup.qualify_static_method_accesses_with_declaring_class=false
-cleanup.remove_private_constructors=true
-cleanup.remove_unnecessary_casts=true
-cleanup.remove_unnecessary_nls_tags=true
-cleanup.remove_unused_imports=true
-cleanup.remove_unused_local_variables=false
-cleanup.remove_unused_private_fields=true
-cleanup.remove_unused_private_members=false
-cleanup.remove_unused_private_methods=true
-cleanup.remove_unused_private_types=true
-cleanup.use_blocks=true
-cleanup.use_blocks_only_for_return_and_throw=false
-cleanup.use_parentheses_in_expressions=false
-cleanup.use_this_for_non_static_field_access=false
-cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-cleanup.use_this_for_non_static_method_access=false
-cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-cleanup_profile=_RSE JUnittest Code Cleanup Profile
-cleanup_settings_version=2
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
diff --git a/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.ltk.core.refactoring.prefs b/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 0fd7e0a11..000000000
--- a/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.ltk.core.refactoring.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Dec 21 14:47:13 CET 2006
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/rse/tests/org.eclipse.rse.tests/META-INF/MANIFEST.MF b/rse/tests/org.eclipse.rse.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index dc4076740..000000000
--- a/rse/tests/org.eclipse.rse.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.tests;singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.rse.tests.RSETestsPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.junit,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.ui,
- org.eclipse.rse.core,
- org.eclipse.rse.ui,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.tests.framework,
- org.eclipse.ui.views,
- org.eclipse.rse.services
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.tests,
- org.eclipse.rse.tests.core,
- org.eclipse.rse.tests.core.connection,
- org.eclipse.rse.tests.testsubsystem,
- org.eclipse.rse.tests.testsubsystem.interfaces
-Bundle-ClassPath: rsetests.jar
diff --git a/rse/tests/org.eclipse.rse.tests/about.html b/rse/tests/org.eclipse.rse.tests/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/tests/org.eclipse.rse.tests/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/about.ini b/rse/tests/org.eclipse.rse.tests/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/rse/tests/org.eclipse.rse.tests/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/about.mappings b/rse/tests/org.eclipse.rse.tests/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/tests/org.eclipse.rse.tests/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/about.properties b/rse/tests/org.eclipse.rse.tests/about.properties
deleted file mode 100644
index 321e58e07..000000000
--- a/rse/tests/org.eclipse.rse.tests/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation, Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Remote System Explorer Unit Tests\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/build.properties b/rse/tests/org.eclipse.rse.tests/build.properties
deleted file mode 100644
index bf7220f33..000000000
--- a/rse/tests/org.eclipse.rse.tests/build.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (Wind River) - fix ant build and make consistent
-###############################################################################
-source.rsetests.jar = src/
-output.rsetests.jar = bin/
-bin.includes = rsetests.jar,\
- plugin.xml,\
- META-INF/,\
- test.data/,\
- test.xml,\
- plugin.properties,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- eclipse32.png,\
- icons/
-
-# build with "assert" keyword enabled
-javacSource = 1.4
-javacTarget = 1.4
-source.rsetests.jar = src/
-src.includes = .settings/,\
- teamConfig/
diff --git a/rse/tests/org.eclipse.rse.tests/eclipse32.png b/rse/tests/org.eclipse.rse.tests/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/rse/tests/org.eclipse.rse.tests/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests/icons/branch.gif b/rse/tests/org.eclipse.rse.tests/icons/branch.gif
deleted file mode 100644
index 3ce1ae4e5..000000000
--- a/rse/tests/org.eclipse.rse.tests/icons/branch.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests/icons/leaf.gif b/rse/tests/org.eclipse.rse.tests/icons/leaf.gif
deleted file mode 100644
index be83d3942..000000000
--- a/rse/tests/org.eclipse.rse.tests/icons/leaf.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests/icons/systemconnection.gif b/rse/tests/org.eclipse.rse.tests/icons/systemconnection.gif
deleted file mode 100644
index e8efe69dc..000000000
--- a/rse/tests/org.eclipse.rse.tests/icons/systemconnection.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests/icons/systemconnectionlive.gif b/rse/tests/org.eclipse.rse.tests/icons/systemconnectionlive.gif
deleted file mode 100644
index f97fa6b48..000000000
--- a/rse/tests/org.eclipse.rse.tests/icons/systemconnectionlive.gif
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests/plugin.properties b/rse/tests/org.eclipse.rse.tests/plugin.properties
deleted file mode 100644
index 3e652a064..000000000
--- a/rse/tests/org.eclipse.rse.tests/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (Wind River) - fix ant build for "assert", make consistent
-###############################################################################
-pluginName=RSE Unit Tests
-providerName=Eclipse.org
-
-testSubSystemName = Tests
-testSubSystemDescription = Test Subsystem \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/plugin.xml b/rse/tests/org.eclipse.rse.tests/plugin.xml
deleted file mode 100644
index f49f1e527..000000000
--- a/rse/tests/org.eclipse.rse.tests/plugin.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension point="org.eclipse.rse.tests.framework.suites">
- <suite type="org.eclipse.rse.tests.RSECombinedTestSuite" name="RSE Combined Test Suite"/>
- <type name="org.eclipse.rse.tests.RSECombinedTestSuite" class="org.eclipse.rse.tests.RSECombinedTestSuite" />
-
- <suite type="org.eclipse.rse.tests.internal.RSEInternalFrameworkTestSuite" name="RSE Internal Framework Test Suite"/>
- <type name="org.eclipse.rse.tests.internal.RSEInternalFrameworkTestSuite" class="org.eclipse.rse.tests.internal.RSEInternalFrameworkTestSuite" />
-
- <suite type="org.eclipse.rse.tests.core.connection.RSEConnectionTestSuite" name="RSE Connection Test Suite"/>
- <type name="org.eclipse.rse.tests.core.connection.RSEConnectionTestSuite" class="org.eclipse.rse.tests.core.connection.RSEConnectionTestSuite" />
-
- <suite type="org.eclipse.rse.tests.files.RSEFileTestSuite" name="RSE File Test Suite"/>
- <type name="org.eclipse.rse.tests.files.RSEFileTestSuite" class="org.eclipse.rse.tests.files.RSEFileTestSuite" />
- </extension>
-
- <extension point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- id="org.eclipse.rse.tests.subsystems.TestSubSystem"
- systemTypes="Local;Windows"
- name="%testSubSystemName"
- class="org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemConfiguration"
- category="users"
- vendor="%providerName"
- description="%testSubSystemDescription"
- iconlive="icons/systemconnectionlive.gif"
- icon="icons/systemconnection.gif"
- priority="50000">
- </configuration>
- </extension>
-</plugin>
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSECombinedTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSECombinedTestSuite.java
deleted file mode 100644
index e867108f7..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSECombinedTestSuite.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.core.connection.RSEConnectionTestSuite;
-import org.eclipse.rse.tests.files.RSEFileTestSuite;
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-import org.eclipse.rse.tests.internal.RSEInternalFrameworkTestSuite;
-
-/**
- * Main class bundling all single specialized test suites into a
- * overall complete one.
- */
-public class RSECombinedTestSuite extends DelegatingTestSuiteHolder {
-
- /**
- * Standard Java application main method. Allows to launch the test
- * suite from outside as part of nightly runs, headless runs or other.
- * <p><b>Note:</b> Use only <code>junit.textui.TestRunner</code> here as
- * it is explicitly supposed to output the test output to the shell the
- * test suite has been launched from.
- * <p>
- * @param args The standard Java application command line parameters passed in.
- */
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- /**
- * Combine all test into a suite and returns the test suite instance.
- * <p>
- * <b>Note: This method must be always called <i><code>suite</code></i> ! Otherwise
- * the JUnit plug-in test launcher will fail to detect this class!</b>
- * <p>
- * @return The test suite instance.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite("RSE Combined Test Suite"); //$NON-NLS-1$
-
- // add the single test suites to the overall one here.
- suite.addTest(RSEInternalFrameworkTestSuite.suite());
- suite.addTest(RSEConnectionTestSuite.suite());
- suite.addTest(RSEFileTestSuite.suite());
-
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)RSECombinedTestSuite.suite();
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsPlugin.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsPlugin.java
deleted file mode 100644
index 34611518c..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsPlugin.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Don Yantzi (IBM) - initial contribution.
- * David Dykstal (IBM) - initial contribution.
- * Uwe Stieber (Wind River) - restructuring and cleanup
- * *******************************************************************************/
-package org.eclipse.rse.tests;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.tests.core.IRSETestLogCollectorDelegate;
-import org.eclipse.rse.tests.internal.RSEDefaultTestLogCollectorDelegate;
-import org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemAdapterFactory;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystem;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemConfiguration;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNode;
-import org.osgi.framework.BundleContext;
-
-/**
- * Main plugin class for the RSE JUnit tests framework. This
- * class provides basic infra structure for accessing externalized
- * string data.
- */
-public class RSETestsPlugin extends SystemBasePlugin {
- // The shared plugin instance.
- private static RSETestsPlugin plugin;
- // The resource bundle associated with this plugin.
- private ResourceBundle resourceBundle;
-
- // Test log collector delegates storage.
- private final List logCollectorDelegates = new ArrayList();
-
- // Default test log collector delegate
- private final IRSETestLogCollectorDelegate defaultLogCollectorDelegate = new RSEDefaultTestLogCollectorDelegate();
-
- /**
- * Constructor.
- */
- public RSETestsPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared plugin instance.
- *
- * @return The plugin instance or <code>null</code> if not yet constructed.
- */
- public static RSETestsPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the associated resource bundle. If necessary, the resource
- * bundle will be initialized.
- *
- * @return The resource bundle instance.
- */
- public ResourceBundle getResourceBundle() {
- // If the resource bundle got created already, return the
- // existing instance.
- if (resourceBundle != null) return resourceBundle;
-
- // The resource bundle had not been created yet -> create it.
- resourceBundle = ResourceBundle.getBundle("org.eclipse.rse.tests.RSETestsResources"); //$NON-NLS-1$
- return resourceBundle;
- }
-
- /**
- * Queries the externalized string for the specified resource key from
- * the plugins associated resource bundle.
- *
- * @param key The resource key. Must be not <code>null</code>!
- * @return The externalized string or the resource key enclosed in exlamation marks.
- */
- public static String getResourceString(String key) {
- assert key != null;
-
- // Query the resource bundle from the plugin instance.
- ResourceBundle bundle = RSETestsPlugin.getDefault().getResourceBundle();
- if (bundle != null) {
- try {
- // Lookup the key and return the corresponding string if found.
- return bundle.getString(key);
- } catch (MissingResourceException e) {
- // return the key as is enclosed in exlamation marks.
- }
- }
-
- // If we could not found the key or the bundle is invalid,
- // return the key as is enclosed in exlamation marks.
- return '!' + key + '!';
- }
-
- /**
- * Queries the externalized string for the specified resource key from
- * the plugins associated resource bundle. If a externalized resource
- * for the specified key exist, a possible argument placeholder will be
- * replaced by the specified value.
- *
- * @param key The resource key. Must be not <code>null</code>!
- * @param argument The content for a possible placeholder. Must be not <code>null</code>.
- * @return The externalized string or the resource key enclosed in exlamation marks.
- */
- public static String getResourceString(String key, Object argument) {
- assert argument != null;
- return getResourceString(key, new Object[] { argument });
- }
-
- /**
- * Queries the externalized string for the specified resource key from
- * the plugins associated resource bundle. If a externalized resource
- * for the specified key exist, possible argument placeholder will be
- * replaced by their specified values.
- *
- * @param key The resource key. Must be not <code>null</code>!
- * @param arguments The content for the possible arguments. Must be not <code>null</code>.
- * @return The externalized string or the resource key enclosed in exlamation marks.
- */
- public static String getResourceString(String key, Object[] arguments) {
- assert arguments != null;
- String resourceString = getResourceString(key);
- if (!resourceString.startsWith("!")) { //$NON-NLS-1$
- return MessageFormat.format(resourceString, arguments);
- }
- return resourceString;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- addDelegate(defaultLogCollectorDelegate);
-
- IAdapterManager manager = Platform.getAdapterManager();
- TestSubSystemAdapterFactory subSystemAdapterFactory = new TestSubSystemAdapterFactory();
- manager.registerAdapters(subSystemAdapterFactory, ITestSubSystem.class);
- manager.registerAdapters(subSystemAdapterFactory, ITestSubSystemNode.class);
- manager.registerAdapters(subSystemAdapterFactory, ITestSubSystemConfiguration.class);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- removeDelegate(defaultLogCollectorDelegate);
- super.stop(context);
- }
-
- /**
- * Checks if the test case given through the specified key is enabled for
- * execution. A test case is considered enabled if either<br>
- * <ul>
- * <li>-D&lt;testId&gt; is true or</li>
- * <li>getResourceString(&lt;testId&gt;) is true or</li>
- * <li>neither the explicit -D option is specified nor the key exist in the associated
- * resource bundle.</li>
- * </ul>
- *
- * @param testId The unique string id of the test case to execute. Must be not <code>null</code>!
- * @return <code>true</code> if the test case is enabled for execution, <code>false</code> otherwise.
- */
- public static boolean isTestCaseEnabled(String testId) {
- assert testId != null;
-
- // Test first for the system property (explicit -D option).
- String value = System.getProperty(testId);
- if (value != null) return Boolean.getBoolean(value);
-
- // If the system property is not set, check for the key in the resource bundle
- value = getResourceString(testId);
- if (value != null && !value.startsWith("!")) return Boolean.valueOf(value).booleanValue(); //$NON-NLS-1$
-
- // the test is considered enabled as well if not otherwise explicitly overriden
- return true;
- }
-
- /**
- * Add the specified test collector delegate to the list. If the specified
- * delegate had been already added to the list before, the method will return
- * without re-adding the test collector delegate again.
- *
- * @param delegate The test collector delegate to add. Must be not <code>null</code>.
- */
- public synchronized void addDelegate(IRSETestLogCollectorDelegate delegate) {
- assert delegate != null;
- if (delegate != null && !logCollectorDelegates.contains(delegate)) {
- logCollectorDelegates.add(delegate);
- }
- }
-
- /**
- * Removes the specified test collector delegate from the list. If the specified
- * delegate had not been added to the list before, the method will return immediatelly.
- *
- * @param delegate The test collector delegate to remove. Must be not <code>null</code>.
- */
- public synchronized void removeDelegate(IRSETestLogCollectorDelegate delegate) {
- assert delegate != null;
- if (delegate != null) {
- logCollectorDelegates.remove(delegate);
- }
- }
-
- /**
- * Returns the currently list of known test log collector delegates.
- *
- * @return The currently known list of test collector delegates.
- */
- public synchronized IRSETestLogCollectorDelegate[] getTestLogCollectorDelegates() {
- return (IRSETestLogCollectorDelegate[])logCollectorDelegates.toArray(new IRSETestLogCollectorDelegate[logCollectorDelegates.size()]);
- }
-
- /**
- * Initialize the image registry by declaring all of the required graphics.
- */
- protected void initializeImageRegistry() {
- String path = getIconPath();
- putImageInRegistry("ICON_ID_BRANCH", path + "branch.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- putImageInRegistry("ICON_ID_LEAF", path + "leaf.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
-
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsResources.properties b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsResources.properties
deleted file mode 100644
index af007a38d..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsResources.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Uwe Stieber (Wind River) - Rework test data location & connection management
-###############################################################################
-
-#
-# The following section controls the execution of the single test cases.
-# Each test case can be disabled individually here.
-#
-
-RSETestsPluginTestCase.testPluginResourceBundle=true
-
-RSEInternalFrameworkTestCase.testCoreTestPropertiesHandling=true
-RSEInternalFrameworkTestCase.testWaitAndDispatch=true
-RSEInternalFrameworkTestCase.testTestDataLocationManagement=true
-RSEInternalFrameworkTestCase.testConnectionManager=true
-
-RSEConnectionTestCase.testConnectionCreation=true
-RSEConnectionTestCase.testConnectionRemoval=true
-RSEConnectionTestCase.testConnect=true
-RSEConnectionTestCase.testResolveFilterString=true
-
-#
-# The following section contains externalized string for the single classes
-#
-
-RSETestsPluginTestCase.dontRemove.testNeverEnabledThis=false
-RSETestsPluginTestCase.dontRemove.testResolveString=testResolveString
-RSETestsPluginTestCase.dontRemove.testResolveStringOneParameter=testResolveString, param={0}
-RSETestsPluginTestCase.dontRemove.testResolveStringMultiParameter=testResolveString, param={0}, param={1}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSECoreTestCaseProperties.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSECoreTestCaseProperties.java
deleted file mode 100644
index 6ba738535..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSECoreTestCaseProperties.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.core;
-
-/**
- * Interface declaring public known and usable core test case properties.
- */
-public interface IRSECoreTestCaseProperties {
- static final String PROP_BASE_KEY = "org.eclipse.rse.tests.core"; //$NON-NLS-1$
-
- /**
- * Boolean property controling if or if not the Remote Systems View will be
- * expanded before the test case is starting. The original view maximized
- * state will be restored after the test case finished.
- * <p>
- * Default value is <b><code>false</code></b>.
- */
- public static final String PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW = PROP_BASE_KEY + ".maximizeRemoteSystemsView"; //$NON-NLS-1$
-
- /**
- * String property specifying the perspective id to switch to before the
- * test case is starting. The original perspective will be restored after
- * the test case finished.
- * <p>
- * Default value is <b><code>org.eclipse.rse.ui.view.SystemPerspective</code></b>.
- */
- public static final String PROP_SWITCH_TO_PERSPECTIVE = PROP_BASE_KEY + ".switchToPerspective"; //$NON-NLS-1$
-
- /**
- * Boolean property controling if the test execution should be forced into a non
- * display thread (if not already running in a non display thread anyway).
- * <p>
- * Default value is <b><code>false</code></b>.
- */
- public static final String PROP_FORCE_BACKGROUND_EXECUTION = PROP_BASE_KEY + ".forceBackgroundExecution"; //$NON-NLS-1$
-
- /**
- * Boolean property controling if the printed test start, stop and delay information
- * includes the time consumed from calling <code>setUp</code> and <code>tearDown</code>.
- * <p>
- * Default value is <b><code>false</code></b>.
- */
- public static final String PROP_PERFORMANCE_TIMING_INCLUDE_SETUP_TEARDOWN = PROP_BASE_KEY + ".timingsIncludeSetupAndTearDown"; //$NON-NLS-1$
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSETestLogCollectorDelegate.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSETestLogCollectorDelegate.java
deleted file mode 100644
index dca415c7e..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSETestLogCollectorDelegate.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.core;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Test log collector delegate interface contract. The test
- * collector delegates will be called from the <code>RSECoreTestCase</code>
- * in case the last test which had been run failed.
- */
-public interface IRSETestLogCollectorDelegate {
-
- /**
- * Returns the list of absolute file locations to included
- * within the collected logs archive file. The returned
- * absolute file locations must denote real existing files.
- * Possible dynamic content to collect can be written to
- * temporary files. The log collector delegate is responsible
- * for removing these temporary files if the <code>dispose()</code>
- * method is called.
- *
- * @return An array of absolute file locations.
- */
- public IPath[] getAbsoluteLogFileLocations();
-
- /**
- * Signal the RSE test log collector delegate to dispose
- * any resource created. Possibly created temporary files
- * should be deleted. Open streams or handles should be
- * closed.
- */
- public void dispose();
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSEViews.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSEViews.java
deleted file mode 100644
index 6b9bf8752..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSEViews.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.core;
-
-/**
- * Defines the several unique shared RSE view ids.
- */
-public interface IRSEViews {
-
- /**
- * The unique remote systems view id.
- */
- public final String RSE_REMOTE_SYSTEMS_VIEW_ID = "org.eclipse.rse.ui.view.systemView"; //$NON-NLS-1$
-
- /**
- * The unique remote team view id.
- */
- public final String RSE_TEAM_VIEW_ID = "org.eclipse.rse.ui.view.teamView"; //$NON-NLS-1$
-
- /**
- * The unique remote system details view id.
- */
- public final String RSE_REMOTE_SYSTEMS_DETAILS_VIEW_ID = "org.eclipse.rse.ui.view.systemTableView"; //$NON-NLS-1$
-
- /**
- * The unique remote search view id.
- */
- public final String RSE_REMOTE_SEARCH_VIEW_ID = "org.eclipse.rse.ui.view.SystemSearchView"; //$NON-NLS-1$
-
- /**
- * The unique remote scratchpad view id.
- */
- public final String RSE_REMOTE_SCRATCHPAD_VIEW_ID = "org.eclipse.rse.ui.view.scratchpad.SystemScratchpadViewPart"; //$NON-NLS-1$
-
- /**
- * The unique remote monitor view id.
- */
- public final String RSE_REMOTE_MONITOR_VIEW_ID = "org.eclipse.rse.ui.view.monitorView"; //$NON-NLS-1$
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java
deleted file mode 100644
index fdac40cfa..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java
+++ /dev/null
@@ -1,706 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation.
- * Martin Oberhuber (Wind River) - fix build against 3.2.1, fix javadoc errors
- ********************************************************************************/
-package org.eclipse.rse.tests.core;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.text.DateFormat;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.Properties;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestListener;
-import junit.framework.TestResult;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.tests.core.RSEWaitAndDispatchUtil.IInterruptCondition;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-import org.osgi.framework.Bundle;
-
-/**
- * Core RSE test case infra structure implementation.
- */
-public class RSECoreTestCase extends TestCase {
- // Test properties storage.
- private final Properties properties = new Properties();
-
- // Internal. Used to remember view zoom state changes.
- private boolean rseSystemsViewZoomStateChanged = false;
-
- /**
- * Constructor.
- */
- public RSECoreTestCase() {
- this(null);
- }
-
- /**
- * Constructor.
- *
- * @param name The test name.
- */
- public RSECoreTestCase(String name) {
- super(name);
- // clear out all properties on construction.
- properties.clear();
- // initialize the core test properties
- initializeProperties();
- }
-
- // ***** Test properties management and support methods *****
-
- /**
- * Initialize the core test properties. Override to modify core
- * test properties or to add additional ones.
- */
- protected void initializeProperties() {
- setProperty(IRSECoreTestCaseProperties.PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW, false);
- setProperty(IRSECoreTestCaseProperties.PROP_SWITCH_TO_PERSPECTIVE, "org.eclipse.rse.ui.view.SystemPerspective"); //$NON-NLS-1$
- setProperty(IRSECoreTestCaseProperties.PROP_FORCE_BACKGROUND_EXECUTION, false);
- setProperty(IRSECoreTestCaseProperties.PROP_PERFORMANCE_TIMING_INCLUDE_SETUP_TEARDOWN, false);
- }
-
- /**
- * Enables or disables the specified property.
- *
- * @param key The key of the property to enable or disable. Must be not <code>null</code>!
- * @param enable Specify <code>true</code> to enable the property, <code>false</code> to disable the property.
- */
- protected final void setProperty(String key, boolean enable) {
- setProperty(key, enable ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
- }
-
- /**
- * Test if the specified property is equal to the specified value.
- *
- * @param key The key of the property to test. Must be not <code>null</code>!
- * @param value The value to compare the property with.
- * @return <code>true</code> if the property is equal to the specified value, <code>false</code> otherwise.
- */
- protected final boolean isProperty(String key, boolean value) {
- assert key != null;
- return (value ? Boolean.TRUE : Boolean.FALSE).equals(Boolean.valueOf(properties.getProperty(key, "false"))); //$NON-NLS-1$
- }
-
- /**
- * Sets the specified string value for the specified property. If the specified
- * value is <code>null</code>, the specified property will be removed.
- *
- * @param key The key of the property to set. Must be not <code>null</code>!
- * @param value The string value to set or <code>null</code>.
- */
- protected final void setProperty(String key, String value) {
- assert key != null;
- if (key != null) {
- if (value != null) {
- properties.setProperty(key, value);
- } else {
- properties.remove(key);
- }
- }
- }
-
- /**
- * Test if the specified property is equal to the specified value. If the specified
- * value is <code>null</code>, this method returns <code>true</code> if the specified
- * property key does not exist. The comparisation is case insensitive.
- *
- * @param key The key of the property to test. Must be not <code>null</code>!
- * @param value The value to compare the property with or <code>null</code>
- * @return <code>true</code> if the property is equal to the specified value
- * or the specified value is <code>null</code> and the property does not exist,
- * <code>false</code> otherwise.
- */
- protected final boolean isProperty(String key, String value) {
- assert key != null;
- if (value != null) {
- return value.equalsIgnoreCase(properties.getProperty(key));
- }
- return !properties.containsKey(key);
- }
-
- /**
- * Returns the configured string value of the specified property.
- *
- * @param key The property key. Must be not <code>null</code>.
- * @return The property value or <code>null</code> if the specified property does not exist.
- */
- protected final String getProperty(String key) {
- assert key != null;
- return properties.getProperty(key, null);
- }
-
- // ***** Test case life cycle management and support methods *****
-
- final static QualifiedName BACKGROUND_TEST_EXECUTION_FINISHED = new QualifiedName(RSETestsPlugin.getDefault().getBundle().getSymbolicName(), "background_test_execution_finished"); //$NON-NLS-1$
-
- private final class RSEBackgroundTestExecutionJob extends Job {
- private final TestResult result;
-
- /**
- * Constructor.
- *
- * @param result The test result object the test is reporting failures to. Must be not <code>null</code>.
- */
- public RSEBackgroundTestExecutionJob(TestResult result) {
- super("RSE JUnit Test Case Execution Job"); //$NON-NLS-1$
- setUser(false);
- setPriority(Job.INTERACTIVE);
- setRule(ResourcesPlugin.getWorkspace().getRoot());
-
- assert result != null;
- this.result = result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Running test " + RSECoreTestCase.this.getName() + " ...", IProgressMonitor.UNKNOWN); //$NON-NLS-1$ //$NON-NLS-2$
-
- // Execute the test now.
- result.addListener(TEST_LISTENER);
- invokeTestCaseRunImpl(result);
- result.removeListener(TEST_LISTENER);
-
- monitor.done();
-
- setProperty(BACKGROUND_TEST_EXECUTION_FINISHED, Boolean.TRUE);
-
- // The job never fails. The test result is the real result.
- return Status.OK_STATUS;
- }
- }
-
- private final static class RSEBackgroundTestExecutionJobWaiter implements IInterruptCondition {
- private final Job job;
-
- /**
- * Constructor.
- *
- * @param job The job to wait for the execution to finish. Must be not <code>null</code>.
- */
- public RSEBackgroundTestExecutionJobWaiter(Job job) {
- assert job != null;
- this.job = job;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSEWaitAndDispatchUtil.IInterruptCondition#isTrue()
- */
- public boolean isTrue() {
- // Interrupt the wait method if the job signaled that it has finished.
- return ((Boolean)job.getProperty(BACKGROUND_TEST_EXECUTION_FINISHED)).booleanValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSEWaitAndDispatchUtil.IInterruptCondition#dispose()
- */
- public void dispose() { /* nothing to dispose here */ }
- }
-
- /**
- * Internal accessor method to call the original <code>junit.
- * framework.TestCase.run(TestResult) implementation.
- *
- * @param result The test result object the test is reporting failures to. Must be not <code>null</code>.
- */
- final void invokeTestCaseRunImpl(TestResult result) {
- super.run(result);
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#run(junit.framework.TestResult)
- */
- public final void run(TestResult result) {
- if (isProperty(IRSECoreTestCaseProperties.PROP_FORCE_BACKGROUND_EXECUTION, false)
- || !RSEWaitAndDispatchUtil.isDispatchThread()) {
- // do not force test execution into background, just call super.run(result)
- // from with the current thread.
- result.addListener(TEST_LISTENER);
- super.run(result);
- result.removeListener(TEST_LISTENER);
- } else {
- // Create the background job
- Job job = new RSEBackgroundTestExecutionJob(result);
- // Initialize the BACKGROUND_EXECUTION_TEST_RESULT property
- job.setProperty(BACKGROUND_TEST_EXECUTION_FINISHED, Boolean.FALSE);
- // schedule the job to run immediatelly
- job.schedule();
-
- // wait till the job finished executing
- RSEWaitAndDispatchUtil.waitAndDispatch(0, new RSEBackgroundTestExecutionJobWaiter(job));
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#runBare()
- */
- public void runBare() throws Throwable {
- // If PROP_PERFORMANCE_TIMING_INCLUDE_SETUP_TEARDOWN is set to true,
- // print the timing information including the tests setUp and tearDown methods.
- if (isProperty(IRSECoreTestCaseProperties.PROP_PERFORMANCE_TIMING_INCLUDE_SETUP_TEARDOWN, true)) {
- // Print timing information here
- long start = printTestStartInformation(getName());
- try {
- super.runBare();
- } finally {
- printTestEndInformation(getName(), start);
- }
- } else {
- // Do no print timing information
- super.runBare();
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#runTest()
- */
- protected void runTest() throws Throwable {
- // If PROP_PERFORMANCE_TIMING_INCLUDE_SETUP_TEARDOWN is set to false (default),
- // print the timing information only the test method itself.
- if (isProperty(IRSECoreTestCaseProperties.PROP_PERFORMANCE_TIMING_INCLUDE_SETUP_TEARDOWN, false)) {
- // Print timing information here and run the test.
- long start = printTestStartInformation(getName());
- try {
- super.runTest();
- } finally {
- printTestEndInformation(getName(), start);
- }
- } else {
- // Do no print timing information, just run the test
- super.runTest();
- }
- }
-
- // Local date format presenting long date and time format.
- private final DateFormat DATE_FORMAT = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, Locale.getDefault());
-
- /**
- * Print the start date and time of the specified test to stdout.
- *
- * @param name The name of the starting test. Must be not <code>null</code>!
- * @return The start time of the test in milliseconds.
- */
- protected long printTestStartInformation(String name) {
- assert name != null;
- long startTime = System.currentTimeMillis();
- if (name != null) {
- System.out.println("\n=== " + name + " started at: " + DATE_FORMAT.format(new Date(startTime))); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return startTime;
- }
-
- /**
- * Print the end date and time as well as the delay of the specified test to stdout.
- *
- * @param name The name of the finished test. Must be not <code>null</code>!
- * @param startTime The start time of the test in milliseconds.
- */
- protected void printTestEndInformation(String name, long startTime) {
- assert name != null;
- long endTime = System.currentTimeMillis();
- if (name != null) {
- long duration = endTime - startTime;
- System.out.println("=== " + name + " finished at: " + DATE_FORMAT.format(new Date(endTime)) + " (duration: " + duration + " ms)"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- String perspectiveId = getProperty(IRSECoreTestCaseProperties.PROP_SWITCH_TO_PERSPECTIVE);
- assertNotNull("Invalid null-value for test case perspective id!", perspectiveId); //$NON-NLS-1$
-
- // in case the test case is launched within a new workspace, the eclipse intro
- // view is hiding everything else. Find the intro page and hide it.
- hideView("org.eclipse.ui.internal.introview", perspectiveId); //$NON-NLS-1$
-
- // toggle the Remote Systems View zoom state.
- rseSystemsViewZoomStateChanged = false;
- IViewPart part = showView(IRSEViews.RSE_REMOTE_SYSTEMS_VIEW_ID, perspectiveId);
- assertNotNull("RSE Remote System View is not available!", part); //$NON-NLS-1$
- // Unfortunately, for the zooming, we needs the view reference and not the view part :-(
- IViewReference reference = findView(IRSEViews.RSE_REMOTE_SYSTEMS_VIEW_ID, perspectiveId);
- assertNotNull("Failed to lookup view reference for RSE Remote Systems View!", reference); //$NON-NLS-1$
- if (reference.getPage().getPartState(reference) != IWorkbenchPage.STATE_MAXIMIZED
- && isProperty(IRSECoreTestCaseProperties.PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW, true)) {
- reference.getPage().toggleZoom(reference);
- rseSystemsViewZoomStateChanged = true;
- } else if (reference.getPage().getPartState(reference) == IWorkbenchPage.STATE_MAXIMIZED
- && isProperty(IRSECoreTestCaseProperties.PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW, false)) {
- reference.getPage().toggleZoom(reference);
- rseSystemsViewZoomStateChanged = true;
- }
-
- // Give the UI a chance to repaint if the view zoom state changed
- if (rseSystemsViewZoomStateChanged) RSEWaitAndDispatchUtil.waitAndDispatch(1000);
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- // restore the original view zoom state
- if (rseSystemsViewZoomStateChanged) {
- String perspectiveId = getProperty(IRSECoreTestCaseProperties.PROP_SWITCH_TO_PERSPECTIVE);
- assertNotNull("Invalid null-value for test case perspective id!", perspectiveId); //$NON-NLS-1$
-
- IViewReference reference = findView(IRSEViews.RSE_REMOTE_SYSTEMS_VIEW_ID, perspectiveId);
- assertNotNull("Failed to lookup view reference for RSE Remote Systems View!", reference); //$NON-NLS-1$
- if (reference.getPage().getPartState(reference) == IWorkbenchPage.STATE_MAXIMIZED
- && isProperty(IRSECoreTestCaseProperties.PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW, true)) {
- reference.getPage().toggleZoom(reference);
- } else if (reference.getPage().getPartState(reference) != IWorkbenchPage.STATE_MAXIMIZED
- && isProperty(IRSECoreTestCaseProperties.PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW, false)) {
- reference.getPage().toggleZoom(reference);
- }
- rseSystemsViewZoomStateChanged = false;
- }
-
- super.tearDown();
- }
-
- // ***** View and perspective management and support methods *****
-
- /**
- * Finds the view reference for the view identified by the specified id.
- *
- * @param viewId The unique view id. Must be not <code>null</code>.
- * @param perspectiveId The unique perspective id within the view should be searched. Must be not <code>null</code>.
- * @return The view reference instance to the view or <code>null</code> if not available.
- * @throws WorkbenchException If the specified perspective could not be shown.
- */
- protected final IViewReference findView(String viewId, String perspectiveId) throws WorkbenchException {
- assert viewId != null && perspectiveId != null;
- if (viewId == null || perspectiveId == null) return null;
-
- // First of all, we have to lookup the currently active workbench
- // of the currently active workbench window.
- IWorkbench workbench = PlatformUI.getWorkbench();
- assertNotNull("Failed to query current workbench instance!", workbench); //$NON-NLS-1$
- // and the corresponding currently active workbench window.
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- assertNotNull("Failed to query currently active workbench window!", window); //$NON-NLS-1$
-
- // Now we have to switch to the specified perspecitve
- workbench.showPerspective(perspectiveId, window);
-
- // From the active workbench window, we need the active workbench page
- IWorkbenchPage page = window.getActivePage();
- assertNotNull("Failed to query currently active workbench page!", page); //$NON-NLS-1$
-
- return page.findViewReference(viewId);
- }
-
- /**
- * Shows and activate the view identified by the specified id.
- *
- * @param viewId The unique view id. Must be not <code>null</code>.
- * @param perspectiveId The unique perspective id within the view should be activated. Must be not <code>null</code>.
- * @return The view part instance to the view or <code>null</code> if it cannot be shown.
- * @throws WorkbenchException If the specified perspective could not be shown.
- */
- protected final IViewPart showView(String viewId, String perspectiveId) throws WorkbenchException {
- assert viewId != null && perspectiveId != null;
- if (viewId == null || perspectiveId == null) return null;
-
- // First of all, we have to lookup the currently active workbench
- // of the currently active workbench window.
- IWorkbench workbench = PlatformUI.getWorkbench();
- assertNotNull("Failed to query current workbench instance!", workbench); //$NON-NLS-1$
- // and the corresponding currently active workbench window.
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- assertNotNull("Failed to query currently active workbench window!", window); //$NON-NLS-1$
-
- // Now we have to switch to the specified perspecitve
- workbench.showPerspective(perspectiveId, window);
-
- // From the active workbench window, we need the active workbench page
- IWorkbenchPage page = window.getActivePage();
- assertNotNull("Failed to query currently active workbench page!", page); //$NON-NLS-1$
-
- return page.showView(viewId);
- }
-
- /**
- * Hides the view identified by the specified id.
- *
- * @param viewId The unique view id. Must be not <code>null</code>.
- * @param perspectiveId The unique perspective id the view should be hidden from. Must be not <code>null</code>.
- * @throws WorkbenchException If the specified perspective could not be shown.
- */
- protected final void hideView(String viewId, String perspectiveId) throws WorkbenchException {
- assert viewId != null && perspectiveId != null;
- if (viewId == null || perspectiveId == null) return;
-
- IViewReference viewReference = findView(viewId, perspectiveId);
- if (viewReference != null) {
- // at this point we can safely asume that we can access the active page directly
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().hideView(viewReference);
- // give the UI a chance to execute the hideView and repaint
- RSEWaitAndDispatchUtil.waitAndDispatch(1000);
- }
- }
-
- // ***** Test data management and support methods *****
-
- /**
- * Returns the absolute test data location path calculated out of the known
- * test data location root (<i>org.eclipse.rse.tests plugin location + sub
- * directory 'test.data'</i>), the specified relative path (<i>relative to the
- * test data location root</i>) and the current execution host operating system
- * string (<i>if requested</i>). The method will test the resulting location
- * to be: <br>
- * <ul>
- * <li>an directory and</li>
- * <li>is readable.</li>
- * </ul><br>
- * If the calculated test data location does not pass these conditions, the
- * method will return <code>null</code>.
- *
- * @param relativePath A path relative to the test data location root path. Must be not <code>null</code!
- * @param appendHostOS <code>True</code> if to append the current execution host operating system string, <code>false</code> otherwise.
- *
- * @return The root path to the test data location or <code>null</code> if the test data location does cannot be read or is not a directory.
- */
- protected final IPath getTestDataLocation(String relativePath, boolean appendHostOS) {
- assert relativePath != null;
- IPath root = null;
-
- if (relativePath != null) {
- Bundle bundle = RSETestsPlugin.getDefault().getBundle();
- if (bundle != null) {
- // build up the complete relative path
- IPath relative = new Path ("test.data").append(relativePath); //$NON-NLS-1$
- if (appendHostOS) relative = relative.append(Platform.getOS());
-
- URL url = FileLocator.find(bundle, relative, null);
- if (url != null) {
- try {
- // Resolve the URL to an absolute path
- root = new Path(FileLocator.resolve(url).getFile());
- // test the resulting path element to be accessible
- if (!root.toFile().isDirectory() || !root.toFile().canRead()) {
- root = null;
- }
- } catch (IOException e) { /* ignored on purpose */ }
- }
- }
- }
-
- return root;
- }
-
- // ***** Test failures log collector management and support methods *****
-
- final TestListener TEST_LISTENER = new RSETestFailureListener();
-
- /**
- * Listens to the test executions and collect the test log files
- * through the known list of test log collector delegates in a test
- * had an error or failed.
- */
- class RSETestFailureListener implements TestListener {
-
- /* (non-Javadoc)
- * @see junit.framework.TestListener#startTest(junit.framework.Test)
- */
- public void startTest(Test test) {
- // nothing to do on start test
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestListener#addError(junit.framework.Test, java.lang.Throwable)
- */
- public synchronized void addError(Test test, Throwable error) {
- if (test != null && error != null) {
- // Log the error to the error log.
- IStatus status = new Status(IStatus.ERROR,
- RSETestsPlugin.getDefault().getBundle().getSymbolicName(),
- 1,
- "RSE JUnit test case '" + test + "' failed with error. Possible cause: " + error.getLocalizedMessage(), //$NON-NLS-1$ //$NON-NLS-2$
- error
- );
- RSETestsPlugin.getDefault().getLog().log(status);
-
- // Collect the log files if at least one test log collector is known
- collectTestLogs(test);
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestListener#addFailure(junit.framework.Test, junit.framework.AssertionFailedError)
- */
- public synchronized void addFailure(Test test, AssertionFailedError failure) {
- if (test != null && failure != null) {
- // Log the failure to the error log.
- IStatus status = new Status(IStatus.ERROR,
- RSETestsPlugin.getDefault().getBundle().getSymbolicName(),
- 1,
- "RSE JUnit test case '" + test + "' failed. Failure: " + failure.getLocalizedMessage(), //$NON-NLS-1$ //$NON-NLS-2$
- failure
- );
- RSETestsPlugin.getDefault().getLog().log(status);
-
- // Collect the log files if at least one test log collector is known
- collectTestLogs(test);
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestListener#endTest(junit.framework.Test)
- */
- public void endTest(Test test) {
- // nothing to do on end test
- }
- }
-
- /**
- * Collect the test logs for the failed test.
- *
- * @param test The failed test. Must be not <code>null</code>.
- */
- protected final synchronized void collectTestLogs(Test test) {
- if (test != null) {
- // get a snapshot of the currently known test log collector delegates
- IRSETestLogCollectorDelegate[] delegates = RSETestsPlugin.getDefault().getTestLogCollectorDelegates();
- if (delegates.length > 0) {
- // Write the logs to the test plugins state location. Check if older archives with the same
- // name already exist and delete them.
- IPath stateLocation = RSETestsPlugin.getDefault().getStateLocation();
- if (stateLocation != null && stateLocation.toFile().isDirectory()) {
- // Build up the archives name
- String archiveName = "RSEUnittestFailureLogs_" + test + ".zip"; //$NON-NLS-1$ //$NON-NLS-2$
- IPath archivePath = stateLocation.append(archiveName);
- // Delete the target file if it exist.
- if (archivePath.toFile().exists()) archivePath.toFile().delete();
-
- // Now the file should not exist anymore --> open the new ZIP archive
- ZipOutputStream stream = null;
- try {
- if (archivePath.toFile().createNewFile()) {
- stream = new ZipOutputStream(new FileOutputStream(archivePath.toFile()));
- stream.setLevel(9);
-
- // cache the names of the entries added to the ZIP stream.
- // They needs to be unique!
- Set nameCache = new HashSet();
-
- // call each test log collector delegate for the absolute file names
- // and add each of the returned files to the ZIP archive.
- for (int i = 0; i < delegates.length; i++) {
- IRSETestLogCollectorDelegate delegate = delegates[i];
- // get the list of log files to collect from the delegate
- IPath[] locations = delegate.getAbsoluteLogFileLocations();
- if (locations != null && locations.length > 0) {
- for (int j = 0; j < locations.length; j++) {
- IPath location = locations[j];
- // The location is expected to be absolute, the file
- // must be a file and it must be readable.
- if (location != null && location.isAbsolute()
- && location.toFile().isFile() && location.toFile().canRead()) {
- File file = location.toFile();
- String entryName = file.getName();
- if (nameCache.contains(entryName)) {
- // unify the name by prepending the directory elements in
- // front of the name till it is unique.
- IPath unifier = location.removeLastSegments(1);
- entryName = unifier.lastSegment() + "_" + entryName; //$NON-NLS-1$
- while (nameCache.contains(entryName) && !unifier.isEmpty()) {
- unifier = location.removeLastSegments(1);
- entryName = unifier.lastSegment() + "_" + entryName; //$NON-NLS-1$
- }
-
- // if the name is still not unique, append a count to it
- long count = 0;
- // force to make a copy of the current name
- String base = new String(entryName.getBytes());
- while (nameCache.contains(entryName)) {
- entryName = base + " (" + count + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- count++;
- }
- } else {
- nameCache.add(entryName);
- }
-
- ZipEntry zipEntry = new ZipEntry(entryName);
- zipEntry.setTime(file.lastModified());
- stream.putNextEntry(zipEntry);
-
- // Read the file bytewise and write it bytewise to the ZIP
- BufferedInputStream fileStream = null;
- try {
- fileStream = new BufferedInputStream(new FileInputStream(file));
- int character = fileStream.read();
- while (character >= 0) {
- stream.write(character);
- character = fileStream.read();
- }
- } catch (IOException e) {
- if (Platform.inDebugMode()) e.printStackTrace();
- } finally {
- // Explicitly catch the possible IOException of the close() call here.
- // This keep the loop going, otherwise we would drop out of all.
- try { if (fileStream != null) fileStream.close(); } catch (IOException e) { if (Platform.inDebugMode()) e.printStackTrace(); }
- stream.closeEntry();
- }
- }
- }
- }
-
- // If done with the current test log collector delegate, signal the delegate to dispose himself.
- // This gives the delegate the chance to remove any possibly created temporary file.
- delegate.dispose();
- }
- }
- } catch(IOException e) {
- /* ignored on purpose */
- } finally {
- // always close the stream if open
- try { if (stream != null) stream.close(); } catch (IOException e) { if (Platform.inDebugMode()) e.printStackTrace(); }
- }
- }
- }
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSEWaitAndDispatchUtil.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSEWaitAndDispatchUtil.java
deleted file mode 100644
index 406cb4a8c..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSEWaitAndDispatchUtil.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.core;
-
-import org.eclipse.swt.widgets.Display;
-
-/**
- * RSE unit test framework helper class providing common functionality
- * to hold the current thread from execution time out and/or condition
- * based.
- * <p>
- * <b>Note:</b> The class cannot be instanciated as all provided methods
- * are declared static!
- */
-public final class RSEWaitAndDispatchUtil {
-
- /**
- * Private constructor.
- */
- private RSEWaitAndDispatchUtil() {
- // nothing to do. The class cannot be instanciated.
- }
-
- /**
- * Checks if the current thread is a dispatch (UI) thread or not.
- *
- * @return <code>True</code> if the current thread is a dispatch thread, <code>false</code> otherwise.
- */
- public static boolean isDispatchThread() {
- return Display.findDisplay(Thread.currentThread()) != null;
- }
-
- /**
- * Blocks the calling thread from execution till the specified
- * time out has exceeded. If the calling thread is an display thread,
- * the display event dispatching will be kept going during this time.
- * The method will return immediatelly if any time out less or equal
- * to 0 is specified.
- *
- * @param timeout The time to wait till the method return in milli seconds. Must be larger than 0.
- */
- public static void waitAndDispatch(long timeout) {
- assert timeout > 0;
- if (timeout > 0) {
- long start = System.currentTimeMillis();
- Display display = Display.findDisplay(Thread.currentThread());
- if (display != null) {
- // ok, we are running within a display thread --> keep the
- // display event dispatching running.
- long current = System.currentTimeMillis();
- while ((current - start) < timeout) {
- if (!display.readAndDispatch()) display.sleep();
- current = System.currentTimeMillis();
- }
- } else {
- // we are not running within a display thread --> we can
- // just block the thread here
- try { Thread.sleep(timeout); } catch (InterruptedException e) { /* ignored on purpose */ }
- }
- }
- }
-
- /**
- * Public interface used to interrupt waiting for a condition to
- * come true and/or a timeout occurs.
- */
- public interface IInterruptCondition {
- /**
- * Test if the interrupt condition is <code>true</code>.
- *
- * @return <code>true</code> if the condition is fulfilled and the wait method should return, <code>false</code> otherwise.
- */
- public boolean isTrue();
-
- /**
- * Dispose the interrupt condition. Cleanup whatever necessary.
- * This method will be called only once just before the wait
- * method returns.
- */
- public void dispose();
- }
-
- /**
- * Blocks the calling thread from execution till the specified
- * time out has exceeded or the specified interrupt condition is <code>true</code>.
- * If the calling thread is an display thread, the display event dispatching will
- * be kept going during this time. The method will return immediatelly if any time
- * out less than 0 is specified or the interrupt condition is <code>true</code> from
- * the beginning. If a time out of 0 is specified, the method will be wait indefinite
- * amount of time till the interrupt condition ever becomes <code>true</code>.
- *
- * @param timeout The time to wait till the method return in milli seconds. Must be larger or equals than 0.
- * @param condition The interrupt condition to test. Must be not <code>null</code>.
- * @return <code>True</code> if the method returned because of the timeout, <code>false</code> if the
- * method returned because of the condition became true.
- */
- public static boolean waitAndDispatch(long timeout, IInterruptCondition condition) {
- assert timeout >= 0 && condition != null;
-
- boolean isTimedOut= false;
- if (timeout >= 0 && condition != null) {
- long start = System.currentTimeMillis();
- Display display = Display.findDisplay(Thread.currentThread());
- if (display != null) {
- // ok, we are running within a display thread --> keep the
- // display event dispatching running.
- long current = System.currentTimeMillis();
- while (timeout == 0 || (current - start) < timeout) {
- if (condition.isTrue()) break;
- if (!display.readAndDispatch()) display.sleep();
- current = System.currentTimeMillis();
- }
- isTimedOut = (current - start) >= timeout && timeout > 0;
- } else {
- // ok, we are not running within a display thread --> we can
- // just block the thread here
- long current = System.currentTimeMillis();
- while (timeout == 0 || (current - start) < timeout) {
- if (condition.isTrue()) break;
- try { Thread.sleep(50); } catch (InterruptedException e) { /* ignored on purpose */ }
- current = System.currentTimeMillis();
- }
- isTimedOut = (current - start) >= timeout && timeout > 0;
- }
- }
-
- // Signal the interrupt condition that we are done here
- // and it can cleanup whatever necessary.
- condition.dispose();
-
- return isTimedOut;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionManager.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionManager.java
deleted file mode 100644
index 59ff1d0bd..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionManager.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.core.connection;
-
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystem;
-
-/**
- * Interfaces declares public access and factory methods to deal
- * with RSE connections and artefacts.
- */
-public interface IRSEConnectionManager {
-
- /**
- * Loads the connection properties from the specified file. The
- * file must exist and must be a valid formated properties file.
- * <p>
- * Note: The loaded properties will be underlayed by a set of default
- * properties. The default properties will be loaded from the
- * file <code>&lt;bundle_location&gt;/src/org/eclipse/rse/tests/internal/connectionDefault.properties</code>.
- * <p>
- * @param path The properties file location. Must be not <code>null</code>.
- * @param allowDefaults Specify <code>true</code> to allow to underlay the connection properties with default,
- * <code>false</code> otherwise.
- *
- * @return The corresponding <code>IRSEConnectionProperties</code> object or <code>null</code>
- * if the loading of the properties fails.
- *
- * @see java.util.Properties
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionProperties
- */
- public IRSEConnectionProperties loadConnectionProperties(IPath path, boolean allowDefaults);
-
- /**
- * Loads the connection properties using the given set of potential
- * incomplete properties and the default properties.
- *
- * @param properties The connection properties. Must be not <code>null</code>
- * @param allowDefaults Specify <code>true</code> to allow to underlay the connection properties with default,
- * <code>false</code> otherwise.
- *
- * @return The corresponding <code>IRSEConnectionProperties</code> object or <code>null</code>
- * if the loading of the properties fails.
- *
- * @see java.util.Properties
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionProperties
- */
- public IRSEConnectionProperties loadConnectionProperties(Properties properties, boolean allowDefaults);
-
- /**
- * Removes the connection given by the specified name/label from the specified
- * system profile. The method will do nothing if either the system profile or
- * the connection does not exist.
- *
- * @param profileName The system profile to remove the connection from. Must be not <code>null</code>.
- * @param name The name of the connection to remove. Must be not <code>null</code>.
- */
- public void removeConnection(String profileName, String name);
-
- /**
- * Lookup the connection described by the given connection properties. If
- * the described connection does not exist, the connection (and all required
- * RSE artefacts) will be created.
- *
- * @param properties The connection properties. Must be not <code>null</code>.
- * @return The corresponding <code>IHost</code> connection object.
- */
- public IHost findOrCreateConnection(IRSEConnectionProperties properties);
-
- /**
- * Get the file subsystem, matching the specified configuration id, for the specified connection.
- *
- * @param connection The corresponding <code>IHost</code> connection object. Must be not <code>null</code>.
- * @param desiredConfigurationId The subsystem configuration id of the desired subsystem. Must be not <code>null</code>.
- *
- * @return The file subsystem object if found or <code>null</code>.
- *
- * @throws Exception If the file subsystem lookup fails.
- */
- public FileServiceSubSystem getFileSubSystem(IHost connection, String desiredConfigurationId) throws Exception;
-
- /**
- * Get the shell subsystem for the specified connection.
- *
- * @param connection The corresponding <code>IHost</code> connection object. Must be not <code>null</code>.
- * @return The shell subsystem object if found or <code>null</code>.
- *
- * @throws Exception If the shell subsystem lookup fails.
- */
- public IShellServiceSubSystem getShellSubSystem(IHost connection) throws Exception;
-
-
- /**
- * Get the testsubsystem for the specified connection.
- *
- * @param connection The corresponding <code>IHost</code> connection object. Must be not <code>null</code>.
- * @return The testsubsystem object if found or <code>null</code>.
- *
- * @throws Exception If the testsubsystem lookup fails.
- */
- public ITestSubSystem getTestSubSystem(IHost connection) throws Exception;
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionProperties.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionProperties.java
deleted file mode 100644
index 91fd22ace..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionProperties.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.core.connection;
-
-/**
- * Interface declares public access and management methods to deal
- * with the RSE connection specific properties.
- */
-public interface IRSEConnectionProperties {
-
- public final String ATTR_NAME = "name"; //$NON-NLS-1$
- public final String ATTR_PROFILE_NAME = "profile_name"; //$NON-NLS-1$
- public final String ATTR_SYSTEM_TYPE = "system_type"; //$NON-NLS-1$
- public final String ATTR_ADDRESS = "address"; //$NON-NLS-1$
- public final String ATTR_USERID = "userid"; //$NON-NLS-1$
- public final String ATTR_PASSWORD = "password"; //$NON-NLS-1$
-
- /**
- * Returns the associated property stored under the specified key.
- *
- * @param key The property key. Must be not <code>null</code>.
- * @return The properties value or <code>null</code> if not set.
- */
- public String getProperty(String key);
-
- /**
- * Set the property, given by the specified key, to the specified
- * property value. If the specified value is <code>null</code>, the
- * property will be removed.
- *
- * @param key The property key. Must be not <code>null</code>.
- * @param value The property value or <code>null</code>
- */
- public void setProperty(String key, String value);
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEBaseConnectionTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEBaseConnectionTestCase.java
deleted file mode 100644
index bee7aecdc..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEBaseConnectionTestCase.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Don Yantzi (IBM) - initial contribution.
- * David Dykstal (IBM) - initial contribution.
- * Uwe Stieber (Wind River) - refactoring and cleanup.
- * *******************************************************************************/
-package org.eclipse.rse.tests.core.connection;
-
-import java.util.Properties;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-import org.eclipse.rse.tests.internal.RSEConnectionManager;
-
-/**
- * Abstract superclass for JUnit PDE test cases that require an IHost.
- * This superclass creates a single RSE IHost that can
- * be reused by multiple testcases run during the same PDE invocation.
- */
-public class RSEBaseConnectionTestCase extends RSECoreTestCase {
- private final IRSEConnectionManager connectionManager = new RSEConnectionManager();
- private final IRSEConnectionProperties localSystemConnectionProperties;
-
- /**
- * Constructor.
- */
- public RSEBaseConnectionTestCase() {
- this(null);
- }
-
- /**
- * Constructor.
- *
- * @param name The test name.
- */
- public RSEBaseConnectionTestCase(String name) {
- super(name);
-
- // Pre-create the local system connection properties
- Properties properties = new Properties();
- properties.setProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE, "Local"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_ADDRESS, "localhost"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_NAME, "Local"); //$NON-NLS-1$
- localSystemConnectionProperties = getConnectionManager().loadConnectionProperties(properties, false);
- }
-
- /**
- * Returns the associated RSE connection manager instance.
- *
- * @return The connection manager instance. Should be never <code>null</code>.
- */
- protected IRSEConnectionManager getConnectionManager() {
- return connectionManager;
- }
-
- /**
- * Lookup and return the local system type connection. This connection
- * should be usually available on all systems.
- *
- * @return The local system type connection or <code>null</code> if the lookup fails.
- */
- protected IHost getLocalSystemConnection() {
- assertNotNull("Local system connection properties are not available!", localSystemConnectionProperties); //$NON-NLS-1$
-
- Exception exception = null;
- String cause = null;
-
- IHost connection = null;
- try {
- connection = getConnectionManager().findOrCreateConnection(localSystemConnectionProperties);
- } catch (Exception e) {
- exception = e;
- cause = exception.getLocalizedMessage();
- }
- assertNull("Failed to find and create local system connection! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertNotNull("Failed to find and create local system connection! Cause unknown!", connection); //$NON-NLS-1$
-
- return connection;
- }
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java
deleted file mode 100644
index 0d1a1afc9..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Don Yantzi (IBM) - initial contribution.
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.core.connection;
-
-import java.util.Properties;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * Basic connection tests.
- */
-public class RSEConnectionTestCase extends RSEBaseConnectionTestCase {
-
- public RSEConnectionTestCase(String name) {
- super(name);
- }
-
- /**
- * Test creation of connections.
- */
- public void testConnectionCreation() {
- if (!RSETestsPlugin.isTestCaseEnabled("RSEConnectionTestCase.testConnectionCreation")) return; //$NON-NLS-1$
-
- Properties properties = new Properties();
- properties.setProperty(IRSEConnectionProperties.ATTR_PROFILE_NAME, "TestProfile"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_NAME, "TestHost1"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_ADDRESS, "localhost"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE, "Unix"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_USERID, "userid"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_PASSWORD, "password"); //$NON-NLS-1$
-
- IRSEConnectionProperties props = getConnectionManager().loadConnectionProperties(properties, false);
- IHost connection = getConnectionManager().findOrCreateConnection(props);
- assertNotNull("Failed to create connection " + props.getProperty(IRSEConnectionProperties.ATTR_NAME), connection); //$NON-NLS-1$
-
- props.setProperty(IRSEConnectionProperties.ATTR_NAME, "TestHost2"); //$NON-NLS-1$
- connection = getConnectionManager().findOrCreateConnection(props);
- assertNotNull("Failed to create connection " + props.getProperty(IRSEConnectionProperties.ATTR_NAME), connection); //$NON-NLS-1$
-
- props.setProperty(IRSEConnectionProperties.ATTR_NAME, "TestHost3"); //$NON-NLS-1$
- connection = getConnectionManager().findOrCreateConnection(props);
- assertNotNull("Failed to create connection " + props.getProperty(IRSEConnectionProperties.ATTR_NAME), connection); //$NON-NLS-1$
-
- props.setProperty(IRSEConnectionProperties.ATTR_NAME, "TestHost4"); //$NON-NLS-1$
- connection = getConnectionManager().findOrCreateConnection(props);
- assertNotNull("Failed to create connection " + props.getProperty(IRSEConnectionProperties.ATTR_NAME), connection); //$NON-NLS-1$
-
- props.setProperty(IRSEConnectionProperties.ATTR_NAME, "TestHost5"); //$NON-NLS-1$
- connection = getConnectionManager().findOrCreateConnection(props);
- assertNotNull("Failed to create connection " + props.getProperty(IRSEConnectionProperties.ATTR_NAME), connection); //$NON-NLS-1$
-
- props.setProperty(IRSEConnectionProperties.ATTR_NAME, "TestHost6"); //$NON-NLS-1$
- connection = getConnectionManager().findOrCreateConnection(props);
- assertNotNull("Failed to create connection " + props.getProperty(IRSEConnectionProperties.ATTR_NAME), connection); //$NON-NLS-1$
- }
-
- /**
- * Test removal of connections
- */
- public void testConnectionRemoval() {
- if (!RSETestsPlugin.isTestCaseEnabled("RSEConnectionTestCase.testConnectionRemoval")) return; //$NON-NLS-1$
-
- String profileName = "TestProfile"; //$NON-NLS-1$
-
- getConnectionManager().removeConnection(profileName, "TestHost1"); //$NON-NLS-1$
- getConnectionManager().removeConnection(profileName, "TestHost2"); //$NON-NLS-1$
- getConnectionManager().removeConnection(profileName, "TestHost3"); //$NON-NLS-1$
- getConnectionManager().removeConnection(profileName, "TestHost4"); //$NON-NLS-1$
- getConnectionManager().removeConnection(profileName, "TestHost5"); //$NON-NLS-1$
- getConnectionManager().removeConnection(profileName, "TestHost6"); //$NON-NLS-1$
- }
-
- /**
- * Test the connect and disconnect methods
- */
- public void testConnect() {
- if (!RSETestsPlugin.isTestCaseEnabled("RSEConnectionTestCase.testConnect")) return; //$NON-NLS-1$
-
- Exception exception = null;
- String cause = null;
-
- IHost connection = getLocalSystemConnection();
- ISubSystem subsystem = null;
- try {
- subsystem = getConnectionManager().getFileSubSystem(connection, "local.files"); //$NON-NLS-1$
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to get local.files subsystem! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertNotNull("No local.files subystem", subsystem); //$NON-NLS-1$
-
- RSEUIPlugin.getDefault().getPreferenceStore().setValue(ISystemPreferencesConstants.ALERT_SSL, false);
- RSEUIPlugin.getDefault().getPreferenceStore().setValue(ISystemPreferencesConstants.ALERT_NONSSL, false);
-
- exception = null;
- cause = null;
-
- try {
- subsystem.connect();
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to connect local.files subsystem! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertTrue("local.files subsystem is not connected!", subsystem.isConnected()); //$NON-NLS-1$
-
- exception = null;
- cause = null;
-
- try {
- subsystem.disconnect();
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to discconnect local.files subsystem! Possible cause: " + cause, exception); //$NON-NLS-1$
- // The local.files subsystem should be not disconnectable!
- assertTrue("local.files subsystem is not connected but is expected to!", subsystem.isConnected()); //$NON-NLS-1$
- }
-
- /**
- * Test resolving a filter string.
- */
- public void testResolveFilterString() {
- if (!RSETestsPlugin.isTestCaseEnabled("RSEConnectionTestCase.testResolveFilterString")) return; //$NON-NLS-1$
-
- Exception exception = null;
- String cause = null;
-
- IHost connection = getLocalSystemConnection();
- ISubSystem subsystem = null;
- try {
- subsystem = getConnectionManager().getFileSubSystem(connection, "local.files"); //$NON-NLS-1$
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to get local.files subsystem! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertNotNull("No local.files subystem", subsystem); //$NON-NLS-1$
-
- exception = null;
- cause = null;
-
- try {
- subsystem.connect();
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to connect local.files subsystem! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertTrue("local.files subsystem is not connected!", subsystem.isConnected()); //$NON-NLS-1$
-
- exception = null;
- cause = null;
-
- Object[] objects = null;
- try {
- objects = subsystem.resolveFilterString(null, "/bin/*"); //$NON-NLS-1$
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- } finally {
- try { subsystem.disconnect(); } catch (Exception e) { /* ignored */ }
- }
- assertNull("Failed to resolve filter string for local.files subsystem! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertNotNull("Unexpected return value null for resolveFilterString!", objects); //$NON-NLS-1$
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestSuite.java
deleted file mode 100644
index 285d287c6..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestSuite.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * David Dykstal (IBM) - initial contribution.
- * *******************************************************************************/
-package org.eclipse.rse.tests.core.connection;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-/**
- * Main class bundling all RSE connection test cases.
- */
-public class RSEConnectionTestSuite extends DelegatingTestSuiteHolder {
-
- /**
- * Standard Java application main method. Allows to launch the test
- * suite from outside as part of nightly runs, headless runs or other.
- * <p><b>Note:</b> Use only <code>junit.textui.TestRunner</code> here as
- * it is explicitly supposed to output the test output to the shell the
- * test suite has been launched from.
- * <p>
- * @param args The standard Java application command line parameters passed in.
- */
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- /**
- * Combine all test into a suite and returns the test suite instance.
- * <p>
- * <b>Note: This method must be always called <i><code>suite</code></i> ! Otherwise
- * the JUnit plug-in test launcher will fail to detect this class!</b>
- * <p>
- * @return The test suite instance.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite("RSE Connection Test Suite"); //$NON-NLS-1$
- // add the single test suites to the overall one here.
- suite.addTestSuite(RSEConnectionTestCase.class);
-
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)RSEConnectionTestSuite.suite();
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/files/FileServiceTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/files/FileServiceTest.java
deleted file mode 100644
index 7bf9ea94b..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/files/FileServiceTest.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.files;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.model.SystemStartHere;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-
-public class FileServiceTest extends RSEBaseConnectionTestCase {
-
- private IFileServiceSubSystem fss;
- private IFileService fs;
- private File tempDir;
- private String tempDirPath;
- private IProgressMonitor mon = new NullProgressMonitor();
-
- public void setUp() {
- IHost localHost = getLocalSystemConnection();
- ISystemRegistry sr = SystemStartHere.getSystemRegistry();
- ISubSystem[] ss = sr.getServiceSubSystems(IFileService.class, localHost);
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof IFileServiceSubSystem) {
- fss = (IFileServiceSubSystem)ss[i];
- fs = fss.getFileService();
- }
- }
- try {
- tempDir = File.createTempFile("rsetest","dir"); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue(tempDir.delete());
- assertTrue(tempDir.mkdir());
- tempDirPath = tempDir.getAbsolutePath();
- } catch(IOException ioe) {
- assertTrue("Exception creating temp dir", false); //$NON-NLS-1$
- }
- }
-
- public void tearDown() {
- try {
- fs.delete(mon, tempDir.getParent(), tempDir.getName());
- } catch(SystemMessageException msg) {
- assertFalse("Exception: "+msg.getLocalizedMessage(), true); //$NON-NLS-1$
- }
- }
-
- public boolean isWindows() {
- String systemTypeId = fss.getHost().getSystemType();
- if (systemTypeId.equals("Local")) { //$NON-NLS-1$
- return System.getProperty("os.name").toLowerCase().startsWith("win"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return systemTypeId.toLowerCase().startsWith("windows"); //$NON-NLS-1$
- }
-
- public String getTestFileName() {
- //Return a filename for testing that exposes all characters valid on the file system
- if (!isWindows()) {
- //UNIX TODO: test embedded newlines
- return "a !@#${a}\"\' fi\tle\b\\%^&*()?_ =[]~+-'`;:,.|<>"; //$NON-NLS-1$
- }
- //Fallback: Windows TODO: test unicode
- return "a !@#${a}'` file%^&()_ =[]~+-;,."; //$NON-NLS-1$
- }
-
- public void testCaseSensitive() {
- if (isWindows()) {
- assertFalse(fss.getSubSystemConfiguration().isCaseSensitive());
- assertFalse(fss.isCaseSensitive());
- assertFalse(fs.isCaseSensitive()); //FAIL due to bug 168586
- } else {
- assertTrue(fss.getSubSystemConfiguration().isCaseSensitive());
- assertTrue(fss.isCaseSensitive()); //FAIL due to bug 168596
- assertTrue(fs.isCaseSensitive());
- }
- }
-
- public void testCreateFile() throws SystemMessageException {
- String testName = getTestFileName();
- IHostFile hf = fs.createFile(mon, tempDirPath, testName);
- assertTrue(hf.exists());
- assertTrue(hf.canRead());
- assertTrue(hf.canWrite());
- assertEquals(hf.getName(), testName);
- assertEquals(hf.getParentPath(), tempDirPath);
- assertEquals(hf.getSize(), 0);
- long modDate = hf.getModifiedDate();
- assertTrue(modDate > 0);
-
- File theFile = new File(tempDir, testName);
- assertTrue(theFile.exists());
- assertTrue(modDate == theFile.lastModified());
- }
-
- public void testCreateCaseSensitive() throws SystemMessageException {
- String testName = getTestFileName();
- String testName2 = testName.toUpperCase();
- IHostFile hf = fs.createFile(mon, tempDirPath, testName);
- if (fss.isCaseSensitive()) {
- //UNIX: uppercase version must be distinct
- IHostFile hf2 = fs.getFile(mon, tempDirPath, testName2);
- assertFalse(hf2.exists());
- hf2 = fs.createFolder(mon, tempDirPath, testName2);
- assertTrue(hf2.exists());
- assertTrue(hf2.isDirectory());
- assertFalse(hf.equals(hf2));
- } else {
- //Windows: uppercase version must be the same
- IHostFile hf2 = fs.getFile(mon, tempDirPath, testName2);
- assertTrue(hf2.exists());
- try {
- hf2 = fs.createFolder(mon, tempDirPath, testName2);
- } catch(SystemMessageException e) {
- //Windows cannot create a folder when the file is already there
- assertNotNull(e);
- }
- assertTrue(hf2.exists());
- assertFalse(hf2.isDirectory());
- assertEquals(hf.getModifiedDate(), hf2.getModifiedDate());
- assertEquals(hf.getSize(), hf2.getSize());
- //Different abstract path names but denote the same file
- //Should be equal since java.io.File treats them as equal
- assertEquals(new File(tempDirPath, testName), new File(tempDirPath, testName2));
- assertEquals(hf, hf2); //bug 168591: should be equal
- }
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/files/RSEFileTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/files/RSEFileTestSuite.java
deleted file mode 100644
index ffcdbb10d..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/files/RSEFileTestSuite.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.files;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class RSEFileTestSuite extends DelegatingTestSuiteHolder {
- /**
- * Standard Java application main method. Allows to launch the test
- * suite from outside as part of nightly runs, headless runs or other.
- * <p><b>Note:</b> Use only <code>junit.textui.TestRunner</code> here as
- * it is explicitly supposed to output the test output to the shell the
- * test suite has been launched from.
- * <p>
- * @param args The standard Java application command line parameters passed in.
- */
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- /**
- * Combine all test into a suite and returns the test suite instance.
- * <p>
- * <b>Note: This method must be always called <i><code>suite</code></i> ! Otherwise
- * the JUnit plug-in test launcher will fail to detect this class!</b>
- * <p>
- * @return The test suite instance.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite("RSE File Test Suite"); //$NON-NLS-1$
- // add the single test suites to the overall one here.
- suite.addTestSuite(FileServiceTest.class);
-
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)RSEFileTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java
deleted file mode 100644
index 82e92f748..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/* *******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others. 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:
- * Don Yantzi (IBM) - initial contribution.
- * David Dykstal (IBM) - initial contribution.
- * Uwe Stieber (Wind River) - refactoring and cleanup.
- * *******************************************************************************/
-package org.eclipse.rse.tests.internal;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import junit.framework.Assert;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.core.ISystemUserIdConstants;
-import org.eclipse.rse.core.PasswordPersistenceManager;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.model.ISystemResourceChangeEvents;
-import org.eclipse.rse.model.SystemRegistry;
-import org.eclipse.rse.model.SystemResourceChangeEvent;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.tests.core.connection.IRSEConnectionManager;
-import org.eclipse.rse.tests.core.connection.IRSEConnectionProperties;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.osgi.framework.Bundle;
-
-/**
- * RSE connection factory implementation.
- */
-public class RSEConnectionManager implements IRSEConnectionManager {
- private IPath connectionDefaultsLocation = null;
-
- /**
- * Constructor.
- */
- public RSEConnectionManager() {
- // locate the connectionDefault.properties file.
- Bundle bundle = RSETestsPlugin.getDefault().getBundle();
- if (bundle != null) {
- IPath relative = new Path ("test.data/connectionDefault.properties"); //$NON-NLS-1$
- URL url = FileLocator.find(bundle, relative, null);
- if (url != null) {
- try {
- // Resolve the URL to an absolute path
- connectionDefaultsLocation = new Path(FileLocator.resolve(url).getFile());
- } catch (IOException e) { /* ignored on purpose */ }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionManager#loadConnectionProperties(org.eclipse.core.runtime.IPath, boolean)
- */
- public IRSEConnectionProperties loadConnectionProperties(IPath path, boolean allowDefaults) {
- assert path != null;
-
- Properties defaults = null;
- if (allowDefaults && connectionDefaultsLocation != null
- && connectionDefaultsLocation.toFile().isFile()
- && connectionDefaultsLocation.toFile().canRead()) {
- InputStream stream = null;
- try {
- defaults = new Properties();
- stream = new FileInputStream(connectionDefaultsLocation.toFile());
- defaults.load(stream);
- } catch (IOException e) {
- // There are no defaults if anything goes wrong reading them
- defaults = null;
- } finally {
- try { if (stream != null) stream.close(); } catch (IOException e) { /* ignored */ }
- }
- }
-
-
- Properties properties = null;
- if (path.toFile().isFile() && path.toFile().canRead()) {
- InputStream stream = null;
- try {
- stream = new FileInputStream(path.toFile());
- properties = defaults != null ? new Properties(defaults) : new Properties();
- properties.load(stream);
- } catch (IOException e) {
- // if anything goes wrong reading the properties
- // we do not return any.
- properties = null;
- } finally {
- try { if (stream != null) stream.close(); } catch (IOException e) { /* ignored */ }
- }
- }
-
- return properties != null ? new RSEConnectionProperties(properties) : (IRSEConnectionProperties)null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionManager#loadConnectionProperties(java.util.Properties, boolean)
- */
- public IRSEConnectionProperties loadConnectionProperties(Properties properties, boolean allowDefaults) {
- assert properties != null;
-
- Properties defaults = null;
- if (allowDefaults && connectionDefaultsLocation != null
- && connectionDefaultsLocation.toFile().isFile()
- && connectionDefaultsLocation.toFile().canRead()) {
- InputStream stream = null;
- try {
- defaults = new Properties();
- stream = new FileInputStream(connectionDefaultsLocation.toFile());
- defaults.load(stream);
- } catch (IOException e) {
- // There are no defaults if anything goes wrong reading them
- defaults = null;
- } finally {
- try { if (stream != null) stream.close(); } catch (IOException e) { /* ignored */ }
- }
- }
-
- // Unfortunately, we cannot use the given properties directly (as
- // we cannot associate the defaults). We must copy everything from
- // the given properties object.
- Properties resultProperties = null;
- if (defaults != null) {
- resultProperties = new Properties(defaults);
- Enumeration names = properties.propertyNames();
- while (names.hasMoreElements()) {
- String name = (String)names.nextElement();
- if (name != null && properties.getProperty(name) != null) {
- resultProperties.setProperty(name, properties.getProperty(name));
- }
- }
- } else {
- resultProperties = properties;
- }
-
- return resultProperties != null ? new RSEConnectionProperties(resultProperties) : (IRSEConnectionProperties)null;
- }
-
- /**
- * Delete a host given its name and the name of its profile. If the host is not found then
- * do nothing.
- * @param profileName the name of the profile containing the host
- * @param name the name of the host to delete
- */
- public void removeConnection(String profileName, String name) {
- assert profileName != null && name != null;
-
- SystemRegistry systemRegistry = RSEUIPlugin.getTheSystemRegistry();
- Assert.assertNotNull("FAILED(findOrCreateConnection): RSE system registry unavailable!", systemRegistry); //$NON-NLS-1$
-
- ISystemProfile profile = systemRegistry.getSystemProfile(profileName);
- if (profile != null) {
- IHost connection = systemRegistry.getHost(profile, name);
- if (connection != null) {
- systemRegistry.deleteHost(connection);
- systemRegistry.fireEvent(new SystemResourceChangeEvent(connection, ISystemResourceChangeEvents.EVENT_DELETE, systemRegistry));
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionManager#findOrCreateConnection(org.eclipse.rse.tests.core.connection.IRSEConnectionProperties)
- */
- public IHost findOrCreateConnection(IRSEConnectionProperties properties) {
- assert properties != null;
-
- IHost connection = null;
-
- SystemRegistry systemRegistry = RSEUIPlugin.getTheSystemRegistry();
- Assert.assertNotNull("FAILED(findOrCreateConnection): RSE system registry unavailable!", systemRegistry); //$NON-NLS-1$
-
- Exception exception = null;
- String cause = null;
-
- // First lookup and create the profile
- String profileName = properties.getProperty(IRSEConnectionProperties.ATTR_PROFILE_NAME);
- Assert.assertNotSame("FAILED(findOrCreateConnection): Invalid system profile name!", "unknown", profileName); //$NON-NLS-1$ //$NON-NLS-2$
- ISystemProfile profile = profileName == null ? systemRegistry.getSystemProfileManager().getDefaultPrivateSystemProfile() : systemRegistry.getSystemProfile(profileName);
- if (profile == null) {
- try {
- profile = systemRegistry.createSystemProfile(profileName, true);
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- Assert.assertNull("FAILED(findOrCreateConnection): Failed to create system profile '" + profileName + "'! Possible cause: " + cause, exception); //$NON-NLS-1$ //$NON-NLS-2$
- }
- Assert.assertNotNull("FAILED(findOrCreateConnection): Failed to find and/or create system profile '" + profileName + "'!", profile); //$NON-NLS-1$ //$NON-NLS-2$
-
- String name = properties.getProperty(IRSEConnectionProperties.ATTR_NAME);
- Assert.assertNotSame("FAILED(findOrCreateConnection): Invalid host name!", "unknown", name); //$NON-NLS-1$ //$NON-NLS-2$
- connection = systemRegistry.getHost(profile, name);
- if (connection == null) {
- String userId = properties.getProperty(IRSEConnectionProperties.ATTR_USERID);
- Assert.assertNotSame("FAILED(findOrCreateConnection): Invalid user id name!", "unknown", userId); //$NON-NLS-1$ //$NON-NLS-2$
- String password = properties.getProperty(IRSEConnectionProperties.ATTR_PASSWORD);
- Assert.assertNotSame("FAILED(findOrCreateConnection): Invalid user password name!", "unknown", password); //$NON-NLS-1$ //$NON-NLS-2$
- String address = properties.getProperty(IRSEConnectionProperties.ATTR_ADDRESS);
- Assert.assertNotSame("FAILED(findOrCreateConnection): Invalid remote system ip address or dns name!", "unknown", address); //$NON-NLS-1$ //$NON-NLS-2$
- String systemType = properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE);
- Assert.assertNotSame("FAILED(findOrCreateConnection): Invalid system type!", "unknown", address); //$NON-NLS-1$ //$NON-NLS-2$
-
- exception = null;
- cause = null;
-
- try {
- connection = systemRegistry.createHost(profileName, systemType, name, address, null, userId, ISystemUserIdConstants.USERID_LOCATION_CONNECTION, null);
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- Assert.assertNull("FAILED(findOrCreateConnection): Failed to create connection IHost object! Possible cause: " + cause, exception); //$NON-NLS-1$
-
- if (userId != null && password != null) {
- SystemSignonInformation info = new SystemSignonInformation(address, userId, password, systemType);
- PasswordPersistenceManager.getInstance().add(info, true);
- }
- }
- Assert.assertNotNull("FAILED(findOrCreateConnection): Failed to find and/or create connection IHost object!", connection); //$NON-NLS-1$
-
- return connection;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionManager#getFileSubSystem(org.eclipse.rse.core.model.IHost, java.lang.String)
- */
- public FileServiceSubSystem getFileSubSystem(IHost connection, String desiredConfigurationId) throws Exception {
- assert connection != null && desiredConfigurationId != null;
- FileServiceSubSystem subsystem = (FileServiceSubSystem)RemoteFileUtility.getFileSubSystem(connection);
- ISubSystemConfiguration config = subsystem.getSubSystemConfiguration();
- String activeId = config.getId();
- if (!activeId.equals(desiredConfigurationId)) {
- if (subsystem.isConnected()) {
- throw new RuntimeException(MessageFormat.format("The subsystem is connected as {0}. Disconnect before changing.", new Object[] { activeId })); //$NON-NLS-1$
- }
-
- ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
- ISubSystemConfiguration desiredConfiguration = registry.getSubSystemConfiguration(desiredConfigurationId);
- if (desiredConfiguration instanceof IServiceSubSystemConfiguration) {
- IServiceSubSystemConfiguration t = (IServiceSubSystemConfiguration)desiredConfiguration;
- subsystem.switchServiceFactory(t);
- }
- }
- return subsystem;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionManager#getShellSubSystem(org.eclipse.rse.core.model.IHost)
- */
- public IShellServiceSubSystem getShellSubSystem(IHost connection) throws Exception {
- assert connection != null;
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] subSystems = registry.getSubSystems(connection);
- for (int i = 0; i < subSystems.length; i++) {
- ISubSystem subSystem = subSystems[i];
- if (subSystem instanceof IShellServiceSubSystem) {
- return (IShellServiceSubSystem)subSystem;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionManager#getTestSubSystem(org.eclipse.rse.core.model.IHost)
- */
- public ITestSubSystem getTestSubSystem(IHost connection) throws Exception {
- assert connection != null;
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
- ISubSystem[] subSystems = registry.getSubSystems(connection);
- for (int i = 0; i < subSystems.length; i++) {
- ISubSystem subSystem = subSystems[i];
- if (subSystem instanceof ITestSubSystem) {
- return (ITestSubSystem)subSystem;
- }
- }
- return null;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionProperties.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionProperties.java
deleted file mode 100644
index 761e3869d..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionProperties.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal;
-
-import java.util.Properties;
-
-import org.eclipse.rse.tests.core.connection.IRSEConnectionProperties;
-
-/**
- * RSE connection properties implementation.
- */
-public class RSEConnectionProperties implements IRSEConnectionProperties {
- private final Properties properties;
-
- /**
- * Constructor.
- *
- * @param properties The string based properties container. Must be not <code>null</code>.
- */
- public RSEConnectionProperties(Properties properties) {
- super();
-
- assert properties != null;
- this.properties = properties;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionProperties#getProperty(java.lang.String)
- */
- public String getProperty(String key) {
- assert key != null;
- String value = properties.getProperty(key, null);
- return value != null ? value.trim() : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.connection.IRSEConnectionProperties#setProperty(java.lang.String, java.lang.String)
- */
- public void setProperty(String key, String value) {
- assert key != null;
- if (value != null) {
- properties.setProperty(key, value);
- } else {
- properties.remove(key);
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEDefaultTestLogCollectorDelegate.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEDefaultTestLogCollectorDelegate.java
deleted file mode 100644
index f741f05da..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEDefaultTestLogCollectorDelegate.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal;
-
-import java.io.BufferedOutputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.text.DateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Properties;
-
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.tests.core.IRSETestLogCollectorDelegate;
-
-/**
- * Default implementation of a test log collector delegate. Collects the
- * main log files like the Eclipse platforms .log and other default information.
- */
-public class RSEDefaultTestLogCollectorDelegate implements IRSETestLogCollectorDelegate {
- private final List locationsToDispose = new ArrayList();
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.IRSETestLogCollectorDelegate#dispose()
- */
- public synchronized void dispose() {
- if (!locationsToDispose.isEmpty()) {
- Iterator iterator = locationsToDispose.iterator();
- while (iterator.hasNext()) {
- Object element = iterator.next();
- if (element instanceof IPath) {
- IPath path = (IPath)element;
- if (path.toFile().exists()) path.toFile().delete();
- }
- }
- }
- locationsToDispose.clear();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.IRSETestLogCollectorDelegate#getAbsoluteLogFileLocations()
- */
- public synchronized IPath[] getAbsoluteLogFileLocations() {
- List locations = new ArrayList();
- locationsToDispose.clear();
-
- internalCollectEclipsePlatformLog(locations);
- internalCollectJavaSystemProperties(locations);
-
- return (IPath[])locations.toArray(new IPath[locations.size()]);
- }
-
- /**
- * Lookup the Eclipse platform log (System property osgi.logfile or
- * <workspace_root>/.metadata/.log).
- *
- * @param locations The list of collected log file locations to add the found location to. Must be not <code>null</code>.
- */
- private void internalCollectEclipsePlatformLog(final List locations) {
- assert locations != null;
-
- // Try the OSGi framework system property first.
- String osgi_logfile = System.getProperty("osgi.logfile", null); //$NON-NLS-1$
- IPath osgi_logfile_path = osgi_logfile != null ? new Path(osgi_logfile) : null;
- if (osgi_logfile_path == null || !osgi_logfile_path.toFile().canRead()) {
- // If we cannot get the log file via OSGi, fallback to the well known Eclipse
- // platform log location.
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IPath platformLog = root.getLocation().append(".metadata").append(".log"); //$NON-NLS-1$ //$NON-NLS-2$
- if (platformLog.toFile().canRead()) locations.add(platformLog);
- } else {
- // Directly use the log file path as given from the OSGi framework
- locations.add(osgi_logfile_path);
- }
- }
-
- /**
- * Dumps the current values of all set Java system properties into
- * a temporary file.
- *
- * @param locations The list of collected log file locations to add the temp file location to. Must be not <code>null</code>.
- */
- private void internalCollectJavaSystemProperties(final List locations) {
- // Dump the Java system properties into a temporary file.
- String tmpdir = System.getProperty("java.io.tmpdir"); //$NON-NLS-1$
- if (tmpdir != null) {
- IPath tmpdirPath = new Path(tmpdir);
- if (tmpdirPath.toFile().canWrite() && tmpdirPath.toFile().isDirectory()) {
- tmpdirPath = tmpdirPath.append("java_system_properties.txt"); //$NON-NLS-1$
- if (tmpdirPath.toFile().exists()) tmpdirPath.toFile().delete();
-
- BufferedOutputStream stream = null;
- try {
- if (tmpdirPath.toFile().createNewFile()) {
- // remember that we created a temporaryvfile (which will be deleted within the dispose() method).
- locationsToDispose.add(tmpdirPath);
-
- StringBuffer buffer = new StringBuffer();
- buffer.append("#\n"); //$NON-NLS-1$
- buffer.append("# Generated at " + DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, Locale.getDefault()).format(new Date(System.currentTimeMillis())) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append("#\n\n"); //$NON-NLS-1$
-
- Properties properties = System.getProperties();
-
- // For a better overview within the resulting file, we sort
- // the property keys first.
- Enumeration names = properties.propertyNames();
- List propertyKeys = new ArrayList();
- while (names.hasMoreElements()) {
- propertyKeys.add(names.nextElement());
- }
- Collections.sort(propertyKeys);
-
- Iterator iterator = propertyKeys.iterator();
- while (iterator.hasNext()) {
- String propertyKey = (String)iterator.next();
- String propertyValue = properties.getProperty(propertyKey, ""); //$NON-NLS-1$
- buffer.append(propertyKey + "=" + propertyValue + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- stream = new BufferedOutputStream(new FileOutputStream(tmpdirPath.toFile()));
- stream.write(buffer.toString().getBytes());
-
- // If we reach this point, we can add the temporary created file
- // to the returned locations.
- locations.add(tmpdirPath);
- }
- } catch (IOException e) {
- if (Platform.inDebugMode()) e.printStackTrace();
- } finally {
- try { if (stream != null) stream.close(); } catch (IOException e) { if (Platform.inDebugMode()) e.printStackTrace(); }
- }
- }
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEInternalFrameworkTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEInternalFrameworkTestCase.java
deleted file mode 100644
index 9ddaae285..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEInternalFrameworkTestCase.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.tests.core.IRSECoreTestCaseProperties;
-import org.eclipse.rse.tests.core.RSEWaitAndDispatchUtil;
-import org.eclipse.rse.tests.core.RSEWaitAndDispatchUtil.IInterruptCondition;
-import org.eclipse.rse.tests.core.connection.IRSEConnectionProperties;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests the very core RSE test framework functionality.
- */
-public class RSEInternalFrameworkTestCase extends RSEBaseConnectionTestCase {
-
- /**
- * Test the properties managment and support methods of the
- * <code>RSECoreTestCase</code> implementation.
- */
- public void testCoreTestPropertiesHandling() {
- if (!RSETestsPlugin.isTestCaseEnabled("RSEInternalFrameworkTestCase.testCoreTestPropertiesHandling")) return; //$NON-NLS-1$
-
- // test for our defaults
- assertTrue("Unexpected default for property PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW!", isProperty(IRSECoreTestCaseProperties.PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW, false)); //$NON-NLS-1$
- assertEquals("Unexpected default for property PROP_SWITCH_TO_PERSPECTIVE!", "org.eclipse.rse.ui.view.SystemPerspective", getProperty(IRSECoreTestCaseProperties.PROP_SWITCH_TO_PERSPECTIVE)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Unexpected default for property PROP_FORCE_BACKGROUND_EXECUTION!", isProperty(IRSECoreTestCaseProperties.PROP_FORCE_BACKGROUND_EXECUTION, false)); //$NON-NLS-1$
- assertTrue("Unexpected default for property PROP_PERFORMANCE_TIMING_INCLUDE_SETUP_TEARDOWN!", isProperty(IRSECoreTestCaseProperties.PROP_PERFORMANCE_TIMING_INCLUDE_SETUP_TEARDOWN, false)); //$NON-NLS-1$
-
- // test the specific methods with simulated data
- setProperty("testBooleanProperty", true); //$NON-NLS-1$
- assertTrue("Unexpected stored value for testBooleanProperty!", isProperty("testBooleanProperty", true)); //$NON-NLS-1$ //$NON-NLS-2$
- setProperty("testBooleanProperty", false); //$NON-NLS-1$
- assertTrue("Unexpected stored value for testBooleanProperty!", isProperty("testBooleanProperty", false)); //$NON-NLS-1$ //$NON-NLS-2$
- setProperty("testBooleanProperty", null); //$NON-NLS-1$
- assertNull("testBooleanProperty not removed!", getProperty("testBooleanProperty")); //$NON-NLS-1$ //$NON-NLS-2$
-
- setProperty("testStringProperty", "stringPropertyValue"); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Unexpected stored value for testStringProperty!", isProperty("testStringProperty", "stringPropertyValue")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- setProperty("testStringProperty", "0123456789"); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Unexpected stored value for testStringProperty!", isProperty("testStringProperty", "0123456789")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- setProperty("testStringProperty", null); //$NON-NLS-1$
- assertNull("testStringProperty not removed!", getProperty("testStringProperty")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Test waiter interrupt condition implementation.
- */
- private static class TestWaiter implements IInterruptCondition {
- private final List params;
- public TestWaiter(List params) {
- assert params != null;
- this.params = params;
- }
- public boolean isTrue() { return params.size() > 0; }
- public void dispose() { params.clear(); }
- }
-
- private static class TestJob extends Job {
- final List params;
- public TestJob(List params) {
- super("Test Job"); //$NON-NLS-1$
- assert params != null;
- this.params = params;
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- params.add(Boolean.TRUE);
- }
- });
- return Status.OK_STATUS;
- }
- }
-
- /**
- * Test the <code>RSEWaitAndDispatchUtil</code> wait methods.
- */
- public void testWaitAndDispatch() {
- if (!RSETestsPlugin.isTestCaseEnabled("RSEInternalFrameworkTestCase.testWaitAndDispatch")) return; //$NON-NLS-1$
-
- // the simple wait and dispatch is time out based
- long start = System.currentTimeMillis();
- RSEWaitAndDispatchUtil.waitAndDispatch(2500);
- long end = System.currentTimeMillis();
- assertTrue("Failed to wait a given timeout!", (end - start) >= 2500); //$NON-NLS-1$
-
- // the more complex wait and dispatch method has to stop
- // on a given condition.
- final List params = new ArrayList();
-
- // the trick here is to make the condition true only if a
- // runnable passed through the display thread. That should
- // give us the asurance that the display event dispatching
- // is kept running.
- Job job = new TestJob(params);
- job.setUser(false);
- job.setSystem(true);
- job.setPriority(Job.SHORT);
- job.setRule(ResourcesPlugin.getWorkspace().getRoot());
- job.schedule(3000);
-
- boolean timeout = RSEWaitAndDispatchUtil.waitAndDispatch(10000, new TestWaiter(params));
- assertFalse("Interrupt condition failed to stop wait method!", timeout); //$NON-NLS-1$
- assertEquals("Interrupt condition failed to dispose!", 0, params.size()); //$NON-NLS-1$
- }
-
- /**
- * Test accessing the test data location.
- */
- public void testTestDataLocationManagement() {
- if (!RSETestsPlugin.isTestCaseEnabled("RSEInternalFrameworkTestCase.testTestDataLocationManagement")) return; //$NON-NLS-1$
-
- // get the pure test data location root path.
- IPath root = getTestDataLocation("", false); //$NON-NLS-1$
- assertNotNull("Failed to query test data location root!", root); //$NON-NLS-1$
- assertTrue("Test data root location " + root.toOSString() + " is not a directory!", root.toFile().isDirectory()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Test data root location " + root.toOSString() + " cannot be read!", root.toFile().canRead()); //$NON-NLS-1$ //$NON-NLS-2$
-
- // get a test data location path under the root
- String relative = "unittest_" + System.currentTimeMillis(); //$NON-NLS-1$
- // as the directories should not exist yet, a call to getTestDataLocation must return null
- IPath path = getTestDataLocation(relative, false);
- assertNull("Test data location exist but should not!", path); //$NON-NLS-1$
-
- // go and create the path now (including the OS)
- String os = Platform.getOS();
- assertNotNull("Failed to query current execution host operating system string!", os); //$NON-NLS-1$
- path = root.append(relative + "/" + os); //$NON-NLS-1$
- assertTrue("Failed to create test data location directories. Permission problem?", path.toFile().mkdirs()); //$NON-NLS-1$
-
- // Now, the re-query must be successful.
- IPath path2 = getTestDataLocation(relative, false);
- assertNotNull("Test data location " + root.append(relative).toOSString() + " seems not to exist!", path2); //$NON-NLS-1$ //$NON-NLS-2$
- path2 = getTestDataLocation(relative, true);
- assertNotNull("Test data location " + path.toOSString() + " seems not to exist!", path2); //$NON-NLS-1$ //$NON-NLS-2$
-
- // Delete the created pathes again
- assertTrue("Failed to delete test data location " + path.toOSString() + "!", path.toFile().delete()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Failed to delete test data location " + root.append(relative).toOSString() + "!", root.append(relative).toFile().delete()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Test RSE connection manager and related functionality.
- */
- public void testConnectionManager() {
- if (!RSETestsPlugin.isTestCaseEnabled("RSEInternalFrameworkTestCase.testConnectionManager")) return; //$NON-NLS-1$
-
- // get the pure test data location root path.
- IPath location = getTestDataLocation("testConnectionManager", false); //$NON-NLS-1$
- assertNotNull("Cannot locate test data! Missing test data location?", location); //$NON-NLS-1$
- location = location.append("connection.properties"); //$NON-NLS-1$
- assertNotNull("Failed to construct location to 'connection.properties' test data file!", location); //$NON-NLS-1$
- assertTrue("Required test data file seems to be not a file!", location.toFile().isFile()); //$NON-NLS-1$
- assertTrue("Required test data file is not readable!", location.toFile().canRead()); //$NON-NLS-1$
-
- // load the test connection properties from the data file.
- IRSEConnectionProperties properties = getConnectionManager().loadConnectionProperties(location, true);
- assertNotNull("Failed to load test connection properties from location " + location.toOSString(), properties); //$NON-NLS-1$
- assertEquals("Property name does not match!", "test_windows", properties.getProperty(IRSEConnectionProperties.ATTR_NAME)); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Property profile name does not match!", "junit_test_profile", properties.getProperty(IRSEConnectionProperties.ATTR_PROFILE_NAME)); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Property system type does not match!", "Windows", properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE)); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Property remote system address does not match!", "128.0.0.1", properties.getProperty(IRSEConnectionProperties.ATTR_ADDRESS)); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Property user id does not match!", "test_user", properties.getProperty(IRSEConnectionProperties.ATTR_USERID)); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Property password does not match!", "test_passwd", properties.getProperty(IRSEConnectionProperties.ATTR_PASSWORD)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // test the loading with partial connection information (with defauls)
- Properties props = new Properties();
- props.setProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE, "SSH Only"); //$NON-NLS-1$
- props.setProperty(IRSEConnectionProperties.ATTR_USERID, "local_user"); //$NON-NLS-1$
- props.setProperty(IRSEConnectionProperties.ATTR_PASSWORD, "local_passwd"); //$NON-NLS-1$
- properties = getConnectionManager().loadConnectionProperties(props, true);
- assertNotNull("Failed to load test connection properties from location " + location.toOSString(), properties); //$NON-NLS-1$
- assertEquals("Property name does not match!", "Local", properties.getProperty(IRSEConnectionProperties.ATTR_NAME)); //$NON-NLS-1$ //$NON-NLS-2$
- assertNull("Property profile name does not match!", properties.getProperty(IRSEConnectionProperties.ATTR_PROFILE_NAME)); //$NON-NLS-1$
- assertEquals("Property system type does not match!", "SSH Only", properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE)); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Property remote system address does not match!", "localhost", properties.getProperty(IRSEConnectionProperties.ATTR_ADDRESS)); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Property user id does not match!", "local_user", properties.getProperty(IRSEConnectionProperties.ATTR_USERID)); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Property password does not match!", "local_passwd", properties.getProperty(IRSEConnectionProperties.ATTR_PASSWORD)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // test the loading with partial connection information (without defauls)
- properties = getConnectionManager().loadConnectionProperties(props, false);
- assertNotNull("Failed to load test connection properties from location " + location.toOSString(), properties); //$NON-NLS-1$
- assertNull("Property name does not match!", properties.getProperty(IRSEConnectionProperties.ATTR_NAME)); //$NON-NLS-1$
- assertNull("Property profile name does not match!", properties.getProperty(IRSEConnectionProperties.ATTR_PROFILE_NAME)); //$NON-NLS-1$
- assertEquals("Property system type does not match!", "SSH Only", properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE)); //$NON-NLS-1$ //$NON-NLS-2$
- assertNull("Property remote system address does not match!", properties.getProperty(IRSEConnectionProperties.ATTR_ADDRESS)); //$NON-NLS-1$
- assertEquals("Property user id does not match!", "local_user", properties.getProperty(IRSEConnectionProperties.ATTR_USERID)); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Property password does not match!", "local_passwd", properties.getProperty(IRSEConnectionProperties.ATTR_PASSWORD)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEInternalFrameworkTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEInternalFrameworkTestSuite.java
deleted file mode 100644
index 5b3c0dd1c..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEInternalFrameworkTestSuite.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-/**
- * Main class bundling all internal test case asuring the consistent
- * functionality of the test framework itself.
- */
-public class RSEInternalFrameworkTestSuite extends DelegatingTestSuiteHolder {
-
- /**
- * Standard Java application main method. Allows to launch the test
- * suite from outside as part of nightly runs, headless runs or other.
- * <p><b>Note:</b> Use only <code>junit.textui.TestRunner</code> here as
- * it is explicitly supposed to output the test output to the shell the
- * test suite has been launched from.
- * <p>
- * @param args The standard Java application command line parameters passed in.
- */
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- /**
- * Combine all test into a suite and returns the test suite instance.
- * <p>
- * <b>Note: This method must be always called <i><code>suite</code></i> ! Otherwise
- * the JUnit plug-in test launcher will fail to detect this class!</b>
- * <p>
- * @return The test suite instance.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite("RSE Internal Framework Test Suite"); //$NON-NLS-1$
- // add the single test suites to the overall one here.
- suite.addTestSuite(RSETestsPluginTestCase.class);
- suite.addTestSuite(RSEInternalFrameworkTestCase.class);
-
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)RSEInternalFrameworkTestSuite.suite();
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSETestsPluginTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSETestsPluginTestCase.java
deleted file mode 100644
index 16acf65b4..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSETestsPluginTestCase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Uwe Stieber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.tests.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-
-/**
- * Test cases testing the functionality of the <code>RSETestsPlugin</code> class.
- */
-public class RSETestsPluginTestCase extends RSECoreTestCase {
-
- /**
- * Test the association of the resource bundle to the plugin and related
- * resource bundle functionality.
- */
- public void testPluginResourceBundle() {
- if (!RSETestsPlugin.isTestCaseEnabled("RSETestsPluginTestCase.testPluginResourceBundle")) return; //$NON-NLS-1$
-
- ResourceBundle bundle = RSETestsPlugin.getDefault().getResourceBundle();
- assertNotNull("No resource bundle associated with RSETestsPlugin!", bundle); //$NON-NLS-1$
-
- // our own test id must be true here, otherwise we wouldn't had
- // reached this point anyway.
- assertTrue("Unexpected return value false!", RSETestsPlugin.isTestCaseEnabled("RSETestsPluginTestCase.testPluginResourceBundle")); //$NON-NLS-1$ //$NON-NLS-2$
-
- // a test id not listed within the resources file must be always true
- assertTrue("Unexpected return value false!", RSETestsPlugin.isTestCaseEnabled("RSETestsPluginTestCase.testNeverAddThisToTheResourceBundle")); //$NON-NLS-1$ //$NON-NLS-2$
-
- // this test id should be never enabled
- assertFalse("Unexpected return value true!", RSETestsPlugin.isTestCaseEnabled("RSETestsPluginTestCase.dontRemove.testNeverEnabledThis")); //$NON-NLS-1$ //$NON-NLS-2$
-
- // Test the different getResourceString methods.
- String expected = "testResolveString"; //$NON-NLS-1$
- assertEquals("Unexpected return value!", expected, RSETestsPlugin.getResourceString("RSETestsPluginTestCase.dontRemove.testResolveString")); //$NON-NLS-1$ //$NON-NLS-2$
-
- expected = "testResolveString, param=value"; //$NON-NLS-1$
- assertEquals("Unexpected return value!", expected, RSETestsPlugin.getResourceString("RSETestsPluginTestCase.dontRemove.testResolveStringOneParameter", "value")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- expected = "testResolveString, param=value1, param=value2"; //$NON-NLS-1$
- assertEquals("Unexpected return value!", expected, RSETestsPlugin.getResourceString("RSETestsPluginTestCase.dontRemove.testResolveStringMultiParameter", new Object[] { "value1", "value2" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java
deleted file mode 100644
index 5ab8527f4..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.tests.testsubsystem.TestSubSystemContainerNode;
-import org.eclipse.rse.tests.testsubsystem.TestSubSystemNode;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystem;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNode;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNodeContainer;
-
-/**
- * Simple test subsystem with branches and leafes.
- * Further childs can be added or removed via context menu actions.
- */
-public class TestSubSystem extends SubSystem implements ITestSubSystem {
-
- private ArrayList fChildren = new ArrayList();
-
- /**
- * Constructor.
- * @param host
- * @param connectorService
- */
- public TestSubSystem(IHost host, IConnectorService connectorService) {
- super(host, connectorService);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeSubSystem(IProgressMonitor monitor) {
- TestSubSystemContainerNode parent0 = new TestSubSystemContainerNode("0"); //$NON-NLS-1$
- TestSubSystemContainerNode child0 = new TestSubSystemContainerNode("0:0"); //$NON-NLS-1$
- parent0.addChildNode(child0);
- parent0.addChildNode(new TestSubSystemContainerNode("0:1")); //$NON-NLS-1$
- parent0.addChildNode(new TestSubSystemContainerNode("0:2")); //$NON-NLS-1$
- parent0.addChildNode(new TestSubSystemNode("0:3;")); //$NON-NLS-1$
- parent0.addChildNode(new TestSubSystemContainerNode("0:4")); //$NON-NLS-1$
- child0.addChildNode(new TestSubSystemNode("0:0:0;")); //$NON-NLS-1$
- addChildNode(parent0);
- addChildNode(new TestSubSystemContainerNode("1")); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- fChildren.clear();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#getObjectWithAbsoluteName(java.lang.String)
- */
- public Object getObjectWithAbsoluteName(String key) {
- ITestSubSystemNode[] childs = getChildNodes();
- for (int i = 0; i < childs.length; i++) {
- if (childs[i].getName().equalsIgnoreCase(key)) {
- return childs[i];
- }
- }
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) throws InvocationTargetException, InterruptedException {
- ArrayList filteredChilds = new ArrayList();
- ITestSubSystemNode[] childs = getChildNodes();
- for (int i = 0; i < childs.length; i++) {
- if (childs[i].getName().matches(filterString)) {
- filteredChilds.add(childs[i]);
- }
- }
-
- return filteredChilds.toArray();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.Object, java.lang.String)
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) throws InvocationTargetException, InterruptedException {
- ArrayList filteredChilds = new ArrayList();
- if (parent instanceof ITestSubSystemNodeContainer) {
- ITestSubSystemNodeContainer container = (ITestSubSystemNodeContainer)parent;
- ITestSubSystemNode[] childs = container.getChildNodes();
- for (int i = 0; i < childs.length; i++) {
- if (childs[i].getName().matches(filterString)) {
- filteredChilds.add(childs[i]);
- }
- }
- }
-
- return filteredChilds.toArray();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#addChildNode(org.eclipse.rse.tests.testsubsystem.ITestSubSystemNode)
- */
- public boolean addChildNode(ITestSubSystemNode node) {
- if (node != null && !fChildren.contains(node)) {
- node.setSubSystem(this);
- fChildren.add(node);
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#removeChildNode(org.eclipse.rse.tests.testsubsystem.ITestSubSystemNode)
- */
- public boolean removeChildNode(ITestSubSystemNode node) {
- if (node != null && fChildren.contains(node)) {
- if (node instanceof ITestSubSystemNodeContainer) {
- ((ITestSubSystemNodeContainer)node).removeAllChildNodes();
- }
- fChildren.remove(node);
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#removeAllChildNodes()
- */
- public boolean removeAllChildNodes() {
- if (!fChildren.isEmpty()) {
- ITestSubSystemNode[] childs = getChildNodes();
- for (int i = 0; i < childs.length; i++) {
- if (childs[i] instanceof ITestSubSystemNodeContainer) {
- ((ITestSubSystemNodeContainer)childs[i]).removeAllChildNodes();
- }
- }
- fChildren.clear();
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#hasChildNodes()
- */
- public boolean hasChildNodes() {
- return !fChildren.isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#getChildNodeCount()
- */
- public int getChildNodeCount() {
- return fChildren.size();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#getChildNodes()
- */
- public ITestSubSystemNode[] getChildNodes() {
- return (ITestSubSystemNode[])fChildren.toArray(new ITestSubSystemNode[fChildren.size()]);
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapter.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapter.java
deleted file mode 100644
index 847783771..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapter.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemPerspectiveHelpers;
-import org.eclipse.rse.tests.testsubsystem.TestSubSystemAddAction;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemAddTarget;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNode;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNodeContainer;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.rse.ui.view.SystemViewSubSystemAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Adapter for subsystem node.
- */
-public class TestSubSystemAdapter extends SystemViewSubSystemAdapter
- implements ISystemRemoteElementAdapter, ITestSubSystemAddTarget {
-
- /**
- * Constructor.
- */
- public TestSubSystemAdapter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.internal.testsubsystem.actions.ITestSubSystemAddTarget#canAdd(java.lang.Object)
- */
- public boolean canAdd(Object element) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.internal.testsubsystem.actions.ITestSubSystemAddTarget#doAdd(org.eclipse.swt.widgets.Shell, java.lang.Object, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean doAdd(Shell shell, Object container, Object element, IProgressMonitor monitor) {
- boolean added = false;
- if (container instanceof ITestSubSystemNodeContainer && element instanceof ITestSubSystemNode) {
- added = ((ITestSubSystemNodeContainer)container).addChildNode(((ITestSubSystemNode)element));
- if (added) {
- SystemView view = SystemPerspectiveHelpers.findRSEView();
- if (view != null) {
- view.expandSelected();
- view.refresh(container, true);
- }
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.internal.testsubsystem.actions.ITestSubSystemAddTarget#showAdd(java.lang.Object)
- */
- public boolean showAdd(Object element) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object)
- */
- public String getAbsoluteParentName(Object element) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParent(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParentNamesInUse(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubType(java.lang.Object)
- */
- public String getRemoteSubType(Object element) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteType(java.lang.Object)
- */
- public String getRemoteType(Object element) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteTypeCategory(java.lang.Object)
- */
- public String getRemoteTypeCategory(Object element) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getSubSystemConfigurationId(java.lang.Object)
- */
- public String getSubSystemConfigurationId(Object element) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#refreshRemoteObject(java.lang.Object, java.lang.Object)
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager, org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell parent, String menuGroup) {
- if (selection.size() == 1 && isTestSubSystemNodeContainer(selection.getFirstElement())) {
- if (canAdd(selection.getFirstElement())) {
- menu.add(menuGroup, new TestSubSystemAddAction("Add branch", true, getShell())); //$NON-NLS-1$
- menu.add(menuGroup, new TestSubSystemAddAction("Add leaf", false, getShell())); //$NON-NLS-1$
- }
- }
- }
-
- /*
- * Returns true if the element is a node container.
- */
- private boolean isTestSubSystemNodeContainer(Object element) {
- return element instanceof ITestSubSystemNodeContainer;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapterFactory.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapterFactory.java
deleted file mode 100644
index 7375ea6fa..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapterFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystem;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemConfiguration;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNode;
-import org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * Adapter factory for subsystem adapters.
- */
-public class TestSubSystemAdapterFactory extends AbstractSystemRemoteAdapterFactory
- implements IAdapterFactory {
-
- private TestSubSystemAdapter subSystemAdapter = new TestSubSystemAdapter();
- private TestSubSystemNodeAdapter subSystemNodeAdapter = new TestSubSystemNodeAdapter();
- private TestSubSystemConfigurationAdapter SubSystemConfigAdapter = new TestSubSystemConfigurationAdapter();
-
- /**
- * Constructor.
- */
- public TestSubSystemAdapterFactory() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- Object adapter = null;
- if (adaptableObject instanceof ITestSubSystem) {
- adapter = subSystemAdapter;
- }
- if (adaptableObject instanceof ITestSubSystemNode) {
- adapter = subSystemNodeAdapter;
- }
- if (adaptableObject instanceof ITestSubSystemConfiguration) {
- adapter = SubSystemConfigAdapter;
- }
-
- if (adapter != null && adapter instanceof ISystemViewElementAdapter && adapterType == IPropertySource.class) {
- ((ISystemViewElementAdapter)adapter).setPropertySourceInput(adaptableObject);
- }
-
- return adapter;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfiguration.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfiguration.java
deleted file mode 100644
index 30e426510..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfiguration.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystem;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemConfiguration;
-
-public class TestSubSystemConfiguration extends SubSystemConfiguration implements ITestSubSystemConfiguration {
-
- /**
- * Constructor.
- */
- public TestSubSystemConfiguration() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(org.eclipse.rse.core.model.IHost)
- */
- public ISubSystem createSubSystemInternal(IHost conn) {
- return new TestSubSystem(conn, getConnectorService(conn));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host) {
- return TestSubSystemConnectorServiceManager.getInstance().getConnectorService(host, ITestSubSystem.class);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createDefaultFilterPool(org.eclipse.rse.core.filters.ISystemFilterPoolManager)
- */
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr) {
- ISystemFilterPool defaultPool = null;
- try {
- defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
-
- Vector strings = new Vector();
- strings.add(".*"); //$NON-NLS-1$
-
- ISystemFilter filter = mgr.createSystemFilter(defaultPool, "All", strings); //$NON-NLS-1$
- filter.setType("all"); //$NON-NLS-1$
- }
- catch (Exception exc) {
- // ignore exception
- }
- return defaultPool;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#getTranslatedFilterTypeProperty(org.eclipse.rse.core.filters.ISystemFilter)
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter) {
- String type = selectedFilter.getType();
- if (type.equals("all")) //$NON-NLS-1$
- return "testSubSystemFilter.all"; //$NON-NLS-1$
- return "testSubSystemFilter"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)
- */
- public boolean supportsServerLaunchProperties(IHost host) {
- return false;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfigurationAdapter.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfigurationAdapter.java
deleted file mode 100644
index 2a8daa516..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-
-/**
- * Adapter for subsytsem configuration.
- */
-public class TestSubSystemConfigurationAdapter extends SubSystemConfigurationAdapter {
-
- /**
- * Constructor.
- */
- public TestSubSystemConfigurationAdapter() {
- super();
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConnectorService.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConnectorService.java
deleted file mode 100644
index 443929a65..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConnectorService.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorService;
-
-public class TestSubSystemConnectorService extends AbstractConnectorService {
-
- private boolean connected = false;
-
- /**
- * Constructor.
- *
- * @param host The RSE connection object.
- */
- public TestSubSystemConnectorService(IHost host) {
- super("TestSubSystemConnectorService", //$NON-NLS-1$
- "The connector Service for the TestSubSystem", //$NON-NLS-1$
- host, 0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected()
- */
- public boolean isConnected() {
- return connected;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalConnect(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void internalConnect(IProgressMonitor monitor) throws Exception {
- super.internalConnect(monitor);
- connected = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalDisconnect(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void internalDisconnect(IProgressMonitor monitor) throws Exception {
- super.internalDisconnect(monitor);
- connected = false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsRemoteServerLaunching()
- */
- public boolean supportsRemoteServerLaunching() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#hasRemoteServerLauncherProperties()
- */
- public boolean hasRemoteServerLauncherProperties() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsServerLaunchProperties()
- */
- public boolean supportsServerLaunchProperties() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsPassword()
- */
- public boolean supportsPassword() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsUserId()
- */
- public boolean supportsUserId() {
- return false;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConnectorServiceManager.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConnectorServiceManager.java
deleted file mode 100644
index 7da0ad156..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConnectorServiceManager.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystem;
-
-/**
- * Test subsystem connector service manager. Singleton!
- */
-public class TestSubSystemConnectorServiceManager extends AbstractConnectorServiceManager {
-
- private static TestSubSystemConnectorServiceManager inst;
-
- /**
- * Private Constructor.
- */
- private TestSubSystemConnectorServiceManager() {
- super();
- }
-
- /**
- * Returns the test subsystem connector service manager instance.
- *
- * @return The singleton instance.
- */
- public static TestSubSystemConnectorServiceManager getInstance() {
- if (inst == null)
- inst = new TestSubSystemConnectorServiceManager();
- return inst;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.core.model.IHost)
- */
- public IConnectorService createConnectorService(IHost host) {
- return new TestSubSystemConnectorService(host);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#sharesSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public boolean sharesSystem(ISubSystem otherSubSystem) {
- return (otherSubSystem instanceof ITestSubSystem);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#getSubSystemCommonInterface(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public Class getSubSystemCommonInterface(ISubSystem subsystem) {
- return ITestSubSystem.class;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemNodeAdapter.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemNodeAdapter.java
deleted file mode 100644
index 0ec7669d0..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemNodeAdapter.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemPerspectiveHelpers;
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.tests.testsubsystem.TestSubSystemAddAction;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemAddTarget;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNode;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNodeContainer;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemView;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * Adapter for all nodes and container nodes.
- */
-public class TestSubSystemNodeAdapter extends AbstractSystemViewAdapter
- implements ISystemRemoteElementAdapter, ITestSubSystemAddTarget {
-
- /**
- * Constructor.
- */
- public TestSubSystemNodeAdapter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager, org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
- */
- public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell parent, String menuGroup) {
- if (selection.size() == 1 && isTestSubSystemNodeContainer(selection.getFirstElement())) {
- if (canAdd(selection.getFirstElement())) {
- menu.add(menuGroup, new TestSubSystemAddAction("Add branch", true, getShell())); //$NON-NLS-1$
- menu.add(menuGroup, new TestSubSystemAddAction("Add leaf", false, getShell())); //$NON-NLS-1$
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object element) {
- if (isTestSubSystemNodeContainer(element)) {
- return RSETestsPlugin.getDefault().getImageDescriptor("ICON_ID_BRANCH"); //$NON-NLS-1$
- }
- else if (isTestSubSystemNode(element)) {
- return RSETestsPlugin.getDefault().getImageDescriptor("ICON_ID_LEAF"); //$NON-NLS-1$
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getText(java.lang.Object)
- */
- public String getText(Object element) {
- if (isTestSubSystemNode(element)) {
- return ((ITestSubSystemNode)element).getName();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object element) {
- if (isTestSubSystemNode(element)) {
- ITestSubSystemNode node = (ITestSubSystemNode) element;
- String absName = node.getName();
- node = node.getParent();
- while (node != null) {
- absName = node.getName() + "/" + absName; //$NON-NLS-1$
- node = node.getParent();
- }
- return absName;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getType(java.lang.Object)
- */
- public String getType(Object element) {
- if (isTestSubSystemNodeContainer(element))
- return "testSubSystemContainerNode"; //$NON-NLS-1$
- else if (isTestSubSystemNode(element))
- return "testSubSystemNode"; //$NON-NLS-1$
- else
- return "unknown"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object element) {
- if (isTestSubSystemNode(element))
- return ((ITestSubSystemNode)element).getParent();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element) {
- if (isTestSubSystemNodeContainer(element))
- return ((ITestSubSystemNodeContainer)element).hasChildNodes();
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object element) {
- if (isTestSubSystemNodeContainer(element))
- return ((ITestSubSystemNodeContainer)element).getChildNodes();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyDescriptors()
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyValue(java.lang.Object)
- */
- protected Object internalGetPropertyValue(Object key) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object)
- */
- public String getAbsoluteParentName(Object element) {
- if (isTestSubSystemNode(element))
- if (((ITestSubSystemNode)element).getParent() != null)
- return ((ITestSubSystemNode)element).getParent().getName();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getSubSystemConfigurationId(java.lang.Object)
- */
- public String getSubSystemConfigurationId(Object element) {
- return "testSubSystemConfigurationId"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteTypeCategory(java.lang.Object)
- */
- public String getRemoteTypeCategory(Object element) {
- return "testCategory"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteType(java.lang.Object)
- */
- public String getRemoteType(Object element) {
- return "testType"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubType(java.lang.Object)
- */
- public String getRemoteSubType(Object element) {
- return "testSubType"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#refreshRemoteObject(java.lang.Object, java.lang.Object)
- */
- public boolean refreshRemoteObject(Object oldElement, Object newElement) {
- ITestSubSystemNode oldNode = (ITestSubSystemNode) oldElement;
- ITestSubSystemNode newNode = (ITestSubSystemNode) newElement;
- newNode.setName(oldNode.getName());
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParent(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public Object getRemoteParent(Shell shell, Object element) throws Exception {
- if (isTestSubSystemNode(element))
- return ((ITestSubSystemNode)element).getParent();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParentNamesInUse(org.eclipse.swt.widgets.Shell, java.lang.Object)
- */
- public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception {
- return null;
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
- */
- public boolean supportsUserDefinedActions(Object object) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#canDelete(java.lang.Object)
- */
- public boolean canDelete(Object element) {
- return isTestSubSystemNode(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#showDelete(java.lang.Object)
- */
- public boolean showDelete(Object element) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#doDelete(org.eclipse.swt.widgets.Shell, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception {
- if (isTestSubSystemNode(element)) {
- ITestSubSystemNodeContainer parent = (ITestSubSystemNodeContainer)((ITestSubSystemNode)element).getParent();
- if (parent == null) {
- parent = (ITestSubSystemNodeContainer)((ITestSubSystemNode)element).getSubSystem();
- }
- if (parent != null && isTestSubSystemNodeContainer(parent))
- return parent.removeChildNode(((ITestSubSystemNode)element));
- }
- return false;
- }
-
- /*
- * Returns true if the element is a node.
- */
- private boolean isTestSubSystemNode(Object element) {
- return element instanceof ITestSubSystemNode;
- }
-
- /*
- * Returns true if the element is a node container.
- */
- private boolean isTestSubSystemNodeContainer(Object element) {
- return element instanceof ITestSubSystemNodeContainer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.internal.testsubsystem.actions.ITestSubSystemAddTarget#canAdd(java.lang.Object)
- */
- public boolean canAdd(Object element) {
- return isTestSubSystemNodeContainer(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.internal.testsubsystem.actions.ITestSubSystemAddTarget#doAdd(org.eclipse.swt.widgets.Shell, java.lang.Object, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean doAdd(Shell shell, Object container, Object element, IProgressMonitor monitor) {
- boolean added = false;
- if (isTestSubSystemNodeContainer(container) && isTestSubSystemNode(element)) {
- added = ((ITestSubSystemNodeContainer)container).addChildNode(((ITestSubSystemNode)element));
- if (added) {
- SystemView view = SystemPerspectiveHelpers.findRSEView();
- if (view != null) {
- view.expandSelected();
- view.refresh(container);
- }
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.internal.testsubsystem.actions.ITestSubSystemAddTarget#showAdd(java.lang.Object)
- */
- public boolean showAdd(Object element) {
- return isTestSubSystemNodeContainer(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#canRename(java.lang.Object)
- */
- public boolean canRename(Object element) {
- return isTestSubSystemNode(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#doRename(org.eclipse.swt.widgets.Shell, java.lang.Object, java.lang.String)
- */
- public boolean doRename(Shell shell, Object element, String name) throws Exception {
- if (name != null && isTestSubSystemNode(element)) {
- String oldName = ((ITestSubSystemNode)element).getName();
- if (oldName == null || !oldName.equals(name)) {
- ((ITestSubSystemNode)element).setName(name);
- return true;
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#showRename(java.lang.Object)
- */
- public boolean showRename(Object element) {
- return isTestSubSystemNode(element);
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemAddAction.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemAddAction.java
deleted file mode 100644
index 9eb6bbe66..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemAddAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.testsubsystem;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystem;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemAddTarget;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNode;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNodeContainer;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Add action for container nodes.
- * This action can add branches or leafes.
- */
-public class TestSubSystemAddAction extends SystemBaseAction {
-
- private boolean fAddContainer = false;
-
- /**
- * Constructor.
- * @param text The text of this action shwon in context menues.
- * @param addContainer True if a container node should be added,
- * False if a simple node should be added.
- * @param shell The current shell.
- */
- public TestSubSystemAddAction(String text, boolean addContainer, Shell shell) {
- super(text, shell);
-
- fAddContainer = addContainer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return RSETestsPlugin.getDefault().getImageDescriptor(fAddContainer ? "ICON_ID_BRANCH" : "ICON_ID_LEAF"); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.actions.SystemBaseAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return selection.size() == 1 && checkObjectType(selection.getFirstElement());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.actions.SystemBaseAction#checkObjectType(java.lang.Object)
- */
- public boolean checkObjectType(Object selectedObject) {
- return selectedObject instanceof ITestSubSystemNodeContainer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.actions.SystemBaseAction#run()
- */
- public void run() {
- IStructuredSelection selection = getSelection();
- Object object = selection.getFirstElement();
- ISystemRemoteElementAdapter adapter = getRemoteAdapter(object);
- if (adapter != null && adapter instanceof ITestSubSystemAddTarget && object instanceof ITestSubSystemNodeContainer) {
- ITestSubSystemAddTarget addTarget = (ITestSubSystemAddTarget)adapter;
- ITestSubSystemNodeContainer container = (ITestSubSystemNodeContainer)object;
- String name = ((object instanceof ITestSubSystem) ? "" : adapter.getName(container) + ":") + container.getChildNodeCount(); //$NON-NLS-1$ //$NON-NLS-2$
- ITestSubSystemNode node = fAddContainer ? new TestSubSystemContainerNode(name) : new TestSubSystemNode(name + ";"); //$NON-NLS-1$
- addTarget.doAdd(getShell(), container, node, null);
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemContainerNode.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemContainerNode.java
deleted file mode 100644
index a7f7ae9d2..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemContainerNode.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.testsubsystem;
-
-import java.util.ArrayList;
-
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNode;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNodeContainer;
-
-
-/**
- * A simple container node (branch).
- */
-public class TestSubSystemContainerNode extends TestSubSystemNode
- implements ITestSubSystemNode, ITestSubSystemNodeContainer {
-
- private ArrayList fChildren = new ArrayList();
-
- /**
- * Constructor.
- * @param name The name of the conatiner node shown in the tree.
- */
- public TestSubSystemContainerNode(String name) {
- super(name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#addChildNode(org.eclipse.rse.tests.testsubsystem.ITestSubSystemNode)
- */
- public boolean addChildNode(ITestSubSystemNode node) {
- if (node != null && !fChildren.contains(node)) {
- node.setSubSystem(getSubSystem());
- node.setParent(this);
- fChildren.add(node);
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#removeChildNode(org.eclipse.rse.tests.testsubsystem.ITestSubSystemNode)
- */
- public boolean removeChildNode(ITestSubSystemNode node) {
- if (node != null && fChildren.contains(node)) {
- if (node instanceof ITestSubSystemNodeContainer) {
- ((ITestSubSystemNodeContainer)node).removeAllChildNodes();
- }
- fChildren.remove(node);
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#removeAllChildNodes()
- */
- public boolean removeAllChildNodes() {
- if (!fChildren.isEmpty()) {
- ITestSubSystemNode[] childs = getChildNodes();
- for (int i = 0; i < childs.length; i++) {
- if (childs[i] instanceof ITestSubSystemNodeContainer) {
- ((ITestSubSystemNodeContainer)childs[i]).removeAllChildNodes();
- }
- }
- fChildren.clear();
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#hasChildNodes()
- */
- public boolean hasChildNodes() {
- return !fChildren.isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#getChildNodeCount()
- */
- public int getChildNodeCount() {
- return fChildren.size();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNodeContainer#getChildNodes()
- */
- public ITestSubSystemNode[] getChildNodes() {
- return (ITestSubSystemNode[])fChildren.toArray(new ITestSubSystemNode[fChildren.size()]);
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemNode.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemNode.java
deleted file mode 100644
index 5aa445f42..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/TestSubSystemNode.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.testsubsystem;
-
-import org.eclipse.rse.core.subsystems.AbstractResource;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.tests.testsubsystem.interfaces.ITestSubSystemNode;
-
-/**
- * A simple node (leaf).
- */
-public class TestSubSystemNode extends AbstractResource
- implements ITestSubSystemNode {
-
- private String fName;
- private ITestSubSystemNode fParent;
-
- /**
- * Constructor.
- * @param name The name for this node shown in the tree.
- */
- public TestSubSystemNode(String name) {
- super();
- fName = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNode#getName()
- */
- public String getName() {
- return fName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNode#setName(java.lang.String)
- */
- public void setName(String name) {
- fName = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNode#setParent(org.eclipse.rse.tests.testsubsystem.ITestSubSystemNode)
- */
- public void setParent(ITestSubSystemNode parent) {
- fParent = parent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.testsubsystem.ITestSubSystemNode#getParent()
- */
- public ITestSubSystemNode getParent() {
- return fParent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractResource#getSubSystem()
- */
- public ISubSystem getSubSystem() {
- ISubSystem subSystem = super.getSubSystem();
- if (subSystem == null && getParent() != null) {
- subSystem = getParent().getSubSystem();
- }
- return subSystem;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystem.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystem.java
deleted file mode 100644
index 574ca2c97..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystem.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.testsubsystem.interfaces;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * Interface for the test subsystem.
- */
-public interface ITestSubSystem extends ISubSystem, ITestSubSystemNodeContainer {
- // only for internal use
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemAddTarget.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemAddTarget.java
deleted file mode 100644
index 141f7f884..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemAddTarget.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.testsubsystem.interfaces;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Interface for UI parts that support add actions.
- */
-public interface ITestSubSystemAddTarget {
-
- /**
- * Returns true if add action should be shown for the element.
- * @param element Element for which add should be shown.
- * @return True if add should be shown.
- */
- public boolean showAdd(Object element);
-
- /**
- * Returns true if add action should be enabled for the element.
- * @param element Element for which add should be enabled.
- * @return True if add should be enabled.
- */
- public boolean canAdd(Object element);
-
- /**
- * Add action of the element.
- * @param shell The current shell.
- * @param container The container to wich the element should be added.
- * @param element The element to add to the container.
- * @param monitor The progressmonitor if needed during the add operation.
- * @return True, if the element was added to the container.
- */
- public boolean doAdd(Shell shell, Object container, Object element, IProgressMonitor monitor);
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemConfiguration.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemConfiguration.java
deleted file mode 100644
index c016dd437..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemConfiguration.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.testsubsystem.interfaces;
-
-/**
- * Interface for the test subsystem configuration.
- */
-public interface ITestSubSystemConfiguration {
- // only for internal use
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemNode.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemNode.java
deleted file mode 100644
index e05c5d20e..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemNode.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.testsubsystem.interfaces;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * Interface for all test subsystem nodes.
- */
-public interface ITestSubSystemNode {
-
- /**
- * Returns the name of this node shown in the tree.
- * @return The name of the node.
- */
- public String getName();
-
- /**
- * Set the name for this node.
- * @param name The Name of this node.
- */
- public void setName(String name);
-
- /**
- * Set the subsystem this node belongs to.
- * This value should be set automatically when adding this node to a subsystem or other node.
- * @param subSystem The subsystem.
- */
- public void setSubSystem(ISubSystem subSystem);
-
- /**
- * Returns the subsystem this node belongs to.
- * @return The subsystem.
- */
- public ISubSystem getSubSystem();
-
- /**
- * Set the node container this node belongs to.
- * This value should be set automatically when adding this node to a node container.
- * @param parent The parent node container.
- */
- public void setParent(ITestSubSystemNode parent);
-
- /**
- * Returns the parent node this node belongs to.
- * @return The parent node.
- */
- public ITestSubSystemNode getParent();
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemNodeContainer.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemNodeContainer.java
deleted file mode 100644
index 7dd520b1b..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/testsubsystem/interfaces/ITestSubSystemNodeContainer.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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:
- * Tobias Schwarz (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.testsubsystem.interfaces;
-
-/**
- * Interface for node container.
- */
-public interface ITestSubSystemNodeContainer {
-
- /**
- * Adds the node to the list of childs if not already in the list.
- * @param node The node that should be added to the list of childs.
- * @return True if the node was added.
- */
- public boolean addChildNode(ITestSubSystemNode node);
-
- /**
- * Removes the node from the list of childs.
- * If the node is a node container, all children are removed recursively.
- * @param node The node that should be removed from the list of childs.
- * @return True if the node exists as a child and was removed.
- */
- public boolean removeChildNode(ITestSubSystemNode node);
-
- /**
- * Removes all children of this container.
- * If a hild node is a node container, all children are removed recursively.
- * @return True if children were removed.
- */
- public boolean removeAllChildNodes();
-
- /**
- * Returns true if this container has children.
- * @return True if this node has children.
- */
- public boolean hasChildNodes();
-
- /**
- * Returns the number of children.
- * @return The number of children.
- */
- public int getChildNodeCount();
-
- /**
- * Returns an array of all children.
- * @return Array of children.
- */
- public ITestSubSystemNode[] getChildNodes();
-}
diff --git a/rse/tests/org.eclipse.rse.tests/teamConfig/RSE Combined Test Suite.launch b/rse/tests/org.eclipse.rse.tests/teamConfig/RSE Combined Test Suite.launch
deleted file mode 100644
index 3fb03cb09..000000000
--- a/rse/tests/org.eclipse.rse.tests/teamConfig/RSE Combined Test Suite.launch
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<stringAttribute key="bootstrap" value=""/>
-<booleanAttribute key="useProduct" value="true"/>
-<booleanAttribute key="tracing" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<stringAttribute key="checked" value="[NONE]"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-test-workspace"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="clearws" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.rse.tests.RSECombinedTestSuite"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-debug -clean"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.rse.tests"/>
-<booleanAttribute key="askclear" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.rse.tests"/>
-</listAttribute>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-</launchConfiguration>
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/connectionDefault.properties b/rse/tests/org.eclipse.rse.tests/test.data/connectionDefault.properties
deleted file mode 100644
index e515b554d..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/connectionDefault.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others. All rights reserved.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Uwe Stieber (Wind River) - refactoring and cleanup.
-###############################################################################
-
-# The default RSE host node label/name
-name = Local
-
-# The default RSE profile name to store the connection to. If not set,
-# the default system profile is used.
-# Default: not set. Uncomment to set!
-#profile_name = myprofilename
-
-# The default test connection system type if not explicitly
-# specified different (possible values: Unix, Linux, Local, Windows, SSH Only, FTP Only)
-system_type = Local
-
-# The default remote system ip address or dns name.
-address = localhost
-
-# The default user id to use for connecting to the remote system
-# Default: not set. Uncomment to set!
-#userid = myuserid
-
-# The default users password to use for connecting to the remote system
-# Default: not set. Uncomment to set!
-#password = mypassword
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/testConnectionManager/connection.properties b/rse/tests/org.eclipse.rse.tests/test.data/testConnectionManager/connection.properties
deleted file mode 100644
index cd608efac..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/testConnectionManager/connection.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Uwe Stieber (Wind River) - initial contribution.
-###############################################################################
-
-# Do not change the properties within this file without changing
-# the consuming unittest too!
-name = test_windows
-profile_name = junit_test_profile
-system_type = Windows
-address = 128.0.0.1
-userid = test_user
-password = test_passwd
diff --git a/rse/tests/org.eclipse.rse.tests/test.xml b/rse/tests/org.eclipse.rse.tests/test.xml
deleted file mode 100644
index 5989bf7d2..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-Run post build tests.
-Not yet complete.
-Needs to be updated and tested for org.eclipse.rse
--->
-
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.."/>
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.eclipse.rse.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org.eclipse.rse.tests.*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="test-folder" value="${eclipse-home}/ui_iseriestests_folder"/>
- <delete dir="${test-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${test-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.rse.tests.SampleTestSuite"/>
- </ant>
-
- <!-- Commented out until source of problem found (not reusing same workspace dir)
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${session-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.ui.tests.api.SessionRestoreTest"/>
- </ant>
- -->
-
- <!--
- <property name="sniff-folder"
- value="${eclipse-home}/ui_sniff_folder"/>
- <delete dir="${sniff-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${sniff-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.ui.tests.UiTestSuite"/>
-
- </ant>
-
- <property name="jface-sniff-folder"
- value="${eclipse-home}/jface_sniff_folder"/>
- <delete dir="${jface-sniff-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${jface-sniff-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.jface.tests.viewers.AllTests"/>
- </ant>
- -->
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org.eclipse.rse.*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>
diff --git a/rse/tests/readme.txt b/rse/tests/readme.txt
deleted file mode 100644
index 50bfad5ff..000000000
--- a/rse/tests/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Use the "tests" folder for projects containing various tests.
-All these CVS modules should be named "org.eclipse.rse.tests.*". \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal-feature/.project b/terminal/org.eclipse.tm.terminal-feature/.project
deleted file mode 100644
index c93208eb4..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal-feature/build.properties b/terminal/org.eclipse.tm.terminal-feature/build.properties
deleted file mode 100644
index 6c1e50644..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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 Scharf (Wind River) - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/terminal/org.eclipse.tm.terminal-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal-feature/feature.properties b/terminal/org.eclipse.tm.terminal-feature/feature.properties
deleted file mode 100644
index 8e8e6c4a2..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Terminal Widget
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=An ANSI (vt102) compatible Terminal widget.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal-feature/feature.xml b/terminal/org.eclipse.tm.terminal-feature/feature.xml
deleted file mode 100644
index 18482d13f..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/feature.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.tm.terminal"
- label="%featureName"
- provider-name="%providerName"
- version="0.9.1.qualifier">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.jface.text"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal"
- download-size="56"
- install-size="56"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal-feature/license.html b/terminal/org.eclipse.tm.terminal-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 510af57e7..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Terminal Widget Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=An ANSI (vt102) compatible Terminal widget.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index a65ba07f0..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Terminal Widget Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 89c807a28..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/eclipse32.png b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 9166eba40..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=TM Terminal Widget Source
-providerName=Eclipse.org
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/.project b/terminal/org.eclipse.tm.terminal.sdk-feature/.project
deleted file mode 100644
index 92158332e..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.sdk-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/build.properties b/terminal/org.eclipse.tm.terminal.sdk-feature/build.properties
deleted file mode 100644
index ea6fc1c9e..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html,\
- eclipse_update_120.jpg
-generate.feature@org.eclipse.tm.terminal.source=org.eclipse.tm.terminal
-generate.feature@org.eclipse.tm.terminal.serial.source=org.eclipse.tm.terminal.serial
-generate.feature@org.eclipse.tm.terminal.ssh.source=org.eclipse.tm.terminal.ssh
-generate.feature@org.eclipse.tm.terminal.view.source=org.eclipse.tm.terminal.view
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/eclipse_update_120.jpg b/terminal/org.eclipse.tm.terminal.sdk-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties b/terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties
deleted file mode 100644
index 674d60c4b..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Terminal SDK
-featureNameSerial=TM Terminal Serial Connector
-featureNameSsh=TM Terminal Ssh Connector
-featureNameView=TM Terminal View
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=An ANSI (vt102) compatible Terminal including \
-pluggable connectors for Serial, SSH and Telnet. Includes Source Code.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml b/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml
deleted file mode 100644
index 69aa224d7..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.tm.terminal.sdk"
- label="%featureName"
- version="0.9.1.qualifier"
- provider-name="%providerName"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <includes
- id="org.eclipse.tm.terminal"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.serial"
- version="0.0.0"
- name="%featureNameSerial"
- optional="true"/>
-
- <includes
- id="org.eclipse.tm.terminal.ssh"
- version="0.0.0"
- name="%featureNameSsh"
- optional="true"/>
-
- <includes
- id="org.eclipse.tm.terminal.view"
- version="0.0.0"
- name="%featureNameView"
- optional="true"/>
-
- <includes
- id="org.eclipse.tm.terminal.source"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.serial.source"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.ssh.source"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.view.source"
- version="0.0.0"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/license.html b/terminal/org.eclipse.tm.terminal.sdk-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/.project b/terminal/org.eclipse.tm.terminal.serial-feature/.project
deleted file mode 100644
index 44409931f..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.serial-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/build.properties b/terminal/org.eclipse.tm.terminal.serial-feature/build.properties
deleted file mode 100644
index 6c1e50644..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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 Scharf (Wind River) - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.serial-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/feature.properties b/terminal/org.eclipse.tm.terminal.serial-feature/feature.properties
deleted file mode 100644
index d314f4bba..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Terminal Serial Connector
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=A serial line connector for the Terminal using javacomm API
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/feature.xml b/terminal/org.eclipse.tm.terminal.serial-feature/feature.xml
deleted file mode 100644
index c12d85251..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/feature.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.tm.terminal.serial"
- label="%featureName"
- provider-name="%providerName"
- version="0.9.0.qualifier">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.serial"
- download-size="19"
- install-size="19"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/license.html b/terminal/org.eclipse.tm.terminal.serial-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index dddd2ed8f..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Terminal Serial Connector Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=A serial line connector for the Terminal using javacomm API
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 7cae1eb00..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Terminal Serial Connector Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 89c807a28..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/eclipse32.png b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 3674a10cd..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=TM Terminal Serial Connector Source
-providerName=Eclipse.org
diff --git a/terminal/org.eclipse.tm.terminal.serial/.classpath b/terminal/org.eclipse.tm.terminal.serial/.classpath
deleted file mode 100644
index 065ac06e1..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.serial/.project b/terminal/org.eclipse.tm.terminal.serial/.project
deleted file mode 100644
index e16739b9d..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.serial</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>net.sourceforge.metrics.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>net.sourceforge.metrics.nature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/terminal/org.eclipse.tm.terminal.serial/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal.serial/META-INF/MANIFEST.MF
deleted file mode 100644
index 4dbf7a525..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal.serial;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal
-Eclipse-LazyStart: true
-Eclipse-BuddyPolicy: ext
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ClassPath: .
diff --git a/terminal/org.eclipse.tm.terminal.serial/README.txt b/terminal/org.eclipse.tm.terminal.serial/README.txt
deleted file mode 100644
index a2edcc54b..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/README.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-Important note:
-
-In order to compile and run this plugin, comm has to be installed into
-the java installation. Once comm.jar is installed in your JRE, you'll
-need to quit and re-start Eclipse PDE in order to recompute the classpath.
-
-Linux or Solaris:
------------------
-* Get comm3.0_u1 or later from Sun at
- http://www.sun.com/download/products.xml?id=43208d3d
-* Follow the installation instructions. As per 3.0_u1 on Linux, you need to
- - cp jar/comm.jar $JRE/lib/ext
- - cp doc/javax.comm.properties $JRE/lib
- - cp lib/*.so $JRE/lib/i386
-
-Windows:
---------
-* Get comm.jar 2.0.3 ZIP archive from Sun at
- http://www.sun.com/download/products.xml?id=43208d3d
- - Extract comm.jar into %JRE%\lib\ext
-* Get rxtx-2.0-7pre1-i386-pc-mingw32.zip from
- http://users.frii.com/jarvi/rxtx/download.html
- - Extract RXTXcomm.jar into %JRE%\lib\ext
- - Extract rxtx*.dll into %JRE%\bin
-* Create new text file
- %JRE%\lib\javax.comm.properties
- with the following line as contents:
- driver=gnu.io.RXTXCommDriver
-
-Other platforms (MaxOS X etc):
-------------------------------
-* Get comm.jar 2.0.3 as explained for Windows
-* Get rxtx-2.0-7pre1.tar.gz sources for your platform from
- http://users.frii.com/jarvi/rxtx/download.html
-* Follow instructions to compile and install. You'll need a
- javax.comm.properties file as explained for Windows.
- \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/about.html b/terminal/org.eclipse.tm.terminal.serial/about.html
deleted file mode 100644
index 460233046..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/about.ini b/terminal/org.eclipse.tm.terminal.serial/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/about.mappings b/terminal/org.eclipse.tm.terminal.serial/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/about.properties b/terminal/org.eclipse.tm.terminal.serial/about.properties
deleted file mode 100644
index 2519653ed..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Terminal Serial Connector\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.serial/build.properties b/terminal/org.eclipse.tm.terminal.serial/build.properties
deleted file mode 100644
index f98c5b193..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/build.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- README.txt,\
- about.html,about.ini,about.mappings,about.properties,\
- eclipse32.png
-src.includes = README.txt,\
- about.html
diff --git a/terminal/org.eclipse.tm.terminal.serial/eclipse32.png b/terminal/org.eclipse.tm.terminal.serial/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.serial/plugin.properties b/terminal/org.eclipse.tm.terminal.serial/plugin.properties
deleted file mode 100644
index b8a0cec51..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/plugin.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-pluginName = TM Terminal Serial Connector
-providerName = Eclipse.org
diff --git a/terminal/org.eclipse.tm.terminal.serial/plugin.xml b/terminal/org.eclipse.tm.terminal.serial/plugin.xml
deleted file mode 100644
index 0f946359b..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/plugin.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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 Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
--->
-<plugin>
- <extension
- point="org.eclipse.tm.terminal.terminalConnector">
- <connector class="org.eclipse.tm.terminal.internal.serial.SerialConnector"/>
- </extension>
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/ISerialSettings.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/ISerialSettings.java
deleted file mode 100644
index 9201fc1a9..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/ISerialSettings.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.serial;
-
-import org.eclipse.tm.terminal.ISettingsStore;
-
-public interface ISerialSettings {
-
- String getSerialPort();
- int getBaudRate();
- int getDataBits();
- int getStopBits();
- int getParity();
- int getFlowControl();
- int getTimeout();
- String getStatusString(String strConnected);
- void load(ISettingsStore store);
- void save(ISettingsStore store);
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialConnectWorker.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialConnectWorker.java
deleted file mode 100644
index a8b3426a4..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialConnectWorker.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalControl
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.serial;
-
-import javax.comm.CommPortIdentifier;
-import javax.comm.PortInUseException;
-import javax.comm.SerialPort;
-
-import org.eclipse.tm.terminal.ITerminalControl;
-import org.eclipse.tm.terminal.TerminalState;
-
-public class SerialConnectWorker extends Thread {
- private final ITerminalControl fControl;
- private final SerialConnector fConn;
-
- /**
- * UNDER CONSTRUCTION
- * @param conn TODO
- * @param control TODO
- */
- public SerialConnectWorker(SerialConnector conn, ITerminalControl control) {
- super();
- fControl = control;
- fConn = conn;
- fControl.setState(TerminalState.CONNECTING);
- }
- public void run() {
-
- try {
- fControl.setState(TerminalState.OPENED);
- String strID = getClass().getPackage().getName();
- ISerialSettings s=fConn.getSerialSettings();
-
- fConn.setSerialPortHandler(new SerialPortHandler(fConn,fControl));
- fConn.setSerialPortIdentifier(CommPortIdentifier.getPortIdentifier(s.getSerialPort()));
- int timeoutInMs = s.getTimeout() * 1000;
-
- SerialPort serialPort=(SerialPort) fConn.getSerialPortIdentifier().open(strID,timeoutInMs);
- serialPort.setSerialPortParams(s.getBaudRate(), s.getDataBits(), s.getStopBits(), s.getParity());
- serialPort.setFlowControlMode(s.getFlowControl());
- serialPort.addEventListener(fConn.getSerialPortHandler());
- serialPort.notifyOnDataAvailable(true);
- fConn.getSerialPortIdentifier().addPortOwnershipListener(fConn.getSerialPortHandler());
- fConn.setSerialPort(serialPort);
- fControl.setState(TerminalState.CONNECTED);
- } catch (PortInUseException portInUseException) {
- fConn.setPortInUse(true);
- fControl.setState(TerminalState.CLOSED);
- fControl.setMsg("Connection Error!\n" + portInUseException.getMessage()); //$NON-NLS-1$
-
- } catch (Exception exception) {
- fControl.setState(TerminalState.CLOSED);
- }
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialConnector.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialConnector.java
deleted file mode 100644
index 5112e3043..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialConnector.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalControl
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.serial;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.comm.CommPortIdentifier;
-import javax.comm.SerialPort;
-
-import org.eclipse.tm.terminal.ISettingsPage;
-import org.eclipse.tm.terminal.ISettingsStore;
-import org.eclipse.tm.terminal.ITerminalConnector;
-import org.eclipse.tm.terminal.ITerminalControl;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalState;
-
-public class SerialConnector implements ITerminalConnector {
- private OutputStream fOutputStream;
- private InputStream fInputStream;
- private ITerminalControl fControl;
- private SerialPort fSerialPort;
- private CommPortIdentifier fSerialPortIdentifier;
- private SerialPortHandler fTerminalSerialPortHandler;
- private boolean fIsPortInUse;
- private final SerialSettings fSettings;
- public SerialConnector() {
- SerialSettings settins=null;
- try {
- settins=new SerialSettings();
- } catch (NoClassDefFoundError e) {
- // the comm library is not installed
- e.printStackTrace();
- }
- fSettings=settins;
- }
- public String getId() {
- return getClass().getName();
- }
- public boolean isInstalled() {
- // check if serial is installed
- try {
- return SerialPort.class!=null;
- } catch (Throwable e) {
- return false;
- }
- }
- public SerialConnector(SerialSettings settings) {
- fSettings=settings;
- }
- public void connect(ITerminalControl control) {
- Logger.log("entered."); //$NON-NLS-1$
- fControl=control;
- SerialConnectWorker worker = new SerialConnectWorker(this, control);
- worker.start();
- }
- public void disconnect() {
- Logger.log("entered."); //$NON-NLS-1$
-
- // Fix for SPR 112422. When output is being received from the serial port, the
- // below call to removePortOwnershipListener() attempts to lock the serial port
- // object, but that object is already locked by another Terminal view thread
- // waiting for the SWT display thread to process a syncExec() call. Since this
- // method is called on the display thread, the display thread is waiting to
- // lock the serial port object and the thread holding the serial port object
- // lock is waiting for the display thread to process a syncExec() call, so the
- // two threads end up deadlocked, which hangs the Workbench GUI.
- //
- // The solution is to spawn a short-lived worker thread that calls
- // removePortOwnershipListener(), thus preventing the display thread from
- // deadlocking with the other Terminal view thread.
-
- new Thread("Terminal View Serial Port Disconnect Worker") //$NON-NLS-1$
- {
- public void run() {
-
- if (getSerialPortIdentifier() != null) {
- getSerialPortIdentifier()
- .removePortOwnershipListener(getSerialPortHandler());
- }
-
- if (getSerialPort() != null) {
- getSerialPort().removeEventListener();
- Logger.log("Calling close() on serial port ..."); //$NON-NLS-1$
- getSerialPort().close();
- }
-
- if (getInputStream() != null) {
- try {
- getInputStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- if (getOutputStream() != null) {
- try {
- getOutputStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- setSerialPortIdentifier(null);
- cleanSerialPort();
- setSerialPortHandler(null);
- }
-
- }.start();
- fControl.setState(TerminalState.CLOSED);
- }
- public InputStream getInputStream() {
- return fInputStream;
- }
- public OutputStream getOutputStream() {
- return fOutputStream;
- }
- private void setInputStream(InputStream inputStream) {
- fInputStream = inputStream;
- }
- private void setOutputStream(OutputStream outputStream) {
- fOutputStream = outputStream;
- }
- public boolean isLocalEcho() {
- return false;
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- // TODO
- }
-
- protected SerialPort getSerialPort() {
- return fSerialPort;
- }
-
- /**
- * sets the socket to null
- */
- void cleanSerialPort() {
- fSerialPort=null;
- setInputStream(null);
- setOutputStream(null);
- }
-
- protected void setSerialPort(SerialPort serialPort) throws IOException {
- cleanSerialPort();
- if(serialPort!=null) {
- fSerialPort = serialPort;
- setOutputStream(serialPort.getOutputStream());
- setInputStream(serialPort.getInputStream());
- }
- }
- protected CommPortIdentifier getSerialPortIdentifier() {
- return fSerialPortIdentifier;
- }
- protected void setSerialPortIdentifier(CommPortIdentifier serialPortIdentifier) {
- fSerialPortIdentifier = serialPortIdentifier;
- }
- void setSerialPortHandler(SerialPortHandler serialPortHandler) {
- fTerminalSerialPortHandler=serialPortHandler;
- }
- SerialPortHandler getSerialPortHandler() {
- return fTerminalSerialPortHandler;
- }
- public boolean isPortInUse() {
- return fIsPortInUse;
- }
- public void setPortInUse(boolean b) {
- fIsPortInUse=true;
-
- }
- public ISerialSettings getSerialSettings() {
- return fSettings;
- }
- public ISettingsPage makeSettingsPage() {
- return new SerialSettingsPage(fSettings);
- }
- public String getStatusString(String strConnected) {
- return fSettings.getStatusString(strConnected);
- }
- public void load(ISettingsStore store) {
- fSettings.load(store);
- }
- public void save(ISettingsStore store) {
- fSettings.save(store);
- }
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialMessages.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialMessages.java
deleted file mode 100644
index d449b9768..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialMessages.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.serial;
-
-import org.eclipse.osgi.util.NLS;
-public class SerialMessages extends NLS {
- static {
- NLS.initializeMessages(SerialMessages.class.getName(), SerialMessages.class);
- }
- public static String CONNTYPE_SERIAL;
- public static String PROP_TITLE;
- public static String PORT;
- public static String BAUDRATE;
- public static String DATABITS;
- public static String STOPBITS;
- public static String PARITY;
- public static String FLOWCONTROL;
- public static String PORT_IN_USE;
- public static String TIMEOUT;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialMessages.properties b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialMessages.properties
deleted file mode 100644
index e00332637..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialMessages.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-PORT_IN_USE = Serial port \''{0}\'' is currently in use\!\nDo you want to close the port?
-CONNTYPE_SERIAL = Serial
-PROP_TITLE = Terminal
-PORT = Port
-BAUDRATE = Baud Rate
-DATABITS = Data Bits
-STOPBITS = Stop Bits
-PARITY = Parity
-FLOWCONTROL = Flow Control
-TIMEOUT = Timeout (sec)
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialPortHandler.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialPortHandler.java
deleted file mode 100644
index ec5e6dc8e..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialPortHandler.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalControl
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.serial;
-
-import java.io.IOException;
-import java.text.MessageFormat;
-
-import javax.comm.CommPortOwnershipListener;
-import javax.comm.SerialPortEvent;
-import javax.comm.SerialPortEventListener;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.terminal.ITerminalControl;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalState;
-
-/**
- * UNDER CONSTRUCTION
- */
-public class SerialPortHandler implements
- SerialPortEventListener, CommPortOwnershipListener {
-
- private final ITerminalControl fControl;
- private final SerialConnector fConn;
- protected byte[] bytes = new byte[2048];
-
- /**
- * UNDER CONSTRUCTION
- * @param control TODO
- */
- public SerialPortHandler(SerialConnector conn,ITerminalControl control) {
- super();
- fControl = control;
- fConn=conn;
- }
-
- // Message handlers
-
- /**
- * UNDER CONSTRUCTION
- */
- public void onSerialDataAvailable(Object data) {
- try {
- while (fConn.getInputStream() != null && fConn.getInputStream().available() > 0) {
- int nBytes = fConn.getInputStream().read(bytes);
- fControl.writeToTerminal(new String(bytes, 0, nBytes));
- }
- } catch (IOException ex) {
- fControl.displayTextInTerminal(ex.getMessage());
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- public void onSerialOwnershipRequested(Object data) {
- if (fConn.isPortInUse()) {
- fConn.setPortInUse(false);
- return;
- }
-
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- String[] args = new String[] { fConn.getSerialSettings().getSerialPort() };
- String strMsg = MessageFormat.format(SerialMessages.PORT_IN_USE, args);
-
- if (!MessageDialog.openQuestion(fControl.getShell(), SerialMessages.PROP_TITLE, strMsg))
- return;
- fControl.setState(TerminalState.CONNECTING);
- }
-
- });
- }
-
- // SerialPortEventListener interface
- public void serialEvent(SerialPortEvent event) {
- switch (event.getEventType()) {
- case SerialPortEvent.DATA_AVAILABLE:
- onSerialDataAvailable(null);
- break;
- }
- }
-
- // CommPortOwnershipListener interface
-
- /**
- * UNDER CONSTRUCTION
- */
- public void ownershipChange(int nType) {
- switch (nType) {
- case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED:
- onSerialOwnershipRequested(null);
- break;
- }
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialProperties.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialProperties.java
deleted file mode 100644
index aaca3d5eb..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialProperties.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalProperties
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.serial;
-
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Vector;
-
-import javax.comm.CommPortIdentifier;
-
-public class SerialProperties {
- protected List fSerialPortTable;
- protected List fBaudRateTable;
- protected List fDataBitsTable;
- protected List fStopBitsTable;
- protected List fParityTable;
- protected List fFlowControlTable;
- protected String fDefaultConnType;
- protected String fDefaultSerialPort;
- protected String fDefaultBaudRate;
- protected String fDefaultDataBits;
- protected String fDefaultStopBits;
- protected String fDefaultParity;
- protected String fDefaultFlowControl;
-
- public SerialProperties() {
- setupProperties();
- }
- public List getSerialPortTable() {
- return fSerialPortTable;
- }
-
- public List getBaudRateTable() {
- return fBaudRateTable;
- }
-
- public List getDataBitsTable() {
- return fDataBitsTable;
- }
-
- public List getStopBitsTable() {
- return fStopBitsTable;
- }
-
- public List getParityTable() {
- return fParityTable;
- }
-
- public List getFlowControlTable() {
- return fFlowControlTable;
- }
- public String getDefaultConnType() {
- return fDefaultConnType;
- }
-
- public String getDefaultSerialPort() {
- return fDefaultSerialPort;
- }
-
- public String getDefaultBaudRate() {
- return fDefaultBaudRate;
- }
-
- public String getDefaultDataBits() {
- return fDefaultDataBits;
- }
-
- public String getDefaultStopBits() {
- return fDefaultStopBits;
- }
-
- public String getDefaultParity() {
- return fDefaultParity;
- }
-
- public String getDefaultFlowControl() {
- return fDefaultFlowControl;
- }
- public String getDefaultTimeout() {
- return "5"; //$NON-NLS-1$
- }
- protected void setupProperties() {
- fSerialPortTable = new Vector();
- fBaudRateTable = new Vector();
- fDataBitsTable = new Vector();
- fStopBitsTable = new Vector();
- fParityTable = new Vector();
- fFlowControlTable = new Vector();
- fDefaultConnType = ""; //$NON-NLS-1$
- fDefaultSerialPort = ""; //$NON-NLS-1$
- fDefaultBaudRate = ""; //$NON-NLS-1$
- fDefaultDataBits = ""; //$NON-NLS-1$
- fDefaultStopBits = ""; //$NON-NLS-1$
- fDefaultParity = ""; //$NON-NLS-1$
- fDefaultFlowControl = ""; //$NON-NLS-1$
-
- fBaudRateTable.add("300"); //$NON-NLS-1$
- fBaudRateTable.add("1200"); //$NON-NLS-1$
- fBaudRateTable.add("2400"); //$NON-NLS-1$
- fBaudRateTable.add("4800"); //$NON-NLS-1$
- fBaudRateTable.add("9600"); //$NON-NLS-1$
- fBaudRateTable.add("19200"); //$NON-NLS-1$
- fBaudRateTable.add("38400"); //$NON-NLS-1$
- fBaudRateTable.add("57600"); //$NON-NLS-1$
- fBaudRateTable.add("115200"); //$NON-NLS-1$
-
- fDataBitsTable.add("5"); //$NON-NLS-1$
- fDataBitsTable.add("6"); //$NON-NLS-1$
- fDataBitsTable.add("7"); //$NON-NLS-1$
- fDataBitsTable.add("8"); //$NON-NLS-1$
-
- fStopBitsTable.add("1"); //$NON-NLS-1$
- fStopBitsTable.add("1_5"); //$NON-NLS-1$
- fStopBitsTable.add("2"); //$NON-NLS-1$
-
- fParityTable.add("None"); //$NON-NLS-1$
- fParityTable.add("Even"); //$NON-NLS-1$
- fParityTable.add("Odd"); //$NON-NLS-1$
- fParityTable.add("Mark"); //$NON-NLS-1$
- fParityTable.add("Space"); //$NON-NLS-1$
-
- fFlowControlTable.add("None"); //$NON-NLS-1$
- fFlowControlTable.add("RTS/CTS"); //$NON-NLS-1$
- fFlowControlTable.add("Xon/Xoff"); //$NON-NLS-1$
-
- fDefaultBaudRate = (String) fBaudRateTable.get(4);
- fDefaultDataBits = (String) fDataBitsTable.get(3);
- fDefaultStopBits = (String) fStopBitsTable.get(0);
- fDefaultParity = (String) fParityTable.get(0);
- fDefaultFlowControl = (String) fFlowControlTable.get(0);
-
- Enumeration portIdEnum= CommPortIdentifier.getPortIdentifiers();
- while (portIdEnum.hasMoreElements()) {
- CommPortIdentifier identifier = (CommPortIdentifier) portIdEnum.nextElement();
- String strName = identifier.getName();
- int nPortType = identifier.getPortType();
-
- if (nPortType == CommPortIdentifier.PORT_SERIAL)
- fSerialPortTable.add(strName);
- }
-
- Collections.sort(fSerialPortTable);
-
- if (!fSerialPortTable.isEmpty()) {
- fDefaultSerialPort = (String) fSerialPortTable.get(0);
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialSettings.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialSettings.java
deleted file mode 100644
index 8e7444e35..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialSettings.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalSettings
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.serial;
-
-import javax.comm.SerialPort;
-
-import org.eclipse.tm.terminal.ISettingsStore;
-
-public class SerialSettings implements ISerialSettings {
- protected String fSerialPort;
- protected String fBaudRate;
- protected String fDataBits;
- protected String fStopBits;
- protected String fParity;
- protected String fFlowControl;
- protected String fTimeout;
- final private SerialProperties fProperties=new SerialProperties();
-
- public String getSerialPort() {
- return fSerialPort;
- }
-
- public void setSerialPort(String strSerialPort) {
- fSerialPort = strSerialPort;
- }
-
- public String getBaudRateString() {
- return fBaudRate;
- }
-
- public int getBaudRate() {
- int nBaudRate;
-
- try {
- nBaudRate = Integer.parseInt(fBaudRate);
- } catch (NumberFormatException numberFormatException) {
- nBaudRate = 9600;
- }
-
- return nBaudRate;
- }
-
- public void setBaudRate(String strBaudRate) {
- fBaudRate = strBaudRate;
- }
-
- public String getDataBitsString() {
- return fDataBits;
- }
-
- public int getDataBits() {
- if (fDataBits.equals("5")) { //$NON-NLS-1$
- return SerialPort.DATABITS_5;
- } else if (fDataBits.equals("6")) { //$NON-NLS-1$
- return SerialPort.DATABITS_6;
- } else if (fDataBits.equals("7")) { //$NON-NLS-1$
- return SerialPort.DATABITS_7;
- } else {
- return SerialPort.DATABITS_8;
- }
- }
-
- public void setDataBits(String strDataBits) {
- fDataBits = strDataBits;
- }
-
- public String getStopBitsString() {
- return fStopBits;
- }
-
- public int getStopBits() {
- if (fStopBits.equals("1_5")) { //$NON-NLS-1$
- return SerialPort.STOPBITS_1_5;
- } else if (fStopBits.equals("2")) { //$NON-NLS-1$
- return SerialPort.STOPBITS_2;
- } else { // 1
- return SerialPort.STOPBITS_1;
- }
- }
-
- public void setStopBits(String strStopBits) {
- fStopBits = strStopBits;
- }
-
- public String getParityString() {
- return fParity;
- }
-
- public int getParity() {
- if (fParity.equals("Even")) //$NON-NLS-1$
- {
- return SerialPort.PARITY_EVEN;
- } else if (fParity.equals("Odd")) //$NON-NLS-1$
- {
- return SerialPort.PARITY_ODD;
- } else if (fParity.equals("Mark")) //$NON-NLS-1$
- {
- return SerialPort.PARITY_MARK;
- } else if (fParity.equals("Space")) //$NON-NLS-1$
- {
- return SerialPort.PARITY_SPACE;
- } else // None
- {
- return SerialPort.PARITY_NONE;
- }
- }
-
- public void setParity(String strParity) {
- fParity = strParity;
- }
-
- public String getFlowControlString() {
- return fFlowControl;
- }
-
- public int getFlowControl() {
- if (fFlowControl.equals("RTS/CTS")) //$NON-NLS-1$
- {
- return SerialPort.FLOWCONTROL_RTSCTS_IN;
- } else if (fFlowControl.equals("Xon/Xoff")) //$NON-NLS-1$
- {
- return SerialPort.FLOWCONTROL_XONXOFF_IN;
- } else // None
- {
- return SerialPort.FLOWCONTROL_NONE;
- }
- }
-
- public void setFlowControl(String strFlow) {
- fFlowControl = strFlow;
- }
-
- public String getStatusString(String strConnected) {
- return " (" + //$NON-NLS-1$
- getSerialPort() + ", " + //$NON-NLS-1$
- getBaudRateString() + ", " + //$NON-NLS-1$
- getDataBitsString() + ", " + //$NON-NLS-1$
- getStopBitsString() + ", " + //$NON-NLS-1$
- getParityString() + ", " + //$NON-NLS-1$
- getFlowControlString() + " - " + //$NON-NLS-1$
- strConnected + ")"; //$NON-NLS-1$
- }
-
- public void load(ISettingsStore store) {
- fSerialPort = store.get("SerialPort", fProperties.getDefaultSerialPort());//$NON-NLS-1$
- fBaudRate = store.get("BaudRate", fProperties.getDefaultBaudRate());//$NON-NLS-1$
- fDataBits = store.get("DataBits", fProperties.getDefaultDataBits());//$NON-NLS-1$
- fStopBits = store.get("StopBits", fProperties.getDefaultStopBits());//$NON-NLS-1$
- fParity = store.get("Parity", fProperties.getDefaultParity());//$NON-NLS-1$
- fFlowControl = store.get("FlowControl", fProperties.getDefaultFlowControl());//$NON-NLS-1$
- fTimeout = store.get("Timeout",fProperties.getDefaultTimeout()); //$NON-NLS-1$
- }
-
- public void save(ISettingsStore store) {
- store.put("SerialPort", fSerialPort); //$NON-NLS-1$
- store.put("BaudRate", fBaudRate); //$NON-NLS-1$
- store.put("DataBits", fDataBits); //$NON-NLS-1$
- store.put("StopBits", fStopBits); //$NON-NLS-1$
- store.put("Parity", fParity); //$NON-NLS-1$
- store.put("FlowControl", fFlowControl); //$NON-NLS-1$
- }
-
- public SerialProperties getProperties() {
- return fProperties;
- }
-
- public int getTimeout() {
- try {
- return Integer.parseInt(fTimeout);
- } catch (NumberFormatException numberFormatException) {
- return 10;
- }
- }
- public String getTimeoutString() {
- return fTimeout;
- }
-
- public void setTimeout(String timeout) {
- fTimeout = timeout;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialSettingsPage.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialSettingsPage.java
deleted file mode 100644
index 7ed4b9a76..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/terminal/internal/serial/SerialSettingsPage.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalSettingsDlg
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.serial;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.terminal.ISettingsPage;
-
-public class SerialSettingsPage implements ISettingsPage {
- private Combo fSerialPortCombo;
- private Combo fBaudRateCombo;
- private Combo fDataBitsCombo;
- private Combo fStopBitsCombo;
- private Combo fParityCombo;
- private Combo fFlowControlCombo;
- private Text fTimeout;
- private final SerialSettings fTerminalSettings;
-
- public SerialSettingsPage(SerialSettings settings) {
- fTerminalSettings=settings;
- }
- public void saveSettings() {
- fTerminalSettings.setSerialPort(getComboValue(fSerialPortCombo));
- fTerminalSettings.setBaudRate(getComboValue(fBaudRateCombo));
- fTerminalSettings.setDataBits(getComboValue(fDataBitsCombo));
- fTerminalSettings.setStopBits(getComboValue(fStopBitsCombo));
- fTerminalSettings.setParity(getComboValue(fParityCombo));
- fTerminalSettings.setFlowControl(getComboValue(fFlowControlCombo));
- fTerminalSettings.setTimeout(fTimeout.getText());
- }
- public void loadSettings() {
- // Load controls
- SerialProperties properties = fTerminalSettings.getProperties();
- List list;
-
- list = properties.getSerialPortTable();
- loadCombo(fSerialPortCombo, list);
-
- list = properties.getBaudRateTable();
- loadCombo(fBaudRateCombo, list);
-
- list = properties.getDataBitsTable();
- loadCombo(fDataBitsCombo, list);
-
- list = properties.getStopBitsTable();
- loadCombo(fStopBitsCombo, list);
-
- list = properties.getParityTable();
- loadCombo(fParityCombo, list);
-
- list = properties.getFlowControlTable();
- loadCombo(fFlowControlCombo, list);
-
- setCombo(fSerialPortCombo,fTerminalSettings.getSerialPort());
- setCombo(fBaudRateCombo,fTerminalSettings.getBaudRateString());
- setCombo(fDataBitsCombo,fTerminalSettings.getDataBitsString());
- setCombo(fStopBitsCombo,fTerminalSettings.getStopBitsString());
- setCombo(fParityCombo,fTerminalSettings.getParityString());
- setCombo(fFlowControlCombo,fTerminalSettings.getFlowControlString());
- fTimeout.setText(fTerminalSettings.getTimeoutString());
- }
- private void setCombo(Combo combo,String value) {
- if(value==null)
- return;
- int nIndex = combo.indexOf(value);
- if (nIndex == -1)
- return;
-
- combo.select(nIndex);
-
- }
- private String getComboValue(Combo combo) {
- int nIndex = combo.getSelectionIndex();
- if (nIndex == -1)
- return ""; //$NON-NLS-1$
-
- return combo.getItem(nIndex);
-
- }
- public boolean validateSettings() {
- return true;
- }
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout(2, false);
-
- composite.setLayout(gridLayout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- fSerialPortCombo=addLabeledCombo(composite, SerialMessages.PORT + ":"); //$NON-NLS-1$
- fBaudRateCombo=addLabeledCombo(composite, SerialMessages.BAUDRATE + ":"); //$NON-NLS-1$
- fDataBitsCombo=addLabeledCombo(composite, SerialMessages.DATABITS + ":"); //$NON-NLS-1$
- fStopBitsCombo=addLabeledCombo(composite, SerialMessages.STOPBITS + ":"); //$NON-NLS-1$
- fParityCombo=addLabeledCombo(composite, SerialMessages.PARITY + ":"); //$NON-NLS-1$
- fFlowControlCombo=addLabeledCombo(composite, SerialMessages.FLOWCONTROL + ":"); //$NON-NLS-1$
-
- new Label(composite, SWT.RIGHT).setText(SerialMessages.TIMEOUT + ":"); //$NON-NLS-1$
- fTimeout = new Text(composite, SWT.BORDER);
- fTimeout.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- loadSettings();
- }
-
- private Combo addLabeledCombo(Composite composite, String label) {
- new Label(composite, SWT.RIGHT).setText(label);
- Combo combo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
- combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return combo;
- }
- private void loadCombo(Combo ctlCombo, List table) {
- for (Iterator iter = table.iterator(); iter.hasNext();) {
- String label = (String) iter.next();
- ctlCombo.add(label);
- }
- }
-
- public String getName() {
- return SerialMessages.CONNTYPE_SERIAL;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/.project b/terminal/org.eclipse.tm.terminal.ssh-feature/.project
deleted file mode 100644
index b9b4f4daa..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.ssh-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/build.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/build.properties
deleted file mode 100644
index ba0e080a9..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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 Scharf (Wind River) - initial API and implementation
-###############################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.ssh-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties
deleted file mode 100644
index 08e38b950..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Terminal Ssh Connector
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=An SSH connector implementation for the Terminal.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2006 Wind River Systems, Inc., IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml b/terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml
deleted file mode 100644
index 15a0150cf..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.tm.terminal.ssh"
- label="%featureName"
- provider-name="%providerName"
- version="0.9.0.qualifier">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal"/>
- <import plugin="com.jcraft.jsch"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.ssh"
- download-size="13"
- install-size="13"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/license.html b/terminal/org.eclipse.tm.terminal.ssh-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 00f130d26..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Terminal Ssh Connector Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=An SSH connector implementation for the Terminal.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 90de8907d..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Terminal Ssh Connector Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 89c807a28..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/eclipse32.png b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 7e92f8717..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=TM Terminal Ssh Connector Source
-providerName=Eclipse.org
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.classpath b/terminal/org.eclipse.tm.terminal.ssh/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.project b/terminal/org.eclipse.tm.terminal.ssh/.project
deleted file mode 100644
index 08d04394c..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.ssh</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>net.sourceforge.metrics.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>net.sourceforge.metrics.nature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.ui.prefs b/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 0b831f584..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Dec 07 03:43:08 CET 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
diff --git a/terminal/org.eclipse.tm.terminal.ssh/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal.ssh/META-INF/MANIFEST.MF
deleted file mode 100644
index 1acb1cc4d..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal.ssh;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal,
- org.eclipse.ui,
- com.jcraft.jsch;bundle-version="[0.1.28,2.0.0)"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/terminal/org.eclipse.tm.terminal.ssh/about.html b/terminal/org.eclipse.tm.terminal.ssh/about.html
deleted file mode 100644
index 460233046..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh/about.ini b/terminal/org.eclipse.tm.terminal.ssh/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh/about.mappings b/terminal/org.eclipse.tm.terminal.ssh/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh/about.properties b/terminal/org.eclipse.tm.terminal.ssh/about.properties
deleted file mode 100644
index b31e986a0..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Terminal Ssh Connector\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2000, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.ssh/build.properties b/terminal/org.eclipse.tm.terminal.ssh/build.properties
deleted file mode 100644
index 25830bfd5..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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 Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html,about.ini,about.mappings,about.properties,\
- eclipse32.png
-src.includes = about.html
diff --git a/terminal/org.eclipse.tm.terminal.ssh/eclipse32.png b/terminal/org.eclipse.tm.terminal.ssh/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.ssh/plugin.properties b/terminal/org.eclipse.tm.terminal.ssh/plugin.properties
deleted file mode 100644
index 71145defc..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-pluginName = TM Terminal Ssh Connector
-providerName = Eclipse.org
diff --git a/terminal/org.eclipse.tm.terminal.ssh/plugin.xml b/terminal/org.eclipse.tm.terminal.ssh/plugin.xml
deleted file mode 100644
index 61115bba1..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/plugin.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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 Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
--->
-<plugin>
- <extension
- point="org.eclipse.tm.terminal.terminalConnector">
- <connector class="org.eclipse.tm.terminal.ssh.SshConnector"/>
- </extension>
-
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/ISshConstants.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/ISshConstants.java
deleted file mode 100644
index 9685df158..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/ISshConstants.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Martin Oberhuber (Wind River) - extracted from various team.cvs plugins
- *******************************************************************************/
-package org.eclipse.tm.terminal.ssh;
-
-
-/**
- * Defines the constants used by the terminal.ssh Plugin
- */
-public interface ISshConstants {
-
- // These are from ISSHContants
- public static final String KEY_SSH2HOME="CVSSSH2PreferencePage.SSH2HOME"; //$NON-NLS-1$
- public static final String KEY_PRIVATEKEY="CVSSSH2PreferencePage.PRIVATEKEY"; //$NON-NLS-1$
-
- // These are from ICVSUIConstants
- public static final String PREF_USE_PROXY = "proxyEnabled"; //$NON-NLS-1$
- public static final String PREF_PROXY_TYPE = "proxyType"; //$NON-NLS-1$
- public static final String PREF_PROXY_HOST = "proxyHost"; //$NON-NLS-1$
- public static final String PREF_PROXY_PORT = "proxyPort"; //$NON-NLS-1$
- public static final String PREF_PROXY_AUTH = "proxyAuth"; //$NON-NLS-1$
-
- // These are from CVSProviderPlugin
- public static final String PROXY_TYPE_HTTP = "HTTP"; //$NON-NLS-1$
- public static final String PROXY_TYPE_SOCKS5 = "SOCKS5"; //$NON-NLS-1$
- public static final String HTTP_DEFAULT_PORT="80"; //$NON-NLS-1$
- public static final String SOCKS5_DEFAULT_PORT="1080"; //$NON-NLS-1$
-
- // These are from cvs.ui.IHelpContextIds
- public static final String CVSUIPREFIX = "org.eclipse.team.cvs.ui."; //$NON-NLS-1$
- public static final String HELP_USER_VALIDATION_DIALOG = CVSUIPREFIX + "user_validation_dialog_context"; //$NON-NLS-1$
- public static final String HELP_KEYBOARD_INTERACTIVE_DIALOG = CVSUIPREFIX + "keyboard_interactive_dialog_context"; //$NON-NLS-1$
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/ISshSettings.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/ISshSettings.java
deleted file mode 100644
index bad3964c9..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/ISshSettings.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.ssh;
-
-import org.eclipse.tm.terminal.ISettingsStore;
-
-public interface ISshSettings {
- String getHost();
- String getUser();
- String getPassword();
- int getTimeout();
- int getPort();
- String getStatusString(String strConnected);
- void load(ISettingsStore store);
- void save(ISettingsStore store);
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/KeyboardInteractiveDialog.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/KeyboardInteractiveDialog.java
deleted file mode 100644
index 30ed2368b..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/KeyboardInteractiveDialog.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- * Martin Oberhuber (Wind River) - copied and adapted from team.cvs.ui
- *******************************************************************************/
-package org.eclipse.tm.terminal.ssh;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-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;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for keyboad-interactive authentication for the ssh2 connection.
- */
-public class KeyboardInteractiveDialog extends TrayDialog {
- // widgets
- private Text[] texts;
-
- protected String domain;
- protected String destination;
- protected String name;
- protected String instruction;
- protected String lang;
- protected String[] prompt;
- protected boolean[] echo;
- private String message;
- private String[] result;
-
- /**
- * Creates a nwe KeyboardInteractiveDialog.
- *
- * @param parentShell the parent shell
- * @param connectionId an id for the connection
- * @param destination the location
- * @param name the name
- * @param instruction the instruction
- * @param prompt the titles for textfields
- * @param echo '*' should be used or not
- */
- public KeyboardInteractiveDialog(Shell parentShell,
- String connectionId,
- String destination,
- String name,
- String instruction,
- String[] prompt,
- boolean[] echo){
- super(parentShell);
- this.domain=connectionId;
- this.destination=destination;
- this.name=name;
- this.instruction=instruction;
- this.prompt=prompt;
- this.echo=echo;
- this.message=NLS.bind(SshMessages.KeyboardInteractiveDialog_message, new String[] { destination+(name!=null && name.length()>0 ? ": "+name : "") }); //NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-2$
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(message);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
- if(texts.length>0){
- texts[0].setFocus();
- }
- }
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite main=new Composite(parent, SWT.NONE);
- GridLayout layout=new GridLayout();
- layout.numColumns=3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(main, ISshConstants.HELP_KEYBOARD_INTERACTIVE_DIALOG);
-
- if (message!=null) {
- Label messageLabel=new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- messageLabel.setLayoutData(data);
- }
- if(domain!=null){
- Label label = new Label(main, SWT.WRAP);
- label.setText(NLS.bind(SshMessages.KeyboardInteractiveDialog_labelConnection, new String[] { domain }));
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- label.setLayoutData(data);
- }
- if (instruction!=null && instruction.length()>0) {
- Label messageLabel=new Label(main, SWT.WRAP);
- messageLabel.setText(instruction);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- messageLabel.setLayoutData(data);
- }
- createPasswordFields(main);
- return main;
- }
- /**
- * Creates the widgets that represent the entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- texts=new Text[prompt.length];
-
- for(int i=0; i<prompt.length; i++){
- new Label(parent, SWT.NONE).setText(prompt[i]);
- texts[i]=new Text(parent, SWT.BORDER);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint=convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- texts[i].setLayoutData(data);
-
- if(!echo[i]){
- texts[i].setEchoChar('*');
- }
- new Label(parent, SWT.NONE);
- }
-
- }
- /**
- * Returns the entered values, or null
- * if the user canceled.
- *
- * @return the entered values
- */
- public String[] getResult() {
- return result;
- }
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- result=new String[prompt.length];
- for(int i=0; i<texts.length; i++){
- result[i]=texts[i].getText();
- }
- super.okPressed();
- }
- /**
- * Notifies that the cancel button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.CANCEL</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void cancelPressed() {
- result=null;
- super.cancelPressed();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshConnection.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshConnection.java
deleted file mode 100644
index 090b69701..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshConnection.java
+++ /dev/null
@@ -1,426 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.ssh;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Collections;
-import java.util.Map;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.terminal.ITerminalControl;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalState;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-
-import com.jcraft.jsch.Channel;
-import com.jcraft.jsch.ChannelShell;
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Proxy;
-import com.jcraft.jsch.ProxyHTTP;
-import com.jcraft.jsch.ProxySOCKS5;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.UserInfo;
-
-class SshConnection extends Thread {
- private static int fgNo;
- private final ITerminalControl fControl;
- private final SshConnector fConn;
- private Channel fChannel;
- protected SshConnection(SshConnector conn,ITerminalControl control) {
- super("SshConnection-"+fgNo++);
- fControl = control;
- fConn = conn;
- fControl.setState(TerminalState.CONNECTING);
- }
-
- //----------------------------------------------------------------------
- // <copied from org.eclipse.team.cvs.ssh2>
- //----------------------------------------------------------------------
- private static String current_ssh_home = null;
- private static String current_pkeys = ""; //$NON-NLS-1$
- static String SSH_HOME_DEFAULT = null;
- static {
- String ssh_dir_name = ".ssh"; //$NON-NLS-1$
-
- // Windows doesn't like files or directories starting with a dot.
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- ssh_dir_name = "ssh"; //$NON-NLS-1$
- }
- SSH_HOME_DEFAULT = System.getProperty("user.home"); //$NON-NLS-1$
- if (SSH_HOME_DEFAULT != null) {
- SSH_HOME_DEFAULT = SSH_HOME_DEFAULT + java.io.File.separator + ssh_dir_name;
- }
- }
-
- private static IPreferenceStore fCvsSsh2PreferenceStore;
- static IPreferenceStore getCvsSsh2PreferenceStore() {
- if (fCvsSsh2PreferenceStore == null) {
- fCvsSsh2PreferenceStore = new ScopedPreferenceStore(new InstanceScope(),"org.eclipse.team.cvs.ssh2"); //$NON-NLS-1$
- }
- return fCvsSsh2PreferenceStore;
- }
-
- private static IPreferenceStore fCvsUIPreferenceStore;
- static IPreferenceStore getCvsUIPreferenceStore() {
- if (fCvsUIPreferenceStore == null) {
- fCvsUIPreferenceStore = new ScopedPreferenceStore(new InstanceScope(),"org.eclipse.team.cvs.ui"); //$NON-NLS-1$
- }
- return fCvsUIPreferenceStore;
- }
-
- // Load ssh prefs from Team/CVS for now.
- // TODO do our own preference page.
- static void loadSshPrefs(JSch jsch)
- {
- IPreferenceStore store = getCvsSsh2PreferenceStore();
- String ssh_home = store.getString(ISshConstants.KEY_SSH2HOME);
- String pkeys = store.getString(ISshConstants.KEY_PRIVATEKEY);
-
- try {
- if (ssh_home.length() == 0)
- ssh_home = SSH_HOME_DEFAULT;
-
- if (current_ssh_home == null || !current_ssh_home.equals(ssh_home)) {
- loadKnownHosts(jsch, ssh_home);
- current_ssh_home = ssh_home;
- current_pkeys = ""; //$NON-NLS-1$
- }
-
- if (!current_pkeys.equals(pkeys)) {
- java.io.File file;
- String[] pkey = pkeys.split(","); //$NON-NLS-1$
- String[] _pkey = current_pkeys.split(","); //$NON-NLS-1$
- current_pkeys = ""; //$NON-NLS-1$
- for (int i = 0; i < pkey.length; i++) {
- file = new java.io.File(pkey[i]);
- if (!file.isAbsolute()) {
- file = new java.io.File(ssh_home, pkey[i]);
- }
- if (file.exists()) {
- boolean notyet = true;
- for (int j = 0; j < _pkey.length; j++) {
- if (pkey[i].equals(_pkey[j])) {
- notyet = false;
- break;
- }
- }
- if (notyet)
- jsch.addIdentity(file.getPath());
- if (current_pkeys.length() == 0) {
- current_pkeys = pkey[i];
- } else {
- current_pkeys += ("," + pkey[i]); //$NON-NLS-1$
- }
- }
- }
- }
- } catch (Exception e) {
- }
-
- }
-
- static void loadKnownHosts(JSch jsch, String ssh_home){
- try {
- java.io.File file;
- file=new java.io.File(ssh_home, "known_hosts"); //$NON-NLS-1$
- jsch.setKnownHosts(file.getPath());
- } catch (Exception e) {
- }
- }
-
- private static final String INFO_PROXY_USER = "org.eclipse.team.cvs.core.proxy.user"; //$NON-NLS-1$
- private static final String INFO_PROXY_PASS = "org.eclipse.team.cvs.core.proxy.pass"; //$NON-NLS-1$
-
- static Proxy loadSshProxyPrefs() {
- //TODO Use official Platform prefs when bug 154100 is fixed
- IPreferenceStore store = getCvsUIPreferenceStore();
- boolean useProxy = store.getBoolean(ISshConstants.PREF_USE_PROXY);
- Proxy proxy = null;
- if (useProxy) {
- String _type = store.getString(ISshConstants.PREF_PROXY_TYPE);
- String _host = store.getString(ISshConstants.PREF_PROXY_HOST);
- String _port = store.getString(ISshConstants.PREF_PROXY_PORT);
-
- boolean useAuth = store.getBoolean(ISshConstants.PREF_PROXY_AUTH);
- String _user = ""; //$NON-NLS-1$
- String _pass = ""; //$NON-NLS-1$
-
- // Retrieve username and password from keyring.
- if(useAuth){
- Map authInfo = null;
- try {
- URL FAKE_URL = new URL("http://org.eclipse.team.cvs.proxy.auth");//$NON-NLS-1$
- authInfo = Platform.getAuthorizationInfo(FAKE_URL, "proxy", ""); //$NON-NLS-1$ //$NON-NLS-2$
- } catch(MalformedURLException e) {
- //should never happen
- }
- if (authInfo==null) authInfo=Collections.EMPTY_MAP;
- _user=(String)authInfo.get(INFO_PROXY_USER);
- _pass=(String)authInfo.get(INFO_PROXY_PASS);
- if (_user==null) _user=""; //$NON-NLS-1$
- if (_pass==null) _pass=""; //$NON-NLS-1$
- }
-
- String proxyhost = _host + ":" + _port; //$NON-NLS-1$
- if (_type.equals(ISshConstants.PROXY_TYPE_HTTP)) {
- proxy = new ProxyHTTP(proxyhost);
- if (useAuth) {
- ((ProxyHTTP) proxy).setUserPasswd(_user, _pass);
- }
- } else if (_type.equals(ISshConstants.PROXY_TYPE_SOCKS5)) {
- proxy = new ProxySOCKS5(proxyhost);
- if (useAuth) {
- ((ProxySOCKS5) proxy).setUserPasswd(_user, _pass);
- }
- }
- }
- return proxy;
- }
-
- //----------------------------------------------------------------------
- // </copied from org.eclipse.team.cvs.ssh2>
- //----------------------------------------------------------------------
-
- public void run() {
- try {
- int nTimeout = fConn.getTelnetSettings().getTimeout() * 1000;
- String host = fConn.getTelnetSettings().getHost();
- String user = fConn.getTelnetSettings().getUser();
- String password = fConn.getTelnetSettings().getPassword();
- int port=fConn.getTelnetSettings().getPort();
-
- loadSshPrefs(fConn.getJsch());
- Proxy proxy = loadSshProxyPrefs();
- Session session=fConn.getJsch().getSession(user, host, port);
- if (proxy != null) {
- session.setProxy(proxy);
- }
- session.setTimeout(0); //never time out once connected
-
- session.setPassword(password);
- ////Giving a connectionId could be the index into a local
- ////Store where passwords are stored
- //String connectionId = host;
- //if (port!=22) {
- // connectionId += ':' + port;
- //}
- //UserInfo ui=new MyUserInfo(connectionId, user, password);
- UserInfo ui=new MyUserInfo(null, user, password);
- session.setUserInfo(ui);
-
-// java.util.Hashtable config=new java.util.Hashtable();
-// config.put("StrictHostKeyChecking", "no");
-// session.setConfig(config);
-
- //session.connect();
- session.connect(nTimeout); // making connection with timeout.
-
- ChannelShell channel=(ChannelShell) session.openChannel("shell"); //$NON-NLS-1$
- channel.connect();
- fConn.setInputStream(channel.getInputStream());
- fConn.setOutputStream(channel.getOutputStream());
- fConn.setChannel(channel);
- fControl.setState(TerminalState.CONNECTED);
- // read data until the connection gets terminated
- readDataForever(fConn.getInputStream());
- // when reading is done, we set the state to closed
- fControl.setState(TerminalState.CLOSED);
- } catch (JSchException e) {
- connectFailed(e.getMessage(),e.getMessage());
- } catch (IOException e) {
- connectFailed(e.getMessage(),e.getMessage());
- } finally {
-
- }
- }
- synchronized void setChannel(Channel channel) {
- fChannel = channel;
- }
- /**
- * disconnect the ssh session
- */
- void disconnect() {
- interrupt();
- synchronized (this) {
- if(fChannel!=null) {
- fChannel.disconnect();
- fChannel=null;
- }
- }
- }
- /**
- * Read the data from the ssh connection and display it in the terminal.
- * @param in
- * @throws IOException
- */
- private void readDataForever(InputStream in) throws IOException {
- // read the data
- byte bytes[]=new byte[32*1024];
- // read until the thread gets interrupted....
- while(!isInterrupted()) {
- int n;
- // We have to poll. There seems no better way to cancel
- // the read from ssh....
- while(in.available()==0) {
- try {
- sleep(1);
- } catch (InterruptedException e) {
- // propagate the interrupt
- interrupt();
- return;
- }
- }
- // read some bytes
- if((n=in.read(bytes))==-1)
- return;
- // we assume we get ASCII UTF8 bytes
- fControl.writeToTerminal(new String(bytes,0,n,"UTF8"));
- }
- }
-
- protected static Display getStandardDisplay() {
- Display display = Display.getCurrent();
- if( display==null ) {
- display = Display.getDefault();
- }
- return display;
- }
-
- private static class MyUserInfo implements UserInfo {
- private final String fConnectionId;
- private final String fUser;
- private String fPassword;
- private String fPassphrase;
- private int fAttemptCount;
-
- public MyUserInfo(String connectionId, String user, String password) {
- fConnectionId = connectionId;
- fUser = user;
- fPassword = password;
- }
- public String getPassword() {
- return fPassword;
- }
- public boolean promptYesNo(final String str) {
- //need to switch to UI thread for prompting
- final boolean[] retval = new boolean[1];
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- retval[0] = MessageDialog.openQuestion(null, SshMessages.WARNING, str);
- }
- });
- return retval[0];
- }
- private String promptSecret(final String message) {
- final String[] retval = new String[1];
- getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- UserValidationDialog uvd = new UserValidationDialog(null, fConnectionId, fUser, message);
- uvd.setUsernameMutable(false);
- if (uvd.open() == Window.OK) {
- retval[0] = uvd.getPassword();
- } else {
- retval[0] = null;
- }
- }
- });
- return retval[0];
- }
- public String getPassphrase() {
- return fPassphrase;
- }
- public boolean promptPassphrase(String message) {
- fPassphrase = promptSecret(message);
- return (fPassphrase!=null);
- }
- public boolean promptPassword(final String message) {
- String _password = promptSecret(message);
- if (_password!=null) {
- fPassword=_password;
- return true;
- }
- return false;
- }
- public void showMessage(final String message) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(null, SshMessages.INFO, message);
- }
- });
- }
- public String[] promptKeyboardInteractive(final String destination,
- final String name, final String instruction,
- final String[] prompt, final boolean[] echo)
- {
- if (prompt.length == 0) {
- // No need to prompt, just return an empty String array
- return new String[0];
- }
- try{
- if (fAttemptCount == 0 && fPassword != null && prompt.length == 1 && prompt[0].trim().equalsIgnoreCase("password:")) { //$NON-NLS-1$
- // Return the provided password the first time but always prompt on subsequent tries
- fAttemptCount++;
- return new String[] { fPassword };
- }
- final String[][] finResult = new String[1][];
- getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- KeyboardInteractiveDialog dialog = new KeyboardInteractiveDialog(null,
- fConnectionId, destination, name, instruction, prompt, echo);
- dialog.open();
- finResult[0]=dialog.getResult();
- }
- });
- String[] result=finResult[0];
- if (result == null)
- return null; // canceled
- if (result.length == 1 && prompt.length == 1 && prompt[0].trim().equalsIgnoreCase("password:")) { //$NON-NLS-1$
- fPassword = result[0];
- }
- fAttemptCount++;
- return result;
- }
- catch(OperationCanceledException e){
- return null;
- }
- }
- /**
- * Callback to indicate that a connection is about to be attempted
- */
- public void aboutToConnect() {
- fAttemptCount = 0;
- }
- /**
- * Callback to indicate that a connection was made
- */
- public void connectionMade() {
- fAttemptCount = 0;
- }
- }
-
- private void connectFailed(String terminalText, String msg) {
- Logger.log(terminalText);
- fControl.displayTextInTerminal(terminalText);
- fControl.setState(TerminalState.CLOSED);
- fControl.setMsg(msg);
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshConnector.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshConnector.java
deleted file mode 100644
index fc09688a4..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshConnector.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.ssh;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.tm.terminal.ISettingsPage;
-import org.eclipse.tm.terminal.ISettingsStore;
-import org.eclipse.tm.terminal.ITerminalConnector;
-import org.eclipse.tm.terminal.ITerminalControl;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalState;
-
-import com.jcraft.jsch.ChannelShell;
-import com.jcraft.jsch.JSch;
-
-public class SshConnector implements ITerminalConnector {
- private OutputStream fOutputStream;
- private InputStream fInputStream;
- private ITerminalControl fControl;
- private JSch fJsch;
- private ChannelShell fChannel;
- private SshConnection fConnection;
- private final SshSettings fSettings;
- public SshConnector() {
- this(new SshSettings());
- try {
- fJsch=new JSch();
- } catch(NoClassDefFoundError e) {
- // ignore
- e.printStackTrace();
- }
- }
- public SshConnector(SshSettings settings) {
- fSettings=settings;
- }
- public String getId() {
- return getClass().getName();
- }
- public boolean isInstalled() {
- return fJsch!=null;
- }
- public void connect(ITerminalControl control) {
- Logger.log("entered."); //$NON-NLS-1$
- fControl=control;
- fConnection = new SshConnection(this,control);
- fConnection.start();
- }
- synchronized public void disconnect() {
- Logger.log("entered."); //$NON-NLS-1$
- fConnection.disconnect();
- if (getInputStream() != null) {
- try {
- getInputStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- if (getOutputStream() != null) {
- try {
- getOutputStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
- setState(TerminalState.CLOSED);
- }
- public boolean isLocalEcho() {
- return false;
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- if(fChannel!=null)
- fChannel.setPtySize(newWidth, newHeight, 8, 8);
-
- }
- public InputStream getInputStream() {
- return fInputStream;
- }
- public OutputStream getOutputStream() {
- return fOutputStream;
- }
- void setInputStream(InputStream inputStream) {
- fInputStream = inputStream;
- }
- void setOutputStream(OutputStream outputStream) {
- fOutputStream = outputStream;
- }
- public void writeToTerminal(String txt) {
- fControl.writeToTerminal(txt);
-
- }
- public void setState(TerminalState state) {
- fControl.setState(state);
-
- }
- public ISshSettings getTelnetSettings() {
- return fSettings;
- }
- public ISettingsPage makeSettingsPage() {
- return new SshSettingsPage(fSettings);
- }
- public String getStatusString(String strConnected) {
- return fSettings.getStatusString(strConnected);
- }
- public void load(ISettingsStore store) {
- fSettings.load(store);
-
- }
- public void save(ISettingsStore store) {
- fSettings.save(store);
- }
- protected JSch getJsch() {
- return fJsch;
- }
- ChannelShell getChannel() {
- return fChannel;
- }
- void setChannel(ChannelShell channel) {
- fChannel = channel;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshMessages.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshMessages.java
deleted file mode 100644
index 02e1f0d43..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshMessages.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.ssh;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SshMessages extends NLS {
- static {
- NLS.initializeMessages(SshMessages.class.getName(), SshMessages.class);
- }
- public static String CONNTYPE;
- public static String USER;
- public static String HOST;
- public static String PORT;
- public static String PASSWORD;
- public static String TIMEOUT;
- public static String WARNING;
- public static String INFO;
-
- //These are from org.eclipse.team.cvs.ui.CVSUIMessages
- public static String UserValidationDialog_required;
- public static String UserValidationDialog_labelUser;
- public static String UserValidationDialog_labelPassword;
- public static String UserValidationDialog_password;
- public static String UserValidationDialog_user;
- public static String UserValidationDialog_5;
- public static String UserValidationDialog_6;
- public static String UserValidationDialog_7;
-
- public static String KeyboardInteractiveDialog_message;
- public static String KeyboardInteractiveDialog_labelConnection;
-
- }
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshMessages.properties b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshMessages.properties
deleted file mode 100644
index eefa7b01e..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshMessages.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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 Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-CONNTYPE = SSH
-HOST = Host
-USER = User
-PORT = Port
-PASSWORD = Password
-TIMEOUT = Timeout
-WARNING = Warning
-INFO = Info
-
-#These are from cvs.ui/messages.properties
-UserValidationDialog_required=Password Required
-UserValidationDialog_labelUser={0}
-UserValidationDialog_labelPassword={1}
-UserValidationDialog_password=&Password:
-UserValidationDialog_user=&User name:
-UserValidationDialog_5=Connection:
-UserValidationDialog_6=&Save password
-UserValidationDialog_7=Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.
-
-KeyboardInteractiveDialog_message=Keyboard Interactive authentication for {0}
-KeyboardInteractiveDialog_labelConnection=Enter values for the following connection: {0}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshSettings.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshSettings.java
deleted file mode 100644
index 30026bcef..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshSettings.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.ssh;
-
-import org.eclipse.tm.terminal.ISettingsStore;
-
-public class SshSettings implements ISshSettings {
- protected String fHost;
- protected String fUser;
- protected String fPassword;
- protected String fPort;
- protected String fTimeout;
- public String getHost() {
- return fHost;
- }
-
- public void setHost(String strHost) {
- fHost = strHost;
- }
-
- public String getStatusString(String strConnected) {
- return " (" + //$NON-NLS-1$
- getHost() + ":" + //$NON-NLS-1$
- getUser() + " - " + //$NON-NLS-1$
- strConnected + ")"; //$NON-NLS-1$
- }
-
- public void load(ISettingsStore store) {
- fHost = store.get("Host");//$NON-NLS-1$
- fUser = store.get("User");//$NON-NLS-1$
- fPort = store.get("Port");//$NON-NLS-1$
- fTimeout = store.get("Timeout");//$NON-NLS-1$
- }
-
-
- public void save(ISettingsStore store) {
- store.put("Host", fHost);//$NON-NLS-1$
- store.put("User", fUser);//$NON-NLS-1$
- store.put("Port", fPort);//$NON-NLS-1$
- store.put("Timeout", fTimeout);//$NON-NLS-1$
- }
-
-
- public int getTimeout() {
- try {
- return Integer.parseInt(fTimeout);
- } catch (NumberFormatException numberFormatException) {
- return 10;
- }
- }
- public String getTimeoutString() {
- return fTimeout;
- }
-
- public void setTimeout(String timeout) {
- fTimeout = timeout;
- }
-
- public String getUser() {
- return fUser;
- }
-
- public void setUser(String user) {
- fUser = user;
- }
- public int getPort() {
- try {
- return Integer.parseInt(fPort);
- } catch (NumberFormatException numberFormatException) {
- return 22;
- }
- }
-
- public String getPortString() {
- return fPort;
- }
-
- public void setPort(String port) {
- fPort = port;
- }
-
- public String getPassword() {
- return fPassword;
- }
-
- public void setPassword(String password) {
- fPassword = password;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshSettingsPage.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshSettingsPage.java
deleted file mode 100644
index f97691e78..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/SshSettingsPage.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.ssh;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.terminal.ISettingsPage;
-
-public class SshSettingsPage implements ISettingsPage {
- private Text fHostText;
- private Text fUser;
- private Text fTimeout;
- private final SshSettings fTerminalSettings;
- private Text fPort;
- private Text fPassword;
-
- public SshSettingsPage(SshSettings settings) {
- fTerminalSettings=settings;
- }
- public void saveSettings() {
- fTerminalSettings.setHost(fHostText.getText());
- fTerminalSettings.setUser(fUser.getText());
- fTerminalSettings.setPassword(fPassword.getText());
- fTerminalSettings.setPort(fPort.getText());
- fTerminalSettings.setTimeout(fTimeout.getText());
- }
-
- public void loadSettings() {
- if(fTerminalSettings!=null) {
- fHostText.setText(get(fTerminalSettings.getHost(),""));//$NON-NLS-1$
- fTimeout.setText(get(fTerminalSettings.getTimeoutString(),"0"));//$NON-NLS-1$
- fUser.setText(get(fTerminalSettings.getUser(),""));//$NON-NLS-1$
- fPort.setText(get(fTerminalSettings.getPortString(),"22"));//$NON-NLS-1$
- fPassword.setText(get(fTerminalSettings.getPassword(),""));//$NON-NLS-1$
- }
- }
- String get(String value, String def) {
- if(value==null || value.length()==0)
- return def;
- return value;
- }
- public boolean validateSettings() {
- return true;
- }
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout(2, false);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
-
- composite.setLayout(gridLayout);
- composite.setLayoutData(gridData);
-
- fHostText = createTextField(composite, SshMessages.HOST);
- fUser = createTextField(composite, SshMessages.USER);
- fPassword = createTextField(composite, SshMessages.PASSWORD,SWT.PASSWORD);
- fTimeout = createTextField(composite, SshMessages.TIMEOUT);
- fPort = createTextField(composite, SshMessages.PORT);
- loadSettings();
- }
- private Text createTextField(Composite composite, String labelTxt, int textOptions) {
- GridData gridData;
- // Add label
- Label ctlLabel = new Label(composite, SWT.RIGHT);
- ctlLabel.setText(labelTxt + ":"); //$NON-NLS-1$
-
- // Add control
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- Text text= new Text(composite, SWT.BORDER | textOptions);
- text.setLayoutData(gridData);
- return text;
- }
- private Text createTextField(Composite composite, String labelTxt) {
- return createTextField(composite, labelTxt, 0);
- }
-
- public String getName() {
- return SshMessages.CONNTYPE;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/UserValidationDialog.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/UserValidationDialog.java
deleted file mode 100644
index 574166916..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/terminal/ssh/UserValidationDialog.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Martin Oberhuber (Wind River) - copied from org.eclipse.team.cvs.ui
- *******************************************************************************/
-package org.eclipse.tm.terminal.ssh;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-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;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for prompting for a username and password
- */
-public class UserValidationDialog extends TrayDialog {
- // widgets
- protected Text usernameField;
- protected Text passwordField;
- protected Button allowCachingButton;
-
- protected String domain;
- protected String defaultUsername;
- protected String password = null;
- protected boolean allowCaching = false;
- protected Image keyLockImage;
-
- // whether or not the username can be changed
- protected boolean isUsernameMutable = true;
- protected String username = null;
- protected String message = null;
-
- /**
- * Creates a new UserValidationDialog.
- *
- * @param parentShell the parent shell
- * @param location the location
- * @param defaultName the default user name
- * @param message a mesage to display to the user
- */
- public UserValidationDialog(Shell parentShell, String location, String defaultName, String message) {
- super(parentShell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.defaultUsername = defaultName;
- this.domain = location;
- this.message = message;
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(SshMessages.UserValidationDialog_required);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, ISshConstants.HELP_USER_VALIDATION_DIALOG);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
- // add some default values
- usernameField.setText(defaultUsername);
-
- if (isUsernameMutable) {
- // give focus to username field
- usernameField.selectAll();
- usernameField.setFocus();
- } else {
- usernameField.setEditable(false);
- passwordField.setFocus();
- }
- }
-
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
-
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite imageComposite = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- imageComposite.setLayout(layout);
- imageComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-
- Composite main = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label imageLabel = new Label(imageComposite, SWT.NONE);
- //keyLockImage = TeamImages.getImageDescriptor(ITeamUIImages.IMG_KEY_LOCK).createImage();
- //imageLabel.setImage(keyLockImage);
- GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- imageLabel.setLayoutData(data);
-
- if (message != null) {
- Label messageLabel = new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- data.widthHint = 300;
- messageLabel.setLayoutData(data);
- }
- if (domain != null) {
- Label d = new Label(main, SWT.WRAP);
- d.setText(SshMessages.UserValidationDialog_5);
- data = new GridData();
- d.setLayoutData(data);
- Label label = new Label(main, SWT.WRAP);
- if (isUsernameMutable) {
- label.setText(NLS.bind(SshMessages.UserValidationDialog_labelUser, new String[] { domain }));
- } else {
- label.setText(NLS.bind(SshMessages.UserValidationDialog_labelPassword, (new Object[]{defaultUsername, domain})));
- }
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 300;
- label.setLayoutData(data);
- }
- createUsernameFields(main);
- createPasswordFields(main);
-
- if(domain != null) {
- allowCachingButton = new Button(main, SWT.CHECK);
- allowCachingButton.setText(SshMessages.UserValidationDialog_6);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- allowCachingButton.setLayoutData(data);
- allowCachingButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- allowCaching = allowCachingButton.getSelection();
- }
- });
- Composite warningComposite = new Composite(main, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- warningComposite.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- warningComposite.setLayoutData(data);
- Label warningLabel = new Label(warningComposite, SWT.NONE);
- warningLabel.setImage(getImage(DLG_IMG_MESSAGE_WARNING));
- warningLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
- Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(SshMessages.UserValidationDialog_7);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- warningText.setLayoutData(data);
- }
-
- Dialog.applyDialogFont(parent);
-
- return main;
- }
-
- /**
- * Creates the three widgets that represent the password entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(SshMessages.UserValidationDialog_password);
-
- passwordField = new Text(parent, SWT.BORDER | SWT.PASSWORD);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- passwordField.setLayoutData(data);
- }
- /**
- * Creates the three widgets that represent the user name entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createUsernameFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(SshMessages.UserValidationDialog_user);
-
- usernameField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
- }
-
- /**
- * Returns the password entered by the user, or null
- * if the user canceled.
- *
- * @return the entered password
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * Returns the username entered by the user, or null
- * if the user canceled.
- *
- * @return the entered username
- */
- public String getUsername() {
- return username;
- }
-
- /**
- * Returns <code>true</code> if the save password checkbox was selected.
- * @return <code>true</code> if the save password checkbox was selected and <code>false</code>
- * otherwise.
- */
- public boolean getAllowCaching() {
- return allowCaching;
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- password = passwordField.getText();
- username = usernameField.getText();
-
- super.okPressed();
- }
- /**
- * Sets whether or not the username field should be mutable.
- * This method must be called before create(), otherwise it
- * will be ignored.
- *
- * @param value whether the username is mutable
- */
- public void setUsernameMutable(boolean value) {
- isUsernameMutable = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#close()
- */
- public boolean close() {
- if(keyLockImage != null) {
- keyLockImage.dispose();
- }
- return super.close();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/.project b/terminal/org.eclipse.tm.terminal.view-feature/.project
deleted file mode 100644
index 57ff3d8e6..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.view-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/build.properties b/terminal/org.eclipse.tm.terminal.view-feature/build.properties
deleted file mode 100644
index 6c1e50644..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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 Scharf (Wind River) - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.view-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/feature.properties b/terminal/org.eclipse.tm.terminal.view-feature/feature.properties
deleted file mode 100644
index a9915fa03..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Terminal View
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=An Eclipse Workbench standalone view for the Terminal widget.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/feature.xml b/terminal/org.eclipse.tm.terminal.view-feature/feature.xml
deleted file mode 100644
index 2df86cfd6..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/feature.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.tm.terminal.view"
- label="%featureName"
- provider-name="%providerName"
- version="0.9.1.qualifier">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/dsdp/tm/updates"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.view"
- download-size="48"
- install-size="48"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/license.html b/terminal/org.eclipse.tm.terminal.view-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 769341016..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=TM Terminal View Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Target Management Project Updates
-
-# "description" property - description of the feature
-description=An Eclipse Workbench standalone view for the Terminal widget.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 23d575cee..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index f7ab5eff0..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Terminal View Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 89c807a28..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/eclipse32.png b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 8b72e48ac..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=TM Terminal View Source
-providerName=Eclipse.org
diff --git a/terminal/org.eclipse.tm.terminal.view/.classpath b/terminal/org.eclipse.tm.terminal.view/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.view/.project b/terminal/org.eclipse.tm.terminal.view/.project
deleted file mode 100644
index 8e57f57b4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.view</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>net.sourceforge.metrics.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>net.sourceforge.metrics.nature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.ui.prefs b/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 9a20fca52..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Jul 31 14:55:17 CEST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
diff --git a/terminal/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF
deleted file mode 100644
index b99446fdd..000000000
--- a/terminal/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal.view;singleton:=true
-Bundle-Version: 0.9.1.qualifier
-Bundle-Activator: org.eclipse.tm.terminal.internal.view.TerminalViewPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-Vendor: %providerName
diff --git a/terminal/org.eclipse.tm.terminal.view/about.html b/terminal/org.eclipse.tm.terminal.view/about.html
deleted file mode 100644
index 460233046..000000000
--- a/terminal/org.eclipse.tm.terminal.view/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/about.ini b/terminal/org.eclipse.tm.terminal.view/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/about.mappings b/terminal/org.eclipse.tm.terminal.view/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.view/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/about.properties b/terminal/org.eclipse.tm.terminal.view/about.properties
deleted file mode 100644
index 71c1cfe2f..000000000
--- a/terminal/org.eclipse.tm.terminal.view/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Terminal View\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.view/build.properties b/terminal/org.eclipse.tm.terminal.view/build.properties
deleted file mode 100644
index 2b7e553fd..000000000
--- a/terminal/org.eclipse.tm.terminal.view/build.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-################################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-################################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- plugin.properties,\
- about.html,about.ini,about.mappings,about.properties,\
- eclipse32.png
-src.includes = about.html
diff --git a/terminal/org.eclipse.tm.terminal.view/eclipse32.png b/terminal/org.eclipse.tm.terminal.view/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/terminal/org.eclipse.tm.terminal.view/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/connect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/connect_co.gif
deleted file mode 100644
index 556b230da..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/connect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/disconnect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/disconnect_co.gif
deleted file mode 100644
index f1d5fb31e..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/disconnect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/newterminal.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/newterminal.gif
deleted file mode 100644
index 80201e0d4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/newterminal.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/properties_tsk.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/properties_tsk.gif
deleted file mode 100644
index 41b5adbd5..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/properties_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/cview16/terminal_view.gif b/terminal/org.eclipse.tm.terminal.view/icons/cview16/terminal_view.gif
deleted file mode 100644
index bbb6a9e15..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/cview16/terminal_view.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/connect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/connect_co.gif
deleted file mode 100644
index ae5e64b9f..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/connect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/disconnect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/disconnect_co.gif
deleted file mode 100644
index 24a628713..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/disconnect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/newterminal.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/newterminal.gif
deleted file mode 100644
index 80201e0d4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/newterminal.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/properties_tsk.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/properties_tsk.gif
deleted file mode 100644
index c307524a7..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/properties_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/connect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/connect_co.gif
deleted file mode 100644
index c0de0d32d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/connect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/disconnect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/disconnect_co.gif
deleted file mode 100644
index ef5bfa8ad..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/disconnect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/newterminal.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/newterminal.gif
deleted file mode 100644
index 80201e0d4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/newterminal.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/properties_tsk.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/properties_tsk.gif
deleted file mode 100644
index 41b5adbd5..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/properties_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/eview16/terminal_view.gif b/terminal/org.eclipse.tm.terminal.view/icons/eview16/terminal_view.gif
deleted file mode 100644
index bbb6a9e15..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/eview16/terminal_view.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/plugin.properties b/terminal/org.eclipse.tm.terminal.view/plugin.properties
deleted file mode 100644
index cab8c36f3..000000000
--- a/terminal/org.eclipse.tm.terminal.view/plugin.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-##########################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-##########################################################################
-pluginName = TM Terminal View
-providerName = Eclipse.org
-terminal.views.category.name = Terminal
-terminal.views.view.name = Terminal
-terminal.views.view.font.description = The font for the terminal console.
-terminal.views.view.font.label = Terminal Console Font
-
-terminal.view.insertion.description=Terminal view insertion
-terminal.view.insertion.name=Terminal view insert
-terminal.view.insertion.category.name=Terminal view commands
diff --git a/terminal/org.eclipse.tm.terminal.view/plugin.xml b/terminal/org.eclipse.tm.terminal.view/plugin.xml
deleted file mode 100644
index 7c8a24cf8..000000000
--- a/terminal/org.eclipse.tm.terminal.view/plugin.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!--
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
--->
-<plugin>
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%terminal.views.category.name"
- id="Terminal">
- </category>
- <view
- allowMultiple="true"
- class="org.eclipse.tm.terminal.internal.view.TerminalView"
- icon="icons/cview16/terminal_view.gif"
- category="Terminal"
- name="%terminal.views.view.name"
- id="org.eclipse.tm.terminal.view.TerminalView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="Terminal">
- <viewShortcut id="org.eclipse.tm.terminal.view.TerminalView"/>
- <view id="org.eclipse.tm.terminal.view.TerminalView"
- relationship="stack">
- </view>
- </perspectiveExtension>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%terminal.views.view.name"
- class="org.eclipse.tm.terminal.internal.view.TerminalPreferencePage"
- id="org.eclipse.tm.terminal.TerminalPreferencePage">
- </page>
- </extension>
-
- <extension
- point="org.eclipse.ui.fontDefinitions">
- <fontDefinition
- label="%terminal.views.view.font.label"
- defaultsTo="org.eclipse.jface.textfont"
- id="terminal.views.view.font.definition">
- <description>
- %terminal.views.view.font.description
- </description>
- </fontDefinition>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.tm.terminal.category1"
- id="org.eclipse.tm.terminal.command1"
- name="%terminal.view.insertion.name"/>
- <category
- description="%terminal.view.insertion.description"
- id="org.eclipse.tm.terminal.category1"
- name="%terminal.view.insertion.category.name"/>
- </extension>
- </plugin>
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/ActionMessages.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/ActionMessages.java
deleted file mode 100644
index 9105892da..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/ActionMessages.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ActionMessages extends NLS {
- static {
- NLS.initializeMessages(ActionMessages.class.getName(), ActionMessages.class);
- }
- public static String NEW_TERMINAL;
- public static String CONNECT;
- public static String DISCONNECT;
- public static String SETTINGS_ELLIPSE;
- public static String COPY;
- public static String CUT;
- public static String PASTE;
- public static String SELECTALL;
- public static String CLEARALL;
- public static String SETTINGS;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/ActionMessages.properties b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/ActionMessages.properties
deleted file mode 100644
index b475440f6..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/ActionMessages.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-NEW_TERMINAL = New Terminal
-CONNECT = Connect
-DISCONNECT = Disconnect
-SETTINGS_ELLIPSE = Settings...
-COPY = Copy
-CUT = Cut
-PASTE = Paste
-SELECTALL = Select All
-CLEARALL = Clear All
-SETTINGS = Settings
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalAction.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalAction.java
deleted file mode 100644
index e3084958b..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-import org.eclipse.tm.terminal.internal.view.TerminalViewPlugin;
-
-abstract public class TerminalAction extends Action {
- protected final ITerminalView fTarget;
- public TerminalAction(ITerminalView target, String strId) {
- super(""); //$NON-NLS-1$
-
- fTarget = target;
-
- setId(strId);
- }
- abstract public void run();
- protected void setupAction(String strText, String strToolTip,
- String strImage, String strEnabledImage, String strDisabledImage,
- boolean bEnabled) {
- TerminalViewPlugin plugin;
- ImageRegistry imageRegistry;
-
- plugin = TerminalViewPlugin.getDefault();
- imageRegistry = plugin.getImageRegistry();
- setupAction(strText, strToolTip, strImage, strEnabledImage,
- strDisabledImage, bEnabled, imageRegistry);
- }
- protected void setupAction(String strText, String strToolTip,
- String strImage, String strEnabledImage, String strDisabledImage,
- boolean bEnabled, ImageRegistry imageRegistry) {
- ImageDescriptor imageDescriptor;
-
- setText(strText);
- setToolTipText(strToolTip);
- setEnabled(bEnabled);
-
- imageDescriptor = imageRegistry.getDescriptor(strEnabledImage);
- if (imageDescriptor != null) {
- setImageDescriptor(imageDescriptor);
- }
-
- imageDescriptor = imageRegistry.getDescriptor(strDisabledImage);
- if (imageDescriptor != null) {
- setDisabledImageDescriptor(imageDescriptor);
- }
-
- imageDescriptor = imageRegistry.getDescriptor(strImage);
- if (imageDescriptor != null) {
- setHoverImageDescriptor(imageDescriptor);
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionClearAll.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionClearAll.java
deleted file mode 100644
index c86a95974..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionClearAll.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-
-public class TerminalActionClearAll extends TerminalAction
-{
- public TerminalActionClearAll(ITerminalView target)
- {
- super(target,
- TerminalActionClearAll.class.getName());
-
- setupAction(ActionMessages.CLEARALL,
- ActionMessages.CLEARALL,
- null,
- null,
- null,
- false);
- }
-
- public void run() {
- fTarget.onEditClearAll();
- }
-}
-
-
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionConnect.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionConnect.java
deleted file mode 100644
index cbd451045..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionConnect.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-import org.eclipse.tm.terminal.internal.view.ImageConsts;
-
-public class TerminalActionConnect extends TerminalAction
-{
- public TerminalActionConnect(ITerminalView target)
- {
- super(target,
- TerminalActionConnect.class.getName());
-
- setupAction(ActionMessages.CONNECT,
- ActionMessages.CONNECT,
- ImageConsts.IMAGE_CLCL_CONNECT,
- ImageConsts.IMAGE_ELCL_CONNECT,
- ImageConsts.IMAGE_DLCL_CONNECT,
- true);
- }
- public void run() {
- fTarget.onTerminalConnect();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionCopy.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionCopy.java
deleted file mode 100644
index 496506724..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionCopy.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.internal.WorkbenchImages;
-
-public class TerminalActionCopy extends TerminalAction
-{
- public TerminalActionCopy(ITerminalView target)
- {
- super(target,
- TerminalActionCopy.class.getName());
-
- ImageRegistry imageRegistry;
-
- imageRegistry = WorkbenchImages.getImageRegistry();
- setupAction(ActionMessages.COPY,
- ActionMessages.COPY,
- ISharedImages.IMG_TOOL_COPY,
- ISharedImages.IMG_TOOL_COPY,
- ISharedImages.IMG_TOOL_COPY_DISABLED,
- true,
- imageRegistry);
- }
- public void run() {
- fTarget.onEditCopy();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionCut.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionCut.java
deleted file mode 100644
index bb10424c0..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionCut.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.internal.WorkbenchImages;
-
-public class TerminalActionCut extends TerminalAction
-{
- public TerminalActionCut(ITerminalView target)
- {
- super(target,
- TerminalActionCut.class.getName());
-
- ImageRegistry imageRegistry;
-
- imageRegistry = WorkbenchImages.getImageRegistry();
- setupAction(ActionMessages.CUT,
- ActionMessages.CUT,
- ISharedImages.IMG_TOOL_CUT,
- ISharedImages.IMG_TOOL_CUT,
- ISharedImages.IMG_TOOL_CUT_DISABLED,
- true,
- imageRegistry);
- }
- public void run() {
- fTarget.onEditCut();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionDisconnect.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionDisconnect.java
deleted file mode 100644
index 1a1417f78..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionDisconnect.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-import org.eclipse.tm.terminal.internal.view.ImageConsts;
-
-public class TerminalActionDisconnect extends TerminalAction
-{
- /**
- *
- */
- public TerminalActionDisconnect(ITerminalView target)
- {
- super(target,
- TerminalActionDisconnect.class.getName());
-
- setupAction(ActionMessages.DISCONNECT,
- ActionMessages.DISCONNECT,
- ImageConsts.IMAGE_CLCL_DISCONNECT,
- ImageConsts.IMAGE_ELCL_DISCONNECT,
- ImageConsts.IMAGE_DLCL_DISCONNECT,
- false);
- }
- public void run() {
- fTarget.onTerminalDisconnect();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionNewTerminal.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionNewTerminal.java
deleted file mode 100644
index 9dd7aad57..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionNewTerminal.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-import org.eclipse.tm.terminal.internal.view.ImageConsts;
-
-/**
- * UNDER CONSTRUCTION
- *
- * @author Fran Litterio <francis.litterio@windriver.com>
- */
-public class TerminalActionNewTerminal extends TerminalAction
-{
- /**
- * UNDER CONSTRUCTION
- */
- public TerminalActionNewTerminal(ITerminalView target)
- {
- super(target, TerminalActionNewTerminal.class.getName());
-
- setupAction(ActionMessages.NEW_TERMINAL,
- ActionMessages.NEW_TERMINAL,
- ImageConsts.IMAGE_NEW_TERMINAL,
- ImageConsts.IMAGE_NEW_TERMINAL,
- ImageConsts.IMAGE_NEW_TERMINAL,
- true);
- }
- public void run() {
- fTarget.onTerminalNewTerminal();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionPaste.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionPaste.java
deleted file mode 100644
index 30ea59746..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionPaste.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.internal.WorkbenchImages;
-
-public class TerminalActionPaste extends TerminalAction
-{
- public TerminalActionPaste(ITerminalView target)
- {
- super(target,
- TerminalActionPaste.class.getName());
-
- ImageRegistry imageRegistry;
-
- imageRegistry = WorkbenchImages.getImageRegistry();
- setupAction(ActionMessages.PASTE,
- ActionMessages.PASTE,
- ISharedImages.IMG_TOOL_PASTE,
- ISharedImages.IMG_TOOL_PASTE_DISABLED,
- ISharedImages.IMG_TOOL_PASTE,
- false,
- imageRegistry);
- }
- public void run() {
- fTarget.onEditPaste();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionSelectAll.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionSelectAll.java
deleted file mode 100644
index e32216b07..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionSelectAll.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-
-public class TerminalActionSelectAll extends TerminalAction
-{
- public TerminalActionSelectAll(ITerminalView target)
- {
- super(target,
- TerminalActionSelectAll.class.getName());
-
- setupAction(ActionMessages.SELECTALL,
- ActionMessages.SELECTALL,
- null,
- null,
- null,
- false);
- }
- public void run() {
- fTarget.onEditSelectAll();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionSettings.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionSettings.java
deleted file mode 100644
index 3471c4faa..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/actions/TerminalActionSettings.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.actions;
-
-import org.eclipse.tm.terminal.internal.view.ITerminalView;
-import org.eclipse.tm.terminal.internal.view.ImageConsts;
-
-public class TerminalActionSettings extends TerminalAction
-{
- public TerminalActionSettings(ITerminalView target)
- {
- super(target,
- TerminalActionSettings.class.getName());
-
- setupAction(ActionMessages.SETTINGS_ELLIPSE,
- ActionMessages.SETTINGS,
- ImageConsts.IMAGE_CLCL_SETTINGS,
- ImageConsts.IMAGE_ELCL_SETTINGS,
- ImageConsts.IMAGE_DLCL_SETTINGS,
- true);
- }
- public void run() {
- fTarget.onTerminalSettings();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ITerminalView.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ITerminalView.java
deleted file mode 100644
index 2244f4536..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ITerminalView.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-public interface ITerminalView {
-
- /**
- * Display a new Terminal view. This method is called when the user clicks the New
- * Terminal button in any Terminal view's toolbar.
- */
- public void onTerminalNewTerminal();
- public void onTerminalConnect();
- public void onTerminalDisconnect();
- public void onTerminalSettings();
- public void onTerminalFontChanged();
- public void onEditCopy();
- public void onEditCut();
- public void onEditPaste();
- public void onEditClearAll();
- public void onEditSelectAll();
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ImageConsts.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ImageConsts.java
deleted file mode 100644
index 9805efa61..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ImageConsts.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalConsts
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-public interface ImageConsts
-{
- public final static String IMAGE_DIR_ROOT = "icons/"; //$NON-NLS-1$
- public final static String IMAGE_DIR_CTOOL = "ctool16/"; // basic colors - size 16x16 //$NON-NLS-1$
- public final static String IMAGE_DIR_LOCALTOOL = "clcl16/"; // basic colors - size 16x16 //$NON-NLS-1$
- public final static String IMAGE_DIR_DLCL = "dlcl16/"; // disabled - size 16x16 //$NON-NLS-1$
- public final static String IMAGE_DIR_ELCL = "elcl16/"; // enabled - size 16x16 //$NON-NLS-1$
- public final static String IMAGE_DIR_OBJECT = "obj16/"; // basic colors - size 16x16 //$NON-NLS-1$
- public final static String IMAGE_DIR_WIZBAN = "wizban/"; // basic colors - size 16x16 //$NON-NLS-1$
- public final static String IMAGE_DIR_OVR = "ovr16/"; // basic colors - size 7x8 //$NON-NLS-1$
- public final static String IMAGE_DIR_VIEW = "cview16/"; // views //$NON-NLS-1$
- public final static String IMAGE_DIR_EVIEW = "eview16/"; // views //$NON-NLS-1$
-
- public static final String IMAGE_NEW_TERMINAL = "TerminalViewNewTerminal"; //$NON-NLS-1$
- public static final String IMAGE_CLCL_CONNECT = "ImageClclConnect"; //$NON-NLS-1$
- public static final String IMAGE_CLCL_DISCONNECT = "ImageClclDisconnect"; //$NON-NLS-1$
- public static final String IMAGE_CLCL_SETTINGS = "ImageClclSettings"; //$NON-NLS-1$
-
- public static final String IMAGE_DLCL_CONNECT = "ImageDlclConnect"; //$NON-NLS-1$
- public static final String IMAGE_DLCL_DISCONNECT = "ImageDlclDisconnect"; //$NON-NLS-1$
- public static final String IMAGE_DLCL_SETTINGS = "ImageDlclSettings"; //$NON-NLS-1$
-
- public static final String IMAGE_ELCL_CONNECT = "ImageElclConnect"; //$NON-NLS-1$
- public static final String IMAGE_ELCL_DISCONNECT = "ImageElclDisconnect"; //$NON-NLS-1$
- public static final String IMAGE_ELCL_SETTINGS = "ImageElclSettings"; //$NON-NLS-1$
- }
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/PageBook.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/PageBook.java
deleted file mode 100644
index 5a85f31ad..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/PageBook.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation (org.eclipse.ui.part.PageBook)
- * Michael Scharf (Wind River) - consider all children for layout and hiding
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Layout;
-
-/**
- * A pagebook is a composite control where only a single control is visible
- * at a time. It is similar to a notebook, but without tabs.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- * </p>
- *
- */
-public class PageBook extends Composite {
- private Point minimumPageSize = new Point(0, 0);
-
- /**
- * Layout for the page container.
- *
- */
- private class PageBookLayout extends Layout {
- public Point computeSize(Composite composite, int wHint, int hHint, boolean force) {
- if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
- return new Point(wHint, hHint);
- int x = minimumPageSize.x;
- int y = minimumPageSize.y;
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- Point size = children[i].computeSize(wHint, hHint, force);
- x = Math.max(x, size.x);
- y = Math.max(y, size.y);
- }
-
- if (wHint != SWT.DEFAULT) {
- x = wHint;
- }
- if (hHint != SWT.DEFAULT) {
- y = hHint;
- }
- return new Point(x, y);
- }
-
- public void layout(Composite composite, boolean force) {
- Rectangle rect = composite.getClientArea();
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- children[i].setBounds(rect);
- }
- }
- }
-
- /**
- * The current control; <code>null</code> if none.
- */
- private Control currentPage = null;
-
- /**
- * Creates a new empty pagebook.
- *
- * @param parent the parent composite
- * @param style the SWT style bits (use {@link SWT#NONE})
- */
- public PageBook(Composite parent, int style, int minWidth, int minHeight) {
- super(parent, style);
- minimumPageSize.x=minWidth;
- minimumPageSize.y=minHeight;
- setLayout(new PageBookLayout());
- }
-
- /**
- * Shows the given page. This method has no effect if the given page is not
- * contained in this pagebook.
- *
- * @param page the page to show
- */
- public void showPage(Control page) {
-
- if (page == currentPage) {
- return;
- }
- if (page==null || page.getParent() != this) {
- return;
- }
-
- currentPage = page;
-
- // show new page
- if (!page.isDisposed()) {
- page.setVisible(true);
- layout(true);
- // if (fRequestFocusOnShowPage)
- // page.setFocus();
- }
-
- // hide old *after* new page has been made visible in order to avoid flashing
- // we have to hide all other pages, because they might be visible
- // by some other means...
- Control[] pages=getChildren();
- for (int i = 0; i < pages.length; i++) {
- if(pages[i]!=page && !pages[i].isDisposed()) {
- pages[i].setVisible(false);
- }
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/SettingStorePrefixDecorator.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/SettingStorePrefixDecorator.java
deleted file mode 100644
index 32db3749a..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/SettingStorePrefixDecorator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-import org.eclipse.tm.terminal.ISettingsStore;
-
-public class SettingStorePrefixDecorator implements ISettingsStore {
- private final String fPrefix;
- private final ISettingsStore fStore;
- SettingStorePrefixDecorator(ISettingsStore store,String prefix) {
- fPrefix=prefix;
- fStore=store;
- }
-
- public String get(String key) {
- return fStore.get(fPrefix+key);
- }
-
- public String get(String key, String defaultValue) {
- return fStore.get(fPrefix+key,defaultValue);
- }
-
- public void put(String key, String value) {
- fStore.put(fPrefix+key,value);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/SettingsStore.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/SettingsStore.java
deleted file mode 100644
index c00c9adef..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/SettingsStore.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.tm.terminal.ISettingsStore;
-import org.eclipse.ui.IMemento;
-
-/**
- * A {@link IDialogSettings} based {@link ISettingsStore}.
- *
- * Setting Store dased on IMemento. IMemento documentations says only alpha numeric
- * values mey be used as keys. Therefore the implementation converts dots (.) into
- * child elements of the memento.
- *
- * @author Michael Scharf
- */
-class SettingsStore implements ISettingsStore {
-
- private static final String KEYS = "_keys_";
- final private Map fMap=new HashMap();
- public SettingsStore(IMemento memento) {
- if(memento==null)
- return;
- // load all keys ever used from the memento
- String keys=memento.getString(KEYS);
- if(keys!=null) {
- String[] keyNames=keys.split(",");
- for (int i = 0; i < keyNames.length; i++) {
- String key=keyNames[i];
- if(!KEYS.equals(key)) {
- // get the dot separated elements
- String[] path=key.split("\\.");
- IMemento m=memento;
- // iterate over all but the last segment and get the children...
- for(int iPath=0; m!=null && iPath+1<path.length; iPath++) {
- m=m.getChild(path[iPath]);
- }
- if(m!=null) {
- // cache the value in the map
- fMap.put(key,m.getString(path[path.length-1]));
- }
- }
- }
- }
- }
-
- public String get(String key) {
- return get(key,null);
- }
- public String get(String key, String defaultValue) {
- String value = (String) fMap.get(key);
- if ((value == null) || (value.equals(""))) //$NON-NLS-1$
- return defaultValue;
-
- return value;
- }
-
- public void put(String key, String value) {
- if(!key.matches("^[\\w.]+$"))
- throw new IllegalArgumentException("Key '"+key+"' is not alpha numeric or '.'!");
- // null values remove the key from the map
- if ((value == null) || (value.equals(""))) //$NON-NLS-1$
- fMap.remove(key);
- else
- fMap.put(key, value);
- }
- /**
- * Save the state into memento.
- * @param memento
- */
- public void saveState(IMemento memento) {
- String[] keyNames=(String[]) fMap.keySet().toArray(new String[fMap.size()]);
- Arrays.sort(keyNames);
- StringBuffer buffer=new StringBuffer();
- for (int i = 0; i < keyNames.length; i++) {
- String key=keyNames[i];
- String[] path=key.split("\\.");
- IMemento m=memento;
- // iterate over all but the last segment and get the children...
- for(int iPath=0; iPath+1<path.length; iPath++) {
- IMemento child=m.getChild(path[iPath]);
- // if the child does not exist, create it
- if(child==null)
- child=m.createChild(path[iPath]);
- m=child;
- }
- // use the last element in path as key of the child memento
- m.putString(path[path.length-1], (String) fMap.get(key));
- // construct the string for the keys
- if(i>0)
- buffer.append(",");
- buffer.append(key);
- }
- // save the keys we have used.
- memento.putString(KEYS, buffer.toString());
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalPreferencePage.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalPreferencePage.java
deleted file mode 100644
index 52e5762e1..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalPreferencePage.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-public class TerminalPreferencePage extends FieldEditorPreferencePage implements
- IWorkbenchPreferencePage {
- public static final String PREF_LIMITOUTPUT = "TerminalPrefLimitOutput"; //$NON-NLS-1$
- public static final String PREF_BUFFERLINES = "TerminalPrefBufferLines"; //$NON-NLS-1$
- public static final String PREF_TIMEOUT_SERIAL = "TerminalPrefTimeoutSerial"; //$NON-NLS-1$
- public static final String PREF_TIMEOUT_NETWORK = "TerminalPrefTimeoutNetwork"; //$NON-NLS-1$
- public static final boolean DEFAULT_LIMITOUTPUT = true;
- public static final int DEFAULT_BUFFERLINES = 1000;
- public static final int DEFAULT_TIMEOUT_SERIAL = 5;
- public static final int DEFAULT_TIMEOUT_NETWORK = 5;
-
-
- protected TerminalBooleanFieldEditor fEditorLimitOutput;
-
- protected IntegerFieldEditor fEditorBufferSize;
-
- protected IntegerFieldEditor fEditorSerialTimeout;
-
- protected IntegerFieldEditor fEditorNetworkTimeout;
- public TerminalPreferencePage() {
- super(GRID);
- }
- public void onLimitOutputSelected() {
- Button ctlButton;
- Text ctlText;
- Label ctlLabel;
- boolean bEnabled;
-
- ctlButton = fEditorLimitOutput.getChangeControl(getFieldEditorParent());
- ctlText = fEditorBufferSize.getTextControl(getFieldEditorParent());
- ctlLabel = fEditorBufferSize.getLabelControl(getFieldEditorParent());
- bEnabled = ctlButton.getSelection();
-
- ctlText.setEnabled(bEnabled);
- ctlLabel.setEnabled(bEnabled);
- }
- protected void createFieldEditors() {
- setupPage();
- }
- protected void initialize() {
- super.initialize();
-
- onLimitOutputSelected();
- }
- protected void performDefaults() {
- super.performDefaults();
-
- onLimitOutputSelected();
- }
- public void init(IWorkbench workbench) {
- // do nothing
- }
- protected void setupPage() {
- setupData();
- setupEditors();
- setupListeners();
- }
- protected void setupData() {
- TerminalViewPlugin plugin;
- IPreferenceStore preferenceStore;
-
- plugin = TerminalViewPlugin.getDefault();
- preferenceStore = plugin.getPreferenceStore();
- setPreferenceStore(preferenceStore);
- }
- protected void setupEditors() {
- fEditorLimitOutput = new TerminalBooleanFieldEditor(
- PREF_LIMITOUTPUT, ViewMessages.LIMITOUTPUT,
- getFieldEditorParent());
- fEditorBufferSize = new IntegerFieldEditor(PREF_BUFFERLINES,
- ViewMessages.BUFFERLINES, getFieldEditorParent());
- fEditorSerialTimeout = new IntegerFieldEditor(
- PREF_TIMEOUT_SERIAL, ViewMessages.SERIALTIMEOUT,
- getFieldEditorParent());
- fEditorNetworkTimeout = new IntegerFieldEditor(
- PREF_TIMEOUT_NETWORK, ViewMessages.NETWORKTIMEOUT,
- getFieldEditorParent());
-
- fEditorBufferSize.setValidRange(0, Integer.MAX_VALUE);
- fEditorSerialTimeout.setValidRange(0, Integer.MAX_VALUE);
- fEditorNetworkTimeout.setValidRange(0, Integer.MAX_VALUE);
-
- addField(fEditorLimitOutput);
- addField(fEditorBufferSize);
- addField(fEditorSerialTimeout);
- addField(fEditorNetworkTimeout);
- }
- protected void setupListeners() {
- TerminalSelectionHandler selectionHandler;
- Button ctlButton;
-
- selectionHandler = new TerminalSelectionHandler();
- ctlButton = fEditorLimitOutput.getChangeControl(getFieldEditorParent());
- ctlButton.addSelectionListener(selectionHandler);
- }
- public class TerminalBooleanFieldEditor extends BooleanFieldEditor {
- public TerminalBooleanFieldEditor(String strName, String strLabel,
- Composite ctlParent) {
- super(strName, strLabel, ctlParent);
- }
- public Button getChangeControl(Composite parent) {
- return super.getChangeControl(parent);
- }
- }
- protected class TerminalSelectionHandler extends SelectionAdapter {
- protected TerminalSelectionHandler() {
- super();
- }
- public void widgetSelected(SelectionEvent event) {
- Object source;
- Button ctlButton;
-
- source = event.getSource();
- ctlButton = fEditorLimitOutput
- .getChangeControl(getFieldEditorParent());
-
- if (source == ctlButton) {
- onLimitOutputSelected();
- }
- }
-
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalSettingsDlg.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalSettingsDlg.java
deleted file mode 100644
index a79f5c03b..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalSettingsDlg.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.terminal.ISettingsPage;
-import org.eclipse.tm.terminal.ITerminalConnector;
-
-class TerminalSettingsDlg extends Dialog {
- private Combo fCtlConnTypeCombo;
- private final ITerminalConnector[] fConnectors;
- private final ISettingsPage[] fPages;
- private int fSelectedConnector;
- private PageBook fPageBook;
- private IDialogSettings fDialogSettings;
-
- public TerminalSettingsDlg(Shell shell, ITerminalConnector[] connectors, ITerminalConnector connector) {
- super(shell);
- fConnectors=connectors;
- fPages=new ISettingsPage[fConnectors.length];
- for (int i = 0; i < fConnectors.length; i++) {
- fPages[i]=fConnectors[i].makeSettingsPage();
- if(fConnectors[i]==connector)
- fSelectedConnector=i;
- }
- }
- protected void okPressed() {
- if (!validateSettings())
- return;
- if(fSelectedConnector>=0) {
- fPages[fSelectedConnector].saveSettings();
- }
- super.okPressed();
- }
- protected void cancelPressed() {
- fSelectedConnector=-1;
- super.cancelPressed();
- }
- public int open() {
- setShellStyle(getShellStyle() | SWT.RESIZE);
- return super.open();
- }
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
-
- newShell.setText(ViewMessages.TERMINALSETTINGS);
- }
- protected Control createDialogArea(Composite parent) {
- Composite ctlComposite = (Composite) super.createDialogArea(parent);
- setupPanel(ctlComposite);
- setupListeners();
- initFields();
-
- return ctlComposite;
- }
- private void initFields() {
- // Load controls
- for (int i = 0; i < fPages.length; i++) {
- String name=fPages[i].getName();
- fCtlConnTypeCombo.add(name);
- if(fSelectedConnector==i) {
- fCtlConnTypeCombo.select(i);
- selectPage(i);
- }
- }
- }
- private boolean validateSettings() {
- if(fSelectedConnector<0)
- return true;
- return fPages[fSelectedConnector].validateSettings();
- }
- private void setupPanel(Composite wndParent) {
- setupConnTypePanel(wndParent);
- setupSettingsGroup(wndParent);
- }
- private void setupConnTypePanel(Composite wndParent) {
- Group wndGroup;
- GridLayout gridLayout;
- GridData gridData;
-
- wndGroup = new Group(wndParent, SWT.NONE);
- gridLayout = new GridLayout(1, true);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
-
- wndGroup.setLayout(gridLayout);
- wndGroup.setLayoutData(gridData);
- wndGroup.setText(ViewMessages.CONNECTIONTYPE + ":"); //$NON-NLS-1$
-
- fCtlConnTypeCombo = new Combo(wndGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.widthHint = 200;
- fCtlConnTypeCombo.setLayoutData(gridData);
- }
- private void setupSettingsGroup(Composite parent) {
- Group group = new Group(parent, SWT.NONE);
- group.setText(ViewMessages.SETTINGS + ":"); //$NON-NLS-1$
- group.setLayout(new GridLayout());
- group.setLayoutData(new GridData(GridData.FILL_BOTH));
- fPageBook=new PageBook(group,SWT.NONE,230,0);
- fPageBook.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-
- for (int i = 0; i < fPages.length; i++) {
- fPages[i].createControl(fPageBook);
- }
- }
- private void setupListeners() {
- fCtlConnTypeCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- selectPage(fCtlConnTypeCombo.getSelectionIndex());
- }
- });
- }
- public ITerminalConnector getConnector() {
- if(fSelectedConnector>=0)
- return fConnectors[fSelectedConnector];
- return null;
- }
- private void selectPage(int index) {
- fSelectedConnector=index;
- Control[] pages=fPageBook.getChildren();
- fPageBook.showPage(pages[fSelectedConnector]);
- }
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings ds=TerminalViewPlugin.getDefault().getDialogSettings();
- fDialogSettings = ds.getSection(getClass().getName());
- if (fDialogSettings == null) {
- fDialogSettings = ds.addNewSection(getClass().getName());
- }
- return fDialogSettings;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalView.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalView.java
deleted file mode 100644
index 4434dd770..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalView.java
+++ /dev/null
@@ -1,645 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.tm.terminal.ISettingsStore;
-import org.eclipse.tm.terminal.ITerminalConnector;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalConnectorExtension;
-import org.eclipse.tm.terminal.TerminalState;
-import org.eclipse.tm.terminal.control.ITerminalListener;
-import org.eclipse.tm.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.terminal.control.TerminalViewControlFactory;
-import org.eclipse.tm.terminal.internal.actions.TerminalAction;
-import org.eclipse.tm.terminal.internal.actions.TerminalActionClearAll;
-import org.eclipse.tm.terminal.internal.actions.TerminalActionConnect;
-import org.eclipse.tm.terminal.internal.actions.TerminalActionCopy;
-import org.eclipse.tm.terminal.internal.actions.TerminalActionCut;
-import org.eclipse.tm.terminal.internal.actions.TerminalActionDisconnect;
-import org.eclipse.tm.terminal.internal.actions.TerminalActionNewTerminal;
-import org.eclipse.tm.terminal.internal.actions.TerminalActionPaste;
-import org.eclipse.tm.terminal.internal.actions.TerminalActionSelectAll;
-import org.eclipse.tm.terminal.internal.actions.TerminalActionSettings;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.RetargetAction;
-import org.eclipse.ui.contexts.IContextActivation;
-import org.eclipse.ui.contexts.IContextService;
-import org.eclipse.ui.internal.WorkbenchWindow;
-import org.eclipse.ui.part.ViewPart;
-
-public class TerminalView extends ViewPart implements ITerminalView, ITerminalListener {
- public static final String FONT_DEFINITION = "terminal.views.view.font.definition"; //$NON-NLS-1$
-
- protected ITerminalViewControl fCtlTerminal;
-
- protected TerminalAction fActionTerminalNewTerminal;
-
- protected TerminalAction fActionTerminalConnect;
-
- protected TerminalAction fActionTerminalDisconnect;
-
- protected TerminalAction fActionTerminalSettings;
-
- protected TerminalAction fActionEditCopy;
-
- protected TerminalAction fActionEditCut;
-
- protected TerminalAction fActionEditPaste;
-
- protected TerminalAction fActionEditClearAll;
-
- protected TerminalAction fActionEditSelectAll;
-
- protected TerminalMenuHandlerEdit fMenuHandlerEdit;
-
- protected TerminalPropertyChangeHandler fPropertyChangeHandler;
-
- protected boolean fMenuAboutToShow;
-
- private SettingsStore fStore;
-
- public TerminalView() {
- Logger
- .log("==============================================================="); //$NON-NLS-1$
- }
-
- private void XXXXX() {
- Preferences preferences = TerminalViewPlugin.getDefault().getPluginPreferences();
- boolean bLimitOutput = preferences.getBoolean(TerminalPreferencePage.PREF_LIMITOUTPUT);
- int bufferLineLimit = preferences.getInt(TerminalPreferencePage.PREF_BUFFERLINES);
-
- }
- // TerminalTarget interface
- public void setState(final TerminalState state) {
- Runnable runnable=new Runnable() {
- public void run() {
- updateStatus();
- onTerminalStatus();
- }
- };
- if(Thread.currentThread()==Display.getDefault().getThread())
- runnable.run();
- else
- Display.getDefault().syncExec(runnable);
- }
-
-
- /**
- * Display a new Terminal view. This method is called when the user clicks the New
- * Terminal button in any Terminal view's toolbar.
- */
- public void onTerminalNewTerminal() {
- Logger.log("creating new Terminal instance."); //$NON-NLS-1$
-
- try {
- // The second argument to showView() is a unique String identifying the
- // secondary view instance. If it ever matches a previously used secondary
- // view identifier, then this call will not create a new Terminal view,
- // which is undesireable. Therefore, we append the current time in
- // milliseconds to the secondary view identifier to ensure it is always
- // unique. This code runs only when the user clicks the New Terminal
- // button, so there is no risk that this code will run twice in a single
- // millisecond.
-
- getSite().getPage().showView(
- "org.eclipse.tm.terminal.view.TerminalView",//$NON-NLS-1$
- "SecondaryTerminal" + System.currentTimeMillis(), //$NON-NLS-1$
- IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException ex) {
- Logger.logException(ex);
- }
- }
-
- public void onTerminalConnect() {
- if (isConnected())
- return;
- if(fCtlTerminal.getTerminalConnection()==null)
- setConnector(showSettingsDialog());
- fCtlTerminal.connectTerminal();
- }
-
- public void updateStatus() {
- updateTerminalConnect();
- updateTerminalDisconnect();
- updateTerminalSettings();
- }
-
- public void updateTerminalConnect() {
- boolean bEnabled = ((!isConnecting()) && (!fCtlTerminal.isConnected()));
-
- fActionTerminalConnect.setEnabled(bEnabled);
- }
-
- private boolean isConnecting() {
- return fCtlTerminal.getState()==TerminalState.CONNECTING;
- }
- private boolean isConnected() {
- return fCtlTerminal.getState()==TerminalState.CONNECTED;
- }
- public void onTerminalDisconnect() {
- fCtlTerminal.disconnectTerminal();
- }
-
- public void updateTerminalDisconnect() {
- boolean bEnabled = ((isConnecting()) || (fCtlTerminal.isConnected()));
- fActionTerminalDisconnect.setEnabled(bEnabled);
- }
-
- public void onTerminalSettings() {
- ITerminalConnector c=showSettingsDialog();
- if(c!=null) {
- setConnector(c);
-
- onTerminalConnect();
- }
- }
-
- private ITerminalConnector showSettingsDialog() {
- // When the settings dialog is opened, load the Terminal settings from the
- // persistent settings.
-
- TerminalSettingsDlg dlgTerminalSettings = new TerminalSettingsDlg(getViewSite().getShell(),fCtlTerminal.getConnectors(),fCtlTerminal.getTerminalConnection());
-
- Logger.log("opening Settings dialog."); //$NON-NLS-1$
-
- if (dlgTerminalSettings.open() == Window.CANCEL) {
- Logger.log("Settings dialog cancelled."); //$NON-NLS-1$
- return null;
- }
-
- Logger.log("Settings dialog OK'ed."); //$NON-NLS-1$
-
- // When the settings dialog is closed, we persist the Terminal settings.
-
- saveSettings(dlgTerminalSettings.getConnector());
- return dlgTerminalSettings.getConnector();
- }
-
- private void setConnector(ITerminalConnector connector) {
- fCtlTerminal.setConnector(connector);
- }
-
- public void updateTerminalSettings() {
- boolean bEnabled;
-
- bEnabled = ((!isConnecting()) && (!fCtlTerminal
- .isConnected()));
-
- fActionTerminalSettings.setEnabled(bEnabled);
- }
-
- public void setTerminalTitle(String strTitle) {
- if (fCtlTerminal.isDisposed())
- return;
-
- if (strTitle != null) {
- // When parameter 'data' is not null, it is a String containing text to
- // display in the view's content description line. This is used by class
- // TerminalText when it processes an ANSI OSC escape sequence that commands
- // the terminal to display text in its title bar.
- } else {
- // When parameter 'data' is null, we construct a descriptive string to
- // display in the content description line.
- String strConnected = getStateDisplayName(fCtlTerminal.getState());
- String status=""; //$NON-NLS-1$
- status=fCtlTerminal.getStatusString(strConnected);
- strTitle = ViewMessages.PROP_TITLE + status;
- }
-
- setContentDescription(strTitle);
- getViewSite().getActionBars().getStatusLineManager().setMessage(
- strTitle);
- }
- public void onTerminalStatus() {
- setTerminalTitle(null);
- }
-
- private String getStateDisplayName(TerminalState state) {
- if(state==TerminalState.CONNECTED) {
- return ViewMessages.STATE_CONNECTED;
- } else if(state==TerminalState.CONNECTING) {
- return ViewMessages.STATE_CONNECTING;
- } else if(state==TerminalState.OPENED) {
- return ViewMessages.STATE_OPENED;
- } else if(state==TerminalState.CLOSED) {
- return ViewMessages.STATE_CLOSED;
- } else {
- throw new IllegalStateException(state.toString());
- }
- }
-
- public void onTerminalFontChanged() {
- fCtlTerminal.getCtlText().setFont(JFaceResources.getFont(FONT_DEFINITION));
-
- // Tell the TerminalControl singleton that the font has changed.
-
- fCtlTerminal.onFontChanged();
- }
-
- public void onEditCopy() {
- String selection=fCtlTerminal.getSelection();
-
- if (!selection.equals("")) {//$NON-NLS-1$
- fCtlTerminal.copy();
- } else {
- fCtlTerminal.sendKey('\u0003');
- }
- }
-
- public void updateEditCopy() {
- boolean bEnabled=true;
-
- if (fMenuAboutToShow) {
- bEnabled = fCtlTerminal.getSelection().length()>0;
- }
-
- fActionEditCopy.setEnabled(bEnabled);
- }
-
- public void onEditCut() {
- fCtlTerminal.sendKey('\u0018');
- }
-
- public void updateEditCut() {
- boolean bEnabled;
-
- bEnabled = !fMenuAboutToShow;
- fActionEditCut.setEnabled(bEnabled);
- }
-
- public void onEditPaste() {
- fCtlTerminal.paste();
- }
-
- public void updateEditPaste() {
- String strText = (String) fCtlTerminal.getClipboard().getContents(TextTransfer.getInstance());
-
- boolean bEnabled = ((strText != null) && (!strText.equals("")) && (isConnected()));//$NON-NLS-1$
-
- fActionEditPaste.setEnabled(bEnabled);
- }
-
- public void onEditClearAll() {
- fCtlTerminal.clearTerminal();
- }
-
- public void updateEditClearAll() {
- fActionEditClearAll.setEnabled(!fCtlTerminal.isEmpty());
- }
-
- public void onEditSelectAll() {
- fCtlTerminal.selectAll();
- }
-
- public void updateEditSelectAll() {
- fActionEditSelectAll.setEnabled(!fCtlTerminal.isEmpty());
- }
-
- // ViewPart interface
-
- public void createPartControl(Composite wndParent) {
- // Bind plugin.xml key bindings to this plugin. Overrides global Control-W key
- // sequence.
-
- setPartName(ViewMessages.PROP_TITLE);
-
- setupControls(wndParent);
- setupActions();
- setupMenus();
- setupLocalToolBars();
- setupContextMenus();
- setupListeners(wndParent);
-
- onTerminalStatus();
- }
-
- public void dispose() {
- Logger.log("entered."); //$NON-NLS-1$
-
- setPartName("Terminal"); //$NON-NLS-1$
-
- TerminalViewPlugin plugin;
- IWorkbench workbench;
- WorkbenchWindow workbenchWindow;
- MenuManager menuMgr;
- Menu menu;
-
- JFaceResources.getFontRegistry().removeListener(fPropertyChangeHandler);
- plugin = TerminalViewPlugin.getDefault();
- workbench = plugin.getWorkbench();
- workbenchWindow = (WorkbenchWindow) workbench
- .getActiveWorkbenchWindow();
- menuMgr = workbenchWindow.getMenuManager();
- menuMgr = (MenuManager) menuMgr
- .findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
- menu = menuMgr.getMenu();
-
- menuMgr.removeMenuListener(fMenuHandlerEdit);
-
- if (menu != null)
- menu.removeMenuListener(fMenuHandlerEdit);
-
- fCtlTerminal.disposeTerminal();
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- fCtlTerminal.setFocus();
- }
-
- /**
- * This method creates the top-level control for the Terminal view.
- */
- protected void setupControls(Composite wndParent) {
- ITerminalConnector[] connectors=TerminalConnectorExtension.getTerminalConnectors();
- fCtlTerminal = TerminalViewControlFactory.makeControl(this, wndParent, connectors);
- String connectionType=fStore.get("ConnectionType"); //$NON-NLS-1$
- for (int i = 0; i < connectors.length; i++) {
- connectors[i].load(getStore(connectors[i]));
- if(connectors[i].getId().equals(connectionType))
- fCtlTerminal.setConnector(connectors[i]);
- }
- }
- private void saveSettings(ITerminalConnector connector) {
- ITerminalConnector[] connectors=fCtlTerminal.getConnectors();
- for (int i = 0; i < connectors.length; i++) {
- connectors[i].save(getStore(connectors[i]));
- }
- if(connector!=null) {
- fStore.put("ConnectionType",connector.getId()); //$NON-NLS-1$
- }
- }
-
- public void init(IViewSite site, IMemento memento) throws PartInitException {
- super.init(site, memento);
- fStore=new SettingsStore(memento);
- }
-
- public void saveState(IMemento memento) {
- super.saveState(memento);
- fStore.saveState(memento);
- }
- private ISettingsStore getStore(ITerminalConnector connector) {
- return new SettingStorePrefixDecorator(fStore,connector.getClass().getName()+"."); //$NON-NLS-1$
- }
-
- protected void setupActions() {
- fActionTerminalNewTerminal = new TerminalActionNewTerminal(this);
- fActionTerminalConnect = new TerminalActionConnect(this);
- fActionTerminalDisconnect = new TerminalActionDisconnect(this);
- fActionTerminalSettings = new TerminalActionSettings(this);
- fActionEditCopy = new TerminalActionCopy(this);
- fActionEditCut = new TerminalActionCut(this);
- fActionEditPaste = new TerminalActionPaste(this);
- fActionEditClearAll = new TerminalActionClearAll(this);
- fActionEditSelectAll = new TerminalActionSelectAll(this);
-
- IActionBars actionBars = getViewSite().getActionBars();
- actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), fActionEditCopy);
-
- actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), fActionEditCut);
-
- actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), fActionEditPaste);
-
- actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), fActionEditSelectAll);
- }
-
- protected void setupMenus() {
- TerminalViewPlugin plugin;
- IWorkbench workbench;
- WorkbenchWindow workbenchWindow;
- MenuManager menuMgr;
- Menu menu;
-
- fMenuHandlerEdit = new TerminalMenuHandlerEdit();
- plugin = TerminalViewPlugin.getDefault();
- workbench = plugin.getWorkbench();
- workbenchWindow = (WorkbenchWindow) workbench
- .getActiveWorkbenchWindow();
- menuMgr = workbenchWindow.getMenuManager();
- menuMgr = (MenuManager) menuMgr
- .findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
- menu = menuMgr.getMenu();
-
- menuMgr.addMenuListener(fMenuHandlerEdit);
- menu.addMenuListener(fMenuHandlerEdit);
- }
-
- protected void setupLocalToolBars() {
- IToolBarManager toolBarMgr = getViewSite().getActionBars().getToolBarManager();
-
- toolBarMgr.add(fActionTerminalNewTerminal);
- toolBarMgr.add(fActionTerminalConnect);
- toolBarMgr.add(fActionTerminalDisconnect);
- toolBarMgr.add(fActionTerminalSettings);
- }
-
- protected void setupContextMenus() {
- StyledText ctlText;
- MenuManager menuMgr;
- Menu menu;
- TerminalContextMenuHandler contextMenuHandler;
-
- ctlText = fCtlTerminal.getCtlText();
- menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menu = menuMgr.createContextMenu(ctlText);
- contextMenuHandler = new TerminalContextMenuHandler();
-
- ctlText.setMenu(menu);
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(contextMenuHandler);
- menu.addMenuListener(contextMenuHandler);
- }
-
- protected void loadContextMenus(IMenuManager menuMgr) {
- menuMgr.add(fActionEditCopy);
- menuMgr.add(fActionEditPaste);
- menuMgr.add(new Separator());
- menuMgr.add(fActionEditClearAll);
- menuMgr.add(fActionEditSelectAll);
-
- // Other plug-ins can contribute there actions here
- menuMgr.add(new Separator("Additions")); //$NON-NLS-1$
- }
-
- protected void setupListeners(Composite wndParent) {
- fPropertyChangeHandler = new TerminalPropertyChangeHandler();
- JFaceResources.getFontRegistry().addListener(fPropertyChangeHandler);
- }
-
- // Inner classes
-
- protected class TerminalMenuHandlerEdit implements MenuListener, IMenuListener {
- protected String fActionDefinitionIdCopy;
-
- protected String fActionDefinitionIdPaste;
-
- protected String fActionDefinitionIdSelectAll;
-
- protected int fAcceleratorCopy;
-
- protected int fAcceleratorPaste;
-
- protected int fAcceleratorSelectAll;
-
- protected TerminalMenuHandlerEdit() {
- super();
-
- fActionDefinitionIdCopy = ""; //$NON-NLS-1$
- fActionDefinitionIdPaste = ""; //$NON-NLS-1$
- fActionDefinitionIdSelectAll = ""; //$NON-NLS-1$
-
- fAcceleratorCopy = 0;
- fAcceleratorPaste = 0;
- fAcceleratorSelectAll = 0;
- }
- public void menuAboutToShow(IMenuManager menuMgr) {
-
- fMenuAboutToShow = true;
- updateEditCopy();
- updateEditCut();
- updateEditPaste();
- updateEditSelectAll();
-
- ActionContributionItem item = (ActionContributionItem) menuMgr.find(ActionFactory.COPY.getId());
- RetargetAction action = (RetargetAction) item.getAction();
- fActionDefinitionIdCopy = action.getActionDefinitionId();
- fAcceleratorCopy = action.getAccelerator();
- action.setActionDefinitionId(null);
- action.enableAccelerator(false);
- item.update();
-
- item = (ActionContributionItem) menuMgr.find(ActionFactory.PASTE.getId());
- action = (RetargetAction) item.getAction();
- fActionDefinitionIdPaste = action.getActionDefinitionId();
- fAcceleratorPaste = action.getAccelerator();
- action.setActionDefinitionId(null);
- action.enableAccelerator(false);
- item.update();
-
- item = (ActionContributionItem) menuMgr.find(ActionFactory.SELECT_ALL.getId());
- action = (RetargetAction) item.getAction();
- fActionDefinitionIdSelectAll = action.getActionDefinitionId();
- fAcceleratorSelectAll = action.getAccelerator();
- action.setActionDefinitionId(null);
- action.enableAccelerator(false);
- item.update();
- }
- public void menuShown(MenuEvent event) {
- // do nothing
- }
- public void menuHidden(MenuEvent event) {
- TerminalViewPlugin plugin;
- IWorkbench workbench;
- WorkbenchWindow workbenchWindow;
- MenuManager menuMgr;
- ActionContributionItem item;
- RetargetAction action;
-
- fMenuAboutToShow = false;
- updateEditCopy();
- updateEditCut();
-
- plugin = TerminalViewPlugin.getDefault();
- workbench = plugin.getWorkbench();
- workbenchWindow = (WorkbenchWindow) workbench
- .getActiveWorkbenchWindow();
- menuMgr = workbenchWindow.getMenuManager();
- menuMgr = (MenuManager) menuMgr
- .findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
-
- item = (ActionContributionItem) menuMgr.find(ActionFactory.COPY
- .getId());
- action = (RetargetAction) item.getAction();
- action.setActionDefinitionId(fActionDefinitionIdCopy);
- action.setAccelerator(fAcceleratorCopy);
- action.enableAccelerator(true);
- item.update();
-
- item = (ActionContributionItem) menuMgr.find(ActionFactory.PASTE
- .getId());
- action = (RetargetAction) item.getAction();
- action.setActionDefinitionId(fActionDefinitionIdPaste);
- action.setAccelerator(fAcceleratorPaste);
- action.enableAccelerator(true);
- item.update();
-
- item = (ActionContributionItem) menuMgr
- .find(ActionFactory.SELECT_ALL.getId());
- action = (RetargetAction) item.getAction();
- action.setActionDefinitionId(fActionDefinitionIdSelectAll);
- action.setAccelerator(fAcceleratorSelectAll);
- action.enableAccelerator(true);
- item.update();
- }
- }
-
- protected class TerminalContextMenuHandler implements MenuListener, IMenuListener {
- public void menuHidden(MenuEvent event) {
- fMenuAboutToShow = false;
- updateEditCopy();
- }
-
- public void menuShown(MenuEvent e) {
- //
- }
- public void menuAboutToShow(IMenuManager menuMgr) {
- fMenuAboutToShow = true;
- updateEditCopy();
- updateEditCut();
- updateEditPaste();
- updateEditClearAll();
-
- loadContextMenus(menuMgr);
- }
- }
-
- protected class TerminalPropertyChangeHandler implements IPropertyChangeListener {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(FONT_DEFINITION)) {
- onTerminalFontChanged();
- }
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalViewPlugin.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalViewPlugin.java
deleted file mode 100644
index 3ba5f8ae9..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/TerminalViewPlugin.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class TerminalViewPlugin extends AbstractUIPlugin {
- protected static TerminalViewPlugin fDefault;
- public static final String PLUGIN_HOME = "org.eclipse.tm.terminal"; //$NON-NLS-1$
- public static final String HELP_VIEW = PLUGIN_HOME + ".terminal_view"; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public TerminalViewPlugin() {
- fDefault = this;
- }
- protected void initializeImageRegistry(ImageRegistry imageRegistry) {
- HashMap map;
-
- map = new HashMap();
-
- try {
- // Local toolbars
- map.put(ImageConsts.IMAGE_NEW_TERMINAL, "newterminal.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_CLCL_CONNECT, "connect_co.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_CLCL_DISCONNECT, "disconnect_co.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_CLCL_SETTINGS, "properties_tsk.gif"); //$NON-NLS-1$
-
- loadImageRegistry(imageRegistry, ImageConsts.IMAGE_DIR_LOCALTOOL, map);
-
- map.clear();
-
- // Enabled local toolbars
- map.put(ImageConsts.IMAGE_NEW_TERMINAL, "newterminal.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_ELCL_CONNECT, "connect_co.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_ELCL_DISCONNECT, "disconnect_co.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_ELCL_SETTINGS, "properties_tsk.gif"); //$NON-NLS-1$
-
- loadImageRegistry(imageRegistry, ImageConsts.IMAGE_DIR_ELCL, map);
-
- map.clear();
-
- // Disabled local toolbars
- map.put(ImageConsts.IMAGE_NEW_TERMINAL, "newterminal.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_DLCL_CONNECT, "connect_co.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_DLCL_DISCONNECT, "disconnect_co.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_DLCL_SETTINGS, "properties_tsk.gif"); //$NON-NLS-1$
-
- loadImageRegistry(imageRegistry, ImageConsts.IMAGE_DIR_DLCL, map);
-
- map.clear();
- } catch (MalformedURLException malformedURLException) {
- malformedURLException.printStackTrace();
- }
- }
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- store.setDefault(TerminalPreferencePage.PREF_LIMITOUTPUT,
- TerminalPreferencePage.DEFAULT_LIMITOUTPUT);
- store.setDefault(TerminalPreferencePage.PREF_BUFFERLINES,
- TerminalPreferencePage.DEFAULT_BUFFERLINES);
- store.setDefault(TerminalPreferencePage.PREF_TIMEOUT_SERIAL,
- TerminalPreferencePage.DEFAULT_TIMEOUT_SERIAL);
- store.setDefault(TerminalPreferencePage.PREF_TIMEOUT_NETWORK,
- TerminalPreferencePage.DEFAULT_TIMEOUT_NETWORK);
- }
- /**
- * Returns the shared instance.
- */
- public static TerminalViewPlugin getDefault() {
- return fDefault;
- }
-
- public static boolean isLogInfoEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG_INFO);
- }
- public static boolean isLogErrorEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG_ERROR);
- }
- public static boolean isLogEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG);
- }
-
- public static boolean isOptionEnabled(String strOption) {
- String strEnabled;
- Boolean boolEnabled;
- boolean bEnabled;
-
- strEnabled = Platform.getDebugOption(strOption);
- if (strEnabled == null)
- return false;
-
- boolEnabled = new Boolean(strEnabled);
- bEnabled = boolEnabled.booleanValue();
-
- return bEnabled;
- }
- protected void loadImageRegistry(ImageRegistry imageRegistry,
- String strDir, HashMap map) throws MalformedURLException {
- URL url;
- ImageDescriptor imageDescriptor;
- Iterator keys;
- String strKey;
- String strFile;
-
- keys = map.keySet().iterator();
-
- while (keys.hasNext()) {
- strKey = (String) keys.next();
- strFile = (String) map.get(strKey);
-
- if (strFile != null) {
- url = TerminalViewPlugin.getDefault().getBundle().getEntry(
- ImageConsts.IMAGE_DIR_ROOT + strDir + strFile);
- imageDescriptor = ImageDescriptor.createFromURL(url);
- imageRegistry.put(strKey, imageDescriptor);
- }
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ViewMessages.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ViewMessages.java
deleted file mode 100644
index 3bf151524..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ViewMessages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.view;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ViewMessages extends NLS {
- static {
- NLS.initializeMessages(ViewMessages.class.getName(), ViewMessages.class);
- }
- public static String PROP_TITLE;
- public static String SETTINGS;
-
- public static String TERMINALSETTINGS;
- public static String CONNECTIONTYPE;
-
- public static String LIMITOUTPUT;
- public static String BUFFERLINES;
- public static String SERIALTIMEOUT;
- public static String NETWORKTIMEOUT;
-
- public static String STATE_CONNECTED;
- public static String STATE_CONNECTING;
- public static String STATE_OPENED;
- public static String STATE_CLOSED;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ViewMessages.properties b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ViewMessages.properties
deleted file mode 100644
index 72901a74a..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/terminal/internal/view/ViewMessages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-PROP_TITLE = Terminal
-SETTINGS = Settings
-
-TERMINALSETTINGS = Terminal Settings
-CONNECTIONTYPE = Connection Type
-
-LIMITOUTPUT = Limit terminal output
-BUFFERLINES = Terminal buffer lines:
-SERIALTIMEOUT = Serial timeout (seconds):
-NETWORKTIMEOUT = Network timeout (seconds):
-
-STATE_CONNECTED = CONNECTED
-STATE_CONNECTING = CONNECTING...
-STATE_OPENED = OPENED
-STATE_CLOSED = CLOSED
diff --git a/terminal/org.eclipse.tm.terminal/.classpath b/terminal/org.eclipse.tm.terminal/.classpath
deleted file mode 100644
index 52165ecfb..000000000
--- a/terminal/org.eclipse.tm.terminal/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal/.options b/terminal/org.eclipse.tm.terminal/.options
deleted file mode 100644
index 5335bdd53..000000000
--- a/terminal/org.eclipse.tm.terminal/.options
+++ /dev/null
@@ -1,8 +0,0 @@
-org.eclipse.tm.terminal/debug = true
-org.eclipse.tm.terminal/debug/flag = true
-org.eclipse.tm.terminal/debug/filter = *
-org.eclipse.tm.terminal/debug/log = true
-org.eclipse.tm.terminal/debug/log/error = true
-org.eclipse.tm.terminal/debug/log/info = false
-org.eclipse.tm.terminal/debug/log/char = false
-org.eclipse.tm.terminal/debug/log/buffer/size = false
diff --git a/terminal/org.eclipse.tm.terminal/.project b/terminal/org.eclipse.tm.terminal/.project
deleted file mode 100644
index fa6a642ad..000000000
--- a/terminal/org.eclipse.tm.terminal/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>net.sourceforge.metrics.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>net.sourceforge.metrics.nature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.ui.prefs b/terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 9a20fca52..000000000
--- a/terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Jul 31 14:55:17 CEST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
diff --git a/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF
deleted file mode 100644
index dbde0d0dd..000000000
--- a/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal; singleton:=true
-Bundle-Version: 0.9.1.qualifier
-Bundle-Activator: org.eclipse.tm.terminal.internal.control.TerminalPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.jface.text
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ClassPath: .
-Export-Package: org.eclipse.tm.terminal,
- org.eclipse.tm.terminal.control
diff --git a/terminal/org.eclipse.tm.terminal/README.txt b/terminal/org.eclipse.tm.terminal/README.txt
deleted file mode 100644
index 0f370d7f1..000000000
--- a/terminal/org.eclipse.tm.terminal/README.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-Terminal README
-===============
-
-The Terminal is a Jface StyledText widget that can be hooked
-up to various ITerminalConnectors providing an InputStream,
-OutputStream, and a method for setting the Terminal Size.
-
-The widget processes ANSI control characters, including NUL,
-backspace, carriage return, linefeed, and a subset of ANSI
-escape sequences sufficient to allow use of screen-oriented
-applications, such as vi, Emacs, and any GNU readline-enabled
-application (Bash, bc, ncftp, etc.).
-
-This is not yet a fully compliant vt100 / vt102 terminal
-emulator!
diff --git a/terminal/org.eclipse.tm.terminal/about.html b/terminal/org.eclipse.tm.terminal/about.html
deleted file mode 100644
index 460233046..000000000
--- a/terminal/org.eclipse.tm.terminal/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/about.ini b/terminal/org.eclipse.tm.terminal/about.ini
deleted file mode 100644
index fdd61ff0d..000000000
--- a/terminal/org.eclipse.tm.terminal/about.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/about.mappings b/terminal/org.eclipse.tm.terminal/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/about.properties b/terminal/org.eclipse.tm.terminal/about.properties
deleted file mode 100644
index d315ef7fa..000000000
--- a/terminal/org.eclipse.tm.terminal/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=TM Terminal Widget\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2006. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal/build.properties b/terminal/org.eclipse.tm.terminal/build.properties
deleted file mode 100644
index 50dc00bf9..000000000
--- a/terminal/org.eclipse.tm.terminal/build.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-bin.includes = .,\
- META-INF/,\
- plugin.xml,\
- plugin.properties,\
- .options,\
- README.txt,\
- about.html,about.ini,about.mappings,about.properties,\
- eclipse32.png
-
-source.. = src/
-output.. = bin/
-src.includes = schema/,\
- README.txt,\
- about.html
- \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/eclipse32.png b/terminal/org.eclipse.tm.terminal/eclipse32.png
deleted file mode 100644
index 568fac1d0..000000000
--- a/terminal/org.eclipse.tm.terminal/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal/plugin.properties b/terminal/org.eclipse.tm.terminal/plugin.properties
deleted file mode 100644
index 203d3ec66..000000000
--- a/terminal/org.eclipse.tm.terminal/plugin.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-pluginName = TM Terminal Widget
-providerName = Eclipse.org
-
-terminal.context.name=Terminal widget context
-terminal.context.description=Override ALT+x menu access keys
-
diff --git a/terminal/org.eclipse.tm.terminal/plugin.xml b/terminal/org.eclipse.tm.terminal/plugin.xml
deleted file mode 100644
index 5fa64c8c4..000000000
--- a/terminal/org.eclipse.tm.terminal/plugin.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!--
-# Copyright (c) 2006 Wind River Systems, Inc. and others.
-# 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 Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
--->
-<plugin>
- <extension-point id="terminalConnector" name="Terminal Connector" schema="schema/terminalConnector.exsd"/>
- <extension
- point="org.eclipse.tm.terminal.terminalConnector">
- <connector class="org.eclipse.tm.terminal.internal.telnet.TelnetConnector"/>
- </extension>
-
- <extension point="org.eclipse.ui.contexts">
- <context
- name="%terminal.context.name"
- description="%terminal.context.description"
- id="org.eclipse.tm.terminal.TerminalContext"
- />
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <!--
- These keybindings are needed to disable the menu-activation keys (e.g.,
- Alt-F for the File menu, etc.). The code in method
- TerminalControl.TerminalFocusListener.focusGained() disables the Eclipse key
- binding service, but it doesn't disable the global menu-activation
- keys.
- -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+A"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+E"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+F"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+G"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+H"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+N"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+P"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+R"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+T"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+W"/>
- </extension>
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal/schema/terminalConnector.exsd b/terminal/org.eclipse.tm.terminal/schema/terminalConnector.exsd
deleted file mode 100644
index 8d240a11d..000000000
--- a/terminal/org.eclipse.tm.terminal/schema/terminalConnector.exsd
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.terminal">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.tm.terminal" id="terminalConnector" name="TerminalConnector"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="connector"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connector">
- <complexType>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.terminal.ITerminalConnector"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2006 Wind River Systems, Inc. and others.
-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 Scharf (Wind River) - initial API and implementation
-Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ISettingsPage.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ISettingsPage.java
deleted file mode 100644
index facce2c4b..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ISettingsPage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal;
-
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author Michael Scharf
- *
- * TODO: Michael Scharf: provide a mechanism to set an error string
- * TODO: Michael Scharf: provide a long description of a wizard
- * TODO: Michael Scharf: allow multiple pages to be generated
- */
-public interface ISettingsPage {
- /**
- * Create a page to be shown in a dialog or wizard to setup the connection.
- * @param parent
- */
- void createControl(Composite parent);
-
- /**
- * Called before the page is shown. Loads the state from the {@link ITerminalConnector}.
- */
- void loadSettings();
-
- /**
- * Called when the OK button is pressed.
- */
- void saveSettings();
-
- /**
- * @return true if the
- */
- boolean validateSettings();
-
- /**
- * @return a name of the connection type. Used in a tab page title or drop
- * down to select the connection.
- */
- String getName();
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ISettingsStore.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ISettingsStore.java
deleted file mode 100644
index 4aa0dcbcb..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ISettingsStore.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal;
-
-/**
- * A simple interface to a store to persist the state of a connection.
- *
- * @author Michael Scharf
- */
-public interface ISettingsStore {
- /**
- * @param key alpha numeric key, may contain dots (.)
- * @return value
- */
- String get(String key);
-
- /**
- * @param key alpha numeric key, may contain dots (.)
- * @param defaultValue
- * @return the value or the default
- */
- String get(String key, String defaultValue);
-
- /**
- * Save a string value
- * @param key alpha numeric key, may contain dots (.)
- * @param value
- */
- void put(String key, String value);
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ITerminalConnector.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ITerminalConnector.java
deleted file mode 100644
index 073eccaf6..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ITerminalConnector.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-
-/**
- * Manage a single connection. Implementations of this class are contributed
- * via <code>org.eclipse.tm.terminal.terminalConnector</code> extension point.
- *
- * @author Michael Scharf
- */
-public interface ITerminalConnector {
- /**
- * @return an ID of this connector. Typically <code>getClass().getName()</code>
- */
- String getId();
-
- /**
- * @return true if the contribution is functioning (e.g. all external libraries are
- * installed). This was added for the serial support, because it requires the java comm
- * library, which is installed in the lib/ext directory of the
- */
- boolean isInstalled();
-
- /**
- * Connect using the current state of the settings.
- * @param control Used to inform the UI about state changes and messages from the connection.
- */
- void connect(ITerminalControl control);
-
- /**
- * Disconnect if connected. Else do nothing.
- */
- void disconnect();
-
- /**
- * @return true if a local echo is needed.
- * TODO:Michael Scharf: this should be handed within the connection....
- */
- boolean isLocalEcho();
-
- /**
- * Notify the remote site that the size of the terminal has changed.
- * @param newWidth
- * @param newHeight
- */
- void setTerminalSize(int newWidth, int newHeight);
-
- /**
- * @return a stream with data coming from the remote site.
- */
- OutputStream getOutputStream();
-
- /**
- * @return a stream to write to the remote site.
- */
- InputStream getInputStream();
-
- /**
- * Load the state of this connection. Is typically called before
- * {@link #connect(ITerminalControl)}.
- *
- * @param store a string based data store. Short keys like "foo" can be used to
- * store the state of the connectio.
- */
- void load(ISettingsStore store);
-
- /**
- * When the view or dialog containing the terminal is closed,
- * the state of the connection is saved into the settings store <code>store</code>
- * @param store
- */
- void save(ISettingsStore store);
-
- /**
- * @return a new page that can be used in a dialog to setup this connection.
- *
- */
- ISettingsPage makeSettingsPage();
-
- /**
- * @param connectedLabel a String with the connected state {@link TerminalState}.
- * Like "CONNECTED", "CLOSED". Can be used to build up the status string.
- * @return A string that represents the state of the connection.
- * TODO: Michael Scharf:
- */
- String getStatusString(String connectedLabel);
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ITerminalControl.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ITerminalControl.java
deleted file mode 100644
index 53f9460b7..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/ITerminalControl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal;
-
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Represents the terminal view as seen by a terminal connection.
- *
- * <p> Not to be implemented by clients.
- * @author Michael Scharf
- */
-public interface ITerminalControl {
-
- /**
- * @return the current state of the connection
- */
- TerminalState getState();
-
- /**
- * @param state
- */
- void setState(TerminalState state);
-
- /**
- * A shell to show dialogs.
- * @return the shell in which the terminal is shown.
- * TODO: Michael Scharf: it's not clear to me what the meaning of the open state is
- */
- Shell getShell();
-
- /**
- * Show a text in the terminal. If pots newlines at the beginning and the end.
- * @param text
- * TODO: Michael Scharf: Is this really needed? (use {@link #displayTextInTerminal(String)}
- */
- void displayTextInTerminal(String text);
-
- /**
- * Write a string directly to the terminal.
- * @param txt
- */
- void writeToTerminal(String txt);
-
- /**
- * Set the title of the terminal view.
- * @param title
- */
- void setTerminalTitle(String title);
-
- /**
- * Show an error message during connect.
- * @param msg
- * TODO: Michael Scharf: Should be replaced by a better error notification mechansim!
- */
- void setMsg(String msg);
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/Logger.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/Logger.java
deleted file mode 100644
index b7ec3f9d0..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/Logger.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 Wind River Systems, Inc. and others.
- * 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:
- * Fran Litterio (Wind River) - initial API and implementation
- * Ted Williams (Wind River) - refactored into org.eclipse namespace
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.PrintStream;
-
-/**
- * A simple logger class. Every method in this class is static, so they can be
- * called from both class and instance methods. To use this class, write code
- * like this:
- * <p>
- *
- * <pre>
- * Logger.log(&quot;something has happened&quot;);
- * Logger.log(&quot;counter is &quot; + counter);
- * </pre>
- *
- * @author Fran Litterio <francis.litterio@windriver.com>
- */
-public final class Logger {
- public static final String TRACE_DEBUG_LOG = "org.eclipse.tm.terminal/debug/log"; //$NON-NLS-1$
- public static final String TRACE_DEBUG_LOG_ERROR = "org.eclipse.tm.terminal/debug/log/error"; //$NON-NLS-1$
- public static final String TRACE_DEBUG_LOG_INFO = "org.eclipse.tm.terminal/debug/log/info"; //$NON-NLS-1$
- public static final String TRACE_DEBUG_LOG_CHAR = "org.eclipse.tm.terminal/debug/log/char"; //$NON-NLS-1$
- public static final String TRACE_DEBUG_LOG_BUFFER_SIZE = "org.eclipse.tm.terminal/debug/log/buffer/size"; //$NON-NLS-1$
-
- private static PrintStream logStream;
-
- static {
- String logFile = null;
- //TODO I think this should go into the workspace metadata instead.
- File logDirWindows = new File("C:\\eclipselogs"); //$NON-NLS-1$
- File logDirUNIX = new File("/tmp/eclipselogs"); //$NON-NLS-1$
-
- if (logDirWindows.isDirectory()) {
- logFile = logDirWindows + "\\tmterminal.log"; //$NON-NLS-1$
- } else if (logDirUNIX.isDirectory()) {
- logFile = logDirUNIX + "/tmterminal.log"; //$NON-NLS-1$
- }
-
- if (logFile != null) {
- try {
- logStream = new PrintStream(new FileOutputStream(logFile, true));
- } catch (Exception ex) {
- logStream = System.err;
- logStream
- .println("Exception when opening log file -- logging to stderr!"); //$NON-NLS-1$
- ex.printStackTrace(logStream);
- }
- }
- }
-
- /**
- * Encodes a String such that non-printable control characters are
- * converted into user-readable escape sequences for logging.
- * @param message String to encode
- * @return encoded String
- */
- public static final String encode(String message) {
- boolean encoded = false;
- StringBuffer buf = new StringBuffer(message.length()+32);
- for (int i=0; i<message.length(); i++) {
- char c=message.charAt(i);
- switch(c) {
- case '\\':
- case '\'':
- buf.append('\\'); buf.append(c); encoded=true;
- break;
- case '\r':
- buf.append('\\'); buf.append('r'); encoded=true;
- break;
- case '\n':
- buf.append('\\'); buf.append('n'); encoded=true;
- break;
- case '\t':
- buf.append('\\'); buf.append('t'); encoded=true;
- break;
- case '\f':
- buf.append('\\'); buf.append('f'); encoded=true;
- break;
- case '\b':
- buf.append('\\'); buf.append('b'); encoded=true;
- break;
- default:
- if (c <= '\u000f') {
- buf.append('\\'); buf.append('x'); buf.append('0');
- buf.append(Integer.toHexString(c));
- encoded=true;
- } else if (c>=' ' && c<'\u007f') {
- buf.append(c);
- } else {
- buf.append('\\'); buf.append('u');
- if (c<='\u0fff') {
- buf.append('0');
- if (c<='\u00ff') {
- buf.append('0');
- }
- }
- buf.append(Integer.toHexString(c));
- encoded=true;
- }
- }
- }
- if (encoded) {
- return buf.toString();
- }
- return message;
- }
-
- /**
- * Checks if logging is enabled.
- * @return true if logging is enabled.
- */
- public static final boolean isLogEnabled() {
- return (logStream!=null);
- }
-
- /**
- * Logs the specified message. Do not append a newline to parameter
- * <i>message</i>. This method does that for you.
- *
- * @param message A String containing the message to log.
- */
- public static final void log(String message) {
- if (logStream != null) {
- // Read my own stack to get the class name, method name, and line
- // number of
- // where this method was called.
-
- StackTraceElement caller = new Throwable().getStackTrace()[1];
- int lineNumber = caller.getLineNumber();
- String className = caller.getClassName();
- String methodName = caller.getMethodName();
- className = className.substring(className.lastIndexOf('.') + 1);
-
- logStream.println(className + "." + methodName + ":" + lineNumber + ": " + message); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- logStream.flush();
- }
- }
-
- /**
- * Writes a stack trace for an exception to both Standard Error and to the
- * log file.
- */
- public static final void logException(Exception ex) {
- // Read my own stack to get the class name, method name, and line number
- // of
- // where this method was called.
-
- StackTraceElement caller = new Throwable().getStackTrace()[1];
- int lineNumber = caller.getLineNumber();
- String className = caller.getClassName();
- String methodName = caller.getMethodName();
- className = className.substring(className.lastIndexOf('.') + 1);
-
- PrintStream tmpStream = System.err;
-
- if (logStream != null) {
- tmpStream = logStream;
- }
-
- tmpStream.println(className
- + "." + methodName + ":" + lineNumber + ": " + //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- "Caught exception: " + ex); //$NON-NLS-1$
- ex.printStackTrace(tmpStream);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/TerminalConnectorExtension.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/TerminalConnectorExtension.java
deleted file mode 100644
index 2e5c64e97..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/TerminalConnectorExtension.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.terminal.internal.control.TerminalPlugin;
-
-/**
- * A factory to get {@link ITerminalConnector} instances.
- *
- * @author Michael Scharf
- *
- */
-public class TerminalConnectorExtension {
- /**
- * @return a new list of ITerminalConnectors.
- */
- public static ITerminalConnector[] getTerminalConnectors() {
- IConfigurationElement[] config=RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnector"); //$NON-NLS-1$
- List result=new ArrayList();
- for (int i = 0; i < config.length; i++) {
- try {
- Object obj=config[i].createExecutableExtension("class"); //$NON-NLS-1$
- if(obj instanceof ITerminalConnector) {
- ITerminalConnector conn=(ITerminalConnector) obj;
- if(conn.isInstalled())
- result.add(conn);
- }
- } catch (NoClassDefFoundError e) {
- log(e);
- } catch (Exception e) {
- log(e);
- }
- }
- return (ITerminalConnector[]) result.toArray(new ITerminalConnector[result.size()]);
- }
-
- private static void log(Throwable e) {
- TerminalPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TerminalPlugin.PLUGIN_ID, IStatus.OK, e.getMessage(), e));
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/TerminalState.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/TerminalState.java
deleted file mode 100644
index effa0ff6c..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/TerminalState.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal;
-
-/**
- * Represent the sate of a terminal connection.
- * In java 1.5 this would be an enum.
- * @author Michael Scharf
- *
- */
-public class TerminalState {
- /**
- * The terminal is not connected.
- */
- public final static TerminalState CLOSED=new TerminalState("CLOSED"); //$NON-NLS-1$
-
- /**
- * TODO: Michael Scharf: it's not clear to me what the meaning of the open state is
- */
- public final static TerminalState OPENED=new TerminalState("OPENED"); //$NON-NLS-1$
-
- /**
- * The terminal is about to connect.
- */
- public final static TerminalState CONNECTING=new TerminalState("CONNECTING..."); //$NON-NLS-1$
-
- /**
- * The terminal is connected.
- */
- public final static TerminalState CONNECTED=new TerminalState("CONNECTED"); //$NON-NLS-1$
-
- private final String fState;
-
- public TerminalState(String state) {
- fState = state;
- }
-
- public String toString() {
- return fState;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/ITerminalListener.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/ITerminalListener.java
deleted file mode 100644
index d05e88846..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/ITerminalListener.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.control;
-
-import org.eclipse.tm.terminal.TerminalState;
-
-/**
- * Provided by a view implementation.
- * @author Michael Scharf
- *
- */
-public interface ITerminalListener {
- /**
- * Called when the state of the connection has changed.
- * @param state
- */
- void setState(TerminalState state);
-
- /**
- * Set the title of the terminal.
- * @param title
- */
- void setTerminalTitle(String title);
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/ITerminalViewControl.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/ITerminalViewControl.java
deleted file mode 100644
index ac33802ae..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/ITerminalViewControl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.control;
-
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.tm.terminal.ITerminalConnector;
-import org.eclipse.tm.terminal.TerminalState;
-
-/**
- * @author Michael Scharf
- *
- */
-public interface ITerminalViewControl {
- boolean isEmpty();
- void onFontChanged();
- StyledText getCtlText();
- boolean isDisposed();
- void selectAll();
- void clearTerminal();
- void copy();
- void paste();
- String getSelection();
- TerminalState getState();
- Clipboard getClipboard();
- void disconnectTerminal();
- void disposeTerminal();
- String getStatusString(String status);
- ITerminalConnector[] getConnectors();
- void setFocus();
- ITerminalConnector getTerminalConnection();
- void setConnector(ITerminalConnector connector);
- void connectTerminal();
- void sendKey(char arg0);
- boolean isConnected();
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/TerminalViewControlFactory.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/TerminalViewControlFactory.java
deleted file mode 100644
index 8866b03fe..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/control/TerminalViewControlFactory.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.control;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.terminal.ITerminalConnector;
-import org.eclipse.tm.terminal.internal.control.TerminalControl;
-
-public class TerminalViewControlFactory {
- public static ITerminalViewControl makeControl(ITerminalListener target, Composite wndParent, ITerminalConnector[] connectors) {
- return new TerminalControl(target, wndParent, connectors);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/ITerminalControlForText.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/ITerminalControlForText.java
deleted file mode 100644
index 72e72bc93..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/ITerminalControlForText.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.control;
-
-import java.io.OutputStream;
-
-import org.eclipse.tm.terminal.ITerminalConnector;
-import org.eclipse.tm.terminal.TerminalState;
-
-/**
- * need a better name!
- * @author Michael Scharf
- *
- */
-public interface ITerminalControlForText {
-
- TerminalState getState();
- void setState(TerminalState state);
- void setTerminalTitle(String title);
-
- ITerminalConnector getTerminalConnection();
-
- void disconnectTerminal();
-
- OutputStream getOutputStream();
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalControl.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalControl.java
deleted file mode 100644
index f12eb1235..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalControl.java
+++ /dev/null
@@ -1,813 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.control;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.SocketException;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.ConfigurableLineTracker;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.custom.VerifyKeyListener;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.VerifyEvent;
-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.Shell;
-import org.eclipse.tm.terminal.ITerminalConnector;
-import org.eclipse.tm.terminal.ITerminalControl;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalState;
-import org.eclipse.tm.terminal.control.ITerminalListener;
-import org.eclipse.tm.terminal.control.ITerminalViewControl;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.contexts.IContextActivation;
-import org.eclipse.ui.contexts.IContextService;
-import org.eclipse.ui.keys.IBindingService;
-
-/**
- *
- * This class was originally written to use nested classes, which unfortunately makes
- * this source file larger and more complex than it needs to be. In particular, the
- * methods in the nested classes directly access the fields of the enclosing class.
- * One day we should pull the nested classes out into their own source files (but still
- * in this package).
- *
- * @author Chris Thew <chris.thew@windriver.com>
- */
-public class TerminalControl implements ITerminalControlForText, ITerminalControl, ITerminalViewControl
-{
- protected final static String[] LINE_DELIMITERS = { "\n" }; //$NON-NLS-1$
-
- /**
- * This field holds a reference to a TerminalText object that performs all ANSI
- * text processing on data received from the remote host and controls how text is
- * displayed using the view's StyledText widget.
- */
- private TerminalText fTerminalText;
-
- private Display fDisplay;
- private StyledText fCtlText;
- private TextViewer fViewer;
- private Composite fWndParent;
- private Clipboard fClipboard;
- private TerminalModifyListener fModifyListener;
- private KeyListener fKeyHandler;
- private ITerminalListener fTerminalListener;
- private String fMsg = ""; //$NON-NLS-1$
- private VerifyKeyListener fVerifyKeyListener;
- private FocusListener fFocusListener;
- private ITerminalConnector fConnector;
- private final ITerminalConnector[] fConnectors;
-
- private volatile TerminalState fState;
-
- public TerminalControl(ITerminalListener target, Composite wndParent, ITerminalConnector[] connectors) {
- fConnectors=connectors;
- fTerminalListener=target;
- fWndParent = wndParent;
-
- setTerminalText(new TerminalText(this));
-
- setupTerminal();
- }
-
- public ITerminalConnector[] getConnectors() {
- return fConnectors;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#copy()
- */
- public void copy() {
- getCtlText().copy();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#paste()
- */
- public void paste() {
- TextTransfer textTransfer = TextTransfer.getInstance();
- String strText = (String) fClipboard.getContents(textTransfer);
- if (strText == null)
- return;
- for (int i = 0; i < strText.length(); i++) {
- sendChar(strText.charAt(i), false);
- }
-// TODO paste in another thread.... to avoid blocking
-// new Thread() {
-// public void run() {
-// for (int i = 0; i < strText.length(); i++) {
-// sendChar(strText.charAt(i), false);
-// }
-//
-// }
-// }.start();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#selectAll()
- */
- public void selectAll() {
- getCtlText().selectAll();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#sendKey(char)
- */
- public void sendKey(char character) {
- Event event;
- KeyEvent keyEvent;
-
- event = new Event();
- event.widget = getCtlText();
- event.character = character;
- event.keyCode = 0;
- event.stateMask = 0;
- event.doit = true;
- keyEvent = new KeyEvent(event);
-
- fKeyHandler.keyPressed(keyEvent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#clearTerminal()
- */
- public void clearTerminal() {
- // The TerminalText object does all text manipulation.
-
- getTerminalText().clearTerminal();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#getClipboard()
- */
- public Clipboard getClipboard() {
- return fClipboard;
- }
-
- /**
- * @return non null selection
- */
- public String getSelection() {
- String txt= ((ITextSelection) fViewer.getSelection()).getText();
- if(txt==null)
- txt=""; //$NON-NLS-1$
- return txt;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#setFocus()
- */
- public void setFocus() {
- getCtlText().setFocus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#isEmpty()
- */
- public boolean isEmpty() {
- return (getCtlText().getCharCount() == 0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#isDisposed()
- */
- public boolean isDisposed() {
- return getCtlText().isDisposed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#isConnected()
- */
- public boolean isConnected() {
- return fState==TerminalState.CONNECTED;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#disposeTerminal()
- */
- public void disposeTerminal() {
- Logger.log("entered."); //$NON-NLS-1$
- disconnectTerminal();
- fClipboard.dispose();
- getTerminalText().dispose();
- }
-
- public void connectTerminal() {
- Logger.log("entered."); //$NON-NLS-1$
- if(fConnector==null)
- return;
- fConnector.connect(this);
- waitForConnect();
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#disconnectTerminal()
- */
- public void disconnectTerminal() {
- Logger.log("entered."); //$NON-NLS-1$
-
- if (getState()==TerminalState.CLOSED) {
- return;
- }
- if(fConnector!=null) {
- fConnector.disconnect();
-// fConnector=null;
- }
- }
-
- // TODO
- private void waitForConnect() {
- Logger.log("entered."); //$NON-NLS-1$
- // TODO
- // Eliminate this code
- while (getState()==TerminalState.CONNECTING) {
- if (fDisplay.readAndDispatch())
- continue;
-
- fDisplay.sleep();
- }
- if (!getMsg().equals("")) //$NON-NLS-1$
- {
- String strTitle = TerminalMessages.TerminalError;
- MessageDialog.openError( getShell(), strTitle, getMsg());
-
- disconnectTerminal();
- return;
- }
-
- getCtlText().setFocus();
- }
-
- protected void sendString(String string) {
- try {
- // Send the string after converting it to an array of bytes using the
- // platform's default character encoding.
- //
- // TODO: Find a way to force this to use the ISO Latin-1 encoding.
-
- getOutputStream().write(string.getBytes());
- getOutputStream().flush();
- } catch (SocketException socketException) {
- displayTextInTerminal(socketException.getMessage());
-
- String strTitle = TerminalMessages.TerminalError;
- String strMsg = TerminalMessages.SocketError
- + "!\n" + socketException.getMessage(); //$NON-NLS-1$
-
- MessageDialog.openError(getShell(), strTitle, strMsg);
- Logger.logException(socketException);
-
- disconnectTerminal();
- } catch (IOException ioException) {
- displayTextInTerminal(ioException.getMessage());
-
- String strTitle = TerminalMessages.TerminalError;
- String strMsg = TerminalMessages.IOError + "!\n" + ioException.getMessage(); //$NON-NLS-1$
-
- MessageDialog.openError(getShell(), strTitle, strMsg);
- Logger.logException(ioException);
-
- disconnectTerminal();
- }
- }
-
- public Shell getShell() {
- return getCtlText().getShell();
- }
-
- protected void sendChar(char chKey, boolean altKeyPressed) {
- try {
- int byteToSend = chKey;
-
- if (altKeyPressed) {
- // When the ALT key is pressed at the same time that a character is
- // typed, translate it into an ESCAPE followed by the character. The
- // alternative in this case is to set the high bit of the character
- // being transmitted, but that will cause input such as ALT-f to be
- // seen as the ISO Latin-1 character '�', which can be confusing to
- // European users running Emacs, for whom Alt-f should move forward a
- // word instead of inserting the '�' character.
- //
- // TODO: Make the ESCAPE-vs-highbit behavior user configurable.
-
- Logger.log("sending ESC + '" + byteToSend + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- getOutputStream().write('\u001b');
- getOutputStream().write(byteToSend);
- } else {
- Logger.log("sending '" + byteToSend + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- getOutputStream().write(byteToSend);
- }
-
- getOutputStream().flush();
- } catch (SocketException socketException) {
- Logger.logException(socketException);
-
- displayTextInTerminal(socketException.getMessage());
-
- String strTitle = TerminalMessages.TerminalError;
- String strMsg = TerminalMessages.SocketError
- + "!\n" + socketException.getMessage(); //$NON-NLS-1$
-
- MessageDialog.openError(getShell(), strTitle, strMsg);
- Logger.logException(socketException);
-
- disconnectTerminal();
- } catch (IOException ioException) {
- Logger.logException(ioException);
-
- displayTextInTerminal(ioException.getMessage());
-
- String strTitle = TerminalMessages.TerminalError;
- String strMsg = TerminalMessages.IOError + "!\n" + ioException.getMessage(); //$NON-NLS-1$
-
- MessageDialog.openError(getShell(), strTitle, strMsg);
- Logger.logException(ioException);
-
- disconnectTerminal();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#setupTerminal()
- */
- public void setupTerminal() {
- fState=TerminalState.CLOSED;
- setupControls();
- setupListeners();
- setupHelp(fWndParent, TerminalPlugin.HELP_VIEW);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#onFontChanged()
- */
- public void onFontChanged() {
- getTerminalText().fontChanged();
- }
-
- protected void setupControls() {
- // The Terminal view now aims to be an ANSI-conforming terminal emulator, so it
- // can't have a horizontal scroll bar (but a vertical one is ok). Also, do
- // _not_ make the TextViewer read-only, because that prevents it from seeing a
- // TAB character when the user presses TAB (instead, the TAB causes focus to
- // switch to another Workbench control). We prevent local keyboard input from
- // modifying the text in method TerminalVerifyKeyListener.verifyKey().
-
- fViewer = new TextViewer(fWndParent, SWT.V_SCROLL);
- setCtlText(fViewer.getTextWidget());
-
- fDisplay = getCtlText().getDisplay();
- fClipboard = new Clipboard(fDisplay);
- fViewer.setDocument(new TerminalDocument());
- getCtlText().setFont(JFaceResources.getTextFont());
- }
-
- protected void setupListeners() {
- fKeyHandler = new TerminalKeyHandler();
- fModifyListener = new TerminalModifyListener();
- fVerifyKeyListener = new TerminalVerifyKeyListener();
- fFocusListener = new TerminalFocusListener();
-
- getCtlText().addVerifyKeyListener(fVerifyKeyListener);
- getCtlText().addKeyListener(fKeyHandler);
- getCtlText().addModifyListener(fModifyListener);
- getCtlText().addVerifyKeyListener(fVerifyKeyListener);
- getCtlText().addFocusListener(fFocusListener);
- }
-
- /**
- * Setup all the help contexts for the controls.
- */
- protected void setupHelp(Composite parent, String id) {
- Control[] children = parent.getChildren();
-
- for (int nIndex = 0; nIndex < children.length; nIndex++) {
- if (children[nIndex] instanceof Composite) {
- setupHelp((Composite) children[nIndex], id);
- }
- }
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, id);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#displayTextInTerminal(java.lang.String)
- */
- public void displayTextInTerminal(String text) {
- writeToTerminal(text+"\r\n"); //$NON-NLS-1$
- }
-
- public void writeToTerminal(String txt) {
-
- // Do _not_ use asyncExec() here. Class TerminalText requires that
- // its run() and setNewText() methods be called in strictly
- // alternating order. If we were to call asyncExec() here, this
- // loop might race around and call setNewText() twice in a row,
- // which would lose data.
- getTerminalText().setNewText(new StringBuffer(txt));
- if(Display.getDefault().getThread()==Thread.currentThread())
- getTerminalText().run();
- else
- fDisplay.syncExec(getTerminalText());
-
- }
-
- protected boolean isLogCharEnabled() {
- return TerminalPlugin.isOptionEnabled(Logger.TRACE_DEBUG_LOG_CHAR);
- }
- protected boolean isLogBufferSizeEnabled() {
- return TerminalPlugin
- .isOptionEnabled(Logger.TRACE_DEBUG_LOG_BUFFER_SIZE);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#getInputStream()
- */
- public InputStream getInputStream() {
- if(fConnector!=null)
- return fConnector.getInputStream();
- return null;
- }
-
- public OutputStream getOutputStream() {
- if(fConnector!=null)
- return fConnector.getOutputStream();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#setMsg(java.lang.String)
- */
- public void setMsg(String msg) {
- fMsg = msg;
- }
-
- public String getMsg() {
- return fMsg;
- }
-
- void setCtlText(StyledText ctlText) {
- fCtlText = ctlText;
- fTerminalText.setStyledText(ctlText);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#getCtlText()
- */
- public StyledText getCtlText() {
- return fCtlText;
- }
-
- void setTerminalText(TerminalText terminalText) {
- fTerminalText = terminalText;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.terminal.ITerminalControl#getTerminalText()
- */
- public TerminalText getTerminalText() {
- return fTerminalText;
- }
-
- /**
- */
- public ITerminalConnector getTerminalConnection() {
- return fConnector;
- }
-
- protected class TerminalModifyListener implements ModifyListener {
- public void modifyText(ModifyEvent e) {
- if (e.getSource() instanceof StyledText) {
- StyledText text = (StyledText) e.getSource();
- text.setSelection(text.getText().length());
- }
- }
- }
-
- protected class TerminalFocusListener implements FocusListener {
- private IContextActivation contextActivation = null;
-
- protected TerminalFocusListener() {
- super();
- }
-
- public void focusGained(FocusEvent event) {
- // Disable all keyboard accelerators (e.g., Control-B) so the Terminal view
- // can see every keystroke. Without this, Emacs, vi, and Bash are unusable
- // in the Terminal view.
-
- IBindingService bindingService = (IBindingService) PlatformUI
- .getWorkbench().getAdapter(IBindingService.class);
- bindingService.setKeyFilterEnabled(false);
-
- // The above code fails to cause Eclipse to disable menu-activation
- // accelerators (e.g., Alt-F for the File menu), so we set the command
- // context to be the Terminal view's command context. This enables us to
- // override menu-activation accelerators with no-op commands in our
- // plugin.xml file, which enables the Terminal view to see absolutly _all_
- // key-presses.
-
- IContextService contextService = (IContextService) PlatformUI
- .getWorkbench().getAdapter(IContextService.class);
- contextActivation = contextService
- .activateContext("org.eclipse.tm.terminal.TerminalContext"); //$NON-NLS-1$
- }
-
- public void focusLost(FocusEvent event) {
- // Enable all keybindings.
-
- IBindingService bindingService = (IBindingService) PlatformUI
- .getWorkbench().getAdapter(IBindingService.class);
- bindingService.setKeyFilterEnabled(true);
-
- // Restore the command context to its previous value.
-
- IContextService contextService = (IContextService) PlatformUI
- .getWorkbench().getAdapter(IContextService.class);
- contextService.deactivateContext(contextActivation);
- }
- }
-
- protected class TerminalVerifyKeyListener implements VerifyKeyListener {
- public void verifyKey(VerifyEvent event) {
- // We set event.doit to false to prevent keyboard input from locally
- // modifying the contents of the StyledText widget. The only text we
- // display is text received from the remote endpoint. This also prevents
- // the caret from moving locally when the user presses an arrow key or the
- // PageUp or PageDown keys. For some reason, doing this in
- // TerminalKeyHandler.keyPressed() does not work, hence the need for this
- // class.
-
- event.doit = false;
- }
- }
- protected class TerminalKeyHandler extends KeyAdapter {
- public void keyPressed(KeyEvent event) {
- if (getState()==TerminalState.CONNECTING)
- return;
-
- // We set the event.doit to false to prevent any further processing of this
- // key event. The only reason this is here is because I was seeing the F10
- // key both send an escape sequence (due to this method) and switch focus
- // to the Workbench File menu (forcing the user to click in the Terminal
- // view again to continue entering text). This fixes that.
-
- event.doit = false;
-
- char character = event.character;
-
- if (!isConnected()) {
- // Pressing ENTER while not connected causes us to connect.
- if (character == '\r') {
- connectTerminal();
- return;
- }
-
- // Ignore all other keyboard input when not connected.
- return;
- }
-
- // If the event character is NUL ('\u0000'), then a special key was pressed
- // (e.g., PageUp, PageDown, an arrow key, a function key, Shift, Alt,
- // Control, etc.). The one exception is when the user presses Control-@,
- // which sends a NUL character, in which case we must send the NUL to the
- // remote endpoint. This is necessary so that Emacs will work correctly,
- // because Control-@ (i.e., NUL) invokes Emacs' set-mark-command when Emacs
- // is running on a terminal. When the user presses Control-@, the keyCode
- // is 50.
-
- if (character == '\u0000' && event.keyCode != 50) {
- // A special key was pressed. Figure out which one it was and send the
- // appropriate ANSI escape sequence.
- //
- // IMPORTANT: Control will not enter this method for these special keys
- // unless certain <keybinding> tags are present in the plugin.xml file
- // for the Terminal view. Do not delete those tags.
-
- switch (event.keyCode) {
- case 0x1000001: // Up arrow.
- sendString("\u001b[A"); //$NON-NLS-1$
- break;
-
- case 0x1000002: // Down arrow.
- sendString("\u001b[B"); //$NON-NLS-1$
- break;
-
- case 0x1000003: // Left arrow.
- sendString("\u001b[D"); //$NON-NLS-1$
- break;
-
- case 0x1000004: // Right arrow.
- sendString("\u001b[C"); //$NON-NLS-1$
- break;
-
- case 0x1000005: // PgUp key.
- sendString("\u001b[I"); //$NON-NLS-1$
- break;
-
- case 0x1000006: // PgDn key.
- sendString("\u001b[G"); //$NON-NLS-1$
- break;
-
- case 0x1000007: // Home key.
- sendString("\u001b[H"); //$NON-NLS-1$
- break;
-
- case 0x1000008: // End key.
- sendString("\u001b[F"); //$NON-NLS-1$
- break;
-
- case 0x100000a: // F1 key.
- sendString("\u001b[M"); //$NON-NLS-1$
- break;
-
- case 0x100000b: // F2 key.
- sendString("\u001b[N"); //$NON-NLS-1$
- break;
-
- case 0x100000c: // F3 key.
- sendString("\u001b[O"); //$NON-NLS-1$
- break;
-
- case 0x100000d: // F4 key.
- sendString("\u001b[P"); //$NON-NLS-1$
- break;
-
- case 0x100000e: // F5 key.
- sendString("\u001b[Q"); //$NON-NLS-1$
- break;
-
- case 0x100000f: // F6 key.
- sendString("\u001b[R"); //$NON-NLS-1$
- break;
-
- case 0x1000010: // F7 key.
- sendString("\u001b[S"); //$NON-NLS-1$
- break;
-
- case 0x1000011: // F8 key.
- sendString("\u001b[T"); //$NON-NLS-1$
- break;
-
- case 0x1000012: // F9 key.
- sendString("\u001b[U"); //$NON-NLS-1$
- break;
-
- case 0x1000013: // F10 key.
- sendString("\u001b[V"); //$NON-NLS-1$
- break;
-
- case 0x1000014: // F11 key.
- sendString("\u001b[W"); //$NON-NLS-1$
- break;
-
- case 0x1000015: // F12 key.
- sendString("\u001b[X"); //$NON-NLS-1$
- break;
-
- default:
- // Ignore other special keys. Control flows through this case when
- // the user presses SHIFT, CONTROL, ALT, and any other key not
- // handled by the above cases.
- break;
- }
-
- // It's ok to return here, because we never locally echo special keys.
-
- return;
- }
-
- // To fix SPR 110341, we consider the Alt key to be pressed only when the
- // Control key is _not_ also pressed. This works around a bug in SWT where,
- // on European keyboards, the AltGr key being pressed appears to us as Control
- // + Alt being pressed simultaneously.
-
- Logger.log("stateMask = " + event.stateMask); //$NON-NLS-1$
-
- boolean altKeyPressed = (((event.stateMask & SWT.ALT) != 0) && ((event.stateMask & SWT.CTRL) == 0));
-
- if (!altKeyPressed && (event.stateMask & SWT.CTRL) != 0
- && character == ' ') {
- // Send a NUL character -- many terminal emulators send NUL when
- // Control-Space is pressed. This is used to set the mark in Emacs.
-
- character = '\u0000';
- }
-
- sendChar(character, altKeyPressed);
-
- // Special case: When we are in a TCP connection and echoing characters
- // locally, send a LF after sending a CR.
- // ISSUE: Is this absolutely required?
-
- if (character == '\r' && getTerminalConnection() != null
- && isConnected()
- && getTerminalConnection().isLocalEcho()) {
- sendChar('\n', false);
- }
-
- // Now decide if we should locally echo the character we just sent. We do
- // _not_ locally echo the character if any of these conditions are true:
- //
- // o This is a serial connection.
- //
- // o This is a TCP connection (i.e., m_telnetConnection is not null) and
- // the remote endpoint is not a TELNET server.
- //
- // o The ALT (or META) key is pressed.
- //
- // o The character is any of the first 32 ISO Latin-1 characters except
- // Control-I or Control-M.
- //
- // o The character is the DELETE character.
-
- if (getTerminalConnection() == null
- || getTerminalConnection().isLocalEcho() == false || altKeyPressed
- || (character >= '\u0001' && character < '\t')
- || (character > '\t' && character < '\r')
- || (character > '\r' && character <= '\u001f')
- || character == '\u007f') {
- // No local echoing.
- return;
- }
-
- // Locally echo the character.
-
- StringBuffer charBuffer = new StringBuffer();
- charBuffer.append(character);
-
- // If the character is a carriage return, we locally echo it as a CR + LF
- // combination.
-
- if (character == '\r')
- charBuffer.append('\n');
-
- writeToTerminal(charBuffer.toString());
- }
-
- }
-
- protected class TerminalDocument extends Document {
- protected TerminalDocument() {
- setLineTracker(new ConfigurableLineTracker(LINE_DELIMITERS));
- }
- }
-
- public void setTerminalTitle(String title) {
- fTerminalListener.setTerminalTitle(title);
- }
-
-
- public TerminalState getState() {
- return fState;
- }
-
-
- public void setState(TerminalState state) {
- fState=state;
- fTerminalListener.setState(state);
- }
-
- public String getStatusString(String strConnected) {
- if(fConnector!=null)
- return fConnector.getStatusString(strConnected);
- return strConnected;
- }
-
- public void setConnector(ITerminalConnector connector) {
- fConnector=connector;
-
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalMessages.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalMessages.java
deleted file mode 100644
index 69bb8d995..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalMessages.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.control;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TerminalMessages extends NLS {
- static {
- NLS.initializeMessages(TerminalMessages.class.getName(), TerminalMessages.class);
- }
-
- public static String TerminalError;
- public static String SocketError;
- public static String IOError;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalMessages.properties b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalMessages.properties
deleted file mode 100644
index 70f429545..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalMessages.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-TerminalError = Terminal Error
-SocketError = Socket Error
-IOError = IO Error
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalPlugin.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalPlugin.java
deleted file mode 100644
index 2a48924d4..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalPlugin.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.control;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class TerminalPlugin extends AbstractUIPlugin {
- protected static TerminalPlugin fDefault;
- public static final String PLUGIN_ID = "org.eclipse.tm.terminal"; //$NON-NLS-1$
- public static final String HELP_VIEW = PLUGIN_ID + ".terminal_view"; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public TerminalPlugin() {
- fDefault = this;
- }
- /**
- * Returns the shared instance.
- */
- public static TerminalPlugin getDefault() {
- return fDefault;
- }
-
- public static boolean isLogInfoEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG_INFO);
- }
- public static boolean isLogErrorEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG_ERROR);
- }
- public static boolean isLogEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG);
- }
-
- public static boolean isOptionEnabled(String strOption) {
- String strEnabled = Platform.getDebugOption(strOption);
- if (strEnabled == null)
- return false;
-
- return new Boolean(strEnabled).booleanValue();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalText.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalText.java
deleted file mode 100644
index ef01b36b1..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/control/TerminalText.java
+++ /dev/null
@@ -1,2086 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.control;
-
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.terminal.ITerminalConnector;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalState;
-import org.eclipse.tm.terminal.internal.telnet.TelnetConnection;
-
-/**
- * This class processes character data received from the remote host and
- * displays it to the user using the Terminal view's StyledText widget. This
- * class processes ANSI control characters, including NUL, backspace, carriage
- * return, linefeed, and a subset of ANSI escape sequences sufficient to allow
- * use of screen-oriented applications, such as vi, Emacs, and any GNU
- * readline-enabled application (Bash, bc, ncftp, etc.).
- * <p>
- *
- * @author Fran Litterio <francis.litterio@windriver.com>
- * @author Chris Thew <chris.thew@windriver.com>
- */
-public class TerminalText implements Runnable, ControlListener {
- /** This is a character processing state: Initial state. */
- protected static final int ANSISTATE_INITIAL = 0;
-
- /** This is a character processing state: We've seen an escape character. */
- protected static final int ANSISTATE_ESCAPE = 1;
-
- /**
- * This is a character processing state: We've seen a '[' after an escape
- * character. Expecting a parameter character or a command character next.
- */
- protected static final int ANSISTATE_EXPECTING_PARAMETER_OR_COMMAND = 2;
-
- /**
- * This is a character processing state: We've seen a ']' after an escape
- * character. We are now expecting an operating system command that
- * reprograms an intelligent terminal.
- */
- protected static final int ANSISTATE_EXPECTING_OS_COMMAND = 3;
-
- /**
- * This field holds the current state of the Finite TerminalState Automaton (FSA)
- * that recognizes ANSI escape sequences.
- *
- * @see #processNewText()
- */
- protected int ansiState = ANSISTATE_INITIAL;
-
- /**
- * This field holds a reference to the {@link TerminalControl} object that
- * instantiates this class.
- */
- protected ITerminalControlForText terminal;
-
- /**
- * This field holds a reference to the StyledText widget that is used to
- * display text to the user.
- */
- protected StyledText text;
-
- /**
- * This field holds the characters received from the remote host before they
- * are displayed to the user. Method {@link #processNewText()} scans this
- * text looking for ANSI control characters and escape sequences.
- */
- protected StringBuffer newText;
-
- /**
- * This field holds the index of the current character while the text stored
- * in field {@link #newText} is being processed.
- */
- protected int characterIndex = 0;
-
- /**
- * This field holds the width of a character (in pixels) for the font used
- * to display text.
- */
- protected int characterPixelWidth = 0;
-
- /**
- * This field holds the width of the terminal screen in columns.
- */
- protected int widthInColumns = 0;
-
- /**
- * This field holds the height of the terminal screen in visible lines. The
- * StyledText widget can contain more lines than are visible.
- */
- protected int heightInLines = 0;
-
- /**
- * This field holds the number of the column in which the cursor is
- * logically positioned. The leftmost column on the screen is column 0, and
- * column numbers increase to the right. The maximum value of this field is
- * {@link #widthInColumns} - 1. We track the cursor column using this field
- * to avoid having to recompute it repeatly using StyledText method calls.
- * <p>
- *
- * The StyledText widget that displays text has a vertical bar (called the
- * "caret") that appears _between_ character cells, but ANSI terminals have
- * the concept of a cursor that appears _in_ a character cell, so we need a
- * convention for which character cell the cursor logically occupies when
- * the caret is physically between two cells. The convention used in this
- * class is that the cursor is logically in column N when the caret is
- * physically positioned immediately to the _left_ of column N.
- * <p>
- *
- * When cursorColumn is N, the next character output to the terminal appears
- * in column N. When a character is output to the rightmost column on a
- * given line (column widthInColumns - 1), the cursor moves to column 0 on
- * the next line after the character is drawn (this is how line wrapping is
- * implemented). If the cursor is in the bottommost line when line wrapping
- * occurs, the topmost visible line is scrolled off the top edge of the
- * screen.
- * <p>
- */
- protected int cursorColumn = 0;
-
- /**
- * This field holds the caret offset when we last moved it or wrote text to
- * the terminal. The reason we need to remember this value is because,
- * unlike with a normal terminal emulator, the user can move the caret by
- * clicking anywhere in the terminal view. In a normal terminal emulator,
- * the cursor only moves as the result of character output (i.e., escape
- * sequences or normal characters). We use the value stored in this field to
- * restore the position of the caret immediately before processing each
- * chunk of output from the remote endpoint.
- */
- protected int caretOffset = 0;
-
- /**
- * This field hold the saved absolute line number of the cursor when
- * processing the "ESC 7" and "ESC 8" command sequences.
- */
- protected int savedCursorLine = 0;
-
- /**
- * This field hold the saved column number of the cursor when processing the
- * "ESC 7" and "ESC 8" command sequences.
- */
- protected int savedCursorColumn = 0;
-
- /**
- * This field holds an array of StringBuffer objects, each of which is one
- * parameter from the current ANSI escape sequence. For example, when
- * parsing the escape sequence "\e[20;10H", this array holds the strings
- * "20" and "10".
- */
- protected StringBuffer[] ansiParameters = new StringBuffer[16];
-
- /**
- * This field holds the OS-specific command found in an escape sequence of
- * the form "\e]...\u0007".
- */
- protected StringBuffer ansiOsCommand = new StringBuffer(128);
-
- /**
- * This field holds the index of the next unused element of the array stored
- * in field {@link #ansiParameters}.
- */
- protected int nextAnsiParameter = 0;
-
- /**
- * This field holds the Color object representing the current foreground
- * color as set by the ANSI escape sequence "\e[m".
- */
- protected Color currentForegroundColor;
-
- /**
- * This field holds the Color object representing the current background
- * color as set by the ANSI escape sequence "\e[m".
- */
- protected Color currentBackgroundColor;
-
- /**
- * This field holds an integer representing the current font style as set by
- * the ANSI escape sequence "\e[m".
- */
- protected int currentFontStyle = SWT.NORMAL;
-
- /**
- * This field is true if we are currently outputing text in reverse video
- * mode, false otherwise.
- */
- protected boolean reverseVideo = false;
-
- /**
- * This field holds the time (in milliseconds) of the previous call to
- * method {@link #SetNewText()}.
- */
- static long LastNewOutputTime = 0;
-
- /**
- * Color object representing the color black. The Color class requires us to
- * call dispose() on this object when we no longer need it. We do that in
- * method {@link #dispose()}.
- */
- protected final Color BLACK = new Color(Display.getCurrent(), 0, 0, 0);
-
- /**
- * Color object representing the color red. The Color class requires us to
- * call dispose() on this object when we no longer need it. We do that in
- * method {@link #dispose()}.
- */
- protected final Color RED = new Color(Display.getCurrent(), 255, 0, 0);
-
- /**
- * Color object representing the color green. The Color class requires us to
- * call dispose() on this object when we no longer need it. We do that in
- * method {@link #dispose()}.
- */
- protected final Color GREEN = new Color(Display.getCurrent(), 0, 255, 0);
-
- /**
- * Color object representing the color yellow. The Color class requires us
- * to call dispose() on this object when we no longer need it. We do that in
- * method {@link #dispose()}.
- */
- protected final Color YELLOW = new Color(Display.getCurrent(), 255, 255, 0);
-
- /**
- * Color object representing the color blue. The Color class requires us to
- * call dispose() on this object when we no longer need it. We do that in
- * method {@link #dispose()}.
- */
- protected final Color BLUE = new Color(Display.getCurrent(), 0, 0, 255);
-
- /**
- * Color object representing the color magenta. The Color class requires us
- * to call dispose() on this object when we no longer need it. We do that in
- * method {@link #dispose()}.
- */
- protected final Color MAGENTA = new Color(Display.getCurrent(), 255, 0, 255);
-
- /**
- * Color object representing the color cyan. The Color class requires us to
- * call dispose() on this object when we no longer need it. We do that in
- * method {@link #dispose()}.
- */
- protected final Color CYAN = new Color(Display.getCurrent(), 0, 255, 255);
-
- /**
- * Color object representing the color white. The Color class requires us to
- * call dispose() on this object when we no longer need it. We do that in
- * method {@link #dispose()}.
- */
- protected final Color WHITE = new Color(Display.getCurrent(), 255, 255, 255);
-
- protected boolean fLimitOutput;
- protected int fBufferLineLimit;
- /**
- * The constructor.
- */
- public TerminalText(ITerminalControlForText terminal) {
- super();
-
- Logger.log("entered"); //$NON-NLS-1$
-
- this.terminal = terminal;
-
- for (int i = 0; i < ansiParameters.length; ++i) {
- ansiParameters[i] = new StringBuffer();
- }
- }
-
- /**
- * @param ctlText Sets the styled text.
- *
- * <p><b>Note:</b>This method can only be called once.
- */
- public void setStyledText(StyledText ctlText) {
- if(text!=null)
- throw new java.lang.IllegalStateException("Text can be set only once"); //$NON-NLS-1$
- text=ctlText;
-
- // Register this class instance as a ControlListener so we can learn
- // when the StyledText widget is resized.
-
- text.addControlListener(this);
-
- currentForegroundColor = text.getForeground();
- currentBackgroundColor = text.getBackground();
- currentFontStyle = SWT.NORMAL;
- reverseVideo = false;
- }
-
-
- /**
- * This method performs clean up when this TerminalText object is no longer
- * needed. After calling this method, no other method on this object should
- * be called.
- */
- public void dispose() {
- Logger.log("entered"); //$NON-NLS-1$
-
- // Call dispose() on the Color objects we created.
-
- BLACK.dispose();
- RED.dispose();
- GREEN.dispose();
- YELLOW.dispose();
- BLUE.dispose();
- MAGENTA.dispose();
- CYAN.dispose();
- WHITE.dispose();
- }
-
- /**
- * This method is required by interface ControlListener. It allows us to
- * know when the StyledText widget is moved.
- */
- public void controlMoved(ControlEvent event) {
- Logger.log("entered"); //$NON-NLS-1$
- // Empty.
- }
-
- /**
- * This method is required by interface ControlListener. It allows us to
- * know when the StyledText widget is resized. This method must be
- * synchronized to prevent it from executing at the same time as run(),
- * which displays new text. We can't have the fields that represent the
- * dimensions of the terminal changing while we are rendering text.
- */
- public synchronized void controlResized(ControlEvent event) {
- Logger.log("entered"); //$NON-NLS-1$
- adjustTerminalDimensions();
- }
-
- /**
- * This method sets field {@link #newText} to a new value. This method must
- * not execute at the same time as methods {@link #run()} and {@link
- * #clearTerminal()}.
- * <p>
- *
- * IMPORTANT: This method must be called in strict alternation with method
- * {@link #run()}.
- * <p>
- *
- * @param newBuffer
- * The new buffer containing characters received from the remote
- * host.
- */
- public synchronized void setNewText(StringBuffer newBuffer) {
- if (Logger.isLogEnabled()) {
- Logger.log("new text: '" + Logger.encode(newBuffer.toString()) + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- newText = newBuffer;
-
- // When continuous output is being processed by the Terminal view code, it
- // consumes nearly 100% of the CPU. This fixes that. If this method is called
- // too frequently, we explicitly sleep for a short time so that the thread
- // executing this function (which is the thread reading from the socket or
- // serial port) doesn't consume 100% of the CPU. Without this code, the
- // Workbench GUI is practically hung when there is continuous output in the
- // Terminal view.
-
- long CurrentTime = System.currentTimeMillis();
-
- if (CurrentTime - LastNewOutputTime < 250 && newBuffer.length() > 10) {
- try {
- Thread.sleep(50);
- } catch (InterruptedException ex) {
- // Ignore.
- }
- }
-
- LastNewOutputTime = CurrentTime;
- }
-
- /**
- * This method erases all text from the Terminal view. This method is called
- * when the user chooses "Clear all" from the Terminal view context menu, so
- * we need to serialize this method with methods {@link #run()} and {@link
- * #setNewText(StringBuffer)}.
- */
- public synchronized void clearTerminal() {
- Logger.log("entered"); //$NON-NLS-1$
- text.setText(""); //$NON-NLS-1$
- cursorColumn = 0;
- }
-
- /**
- * This method is called when the user changes the Terminal view's font. We
- * attempt to recompute the pixel width of the new font's characters and fix
- * the terminal's dimensions. This method must be synchronized to prevent it
- * from executing at the same time as run(), which displays new text. We
- * can't have the fields that represent the dimensions of the terminal
- * changing while we are rendering text.
- */
- public synchronized void fontChanged() {
- Logger.log("entered"); //$NON-NLS-1$
-
- characterPixelWidth = 0;
-
- if (text != null)
- adjustTerminalDimensions();
- }
-
- /**
- * This method executes in the Display thread to process data received from
- * the remote host by classes {@link TelnetConnection} and {@link
- * SerialPortHandler}. This method must not execute at the same time
- * as methods {@link #setNewText(StringBuffer)} and {@link #clearTerminal()}.
- * <p>
- *
- * IMPORTANT: This method must be called in strict alternation with method
- * {@link #setNewText(StringBuffer)}.
- * <p>
- */
- public synchronized void run() {
- Logger.log("entered"); //$NON-NLS-1$
-
- try {
- // This method can be called just after the user closes the view, so we
- // make sure not to cause a widget-disposed exception.
-
- if (text != null && text.isDisposed())
- return;
-
- // If the status bar is showing "OPENED", change it to "CONNECTED".
-
- if (terminal.getState()==TerminalState.OPENED) {
- // TODO Why????
- terminal.setState(TerminalState.CONNECTED);
- }
-
- // Find the width and height of the terminal, and resize it to display an
- // integral number of lines and columns.
-
- adjustTerminalDimensions();
-
- // Restore the caret offset, process and display the new text, then save
- // the caret offset. See the documentation for field caretOffset for
- // details.
-
- // ISSUE: Is this causing the scroll-to-bottom-on-output behavior?
-
- text.setCaretOffset(caretOffset);
-
- processNewText();
-
- caretOffset = text.getCaretOffset();
- } catch (Exception ex) {
- Logger.logException(ex);
- }
- }
-
- /**
- * This method scans the newly received text, processing ANSI control
- * characters and escape sequences and displaying normal text.
- */
- protected void processNewText() {
- Logger.log("entered"); //$NON-NLS-1$
-
- // Stop the StyledText widget from redrawing while we manipulate its contents.
- // This helps display performance.
-
- text.setRedraw(false);
-
- // Scan the newly received text.
-
- characterIndex = 0;
-
- while (characterIndex < newText.length()) {
- char character = newText.charAt(characterIndex);
-
- switch (ansiState) {
- case ANSISTATE_INITIAL:
- switch (character) {
- case '\u0000':
- break; // NUL character. Ignore it.
-
- case '\u0007':
- processBEL(); // BEL (Control-G)
- break;
-
- case '\b':
- processBackspace(); // Backspace
- break;
-
- case '\t':
- processTab(); // Tab.
- break;
-
- case '\n':
- processNewline(); // Newline (Control-J)
- break;
-
- case '\r':
- processCarriageReturn(); // Carriage Return (Control-M)
- break;
-
- case '\u001b':
- ansiState = ANSISTATE_ESCAPE; // Escape.
- break;
-
- default:
- processNonControlCharacters();
- break;
- }
- break;
-
- case ANSISTATE_ESCAPE:
- // We've seen an escape character. Here, we process the character
- // immediately following the escape.
-
- switch (character) {
- case '[':
- ansiState = ANSISTATE_EXPECTING_PARAMETER_OR_COMMAND;
- nextAnsiParameter = 0;
-
- // Erase the parameter strings in preparation for optional
- // parameter characters.
-
- for (int i = 0; i < ansiParameters.length; ++i) {
- ansiParameters[i].delete(0, ansiParameters[i].length());
- }
- break;
-
- case ']':
- ansiState = ANSISTATE_EXPECTING_OS_COMMAND;
- ansiOsCommand.delete(0, ansiOsCommand.length());
- break;
-
- case '7':
- // Save cursor position and character attributes
-
- ansiState = ANSISTATE_INITIAL;
- savedCursorLine = absoluteCursorLine();
- savedCursorColumn = cursorColumn;
- break;
-
- case '8':
- // Restore cursor and attributes to previously saved
- // position
-
- ansiState = ANSISTATE_INITIAL;
- moveCursor(savedCursorLine, savedCursorColumn);
- break;
-
- default:
- Logger
- .log("Unsupported escape sequence: escape '" + character + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- ansiState = ANSISTATE_INITIAL;
- break;
- }
- break;
-
- case ANSISTATE_EXPECTING_PARAMETER_OR_COMMAND:
- // Parameters can appear after the '[' in an escape sequence, but they
- // are optional.
-
- if (character == '@' || (character >= 'A' && character <= 'Z')
- || (character >= 'a' && character <= 'z')) {
- ansiState = ANSISTATE_INITIAL;
- processAnsiCommandCharacter(character);
- } else {
- processAnsiParameterCharacter(character);
- }
- break;
-
- case ANSISTATE_EXPECTING_OS_COMMAND:
- // A BEL (\u0007) character marks the end of the OSC sequence.
-
- if (character == '\u0007') {
- ansiState = ANSISTATE_INITIAL;
- processAnsiOsCommand();
- } else {
- ansiOsCommand.append(character);
- }
- break;
-
- default:
- // This should never happen! If it does happen, it means there is a
- // bug in the FSA. For robustness, we return to the initial
- // state.
-
- Logger.log("INVALID ANSI FSA STATE: " + ansiState); //$NON-NLS-1$
- ansiState = ANSISTATE_INITIAL;
- break;
- }
-
- ++characterIndex;
- }
-
- // Allow the StyledText widget to redraw itself.
-
- text.setRedraw(true);
- }
-
- /**
- * This method is called when we have parsed an OS Command escape sequence.
- * The only one we support is "\e]0;...\u0007", which sets the terminal
- * title.
- */
- protected void processAnsiOsCommand() {
- if (ansiOsCommand.charAt(0) != '0' || ansiOsCommand.charAt(1) != ';') {
- Logger
- .log("Ignoring unsupported ANSI OSC sequence: '" + ansiOsCommand + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- terminal.setTerminalTitle(ansiOsCommand.substring(2));
- }
-
- /**
- * This method dispatches control to various processing methods based on the
- * command character found in the most recently received ANSI escape
- * sequence. This method only handles command characters that follow the
- * ANSI standard Control Sequence Introducer (CSI), which is "\e[...", where
- * "..." is an optional ';'-separated sequence of numeric parameters.
- * <p>
- */
- protected void processAnsiCommandCharacter(char ansiCommandCharacter) {
- // If the width or height of the terminal is ridiculously small (one line or
- // column or less), don't even try to process the escape sequence. This avoids
- // throwing an exception (SPR 107450). The display will be messed up, but what
- // did you user expect by making the terminal so small?
-
- if (heightInLines <= 1 || widthInColumns <= 1)
- return;
-
- switch (ansiCommandCharacter) {
- case '@':
- // Insert character(s).
- processAnsiCommand_atsign();
- break;
-
- case 'A':
- // Move cursor up N lines (default 1).
- processAnsiCommand_A();
- break;
-
- case 'B':
- // Move cursor down N lines (default 1).
- processAnsiCommand_B();
- break;
-
- case 'C':
- // Move cursor forward N columns (default 1).
- processAnsiCommand_C();
- break;
-
- case 'D':
- // Move cursor backward N columns (default 1).
- processAnsiCommand_D();
- break;
-
- case 'E':
- // Move cursor to first column of Nth next line (default 1).
- processAnsiCommand_E();
- break;
-
- case 'F':
- // Move cursor to first column of Nth previous line (default 1).
- processAnsiCommand_F();
- break;
-
- case 'G':
- // Move to column N of current line (default 1).
- processAnsiCommand_G();
- break;
-
- case 'H':
- // Set cursor Position.
- processAnsiCommand_H();
- break;
-
- case 'J':
- // Erase part or all of display. Cursor does not move.
- processAnsiCommand_J();
- break;
-
- case 'K':
- // Erase in line (cursor does not move).
- processAnsiCommand_K();
- break;
-
- case 'L':
- // Insert line(s) (current line moves down).
- processAnsiCommand_L();
- break;
-
- case 'M':
- // Delete line(s).
- processAnsiCommand_M();
- break;
-
- case 'm':
- // Set Graphics Rendition (SGR).
- processAnsiCommand_m();
- break;
-
- case 'n':
- // Device Status Report (DSR).
- processAnsiCommand_n();
- break;
-
- case 'P':
- // Delete character(s).
- processAnsiCommand_P();
- break;
-
- case 'S':
- // Scroll up.
- // Emacs, vi, and GNU readline don't seem to use this command, so we ignore
- // it for now.
- break;
-
- case 'T':
- // Scroll down.
- // Emacs, vi, and GNU readline don't seem to use this command, so we ignore
- // it for now.
- break;
-
- case 'X':
- // Erase character.
- // Emacs, vi, and GNU readline don't seem to use this command, so we ignore
- // it for now.
- break;
-
- case 'Z':
- // Cursor back tab.
- // Emacs, vi, and GNU readline don't seem to use this command, so we ignore
- // it for now.
- break;
-
- default:
- Logger.log("Ignoring unsupported ANSI command character: '" + //$NON-NLS-1$
- ansiCommandCharacter + "'"); //$NON-NLS-1$
- break;
- }
- }
-
- /**
- * This method makes room for N characters on the current line at the cursor
- * position. Text under the cursor moves right without wrapping at the end
- * of hte line.
- */
- protected void processAnsiCommand_atsign() {
- int charactersToInsert = getAnsiParameter(0);
- int caretOffset = text.getCaretOffset();
-
- text.replaceTextRange(caretOffset, 0, generateString(' ',
- charactersToInsert));
-
- // If the current line extends past the right edge of the screen, delete the
- // characters beyond the rightmost visible column.
-
- int currentLineAbsolute = absoluteCursorLine();
- int currentLineStartOffset = text.getOffsetAtLine(currentLineAbsolute);
- int currentLineEndOffset;
-
- if (currentLineAbsolute == text.getLineCount() - 1) {
- // The cursor is on the bottommost line of text.
-
- currentLineEndOffset = text.getCharCount();
- } else {
- // The cursor is not on the bottommost line of text.
-
- currentLineEndOffset = text
- .getOffsetAtLine(currentLineAbsolute + 1) - 1;
- }
-
- if (currentLineEndOffset - currentLineStartOffset > widthInColumns) {
- int charactersToDelete = currentLineEndOffset
- - currentLineStartOffset - widthInColumns;
-
- text.replaceTextRange(currentLineStartOffset + widthInColumns,
- charactersToDelete, ""); //$NON-NLS-1$
- }
-
- // Is this necessary?
-
- text.setCaretOffset(caretOffset);
- }
-
- /**
- * This method moves the cursor up by the number of lines specified by the
- * escape sequence parameter (default 1).
- */
- protected void processAnsiCommand_A() {
- moveCursorUp(getAnsiParameter(0));
- }
-
- /**
- * This method moves the cursor down by the number of lines specified by the
- * escape sequence parameter (default 1).
- */
- protected void processAnsiCommand_B() {
- moveCursorDown(getAnsiParameter(0));
- }
-
- /**
- * This method moves the cursor forward by the number of columns specified
- * by the escape sequence parameter (default 1).
- */
- protected void processAnsiCommand_C() {
- moveCursorForward(getAnsiParameter(0));
- }
-
- /**
- * This method moves the cursor backward by the number of columns specified
- * by the escape sequence parameter (default 1).
- */
- protected void processAnsiCommand_D() {
- moveCursorBackward(getAnsiParameter(0));
- }
-
- /**
- * This method moves the cursor to the first column of the Nth next line,
- * where N is specified by the ANSI parameter (default 1).
- */
- protected void processAnsiCommand_E() {
- int linesToMove = getAnsiParameter(0);
-
- moveCursor(relativeCursorLine() + linesToMove, 0);
- }
-
- /**
- * This method moves the cursor to the first column of the Nth previous
- * line, where N is specified by the ANSI parameter (default 1).
- */
- protected void processAnsiCommand_F() {
- int linesToMove = getAnsiParameter(0);
-
- moveCursor(relativeCursorLine() - linesToMove, 0);
- }
-
- /**
- * This method moves the cursor within the current line to the column
- * specified by the ANSI parameter (default is column 1).
- */
- protected void processAnsiCommand_G() {
- int targetColumn = 1;
-
- if (ansiParameters[0].length() > 0)
- targetColumn = getAnsiParameter(0) - 1;
-
- moveCursor(relativeCursorLine(), targetColumn);
- }
-
- /**
- * This method sets the cursor to a position specified by the escape
- * sequence parameters (default is the upper left corner of the screen).
- */
- protected void processAnsiCommand_H() {
- moveCursor(getAnsiParameter(0) - 1, getAnsiParameter(1) - 1);
- }
-
- /**
- * This method deletes some (or all) of the text on the screen without
- * moving the cursor.
- */
- protected void processAnsiCommand_J() {
- int ansiParameter;
-
- if (ansiParameters[0].length() == 0)
- ansiParameter = 0;
- else
- ansiParameter = getAnsiParameter(0);
-
- switch (ansiParameter) {
- case 0:
- // Erase from current position to end of screen (inclusive).
-
- int caretOffset = text.getCaretOffset();
-
- text.replaceTextRange(caretOffset, text.getCharCount()
- - caretOffset, generateString('\n', heightInLines
- - relativeCursorLine() - 1));
-
- // The above call moves the caret to the end of the text, so restore its
- // position.
-
- text.setCaretOffset(caretOffset);
- break;
-
- case 1:
- // Erase from beginning to current position (inclusive).
-
- int currentRelativeLineNumber = relativeCursorLine();
- int topmostScreenLineStartOffset = text
- .getOffsetAtLine(absoluteLine(0));
-
- text.replaceTextRange(topmostScreenLineStartOffset, text
- .getCaretOffset()
- - topmostScreenLineStartOffset, generateString('\n',
- currentRelativeLineNumber)
- + generateString(' ', cursorColumn));
-
- text.setCaretOffset(topmostScreenLineStartOffset
- + currentRelativeLineNumber + cursorColumn);
- break;
-
- case 2:
- // Erase entire display.
-
- int currentLineNumber = relativeCursorLine();
- topmostScreenLineStartOffset = text
- .getOffsetAtLine(absoluteLine(0));
-
- text.replaceTextRange(topmostScreenLineStartOffset, text
- .getCharCount()
- - topmostScreenLineStartOffset, generateString('\n',
- heightInLines - 1));
-
- moveCursor(currentLineNumber, cursorColumn);
- break;
-
- default:
- Logger.log("Unexpected J-command parameter: " + ansiParameter); //$NON-NLS-1$
- break;
- }
- }
-
- /**
- * This method deletes some (or all) of the text in the current line without
- * moving the cursor.
- */
- protected void processAnsiCommand_K() {
- int ansiParameter = getAnsiParameter(0);
- int originalCaretOffset = text.getCaretOffset();
-
- switch (ansiParameter) {
- case 0:
- // Erase from beginning to current position (inclusive).
-
- int currentLineStartOffset = text
- .getOffsetAtLine(absoluteCursorLine());
-
- text.replaceTextRange(currentLineStartOffset, cursorColumn,
- generateString(' ', cursorColumn));
- break;
-
- case 1:
- // Erase from current position to end (inclusive).
-
- int caretOffset = text.getCaretOffset();
-
- if (absoluteCursorLine() == text.getLineCount() - 1) {
- text.replaceTextRange(caretOffset, text.getCharCount()
- - caretOffset, ""); //$NON-NLS-1$
- } else {
- int nextLineStartOffset = text
- .getOffsetAtLine(absoluteCursorLine() + 1);
-
- text.replaceTextRange(caretOffset, nextLineStartOffset
- - caretOffset - 1, ""); //$NON-NLS-1$
- }
- break;
-
- case 2:
- // Erase entire line.
-
- currentLineStartOffset = text.getOffsetAtLine(absoluteCursorLine());
-
- if (absoluteCursorLine() == text.getLineCount() - 1) {
- // The cursor is on the bottommost line of text. Replace its contents
- // with enough spaces to leave the cursor in the current column.
-
- text.replaceTextRange(currentLineStartOffset, text
- .getCharCount()
- - currentLineStartOffset, generateString(' ',
- cursorColumn));
- } else {
- // The cursor is not on the bottommost line of text. Replace the
- // current line's contents with enough spaces to leave the cursor in
- // the current column.
-
- int nextLineStartOffset = text
- .getOffsetAtLine(absoluteCursorLine() + 1);
-
- text.replaceTextRange(currentLineStartOffset,
- nextLineStartOffset - currentLineStartOffset - 1,
- generateString(' ', cursorColumn));
- }
- break;
-
- default:
- Logger.log("Unexpected K-command parameter: " + ansiParameter); //$NON-NLS-1$
- break;
- }
-
- // There is some undocumented strangeness with method
- // StyledText.replaceTextRange() that requires us to manually reposition the
- // caret after calling that method. If we don't do this, the caret sometimes
- // moves to the very end of the text when deleting text within a line.
-
- text.setCaretOffset(originalCaretOffset);
- }
-
- /**
- * Insert one or more blank lines. The current line of text moves down. Text
- * that falls off the bottom of the screen is deleted.
- */
- protected void processAnsiCommand_L() {
- int linesToInsert = getAnsiParameter(0);
-
- int currentLineStartOffset = text.getOffsetAtLine(absoluteCursorLine());
-
- // Compute how many of the bottommost lines of text to delete. This is
- // necessary if those lines are being pushed off the bottom of the screen by
- // the insertion of the blank lines.
-
- int totalLines = text.getLineCount();
- int linesToDelete = -1;
-
- if (heightInLines <= totalLines) {
- // There are more lines of text than are displayed, so delete as many lines
- // at the end as we insert in the middle.
-
- linesToDelete = linesToInsert;
- } else {
- // There are fewer lines of text than the size of the terminal window, so
- // compute how many lines will be pushed off the end of the screen by the
- // insertion. NOTE: It is possible that we may not have to delete any
- // lines at all, which will leave linesToDelete set to -1.
-
- if (totalLines + linesToInsert > heightInLines) {
- linesToDelete = (totalLines + linesToInsert) - heightInLines;
- }
- }
-
- if (linesToDelete != -1) {
- // Delete the bottomost linesToInsert lines plus the newline on the line
- // immediately above the first line to be deleted.
-
- int firstLineToDeleteStartOffset = text.getOffsetAtLine(totalLines
- - linesToDelete);
-
- text.replaceTextRange(firstLineToDeleteStartOffset - 1, text
- .getCharCount()
- - firstLineToDeleteStartOffset + 1, ""); //$NON-NLS-1$
- }
-
- // Insert the new blank lines, leaving the cursor on the topmost of the new
- // blank lines.
-
- int totalCharacters = text.getCharCount();
-
- if (currentLineStartOffset > totalCharacters) {
- // We are inserting the blank lines at the very end of the text, so
- // currentLineStartOffset is now out of range. It will be be in range
- // again after these newlines are appended.
-
- text.replaceTextRange(totalCharacters, 0, generateString('\n',
- linesToInsert));
- } else {
- // We are inserting the blank lines in the middle of the text, so
- // currentLineStartOffset is not out of range.
-
- text.replaceTextRange(currentLineStartOffset, 0, generateString(
- '\n', linesToInsert));
- }
-
- text.setCaretOffset(currentLineStartOffset);
- }
-
- /**
- * Delete one or more lines of text. Any lines below the deleted lines move
- * up, which we implmement by appending newlines to the end of the text.
- */
- protected void processAnsiCommand_M() {
- int totalLines = text.getLineCount();
- int linesToDelete = getAnsiParameter(0);
- int currentLineAbsolute = absoluteCursorLine();
- int currentLineStartOffset = text.getOffsetAtLine(currentLineAbsolute);
-
- // Compute the offset of the character after the lines to be deleted. This
- // might be the end of the text.
-
- if (linesToDelete >= totalLines - currentLineAbsolute) {
- // We are deleting all the lines to the bottom of the text. Replace them
- // with blank lines.
-
- text.replaceTextRange(currentLineStartOffset, text.getCharCount()
- - currentLineStartOffset, generateString('\n', totalLines
- - currentLineAbsolute - 1));
- } else {
- // Delete the next linesToDelete lines.
-
- int firstUndeletedLineStartOffset = text
- .getOffsetAtLine(currentLineAbsolute + linesToDelete);
-
- text.replaceTextRange(currentLineStartOffset,
- firstUndeletedLineStartOffset - currentLineStartOffset, ""); //$NON-NLS-1$
-
- // Add an equal number of blank lines to the end of the text.
-
- text.replaceTextRange(text.getCharCount(), 0, generateString('\n',
- linesToDelete));
- }
-
- text.setCaretOffset(currentLineStartOffset);
- }
-
- /**
- * This method sets a new graphics rendition mode, such as
- * foreground/background color, bold/normal text, and reverse video.
- */
- protected void processAnsiCommand_m() {
- if (ansiParameters[0].length() == 0) {
- // This a special case: when no ANSI parameter is specified, act like a
- // single parameter equal to 0 was specified.
-
- ansiParameters[0].append('0');
- }
-
- // There are a non-zero number of ANSI parameters. Process each one in
- // order.
-
- int totalParameters = ansiParameters.length;
- int parameterIndex = 0;
-
- while (parameterIndex < totalParameters
- && ansiParameters[parameterIndex].length() > 0) {
- int ansiParameter = getAnsiParameter(parameterIndex);
-
- switch (ansiParameter) {
- case 0:
- // Reset all graphics modes.
- currentForegroundColor = text.getForeground();
- currentBackgroundColor = text.getBackground();
- currentFontStyle = SWT.NORMAL;
- reverseVideo = false;
- break;
-
- case 1:
- currentFontStyle = SWT.BOLD; // Turn on bold.
- break;
-
- case 7:
- reverseVideo = true; // Reverse video.
- break;
-
- case 10: // Set primary font. Ignored.
- break;
-
- case 22:
- currentFontStyle = SWT.NORMAL; // Cancel bold or dim attributes
- // only.
- break;
-
- case 27:
- reverseVideo = false; // Cancel reverse video attribute only.
- break;
-
- case 30:
- currentForegroundColor = BLACK; // Foreground is black.
- break;
-
- case 31:
- currentForegroundColor = RED; // Foreground is red.
- break;
-
- case 32:
- currentForegroundColor = GREEN; // Foreground is green.
- break;
-
- case 33:
- currentForegroundColor = YELLOW; // Foreground is yellow.
- break;
-
- case 34:
- currentForegroundColor = BLUE; // Foreground is blue.
- break;
-
- case 35:
- currentForegroundColor = MAGENTA; // Foreground is magenta.
- break;
-
- case 36:
- currentForegroundColor = CYAN; // Foreground is cyan.
- break;
-
- case 37:
- currentForegroundColor = text.getForeground(); // Foreground is
- // white.
- break;
-
- case 40:
- currentBackgroundColor = text.getBackground(); // Background is
- // black.
- break;
-
- case 41:
- currentBackgroundColor = RED; // Background is red.
- break;
-
- case 42:
- currentBackgroundColor = GREEN; // Background is green.
- break;
-
- case 43:
- currentBackgroundColor = YELLOW; // Background is yellow.
- break;
-
- case 44:
- currentBackgroundColor = BLUE; // Background is blue.
- break;
-
- case 45:
- currentBackgroundColor = MAGENTA; // Background is magenta.
- break;
-
- case 46:
- currentBackgroundColor = CYAN; // Background is cyan.
- break;
-
- case 47:
- currentBackgroundColor = WHITE; // Background is white.
- break;
-
- default:
- Logger
- .log("Unsupported graphics rendition parameter: " + ansiParameter); //$NON-NLS-1$
- break;
- }
-
- ++parameterIndex;
- }
- }
-
- /**
- * This method responds to an ANSI Device Status Report (DSR) command from
- * the remote endpoint requesting the cursor position. Requests for other
- * kinds of status are ignored.
- */
- protected void processAnsiCommand_n() {
- // Do nothing if the numeric parameter was not 6 (which means report cursor
- // position).
-
- if (getAnsiParameter(0) != 6)
- return;
-
- // Send the ANSI cursor position (which is 1-based) to the remote endpoint.
-
- String positionReport = "\u001b[" + (relativeCursorLine() + 1) + ";" + //$NON-NLS-1$ //$NON-NLS-2$
- (cursorColumn + 1) + "R"; //$NON-NLS-1$
-
- OutputStreamWriter streamWriter = new OutputStreamWriter(terminal
- .getOutputStream(), Charset.forName("ISO-8859-1")); //$NON-NLS-1$
-
- try {
- streamWriter.write(positionReport, 0, positionReport.length());
- streamWriter.flush();
- } catch (IOException ex) {
- Logger.log("Caught IOException!"); //$NON-NLS-1$
- }
- }
-
- /**
- * Deletes one or more characters starting at the current cursor position.
- * Characters on the same line and to the right of the deleted characters
- * move left. If there are no characters on the current line at or to the
- * right of the cursor column, no text is deleted.
- */
- protected void processAnsiCommand_P() {
- int currentLineEndOffset;
- int currentLineAbsolute = absoluteCursorLine();
-
- if (currentLineAbsolute == text.getLineCount() - 1) {
- // The cursor is on the bottommost line of text.
-
- currentLineEndOffset = text.getCharCount();
- } else {
- // The cursor is not on the bottommost line of text.
-
- currentLineEndOffset = text
- .getOffsetAtLine(currentLineAbsolute + 1) - 1;
- }
-
- int caretOffset = text.getCaretOffset();
- int remainingCharactersOnLine = currentLineEndOffset - caretOffset;
-
- if (remainingCharactersOnLine > 0) {
- // There are characters that can be deleted.
-
- int charactersToDelete = getAnsiParameter(0);
-
- if (charactersToDelete > remainingCharactersOnLine)
- charactersToDelete = remainingCharactersOnLine;
-
- text.replaceTextRange(caretOffset, charactersToDelete, ""); //$NON-NLS-1$
- text.setCaretOffset(caretOffset);
- }
- }
-
- /**
- * This method returns one of the numeric ANSI parameters received in the
- * most recent escape sequence.
- *
- * @return The <i>parameterIndex</i>th numeric ANSI parameter or -1 if the
- * index is out of range.
- */
- protected int getAnsiParameter(int parameterIndex) {
- if (parameterIndex < 0 || parameterIndex >= ansiParameters.length) {
- // This should never happen.
- return -1;
- }
-
- String parameter = ansiParameters[parameterIndex].toString();
-
- if (parameter.length() == 0)
- return 1;
-
- int parameterValue = 1;
-
- // Don't trust the remote endpoint to send well formed numeric
- // parameters.
-
- try {
- parameterValue = Integer.parseInt(parameter);
- } catch (NumberFormatException ex) {
- parameterValue = 1;
- }
-
- return parameterValue;
- }
-
- /**
- * This method processes a single parameter character in an ANSI escape
- * sequence. Paramters are the (optional) characters between the leading
- * "\e[" and the command character in an escape sequence (e.g., in the
- * escape sequence "\e[20;10H", the paramter characters are "20;10").
- * Parameters are integers separated by one or more ';'s.
- */
- protected void processAnsiParameterCharacter(char ch) {
- if (ch == ';') {
- ++nextAnsiParameter;
- } else {
- if (nextAnsiParameter < ansiParameters.length)
- ansiParameters[nextAnsiParameter].append(ch);
- }
- }
-
- /**
- * This method processes a contiguous sequence of non-control characters.
- * This is a performance optimization, so that we don't have to insert or
- * append each non-control character individually to the StyledText widget.
- * A non-control character is any character that passes the condition in the
- * below while loop.
- */
- protected void processNonControlCharacters() {
- int firstNonControlCharacterIndex = characterIndex;
- int newTextLength = newText.length();
- char character = newText.charAt(characterIndex);
-
- // Identify a contiguous sequence of non-control characters, starting at
- // firstNonControlCharacterIndex in newText.
-
- while (character != '\u0000' && character != '\b' && character != '\t'
- && character != '\u0007' && character != '\n'
- && character != '\r' && character != '\u001b') {
- ++characterIndex;
-
- if (characterIndex >= newTextLength)
- break;
-
- character = newText.charAt(characterIndex);
- }
-
- // Move characterIndex back by one character because it gets incremented at the
- // bottom of the loop in processNewText().
-
- --characterIndex;
-
- int preDisplayCaretOffset = text.getCaretOffset();
-
- // Now insert the sequence of non-control characters in the StyledText widget
- // at the location of the cursor.
-
- displayNewText(firstNonControlCharacterIndex, characterIndex);
-
- // If any one of the current font style, foreground color or background color
- // differs from the defaults, apply the current style to the newly displayed
- // text. Since this method is only called for a contiguous sequence of
- // non-control characters, the current style applies to the entire
- // sequence of characters.
-
- if (!currentForegroundColor.equals(text.getForeground())
- || !currentBackgroundColor.equals(text.getBackground())
- || currentFontStyle != SWT.NORMAL || reverseVideo == true) {
- StyleRange style = new StyleRange(preDisplayCaretOffset, text
- .getCaretOffset()
- - preDisplayCaretOffset,
- reverseVideo ? currentBackgroundColor
- : currentForegroundColor,
- reverseVideo ? currentForegroundColor
- : currentBackgroundColor, currentFontStyle);
-
- text.setStyleRange(style);
- }
- }
-
- /**
- * This method displays a subset of the newly-received text in the Terminal
- * view, wrapping text at the right edge of the screen and overwriting text
- * when the cursor is not at the very end of the screen's text.
- * <p>
- *
- * There are never any ANSI control characters or escape sequences in the
- * text being displayed by this method (this includes newlines, carriage
- * returns, and tabs).
- * <p>
- *
- * @param first
- * The index (within newText) of the first character to display.
- * @param last
- * The index (within newText) of the last character to display.
- */
- protected void displayNewText(int first, int last) {
- if (text.getCaretOffset() == text.getCharCount()) {
- // The cursor is at the very end of the terminal's text, so we append the
- // new text to the StyledText widget.
-
- displayNewTextByAppending(first, last);
- } else {
- // The cursor is not at the end of the screen's text, so we have to
- // overwrite existing text.
-
- displayNewTextByOverwriting(first, last);
- }
- }
-
- /**
- * This method displays new text by appending it to the end of the existing
- * text, wrapping text that extends past the right edge of the screen.
- * <p>
- *
- * There are never any ANSI control characters or escape sequences in the
- * text being displayed by this method (this includes newlines, carriage
- * returns, and tabs).
- * <p>
- *
- * @param first
- * The index (within newText) of the first character to display.
- * @param last
- * The index (within newText) of the last character to display.
- */
- protected void displayNewTextByAppending(int first, int last) {
- int numCharsToOutput = last - first + 1;
- int availableSpaceOnLine = widthInColumns - cursorColumn;
-
- if (numCharsToOutput >= availableSpaceOnLine) {
- // We need to wrap the text, because it's longer than the available
- // space on the current line. First, appends as many characters as
- // will fit in the space remaining on the current line.
- //
- // NOTE: We don't line wrap the text in this method the same way we line
- // wrap the text in method displayNewTextByOverwriting(), but this is by far
- // the most common case, and it has to run the fastest.
-
- text.append(newText.substring(first, first + availableSpaceOnLine));
- first += availableSpaceOnLine;
-
- processCarriageReturn();
- processNewline();
-
- while (first <= last) {
- availableSpaceOnLine = widthInColumns;
-
- if (availableSpaceOnLine > last - first + 1) {
- text.append(newText.substring(first, last + 1));
- cursorColumn = last - first + 1;
- break;
- } else {
- text.append(newText.substring(first, first
- + availableSpaceOnLine));
- first += availableSpaceOnLine;
-
- processCarriageReturn();
- processNewline();
- }
- }
- } else {
- // We don't need to wrap the text.
-
- text.append(newText.substring(first, last + 1));
- cursorColumn += last - first + 1;
- }
- }
-
- /**
- * This method displays new text by overwriting existing text, wrapping text
- * that extends past the right edge of the screen.
- * <p>
- *
- * There are never any ANSI control characters or escape sequences in the
- * text being displayed by this method (this includes newlines, carriage
- * returns, and tabs).
- * <p>
- *
- * @param first
- * The index (within newText) of the first character to display.
- * @param last
- * The index (within newText) of the last character to display.
- */
- protected void displayNewTextByOverwriting(int first, int last) {
- // First, break new text into segments, based on where it needs to line wrap,
- // so that each segment contains text that will appear on a separate
- // line.
-
- List textSegments = new ArrayList(100);
-
- int availableSpaceOnLine = widthInColumns - cursorColumn;
-
- while (first <= last) {
- String segment;
-
- if (last - first + 1 > availableSpaceOnLine)
- segment = newText
- .substring(first, first + availableSpaceOnLine);
- else
- segment = newText.substring(first, last + 1);
-
- textSegments.add(segment);
-
- first += availableSpaceOnLine;
- availableSpaceOnLine = widthInColumns;
- }
-
- // Next, for each segment, if the cursor is at the end of the text, append the
- // segment along with a newline character. If the cursor is not at the end of
- // the text, replace the next N characters starting at the cursor position with
- // the segment, where N is the minimum of the length of the segment or the
- // length of the rest of the current line.
-
- Iterator iter = textSegments.iterator();
-
- while (iter.hasNext()) {
- String segment = (String) iter.next();
- int caretOffset = text.getCaretOffset();
-
- if (caretOffset == text.getCharCount()) {
- // The cursor is at the end of the text, so just append the current
- // segement along with a newline.
-
- text.append(segment);
-
- // If there is another segment to display, move the cursor to a new
- // line.
-
- if (iter.hasNext()) {
- processCarriageReturn();
- processNewline();
- }
- } else {
- // The cursor is not at the end of the text, so replace some or all of
- // the text following the cursor on the current line with the current
- // segment.
-
- int numCharactersAfterCursorOnLine;
-
- if (absoluteCursorLine() == text.getLineCount() - 1) {
- // The cursor is on the last line of text.
- numCharactersAfterCursorOnLine = text.getCharCount()
- - caretOffset;
- } else {
- // The cursor is not on the last line of text.
- numCharactersAfterCursorOnLine = text
- .getOffsetAtLine(absoluteCursorLine() + 1)
- - caretOffset - 1;
- }
-
- int segmentLength = segment.length();
- int numCharactersToReplace;
-
- if (segmentLength < numCharactersAfterCursorOnLine)
- numCharactersToReplace = segmentLength;
- else
- numCharactersToReplace = numCharactersAfterCursorOnLine;
-
- text.replaceTextRange(caretOffset, numCharactersToReplace,
- segment);
- text.setCaretOffset(caretOffset + segmentLength);
- cursorColumn += segmentLength;
-
- // If there is another segment, move the cursor to the start of
- // the
- // next line.
-
- if (iter.hasNext()) {
- cursorColumn = 0;
- text.setCaretOffset(caretOffset + segmentLength + 1);
- } else {
- // We just inserted the last segment. If the current line is full,
- // wrap the cursor onto a new line.
-
- if (cursorColumn == widthInColumns) {
- processCarriageReturn();
- processNewline();
- }
- }
- }
- }
- }
-
- /**
- * Process a BEL (Control-G) character.
- */
- protected void processBEL() {
- // ISSUE: Is there a better way to make a sound? This is not guaranteed to
- // work on all platforms.
- // TODO
- java.awt.Toolkit.getDefaultToolkit().beep();
- }
-
- /**
- * Process a backspace (Control-H) character.
- */
- protected void processBackspace() {
- moveCursorBackward(1);
- }
-
- /**
- * Process a tab (Control-I) character. We don't insert a tab character into
- * the StyledText widget. Instead, we move the cursor forward to the next
- * tab stop, without altering any of the text. Tab stops are every 8
- * columns. The cursor will never move past the rightmost column.
- */
- protected void processTab() {
- moveCursorForward(8 - (cursorColumn % 8));
- }
-
- /**
- * Process a newline (Control-J) character. A newline (NL) character just
- * moves the cursor to the same column on the next line, creating new lines
- * when the cursor reaches the bottom edge of the terminal. This is
- * counter-intuitive, especially to UNIX programmers who are taught that
- * writing a single NL to a terminal is sufficient to move the cursor to the
- * first column of the next line, as if a carriage return (CR) and a NL were
- * written.
- * <p>
- *
- * UNIX terminals typically display a NL character as a CR followed by a NL
- * because the terminal device typically has the ONLCR attribute bit set
- * (see the termios(4) man page for details), which causes the terminal
- * device driver to translate NL to CR + NL on output. The terminal itself
- * (i.e., a hardware terminal or a terminal emulator, like xterm or this
- * code) _always_ interprets a CR to mean "move the cursor to the beginning
- * of the current line" and a NL to mean "move the cursor to the same column
- * on the next line".
- * <p>
- */
- protected void processNewline() {
- int totalLines = text.getLineCount();
- int currentLineAbsolute = absoluteCursorLine();
-
- if (currentLineAbsolute < totalLines - 1) {
- // The cursor is not on the bottommost line of text, so we move the cursor
- // to the same column on the next line.
-
- // TODO: If we can verify that the next character is a carriage return, we
- // can optimize out the insertion of spaces that moveCursorDown()
- // will do.
-
- moveCursorDown(1);
- } else if (currentLineAbsolute == totalLines - 1) {
- // The cursor is on the bottommost line of text, so we append a newline
- // character to the end of the terminal's text (creating a new line on the
- // screen) and insert cursorColumn spaces.
-
- text.append("\n"); //$NON-NLS-1$
- text.append(generateString(' ', cursorColumn));
- text.setCaretOffset(text.getCharCount());
-
- // We may have scrolled a line off the top of the screen, so check
- // if we
- // need to delete some of the the oldest lines in the scroll buffer.
-
- deleteTopmostLines();
- } else {
- // This should _never_ happen. If it does happen, it is a bug in this
- // algorithm.
-
- Logger.log("SHOULD NOT BE REACHED!"); //$NON-NLS-1$
- }
- }
-
- /**
- * Process a Carriage Return (Control-M).
- */
- protected void processCarriageReturn() {
- // Move the cursor to the beginning of the current line.
-
- text.setCaretOffset(text.getOffsetAtLine(text.getLineAtOffset(text
- .getCaretOffset())));
- cursorColumn = 0;
- }
-
- /**
- * This method computes the width of the terminal in columns and its height
- * in lines, then adjusts the width and height of the view's StyledText
- * widget so that it displays an integral number of lines and columns of
- * text. The adjustment is always to shrink the widget vertically or
- * horizontally, because if the control were to grow, it would be clipped by
- * the edges of the view window (i.e., the view window does not become
- * larger to accommodate its contents becoming larger).
- * <p>
- *
- * This method must be called immediately before each time text is written
- * to the terminal so that we can properly line wrap text. Because it is
- * called so frequently, it must be fast when there is no resizing to be
- * done.
- * <p>
- */
- protected void adjustTerminalDimensions() {
- // Compute how many pixels we need to shrink the StyledText control vertically
- // to make it display an integral number of lines of text.
-
- int linePixelHeight = text.getLineHeight();
- Point textWindowDimensions = text.getSize();
- int verticalPixelsToShrink = textWindowDimensions.y % linePixelHeight;
-
- // Compute the current height of the terminal in lines.
-
- heightInLines = textWindowDimensions.y / linePixelHeight;
-
- // Compute how many pixels we need to shrink the StyledText control to make
- // it display an integral number of columns of text. We can only do this if we
- // know the pixel width of a character in the font used by the StyledText
- // widget.
-
- int horizontalPixelsToShrink = 0;
-
- if (characterPixelWidth == 0)
- computeCharacterPixelWidth();
-
- if (characterPixelWidth != 0) {
- horizontalPixelsToShrink = textWindowDimensions.x
- % characterPixelWidth;
-
- // The width of the StyledText widget that text.getSize() returns includes
- // the space occupied by the vertical scrollbar, so we have to fudge this
- // calculation (by subtracting 3 columns) to account for the presence of
- // the scrollbar. Ugh.
-
- widthInColumns = textWindowDimensions.x / characterPixelWidth - 3;
- }
-
- // If necessary, resize the text widget.
-
- if (verticalPixelsToShrink > 0 || horizontalPixelsToShrink > 0) {
- // Remove this class instance from being a ControlListener on the
- // StyledText widget, because we are about to resize and move the widget,
- // and we don't want this method to be recursively invoked.
-
- text.removeControlListener(this);
-
- // Shrink the StyledText control so that it displays an integral number
- // of lines of text and an integral number of columns of text.
-
- textWindowDimensions.y -= verticalPixelsToShrink;
- textWindowDimensions.x -= horizontalPixelsToShrink;
- text.setSize(textWindowDimensions);
-
- // Move the StyledText control down by the same number of pixels that
- // we just shrank it vertically and right by the same number of pixels that
- // we just shrank it horizontally. This makes the padding appear to the
- // left and top of the widget, which is more visually appealing. This is
- // only necessary because there is no way to programmatically shrink the
- // view itself.
-
- Point textLocation = text.getLocation();
- textLocation.y += verticalPixelsToShrink;
- textLocation.x += horizontalPixelsToShrink;
- text.setLocation(textLocation);
-
- // Restore this class instance as the ControlListener on the StyledText
- // widget so we know when the user resizes the Terminal view.
-
- text.addControlListener(this);
-
- // Make sure the exposed portion of the Composite canvas behind the
- // StyledText control matches the background color of the StyledText
- // control.
-
- Color textBackground = text.getBackground();
- text.getParent().setBackground(textBackground);
-
- // Scroll the StyledText widget to the bottommost position.
-
- text.setSelectionRange(text.getCharCount(), 0);
- text.showSelection();
-
- // Tell the parent object to redraw itself. This erases any partial
- // line of text that might be left visible where the parent object is
- // now exposed. This call only happens if the size needed to be changed,
- // so it should not cause any flicker.
-
- text.getParent().redraw();
- }
-
- // If we are in a TELNET connection and we know the dimensions of the terminal,
- // we give the size information to the TELNET connection object so it can
- // communicate it to the TELNET server. If we are in a serial connection,
- // there is nothing we can do to tell the remote host about the size of the
- // terminal.
-
- ITerminalConnector telnetConnection = terminal.getTerminalConnection();
-
- if (telnetConnection != null && widthInColumns != 0 && heightInLines != 0) {
- telnetConnection.setTerminalSize(widthInColumns, heightInLines);
- }
- }
-
- /**
- * This method computes the the pixel width of a character in the current
- * font. The Font object representing the font in the Terminal view doesn't
- * provide the pixel width of the characters (even for a fixed width font).
- * Instead, we get the pixel coordinates of the upper left corner of the
- * bounding boxes for two adjacent characters on the same line and subtract
- * the X coordinate of one from the X coordinate of the other. Simple, no?
- */
- protected void computeCharacterPixelWidth() {
- // We can't assume there is any text in the terminal, so make sure there's at
- // least two characters.
-
- text.replaceTextRange(0, 0, " "); //$NON-NLS-1$
-
- Point firstCharLocation = text.getLocationAtOffset(0);
- Point secondCharLocation = text.getLocationAtOffset(1);
-
- characterPixelWidth = secondCharLocation.x - firstCharLocation.x;
-
- text.replaceTextRange(0, 3, ""); //$NON-NLS-1$
- }
-
- /**
- * This method deletes as many of the topmost lines of text as needed to
- * keep the total number of lines of text in the Terminal view less than or
- * equal to the limit configured in the preferences. If no limit is
- * configured, this method does nothing.
- */
- protected void deleteTopmostLines() {
- if (!fLimitOutput)
- return;
-
- // Compute the number of lines to delete, but don't do anything if there are
- // fewer lines in the terminal than the height of the terminal in lines.
-
- int totalLineCount = text.getLineCount();
-
- if (totalLineCount <= heightInLines)
- return;
-
- int bufferLineLimit = fBufferLineLimit;
-
- // Don't allow the user to set the buffer line limit to less than the height of
- // the terminal in lines.
-
- if (bufferLineLimit <= heightInLines)
- bufferLineLimit = heightInLines + 1;
-
- int linesToDelete = totalLineCount - bufferLineLimit;
-
- // Delete the lines. A small optimization here: don't do anything unless
- // there's at least 5 lines to delete.
-
- if (linesToDelete >= 5)
- text.replaceTextRange(0, text.getOffsetAtLine(linesToDelete), ""); //$NON-NLS-1$
- }
-
- /**
- * This method returns the absolute line number of the line containing the
- * cursor. The very first line of text (even if it is scrolled off the
- * screen) is absolute line number 0.
- *
- * @return The absolute line number of the line containing the cursor.
- */
- protected int absoluteCursorLine() {
- return text.getLineAtOffset(text.getCaretOffset());
- }
-
- /**
- * This method returns the relative line number of the line comtaining the
- * cursor. The returned line number is relative to the topmost visible line,
- * which has relative line number 0.
- *
- * @return The relative line number of the line containing the cursor.
- */
- protected int relativeCursorLine() {
- int totalLines = text.getLineCount();
-
- if (totalLines <= heightInLines)
- return text.getLineAtOffset(text.getCaretOffset());
-
- return absoluteCursorLine() - totalLines + heightInLines;
- }
-
- /**
- * This method converts a visible line number (i.e., line 0 is the topmost
- * visible line if the terminal is scrolled all the way down, and line
- * number heightInLines - 1 is the bottommost visible line if the terminal
- * is scrolled all the way down) to a line number as known to the StyledText
- * widget.
- */
- protected int absoluteLine(int visibleLineNumber) {
- int totalLines = text.getLineCount();
-
- if (totalLines <= heightInLines)
- return visibleLineNumber;
-
- return totalLines - heightInLines + visibleLineNumber;
- }
-
- /**
- * This method returns a String containing <i>count</i> <i>ch</i>
- * characters.
- *
- * @return A String containing <i>count</i> <i>ch</i> characters.
- */
- protected String generateString(char ch, int count) {
- char[] chars = new char[count];
-
- for (int i = 0; i < chars.length; ++i)
- chars[i] = ch;
-
- return new String(chars);
- }
-
- /**
- * This method moves the cursor to the specified line and column. Parameter
- * <i>targetLine</i> is the line number of a screen line, so it has a
- * minimum value of 0 (the topmost screen line) and a maximum value of
- * heightInLines - 1 (the bottommost screen line). A line does not have to
- * contain any text to move the cursor to any column in that line.
- */
- protected void moveCursor(int targetLine, int targetColumn) {
- // Don't allow out of range target line and column values.
-
- if (targetLine < 0)
- targetLine = 0;
- if (targetLine >= heightInLines)
- targetLine = heightInLines - 1;
-
- if (targetColumn < 0)
- targetColumn = 0;
- if (targetColumn >= widthInColumns)
- targetColumn = widthInColumns - 1;
-
- // First, find out if we need to append newlines to the end of the text. This
- // is necessary if there are fewer total lines of text than visible screen
- // lines and the target line is below the bottommost line of text.
-
- int totalLines = text.getLineCount();
-
- if (totalLines < heightInLines && targetLine >= totalLines)
- text.append(generateString('\n', heightInLines - totalLines));
-
- // Next, compute the offset of the start of the target line.
-
- int targetLineStartOffset = text
- .getOffsetAtLine(absoluteLine(targetLine));
-
- // Next, find how many characters are in the target line. Be careful not to
- // index off the end of the StyledText widget.
-
- int nextLineNumber = absoluteLine(targetLine + 1);
- int targetLineLength;
-
- if (nextLineNumber >= totalLines) {
- // The target line is the bottommost line of text.
-
- targetLineLength = text.getCharCount() - targetLineStartOffset;
- } else {
- // The target line is not the bottommost line of text, so compute its
- // length by subtracting the start offset of the target line from the start
- // offset of the following line.
-
- targetLineLength = text.getOffsetAtLine(nextLineNumber)
- - targetLineStartOffset - 1;
- }
-
- // Find out if we can just move the cursor without having to insert spaces at
- // the end of the target line.
-
- if (targetColumn >= targetLineLength) {
- // The target line is not long enough to just move the cursor, so we have
- // to append spaces to it before positioning the cursor.
-
- int spacesToAppend = targetColumn - targetLineLength;
-
- text.replaceTextRange(targetLineStartOffset + targetLineLength, 0,
- generateString(' ', spacesToAppend));
- }
-
- // Now position the cursor.
-
- text.setCaretOffset(targetLineStartOffset + targetColumn);
-
- cursorColumn = targetColumn;
- }
-
- /**
- * This method moves the cursor down <i>lines</i> lines, but won't move the
- * cursor past the bottom of the screen. This method does not cause any
- * scrolling.
- */
- protected void moveCursorDown(int lines) {
- moveCursor(relativeCursorLine() + lines, cursorColumn);
- }
-
- /**
- * This method moves the cursor up <i>lines</i> lines, but won't move the
- * cursor past the top of the screen. This method does not cause any
- * scrolling.
- */
- protected void moveCursorUp(int lines) {
- moveCursor(relativeCursorLine() - lines, cursorColumn);
- }
-
- /**
- * This method moves the cursor forward <i>columns</i> columns, but won't
- * move the cursor past the right edge of the screen, nor will it move the
- * cursor onto the next line. This method does not cause any scrolling.
- */
- protected void moveCursorForward(int columnsToMove) {
- moveCursor(relativeCursorLine(), cursorColumn + columnsToMove);
- }
-
- /**
- * This method moves the cursor backward <i>columnsToMove</i> columns, but
- * won't move the cursor past the left edge of the screen, nor will it move
- * the cursor onto the previous line. This method does not cause any
- * scrolling.
- */
- protected void moveCursorBackward(int columnsToMove) {
- // We don't call moveCursor() here, because this is optimized for backward
- // cursor motion on a single line.
-
- if (columnsToMove > cursorColumn)
- columnsToMove = cursorColumn;
-
- text.setCaretOffset(text.getCaretOffset() - columnsToMove);
-
- cursorColumn -= columnsToMove;
- }
-
- protected int getBufferLineLimit() {
- return fBufferLineLimit;
- }
-
- protected void setBufferLineLimit(int bufferLineLimit) {
- fBufferLineLimit = bufferLineLimit;
- }
-
- protected boolean isLimitOutput() {
- return fLimitOutput;
- }
-
- protected void setLimitOutput(boolean limitOutput) {
- fLimitOutput = limitOutput;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/ITelnetSettings.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/ITelnetSettings.java
deleted file mode 100644
index 9fdb0e20d..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/ITelnetSettings.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-import org.eclipse.tm.terminal.ISettingsStore;
-
-public interface ITelnetSettings {
- String getHost();
- int getNetworkPort();
- int getTimeout();
- String getStatusString(String strConnected);
- void load(ISettingsStore store);
- void save(ISettingsStore store);
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/NetworkPortMap.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/NetworkPortMap.java
deleted file mode 100644
index ba49179c5..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/NetworkPortMap.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalNetworkPortMap
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class NetworkPortMap {
- public static final String PROP_NAMETGTCONS = "tgtcons"; //$NON-NLS-1$
- public static final String PROP_NAMETELNET = "telnet"; //$NON-NLS-1$
- public static final String PROP_VALUENET = "1233"; //$NON-NLS-1$
- public static final String PROP_VALUETGTCONS = "1232"; //$NON-NLS-1$
- public static final String PROP_VALUETELNET = "23"; //$NON-NLS-1$
-
- String[][] fPortMap=new String[][] {
- // portName, port
- {PROP_NAMETGTCONS, PROP_VALUETGTCONS},
- {PROP_NAMETELNET, PROP_VALUETELNET}
- };
-
- public String getDefaultNetworkPort() {
- return PROP_VALUETELNET;
- }
-
- public String findPortName(String strPort) {
- for (int i = 0; i < fPortMap.length; i++) {
- if(fPortMap[i][1].equals(strPort))
- return fPortMap[i][0];
- }
- return null;
- }
-
- public String findPort(String strPortName) {
- for (int i = 0; i < fPortMap.length; i++) {
- if(fPortMap[i][0].equals(strPortName))
- return fPortMap[i][1];
- }
- return null;
- }
-
- public List getNameTable() {
- List names=new ArrayList();
- for (int i = 0; i < fPortMap.length; i++) {
- names.add(fPortMap[i][0]);
- }
- return names;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetCodes.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetCodes.java
deleted file mode 100644
index 08058c0a7..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetCodes.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 Wind River Systems, Inc. and others.
- * 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:
- * Fran Litterio (Wind River) - initial API and implementation
- * Helmut Haigermoser (Wind River) - repackaged
- * Ted Williams (Wind River) - repackaged into org.eclipse namespace
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-/**
- * This interface defines symbolic constants for numeric TELNET protocol command and
- * option codes. Any class that needs to use these constants must implement this
- * interface. The meanings of these constants are defined in the various TELNET RFCs
- * (RFC 854 to RFC 861, and others).
- */
-interface TelnetCodes
-{
- /** Command code: Subnegotiation End. */
- static final byte TELNET_SE = (byte)240;
-
- /** Command code: No-op. */
- static final byte TELNET_NOP = (byte)241;
-
- /** Command code: Data Mark. */
- static final byte TELNET_DM = (byte)242;
-
- /** Command code: Break. */
- static final byte TELNET_BREAK = (byte)243;
-
- /** Command code: Interrupt Process. */
- static final byte TELNET_IP = (byte)244;
-
- /** Command code: Abort Output. */
- static final byte TELNET_AO = (byte)245;
-
- /** Command code: Are You There. */
- static final byte TELNET_AYT = (byte)246;
-
- /** Command code: Erase Character. */
- static final byte TELNET_EC = (byte)247;
-
- /** Command code: Erase Line. */
- static final byte TELNET_EL = (byte)248;
-
- /** Command code: Go Ahead. */
- static final byte TELNET_GA = (byte)249;
-
- /** Command code: Subnegotiation Begin. */
- static final byte TELNET_SB = (byte)250;
-
- /** Command code: Will. */
- static final byte TELNET_WILL = (byte)251;
-
- /** Command code: Won't. */
- static final byte TELNET_WONT = (byte)252;
-
- /** Command code: Do. */
- static final byte TELNET_DO = (byte)253;
-
- /** Command code: Don't. */
- static final byte TELNET_DONT = (byte)254;
-
- /** Command code: Interpret As Command. */
- static final byte TELNET_IAC = (byte)255;
-
- /** Command code: IS. */
- static final byte TELNET_IS = 0;
-
- /** Command code: SEND. */
- static final byte TELNET_SEND = 1;
-
-
- /** Option code: Transmit Binary option. */
- static final byte TELNET_OPTION_TRANSMIT_BINARY = 0;
-
- /** Option code: Echo option. */
- static final byte TELNET_OPTION_ECHO = 1;
-
- /** Option code: Suppress Go Ahead option. */
- static final byte TELNET_OPTION_SUPPRESS_GA = 3;
-
- /** Option code: Terminal Type */
- static final byte TELNET_OPTION_TERMINAL_TYPE = 24;
-
- /** Option code: Negotitate About Window Size (NAWS) */
- static final byte TELNET_OPTION_NAWS = 31;
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnectWorker.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnectWorker.java
deleted file mode 100644
index 59ee043c5..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnectWorker.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalControl
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-import java.net.ConnectException;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketTimeoutException;
-import java.net.UnknownHostException;
-
-import org.eclipse.tm.terminal.ITerminalControl;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalState;
-
-class TelnetConnectWorker extends Thread {
- private final ITerminalControl fControl;
- private final TelnetConnector fConn;
- protected TelnetConnectWorker(TelnetConnector conn,ITerminalControl control) {
- fControl = control;
- fConn = conn;
- fControl.setState(TerminalState.CONNECTING);
- }
- public void run() {
- try {
- int nTimeout = fConn.getTelnetSettings().getTimeout() * 1000;
- String strHost = fConn.getTelnetSettings().getHost();
- int nPort = fConn.getTelnetSettings().getNetworkPort();
- InetSocketAddress address = new InetSocketAddress(strHost, nPort);
- Socket socket=new Socket();
-
- socket.connect(address, nTimeout);
-
- // This next call causes reads on the socket to see TCP urgent data
- // inline with the rest of the non-urgent data. Without this call, TCP
- // urgent data is silently dropped by Java. This is required for
- // TELNET support, because when the TELNET server sends "IAC DM", the
- // IAC byte is TCP urgent data. If urgent data is silently dropped, we
- // only see the DM, which looks like an ISO Latin-1 '�' character.
-
- socket.setOOBInline(true);
-
- fConn.setSocket(socket);
-
- TelnetConnection connection=new TelnetConnection(fConn, socket);
- socket.setKeepAlive(true);
- fConn.setTelnetConnection(connection);
- connection.start();
- fControl.setState(TerminalState.CONNECTED);
-
- } catch (UnknownHostException ex) {
- String txt="Unknown host: " + ex.getMessage(); //$NON-NLS-1$
- connectFailed(txt,"Unknown host: " + ex.getMessage() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (SocketTimeoutException socketTimeoutException) {
- connectFailed(socketTimeoutException.getMessage(), "Connection Error!\n" + socketTimeoutException.getMessage()); //$NON-NLS-1$
- } catch (ConnectException connectException) {
- connectFailed(connectException.getMessage(),"Connection refused!"); //$NON-NLS-1$
- } catch (Exception exception) {
- Logger.logException(exception);
-
- connectFailed(exception.getMessage(),""); //$NON-NLS-1$
- }
- }
-
- private void connectFailed(String terminalText, String msg) {
- Logger.log(terminalText);
- fControl.displayTextInTerminal(terminalText);
- fConn.cleanSocket();
- fControl.setState(TerminalState.CLOSED);
- fControl.setMsg(msg);
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnection.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnection.java
deleted file mode 100644
index 852f9c4a1..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnection.java
+++ /dev/null
@@ -1,686 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 Wind River Systems, Inc. and others.
- * 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:
- * Fran Litterio (Wind River) - initial API and implementation
- * Helmut Haigermoser (Wind River) - repackaged
- * Ted Williams (Wind River) - repackaged into org.eclipse namespace
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.net.SocketException;
-
-import org.eclipse.tm.terminal.ITerminalControl;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalState;
-
-/**
- * This class encapsulates a TELNET connection to a remote server. It processes
- * incoming TELNET protocol data and generates outbound TELNET protocol data. It
- * also manages two sets of TelnetOption objects: one for the local endpoint and
- * one for the remote endpoint.
- * <p>
- *
- * IMPORTANT: Understanding this code requires understanding the TELNET protocol
- * and TELNET option processing, as defined in the RFCs listed below.
- * <p>
- *
- * @author Fran Litterio (francis.litterio@windriver.com)
- *
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc854.txt">RFC 854</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc855.txt">RFC 855</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc856.txt">RFC 856</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc857.txt">RFC 857</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc858.txt">RFC 858</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc859.txt">RFC 859</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc860.txt">RFC 860</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc861.txt">RFC 861</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc1091.txt">RFC 1091</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc1096.txt">RFC 1096</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc1073.txt">RFC 1073</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc1079.txt">RFC 1079</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc1143.txt">RFC 1143</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc1572.txt">RFC 1572</a>
- */
-public class TelnetConnection extends Thread implements TelnetCodes {
- /**
- * TELNET connection state: Initial state.
- */
- protected static final int STATE_INITIAL = 0;
-
- /**
- * TELNET connection state: Last byte processed was IAC code. code.
- */
- protected static final int STATE_IAC_RECEIVED = 1;
-
- /**
- * TELNET connection state: Last byte processed was WILL code. code.
- */
- protected static final int STATE_WILL_RECEIVED = 2;
-
- /**
- * TELNET connection state: Last byte processed was WONT code.
- */
- protected static final int STATE_WONT_RECEIVED = 3;
-
- /**
- * TELNET connection state: Last byte processed was DO code.
- */
- protected static final int STATE_DO_RECEIVED = 4;
-
- /**
- * TELNET connection state: Last byte processed was DONT code.
- */
- protected static final int STATE_DONT_RECEIVED = 5;
-
- /**
- * TELNET connection state: Last byte processed was SB.
- */
- protected static final int STATE_SUBNEGOTIATION_STARTED = 6;
-
- /**
- * TELNET connection state: Currently receiving sub-negotiation data.
- */
- protected static final int STATE_RECEIVING_SUBNEGOTIATION = 7;
-
- /**
- * Size of buffer for processing data received from remote endpoint.
- */
- protected static final int BUFFER_SIZE = 2048;
-
- /**
- * Holds raw bytes received from the remote endpoint, prior to any TELNET
- * protocol processing.
- */
- protected byte[] rawBytes = new byte[BUFFER_SIZE];
-
- /**
- * Holds incoming network data after the TELNET protocol bytes have been
- * processed and removed.
- */
- protected byte[] processedBytes = new byte[BUFFER_SIZE];
-
- /**
- * This field holds a StringBuffer containing text recently received from
- * the remote endpoint (after all TELNET protocol bytes have been processed
- * and removed).
- */
- protected StringBuffer processedStringBuffer = new StringBuffer(BUFFER_SIZE);
-
- /**
- * Holds the current state of the TELNET protocol processor.
- */
- protected int telnetState = STATE_INITIAL;
-
- /**
- * This field is true if the remote endpoint is a TELNET server, false if
- * not. We set this to true if and only if the remote endpoint sends
- * recognizable TELNET protocol data. We do not assume that the remote
- * endpoint is a TELNET server just because it is listening on port 23. This
- * allows us to successfully connect to a TELNET server listening on a port
- * other than 23.
- * <p>
- *
- * When this field first changes from false to true, we send all WILL or DO
- * commands to the remote endpoint.
- * <p>
- *
- * @see #telnetServerDetected()
- */
- protected boolean remoteIsTelnetServer = false;
-
- /**
- * An array of TelnetOption objects representing the local endpoint's TELNET
- * options. The array is indexed by the numeric TELNET option code.
- */
- protected TelnetOption[] localOptions = new TelnetOption[256];
-
- /**
- * An array of TelnetOption objects representing the remote endpoint's
- * TELNET options. The array is indexed by the numeric TELNET option code.
- */
- protected TelnetOption[] remoteOptions = new TelnetOption[256];
-
- /**
- * An array of bytes that holds the TELNET subnegotiation command most
- * recently received from the remote endpoint. This array does _not_ include
- * the leading IAC SB bytes, nor does it include the trailing IAC SE bytes.
- * The first byte of this array is always a TELNET option code.
- */
- protected byte[] receivedSubnegotiation = new byte[128];
-
- /**
- * This field holds the index into array {@link #receivedSubnegotiation} of
- * the next unused byte. This is used by method
- * {@link #processTelnetProtocol(int)} when the state machine is in states
- * {@link #STATE_SUBNEGOTIATION_STARTED} and {@link
- * #STATE_RECEIVING_SUBNEGOTIATION}.
- */
- protected int nextSubnegotiationByteIndex = 0;
-
- /**
- * This field is true if an error occurs while processing a subnegotiation
- * command.
- *
- * @see #processTelnetProtocol(int)
- */
- protected boolean ignoreSubnegotiation = false;
-
- /**
- * This field holds the width of the Terminal screen in columns.
- */
- protected int width = 0;
-
- /**
- * This field holds the height of the Terminal screen in rows.
- */
- protected int height = 0;
-
- /**
- * This field holds a reference to the {@link ITerminalControl} singleton.
- */
- protected TelnetConnector terminalControl;
-
- /**
- * This method holds the Socket object for the TELNET connection.
- */
- protected Socket socket;
-
- /**
- * This field holds a reference to an {@link InputStream} object used to
- * receive data from the remote endpoint.
- */
- protected InputStream inputStream;
-
- /**
- * This field holds a reference to an {@link OutputStream} object used to
- * send data to the remote endpoint.
- */
- protected OutputStream outputStream;
-
- /**
- * UNDER CONSTRUCTION
- */
- protected boolean localEcho = true;
-
- /**
- * This constructor just initializes some internal object state from its
- * arguments.
- */
- public TelnetConnection(TelnetConnector terminalControl, Socket socket) throws IOException {
- super();
-
- Logger.log("entered"); //$NON-NLS-1$
-
- this.terminalControl = terminalControl;
- this.socket = socket;
-
- inputStream = socket.getInputStream();
- outputStream = socket.getOutputStream();
-
- initializeOptions();
- }
-
- /**
- * Returns true if the TCP connection represented by this object is
- * connected, false otherwise.
- */
- public boolean isConnected() {
- return socket != null && socket.isConnected();
- }
-
- /**
- * Returns true if the TCP connection represented by this object is
- * connected and the remote endpoint is a TELNET server, false otherwise.
- */
- public boolean isRemoteTelnetServer() {
- return remoteIsTelnetServer;
- }
-
- /**
- * This method sets the terminal width and height to the supplied values. If
- * either new value differs from the corresponding old value, we initiate a
- * NAWS subnegotiation to inform the remote endpoint of the new terminal
- * size.
- */
- public void setTerminalSize(int newWidth, int newHeight) {
- Logger.log("Setting new size: width = " + newWidth + ", height = " + newHeight); //$NON-NLS-1$ //$NON-NLS-2$
- if (!isConnected() || !isRemoteTelnetServer())
- return;
- boolean sizeChanged = false;
-
- if (newWidth != width || newHeight != height)
- sizeChanged = true;
-
- width = newWidth;
- height = newHeight;
-
- if (sizeChanged && remoteIsTelnetServer && localOptions[TELNET_OPTION_NAWS].isEnabled()) {
- Integer[] sizeData = { new Integer(width), new Integer(height) };
-
- localOptions[TELNET_OPTION_NAWS].sendSubnegotiation(sizeData);
- }
- }
-
- /**
- * Returns true if local echoing is enabled for this TCP connection, false
- * otherwise.
- */
- public boolean localEcho() {
- return localEcho;
- }
-
- private void writeToTerminal(String string) {
- terminalControl.writeToTerminal(string);
- }
-
- /**
- * This method runs in its own thread. It reads raw bytes from the TELNET
- * connection socket, processes any TELNET protocol bytes (and removes
- * them), and passes the remaining bytes to a TerminalDisplay object for
- * display.
- */
- public void run() {
- Logger.log("Entered"); //$NON-NLS-1$
-
- try {
- while (socket.isConnected()) {
- int nRawBytes = inputStream.read(rawBytes);
-
- if (nRawBytes == -1) {
- // End of input on inputStream.
- Logger.log("End of input reading from socket!"); //$NON-NLS-1$
-
- // Announce to the user that the remote endpoint has closed the
- // connection.
-
- writeToTerminal("\r"+TelnetMessages.CONNECTION_CLOSED_BY_FOREIGN_HOST+"\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // Tell the ITerminalControl object that the connection is
- // closed.
- terminalControl.setState(TerminalState.CLOSED);
- break;
- } else {
- Logger.log("Received " + nRawBytes + " bytes: '" + //$NON-NLS-1$ //$NON-NLS-2$
- Logger.encode(new String(rawBytes, 0, nRawBytes)) + "'"); //$NON-NLS-1$
-
- // Process any TELNET protocol data that we receive. Don't
- // send any TELNET protocol data until we are sure the remote
- // endpoint is a TELNET server.
-
- int nProcessedBytes = processTelnetProtocol(nRawBytes);
-
- if (nProcessedBytes > 0) {
- writeToTerminal(new String(processedBytes, 0, nProcessedBytes));
- }
- }
- }
- } catch (SocketException ex) {
- String message = ex.getMessage();
-
- // A "socket closed" exception is normal here. It's caused by the
- // user clicking the disconnect button on the Terminal view toolbar.
-
- if (message != null && !message.equals("socket closed")) //$NON-NLS-1$
- {
- Logger.logException(ex);
- }
- } catch (Exception ex) {
- Logger.logException(ex);
- }
- }
-
- /**
- * This method initializes the localOptions[] and remoteOptions[] arrays so
- * that they contain references to TelnetOption objects representing our
- * desired state for each option. The goal is to achieve server-side
- * echoing, suppression of Go Aheads, and to send the local terminal type
- * and size to the remote endpoint.
- */
- protected void initializeOptions() {
- // First, create all the TelnetOption objects in the "undesired" state.
-
- for (int i = 0; i < localOptions.length; ++i) {
- localOptions[i] = new TelnetOption((byte) i, false, true, outputStream);
- }
-
- for (int i = 0; i < localOptions.length; ++i) {
- remoteOptions[i] = new TelnetOption((byte) i, false, false, outputStream);
- }
-
- // Next, set some of the options to the "desired" state. The options we
- // desire to be enabled are as follows:
- //
- // TELNET Option Desired for Desired for
- // Name and Code Local Endpoint Remote Endpoint
- // --------------------- -------------- ---------------
- // Echo (1) No Yes
- // Suppress Go Ahead (3) Yes Yes
- // Terminal Type (24) Yes Yes
- // NAWS (31) Yes Yes
- //
- // All other options remain in the "undesired" state, and thus will be
- // disabled (since either endpoint can force any option to be disabled by simply
- // answering WILL with DONT and DO with WONT).
-
- localOptions[TELNET_OPTION_ECHO].setDesired(false);
- remoteOptions[TELNET_OPTION_ECHO].setDesired(true);
-
- localOptions[TELNET_OPTION_SUPPRESS_GA].setDesired(true);
- remoteOptions[TELNET_OPTION_SUPPRESS_GA].setDesired(true);
-
- localOptions[TELNET_OPTION_TERMINAL_TYPE].setDesired(true);
- remoteOptions[TELNET_OPTION_TERMINAL_TYPE].setDesired(true);
-
- localOptions[TELNET_OPTION_NAWS].setDesired(true);
- remoteOptions[TELNET_OPTION_NAWS].setDesired(true);
- }
-
- /**
- * Process TELNET protocol data contained in the first <i>count</i> bytes
- * of <i>rawBytes</i>. This function preserves its state between calls,
- * because a multi-byte TELNET command might be split between two (or more)
- * calls to this function. The state is preserved in field <i>telnetState</i>.
- * This function implements an FSA that recognizes TELNET option codes.
- * TELNET option state is stored in instances of {@link TelnetOption}.
- * TELNET option subnegotiation is delegated to instances of TelnetOption.
- *
- * @return The number of bytes remaining in the buffer after removing all
- * TELNET protocol bytes.
- */
- protected int processTelnetProtocol(int count) {
- // This is too noisy to leave on all the time.
- // Logger.log("Processing " + count + " bytes of data.");
-
- int nextProcessedByte = 0;
-
- for (int byteIndex = 0; byteIndex < count; ++byteIndex) {
- // It is possible for control to flow through the below code such
- // that nothing happens. This happens when array rawBytes[] contains no
- // TELNET protocol data.
-
- byte inputByte = rawBytes[byteIndex];
-
- switch (telnetState) {
- case STATE_INITIAL:
- if (inputByte == TELNET_IAC) {
- telnetState = STATE_IAC_RECEIVED;
- } else {
- // It's not an IAC code, so just append it to
- // processedBytes.
-
- processedBytes[nextProcessedByte++] = rawBytes[byteIndex];
- }
- break;
-
- case STATE_IAC_RECEIVED:
- switch (inputByte) {
- case TELNET_IAC:
- // Two IAC bytes in a row are translated into one byte with
- // the
- // value 0xff.
-
- processedBytes[nextProcessedByte++] = (byte) 0xff;
- telnetState = STATE_INITIAL;
- break;
-
- case TELNET_WILL:
- telnetState = STATE_WILL_RECEIVED;
- break;
-
- case TELNET_WONT:
- telnetState = STATE_WONT_RECEIVED;
- break;
-
- case TELNET_DO:
- telnetState = STATE_DO_RECEIVED;
- break;
-
- case TELNET_DONT:
- telnetState = STATE_DONT_RECEIVED;
- break;
-
- case TELNET_SB:
- telnetState = STATE_SUBNEGOTIATION_STARTED;
- break;
-
- // Commands to consume and ignore.
-
- // Data Mark (DM). This is sent by a TELNET server following an
- // IAC sent as TCP urgent data. It should cause the client to
- // skip all not yet processed non-TELNET-protocol data preceding the
- // DM byte. However, Java 1.4.x has no way to inform clients of
- // class Socket that urgent data is available, so we simply ignore the
- // "IAC DM" command. Since the IAC is sent as TCP urgent data,
- // the Socket must be put into OOB-inline mode via a call to
- // setOOBInline(true), otherwise the IAC is silently dropped by
- // Java and only the DM arrives (leaving the user to see a
- // spurious ISO Latin-1 character).
- case TELNET_DM:
-
- case TELNET_NOP: // No-op.
- case TELNET_GA: // Go Ahead command. Meaningless on a full-duplex link.
- case TELNET_IP: // Interupt Process command. Server should never send this.
- case TELNET_AO: // Abort Output command. Server should never send this.
- case TELNET_AYT: // Are You There command. Server should never send this.
- case TELNET_EC: // Erase Character command. Server should never send this.
- case TELNET_EL: // Erase Line command. Server should never send this.
- telnetState = STATE_INITIAL;
- break;
-
- default:
- // Unrecognized command! This should never happen.
- Logger.log("processTelnetProtocol: UNRECOGNIZED TELNET PROTOCOL COMMAND: " + //$NON-NLS-1$
- inputByte);
- telnetState = STATE_INITIAL;
- break;
- }
- break;
-
- // For the next four cases, WILL and WONT commands affect the state
- // of remote options, and DO and DONT commands affect the state of
- // local options.
-
- case STATE_WILL_RECEIVED:
- Logger.log("Received WILL " + localOptions[inputByte].optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- remoteOptions[inputByte].handleWill();
- telnetState = STATE_INITIAL;
- telnetServerDetected();
- break;
-
- case STATE_WONT_RECEIVED:
- Logger.log("Received WONT " + localOptions[inputByte].optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- remoteOptions[inputByte].handleWont();
- telnetState = STATE_INITIAL;
- telnetServerDetected();
- break;
-
- case STATE_DO_RECEIVED:
- Logger.log("Received DO " + localOptions[inputByte].optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- localOptions[inputByte].handleDo();
- telnetState = STATE_INITIAL;
- telnetServerDetected();
- break;
-
- case STATE_DONT_RECEIVED:
- Logger.log("Received DONT " + localOptions[inputByte].optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- localOptions[inputByte].handleDont();
- telnetState = STATE_INITIAL;
- telnetServerDetected();
- break;
-
- case STATE_SUBNEGOTIATION_STARTED:
- Logger.log("Starting subnegotiation for option " + //$NON-NLS-1$
- localOptions[inputByte].optionName() + "."); //$NON-NLS-1$
-
- // First, zero out the array of received subnegotiation butes.
-
- for (int i = 0; i < receivedSubnegotiation.length; ++i)
- receivedSubnegotiation[i] = 0;
-
- // Forget about any previous subnegotiation errors.
-
- ignoreSubnegotiation = false;
-
- // Then insert this input byte into the array and enter state
- // STATE_RECEIVING_SUBNEGOTIATION, where we will gather the
- // remaining subnegotiation bytes.
-
- nextSubnegotiationByteIndex = 0;
- receivedSubnegotiation[nextSubnegotiationByteIndex++] = inputByte;
- telnetState = STATE_RECEIVING_SUBNEGOTIATION;
- break;
-
- case STATE_RECEIVING_SUBNEGOTIATION:
- if (inputByte == TELNET_IAC) {
- // Handle double IAC bytes. From RFC 855: "if parameters
- // in an option 'subnegotiation' include a byte with a value
- // of 255, it is necessary to double this byte in accordance
- // the general TELNET rules."
-
- if (nextSubnegotiationByteIndex > 0
- && receivedSubnegotiation[nextSubnegotiationByteIndex - 1] == TELNET_IAC) {
- // The last input byte we received in this
- // subnegotiation was IAC, so this is a double IAC. Leave the previous IAC
- // in the receivedSubnegotiation[] array and drop the current
- // one (thus translating a double IAC into a single IAC).
-
- Logger.log("Double IAC in subnegotiation translated into single IAC."); //$NON-NLS-1$
- break;
- }
-
- // Append the IAC byte to receivedSubnegotiation[]. If there
- // is no room for the IAC byte, it overwrites the last byte,
- // because we need to know when the subnegotiation ends, and that is
- // marked by an "IAC SE" command.
-
- if (nextSubnegotiationByteIndex < receivedSubnegotiation.length) {
- receivedSubnegotiation[nextSubnegotiationByteIndex++] = inputByte;
- } else {
- receivedSubnegotiation[receivedSubnegotiation.length - 1] = inputByte;
- }
- break;
- }
-
- // Handle an "IAC SE" command, which marks the end of the
- // subnegotiation. An SE byte by itself might be a legitimate
- // part of the subnegotiation data, so don't do anything unless the SE
- // is immediately preceded by an IAC.
-
- if (inputByte == TELNET_SE && receivedSubnegotiation[nextSubnegotiationByteIndex - 1] == TELNET_IAC) {
- Logger.log("Found SE code marking end of subnegotiation."); //$NON-NLS-1$
-
- // We are done receiving the subnegotiation command. Now
- // process it. We always use the option object stored in array
- // localOptions[] to process the received subnegotiation.
- // This is an arbitrary decision, but it is sufficient for handling
- // options TERMINAL-TYPE and NAWS, which are the only options that
- // we subnegotiate (presently). If, in the future,subnegotiations
- // need to be handled by option objects stored in both
- // localOptions[] and remoteOptions[], then some mechanism
- // to choose the correct option object must be implemented.
- //
- // Also, if ignoreSubnegotiation is true, there was an error
- // while receiving the subnegotiation, so we must not process the
- // command, and instead just return to the initial state.
-
- if (!ignoreSubnegotiation) {
- // Remove the trailing IAC byte from
- // receivedSubnegotiation[].
-
- receivedSubnegotiation[nextSubnegotiationByteIndex - 1] = 0;
-
- int subnegotiatedOption = receivedSubnegotiation[0];
-
- localOptions[subnegotiatedOption].handleSubnegotiation(receivedSubnegotiation,
- nextSubnegotiationByteIndex);
- } else {
- Logger.log("NOT CALLING handleSubnegotiation() BECAUSE OF ERRORS!"); //$NON-NLS-1$
- }
-
- // Return to the initial state.
-
- telnetState = STATE_INITIAL;
- }
-
- // Check whether the receivedSubnegotiation[] array is full.
-
- if (nextSubnegotiationByteIndex >= receivedSubnegotiation.length) {
- // This should not happen. Array receivedSubnegotiation can
- // hold 128 bytes, and no TELNET option that we perform
- // subnegotiation for requires that many bytes in a subnegotiation command.
- // In the interest of robustness, we handle this case by ignoring all
- // remaining subnegotiation bytes until we receive the IAC SE
- // command that ends the subnegotiation. Also, we set
- // ignoreSubnegotiation to true to prevent a call to
- // handleSubnegotiation() when the IAC SE command arrives.
-
- Logger.log("SUBNEGOTIATION BUFFER FULL!"); //$NON-NLS-1$
- ignoreSubnegotiation = true;
- } else {
- Logger.log("Recording subnegotiation byte " + (inputByte & 0xff)); //$NON-NLS-1$
-
- receivedSubnegotiation[nextSubnegotiationByteIndex++] = inputByte;
- }
- break;
-
- default:
- // This should _never_ happen! If it does, it means there is a
- // bug in this FSA. For robustness, we return to the initial state.
-
- Logger.log("INVALID TELNET STATE: " + telnetState); //$NON-NLS-1$
- telnetState = STATE_INITIAL;
- break;
- }
- }
-
- // Return the number of bytes of processed data (i.e., number of bytes
- // of raw data minus TELNET control bytes). This value can be zero.
-
- return nextProcessedByte;
- }
-
- /**
- * This method is called whenever we receive a valid TELNET protocol command
- * from the remote endpoint. When it is called for the first time for this
- * connection, we negotiate all options that we desire to be enabled.
- * <p>
- *
- * This method does not negotiate options that we do not desire to be
- * enabled, because all options are initially disabled.
- * <p>
- */
- protected void telnetServerDetected() {
- if (!remoteIsTelnetServer) {
- // This block only executes once per TelnetConnection instance.
-
- localEcho = false;
-
- Logger.log("Detected TELNET server."); //$NON-NLS-1$
-
- remoteIsTelnetServer = true;
-
- for (int i = 0; i < localOptions.length; ++i) {
- if (localOptions[i].isDesired()) {
- localOptions[i].negotiate();
- }
- }
-
- for (int i = 0; i < remoteOptions.length; ++i) {
- if (remoteOptions[i].isDesired()) {
- remoteOptions[i].negotiate();
- }
- }
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnector.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnector.java
deleted file mode 100644
index f55afcd19..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetConnector.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalControl
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-
-import org.eclipse.tm.terminal.ISettingsPage;
-import org.eclipse.tm.terminal.ISettingsStore;
-import org.eclipse.tm.terminal.ITerminalConnector;
-import org.eclipse.tm.terminal.ITerminalControl;
-import org.eclipse.tm.terminal.Logger;
-import org.eclipse.tm.terminal.TerminalState;
-
-public class TelnetConnector implements ITerminalConnector {
- private OutputStream fOutputStream;
- private InputStream fInputStream;
- private Socket fSocket;
- private ITerminalControl fControl;
- private TelnetConnection fTelnetConnection;
- private final TelnetSettings fSettings;
- public TelnetConnector() {
- this(new TelnetSettings());
- }
- public String getId() {
- return getClass().getName();
- }
- public TelnetConnector(TelnetSettings settings) {
- fSettings=settings;
- }
- public void connect(ITerminalControl control) {
- Logger.log("entered."); //$NON-NLS-1$
- fControl=control;
- TelnetConnectWorker worker = new TelnetConnectWorker(this,control);
- worker.start();
- }
- public void disconnect() {
- Logger.log("entered."); //$NON-NLS-1$
-
- if (getSocket() != null) {
- try {
- getSocket().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- if (getInputStream() != null) {
- try {
- getInputStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- if (getOutputStream() != null) {
- try {
- getOutputStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
- cleanSocket();
- setState(TerminalState.CLOSED);
- }
- public boolean isLocalEcho() {
- if(fTelnetConnection!=null)
- return false;
- return fTelnetConnection.localEcho();
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- if(fTelnetConnection!=null)
- fTelnetConnection.setTerminalSize(newWidth, newHeight);
-
- }
- public InputStream getInputStream() {
- return fInputStream;
- }
- public OutputStream getOutputStream() {
- return fOutputStream;
- }
- private void setInputStream(InputStream inputStream) {
- fInputStream = inputStream;
- }
- private void setOutputStream(OutputStream outputStream) {
- fOutputStream = outputStream;
- }
- Socket getSocket() {
- return fSocket;
- }
-
- /**
- * sets the socket to null
- */
- void cleanSocket() {
- fSocket=null;
- setInputStream(null);
- setOutputStream(null);
- }
-
- void setSocket(Socket socket) throws IOException {
- if(socket==null) {
- cleanSocket();
- } else {
- fSocket = socket;
- setInputStream(socket.getInputStream());
- setOutputStream(socket.getOutputStream());
- }
-
- }
- public void setTelnetConnection(TelnetConnection connection) {
- fTelnetConnection=connection;
- }
- public void writeToTerminal(String txt) {
- fControl.writeToTerminal(txt);
-
- }
- public void setState(TerminalState state) {
- fControl.setState(state);
-
- }
- public ITelnetSettings getTelnetSettings() {
- return fSettings;
- }
- public ISettingsPage makeSettingsPage() {
- return new TelnetSettingsPage(fSettings);
- }
- public String getStatusString(String strConnected) {
- return fSettings.getStatusString(strConnected);
- }
- public void load(ISettingsStore store) {
- fSettings.load(store);
-
- }
- public void save(ISettingsStore store) {
- fSettings.save(store);
- }
- public boolean isInstalled() {
- return true;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetMessages.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetMessages.java
deleted file mode 100644
index dc50f2685..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetMessages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
- * 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 Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TelnetMessages extends NLS {
- static {
- NLS.initializeMessages(TelnetMessages.class.getName(), TelnetMessages.class);
- }
- public static String CONNTYPE_NETWORK;
- public static String PORT;
- public static String HOST;
- public static String CONNECTION_CLOSED_BY_FOREIGN_HOST;
- public static String TIMEOUT;
-
- }
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetMessages.properties b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetMessages.properties
deleted file mode 100644
index 6fd231537..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetMessages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 Wind River Systems, Inc. and others.
-# 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 Wind River employees contributed to the Terminal component
-# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
-# Helmut Haigermoser and Ted Williams.
-#
-# Contributors:
-# Michael Scharf (Wind River) - split into core, view and connector plugins
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-###############################################################################
-CONNTYPE_NETWORK = Telnet
-PORT = Port
-HOST = Host
-CONNECTION_CLOSED_BY_FOREIGN_HOST= Connection closed by foreign host.
-TIMEOUT = Timeout
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetOption.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetOption.java
deleted file mode 100644
index 1dc8e2b5e..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetOption.java
+++ /dev/null
@@ -1,701 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Date;
-
-import org.eclipse.tm.terminal.Logger;
-
-/**
- * This class represents a single TELNET protocol option at one endpoint of a TELNET
- * connection. This class encapsulates the endpoint associated with the option (local
- * or remote), the current state of the option (enabled or disabled), the desired state
- * of the option, the current state of the negotiation, an OutputStream that allows
- * communication with the remote endpoint, and the number of negotiations that have
- * started within this connection. <p>
- *
- * In addition to encapsulating the above state, this class performs option negotiation
- * to attempt to achieve the desired option state. For some options, this class also
- * performs option sub-negotiation. <p>
- *
- * IMPORTANT: Understanding this code requires understanding the TELNET protocol and
- * TELNET option processing. <p>
- *
- * @author Fran Litterio (francis.litterio@windriver.com)
- */
-class TelnetOption implements TelnetCodes
-{
- /**
- * This array of Strings maps an integer TELNET option code value to the symbolic
- * name of the option. Array elements of the form "?" represent unassigned option
- * values.
- */
- protected static final String[] optionNames =
- {
- "BINARY", // 0 //$NON-NLS-1$
- "ECHO", // 1 //$NON-NLS-1$
- "RECONNECTION", // 2 //$NON-NLS-1$
- "SUPPRESS GO AHEAD", // 3 //$NON-NLS-1$
- "MSG SIZE NEGOTIATION", // 4 //$NON-NLS-1$
- "STATUS", // 5 //$NON-NLS-1$
- "TIMING MARK", // 6 //$NON-NLS-1$
- "REMOTE CTRL TRANS+ECHO", // 7 //$NON-NLS-1$
- "OUTPUT LINE WIDTH", // 8 //$NON-NLS-1$
- "OUTPUT PAGE SIZE", // 9 //$NON-NLS-1$
- "OUTPUT CR DISPOSITION", // 10 //$NON-NLS-1$
- "OUTPUT HORIZ TABSTOPS", // 11 //$NON-NLS-1$
- "OUTPUT HORIZ TAB DISPOSITION", // 12 //$NON-NLS-1$
- "OUTPUT FORMFEED DISPOSITION", // 13 //$NON-NLS-1$
- "OUTPUT VERTICAL TABSTOPS", // 14 //$NON-NLS-1$
- "OUTPUT VT DISPOSITION", // 15 //$NON-NLS-1$
- "OUTPUT LF DISPOSITION", // 16 //$NON-NLS-1$
- "EXTENDED ASCII", // 17 //$NON-NLS-1$
- "LOGOUT", // 18 //$NON-NLS-1$
- "BYTE MACRO", // 19 //$NON-NLS-1$
- "DATA ENTRY TERMINAL", // 20 //$NON-NLS-1$
- "SUPDUP", // 21 //$NON-NLS-1$
- "SUPDUP OUTPUT", // 22 //$NON-NLS-1$
- "SEND LOCATION", // 23 //$NON-NLS-1$
- "TERMINAL TYPE", // 24 //$NON-NLS-1$
- "END OF RECORD", // 25 //$NON-NLS-1$
- "TACACS USER IDENTIFICATION", // 26 //$NON-NLS-1$
- "OUTPUT MARKING", // 27 //$NON-NLS-1$
- "TERMINAL LOCATION NUMBER", // 28 //$NON-NLS-1$
- "3270 REGIME", // 29 //$NON-NLS-1$
- "X.3 PAD", // 30 //$NON-NLS-1$
- "NEGOTIATE ABOUT WINDOW SIZE", // 31 //$NON-NLS-1$
- "TERMINAL SPEED", // 32 //$NON-NLS-1$
- "REMOTE FLOW CONTROL", // 33 //$NON-NLS-1$
- "LINEMODE", // 34 //$NON-NLS-1$
- "X DISPLAY LOCATION", // 35 //$NON-NLS-1$
- "ENVIRONMENT OPTION", // 36 //$NON-NLS-1$
- "AUTHENTICATION OPTION", // 37 //$NON-NLS-1$
- "ENCRYPTION OPTION", // 38 //$NON-NLS-1$
- "NEW ENVIRONMENT OPTION", // 39 //$NON-NLS-1$
- "TN3270E", // 40 //$NON-NLS-1$
- "XAUTH", // 41 //$NON-NLS-1$
- "CHARSET", // 42 //$NON-NLS-1$
- "REMOTE SERIAL PORT", // 43 //$NON-NLS-1$
- "COM PORT CONTROL OPTION", // 44 //$NON-NLS-1$
- "SUPPRESS LOCAL ECHO", // 45 //$NON-NLS-1$
- "START TLS", // 46 //$NON-NLS-1$
- "KERMIT", // 47 //$NON-NLS-1$
- "SEND URL", // 48 //$NON-NLS-1$
- "FORWARD X", // 49 //$NON-NLS-1$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // 50 ... //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", // ... 137 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- "TELOPT PRAGMA LOGON", // 138 //$NON-NLS-1$
- "TELOPT SSPI LOGON", // 139 //$NON-NLS-1$
- "TELOPT PRAGMA HEARTBEAT", // 140 //$NON-NLS-1$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", // 141 ... //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "?", "?", "?", "?", // ... 254 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "EXTENDED OPTIONS LIST" // 255 //$NON-NLS-1$
- };
-
- /**
- * Negotiation state: Negotiation not yet started for this option. <p>
- *
- * This constant and the others having similar names represent the states of a
- * finite state automaton (FSA) that tracks the negotiation state of this option.
- * The initial state is NEGOTIATION_NOT_STARTED. The state machine is as follows
- * (with transitions labelled with letters in parentheses): <p>
- *
- * <pre>
- * NEGOTIATION_NOT_STARTED -----> {@link #NEGOTIATION_IN_PROGRESS}
- * | (A) | ^
- * (C)| (B)| |(D)
- * | V |
- * +--------> {@link #NEGOTIATION_DONE}
- * </pre> <p>
- *
- * Once the FSA leaves state NEGOTIATION_NOT_STARTED, it never returns to that
- * state. Transition A happens when the local endpoint sends an option command
- * before receiving a command for the same option from the remote endpoint. <p>
- *
- * Transition B happens when the local endpoint receives a reply to an option
- * command sent earlier by the local endpoint. Receipt of that reply terminates
- * the negotiation. <p>
- *
- * Transition D happens after negotiation is done and "something changes" (see the
- * RFCs for the definition of "something changes"). Either endpoint can
- * re-negotiate an option after a previous negotiation, but only if some external
- * influence (such as the user or the OS) causes it to do so. Re-negotiation must
- * start more than {@link #NEGOTIATION_IGNORE_DURATION} milliseconds after the FSA
- * enters state NEGOTIATION_DONE or it will be ignored. This is how this client
- * prevents negotiation loops. <p>
- *
- * Transition C happens when the local endpoint receives an option command from the
- * remote endpoint before sending a command for the same option. In that case, the
- * local endpoint replies immediately with an option command and the negotitation
- * terminates. <p>
- *
- * Some TELNET servers (e.g., the Solaris server), after sending WILL and receiving
- * DONT, will reply with a superfluous WONT. Any such superfluous option command
- * received from the remote endpoint while the option's FSA is in state
- * {@link #NEGOTIATION_DONE} will be ignored by the local endpoint.
- */
- protected static final int NEGOTIATION_NOT_STARTED = 0;
-
- /** Negotiation state: Negotiation is in progress for this option. */
- protected static final int NEGOTIATION_IN_PROGRESS = 1;
-
- /** Negotiation state: Negotiation has terminated for this option. */
- protected static final int NEGOTIATION_DONE = 2;
-
- /**
- * The number of milliseconds following the end of negotiation of this option
- * before which the remote endpoint can re-negotiate the option. Any option
- * command received from the remote endpoint before this time passes is ignored.
- * This is used to prevent option negotiation loops.
- *
- * @see #ignoreNegotiation()
- * @see #negotiationCompletionTime
- */
- protected static final int NEGOTIATION_IGNORE_DURATION = 30000;
-
- /**
- * This field holds the current negotiation state for this option.
- */
- protected int negotiationState = NEGOTIATION_NOT_STARTED;
-
- /**
- * This field holds the time when negotiation of this option most recently
- * terminated (i.e., entered state {@link #NEGOTIATION_DONE}). This is used to
- * determine whether an option command received from the remote endpoint after
- * negotiation has terminated for this option is to be ignored or interpreted as
- * the start of a new negotiation.
- *
- * @see #NEGOTIATION_IGNORE_DURATION
- */
- protected Date negotiationCompletionTime = new Date(0);
-
- /**
- * Holds the total number of negotiations that have completed for this option.
- */
- protected int negotiationCount = 0;
-
- /**
- * Holds the integer code representing the option.
- */
- protected byte option = 0;
-
- /**
- * Holds the OutputStream object that allows data to be sent to the remote endpoint
- * of the TELNET connection.
- */
- protected OutputStream outputStream;
-
- /**
- * True if this option is for the local endpoint, false for the remote endpoint.
- */
- protected boolean local = true;
-
- /**
- * This field is true if the option is enabled, false if it is disabled. All
- * options are initially disabled until they are negotiated to be enabled. <p>
- */
- protected boolean enabled = false;
-
- /**
- * This field is true if the client desires the option to be enabled, false if the
- * client desires the option to be disabled. This field does not represent the
- * remote's endpoints desire (as expressed via WILL and WONT commands) -- it
- * represnet the local endpoint's desire. <p>
- *
- * @see #setDesired(boolean)
- */
- protected boolean desired = false;
-
- /**
- * Constructor. <p>
- *
- * @param option The integer code of this option.
- * @param desired Whether we desire this option to be enabled.
- * @param local Whether this option is for the local or remote endpoint.
- * @param outputStream A stream used to negotiate with the remote endpoint.
- */
- TelnetOption(byte option, boolean desired, boolean local,
- OutputStream outputStream) {
- this.option = option;
- this.desired = desired;
- this.local = local;
- this.outputStream = outputStream;
- }
-
- /**
- * @return Returns a String containing the name of the TELNET option specified in
- * parameter <i>option</i>.
- */
- public String optionName() {
- return optionNames[option];
- }
-
- /**
- * Returns true if this option is enabled, false if it is disabled. <p>
- *
- * @return Returns true if this option is enabled, false if it is disabled.
- */
- public boolean isEnabled() {
- return enabled;
- }
-
- /**
- * Enables this option if <i>newValue</i> is true, otherwise disables this
- * option. <p>
- *
- * @param newValue True if this option is to be enabled, false otherwise.
- */
- public void setEnabled(boolean newValue) {
- Logger.log("Enabling " + (local ? "local" : "remote") + " option " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- optionName());
- enabled = newValue;
- }
-
- /**
- * Returns true if the local endpoint desires this option to be enabled, false if
- * not. It is not an error for the value returned by this method to differ from
- * the value returned by isEnabled(). The value returned by this method can change
- * over time, reflecting the local endpoint's changing desire regarding the
- * option. <p>
- *
- * NOTE: Even if this option represents a remote endpoint option, the return value
- * of this method represents the local endpint's desire regarding the remote
- * option. <p>
- *
- * @return Returns true if the local endpoint desires this option to be enabled,
- * false if not.
- */
- public boolean isDesired() {
- return desired;
- }
-
- /**
- * Sets our desired value for this option. Note that the option can be desired
- * when <i>enabled</i> is false, and the option can be undesired when
- * <i>enabled</i> is true, though the latter state should not persist, since either
- * endpoint can disable any option at any time. <p>
- *
- * @param newValue True if we desire this option to be enabled, false if
- * we desire this option to be disabled.
- */
- public void setDesired(boolean newValue) {
- if (newValue)
- Logger.log("Setting " + (local ? "local" : "remote") + " option " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- optionName() + " as desired."); //$NON-NLS-1$
-
- desired = newValue;
- }
-
- /**
- * Call this method to request that negotiation begin for this option. This method
- * does nothing if negotiation for this option has already started or is already
- * complete. If negotiation has not yet started for this option and the local
- * endpoint desires this option to be enabled, then we send a WILL or DO command to
- * the remote endpoint.
- */
- public void negotiate() {
- if (negotiationState == NEGOTIATION_NOT_STARTED && desired) {
- if (local) {
- Logger
- .log("Starting negotiation for local option " + optionName()); //$NON-NLS-1$
- sendWill();
- } else {
- Logger
- .log("Starting negotiation for remote option " + optionName()); //$NON-NLS-1$
- sendDo();
- }
-
- negotiationState = NEGOTIATION_IN_PROGRESS;
- }
- }
-
- /**
- * This method is called whenever we receive a WILL command from the remote
- * endpoint.
- */
- public void handleWill() {
- if (negotiationState == NEGOTIATION_DONE && ignoreNegotiation()) {
- Logger
- .log("Ignoring superfluous WILL command from remote endpoint."); //$NON-NLS-1$
- return;
- }
-
- if (negotiationState == NEGOTIATION_IN_PROGRESS) {
- if (desired) {
- // We sent DO and server replied with WILL. Enable the option, and end
- // this negotiation.
-
- enabled = true;
- Logger.log("Enabling remote option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- } else {
- // This should never happen! We sent DONT and the server replied with
- // WILL. Bad server. No soup for you. Disable the option, and end
- // this negotiation.
-
- Logger.log("Server answered DONT with WILL!"); //$NON-NLS-1$
- enabled = false;
- Logger.log("Disabling remote option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- }
- } else {
- if (desired) {
- // Server sent WILL, so we reply with DO. Enable the option, and end
- // this negotiation.
-
- sendDo();
- enabled = true;
- Logger.log("Enabling remote option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- } else {
- // Server sent WILL, so we reply with DONT. Disable the option, and
- // end this negotiation.
-
- sendDont();
- enabled = false;
- Logger.log("Disabling remote option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- }
- }
- }
-
- /**
- * Handles a WONT command sent by the remote endpoint for this option. The value
- * of <i>desired</i> doesn't matter in this method, because the remote endpoint is
- * forcing the option to be disabled.
- */
- public void handleWont() {
- if (negotiationState == NEGOTIATION_DONE && ignoreNegotiation()) {
- Logger
- .log("Ignoring superfluous WONT command from remote endpoint."); //$NON-NLS-1$
- return;
- }
-
- if (negotiationState == NEGOTIATION_IN_PROGRESS) {
- // We sent DO or DONT and server replied with WONT. Disable the
- // option, and end this negotiation.
-
- enabled = false;
- Logger.log("Disabling remote option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- } else {
- // Server sent WONT, so we reply with DONT. Disable the option, and
- // end this negotiation.
-
- sendDont();
- enabled = false;
- Logger.log("Disabling remote option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- }
- }
-
- /**
- * Handles a DO command sent by the remote endpoint for this option.
- */
- public void handleDo() {
- if (negotiationState == NEGOTIATION_DONE && ignoreNegotiation()) {
- Logger.log("Ignoring superfluous DO command from remote endpoint."); //$NON-NLS-1$
- return;
- }
-
- if (negotiationState == NEGOTIATION_IN_PROGRESS) {
- if (desired) {
- // We sent WILL and server replied with DO. Enable the option, and end
- // this negotiation.
-
- enabled = true;
- Logger.log("Enabling local option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- } else {
- // We sent WONT and server replied with DO. This should never happen!
- // Bad server. No soup for you. Disable the option, and end this
- // negotiation.
-
- Logger.log("Server answered WONT with DO!"); //$NON-NLS-1$
- enabled = false;
- Logger.log("Disabling local option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- }
- } else {
- if (desired) {
- // Server sent DO, so we reply with WILL. Enable the option, and end
- // this negotiation.
-
- sendWill();
- enabled = true;
- Logger.log("Enabling local option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- } else {
- // Server sent DO, so we reply with WONT. Disable the option, and end
- // this negotiation.
-
- sendWont();
- enabled = false;
- Logger.log("Disabling local option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- }
- }
- }
-
- /**
- * Handles a DONT command sent by the remote endpoint for this option. The value
- * of <i>desired</i> doesn't matter in this method, because the remote endpoint is
- * forcing the option to be disabled.
- */
- public void handleDont() {
- if (negotiationState == NEGOTIATION_DONE && ignoreNegotiation()) {
- Logger
- .log("Ignoring superfluous DONT command from remote endpoint."); //$NON-NLS-1$
- return;
- }
-
- if (negotiationState == NEGOTIATION_IN_PROGRESS) {
- // We sent WILL or WONT and server replied with DONT. Disable the
- // option, and end this negotiation.
-
- enabled = false;
- Logger.log("Disabling local option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- } else {
- // Server sent DONT, so we reply with WONT. Disable the option, and end
- // this negotiation.
-
- sendWont();
- enabled = false;
- Logger.log("Disabling local option " + optionName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- endNegotiation();
- }
- }
-
- /**
- * This method handles a subnegotiation command received from the remote endpoint.
- * Currently, the only subnegotiation we handle is when the remote endpoint
- * commands us to send our terminal type (which is "ansi").
- *
- * @param subnegotiationData An array of bytes containing a TELNET
- * subnegotiation command received from the
- * remote endpoint.
- * @param count The number of bytes in array
- * subnegotiationData to examine.
- */
- public void handleSubnegotiation(byte[] subnegotiationData, int count) {
- switch (option) {
- case TELNET_OPTION_TERMINAL_TYPE:
- if (subnegotiationData[1] != TELNET_SEND) {
- // This should never happen!
- Logger
- .log("Invalid TERMINAL-TYPE subnegotiation command from remote endpoint: " + //$NON-NLS-1$
- (subnegotiationData[1] & 0xff));
- break;
- }
-
- // Tell the remote endpoint our terminal type is "ansi" using this sequence
- // of TELNET protocol bytes:
- //
- // IAC SB TERMINAL-TYPE IS a n s i IAC SE
-
- byte[] terminalTypeData = { TELNET_IAC, TELNET_SB,
- TELNET_OPTION_TERMINAL_TYPE, TELNET_IS, (byte) 'a',
- (byte) 'n', (byte) 's', (byte) 'i', TELNET_IAC, TELNET_SE };
-
- try {
- outputStream.write(terminalTypeData);
- } catch (IOException ex) {
- Logger.log("IOException sending TERMINAL-TYPE subnegotiation!"); //$NON-NLS-1$
- Logger.logException(ex);
- }
- break;
-
- default:
- // This should never happen!
- Logger
- .log("SHOULD NOT BE REACHED: Called for option " + optionName()); //$NON-NLS-1$
- break;
- }
- }
-
- /**
- * This method sends a subnegotiation command to the remote endpoint.
- *
- * @param subnegotiationData An array of Objects holding data to be used
- * when generating the outbound subnegotiation
- * command.
- */
- public void sendSubnegotiation(Object[] subnegotiationData) {
- switch (option) {
- case TELNET_OPTION_NAWS:
- // Get the width and height of the view and send it to the remote
- // endpoint using this sequence of TELNET protocol bytes:
- //
- // IAC SB NAWS <width-highbyte> <width-lowbyte> <height-highbyte>
- // <height-lowbyte> IAC SE
-
- byte[] NAWSData = { TELNET_IAC, TELNET_SB, TELNET_OPTION_NAWS, 0,
- 0, 0, 0, TELNET_IAC, TELNET_SE };
- int width = ((Integer) subnegotiationData[0]).intValue();
- int height = ((Integer) subnegotiationData[1]).intValue();
-
- NAWSData[3] = (byte) ((width >>> 8) & 0xff); // High order byte of width.
- NAWSData[4] = (byte) (width & 0xff); // Low order byte of width.
- NAWSData[5] = (byte) ((height >>> 8) & 0xff); // High order byte of height.
- NAWSData[6] = (byte) (height & 0xff); // Low order byte of height.
-
- Logger
- .log("sending terminal size to remote endpoint: width = " + width + //$NON-NLS-1$
- ", height = " + height + "."); //$NON-NLS-1$ //$NON-NLS-2$
-
- // This final local variable is a hack to get around the fact that inner
- // classes cannot reference a non-final local variable in a lexically
- // enclosing scope.
-
- final byte[] NAWSDataFinal = NAWSData;
-
- // Send the NAWS data in a new thread. The current thread is the display
- // thread, and calls to write() can block, but blocking the display thread
- // is _bad_ (it hangs the GUI).
-
- new Thread() {
- public void run() {
- try {
- outputStream.write(NAWSDataFinal);
- } catch (IOException ex) {
- Logger.log("IOException sending NAWS subnegotiation!"); //$NON-NLS-1$
- Logger.logException(ex);
- }
- }
- }.start();
- break;
-
- default:
- // This should never happen!
- Logger
- .log("SHOULD NOT BE REACHED: Called for option " + optionName()); //$NON-NLS-1$
- break;
- }
- }
-
- /**
- * This method returns true if there has not yet been any negotiation of this
- * option.
- *
- * @return Returns true if there has not yet been any negotiation of this option.
- */
- protected boolean notYetNegotiated() {
- return negotiationState == NEGOTIATION_NOT_STARTED;
- }
-
- /**
- * This method terminates the current negotiation and records the time at which the
- * negotiation terminated.
- */
- protected void endNegotiation() {
- Logger.log("Ending negotiation #" + negotiationCount + " for " + //$NON-NLS-1$ //$NON-NLS-2$
- (local ? "local" : "remote") + " option " + optionName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- negotiationState = NEGOTIATION_DONE;
- negotiationCompletionTime.setTime(System.currentTimeMillis());
- ++negotiationCount;
- }
-
- /**
- * This method determines whether or not to ignore what appears to be a new
- * negotiation initiated by the remote endpoint. This is needed because some
- * TELNET servers send superfluous option commands that a naive client might
- * interpret as the start of a new negotiation. If the superfluous command is not
- * ignored, an option negotiation loop can result (which is bad). For details
- * about the superfluous commands sent by some servers, see the documentation for
- * {@link #NEGOTIATION_NOT_STARTED}. <p>
- *
- * The current implementation of this method returns true if the new negotiation
- * starts within NEGOTIATION_IGNORE_DURATION seconds of the end of the previous
- * negotiation of this option. <p>
- *
- * @return Returns true if the new negotiation should be ignored, false if not.
- */
- protected boolean ignoreNegotiation() {
- return (System.currentTimeMillis() - negotiationCompletionTime
- .getTime()) > NEGOTIATION_IGNORE_DURATION;
- }
-
- /**
- * Sends a DO command to the remote endpoint for this option.
- */
- protected void sendDo() {
- Logger.log("Sending DO " + optionName()); //$NON-NLS-1$
- sendCommand(TELNET_DO);
- }
-
- /**
- * Sends a DONT command to the remote endpoint for this option.
- */
- protected void sendDont() {
- Logger.log("Sending DONT " + optionName()); //$NON-NLS-1$
- sendCommand(TELNET_DONT);
- }
-
- /**
- * Sends a WILL command to the remote endpoint for this option.
- */
- protected void sendWill() {
- Logger.log("Sending WILL " + optionName()); //$NON-NLS-1$
- sendCommand(TELNET_WILL);
- }
-
- /**
- * Sends a WONT command to the remote endpoint for this option.
- */
- protected void sendWont() {
- Logger.log("Sending WONT " + optionName()); //$NON-NLS-1$
- sendCommand(TELNET_WONT);
- }
-
- /**
- * This method sends a WILL/WONT/DO/DONT command to the remote endpoint for this
- * option.
- */
- protected void sendCommand(byte command) {
- byte[] data = { TELNET_IAC, 0, 0 };
-
- data[1] = command;
- data[2] = option;
-
- try {
- outputStream.write(data);
- } catch (IOException ex) {
- Logger.log("IOException sending command " + command); //$NON-NLS-1$
- Logger.logException(ex);
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetProperties.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetProperties.java
deleted file mode 100644
index 1d85a4c41..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetProperties.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalProperties
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-public class TelnetProperties {
- private final NetworkPortMap fNetworkPortMap;
- private final String fDefaultHost;
- private final String fDefaultNetworkPort;
-
- public TelnetProperties() {
- fNetworkPortMap = new NetworkPortMap();
- fDefaultNetworkPort = fNetworkPortMap.getDefaultNetworkPort();
- fDefaultHost = ""; //$NON-NLS-1$
- }
-
- public String getDefaultHost() {
- return fDefaultHost;
- }
-
- public String getDefaultNetworkPort() {
- return fDefaultNetworkPort;
- }
-
- public NetworkPortMap getNetworkPortMap() {
- // TODO Auto-generated method stub
- return fNetworkPortMap;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetSettings.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetSettings.java
deleted file mode 100644
index 9bdd522cf..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetSettings.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalSettings
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-import org.eclipse.tm.terminal.ISettingsStore;
-
-public class TelnetSettings implements ITelnetSettings {
- protected String fHost;
- protected String fNetworkPort;
- protected String fTimeout;
- private final TelnetProperties fProperties=new TelnetProperties();
- public String getHost() {
- return fHost;
- }
-
- public void setHost(String strHost) {
- fHost = strHost;
- }
-
- public String getNetworkPortString() {
- return fNetworkPort;
- }
-
- public int getNetworkPort() {
- try {
- return Integer.parseInt(fNetworkPort);
- } catch (NumberFormatException numberFormatException) {
- return 1313;
- }
- }
-
- public void setNetworkPort(String strNetworkPort) {
- fNetworkPort = strNetworkPort;
- }
-
- public String getStatusString(String strConnected) {
- return " (" + //$NON-NLS-1$
- getHost() + ":" + //$NON-NLS-1$
- getNetworkPortString() + " - " + //$NON-NLS-1$
- strConnected + ")"; //$NON-NLS-1$
- }
-
- public void load(ISettingsStore store) {
- fHost = store.get("Host", fProperties.getDefaultHost());//$NON-NLS-1$
- fNetworkPort = store.get("NetworkPort", fProperties.getDefaultNetworkPort());//$NON-NLS-1$
- fTimeout = store.get("Timeout","10");//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void save(ISettingsStore store) {
- store.put("Host", fHost);//$NON-NLS-1$
- store.put("NetworkPort", fNetworkPort);//$NON-NLS-1$
- store.put("Timeout", fTimeout);//$NON-NLS-1$
- }
-
- public TelnetProperties getProperties() {
- return fProperties;
- }
- public int getTimeout() {
- try {
- return Integer.parseInt(fTimeout);
- } catch (NumberFormatException numberFormatException) {
- return 10;
- }
- }
- public String getTimeoutString() {
- return fTimeout;
- }
-
- public void setTimeout(String timeout) {
- fTimeout = timeout;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetSettingsPage.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetSettingsPage.java
deleted file mode 100644
index 4b59c94eb..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/internal/telnet/TelnetSettingsPage.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 Wind River Systems, Inc. and others.
- * 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 Wind River employees contributed to the Terminal component
- * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
- * Helmut Haigermoser and Ted Williams.
- *
- * Contributors:
- * Michael Scharf (Wind River) - extracted from TerminalSettingsDlg
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.terminal.internal.telnet;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.terminal.ISettingsPage;
-
-public class TelnetSettingsPage implements ISettingsPage {
- private Text fHostText;
- private Combo fNetworkPortCombo;
- private Text fTimeout;
- private final TelnetSettings fTerminalSettings;
-
- public TelnetSettingsPage(TelnetSettings settings) {
- fTerminalSettings=settings;
- }
- public void saveSettings() {
- fTerminalSettings.setHost(fHostText.getText());
- fTerminalSettings.setTimeout(fTimeout.getText());
- fTerminalSettings.setNetworkPort(getNetworkPort());
- }
-
- public void loadSettings() {
- if(fTerminalSettings!=null) {
- setHost(fTerminalSettings.getHost());
- setTimeout(fTerminalSettings.getTimeoutString());
- setNetworkPort(fTerminalSettings.getNetworkPortString());
- }
- }
- private void setHost(String strHost) {
- if(strHost==null)
- strHost=""; //$NON-NLS-1$
- fHostText.setText(strHost);
-
- }
- private void setTimeout(String timeout) {
- if(timeout==null || timeout.length()==0)
- timeout="5"; //$NON-NLS-1$
- fTimeout.setText(timeout);
-
- }
- private void setNetworkPort(String strNetworkPort) {
- if (strNetworkPort!=null) {
- String strPortName = getNetworkPortMap().findPortName(strNetworkPort);
- if(strPortName==null) {
- strPortName=strNetworkPort; //fallback to verbatim port if not found
- }
- int nIndex = fNetworkPortCombo.indexOf(strPortName);
-
- if (nIndex == -1) {
- fNetworkPortCombo.setText(strNetworkPort);
- } else {
- fNetworkPortCombo.select(nIndex);
- }
- }
- }
- private String getNetworkPort() {
- String portText = fNetworkPortCombo.getText();
- String mappedPort = getNetworkPortMap().findPort(portText);
- return mappedPort!=null ? mappedPort : portText;
- }
- private NetworkPortMap getNetworkPortMap() {
- return fTerminalSettings.getProperties().getNetworkPortMap();
- }
-
- public boolean validateSettings() {
- return true;
- }
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout(2, false);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
-
- composite.setLayout(gridLayout);
- composite.setLayoutData(gridData);
-
- // Add label
- Label ctlLabel = new Label(composite, SWT.RIGHT);
- ctlLabel.setText(TelnetMessages.HOST + ":"); //$NON-NLS-1$
-
- // Add control
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- fHostText = new Text(composite, SWT.BORDER);
- fHostText.setLayoutData(gridData);
-
- // Add label
- ctlLabel = new Label(composite, SWT.RIGHT);
- ctlLabel.setText(TelnetMessages.PORT + ":"); //$NON-NLS-1$
-
- // Add control
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- fNetworkPortCombo = new Combo(composite, SWT.DROP_DOWN);
-
- fNetworkPortCombo.setLayoutData(gridData);
-
- List table = getNetworkPortMap().getNameTable();
- Collections.sort(table);
- loadCombo(fNetworkPortCombo, table);
-
- new Label(composite, SWT.RIGHT).setText(TelnetMessages.TIMEOUT + ":"); //$NON-NLS-1$
- fTimeout = new Text(composite, SWT.BORDER);
- fTimeout.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- loadSettings();
- }
- private void loadCombo(Combo ctlCombo, List table) {
- for (Iterator iter = table.iterator(); iter.hasNext();) {
- String label = (String) iter.next();
- ctlCombo.add(label);
- }
- }
-
- public String getName() {
- return TelnetMessages.CONNTYPE_NETWORK;
- }
-
-}

Back to the top